From 37188deef5445bcc76391a147646396722d12eee Mon Sep 17 00:00:00 2001 From: Marcos Longo Date: Wed, 14 Nov 2012 12:06:51 -0500 Subject: [PATCH 1/6] 1. Intermediate commit, to avoid losing stuff. The goal is to make the output in ED more standard: a. Name conventions: i. FMEAN: sub-daily means (the old AVG or MEAN variables). AVG variables that were not sub-daily means retained the old name. ii. DMEAN: daily means iii. MMEAN: monthly mean iv. MMSQU: monthly mean sum of squares v. QMEAN: mean diel vi. QMSQU: mean sum of squares by hour of day 2. The means are now for the native level (cohort, patch or site), plus polygon-level They all get a suffix: (_CO for cohorts, _PA for patches, _SI for sites, _PY for polygons). Metadata are also available 3. Biomass variables at polygon are split by DBH and PFT. The total and total by PFT or by DBH can be found by aggregating these variables accordingly. They can be also determined using the cohort-, patch-, or site-level variables. 4. BRAMS, and some R scripts aren't tested yet, but they will be soon. 2. Some classification variables that did not make sense to exist at the polygon-level (e.g. soil texture, soil colour) were deleted and only the site-level was kept. 3. Minor bug fixes in fusion, particularly with mortality. Fast means are now part of the patch/cohort dynamics because they are written to the output after the dynamics. --- BRAMS/src/ed2/edcp_driver.f90 | 18 +- BRAMS/src/ed2/edcp_load_namelist.f90 | 23 +- BRAMS/src/ed2/edcp_met.f90 | 360 +- BRAMS/src/ed2/edcp_model.f90 | 38 +- BRAMS/src/ed2/edcp_mpiutils.f90 | 46 +- BRAMS/src/lib/rconstants.f90 | 17 + ED/Template/Template/plot_eval_ed.r | 51 +- ED/Template/Template/plot_monthly.r | 1372 +- ED/Template/epost.sh | 11 +- ED/Template/joborder.txt | 2 +- ED/Template/run_sitter.sh | 1985 + ED/build/bin/dependency.mk | 28 +- ED/dbgbuild/bin/dependency.mk | 28 +- ED/src/driver/ed_driver.f90 | 47 +- ED/src/driver/ed_model.f90 | 87 +- ED/src/dynamics/canopy_struct_dynamics.f90 | 79 +- ED/src/dynamics/disturbance.f90 | 246 +- ED/src/dynamics/euler_driver.f90 | 30 +- ED/src/dynamics/forestry.f90 | 2 - ED/src/dynamics/heun_driver.f90 | 34 +- ED/src/dynamics/hybrid_driver.f90 | 174 +- ED/src/dynamics/lsm_hyd.f90 | 69 +- ED/src/dynamics/photosyn_driv.f90 | 92 +- ED/src/dynamics/radiate_driver.f90 | 206 +- ED/src/dynamics/rk4_derivs.F90 | 148 +- ED/src/dynamics/rk4_driver.F90 | 248 +- ED/src/dynamics/rk4_integ_utils.f90 | 167 +- ED/src/dynamics/rk4_misc.f90 | 196 +- ED/src/dynamics/rk4_stepper.F90 | 18 +- ED/src/dynamics/soil_respiration.f90 | 41 +- ED/src/dynamics/vegetation_dynamics.f90 | 58 +- ED/src/init/ed_bigleaf_init.f90 | 32 +- ED/src/init/ed_init.f90 | 96 +- ED/src/init/ed_init_atm.F90 | 15 +- ED/src/init/ed_params.f90 | 81 +- ED/src/init/ed_type_init.f90 | 2185 +- ED/src/init/init_hydro_sites.f90 | 19 +- ED/src/io/average_utils.f90 | 9759 ++--- ED/src/io/ed_init_full_history.F90 | 6410 ++-- ED/src/io/ed_load_namelist.f90 | 20 +- ED/src/io/ed_opspec.F90 | 69 +- ED/src/io/ed_read_ed10_20_history.f90 | 30 +- ED/src/io/ed_read_ed21_history.F90 | 76 +- ED/src/io/edio.f90 | 1676 +- ED/src/io/h5_output.F90 | 34 +- ED/src/memory/canopy_air_coms.f90 | 7 +- ED/src/memory/consts_coms.F90 | 28 +- ED/src/memory/ed_misc_coms.f90 | 8 + ED/src/memory/ed_state_vars.f90 | 35852 ++++++++++++------- ED/src/memory/ed_var_tables.f90 | 5 +- ED/src/memory/fusion_fission_coms.f90 | 8 + ED/src/memory/rk4_coms.f90 | 215 +- ED/src/memory/soil_coms.F90 | 150 +- ED/src/mpi/ed_mpass_init.f90 | 49 +- ED/src/utils/budget_utils.f90 | 47 +- ED/src/utils/fatal_error.f90 | 71 +- ED/src/utils/fuse_fiss_utils.f90 | 3763 +- ED/src/utils/invmondays.f90 | 58 + ED/src/utils/update_derived_props.f90 | 805 +- 59 files changed, 43226 insertions(+), 24263 deletions(-) create mode 100755 ED/Template/run_sitter.sh diff --git a/BRAMS/src/ed2/edcp_driver.f90 b/BRAMS/src/ed2/edcp_driver.f90 index 87cd4bf05..726c26a2e 100644 --- a/BRAMS/src/ed2/edcp_driver.f90 +++ b/BRAMS/src/ed2/edcp_driver.f90 @@ -63,16 +63,6 @@ subroutine ed_coup_driver() wtime_start = walltime(0.) wtime1 = walltime(wtime_start) - !---------------------------------------------------------------------------------------! - ! Check whether the user has indicated a need for any of the fast flux diagnostic ! - ! variables, these are used in conditions of ifoutput,idoutput and imoutput conditions. ! - ! If they are not >0, then set the logical, fast_diagnostics to false. ! - !---------------------------------------------------------------------------------------! - fast_diagnostics = checkbudget .or. ifoutput /= 0 .or. idoutput /= 0 .or. & - iqoutput /= 0 .or. imoutput /= 0 .or. ioutput /= 0 .or. & - iyoutput /= 0 - !---------------------------------------------------------------------------------------! - @@ -84,6 +74,14 @@ subroutine ed_coup_driver() !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! If we are running EDBRAMS then we must make sure that fast diagnostic averages ! + ! are found when ioutput is requested. ! + !---------------------------------------------------------------------------------------! + fast_diagnostics = fast_diagnostics .or. ioutput /= 0 + !---------------------------------------------------------------------------------------! + + !---------------------------------------------------------------------------------------! diff --git a/BRAMS/src/ed2/edcp_load_namelist.f90 b/BRAMS/src/ed2/edcp_load_namelist.f90 index 628943ebe..698b4a458 100644 --- a/BRAMS/src/ed2/edcp_load_namelist.f90 +++ b/BRAMS/src/ed2/edcp_load_namelist.f90 @@ -136,7 +136,14 @@ subroutine read_ednl(iunit,filename) , attach_metadata & ! intent(out) , iallom & ! intent(out) , igrass & ! intent(out) - , min_site_area ! ! intent(out) + , min_site_area & ! intent(out) + , fast_diagnostics & ! intent(out) + , writing_dail & ! intent(out) + , writing_mont & ! intent(out) + , writing_dcyc & ! intent(out) + , writing_year & ! intent(out) + , writing_long & ! intent(out) + , writing_eorq ! ! intent(out) use canopy_air_coms , only : icanturb & ! intent(out) , isfclyrm & ! intent(out) , ied_grndvap ! ! intent(out) @@ -549,6 +556,20 @@ subroutine read_ednl(iunit,filename) call copy_path_from_grid_1(ngrids,'sfilin' ,sfilin ) !---------------------------------------------------------------------------------------! + + + !----- Define some useful variables that control the output. ---------------------------! + writing_dail = idoutput > 0 + writing_mont = imoutput > 0 + writing_dcyc = iqoutput > 0 + writing_year = iyoutput > 0 + writing_long = writing_dail .or. writing_mont .or. writing_dcyc + writing_eorq = writing_mont .or. writing_dcyc + fast_diagnostics = ioutput /= 0 .or. ifoutput /= 0 .or. idoutput /= 0 .or. & + imoutput /= 0 .or. iqoutput /= 0 .or. itoutput /= 0 + !---------------------------------------------------------------------------------------! + + return end subroutine read_ednl !==========================================================================================! diff --git a/BRAMS/src/ed2/edcp_met.f90 b/BRAMS/src/ed2/edcp_met.f90 index 343db1351..cfd241cf9 100644 --- a/BRAMS/src/ed2/edcp_met.f90 +++ b/BRAMS/src/ed2/edcp_met.f90 @@ -1575,7 +1575,8 @@ subroutine copy_avgvars_to_leaf(ifm) use mem_grid , only : nzg & ! intent(in) , nzs ! ! intent(in) use rconstants , only : t3ple & ! intent(in) - , wdns ! ! intent(in) + , wdns & ! intent(in) + , kgCyr_2_umols & ! intent(in) use therm_lib , only : alvl & ! intent(in) , alvi & ! intent(in) , uint2tl & ! intent(in) @@ -1608,10 +1609,15 @@ subroutine copy_avgvars_to_leaf(ifm) integer :: ipft integer :: nsoil real :: site_area_i + real :: patch_wgt real :: ground_temp real :: ground_fliq + real :: veg_energy + real :: veg_water + real :: veg_hcap real :: veg_temp real :: veg_fliq + real :: can_shv real :: can_temp real :: can_exner !---------------------------------------------------------------------------------------! @@ -1634,6 +1640,10 @@ subroutine copy_avgvars_to_leaf(ifm) !------------------------------------------------------------------------------------! + !----- Find the total polygon area. -------------------------------------------------! + poly_area_i = 1. / sum(cpoly%area) + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! ! Copy the ED site-level averages to leaf_g structure "patches". ! @@ -1650,157 +1660,265 @@ subroutine copy_avgvars_to_leaf(ifm) !---------------------------------------------------------------------------------! - !---------------------------------------------------------------------------------! - ! Copy the soil information. ! - !---------------------------------------------------------------------------------! - do k=1,nzg - leaf_g(ifm)%soil_text (k,ix,iy,ilp) = real(cpoly%ntext_soil(k,isi)) - leaf_g(ifm)%soil_energy(k,ix,iy,ilp) = cpoly%avg_soil_energy(k,isi) - leaf_g(ifm)%soil_water (k,ix,iy,ilp) = cpoly%avg_soil_water (k,isi) - end do - leaf_g(ifm)%psibar_10d (ix,iy,ilp) = 1.0 - leaf_g(ifm)%soil_color(ix,iy,ilp) = real(cpoly%ncol_soil(isi)) + !----- Set LEAF-3 "patch" properties (equivalent to ED-2 sites). -----------------! + leaf_g(ifm)%soil_text (:,ix,iy,ilp) = real(cpoly%ntext_soil(:,isi)) + leaf_g(ifm)%psibar_10d(ix,iy,ilp) = 1.0 + leaf_g(ifm)%soil_color(ix,iy,ilp) = real(cpoly%ncol_soil(isi)) !---------------------------------------------------------------------------------! - !---------------------------------------------------------------------------------! - ! Site-level Surface water properties are always merged into one layer, 1, ! - ! so we copy all the information that may exist to the first layer and make the ! - ! others zero. In case there is nothing to copy, make it empty. ! - !---------------------------------------------------------------------------------! - if (cgrid%avg_sfcw_mass (isi) > tiny_sfcwater_mass) then - leaf_g(ifm)%sfcwater_nlev (ix,iy,ilp) = 1. - leaf_g(ifm)%sfcwater_energy (1,ix,iy,ilp) = cgrid%avg_sfcw_energy(isi) - leaf_g(ifm)%sfcwater_mass (1,ix,iy,ilp) = cgrid%avg_sfcw_mass (isi) - leaf_g(ifm)%sfcwater_depth (1,ix,iy,ilp) = cgrid%avg_sfcw_depth (isi) - else - leaf_g(ifm)%sfcwater_nlev (ix,iy,ilp) = 0. - leaf_g(ifm)%sfcwater_energy (1,ix,iy,ilp) = 0. - leaf_g(ifm)%sfcwater_mass (1,ix,iy,ilp) = 0. - leaf_g(ifm)%sfcwater_depth (1,ix,iy,ilp) = 0. - end if - do k=2,nzs - leaf_g(ifm)%sfcwater_energy (k,ix,iy,ilp) = 0. - leaf_g(ifm)%sfcwater_mass (k,ix,iy,ilp) = 0. - leaf_g(ifm)%sfcwater_depth (k,ix,iy,ilp) = 0. - end do + !----- Initialise site-level variables that must be aggregated. ------------------! + leaf_g(ifm)%soil_energy (:,ix,iy,ilp) = 0.0 + leaf_g(ifm)%soil_water (:,ix,iy,ilp) = 0.0 + leaf_g(ifm)%sfcwater_energy(:,ix,iy,ilp) = 0.0 + leaf_g(ifm)%sfcwater_mass (:,ix,iy,ilp) = 0.0 + leaf_g(ifm)%sfcwater_depth (:,ix,iy,ilp) = 0.0 + leaf_g(ifm)%veg_water (ix,iy,ilp) = 0.0 + leaf_g(ifm)%veg_hcap (ix,iy,ilp) = 0.0 + leaf_g(ifm)%veg_energy (ix,iy,ilp) = 0.0 + leaf_g(ifm)%veg_lai (ix,iy,ilp) = 0.0 + leaf_g(ifm)%veg_tai (ix,iy,ilp) = 0.0 + leaf_g(ifm)%veg_water (ix,iy,ilp) = 0.0 + leaf_g(ifm)%veg_hcap (ix,iy,ilp) = 0.0 + leaf_g(ifm)%veg_energy (ix,iy,ilp) = 0.0 + leaf_g(ifm)%veg_lai (ix,iy,ilp) = 0.0 + leaf_g(ifm)%veg_tai (ix,iy,ilp) = 0.0 + leaf_g(ifm)%veg_agb (ix,iy,ilp) = 0.0 + leaf_g(ifm)%can_theta (ix,iy,ilp) = 0.0 + leaf_g(ifm)%can_theiv (ix,iy,ilp) = 0.0 + leaf_g(ifm)%can_vpdef (ix,iy,ilp) = 0.0 + leaf_g(ifm)%can_co2 (ix,iy,ilp) = 0.0 + leaf_g(ifm)%can_prss (ix,iy,ilp) = 0.0 + leaf_g(ifm)%sensible_gc (ix,iy,ilp) = 0.0 + leaf_g(ifm)%sensible_vc (ix,iy,ilp) = 0.0 + leaf_g(ifm)%evap_gc (ix,iy,ilp) = 0.0 + leaf_g(ifm)%evap_vc (ix,iy,ilp) = 0.0 + leaf_g(ifm)%transp (ix,iy,ilp) = 0.0 + leaf_g(ifm)%gpp (ix,iy,ilp) = 0.0 + leaf_g(ifm)%plresp (ix,iy,ilp) = 0.0 + leaf_g(ifm)%resphet (ix,iy,ilp) = 0.0 + can_shv = 0.0 !---------------------------------------------------------------------------------! - - !---------------------------------------------------------------------------------! - ! Update vegetation properties. ! !---------------------------------------------------------------------------------! - leaf_g(ifm)%veg_water (ix,iy,ilp) = cpoly%avg_leaf_water (isi) & - + cpoly%avg_wood_water (isi) - leaf_g(ifm)%veg_hcap (ix,iy,ilp) = cpoly%avg_leaf_hcap (isi) & - + cpoly%avg_wood_hcap (isi) - leaf_g(ifm)%veg_energy (ix,iy,ilp) = cpoly%avg_leaf_energy (isi) & - + cpoly%avg_wood_energy (isi) - leaf_g(ifm)%veg_lai (ix,iy,ilp) = cpoly%lai(isi) - leaf_g(ifm)%veg_tai (ix,iy,ilp) = cpoly%lai(isi) + cgrid%wai(isi) + ! Loop over the patches. ! !---------------------------------------------------------------------------------! + patchloop: do ipa=1,csite%npatches + cpatch => csite%patch(ipa) + !----- Find the weights. ------------------------------------------------------! + patch_wgt = csite%area(ipa) * site_area_i + !------------------------------------------------------------------------------! - !----- Fill above ground biomass by integrating all PFTs and DBH classes. --------! - leaf_g(ifm)%veg_agb(ix,iy,ilp) = 0. - do idbh=1,n_dbh - do ipft=1,n_pft - leaf_g(ifm)%veg_agb(ix,iy,ilp) = leaf_g(ifm)%veg_agb(ix,iy,ilp) & - + cpoly%agb(ipft,idbh,isi) - end do - end do - !---------------------------------------------------------------------------------! + !----- Aggregate soil layers. -------------------------------------------------! + soilloop: do k=1,nzg + leaf_g(ifm)%soil_energy(k,ix,iy,ilp) = leaf_g(ifm)%soil_energy(k,ix,iy,ilp) & + + csite%fmean_soil_energy(k,ipa) & + * patch_wgt + leaf_g(ifm)%soil_water (k,ix,iy,ilp) = leaf_g(ifm)%soil_water (k,ix,iy,ilp) & + + csite%fmean_soil_water (k,ipa) & + * patch_wgt + end do soilloop + !------------------------------------------------------------------------------! - !---------------------------------------------------------------------------------! - ! Update canopy air properties. ! - !---------------------------------------------------------------------------------! - leaf_g(ifm)%can_theta (ix,iy,ilp) = cpoly%avg_can_theta(isi) - leaf_g(ifm)%can_theiv (ix,iy,ilp) = cpoly%avg_can_theiv(isi) - leaf_g(ifm)%can_vpdef (ix,iy,ilp) = cpoly%avg_can_vpdef(isi) - leaf_g(ifm)%can_co2 (ix,iy,ilp) = max( atm_co2_min & - , cpoly%avg_can_co2(isi) - co2_offset) - leaf_g(ifm)%can_prss (ix,iy,ilp) = cpoly%avg_can_prss(isi) - !----- ED uses specific humidity, converting it to mixing ratio. -----------------! - leaf_g(ifm)%can_rvap (ix,iy,ilp) = cpoly%avg_can_shv(isi) & - / (1.-cpoly%avg_can_shv(isi)) - !---------------------------------------------------------------------------------! + !----- Temporary surface water: squeeze everything into one layer. ------------! + leaf_g(ifm)%sfcwater_energy(1,ix,iy,ilp) = & + leaf_g(ifm)%sfcwater_energy(1,ix,iy,ilp) & + + csite%fmean_sfcw_energy(ipa) * csite%fmean_sfcw_water(ipa) & + * patch_wgt + leaf_g(ifm)%sfcwater_mass (1,ix,iy,ilp) = & + leaf_g(ifm)%sfcwater_mass (1,ix,iy,ilp) & + + csite%fmean_sfcw_water(ipa) * patch_wgt + leaf_g(ifm)%sfcwater_depth (1,ix,iy,ilp) = & + leaf_g(ifm)%sfcwater_depth (1,ix,iy,ilp) & + + csite%fmean_sfcw_depth (ipa) * patch_wgt + !------------------------------------------------------------------------------! - !---------------------------------------------------------------------------------! - ! Temperature and liquid fraction of surfaces. We need them to find the ! - ! mean latent heat of vapourisation between leaves/ground and the canopy air ! - ! space. ! - !---------------------------------------------------------------------------------! - !----- Ground temperature. -------------------------------------------------------! - if (leaf_g(ifm)%sfcwater_nlev(ix,iy,ilp) == 0.) then - !------ There is no temporary surface water. Use top soil temperature. -------! - nsoil = cpoly%ntext_soil(nzg,isi) - call uextcm2tl(cgrid%avg_soil_energy(nzg,isi) & - ,cgrid%avg_soil_water(nzg,isi) * wdns,soil(nsoil)%slcpd & - ,ground_temp,ground_fliq ) !------------------------------------------------------------------------------! - else - !------ There is a temporary surface water. Use average temperature. ---------! - call uint2tl(cgrid%avg_sfcw_energy(isi),ground_temp,ground_fliq) + ! Update canopy air properties. ! !------------------------------------------------------------------------------! - end if - !----- Vegetation temperature. Here we must check if there are plants. ----------! - if (leaf_g(ifm)%veg_hcap(ix,iy,ilp) > 0.) then - !----- There is some plant here. ----------------------------------------------! - call uextcm2tl(leaf_g(ifm)%veg_energy(ix,iy,ilp) & - ,leaf_g(ifm)%veg_water (ix,iy,ilp) & - ,leaf_g(ifm)%veg_hcap (ix,iy,ilp) & - ,veg_temp,veg_fliq ) + leaf_g(ifm)%can_theta(ix,iy,ilp) = leaf_g(ifm)%can_theta(ix,iy,ilp) & + + csite%fmean_can_theta(ipa) * patch_wgt + leaf_g(ifm)%can_theiv(ix,iy,ilp) = leaf_g(ifm)%can_theiv(ix,iy,ilp) & + + csite%fmean_can_theiv(ipa) * patch_wgt + leaf_g(ifm)%can_vpdef(ix,iy,ilp) = leaf_g(ifm)%can_vpdef(ix,iy,ilp) & + + csite%fmean_can_vpdef(ipa) * patch_wgt + leaf_g(ifm)%can_co2 (ix,iy,ilp) = leaf_g(ifm)%can_co2 (ix,iy,ilp) & + + csite%fmean_can_co2 (ipa) * patch_wgt + leaf_g(ifm)%can_prss (ix,iy,ilp) = leaf_g(ifm)%can_prss (ix,iy,ilp) & + + csite%fmean_can_prss (ipa) * patch_wgt + can_shv = can_shv & + + csite%fmean_can_shv (ipa) * patch_wgt !------------------------------------------------------------------------------! - else - !----- Site is empty. Use canopy air space instead. --------------------------! - can_exner = press2exner(cpoly%avg_can_prss(isi)) - can_temp = extheta2temp(can_exner,leaf_g(ifm)%can_theta(ix,iy,ilp)) - veg_temp = can_temp - if (veg_temp == t3ple) then - veg_fliq = 0.5 - elseif (veg_temp > t3ple) then - veg_fliq = 1.0 + + + + !------------------------------------------------------------------------------! + ! Find the ground temperature, we need it to transform water flux into ! + ! energy. ! + !------------------------------------------------------------------------------! + if (csite%fmean_sfcw_mass(ipa) > tiny_sfcwater_mass) then + !------ There is a temporary surface water. Use average temperature. ------! + call uint2tl(csite%fmean_sfcw_energy(ipa),ground_temp,ground_fliq) + !---------------------------------------------------------------------------! else - veg_fliq = 0.0 + !------ There is no temporary surface water. Use top soil temperature. ----! + nsoil = cpoly%ntext_soil(nzg,isi) + call uextcm2tl(csite%fmean_soil_energy(nzg,ipa) & + ,csite%fmean_soil_water (nzg,ipa) * wdns,soil(nsoil)%slcpd & + ,ground_temp,ground_fliq) + !---------------------------------------------------------------------------! end if !------------------------------------------------------------------------------! - end if - !---------------------------------------------------------------------------------! + !------------------------------------------------------------------------------! + ! Copy the fluxes, which will be used for output only. We must convert ! + ! the water flux to energy-equivalent. ! + !------------------------------------------------------------------------------! + leaf_g(ifm)%sensible_gc(ix,iy,ilp) = leaf_g(ifm)%sensible_gc(ix,iy,ilp) & + + csite%fmean_sensible_gc(ipa) * patch_wgt + leaf_g(ifm)%evap_gc (ix,iy,ilp) = leaf_g(ifm)%evap_gc (ix,iy,ilp) & + + csite%fmean_vapor_gc (ipa) & + * ( ground_fliq * alvl(ground_temp) & + + (1. - ground_fliq) * alvi(ground_temp)) & + * patch_wgt + !------------------------------------------------------------------------------! + + + + !----- Heterotrophic respiration. Make units umol/m2/s. ----------------------! + leaf_g(ifm)%resphet(ix,iy,ilp) = leaf_g(ifm)%resphet(ix,iy,ilp) & + + csite%fmean_rh (ico) & + * patch_wgt * kgCyr_2_umols + !------------------------------------------------------------------------------! + + + + !----- Find CAS temperature, in case there are unresolvable cohorts. ----------! + can_exner = press2exner(csite%fmean_can_prss(ipa)) + can_temp = extheta2temp(can_exner,csite%fmean_can_theta(ipa)) + !------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------! + ! Loop over cohorts. ! + !------------------------------------------------------------------------------! + cohortloop: do ico=1,cpatch%ncohorts + !----- Find the vegetation temperature and fraction of liquid water. -------! + veg_water = cpatch%fmean_leaf_water (ico) + cpatch%fmean_wood_water (ico) + veg_energy = cpatch%fmean_leaf_energy(ico) + cpatch%fmean_wood_energy(ico) + veg_hcap = cpatch%fmean_leaf_hcap (ico) + cpatch%fmean_wood_hcap (ico) + if (veg_hcap > 0.) then + !----- There are plants. Use standard thermodynamics. ------------------! + call uextcm2tcl(veg_energy,veg_water,veg_hcap,veg_temp,veg_fliq) + else + !----- No plant biomass. Use CAS temperature instead. -------------------! + veg_temp = can_temp + if (veg_temp == t3ple) then + veg_fliq = 0.5 + elseif (veg_temp > t3ple) then + veg_fliq = 1.0 + else + veg_fliq = 0.0 + end if + end if + !---------------------------------------------------------------------------! + + + + !------ Integrate state variables. -----------------------------------------! + leaf_g(ifm)%veg_water (ix,iy,ilp) = leaf_g(ifm)%veg_water (ix,iy,ilp) & + + veg_water * patch_wgt + leaf_g(ifm)%veg_hcap (ix,iy,ilp) = leaf_g(ifm)%veg_hcap (ix,iy,ilp) & + + veg_hcap * patch_wgt + leaf_g(ifm)%veg_energy(ix,iy,ilp) = leaf_g(ifm)%veg_energy(ix,iy,ilp) & + + veg_energy * patch_wgt + leaf_g(ifm)%veg_lai (ix,iy,ilp) = leaf_g(ifm)%veg_lai (ix,iy,ilp) & + + cpatch%lai(ico) * patch_wgt + leaf_g(ifm)%veg_tai (ix,iy,ilp) = leaf_g(ifm)%veg_tai (ix,iy,ilp) & + + ( cpatch%lai(ico) + cgrid%wai(ico) ) & + * patch_wgt + leaf_g(ifm)%veg_agb (ix,iy,ilp) = leaf_g(ifm)%veg_agb (ix,iy,ilp) & + + (cpatch%nplant(ico) * cpatch%agb(ico)) & + * patch_wgt + !---------------------------------------------------------------------------! + + + + + !---------------------------------------------------------------------------! + ! Integrate the fluxes. ! + !---------------------------------------------------------------------------! + leaf_g(ifm)%sensible_vc(ix,iy,ilp) = leaf_g(ifm)%sensible_vc(ix,iy,ilp) & + + ( cpatch%fmean_sensible_lc(ico) & + + cpatch%fmean_sensible_wc(ico) ) & + * patch_wgt + leaf_g(ifm)%evap_vc (ix,iy,ilp) = leaf_g(ifm)%evap_vc (ix,iy,ilp) & + + ( cpatch%fmean_vapor_lc(ico) & + + cpatch%fmean_vapor_wc(ico) ) & + * ( veg_fliq * alvl(veg_temp) & + + (1.0 - veg_fliq) * alvi(veg_temp) ) & + * patch_wgt + !----- Transpiration only happens from liquid phase to vapour. -------------! + leaf_g(ifm)%transp (ix,iy,ilp) = leaf_g(ifm)%transp (ix,iy,ilp) & + + cpatch%fmean_transp(ico) & + * alvl(veg_temp) * patch_wgt + !---------------------------------------------------------------------------! + + + + !------ Carbon fluxes. Switch units to umol/m2/s. -------------------------! + leaf_g(ifm)%gpp (ix,iy,ilp) = leaf_g(ifm)%gpp (ix,iy,ilp) & + + cpatch%fmean_gpp (ico) & + * cpatch%nplant (ico) & + * patch_wgt * kgCyr_2_umols + leaf_g(ifm)%plresp (ix,iy,ilp) = leaf_g(ifm)%plresp (ix,iy,ilp) & + + cpatch%fmean_plresp(ico) & + * cpatch%nplant (ico) & + * patch_wgt * kgCyr_2_umols + !---------------------------------------------------------------------------! + end do cohortloop + !------------------------------------------------------------------------------! + end do patchloop !---------------------------------------------------------------------------------! - ! Copy the fluxes, which will be used for output only. ! + + !---------------------------------------------------------------------------------! - leaf_g(ifm)%sensible_gc(ix,iy,ilp) = cpoly%avg_sensible_gc(isi) - leaf_g(ifm)%sensible_vc(ix,iy,ilp) = ( cpoly%avg_sensible_lc(isi) & - + cpoly%avg_sensible_wc(isi) ) - leaf_g(ifm)%evap_gc (ix,iy,ilp) = cpoly%avg_vapor_gc(isi) & - * ( ground_fliq * alvl(ground_temp) & - + (1.0 - ground_fliq) * alvi(ground_temp) ) - leaf_g(ifm)%evap_vc (ix,iy,ilp) = ( cpoly%avg_vapor_lc(isi) & - + cpoly%avg_vapor_wc(isi) ) & - * ( veg_fliq * alvl(veg_temp) & - + (1.0 - veg_fliq) * alvi(veg_temp) ) - !----- Transpiration only happens from liquid phase to vapour. -------------------! - leaf_g(ifm)%transp (ix,iy,ilp) = cpoly%avg_transp(isi) * alvl(veg_temp) + ! Check whether there was some mass in the temporary pounding/snow layer. In ! + ! case there isn't, force all properties to be zero. ! + !---------------------------------------------------------------------------------! + if (leaf_g(ifm)%sfcwater_mass > tiny_sfcwater_mass) then + leaf_g(ifm)%sfcwater_nlev (ix,iy,ilp) = 1. + leaf_g(ifm)%sfcwater_energy(1,ix,iy,ilp) = & + leaf_g(ifm)%sfcwater_energy(1,ix,iy,ilp) & + / leaf_g(ifm)%sfcwater_water (1,ix,iy,ilp) + else + leaf_g(ifm)%sfcwater_nlev (ix,iy,ilp) = 0. + leaf_g(ifm)%sfcwater_energy (1,ix,iy,ilp) = 0. + leaf_g(ifm)%sfcwater_mass (1,ix,iy,ilp) = 0. + leaf_g(ifm)%sfcwater_depth (1,ix,iy,ilp) = 0. + end if !---------------------------------------------------------------------------------! - - !------ Carbon fluxes don't have polygon level, compute the average here. --------! - leaf_g(ifm)%gpp (ix,iy,ilp) = sum(csite%area * csite%co2budget_gpp ) & - * site_area_i - leaf_g(ifm)%plresp (ix,iy,ilp) = sum(csite%area * csite%co2budget_plresp ) & - * site_area_i - leaf_g(ifm)%resphet (ix,iy,ilp) = sum(csite%area * csite%co2budget_rh ) & - * site_area_i + !---------------------------------------------------------------------------------! + ! Canopy air: convert specific humidity to mixing ratio, add the offset to ! + ! CO2 if wanted by the user, and ensure that CO2 is bounded. ! + !---------------------------------------------------------------------------------! + leaf_g(ifm)%can_rvap (ix,iy,ilp) = can_shv / (1.0 - can_shv) + leaf_g(ifm)%can_co2 (ix,iy,ilp) = max( atm_co2_min & + , leaf_g(ifm)%can_co2 (ix,iy,ilp) & + - co2_offset ) !---------------------------------------------------------------------------------! end do siteloop !------------------------------------------------------------------------------------! diff --git a/BRAMS/src/ed2/edcp_model.f90 b/BRAMS/src/ed2/edcp_model.f90 index 936267846..b23611693 100644 --- a/BRAMS/src/ed2/edcp_model.f90 +++ b/BRAMS/src/ed2/edcp_model.f90 @@ -143,6 +143,12 @@ subroutine ed_coup_model(ifm) , iqoutput & ! intent(in) , itoutput & ! intent(in) , iyoutput & ! intent(in) + , writing_dail & ! intent(in) + , writing_mont & ! intent(in) + , writing_dcyc & ! intent(in) + , writing_year & ! intent(in) + , writing_eorq & ! intent(in) + , writing_long & ! intent(in) , frqsum & ! intent(inout) , unitfast & ! intent(in) , unitstate & ! intent(in) @@ -194,10 +200,6 @@ subroutine ed_coup_model(ifm) integer , external :: num_days !----- Locally saved variables. --------------------------------------------------------! logical , save :: first_time = .true. - logical , save :: writing_dail - logical , save :: writing_mont - logical , save :: writing_dcyc - logical , save :: writing_year logical, dimension(maxgrds), save :: calledgrid !---------------------------------------------------------------------------------------! @@ -207,10 +209,6 @@ subroutine ed_coup_model(ifm) ! in a coupled model. The test can be done only once. ! !---------------------------------------------------------------------------------------! if (first_time) then - writing_dail = idoutput > 0 - writing_mont = imoutput > 0 - writing_dcyc = iqoutput > 0 - writing_year = iyoutput > 0 filltables = .false. record_err = .false. print_detailed = .false. @@ -234,7 +232,17 @@ subroutine ed_coup_model(ifm) !----- Radiation scheme. ---------------------------------------------------------------! call radiate_driver(edgrid_g(ifm)) - + + + !---------------------------------------------------------------------------------------! + ! At this point, all meteorologic driver data for the land surface model has been ! + ! updated for the current timestep. Perform the time space average for the output ! + ! diagnostic. ! + !---------------------------------------------------------------------------------------! + call integrate_ed_fmean_met_vars(edgrid_g(ifm)) + !---------------------------------------------------------------------------------------! + + !----- Solve the enthalpy, water, and carbon budgets. ----------------------------------! select case (integration_scheme) case (0) @@ -247,13 +255,6 @@ subroutine ed_coup_model(ifm) call hybrid_timestep(edgrid_g(ifm)) end select - !---------------------------------------------------------------------------------------! - ! Update the daily averages if daily or monthly analysis are needed. ! - !---------------------------------------------------------------------------------------! - if (writing_dail .or. writing_mont .or. writing_dcyc) then - call integrate_ed_daily_output_state(edgrid_g(ifm)) - end if - !---------------------------------------------------------------------------------------! ! The remainder of this subroutine is called only once, and it is done after all ! @@ -331,8 +332,7 @@ subroutine ed_coup_model(ifm) ! Call the model output driver. ! !------------------------------------------------------------------------------------! call ed_output(analysis_time,new_day,dail_analy_time,mont_analy_time,dcyc_analy_time & - ,annual_time,writing_dail,writing_mont,writing_dcyc,history_time & - ,dcycle_time,the_end) + ,annual_time,history_time,dcycle_time,the_end) !------------------------------------------------------------------------------------! @@ -357,7 +357,7 @@ subroutine ed_coup_model(ifm) !------------------------------------------------------------------------------------! if (reset_time) then do jfm=1,ngrids - call reset_averaged_vars(edgrid_g(jfm)) + call zero_ed_fmean_vars(edgrid_g(jfm)) end do end if diff --git a/BRAMS/src/ed2/edcp_mpiutils.f90 b/BRAMS/src/ed2/edcp_mpiutils.f90 index bf35d7e46..6625fa2b0 100644 --- a/BRAMS/src/ed2/edcp_mpiutils.f90 +++ b/BRAMS/src/ed2/edcp_mpiutils.f90 @@ -64,7 +64,14 @@ subroutine masterput_ednl(mainnum) , idateh & ! intent(in) , iallom & ! intent(in) , igrass & ! intent(in) - , min_site_area ! ! intent(in) + , min_site_area & ! intent(in) + , fast_diagnostics & ! intent(in) + , writing_dail & ! intent(in) + , writing_mont & ! intent(in) + , writing_dcyc & ! intent(in) + , writing_year & ! intent(in) + , writing_long & ! intent(in) + , writing_eorq ! ! intent(in) use grid_coms , only : nzg & ! intent(in) , nzs & ! intent(in) , ngrids & ! intent(in) @@ -405,6 +412,21 @@ subroutine masterput_ednl(mainnum) call MPI_Bcast(idetailed,1,MPI_INTEGER,mainnum,MPI_COMM_WORLD,ierr) call MPI_Bcast(patch_keep,1,MPI_INTEGER,mainnum,MPI_COMM_WORLD,ierr) + + !---------------------------------------------------------------------------------------! + ! These variables are useful to check for which output types to allocate. ! + !---------------------------------------------------------------------------------------! + call MPI_Bcast(writing_dail ,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) + call MPI_Bcast(writing_mont ,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) + call MPI_Bcast(writing_dcyc ,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) + call MPI_Bcast(writing_year ,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) + call MPI_Bcast(writing_long ,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) + call MPI_Bcast(writing_eorq ,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) + call MPI_Bcast(fast_diagnostics,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) + !---------------------------------------------------------------------------------------! + + + return end subroutine masterput_ednl !==========================================================================================! @@ -479,7 +501,14 @@ subroutine nodeget_ednl(master_num) , idateh & ! intent(out) , iallom & ! intent(out) , igrass & ! intent(out) - , min_site_area ! ! intent(out) + , min_site_area & ! intent(out) + , fast_diagnostics & ! intent(out) + , writing_dail & ! intent(out) + , writing_mont & ! intent(out) + , writing_dcyc & ! intent(out) + , writing_year & ! intent(out) + , writing_long & ! intent(out) + , writing_eorq ! ! intent(out) use grid_coms , only : nzg & ! intent(out) , nzs & ! intent(out) , ngrids & ! intent(out) @@ -821,6 +850,19 @@ subroutine nodeget_ednl(master_num) call MPI_Bcast(idetailed,1,MPI_INTEGER,master_num,MPI_COMM_WORLD,ierr) call MPI_Bcast(patch_keep,1,MPI_INTEGER,master_num,MPI_COMM_WORLD,ierr) + + !---------------------------------------------------------------------------------------! + ! These variables are useful to check for which output types to allocate. ! + !---------------------------------------------------------------------------------------! + call MPI_Bcast(writing_dail ,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) + call MPI_Bcast(writing_mont ,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) + call MPI_Bcast(writing_dcyc ,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) + call MPI_Bcast(writing_year ,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) + call MPI_Bcast(writing_long ,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) + call MPI_Bcast(writing_eorq ,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) + call MPI_Bcast(fast_diagnostics,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) + !---------------------------------------------------------------------------------------! + return end subroutine nodeget_ednl !==========================================================================================! diff --git a/BRAMS/src/lib/rconstants.f90 b/BRAMS/src/lib/rconstants.f90 index a6ce06241..0e23b6dc3 100644 --- a/BRAMS/src/lib/rconstants.f90 +++ b/BRAMS/src/lib/rconstants.f90 @@ -324,6 +324,23 @@ Module rconstants + !---------------------------------------------------------------------------------------! + ! Carbon-related unit conversions. ! + !---------------------------------------------------------------------------------------! + real, parameter :: mol_2_umol = 1.e6 ! mol => µmol + real, parameter :: umol_2_mol = 1.e-6 ! µmol => mol + real, parameter :: umol_2_kgC = 1.20107e-8 ! µmol(CO2) => kg(C) + real, parameter :: Watts_2_Ein = 4.6e-6 ! W/m2 => mol/m²/s + real, parameter :: Ein_2_Watts = 1./Watts_2_Ein ! mol/m²/s => W/m2 + real, parameter :: kgC_2_umol = 1. / umol_2_kgC ! kg(C) => µmol(CO2) + real, parameter :: kgom2_2_tonoha = 10. ! kg(C)/m² => ton(C)/ha + real, parameter :: tonoha_2_kgom2 = 0.1 ! ton(C)/ha => kg(C)/m² + real, parameter :: umols_2_kgCyr = umol_2_kgC * yr_sec ! µmol(CO2)/s => kg(C)/yr + real, parameter :: kgCday_2_umols = kgC_2_umol / day_sec ! kg(C)/day => µmol(CO2)/s + !---------------------------------------------------------------------------------------! + + + !---------------------------------------------------------------------------------------! ! Double precision version of all constants used in Runge-Kutta. ! !---------------------------------------------------------------------------------------! diff --git a/ED/Template/Template/plot_eval_ed.r b/ED/Template/Template/plot_eval_ed.r index 503b54528..a46ce8d0b 100644 --- a/ED/Template/Template/plot_eval_ed.r +++ b/ED/Template/Template/plot_eval_ed.r @@ -432,32 +432,31 @@ for (place in myplaces){ myinst = hdf5load(file=myfile,load=FALSE,verbosity=0,tidy=TRUE) }#end if #------------------------------------------------------------------------------# - model$atm.tmp [tt] = myinst$AVG.ATM.TMP - t00 - model$atm.shv [tt] = myinst$AVG.ATM.SHV * 1000. - model$atm.prss [tt] = myinst$AVG.ATM.PRSS * 0.01 - model$rain [tt] = myinst$AVG.PCPG * hr.sec - model$atm.co2 [tt] = myinst$AVG.ATM.CO2 - model$atm.vels [tt] = myinst$AVG.VELS - model$rshort [tt] = myinst$AVG.RSHORT - model$rlong [tt] = myinst$AVG.RLONG - model$par [tt] = ( ( myinst$AVG.PAR.BEAM + myinst$AVG.PAR.DIFF ) - * Watts.2.Ein * 1.e6) - model$hflxca [tt] = - myinst$AVG.SENSIBLE.AC - model$wflxca [tt] = - myinst$AVG.VAPOR.AC * day.sec - model$cflxca [tt] = - myinst$AVG.CARBON.AC - model$cflxst [tt] = + myinst$AVG.CARBON.ST - model$gpp [tt] = myinst$AVG.GPP * umols.2.kgCyr - model$reco [tt] = ( ( myinst$AVG.PLANT.RESP + myinst$AVG.HTROPH.RESP ) - * umols.2.kgCyr ) - model$nep [tt] = model$gpp[tt] - model$reco[tt] - model$nee [tt] = - model$nep[tt] * kgCyr.2.umols - model$ustar [tt] = myinst$AVG.USTAR - model$rlongup [tt] = myinst$AVG.RLONGUP - model$albedo [tt] = myinst$AVG.ALBEDO - model$rnet [tt] = ( (1. - myinst$AVG.ALBEDO) * myinst$AVG.RSHORT - + myinst$AVG.RLONG - myinst$AVG.RLONGUP ) - model$parup [tt] = myinst$AVG.PARUP * Watts.2.Ein * 1.e6 - model$rshortup [tt] = myinst$AVG.RSHORTUP + model$atm.tmp [tt] = myinst$FMEAN.ATM.TEMP.PY - t00 + model$atm.shv [tt] = myinst$FMEAN.ATM.SHV.PY * 1000. + model$atm.prss [tt] = myinst$FMEAN.ATM.PRSS.PY * 0.01 + model$rain [tt] = myinst$FMEAN.PCPG.PY * hr.sec + model$atm.co2 [tt] = myinst$FMEAN.ATM.CO2.PY + model$atm.vels [tt] = myinst$FMEAN.ATM.VELS.PY + model$rshort [tt] = myinst$FMEAN.ATM.RSHORT.PY + model$rlong [tt] = myinst$FMEAN.ATM.RLONG.PY + model$par [tt] = myinst$FMEAN.ATM.PAR.PY * Watts.2.Ein * 1.e6 + model$hflxca [tt] = - myinst$FMEAN.SENSIBLE.AC.PY + model$wflxca [tt] = - myinst$FMEAN.VAPOR.AC.PY * day.sec + model$cflxca [tt] = - myinst$FMEAN.CARBON.AC.PY + model$cflxst [tt] = + myinst$FMEAN.CARBON.ST.PY + model$gpp [tt] = myinst$FMEAN.GPP.PY + model$reco [tt] = ( myinst$FMEAN.PLRESP.PY + + myinst$FMEAN.RH.PY ) + model$nep [tt] = myinst$FMEAN.NEP.PY + model$nee [tt] = ( myinst$FMEAN.CARBON.ST.PY + - myinst$FMEAN.CARBON.AC.PY ) + model$ustar [tt] = myinst$FMEAN.USTAR.PY + model$rlongup [tt] = myinst$FMEAN.RLONGUP.PY + model$albedo [tt] = myinst$FMEAN.ALBEDO.PY + model$rnet [tt] = myinst$FMEAN.RNET.PY + model$parup [tt] = myinst$FMEAN.PARUP.PY * Watts.2.Ein * 1.e6 + model$rshortup [tt] = myinst$FMEAN.RSHORTUP.PY if (tt == ntimes){ eddy.complete = TRUE diff --git a/ED/Template/Template/plot_monthly.r b/ED/Template/Template/plot_monthly.r index 2098431cc..a5e423e46 100644 --- a/ED/Template/Template/plot_monthly.r +++ b/ED/Template/Template/plot_monthly.r @@ -175,9 +175,11 @@ for (place in myplaces){ #----- Decide how frequently the cohort-level variables should be saved. ---------------# if (yearend - yearbeg + 1 <= nyears.long){ - sasmonth = sasmonth.short + sasmonth = sasmonth.short + emean.line = TRUE }else{ - sasmonth = sasmonth.long + sasmonth = sasmonth.long + emean.line = FALSE }#end if #---------------------------------------------------------------------------------------# @@ -310,9 +312,15 @@ for (place in myplaces){ #----- Make some shorter versions of some variables. -----------------------------------# - mfac = datum$month - dcycmean = datum$dcycmean - dcycmsqu = datum$dcycmsqu + mfac = datum$month + emean = datum$emean + emsqu = datum$emsqu + qmean = datum$qmean + qmsqu = datum$qmsqu + szpft = datum$szpft + lu = datum$lu + patch = datum$patch + cohort = datum$cohort #---------------------------------------------------------------------------------------# @@ -321,85 +329,145 @@ for (place in myplaces){ #---------------------------------------------------------------------------------------# cat (" - Finding the monthly mean...","\n") cat (" * Aggregating the monthly mean...","\n") - mont12mn = list() - mont12mn$gpp = tapply(X=datum$gpp ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$npp = tapply(X=datum$npp ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$nep = tapply(X=datum$nep ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$plresp = tapply(X=datum$plresp ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$leaf.resp = tapply(X=datum$leaf.resp ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$root.resp = tapply(X=datum$root.resp ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$growth.resp = tapply(X=datum$growth.resp ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$hetresp = tapply(X=datum$hetresp ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$cwdresp = tapply(X=datum$cwdresp ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$cflxca = tapply(X=datum$cflxca ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$cflxst = tapply(X=datum$cflxst ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$nee = tapply(X=datum$nee ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$reco = tapply(X=datum$reco ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$hflxca = tapply(X=datum$hflxca ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$hflxlc = tapply(X=datum$hflxlc ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$hflxwc = tapply(X=datum$hflxwc ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$hflxgc = tapply(X=datum$hflxgc ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$wflxca = tapply(X=datum$wflxca ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$qwflxca = tapply(X=datum$qwflxca ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$wflxlc = tapply(X=datum$wflxlc ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$wflxwc = tapply(X=datum$wflxwc ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$wflxgc = tapply(X=datum$wflxgc ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$evap = tapply(X=datum$evap ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$transp = tapply(X=datum$transp ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$rain = tapply(X=datum$rain ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$atm.temp = tapply(X=datum$atm.temp ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$rshort = tapply(X=datum$rshort ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$rshortup = tapply(X=datum$rshortup ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$rlong = tapply(X=datum$rlong ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$rlongup = tapply(X=datum$rlongup ,INDEX=mfac ,FUN=mean,na.rm=T) - # mont12mn$par.tot = tapply(X=datum$par.tot ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$parup = tapply(X=datum$parup ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$rnet = tapply(X=datum$rnet ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$albedo = tapply(X=datum$albedo ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$atm.shv = tapply(X=datum$atm.shv ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$atm.co2 = tapply(X=datum$atm.co2 ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$atm.prss = tapply(X=datum$atm.prss ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$atm.vels = tapply(X=datum$atm.vels ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$ustar = tapply(X=datum$ustar ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$soil.temp = qapply(X=datum$soil.temp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - mont12mn$soil.water = qapply(X=datum$soil.water ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - mont12mn$soil.mstpot = qapply(X=datum$soil.mstpot ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) + mmean = list() + mmean$fast.soil.c = tapply(X=emean$fast.soil.c ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$slow.soil.c = tapply(X=emean$slow.soil.c ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$struct.soil.c = tapply(X=emean$struct.soil.c,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$het.resp = tapply(X=emean$het.resp ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$cwd.resp = tapply(X=emean$cwd.resp ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$gpp = tapply(X=emean$gpp ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$npp = tapply(X=emean$npp ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$plant.resp = tapply(X=emean$plant.resp ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$leaf.resp = tapply(X=emean$leaf.resp ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$root.resp = tapply(X=emean$root.resp ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$growth.resp = tapply(X=emean$growth.resp ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$reco = tapply(X=emean$reco ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$mco = tapply(X=emean$mco ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$cba = tapply(X=emean$cba ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$cbalight = tapply(X=emean$cbalight ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$cbamoist = tapply(X=emean$cbamoist ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$cbarel = tapply(X=emean$cbarel ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$ldrop = tapply(X=emean$ldrop ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$nep = tapply(X=emean$nep ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$nee = tapply(X=emean$nee ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$cflxca = tapply(X=emean$cflxca ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$cflxst = tapply(X=emean$cflxst ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$ustar = tapply(X=emean$ustar ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$atm.vels = tapply(X=emean$atm.vels ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$atm.prss = tapply(X=emean$atm.prss ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$atm.temp = tapply(X=emean$atm.temp ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$atm.shv = tapply(X=emean$atm.shv ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$atm.vpd = tapply(X=emean$atm.vpd ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$atm.co2 = tapply(X=emean$atm.co2 ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$can.prss = tapply(X=emean$can.prss ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$can.temp = tapply(X=emean$can.temp ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$can.co2 = tapply(X=emean$can.co2 ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$can.shv = tapply(X=emean$can.shv ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$can.vpd = tapply(X=emean$can.vpd ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$gnd.temp = tapply(X=emean$gnd.temp ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$gnd.shv = tapply(X=emean$gnd.shv ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$leaf.temp = tapply(X=emean$leaf.temp ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$leaf.vpd = tapply(X=emean$leaf.vpd ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$wood.temp = tapply(X=emean$wood.temp ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$hflxca = tapply(X=emean$hflxca ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$qwflxca = tapply(X=emean$qwflxca ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$hflxgc = tapply(X=emean$hflxgc ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$hflxlc = tapply(X=emean$hflxlc ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$hflxwc = tapply(X=emean$hflxwc ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$wflxca = tapply(X=emean$wflxca ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$wflxgc = tapply(X=emean$wflxgc ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$wflxlc = tapply(X=emean$wflxlc ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$wflxwc = tapply(X=emean$wflxwc ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$evap = tapply(X=emean$evap ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$transp = tapply(X=emean$transp ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$et = tapply(X=emean$et ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$wue = tapply(X=emean$wue ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$rain = tapply(X=emean$rain ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$fs.open = tapply(X=emean$fs.open ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$rshort = tapply(X=emean$rshort ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$rshort.beam = tapply(X=emean$rshort.beam ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$rshort.diff = tapply(X=emean$rshort.diff ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$rshortup = tapply(X=emean$rshortup ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$rshort.gnd = tapply(X=emean$rshort.gnd ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$rlong = tapply(X=emean$rlong ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$rlong.gnd = tapply(X=emean$rlong.gnd ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$rlongup = tapply(X=emean$rlongup ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$par.tot = tapply(X=emean$par.tot ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$par.beam = tapply(X=emean$par.beam ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$par.diff = tapply(X=emean$par.diff ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$par.gnd = tapply(X=emean$par.gnd ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$parup = tapply(X=emean$parup ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$rnet = tapply(X=emean$rnet ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$albedo = tapply(X=emean$albedo ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$albedo.beam = tapply(X=emean$albedo.beam ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$albedo.diff = tapply(X=emean$albedo.diff ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$rlong.albedo = tapply(X=emean$rlong.albedo ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$nplant = tapply(X=emean$nplant ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$agb = tapply(X=emean$agb ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$lai = tapply(X=emean$lai ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$wai = tapply(X=emean$wai ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$tai = tapply(X=emean$tai ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$area = tapply(X=emean$area ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$workload = tapply(X=emean$workload ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$specwork = tapply(X=emean$specwork ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$demand = tapply(X=emean$demand ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$supply = tapply(X=emean$supply ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$paw = tapply(X=emean$paw ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$smpot = tapply(X=emean$smpot ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$leaf.gsw = tapply(X=emean$leaf.gsw ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$leaf.gbw = tapply(X=emean$leaf.gbw ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$wood.gbw = tapply(X=emean$wood.gbw ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$npat.global = tapply(X=emean$npat.global ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$ncoh.global = tapply(X=emean$ncoh.global ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$water.deficit = tapply(X=emean$water.deficit,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$i.gpp = tapply(X=emean$i.gpp ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$i.npp = tapply(X=emean$i.npp ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$i.plant.resp = tapply(X=emean$i.plant.resp ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$i.mco = tapply(X=emean$i.mco ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$i.cba = tapply(X=emean$i.cba ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$i.cbalight = tapply(X=emean$i.cbalight ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$i.cbamoist = tapply(X=emean$i.cbamoist ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$i.transp = tapply(X=emean$i.transp ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$i.wflxlc = tapply(X=emean$i.wflxlc ,INDEX=mfac,FUN=mean,na.rm=TRUE) + mmean$i.hflxlc = tapply(X=emean$i.hflxlc ,INDEX=mfac,FUN=mean,na.rm=TRUE) + #----- Soil variables. -----------------------------------------------------------------# + mmean$soil.temp = qapply(X=emean$soil.temp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + mmean$soil.water = qapply(X=emean$soil.water ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + mmean$soil.mstpot = qapply(X=emean$soil.mstpot ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) #----- Find the mean sum of squares. ---------------------------------------------------# cat (" * Aggregating the monthly mean sum of squares...","\n") - mont12sq = list() - mont12sq$gpp = tapply(X=datum$mmsqu.gpp ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12sq$plresp = tapply(X=datum$mmsqu.plresp ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12sq$leaf.resp = tapply(X=datum$mmsqu.leaf.resp ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12sq$root.resp = tapply(X=datum$mmsqu.root.resp ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12sq$hetresp = tapply(X=datum$mmsqu.hetresp ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12sq$cwdresp = tapply(X=datum$mmsqu.cwdresp ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12sq$cflxca = tapply(X=datum$mmsqu.cflxca ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12sq$cflxst = tapply(X=datum$mmsqu.cflxst ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12sq$hflxca = tapply(X=datum$mmsqu.hflxca ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12sq$hflxlc = tapply(X=datum$mmsqu.hflxlc ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12sq$hflxwc = tapply(X=datum$mmsqu.hflxwc ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12sq$hflxgc = tapply(X=datum$mmsqu.hflxgc ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12sq$wflxca = tapply(X=datum$mmsqu.wflxca ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12sq$qwflxca = tapply(X=datum$mmsqu.qwflxca ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12sq$wflxlc = tapply(X=datum$mmsqu.wflxlc ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12sq$wflxwc = tapply(X=datum$mmsqu.wflxwc ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12sq$wflxgc = tapply(X=datum$mmsqu.wflxgc ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12sq$evap = tapply(X=datum$mmsqu.evap ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12sq$transp = tapply(X=datum$mmsqu.transp ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12sq$ustar = tapply(X=datum$mmsqu.ustar ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12sq$albedo = tapply(X=datum$mmsqu.albedo ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12sq$rshortup = tapply(X=datum$mmsqu.rshortup ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12sq$rlongup = tapply(X=datum$mmsqu.rlongup ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12sq$parup = tapply(X=datum$mmsqu.parup ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12sq$rnet = tapply(X=datum$mmsqu.rnet ,INDEX=mfac ,FUN=mean,na.rm=T) + mmsqu = list() + mmsqu$gpp = tapply(X=emsqu$gpp , INDEX=mfac,FUN=mean,na.rm=TRUE) + mmsqu$plant.resp = tapply(X=emsqu$plant.resp , INDEX=mfac,FUN=mean,na.rm=TRUE) + mmsqu$het.resp = tapply(X=emsqu$het.resp , INDEX=mfac,FUN=mean,na.rm=TRUE) + mmsqu$cwd.resp = tapply(X=emsqu$cwd.resp , INDEX=mfac,FUN=mean,na.rm=TRUE) + mmsqu$cflxca = tapply(X=emsqu$cflxca , INDEX=mfac,FUN=mean,na.rm=TRUE) + mmsqu$cflxst = tapply(X=emsqu$cflxst , INDEX=mfac,FUN=mean,na.rm=TRUE) + mmsqu$hflxca = tapply(X=emsqu$hflxca , INDEX=mfac,FUN=mean,na.rm=TRUE) + mmsqu$hflxlc = tapply(X=emsqu$hflxlc , INDEX=mfac,FUN=mean,na.rm=TRUE) + mmsqu$hflxwc = tapply(X=emsqu$hflxwc , INDEX=mfac,FUN=mean,na.rm=TRUE) + mmsqu$hflxgc = tapply(X=emsqu$hflxgc , INDEX=mfac,FUN=mean,na.rm=TRUE) + mmsqu$wflxca = tapply(X=emsqu$wflxca , INDEX=mfac,FUN=mean,na.rm=TRUE) + mmsqu$qwflxca = tapply(X=emsqu$qwflxca , INDEX=mfac,FUN=mean,na.rm=TRUE) + mmsqu$wflxlc = tapply(X=emsqu$wflxlc , INDEX=mfac,FUN=mean,na.rm=TRUE) + mmsqu$wflxwc = tapply(X=emsqu$wflxwc , INDEX=mfac,FUN=mean,na.rm=TRUE) + mmsqu$wflxgc = tapply(X=emsqu$wflxgc , INDEX=mfac,FUN=mean,na.rm=TRUE) + mmsqu$evap = tapply(X=emsqu$evap , INDEX=mfac,FUN=mean,na.rm=TRUE) + mmsqu$transp = tapply(X=emsqu$transp , INDEX=mfac,FUN=mean,na.rm=TRUE) + mmsqu$ustar = tapply(X=emsqu$ustar , INDEX=mfac,FUN=mean,na.rm=TRUE) + mmsqu$albedo = tapply(X=emsqu$albedo , INDEX=mfac,FUN=mean,na.rm=TRUE) + mmsqu$rshortup = tapply(X=emsqu$rshortup , INDEX=mfac,FUN=mean,na.rm=TRUE) + mmsqu$rlongup = tapply(X=emsqu$rlongup , INDEX=mfac,FUN=mean,na.rm=TRUE) + mmsqu$parup = tapply(X=emsqu$parup , INDEX=mfac,FUN=mean,na.rm=TRUE) + mmsqu$rnet = tapply(X=emsqu$rnet , INDEX=mfac,FUN=mean,na.rm=TRUE) #---------------------------------------------------------------------------------------# # Here we convert the sum of squares into standard deviation. The standard devi- # # ation can be written in two different ways, and we will use the latter because it # # doesn't require previous knowledge of the mean. # - # __________________ ____________________________________ # - # / SUM_i[X_i - Xm]² / / SUM_i[X_i²] \ 1 # - # sigma = \ / ---------------- = \ / | ----------- - Xm² | --------- # - # \/ N - 1 \/ \ N / 1 - 1/N # + # ____________________ _____________________________________ # + # / SUM_i[X_i - Xm]^2 / / SUM_i[X_i^2] \ 1 # + # sigma = \ / ------------------ = \ / | ------------ - Xm^2 | --------- # + # \/ N - 1 \/ \ N / 1 - 1/N # # # # srnonm1 is the square root of 1 / (1 - 1/N) # # Find the standard deviation. # @@ -407,69 +475,66 @@ for (place in myplaces){ cat (" * Finding the standard deviation...","\n") srnorm1 = sqrt(1./(1. - 1. / datum$montable)) srnorm1[!is.finite(srnorm1)] = 0. - mont12sd = list() - mont12sd$gpp = sqrt(mont12sq$gpp - mont12mn$gpp^2 ) * srnorm1 - mont12sd$plresp = sqrt(mont12sq$plresp - mont12mn$plresp^2 ) * srnorm1 - mont12sd$leaf.resp = sqrt(mont12sq$leaf.resp - mont12mn$leaf.resp^2 ) * srnorm1 - mont12sd$root.resp = sqrt(mont12sq$root.resp - mont12mn$root.resp^2 ) * srnorm1 - mont12sd$hetresp = sqrt(mont12sq$hetresp - mont12mn$hetresp^2 ) * srnorm1 - mont12sd$cwdresp = sqrt(mont12sq$cwdresp - mont12mn$cwdresp^2 ) * srnorm1 - mont12sd$cflxca = sqrt(mont12sq$cflxca - mont12mn$cflxca^2 ) * srnorm1 - mont12sd$cflxst = sqrt(mont12sq$cflxst - mont12mn$cflxst^2 ) * srnorm1 - mont12sd$hflxca = sqrt(mont12sq$hflxca - mont12mn$hflxca^2 ) * srnorm1 - mont12sd$hflxlc = sqrt(mont12sq$hflxlc - mont12mn$hflxlc^2 ) * srnorm1 - mont12sd$hflxwc = sqrt(mont12sq$hflxwc - mont12mn$hflxwc^2 ) * srnorm1 - mont12sd$hflxgc = sqrt(mont12sq$hflxgc - mont12mn$hflxgc^2 ) * srnorm1 - mont12sd$wflxca = sqrt(mont12sq$wflxca - mont12mn$wflxca^2 ) * srnorm1 - mont12sd$qwflxca = sqrt(mont12sq$qwflxca - mont12mn$qwflxca^2 ) * srnorm1 - mont12sd$wflxlc = sqrt(mont12sq$wflxlc - mont12mn$wflxlc^2 ) * srnorm1 - mont12sd$wflxwc = sqrt(mont12sq$wflxwc - mont12mn$wflxwc^2 ) * srnorm1 - mont12sd$wflxgc = sqrt(mont12sq$wflxgc - mont12mn$wflxgc^2 ) * srnorm1 - mont12sd$evap = sqrt(mont12sq$evap - mont12mn$evap^2 ) * srnorm1 - mont12sd$transp = sqrt(mont12sq$transp - mont12mn$transp^2 ) * srnorm1 - mont12sd$ustar = sqrt(mont12sq$ustar - mont12mn$ustar^2 ) * srnorm1 - mont12sd$albedo = sqrt(mont12sq$albedo - mont12mn$albedo^2 ) * srnorm1 - mont12sd$rshortup = sqrt(mont12sq$rshortup - mont12mn$rshortup^2 ) * srnorm1 - mont12sd$rlongup = sqrt(mont12sq$rlongup - mont12mn$rlongup^2 ) * srnorm1 - mont12sd$parup = sqrt(mont12sq$parup - mont12mn$parup^2 ) * srnorm1 - mont12sd$rnet = sqrt(mont12sq$rnet - mont12mn$rnet^2 ) * srnorm1 + + msdev = list() + msdev$gpp = sqrt( mmsqu$gpp - mmean$gpp ^ 2 ) * srnorm1 + msdev$plant.resp = sqrt( mmsqu$plant.resp - mmean$plant.resp ^ 2 ) * srnorm1 + msdev$het.resp = sqrt( mmsqu$het.resp - mmean$het.resp ^ 2 ) * srnorm1 + msdev$cwd.resp = sqrt( mmsqu$cwd.resp - mmean$cwd.resp ^ 2 ) * srnorm1 + msdev$cflxca = sqrt( mmsqu$cflxca - mmean$cflxca ^ 2 ) * srnorm1 + msdev$cflxst = sqrt( mmsqu$cflxst - mmean$cflxst ^ 2 ) * srnorm1 + msdev$hflxca = sqrt( mmsqu$hflxca - mmean$hflxca ^ 2 ) * srnorm1 + msdev$hflxlc = sqrt( mmsqu$hflxlc - mmean$hflxlc ^ 2 ) * srnorm1 + msdev$hflxwc = sqrt( mmsqu$hflxwc - mmean$hflxwc ^ 2 ) * srnorm1 + msdev$hflxgc = sqrt( mmsqu$hflxgc - mmean$hflxgc ^ 2 ) * srnorm1 + msdev$wflxca = sqrt( mmsqu$wflxca - mmean$wflxca ^ 2 ) * srnorm1 + msdev$qwflxca = sqrt( mmsqu$qwflxca - mmean$qwflxca ^ 2 ) * srnorm1 + msdev$wflxlc = sqrt( mmsqu$wflxlc - mmean$wflxlc ^ 2 ) * srnorm1 + msdev$wflxwc = sqrt( mmsqu$wflxwc - mmean$wflxwc ^ 2 ) * srnorm1 + msdev$wflxgc = sqrt( mmsqu$wflxgc - mmean$wflxgc ^ 2 ) * srnorm1 + msdev$evap = sqrt( mmsqu$evap - mmean$evap ^ 2 ) * srnorm1 + msdev$transp = sqrt( mmsqu$transp - mmean$transp ^ 2 ) * srnorm1 + msdev$ustar = sqrt( mmsqu$ustar - mmean$ustar ^ 2 ) * srnorm1 + msdev$albedo = sqrt( mmsqu$albedo - mmean$albedo ^ 2 ) * srnorm1 + msdev$rshortup = sqrt( mmsqu$rshortup - mmean$rshortup ^ 2 ) * srnorm1 + msdev$rlongup = sqrt( mmsqu$rlongup - mmean$rlongup ^ 2 ) * srnorm1 + msdev$parup = sqrt( mmsqu$parup - mmean$parup ^ 2 ) * srnorm1 + msdev$rnet = sqrt( mmsqu$rnet - mmean$rnet ^ 2 ) * srnorm1 #---------------------------------------------------------------------------------------# # Set standard deviations that became NaN to 0. This usually happens when we run # # the post-processing script when the simulation hasn't run for more than 2 years. We # # can't find the standard deviation because the number of degrees of freedom becomes 0. # #---------------------------------------------------------------------------------------# - mont12sd$gpp [!is.finite(mont12sd$gpp )] = 0. - mont12sd$plresp [!is.finite(mont12sd$plresp )] = 0. - mont12sd$leaf.resp [!is.finite(mont12sd$leaf.resp )] = 0. - mont12sd$root.resp [!is.finite(mont12sd$root.resp )] = 0. - mont12sd$hetresp [!is.finite(mont12sd$hetresp )] = 0. - mont12sd$cwdresp [!is.finite(mont12sd$cwdresp )] = 0. - mont12sd$cflxca [!is.finite(mont12sd$cflxca )] = 0. - mont12sd$cflxst [!is.finite(mont12sd$cflxst )] = 0. - mont12sd$hflxca [!is.finite(mont12sd$hflxca )] = 0. - mont12sd$hflxlc [!is.finite(mont12sd$hflxlc )] = 0. - mont12sd$hflxlc [!is.finite(mont12sd$hflxwc )] = 0. - mont12sd$hflxgc [!is.finite(mont12sd$hflxgc )] = 0. - mont12sd$wflxca [!is.finite(mont12sd$wflxca )] = 0. - mont12sd$qwflxca [!is.finite(mont12sd$qwflxca )] = 0. - mont12sd$wflxlc [!is.finite(mont12sd$wflxlc )] = 0. - mont12sd$wflxwc [!is.finite(mont12sd$wflxwc )] = 0. - mont12sd$wflxgc [!is.finite(mont12sd$wflxgc )] = 0. - mont12sd$evap [!is.finite(mont12sd$evap )] = 0. - mont12sd$transp [!is.finite(mont12sd$transp )] = 0. - mont12sd$ustar [!is.finite(mont12sd$ustar )] = 0. - mont12sd$albedo [!is.finite(mont12sd$albedo )] = 0. - mont12sd$rshortup [!is.finite(mont12sd$rshortup )] = 0. - mont12sd$rlongup [!is.finite(mont12sd$rlongup )] = 0. - mont12sd$parup [!is.finite(mont12sd$parup )] = 0. - mont12sd$rnet [!is.finite(mont12sd$rnet )] = 0. - #---------------------------------------------------------------------------------------# - # Estimate the standard deviation of NPP, NEP, NEE, and REco. # - #---------------------------------------------------------------------------------------# - mont12sd$npp = sqrt(mont12sd$gpp^2 + mont12sd$plresp^2 ) - mont12sd$nep = sqrt(mont12sd$gpp^2 + mont12sd$plresp^2 + mont12sd$hetresp^2 ) - mont12sd$nee = sqrt(mont12sd$cflxca^2 + mont12sd$cflxst^2 ) - mont12sd$reco = sqrt(mont12sd$plresp^2 + mont12sd$hetresp^2 ) + msdev$gpp [! is.finite(msdev$gpp )] = 0. + msdev$plant.resp [! is.finite(msdev$plant.resp)] = 0. + msdev$leaf.resp [! is.finite(msdev$leaf.resp )] = 0. + msdev$root.resp [! is.finite(msdev$root.resp )] = 0. + msdev$het.resp [! is.finite(msdev$het.resp )] = 0. + msdev$cwd.resp [! is.finite(msdev$cwd.resp )] = 0. + msdev$cflxca [! is.finite(msdev$cflxca )] = 0. + msdev$cflxst [! is.finite(msdev$cflxst )] = 0. + msdev$hflxca [! is.finite(msdev$hflxca )] = 0. + msdev$hflxlc [! is.finite(msdev$hflxlc )] = 0. + msdev$hflxwc [! is.finite(msdev$hflxwc )] = 0. + msdev$hflxgc [! is.finite(msdev$hflxgc )] = 0. + msdev$wflxca [! is.finite(msdev$wflxca )] = 0. + msdev$qwflxca [! is.finite(msdev$qwflxca )] = 0. + msdev$wflxlc [! is.finite(msdev$wflxlc )] = 0. + msdev$wflxwc [! is.finite(msdev$wflxwc )] = 0. + msdev$wflxgc [! is.finite(msdev$wflxgc )] = 0. + msdev$transp [! is.finite(msdev$transp )] = 0. + msdev$ustar [! is.finite(msdev$ustar )] = 0. + msdev$albedo [! is.finite(msdev$albedo )] = 0. + msdev$rshortup [! is.finite(msdev$rshortup )] = 0. + msdev$rlongup [! is.finite(msdev$rlongup )] = 0. + msdev$parup [! is.finite(msdev$parup )] = 0. + msdev$rnet [! is.finite(msdev$rnet )] = 0. + #---------------------------------------------------------------------------------------# + # Estimate the standard deviation of NEE, REco, and evaporation. # + #---------------------------------------------------------------------------------------# + msdev$nee = sqrt(msdev$cflxca^2 + msdev$cflxst^2 ) + msdev$reco = sqrt(msdev$plant.resp^2 + msdev$het.resp^2 ) + msdev$evap = sqrt(msdev$wflxgc^2 + msdev$wflxlc^2 + msdev$wflxwc^2 ) #---------------------------------------------------------------------------------------# @@ -478,105 +543,106 @@ for (place in myplaces){ # deviation. # #---------------------------------------------------------------------------------------# cat (" - Aggregating the monthly mean of the diurnal cycle...","\n") - dcyc12mn =list() - dcyc12mn$gpp =qapply(X=dcycmean$gpp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$npp =qapply(X=dcycmean$npp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$plresp =qapply(X=dcycmean$plresp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$leaf.resp =qapply(X=dcycmean$leaf.resp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$root.resp =qapply(X=dcycmean$root.resp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$hetresp =qapply(X=dcycmean$hetresp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$cwdresp =qapply(X=dcycmean$cwdresp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$nep =qapply(X=dcycmean$nep ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$nee =qapply(X=dcycmean$nee ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$reco =qapply(X=dcycmean$reco ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$cflxca =qapply(X=dcycmean$cflxca ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$cflxst =qapply(X=dcycmean$cflxst ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$hflxca =qapply(X=dcycmean$hflxca ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$hflxlc =qapply(X=dcycmean$hflxlc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$hflxwc =qapply(X=dcycmean$hflxwc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$hflxgc =qapply(X=dcycmean$hflxgc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$wflxca =qapply(X=dcycmean$wflxca ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$qwflxca =qapply(X=dcycmean$qwflxca ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$wflxlc =qapply(X=dcycmean$wflxlc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$wflxwc =qapply(X=dcycmean$wflxwc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$wflxgc =qapply(X=dcycmean$wflxgc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$evap =qapply(X=dcycmean$evap ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$transp =qapply(X=dcycmean$transp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$atm.temp =qapply(X=dcycmean$atm.temp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$can.temp =qapply(X=dcycmean$can.temp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$leaf.temp =qapply(X=dcycmean$leaf.temp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$wood.temp =qapply(X=dcycmean$wood.temp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$gnd.temp =qapply(X=dcycmean$gnd.temp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$atm.shv =qapply(X=dcycmean$atm.shv ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$can.shv =qapply(X=dcycmean$can.shv ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$gnd.shv =qapply(X=dcycmean$gnd.shv ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$atm.vpd =qapply(X=dcycmean$atm.vpd ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$can.vpd =qapply(X=dcycmean$can.vpd ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$leaf.vpd =qapply(X=dcycmean$leaf.vpd ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$atm.co2 =qapply(X=dcycmean$atm.co2 ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$can.co2 =qapply(X=dcycmean$can.co2 ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$atm.prss =qapply(X=dcycmean$atm.prss ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$can.prss =qapply(X=dcycmean$can.prss ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$atm.vels =qapply(X=dcycmean$atm.vels ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$ustar =qapply(X=dcycmean$ustar ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$fs.open =qapply(X=dcycmean$fs.open ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$rain =qapply(X=dcycmean$rain ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$rshort =qapply(X=dcycmean$rshort ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$rshort.beam =qapply(X=dcycmean$rshort.beam ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$rshort.diff =qapply(X=dcycmean$rshort.diff ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$rshort.gnd =qapply(X=dcycmean$rshort.gnd ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$rshortup =qapply(X=dcycmean$rshortup ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$rlong =qapply(X=dcycmean$rlong ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$rlong.gnd =qapply(X=dcycmean$rlong.gnd ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$rlongup =qapply(X=dcycmean$rlongup ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - # dcyc12mn$par.tot =qapply(X=dcycmean$par.tot ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - # dcyc12mn$par.beam =qapply(X=dcycmean$par.beam ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - # dcyc12mn$par.diff =qapply(X=dcycmean$par.diff ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - # dcyc12mn$par.gnd =qapply(X=dcycmean$par.gnd ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$parup =qapply(X=dcycmean$parup ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$rnet =qapply(X=dcycmean$rnet ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$albedo =qapply(X=dcycmean$albedo ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$albedo.beam =qapply(X=dcycmean$albedo.beam ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$albedo.diff =qapply(X=dcycmean$albedo.diff ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$rlong.albedo=qapply(X=dcycmean$rlong.albedo,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - + umean = list() + umean$gpp = qapply(X=qmean$gpp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$npp = qapply(X=qmean$npp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$plant.resp = qapply(X=qmean$plant.resp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$leaf.resp = qapply(X=qmean$leaf.resp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$root.resp = qapply(X=qmean$root.resp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$growth.resp = qapply(X=qmean$growth.resp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$het.resp = qapply(X=qmean$het.resp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$cwd.resp = qapply(X=qmean$cwd.resp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$nep = qapply(X=qmean$nep ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$nee = qapply(X=qmean$nee ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$reco = qapply(X=qmean$reco ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$cflxca = qapply(X=qmean$cflxca ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$cflxst = qapply(X=qmean$cflxst ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$hflxca = qapply(X=qmean$hflxca ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$hflxlc = qapply(X=qmean$hflxlc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$hflxwc = qapply(X=qmean$hflxwc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$hflxgc = qapply(X=qmean$hflxgc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$qwflxca = qapply(X=qmean$qwflxca ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$wflxca = qapply(X=qmean$wflxca ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$wflxlc = qapply(X=qmean$wflxlc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$wflxwc = qapply(X=qmean$wflxwc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$wflxgc = qapply(X=qmean$wflxgc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$evap = qapply(X=qmean$evap ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$transp = qapply(X=qmean$transp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$atm.temp = qapply(X=qmean$atm.temp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$can.temp = qapply(X=qmean$can.temp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$leaf.temp = qapply(X=qmean$leaf.temp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$wood.temp = qapply(X=qmean$wood.temp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$gnd.temp = qapply(X=qmean$gnd.temp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$atm.shv = qapply(X=qmean$atm.shv ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$can.shv = qapply(X=qmean$can.shv ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$gnd.shv = qapply(X=qmean$gnd.shv ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$atm.vpd = qapply(X=qmean$atm.vpd ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$can.vpd = qapply(X=qmean$can.vpd ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$leaf.vpd = qapply(X=qmean$leaf.vpd ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$atm.co2 = qapply(X=qmean$atm.co2 ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$can.co2 = qapply(X=qmean$can.co2 ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$atm.prss = qapply(X=qmean$atm.prss ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$can.prss = qapply(X=qmean$can.prss ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$atm.vels = qapply(X=qmean$atm.vels ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$ustar = qapply(X=qmean$ustar ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$fs.open = qapply(X=qmean$fs.open ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$rain = qapply(X=qmean$rain ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$rshort = qapply(X=qmean$rshort ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$rshort.beam = qapply(X=qmean$rshort.beam ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$rshort.diff = qapply(X=qmean$rshort.diff ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$rshort.gnd = qapply(X=qmean$rshort.gnd ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$rshortup = qapply(X=qmean$rshortup ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$rlong = qapply(X=qmean$rlong ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$rlong.gnd = qapply(X=qmean$rlong.gnd ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$rlongup = qapply(X=qmean$rlongup ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$par.tot = qapply(X=qmean$par.tot ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$par.beam = qapply(X=qmean$par.beam ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$par.diff = qapply(X=qmean$par.diff ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$par.gnd = qapply(X=qmean$par.gnd ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$parup = qapply(X=qmean$parup ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$rnet = qapply(X=qmean$rnet ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$albedo = qapply(X=qmean$albedo ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$albedo.beam = qapply(X=qmean$albedo.beam ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$albedo.diff = qapply(X=qmean$albedo.diff ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$rlong.albedo = qapply(X=qmean$rlong.albedo ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$leaf.gsw = qapply(X=qmean$leaf.gsw ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$leaf.gbw = qapply(X=qmean$leaf.gbw ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umean$wood.gbw = qapply(X=qmean$wood.gbw ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) #----- Find the mean sum of squares. ---------------------------------------------------# cat (" - Aggregating the monthly mean sum of squares...","\n") - dcyc12sq = list() - dcyc12sq$gpp = qapply(X=dcycmsqu$gpp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12sq$plresp = qapply(X=dcycmsqu$plresp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12sq$leaf.resp = qapply(X=dcycmsqu$leaf.resp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12sq$root.resp = qapply(X=dcycmsqu$root.resp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12sq$hetresp = qapply(X=dcycmsqu$hetresp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12sq$cwdresp = qapply(X=dcycmsqu$cwdresp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12sq$nep = qapply(X=dcycmsqu$nep ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12sq$cflxca = qapply(X=dcycmsqu$cflxca ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12sq$cflxst = qapply(X=dcycmsqu$cflxst ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12sq$hflxca = qapply(X=dcycmsqu$hflxca ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12sq$hflxlc = qapply(X=dcycmsqu$hflxlc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12sq$hflxwc = qapply(X=dcycmsqu$hflxwc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12sq$hflxgc = qapply(X=dcycmsqu$hflxgc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12sq$wflxca = qapply(X=dcycmsqu$wflxca ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12sq$qwflxca = qapply(X=dcycmsqu$qwflxca ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12sq$wflxlc = qapply(X=dcycmsqu$wflxlc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12sq$wflxwc = qapply(X=dcycmsqu$wflxwc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12sq$wflxgc = qapply(X=dcycmsqu$wflxgc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12sq$transp = qapply(X=dcycmsqu$transp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12sq$ustar = qapply(X=dcycmsqu$ustar ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12sq$albedo = qapply(X=dcycmsqu$albedo ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12sq$rshortup = qapply(X=dcycmsqu$rshortup ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12sq$rlongup = qapply(X=dcycmsqu$rlongup ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12sq$parup = qapply(X=dcycmsqu$parup ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - dcyc12sq$rnet = qapply(X=dcycmsqu$rnet ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - + umsqu = list() + umsqu$gpp = qapply(X=qmsqu$gpp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umsqu$npp = qapply(X=qmsqu$npp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umsqu$plant.resp = qapply(X=qmsqu$plant.resp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umsqu$het.resp = qapply(X=qmsqu$het.resp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umsqu$cwd.resp = qapply(X=qmsqu$cwd.resp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umsqu$nep = qapply(X=qmsqu$nep ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umsqu$cflxca = qapply(X=qmsqu$cflxca ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umsqu$cflxst = qapply(X=qmsqu$cflxst ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umsqu$hflxca = qapply(X=qmsqu$hflxca ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umsqu$hflxlc = qapply(X=qmsqu$hflxlc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umsqu$hflxwc = qapply(X=qmsqu$hflxwc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umsqu$hflxgc = qapply(X=qmsqu$hflxgc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umsqu$qwflxca = qapply(X=qmsqu$qwflxca ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umsqu$wflxca = qapply(X=qmsqu$wflxca ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umsqu$wflxlc = qapply(X=qmsqu$wflxlc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umsqu$wflxwc = qapply(X=qmsqu$wflxwc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umsqu$wflxgc = qapply(X=qmsqu$wflxgc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umsqu$transp = qapply(X=qmsqu$transp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umsqu$ustar = qapply(X=qmsqu$ustar ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umsqu$albedo = qapply(X=qmsqu$albedo ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umsqu$rshortup = qapply(X=qmsqu$rshortup ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umsqu$rlongup = qapply(X=qmsqu$rlongup ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umsqu$parup = qapply(X=qmsqu$parup ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) + umsqu$rnet = qapply(X=qmsqu$rnet ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) #---------------------------------------------------------------------------------------# # Here we convert the sum of squares into standard deviation. The standard devi- # # ation can be written in two different ways, and we will use the latter because it # # doesn't require previous knowledge of the mean. # - # __________________ ____________________________________ # - # / SUM_i[X_i - Xm]² / / SUM_i[X_i²] \ 1 # - # sigma = \ / ---------------- = \ / | ----------- - Xm² | --------- # - # \/ N - 1 \/ \ N / 1 - 1/N # + # ____________________ _____________________________________ # + # / SUM_i[X_i - Xm]^2 / / SUM_i[X_i^2] \ 1 # + # sigma = \ / ------------------ = \ / | ------------ - Xm^2 | --------- # + # \/ N - 1 \/ \ N / 1 - 1/N # # # # srnonm1 is the square root of 1 / (1 - 1/N) # # Find the standard deviation. # @@ -584,68 +650,66 @@ for (place in myplaces){ cat (" - Finding the standard deviation...","\n") srnorm1 = sqrt(1./(1. - 1. / datum$moncnt)) srnorm1[!is.finite(srnorm1)] = 0. - dcyc12sd = list() - dcyc12sd$gpp = sqrt(dcyc12sq$gpp - dcyc12mn$gpp^2 )*srnorm1 - dcyc12sd$plresp = sqrt(dcyc12sq$plresp - dcyc12mn$plresp^2 )*srnorm1 - dcyc12sd$leaf.resp = sqrt(dcyc12sq$leaf.resp - dcyc12mn$leaf.resp^2 )*srnorm1 - dcyc12sd$root.resp = sqrt(dcyc12sq$root.resp - dcyc12mn$root.resp^2 )*srnorm1 - dcyc12sd$hetresp = sqrt(dcyc12sq$hetresp - dcyc12mn$hetresp^2 )*srnorm1 - dcyc12sd$cwdresp = sqrt(dcyc12sq$cwdresp - dcyc12mn$cwdresp^2 )*srnorm1 - dcyc12sd$nep = sqrt(dcyc12sq$nep - dcyc12mn$nep^2 )*srnorm1 - dcyc12sd$cflxca = sqrt(dcyc12sq$cflxca - dcyc12mn$cflxca^2 )*srnorm1 - dcyc12sd$cflxst = sqrt(dcyc12sq$cflxst - dcyc12mn$cflxst^2 )*srnorm1 - dcyc12sd$hflxca = sqrt(dcyc12sq$hflxca - dcyc12mn$hflxca^2 )*srnorm1 - dcyc12sd$hflxlc = sqrt(dcyc12sq$hflxlc - dcyc12mn$hflxlc^2 )*srnorm1 - dcyc12sd$hflxwc = sqrt(dcyc12sq$hflxwc - dcyc12mn$hflxwc^2 )*srnorm1 - dcyc12sd$hflxgc = sqrt(dcyc12sq$hflxgc - dcyc12mn$hflxgc^2 )*srnorm1 - dcyc12sd$wflxca = sqrt(dcyc12sq$wflxca - dcyc12mn$wflxca^2 )*srnorm1 - dcyc12sd$qwflxca = sqrt(dcyc12sq$qwflxca - dcyc12mn$qwflxca^2 )*srnorm1 - dcyc12sd$wflxlc = sqrt(dcyc12sq$wflxlc - dcyc12mn$wflxlc^2 )*srnorm1 - dcyc12sd$wflxwc = sqrt(dcyc12sq$wflxwc - dcyc12mn$wflxwc^2 )*srnorm1 - dcyc12sd$wflxgc = sqrt(dcyc12sq$wflxgc - dcyc12mn$wflxgc^2 )*srnorm1 - dcyc12sd$transp = sqrt(dcyc12sq$transp - dcyc12mn$transp^2 )*srnorm1 - dcyc12sd$ustar = sqrt(dcyc12sq$ustar - dcyc12mn$ustar^2 )*srnorm1 - dcyc12sd$albedo = sqrt(dcyc12sq$albedo - dcyc12mn$albedo^2 )*srnorm1 - dcyc12sd$rshortup = sqrt(dcyc12sq$rshortup - dcyc12mn$rshortup^2 )*srnorm1 - dcyc12sd$rlongup = sqrt(dcyc12sq$rlongup - dcyc12mn$rlongup^2 )*srnorm1 - dcyc12sd$parup = sqrt(dcyc12sq$parup - dcyc12mn$parup^2 )*srnorm1 - dcyc12sd$rnet = sqrt(dcyc12sq$rnet - dcyc12mn$rnet^2 )*srnorm1 + usdev = list() + usdev$gpp = sqrt(umsqu$gpp - umean$gpp ^ 2) * srnorm1 + usdev$npp = sqrt(umsqu$npp - umean$npp ^ 2) * srnorm1 + usdev$plant.resp = sqrt(umsqu$plant.resp - umean$plant.resp ^ 2) * srnorm1 + usdev$het.resp = sqrt(umsqu$het.resp - umean$het.resp ^ 2) * srnorm1 + usdev$cwd.resp = sqrt(umsqu$cwd.resp - umean$cwd.resp ^ 2) * srnorm1 + usdev$nep = sqrt(umsqu$nep - umean$nep ^ 2) * srnorm1 + usdev$cflxca = sqrt(umsqu$cflxca - umean$cflxca ^ 2) * srnorm1 + usdev$cflxst = sqrt(umsqu$cflxst - umean$cflxst ^ 2) * srnorm1 + usdev$hflxca = sqrt(umsqu$hflxca - umean$hflxca ^ 2) * srnorm1 + usdev$hflxlc = sqrt(umsqu$hflxlc - umean$hflxlc ^ 2) * srnorm1 + usdev$hflxwc = sqrt(umsqu$hflxwc - umean$hflxwc ^ 2) * srnorm1 + usdev$hflxgc = sqrt(umsqu$hflxgc - umean$hflxgc ^ 2) * srnorm1 + usdev$qwflxca = sqrt(umsqu$qwflxca - umean$qwflxca ^ 2) * srnorm1 + usdev$wflxca = sqrt(umsqu$wflxca - umean$wflxca ^ 2) * srnorm1 + usdev$wflxlc = sqrt(umsqu$wflxlc - umean$wflxlc ^ 2) * srnorm1 + usdev$wflxwc = sqrt(umsqu$wflxwc - umean$wflxwc ^ 2) * srnorm1 + usdev$wflxgc = sqrt(umsqu$wflxgc - umean$wflxgc ^ 2) * srnorm1 + usdev$transp = sqrt(umsqu$transp - umean$transp ^ 2) * srnorm1 + usdev$ustar = sqrt(umsqu$ustar - umean$ustar ^ 2) * srnorm1 + usdev$albedo = sqrt(umsqu$albedo - umean$albedo ^ 2) * srnorm1 + usdev$rshortup = sqrt(umsqu$rshortup - umean$rshortup ^ 2) * srnorm1 + usdev$rlongup = sqrt(umsqu$rlongup - umean$rlongup ^ 2) * srnorm1 + usdev$parup = sqrt(umsqu$parup - umean$parup ^ 2) * srnorm1 + usdev$rnet = sqrt(umsqu$rnet - umean$rnet ^ 2) * srnorm1 #---------------------------------------------------------------------------------------# # Set standard deviations that became NaN to 0. This usually happens when we run # # the post-processing script when the simulation hasn't run for more than 2 years. We # # can't find the standard deviation because the number of degrees of freedom becomes 0. # #---------------------------------------------------------------------------------------# - dcyc12sd$gpp [! is.finite(dcyc12sd$gpp )] = 0. - dcyc12sd$plresp [! is.finite(dcyc12sd$plresp )] = 0. - dcyc12sd$leaf.resp [! is.finite(dcyc12sd$leaf.resp )] = 0. - dcyc12sd$root.resp [! is.finite(dcyc12sd$root.resp )] = 0. - dcyc12sd$hetresp [! is.finite(dcyc12sd$hetresp )] = 0. - dcyc12sd$cwdresp [! is.finite(dcyc12sd$cwdresp )] = 0. - dcyc12sd$nep [! is.finite(dcyc12sd$nep )] = 0. - dcyc12sd$cflxca [! is.finite(dcyc12sd$cflxca )] = 0. - dcyc12sd$cflxst [! is.finite(dcyc12sd$cflxst )] = 0. - dcyc12sd$hflxca [! is.finite(dcyc12sd$hflxca )] = 0. - dcyc12sd$hflxlc [! is.finite(dcyc12sd$hflxlc )] = 0. - dcyc12sd$hflxwc [! is.finite(dcyc12sd$hflxwc )] = 0. - dcyc12sd$hflxgc [! is.finite(dcyc12sd$hflxgc )] = 0. - dcyc12sd$wflxca [! is.finite(dcyc12sd$wflxca )] = 0. - dcyc12sd$qwflxca [! is.finite(dcyc12sd$qwflxca )] = 0. - dcyc12sd$wflxlc [! is.finite(dcyc12sd$wflxlc )] = 0. - dcyc12sd$wflxwc [! is.finite(dcyc12sd$wflxwc )] = 0. - dcyc12sd$wflxgc [! is.finite(dcyc12sd$wflxgc )] = 0. - dcyc12sd$transp [! is.finite(dcyc12sd$transp )] = 0. - dcyc12sd$ustar [! is.finite(dcyc12sd$ustar )] = 0. - dcyc12sd$albedo [! is.finite(dcyc12sd$albedo )] = 0. - dcyc12sd$rshortup [! is.finite(dcyc12sd$rshortup )] = 0. - dcyc12sd$rlongup [! is.finite(dcyc12sd$rlongup )] = 0. - dcyc12sd$parup [! is.finite(dcyc12sd$parup )] = 0. - dcyc12sd$rnet [! is.finite(dcyc12sd$rnet )] = 0. + usdev$gpp [! is.finite(usdev$gpp )] = 0.0 + usdev$npp [! is.finite(usdev$npp )] = 0.0 + usdev$plant.resp [! is.finite(usdev$plant.resp )] = 0.0 + usdev$het.resp [! is.finite(usdev$het.resp )] = 0.0 + usdev$cwd.resp [! is.finite(usdev$cwd.resp )] = 0.0 + usdev$nep [! is.finite(usdev$nep )] = 0.0 + usdev$cflxca [! is.finite(usdev$cflxca )] = 0.0 + usdev$cflxst [! is.finite(usdev$cflxst )] = 0.0 + usdev$hflxca [! is.finite(usdev$hflxca )] = 0.0 + usdev$hflxlc [! is.finite(usdev$hflxlc )] = 0.0 + usdev$hflxwc [! is.finite(usdev$hflxwc )] = 0.0 + usdev$hflxgc [! is.finite(usdev$hflxgc )] = 0.0 + usdev$qwflxca [! is.finite(usdev$qwflxca )] = 0.0 + usdev$wflxca [! is.finite(usdev$wflxca )] = 0.0 + usdev$wflxlc [! is.finite(usdev$wflxlc )] = 0.0 + usdev$wflxwc [! is.finite(usdev$wflxwc )] = 0.0 + usdev$wflxgc [! is.finite(usdev$wflxgc )] = 0.0 + usdev$transp [! is.finite(usdev$transp )] = 0.0 + usdev$ustar [! is.finite(usdev$ustar )] = 0.0 + usdev$albedo [! is.finite(usdev$albedo )] = 0.0 + usdev$rshortup [! is.finite(usdev$rshortup )] = 0.0 + usdev$rlongup [! is.finite(usdev$rlongup )] = 0.0 + usdev$parup [! is.finite(usdev$parup )] = 0.0 + usdev$rnet [! is.finite(usdev$rnet )] = 0.0 #---------------------------------------------------------------------------------------# # Estimate NPP and NEE standard deviation. # #---------------------------------------------------------------------------------------# - dcyc12sd$npp = sqrt(dcyc12sd$gpp^2 + dcyc12sd$plresp^2 ) - dcyc12sd$nee = sqrt(dcyc12sd$cflxca^2 + dcyc12sd$cflxst^2 ) - dcyc12sd$reco = sqrt(dcyc12sd$plresp^2 + dcyc12sd$hetresp^2) + usdev$nee = sqrt(usdev$cflxca^2 + usdev$cflxst^2 ) + usdev$reco = sqrt(usdev$plant.resp^2 + usdev$het.resp^2 ) + usdev$evap = sqrt(usdev$wflxgc^2 + usdev$wflxlc^2 + usdev$wflxwc^2 ) #---------------------------------------------------------------------------------------# @@ -654,84 +718,83 @@ for (place in myplaces){ # Remove all elements of the DBH/PFT class that do not have a single valid cohort # # at any given time. # #---------------------------------------------------------------------------------------# - empty = datum$nplantpftdbh == 0 - datum$agbpftdbh [empty] = NA - datum$basareapftdbh [empty] = NA - datum$laipftdbh [empty] = NA - datum$waipftdbh [empty] = NA - datum$taipftdbh [empty] = NA - datum$gpppftdbh [empty] = NA - datum$npppftdbh [empty] = NA - datum$mcopftdbh [empty] = NA - datum$cbapftdbh [empty] = NA - datum$cbalightpftdbh [empty] = NA - datum$cbamoistpftdbh [empty] = NA - datum$cbal12lightpftdbh [empty] = NA - datum$cbal12moistpftdbh [empty] = NA - datum$cbarelpftdbh [empty] = NA - datum$ldroppftdbh [empty] = NA - datum$fsopftdbh [empty] = NA - datum$demandpftdbh [empty] = NA - datum$supplypftdbh [empty] = NA - datum$mortpftdbh [empty] = NA - datum$agemortpftdbh [empty] = NA - datum$ncbmortpftdbh [empty] = NA - datum$tfallmortpftdbh [empty] = NA - datum$coldmortpftdbh [empty] = NA - datum$distmortpftdbh [empty] = NA - datum$growthpftdbh [empty] = NA - datum$plresppftdbh [empty] = NA - datum$bstorepftdbh [empty] = NA - datum$hflxlcpftdbh [empty] = NA - datum$wflxlcpftdbh [empty] = NA - datum$transppftdbh [empty] = NA - datum$i.gpppftdbh [empty] = NA - datum$i.npppftdbh [empty] = NA - datum$i.plresppftdbh [empty] = NA - datum$i.mcopftdbh [empty] = NA - datum$i.cbapftdbh [empty] = NA - datum$i.cbalightpftdbh [empty] = NA - datum$i.cbamoistpftdbh [empty] = NA - datum$i.cbal12lightpftdbh[empty] = NA - datum$i.cbam12lightpftdbh[empty] = NA - datum$i.transppftdbh [empty] = NA - datum$i.wflxlcpftdbh [empty] = NA - datum$i.hflxlcpftdbh [empty] = NA - datum$nplantpftdbh [empty] = NA + empty = szpft$nplant == 0 + szpft$agb [empty] = NA + szpft$lai [empty] = NA + szpft$wai [empty] = NA + szpft$tai [empty] = NA + szpft$ba [empty] = NA + szpft$gpp [empty] = NA + szpft$npp [empty] = NA + szpft$plant.resp [empty] = NA + szpft$mco [empty] = NA + szpft$cba [empty] = NA + szpft$cbalight [empty] = NA + szpft$cbamoist [empty] = NA + szpft$cbarel [empty] = NA + szpft$ldrop [empty] = NA + szpft$fs.open [empty] = NA + szpft$leaf.gbw [empty] = NA + szpft$leaf.gsw [empty] = NA + szpft$wood.gbw [empty] = NA + szpft$demand [empty] = NA + szpft$supply [empty] = NA + szpft$nplant [empty] = NA + szpft$mort [empty] = NA + szpft$dimort [empty] = NA + szpft$ncbmort [empty] = NA + szpft$growth [empty] = NA + szpft$bdead [empty] = NA + szpft$bleaf [empty] = NA + szpft$broot [empty] = NA + szpft$bsapwood [empty] = NA + szpft$bstorage [empty] = NA + szpft$bseeds [empty] = NA + szpft$hflxlc [empty] = NA + szpft$wflxlc [empty] = NA + szpft$transp [empty] = NA + szpft$wue [empty] = NA + szpft$i.gpp [empty] = NA + szpft$i.npp [empty] = NA + szpft$i.plant.resp [empty] = NA + szpft$i.mco [empty] = NA + szpft$i.cba [empty] = NA + szpft$i.cbalight [empty] = NA + szpft$i.cbamoist [empty] = NA + szpft$i.transp [empty] = NA + szpft$i.wflxlc [empty] = NA + szpft$i.hflxlc [empty] = NA #---------------------------------------------------------------------------------------# #---------------------------------------------------------------------------------------# # Replace the mortality and recruitment exponential rates by the "interests" rates. # #---------------------------------------------------------------------------------------# - datum$mortpftdbh = 100. * (1.0 - exp(- datum$mortpftdbh )) - datum$agemortpftdbh = 100. * (1.0 - exp(- datum$agemortpftdbh )) - datum$ncbmortpftdbh = 100. * (1.0 - exp(- datum$ncbmortpftdbh )) - datum$tfallmortpftdbh = 100. * (1.0 - exp(- datum$tfallmortpftdbh)) - datum$coldmortpftdbh = 100. * (1.0 - exp(- datum$coldmortpftdbh )) - datum$distmortpftdbh = 100. * (1.0 - exp(- datum$distmortpftdbh )) - datum$mortpft = 100. * (1.0 - exp(- datum$mortpft )) - datum$agemortpft = 100. * (1.0 - exp(- datum$agemortpft )) - datum$ncbmortpft = 100. * (1.0 - exp(- datum$ncbmortpft )) - datum$tfallmortpft = 100. * (1.0 - exp(- datum$tfallmortpft )) - datum$coldmortpft = 100. * (1.0 - exp(- datum$coldmortpft )) - datum$distmortpft = 100. * (1.0 - exp(- datum$distmortpft )) - datum$recrpft = 100. * (exp( datum$recrpft ) - 1.0) + szpft$mort = 100. * (1.0 - exp(- szpft$mort ) ) + szpft$dimort = 100. * (1.0 - exp(- szpft$dimort ) ) + szpft$ncbmort = 100. * (1.0 - exp(- szpft$ncbmort ) ) + szpft$recrpft = 100. * ( exp( szpft$recr ) - 1.0) #---------------------------------------------------------------------------------------# #----- Find which PFTs, land uses and transitions we need to consider ------------------# - pftave = colMeans(datum$agbpft,na.rm=TRUE) - luave = colMeans(datum$agblu ,na.rm=TRUE) - distave = matrix(NA,nrow=3,ncol=3) - for (jlu in 1:nlu){ - for (ilu in 1:nlu){ - distave[ilu,jlu] = mean(datum$dist[,ilu,jlu]) - }#end for - }#end for - selpft = pftave > 0. - sellu = luave > 0. - seldist = distave > 0. + pftave = apply( X = szpft$agb[,ndbh+1,] + , MARGIN = 2 + , FUN = mean + , na.rm = TRUE + )#end apply + luave = apply( X = lu$agb + , MARGIN = 2 + , FUN = mean + , na.rm = TRUE + )#end apply + distave = apply(X=lu$dist,MARGIN=c(2,3),FUN=mean) + selpft = is.finite(pftave ) & pftave > 0. + sellu = is.finite(luave ) & luave > 0. + seldist = is.finite(distave) & distave > 0. + n.selpft = sum(selpft ) + n.sellu = sum(sellu ) + n.seldist = sum(seldist) #---------------------------------------------------------------------------------------# @@ -749,11 +812,11 @@ for (place in myplaces){ # Define a suitable scale for diurnal cycle... # #---------------------------------------------------------------------------------------# thisday = seq(from=0,to=ndcycle,by=1) * 24 / ndcycle - dcycplot = list() - dcycplot$levels = c(0,4,8,12,16,20,24) - dcycplot$n = 7 - dcycplot$scale = "hours" - dcycplot$padj = rep(0,times=dcycplot$n) + uplot = list() + uplot$levels = c(0,4,8,12,16,20,24) + uplot$n = 7 + uplot$scale = "hours" + uplot$padj = rep(0,times=uplot$n) #---------------------------------------------------------------------------------------# @@ -774,12 +837,12 @@ for (place in myplaces){ # Define a suitable scale for monthly means... # #---------------------------------------------------------------------------------------# montmont = seq(from=1,to=12,by=1) - montplot = list() - montplot$levels = montmont - montplot$labels = capwords(mon2mmm(montmont)) - montplot$n = 12 - montplot$scale = "months" - montplot$padj = rep(0,times=dcycplot$n) + mplot = list() + mplot$levels = montmont + mplot$labels = capwords(mon2mmm(montmont)) + mplot$n = 12 + mplot$scale = "months" + mplot$padj = rep(0,times=mplot$n) #---------------------------------------------------------------------------------------# @@ -800,13 +863,13 @@ for (place in myplaces){ #---------------------------------------------------------------------------------------# # Time series by PFT. # #---------------------------------------------------------------------------------------# - for (v in 1:ntspft){ - thistspft = tspft[[v]] + for (v in 1:ntspftdbh){ + thistspft = tspftdbh[[v]] vnam = thistspft$vnam description = thistspft$desc - unit = thistspft$unit + unit = thistspft$e.unit plog = thistspft$plog - plotit = thistspft$plt + plotit = thistspft$pft #----- Check whether the user wants to have this variable plotted. ------------------# if (plotit && any(selpft)){ @@ -819,7 +882,7 @@ for (place in myplaces){ cat(" + ",description," time series for all PFTs...","\n") #----- Load variable -------------------------------------------------------------# - thisvar = datum[[vnam]] + thisvar = szpft[[vnam]][,ndbh+1,] if (plog){ #----- Eliminate non-positive values in case it is a log plot. ----------------# thisvar[thisvar <= 0] = NA @@ -874,19 +937,27 @@ for (place in myplaces){ for (n in 1:ndrought){ rect(xleft = drought[[n]][1],ybottom = ydrought[1] ,xright = drought[[n]][2],ytop = ydrought[2] - ,col = "gray84",border=NA) + ,col = "grey84",border=NA) }#end for }#end if if (plotgrid){ - abline(v=whenplot8$levels,h=axTicks(side=2),col="gray52",lty="solid") + abline(v=whenplot8$levels,h=axTicks(side=2),col="grey52",lty="solid") }#end if for (n in 1:(npft+1)){ if (selpft[n]){ lines(datum$tomonth,thisvar[,n],type="l",col=pft$colour[n],lwd=lwidth) }#end if }#end for - legend(x=legwhere,inset=inset,bg=legbg,legend=legs,col=cols,lwd=lwidth) + legend( x = legwhere + , inset = inset + , bg = legbg + , legend = legs + , col = cols + , lwd = lwidth + , ncol = min(pretty.box(n.selpft)$ncol,3) + , title = expression(bold("Plant Functional Type")) + )#end legend if (outform[o] == "x11"){ locator(n=1) @@ -894,6 +965,7 @@ for (place in myplaces){ }else{ dev.off() }#end if + dummy = clean.tmp() } #end for outform }#end if (tseragbpft) } #end for tseries @@ -906,18 +978,18 @@ for (place in myplaces){ # Time series by DBH, by PFT. # #---------------------------------------------------------------------------------------# #----- Find the PFTs to plot. ----------------------------------------------------------# - pftuse = which(apply(X=datum$agbpftdbh,MARGIN=3,FUN=sum,na.rm=TRUE) > 0.) + pftuse = which(apply(X=szpft$nplant,MARGIN=3,FUN=sum,na.rm=TRUE) > 0.) pftuse = pftuse[pftuse != (npft+1)] for (v in 1:ntspftdbh){ thistspftdbh = tspftdbh[[v]] vnam = thistspftdbh$vnam description = thistspftdbh$desc - unit = thistspftdbh$unit + unit = thistspftdbh$e.unit plog = thistspftdbh$plog - plotit = thistspftdbh$plt + plotit = thistspftdbh$pftdbh #----- Load variable ----------------------------------------------------------------# - thisvar = datum[[vnam]] + thisvar = szpft[[vnam]] if (plog){ xylog="y" thisvar[thisvar <= 0] = NA @@ -987,17 +1059,24 @@ for (place in myplaces){ for (n in 1:ndrought){ rect(xleft = drought[[n]][1],ybottom = ydrought[1] ,xright = drought[[n]][2],ytop = ydrought[2] - ,col = "gray84",border=NA) + ,col = "grey84",border=NA) }#end for }#end if if (plotgrid){ - abline(v=whenplot8$levels,h=axTicks(side=2),col="gray52",lty="solid") + abline(v=whenplot8$levels,h=axTicks(side=2),col="grey52",lty="solid") }#end if for (d in seq(from=1,to=ndbh+1,by=1)){ lines(datum$tomonth,thisvar[,d,p],type="l",col=dbhcols[d],lwd=lwidth) }#end for - legend(x=legwhere,inset=inset,bg=legbg,legend=dbhnames,col=dbhcols - ,ncol=2,title="DBH class",lwd=lwidth,cex=0.8) + legend( x = legwhere + , inset = inset + , bg = legbg + , legend = dbhnames + , col = dbhcols + , ncol = min(pretty.box(ndbh+1)$ncol,3) + , title = expression(bold("DBH class")) + , lwd = lwidth + )#end legend if (outform[o] == "x11"){ locator(n=1) @@ -1005,6 +1084,7 @@ for (place in myplaces){ }else{ dev.off() }#end if + dummy = clean.tmp() } #end for outform }#end for (p in pftuse) }#end if (tseragbpft) @@ -1018,10 +1098,10 @@ for (place in myplaces){ # Plot the comparison between observations and model. # #---------------------------------------------------------------------------------------# cat(" + Comparisons of time series (model vs. observations)...","\n") - for (cc in 1:ncompemean){ + for (cc in 1:ncompmodel){ #----- Retrieve variable information from the list. ---------------------------------# - compnow = compemean[[cc]] + compnow = compmodel[[cc]] vname = compnow$vnam description = compnow$desc unit = compnow$unit @@ -1031,7 +1111,7 @@ for (place in myplaces){ ltype = compnow$type plog = compnow$plog legpos = compnow$legpos - plotit = compnow$plt + plotit = compnow$emean #----- Check whether there are observations for this particular site. ---------------# if (iata == "mao" | iata == "bdf"){ @@ -1090,7 +1170,7 @@ for (place in myplaces){ #----- Define the number of layers. ----------------------------------------------# thiswhen = datum$tomonth [sel] - thismean = datum[[vname]][sel] + thismean = emean[[vname]][sel] #---------------------------------------------------------------------------------# @@ -1136,7 +1216,7 @@ for (place in myplaces){ ,cex.main=cex.main) axis(side=1,at=whenplote$levels,labels=whenplote$labels,padj=whenplote$padj) if (plotgrid){ - abline(v=whenplote$levels,h=axTicks(side=2),col="gray52",lty="solid") + abline(v=whenplote$levels,h=axTicks(side=2),col="grey52",lty="solid") }#end if points(x=thiswhen,y=thismean,col=lcolours[1],lwd=llwd[1],type=ltype ,pch=16,cex=1.0) @@ -1150,6 +1230,7 @@ for (place in myplaces){ }else{ dev.off() }#end if + dummy = clean.tmp() } #end for outform }#end if plotit }#end for ncompare @@ -1162,10 +1243,10 @@ for (place in myplaces){ # Plot the comparison between observations and model. # #---------------------------------------------------------------------------------------# cat(" + Comparisons of monthly means (model vs. observations)...","\n") - for (cc in 1:ncompmmean){ + for (cc in 1:ncompmodel){ #----- Retrieve variable information from the list. ---------------------------------# - compnow = compmmean[[cc]] + compnow = compmodel[[cc]] vname = compnow$vnam description = compnow$desc unit = compnow$unit @@ -1180,7 +1261,7 @@ for (place in myplaces){ ltype = compnow$type plog = compnow$plog legpos = compnow$legpos - plotit = compnow$plt + plotit = compnow$mmean #----- Check whether there are observations for this particular site. ---------------# if (iata == "mao" | iata == "bdf"){ @@ -1252,12 +1333,12 @@ for (place in myplaces){ # Define the number of layers. Some variables have no standard deviation in # # the model, so Make them 0 if this is the case. # #---------------------------------------------------------------------------------# - thismean = mont12mn[[vname]] - thissdev = mont12sd[[vname]] - if (length(mont12sd[[vname]]) == 0){ + thismean = mmean[[vname]] + thissdev = msdev[[vname]] + if (length(msdev[[vname]]) == 0){ thissdev = 0. * thismean }else{ - thissdev = mont12sd[[vname]] + thissdev = msdev[[vname]] }#end if mod.x = montmont mod.ylow = thismean - thissdev @@ -1302,9 +1383,9 @@ for (place in myplaces){ plot(x=montmont,y=thismean,type="n",main=letitre,xlab="Time" ,ylim=ylimit,ylab=paste("[",unit,"]",sep=""),log=plog,xaxt="n" ,cex.main=cex.main) - axis(side=1,at=montplot$levels,labels=montplot$labels,padj=montplot$padj) + axis(side=1,at=mplot$levels,labels=mplot$labels,padj=mplot$padj) if (plotgrid){ - abline(v=montplot$levels,h=axTicks(side=2),col="gray52",lty="solid") + abline(v=mplot$levels,h=axTicks(side=2),col="grey52",lty="solid") }#end if if (plotsd){ if (is.null(obs.x)){ @@ -1347,6 +1428,7 @@ for (place in myplaces){ }else{ dev.off() }#end if + dummy = clean.tmp() } #end for outform }#end if plotit }#end for ncompare @@ -1359,10 +1441,10 @@ for (place in myplaces){ # Plot the comparison between observations and model. # #---------------------------------------------------------------------------------------# cat(" * Comparisons of mean diurnal cycle (model vs. observations)...","\n") - for (cc in 1:ncompdcyc){ + for (cc in 1:ncompmodel){ #----- Retrieve variable information from the list. ---------------------------------# - compnow = compdcyc[[cc]] + compnow = compmodel[[cc]] vname = compnow$vnam description = compnow$desc unit = compnow$unit @@ -1377,7 +1459,7 @@ for (place in myplaces){ ltype = compnow$type plog = compnow$plog legpos = compnow$legpos - plotit = compnow$plt + plotit = compnow$qmean #----- Check whether there are observations for this particular site. ---------------# if (iata == "mao" | iata == "bdf"){ @@ -1442,13 +1524,13 @@ for (place in myplaces){ # the model, so Make them 0 if this is the case. We also append the last hour # # before the first one so 00 UTC appears in the left. # #---------------------------------------------------------------------------------# - thismean = dcyc12mn[[vname]] + thismean = umean[[vname]] thismean = cbind(thismean[,ndcycle],thismean) - if (length(dcyc12sd[[vname]]) == 0){ + if (length(usdev[[vname]]) == 0){ thissdev = 0. * thismean }else{ - thissdev = dcyc12sd[[vname]] - thissdev = cbind(thissdev[,ndcycle],thissdev) + thissdev = usdev[[vname]] + thissdev = cbind(thissdev[,ndcycle],thissdev) }#end if mod.ylow = thismean - thissdev mod.yhigh = thismean + thissdev @@ -1500,9 +1582,9 @@ for (place in myplaces){ plot(x=thisday,y=thismean[pmon,],type="n",main=letitre,xlab="Time" ,ylim=ylimit,ylab=paste("[",unit,"]",sep=""),log=plog,xaxt="n" ,cex.main=cex.main) - axis(side=1,at=dcycplot$levels,labels=dcycplot$labels,padj=dcycplot$padj) + axis(side=1,at=uplot$levels,labels=uplot$labels,padj=uplot$padj) if (plotgrid){ - abline(v=dcycplot$levels,h=axTicks(side=2),col="gray52",lty="solid") + abline(v=uplot$levels,h=axTicks(side=2),col="grey52",lty="solid") }#end if if (plotsd){ mod.x.now = thisday @@ -1560,6 +1642,7 @@ for (place in myplaces){ }else{ dev.off() }#end if + dummy = clean.tmp() } #end for outform }#end for pmon }#end if plotit @@ -1593,7 +1676,7 @@ for (place in myplaces){ #----- Load variable -------------------------------------------------------------# - thisvar = datum[[vnam]] + thisvar = lu[[vnam]] if (plog){ #----- Eliminate non-positive values in case it is a log plot. ----------------# thisvar[thisvar <= 0] = NA @@ -1621,7 +1704,7 @@ for (place in myplaces){ # Find the limit, make some room for the legend, and in case the field is # # a constant, nudge the limits so the plot command will not complain. # #------------------------------------------------------------------------------# - ylimit = pretty.xylim(thisvar[,selpft],fracexp=scalleg,is.log=plog) + ylimit = pretty.xylim(thisvar[,sellu],fracexp=scalleg,is.log=plog) if (plog){ xylog = "y" ydrought = c( exp(ylimit[1] * sqrt(ylimit[1]/ylimit[2])) @@ -1644,18 +1727,26 @@ for (place in myplaces){ for (n in 1:ndrought){ rect(xleft = drought[[n]][1],ybottom = ydrought[1] ,xright = drought[[n]][2],ytop = ydrought[2] - ,col = "gray84",border=NA) + ,col = "grey84",border=NA) }#end for }#end if if (plotgrid){ - abline(v=whenplot8$levels,h=axTicks(side=2),col="gray52",lty="solid") + abline(v=whenplot8$levels,h=axTicks(side=2),col="grey52",lty="solid") }#end if for (n in 1:(nlu+1)){ if (sellu[n]){ lines(datum$tomonth,thisvar[,n],type="l",col=lucols[n],lwd=lwidth) }#end if }#end for - legend(x=legwhere,inset=inset,bg=legbg,legend=legs,col=cols,lwd=lwidth) + legend( x = legwhere + , inset = inset + , bg = legbg + , legend = legs + , col = cols + , lwd = lwidth + , ncol = min(3,pretty.box(n.sellu)$ncol) + , title = expression(bold("Land use type")) + )#end legend if (outform[o] == "x11"){ locator(n=1) @@ -1663,6 +1754,7 @@ for (place in myplaces){ }else{ dev.off() }#end if + dummy = clean.tmp() } #end for outform }#end if (tseragbpft) } #end for tseries @@ -1700,7 +1792,7 @@ for (place in myplaces){ for (jlu in 1:nlu){ for (ilu in 1:nlu){ if (seldist[ilu,jlu]){ - ylimit = c(ylimit,datum$dist[,ilu,jlu]) + ylimit = c(ylimit,lu$dist[,ilu,jlu]) }#end if }#end for }#end for @@ -1711,18 +1803,18 @@ for (place in myplaces){ letitre = paste("Disturbance rates",lieu,sep=" - ") cols = NULL legs = NULL - plot(datum$tomonth,datum$dist[,1,1],type="n",main=letitre,ylim=ylimit + plot(datum$tomonth,lu$dist[,1,1],type="n",main=letitre,ylim=ylimit ,xlab="Time",ylab="[1/yr]",xaxt="n",cex.main=0.7) axis(side=1,at=whenplot8$levels,labels=whenplot8$labels,padj=whenplot8$padj) if (drought.mark){ for (n in 1:ndrought){ rect(xleft = drought[[n]][1],ybottom = ydrought[1] ,xright = drought[[n]][2],ytop = ydrought[2] - ,col = "gray84",border=NA) + ,col = "grey84",border=NA) }#end for }#end if if (plotgrid){ - abline(v=whenplot8$levels,h=axTicks(side=2),col="gray52",lty="solid") + abline(v=whenplot8$levels,h=axTicks(side=2),col="grey52",lty="solid") }#end if n = 0 for (jlu in 1:nlu){ @@ -1731,12 +1823,20 @@ for (place in myplaces){ if (seldist[ilu,jlu]){ cols = c(cols,distcols[n]) legs = c(legs,distnames[n]) - lines(datum$tomonth,datum$dist[,ilu,jlu],type="l" + lines(datum$tomonth,lu$dist[,ilu,jlu],type="l" ,col=distcols[n],lwd=lwidth) }#end if }#end for }#end for - legend(x=legwhere,inset=inset,bg=legbg,legend=legs,col=cols,lwd=lwidth) + legend(x = legwhere + ,inset = inset + ,bg = legbg + ,legend = legs + ,col = cols + ,lwd = lwidth + , ncol = min(3,pretty.box(n)$ncol) + , title = expression(bold("Transition")) + )#end legend if (outform[o] == "x11"){ locator(n=1) @@ -1744,6 +1844,7 @@ for (place in myplaces){ }else{ dev.off() }#end if + dummy = clean.tmp() } #end for outform }#end if #---------------------------------------------------------------------------------------# @@ -1754,31 +1855,35 @@ for (place in myplaces){ #---------------------------------------------------------------------------------------# # Plot the time series diagrams showing months and years. # #---------------------------------------------------------------------------------------# - cat(" * Plot some time series figures...","\n") - for (hh in 1:ntser){ + cat(" * Plot some time series with groups of variables...","\n") + for (hh in 1:ntheme){ #----- Retrieve variable information from the list. ---------------------------------# - tsernow = tser[[hh]] - vnames = tsernow$vnam - description = tsernow$desc - lcolours = tsernow$colour - llwd = tsernow$lwd - ltype = tsernow$type - plog = tsernow$plog - prefix = tsernow$prefix - theme = tsernow$theme - unit = tsernow$unit - legpos = tsernow$legpos - plotit = tsernow$plt + themenow = theme[[hh]] + vnames = themenow$vnam + description = themenow$desc + lcolours = themenow$colour + llwd = themenow$lwd + if (emean.line){ + ltype = "l" + }else{ + ltype = themenow$type + }#end if + plog = themenow$plog + prefix = themenow$prefix + group = themenow$title + unit = themenow$unit + legpos = themenow$legpos + plotit = themenow$emean if (plotit){ #---------------------------------------------------------------------------------# # Check whether the time series directory exists. If not, create it. # #---------------------------------------------------------------------------------# - outdir = paste(outpref,"tseries",sep="/") + outdir = paste(outpref,"theme_emean",sep="/") if (! file.exists(outdir)) dir.create(outdir) - cat(" + ",theme," time series for several variables...","\n") + cat(" + ",group," time series for several variables...","\n") #----- Define the number of layers. ----------------------------------------------# @@ -1792,7 +1897,7 @@ for (place in myplaces){ # constant, nudge the limits so the plot command will not complain. # #---------------------------------------------------------------------------------# ylimit = NULL - for (l in 1:nlayers) ylimit = c(ylimit,datum[[vnames[l]]]) + for (l in 1:nlayers) ylimit = c(ylimit,emean[[vnames[l]]]) ylimit = pretty.xylim(u=ylimit,fracexp=scalleg,is.log=plog) if (plog){ xylog = "y" @@ -1810,7 +1915,6 @@ for (place in myplaces){ #---------------------------------------------------------------------------------# # Check if the directory exists. If not, create it. # #---------------------------------------------------------------------------------# - cat(" > ",theme," time series ...","\n") #----- Loop over formats. --------------------------------------------------------# for (o in 1:nout){ @@ -1829,9 +1933,9 @@ for (place in myplaces){ }#end if #----- Load variable ----------------------------------------------------------# - thisvar = datum[[vnames[1]]] + thisvar = emean[[vnames[1]]] - letitre = paste(theme," - ",lieu," \n"," Time series: ",theme,sep="") + letitre = paste(" Time series: ",group," \n",lieu,sep="") plot(x=datum$tomonth,y=thisvar,type="n",main=letitre,xlab="Time" ,ylim=ylimit,ylab=paste("[",unit,"]",sep=""),log=xylog,xaxt="n" @@ -1841,24 +1945,31 @@ for (place in myplaces){ for (n in 1:ndrought){ rect(xleft = drought[[n]][1],ybottom = ydrought[1] ,xright = drought[[n]][2],ytop = ydrought[2] - ,col = "gray84",border=NA) + ,col = "grey84",border=NA) }#end for }#end if if (plotgrid){ - abline(v=whenplot8$levels,h=axTicks(side=2),col="gray52",lty="solid") + abline(v=whenplot8$levels,h=axTicks(side=2),col="grey52",lty="solid") }#end if for (l in 1:nlayers){ - thisvar = datum[[vnames[l]]] + thisvar = emean[[vnames[l]]] points(x=datum$tomonth,y=thisvar,col=lcolours[l] - ,lwd=llwd[l],type=ltype,pch=16,cex=0.8) + ,lwd=llwd[l],type=ltype,pch=16) }#end for - legend(x=legpos,inset=inset,legend=description,col=lcolours,lwd=llwd,cex=0.8) + legend( x = legpos + , inset = inset + , legend = description + , col = lcolours + , lwd = llwd + , ncol = min(3,pretty.box(nlayers)$ncol) + )#end legend if (outform[o] == "x11"){ locator(n=1) dev.off() }else{ dev.off() }#end if + dummy = clean.tmp() } #end for outform }#end if plotit }#end for ntser @@ -1868,41 +1979,168 @@ for (place in myplaces){ #---------------------------------------------------------------------------------------# - # Plot the climatology of the mean diurnal cycle. # + # Plot the time series diagrams showing months and years. # #---------------------------------------------------------------------------------------# - cat(" * Plot some climatology of diurnal cycle...","\n") - for (hh in 1:nclim){ + cat(" * Plot some monthly means of groups of variables ...","\n") + for (hh in 1:ntheme){ #----- Retrieve variable information from the list. ---------------------------------# - climnow = clim[[hh]] - vnames = climnow$vnam - description = climnow$desc - lcolours = climnow$colour - llwd = climnow$lwd - ltype = climnow$type - plog = climnow$plog - prefix = climnow$prefix - theme = climnow$theme - unit = climnow$unit - legpos = climnow$legpos - plotit = climnow$plt + themenow = theme[[hh]] + vnames = themenow$vnam + description = themenow$desc + lcolours = themenow$colour + llwd = themenow$lwd + ltype = themenow$type + plog = themenow$plog + prefix = themenow$prefix + group = themenow$title + unit = themenow$unit + legpos = themenow$legpos + plotit = themenow$mmean if (plotit){ #---------------------------------------------------------------------------------# # Check whether the time series directory exists. If not, create it. # #---------------------------------------------------------------------------------# - outdir = paste(outpref,"climdcyc",sep="/") + outdir = paste(outpref,"theme_mmean",sep="/") + if (! file.exists(outdir)) dir.create(outdir) + cat(" + ",group," time series for several variables...","\n") + + + #----- Define the number of layers. ----------------------------------------------# + nlayers = length(vnames) + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Find the limit, make some room for the legend, and in case the field is a # + # constant, nudge the limits so the plot command will not complain. # + #---------------------------------------------------------------------------------# + ylimit = NULL + for (l in 1:nlayers) ylimit = c(ylimit,mmean[[vnames[l]]]) + ylimit = pretty.xylim(u=ylimit,fracexp=scalleg,is.log=plog) + if (plog){ + xylog = "y" + ydrought = c( exp(ylimit[1] * sqrt(ylimit[1]/ylimit[2])) + , exp(ylimit[2] * sqrt(ylimit[2]/ylimit[1])) + )#end c + }else{ + xylog = "" + ydrought = c(ylimit[1] - 0.5 * diff(ylimit), ylimit[2] + 0.5 * diff(ylimit)) + }#end if + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Check if the directory exists. If not, create it. # + #---------------------------------------------------------------------------------# + + #----- Loop over formats. --------------------------------------------------------# + for (o in 1:nout){ + fichier = paste(outdir,"/",prefix,"-",suffix,".",outform[o],sep="") + if(outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth,height=size$height*depth + ,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE + ,width=size$width,height=size$height,pointsize=ptsz,paper=size$paper) + }#end if + + #----- Load variable ----------------------------------------------------------# + thisvar = mmean[[vnames[1]]] + + letitre = paste(" Time series: ",group," \n",lieu,sep="") + + plot(x=montmont,y=thisvar,type="n",main=letitre,xlab="Month" + ,ylim=ylimit,ylab=paste("[",unit,"]",sep=""),log=xylog,xaxt="n" + ,cex.main=cex.main) + axis(side=1,at=mplot$levels,labels=mplot$labels,padj=mplot$padj) + if (drought.mark){ + for (n in 1:ndrought){ + rect(xleft = drought[[n]][1],ybottom = ydrought[1] + ,xright = drought[[n]][2],ytop = ydrought[2] + ,col = "grey84",border=NA) + }#end for + }#end if + if (plotgrid){ + abline(v=mplot$levels,h=axTicks(side=2),col="grey52",lty="solid") + }#end if + for (l in 1:nlayers){ + thisvar = mmean[[vnames[l]]] + points(x=montmont,y=thisvar,col=lcolours[l],lwd=llwd[l],type=ltype,pch=16) + }#end for + legend( x = legpos + , inset = inset + , legend = description + , col = lcolours + , lwd = llwd + , ncol = min(3,pretty.box(nlayers)$ncol) + )#end legend + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + dummy = clean.tmp() + } #end for outform + }#end if plotit + }#end for ntser + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # Plot the climatology of the mean diurnal cycle. # + #---------------------------------------------------------------------------------------# + cat(" * Plot the mean diel of groups of variables...","\n") + for (hh in 1:ntheme){ + + #----- Retrieve variable information from the list. ---------------------------------# + themenow = theme[[hh]] + vnames = themenow$vnam + description = themenow$desc + lcolours = themenow$colour + llwd = themenow$lwd + ltype = themenow$type + plog = themenow$plog + prefix = themenow$prefix + group = themenow$title + unit = themenow$unit + legpos = themenow$legpos + plotit = themenow$qmean + if (plog){ + xylog = "y" + }else{ + xylog = "" + }#end if + + + if (plotit){ + + #---------------------------------------------------------------------------------# + # Check whether the time series directory exists. If not, create it. # + #---------------------------------------------------------------------------------# + outdir = paste(outpref,"theme_qmean",sep="/") if (! file.exists(outdir)) dir.create(outdir) outtheme = paste(outdir,prefix,sep="/") if (! file.exists(outtheme)) dir.create(outtheme) - cat(" + ",description," diurnal cycle for several variables...","\n") + cat(" + ",group," diurnal cycle for several variables...","\n") #----- Define the number of layers. ----------------------------------------------# nlayers = length(vnames) ylimit = NULL - for (l in 1:nlayers) ylimit = c(ylimit,dcyc12mn[[vnames[l]]]) + for (l in 1:nlayers) ylimit = c(ylimit,umean[[vnames[l]]]) ylimit = pretty.xylim(u=ylimit,fracexp=scalleg,is.log=FALSE) #---------------------------------------------------------------------------------# @@ -1917,7 +2155,6 @@ for (place in myplaces){ #------------------------------------------------------------------------------# # Check if the directory exists. If not, create it. # #------------------------------------------------------------------------------# - cat(" > ",theme," time series - ",namemon,"...","\n") #----- Loop over formats. -----------------------------------------------------# for (o in 1:nout){ @@ -1937,32 +2174,39 @@ for (place in myplaces){ }#end if #----- Load variable -------------------------------------------------------# - thisvar = dcyc12mn[[vnames[1]]] + thisvar = umean[[vnames[1]]] thisvar = cbind(thisvar[,ndcycle],thisvar) - letitre = paste(theme," - ",lieu,"\n" + letitre = paste(group," - ",lieu,"\n" ,"Mean diurnal cycle - ",namemon,sep="") plot(x=thisday,y=thisvar[pmon,],type="n",main=letitre,xlab="Time" - ,ylim=ylimit,ylab=paste("[",unit,"]",sep=""),log=plog,xaxt="n" + ,ylim=ylimit,ylab=paste("[",unit,"]",sep=""),log=xylog,xaxt="n" ,cex.main=cex.main) - axis(side=1,at=dcycplot$levels,labels=dcycplot$labels,padj=dcycplot$padj) + axis(side=1,at=uplot$levels,labels=uplot$labels,padj=uplot$padj) if (plotgrid){ - abline(v=dcycplot$levels,h=axTicks(side=2),col="gray52",lty="solid") + abline(v=uplot$levels,h=axTicks(side=2),col="grey52",lty="solid") }#end if for (l in 1:nlayers){ - thisvar = dcyc12mn[[vnames[l]]] + thisvar = umean[[vnames[l]]] thisvar = cbind(thisvar[,ndcycle],thisvar) points(x=thisday,y=thisvar[pmon,],col=lcolours[l] - ,lwd=llwd[l],type=ltype,pch=16,cex=0.8) + ,lwd=llwd[l],type=ltype,pch=16) }#end for - legend(x=legpos,inset=inset,legend=description,col=lcolours,lwd=llwd) + legend( x = legpos + , inset = inset + , legend = description + , col = lcolours + , lwd = llwd + , ncol = min(3,pretty.box(nlayers)$ncol) + )#end legend if (outform[o] == "x11"){ locator(n=1) dev.off() }else{ dev.off() }#end if + dummy = clean.tmp() } #end for outform }#end for pmon }#end if plotit @@ -1976,23 +2220,23 @@ for (place in myplaces){ #---------------------------------------------------------------------------------------# # Plot the climatology of the soil properties. # #---------------------------------------------------------------------------------------# - for (v in 1:nsoilclim){ + for (v in 1:nsoilplot){ #----- Retrieve variable information from the list. ---------------------------------# - thisclim = soilclim[[v]] - vnam = thisclim$vnam - description = thisclim$desc - unit = thisclim$unit - vcscheme = thisclim$csch - pnlog = thisclim$pnlog - plotit = thisclim$plt + thissoil = soilplot[[v]] + vnam = thissoil$vnam + description = thissoil$desc + unit = thissoil$unit + vcscheme = thissoil$csch + pnlog = thissoil$pnlog + plotit = thissoil$mmean if (plotit){ #---------------------------------------------------------------------------------# # Check if the directory exists. If not, create it. # #---------------------------------------------------------------------------------# - outdir = paste(outpref,"soilclim",sep="/") + outdir = paste(outpref,"soil_mmean",sep="/") if (! file.exists(outdir)) dir.create(outdir) cat(" + Climatology profile of ",description,"...","\n") @@ -2007,7 +2251,7 @@ for (place in myplaces){ monlab = c("J","F","M","A","M","J","J","A","S","O","N","D") #----- Convert the vector data into an array. ------------------------------------# - vararr = mont12mn[[vnam]] + vararr = mmean[[vnam]] #----- Copy Decembers ans Januaries to make the edges buffered. ------------------# january = vararr[1,] @@ -2055,7 +2299,7 @@ for (place in myplaces){ letitre = paste(description," - ",lieu,sep="") sombreado(x=monaxis,y=soilaxis,z=varbuff,levels=vlevels,nlevels=vnlev - ,color.palette=get(vcscheme) + ,colour.palette=get(vcscheme) ,plot.title=title(main=letitre,xlab="Month",ylab="Soil depth [m]" ,cex.main=0.7) ,key.title=title(main=unit,cex.main=0.8) @@ -2063,7 +2307,7 @@ for (place in myplaces){ ,plot.axes={axis(side=1,at=monat,labels=monlab) axis(side=2,at=zat,labels=znice) if (hovgrid){ - abline(h=zat,v=monat,col="gray52",lty="dotted") + abline(h=zat,v=monat,col="grey52",lty="dotted") }#end if hovgrid }#end plot.axes ) @@ -2074,9 +2318,10 @@ for (place in myplaces){ }else{ dev.off() }#end if + dummy = clean.tmp() } #end for outform }#end if plotit - }#end for nhov + }#end for (v in 1:nsoilplot) #---------------------------------------------------------------------------------------# @@ -2086,23 +2331,23 @@ for (place in myplaces){ #---------------------------------------------------------------------------------------# # Plot the climatology of the soil properties. # #---------------------------------------------------------------------------------------# - for (sts in 1:nsoilts){ + for (sts in 1:nsoilplot){ #----- Retrieve variable information from the list. ---------------------------------# - thissts = soilts[[sts]] - vnam = thissts$vnam - description = thissts$desc - unit = thissts$unit - vcscheme = thissts$csch - pnlog = thissts$pnlog - plotit = thissts$plt + thissoil = soilplot[[sts]] + vnam = thissoil$vnam + description = thissoil$desc + unit = thissoil$unit + vcscheme = thissoil$csch + pnlog = thissoil$pnlog + plotit = thissoil$emean if (plotit){ #---------------------------------------------------------------------------------# # Check if the directory exists. If not, create it. # #---------------------------------------------------------------------------------# - outdir = paste(outpref,"soilts",sep="/") + outdir = paste(outpref,"soil_emean",sep="/") if (! file.exists(outdir)) dir.create(outdir) cat(" + Time series profile of ",description,"...","\n") @@ -2113,7 +2358,7 @@ for (place in myplaces){ nsoil = nzg #----- Convert the vector data into an array. ------------------------------------# - vararr = datum[[vnam]] + vararr = emean[[vnam]] #----- Copy Decembers ans Januaries to make the edges buffered. ------------------# first = vararr[1,] @@ -2166,7 +2411,7 @@ for (place in myplaces){ letitre = paste(description," - ",lieu,sep="") sombreado(x=whenaxis,y=soilaxis,z=varbuff,levels=vlevels,nlevels=vnlev - ,color.palette=get(vcscheme) + ,colour.palette=get(vcscheme) ,plot.title=title(main=letitre,xlab="Month",ylab="Soil depth [m]" ,cex.main=0.7) ,key.title=title(main=unit,cex.main=0.8) @@ -2175,7 +2420,7 @@ for (place in myplaces){ ,labels=whenplot6$labels,padj=whenplot6$padj) axis(side=2,at=zat,labels=znice) if (hovgrid){ - abline(h=zat,v=whenplot6$levels,col="gray52" + abline(h=zat,v=whenplot6$levels,col="grey52" ,lty="dotted") }#end if hovgrid }#end plot.axes @@ -2187,6 +2432,7 @@ for (place in myplaces){ }else{ dev.off() }#end if + dummy = clean.tmp() } #end for outform }#end if plotit }#end for nhov @@ -2197,17 +2443,17 @@ for (place in myplaces){ #---------------------------------------------------------------------------------------# - # Plot the Hovmoller looking diagrams showing months and years. # + # Plot a filled contour plot showing months and years. # #---------------------------------------------------------------------------------------# - for (v in 1:nhov){ + for (v in 1:nsqueeze){ #----- Retrieve variable information from the list. ---------------------------------# - thishovdi = hovdi[[v]] - vnam = thishovdi$vnam - description = thishovdi$desc - unit = thishovdi$unit - vcscheme = thishovdi$csch - plotit = thishovdi$plt + thisfillc = squeeze[[v]] + vnam = thisfillc$vnam + description = thisfillc$desc + unit = thisfillc$unit + vcscheme = thisfillc$col.scheme + plotit = thisfillc$fco.mmean #------------------------------------------------------------------------------------# # Find the first and the last full years. These will be the actual first and # @@ -2232,12 +2478,12 @@ for (place in myplaces){ #---------------------------------------------------------------------------------# # Check if the directory exists. If not, create it. # #---------------------------------------------------------------------------------# - outdir = paste(outpref,"hovmoller",sep="/") + outdir = paste(outpref,"fillc_mmean",sep="/") if (! file.exists(outdir)) dir.create(outdir) - cat(" + ",description," Hovmoller time series ...","\n") + cat(" + ",description," time series in filled contour...","\n") #----- Load this variable into "thisvar". ----------------------------------------# - thisvar = datum[[vnam]] + thisvar = emean[[vnam]] #----- Find the number of rows and columns, and the axes. ------------------------# monaxis = sort(unique(datum$month[sel])) @@ -2290,17 +2536,17 @@ for (place in myplaces){ letitre = paste(description," - ",lieu,sep="") sombreado(x=monaxis,y=yraxis,z=varbuff,levels=vlevels,nlevels=vnlev - ,color.palette=get(vcscheme) + ,colour.palette=get(vcscheme) ,plot.title=title(main=letitre,xlab="Month",ylab="Year",cex.main=0.7) ,key.title=title(main=unit,cex.main=0.8) ,plot.axes={axis(side=1,at=monat,labels=monlab) axis(side=2,at=yrat) if (hovgrid){ for (yl in yrat){ - abline(h=yl,col="gray52",lty="dotted") + abline(h=yl,col="grey52",lty="dotted") } #end for yl for (ml in monat){ - abline(v=ml,col="gray52",lty="dotted") + abline(v=ml,col="grey52",lty="dotted") } #end for ml }#end if hovgrid }#end plot.axes @@ -2312,6 +2558,7 @@ for (place in myplaces){ }else{ dev.off() }#end if + dummy = clean.tmp() } #end for outform }#end if plotit }#end for nhov @@ -2323,30 +2570,29 @@ for (place in myplaces){ #---------------------------------------------------------------------------------------# - # Plot the Hovmoller looking diagrams showing time of day and time. # + # Plot the filled contour diagrams showing time of day and time. # #---------------------------------------------------------------------------------------# - - for (v in 1:nhdcyc){ + for (v in 1:nsqueeze){ #----- Retrieve variable information from the list. ---------------------------------# - thishdcyc = hdcyc[[v]] - vnam = thishdcyc$vnam - description = thishdcyc$desc - unit = thishdcyc$unit - vcscheme = thishdcyc$csch - plotit = thishdcyc$plt + thisfillc = squeeze[[v]] + vnam = thisfillc$vnam + description = thisfillc$desc + unit = thisfillc$unit + vcscheme = thisfillc$col.scheme + plotit = thisfillc$fco.qmean if (plotit){ #---------------------------------------------------------------------------------# # Check if the directory exists. If not, create it. # #---------------------------------------------------------------------------------# - outdir = paste(outpref,"hovdcycle",sep="/") + outdir = paste(outpref,"fillc_qmean",sep="/") if (! file.exists(outdir)) dir.create(outdir) cat(" + ",description," time series of diurnal cycle...","\n") #----- Load this variable into "thisvar". ----------------------------------------# - vararr = dcycmean[[vnam]] + vararr = qmean[[vnam]] #----- Copy Decembers ans Januaries to make the edges buffered. ------------------# firsthr = vararr[,1] @@ -2363,7 +2609,7 @@ for (place in myplaces){ hraxis = seq(from=0,to=ndcycle+1,by=1) * 24 / ndcycle dwhen = datum$tomonth[2]-datum$tomonth[1] whenaxis = c(datum$tomonth[1]-dwhen,datum$tomonth,datum$tomonth[ntimes]+dwhen) - hdcycplot = pretty.time(whenaxis,n=8) + huplot = pretty.time(whenaxis,n=8) vrange = range(varbuff,na.rm=TRUE) vlevels = pretty(x=vrange,n=ncolshov) @@ -2387,15 +2633,15 @@ for (place in myplaces){ letitre = paste("Mean diurnal cycle \n ",description," - ",lieu,sep="") sombreado(x=whenaxis,y=hraxis,z=varbuff,levels=vlevels,nlevels=vnlev - ,color.palette=get(vcscheme) + ,colour.palette=get(vcscheme) ,plot.title=title(main=letitre,ylab="Time of day (GMT)" ,xlab="Time",cex.main=0.7) ,key.title=title(main=unit,cex.main=0.8) - ,plot.axes={axis(side=1,at=hdcycplot$level,labels=hdcycplot$labels) - axis(side=2,at=dcycplot$levels,labels=dcycplot$labels) + ,plot.axes={axis(side=1,at=huplot$level,labels=huplot$labels) + axis(side=2,at=uplot$levels,labels=uplot$labels) if (hovgrid){ - abline(v=hdcycplot$levels,h=dcycplot$levels - ,col="gray52",lty="dotted") + abline(v=huplot$levels,h=uplot$levels + ,col="grey52",lty="dotted") }#end if hovgrid }#end plot.axes ) @@ -2406,6 +2652,7 @@ for (place in myplaces){ }else{ dev.off() }#end if + dummy = clean.tmp() } #end for outform }#end if plotit }#end for nhov @@ -2417,14 +2664,14 @@ for (place in myplaces){ #---------------------------------------------------------------------------------------# # Plot the monthly boxplots. # #---------------------------------------------------------------------------------------# - for (v in 1:nbox){ + for (v in 1:nsqueeze){ #----- Retrieve variable information from the list. ---------------------------------# - thisbplot = pm.bplot[[v]] + thisbplot = squeeze[[v]] vnam = thisbplot$vnam description = thisbplot$desc unit = thisbplot$unit - plotit = thisbplot$plt + plotit = thisbplot$box.plot if (plotit){ #---------------------------------------------------------------------------------# @@ -2435,7 +2682,7 @@ for (place in myplaces){ cat(" + ",description," box plot...","\n") #----- Load this variable into "thisvar". ----------------------------------------# - thisvar = datum[[vnam]] + thisvar = emean[[vnam]] for (o in 1:nout){ fichier = paste(outdir,"/",vnam,"-",suffix,".",outform[o],sep="") @@ -2464,6 +2711,7 @@ for (place in myplaces){ }else{ dev.off() }#end if + dummy = clean.tmp() } #end for outform }#end if }#end for nbox @@ -2480,19 +2728,19 @@ for (place in myplaces){ cat(" + Bar plot by DBH classes...","\n") monbplot = which(nummonths(datum$tomonth) %in% sasmonth) nmonbplot = length(monbplot) - pftuse = which(apply(X=datum$nplantpftdbh,MARGIN=3,FUN=sum,na.rm=TRUE) > 0.) + pftuse = which(apply(X=szpft$nplant,MARGIN=3,FUN=sum,na.rm=TRUE) > 0.) pftuse = pftuse[pftuse != (npft+1)] npftuse = length(pftuse) pftname.use = pft$name [pftuse] pftcol.use = pft$colour[pftuse] - for (v in 1:nbarplotdbh){ + for (v in 1:ntspftdbh){ #----- Load settings for this variable.----------------------------------------------# - thisbar = barplotdbh[[v]] + thisbar = tspftdbh[[v]] vnam = thisbar$vnam description = thisbar$desc unit = thisbar$unit stacked = thisbar$stack - plotit = thisbar$plt + plotit = thisbar$bar.plot plog = thisbar$plog if (plog){ xylog = "y" @@ -2513,7 +2761,7 @@ for (place in myplaces){ #---------------------------------------------------------------------------------# # Retrieve the variable, and keep only the part that is usable. # #---------------------------------------------------------------------------------# - thisvnam = datum[[vnam]][monbplot,,] + thisvnam = szpft[[vnam]][monbplot,,] thisvnam = thisvnam [,,pftuse] thisvnam = thisvnam [,-(ndbh+1),] @@ -2539,7 +2787,7 @@ for (place in myplaces){ #---------------------------------------------------------------------------------# # Check if the directory exists. If not, create it. # #---------------------------------------------------------------------------------# - barplotdir = paste(outpref,"barplotdbh",sep="/") + barplotdir = paste(outpref,"barplot_dbh",sep="/") if (! file.exists(barplotdir)) dir.create(barplotdir) outdir = paste(barplotdir,vnam,sep="/") if (! file.exists(outdir)) dir.create(outdir) @@ -2592,14 +2840,21 @@ for (place in myplaces){ barplot(height=t(thisvnam[m,,]),names.arg=dbhnames[1:ndbh],width=1.0 ,main=letitre,xlab=lexlab,ylab=leylab,ylim=ylimit,legend.text=FALSE ,beside=(! stacked),col=pftcol.use,log=xylog - ,border="gray23",xpd=FALSE,cex.main=cex.main) + ,border="grey23",xpd=FALSE,cex.main=cex.main) if (plotgrid & (! stacked)){ xgrid=0.5+(1:ndbh)*(1+npftuse) - abline(v=xgrid,col="gray46",lty="solid") + abline(v=xgrid,col="grey46",lty="solid") }#end if box() - legend(x="topleft",inset=inset,legend=pftname.use,fill=pftcol.use - ,ncol=1,title="PFT",cex=1.0,bg="white") + legend( x = "topleft" + , inset = inset + , legend = pftname.use + , fill = pftcol.use + , ncol = min(3,pretty.box(n.selpft)$ncol) + , title = expression(bold("Plant functional type")) + , cex = 1.0 + , bg = "white" + )#end legend #---------------------------------------------------------------------------# @@ -2613,6 +2868,7 @@ for (place in myplaces){ }else{ dev.off() }#end if + dummy = clean.tmp() #---------------------------------------------------------------------------# } #end for outform #------------------------------------------------------------------------------# @@ -2630,13 +2886,13 @@ for (place in myplaces){ #---------------------------------------------------------------------------------------# # Plot the 3-D size and age structure of light level. # #---------------------------------------------------------------------------------------# - for (v in 1:npsas){ + for (v in 1:ntspftdbh){ #----- Retrieve variable information from the list. ---------------------------------# - thissas = sasplot[[v]] + thissas = tspftdbh[[v]] vnam = thissas$vnam description = thissas$desc - unit = thissas$unit - plotit = thissas$plt + unit = thissas$i.unit + plotit = thissas$sas #----- If this variable is to be plotted, then go through this if block. ------------# if (plotit){ @@ -2652,10 +2908,10 @@ for (place in myplaces){ if (! file.exists(outdir)) dir.create(outdir) #----- Load this list into "thislist". -------------------------------------------# - varco = datum[[vnam]] + varco = cohort[[vnam]] - for (ww in names(datum$ageco)){ + for (ww in names(cohort$age)){ #----- Find which year we are plotting. ---------------------------------------# cmonth = substring(ww,7,8) @@ -2664,11 +2920,11 @@ for (place in myplaces){ yy = as.numeric(thisyear) #----- Retrieve variable list, age, DBH, and PFT for this year. ---------------# - ageww = datum$ageco[[ww]] - dbhww = datum$dbhco[[ww]] - pftww = datum$pftco[[ww]] - varww = datum$varco[[ww]] - popww = datum$nplantco[[ww]] * datum$areaco[[ww]] + ageww = cohort$age [[ww]] + dbhww = cohort$dbh [[ww]] + pftww = cohort$pft [[ww]] + varww = varco [[ww]] + popww = cohort$nplant[[ww]] * cohort$area[[ww]] #------------------------------------------------------------------------------# # We only plot the SAS figures when the polygon is not an absolute desert. # @@ -2679,11 +2935,11 @@ for (place in myplaces){ # the global range, otherwise, simply use the range for this year. # #---------------------------------------------------------------------------# if (sasfixlimits){ - xlimit = range(datum$ageco , na.rm=TRUE) - ylimit = range(datum$dbhco , na.rm=TRUE) - zlimit = range(datum$varco , na.rm=TRUE) - popmin = min (datum$nplantco * datum$areaco, na.rm=TRUE) - popmax = max (datum$nplantco * datum$areaco, na.rm=TRUE) + xlimit = range(unlist(cohort$age) , na.rm=TRUE) + ylimit = range(unlist(cohort$dbh) , na.rm=TRUE) + zlimit = range(unlist(varco) , na.rm=TRUE) + popmin = min (unlist(cohort$nplant * cohort$area), na.rm=TRUE) + popmax = max (unlist(cohort$nplant * cohort$area), na.rm=TRUE) }else{ xlimit = range(ageww ,na.rm=TRUE) ylimit = range(dbhww ,na.rm=TRUE) @@ -2730,7 +2986,7 @@ for (place in myplaces){ cexww = rep(cexww,each=3) colww = pft$colour[pftww] - pftin = sort(unique(pftco[[ww]])) + pftin = sort(unique(cohort$pft[[ww]])) colleg = pft$colour[pftin] pftleg = pft$name [pftin] @@ -2766,11 +3022,18 @@ for (place in myplaces){ ,main=letitre,cex.main=0.7) #----- Second plot, the actual data (aka my lollipop trees). ------------# lines (trans3d(x=ageww,y=dbhww,z=varww,pmat=pout),type="l" - ,col="gray29",lwd=2) + ,col="grey29",lwd=2) points(trans3d(x=ageww,y=dbhww,z=varww,pmat=pout),type="p" ,pch=pchww,col=colww,cex=cexww) - legend(x="bottomright",inset=inset,legend=pftleg,fill=colleg - ,ncol=1,bg="white",cex=0.9) + legend( x = "bottomright" + , inset = inset + , legend = pftleg + , fill = colleg + , ncol = min(2,pretty.box(n.selpft)$ncol) + , title = expression(bold("PFT")) + , bg = "white" + , cex = 0.9 + )#end legend if (outform[o] == "x11"){ @@ -2779,6 +3042,7 @@ for (place in myplaces){ }else{ dev.off() }#end if + dummy = clean.tmp() } #end for outform }#end if is.na(varww) }#end for nameco diff --git a/ED/Template/epost.sh b/ED/Template/epost.sh index ae413b822..e7721f4f9 100755 --- a/ED/Template/epost.sh +++ b/ED/Template/epost.sh @@ -40,6 +40,9 @@ idbhtype=2 # Type of DBH class #------------------------------------------------------------------------------------------# # Which scripts to run. # # # +# - read_monthly.r - This reads the monthly mean files (results can then be used for # +# plot_monthly.r, plot_yearly.r, and others, but it doesn't plot any- # +# thing.) # # - plot_monthly.r - This creates several plots based on the monthly mean output. # # - plot_yearly.r - This creates plots with year time series. # # - plot_ycomp.r - This creates yearly comparisons based on the monthly mean output. # @@ -335,7 +338,7 @@ do # Set up the time and output variables according to the script. # #------------------------------------------------------------------------------------# case ${script} in - plot_monthly.r|plot_yearly.r|plot_ycomp.r|plot_census.r) + read_monthly.r|plot_monthly.r|plot_yearly.r|plot_ycomp.r|plot_census.r) #---------------------------------------------------------------------------------# # Scripts that are based on monthly means. The set up is the same, the only # # difference is in the output names. # @@ -392,6 +395,12 @@ do # Define the job name, and the names of the output files. # #---------------------------------------------------------------------------------# case ${script} in + read_monthly.r) + epostout='rmon_epost.out' + epostsh='rmon_epost.sh' + epostlsf='rmon_epost.lsf' + epostjob='eb-rmon-'${polyname} + ;; plot_monthly.r) epostout='pmon_epost.out' epostsh='pmon_epost.sh' diff --git a/ED/Template/joborder.txt b/ED/Template/joborder.txt index 8b5a4575d..f2d40d794 100644 --- a/ED/Template/joborder.txt +++ b/ED/Template/joborder.txt @@ -10,7 +10,7 @@ santarem_km83 s83 -54.971 -3.018 1200 01 01 00 rebio_jaru rja -61.931 -10.083 1200 01 01 0000 1700 01 01 0000 6 0 0 2 2 0.800 0.100 C 2 6 14 0 moorcroft_6100b Rebio_Jaru 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 pedegigante pdg -47.650 -21.619 1200 01 01 0000 1700 01 01 0000 6 0 0 2 2 0.850 0.030 F 1 90 14 0 moorcroft_6100b Pe-de-Gigante 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 paracou gyf -52.912 5.282 1200 01 01 0000 1700 01 01 0000 6 0 0 2 6 0.562 0.345 C 2 6 14 0 moorcroft_6100b Paracou 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -bananal ban -50.159 -9.824 1200 01 01 0000 1700 01 01 0000 6 0 0 2 9 0.240 0.370 C 1 90 14 0 moorcroft_6100b Bananal 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +bananal ban -50.159 -9.824 1200 01 01 0000 1700 01 01 0000 6 0 0 2 8 0.240 0.370 C 1 90 14 0 moorcroft_6100b Bananal 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 petrolina pnz -40.370 -9.165 1200 01 01 0000 1700 01 01 0000 6 0 0 2 2 0.821 0.052 C 2 15 14 0 moorcroft_6100b Petrolina 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 fazendans fns -62.357 -10.762 1200 01 01 0000 1700 01 01 0000 6 0 0 2 2 0.800 0.100 G 1 90 14 0 moorcroft_6100b Fazenda_Nossa_Senhora 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 santarem_km77 s77 -54.537 -3.012 1200 01 01 0000 1700 01 01 0000 6 0 0 2 17 -1.000 -1.000 H 1 90 14 0 moorcroft_6100b Santarem_Km77 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 diff --git a/ED/Template/run_sitter.sh b/ED/Template/run_sitter.sh new file mode 100755 index 000000000..4a72e591f --- /dev/null +++ b/ED/Template/run_sitter.sh @@ -0,0 +1,1985 @@ +#!/bin/bash +source $HOME/.bashrc + +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +# MAIN SETTINGS: # +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# + + +#----- Main path, you must actually type the path in case you add to chron. ---------------# +here='xxxxxxxxxxxxxxxxxxxxx' +if [ ${here} == 'xxxxxxxxxxxxxxxxxxxxx' ] +then + echo ' You must set up variable here before using run_sitter.sh!!!' + exit 99 +fi +#------------------------------------------------------------------------------------------# + + +#----- Path with some utilities for run_sitter.sh (this script). --------------------------# +situtils="${here}/sit_utils" +#------------------------------------------------------------------------------------------# + + +#----- Where the output is. ---------------------------------------------------------------# +there=${here} +#------------------------------------------------------------------------------------------# + +#----- User name, usually set by `whoami` so you don't need to change it. -----------------# +moi=`whoami` +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# Main actions. # +# printevery -- when looping through jobs, print something on screen every printevery # +# polygons # +# bigloop -- Go through the big loop (0 - no, 1 - yes) # +# fixqueue -- 0: perform the full queue management) # +# 1: simply fix the queues on joborder. # +#------------------------------------------------------------------------------------------# +printevery=1 +bigloop=1 +fixqueue=0 +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# waitpot -- Should polygons wait until some previous run is done? ('n' will start them # +# right away). # +# potveg -- Path where to look for initialisation files in case waitpot = 'y'. # +#------------------------------------------------------------------------------------------# +waitpot='n' +potveg='/n/moorcroft_data/data/ed2_data/restarts_sci_006/potveg' +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# copyrestart -- Should I copy the latest history file somewhere else ('y'/'N'). # +# restart -- Path to where to copy restart files in case copyrestart = 'y'. # +#------------------------------------------------------------------------------------------# +copyrestart='n' +restart='/n/moorcroft_data/mlongo/ed2_data/restarts_XXX' +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# Useful files to check the simulation progress: # +# joborder -- File with the job instructions and model settings # +# lastcheck -- File with the report from last time # +# outcheck -- File with the current report # +# situation -- Situation of the run # +#------------------------------------------------------------------------------------------# +joborder="${here}/joborder.txt" +lastcheck="${situtils}/lastcheck.txt" +outcheck="${situtils}/mycheck.txt" +situation="${situtils}/situation.txt" +#------------------------------------------------------------------------------------------# + + +#------ Calculator. -----------------------------------------------------------------------# +ccc='/n/Moorcroft_Lab/Users/mlongo/util/calc.sh' # Calculator +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# Maximum load in each queue. # +# - full: maximum number of jobs in the queue # +# - umax: maximum number of jobs in the queue that I am allowed to run # +# - pmax: maximum number of pending jobs that we may leave # +#------------------------------------------------------------------------------------------# +#------ Queue: moorcroft2a. ---------------------------------------------------------------# +m2afull=96 +m2aumax=80 +#------ Queue: moorcroft2b. ---------------------------------------------------------------# +m2bfull=88 +m2bumax=88 +#------ Queue: moorcroft2c. ---------------------------------------------------------------# +m2cfull=64 +m2cumax=64 +#------ Queue: moorcroft_6100a. -----------------------------------------------------------# +a61full=48 +a61umax=36 +#------ Queue: moorcroft_6100b. -----------------------------------------------------------# +b61full=480 +b61umax=380 +#------ Queue: wofsy. ---------------------------------------------------------------------# +wsyfull=96 +wsyumax=24 +#------ Queue: unrestricted_serial. -------------------------------------------------------# +usefull=80 +useumax=80 +#------ Queue: unrestricted_parallel. -----------------------------------------------------# +upapmax=0 +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# E-mail options (normally only the first three options may require changes. # +# email1day -- Should I e-mail once a day (1) or every time I run (0)? # +# recipient -- To which e-mail should I send the update? # +# plotstatus -- Plot the current status of the run (you will need to edit the R script # +# for each simulation). 0: no; 1: yes # +# emailbody -- File that will contain the e-mail. # +# headfile -- File with header # +# tailfile -- File with "bye" # +# recefile -- File with the recent activity # +# statfile -- File with the current status # +# queuefile -- File with queue status # +# pendfile -- File with pending status # +# email1day -- Reminder so the script knows whether an e-mail has been sent or not. # +#------------------------------------------------------------------------------------------# +email1day=1 +recipient='xxxxxx@xxxx.com' +plotstatus='n' +emailbody="${situtils}/email.txt" +headfile="${situtils}/head.txt" +tailfile="${situtils}/tail.txt" +recefile="${situtils}/rece.txt" +statfile="${situtils}/stat.txt" +queuefile="${situtils}/queue.txt" +pendfile=${here}'/pending.txt' +emailday=${here}'/emailday.txt' +if [ ${recipient} == "xxxxxx@xxxx.com" ] +then + echo 'You must specify the e-mail (variable recipient)' + stop 92 +fi +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Names for the special unrestricted_parallel scripts. # +#------------------------------------------------------------------------------------------# +callunpa=${here}'/callunpa.sh' +unparun=${here}'/unparun.sh' +#------------------------------------------------------------------------------------------# + + + +#----- Unique job description for these simulations (it really must be unique). -----------# +desc=`basename ${here}` +#------------------------------------------------------------------------------------------# + + + + + +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +# THINK TWICE BEFORE CHANGING ANYTHING BEYOND THIS POINT. # +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# + + + + + +#----- Check whether run_sitter.sh is still running or not. If it is, exit. --------------# +if [ -s ${here}/run_sitter.lock ] +then + exit +else + echo 'I am going to check your run.' > ${here}/run_sitter.lock +fi +#------------------------------------------------------------------------------------------# + + + +#----- Determine the number of polygons to check. -----------------------------------------# +let npolys=`wc -l ${joborder} | awk '{print $1 }'`-3 +echo 'Number of polygons: '${npolys}'...' +#------------------------------------------------------------------------------------------# + + + + +#------------------------------------------------------------------------------------------# +# Reset most counters. # +#------------------------------------------------------------------------------------------# +ff=0 # Polygon counter. +nstart=0 # Number of new polygons that initialised +nmetmiss=0 # Number of new polygons that crashed due to missing met driver +nstopped=0 # Number of new polygons that crashed due to unknown reason +ncrashed=0 # Number of new polygons that crashed due to numeric instability +newststate=0 # Number of new polygons at steady state +newextinct=0 # Number of new extinct polygons +nresubmit=0 # Number of long_serial polygons that were submitted again. +deathrow="" # List of polygons to be killed (they went extinct or reached steady state) +#------------------------------------------------------------------------------------------# + + + +if [ ${bigloop} -ne 0 ] +then + #---------------------------------------------------------------------------------------# + # Eliminate the latest check, and move the most recent check to the latest check, # + # and start the new check. # + #---------------------------------------------------------------------------------------# + rm -f ${lastcheck} + mv ${outcheck} ${lastcheck} + touch ${outcheck} + rm -f ${situation} + touch ${situation} + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Loop over all polygons. # + #---------------------------------------------------------------------------------------# + while [ ${ff} -lt ${npolys} ] + do + let ff=${ff}+1 + let line=${ff}+3 + let rem=${ff}%${printevery} + + #------------------------------------------------------------------------------------# + # Plot a banner to entertain the user. # + #------------------------------------------------------------------------------------# + if [ ${rem} -eq 0 -o ${ff} -eq ${npolys} ] + then + echo ' - Checked '${ff}' polygons so far...' + fi + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Read the polyth line of the polygon list. There must be smarter ways of do- # + # ing this, but this works. Here we obtain the polygon name, and its longitude and # + # latitude. # + #------------------------------------------------------------------------------------# + oi=`head -${line} ${lonlat} | tail -1` + polyname=`echo ${oi} | awk '{print $1 }'` + polyiata=`echo ${oi} | awk '{print $2 }'` + polylon=`echo ${oi} | awk '{print $3 }'` + polylat=`echo ${oi} | awk '{print $4 }'` + yeara=`echo ${oi} | awk '{print $5 }'` + montha=`echo ${oi} | awk '{print $6 }'` + datea=`echo ${oi} | awk '{print $7 }'` + timea=`echo ${oi} | awk '{print $8 }'` + yearz=`echo ${oi} | awk '{print $9 }'` + monthz=`echo ${oi} | awk '{print $10}'` + datez=`echo ${oi} | awk '{print $11}'` + timez=`echo ${oi} | awk '{print $12}'` + initmode=`echo ${oi} | awk '{print $13}'` + iscenario=`echo ${oi} | awk '{print $14}'` + isizepft=`echo ${oi} | awk '{print $15}'` + polyisoil=`echo ${oi} | awk '{print $16}'` + polyntext=`echo ${oi} | awk '{print $17}'` + polysand=`echo ${oi} | awk '{print $18}'` + polyclay=`echo ${oi} | awk '{print $19}'` + polydepth=`echo ${oi} | awk '{print $20}'` + polysoilbc=`echo ${oi} | awk '{print $21}'` + polysldrain=`echo ${oi} | awk '{print $22}'` + polycol=`echo ${oi} | awk '{print $23}'` + slzres=`echo ${oi} | awk '{print $24}'` + queue=`echo ${oi} | awk '{print $25}'` + metdriver=`echo ${oi} | awk '{print $26}'` + dtlsm=`echo ${oi} | awk '{print $27}'` + vmfactc3=`echo ${oi} | awk '{print $28}'` + vmfactc4=`echo ${oi} | awk '{print $29}'` + mphototrc3=`echo ${oi} | awk '{print $30}'` + mphototec3=`echo ${oi} | awk '{print $31}'` + mphotoc4=`echo ${oi} | awk '{print $32}'` + bphotoblc3=`echo ${oi} | awk '{print $33}'` + bphotonlc3=`echo ${oi} | awk '{print $34}'` + bphotoc4=`echo ${oi} | awk '{print $35}'` + kwgrass=`echo ${oi} | awk '{print $36}'` + kwtree=`echo ${oi} | awk '{print $37}'` + gammac3=`echo ${oi} | awk '{print $38}'` + gammac4=`echo ${oi} | awk '{print $39}'` + d0grass=`echo ${oi} | awk '{print $40}'` + d0tree=`echo ${oi} | awk '{print $41}'` + alphac3=`echo ${oi} | awk '{print $42}'` + alphac4=`echo ${oi} | awk '{print $43}'` + klowco2=`echo ${oi} | awk '{print $44}'` + decomp=`echo ${oi} | awk '{print $45}'` + rrffact=`echo ${oi} | awk '{print $46}'` + growthresp=`echo ${oi} | awk '{print $47}'` + lwidthgrass=`echo ${oi} | awk '{print $48}'` + lwidthbltree=`echo ${oi} | awk '{print $49}'` + lwidthnltree=`echo ${oi} | awk '{print $50}'` + q10c3=`echo ${oi} | awk '{print $51}'` + q10c4=`echo ${oi} | awk '{print $52}'` + h2olimit=`echo ${oi} | awk '{print $53}'` + imortscheme=`echo ${oi} | awk '{print $54}'` + ddmortconst=`echo ${oi} | awk '{print $55}'` + isfclyrm=`echo ${oi} | awk '{print $56}'` + icanturb=`echo ${oi} | awk '{print $57}'` + ubmin=`echo ${oi} | awk '{print $58}'` + ugbmin=`echo ${oi} | awk '{print $59}'` + ustmin=`echo ${oi} | awk '{print $60}'` + gamm=`echo ${oi} | awk '{print $61}'` + gamh=`echo ${oi} | awk '{print $62}'` + tprandtl=`echo ${oi} | awk '{print $63}'` + ribmax=`echo ${oi} | awk '{print $64}'` + atmco2=`echo ${oi} | awk '{print $65}'` + thcrit=`echo ${oi} | awk '{print $66}'` + smfire=`echo ${oi} | awk '{print $67}'` + ifire=`echo ${oi} | awk '{print $68}'` + fireparm=`echo ${oi} | awk '{print $69}'` + ipercol=`echo ${oi} | awk '{print $70}'` + runoff=`echo ${oi} | awk '{print $71}'` + imetrad=`echo ${oi} | awk '{print $72}'` + ibranch=`echo ${oi} | awk '{print $73}'` + icanrad=`echo ${oi} | awk '{print $74}'` + crown=`echo ${oi} | awk '{print $75}'` + ltransvis=`echo ${oi} | awk '{print $76}'` + lreflectvis=`echo ${oi} | awk '{print $77}'` + ltransnir=`echo ${oi} | awk '{print $78}'` + lreflectnir=`echo ${oi} | awk '{print $79}'` + orienttree=`echo ${oi} | awk '{print $80}'` + orientgrass=`echo ${oi} | awk '{print $81}'` + clumptree=`echo ${oi} | awk '{print $82}'` + clumpgrass=`echo ${oi} | awk '{print $83}'` + ivegtdyn=`echo ${oi} | awk '{print $84}'` + igndvap=`echo ${oi} | awk '{print $85}'` + iphen=`echo ${oi} | awk '{print $86}'` + iallom=`echo ${oi} | awk '{print $87}'` + ibigleaf=`echo ${oi} | awk '{print $88}'` + irepro=`echo ${oi} | awk '{print $89}'` + treefall=`echo ${oi} | awk '{print $90}'` + #------------------------------------------------------------------------------------# + + + #----- Define the job name. ---------------------------------------------------------# + jobname="${desc}-${polyname}" + #------------------------------------------------------------------------------------# + + + #----- Update the R script that controls the run. -----------------------------------# + /bin/rm -f ${here}/${polyname}/whichrun.r + /bin/cp -f ${here}/Template/whichrun.r ${here}/${polyname}/whichrun.r + sed -i s@thispoly@${polyname}@g ${here}/${polyname}/whichrun.r + sed -i s@thisqueue@${queue}@g ${here}/${polyname}/whichrun.r + sed -i s@pathhere@${here}@g ${here}/${polyname}/whichrun.r + sed -i s@paththere@${here}@g ${here}/${polyname}/whichrun.r + sed -i s@thisfirst@${yr1sthisto}@g ${here}/${polyname}/whichrun.r + sed -i s@thisdthisto@${dthisto}@g ${here}/${polyname}/whichrun.r + sed -i s@thismetyeara@${metyeara}@g ${here}/${polyname}/whichrun.r + sed -i s@thismetcycle@${metcycle}@g ${here}/${polyname}/whichrun.r + sed -i s@thisststcrit@${ststcrit}@g ${here}/${polyname}/whichrun.r + sed -i s@thisncycle@${ncycle}@g ${here}/${polyname}/whichrun.r + sed -i s@thisyeara@${yeara}@g ${here}/${polyname}/whichrun.r + sed -i s@thismontha@${montha}@g ${here}/${polyname}/whichrun.r + sed -i s@thisdatea@${datea}@g ${here}/${polyname}/whichrun.r + sed -i s@thistimea@${timea}@g ${here}/${polyname}/whichrun.r + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Retrie ve the information on statusrun.txt because it may tell whether the run # + # was in steady state or all PFTs went extinct. These will never start again. # + #------------------------------------------------------------------------------------# + statrun=${here}/${polyname}/statusrun.txt + if [ -s ${statrun} ] + then + yearh=`cat ${statrun} | awk '{print $2}'` + monthh=`cat ${statrun} | awk '{print $3}'` + dateh=`cat ${statrun} | awk '{print $4}'` + timeh=`cat ${statrun} | awk '{print $5}'` + runt=`cat ${statrun} | awk '{print $6}'` + agb=`cat ${statrun} | awk '{print $7}'` + bsa=`cat ${statrun} | awk '{print $8}'` + lai=`cat ${statrun} | awk '{print $9}'` + else + yearh=${yeara} + monthh=${montha} + dateh=${datea} + timeh=${timea} + runt='INITIAL' + agb='NA' + bsa='NA' + lai='NA' + fi + #------------------------------------------------------------------------------------# + + + + + #------------------------------------------------------------------------------------# + # We only check those polygons that may be running, so the check doesn't take too # + # long. Once a polygon has reached a steady state / gone extinct / crashed (oh # + # well, that happens unfortunately), then its status should remain the same. # + #------------------------------------------------------------------------------------# + if [ ${runt} != 'EXTINCT' ] && [ ${runt} != 'STSTATE' ] && [ ${runt} != 'THE_END' ] + then + #----- Call R to check status. ---------------------------------------------------# + R CMD BATCH ${here}/${polyname}/whichrun.r ${here}/${polyname}/outwhich.txt + year=`cat ${statrun} | awk '{print $2}'` + month=`cat ${statrun} | awk '{print $3}'` + day=`cat ${statrun} | awk '{print $4}'` + hhmm=`cat ${statrun} | awk '{print $5}'` + runt=`cat ${statrun} | awk '{print $6}'` + agb=`cat ${statrun} | awk '{print $7}'` + bsa=`cat ${statrun} | awk '{print $8}'` + lai=`cat ${statrun} | awk '{print $9}'` + fi + #------------------------------------------------------------------------------------# + + + + + #------------------------------------------------------------------------------------# + # In case the polygon is extinct or it has crashed, we must do some stuff... # + #------------------------------------------------------------------------------------# + if [ ${runt} == 'CRASHED' ] || [ ${runt} == 'STOPPED' ] || [ ${runt} == 'METMISS' ] + then + + #---------------------------------------------------------------------------------# + # Find out the tolerance used in the unfortunate run, then submit the job # + # with a tolerance 10 times more strict. # + #---------------------------------------------------------------------------------# + ED2IN=${here}'/'${polyname}'/ED2IN' + #----- Save the tolerance before we delete the file. -----------------------------# + toler=`grep NL%RK4_TOLERANCE ${ED2IN} | awk '{print $3}'` + if [ 'x'${toler} == 'xmytoler' -o 'x'${toler} == 'x' ] + then + toler=0.01 + fi # [ 'x'${oldtol} == 'xmytoler' -o 'x'${oldtol} == 'x' ] + #---------------------------------------------------------------------------------# + + + if [ ${runt} == 'CRASHED' ] + then + echo ' :-( Polygon '${polyname}' has crashed !!!' + let ncrashed=${ncrashed}+1 + #----- Make the tolerance 10 times smaller. -----------------------------------# + toler=`${ccc} ${toler}/10` + echo ' - New tolerance = '${toler} + /bin/mv ${here}/${polyname}/serial_out.out ${here}/${polyname}/crashed_out.out + /bin/mv ${here}/${polyname}/serial_out.err ${here}/${polyname}/crashed_out.err + elif [ ${runt} == 'METMISS' ] + then + let nmetmiss=${nmetmiss}+1 + echo ' :-{ Polygon '${polyname}' stopped due to missing met driver !!!' + /bin/mv ${here}/${polyname}/serial_out.out ${here}/${polyname}/metmiss_out.out + /bin/mv ${here}/${polyname}/serial_out.err ${here}/${polyname}/metmiss_out.err + elif [ ${runt} == 'STOPPED' ] + then + let nstopped=${nstopped}+1 + echo ' o_0 Polygon '${polyname}' mysteriously stopped!!!' + /bin/mv ${here}/${polyname}/serial_out.out ${here}/${polyname}/stopped_out.out + /bin/mv ${here}/${polyname}/serial_out.err ${here}/${polyname}/stopped_out.err + fi + #---------------------------------------------------------------------------------# + + if [ ${toler} != '0.0000010' -a ${toler} != '0.0000001' -a ${toler} != '00' ] + then + + #----- Re-generate ED2IN. -----------------------------------------------------# + rm -f ${ED2IN} + rm -f ${here}/${polyname}/serial_lsf.out + + #----- Copy the Template to the right directory. ------------------------------# + cp ${here}/Template/ED2IN ${ED2IN} + + + #------------------------------------------------------------------------------# + # Determine which PFTs to use. # + #------------------------------------------------------------------------------# + lonint=${polylon/.*} + latint=${polylat/.*} + pfts='1,2,3,4,16' + #------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------# + # Find the biometric files. This has been checked in spawn_poly.sh so they # + # are correct. Add a dummy name in case this is not supposed to be a biomass # + # initialisation run. # + #------------------------------------------------------------------------------# + case ${isizepft} in + 0) + #----- Frankeinstein's under storey. ---------------------------------------# + thisbiomin="${bioinit}/${polyiata}_default." + ;; + 1) + #----- No under storey. ----------------------------------------------------# + thisbiomin="${bioinit}/${polyiata}_nounder." + ;; + 2) + #----- Same as default, but with only one grass and one tree. --------------# + thisbiomin="${bioinit}/${polyiata}_twopft." + ;; + *) + thisbiomin="${bioinit}/${polyiata}_nothing." + ;; + esac + #------------------------------------------------------------------------------# + + + + + #----- Check whether to use SFILIN as restart or history. ---------------------# + if [ ${runt} == 'INITIAL' ] && [ ${initmode} -eq 6 ] + then + thissfilin=${thisbiomin} + else + thissfilin=${there}/${polyname}/histo/${polyname} + fi + #---------------------------------------------------------------------------------------# + + + #----- Update the polygon information on ED2IN. -------------------------------# + sed -i s@paththere@${there}@g ${ED2IN} + sed -i s@myyeara@${thisyeara}@g ${ED2IN} + sed -i s@mymontha@${montha}@g ${ED2IN} + sed -i s@mydatea@${datea}@g ${ED2IN} + sed -i s@mytimea@${timea}@g ${ED2IN} + sed -i s@myyearz@${thisyearz}@g ${ED2IN} + sed -i s@mymonthz@${monthz}@g ${ED2IN} + sed -i s@mydatez@${datez}@g ${ED2IN} + sed -i s@mytimez@${timez}@g ${ED2IN} + sed -i s@mydtlsm@${dtlsm}@g ${ED2IN} + sed -i s@thispoly@${polyname}@g ${ED2IN} + sed -i s@plonflag@${polylon}@g ${ED2IN} + sed -i s@platflag@${polylat}@g ${ED2IN} + sed -i s@timehhhh@${time}@g ${ED2IN} + sed -i s@datehhhh@${date}@g ${ED2IN} + sed -i s@monthhhh@${month}@g ${ED2IN} + sed -i s@yearhhhh@${year}@g ${ED2IN} + sed -i s@myinitmode@${initmode}@g ${ED2IN} + sed -i s@mysfilin@${thissfilin}@g ${ED2IN} + sed -i s@mytrees@${pfts}@g ${ED2IN} + sed -i s@mycrop@${crop}@g ${ED2IN} + sed -i s@myplantation@${plantation}@g ${ED2IN} + sed -i s@myiphen@${iphen}@g ${ED2IN} + sed -i s@myallom@${iallom}@g ${ED2IN} + sed -i s@myisoilflg@${polyisoil}@g ${ED2IN} + sed -i s@mynslcon@${polyntext}@g ${ED2IN} + sed -i s@myslxsand@${polysand}@g ${ED2IN} + sed -i s@myslxclay@${polyclay}@g ${ED2IN} + sed -i s@mysoilbc@${polysoilbc}@g ${ED2IN} + sed -i s@mysldrain@${polysldrain}@g ${ED2IN} + sed -i s@mysoilcol@${polycol}@g ${ED2IN} + sed -i s@mynzg@${polynzg}@g ${ED2IN} + sed -i s@mymetdriverdb@${metdriverdb}@g ${ED2IN} + sed -i s@mymetcyc1@${metcyc1}@g ${ED2IN} + sed -i s@mymetcycf@${metcycf}@g ${ED2IN} + sed -i s@mytoler@${toler}@g ${ED2IN} + sed -i s@RUNFLAG@HISTORY@g ${ED2IN} + sed -i s@myvmfactc3@${vmfactc3}@g ${ED2IN} + sed -i s@myvmfactc4@${vmfactc4}@g ${ED2IN} + sed -i s@mymphototrc3@${mphototrc3}@g ${ED2IN} + sed -i s@mymphototec3@${mphototec3}@g ${ED2IN} + sed -i s@mymphotoc4@${mphotoc4}@g ${ED2IN} + sed -i s@mybphotoblc3@${bphotoblc3}@g ${ED2IN} + sed -i s@mybphotonlc3@${bphotonlc3}@g ${ED2IN} + sed -i s@mybphotoc4@${bphotoc4}@g ${ED2IN} + sed -i s@mykwgrass@${kwgrass}@g ${ED2IN} + sed -i s@mykwtree@${kwtree}@g ${ED2IN} + sed -i s@mygammac3@${gammac3}@g ${ED2IN} + sed -i s@mygammac4@${gammac4}@g ${ED2IN} + sed -i s@myd0grass@${d0grass}@g ${ED2IN} + sed -i s@myd0tree@${d0tree}@g ${ED2IN} + sed -i s@myalphac3@${alphac3}@g ${ED2IN} + sed -i s@myalphac4@${alphac4}@g ${ED2IN} + sed -i s@myklowco2@${klowco2}@g ${ED2IN} + sed -i s@mydecomp@${decomp}@g ${ED2IN} + sed -i s@myrrffact@${rrffact}@g ${ED2IN} + sed -i s@mygrowthresp@${growthresp}@g ${ED2IN} + sed -i s@mylwidthgrass@${lwidthgrass}@g ${ED2IN} + sed -i s@mylwidthbltree@${lwidthbltree}@g ${ED2IN} + sed -i s@mylwidthnltree@${lwidthnltree}@g ${ED2IN} + sed -i s@myq10c3@${q10c3}@g ${ED2IN} + sed -i s@myq10c4@${q10c4}@g ${ED2IN} + sed -i s@myh2olimit@${h2olimit}@g ${ED2IN} + sed -i s@mymortscheme@${imortscheme}@g ${ED2IN} + sed -i s@myddmortconst@${ddmortconst}@g ${ED2IN} + sed -i s@mysfclyrm@${isfclyrm}@g ${ED2IN} + sed -i s@myicanturb@${icanturb}@g ${ED2IN} + sed -i s@myatmco2@${atmco2}@g ${ED2IN} + sed -i s@mythcrit@${thcrit}@g ${ED2IN} + sed -i s@mysmfire@${smfire}@g ${ED2IN} + sed -i s@myfire@${ifire}@g ${ED2IN} + sed -i s@myfuel@${fireparm}@g ${ED2IN} + sed -i s@mymetavg@${imetavg}@g ${ED2IN} + sed -i s@mypercol@${ipercol}@g ${ED2IN} + sed -i s@myrunoff@${runoff}@g ${ED2IN} + sed -i s@mymetrad@${imetrad}@g ${ED2IN} + sed -i s@mybranch@${ibranch}@g ${ED2IN} + sed -i s@mycanrad@${icanrad}@g ${ED2IN} + sed -i s@mycrown@${crown}@g ${ED2IN} + sed -i s@myltransvis@${ltransvis}@g ${ED2IN} + sed -i s@myltransnir@${ltransnir}@g ${ED2IN} + sed -i s@mylreflectvis@${lreflectvis}@g ${ED2IN} + sed -i s@mylreflectnir@${lreflectnir}@g ${ED2IN} + sed -i s@myorienttree@${orienttree}@g ${ED2IN} + sed -i s@myorientgrass@${orientgrass}@g ${ED2IN} + sed -i s@myclumptree@${clumptree}@g ${ED2IN} + sed -i s@myclumpgrass@${clumpgrass}@g ${ED2IN} + sed -i s@myvegtdyn@${ivegtdyn}@g ${ED2IN} + sed -i s@mybigleaf@${ibigleaf}@g ${ED2IN} + sed -i s@myrepro@${irepro}@g ${ED2IN} + sed -i s@myubmin@${ubmin}@g ${ED2IN} + sed -i s@myugbmin@${ugbmin}@g ${ED2IN} + sed -i s@myustmin@${ustmin}@g ${ED2IN} + sed -i s@mygamm@${gamm}@g ${ED2IN} + sed -i s@mygamh@${gamh}@g ${ED2IN} + sed -i s@mytprandtl@${tprandtl}@g ${ED2IN} + sed -i s@myribmax@${ribmax}@g ${ED2IN} + sed -i s@mygndvap@${igndvap}@g ${ED2IN} + sed -i s@mydtcensus@${dtcensus}@g ${ED2IN} + sed -i s@myyr1stcensus@${yr1stcensus}@g ${ED2IN} + sed -i s@mymon1stcensus@${mon1stcensus}@g ${ED2IN} + sed -i s@myminrecruitdbh@${minrecruitdbh}@g ${ED2IN} + sed -i s@mytreefall@${treefall}@g ${ED2IN} + #------ Soil variables. -------------------------------------------------------# + sed -i s@myslz1@"${polyslz1}"@g ${ED2IN} + sed -i s@myslz2@"${polyslz2}"@g ${ED2IN} + sed -i s@myslz3@"${polyslz3}"@g ${ED2IN} + sed -i s@myslz4@"${polyslz4}"@g ${ED2IN} + sed -i s@myslz5@"${polyslz5}"@g ${ED2IN} + sed -i s@myslz6@"${polyslz6}"@g ${ED2IN} + sed -i s@myslz7@"${polyslz7}"@g ${ED2IN} + sed -i s@myslmstr1@"${polyslm1}"@g ${ED2IN} + sed -i s@myslmstr2@"${polyslm2}"@g ${ED2IN} + sed -i s@myslmstr3@"${polyslm3}"@g ${ED2IN} + sed -i s@myslmstr4@"${polyslm4}"@g ${ED2IN} + sed -i s@myslmstr5@"${polyslm5}"@g ${ED2IN} + sed -i s@myslmstr6@"${polyslm6}"@g ${ED2IN} + sed -i s@myslmstr7@"${polyslm7}"@g ${ED2IN} + sed -i s@mystgoff1@"${polyslt1}"@g ${ED2IN} + sed -i s@mystgoff2@"${polyslt2}"@g ${ED2IN} + sed -i s@mystgoff3@"${polyslt3}"@g ${ED2IN} + sed -i s@mystgoff4@"${polyslt4}"@g ${ED2IN} + sed -i s@mystgoff5@"${polyslt5}"@g ${ED2IN} + sed -i s@mystgoff6@"${polyslt6}"@g ${ED2IN} + sed -i s@mystgoff7@"${polyslt7}"@g ${ED2IN} + #------------------------------------------------------------------------------# + + + + + + + #------------------------------------------------------------------------------# + # A crashed polygon will inevitably go to the long_serial queue. Check # + # whether this is a head of a unrestricted parallel run. If it is, then call # + # this something else, otherwise use the polygon name. In any case, re-write # + # the srun.sh file. # + #------------------------------------------------------------------------------# + srun=${here}'/'${polyname}'/srun.sh' + + unpahead=`bjobs -w -J ${jobname} 2> /dev/null | wc -l` + if [ ${unpahead} -eq 0 ] + then + thisname=${jobname} + else + thisname="app-${thisname}" + fi + #------------------------------------------------------------------------------# + + + + #----- Get the waiting time used before. --------------------------------------# + thiswait=`grep "Sleep time is" ${polyname}/srun.sh | awk '{print $5}'` + #------------------------------------------------------------------------------# + + + #----- Copy the data set again. -----------------------------------------------# + /bin/rm -f ${srun} + /bin/rm -f ${here}/${polyname}/skipper.txt + /bin/cp ${here}/Template/srun.sh ${here}/${polyname}/srun.sh + #------------------------------------------------------------------------------# + + + #----- The new queue is by default the long_serial. ---------------------------# + newqueue='long_serial' + #------------------------------------------------------------------------------# + + + + #----- Change some settings in srun.sh. ---------------------------------------# + sed -i s@"jobname='thisjob'"@"jobname='${thisname}'"@g ${srun} + sed -i s@pathhere@${here}@g ${srun} + sed -i s@paththere@${here}@g ${srun} + sed -i s@thispoly@${polyname}@g ${srun} + sed -i s@thisdesc@${desc}@g ${srun} + sed -i s@thisqueue@${newqueue}@g ${srun} + sed -i s@zzzzzzzz@${wtime}@g ${srun} + sed -i s@myorder@${poly}@g ${srun} + #------------------------------------------------------------------------------# + + else + #----- Give up on this node. --------------------------------------------------# + echo ' :-/ Tolerance is tiny and it still does not work. Giving up...' + runt='THE_END' + #------------------------------------------------------------------------------# + fi # [ ${toler} != '0.0000010' -a ${toler} != '0.0000001' -a ${toler} != '00' ] + #---------------------------------------------------------------------------------# + + elif [ ${runt} == 'THE_END' ] + then + echo ' :-) Polygon '${polyname}' finished !!!' + + elif [ ${runt} == 'EXTINCT' -o ${runt} == 'STSTATE' ] && + [ ${queue} != 'unrestricted_parallel' ] + then + running=`bjobs -w -J ${jobname} 2> /dev/null | grep RUN | wc -l` + if [ ${running} -gt 0 ] + then + deathrow="${deathrow} ${jobname}" + if [ ${runt} == 'EXTINCT' ] + then + let newextinct=${newextinct}+1 + elif [ ${runt} == 'STSTATE' ] + then + let newststate=${newststate}+1 + fi + fi + fi # [ ${runt} == 'CRASHED' ] + #------------------------------------------------------------------------------------# + + + + + #------------------------------------------------------------------------------------# + # Last, we check whether the job is still running or not. In case it is not but # + # it should, update the ED2IN with the latest history and re-submit the job. # + #------------------------------------------------------------------------------------# + if [ ${runt} != 'THE_END' ] && [ ${runt} != 'STSTATE' ] && [ ${runt} != 'EXTINCT' ] + then + if [ ${queue} == 'unrestricted_parallel' ] + then + nlist=`grep ${polyname} ${here}/*/callunpa.sh | wc -l` + if [ ${nlist} -eq 0 ] + then + running=0 + else + j=0 + running=0 + while [ ${j} -lt ${nlist} ] && [ ${running} -eq 0 ] + do + let j=${j}+1 + thisline=`grep ${polyname} ${here}/*/callunpa.sh | head -${j} | tail -1` + parent=`echo ${thisline} | awk '{print substr($1,1,8)}'` + parjob="${desc}-${parent}" + running=`bjobs -w -q ${queue} -J ${parjob} 2> /dev/null | tail -1 | wc -l` + done + fi + else + running=`bjobs -w -J ${jobname} 2> /dev/null | tail -1 | wc -l` + fi + + if [ ${running} -eq 0 ] + then + echo "${polyname} is missing. Re-submitting..." >> ${situation} + + let nresubmit=${nresubmit}+1 + + #------------------------------------------------------------------------------# + # Job was kicked out, submit it again. # + #------------------------------------------------------------------------------# + ED2IN=${here}'/'${polyname}'/ED2IN' + #----- Save the tolerance before we delete the file. --------------------------# + toler=`grep NL%RK4_TOLERANCE ${ED2IN} | awk '{print $3}'` + #------------------------------------------------------------------------------# + # This should never happen, but... # + #------------------------------------------------------------------------------# + if [ 'x'${oldtol} == 'xmytoler' -o 'x'${oldtol} == 'x' ] + then + toler=0.01 + else + toler=${oldtol} + fi # [ 'x'${oldtol} == 'xmytoler' -o 'x'${oldtol} == 'x' ] + #------------------------------------------------------------------------------# + + + #----- Re-generate ED2IN. -----------------------------------------------------# + rm -f ${ED2IN} + rm -f ${here}/${polyname}/serial_out.out + rm -f ${here}/${polyname}/serial_lsf.out + rm -f ${here}/${polyname}/serial_out.err + + #----- Copy the Template to the right directory. ------------------------------# + cp ${here}/Template/ED2IN ${ED2IN} + + #------------------------------------------------------------------------------# + # Determine which PFTs to use. # + #------------------------------------------------------------------------------# + lonint=${polylon/.*} + latint=${polylat/.*} + pfts='1,2,3,4,16' + #------------------------------------------------------------------------------# + + + + + #----- Check whether to use SFILIN as restart or history. ---------------------# + if [ ${runt} == 'INITIAL' ] && [ ${initmode} -eq 6 ] + then + thissfilin=${thisbiomin} + else + thissfilin=${there}/${polyname}/histo/${polyname} + fi + #---------------------------------------------------------------------------------------# + + #----- Update the polygon information on ED2IN. -------------------------------# + sed -i s@paththere@${there}@g ${ED2IN} + sed -i s@myyeara@${thisyeara}@g ${ED2IN} + sed -i s@mymontha@${montha}@g ${ED2IN} + sed -i s@mydatea@${datea}@g ${ED2IN} + sed -i s@mytimea@${timea}@g ${ED2IN} + sed -i s@myyearz@${thisyearz}@g ${ED2IN} + sed -i s@mymonthz@${monthz}@g ${ED2IN} + sed -i s@mydatez@${datez}@g ${ED2IN} + sed -i s@mytimez@${timez}@g ${ED2IN} + sed -i s@mydtlsm@${dtlsm}@g ${ED2IN} + sed -i s@thispoly@${polyname}@g ${ED2IN} + sed -i s@plonflag@${polylon}@g ${ED2IN} + sed -i s@platflag@${polylat}@g ${ED2IN} + sed -i s@timehhhh@${time}@g ${ED2IN} + sed -i s@datehhhh@${date}@g ${ED2IN} + sed -i s@monthhhh@${month}@g ${ED2IN} + sed -i s@yearhhhh@${year}@g ${ED2IN} + sed -i s@myinitmode@${initmode}@g ${ED2IN} + sed -i s@mysfilin@${thissfilin}@g ${ED2IN} + sed -i s@mytrees@${pfts}@g ${ED2IN} + sed -i s@mycrop@${crop}@g ${ED2IN} + sed -i s@myplantation@${plantation}@g ${ED2IN} + sed -i s@myiphen@${iphen}@g ${ED2IN} + sed -i s@myallom@${iallom}@g ${ED2IN} + sed -i s@myisoilflg@${polyisoil}@g ${ED2IN} + sed -i s@mynslcon@${polyntext}@g ${ED2IN} + sed -i s@myslxsand@${polysand}@g ${ED2IN} + sed -i s@myslxclay@${polyclay}@g ${ED2IN} + sed -i s@mysoilbc@${polysoilbc}@g ${ED2IN} + sed -i s@mysldrain@${polysldrain}@g ${ED2IN} + sed -i s@mysoilcol@${polycol}@g ${ED2IN} + sed -i s@mynzg@${polynzg}@g ${ED2IN} + sed -i s@mymetdriverdb@${metdriverdb}@g ${ED2IN} + sed -i s@mymetcyc1@${metcyc1}@g ${ED2IN} + sed -i s@mymetcycf@${metcycf}@g ${ED2IN} + sed -i s@mytoler@${toler}@g ${ED2IN} + sed -i s@myvmfactc3@${vmfactc3}@g ${ED2IN} + sed -i s@myvmfactc4@${vmfactc4}@g ${ED2IN} + sed -i s@mymphototrc3@${mphototrc3}@g ${ED2IN} + sed -i s@mymphototec3@${mphototec3}@g ${ED2IN} + sed -i s@mymphotoc4@${mphotoc4}@g ${ED2IN} + sed -i s@mybphotoblc3@${bphotoblc3}@g ${ED2IN} + sed -i s@mybphotonlc3@${bphotonlc3}@g ${ED2IN} + sed -i s@mybphotoc4@${bphotoc4}@g ${ED2IN} + sed -i s@mykwgrass@${kwgrass}@g ${ED2IN} + sed -i s@mykwtree@${kwtree}@g ${ED2IN} + sed -i s@mygammac3@${gammac3}@g ${ED2IN} + sed -i s@mygammac4@${gammac4}@g ${ED2IN} + sed -i s@myd0grass@${d0grass}@g ${ED2IN} + sed -i s@myd0tree@${d0tree}@g ${ED2IN} + sed -i s@myalphac3@${alphac3}@g ${ED2IN} + sed -i s@myalphac4@${alphac4}@g ${ED2IN} + sed -i s@myklowco2@${klowco2}@g ${ED2IN} + sed -i s@mydecomp@${decomp}@g ${ED2IN} + sed -i s@myrrffact@${rrffact}@g ${ED2IN} + sed -i s@mygrowthresp@${growthresp}@g ${ED2IN} + sed -i s@mylwidthgrass@${lwidthgrass}@g ${ED2IN} + sed -i s@mylwidthbltree@${lwidthbltree}@g ${ED2IN} + sed -i s@mylwidthnltree@${lwidthnltree}@g ${ED2IN} + sed -i s@myq10c3@${q10c3}@g ${ED2IN} + sed -i s@myq10c4@${q10c4}@g ${ED2IN} + sed -i s@myh2olimit@${h2olimit}@g ${ED2IN} + sed -i s@mymortscheme@${imortscheme}@g ${ED2IN} + sed -i s@myddmortconst@${ddmortconst}@g ${ED2IN} + sed -i s@mysfclyrm@${isfclyrm}@g ${ED2IN} + sed -i s@myicanturb@${icanturb}@g ${ED2IN} + sed -i s@myatmco2@${atmco2}@g ${ED2IN} + sed -i s@mythcrit@${thcrit}@g ${ED2IN} + sed -i s@mysmfire@${smfire}@g ${ED2IN} + sed -i s@myfire@${ifire}@g ${ED2IN} + sed -i s@myfuel@${fireparm}@g ${ED2IN} + sed -i s@mymetavg@${imetavg}@g ${ED2IN} + sed -i s@mypercol@${ipercol}@g ${ED2IN} + sed -i s@myrunoff@${runoff}@g ${ED2IN} + sed -i s@mymetrad@${imetrad}@g ${ED2IN} + sed -i s@mybranch@${ibranch}@g ${ED2IN} + sed -i s@mycanrad@${icanrad}@g ${ED2IN} + sed -i s@mycrown@${crown}@g ${ED2IN} + sed -i s@myltransvis@${ltransvis}@g ${ED2IN} + sed -i s@myltransnir@${ltransnir}@g ${ED2IN} + sed -i s@mylreflectvis@${lreflectvis}@g ${ED2IN} + sed -i s@mylreflectnir@${lreflectnir}@g ${ED2IN} + sed -i s@myorienttree@${orienttree}@g ${ED2IN} + sed -i s@myorientgrass@${orientgrass}@g ${ED2IN} + sed -i s@myclumptree@${clumptree}@g ${ED2IN} + sed -i s@myclumpgrass@${clumpgrass}@g ${ED2IN} + sed -i s@myvegtdyn@${ivegtdyn}@g ${ED2IN} + sed -i s@mybigleaf@${ibigleaf}@g ${ED2IN} + sed -i s@myrepro@${irepro}@g ${ED2IN} + sed -i s@myubmin@${ubmin}@g ${ED2IN} + sed -i s@myugbmin@${ugbmin}@g ${ED2IN} + sed -i s@myustmin@${ustmin}@g ${ED2IN} + sed -i s@mygamm@${gamm}@g ${ED2IN} + sed -i s@mygamh@${gamh}@g ${ED2IN} + sed -i s@mytprandtl@${tprandtl}@g ${ED2IN} + sed -i s@myribmax@${ribmax}@g ${ED2IN} + sed -i s@mygndvap@${igndvap}@g ${ED2IN} + sed -i s@mydtcensus@${dtcensus}@g ${ED2IN} + sed -i s@myyr1stcensus@${yr1stcensus}@g ${ED2IN} + sed -i s@mymon1stcensus@${mon1stcensus}@g ${ED2IN} + sed -i s@myminrecruitdbh@${minrecruitdbh}@g ${ED2IN} + sed -i s@mytreefall@${treefall}@g ${ED2IN} + #------ Soil variables. -------------------------------------------------------# + sed -i s@myslz1@"${polyslz1}"@g ${ED2IN} + sed -i s@myslz2@"${polyslz2}"@g ${ED2IN} + sed -i s@myslz3@"${polyslz3}"@g ${ED2IN} + sed -i s@myslz4@"${polyslz4}"@g ${ED2IN} + sed -i s@myslz5@"${polyslz5}"@g ${ED2IN} + sed -i s@myslz6@"${polyslz6}"@g ${ED2IN} + sed -i s@myslz7@"${polyslz7}"@g ${ED2IN} + sed -i s@myslmstr1@"${polyslm1}"@g ${ED2IN} + sed -i s@myslmstr2@"${polyslm2}"@g ${ED2IN} + sed -i s@myslmstr3@"${polyslm3}"@g ${ED2IN} + sed -i s@myslmstr4@"${polyslm4}"@g ${ED2IN} + sed -i s@myslmstr5@"${polyslm5}"@g ${ED2IN} + sed -i s@myslmstr6@"${polyslm6}"@g ${ED2IN} + sed -i s@myslmstr7@"${polyslm7}"@g ${ED2IN} + sed -i s@mystgoff1@"${polyslt1}"@g ${ED2IN} + sed -i s@mystgoff2@"${polyslt2}"@g ${ED2IN} + sed -i s@mystgoff3@"${polyslt3}"@g ${ED2IN} + sed -i s@mystgoff4@"${polyslt4}"@g ${ED2IN} + sed -i s@mystgoff5@"${polyslt5}"@g ${ED2IN} + sed -i s@mystgoff6@"${polyslt6}"@g ${ED2IN} + sed -i s@mystgoff7@"${polyslt7}"@g ${ED2IN} + #----- Change run type. -------------------------------------------------------# + if [ ${runt} == 'INITIAL' ] + then + sed -i s@RUNFLAG@${runt}@g ${ED2IN} + else + sed -i s@RUNFLAG@HISTORY@g ${ED2IN} + fi + #------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------# + # A halted polygon will inevitably go to the long_serial queue. Re-write # + # the srun.sh file. # + #------------------------------------------------------------------------------# + srun=${here}'/'${polyname}'/srun.sh' + + #----- Get the waiting time used before. --------------------------------------# + thiswait=`grep 'Sleep time is' ${polyname}/srun.sh | awk '{print $5}'` + if [ 'x'${thiswait} == 'x' ] + then + let wtime=${poly}%8 + let wtime=${wtime}*20 + nudge=`date +%S` + if [ ${nudge} -lt 10 ] + then + nudge=`echo ${nudge} | awk '{print substr($1,2,1)}'` + fi + let nudge=${nudge}%15 + let wtime=${wtime}+${nudge} + let wtime=${wtime}+2 + fi + /bin/rm -f ${srun} + /bin/rm -f ${here}/${polyname}/skipper.txt + + cp ${here}/Template/srun.sh ${here}/${polyname}/srun.sh + + #----- The new queue is by default the long_serial. ---------------------------# + newqueue='long_serial' + + #----- Change some settings in srun.sh. ---------------------------------------# + sed -i s@pathhere@${here}@g ${srun} + sed -i s@paththere@${here}@g ${srun} + sed -i s@thispoly@${polyname}@g ${srun} + sed -i s@thisqueue@${newqueue}@g ${srun} + sed -i s@thisdesc@${desc}@g ${srun} + sed -i s@zzzzzzzz@${wtime}@g ${srun} + sed -i s@myorder@${poly}@g ${srun} + + #----- Re-submit the job to long_serial queue. --------------------------------# + ${here}'/'${polyname}'/srun.sh' + + #----- Switch the status to pending. ------------------------------------------# + year=${yeara} + month=${montha} + day=${datea} + hhmm=${houra} + runt='INITIAL' + agb='NA' + bsa='NA' + lai='NA' + else + echo "${polyname} is running/pending..." >> ${situation} + fi # [ ${running} -eq 0 ] + else + echo "${polyname} status is ${runt}. No need to resubmit." >> ${situation} + fi # [ ${runt} == 'HISTORY' -a ${queue} == 'long_serial' ] + #------------------------------------------------------------------------------------# + + + + + #------------------------------------------------------------------------------------# + # Test whether the job can be submitted. # + #------------------------------------------------------------------------------------# + if [ ${runt} == 'INITIAL' ] + then + if [ ${queue} == 'unrestricted_parallel' ] + then + nlist=`grep ${polyname} ${here}/*/callunpa.sh | wc -l` + if [ ${nlist} -eq 0 ] + then + running=0 + else + j=0 + running=0 + while [ ${j} -lt ${nlist} ] && [ ${running} -eq 0 ] + do + let j=${j}+1 + thisline=`grep ${polyname} ${here}/*/callunpa.sh | head -${j} | tail -1` + parent=`echo ${thisline} | awk '{print substr($1,1,8)}'` + parjob="${desc}-${parent}" + running=`bjobs -w -q ${queue} -J ${parjob} 2> /dev/null | tail -1 | wc -l` + done + fi + else + running=`bjobs -w -J ${jobname} 2> /dev/null | tail -1 | wc -l` + fi + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Check whether to start a new simulation or wait. # + #---------------------------------------------------------------------------------# + if [ "x${waitpot}" == "xy" ] || [ "x${waitpot}" == "xy" ] + then + readytostart=`/bin/ls -1 ${potveg}/${oldname}*h5 2> /dev/null | wc -l` + else + readytostart=1 + fi + if [ ${running} -eq 0 ] && [ ${readytostart} -eq 1 ] + then + let nstart=${nstart}+1 + echo " >>> Initial submission of polygon ${polyname}!!!!" + + #----- Re-submit the job to long_serial queue. --------------------------------# + ${here}'/'${polyname}'/srun.sh' + + elif [ ${readytostart} -gt 1 ] + then + echo ":-S Something strange with the restart for polygon ${polyname}..." + fi + #---------------------------------------------------------------------------------# + fi + #------------------------------------------------------------------------------------# + + + + #----- Add the speed test for the polygons that ran at least two cycles. ------------# + let dyear=${year}-${yeara}+1 + if [ ${dyear} -gt 2 ] + then + premier=${here}/${polyname}/histo/${polyname}-S-${yeara}-01-01-000000-g01.h5 + dernier=${here}/${polyname}/histo/${polyname}-S-${year}-01-01-000000-g01.h5 + + #----- Find time it took so far. -------------------------------------------------# + whenh1st=`stat -c %Z ${premier} | awk '{print $1}'` + whenhlast=`stat -c %Z ${dernier} | awk '{print $1}'` + let dwhen=${whenhlast}-${whenh1st} + dwhen=`${ccc} ${dwhen}/86400.` + + #----- Find the number of years. -------------------------------------------------# + let yearfull=${yearz}-${yeara} + let yearsofar=${year}-${yeara} + + #----- Estimate the number of years until the last year. -------------------------# + whenend=`${ccc} ${dwhen}*${yearfull}/${yearsofar}` + else + whenend='NA' + fi + #---------------------------------------------------------------------------------------# + + + + #----- Write polygon check into a single table. -------------------------------------# + output="${polyname} ${polylon} ${polylat} ${year} ${month} ${day} ${hhmm}" + output="${output} ${runt} ${agb} ${bsa} ${lai} ${whenend}" + echo ${output} >> ${outcheck} + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Update joborder.txt file. # + #------------------------------------------------------------------------------------# + if [ ${runt} != 'THE_END' ] && [ ${runt} != 'STSTATE' ] && [ ${runt} != 'EXTINCT' ] + then + polyIATA=`echo ${polyiata} | tr '[:lower:]' '[:upper:]'` + altname=`echo ${jobname} | sed s@${polyiata}@${polyIATA}@g` + polyqueue=`bjobs -w -J ${jobname} 2> /dev/null | tail -1 | awk '{print $4}'` + altequeue=`bjobs -w -J ${altname} 2> /dev/null | tail -1 | awk '{print $4}'` + + if [ -s ${here}/${polyname}/skipper.txt ] + then + #----- No job with this name, it is an unrestricted parallel job. -------------# + newqueue='unrestricted_parallel' + success='TRUE' + elif [ 'x'${polyqueue} != 'x' ] && [ 'x'${altequeue} == 'x' ] + then + #----- "Normal" job, with regular name. ---------------------------------------# + newqueue=${polyqueue} + success='TRUE' + elif [ 'x'${altequeue} != 'x' ] + then + #------------------------------------------------------------------------------# + # This will happen only when the job used to be the "head" of an un- # + # restricted parallel job, but the head crashed. # + #------------------------------------------------------------------------------# + newqueue=${altequeue} + success='TRUE' + else + #------------------------------------------------------------------------------# + # Job was interrupted. We resubmit the job in long_serial. # + #------------------------------------------------------------------------------# + success='FALSE' + fi + if [ ${success} == 'TRUE' ] + then + oldline=${oi} + newline=`echo ${oldline} | sed s@${queue}@${newqueue}@g` + sed -i s@"${oldline}"@"${newline}"@g ${joborder} + fi + fi + + #------------------------------------------------------------------------------------# + # Check whether the steady-state restart file is copied to the destination # + # directory. # + #------------------------------------------------------------------------------------# + if [ "x${copyrestart}" == "xy" ] || [ "x${copyrestart}" == "xY" ] + then + if [ ${runt} == 'STSTATE' -o ${runt} == 'THE_END' -o ${runt} == 'EXTINCT' ] + then + nrestart=`/bin/ls -1 ${restart}/${polyname}-S-*h5 2> /dev/null | wc -l` + #----- Check whether there is any file in the restart directory ---------------# + if [ ${nrestart} -eq 0 ] + then + lastht=`/bin/ls -1 ${here}/${polyname}/histo/*-S-*h5 2> /dev/null | tail -1` + baseht=`basename ${lastht}` + destht=${restart}'/'${baseht} + echo ' - Copying file '${baseht}' to the restart directory...' + echo ' - LASTHISTO = '${lastht} + echo ' - DESTHISTO = '${destht} + /bin/cp -uv ${lastht} ${destht} + fi + #------------------------------------------------------------------------------# + fi + #---------------------------------------------------------------------------------# + fi + #------------------------------------------------------------------------------------# + done + #---------------------------------------------------------------------------------------# +fi # end if +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# Check whether to fix the queues in joborder. # +#------------------------------------------------------------------------------------------# +if [ ${fixqueue} -eq 1 ] +then + while [ ${ff} -lt ${npolys} ] + do + let ff=${ff}+1 + let line=${ff}+3 + let rem=${ff}%${printevery} + + if [ ${rem} -eq 0 -o ${ff} -eq ${npolys} ] + then + echo ' - Fixed queues for '${ff}' polygons so far...' + fi + + #------------------------------------------------------------------------------------# + # Read the polyth line of the polygon list. There must be smarter ways of do- # + # ing this, but this works. Here we obtain the polygon name, and its longitude and # + # latitude. # + #------------------------------------------------------------------------------------# + oi=`head -${line} ${lonlat} | tail -1` + polyname=`echo ${oi} | awk '{print $1 }'` + polyiata=`echo ${oi} | awk '{print $2 }'` + polylon=`echo ${oi} | awk '{print $3 }'` + polylat=`echo ${oi} | awk '{print $4 }'` + yeara=`echo ${oi} | awk '{print $5 }'` + montha=`echo ${oi} | awk '{print $6 }'` + datea=`echo ${oi} | awk '{print $7 }'` + timea=`echo ${oi} | awk '{print $8 }'` + yearz=`echo ${oi} | awk '{print $9 }'` + monthz=`echo ${oi} | awk '{print $10}'` + datez=`echo ${oi} | awk '{print $11}'` + timez=`echo ${oi} | awk '{print $12}'` + initmode=`echo ${oi} | awk '{print $13}'` + iscenario=`echo ${oi} | awk '{print $14}'` + isizepft=`echo ${oi} | awk '{print $15}'` + polyisoil=`echo ${oi} | awk '{print $16}'` + polyntext=`echo ${oi} | awk '{print $17}'` + polysand=`echo ${oi} | awk '{print $18}'` + polyclay=`echo ${oi} | awk '{print $19}'` + polydepth=`echo ${oi} | awk '{print $20}'` + polysoilbc=`echo ${oi} | awk '{print $21}'` + polysldrain=`echo ${oi} | awk '{print $22}'` + polycol=`echo ${oi} | awk '{print $23}'` + slzres=`echo ${oi} | awk '{print $24}'` + queue=`echo ${oi} | awk '{print $25}'` + metdriver=`echo ${oi} | awk '{print $26}'` + dtlsm=`echo ${oi} | awk '{print $27}'` + vmfactc3=`echo ${oi} | awk '{print $28}'` + vmfactc4=`echo ${oi} | awk '{print $29}'` + mphototrc3=`echo ${oi} | awk '{print $30}'` + mphototec3=`echo ${oi} | awk '{print $31}'` + mphotoc4=`echo ${oi} | awk '{print $32}'` + bphotoblc3=`echo ${oi} | awk '{print $33}'` + bphotonlc3=`echo ${oi} | awk '{print $34}'` + bphotoc4=`echo ${oi} | awk '{print $35}'` + kwgrass=`echo ${oi} | awk '{print $36}'` + kwtree=`echo ${oi} | awk '{print $37}'` + gammac3=`echo ${oi} | awk '{print $38}'` + gammac4=`echo ${oi} | awk '{print $39}'` + d0grass=`echo ${oi} | awk '{print $40}'` + d0tree=`echo ${oi} | awk '{print $41}'` + alphac3=`echo ${oi} | awk '{print $42}'` + alphac4=`echo ${oi} | awk '{print $43}'` + klowco2=`echo ${oi} | awk '{print $44}'` + decomp=`echo ${oi} | awk '{print $45}'` + rrffact=`echo ${oi} | awk '{print $46}'` + growthresp=`echo ${oi} | awk '{print $47}'` + lwidthgrass=`echo ${oi} | awk '{print $48}'` + lwidthbltree=`echo ${oi} | awk '{print $49}'` + lwidthnltree=`echo ${oi} | awk '{print $50}'` + q10c3=`echo ${oi} | awk '{print $51}'` + q10c4=`echo ${oi} | awk '{print $52}'` + h2olimit=`echo ${oi} | awk '{print $53}'` + imortscheme=`echo ${oi} | awk '{print $54}'` + ddmortconst=`echo ${oi} | awk '{print $55}'` + isfclyrm=`echo ${oi} | awk '{print $56}'` + icanturb=`echo ${oi} | awk '{print $57}'` + ubmin=`echo ${oi} | awk '{print $58}'` + ugbmin=`echo ${oi} | awk '{print $59}'` + ustmin=`echo ${oi} | awk '{print $60}'` + gamm=`echo ${oi} | awk '{print $61}'` + gamh=`echo ${oi} | awk '{print $62}'` + tprandtl=`echo ${oi} | awk '{print $63}'` + ribmax=`echo ${oi} | awk '{print $64}'` + atmco2=`echo ${oi} | awk '{print $65}'` + thcrit=`echo ${oi} | awk '{print $66}'` + smfire=`echo ${oi} | awk '{print $67}'` + ifire=`echo ${oi} | awk '{print $68}'` + fireparm=`echo ${oi} | awk '{print $69}'` + ipercol=`echo ${oi} | awk '{print $70}'` + runoff=`echo ${oi} | awk '{print $71}'` + imetrad=`echo ${oi} | awk '{print $72}'` + ibranch=`echo ${oi} | awk '{print $73}'` + icanrad=`echo ${oi} | awk '{print $74}'` + crown=`echo ${oi} | awk '{print $75}'` + ltransvis=`echo ${oi} | awk '{print $76}'` + lreflectvis=`echo ${oi} | awk '{print $77}'` + ltransnir=`echo ${oi} | awk '{print $78}'` + lreflectnir=`echo ${oi} | awk '{print $79}'` + orienttree=`echo ${oi} | awk '{print $80}'` + orientgrass=`echo ${oi} | awk '{print $81}'` + clumptree=`echo ${oi} | awk '{print $82}'` + clumpgrass=`echo ${oi} | awk '{print $83}'` + ivegtdyn=`echo ${oi} | awk '{print $84}'` + igndvap=`echo ${oi} | awk '{print $85}'` + iphen=`echo ${oi} | awk '{print $86}'` + iallom=`echo ${oi} | awk '{print $87}'` + ibigleaf=`echo ${oi} | awk '{print $88}'` + irepro=`echo ${oi} | awk '{print $89}'` + treefall=`echo ${oi} | awk '{print $90}'` + #------------------------------------------------------------------------------------# + + + polyIATA=`echo ${polyiata} | tr '[:lower:]' '[:upper:]'` + jobname="${desc}-${polyname}" + altname=`echo ${jobname} | sed s@${polyiata}@${polyIATA}@g` + + jobqueue=`bjobs -w -J ${jobname} 2> /dev/null | tail -1 | awk '{print $4}'` + altqueue=`bjobs -w -J ${altname} 2> /dev/null | tail -1 | awk '{print $4}'` + + + #----- Update the queue in joborder.txt. --------------------------------------------# + if [ 'x'${jobqueue} != 'x' ] + then + newqueue=${jobqueue} + elif [ 'x'${altqueue} != 'x' ] + then + newqueue=${altqueue} + elif [ -s ${here}/${polyname}/skipper.txt ] + then + newqueue='unrestricted_parallel' + fi + oldline=${oi} + newline=`echo ${oldline} | sed s@${queue}@${newqueue}@g` + sed -i s@"${oldline}"@"${newline}"@g ${joborder} + #------------------------------------------------------------------------------------# + done + #---------------------------------------------------------------------------------------# + /bin/rm -f ${here}/run_sitter.lock + exit + #---------------------------------------------------------------------------------------# +fi +#------------------------------------------------------------------------------------------# + + + +#----- Run R to make the status check. ----------------------------------------------------# +if [ ${plotstatus} -eq 1 ] +then + echo 'Running the status check...' + R CMD BATCH "${situtils}/status.r" "${situtils}/rout.rout" +fi +#------------------------------------------------------------------------------------------# + + + +#----- Kill all jobs that can be killed. --------------------------------------------------# +echo 'Killing polygons that went extinct or reached steady state...' +if [ "x${deathrow}" != "x" ] +then + for killme in ${deathrow} + do + bkill -J ${killme} + done # killme in ${deathrow} +fi # [ "x${deathrow}" != "x" ] +#------------------------------------------------------------------------------------------# + + + +#----- Give a three minute break. ---------------------------------------------------------# +echo 'Taking a nap before counting jobs...' +sleep 180 + +#----- Check how many jobs are left on our preferred queues. ------------------------------# +echo 'Counting the number of polygons on queues' +#----- Moorcroft_6100a. -------------------------------------------------------------------# +a61run=`bqueues moorcroft_6100a | tail -1 | awk '{print $10}'` +a61pen=`bqueues moorcroft_6100a | tail -1 | awk '{print $9}'` +a61moi=`bjobs -q moorcroft_6100a 2> /dev/null | wc -l` +#----- Moorcroft_6100b. -------------------------------------------------------------------# +b61run=`bqueues moorcroft_6100b | tail -1 | awk '{print $10}'` +b61pen=`bqueues moorcroft_6100b | tail -1 | awk '{print $9}'` +b61moi=`bjobs -q moorcroft_6100b 2> /dev/null | wc -l` +#----- Moorcroft2a queue. We must count the "mortal" and the priority queues. ------------# +mmorun=`bqueues moorcroft2a | tail -1 | awk '{print $10}'` +mmopen=`bqueues moorcroft2a | tail -1 | awk '{print $9}'` +mprrun=`bqueues moorcroft2a_priority | tail -1 | awk '{print $10}'` +mprpen=`bqueues moorcroft2a_priority | tail -1 | awk '{print $9}'` +m2amoi=`bjobs -q moorcroft2a 2> /dev/null | wc -l` +let m2arun=${mmorun}+${mprrun} +let m2apen=${mmopen}+${mprpen} +#----- Moorcroft2b. -----------------------------------------------------------------------# +m2brun=`bqueues moorcroft2b | tail -1 | awk '{print $10}'` +m2bpen=`bqueues moorcroft2b | tail -1 | awk '{print $9}'` +m2bmoi=`bjobs -q moorcroft2b 2> /dev/null | wc -l` +#----- Moorcroft2c. -----------------------------------------------------------------------# +m2crun=`bqueues moorcroft2c | tail -1 | awk '{print $10}'` +m2cpen=`bqueues moorcroft2c | tail -1 | awk '{print $9}'` +m2cmoi=`bjobs -q moorcroft2c 2> /dev/null | wc -l` +#----- Wofsy queue. We must count the "mortal" and the priority queues. ------------------# +wmorun=`bqueues wofsy | tail -1 | awk '{print $10}'` +wmopen=`bqueues wofsy | tail -1 | awk '{print $9}'` +wprrun=`bqueues wofsy_priority | tail -1 | awk '{print $10}'` +wprpen=`bqueues wofsy_priority | tail -1 | awk '{print $9}'` +wsymoi=`bjobs -q wofsy 2> /dev/null | wc -l` +let wsyrun=${wmorun}+${wprrun} +let wsypen=${wmopen}+${wprpen} +#----- Unrestricted serial. Count only the jobs by the user. -----------------------------# +userun=`bjobs -q unrestricted_serial 2> /dev/null | grep RUN | wc -l` +usepen=`bjobs -q unrestricted_serial 2> /dev/null | grep PEND | wc -l` + + +#----- Create a file with the pending jobs. -----------------------------------------------# +echo 'Counting the number of polygons in queue on long_serial...' +lsepen=`bjobs -w -J ${desc}-* -q long_serial 2> /dev/null | grep PEND | wc -l` +lserun=`bjobs -w -J ${desc}-* -q long_serial 2> /dev/null | grep RUN | wc -l` +/bin/rm -f ${pendfile} +bjobs -w -J ${desc}-* -q long_serial 2> /dev/null | grep PEND > ${pendfile} +#------------------------------------------------------------------------------------------# + + + +#----- Find the available space on available queues. --------------------------------------# +echo 'Looking for empty cores on the queues...' +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# Check the amount of room left for each queue. Make sure that we don't exceed the # +# maximum availability or the maximum use allowed. # +#------------------------------------------------------------------------------------------# +#------ Moorcroft2a. ----------------------------------------------------------------------# +let m2atot=${m2arun}+${m2apen} +let m2aroom=${m2afull}-${m2atot} +let m2apot=${m2aumax}-${m2amoi} +if [ ${m2apot} -lt 0 ] +then + m2aroom=0 +elif [ ${m2apot} -lt ${m2aroom} ] +then + m2aroom=${m2apot} +fi +echo " -----------------------------------------------------------" +echo " Moorcroft2a" +echo " " +echo " TOTAL = ${m2atot} " +echo " RUN = ${m2arun} " +echo " PEND = ${m2apen} " +echo " User max = ${m2aumax}" +echo " My runs = ${m2amoi} " +echo " Room = ${m2aroom}" +echo " Potential = ${m2apot} " +echo " User max = ${m2aumax}" +echo " -----------------------------------------------------------" +echo " " +#------ Moorcroft2b. ----------------------------------------------------------------------# +let m2btot=${m2brun}+${m2bpen} +let m2broom=${m2bfull}-${m2btot} +let m2bpot=${m2bumax}-${m2bmoi} +if [ ${m2bpot} -lt 0 ] +then + m2broom=0 +elif [ ${m2bpot} -lt ${m2broom} ] +then + m2broom=${m2bpot} +fi +echo " -----------------------------------------------------------" +echo " Moorcroft2b" +echo " " +echo " TOTAL = ${m2btot} " +echo " RUN = ${m2brun} " +echo " PEND = ${m2bpen} " +echo " User max = ${m2bumax}" +echo " My runs = ${m2bmoi} " +echo " Room = ${m2broom}" +echo " Potential = ${m2bpot} " +echo " User max = ${m2bumax}" +echo " -----------------------------------------------------------" +echo " " +#------ Moorcroft2c. ----------------------------------------------------------------------# +let m2ctot=${m2crun}+${m2cpen} +let m2croom=${m2cfull}-${m2ctot} +let m2cpot=${m2cumax}-${m2cmoi} +if [ ${m2cpot} -lt 0 ] +then + m2croom=0 +elif [ ${m2cpot} -lt ${m2croom} ] +then + m2croom=${m2cpot} +fi +echo " -----------------------------------------------------------" +echo " Moorcroft2c" +echo " " +echo " TOTAL = ${m2ctot} " +echo " RUN = ${m2crun} " +echo " PEND = ${m2cpen} " +echo " User max = ${m2cumax}" +echo " My runs = ${m2cmoi} " +echo " Room = ${m2croom}" +echo " Potential = ${m2cpot} " +echo " User max = ${m2cumax}" +echo " -----------------------------------------------------------" +echo " " +#------ Moorcroft_6100a. ------------------------------------------------------------------# +let a61tot=${a61run}+${a61pen} +let a61room=${a61full}-${a61tot} +let a61pot=${a61umax}-${a61moi} +if [ ${a61pot} -lt 0 ] +then + a61room=0 +elif [ ${a61pot} -lt ${a61room} ] +then + a61room=${a61pot} +fi +echo " -----------------------------------------------------------" +echo " Moorcroft_6100a" +echo " " +echo " TOTAL = ${a61tot} " +echo " RUN = ${a61run} " +echo " PEND = ${a61pen} " +echo " User max = ${a61umax}" +echo " My runs = ${a61moi} " +echo " Room = ${a61room}" +echo " Potential = ${a61pot} " +echo " User max = ${a61umax}" +echo " -----------------------------------------------------------" +echo " " +#------ Moorcroft_6100b. ------------------------------------------------------------------# +let b61tot=${b61run}+${b61pen} +let b61room=${b61full}-${b61tot} +let b61pot=${b61umax}-${b61moi} +if [ ${b61pot} -lt 0 ] +then + b61room=0 +elif [ ${b61pot} -lt ${b61room} ] +then + b61room=${b61pot} +fi +echo " -----------------------------------------------------------" +echo " Moorcroft_6100b" +echo " " +echo " TOTAL = ${b61tot} " +echo " RUN = ${b61run} " +echo " PEND = ${b61pen} " +echo " User max = ${b61umax}" +echo " My runs = ${b61moi} " +echo " Room = ${b61room}" +echo " Potential = ${b61pot} " +echo " User max = ${b61umax}" +echo " -----------------------------------------------------------" +echo " " +#------ Wofsy. ----------------------------------------------------------------------------# +let wsytot=${wsyrun}+${wsypen} +let wsyroom=${wsyfull}-${wsytot} +let wsypot=${wsyumax}-${wsymoi} +if [ ${wsypot} -lt 0 ] +then + wsyroom=0 +elif [ ${wsypot} -lt ${wsyroom} ] +then + wsyroom=${wsypot} +fi +echo " -----------------------------------------------------------" +echo " Wofsy" +echo " " +echo " TOTAL = ${wsytot} " +echo " RUN = ${wsyrun} " +echo " PEND = ${wsypen} " +echo " User max = ${wsyumax}" +echo " My runs = ${wsymoi} " +echo " Room = ${wsyroom}" +echo " Potential = ${wsypot} " +echo " User max = ${wsyumax}" +echo " -----------------------------------------------------------" +echo " " +#------ Unrestricted_serial. --------------------------------------------------------------# +let usetot=${userun}+${usepen} +let useroom=${usefull}-${usetot} +let usepot=${useumax}-${usemoi} +if [ ${usepot} -lt 0 ] +then + useroom=0 +elif [ ${usepot} -lt ${useroom} ] +then + useroom=${usepot} +fi +echo " -----------------------------------------------------------" +echo " Unrestricted_serial" +echo " " +echo " TOTAL = ${usetot} " +echo " RUN = ${userun} " +echo " PEND = ${usepen} " +echo " User max = ${useumax}" +echo " My runs = ${usemoi} " +echo " Room = ${useroom}" +echo " Potential = ${usepot} " +echo " User max = ${useumax}" +echo " -----------------------------------------------------------" +echo " " +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# Count the total free room. # +#------------------------------------------------------------------------------------------# +let freeroom=${useroom}+${b61room}+${a61room}+${wsyroom}+${m2croom}+${m2broom}+${m2aroom} +let b61pa61=${b61room}+${a61room} +let b61pa61pwsy=${b61pa61}+${wsyroom} +let b61pa61pwsypm2c=${b61pa61pwsy}+${m2croom} +let b61pa61pwsypm2cpm2b=${b61pa61pwsypm2c}+${m2broom} +let b61pa61pwsypm2cpm2bpm2a=${b61pa61pwsypm2cpm2b}+${m2aroom} + +#----- Find out how many cores can be moved. ----------------------------------------------# +if [ ${lsepen} -le ${freeroom} ] +then + nfill=${lsepen} +else + nfill=${freeroom} +fi + +#----- This loop is where the job's queue switching happens. ------------------------------# +echo 'Switching queues for '${nfill}' jobs...' +ff=0 +ll=0 +while [ ${ff} -lt ${nfill} ] +do + let ll=${ll}+1 + + oi=`head -${ll} ${joborder} | tail -1` + polyname=`echo ${oi} | awk '{print $1}'` + thisjob="${desc}-${polyname}" + + #----- Check whether the job is pending or not. If it is, then switch queues. ---------# + ispending=`grep ${thisjob} ${pendfile} | wc -l` + + if [ ${ispending} -gt 0 ] + then + let ff=${ff}+1 + + #----- Decide the new queue. --------------------------------------------------------# + if [ ${ff} -le ${b61room} ] + then + newqueue='moorcroft_6100b' + elif [ ${ff} -le ${b61pa61} ] + then + newqueue='moorcroft_6100a' + elif [ ${ff} -le ${b61pa61pwsy} ] + then + newqueue='wofsy' + elif [ ${ff} -le ${b61pa61pwsypm2c} ] + then + newqueue='moorcroft2c' + elif [ ${ff} -le ${b61pa61pwsypm2cpm2b} ] + then + newqueue='moorcroft2b' + elif [ ${ff} -le ${b61pa61pwsypm2cpm2bpm2a} ] + then + newqueue='moorcroft2a' + else + newqueue='unrestricted_serial' + fi # [ ${ff} -le ${m2croom} ] + + bswitch -J ${thisjob} ${newqueue} + + #----- Update the queue in joborder.txt. --------------------------------------------# + line=`grep ${polyname} ${joborder}` + thislon=`echo ${line} | awk '{print $2}'` + thislat=`echo ${line} | awk '{print $3}'` + oldqueue=`echo ${line} | awk '{print $4}'` + + oldline=${polyname}' '${thislon}' '${thislat}' '${oldqueue} + newline=${polyname}' '${thislon}' '${thislat}' '${newqueue} + sed -i s@"${line}"@"${newline}"@g ${joborder} + fi # [ ${ispending} -gt 0 ] +done # [ ${ff} -lt ${nfill} ] + +#------------------------------------------------------------------------------------------# +# If unrestricted_parallel has some room, we also create new jobs there. # +#------------------------------------------------------------------------------------------# +uparun=`bjobs -q unrestricted_parallel 2> /dev/null | grep RUN | wc -l` +upapen=`bjobs -q unrestricted_parallel 2> /dev/null | grep PEND | wc -l` +let uparoom=${upapmax}-${upapen} +if [ ${uparoom} -lt 0 ] +then + uparoom=0 +fi +let lsepen=${lsepen}-${nfill} +let lsenode=${lsepen}/8 +if [ ${lsenode} -le ${uparoom} ] +then + nodefill=${lsenode} +else + nodefill=${uparoom} +fi + +echo 'Creating '${nodefill}' new jobs to the unrestricted_parallel queue...' +nnff=0 +while [ ${nnff} -lt ${nodefill} ] +do + let ll=${ll}+1 + + oi=`head -${ll} ${joborder} | tail -1` + polyname=`echo ${oi} | awk '{print $1}'` + thisjob="${desc}-${polyname}" + + #----- Check whether the job is pending or not. If it is, then switch queues. ---------# + ispending1=`grep ${thisjob} ${pendfile} | wc -l` + + if [ ${ispending1} -gt 0 ] + then + let nnff=${nnff}+1 + + #----- Start a new callunpa. --------------------------------------------------------# + /bin/rm -f ${callunpa} + echo '#!/bin/sh' > ${callunpa} + + unpa=0 + while [ ${unpa} -lt 8 ] + do + + let unpa=${unpa}+1 + let remain=${unpa}%8 # % is mod operator + let wtime=${remain}*15 + let wtime=${wtime}+2 + + #---------------------------------------------------------------------------------# + # This part is done only when unpa is greater than 1 (because when unpa is 1 # + # the pending is already defined). # + #---------------------------------------------------------------------------------# + if [ ${unpa} -ne 1 ] + then + ispending2=0 + while [ ${ispending2} -eq 0 ] + do + let ll=${ll}+1 + + oi=`head -${ll} ${joborder} | tail -1` + polyname=`echo ${oi} | awk '{print $1}'` + thisjob="${desc}-${polyname}" + + #---------------------------------------------------------------------------# + # Check whether the job is pending or not. If it is, then switch # + # queues. # + #---------------------------------------------------------------------------# + ispending2=`grep ${thisjob} ${pendfile} | wc -l` + done + fi + + #----- Put the skipping flag to the job. -----------------------------------------# + echo 'Skip this node for now.' > ${here}/${polyname}/skipper.txt + + #----- Kill the job because it will go to the unrestricted_parallel. -------------# + bkill -J ${thisjob} + + #----- Add the command to call this job from unrestricted_parallel driver. -------# + mycomm="${here}/${polyname}/callserial.sh ${wtime} &" + echo ${mycomm} >> ${callunpa} + + #----- Update the queue in joborder.txt. --------------------------------------------# + line=`grep ${polyname} ${joborder}` + thislon=`echo ${line} | awk '{print $2}'` + thislat=`echo ${line} | awk '{print $3}'` + oldqueue=`echo ${line} | awk '{print $4}'` + newqueue='unrestricted_parallel' + + oldline=${polyname}' '${thislon}' '${thislat}' '${oldqueue} + newline=${polyname}' '${thislon}' '${thislat}' '${newqueue} + sed -i s@"${line}"@"${newline}"@g ${joborder} + done + + #----- Finalise the script that controls submits the jobs, then submit the job... ------# + echo 'wait' >> ${callunpa} + chmod u+x ${callunpa} + mv ${callunpa} ${here}/${polyname} + + + #----- Create the shell script that will call bsub. ------------------------------------# + /bin/rm -f ${unparun} + echo '#!/bin/sh' > ${unparun} + bsub="bsub -q unrestricted_parallel -R 'hname!=hero3114'" + bsub="${bsub} -J ${thisjob}" + bsub="${bsub} -o ${here}/${polyname}/serial_lsf.out -n 8" + bsub="${bsub} < ${here}/${polyname}/"`basename ${callunpa}` + echo ${bsub} >> ${unparun} + chmod u+x ${unparun} + mv ${unparun} ${here}/${polyname} + + #----- Submit the jobs to the queue. ---------------------------------------------------# + ${here}/${polyname}/unparun.sh + fi # [ ${ispending1} -gt 0 ] +done +let nptounpa=${nodefill}*8 + + +#----- Get rid of the temporary file. -----------------------------------------------------# +/bin/rm -f ${pendfile} + +#----- Sleep 5 more minutes. --------------------------------------------------------------# +echo 'Taking another nap before checking the queues again...' +sleep 300 + +#----- Quick check the status of the queues. ----------------------------------------------# +/bin/rm -f ${recefile} +touch ${recefile} +echo '------- Polygon recent activity status. ----------------------------' >> ${recefile} +echo 'Number of polygons that were re-submitted: '${nresubmit} >> ${recefile} +echo 'Number of polygons that switched queues: '${nfill} >> ${recefile} +echo 'Number of polygons to unrestricted_parallel: '${nptounpa} >> ${recefile} +echo 'Number of polygons that went extinct: '${newextinct} >> ${recefile} +echo 'Number of polygons that reached steady state: '${newststate} >> ${recefile} +echo '--------------------------------------------------------------------' >> ${recefile} + +#----- Check the queue status. ------------------------------------------------------------# +echo 'Counting the jobs...' +a61run=`bjobs -J ${desc}-* -w -q moorcroft_6100a 2> /dev/null | grep RUN | wc -l` +b61run=`bjobs -J ${desc}-* -w -q moorcroft_6100b 2> /dev/null | grep RUN | wc -l` +m2arun=`bjobs -J ${desc}-* -w -q moorcroft2a 2> /dev/null | grep RUN | wc -l` +m2brun=`bjobs -J ${desc}-* -w -q moorcroft2b 2> /dev/null | grep RUN | wc -l` +m2crun=`bjobs -J ${desc}-* -w -q moorcroft2c 2> /dev/null | grep RUN | wc -l` +wsyrun=`bjobs -J ${desc}-* -w -q wofsy 2> /dev/null | grep RUN | wc -l` +lserun=`bjobs -J ${desc}-* -w -q long_serial 2> /dev/null | grep RUN | wc -l` +userun=`bjobs -J ${desc}-* -w -q unrestricted_serial 2> /dev/null | grep RUN | wc -l` +uparun=`bjobs -J ${desc}-* -w -q unrestricted_parallel 2> /dev/null | grep RUN | wc -l` +a61pen=`bjobs -J ${desc}-* -w -q moorcroft_6100a 2> /dev/null | grep PEND | wc -l` +b61pen=`bjobs -J ${desc}-* -w -q moorcroft_6100b 2> /dev/null | grep PEND | wc -l` +m2apen=`bjobs -J ${desc}-* -w -q moorcroft2a 2> /dev/null | grep PEND | wc -l` +m2bpen=`bjobs -J ${desc}-* -w -q moorcroft2b 2> /dev/null | grep PEND | wc -l` +m2cpen=`bjobs -J ${desc}-* -w -q moorcroft2c 2> /dev/null | grep PEND | wc -l` +wsypen=`bjobs -J ${desc}-* -w -q wofsy 2> /dev/null | grep PEND | wc -l` +lsepen=`bjobs -J ${desc}-* -w -q long_serial 2> /dev/null | grep PEND | wc -l` +usepen=`bjobs -J ${desc}-* -w -q unrestricted_serial 2> /dev/null | grep PEND | wc -l` +upapen=`bjobs -J ${desc}-* -w -q unrestricted_parallel 2> /dev/null | grep PEND | wc -l` +lsertot=`bjobs -q long_serial 2> /dev/null | grep RUN | wc -l` +m2artot=`bjobs -q moorcroft2a 2> /dev/null | grep RUN | wc -l` +m2brtot=`bjobs -q moorcroft2b 2> /dev/null | grep RUN | wc -l` +m2crtot=`bjobs -q moorcroft2c 2> /dev/null | grep RUN | wc -l` +wsyrtot=`bjobs -q wofsy 2> /dev/null | grep RUN | wc -l` +a61rtot=`bjobs -q moorcroft_6100a 2> /dev/null | grep RUN | wc -l` +b61rtot=`bjobs -q moorcroft_6100b 2> /dev/null | grep RUN | wc -l` +usertot=`bjobs -q unrestricted_serial 2> /dev/null | grep RUN | wc -l` +upartot=`bjobs -q unrestricted_parallel 2> /dev/null | grep RUN | wc -l` +lseptot=`bjobs -q long_serial 2> /dev/null | grep PEND | wc -l` +m2aptot=`bjobs -q moorcroft2a 2> /dev/null | grep PEND | wc -l` +m2bptot=`bjobs -q moorcroft2b 2> /dev/null | grep PEND | wc -l` +m2cptot=`bjobs -q moorcroft2c 2> /dev/null | grep PEND | wc -l` +wsyptot=`bjobs -q wofsy 2> /dev/null | grep PEND | wc -l` +a61ptot=`bjobs -q moorcroft_6100a 2> /dev/null | grep PEND | wc -l` +b61ptot=`bjobs -q moorcroft_6100b 2> /dev/null | grep PEND | wc -l` +useptot=`bjobs -q unrestricted_serial 2> /dev/null | grep PEND | wc -l` +upaptot=`bjobs -q unrestricted_parallel 2> /dev/null | grep PEND | wc -l` +let lsertot=${lsertot}+${lseptot} +let m2artot=${m2artot}+${m2aptot} +let m2brtot=${m2brtot}+${m2bptot} +let m2crtot=${m2crtot}+${m2cptot} +let wsyrtot=${wsyrtot}+${wsyptot} +let a61rtot=${a61rtot}+${a61ptot} +let b61rtot=${b61rtot}+${b61ptot} +let usertot=${usertot}+${useptot} +let upartot=${upartot}+${upaptot} + +/bin/rm -f ${queuefile} +touch ${queuefile} +echo "------- Queue status. --------------------------------------------" >> ${queuefile} +echo "Moorcroft_6100a RUN=${a61run} PEN=${a61pen} TOT=${a61tot}" >> ${queuefile} +echo "Moorcroft_6100b RUN=${b61run} PEN=${b61pen} TOT=${b61tot}" >> ${queuefile} +echo "Moorcroft2a RUN=${m2arun} PEN=${m2apen} TOT=${m2atot}" >> ${queuefile} +echo "Moorcroft2b RUN=${m2brun} PEN=${m2bpen} TOT=${m2btot}" >> ${queuefile} +echo "Moorcroft2c RUN=${m2crun} PEN=${m2cpen} TOT=${m2ctot}" >> ${queuefile} +echo "Wofsy RUN=${wsyrun} PEN=${wsypen} TOT=${wsytot}" >> ${queuefile} +echo "Long_serial RUN=${lserun} PEN=${lsepen} TOT=${lsetot}" >> ${queuefile} +echo "Unrestricted_serial RUN=${userun} PEN=${usepen} TOT=${usetot}" >> ${queuefile} +echo "Unrestricted_parallel RUN=${uparun} PEN=${upapen} TOT=${upatot}" >> ${queuefile} +echo "------------------------------------------------------------------" >> ${queuefile} + +#----- Current simulation status. ---------------------------------------------------------# +n_initial=`grep INITIAL ${outcheck} | wc -l` +n_history=`grep HISTORY ${outcheck} | wc -l` +n_metmiss=`grep METMISS ${outcheck} | wc -l` +n_crashed=`grep CRASHED ${outcheck} | wc -l` +n_stopped=`grep STOPPED ${outcheck} | wc -l` +n_extinct=`grep EXTINCT ${outcheck} | wc -l` +n_ststate=`grep STSTATE ${outcheck} | wc -l` +n_the_end=`grep THE_END ${outcheck} | wc -l` +/bin/rm -f ${statfile} +touch ${statfile} +echo "------- Simulation status. -----------------------------------------" >> ${statfile} +echo " Number of polygons that have never started : ${n_initial}" >> ${statfile} +echo " Number of polygons that have partially run : ${n_history}" >> ${statfile} +echo " Number of polygons that haven't found met drivers : ${n_metmiss}" >> ${statfile} +echo " Number of polygons that have crashed : ${n_crashed}" >> ${statfile} +echo " Number of polygons that have mysteriously stopped : ${n_stopped}" >> ${statfile} +echo " Number of polygons that became desert : ${n_extinct}" >> ${statfile} +echo " Number of polygons that have reached steady state : ${n_ststate}" >> ${statfile} +echo " Number of polygons that have reached the end : ${n_the_end}" >> ${statfile} +echo "--------------------------------------------------------------------" >> ${statfile} + +#----- Convert the PNG files to an e-mail friendly format. --------------------------------# +if [ ${plotstatus} -eq 1 ] +then + echo 'Converting the PNG files to e-mail format...' + uuencode ${situtils}/polystatus.png polystat.png > ${situtils}/polystat.txt + uuencode ${situtils}/polyagb.png polyagb.png > ${situtils}/polyagb.txt + uuencode ${situtils}/polybsa.png polybsa.png > ${situtils}/polybsa.txt + uuencode ${situtils}/polylai.png polylai.png > ${situtils}/polylai.txt + uuencode ${situtils}/polyvel.png polyvel.png > ${situtils}/polyvel.txt +fi + +#------ Build the e-mail body. ------------------------------------------------------------# +echo 'Building the e-mail...' +/bin/rm -f ${emailbody} +touch ${emailbody} +cat ${headfile} >> ${emailbody} +echo ' ' >> ${emailbody} +cat ${statfile} >> ${emailbody} +echo ' ' >> ${emailbody} +cat ${recefile} >> ${emailbody} +echo ' ' >> ${emailbody} +cat ${queuefile} >> ${emailbody} +echo ' ' >> ${emailbody} +cat ${tailfile} >> ${emailbody} +echo ' ' >> ${emailbody} + +if [ ${plotstatus} -eq 1 ] +then + cat ${situtils}/polystat.txt >> ${emailbody} + echo ' ' >> ${emailbody} + cat ${situtils}/polyagb.txt >> ${emailbody} + echo ' ' >> ${emailbody} + cat ${situtils}/polybsa.txt >> ${emailbody} + echo ' ' >> ${emailbody} + cat ${situtils}/polylai.txt >> ${emailbody} + echo ' ' >> ${emailbody} + cat ${situtils}/polyvel.txt >> ${emailbody} + echo ' ' >> ${emailbody} +fi + +when=`date +'%B %d, %Y - %R %Z'` +today=`date +'%Y-%m-%d'` +subject="${desc} run status as of ${when}" + +if [ ${email1day} -eq 0 ] +then + echo ${today} > ${emailday} + echo 'Sending e-mail...' + mail -s "${subject}" ${recipient} < ${emailbody} +elif [ -s ${emailday} ] +then + lastemail=`cat ${emailday}` + if [ ${today} != ${lastemail} ] + then + echo ${today} > ${emailday} + echo 'Sending e-mail...' + mail -s "${subject}" ${recipient} < ${emailbody} + else + echo 'Skipping e-mail...' + fi +else + echo ${today} > ${emailday} + echo 'Sending e-mail...' + mail -s "${subject}" ${recipient} < ${emailbody} +fi + +#----- Clean-up stuff. --------------------------------------------------------------------# +echo 'Deleting some temporary files...' +/bin/rm -f ${emailbody} ${queuefile} ${recefile} +/bin/rm -f ${situtils}/polystat.txt +/bin/rm -f ${situtils}/polyagb.txt +/bin/rm -f ${situtils}/polybsa.txt +/bin/rm -f ${situtils}/polylai.txt +/bin/rm -f ${here}/run_sitter.lock +echo '==== run_sitter.sh execution ends. ====' diff --git a/ED/build/bin/dependency.mk b/ED/build/bin/dependency.mk index 5070cd322..2939a4102 100644 --- a/ED/build/bin/dependency.mk +++ b/ED/build/bin/dependency.mk @@ -95,9 +95,9 @@ rk4_misc.o: canopy_struct_dynamics.mod consts_coms.mod ed_max_dims.mod rk4_misc.o: ed_misc_coms.mod ed_state_vars.mod ed_therm_lib.mod grid_coms.mod rk4_misc.o: rk4_coms.mod soil_coms.mod therm_lib8.mod rk4_stepper.o: ed_state_vars.mod grid_coms.mod rk4_coms.mod soil_coms.mod -soil_respiration.o: consts_coms.mod decomp_coms.mod ed_state_vars.mod -soil_respiration.o: farq_leuning.mod pft_coms.mod physiology_coms.mod -soil_respiration.o: rk4_coms.mod soil_coms.mod therm_lib.mod +soil_respiration.o: consts_coms.mod decomp_coms.mod ed_misc_coms.mod +soil_respiration.o: ed_state_vars.mod farq_leuning.mod pft_coms.mod +soil_respiration.o: physiology_coms.mod rk4_coms.mod soil_coms.mod therm_lib.mod structural_growth.o: allometry.mod consts_coms.mod decomp_coms.mod structural_growth.o: detailed_coms.mod ed_max_dims.mod ed_misc_coms.mod structural_growth.o: ed_state_vars.mod ed_therm_lib.mod pft_coms.mod @@ -136,9 +136,9 @@ landuse_init.o: consts_coms.mod disturb_coms.mod ed_max_dims.mod landuse_init.o: ed_misc_coms.mod ed_state_vars.mod grid_coms.mod phenology_startup.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod phenology_startup.o: grid_coms.mod phenology_aux.mod phenology_coms.mod -average_utils.o: allometry.mod canopy_radiation_coms.mod consts_coms.mod -average_utils.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod -average_utils.o: grid_coms.mod pft_coms.mod therm_lib.mod +average_utils.o: consts_coms.mod ed_max_dims.mod ed_misc_coms.mod +average_utils.o: ed_state_vars.mod grid_coms.mod met_driver_coms.mod +average_utils.o: soil_coms.mod therm_lib.mod ed_init_full_history.o: allometry.mod ed_max_dims.mod ed_misc_coms.mod ed_init_full_history.o: ed_node_coms.mod ed_state_vars.mod ed_init_full_history.o: fusion_fission_coms.mod grid_coms.mod @@ -171,7 +171,7 @@ ed_xml_config.o: grid_coms.mod hydrology_coms.mod met_driver_coms.mod ed_xml_config.o: pft_coms.mod phenology_coms.mod physiology_coms.mod ed_xml_config.o: rk4_coms.mod soil_coms.mod edio.o: consts_coms.mod ed_max_dims.mod ed_misc_coms.mod ed_node_coms.mod -edio.o: ed_state_vars.mod grid_coms.mod pft_coms.mod soil_coms.mod therm_lib.mod +edio.o: ed_state_vars.mod grid_coms.mod soil_coms.mod therm_lib.mod h5_output.o: an_header.mod ed_max_dims.mod ed_misc_coms.mod ed_node_coms.mod h5_output.o: ed_state_vars.mod ed_var_tables.mod fusion_fission_coms.mod h5_output.o: grid_coms.mod hdf5_coms.mod @@ -231,10 +231,10 @@ ed_therm_lib.o: ed_misc_coms.mod ed_state_vars.mod grid_coms.mod pft_coms.mod ed_therm_lib.o: rk4_coms.mod soil_coms.mod therm_lib.mod therm_lib8.mod fatal_error.o: ed_node_coms.mod fuse_fiss_utils.o: allometry.mod budget_utils.mod canopy_layer_coms.mod -fuse_fiss_utils.o: decomp_coms.mod disturb_coms.mod ed_max_dims.mod -fuse_fiss_utils.o: ed_misc_coms.mod ed_node_coms.mod ed_state_vars.mod -fuse_fiss_utils.o: fusion_fission_coms.mod grid_coms.mod mem_polygons.mod -fuse_fiss_utils.o: pft_coms.mod soil_coms.mod therm_lib.mod +fuse_fiss_utils.o: consts_coms.mod decomp_coms.mod disturb_coms.mod +fuse_fiss_utils.o: ed_max_dims.mod ed_misc_coms.mod ed_node_coms.mod +fuse_fiss_utils.o: ed_state_vars.mod fusion_fission_coms.mod grid_coms.mod +fuse_fiss_utils.o: mem_polygons.mod pft_coms.mod soil_coms.mod therm_lib.mod great_circle.o: consts_coms.mod hdf5_utils.o: hdf5_coms.mod invmondays.o: ed_misc_coms.mod @@ -247,9 +247,9 @@ stable_cohorts.o: phenology_coms.mod therm_lib.o: consts_coms.mod therm_lib8.o: consts_coms.mod therm_lib.mod update_derived_props.o: allometry.mod canopy_air_coms.mod consts_coms.mod -update_derived_props.o: ed_misc_coms.mod ed_state_vars.mod ed_therm_lib.mod -update_derived_props.o: fuse_fiss_utils.mod grid_coms.mod soil_coms.mod -update_derived_props.o: therm_lib.mod +update_derived_props.o: decomp_coms.mod ed_max_dims.mod ed_misc_coms.mod +update_derived_props.o: ed_state_vars.mod ed_therm_lib.mod fuse_fiss_utils.mod +update_derived_props.o: grid_coms.mod pft_coms.mod soil_coms.mod therm_lib.mod utils_c.o: /n/Moorcroft_Lab/Users/mlongo/EDBRAMS/ED/src/include/utils_sub_names.h utils_c.o: allometry.mod: allometry.o diff --git a/ED/dbgbuild/bin/dependency.mk b/ED/dbgbuild/bin/dependency.mk index 5070cd322..2939a4102 100644 --- a/ED/dbgbuild/bin/dependency.mk +++ b/ED/dbgbuild/bin/dependency.mk @@ -95,9 +95,9 @@ rk4_misc.o: canopy_struct_dynamics.mod consts_coms.mod ed_max_dims.mod rk4_misc.o: ed_misc_coms.mod ed_state_vars.mod ed_therm_lib.mod grid_coms.mod rk4_misc.o: rk4_coms.mod soil_coms.mod therm_lib8.mod rk4_stepper.o: ed_state_vars.mod grid_coms.mod rk4_coms.mod soil_coms.mod -soil_respiration.o: consts_coms.mod decomp_coms.mod ed_state_vars.mod -soil_respiration.o: farq_leuning.mod pft_coms.mod physiology_coms.mod -soil_respiration.o: rk4_coms.mod soil_coms.mod therm_lib.mod +soil_respiration.o: consts_coms.mod decomp_coms.mod ed_misc_coms.mod +soil_respiration.o: ed_state_vars.mod farq_leuning.mod pft_coms.mod +soil_respiration.o: physiology_coms.mod rk4_coms.mod soil_coms.mod therm_lib.mod structural_growth.o: allometry.mod consts_coms.mod decomp_coms.mod structural_growth.o: detailed_coms.mod ed_max_dims.mod ed_misc_coms.mod structural_growth.o: ed_state_vars.mod ed_therm_lib.mod pft_coms.mod @@ -136,9 +136,9 @@ landuse_init.o: consts_coms.mod disturb_coms.mod ed_max_dims.mod landuse_init.o: ed_misc_coms.mod ed_state_vars.mod grid_coms.mod phenology_startup.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod phenology_startup.o: grid_coms.mod phenology_aux.mod phenology_coms.mod -average_utils.o: allometry.mod canopy_radiation_coms.mod consts_coms.mod -average_utils.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod -average_utils.o: grid_coms.mod pft_coms.mod therm_lib.mod +average_utils.o: consts_coms.mod ed_max_dims.mod ed_misc_coms.mod +average_utils.o: ed_state_vars.mod grid_coms.mod met_driver_coms.mod +average_utils.o: soil_coms.mod therm_lib.mod ed_init_full_history.o: allometry.mod ed_max_dims.mod ed_misc_coms.mod ed_init_full_history.o: ed_node_coms.mod ed_state_vars.mod ed_init_full_history.o: fusion_fission_coms.mod grid_coms.mod @@ -171,7 +171,7 @@ ed_xml_config.o: grid_coms.mod hydrology_coms.mod met_driver_coms.mod ed_xml_config.o: pft_coms.mod phenology_coms.mod physiology_coms.mod ed_xml_config.o: rk4_coms.mod soil_coms.mod edio.o: consts_coms.mod ed_max_dims.mod ed_misc_coms.mod ed_node_coms.mod -edio.o: ed_state_vars.mod grid_coms.mod pft_coms.mod soil_coms.mod therm_lib.mod +edio.o: ed_state_vars.mod grid_coms.mod soil_coms.mod therm_lib.mod h5_output.o: an_header.mod ed_max_dims.mod ed_misc_coms.mod ed_node_coms.mod h5_output.o: ed_state_vars.mod ed_var_tables.mod fusion_fission_coms.mod h5_output.o: grid_coms.mod hdf5_coms.mod @@ -231,10 +231,10 @@ ed_therm_lib.o: ed_misc_coms.mod ed_state_vars.mod grid_coms.mod pft_coms.mod ed_therm_lib.o: rk4_coms.mod soil_coms.mod therm_lib.mod therm_lib8.mod fatal_error.o: ed_node_coms.mod fuse_fiss_utils.o: allometry.mod budget_utils.mod canopy_layer_coms.mod -fuse_fiss_utils.o: decomp_coms.mod disturb_coms.mod ed_max_dims.mod -fuse_fiss_utils.o: ed_misc_coms.mod ed_node_coms.mod ed_state_vars.mod -fuse_fiss_utils.o: fusion_fission_coms.mod grid_coms.mod mem_polygons.mod -fuse_fiss_utils.o: pft_coms.mod soil_coms.mod therm_lib.mod +fuse_fiss_utils.o: consts_coms.mod decomp_coms.mod disturb_coms.mod +fuse_fiss_utils.o: ed_max_dims.mod ed_misc_coms.mod ed_node_coms.mod +fuse_fiss_utils.o: ed_state_vars.mod fusion_fission_coms.mod grid_coms.mod +fuse_fiss_utils.o: mem_polygons.mod pft_coms.mod soil_coms.mod therm_lib.mod great_circle.o: consts_coms.mod hdf5_utils.o: hdf5_coms.mod invmondays.o: ed_misc_coms.mod @@ -247,9 +247,9 @@ stable_cohorts.o: phenology_coms.mod therm_lib.o: consts_coms.mod therm_lib8.o: consts_coms.mod therm_lib.mod update_derived_props.o: allometry.mod canopy_air_coms.mod consts_coms.mod -update_derived_props.o: ed_misc_coms.mod ed_state_vars.mod ed_therm_lib.mod -update_derived_props.o: fuse_fiss_utils.mod grid_coms.mod soil_coms.mod -update_derived_props.o: therm_lib.mod +update_derived_props.o: decomp_coms.mod ed_max_dims.mod ed_misc_coms.mod +update_derived_props.o: ed_state_vars.mod ed_therm_lib.mod fuse_fiss_utils.mod +update_derived_props.o: grid_coms.mod pft_coms.mod soil_coms.mod therm_lib.mod utils_c.o: /n/Moorcroft_Lab/Users/mlongo/EDBRAMS/ED/src/include/utils_sub_names.h utils_c.o: allometry.mod: allometry.o diff --git a/ED/src/driver/ed_driver.f90 b/ED/src/driver/ed_driver.f90 index 66d2950aa..90079b1fc 100644 --- a/ED/src/driver/ed_driver.f90 +++ b/ED/src/driver/ed_driver.f90 @@ -387,20 +387,23 @@ subroutine exterminate_patches_except(keeppa) use ed_state_vars , only : edgrid_g & ! structure , edtype & ! structure , polygontype & ! structure - , sitetype ! ! structure + , sitetype & ! structure + , patchtype ! ! structure use grid_coms , only : ngrids ! ! intent(in) use fuse_fiss_utils, only : terminate_patches ! ! sub-routine !----- Arguments -----------------------------------------------------------------------! - integer , intent(in) :: keeppa + integer , intent(in) :: keeppa !----- Local variables -----------------------------------------------------------------! - type(edtype) , pointer :: cgrid - type(polygontype) , pointer :: cpoly - type(sitetype) , pointer :: csite - integer :: ifm - integer :: ipy - integer :: isi - integer :: ipa - integer :: keepact + type(edtype) , pointer :: cgrid + type(polygontype) , pointer :: cpoly + type(sitetype) , pointer :: csite + type(patchtype) , pointer :: cpatch + integer :: ifm + integer :: ipy + integer :: isi + integer :: ipa + integer :: keepact + real , dimension(:), allocatable :: csite_lai !---------------------------------------------------------------------------------------! @@ -412,16 +415,32 @@ subroutine exterminate_patches_except(keeppa) siteloop: do isi=1,cpoly%nsites csite => cpoly%site(isi) - + select case(keeppa) case (0) return case (-2) !----- Keep the one with the lowest LAI. -----------------------------------! - keepact = minloc(csite%lai,dim=1) + allocate(csite_lai(csite%npatches)) + csite_lai(:) = 0.0 + keepm2loop: do ipa=1,csite%npatches + cpatch => csite%patch(ipa) + if (cpatch%ncohorts > 0) csite_lai(ipa) = sum(cpatch%lai) + end do keepm2loop + keepact = minloc(csite_lai,dim=1) + deallocate(csite_lai) + !---------------------------------------------------------------------------! case (-1) - !----- Keep the one with the highest LAI. ----------------------------------! - keepact = maxloc(csite%lai,dim=1) + !----- Keep the one with the lowest LAI. -----------------------------------! + allocate(csite_lai(csite%npatches)) + csite_lai(:) = 0.0 + keepm1loop: do ipa=1,csite%npatches + cpatch => csite%patch(ipa) + if (cpatch%ncohorts > 0) csite_lai(ipa) = sum(cpatch%lai) + end do keepm1loop + keepact = maxloc(csite_lai,dim=1) + deallocate(csite_lai) + !---------------------------------------------------------------------------! case default !----- Keep a fixed patch number. ------------------------------------------! keepact = keeppa diff --git a/ED/src/driver/ed_model.f90 b/ED/src/driver/ed_model.f90 index a6ab0ceeb..b686771c4 100644 --- a/ED/src/driver/ed_model.f90 +++ b/ED/src/driver/ed_model.f90 @@ -30,7 +30,13 @@ subroutine ed_model() , ffilout & ! intent(in) , runtype ! ! intent(in) use ed_misc_coms , only : outputMonth & ! intent(in) - , fast_diagnostics ! ! intent(in) + , fast_diagnostics & ! intent(in) + , writing_dail & ! intent(in) + , writing_mont & ! intent(in) + , writing_dcyc & ! intent(in) + , writing_eorq & ! intent(in) + , writing_long & ! intent(in) + , writing_year ! ! intent(in) use grid_coms , only : ngrids & ! intent(in) , istp & ! intent(in) , time & ! intent(in) @@ -79,10 +85,6 @@ subroutine ed_model() logical :: new_month logical :: new_year logical :: the_end - logical :: writing_dail - logical :: writing_mont - logical :: writing_dcyc - logical :: writing_year logical :: history_time logical :: dcycle_time logical :: annual_time @@ -146,54 +148,42 @@ subroutine ed_model() close (unit=78,status='keep') end if - writing_dail = idoutput > 0 - writing_mont = imoutput > 0 - writing_dcyc = iqoutput > 0 - writing_year = iyoutput > 0 out_time_fast = current_time out_time_fast%month = -1 - !---------------------------------------------------------------------------------------! - ! Checking if the user has indicated a need for any of the fast flux diagnostic ! - ! variables, these are used in conditions of ifoutput,idoutput and imoutput conditions. ! - ! If they are not >0, then set the logical, fast_diagnostics to false. ! - !---------------------------------------------------------------------------------------! - fast_diagnostics = checkbudget .or. ifoutput /= 0 .or. idoutput /= 0 .or. & - imoutput /= 0 .or. iqoutput /= 0 .or. itoutput /= 0 - !---------------------------------------------------------------------------------------! ! If this is not a history restart, then zero out the long term diagnostics. ! !---------------------------------------------------------------------------------------! if (trim(runtype) /= 'HISTORY') then - if (writing_mont .or. writing_dcyc) then - do ifm=1,ngrids - call zero_ed_monthly_output_vars(edgrid_g(ifm)) - call zero_ed_daily_output_vars(edgrid_g(ifm)) - end do - elseif (writing_dail) then - do ifm=1,ngrids - call zero_ed_daily_output_vars(edgrid_g(ifm)) - end do - end if + do ifm=1,ngrids + if (writing_long) call zero_ed_dmean_vars(edgrid_g(ifm)) + if (writing_eorq) call zero_ed_mmean_vars(edgrid_g(ifm)) + if (writing_dcyc) call zero_ed_qmean_vars(edgrid_g(ifm)) + end do !----- Output initial state. --------------------------------------------------------! do ifm=1,ngrids call update_ed_yearly_vars(edgrid_g(ifm)) end do - + end if + !---------------------------------------------------------------------------------------! + + + !---------------------------------------------------------------------------------------! + ! The fast analysis is always reset, including history runs. ! + !---------------------------------------------------------------------------------------! + do ifm=1,ngrids + call zero_ed_fmean_vars(edgrid_g(ifm)) + end do + !---------------------------------------------------------------------------------------! + - endif - !---------------------------------------------------------------------------------------! ! Allocate memory to the integration patch, Euler now utilises the RK4 buffers too. ! !---------------------------------------------------------------------------------------! call initialize_rk4patches(.true.) !---------------------------------------------------------------------------------------! - - do ifm=1,ngrids - call reset_averaged_vars(edgrid_g(ifm)) - end do if (ifoutput /= 0) call h5_output('INST') @@ -246,6 +236,18 @@ subroutine ed_model() !------------------------------------------------------------------------------------! + + !------------------------------------------------------------------------------------! + ! At this point, all meteorologic driver data for the land surface model has ! + ! been updated for the current timestep. Perform the time average for the output ! + ! diagnostic. ! + !------------------------------------------------------------------------------------! + do ifm=1,ngrids + call integrate_ed_fmean_met_vars(edgrid_g(ifm)) + end do + !------------------------------------------------------------------------------------! + + !----- Solve the photosynthesis and biophysics. -------------------------------------! select case (integration_scheme) case (0) @@ -269,18 +271,6 @@ subroutine ed_model() - !------------------------------------------------------------------------------------! - ! Update the daily averages if daily or monthly analysis are needed. ! - !------------------------------------------------------------------------------------! - if (writing_dail .or. writing_mont .or. writing_dcyc) then - do ifm=1,ngrids - call integrate_ed_daily_output_state(edgrid_g(ifm)) - end do - end if - !------------------------------------------------------------------------------------! - - - !------------------------------------------------------------------------------------! ! Update the model time. ! !------------------------------------------------------------------------------------! @@ -429,8 +419,7 @@ subroutine ed_model() ! Call the model output driver. ! !------------------------------------------------------------------------------------! call ed_output(analysis_time,new_day,dail_analy_time,mont_analy_time,dcyc_analy_time & - ,annual_time,writing_dail,writing_mont,writing_dcyc,history_time & - ,dcycle_time,the_end) + ,annual_time,history_time,dcycle_time,the_end) !------------------------------------------------------------------------------------! @@ -442,7 +431,7 @@ subroutine ed_model() !------------------------------------------------------------------------------------! if (reset_time) then do ifm=1,ngrids - call reset_averaged_vars(edgrid_g(ifm)) + call zero_ed_fmean_vars(edgrid_g(ifm)) end do end if !------------------------------------------------------------------------------------! diff --git a/ED/src/dynamics/canopy_struct_dynamics.f90 b/ED/src/dynamics/canopy_struct_dynamics.f90 index ab399a026..171b81c2d 100644 --- a/ED/src/dynamics/canopy_struct_dynamics.f90 +++ b/ED/src/dynamics/canopy_struct_dynamics.f90 @@ -106,8 +106,6 @@ subroutine canopy_turbulence(cpoly,isi,ipa) , nu_mw99 & ! intent(in) , cs_dense0 & ! intent(in) , gamma_clm4 & ! intent(in) - , rb_inter & ! intent(in) - , rb_slope & ! intent(in) , tprandtl & ! intent(in) , zoobukhov ! ! function use canopy_layer_coms, only : ncanlyr & ! intent(in) @@ -190,7 +188,6 @@ subroutine canopy_turbulence(cpoly,isi,ipa) real :: factv ! Wind-dependent term for old rasveg real :: aux ! Aux. variable real :: estar ! Equivalent potential temperature [ K] - real :: gbhmos_min ! Minimum boundary layer heat conductance. [ m/s] real :: wcapcan ! Canopy air space water capacity [ kg/m2] real :: hcapcan ! Canopy air space enthalpy capacity [ J/m2] real :: ccapcan ! Canopy air space CO2 capacity [ mol/m2] @@ -329,17 +326,6 @@ subroutine canopy_turbulence(cpoly,isi,ipa) - - !---- Find the minimum leaf boundary layer heat conductance. ------------------------! - if (any(cpatch%leaf_resolvable .or. cpatch%wood_resolvable)) then - gbhmos_min = 1. / (rb_inter + rb_slope * (csite%lai(ipa) + csite%wai(ipa))) - else - gbhmos_min = 0. - end if - !------------------------------------------------------------------------------------! - - - !------------------------------------------------------------------------------------! ! Reset scratch variables in canopy_layer_coms. ! !------------------------------------------------------------------------------------! @@ -498,7 +484,6 @@ subroutine canopy_turbulence(cpoly,isi,ipa) ,csite%can_shv(ipa) & ,csite%can_rhos(ipa) & ,can_cp & - ,gbhmos_min & ,cpatch%leaf_gbh(ico) & ,cpatch%leaf_gbw(ico)) !---------------------------------------------------------------------------! @@ -518,7 +503,6 @@ subroutine canopy_turbulence(cpoly,isi,ipa) ,csite%can_shv(ipa) & ,csite%can_rhos(ipa) & ,can_cp & - ,gbhmos_min & ,cpatch%wood_gbh(ico) & ,cpatch%wood_gbw(ico)) !---------------------------------------------------------------------------! @@ -667,7 +651,6 @@ subroutine canopy_turbulence(cpoly,isi,ipa) ,csite%can_shv(ipa) & ,csite%can_rhos(ipa) & ,can_cp & - ,gbhmos_min & ,cpatch%leaf_gbh(ico) & ,cpatch%leaf_gbw(ico)) !---------------------------------------------------------------------------! @@ -687,7 +670,6 @@ subroutine canopy_turbulence(cpoly,isi,ipa) ,csite%can_shv(ipa) & ,csite%can_rhos(ipa) & ,can_cp & - ,gbhmos_min & ,cpatch%wood_gbh(ico) & ,cpatch%wood_gbw(ico)) !---------------------------------------------------------------------------! @@ -1050,7 +1032,6 @@ subroutine canopy_turbulence(cpoly,isi,ipa) ,csite%can_shv(ipa) & ,csite%can_rhos(ipa) & ,can_cp & - ,gbhmos_min & ,cpatch%leaf_gbh(ico) & ,cpatch%leaf_gbw(ico)) !---------------------------------------------------------------------------! @@ -1070,7 +1051,6 @@ subroutine canopy_turbulence(cpoly,isi,ipa) ,csite%can_shv(ipa) & ,csite%can_rhos(ipa) & ,can_cp & - ,gbhmos_min & ,cpatch%wood_gbh(ico) & ,cpatch%wood_gbw(ico)) !---------------------------------------------------------------------------! @@ -1368,8 +1348,6 @@ subroutine canopy_turbulence8(csite,initp,ipa) , infunc_8 & ! intent(in) , gamma_mw99_8 & ! intent(in) , nu_mw99_8 & ! intent(in) - , rb_inter & ! intent(in) - , rb_slope & ! intent(in) , cs_dense08 & ! intent(in) , gamma_clm48 & ! intent(in) , tprandtl8 & ! intent(in) @@ -1440,7 +1418,6 @@ subroutine canopy_turbulence8(csite,initp,ipa) real(kind=8) :: uh ! Wind speed at the canopy top (z=h) [ m/s] real(kind=8) :: factv ! Wind-dependent term for old rasveg real(kind=8) :: aux ! Aux. variable - real(kind=8) :: gbhmos_min ! Minimum leaf boundary layer heat condct. [ m/s] real(kind=8) :: ustarouh ! The ratio of ustar over u(h) [ ---] real(kind=8) :: nn ! In-canopy wind attenuation scal. param. [ ---] real(kind=8) :: waiuse ! Wood area index [ m2/m2] @@ -1538,16 +1515,6 @@ subroutine canopy_turbulence8(csite,initp,ipa) !------------------------------------------------------------------------------------! - !---- Find the minimum boundary layer heat conductance. -----------------------------! - if (any(initp%leaf_resolvable .or. initp%wood_resolvable)) then - gbhmos_min = 1.d0 / ( dble(rb_inter) + dble(rb_slope) & - * (dble(csite%lai(ipa)) + dble(csite%wai(ipa)))) - else - gbhmos_min = 0.d0 - end if - !------------------------------------------------------------------------------------! - - !------------------------------------------------------------------------------------! ! Reset scratch variables in canopy_layer_coms. ! !------------------------------------------------------------------------------------! @@ -1685,7 +1652,7 @@ subroutine canopy_turbulence8(csite,initp,ipa) call leaf_aerodynamic_conductances8(ipft,initp%veg_wind(ico) & ,initp%leaf_temp(ico),initp%can_temp & ,initp%can_shv,initp%can_rhos & - ,initp%can_cp,gbhmos_min & + ,initp%can_cp & ,initp%leaf_gbh(ico),initp%leaf_gbw(ico) & ,initp%leaf_reynolds(ico) & ,initp%leaf_grashof(ico) & @@ -1714,7 +1681,7 @@ subroutine canopy_turbulence8(csite,initp,ipa) ,initp%veg_wind(ico) & ,initp%wood_temp(ico),initp%can_temp & ,initp%can_shv,initp%can_rhos & - ,initp%can_cp,gbhmos_min & + ,initp%can_cp & ,initp%wood_gbh(ico),initp%wood_gbw(ico) & ,initp%wood_reynolds(ico) & ,initp%wood_grashof(ico) & @@ -1848,7 +1815,7 @@ subroutine canopy_turbulence8(csite,initp,ipa) call leaf_aerodynamic_conductances8(ipft,initp%veg_wind(ico) & ,initp%leaf_temp(ico),initp%can_temp & ,initp%can_shv,initp%can_rhos & - ,initp%can_cp,gbhmos_min & + ,initp%can_cp & ,initp%leaf_gbh(ico),initp%leaf_gbw(ico) & ,initp%leaf_reynolds(ico) & ,initp%leaf_grashof(ico) & @@ -1877,7 +1844,7 @@ subroutine canopy_turbulence8(csite,initp,ipa) ,initp%veg_wind(ico) & ,initp%wood_temp(ico),initp%can_temp & ,initp%can_shv,initp%can_rhos & - ,initp%can_cp,gbhmos_min & + ,initp%can_cp & ,initp%wood_gbh(ico),initp%wood_gbw(ico) & ,initp%wood_reynolds(ico) & ,initp%wood_grashof(ico) & @@ -2231,7 +2198,7 @@ subroutine canopy_turbulence8(csite,initp,ipa) call leaf_aerodynamic_conductances8(ipft,initp%veg_wind(ico) & ,initp%leaf_temp(ico),initp%can_temp & ,initp%can_shv,initp%can_rhos & - ,initp%can_cp,gbhmos_min & + ,initp%can_cp & ,initp%leaf_gbh(ico),initp%leaf_gbw(ico) & ,initp%leaf_reynolds(ico) & ,initp%leaf_grashof(ico) & @@ -2260,7 +2227,7 @@ subroutine canopy_turbulence8(csite,initp,ipa) ,initp%veg_wind(ico) & ,initp%wood_temp(ico),initp%can_temp & ,initp%can_shv,initp%can_rhos & - ,initp%can_cp,gbhmos_min & + ,initp%can_cp & ,initp%wood_gbh(ico),initp%wood_gbw(ico) & ,initp%wood_reynolds(ico) & ,initp%wood_grashof(ico) & @@ -3565,7 +3532,7 @@ end subroutine can_whccap8 ! - gbw is in kg_H2O/m2/s. ! !---------------------------------------------------------------------------------------! subroutine leaf_aerodynamic_conductances(ipft,veg_wind,leaf_temp,can_temp,can_shv & - ,can_rhos,can_cp,gbhmos_min,leaf_gbh,leaf_gbw) + ,can_rhos,can_cp,leaf_gbh,leaf_gbw) use pft_coms , only : leaf_width ! ! intent(in) use canopy_air_coms, only : aflat_lami & ! intent(in) , nflat_lami & ! intent(in) @@ -3574,7 +3541,8 @@ subroutine leaf_aerodynamic_conductances(ipft,veg_wind,leaf_temp,can_temp,can_sh , bflat_lami & ! intent(in) , mflat_lami & ! intent(in) , bflat_turb & ! intent(in) - , mflat_turb ! ! intent(in) + , mflat_turb & ! intent(in) + , gbhmos_min ! ! intent(in) use consts_coms , only : gr_coeff & ! intent(in) , th_diffi & ! intent(in) , th_diff ! ! intent(in) @@ -3588,7 +3556,6 @@ subroutine leaf_aerodynamic_conductances(ipft,veg_wind,leaf_temp,can_temp,can_sh real(kind=4) , intent(in) :: can_shv ! Canopy air spec. hum. [ kg/kg] real(kind=4) , intent(in) :: can_rhos ! Canopy air density [ kg/m³] real(kind=4) , intent(in) :: can_cp ! Canopy air spec. heat [ J/kg/K] - real(kind=4) , intent(in) :: gbhmos_min ! Min. Heat conductance [ m/s] real(kind=4) , intent(out) :: leaf_gbh ! Heat conductance [ J/K/m²/s] real(kind=4) , intent(out) :: leaf_gbw ! Water conductance [ kg/m²/s] !----- Local variables. -------------------------------------------------------------! @@ -3680,8 +3647,8 @@ end subroutine leaf_aerodynamic_conductances ! - gbw is in kg_H2O/m2/s. ! !---------------------------------------------------------------------------------------! subroutine leaf_aerodynamic_conductances8(ipft,veg_wind,leaf_temp,can_temp,can_shv & - ,can_rhos,can_cp,gbhmos_min,leaf_gbh,leaf_gbw & - ,reynolds,grashof,nusselt_free,nusselt_forced) + ,can_rhos,can_cp,leaf_gbh,leaf_gbw,reynolds & + ,grashof,nusselt_free,nusselt_forced) use pft_coms , only : leaf_width ! ! intent(in) use canopy_air_coms, only : aflat_lami8 & ! intent(in) , nflat_lami8 & ! intent(in) @@ -3690,7 +3657,8 @@ subroutine leaf_aerodynamic_conductances8(ipft,veg_wind,leaf_temp,can_temp,can_s , bflat_lami8 & ! intent(in) , mflat_lami8 & ! intent(in) , bflat_turb8 & ! intent(in) - , mflat_turb8 ! ! intent(in) + , mflat_turb8 & ! intent(in) + , gbhmos_min8 ! ! intent(in) use consts_coms , only : gr_coeff8 & ! intent(in) , th_diffi8 & ! intent(in) , th_diff8 ! ! intent(in) @@ -3704,7 +3672,6 @@ subroutine leaf_aerodynamic_conductances8(ipft,veg_wind,leaf_temp,can_temp,can_s real(kind=8) , intent(in) :: can_shv ! Canopy air spec. hum. [ kg/kg] real(kind=8) , intent(in) :: can_rhos ! Canopy air density [ kg/m³] real(kind=8) , intent(in) :: can_cp ! Canopy air spec. heat [ J/kg/K] - real(kind=8) , intent(in) :: gbhmos_min ! Min. heat conductance [ m/s] real(kind=8) , intent(out) :: leaf_gbh ! Heat conductance [ J/K/m²/s] real(kind=8) , intent(out) :: leaf_gbw ! Water conductance [ kg/m²/s] real(kind=8) , intent(out) :: grashof ! Grashof number [ ---] @@ -3765,7 +3732,7 @@ subroutine leaf_aerodynamic_conductances8(ipft,veg_wind,leaf_temp,can_temp,can_s ! E5. For the ED purposes, the output variables are converted to the units of ! ! entropy and water fluxes [J/K/m²/s and kg/m²/s, respectively]. ! !------------------------------------------------------------------------------------! - gbh_mos = max(gbhmos_min, free_gbh_mos + forced_gbh_mos) + gbh_mos = max(gbhmos_min8, free_gbh_mos + forced_gbh_mos) leaf_gbh = gbh_mos * can_rhos * can_cp leaf_gbw = gbh_2_gbw8 * gbh_mos * can_rhos !------------------------------------------------------------------------------------! @@ -3796,8 +3763,7 @@ end subroutine leaf_aerodynamic_conductances8 ! - gbw is in kg_H2O/m2/s. ! !---------------------------------------------------------------------------------------! subroutine wood_aerodynamic_conductances(ipft,dbh,height,veg_wind,wood_temp,can_temp & - ,can_shv,can_rhos,can_cp,gbhmos_min,wood_gbh & - ,wood_gbw) + ,can_shv,can_rhos,can_cp,wood_gbh,wood_gbw) use allometry , only : dbh2vol ! ! intent(in) use canopy_air_coms, only : acyli_lami & ! intent(in) , ocyli_lami & ! intent(in) @@ -3808,7 +3774,8 @@ subroutine wood_aerodynamic_conductances(ipft,dbh,height,veg_wind,wood_temp,can_ , bcyli_lami & ! intent(in) , mcyli_lami & ! intent(in) , bcyli_turb & ! intent(in) - , mcyli_turb ! ! intent(in) + , mcyli_turb & ! intent(in) + , gbhmos_min ! ! intent(in) use consts_coms , only : gr_coeff & ! intent(in) , th_diffi & ! intent(in) , th_diff ! ! intent(in) @@ -3824,7 +3791,6 @@ subroutine wood_aerodynamic_conductances(ipft,dbh,height,veg_wind,wood_temp,can_ real(kind=4) , intent(in) :: can_shv ! Canopy air spec. hum. [ kg/kg] real(kind=4) , intent(in) :: can_rhos ! Canopy air density [ kg/m³] real(kind=4) , intent(in) :: can_cp ! Canopy air spec. heat [ J/kg/K] - real(kind=4) , intent(in) :: gbhmos_min ! Min. Heat conductance [ m/s] real(kind=4) , intent(out) :: wood_gbh ! Heat conductance [ J/K/m²/s] real(kind=4) , intent(out) :: wood_gbw ! Water conductance [ kg/m²/s] !----- Local variables. -------------------------------------------------------------! @@ -3923,9 +3889,8 @@ end subroutine wood_aerodynamic_conductances ! - gbw is in kg_H2O/m2/s. ! !---------------------------------------------------------------------------------------! subroutine wood_aerodynamic_conductances8(ipft,dbh,height,veg_wind,wood_temp,can_temp & - ,can_shv,can_rhos,can_cp,gbhmos_min,wood_gbh & - ,wood_gbw,reynolds,grashof,nusselt_free & - ,nusselt_forced) + ,can_shv,can_rhos,can_cp,wood_gbh,wood_gbw & + ,reynolds,grashof,nusselt_free,nusselt_forced) use allometry , only : dbh2vol ! ! intent(in) use canopy_air_coms, only : ocyli_lami8 & ! intent(in) , acyli_lami8 & ! intent(in) @@ -3936,7 +3901,8 @@ subroutine wood_aerodynamic_conductances8(ipft,dbh,height,veg_wind,wood_temp,can , bcyli_lami8 & ! intent(in) , mcyli_lami8 & ! intent(in) , bcyli_turb8 & ! intent(in) - , mcyli_turb8 ! ! intent(in) + , mcyli_turb8 & ! intent(in) + , gbhmos_min8 ! ! intent(in) use consts_coms , only : gr_coeff8 & ! intent(in) , th_diffi8 & ! intent(in) , th_diff8 ! ! intent(in) @@ -3952,7 +3918,6 @@ subroutine wood_aerodynamic_conductances8(ipft,dbh,height,veg_wind,wood_temp,can real(kind=8) , intent(in) :: can_shv ! Canopy air spec. hum. [ kg/kg] real(kind=8) , intent(in) :: can_rhos ! Canopy air density [ kg/m³] real(kind=8) , intent(in) :: can_cp ! Canopy air spec. heat [ J/kg/K] - real(kind=8) , intent(in) :: gbhmos_min ! Min. heat conductance [ m/s] real(kind=8) , intent(out) :: wood_gbh ! Heat conductance [ J/K/m²/s] real(kind=8) , intent(out) :: wood_gbw ! Water conductance [ kg/m²/s] real(kind=8) , intent(out) :: grashof ! Grashof number [ ---] @@ -4020,7 +3985,7 @@ subroutine wood_aerodynamic_conductances8(ipft,dbh,height,veg_wind,wood_temp,can ! E5. For the ED purposes, the output variables are converted to the units of ! ! entropy and water fluxes [J/K/m²/s and kg/m²/s, respectively]. ! !------------------------------------------------------------------------------------! - gbh_mos = max(gbhmos_min, free_gbh_mos + forced_gbh_mos) + gbh_mos = max(gbhmos_min8, free_gbh_mos + forced_gbh_mos) wood_gbh = gbh_mos * can_rhos * can_cp wood_gbw = gbh_2_gbw8 * gbh_mos * can_rhos !------------------------------------------------------------------------------------! diff --git a/ED/src/dynamics/disturbance.f90 b/ED/src/dynamics/disturbance.f90 index 49f870ac6..7a8897a21 100644 --- a/ED/src/dynamics/disturbance.f90 +++ b/ED/src/dynamics/disturbance.f90 @@ -358,6 +358,8 @@ subroutine apply_disturbances(cgrid) !---------------------------------------------------------------------! call update_patch_thermo_props(csite,new_lu+onsp,new_lu+onsp,nzg,nzs & ,cpoly%ntext_soil(:,isi)) + call update_patch_thermo_fmean(csite,new_lu+onsp,new_lu+onsp,nzg & + ,cpoly%ntext_soil(:,isi)) !----- If the new patch is agriculture, plant it with grasses. -------! if (new_lu == 1) then @@ -1318,8 +1320,6 @@ subroutine normal_patch_vars(csite,ipa, area_fac) csite%ggbare (ipa) = csite%ggbare (ipa) * area_fac csite%ggveg (ipa) = csite%ggveg (ipa) * area_fac csite%rough (ipa) = csite%rough (ipa) * area_fac - csite%mean_rh (ipa) = csite%mean_rh (ipa) * area_fac - csite%mean_cwd_rh (ipa) = csite%mean_cwd_rh (ipa) * area_fac csite%today_A_decomp (ipa) = csite%today_A_decomp (ipa) * area_fac csite%today_Af_decomp (ipa) = csite%today_Af_decomp (ipa) * area_fac csite%fsc_in (ipa) = csite%fsc_in (ipa) * area_fac @@ -1343,11 +1343,69 @@ subroutine normal_patch_vars(csite,ipa, area_fac) csite%soil_energy (k,ipa) = csite%soil_energy (k,ipa) * area_fac csite%soil_water(k,ipa) = csite%soil_water (k,ipa) * area_fac end do - - csite%fast_soil_C(ipa) = csite%fast_soil_C(ipa) * area_fac - csite%structural_soil_C(ipa) = csite%structural_soil_C(ipa) * area_fac - csite%structural_soil_L(ipa) = csite%structural_soil_L(ipa) * area_fac - csite%fast_soil_N(ipa) = csite%fast_soil_N(ipa) * area_fac + !------------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------------! + ! Fast means must be aggregated as well. ! + !------------------------------------------------------------------------------------! + csite%fmean_rh (ipa) = csite%fmean_rh (ipa) * area_fac + csite%fmean_cwd_rh (ipa) = csite%fmean_cwd_rh (ipa) * area_fac + csite%fmean_nep (ipa) = csite%fmean_nep (ipa) * area_fac + csite%fmean_rk4step (ipa) = csite%fmean_rk4step (ipa) * area_fac + csite%fmean_available_water(ipa) = csite%fmean_available_water(ipa) * area_fac + csite%fmean_can_theiv (ipa) = csite%fmean_can_theiv (ipa) * area_fac + csite%fmean_can_theta (ipa) = csite%fmean_can_theta (ipa) * area_fac + csite%fmean_can_vpdef (ipa) = csite%fmean_can_vpdef (ipa) * area_fac + csite%fmean_can_shv (ipa) = csite%fmean_can_shv (ipa) * area_fac + csite%fmean_can_co2 (ipa) = csite%fmean_can_co2 (ipa) * area_fac + csite%fmean_can_prss (ipa) = csite%fmean_can_prss (ipa) * area_fac + csite%fmean_gnd_temp (ipa) = csite%fmean_gnd_temp (ipa) * area_fac + csite%fmean_gnd_shv (ipa) = csite%fmean_gnd_shv (ipa) * area_fac + csite%fmean_can_ggnd (ipa) = csite%fmean_can_ggnd (ipa) * area_fac + csite%fmean_sfcw_depth (ipa) = csite%fmean_sfcw_depth (ipa) * area_fac + csite%fmean_sfcw_energy (ipa) = csite%fmean_sfcw_energy (ipa) * area_fac + csite%fmean_sfcw_mass (ipa) = csite%fmean_sfcw_mass (ipa) * area_fac + csite%fmean_rshort_gnd (ipa) = csite%fmean_rshort_gnd (ipa) * area_fac + csite%fmean_par_gnd (ipa) = csite%fmean_par_gnd (ipa) * area_fac + csite%fmean_rlong_gnd (ipa) = csite%fmean_rlong_gnd (ipa) * area_fac + csite%fmean_rlongup (ipa) = csite%fmean_rlongup (ipa) * area_fac + csite%fmean_parup (ipa) = csite%fmean_parup (ipa) * area_fac + csite%fmean_nirup (ipa) = csite%fmean_nirup (ipa) * area_fac + csite%fmean_rshortup (ipa) = csite%fmean_rshortup (ipa) * area_fac + csite%fmean_rnet (ipa) = csite%fmean_rnet (ipa) * area_fac + csite%fmean_albedo (ipa) = csite%fmean_albedo (ipa) * area_fac + csite%fmean_albedo_beam (ipa) = csite%fmean_albedo_beam (ipa) * area_fac + csite%fmean_albedo_diff (ipa) = csite%fmean_albedo_diff (ipa) * area_fac + csite%fmean_rlong_albedo (ipa) = csite%fmean_rlong_albedo (ipa) * area_fac + csite%fmean_ustar (ipa) = csite%fmean_ustar (ipa) * area_fac + csite%fmean_tstar (ipa) = csite%fmean_tstar (ipa) * area_fac + csite%fmean_qstar (ipa) = csite%fmean_qstar (ipa) * area_fac + csite%fmean_cstar (ipa) = csite%fmean_cstar (ipa) * area_fac + csite%fmean_carbon_ac (ipa) = csite%fmean_carbon_ac (ipa) * area_fac + csite%fmean_carbon_st (ipa) = csite%fmean_carbon_st (ipa) * area_fac + csite%fmean_vapor_gc (ipa) = csite%fmean_vapor_gc (ipa) * area_fac + csite%fmean_vapor_ac (ipa) = csite%fmean_vapor_ac (ipa) * area_fac + csite%fmean_throughfall (ipa) = csite%fmean_throughfall (ipa) * area_fac + csite%fmean_runoff (ipa) = csite%fmean_runoff (ipa) * area_fac + csite%fmean_drainage (ipa) = csite%fmean_drainage (ipa) * area_fac + csite%fmean_sensible_gc (ipa) = csite%fmean_sensible_gc (ipa) * area_fac + csite%fmean_sensible_ac (ipa) = csite%fmean_sensible_ac (ipa) * area_fac + csite%fmean_qthroughfall (ipa) = csite%fmean_qthroughfall (ipa) * area_fac + csite%fmean_qrunoff (ipa) = csite%fmean_qrunoff (ipa) * area_fac + csite%fmean_qdrainage (ipa) = csite%fmean_qdrainage (ipa) * area_fac + + do k=1, nzg + csite%fmean_soil_energy(k,ipa) = csite%fmean_soil_energy(k,ipa) * area_fac + csite%fmean_soil_water (k,ipa) = csite%fmean_soil_water (k,ipa) * area_fac + csite%fmean_smoist_gg (k,ipa) = csite%fmean_smoist_gg (k,ipa) * area_fac + csite%fmean_transloss (k,ipa) = csite%fmean_transloss (k,ipa) * area_fac + csite%fmean_sensible_gg(k,ipa) = csite%fmean_sensible_gg(k,ipa) * area_fac + end do + !------------------------------------------------------------------------------------! + return end subroutine normal_patch_vars !=======================================================================================! @@ -1445,12 +1503,6 @@ subroutine increment_patch_vars(csite,np, cp, area_fac) csite%rough (np) = csite%rough (np) & + csite%rough (cp) & * area_fac - csite%mean_rh (np) = csite%mean_rh (np) & - + csite%mean_rh (cp) & - * area_fac - csite%mean_cwd_rh (np) = csite%mean_cwd_rh (np) & - + csite%mean_cwd_rh (cp) & - * area_fac csite%today_A_decomp (np) = csite%today_A_decomp (np) & + csite%today_A_decomp (cp) & * area_fac @@ -1495,10 +1547,176 @@ subroutine increment_patch_vars(csite,np, cp, area_fac) csite%soil_energy (k,np) = csite%soil_energy (k,np) & + csite%soil_energy (k,cp) & * area_fac - csite%soil_water(k,np) = csite%soil_water (k,np) & + csite%soil_water (k,np) = csite%soil_water (k,np) & + csite%soil_water (k,cp) & * area_fac end do + !------------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------------! + ! Fast means must be aggregated as well. ! + !------------------------------------------------------------------------------------! + csite%fmean_rh (np) = csite%fmean_rh (np) & + + csite%fmean_rh (cp) & + * area_fac + csite%fmean_cwd_rh (np) = csite%fmean_cwd_rh (np) & + + csite%fmean_cwd_rh (cp) & + * area_fac + csite%fmean_nep (np) = csite%fmean_nep (np) & + + csite%fmean_nep (cp) & + * area_fac + csite%fmean_rk4step (np) = csite%fmean_rk4step (np) & + + csite%fmean_rk4step (cp) & + * area_fac + csite%fmean_available_water(np) = csite%fmean_available_water(np) & + + csite%fmean_available_water(cp) & + * area_fac + csite%fmean_can_theiv (np) = csite%fmean_can_theiv (np) & + + csite%fmean_can_theiv (cp) & + * area_fac + csite%fmean_can_theta (np) = csite%fmean_can_theta (np) & + + csite%fmean_can_theta (cp) & + * area_fac + csite%fmean_can_vpdef (np) = csite%fmean_can_vpdef (np) & + + csite%fmean_can_vpdef (cp) & + * area_fac + csite%fmean_can_shv (np) = csite%fmean_can_shv (np) & + + csite%fmean_can_shv (cp) & + * area_fac + csite%fmean_can_co2 (np) = csite%fmean_can_co2 (np) & + + csite%fmean_can_co2 (cp) & + * area_fac + csite%fmean_can_prss (np) = csite%fmean_can_prss (np) & + + csite%fmean_can_prss (cp) & + * area_fac + csite%fmean_gnd_temp (np) = csite%fmean_gnd_temp (np) & + + csite%fmean_gnd_temp (cp) & + * area_fac + csite%fmean_gnd_shv (np) = csite%fmean_gnd_shv (np) & + + csite%fmean_gnd_shv (cp) & + * area_fac + csite%fmean_can_ggnd (np) = csite%fmean_can_ggnd (np) & + + csite%fmean_can_ggnd (cp) & + * area_fac + csite%fmean_sfcw_depth (np) = csite%fmean_sfcw_depth (np) & + + csite%fmean_sfcw_depth (cp) & + * area_fac + !----- Integrate pounding energy in J/m2. -------------------------------------------! + csite%fmean_sfcw_energy (np) = csite%fmean_sfcw_energy (np) & + + csite%fmean_sfcw_energy (cp) & + * csite%fmean_sfcw_mass (cp) & + * area_fac + csite%fmean_sfcw_mass (np) = csite%fmean_sfcw_mass (np) & + + csite%fmean_sfcw_mass (cp) & + * area_fac + csite%fmean_rshort_gnd (np) = csite%fmean_rshort_gnd (np) & + + csite%fmean_rshort_gnd (cp) & + * area_fac + csite%fmean_par_gnd (np) = csite%fmean_par_gnd (np) & + + csite%fmean_par_gnd (cp) & + * area_fac + csite%fmean_rlong_gnd (np) = csite%fmean_rlong_gnd (np) & + + csite%fmean_rlong_gnd (cp) & + * area_fac + csite%fmean_rlongup (np) = csite%fmean_rlongup (np) & + + csite%fmean_rlongup (cp) & + * area_fac + csite%fmean_parup (np) = csite%fmean_parup (np) & + + csite%fmean_parup (cp) & + * area_fac + csite%fmean_nirup (np) = csite%fmean_nirup (np) & + + csite%fmean_nirup (cp) & + * area_fac + csite%fmean_rshortup (np) = csite%fmean_rshortup (np) & + + csite%fmean_rshortup (cp) & + * area_fac + csite%fmean_rnet (np) = csite%fmean_rnet (np) & + + csite%fmean_rnet (cp) & + * area_fac + csite%fmean_albedo (np) = csite%fmean_albedo (np) & + + csite%fmean_albedo (cp) & + * area_fac + csite%fmean_albedo_beam (np) = csite%fmean_albedo_beam (np) & + + csite%fmean_albedo_beam (cp) & + * area_fac + csite%fmean_albedo_diff (np) = csite%fmean_albedo_diff (np) & + + csite%fmean_albedo_diff (cp) & + * area_fac + csite%fmean_rlong_albedo (np) = csite%fmean_rlong_albedo (np) & + + csite%fmean_rlong_albedo (cp) & + * area_fac + csite%fmean_ustar (np) = csite%fmean_ustar (np) & + + csite%fmean_ustar (cp) & + * area_fac + csite%fmean_tstar (np) = csite%fmean_tstar (np) & + + csite%fmean_tstar (cp) & + * area_fac + csite%fmean_qstar (np) = csite%fmean_qstar (np) & + + csite%fmean_qstar (cp) & + * area_fac + csite%fmean_cstar (np) = csite%fmean_cstar (np) & + + csite%fmean_cstar (cp) & + * area_fac + csite%fmean_carbon_ac (np) = csite%fmean_carbon_ac (np) & + + csite%fmean_carbon_ac (cp) & + * area_fac + csite%fmean_carbon_st (np) = csite%fmean_carbon_st (np) & + + csite%fmean_carbon_st (cp) & + * area_fac + csite%fmean_vapor_gc (np) = csite%fmean_vapor_gc (np) & + + csite%fmean_vapor_gc (cp) & + * area_fac + csite%fmean_vapor_ac (np) = csite%fmean_vapor_ac (np) & + + csite%fmean_vapor_ac (cp) & + * area_fac + csite%fmean_throughfall (np) = csite%fmean_throughfall (np) & + + csite%fmean_throughfall (cp) & + * area_fac + csite%fmean_runoff (np) = csite%fmean_runoff (np) & + + csite%fmean_runoff (cp) & + * area_fac + csite%fmean_drainage (np) = csite%fmean_drainage (np) & + + csite%fmean_drainage (cp) & + * area_fac + csite%fmean_sensible_gc (np) = csite%fmean_sensible_gc (np) & + + csite%fmean_sensible_gc (cp) & + * area_fac + csite%fmean_sensible_ac (np) = csite%fmean_sensible_ac (np) & + + csite%fmean_sensible_ac (cp) & + * area_fac + csite%fmean_qthroughfall (np) = csite%fmean_qthroughfall (np) & + + csite%fmean_qthroughfall (cp) & + * area_fac + csite%fmean_qrunoff (np) = csite%fmean_qrunoff (np) & + + csite%fmean_qrunoff (cp) & + * area_fac + csite%fmean_qdrainage (np) = csite%fmean_qdrainage (np) & + + csite%fmean_qdrainage (cp) & + * area_fac + + do k=1, nzg + csite%fmean_soil_energy(k,np) = csite%fmean_soil_energy(k,np) & + + csite%fmean_soil_energy(k,cp) & + * area_fac + csite%fmean_soil_water (k,np) = csite%fmean_soil_water (k,np) & + + csite%fmean_soil_water (k,cp) & + * area_fac + csite%fmean_smoist_gg (k,np) = csite%fmean_smoist_gg (k,np) & + + csite%fmean_smoist_gg (k,cp) & + * area_fac + csite%fmean_transloss (k,np) = csite%fmean_transloss (k,np) & + + csite%fmean_transloss (k,cp) & + * area_fac + csite%fmean_sensible_gg(k,np) = csite%fmean_sensible_gg(k,np) & + + csite%fmean_sensible_gg(k,cp) & + * area_fac + end do + !------------------------------------------------------------------------------------! + + return end subroutine increment_patch_vars !=======================================================================================! diff --git a/ED/src/dynamics/euler_driver.f90 b/ED/src/dynamics/euler_driver.f90 index 5eab8d5e9..aaa7283b2 100644 --- a/ED/src/dynamics/euler_driver.f90 +++ b/ED/src/dynamics/euler_driver.f90 @@ -182,10 +182,11 @@ subroutine euler_timestep(cgrid) call integrate_patch_euler(csite,integration_buff%initp & ,integration_buff%dinitp,integration_buff%ytemp & ,integration_buff%yscal,integration_buff%yerr & - ,integration_buff%dydx,ipa,wcurr_loss2atm & - ,ecurr_netrad,ecurr_loss2atm,co2curr_loss2atm & - ,wcurr_loss2drainage,ecurr_loss2drainage & - ,wcurr_loss2runoff,ecurr_loss2runoff,nsteps) + ,integration_buff%dydx,ipa,cpoly%nighttime(isi) & + ,wcurr_loss2atm,ecurr_netrad,ecurr_loss2atm & + ,co2curr_loss2atm,wcurr_loss2drainage & + ,ecurr_loss2drainage,wcurr_loss2runoff & + ,ecurr_loss2runoff,nsteps) !------------------------------------------------------------------------------! @@ -238,7 +239,7 @@ end subroutine euler_timestep ! This subroutine will drive the integration process using the Euler method. Notice ! ! that most of the Euler method utilises the subroutines from Runge-Kutta. ! !------------------------------------------------------------------------------------------! -subroutine integrate_patch_euler(csite,initp,dinitp,ytemp,yscal,yerr,dydx,ipa & +subroutine integrate_patch_euler(csite,initp,dinitp,ytemp,yscal,yerr,dydx,ipa,nighttime & ,wcurr_loss2atm,ecurr_netrad,ecurr_loss2atm & ,co2curr_loss2atm,wcurr_loss2drainage,ecurr_loss2drainage & ,wcurr_loss2runoff,ecurr_loss2runoff,nsteps) @@ -269,6 +270,7 @@ subroutine integrate_patch_euler(csite,initp,dinitp,ytemp,yscal,yerr,dydx,ipa type(rk4patchtype) , target :: yerr type(rk4patchtype) , target :: dydx integer , intent(in) :: ipa + logical , intent(in) :: nighttime real , intent(out) :: wcurr_loss2atm real , intent(out) :: ecurr_netrad real , intent(out) :: ecurr_loss2atm @@ -325,7 +327,7 @@ subroutine integrate_patch_euler(csite,initp,dinitp,ytemp,yscal,yerr,dydx,ipa !---------------------------------------------------------------------------------------! ! Move the state variables from the integrated patch to the model patch. ! !---------------------------------------------------------------------------------------! - call initp2modelp(tend-tbeg,initp,csite,ipa,wcurr_loss2atm,ecurr_netrad & + call initp2modelp(tend-tbeg,initp,csite,ipa,nighttime,wcurr_loss2atm,ecurr_netrad & ,ecurr_loss2atm,co2curr_loss2atm,wcurr_loss2drainage & ,ecurr_loss2drainage,wcurr_loss2runoff,ecurr_loss2runoff) @@ -643,12 +645,12 @@ subroutine euler_integ(h1,csite,initp,dinitp,ytemp,yscal,yerr,dydx,ipa,nsteps) !----- Compute runoff for output -------------------------------------------! if (fast_diagnostics) then - csite%runoff(ipa) = csite%runoff(ipa) & - + sngloff(wfreeb * dtrk4i,tiny_offset) - csite%avg_runoff(ipa) = csite%avg_runoff(ipa) & - + sngloff(wfreeb * dtrk4i,tiny_offset) - csite%avg_runoff_heat(ipa) = csite%avg_runoff_heat(ipa) & - + sngloff(qwfree * dtrk4i,tiny_offset) + csite%runoff (ipa) = csite%runoff(ipa) & + + sngloff(wfreeb * dtrk4i,tiny_offset) + csite%fmean_runoff (ipa) = csite%fmean_runoff(ipa) & + + sngloff(wfreeb * dtrk4i,tiny_offset) + csite%fmean_qrunoff(ipa) = csite%fmean_qrunoff(ipa) & + + sngloff(qwfree * dtrk4i,tiny_offset) end if if (checkbudget) then initp%wbudget_loss2runoff = initp%wbudget_loss2runoff + wfreeb @@ -665,8 +667,8 @@ subroutine euler_integ(h1,csite,initp,dinitp,ytemp,yscal,yerr,dydx,ipa,nsteps) ! Update the average time step. The square of DTLSM (tend-tbeg) is needed ! ! because we will divide this by the time between t0 and t0+frqsum. ! !---------------------------------------------------------------------------------! - csite%avg_rk4step(ipa) = csite%avg_rk4step(ipa) & - + sngl((tend-tbeg)*(tend-tbeg))/real(i) + csite%fmean_rk4step(ipa) = csite%fmean_rk4step(ipa) & + + sngl((tend-tbeg)*(tend-tbeg))/real(i) nsteps = i return end if diff --git a/ED/src/dynamics/forestry.f90 b/ED/src/dynamics/forestry.f90 index 38b93c373..b1365a689 100644 --- a/ED/src/dynamics/forestry.f90 +++ b/ED/src/dynamics/forestry.f90 @@ -770,8 +770,6 @@ subroutine norm_harv_patch(csite,newp) csite%ggbare(newp) = csite%ggbare(newp) * area_fac csite%ggveg(newp) = csite%ggveg(newp) * area_fac csite%rough(newp) = csite%rough(newp) * area_fac - csite%mean_rh(newp) = csite%mean_rh(newp) * area_fac - csite%mean_cwd_rh(newp) = csite%mean_cwd_rh(newp) * area_fac csite%today_A_decomp(newp) = csite%today_A_decomp(newp) * area_fac csite%today_Af_decomp(newp) = csite%today_Af_decomp(newp) * area_fac csite%repro(1:n_pft,newp) = csite%repro(1:n_pft,newp) * area_fac diff --git a/ED/src/dynamics/heun_driver.f90 b/ED/src/dynamics/heun_driver.f90 index 7b380be07..0be539c5c 100644 --- a/ED/src/dynamics/heun_driver.f90 +++ b/ED/src/dynamics/heun_driver.f90 @@ -180,10 +180,10 @@ subroutine heun_timestep(cgrid) ! This is the step in which the derivatives are computed, we a structure ! ! that is very similar to the Runge-Kutta, though a simpler one. ! !------------------------------------------------------------------------------! - call integrate_patch_heun(csite,ipa,wcurr_loss2atm,ecurr_netrad,ecurr_loss2atm & - ,co2curr_loss2atm,wcurr_loss2drainage & - ,ecurr_loss2drainage,wcurr_loss2runoff & - ,ecurr_loss2runoff,nsteps) + call integrate_patch_heun(csite,ipa,cpoly%nighttime(isi),wcurr_loss2atm & + ,ecurr_netrad,ecurr_loss2atm,co2curr_loss2atm & + ,wcurr_loss2drainage,ecurr_loss2drainage & + ,wcurr_loss2runoff,ecurr_loss2runoff,nsteps) !------------------------------------------------------------------------------! @@ -237,9 +237,10 @@ end subroutine heun_timestep ! This subroutine will drive the integration process using the Heun method. Notice ! ! that most of the Heun method utilises the subroutines from Runge-Kutta. ! !------------------------------------------------------------------------------------------! -subroutine integrate_patch_heun(csite,ipa,wcurr_loss2atm,ecurr_netrad,ecurr_loss2atm & - ,co2curr_loss2atm,wcurr_loss2drainage,ecurr_loss2drainage & - ,wcurr_loss2runoff,ecurr_loss2runoff,nsteps) +subroutine integrate_patch_heun(csite,ipa,nighttime,wcurr_loss2atm,ecurr_netrad & + ,ecurr_loss2atm,co2curr_loss2atm,wcurr_loss2drainage & + ,ecurr_loss2drainage,wcurr_loss2runoff,ecurr_loss2runoff & + ,nsteps) use ed_state_vars , only : sitetype & ! structure , patchtype ! ! structure use ed_misc_coms , only : dtlsm ! ! intent(in) @@ -261,6 +262,7 @@ subroutine integrate_patch_heun(csite,ipa,wcurr_loss2atm,ecurr_netrad,ecurr_loss !----- Arguments -----------------------------------------------------------------------! type(sitetype) , target :: csite integer , intent(in) :: ipa + logical , intent(in) :: nighttime real , intent(out) :: wcurr_loss2atm real , intent(out) :: ecurr_netrad real , intent(out) :: ecurr_loss2atm @@ -322,7 +324,7 @@ subroutine integrate_patch_heun(csite,ipa,wcurr_loss2atm,ecurr_netrad,ecurr_loss !---------------------------------------------------------------------------------------! ! Move the state variables from the integrated patch to the model patch. ! !---------------------------------------------------------------------------------------! - call initp2modelp(tend-tbeg,integration_buff%initp,csite,ipa,wcurr_loss2atm & + call initp2modelp(tend-tbeg,integration_buff%initp,csite,ipa,nighttime,wcurr_loss2atm & ,ecurr_netrad,ecurr_loss2atm,co2curr_loss2atm,wcurr_loss2drainage & ,ecurr_loss2drainage,wcurr_loss2runoff,ecurr_loss2runoff) @@ -664,12 +666,12 @@ subroutine heun_integ(h1,csite,ipa,nsteps) !----- Compute runoff for output -------------------------------------------! if (fast_diagnostics) then - csite%runoff(ipa) = csite%runoff(ipa) & - + sngloff(wfreeb * dtrk4i,tiny_offset) - csite%avg_runoff(ipa) = csite%avg_runoff(ipa) & - + sngloff(wfreeb * dtrk4i,tiny_offset) - csite%avg_runoff_heat(ipa) = csite%avg_runoff_heat(ipa) & - + sngloff(qwfree * dtrk4i,tiny_offset) + csite%runoff (ipa) = csite%runoff(ipa) & + + sngloff(wfreeb * dtrk4i,tiny_offset) + csite%fmean_runoff (ipa) = csite%fmean_runoff(ipa) & + + sngloff(wfreeb * dtrk4i,tiny_offset) + csite%fmean_qrunoff(ipa) = csite%fmean_qrunoff(ipa) & + + sngloff(qwfree * dtrk4i,tiny_offset) end if if (checkbudget) then integration_buff%y%wbudget_loss2runoff = wfreeb & @@ -694,8 +696,8 @@ subroutine heun_integ(h1,csite,ipa,nsteps) ! Update the average time step. The square of DTLSM (tend-tbeg) is needed ! ! because we will divide this by the time between t0 and t0+frqsum. ! !---------------------------------------------------------------------------------! - csite%avg_rk4step(ipa) = csite%avg_rk4step(ipa) & - + sngl((tend-tbeg)*(tend-tbeg))/real(i) + csite%fmean_rk4step(ipa) = csite%fmean_rk4step(ipa) & + + sngl((tend-tbeg)*(tend-tbeg))/real(i) nsteps = i return end if diff --git a/ED/src/dynamics/hybrid_driver.f90 b/ED/src/dynamics/hybrid_driver.f90 index 5d18c3078..a237bd6bd 100644 --- a/ED/src/dynamics/hybrid_driver.f90 +++ b/ED/src/dynamics/hybrid_driver.f90 @@ -242,10 +242,10 @@ subroutine hybrid_timestep(cgrid) !--------------------------------------------------------------------------! ! Move the state variables from the integrated patch to the model patch. ! !--------------------------------------------------------------------------! - - call initp2modelp(tend-tbeg,initp,csite,ipa,wcurr_loss2atm,ecurr_netrad & - ,ecurr_loss2atm,co2curr_loss2atm,wcurr_loss2drainage & - ,ecurr_loss2drainage,wcurr_loss2runoff,ecurr_loss2runoff) + call initp2modelp(tend-tbeg,initp,csite,ipa,cpoly%nighttime(isi) & + ,wcurr_loss2atm,ecurr_netrad,ecurr_loss2atm & + ,co2curr_loss2atm,wcurr_loss2drainage,ecurr_loss2drainage & + ,wcurr_loss2runoff,ecurr_loss2runoff) !----- Add the number of steps into the step counter. -------------! @@ -639,12 +639,12 @@ subroutine hybrid_integ(h1,csite,yprev,initp,dinitp,ytemp,ipa,nsteps) !----- Compute runoff for output -------------------------------------------! if (fast_diagnostics) then - csite%runoff(ipa) = csite%runoff(ipa) & - + sngloff(wfreeb * dtrk4i,tiny_offset) - csite%avg_runoff(ipa) = csite%avg_runoff(ipa) & - + sngloff(wfreeb * dtrk4i,tiny_offset) - csite%avg_runoff_heat(ipa) = csite%avg_runoff_heat(ipa) & - + sngloff(qwfree * dtrk4i,tiny_offset) + csite%runoff (ipa) = csite%runoff(ipa) & + + sngloff(wfreeb * dtrk4i,tiny_offset) + csite%fmean_runoff (ipa) = csite%fmean_runoff(ipa) & + + sngloff(wfreeb * dtrk4i,tiny_offset) + csite%fmean_qrunoff(ipa) = csite%fmean_qrunoff(ipa) & + + sngloff(qwfree * dtrk4i,tiny_offset) end if if (checkbudget) then initp%wbudget_loss2runoff = initp%wbudget_loss2runoff + wfreeb @@ -665,7 +665,7 @@ subroutine hybrid_integ(h1,csite,yprev,initp,dinitp,ytemp,ipa,nsteps) ! Update the average time step. The square of DTLSM (tend-tbeg) is needed ! ! because we will divide this by the time between t0 and t0+frqsum. ! !---------------------------------------------------------------------------------! - csite%avg_rk4step(ipa) = csite%avg_rk4step(ipa) & + csite%fmean_rk4step(ipa) = csite%fmean_rk4step(ipa) & + sngl((tend-tbeg)*(tend-tbeg))/real(i) nsteps = i return @@ -772,6 +772,7 @@ subroutine copy_fb_patch(sourcep, targetp, cpatch) do k=rk4site%lsl,nzg targetp%soil_water (k) = sourcep%soil_water (k) + targetp%soil_mstpot (k) = sourcep%soil_mstpot (k) targetp%soil_energy (k) = sourcep%soil_energy (k) targetp%soil_tempk (k) = sourcep%soil_tempk (k) targetp%soil_fracliq (k) = sourcep%soil_fracliq (k) @@ -870,27 +871,14 @@ subroutine copy_fb_patch(sourcep, targetp, cpatch) targetp%avg_cstar = sourcep%avg_cstar targetp%avg_carbon_ac = sourcep%avg_carbon_ac targetp%avg_carbon_st = sourcep%avg_carbon_st - targetp%avg_vapor_lc = sourcep%avg_vapor_lc - targetp%avg_vapor_wc = sourcep%avg_vapor_wc targetp%avg_vapor_gc = sourcep%avg_vapor_gc - targetp%avg_wshed_vg = sourcep%avg_wshed_vg - targetp%avg_intercepted = sourcep%avg_intercepted targetp%avg_throughfall = sourcep%avg_throughfall targetp%avg_vapor_ac = sourcep%avg_vapor_ac - targetp%avg_transp = sourcep%avg_transp - targetp%avg_evap = sourcep%avg_evap - targetp%avg_rshort_gnd = sourcep%avg_rshort_gnd - targetp%avg_par_gnd = sourcep%avg_par_gnd - targetp%avg_rlong_gnd = sourcep%avg_rlong_gnd - targetp%avg_sensible_lc = sourcep%avg_sensible_lc - targetp%avg_sensible_wc = sourcep%avg_sensible_wc - targetp%avg_qwshed_vg = sourcep%avg_qwshed_vg - targetp%avg_qintercepted = sourcep%avg_qintercepted targetp%avg_qthroughfall = sourcep%avg_qthroughfall targetp%avg_sensible_gc = sourcep%avg_sensible_gc targetp%avg_sensible_ac = sourcep%avg_sensible_ac targetp%avg_drainage = sourcep%avg_drainage - targetp%avg_drainage_heat = sourcep%avg_drainage_heat + targetp%avg_qdrainage = sourcep%avg_qdrainage do k=rk4site%lsl,nzg @@ -901,15 +889,15 @@ subroutine copy_fb_patch(sourcep, targetp, cpatch) do k=1,cpatch%ncohorts - targetp%cav_sensible_lc (k) = sourcep%cav_sensible_lc (k) - targetp%cav_sensible_wc (k) = sourcep%cav_sensible_wc (k) - targetp%cav_vapor_lc (k) = sourcep%cav_vapor_lc (k) - targetp%cav_vapor_wc (k) = sourcep%cav_vapor_wc (k) - targetp%cav_transp (k) = sourcep%cav_transp (k) - targetp%cav_intercepted_al (k) = sourcep%cav_intercepted_al(k) - targetp%cav_intercepted_aw (k) = sourcep%cav_intercepted_aw(k) - targetp%cav_wshed_lg (k) = sourcep%cav_wshed_lg (k) - targetp%cav_wshed_wg (k) = sourcep%cav_wshed_wg (k) + targetp%avg_sensible_lc (k) = sourcep%avg_sensible_lc (k) + targetp%avg_sensible_wc (k) = sourcep%avg_sensible_wc (k) + targetp%avg_vapor_lc (k) = sourcep%avg_vapor_lc (k) + targetp%avg_vapor_wc (k) = sourcep%avg_vapor_wc (k) + targetp%avg_transp (k) = sourcep%avg_transp (k) + targetp%avg_intercepted_al (k) = sourcep%avg_intercepted_al(k) + targetp%avg_intercepted_aw (k) = sourcep%avg_intercepted_aw(k) + targetp%avg_wshed_lg (k) = sourcep%avg_wshed_lg (k) + targetp%avg_wshed_wg (k) = sourcep%avg_wshed_wg (k) end do end if @@ -924,7 +912,6 @@ subroutine copy_fb_patch(sourcep, targetp, cpatch) targetp%flx_throughfall = sourcep%flx_throughfall targetp%flx_vapor_ac = sourcep%flx_vapor_ac targetp%flx_transp = sourcep%flx_transp - targetp%flx_evap = sourcep%flx_evap targetp%flx_rshort_gnd = sourcep%flx_rshort_gnd targetp%flx_par_gnd = sourcep%flx_par_gnd targetp%flx_rlong_gnd = sourcep%flx_rlong_gnd @@ -936,7 +923,7 @@ subroutine copy_fb_patch(sourcep, targetp, cpatch) targetp%flx_sensible_gc = sourcep%flx_sensible_gc targetp%flx_sensible_ac = sourcep%flx_sensible_ac targetp%flx_drainage = sourcep%flx_drainage - targetp%flx_drainage_heat = sourcep%flx_drainage_heat + targetp%flx_qdrainage = sourcep%flx_qdrainage do k=rk4site%lsl,nzg targetp%flx_sensible_gg(k) = sourcep%flx_sensible_gg(k) @@ -1128,24 +1115,11 @@ subroutine inc_fwd_patch(rkp, inc, fac, cpatch) rkp%avg_carbon_ac = rkp%avg_carbon_ac + fac * inc%avg_carbon_ac rkp%avg_carbon_st = rkp%avg_carbon_st + fac * inc%avg_carbon_st - rkp%avg_vapor_lc = rkp%avg_vapor_lc + fac * inc%avg_vapor_lc - rkp%avg_vapor_wc = rkp%avg_vapor_wc + fac * inc%avg_vapor_wc rkp%avg_vapor_gc = rkp%avg_vapor_gc + fac * inc%avg_vapor_gc - rkp%avg_wshed_vg = rkp%avg_wshed_vg + fac * inc%avg_wshed_vg - rkp%avg_intercepted = rkp%avg_intercepted + fac * inc%avg_intercepted rkp%avg_throughfall = rkp%avg_throughfall + fac * inc%avg_throughfall rkp%avg_vapor_ac = rkp%avg_vapor_ac + fac * inc%avg_vapor_ac - rkp%avg_transp = rkp%avg_transp + fac * inc%avg_transp - rkp%avg_evap = rkp%avg_evap + fac * inc%avg_evap rkp%avg_drainage = rkp%avg_drainage + fac * inc%avg_drainage - rkp%avg_drainage_heat = rkp%avg_drainage_heat + fac * inc%avg_drainage_heat - rkp%avg_rshort_gnd = rkp%avg_rshort_gnd + fac * inc%avg_rshort_gnd - rkp%avg_par_gnd = rkp%avg_par_gnd + fac * inc%avg_par_gnd - rkp%avg_rlong_gnd = rkp%avg_rlong_gnd + fac * inc%avg_rlong_gnd - rkp%avg_sensible_lc = rkp%avg_sensible_lc + fac * inc%avg_sensible_lc - rkp%avg_sensible_wc = rkp%avg_sensible_wc + fac * inc%avg_sensible_wc - rkp%avg_qwshed_vg = rkp%avg_qwshed_vg + fac * inc%avg_qwshed_vg - rkp%avg_qintercepted = rkp%avg_qintercepted + fac * inc%avg_qintercepted + rkp%avg_qdrainage = rkp%avg_qdrainage + fac * inc%avg_qdrainage rkp%avg_qthroughfall = rkp%avg_qthroughfall + fac * inc%avg_qthroughfall rkp%avg_sensible_gc = rkp%avg_sensible_gc + fac * inc%avg_sensible_gc rkp%avg_sensible_ac = rkp%avg_sensible_ac + fac * inc%avg_sensible_ac @@ -1159,24 +1133,24 @@ subroutine inc_fwd_patch(rkp, inc, fac, cpatch) do k=1,cpatch%ncohorts - rkp%cav_sensible_lc (k) = rkp%cav_sensible_lc (k) & - + fac * inc%cav_sensible_lc (k) - rkp%cav_sensible_wc (k) = rkp%cav_sensible_wc (k) & - + fac * inc%cav_sensible_wc (k) - rkp%cav_vapor_lc (k) = rkp%cav_vapor_lc (k) & - + fac * inc%cav_vapor_lc (k) - rkp%cav_vapor_wc (k) = rkp%cav_vapor_wc (k) & - + fac * inc%cav_vapor_wc (k) - rkp%cav_transp (k) = rkp%cav_transp (k) & - + fac * inc%cav_transp (k) - rkp%cav_intercepted_al(k) = rkp%cav_intercepted_al(k) & - + fac * inc%cav_intercepted_al(k) - rkp%cav_intercepted_aw(k) = rkp%cav_intercepted_aw(k) & - + fac * inc%cav_intercepted_aw(k) - rkp%cav_wshed_lg (k) = rkp%cav_wshed_lg (k) & - + fac * inc%cav_wshed_lg (k) - rkp%cav_wshed_wg (k) = rkp%cav_wshed_wg (k) & - + fac * inc%cav_wshed_wg (k) + rkp%avg_sensible_lc (k) = rkp%avg_sensible_lc (k) & + + fac * inc%avg_sensible_lc (k) + rkp%avg_sensible_wc (k) = rkp%avg_sensible_wc (k) & + + fac * inc%avg_sensible_wc (k) + rkp%avg_vapor_lc (k) = rkp%avg_vapor_lc (k) & + + fac * inc%avg_vapor_lc (k) + rkp%avg_vapor_wc (k) = rkp%avg_vapor_wc (k) & + + fac * inc%avg_vapor_wc (k) + rkp%avg_transp (k) = rkp%avg_transp (k) & + + fac * inc%avg_transp (k) + rkp%avg_intercepted_al(k) = rkp%avg_intercepted_al(k) & + + fac * inc%avg_intercepted_al(k) + rkp%avg_intercepted_aw(k) = rkp%avg_intercepted_aw(k) & + + fac * inc%avg_intercepted_aw(k) + rkp%avg_wshed_lg (k) = rkp%avg_wshed_lg (k) & + + fac * inc%avg_wshed_lg (k) + rkp%avg_wshed_wg (k) = rkp%avg_wshed_wg (k) & + + fac * inc%avg_wshed_wg (k) end do end if @@ -1190,24 +1164,11 @@ subroutine inc_fwd_patch(rkp, inc, fac, cpatch) rkp%flx_carbon_ac = rkp%flx_carbon_ac + fac * inc%avg_carbon_ac rkp%flx_carbon_st = rkp%flx_carbon_st + fac * inc%avg_carbon_st - rkp%flx_vapor_lc = rkp%flx_vapor_lc + fac * inc%avg_vapor_lc - rkp%flx_vapor_wc = rkp%flx_vapor_wc + fac * inc%avg_vapor_wc rkp%flx_vapor_gc = rkp%flx_vapor_gc + fac * inc%avg_vapor_gc - rkp%flx_wshed_vg = rkp%flx_wshed_vg + fac * inc%avg_wshed_vg - rkp%flx_intercepted = rkp%flx_intercepted + fac * inc%avg_intercepted rkp%flx_throughfall = rkp%flx_throughfall + fac * inc%avg_throughfall rkp%flx_vapor_ac = rkp%flx_vapor_ac + fac * inc%avg_vapor_ac - rkp%flx_transp = rkp%flx_transp + fac * inc%avg_transp - rkp%flx_evap = rkp%flx_evap + fac * inc%avg_evap rkp%flx_drainage = rkp%flx_drainage + fac * inc%avg_drainage - rkp%flx_drainage_heat = rkp%flx_drainage_heat + fac * inc%avg_drainage_heat - rkp%flx_rshort_gnd = rkp%flx_rshort_gnd + fac * inc%avg_rshort_gnd - rkp%flx_par_gnd = rkp%flx_par_gnd + fac * inc%avg_par_gnd - rkp%flx_rlong_gnd = rkp%flx_rlong_gnd + fac * inc%avg_rlong_gnd - rkp%flx_sensible_lc = rkp%flx_sensible_lc + fac * inc%avg_sensible_lc - rkp%flx_sensible_wc = rkp%flx_sensible_wc + fac * inc%avg_sensible_wc - rkp%flx_qwshed_vg = rkp%flx_qwshed_vg + fac * inc%avg_qwshed_vg - rkp%flx_qintercepted = rkp%flx_qintercepted + fac * inc%avg_qintercepted + rkp%flx_qdrainage = rkp%flx_qdrainage + fac * inc%avg_qdrainage rkp%flx_qthroughfall = rkp%flx_qthroughfall + fac * inc%avg_qthroughfall rkp%flx_sensible_gc = rkp%flx_sensible_gc + fac * inc%avg_sensible_gc rkp%flx_sensible_ac = rkp%flx_sensible_ac + fac * inc%avg_sensible_ac @@ -1219,22 +1180,39 @@ subroutine inc_fwd_patch(rkp, inc, fac, cpatch) end do do ico = 1,cpatch%ncohorts - rkp%cfx_hflxlc (ico) = rkp%cfx_hflxlc (ico) & - + fac * inc%cfx_hflxlc (ico) - rkp%cfx_hflxwc (ico) = rkp%cfx_hflxwc (ico) & - + fac * inc%cfx_hflxwc (ico) - rkp%cfx_qwflxlc (ico) = rkp%cfx_qwflxlc (ico) & - + fac * inc%cfx_qwflxlc (ico) - rkp%cfx_qwflxwc (ico) = rkp%cfx_qwflxwc (ico) & - + fac * inc%cfx_qwflxwc (ico) - rkp%cfx_qwshed (ico) = rkp%cfx_qwshed (ico) & - + fac * inc%cfx_qwshed (ico) - rkp%cfx_qtransp (ico) = rkp%cfx_qtransp (ico) & - + fac * inc%cfx_qtransp (ico) - rkp%cfx_qintercepted(ico) = rkp%cfx_qintercepted(ico) & - + fac * inc%cfx_qintercepted(ico) + rkp%flx_vapor_lc = rkp%flx_vapor_lc & + + fac * inc%avg_vapor_lc (ico) + rkp%flx_vapor_wc = rkp%flx_vapor_wc & + + fac * inc%avg_vapor_wc (ico) + rkp%flx_wshed_vg = rkp%flx_wshed_vg & + + fac * ( inc%avg_wshed_lg (ico) & + + inc%avg_wshed_wg (ico) ) + rkp%flx_intercepted = rkp%flx_intercepted & + + fac * ( inc%avg_intercepted_al (ico) & + + inc%avg_intercepted_aw (ico) ) + rkp%flx_sensible_lc = rkp%flx_sensible_lc & + + fac * inc%avg_sensible_lc (ico) + rkp%flx_sensible_wc = rkp%flx_sensible_wc & + + fac * inc%avg_sensible_wc (ico) + rkp%flx_qwshed_vg = rkp%flx_qwshed_vg & + + fac * inc%cfx_qwshed (ico) + rkp%flx_qintercepted = rkp%flx_qintercepted & + + fac * inc%cfx_qintercepted (ico) + rkp%cfx_hflxlc (ico) = rkp%cfx_hflxlc (ico) & + + fac * inc%cfx_hflxlc (ico) + rkp%cfx_hflxwc (ico) = rkp%cfx_hflxwc (ico) & + + fac * inc%cfx_hflxwc (ico) + rkp%cfx_qwflxlc (ico) = rkp%cfx_qwflxlc (ico) & + + fac * inc%cfx_qwflxlc (ico) + rkp%cfx_qwflxwc (ico) = rkp%cfx_qwflxwc (ico) & + + fac * inc%cfx_qwflxwc (ico) + rkp%cfx_qwshed (ico) = rkp%cfx_qwshed (ico) & + + fac * inc%cfx_qwshed (ico) + rkp%cfx_qtransp (ico) = rkp%cfx_qtransp (ico) & + + fac * inc%cfx_qtransp (ico) + rkp%cfx_qintercepted(ico) = rkp%cfx_qintercepted (ico) & + + fac * inc%cfx_qintercepted (ico) end do - end if !---------------------------------------------------------------------------------------! @@ -1812,6 +1790,7 @@ subroutine fb_sanity_check(y,reject_step, csite,ipa,dydx,h, & write(unit=*,fmt='(a,1x,f12.4)') ' SOIL_FLIQ : ',y%soil_fracliq(k) write(unit=*,fmt='(a,1x,f12.4)') ' SOIL_ENERGY: ',y%soil_energy(k) write(unit=*,fmt='(a,1x,f12.4)') ' SOIL_WATER: ',y%soil_water(k) + write(unit=*,fmt='(a,1x,f12.4)') ' SOIL_MSTPOT: ',y%soil_mstpot(k) write(unit=*,fmt='(a,1x,f12.4)') ' D(SOIL_E)/Dt:',dydx%soil_energy(k) write(unit=*,fmt='(a,1x,f12.4)') ' D(SOIL_M)/Dt:',dydx%soil_water(k) if (k == nzg .and. y%nlev_sfcwater > 0) then @@ -1843,6 +1822,7 @@ subroutine fb_sanity_check(y,reject_step, csite,ipa,dydx,h, & write(unit=*,fmt='(a,1x,f12.4)') ' SOIL_FLIQ : ',y%soil_fracliq(k) write(unit=*,fmt='(a,1x,f12.4)') ' SOIL_ENERGY: ',y%soil_energy(k) write(unit=*,fmt='(a,1x,f12.4)') ' SOIL_WATER: ',y%soil_water(k) + write(unit=*,fmt='(a,1x,f12.4)') ' SOIL_MSTPOT: ',y%soil_mstpot(k) write(unit=*,fmt='(a,1x,f12.4)') ' D(SOIL_E)/Dt:',dydx%soil_energy(k) write(unit=*,fmt='(a,1x,f12.4)') ' D(SOIL_M)/Dt:',dydx%soil_water(k) if (k == nzg .and. y%nlev_sfcwater > 0) then diff --git a/ED/src/dynamics/lsm_hyd.f90 b/ED/src/dynamics/lsm_hyd.f90 index 78db326d7..173a82d8c 100644 --- a/ED/src/dynamics/lsm_hyd.f90 +++ b/ED/src/dynamics/lsm_hyd.f90 @@ -1136,7 +1136,7 @@ subroutine writeHydro() if(useRUNOFF == 0) cgrid%runoff(ipy) = cgrid%runoff(ipy) + cpoly%area(isi)*cpoly%runoff(isi) area_land = area_land + cpoly%area(isi) if(isi == cpoly%nsites .and. useRUNOFF == 0) cgrid%runoff(ipy) = cgrid%runoff(ipy)/area_land - if(cpoly%runoff(isi) > 0.0) call uint2tl(cpoly%avg_runoff_heat(isi)/cpoly%runoff(isi),runoff_t,runoff_fl) + if(cpoly%runoff(isi) > 0.0) call uint2tl(cpoly%qrunoff(isi)/cpoly%runoff(isi),runoff_t,runoff_fl) do ipa=1,csite%npatches @@ -1167,7 +1167,7 @@ subroutine writeHydro() cgrid%swliq(ipy),cgrid%sheat(ipy),tempk,cgrid%zbar(ipy),cpoly%moist_zi(isi), & cpoly%moist_tau(isi),WTbar,DZbar, & WPbar,WPTbar,SSE,SSW,SSH,ksat, & !! subsurface variables WPHbar - cpoly%runoff(isi),cpoly%avg_runoff_heat(isi),runoff_t, & + cpoly%runoff(isi),cpoly%qrunoff(isi),runoff_t, & qw4out(igr,ipy,isi),qh4out(igr,ipy,isi), & !! surface variables cpoly%baseflow(isi),cgrid%baseflow(ipy),cgrid%runoff(ipy), & !!discharge variables tsw @@ -1302,8 +1302,8 @@ subroutine calcHydroSurface() patch_heat_out = flow_vel*surf_water_heat !energy/m2/s !!update vars - csite%runoff(ipa) = patch_water_out - csite%avg_runoff_heat(ipa) = patch_heat_out + csite%runoff (ipa) = patch_water_out + csite%qrunoff(ipa) = patch_heat_out qwout(isi) = qwout(isi) + patch_water_out*csite%area(ipa) qhout(isi) = qhout(isi) + patch_heat_out*csite%area(ipa) endif @@ -1332,23 +1332,23 @@ subroutine calcHydroSurface() end do !!calc NET site-level run-off rate (just for output) - cpoly%runoff(isi) = 0.0 - cpoly%avg_runoff_heat(isi) = 0.0 + cpoly%runoff (isi) = 0.0 + cpoly%qrunoff(isi) = 0.0 do ines=1,isi-1 - cpoly%runoff(isi) = cpoly%runoff(isi) + qwout(isi)*cgrid%site_adjacency(isi,ines,ipy) - cpoly%avg_runoff_heat(isi) = cpoly%avg_runoff_heat(isi) + qhout(isi)*cgrid%site_adjacency(isi,ines,ipy) + cpoly%runoff (isi) = cpoly%runoff (isi) + qwout(isi)*cgrid%site_adjacency(isi,ines,ipy) + cpoly%qrunoff(isi) = cpoly%qrunoff(isi) + qhout(isi)*cgrid%site_adjacency(isi,ines,ipy) end do do ines=isi+1,cpoly%nsites+1 - cpoly%runoff(isi) = cpoly%runoff(isi) + qwout(isi)*cgrid%site_adjacency(isi,ines,ipy) - cpoly%avg_runoff_heat(isi) = cpoly%avg_runoff_heat(isi) + qhout(isi)*cgrid%site_adjacency(isi,ines,ipy) + cpoly%runoff (isi) = cpoly%runoff (isi) + qwout(isi)*cgrid%site_adjacency(isi,ines,ipy) + cpoly%qrunoff(isi) = cpoly%qrunoff(isi) + qhout(isi)*cgrid%site_adjacency(isi,ines,ipy) end do !! calc patch layer run in do ipa=1,csite%npatches !! adjust runoff rates for run-on !! negative values indicate a net gain of water from overland flow - csite%runoff(ipa) = (1.-cgrid%site_adjacency(isi,isi,ipy))*csite%runoff(ipa) - site_water_in - csite%avg_runoff_heat(ipa) = (1.-cgrid%site_adjacency(isi,isi,ipy))*csite%avg_runoff_heat(ipa) - site_heat_in + csite%runoff (ipa) = (1.-cgrid%site_adjacency(isi,isi,ipy))*csite%runoff (ipa) - site_water_in + csite%qrunoff(ipa) = (1.-cgrid%site_adjacency(isi,isi,ipy))*csite%qrunoff(ipa) - site_heat_in ! changed runoff code to assume recycled runoff occurrs at a patch level, not a intra-site level ! less realistic, but testing whether can avoid putting intersite runoff in the integrator @@ -1369,7 +1369,7 @@ subroutine calcHydroSurface() ! Subtract and convert back to J/kg if(csite%sfcwater_mass(i,ipa) > 1.0e-10)then csite%sfcwater_energy(i,ipa) = (csite%sfcwater_energy(i,ipa) - & - csite%avg_runoff_heat(ipa)*dtlsm*hts(i)/surf_water_depth) / & + csite%qrunoff(ipa)*dtlsm*hts(i)/surf_water_depth) / & csite%sfcwater_mass(i,ipa) else csite%sfcwater_energy(i,ipa) = 0.0 @@ -1420,14 +1420,37 @@ subroutine calcHydroSurface() end do end do !patch end do !site - deallocate(qwout) - deallocate(qhout) + + !----------------------------------------------------------------------------------! + ! Commented by MLO (8-Nov-2012). See comment below... ! + !----------------------------------------------------------------------------------! + ! deallocate(qwout) + ! deallocate(qhout) !!Finally, calculate polygon-level runoff rate (runoff leaving terrestrial sites) - cgrid%runoff(ipy) = 0.0 + cgrid%runoff (ipy) = 0.0 + cgrid%qrunoff(ipy) = 0.0 do i=1,cpoly%nsites - cgrid%runoff(ipy) = cgrid%runoff(ipy) + qwout(i)*cgrid%site_adjacency(i,(cpoly%nsites+1),ipy) + cgrid%runoff (ipy) = cgrid%runoff (ipy) + qwout(i)*cgrid%site_adjacency(i,(cpoly%nsites+1),ipy) + cgrid%qrunoff(ipy) = cgrid%qrunoff(ipy) + qhout(i)*cgrid%site_adjacency(i,(cpoly%nsites+1),ipy) end do + + !----------------------------------------------------------------------------------! + ! These "deallocate" statements used to be before the loop above, although they ! + ! use qwout. I moved them here because it looks like they would cause ! + ! segmentation violation. I also switched the old avg_runoff_heat variables by ! + ! qrunoff, exclusive to lsm_hyd. The old variable was used by RK4 too so it ! + ! could cause some problems (avg_runoff_heat has been replaced by fmean_qrunoff ! + ! just to make the average names standardised. The runoff internal energy losss ! + ! wasn't in the loop above, I added because it seems to fit there, but I don't ! + ! know if this is right. Let me know if any of these changes causes problems. ! + ! MLO (8-Nov-2012) ! + !----------------------------------------------------------------------------------! + deallocate(qwout) + deallocate(qhout) + !----------------------------------------------------------------------------------! + + end do !polygon end do !! grid @@ -1651,8 +1674,8 @@ end subroutine calcHydroSurface !!!!!! patch_water_out = flow_vel*surf_water_depth*1000 !!!!!! patch_heat_out = flow_vel*surf_water_heat !energy/m2/s !!!!!! !!update vars -!!!!!! cpatch%runoff = patch_water_out -!!!!!! cpatch%avg_runoff_heat = patch_heat_out +!!!!!! cpatch%runoff = patch_water_out +!!!!!! cpatch%qrunoff = patch_heat_out !!!!!! qwout(curr_site) = qwout(curr_site) + patch_water_out*cpatch%area !!!!!! qhout(curr_site) = qhout(curr_site) + patch_heat_out*cpatch%area !!!!!! endif @@ -1697,11 +1720,11 @@ end subroutine calcHydroSurface !!!!!! !!calc site-level run-off !!!!!! cs%runoff = 0.0 -!!!!!! cs%avg_runoff_heat = 0.0 +!!!!!! cs%qrunoff = 0.0 !!!!!! do i=1,(nsites+1) !!!!!! if(i .ne. curr_site) then !!!!!! cs%runoff = cs%runoff + qwout(curr_site)*cpoly%site_adjacency(curr_site,i) -!!!!!! cs%avg_runoff_heat = cs%avg_runoff_heat + qhout(curr_site)*cpoly%site_adjacency(curr_site,i) +!!!!!! cs%qrunoff = cs%qrunoff + qhout(curr_site)*cpoly%site_adjacency(curr_site,i) !!!!!! endif !!!!!! enddo !!!!!! @@ -1711,7 +1734,7 @@ end subroutine calcHydroSurface !!!!!! !!!!!! !!calc runoff rates !!!!!! cpatch%runoff = (1-cpoly%site_adjacency(curr_site,curr_site))*cpatch%runoff - site_water_in -!!!!!! cpatch%avg_runoff_heat = (1-cpoly%site_adjacency(curr_site,curr_site))*cpatch%avg_runoff_heat - site_heat_in +!!!!!! cpatch%qrunoff = (1-cpoly%site_adjacency(curr_site,curr_site))*cpatch%qrunoff - site_heat_in !!!!!! surf_water_depth = 0.0 !!!!!! top_surf_water = cpatch%nlev_sfcwater @@ -1731,7 +1754,7 @@ end subroutine calcHydroSurface !!!!!! ! Subtract and convert back to J/kg. !!!!!! if(cpatch%sfcwater_mass(i) > 1.0e-10)then !!!!!! cpatch%sfcwater_energy(i) = (cpatch%sfcwater_energy(i) - & -!!!!!! cpatch%avg_runoff_heat*dtlsm*hts(i)/surf_water_depth) / & +!!!!!! cpatch%qrunoff*dtlsm*hts(i)/surf_water_depth) / & !!!!!! cpatch%sfcwater_mass(i) !!!!!! else !!!!!! cpatch%sfcwater_energy(i) = 0.0 diff --git a/ED/src/dynamics/photosyn_driv.f90 b/ED/src/dynamics/photosyn_driv.f90 index 67864cbac..fc899aac5 100644 --- a/ED/src/dynamics/photosyn_driv.f90 +++ b/ED/src/dynamics/photosyn_driv.f90 @@ -21,10 +21,13 @@ subroutine canopy_photosynthesis(csite,cmet,mzg,ipa,lsl,ntext_soil , epi & ! intent(in) , wdnsi & ! intent(in) , wdns & ! intent(in) - , kgCday_2_umols & ! intent(in) + , umols_2_kgCyr & ! intent(in) + , yr_day & ! intent(in) , lnexp_min & ! intent(in) , tiny_num ! ! intent(in) - use ed_misc_coms , only : current_time ! ! intent(in) + use ed_misc_coms , only : current_time & ! intent(in) + , dtlsm & ! intent(in) + , frqsum ! ! intent(in) use met_driver_coms, only : met_driv_state ! ! structure use physiology_coms, only : print_photo_debug & ! intent(in) , h2o_plant_lim ! ! intent(in) @@ -81,6 +84,17 @@ subroutine canopy_photosynthesis(csite,cmet,mzg,ipa,lsl,ntext_soil real :: llspan_tuco real :: can_ssh integer, dimension(n_pft) :: tuco_pft + !----- Locally saved variables. --------------------------------------------------------! + real , save :: dtlsm_o_frqsum + logical , save :: first_time = .true. + !---------------------------------------------------------------------------------------! + + + !----- Assign the constant scaling factor. ---------------------------------------------! + if (first_time) then + first_time = .false. + dtlsm_o_frqsum = dtlsm / frqsum + end if !---------------------------------------------------------------------------------------! @@ -97,16 +111,6 @@ subroutine canopy_photosynthesis(csite,cmet,mzg,ipa,lsl,ntext_soil !---------------------------------------------------------------------------------------! - !----- Find the patch-level Total Leaf and Wood Area Index. ----------------------------! - csite%lai(ipa) = 0.0 - csite%wai(ipa) = 0.0 - do ico=1,cpatch%ncohorts - csite%lai(ipa) = csite%lai(ipa) + cpatch%lai(ico) - csite%wai(ipa) = csite%wai(ipa) + cpatch%wai(ico) - end do - !---------------------------------------------------------------------------------------! - - !---------------------------------------------------------------------------------------! ! Calculate liquid water available for transpiration. The way this is done ! ! depends on how the water limitation is to be solved. ! @@ -187,8 +191,7 @@ subroutine canopy_photosynthesis(csite,cmet,mzg,ipa,lsl,ntext_soil !----- Find the potential for this layer. -------------------------------------! - psiplusz = slzt(k) - mcheight & - + soil(nsoil)%slpots / wgpfrac ** soil(nsoil)%slbs + psiplusz = slzt(k) - mcheight + csite%soil_mstpot(k,ipa) !------------------------------------------------------------------------------! @@ -421,18 +424,24 @@ subroutine canopy_photosynthesis(csite,cmet,mzg,ipa,lsl,ntext_soil ) !----- Convert leaf respiration to [µmol/m²ground/s] --------------------------! - cpatch%leaf_respiration(ico) = leaf_resp * cpatch%lai(ico) - cpatch%mean_leaf_resp(ico) = cpatch%mean_leaf_resp(ico) & - + cpatch%leaf_respiration(ico) - cpatch%today_leaf_resp(ico) = cpatch%today_leaf_resp(ico) & + cpatch%leaf_respiration(ico) = leaf_resp * cpatch%lai (ico) + cpatch%today_leaf_resp(ico) = cpatch%today_leaf_resp (ico) & + cpatch%leaf_respiration(ico) + !----- The output variable must be in [kgC/plant/yr]. -------------------------! + cpatch%fmean_leaf_resp(ico) = cpatch%fmean_leaf_resp (ico) & + + cpatch%leaf_respiration(ico) & + * dtlsm_o_frqsum * umols_2_kgCyr & + / cpatch%nplant (ico) !----- Root biomass [kg/m2]. --------------------------------------------------! broot_loc = cpatch%broot(ico) * cpatch%nplant(ico) !----- Supply of water. -------------------------------------------------------! - cpatch%water_supply(ico) = water_conductance(ipft) * broot_loc & - * avail_h2o_coh(ico) + cpatch%water_supply (ico) = water_conductance (ipft) * broot_loc & + * avail_h2o_coh (ico) + cpatch%fmean_water_supply(ico) = cpatch%fmean_water_supply(ico) & + + cpatch%water_supply (ico) & + * dtlsm_o_frqsum root_depth_indices(kroot) = .true. broot_tot = broot_tot + broot_loc @@ -473,9 +482,8 @@ subroutine canopy_photosynthesis(csite,cmet,mzg,ipa,lsl,ntext_soil end if !----- Net stomatal conductance. ----------------------------------------------! - cpatch%stomatal_conductance(ico) = cpatch%fs_open(ico) *cpatch%gsw_open(ico) & - + (1.0 - cpatch%fs_open(ico)) & - * cpatch%gsw_closed(ico) + cpatch%leaf_gsw(ico) = cpatch%fs_open(ico) * cpatch%gsw_open(ico) & + + (1.0 - cpatch%fs_open(ico)) * cpatch%gsw_closed(ico) !------------------------------------------------------------------------------! @@ -484,7 +492,10 @@ subroutine canopy_photosynthesis(csite,cmet,mzg,ipa,lsl,ntext_soil * ( cpatch%fs_open(ico) * cpatch%A_open(ico) & + (1.0 - cpatch%fs_open(ico)) * cpatch%A_closed(ico) ) & + cpatch%leaf_respiration(ico) - cpatch%mean_gpp(ico) = cpatch%mean_gpp(ico) + cpatch%gpp(ico) + !----- The average must be in [kgC/plant/yr]. ---------------------------------! + cpatch%fmean_gpp(ico) = cpatch%fmean_gpp(ico) & + + cpatch%gpp (ico) * umols_2_kgCyr * dtlsm_o_frqsum & + / cpatch%nplant(ico) !------------------------------------------------------------------------------! @@ -538,7 +549,7 @@ subroutine canopy_photosynthesis(csite,cmet,mzg,ipa,lsl,ntext_soil cpatch%gsw_closed(ico) = 0.0 cpatch%leaf_gbh(ico) = 0.0 cpatch%leaf_gbw(ico) = 0.0 - cpatch%stomatal_conductance(ico) = 0.0 + cpatch%leaf_gsw(ico) = 0.0 cpatch%gpp(ico) = 0.0 cpatch%leaf_respiration(ico) = 0.0 vm = 0.0 @@ -548,18 +559,14 @@ subroutine canopy_photosynthesis(csite,cmet,mzg,ipa,lsl,ntext_soil !------------------------------------------------------------------------------------! ! Not really a part of the photosynthesis scheme, but this will do it. We must ! ! integrate the "mean" of the remaining respiration terms, except for the root one. ! - ! This is done regardless on whether the cohort is doing photosynthesis. Also, we ! - ! convert units so all fast respiration terms are in [µmol/m²ground/s]. ! + ! This is done regardless on whether the cohort is doing photosynthesis. ! !------------------------------------------------------------------------------------! - cpatch%mean_growth_resp (ico) = cpatch%mean_growth_resp (ico) & - + cpatch%growth_respiration (ico) * kgCday_2_umols & - * cpatch%nplant(ico) - cpatch%mean_storage_resp(ico) = cpatch%mean_storage_resp(ico) & - + cpatch%storage_respiration(ico) * kgCday_2_umols & - * cpatch%nplant(ico) - cpatch%mean_vleaf_resp (ico) = cpatch%mean_vleaf_resp (ico) & - + cpatch%vleaf_respiration (ico) * kgCday_2_umols & - * cpatch%nplant(ico) + cpatch%fmean_growth_resp (ico) = cpatch%fmean_growth_resp (ico) & + + cpatch%growth_respiration (ico) * dtlsm_o_frqsum + cpatch%fmean_storage_resp(ico) = cpatch%fmean_storage_resp (ico) & + + cpatch%storage_respiration(ico) * dtlsm_o_frqsum + cpatch%fmean_vleaf_resp (ico) = cpatch%fmean_vleaf_resp (ico) & + + cpatch%vleaf_respiration (ico) * dtlsm_o_frqsum !------------------------------------------------------------------------------------! if (print_photo_debug) then @@ -575,8 +582,8 @@ subroutine canopy_photosynthesis(csite,cmet,mzg,ipa,lsl,ntext_soil ! done only if there is some cohort transpiring. ! !---------------------------------------------------------------------------------------! if (broot_tot > 1.e-20) then - csite%avg_available_water(ipa) = csite%avg_available_water(ipa) & - + pss_available_water / broot_tot + csite%fmean_available_water(ipa) = csite%fmean_available_water(ipa) & + + pss_available_water * dtlsm_o_frqsum / broot_tot end if !---------------------------------------------------------------------------------------! @@ -637,7 +644,6 @@ subroutine print_photo_details(cmet,csite,ipa,ico,limit_flag,vm,compp) integer :: jco logical :: isthere real :: leaf_resp - real :: stom_condct real :: par_area real :: nir_area real :: parv @@ -654,9 +660,9 @@ subroutine print_photo_details(cmet,csite,ipa,ico,limit_flag,vm,compp) !----- Make some aliases. --------------------------------------------------------------! cpatch => csite%patch(ipa) - ipft = cpatch%pft(ico) + + ipft = cpatch%pft (ico) leaf_resp = cpatch%leaf_respiration(ico) - stom_condct = cpatch%stomatal_conductance(ico) !---------------------------------------------------------------------------------------! if (cpatch%leaf_resolvable(ico)) then @@ -743,7 +749,7 @@ subroutine print_photo_details(cmet,csite,ipa,ico,limit_flag,vm,compp) , ' UTIL_PARV', ' NIR_AREA', ' NIRV' & , ' GPP', ' LEAF_RESP', ' LEAF_GBH' & , ' LEAF_GBW', ' WOOD_GBH', ' WOOD_GBW' & - , ' STOM_CONDCT', ' A_OPEN', ' A_CLOS' & + , ' LEAF_GSW', ' A_OPEN', ' A_CLOS' & , ' GSW_OPEN', ' GSW_CLOS', ' PSI_OPEN' & , ' PSI_CLOS', ' H2O_SUPPLY', ' FSW' & , ' FSN', ' FS_OPEN', ' ATM_WIND' & @@ -776,7 +782,7 @@ subroutine print_photo_details(cmet,csite,ipa,ico,limit_flag,vm,compp) , util_parv , nir_area , nirv & , cpatch%gpp(ico) , leaf_resp , cpatch%leaf_gbh(ico) & , cpatch%leaf_gbw(ico) , cpatch%wood_gbh(ico) , cpatch%wood_gbw(ico) & - , stom_condct , cpatch%A_open(ico) , cpatch%A_closed(ico) & + , cpatch%leaf_gsw(ico) , cpatch%A_open(ico) , cpatch%A_closed(ico) & , cpatch%gsw_open(ico) , cpatch%gsw_closed(ico) , cpatch%psi_open(ico) & , cpatch%psi_closed(ico) , cpatch%water_supply(ico) , cpatch%fsw(ico) & , cpatch%fsn(ico) , cpatch%fs_open(ico) , cmet%vels & diff --git a/ED/src/dynamics/radiate_driver.f90 b/ED/src/dynamics/radiate_driver.f90 index e57a4cd78..51c0b9653 100644 --- a/ED/src/dynamics/radiate_driver.f90 +++ b/ED/src/dynamics/radiate_driver.f90 @@ -83,6 +83,12 @@ subroutine radiate_driver(cgrid) !------------------------------------------------------------------------------! + !------------------------------------------------------------------------------! + ! Update the daylight length and nighttime flag. ! + !------------------------------------------------------------------------------! + cpoly%nighttime(isi) = .not. twilight + if (twilight) cpoly%daylight(isi) = cpoly%daylight(isi) + radfrq + !------------------------------------------------------------------------------! !------------------------------------------------------------------------------! @@ -161,7 +167,7 @@ subroutine radiate_driver(cgrid) !----- Normalize the absorbed radiations. -------------------------------------! call scale_ed_radiation(tuco,rshort_tot,cpoly%met(isi)%rshort_diffuse & - ,cpoly%met(isi)%rlong,csite) + ,cpoly%met(isi)%rlong,cpoly%nighttime(isi),csite) !------------------------------------------------------------------------------! end do siteloop @@ -173,13 +179,6 @@ subroutine radiate_driver(cgrid) end if - !---------------------------------------------------------------------------------------! - ! At this point, all meteorologic driver data for the land surface model has been ! - ! updated for the current timestep. Perform the time space average for the output ! - ! diagnostic. ! - !---------------------------------------------------------------------------------------! - call int_met_avg(cgrid) - return end subroutine radiate_driver !==========================================================================================! @@ -1317,30 +1316,8 @@ subroutine sfcrad_ed(cosz,cosaoi,csite,mzg,mzs,ntext_soil,ncol_soil,maxcohort,tu csite%rlong_g_incid(ipa) = 0.0 end if !------------------------------------------------------------------------------------! - - - - !------------------------------------------------------------------------------------! - ! Integrate the mean radiation flux. ! - !------------------------------------------------------------------------------------! - do ico=1,cpatch%ncohorts - cpatch%mean_par_l (ico) = cpatch%mean_par_l (ico) & - + cpatch%par_l (ico) * radfrq - cpatch%mean_par_l_beam (ico) = cpatch%mean_par_l_beam (ico) & - + cpatch%par_l_beam (ico) * radfrq - cpatch%mean_par_l_diff (ico) = cpatch%mean_par_l_diff (ico) & - + cpatch%par_l_diffuse (ico) * radfrq - cpatch%mean_rshort_l (ico) = cpatch%mean_rshort_l (ico) & - + cpatch%rshort_l (ico) * radfrq - cpatch%mean_rlong_l (ico) = cpatch%mean_rlong_l (ico) & - + cpatch%rlong_l (ico) * radfrq - cpatch%mean_rshort_w (ico) = cpatch%mean_rshort_w (ico) & - + cpatch%rshort_w (ico) * radfrq - cpatch%mean_rlong_w (ico) = cpatch%mean_rlong_w (ico) & - + cpatch%rlong_w (ico) * radfrq - end do - !------------------------------------------------------------------------------------! end do + !---------------------------------------------------------------------------------------! !---------------------------------------------------------------------------------------! @@ -1565,10 +1542,13 @@ end function mean_daysecz !==========================================================================================! !==========================================================================================! -subroutine scale_ed_radiation(tuco,rshort,rshort_diffuse,rlong,csite) +subroutine scale_ed_radiation(tuco,rshort,rshort_diffuse,rlong,nighttime,csite) use ed_state_vars , only : sitetype & ! intent(in) , patchtype ! ! intent(in) + use ed_misc_coms , only : writing_long & ! intent(in) + , radfrq & ! intent(in) + , frqsum ! ! intent(in) use canopy_radiation_coms, only : cosz_min ! ! intent(in) implicit none !----- Arguments. ----------------------------------------------------------------------! @@ -1577,6 +1557,7 @@ subroutine scale_ed_radiation(tuco,rshort,rshort_diffuse,rlong,csite) real , intent(in) :: rshort real , intent(in) :: rshort_diffuse real , intent(in) :: rlong + logical , intent(in) :: nighttime !----- Local variables. ----------------------------------------------------------------! type(patchtype) , pointer :: cpatch integer :: ipa,ico, k @@ -1584,12 +1565,29 @@ subroutine scale_ed_radiation(tuco,rshort,rshort_diffuse,rlong,csite) logical , parameter :: skip_rad = .false. !----- External functions. -------------------------------------------------------------! real , external :: sngloff + !----- Locally saved variables. --------------------------------------------------------! + real , save :: radfrq_o_frqsum + logical , save :: first_time = .true. !---------------------------------------------------------------------------------------! + + !----- Assign the constant scaling factor. ---------------------------------------------! + if (first_time) then + first_time = .false. + radfrq_o_frqsum = radfrq / frqsum + end if + !---------------------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------------------! + ! This block skips radiation. Obviously this only makes sense for very theoretical ! + ! tests, because plants kind of like light... ! + !---------------------------------------------------------------------------------------! if (skip_rad) then - do ipa = 1, csite%npatches + skip_patchloop: do ipa = 1, csite%npatches cpatch => csite%patch(ipa) - do ico = 1, cpatch%ncohorts + skip_cohortloop: do ico = 1, cpatch%ncohorts if (cpatch%leaf_resolvable(ico) .or. cpatch%wood_resolvable(ico)) then cpatch%par_l_beam (ico) = 0.0 cpatch%par_l_diffuse (ico) = 0.0 @@ -1610,7 +1608,7 @@ subroutine scale_ed_radiation(tuco,rshort,rshort_diffuse,rlong,csite) cpatch%light_level_diff (ico) = 0.0 cpatch%light_level_beam (ico) = 0.0 end if - end do + end do skip_cohortloop csite%rshort_g_beam (ipa) = 0. csite%rshort_g_diffuse(ipa) = 0. @@ -1644,16 +1642,19 @@ subroutine scale_ed_radiation(tuco,rshort,rshort_diffuse,rlong,csite) csite%rlong_s(ipa) = 0. csite%rlong_g(ipa) = 0. - end do + end do skip_patchloop return end if - do ipa = 1,csite%npatches - + !---------------------------------------------------------------------------------------! + ! For normal runs, we add the scale to radiation, and also integrate averages. ! + !---------------------------------------------------------------------------------------! + patchloop: do ipa = 1,csite%npatches cpatch => csite%patch(ipa) - do ico = 1,cpatch%ncohorts + !----- Cohort-level variables. ------------------------------------------------------! + cohortloop: do ico = 1,cpatch%ncohorts if (cpatch%leaf_resolvable(ico) .or. cpatch%wood_resolvable(ico)) then @@ -1679,7 +1680,13 @@ subroutine scale_ed_radiation(tuco,rshort,rshort_diffuse,rlong,csite) cpatch%rlong_w(ico) = cpatch%rlong_w_incid(ico) & + cpatch%rlong_w_surf(ico) end if - end do + end do cohortloop + !------------------------------------------------------------------------------------! + + + !------------------------------------------------------------------------------------! + ! Patch-level variables. ! + !------------------------------------------------------------------------------------! csite%par_l_beam_max (ipa) = csite%par_l_beam_max (ipa) * rshort csite%par_l_diffuse_max (ipa) = csite%par_l_diffuse_max (ipa) * rshort csite%par_l_max (ipa) = csite%par_l_beam_max (ipa) & @@ -1710,7 +1717,15 @@ subroutine scale_ed_radiation(tuco,rshort,rshort_diffuse,rlong,csite) csite%rnet (ipa) = rshort + rlong & - csite%rshortup (ipa) & - csite%rlongup (ipa) - !----- Absorption rate of short wave by the surface water. --------------------------! + !------------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------------! + ! Patch-level variables, but the absorption rate by each temporary pounding/snow ! + ! layer. ! + !------------------------------------------------------------------------------------! do k=1,csite%nlev_sfcwater(ipa) csite%rshort_s_beam (k,ipa) = csite%rshort_s_beam (k,ipa) * rshort csite%rshort_s_diffuse(k,ipa) = csite%rshort_s_diffuse(k,ipa) * rshort @@ -1721,15 +1736,118 @@ subroutine scale_ed_radiation(tuco,rshort,rshort_diffuse,rlong,csite) csite%par_s (k,ipa) = csite%par_s_beam (k,ipa) & + csite%par_s_diffuse (k,ipa) end do - + !----- The integrated budget. -------------------------------------------------------! csite%rlong_s_incid(ipa) = csite%rlong_s_incid(ipa) * rlong csite%rlong_g_incid(ipa) = csite%rlong_g_incid(ipa) * rlong - csite%rlong_s(ipa) = csite%rlong_s_surf(ipa) + csite%rlong_s_incid(ipa) csite%rlong_g(ipa) = csite%rlong_g_surf(ipa) + csite%rlong_g_incid(ipa) + !------------------------------------------------------------------------------------! - end do + + + + !------------------------------------------------------------------------------------! + ! Integrate the mean radiation fluxes. The average fluxes are normalised in ! + ! average_utils.f90, at sub-routine normalize_averaged_vars. ! + !------------------------------------------------------------------------------------! + !----- Cohort-level variables. ------------------------------------------------------! + mean_cohortloop: do ico=1,cpatch%ncohorts + cpatch%fmean_par_l (ico) = cpatch%fmean_par_l (ico) & + + cpatch%par_l (ico) & + * radfrq_o_frqsum + cpatch%fmean_par_l_beam (ico) = cpatch%fmean_par_l_beam (ico) & + + cpatch%par_l_beam (ico) & + * radfrq_o_frqsum + cpatch%fmean_par_l_diff (ico) = cpatch%fmean_par_l_diff (ico) & + + cpatch%par_l_diffuse (ico) & + * radfrq_o_frqsum + cpatch%fmean_rshort_l (ico) = cpatch%fmean_rshort_l (ico) & + + cpatch%rshort_l (ico) & + * radfrq_o_frqsum + cpatch%fmean_rlong_l (ico) = cpatch%fmean_rlong_l (ico) & + + cpatch%rlong_l (ico) & + * radfrq_o_frqsum + cpatch%fmean_rshort_w (ico) = cpatch%fmean_rshort_w (ico) & + + cpatch%rshort_w (ico) & + * radfrq_o_frqsum + cpatch%fmean_rlong_w (ico) = cpatch%fmean_rlong_w (ico) & + + cpatch%rlong_w (ico) & + * radfrq_o_frqsum + cpatch%fmean_light_level (ico) = cpatch%fmean_light_level (ico) & + + cpatch%light_level (ico) & + * radfrq_o_frqsum + cpatch%fmean_light_level_beam(ico) = cpatch%fmean_light_level_beam(ico) & + + cpatch%light_level_beam (ico) & + * radfrq_o_frqsum + cpatch%fmean_light_level_diff(ico) = cpatch%fmean_light_level_diff(ico) & + + cpatch%light_level_diff (ico) & + * radfrq_o_frqsum + !----- Light level is integrated only when there is some radiation. --------------! + if (.not. nighttime .and. writing_long) then + cpatch%dmean_light_level (ico) = cpatch%dmean_light_level (ico) & + + cpatch%light_level (ico) & + * radfrq + cpatch%dmean_light_level_beam(ico) = cpatch%dmean_light_level_beam(ico) & + + cpatch%light_level_beam (ico) & + * radfrq + cpatch%dmean_light_level_diff(ico) = cpatch%dmean_light_level_diff(ico) & + + cpatch%light_level_diff (ico) & + * radfrq + end if + end do mean_cohortloop + !----- Patch-level variables. -------------------------------------------------------! + csite%fmean_rshort_gnd (ipa) = csite%fmean_rshort_gnd (ipa) & + + csite%rshort_g (ipa) & + * radfrq_o_frqsum + csite%fmean_par_gnd (ipa) = csite%fmean_par_gnd (ipa) & + + csite%par_g (ipa) & + * radfrq_o_frqsum + csite%fmean_rlong_gnd (ipa) = csite%fmean_rlong_gnd (ipa) & + + csite%rlong_g (ipa) & + * radfrq_o_frqsum + csite%fmean_parup (ipa) = csite%fmean_parup (ipa) & + + csite%parup (ipa) & + * radfrq_o_frqsum + csite%fmean_nirup (ipa) = csite%fmean_parup (ipa) & + + csite%nirup (ipa) & + * radfrq_o_frqsum + csite%fmean_rshortup (ipa) = csite%fmean_rshortup (ipa) & + + csite%rshortup (ipa) & + * radfrq_o_frqsum + csite%fmean_rlongup (ipa) = csite%fmean_rlongup (ipa) & + + csite%rlongup (ipa) & + * radfrq_o_frqsum + csite%fmean_rnet (ipa) = csite%fmean_rnet (ipa) & + + csite%rnet (ipa) & + * radfrq_o_frqsum + csite%fmean_albedo (ipa) = csite%fmean_albedo (ipa) & + + csite%albedo (ipa) & + * radfrq_o_frqsum + csite%fmean_albedo_beam (ipa) = csite%fmean_albedo_beam (ipa) & + + csite%albedo_beam (ipa) & + * radfrq_o_frqsum + csite%fmean_albedo_diff (ipa) = csite%fmean_albedo_diff (ipa) & + + csite%albedo_diffuse (ipa) & + * radfrq_o_frqsum + csite%fmean_rlong_albedo (ipa) = csite%fmean_rlong_albedo (ipa) & + + csite%rlong_albedo (ipa) & + * radfrq_o_frqsum + !----- Daily mean of albedo is integrated only when there is some radiation. --------! + if (.not. nighttime) then + csite%dmean_albedo (ipa) = csite%dmean_albedo (ipa) & + + csite%albedo (ipa) & + * radfrq + csite%dmean_albedo_beam (ipa) = csite%dmean_albedo_beam (ipa) & + + csite%albedo_beam (ipa) & + * radfrq + csite%dmean_albedo_diff (ipa) = csite%dmean_albedo_diff (ipa) & + + csite%albedo_diffuse (ipa) & + * radfrq + end if + !------------------------------------------------------------------------------------! + end do patchloop + !---------------------------------------------------------------------------------------! return end subroutine scale_ed_radiation diff --git a/ED/src/dynamics/rk4_derivs.F90 b/ED/src/dynamics/rk4_derivs.F90 index 14049a723..fa205d556 100644 --- a/ED/src/dynamics/rk4_derivs.F90 +++ b/ED/src/dynamics/rk4_derivs.F90 @@ -95,7 +95,9 @@ subroutine leaftw_derivs(mzg,mzs,initp,dinitp,csite,ipa,dt) , ss & ! intent(in) , isoilbc & ! intent(in) , sin_sldrain8 & ! intent(in) - , freezecoef8 ! ! intent(in) + , freezecoef8 & ! intent(in) + , matric_potential8 & ! function + , hydr_conduct8 ! ! function use ed_misc_coms , only : dtlsm & ! intent(in) , current_time & ! intent(in) , fast_diagnostics ! ! intent(in) @@ -265,15 +267,9 @@ end subroutine canopy_derivs_two ! scaled by the liquid fraction. ! !------------------------------------------------------------------------------------! do k = mzg, klsl, -1 - nsoil = rk4site%ntext_soil(k) - - wgpfrac = min(initp%soil_water(k)/soil8(nsoil)%slmsts, 1.d0) - - rk4aux%hydcond (k) = slcons18(k,nsoil) & - * wgpfrac ** (2.d0 * soil8(nsoil)%slbs + 3.d0) - - rk4aux%psiplusz (k) = slzt8(k) + soil8(nsoil)%slpots & - / wgpfrac ** soil8(nsoil)%slbs + nsoil = rk4site%ntext_soil(k) + rk4aux%hydcond (k) = hydr_conduct8(k,nsoil,initp%soil_water(k)) + rk4aux%psiplusz (k) = slzt8(k) + initp%soil_mstpot(k) rk4aux%drysoil (k) = (initp%soil_water(k) - soil8(nsoil)%soilcp) & * initp%soil_fracliq(k) <= 0.d0 rk4aux%satsoil (k) = initp%soil_water(k) >= soil8(nsoil)%slmsts @@ -297,17 +293,9 @@ end subroutine canopy_derivs_two ! ing, scaled by the wilting factor, defined as a function of soil potential. ! !------------------------------------------------------------------------------------! do k = mzg, klsl, -1 - nsoil = rk4site%ntext_soil(k) - - wgpfrac = min(initp%soil_water(k)/soil8(nsoil)%slmsts, 1.d0) - - rk4aux%hydcond (k) = slcons18(k,nsoil) & - * wgpfrac ** (2.d0 * soil8(nsoil)%slbs + 3.d0) - - rk4aux%psiplusz (k) = slzt8(k) + soil8(nsoil)%slpots & - / wgpfrac ** soil8(nsoil)%slbs - - + nsoil = rk4site%ntext_soil(k) + rk4aux%hydcond (k) = hydr_conduct8(k,nsoil,initp%soil_water(k)) + rk4aux%psiplusz (k) = slzt8(k) + initp%soil_mstpot(k) rk4aux%drysoil (k) = (initp%soil_water(k) - soil8(nsoil)%soilcp) & * initp%soil_fracliq(k) <= 0.d0 rk4aux%satsoil (k) = initp%soil_water(k) >= soil8(nsoil)%slmsts @@ -348,6 +336,7 @@ end subroutine canopy_derivs_two ! will be zero. ! !------------------------------------------------------------------------------------! initp%soil_water (kben) = initp%soil_water (klsl) + initp%soil_mstpot (kben) = initp%soil_mstpot (klsl) initp%soil_fracliq (kben) = initp%soil_fracliq (klsl) rk4aux%hydcond (kben) = rk4aux%hydcond (klsl) rk4aux%psiplusz (kben) = rk4aux%psiplusz (klsl) @@ -361,12 +350,10 @@ end subroutine canopy_derivs_two ! same soil moisture as the bottom layer. ! !------------------------------------------------------------------------------------! initp%soil_water (kben) = initp%soil_water (klsl) + initp%soil_mstpot (kben) = initp%soil_mstpot (klsl) initp%soil_fracliq (kben) = initp%soil_fracliq (klsl) - - wgpfrac = min(initp%soil_water(kben)/soil8(nsoil)%slmsts, 1.d0) rk4aux%hydcond (kben) = rk4aux%hydcond (klsl) - rk4aux%psiplusz (kben) = slzt8(kben) + soil8(nsoil)%slpots & - / wgpfrac ** soil8(nsoil)%slbs + rk4aux%psiplusz (kben) = slzt8(kben) + initp%soil_mstpot(kben) rk4aux%drysoil (kben) = .false. rk4aux%satsoil (kben) = .false. !------------------------------------------------------------------------------------! @@ -380,12 +367,13 @@ end subroutine canopy_derivs_two ! then it becomes free drainage. ! !------------------------------------------------------------------------------------! initp%soil_water (kben) = initp%soil_water (klsl) + initp%soil_mstpot (kben) = initp%soil_mstpot (klsl) initp%soil_fracliq (kben) = initp%soil_fracliq (klsl) wgpfrac = min(initp%soil_water(kben)/soil8(nsoil)%slmsts, 1.d0) rk4aux%hydcond (kben) = rk4aux%hydcond (klsl) rk4aux%psiplusz (kben) = slzt8(klsl) - dslzt8(klsl) * sin_sldrain8 & - + soil8(nsoil)%slpots / wgpfrac ** soil8(nsoil)%slbs + + initp%soil_mstpot(kben) rk4aux%drysoil (kben) = .false. rk4aux%satsoil (kben) = .false. !------------------------------------------------------------------------------------! @@ -395,13 +383,10 @@ end subroutine canopy_derivs_two ! Aquifer. Make the soil moisture in the layer beneath to be always saturated. ! !------------------------------------------------------------------------------------! initp%soil_water (kben) = soil8(nsoil)%slmsts + initp%soil_mstpot (kben) = soil8(nsoil)%slpots initp%soil_fracliq (kben) = initp%soil_fracliq (klsl) - - wgpfrac = min(initp%soil_water(kben)/soil8(nsoil)%slmsts, 1.d0) - rk4aux%hydcond (kben) = slcons18(kben,nsoil) & - * wgpfrac ** (2.d0 * soil8(nsoil)%slbs + 3.d0) - rk4aux%psiplusz (kben) = slzt8(kben) + soil8(nsoil)%slpots & - / wgpfrac ** soil8(nsoil)%slbs + rk4aux%hydcond (kben) = slcons18(kben,nsoil) + rk4aux%psiplusz (kben) = slzt8(kben) + initp%soil_mstpot(kben) rk4aux%drysoil (kben) = .false. rk4aux%satsoil (kben) = .false. @@ -584,11 +569,10 @@ end subroutine canopy_derivs_two if (initp%virtual_water /= 0.d0) then !!process "virtural water" pool nsoil = rk4site%ntext_soil(mzg) if (nsoil /= 13) then - infilt = -dslzi8(mzg)* 5.d-1 * slcons18(mzg,nsoil) & - * (initp%soil_water(mzg) / soil8(nsoil)%slmsts) & - **(2.d0 * soil8(nsoil)%slbs + 3.d0) & - * (rk4aux%psiplusz(mzg)-initp%virtual_water/2.d3) & !diff. in pot. - * 5.d-1 * (initp%soil_fracliq(mzg)+ initp%virtual_fracliq) ! mean liquid fraction + infilt = - dslzi8(mzg) * 5.d-1 & + * hydr_conduct8(mzg,nsoil,initp%soil_water(mzg)) & + * (rk4aux%psiplusz(mzg)-initp%virtual_water/2.d3) & !diff. in pot. + * 5.d-1 * (initp%soil_fracliq(mzg)+ initp%virtual_fracliq) ! mean liquid fraction qinfilt = infilt * wdns8 * tl2uint8(initp%virtual_tempk,1.d0) !----- Adjust other rates accordingly -----------------------------------------! rk4aux%w_flux(mzg+1) = rk4aux%w_flux(mzg+1) + infilt @@ -602,11 +586,10 @@ end subroutine canopy_derivs_two nsoil = rk4site%ntext_soil(mzg) if (nsoil /= 13) then !----- Calculate infiltration rate (m/s) --------------------------------------! - infilt = -dslzi8(mzg) * 5.d-1 * slcons18(mzg,nsoil) & - * (initp%soil_water(mzg) / soil8(nsoil)%slmsts) & - **(2.d0 * soil8(nsoil)%slbs + 3.d0) & - * (rk4aux%psiplusz(mzg) - surface_water/2.d0) & !difference in potentials - * 5.d-1 * (initp%soil_fracliq(mzg) + initp%sfcwater_fracliq(1)) + infilt = - dslzi8(mzg) * 5.d-1 & + * hydr_conduct8(mzg,nsoil,initp%soil_water(mzg)) & + * (rk4aux%psiplusz(mzg) - surface_water/2.d0) & !difference in potentials + * 5.d-1 * (initp%soil_fracliq(mzg) + initp%sfcwater_fracliq(1)) qinfilt = infilt * wdns8 * tl2uint8(initp%sfcwater_tempk(1),1.d0) !----- Adjust other rates accordingly -----------------------------------------! rk4aux%w_flux(mzg+1) = rk4aux%w_flux(mzg+1) + infilt @@ -679,15 +662,15 @@ end subroutine canopy_derivs_two ! age, but that shouldn't affect the budget in any way (except that we are adding water ! ! to the system). ! !---------------------------------------------------------------------------------------! - dinitp%avg_drainage = - rk4aux%w_flux(klsl) * wdns8 - dinitp%avg_drainage_heat = - rk4aux%qw_flux(klsl) + dinitp%avg_drainage = - rk4aux%w_flux (klsl) * wdns8 + dinitp%avg_qdrainage = - rk4aux%qw_flux(klsl) !----- Copy the variables to the budget arrays. ----------------------------------------! if (checkbudget) then dinitp%wbudget_loss2drainage = dinitp%avg_drainage - dinitp%ebudget_loss2drainage = dinitp%avg_drainage_heat + dinitp%ebudget_loss2drainage = dinitp%avg_qdrainage dinitp%wbudget_storage = dinitp%wbudget_storage - dinitp%avg_drainage - dinitp%ebudget_storage = dinitp%ebudget_storage - dinitp%avg_drainage_heat + dinitp%ebudget_storage = dinitp%ebudget_storage - dinitp%avg_qdrainage end if !---------------------------------------------------------------------------------------! @@ -1441,11 +1424,11 @@ subroutine canopy_derivs_two(mzg,initp,dinitp,csite,ipa,hflxgc,wflxgc,qwflxgc,de ! If we are saving fast diagnostics, then we save the fluxes for this cohort. ! !---------------------------------------------------------------------------------! if (fast_diagnostics) then - dinitp%cav_sensible_lc (ico) = hflxlc - dinitp%cav_vapor_lc (ico) = wflxlc - dinitp%cav_transp (ico) = transp - dinitp%cav_intercepted_al (ico) = leaf_intercepted - dinitp%cav_wshed_lg (ico) = wshed + dinitp%avg_sensible_lc (ico) = hflxlc + dinitp%avg_vapor_lc (ico) = wflxlc + dinitp%avg_transp (ico) = transp + dinitp%avg_intercepted_al (ico) = leaf_intercepted + dinitp%avg_wshed_lg (ico) = wshed end if !---------------------------------------------------------------------------------! @@ -1500,11 +1483,11 @@ subroutine canopy_derivs_two(mzg,initp,dinitp,csite,ipa,hflxgc,wflxgc,qwflxgc,de ! If we are saving fast diagnostics, then we save the fluxes for this cohort. ! !---------------------------------------------------------------------------------! if (fast_diagnostics) then - dinitp%cav_sensible_lc (ico) = 0.d0 - dinitp%cav_vapor_lc (ico) = 0.d0 - dinitp%cav_transp (ico) = 0.d0 - dinitp%cav_intercepted_al (ico) = 0.d0 - dinitp%cav_wshed_lg (ico) = 0.d0 + dinitp%avg_sensible_lc (ico) = 0.d0 + dinitp%avg_vapor_lc (ico) = 0.d0 + dinitp%avg_transp (ico) = 0.d0 + dinitp%avg_intercepted_al (ico) = 0.d0 + dinitp%avg_wshed_lg (ico) = 0.d0 end if !---------------------------------------------------------------------------------! @@ -1711,10 +1694,10 @@ subroutine canopy_derivs_two(mzg,initp,dinitp,csite,ipa,hflxgc,wflxgc,qwflxgc,de ! If we are saving fast diagnostics, then we save the fluxes for this cohort. ! !---------------------------------------------------------------------------------! if (fast_diagnostics) then - dinitp%cav_sensible_wc (ico) = hflxwc - dinitp%cav_vapor_wc (ico) = wflxwc - dinitp%cav_intercepted_aw (ico) = wood_intercepted - dinitp%cav_wshed_wg (ico) = wshed + dinitp%avg_sensible_wc (ico) = hflxwc + dinitp%avg_vapor_wc (ico) = wflxwc + dinitp%avg_intercepted_aw (ico) = wood_intercepted + dinitp%avg_wshed_wg (ico) = wshed end if !---------------------------------------------------------------------------------! @@ -1770,10 +1753,10 @@ subroutine canopy_derivs_two(mzg,initp,dinitp,csite,ipa,hflxgc,wflxgc,qwflxgc,de ! If we are saving fast diagnostics, then we save the fluxes for this cohort. ! !---------------------------------------------------------------------------------! if (fast_diagnostics) then - dinitp%cav_sensible_wc (ico) = 0.d0 - dinitp%cav_vapor_wc (ico) = 0.d0 - dinitp%cav_intercepted_aw (ico) = 0.d0 - dinitp%cav_wshed_wg (ico) = 0.d0 + dinitp%avg_sensible_wc (ico) = 0.d0 + dinitp%avg_vapor_wc (ico) = 0.d0 + dinitp%avg_intercepted_aw (ico) = 0.d0 + dinitp%avg_wshed_wg (ico) = 0.d0 end if !---------------------------------------------------------------------------------! @@ -1873,24 +1856,9 @@ subroutine canopy_derivs_two(mzg,initp,dinitp,csite,ipa,hflxgc,wflxgc,qwflxgc,de dinitp%avg_sensible_ac = hflxac ! Sens. heat, Atmo->Canopy dinitp%avg_vapor_ac = wflxac ! Lat. heat, Atmo->Canopy - dinitp%avg_sensible_lc = hflxlc_tot ! Sens. heat, Leaf->Canopy - dinitp%avg_vapor_lc = wflxlc_tot ! Lat. heat, Leaf->Canopy - - dinitp%avg_sensible_wc = hflxwc_tot ! Sens. heat, Wood->Canopy - dinitp%avg_vapor_wc = wflxwc_tot ! Lat. heat, Wood->Canopy - dinitp%avg_sensible_gc = hflxgc ! Sens. heat, Grnd->Canopy - dinitp%avg_transp = transp_tot ! Transpiration dinitp%avg_vapor_gc = wflxgc - dewgndflx ! Lat. heat, Canopy->Grnd - !----- Total evaporation to the canopy air space. -----------------------------------! - dinitp%avg_evap = wflxgc - dewgndflx + wflxlc_tot + wflxwc_tot - - - dinitp%avg_wshed_vg = wshed_tot ! Water shedding,Leaf->Grnd - dinitp%avg_qwshed_vg = qwshed_tot ! Water shedding,Leaf->Grnd - dinitp%avg_intercepted = intercepted_tot ! Intercepted, Atmo->Leaf - dinitp%avg_qintercepted = qintercepted_tot ! Intercepted, Atmo->Lead dinitp%avg_throughfall = throughfall_tot ! Throughfall, Atmo->Grnd dinitp%avg_qthroughfall = qthroughfall_tot ! Throughfall, Atmo->Grnd !------------------------------------------------------------------------------------! @@ -1907,28 +1875,6 @@ subroutine canopy_derivs_two(mzg,initp,dinitp,csite,ipa,hflxgc,wflxgc,qwflxgc,de - - !---------------------------------------------------------------------------------------! - ! Update the absorbed shortwave radiation and the net radiation. ! - !---------------------------------------------------------------------------------------! - if (fast_diagnostics .or. checkbudget .or. print_detailed) then - !----- Average shortwave radiation. -------------------------------------------------! - dinitp%avg_rshort_gnd = dble(csite%rshort_g(ipa)) - dinitp%avg_par_gnd = dble(csite%par_g (ipa)) - do k=1,initp%nlev_sfcwater - dinitp%avg_rshort_gnd = dinitp%avg_rshort_gnd + dble(csite%rshort_s(k,ipa)) - dinitp%avg_par_gnd = dinitp%avg_par_gnd + dble(csite%par_s (k,ipa)) - end do - !------------------------------------------------------------------------------------! - - !----- Average longwave radiation. --------------------------------------------------! - dinitp%avg_rlong_gnd = dble(csite%rlong_g(ipa)) + dble(csite%rlong_s(ipa)) - !------------------------------------------------------------------------------------! - end if - !---------------------------------------------------------------------------------------! - - - !---------------------------------------------------------------------------------------! ! Update the budget variables. ! !---------------------------------------------------------------------------------------! diff --git a/ED/src/dynamics/rk4_driver.F90 b/ED/src/dynamics/rk4_driver.F90 index 89f1b1b5c..8c6c93842 100644 --- a/ED/src/dynamics/rk4_driver.F90 +++ b/ED/src/dynamics/rk4_driver.F90 @@ -196,7 +196,8 @@ subroutine rk4_timestep(cgrid,ifm) !---------------------------------------------------------------------------! ! This is the driver for the integration process... ! !---------------------------------------------------------------------------! - call integrate_patch_rk4(csite,integration_buff%initp,ipa,wcurr_loss2atm & + call integrate_patch_rk4(csite,integration_buff%initp,ipa & + ,cpoly%nighttime(isi),wcurr_loss2atm & ,ecurr_netrad,ecurr_loss2atm,co2curr_loss2atm & ,wcurr_loss2drainage,ecurr_loss2drainage & ,wcurr_loss2runoff,ecurr_loss2runoff,nsteps) @@ -249,7 +250,7 @@ end subroutine rk4_timestep !=======================================================================================! ! This subroutine will drive the integration process. ! !---------------------------------------------------------------------------------------! - subroutine integrate_patch_rk4(csite,initp,ipa,wcurr_loss2atm,ecurr_netrad & + subroutine integrate_patch_rk4(csite,initp,ipa,nighttime,wcurr_loss2atm,ecurr_netrad & ,ecurr_loss2atm,co2curr_loss2atm,wcurr_loss2drainage & ,ecurr_loss2drainage,wcurr_loss2runoff,ecurr_loss2runoff & ,nsteps) @@ -273,6 +274,7 @@ subroutine integrate_patch_rk4(csite,initp,ipa,wcurr_loss2atm,ecurr_netrad type(sitetype) , target :: csite type(rk4patchtype) , target :: initp integer , intent(in) :: ipa + logical , intent(in) :: nighttime real , intent(out) :: wcurr_loss2atm real , intent(out) :: ecurr_netrad real , intent(out) :: ecurr_loss2atm @@ -332,7 +334,7 @@ subroutine integrate_patch_rk4(csite,initp,ipa,wcurr_loss2atm,ecurr_netrad !------------------------------------------------------------------------------------! ! Move the state variables from the integrated patch to the model patch. ! !------------------------------------------------------------------------------------! - call initp2modelp(tend-tbeg,initp,csite,ipa,wcurr_loss2atm,ecurr_netrad & + call initp2modelp(tend-tbeg,initp,csite,ipa,nighttime,wcurr_loss2atm,ecurr_netrad & ,ecurr_loss2atm,co2curr_loss2atm,wcurr_loss2drainage & ,ecurr_loss2drainage,wcurr_loss2runoff,ecurr_loss2runoff) @@ -351,7 +353,7 @@ end subroutine integrate_patch_rk4 ! This subroutine will copy the variables from the integration buffer to the state ! ! patch and cohorts. ! !---------------------------------------------------------------------------------------! - subroutine initp2modelp(hdid,initp,csite,ipa,wbudget_loss2atm,ebudget_netrad & + subroutine initp2modelp(hdid,initp,csite,ipa,nighttime,wbudget_loss2atm,ebudget_netrad & ,ebudget_loss2atm,co2budget_loss2atm,wbudget_loss2drainage & ,ebudget_loss2drainage,wbudget_loss2runoff,ebudget_loss2runoff) use rk4_coms , only : rk4patchtype & ! structure @@ -368,7 +370,10 @@ subroutine initp2modelp(hdid,initp,csite,ipa,wbudget_loss2atm,ebudget_netrad , t3ple & ! intent(in) , t3ple8 & ! intent(in) , wdns8 ! ! intent(in) - use ed_misc_coms , only : fast_diagnostics ! ! intent(in) + use ed_misc_coms , only : fast_diagnostics & ! intent(in) + , writing_long & ! intent(in) + , dtlsm & ! intent(in) + , frqsum ! ! intent(in) use soil_coms , only : soil8 & ! intent(in) , dslz8 & ! intent(in) , slz8 & ! intent(in) @@ -390,6 +395,7 @@ subroutine initp2modelp(hdid,initp,csite,ipa,wbudget_loss2atm,ebudget_netrad type(sitetype) , target :: csite real(kind=8) , intent(in) :: hdid integer , intent(in) :: ipa + logical , intent(in) :: nighttime real , intent(out) :: wbudget_loss2atm real , intent(out) :: ebudget_netrad real , intent(out) :: ebudget_loss2atm @@ -422,6 +428,17 @@ subroutine initp2modelp(hdid,initp,csite,ipa,wbudget_loss2atm,ebudget_netrad real , parameter :: thirtydays_sec = 30. * day_sec !----- External function ------------------------------------------------------------! real , external :: sngloff + !----- Locally saved variables. -----------------------------------------------------! + real , save :: dtlsm_o_frqsum + logical , save :: first_time = .true. + !------------------------------------------------------------------------------------! + + + !----- Assign the constant scaling factor. ------------------------------------------! + if (first_time) then + first_time = .false. + dtlsm_o_frqsum = dtlsm / frqsum + end if !------------------------------------------------------------------------------------! @@ -465,6 +482,17 @@ subroutine initp2modelp(hdid,initp,csite,ipa,wbudget_loss2atm,ebudget_netrad ,csite%can_shv(ipa) ,.true.) !------------------------------------------------------------------------------------! + + + !------ Copy the ground variables to the output. ------------------------------------! + csite%ground_shv (ipa) = sngloff(initp%ground_shv , tiny_offset) + csite%ground_ssh (ipa) = sngloff(initp%ground_ssh , tiny_offset) + csite%ground_temp(ipa) = sngloff(initp%ground_temp, tiny_offset) + csite%ground_fliq(ipa) = sngloff(initp%ground_fliq, tiny_offset) + !------------------------------------------------------------------------------------! + + + csite%ggbare(ipa) = sngloff(initp%ggbare ,tiny_offset) csite%ggveg (ipa) = sngloff(initp%ggveg ,tiny_offset) csite%ggnet (ipa) = sngloff(initp%ggnet ,tiny_offset) @@ -488,37 +516,24 @@ subroutine initp2modelp(hdid,initp,csite,ipa,wbudget_loss2atm,ebudget_netrad ! check this before copying. ! !------------------------------------------------------------------------------------! if (fast_diagnostics) then - csite%avg_vapor_lc (ipa) = sngloff(initp%avg_vapor_lc ,tiny_offset) - csite%avg_vapor_wc (ipa) = sngloff(initp%avg_vapor_wc ,tiny_offset) - csite%avg_vapor_gc (ipa) = sngloff(initp%avg_vapor_gc ,tiny_offset) - csite%avg_wshed_vg (ipa) = sngloff(initp%avg_wshed_vg ,tiny_offset) - csite%avg_intercepted (ipa) = sngloff(initp%avg_intercepted ,tiny_offset) - csite%avg_throughfall (ipa) = sngloff(initp%avg_throughfall ,tiny_offset) - csite%avg_vapor_ac (ipa) = sngloff(initp%avg_vapor_ac ,tiny_offset) - csite%avg_transp (ipa) = sngloff(initp%avg_transp ,tiny_offset) - csite%avg_evap (ipa) = sngloff(initp%avg_evap ,tiny_offset) - csite%avg_drainage (ipa) = sngloff(initp%avg_drainage ,tiny_offset) - csite%avg_drainage_heat (ipa) = sngloff(initp%avg_drainage_heat ,tiny_offset) - csite%avg_rshort_gnd (ipa) = sngloff(initp%avg_rshort_gnd ,tiny_offset) - csite%avg_par_gnd (ipa) = sngloff(initp%avg_par_gnd ,tiny_offset) - csite%avg_rlong_gnd (ipa) = sngloff(initp%avg_rlong_gnd ,tiny_offset) - csite%avg_sensible_lc (ipa) = sngloff(initp%avg_sensible_lc ,tiny_offset) - csite%avg_sensible_wc (ipa) = sngloff(initp%avg_sensible_wc ,tiny_offset) - csite%avg_qwshed_vg (ipa) = sngloff(initp%avg_qwshed_vg ,tiny_offset) - csite%avg_qintercepted (ipa) = sngloff(initp%avg_qintercepted ,tiny_offset) - csite%avg_qthroughfall (ipa) = sngloff(initp%avg_qthroughfall ,tiny_offset) - csite%avg_sensible_gc (ipa) = sngloff(initp%avg_sensible_gc ,tiny_offset) - csite%avg_sensible_ac (ipa) = sngloff(initp%avg_sensible_ac ,tiny_offset) - csite%avg_carbon_ac (ipa) = sngloff(initp%avg_carbon_ac ,tiny_offset) - csite%avg_carbon_st (ipa) = sngloff(initp%avg_carbon_st ,tiny_offset) - csite%avg_ustar (ipa) = sngloff(initp%avg_ustar ,tiny_offset) - csite%avg_tstar (ipa) = sngloff(initp%avg_tstar ,tiny_offset) - csite%avg_qstar (ipa) = sngloff(initp%avg_qstar ,tiny_offset) - csite%avg_cstar (ipa) = sngloff(initp%avg_cstar ,tiny_offset) + csite%fmean_vapor_gc (ipa) = sngloff(initp%avg_vapor_gc ,tiny_offset) + csite%fmean_throughfall (ipa) = sngloff(initp%avg_throughfall ,tiny_offset) + csite%fmean_vapor_ac (ipa) = sngloff(initp%avg_vapor_ac ,tiny_offset) + csite%fmean_drainage (ipa) = sngloff(initp%avg_drainage ,tiny_offset) + csite%fmean_qdrainage (ipa) = sngloff(initp%avg_qdrainage ,tiny_offset) + csite%fmean_qthroughfall (ipa) = sngloff(initp%avg_qthroughfall ,tiny_offset) + csite%fmean_sensible_gc (ipa) = sngloff(initp%avg_sensible_gc ,tiny_offset) + csite%fmean_sensible_ac (ipa) = sngloff(initp%avg_sensible_ac ,tiny_offset) + csite%fmean_carbon_ac (ipa) = sngloff(initp%avg_carbon_ac ,tiny_offset) + csite%fmean_carbon_st (ipa) = sngloff(initp%avg_carbon_st ,tiny_offset) + csite%fmean_ustar (ipa) = sngloff(initp%avg_ustar ,tiny_offset) + csite%fmean_tstar (ipa) = sngloff(initp%avg_tstar ,tiny_offset) + csite%fmean_qstar (ipa) = sngloff(initp%avg_qstar ,tiny_offset) + csite%fmean_cstar (ipa) = sngloff(initp%avg_cstar ,tiny_offset) do k = rk4site%lsl, nzg - csite%avg_sensible_gg(k,ipa) = sngloff(initp%avg_sensible_gg(k) ,tiny_offset) - csite%avg_smoist_gg (k,ipa) = sngloff(initp%avg_smoist_gg (k) ,tiny_offset) - csite%avg_transloss (k,ipa) = sngloff(initp%avg_transloss (k) ,tiny_offset) + csite%fmean_sensible_gg(k,ipa) = sngloff(initp%avg_sensible_gg(k) ,tiny_offset) + csite%fmean_smoist_gg (k,ipa) = sngloff(initp%avg_smoist_gg (k) ,tiny_offset) + csite%fmean_transloss (k,ipa) = sngloff(initp%avg_transloss (k) ,tiny_offset) end do !---------------------------------------------------------------------------------! @@ -527,49 +542,26 @@ subroutine initp2modelp(hdid,initp,csite,ipa,wbudget_loss2atm,ebudget_netrad ! Cohort-level variables. ! !---------------------------------------------------------------------------------! do ico=1,cpatch%ncohorts - cpatch%mean_sensible_lc (ico) = sngloff(initp%cav_sensible_lc (ico) & + cpatch%fmean_sensible_lc (ico) = sngloff(initp%avg_sensible_lc (ico) & ,tiny_offset) - cpatch%mean_sensible_wc (ico) = sngloff(initp%cav_sensible_wc (ico) & + cpatch%fmean_sensible_wc (ico) = sngloff(initp%avg_sensible_wc (ico) & ,tiny_offset) - cpatch%mean_vapor_lc (ico) = sngloff(initp%cav_vapor_lc (ico) & + cpatch%fmean_vapor_lc (ico) = sngloff(initp%avg_vapor_lc (ico) & ,tiny_offset) - cpatch%mean_vapor_wc (ico) = sngloff(initp%cav_vapor_wc (ico) & + cpatch%fmean_vapor_wc (ico) = sngloff(initp%avg_vapor_wc (ico) & ,tiny_offset) - cpatch%mean_transp (ico) = sngloff(initp%cav_transp (ico) & + cpatch%fmean_transp (ico) = sngloff(initp%avg_transp (ico) & ,tiny_offset) - cpatch%mean_intercepted_al(ico) = sngloff(initp%cav_intercepted_al (ico) & + cpatch%fmean_intercepted_al(ico) = sngloff(initp%avg_intercepted_al (ico) & ,tiny_offset) - cpatch%mean_intercepted_aw(ico) = sngloff(initp%cav_intercepted_aw (ico) & + cpatch%fmean_intercepted_aw(ico) = sngloff(initp%avg_intercepted_aw (ico) & ,tiny_offset) - cpatch%mean_wshed_lg (ico) = sngloff(initp%cav_wshed_lg (ico) & + cpatch%fmean_wshed_lg (ico) = sngloff(initp%avg_wshed_lg (ico) & ,tiny_offset) - cpatch%mean_wshed_wg (ico) = sngloff(initp%cav_wshed_wg (ico) & + cpatch%fmean_wshed_wg (ico) = sngloff(initp%avg_wshed_wg (ico) & ,tiny_offset) end do !---------------------------------------------------------------------------------! - - !---------------------------------------------------------------------------------! - ! These variables are integrated here, since they don't change with time. ! - !---------------------------------------------------------------------------------! - csite%avg_parup (ipa) = csite%avg_parup (ipa) & - + csite%parup (ipa) * sngl(hdid) - csite%avg_nirup (ipa) = csite%avg_parup (ipa) & - + csite%nirup (ipa) * sngl(hdid) - csite%avg_rshortup (ipa) = csite%avg_rshortup (ipa) & - + csite%rshortup (ipa) * sngl(hdid) - csite%avg_rlongup (ipa) = csite%avg_rlongup (ipa) & - + csite%rlongup (ipa) * sngl(hdid) - csite%avg_rnet (ipa) = csite%avg_rnet (ipa) & - + csite%rnet (ipa) * sngl(hdid) - csite%avg_albedo (ipa) = csite%avg_albedo (ipa) & - + csite%albedo (ipa) * sngl(hdid) - csite%avg_albedo_beam (ipa) = csite%avg_albedo_beam (ipa) & - + csite%albedo_beam (ipa) * sngl(hdid) - csite%avg_albedo_diffuse (ipa) = csite%avg_albedo_diffuse (ipa) & - + csite%albedo_diffuse (ipa) * sngl(hdid) - csite%avg_rlong_albedo (ipa) = csite%avg_rlong_albedo (ipa) & - + csite%rlong_albedo (ipa) * sngl(hdid) - !---------------------------------------------------------------------------------! end if !------------------------------------------------------------------------------------! @@ -685,9 +677,10 @@ subroutine initp2modelp(hdid,initp,csite,ipa,wbudget_loss2atm,ebudget_netrad end if do k = rk4site%lsl, nzg - csite%soil_water(k,ipa) = sngloff(initp%soil_water(k) ,tiny_offset) - csite%soil_energy(k,ipa) = sngloff(initp%soil_energy(k) ,tiny_offset) - csite%soil_tempk(k,ipa) = sngloff(initp%soil_tempk(k) ,tiny_offset) + csite%soil_water (k,ipa) = sngloff(initp%soil_water (k),tiny_offset) + csite%soil_mstpot (k,ipa) = sngloff(initp%soil_mstpot (k),tiny_offset) + csite%soil_energy (k,ipa) = sngloff(initp%soil_energy (k),tiny_offset) + csite%soil_tempk (k,ipa) = sngloff(initp%soil_tempk (k),tiny_offset) csite%soil_fracliq(k,ipa) = sngloff(initp%soil_fracliq(k),tiny_offset) end do @@ -717,10 +710,10 @@ subroutine initp2modelp(hdid,initp,csite,ipa,wbudget_loss2atm,ebudget_netrad csite%sfcwater_depth(k,ipa) = 0. if (k == 1) then csite%sfcwater_fracliq(k,ipa) = csite%soil_fracliq(nzg,ipa) - csite%sfcwater_tempk(k,ipa) = csite%soil_tempk(nzg,ipa) + csite%sfcwater_tempk (k,ipa) = csite%soil_tempk (nzg,ipa) else csite%sfcwater_fracliq(k,ipa) = csite%sfcwater_fracliq(k-1,ipa) - csite%sfcwater_tempk(k,ipa) = csite%sfcwater_tempk(k-1,ipa) + csite%sfcwater_tempk (k,ipa) = csite%sfcwater_tempk (k-1,ipa) end if end do !------------------------------------------------------------------------------------! @@ -1365,13 +1358,112 @@ subroutine initp2modelp(hdid,initp,csite,ipa,wbudget_loss2atm,ebudget_netrad end if !---------------------------------------------------------------------------------! end do + !------------------------------------------------------------------------------------! - !------ Copy the ground variables to the output. ------------------------------------! - csite%ground_shv (ipa) = sngloff(initp%ground_shv , tiny_offset) - csite%ground_ssh (ipa) = sngloff(initp%ground_ssh , tiny_offset) - csite%ground_temp(ipa) = sngloff(initp%ground_temp, tiny_offset) - csite%ground_fliq(ipa) = sngloff(initp%ground_fliq, tiny_offset) - return + + + !------------------------------------------------------------------------------------! + ! Integrate the average state variables. Notice that many variables (e.g., ! + ! temperature, density, and soil matric potential) are NOT integrated here: instead, ! + ! we find the averaged value after we normalise the average of the prognostic ! + ! variables. Same thing for aggregated variables at the patch level. ! + !------------------------------------------------------------------------------------! + csite%fmean_can_theiv (ipa) = csite%fmean_can_theiv (ipa) & + + csite%can_theiv (ipa) * dtlsm_o_frqsum + csite%fmean_can_theta (ipa) = csite%fmean_can_theta (ipa) & + + csite%can_theta (ipa) * dtlsm_o_frqsum + csite%fmean_can_vpdef (ipa) = csite%fmean_can_vpdef (ipa) & + + csite%can_vpdef (ipa) * dtlsm_o_frqsum + csite%fmean_can_shv (ipa) = csite%fmean_can_shv (ipa) & + + csite%can_shv (ipa) * dtlsm_o_frqsum + csite%fmean_can_co2 (ipa) = csite%fmean_can_co2 (ipa) & + + csite%can_co2 (ipa) * dtlsm_o_frqsum + csite%fmean_can_prss (ipa) = csite%fmean_can_prss (ipa) & + + csite%can_prss (ipa) * dtlsm_o_frqsum + csite%fmean_gnd_temp (ipa) = csite%fmean_gnd_temp (ipa) & + + csite%ground_temp (ipa) * dtlsm_o_frqsum + csite%fmean_gnd_shv (ipa) = csite%fmean_gnd_shv (ipa) & + + csite%ground_shv (ipa) * dtlsm_o_frqsum + csite%fmean_can_ggnd (ipa) = csite%fmean_can_ggnd (ipa) & + + csite%ggnet (ipa) * dtlsm_o_frqsum + !------------------------------------------------------------------------------------! + ! Snow/pounding layers. We keep track of the total, not individual layers. ! + ! Energy will be integrated as an extensive variable, we will convert it by the ! + ! output time only. ! + !------------------------------------------------------------------------------------! + do k=1,csite%nlev_sfcwater(ipa) + csite%fmean_sfcw_depth (ipa) = csite%fmean_sfcw_depth (ipa) & + + csite%sfcwater_depth (k,ipa) * dtlsm_o_frqsum + csite%fmean_sfcw_energy(ipa) = csite%fmean_sfcw_energy (ipa) & + + csite%sfcwater_energy (k,ipa) & + * csite%sfcwater_mass (k,ipa) * dtlsm_o_frqsum + csite%fmean_sfcw_mass (ipa) = csite%fmean_sfcw_mass (ipa) & + + csite%sfcwater_mass (k,ipa) * dtlsm_o_frqsum + end do + !------ Cohort-level variables. -----------------------------------------------------! + do ico=1,cpatch%ncohorts + cpatch%fmean_leaf_energy(ico) = cpatch%fmean_leaf_energy(ico) & + + cpatch%leaf_energy (ico) * dtlsm_o_frqsum + cpatch%fmean_leaf_water (ico) = cpatch%fmean_leaf_water (ico) & + + cpatch%leaf_water (ico) * dtlsm_o_frqsum + cpatch%fmean_leaf_hcap (ico) = cpatch%fmean_leaf_hcap (ico) & + + cpatch%leaf_hcap (ico) * dtlsm_o_frqsum + cpatch%fmean_leaf_vpdef (ico) = cpatch%fmean_leaf_vpdef (ico) & + + cpatch%leaf_vpdef (ico) * dtlsm_o_frqsum + cpatch%fmean_wood_energy(ico) = cpatch%fmean_wood_energy(ico) & + + cpatch%wood_energy (ico) * dtlsm_o_frqsum + cpatch%fmean_wood_water (ico) = cpatch%fmean_wood_water (ico) & + + cpatch%wood_water (ico) * dtlsm_o_frqsum + cpatch%fmean_wood_hcap (ico) = cpatch%fmean_wood_hcap (ico) & + + cpatch%wood_hcap (ico) * dtlsm_o_frqsum + cpatch%fmean_leaf_gsw (ico) = cpatch%fmean_leaf_gsw (ico) & + + cpatch%leaf_gsw (ico) * dtlsm_o_frqsum + cpatch%fmean_leaf_gbw (ico) = cpatch%fmean_leaf_gbw (ico) & + + cpatch%leaf_gbw (ico) * dtlsm_o_frqsum + cpatch%fmean_wood_gbw (ico) = cpatch%fmean_wood_gbw (ico) & + + cpatch%wood_gbw (ico) * dtlsm_o_frqsum + cpatch%fmean_psi_open (ico) = cpatch%fmean_psi_open (ico) & + + cpatch%psi_open (ico) * dtlsm_o_frqsum + cpatch%fmean_psi_closed (ico) = cpatch%fmean_psi_closed (ico) & + + cpatch%psi_closed (ico) * dtlsm_o_frqsum + cpatch%fmean_fs_open (ico) = cpatch%fmean_fs_open (ico) & + + cpatch%fs_open (ico) * dtlsm_o_frqsum + cpatch%fmean_fsw (ico) = cpatch%fmean_fsw (ico) & + + cpatch%fsw (ico) * dtlsm_o_frqsum + cpatch%fmean_fsn (ico) = cpatch%fmean_fsn (ico) & + + cpatch%fsn (ico) * dtlsm_o_frqsum + !---------------------------------------------------------------------------------! + ! The penalty factor for water and nitrogen are meaningful only during the ! + ! day. For the daily means we must add only when it is daytime, so we integrate ! + ! them here too. ! + !---------------------------------------------------------------------------------! + if (.not. nighttime .and. writing_long) then + cpatch%dmean_fs_open (ico) = cpatch%dmean_fs_open (ico) & + + cpatch%fs_open (ico) & + * dtlsm + cpatch%dmean_fsw (ico) = cpatch%dmean_fsw (ico) & + + cpatch%fsw (ico) & + * dtlsm + cpatch%dmean_fsn (ico) = cpatch%dmean_fsn (ico) & + + cpatch%fsn (ico) & + * dtlsm + end if + !---------------------------------------------------------------------------------! + end do + !------ Soil variables. -------------------------------------------------------------! + do k = rk4site%lsl, nzg + csite%fmean_soil_energy(k,ipa) = csite%fmean_soil_energy(k,ipa) & + + csite%soil_energy (k,ipa) & + * dtlsm_o_frqsum + csite%fmean_soil_mstpot(k,ipa) = csite%fmean_soil_mstpot(k,ipa) & + + csite%soil_mstpot (k,ipa) & + * dtlsm_o_frqsum + csite%fmean_soil_water (k,ipa) = csite%fmean_soil_water (k,ipa) & + + csite%soil_water (k,ipa) & + * dtlsm_o_frqsum + end do + !------------------------------------------------------------------------------------! + return end subroutine initp2modelp !=======================================================================================! !=======================================================================================! diff --git a/ED/src/dynamics/rk4_integ_utils.f90 b/ED/src/dynamics/rk4_integ_utils.f90 index 445729861..8fdc9b1d9 100644 --- a/ED/src/dynamics/rk4_integ_utils.f90 +++ b/ED/src/dynamics/rk4_integ_utils.f90 @@ -152,12 +152,12 @@ subroutine odeint(h1,csite,ipa,nsteps) ! There is no need to divide wfreeb and qwfree by time step, which ! ! will be done in subroutine normalize_averaged_vars. ! !------------------------------------------------------------------------! - csite%runoff(ipa) = csite%runoff(ipa) & - + sngloff(wfreeb,tiny_offset) - csite%avg_runoff(ipa) = csite%avg_runoff(ipa) & - + sngloff(wfreeb,tiny_offset) - csite%avg_runoff_heat(ipa) = csite%avg_runoff_heat(ipa) & - + sngloff(qwfree,tiny_offset) + csite%runoff (ipa) = csite%runoff(ipa) & + + sngloff(wfreeb,tiny_offset) + csite%fmean_runoff (ipa) = csite%fmean_runoff(ipa) & + + sngloff(wfreeb,tiny_offset) + csite%fmean_qrunoff(ipa) = csite%fmean_qrunoff(ipa) & + + sngloff(qwfree,tiny_offset) end if if (checkbudget) then !------------------------------------------------------------------------! @@ -185,9 +185,10 @@ subroutine odeint(h1,csite,ipa,nsteps) ! Update the average time step. The square of DTLSM (tend-tbeg) is needed ! ! because we will divide this by the time between t0 and t0+frqsum. ! !---------------------------------------------------------------------------------! - csite%avg_rk4step(ipa) = csite%avg_rk4step(ipa) & - + sngl((tend-tbeg)*(tend-tbeg))/real(i) + csite%fmean_rk4step(ipa) = csite%fmean_rk4step(ipa) & + + sngl((tend-tbeg)*(tend-tbeg))/real(i) nsteps = i + !---------------------------------------------------------------------------------! return end if @@ -436,24 +437,10 @@ subroutine inc_rk4_patch(rkp, inc, fac, cpatch) rkp%avg_carbon_ac = rkp%avg_carbon_ac + fac * inc%avg_carbon_ac rkp%avg_carbon_st = rkp%avg_carbon_st + fac * inc%avg_carbon_st - rkp%avg_vapor_lc = rkp%avg_vapor_lc + fac * inc%avg_vapor_lc - rkp%avg_vapor_wc = rkp%avg_vapor_wc + fac * inc%avg_vapor_wc - rkp%avg_vapor_gc = rkp%avg_vapor_gc + fac * inc%avg_vapor_gc - rkp%avg_wshed_vg = rkp%avg_wshed_vg + fac * inc%avg_wshed_vg - rkp%avg_intercepted = rkp%avg_intercepted + fac * inc%avg_intercepted rkp%avg_throughfall = rkp%avg_throughfall + fac * inc%avg_throughfall rkp%avg_vapor_ac = rkp%avg_vapor_ac + fac * inc%avg_vapor_ac - rkp%avg_transp = rkp%avg_transp + fac * inc%avg_transp - rkp%avg_evap = rkp%avg_evap + fac * inc%avg_evap rkp%avg_drainage = rkp%avg_drainage + fac * inc%avg_drainage - rkp%avg_drainage_heat = rkp%avg_drainage_heat + fac * inc%avg_drainage_heat - rkp%avg_rshort_gnd = rkp%avg_rshort_gnd + fac * inc%avg_rshort_gnd - rkp%avg_par_gnd = rkp%avg_par_gnd + fac * inc%avg_par_gnd - rkp%avg_rlong_gnd = rkp%avg_rlong_gnd + fac * inc%avg_rlong_gnd - rkp%avg_sensible_lc = rkp%avg_sensible_lc + fac * inc%avg_sensible_lc - rkp%avg_sensible_wc = rkp%avg_sensible_wc + fac * inc%avg_sensible_wc - rkp%avg_qwshed_vg = rkp%avg_qwshed_vg + fac * inc%avg_qwshed_vg - rkp%avg_qintercepted = rkp%avg_qintercepted + fac * inc%avg_qintercepted + rkp%avg_qdrainage = rkp%avg_qdrainage + fac * inc%avg_qdrainage rkp%avg_qthroughfall = rkp%avg_qthroughfall + fac * inc%avg_qthroughfall rkp%avg_sensible_gc = rkp%avg_sensible_gc + fac * inc%avg_sensible_gc rkp%avg_sensible_ac = rkp%avg_sensible_ac + fac * inc%avg_sensible_ac @@ -466,24 +453,24 @@ subroutine inc_rk4_patch(rkp, inc, fac, cpatch) do k=1,cpatch%ncohorts - rkp%cav_sensible_lc (k) = rkp%cav_sensible_lc (k) & - + fac * inc%cav_sensible_lc (k) - rkp%cav_sensible_wc (k) = rkp%cav_sensible_wc (k) & - + fac * inc%cav_sensible_wc (k) - rkp%cav_vapor_lc (k) = rkp%cav_vapor_lc (k) & - + fac * inc%cav_vapor_lc (k) - rkp%cav_vapor_wc (k) = rkp%cav_vapor_wc (k) & - + fac * inc%cav_vapor_wc (k) - rkp%cav_transp (k) = rkp%cav_transp (k) & - + fac * inc%cav_transp (k) - rkp%cav_intercepted_al(k) = rkp%cav_intercepted_al(k) & - + fac * inc%cav_intercepted_al(k) - rkp%cav_intercepted_aw(k) = rkp%cav_intercepted_aw(k) & - + fac * inc%cav_intercepted_aw(k) - rkp%cav_wshed_lg (k) = rkp%cav_wshed_lg (k) & - + fac * inc%cav_wshed_lg (k) - rkp%cav_wshed_wg (k) = rkp%cav_wshed_wg (k) & - + fac * inc%cav_wshed_wg (k) + rkp%avg_sensible_lc (k) = rkp%avg_sensible_lc (k) & + + fac * inc%avg_sensible_lc (k) + rkp%avg_sensible_wc (k) = rkp%avg_sensible_wc (k) & + + fac * inc%avg_sensible_wc (k) + rkp%avg_vapor_lc (k) = rkp%avg_vapor_lc (k) & + + fac * inc%avg_vapor_lc (k) + rkp%avg_vapor_wc (k) = rkp%avg_vapor_wc (k) & + + fac * inc%avg_vapor_wc (k) + rkp%avg_transp (k) = rkp%avg_transp (k) & + + fac * inc%avg_transp (k) + rkp%avg_intercepted_al(k) = rkp%avg_intercepted_al(k) & + + fac * inc%avg_intercepted_al(k) + rkp%avg_intercepted_aw(k) = rkp%avg_intercepted_aw(k) & + + fac * inc%avg_intercepted_aw(k) + rkp%avg_wshed_lg (k) = rkp%avg_wshed_lg (k) & + + fac * inc%avg_wshed_lg (k) + rkp%avg_wshed_wg (k) = rkp%avg_wshed_wg (k) & + + fac * inc%avg_wshed_wg (k) end do end if @@ -497,24 +484,11 @@ subroutine inc_rk4_patch(rkp, inc, fac, cpatch) rkp%flx_carbon_ac = rkp%flx_carbon_ac + fac * inc%avg_carbon_ac rkp%flx_carbon_st = rkp%flx_carbon_st + fac * inc%avg_carbon_st - rkp%flx_vapor_lc = rkp%flx_vapor_lc + fac * inc%avg_vapor_lc - rkp%flx_vapor_wc = rkp%flx_vapor_wc + fac * inc%avg_vapor_wc rkp%flx_vapor_gc = rkp%flx_vapor_gc + fac * inc%avg_vapor_gc - rkp%flx_wshed_vg = rkp%flx_wshed_vg + fac * inc%avg_wshed_vg - rkp%flx_intercepted = rkp%flx_intercepted + fac * inc%avg_intercepted rkp%flx_throughfall = rkp%flx_throughfall + fac * inc%avg_throughfall rkp%flx_vapor_ac = rkp%flx_vapor_ac + fac * inc%avg_vapor_ac - rkp%flx_transp = rkp%flx_transp + fac * inc%avg_transp - rkp%flx_evap = rkp%flx_evap + fac * inc%avg_evap rkp%flx_drainage = rkp%flx_drainage + fac * inc%avg_drainage - rkp%flx_drainage_heat = rkp%flx_drainage_heat + fac * inc%avg_drainage_heat - rkp%flx_rshort_gnd = rkp%flx_rshort_gnd + fac * inc%avg_rshort_gnd - rkp%flx_par_gnd = rkp%flx_par_gnd + fac * inc%avg_par_gnd - rkp%flx_rlong_gnd = rkp%flx_rlong_gnd + fac * inc%avg_rlong_gnd - rkp%flx_sensible_lc = rkp%flx_sensible_lc + fac * inc%avg_sensible_lc - rkp%flx_sensible_wc = rkp%flx_sensible_wc + fac * inc%avg_sensible_wc - rkp%flx_qwshed_vg = rkp%flx_qwshed_vg + fac * inc%avg_qwshed_vg - rkp%flx_qintercepted = rkp%flx_qintercepted + fac * inc%avg_qintercepted + rkp%flx_qdrainage = rkp%flx_qdrainage + fac * inc%avg_qdrainage rkp%flx_qthroughfall = rkp%flx_qthroughfall + fac * inc%avg_qthroughfall rkp%flx_sensible_gc = rkp%flx_sensible_gc + fac * inc%avg_sensible_gc rkp%flx_sensible_ac = rkp%flx_sensible_ac + fac * inc%avg_sensible_ac @@ -526,20 +500,38 @@ subroutine inc_rk4_patch(rkp, inc, fac, cpatch) end do do ico = 1,cpatch%ncohorts - rkp%cfx_hflxlc (ico) = rkp%cfx_hflxlc (ico) & - + fac * inc%cfx_hflxlc (ico) - rkp%cfx_hflxwc (ico) = rkp%cfx_hflxwc (ico) & - + fac * inc%cfx_hflxwc (ico) - rkp%cfx_qwflxlc (ico) = rkp%cfx_qwflxlc (ico) & - + fac * inc%cfx_qwflxlc (ico) - rkp%cfx_qwflxwc (ico) = rkp%cfx_qwflxwc (ico) & - + fac * inc%cfx_qwflxwc (ico) - rkp%cfx_qwshed (ico) = rkp%cfx_qwshed (ico) & - + fac * inc%cfx_qwshed (ico) - rkp%cfx_qtransp (ico) = rkp%cfx_qtransp (ico) & - + fac * inc%cfx_qtransp (ico) - rkp%cfx_qintercepted(ico) = rkp%cfx_qintercepted(ico) & - + fac * inc%cfx_qintercepted(ico) + rkp%flx_vapor_lc = rkp%flx_vapor_lc & + + fac * inc%avg_vapor_lc (ico) + rkp%flx_vapor_wc = rkp%flx_vapor_wc & + + fac * inc%avg_vapor_wc (ico) + rkp%flx_wshed_vg = rkp%flx_wshed_vg & + + fac * ( inc%avg_wshed_lg (ico) & + + inc%avg_wshed_wg (ico) ) + rkp%flx_intercepted = rkp%flx_intercepted & + + fac * ( inc%avg_intercepted_al (ico) & + + inc%avg_intercepted_aw (ico) ) + rkp%flx_sensible_lc = rkp%flx_sensible_lc & + + fac * inc%avg_sensible_lc (ico) + rkp%flx_sensible_wc = rkp%flx_sensible_wc & + + fac * inc%avg_sensible_wc (ico) + rkp%flx_qwshed_vg = rkp%flx_qwshed_vg & + + fac * inc%cfx_qwshed (ico) + rkp%flx_qintercepted = rkp%flx_qintercepted & + + fac * inc%cfx_qintercepted (ico) + rkp%cfx_hflxlc (ico) = rkp%cfx_hflxlc (ico) & + + fac * inc%cfx_hflxlc (ico) + rkp%cfx_hflxwc (ico) = rkp%cfx_hflxwc (ico) & + + fac * inc%cfx_hflxwc (ico) + rkp%cfx_qwflxlc (ico) = rkp%cfx_qwflxlc (ico) & + + fac * inc%cfx_qwflxlc (ico) + rkp%cfx_qwflxwc (ico) = rkp%cfx_qwflxwc (ico) & + + fac * inc%cfx_qwflxwc (ico) + rkp%cfx_qwshed (ico) = rkp%cfx_qwshed (ico) & + + fac * inc%cfx_qwshed (ico) + rkp%cfx_qtransp (ico) = rkp%cfx_qtransp (ico) & + + fac * inc%cfx_qtransp (ico) + rkp%cfx_qintercepted(ico) = rkp%cfx_qintercepted (ico) & + + fac * inc%cfx_qintercepted (ico) end do end if @@ -1281,6 +1273,7 @@ subroutine copy_rk4_patch(sourcep, targetp, cpatch) do k=rk4site%lsl,nzg targetp%soil_water (k) = sourcep%soil_water (k) targetp%soil_energy (k) = sourcep%soil_energy (k) + targetp%soil_mstpot (k) = sourcep%soil_mstpot (k) targetp%soil_tempk (k) = sourcep%soil_tempk (k) targetp%soil_fracliq (k) = sourcep%soil_fracliq (k) end do @@ -1373,27 +1366,14 @@ subroutine copy_rk4_patch(sourcep, targetp, cpatch) targetp%avg_cstar = sourcep%avg_cstar targetp%avg_carbon_ac = sourcep%avg_carbon_ac targetp%avg_carbon_st = sourcep%avg_carbon_st - targetp%avg_vapor_lc = sourcep%avg_vapor_lc - targetp%avg_vapor_wc = sourcep%avg_vapor_wc targetp%avg_vapor_gc = sourcep%avg_vapor_gc - targetp%avg_wshed_vg = sourcep%avg_wshed_vg - targetp%avg_intercepted = sourcep%avg_intercepted targetp%avg_throughfall = sourcep%avg_throughfall targetp%avg_vapor_ac = sourcep%avg_vapor_ac - targetp%avg_transp = sourcep%avg_transp - targetp%avg_evap = sourcep%avg_evap - targetp%avg_rshort_gnd = sourcep%avg_rshort_gnd - targetp%avg_par_gnd = sourcep%avg_par_gnd - targetp%avg_rlong_gnd = sourcep%avg_rlong_gnd - targetp%avg_sensible_lc = sourcep%avg_sensible_lc - targetp%avg_sensible_wc = sourcep%avg_sensible_wc - targetp%avg_qwshed_vg = sourcep%avg_qwshed_vg - targetp%avg_qintercepted = sourcep%avg_qintercepted targetp%avg_qthroughfall = sourcep%avg_qthroughfall targetp%avg_sensible_gc = sourcep%avg_sensible_gc targetp%avg_sensible_ac = sourcep%avg_sensible_ac targetp%avg_drainage = sourcep%avg_drainage - targetp%avg_drainage_heat = sourcep%avg_drainage_heat + targetp%avg_qdrainage = sourcep%avg_qdrainage do k=rk4site%lsl,nzg targetp%avg_sensible_gg(k) = sourcep%avg_sensible_gg(k) @@ -1403,15 +1383,15 @@ subroutine copy_rk4_patch(sourcep, targetp, cpatch) do k=1,cpatch%ncohorts - targetp%cav_sensible_lc (k) = sourcep%cav_sensible_lc (k) - targetp%cav_sensible_wc (k) = sourcep%cav_sensible_wc (k) - targetp%cav_vapor_lc (k) = sourcep%cav_vapor_lc (k) - targetp%cav_vapor_wc (k) = sourcep%cav_vapor_wc (k) - targetp%cav_transp (k) = sourcep%cav_transp (k) - targetp%cav_intercepted_al (k) = sourcep%cav_intercepted_al(k) - targetp%cav_intercepted_aw (k) = sourcep%cav_intercepted_aw(k) - targetp%cav_wshed_lg (k) = sourcep%cav_wshed_lg (k) - targetp%cav_wshed_wg (k) = sourcep%cav_wshed_wg (k) + targetp%avg_sensible_lc (k) = sourcep%avg_sensible_lc (k) + targetp%avg_sensible_wc (k) = sourcep%avg_sensible_wc (k) + targetp%avg_vapor_lc (k) = sourcep%avg_vapor_lc (k) + targetp%avg_vapor_wc (k) = sourcep%avg_vapor_wc (k) + targetp%avg_transp (k) = sourcep%avg_transp (k) + targetp%avg_intercepted_al (k) = sourcep%avg_intercepted_al(k) + targetp%avg_intercepted_aw (k) = sourcep%avg_intercepted_aw(k) + targetp%avg_wshed_lg (k) = sourcep%avg_wshed_lg (k) + targetp%avg_wshed_wg (k) = sourcep%avg_wshed_wg (k) end do end if @@ -1426,7 +1406,6 @@ subroutine copy_rk4_patch(sourcep, targetp, cpatch) targetp%flx_throughfall = sourcep%flx_throughfall targetp%flx_vapor_ac = sourcep%flx_vapor_ac targetp%flx_transp = sourcep%flx_transp - targetp%flx_evap = sourcep%flx_evap targetp%flx_rshort_gnd = sourcep%flx_rshort_gnd targetp%flx_par_gnd = sourcep%flx_par_gnd targetp%flx_rlong_gnd = sourcep%flx_rlong_gnd @@ -1438,7 +1417,7 @@ subroutine copy_rk4_patch(sourcep, targetp, cpatch) targetp%flx_sensible_gc = sourcep%flx_sensible_gc targetp%flx_sensible_ac = sourcep%flx_sensible_ac targetp%flx_drainage = sourcep%flx_drainage - targetp%flx_drainage_heat = sourcep%flx_drainage_heat + targetp%flx_qdrainage = sourcep%flx_qdrainage do k=rk4site%lsl,nzg targetp%flx_sensible_gg(k) = sourcep%flx_sensible_gg(k) diff --git a/ED/src/dynamics/rk4_misc.f90 b/ED/src/dynamics/rk4_misc.f90 index 0fcd28979..ccafa4014 100644 --- a/ED/src/dynamics/rk4_misc.f90 +++ b/ED/src/dynamics/rk4_misc.f90 @@ -149,11 +149,12 @@ subroutine copy_patch_init(sourcesite,ipa,targetp) ! to double precision. Therefore at this time only we must ensure that we bound it, ! ! otherwise the model will crash due to the round-off error. ! !------------------------------------------------------------------------------------! - targetp%soil_water(k) = min( rk4max_soil_water(k) & + targetp%soil_water (k) = min( rk4max_soil_water(k) & , max( rk4min_soil_water(k) & , dble(sourcesite%soil_water(k,ipa)) ) ) - targetp%soil_energy(k) = dble(sourcesite%soil_energy(k,ipa)) - targetp%soil_tempk(k) = dble(sourcesite%soil_tempk(k,ipa)) + targetp%soil_energy (k) = dble(sourcesite%soil_energy (k,ipa)) + targetp%soil_mstpot (k) = dble(sourcesite%soil_mstpot (k,ipa)) + targetp%soil_tempk (k) = dble(sourcesite%soil_tempk (k,ipa)) targetp%soil_fracliq(k) = dble(sourcesite%soil_fracliq(k,ipa)) end do !---------------------------------------------------------------------------------------! @@ -231,11 +232,11 @@ subroutine copy_patch_init(sourcesite,ipa,targetp) targetp%virtual_energy = 0.0d0 targetp%virtual_depth = 0.0d0 if (ksn == 0) then - targetp%virtual_tempk = targetp%soil_tempk(nzg) + targetp%virtual_tempk = targetp%soil_tempk (nzg) targetp%virtual_fracliq = targetp%soil_fracliq(nzg) else - targetp%virtual_tempk = targetp%sfcwater_tempk(ksn) - targetp%virtual_fracliq = targetp%sfcwater_tempk(ksn) + targetp%virtual_tempk = targetp%sfcwater_tempk (ksn) + targetp%virtual_fracliq = targetp%sfcwater_fracliq(ksn) end if !---------------------------------------------------------------------------------------! @@ -389,50 +390,37 @@ subroutine copy_patch_init(sourcesite,ipa,targetp) ! RK4. Inside RK4 we only want the contribution of those variables during the span ! ! of one time step. ! !------------------------------------------------------------------------------------! - targetp%avg_ustar = dble(sourcesite%avg_ustar (ipa)) - targetp%avg_tstar = dble(sourcesite%avg_tstar (ipa)) - targetp%avg_qstar = dble(sourcesite%avg_qstar (ipa)) - targetp%avg_cstar = dble(sourcesite%avg_cstar (ipa)) - targetp%avg_carbon_ac = dble(sourcesite%avg_carbon_ac (ipa)) - targetp%avg_carbon_st = dble(sourcesite%avg_carbon_st (ipa)) - targetp%avg_vapor_lc = dble(sourcesite%avg_vapor_lc (ipa)) - targetp%avg_vapor_wc = dble(sourcesite%avg_vapor_wc (ipa)) - targetp%avg_vapor_gc = dble(sourcesite%avg_vapor_gc (ipa)) - targetp%avg_wshed_vg = dble(sourcesite%avg_wshed_vg (ipa)) - targetp%avg_intercepted = dble(sourcesite%avg_intercepted (ipa)) - targetp%avg_throughfall = dble(sourcesite%avg_throughfall (ipa)) - targetp%avg_vapor_ac = dble(sourcesite%avg_vapor_ac (ipa)) - targetp%avg_transp = dble(sourcesite%avg_transp (ipa)) - targetp%avg_evap = dble(sourcesite%avg_evap (ipa)) - targetp%avg_drainage = dble(sourcesite%avg_drainage (ipa)) - targetp%avg_drainage_heat = dble(sourcesite%avg_drainage_heat (ipa)) - targetp%avg_rshort_gnd = dble(sourcesite%avg_rshort_gnd (ipa)) - targetp%avg_par_gnd = dble(sourcesite%avg_par_gnd (ipa)) - targetp%avg_rlong_gnd = dble(sourcesite%avg_rlong_gnd (ipa)) - targetp%avg_sensible_lc = dble(sourcesite%avg_sensible_lc (ipa)) - targetp%avg_sensible_wc = dble(sourcesite%avg_sensible_wc (ipa)) - targetp%avg_qwshed_vg = dble(sourcesite%avg_qwshed_vg (ipa)) - targetp%avg_qintercepted = dble(sourcesite%avg_qintercepted (ipa)) - targetp%avg_qthroughfall = dble(sourcesite%avg_qthroughfall (ipa)) - targetp%avg_sensible_gc = dble(sourcesite%avg_sensible_gc (ipa)) - targetp%avg_sensible_ac = dble(sourcesite%avg_sensible_ac (ipa)) + targetp%avg_ustar = dble(sourcesite%fmean_ustar (ipa)) + targetp%avg_tstar = dble(sourcesite%fmean_tstar (ipa)) + targetp%avg_qstar = dble(sourcesite%fmean_qstar (ipa)) + targetp%avg_cstar = dble(sourcesite%fmean_cstar (ipa)) + targetp%avg_carbon_ac = dble(sourcesite%fmean_carbon_ac (ipa)) + targetp%avg_carbon_st = dble(sourcesite%fmean_carbon_st (ipa)) + targetp%avg_vapor_gc = dble(sourcesite%fmean_vapor_gc (ipa)) + targetp%avg_throughfall = dble(sourcesite%fmean_throughfall (ipa)) + targetp%avg_vapor_ac = dble(sourcesite%fmean_vapor_ac (ipa)) + targetp%avg_drainage = dble(sourcesite%fmean_drainage (ipa)) + targetp%avg_qdrainage = dble(sourcesite%fmean_qdrainage (ipa)) + targetp%avg_qthroughfall = dble(sourcesite%fmean_qthroughfall (ipa)) + targetp%avg_sensible_gc = dble(sourcesite%fmean_sensible_gc (ipa)) + targetp%avg_sensible_ac = dble(sourcesite%fmean_sensible_ac (ipa)) do k = rk4site%lsl, nzg - targetp%avg_sensible_gg(k) = dble(sourcesite%avg_sensible_gg(k,ipa)) - targetp%avg_smoist_gg(k) = dble(sourcesite%avg_smoist_gg(k,ipa) ) - targetp%avg_transloss(k) = dble(sourcesite%avg_transloss(k,ipa) ) + targetp%avg_sensible_gg(k) = dble(sourcesite%fmean_sensible_gg(k,ipa)) + targetp%avg_smoist_gg(k) = dble(sourcesite%fmean_smoist_gg(k,ipa) ) + targetp%avg_transloss(k) = dble(sourcesite%fmean_transloss(k,ipa) ) end do do ico=1,cpatch%ncohorts - targetp%cav_sensible_lc (ico) = dble(cpatch%mean_sensible_lc (ico)) - targetp%cav_sensible_wc (ico) = dble(cpatch%mean_sensible_wc (ico)) - targetp%cav_vapor_lc (ico) = dble(cpatch%mean_vapor_lc (ico)) - targetp%cav_vapor_wc (ico) = dble(cpatch%mean_vapor_wc (ico)) - targetp%cav_transp (ico) = dble(cpatch%mean_transp (ico)) - targetp%cav_intercepted_al (ico) = dble(cpatch%mean_intercepted_al(ico)) - targetp%cav_intercepted_aw (ico) = dble(cpatch%mean_intercepted_aw(ico)) - targetp%cav_wshed_lg (ico) = dble(cpatch%mean_wshed_lg (ico)) - targetp%cav_wshed_wg (ico) = dble(cpatch%mean_wshed_wg (ico)) + targetp%avg_sensible_lc (ico) = dble(cpatch%fmean_sensible_lc (ico)) + targetp%avg_sensible_wc (ico) = dble(cpatch%fmean_sensible_wc (ico)) + targetp%avg_vapor_lc (ico) = dble(cpatch%fmean_vapor_lc (ico)) + targetp%avg_vapor_wc (ico) = dble(cpatch%fmean_vapor_wc (ico)) + targetp%avg_transp (ico) = dble(cpatch%fmean_transp (ico)) + targetp%avg_intercepted_al (ico) = dble(cpatch%fmean_intercepted_al(ico)) + targetp%avg_intercepted_aw (ico) = dble(cpatch%fmean_intercepted_aw(ico)) + targetp%avg_wshed_lg (ico) = dble(cpatch%fmean_wshed_lg (ico)) + targetp%avg_wshed_wg (ico) = dble(cpatch%fmean_wshed_wg (ico)) end do end if @@ -587,7 +575,8 @@ subroutine update_diagnostic_vars(initp, csite,ipa) , patchtype ! ! structure use soil_coms , only : soil8 & ! intent(in) , dslz8 & ! intent(in) - , dslzi8 ! ! intent(in) + , dslzi8 & ! intent(in) + , matric_potential8 ! ! function use grid_coms , only : nzg & ! intent(in) , nzs ! ! intent(in) use therm_lib8 , only : uextcm2tl8 & ! subroutine @@ -621,6 +610,7 @@ subroutine update_diagnostic_vars(initp, csite,ipa) integer :: ico integer :: k integer :: ksn + integer :: nsoil integer :: kclosest logical :: ok_shv logical :: ok_enthalpy @@ -629,7 +619,8 @@ subroutine update_diagnostic_vars(initp, csite,ipa) logical :: ok_sfcw logical :: ok_leaf logical :: ok_wood - real(kind=8) :: soilhcap + logical :: ok_slwater + logical :: ok_sltemp real(kind=8) :: int_sfcw_energy real(kind=8) :: int_virt_energy real(kind=8) :: energy_tot @@ -706,10 +697,29 @@ subroutine update_diagnostic_vars(initp, csite,ipa) !----- Update soil temperature and liquid water fraction. ------------------------------! + ok_slwater = .true. + ok_sltemp = .true. do k = rk4site%lsl, nzg - soilhcap = soil8(rk4site%ntext_soil(k))%slcpd - call uextcm2tl8(initp%soil_energy(k),initp%soil_water(k)*wdns8,soilhcap & + nsoil = rk4site%ntext_soil(k) + !----- Check whether soil water is fine. --------------------------------------------! + ok_slwater = ok_slwater .and. & + initp%soil_water(k) >= rk4min_soil_water(k) .and. & + initp%soil_water(k) <= rk4max_soil_water(k) + if (ok_slwater) then + initp%soil_mstpot(k) = matric_potential8(nsoil,initp%soil_water(k)) + end if + !------------------------------------------------------------------------------------! + + + !------------------------------------------------------------------------------------! + ! We find the temperature in any case. If screwy soil water leads to screwy ! + ! temperature, the sanity check will fail twice. ! + !------------------------------------------------------------------------------------! + call uextcm2tl8(initp%soil_energy(k),initp%soil_water(k)*wdns8,soil8(nsoil)%slcpd & ,initp%soil_tempk(k),initp%soil_fracliq(k)) + ok_sltemp = ok_sltemp .and. & + initp%soil_tempk(k) >= rk4min_soil_temp .and. & + initp%soil_tempk(k) <= rk4max_soil_temp end do !---------------------------------------------------------------------------------------! @@ -757,7 +767,7 @@ subroutine update_diagnostic_vars(initp, csite,ipa) !---------------------------------------------------------------------------------! call uextcm2tl8(energy_tot,wmass_tot,hcapdry_tot & ,initp%sfcwater_tempk(k),initp%sfcwater_fracliq(k)) - initp%soil_tempk(nzg) = initp%sfcwater_tempk(k) + initp%soil_tempk (nzg) = initp%sfcwater_tempk (k) initp%soil_fracliq(nzg) = initp%sfcwater_fracliq(k) !---------------------------------------------------------------------------------! @@ -2840,7 +2850,7 @@ subroutine adjust_veg_properties(initp,hdid,csite,ipa) !----- Update fluxes if needed be. --------------------------------------------! if (fast_diagnostics) then - initp%cav_wshed_lg(ico) = initp%cav_wshed_lg(ico) + leaf_wshed * hdidi + initp%avg_wshed_lg(ico) = initp%avg_wshed_lg(ico) + leaf_wshed * hdidi end if if (print_detailed) then initp%cfx_qwshed (ico) = initp%cfx_qwshed (ico) + leaf_qwshed * hdidi @@ -2880,7 +2890,7 @@ subroutine adjust_veg_properties(initp,hdid,csite,ipa) !----- Update fluxes if needed be. --------------------------------------------! if (fast_diagnostics) then - initp%cav_vapor_lc(ico) = initp%cav_vapor_lc(ico) & + initp%avg_vapor_lc(ico) = initp%avg_vapor_lc(ico) & + (leaf_boil - leaf_dew ) * hdidi end if if (print_detailed) then @@ -2954,7 +2964,7 @@ subroutine adjust_veg_properties(initp,hdid,csite,ipa) !----- Update fluxes if needed be. --------------------------------------------! if (fast_diagnostics) then - initp%cav_wshed_wg(ico) = initp%cav_wshed_wg(ico) + wood_wshed * hdidi + initp%avg_wshed_wg(ico) = initp%avg_wshed_wg(ico) + wood_wshed * hdidi end if if (print_detailed) then initp%cfx_qwshed (ico) = initp%cfx_qwshed (ico) + wood_qwshed * hdidi @@ -2992,7 +3002,7 @@ subroutine adjust_veg_properties(initp,hdid,csite,ipa) !----- Update fluxes if needed be. --------------------------------------------! if (fast_diagnostics) then - initp%cav_vapor_wc(ico) = initp%cav_vapor_wc(ico) & + initp%avg_vapor_wc(ico) = initp%avg_vapor_wc(ico) & + (wood_boil - wood_dew ) * hdidi end if if (print_detailed) then @@ -3051,31 +3061,6 @@ subroutine adjust_veg_properties(initp,hdid,csite,ipa) * hcapcani !---------------------------------------------------------------------------------------! - - - !----- Updating output fluxes ----------------------------------------------------------! - if (fast_diagnostics) then - initp%avg_wshed_vg = initp%avg_wshed_vg & - + (leaf_wshed_tot + wood_wshed_tot) * hdidi - initp%avg_qwshed_vg = initp%avg_qwshed_vg & - + (leaf_qwshed_tot + wood_qwshed_tot) * hdidi - initp%avg_vapor_lc = initp%avg_vapor_lc & - + (leaf_boil_tot - leaf_dew_tot) * hdidi - initp%avg_vapor_wc = initp%avg_vapor_wc & - + (wood_boil_tot - wood_dew_tot) * hdidi - end if - if (print_detailed) then - initp%flx_wshed_vg = initp%flx_wshed_vg & - + (leaf_wshed_tot + wood_wshed_tot) * hdidi - initp%flx_qwshed_vg = initp%flx_qwshed_vg & - + (leaf_qwshed_tot + wood_qwshed_tot) * hdidi - initp%flx_vapor_lc = initp%flx_vapor_lc & - + (leaf_boil_tot - leaf_dew_tot) * hdidi - initp%flx_vapor_wc = initp%flx_vapor_wc & - + (wood_boil_tot - wood_dew_tot) * hdidi - end if - !---------------------------------------------------------------------------------------! - return end subroutine adjust_veg_properties !==========================================================================================! @@ -3415,10 +3400,23 @@ subroutine print_csiteipa(csite, ipa) real :: growth_resp real :: storage_resp real :: vleaf_resp + real :: pss_lai + real :: pss_wai !---------------------------------------------------------------------------------------! cpatch => csite%patch(ipa) + + !----- Find the total patch LAI and WAI. -----------------------------------------------! + pss_lai = 0.0 + pss_wai = 0.0 + do ico=1,cpatch%ncohorts + pss_lai = pss_lai + cpatch%lai(ico) + pss_wai = pss_wai + cpatch%wai(ico) + end do + !---------------------------------------------------------------------------------------! + + write(unit=*,fmt='(80a)') ('=',k=1,80) write(unit=*,fmt='(80a)') ('=',k=1,80) @@ -3503,11 +3501,11 @@ subroutine print_csiteipa(csite, ipa) write (unit=*,fmt='(a)' ) ' ' write (unit=*,fmt='(80a)') ('-',k=1,80) - write (unit=*,fmt='(7(a12,1x))') ' VEG_HEIGHT',' VEG_ROUGH','VEG_DISPLACE' & - ,' LAI',' HTRY',' CAN_RHOS' & - ,' CAN_DEPTH' - write (unit=*,fmt='(7(es12.4,1x))') csite%veg_height(ipa),csite%veg_rough(ipa) & - ,csite%veg_displace(ipa),csite%lai(ipa) & + write (unit=*,fmt='(8(a12,1x))') ' VEG_HEIGHT',' VEG_ROUGH','VEG_DISPLACE' & + ,' PATCH_LAI',' PATCH_WAI',' HTRY' & + ,' CAN_RHOS',' CAN_DEPTH' + write (unit=*,fmt='(8(es12.4,1x))') csite%veg_height(ipa),csite%veg_rough(ipa) & + ,csite%veg_displace(ipa),pss_lai,pss_wai & ,csite%htry(ipa),csite%can_rhos(ipa) & ,csite%can_depth(ipa) @@ -3604,8 +3602,23 @@ subroutine print_rk4patch(y,csite,ipa) real(kind=8) :: y_can_rvap real(kind=8) :: y_can_theiv real(kind=8) :: y_can_vpdef + real(kind=4) :: pss_lai + real(kind=4) :: pss_wai + !---------------------------------------------------------------------------------------! + + + + !----- Find the total patch LAI and WAI. -----------------------------------------------! + pss_lai = 0.0 + pss_wai = 0.0 + do ico=1,cpatch%ncohorts + pss_lai = pss_lai + cpatch%lai(ico) + pss_wai = pss_wai + cpatch%wai(ico) + end do !---------------------------------------------------------------------------------------! + + !---------------------------------------------------------------------------------------! ! Find the ice-vapour equivalent potential temperature and vapour pressure deficit ! ! (output only). ! @@ -3781,20 +3794,19 @@ subroutine print_rk4patch(y,csite,ipa) write (unit=*,fmt='(a)' ) ' ' write (unit=*,fmt='(80a)') ('-',k=1,80) - write (unit=*,fmt='(8(a12,1x))') ' VEG_HEIGHT',' VEG_ROUGH','VEG_DISPLACE' & - ,' PATCH_LAI',' CAN_DEPTH',' CAN_CO2' & - ,' CAN_PRSS',' GGNET' - - write (unit=*,fmt='(8(es12.4,1x))') y%veg_height,y%veg_rough,y%veg_displace & - ,csite%lai(ipa),y%can_depth,y%can_co2,y%can_prss & + write (unit=*,fmt='(9(a12,1x))') ' VEG_HEIGHT',' VEG_ROUGH','VEG_DISPLACE' & + ,' PATCH_LAI',' PATCH_WAI',' CAN_DEPTH' & + ,' CAN_CO2',' CAN_PRSS',' GGNET' + + write (unit=*,fmt='(9(es12.4,1x))') y%veg_height,y%veg_rough,y%veg_displace & + ,pss_lai,pss_wai,y%can_depth,y%can_co2,y%can_prss & ,y%ggnet write (unit=*,fmt='(80a)') ('-',k=1,80) write (unit=*,fmt='(10(a12,1x))') ' CAN_RHOS',' CAN_THEIV',' CAN_THETA' & ,' CAN_TEMP',' CAN_SHV',' CAN_SSH' & ,' CAN_RVAP',' CAN_VPDEF',' CAN_RHV' & ,'CAN_ENTHALPY' - - + write (unit=*,fmt='(10(es12.4,1x))') y%can_rhos , y_can_theiv , y%can_theta & , y%can_temp , y%can_shv , y%can_ssh & , y_can_rvap , y_can_vpdef , y%can_rhv & diff --git a/ED/src/dynamics/rk4_stepper.F90 b/ED/src/dynamics/rk4_stepper.F90 index c31602d4f..d5e4f3ffd 100644 --- a/ED/src/dynamics/rk4_stepper.F90 +++ b/ED/src/dynamics/rk4_stepper.F90 @@ -963,6 +963,7 @@ subroutine rk4_sanity_check(y,reject_step, csite,ipa,dydx,h,print_problems) write(unit=*,fmt='(a,1x,es12.4)') ' SOIL_FLIQ : ',y%soil_fracliq(k) write(unit=*,fmt='(a,1x,es12.4)') ' SOIL_ENERGY: ',y%soil_energy(k) write(unit=*,fmt='(a,1x,es12.4)') ' SOIL_WATER: ',y%soil_water(k) + write(unit=*,fmt='(a,1x,es12.4)') ' SOIL_MSTPOT: ',y%soil_mstpot(k) write(unit=*,fmt='(a,1x,es12.4)') ' D(SOIL_E)/Dt:',dydx%soil_energy(k) write(unit=*,fmt='(a,1x,es12.4)') ' D(SOIL_M)/Dt:',dydx%soil_water(k) if (k == nzg .and. y%nlev_sfcwater > 0) then @@ -994,6 +995,7 @@ subroutine rk4_sanity_check(y,reject_step, csite,ipa,dydx,h,print_problems) write(unit=*,fmt='(a,1x,es12.4)') ' SOIL_FLIQ : ',y%soil_fracliq(k) write(unit=*,fmt='(a,1x,es12.4)') ' SOIL_ENERGY: ',y%soil_energy(k) write(unit=*,fmt='(a,1x,es12.4)') ' SOIL_WATER: ',y%soil_water(k) + write(unit=*,fmt='(a,1x,es12.4)') ' SOIL_MSTPOT: ',y%soil_mstpot(k) write(unit=*,fmt='(a,1x,es12.4)') ' D(SOIL_E)/Dt:',dydx%soil_energy(k) write(unit=*,fmt='(a,1x,es12.4)') ' D(SOIL_M)/Dt:',dydx%soil_water(k) if (k == nzg .and. y%nlev_sfcwater > 0) then @@ -1163,22 +1165,22 @@ subroutine print_sanity_check(y, csite, ipa) write(unit=*,fmt='(a)') ' ' write(unit=*,fmt='(78a)') ('-',k=1,78) - write(unit=*,fmt='(a5,3(1x,a12))') 'LEVEL',' SOIL_TEMPK','SOIL_FRACLIQ' & - &,' SOIL_WATER' + write(unit=*,fmt='(a5,4(1x,a12))') 'LEVEL',' SOIL_TEMPK','SOIL_FRACLIQ' & + ,' SOIL_WATER','SOIL_MSTPOT' do k=rk4site%lsl,nzg - write(unit=*,fmt='(i5,3(1x,es12.4))') & - k, y%soil_tempk(k), y%soil_fracliq(k), y%soil_water(k) + write(unit=*,fmt='(i5,4(1x,es12.4))') & + k, y%soil_tempk(k), y%soil_fracliq(k), y%soil_water(k),y%soil_mstpot(k) end do write(unit=*,fmt='(78a)') ('-',k=1,78) write(unit=*,fmt='(a)') ' ' write(unit=*,fmt='(78a)') ('-',k=1,78) - write(unit=*,fmt='(a5,3(1x,a12))') 'LEVEL',' OLD_SOIL_T','OLD_SOIL_FLQ' & - &,'OLD_SOIL_H2O' + write(unit=*,fmt='(a5,4(1x,a12))') 'LEVEL',' OLD_SOIL_T','OLD_SOIL_FLQ' & + &,'OLD_SOIL_H2O','OLD_SOIL_POT' do k=rk4site%lsl,nzg - write(unit=*,fmt='(i5,3(1x,es12.4))') & + write(unit=*,fmt='(i5,4(1x,es12.4))') & k, csite%soil_tempk(k,ipa), csite%soil_fracliq(k,ipa) & - , csite%soil_water(k,ipa) + , csite%soil_water(k,ipa), csite%soil_mstpot (k,ipa) end do write(unit=*,fmt='(78a)') ('-',k=1,78) diff --git a/ED/src/dynamics/soil_respiration.f90 b/ED/src/dynamics/soil_respiration.f90 index b1d1c3bd6..00a7dd466 100644 --- a/ED/src/dynamics/soil_respiration.f90 +++ b/ED/src/dynamics/soil_respiration.f90 @@ -10,8 +10,11 @@ subroutine soil_respiration(csite,ipa,mzg,ntext_soil) , dslz & ! intent(in) , slz ! ! intent(in) use decomp_coms , only : k_rh_active ! ! intent(in) - use consts_coms , only : wdns ! ! intent(in) + use consts_coms , only : wdns & ! intent(in) + , umols_2_kgCyr ! ! intent(in) use therm_lib , only : uextcm2tl ! ! function + use ed_misc_coms , only : dtlsm & ! intent(in) + , frqsum ! ! intent(in) implicit none !----- Arguments. ----------------------------------------------------------------------! type(sitetype) , target :: csite @@ -37,6 +40,17 @@ subroutine soil_respiration(csite,ipa,mzg,ntext_soil) !----- External functions. -------------------------------------------------------------! real , external :: het_resp_weight real , external :: root_resp_norm + !----- Locally saved variables. --------------------------------------------------------! + real , save :: dtlsm_o_frqsum + logical , save :: first_time = .true. + !---------------------------------------------------------------------------------------! + + + !----- Assign the constant scaling factor. ---------------------------------------------! + if (first_time) then + first_time = .false. + dtlsm_o_frqsum = dtlsm / frqsum + end if !---------------------------------------------------------------------------------------! @@ -73,12 +87,21 @@ subroutine soil_respiration(csite,ipa,mzg,ntext_soil) !------------------------------------------------------------------------------------! - !----- Add this time step to the mean and daily mean root respiration. --------------! - cpatch%mean_root_resp(ico) = cpatch%mean_root_resp(ico) & - + cpatch%root_respiration(ico) + !----- Add this time step to the daily mean root respiration. -----------------------! cpatch%today_root_resp(ico) = cpatch%today_root_resp(ico) & + cpatch%root_respiration(ico) !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + ! The following is for output only, we switch the units to kgC/plant/yr. ! + !------------------------------------------------------------------------------------! + cpatch%fmean_root_resp(ico) = cpatch%fmean_root_resp (ico) & + + cpatch%root_respiration(ico) & + * umols_2_kgCyr * dtlsm_o_frqsum & + / cpatch%nplant (ico) + !------------------------------------------------------------------------------------! end do !---------------------------------------------------------------------------------------! @@ -141,8 +164,14 @@ subroutine soil_respiration(csite,ipa,mzg,ntext_soil) csite%today_A_decomp (ipa) = csite%today_A_decomp (ipa) + csite%A_decomp(ipa) csite%today_Af_decomp(ipa) = csite%today_Af_decomp(ipa) & + csite%A_decomp (ipa) * csite%f_decomp(ipa) - csite%mean_rh (ipa) = csite%mean_rh (ipa) + csite%rh (ipa) - csite%mean_cwd_rh (ipa) = csite%mean_cwd_rh (ipa) + csite%cwd_rh (ipa) + !---------------------------------------------------------------------------------------! + + + !----- The output is converted to kgC/m2/yr. -------------------------------------------! + csite%fmean_rh (ipa) = csite%fmean_rh (ipa) & + + csite%rh (ipa) * umols_2_kgCyr * dtlsm_o_frqsum + csite%fmean_cwd_rh(ipa) = csite%fmean_cwd_rh(ipa) & + + csite%cwd_rh (ipa) * umols_2_kgCyr * dtlsm_o_frqsum !---------------------------------------------------------------------------------------! return diff --git a/ED/src/dynamics/vegetation_dynamics.f90 b/ED/src/dynamics/vegetation_dynamics.f90 index 7ecafa832..03ddedcb4 100644 --- a/ED/src/dynamics/vegetation_dynamics.f90 +++ b/ED/src/dynamics/vegetation_dynamics.f90 @@ -29,8 +29,8 @@ subroutine vegetation_dynamics(new_month,new_year) !----- Local variables. ----------------------------------------------------------------! type(edtype) , pointer :: cgrid type(polygontype), pointer :: cpoly - real :: tfact1 - real :: tfact2 + real :: dtlsm_o_day + real :: one_o_year integer :: doy integer :: ipy integer :: isi @@ -43,9 +43,9 @@ subroutine vegetation_dynamics(new_month,new_year) doy = julday(current_time%month, current_time%date, current_time%year) !----- Time factor for normalizing daily variables updated on the DTLSM step. ----------! - tfact1 = dtlsm / day_sec + dtlsm_o_day = dtlsm / day_sec !----- Time factor for averaging dailies. ----------------------------------------------! - tfact2 = 1.0 / yr_day + one_o_year = 1.0 / yr_day !----- Apply events. -------------------------------------------------------------------! call prescribed_event(current_time%year,doy) @@ -62,10 +62,10 @@ subroutine vegetation_dynamics(new_month,new_year) ! The following block corresponds to the daily time-step. ! !------------------------------------------------------------------------------------! !----- Standardise the fast-scale uptake and respiration, for growth rates. ---------! - call normalize_ed_daily_vars(cgrid, tfact1) + call normalize_ed_today_vars(cgrid) !----- Update phenology and growth of live tissues. ---------------------------------! - call phenology_driver(cgrid,doy,current_time%month, tfact1) - call dbalive_dt(cgrid,tfact2) + call phenology_driver(cgrid,doy,current_time%month, dtlsm_o_day) + call dbalive_dt(cgrid,one_o_year) !------------------------------------------------------------------------------------! @@ -98,14 +98,14 @@ subroutine vegetation_dynamics(new_month,new_year) !------------------------------------------------------------------------------------! !------ update dmean and mmean values for NPP allocation terms ---------------------! - call normalize_ed_dailyNPP_vars(cgrid) + call normalize_ed_todayNPP_vars(cgrid) !------------------------------------------------------------------------------------! ! This should be done every day, but after the longer-scale steps. We update ! ! the carbon and nitrogen pools, and re-set the daily variables. ! !------------------------------------------------------------------------------------! call update_C_and_N_pools(cgrid) - call zero_ed_daily_vars(cgrid) + call zero_ed_today_vars(cgrid) !------------------------------------------------------------------------------------! @@ -150,8 +150,15 @@ subroutine vegetation_dynamics(new_month,new_year) - !----- Recalculate the AGB and basal area at the polygon level. ---------------------! - call update_polygon_derived_props(cgrid) + !------------------------------------------------------------------------------------! + ! Update polygon-level properties that are derived from patches and cohorts. ! + !------------------------------------------------------------------------------------! + call update_polygon_derived_props(edgrid_g(ifm)) + !---------------------------------------------------------------------------------------! + + + + !----- Print the carbon and nitrogen budget. ----------------------------------------! call print_C_and_N_budgets(cgrid) !------------------------------------------------------------------------------------! end do @@ -194,8 +201,8 @@ subroutine vegetation_dynamics_eq_0(new_month,new_year) logical , intent(in) :: new_year !----- Local variables. ----------------------------------------------------------------! type(edtype), pointer :: cgrid - real :: tfact1 - real :: tfact2 + real :: dtlsm_o_day + real :: one_o_year integer :: doy integer :: ifm !----- External functions. -------------------------------------------------------------! @@ -206,9 +213,9 @@ subroutine vegetation_dynamics_eq_0(new_month,new_year) doy = julday(current_time%month, current_time%date, current_time%year) !----- Time factor for normalizing daily variables updated on the DTLSM step. ----------! - tfact1 = dtlsm / day_sec + dtlsm_o_day = dtlsm / day_sec !----- Time factor for averaging dailies. ----------------------------------------------! - tfact2 = 1.0 / yr_day + one_o_year = 1.0 / yr_day !---------------------------------------------------------------------------------------! @@ -222,10 +229,10 @@ subroutine vegetation_dynamics_eq_0(new_month,new_year) ! The following block corresponds to the daily time-step. ! !------------------------------------------------------------------------------------! !----- Standardise the fast-scale uptake and respiration, for growth rates. ---------! - call normalize_ed_daily_vars(cgrid, tfact1) + call normalize_ed_today_vars(cgrid) !----- Update phenology and growth of live tissues. ---------------------------------! - call phenology_driver_eq_0(cgrid,doy,current_time%month, tfact1) - call dbalive_dt_eq_0(cgrid,tfact2) + call phenology_driver_eq_0(cgrid,doy,current_time%month, dtlsm_o_day) + call dbalive_dt_eq_0(cgrid,one_o_year) !------------------------------------------------------------------------------------! @@ -255,19 +262,26 @@ subroutine vegetation_dynamics_eq_0(new_month,new_year) !------------------------------------------------------------------------------------! !------ update dmean and mmean values for NPP allocation terms ---------------------! - call normalize_ed_dailyNPP_vars(cgrid) + call normalize_ed_todayNPP_vars(cgrid) !------------------------------------------------------------------------------------! ! This should be done every day, but after the longer-scale steps. We re-set ! - ! the daily variables. ! + ! the daily variables that are not for output. ! !------------------------------------------------------------------------------------! - call zero_ed_daily_vars(cgrid) + call zero_ed_today_vars(cgrid) !------------------------------------------------------------------------------------! - !----- Recalculate the AGB and basal area at the polygon level. ---------------------! + !------------------------------------------------------------------------------------! + ! Update polygon-level properties that are derived from patches and cohorts. ! + !------------------------------------------------------------------------------------! call update_polygon_derived_props(cgrid) + !---------------------------------------------------------------------------------------! + + + + !----- Print the carbon and nitrogen budget. ----------------------------------------! call print_C_and_N_budgets(cgrid) !------------------------------------------------------------------------------------! end do diff --git a/ED/src/init/ed_bigleaf_init.f90 b/ED/src/init/ed_bigleaf_init.f90 index 0a78e668a..4b7a38627 100644 --- a/ED/src/init/ed_bigleaf_init.f90 +++ b/ED/src/init/ed_bigleaf_init.f90 @@ -67,6 +67,8 @@ subroutine ed_bigleaf_init(cgrid) real :: new_area real :: area_sum real :: area_tot + real :: patch_lai + real :: patch_wai real :: patch_agb real :: patch_bsa real :: patch_pop @@ -348,13 +350,13 @@ subroutine ed_bigleaf_init(cgrid) !----- Find the patch-level LAI, WAI, and CAI. -----------------------------------! do ipa=1,csite%npatches area_sum = area_sum + csite%area(ipa) - csite%lai(ipa) = 0.0 - csite%wai(ipa) = 0.0 + patch_lai = 0.0 + patch_wai = 0.0 cpatch => csite%patch(ipa) do ico = 1,cpatch%ncohorts - csite%lai(ipa) = csite%lai(ipa) + cpatch%lai(ico) - csite%wai(ipa) = csite%wai(ipa) + cpatch%wai(ico) - ncohorts = ncohorts + 1 + patch_lai = patch_lai + cpatch%lai(ico) + patch_wai = patch_wai + cpatch%wai(ico) + ncohorts = ncohorts + 1 end do end do @@ -405,8 +407,8 @@ subroutine ed_bigleaf_init(cgrid) site_ssc = 0.0 site_stsc = 0.0 do ipa = 1,csite%npatches - csite%lai(ipa) = 0.0 - csite%wai(ipa) = 0.0 + patch_lai = 0.0 + patch_wai = 0.0 npatchco = 0 cpatch => csite%patch(ipa) @@ -414,16 +416,16 @@ subroutine ed_bigleaf_init(cgrid) patch_agb = 0.0 patch_bsa = 0.0 do ico = 1,cpatch%ncohorts - ncohorts = ncohorts+1 - npatchco = npatchco+1 - csite%lai(ipa) = csite%lai(ipa) + cpatch%lai(ico) - csite%wai(ipa) = csite%wai(ipa) + cpatch%wai(ico) - patch_pop = patch_pop + cpatch%nplant(ico) - patch_agb = patch_agb + cpatch%nplant(ico) * cpatch%agb (ico) - patch_bsa = patch_bsa + cpatch%nplant(ico) * cpatch%basarea(ico) + ncohorts = ncohorts+1 + npatchco = npatchco+1 + patch_lai = patch_lai + cpatch%lai(ico) + patch_wai = patch_wai + cpatch%wai(ico) + patch_pop = patch_pop + cpatch%nplant(ico) + patch_agb = patch_agb + cpatch%nplant(ico) * cpatch%agb (ico) + patch_bsa = patch_bsa + cpatch%nplant(ico) * cpatch%basarea(ico) end do site_pop = site_pop + patch_pop * csite%area(ipa) - site_lai = site_lai + csite%lai (ipa) * csite%area(ipa) + site_lai = site_lai + patch_lai * csite%area(ipa) site_agb = site_agb + patch_agb * csite%area(ipa) site_bsa = site_bsa + patch_bsa * csite%area(ipa) site_fsc = site_fsc + csite%fast_soil_C (ipa) * csite%area(ipa) diff --git a/ED/src/init/ed_init.f90 b/ED/src/init/ed_init.f90 index fc3abaecb..2d788c7e6 100644 --- a/ED/src/init/ed_init.f90 +++ b/ED/src/init/ed_init.f90 @@ -17,26 +17,17 @@ subroutine set_polygon_coordinates() integer :: npoly !---------------------------------------------------------------------------------------! - gloop: do ifm=1,ngrids + gridloop: do ifm=1,ngrids npoly=gdpy(mynum,ifm) - ploop: do ipy=1,npoly + polyloop: do ipy=1,npoly edgrid_g(ifm)%lon(ipy) = work_v(ifm)%glon (ipy) edgrid_g(ifm)%lat(ipy) = work_v(ifm)%glat (ipy) edgrid_g(ifm)%xatm(ipy) = work_v(ifm)%xid (ipy) edgrid_g(ifm)%yatm(ipy) = work_v(ifm)%yid (ipy) - - !----- Assign the commonest soil type to the polygon. ----------------------------! - edgrid_g(ifm)%ntext_soil(1:nzg,ipy) = work_v(ifm)%ntext(1,ipy) - !---------------------------------------------------------------------------------! - - edgrid_g(ifm)%ncol_soil(ipy) = work_v(ifm)%nscol(ipy) - end do ploop - - - - end do gloop + end do polyloop + end do gridloop return @@ -127,6 +118,7 @@ subroutine set_site_defprops() !------ Allocate the number of sites that have enough area. ----------------------! call allocate_polygontype(cpoly,nsite) + call soil_default_fill(cgrid,ifm,ipy) !---------------------------------------------------------------------------------! ! Populate the sites. ! @@ -145,11 +137,6 @@ subroutine set_site_defprops() !---------------------------------------------------------------------------! - !------ Initialise the lowest soil layer. ----------------------------------! - cpoly%lsl(isi) = cgrid%lsl(ipy) - !---------------------------------------------------------------------------! - - !---------------------------------------------------------------------------! ! Use the soil type and populate the site-level soil texture. ! !---------------------------------------------------------------------------! @@ -159,13 +146,6 @@ subroutine set_site_defprops() !---------------------------------------------------------------------------! - !---------------------------------------------------------------------------! - ! Use the polygon-level soil colour to populate the site-level. ! - !---------------------------------------------------------------------------! - cpoly%ncol_soil(isi) = work_v(ifm)%nscol(ipy) - !---------------------------------------------------------------------------! - - !---------------------------------------------------------------------------! ! Set soil moisture decay function, based on second layer's K value. ! ! We use the second layer instead of the top in case top is organic/peat. ! @@ -242,37 +222,63 @@ end subroutine set_site_defprops !==========================================================================================! !==========================================================================================! -! This subroutine fills the lsl variables based on the soil_depth file. In case ! -! isoildepthflg was zero, then the layer_index matrix was filled with zeroes, so we do not ! -! need to worry about this here. ! +! This subroutine fills the lsl, soil colour, and soil texture based on the defaults. ! +! In case isoildepthflg was zero, then the layer_index matrix was filled with ones, so we ! +! do not need to worry about this here. ! !------------------------------------------------------------------------------------------! -subroutine soil_depth_fill(cgrid,igr) +subroutine soil_default_fill(cgrid,ifm,ipy) use soil_coms , only : layer_index ! ! intent(in) - use ed_state_vars , only : edtype ! ! structure + use ed_state_vars , only : edtype & ! structure + , polygontype ! ! structure + use ed_work_vars , only : work_v ! ! structure + use grid_coms , only : nzg ! ! intent(in) implicit none !----- Arguments -----------------------------------------------------------------------! - type(edtype) , target :: cgrid - integer , intent(in) :: igr + type(edtype) , target :: cgrid + integer , intent(in) :: ifm + integer , intent(in) :: ipy !----- Local variables -----------------------------------------------------------------! - integer :: ilat_bin - integer :: ilon_bin - integer :: ipy + type(polygontype) , pointer :: cpoly + integer :: ilat_bin + integer :: ilon_bin + integer :: isi + integer :: k !---------------------------------------------------------------------------------------! - do ipy = 1,cgrid%npolygons - ilat_bin = min(180,int(90.0 - cgrid%lat(ipy)) + 1) - ilon_bin = int(180.0 + cgrid%lon(ipy)) + 1 + ilat_bin = min(180,int(90.0 - cgrid%lat(ipy)) + 1) + ilon_bin = int(180.0 + cgrid%lon(ipy)) + 1 + + cpoly => cgrid%polygon(ipy) + do isi=1,cpoly%nsites !------------------------------------------------------------------------------------! ! Require at least 2 layers. This requirement was taken in consideration when ! ! layer_index was filled at the first initialization, so it is safe to just copy. ! !------------------------------------------------------------------------------------! - cgrid%lsl(ipy) =layer_index(ilat_bin,ilon_bin) + cpoly%lsl(isi) =layer_index(ilat_bin,ilon_bin) + !------------------------------------------------------------------------------------! + + + !------------------------------------------------------------------------------------! + ! Use the commonest soil type and populate the site-level soil texture. ! + !------------------------------------------------------------------------------------! + do k=1,nzg + cpoly%ntext_soil(k,isi) = work_v(ifm)%ntext(1,ipy) + end do + !------------------------------------------------------------------------------------! + + + !------------------------------------------------------------------------------------! + ! Use the polygon-level soil colour to populate the site-level. ! + !------------------------------------------------------------------------------------! + cpoly%ncol_soil(isi) = work_v(ifm)%nscol(ipy) + !------------------------------------------------------------------------------------! end do + !---------------------------------------------------------------------------------------! return -end subroutine soil_depth_fill +end subroutine soil_default_fill !==========================================================================================! !==========================================================================================! @@ -317,17 +323,9 @@ subroutine load_ecosystem_state() if (mynum == 1) write(unit=*,fmt='(a)') ' + Doing sequential initialization over nodes.' - !---------------------------------------------------------------------------------------! - ! STEP 1: Find lowest soil layer for each site (derived from soil depth). ! - !---------------------------------------------------------------------------------------! - do igr=1,ngrids - call ed_newgrid(igr) - call soil_depth_fill(edgrid_g(igr),igr) - end do - !---------------------------------------------------------------------------------------! - ! STEP 2: Read in Site files and initialize hydrologic adjacencies. ! + ! STEP 1: Read in Site files and initialize hydrologic adjacencies. ! !---------------------------------------------------------------------------------------! if (mynum /= 1) & call MPI_Recv(ping,1,MPI_INTEGER,recvnum,100,MPI_COMM_WORLD,MPI_STATUS_IGNORE,ierr) diff --git a/ED/src/init/ed_init_atm.F90 b/ED/src/init/ed_init_atm.F90 index ba7ffca5c..e5f17ae62 100644 --- a/ED/src/init/ed_init_atm.F90 +++ b/ED/src/init/ed_init_atm.F90 @@ -17,7 +17,8 @@ subroutine ed_init_atm() , soil & ! intent(in) , slmstr & ! intent(in) , stgoff & ! intent(in) - , ed_soil_idx2water ! ! intent(in) + , ed_soil_idx2water & ! function + , matric_potential ! ! function use consts_coms , only : wdns & ! intent(in) , t3ple ! ! intent(in) use grid_coms , only : nzs & ! intent(in) @@ -283,12 +284,14 @@ subroutine ed_init_atm() ! Initialise soil moisture and internal energy. ! !---------------------------------------------------------------------! if (ied_init_mode /= 7) then - csite%soil_water(k,ipa) = ed_soil_idx2water(slmstr(k),nsoil) + csite%soil_water(k,ipa) = ed_soil_idx2water(slmstr(k),nsoil) end if - csite%soil_energy(k,ipa) = cmtl2uext( soil(nsoil)%slcpd & - , csite%soil_water(k,ipa)*wdns & - , csite%soil_tempk(k,ipa) & - , csite%soil_fracliq(k,ipa) ) + csite%soil_energy (k,ipa) = cmtl2uext( soil(nsoil)%slcpd & + , csite%soil_water(k,ipa)*wdns & + , csite%soil_tempk(k,ipa) & + , csite%soil_fracliq(k,ipa) ) + csite%soil_mstpot (k,ipa) = matric_potential(nsoil & + ,csite%soil_water(k,ipa) ) !---------------------------------------------------------------------! end do groundloop2 diff --git a/ED/src/init/ed_params.f90 b/ED/src/init/ed_params.f90 index 7369bcc1b..f5f10477b 100644 --- a/ED/src/init/ed_params.f90 +++ b/ED/src/init/ed_params.f90 @@ -45,7 +45,7 @@ subroutine load_ed_ecosystem_params() ! 2 | Early tropical | no | yes | no ! ! 3 | Mid tropical | no | yes | no ! ! 4 | Late tropical | no | yes | no ! - ! 5 | C3 grass | yes | no | yes ! + ! 5 | Temperate C3 grass | yes | no | yes ! ! 6 | Northern pines | no | no | no ! ! 7 | Southern pines | no | no | no ! ! 8 | Late conifers | no | no | no ! @@ -56,8 +56,8 @@ subroutine load_ed_ecosystem_params() ! 13 | C3 crop (e.g.,wheat, rice, soybean) | yes | no | yes ! ! 14 | C4 pasture | yes | yes | yes ! ! 15 | C4 crop (e.g.,corn/maize) | yes | yes | yes ! - ! 16 | Subtropical C3 grass | yes | yes | yes ! - ! 17 | Araucaria | no | yes | no ! + ! 16 | Tropical C3 grass | yes | yes | yes ! + ! 17 | Araucaria (similar to 7, tropical allom.) | no | yes | no ! !------+--------------------------------------------+---------+----------+--------------! !----- Name the PFTs (no spaces, please). ----------------------------------------------! @@ -150,8 +150,8 @@ subroutine load_ed_ecosystem_params() !---------------------------------------------------------------------------------------! !---------------------------------------------------------------------------------------! - ! This should be always the last one, since it depends on variables assigned in ! - ! the previous init_????_params. ! + ! This should be always the last one, since it depends on variables assigned in the ! + ! previous init_????_params. ! !---------------------------------------------------------------------------------------! call init_rk4_params() !---------------------------------------------------------------------------------------! @@ -172,26 +172,26 @@ end subroutine load_ed_ecosystem_params ! wouldn't fit in any of the other categories. ! !------------------------------------------------------------------------------------------! subroutine init_ed_misc_coms - use ed_max_dims , only : n_pft & ! intent(in) - , n_dbh & ! intent(in) - , n_age ! ! intent(in) - use consts_coms , only : erad & ! intent(in) - , pio180 ! ! intent(in) - use ed_misc_coms , only : burnin & ! intent(out) - , outputMonth & ! intent(out) - , restart_target_year & ! intent(out) - , use_target_year & ! intent(out) - , maxage & ! intent(out) - , dagei & ! intent(out) - , maxdbh & ! intent(out) - , ddbhi & ! intent(out) - , vary_elev & ! intent(out) - , vary_hyd & ! intent(out) - , vary_rad & ! intent(out) - , max_thsums_dist & ! intent(out) - , max_poihist_dist & ! intent(out) - , max_poi99_dist & ! intent(out) - , suppress_h5_warnings + use ed_max_dims , only : n_pft & ! intent(in) + , n_dbh & ! intent(in) + , n_age ! ! intent(in) + use consts_coms , only : erad & ! intent(in) + , pio180 ! ! intent(in) + use ed_misc_coms , only : burnin & ! intent(out) + , outputMonth & ! intent(out) + , restart_target_year & ! intent(out) + , use_target_year & ! intent(out) + , maxage & ! intent(out) + , dagei & ! intent(out) + , maxdbh & ! intent(out) + , ddbhi & ! intent(out) + , vary_elev & ! intent(out) + , vary_hyd & ! intent(out) + , vary_rad & ! intent(out) + , max_thsums_dist & ! intent(out) + , max_poihist_dist & ! intent(out) + , max_poi99_dist & ! intent(out) + , suppress_h5_warnings ! ! intent(out) implicit none @@ -870,8 +870,8 @@ subroutine init_can_air_params() , ribmax & ! intent(out) , leaf_drywhc & ! intent(out) , leaf_maxwhc & ! intent(out) - , rb_inter & ! intent(out) - , rb_slope & ! intent(out) + , gbhmos_min & ! intent(out) + , gbhmos_min8 & ! intent(out) , veg_height_min & ! intent(out) , minimum_canopy_depth & ! intent(out) , minimum_canopy_depth8 & ! intent(out) @@ -1037,11 +1037,13 @@ subroutine init_can_air_params() !---------------------------------------------------------------------------------------! !---------------------------------------------------------------------------------------! - ! Variables to define the vegetation aerodynamic resistance. They are currently ! + ! Variables to define the vegetation aerodynamic conductance. They are currently ! ! not PFT dependent. ! !---------------------------------------------------------------------------------------! - rb_slope = 0.0 - rb_inter = 1.e9 + gbhmos_min = 1.e-9 + gbhmos_min8 = dble(gbhmos_min) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! ! veg_height_min - This is the minimum vegetation height allowed [m]. Vegetation ! @@ -4777,6 +4779,8 @@ subroutine init_ff_coms , light_toler_max & ! intent(out) , light_toler_mult & ! intent(out) , fuse_relax & ! intent(out) + , corr_patch & ! intent(out) + , corr_cohort & ! intent(out) , print_fuse_details & ! intent(out) , fuse_prefix ! ! intent(out) use consts_coms , only : onethird & ! intent(out) @@ -4819,6 +4823,15 @@ subroutine init_ff_coms fuse_relax = .false. + !---------------------------------------------------------------------------------------! + ! Coefficient of correlation assumed between two patches and cohorts that are ! + ! about to be fused. ! + !---------------------------------------------------------------------------------------! + corr_patch = 1.0 + corr_cohort = 1.0 + !---------------------------------------------------------------------------------------! + + !----- The following flag switches detailed debugging on. ------------------------------! print_fuse_details = .false. fuse_prefix = 'patch_fusion_' @@ -4901,6 +4914,7 @@ subroutine init_rk4_params() , thbnds_fout & ! intent(out) , detail_pref & ! intent(out) , budget_pref ! ! intent(out) + use ed_misc_coms , only : fast_diagnostics ! ! intent(inout) implicit none !---------------------------------------------------------------------------------------! @@ -5053,6 +5067,13 @@ subroutine init_rk4_params() leaf_intercept = .true. !---------------------------------------------------------------------------------------! + + !---------------------------------------------------------------------------------------! + ! Update fast_diagnostics in case checkbudget is set to true. ! + !---------------------------------------------------------------------------------------! + fast_diagnostics = fast_diagnostics .or. checkbudget + !---------------------------------------------------------------------------------------! + return end subroutine init_rk4_params !==========================================================================================! diff --git a/ED/src/init/ed_type_init.f90 b/ED/src/init/ed_type_init.f90 index 2e4e3da56..3ca557de4 100644 --- a/ED/src/init/ed_type_init.f90 +++ b/ED/src/init/ed_type_init.f90 @@ -11,9 +11,9 @@ subroutine init_ed_cohort_vars(cpatch,ico, lsl) , leaf_turnover_rate & ! intent(in) , Vm0 & ! intent(in) , sla ! ! intent(in) - use ed_misc_coms , only : imoutput & ! intent(in) - , idoutput & ! intent(in) - , iqoutput ! ! intent(in) + use ed_misc_coms , only : writing_long & ! intent(in) + , writing_eorq & ! intent(in) + , writing_dcyc ! ! intent(in) use phenology_coms, only : vm0_tran & ! intent(in) , vm0_slope & ! intent(in) , vm0_amp & ! intent(in) @@ -37,95 +37,51 @@ subroutine init_ed_cohort_vars(cpatch,ico, lsl) !---------------------------------------------------------------------------------------! - cpatch%mean_gpp (ico) = 0.0 - cpatch%mean_leaf_resp (ico) = 0.0 - cpatch%mean_root_resp (ico) = 0.0 - cpatch%mean_growth_resp (ico) = 0.0 - cpatch%mean_storage_resp (ico) = 0.0 - cpatch%mean_vleaf_resp (ico) = 0.0 - cpatch%today_leaf_resp (ico) = 0.0 - cpatch%today_root_resp (ico) = 0.0 - cpatch%today_gpp (ico) = 0.0 - cpatch%today_nppleaf (ico) = 0.0 - cpatch%today_nppfroot (ico) = 0.0 - cpatch%today_nppsapwood (ico) = 0.0 - cpatch%today_nppcroot (ico) = 0.0 - cpatch%today_nppseeds (ico) = 0.0 - cpatch%today_nppwood (ico) = 0.0 - cpatch%today_nppdaily (ico) = 0.0 - cpatch%today_gpp_pot (ico) = 0.0 - cpatch%today_gpp_lightmax (ico) = 0.0 - cpatch%today_gpp_moistmax (ico) = 0.0 - - cpatch%light_level (ico) = 0.0 - cpatch%light_level_beam (ico) = 0.0 - cpatch%light_level_diff (ico) = 0.0 - - cpatch%gpp(ico) = 0.0 - cpatch%leaf_respiration(ico) = 0.0 - cpatch%root_respiration(ico) = 0.0 - cpatch%growth_respiration(ico) = 0.0 - cpatch%storage_respiration(ico) = 0.0 - cpatch%vleaf_respiration(ico) = 0.0 - !---------------------------------------------------------------------------------------! - ! Start the fraction of open stomata with 1., since this is the most likely value ! - ! at night time. FS_open is initialised with 0., though. ! + ! The leaf life span is initialised with the inverse of the turnover rate. Notice ! + ! that the turnover rate is in years, but the life span is in months. Also, some PFTs ! + ! do not define the turnover rate (temperate cold-deciduous for example), in which case ! + ! we assign a meaningless number just to make sure the variable is initialised. ! !---------------------------------------------------------------------------------------! - cpatch%fsw(ico) = 1.0 - cpatch%fsn(ico) = 1.0 - cpatch%fs_open(ico) = 0.0 + if (leaf_turnover_rate(cpatch%pft(ico)) > 0.0) then + cpatch%llspan(ico) = 12.0 / leaf_turnover_rate(cpatch%pft(ico)) + else + cpatch%llspan(ico) = llspan_inf + end if !---------------------------------------------------------------------------------------! - cpatch%monthly_dndt (ico) = 0.0 - cpatch%monthly_dlnndt (ico) = 0.0 - cpatch%mort_rate (:,ico) = 0.0 - - cpatch%dagb_dt (ico) = 0.0 - cpatch%dlnagb_dt (ico) = 0.0 - cpatch%dba_dt (ico) = 0.0 - cpatch%dlnba_dt (ico) = 0.0 - cpatch%ddbh_dt (ico) = 0.0 - cpatch%dlndbh_dt (ico) = 0.0 + !---------------------------------------------------------------------------------------! + ! The maximum capacity of Rubisco to perform the carboxylase function (Vm) and the ! + ! specific leaf area (SLA) must be assigned with the default values. These numbers ! + ! will change only if the PFT uses a light-controlled phenology. ! + !---------------------------------------------------------------------------------------! + select case(phenology(cpatch%pft(ico))) + case (3) + cpatch%vm_bar(ico) = vm0_amp / (1.0 + (cpatch%llspan(ico)/vm0_tran)**vm0_slope) & + + vm0_min + case default + cpatch%vm_bar(ico) = Vm0(cpatch%pft(ico)) + end select + cpatch%sla(ico) = sla(cpatch%pft(ico)) + !---------------------------------------------------------------------------------------! - cpatch%par_l (ico) = 0.0 - cpatch%par_l_beam (ico) = 0.0 - cpatch%par_l_diffuse (ico) = 0.0 - cpatch%rshort_l (ico) = 0.0 - cpatch%rshort_l_beam (ico) = 0.0 - cpatch%rshort_l_diffuse (ico) = 0.0 - cpatch%rlong_l (ico) = 0.0 - cpatch%rlong_l_surf (ico) = 0.0 - cpatch%rlong_l_incid (ico) = 0.0 - cpatch%rshort_w (ico) = 0.0 - cpatch%rshort_w_beam (ico) = 0.0 - cpatch%rshort_w_diffuse (ico) = 0.0 - cpatch%rlong_w (ico) = 0.0 - cpatch%rlong_w_surf (ico) = 0.0 - cpatch%rlong_w_incid (ico) = 0.0 + !---------------------------------------------------------------------------------------! + ! Start the fraction of open stomata with 1., since this is the most likely value ! + ! at night time. FS_open is initialised with 0., though. ! + !---------------------------------------------------------------------------------------! + cpatch%fsw (ico) = 1.0 + cpatch%fsn (ico) = 1.0 + cpatch%fs_open(ico) = 0.0 + !---------------------------------------------------------------------------------------! - cpatch%leaf_gbh (ico) = 0.0 - cpatch%leaf_gbw (ico) = 0.0 - cpatch%wood_gbh (ico) = 0.0 - cpatch%wood_gbw (ico) = 0.0 - cpatch%A_open (ico) = 0.0 - cpatch%A_closed (ico) = 0.0 - cpatch%psi_open (ico) = 0.0 - cpatch%psi_closed (ico) = 0.0 - cpatch%water_supply (ico) = 0.0 - cpatch%gsw_open (ico) = 0.0 - cpatch%gsw_closed (ico) = 0.0 - cpatch%stomatal_conductance (ico) = 0.0 - - - cpatch%leaf_maintenance (ico) = 0.0 - cpatch%root_maintenance (ico) = 0.0 - cpatch%leaf_drop (ico) = 0.0 - cpatch%paw_avg (ico) = 0.0 - cpatch%elongf (ico) = 0.0 + !---------------------------------------------------------------------------------------! + ! Turnover amplitude must be set to 1 because it is used for scaling of the leaf ! + ! life span in the light-controlled phenology. ! + !---------------------------------------------------------------------------------------! + cpatch%turnover_amp (ico) = 1.0 !---------------------------------------------------------------------------------------! @@ -168,58 +124,214 @@ subroutine init_ed_cohort_vars(cpatch,ico, lsl) - cpatch%new_recruit_flag(ico) = 0 - cpatch%bseeds(ico) = 0.0 - - cpatch%leaf_energy(ico) = 0. - cpatch%leaf_hcap(ico) = 0. - cpatch%leaf_temp(ico) = 0. - cpatch%leaf_temp_pv(ico) = 0. - cpatch%leaf_vpdef(ico) = 0. - cpatch%leaf_water(ico) = 0. - cpatch%leaf_fliq(ico) = 0. - cpatch%wood_energy(ico) = 0. - cpatch%wood_hcap(ico) = 0. - cpatch%wood_temp(ico) = 0. - cpatch%wood_temp_pv(ico) = 0. - cpatch%wood_water(ico) = 0. - cpatch%wood_fliq(ico) = 0. - cpatch%veg_wind(ico) = 0. - cpatch%lsfc_shv_open(ico) = 0. - cpatch%lsfc_shv_closed(ico) = 0. - cpatch%lsfc_co2_open(ico) = 0. - cpatch%lsfc_co2_closed(ico) = 0. - cpatch%lint_shv(ico) = 0. - cpatch%lint_co2_open(ico) = 0. - cpatch%lint_co2_closed(ico) = 0. !---------------------------------------------------------------------------------------! - ! Turnover amplitude must be set to 1 because it is used for scaling of the leaf ! - ! life span in the light-controlled phenology. ! + ! Most variables start with zero. ! !---------------------------------------------------------------------------------------! - cpatch%turnover_amp(ico) = 1.0 + cpatch%today_leaf_resp (ico) = 0.0 + cpatch%today_root_resp (ico) = 0.0 + cpatch%today_gpp (ico) = 0.0 + cpatch%today_nppleaf (ico) = 0.0 + cpatch%today_nppfroot (ico) = 0.0 + cpatch%today_nppsapwood (ico) = 0.0 + cpatch%today_nppcroot (ico) = 0.0 + cpatch%today_nppseeds (ico) = 0.0 + cpatch%today_nppwood (ico) = 0.0 + cpatch%today_nppdaily (ico) = 0.0 + cpatch%today_gpp_pot (ico) = 0.0 + cpatch%today_gpp_lightmax (ico) = 0.0 + cpatch%today_gpp_moistmax (ico) = 0.0 + cpatch%light_level (ico) = 0.0 + cpatch%light_level_beam (ico) = 0.0 + cpatch%light_level_diff (ico) = 0.0 + cpatch%gpp (ico) = 0.0 + cpatch%leaf_respiration (ico) = 0.0 + cpatch%root_respiration (ico) = 0.0 + cpatch%growth_respiration (ico) = 0.0 + cpatch%storage_respiration (ico) = 0.0 + cpatch%vleaf_respiration (ico) = 0.0 + cpatch%monthly_dndt (ico) = 0.0 + cpatch%monthly_dlnndt (ico) = 0.0 + cpatch%mort_rate (:,ico) = 0.0 + cpatch%dagb_dt (ico) = 0.0 + cpatch%dlnagb_dt (ico) = 0.0 + cpatch%dba_dt (ico) = 0.0 + cpatch%dlnba_dt (ico) = 0.0 + cpatch%ddbh_dt (ico) = 0.0 + cpatch%dlndbh_dt (ico) = 0.0 + cpatch%par_l (ico) = 0.0 + cpatch%par_l_beam (ico) = 0.0 + cpatch%par_l_diffuse (ico) = 0.0 + cpatch%rshort_l (ico) = 0.0 + cpatch%rshort_l_beam (ico) = 0.0 + cpatch%rshort_l_diffuse (ico) = 0.0 + cpatch%rlong_l (ico) = 0.0 + cpatch%rlong_l_surf (ico) = 0.0 + cpatch%rlong_l_incid (ico) = 0.0 + cpatch%rshort_w (ico) = 0.0 + cpatch%rshort_w_beam (ico) = 0.0 + cpatch%rshort_w_diffuse (ico) = 0.0 + cpatch%rlong_w (ico) = 0.0 + cpatch%rlong_w_surf (ico) = 0.0 + cpatch%rlong_w_incid (ico) = 0.0 + cpatch%leaf_gbh (ico) = 0.0 + cpatch%leaf_gbw (ico) = 0.0 + cpatch%wood_gbh (ico) = 0.0 + cpatch%wood_gbw (ico) = 0.0 + cpatch%A_open (ico) = 0.0 + cpatch%A_closed (ico) = 0.0 + cpatch%psi_open (ico) = 0.0 + cpatch%psi_closed (ico) = 0.0 + cpatch%water_supply (ico) = 0.0 + cpatch%gsw_open (ico) = 0.0 + cpatch%gsw_closed (ico) = 0.0 + cpatch%leaf_gsw (ico) = 0.0 + cpatch%leaf_maintenance (ico) = 0.0 + cpatch%root_maintenance (ico) = 0.0 + cpatch%leaf_drop (ico) = 0.0 + cpatch%paw_avg (ico) = 0.0 + cpatch%elongf (ico) = 0.0 + cpatch%new_recruit_flag (ico) = 0 + cpatch%bseeds (ico) = 0.0 + cpatch%leaf_energy (ico) = 0. + cpatch%leaf_hcap (ico) = 0. + cpatch%leaf_temp (ico) = 0. + cpatch%leaf_temp_pv (ico) = 0. + cpatch%leaf_vpdef (ico) = 0. + cpatch%leaf_water (ico) = 0. + cpatch%leaf_fliq (ico) = 0. + cpatch%wood_energy (ico) = 0. + cpatch%wood_hcap (ico) = 0. + cpatch%wood_temp (ico) = 0. + cpatch%wood_temp_pv (ico) = 0. + cpatch%wood_water (ico) = 0. + cpatch%wood_fliq (ico) = 0. + cpatch%veg_wind (ico) = 0. + cpatch%lsfc_shv_open (ico) = 0. + cpatch%lsfc_shv_closed (ico) = 0. + cpatch%lsfc_co2_open (ico) = 0. + cpatch%lsfc_co2_closed (ico) = 0. + cpatch%lint_shv (ico) = 0. + cpatch%lint_co2_open (ico) = 0. + cpatch%lint_co2_closed (ico) = 0. + !---------------------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------------------! + ! Fast-averages. ! + !---------------------------------------------------------------------------------------! + cpatch%fmean_gpp (ico) = 0.0 + cpatch%fmean_npp (ico) = 0.0 + cpatch%fmean_leaf_resp (ico) = 0.0 + cpatch%fmean_root_resp (ico) = 0.0 + cpatch%fmean_growth_resp (ico) = 0.0 + cpatch%fmean_storage_resp (ico) = 0.0 + cpatch%fmean_vleaf_resp (ico) = 0.0 + cpatch%fmean_plresp (ico) = 0.0 + cpatch%fmean_leaf_energy (ico) = 0.0 + cpatch%fmean_leaf_water (ico) = 0.0 + cpatch%fmean_leaf_hcap (ico) = 0.0 + cpatch%fmean_leaf_vpdef (ico) = 0.0 + cpatch%fmean_leaf_temp (ico) = 0.0 + cpatch%fmean_leaf_fliq (ico) = 0.0 + cpatch%fmean_leaf_gsw (ico) = 0.0 + cpatch%fmean_leaf_gbw (ico) = 0.0 + cpatch%fmean_wood_energy (ico) = 0.0 + cpatch%fmean_wood_water (ico) = 0.0 + cpatch%fmean_wood_hcap (ico) = 0.0 + cpatch%fmean_wood_temp (ico) = 0.0 + cpatch%fmean_wood_fliq (ico) = 0.0 + cpatch%fmean_wood_gbw (ico) = 0.0 + cpatch%fmean_fs_open (ico) = 0.0 + cpatch%fmean_fsw (ico) = 0.0 + cpatch%fmean_fsn (ico) = 0.0 + cpatch%fmean_psi_open (ico) = 0.0 + cpatch%fmean_psi_closed (ico) = 0.0 + cpatch%fmean_water_supply (ico) = 0.0 + cpatch%fmean_light_level (ico) = 0.0 + cpatch%fmean_light_level_beam(ico) = 0.0 + cpatch%fmean_light_level_diff(ico) = 0.0 + cpatch%fmean_par_l (ico) = 0.0 + cpatch%fmean_par_l_beam (ico) = 0.0 + cpatch%fmean_par_l_diff (ico) = 0.0 + cpatch%fmean_rshort_l (ico) = 0.0 + cpatch%fmean_rlong_l (ico) = 0.0 + cpatch%fmean_sensible_lc (ico) = 0.0 + cpatch%fmean_vapor_lc (ico) = 0.0 + cpatch%fmean_transp (ico) = 0.0 + cpatch%fmean_intercepted_al (ico) = 0.0 + cpatch%fmean_wshed_lg (ico) = 0.0 + cpatch%fmean_rshort_w (ico) = 0.0 + cpatch%fmean_rlong_w (ico) = 0.0 + cpatch%fmean_sensible_wc (ico) = 0.0 + cpatch%fmean_vapor_wc (ico) = 0.0 + cpatch%fmean_intercepted_aw (ico) = 0.0 + cpatch%fmean_wshed_wg (ico) = 0.0 !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! - ! Energy and water fluxes. ! + ! The daily means are allocated only when the user wants the daily or the monthly ! + ! output, or the mean diurnal cycle. ! !---------------------------------------------------------------------------------------! - cpatch%mean_par_l (ico) = 0.0 - cpatch%mean_par_l_beam (ico) = 0.0 - cpatch%mean_par_l_diff (ico) = 0.0 - cpatch%mean_rshort_l (ico) = 0.0 - cpatch%mean_rlong_l (ico) = 0.0 - cpatch%mean_sensible_lc (ico) = 0.0 - cpatch%mean_vapor_lc (ico) = 0.0 - cpatch%mean_transp (ico) = 0.0 - cpatch%mean_intercepted_al (ico) = 0.0 - cpatch%mean_wshed_lg (ico) = 0.0 - cpatch%mean_rshort_w (ico) = 0.0 - cpatch%mean_rlong_w (ico) = 0.0 - cpatch%mean_sensible_wc (ico) = 0.0 - cpatch%mean_vapor_wc (ico) = 0.0 - cpatch%mean_intercepted_aw (ico) = 0.0 - cpatch%mean_wshed_wg (ico) = 0.0 + if (writing_long) then + cpatch%dmean_nppleaf (ico) = 0.0 + cpatch%dmean_nppfroot (ico) = 0.0 + cpatch%dmean_nppsapwood (ico) = 0.0 + cpatch%dmean_nppcroot (ico) = 0.0 + cpatch%dmean_nppseeds (ico) = 0.0 + cpatch%dmean_nppwood (ico) = 0.0 + cpatch%dmean_nppdaily (ico) = 0.0 + cpatch%dmean_gpp (ico) = 0.0 + cpatch%dmean_npp (ico) = 0.0 + cpatch%dmean_leaf_resp (ico) = 0.0 + cpatch%dmean_root_resp (ico) = 0.0 + cpatch%dmean_growth_resp (ico) = 0.0 + cpatch%dmean_storage_resp (ico) = 0.0 + cpatch%dmean_vleaf_resp (ico) = 0.0 + cpatch%dmean_plresp (ico) = 0.0 + cpatch%dmean_leaf_energy (ico) = 0.0 + cpatch%dmean_leaf_water (ico) = 0.0 + cpatch%dmean_leaf_hcap (ico) = 0.0 + cpatch%dmean_leaf_vpdef (ico) = 0.0 + cpatch%dmean_leaf_temp (ico) = 0.0 + cpatch%dmean_leaf_fliq (ico) = 0.0 + cpatch%dmean_leaf_gsw (ico) = 0.0 + cpatch%dmean_leaf_gbw (ico) = 0.0 + cpatch%dmean_wood_energy (ico) = 0.0 + cpatch%dmean_wood_water (ico) = 0.0 + cpatch%dmean_wood_hcap (ico) = 0.0 + cpatch%dmean_wood_temp (ico) = 0.0 + cpatch%dmean_wood_fliq (ico) = 0.0 + cpatch%dmean_wood_gbw (ico) = 0.0 + cpatch%dmean_fs_open (ico) = 0.0 + cpatch%dmean_fsw (ico) = 0.0 + cpatch%dmean_fsn (ico) = 0.0 + cpatch%dmean_psi_open (ico) = 0.0 + cpatch%dmean_psi_closed (ico) = 0.0 + cpatch%dmean_water_supply (ico) = 0.0 + cpatch%dmean_light_level (ico) = 0.0 + cpatch%dmean_light_level_beam(ico) = 0.0 + cpatch%dmean_light_level_diff(ico) = 0.0 + cpatch%dmean_par_l (ico) = 0.0 + cpatch%dmean_par_l_beam (ico) = 0.0 + cpatch%dmean_par_l_diff (ico) = 0.0 + cpatch%dmean_rshort_l (ico) = 0.0 + cpatch%dmean_rlong_l (ico) = 0.0 + cpatch%dmean_sensible_lc (ico) = 0.0 + cpatch%dmean_vapor_lc (ico) = 0.0 + cpatch%dmean_transp (ico) = 0.0 + cpatch%dmean_intercepted_al (ico) = 0.0 + cpatch%dmean_wshed_lg (ico) = 0.0 + cpatch%dmean_rshort_w (ico) = 0.0 + cpatch%dmean_rlong_w (ico) = 0.0 + cpatch%dmean_sensible_wc (ico) = 0.0 + cpatch%dmean_vapor_wc (ico) = 0.0 + cpatch%dmean_intercepted_aw (ico) = 0.0 + cpatch%dmean_wshed_wg (ico) = 0.0 + end if !---------------------------------------------------------------------------------------! @@ -227,50 +339,78 @@ subroutine init_ed_cohort_vars(cpatch,ico, lsl) ! The monthly means are allocated only when the user wants the monthly output or ! ! the mean diurnal cycle. ! !---------------------------------------------------------------------------------------! - if (imoutput > 0 .or. iqoutput > 0) then - cpatch%mmean_par_l (ico) = 0.0 - cpatch%mmean_par_l_beam (ico) = 0.0 - cpatch%mmean_par_l_diff (ico) = 0.0 - cpatch%mmean_rshort_l (ico) = 0.0 - cpatch%mmean_rlong_l (ico) = 0.0 - cpatch%mmean_sensible_lc (ico) = 0.0 - cpatch%mmean_vapor_lc (ico) = 0.0 - cpatch%mmean_transp (ico) = 0.0 - cpatch%mmean_intercepted_al (ico) = 0.0 - cpatch%mmean_wshed_lg (ico) = 0.0 - cpatch%mmean_rshort_w (ico) = 0.0 - cpatch%mmean_rlong_w (ico) = 0.0 - cpatch%mmean_sensible_wc (ico) = 0.0 - cpatch%mmean_vapor_wc (ico) = 0.0 - cpatch%mmean_intercepted_aw (ico) = 0.0 - cpatch%mmean_wshed_wg (ico) = 0.0 - cpatch%mmean_gpp (ico) = 0.0 - cpatch%mmean_nppleaf (ico) = 0.0 - cpatch%mmean_nppfroot (ico) = 0.0 - cpatch%mmean_nppsapwood (ico) = 0.0 - cpatch%mmean_nppcroot (ico) = 0.0 - cpatch%mmean_nppseeds (ico) = 0.0 - cpatch%mmean_nppwood (ico) = 0.0 - cpatch%mmean_nppdaily (ico) = 0.0 - cpatch%mmean_leaf_resp (ico) = 0.0 - cpatch%mmean_root_resp (ico) = 0.0 - cpatch%mmean_growth_resp (ico) = 0.0 - cpatch%mmean_storage_resp (ico) = 0.0 - cpatch%mmean_vleaf_resp (ico) = 0.0 - cpatch%mmean_light_level (ico) = 0.0 - cpatch%mmean_light_level_beam (ico) = 0.0 - cpatch%mmean_light_level_diff (ico) = 0.0 - cpatch%mmean_fs_open (ico) = 0.0 - cpatch%mmean_fsw (ico) = 0.0 - cpatch%mmean_fsn (ico) = 0.0 - cpatch%mmean_psi_open (ico) = 0.0 - cpatch%mmean_psi_closed (ico) = 0.0 - cpatch%mmean_water_supply (ico) = 0.0 - cpatch%mmean_leaf_maintenance (ico) = 0.0 - cpatch%mmean_root_maintenance (ico) = 0.0 - cpatch%mmean_leaf_drop (ico) = 0.0 - cpatch%mmean_cb (ico) = 0.0 - cpatch%mmean_mort_rate (:,ico) = 0.0 + if (writing_eorq) then + cpatch%mmean_gpp (ico) = 0.0 + cpatch%mmean_npp (ico) = 0.0 + cpatch%mmean_leaf_resp (ico) = 0.0 + cpatch%mmean_root_resp (ico) = 0.0 + cpatch%mmean_growth_resp (ico) = 0.0 + cpatch%mmean_storage_resp (ico) = 0.0 + cpatch%mmean_vleaf_resp (ico) = 0.0 + cpatch%mmean_plresp (ico) = 0.0 + cpatch%mmean_leaf_energy (ico) = 0.0 + cpatch%mmean_leaf_water (ico) = 0.0 + cpatch%mmean_leaf_hcap (ico) = 0.0 + cpatch%mmean_leaf_vpdef (ico) = 0.0 + cpatch%mmean_leaf_temp (ico) = 0.0 + cpatch%mmean_leaf_fliq (ico) = 0.0 + cpatch%mmean_leaf_gsw (ico) = 0.0 + cpatch%mmean_leaf_gbw (ico) = 0.0 + cpatch%mmean_wood_energy (ico) = 0.0 + cpatch%mmean_wood_water (ico) = 0.0 + cpatch%mmean_wood_hcap (ico) = 0.0 + cpatch%mmean_wood_temp (ico) = 0.0 + cpatch%mmean_wood_fliq (ico) = 0.0 + cpatch%mmean_wood_gbw (ico) = 0.0 + cpatch%mmean_fs_open (ico) = 0.0 + cpatch%mmean_fsw (ico) = 0.0 + cpatch%mmean_fsn (ico) = 0.0 + cpatch%mmean_psi_open (ico) = 0.0 + cpatch%mmean_psi_closed (ico) = 0.0 + cpatch%mmean_water_supply (ico) = 0.0 + cpatch%mmean_light_level (ico) = 0.0 + cpatch%mmean_light_level_beam (ico) = 0.0 + cpatch%mmean_light_level_diff (ico) = 0.0 + cpatch%mmean_par_l (ico) = 0.0 + cpatch%mmean_par_l_beam (ico) = 0.0 + cpatch%mmean_par_l_diff (ico) = 0.0 + cpatch%mmean_rshort_l (ico) = 0.0 + cpatch%mmean_rlong_l (ico) = 0.0 + cpatch%mmean_sensible_lc (ico) = 0.0 + cpatch%mmean_vapor_lc (ico) = 0.0 + cpatch%mmean_transp (ico) = 0.0 + cpatch%mmean_intercepted_al (ico) = 0.0 + cpatch%mmean_wshed_lg (ico) = 0.0 + cpatch%mmean_rshort_w (ico) = 0.0 + cpatch%mmean_rlong_w (ico) = 0.0 + cpatch%mmean_sensible_wc (ico) = 0.0 + cpatch%mmean_vapor_wc (ico) = 0.0 + cpatch%mmean_intercepted_aw (ico) = 0.0 + cpatch%mmean_wshed_wg (ico) = 0.0 + cpatch%mmean_lai (ico) = 0.0 + cpatch%mmean_bleaf (ico) = 0.0 + cpatch%mmean_broot (ico) = 0.0 + cpatch%mmean_bstorage (ico) = 0.0 + cpatch%mmean_mort_rate (:,ico) = 0.0 + cpatch%mmean_leaf_maintenance (ico) = 0.0 + cpatch%mmean_root_maintenance (ico) = 0.0 + cpatch%mmean_leaf_drop (ico) = 0.0 + cpatch%mmean_cb (ico) = 0.0 + cpatch%mmean_nppleaf (ico) = 0.0 + cpatch%mmean_nppfroot (ico) = 0.0 + cpatch%mmean_nppsapwood (ico) = 0.0 + cpatch%mmean_nppcroot (ico) = 0.0 + cpatch%mmean_nppseeds (ico) = 0.0 + cpatch%mmean_nppwood (ico) = 0.0 + cpatch%mmean_nppdaily (ico) = 0.0 + cpatch%mmsqu_gpp (ico) = 0.0 + cpatch%mmsqu_npp (ico) = 0.0 + cpatch%mmsqu_plresp (ico) = 0.0 + cpatch%mmsqu_sensible_lc (ico) = 0.0 + cpatch%mmsqu_vapor_lc (ico) = 0.0 + cpatch%mmsqu_transp (ico) = 0.0 + cpatch%mmsqu_sensible_wc (ico) = 0.0 + cpatch%mmsqu_vapor_wc (ico) = 0.0 end if !---------------------------------------------------------------------------------------! @@ -280,110 +420,63 @@ subroutine init_ed_cohort_vars(cpatch,ico, lsl) ! The daily means are allocated only when the user wants the daily or the monthly ! ! output, or the mean diurnal cycle. ! !---------------------------------------------------------------------------------------! - if (idoutput > 0 .or. imoutput > 0 .or. iqoutput > 0) then - cpatch%dmean_par_l (ico) = 0.0 - cpatch%dmean_par_l_beam (ico) = 0.0 - cpatch%dmean_par_l_diff (ico) = 0.0 - cpatch%dmean_rshort_l (ico) = 0.0 - cpatch%dmean_rlong_l (ico) = 0.0 - cpatch%dmean_sensible_lc (ico) = 0.0 - cpatch%dmean_vapor_lc (ico) = 0.0 - cpatch%dmean_transp (ico) = 0.0 - cpatch%dmean_intercepted_al (ico) = 0.0 - cpatch%dmean_wshed_lg (ico) = 0.0 - cpatch%dmean_rshort_w (ico) = 0.0 - cpatch%dmean_rlong_w (ico) = 0.0 - cpatch%dmean_sensible_wc (ico) = 0.0 - cpatch%dmean_vapor_wc (ico) = 0.0 - cpatch%dmean_intercepted_aw (ico) = 0.0 - cpatch%dmean_wshed_wg (ico) = 0.0 - cpatch%dmean_gpp (ico) = 0.0 - cpatch%dmean_nppleaf (ico) = 0.0 - cpatch%dmean_nppfroot (ico) = 0.0 - cpatch%dmean_nppsapwood (ico) = 0.0 - cpatch%dmean_nppcroot (ico) = 0.0 - cpatch%dmean_nppseeds (ico) = 0.0 - cpatch%dmean_nppwood (ico) = 0.0 - cpatch%dmean_nppdaily (ico) = 0.0 - cpatch%dmean_leaf_resp (ico) = 0.0 - cpatch%dmean_root_resp (ico) = 0.0 - cpatch%dmean_light_level (ico) = 0.0 - cpatch%dmean_light_level_beam (ico) = 0.0 - cpatch%dmean_light_level_diff (ico) = 0.0 - cpatch%dmean_fsw (ico) = 0.0 - cpatch%dmean_fsn (ico) = 0.0 - cpatch%dmean_fs_open (ico) = 0.0 - cpatch%dmean_psi_open (ico) = 0.0 - cpatch%dmean_psi_closed (ico) = 0.0 - cpatch%dmean_water_supply (ico) = 0.0 - end if - - - - !---------------------------------------------------------------------------------------! - ! The daily means are allocated only when the user wants the daily or the monthly ! - ! output, or the mean diurnal cycle. ! - !---------------------------------------------------------------------------------------! - if (iqoutput > 0) then - cpatch%qmean_par_l (:,ico) = 0.0 - cpatch%qmean_par_l_beam (:,ico) = 0.0 - cpatch%qmean_par_l_diff (:,ico) = 0.0 - cpatch%qmean_rshort_l (:,ico) = 0.0 - cpatch%qmean_rlong_l (:,ico) = 0.0 - cpatch%qmean_sensible_lc (:,ico) = 0.0 - cpatch%qmean_vapor_lc (:,ico) = 0.0 - cpatch%qmean_transp (:,ico) = 0.0 - cpatch%qmean_intercepted_al (:,ico) = 0.0 - cpatch%qmean_wshed_lg (:,ico) = 0.0 - cpatch%qmean_rshort_w (:,ico) = 0.0 - cpatch%qmean_rlong_w (:,ico) = 0.0 - cpatch%qmean_sensible_wc (:,ico) = 0.0 - cpatch%qmean_vapor_wc (:,ico) = 0.0 - cpatch%qmean_intercepted_aw (:,ico) = 0.0 - cpatch%qmean_wshed_wg (:,ico) = 0.0 - cpatch%qmean_gpp (:,ico) = 0.0 - cpatch%qmean_leaf_resp (:,ico) = 0.0 - cpatch%qmean_root_resp (:,ico) = 0.0 - cpatch%qmean_fsw (:,ico) = 0.0 - cpatch%qmean_fsn (:,ico) = 0.0 - cpatch%qmean_fs_open (:,ico) = 0.0 - cpatch%qmean_psi_open (:,ico) = 0.0 - cpatch%qmean_psi_closed (:,ico) = 0.0 - cpatch%qmean_water_supply (:,ico) = 0.0 + if (writing_dcyc) then + cpatch%qmean_gpp (:,ico) = 0.0 + cpatch%qmean_npp (:,ico) = 0.0 + cpatch%qmean_leaf_resp (:,ico) = 0.0 + cpatch%qmean_root_resp (:,ico) = 0.0 + cpatch%qmean_growth_resp (:,ico) = 0.0 + cpatch%qmean_storage_resp (:,ico) = 0.0 + cpatch%qmean_vleaf_resp (:,ico) = 0.0 + cpatch%qmean_plresp (:,ico) = 0.0 + cpatch%qmean_leaf_energy (:,ico) = 0.0 + cpatch%qmean_leaf_water (:,ico) = 0.0 + cpatch%qmean_leaf_hcap (:,ico) = 0.0 + cpatch%qmean_leaf_vpdef (:,ico) = 0.0 + cpatch%qmean_leaf_temp (:,ico) = 0.0 + cpatch%qmean_leaf_fliq (:,ico) = 0.0 + cpatch%qmean_leaf_gsw (:,ico) = 0.0 + cpatch%qmean_leaf_gbw (:,ico) = 0.0 + cpatch%qmean_wood_energy (:,ico) = 0.0 + cpatch%qmean_wood_water (:,ico) = 0.0 + cpatch%qmean_wood_hcap (:,ico) = 0.0 + cpatch%qmean_wood_temp (:,ico) = 0.0 + cpatch%qmean_wood_fliq (:,ico) = 0.0 + cpatch%qmean_wood_gbw (:,ico) = 0.0 + cpatch%qmean_fs_open (:,ico) = 0.0 + cpatch%qmean_fsw (:,ico) = 0.0 + cpatch%qmean_fsn (:,ico) = 0.0 + cpatch%qmean_psi_open (:,ico) = 0.0 + cpatch%qmean_psi_closed (:,ico) = 0.0 + cpatch%qmean_water_supply (:,ico) = 0.0 + cpatch%qmean_light_level (:,ico) = 0.0 + cpatch%qmean_light_level_beam(:,ico) = 0.0 + cpatch%qmean_light_level_diff(:,ico) = 0.0 + cpatch%qmean_par_l (:,ico) = 0.0 + cpatch%qmean_par_l_beam (:,ico) = 0.0 + cpatch%qmean_par_l_diff (:,ico) = 0.0 + cpatch%qmean_rshort_l (:,ico) = 0.0 + cpatch%qmean_rlong_l (:,ico) = 0.0 + cpatch%qmean_sensible_lc (:,ico) = 0.0 + cpatch%qmean_vapor_lc (:,ico) = 0.0 + cpatch%qmean_transp (:,ico) = 0.0 + cpatch%qmean_intercepted_al (:,ico) = 0.0 + cpatch%qmean_wshed_lg (:,ico) = 0.0 + cpatch%qmean_rshort_w (:,ico) = 0.0 + cpatch%qmean_rlong_w (:,ico) = 0.0 + cpatch%qmean_sensible_wc (:,ico) = 0.0 + cpatch%qmean_vapor_wc (:,ico) = 0.0 + cpatch%qmean_intercepted_aw (:,ico) = 0.0 + cpatch%qmean_wshed_wg (:,ico) = 0.0 + cpatch%qmsqu_gpp (:,ico) = 0.0 + cpatch%qmsqu_npp (:,ico) = 0.0 + cpatch%qmsqu_plresp (:,ico) = 0.0 + cpatch%qmsqu_sensible_lc (:,ico) = 0.0 + cpatch%qmsqu_vapor_lc (:,ico) = 0.0 + cpatch%qmsqu_transp (:,ico) = 0.0 + cpatch%qmsqu_sensible_wc (:,ico) = 0.0 + cpatch%qmsqu_vapor_wc (:,ico) = 0.0 end if - - - !---------------------------------------------------------------------------------------! - - - - !---------------------------------------------------------------------------------------! - ! The leaf life span is initialised with the inverse of the turnover rate. Notice ! - ! that the turnover rate is in years, but the life span is in months. Also, some PFTs ! - ! do not define the turnover rate (temperate cold-deciduous for example), in which case ! - ! we assign a meaningless number just to make sure the variable is initialised. ! - !---------------------------------------------------------------------------------------! - if (leaf_turnover_rate(cpatch%pft(ico)) > 0.0) then - cpatch%llspan(ico) = 12.0 / leaf_turnover_rate(cpatch%pft(ico)) - else - cpatch%llspan(ico) = llspan_inf - end if - !---------------------------------------------------------------------------------------! - - - !---------------------------------------------------------------------------------------! - ! The maximum capacity of Rubisco to perform the carboxylase function (Vm) and the ! - ! specific leaf area (SLA) must be assigned with the default values. These numbers ! - ! will change only if the PFT uses a light-controlled phenology. ! - !---------------------------------------------------------------------------------------! - select case(phenology(cpatch%pft(ico))) - case (3) - cpatch%vm_bar(ico) = vm0_amp / (1.0 + (cpatch%llspan(ico)/vm0_tran)**vm0_slope) & - + vm0_min - case default - cpatch%vm_bar(ico) = Vm0(cpatch%pft(ico)) - end select - cpatch%sla(ico) = sla(cpatch%pft(ico)) !---------------------------------------------------------------------------------------! @@ -402,7 +495,7 @@ end subroutine init_ed_cohort_vars ! This subroutine initialise a bunch of patch-level variables. This should be called ! ! whenever a group of new patches is created. ! !------------------------------------------------------------------------------------------! -subroutine init_ed_patch_vars(csite,ip1,ip2,lsl) +subroutine init_ed_patch_vars(csite,ipaa,ipaz,lsl) use ed_state_vars , only : sitetype ! ! structure use ed_max_dims , only : n_pft ! ! intent(in) use grid_coms , only : nzs & ! intent(in) @@ -410,15 +503,15 @@ subroutine init_ed_patch_vars(csite,ip1,ip2,lsl) use soil_coms , only : slz ! ! intent(in) use canopy_air_coms, only : veg_height_min & ! intent(in) , minimum_canopy_depth ! ! intent(in) - use ed_misc_coms , only : imoutput & ! intent(in) - , idoutput & ! intent(in) - , iqoutput & ! intent(in) - , ied_init_mode + use ed_misc_coms , only : writing_long & ! intent(in) + , writing_eorq & ! intent(in) + , writing_dcyc & ! intent(in) + , ied_init_mode ! ! intent(in) implicit none !----- Arguments. ----------------------------------------------------------------------! type(sitetype) , target :: csite - integer , intent(in) :: ip1 - integer , intent(in) :: ip2 + integer , intent(in) :: ipaa + integer , intent(in) :: ipaz integer , intent(in) :: lsl !----- Local variables. ----------------------------------------------------------------! integer :: ipft @@ -427,272 +520,505 @@ subroutine init_ed_patch_vars(csite,ip1,ip2,lsl) !---------------------------------------------------------------------------------------! + + !----- Current and previous time steps. They cannot be set to zero... -----------------! + csite%htry (ipaa:ipaz) = 1.0 + csite%hprev (ipaa:ipaz) = 0.1 + !---------------------------------------------------------------------------------------! + + + !------ Set water table to the deepest soil layer. -------------------------------------! + csite%watertable(ipaa:ipaz) = slz(lsl) + !---------------------------------------------------------------------------------------! + + + !------ Initialise hydrology variables. ------------------------------------------------! + csite%moist_dz (ipaa:ipaz) = 0.0 + csite%ksat (ipaa:ipaz) = 0.0 + csite%soil_sat_energy (ipaa:ipaz) = 0.0 + csite%soil_sat_water (ipaa:ipaz) = 0.0 + csite%soil_sat_heat (ipaa:ipaz) = 0.0 + csite%runoff_A (:,ipaa:ipaz) = 0.0 + csite%runoff_rate (ipaa:ipaz) = 0.0 + csite%runoff (ipaa:ipaz) = 0.0 + csite%qrunoff (ipaa:ipaz) = 0.0 + !---------------------------------------------------------------------------------------! + + !------ Initialise soil state variables. -----------------------------------------------! if (ied_init_mode /= 7)then - csite%soil_water (1:nzg,ip1:ip2) = 0.0 + csite%soil_water (1:nzg,ipaa:ipaz) = 0.0 end if - csite%soil_energy (1:nzg,ip1:ip2) = 0.0 - csite%soil_tempk (1:nzg,ip1:ip2) = 0.0 - csite%soil_fracliq (1:nzg,ip1:ip2) = 0.0 - csite%rootdense (1:nzg,ip1:ip2) = 0.0 + csite%soil_energy (1:nzg,ipaa:ipaz) = 0.0 + csite%soil_mstpot (1:nzg,ipaa:ipaz) = 0.0 + csite%soil_tempk (1:nzg,ipaa:ipaz) = 0.0 + csite%soil_fracliq (1:nzg,ipaa:ipaz) = 0.0 + csite%rootdense (1:nzg,ipaa:ipaz) = 0.0 !---------------------------------------------------------------------------------------! !------ Initialize sfcwater state variables. -------------------------------------------! - csite%sfcwater_mass (1:nzs,ip1:ip2) = 0.0 - csite%sfcwater_energy (1:nzs,ip1:ip2) = 0.0 - csite%sfcwater_depth (1:nzs,ip1:ip2) = 0.0 - csite%sfcwater_tempk (1:nzs,ip1:ip2) = 0.0 - csite%sfcwater_fracliq (1:nzs,ip1:ip2) = 0.0 - csite%total_sfcw_depth (ip1:ip2) = 0.0 - csite%snowfac (ip1:ip2) = 0.0 - csite%runoff (ip1:ip2) = 0.0 - csite%rshort_s (:,ip1:ip2) = 0.0 - csite%rshort_s_beam (:,ip1:ip2) = 0.0 - csite%rshort_s_diffuse (:,ip1:ip2) = 0.0 - csite%par_s (:,ip1:ip2) = 0.0 - csite%par_s_beam (:,ip1:ip2) = 0.0 - csite%par_s_diffuse (:,ip1:ip2) = 0.0 - csite%rlong_s (ip1:ip2) = 0.0 + csite%sfcwater_mass (1:nzs,ipaa:ipaz) = 0.0 + csite%sfcwater_energy (1:nzs,ipaa:ipaz) = 0.0 + csite%sfcwater_depth (1:nzs,ipaa:ipaz) = 0.0 + csite%sfcwater_tempk (1:nzs,ipaa:ipaz) = 0.0 + csite%sfcwater_fracliq (1:nzs,ipaa:ipaz) = 0.0 + csite%total_sfcw_depth (ipaa:ipaz) = 0.0 + csite%snowfac (ipaa:ipaz) = 0.0 + csite%runoff (ipaa:ipaz) = 0.0 + csite%qrunoff (ipaa:ipaz) = 0.0 + csite%rshort_s (:,ipaa:ipaz) = 0.0 + csite%rshort_s_beam (:,ipaa:ipaz) = 0.0 + csite%rshort_s_diffuse (:,ipaa:ipaz) = 0.0 + csite%par_s (:,ipaa:ipaz) = 0.0 + csite%par_s_beam (:,ipaa:ipaz) = 0.0 + csite%par_s_diffuse (:,ipaa:ipaz) = 0.0 + csite%rlong_s (ipaa:ipaz) = 0.0 !------ Number of pounding/snow layers. This is an integer... --------------------------! - csite%nlev_sfcwater (ip1:ip2) = 0 + csite%nlev_sfcwater (ipaa:ipaz) = 0 !---------------------------------------------------------------------------------------! !------ Decomposition rates... ---------------------------------------------------------! - csite%A_decomp (ip1:ip2) = 0.0 - csite%f_decomp (ip1:ip2) = 0.0 - csite%rh (ip1:ip2) = 0.0 - csite%cwd_rh (ip1:ip2) = 0.0 - csite%mean_rh (ip1:ip2) = 0.0 - csite%mean_cwd_rh (ip1:ip2) = 0.0 - csite%mean_nep (ip1:ip2) = 0.0 - csite%today_A_decomp (ip1:ip2) = 0.0 - csite%today_Af_decomp (ip1:ip2) = 0.0 + csite%A_decomp (ipaa:ipaz) = 0.0 + csite%f_decomp (ipaa:ipaz) = 0.0 + csite%rh (ipaa:ipaz) = 0.0 + csite%cwd_rh (ipaa:ipaz) = 0.0 + csite%today_A_decomp (ipaa:ipaz) = 0.0 + csite%today_Af_decomp (ipaa:ipaz) = 0.0 !---------------------------------------------------------------------------------------! !------ Miscellaneous variables. -------------------------------------------------------! - csite%repro (1:n_pft,ip1:ip2) = 0.0 - csite%avg_daily_temp (ip1:ip2) = 0.0 - csite%avg_monthly_gndwater (ip1:ip2) = 0.0 - csite%avg_monthly_waterdef (ip1:ip2) = 0.0 - csite%plant_ag_biomass (ip1:ip2) = 0.0 + csite%repro (1:n_pft,ipaa:ipaz) = 0.0 + csite%avg_daily_temp (ipaa:ipaz) = 0.0 + csite%avg_monthly_gndwater (ipaa:ipaz) = 0.0 + csite%avg_monthly_waterdef (ipaa:ipaz) = 0.0 + csite%plant_ag_biomass (ipaa:ipaz) = 0.0 !---------------------------------------------------------------------------------------! !----- Maximum light variables. --------------------------------------------------------! - csite%A_o_max (1:n_pft,ip1:ip2) = 0.0 - csite%A_c_max (1:n_pft,ip1:ip2) = 0.0 - csite%par_l_max (ip1:ip2) = 0.0 - csite%par_l_beam_max (ip1:ip2) = 0.0 - csite%par_l_diffuse_max (ip1:ip2) = 0.0 + csite%A_o_max (1:n_pft,ipaa:ipaz) = 0.0 + csite%A_c_max (1:n_pft,ipaa:ipaz) = 0.0 + csite%par_l_max (ipaa:ipaz) = 0.0 + csite%par_l_beam_max (ipaa:ipaz) = 0.0 + csite%par_l_diffuse_max (ipaa:ipaz) = 0.0 + !---------------------------------------------------------------------------------------! + + csite%co2budget_gpp (ipaa:ipaz) = 0.0 + csite%co2budget_rh (ipaa:ipaz) = 0.0 + csite%co2budget_plresp (ipaa:ipaz) = 0.0 + csite%co2budget_initialstorage (ipaa:ipaz) = 0.0 + csite%co2budget_loss2atm (ipaa:ipaz) = 0.0 + csite%co2budget_denseffect (ipaa:ipaz) = 0.0 + csite%co2budget_residual (ipaa:ipaz) = 0.0 + csite%wbudget_precipgain (ipaa:ipaz) = 0.0 + csite%wbudget_loss2atm (ipaa:ipaz) = 0.0 + csite%wbudget_loss2runoff (ipaa:ipaz) = 0.0 + csite%wbudget_loss2drainage (ipaa:ipaz) = 0.0 + csite%wbudget_denseffect (ipaa:ipaz) = 0.0 + csite%wbudget_initialstorage (ipaa:ipaz) = 0.0 + csite%wbudget_residual (ipaa:ipaz) = 0.0 + csite%ebudget_precipgain (ipaa:ipaz) = 0.0 + csite%ebudget_netrad (ipaa:ipaz) = 0.0 + csite%ebudget_loss2atm (ipaa:ipaz) = 0.0 + csite%ebudget_loss2runoff (ipaa:ipaz) = 0.0 + csite%ebudget_loss2drainage (ipaa:ipaz) = 0.0 + csite%ebudget_denseffect (ipaa:ipaz) = 0.0 + csite%ebudget_prsseffect (ipaa:ipaz) = 0.0 + csite%ebudget_initialstorage (ipaa:ipaz) = 0.0 + csite%ebudget_residual (ipaa:ipaz) = 0.0 + csite%rshort_g (ipaa:ipaz) = 0.0 + csite%rshort_g_beam (ipaa:ipaz) = 0.0 + csite%rshort_g_diffuse (ipaa:ipaz) = 0.0 + csite%par_g (ipaa:ipaz) = 0.0 + csite%par_g_beam (ipaa:ipaz) = 0.0 + csite%par_g_diffuse (ipaa:ipaz) = 0.0 + csite%par_b (ipaa:ipaz) = 0.0 + csite%par_b_beam (ipaa:ipaz) = 0.0 + csite%par_b_diffuse (ipaa:ipaz) = 0.0 + csite%nir_b (ipaa:ipaz) = 0.0 + csite%nir_b_beam (ipaa:ipaz) = 0.0 + csite%nir_b_diffuse (ipaa:ipaz) = 0.0 + csite%rlong_g (ipaa:ipaz) = 0.0 + csite%rlong_g_surf (ipaa:ipaz) = 0.0 + csite%rlong_g_incid (ipaa:ipaz) = 0.0 + csite%rlong_s (ipaa:ipaz) = 0.0 + csite%rlong_s_surf (ipaa:ipaz) = 0.0 + csite%rlong_s_incid (ipaa:ipaz) = 0.0 + csite%albedo (ipaa:ipaz) = 0.0 + csite%albedo_beam (ipaa:ipaz) = 0.0 + csite%albedo_diffuse (ipaa:ipaz) = 0.0 + csite%rlong_albedo (ipaa:ipaz) = 0.0 + csite%rlongup (ipaa:ipaz) = 0.0 + csite%parup (ipaa:ipaz) = 0.0 + csite%nirup (ipaa:ipaz) = 0.0 + csite%rshortup (ipaa:ipaz) = 0.0 + csite%rnet (ipaa:ipaz) = 0.0 + csite%fsc_in (ipaa:ipaz) = 0.0 + csite%ssc_in (ipaa:ipaz) = 0.0 + csite%ssl_in (ipaa:ipaz) = 0.0 + csite%fsn_in (ipaa:ipaz) = 0.0 + csite%total_plant_nitrogen_uptake (ipaa:ipaz) = 0.0 + csite%mineralized_N_loss (ipaa:ipaz) = 0.0 + csite%mineralized_N_input (ipaa:ipaz) = 0.0 + csite%ustar (ipaa:ipaz) = 0.0 + csite%tstar (ipaa:ipaz) = 0.0 + csite%qstar (ipaa:ipaz) = 0.0 + csite%cstar (ipaa:ipaz) = 0.0 + csite%zeta (ipaa:ipaz) = 0.0 + csite%ribulk (ipaa:ipaz) = 0.0 + csite%upwp (ipaa:ipaz) = 0.0 + csite%tpwp (ipaa:ipaz) = 0.0 + csite%qpwp (ipaa:ipaz) = 0.0 + csite%cpwp (ipaa:ipaz) = 0.0 + csite%wpwp (ipaa:ipaz) = 0.0 + csite%can_theiv (ipaa:ipaz) = 0.0 + csite%can_vpdef (ipaa:ipaz) = 0.0 + csite%can_temp (ipaa:ipaz) = 0.0 + csite%can_temp_pv (ipaa:ipaz) = 0.0 + csite%can_rhos (ipaa:ipaz) = 0.0 + csite%can_depth (ipaa:ipaz) = 0.0 + csite%opencan_frac (ipaa:ipaz) = 0.0 + csite%ground_shv (ipaa:ipaz) = 0.0 + csite%ground_ssh (ipaa:ipaz) = 0.0 + csite%ground_temp (ipaa:ipaz) = 0.0 + csite%ground_fliq (ipaa:ipaz) = 0.0 + csite%ggbare (ipaa:ipaz) = 0.0 + csite%ggveg (ipaa:ipaz) = 0.0 + csite%ggnet (ipaa:ipaz) = 0.0 + csite%ggsoil (ipaa:ipaz) = 0.0 + !---------------------------------------------------------------------------------------! + + + + + !---------------------------------------------------------------------------------------! + ! Fast average variables. ! + !---------------------------------------------------------------------------------------! + csite%fmean_rh (ipaa:ipaz) = 0.0 + csite%fmean_cwd_rh (ipaa:ipaz) = 0.0 + csite%fmean_nep (ipaa:ipaz) = 0.0 + csite%fmean_rk4step (ipaa:ipaz) = 0.0 + csite%fmean_available_water (ipaa:ipaz) = 0.0 + csite%fmean_can_theiv (ipaa:ipaz) = 0.0 + csite%fmean_can_theta (ipaa:ipaz) = 0.0 + csite%fmean_can_vpdef (ipaa:ipaz) = 0.0 + csite%fmean_can_temp (ipaa:ipaz) = 0.0 + csite%fmean_can_shv (ipaa:ipaz) = 0.0 + csite%fmean_can_co2 (ipaa:ipaz) = 0.0 + csite%fmean_can_rhos (ipaa:ipaz) = 0.0 + csite%fmean_can_prss (ipaa:ipaz) = 0.0 + csite%fmean_gnd_temp (ipaa:ipaz) = 0.0 + csite%fmean_gnd_shv (ipaa:ipaz) = 0.0 + csite%fmean_can_ggnd (ipaa:ipaz) = 0.0 + csite%fmean_sfcw_depth (ipaa:ipaz) = 0.0 + csite%fmean_sfcw_energy (ipaa:ipaz) = 0.0 + csite%fmean_sfcw_mass (ipaa:ipaz) = 0.0 + csite%fmean_sfcw_temp (ipaa:ipaz) = 0.0 + csite%fmean_sfcw_fliq (ipaa:ipaz) = 0.0 + csite%fmean_rshort_gnd (ipaa:ipaz) = 0.0 + csite%fmean_par_gnd (ipaa:ipaz) = 0.0 + csite%fmean_rlong_gnd (ipaa:ipaz) = 0.0 + csite%fmean_rlongup (ipaa:ipaz) = 0.0 + csite%fmean_parup (ipaa:ipaz) = 0.0 + csite%fmean_nirup (ipaa:ipaz) = 0.0 + csite%fmean_rshortup (ipaa:ipaz) = 0.0 + csite%fmean_rnet (ipaa:ipaz) = 0.0 + csite%fmean_albedo (ipaa:ipaz) = 0.0 + csite%fmean_albedo_beam (ipaa:ipaz) = 0.0 + csite%fmean_albedo_diff (ipaa:ipaz) = 0.0 + csite%fmean_rlong_albedo (ipaa:ipaz) = 0.0 + csite%fmean_ustar (ipaa:ipaz) = 0.0 + csite%fmean_tstar (ipaa:ipaz) = 0.0 + csite%fmean_qstar (ipaa:ipaz) = 0.0 + csite%fmean_cstar (ipaa:ipaz) = 0.0 + csite%fmean_carbon_ac (ipaa:ipaz) = 0.0 + csite%fmean_carbon_st (ipaa:ipaz) = 0.0 + csite%fmean_vapor_gc (ipaa:ipaz) = 0.0 + csite%fmean_vapor_ac (ipaa:ipaz) = 0.0 + csite%fmean_throughfall (ipaa:ipaz) = 0.0 + csite%fmean_runoff (ipaa:ipaz) = 0.0 + csite%fmean_drainage (ipaa:ipaz) = 0.0 + csite%fmean_sensible_gc (ipaa:ipaz) = 0.0 + csite%fmean_sensible_ac (ipaa:ipaz) = 0.0 + csite%fmean_qthroughfall (ipaa:ipaz) = 0.0 + csite%fmean_qrunoff (ipaa:ipaz) = 0.0 + csite%fmean_qdrainage (ipaa:ipaz) = 0.0 + csite%fmean_soil_energy (:,ipaa:ipaz) = 0.0 + csite%fmean_soil_mstpot (:,ipaa:ipaz) = 0.0 + csite%fmean_soil_water (:,ipaa:ipaz) = 0.0 + csite%fmean_soil_temp (:,ipaa:ipaz) = 0.0 + csite%fmean_soil_fliq (:,ipaa:ipaz) = 0.0 + csite%fmean_smoist_gg (:,ipaa:ipaz) = 0.0 + csite%fmean_transloss (:,ipaa:ipaz) = 0.0 + csite%fmean_sensible_gg (:,ipaa:ipaz) = 0.0 + !---------------------------------------------------------------------------------------! + + + + + !---------------------------------------------------------------------------------------! + ! Daily means. ! + !---------------------------------------------------------------------------------------! + if (writing_long) then + csite%dmean_A_decomp (ipaa:ipaz) = 0.0 + csite%dmean_Af_decomp (ipaa:ipaz) = 0.0 + csite%dmean_co2_residual (ipaa:ipaz) = 0.0 + csite%dmean_energy_residual (ipaa:ipaz) = 0.0 + csite%dmean_water_residual (ipaa:ipaz) = 0.0 + csite%dmean_rh (ipaa:ipaz) = 0.0 + csite%dmean_cwd_rh (ipaa:ipaz) = 0.0 + csite%dmean_nep (ipaa:ipaz) = 0.0 + csite%dmean_rk4step (ipaa:ipaz) = 0.0 + csite%dmean_available_water (ipaa:ipaz) = 0.0 + csite%dmean_can_theiv (ipaa:ipaz) = 0.0 + csite%dmean_can_theta (ipaa:ipaz) = 0.0 + csite%dmean_can_vpdef (ipaa:ipaz) = 0.0 + csite%dmean_can_temp (ipaa:ipaz) = 0.0 + csite%dmean_can_shv (ipaa:ipaz) = 0.0 + csite%dmean_can_co2 (ipaa:ipaz) = 0.0 + csite%dmean_can_rhos (ipaa:ipaz) = 0.0 + csite%dmean_can_prss (ipaa:ipaz) = 0.0 + csite%dmean_gnd_temp (ipaa:ipaz) = 0.0 + csite%dmean_gnd_shv (ipaa:ipaz) = 0.0 + csite%dmean_can_ggnd (ipaa:ipaz) = 0.0 + csite%dmean_sfcw_depth (ipaa:ipaz) = 0.0 + csite%dmean_sfcw_energy (ipaa:ipaz) = 0.0 + csite%dmean_sfcw_mass (ipaa:ipaz) = 0.0 + csite%dmean_sfcw_temp (ipaa:ipaz) = 0.0 + csite%dmean_sfcw_fliq (ipaa:ipaz) = 0.0 + csite%dmean_rshort_gnd (ipaa:ipaz) = 0.0 + csite%dmean_par_gnd (ipaa:ipaz) = 0.0 + csite%dmean_rlong_gnd (ipaa:ipaz) = 0.0 + csite%dmean_rlongup (ipaa:ipaz) = 0.0 + csite%dmean_parup (ipaa:ipaz) = 0.0 + csite%dmean_nirup (ipaa:ipaz) = 0.0 + csite%dmean_rshortup (ipaa:ipaz) = 0.0 + csite%dmean_rnet (ipaa:ipaz) = 0.0 + csite%dmean_albedo (ipaa:ipaz) = 0.0 + csite%dmean_albedo_beam (ipaa:ipaz) = 0.0 + csite%dmean_albedo_diff (ipaa:ipaz) = 0.0 + csite%dmean_rlong_albedo (ipaa:ipaz) = 0.0 + csite%dmean_ustar (ipaa:ipaz) = 0.0 + csite%dmean_tstar (ipaa:ipaz) = 0.0 + csite%dmean_qstar (ipaa:ipaz) = 0.0 + csite%dmean_cstar (ipaa:ipaz) = 0.0 + csite%dmean_carbon_ac (ipaa:ipaz) = 0.0 + csite%dmean_carbon_st (ipaa:ipaz) = 0.0 + csite%dmean_vapor_gc (ipaa:ipaz) = 0.0 + csite%dmean_vapor_ac (ipaa:ipaz) = 0.0 + csite%dmean_throughfall (ipaa:ipaz) = 0.0 + csite%dmean_runoff (ipaa:ipaz) = 0.0 + csite%dmean_drainage (ipaa:ipaz) = 0.0 + csite%dmean_sensible_gc (ipaa:ipaz) = 0.0 + csite%dmean_sensible_ac (ipaa:ipaz) = 0.0 + csite%dmean_qthroughfall (ipaa:ipaz) = 0.0 + csite%dmean_qrunoff (ipaa:ipaz) = 0.0 + csite%dmean_qdrainage (ipaa:ipaz) = 0.0 + csite%dmean_soil_energy (:,ipaa:ipaz) = 0.0 + csite%dmean_soil_mstpot (:,ipaa:ipaz) = 0.0 + csite%dmean_soil_water (:,ipaa:ipaz) = 0.0 + csite%dmean_soil_temp (:,ipaa:ipaz) = 0.0 + csite%dmean_soil_fliq (:,ipaa:ipaz) = 0.0 + csite%dmean_smoist_gg (:,ipaa:ipaz) = 0.0 + csite%dmean_transloss (:,ipaa:ipaz) = 0.0 + csite%dmean_sensible_gg (:,ipaa:ipaz) = 0.0 + end if !---------------------------------------------------------------------------------------! - !----- Current and previous time steps. They cannot be set to zero... -----------------! - csite%htry (ip1:ip2) = 1.0 - csite%hprev (ip1:ip2) = 0.1 - !---------------------------------------------------------------------------------------! - - csite%co2budget_gpp (ip1:ip2) = 0.0 - csite%co2budget_gpp_dbh (:,ip1:ip2) = 0.0 - csite%co2budget_rh (ip1:ip2) = 0.0 - csite%co2budget_cwd_rh (ip1:ip2) = 0.0 - csite%co2budget_plresp (ip1:ip2) = 0.0 - csite%co2budget_initialstorage (ip1:ip2) = 0.0 - csite%co2budget_loss2atm (ip1:ip2) = 0.0 - csite%co2budget_denseffect (ip1:ip2) = 0.0 - csite%co2budget_residual (ip1:ip2) = 0.0 - csite%wbudget_precipgain (ip1:ip2) = 0.0 - csite%wbudget_loss2atm (ip1:ip2) = 0.0 - csite%wbudget_loss2runoff (ip1:ip2) = 0.0 - csite%wbudget_loss2drainage (ip1:ip2) = 0.0 - csite%wbudget_denseffect (ip1:ip2) = 0.0 - csite%wbudget_initialstorage (ip1:ip2) = 0.0 - csite%wbudget_residual (ip1:ip2) = 0.0 - csite%ebudget_precipgain (ip1:ip2) = 0.0 - csite%ebudget_netrad (ip1:ip2) = 0.0 - csite%ebudget_loss2atm (ip1:ip2) = 0.0 - csite%ebudget_loss2runoff (ip1:ip2) = 0.0 - csite%ebudget_loss2drainage (ip1:ip2) = 0.0 - csite%ebudget_denseffect (ip1:ip2) = 0.0 - csite%ebudget_prsseffect (ip1:ip2) = 0.0 - csite%ebudget_initialstorage (ip1:ip2) = 0.0 - csite%ebudget_residual (ip1:ip2) = 0.0 - - - - if (idoutput > 0 .or. imoutput > 0 .or. iqoutput > 0) then - csite%dmean_A_decomp (ip1:ip2) = 0.0 - csite%dmean_Af_decomp (ip1:ip2) = 0.0 - csite%dmean_rh (ip1:ip2) = 0.0 - csite%dmean_cwd_rh (ip1:ip2) = 0.0 - csite%dmean_co2_residual (ip1:ip2) = 0.0 - csite%dmean_energy_residual (ip1:ip2) = 0.0 - csite%dmean_water_residual (ip1:ip2) = 0.0 - csite%dmean_rk4step (ip1:ip2) = 0.0 - csite%dmean_albedo (ip1:ip2) = 0.0 - csite%dmean_albedo_beam (ip1:ip2) = 0.0 - csite%dmean_albedo_diffuse (ip1:ip2) = 0.0 - end if - if (imoutput > 0 .or. iqoutput > 0) then - csite%mmean_A_decomp (ip1:ip2) = 0.0 - csite%mmean_Af_decomp (ip1:ip2) = 0.0 - csite%mmean_rh (ip1:ip2) = 0.0 - csite%mmean_cwd_rh (ip1:ip2) = 0.0 - csite%mmean_co2_residual (ip1:ip2) = 0.0 - csite%mmean_energy_residual (ip1:ip2) = 0.0 - csite%mmean_water_residual (ip1:ip2) = 0.0 - csite%mmean_rk4step (ip1:ip2) = 0.0 - csite%mmean_albedo (ip1:ip2) = 0.0 - csite%mmean_albedo_beam (ip1:ip2) = 0.0 - csite%mmean_albedo_diffuse (ip1:ip2) = 0.0 + !---------------------------------------------------------------------------------------! + ! Monthly means. ! + !---------------------------------------------------------------------------------------! + if (writing_eorq) then + csite%mmean_rh (ipaa:ipaz) = 0.0 + csite%mmean_cwd_rh (ipaa:ipaz) = 0.0 + csite%mmean_nep (ipaa:ipaz) = 0.0 + csite%mmean_rk4step (ipaa:ipaz) = 0.0 + csite%mmean_available_water (ipaa:ipaz) = 0.0 + csite%mmean_can_theiv (ipaa:ipaz) = 0.0 + csite%mmean_can_theta (ipaa:ipaz) = 0.0 + csite%mmean_can_vpdef (ipaa:ipaz) = 0.0 + csite%mmean_can_temp (ipaa:ipaz) = 0.0 + csite%mmean_can_shv (ipaa:ipaz) = 0.0 + csite%mmean_can_co2 (ipaa:ipaz) = 0.0 + csite%mmean_can_rhos (ipaa:ipaz) = 0.0 + csite%mmean_can_prss (ipaa:ipaz) = 0.0 + csite%mmean_gnd_temp (ipaa:ipaz) = 0.0 + csite%mmean_gnd_shv (ipaa:ipaz) = 0.0 + csite%mmean_can_ggnd (ipaa:ipaz) = 0.0 + csite%mmean_sfcw_depth (ipaa:ipaz) = 0.0 + csite%mmean_sfcw_energy (ipaa:ipaz) = 0.0 + csite%mmean_sfcw_mass (ipaa:ipaz) = 0.0 + csite%mmean_sfcw_temp (ipaa:ipaz) = 0.0 + csite%mmean_sfcw_fliq (ipaa:ipaz) = 0.0 + csite%mmean_rshort_gnd (ipaa:ipaz) = 0.0 + csite%mmean_par_gnd (ipaa:ipaz) = 0.0 + csite%mmean_rlong_gnd (ipaa:ipaz) = 0.0 + csite%mmean_rlongup (ipaa:ipaz) = 0.0 + csite%mmean_parup (ipaa:ipaz) = 0.0 + csite%mmean_nirup (ipaa:ipaz) = 0.0 + csite%mmean_rshortup (ipaa:ipaz) = 0.0 + csite%mmean_rnet (ipaa:ipaz) = 0.0 + csite%mmean_albedo (ipaa:ipaz) = 0.0 + csite%mmean_albedo_beam (ipaa:ipaz) = 0.0 + csite%mmean_albedo_diff (ipaa:ipaz) = 0.0 + csite%mmean_rlong_albedo (ipaa:ipaz) = 0.0 + csite%mmean_ustar (ipaa:ipaz) = 0.0 + csite%mmean_tstar (ipaa:ipaz) = 0.0 + csite%mmean_qstar (ipaa:ipaz) = 0.0 + csite%mmean_cstar (ipaa:ipaz) = 0.0 + csite%mmean_carbon_ac (ipaa:ipaz) = 0.0 + csite%mmean_carbon_st (ipaa:ipaz) = 0.0 + csite%mmean_vapor_gc (ipaa:ipaz) = 0.0 + csite%mmean_vapor_ac (ipaa:ipaz) = 0.0 + csite%mmean_throughfall (ipaa:ipaz) = 0.0 + csite%mmean_runoff (ipaa:ipaz) = 0.0 + csite%mmean_drainage (ipaa:ipaz) = 0.0 + csite%mmean_sensible_gc (ipaa:ipaz) = 0.0 + csite%mmean_sensible_ac (ipaa:ipaz) = 0.0 + csite%mmean_qthroughfall (ipaa:ipaz) = 0.0 + csite%mmean_qrunoff (ipaa:ipaz) = 0.0 + csite%mmean_qdrainage (ipaa:ipaz) = 0.0 + csite%mmean_fast_soil_c (ipaa:ipaz) = 0.0 + csite%mmean_slow_soil_c (ipaa:ipaz) = 0.0 + csite%mmean_struct_soil_c (ipaa:ipaz) = 0.0 + csite%mmean_struct_soil_l (ipaa:ipaz) = 0.0 + csite%mmean_fast_soil_n (ipaa:ipaz) = 0.0 + csite%mmean_mineral_soil_n (ipaa:ipaz) = 0.0 + csite%mmean_A_decomp (ipaa:ipaz) = 0.0 + csite%mmean_Af_decomp (ipaa:ipaz) = 0.0 + csite%mmean_co2_residual (ipaa:ipaz) = 0.0 + csite%mmean_energy_residual (ipaa:ipaz) = 0.0 + csite%mmean_water_residual (ipaa:ipaz) = 0.0 + csite%mmean_soil_energy (:,ipaa:ipaz) = 0.0 + csite%mmean_soil_mstpot (:,ipaa:ipaz) = 0.0 + csite%mmean_soil_water (:,ipaa:ipaz) = 0.0 + csite%mmean_soil_temp (:,ipaa:ipaz) = 0.0 + csite%mmean_soil_fliq (:,ipaa:ipaz) = 0.0 + csite%mmean_smoist_gg (:,ipaa:ipaz) = 0.0 + csite%mmean_transloss (:,ipaa:ipaz) = 0.0 + csite%mmean_sensible_gg (:,ipaa:ipaz) = 0.0 + csite%mmsqu_rh (ipaa:ipaz) = 0.0 + csite%mmsqu_cwd_rh (ipaa:ipaz) = 0.0 + csite%mmsqu_nep (ipaa:ipaz) = 0.0 + csite%mmsqu_rlongup (ipaa:ipaz) = 0.0 + csite%mmsqu_parup (ipaa:ipaz) = 0.0 + csite%mmsqu_nirup (ipaa:ipaz) = 0.0 + csite%mmsqu_rshortup (ipaa:ipaz) = 0.0 + csite%mmsqu_rnet (ipaa:ipaz) = 0.0 + csite%mmsqu_albedo (ipaa:ipaz) = 0.0 + csite%mmsqu_ustar (ipaa:ipaz) = 0.0 + csite%mmsqu_carbon_ac (ipaa:ipaz) = 0.0 + csite%mmsqu_carbon_st (ipaa:ipaz) = 0.0 + csite%mmsqu_vapor_gc (ipaa:ipaz) = 0.0 + csite%mmsqu_vapor_ac (ipaa:ipaz) = 0.0 + csite%mmsqu_sensible_gc (ipaa:ipaz) = 0.0 + csite%mmsqu_sensible_ac (ipaa:ipaz) = 0.0 end if + !---------------------------------------------------------------------------------------! + + - if (iqoutput > 0) then - csite%qmean_rh (:,ip1:ip2) = 0.0 - csite%qmean_cwd_rh (:,ip1:ip2) = 0.0 - csite%qmean_albedo (:,ip1:ip2) = 0.0 - csite%qmean_albedo_beam (:,ip1:ip2) = 0.0 - csite%qmean_albedo_diffuse (:,ip1:ip2) = 0.0 - end if !---------------------------------------------------------------------------------------! - ! These variables need to be initialized here otherwise it will fail when new ! - ! patches are created. ! - !---------------------------------------------------------------------------------------! - csite%avg_rk4step (ip1:ip2) = 0.0 - csite%avg_ustar (ip1:ip2) = 0.0 - csite%avg_tstar (ip1:ip2) = 0.0 - csite%avg_qstar (ip1:ip2) = 0.0 - csite%avg_cstar (ip1:ip2) = 0.0 - csite%avg_carbon_ac (ip1:ip2) = 0.0 - csite%avg_carbon_st (ip1:ip2) = 0.0 - csite%avg_vapor_lc (ip1:ip2) = 0.0 - csite%avg_vapor_wc (ip1:ip2) = 0.0 - csite%avg_vapor_gc (ip1:ip2) = 0.0 - csite%avg_wshed_vg (ip1:ip2) = 0.0 - csite%avg_intercepted (ip1:ip2) = 0.0 - csite%avg_throughfall (ip1:ip2) = 0.0 - csite%avg_vapor_ac (ip1:ip2) = 0.0 - csite%avg_transp (ip1:ip2) = 0.0 - csite%avg_evap (ip1:ip2) = 0.0 - csite%avg_rshort_gnd (ip1:ip2) = 0.0 - csite%avg_par_gnd (ip1:ip2) = 0.0 - csite%avg_rlong_gnd (ip1:ip2) = 0.0 - csite%avg_rlongup (ip1:ip2) = 0.0 - csite%avg_parup (ip1:ip2) = 0.0 - csite%avg_nirup (ip1:ip2) = 0.0 - csite%avg_rshortup (ip1:ip2) = 0.0 - csite%avg_rnet (ip1:ip2) = 0.0 - csite%avg_albedo (ip1:ip2) = 0.0 - csite%avg_albedo_beam (ip1:ip2) = 0.0 - csite%avg_albedo_diffuse (ip1:ip2) = 0.0 - csite%avg_rlong_albedo (ip1:ip2) = 0.0 - csite%avg_runoff (ip1:ip2) = 0.0 - csite%avg_drainage (ip1:ip2) = 0.0 - csite%avg_drainage_heat (ip1:ip2) = 0.0 - csite%avg_sensible_lc (ip1:ip2) = 0.0 - csite%avg_sensible_wc (ip1:ip2) = 0.0 - csite%avg_qwshed_vg (ip1:ip2) = 0.0 - csite%avg_qintercepted (ip1:ip2) = 0.0 - csite%avg_qthroughfall (ip1:ip2) = 0.0 - csite%avg_sensible_gc (ip1:ip2) = 0.0 - csite%avg_sensible_ac (ip1:ip2) = 0.0 - csite%avg_runoff_heat (ip1:ip2) = 0.0 - csite%avg_sensible_gg (:,ip1:ip2) = 0.0 - csite%avg_smoist_gg (:,ip1:ip2) = 0.0 - csite%avg_transloss (:,ip1:ip2) = 0.0 - csite%avg_available_water (ip1:ip2) = 0.0 - csite%avg_leaf_energy (ip1:ip2) = 0.0 - csite%avg_leaf_temp (ip1:ip2) = 0.0 - csite%avg_leaf_vpdef (ip1:ip2) = 0.0 - csite%avg_leaf_hcap (ip1:ip2) = 0.0 - csite%avg_leaf_fliq (ip1:ip2) = 0.0 - csite%avg_leaf_water (ip1:ip2) = 0.0 - csite%avg_wood_energy (ip1:ip2) = 0.0 - csite%avg_wood_temp (ip1:ip2) = 0.0 - csite%avg_wood_hcap (ip1:ip2) = 0.0 - csite%avg_wood_fliq (ip1:ip2) = 0.0 - csite%avg_wood_water (ip1:ip2) = 0.0 - - csite%rshort_g (ip1:ip2) = 0.0 - csite%rshort_g_beam (ip1:ip2) = 0.0 - csite%rshort_g_diffuse (ip1:ip2) = 0.0 - csite%par_g (ip1:ip2) = 0.0 - csite%par_g_beam (ip1:ip2) = 0.0 - csite%par_g_diffuse (ip1:ip2) = 0.0 - csite%par_b (ip1:ip2) = 0.0 - csite%par_b_beam (ip1:ip2) = 0.0 - csite%par_b_diffuse (ip1:ip2) = 0.0 - csite%nir_b (ip1:ip2) = 0.0 - csite%nir_b_beam (ip1:ip2) = 0.0 - csite%nir_b_diffuse (ip1:ip2) = 0.0 - csite%rlong_g (ip1:ip2) = 0.0 - csite%rlong_g_surf (ip1:ip2) = 0.0 - csite%rlong_g_incid (ip1:ip2) = 0.0 - csite%rlong_s (ip1:ip2) = 0.0 - csite%rlong_s_surf (ip1:ip2) = 0.0 - csite%rlong_s_incid (ip1:ip2) = 0.0 - csite%albedo (ip1:ip2) = 0.0 - csite%albedo_beam (ip1:ip2) = 0.0 - csite%albedo_diffuse (ip1:ip2) = 0.0 - csite%rlong_albedo (ip1:ip2) = 0.0 - csite%rlongup (ip1:ip2) = 0.0 - csite%parup (ip1:ip2) = 0.0 - csite%nirup (ip1:ip2) = 0.0 - csite%rshortup (ip1:ip2) = 0.0 - csite%rnet (ip1:ip2) = 0.0 - - csite%fsc_in (ip1:ip2) = 0.0 - csite%ssc_in (ip1:ip2) = 0.0 - csite%ssl_in (ip1:ip2) = 0.0 - csite%fsn_in (ip1:ip2) = 0.0 - csite%total_plant_nitrogen_uptake (ip1:ip2) = 0.0 - csite%mineralized_N_loss (ip1:ip2) = 0.0 - csite%mineralized_N_input (ip1:ip2) = 0.0 - - csite%watertable(ip1:ip2) = slz(lsl) - csite%ustar (ip1:ip2) = 0.0 - csite%tstar (ip1:ip2) = 0.0 - csite%qstar (ip1:ip2) = 0.0 - csite%cstar (ip1:ip2) = 0.0 - csite%zeta (ip1:ip2) = 0.0 - csite%ribulk(ip1:ip2) = 0.0 - csite%upwp (ip1:ip2) = 0.0 - csite%tpwp (ip1:ip2) = 0.0 - csite%qpwp (ip1:ip2) = 0.0 - csite%cpwp (ip1:ip2) = 0.0 - csite%wpwp (ip1:ip2) = 0.0 - - csite%can_theiv (ip1:ip2) = 0.0 - csite%can_vpdef (ip1:ip2) = 0.0 - csite%can_temp (ip1:ip2) = 0.0 - csite%can_temp_pv (ip1:ip2) = 0.0 - csite%can_rhos (ip1:ip2) = 0.0 - csite%can_depth (ip1:ip2) = 0.0 - csite%opencan_frac(ip1:ip2) = 0.0 - csite%ground_shv (ip1:ip2) = 0.0 - csite%ground_ssh (ip1:ip2) = 0.0 - csite%ground_temp (ip1:ip2) = 0.0 - csite%ground_fliq (ip1:ip2) = 0.0 - - csite%ggbare(ip1:ip2) = 0.0 - csite%ggveg (ip1:ip2) = 0.0 - csite%ggnet (ip1:ip2) = 0.0 - csite%ggsoil(ip1:ip2) = 0.0 + ! Mean diel. ! + !---------------------------------------------------------------------------------------! + if (writing_dcyc) then + csite%qmean_rh (:,ipaa:ipaz) = 0.0 + csite%qmean_cwd_rh (:,ipaa:ipaz) = 0.0 + csite%qmean_nep (:,ipaa:ipaz) = 0.0 + csite%qmean_rk4step (:,ipaa:ipaz) = 0.0 + csite%qmean_available_water (:,ipaa:ipaz) = 0.0 + csite%qmean_can_theiv (:,ipaa:ipaz) = 0.0 + csite%qmean_can_theta (:,ipaa:ipaz) = 0.0 + csite%qmean_can_vpdef (:,ipaa:ipaz) = 0.0 + csite%qmean_can_temp (:,ipaa:ipaz) = 0.0 + csite%qmean_can_shv (:,ipaa:ipaz) = 0.0 + csite%qmean_can_co2 (:,ipaa:ipaz) = 0.0 + csite%qmean_can_rhos (:,ipaa:ipaz) = 0.0 + csite%qmean_can_prss (:,ipaa:ipaz) = 0.0 + csite%qmean_gnd_temp (:,ipaa:ipaz) = 0.0 + csite%qmean_gnd_shv (:,ipaa:ipaz) = 0.0 + csite%qmean_can_ggnd (:,ipaa:ipaz) = 0.0 + csite%qmean_sfcw_depth (:,ipaa:ipaz) = 0.0 + csite%qmean_sfcw_energy (:,ipaa:ipaz) = 0.0 + csite%qmean_sfcw_mass (:,ipaa:ipaz) = 0.0 + csite%qmean_sfcw_temp (:,ipaa:ipaz) = 0.0 + csite%qmean_sfcw_fliq (:,ipaa:ipaz) = 0.0 + csite%qmean_rshort_gnd (:,ipaa:ipaz) = 0.0 + csite%qmean_par_gnd (:,ipaa:ipaz) = 0.0 + csite%qmean_rlong_gnd (:,ipaa:ipaz) = 0.0 + csite%qmean_rlongup (:,ipaa:ipaz) = 0.0 + csite%qmean_parup (:,ipaa:ipaz) = 0.0 + csite%qmean_nirup (:,ipaa:ipaz) = 0.0 + csite%qmean_rshortup (:,ipaa:ipaz) = 0.0 + csite%qmean_rnet (:,ipaa:ipaz) = 0.0 + csite%qmean_albedo (:,ipaa:ipaz) = 0.0 + csite%qmean_albedo_beam (:,ipaa:ipaz) = 0.0 + csite%qmean_albedo_diff (:,ipaa:ipaz) = 0.0 + csite%qmean_rlong_albedo (:,ipaa:ipaz) = 0.0 + csite%qmean_ustar (:,ipaa:ipaz) = 0.0 + csite%qmean_tstar (:,ipaa:ipaz) = 0.0 + csite%qmean_qstar (:,ipaa:ipaz) = 0.0 + csite%qmean_cstar (:,ipaa:ipaz) = 0.0 + csite%qmean_carbon_ac (:,ipaa:ipaz) = 0.0 + csite%qmean_carbon_st (:,ipaa:ipaz) = 0.0 + csite%qmean_vapor_gc (:,ipaa:ipaz) = 0.0 + csite%qmean_vapor_ac (:,ipaa:ipaz) = 0.0 + csite%qmean_throughfall (:,ipaa:ipaz) = 0.0 + csite%qmean_runoff (:,ipaa:ipaz) = 0.0 + csite%qmean_drainage (:,ipaa:ipaz) = 0.0 + csite%qmean_sensible_gc (:,ipaa:ipaz) = 0.0 + csite%qmean_sensible_ac (:,ipaa:ipaz) = 0.0 + csite%qmean_qthroughfall (:,ipaa:ipaz) = 0.0 + csite%qmean_qrunoff (:,ipaa:ipaz) = 0.0 + csite%qmean_qdrainage (:,ipaa:ipaz) = 0.0 + csite%qmsqu_rh (:,ipaa:ipaz) = 0.0 + csite%qmsqu_cwd_rh (:,ipaa:ipaz) = 0.0 + csite%qmsqu_nep (:,ipaa:ipaz) = 0.0 + csite%qmsqu_rlongup (:,ipaa:ipaz) = 0.0 + csite%qmsqu_parup (:,ipaa:ipaz) = 0.0 + csite%qmsqu_nirup (:,ipaa:ipaz) = 0.0 + csite%qmsqu_rshortup (:,ipaa:ipaz) = 0.0 + csite%qmsqu_rnet (:,ipaa:ipaz) = 0.0 + csite%qmsqu_albedo (:,ipaa:ipaz) = 0.0 + csite%qmsqu_ustar (:,ipaa:ipaz) = 0.0 + csite%qmsqu_carbon_ac (:,ipaa:ipaz) = 0.0 + csite%qmsqu_carbon_st (:,ipaa:ipaz) = 0.0 + csite%qmsqu_vapor_gc (:,ipaa:ipaz) = 0.0 + csite%qmsqu_vapor_ac (:,ipaa:ipaz) = 0.0 + csite%qmsqu_sensible_gc (:,ipaa:ipaz) = 0.0 + csite%qmsqu_sensible_ac (:,ipaa:ipaz) = 0.0 + csite%qmean_soil_energy (:,:,ipaa:ipaz) = 0.0 + csite%qmean_soil_mstpot (:,:,ipaa:ipaz) = 0.0 + csite%qmean_soil_water (:,:,ipaa:ipaz) = 0.0 + csite%qmean_soil_temp (:,:,ipaa:ipaz) = 0.0 + csite%qmean_soil_fliq (:,:,ipaa:ipaz) = 0.0 + csite%qmean_smoist_gg (:,:,ipaa:ipaz) = 0.0 + csite%qmean_transloss (:,:,ipaa:ipaz) = 0.0 + csite%qmean_sensible_gg (:,:,ipaa:ipaz) = 0.0 + end if + !---------------------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------------------! + ! Update the number of cohorts in this site. ! + !---------------------------------------------------------------------------------------! ncohorts = 0 do ipa=1,csite%npatches ncohorts = ncohorts + csite%patch(ipa)%ncohorts - enddo - + end do csite%cohort_count = ncohorts + !---------------------------------------------------------------------------------------! return end subroutine init_ed_patch_vars @@ -717,6 +1043,9 @@ subroutine init_ed_site_vars(cpoly, lat) , plantation_stock ! ! intent(in) use grid_coms , only : nzs & ! intent(in) , nzg ! ! intent(in) + use ed_misc_coms , only : writing_long & ! intent(in) + , writing_eorq & ! intent(in) + , writing_dcyc ! ! intent(in) implicit none !----- Arguments. ----------------------------------------------------------------------! type(polygontype), target :: cpoly @@ -732,8 +1061,6 @@ subroutine init_ed_site_vars(cpoly, lat) !---------------------------------------------------------------------------------------! cpoly%basal_area (1:n_pft, 1:n_dbh, :) = 0.0 cpoly%agb (1:n_pft, 1:n_dbh, :) = 0.0 - cpoly%pldens (1:n_pft, 1:n_dbh, :) = 0.0 - cpoly%bseeds (1:n_pft, 1:n_dbh, :) = 0.0 cpoly%basal_area_growth(1:n_pft, 1:n_dbh, :) = 0.0 cpoly%basal_area_mort (1:n_pft, 1:n_dbh, :) = 0.0 @@ -749,8 +1076,9 @@ subroutine init_ed_site_vars(cpoly, lat) !---------------------------------------------------------------------------------------! ! Radiation-related variables. ! !---------------------------------------------------------------------------------------! - cpoly%cosaoi (:) = 0.0 - cpoly%daylight (:) = 0.0 + cpoly%cosaoi (:) = 0.0 + cpoly%daylight (:) = 0.0 + cpoly%nighttime (:) = .true. !---------------------------------------------------------------------------------------! @@ -759,6 +1087,7 @@ subroutine init_ed_site_vars(cpoly, lat) ! Hydrology-related variables. ! !---------------------------------------------------------------------------------------! cpoly%runoff (:) = 0.0 + cpoly%qrunoff (:) = 0.0 !---------------------------------------------------------------------------------------! @@ -792,26 +1121,121 @@ subroutine init_ed_site_vars(cpoly, lat) !---------------------------------------------------------------------------------------! ! Initialise several disturbance- and LU-related variables. ! !---------------------------------------------------------------------------------------! - cpoly%plantation (:) = 0 - cpoly%agri_stocking_pft (:) = agri_stock - cpoly%agri_stocking_density (:) = 10.0 - cpoly%plantation_stocking_pft (:) = plantation_stock - cpoly%plantation_stocking_density (:) = 4.0 - cpoly%primary_harvest_memory (:) = 0.0 - cpoly%secondary_harvest_memory (:) = 0.0 - cpoly%fire_disturbance_rate (:) = 0.0 - cpoly%ignition_rate (:) = 0.0 - cpoly%lambda_fire (1:12,:) = 0.0 - cpoly%nat_disturbance_rate (:) = 0.0 - cpoly%nat_dist_type (:) = 0 - cpoly%disturbance_memory(1:n_dist_types, 1:n_dist_types,:) = 0.0 - cpoly%disturbance_rates (1:n_dist_types, 1:n_dist_types,:) = 0.0 + cpoly%plantation (:) = 0 + cpoly%agri_stocking_pft (:) = agri_stock + cpoly%agri_stocking_density (:) = 10.0 + cpoly%plantation_stocking_pft (:) = plantation_stock + cpoly%plantation_stocking_density (:) = 4.0 + cpoly%primary_harvest_memory (:) = 0.0 + cpoly%secondary_harvest_memory (:) = 0.0 + cpoly%fire_disturbance_rate (:) = 0.0 + cpoly%ignition_rate (:) = 0.0 + cpoly%lambda_fire (1:12,:) = 0.0 + cpoly%nat_disturbance_rate (:) = 0.0 + cpoly%nat_dist_type (:) = 0 + cpoly%disturbance_memory (1:n_dist_types, 1:n_dist_types,:) = 0.0 + cpoly%disturbance_rates (1:n_dist_types, 1:n_dist_types,:) = 0.0 !---------------------------------------------------------------------------------------! - + + + !----- Initialise the mean radiation. --------------------------------------------------! cpoly%rad_avg(:) = 200.0 - - + !---------------------------------------------------------------------------------------! + + + !----- Fast means. ---------------------------------------------------------------------! + cpoly%fmean_atm_theiv (:) = 0.0 + cpoly%fmean_atm_theta (:) = 0.0 + cpoly%fmean_atm_temp (:) = 0.0 + cpoly%fmean_atm_vpdef (:) = 0.0 + cpoly%fmean_atm_shv (:) = 0.0 + cpoly%fmean_atm_rshort (:) = 0.0 + cpoly%fmean_atm_rshort_diff (:) = 0.0 + cpoly%fmean_atm_par (:) = 0.0 + cpoly%fmean_atm_par_diff (:) = 0.0 + cpoly%fmean_atm_rlong (:) = 0.0 + cpoly%fmean_atm_vels (:) = 0.0 + cpoly%fmean_atm_rhos (:) = 0.0 + cpoly%fmean_atm_prss (:) = 0.0 + cpoly%fmean_atm_co2 (:) = 0.0 + cpoly%fmean_pcpg (:) = 0.0 + cpoly%fmean_qpcpg (:) = 0.0 + cpoly%fmean_dpcpg (:) = 0.0 + !---------------------------------------------------------------------------------------! + + + + !----- Daily means. --------------------------------------------------------------------! + if (writing_long) then + cpoly%dmean_atm_theiv (:) = 0.0 + cpoly%dmean_atm_theta (:) = 0.0 + cpoly%dmean_atm_temp (:) = 0.0 + cpoly%dmean_atm_vpdef (:) = 0.0 + cpoly%dmean_atm_shv (:) = 0.0 + cpoly%dmean_atm_rshort (:) = 0.0 + cpoly%dmean_atm_rshort_diff (:) = 0.0 + cpoly%dmean_atm_par (:) = 0.0 + cpoly%dmean_atm_par_diff (:) = 0.0 + cpoly%dmean_atm_rlong (:) = 0.0 + cpoly%dmean_atm_vels (:) = 0.0 + cpoly%dmean_atm_rhos (:) = 0.0 + cpoly%dmean_atm_prss (:) = 0.0 + cpoly%dmean_atm_co2 (:) = 0.0 + cpoly%dmean_pcpg (:) = 0.0 + cpoly%dmean_qpcpg (:) = 0.0 + cpoly%dmean_dpcpg (:) = 0.0 + end if + !---------------------------------------------------------------------------------------! + + + + !----- Monthly means. ------------------------------------------------------------------! + if (writing_eorq) then + cpoly%mmean_atm_theiv (:) = 0.0 + cpoly%mmean_atm_theta (:) = 0.0 + cpoly%mmean_atm_temp (:) = 0.0 + cpoly%mmean_atm_vpdef (:) = 0.0 + cpoly%mmean_atm_shv (:) = 0.0 + cpoly%mmean_atm_rshort (:) = 0.0 + cpoly%mmean_atm_rshort_diff (:) = 0.0 + cpoly%mmean_atm_par (:) = 0.0 + cpoly%mmean_atm_par_diff (:) = 0.0 + cpoly%mmean_atm_rlong (:) = 0.0 + cpoly%mmean_atm_vels (:) = 0.0 + cpoly%mmean_atm_rhos (:) = 0.0 + cpoly%mmean_atm_prss (:) = 0.0 + cpoly%mmean_atm_co2 (:) = 0.0 + cpoly%mmean_pcpg (:) = 0.0 + cpoly%mmean_qpcpg (:) = 0.0 + cpoly%mmean_dpcpg (:) = 0.0 + end if + !---------------------------------------------------------------------------------------! + + + + !----- Monthly means. ------------------------------------------------------------------! + if (writing_dcyc) then + cpoly%qmean_atm_theiv (:,:) = 0.0 + cpoly%qmean_atm_theta (:,:) = 0.0 + cpoly%qmean_atm_temp (:,:) = 0.0 + cpoly%qmean_atm_vpdef (:,:) = 0.0 + cpoly%qmean_atm_shv (:,:) = 0.0 + cpoly%qmean_atm_rshort (:,:) = 0.0 + cpoly%qmean_atm_rshort_diff (:,:) = 0.0 + cpoly%qmean_atm_par (:,:) = 0.0 + cpoly%qmean_atm_par_diff (:,:) = 0.0 + cpoly%qmean_atm_rlong (:,:) = 0.0 + cpoly%qmean_atm_vels (:,:) = 0.0 + cpoly%qmean_atm_rhos (:,:) = 0.0 + cpoly%qmean_atm_prss (:,:) = 0.0 + cpoly%qmean_atm_co2 (:,:) = 0.0 + cpoly%qmean_pcpg (:,:) = 0.0 + cpoly%qmean_qpcpg (:,:) = 0.0 + cpoly%qmean_dpcpg (:,:) = 0.0 + end if + !---------------------------------------------------------------------------------------! + return end subroutine init_ed_site_vars !==========================================================================================! @@ -826,11 +1250,14 @@ end subroutine init_ed_site_vars !==========================================================================================! subroutine init_ed_poly_vars(cgrid) - use ed_state_vars, only : edtype & ! structure - , polygontype & ! structure - , sitetype ! ! structure - use ed_misc_coms , only : dtlsm ! ! intent(in) - use consts_coms , only : day_sec ! ! intent(in) + use ed_state_vars, only : edtype & ! structure + , polygontype & ! structure + , sitetype ! ! structure + use ed_misc_coms , only : dtlsm & ! intent(in) + , writing_long & ! intent(in) + , writing_eorq & ! intent(in) + , writing_dcyc ! ! intent(in) + use consts_coms , only : day_sec ! ! intent(in) implicit none !----- Arguments. ----------------------------------------------------------------------! type(edtype) , target :: cgrid @@ -882,14 +1309,76 @@ subroutine init_ed_poly_vars(cgrid) ! the off-line model and the coupled runs will work, because this loop will be ! ! skipped when there is no polygon. ! !------------------------------------------------------------------------------------! - cgrid%mean_precip (ipy) = 0.0 - cgrid%mean_qprecip(ipy) = 0.0 - cgrid%mean_netrad (ipy) = 0.0 - call compute_C_and_N_storage(cgrid,ipy,soil_C, soil_N, veg_C, veg_N) cgrid%cbudget_initialstorage(ipy) = soil_C + veg_C cgrid%nbudget_initialstorage(ipy) = soil_N + veg_N - cgrid%cbudget_nep(ipy) = 0.0 + cgrid%cbudget_nep (ipy) = 0.0 + !------------------------------------------------------------------------------------! + + + !------------------------------------------------------------------------------------! + cgrid%avg_lai_ebalvars (:,:,ipy) = 0.0 + !------------------------------------------------------------------------------------! + + + !------------------------------------------------------------------------------------! + ! Hydrology stuff. ! + !------------------------------------------------------------------------------------! + cgrid%wbar (ipy) = 0.0 + cgrid%Te (ipy) = 0.0 + cgrid%zbar (ipy) = 0.0 + cgrid%sheat (ipy) = 0.0 + cgrid%baseflow (ipy) = 0.0 + cgrid%runoff (ipy) = 0.0 + cgrid%qrunoff (ipy) = 0.0 + cgrid%swliq (ipy) = 0.0 + !------------------------------------------------------------------------------------! + + + !----- Set all biomass and soil pools to zero. --------------------------------------! + cgrid%total_agb (ipy) = 0.0 + cgrid%total_basal_area (ipy) = 0.0 + cgrid%total_agb_growth (ipy) = 0.0 + cgrid%total_agb_mort (ipy) = 0.0 + cgrid%total_agb_recruit (ipy) = 0.0 + cgrid%total_basal_area_growth (ipy) = 0.0 + cgrid%total_basal_area_mort (ipy) = 0.0 + cgrid%total_basal_area_recruit (ipy) = 0.0 + cgrid%nplant (:,:,ipy) = 0.0 + cgrid%agb (:,:,ipy) = 0.0 + cgrid%lai (:,:,ipy) = 0.0 + cgrid%wai (:,:,ipy) = 0.0 + cgrid%basal_area (:,:,ipy) = 0.0 + cgrid%bdead (:,:,ipy) = 0.0 + cgrid%balive (:,:,ipy) = 0.0 + cgrid%bleaf (:,:,ipy) = 0.0 + cgrid%broot (:,:,ipy) = 0.0 + cgrid%bsapwooda (:,:,ipy) = 0.0 + cgrid%bsapwoodb (:,:,ipy) = 0.0 + cgrid%bseeds (:,:,ipy) = 0.0 + cgrid%bstorage (:,:,ipy) = 0.0 + cgrid%bdead_n (:,:,ipy) = 0.0 + cgrid%balive_n (:,:,ipy) = 0.0 + cgrid%bleaf_n (:,:,ipy) = 0.0 + cgrid%broot_n (:,:,ipy) = 0.0 + cgrid%bsapwooda_n (:,:,ipy) = 0.0 + cgrid%bsapwoodb_n (:,:,ipy) = 0.0 + cgrid%bseeds_n (:,:,ipy) = 0.0 + cgrid%bstorage_n (:,:,ipy) = 0.0 + cgrid%leaf_maintenance (:,:,ipy) = 0.0 + cgrid%root_maintenance (:,:,ipy) = 0.0 + cgrid%leaf_drop (:,:,ipy) = 0.0 + cgrid%fast_soil_c (ipy) = 0.0 + cgrid%slow_soil_c (ipy) = 0.0 + cgrid%struct_soil_c (ipy) = 0.0 + cgrid%cwd_c (ipy) = 0.0 + cgrid%fast_soil_n (ipy) = 0.0 + cgrid%mineral_soil_n (ipy) = 0.0 + cgrid%cwd_n (ipy) = 0.0 + !------------------------------------------------------------------------------------! + + + !----- Count how many patches we have, and add to the workload. ---------------------! cgrid%workload(:,ipy) = 0.0 @@ -899,7 +1388,607 @@ subroutine init_ed_poly_vars(cgrid) cgrid%workload(1:12,ipy) = cgrid%workload(1:12,ipy) & + real(csite%npatches) * patchload end do + !------------------------------------------------------------------------------------! + + + !----- Fast averages. ---------------------------------------------------------------! + cgrid%fmean_gpp (ipy) = 0.0 + cgrid%fmean_npp (ipy) = 0.0 + cgrid%fmean_leaf_resp (ipy) = 0.0 + cgrid%fmean_root_resp (ipy) = 0.0 + cgrid%fmean_growth_resp (ipy) = 0.0 + cgrid%fmean_storage_resp (ipy) = 0.0 + cgrid%fmean_vleaf_resp (ipy) = 0.0 + cgrid%fmean_plresp (ipy) = 0.0 + cgrid%fmean_leaf_energy (ipy) = 0.0 + cgrid%fmean_leaf_water (ipy) = 0.0 + cgrid%fmean_leaf_hcap (ipy) = 0.0 + cgrid%fmean_leaf_vpdef (ipy) = 0.0 + cgrid%fmean_leaf_temp (ipy) = 0.0 + cgrid%fmean_leaf_fliq (ipy) = 0.0 + cgrid%fmean_leaf_gsw (ipy) = 0.0 + cgrid%fmean_leaf_gbw (ipy) = 0.0 + cgrid%fmean_wood_energy (ipy) = 0.0 + cgrid%fmean_wood_water (ipy) = 0.0 + cgrid%fmean_wood_hcap (ipy) = 0.0 + cgrid%fmean_wood_temp (ipy) = 0.0 + cgrid%fmean_wood_fliq (ipy) = 0.0 + cgrid%fmean_wood_gbw (ipy) = 0.0 + cgrid%fmean_fs_open (ipy) = 0.0 + cgrid%fmean_fsw (ipy) = 0.0 + cgrid%fmean_fsn (ipy) = 0.0 + cgrid%fmean_psi_open (ipy) = 0.0 + cgrid%fmean_psi_closed (ipy) = 0.0 + cgrid%fmean_water_supply (ipy) = 0.0 + cgrid%fmean_par_l (ipy) = 0.0 + cgrid%fmean_par_l_beam (ipy) = 0.0 + cgrid%fmean_par_l_diff (ipy) = 0.0 + cgrid%fmean_rshort_l (ipy) = 0.0 + cgrid%fmean_rlong_l (ipy) = 0.0 + cgrid%fmean_sensible_lc (ipy) = 0.0 + cgrid%fmean_vapor_lc (ipy) = 0.0 + cgrid%fmean_transp (ipy) = 0.0 + cgrid%fmean_intercepted_al (ipy) = 0.0 + cgrid%fmean_wshed_lg (ipy) = 0.0 + cgrid%fmean_rshort_w (ipy) = 0.0 + cgrid%fmean_rlong_w (ipy) = 0.0 + cgrid%fmean_sensible_wc (ipy) = 0.0 + cgrid%fmean_vapor_wc (ipy) = 0.0 + cgrid%fmean_intercepted_aw (ipy) = 0.0 + cgrid%fmean_wshed_wg (ipy) = 0.0 + cgrid%fmean_rh (ipy) = 0.0 + cgrid%fmean_cwd_rh (ipy) = 0.0 + cgrid%fmean_nep (ipy) = 0.0 + cgrid%fmean_rk4step (ipy) = 0.0 + cgrid%fmean_available_water (ipy) = 0.0 + cgrid%fmean_can_theiv (ipy) = 0.0 + cgrid%fmean_can_theta (ipy) = 0.0 + cgrid%fmean_can_vpdef (ipy) = 0.0 + cgrid%fmean_can_temp (ipy) = 0.0 + cgrid%fmean_can_shv (ipy) = 0.0 + cgrid%fmean_can_co2 (ipy) = 0.0 + cgrid%fmean_can_rhos (ipy) = 0.0 + cgrid%fmean_can_prss (ipy) = 0.0 + cgrid%fmean_gnd_temp (ipy) = 0.0 + cgrid%fmean_gnd_shv (ipy) = 0.0 + cgrid%fmean_can_ggnd (ipy) = 0.0 + cgrid%fmean_sfcw_depth (ipy) = 0.0 + cgrid%fmean_sfcw_energy (ipy) = 0.0 + cgrid%fmean_sfcw_mass (ipy) = 0.0 + cgrid%fmean_sfcw_temp (ipy) = 0.0 + cgrid%fmean_sfcw_fliq (ipy) = 0.0 + cgrid%fmean_rshort_gnd (ipy) = 0.0 + cgrid%fmean_par_gnd (ipy) = 0.0 + cgrid%fmean_rlong_gnd (ipy) = 0.0 + cgrid%fmean_rlongup (ipy) = 0.0 + cgrid%fmean_parup (ipy) = 0.0 + cgrid%fmean_nirup (ipy) = 0.0 + cgrid%fmean_rshortup (ipy) = 0.0 + cgrid%fmean_rnet (ipy) = 0.0 + cgrid%fmean_albedo (ipy) = 0.0 + cgrid%fmean_albedo_beam (ipy) = 0.0 + cgrid%fmean_albedo_diff (ipy) = 0.0 + cgrid%fmean_rlong_albedo (ipy) = 0.0 + cgrid%fmean_ustar (ipy) = 0.0 + cgrid%fmean_tstar (ipy) = 0.0 + cgrid%fmean_qstar (ipy) = 0.0 + cgrid%fmean_cstar (ipy) = 0.0 + cgrid%fmean_carbon_ac (ipy) = 0.0 + cgrid%fmean_carbon_st (ipy) = 0.0 + cgrid%fmean_vapor_gc (ipy) = 0.0 + cgrid%fmean_vapor_ac (ipy) = 0.0 + cgrid%fmean_throughfall (ipy) = 0.0 + cgrid%fmean_runoff (ipy) = 0.0 + cgrid%fmean_drainage (ipy) = 0.0 + cgrid%fmean_sensible_gc (ipy) = 0.0 + cgrid%fmean_sensible_ac (ipy) = 0.0 + cgrid%fmean_qthroughfall (ipy) = 0.0 + cgrid%fmean_qrunoff (ipy) = 0.0 + cgrid%fmean_qdrainage (ipy) = 0.0 + cgrid%fmean_atm_theiv (ipy) = 0.0 + cgrid%fmean_atm_theta (ipy) = 0.0 + cgrid%fmean_atm_temp (ipy) = 0.0 + cgrid%fmean_atm_vpdef (ipy) = 0.0 + cgrid%fmean_atm_shv (ipy) = 0.0 + cgrid%fmean_atm_rshort (ipy) = 0.0 + cgrid%fmean_atm_rshort_diff (ipy) = 0.0 + cgrid%fmean_atm_par (ipy) = 0.0 + cgrid%fmean_atm_par_diff (ipy) = 0.0 + cgrid%fmean_atm_rlong (ipy) = 0.0 + cgrid%fmean_atm_vels (ipy) = 0.0 + cgrid%fmean_atm_rhos (ipy) = 0.0 + cgrid%fmean_atm_prss (ipy) = 0.0 + cgrid%fmean_atm_co2 (ipy) = 0.0 + cgrid%fmean_pcpg (ipy) = 0.0 + cgrid%fmean_qpcpg (ipy) = 0.0 + cgrid%fmean_dpcpg (ipy) = 0.0 + cgrid%fmean_soil_wetness (ipy) = 0.0 + cgrid%fmean_skin_temp (ipy) = 0.0 + cgrid%fmean_soil_energy (:,ipy) = 0.0 + cgrid%fmean_soil_mstpot (:,ipy) = 0.0 + cgrid%fmean_soil_water (:,ipy) = 0.0 + cgrid%fmean_soil_temp (:,ipy) = 0.0 + cgrid%fmean_soil_fliq (:,ipy) = 0.0 + cgrid%fmean_smoist_gg (:,ipy) = 0.0 + cgrid%fmean_transloss (:,ipy) = 0.0 + cgrid%fmean_sensible_gg (:,ipy) = 0.0 + !------------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------------! + ! Daily means. ! + !------------------------------------------------------------------------------------! + if (writing_long) then + cgrid%dmean_nppleaf (ipy) = 0.0 + cgrid%dmean_nppfroot (ipy) = 0.0 + cgrid%dmean_nppsapwood (ipy) = 0.0 + cgrid%dmean_nppcroot (ipy) = 0.0 + cgrid%dmean_nppseeds (ipy) = 0.0 + cgrid%dmean_nppwood (ipy) = 0.0 + cgrid%dmean_nppdaily (ipy) = 0.0 + cgrid%dmean_A_decomp (ipy) = 0.0 + cgrid%dmean_Af_decomp (ipy) = 0.0 + cgrid%dmean_co2_residual (ipy) = 0.0 + cgrid%dmean_energy_residual (ipy) = 0.0 + cgrid%dmean_water_residual (ipy) = 0.0 + cgrid%dmean_gpp (ipy) = 0.0 + cgrid%dmean_npp (ipy) = 0.0 + cgrid%dmean_leaf_resp (ipy) = 0.0 + cgrid%dmean_root_resp (ipy) = 0.0 + cgrid%dmean_growth_resp (ipy) = 0.0 + cgrid%dmean_storage_resp (ipy) = 0.0 + cgrid%dmean_vleaf_resp (ipy) = 0.0 + cgrid%dmean_plresp (ipy) = 0.0 + cgrid%dmean_leaf_energy (ipy) = 0.0 + cgrid%dmean_leaf_water (ipy) = 0.0 + cgrid%dmean_leaf_hcap (ipy) = 0.0 + cgrid%dmean_leaf_vpdef (ipy) = 0.0 + cgrid%dmean_leaf_temp (ipy) = 0.0 + cgrid%dmean_leaf_fliq (ipy) = 0.0 + cgrid%dmean_leaf_gsw (ipy) = 0.0 + cgrid%dmean_leaf_gbw (ipy) = 0.0 + cgrid%dmean_wood_energy (ipy) = 0.0 + cgrid%dmean_wood_water (ipy) = 0.0 + cgrid%dmean_wood_hcap (ipy) = 0.0 + cgrid%dmean_wood_temp (ipy) = 0.0 + cgrid%dmean_wood_fliq (ipy) = 0.0 + cgrid%dmean_wood_gbw (ipy) = 0.0 + cgrid%dmean_fs_open (ipy) = 0.0 + cgrid%dmean_fsw (ipy) = 0.0 + cgrid%dmean_fsn (ipy) = 0.0 + cgrid%dmean_psi_open (ipy) = 0.0 + cgrid%dmean_psi_closed (ipy) = 0.0 + cgrid%dmean_water_supply (ipy) = 0.0 + cgrid%dmean_par_l (ipy) = 0.0 + cgrid%dmean_par_l_beam (ipy) = 0.0 + cgrid%dmean_par_l_diff (ipy) = 0.0 + cgrid%dmean_rshort_l (ipy) = 0.0 + cgrid%dmean_rlong_l (ipy) = 0.0 + cgrid%dmean_sensible_lc (ipy) = 0.0 + cgrid%dmean_vapor_lc (ipy) = 0.0 + cgrid%dmean_transp (ipy) = 0.0 + cgrid%dmean_intercepted_al (ipy) = 0.0 + cgrid%dmean_wshed_lg (ipy) = 0.0 + cgrid%dmean_rshort_w (ipy) = 0.0 + cgrid%dmean_rlong_w (ipy) = 0.0 + cgrid%dmean_sensible_wc (ipy) = 0.0 + cgrid%dmean_vapor_wc (ipy) = 0.0 + cgrid%dmean_intercepted_aw (ipy) = 0.0 + cgrid%dmean_wshed_wg (ipy) = 0.0 + cgrid%dmean_rh (ipy) = 0.0 + cgrid%dmean_cwd_rh (ipy) = 0.0 + cgrid%dmean_nep (ipy) = 0.0 + cgrid%dmean_rk4step (ipy) = 0.0 + cgrid%dmean_available_water (ipy) = 0.0 + cgrid%dmean_can_theiv (ipy) = 0.0 + cgrid%dmean_can_theta (ipy) = 0.0 + cgrid%dmean_can_vpdef (ipy) = 0.0 + cgrid%dmean_can_temp (ipy) = 0.0 + cgrid%dmean_can_shv (ipy) = 0.0 + cgrid%dmean_can_co2 (ipy) = 0.0 + cgrid%dmean_can_rhos (ipy) = 0.0 + cgrid%dmean_can_prss (ipy) = 0.0 + cgrid%dmean_gnd_temp (ipy) = 0.0 + cgrid%dmean_gnd_shv (ipy) = 0.0 + cgrid%dmean_can_ggnd (ipy) = 0.0 + cgrid%dmean_sfcw_depth (ipy) = 0.0 + cgrid%dmean_sfcw_energy (ipy) = 0.0 + cgrid%dmean_sfcw_mass (ipy) = 0.0 + cgrid%dmean_sfcw_temp (ipy) = 0.0 + cgrid%dmean_sfcw_fliq (ipy) = 0.0 + cgrid%dmean_rshort_gnd (ipy) = 0.0 + cgrid%dmean_par_gnd (ipy) = 0.0 + cgrid%dmean_rlong_gnd (ipy) = 0.0 + cgrid%dmean_rlongup (ipy) = 0.0 + cgrid%dmean_parup (ipy) = 0.0 + cgrid%dmean_nirup (ipy) = 0.0 + cgrid%dmean_rshortup (ipy) = 0.0 + cgrid%dmean_rnet (ipy) = 0.0 + cgrid%dmean_albedo (ipy) = 0.0 + cgrid%dmean_albedo_beam (ipy) = 0.0 + cgrid%dmean_albedo_diff (ipy) = 0.0 + cgrid%dmean_rlong_albedo (ipy) = 0.0 + cgrid%dmean_ustar (ipy) = 0.0 + cgrid%dmean_tstar (ipy) = 0.0 + cgrid%dmean_qstar (ipy) = 0.0 + cgrid%dmean_cstar (ipy) = 0.0 + cgrid%dmean_carbon_ac (ipy) = 0.0 + cgrid%dmean_carbon_st (ipy) = 0.0 + cgrid%dmean_vapor_gc (ipy) = 0.0 + cgrid%dmean_vapor_ac (ipy) = 0.0 + cgrid%dmean_throughfall (ipy) = 0.0 + cgrid%dmean_runoff (ipy) = 0.0 + cgrid%dmean_drainage (ipy) = 0.0 + cgrid%dmean_sensible_gc (ipy) = 0.0 + cgrid%dmean_sensible_ac (ipy) = 0.0 + cgrid%dmean_qthroughfall (ipy) = 0.0 + cgrid%dmean_qrunoff (ipy) = 0.0 + cgrid%dmean_qdrainage (ipy) = 0.0 + cgrid%dmean_atm_theiv (ipy) = 0.0 + cgrid%dmean_atm_theta (ipy) = 0.0 + cgrid%dmean_atm_temp (ipy) = 0.0 + cgrid%dmean_atm_vpdef (ipy) = 0.0 + cgrid%dmean_atm_shv (ipy) = 0.0 + cgrid%dmean_atm_rshort (ipy) = 0.0 + cgrid%dmean_atm_rshort_diff (ipy) = 0.0 + cgrid%dmean_atm_par (ipy) = 0.0 + cgrid%dmean_atm_par_diff (ipy) = 0.0 + cgrid%dmean_atm_rlong (ipy) = 0.0 + cgrid%dmean_atm_vels (ipy) = 0.0 + cgrid%dmean_atm_rhos (ipy) = 0.0 + cgrid%dmean_atm_prss (ipy) = 0.0 + cgrid%dmean_atm_co2 (ipy) = 0.0 + cgrid%dmean_pcpg (ipy) = 0.0 + cgrid%dmean_qpcpg (ipy) = 0.0 + cgrid%dmean_dpcpg (ipy) = 0.0 + cgrid%dmean_soil_energy (:,ipy) = 0.0 + cgrid%dmean_soil_mstpot (:,ipy) = 0.0 + cgrid%dmean_soil_water (:,ipy) = 0.0 + cgrid%dmean_soil_temp (:,ipy) = 0.0 + cgrid%dmean_soil_fliq (:,ipy) = 0.0 + cgrid%dmean_smoist_gg (:,ipy) = 0.0 + cgrid%dmean_transloss (:,ipy) = 0.0 + cgrid%dmean_sensible_gg (:,ipy) = 0.0 + end if + !------------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------------! + ! Monthly means. ! + !------------------------------------------------------------------------------------! + if (writing_eorq) then + cgrid%mmean_gpp (ipy) = 0.0 + cgrid%mmean_npp (ipy) = 0.0 + cgrid%mmean_leaf_resp (ipy) = 0.0 + cgrid%mmean_root_resp (ipy) = 0.0 + cgrid%mmean_growth_resp (ipy) = 0.0 + cgrid%mmean_storage_resp (ipy) = 0.0 + cgrid%mmean_vleaf_resp (ipy) = 0.0 + cgrid%mmean_plresp (ipy) = 0.0 + cgrid%mmean_leaf_energy (ipy) = 0.0 + cgrid%mmean_leaf_water (ipy) = 0.0 + cgrid%mmean_leaf_hcap (ipy) = 0.0 + cgrid%mmean_leaf_vpdef (ipy) = 0.0 + cgrid%mmean_leaf_temp (ipy) = 0.0 + cgrid%mmean_leaf_fliq (ipy) = 0.0 + cgrid%mmean_leaf_gsw (ipy) = 0.0 + cgrid%mmean_leaf_gbw (ipy) = 0.0 + cgrid%mmean_wood_energy (ipy) = 0.0 + cgrid%mmean_wood_water (ipy) = 0.0 + cgrid%mmean_wood_hcap (ipy) = 0.0 + cgrid%mmean_wood_temp (ipy) = 0.0 + cgrid%mmean_wood_fliq (ipy) = 0.0 + cgrid%mmean_wood_gbw (ipy) = 0.0 + cgrid%mmean_fs_open (ipy) = 0.0 + cgrid%mmean_fsw (ipy) = 0.0 + cgrid%mmean_fsn (ipy) = 0.0 + cgrid%mmean_psi_open (ipy) = 0.0 + cgrid%mmean_psi_closed (ipy) = 0.0 + cgrid%mmean_water_supply (ipy) = 0.0 + cgrid%mmean_par_l (ipy) = 0.0 + cgrid%mmean_par_l_beam (ipy) = 0.0 + cgrid%mmean_par_l_diff (ipy) = 0.0 + cgrid%mmean_rshort_l (ipy) = 0.0 + cgrid%mmean_rlong_l (ipy) = 0.0 + cgrid%mmean_sensible_lc (ipy) = 0.0 + cgrid%mmean_vapor_lc (ipy) = 0.0 + cgrid%mmean_transp (ipy) = 0.0 + cgrid%mmean_intercepted_al (ipy) = 0.0 + cgrid%mmean_wshed_lg (ipy) = 0.0 + cgrid%mmean_rshort_w (ipy) = 0.0 + cgrid%mmean_rlong_w (ipy) = 0.0 + cgrid%mmean_sensible_wc (ipy) = 0.0 + cgrid%mmean_vapor_wc (ipy) = 0.0 + cgrid%mmean_intercepted_aw (ipy) = 0.0 + cgrid%mmean_wshed_wg (ipy) = 0.0 + cgrid%mmean_rh (ipy) = 0.0 + cgrid%mmean_cwd_rh (ipy) = 0.0 + cgrid%mmean_nep (ipy) = 0.0 + cgrid%mmean_rk4step (ipy) = 0.0 + cgrid%mmean_available_water (ipy) = 0.0 + cgrid%mmean_can_theiv (ipy) = 0.0 + cgrid%mmean_can_theta (ipy) = 0.0 + cgrid%mmean_can_vpdef (ipy) = 0.0 + cgrid%mmean_can_temp (ipy) = 0.0 + cgrid%mmean_can_shv (ipy) = 0.0 + cgrid%mmean_can_co2 (ipy) = 0.0 + cgrid%mmean_can_rhos (ipy) = 0.0 + cgrid%mmean_can_prss (ipy) = 0.0 + cgrid%mmean_gnd_temp (ipy) = 0.0 + cgrid%mmean_gnd_shv (ipy) = 0.0 + cgrid%mmean_can_ggnd (ipy) = 0.0 + cgrid%mmean_sfcw_depth (ipy) = 0.0 + cgrid%mmean_sfcw_energy (ipy) = 0.0 + cgrid%mmean_sfcw_mass (ipy) = 0.0 + cgrid%mmean_sfcw_temp (ipy) = 0.0 + cgrid%mmean_sfcw_fliq (ipy) = 0.0 + cgrid%mmean_rshort_gnd (ipy) = 0.0 + cgrid%mmean_par_gnd (ipy) = 0.0 + cgrid%mmean_rlong_gnd (ipy) = 0.0 + cgrid%mmean_rlongup (ipy) = 0.0 + cgrid%mmean_parup (ipy) = 0.0 + cgrid%mmean_nirup (ipy) = 0.0 + cgrid%mmean_rshortup (ipy) = 0.0 + cgrid%mmean_rnet (ipy) = 0.0 + cgrid%mmean_albedo (ipy) = 0.0 + cgrid%mmean_albedo_beam (ipy) = 0.0 + cgrid%mmean_albedo_diff (ipy) = 0.0 + cgrid%mmean_rlong_albedo (ipy) = 0.0 + cgrid%mmean_ustar (ipy) = 0.0 + cgrid%mmean_tstar (ipy) = 0.0 + cgrid%mmean_qstar (ipy) = 0.0 + cgrid%mmean_cstar (ipy) = 0.0 + cgrid%mmean_carbon_ac (ipy) = 0.0 + cgrid%mmean_carbon_st (ipy) = 0.0 + cgrid%mmean_vapor_gc (ipy) = 0.0 + cgrid%mmean_vapor_ac (ipy) = 0.0 + cgrid%mmean_throughfall (ipy) = 0.0 + cgrid%mmean_runoff (ipy) = 0.0 + cgrid%mmean_drainage (ipy) = 0.0 + cgrid%mmean_sensible_gc (ipy) = 0.0 + cgrid%mmean_sensible_ac (ipy) = 0.0 + cgrid%mmean_qthroughfall (ipy) = 0.0 + cgrid%mmean_qrunoff (ipy) = 0.0 + cgrid%mmean_qdrainage (ipy) = 0.0 + cgrid%mmean_soil_energy (:,ipy) = 0.0 + cgrid%mmean_soil_mstpot (:,ipy) = 0.0 + cgrid%mmean_soil_water (:,ipy) = 0.0 + cgrid%mmean_soil_temp (:,ipy) = 0.0 + cgrid%mmean_soil_fliq (:,ipy) = 0.0 + cgrid%mmean_smoist_gg (:,ipy) = 0.0 + cgrid%mmean_transloss (:,ipy) = 0.0 + cgrid%mmean_sensible_gg (:,ipy) = 0.0 + cgrid%mmean_lai (:,:,ipy) = 0.0 + cgrid%mmean_bleaf (:,:,ipy) = 0.0 + cgrid%mmean_broot (:,:,ipy) = 0.0 + cgrid%mmean_bstorage (:,:,ipy) = 0.0 + cgrid%mmean_bleaf_n (:,:,ipy) = 0.0 + cgrid%mmean_broot_n (:,:,ipy) = 0.0 + cgrid%mmean_bstorage_n (:,:,ipy) = 0.0 + cgrid%mmean_leaf_maintenance (:,:,ipy) = 0.0 + cgrid%mmean_root_maintenance (:,:,ipy) = 0.0 + cgrid%mmean_leaf_drop (:,:,ipy) = 0.0 + cgrid%mmean_fast_soil_c (ipy) = 0.0 + cgrid%mmean_slow_soil_c (ipy) = 0.0 + cgrid%mmean_struct_soil_c (ipy) = 0.0 + cgrid%mmean_struct_soil_l (ipy) = 0.0 + cgrid%mmean_cwd_c (ipy) = 0.0 + cgrid%mmean_fast_soil_n (ipy) = 0.0 + cgrid%mmean_mineral_soil_n (ipy) = 0.0 + cgrid%mmean_cwd_n (ipy) = 0.0 + cgrid%mmean_nppleaf (ipy) = 0.0 + cgrid%mmean_nppfroot (ipy) = 0.0 + cgrid%mmean_nppsapwood (ipy) = 0.0 + cgrid%mmean_nppcroot (ipy) = 0.0 + cgrid%mmean_nppseeds (ipy) = 0.0 + cgrid%mmean_nppwood (ipy) = 0.0 + cgrid%mmean_nppdaily (ipy) = 0.0 + cgrid%mmean_A_decomp (ipy) = 0.0 + cgrid%mmean_Af_decomp (ipy) = 0.0 + cgrid%mmean_co2_residual (ipy) = 0.0 + cgrid%mmean_energy_residual (ipy) = 0.0 + cgrid%mmean_water_residual (ipy) = 0.0 + cgrid%mmean_atm_theiv (ipy) = 0.0 + cgrid%mmean_atm_theta (ipy) = 0.0 + cgrid%mmean_atm_temp (ipy) = 0.0 + cgrid%mmean_atm_vpdef (ipy) = 0.0 + cgrid%mmean_atm_shv (ipy) = 0.0 + cgrid%mmean_atm_rshort (ipy) = 0.0 + cgrid%mmean_atm_rshort_diff (ipy) = 0.0 + cgrid%mmean_atm_par (ipy) = 0.0 + cgrid%mmean_atm_par_diff (ipy) = 0.0 + cgrid%mmean_atm_rlong (ipy) = 0.0 + cgrid%mmean_atm_vels (ipy) = 0.0 + cgrid%mmean_atm_rhos (ipy) = 0.0 + cgrid%mmean_atm_prss (ipy) = 0.0 + cgrid%mmean_atm_co2 (ipy) = 0.0 + cgrid%mmean_pcpg (ipy) = 0.0 + cgrid%mmean_qpcpg (ipy) = 0.0 + cgrid%mmean_dpcpg (ipy) = 0.0 + cgrid%mmsqu_gpp (ipy) = 0.0 + cgrid%mmsqu_npp (ipy) = 0.0 + cgrid%mmsqu_plresp (ipy) = 0.0 + cgrid%mmsqu_sensible_lc (ipy) = 0.0 + cgrid%mmsqu_vapor_lc (ipy) = 0.0 + cgrid%mmsqu_transp (ipy) = 0.0 + cgrid%mmsqu_sensible_wc (ipy) = 0.0 + cgrid%mmsqu_vapor_wc (ipy) = 0.0 + cgrid%mmsqu_rh (ipy) = 0.0 + cgrid%mmsqu_cwd_rh (ipy) = 0.0 + cgrid%mmsqu_nep (ipy) = 0.0 + cgrid%mmsqu_rlongup (ipy) = 0.0 + cgrid%mmsqu_parup (ipy) = 0.0 + cgrid%mmsqu_nirup (ipy) = 0.0 + cgrid%mmsqu_rshortup (ipy) = 0.0 + cgrid%mmsqu_rnet (ipy) = 0.0 + cgrid%mmsqu_albedo (ipy) = 0.0 + cgrid%mmsqu_ustar (ipy) = 0.0 + cgrid%mmsqu_carbon_ac (ipy) = 0.0 + cgrid%mmsqu_carbon_st (ipy) = 0.0 + cgrid%mmsqu_vapor_gc (ipy) = 0.0 + cgrid%mmsqu_vapor_ac (ipy) = 0.0 + cgrid%mmsqu_sensible_gc (ipy) = 0.0 + cgrid%mmsqu_sensible_ac (ipy) = 0.0 + end if + !------------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------------! + ! Mean diel. ! + !------------------------------------------------------------------------------------! + if (writing_dcyc) then + cgrid%qmean_gpp (:,ipy) = 0.0 + cgrid%qmean_npp (:,ipy) = 0.0 + cgrid%qmean_leaf_resp (:,ipy) = 0.0 + cgrid%qmean_root_resp (:,ipy) = 0.0 + cgrid%qmean_growth_resp (:,ipy) = 0.0 + cgrid%qmean_storage_resp (:,ipy) = 0.0 + cgrid%qmean_vleaf_resp (:,ipy) = 0.0 + cgrid%qmean_plresp (:,ipy) = 0.0 + cgrid%qmean_leaf_energy (:,ipy) = 0.0 + cgrid%qmean_leaf_water (:,ipy) = 0.0 + cgrid%qmean_leaf_hcap (:,ipy) = 0.0 + cgrid%qmean_leaf_vpdef (:,ipy) = 0.0 + cgrid%qmean_leaf_temp (:,ipy) = 0.0 + cgrid%qmean_leaf_fliq (:,ipy) = 0.0 + cgrid%qmean_leaf_gsw (:,ipy) = 0.0 + cgrid%qmean_leaf_gbw (:,ipy) = 0.0 + cgrid%qmean_wood_energy (:,ipy) = 0.0 + cgrid%qmean_wood_water (:,ipy) = 0.0 + cgrid%qmean_wood_hcap (:,ipy) = 0.0 + cgrid%qmean_wood_temp (:,ipy) = 0.0 + cgrid%qmean_wood_fliq (:,ipy) = 0.0 + cgrid%qmean_wood_gbw (:,ipy) = 0.0 + cgrid%qmean_fs_open (:,ipy) = 0.0 + cgrid%qmean_fsw (:,ipy) = 0.0 + cgrid%qmean_fsn (:,ipy) = 0.0 + cgrid%qmean_psi_open (:,ipy) = 0.0 + cgrid%qmean_psi_closed (:,ipy) = 0.0 + cgrid%qmean_water_supply (:,ipy) = 0.0 + cgrid%qmean_par_l (:,ipy) = 0.0 + cgrid%qmean_par_l_beam (:,ipy) = 0.0 + cgrid%qmean_par_l_diff (:,ipy) = 0.0 + cgrid%qmean_rshort_l (:,ipy) = 0.0 + cgrid%qmean_rlong_l (:,ipy) = 0.0 + cgrid%qmean_sensible_lc (:,ipy) = 0.0 + cgrid%qmean_vapor_lc (:,ipy) = 0.0 + cgrid%qmean_transp (:,ipy) = 0.0 + cgrid%qmean_intercepted_al (:,ipy) = 0.0 + cgrid%qmean_wshed_lg (:,ipy) = 0.0 + cgrid%qmean_rshort_w (:,ipy) = 0.0 + cgrid%qmean_rlong_w (:,ipy) = 0.0 + cgrid%qmean_sensible_wc (:,ipy) = 0.0 + cgrid%qmean_vapor_wc (:,ipy) = 0.0 + cgrid%qmean_intercepted_aw (:,ipy) = 0.0 + cgrid%qmean_wshed_wg (:,ipy) = 0.0 + cgrid%qmean_rh (:,ipy) = 0.0 + cgrid%qmean_cwd_rh (:,ipy) = 0.0 + cgrid%qmean_nep (:,ipy) = 0.0 + cgrid%qmean_rk4step (:,ipy) = 0.0 + cgrid%qmean_available_water (:,ipy) = 0.0 + cgrid%qmean_can_theiv (:,ipy) = 0.0 + cgrid%qmean_can_theta (:,ipy) = 0.0 + cgrid%qmean_can_vpdef (:,ipy) = 0.0 + cgrid%qmean_can_temp (:,ipy) = 0.0 + cgrid%qmean_can_shv (:,ipy) = 0.0 + cgrid%qmean_can_co2 (:,ipy) = 0.0 + cgrid%qmean_can_rhos (:,ipy) = 0.0 + cgrid%qmean_can_prss (:,ipy) = 0.0 + cgrid%qmean_gnd_temp (:,ipy) = 0.0 + cgrid%qmean_gnd_shv (:,ipy) = 0.0 + cgrid%qmean_can_ggnd (:,ipy) = 0.0 + cgrid%qmean_sfcw_depth (:,ipy) = 0.0 + cgrid%qmean_sfcw_energy (:,ipy) = 0.0 + cgrid%qmean_sfcw_mass (:,ipy) = 0.0 + cgrid%qmean_sfcw_temp (:,ipy) = 0.0 + cgrid%qmean_sfcw_fliq (:,ipy) = 0.0 + cgrid%qmean_rshort_gnd (:,ipy) = 0.0 + cgrid%qmean_par_gnd (:,ipy) = 0.0 + cgrid%qmean_rlong_gnd (:,ipy) = 0.0 + cgrid%qmean_rlongup (:,ipy) = 0.0 + cgrid%qmean_parup (:,ipy) = 0.0 + cgrid%qmean_nirup (:,ipy) = 0.0 + cgrid%qmean_rshortup (:,ipy) = 0.0 + cgrid%qmean_rnet (:,ipy) = 0.0 + cgrid%qmean_albedo (:,ipy) = 0.0 + cgrid%qmean_albedo_beam (:,ipy) = 0.0 + cgrid%qmean_albedo_diff (:,ipy) = 0.0 + cgrid%qmean_rlong_albedo (:,ipy) = 0.0 + cgrid%qmean_ustar (:,ipy) = 0.0 + cgrid%qmean_tstar (:,ipy) = 0.0 + cgrid%qmean_qstar (:,ipy) = 0.0 + cgrid%qmean_cstar (:,ipy) = 0.0 + cgrid%qmean_carbon_ac (:,ipy) = 0.0 + cgrid%qmean_carbon_st (:,ipy) = 0.0 + cgrid%qmean_vapor_gc (:,ipy) = 0.0 + cgrid%qmean_vapor_ac (:,ipy) = 0.0 + cgrid%qmean_throughfall (:,ipy) = 0.0 + cgrid%qmean_runoff (:,ipy) = 0.0 + cgrid%qmean_drainage (:,ipy) = 0.0 + cgrid%qmean_sensible_gc (:,ipy) = 0.0 + cgrid%qmean_sensible_ac (:,ipy) = 0.0 + cgrid%qmean_qthroughfall (:,ipy) = 0.0 + cgrid%qmean_qrunoff (:,ipy) = 0.0 + cgrid%qmean_qdrainage (:,ipy) = 0.0 + cgrid%qmean_soil_energy (:,:,ipy) = 0.0 + cgrid%qmean_soil_mstpot (:,:,ipy) = 0.0 + cgrid%qmean_soil_water (:,:,ipy) = 0.0 + cgrid%qmean_soil_temp (:,:,ipy) = 0.0 + cgrid%qmean_soil_fliq (:,:,ipy) = 0.0 + cgrid%qmean_smoist_gg (:,:,ipy) = 0.0 + cgrid%qmean_transloss (:,:,ipy) = 0.0 + cgrid%qmean_sensible_gg (:,:,ipy) = 0.0 + cgrid%qmean_atm_theiv (:,ipy) = 0.0 + cgrid%qmean_atm_theta (:,ipy) = 0.0 + cgrid%qmean_atm_temp (:,ipy) = 0.0 + cgrid%qmean_atm_vpdef (:,ipy) = 0.0 + cgrid%qmean_atm_shv (:,ipy) = 0.0 + cgrid%qmean_atm_rshort (:,ipy) = 0.0 + cgrid%qmean_atm_rshort_diff (:,ipy) = 0.0 + cgrid%qmean_atm_par (:,ipy) = 0.0 + cgrid%qmean_atm_par_diff (:,ipy) = 0.0 + cgrid%qmean_atm_rlong (:,ipy) = 0.0 + cgrid%qmean_atm_vels (:,ipy) = 0.0 + cgrid%qmean_atm_rhos (:,ipy) = 0.0 + cgrid%qmean_atm_prss (:,ipy) = 0.0 + cgrid%qmean_atm_co2 (:,ipy) = 0.0 + cgrid%qmean_pcpg (:,ipy) = 0.0 + cgrid%qmean_qpcpg (:,ipy) = 0.0 + cgrid%qmean_dpcpg (:,ipy) = 0.0 + cgrid%qmsqu_gpp (:,ipy) = 0.0 + cgrid%qmsqu_npp (:,ipy) = 0.0 + cgrid%qmsqu_plresp (:,ipy) = 0.0 + cgrid%qmsqu_sensible_lc (:,ipy) = 0.0 + cgrid%qmsqu_vapor_lc (:,ipy) = 0.0 + cgrid%qmsqu_transp (:,ipy) = 0.0 + cgrid%qmsqu_sensible_wc (:,ipy) = 0.0 + cgrid%qmsqu_vapor_wc (:,ipy) = 0.0 + cgrid%qmsqu_rh (:,ipy) = 0.0 + cgrid%qmsqu_cwd_rh (:,ipy) = 0.0 + cgrid%qmsqu_nep (:,ipy) = 0.0 + cgrid%qmsqu_rlongup (:,ipy) = 0.0 + cgrid%qmsqu_parup (:,ipy) = 0.0 + cgrid%qmsqu_nirup (:,ipy) = 0.0 + cgrid%qmsqu_rshortup (:,ipy) = 0.0 + cgrid%qmsqu_rnet (:,ipy) = 0.0 + cgrid%qmsqu_albedo (:,ipy) = 0.0 + cgrid%qmsqu_ustar (:,ipy) = 0.0 + cgrid%qmsqu_carbon_ac (:,ipy) = 0.0 + cgrid%qmsqu_carbon_st (:,ipy) = 0.0 + cgrid%qmsqu_vapor_gc (:,ipy) = 0.0 + cgrid%qmsqu_vapor_ac (:,ipy) = 0.0 + cgrid%qmsqu_sensible_gc (:,ipy) = 0.0 + cgrid%qmsqu_sensible_ac (:,ipy) = 0.0 + end if + !------------------------------------------------------------------------------------! end do + !---------------------------------------------------------------------------------------! return end subroutine init_ed_poly_vars @@ -921,7 +2010,8 @@ subroutine new_patch_sfc_props(csite,ipa,mzg,mzs,ntext_soil) , patchtype ! ! structure use soil_coms , only : soil & ! intent(in), look-up table , slz & ! intent(in) - , tiny_sfcwater_mass ! ! intent(in) + , tiny_sfcwater_mass & ! intent(in) + , matric_potential ! ! intent(in) use consts_coms , only : wdns ! ! intent(in) use therm_lib , only : uextcm2tl & ! subroutine , uint2tl ! ! subroutine @@ -939,12 +2029,17 @@ subroutine new_patch_sfc_props(csite,ipa,mzg,mzs,ntext_soil) integer :: ico ! Cohort counter integer :: nsoil ! Alias for soil texture class !---------------------------------------------------------------------------------------! - - !----- Finding soil temperature and liquid water fraction. -----------------------------! + + + + !---------------------------------------------------------------------------------------! + ! Find soil temperature and liquid water fraction, and soil matric potential. ! + !---------------------------------------------------------------------------------------! do k = 1, mzg nsoil = ntext_soil(k) call uextcm2tl(csite%soil_energy(k,ipa), csite%soil_water(k,ipa)*wdns & ,soil(nsoil)%slcpd, csite%soil_tempk(k,ipa), csite%soil_fracliq(k,ipa)) + csite%soil_mstpot(k,ipa) = matric_potential(nsoil,csite%soil_water(k,ipa)) end do !---------------------------------------------------------------------------------------! diff --git a/ED/src/init/init_hydro_sites.f90 b/ED/src/init/init_hydro_sites.f90 index 9580fed00..7cb38db45 100644 --- a/ED/src/init/init_hydro_sites.f90 +++ b/ED/src/init/init_hydro_sites.f90 @@ -71,17 +71,10 @@ subroutine read_site_file(cgrid,igr) ! the swap polygon call allocate_polygontype(cpoly,1) + call soil_default_fill(cgrid,igr,ipy) - cpoly%lsl(1) = cgrid%lsl(ipy) ! Initialize lowest soil layer cpoly%area(1) = 1.0 ! Initialize the area to all - ! Copy the soils information from the polygon to the site - do k=1,nzg - cpoly%ntext_soil(k,1) = cgrid%ntext_soil(k,ipy) - enddo - - cpoly%ncol_soil(1) = cgrid%ncol_soil(ipy) - ! Set soil moisture decay function, based on second layer's K value ! use the second layer instead of the top in case top is organic/peat sc = cpoly%ntext_soil(nzg-1,1) @@ -115,6 +108,7 @@ subroutine read_site_file(cgrid,igr) ! print*,"reading",nsites,"sites using file format",fformat call allocate_polygontype(cpoly,nsites) + call soil_default_fill(cgrid,igr,ipy) if(fformat <=0 .or. fformat > 3) then print*,"" @@ -197,16 +191,7 @@ subroutine read_site_file(cgrid,igr) if(ierr == 0) then !/*create data object for each new site */ ! print*,sitenum, area, TCI, elevation,slope,aspect,soilclass(1:nsc) - - cpoly%lsl(isi) = cgrid%lsl(ipy) ! Initialize lowest soil layer cpoly%area(isi) = area ! Initialize the area to all - - ! Copy the soils information from the polygon to the site - do k=1,nzg - cpoly%ntext_soil(k,isi) = cgrid%ntext_soil(k,ipy) - enddo - - cpoly%ncol_soil(isi) = cgrid%ncol_soil(ipy) area_sum = area_sum + dble(area) cpoly%sitenum(isi) = sitenum diff --git a/ED/src/io/average_utils.f90 b/ED/src/io/average_utils.f90 index 4e2cedbae..a5414e8ce 100644 --- a/ED/src/io/average_utils.f90 +++ b/ED/src/io/average_utils.f90 @@ -5,119 +5,95 @@ ! |----------------------------------| ! !==========================================================================================! !==========================================================================================! -! This subroutine increments the time averaged polygon met-forcing variables. These ! -! will be normalized by the output period to give time averages of each quantity. The ! -! polygon level variables are derived from the weighted spatial average from the site ! -! level quantities. ! +! This subroutine increments the time averaged site met-forcing variables. The ! +! polygon-level averages are found after the site-level are normalised. ! !------------------------------------------------------------------------------------------! -subroutine int_met_avg(cgrid) - use ed_state_vars , only : edtype & ! structure - , polygontype & ! structure - , sitetype & ! structure - , patchtype ! ! structure - use ed_misc_coms , only : dtlsm & ! intent(in) - , frqsum ! ! intent(in) +subroutine integrate_ed_fmean_met_vars(cgrid) + use ed_state_vars , only : edtype & ! structure + , polygontype ! ! structure + use met_driver_coms, only : met_driv_state ! ! structure + use ed_misc_coms , only : dtlsm & ! intent(in) + , frqsum ! ! intent(in) implicit none !----- Arguments. ----------------------------------------------------------------------! type(edtype) , target :: cgrid !----- Local variables -----------------------------------------------------------------! - type(polygontype) , pointer :: cpoly - type(sitetype) , pointer :: csite - type(patchtype) , pointer :: cpatch - integer :: ipy,isi,ipa,ico - real :: frqsumi,tfact - real :: polygon_area_i + type(polygontype) , pointer :: cpoly + type(met_driv_state), pointer :: cmet + integer :: ipy + integer :: isi + integer :: ipa + integer :: ico + !----- Locally saved variables. --------------------------------------------------------! + real , save :: dtlsm_o_frqsum = 1.e34 + logical , save :: first_time = .true. !---------------------------------------------------------------------------------------! - !----- Some aliases. -------------------------------------------------------------------! - frqsumi = 1.0 / frqsum - tfact = dtlsm * frqsumi - do ipy = 1,cgrid%npolygons - cpoly => cgrid%polygon(ipy) - polygon_area_i = 1. / sum(cpoly%area) + !----- Assign the constant scaling factor. ---------------------------------------------! + if (first_time) then + first_time = .false. + dtlsm_o_frqsum = dtlsm / frqsum + end if + !---------------------------------------------------------------------------------------! - do isi = 1,cpoly%nsites - !---- Site-level averages. ------------------------------------------------------! - cpoly%avg_atm_tmp (isi) = cpoly%avg_atm_tmp (isi) & - + cpoly%met(isi)%atm_tmp * tfact - cpoly%avg_atm_vpdef(isi) = cpoly%avg_atm_vpdef (isi) & - + cpoly%met(isi)%atm_vpdef * tfact - cpoly%avg_atm_shv (isi) = cpoly%avg_atm_shv (isi) & - + cpoly%met(isi)%atm_shv * tfact - cpoly%avg_atm_prss (isi) = cpoly%avg_atm_prss (isi) & - + cpoly%met(isi)%prss * tfact - - !----- Now the polygon-level averages. -------------------------------------------! - cgrid%avg_atm_tmp(ipy) = cgrid%avg_atm_tmp(ipy) & - + cpoly%met(isi)%atm_tmp * cpoly%area(isi) & - * tfact * polygon_area_i - - cgrid%avg_atm_vpdef(ipy) = cgrid%avg_atm_vpdef(ipy) & - + cpoly%met(isi)%atm_vpdef * cpoly%area(isi) & - * tfact * polygon_area_i - - cgrid%avg_atm_shv(ipy) = cgrid%avg_atm_shv(ipy) & - + cpoly%met(isi)%atm_shv * cpoly%area(isi) & - * tfact * polygon_area_i - - cgrid%avg_rshort(ipy) = cgrid%avg_rshort(ipy) & - + cpoly%met(isi)%rshort * cpoly%area(isi) & - * tfact * polygon_area_i - - cgrid%avg_rshort_diffuse(ipy) = cgrid%avg_rshort_diffuse(ipy) & - + cpoly%met(isi)%rshort_diffuse * cpoly%area(isi) & - * tfact * polygon_area_i - - cgrid%avg_par(ipy) = cgrid%avg_par(ipy) & - + ( cpoly%met(isi)%par_beam & - + cpoly%met(isi)%par_diffuse ) & - * cpoly%area(isi) * tfact * polygon_area_i - - cgrid%avg_par_diffuse(ipy) = cgrid%avg_par_diffuse(ipy) & - + cpoly%met(isi)%par_diffuse * cpoly%area(isi) & - * tfact * polygon_area_i - - cgrid%avg_rlong(ipy) = cgrid%avg_rlong(ipy) & - + cpoly%met(isi)%rlong * cpoly%area(isi) & - * tfact * polygon_area_i - - cgrid%avg_pcpg(ipy) = cgrid%avg_pcpg(ipy) & - + cpoly%met(isi)%pcpg * cpoly%area(isi) & - * tfact * polygon_area_i - - cgrid%avg_qpcpg(ipy) = cgrid%avg_qpcpg(ipy) & - + cpoly%met(isi)%qpcpg * cpoly%area(isi) & - * tfact * polygon_area_i - - cgrid%avg_dpcpg(ipy) = cgrid%avg_dpcpg(ipy) & - + cpoly%met(isi)%dpcpg * cpoly%area(isi) & - * tfact * polygon_area_i - - cgrid%avg_vels(ipy) = cgrid%avg_vels(ipy) & - + cpoly%met(isi)%vels * cpoly%area(isi) & - * tfact * polygon_area_i - - cgrid%avg_atm_prss(ipy) = cgrid%avg_atm_prss(ipy) & - + cpoly%met(isi)%prss * cpoly%area(isi) & - * tfact * polygon_area_i - - cgrid%avg_exner(ipy) = cgrid%avg_exner(ipy) & - + cpoly%met(isi)%exner * cpoly%area(isi) & - * tfact * polygon_area_i - - cgrid%avg_geoht(ipy) = cgrid%avg_geoht(ipy) & - + cpoly%met(isi)%geoht * cpoly%area(isi) & - * tfact * polygon_area_i - - cgrid%avg_atm_co2(ipy) = cgrid%avg_atm_co2(ipy) & - + cpoly%met(isi)%atm_co2 * cpoly%area(isi) & - * tfact * polygon_area_i + polyloop: do ipy = 1,cgrid%npolygons + cpoly => cgrid%polygon(ipy) - end do - end do + siteloop: do isi = 1,cpoly%nsites + cmet => cpoly%met(isi) + + !----- The site-level averages. --------------------------------------------------! + cpoly%fmean_atm_theiv (isi) = cpoly%fmean_atm_theiv (isi) & + + cmet%atm_theiv & + * dtlsm_o_frqsum + cpoly%fmean_atm_theta (isi) = cpoly%fmean_atm_theta (isi) & + + cmet%atm_theta & + * dtlsm_o_frqsum + cpoly%fmean_atm_vpdef (isi) = cpoly%fmean_atm_vpdef (isi) & + + cmet%atm_vpdef & + * dtlsm_o_frqsum + cpoly%fmean_atm_shv (isi) = cpoly%fmean_atm_shv (isi) & + + cmet%atm_shv & + * dtlsm_o_frqsum + cpoly%fmean_atm_rshort (isi) = cpoly%fmean_atm_rshort (isi) & + + cmet%rshort & + * dtlsm_o_frqsum + cpoly%fmean_atm_rshort_diff(isi) = cpoly%fmean_atm_rshort_diff(isi) & + + cmet%rshort_diffuse & + * dtlsm_o_frqsum + cpoly%fmean_atm_par (isi) = cpoly%fmean_atm_par (isi) & + + ( cmet%par_beam + cmet%par_diffuse ) & + * dtlsm_o_frqsum + cpoly%fmean_atm_par_diff (isi) = cpoly%fmean_atm_par_diff (isi) & + + cmet%par_diffuse & + * dtlsm_o_frqsum + cpoly%fmean_atm_rlong (isi) = cpoly%fmean_atm_rlong (isi) & + + cmet%rlong & + * dtlsm_o_frqsum + cpoly%fmean_atm_vels (isi) = cpoly%fmean_atm_vels (isi) & + + cmet%vels & + * dtlsm_o_frqsum + cpoly%fmean_atm_prss (isi) = cpoly%fmean_atm_prss (isi) & + + cmet%prss & + * dtlsm_o_frqsum + cpoly%fmean_atm_co2 (isi) = cpoly%fmean_atm_co2 (isi) & + + cmet%atm_co2 & + * dtlsm_o_frqsum + cpoly%fmean_pcpg (isi) = cpoly%fmean_pcpg (isi) & + + cmet%pcpg & + * dtlsm_o_frqsum + cpoly%fmean_qpcpg (isi) = cpoly%fmean_qpcpg (isi) & + + cmet%qpcpg & + * dtlsm_o_frqsum + cpoly%fmean_dpcpg (isi) = cpoly%fmean_dpcpg (isi) & + + cmet%dpcpg & + * dtlsm_o_frqsum + !---------------------------------------------------------------------------------! + end do siteloop + end do polyloop return -end subroutine int_met_avg +end subroutine integrate_ed_fmean_met_vars !==========================================================================================! !==========================================================================================! @@ -129,22 +105,33 @@ end subroutine int_met_avg !==========================================================================================! !==========================================================================================! ! The following sub-routine scales several variables that are integrated during one ! -! output step (frqsum) to actual rates. ! +! output step (frqsum) to actual rates, and find derived properties. ! !------------------------------------------------------------------------------------------! -subroutine normalize_averaged_vars(cgrid,frqsum,dtlsm) - use grid_coms , only : nzg ! ! intent(in) - use ed_misc_coms , only : radfrq & ! intent(in) - , current_time ! ! intent(in) - use ed_state_vars, only : edtype & ! structure - , polygontype & ! structure - , sitetype & ! structure - , patchtype ! ! structure - +subroutine normalize_ed_fmean_vars(cgrid) + use grid_coms , only : nzg ! ! intent(in) + use ed_misc_coms , only : dtlsm & ! intent(in) + , frqsum & ! intent(in) + , radfrq & ! intent(in) + , current_time ! ! intent(in) + use ed_state_vars, only : edtype & ! structure + , polygontype & ! structure + , sitetype & ! structure + , patchtype ! ! structure + use therm_lib , only : uextcm2tl & ! subroutine + , uint2tl & ! subroutine + , idealdenssh & ! function + , press2exner & ! function + , extheta2temp ! ! function + use consts_coms , only : t00 & ! intent(in) + , wdns ! ! intent(in) + use soil_coms , only : tiny_sfcwater_mass & ! intent(in) + , isoilbc & ! intent(in) + , soil & ! intent(in) + , dslz & ! intent(in) + , matric_potential ! ! function implicit none !----- Arguments. ---------------------------------------------------------------------! type(edtype) , target :: cgrid - real , intent(in) :: frqsum - real , intent(in) :: dtlsm !----- Local variables. ----------------------------------------------------------------! type(polygontype) , pointer :: cpoly type(sitetype) , pointer :: csite @@ -153,181 +140,313 @@ subroutine normalize_averaged_vars(cgrid,frqsum,dtlsm) integer :: isi integer :: ipa integer :: ico - real :: tfact + integer :: nsoil + real :: dtlsm_o_frqsum + real :: radfrq_o_frqsum real :: frqsumi + real :: pss_npp + real :: pss_lai + real :: atm_exner + real :: can_exner integer :: k !---------------------------------------------------------------------------------------! - + + + !---------------------------------------------------------------------------------------! ! Find some useful conversion factors. ! - ! 1. FRQSUMI = inverse of the elapsed time between two analyses (or one day). This ! - ! should be used by variables that are fluxes but are currently holding ! - ! the integral over time. ! - ! 2. TFACT = number of times steps since last analysis. This should be used by ! - ! variables that were added every time step, but not really integrated ! - ! over time. ! + ! 1. FRQSUMI -- inverse of the elapsed time between two analyses (or one day). ! + ! This should be used by variables that are fluxes and are solved ! + ! by RK4, they are holding the integral over the past frqsum ! + ! seconds. ! + ! 2. DTLSM_O_FRQSUM -- inverse of the number of the main time steps (DTLSM) since ! + ! previous analysis. Only photosynthesis- and decomposition- ! + ! related variables, or STATE VARIABLES should use this factor. ! + ! Do not use this for energy and water fluxes, CO2 eddy flux, and ! + ! CO2 storage. ! + ! 3. RADFRQ_O_FRQSUM -- inverse of the number of radiation time steps since the ! + ! previous analysis. Only radiation-related variables should use ! + ! this factor. ! !---------------------------------------------------------------------------------------! - frqsumi = 1.0 / frqsum - tfact = dtlsm * frqsumi + frqsumi = 1.0 / frqsum + dtlsm_o_frqsum = dtlsm * frqsumi + radfrq_o_frqsum = radfrq * frqsumi !---------------------------------------------------------------------------------------! - do ipy = 1,cgrid%npolygons + + + + polyloop: do ipy = 1,cgrid%npolygons cpoly => cgrid%polygon(ipy) - do isi = 1,cpoly%nsites + siteloop: do isi = 1,cpoly%nsites csite => cpoly%site(isi) - do ipa = 1,csite%npatches + !----------------------------------------------------------------------------------! + ! Now we find the derived properties for the air above canopy. ! + !----------------------------------------------------------------------------------! + atm_exner = press2exner (cpoly%fmean_atm_prss(isi)) + cpoly%fmean_atm_temp(isi) = extheta2temp(atm_exner,cpoly%fmean_atm_theta(isi)) + cpoly%fmean_atm_rhos(isi) = idealdenssh ( cpoly%fmean_atm_prss (isi) & + , cpoly%fmean_atm_temp (isi) & + , cpoly%fmean_atm_shv (isi) ) + !----------------------------------------------------------------------------------! + + + + patchloop: do ipa = 1,csite%npatches cpatch => csite%patch(ipa) !------------------------------------------------------------------------------! - ! The following variables are integrated over time, we must divide them by ! - ! the total time. ! + ! Reset the patch-level GPP and plant respiration, used to find NEP. ! + !------------------------------------------------------------------------------! + pss_npp = 0.0 + pss_lai = 0.0 !------------------------------------------------------------------------------! - csite%avg_rshort_gnd (ipa) = csite%avg_rshort_gnd (ipa) * frqsumi - csite%avg_par_gnd (ipa) = csite%avg_par_gnd (ipa) * frqsumi - csite%avg_rlong_gnd (ipa) = csite%avg_rlong_gnd (ipa) * frqsumi - csite%avg_rlongup (ipa) = csite%avg_rlongup (ipa) * frqsumi - csite%avg_parup (ipa) = csite%avg_parup (ipa) * frqsumi - csite%avg_nirup (ipa) = csite%avg_nirup (ipa) * frqsumi - csite%avg_rshortup (ipa) = csite%avg_rshortup (ipa) * frqsumi - csite%avg_rnet (ipa) = csite%avg_rnet (ipa) * frqsumi - csite%avg_albedo (ipa) = csite%avg_albedo (ipa) * frqsumi - csite%avg_albedo_beam (ipa) = csite%avg_albedo_beam (ipa) * frqsumi - csite%avg_albedo_diffuse (ipa) = csite%avg_albedo_diffuse (ipa) * frqsumi - csite%avg_rlong_albedo (ipa) = csite%avg_rlong_albedo (ipa) * frqsumi - csite%avg_vapor_lc (ipa) = csite%avg_vapor_lc (ipa) * frqsumi - csite%avg_vapor_wc (ipa) = csite%avg_vapor_wc (ipa) * frqsumi - csite%avg_vapor_gc (ipa) = csite%avg_vapor_gc (ipa) * frqsumi - csite%avg_wshed_vg (ipa) = csite%avg_wshed_vg (ipa) * frqsumi - csite%avg_intercepted (ipa) = csite%avg_intercepted (ipa) * frqsumi - csite%avg_throughfall (ipa) = csite%avg_throughfall (ipa) * frqsumi - csite%avg_vapor_ac (ipa) = csite%avg_vapor_ac (ipa) * frqsumi - csite%avg_transp (ipa) = csite%avg_transp (ipa) * frqsumi - csite%avg_evap (ipa) = csite%avg_evap (ipa) * frqsumi - csite%avg_runoff (ipa) = csite%avg_runoff (ipa) * frqsumi - csite%avg_drainage (ipa) = csite%avg_drainage (ipa) * frqsumi - csite%avg_sensible_lc (ipa) = csite%avg_sensible_lc (ipa) * frqsumi - csite%avg_sensible_wc (ipa) = csite%avg_sensible_wc (ipa) * frqsumi - csite%avg_qwshed_vg (ipa) = csite%avg_qwshed_vg (ipa) * frqsumi - csite%avg_qintercepted (ipa) = csite%avg_qintercepted (ipa) * frqsumi - csite%avg_qthroughfall (ipa) = csite%avg_qthroughfall (ipa) * frqsumi - csite%avg_sensible_gc (ipa) = csite%avg_sensible_gc (ipa) * frqsumi - csite%avg_sensible_ac (ipa) = csite%avg_sensible_ac (ipa) * frqsumi - csite%avg_carbon_ac (ipa) = csite%avg_carbon_ac (ipa) * frqsumi - csite%avg_carbon_st (ipa) = csite%avg_carbon_st (ipa) * frqsumi - csite%avg_runoff_heat (ipa) = csite%avg_runoff_heat (ipa) * frqsumi - csite%avg_drainage_heat (ipa) = csite%avg_drainage_heat (ipa) * frqsumi - csite%avg_rk4step (ipa) = csite%avg_rk4step (ipa) * frqsumi - - csite%avg_ustar (ipa) = csite%avg_ustar (ipa) * frqsumi - csite%avg_tstar (ipa) = csite%avg_tstar (ipa) * frqsumi - csite%avg_qstar (ipa) = csite%avg_qstar (ipa) * frqsumi - csite%avg_cstar (ipa) = csite%avg_cstar (ipa) * frqsumi + + + + !------------------------------------------------------------------------------! + ! The following variables are fluxes that cam from the RK4 and therefore ! + ! hold the integral over time, divide them by the total time to obtain the ! + ! mean fluxes. ! + !------------------------------------------------------------------------------! + csite%fmean_rk4step (ipa) = csite%fmean_rk4step (ipa) * frqsumi + csite%fmean_ustar (ipa) = csite%fmean_ustar (ipa) * frqsumi + csite%fmean_tstar (ipa) = csite%fmean_tstar (ipa) * frqsumi + csite%fmean_qstar (ipa) = csite%fmean_qstar (ipa) * frqsumi + csite%fmean_cstar (ipa) = csite%fmean_cstar (ipa) * frqsumi + csite%fmean_carbon_ac (ipa) = csite%fmean_carbon_ac (ipa) * frqsumi + csite%fmean_carbon_st (ipa) = csite%fmean_carbon_st (ipa) * frqsumi + csite%fmean_vapor_gc (ipa) = csite%fmean_vapor_gc (ipa) * frqsumi + csite%fmean_vapor_ac (ipa) = csite%fmean_vapor_ac (ipa) * frqsumi + csite%fmean_throughfall (ipa) = csite%fmean_throughfall (ipa) * frqsumi + csite%fmean_runoff (ipa) = csite%fmean_runoff (ipa) * frqsumi + csite%fmean_drainage (ipa) = csite%fmean_drainage (ipa) * frqsumi + csite%fmean_sensible_gc (ipa) = csite%fmean_sensible_gc (ipa) * frqsumi + csite%fmean_sensible_ac (ipa) = csite%fmean_sensible_ac (ipa) * frqsumi + csite%fmean_qthroughfall (ipa) = csite%fmean_qthroughfall (ipa) * frqsumi + csite%fmean_qrunoff (ipa) = csite%fmean_qrunoff (ipa) * frqsumi + csite%fmean_qdrainage (ipa) = csite%fmean_qdrainage (ipa) * frqsumi + !------ Soil flux. ------------------------------------------------------------! do k=cpoly%lsl(isi),nzg - csite%avg_sensible_gg(k,ipa) = csite%avg_sensible_gg(k,ipa) * frqsumi - csite%avg_smoist_gg(k,ipa) = csite%avg_smoist_gg(k,ipa) * frqsumi - csite%avg_transloss(k,ipa) = csite%avg_transloss(k,ipa) * frqsumi + csite%fmean_sensible_gg(k,ipa) = csite%fmean_sensible_gg (k,ipa) * frqsumi + csite%fmean_smoist_gg (k,ipa) = csite%fmean_smoist_gg (k,ipa) * frqsumi + csite%fmean_transloss (k,ipa) = csite%fmean_transloss (k,ipa) * frqsumi end do !------------------------------------------------------------------------------! - + + + + !------------------------------------------------------------------------------! - ! Available water is added every dtlsm, so we normalise using tfact. ! !------------------------------------------------------------------------------! - csite%avg_available_water(ipa) = csite%avg_available_water(ipa) * tfact - - do ico=1,cpatch%ncohorts + ! Most state variables are already normalised. All that we need to do is ! + ! to find the derived properties. ! + !------------------------------------------------------------------------------! + + !------------------------------------------------------------------------------! + ! Soil matric potential, temperature, and liquid water. ! + !------------------------------------------------------------------------------! + do k=1,nzg + nsoil = cpoly%ntext_soil(k,isi) + call uextcm2tl( csite%fmean_soil_energy(k,ipa) & + , csite%fmean_soil_water (k,ipa) * wdns & + , soil(nsoil)%slcpd & + , csite%fmean_soil_temp (k,ipa) & + , csite%fmean_soil_fliq (k,ipa)) + + csite%fmean_soil_mstpot (k,ipa) = & + matric_potential(nsoil,csite%fmean_soil_water (k,ipa)) + + end do + !------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------! + ! Now we find the derived properties for the canopy air space. ! + !------------------------------------------------------------------------------! + can_exner = press2exner (csite%fmean_can_prss(ipa)) + csite%fmean_can_temp(ipa) = extheta2temp(can_exner,csite%fmean_can_theta(ipa)) + csite%fmean_can_rhos(ipa) = idealdenssh ( csite%fmean_can_prss (ipa) & + , csite%fmean_can_temp (ipa) & + , csite%fmean_can_shv (ipa) ) + !------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------! + ! If the patch had some temporary snow/pounding layer, convert the mean ! + ! energy to J/kg, then find the mean temperature and liquid fraction. Other- ! + ! wise, set them to either zero or default values. ! + !------------------------------------------------------------------------------! + if (csite%fmean_sfcw_mass(ipa) > tiny_sfcwater_mass) then + csite%fmean_sfcw_energy(ipa) = csite%fmean_sfcw_energy(ipa) & + / csite%fmean_sfcw_mass(ipa) + call uint2tl(csite%fmean_sfcw_energy(ipa),csite%fmean_sfcw_temp(ipa) & + ,csite%fmean_sfcw_fliq(ipa)) + else + csite%fmean_sfcw_mass (ipa) = 0. + csite%fmean_sfcw_depth (ipa) = 0. + csite%fmean_sfcw_energy(ipa) = 0. + csite%fmean_sfcw_temp (ipa) = csite%fmean_soil_temp(nzg,ipa) + csite%fmean_sfcw_fliq (ipa) = csite%fmean_soil_fliq(nzg,ipa) + end if + !------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------! + ! Loop over the cohorts and find the mean for derived properties. ! + !------------------------------------------------------------------------------! + cohortloop: do ico=1,cpatch%ncohorts + + + !---------------------------------------------------------------------------! - ! The carbon fluxes were updated every time step, but they don't have ! - ! integral units, so we normalise using tfact. Their units will become ! - ! µmol/m²/s. ! + ! Energy and water fluxes were integrated over the past frqsum ! + ! interval. Use frqsumi to normalise them. Energy fluxes will become ! + ! W/m², and water fluxes will become kg/m²/s. ! !---------------------------------------------------------------------------! - cpatch%mean_leaf_resp(ico) = cpatch%mean_leaf_resp(ico) * tfact - cpatch%mean_root_resp(ico) = cpatch%mean_root_resp(ico) * tfact - cpatch%mean_gpp(ico) = cpatch%mean_gpp(ico) * tfact - cpatch%mean_storage_resp(ico) = cpatch%mean_storage_resp(ico) * tfact - cpatch%mean_growth_resp(ico) = cpatch%mean_growth_resp(ico) * tfact - cpatch%mean_vleaf_resp(ico) = cpatch%mean_vleaf_resp(ico) * tfact + cpatch%fmean_sensible_lc (ico) = cpatch%fmean_sensible_lc (ico) & + * frqsumi + cpatch%fmean_vapor_lc (ico) = cpatch%fmean_vapor_lc (ico) & + * frqsumi + cpatch%fmean_transp (ico) = cpatch%fmean_transp (ico) & + * frqsumi + cpatch%fmean_intercepted_al(ico) = cpatch%fmean_intercepted_al(ico) & + * frqsumi + cpatch%fmean_wshed_lg (ico) = cpatch%fmean_wshed_lg (ico) & + * frqsumi + cpatch%fmean_sensible_wc (ico) = cpatch%fmean_sensible_wc (ico) & + * frqsumi + cpatch%fmean_vapor_wc (ico) = cpatch%fmean_vapor_wc (ico) & + * frqsumi + cpatch%fmean_intercepted_aw(ico) = cpatch%fmean_intercepted_aw(ico) & + * frqsumi + cpatch%fmean_wshed_wg (ico) = cpatch%fmean_wshed_wg (ico) & + * frqsumi !---------------------------------------------------------------------------! !---------------------------------------------------------------------------! - ! Radiation was updated every step. Use tfact to convert them to W/m2. ! + ! Find the vegetation temperature and liquid fraction. ! !---------------------------------------------------------------------------! - cpatch%mean_par_l (ico) = cpatch%mean_par_l (ico) * tfact - cpatch%mean_par_l_beam (ico) = cpatch%mean_par_l_beam (ico) * tfact - cpatch%mean_par_l_diff (ico) = cpatch%mean_par_l_diff (ico) * tfact - cpatch%mean_rshort_l (ico) = cpatch%mean_rshort_l (ico) * tfact - cpatch%mean_rlong_l (ico) = cpatch%mean_rlong_l (ico) * tfact - cpatch%mean_rshort_w (ico) = cpatch%mean_rshort_w (ico) * tfact - cpatch%mean_rlong_w (ico) = cpatch%mean_rlong_w (ico) * tfact + !----- Leaf. ---------------------------------------------------------------! + if (cpatch%fmean_leaf_hcap(ico) > 0.) then + call uextcm2tl( cpatch%fmean_leaf_energy(ico) & + , cpatch%fmean_leaf_water (ico) & + , cpatch%fmean_leaf_hcap (ico) & + , cpatch%fmean_leaf_temp (ico) & + , cpatch%fmean_leaf_fliq (ico) ) + else + cpatch%fmean_leaf_vpdef(ico) = csite%fmean_can_vpdef(ipa) + cpatch%fmean_leaf_temp (ico) = csite%fmean_can_temp (ipa) + if (csite%fmean_can_temp(ipa) > t00) then + cpatch%fmean_leaf_fliq(ico) = 1.0 + elseif (csite%fmean_can_temp(ipa) == t00) then + cpatch%fmean_leaf_fliq(ico) = 0.5 + else + cpatch%fmean_leaf_fliq(ico) = 0.0 + end if + end if + !----- Wood. ---------------------------------------------------------------! + if (cpatch%fmean_wood_hcap(ico) > 0.) then + call uextcm2tl( cpatch%fmean_wood_energy(ico) & + , cpatch%fmean_wood_water (ico) & + , cpatch%fmean_wood_hcap (ico) & + , cpatch%fmean_wood_temp (ico) & + , cpatch%fmean_wood_fliq (ico) ) + else + cpatch%fmean_wood_temp(ico) = csite%fmean_can_temp(ipa) + if (csite%fmean_can_temp(ipa) > t00) then + cpatch%fmean_wood_fliq(ico) = 1.0 + elseif (csite%fmean_can_temp(ipa) == t00) then + cpatch%fmean_wood_fliq(ico) = 0.5 + else + cpatch%fmean_wood_fliq(ico) = 0.0 + end if + end if !---------------------------------------------------------------------------! + + !---------------------------------------------------------------------------! - ! Energy and water fluxes were integrated over the past frqsum ! - ! interval. Use frqsumi to normalise them. Energy fluxes will become ! - ! W/m², and water fluxes will become kg/m²/s. ! + ! Integrate the total plant respiration and net primary productivity. ! !---------------------------------------------------------------------------! - cpatch%mean_sensible_lc (ico) = cpatch%mean_sensible_lc (ico) * frqsumi - cpatch%mean_vapor_lc (ico) = cpatch%mean_vapor_lc (ico) * frqsumi - cpatch%mean_transp (ico) = cpatch%mean_transp (ico) * frqsumi - cpatch%mean_intercepted_al(ico) = cpatch%mean_intercepted_al(ico) * frqsumi - cpatch%mean_wshed_lg (ico) = cpatch%mean_wshed_lg (ico) * frqsumi - cpatch%mean_sensible_wc (ico) = cpatch%mean_sensible_wc (ico) * frqsumi - cpatch%mean_vapor_wc (ico) = cpatch%mean_vapor_wc (ico) * frqsumi - cpatch%mean_intercepted_aw(ico) = cpatch%mean_intercepted_aw(ico) * frqsumi - cpatch%mean_wshed_wg (ico) = cpatch%mean_wshed_wg (ico) * frqsumi + cpatch%fmean_plresp(ico) = cpatch%fmean_leaf_resp (ico) & + + cpatch%fmean_root_resp (ico) & + + cpatch%fmean_storage_resp(ico) & + + cpatch%fmean_growth_resp (ico) & + + cpatch%fmean_vleaf_resp (ico) + cpatch%fmean_npp (ico) = cpatch%fmean_gpp (ico) & + - cpatch%fmean_plresp (ico) !---------------------------------------------------------------------------! - end do + + + + !----- Add LAI and extensive NPP to compute NEP. ---------------------------! + pss_lai = pss_lai + cpatch%lai (ico) + pss_npp = pss_npp + cpatch%fmean_npp (ico) * cpatch%nplant(ico) + !---------------------------------------------------------------------------! + end do cohortloop + !------------------------------------------------------------------------------! + + !------------------------------------------------------------------------------! - ! Likewise, heterotrophic respiration was updated every time step, but it ! - ! doesn't have integral values, so we normalise using tfact. Its units will ! - ! become µmol/m²/s. ! + ! Net Ecosystem Productivity found by combining the cohort-level terms ! + ! (gross primary productivity and total plant respiration), with heterotrophic ! + ! respiration, a patch-level variable. ! !------------------------------------------------------------------------------! - csite%mean_rh (ipa) = csite%mean_rh (ipa) * tfact - csite%mean_cwd_rh(ipa) = csite%mean_cwd_rh(ipa) * tfact + csite%fmean_nep(ipa) = pss_npp - csite%fmean_rh(ipa) !------------------------------------------------------------------------------! + + !------------------------------------------------------------------------------! ! Budget variables. They contain integral values, so we must divide by ! ! the elapsed time to get them in flux units. ! !------------------------------------------------------------------------------! - csite%co2budget_gpp(ipa) = csite%co2budget_gpp(ipa) * frqsumi - csite%co2budget_gpp_dbh(:,ipa) = csite%co2budget_gpp_dbh(:,ipa) * frqsumi - csite%co2budget_plresp(ipa) = csite%co2budget_plresp(ipa) * frqsumi - csite%co2budget_rh(ipa) = csite%co2budget_rh(ipa) * frqsumi - csite%co2budget_cwd_rh(ipa) = csite%co2budget_cwd_rh(ipa) * frqsumi - csite%co2budget_loss2atm(ipa) = csite%co2budget_loss2atm(ipa) * frqsumi - csite%co2budget_denseffect(ipa) = csite%co2budget_denseffect(ipa) * frqsumi - csite%co2budget_residual(ipa) = csite%co2budget_residual(ipa) * frqsumi - csite%ebudget_precipgain(ipa) = csite%ebudget_precipgain(ipa) * frqsumi - csite%ebudget_netrad(ipa) = csite%ebudget_netrad(ipa) * frqsumi - csite%ebudget_denseffect(ipa) = csite%ebudget_denseffect(ipa) * frqsumi - csite%ebudget_prsseffect(ipa) = csite%ebudget_prsseffect(ipa) * frqsumi - csite%ebudget_loss2atm(ipa) = csite%ebudget_loss2atm(ipa) * frqsumi - csite%ebudget_loss2drainage(ipa) = csite%ebudget_loss2drainage(ipa) * frqsumi - csite%ebudget_loss2runoff(ipa) = csite%ebudget_loss2runoff(ipa) * frqsumi - csite%ebudget_residual(ipa) = csite%ebudget_residual(ipa) * frqsumi - csite%wbudget_precipgain(ipa) = csite%wbudget_precipgain(ipa) * frqsumi - csite%wbudget_loss2atm(ipa) = csite%wbudget_loss2atm(ipa) * frqsumi - csite%wbudget_loss2drainage(ipa) = csite%wbudget_loss2drainage(ipa) * frqsumi - csite%wbudget_loss2runoff(ipa) = csite%wbudget_loss2runoff(ipa) * frqsumi - csite%wbudget_denseffect(ipa) = csite%wbudget_denseffect(ipa) * frqsumi - csite%wbudget_residual(ipa) = csite%wbudget_residual(ipa) * frqsumi + csite%co2budget_gpp (ipa) = csite%co2budget_gpp (ipa) * frqsumi + csite%co2budget_plresp (ipa) = csite%co2budget_plresp (ipa) * frqsumi + csite%co2budget_rh (ipa) = csite%co2budget_rh (ipa) * frqsumi + csite%co2budget_loss2atm (ipa) = csite%co2budget_loss2atm (ipa) * frqsumi + csite%co2budget_denseffect (ipa) = csite%co2budget_denseffect (ipa) * frqsumi + csite%co2budget_residual (ipa) = csite%co2budget_residual (ipa) * frqsumi + csite%ebudget_precipgain (ipa) = csite%ebudget_precipgain (ipa) * frqsumi + csite%ebudget_netrad (ipa) = csite%ebudget_netrad (ipa) * frqsumi + csite%ebudget_denseffect (ipa) = csite%ebudget_denseffect (ipa) * frqsumi + csite%ebudget_prsseffect (ipa) = csite%ebudget_prsseffect (ipa) * frqsumi + csite%ebudget_loss2atm (ipa) = csite%ebudget_loss2atm (ipa) * frqsumi + csite%ebudget_loss2drainage (ipa) = csite%ebudget_loss2drainage (ipa) * frqsumi + csite%ebudget_loss2runoff (ipa) = csite%ebudget_loss2runoff (ipa) * frqsumi + csite%ebudget_residual (ipa) = csite%ebudget_residual (ipa) * frqsumi + csite%wbudget_precipgain (ipa) = csite%wbudget_precipgain (ipa) * frqsumi + csite%wbudget_loss2atm (ipa) = csite%wbudget_loss2atm (ipa) * frqsumi + csite%wbudget_loss2drainage (ipa) = csite%wbudget_loss2drainage (ipa) * frqsumi + csite%wbudget_loss2runoff (ipa) = csite%wbudget_loss2runoff (ipa) * frqsumi + csite%wbudget_denseffect (ipa) = csite%wbudget_denseffect (ipa) * frqsumi + csite%wbudget_residual (ipa) = csite%wbudget_residual (ipa) * frqsumi !------------------------------------------------------------------------------! - end do - end do - end do - + end do patchloop + !---------------------------------------------------------------------------------! + end do siteloop + !------------------------------------------------------------------------------------! + end do polyloop + !---------------------------------------------------------------------------------------! return -end subroutine normalize_averaged_vars +end subroutine normalize_ed_fmean_vars !==========================================================================================! !==========================================================================================! @@ -338,7 +457,7 @@ end subroutine normalize_averaged_vars !==========================================================================================! !==========================================================================================! -subroutine reset_averaged_vars(cgrid) +subroutine zero_ed_fmean_vars(cgrid) use ed_state_vars, only : edtype & ! structure , polygontype & ! structure @@ -359,294 +478,323 @@ subroutine reset_averaged_vars(cgrid) !---------------------------------------------------------------------------------------! polyloop: do ipy = 1,cgrid%npolygons + cpoly => cgrid%polygon(ipy) - cgrid%cbudget_nep (ipy) = 0.0 - cgrid%avg_atm_tmp (ipy) = 0.0 - cgrid%avg_atm_vpdef (ipy) = 0.0 - cgrid%avg_atm_shv (ipy) = 0.0 - cgrid%avg_rshort (ipy) = 0.0 - cgrid%avg_rshort_diffuse (ipy) = 0.0 - cgrid%avg_par (ipy) = 0.0 - cgrid%avg_par_diffuse (ipy) = 0.0 - cgrid%avg_rlong (ipy) = 0.0 - cgrid%avg_pcpg (ipy) = 0.0 - cgrid%avg_qpcpg (ipy) = 0.0 - cgrid%avg_dpcpg (ipy) = 0.0 - cgrid%avg_vels (ipy) = 0.0 - cgrid%avg_atm_prss (ipy) = 0.0 - cgrid%avg_exner (ipy) = 0.0 - cgrid%avg_geoht (ipy) = 0.0 - cgrid%avg_atm_co2 (ipy) = 0.0 - cgrid%avg_albedo (ipy) = 0.0 - cgrid%avg_albedo_beam (ipy) = 0.0 - cgrid%avg_albedo_diffuse (ipy) = 0.0 - cgrid%avg_rlong_albedo (ipy) = 0.0 - cgrid%avg_rlongup (ipy) = 0.0 - cgrid%avg_parup (ipy) = 0.0 - cgrid%avg_nirup (ipy) = 0.0 - cgrid%avg_rshortup (ipy) = 0.0 - cgrid%avg_rnet (ipy) = 0.0 - - cgrid%avg_leaf_energy (ipy) = 0.0 - cgrid%avg_leaf_temp (ipy) = 0.0 - cgrid%avg_leaf_hcap (ipy) = 0.0 - cgrid%avg_leaf_fliq (ipy) = 0.0 - cgrid%avg_leaf_water (ipy) = 0.0 - cgrid%avg_leaf_vpdef (ipy) = 0.0 - - cgrid%avg_wood_energy (ipy) = 0.0 - cgrid%avg_wood_temp (ipy) = 0.0 - cgrid%avg_wood_hcap (ipy) = 0.0 - cgrid%avg_wood_fliq (ipy) = 0.0 - cgrid%avg_wood_water (ipy) = 0.0 - - cgrid%avg_can_temp (ipy) = 0.0 - cgrid%avg_can_shv (ipy) = 0.0 - cgrid%avg_can_co2 (ipy) = 0.0 - cgrid%avg_can_rhos (ipy) = 0.0 - cgrid%avg_can_prss (ipy) = 0.0 - cgrid%avg_can_theta (ipy) = 0.0 - cgrid%avg_can_theiv (ipy) = 0.0 - cgrid%avg_can_vpdef (ipy) = 0.0 - cgrid%avg_can_depth (ipy) = 0.0 - - cgrid%avg_drainage (ipy) = 0.0 - cgrid%avg_evap (ipy) = 0.0 - cgrid%avg_transp (ipy) = 0.0 - cgrid%avg_soil_temp (:,ipy) = 0.0 - cgrid%avg_soil_water (:,ipy) = 0.0 - cgrid%avg_soil_mstpot (:,ipy) = 0.0 - cgrid%avg_soil_energy (:,ipy) = 0.0 - cgrid%avg_soil_fracliq (:,ipy) = 0.0 - cgrid%avg_soil_rootfrac (:,ipy) = 0.0 - - cgrid%avg_ustar (ipy) = 0.0 - cgrid%avg_tstar (ipy) = 0.0 - cgrid%avg_qstar (ipy) = 0.0 - cgrid%avg_cstar (ipy) = 0.0 - - cgrid%avg_vapor_lc (ipy) = 0.0 - cgrid%avg_vapor_wc (ipy) = 0.0 - cgrid%avg_vapor_gc (ipy) = 0.0 - cgrid%avg_wshed_vg (ipy) = 0.0 - cgrid%avg_intercepted (ipy) = 0.0 - cgrid%avg_throughfall (ipy) = 0.0 - cgrid%avg_vapor_ac (ipy) = 0.0 - cgrid%avg_transp (ipy) = 0.0 - cgrid%avg_evap (ipy) = 0.0 - cgrid%avg_runoff (ipy) = 0.0 - cgrid%avg_drainage (ipy) = 0.0 - cgrid%avg_drainage_heat (ipy) = 0.0 - cgrid%avg_carbon_ac (ipy) = 0.0 - cgrid%avg_carbon_st (ipy) = 0.0 - cgrid%avg_sensible_lc (ipy) = 0.0 - cgrid%avg_sensible_wc (ipy) = 0.0 - cgrid%avg_qwshed_vg (ipy) = 0.0 - cgrid%avg_qintercepted (ipy) = 0.0 - cgrid%avg_qthroughfall (ipy) = 0.0 - cgrid%avg_sensible_gc (ipy) = 0.0 - cgrid%avg_sensible_ac (ipy) = 0.0 - cgrid%avg_runoff_heat (ipy) = 0.0 - - cgrid%avg_smoist_gg (:,ipy) = 0.0 - cgrid%avg_transloss (:,ipy) = 0.0 - cgrid%avg_sensible_gg (:,ipy) = 0.0 - - cgrid%avg_soil_wetness (ipy) = 0.0 - cgrid%avg_skin_temp (ipy) = 0.0 - cgrid%avg_available_water (ipy) = 0.0 - - cgrid%avg_lai_ebalvars (:,:,ipy) = 0.0 - - cgrid%avg_gpp (ipy) = 0.0 - cgrid%avg_nppleaf (ipy) = 0.0 - cgrid%avg_nppfroot (ipy) = 0.0 - cgrid%avg_nppsapwood (ipy) = 0.0 - cgrid%avg_nppcroot (ipy) = 0.0 - cgrid%avg_nppseeds (ipy) = 0.0 - cgrid%avg_nppwood (ipy) = 0.0 - cgrid%avg_nppdaily (ipy) = 0.0 - cgrid%avg_leaf_resp (ipy) = 0.0 - cgrid%avg_root_resp (ipy) = 0.0 - cgrid%avg_growth_resp (ipy) = 0.0 - cgrid%avg_storage_resp (ipy) = 0.0 - cgrid%avg_vleaf_resp (ipy) = 0.0 - cgrid%avg_plant_resp (ipy) = 0.0 - cgrid%avg_growth_resp (ipy) = 0.0 - cgrid%avg_storage_resp (ipy) = 0.0 - cgrid%avg_vleaf_resp (ipy) = 0.0 - cgrid%avg_htroph_resp (ipy) = 0.0 - cgrid%avg_cwd_resp (ipy) = 0.0 - cgrid%avg_leaf_drop (ipy) = 0.0 - cgrid%avg_leaf_maintenance (ipy) = 0.0 - cgrid%avg_root_maintenance (ipy) = 0.0 - - cgrid%avg_sfcw_depth (ipy) = 0.0 - cgrid%avg_sfcw_energy (ipy) = 0.0 - cgrid%avg_sfcw_mass (ipy) = 0.0 - cgrid%avg_sfcw_tempk (ipy) = 0.0 - cgrid%avg_sfcw_fracliq (ipy) = 0.0 - cgrid%avg_bdead (ipy) = 0.0 - cgrid%avg_balive (ipy) = 0.0 - cgrid%avg_bleaf (ipy) = 0.0 - cgrid%avg_broot (ipy) = 0.0 - cgrid%avg_bsapwooda (ipy) = 0.0 - cgrid%avg_bsapwoodb (ipy) = 0.0 - cgrid%avg_bstorage (ipy) = 0.0 - cgrid%avg_bseeds (ipy) = 0.0 - cgrid%avg_fsc (ipy) = 0.0 - cgrid%avg_ssc (ipy) = 0.0 - cgrid%avg_stsc (ipy) = 0.0 - cgrid%avg_fsn (ipy) = 0.0 - cgrid%avg_msn (ipy) = 0.0 - + cgrid%fmean_gpp ( ipy) = 0.0 + cgrid%fmean_npp ( ipy) = 0.0 + cgrid%fmean_leaf_resp ( ipy) = 0.0 + cgrid%fmean_root_resp ( ipy) = 0.0 + cgrid%fmean_growth_resp ( ipy) = 0.0 + cgrid%fmean_storage_resp ( ipy) = 0.0 + cgrid%fmean_vleaf_resp ( ipy) = 0.0 + cgrid%fmean_plresp ( ipy) = 0.0 + cgrid%fmean_leaf_energy ( ipy) = 0.0 + cgrid%fmean_leaf_water ( ipy) = 0.0 + cgrid%fmean_leaf_hcap ( ipy) = 0.0 + cgrid%fmean_leaf_vpdef ( ipy) = 0.0 + cgrid%fmean_leaf_temp ( ipy) = 0.0 + cgrid%fmean_leaf_fliq ( ipy) = 0.0 + cgrid%fmean_leaf_gsw ( ipy) = 0.0 + cgrid%fmean_leaf_gbw ( ipy) = 0.0 + cgrid%fmean_wood_energy ( ipy) = 0.0 + cgrid%fmean_wood_water ( ipy) = 0.0 + cgrid%fmean_wood_hcap ( ipy) = 0.0 + cgrid%fmean_wood_temp ( ipy) = 0.0 + cgrid%fmean_wood_fliq ( ipy) = 0.0 + cgrid%fmean_wood_gbw ( ipy) = 0.0 + cgrid%fmean_fs_open ( ipy) = 0.0 + cgrid%fmean_fsw ( ipy) = 0.0 + cgrid%fmean_fsn ( ipy) = 0.0 + cgrid%fmean_psi_open ( ipy) = 0.0 + cgrid%fmean_psi_closed ( ipy) = 0.0 + cgrid%fmean_water_supply ( ipy) = 0.0 + cgrid%fmean_par_l ( ipy) = 0.0 + cgrid%fmean_par_l_beam ( ipy) = 0.0 + cgrid%fmean_par_l_diff ( ipy) = 0.0 + cgrid%fmean_rshort_l ( ipy) = 0.0 + cgrid%fmean_rlong_l ( ipy) = 0.0 + cgrid%fmean_sensible_lc ( ipy) = 0.0 + cgrid%fmean_vapor_lc ( ipy) = 0.0 + cgrid%fmean_transp ( ipy) = 0.0 + cgrid%fmean_intercepted_al ( ipy) = 0.0 + cgrid%fmean_wshed_lg ( ipy) = 0.0 + cgrid%fmean_rshort_w ( ipy) = 0.0 + cgrid%fmean_rlong_w ( ipy) = 0.0 + cgrid%fmean_sensible_wc ( ipy) = 0.0 + cgrid%fmean_vapor_wc ( ipy) = 0.0 + cgrid%fmean_intercepted_aw ( ipy) = 0.0 + cgrid%fmean_wshed_wg ( ipy) = 0.0 + cgrid%fmean_rh ( ipy) = 0.0 + cgrid%fmean_cwd_rh ( ipy) = 0.0 + cgrid%fmean_nep ( ipy) = 0.0 + cgrid%fmean_rk4step ( ipy) = 0.0 + cgrid%fmean_available_water ( ipy) = 0.0 + cgrid%fmean_can_theiv ( ipy) = 0.0 + cgrid%fmean_can_theta ( ipy) = 0.0 + cgrid%fmean_can_vpdef ( ipy) = 0.0 + cgrid%fmean_can_temp ( ipy) = 0.0 + cgrid%fmean_can_shv ( ipy) = 0.0 + cgrid%fmean_can_co2 ( ipy) = 0.0 + cgrid%fmean_can_rhos ( ipy) = 0.0 + cgrid%fmean_can_prss ( ipy) = 0.0 + cgrid%fmean_gnd_temp ( ipy) = 0.0 + cgrid%fmean_gnd_shv ( ipy) = 0.0 + cgrid%fmean_can_ggnd ( ipy) = 0.0 + cgrid%fmean_sfcw_depth ( ipy) = 0.0 + cgrid%fmean_sfcw_energy ( ipy) = 0.0 + cgrid%fmean_sfcw_mass ( ipy) = 0.0 + cgrid%fmean_sfcw_temp ( ipy) = 0.0 + cgrid%fmean_sfcw_fliq ( ipy) = 0.0 + cgrid%fmean_soil_energy (:,ipy) = 0.0 + cgrid%fmean_soil_mstpot (:,ipy) = 0.0 + cgrid%fmean_soil_water (:,ipy) = 0.0 + cgrid%fmean_soil_temp (:,ipy) = 0.0 + cgrid%fmean_soil_fliq (:,ipy) = 0.0 + cgrid%fmean_rshort_gnd ( ipy) = 0.0 + cgrid%fmean_par_gnd ( ipy) = 0.0 + cgrid%fmean_rlong_gnd ( ipy) = 0.0 + cgrid%fmean_rlongup ( ipy) = 0.0 + cgrid%fmean_parup ( ipy) = 0.0 + cgrid%fmean_nirup ( ipy) = 0.0 + cgrid%fmean_rshortup ( ipy) = 0.0 + cgrid%fmean_rnet ( ipy) = 0.0 + cgrid%fmean_albedo ( ipy) = 0.0 + cgrid%fmean_albedo_beam ( ipy) = 0.0 + cgrid%fmean_albedo_diff ( ipy) = 0.0 + cgrid%fmean_rlong_albedo ( ipy) = 0.0 + cgrid%fmean_ustar ( ipy) = 0.0 + cgrid%fmean_tstar ( ipy) = 0.0 + cgrid%fmean_qstar ( ipy) = 0.0 + cgrid%fmean_cstar ( ipy) = 0.0 + cgrid%fmean_carbon_ac ( ipy) = 0.0 + cgrid%fmean_carbon_st ( ipy) = 0.0 + cgrid%fmean_vapor_gc ( ipy) = 0.0 + cgrid%fmean_vapor_ac ( ipy) = 0.0 + cgrid%fmean_smoist_gg (:,ipy) = 0.0 + cgrid%fmean_throughfall ( ipy) = 0.0 + cgrid%fmean_transloss (:,ipy) = 0.0 + cgrid%fmean_runoff ( ipy) = 0.0 + cgrid%fmean_drainage ( ipy) = 0.0 + cgrid%fmean_sensible_gc ( ipy) = 0.0 + cgrid%fmean_sensible_ac ( ipy) = 0.0 + cgrid%fmean_sensible_gg (:,ipy) = 0.0 + cgrid%fmean_qthroughfall ( ipy) = 0.0 + cgrid%fmean_qrunoff ( ipy) = 0.0 + cgrid%fmean_qdrainage ( ipy) = 0.0 + cgrid%fmean_atm_theiv ( ipy) = 0.0 + cgrid%fmean_atm_theta ( ipy) = 0.0 + cgrid%fmean_atm_temp ( ipy) = 0.0 + cgrid%fmean_atm_vpdef ( ipy) = 0.0 + cgrid%fmean_atm_shv ( ipy) = 0.0 + cgrid%fmean_atm_rshort ( ipy) = 0.0 + cgrid%fmean_atm_rshort_diff ( ipy) = 0.0 + cgrid%fmean_atm_par ( ipy) = 0.0 + cgrid%fmean_atm_par_diff ( ipy) = 0.0 + cgrid%fmean_atm_rlong ( ipy) = 0.0 + cgrid%fmean_atm_vels ( ipy) = 0.0 + cgrid%fmean_atm_rhos ( ipy) = 0.0 + cgrid%fmean_atm_prss ( ipy) = 0.0 + cgrid%fmean_atm_co2 ( ipy) = 0.0 + cgrid%fmean_pcpg ( ipy) = 0.0 + cgrid%fmean_qpcpg ( ipy) = 0.0 + cgrid%fmean_dpcpg ( ipy) = 0.0 + cgrid%fmean_soil_wetness ( ipy) = 0.0 + cgrid%fmean_skin_temp ( ipy) = 0.0 - cpoly => cgrid%polygon(ipy) siteloop: do isi = 1,cpoly%nsites csite => cpoly%site(isi) - cpoly%avg_atm_tmp (isi) = 0.0 - cpoly%avg_atm_vpdef (isi) = 0.0 - cpoly%avg_atm_shv (isi) = 0.0 - cpoly%avg_atm_prss (isi) = 0.0 - - cpoly%avg_soil_temp (:,isi) = 0.0 - cpoly%avg_soil_water (:,isi) = 0.0 - cpoly%avg_soil_mstpot (:,isi) = 0.0 - cpoly%avg_soil_energy (:,isi) = 0.0 - cpoly%avg_soil_fracliq (:,isi) = 0.0 - cpoly%avg_soil_rootfrac (:,isi) = 0.0 - - + cpoly%fmean_atm_theiv (isi) = 0.0 + cpoly%fmean_atm_theta (isi) = 0.0 + cpoly%fmean_atm_temp (isi) = 0.0 + cpoly%fmean_atm_vpdef (isi) = 0.0 + cpoly%fmean_atm_shv (isi) = 0.0 + cpoly%fmean_atm_rshort (isi) = 0.0 + cpoly%fmean_atm_rshort_diff(isi) = 0.0 + cpoly%fmean_atm_par (isi) = 0.0 + cpoly%fmean_atm_par_diff (isi) = 0.0 + cpoly%fmean_atm_rlong (isi) = 0.0 + cpoly%fmean_atm_vels (isi) = 0.0 + cpoly%fmean_atm_rhos (isi) = 0.0 + cpoly%fmean_atm_prss (isi) = 0.0 + cpoly%fmean_atm_co2 (isi) = 0.0 + cpoly%fmean_pcpg (isi) = 0.0 + cpoly%fmean_qpcpg (isi) = 0.0 + cpoly%fmean_dpcpg (isi) = 0.0 patchloop: do ipa = 1,csite%npatches cpatch => csite%patch(ipa) - !----------------------------------------------------------------! - ! Zeroing CO2 budget variables. ! - !----------------------------------------------------------------! + !----- Budget variables. ------------------------------------------------------! csite%co2budget_gpp (ipa) = 0.0 - csite%co2budget_gpp_dbh (:,ipa) = 0.0 csite%co2budget_rh (ipa) = 0.0 - csite%co2budget_cwd_rh (ipa) = 0.0 csite%co2budget_plresp (ipa) = 0.0 csite%co2budget_residual (ipa) = 0.0 csite%co2budget_loss2atm (ipa) = 0.0 csite%co2budget_denseffect (ipa) = 0.0 + csite%wbudget_precipgain (ipa) = 0.0 + csite%wbudget_loss2atm (ipa) = 0.0 + csite%wbudget_loss2runoff (ipa) = 0.0 + csite%wbudget_loss2drainage (ipa) = 0.0 + csite%wbudget_denseffect (ipa) = 0.0 + csite%wbudget_residual (ipa) = 0.0 + csite%ebudget_precipgain (ipa) = 0.0 + csite%ebudget_netrad (ipa) = 0.0 + csite%ebudget_loss2atm (ipa) = 0.0 + csite%ebudget_loss2runoff (ipa) = 0.0 + csite%ebudget_loss2drainage (ipa) = 0.0 + csite%ebudget_denseffect (ipa) = 0.0 + csite%ebudget_prsseffect (ipa) = 0.0 + csite%ebudget_residual (ipa) = 0.0 + !------------------------------------------------------------------------------! + + + + + !----- Fast average variables. ------------------------------------------------! + csite%fmean_rh ( ipa) = 0.0 + csite%fmean_cwd_rh ( ipa) = 0.0 + csite%fmean_nep ( ipa) = 0.0 + csite%fmean_rk4step ( ipa) = 0.0 + csite%fmean_available_water( ipa) = 0.0 + csite%fmean_can_theiv ( ipa) = 0.0 + csite%fmean_can_theta ( ipa) = 0.0 + csite%fmean_can_vpdef ( ipa) = 0.0 + csite%fmean_can_temp ( ipa) = 0.0 + csite%fmean_can_shv ( ipa) = 0.0 + csite%fmean_can_co2 ( ipa) = 0.0 + csite%fmean_can_rhos ( ipa) = 0.0 + csite%fmean_can_prss ( ipa) = 0.0 + csite%fmean_gnd_temp ( ipa) = 0.0 + csite%fmean_gnd_shv ( ipa) = 0.0 + csite%fmean_can_ggnd ( ipa) = 0.0 + csite%fmean_sfcw_depth ( ipa) = 0.0 + csite%fmean_sfcw_energy ( ipa) = 0.0 + csite%fmean_sfcw_mass ( ipa) = 0.0 + csite%fmean_sfcw_temp ( ipa) = 0.0 + csite%fmean_sfcw_fliq ( ipa) = 0.0 + csite%fmean_soil_energy (:,ipa) = 0.0 + csite%fmean_soil_mstpot (:,ipa) = 0.0 + csite%fmean_soil_water (:,ipa) = 0.0 + csite%fmean_soil_temp (:,ipa) = 0.0 + csite%fmean_soil_fliq (:,ipa) = 0.0 + csite%fmean_rshort_gnd ( ipa) = 0.0 + csite%fmean_par_gnd ( ipa) = 0.0 + csite%fmean_rlong_gnd ( ipa) = 0.0 + csite%fmean_rlongup ( ipa) = 0.0 + csite%fmean_parup ( ipa) = 0.0 + csite%fmean_nirup ( ipa) = 0.0 + csite%fmean_rshortup ( ipa) = 0.0 + csite%fmean_rnet ( ipa) = 0.0 + csite%fmean_albedo ( ipa) = 0.0 + csite%fmean_albedo_beam ( ipa) = 0.0 + csite%fmean_albedo_diff ( ipa) = 0.0 + csite%fmean_rlong_albedo ( ipa) = 0.0 + csite%fmean_ustar ( ipa) = 0.0 + csite%fmean_tstar ( ipa) = 0.0 + csite%fmean_qstar ( ipa) = 0.0 + csite%fmean_cstar ( ipa) = 0.0 + csite%fmean_carbon_ac ( ipa) = 0.0 + csite%fmean_carbon_st ( ipa) = 0.0 + csite%fmean_vapor_gc ( ipa) = 0.0 + csite%fmean_vapor_ac ( ipa) = 0.0 + csite%fmean_smoist_gg (:,ipa) = 0.0 + csite%fmean_throughfall ( ipa) = 0.0 + csite%fmean_transloss (:,ipa) = 0.0 + csite%fmean_runoff ( ipa) = 0.0 + csite%fmean_drainage ( ipa) = 0.0 + csite%fmean_sensible_gc ( ipa) = 0.0 + csite%fmean_sensible_ac ( ipa) = 0.0 + csite%fmean_sensible_gg (:,ipa) = 0.0 + csite%fmean_qthroughfall ( ipa) = 0.0 + csite%fmean_qrunoff ( ipa) = 0.0 + csite%fmean_qdrainage ( ipa) = 0.0 + !------------------------------------------------------------------------------! + - !----------------------------------------------------------------! - ! Zeroing water budget variables. ! - !----------------------------------------------------------------! - csite%wbudget_precipgain (ipa) = 0.0 - csite%wbudget_loss2atm (ipa) = 0.0 - csite%wbudget_loss2runoff (ipa) = 0.0 - csite%wbudget_loss2drainage (ipa) = 0.0 - csite%wbudget_denseffect (ipa) = 0.0 - csite%wbudget_residual (ipa) = 0.0 - - - !----------------------------------------------------------------! - ! Zeroing energy budget variables. ! - !----------------------------------------------------------------! - csite%ebudget_precipgain (ipa) = 0.0 - csite%ebudget_netrad (ipa) = 0.0 - csite%ebudget_loss2atm (ipa) = 0.0 - csite%ebudget_loss2runoff (ipa) = 0.0 - csite%ebudget_loss2drainage (ipa) = 0.0 - csite%ebudget_denseffect (ipa) = 0.0 - csite%ebudget_prsseffect (ipa) = 0.0 - csite%ebudget_residual (ipa) = 0.0 - !----------------------------------------------------------------! - - csite%avg_ustar (ipa) = 0.0 - csite%avg_tstar (ipa) = 0.0 - csite%avg_qstar (ipa) = 0.0 - csite%avg_cstar (ipa) = 0.0 - csite%avg_carbon_ac (ipa) = 0.0 - csite%avg_carbon_st (ipa) = 0.0 - csite%avg_vapor_lc (ipa) = 0.0 - csite%avg_vapor_wc (ipa) = 0.0 - csite%avg_vapor_gc (ipa) = 0.0 - csite%avg_wshed_vg (ipa) = 0.0 - csite%avg_intercepted (ipa) = 0.0 - csite%avg_throughfall (ipa) = 0.0 - csite%avg_vapor_ac (ipa) = 0.0 - csite%avg_transp (ipa) = 0.0 - csite%avg_evap (ipa) = 0.0 - csite%avg_rshort_gnd (ipa) = 0.0 - csite%avg_par_gnd (ipa) = 0.0 - csite%avg_rlong_gnd (ipa) = 0.0 - csite%avg_rlongup (ipa) = 0.0 - csite%avg_parup (ipa) = 0.0 - csite%avg_nirup (ipa) = 0.0 - csite%avg_rshortup (ipa) = 0.0 - csite%avg_rnet (ipa) = 0.0 - csite%avg_albedo (ipa) = 0.0 - csite%avg_albedo_beam (ipa) = 0.0 - csite%avg_albedo_diffuse (ipa) = 0.0 - csite%avg_rlong_albedo (ipa) = 0.0 - csite%avg_smoist_gg (:,ipa) = 0.0 - csite%avg_transloss (:,ipa) = 0.0 - csite%avg_runoff (ipa) = 0.0 - csite%avg_runoff_heat (ipa) = 0.0 - csite%avg_drainage (ipa) = 0.0 - csite%avg_drainage_heat (ipa) = 0.0 - csite%avg_sensible_lc (ipa) = 0.0 - csite%avg_sensible_wc (ipa) = 0.0 - csite%avg_qwshed_vg (ipa) = 0.0 - csite%avg_qintercepted (ipa) = 0.0 - csite%avg_qthroughfall (ipa) = 0.0 - csite%avg_sensible_gc (ipa) = 0.0 - csite%avg_sensible_ac (ipa) = 0.0 - csite%avg_sensible_gg (:,ipa) = 0.0 - csite%avg_runoff_heat (ipa) = 0.0 - csite%avg_rk4step (ipa) = 0.0 - csite%avg_available_water (ipa) = 0.0 - csite%mean_rh (ipa) = 0.0 - csite%mean_cwd_rh (ipa) = 0.0 - + + + !----- Cohort level variables. ------------------------------------------------! cohortloop: do ico=1,cpatch%ncohorts - cpatch%leaf_respiration (ico) = 0.0 - cpatch%root_respiration (ico) = 0.0 - cpatch%gpp (ico) = 0.0 - cpatch%mean_leaf_resp (ico) = 0.0 - cpatch%mean_root_resp (ico) = 0.0 - cpatch%mean_gpp (ico) = 0.0 - cpatch%mean_storage_resp (ico) = 0.0 - cpatch%mean_growth_resp (ico) = 0.0 - cpatch%mean_vleaf_resp (ico) = 0.0 - cpatch%mean_par_l (ico) = 0.0 - cpatch%mean_par_l_beam (ico) = 0.0 - cpatch%mean_par_l_diff (ico) = 0.0 - cpatch%mean_rshort_l (ico) = 0.0 - cpatch%mean_rlong_l (ico) = 0.0 - cpatch%mean_sensible_lc (ico) = 0.0 - cpatch%mean_vapor_lc (ico) = 0.0 - cpatch%mean_transp (ico) = 0.0 - cpatch%mean_intercepted_al (ico) = 0.0 - cpatch%mean_wshed_lg (ico) = 0.0 - cpatch%mean_rshort_w (ico) = 0.0 - cpatch%mean_rlong_w (ico) = 0.0 - cpatch%mean_sensible_wc (ico) = 0.0 - cpatch%mean_vapor_wc (ico) = 0.0 - cpatch%mean_intercepted_aw (ico) = 0.0 - cpatch%mean_wshed_wg (ico) = 0.0 + cpatch%fmean_gpp (ico) = 0.0 + cpatch%fmean_npp (ico) = 0.0 + cpatch%fmean_leaf_resp (ico) = 0.0 + cpatch%fmean_root_resp (ico) = 0.0 + cpatch%fmean_growth_resp (ico) = 0.0 + cpatch%fmean_storage_resp (ico) = 0.0 + cpatch%fmean_vleaf_resp (ico) = 0.0 + cpatch%fmean_plresp (ico) = 0.0 + cpatch%fmean_leaf_energy (ico) = 0.0 + cpatch%fmean_leaf_water (ico) = 0.0 + cpatch%fmean_leaf_hcap (ico) = 0.0 + cpatch%fmean_leaf_vpdef (ico) = 0.0 + cpatch%fmean_leaf_temp (ico) = 0.0 + cpatch%fmean_leaf_fliq (ico) = 0.0 + cpatch%fmean_leaf_gsw (ico) = 0.0 + cpatch%fmean_leaf_gbw (ico) = 0.0 + cpatch%fmean_wood_energy (ico) = 0.0 + cpatch%fmean_wood_water (ico) = 0.0 + cpatch%fmean_wood_hcap (ico) = 0.0 + cpatch%fmean_wood_temp (ico) = 0.0 + cpatch%fmean_wood_fliq (ico) = 0.0 + cpatch%fmean_wood_gbw (ico) = 0.0 + cpatch%fmean_fs_open (ico) = 0.0 + cpatch%fmean_fsw (ico) = 0.0 + cpatch%fmean_fsn (ico) = 0.0 + cpatch%fmean_psi_open (ico) = 0.0 + cpatch%fmean_psi_closed (ico) = 0.0 + cpatch%fmean_water_supply (ico) = 0.0 + cpatch%fmean_light_level (ico) = 0.0 + cpatch%fmean_light_level_beam(ico) = 0.0 + cpatch%fmean_light_level_diff(ico) = 0.0 + cpatch%fmean_par_l (ico) = 0.0 + cpatch%fmean_par_l_beam (ico) = 0.0 + cpatch%fmean_par_l_diff (ico) = 0.0 + cpatch%fmean_rshort_l (ico) = 0.0 + cpatch%fmean_rlong_l (ico) = 0.0 + cpatch%fmean_sensible_lc (ico) = 0.0 + cpatch%fmean_vapor_lc (ico) = 0.0 + cpatch%fmean_transp (ico) = 0.0 + cpatch%fmean_intercepted_al (ico) = 0.0 + cpatch%fmean_wshed_lg (ico) = 0.0 + cpatch%fmean_rshort_w (ico) = 0.0 + cpatch%fmean_rlong_w (ico) = 0.0 + cpatch%fmean_sensible_wc (ico) = 0.0 + cpatch%fmean_vapor_wc (ico) = 0.0 + cpatch%fmean_intercepted_aw (ico) = 0.0 + cpatch%fmean_wshed_wg (ico) = 0.0 end do cohortloop + !------------------------------------------------------------------------------! end do patchloop + !---------------------------------------------------------------------------------! end do siteloop + !------------------------------------------------------------------------------------! end do polyloop + !---------------------------------------------------------------------------------------! return -end subroutine reset_averaged_vars +end subroutine zero_ed_fmean_vars +!==========================================================================================! +!==========================================================================================! !==========================================================================================! !==========================================================================================! +!==========================================================================================! +!==========================================================================================! + + + + +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! !==========================================================================================! !==========================================================================================! ! |-------------------------------| ! @@ -654,31 +802,36 @@ end subroutine reset_averaged_vars ! |-------------------------------| ! !==========================================================================================! !==========================================================================================! -! This subroutine integrates the daily averages for state vars, plus the mean diurnal ! -! cycle if the user wants that as well. This is called after each time step in case at ! -! least one of the daily mean, monthly mean, or the mean diurnal is sought. ! +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! + + + + + + +!==========================================================================================! +!==========================================================================================! +! This subroutine integrates most of the daily averages. This is called after the ! +! "fmean" variables are normalised, so we take advantage of these "fmean" variables. ! +! ! +! A few variables are _NOT_ integrated here: ! +! 1. Variables that should be integrated only during daylight hours ! +! 2. The NPP breakdown variables are integrated in a separate routine ! +! 3. Variables such as temperature and liquid fraction, which are found after the daily ! +! means are normalised. ! !------------------------------------------------------------------------------------------! -subroutine integrate_ed_daily_output_state(cgrid) +subroutine integrate_ed_dmean_vars(cgrid) use ed_state_vars , only : edtype & ! structure , polygontype & ! structure , sitetype & ! structure , patchtype ! ! structure - use grid_coms , only : nzg & ! intent(in) - , time ! ! intent(in) - use ed_max_dims , only : n_dbh & ! intent(in) - , n_pft & ! intent(in) - , n_dist_types & ! intent(in) - , n_mort ! ! intent(in) - use ed_misc_coms , only : dtlsm & ! intent(in) - , iqoutput & ! intent(in) - , frqfast & ! intent(in) - , ndcycle & ! intent(in) - , current_time ! ! intent(in) - use pft_coms , only : sla ! ! intent(in) - use canopy_radiation_coms, only : rshort_twilight_min & ! intent(in) - , cosz_min ! ! intent(in) + use ed_misc_coms , only : frqsum ! ! intent(in) use consts_coms , only : day_sec ! ! intent(in) implicit none + !----- Argument ------------------------------------------------------------------------! type(edtype) , target :: cgrid !----- Local variables -----------------------------------------------------------------! @@ -689,1156 +842,709 @@ subroutine integrate_ed_daily_output_state(cgrid) integer :: isi integer :: ipa integer :: ico - integer :: t - real :: poly_area_i - real :: site_area_i - real :: forest_site - real :: forest_site_i - real :: forest_poly - real :: poly_lai - real :: site_lai - real :: patch_lai - real :: patch_lai_i - real :: poly_lma - real :: site_lma - real :: patch_lma - real :: sss_can_theta - real :: sss_can_theiv - real :: sss_can_vpdef - real :: sss_can_shv - real :: sss_can_co2 - real :: sss_can_prss - real :: sss_gnd_temp - real :: sss_gnd_shv - real :: sss_leaf_water - real :: sss_leaf_energy - real :: sss_leaf_hcap - real :: sss_leaf_vpdef - real :: sss_wood_water - real :: sss_wood_energy - real :: sss_wood_hcap - real :: pss_leaf_water - real :: pss_leaf_energy - real :: pss_leaf_hcap - real :: pss_leaf_vpdef - real :: pss_wood_water - real :: pss_wood_energy - real :: pss_wood_hcap - real :: rshort_tot + !----- Locally saved variables. --------------------------------------------------------! + logical , save :: find_factors = .true. + real , save :: frqsum_o_daysec = 1.e34 !---------------------------------------------------------------------------------------! - + !----- Compute the normalisation factors. This is done only once. ----------------------! + if (find_factors) then + frqsum_o_daysec = frqsum / day_sec + find_factors = .false. + end if !---------------------------------------------------------------------------------------! - ! Find the index corresponding to this time of the day for the mean diurnal cycle ! - ! averages. ! + + !---------------------------------------------------------------------------------------! - t = ceiling(mod(current_time%time,day_sec)/frqfast) - if (t == 0) t = nint(day_sec/frqfast) + ! Use the variables that have been already aggregated. ! !---------------------------------------------------------------------------------------! - polyloop: do ipy=1,cgrid%npolygons cpoly => cgrid%polygon(ipy) - poly_area_i=1./sum(cpoly%area) - - - !----- Initialize auxiliary variables to add sitetype variables. --------------------! - site_lma = 0. - site_lai = 0. - sss_leaf_energy = 0. - sss_leaf_water = 0. - sss_leaf_hcap = 0. - sss_leaf_vpdef = 0. - sss_wood_energy = 0. - sss_wood_water = 0. - sss_wood_hcap = 0. - sss_can_theta = 0. - sss_can_theiv = 0. - sss_can_vpdef = 0. - sss_can_shv = 0. - sss_can_co2 = 0. - sss_can_prss = 0. - sss_gnd_temp = 0. - sss_gnd_shv = 0. - forest_poly = 0. - !------------------------------------------------------------------------------------! - - siteloop: do isi=1, cpoly%nsites - !---------------------------------------------------------------------------------! - ! Determine if there is any beam radiation, and find the total. This is the ! - ! same test done in the radiation driver. ! - !---------------------------------------------------------------------------------! - if (cpoly%cosaoi(isi) <= cosz_min) then - rshort_tot = cpoly%met(isi)%rshort_diffuse - else - rshort_tot = cpoly%met(isi)%rshort - end if - !----- Include this time step only if it is still day time. ----------------------! - if (rshort_tot > rshort_twilight_min) then - cpoly%daylight(isi) = cpoly%daylight(isi) + dtlsm - end if - !---------------------------------------------------------------------------------! - - csite => cpoly%site(isi) - - !----- Inverse of total site area (sum of all patches' area). --------------------! - site_area_i=1./sum(csite%area) - - !----- Forest areas. -------------------------------------------------------------! - forest_site = sum(csite%area,csite%dist_type /= 1) - if (forest_site > 1.0e-6) then - forest_site_i = 1./forest_site - else - forest_site_i = 0.0 - end if - forest_poly = forest_poly + forest_site - - !----- Initialize auxiliary variables to add patchtype variables. ----------------! - patch_lai = 0. - patch_lma = 0. - pss_leaf_energy = 0. - pss_leaf_water = 0. - pss_leaf_hcap = 0. - pss_leaf_vpdef = 0. - pss_wood_energy = 0. - pss_wood_water = 0. - pss_wood_hcap = 0. - - !----- Loop over the patches to normalize the sum of all cohorts. ----------------! - patchloop: do ipa=1, csite%npatches - cpatch => csite%patch(ipa) - - if (cpatch%ncohorts > 0) then - pss_leaf_energy = pss_leaf_energy + sum(cpatch%leaf_energy)*csite%area(ipa) - pss_leaf_water = pss_leaf_water + sum(cpatch%leaf_water )*csite%area(ipa) - pss_leaf_hcap = pss_leaf_hcap + sum(cpatch%leaf_hcap )*csite%area(ipa) - pss_leaf_vpdef = pss_leaf_vpdef + sum(cpatch%leaf_vpdef )*csite%area(ipa) - pss_wood_energy = pss_wood_energy + sum(cpatch%wood_energy)*csite%area(ipa) - pss_wood_water = pss_wood_water + sum(cpatch%wood_water )*csite%area(ipa) - pss_wood_hcap = pss_wood_hcap + sum(cpatch%wood_hcap )*csite%area(ipa) - patch_lai_i = 1./max(tiny(1.),sum(cpatch%lai,cpatch%leaf_resolvable)) - patch_lai = patch_lai & - + csite%area(ipa) * sum(cpatch%lai,cpatch%leaf_resolvable) - patch_lma = patch_lma & - + csite%area(ipa) * sum(cpatch%lai/sla(cpatch%pft) & - ,cpatch%leaf_resolvable) - end if - - do ico=1,cpatch%ncohorts - if (cpatch%leaf_resolvable(ico)) then - !------------------------------------------------------------------------! - ! Energy and water fluxes. ! - !------------------------------------------------------------------------! - cpatch%dmean_par_l (ico) = cpatch%dmean_par_l (ico) & - + cpatch%mean_par_l (ico) - cpatch%dmean_par_l_beam (ico) = cpatch%dmean_par_l_beam (ico) & - + cpatch%mean_par_l_beam (ico) - cpatch%dmean_par_l_diff (ico) = cpatch%dmean_par_l_diff (ico) & - + cpatch%mean_par_l_diff (ico) - cpatch%dmean_rshort_l (ico) = cpatch%dmean_rshort_l (ico) & - + cpatch%mean_rshort_l (ico) - cpatch%dmean_rlong_l (ico) = cpatch%dmean_rlong_l (ico) & - + cpatch%mean_rlong_l (ico) - cpatch%dmean_sensible_lc (ico) = cpatch%dmean_sensible_lc (ico) & - + cpatch%mean_sensible_lc (ico) - cpatch%dmean_vapor_lc (ico) = cpatch%dmean_vapor_lc (ico) & - + cpatch%mean_vapor_lc (ico) - cpatch%dmean_transp (ico) = cpatch%dmean_transp (ico) & - + cpatch%mean_transp (ico) - cpatch%dmean_intercepted_al (ico) = cpatch%dmean_intercepted_al (ico) & - + cpatch%mean_intercepted_al (ico) - cpatch%dmean_wshed_lg (ico) = cpatch%dmean_wshed_lg (ico) & - + cpatch%mean_wshed_lg (ico) - !------------------------------------------------------------------------! - - - - !------------------------------------------------------------------------! - ! Integrate the photosynthesis-related variables and the light level ! - ! only if it is day time. ! - !------------------------------------------------------------------------! - if (rshort_tot > rshort_twilight_min) then - cpatch%dmean_fs_open (ico) = cpatch%dmean_fs_open (ico) & - + cpatch%fs_open (ico) - cpatch%dmean_fsw (ico) = cpatch%dmean_fsw (ico) & - + cpatch%fsw (ico) - cpatch%dmean_fsn (ico) = cpatch%dmean_fsn (ico) & - + cpatch%fsn (ico) - cpatch%dmean_psi_open (ico) = cpatch%dmean_psi_open (ico) & - + cpatch%psi_open (ico) - cpatch%dmean_psi_closed (ico) = cpatch%dmean_psi_closed (ico) & - + cpatch%psi_closed (ico) - cpatch%dmean_water_supply(ico) = cpatch%dmean_water_supply(ico) & - + cpatch%water_supply (ico) - cpatch%dmean_light_level(ico) = cpatch%dmean_light_level (ico) & - + cpatch%light_level (ico) - cpatch%dmean_light_level_beam(ico) = & - cpatch%dmean_light_level_beam(ico) & - + cpatch%light_level_beam(ico) - cpatch%dmean_light_level_diff(ico) = & - cpatch%dmean_light_level_diff(ico) & - + cpatch%light_level_diff(ico) - end if - !------------------------------------------------------------------------! - - - !------------------------------------------------------------------------! - ! Integrate the mean diurnal cycle only if the mean diurnal cycle ! - ! output is sought. This is also done for night time as the length of ! - ! the day may vary. ! - !------------------------------------------------------------------------! - if (iqoutput > 0) then - cpatch%qmean_fs_open (t,ico)=cpatch%qmean_fs_open (t,ico) & - +cpatch%fs_open (ico) - cpatch%qmean_fsw (t,ico)=cpatch%qmean_fsw (t,ico) & - +cpatch%fsw (ico) - cpatch%qmean_fsn (t,ico)=cpatch%qmean_fsn (t,ico) & - +cpatch%fsn (ico) - cpatch%qmean_psi_open (t,ico)=cpatch%qmean_psi_open (t,ico) & - +cpatch%psi_open (ico) - cpatch%qmean_psi_closed (t,ico)=cpatch%qmean_psi_closed (t,ico) & - +cpatch%psi_closed (ico) - cpatch%qmean_water_supply (t,ico)=cpatch%qmean_water_supply (t,ico) & - +cpatch%water_supply (ico) - cpatch%qmean_par_l (t,ico)=cpatch%qmean_par_l (t,ico) & - +cpatch%mean_par_l (ico) - cpatch%qmean_par_l_beam (t,ico)=cpatch%qmean_par_l_beam (t,ico) & - +cpatch%mean_par_l_beam (ico) - cpatch%qmean_par_l_diff (t,ico)=cpatch%qmean_par_l_diff (t,ico) & - +cpatch%mean_par_l_diff (ico) - cpatch%qmean_rshort_l (t,ico)=cpatch%qmean_rshort_l (t,ico) & - +cpatch%mean_rshort_l (ico) - cpatch%qmean_rlong_l (t,ico)=cpatch%qmean_rlong_l (t,ico) & - +cpatch%mean_rlong_l (ico) - cpatch%qmean_sensible_lc (t,ico)=cpatch%qmean_sensible_lc (t,ico) & - +cpatch%mean_sensible_lc (ico) - cpatch%qmean_vapor_lc (t,ico)=cpatch%qmean_vapor_lc (t,ico) & - +cpatch%mean_vapor_lc (ico) - cpatch%qmean_transp (t,ico)=cpatch%qmean_transp (t,ico) & - +cpatch%mean_transp (ico) - cpatch%qmean_intercepted_al(t,ico)=cpatch%qmean_intercepted_al(t,ico) & - +cpatch%mean_intercepted_al (ico) - cpatch%qmean_wshed_lg (t,ico)=cpatch%qmean_wshed_lg (t,ico) & - +cpatch%mean_wshed_lg (ico) - cpatch%qmean_rshort_w (t,ico)=cpatch%qmean_rshort_w (t,ico) & - +cpatch%mean_rshort_w (ico) - cpatch%qmean_rlong_w (t,ico)=cpatch%qmean_rlong_w (t,ico) & - +cpatch%mean_rlong_w (ico) - cpatch%qmean_sensible_wc (t,ico)=cpatch%qmean_sensible_wc (t,ico) & - +cpatch%mean_sensible_wc (ico) - cpatch%qmean_vapor_wc (t,ico)=cpatch%qmean_vapor_wc (t,ico) & - +cpatch%mean_vapor_wc (ico) - cpatch%qmean_intercepted_aw(t,ico)=cpatch%qmean_intercepted_aw(t,ico) & - +cpatch%mean_intercepted_aw (ico) - cpatch%qmean_wshed_wg (t,ico)=cpatch%qmean_wshed_wg (t,ico) & - +cpatch%mean_wshed_wg (ico) - - end if - !------------------------------------------------------------------------! - - end if - - if (cpatch%wood_resolvable(ico)) then - !------------------------------------------------------------------------! - ! Energy and water fluxes. ! - !------------------------------------------------------------------------! - cpatch%dmean_rshort_w (ico) = cpatch%dmean_rshort_w (ico) & - + cpatch%mean_rshort_w (ico) - cpatch%dmean_rlong_w (ico) = cpatch%dmean_rlong_w (ico) & - + cpatch%mean_rlong_w (ico) - cpatch%dmean_sensible_wc (ico) = cpatch%dmean_sensible_wc (ico) & - + cpatch%mean_sensible_wc (ico) - cpatch%dmean_vapor_wc (ico) = cpatch%dmean_vapor_wc (ico) & - + cpatch%mean_vapor_wc (ico) - cpatch%dmean_intercepted_aw (ico) = cpatch%dmean_intercepted_aw (ico) & - + cpatch%mean_intercepted_aw (ico) - cpatch%dmean_wshed_wg (ico) = cpatch%dmean_wshed_wg (ico) & - + cpatch%mean_wshed_wg (ico) - !------------------------------------------------------------------------! - end if - end do - end do patchloop - - !---------------------------------------------------------------------------------! - ! Variables already average at the sitetype level, just add them to polygon- ! - ! type level. ! - !---------------------------------------------------------------------------------! - - site_lai = site_lai + patch_lai * cpoly%area(isi) - site_lma = site_lma + patch_lma * cpoly%area(isi) - sss_leaf_energy = sss_leaf_energy + (pss_leaf_energy*site_area_i)*cpoly%area(isi) - sss_leaf_water = sss_leaf_water + (pss_leaf_water *site_area_i)*cpoly%area(isi) - sss_leaf_hcap = sss_leaf_hcap + (pss_leaf_hcap *site_area_i)*cpoly%area(isi) - sss_leaf_vpdef = sss_leaf_vpdef + (pss_leaf_vpdef *site_area_i)*cpoly%area(isi) - sss_wood_energy = sss_wood_energy + (pss_wood_energy*site_area_i)*cpoly%area(isi) - sss_wood_water = sss_wood_water + (pss_wood_water *site_area_i)*cpoly%area(isi) - sss_wood_hcap = sss_wood_hcap + (pss_wood_hcap *site_area_i)*cpoly%area(isi) - - - sss_can_theta = sss_can_theta + cpoly%area(isi) & - * ( sum(csite%can_theta * csite%area) & - * site_area_i ) - sss_can_theiv = sss_can_theiv + cpoly%area(isi) & - * ( sum(csite%can_theiv * csite%area) & - * site_area_i ) - sss_can_vpdef = sss_can_vpdef + cpoly%area(isi) & - * ( sum(csite%can_vpdef * csite%area) & - * site_area_i ) - sss_can_shv = sss_can_shv + cpoly%area(isi) & - * ( sum(csite%can_shv * csite%area) & - * site_area_i ) - sss_can_co2 = sss_can_co2 + cpoly%area(isi) & - * ( sum(csite%can_co2 * csite%area) & - * site_area_i ) - sss_can_prss = sss_can_prss + cpoly%area(isi) & - * ( sum(csite%can_prss * csite%area) & - * site_area_i ) - sss_gnd_temp = sss_gnd_temp + cpoly%area(isi) & - * ( sum(csite%ground_temp * csite%area) & - * site_area_i ) - sss_gnd_shv = sss_gnd_shv + cpoly%area(isi) & - * ( sum(csite%ground_shv * csite%area) & - * site_area_i ) - end do siteloop - - !------------------------------------------------------------------------------------! - ! Variables already averaged at the polygontype level, just add them to edtype ! - ! level. ! - !------------------------------------------------------------------------------------! - cgrid%dmean_leaf_energy(ipy) = cgrid%dmean_leaf_energy(ipy) & - + sss_leaf_energy * poly_area_i - cgrid%dmean_leaf_water(ipy) = cgrid%dmean_leaf_water(ipy) & - + sss_leaf_water * poly_area_i - cgrid%dmean_leaf_hcap(ipy) = cgrid%dmean_leaf_hcap(ipy) & - + sss_leaf_hcap * poly_area_i - cgrid%dmean_leaf_vpdef(ipy) = cgrid%dmean_leaf_vpdef(ipy) & - + sss_leaf_vpdef * poly_area_i - cgrid%dmean_wood_energy(ipy) = cgrid%dmean_wood_energy(ipy) & - + sss_wood_energy * poly_area_i - cgrid%dmean_wood_water(ipy) = cgrid%dmean_wood_water(ipy) & - + sss_wood_water * poly_area_i - cgrid%dmean_wood_hcap(ipy) = cgrid%dmean_wood_hcap(ipy) & - + sss_wood_hcap * poly_area_i - cgrid%dmean_can_theta(ipy) = cgrid%dmean_can_theta(ipy) & - + sss_can_theta * poly_area_i - cgrid%dmean_can_theiv(ipy) = cgrid%dmean_can_theiv(ipy) & - + sss_can_theiv * poly_area_i - cgrid%dmean_can_vpdef(ipy) = cgrid%dmean_can_vpdef(ipy) & - + sss_can_vpdef * poly_area_i - cgrid%dmean_can_shv(ipy) = cgrid%dmean_can_shv(ipy) & - + sss_can_shv * poly_area_i - cgrid%dmean_can_co2(ipy) = cgrid%dmean_can_co2(ipy) & - + sss_can_co2 * poly_area_i - cgrid%dmean_can_prss(ipy) = cgrid%dmean_can_prss(ipy) & - + sss_can_prss * poly_area_i - cgrid%dmean_gnd_temp(ipy) = cgrid%dmean_gnd_temp(ipy) & - + sss_gnd_temp * poly_area_i - cgrid%dmean_gnd_shv (ipy) = cgrid%dmean_gnd_shv (ipy) & - + sss_gnd_shv * poly_area_i - - !------------------------------------------------------------------------------------! - ! Meteorological forcing variables: even though we read in at polygon level, ! - ! here we run the site-level weighted average, because this is what ED really uses. ! - !------------------------------------------------------------------------------------! - do isi=1,cpoly%nsites - cgrid%dmean_atm_temp(ipy) = cgrid%dmean_atm_temp(ipy) & - + cpoly%met(isi)%atm_tmp & - * cpoly%area(isi) * poly_area_i - cgrid%dmean_atm_vpdef(ipy) = cgrid%dmean_atm_vpdef(ipy) & - + cpoly%met(isi)%atm_vpdef & - * cpoly%area(isi) * poly_area_i - cgrid%dmean_rshort(ipy) = cgrid%dmean_rshort(ipy) & - + ( cpoly%met(isi)%nir_beam & - + cpoly%met(isi)%nir_diffuse & - + cpoly%met(isi)%par_beam & - + cpoly%met(isi)%par_diffuse ) & - * cpoly%area(isi) * poly_area_i - cgrid%dmean_rshort_diff(ipy) = cgrid%dmean_rshort_diff(ipy) & - + ( cpoly%met(isi)%nir_diffuse & - + cpoly%met(isi)%par_diffuse ) & - * cpoly%area(isi) * poly_area_i - cgrid%dmean_par(ipy) = cgrid%dmean_par(ipy) & - + ( cpoly%met(isi)%par_beam & - + cpoly%met(isi)%par_diffuse ) & - * cpoly%area(isi) * poly_area_i - cgrid%dmean_par_diff(ipy) = cgrid%dmean_par_diff(ipy) & - + cpoly%met(isi)%par_diffuse & - * cpoly%area(isi) * poly_area_i - cgrid%dmean_rlong(ipy) = cgrid%dmean_rlong(ipy) & - + cpoly%met(isi)%rlong & - * cpoly%area(isi) * poly_area_i - cgrid%dmean_atm_shv (ipy) = cgrid%dmean_atm_shv (ipy) & - + cpoly%met(isi)%atm_shv & - * cpoly%area(isi) * poly_area_i - cgrid%dmean_atm_co2 (ipy) = cgrid%dmean_atm_co2 (ipy) & - + cpoly%met(isi)%atm_co2 & - * cpoly%area(isi) * poly_area_i - cgrid%dmean_atm_prss(ipy) = cgrid%dmean_atm_prss(ipy) & - + cpoly%met(isi)%prss & - * cpoly%area(isi) * poly_area_i - cgrid%dmean_atm_vels(ipy) = cgrid%dmean_atm_vels(ipy) & - + cpoly%met(isi)%vels & - * cpoly%area(isi) * poly_area_i - end do - !------------------------------------------------------------------------------------! - - - if(site_lai > tiny(1.))then - cgrid%avg_lma(ipy) = site_lma/site_lai - end if !------------------------------------------------------------------------------------! - ! If we are integrating the mean diurnal cycle, sum them too. ! + ! Integrate polygon-level variables. ! + !------------------------------------------------------------------------------------! + cgrid%dmean_gpp (ipy) = cgrid%dmean_gpp (ipy) & + + cgrid%fmean_gpp (ipy) & + * frqsum_o_daysec + cgrid%dmean_npp (ipy) = cgrid%dmean_npp (ipy) & + + cgrid%fmean_npp (ipy) & + * frqsum_o_daysec + cgrid%dmean_leaf_resp (ipy) = cgrid%dmean_leaf_resp (ipy) & + + cgrid%fmean_leaf_resp (ipy) & + * frqsum_o_daysec + cgrid%dmean_root_resp (ipy) = cgrid%dmean_root_resp (ipy) & + + cgrid%fmean_root_resp (ipy) & + * frqsum_o_daysec + cgrid%dmean_growth_resp (ipy) = cgrid%dmean_growth_resp (ipy) & + + cgrid%fmean_growth_resp (ipy) & + * frqsum_o_daysec + cgrid%dmean_storage_resp (ipy) = cgrid%dmean_storage_resp (ipy) & + + cgrid%fmean_storage_resp (ipy) & + * frqsum_o_daysec + cgrid%dmean_vleaf_resp (ipy) = cgrid%dmean_vleaf_resp (ipy) & + + cgrid%fmean_vleaf_resp (ipy) & + * frqsum_o_daysec + cgrid%dmean_plresp (ipy) = cgrid%dmean_plresp (ipy) & + + cgrid%fmean_plresp (ipy) & + * frqsum_o_daysec + cgrid%dmean_leaf_energy (ipy) = cgrid%dmean_leaf_energy (ipy) & + + cgrid%fmean_leaf_energy (ipy) & + * frqsum_o_daysec + cgrid%dmean_leaf_water (ipy) = cgrid%dmean_leaf_water (ipy) & + + cgrid%fmean_leaf_water (ipy) & + * frqsum_o_daysec + cgrid%dmean_leaf_hcap (ipy) = cgrid%dmean_leaf_hcap (ipy) & + + cgrid%fmean_leaf_hcap (ipy) & + * frqsum_o_daysec + cgrid%dmean_leaf_vpdef (ipy) = cgrid%dmean_leaf_vpdef (ipy) & + + cgrid%fmean_leaf_vpdef (ipy) & + * frqsum_o_daysec + cgrid%dmean_leaf_gsw (ipy) = cgrid%dmean_leaf_gsw (ipy) & + + cgrid%fmean_leaf_gsw (ipy) & + * frqsum_o_daysec + cgrid%dmean_leaf_gbw (ipy) = cgrid%dmean_leaf_gbw (ipy) & + + cgrid%fmean_leaf_gbw (ipy) & + * frqsum_o_daysec + cgrid%dmean_wood_energy (ipy) = cgrid%dmean_wood_energy (ipy) & + + cgrid%fmean_wood_energy (ipy) & + * frqsum_o_daysec + cgrid%dmean_wood_water (ipy) = cgrid%dmean_wood_water (ipy) & + + cgrid%fmean_wood_water (ipy) & + * frqsum_o_daysec + cgrid%dmean_wood_hcap (ipy) = cgrid%dmean_wood_hcap (ipy) & + + cgrid%fmean_wood_hcap (ipy) & + * frqsum_o_daysec + cgrid%dmean_wood_gbw (ipy) = cgrid%dmean_wood_gbw (ipy) & + + cgrid%fmean_wood_gbw (ipy) & + * frqsum_o_daysec + cgrid%dmean_psi_open (ipy) = cgrid%dmean_psi_open (ipy) & + + cgrid%fmean_psi_open (ipy) & + * frqsum_o_daysec + cgrid%dmean_psi_closed (ipy) = cgrid%dmean_psi_closed (ipy) & + + cgrid%fmean_psi_closed (ipy) & + * frqsum_o_daysec + cgrid%dmean_water_supply (ipy) = cgrid%dmean_water_supply (ipy) & + + cgrid%fmean_water_supply (ipy) & + * frqsum_o_daysec + cgrid%dmean_par_l (ipy) = cgrid%dmean_par_l (ipy) & + + cgrid%fmean_par_l (ipy) & + * frqsum_o_daysec + cgrid%dmean_par_l_beam (ipy) = cgrid%dmean_par_l_beam (ipy) & + + cgrid%fmean_par_l_beam (ipy) & + * frqsum_o_daysec + cgrid%dmean_par_l_diff (ipy) = cgrid%dmean_par_l_diff (ipy) & + + cgrid%fmean_par_l_diff (ipy) & + * frqsum_o_daysec + cgrid%dmean_rshort_l (ipy) = cgrid%dmean_rshort_l (ipy) & + + cgrid%fmean_rshort_l (ipy) & + * frqsum_o_daysec + cgrid%dmean_rlong_l (ipy) = cgrid%dmean_rlong_l (ipy) & + + cgrid%fmean_rlong_l (ipy) & + * frqsum_o_daysec + cgrid%dmean_sensible_lc (ipy) = cgrid%dmean_sensible_lc (ipy) & + + cgrid%fmean_sensible_lc (ipy) & + * frqsum_o_daysec + cgrid%dmean_vapor_lc (ipy) = cgrid%dmean_vapor_lc (ipy) & + + cgrid%fmean_vapor_lc (ipy) & + * frqsum_o_daysec + cgrid%dmean_transp (ipy) = cgrid%dmean_transp (ipy) & + + cgrid%fmean_transp (ipy) & + * frqsum_o_daysec + cgrid%dmean_intercepted_al (ipy) = cgrid%dmean_intercepted_al (ipy) & + + cgrid%fmean_intercepted_al (ipy) & + * frqsum_o_daysec + cgrid%dmean_wshed_lg (ipy) = cgrid%dmean_wshed_lg (ipy) & + + cgrid%fmean_wshed_lg (ipy) & + * frqsum_o_daysec + cgrid%dmean_rshort_w (ipy) = cgrid%dmean_rshort_w (ipy) & + + cgrid%fmean_rshort_w (ipy) & + * frqsum_o_daysec + cgrid%dmean_rlong_w (ipy) = cgrid%dmean_rlong_w (ipy) & + + cgrid%fmean_rlong_w (ipy) & + * frqsum_o_daysec + cgrid%dmean_sensible_wc (ipy) = cgrid%dmean_sensible_wc (ipy) & + + cgrid%fmean_sensible_wc (ipy) & + * frqsum_o_daysec + cgrid%dmean_vapor_wc (ipy) = cgrid%dmean_vapor_wc (ipy) & + + cgrid%fmean_vapor_wc (ipy) & + * frqsum_o_daysec + cgrid%dmean_intercepted_aw (ipy) = cgrid%dmean_intercepted_aw (ipy) & + + cgrid%fmean_intercepted_aw (ipy) & + * frqsum_o_daysec + cgrid%dmean_wshed_wg (ipy) = cgrid%dmean_wshed_wg (ipy) & + + cgrid%fmean_wshed_wg (ipy) & + * frqsum_o_daysec + cgrid%dmean_rh (ipy) = cgrid%dmean_rh (ipy) & + + cgrid%fmean_rh (ipy) & + * frqsum_o_daysec + cgrid%dmean_cwd_rh (ipy) = cgrid%dmean_cwd_rh (ipy) & + + cgrid%fmean_cwd_rh (ipy) & + * frqsum_o_daysec + cgrid%dmean_nep (ipy) = cgrid%dmean_nep (ipy) & + + cgrid%fmean_nep (ipy) & + * frqsum_o_daysec + cgrid%dmean_rk4step (ipy) = cgrid%dmean_rk4step (ipy) & + + cgrid%fmean_rk4step (ipy) & + * frqsum_o_daysec + cgrid%dmean_available_water(ipy) = cgrid%dmean_available_water(ipy) & + + cgrid%fmean_available_water(ipy) & + * frqsum_o_daysec + cgrid%dmean_can_theiv (ipy) = cgrid%dmean_can_theiv (ipy) & + + cgrid%fmean_can_theiv (ipy) & + * frqsum_o_daysec + cgrid%dmean_can_theta (ipy) = cgrid%dmean_can_theta (ipy) & + + cgrid%fmean_can_theta (ipy) & + * frqsum_o_daysec + cgrid%dmean_can_vpdef (ipy) = cgrid%dmean_can_vpdef (ipy) & + + cgrid%fmean_can_vpdef (ipy) & + * frqsum_o_daysec + cgrid%dmean_can_temp (ipy) = cgrid%dmean_can_temp (ipy) & + + cgrid%fmean_can_temp (ipy) & + * frqsum_o_daysec + cgrid%dmean_can_shv (ipy) = cgrid%dmean_can_shv (ipy) & + + cgrid%fmean_can_shv (ipy) & + * frqsum_o_daysec + cgrid%dmean_can_co2 (ipy) = cgrid%dmean_can_co2 (ipy) & + + cgrid%fmean_can_co2 (ipy) & + * frqsum_o_daysec + cgrid%dmean_can_rhos (ipy) = cgrid%dmean_can_rhos (ipy) & + + cgrid%fmean_can_rhos (ipy) & + * frqsum_o_daysec + cgrid%dmean_can_prss (ipy) = cgrid%dmean_can_prss (ipy) & + + cgrid%fmean_can_prss (ipy) & + * frqsum_o_daysec + cgrid%dmean_gnd_temp (ipy) = cgrid%dmean_gnd_temp (ipy) & + + cgrid%fmean_gnd_temp (ipy) & + * frqsum_o_daysec + cgrid%dmean_gnd_shv (ipy) = cgrid%dmean_gnd_shv (ipy) & + + cgrid%fmean_gnd_shv (ipy) & + * frqsum_o_daysec + cgrid%dmean_can_ggnd (ipy) = cgrid%dmean_can_ggnd (ipy) & + + cgrid%fmean_can_ggnd (ipy) & + * frqsum_o_daysec + cgrid%dmean_sfcw_depth (ipy) = cgrid%dmean_sfcw_depth (ipy) & + + cgrid%fmean_sfcw_depth (ipy) & + * frqsum_o_daysec + !------ Integrate the extensive version of temporary surface water energy. ----------! + cgrid%dmean_sfcw_energy (ipy) = cgrid%dmean_sfcw_energy (ipy) & + + cgrid%fmean_sfcw_energy (ipy) & + * cgrid%fmean_sfcw_mass (ipy) & + * frqsum_o_daysec + cgrid%dmean_sfcw_mass (ipy) = cgrid%dmean_sfcw_mass (ipy) & + + cgrid%fmean_sfcw_mass (ipy) & + * frqsum_o_daysec + cgrid%dmean_rshort_gnd (ipy) = cgrid%dmean_rshort_gnd (ipy) & + + cgrid%fmean_rshort_gnd (ipy) & + * frqsum_o_daysec + cgrid%dmean_par_gnd (ipy) = cgrid%dmean_par_gnd (ipy) & + + cgrid%fmean_par_gnd (ipy) & + * frqsum_o_daysec + cgrid%dmean_rlong_gnd (ipy) = cgrid%dmean_rlong_gnd (ipy) & + + cgrid%fmean_rlong_gnd (ipy) & + * frqsum_o_daysec + cgrid%dmean_rlongup (ipy) = cgrid%dmean_rlongup (ipy) & + + cgrid%fmean_rlongup (ipy) & + * frqsum_o_daysec + cgrid%dmean_parup (ipy) = cgrid%dmean_parup (ipy) & + + cgrid%fmean_parup (ipy) & + * frqsum_o_daysec + cgrid%dmean_nirup (ipy) = cgrid%dmean_nirup (ipy) & + + cgrid%fmean_nirup (ipy) & + * frqsum_o_daysec + cgrid%dmean_rshortup (ipy) = cgrid%dmean_rshortup (ipy) & + + cgrid%fmean_rshortup (ipy) & + * frqsum_o_daysec + cgrid%dmean_rnet (ipy) = cgrid%dmean_rnet (ipy) & + + cgrid%fmean_rnet (ipy) & + * frqsum_o_daysec + cgrid%dmean_rlong_albedo (ipy) = cgrid%dmean_rlong_albedo (ipy) & + + cgrid%fmean_rlong_albedo (ipy) & + * frqsum_o_daysec + cgrid%dmean_ustar (ipy) = cgrid%dmean_ustar (ipy) & + + cgrid%fmean_ustar (ipy) & + * frqsum_o_daysec + cgrid%dmean_tstar (ipy) = cgrid%dmean_tstar (ipy) & + + cgrid%fmean_tstar (ipy) & + * frqsum_o_daysec + cgrid%dmean_qstar (ipy) = cgrid%dmean_qstar (ipy) & + + cgrid%fmean_qstar (ipy) & + * frqsum_o_daysec + cgrid%dmean_cstar (ipy) = cgrid%dmean_cstar (ipy) & + + cgrid%fmean_cstar (ipy) & + * frqsum_o_daysec + cgrid%dmean_carbon_ac (ipy) = cgrid%dmean_carbon_ac (ipy) & + + cgrid%fmean_carbon_ac (ipy) & + * frqsum_o_daysec + cgrid%dmean_carbon_st (ipy) = cgrid%dmean_carbon_st (ipy) & + + cgrid%fmean_carbon_st (ipy) & + * frqsum_o_daysec + cgrid%dmean_vapor_gc (ipy) = cgrid%dmean_vapor_gc (ipy) & + + cgrid%fmean_vapor_gc (ipy) & + * frqsum_o_daysec + cgrid%dmean_vapor_ac (ipy) = cgrid%dmean_vapor_ac (ipy) & + + cgrid%fmean_vapor_ac (ipy) & + * frqsum_o_daysec + cgrid%dmean_throughfall (ipy) = cgrid%dmean_throughfall (ipy) & + + cgrid%fmean_throughfall (ipy) & + * frqsum_o_daysec + cgrid%dmean_runoff (ipy) = cgrid%dmean_runoff (ipy) & + + cgrid%fmean_runoff (ipy) & + * frqsum_o_daysec + cgrid%dmean_drainage (ipy) = cgrid%dmean_drainage (ipy) & + + cgrid%fmean_drainage (ipy) & + * frqsum_o_daysec + cgrid%dmean_sensible_gc (ipy) = cgrid%dmean_sensible_gc (ipy) & + + cgrid%fmean_sensible_gc (ipy) & + * frqsum_o_daysec + cgrid%dmean_sensible_ac (ipy) = cgrid%dmean_sensible_ac (ipy) & + + cgrid%fmean_sensible_ac (ipy) & + * frqsum_o_daysec + cgrid%dmean_qthroughfall (ipy) = cgrid%dmean_qthroughfall (ipy) & + + cgrid%fmean_qthroughfall (ipy) & + * frqsum_o_daysec + cgrid%dmean_qrunoff (ipy) = cgrid%dmean_qrunoff (ipy) & + + cgrid%fmean_qrunoff (ipy) & + * frqsum_o_daysec + cgrid%dmean_qdrainage (ipy) = cgrid%dmean_qdrainage (ipy) & + + cgrid%fmean_qdrainage (ipy) & + * frqsum_o_daysec + cgrid%dmean_atm_theiv (ipy) = cgrid%dmean_atm_theiv (ipy) & + + cgrid%fmean_atm_theiv (ipy) & + * frqsum_o_daysec + cgrid%dmean_atm_theta (ipy) = cgrid%dmean_atm_theta (ipy) & + + cgrid%fmean_atm_theta (ipy) & + * frqsum_o_daysec + cgrid%dmean_atm_vpdef (ipy) = cgrid%dmean_atm_vpdef (ipy) & + + cgrid%fmean_atm_vpdef (ipy) & + * frqsum_o_daysec + cgrid%dmean_atm_shv (ipy) = cgrid%dmean_atm_shv (ipy) & + + cgrid%fmean_atm_shv (ipy) & + * frqsum_o_daysec + cgrid%dmean_atm_rshort (ipy) = cgrid%dmean_atm_rshort (ipy) & + + cgrid%fmean_atm_rshort (ipy) & + * frqsum_o_daysec + cgrid%dmean_atm_rshort_diff(ipy) = cgrid%dmean_atm_rshort_diff(ipy) & + + cgrid%fmean_atm_rshort_diff(ipy) & + * frqsum_o_daysec + cgrid%dmean_atm_par (ipy) = cgrid%dmean_atm_par (ipy) & + + cgrid%fmean_atm_par (ipy) & + * frqsum_o_daysec + cgrid%dmean_atm_par_diff (ipy) = cgrid%dmean_atm_par_diff (ipy) & + + cgrid%fmean_atm_par_diff (ipy) & + * frqsum_o_daysec + cgrid%dmean_atm_rlong (ipy) = cgrid%dmean_atm_rlong (ipy) & + + cgrid%fmean_atm_rlong (ipy) & + * frqsum_o_daysec + cgrid%dmean_atm_vels (ipy) = cgrid%dmean_atm_vels (ipy) & + + cgrid%fmean_atm_vels (ipy) & + * frqsum_o_daysec + cgrid%dmean_atm_prss (ipy) = cgrid%dmean_atm_prss (ipy) & + + cgrid%fmean_atm_prss (ipy) & + * frqsum_o_daysec + cgrid%dmean_atm_co2 (ipy) = cgrid%dmean_atm_co2 (ipy) & + + cgrid%fmean_atm_co2 (ipy) & + * frqsum_o_daysec + cgrid%dmean_pcpg (ipy) = cgrid%dmean_pcpg (ipy) & + + cgrid%fmean_pcpg (ipy) & + * frqsum_o_daysec + cgrid%dmean_qpcpg (ipy) = cgrid%dmean_qpcpg (ipy) & + + cgrid%fmean_qpcpg (ipy) & + * frqsum_o_daysec + cgrid%dmean_dpcpg (ipy) = cgrid%dmean_dpcpg (ipy) & + + cgrid%fmean_dpcpg (ipy) & + * frqsum_o_daysec + cgrid%dmean_soil_energy (:,ipy) = cgrid%dmean_soil_energy (:,ipy) & + + cgrid%fmean_soil_energy (:,ipy) & + * frqsum_o_daysec + cgrid%dmean_soil_mstpot (:,ipy) = cgrid%dmean_soil_mstpot (:,ipy) & + + cgrid%fmean_soil_mstpot (:,ipy) & + * frqsum_o_daysec + cgrid%dmean_soil_water (:,ipy) = cgrid%dmean_soil_water (:,ipy) & + + cgrid%fmean_soil_water (:,ipy) & + * frqsum_o_daysec + cgrid%dmean_smoist_gg (:,ipy) = cgrid%dmean_smoist_gg (:,ipy) & + + cgrid%fmean_smoist_gg (:,ipy) & + * frqsum_o_daysec + cgrid%dmean_transloss (:,ipy) = cgrid%dmean_transloss (:,ipy) & + + cgrid%fmean_transloss (:,ipy) & + * frqsum_o_daysec + cgrid%dmean_sensible_gg (:,ipy) = cgrid%dmean_sensible_gg (:,ipy) & + + cgrid%fmean_sensible_gg (:,ipy) & + * frqsum_o_daysec !------------------------------------------------------------------------------------! - if (iqoutput > 0) then - cgrid%qmean_leaf_energy (t,ipy) = cgrid%qmean_leaf_energy (t,ipy) & - + sss_leaf_energy * poly_area_i - cgrid%qmean_leaf_water (t,ipy) = cgrid%qmean_leaf_water (t,ipy) & - + sss_leaf_water * poly_area_i - cgrid%qmean_leaf_hcap (t,ipy) = cgrid%qmean_leaf_hcap (t,ipy) & - + sss_leaf_hcap * poly_area_i - cgrid%qmean_leaf_vpdef (t,ipy) = cgrid%qmean_leaf_vpdef (t,ipy) & - + sss_leaf_vpdef * poly_area_i - cgrid%qmean_wood_energy (t,ipy) = cgrid%qmean_wood_energy (t,ipy) & - + sss_wood_energy * poly_area_i - cgrid%qmean_wood_water (t,ipy) = cgrid%qmean_wood_water (t,ipy) & - + sss_wood_water * poly_area_i - cgrid%qmean_wood_hcap (t,ipy) = cgrid%qmean_wood_hcap (t,ipy) & - + sss_wood_hcap * poly_area_i - cgrid%qmean_can_theta (t,ipy) = cgrid%qmean_can_theta (t,ipy) & - + sss_can_theta * poly_area_i - cgrid%qmean_can_theiv (t,ipy) = cgrid%qmean_can_theiv (t,ipy) & - + sss_can_theiv * poly_area_i - cgrid%qmean_can_vpdef (t,ipy) = cgrid%qmean_can_vpdef (t,ipy) & - + sss_can_vpdef * poly_area_i - cgrid%qmean_can_shv (t,ipy) = cgrid%qmean_can_shv (t,ipy) & - + sss_can_shv * poly_area_i - cgrid%qmean_can_co2 (t,ipy) = cgrid%qmean_can_co2 (t,ipy) & - + sss_can_co2 * poly_area_i - cgrid%qmean_can_prss (t,ipy) = cgrid%qmean_can_prss (t,ipy) & - + sss_can_prss * poly_area_i - cgrid%qmean_gnd_temp (t,ipy) = cgrid%qmean_gnd_temp (t,ipy) & - + sss_gnd_temp * poly_area_i - cgrid%qmean_gnd_shv (t,ipy) = cgrid%qmean_gnd_shv (t,ipy) & - + sss_gnd_shv * poly_area_i - !---------------------------------------------------------------------------------! - ! Meteorological forcing variables: even though we read in at polygon level, ! - ! here we run the site-level weighted average, because this is what ED really ! - ! uses. ! - !---------------------------------------------------------------------------------! - do isi=1,cpoly%nsites - cgrid%qmean_atm_temp (t,ipy) = cgrid%qmean_atm_temp (t,ipy) & - + cpoly%met(isi)%atm_tmp & - * cpoly%area(isi) * poly_area_i - cgrid%qmean_atm_vpdef (t,ipy) = cgrid%qmean_atm_vpdef (t,ipy) & - + cpoly%met(isi)%atm_vpdef & - * cpoly%area(isi) * poly_area_i - cgrid%qmean_rshort (t,ipy) = cgrid%qmean_rshort (t,ipy) & - + ( cpoly%met(isi)%nir_beam & - + cpoly%met(isi)%nir_diffuse & - + cpoly%met(isi)%par_beam & - + cpoly%met(isi)%par_diffuse ) & - * cpoly%area(isi) * poly_area_i - cgrid%qmean_rshort_diff (t,ipy) = cgrid%qmean_rshort_diff (t,ipy) & - + ( cpoly%met(isi)%nir_diffuse & - + cpoly%met(isi)%par_diffuse ) & - * cpoly%area(isi) * poly_area_i - cgrid%qmean_par (t,ipy) = cgrid%qmean_par (t,ipy) & - + ( cpoly%met(isi)%par_beam & - + cpoly%met(isi)%par_diffuse ) & - * cpoly%area(isi) * poly_area_i - cgrid%qmean_par_diff (t,ipy) = cgrid%qmean_par_diff (t,ipy) & - + cpoly%met(isi)%par_diffuse & - * cpoly%area(isi) * poly_area_i - cgrid%qmean_rlong (t,ipy) = cgrid%qmean_rlong (t,ipy) & - + cpoly%met(isi)%rlong & - * cpoly%area(isi) * poly_area_i - cgrid%qmean_atm_shv (t,ipy) = cgrid%qmean_atm_shv (t,ipy) & - + cpoly%met(isi)%atm_shv & - * cpoly%area(isi) * poly_area_i - cgrid%qmean_atm_co2 (t,ipy) = cgrid%qmean_atm_co2 (t,ipy) & - + cpoly%met(isi)%atm_co2 & - * cpoly%area(isi) * poly_area_i - cgrid%qmean_atm_prss (t,ipy) = cgrid%qmean_atm_prss (t,ipy) & - + cpoly%met(isi)%prss & - * cpoly%area(isi) * poly_area_i - cgrid%qmean_atm_vels (t,ipy) = cgrid%qmean_atm_vels (t,ipy) & - + cpoly%met(isi)%vels & - * cpoly%area(isi) * poly_area_i - end do - end if - end do polyloop - - return -end subroutine integrate_ed_daily_output_state -!==========================================================================================! -!==========================================================================================! - - - - - - -!==========================================================================================! -!==========================================================================================! -! This subroutine integrates the daily average. This is called at the analysis time in ! -! case at least one of daily means, monthly means, and mean diurnal cycle output is ! -! sought. We take advantage from the previously averaged variables. ! -!------------------------------------------------------------------------------------------! -subroutine integrate_ed_daily_output_flux(cgrid) - use ed_state_vars , only : edtype & ! structure - , polygontype & ! structure - , sitetype & ! structure - , patchtype ! ! structure - use grid_coms , only : nzg & ! intent(in) - , time ! ! intent(in) - use ed_max_dims , only : n_dbh & ! intent(in) - , n_pft & ! intent(in) - , n_dist_types ! ! intent(in) - use ed_misc_coms , only : dtlsm & ! intent(in) - , ddbhi & ! intent(in) - , iqoutput & ! intent(in) - , frqfast & ! intent(in) - , ndcycle & ! intent(in) - , current_time ! ! intent(in) - use pft_coms , only : c2n_leaf ! ! intent(in) - use consts_coms , only : day_sec & ! intent(in) - , umols_2_kgCyr ! ! intent(in) - use canopy_radiation_coms, only : rshort_twilight_min & ! intent(in) - , cosz_min ! ! intent(in) - implicit none - - !----- Arguments. ----------------------------------------------------------------------! - type(edtype) , target :: cgrid - !----- Local variables. ----------------------------------------------------------------! - type(polygontype) , pointer :: cpoly - type(sitetype) , pointer :: csite - type(patchtype) , pointer :: cpatch - integer :: ipy - integer :: isi - integer :: ipa - integer :: ico - integer :: k - integer :: ilu - integer :: idbh - integer :: t - real :: poly_area_i - real :: site_area_i - real :: forest_site - real :: forest_site_i - real :: forest_poly - real :: sitesum_gpp - real, dimension(n_dbh) :: sitesum_gpp_dbh - real, dimension(n_dist_types) :: sitesum_gpp_lu - real, dimension(n_dist_types) :: sitesum_rh_lu - real, dimension(n_dist_types) :: sitesum_nep_lu - real :: sitesum_rh - real :: sitesum_evap - real :: sitesum_transp - real :: sitesum_Nuptake - real :: sitesum_sensible_tot - real :: sitesum_co2_residual - real :: sitesum_energy_residual - real :: sitesum_water_residual - real :: sitesum_root_litter - real :: sitesum_leaf_litter - real :: sitesum_root_litterN - real :: sitesum_leaf_litterN - real :: sitesum_Nmin_input - real :: sitesum_Nmin_loss - real :: patchsum_leaf_litter - real :: patchsum_root_litter - real :: patchsum_leaf_litterN - real :: patchsum_root_litterN - real :: rshort_tot - !---------------------------------------------------------------------------------------! - - - !---------------------------------------------------------------------------------------! - ! Find the index corresponding to this time of the day for the mean diurnal cycle ! - ! averages. ! - !---------------------------------------------------------------------------------------! - t = ceiling(mod(current_time%time,day_sec)/frqfast) - if (t == 0) t = nint(day_sec/frqfast) - !---------------------------------------------------------------------------------------! - !---------------------------------------------------------------------------------------! - ! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! ! - !---------------------------------------------------------------------------------------! - ! Please, don't initialise polygon-level (cgrid) variables outside polyloop. ! - ! This works in off-line runs, but it causes memory leaks (and crashes) in the coupled ! - ! runs over the ocean, where cgrid%npolygons can be 0 if one of the sub-domains falls ! - ! entirely over the ocean. Thanks! ! - !---------------------------------------------------------------------------------------! - ! cgrid%blah = 0. !<<--- This is a bad way of doing, look inside the loop for the safe - ! ! way of initialising the variable. - !---------------------------------------------------------------------------------------! - polyloop: do ipy=1,cgrid%npolygons !------------------------------------------------------------------------------------! - ! This is the right and safe place to initialise polygon-level (cgrid) vari- ! - ! ables, so in case npolygons is zero this will not cause memory leaks. I know, ! - ! this never happens in off-line runs, but it is quite common in coupled runs... ! - ! Whenever one of the nodes receives a sub-domain where all the points are over the ! - ! ocean, ED will not assign any polygon in that sub-domain, which means that that ! - ! node will have 0 polygons, and the variables cannot be allocated. If you try to ! - ! access the polygon level variable outside the loop, then the model crashes due to ! - ! segmentation violation (a bad thing), whereas by putting the variables here both ! - ! the off-line model and the coupled runs will work, because this loop will be skip- ! - ! ped when there is no polygon. ! - !------------------------------------------------------------------------------------! - cgrid%Nbiomass_uptake (ipy) = 0. - cgrid%Cleaf_litter_flux(ipy) = 0. - cgrid%Croot_litter_flux(ipy) = 0. - cgrid%Nleaf_litter_flux(ipy) = 0. - cgrid%Nroot_litter_flux(ipy) = 0. - cgrid%Ngross_min (ipy) = 0. - cgrid%Nnet_min (ipy) = 0. + ! Site loop. ! !------------------------------------------------------------------------------------! + siteloop: do isi=1,cpoly%nsites + csite => cpoly%site(isi) - cpoly => cgrid%polygon(ipy) - poly_area_i=1./sum(cpoly%area) - - - !---- Initialize auxiliary variables to add sitetype variables. ---------------------! - sitesum_leaf_litter = 0. - sitesum_root_litter = 0. - sitesum_leaf_litterN = 0. - sitesum_root_litterN = 0. - sitesum_Nuptake = 0. - sitesum_Nmin_loss = 0. - sitesum_Nmin_input = 0. - sitesum_gpp_dbh = 0. - sitesum_evap = 0. - sitesum_transp = 0. - sitesum_co2_residual = 0. - sitesum_water_residual = 0. - sitesum_energy_residual = 0. - forest_poly = 0. - - siteloop: do isi=1, cpoly%nsites !---------------------------------------------------------------------------------! - ! Determine if there was any beam radiation, and compute the total (I think ! - ! rshort is always the total, but not sure. This is the same test done in the ! - ! radiation driver. ! + ! Integrate site-level variables. ! !---------------------------------------------------------------------------------! - if (cpoly%cosaoi(isi) <= cosz_min) then - rshort_tot = cpoly%met(isi)%rshort_diffuse - else - rshort_tot = cpoly%met(isi)%rshort - end if + cpoly%dmean_atm_theiv (isi) = cpoly%dmean_atm_theiv (isi) & + + cpoly%fmean_atm_theiv (isi) & + * frqsum_o_daysec + cpoly%dmean_atm_theta (isi) = cpoly%dmean_atm_theta (isi) & + + cpoly%fmean_atm_theta (isi) & + * frqsum_o_daysec + cpoly%dmean_atm_temp (isi) = cpoly%dmean_atm_temp (isi) & + + cpoly%fmean_atm_temp (isi) & + * frqsum_o_daysec + cpoly%dmean_atm_vpdef (isi) = cpoly%dmean_atm_vpdef (isi) & + + cpoly%fmean_atm_vpdef (isi) & + * frqsum_o_daysec + cpoly%dmean_atm_shv (isi) = cpoly%dmean_atm_shv (isi) & + + cpoly%fmean_atm_shv (isi) & + * frqsum_o_daysec + cpoly%dmean_atm_rshort (isi) = cpoly%dmean_atm_rshort (isi) & + + cpoly%fmean_atm_rshort (isi) & + * frqsum_o_daysec + cpoly%dmean_atm_rshort_diff(isi) = cpoly%dmean_atm_rshort_diff(isi) & + + cpoly%fmean_atm_rshort_diff(isi) & + * frqsum_o_daysec + cpoly%dmean_atm_par (isi) = cpoly%dmean_atm_par (isi) & + + cpoly%fmean_atm_par (isi) & + * frqsum_o_daysec + cpoly%dmean_atm_par_diff (isi) = cpoly%dmean_atm_par_diff (isi) & + + cpoly%fmean_atm_par_diff (isi) & + * frqsum_o_daysec + cpoly%dmean_atm_rlong (isi) = cpoly%dmean_atm_rlong (isi) & + + cpoly%fmean_atm_rlong (isi) & + * frqsum_o_daysec + cpoly%dmean_atm_vels (isi) = cpoly%dmean_atm_vels (isi) & + + cpoly%fmean_atm_vels (isi) & + * frqsum_o_daysec + cpoly%dmean_atm_rhos (isi) = cpoly%dmean_atm_rhos (isi) & + + cpoly%fmean_atm_rhos (isi) & + * frqsum_o_daysec + cpoly%dmean_atm_prss (isi) = cpoly%dmean_atm_prss (isi) & + + cpoly%fmean_atm_prss (isi) & + * frqsum_o_daysec + cpoly%dmean_atm_co2 (isi) = cpoly%dmean_atm_co2 (isi) & + + cpoly%fmean_atm_co2 (isi) & + * frqsum_o_daysec + cpoly%dmean_pcpg (isi) = cpoly%dmean_pcpg (isi) & + + cpoly%fmean_pcpg (isi) & + * frqsum_o_daysec + cpoly%dmean_qpcpg (isi) = cpoly%dmean_qpcpg (isi) & + + cpoly%fmean_qpcpg (isi) & + * frqsum_o_daysec + cpoly%dmean_dpcpg (isi) = cpoly%dmean_dpcpg (isi) & + + cpoly%fmean_dpcpg (isi) & + * frqsum_o_daysec !---------------------------------------------------------------------------------! - csite => cpoly%site(isi) - - !----- Inverse of total site area (sum of all patches' area). --------------------! - site_area_i=1./sum(csite%area) - !----- Forest areas. -------------------------------------------------------------! - forest_site = sum(csite%area,csite%dist_type /= 1) - if (forest_site > 1.0e-6) then - forest_site_i = 1./forest_site - else - forest_site_i = 0.0 - end if - forest_poly = forest_poly + forest_site + !---------------------------------------------------------------------------------! + ! Patch loop. ! + !---------------------------------------------------------------------------------! + patchloop: do ipa=1,csite%npatches + cpatch => csite%patch(ipa) - !----- Initialize auxiliary variables to add patchtype variables. ----------------! - patchsum_leaf_litter = 0. - patchsum_root_litter = 0. - patchsum_leaf_litterN = 0. - patchsum_root_litterN = 0. - !----- Looping through the patches to normalize the sum of all cohorts. ----------! - patchloop: do ipa=1, csite%npatches - cpatch => csite%patch(ipa) - if (cpatch%ncohorts > 0) then + !------------------------------------------------------------------------------! + ! Integrate patch-level variables. ! + !------------------------------------------------------------------------------! + csite%dmean_co2_residual (ipa) = csite%dmean_co2_residual (ipa) & + + csite%co2budget_residual (ipa) & + * frqsum_o_daysec + csite%dmean_energy_residual (ipa) = csite%dmean_energy_residual (ipa) & + + csite%ebudget_residual (ipa) & + * frqsum_o_daysec + csite%dmean_water_residual (ipa) = csite%dmean_water_residual (ipa) & + + csite%wbudget_residual (ipa) & + * frqsum_o_daysec + csite%dmean_rh (ipa) = csite%dmean_rh (ipa) & + + csite%fmean_rh (ipa) & + * frqsum_o_daysec + csite%dmean_cwd_rh (ipa) = csite%dmean_cwd_rh (ipa) & + + csite%fmean_cwd_rh (ipa) & + * frqsum_o_daysec + csite%dmean_nep (ipa) = csite%dmean_nep (ipa) & + + csite%fmean_nep (ipa) & + * frqsum_o_daysec + csite%dmean_rk4step (ipa) = csite%dmean_rk4step (ipa) & + + csite%fmean_rk4step (ipa) & + * frqsum_o_daysec + csite%dmean_available_water (ipa) = csite%dmean_available_water (ipa) & + + csite%fmean_available_water (ipa) & + * frqsum_o_daysec + csite%dmean_can_theiv (ipa) = csite%dmean_can_theiv (ipa) & + + csite%fmean_can_theiv (ipa) & + * frqsum_o_daysec + csite%dmean_can_theta (ipa) = csite%dmean_can_theta (ipa) & + + csite%fmean_can_theta (ipa) & + * frqsum_o_daysec + csite%dmean_can_vpdef (ipa) = csite%dmean_can_vpdef (ipa) & + + csite%fmean_can_vpdef (ipa) & + * frqsum_o_daysec + csite%dmean_can_shv (ipa) = csite%dmean_can_shv (ipa) & + + csite%fmean_can_shv (ipa) & + * frqsum_o_daysec + csite%dmean_can_co2 (ipa) = csite%dmean_can_co2 (ipa) & + + csite%fmean_can_co2 (ipa) & + * frqsum_o_daysec + csite%dmean_can_prss (ipa) = csite%dmean_can_prss (ipa) & + + csite%fmean_can_prss (ipa) & + * frqsum_o_daysec + csite%dmean_gnd_temp (ipa) = csite%dmean_gnd_temp (ipa) & + + csite%fmean_gnd_temp (ipa) & + * frqsum_o_daysec + csite%dmean_gnd_shv (ipa) = csite%dmean_gnd_shv (ipa) & + + csite%fmean_gnd_shv (ipa) & + * frqsum_o_daysec + csite%dmean_can_ggnd (ipa) = csite%dmean_can_ggnd (ipa) & + + csite%fmean_can_ggnd (ipa) & + * frqsum_o_daysec + csite%dmean_sfcw_depth (ipa) = csite%dmean_sfcw_depth (ipa) & + + csite%fmean_sfcw_depth (ipa) & + * frqsum_o_daysec + !----- Temporarily make the pounding internal energy extensive [J/m2]. --------! + csite%dmean_sfcw_energy (ipa) = csite%dmean_sfcw_energy (ipa) & + + csite%fmean_sfcw_energy (ipa) & + * csite%fmean_sfcw_mass (ipa) & + * frqsum_o_daysec + csite%dmean_sfcw_mass (ipa) = csite%dmean_sfcw_mass (ipa) & + + csite%fmean_sfcw_mass (ipa) & + * frqsum_o_daysec + csite%dmean_rshort_gnd (ipa) = csite%dmean_rshort_gnd (ipa) & + + csite%fmean_rshort_gnd (ipa) & + * frqsum_o_daysec + csite%dmean_par_gnd (ipa) = csite%dmean_par_gnd (ipa) & + + csite%fmean_par_gnd (ipa) & + * frqsum_o_daysec + csite%dmean_rlong_gnd (ipa) = csite%dmean_rlong_gnd (ipa) & + + csite%fmean_rlong_gnd (ipa) & + * frqsum_o_daysec + csite%dmean_rlongup (ipa) = csite%dmean_rlongup (ipa) & + + csite%fmean_rlongup (ipa) & + * frqsum_o_daysec + csite%dmean_parup (ipa) = csite%dmean_parup (ipa) & + + csite%fmean_parup (ipa) & + * frqsum_o_daysec + csite%dmean_nirup (ipa) = csite%dmean_nirup (ipa) & + + csite%fmean_nirup (ipa) & + * frqsum_o_daysec + csite%dmean_rshortup (ipa) = csite%dmean_rshortup (ipa) & + + csite%fmean_rshortup (ipa) & + * frqsum_o_daysec + csite%dmean_rnet (ipa) = csite%dmean_rnet (ipa) & + + csite%fmean_rnet (ipa) & + * frqsum_o_daysec + csite%dmean_rlong_albedo (ipa) = csite%dmean_rlong_albedo (ipa) & + + csite%fmean_rlong_albedo (ipa) & + * frqsum_o_daysec + csite%dmean_ustar (ipa) = csite%dmean_ustar (ipa) & + + csite%fmean_ustar (ipa) & + * frqsum_o_daysec + csite%dmean_tstar (ipa) = csite%dmean_tstar (ipa) & + + csite%fmean_tstar (ipa) & + * frqsum_o_daysec + csite%dmean_qstar (ipa) = csite%dmean_qstar (ipa) & + + csite%fmean_qstar (ipa) & + * frqsum_o_daysec + csite%dmean_cstar (ipa) = csite%dmean_cstar (ipa) & + + csite%fmean_cstar (ipa) & + * frqsum_o_daysec + csite%dmean_carbon_ac (ipa) = csite%dmean_carbon_ac (ipa) & + + csite%fmean_carbon_ac (ipa) & + * frqsum_o_daysec + csite%dmean_carbon_st (ipa) = csite%dmean_carbon_st (ipa) & + + csite%fmean_carbon_st (ipa) & + * frqsum_o_daysec + csite%dmean_vapor_gc (ipa) = csite%dmean_vapor_gc (ipa) & + + csite%fmean_vapor_gc (ipa) & + * frqsum_o_daysec + csite%dmean_vapor_ac (ipa) = csite%dmean_vapor_ac (ipa) & + + csite%fmean_vapor_ac (ipa) & + * frqsum_o_daysec + csite%dmean_throughfall (ipa) = csite%dmean_throughfall (ipa) & + + csite%fmean_throughfall (ipa) & + * frqsum_o_daysec + csite%dmean_runoff (ipa) = csite%dmean_runoff (ipa) & + + csite%fmean_runoff (ipa) & + * frqsum_o_daysec + csite%dmean_drainage (ipa) = csite%dmean_drainage (ipa) & + + csite%fmean_drainage (ipa) & + * frqsum_o_daysec + csite%dmean_sensible_gc (ipa) = csite%dmean_sensible_gc (ipa) & + + csite%fmean_sensible_gc (ipa) & + * frqsum_o_daysec + csite%dmean_sensible_ac (ipa) = csite%dmean_sensible_ac (ipa) & + + csite%fmean_sensible_ac (ipa) & + * frqsum_o_daysec + csite%dmean_sensible_gg (:,ipa) = csite%dmean_sensible_gg (:,ipa) & + + csite%fmean_sensible_gg (:,ipa) & + * frqsum_o_daysec + csite%dmean_qthroughfall (ipa) = csite%dmean_qthroughfall (ipa) & + + csite%fmean_qthroughfall (ipa) & + * frqsum_o_daysec + csite%dmean_qrunoff (ipa) = csite%dmean_qrunoff (ipa) & + + csite%fmean_qrunoff (ipa) & + * frqsum_o_daysec + csite%dmean_qdrainage (ipa) = csite%dmean_qdrainage (ipa) & + + csite%fmean_qdrainage (ipa) & + * frqsum_o_daysec + csite%dmean_soil_energy (:,ipa) = csite%dmean_soil_energy (:,ipa) & + + csite%fmean_soil_energy (:,ipa) & + * frqsum_o_daysec + csite%dmean_soil_mstpot (:,ipa) = csite%dmean_soil_mstpot (:,ipa) & + + csite%fmean_soil_mstpot (:,ipa) & + * frqsum_o_daysec + csite%dmean_soil_water (:,ipa) = csite%dmean_soil_water (:,ipa) & + + csite%fmean_soil_water (:,ipa) & + * frqsum_o_daysec + csite%dmean_smoist_gg (:,ipa) = csite%dmean_smoist_gg (:,ipa) & + + csite%fmean_smoist_gg (:,ipa) & + * frqsum_o_daysec + csite%dmean_transloss (:,ipa) = csite%dmean_transloss (:,ipa) & + + csite%fmean_transloss (:,ipa) & + * frqsum_o_daysec + !------------------------------------------------------------------------------! + + !------------------------------------------------------------------------------! + ! Patch loop. ! + !------------------------------------------------------------------------------! + cohortloop: do ico=1,cpatch%ncohorts !---------------------------------------------------------------------------! - ! Integrate the mean diurnal cycle only if the mean diurnal cycle ! - ! output is sought. This is also done for night time as the length of ! - ! the day may vary. ! + ! Integrate cohort-level variables. ! !---------------------------------------------------------------------------! - if (iqoutput > 0) then - do ico=1,cpatch%ncohorts - if (cpatch%leaf_resolvable(ico)) then - cpatch%qmean_gpp (t,ico) = cpatch%qmean_gpp (t,ico) & - + cpatch%mean_gpp (ico) & - * umols_2_kgCyr & - / cpatch%nplant(ico) - cpatch%qmean_leaf_resp (t,ico) = cpatch%qmean_leaf_resp (t,ico) & - + cpatch%mean_leaf_resp (ico) & - * umols_2_kgCyr & - / cpatch%nplant(ico) - cpatch%qmean_root_resp (t,ico) = cpatch%qmean_root_resp (t,ico) & - + cpatch%mean_root_resp (ico) & - * umols_2_kgCyr & - / cpatch%nplant(ico) - end if - end do - end if - patchsum_root_litter = patchsum_root_litter & - + sum(cpatch%root_maintenance) * csite%area(ipa) - patchsum_leaf_litter = patchsum_leaf_litter & - + sum(cpatch%leaf_maintenance) * csite%area(ipa) - patchsum_root_litterN = patchsum_root_litterN & - + sum(cpatch%root_maintenance*c2n_leaf(cpatch%pft)) & - * csite%area(ipa) - patchsum_leaf_litterN = patchsum_leaf_litterN & - + sum(cpatch%leaf_maintenance*c2n_leaf(cpatch%pft)) & - * csite%area(ipa) - end if - csite%dmean_co2_residual (ipa) = csite%dmean_co2_residual (ipa) & - + csite%co2budget_residual (ipa) - csite%dmean_energy_residual (ipa) = csite%dmean_energy_residual (ipa) & - + csite%ebudget_residual (ipa) - csite%dmean_water_residual (ipa) = csite%dmean_water_residual (ipa) & - + csite%wbudget_residual (ipa) - csite%dmean_rh (ipa) = csite%dmean_rh (ipa) & - + csite%co2budget_rh (ipa) & - * umols_2_kgCyr - csite%dmean_cwd_rh (ipa) = csite%dmean_cwd_rh (ipa) & - + csite%co2budget_cwd_rh (ipa) & - * umols_2_kgCyr - csite%dmean_rk4step (ipa) = csite%dmean_rk4step (ipa) & - + csite%avg_rk4step (ipa) - if (iqoutput > 0) then - csite%qmean_rh (t,ipa) = csite%qmean_rh (t,ipa) & - + csite%co2budget_rh (ipa) & - * umols_2_kgCyr - csite%qmean_cwd_rh (t,ipa) = csite%qmean_cwd_rh (t,ipa) & - + csite%co2budget_cwd_rh (ipa) & - * umols_2_kgCyr - csite%qmean_albedo (t,ipa) = csite%qmean_albedo (t,ipa) & - + csite%avg_albedo (ipa) - csite%qmean_albedo_beam (t,ipa) = csite%qmean_albedo_beam (t,ipa) & - + csite%avg_albedo_beam (ipa) - csite%qmean_albedo_diffuse (t,ipa) = csite%qmean_albedo_diffuse (t,ipa) & - + csite%avg_albedo_diffuse (ipa) - end if - - - if (rshort_tot > rshort_twilight_min) then - csite%dmean_albedo (ipa) = csite%dmean_albedo (ipa) & - + csite%avg_albedo (ipa) - csite%dmean_albedo_beam (ipa) = csite%dmean_albedo_beam (ipa) & - + csite%avg_albedo_beam (ipa) - csite%dmean_albedo_diffuse(ipa) = csite%dmean_albedo_diffuse(ipa) & - + csite%avg_albedo_diffuse (ipa) - end if + cpatch%dmean_gpp (ico) = cpatch%dmean_gpp (ico) & + + cpatch%fmean_gpp (ico) & + * frqsum_o_daysec + cpatch%dmean_npp (ico) = cpatch%dmean_npp (ico) & + + cpatch%fmean_npp (ico) & + * frqsum_o_daysec + cpatch%dmean_leaf_resp (ico) = cpatch%dmean_leaf_resp (ico) & + + cpatch%fmean_leaf_resp (ico) & + * frqsum_o_daysec + cpatch%dmean_root_resp (ico) = cpatch%dmean_root_resp (ico) & + + cpatch%fmean_root_resp (ico) & + * frqsum_o_daysec + cpatch%dmean_growth_resp (ico) = cpatch%dmean_growth_resp (ico) & + + cpatch%fmean_growth_resp (ico) & + * frqsum_o_daysec + cpatch%dmean_storage_resp (ico) = cpatch%dmean_storage_resp (ico) & + + cpatch%fmean_storage_resp (ico) & + * frqsum_o_daysec + cpatch%dmean_vleaf_resp (ico) = cpatch%dmean_vleaf_resp (ico) & + + cpatch%fmean_vleaf_resp (ico) & + * frqsum_o_daysec + cpatch%dmean_plresp (ico) = cpatch%dmean_plresp (ico) & + + cpatch%fmean_plresp (ico) & + * frqsum_o_daysec + cpatch%dmean_leaf_energy (ico) = cpatch%dmean_leaf_energy (ico) & + + cpatch%fmean_leaf_energy (ico) & + * frqsum_o_daysec + cpatch%dmean_leaf_water (ico) = cpatch%dmean_leaf_water (ico) & + + cpatch%fmean_leaf_water (ico) & + * frqsum_o_daysec + cpatch%dmean_leaf_hcap (ico) = cpatch%dmean_leaf_hcap (ico) & + + cpatch%fmean_leaf_hcap (ico) & + * frqsum_o_daysec + cpatch%dmean_leaf_vpdef (ico) = cpatch%dmean_leaf_vpdef (ico) & + + cpatch%fmean_leaf_vpdef (ico) & + * frqsum_o_daysec + cpatch%dmean_leaf_gsw (ico) = cpatch%dmean_leaf_gsw (ico) & + + cpatch%fmean_leaf_gsw (ico) & + * frqsum_o_daysec + cpatch%dmean_leaf_gbw (ico) = cpatch%dmean_leaf_gbw (ico) & + + cpatch%fmean_leaf_gbw (ico) & + * frqsum_o_daysec + cpatch%dmean_wood_energy (ico) = cpatch%dmean_wood_energy (ico) & + + cpatch%fmean_wood_energy (ico) & + * frqsum_o_daysec + cpatch%dmean_wood_water (ico) = cpatch%dmean_wood_water (ico) & + + cpatch%fmean_wood_water (ico) & + * frqsum_o_daysec + cpatch%dmean_wood_hcap (ico) = cpatch%dmean_wood_hcap (ico) & + + cpatch%fmean_wood_hcap (ico) & + * frqsum_o_daysec + cpatch%dmean_wood_gbw (ico) = cpatch%dmean_wood_gbw (ico) & + + cpatch%fmean_wood_gbw (ico) & + * frqsum_o_daysec + cpatch%dmean_psi_open (ico) = cpatch%dmean_psi_open (ico) & + + cpatch%fmean_psi_open (ico) & + * frqsum_o_daysec + cpatch%dmean_psi_closed (ico) = cpatch%dmean_psi_closed (ico) & + + cpatch%fmean_psi_closed (ico) & + * frqsum_o_daysec + cpatch%dmean_water_supply (ico) = cpatch%dmean_water_supply (ico) & + + cpatch%fmean_water_supply (ico) & + * frqsum_o_daysec + cpatch%dmean_par_l (ico) = cpatch%dmean_par_l (ico) & + + cpatch%fmean_par_l (ico) & + * frqsum_o_daysec + cpatch%dmean_par_l_beam (ico) = cpatch%dmean_par_l_beam (ico) & + + cpatch%fmean_par_l_beam (ico) & + * frqsum_o_daysec + cpatch%dmean_par_l_diff (ico) = cpatch%dmean_par_l_diff (ico) & + + cpatch%fmean_par_l_diff (ico) & + * frqsum_o_daysec + cpatch%dmean_rshort_l (ico) = cpatch%dmean_rshort_l (ico) & + + cpatch%fmean_rshort_l (ico) & + * frqsum_o_daysec + cpatch%dmean_rlong_l (ico) = cpatch%dmean_rlong_l (ico) & + + cpatch%fmean_rlong_l (ico) & + * frqsum_o_daysec + cpatch%dmean_sensible_lc (ico) = cpatch%dmean_sensible_lc (ico) & + + cpatch%fmean_sensible_lc (ico) & + * frqsum_o_daysec + cpatch%dmean_vapor_lc (ico) = cpatch%dmean_vapor_lc (ico) & + + cpatch%fmean_vapor_lc (ico) & + * frqsum_o_daysec + cpatch%dmean_transp (ico) = cpatch%dmean_transp (ico) & + + cpatch%fmean_transp (ico) & + * frqsum_o_daysec + cpatch%dmean_intercepted_al(ico) = cpatch%dmean_intercepted_al(ico) & + + cpatch%fmean_intercepted_al(ico) & + * frqsum_o_daysec + cpatch%dmean_wshed_lg (ico) = cpatch%dmean_wshed_lg (ico) & + + cpatch%fmean_wshed_lg (ico) & + * frqsum_o_daysec + cpatch%dmean_rshort_w (ico) = cpatch%dmean_rshort_w (ico) & + + cpatch%fmean_rshort_w (ico) & + * frqsum_o_daysec + cpatch%dmean_rlong_w (ico) = cpatch%dmean_rlong_w (ico) & + + cpatch%fmean_rlong_w (ico) & + * frqsum_o_daysec + cpatch%dmean_sensible_wc (ico) = cpatch%dmean_sensible_wc (ico) & + + cpatch%fmean_sensible_wc (ico) & + * frqsum_o_daysec + cpatch%dmean_vapor_wc (ico) = cpatch%dmean_vapor_wc (ico) & + + cpatch%fmean_vapor_wc (ico) & + * frqsum_o_daysec + cpatch%dmean_intercepted_aw(ico) = cpatch%dmean_intercepted_aw(ico) & + + cpatch%fmean_intercepted_aw(ico) & + * frqsum_o_daysec + cpatch%dmean_wshed_wg (ico) = cpatch%dmean_wshed_wg (ico) & + + cpatch%fmean_wshed_wg (ico) & + * frqsum_o_daysec + !---------------------------------------------------------------------------! + end do cohortloop + !------------------------------------------------------------------------------! end do patchloop - !---------------------------------------------------------------------------------! - ! Variables already averaged at the sitetype level, add them to polygontype ! - ! level. ! - !---------------------------------------------------------------------------------! - sitesum_evap = sitesum_evap & - + (sum(csite%avg_evap * csite%area) * site_area_i) & - * cpoly%area(isi) - sitesum_transp = sitesum_transp & - + (sum(csite%avg_transp * csite%area) * site_area_i) & - * cpoly%area(isi) - - sitesum_co2_residual = sitesum_co2_residual & - + (sum(csite%co2budget_residual*csite%area)*site_area_i) & - * cpoly%area(isi) - sitesum_water_residual = sitesum_water_residual & - + (sum(csite%wbudget_residual*csite%area)*site_area_i) & - * cpoly%area(isi) - sitesum_energy_residual = sitesum_energy_residual & - + (sum(csite%ebudget_residual*csite%area)*site_area_i) & - * cpoly%area(isi) - - cpoly%dmean_co2_residual(isi) = cpoly%dmean_co2_residual(isi) & - + sum(csite%co2budget_residual*csite%area) & - * site_area_i - cpoly%dmean_energy_residual(isi) = cpoly%dmean_energy_residual(isi) & - + sum(csite%ebudget_residual *csite%area) & - * site_area_i - cpoly%dmean_water_residual(isi) = cpoly%dmean_water_residual(isi) & - + sum(csite%wbudget_residual *csite%area) & - * site_area_i - - sitesum_root_litter = sitesum_root_litter & - + (patchsum_root_litter * site_area_i) * cpoly%area(isi) - sitesum_leaf_litter = sitesum_leaf_litter & - + (patchsum_leaf_litter * site_area_i) * cpoly%area(isi) - - sitesum_root_litterN = sitesum_root_litterN & - + (patchsum_root_litterN * site_area_i) * cpoly%area(isi) - sitesum_leaf_litterN = sitesum_leaf_litterN & - + (patchsum_leaf_litterN * site_area_i) * cpoly%area(isi) - sitesum_Nmin_loss = sitesum_Nmin_loss & - + sum(csite%mineralized_N_loss*csite%area) * site_area_i & - * cpoly%area(isi) - sitesum_Nmin_input = sitesum_Nmin_input & - + sum(csite%mineralized_N_input*csite%area)* site_area_i & - * cpoly%area(isi) - sitesum_Nuptake = sitesum_Nuptake & - + (sum(csite%total_plant_nitrogen_uptake * csite%area) & - *site_area_i ) * cpoly%area(isi) - - dbhloop: do idbh=1,n_dbh - sitesum_gpp_dbh(idbh) = sitesum_gpp_dbh(idbh) & - + ( sum(csite%co2budget_gpp_dbh(idbh,:) * csite%area) & - * site_area_i) * cpoly%area(isi) - end do dbhloop - end do siteloop - - cgrid%Croot_litter_flux(ipy) = cgrid%Croot_litter_flux(ipy) & - + sitesum_root_litter * poly_area_i - cgrid%Cleaf_litter_flux(ipy) = cgrid%Cleaf_litter_flux(ipy) & - + sitesum_leaf_litter * poly_area_i - - cgrid%Nroot_litter_flux(ipy) = cgrid%Nroot_litter_flux(ipy) & - + sitesum_root_litterN * poly_area_i - cgrid%Nleaf_litter_flux(ipy) = cgrid%Nleaf_litter_flux(ipy) & - + sitesum_leaf_litterN * poly_area_i - - cgrid%Ngross_min(ipy) = cgrid%Ngross_min(ipy) & - + sitesum_Nmin_input * poly_area_i - cgrid%Nnet_min(ipy) = cgrid%Nnet_min(ipy) & - + (sitesum_Nmin_input-sitesum_Nmin_loss) & - * poly_area_i - cgrid%Nbiomass_uptake(ipy) = cgrid%Nbiomass_uptake(ipy) & - + sitesum_Nuptake*poly_area_i - - - cgrid%dmean_co2_residual(ipy) = cgrid%dmean_co2_residual(ipy) & - + sitesum_co2_residual * poly_area_i * umols_2_kgCyr - cgrid%dmean_energy_residual(ipy) = cgrid%dmean_energy_residual(ipy) & - + sitesum_energy_residual * poly_area_i - cgrid%dmean_water_residual(ipy) = cgrid%dmean_water_residual(ipy) & - + sitesum_water_residual * poly_area_i - - do idbh=1,n_dbh - cgrid%dmean_gpp_dbh(idbh,ipy) = cgrid%dmean_gpp_dbh(idbh,ipy) & - + sitesum_gpp_dbh(idbh)* poly_area_i - end do - - !----- These variables are already averaged at gridtype, just add them up. ----------! - do k=1,nzg - cgrid%dmean_soil_temp(k,ipy) = cgrid%dmean_soil_temp(k,ipy) & - + cgrid%avg_soil_temp(k,ipy) - cgrid%dmean_soil_water(k,ipy) = cgrid%dmean_soil_water(k,ipy) & - + cgrid%avg_soil_water(k,ipy) - cgrid%dmean_soil_mstpot(k,ipy) = cgrid%dmean_soil_mstpot(k,ipy) & - + cgrid%avg_soil_mstpot(k,ipy) - cgrid%dmean_transloss(k,ipy) = cgrid%dmean_transloss(k,ipy) & - + cgrid%avg_transloss(k,ipy) - end do - cgrid%dmean_sensible_lc(ipy) = cgrid%dmean_sensible_lc(ipy) & - + cgrid%avg_sensible_lc(ipy) - cgrid%dmean_sensible_wc(ipy) = cgrid%dmean_sensible_wc(ipy) & - + cgrid%avg_sensible_wc(ipy) - cgrid%dmean_sensible_gc(ipy) = cgrid%dmean_sensible_gc(ipy) & - + cgrid%avg_sensible_gc(ipy) - cgrid%dmean_sensible_ac(ipy) = cgrid%dmean_sensible_ac(ipy) & - + cgrid%avg_sensible_ac(ipy) - cgrid%dmean_carbon_ac (ipy) = cgrid%dmean_carbon_ac (ipy) & - + cgrid%avg_carbon_ac (ipy) - cgrid%dmean_carbon_st (ipy) = cgrid%dmean_carbon_st (ipy) & - + cgrid%avg_carbon_st (ipy) - - cgrid%dmean_ustar (ipy) = cgrid%dmean_ustar (ipy) & - + cgrid%avg_ustar (ipy) - cgrid%dmean_tstar (ipy) = cgrid%dmean_tstar (ipy) & - + cgrid%avg_tstar (ipy) - cgrid%dmean_qstar (ipy) = cgrid%dmean_qstar (ipy) & - + cgrid%avg_qstar (ipy) - cgrid%dmean_cstar (ipy) = cgrid%dmean_cstar (ipy) & - + cgrid%avg_cstar (ipy) - - - cgrid%dmean_rshort_gnd (ipy) = cgrid%dmean_rshort_gnd (ipy) & - + cgrid%avg_rshort_gnd (ipy) - cgrid%dmean_par_gnd (ipy) = cgrid%dmean_par_gnd (ipy) & - + cgrid%avg_par_gnd (ipy) - cgrid%dmean_rlong_gnd (ipy) = cgrid%dmean_rlong_gnd (ipy) & - + cgrid%avg_rlong_gnd (ipy) - cgrid%dmean_rlongup (ipy) = cgrid%dmean_rlongup (ipy) & - + cgrid%avg_rlongup (ipy) - cgrid%dmean_parup (ipy) = cgrid%dmean_parup (ipy) & - + cgrid%avg_parup (ipy) - cgrid%dmean_nirup (ipy) = cgrid%dmean_nirup (ipy) & - + cgrid%avg_nirup (ipy) - cgrid%dmean_rshortup (ipy) = cgrid%dmean_rshortup (ipy) & - + cgrid%avg_rshortup (ipy) - cgrid%dmean_rnet (ipy) = cgrid%dmean_rnet (ipy) & - + cgrid%avg_rnet (ipy) - cgrid%dmean_rlong_albedo(ipy) = cgrid%dmean_rlong_albedo (ipy) & - + cgrid%avg_rlong_albedo (ipy) - cgrid%dmean_leaf_resp (ipy) = cgrid%dmean_leaf_resp (ipy) & - + cgrid%avg_leaf_resp (ipy) * umols_2_kgCyr - cgrid%dmean_root_resp (ipy) = cgrid%dmean_root_resp (ipy) & - + cgrid%avg_root_resp (ipy) * umols_2_kgCyr - cgrid%dmean_plresp (ipy) = cgrid%dmean_plresp (ipy) & - + ( cgrid%avg_leaf_resp (ipy) & - + cgrid%avg_root_resp (ipy) & - + cgrid%avg_growth_resp (ipy) & - + cgrid%avg_storage_resp(ipy) & - + cgrid%avg_vleaf_resp (ipy) ) * umols_2_kgCyr - cgrid%dmean_nep (ipy) = cgrid%dmean_nep (ipy) & - + ( cgrid%avg_gpp (ipy) & - - cgrid%avg_leaf_resp (ipy) & - - cgrid%avg_root_resp (ipy) & - - cgrid%avg_growth_resp (ipy) & - - cgrid%avg_storage_resp(ipy) & - - cgrid%avg_vleaf_resp (ipy) & - - cgrid%avg_htroph_resp (ipy) ) * umols_2_kgCyr - cgrid%dmean_pcpg (ipy) = cgrid%dmean_pcpg (ipy) + cgrid%avg_pcpg (ipy) - cgrid%dmean_evap (ipy) = cgrid%dmean_evap (ipy) + cgrid%avg_evap (ipy) - cgrid%dmean_transp (ipy) = cgrid%dmean_transp (ipy) + cgrid%avg_transp (ipy) - cgrid%dmean_runoff (ipy) = cgrid%dmean_runoff (ipy) + cgrid%avg_runoff (ipy) - cgrid%dmean_drainage (ipy) = cgrid%dmean_drainage (ipy) + cgrid%avg_drainage (ipy) - cgrid%dmean_vapor_lc (ipy) = cgrid%dmean_vapor_lc (ipy) + cgrid%avg_vapor_lc (ipy) - cgrid%dmean_vapor_wc (ipy) = cgrid%dmean_vapor_wc (ipy) + cgrid%avg_vapor_wc (ipy) - cgrid%dmean_vapor_gc (ipy) = cgrid%dmean_vapor_gc (ipy) + cgrid%avg_vapor_gc (ipy) - cgrid%dmean_vapor_ac (ipy) = cgrid%dmean_vapor_ac (ipy) + cgrid%avg_vapor_ac (ipy) - - !------------------------------------------------------------------------------------! - ! Integrate the mean diurnal cycle in case the mean diurnal cycle is sought. ! - !------------------------------------------------------------------------------------! - if (iqoutput > 0) then - !------ Use the local site sum to integrate the following variables. -------------! - cgrid%qmean_gpp (t,ipy) = cgrid%qmean_gpp (t,ipy) & - + cgrid%avg_gpp (ipy) & - * umols_2_kgCyr - cgrid%qmean_leaf_resp (t,ipy) = cgrid%qmean_leaf_resp (t,ipy) & - + cgrid%avg_leaf_resp (ipy) & - * umols_2_kgCyr - cgrid%qmean_root_resp (t,ipy) = cgrid%qmean_root_resp (t,ipy) & - + cgrid%avg_root_resp (ipy) & - * umols_2_kgCyr - cgrid%qmean_plresp (t,ipy) = cgrid%qmean_plresp (t,ipy) & - + cgrid%avg_plant_resp (ipy) & - * umols_2_kgCyr - cgrid%qmean_nep (t,ipy) = cgrid%qmean_nep (t,ipy) & - + ( cgrid%avg_gpp (ipy) & - - cgrid%avg_leaf_resp (ipy) & - - cgrid%avg_root_resp (ipy) & - - cgrid%avg_growth_resp (ipy) & - - cgrid%avg_storage_resp (ipy) & - - cgrid%avg_vleaf_resp (ipy) & - - cgrid%avg_htroph_resp (ipy)) & - * umols_2_kgCyr - cgrid%qmean_rh (t,ipy) = cgrid%qmean_rh (t,ipy) & - + cgrid%avg_htroph_resp (ipy) & - * umols_2_kgCyr - cgrid%qmean_cwd_rh (t,ipy) = cgrid%qmean_cwd_rh (t,ipy) & - + cgrid%avg_cwd_resp (ipy) & - * umols_2_kgCyr - - cgrid%qmean_ustar (t,ipy) = cgrid%qmean_ustar (t,ipy) & - + cgrid%avg_ustar (ipy) - cgrid%qmean_tstar (t,ipy) = cgrid%qmean_tstar (t,ipy) & - + cgrid%avg_tstar (ipy) - cgrid%qmean_qstar (t,ipy) = cgrid%qmean_qstar (t,ipy) & - + cgrid%avg_qstar (ipy) - cgrid%qmean_cstar (t,ipy) = cgrid%qmean_cstar (t,ipy) & - + cgrid%avg_cstar (ipy) - - cgrid%qmean_carbon_ac (t,ipy) = cgrid%qmean_carbon_ac (t,ipy) & - + cgrid%avg_carbon_ac (ipy) - cgrid%qmean_carbon_st (t,ipy) = cgrid%qmean_carbon_st (t,ipy) & - + cgrid%avg_carbon_st (ipy) - - !----- Variables that were previously integrated to this time step. --------------! - cgrid%qmean_sensible_lc (t,ipy) = cgrid%qmean_sensible_lc (t,ipy) & - + cgrid%avg_sensible_lc (ipy) - cgrid%qmean_sensible_wc (t,ipy) = cgrid%qmean_sensible_wc (t,ipy) & - + cgrid%avg_sensible_wc (ipy) - cgrid%qmean_sensible_gc (t,ipy) = cgrid%qmean_sensible_gc (t,ipy) & - + cgrid%avg_sensible_gc (ipy) - cgrid%qmean_sensible_ac (t,ipy) = cgrid%qmean_sensible_ac (t,ipy) & - + cgrid%avg_sensible_ac (ipy) - cgrid%qmean_rshort_gnd (t,ipy) = cgrid%qmean_rshort_gnd (t,ipy) & - + cgrid%avg_rshort_gnd (ipy) - cgrid%qmean_par_gnd (t,ipy) = cgrid%qmean_par_gnd (t,ipy) & - + cgrid%avg_par_gnd (ipy) - cgrid%qmean_rlong_gnd (t,ipy) = cgrid%qmean_rlong_gnd (t,ipy) & - + cgrid%avg_rlong_gnd (ipy) - cgrid%qmean_rlongup (t,ipy) = cgrid%qmean_rlongup (t,ipy) & - + cgrid%avg_rlongup (ipy) - cgrid%qmean_parup (t,ipy) = cgrid%qmean_parup (t,ipy) & - + cgrid%avg_parup (ipy) - cgrid%qmean_nirup (t,ipy) = cgrid%qmean_nirup (t,ipy) & - + cgrid%avg_nirup (ipy) - cgrid%qmean_rshortup (t,ipy) = cgrid%qmean_rshortup (t,ipy) & - + cgrid%avg_rshortup (ipy) - cgrid%qmean_rnet (t,ipy) = cgrid%qmean_rnet (t,ipy) & - + cgrid%avg_rnet (ipy) - cgrid%qmean_rlong_albedo (t,ipy) = cgrid%qmean_rlong_albedo (t,ipy) & - + cgrid%avg_rlong_albedo (ipy) - cgrid%qmean_albedo (t,ipy) = cgrid%qmean_albedo (t,ipy) & - + cgrid%avg_albedo (ipy) - cgrid%qmean_albedo_beam (t,ipy) = cgrid%qmean_albedo_beam (t,ipy) & - + cgrid%avg_albedo_beam (ipy) - cgrid%qmean_albedo_diffuse (t,ipy) = cgrid%qmean_albedo_diffuse (t,ipy) & - + cgrid%avg_albedo_diffuse (ipy) - cgrid%qmean_pcpg (t,ipy) = cgrid%qmean_pcpg (t,ipy) & - + cgrid%avg_pcpg (ipy) - cgrid%qmean_evap (t,ipy) = cgrid%qmean_evap (t,ipy) & - + cgrid%avg_evap (ipy) - cgrid%qmean_transp (t,ipy) = cgrid%qmean_transp (t,ipy) & - + cgrid%avg_transp (ipy) - cgrid%qmean_runoff (t,ipy) = cgrid%qmean_runoff (t,ipy) & - + cgrid%avg_runoff (ipy) - cgrid%qmean_drainage (t,ipy) = cgrid%qmean_drainage (t,ipy) & - + cgrid%avg_drainage (ipy) - cgrid%qmean_vapor_lc (t,ipy) = cgrid%qmean_vapor_lc (t,ipy) & - + cgrid%avg_vapor_lc (ipy) - cgrid%qmean_vapor_wc (t,ipy) = cgrid%qmean_vapor_wc (t,ipy) & - + cgrid%avg_vapor_wc (ipy) - cgrid%qmean_vapor_gc (t,ipy) = cgrid%qmean_vapor_gc (t,ipy) & - + cgrid%avg_vapor_gc (ipy) - cgrid%qmean_vapor_ac (t,ipy) = cgrid%qmean_vapor_ac (t,ipy) & - + cgrid%avg_vapor_ac (ipy) - !----- These variables are already averaged at gridtype, just add them up. -------! - do k=1,nzg - cgrid%qmean_soil_temp (k,t,ipy) = cgrid%qmean_soil_temp (k,t,ipy) & - + cgrid%avg_soil_temp (k,ipy) - cgrid%qmean_soil_water (k,t,ipy) = cgrid%qmean_soil_water (k,t,ipy) & - + cgrid%avg_soil_water (k,ipy) - cgrid%qmean_soil_mstpot (k,t,ipy) = cgrid%qmean_soil_mstpot (k,t,ipy) & - + cgrid%avg_soil_mstpot (k,ipy) - end do - - !----- Integrate the mean sum of squares. ----------------------------------------! - cgrid%qmsqu_gpp (t,ipy) = cgrid%qmsqu_gpp (t,ipy) & - + cgrid%avg_gpp (ipy) & - * cgrid%avg_gpp (ipy) & - * umols_2_kgCyr * umols_2_kgCyr - - cgrid%qmsqu_leaf_resp (t,ipy) = cgrid%qmsqu_leaf_resp (t,ipy) & - + cgrid%avg_leaf_resp (ipy) & - * cgrid%avg_leaf_resp (ipy) & - * umols_2_kgCyr * umols_2_kgCyr - - cgrid%qmsqu_root_resp (t,ipy) = cgrid%qmsqu_root_resp (t,ipy) & - + cgrid%avg_root_resp (ipy) & - * cgrid%avg_root_resp (ipy) & - * umols_2_kgCyr * umols_2_kgCyr - - cgrid%qmsqu_plresp (t,ipy) = cgrid%qmsqu_plresp (t,ipy) & - + cgrid%avg_plant_resp (ipy) & - * cgrid%avg_plant_resp (ipy) & - * umols_2_kgCyr * umols_2_kgCyr - - cgrid%qmsqu_nep (t,ipy) = cgrid%qmsqu_nep (t,ipy) & - + ( cgrid%avg_gpp (ipy) & - - cgrid%avg_leaf_resp (ipy) & - - cgrid%avg_root_resp (ipy) & - - cgrid%avg_growth_resp (ipy) & - - cgrid%avg_storage_resp (ipy) & - - cgrid%avg_vleaf_resp (ipy) & - - cgrid%avg_htroph_resp (ipy)) & - * ( cgrid%avg_gpp (ipy) & - - cgrid%avg_leaf_resp (ipy) & - - cgrid%avg_root_resp (ipy) & - - cgrid%avg_growth_resp (ipy) & - - cgrid%avg_storage_resp (ipy) & - - cgrid%avg_vleaf_resp (ipy) & - - cgrid%avg_htroph_resp (ipy)) & - * umols_2_kgCyr * umols_2_kgCyr - - cgrid%qmsqu_rh (t,ipy) = cgrid%qmsqu_rh (t,ipy) & - + cgrid%avg_htroph_resp (ipy) & - * cgrid%avg_htroph_resp (ipy) & - * umols_2_kgCyr * umols_2_kgCyr - - cgrid%qmsqu_cwd_rh (t,ipy) = cgrid%qmsqu_cwd_rh (t,ipy) & - + cgrid%avg_cwd_resp (ipy) & - * cgrid%avg_cwd_resp (ipy) & - * umols_2_kgCyr * umols_2_kgCyr - - cgrid%qmsqu_carbon_ac (t,ipy) = cgrid%qmsqu_carbon_ac (t,ipy) & - + cgrid%avg_carbon_ac (ipy) & - * cgrid%avg_carbon_ac (ipy) - - cgrid%qmsqu_carbon_st (t,ipy) = cgrid%qmsqu_carbon_st (t,ipy) & - + cgrid%avg_carbon_st (ipy) & - * cgrid%avg_carbon_st (ipy) - - cgrid%qmsqu_sensible_ac (t,ipy) = cgrid%qmsqu_sensible_ac (t,ipy) & - + cgrid%avg_sensible_ac (ipy) & - * cgrid%avg_sensible_ac (ipy) - - cgrid%qmsqu_sensible_lc (t,ipy) = cgrid%qmsqu_sensible_lc (t,ipy) & - + cgrid%avg_sensible_lc (ipy) & - * cgrid%avg_sensible_lc (ipy) - - cgrid%qmsqu_sensible_wc (t,ipy) = cgrid%qmsqu_sensible_wc (t,ipy) & - + cgrid%avg_sensible_wc (ipy) & - * cgrid%avg_sensible_wc (ipy) - - cgrid%qmsqu_sensible_gc (t,ipy) = cgrid%qmsqu_sensible_gc (t,ipy) & - + cgrid%avg_sensible_gc (ipy) & - * cgrid%avg_sensible_gc (ipy) - - cgrid%qmsqu_evap (t,ipy) = cgrid%qmsqu_evap (t,ipy) & - + cgrid%avg_evap (ipy) & - * cgrid%avg_evap (ipy) - - cgrid%qmsqu_transp (t,ipy) = cgrid%qmsqu_transp (t,ipy) & - + cgrid%avg_transp (ipy) & - * cgrid%avg_transp (ipy) - - cgrid%qmsqu_vapor_ac (t,ipy) = cgrid%qmsqu_vapor_ac (t,ipy) & - + cgrid%avg_vapor_ac (ipy) & - * cgrid%avg_vapor_ac (ipy) - - cgrid%qmsqu_vapor_lc (t,ipy) = cgrid%qmsqu_vapor_lc (t,ipy) & - + cgrid%avg_vapor_lc (ipy) & - * cgrid%avg_vapor_lc (ipy) - - cgrid%qmsqu_vapor_wc (t,ipy) = cgrid%qmsqu_vapor_wc (t,ipy) & - + cgrid%avg_vapor_wc (ipy) & - * cgrid%avg_vapor_wc (ipy) - - cgrid%qmsqu_vapor_gc (t,ipy) = cgrid%qmsqu_vapor_gc (t,ipy) & - + cgrid%avg_vapor_gc (ipy) & - * cgrid%avg_vapor_gc (ipy) - - cgrid%qmsqu_ustar (t,ipy) = cgrid%qmsqu_ustar (t,ipy) & - + cgrid%avg_ustar (ipy) & - * cgrid%avg_ustar (ipy) - - cgrid%qmsqu_rlongup (t,ipy) = cgrid%qmsqu_rlongup (t,ipy) & - + cgrid%avg_rlongup (ipy) & - * cgrid%avg_rlongup (ipy) - - cgrid%qmsqu_parup (t,ipy) = cgrid%qmsqu_parup (t,ipy) & - + cgrid%avg_parup (ipy) & - * cgrid%avg_parup (ipy) - - cgrid%qmsqu_nirup (t,ipy) = cgrid%qmsqu_nirup (t,ipy) & - + cgrid%avg_nirup (ipy) & - * cgrid%avg_nirup (ipy) - - cgrid%qmsqu_rshortup (t,ipy) = cgrid%qmsqu_rshortup (t,ipy) & - + cgrid%avg_rshortup (ipy) & - * cgrid%avg_rshortup (ipy) - - cgrid%qmsqu_rnet (t,ipy) = cgrid%qmsqu_rnet (t,ipy) & - + cgrid%avg_rnet (ipy) & - * cgrid%avg_rnet (ipy) - - cgrid%qmsqu_albedo (t,ipy) = cgrid%qmsqu_albedo (t,ipy) & - + cgrid%avg_albedo (ipy) & - * cgrid%avg_albedo (ipy) - end if !------------------------------------------------------------------------------------! end do polyloop - + !---------------------------------------------------------------------------------------! return -end subroutine integrate_ed_daily_output_flux +end subroutine integrate_ed_dmean_vars +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! !==========================================================================================! !==========================================================================================! @@ -1853,9 +1559,8 @@ end subroutine integrate_ed_daily_output_flux ! to normal units. These variables are not for output, so they are done separatedly. ! ! There are also some output variables here, because these depend on the average of the ! ! gpp, and leaf and root respiration and would need to be calculated again otherwise. ! -! Some of the 5-D arrays are also integrated here for the same reason. ! !------------------------------------------------------------------------------------------! -subroutine normalize_ed_daily_vars(cgrid,timefac1) +subroutine normalize_ed_today_vars(cgrid) use ed_state_vars , only : edtype & ! structure , polygontype & ! structure , sitetype & ! structure @@ -1864,84 +1569,51 @@ subroutine normalize_ed_daily_vars(cgrid,timefac1) , n_age & ! intent(in) , n_dist_types & ! intent(in) , n_dbh ! ! intent(in) - use ed_misc_coms , only : imoutput & ! intent(in) - , idoutput & ! intent(in) - , iqoutput & ! intent(in) - , ddbhi & ! intent(in) - , dagei ! ! intent(in) - use consts_coms , only : umols_2_kgCyr ! ! intent(in) + use ed_misc_coms , only : writing_long & ! intent(in) + , writing_eorq & ! intent(in) + , writing_dcyc & ! intent(in) + , dtlsm ! ! intent(in) + use consts_coms , only : umols_2_kgCyr & ! intent(in) + , day_sec ! ! intent(in) implicit none !----- Arguments. ----------------------------------------------------------------------! - type(edtype) , target :: cgrid - real , intent(in) :: timefac1 + type(edtype) , target :: cgrid !----- Local variables. ----------------------------------------------------------------! - type(polygontype) , pointer :: cpoly - type(sitetype) , pointer :: csite - type(patchtype) , pointer :: cpatch - integer :: ipy - integer :: isi - integer :: ipa - integer :: ico - integer :: ipft - integer :: ilu - integer :: idbh - integer :: iage - real :: pss_gpp - real :: pss_leaf_resp - real :: pss_root_resp - real :: sss_gpp - real :: sss_leaf_resp - real :: sss_root_resp - real :: poly_area_i - real :: site_area_i - !----- Locally saved variables. --------------------------------------------------------! - logical , save :: first_time = .true. - logical , save :: save_daily - logical , save :: save_monthly + type(polygontype), pointer :: cpoly + type(sitetype) , pointer :: csite + type(patchtype) , pointer :: cpatch + integer :: ipy + integer :: isi + integer :: ipa + integer :: ico + integer :: ipft + integer :: ilu + integer :: idbh + integer :: iage + real :: dtlsm_o_daysec !---------------------------------------------------------------------------------------! - if (first_time) then - first_time = .false. - save_daily = imoutput > 0 .or. idoutput > 0 .or. iqoutput > 0 - save_monthly = imoutput > 0 .or. iqoutput > 0 - end if + + + !----- Find the time scale factor. -----------------------------------------------------! + dtlsm_o_daysec = dtlsm / day_sec + !---------------------------------------------------------------------------------------! + polyloop: do ipy=1,cgrid%npolygons cpoly => cgrid%polygon(ipy) !----- This part is done only if arrays are sought. ---------------------------------! - if (save_daily) then - poly_area_i = 1./sum(cpoly%area) - sss_gpp = 0. - sss_leaf_resp = 0. - sss_root_resp = 0. - end if - siteloop: do isi=1,cpoly%nsites csite => cpoly%site(isi) - - if (save_daily) then - site_area_i = 1./ sum(csite%area) - pss_gpp = 0. - pss_leaf_resp = 0. - pss_root_resp = 0. - end if - patchloop: do ipa=1,csite%npatches - csite%today_A_decomp (ipa) = csite%today_A_decomp(ipa) * timefac1 - csite%today_Af_decomp(ipa) = csite%today_Af_decomp(ipa) * timefac1 + csite%today_A_decomp (ipa) = csite%today_A_decomp(ipa) * dtlsm_o_daysec + csite%today_Af_decomp(ipa) = csite%today_Af_decomp(ipa) * dtlsm_o_daysec !----- Copy the decomposition terms to the daily mean if they are sought. -----! - if (save_daily) then + if (writing_long) then csite%dmean_A_decomp(ipa) = csite%today_A_decomp(ipa) csite%dmean_Af_decomp(ipa) = csite%today_Af_decomp(ipa) - !----- Integrate the monthly mean. -----------------------------------------! - if (save_monthly) then - csite%mmean_A_decomp(ipa) = csite%mmean_A_decomp(ipa) & - + csite%dmean_A_decomp(ipa) - csite%mmean_Af_decomp(ipa) = csite%mmean_Af_decomp(ipa) & - + csite%dmean_Af_decomp(ipa) - end if end if cpatch => csite%patch(ipa) @@ -1951,86 +1623,30 @@ subroutine normalize_ed_daily_vars(cgrid,timefac1) !---------------------------------------------------------------------------! ! Normalise the variables used to compute carbon balance. ! !---------------------------------------------------------------------------! - cpatch%today_gpp (ico) = cpatch%today_gpp (ico) * timefac1 - cpatch%today_gpp_pot (ico) = cpatch%today_gpp_pot (ico) * timefac1 - cpatch%today_gpp_lightmax (ico) = cpatch%today_gpp_lightmax (ico) * timefac1 - cpatch%today_gpp_moistmax (ico) = cpatch%today_gpp_moistmax (ico) * timefac1 - cpatch%today_leaf_resp (ico) = cpatch%today_leaf_resp (ico) * timefac1 - cpatch%today_root_resp (ico) = cpatch%today_root_resp (ico) * timefac1 - !---------------------------------------------------------------------------! - - - !---------------------------------------------------------------------------! - ! We now update the daily means of GPP, and leaf and root respiration, ! - ! and we convert them to kgC/plant/yr. ! - !---------------------------------------------------------------------------! - if (save_daily) then - cpatch%dmean_gpp(ico) = cpatch%today_gpp(ico) & - * umols_2_kgCyr / cpatch%nplant(ico) - cpatch%dmean_leaf_resp(ico) = cpatch%today_leaf_resp(ico) & - * umols_2_kgCyr / cpatch%nplant(ico) - cpatch%dmean_root_resp(ico) = cpatch%today_root_resp(ico) & - * umols_2_kgCyr / cpatch%nplant(ico) - pss_gpp = pss_gpp & - + cpatch%today_gpp(ico) & - * csite%area(ipa) & - * umols_2_kgCyr - pss_leaf_resp = pss_leaf_resp & - + cpatch%today_leaf_resp(ico) & - * csite%area(ipa) & - * umols_2_kgCyr - pss_root_resp = pss_root_resp & - + cpatch%today_root_resp(ico) & - * csite%area(ipa) & - * umols_2_kgCyr - end if - !---------------------------------------------------------------------------! - - - !---------------------------------------------------------------------------! - ! We update the following monthly means here because these dmean vari- ! - ! ables will be discarded before integrate_ed_monthly_output_vars is ! - ! called. ! - !---------------------------------------------------------------------------! - if (save_monthly) then - cpatch%mmean_gpp(ico) = cpatch%mmean_gpp(ico) & - + cpatch%dmean_gpp(ico) - cpatch%mmean_leaf_resp(ico) = cpatch%mmean_leaf_resp(ico) & - + cpatch%dmean_leaf_resp(ico) - cpatch%mmean_root_resp(ico) = cpatch%mmean_root_resp(ico) & - + cpatch%dmean_root_resp(ico) - end if + cpatch%today_gpp (ico) = cpatch%today_gpp (ico) & + * dtlsm_o_daysec + cpatch%today_gpp_pot (ico) = cpatch%today_gpp_pot (ico) & + * dtlsm_o_daysec + cpatch%today_gpp_lightmax (ico) = cpatch%today_gpp_lightmax (ico) & + * dtlsm_o_daysec + cpatch%today_gpp_moistmax (ico) = cpatch%today_gpp_moistmax (ico) & + * dtlsm_o_daysec + cpatch%today_leaf_resp (ico) = cpatch%today_leaf_resp (ico) & + * dtlsm_o_daysec + cpatch%today_root_resp (ico) = cpatch%today_root_resp (ico) & + * dtlsm_o_daysec !---------------------------------------------------------------------------! end do cohortloop !------------------------------------------------------------------------------! end do patchloop !---------------------------------------------------------------------------------! - if (save_daily) then - sss_gpp = sss_gpp + pss_gpp * site_area_i * cpoly%area(isi) - sss_leaf_resp = sss_leaf_resp + pss_leaf_resp * site_area_i * cpoly%area(isi) - sss_root_resp = sss_root_resp + pss_root_resp * site_area_i * cpoly%area(isi) - end if - end do siteloop - - if (save_daily) then - cgrid%dmean_gpp(ipy) = sss_gpp * poly_area_i - cgrid%dmean_leaf_resp(ipy) = sss_leaf_resp * poly_area_i - cgrid%dmean_root_resp(ipy) = sss_root_resp * poly_area_i - end if - - if (save_monthly) then - cgrid%mmean_gpp(ipy) = cgrid%mmean_gpp(ipy) & - + cgrid%dmean_gpp(ipy) - cgrid%mmean_leaf_resp(ipy) = cgrid%mmean_leaf_resp(ipy) & - + cgrid%dmean_leaf_resp(ipy) - cgrid%mmean_root_resp(ipy) = cgrid%mmean_root_resp(ipy) & - + cgrid%dmean_root_resp(ipy) - end if + !------------------------------------------------------------------------------------! end do polyloop - + !---------------------------------------------------------------------------------------! + return -end subroutine normalize_ed_daily_vars +end subroutine normalize_ed_today_vars !==========================================================================================! !==========================================================================================! @@ -2038,18 +1654,19 @@ end subroutine normalize_ed_daily_vars + !==========================================================================================! !==========================================================================================! ! This subroutine will scale the daily NPP allocation terms ! !------------------------------------------------------------------------------------------! -subroutine normalize_ed_dailyNPP_vars(cgrid) +subroutine normalize_ed_todayNPP_vars(cgrid) use ed_state_vars , only : edtype & ! structure , polygontype & ! structure , sitetype & ! structure , patchtype ! ! structure - use ed_misc_coms , only : imoutput & ! intent(in) - , idoutput & ! intent(in) - , iqoutput ! ! intent(in) + use ed_misc_coms , only : writing_long & ! intent(in) + , writing_eorq & ! intent(in) + , writing_dcyc ! ! intent(in) use consts_coms , only : yr_day ! ! intent(in) implicit none !----- Arguments. ----------------------------------------------------------------------! @@ -2062,209 +1679,75 @@ subroutine normalize_ed_dailyNPP_vars(cgrid) integer :: isi integer :: ipa integer :: ico - real :: pss_nppleaf - real :: pss_nppfroot - real :: pss_nppsapwood - real :: pss_nppcroot - real :: pss_nppseeds - real :: pss_nppwood - real :: pss_nppdaily - real :: sss_nppleaf - real :: sss_nppfroot - real :: sss_nppsapwood - real :: sss_nppcroot - real :: sss_nppseeds - real :: sss_nppwood - real :: sss_nppdaily - real :: poly_area_i - real :: site_area_i - !----- Locally saved variables. --------------------------------------------------------! - logical , save :: first_time = .true. - logical , save :: save_daily - logical , save :: save_monthly - !---------------------------------------------------------------------------------------! - if (first_time) then - first_time = .false. - save_daily = imoutput > 0 .or. idoutput > 0 .or. iqoutput > 0 - save_monthly = imoutput > 0 .or. iqoutput > 0 - end if polyloop: do ipy=1,cgrid%npolygons cpoly => cgrid%polygon(ipy) - !----- This part is done only if arrays are sought. ---------------------------------! - if (save_daily) then - poly_area_i = 1./sum(cpoly%area) - sss_nppleaf = 0. - sss_nppfroot = 0. - sss_nppsapwood = 0. - sss_nppcroot = 0. - sss_nppseeds = 0. - sss_nppwood = 0. - sss_nppdaily = 0. - end if - siteloop: do isi=1,cpoly%nsites csite => cpoly%site(isi) - - - if (save_daily) then - site_area_i = 1./ sum(csite%area) - pss_nppleaf = 0. - pss_nppfroot = 0. - pss_nppsapwood = 0. - pss_nppcroot = 0. - pss_nppseeds = 0. - pss_nppwood = 0. - pss_nppdaily = 0. - end if - patchloop: do ipa=1,csite%npatches cpatch => csite%patch(ipa) !----- Included a loop so it won't crash with empty cohorts... ----------------! cohortloop: do ico=1,cpatch%ncohorts - + !---------------------------------------------------------------------------! ! We now update the daily means of NPP allocation terms ! ! and we convert them to kgC/plant/yr ! !---------------------------------------------------------------------------! - if (save_daily) then - cpatch%dmean_nppleaf(ico) = cpatch%today_nppleaf(ico) & - * yr_day / cpatch%nplant(ico) - cpatch%dmean_nppfroot(ico) = cpatch%today_nppfroot(ico) & - * yr_day / cpatch%nplant(ico) - cpatch%dmean_nppsapwood(ico)= cpatch%today_nppsapwood(ico) & - * yr_day / cpatch%nplant(ico) - cpatch%dmean_nppcroot(ico) = cpatch%today_nppcroot(ico) & - * yr_day / cpatch%nplant(ico) - cpatch%dmean_nppseeds(ico) = cpatch%today_nppseeds(ico) & - * yr_day / cpatch%nplant(ico) - cpatch%dmean_nppwood(ico) = cpatch%today_nppwood(ico) & - * yr_day / cpatch%nplant(ico) - cpatch%dmean_nppdaily(ico) = cpatch%today_nppdaily(ico) & - * yr_day / cpatch%nplant(ico) - pss_nppleaf = pss_nppleaf & - + cpatch%today_nppleaf(ico) & - * yr_day * csite%area(ipa) - pss_nppfroot = pss_nppfroot & - + cpatch%today_nppfroot(ico) & - * yr_day * csite%area(ipa) - pss_nppsapwood = pss_nppsapwood & - + cpatch%today_nppsapwood(ico) & - * yr_day * csite%area(ipa) - pss_nppcroot = pss_nppcroot & - + cpatch%today_nppcroot(ico) & - * yr_day * csite%area(ipa) - pss_nppseeds = pss_nppseeds & - + cpatch%today_nppseeds(ico) & - * yr_day * csite%area(ipa) - pss_nppwood = pss_nppwood & - + cpatch%today_nppwood(ico) & - * yr_day * csite%area(ipa) - pss_nppdaily = pss_nppdaily & - + cpatch%today_nppdaily(ico) & - * yr_day * csite%area(ipa) - end if - - !---------------------------------------------------------------------------! - ! We update the following monthly means here because these dmean vari- ! - ! ables will be discarded before integrate_ed_monthly_output_vars is ! - ! called. ! - !---------------------------------------------------------------------------! - if (save_monthly) then - cpatch%mmean_nppleaf(ico) = cpatch%mmean_nppleaf(ico) & - + cpatch%dmean_nppleaf(ico) - cpatch%mmean_nppfroot(ico) = cpatch%mmean_nppfroot(ico) & - + cpatch%dmean_nppfroot(ico) - cpatch%mmean_nppsapwood(ico) = cpatch%mmean_nppsapwood(ico) & - + cpatch%dmean_nppsapwood(ico) - cpatch%mmean_nppcroot(ico) = cpatch%mmean_nppcroot(ico) & - + cpatch%dmean_nppcroot(ico) - cpatch%mmean_nppseeds(ico) = cpatch%mmean_nppseeds(ico) & - + cpatch%dmean_nppseeds(ico) - cpatch%mmean_nppwood(ico) = cpatch%mmean_nppwood(ico) & - + cpatch%dmean_nppwood(ico) - cpatch%mmean_nppdaily(ico) = cpatch%mmean_nppdaily(ico) & - + cpatch%dmean_nppdaily(ico) + if (writing_long) then + cpatch%dmean_nppleaf (ico) = cpatch%today_nppleaf (ico) & + * yr_day / cpatch%nplant (ico) + cpatch%dmean_nppfroot (ico) = cpatch%today_nppfroot (ico) & + * yr_day / cpatch%nplant (ico) + cpatch%dmean_nppsapwood(ico) = cpatch%today_nppsapwood(ico) & + * yr_day / cpatch%nplant (ico) + cpatch%dmean_nppcroot (ico) = cpatch%today_nppcroot (ico) & + * yr_day / cpatch%nplant (ico) + cpatch%dmean_nppseeds (ico) = cpatch%today_nppseeds (ico) & + * yr_day / cpatch%nplant (ico) + cpatch%dmean_nppwood (ico) = cpatch%today_nppwood (ico) & + * yr_day / cpatch%nplant (ico) + cpatch%dmean_nppdaily (ico) = cpatch%today_nppdaily (ico) & + * yr_day / cpatch%nplant (ico) end if end do cohortloop end do patchloop - if (save_daily) then - sss_nppleaf = sss_nppleaf + pss_nppleaf * site_area_i * cpoly%area(isi) - sss_nppfroot = sss_nppfroot + pss_nppfroot * site_area_i * cpoly%area(isi) - sss_nppsapwood = sss_nppsapwood + pss_nppsapwood * site_area_i & - * cpoly%area(isi) - sss_nppcroot = sss_nppcroot + pss_nppcroot * site_area_i * cpoly%area(isi) - sss_nppseeds = sss_nppseeds + pss_nppseeds * site_area_i * cpoly%area(isi) - sss_nppwood = sss_nppwood + pss_nppwood * site_area_i * cpoly%area(isi) - sss_nppdaily = sss_nppdaily + pss_nppdaily * site_area_i * cpoly%area(isi) - end if - end do siteloop - - if (save_daily) then - cgrid%dmean_nppleaf(ipy) = sss_nppleaf * poly_area_i - cgrid%dmean_nppfroot(ipy) = sss_nppfroot * poly_area_i - cgrid%dmean_nppsapwood(ipy) = sss_nppsapwood * poly_area_i - cgrid%dmean_nppcroot(ipy) = sss_nppcroot * poly_area_i - cgrid%dmean_nppseeds(ipy) = sss_nppseeds * poly_area_i - cgrid%dmean_nppwood(ipy) = sss_nppwood * poly_area_i - cgrid%dmean_nppdaily(ipy) = sss_nppdaily * poly_area_i - end if - - if (save_monthly) then - cgrid%mmean_nppleaf(ipy) = cgrid%mmean_nppleaf(ipy) & - + cgrid%dmean_nppleaf(ipy) - cgrid%mmean_nppfroot(ipy) = cgrid%mmean_nppfroot(ipy) & - + cgrid%dmean_nppfroot(ipy) - cgrid%mmean_nppsapwood(ipy)= cgrid%mmean_nppsapwood(ipy) & - + cgrid%dmean_nppsapwood(ipy) - cgrid%mmean_nppcroot(ipy) = cgrid%mmean_nppcroot(ipy) & - + cgrid%dmean_nppcroot(ipy) - cgrid%mmean_nppseeds(ipy) = cgrid%mmean_nppseeds(ipy) & - + cgrid%dmean_nppseeds(ipy) - cgrid%mmean_nppwood(ipy) = cgrid%mmean_nppwood(ipy) & - + cgrid%dmean_nppwood(ipy) - cgrid%mmean_nppdaily(ipy) = cgrid%mmean_nppdaily(ipy) & - + cgrid%dmean_nppdaily(ipy) - end if end do polyloop - + return -end subroutine normalize_ed_dailyNPP_vars +end subroutine normalize_ed_todayNPP_vars !==========================================================================================! !==========================================================================================! + + + !==========================================================================================! !==========================================================================================! -! This subroutine normalize the sum before writing the daily analysis. It also computes ! -! some of the variables that didn't need to be computed every time step, like LAI. ! +! This subroutine normalises the daily mean variables of those variables that could not ! +! be integrated directly. This includes temperatures, polygon-level budget variables, and ! +! variables that are defined during daytime only. ! !------------------------------------------------------------------------------------------! -subroutine normalize_ed_daily_output_vars(cgrid) - use ed_state_vars , only : edtype & ! structure - , polygontype & ! structure - , sitetype & ! structure - , patchtype ! ! structure - use grid_coms , only : nzg ! ! intent(in) - use ed_max_dims , only : n_pft & ! intent(in) - , n_dbh & ! intent(in) - , n_age & ! intent(in) - , n_dist_types ! ! intent(in) - use consts_coms , only : day_sec & ! intent(in) - , umols_2_kgCyr & ! intent(in) - , yr_day ! ! intent(in) - use ed_misc_coms , only : dtlsm & ! intent(in) - , frqsum & ! intent(in) - , ddbhi & ! intent(in) - , dagei ! ! intent(in) - use pft_coms , only : init_density ! ! intent(in) - use therm_lib , only : press2exner & ! function - , extheta2temp & ! function - , uextcm2tl & ! subroutine - , idealdenssh ! ! function +subroutine normalize_ed_dmean_vars(cgrid) + use ed_state_vars , only : edtype & ! structure + , polygontype & ! structure + , sitetype & ! structure + , patchtype ! ! structure + use grid_coms , only : nzg ! ! intent(in) + use ed_misc_coms , only : dtlsm ! ! intent(in) + use therm_lib , only : press2exner & ! function + , extheta2temp & ! function + , uextcm2tl & ! subroutine + , uint2tl & ! subroutine + , idealdenssh ! ! function + use soil_coms , only : tiny_sfcwater_mass & ! intent(in) + , soil ! ! intent(in) + use consts_coms , only : t00 & ! intent(in) + , wdns ! ! intent(in) implicit none !----- Arguments. ----------------------------------------------------------------------! type(edtype) , target :: cgrid @@ -2272,489 +1755,449 @@ subroutine normalize_ed_daily_output_vars(cgrid) type(polygontype) , pointer :: cpoly type(sitetype) , pointer :: csite type(patchtype) , pointer :: cpatch + real , dimension(nzg) :: cgrid_dmean_soil_hcap integer :: ipy integer :: isi integer :: ipa integer :: ico - integer :: ipft - integer :: ilu - integer :: idbh - integer :: iage integer :: k - logical :: forest - logical :: any_resolvable - real :: poly_area_i + integer :: nsoil + real :: poly_lai + real :: poly_wai + real :: poly_nplant + real :: can_exner + real :: atm_exner + real :: daylight_i real :: site_area_i - real :: forest_area_i - real :: patch_laiall_i - real :: pss_fsw , sss_fsw - real :: pss_fsn , sss_fsn - real :: pss_fs_open , sss_fs_open - real :: pss_storage_resp, sss_storage_resp - real :: pss_vleaf_resp , sss_vleaf_resp - real :: pss_growth_resp , sss_growth_resp - real :: sss_rh - real :: sss_cwd_rh - real :: sss_albedo - real :: sss_albedo_beam - real :: sss_albedo_diffuse - real :: veg_fliq - real :: dmean_can_exner - real :: dtlsm_o_daylight - real :: frqsum_o_daylight - !----- Locally saved variables. --------------------------------------------------------! - logical , save :: find_factors = .true. - real , save :: dtlsm_o_daysec = 1.e34 - real , save :: frqsum_o_daysec = 1.e34 + real :: poly_area_i + real :: site_wgt + real :: patch_wgt !---------------------------------------------------------------------------------------! - !----- Compute the normalization factors. This is done once. ---------------------------! - if (find_factors) then - dtlsm_o_daysec = dtlsm/day_sec - frqsum_o_daysec = frqsum/day_sec - find_factors = .false. - end if - - !----- Reset area indices. -------------------------------------------------------------! - do ipy=1,cgrid%npolygons - cpoly => cgrid%polygon(ipy) - cgrid%lai_pft (:,ipy) = 0. - cgrid%wai_pft (:,ipy) = 0. - do isi=1,cpoly%nsites - cpoly%lai_pft (:,isi) = 0. - cpoly%wai_pft (:,isi) = 0. - end do - end do - - + !---------------------------------------------------------------------------------------! + ! Loop over polygons. ! + !---------------------------------------------------------------------------------------! polyloop: do ipy=1,cgrid%npolygons cpoly => cgrid%polygon(ipy) + !----- Inverse of this polygon area (it should be always 1.) ------------------------! + poly_area_i = 1./sum(cpoly%area) !------------------------------------------------------------------------------------! - ! State variables, updated every time step, so these are normalized by ! - ! dtlsm/day_sec. ! - !------------------------------------------------------------------------------------! - cgrid%dmean_leaf_energy(ipy) = cgrid%dmean_leaf_energy(ipy) * dtlsm_o_daysec - cgrid%dmean_leaf_hcap(ipy) = cgrid%dmean_leaf_hcap(ipy) * dtlsm_o_daysec - cgrid%dmean_leaf_water(ipy) = cgrid%dmean_leaf_water(ipy) * dtlsm_o_daysec - cgrid%dmean_leaf_vpdef(ipy) = cgrid%dmean_leaf_vpdef(ipy) * dtlsm_o_daysec - cgrid%dmean_wood_energy(ipy) = cgrid%dmean_wood_energy(ipy) * dtlsm_o_daysec - cgrid%dmean_wood_hcap(ipy) = cgrid%dmean_wood_hcap(ipy) * dtlsm_o_daysec - cgrid%dmean_wood_water(ipy) = cgrid%dmean_wood_water(ipy) * dtlsm_o_daysec - cgrid%dmean_can_theta(ipy) = cgrid%dmean_can_theta(ipy) * dtlsm_o_daysec - cgrid%dmean_can_theiv(ipy) = cgrid%dmean_can_theiv(ipy) * dtlsm_o_daysec - cgrid%dmean_can_vpdef(ipy) = cgrid%dmean_can_vpdef(ipy) * dtlsm_o_daysec - cgrid%dmean_can_shv(ipy) = cgrid%dmean_can_shv(ipy) * dtlsm_o_daysec - cgrid%dmean_can_co2(ipy) = cgrid%dmean_can_co2(ipy) * dtlsm_o_daysec - cgrid%dmean_can_prss(ipy) = cgrid%dmean_can_prss(ipy) * dtlsm_o_daysec - cgrid%dmean_gnd_temp(ipy) = cgrid%dmean_gnd_temp(ipy) * dtlsm_o_daysec - cgrid%dmean_gnd_shv (ipy) = cgrid%dmean_gnd_shv (ipy) * dtlsm_o_daysec - cgrid%dmean_atm_temp(ipy) = cgrid%dmean_atm_temp(ipy) * dtlsm_o_daysec - cgrid%dmean_atm_vpdef(ipy) = cgrid%dmean_atm_vpdef(ipy) * dtlsm_o_daysec - cgrid%dmean_rshort(ipy) = cgrid%dmean_rshort(ipy) * dtlsm_o_daysec - cgrid%dmean_rshort_diff(ipy) = cgrid%dmean_rshort_diff(ipy) * dtlsm_o_daysec - cgrid%dmean_par(ipy) = cgrid%dmean_par(ipy) * dtlsm_o_daysec - cgrid%dmean_par_diff(ipy) = cgrid%dmean_par_diff(ipy) * dtlsm_o_daysec - cgrid%dmean_rlong(ipy) = cgrid%dmean_rlong(ipy) * dtlsm_o_daysec - cgrid%dmean_atm_shv(ipy) = cgrid%dmean_atm_shv(ipy) * dtlsm_o_daysec - cgrid%dmean_atm_co2(ipy) = cgrid%dmean_atm_co2(ipy) * dtlsm_o_daysec - cgrid%dmean_atm_prss(ipy) = cgrid%dmean_atm_prss(ipy) * dtlsm_o_daysec - cgrid%dmean_atm_vels(ipy) = cgrid%dmean_atm_vels(ipy) * dtlsm_o_daysec - - !------------------------------------------------------------------------------------! - ! Find the canopy variables that are not conserved when pressure changes. ! - !------------------------------------------------------------------------------------! - dmean_can_exner = press2exner(cgrid%dmean_can_prss(ipy)) - cgrid%dmean_can_temp(ipy) = extheta2temp( dmean_can_exner & - , cgrid%dmean_can_theta(ipy) ) - cgrid%dmean_can_rhos(ipy) = idealdenssh (cgrid%dmean_can_prss(ipy) & - ,cgrid%dmean_can_temp(ipy) & - ,cgrid%dmean_can_shv (ipy) ) - !------------------------------------------------------------------------------------! - - - - - !----- Find the leaf temperature, only when the mean heat capacity is non-zero. -----! - if (cgrid%dmean_leaf_hcap(ipy) > 0.) then - call uextcm2tl(cgrid%dmean_leaf_energy(ipy),cgrid%dmean_leaf_water(ipy) & - ,cgrid%dmean_leaf_hcap(ipy),cgrid%dmean_leaf_temp(ipy),veg_fliq) - else - cgrid%dmean_leaf_temp(ipy) = cgrid%dmean_gnd_temp(ipy) - end if - !------------------------------------------------------------------------------------! - - - !----- Find the leaf temperature, only when the mean heat capacity is non-zero. -----! - if (cgrid%dmean_wood_hcap(ipy) > 0.) then - call uextcm2tl(cgrid%dmean_wood_energy(ipy),cgrid%dmean_wood_water(ipy) & - ,cgrid%dmean_wood_hcap(ipy),cgrid%dmean_wood_temp(ipy),veg_fliq) - else - cgrid%dmean_wood_temp(ipy) = cgrid%dmean_gnd_temp(ipy) - end if + !----- Re-set some support variables. -----------------------------------------------! + poly_lai = 0.0 + poly_wai = 0.0 + poly_nplant = 0.0 + cgrid_dmean_soil_hcap(:) = 0.0 !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! - ! State variables, updated every frqsum, so these are normalized by ! - ! frqsum/day_sec. ! + ! Loop over sites. ! !------------------------------------------------------------------------------------! - do k=1,nzg - cgrid%dmean_soil_temp (k,ipy) = cgrid%dmean_soil_temp (k,ipy) * frqsum_o_daysec - cgrid%dmean_soil_water (k,ipy) = cgrid%dmean_soil_water (k,ipy) * frqsum_o_daysec - cgrid%dmean_soil_mstpot(k,ipy) = cgrid%dmean_soil_mstpot(k,ipy) * frqsum_o_daysec - cgrid%dmean_transloss (k,ipy) = cgrid%dmean_transloss (k,ipy) * frqsum_o_daysec - end do - !----- Precipitation and runoff. ----------------------------------------------------! - cgrid%dmean_pcpg (ipy) = cgrid%dmean_pcpg (ipy) * frqsum_o_daysec ! kg/m2/s - cgrid%dmean_runoff (ipy) = cgrid%dmean_runoff (ipy) * frqsum_o_daysec ! kg/m2/s - cgrid%dmean_drainage (ipy) = cgrid%dmean_drainage (ipy) * frqsum_o_daysec ! kg/m2/s - - !----- Vapor flux. ------------------------------------------------------------------! - cgrid%dmean_vapor_lc(ipy) = cgrid%dmean_vapor_lc(ipy) * frqsum_o_daysec ! kg/m2/s - cgrid%dmean_vapor_wc(ipy) = cgrid%dmean_vapor_wc(ipy) * frqsum_o_daysec ! kg/m2/s - cgrid%dmean_vapor_gc(ipy) = cgrid%dmean_vapor_gc(ipy) * frqsum_o_daysec ! kg/m2/s - cgrid%dmean_vapor_ac(ipy) = cgrid%dmean_vapor_ac(ipy) * frqsum_o_daysec ! kg/m2/s - + siteloop: do isi=1,cpoly%nsites + csite => cpoly%site(isi) - !------------------------------------------------------------------------------------! - ! Flux variables, updated every frqsum, so these are normalized by ! - ! frqsum/day_sec. ! - !------------------------------------------------------------------------------------! - cgrid%dmean_ustar (ipy) = cgrid%dmean_ustar (ipy) * frqsum_o_daysec - cgrid%dmean_tstar (ipy) = cgrid%dmean_tstar (ipy) * frqsum_o_daysec - cgrid%dmean_qstar (ipy) = cgrid%dmean_qstar (ipy) * frqsum_o_daysec - cgrid%dmean_cstar (ipy) = cgrid%dmean_cstar (ipy) * frqsum_o_daysec - cgrid%dmean_evap (ipy) = cgrid%dmean_evap (ipy) * frqsum_o_daysec - cgrid%dmean_transp (ipy) = cgrid%dmean_transp (ipy) * frqsum_o_daysec - cgrid%dmean_carbon_ac (ipy) = cgrid%dmean_carbon_ac (ipy) * frqsum_o_daysec - cgrid%dmean_carbon_st (ipy) = cgrid%dmean_carbon_st (ipy) * frqsum_o_daysec - cgrid%dmean_sensible_lc (ipy) = cgrid%dmean_sensible_lc (ipy) * frqsum_o_daysec - cgrid%dmean_sensible_wc (ipy) = cgrid%dmean_sensible_wc (ipy) * frqsum_o_daysec - cgrid%dmean_sensible_gc (ipy) = cgrid%dmean_sensible_gc (ipy) * frqsum_o_daysec - cgrid%dmean_sensible_ac (ipy) = cgrid%dmean_sensible_ac (ipy) * frqsum_o_daysec - cgrid%dmean_rshort_gnd (ipy) = cgrid%dmean_rshort_gnd (ipy) * frqsum_o_daysec - cgrid%dmean_par_gnd (ipy) = cgrid%dmean_par_gnd (ipy) * frqsum_o_daysec - cgrid%dmean_rlong_gnd (ipy) = cgrid%dmean_rlong_gnd (ipy) * frqsum_o_daysec - cgrid%dmean_rlongup (ipy) = cgrid%dmean_rlongup (ipy) * frqsum_o_daysec - cgrid%dmean_parup (ipy) = cgrid%dmean_parup (ipy) * frqsum_o_daysec - cgrid%dmean_nirup (ipy) = cgrid%dmean_nirup (ipy) * frqsum_o_daysec - cgrid%dmean_rshortup (ipy) = cgrid%dmean_rshortup (ipy) * frqsum_o_daysec - cgrid%dmean_rnet (ipy) = cgrid%dmean_rnet (ipy) * frqsum_o_daysec - cgrid%dmean_rlong_albedo(ipy) = cgrid%dmean_rlong_albedo(ipy) * frqsum_o_daysec + !----- Inverse of this site area (it should be always 1.) ------------------------! + site_area_i = 1./sum(csite%area) + !---------------------------------------------------------------------------------! - !------------------------------------------------------------------------------------! - ! Carbon flux variables should be total flux integrated over the day at this ! - ! point in umol/m2/s. We just multiply by one year in seconds and convert to kgC, ! - ! so the units will be kgC/m2/yr. ! - !------------------------------------------------------------------------------------! - cgrid%dmean_plresp (ipy) = cgrid%dmean_plresp (ipy) * frqsum_o_daysec - cgrid%dmean_nep (ipy) = cgrid%dmean_nep (ipy) * frqsum_o_daysec - cgrid%dmean_gpp_dbh (:,ipy) = cgrid%dmean_gpp_dbh(:,ipy) * frqsum_o_daysec - cgrid%dmean_co2_residual (ipy) = cgrid%dmean_co2_residual (ipy) & - * frqsum_o_daysec - cgrid%dmean_energy_residual(ipy) = cgrid%dmean_energy_residual(ipy) * frqsum_o_daysec - cgrid%dmean_water_residual (ipy) = cgrid%dmean_water_residual (ipy) * frqsum_o_daysec + !----- Site weight. --------------------------------------------------------------! + site_wgt = cpoly%area(isi) * poly_area_i + !---------------------------------------------------------------------------------! - poly_area_i = 1./sum(cpoly%area) - sss_growth_resp = 0. - sss_storage_resp = 0. - sss_vleaf_resp = 0. - sss_rh = 0. - sss_cwd_rh = 0. - sss_albedo = 0. - sss_albedo_beam = 0. - sss_albedo_diffuse = 0. - sss_fsn = 0. - sss_fsw = 0. - sss_fs_open = 0. - siteloop: do isi=1,cpoly%nsites - csite => cpoly%site(isi) !---------------------------------------------------------------------------------! - ! Find the average day length. ! + ! Find the average day length. In case of polar night, we set the factor to ! + ! zero so it won't become a singularity. ! !---------------------------------------------------------------------------------! - if (cpoly%daylight(isi) < dtlsm) then - dtlsm_o_daylight = 0. - frqsum_o_daylight = 0. + if (cpoly%daylight(isi) >= dtlsm) then + daylight_i = 1. / cpoly%daylight(isi) else - dtlsm_o_daylight = dtlsm / cpoly%daylight(isi) - frqsum_o_daylight = frqsum / cpoly%daylight(isi) + daylight_i = 0. end if !---------------------------------------------------------------------------------! - cpoly%dmean_co2_residual(isi) = cpoly%dmean_co2_residual(isi) & - * umols_2_kgCyr * frqsum_o_daysec - cpoly%dmean_energy_residual(isi) = cpoly%dmean_energy_residual(isi) & - * frqsum_o_daysec - cpoly%dmean_water_residual(isi) = cpoly%dmean_water_residual(isi) & - * frqsum_o_daysec - - site_area_i = 1./sum(csite%area) + !---------------------------------------------------------------------------------! - ! Finding the total "forest" area. By forest we mean the fraction of land ! - ! that is not agriculture, even if the area is not a forest. ! + ! Find the derived properties for the air above canopy. ! !---------------------------------------------------------------------------------! - forest_area_i = sum(csite%area,csite%dist_type /= 1) - if (forest_area_i > 1.e-6) then - forest_area_i = 1. / forest_area_i - else - forest_area_i = 0. ! Tiny forest area, we will neglect it in this site. - end if + atm_exner = press2exner (cpoly%dmean_atm_prss(isi)) + cpoly%dmean_atm_temp(isi) = extheta2temp(atm_exner,cpoly%dmean_atm_theta(isi)) + cpoly%dmean_atm_rhos(isi) = idealdenssh ( cpoly%dmean_atm_prss (isi) & + , cpoly%dmean_atm_temp (isi) & + , cpoly%dmean_atm_shv (isi) ) !---------------------------------------------------------------------------------! - !----- Initialize auxiliary variables to add patchtype variables. ----------------! - pss_fsn = 0. - pss_fsw = 0. - pss_fs_open = 0. - pss_growth_resp = 0. - pss_storage_resp = 0. - pss_vleaf_resp = 0. + !---------------------------------------------------------------------------------! + ! Loop over patches. ! + !---------------------------------------------------------------------------------! patchloop: do ipa=1,csite%npatches cpatch => csite%patch(ipa) - - - any_resolvable = .false. - if (cpatch%ncohorts > 0) then - any_resolvable = any(cpatch%leaf_resolvable(1:cpatch%ncohorts)) - end if - cohortloop: do ico=1,cpatch%ncohorts + !----- Site weight. -----------------------------------------------------------! + patch_wgt = csite%area(ipa) * site_area_i * site_wgt + !------------------------------------------------------------------------------! - !---------------------------------------------------------------------------! - ! These variables must be scaled. They are updated every time step. ! - !---------------------------------------------------------------------------! - cpatch%dmean_par_l (ico) = cpatch%dmean_par_l (ico) & - * dtlsm_o_daysec - cpatch%dmean_par_l_beam (ico) = cpatch%dmean_par_l_beam (ico) & - * dtlsm_o_daysec - cpatch%dmean_par_l_diff (ico) = cpatch%dmean_par_l_diff (ico) & - * dtlsm_o_daysec - cpatch%dmean_rshort_l (ico) = cpatch%dmean_rshort_l (ico) & - * dtlsm_o_daysec - cpatch%dmean_rlong_l (ico) = cpatch%dmean_rlong_l (ico) & - * dtlsm_o_daysec - cpatch%dmean_sensible_lc (ico) = cpatch%dmean_sensible_lc (ico) & - * dtlsm_o_daysec - cpatch%dmean_vapor_lc (ico) = cpatch%dmean_vapor_lc (ico) & - * dtlsm_o_daysec - cpatch%dmean_transp (ico) = cpatch%dmean_transp (ico) & - * dtlsm_o_daysec - cpatch%dmean_intercepted_al (ico) = cpatch%dmean_intercepted_al (ico) & - * dtlsm_o_daysec - cpatch%dmean_wshed_lg (ico) = cpatch%dmean_wshed_lg (ico) & - * dtlsm_o_daysec - cpatch%dmean_rshort_w (ico) = cpatch%dmean_rshort_w (ico) & - * dtlsm_o_daysec - cpatch%dmean_rlong_w (ico) = cpatch%dmean_rlong_w (ico) & - * dtlsm_o_daysec - cpatch%dmean_sensible_wc (ico) = cpatch%dmean_sensible_wc (ico) & - * dtlsm_o_daysec - cpatch%dmean_vapor_wc (ico) = cpatch%dmean_vapor_wc (ico) & - * dtlsm_o_daysec - cpatch%dmean_intercepted_aw (ico) = cpatch%dmean_intercepted_aw (ico) & - * dtlsm_o_daysec - cpatch%dmean_wshed_wg (ico) = cpatch%dmean_wshed_wg (ico) & - * dtlsm_o_daysec - !---------------------------------------------------------------------------! - !---------------------------------------------------------------------------! - ! The light level, the fraction of open stomates, and the water demand ! - ! and supply variables are averaged over the length of day light only. We ! - ! find this variable only if there is any day light (this is to avoid ! - ! problems with polar nights). ! - !---------------------------------------------------------------------------! - if (cpoly%daylight(isi) >= dtlsm) then - cpatch%dmean_fs_open (ico) = cpatch%dmean_fs_open (ico) & - * dtlsm_o_daylight - cpatch%dmean_fsw (ico) = cpatch%dmean_fsw (ico) & - * dtlsm_o_daylight - cpatch%dmean_fsn (ico) = cpatch%dmean_fsn (ico) & - * dtlsm_o_daylight - cpatch%dmean_psi_open (ico) = cpatch%dmean_psi_open (ico) & - * dtlsm_o_daylight - cpatch%dmean_psi_closed (ico) = cpatch%dmean_psi_closed (ico) & - * dtlsm_o_daylight - cpatch%dmean_water_supply (ico) = cpatch%dmean_water_supply (ico) & - * dtlsm_o_daylight - cpatch%dmean_light_level (ico) = cpatch%dmean_light_level (ico) & - * dtlsm_o_daylight - cpatch%dmean_light_level_beam(ico) = cpatch%dmean_light_level_beam(ico) & - * dtlsm_o_daylight - cpatch%dmean_light_level_diff(ico) = cpatch%dmean_light_level_diff(ico) & - * dtlsm_o_daylight - else - cpatch%dmean_fs_open (ico) = 0. - cpatch%dmean_fsw (ico) = 0. - cpatch%dmean_fsn (ico) = 0. - cpatch%dmean_psi_open (ico) = 0. - cpatch%dmean_psi_closed (ico) = 0. - cpatch%dmean_water_supply (ico) = 0. - cpatch%dmean_light_level (ico) = 0. - cpatch%dmean_light_level_beam(ico) = 0. - cpatch%dmean_light_level_diff(ico) = 0. - end if - end do cohortloop + !------------------------------------------------------------------------------! + ! Normalise daytime only variables. ! + !------------------------------------------------------------------------------! + csite%dmean_albedo (ipa) = csite%dmean_albedo (ipa) * daylight_i + csite%dmean_albedo_beam(ipa) = csite%dmean_albedo_beam(ipa) * daylight_i + csite%dmean_albedo_diff(ipa) = csite%dmean_albedo_diff(ipa) * daylight_i + !------------------------------------------------------------------------------! + + !------------------------------------------------------------------------------! - ! Integrate the fraction of open stomata + ! Now we find the derived properties for the canopy air space. ! !------------------------------------------------------------------------------! - if (any_resolvable) then - patch_laiall_i = 1./max(tiny(1.),sum(cpatch%lai,cpatch%leaf_resolvable)) - pss_fsn = pss_fsn + csite%area(ipa) & - * ( sum(cpatch%dmean_fsn * cpatch%lai,cpatch%leaf_resolvable) & - * patch_laiall_i) - pss_fsw = pss_fsw + csite%area(ipa) & - * ( sum(cpatch%dmean_fsw * cpatch%lai,cpatch%leaf_resolvable) & - * patch_laiall_i) - pss_fs_open = pss_fs_open + csite%area(ipa) & - * ( sum(cpatch%dmean_fs_open * cpatch%lai & - ,cpatch%leaf_resolvable) & - * patch_laiall_i) - end if + can_exner = press2exner (csite%dmean_can_prss(ipa)) + csite%dmean_can_temp(ipa) = extheta2temp(can_exner,csite%dmean_can_theta(ipa)) + csite%dmean_can_rhos(ipa) = idealdenssh ( csite%dmean_can_prss (ipa) & + , csite%dmean_can_temp (ipa) & + , csite%dmean_can_shv (ipa) ) + !------------------------------------------------------------------------------! + + + !------------------------------------------------------------------------------! - ! "Forest" here means non-agricultural patch, it may be a naturally occur- ! - ! ring open canopy biome. ! + ! Aggregate the polygon-level variables of those variables that were not ! + ! integrated during the day. ! !------------------------------------------------------------------------------! - forest = csite%dist_type(ipa) /= 1 - - !----- CO2 residual is now in kgC/m2/yr!!! ------------------------------------! - csite%dmean_co2_residual(ipa) = csite%dmean_co2_residual(ipa) & - * umols_2_kgCyr * frqsum_o_daysec - csite%dmean_energy_residual(ipa) = csite%dmean_energy_residual(ipa) & - * frqsum_o_daysec - csite%dmean_water_residual(ipa) = csite%dmean_water_residual(ipa) & - * frqsum_o_daysec - csite%dmean_rk4step(ipa) = csite%dmean_rk4step(ipa) & - * frqsum_o_daysec + cgrid%dmean_co2_residual (ipy) = cgrid%dmean_co2_residual (ipy) & + + csite%dmean_co2_residual (ipa) & + * patch_wgt + cgrid%dmean_energy_residual(ipy) = cgrid%dmean_energy_residual(ipy) & + + csite%dmean_energy_residual(ipa) & + * patch_wgt + cgrid%dmean_water_residual (ipy) = cgrid%dmean_water_residual (ipy) & + + csite%dmean_water_residual (ipa) & + * patch_wgt + cgrid%dmean_albedo (ipy) = cgrid%dmean_albedo (ipy) & + + csite%dmean_albedo (ipa) & + * patch_wgt + cgrid%dmean_albedo_beam (ipy) = cgrid%dmean_albedo_beam (ipy) & + + csite%dmean_albedo_beam (ipa) & + * patch_wgt + cgrid%dmean_albedo_diff (ipy) = cgrid%dmean_albedo_diff (ipy) & + + csite%dmean_albedo_diff (ipa) & + * patch_wgt + cgrid%dmean_A_decomp (ipy) = cgrid%dmean_A_decomp (ipy) & + + csite%dmean_A_decomp (ipa) & + * patch_wgt + cgrid%dmean_Af_decomp (ipy) = cgrid%dmean_Af_decomp (ipy) & + + csite%dmean_Af_decomp (ipa) & + * patch_wgt + !------------------------------------------------------------------------------! + + + !------------------------------------------------------------------------------! - ! Heterotrophic respiration is currently the integral over a day, given ! - ! in µmol(CO2)/m²/s, so we multiply by the number of seconds in a year and ! - ! convert to kgC, so the final units will be kgC/m2/yr. ! + ! Soil matric potential, temperature, and liquid water. ! !------------------------------------------------------------------------------! - csite%dmean_rh (ipa) = csite%dmean_rh (ipa) * frqsum_o_daysec - csite%dmean_cwd_rh(ipa) = csite%dmean_cwd_rh(ipa) * frqsum_o_daysec + do k=1,nzg + nsoil = cpoly%ntext_soil(k,isi) + call uextcm2tl( csite%dmean_soil_energy(k,ipa) & + , csite%dmean_soil_water (k,ipa) * wdns & + , soil(nsoil)%slcpd & + , csite%dmean_soil_temp (k,ipa) & + , csite%dmean_soil_fliq (k,ipa)) + cgrid_dmean_soil_hcap (k) = cgrid_dmean_soil_hcap(k) & + + soil(nsoil)%slcpd * patch_wgt + end do !------------------------------------------------------------------------------! + !------------------------------------------------------------------------------! - ! Albedo is updated over daylight hours only. ! + ! If the patch had some temporary snow/pounding layer, convert the mean ! + ! energy to J/kg, then find the mean temperature and liquid fraction. Other- ! + ! wise, set them to either zero or default values. ! !------------------------------------------------------------------------------! - csite%dmean_albedo (ipa) = csite%dmean_albedo (ipa) & - * frqsum_o_daylight - csite%dmean_albedo_beam (ipa) = csite%dmean_albedo_beam (ipa) & - * frqsum_o_daylight - csite%dmean_albedo_diffuse (ipa) = csite%dmean_albedo_diffuse (ipa) & - * frqsum_o_daylight + if (csite%dmean_sfcw_mass(ipa) > tiny_sfcwater_mass) then + csite%dmean_sfcw_energy(ipa) = csite%dmean_sfcw_energy(ipa) & + / csite%dmean_sfcw_mass (ipa) + call uint2tl( csite%dmean_sfcw_energy(ipa), csite%dmean_sfcw_temp(ipa) & + , csite%dmean_sfcw_fliq (ipa)) + else + csite%dmean_sfcw_mass (ipa) = 0. + csite%dmean_sfcw_depth (ipa) = 0. + csite%dmean_sfcw_energy(ipa) = 0. + csite%dmean_sfcw_temp (ipa) = csite%dmean_soil_temp(nzg,ipa) + csite%dmean_sfcw_fliq (ipa) = csite%dmean_soil_fliq(nzg,ipa) + end if !------------------------------------------------------------------------------! - if (cpatch%ncohorts > 0) then - pss_growth_resp = pss_growth_resp + csite%area(ipa) & - * sum(cpatch%growth_respiration * cpatch%nplant) & - * yr_day - pss_storage_resp = pss_storage_resp + csite%area(ipa) & - * sum(cpatch%storage_respiration * cpatch%nplant) & - * yr_day - pss_vleaf_resp = pss_vleaf_resp + csite%area(ipa) & - * sum(cpatch%vleaf_respiration * cpatch%nplant) & - * yr_day - do ipft=1,n_pft - cpoly%lai_pft(ipft,isi) = cpoly%lai_pft(ipft,isi) & - + sum(cpatch%lai,cpatch%pft == ipft) & - * csite%area(ipa) * site_area_i - cpoly%wai_pft(ipft,isi) = cpoly%wai_pft(ipft,isi) & - + sum(cpatch%wai,cpatch%pft == ipft) & - * csite%area(ipa) * site_area_i - end do - end if - end do patchloop + !------------------------------------------------------------------------------! + ! Loop over the cohorts. ! + !------------------------------------------------------------------------------! + cohortloop: do ico=1,cpatch%ncohorts + !----- Aggregate AIs and density, they may be used to normalise averages. --! + poly_nplant = poly_nplant + cpatch%nplant(ico) * patch_wgt + poly_lai = poly_lai + cpatch%lai (ico) * patch_wgt + poly_wai = poly_wai + cpatch%wai (ico) * patch_wgt + !---------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------! + ! Normalise daytime only variables. ! + !---------------------------------------------------------------------------! + cpatch%dmean_light_level (ico) = cpatch%dmean_light_level (ico) & + * daylight_i + cpatch%dmean_light_level_beam(ico) = cpatch%dmean_light_level_beam(ico) & + * daylight_i + cpatch%dmean_light_level_diff(ico) = cpatch%dmean_light_level_diff(ico) & + * daylight_i + cpatch%dmean_fs_open (ico) = cpatch%dmean_fs_open (ico) & + * daylight_i + cpatch%dmean_fsw (ico) = cpatch%dmean_fsw (ico) & + * daylight_i + cpatch%dmean_fsn (ico) = cpatch%dmean_fsn (ico) & + * daylight_i + !---------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------! + ! Aggregate the polygon-level variables of the variables that have not ! + ! been aggregated during the previous day. ! + !---------------------------------------------------------------------------! + cgrid%dmean_fs_open (ipy) = cgrid%dmean_fs_open (ipy) & + + cpatch%dmean_fs_open (ico) & + * cpatch%lai (ico) & + * patch_wgt + cgrid%dmean_fsw (ipy) = cgrid%dmean_fsw (ipy) & + + cpatch%dmean_fsw (ico) & + * cpatch%lai (ico) & + * patch_wgt + cgrid%dmean_fsn (ipy) = cgrid%dmean_fsn (ipy) & + + cpatch%dmean_fsn (ico) & + * cpatch%lai (ico) & + * patch_wgt + cgrid%dmean_nppleaf (ipy) = cgrid%dmean_nppleaf (ipy) & + + cpatch%dmean_nppleaf (ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%dmean_nppfroot (ipy) = cgrid%dmean_nppfroot (ipy) & + + cpatch%dmean_nppfroot (ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%dmean_nppsapwood (ipy) = cgrid%dmean_nppsapwood (ipy) & + + cpatch%dmean_nppsapwood (ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%dmean_nppcroot (ipy) = cgrid%dmean_nppcroot (ipy) & + + cpatch%dmean_nppcroot (ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%dmean_nppseeds (ipy) = cgrid%dmean_nppseeds (ipy) & + + cpatch%dmean_nppseeds (ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%dmean_nppwood (ipy) = cgrid%dmean_nppwood (ipy) & + + cpatch%dmean_nppwood (ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%dmean_nppdaily (ipy) = cgrid%dmean_nppdaily (ipy) & + + cpatch%dmean_nppdaily (ico) & + * cpatch%nplant (ico) & + * patch_wgt + !---------------------------------------------------------------------------! + - !----- Add this patch to the site sum. -------------------------------------------! - - sss_fsn = sss_fsn + (pss_fsn * site_area_i) & - * cpoly%area(isi) - sss_fsw = sss_fsw + (pss_fsw * site_area_i) & - * cpoly%area(isi) - sss_fs_open = sss_fs_open + (pss_fs_open * site_area_i) & - * cpoly%area(isi) - sss_growth_resp = sss_growth_resp + (pss_growth_resp * site_area_i) & - * cpoly%area(isi) - sss_storage_resp = sss_storage_resp + (pss_storage_resp * site_area_i) & - * cpoly%area(isi) - sss_vleaf_resp = sss_vleaf_resp + (pss_vleaf_resp * site_area_i) & - * cpoly%area(isi) - sss_rh = sss_rh & - + (sum(csite%dmean_rh * csite%area) * site_area_i) & - * cpoly%area(isi) - sss_cwd_rh = sss_cwd_rh & - + (sum(csite%dmean_cwd_rh * csite%area) * site_area_i) & - * cpoly%area(isi) - sss_albedo = sss_albedo & - + (sum(csite%dmean_albedo * csite%area) * site_area_i) & - * cpoly%area(isi) - sss_albedo_beam = sss_albedo_beam & - + (sum(csite%dmean_albedo_beam * csite%area) * site_area_i) & - * cpoly%area(isi) - sss_albedo_diffuse = sss_albedo_diffuse & - + (sum(csite%dmean_albedo_diffuse * csite%area)*site_area_i) & - * cpoly%area(isi) + + !---------------------------------------------------------------------------! + ! Find the vegetation temperature and liquid fraction. ! + !---------------------------------------------------------------------------! + !----- Leaf. ---------------------------------------------------------------! + if (cpatch%dmean_leaf_hcap(ico) > 0.) then + call uextcm2tl( cpatch%dmean_leaf_energy(ico) & + , cpatch%dmean_leaf_water (ico) & + , cpatch%dmean_leaf_hcap (ico) & + , cpatch%dmean_leaf_temp (ico) & + , cpatch%dmean_leaf_fliq (ico) ) + else + cpatch%dmean_leaf_vpdef(ico) = csite%dmean_can_vpdef(ipa) + cpatch%dmean_leaf_temp (ico) = csite%dmean_can_temp (ipa) + if (csite%dmean_can_temp(ipa) > t00) then + cpatch%dmean_leaf_fliq(ico) = 1.0 + elseif (csite%dmean_can_temp(ipa) == t00) then + cpatch%dmean_leaf_fliq(ico) = 0.5 + else + cpatch%dmean_leaf_fliq(ico) = 0.0 + end if + end if + !----- Wood. ---------------------------------------------------------------! + if (cpatch%dmean_wood_hcap(ico) > 0.) then + call uextcm2tl( cpatch%dmean_wood_energy(ico) & + , cpatch%dmean_wood_water (ico) & + , cpatch%dmean_wood_hcap (ico) & + , cpatch%dmean_wood_temp (ico) & + , cpatch%dmean_wood_fliq (ico) ) + else + cpatch%dmean_wood_temp(ico) = csite%dmean_can_temp(ipa) + if (csite%dmean_can_temp(ipa) > t00) then + cpatch%dmean_wood_fliq(ico) = 1.0 + elseif (csite%dmean_can_temp(ipa) == t00) then + cpatch%dmean_wood_fliq(ico) = 0.5 + else + cpatch%dmean_wood_fliq(ico) = 0.0 + end if + end if + !---------------------------------------------------------------------------! + end do cohortloop + !------------------------------------------------------------------------------! + end do patchloop + !---------------------------------------------------------------------------------! end do siteloop - !------------------------------------------------------------------------------------! - ! Find the area indices per PFT class. ! + + + + + + + !------------------------------------------------------------------------------------! + ! Find the derived properties for the air above canopy. ! + !------------------------------------------------------------------------------------! + atm_exner = press2exner (cgrid%dmean_atm_prss(ipy)) + cgrid%dmean_atm_temp(ipy) = extheta2temp(atm_exner,cgrid%dmean_atm_theta(ipy)) + cgrid%dmean_atm_rhos(ipy) = idealdenssh ( cgrid%dmean_atm_prss (ipy) & + , cgrid%dmean_atm_temp (ipy) & + , cgrid%dmean_atm_shv (ipy) ) + !------------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------------! + ! Find the derived properties for the canopy air space. ! + !------------------------------------------------------------------------------------! + can_exner = press2exner (cgrid%dmean_can_prss(ipy)) + cgrid%dmean_can_temp(ipy) = extheta2temp(can_exner,cgrid%dmean_can_theta(ipy)) + cgrid%dmean_can_rhos(ipy) = idealdenssh ( cgrid%dmean_can_prss (ipy) & + , cgrid%dmean_can_temp (ipy) & + , cgrid%dmean_can_shv (ipy) ) !------------------------------------------------------------------------------------! - do ipft=1,n_pft - cgrid%lai_pft(ipft,ipy) = cgrid%lai_pft(ipft,ipy) & - + sum(cpoly%lai_pft(ipft,:)*cpoly%area) * poly_area_i - cgrid%wai_pft(ipft,ipy) = cgrid%wai_pft(ipft,ipy) & - + sum(cpoly%wai_pft(ipft,:)*cpoly%area) * poly_area_i + + + + + !------------------------------------------------------------------------------------! + ! If the patch had some temporary snow/pounding layer, convert the mean energy to ! + ! J/kg, then find the mean temperature and liquid fraction. Otherwise, set them to ! + ! either zero or default values. ! + !------------------------------------------------------------------------------------! + if (cgrid%dmean_sfcw_mass(ipy) > tiny_sfcwater_mass) then + cgrid%dmean_sfcw_energy(ipy) = cgrid%dmean_sfcw_energy(ipy) & + / cgrid%dmean_sfcw_mass(ipy) + call uint2tl(cgrid%dmean_sfcw_energy(ipy),cgrid%dmean_sfcw_temp(ipy) & + ,cgrid%dmean_sfcw_fliq(ipy)) + else + cgrid%dmean_sfcw_mass (ipy) = 0. + cgrid%dmean_sfcw_depth (ipy) = 0. + cgrid%dmean_sfcw_energy(ipy) = 0. + cgrid%dmean_sfcw_temp (ipy) = cgrid%dmean_soil_temp(nzg,ipy) + cgrid%dmean_sfcw_fliq (ipy) = cgrid%dmean_soil_fliq(nzg,ipy) + end if + !------------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------------! + ! Find the temperature and the fraction of liquid water. ! + !------------------------------------------------------------------------------------! + do k=1,nzg + call uextcm2tl(cgrid%dmean_soil_energy(k,ipy),cgrid%dmean_soil_water(k,ipy)*wdns & + ,cgrid_dmean_soil_hcap (k) ,cgrid%dmean_soil_temp (k,ipy) & + ,cgrid%dmean_soil_fliq (k,ipy)) end do !------------------------------------------------------------------------------------! - cgrid%dmean_fsn(ipy) = cgrid%dmean_fsn(ipy) + sss_fsn * poly_area_i - cgrid%dmean_fsw(ipy) = cgrid%dmean_fsw(ipy) + sss_fsw * poly_area_i - cgrid%dmean_fs_open(ipy) = cgrid%dmean_fs_open(ipy) + sss_fs_open * poly_area_i - - cgrid%dmean_rh (ipy) = cgrid%dmean_rh (ipy) & - + sss_rh * poly_area_i - cgrid%dmean_cwd_rh (ipy) = cgrid%dmean_cwd_rh (ipy) & - + sss_cwd_rh * poly_area_i - cgrid%dmean_albedo (ipy) = cgrid%dmean_albedo (ipy) & - + sss_albedo * poly_area_i - cgrid%dmean_albedo_beam (ipy) = cgrid%dmean_albedo_beam (ipy) & - + sss_albedo_beam * poly_area_i - cgrid%dmean_albedo_diffuse(ipy) = cgrid%dmean_albedo_diffuse(ipy) & - + sss_albedo_diffuse * poly_area_i - cgrid%dmean_growth_resp(ipy) = cgrid%dmean_growth_resp(ipy) & - + sss_growth_resp * poly_area_i - cgrid%dmean_storage_resp(ipy) = cgrid%dmean_storage_resp(ipy) & - + sss_storage_resp * poly_area_i - cgrid%dmean_vleaf_resp(ipy) = cgrid%dmean_vleaf_resp(ipy) & - + sss_vleaf_resp * poly_area_i + + !------------------------------------------------------------------------------------! + ! Find the vegetation temperature and liquid fraction. ! + !------------------------------------------------------------------------------------! + !----- Leaf. ------------------------------------------------------------------------! + if (cgrid%dmean_leaf_hcap(ipy) > 0.) then + call uextcm2tl( cgrid%dmean_leaf_energy(ipy), cgrid%dmean_leaf_water (ipy) & + , cgrid%dmean_leaf_hcap (ipy), cgrid%dmean_leaf_temp (ipy) & + , cgrid%dmean_leaf_fliq (ipy) ) + else + cgrid%dmean_leaf_temp (ipy) = cgrid%dmean_can_temp (ipy) + if (cgrid%dmean_can_temp(ipy) > t00) then + cgrid%dmean_leaf_fliq(ipy) = 1.0 + elseif (cgrid%dmean_can_temp(ipy) == t00) then + cgrid%dmean_leaf_fliq(ipy) = 0.5 + else + cgrid%dmean_leaf_fliq(ipy) = 0.0 + end if + end if + !----- Wood. ------------------------------------------------------------------------! + if (cgrid%dmean_wood_hcap(ipy) > 0.) then + call uextcm2tl( cgrid%dmean_wood_energy(ipy) & + , cgrid%dmean_wood_water (ipy) & + , cgrid%dmean_wood_hcap (ipy) & + , cgrid%dmean_wood_temp (ipy) & + , cgrid%dmean_wood_fliq (ipy) ) + else + cgrid%dmean_wood_temp(ipy) = cgrid%dmean_can_temp(ipy) + if (cgrid%dmean_can_temp(ipy) > t00) then + cgrid%dmean_wood_fliq(ipy) = 1.0 + elseif (cgrid%dmean_can_temp(ipy) == t00) then + cgrid%dmean_wood_fliq(ipy) = 0.5 + else + cgrid%dmean_wood_fliq(ipy) = 0.0 + end if + end if + !------------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------------! + ! Normalise the "intensive" properties. The weight was either the LAI, WAI, or ! + ! plant density. In case none of the cohorts qualified to contribute, then we ! + ! assign either the canopy air space property, or a default number. ! + !------------------------------------------------------------------------------------! + if (poly_lai > 0.) then + cgrid%dmean_fs_open (ipy) = cgrid%dmean_fs_open (ipy) / poly_lai + cgrid%dmean_fsw (ipy) = cgrid%dmean_fsw (ipy) / poly_lai + cgrid%dmean_fsn (ipy) = cgrid%dmean_fsn (ipy) / poly_lai + else + cgrid%dmean_fs_open (ipy) = 0.5 + cgrid%dmean_fsw (ipy) = 0.5 + cgrid%dmean_fsn (ipy) = 0.5 + end if + !------------------------------------------------------------------------------------! end do polyloop + !---------------------------------------------------------------------------------------! return - end subroutine normalize_ed_daily_output_vars + end subroutine normalize_ed_dmean_vars !==========================================================================================! !==========================================================================================! @@ -2765,12 +2208,14 @@ end subroutine normalize_ed_daily_output_vars !==========================================================================================! !==========================================================================================! -subroutine zero_ed_daily_vars(cgrid) -!------------------------------------------------------------------------------------------! ! This subroutine resets the daily_averages for variables actually used in the ! ! integration. ! !------------------------------------------------------------------------------------------! - use ed_state_vars , only: edtype,polygontype,sitetype,patchtype +subroutine zero_ed_today_vars(cgrid) + use ed_state_vars, only : edtype & ! structure + , polygontype & ! structure + , sitetype & ! structure + , patchtype ! ! structure implicit none !----- Arguments. ----------------------------------------------------------------------! type(edtype) , target :: cgrid @@ -2822,7 +2267,7 @@ subroutine zero_ed_daily_vars(cgrid) end do !---------------------------------------------------------------------------------------! return -end subroutine zero_ed_daily_vars +end subroutine zero_ed_today_vars !==========================================================================================! !==========================================================================================! @@ -2833,10 +2278,10 @@ end subroutine zero_ed_daily_vars !==========================================================================================! !==========================================================================================! -! This subroutine resets the daily_averages once the daily average was written and used ! -! to compute the monthly mean (in case the latter was requested). ! +! This subroutine resets the daily averages once the daily average file has been ! +! written and used to compute the monthly mean (in case the latter was requested). ! !------------------------------------------------------------------------------------------! -subroutine zero_ed_daily_output_vars(cgrid) +subroutine zero_ed_dmean_vars(cgrid) use ed_state_vars, only : edtype & ! structure , polygontype & ! structure , sitetype & ! structure @@ -2853,174 +2298,317 @@ subroutine zero_ed_daily_output_vars(cgrid) integer :: ipa integer :: ico !---------------------------------------------------------------------------------------! - - do ipy = 1,cgrid%npolygons + + !---------------------------------------------------------------------------------------! + ! Loop over polygons. ! + !---------------------------------------------------------------------------------------! + polyloop: do ipy = 1,cgrid%npolygons cpoly => cgrid%polygon(ipy) !----- Variables stored in edtype. --------------------------------------------------! - cgrid%dmean_pcpg (ipy) = 0. - cgrid%dmean_drainage (ipy) = 0. - cgrid%dmean_runoff (ipy) = 0. - cgrid%dmean_vapor_lc (ipy) = 0. - cgrid%dmean_vapor_wc (ipy) = 0. - cgrid%dmean_vapor_gc (ipy) = 0. - cgrid%dmean_vapor_ac (ipy) = 0. - cgrid%dmean_gpp (ipy) = 0. - cgrid%dmean_nppleaf (ipy) = 0. - cgrid%dmean_nppfroot (ipy) = 0. - cgrid%dmean_nppsapwood (ipy) = 0. - cgrid%dmean_nppcroot (ipy) = 0. - cgrid%dmean_nppseeds (ipy) = 0. - cgrid%dmean_nppwood (ipy) = 0. - cgrid%dmean_nppdaily (ipy) = 0. - cgrid%dmean_evap (ipy) = 0. - cgrid%dmean_transp (ipy) = 0. - cgrid%dmean_sensible_lc (ipy) = 0. - cgrid%dmean_sensible_wc (ipy) = 0. - cgrid%dmean_sensible_gc (ipy) = 0. - cgrid%dmean_sensible_ac (ipy) = 0. - cgrid%dmean_rshort_gnd (ipy) = 0. - cgrid%dmean_par_gnd (ipy) = 0. - cgrid%dmean_rlong_gnd (ipy) = 0. - cgrid%dmean_rlongup (ipy) = 0. - cgrid%dmean_parup (ipy) = 0. - cgrid%dmean_nirup (ipy) = 0. - cgrid%dmean_rshortup (ipy) = 0. - cgrid%dmean_rnet (ipy) = 0. - cgrid%dmean_rlong_albedo (ipy) = 0. - cgrid%dmean_albedo (ipy) = 0. - cgrid%dmean_albedo_beam (ipy) = 0. - cgrid%dmean_albedo_diffuse (ipy) = 0. - - cgrid%dmean_ustar (ipy) = 0. - cgrid%dmean_tstar (ipy) = 0. - cgrid%dmean_qstar (ipy) = 0. - cgrid%dmean_cstar (ipy) = 0. - - cgrid%dmean_carbon_ac (ipy) = 0. - cgrid%dmean_carbon_st (ipy) = 0. - cgrid%dmean_plresp (ipy) = 0. - cgrid%dmean_rh (ipy) = 0. - cgrid%dmean_cwd_rh (ipy) = 0. - cgrid%dmean_leaf_resp (ipy) = 0. - cgrid%dmean_root_resp (ipy) = 0. - cgrid%dmean_growth_resp (ipy) = 0. - cgrid%dmean_storage_resp (ipy) = 0. - cgrid%dmean_vleaf_resp (ipy) = 0. - cgrid%dmean_nep (ipy) = 0. - cgrid%dmean_soil_temp (:,ipy) = 0. - cgrid%dmean_soil_water (:,ipy) = 0. - cgrid%dmean_soil_mstpot (:,ipy) = 0. - cgrid%dmean_transloss (:,ipy) = 0. - cgrid%dmean_gpp_dbh (:,ipy) = 0. - cgrid%dmean_fs_open (ipy) = 0. - cgrid%dmean_fsw (ipy) = 0. - cgrid%dmean_fsn (ipy) = 0. - cgrid%dmean_leaf_energy (ipy) = 0. - cgrid%dmean_leaf_hcap (ipy) = 0. - cgrid%dmean_leaf_water (ipy) = 0. - cgrid%dmean_leaf_temp (ipy) = 0. - cgrid%dmean_leaf_vpdef (ipy) = 0. - cgrid%dmean_wood_energy (ipy) = 0. - cgrid%dmean_wood_hcap (ipy) = 0. - cgrid%dmean_wood_water (ipy) = 0. - cgrid%dmean_wood_temp (ipy) = 0. - cgrid%dmean_can_temp (ipy) = 0. - cgrid%dmean_can_shv (ipy) = 0. - cgrid%dmean_can_co2 (ipy) = 0. - cgrid%dmean_can_rhos (ipy) = 0. - cgrid%dmean_can_prss (ipy) = 0. - cgrid%dmean_can_theta (ipy) = 0. - cgrid%dmean_can_theiv (ipy) = 0. - cgrid%dmean_can_vpdef (ipy) = 0. - cgrid%dmean_gnd_temp (ipy) = 0. - cgrid%dmean_gnd_shv (ipy) = 0. - cgrid%dmean_atm_temp (ipy) = 0. - cgrid%dmean_atm_vpdef (ipy) = 0. - cgrid%dmean_rshort (ipy) = 0. - cgrid%dmean_rshort_diff (ipy) = 0. - cgrid%dmean_par (ipy) = 0. - cgrid%dmean_par_diff (ipy) = 0. - cgrid%dmean_rlong (ipy) = 0. - cgrid%dmean_atm_shv (ipy) = 0. - cgrid%dmean_atm_co2 (ipy) = 0. - cgrid%dmean_atm_prss (ipy) = 0. - cgrid%dmean_atm_vels (ipy) = 0. - cgrid%lai_pft (:,ipy) = 0. - cgrid%wai_pft (:,ipy) = 0. - cgrid%dmean_co2_residual (ipy) = 0. - cgrid%dmean_energy_residual(ipy) = 0. - cgrid%dmean_water_residual (ipy) = 0. - - !----- Reset variables stored in polygontype. ---------------------------------------! - do isi=1,cpoly%nsites + cgrid%dmean_nppleaf (ipy) = 0.0 + cgrid%dmean_nppfroot (ipy) = 0.0 + cgrid%dmean_nppsapwood (ipy) = 0.0 + cgrid%dmean_nppcroot (ipy) = 0.0 + cgrid%dmean_nppseeds (ipy) = 0.0 + cgrid%dmean_nppwood (ipy) = 0.0 + cgrid%dmean_nppdaily (ipy) = 0.0 + cgrid%dmean_A_decomp (ipy) = 0.0 + cgrid%dmean_Af_decomp (ipy) = 0.0 + cgrid%dmean_co2_residual (ipy) = 0.0 + cgrid%dmean_energy_residual (ipy) = 0.0 + cgrid%dmean_water_residual (ipy) = 0.0 + cgrid%dmean_gpp (ipy) = 0.0 + cgrid%dmean_npp (ipy) = 0.0 + cgrid%dmean_leaf_resp (ipy) = 0.0 + cgrid%dmean_root_resp (ipy) = 0.0 + cgrid%dmean_growth_resp (ipy) = 0.0 + cgrid%dmean_storage_resp (ipy) = 0.0 + cgrid%dmean_vleaf_resp (ipy) = 0.0 + cgrid%dmean_plresp (ipy) = 0.0 + cgrid%dmean_leaf_energy (ipy) = 0.0 + cgrid%dmean_leaf_water (ipy) = 0.0 + cgrid%dmean_leaf_hcap (ipy) = 0.0 + cgrid%dmean_leaf_vpdef (ipy) = 0.0 + cgrid%dmean_leaf_temp (ipy) = 0.0 + cgrid%dmean_leaf_fliq (ipy) = 0.0 + cgrid%dmean_leaf_gsw (ipy) = 0.0 + cgrid%dmean_leaf_gbw (ipy) = 0.0 + cgrid%dmean_wood_energy (ipy) = 0.0 + cgrid%dmean_wood_water (ipy) = 0.0 + cgrid%dmean_wood_hcap (ipy) = 0.0 + cgrid%dmean_wood_temp (ipy) = 0.0 + cgrid%dmean_wood_fliq (ipy) = 0.0 + cgrid%dmean_wood_gbw (ipy) = 0.0 + cgrid%dmean_fs_open (ipy) = 0.0 + cgrid%dmean_fsw (ipy) = 0.0 + cgrid%dmean_fsn (ipy) = 0.0 + cgrid%dmean_psi_open (ipy) = 0.0 + cgrid%dmean_psi_closed (ipy) = 0.0 + cgrid%dmean_water_supply (ipy) = 0.0 + cgrid%dmean_par_l (ipy) = 0.0 + cgrid%dmean_par_l_beam (ipy) = 0.0 + cgrid%dmean_par_l_diff (ipy) = 0.0 + cgrid%dmean_rshort_l (ipy) = 0.0 + cgrid%dmean_rlong_l (ipy) = 0.0 + cgrid%dmean_sensible_lc (ipy) = 0.0 + cgrid%dmean_vapor_lc (ipy) = 0.0 + cgrid%dmean_transp (ipy) = 0.0 + cgrid%dmean_intercepted_al (ipy) = 0.0 + cgrid%dmean_wshed_lg (ipy) = 0.0 + cgrid%dmean_rshort_w (ipy) = 0.0 + cgrid%dmean_rlong_w (ipy) = 0.0 + cgrid%dmean_sensible_wc (ipy) = 0.0 + cgrid%dmean_vapor_wc (ipy) = 0.0 + cgrid%dmean_intercepted_aw (ipy) = 0.0 + cgrid%dmean_wshed_wg (ipy) = 0.0 + cgrid%dmean_rh (ipy) = 0.0 + cgrid%dmean_cwd_rh (ipy) = 0.0 + cgrid%dmean_nep (ipy) = 0.0 + cgrid%dmean_rk4step (ipy) = 0.0 + cgrid%dmean_available_water (ipy) = 0.0 + cgrid%dmean_can_theiv (ipy) = 0.0 + cgrid%dmean_can_theta (ipy) = 0.0 + cgrid%dmean_can_vpdef (ipy) = 0.0 + cgrid%dmean_can_temp (ipy) = 0.0 + cgrid%dmean_can_shv (ipy) = 0.0 + cgrid%dmean_can_co2 (ipy) = 0.0 + cgrid%dmean_can_rhos (ipy) = 0.0 + cgrid%dmean_can_prss (ipy) = 0.0 + cgrid%dmean_gnd_temp (ipy) = 0.0 + cgrid%dmean_gnd_shv (ipy) = 0.0 + cgrid%dmean_can_ggnd (ipy) = 0.0 + cgrid%dmean_sfcw_depth (ipy) = 0.0 + cgrid%dmean_sfcw_energy (ipy) = 0.0 + cgrid%dmean_sfcw_mass (ipy) = 0.0 + cgrid%dmean_sfcw_temp (ipy) = 0.0 + cgrid%dmean_sfcw_fliq (ipy) = 0.0 + cgrid%dmean_soil_energy (:,ipy) = 0.0 + cgrid%dmean_soil_mstpot (:,ipy) = 0.0 + cgrid%dmean_soil_water (:,ipy) = 0.0 + cgrid%dmean_soil_temp (:,ipy) = 0.0 + cgrid%dmean_soil_fliq (:,ipy) = 0.0 + cgrid%dmean_rshort_gnd (ipy) = 0.0 + cgrid%dmean_par_gnd (ipy) = 0.0 + cgrid%dmean_rlong_gnd (ipy) = 0.0 + cgrid%dmean_rlongup (ipy) = 0.0 + cgrid%dmean_parup (ipy) = 0.0 + cgrid%dmean_nirup (ipy) = 0.0 + cgrid%dmean_rshortup (ipy) = 0.0 + cgrid%dmean_rnet (ipy) = 0.0 + cgrid%dmean_albedo (ipy) = 0.0 + cgrid%dmean_albedo_beam (ipy) = 0.0 + cgrid%dmean_albedo_diff (ipy) = 0.0 + cgrid%dmean_rlong_albedo (ipy) = 0.0 + cgrid%dmean_ustar (ipy) = 0.0 + cgrid%dmean_tstar (ipy) = 0.0 + cgrid%dmean_qstar (ipy) = 0.0 + cgrid%dmean_cstar (ipy) = 0.0 + cgrid%dmean_carbon_ac (ipy) = 0.0 + cgrid%dmean_carbon_st (ipy) = 0.0 + cgrid%dmean_vapor_gc (ipy) = 0.0 + cgrid%dmean_vapor_ac (ipy) = 0.0 + cgrid%dmean_smoist_gg (:,ipy) = 0.0 + cgrid%dmean_throughfall (ipy) = 0.0 + cgrid%dmean_transloss (:,ipy) = 0.0 + cgrid%dmean_runoff (ipy) = 0.0 + cgrid%dmean_drainage (ipy) = 0.0 + cgrid%dmean_sensible_gc (ipy) = 0.0 + cgrid%dmean_sensible_ac (ipy) = 0.0 + cgrid%dmean_sensible_gg (:,ipy) = 0.0 + cgrid%dmean_qthroughfall (ipy) = 0.0 + cgrid%dmean_qrunoff (ipy) = 0.0 + cgrid%dmean_qdrainage (ipy) = 0.0 + cgrid%dmean_atm_theiv (ipy) = 0.0 + cgrid%dmean_atm_theta (ipy) = 0.0 + cgrid%dmean_atm_temp (ipy) = 0.0 + cgrid%dmean_atm_vpdef (ipy) = 0.0 + cgrid%dmean_atm_shv (ipy) = 0.0 + cgrid%dmean_atm_rshort (ipy) = 0.0 + cgrid%dmean_atm_rshort_diff (ipy) = 0.0 + cgrid%dmean_atm_par (ipy) = 0.0 + cgrid%dmean_atm_par_diff (ipy) = 0.0 + cgrid%dmean_atm_rlong (ipy) = 0.0 + cgrid%dmean_atm_vels (ipy) = 0.0 + cgrid%dmean_atm_rhos (ipy) = 0.0 + cgrid%dmean_atm_prss (ipy) = 0.0 + cgrid%dmean_atm_co2 (ipy) = 0.0 + cgrid%dmean_pcpg (ipy) = 0.0 + cgrid%dmean_qpcpg (ipy) = 0.0 + cgrid%dmean_dpcpg (ipy) = 0.0 + + !------------------------------------------------------------------------------------! + ! Loop over sites. ! + !------------------------------------------------------------------------------------! + siteloop: do isi=1,cpoly%nsites csite => cpoly%site(isi) - cpoly%lai_pft (:,isi) = 0. - cpoly%wai_pft (:,isi) = 0. - cpoly%dmean_co2_residual (isi) = 0. - cpoly%dmean_energy_residual (isi) = 0. - cpoly%dmean_water_residual (isi) = 0. - cpoly%daylight (isi) = 0. - - do ipa=1,csite%npatches - csite%dmean_co2_residual (ipa) = 0. - csite%dmean_energy_residual(ipa) = 0. - csite%dmean_water_residual (ipa) = 0. - csite%dmean_rh (ipa) = 0. - csite%dmean_cwd_rh (ipa) = 0. - csite%dmean_rk4step (ipa) = 0. - csite%dmean_A_decomp (ipa) = 0. - csite%dmean_Af_decomp (ipa) = 0. - csite%dmean_albedo (ipa) = 0. - csite%dmean_albedo_beam (ipa) = 0. - csite%dmean_albedo_diffuse (ipa) = 0. + cpoly%daylight (isi) = 0.0 + cpoly%dmean_atm_theiv (isi) = 0.0 + cpoly%dmean_atm_theta (isi) = 0.0 + cpoly%dmean_atm_temp (isi) = 0.0 + cpoly%dmean_atm_vpdef (isi) = 0.0 + cpoly%dmean_atm_shv (isi) = 0.0 + cpoly%dmean_atm_rshort (isi) = 0.0 + cpoly%dmean_atm_rshort_diff(isi) = 0.0 + cpoly%dmean_atm_par (isi) = 0.0 + cpoly%dmean_atm_par_diff (isi) = 0.0 + cpoly%dmean_atm_rlong (isi) = 0.0 + cpoly%dmean_atm_vels (isi) = 0.0 + cpoly%dmean_atm_rhos (isi) = 0.0 + cpoly%dmean_atm_prss (isi) = 0.0 + cpoly%dmean_atm_co2 (isi) = 0.0 + cpoly%dmean_pcpg (isi) = 0.0 + cpoly%dmean_qpcpg (isi) = 0.0 + cpoly%dmean_dpcpg (isi) = 0.0 + !---------------------------------------------------------------------------------! + ! Loop over sites. ! + !---------------------------------------------------------------------------------! + patchloop: do ipa=1,csite%npatches cpatch => csite%patch(ipa) - do ico=1, cpatch%ncohorts - cpatch%dmean_gpp(ico) = 0. - cpatch%dmean_nppleaf(ico) = 0. - cpatch%dmean_nppfroot(ico) = 0. - cpatch%dmean_nppsapwood(ico) = 0. - cpatch%dmean_nppcroot(ico) = 0. - cpatch%dmean_nppseeds(ico) = 0. - cpatch%dmean_nppwood(ico) = 0. - cpatch%dmean_nppdaily(ico) = 0. - cpatch%dmean_leaf_resp(ico) = 0. - cpatch%dmean_root_resp(ico) = 0. - cpatch%dmean_fs_open(ico) = 0. - cpatch%dmean_fsw(ico) = 0. - cpatch%dmean_fsn(ico) = 0. - cpatch%dmean_psi_open(ico) = 0. - cpatch%dmean_psi_closed(ico) = 0. - cpatch%dmean_water_supply(ico) = 0. - cpatch%dmean_light_level(ico) = 0. - cpatch%dmean_light_level_beam(ico) = 0. - cpatch%dmean_light_level_diff(ico) = 0. - cpatch%dmean_par_l (ico) = 0. - cpatch%dmean_par_l_beam (ico) = 0. - cpatch%dmean_par_l_diff (ico) = 0. - cpatch%dmean_rshort_l (ico) = 0. - cpatch%dmean_rlong_l (ico) = 0. - cpatch%dmean_sensible_lc (ico) = 0. - cpatch%dmean_vapor_lc (ico) = 0. - cpatch%dmean_transp (ico) = 0. - cpatch%dmean_intercepted_al (ico) = 0. - cpatch%dmean_wshed_lg (ico) = 0. - cpatch%dmean_rshort_w (ico) = 0. - cpatch%dmean_rlong_w (ico) = 0. - cpatch%dmean_sensible_wc (ico) = 0. - cpatch%dmean_vapor_wc (ico) = 0. - cpatch%dmean_intercepted_aw (ico) = 0. - cpatch%dmean_wshed_wg (ico) = 0. - end do - end do - end do - end do + + csite%dmean_A_decomp (ipa) = 0.0 + csite%dmean_Af_decomp (ipa) = 0.0 + csite%dmean_co2_residual (ipa) = 0.0 + csite%dmean_energy_residual (ipa) = 0.0 + csite%dmean_water_residual (ipa) = 0.0 + csite%dmean_rh (ipa) = 0.0 + csite%dmean_cwd_rh (ipa) = 0.0 + csite%dmean_nep (ipa) = 0.0 + csite%dmean_rk4step (ipa) = 0.0 + csite%dmean_available_water (ipa) = 0.0 + csite%dmean_can_theiv (ipa) = 0.0 + csite%dmean_can_theta (ipa) = 0.0 + csite%dmean_can_vpdef (ipa) = 0.0 + csite%dmean_can_temp (ipa) = 0.0 + csite%dmean_can_shv (ipa) = 0.0 + csite%dmean_can_co2 (ipa) = 0.0 + csite%dmean_can_rhos (ipa) = 0.0 + csite%dmean_can_prss (ipa) = 0.0 + csite%dmean_gnd_temp (ipa) = 0.0 + csite%dmean_gnd_shv (ipa) = 0.0 + csite%dmean_can_ggnd (ipa) = 0.0 + csite%dmean_sfcw_depth (ipa) = 0.0 + csite%dmean_sfcw_energy (ipa) = 0.0 + csite%dmean_sfcw_mass (ipa) = 0.0 + csite%dmean_sfcw_temp (ipa) = 0.0 + csite%dmean_sfcw_fliq (ipa) = 0.0 + csite%dmean_soil_energy (:,ipa) = 0.0 + csite%dmean_soil_mstpot (:,ipa) = 0.0 + csite%dmean_soil_water (:,ipa) = 0.0 + csite%dmean_soil_temp (:,ipa) = 0.0 + csite%dmean_soil_fliq (:,ipa) = 0.0 + csite%dmean_rshort_gnd (ipa) = 0.0 + csite%dmean_par_gnd (ipa) = 0.0 + csite%dmean_rlong_gnd (ipa) = 0.0 + csite%dmean_rlongup (ipa) = 0.0 + csite%dmean_parup (ipa) = 0.0 + csite%dmean_nirup (ipa) = 0.0 + csite%dmean_rshortup (ipa) = 0.0 + csite%dmean_rnet (ipa) = 0.0 + csite%dmean_albedo (ipa) = 0.0 + csite%dmean_albedo_beam (ipa) = 0.0 + csite%dmean_albedo_diff (ipa) = 0.0 + csite%dmean_rlong_albedo (ipa) = 0.0 + csite%dmean_ustar (ipa) = 0.0 + csite%dmean_tstar (ipa) = 0.0 + csite%dmean_qstar (ipa) = 0.0 + csite%dmean_cstar (ipa) = 0.0 + csite%dmean_carbon_ac (ipa) = 0.0 + csite%dmean_carbon_st (ipa) = 0.0 + csite%dmean_vapor_gc (ipa) = 0.0 + csite%dmean_vapor_ac (ipa) = 0.0 + csite%dmean_smoist_gg (:,ipa) = 0.0 + csite%dmean_throughfall (ipa) = 0.0 + csite%dmean_transloss (:,ipa) = 0.0 + csite%dmean_runoff (ipa) = 0.0 + csite%dmean_drainage (ipa) = 0.0 + csite%dmean_sensible_gc (ipa) = 0.0 + csite%dmean_sensible_ac (ipa) = 0.0 + csite%dmean_sensible_gg (:,ipa) = 0.0 + csite%dmean_qthroughfall (ipa) = 0.0 + csite%dmean_qrunoff (ipa) = 0.0 + csite%dmean_qdrainage (ipa) = 0.0 + + + + !------------------------------------------------------------------------------! + ! Loop over cohorts. ! + !------------------------------------------------------------------------------! + cohortloop: do ico=1, cpatch%ncohorts + cpatch%dmean_nppleaf (ico) = 0.0 + cpatch%dmean_nppfroot (ico) = 0.0 + cpatch%dmean_nppsapwood (ico) = 0.0 + cpatch%dmean_nppcroot (ico) = 0.0 + cpatch%dmean_nppseeds (ico) = 0.0 + cpatch%dmean_nppwood (ico) = 0.0 + cpatch%dmean_nppdaily (ico) = 0.0 + cpatch%dmean_gpp (ico) = 0.0 + cpatch%dmean_npp (ico) = 0.0 + cpatch%dmean_leaf_resp (ico) = 0.0 + cpatch%dmean_root_resp (ico) = 0.0 + cpatch%dmean_growth_resp (ico) = 0.0 + cpatch%dmean_storage_resp (ico) = 0.0 + cpatch%dmean_vleaf_resp (ico) = 0.0 + cpatch%dmean_plresp (ico) = 0.0 + cpatch%dmean_leaf_energy (ico) = 0.0 + cpatch%dmean_leaf_water (ico) = 0.0 + cpatch%dmean_leaf_hcap (ico) = 0.0 + cpatch%dmean_leaf_vpdef (ico) = 0.0 + cpatch%dmean_leaf_temp (ico) = 0.0 + cpatch%dmean_leaf_fliq (ico) = 0.0 + cpatch%dmean_leaf_gsw (ico) = 0.0 + cpatch%dmean_leaf_gbw (ico) = 0.0 + cpatch%dmean_wood_energy (ico) = 0.0 + cpatch%dmean_wood_water (ico) = 0.0 + cpatch%dmean_wood_hcap (ico) = 0.0 + cpatch%dmean_wood_temp (ico) = 0.0 + cpatch%dmean_wood_fliq (ico) = 0.0 + cpatch%dmean_wood_gbw (ico) = 0.0 + cpatch%dmean_fs_open (ico) = 0.0 + cpatch%dmean_fsw (ico) = 0.0 + cpatch%dmean_fsn (ico) = 0.0 + cpatch%dmean_psi_open (ico) = 0.0 + cpatch%dmean_psi_closed (ico) = 0.0 + cpatch%dmean_water_supply (ico) = 0.0 + cpatch%dmean_light_level (ico) = 0.0 + cpatch%dmean_light_level_beam(ico) = 0.0 + cpatch%dmean_light_level_diff(ico) = 0.0 + cpatch%dmean_par_l (ico) = 0.0 + cpatch%dmean_par_l_beam (ico) = 0.0 + cpatch%dmean_par_l_diff (ico) = 0.0 + cpatch%dmean_rshort_l (ico) = 0.0 + cpatch%dmean_rlong_l (ico) = 0.0 + cpatch%dmean_sensible_lc (ico) = 0.0 + cpatch%dmean_vapor_lc (ico) = 0.0 + cpatch%dmean_transp (ico) = 0.0 + cpatch%dmean_intercepted_al (ico) = 0.0 + cpatch%dmean_wshed_lg (ico) = 0.0 + cpatch%dmean_rshort_w (ico) = 0.0 + cpatch%dmean_rlong_w (ico) = 0.0 + cpatch%dmean_sensible_wc (ico) = 0.0 + cpatch%dmean_vapor_wc (ico) = 0.0 + cpatch%dmean_intercepted_aw (ico) = 0.0 + cpatch%dmean_wshed_wg (ico) = 0.0 + end do cohortloop + !------------------------------------------------------------------------------! + end do patchloop + !---------------------------------------------------------------------------------! + end do siteloop + !------------------------------------------------------------------------------------! + end do polyloop + !---------------------------------------------------------------------------------------! return -end subroutine zero_ed_daily_output_vars +end subroutine zero_ed_dmean_vars +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! !==========================================================================================! !==========================================================================================! @@ -3029,6 +2617,10 @@ end subroutine zero_ed_daily_output_vars +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! !==========================================================================================! !==========================================================================================! ! |---------------------------------| ! @@ -3036,19 +2628,38 @@ end subroutine zero_ed_daily_output_vars ! |---------------------------------| ! !==========================================================================================! !==========================================================================================! -! This subroutine integrates the monthly average. This is called after the daily means ! -! were integrated and normalized. ! +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! + + + + + + +!==========================================================================================! +!==========================================================================================! +! This subroutine integrates most of the monthly mean variables. This sub-routine is ! +! called after the dmean variables have been normalised, so we can take advantage of their ! +! values. ! +! A few variables are _NOT_ integrated here: quantities such as temperature and liquid ! +! fraction are found after the monthly mean of the extensive quantities have been ! +! normalised. Also, polygon-level variables that were not integrated to the daily means ! +! are not integrated here, they are found after the monthly mean at the native level has ! +! been found. ! !------------------------------------------------------------------------------------------! -subroutine integrate_ed_monthly_output_vars(cgrid) +subroutine integrate_ed_mmean_vars(cgrid) use ed_state_vars, only : edtype & ! structure , polygontype & ! structure , sitetype & ! structure , patchtype ! ! structure use ed_max_dims , only : n_dbh & ! intent(in) , n_pft & ! intent(in) - , n_dist_types & ! intent(in) - , n_mort ! ! intent(in) - use consts_coms , only : yr_day + , n_dist_types ! ! intent(in) + use consts_coms , only : yr_day ! ! intent(in) + use ed_misc_coms , only : current_time & ! intent(in) + , simtime ! ! structure implicit none !----- Argument. -----------------------------------------------------------------------! type(edtype) , target :: cgrid @@ -3056,384 +2667,1171 @@ subroutine integrate_ed_monthly_output_vars(cgrid) type(polygontype) , pointer :: cpoly type(sitetype) , pointer :: csite type(patchtype) , pointer :: cpatch + type(simtime) :: daybefore integer :: ipy integer :: isi integer :: ipa integer :: ico - integer :: imt + real :: ndaysi !---------------------------------------------------------------------------------------! - - poly_loop: do ipy=1,cgrid%npolygons + + + + !---------------------------------------------------------------------------------------! + ! Find which day we have just integrated, we will use it to determine the right ! + ! scaling factor. ! + !---------------------------------------------------------------------------------------! + call yesterday_info(current_time,daybefore,ndaysi) + !---------------------------------------------------------------------------------------! + + + !---------------------------------------------------------------------------------------! + ! Loop over polygons. ! + !---------------------------------------------------------------------------------------! + polyloop: do ipy=1,cgrid%npolygons + cpoly => cgrid%polygon(ipy) + + !------------------------------------------------------------------------------------! + ! The following variables don't have daily means, but the instantaneous value is ! + ! fine because they are updated only once a day. ! !------------------------------------------------------------------------------------! - ! First the mean variables that can be computed from the daily averages ! + cgrid%mmean_lai (:,:,ipy) = cgrid%mmean_lai (:,:,ipy) & + + cgrid%lai (:,:,ipy) & + * ndaysi + cgrid%mmean_bleaf (:,:,ipy) = cgrid%mmean_bleaf (:,:,ipy) & + + cgrid%bleaf (:,:,ipy) & + * ndaysi + cgrid%mmean_broot (:,:,ipy) = cgrid%mmean_broot (:,:,ipy) & + + cgrid%broot (:,:,ipy) & + * ndaysi + cgrid%mmean_bstorage (:,:,ipy) = cgrid%mmean_bstorage (:,:,ipy) & + + cgrid%bstorage (:,:,ipy) & + * ndaysi + cgrid%mmean_bleaf_n (:,:,ipy) = cgrid%mmean_bleaf_n (:,:,ipy) & + + cgrid%bleaf_n (:,:,ipy) & + * ndaysi + cgrid%mmean_broot_n (:,:,ipy) = cgrid%mmean_broot_n (:,:,ipy) & + + cgrid%broot_n (:,:,ipy) & + * ndaysi + cgrid%mmean_bstorage_n (:,:,ipy) = cgrid%mmean_bstorage_n (:,:,ipy) & + + cgrid%bstorage_n (:,:,ipy) & + * ndaysi + cgrid%mmean_leaf_maintenance(:,:,ipy) = cgrid%mmean_leaf_maintenance (:,:,ipy) & + + cgrid%leaf_maintenance (:,:,ipy) & + * ndaysi + cgrid%mmean_root_maintenance(:,:,ipy) = cgrid%mmean_root_maintenance (:,:,ipy) & + + cgrid%root_maintenance (:,:,ipy) & + * ndaysi + cgrid%mmean_leaf_drop (:,:,ipy) = cgrid%mmean_leaf_drop (:,:,ipy) & + + cgrid%leaf_drop (:,:,ipy) & + * ndaysi + cgrid%mmean_fast_soil_c (ipy) = cgrid%mmean_fast_soil_c (ipy) & + + cgrid%fast_soil_c (ipy) & + * ndaysi + cgrid%mmean_slow_soil_c (ipy) = cgrid%mmean_slow_soil_c (ipy) & + + cgrid%slow_soil_c (ipy) & + * ndaysi + cgrid%mmean_struct_soil_c (ipy) = cgrid%mmean_struct_soil_c (ipy) & + + cgrid%struct_soil_c (ipy) & + * ndaysi + cgrid%mmean_struct_soil_l (ipy) = cgrid%mmean_struct_soil_l (ipy) & + + cgrid%struct_soil_l (ipy) & + * ndaysi + cgrid%mmean_cwd_c (ipy) = cgrid%mmean_cwd_c (ipy) & + + cgrid%cwd_c (ipy) & + * ndaysi + cgrid%mmean_fast_soil_n (ipy) = cgrid%mmean_fast_soil_n (ipy) & + + cgrid%fast_soil_n (ipy) & + * ndaysi + cgrid%mmean_mineral_soil_n (ipy) = cgrid%mmean_mineral_soil_n (ipy) & + + cgrid%mineral_soil_n (ipy) & + * ndaysi + cgrid%mmean_cwd_n (ipy) = cgrid%mmean_cwd_n (ipy) & + + cgrid%cwd_n (ipy) & + * ndaysi !------------------------------------------------------------------------------------! - cgrid%mmean_fs_open (ipy) = cgrid%mmean_fs_open (ipy) + cgrid%dmean_fs_open (ipy) - cgrid%mmean_fsw (ipy) = cgrid%mmean_fsw (ipy) + cgrid%dmean_fsw (ipy) - cgrid%mmean_fsn (ipy) = cgrid%mmean_fsn (ipy) + cgrid%dmean_fsn (ipy) - cgrid%mmean_evap (ipy) = cgrid%mmean_evap (ipy) + cgrid%dmean_evap (ipy) - cgrid%mmean_transp (ipy) = cgrid%mmean_transp (ipy) + cgrid%dmean_transp (ipy) - - cgrid%mmean_vapor_ac (ipy) = cgrid%mmean_vapor_ac (ipy) & - + cgrid%dmean_vapor_ac (ipy) - cgrid%mmean_vapor_gc (ipy) = cgrid%mmean_vapor_gc (ipy) & - + cgrid%dmean_vapor_gc (ipy) - cgrid%mmean_vapor_lc (ipy) = cgrid%mmean_vapor_lc (ipy) & - + cgrid%dmean_vapor_lc (ipy) - cgrid%mmean_vapor_wc (ipy) = cgrid%mmean_vapor_wc (ipy) & - + cgrid%dmean_vapor_wc (ipy) - cgrid%mmean_sensible_ac (ipy) = cgrid%mmean_sensible_ac (ipy) & - + cgrid%dmean_sensible_ac (ipy) - cgrid%mmean_sensible_gc (ipy) = cgrid%mmean_sensible_gc (ipy) & - + cgrid%dmean_sensible_gc (ipy) - cgrid%mmean_sensible_lc (ipy) = cgrid%mmean_sensible_lc (ipy) & - + cgrid%dmean_sensible_lc (ipy) - cgrid%mmean_sensible_wc (ipy) = cgrid%mmean_sensible_wc (ipy) & - + cgrid%dmean_sensible_wc (ipy) - cgrid%mmean_rshort_gnd (ipy) = cgrid%mmean_rshort_gnd (ipy) & - + cgrid%dmean_rshort_gnd (ipy) - cgrid%mmean_par_gnd (ipy) = cgrid%mmean_par_gnd (ipy) & - + cgrid%dmean_par_gnd (ipy) - cgrid%mmean_rlong_gnd (ipy) = cgrid%mmean_rlong_gnd (ipy) & - + cgrid%dmean_rlong_gnd (ipy) - cgrid%mmean_rlongup (ipy) = cgrid%mmean_rlongup (ipy) & - + cgrid%dmean_rlongup (ipy) - cgrid%mmean_parup (ipy) = cgrid%mmean_parup (ipy) & - + cgrid%dmean_parup (ipy) - cgrid%mmean_nirup (ipy) = cgrid%mmean_nirup (ipy) & - + cgrid%dmean_nirup (ipy) - cgrid%mmean_rshortup (ipy) = cgrid%mmean_rshortup (ipy) & - + cgrid%dmean_rshortup (ipy) - cgrid%mmean_rnet (ipy) = cgrid%mmean_rnet (ipy) & - + cgrid%dmean_rnet (ipy) - cgrid%mmean_rlong_albedo (ipy) = cgrid%mmean_rlong_albedo (ipy) & - + cgrid%dmean_rlong_albedo (ipy) - cgrid%mmean_albedo (ipy) = cgrid%mmean_albedo (ipy) & - + cgrid%dmean_albedo (ipy) - cgrid%mmean_albedo_beam (ipy) = cgrid%mmean_albedo_beam (ipy) & - + cgrid%dmean_albedo_beam (ipy) - cgrid%mmean_albedo_diffuse(ipy) = cgrid%mmean_albedo_diffuse(ipy) & - + cgrid%dmean_albedo_diffuse(ipy) - cgrid%mmean_ustar (ipy) = cgrid%mmean_ustar (ipy) & - + cgrid%dmean_ustar (ipy) - cgrid%mmean_tstar (ipy) = cgrid%mmean_tstar (ipy) & - + cgrid%dmean_tstar (ipy) - cgrid%mmean_qstar (ipy) = cgrid%mmean_qstar (ipy) & - + cgrid%dmean_qstar (ipy) - cgrid%mmean_cstar (ipy) = cgrid%mmean_cstar (ipy) & - + cgrid%dmean_cstar (ipy) - cgrid%mmean_carbon_ac (ipy) = cgrid%mmean_carbon_ac (ipy) & - + cgrid%dmean_carbon_ac (ipy) - cgrid%mmean_carbon_st (ipy) = cgrid%mmean_carbon_st (ipy) & - + cgrid%dmean_carbon_st (ipy) - cgrid%mmean_nep (ipy) = cgrid%mmean_nep (ipy) & - + cgrid%dmean_nep (ipy) - cgrid%mmean_plresp (ipy) = cgrid%mmean_plresp (ipy) & - + cgrid%dmean_plresp (ipy) - cgrid%mmean_rh (ipy) = cgrid%mmean_rh (ipy) & - + cgrid%dmean_rh (ipy) - cgrid%mmean_cwd_rh (ipy) = cgrid%mmean_cwd_rh (ipy) & - + cgrid%dmean_cwd_rh (ipy) - cgrid%mmean_growth_resp (ipy) = cgrid%mmean_growth_resp (ipy) & - + cgrid%dmean_growth_resp (ipy) - cgrid%mmean_storage_resp (ipy) = cgrid%mmean_storage_resp (ipy) & - + cgrid%dmean_storage_resp (ipy) - cgrid%mmean_vleaf_resp (ipy) = cgrid%mmean_vleaf_resp (ipy) & - + cgrid%dmean_vleaf_resp (ipy) - - cgrid%mmean_soil_temp (:,ipy) = cgrid%mmean_soil_temp (:,ipy) & - + cgrid%dmean_soil_temp (:,ipy) - cgrid%mmean_soil_water (:,ipy) = cgrid%mmean_soil_water (:,ipy) & - + cgrid%dmean_soil_water (:,ipy) - cgrid%mmean_soil_mstpot (:,ipy) = cgrid%mmean_soil_mstpot (:,ipy) & - + cgrid%dmean_soil_mstpot (:,ipy) - cgrid%mmean_transloss (:,ipy) = cgrid%mmean_transloss (:,ipy) & - + cgrid%dmean_transloss (:,ipy) - cgrid%mmean_gpp_dbh (:,ipy) = cgrid%mmean_gpp_dbh (:,ipy) & - + cgrid%dmean_gpp_dbh (:,ipy) - - cgrid%mmean_lai_pft (:,ipy) = cgrid%mmean_lai_pft (:,ipy) & - + cgrid%lai_pft (:,ipy) - cgrid%mmean_wai_pft (:,ipy) = cgrid%mmean_wai_pft (:,ipy) & - + cgrid%wai_pft (:,ipy) - - cgrid%mmean_leaf_energy (ipy) = cgrid%mmean_leaf_energy (ipy) & - + cgrid%dmean_leaf_energy (ipy) - cgrid%mmean_leaf_hcap (ipy) = cgrid%mmean_leaf_hcap (ipy) & - + cgrid%dmean_leaf_hcap (ipy) - cgrid%mmean_leaf_water (ipy) = cgrid%mmean_leaf_water (ipy) & - + cgrid%dmean_leaf_water (ipy) - cgrid%mmean_leaf_vpdef (ipy) = cgrid%mmean_leaf_vpdef (ipy) & - + cgrid%dmean_leaf_vpdef (ipy) - cgrid%mmean_wood_energy (ipy) = cgrid%mmean_wood_energy (ipy) & - + cgrid%dmean_wood_energy (ipy) - cgrid%mmean_wood_hcap (ipy) = cgrid%mmean_wood_hcap (ipy) & - + cgrid%dmean_wood_hcap (ipy) - cgrid%mmean_wood_water (ipy) = cgrid%mmean_wood_water (ipy) & - + cgrid%dmean_wood_water (ipy) - cgrid%mmean_can_theta (ipy) = cgrid%mmean_can_theta (ipy) & - + cgrid%dmean_can_theta (ipy) - cgrid%mmean_can_theiv (ipy) = cgrid%mmean_can_theiv (ipy) & - + cgrid%dmean_can_theiv (ipy) - cgrid%mmean_can_vpdef (ipy) = cgrid%mmean_can_vpdef (ipy) & - + cgrid%dmean_can_vpdef (ipy) - cgrid%mmean_can_shv (ipy) = cgrid%mmean_can_shv (ipy) & - + cgrid%dmean_can_shv (ipy) - cgrid%mmean_can_co2 (ipy) = cgrid%mmean_can_co2 (ipy) & - + cgrid%dmean_can_co2 (ipy) - cgrid%mmean_can_prss (ipy) = cgrid%mmean_can_prss (ipy) & - + cgrid%dmean_can_prss (ipy) - cgrid%mmean_gnd_temp (ipy) = cgrid%mmean_gnd_temp (ipy) & - + cgrid%dmean_gnd_temp (ipy) - cgrid%mmean_gnd_shv (ipy) = cgrid%mmean_gnd_shv (ipy) & - + cgrid%dmean_gnd_shv (ipy) - cgrid%mmean_atm_temp (ipy) = cgrid%mmean_atm_temp (ipy) & - + cgrid%dmean_atm_temp (ipy) - cgrid%mmean_atm_vpdef (ipy) = cgrid%mmean_atm_vpdef (ipy) & - + cgrid%dmean_atm_vpdef (ipy) - cgrid%mmean_rshort (ipy) = cgrid%mmean_rshort (ipy) & - + cgrid%dmean_rshort (ipy) - cgrid%mmean_rshort_diff (ipy) = cgrid%mmean_rshort_diff (ipy) & - + cgrid%dmean_rshort_diff (ipy) - cgrid%mmean_par (ipy) = cgrid%mmean_par (ipy) & - + cgrid%dmean_par (ipy) - cgrid%mmean_par_diff (ipy) = cgrid%mmean_par_diff (ipy) & - + cgrid%dmean_par_diff (ipy) - cgrid%mmean_rlong (ipy) = cgrid%mmean_rlong (ipy) & - + cgrid%dmean_rlong (ipy) - - cgrid%mmean_atm_shv (ipy) = cgrid%mmean_atm_shv (ipy) & - + cgrid%dmean_atm_shv (ipy) - cgrid%mmean_atm_co2 (ipy) = cgrid%mmean_atm_co2 (ipy) & - + cgrid%dmean_atm_co2 (ipy) - cgrid%mmean_atm_prss (ipy) = cgrid%mmean_atm_prss (ipy) & - + cgrid%dmean_atm_prss (ipy) - cgrid%mmean_atm_vels (ipy) = cgrid%mmean_atm_vels (ipy) & - + cgrid%dmean_atm_vels (ipy) - cgrid%mmean_pcpg (ipy) = cgrid%mmean_pcpg (ipy) & - + cgrid%dmean_pcpg (ipy) - cgrid%mmean_runoff (ipy) = cgrid%mmean_runoff (ipy) & - + cgrid%dmean_runoff (ipy) - cgrid%mmean_drainage (ipy) = cgrid%mmean_drainage (ipy) & - + cgrid%dmean_drainage (ipy) - - cgrid%mmean_co2_residual (ipy) = cgrid%mmean_co2_residual (ipy) & - + cgrid%dmean_co2_residual (ipy) - cgrid%mmean_energy_residual(ipy) = cgrid%mmean_energy_residual(ipy) & - + cgrid%dmean_energy_residual(ipy) - cgrid%mmean_water_residual (ipy) = cgrid%mmean_water_residual (ipy) & - + cgrid%dmean_water_residual (ipy) + + !------------------------------------------------------------------------------------! + ! Integrate the other polygon-level variables. ! !------------------------------------------------------------------------------------! - ! These are going to be the monthly mean of the sum of the squares. We save this ! - ! instead of the standard deviation because we may want to aggregate several months ! - ! and it is a lot simpler to do that with the sum of the squares. ! + cgrid%mmean_gpp (ipy) = cgrid%mmean_gpp (ipy) & + + cgrid%dmean_gpp (ipy) & + * ndaysi + cgrid%mmean_npp (ipy) = cgrid%mmean_npp (ipy) & + + cgrid%dmean_npp (ipy) & + * ndaysi + cgrid%mmean_leaf_resp (ipy) = cgrid%mmean_leaf_resp (ipy) & + + cgrid%dmean_leaf_resp (ipy) & + * ndaysi + cgrid%mmean_root_resp (ipy) = cgrid%mmean_root_resp (ipy) & + + cgrid%dmean_root_resp (ipy) & + * ndaysi + cgrid%mmean_growth_resp (ipy) = cgrid%mmean_growth_resp (ipy) & + + cgrid%dmean_growth_resp (ipy) & + * ndaysi + cgrid%mmean_storage_resp (ipy) = cgrid%mmean_storage_resp (ipy) & + + cgrid%dmean_storage_resp (ipy) & + * ndaysi + cgrid%mmean_vleaf_resp (ipy) = cgrid%mmean_vleaf_resp (ipy) & + + cgrid%dmean_vleaf_resp (ipy) & + * ndaysi + cgrid%mmean_plresp (ipy) = cgrid%mmean_plresp (ipy) & + + cgrid%dmean_plresp (ipy) & + * ndaysi + cgrid%mmean_leaf_energy (ipy) = cgrid%mmean_leaf_energy (ipy) & + + cgrid%dmean_leaf_energy (ipy) & + * ndaysi + cgrid%mmean_leaf_water (ipy) = cgrid%mmean_leaf_water (ipy) & + + cgrid%dmean_leaf_water (ipy) & + * ndaysi + cgrid%mmean_leaf_hcap (ipy) = cgrid%mmean_leaf_hcap (ipy) & + + cgrid%dmean_leaf_hcap (ipy) & + * ndaysi + cgrid%mmean_leaf_vpdef (ipy) = cgrid%mmean_leaf_vpdef (ipy) & + + cgrid%dmean_leaf_vpdef (ipy) & + * ndaysi + cgrid%mmean_leaf_gsw (ipy) = cgrid%mmean_leaf_gsw (ipy) & + + cgrid%dmean_leaf_gsw (ipy) & + * ndaysi + cgrid%mmean_leaf_gbw (ipy) = cgrid%mmean_leaf_gbw (ipy) & + + cgrid%dmean_leaf_gbw (ipy) & + * ndaysi + cgrid%mmean_wood_energy (ipy) = cgrid%mmean_wood_energy (ipy) & + + cgrid%dmean_wood_energy (ipy) & + * ndaysi + cgrid%mmean_wood_water (ipy) = cgrid%mmean_wood_water (ipy) & + + cgrid%dmean_wood_water (ipy) & + * ndaysi + cgrid%mmean_wood_hcap (ipy) = cgrid%mmean_wood_hcap (ipy) & + + cgrid%dmean_wood_hcap (ipy) & + * ndaysi + cgrid%mmean_wood_gbw (ipy) = cgrid%mmean_wood_gbw (ipy) & + + cgrid%dmean_wood_gbw (ipy) & + * ndaysi + cgrid%mmean_fs_open (ipy) = cgrid%mmean_fs_open (ipy) & + + cgrid%dmean_fs_open (ipy) & + * ndaysi + cgrid%mmean_fsw (ipy) = cgrid%mmean_fsw (ipy) & + + cgrid%dmean_fsw (ipy) & + * ndaysi + cgrid%mmean_fsn (ipy) = cgrid%mmean_fsn (ipy) & + + cgrid%dmean_fsn (ipy) & + * ndaysi + cgrid%mmean_psi_open (ipy) = cgrid%mmean_psi_open (ipy) & + + cgrid%dmean_psi_open (ipy) & + * ndaysi + cgrid%mmean_psi_closed (ipy) = cgrid%mmean_psi_closed (ipy) & + + cgrid%dmean_psi_closed (ipy) & + * ndaysi + cgrid%mmean_water_supply (ipy) = cgrid%mmean_water_supply (ipy) & + + cgrid%dmean_water_supply (ipy) & + * ndaysi + cgrid%mmean_par_l (ipy) = cgrid%mmean_par_l (ipy) & + + cgrid%dmean_par_l (ipy) & + * ndaysi + cgrid%mmean_par_l_beam (ipy) = cgrid%mmean_par_l_beam (ipy) & + + cgrid%dmean_par_l_beam (ipy) & + * ndaysi + cgrid%mmean_par_l_diff (ipy) = cgrid%mmean_par_l_diff (ipy) & + + cgrid%dmean_par_l_diff (ipy) & + * ndaysi + cgrid%mmean_rshort_l (ipy) = cgrid%mmean_rshort_l (ipy) & + + cgrid%dmean_rshort_l (ipy) & + * ndaysi + cgrid%mmean_rlong_l (ipy) = cgrid%mmean_rlong_l (ipy) & + + cgrid%dmean_rlong_l (ipy) & + * ndaysi + cgrid%mmean_sensible_lc (ipy) = cgrid%mmean_sensible_lc (ipy) & + + cgrid%dmean_sensible_lc (ipy) & + * ndaysi + cgrid%mmean_vapor_lc (ipy) = cgrid%mmean_vapor_lc (ipy) & + + cgrid%dmean_vapor_lc (ipy) & + * ndaysi + cgrid%mmean_transp (ipy) = cgrid%mmean_transp (ipy) & + + cgrid%dmean_transp (ipy) & + * ndaysi + cgrid%mmean_intercepted_al (ipy) = cgrid%mmean_intercepted_al (ipy) & + + cgrid%dmean_intercepted_al (ipy) & + * ndaysi + cgrid%mmean_wshed_lg (ipy) = cgrid%mmean_wshed_lg (ipy) & + + cgrid%dmean_wshed_lg (ipy) & + * ndaysi + cgrid%mmean_rshort_w (ipy) = cgrid%mmean_rshort_w (ipy) & + + cgrid%dmean_rshort_w (ipy) & + * ndaysi + cgrid%mmean_rlong_w (ipy) = cgrid%mmean_rlong_w (ipy) & + + cgrid%dmean_rlong_w (ipy) & + * ndaysi + cgrid%mmean_sensible_wc (ipy) = cgrid%mmean_sensible_wc (ipy) & + + cgrid%dmean_sensible_wc (ipy) & + * ndaysi + cgrid%mmean_vapor_wc (ipy) = cgrid%mmean_vapor_wc (ipy) & + + cgrid%dmean_vapor_wc (ipy) & + * ndaysi + cgrid%mmean_intercepted_aw (ipy) = cgrid%mmean_intercepted_aw (ipy) & + + cgrid%dmean_intercepted_aw (ipy) & + * ndaysi + cgrid%mmean_wshed_wg (ipy) = cgrid%mmean_wshed_wg (ipy) & + + cgrid%dmean_wshed_wg (ipy) & + * ndaysi + cgrid%mmean_nppleaf (ipy) = cgrid%mmean_nppleaf (ipy) & + + cgrid%dmean_nppleaf (ipy) & + * ndaysi + cgrid%mmean_nppfroot (ipy) = cgrid%mmean_nppfroot (ipy) & + + cgrid%dmean_nppfroot (ipy) & + * ndaysi + cgrid%mmean_nppsapwood (ipy) = cgrid%mmean_nppsapwood (ipy) & + + cgrid%dmean_nppsapwood (ipy) & + * ndaysi + cgrid%mmean_nppcroot (ipy) = cgrid%mmean_nppcroot (ipy) & + + cgrid%dmean_nppcroot (ipy) & + * ndaysi + cgrid%mmean_nppseeds (ipy) = cgrid%mmean_nppseeds (ipy) & + + cgrid%dmean_nppseeds (ipy) & + * ndaysi + cgrid%mmean_nppwood (ipy) = cgrid%mmean_nppwood (ipy) & + + cgrid%dmean_nppwood (ipy) & + * ndaysi + cgrid%mmean_nppdaily (ipy) = cgrid%mmean_nppdaily (ipy) & + + cgrid%dmean_nppdaily (ipy) & + * ndaysi + cgrid%mmean_rh (ipy) = cgrid%mmean_rh (ipy) & + + cgrid%dmean_rh (ipy) & + * ndaysi + cgrid%mmean_cwd_rh (ipy) = cgrid%mmean_cwd_rh (ipy) & + + cgrid%dmean_cwd_rh (ipy) & + * ndaysi + cgrid%mmean_nep (ipy) = cgrid%mmean_nep (ipy) & + + cgrid%dmean_nep (ipy) & + * ndaysi + cgrid%mmean_rk4step (ipy) = cgrid%mmean_rk4step (ipy) & + + cgrid%dmean_rk4step (ipy) & + * ndaysi + cgrid%mmean_available_water (ipy) = cgrid%mmean_available_water (ipy) & + + cgrid%dmean_available_water (ipy) & + * ndaysi + cgrid%mmean_can_theiv (ipy) = cgrid%mmean_can_theiv (ipy) & + + cgrid%dmean_can_theiv (ipy) & + * ndaysi + cgrid%mmean_can_theta (ipy) = cgrid%mmean_can_theta (ipy) & + + cgrid%dmean_can_theta (ipy) & + * ndaysi + cgrid%mmean_can_vpdef (ipy) = cgrid%mmean_can_vpdef (ipy) & + + cgrid%dmean_can_vpdef (ipy) & + * ndaysi + cgrid%mmean_can_shv (ipy) = cgrid%mmean_can_shv (ipy) & + + cgrid%dmean_can_shv (ipy) & + * ndaysi + cgrid%mmean_can_co2 (ipy) = cgrid%mmean_can_co2 (ipy) & + + cgrid%dmean_can_co2 (ipy) & + * ndaysi + cgrid%mmean_can_prss (ipy) = cgrid%mmean_can_prss (ipy) & + + cgrid%dmean_can_prss (ipy) & + * ndaysi + cgrid%mmean_gnd_temp (ipy) = cgrid%mmean_gnd_temp (ipy) & + + cgrid%dmean_gnd_temp (ipy) & + * ndaysi + cgrid%mmean_gnd_shv (ipy) = cgrid%mmean_gnd_shv (ipy) & + + cgrid%dmean_gnd_shv (ipy) & + * ndaysi + cgrid%mmean_can_ggnd (ipy) = cgrid%mmean_can_ggnd (ipy) & + + cgrid%dmean_can_ggnd (ipy) & + * ndaysi + cgrid%mmean_sfcw_depth (ipy) = cgrid%mmean_sfcw_depth (ipy) & + + cgrid%dmean_sfcw_depth (ipy) & + * ndaysi + !----- Temporarily convert energy to extensive [J/m2]. ------------------------------! + cgrid%mmean_sfcw_energy (ipy) = cgrid%mmean_sfcw_energy (ipy) & + + cgrid%dmean_sfcw_energy (ipy) & + * cgrid%dmean_sfcw_mass (ipy) & + * ndaysi + cgrid%mmean_sfcw_mass (ipy) = cgrid%mmean_sfcw_mass (ipy) & + + cgrid%dmean_sfcw_mass (ipy) & + * ndaysi + cgrid%mmean_soil_energy (:,ipy) = cgrid%mmean_soil_energy (:,ipy) & + + cgrid%dmean_soil_energy (:,ipy) & + * ndaysi + cgrid%mmean_soil_mstpot (:,ipy) = cgrid%mmean_soil_mstpot (:,ipy) & + + cgrid%dmean_soil_mstpot (:,ipy) & + * ndaysi + cgrid%mmean_soil_water (:,ipy) = cgrid%mmean_soil_water (:,ipy) & + + cgrid%dmean_soil_water (:,ipy) & + * ndaysi + cgrid%mmean_rshort_gnd (ipy) = cgrid%mmean_rshort_gnd (ipy) & + + cgrid%dmean_rshort_gnd (ipy) & + * ndaysi + cgrid%mmean_par_gnd (ipy) = cgrid%mmean_par_gnd (ipy) & + + cgrid%dmean_par_gnd (ipy) & + * ndaysi + cgrid%mmean_rlong_gnd (ipy) = cgrid%mmean_rlong_gnd (ipy) & + + cgrid%dmean_rlong_gnd (ipy) & + * ndaysi + cgrid%mmean_rlongup (ipy) = cgrid%mmean_rlongup (ipy) & + + cgrid%dmean_rlongup (ipy) & + * ndaysi + cgrid%mmean_parup (ipy) = cgrid%mmean_parup (ipy) & + + cgrid%dmean_parup (ipy) & + * ndaysi + cgrid%mmean_nirup (ipy) = cgrid%mmean_nirup (ipy) & + + cgrid%dmean_nirup (ipy) & + * ndaysi + cgrid%mmean_rshortup (ipy) = cgrid%mmean_rshortup (ipy) & + + cgrid%dmean_rshortup (ipy) & + * ndaysi + cgrid%mmean_rnet (ipy) = cgrid%mmean_rnet (ipy) & + + cgrid%dmean_rnet (ipy) & + * ndaysi + cgrid%mmean_albedo (ipy) = cgrid%mmean_albedo (ipy) & + + cgrid%dmean_albedo (ipy) & + * ndaysi + cgrid%mmean_albedo_beam (ipy) = cgrid%mmean_albedo_beam (ipy) & + + cgrid%dmean_albedo_beam (ipy) & + * ndaysi + cgrid%mmean_albedo_diff (ipy) = cgrid%mmean_albedo_diff (ipy) & + + cgrid%dmean_albedo_diff (ipy) & + * ndaysi + cgrid%mmean_rlong_albedo (ipy) = cgrid%mmean_rlong_albedo (ipy) & + + cgrid%dmean_rlong_albedo (ipy) & + * ndaysi + cgrid%mmean_ustar (ipy) = cgrid%mmean_ustar (ipy) & + + cgrid%dmean_ustar (ipy) & + * ndaysi + cgrid%mmean_tstar (ipy) = cgrid%mmean_tstar (ipy) & + + cgrid%dmean_tstar (ipy) & + * ndaysi + cgrid%mmean_qstar (ipy) = cgrid%mmean_qstar (ipy) & + + cgrid%dmean_qstar (ipy) & + * ndaysi + cgrid%mmean_cstar (ipy) = cgrid%mmean_cstar (ipy) & + + cgrid%dmean_cstar (ipy) & + * ndaysi + cgrid%mmean_carbon_ac (ipy) = cgrid%mmean_carbon_ac (ipy) & + + cgrid%dmean_carbon_ac (ipy) & + * ndaysi + cgrid%mmean_carbon_st (ipy) = cgrid%mmean_carbon_st (ipy) & + + cgrid%dmean_carbon_st (ipy) & + * ndaysi + cgrid%mmean_vapor_gc (ipy) = cgrid%mmean_vapor_gc (ipy) & + + cgrid%dmean_vapor_gc (ipy) & + * ndaysi + cgrid%mmean_vapor_ac (ipy) = cgrid%mmean_vapor_ac (ipy) & + + cgrid%dmean_vapor_ac (ipy) & + * ndaysi + cgrid%mmean_smoist_gg (:,ipy) = cgrid%mmean_smoist_gg (:,ipy) & + + cgrid%dmean_smoist_gg (:,ipy) & + * ndaysi + cgrid%mmean_throughfall (ipy) = cgrid%mmean_throughfall (ipy) & + + cgrid%dmean_throughfall (ipy) & + * ndaysi + cgrid%mmean_transloss (:,ipy) = cgrid%mmean_transloss (:,ipy) & + + cgrid%dmean_transloss (:,ipy) & + * ndaysi + cgrid%mmean_runoff (ipy) = cgrid%mmean_runoff (ipy) & + + cgrid%dmean_runoff (ipy) & + * ndaysi + cgrid%mmean_drainage (ipy) = cgrid%mmean_drainage (ipy) & + + cgrid%dmean_drainage (ipy) & + * ndaysi + cgrid%mmean_sensible_gc (ipy) = cgrid%mmean_sensible_gc (ipy) & + + cgrid%dmean_sensible_gc (ipy) & + * ndaysi + cgrid%mmean_sensible_ac (ipy) = cgrid%mmean_sensible_ac (ipy) & + + cgrid%dmean_sensible_ac (ipy) & + * ndaysi + cgrid%mmean_sensible_gg (:,ipy) = cgrid%mmean_sensible_gg (:,ipy) & + + cgrid%dmean_sensible_gg (:,ipy) & + * ndaysi + cgrid%mmean_qthroughfall (ipy) = cgrid%mmean_qthroughfall (ipy) & + + cgrid%dmean_qthroughfall (ipy) & + * ndaysi + cgrid%mmean_qrunoff (ipy) = cgrid%mmean_qrunoff (ipy) & + + cgrid%dmean_qrunoff (ipy) & + * ndaysi + cgrid%mmean_qdrainage (ipy) = cgrid%mmean_qdrainage (ipy) & + + cgrid%dmean_qdrainage (ipy) & + * ndaysi + cgrid%mmean_nppleaf (ipy) = cgrid%mmean_nppleaf (ipy) & + + cgrid%dmean_nppleaf (ipy) & + * ndaysi + cgrid%mmean_nppfroot (ipy) = cgrid%mmean_nppfroot (ipy) & + + cgrid%dmean_nppfroot (ipy) & + * ndaysi + cgrid%mmean_nppsapwood (ipy) = cgrid%mmean_nppsapwood (ipy) & + + cgrid%dmean_nppsapwood (ipy) & + * ndaysi + cgrid%mmean_nppcroot (ipy) = cgrid%mmean_nppcroot (ipy) & + + cgrid%dmean_nppcroot (ipy) & + * ndaysi + cgrid%mmean_nppseeds (ipy) = cgrid%mmean_nppseeds (ipy) & + + cgrid%dmean_nppseeds (ipy) & + * ndaysi + cgrid%mmean_nppwood (ipy) = cgrid%mmean_nppwood (ipy) & + + cgrid%dmean_nppwood (ipy) & + * ndaysi + cgrid%mmean_nppdaily (ipy) = cgrid%mmean_nppdaily (ipy) & + + cgrid%dmean_nppdaily (ipy) & + * ndaysi + cgrid%mmean_A_decomp (ipy) = cgrid%mmean_A_decomp (ipy) & + + cgrid%dmean_A_decomp (ipy) & + * ndaysi + cgrid%mmean_Af_decomp (ipy) = cgrid%mmean_Af_decomp (ipy) & + + cgrid%dmean_Af_decomp (ipy) & + * ndaysi + cgrid%mmean_co2_residual (ipy) = cgrid%mmean_co2_residual (ipy) & + + cgrid%dmean_co2_residual (ipy) & + * ndaysi + cgrid%mmean_energy_residual (ipy) = cgrid%mmean_energy_residual (ipy) & + + cgrid%dmean_energy_residual (ipy) & + * ndaysi + cgrid%mmean_water_residual (ipy) = cgrid%mmean_water_residual (ipy) & + + cgrid%dmean_water_residual (ipy) & + * ndaysi + cgrid%mmean_atm_theiv (ipy) = cgrid%mmean_atm_theiv (ipy) & + + cgrid%dmean_atm_theiv (ipy) & + * ndaysi + cgrid%mmean_atm_theta (ipy) = cgrid%mmean_atm_theta (ipy) & + + cgrid%dmean_atm_theta (ipy) & + * ndaysi + cgrid%mmean_atm_vpdef (ipy) = cgrid%mmean_atm_vpdef (ipy) & + + cgrid%dmean_atm_vpdef (ipy) & + * ndaysi + cgrid%mmean_atm_shv (ipy) = cgrid%mmean_atm_shv (ipy) & + + cgrid%dmean_atm_shv (ipy) & + * ndaysi + cgrid%mmean_atm_rshort (ipy) = cgrid%mmean_atm_rshort (ipy) & + + cgrid%dmean_atm_rshort (ipy) & + * ndaysi + cgrid%mmean_atm_rshort_diff (ipy) = cgrid%mmean_atm_rshort_diff (ipy) & + + cgrid%dmean_atm_rshort_diff (ipy) & + * ndaysi + cgrid%mmean_atm_par (ipy) = cgrid%mmean_atm_par (ipy) & + + cgrid%dmean_atm_par (ipy) & + * ndaysi + cgrid%mmean_atm_par_diff (ipy) = cgrid%mmean_atm_par_diff (ipy) & + + cgrid%dmean_atm_par_diff (ipy) & + * ndaysi + cgrid%mmean_atm_rlong (ipy) = cgrid%mmean_atm_rlong (ipy) & + + cgrid%dmean_atm_rlong (ipy) & + * ndaysi + cgrid%mmean_atm_vels (ipy) = cgrid%mmean_atm_vels (ipy) & + + cgrid%dmean_atm_vels (ipy) & + * ndaysi + cgrid%mmean_atm_prss (ipy) = cgrid%mmean_atm_prss (ipy) & + + cgrid%dmean_atm_prss (ipy) & + * ndaysi + cgrid%mmean_atm_co2 (ipy) = cgrid%mmean_atm_co2 (ipy) & + + cgrid%dmean_atm_co2 (ipy) & + * ndaysi + cgrid%mmean_pcpg (ipy) = cgrid%mmean_pcpg (ipy) & + + cgrid%dmean_pcpg (ipy) & + * ndaysi + cgrid%mmean_qpcpg (ipy) = cgrid%mmean_qpcpg (ipy) & + + cgrid%dmean_qpcpg (ipy) & + * ndaysi + cgrid%mmean_dpcpg (ipy) = cgrid%mmean_dpcpg (ipy) & + + cgrid%dmean_dpcpg (ipy) & + * ndaysi + !----- Now the mean sum of squares. -------------------------------------------------! + cgrid%mmsqu_gpp (ipy) = cgrid%mmsqu_gpp (ipy) & + + cgrid%dmean_gpp (ipy) & + * cgrid%dmean_gpp (ipy) & + * ndaysi + cgrid%mmsqu_npp (ipy) = cgrid%mmsqu_npp (ipy) & + + cgrid%dmean_npp (ipy) & + * cgrid%dmean_npp (ipy) & + * ndaysi + cgrid%mmsqu_plresp (ipy) = cgrid%mmsqu_plresp (ipy) & + + cgrid%dmean_plresp (ipy) & + * cgrid%dmean_plresp (ipy) & + * ndaysi + cgrid%mmsqu_sensible_lc (ipy) = cgrid%mmsqu_sensible_lc (ipy) & + + cgrid%dmean_sensible_lc (ipy) & + * cgrid%dmean_sensible_lc (ipy) & + * ndaysi + cgrid%mmsqu_vapor_lc (ipy) = cgrid%mmsqu_vapor_lc (ipy) & + + cgrid%dmean_vapor_lc (ipy) & + * cgrid%dmean_vapor_lc (ipy) & + * ndaysi + cgrid%mmsqu_transp (ipy) = cgrid%mmsqu_transp (ipy) & + + cgrid%dmean_transp (ipy) & + * cgrid%dmean_transp (ipy) & + * ndaysi + cgrid%mmsqu_sensible_wc (ipy) = cgrid%mmsqu_sensible_wc (ipy) & + + cgrid%dmean_sensible_wc (ipy) & + * cgrid%dmean_sensible_wc (ipy) & + * ndaysi + cgrid%mmsqu_vapor_wc (ipy) = cgrid%mmsqu_vapor_wc (ipy) & + + cgrid%dmean_vapor_wc (ipy) & + * cgrid%dmean_vapor_wc (ipy) & + * ndaysi + cgrid%mmsqu_rh (ipy) = cgrid%mmsqu_rh (ipy) & + + cgrid%dmean_rh (ipy) & + * cgrid%dmean_rh (ipy) & + * ndaysi + cgrid%mmsqu_cwd_rh (ipy) = cgrid%mmsqu_cwd_rh (ipy) & + + cgrid%dmean_cwd_rh (ipy) & + * cgrid%dmean_cwd_rh (ipy) & + * ndaysi + cgrid%mmsqu_nep (ipy) = cgrid%mmsqu_nep (ipy) & + + cgrid%dmean_nep (ipy) & + * cgrid%dmean_nep (ipy) & + * ndaysi + cgrid%mmsqu_rlongup (ipy) = cgrid%mmsqu_rlongup (ipy) & + + cgrid%dmean_rlongup (ipy) & + * cgrid%dmean_rlongup (ipy) & + * ndaysi + cgrid%mmsqu_parup (ipy) = cgrid%mmsqu_parup (ipy) & + + cgrid%dmean_parup (ipy) & + * cgrid%dmean_parup (ipy) & + * ndaysi + cgrid%mmsqu_nirup (ipy) = cgrid%mmsqu_nirup (ipy) & + + cgrid%dmean_nirup (ipy) & + * cgrid%dmean_nirup (ipy) & + * ndaysi + cgrid%mmsqu_rshortup (ipy) = cgrid%mmsqu_rshortup (ipy) & + + cgrid%dmean_rshortup (ipy) & + * cgrid%dmean_rshortup (ipy) & + * ndaysi + cgrid%mmsqu_rnet (ipy) = cgrid%mmsqu_rnet (ipy) & + + cgrid%dmean_rnet (ipy) & + * cgrid%dmean_rnet (ipy) & + * ndaysi + cgrid%mmsqu_albedo (ipy) = cgrid%mmsqu_albedo (ipy) & + + cgrid%dmean_albedo (ipy) & + * cgrid%dmean_albedo (ipy) & + * ndaysi + cgrid%mmsqu_ustar (ipy) = cgrid%mmsqu_ustar (ipy) & + + cgrid%dmean_ustar (ipy) & + * cgrid%dmean_ustar (ipy) & + * ndaysi + cgrid%mmsqu_carbon_ac (ipy) = cgrid%mmsqu_carbon_ac (ipy) & + + cgrid%dmean_carbon_ac (ipy) & + * cgrid%dmean_carbon_ac (ipy) & + * ndaysi + cgrid%mmsqu_carbon_st (ipy) = cgrid%mmsqu_carbon_st (ipy) & + + cgrid%dmean_carbon_st (ipy) & + * cgrid%dmean_carbon_st (ipy) & + * ndaysi + cgrid%mmsqu_vapor_gc (ipy) = cgrid%mmsqu_vapor_gc (ipy) & + + cgrid%dmean_vapor_gc (ipy) & + * cgrid%dmean_vapor_gc (ipy) & + * ndaysi + cgrid%mmsqu_vapor_ac (ipy) = cgrid%mmsqu_vapor_ac (ipy) & + + cgrid%dmean_vapor_ac (ipy) & + * cgrid%dmean_vapor_ac (ipy) & + * ndaysi + cgrid%mmsqu_sensible_gc (ipy) = cgrid%mmsqu_sensible_gc (ipy) & + + cgrid%dmean_sensible_gc (ipy) & + * cgrid%dmean_sensible_gc (ipy) & + * ndaysi + cgrid%mmsqu_sensible_ac (ipy) = cgrid%mmsqu_sensible_ac (ipy) & + + cgrid%dmean_sensible_ac (ipy) & + * cgrid%dmean_sensible_ac (ipy) & + * ndaysi !------------------------------------------------------------------------------------! - cgrid%mmsqu_gpp (ipy) = cgrid%mmsqu_gpp (ipy) & - + cgrid%dmean_gpp (ipy) & - * cgrid%dmean_gpp (ipy) - cgrid%mmsqu_leaf_resp (ipy) = cgrid%mmsqu_leaf_resp (ipy) & - + cgrid%dmean_leaf_resp (ipy) & - * cgrid%dmean_leaf_resp (ipy) - cgrid%mmsqu_root_resp (ipy) = cgrid%mmsqu_root_resp (ipy) & - + cgrid%dmean_root_resp (ipy) & - * cgrid%dmean_root_resp (ipy) - cgrid%mmsqu_plresp (ipy) = cgrid%mmsqu_plresp (ipy) & - + cgrid%dmean_plresp (ipy) & - * cgrid%dmean_plresp (ipy) - cgrid%mmsqu_carbon_ac (ipy) = cgrid%mmsqu_carbon_ac (ipy) & - + cgrid%dmean_carbon_ac (ipy) & - * cgrid%dmean_carbon_ac (ipy) - cgrid%mmsqu_carbon_st (ipy) = cgrid%mmsqu_carbon_st (ipy) & - + cgrid%dmean_carbon_st (ipy) & - * cgrid%dmean_carbon_st (ipy) - cgrid%mmsqu_nep (ipy) = cgrid%mmsqu_nep (ipy) & - + cgrid%dmean_nep (ipy) & - * cgrid%dmean_nep (ipy) - cgrid%mmsqu_rh (ipy) = cgrid%mmsqu_rh (ipy) & - + cgrid%dmean_rh (ipy) & - * cgrid%dmean_rh (ipy) - cgrid%mmsqu_cwd_rh (ipy) = cgrid%mmsqu_cwd_rh (ipy) & - + cgrid%dmean_cwd_rh (ipy) & - * cgrid%dmean_cwd_rh (ipy) - cgrid%mmsqu_sensible_ac(ipy) = cgrid%mmsqu_sensible_ac(ipy) & - + cgrid%dmean_sensible_ac(ipy) & - * cgrid%dmean_sensible_ac(ipy) - cgrid%mmsqu_sensible_lc(ipy) = cgrid%mmsqu_sensible_lc(ipy) & - + cgrid%dmean_sensible_lc(ipy) & - * cgrid%dmean_sensible_lc(ipy) - cgrid%mmsqu_sensible_wc(ipy) = cgrid%mmsqu_sensible_wc(ipy) & - + cgrid%dmean_sensible_wc(ipy) & - * cgrid%dmean_sensible_wc(ipy) - cgrid%mmsqu_sensible_gc(ipy) = cgrid%mmsqu_sensible_gc(ipy) & - + cgrid%dmean_sensible_gc(ipy) & - * cgrid%dmean_sensible_gc(ipy) - cgrid%mmsqu_evap (ipy) = cgrid%mmsqu_evap (ipy) & - + cgrid%dmean_evap (ipy) & - * cgrid%dmean_evap (ipy) - cgrid%mmsqu_transp (ipy) = cgrid%mmsqu_transp (ipy) & - + cgrid%dmean_transp (ipy) & - * cgrid%dmean_transp (ipy) - cgrid%mmsqu_vapor_ac(ipy) = cgrid%mmsqu_vapor_ac (ipy) & - + cgrid%dmean_vapor_ac (ipy) & - * cgrid%dmean_vapor_ac (ipy) - cgrid%mmsqu_vapor_lc(ipy) = cgrid%mmsqu_vapor_lc (ipy) & - + cgrid%dmean_vapor_lc (ipy) & - * cgrid%dmean_vapor_lc (ipy) - cgrid%mmsqu_vapor_wc(ipy) = cgrid%mmsqu_vapor_wc (ipy) & - + cgrid%dmean_vapor_wc (ipy) & - * cgrid%dmean_vapor_wc (ipy) - cgrid%mmsqu_vapor_gc(ipy) = cgrid%mmsqu_vapor_gc (ipy) & - + cgrid%dmean_vapor_gc (ipy) & - * cgrid%dmean_vapor_gc (ipy) - cgrid%mmsqu_ustar(ipy) = cgrid%mmsqu_ustar (ipy) & - + cgrid%dmean_ustar (ipy) & - * cgrid%dmean_ustar (ipy) - cgrid%mmsqu_rlongup(ipy) = cgrid%mmsqu_rlongup (ipy) & - + cgrid%dmean_rlongup (ipy) & - * cgrid%dmean_rlongup (ipy) - cgrid%mmsqu_parup(ipy) = cgrid%mmsqu_parup (ipy) & - + cgrid%dmean_parup (ipy) & - * cgrid%dmean_parup (ipy) - cgrid%mmsqu_nirup(ipy) = cgrid%mmsqu_nirup (ipy) & - + cgrid%dmean_nirup (ipy) & - * cgrid%dmean_nirup (ipy) - cgrid%mmsqu_rshortup(ipy) = cgrid%mmsqu_rshortup (ipy) & - + cgrid%dmean_rshortup (ipy) & - * cgrid%dmean_rshortup (ipy) - cgrid%mmsqu_rnet(ipy) = cgrid%mmsqu_rnet (ipy) & - + cgrid%dmean_rnet (ipy) & - * cgrid%dmean_rnet (ipy) - cgrid%mmsqu_albedo(ipy) = cgrid%mmsqu_albedo (ipy) & - + cgrid%dmean_albedo (ipy) & - * cgrid%dmean_albedo (ipy) - cpoly => cgrid%polygon(ipy) - site_loop: do isi=1,cpoly%nsites - cpoly%mmean_co2_residual(isi) = cpoly%mmean_co2_residual(isi) & - + cpoly%dmean_co2_residual(isi) - cpoly%mmean_energy_residual(isi) = cpoly%mmean_energy_residual(isi) & - + cpoly%dmean_energy_residual(isi) - cpoly%mmean_water_residual(isi) = cpoly%mmean_water_residual(isi) & - + cpoly%dmean_water_residual(isi) + + !------------------------------------------------------------------------------------! + ! Site loop. ! + !------------------------------------------------------------------------------------! + siteloop: do isi=1,cpoly%nsites csite => cpoly%site(isi) - patch_loop: do ipa=1,csite%npatches - csite%mmean_co2_residual(ipa) = csite%mmean_co2_residual(ipa) & - + csite%dmean_co2_residual(ipa) - csite%mmean_energy_residual(ipa) = csite%mmean_energy_residual(ipa) & - + csite%dmean_energy_residual(ipa) - csite%mmean_water_residual(ipa) = csite%mmean_water_residual(ipa) & - + csite%dmean_water_residual(ipa) - - csite%mmean_rh (ipa) = csite%mmean_rh (ipa) & - + csite%dmean_rh (ipa) - csite%mmean_cwd_rh (ipa) = csite%mmean_cwd_rh (ipa) & - + csite%dmean_cwd_rh (ipa) - csite%mmean_albedo (ipa) = csite%mmean_albedo (ipa) & - + csite%dmean_albedo (ipa) - csite%mmean_albedo_beam (ipa) = csite%mmean_albedo_beam (ipa) & - + csite%dmean_albedo_beam (ipa) - csite%mmean_albedo_diffuse(ipa) = csite%mmean_albedo_diffuse(ipa) & - + csite%dmean_albedo_diffuse(ipa) - - csite%mmean_rk4step(ipa) = csite%mmean_rk4step(ipa) & - + csite%dmean_rk4step(ipa) + !---------------------------------------------------------------------------------! + ! Integrate site-level variables. ! + !---------------------------------------------------------------------------------! + cpoly%mmean_atm_theiv (isi) = cpoly%mmean_atm_theiv (isi) & + + cpoly%dmean_atm_theiv (isi) & + * ndaysi + cpoly%mmean_atm_theta (isi) = cpoly%mmean_atm_theta (isi) & + + cpoly%dmean_atm_theta (isi) & + * ndaysi + cpoly%mmean_atm_vpdef (isi) = cpoly%mmean_atm_vpdef (isi) & + + cpoly%dmean_atm_vpdef (isi) & + * ndaysi + cpoly%mmean_atm_shv (isi) = cpoly%mmean_atm_shv (isi) & + + cpoly%dmean_atm_shv (isi) & + * ndaysi + cpoly%mmean_atm_rshort (isi) = cpoly%mmean_atm_rshort (isi) & + + cpoly%dmean_atm_rshort (isi) & + * ndaysi + cpoly%mmean_atm_rshort_diff(isi) = cpoly%mmean_atm_rshort_diff(isi) & + + cpoly%dmean_atm_rshort_diff(isi) & + * ndaysi + cpoly%mmean_atm_par (isi) = cpoly%mmean_atm_par (isi) & + + cpoly%dmean_atm_par (isi) & + * ndaysi + cpoly%mmean_atm_par_diff (isi) = cpoly%mmean_atm_par_diff (isi) & + + cpoly%dmean_atm_par_diff (isi) & + * ndaysi + cpoly%mmean_atm_rlong (isi) = cpoly%mmean_atm_rlong (isi) & + + cpoly%dmean_atm_rlong (isi) & + * ndaysi + cpoly%mmean_atm_vels (isi) = cpoly%mmean_atm_vels (isi) & + + cpoly%dmean_atm_vels (isi) & + * ndaysi + cpoly%mmean_atm_prss (isi) = cpoly%mmean_atm_prss (isi) & + + cpoly%dmean_atm_prss (isi) & + * ndaysi + cpoly%mmean_atm_co2 (isi) = cpoly%mmean_atm_co2 (isi) & + + cpoly%dmean_atm_co2 (isi) & + * ndaysi + cpoly%mmean_pcpg (isi) = cpoly%mmean_pcpg (isi) & + + cpoly%dmean_pcpg (isi) & + * ndaysi + cpoly%mmean_qpcpg (isi) = cpoly%mmean_qpcpg (isi) & + + cpoly%dmean_qpcpg (isi) & + * ndaysi + cpoly%mmean_dpcpg (isi) = cpoly%mmean_dpcpg (isi) & + + cpoly%dmean_dpcpg (isi) & + * ndaysi + !---------------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------------! + ! Patch loop. ! + !---------------------------------------------------------------------------------! + patchloop: do ipa=1,csite%npatches cpatch => csite%patch(ipa) - cohort_loop: do ico=1,cpatch%ncohorts - cpatch%mmean_fs_open (ico) = cpatch%mmean_fs_open (ico) & - + cpatch%dmean_fs_open (ico) - cpatch%mmean_fsw (ico) = cpatch%mmean_fsw (ico) & - + cpatch%dmean_fsw (ico) - cpatch%mmean_fsn (ico) = cpatch%mmean_fsn (ico) & - + cpatch%dmean_fsn (ico) - cpatch%mmean_psi_open (ico) = cpatch%mmean_psi_open (ico) & - + cpatch%dmean_psi_open (ico) - cpatch%mmean_psi_closed (ico) = cpatch%mmean_psi_closed (ico) & - + cpatch%dmean_psi_closed (ico) - cpatch%mmean_water_supply (ico) = cpatch%mmean_water_supply (ico) & - + cpatch%dmean_water_supply (ico) - cpatch%mmean_par_l (ico) = cpatch%mmean_par_l (ico) & - + cpatch%dmean_par_l (ico) - cpatch%mmean_par_l_beam (ico) = cpatch%mmean_par_l_beam (ico) & - + cpatch%dmean_par_l_beam (ico) - cpatch%mmean_par_l_diff (ico) = cpatch%mmean_par_l_diff (ico) & - + cpatch%dmean_par_l_diff (ico) - cpatch%mmean_rshort_l (ico) = cpatch%mmean_rshort_l (ico) & - + cpatch%dmean_rshort_l (ico) - cpatch%mmean_rlong_l (ico) = cpatch%mmean_rlong_l (ico) & - + cpatch%dmean_rlong_l (ico) - cpatch%mmean_sensible_lc (ico) = cpatch%mmean_sensible_lc (ico) & - + cpatch%dmean_sensible_lc (ico) - cpatch%mmean_vapor_lc (ico) = cpatch%mmean_vapor_lc (ico) & - + cpatch%dmean_vapor_lc (ico) - cpatch%mmean_transp (ico) = cpatch%mmean_transp (ico) & - + cpatch%dmean_transp (ico) - cpatch%mmean_intercepted_al (ico) = cpatch%mmean_intercepted_al (ico) & - + cpatch%dmean_intercepted_al (ico) - cpatch%mmean_wshed_lg (ico) = cpatch%mmean_wshed_lg (ico) & - + cpatch%dmean_wshed_lg (ico) - cpatch%mmean_rshort_w (ico) = cpatch%mmean_rshort_w (ico) & - + cpatch%dmean_rshort_w (ico) - cpatch%mmean_rlong_w (ico) = cpatch%mmean_rlong_w (ico) & - + cpatch%dmean_rlong_w (ico) - cpatch%mmean_sensible_wc (ico) = cpatch%mmean_sensible_wc (ico) & - + cpatch%dmean_sensible_wc (ico) - cpatch%mmean_vapor_wc (ico) = cpatch%mmean_vapor_wc (ico) & - + cpatch%dmean_vapor_wc (ico) - cpatch%mmean_intercepted_aw (ico) = cpatch%mmean_intercepted_aw (ico) & - + cpatch%dmean_intercepted_aw (ico) - cpatch%mmean_wshed_wg (ico) = cpatch%mmean_wshed_wg (ico) & - + cpatch%dmean_wshed_wg (ico) - !---------------------------------------------------------------------------! + + !------------------------------------------------------------------------------! + ! Integrate the variables that don't have daily means because their time ! + ! step is one day. ! + !------------------------------------------------------------------------------! + csite%mmean_fast_soil_c (ipa) = csite%mmean_fast_soil_c (ipa) & + + csite%fast_soil_c (ipa) & + * ndaysi + csite%mmean_slow_soil_c (ipa) = csite%mmean_slow_soil_c (ipa) & + + csite%slow_soil_c (ipa) & + * ndaysi + csite%mmean_struct_soil_c (ipa) = csite%mmean_struct_soil_c (ipa) & + + csite%structural_soil_c (ipa) & + * ndaysi + csite%mmean_struct_soil_l (ipa) = csite%mmean_struct_soil_l (ipa) & + + csite%structural_soil_l (ipa) & + * ndaysi + csite%mmean_fast_soil_n (ipa) = csite%mmean_fast_soil_n (ipa) & + + csite%fast_soil_n (ipa) & + * ndaysi + csite%mmean_mineral_soil_n (ipa) = csite%mmean_mineral_soil_n (ipa) & + + csite%mineralized_soil_n (ipa) & + * ndaysi + !------------------------------------------------------------------------------! + + + !------------------------------------------------------------------------------! + ! Integrate patch-level variables. ! + !------------------------------------------------------------------------------! + csite%mmean_co2_residual (ipa) = csite%mmean_co2_residual (ipa) & + + csite%dmean_co2_residual (ipa) & + * ndaysi + csite%mmean_energy_residual (ipa) = csite%mmean_energy_residual (ipa) & + + csite%dmean_energy_residual (ipa) & + * ndaysi + csite%mmean_water_residual (ipa) = csite%mmean_water_residual (ipa) & + + csite%dmean_water_residual (ipa) & + * ndaysi + csite%mmean_rh (ipa) = csite%mmean_rh (ipa) & + + csite%dmean_rh (ipa) & + * ndaysi + csite%mmean_cwd_rh (ipa) = csite%mmean_cwd_rh (ipa) & + + csite%dmean_cwd_rh (ipa) & + * ndaysi + csite%mmean_nep (ipa) = csite%mmean_nep (ipa) & + + csite%dmean_nep (ipa) & + * ndaysi + csite%mmean_A_decomp (ipa) = csite%mmean_A_decomp (ipa) & + + csite%dmean_A_decomp (ipa) & + * ndaysi + csite%mmean_Af_decomp (ipa) = csite%mmean_Af_decomp (ipa) & + + csite%dmean_Af_decomp (ipa) & + * ndaysi + csite%mmean_rk4step (ipa) = csite%mmean_rk4step (ipa) & + + csite%dmean_rk4step (ipa) & + * ndaysi + csite%mmean_available_water (ipa) = csite%mmean_available_water (ipa) & + + csite%dmean_available_water (ipa) & + * ndaysi + csite%mmean_can_theiv (ipa) = csite%mmean_can_theiv (ipa) & + + csite%dmean_can_theiv (ipa) & + * ndaysi + csite%mmean_can_theta (ipa) = csite%mmean_can_theta (ipa) & + + csite%dmean_can_theta (ipa) & + * ndaysi + csite%mmean_can_vpdef (ipa) = csite%mmean_can_vpdef (ipa) & + + csite%dmean_can_vpdef (ipa) & + * ndaysi + csite%mmean_can_shv (ipa) = csite%mmean_can_shv (ipa) & + + csite%dmean_can_shv (ipa) & + * ndaysi + csite%mmean_can_co2 (ipa) = csite%mmean_can_co2 (ipa) & + + csite%dmean_can_co2 (ipa) & + * ndaysi + csite%mmean_can_prss (ipa) = csite%mmean_can_prss (ipa) & + + csite%dmean_can_prss (ipa) & + * ndaysi + csite%mmean_gnd_temp (ipa) = csite%mmean_gnd_temp (ipa) & + + csite%dmean_gnd_temp (ipa) & + * ndaysi + csite%mmean_gnd_shv (ipa) = csite%mmean_gnd_shv (ipa) & + + csite%dmean_gnd_shv (ipa) & + * ndaysi + csite%mmean_can_ggnd (ipa) = csite%mmean_can_ggnd (ipa) & + + csite%dmean_can_ggnd (ipa) & + * ndaysi + csite%mmean_sfcw_depth (ipa) = csite%mmean_sfcw_depth (ipa) & + + csite%dmean_sfcw_depth (ipa) & + * ndaysi + !----- Temporarily make pounding energy extensive [J/m2]. ---------------------! + csite%mmean_sfcw_energy (ipa) = csite%mmean_sfcw_energy (ipa) & + + csite%dmean_sfcw_energy (ipa) & + * csite%dmean_sfcw_mass (ipa) & + * ndaysi + csite%mmean_sfcw_mass (ipa) = csite%mmean_sfcw_mass (ipa) & + + csite%dmean_sfcw_mass (ipa) & + * ndaysi + csite%mmean_soil_energy (:,ipa) = csite%mmean_soil_energy (:,ipa) & + + csite%dmean_soil_energy (:,ipa) & + * ndaysi + csite%mmean_soil_mstpot (:,ipa) = csite%mmean_soil_mstpot (:,ipa) & + + csite%dmean_soil_mstpot (:,ipa) & + * ndaysi + csite%mmean_soil_water (:,ipa) = csite%mmean_soil_water (:,ipa) & + + csite%dmean_soil_water (:,ipa) & + * ndaysi + csite%mmean_rshort_gnd (ipa) = csite%mmean_rshort_gnd (ipa) & + + csite%dmean_rshort_gnd (ipa) & + * ndaysi + csite%mmean_par_gnd (ipa) = csite%mmean_par_gnd (ipa) & + + csite%dmean_par_gnd (ipa) & + * ndaysi + csite%mmean_rlong_gnd (ipa) = csite%mmean_rlong_gnd (ipa) & + + csite%dmean_rlong_gnd (ipa) & + * ndaysi + csite%mmean_rlongup (ipa) = csite%mmean_rlongup (ipa) & + + csite%dmean_rlongup (ipa) & + * ndaysi + csite%mmean_parup (ipa) = csite%mmean_parup (ipa) & + + csite%dmean_parup (ipa) & + * ndaysi + csite%mmean_nirup (ipa) = csite%mmean_nirup (ipa) & + + csite%dmean_nirup (ipa) & + * ndaysi + csite%mmean_rshortup (ipa) = csite%mmean_rshortup (ipa) & + + csite%dmean_rshortup (ipa) & + * ndaysi + csite%mmean_rnet (ipa) = csite%mmean_rnet (ipa) & + + csite%dmean_rnet (ipa) & + * ndaysi + csite%mmean_albedo (ipa) = csite%mmean_albedo (ipa) & + + csite%dmean_albedo (ipa) & + * ndaysi + csite%mmean_albedo_beam (ipa) = csite%mmean_albedo_beam (ipa) & + + csite%dmean_albedo_beam (ipa) & + * ndaysi + csite%mmean_albedo_diff (ipa) = csite%mmean_albedo_diff (ipa) & + + csite%dmean_albedo_diff (ipa) & + * ndaysi + csite%mmean_rlong_albedo (ipa) = csite%mmean_rlong_albedo (ipa) & + + csite%dmean_rlong_albedo (ipa) & + * ndaysi + csite%mmean_ustar (ipa) = csite%mmean_ustar (ipa) & + + csite%dmean_ustar (ipa) & + * ndaysi + csite%mmean_tstar (ipa) = csite%mmean_tstar (ipa) & + + csite%dmean_tstar (ipa) & + * ndaysi + csite%mmean_qstar (ipa) = csite%mmean_qstar (ipa) & + + csite%dmean_qstar (ipa) & + * ndaysi + csite%mmean_cstar (ipa) = csite%mmean_cstar (ipa) & + + csite%dmean_cstar (ipa) & + * ndaysi + csite%mmean_carbon_ac (ipa) = csite%mmean_carbon_ac (ipa) & + + csite%dmean_carbon_ac (ipa) & + * ndaysi + csite%mmean_carbon_st (ipa) = csite%mmean_carbon_st (ipa) & + + csite%dmean_carbon_st (ipa) & + * ndaysi + csite%mmean_vapor_gc (ipa) = csite%mmean_vapor_gc (ipa) & + + csite%dmean_vapor_gc (ipa) & + * ndaysi + csite%mmean_vapor_ac (ipa) = csite%mmean_vapor_ac (ipa) & + + csite%dmean_vapor_ac (ipa) & + * ndaysi + csite%mmean_smoist_gg (:,ipa) = csite%mmean_smoist_gg (:,ipa) & + + csite%dmean_smoist_gg (:,ipa) & + * ndaysi + csite%mmean_throughfall (ipa) = csite%mmean_throughfall (ipa) & + + csite%dmean_throughfall (ipa) & + * ndaysi + csite%mmean_transloss (:,ipa) = csite%mmean_transloss (:,ipa) & + + csite%dmean_transloss (:,ipa) & + * ndaysi + csite%mmean_runoff (ipa) = csite%mmean_runoff (ipa) & + + csite%dmean_runoff (ipa) & + * ndaysi + csite%mmean_drainage (ipa) = csite%mmean_drainage (ipa) & + + csite%dmean_drainage (ipa) & + * ndaysi + csite%mmean_sensible_gc (ipa) = csite%mmean_sensible_gc (ipa) & + + csite%dmean_sensible_gc (ipa) & + * ndaysi + csite%mmean_sensible_ac (ipa) = csite%mmean_sensible_ac (ipa) & + + csite%dmean_sensible_ac (ipa) & + * ndaysi + csite%mmean_sensible_gg (:,ipa) = csite%mmean_sensible_gg (:,ipa) & + + csite%dmean_sensible_gg (:,ipa) & + * ndaysi + csite%mmean_qthroughfall (ipa) = csite%mmean_qthroughfall (ipa) & + + csite%dmean_qthroughfall (ipa) & + * ndaysi + csite%mmean_qrunoff (ipa) = csite%mmean_qrunoff (ipa) & + + csite%dmean_qrunoff (ipa) & + * ndaysi + csite%mmean_qdrainage (ipa) = csite%mmean_qdrainage (ipa) & + + csite%dmean_qdrainage (ipa) & + * ndaysi + csite%mmean_A_decomp (ipa) = csite%mmean_A_decomp (ipa) & + + csite%dmean_A_decomp (ipa) & + * ndaysi + csite%mmean_Af_decomp (ipa) = csite%mmean_Af_decomp (ipa) & + + csite%dmean_Af_decomp (ipa) & + * ndaysi + csite%mmean_co2_residual (ipa) = csite%mmean_co2_residual (ipa) & + + csite%dmean_co2_residual (ipa) & + * ndaysi + csite%mmean_energy_residual (ipa) = csite%mmean_energy_residual (ipa) & + + csite%dmean_energy_residual (ipa) & + * ndaysi + csite%mmean_water_residual (ipa) = csite%mmean_water_residual (ipa) & + + csite%dmean_water_residual (ipa) & + * ndaysi + !----- Integrate the sum of squares. ------------------------------------------! + csite%mmsqu_rh (ipa) = csite%mmsqu_rh (ipa) & + + csite%dmean_rh (ipa) & + * csite%dmean_rh (ipa) & + * ndaysi + csite%mmsqu_cwd_rh (ipa) = csite%mmsqu_cwd_rh (ipa) & + + csite%dmean_cwd_rh (ipa) & + * csite%dmean_cwd_rh (ipa) & + * ndaysi + csite%mmsqu_nep (ipa) = csite%mmsqu_nep (ipa) & + + csite%dmean_nep (ipa) & + * csite%dmean_nep (ipa) & + * ndaysi + csite%mmsqu_rlongup (ipa) = csite%mmsqu_rlongup (ipa) & + + csite%dmean_rlongup (ipa) & + * csite%dmean_rlongup (ipa) & + * ndaysi + csite%mmsqu_parup (ipa) = csite%mmsqu_parup (ipa) & + + csite%dmean_parup (ipa) & + * csite%dmean_parup (ipa) & + * ndaysi + csite%mmsqu_nirup (ipa) = csite%mmsqu_nirup (ipa) & + + csite%dmean_nirup (ipa) & + * csite%dmean_nirup (ipa) & + * ndaysi + csite%mmsqu_rshortup (ipa) = csite%mmsqu_rshortup (ipa) & + + csite%dmean_rshortup (ipa) & + * csite%dmean_rshortup (ipa) & + * ndaysi + csite%mmsqu_rnet (ipa) = csite%mmsqu_rnet (ipa) & + + csite%dmean_rnet (ipa) & + * csite%dmean_rnet (ipa) & + * ndaysi + csite%mmsqu_albedo (ipa) = csite%mmsqu_albedo (ipa) & + + csite%dmean_albedo (ipa) & + * csite%dmean_albedo (ipa) & + * ndaysi + csite%mmsqu_ustar (ipa) = csite%mmsqu_ustar (ipa) & + + csite%dmean_ustar (ipa) & + * csite%dmean_ustar (ipa) & + * ndaysi + csite%mmsqu_carbon_ac (ipa) = csite%mmsqu_carbon_ac (ipa) & + + csite%dmean_carbon_ac (ipa) & + * csite%dmean_carbon_ac (ipa) & + * ndaysi + csite%mmsqu_carbon_st (ipa) = csite%mmsqu_carbon_st (ipa) & + + csite%dmean_carbon_st (ipa) & + * csite%dmean_carbon_st (ipa) & + * ndaysi + csite%mmsqu_vapor_gc (ipa) = csite%mmsqu_vapor_gc (ipa) & + + csite%dmean_vapor_gc (ipa) & + * csite%dmean_vapor_gc (ipa) & + * ndaysi + csite%mmsqu_vapor_ac (ipa) = csite%mmsqu_vapor_ac (ipa) & + + csite%dmean_vapor_ac (ipa) & + * csite%dmean_vapor_ac (ipa) & + * ndaysi + csite%mmsqu_sensible_gc (ipa) = csite%mmsqu_sensible_gc (ipa) & + + csite%dmean_sensible_gc (ipa) & + * csite%dmean_sensible_gc (ipa) & + * ndaysi + csite%mmsqu_sensible_ac (ipa) = csite%mmsqu_sensible_ac (ipa) & + + csite%dmean_sensible_ac (ipa) & + * csite%dmean_sensible_ac (ipa) & + * ndaysi + !------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------! + ! Patch loop. ! + !------------------------------------------------------------------------------! + cohortloop: do ico=1,cpatch%ncohorts !---------------------------------------------------------------------------! - ! The following variables are all converted to kgC/plant/yr. ! - !---------------------------------------------------------------------------! - cpatch%mmean_leaf_maintenance(ico) = cpatch%mmean_leaf_maintenance(ico) & - + cpatch%leaf_maintenance(ico) & - * yr_day - cpatch%mmean_root_maintenance(ico) = cpatch%mmean_root_maintenance(ico) & - + cpatch%root_maintenance(ico) & - * yr_day - cpatch%mmean_leaf_drop (ico) = cpatch%leaf_drop(ico) & - + cpatch%leaf_drop(ico) & - * yr_day - cpatch%mmean_growth_resp(ico) = cpatch%mmean_growth_resp(ico) & - + cpatch%growth_respiration(ico) & - * yr_day - cpatch%mmean_storage_resp(ico) = cpatch%mmean_storage_resp(ico) & - + cpatch%storage_respiration(ico) & - * yr_day - cpatch%mmean_vleaf_resp(ico) = cpatch%mmean_vleaf_resp(ico) & - + cpatch%vleaf_respiration(ico) & - * yr_day + ! Integrate the cohort-level variables that have no daily means ! + ! because their time step is one day. ! !---------------------------------------------------------------------------! - ! Light level, a simple average now. We currently ignore that different ! - ! days have different day light lenghts. ! + cpatch%mmean_lai (ico) = cpatch%mmean_lai (ico) & + + cpatch%lai (ico) & + * ndaysi + cpatch%mmean_bleaf (ico) = cpatch%mmean_bleaf (ico) & + + cpatch%bleaf (ico) & + * ndaysi + cpatch%mmean_bstorage (ico) = cpatch%mmean_bstorage (ico) & + + cpatch%bstorage (ico) & + * ndaysi + cpatch%mmean_mort_rate (:,ico) = cpatch%mmean_mort_rate (:,ico) & + + cpatch%mort_rate (:,ico) & + * ndaysi + cpatch%mmean_leaf_maintenance (ico) = cpatch%mmean_leaf_maintenance (ico) & + + cpatch%leaf_maintenance (ico) & + * ndaysi + cpatch%mmean_root_maintenance (ico) = cpatch%mmean_root_maintenance (ico) & + + cpatch%root_maintenance (ico) & + * ndaysi + cpatch%mmean_leaf_drop (ico) = cpatch%mmean_leaf_drop (ico) & + + cpatch%leaf_drop (ico) & + * ndaysi + cpatch%mmean_cb (ico) = cpatch%mmean_cb (ico) & + + ( cpatch%dmean_gpp (ico) & + - cpatch%dmean_plresp (ico) & + - cpatch%leaf_maintenance (ico) & + - cpatch%root_maintenance (ico) & + - cpatch%leaf_drop (ico) & + + cpatch%bstorage (ico) & + / yr_day ) & + * ndaysi !---------------------------------------------------------------------------! - cpatch%mmean_light_level(ico) = cpatch%mmean_light_level(ico) & - + cpatch%dmean_light_level(ico) - cpatch%mmean_light_level_beam(ico) = cpatch%mmean_light_level_beam(ico) & - + cpatch%dmean_light_level_beam(ico) - cpatch%mmean_light_level_diff(ico) = cpatch%mmean_light_level_diff(ico) & - + cpatch%dmean_light_level_diff(ico) - - !----- Mortality rates. ----------------------------------------------------! - do imt=1,n_mort - cpatch%mmean_mort_rate(imt,ico) = cpatch%mmean_mort_rate(imt,ico) & - + cpatch%mort_rate(imt,ico) - end do - end do cohort_loop - end do patch_loop - end do site_loop - end do poly_loop + + !---------------------------------------------------------------------------! + ! Integrate the other cohort-level variables. ! + !---------------------------------------------------------------------------! + cpatch%mmean_gpp (ico) = cpatch%mmean_gpp (ico) & + + cpatch%dmean_gpp (ico) & + * ndaysi + cpatch%mmean_npp (ico) = cpatch%mmean_npp (ico) & + + cpatch%dmean_npp (ico) & + * ndaysi + cpatch%mmean_leaf_resp (ico) = cpatch%mmean_leaf_resp (ico) & + + cpatch%dmean_leaf_resp (ico) & + * ndaysi + cpatch%mmean_root_resp (ico) = cpatch%mmean_root_resp (ico) & + + cpatch%dmean_root_resp (ico) & + * ndaysi + cpatch%mmean_growth_resp (ico) = cpatch%mmean_growth_resp (ico) & + + cpatch%dmean_growth_resp (ico) & + * ndaysi + cpatch%mmean_storage_resp (ico) = cpatch%mmean_storage_resp (ico) & + + cpatch%dmean_storage_resp (ico) & + * ndaysi + cpatch%mmean_vleaf_resp (ico) = cpatch%mmean_vleaf_resp (ico) & + + cpatch%dmean_vleaf_resp (ico) & + * ndaysi + cpatch%mmean_plresp (ico) = cpatch%mmean_plresp (ico) & + + cpatch%dmean_plresp (ico) & + * ndaysi + cpatch%mmean_leaf_energy (ico) = cpatch%mmean_leaf_energy (ico) & + + cpatch%dmean_leaf_energy (ico) & + * ndaysi + cpatch%mmean_leaf_water (ico) = cpatch%mmean_leaf_water (ico) & + + cpatch%dmean_leaf_water (ico) & + * ndaysi + cpatch%mmean_leaf_hcap (ico) = cpatch%mmean_leaf_hcap (ico) & + + cpatch%dmean_leaf_hcap (ico) & + * ndaysi + cpatch%mmean_leaf_vpdef (ico) = cpatch%mmean_leaf_vpdef (ico) & + + cpatch%dmean_leaf_vpdef (ico) & + * ndaysi + cpatch%mmean_leaf_temp (ico) = cpatch%mmean_leaf_temp (ico) & + + cpatch%dmean_leaf_temp (ico) & + * ndaysi + cpatch%mmean_leaf_fliq (ico) = cpatch%mmean_leaf_fliq (ico) & + + cpatch%dmean_leaf_fliq (ico) & + * ndaysi + cpatch%mmean_leaf_gsw (ico) = cpatch%mmean_leaf_gsw (ico) & + + cpatch%dmean_leaf_gsw (ico) & + * ndaysi + cpatch%mmean_leaf_gbw (ico) = cpatch%mmean_leaf_gbw (ico) & + + cpatch%dmean_leaf_gbw (ico) & + * ndaysi + cpatch%mmean_wood_energy (ico) = cpatch%mmean_wood_energy (ico) & + + cpatch%dmean_wood_energy (ico) & + * ndaysi + cpatch%mmean_wood_water (ico) = cpatch%mmean_wood_water (ico) & + + cpatch%dmean_wood_water (ico) & + * ndaysi + cpatch%mmean_wood_hcap (ico) = cpatch%mmean_wood_hcap (ico) & + + cpatch%dmean_wood_hcap (ico) & + * ndaysi + cpatch%mmean_wood_temp (ico) = cpatch%mmean_wood_temp (ico) & + + cpatch%dmean_wood_temp (ico) & + * ndaysi + cpatch%mmean_wood_fliq (ico) = cpatch%mmean_wood_fliq (ico) & + + cpatch%dmean_wood_fliq (ico) & + * ndaysi + cpatch%mmean_wood_gbw (ico) = cpatch%mmean_wood_gbw (ico) & + + cpatch%dmean_wood_gbw (ico) & + * ndaysi + cpatch%mmean_fs_open (ico) = cpatch%mmean_fs_open (ico) & + + cpatch%dmean_fs_open (ico) & + * ndaysi + cpatch%mmean_fsw (ico) = cpatch%mmean_fsw (ico) & + + cpatch%dmean_fsw (ico) & + * ndaysi + cpatch%mmean_fsn (ico) = cpatch%mmean_fsn (ico) & + + cpatch%dmean_fsn (ico) & + * ndaysi + cpatch%mmean_psi_open (ico) = cpatch%mmean_psi_open (ico) & + + cpatch%dmean_psi_open (ico) & + * ndaysi + cpatch%mmean_psi_closed (ico) = cpatch%mmean_psi_closed (ico) & + + cpatch%dmean_psi_closed (ico) & + * ndaysi + cpatch%mmean_water_supply (ico) = cpatch%mmean_water_supply (ico) & + + cpatch%dmean_water_supply (ico) & + * ndaysi + cpatch%mmean_light_level (ico) = cpatch%mmean_light_level (ico) & + + cpatch%dmean_light_level (ico) & + * ndaysi + cpatch%mmean_light_level_beam (ico) = cpatch%mmean_light_level_beam (ico) & + + cpatch%dmean_light_level_beam (ico) & + * ndaysi + cpatch%mmean_light_level_diff (ico) = cpatch%mmean_light_level_diff (ico) & + + cpatch%dmean_light_level_diff (ico) & + * ndaysi + cpatch%mmean_par_l (ico) = cpatch%mmean_par_l (ico) & + + cpatch%dmean_par_l (ico) & + * ndaysi + cpatch%mmean_par_l_beam (ico) = cpatch%mmean_par_l_beam (ico) & + + cpatch%dmean_par_l_beam (ico) & + * ndaysi + cpatch%mmean_par_l_diff (ico) = cpatch%mmean_par_l_diff (ico) & + + cpatch%dmean_par_l_diff (ico) & + * ndaysi + cpatch%mmean_rshort_l (ico) = cpatch%mmean_rshort_l (ico) & + + cpatch%dmean_rshort_l (ico) & + * ndaysi + cpatch%mmean_rlong_l (ico) = cpatch%mmean_rlong_l (ico) & + + cpatch%dmean_rlong_l (ico) & + * ndaysi + cpatch%mmean_sensible_lc (ico) = cpatch%mmean_sensible_lc (ico) & + + cpatch%dmean_sensible_lc (ico) & + * ndaysi + cpatch%mmean_vapor_lc (ico) = cpatch%mmean_vapor_lc (ico) & + + cpatch%dmean_vapor_lc (ico) & + * ndaysi + cpatch%mmean_transp (ico) = cpatch%mmean_transp (ico) & + + cpatch%dmean_transp (ico) & + * ndaysi + cpatch%mmean_intercepted_al (ico) = cpatch%mmean_intercepted_al (ico) & + + cpatch%dmean_intercepted_al (ico) & + * ndaysi + cpatch%mmean_wshed_lg (ico) = cpatch%mmean_wshed_lg (ico) & + + cpatch%dmean_wshed_lg (ico) & + * ndaysi + cpatch%mmean_rshort_w (ico) = cpatch%mmean_rshort_w (ico) & + + cpatch%dmean_rshort_w (ico) & + * ndaysi + cpatch%mmean_rlong_w (ico) = cpatch%mmean_rlong_w (ico) & + + cpatch%dmean_rlong_w (ico) & + * ndaysi + cpatch%mmean_sensible_wc (ico) = cpatch%mmean_sensible_wc (ico) & + + cpatch%dmean_sensible_wc (ico) & + * ndaysi + cpatch%mmean_vapor_wc (ico) = cpatch%mmean_vapor_wc (ico) & + + cpatch%dmean_vapor_wc (ico) & + * ndaysi + cpatch%mmean_intercepted_aw (ico) = cpatch%mmean_intercepted_aw (ico) & + + cpatch%dmean_intercepted_aw (ico) & + * ndaysi + cpatch%mmean_wshed_wg (ico) = cpatch%mmean_wshed_wg (ico) & + + cpatch%dmean_wshed_wg (ico) & + * ndaysi + cpatch%mmean_nppleaf (ico) = cpatch%mmean_nppleaf (ico) & + + cpatch%dmean_nppleaf (ico) & + * ndaysi + cpatch%mmean_nppfroot (ico) = cpatch%mmean_nppfroot (ico) & + + cpatch%dmean_nppfroot (ico) & + * ndaysi + cpatch%mmean_nppsapwood (ico) = cpatch%mmean_nppsapwood (ico) & + + cpatch%dmean_nppsapwood (ico) & + * ndaysi + cpatch%mmean_nppcroot (ico) = cpatch%mmean_nppcroot (ico) & + + cpatch%dmean_nppcroot (ico) & + * ndaysi + cpatch%mmean_nppseeds (ico) = cpatch%mmean_nppseeds (ico) & + + cpatch%dmean_nppseeds (ico) & + * ndaysi + cpatch%mmean_nppwood (ico) = cpatch%mmean_nppwood (ico) & + + cpatch%dmean_nppwood (ico) & + * ndaysi + cpatch%mmean_nppdaily (ico) = cpatch%mmean_nppdaily (ico) & + + cpatch%dmean_nppdaily (ico) & + * ndaysi + cpatch%mmsqu_gpp (ico) = cpatch%mmsqu_gpp (ico) & + + cpatch%dmean_gpp (ico) & + * cpatch%dmean_gpp (ico) & + * ndaysi + cpatch%mmsqu_npp (ico) = cpatch%mmsqu_npp (ico) & + + cpatch%dmean_npp (ico) & + * cpatch%dmean_npp (ico) & + * ndaysi + cpatch%mmsqu_plresp (ico) = cpatch%mmsqu_plresp (ico) & + + cpatch%dmean_plresp (ico) & + * cpatch%dmean_plresp (ico) & + * ndaysi + cpatch%mmsqu_sensible_lc (ico) = cpatch%mmsqu_sensible_lc (ico) & + + cpatch%dmean_sensible_lc (ico) & + * cpatch%dmean_sensible_lc (ico) & + * ndaysi + cpatch%mmsqu_vapor_lc (ico) = cpatch%mmsqu_vapor_lc (ico) & + + cpatch%dmean_vapor_lc (ico) & + * cpatch%dmean_vapor_lc (ico) & + * ndaysi + cpatch%mmsqu_transp (ico) = cpatch%mmsqu_transp (ico) & + + cpatch%dmean_transp (ico) & + * cpatch%dmean_transp (ico) & + * ndaysi + cpatch%mmsqu_sensible_wc (ico) = cpatch%mmsqu_sensible_wc (ico) & + + cpatch%dmean_sensible_wc (ico) & + * cpatch%dmean_sensible_wc (ico) & + * ndaysi + cpatch%mmsqu_vapor_wc (ico) = cpatch%mmsqu_vapor_wc (ico) & + + cpatch%dmean_vapor_wc (ico) & + * cpatch%dmean_vapor_wc (ico) & + * ndaysi + !---------------------------------------------------------------------------! + end do cohortloop + !------------------------------------------------------------------------------! + end do patchloop + !---------------------------------------------------------------------------------! + end do siteloop + !------------------------------------------------------------------------------------! + end do polyloop + !---------------------------------------------------------------------------------------! return -end subroutine integrate_ed_monthly_output_vars +end subroutine integrate_ed_mmean_vars !==========================================================================================! !==========================================================================================! @@ -3444,39 +3842,26 @@ end subroutine integrate_ed_monthly_output_vars !==========================================================================================! !==========================================================================================! -! This subroutine normalize the sum before writing the mobthly analysis. It also ! -! computes some of the variables that didn't need to be computed every day, like AGB. ! +! This subroutine normalises the daily mean variables of those variables that could not ! +! be integrated directly. This includes temperatures, liquid fraction, and soil matric ! +! potential. ! !------------------------------------------------------------------------------------------! -subroutine normalize_ed_monthly_output_vars(cgrid) - use ed_state_vars , only : edtype & ! structure - , polygontype & ! structure - , sitetype & ! structure - , patchtype ! ! structure - use ed_misc_coms , only : current_time & ! intent(in) - , simtime & ! intent(in) - , ddbhi & ! intent(in) - , dagei & ! intent(in) - , iqoutput & ! intent(in) - , dtlsm & ! intent(in) - , frqfast & ! intent(in) - , ndcycle ! ! intent(in) - use ed_max_dims , only : n_pft & ! intent(in) - , n_dbh & ! intent(in) - , n_age & ! intent(in) - , n_dist_types & ! intent(in) - , n_mort ! ! intent(in) - use consts_coms , only : pio4 & ! intent(in) - , umol_2_kgC & ! intent(in) - , umols_2_kgCyr & ! intent(in) - , day_sec & ! intent(in) - , yr_day ! ! intent(in) - use pft_coms , only : init_density ! ! intent(in) - use therm_lib , only : press2exner & ! function - , extheta2temp & ! function - , idealdenssh & ! function - , uextcm2tl ! ! function - use allometry , only : ed_biomass ! ! function - +subroutine normalize_ed_mmean_vars(cgrid) + use ed_state_vars , only : edtype & ! structure + , polygontype & ! structure + , sitetype & ! structure + , patchtype ! ! structure + use grid_coms , only : nzg ! ! intent(in) + use ed_misc_coms , only : dtlsm ! ! intent(in) + use therm_lib , only : press2exner & ! function + , extheta2temp & ! function + , uextcm2tl & ! subroutine + , uint2tl & ! subroutine + , idealdenssh ! ! function + use soil_coms , only : tiny_sfcwater_mass & ! intent(in) + , soil ! ! intent(in) + use consts_coms , only : t00 & ! intent(in) + , wdns ! ! intent(in) implicit none !----- Arguments. ----------------------------------------------------------------------! type(edtype) , target :: cgrid @@ -3484,788 +3869,2058 @@ subroutine normalize_ed_monthly_output_vars(cgrid) type(polygontype) , pointer :: cpoly type(sitetype) , pointer :: csite type(patchtype) , pointer :: cpatch - type(simtime) :: lastmonth - real :: ndaysi - real :: poly_area_i - real :: forest_area_i - real :: site_area_i - real, dimension(n_pft) :: pss_bseeds_pft - real, dimension(n_pft) :: sss_bseeds_pft - real, dimension(n_pft,n_dbh) :: pss_bseeds - real, dimension(n_pft,n_dbh) :: pss_pldens - real :: sss_rh - real :: sss_cwd_rh - real :: sss_fsw - real :: sss_fsn - real :: sss_fs_open - real :: pss_fsw - real :: pss_fsn - real :: pss_fs_open - real :: patch_laiall_i - integer :: lmon + real , dimension(nzg) :: cgrid_mmean_soil_hcap integer :: ipy integer :: isi integer :: ipa integer :: ico - integer :: imt - integer :: t - integer :: ipft - integer :: idbh - integer :: iage - integer :: ilu - integer :: jlu - logical :: any_resolvable - logical :: forest - real :: veg_fliq - real :: cohort_seeds - real :: mmean_can_exner - real :: qmean_can_exner - !----- Locally saved variables. --------------------------------------------------------! - logical , save :: find_factors = .true. - real , save :: dtlsm_o_frqfast = 1.e34 - !---------------------------------------------------------------------------------------! - - - - !----- Compute the normalisation factors. This is done once. --------------------------! - if (find_factors) then - dtlsm_o_frqfast = dtlsm / frqfast - find_factors = .false. - end if + integer :: k + integer :: nsoil + real :: can_exner + real :: atm_exner + real :: site_area_i + real :: poly_area_i + real :: site_wgt + real :: patch_wgt !---------------------------------------------------------------------------------------! - !---------------------------------------------------------------------------------------! - ! Finding the inverse of number of days used for this monthly integral. ! + ! Loop over polygons. ! !---------------------------------------------------------------------------------------! - call lastmonthdate(current_time,lastmonth,ndaysi) - lmon = lastmonth%month - polyloop: do ipy=1,cgrid%npolygons cpoly => cgrid%polygon(ipy) + + + !----- Inverse of this polygon area (it should be always 1.) ------------------------! + poly_area_i = 1./sum(cpoly%area) + !------------------------------------------------------------------------------------! + + + !----- Re-set some support variables. -----------------------------------------------! + cgrid_mmean_soil_hcap(:) = 0.0 + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + ! Loop over sites. ! !------------------------------------------------------------------------------------! - ! First normalize the variables previously defined. ! + siteloop: do isi=1,cpoly%nsites + csite => cpoly%site(isi) + + !----- Inverse of this site area (it should be always 1.) ------------------------! + site_area_i = 1./sum(csite%area) + !---------------------------------------------------------------------------------! + + + !----- Site weight. --------------------------------------------------------------! + site_wgt = cpoly%area(isi) * poly_area_i + !---------------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------------! + ! Find the derived properties for the air above canopy. ! + !---------------------------------------------------------------------------------! + atm_exner = press2exner (cpoly%mmean_atm_prss(isi)) + cpoly%mmean_atm_temp(isi) = extheta2temp(atm_exner,cpoly%mmean_atm_theta(isi)) + cpoly%mmean_atm_rhos(isi) = idealdenssh ( cpoly%mmean_atm_prss (isi) & + , cpoly%mmean_atm_temp (isi) & + , cpoly%mmean_atm_shv (isi) ) + !---------------------------------------------------------------------------------! + + + !---------------------------------------------------------------------------------! + ! Loop over patches. ! + !---------------------------------------------------------------------------------! + patchloop: do ipa=1,csite%npatches + cpatch => csite%patch(ipa) + + + !----- Site weight. -----------------------------------------------------------! + patch_wgt = csite%area(ipa) * site_area_i * site_wgt + !------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------! + ! Now we find the derived properties for the canopy air space. ! + !------------------------------------------------------------------------------! + can_exner = press2exner (csite%mmean_can_prss(ipa)) + csite%mmean_can_temp(ipa) = extheta2temp(can_exner,csite%mmean_can_theta(ipa)) + csite%mmean_can_rhos(ipa) = idealdenssh ( csite%mmean_can_prss (ipa) & + , csite%mmean_can_temp (ipa) & + , csite%mmean_can_shv (ipa) ) + !------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------! + ! Soil matric potential, temperature, and liquid water. ! + !------------------------------------------------------------------------------! + do k=1,nzg + nsoil = cpoly%ntext_soil(k,isi) + call uextcm2tl( csite%mmean_soil_energy(k,ipa) & + , csite%mmean_soil_water (k,ipa) * wdns & + , soil(nsoil)%slcpd & + , csite%mmean_soil_temp (k,ipa) & + , csite%mmean_soil_fliq (k,ipa)) + + cgrid_mmean_soil_hcap (k) = cgrid_mmean_soil_hcap(k) & + + soil(nsoil)%slcpd * patch_wgt + !---------------------------------------------------------------------------! + + end do + !------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------! + ! If the patch had some temporary snow/pounding layer, convert the mean ! + ! energy to J/kg, then find the mean temperature and liquid fraction. Other- ! + ! wise, set them to either zero or default values. ! + !------------------------------------------------------------------------------! + if (csite%mmean_sfcw_mass(ipa) > tiny_sfcwater_mass) then + csite%mmean_sfcw_energy(ipa) = csite%mmean_sfcw_energy(ipa) & + / csite%mmean_sfcw_mass (ipa) + call uint2tl( csite%mmean_sfcw_energy(ipa), csite%mmean_sfcw_temp(ipa) & + , csite%mmean_sfcw_fliq (ipa)) + else + csite%mmean_sfcw_mass (ipa) = 0. + csite%mmean_sfcw_depth (ipa) = 0. + csite%mmean_sfcw_energy(ipa) = 0. + csite%mmean_sfcw_temp (ipa) = csite%mmean_soil_temp(nzg,ipa) + csite%mmean_sfcw_fliq (ipa) = csite%mmean_soil_fliq(nzg,ipa) + end if + !------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------! + ! Loop over the cohorts. ! + !------------------------------------------------------------------------------! + cohortloop: do ico=1,cpatch%ncohorts + + + + !---------------------------------------------------------------------------! + ! Find the vegetation temperature and liquid fraction. ! + !---------------------------------------------------------------------------! + !----- Leaf. ---------------------------------------------------------------! + if (cpatch%mmean_leaf_hcap(ico) > 0.) then + call uextcm2tl( cpatch%mmean_leaf_energy(ico) & + , cpatch%mmean_leaf_water (ico) & + , cpatch%mmean_leaf_hcap (ico) & + , cpatch%mmean_leaf_temp (ico) & + , cpatch%mmean_leaf_fliq (ico) ) + else + cpatch%mmean_leaf_vpdef(ico) = csite%mmean_can_vpdef(ipa) + cpatch%mmean_leaf_temp (ico) = csite%mmean_can_temp (ipa) + if (csite%mmean_can_temp(ipa) > t00) then + cpatch%mmean_leaf_fliq(ico) = 1.0 + elseif (csite%mmean_can_temp(ipa) == t00) then + cpatch%mmean_leaf_fliq(ico) = 0.5 + else + cpatch%mmean_leaf_fliq(ico) = 0.0 + end if + end if + !----- Wood. ---------------------------------------------------------------! + if (cpatch%mmean_wood_hcap(ico) > 0.) then + call uextcm2tl( cpatch%mmean_wood_energy(ico) & + , cpatch%mmean_wood_water (ico) & + , cpatch%mmean_wood_hcap (ico) & + , cpatch%mmean_wood_temp (ico) & + , cpatch%mmean_wood_fliq (ico) ) + else + cpatch%mmean_wood_temp(ico) = csite%mmean_can_temp(ipa) + if (csite%mmean_can_temp(ipa) > t00) then + cpatch%mmean_wood_fliq(ico) = 1.0 + elseif (csite%mmean_can_temp(ipa) == t00) then + cpatch%mmean_wood_fliq(ico) = 0.5 + else + cpatch%mmean_wood_fliq(ico) = 0.0 + end if + end if + !---------------------------------------------------------------------------! + end do cohortloop + !------------------------------------------------------------------------------! + end do patchloop + !---------------------------------------------------------------------------------! + end do siteloop !------------------------------------------------------------------------------------! - cgrid%mmean_fs_open (ipy) = cgrid%mmean_fs_open (ipy) * ndaysi - cgrid%mmean_fsw (ipy) = cgrid%mmean_fsw (ipy) * ndaysi - cgrid%mmean_fsn (ipy) = cgrid%mmean_fsn (ipy) * ndaysi - cgrid%mmean_gpp (ipy) = cgrid%mmean_gpp (ipy) * ndaysi - cgrid%mmean_nppleaf (ipy) = cgrid%mmean_nppleaf (ipy) * ndaysi - cgrid%mmean_nppfroot (ipy) = cgrid%mmean_nppfroot (ipy) * ndaysi - cgrid%mmean_nppsapwood (ipy) = cgrid%mmean_nppsapwood (ipy) * ndaysi - cgrid%mmean_nppcroot (ipy) = cgrid%mmean_nppcroot (ipy) * ndaysi - cgrid%mmean_nppseeds (ipy) = cgrid%mmean_nppseeds (ipy) * ndaysi - cgrid%mmean_nppwood (ipy) = cgrid%mmean_nppwood (ipy) * ndaysi - cgrid%mmean_nppdaily (ipy) = cgrid%mmean_nppdaily (ipy) * ndaysi - cgrid%mmean_evap (ipy) = cgrid%mmean_evap (ipy) * ndaysi - cgrid%mmean_transp (ipy) = cgrid%mmean_transp (ipy) * ndaysi - cgrid%mmean_vapor_ac (ipy) = cgrid%mmean_vapor_ac (ipy) * ndaysi - cgrid%mmean_vapor_gc (ipy) = cgrid%mmean_vapor_gc (ipy) * ndaysi - cgrid%mmean_vapor_lc (ipy) = cgrid%mmean_vapor_lc (ipy) * ndaysi - cgrid%mmean_vapor_wc (ipy) = cgrid%mmean_vapor_wc (ipy) * ndaysi - cgrid%mmean_sensible_ac (ipy) = cgrid%mmean_sensible_ac (ipy) * ndaysi - cgrid%mmean_sensible_gc (ipy) = cgrid%mmean_sensible_gc (ipy) * ndaysi - cgrid%mmean_sensible_lc (ipy) = cgrid%mmean_sensible_lc (ipy) * ndaysi - cgrid%mmean_sensible_wc (ipy) = cgrid%mmean_sensible_wc (ipy) * ndaysi - cgrid%mmean_rshort_gnd (ipy) = cgrid%mmean_rshort_gnd (ipy) * ndaysi - cgrid%mmean_par_gnd (ipy) = cgrid%mmean_par_gnd (ipy) * ndaysi - cgrid%mmean_rlong_gnd (ipy) = cgrid%mmean_rlong_gnd (ipy) * ndaysi - cgrid%mmean_rlongup (ipy) = cgrid%mmean_rlongup (ipy) * ndaysi - cgrid%mmean_parup (ipy) = cgrid%mmean_parup (ipy) * ndaysi - cgrid%mmean_nirup (ipy) = cgrid%mmean_nirup (ipy) * ndaysi - cgrid%mmean_rshortup (ipy) = cgrid%mmean_rshortup (ipy) * ndaysi - cgrid%mmean_rnet (ipy) = cgrid%mmean_rnet (ipy) * ndaysi - cgrid%mmean_rlong_albedo (ipy) = cgrid%mmean_rlong_albedo (ipy) * ndaysi - cgrid%mmean_albedo (ipy) = cgrid%mmean_albedo (ipy) * ndaysi - cgrid%mmean_albedo_beam (ipy) = cgrid%mmean_albedo_beam (ipy) * ndaysi - cgrid%mmean_albedo_diffuse (ipy) = cgrid%mmean_albedo_diffuse (ipy) * ndaysi - cgrid%mmean_ustar (ipy) = cgrid%mmean_ustar (ipy) * ndaysi - cgrid%mmean_tstar (ipy) = cgrid%mmean_tstar (ipy) * ndaysi - cgrid%mmean_qstar (ipy) = cgrid%mmean_qstar (ipy) * ndaysi - cgrid%mmean_cstar (ipy) = cgrid%mmean_cstar (ipy) * ndaysi - cgrid%mmean_carbon_ac (ipy) = cgrid%mmean_carbon_ac (ipy) * ndaysi - cgrid%mmean_carbon_st (ipy) = cgrid%mmean_carbon_st (ipy) * ndaysi - cgrid%mmean_nep (ipy) = cgrid%mmean_nep (ipy) * ndaysi - cgrid%mmean_plresp (ipy) = cgrid%mmean_plresp (ipy) * ndaysi - cgrid%mmean_rh (ipy) = cgrid%mmean_rh (ipy) * ndaysi - cgrid%mmean_cwd_rh (ipy) = cgrid%mmean_cwd_rh (ipy) * ndaysi - cgrid%mmean_leaf_resp (ipy) = cgrid%mmean_leaf_resp (ipy) * ndaysi - cgrid%mmean_root_resp (ipy) = cgrid%mmean_root_resp (ipy) * ndaysi - cgrid%mmean_growth_resp (ipy) = cgrid%mmean_growth_resp (ipy) * ndaysi - cgrid%mmean_storage_resp (ipy) = cgrid%mmean_storage_resp (ipy) * ndaysi - cgrid%mmean_vleaf_resp (ipy) = cgrid%mmean_vleaf_resp (ipy) * ndaysi - cgrid%mmean_soil_temp (:,ipy) = cgrid%mmean_soil_temp (:,ipy) * ndaysi - cgrid%mmean_soil_water (:,ipy) = cgrid%mmean_soil_water (:,ipy) * ndaysi - cgrid%mmean_soil_mstpot (:,ipy) = cgrid%mmean_soil_mstpot (:,ipy) * ndaysi - cgrid%mmean_transloss (:,ipy) = cgrid%mmean_transloss (:,ipy) * ndaysi - cgrid%mmean_gpp_dbh (:,ipy) = cgrid%mmean_gpp_dbh (:,ipy) * ndaysi - cgrid%mmean_leaf_energy (ipy) = cgrid%mmean_leaf_energy (ipy) * ndaysi - cgrid%mmean_leaf_hcap (ipy) = cgrid%mmean_leaf_hcap (ipy) * ndaysi - cgrid%mmean_leaf_water (ipy) = cgrid%mmean_leaf_water (ipy) * ndaysi - cgrid%mmean_leaf_vpdef (ipy) = cgrid%mmean_leaf_vpdef (ipy) * ndaysi - cgrid%mmean_wood_energy (ipy) = cgrid%mmean_wood_energy (ipy) * ndaysi - cgrid%mmean_wood_hcap (ipy) = cgrid%mmean_wood_hcap (ipy) * ndaysi - cgrid%mmean_wood_water (ipy) = cgrid%mmean_wood_water (ipy) * ndaysi - cgrid%mmean_can_theta (ipy) = cgrid%mmean_can_theta (ipy) * ndaysi - cgrid%mmean_can_theiv (ipy) = cgrid%mmean_can_theiv (ipy) * ndaysi - cgrid%mmean_can_vpdef (ipy) = cgrid%mmean_can_vpdef (ipy) * ndaysi - cgrid%mmean_can_shv (ipy) = cgrid%mmean_can_shv (ipy) * ndaysi - cgrid%mmean_can_co2 (ipy) = cgrid%mmean_can_co2 (ipy) * ndaysi - cgrid%mmean_can_prss (ipy) = cgrid%mmean_can_prss (ipy) * ndaysi - cgrid%mmean_gnd_temp (ipy) = cgrid%mmean_gnd_temp (ipy) * ndaysi - cgrid%mmean_gnd_shv (ipy) = cgrid%mmean_gnd_shv (ipy) * ndaysi - cgrid%mmean_atm_temp (ipy) = cgrid%mmean_atm_temp (ipy) * ndaysi - cgrid%mmean_atm_vpdef (ipy) = cgrid%mmean_atm_vpdef (ipy) * ndaysi - cgrid%mmean_rshort (ipy) = cgrid%mmean_rshort (ipy) * ndaysi - cgrid%mmean_rshort_diff (ipy) = cgrid%mmean_rshort_diff (ipy) * ndaysi - cgrid%mmean_par (ipy) = cgrid%mmean_par (ipy) * ndaysi - cgrid%mmean_par_diff (ipy) = cgrid%mmean_par_diff (ipy) * ndaysi - cgrid%mmean_rlong (ipy) = cgrid%mmean_rlong (ipy) * ndaysi - cgrid%mmean_atm_shv (ipy) = cgrid%mmean_atm_shv (ipy) * ndaysi - cgrid%mmean_atm_co2 (ipy) = cgrid%mmean_atm_co2 (ipy) * ndaysi - cgrid%mmean_atm_prss (ipy) = cgrid%mmean_atm_prss (ipy) * ndaysi - cgrid%mmean_atm_vels (ipy) = cgrid%mmean_atm_vels (ipy) * ndaysi - cgrid%mmean_pcpg (ipy) = cgrid%mmean_pcpg (ipy) * ndaysi - cgrid%mmean_runoff (ipy) = cgrid%mmean_runoff (ipy) * ndaysi - cgrid%mmean_drainage (ipy) = cgrid%mmean_drainage (ipy) * ndaysi - cgrid%mmean_lai_pft (:,ipy) = cgrid%mmean_lai_pft (:,ipy) * ndaysi - cgrid%mmean_wai_pft (:,ipy) = cgrid%mmean_wai_pft (:,ipy) * ndaysi - - cgrid%mmean_co2_residual(ipy) = cgrid%mmean_co2_residual(ipy) * ndaysi - cgrid%mmean_energy_residual(ipy) = cgrid%mmean_energy_residual(ipy) * ndaysi - cgrid%mmean_water_residual(ipy) = cgrid%mmean_water_residual(ipy) * ndaysi + + + + + !------------------------------------------------------------------------------------! - ! Here we normalise the sum of squares, so it is becomes the mean. In case you ! - ! want to find the standard deviation, you may want to use the following equation: ! - ! X = variable. ! - ! Xm = monthly mean of the variable. ! - ! Xmsq = monthly mean of the sum of the squares of this variable. ! - ! ! - ! __________________ ________________ ! - ! / SUM_i[X_i - Xm]² / (Xmsq - Xm²) ! - ! sigma = \ / ---------------- = \ / --------------- ! - ! \/ N - 1 \/ 1 - 1/N ! - ! ! + ! Find the derived properties for the air above canopy. ! !------------------------------------------------------------------------------------! - cgrid%mmsqu_gpp (ipy) = cgrid%mmsqu_gpp (ipy) * ndaysi - cgrid%mmsqu_leaf_resp (ipy) = cgrid%mmsqu_leaf_resp (ipy) * ndaysi - cgrid%mmsqu_root_resp (ipy) = cgrid%mmsqu_root_resp (ipy) * ndaysi - cgrid%mmsqu_plresp (ipy) = cgrid%mmsqu_plresp (ipy) * ndaysi - cgrid%mmsqu_carbon_ac (ipy) = cgrid%mmsqu_carbon_ac (ipy) * ndaysi - cgrid%mmsqu_carbon_st (ipy) = cgrid%mmsqu_carbon_st (ipy) * ndaysi - cgrid%mmsqu_nep (ipy) = cgrid%mmsqu_nep (ipy) * ndaysi - cgrid%mmsqu_rh (ipy) = cgrid%mmsqu_rh (ipy) * ndaysi - cgrid%mmsqu_cwd_rh (ipy) = cgrid%mmsqu_cwd_rh (ipy) * ndaysi - cgrid%mmsqu_sensible_ac (ipy) = cgrid%mmsqu_sensible_ac (ipy) * ndaysi - cgrid%mmsqu_sensible_lc (ipy) = cgrid%mmsqu_sensible_lc (ipy) * ndaysi - cgrid%mmsqu_sensible_wc (ipy) = cgrid%mmsqu_sensible_wc (ipy) * ndaysi - cgrid%mmsqu_sensible_gc (ipy) = cgrid%mmsqu_sensible_gc (ipy) * ndaysi - cgrid%mmsqu_evap (ipy) = cgrid%mmsqu_evap (ipy) * ndaysi - cgrid%mmsqu_transp (ipy) = cgrid%mmsqu_transp (ipy) * ndaysi - cgrid%mmsqu_vapor_ac (ipy) = cgrid%mmsqu_vapor_ac (ipy) * ndaysi - cgrid%mmsqu_vapor_lc (ipy) = cgrid%mmsqu_vapor_lc (ipy) * ndaysi - cgrid%mmsqu_vapor_wc (ipy) = cgrid%mmsqu_vapor_wc (ipy) * ndaysi - cgrid%mmsqu_vapor_gc (ipy) = cgrid%mmsqu_vapor_gc (ipy) * ndaysi - cgrid%mmsqu_ustar (ipy) = cgrid%mmsqu_ustar (ipy) * ndaysi - cgrid%mmsqu_rlongup (ipy) = cgrid%mmsqu_rlongup (ipy) * ndaysi - cgrid%mmsqu_parup (ipy) = cgrid%mmsqu_parup (ipy) * ndaysi - cgrid%mmsqu_nirup (ipy) = cgrid%mmsqu_nirup (ipy) * ndaysi - cgrid%mmsqu_rshortup (ipy) = cgrid%mmsqu_rshortup (ipy) * ndaysi - cgrid%mmsqu_rnet (ipy) = cgrid%mmsqu_rnet (ipy) * ndaysi - cgrid%mmsqu_albedo (ipy) = cgrid%mmsqu_albedo (ipy) * ndaysi + atm_exner = press2exner (cgrid%mmean_atm_prss(ipy)) + cgrid%mmean_atm_temp(ipy) = extheta2temp(atm_exner,cgrid%mmean_atm_theta(ipy)) + cgrid%mmean_atm_rhos(ipy) = idealdenssh ( cgrid%mmean_atm_prss (ipy) & + , cgrid%mmean_atm_temp (ipy) & + , cgrid%mmean_atm_shv (ipy) ) !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! - ! Mean canopy air properties. ! + ! Find the derived properties for the canopy air space. ! !------------------------------------------------------------------------------------! - mmean_can_exner = press2exner(cgrid%mmean_can_prss(ipy)) - cgrid%mmean_can_temp (ipy) = extheta2temp( mmean_can_exner & - , cgrid%mmean_can_theta(ipy) ) - cgrid%mmean_can_rhos (ipy) = idealdenssh (cgrid%mmean_can_prss(ipy) & - ,cgrid%mmean_can_temp(ipy) & - ,cgrid%mmean_can_shv (ipy) ) + can_exner = press2exner (cgrid%mmean_can_prss(ipy)) + cgrid%mmean_can_temp(ipy) = extheta2temp(can_exner,cgrid%mmean_can_theta(ipy)) + cgrid%mmean_can_rhos(ipy) = idealdenssh ( cgrid%mmean_can_prss (ipy) & + , cgrid%mmean_can_temp (ipy) & + , cgrid%mmean_can_shv (ipy) ) !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! - ! Find the average leaf and stem temperatures. These are calculated only when ! - ! there is some heat storage. ! + ! If the patch had some temporary snow/pounding layer, convert the mean energy to ! + ! J/kg, then find the mean temperature and liquid fraction. Otherwise, set them to ! + ! either zero or default values. ! !------------------------------------------------------------------------------------! - if (cgrid%mmean_leaf_hcap(ipy) > 0.) then - call uextcm2tl(cgrid%mmean_leaf_energy(ipy),cgrid%mmean_leaf_water(ipy) & - ,cgrid%mmean_leaf_hcap(ipy),cgrid%mmean_leaf_temp(ipy),veg_fliq) - else - cgrid%mmean_leaf_temp(ipy) = cgrid%mmean_can_temp(ipy) - end if - if (cgrid%mmean_wood_hcap(ipy) > 0.) then - call uextcm2tl(cgrid%mmean_wood_energy(ipy),cgrid%mmean_wood_water(ipy) & - ,cgrid%mmean_wood_hcap(ipy),cgrid%mmean_wood_temp(ipy),veg_fliq) + if (cgrid%mmean_sfcw_mass(ipy) > tiny_sfcwater_mass) then + cgrid%mmean_sfcw_energy(ipy) = cgrid%mmean_sfcw_energy(ipy) & + / cgrid%mmean_sfcw_mass(ipy) + call uint2tl(cgrid%mmean_sfcw_energy(ipy),cgrid%mmean_sfcw_temp(ipy) & + ,cgrid%mmean_sfcw_fliq(ipy)) else - cgrid%mmean_wood_temp(ipy) = cgrid%mmean_can_temp(ipy) + cgrid%mmean_sfcw_mass (ipy) = 0. + cgrid%mmean_sfcw_depth (ipy) = 0. + cgrid%mmean_sfcw_energy(ipy) = 0. + cgrid%mmean_sfcw_temp (ipy) = cgrid%mmean_soil_temp(nzg,ipy) + cgrid%mmean_sfcw_fliq (ipy) = cgrid%mmean_soil_fliq(nzg,ipy) end if !------------------------------------------------------------------------------------! - !---- Find AGB and basal area per PFT -----------------------------------------------! - poly_area_i = 1./sum(cpoly%area) - do ipft = 1,n_pft - do idbh =1,n_dbh - cgrid%agb_pft(ipft,ipy) = cgrid%agb_pft(ipft,ipy) & - + sum(cpoly%agb(ipft,idbh,:)*cpoly%area)*poly_area_i - cgrid%ba_pft(ipft,ipy) = cgrid%ba_pft(ipft,ipy) & - + sum(cpoly%basal_area(ipft,idbh,:)*cpoly%area) & - * poly_area_i - end do + !------------------------------------------------------------------------------------! + ! Find the temperature and the fraction of liquid water. ! + !------------------------------------------------------------------------------------! + do k=1,nzg + call uextcm2tl(cgrid%mmean_soil_energy(k,ipy),cgrid%mmean_soil_water(k,ipy)*wdns & + ,cgrid_mmean_soil_hcap (k) ,cgrid%mmean_soil_temp (k,ipy) & + ,cgrid%mmean_soil_fliq (k,ipy)) end do + !------------------------------------------------------------------------------------! - !----- Finding disturbance rates per source and target land use types. --------------! - do ilu = 1,n_dist_types - do jlu = 1,n_dist_types - cgrid%disturbance_rates(ilu,jlu,ipy) = cgrid%disturbance_rates(ilu,jlu,ipy) & - + sum( cpoly%disturbance_rates(ilu,jlu,:) & - * cpoly%area) & - * poly_area_i - end do - end do !------------------------------------------------------------------------------------! - ! Find a few other variables that are either updated every month, or that ! - ! depend on site-/patch-/cohort- level variables. ! + ! Find the vegetation temperature and liquid fraction. ! !------------------------------------------------------------------------------------! - !----- Flush the PFT, LU, AGE, and Size (DBH) variables to zero. --------------------! - cgrid%bseeds_pft ( :,ipy) = 0. - cgrid%bseeds (:,:,ipy) = 0. - cgrid%pldens (:,:,ipy) = 0. - sss_bseeds_pft (:) = 0. - - !----- Looping over all sites. ------------------------------------------------------! - siteloop: do isi = 1, cpoly%nsites - csite => cpoly%site(isi) + !----- Leaf. ------------------------------------------------------------------------! + if (cgrid%mmean_leaf_hcap(ipy) > 0.) then + call uextcm2tl( cgrid%mmean_leaf_energy(ipy), cgrid%mmean_leaf_water (ipy) & + , cgrid%mmean_leaf_hcap (ipy), cgrid%mmean_leaf_temp (ipy) & + , cgrid%mmean_leaf_fliq (ipy) ) + else + cgrid%mmean_leaf_temp (ipy) = cgrid%mmean_can_temp (ipy) + if (cgrid%mmean_can_temp(ipy) > t00) then + cgrid%mmean_leaf_fliq(ipy) = 1.0 + elseif (cgrid%mmean_can_temp(ipy) == t00) then + cgrid%mmean_leaf_fliq(ipy) = 0.5 + else + cgrid%mmean_leaf_fliq(ipy) = 0.0 + end if + end if + !----- Wood. ------------------------------------------------------------------------! + if (cgrid%mmean_wood_hcap(ipy) > 0.) then + call uextcm2tl( cgrid%mmean_wood_energy(ipy) & + , cgrid%mmean_wood_water (ipy) & + , cgrid%mmean_wood_hcap (ipy) & + , cgrid%mmean_wood_temp (ipy) & + , cgrid%mmean_wood_fliq (ipy) ) + else + cgrid%mmean_wood_temp(ipy) = cgrid%mmean_can_temp(ipy) + if (cgrid%mmean_can_temp(ipy) > t00) then + cgrid%mmean_wood_fliq(ipy) = 1.0 + elseif (cgrid%mmean_can_temp(ipy) == t00) then + cgrid%mmean_wood_fliq(ipy) = 0.5 + else + cgrid%mmean_wood_fliq(ipy) = 0.0 + end if + end if + !------------------------------------------------------------------------------------! + end do polyloop + !---------------------------------------------------------------------------------------! + + return +end subroutine normalize_ed_mmean_vars +!==========================================================================================! +!==========================================================================================! + + + + + + +!==========================================================================================! +!==========================================================================================! +! This subroutine resets the monthly averages for variables actually used in the ! +! integration. ! +!------------------------------------------------------------------------------------------! +subroutine zero_ed_mmean_vars(cgrid) + use ed_state_vars , only : edtype & ! structure + , polygontype & ! structure + , sitetype & ! structure + , patchtype ! ! structure + implicit none + !----- Arguments. ----------------------------------------------------------------------! + type(edtype) , target :: cgrid + !----- Local variables. ----------------------------------------------------------------! + type(polygontype), pointer :: cpoly + type(sitetype) , pointer :: csite + type(patchtype) , pointer :: cpatch + integer :: ipy + integer :: isi + integer :: ipa + integer :: ico + !---------------------------------------------------------------------------------------! + + + !---------------------------------------------------------------------------------------! + ! Loop over polygons. ! + !---------------------------------------------------------------------------------------! + polyloop: do ipy=1,cgrid%npolygons + cpoly => cgrid%polygon(ipy) + + cgrid%mmean_lai (:,:,ipy) = 0.0 + cgrid%mmean_bleaf (:,:,ipy) = 0.0 + cgrid%mmean_broot (:,:,ipy) = 0.0 + cgrid%mmean_bstorage (:,:,ipy) = 0.0 + cgrid%mmean_bleaf_n (:,:,ipy) = 0.0 + cgrid%mmean_broot_n (:,:,ipy) = 0.0 + cgrid%mmean_bstorage_n (:,:,ipy) = 0.0 + cgrid%mmean_leaf_maintenance(:,:,ipy) = 0.0 + cgrid%mmean_root_maintenance(:,:,ipy) = 0.0 + cgrid%mmean_leaf_drop (:,:,ipy) = 0.0 + cgrid%mmean_fast_soil_c (ipy) = 0.0 + cgrid%mmean_slow_soil_c (ipy) = 0.0 + cgrid%mmean_struct_soil_c (ipy) = 0.0 + cgrid%mmean_struct_soil_l (ipy) = 0.0 + cgrid%mmean_cwd_c (ipy) = 0.0 + cgrid%mmean_fast_soil_n (ipy) = 0.0 + cgrid%mmean_mineral_soil_n (ipy) = 0.0 + cgrid%mmean_cwd_n (ipy) = 0.0 + cgrid%mmean_gpp (ipy) = 0.0 + cgrid%mmean_npp (ipy) = 0.0 + cgrid%mmean_leaf_resp (ipy) = 0.0 + cgrid%mmean_root_resp (ipy) = 0.0 + cgrid%mmean_growth_resp (ipy) = 0.0 + cgrid%mmean_storage_resp (ipy) = 0.0 + cgrid%mmean_vleaf_resp (ipy) = 0.0 + cgrid%mmean_plresp (ipy) = 0.0 + cgrid%mmean_leaf_energy (ipy) = 0.0 + cgrid%mmean_leaf_water (ipy) = 0.0 + cgrid%mmean_leaf_hcap (ipy) = 0.0 + cgrid%mmean_leaf_vpdef (ipy) = 0.0 + cgrid%mmean_leaf_temp (ipy) = 0.0 + cgrid%mmean_leaf_fliq (ipy) = 0.0 + cgrid%mmean_leaf_gsw (ipy) = 0.0 + cgrid%mmean_leaf_gbw (ipy) = 0.0 + cgrid%mmean_wood_energy (ipy) = 0.0 + cgrid%mmean_wood_water (ipy) = 0.0 + cgrid%mmean_wood_hcap (ipy) = 0.0 + cgrid%mmean_wood_temp (ipy) = 0.0 + cgrid%mmean_wood_fliq (ipy) = 0.0 + cgrid%mmean_wood_gbw (ipy) = 0.0 + cgrid%mmean_fs_open (ipy) = 0.0 + cgrid%mmean_fsw (ipy) = 0.0 + cgrid%mmean_fsn (ipy) = 0.0 + cgrid%mmean_psi_open (ipy) = 0.0 + cgrid%mmean_psi_closed (ipy) = 0.0 + cgrid%mmean_water_supply (ipy) = 0.0 + cgrid%mmean_par_l (ipy) = 0.0 + cgrid%mmean_par_l_beam (ipy) = 0.0 + cgrid%mmean_par_l_diff (ipy) = 0.0 + cgrid%mmean_rshort_l (ipy) = 0.0 + cgrid%mmean_rlong_l (ipy) = 0.0 + cgrid%mmean_sensible_lc (ipy) = 0.0 + cgrid%mmean_vapor_lc (ipy) = 0.0 + cgrid%mmean_transp (ipy) = 0.0 + cgrid%mmean_intercepted_al (ipy) = 0.0 + cgrid%mmean_wshed_lg (ipy) = 0.0 + cgrid%mmean_rshort_w (ipy) = 0.0 + cgrid%mmean_rlong_w (ipy) = 0.0 + cgrid%mmean_sensible_wc (ipy) = 0.0 + cgrid%mmean_vapor_wc (ipy) = 0.0 + cgrid%mmean_intercepted_aw (ipy) = 0.0 + cgrid%mmean_wshed_wg (ipy) = 0.0 + cgrid%mmean_nppleaf (ipy) = 0.0 + cgrid%mmean_nppfroot (ipy) = 0.0 + cgrid%mmean_nppsapwood (ipy) = 0.0 + cgrid%mmean_nppcroot (ipy) = 0.0 + cgrid%mmean_nppseeds (ipy) = 0.0 + cgrid%mmean_nppwood (ipy) = 0.0 + cgrid%mmean_nppdaily (ipy) = 0.0 + cgrid%mmean_rh (ipy) = 0.0 + cgrid%mmean_cwd_rh (ipy) = 0.0 + cgrid%mmean_nep (ipy) = 0.0 + cgrid%mmean_rk4step (ipy) = 0.0 + cgrid%mmean_available_water (ipy) = 0.0 + cgrid%mmean_can_theiv (ipy) = 0.0 + cgrid%mmean_can_theta (ipy) = 0.0 + cgrid%mmean_can_vpdef (ipy) = 0.0 + cgrid%mmean_can_temp (ipy) = 0.0 + cgrid%mmean_can_shv (ipy) = 0.0 + cgrid%mmean_can_co2 (ipy) = 0.0 + cgrid%mmean_can_rhos (ipy) = 0.0 + cgrid%mmean_can_prss (ipy) = 0.0 + cgrid%mmean_gnd_temp (ipy) = 0.0 + cgrid%mmean_gnd_shv (ipy) = 0.0 + cgrid%mmean_can_ggnd (ipy) = 0.0 + cgrid%mmean_sfcw_depth (ipy) = 0.0 + cgrid%mmean_sfcw_energy (ipy) = 0.0 + cgrid%mmean_sfcw_mass (ipy) = 0.0 + cgrid%mmean_sfcw_temp (ipy) = 0.0 + cgrid%mmean_sfcw_fliq (ipy) = 0.0 + cgrid%mmean_soil_energy (:,ipy) = 0.0 + cgrid%mmean_soil_mstpot (:,ipy) = 0.0 + cgrid%mmean_soil_water (:,ipy) = 0.0 + cgrid%mmean_soil_temp (:,ipy) = 0.0 + cgrid%mmean_soil_fliq (:,ipy) = 0.0 + cgrid%mmean_rshort_gnd (ipy) = 0.0 + cgrid%mmean_par_gnd (ipy) = 0.0 + cgrid%mmean_rlong_gnd (ipy) = 0.0 + cgrid%mmean_rlongup (ipy) = 0.0 + cgrid%mmean_parup (ipy) = 0.0 + cgrid%mmean_nirup (ipy) = 0.0 + cgrid%mmean_rshortup (ipy) = 0.0 + cgrid%mmean_rnet (ipy) = 0.0 + cgrid%mmean_albedo (ipy) = 0.0 + cgrid%mmean_albedo_beam (ipy) = 0.0 + cgrid%mmean_albedo_diff (ipy) = 0.0 + cgrid%mmean_rlong_albedo (ipy) = 0.0 + cgrid%mmean_ustar (ipy) = 0.0 + cgrid%mmean_tstar (ipy) = 0.0 + cgrid%mmean_qstar (ipy) = 0.0 + cgrid%mmean_cstar (ipy) = 0.0 + cgrid%mmean_carbon_ac (ipy) = 0.0 + cgrid%mmean_carbon_st (ipy) = 0.0 + cgrid%mmean_vapor_gc (ipy) = 0.0 + cgrid%mmean_vapor_ac (ipy) = 0.0 + cgrid%mmean_smoist_gg (:,ipy) = 0.0 + cgrid%mmean_throughfall (ipy) = 0.0 + cgrid%mmean_transloss (:,ipy) = 0.0 + cgrid%mmean_runoff (ipy) = 0.0 + cgrid%mmean_drainage (ipy) = 0.0 + cgrid%mmean_sensible_gc (ipy) = 0.0 + cgrid%mmean_sensible_ac (ipy) = 0.0 + cgrid%mmean_sensible_gg (:,ipy) = 0.0 + cgrid%mmean_qthroughfall (ipy) = 0.0 + cgrid%mmean_qrunoff (ipy) = 0.0 + cgrid%mmean_qdrainage (ipy) = 0.0 + cgrid%mmean_nppleaf (ipy) = 0.0 + cgrid%mmean_nppfroot (ipy) = 0.0 + cgrid%mmean_nppsapwood (ipy) = 0.0 + cgrid%mmean_nppcroot (ipy) = 0.0 + cgrid%mmean_nppseeds (ipy) = 0.0 + cgrid%mmean_nppwood (ipy) = 0.0 + cgrid%mmean_nppdaily (ipy) = 0.0 + cgrid%mmean_A_decomp (ipy) = 0.0 + cgrid%mmean_Af_decomp (ipy) = 0.0 + cgrid%mmean_co2_residual (ipy) = 0.0 + cgrid%mmean_energy_residual (ipy) = 0.0 + cgrid%mmean_water_residual (ipy) = 0.0 + cgrid%mmean_atm_theiv (ipy) = 0.0 + cgrid%mmean_atm_theta (ipy) = 0.0 + cgrid%mmean_atm_temp (ipy) = 0.0 + cgrid%mmean_atm_vpdef (ipy) = 0.0 + cgrid%mmean_atm_shv (ipy) = 0.0 + cgrid%mmean_atm_rshort (ipy) = 0.0 + cgrid%mmean_atm_rshort_diff (ipy) = 0.0 + cgrid%mmean_atm_par (ipy) = 0.0 + cgrid%mmean_atm_par_diff (ipy) = 0.0 + cgrid%mmean_atm_rlong (ipy) = 0.0 + cgrid%mmean_atm_vels (ipy) = 0.0 + cgrid%mmean_atm_rhos (ipy) = 0.0 + cgrid%mmean_atm_prss (ipy) = 0.0 + cgrid%mmean_atm_co2 (ipy) = 0.0 + cgrid%mmean_pcpg (ipy) = 0.0 + cgrid%mmean_qpcpg (ipy) = 0.0 + cgrid%mmean_dpcpg (ipy) = 0.0 + cgrid%mmsqu_gpp (ipy) = 0.0 + cgrid%mmsqu_npp (ipy) = 0.0 + cgrid%mmsqu_plresp (ipy) = 0.0 + cgrid%mmsqu_sensible_lc (ipy) = 0.0 + cgrid%mmsqu_vapor_lc (ipy) = 0.0 + cgrid%mmsqu_transp (ipy) = 0.0 + cgrid%mmsqu_sensible_wc (ipy) = 0.0 + cgrid%mmsqu_vapor_wc (ipy) = 0.0 + cgrid%mmsqu_rh (ipy) = 0.0 + cgrid%mmsqu_cwd_rh (ipy) = 0.0 + cgrid%mmsqu_nep (ipy) = 0.0 + cgrid%mmsqu_rlongup (ipy) = 0.0 + cgrid%mmsqu_parup (ipy) = 0.0 + cgrid%mmsqu_nirup (ipy) = 0.0 + cgrid%mmsqu_rshortup (ipy) = 0.0 + cgrid%mmsqu_rnet (ipy) = 0.0 + cgrid%mmsqu_albedo (ipy) = 0.0 + cgrid%mmsqu_ustar (ipy) = 0.0 + cgrid%mmsqu_carbon_ac (ipy) = 0.0 + cgrid%mmsqu_carbon_st (ipy) = 0.0 + cgrid%mmsqu_vapor_gc (ipy) = 0.0 + cgrid%mmsqu_vapor_ac (ipy) = 0.0 + cgrid%mmsqu_sensible_gc (ipy) = 0.0 + cgrid%mmsqu_sensible_ac (ipy) = 0.0 + + + !------------------------------------------------------------------------------------! + ! Loop over sites. ! + !------------------------------------------------------------------------------------! + siteloop: do isi=1,cpoly%nsites + csite => cpoly%site(isi) + + cpoly%mmean_atm_theiv (isi) = 0.0 + cpoly%mmean_atm_theta (isi) = 0.0 + cpoly%mmean_atm_temp (isi) = 0.0 + cpoly%mmean_atm_vpdef (isi) = 0.0 + cpoly%mmean_atm_shv (isi) = 0.0 + cpoly%mmean_atm_rshort (isi) = 0.0 + cpoly%mmean_atm_rshort_diff(isi) = 0.0 + cpoly%mmean_atm_par (isi) = 0.0 + cpoly%mmean_atm_par_diff (isi) = 0.0 + cpoly%mmean_atm_rlong (isi) = 0.0 + cpoly%mmean_atm_vels (isi) = 0.0 + cpoly%mmean_atm_rhos (isi) = 0.0 + cpoly%mmean_atm_prss (isi) = 0.0 + cpoly%mmean_atm_co2 (isi) = 0.0 + cpoly%mmean_pcpg (isi) = 0.0 + cpoly%mmean_qpcpg (isi) = 0.0 + cpoly%mmean_dpcpg (isi) = 0.0 + + + !---------------------------------------------------------------------------------! + ! Loop over sites. ! + !---------------------------------------------------------------------------------! + patchloop: do ipa=1,csite%npatches + cpatch=> csite%patch(ipa) + + csite%mmean_fast_soil_c (ipa) = 0.0 + csite%mmean_slow_soil_c (ipa) = 0.0 + csite%mmean_struct_soil_c (ipa) = 0.0 + csite%mmean_struct_soil_l (ipa) = 0.0 + csite%mmean_fast_soil_n (ipa) = 0.0 + csite%mmean_mineral_soil_n (ipa) = 0.0 + csite%mmean_co2_residual (ipa) = 0.0 + csite%mmean_energy_residual (ipa) = 0.0 + csite%mmean_water_residual (ipa) = 0.0 + csite%mmean_rh (ipa) = 0.0 + csite%mmean_cwd_rh (ipa) = 0.0 + csite%mmean_nep (ipa) = 0.0 + csite%mmean_A_decomp (ipa) = 0.0 + csite%mmean_Af_decomp (ipa) = 0.0 + csite%mmean_rk4step (ipa) = 0.0 + csite%mmean_available_water (ipa) = 0.0 + csite%mmean_can_theiv (ipa) = 0.0 + csite%mmean_can_theta (ipa) = 0.0 + csite%mmean_can_vpdef (ipa) = 0.0 + csite%mmean_can_temp (ipa) = 0.0 + csite%mmean_can_shv (ipa) = 0.0 + csite%mmean_can_co2 (ipa) = 0.0 + csite%mmean_can_rhos (ipa) = 0.0 + csite%mmean_can_prss (ipa) = 0.0 + csite%mmean_gnd_temp (ipa) = 0.0 + csite%mmean_gnd_shv (ipa) = 0.0 + csite%mmean_can_ggnd (ipa) = 0.0 + csite%mmean_sfcw_depth (ipa) = 0.0 + csite%mmean_sfcw_energy (ipa) = 0.0 + csite%mmean_sfcw_mass (ipa) = 0.0 + csite%mmean_sfcw_temp (ipa) = 0.0 + csite%mmean_sfcw_fliq (ipa) = 0.0 + csite%mmean_soil_energy (:,ipa) = 0.0 + csite%mmean_soil_mstpot (:,ipa) = 0.0 + csite%mmean_soil_water (:,ipa) = 0.0 + csite%mmean_soil_temp (:,ipa) = 0.0 + csite%mmean_soil_fliq (:,ipa) = 0.0 + csite%mmean_rshort_gnd (ipa) = 0.0 + csite%mmean_par_gnd (ipa) = 0.0 + csite%mmean_rlong_gnd (ipa) = 0.0 + csite%mmean_rlongup (ipa) = 0.0 + csite%mmean_parup (ipa) = 0.0 + csite%mmean_nirup (ipa) = 0.0 + csite%mmean_rshortup (ipa) = 0.0 + csite%mmean_rnet (ipa) = 0.0 + csite%mmean_albedo (ipa) = 0.0 + csite%mmean_albedo_beam (ipa) = 0.0 + csite%mmean_albedo_diff (ipa) = 0.0 + csite%mmean_rlong_albedo (ipa) = 0.0 + csite%mmean_ustar (ipa) = 0.0 + csite%mmean_tstar (ipa) = 0.0 + csite%mmean_qstar (ipa) = 0.0 + csite%mmean_cstar (ipa) = 0.0 + csite%mmean_carbon_ac (ipa) = 0.0 + csite%mmean_carbon_st (ipa) = 0.0 + csite%mmean_vapor_gc (ipa) = 0.0 + csite%mmean_vapor_ac (ipa) = 0.0 + csite%mmean_smoist_gg (:,ipa) = 0.0 + csite%mmean_throughfall (ipa) = 0.0 + csite%mmean_transloss (:,ipa) = 0.0 + csite%mmean_runoff (ipa) = 0.0 + csite%mmean_drainage (ipa) = 0.0 + csite%mmean_sensible_gc (ipa) = 0.0 + csite%mmean_sensible_ac (ipa) = 0.0 + csite%mmean_sensible_gg (:,ipa) = 0.0 + csite%mmean_qthroughfall (ipa) = 0.0 + csite%mmean_qrunoff (ipa) = 0.0 + csite%mmean_qdrainage (ipa) = 0.0 + csite%mmean_A_decomp (ipa) = 0.0 + csite%mmean_Af_decomp (ipa) = 0.0 + csite%mmean_co2_residual (ipa) = 0.0 + csite%mmean_energy_residual (ipa) = 0.0 + csite%mmean_water_residual (ipa) = 0.0 + csite%mmsqu_rh (ipa) = 0.0 + csite%mmsqu_cwd_rh (ipa) = 0.0 + csite%mmsqu_nep (ipa) = 0.0 + csite%mmsqu_rlongup (ipa) = 0.0 + csite%mmsqu_parup (ipa) = 0.0 + csite%mmsqu_nirup (ipa) = 0.0 + csite%mmsqu_rshortup (ipa) = 0.0 + csite%mmsqu_rnet (ipa) = 0.0 + csite%mmsqu_albedo (ipa) = 0.0 + csite%mmsqu_ustar (ipa) = 0.0 + csite%mmsqu_carbon_ac (ipa) = 0.0 + csite%mmsqu_carbon_st (ipa) = 0.0 + csite%mmsqu_vapor_gc (ipa) = 0.0 + csite%mmsqu_vapor_ac (ipa) = 0.0 + csite%mmsqu_sensible_gc (ipa) = 0.0 + csite%mmsqu_sensible_ac (ipa) = 0.0 + + + !------------------------------------------------------------------------------! + ! Loop over cohorts. ! + !------------------------------------------------------------------------------! + cohortloop: do ico=1,cpatch%ncohorts + cpatch%mmean_lai (ico) = 0.0 + cpatch%mmean_bleaf (ico) = 0.0 + cpatch%mmean_bstorage (ico) = 0.0 + cpatch%mmean_mort_rate (:,ico) = 0.0 + cpatch%mmean_leaf_maintenance (ico) = 0.0 + cpatch%mmean_root_maintenance (ico) = 0.0 + cpatch%mmean_leaf_drop (ico) = 0.0 + cpatch%mmean_cb (ico) = 0.0 + cpatch%mmean_gpp (ico) = 0.0 + cpatch%mmean_npp (ico) = 0.0 + cpatch%mmean_leaf_resp (ico) = 0.0 + cpatch%mmean_root_resp (ico) = 0.0 + cpatch%mmean_growth_resp (ico) = 0.0 + cpatch%mmean_storage_resp (ico) = 0.0 + cpatch%mmean_vleaf_resp (ico) = 0.0 + cpatch%mmean_plresp (ico) = 0.0 + cpatch%mmean_leaf_energy (ico) = 0.0 + cpatch%mmean_leaf_water (ico) = 0.0 + cpatch%mmean_leaf_hcap (ico) = 0.0 + cpatch%mmean_leaf_vpdef (ico) = 0.0 + cpatch%mmean_leaf_temp (ico) = 0.0 + cpatch%mmean_leaf_fliq (ico) = 0.0 + cpatch%mmean_leaf_gsw (ico) = 0.0 + cpatch%mmean_leaf_gbw (ico) = 0.0 + cpatch%mmean_wood_energy (ico) = 0.0 + cpatch%mmean_wood_water (ico) = 0.0 + cpatch%mmean_wood_hcap (ico) = 0.0 + cpatch%mmean_wood_temp (ico) = 0.0 + cpatch%mmean_wood_fliq (ico) = 0.0 + cpatch%mmean_wood_gbw (ico) = 0.0 + cpatch%mmean_fs_open (ico) = 0.0 + cpatch%mmean_fsw (ico) = 0.0 + cpatch%mmean_fsn (ico) = 0.0 + cpatch%mmean_psi_open (ico) = 0.0 + cpatch%mmean_psi_closed (ico) = 0.0 + cpatch%mmean_water_supply (ico) = 0.0 + cpatch%mmean_light_level (ico) = 0.0 + cpatch%mmean_light_level_beam (ico) = 0.0 + cpatch%mmean_light_level_diff (ico) = 0.0 + cpatch%mmean_par_l (ico) = 0.0 + cpatch%mmean_par_l_beam (ico) = 0.0 + cpatch%mmean_par_l_diff (ico) = 0.0 + cpatch%mmean_rshort_l (ico) = 0.0 + cpatch%mmean_rlong_l (ico) = 0.0 + cpatch%mmean_sensible_lc (ico) = 0.0 + cpatch%mmean_vapor_lc (ico) = 0.0 + cpatch%mmean_transp (ico) = 0.0 + cpatch%mmean_intercepted_al (ico) = 0.0 + cpatch%mmean_wshed_lg (ico) = 0.0 + cpatch%mmean_rshort_w (ico) = 0.0 + cpatch%mmean_rlong_w (ico) = 0.0 + cpatch%mmean_sensible_wc (ico) = 0.0 + cpatch%mmean_vapor_wc (ico) = 0.0 + cpatch%mmean_intercepted_aw (ico) = 0.0 + cpatch%mmean_wshed_wg (ico) = 0.0 + cpatch%mmean_nppleaf (ico) = 0.0 + cpatch%mmean_nppfroot (ico) = 0.0 + cpatch%mmean_nppsapwood (ico) = 0.0 + cpatch%mmean_nppcroot (ico) = 0.0 + cpatch%mmean_nppseeds (ico) = 0.0 + cpatch%mmean_nppwood (ico) = 0.0 + cpatch%mmean_nppdaily (ico) = 0.0 + cpatch%mmsqu_gpp (ico) = 0.0 + cpatch%mmsqu_npp (ico) = 0.0 + cpatch%mmsqu_plresp (ico) = 0.0 + cpatch%mmsqu_sensible_lc (ico) = 0.0 + cpatch%mmsqu_vapor_lc (ico) = 0.0 + cpatch%mmsqu_transp (ico) = 0.0 + cpatch%mmsqu_sensible_wc (ico) = 0.0 + cpatch%mmsqu_vapor_wc (ico) = 0.0 + end do cohortloop + !------------------------------------------------------------------------------! + end do patchloop + !---------------------------------------------------------------------------------! + end do siteloop + !------------------------------------------------------------------------------------! + end do polyloop + !---------------------------------------------------------------------------------------! + + return +end subroutine zero_ed_mmean_vars +!==========================================================================================! +!==========================================================================================! + + + + + + + + + + +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! +! |-------------------------------| ! +! |**** MEAN DIEL SUBROUTINES ****| ! +! |-------------------------------| ! +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! + + + + + + +!==========================================================================================! +!==========================================================================================! +! This subroutine integrates most of the mean diel variables. This subroutine is ! +! called after the fmean variables have been normalised, so we can take advantage of their ! +! values. ! +! ! +! A few variables are _NOT_ integrated here: quantities such as temperature and liquid ! +! fraction are found after the mean diel of the extensive variables have been normalised. ! +!------------------------------------------------------------------------------------------! +subroutine integrate_ed_qmean_vars(cgrid) + use ed_state_vars, only : edtype & ! structure + , polygontype & ! structure + , sitetype & ! structure + , patchtype ! ! structure + use ed_misc_coms , only : frqfast & ! intent(in) + , ndcycle & ! intent(in) + , current_time & ! intent(in) + , simtime ! ! structure + use consts_coms , only : day_sec ! ! intent(in) + implicit none + !----- Argument ------------------------------------------------------------------------! + type(edtype) , target :: cgrid + !----- Local variables -----------------------------------------------------------------! + type(polygontype) , pointer :: cpoly + type(sitetype) , pointer :: csite + type(patchtype) , pointer :: cpatch + type(simtime) :: daybefore + integer :: ipy + integer :: isi + integer :: ipa + integer :: ico + integer :: t + real :: ndaysi + !---------------------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------------------! + ! Find the index corresponding to this time of the day for the mean diurnal cycle ! + ! averages. ! + !---------------------------------------------------------------------------------------! + t = ceiling(mod(current_time%time,day_sec)/frqfast) + if (t == 0) t = nint(day_sec/frqfast) + !---------------------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------------------! + ! Find which day we have just integrated, we will use it to determine the right ! + ! scaling factor. ! + !---------------------------------------------------------------------------------------! + call yesterday_info(current_time,daybefore,ndaysi) + !---------------------------------------------------------------------------------------! + + + !---------------------------------------------------------------------------------------! + ! Use the variables that have been already aggregated. ! + !---------------------------------------------------------------------------------------! + polyloop: do ipy=1,cgrid%npolygons + cpoly => cgrid%polygon(ipy) + + + !------------------------------------------------------------------------------------! + ! Integrate polygon-level variables. ! + !------------------------------------------------------------------------------------! + cgrid%qmean_gpp (t,ipy) = cgrid%qmean_gpp (t,ipy) & + + cgrid%fmean_gpp (ipy) & + * ndaysi + cgrid%qmean_npp (t,ipy) = cgrid%qmean_npp (t,ipy) & + + cgrid%fmean_npp (ipy) & + * ndaysi + cgrid%qmean_leaf_resp (t,ipy) = cgrid%qmean_leaf_resp (t,ipy) & + + cgrid%fmean_leaf_resp (ipy) & + * ndaysi + cgrid%qmean_root_resp (t,ipy) = cgrid%qmean_root_resp (t,ipy) & + + cgrid%fmean_root_resp (ipy) & + * ndaysi + cgrid%qmean_growth_resp (t,ipy) = cgrid%qmean_growth_resp (t,ipy) & + + cgrid%fmean_growth_resp (ipy) & + * ndaysi + cgrid%qmean_storage_resp (t,ipy) = cgrid%qmean_storage_resp (t,ipy) & + + cgrid%fmean_storage_resp (ipy) & + * ndaysi + cgrid%qmean_vleaf_resp (t,ipy) = cgrid%qmean_vleaf_resp (t,ipy) & + + cgrid%fmean_vleaf_resp (ipy) & + * ndaysi + cgrid%qmean_plresp (t,ipy) = cgrid%qmean_plresp (t,ipy) & + + cgrid%fmean_plresp (ipy) & + * ndaysi + cgrid%qmean_leaf_energy (t,ipy) = cgrid%qmean_leaf_energy (t,ipy) & + + cgrid%fmean_leaf_energy (ipy) & + * ndaysi + cgrid%qmean_leaf_water (t,ipy) = cgrid%qmean_leaf_water (t,ipy) & + + cgrid%fmean_leaf_water (ipy) & + * ndaysi + cgrid%qmean_leaf_hcap (t,ipy) = cgrid%qmean_leaf_hcap (t,ipy) & + + cgrid%fmean_leaf_hcap (ipy) & + * ndaysi + cgrid%qmean_leaf_vpdef (t,ipy) = cgrid%qmean_leaf_vpdef (t,ipy) & + + cgrid%fmean_leaf_vpdef (ipy) & + * ndaysi + cgrid%qmean_leaf_gsw (t,ipy) = cgrid%qmean_leaf_gsw (t,ipy) & + + cgrid%fmean_leaf_gsw (ipy) & + * ndaysi + cgrid%qmean_leaf_gbw (t,ipy) = cgrid%qmean_leaf_gbw (t,ipy) & + + cgrid%fmean_leaf_gbw (ipy) & + * ndaysi + cgrid%qmean_wood_energy (t,ipy) = cgrid%qmean_wood_energy (t,ipy) & + + cgrid%fmean_wood_energy (ipy) & + * ndaysi + cgrid%qmean_wood_water (t,ipy) = cgrid%qmean_wood_water (t,ipy) & + + cgrid%fmean_wood_water (ipy) & + * ndaysi + cgrid%qmean_wood_hcap (t,ipy) = cgrid%qmean_wood_hcap (t,ipy) & + + cgrid%fmean_wood_hcap (ipy) & + * ndaysi + cgrid%qmean_wood_gbw (t,ipy) = cgrid%qmean_wood_gbw (t,ipy) & + + cgrid%fmean_wood_gbw (ipy) & + * ndaysi + cgrid%qmean_fs_open (t,ipy) = cgrid%qmean_fs_open (t,ipy) & + + cgrid%fmean_fs_open (ipy) & + * ndaysi + cgrid%qmean_fsw (t,ipy) = cgrid%qmean_fsw (t,ipy) & + + cgrid%fmean_fsw (ipy) & + * ndaysi + cgrid%qmean_fsn (t,ipy) = cgrid%qmean_fsn (t,ipy) & + + cgrid%fmean_fsn (ipy) & + * ndaysi + cgrid%qmean_psi_open (t,ipy) = cgrid%qmean_psi_open (t,ipy) & + + cgrid%fmean_psi_open (ipy) & + * ndaysi + cgrid%qmean_psi_closed (t,ipy) = cgrid%qmean_psi_closed (t,ipy) & + + cgrid%fmean_psi_closed (ipy) & + * ndaysi + cgrid%qmean_water_supply (t,ipy) = cgrid%qmean_water_supply (t,ipy) & + + cgrid%fmean_water_supply (ipy) & + * ndaysi + cgrid%qmean_par_l (t,ipy) = cgrid%qmean_par_l (t,ipy) & + + cgrid%fmean_par_l (ipy) & + * ndaysi + cgrid%qmean_par_l_beam (t,ipy) = cgrid%qmean_par_l_beam (t,ipy) & + + cgrid%fmean_par_l_beam (ipy) & + * ndaysi + cgrid%qmean_par_l_diff (t,ipy) = cgrid%qmean_par_l_diff (t,ipy) & + + cgrid%fmean_par_l_diff (ipy) & + * ndaysi + cgrid%qmean_rshort_l (t,ipy) = cgrid%qmean_rshort_l (t,ipy) & + + cgrid%fmean_rshort_l (ipy) & + * ndaysi + cgrid%qmean_rlong_l (t,ipy) = cgrid%qmean_rlong_l (t,ipy) & + + cgrid%fmean_rlong_l (ipy) & + * ndaysi + cgrid%qmean_sensible_lc (t,ipy) = cgrid%qmean_sensible_lc (t,ipy) & + + cgrid%fmean_sensible_lc (ipy) & + * ndaysi + cgrid%qmean_vapor_lc (t,ipy) = cgrid%qmean_vapor_lc (t,ipy) & + + cgrid%fmean_vapor_lc (ipy) & + * ndaysi + cgrid%qmean_transp (t,ipy) = cgrid%qmean_transp (t,ipy) & + + cgrid%fmean_transp (ipy) & + * ndaysi + cgrid%qmean_intercepted_al (t,ipy) = cgrid%qmean_intercepted_al (t,ipy) & + + cgrid%fmean_intercepted_al (ipy) & + * ndaysi + cgrid%qmean_wshed_lg (t,ipy) = cgrid%qmean_wshed_lg (t,ipy) & + + cgrid%fmean_wshed_lg (ipy) & + * ndaysi + cgrid%qmean_rshort_w (t,ipy) = cgrid%qmean_rshort_w (t,ipy) & + + cgrid%fmean_rshort_w (ipy) & + * ndaysi + cgrid%qmean_rlong_w (t,ipy) = cgrid%qmean_rlong_w (t,ipy) & + + cgrid%fmean_rlong_w (ipy) & + * ndaysi + cgrid%qmean_sensible_wc (t,ipy) = cgrid%qmean_sensible_wc (t,ipy) & + + cgrid%fmean_sensible_wc (ipy) & + * ndaysi + cgrid%qmean_vapor_wc (t,ipy) = cgrid%qmean_vapor_wc (t,ipy) & + + cgrid%fmean_vapor_wc (ipy) & + * ndaysi + cgrid%qmean_intercepted_aw (t,ipy) = cgrid%qmean_intercepted_aw (t,ipy) & + + cgrid%fmean_intercepted_aw (ipy) & + * ndaysi + cgrid%qmean_wshed_wg (t,ipy) = cgrid%qmean_wshed_wg (t,ipy) & + + cgrid%fmean_wshed_wg (ipy) & + * ndaysi + cgrid%qmean_rh (t,ipy) = cgrid%qmean_rh (t,ipy) & + + cgrid%fmean_rh (ipy) & + * ndaysi + cgrid%qmean_cwd_rh (t,ipy) = cgrid%qmean_cwd_rh (t,ipy) & + + cgrid%fmean_cwd_rh (ipy) & + * ndaysi + cgrid%qmean_nep (t,ipy) = cgrid%qmean_nep (t,ipy) & + + cgrid%fmean_nep (ipy) & + * ndaysi + cgrid%qmean_rk4step (t,ipy) = cgrid%qmean_rk4step (t,ipy) & + + cgrid%fmean_rk4step (ipy) & + * ndaysi + cgrid%qmean_available_water (t,ipy) = cgrid%qmean_available_water (t,ipy) & + + cgrid%fmean_available_water (ipy) & + * ndaysi + cgrid%qmean_can_theiv (t,ipy) = cgrid%qmean_can_theiv (t,ipy) & + + cgrid%fmean_can_theiv (ipy) & + * ndaysi + cgrid%qmean_can_theta (t,ipy) = cgrid%qmean_can_theta (t,ipy) & + + cgrid%fmean_can_theta (ipy) & + * ndaysi + cgrid%qmean_can_vpdef (t,ipy) = cgrid%qmean_can_vpdef (t,ipy) & + + cgrid%fmean_can_vpdef (ipy) & + * ndaysi + cgrid%qmean_can_shv (t,ipy) = cgrid%qmean_can_shv (t,ipy) & + + cgrid%fmean_can_shv (ipy) & + * ndaysi + cgrid%qmean_can_co2 (t,ipy) = cgrid%qmean_can_co2 (t,ipy) & + + cgrid%fmean_can_co2 (ipy) & + * ndaysi + cgrid%qmean_can_prss (t,ipy) = cgrid%qmean_can_prss (t,ipy) & + + cgrid%fmean_can_prss (ipy) & + * ndaysi + cgrid%qmean_gnd_temp (t,ipy) = cgrid%qmean_gnd_temp (t,ipy) & + + cgrid%fmean_gnd_temp (ipy) & + * ndaysi + cgrid%qmean_gnd_shv (t,ipy) = cgrid%qmean_gnd_shv (t,ipy) & + + cgrid%fmean_gnd_shv (ipy) & + * ndaysi + cgrid%qmean_can_ggnd (t,ipy) = cgrid%qmean_can_ggnd (t,ipy) & + + cgrid%fmean_can_ggnd (ipy) & + * ndaysi + cgrid%qmean_sfcw_depth (t,ipy) = cgrid%qmean_sfcw_depth (t,ipy) & + + cgrid%fmean_sfcw_depth (ipy) & + * ndaysi + !----- During the integration, pounding internal energy must be in J/m2. ------------! + cgrid%qmean_sfcw_energy (t,ipy) = cgrid%qmean_sfcw_energy (t,ipy) & + + cgrid%fmean_sfcw_energy (ipy) & + * cgrid%fmean_sfcw_mass (ipy) & + * ndaysi + cgrid%qmean_sfcw_mass (t,ipy) = cgrid%qmean_sfcw_mass (t,ipy) & + + cgrid%fmean_sfcw_mass (ipy) & + * ndaysi + cgrid%qmean_soil_energy (:,t,ipy) = cgrid%qmean_soil_energy (:,t,ipy) & + + cgrid%fmean_soil_energy (:,ipy) & + * ndaysi + cgrid%qmean_soil_mstpot (:,t,ipy) = cgrid%qmean_soil_mstpot (:,t,ipy) & + + cgrid%fmean_soil_mstpot (:,ipy) & + * ndaysi + cgrid%qmean_soil_water (:,t,ipy) = cgrid%qmean_soil_water (:,t,ipy) & + + cgrid%fmean_soil_water (:,ipy) & + * ndaysi + cgrid%qmean_rshort_gnd (t,ipy) = cgrid%qmean_rshort_gnd (t,ipy) & + + cgrid%fmean_rshort_gnd (ipy) & + * ndaysi + cgrid%qmean_par_gnd (t,ipy) = cgrid%qmean_par_gnd (t,ipy) & + + cgrid%fmean_par_gnd (ipy) & + * ndaysi + cgrid%qmean_rlong_gnd (t,ipy) = cgrid%qmean_rlong_gnd (t,ipy) & + + cgrid%fmean_rlong_gnd (ipy) & + * ndaysi + cgrid%qmean_rlongup (t,ipy) = cgrid%qmean_rlongup (t,ipy) & + + cgrid%fmean_rlongup (ipy) & + * ndaysi + cgrid%qmean_parup (t,ipy) = cgrid%qmean_parup (t,ipy) & + + cgrid%fmean_parup (ipy) & + * ndaysi + cgrid%qmean_nirup (t,ipy) = cgrid%qmean_nirup (t,ipy) & + + cgrid%fmean_nirup (ipy) & + * ndaysi + cgrid%qmean_rshortup (t,ipy) = cgrid%qmean_rshortup (t,ipy) & + + cgrid%fmean_rshortup (ipy) & + * ndaysi + cgrid%qmean_rnet (t,ipy) = cgrid%qmean_rnet (t,ipy) & + + cgrid%fmean_rnet (ipy) & + * ndaysi + cgrid%qmean_albedo (t,ipy) = cgrid%qmean_albedo (t,ipy) & + + cgrid%fmean_albedo (ipy) & + * ndaysi + cgrid%qmean_albedo_beam (t,ipy) = cgrid%qmean_albedo_beam (t,ipy) & + + cgrid%fmean_albedo_beam (ipy) & + * ndaysi + cgrid%qmean_albedo_diff (t,ipy) = cgrid%qmean_albedo_diff (t,ipy) & + + cgrid%fmean_albedo_diff (ipy) & + * ndaysi + cgrid%qmean_rlong_albedo (t,ipy) = cgrid%qmean_rlong_albedo (t,ipy) & + + cgrid%fmean_rlong_albedo (ipy) & + * ndaysi + cgrid%qmean_ustar (t,ipy) = cgrid%qmean_ustar (t,ipy) & + + cgrid%fmean_ustar (ipy) & + * ndaysi + cgrid%qmean_tstar (t,ipy) = cgrid%qmean_tstar (t,ipy) & + + cgrid%fmean_tstar (ipy) & + * ndaysi + cgrid%qmean_qstar (t,ipy) = cgrid%qmean_qstar (t,ipy) & + + cgrid%fmean_qstar (ipy) & + * ndaysi + cgrid%qmean_cstar (t,ipy) = cgrid%qmean_cstar (t,ipy) & + + cgrid%fmean_cstar (ipy) & + * ndaysi + cgrid%qmean_carbon_ac (t,ipy) = cgrid%qmean_carbon_ac (t,ipy) & + + cgrid%fmean_carbon_ac (ipy) & + * ndaysi + cgrid%qmean_carbon_st (t,ipy) = cgrid%qmean_carbon_st (t,ipy) & + + cgrid%fmean_carbon_st (ipy) & + * ndaysi + cgrid%qmean_vapor_gc (t,ipy) = cgrid%qmean_vapor_gc (t,ipy) & + + cgrid%fmean_vapor_gc (ipy) & + * ndaysi + cgrid%qmean_vapor_ac (t,ipy) = cgrid%qmean_vapor_ac (t,ipy) & + + cgrid%fmean_vapor_ac (ipy) & + * ndaysi + cgrid%qmean_smoist_gg (:,t,ipy) = cgrid%qmean_smoist_gg (:,t,ipy) & + + cgrid%fmean_smoist_gg (:,ipy) & + * ndaysi + cgrid%qmean_throughfall (t,ipy) = cgrid%qmean_throughfall (t,ipy) & + + cgrid%fmean_throughfall (ipy) & + * ndaysi + cgrid%qmean_transloss (:,t,ipy) = cgrid%qmean_transloss (:,t,ipy) & + + cgrid%fmean_transloss (:,ipy) & + * ndaysi + cgrid%qmean_runoff (t,ipy) = cgrid%qmean_runoff (t,ipy) & + + cgrid%fmean_runoff (ipy) & + * ndaysi + cgrid%qmean_drainage (t,ipy) = cgrid%qmean_drainage (t,ipy) & + + cgrid%fmean_drainage (ipy) & + * ndaysi + cgrid%qmean_sensible_gc (t,ipy) = cgrid%qmean_sensible_gc (t,ipy) & + + cgrid%fmean_sensible_gc (ipy) & + * ndaysi + cgrid%qmean_sensible_ac (t,ipy) = cgrid%qmean_sensible_ac (t,ipy) & + + cgrid%fmean_sensible_ac (ipy) & + * ndaysi + cgrid%qmean_sensible_gg (:,t,ipy) = cgrid%qmean_sensible_gg (:,t,ipy) & + + cgrid%fmean_sensible_gg (:,ipy) & + * ndaysi + cgrid%qmean_qthroughfall (t,ipy) = cgrid%qmean_qthroughfall (t,ipy) & + + cgrid%fmean_qthroughfall (ipy) & + * ndaysi + cgrid%qmean_qrunoff (t,ipy) = cgrid%qmean_qrunoff (t,ipy) & + + cgrid%fmean_qrunoff (ipy) & + * ndaysi + cgrid%qmean_qdrainage (t,ipy) = cgrid%qmean_qdrainage (t,ipy) & + + cgrid%fmean_qdrainage (ipy) & + * ndaysi + cgrid%qmean_atm_theiv (t,ipy) = cgrid%qmean_atm_theiv (t,ipy) & + + cgrid%fmean_atm_theiv (ipy) & + * ndaysi + cgrid%qmean_atm_theta (t,ipy) = cgrid%qmean_atm_theta (t,ipy) & + + cgrid%fmean_atm_theta (ipy) & + * ndaysi + cgrid%qmean_atm_vpdef (t,ipy) = cgrid%qmean_atm_vpdef (t,ipy) & + + cgrid%fmean_atm_vpdef (ipy) & + * ndaysi + cgrid%qmean_atm_shv (t,ipy) = cgrid%qmean_atm_shv (t,ipy) & + + cgrid%fmean_atm_shv (ipy) & + * ndaysi + cgrid%qmean_atm_rshort (t,ipy) = cgrid%qmean_atm_rshort (t,ipy) & + + cgrid%fmean_atm_rshort (ipy) & + * ndaysi + cgrid%qmean_atm_rshort_diff (t,ipy) = cgrid%qmean_atm_rshort_diff (t,ipy) & + + cgrid%fmean_atm_rshort_diff (ipy) & + * ndaysi + cgrid%qmean_atm_par (t,ipy) = cgrid%qmean_atm_par (t,ipy) & + + cgrid%fmean_atm_par (ipy) & + * ndaysi + cgrid%qmean_atm_par_diff (t,ipy) = cgrid%qmean_atm_par_diff (t,ipy) & + + cgrid%fmean_atm_par_diff (ipy) & + * ndaysi + cgrid%qmean_atm_rlong (t,ipy) = cgrid%qmean_atm_rlong (t,ipy) & + + cgrid%fmean_atm_rlong (ipy) & + * ndaysi + cgrid%qmean_atm_vels (t,ipy) = cgrid%qmean_atm_vels (t,ipy) & + + cgrid%fmean_atm_vels (ipy) & + * ndaysi + cgrid%qmean_atm_prss (t,ipy) = cgrid%qmean_atm_prss (t,ipy) & + + cgrid%fmean_atm_prss (ipy) & + * ndaysi + cgrid%qmean_atm_co2 (t,ipy) = cgrid%qmean_atm_co2 (t,ipy) & + + cgrid%fmean_atm_co2 (ipy) & + * ndaysi + cgrid%qmean_pcpg (t,ipy) = cgrid%qmean_pcpg (t,ipy) & + + cgrid%fmean_pcpg (ipy) & + * ndaysi + cgrid%qmean_qpcpg (t,ipy) = cgrid%qmean_qpcpg (t,ipy) & + + cgrid%fmean_qpcpg (ipy) & + * ndaysi + cgrid%qmean_dpcpg (t,ipy) = cgrid%qmean_dpcpg (t,ipy) & + + cgrid%fmean_dpcpg (ipy) & + * ndaysi + !----- Mean sum of squares. ---------------------------------------------------------# + cgrid%qmsqu_gpp (t,ipy) = cgrid%qmsqu_gpp (t,ipy) & + + cgrid%fmean_gpp (ipy) & + * cgrid%fmean_gpp (ipy) & + * ndaysi + cgrid%qmsqu_npp (t,ipy) = cgrid%qmsqu_npp (t,ipy) & + + cgrid%fmean_npp (ipy) & + * cgrid%fmean_npp (ipy) & + * ndaysi + cgrid%qmsqu_plresp (t,ipy) = cgrid%qmsqu_plresp (t,ipy) & + + cgrid%fmean_plresp (ipy) & + * cgrid%fmean_plresp (ipy) & + * ndaysi + cgrid%qmsqu_sensible_lc (t,ipy) = cgrid%qmsqu_sensible_lc (t,ipy) & + + cgrid%fmean_sensible_lc (ipy) & + * cgrid%fmean_sensible_lc (ipy) & + * ndaysi + cgrid%qmsqu_vapor_lc (t,ipy) = cgrid%qmsqu_vapor_lc (t,ipy) & + + cgrid%fmean_vapor_lc (ipy) & + * cgrid%fmean_vapor_lc (ipy) & + * ndaysi + cgrid%qmsqu_transp (t,ipy) = cgrid%qmsqu_transp (t,ipy) & + + cgrid%fmean_transp (ipy) & + * cgrid%fmean_transp (ipy) & + * ndaysi + cgrid%qmsqu_sensible_wc (t,ipy) = cgrid%qmsqu_sensible_wc (t,ipy) & + + cgrid%fmean_sensible_wc (ipy) & + * cgrid%fmean_sensible_wc (ipy) & + * ndaysi + cgrid%qmsqu_vapor_wc (t,ipy) = cgrid%qmsqu_vapor_wc (t,ipy) & + + cgrid%fmean_vapor_wc (ipy) & + * cgrid%fmean_vapor_wc (ipy) & + * ndaysi + cgrid%qmsqu_rh (t,ipy) = cgrid%qmsqu_rh (t,ipy) & + + cgrid%fmean_rh (ipy) & + * cgrid%fmean_rh (ipy) & + * ndaysi + cgrid%qmsqu_cwd_rh (t,ipy) = cgrid%qmsqu_cwd_rh (t,ipy) & + + cgrid%fmean_cwd_rh (ipy) & + * cgrid%fmean_cwd_rh (ipy) & + * ndaysi + cgrid%qmsqu_nep (t,ipy) = cgrid%qmsqu_nep (t,ipy) & + + cgrid%fmean_nep (ipy) & + * cgrid%fmean_nep (ipy) & + * ndaysi + cgrid%qmsqu_rlongup (t,ipy) = cgrid%qmsqu_rlongup (t,ipy) & + + cgrid%fmean_rlongup (ipy) & + * cgrid%fmean_rlongup (ipy) & + * ndaysi + cgrid%qmsqu_parup (t,ipy) = cgrid%qmsqu_parup (t,ipy) & + + cgrid%fmean_parup (ipy) & + * cgrid%fmean_parup (ipy) & + * ndaysi + cgrid%qmsqu_nirup (t,ipy) = cgrid%qmsqu_nirup (t,ipy) & + + cgrid%fmean_nirup (ipy) & + * cgrid%fmean_nirup (ipy) & + * ndaysi + cgrid%qmsqu_rshortup (t,ipy) = cgrid%qmsqu_rshortup (t,ipy) & + + cgrid%fmean_rshortup (ipy) & + * cgrid%fmean_rshortup (ipy) & + * ndaysi + cgrid%qmsqu_rnet (t,ipy) = cgrid%qmsqu_rnet (t,ipy) & + + cgrid%fmean_rnet (ipy) & + * cgrid%fmean_rnet (ipy) & + * ndaysi + cgrid%qmsqu_albedo (t,ipy) = cgrid%qmsqu_albedo (t,ipy) & + + cgrid%fmean_albedo (ipy) & + * cgrid%fmean_albedo (ipy) & + * ndaysi + cgrid%qmsqu_ustar (t,ipy) = cgrid%qmsqu_ustar (t,ipy) & + + cgrid%fmean_ustar (ipy) & + * cgrid%fmean_ustar (ipy) & + * ndaysi + cgrid%qmsqu_carbon_ac (t,ipy) = cgrid%qmsqu_carbon_ac (t,ipy) & + + cgrid%fmean_carbon_ac (ipy) & + * cgrid%fmean_carbon_ac (ipy) & + * ndaysi + cgrid%qmsqu_carbon_st (t,ipy) = cgrid%qmsqu_carbon_st (t,ipy) & + + cgrid%fmean_carbon_st (ipy) & + * cgrid%fmean_carbon_st (ipy) & + * ndaysi + cgrid%qmsqu_vapor_gc (t,ipy) = cgrid%qmsqu_vapor_gc (t,ipy) & + + cgrid%fmean_vapor_gc (ipy) & + * cgrid%fmean_vapor_gc (ipy) & + * ndaysi + cgrid%qmsqu_vapor_ac (t,ipy) = cgrid%qmsqu_vapor_ac (t,ipy) & + + cgrid%fmean_vapor_ac (ipy) & + * cgrid%fmean_vapor_ac (ipy) & + * ndaysi + cgrid%qmsqu_sensible_gc (t,ipy) = cgrid%qmsqu_sensible_gc (t,ipy) & + + cgrid%fmean_sensible_gc (ipy) & + * cgrid%fmean_sensible_gc (ipy) & + * ndaysi + cgrid%qmsqu_sensible_ac (t,ipy) = cgrid%qmsqu_sensible_ac (t,ipy) & + + cgrid%fmean_sensible_ac (ipy) & + * cgrid%fmean_sensible_ac (ipy) & + * ndaysi + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + ! Site loop. ! + !------------------------------------------------------------------------------------! + siteloop: do isi=1,cpoly%nsites + csite => cpoly%site(isi) + + !---------------------------------------------------------------------------------! + ! Integrate site-level variables. ! + !---------------------------------------------------------------------------------! + cpoly%qmean_atm_theiv (t,isi) = cpoly%qmean_atm_theiv (t,isi) & + + cpoly%fmean_atm_theiv (isi) & + * ndaysi + cpoly%qmean_atm_theta (t,isi) = cpoly%qmean_atm_theta (t,isi) & + + cpoly%fmean_atm_theta (isi) & + * ndaysi + cpoly%qmean_atm_vpdef (t,isi) = cpoly%qmean_atm_vpdef (t,isi) & + + cpoly%fmean_atm_vpdef (isi) & + * ndaysi + cpoly%qmean_atm_shv (t,isi) = cpoly%qmean_atm_shv (t,isi) & + + cpoly%fmean_atm_shv (isi) & + * ndaysi + cpoly%qmean_atm_rshort (t,isi) = cpoly%qmean_atm_rshort (t,isi) & + + cpoly%fmean_atm_rshort (isi) & + * ndaysi + cpoly%qmean_atm_rshort_diff(t,isi) = cpoly%qmean_atm_rshort_diff(t,isi) & + + cpoly%fmean_atm_rshort_diff (isi) & + * ndaysi + cpoly%qmean_atm_par (t,isi) = cpoly%qmean_atm_par (t,isi) & + + cpoly%fmean_atm_par (isi) & + * ndaysi + cpoly%qmean_atm_par_diff (t,isi) = cpoly%qmean_atm_par_diff (t,isi) & + + cpoly%fmean_atm_par_diff (isi) & + * ndaysi + cpoly%qmean_atm_rlong (t,isi) = cpoly%qmean_atm_rlong (t,isi) & + + cpoly%fmean_atm_rlong (isi) & + * ndaysi + cpoly%qmean_atm_vels (t,isi) = cpoly%qmean_atm_vels (t,isi) & + + cpoly%fmean_atm_vels (isi) & + * ndaysi + cpoly%qmean_atm_prss (t,isi) = cpoly%qmean_atm_prss (t,isi) & + + cpoly%fmean_atm_prss (isi) & + * ndaysi + cpoly%qmean_atm_co2 (t,isi) = cpoly%qmean_atm_co2 (t,isi) & + + cpoly%fmean_atm_co2 (isi) & + * ndaysi + cpoly%qmean_pcpg (t,isi) = cpoly%qmean_pcpg (t,isi) & + + cpoly%fmean_pcpg (isi) & + * ndaysi + cpoly%qmean_qpcpg (t,isi) = cpoly%qmean_qpcpg (t,isi) & + + cpoly%fmean_qpcpg (isi) & + * ndaysi + cpoly%qmean_dpcpg (t,isi) = cpoly%qmean_dpcpg (t,isi) & + + cpoly%fmean_dpcpg (isi) & + * ndaysi + !---------------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------------! + ! Patch loop. ! + !---------------------------------------------------------------------------------! + patchloop: do ipa=1,csite%npatches + cpatch => csite%patch(ipa) + + !------------------------------------------------------------------------------! + ! Integrate patch-level variables. ! + !------------------------------------------------------------------------------! + csite%qmean_rh (t,ipa) = csite%qmean_rh (t,ipa) & + + csite%fmean_rh (ipa) & + * ndaysi + csite%qmean_cwd_rh (t,ipa) = csite%qmean_cwd_rh (t,ipa) & + + csite%fmean_cwd_rh (ipa) & + * ndaysi + csite%qmean_nep (t,ipa) = csite%qmean_nep (t,ipa) & + + csite%fmean_nep (ipa) & + * ndaysi + csite%qmean_rk4step (t,ipa) = csite%qmean_rk4step (t,ipa) & + + csite%fmean_rk4step (ipa) & + * ndaysi + csite%qmean_available_water (t,ipa) = csite%qmean_available_water (t,ipa) & + + csite%fmean_available_water (ipa) & + * ndaysi + csite%qmean_can_theiv (t,ipa) = csite%qmean_can_theiv (t,ipa) & + + csite%fmean_can_theiv (ipa) & + * ndaysi + csite%qmean_can_theta (t,ipa) = csite%qmean_can_theta (t,ipa) & + + csite%fmean_can_theta (ipa) & + * ndaysi + csite%qmean_can_vpdef (t,ipa) = csite%qmean_can_vpdef (t,ipa) & + + csite%fmean_can_vpdef (ipa) & + * ndaysi + csite%qmean_can_shv (t,ipa) = csite%qmean_can_shv (t,ipa) & + + csite%fmean_can_shv (ipa) & + * ndaysi + csite%qmean_can_co2 (t,ipa) = csite%qmean_can_co2 (t,ipa) & + + csite%fmean_can_co2 (ipa) & + * ndaysi + csite%qmean_can_prss (t,ipa) = csite%qmean_can_prss (t,ipa) & + + csite%fmean_can_prss (ipa) & + * ndaysi + csite%qmean_gnd_temp (t,ipa) = csite%qmean_gnd_temp (t,ipa) & + + csite%fmean_gnd_temp (ipa) & + * ndaysi + csite%qmean_gnd_shv (t,ipa) = csite%qmean_gnd_shv (t,ipa) & + + csite%fmean_gnd_shv (ipa) & + * ndaysi + csite%qmean_can_ggnd (t,ipa) = csite%qmean_can_ggnd (t,ipa) & + + csite%fmean_can_ggnd (ipa) & + * ndaysi + csite%qmean_sfcw_depth (t,ipa) = csite%qmean_sfcw_depth (t,ipa) & + + csite%fmean_sfcw_depth (ipa) & + * ndaysi + !------ Integrate pounding internal energy in extensive format [J/m2]. --------! + csite%qmean_sfcw_energy (t,ipa) = csite%qmean_sfcw_energy (t,ipa) & + + csite%fmean_sfcw_energy (ipa) & + * csite%fmean_sfcw_mass (ipa) & + * ndaysi + csite%qmean_sfcw_mass (t,ipa) = csite%qmean_sfcw_mass (t,ipa) & + + csite%fmean_sfcw_mass (ipa) & + * ndaysi + csite%qmean_soil_energy (:,t,ipa) = csite%qmean_soil_energy (:,t,ipa) & + + csite%fmean_soil_energy (:,ipa) & + * ndaysi + csite%qmean_soil_mstpot (:,t,ipa) = csite%qmean_soil_mstpot (:,t,ipa) & + + csite%fmean_soil_mstpot (:,ipa) & + * ndaysi + csite%qmean_soil_water (:,t,ipa) = csite%qmean_soil_water (:,t,ipa) & + + csite%fmean_soil_water (:,ipa) & + * ndaysi + csite%qmean_rshort_gnd (t,ipa) = csite%qmean_rshort_gnd (t,ipa) & + + csite%fmean_rshort_gnd (ipa) & + * ndaysi + csite%qmean_par_gnd (t,ipa) = csite%qmean_par_gnd (t,ipa) & + + csite%fmean_par_gnd (ipa) & + * ndaysi + csite%qmean_rlong_gnd (t,ipa) = csite%qmean_rlong_gnd (t,ipa) & + + csite%fmean_rlong_gnd (ipa) & + * ndaysi + csite%qmean_rlongup (t,ipa) = csite%qmean_rlongup (t,ipa) & + + csite%fmean_rlongup (ipa) & + * ndaysi + csite%qmean_parup (t,ipa) = csite%qmean_parup (t,ipa) & + + csite%fmean_parup (ipa) & + * ndaysi + csite%qmean_nirup (t,ipa) = csite%qmean_nirup (t,ipa) & + + csite%fmean_nirup (ipa) & + * ndaysi + csite%qmean_rshortup (t,ipa) = csite%qmean_rshortup (t,ipa) & + + csite%fmean_rshortup (ipa) & + * ndaysi + csite%qmean_rnet (t,ipa) = csite%qmean_rnet (t,ipa) & + + csite%fmean_rnet (ipa) & + * ndaysi + csite%qmean_albedo (t,ipa) = csite%qmean_albedo (t,ipa) & + + csite%fmean_albedo (ipa) & + * ndaysi + csite%qmean_albedo_beam (t,ipa) = csite%qmean_albedo_beam (t,ipa) & + + csite%fmean_albedo_beam (ipa) & + * ndaysi + csite%qmean_albedo_diff (t,ipa) = csite%qmean_albedo_diff (t,ipa) & + + csite%fmean_albedo_diff (ipa) & + * ndaysi + csite%qmean_rlong_albedo (t,ipa) = csite%qmean_rlong_albedo (t,ipa) & + + csite%fmean_rlong_albedo (ipa) & + * ndaysi + csite%qmean_ustar (t,ipa) = csite%qmean_ustar (t,ipa) & + + csite%fmean_ustar (ipa) & + * ndaysi + csite%qmean_tstar (t,ipa) = csite%qmean_tstar (t,ipa) & + + csite%fmean_tstar (ipa) & + * ndaysi + csite%qmean_qstar (t,ipa) = csite%qmean_qstar (t,ipa) & + + csite%fmean_qstar (ipa) & + * ndaysi + csite%qmean_cstar (t,ipa) = csite%qmean_cstar (t,ipa) & + + csite%fmean_cstar (ipa) & + * ndaysi + csite%qmean_carbon_ac (t,ipa) = csite%qmean_carbon_ac (t,ipa) & + + csite%fmean_carbon_ac (ipa) & + * ndaysi + csite%qmean_carbon_st (t,ipa) = csite%qmean_carbon_st (t,ipa) & + + csite%fmean_carbon_st (ipa) & + * ndaysi + csite%qmean_vapor_gc (t,ipa) = csite%qmean_vapor_gc (t,ipa) & + + csite%fmean_vapor_gc (ipa) & + * ndaysi + csite%qmean_vapor_ac (t,ipa) = csite%qmean_vapor_ac (t,ipa) & + + csite%fmean_vapor_ac (ipa) & + * ndaysi + csite%qmean_smoist_gg (:,t,ipa) = csite%qmean_smoist_gg (:,t,ipa) & + + csite%fmean_smoist_gg (:,ipa) & + * ndaysi + csite%qmean_throughfall (t,ipa) = csite%qmean_throughfall (t,ipa) & + + csite%fmean_throughfall (ipa) & + * ndaysi + csite%qmean_transloss (:,t,ipa) = csite%qmean_transloss (:,t,ipa) & + + csite%fmean_transloss (:,ipa) & + * ndaysi + csite%qmean_runoff (t,ipa) = csite%qmean_runoff (t,ipa) & + + csite%fmean_runoff (ipa) & + * ndaysi + csite%qmean_drainage (t,ipa) = csite%qmean_drainage (t,ipa) & + + csite%fmean_drainage (ipa) & + * ndaysi + csite%qmean_sensible_gc (t,ipa) = csite%qmean_sensible_gc (t,ipa) & + + csite%fmean_sensible_gc (ipa) & + * ndaysi + csite%qmean_sensible_ac (t,ipa) = csite%qmean_sensible_ac (t,ipa) & + + csite%fmean_sensible_ac (ipa) & + * ndaysi + csite%qmean_sensible_gg (:,t,ipa) = csite%qmean_sensible_gg (:,t,ipa) & + + csite%fmean_sensible_gg (:,ipa) & + * ndaysi + csite%qmean_qthroughfall (t,ipa) = csite%qmean_qthroughfall (t,ipa) & + + csite%fmean_qthroughfall (ipa) & + * ndaysi + csite%qmean_qrunoff (t,ipa) = csite%qmean_qrunoff (t,ipa) & + + csite%fmean_qrunoff (ipa) & + * ndaysi + csite%qmean_qdrainage (t,ipa) = csite%qmean_qdrainage (t,ipa) & + + csite%fmean_qdrainage (ipa) & + * ndaysi + !------ Integrate the mean sum of squares. ------------------------------------! + csite%qmsqu_rh (t,ipa) = csite%qmsqu_rh (t,ipa) & + + csite%fmean_rh (ipa) & + * csite%fmean_rh (ipa) & + * ndaysi + csite%qmsqu_cwd_rh (t,ipa) = csite%qmsqu_cwd_rh (t,ipa) & + + csite%fmean_cwd_rh (ipa) & + * csite%fmean_cwd_rh (ipa) & + * ndaysi + csite%qmsqu_nep (t,ipa) = csite%qmsqu_nep (t,ipa) & + + csite%fmean_nep (ipa) & + * csite%fmean_nep (ipa) & + * ndaysi + csite%qmsqu_rlongup (t,ipa) = csite%qmsqu_rlongup (t,ipa) & + + csite%fmean_rlongup (ipa) & + * csite%fmean_rlongup (ipa) & + * ndaysi + csite%qmsqu_parup (t,ipa) = csite%qmsqu_parup (t,ipa) & + + csite%fmean_parup (ipa) & + * csite%fmean_parup (ipa) & + * ndaysi + csite%qmsqu_nirup (t,ipa) = csite%qmsqu_nirup (t,ipa) & + + csite%fmean_nirup (ipa) & + * csite%fmean_nirup (ipa) & + * ndaysi + csite%qmsqu_rshortup (t,ipa) = csite%qmsqu_rshortup (t,ipa) & + + csite%fmean_rshortup (ipa) & + * csite%fmean_rshortup (ipa) & + * ndaysi + csite%qmsqu_rnet (t,ipa) = csite%qmsqu_rnet (t,ipa) & + + csite%fmean_rnet (ipa) & + * csite%fmean_rnet (ipa) & + * ndaysi + csite%qmsqu_albedo (t,ipa) = csite%qmsqu_albedo (t,ipa) & + + csite%fmean_albedo (ipa) & + * csite%fmean_albedo (ipa) & + * ndaysi + csite%qmsqu_ustar (t,ipa) = csite%qmsqu_ustar (t,ipa) & + + csite%fmean_ustar (ipa) & + * csite%fmean_ustar (ipa) & + * ndaysi + csite%qmsqu_carbon_ac (t,ipa) = csite%qmsqu_carbon_ac (t,ipa) & + + csite%fmean_carbon_ac (ipa) & + * csite%fmean_carbon_ac (ipa) & + * ndaysi + csite%qmsqu_carbon_st (t,ipa) = csite%qmsqu_carbon_st (t,ipa) & + + csite%fmean_carbon_st (ipa) & + * csite%fmean_carbon_st (ipa) & + * ndaysi + csite%qmsqu_vapor_gc (t,ipa) = csite%qmsqu_vapor_gc (t,ipa) & + + csite%fmean_vapor_gc (ipa) & + * csite%fmean_vapor_gc (ipa) & + * ndaysi + csite%qmsqu_vapor_ac (t,ipa) = csite%qmsqu_vapor_ac (t,ipa) & + + csite%fmean_vapor_ac (ipa) & + * csite%fmean_vapor_ac (ipa) & + * ndaysi + csite%qmsqu_sensible_gc (t,ipa) = csite%qmsqu_sensible_gc (t,ipa) & + + csite%fmean_sensible_gc (ipa) & + * csite%fmean_sensible_gc (ipa) & + * ndaysi + csite%qmsqu_sensible_ac (t,ipa) = csite%qmsqu_sensible_ac (t,ipa) & + + csite%fmean_sensible_ac (ipa) & + * csite%fmean_sensible_ac (ipa) & + * ndaysi + !------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------! + ! Patch loop. ! + !------------------------------------------------------------------------------! + cohortloop: do ico=1,cpatch%ncohorts + !---------------------------------------------------------------------------! + ! Integrate cohort-level variables. ! + !---------------------------------------------------------------------------! + cpatch%qmean_gpp (t,ico) = cpatch%qmean_gpp (t,ico) & + + cpatch%fmean_gpp (ico) & + * ndaysi + cpatch%qmean_npp (t,ico) = cpatch%qmean_npp (t,ico) & + + cpatch%fmean_npp (ico) & + * ndaysi + cpatch%qmean_leaf_resp (t,ico) = cpatch%qmean_leaf_resp (t,ico) & + + cpatch%fmean_leaf_resp (ico) & + * ndaysi + cpatch%qmean_root_resp (t,ico) = cpatch%qmean_root_resp (t,ico) & + + cpatch%fmean_root_resp (ico) & + * ndaysi + cpatch%qmean_growth_resp (t,ico) = cpatch%qmean_growth_resp (t,ico) & + + cpatch%fmean_growth_resp (ico) & + * ndaysi + cpatch%qmean_storage_resp (t,ico) = cpatch%qmean_storage_resp (t,ico) & + + cpatch%fmean_storage_resp (ico) & + * ndaysi + cpatch%qmean_vleaf_resp (t,ico) = cpatch%qmean_vleaf_resp (t,ico) & + + cpatch%fmean_vleaf_resp (ico) & + * ndaysi + cpatch%qmean_plresp (t,ico) = cpatch%qmean_plresp (t,ico) & + + cpatch%fmean_plresp (ico) & + * ndaysi + cpatch%qmean_leaf_energy (t,ico) = cpatch%qmean_leaf_energy (t,ico) & + + cpatch%fmean_leaf_energy (ico) & + * ndaysi + cpatch%qmean_leaf_water (t,ico) = cpatch%qmean_leaf_water (t,ico) & + + cpatch%fmean_leaf_water (ico) & + * ndaysi + cpatch%qmean_leaf_hcap (t,ico) = cpatch%qmean_leaf_hcap (t,ico) & + + cpatch%fmean_leaf_hcap (ico) & + * ndaysi + cpatch%qmean_leaf_vpdef (t,ico) = cpatch%qmean_leaf_vpdef (t,ico) & + + cpatch%fmean_leaf_vpdef (ico) & + * ndaysi + cpatch%qmean_leaf_gsw (t,ico) = cpatch%qmean_leaf_gsw (t,ico) & + + cpatch%fmean_leaf_gsw (ico) & + * ndaysi + cpatch%qmean_leaf_gbw (t,ico) = cpatch%qmean_leaf_gbw (t,ico) & + + cpatch%fmean_leaf_gbw (ico) & + * ndaysi + cpatch%qmean_wood_energy (t,ico) = cpatch%qmean_wood_energy (t,ico) & + + cpatch%fmean_wood_energy (ico) & + * ndaysi + cpatch%qmean_wood_water (t,ico) = cpatch%qmean_wood_water (t,ico) & + + cpatch%fmean_wood_water (ico) & + * ndaysi + cpatch%qmean_wood_hcap (t,ico) = cpatch%qmean_wood_hcap (t,ico) & + + cpatch%fmean_wood_hcap (ico) & + * ndaysi + cpatch%qmean_wood_gbw (t,ico) = cpatch%qmean_wood_gbw (t,ico) & + + cpatch%fmean_wood_gbw (ico) & + * ndaysi + cpatch%qmean_fs_open (t,ico) = cpatch%qmean_fs_open (t,ico) & + + cpatch%fmean_fs_open (ico) & + * ndaysi + cpatch%qmean_fsw (t,ico) = cpatch%qmean_fsw (t,ico) & + + cpatch%fmean_fsw (ico) & + * ndaysi + cpatch%qmean_fsn (t,ico) = cpatch%qmean_fsn (t,ico) & + + cpatch%fmean_fsn (ico) & + * ndaysi + cpatch%qmean_psi_open (t,ico) = cpatch%qmean_psi_open (t,ico) & + + cpatch%fmean_psi_open (ico) & + * ndaysi + cpatch%qmean_psi_closed (t,ico) = cpatch%qmean_psi_closed (t,ico) & + + cpatch%fmean_psi_closed (ico) & + * ndaysi + cpatch%qmean_water_supply (t,ico) = cpatch%qmean_water_supply (t,ico) & + + cpatch%fmean_water_supply (ico) & + * ndaysi + cpatch%qmean_light_level (t,ico) = cpatch%qmean_light_level (t,ico) & + + cpatch%fmean_light_level (ico) & + * ndaysi + cpatch%qmean_light_level_beam(t,ico) = cpatch%qmean_light_level_beam(t,ico) & + + cpatch%fmean_light_level_beam (ico) & + * ndaysi + cpatch%qmean_light_level_diff(t,ico) = cpatch%qmean_light_level_diff(t,ico) & + + cpatch%fmean_light_level_diff (ico) & + * ndaysi + cpatch%qmean_par_l (t,ico) = cpatch%qmean_par_l (t,ico) & + + cpatch%fmean_par_l (ico) & + * ndaysi + cpatch%qmean_par_l_beam (t,ico) = cpatch%qmean_par_l_beam (t,ico) & + + cpatch%fmean_par_l_beam (ico) & + * ndaysi + cpatch%qmean_par_l_diff (t,ico) = cpatch%qmean_par_l_diff (t,ico) & + + cpatch%fmean_par_l_diff (ico) & + * ndaysi + cpatch%qmean_rshort_l (t,ico) = cpatch%qmean_rshort_l (t,ico) & + + cpatch%fmean_rshort_l (ico) & + * ndaysi + cpatch%qmean_rlong_l (t,ico) = cpatch%qmean_rlong_l (t,ico) & + + cpatch%fmean_rlong_l (ico) & + * ndaysi + cpatch%qmean_sensible_lc (t,ico) = cpatch%qmean_sensible_lc (t,ico) & + + cpatch%fmean_sensible_lc (ico) & + * ndaysi + cpatch%qmean_vapor_lc (t,ico) = cpatch%qmean_vapor_lc (t,ico) & + + cpatch%fmean_vapor_lc (ico) & + * ndaysi + cpatch%qmean_transp (t,ico) = cpatch%qmean_transp (t,ico) & + + cpatch%fmean_transp (ico) & + * ndaysi + cpatch%qmean_intercepted_al (t,ico) = cpatch%qmean_intercepted_al (t,ico) & + + cpatch%fmean_intercepted_al (ico) & + * ndaysi + cpatch%qmean_wshed_lg (t,ico) = cpatch%qmean_wshed_lg (t,ico) & + + cpatch%fmean_wshed_lg (ico) & + * ndaysi + cpatch%qmean_rshort_w (t,ico) = cpatch%qmean_rshort_w (t,ico) & + + cpatch%fmean_rshort_w (ico) & + * ndaysi + cpatch%qmean_rlong_w (t,ico) = cpatch%qmean_rlong_w (t,ico) & + + cpatch%fmean_rlong_w (ico) & + * ndaysi + cpatch%qmean_sensible_wc (t,ico) = cpatch%qmean_sensible_wc (t,ico) & + + cpatch%fmean_sensible_wc (ico) & + * ndaysi + cpatch%qmean_vapor_wc (t,ico) = cpatch%qmean_vapor_wc (t,ico) & + + cpatch%fmean_vapor_wc (ico) & + * ndaysi + cpatch%qmean_intercepted_aw (t,ico) = cpatch%qmean_intercepted_aw (t,ico) & + + cpatch%fmean_intercepted_aw (ico) & + * ndaysi + cpatch%qmean_wshed_wg (t,ico) = cpatch%qmean_wshed_wg (t,ico) & + + cpatch%fmean_wshed_wg (ico) & + * ndaysi + !------ Mean sum of squares. -----------------------------------------------! + cpatch%qmsqu_gpp (t,ico) = cpatch%qmsqu_gpp (t,ico) & + + cpatch%fmean_gpp (ico) & + * cpatch%fmean_gpp (ico) & + * ndaysi + cpatch%qmsqu_npp (t,ico) = cpatch%qmsqu_npp (t,ico) & + + cpatch%fmean_npp (ico) & + * cpatch%fmean_npp (ico) & + * ndaysi + cpatch%qmsqu_plresp (t,ico) = cpatch%qmsqu_plresp (t,ico) & + + cpatch%fmean_plresp (ico) & + * cpatch%fmean_plresp (ico) & + * ndaysi + cpatch%qmsqu_sensible_lc (t,ico) = cpatch%qmsqu_sensible_lc (t,ico) & + + cpatch%fmean_sensible_lc (ico) & + * cpatch%fmean_sensible_lc (ico) & + * ndaysi + cpatch%qmsqu_vapor_lc (t,ico) = cpatch%qmsqu_vapor_lc (t,ico) & + + cpatch%fmean_vapor_lc (ico) & + * cpatch%fmean_vapor_lc (ico) & + * ndaysi + cpatch%qmsqu_transp (t,ico) = cpatch%qmsqu_transp (t,ico) & + + cpatch%fmean_transp (ico) & + * cpatch%fmean_transp (ico) & + * ndaysi + cpatch%qmsqu_sensible_wc (t,ico) = cpatch%qmsqu_sensible_wc (t,ico) & + + cpatch%fmean_sensible_wc (ico) & + * cpatch%fmean_sensible_wc (ico) & + * ndaysi + cpatch%qmsqu_vapor_wc (t,ico) = cpatch%qmsqu_vapor_wc (t,ico) & + + cpatch%fmean_vapor_wc (ico) & + * cpatch%fmean_vapor_wc (ico) & + * ndaysi + !---------------------------------------------------------------------------! + end do cohortloop + !------------------------------------------------------------------------------! + end do patchloop + !---------------------------------------------------------------------------------! + end do siteloop + !------------------------------------------------------------------------------------! + end do polyloop + !---------------------------------------------------------------------------------------! + return +end subroutine integrate_ed_qmean_vars +!==========================================================================================! +!==========================================================================================! + + + + + + +!==========================================================================================! +!==========================================================================================! +! This subroutine normalises the daily mean variables of those variables that could not ! +! be integrated directly. These are pretty much just temperature, density, and liquid ! +! water fraction. ! +!------------------------------------------------------------------------------------------! +subroutine normalize_ed_qmean_vars(cgrid) + use ed_state_vars , only : edtype & ! structure + , polygontype & ! structure + , sitetype & ! structure + , patchtype ! ! structure + use ed_misc_coms , only : ndcycle ! ! intent(in) + use therm_lib , only : press2exner & ! function + , extheta2temp & ! function + , uextcm2tl & ! subroutine + , uint2tl & ! subroutine + , idealdenssh ! ! function + use soil_coms , only : tiny_sfcwater_mass & ! intent(in) + , isoilbc & ! intent(in) + , soil & ! intent(in) + , dslz ! ! intent(in) + use consts_coms , only : t00 & ! intent(in) + , wdns ! ! intent(in) + use grid_coms , only : nzg ! ! intent(in) + implicit none + !----- Argument ------------------------------------------------------------------------! + type(edtype) , target :: cgrid + !----- Local variables -----------------------------------------------------------------! + type(polygontype) , pointer :: cpoly + type(sitetype) , pointer :: csite + type(patchtype) , pointer :: cpatch + real , dimension(nzg) :: cgrid_qmean_soil_hcap + integer :: ipy + integer :: isi + integer :: ipa + integer :: ico + integer :: nsoil + integer :: k + integer :: t + real :: can_exner + real :: atm_exner + real :: site_area_i + real :: poly_area_i + real :: site_wgt + real :: patch_wgt + !---------------------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------------------! + ! Use the variables that have been already aggregated. ! + !---------------------------------------------------------------------------------------! + polyloop: do ipy=1,cgrid%npolygons + cpoly => cgrid%polygon(ipy) + + + !----- Inverse of this polygon area (it should be always 1.) ------------------------! + poly_area_i = 1./sum(cpoly%area) + !------------------------------------------------------------------------------------! + + !----- Re-set some support variables. -----------------------------------------------! + cgrid_qmean_soil_hcap(:) = 0.0 + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + ! Site loop. ! + !------------------------------------------------------------------------------------! + siteloop: do isi=1,cpoly%nsites + csite => cpoly%site(isi) + + !----- Inverse of this site area (it should be always 1.) ------------------------! + site_area_i = 1./sum(csite%area) + !---------------------------------------------------------------------------------! + + + !----- Site weight. --------------------------------------------------------------! + site_wgt = cpoly%area(isi) * poly_area_i + !---------------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------------! + ! Find the derived properties for the air above canopy. ! + !---------------------------------------------------------------------------------! + do t=1,ndcycle + atm_exner = press2exner ( cpoly%qmean_atm_prss (t,isi) ) + cpoly%qmean_atm_temp(t,isi) = extheta2temp( atm_exner & + , cpoly%qmean_atm_theta (t,isi) ) + cpoly%qmean_atm_rhos(t,isi) = idealdenssh ( cpoly%qmean_atm_prss (t,isi) & + , cpoly%qmean_atm_temp (t,isi) & + , cpoly%qmean_atm_shv (t,isi) ) + end do + !---------------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------------! + ! Patch loop. ! + !---------------------------------------------------------------------------------! + patchloop: do ipa=1,csite%npatches + cpatch => csite%patch(ipa) + + + !----- Site weight. -----------------------------------------------------------! + patch_wgt = csite%area(ipa) * site_area_i * site_wgt + !------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------! + ! Soil matric potential, temperature, and liquid water. ! + !------------------------------------------------------------------------------! + do k=1,nzg + nsoil = cpoly%ntext_soil(k,isi) + + !----- Heat capacity stays outside the time loop. --------------------------! + cgrid_qmean_soil_hcap(k) = cgrid_qmean_soil_hcap(k) & + + soil(nsoil)%slcpd * patch_wgt + !---------------------------------------------------------------------------! - !----- Finding the polygon-level monthly mean for residuals. ---------------------! - cpoly%mmean_co2_residual(isi) = cpoly%mmean_co2_residual(isi) * ndaysi - cpoly%mmean_energy_residual(isi) = cpoly%mmean_energy_residual(isi) * ndaysi - cpoly%mmean_water_residual(isi) = cpoly%mmean_water_residual(isi) * ndaysi - site_area_i = 1./sum(csite%area) - !---------------------------------------------------------------------------------! - ! Finding the total "forest" area. By forest we mean the fraction of land ! - ! that is not agriculture, even if the area is not a forest. ! - !---------------------------------------------------------------------------------! - forest_area_i = sum(csite%area,csite%dist_type /= 1) - if (forest_area_i > 1.e-6) then - forest_area_i = 1. / forest_area_i - else - forest_area_i = 0. ! Tiny forest area, we will neglect it in this site. - end if - !---------------------------------------------------------------------------------! - - !----- Flushing all site-level variables to zero before integrating site. --------! - cpoly%pldens (:,:,isi) = 0. - cpoly%bseeds (:,:,isi) = 0. + !---------------------------------------------------------------------------! + ! Find the soil properties, and integrate polygon-level soil matric ! + ! potential. ! + !---------------------------------------------------------------------------! + do t=1,ndcycle + call uextcm2tl( csite%qmean_soil_energy(k,t,ipa) & + , csite%qmean_soil_water (k,t,ipa) * wdns & + , soil(nsoil)%slcpd & + , csite%qmean_soil_temp (k,t,ipa) & + , csite%qmean_soil_fliq (k,t,ipa)) + end do + !---------------------------------------------------------------------------! + end do + !------------------------------------------------------------------------------! - !----- Flushing all patch-level variables to zero before integrating patch. ------! - pss_bseeds_pft (:) = 0. - pss_bseeds (:,:) = 0. - pss_pldens (:,:) = 0. - patchloop: do ipa=1,csite%npatches - !------------------------------------------------------------------------------! - ! Residual of fast-scale budgets. We hope that this is tiny... ! - !------------------------------------------------------------------------------! - csite%mmean_co2_residual(ipa) = csite%mmean_co2_residual(ipa) * ndaysi - csite%mmean_energy_residual(ipa) = csite%mmean_energy_residual(ipa) * ndaysi - csite%mmean_water_residual(ipa) = csite%mmean_water_residual(ipa) * ndaysi - csite%mmean_rh(ipa) = csite%mmean_rh(ipa) * ndaysi - csite%mmean_cwd_rh(ipa) = csite%mmean_cwd_rh(ipa) * ndaysi - csite%mmean_rk4step(ipa) = csite%mmean_rk4step(ipa) * ndaysi - csite%mmean_A_decomp(ipa) = csite%mmean_A_decomp(ipa) * ndaysi - csite%mmean_Af_decomp(ipa) = csite%mmean_Af_decomp(ipa) * ndaysi - csite%mmean_albedo(ipa) = csite%mmean_albedo(ipa) * ndaysi - csite%mmean_albedo_beam(ipa) = csite%mmean_albedo_beam(ipa) * ndaysi - csite%mmean_albedo_diffuse(ipa) = csite%mmean_albedo_diffuse(ipa) * ndaysi !------------------------------------------------------------------------------! - ! Determining whether this is an agricultural patch or not. Age and size ! - ! distribution is done only for primary and secondary vegetation. ! + ! If the patch had some temporary snow/pounding layer, convert the mean ! + ! energy to J/kg, then find the mean temperature and liquid fraction. Other- ! + ! wise, set them to either zero or default values. ! + !------------------------------------------------------------------------------! + do t=1,ndcycle + if (csite%qmean_sfcw_mass(t,ipa) > tiny_sfcwater_mass) then + csite%qmean_sfcw_energy(t,ipa) = csite%qmean_sfcw_energy(t,ipa) & + / csite%qmean_sfcw_mass (t,ipa) + call uint2tl( csite%qmean_sfcw_energy(t,ipa) & + , csite%qmean_sfcw_temp (t,ipa) & + , csite%qmean_sfcw_fliq (t,ipa)) + else + csite%qmean_sfcw_mass (t,ipa) = 0. + csite%qmean_sfcw_depth (t,ipa) = 0. + csite%qmean_sfcw_energy(t,ipa) = 0. + csite%qmean_sfcw_temp (t,ipa) = csite%qmean_soil_temp(nzg,t,ipa) + csite%qmean_sfcw_fliq (t,ipa) = csite%qmean_soil_fliq(nzg,t,ipa) + end if + end do !------------------------------------------------------------------------------! - forest = csite%dist_type(ipa) /= 1 - cpatch => csite%patch(ipa) - cohortloop: do ico = 1, cpatch%ncohorts - !----- Find the carbon fluxes. ---------------------------------------------! - cpatch%mmean_gpp (ico) = cpatch%mmean_gpp (ico) & - * ndaysi - cpatch%mmean_nppleaf (ico) = cpatch%mmean_nppleaf (ico) & - * ndaysi - cpatch%mmean_nppfroot (ico) = cpatch%mmean_nppfroot (ico) & - * ndaysi - cpatch%mmean_nppsapwood (ico) = cpatch%mmean_nppsapwood (ico) & - * ndaysi - cpatch%mmean_nppcroot (ico) = cpatch%mmean_nppcroot (ico) & - * ndaysi - cpatch%mmean_nppseeds (ico) = cpatch%mmean_nppseeds (ico) & - * ndaysi - cpatch%mmean_nppwood (ico) = cpatch%mmean_nppwood (ico) & - * ndaysi - cpatch%mmean_nppdaily (ico) = cpatch%mmean_nppdaily (ico) & - * ndaysi - cpatch%mmean_leaf_resp (ico) = cpatch%mmean_leaf_resp (ico) & - * ndaysi - cpatch%mmean_root_resp (ico) = cpatch%mmean_root_resp (ico) & - * ndaysi - cpatch%mmean_growth_resp (ico) = cpatch%mmean_growth_resp (ico) & - * ndaysi - cpatch%mmean_storage_resp (ico) = cpatch%mmean_storage_resp (ico) & - * ndaysi - cpatch%mmean_vleaf_resp (ico) = cpatch%mmean_vleaf_resp (ico) & - * ndaysi - cpatch%mmean_fsw (ico) = cpatch%mmean_fsw (ico) & - * ndaysi - cpatch%mmean_fsn (ico) = cpatch%mmean_fsn (ico) & - * ndaysi - cpatch%mmean_fs_open (ico) = cpatch%mmean_fs_open (ico) & - * ndaysi - cpatch%mmean_psi_open (ico) = cpatch%mmean_psi_open (ico) & - * ndaysi - cpatch%mmean_psi_closed (ico) = cpatch%mmean_psi_closed (ico) & - * ndaysi - cpatch%mmean_water_supply (ico) = cpatch%mmean_water_supply (ico) & - * ndaysi - cpatch%mmean_par_l (ico) = cpatch%mmean_par_l (ico) & - * ndaysi - cpatch%mmean_par_l_beam (ico) = cpatch%mmean_par_l_beam (ico) & - * ndaysi - cpatch%mmean_par_l_diff (ico) = cpatch%mmean_par_l_diff (ico) & - * ndaysi - cpatch%mmean_rshort_l (ico) = cpatch%mmean_rshort_l (ico) & - * ndaysi - cpatch%mmean_rlong_l (ico) = cpatch%mmean_rlong_l (ico) & - * ndaysi - cpatch%mmean_sensible_lc (ico) = cpatch%mmean_sensible_lc (ico) & - * ndaysi - cpatch%mmean_vapor_lc (ico) = cpatch%mmean_vapor_lc (ico) & - * ndaysi - cpatch%mmean_transp (ico) = cpatch%mmean_transp (ico) & - * ndaysi - cpatch%mmean_intercepted_al (ico) = cpatch%mmean_intercepted_al (ico) & - * ndaysi - cpatch%mmean_wshed_lg (ico) = cpatch%mmean_wshed_lg (ico) & - * ndaysi - cpatch%mmean_rshort_w (ico) = cpatch%mmean_rshort_w (ico) & - * ndaysi - cpatch%mmean_rlong_w (ico) = cpatch%mmean_rlong_w (ico) & - * ndaysi - cpatch%mmean_sensible_wc (ico) = cpatch%mmean_sensible_wc (ico) & - * ndaysi - cpatch%mmean_vapor_wc (ico) = cpatch%mmean_vapor_wc (ico) & - * ndaysi - cpatch%mmean_intercepted_aw (ico) = cpatch%mmean_intercepted_aw (ico) & - * ndaysi - cpatch%mmean_wshed_wg (ico) = cpatch%mmean_wshed_wg (ico) & - * ndaysi - cpatch%mmean_leaf_maintenance (ico) = cpatch%mmean_leaf_maintenance(ico) & - * ndaysi - cpatch%mmean_root_maintenance (ico) = cpatch%mmean_root_maintenance(ico) & - * ndaysi - cpatch%mmean_leaf_drop (ico) = cpatch%mmean_leaf_drop (ico) * ndaysi - !----- Mean carbon balance is re-scaled so it will be in kgC/plant/yr. -----! - cpatch%mmean_cb (ico) = cpatch%mmean_cb(ico) * ndaysi * yr_day - - !----- Find the mortality rates. -------------------------------------------! - do imt=1,n_mort - cpatch%mmean_mort_rate(imt,ico) = cpatch%mmean_mort_rate(imt,ico)*ndaysi - end do - !----- Finding the light level, ignoring changes in day time length... -----! - cpatch%mmean_light_level (ico) = cpatch%mmean_light_level(ico) & - * ndaysi - cpatch%mmean_light_level_beam (ico) = cpatch%mmean_light_level_beam(ico) & - * ndaysi - cpatch%mmean_light_level_diff (ico) = cpatch%mmean_light_level_diff(ico) & - * ndaysi - !----- Define to which PFT this cohort belongs. ----------------------------! - ipft = cpatch%pft(ico) + !------------------------------------------------------------------------------! + ! Cohort loop. ! + !------------------------------------------------------------------------------! + cohortloop: do ico=1,cpatch%ncohorts + - !----- Computing the total seed mass of this cohort. -----------------------! - cohort_seeds = cpatch%nplant(ico) * cpatch%bseeds(ico) - - pss_bseeds_pft(ipft) = pss_bseeds_pft(ipft) & - + cohort_seeds * csite%area(ipa) - - if (forest) then - !----- Define to which size (DBH) class this cohort belongs. ------------! - idbh = max(1,min(n_dbh,ceiling(cpatch%dbh(ico)*ddbhi))) - - !----- Increment the plant density. -------------------------------------! - pss_pldens(ipft,idbh) = pss_pldens(ipft,idbh) & - + cpatch%nplant(ico) * csite%area(ipa) - pss_bseeds(ipft,idbh) = pss_bseeds(ipft,idbh) & - + cohort_seeds * csite%area(ipa) - end if + !---------------------------------------------------------------------------! + ! Find the vegetation temperature and liquid fraction. ! + !---------------------------------------------------------------------------! + do t=1,ndcycle + !----- Leaf. ------------------------------------------------------------! + if (cpatch%qmean_leaf_hcap(t,ico) > 0.) then + call uextcm2tl( cpatch%qmean_leaf_energy(t,ico) & + , cpatch%qmean_leaf_water (t,ico) & + , cpatch%qmean_leaf_hcap (t,ico) & + , cpatch%qmean_leaf_temp (t,ico) & + , cpatch%qmean_leaf_fliq (t,ico) ) + else + cpatch%qmean_leaf_vpdef(t,ico) = csite%qmean_can_vpdef(t,ipa) + cpatch%qmean_leaf_temp (t,ico) = csite%qmean_can_temp (t,ipa) + if (csite%qmean_can_temp(t,ipa) > t00) then + cpatch%qmean_leaf_fliq(t,ico) = 1.0 + elseif (csite%qmean_can_temp(t,ipa) == t00) then + cpatch%qmean_leaf_fliq(t,ico) = 0.5 + else + cpatch%qmean_leaf_fliq(t,ico) = 0.0 + end if + end if + !----- Wood. ------------------------------------------------------------! + if (cpatch%qmean_wood_hcap(t,ico) > 0.) then + call uextcm2tl( cpatch%qmean_wood_energy(t,ico) & + , cpatch%qmean_wood_water (t,ico) & + , cpatch%qmean_wood_hcap (t,ico) & + , cpatch%qmean_wood_temp (t,ico) & + , cpatch%qmean_wood_fliq (t,ico) ) + else + cpatch%qmean_wood_temp(t,ico) = csite%qmean_can_temp(t,ipa) + if (csite%qmean_can_temp(t,ipa) > t00) then + cpatch%qmean_wood_fliq(t,ico) = 1.0 + elseif (csite%qmean_can_temp(t,ipa) == t00) then + cpatch%qmean_wood_fliq(t,ico) = 0.5 + else + cpatch%qmean_wood_fliq(t,ico) = 0.0 + end if + !---------------------------------------------------------------------! + end if + !------------------------------------------------------------------------! + end do + !---------------------------------------------------------------------------! end do cohortloop + !------------------------------------------------------------------------------! end do patchloop !---------------------------------------------------------------------------------! - ! We now increment the site-level variables. ! - !---------------------------------------------------------------------------------! - !----- PFT classes. --------------------------------------------------------------! - do ipft = 1,n_pft - sss_bseeds_pft(ipft) = sss_bseeds_pft(ipft) & - + pss_bseeds_pft(ipft) * site_area_i & - * cpoly%area(isi) - end do - !----- Size (DBH) classes. -------------------------------------------------------! - do idbh = 1,n_dbh - do ipft=1,n_pft - cpoly%pldens(ipft,idbh,isi) = cpoly%pldens(ipft,idbh,isi) & - + pss_pldens(ipft,idbh) * forest_area_i - cpoly%bseeds(ipft,idbh,isi) = cpoly%bseeds(ipft,idbh,isi) & - + pss_bseeds(ipft,idbh) * forest_area_i - end do - end do - !---------------------------------------------------------------------------------! end do siteloop - - !------------------------------------------------------------------------------------! - ! Incrementing the polygon-level variables. ! !------------------------------------------------------------------------------------! - !----- PFT classes. -----------------------------------------------------------------! - do ipft = 1,n_pft - cgrid%bseeds_pft(ipft,ipy) = cgrid%bseeds_pft(ipft,ipy) & - + sss_bseeds_pft(ipft) * poly_area_i - end do - !----- Size (DBH) classes. ----------------------------------------------------------! - do isi=1,cpoly%nsites - do idbh = 1,n_dbh - do ipft=1,n_pft - cgrid%pldens(ipft,idbh,ipy) = cgrid%pldens(ipft,idbh,ipy) & - + cpoly%pldens(ipft,idbh,isi) & - * cpoly%area(isi) * poly_area_i - cgrid%bseeds(ipft,idbh,ipy) = cgrid%bseeds(ipft,idbh,ipy) & - + cpoly%bseeds(ipft,idbh,isi) & - * cpoly%area(isi) * poly_area_i - end do - end do - end do + + + + !------------------------------------------------------------------------------------! - ! The mean diurnal cycle is normalised here. ! + ! Find the derived properties for the air above canopy. ! !------------------------------------------------------------------------------------! - if (iqoutput > 0) then - do t=1,ndcycle + do t=1,ndcycle + !---------------------------------------------------------------------------------! + ! Find the derived properties for the air above canopy. ! + !---------------------------------------------------------------------------------! + atm_exner = press2exner ( cgrid%qmean_atm_prss (t,ipy) ) + cgrid%qmean_atm_temp(t,ipy) = extheta2temp( atm_exner & + , cgrid%qmean_atm_theta (t,ipy) ) + cgrid%qmean_atm_rhos(t,ipy) = idealdenssh ( cgrid%qmean_atm_prss (t,ipy) & + , cgrid%qmean_atm_temp (t,ipy) & + , cgrid%qmean_atm_shv (t,ipy) ) + !---------------------------------------------------------------------------------! - !----- Initialise site sums (auxiliary variables). ----------------------------! - poly_area_i = 1./sum(cpoly%area) - sss_rh = 0. - sss_cwd_rh = 0. - sss_fsn = 0. - sss_fsw = 0. - sss_fs_open = 0. - !------------------------------------------------------------------------------! - do isi=1,cpoly%nsites - csite => cpoly%site(isi) - !----- Initialise patch sums (auxiliary variables). ------------------------! - pss_fsn = 0. - pss_fsw = 0. - pss_fs_open = 0. - !---------------------------------------------------------------------------! - do ipa = 1,csite%npatches - cpatch => csite%patch(ipa) + !---------------------------------------------------------------------------------! + ! Find the derived properties for the canopy air space. ! + !---------------------------------------------------------------------------------! + can_exner = press2exner ( cgrid%qmean_can_prss (t,ipy) ) + cgrid%qmean_can_temp(t,ipy) = extheta2temp( can_exner & + , cgrid%qmean_can_theta(t,ipy) ) + cgrid%qmean_can_rhos(t,ipy) = idealdenssh ( cgrid%qmean_can_prss (t,ipy) & + , cgrid%qmean_can_temp (t,ipy) & + , cgrid%qmean_can_shv (t,ipy) ) + !---------------------------------------------------------------------------------! - !----- Find whether there is at least one cohort that is solved. --------! - any_resolvable = .false. - if (cpatch%ncohorts > 0) then - any_resolvable = any(cpatch%leaf_resolvable(1:cpatch%ncohorts)) - end if - !------------------------------------------------------------------------! - do ico=1,cpatch%ncohorts - !----- Convert GPP and plant respiration to kgC/plant/year. ----------! - cpatch%qmean_gpp (t,ico)=cpatch%qmean_gpp (t,ico) & - *ndaysi - cpatch%qmean_leaf_resp (t,ico)=cpatch%qmean_leaf_resp (t,ico) & - *ndaysi - cpatch%qmean_root_resp (t,ico)=cpatch%qmean_root_resp (t,ico) & - *ndaysi - cpatch%qmean_fs_open (t,ico)=cpatch%qmean_fs_open (t,ico) & - *ndaysi * dtlsm_o_frqfast - cpatch%qmean_fsw (t,ico)=cpatch%qmean_fsw (t,ico) & - *ndaysi * dtlsm_o_frqfast - cpatch%qmean_fsn (t,ico)=cpatch%qmean_fsn (t,ico) & - *ndaysi * dtlsm_o_frqfast - cpatch%qmean_psi_open (t,ico)=cpatch%qmean_psi_open (t,ico) & - *ndaysi * dtlsm_o_frqfast - cpatch%qmean_psi_closed (t,ico)=cpatch%qmean_psi_closed (t,ico) & - *ndaysi * dtlsm_o_frqfast - cpatch%qmean_water_supply (t,ico)=cpatch%qmean_water_supply (t,ico) & - *ndaysi * dtlsm_o_frqfast - cpatch%qmean_par_l (t,ico)=cpatch%qmean_par_l (t,ico) & - *ndaysi - cpatch%qmean_par_l_beam (t,ico)=cpatch%qmean_par_l_beam (t,ico) & - *ndaysi - cpatch%qmean_par_l_diff (t,ico)=cpatch%qmean_par_l_diff (t,ico) & - *ndaysi - cpatch%qmean_rshort_l (t,ico)=cpatch%qmean_rshort_l (t,ico) & - *ndaysi - cpatch%qmean_rlong_l (t,ico)=cpatch%qmean_rlong_l (t,ico) & - *ndaysi - cpatch%qmean_sensible_lc (t,ico)=cpatch%qmean_sensible_lc (t,ico) & - *ndaysi - cpatch%qmean_vapor_lc (t,ico)=cpatch%qmean_vapor_lc (t,ico) & - *ndaysi - cpatch%qmean_transp (t,ico)=cpatch%qmean_transp (t,ico) & - *ndaysi - cpatch%qmean_intercepted_al(t,ico)=cpatch%qmean_intercepted_al(t,ico) & - *ndaysi - cpatch%qmean_wshed_lg (t,ico)=cpatch%qmean_wshed_lg (t,ico) & - *ndaysi - cpatch%qmean_rshort_w (t,ico)=cpatch%qmean_rshort_w (t,ico) & - *ndaysi - cpatch%qmean_rlong_w (t,ico)=cpatch%qmean_rlong_w (t,ico) & - *ndaysi - cpatch%qmean_sensible_wc (t,ico)=cpatch%qmean_sensible_wc (t,ico) & - *ndaysi - cpatch%qmean_vapor_wc (t,ico)=cpatch%qmean_vapor_wc (t,ico) & - *ndaysi - cpatch%qmean_intercepted_aw(t,ico)=cpatch%qmean_intercepted_aw(t,ico) & - *ndaysi - cpatch%qmean_wshed_wg (t,ico)=cpatch%qmean_wshed_wg (t,ico) & - *ndaysi - end do - !------------------------------------------------------------------------! - ! Integrate the fraction of open stomata. ! - !------------------------------------------------------------------------! - if (any_resolvable) then - patch_laiall_i = 1.0 & - / max(tiny(1.),sum(cpatch%lai,cpatch%leaf_resolvable)) - pss_fsn = pss_fsn + csite%area(ipa) & - * (sum( cpatch%qmean_fsn(t,:) * cpatch%lai & - , cpatch%leaf_resolvable) * patch_laiall_i) - pss_fsw = pss_fsw + csite%area(ipa) & - * (sum( cpatch%qmean_fsw(t,:) * cpatch%lai & - , cpatch%leaf_resolvable) * patch_laiall_i) - pss_fs_open = pss_fs_open + csite%area(ipa) & - * (sum( cpatch%qmean_fs_open(t,:) * cpatch%lai & - , cpatch%leaf_resolvable) * patch_laiall_i) - end if - !------------------------------------------------------------------------! + !---------------------------------------------------------------------------------! + ! If the patch had some temporary snow/pounding layer, convert the mean energy ! + ! to J/kg, then find the mean temperature and liquid fraction. Otherwise, set ! + ! them to either zero or default values. ! + !---------------------------------------------------------------------------------! + if (cgrid%qmean_sfcw_mass(t,ipy) > tiny_sfcwater_mass) then + cgrid%qmean_sfcw_energy(t,ipy) = cgrid%qmean_sfcw_energy(t,ipy) & + / cgrid%qmean_sfcw_mass (t,ipy) + call uint2tl(cgrid%qmean_sfcw_energy(t,ipy),cgrid%qmean_sfcw_temp(t,ipy) & + ,cgrid%qmean_sfcw_fliq(t,ipy)) + else + cgrid%qmean_sfcw_mass (t,ipy) = 0. + cgrid%qmean_sfcw_depth (t,ipy) = 0. + cgrid%qmean_sfcw_energy(t,ipy) = 0. + cgrid%qmean_sfcw_temp (t,ipy) = cgrid%qmean_soil_temp(nzg,t,ipy) + cgrid%qmean_sfcw_fliq (t,ipy) = cgrid%qmean_soil_fliq(nzg,t,ipy) + end if + !---------------------------------------------------------------------------------! - csite%qmean_rh (t,ipa) = csite%qmean_rh (t,ipa) & - * ndaysi - csite%qmean_cwd_rh (t,ipa) = csite%qmean_cwd_rh (t,ipa) & - * ndaysi - csite%qmean_albedo (t,ipa) = csite%qmean_albedo (t,ipa) & - * ndaysi - csite%qmean_albedo_beam (t,ipa) = csite%qmean_albedo_beam (t,ipa) & - * ndaysi - csite%qmean_albedo_diffuse(t,ipa) = csite%qmean_albedo_diffuse(t,ipa) & - * ndaysi - end do - !----- Add this patch to the site sum. -------------------------------------! - sss_fsn = sss_fsn + (pss_fsn * site_area_i) & - * cpoly%area(isi) - sss_fsw = sss_fsw + (pss_fsw * site_area_i) & - * cpoly%area(isi) - sss_fs_open = sss_fs_open + (pss_fs_open * site_area_i) & - * cpoly%area(isi) - sss_rh = sss_rh + ( sum(csite%qmean_rh(t,:) * csite%area) & - * site_area_i) * cpoly%area(isi) - sss_cwd_rh = sss_cwd_rh + ( sum(csite%qmean_cwd_rh(t,:) * csite%area) & - * site_area_i) * cpoly%area(isi) - !---------------------------------------------------------------------------! - end do - cgrid%qmean_fsn (t,ipy) = cgrid%qmean_fsn (t,ipy) & - + sss_fsn * poly_area_i - cgrid%qmean_fsw (t,ipy) = cgrid%qmean_fsw (t,ipy) & - + sss_fsw * poly_area_i - cgrid%qmean_fs_open (t,ipy) = cgrid%qmean_fs_open (t,ipy) & - + sss_fs_open * poly_area_i - cgrid%qmean_rh (t,ipy) = cgrid%qmean_rh (t,ipy) & - + sss_rh * poly_area_i - cgrid%qmean_cwd_rh (t,ipy) = cgrid%qmean_cwd_rh (t,ipy) & - + sss_cwd_rh * poly_area_i - - cgrid%qmean_leaf_energy (t,ipy) = cgrid%qmean_leaf_energy (t,ipy) & - * ndaysi * dtlsm_o_frqfast - cgrid%qmean_leaf_water (t,ipy) = cgrid%qmean_leaf_water (t,ipy) & - * ndaysi * dtlsm_o_frqfast - cgrid%qmean_leaf_hcap (t,ipy) = cgrid%qmean_leaf_hcap (t,ipy) & - * ndaysi * dtlsm_o_frqfast - cgrid%qmean_leaf_vpdef (t,ipy) = cgrid%qmean_leaf_vpdef (t,ipy) & - * ndaysi * dtlsm_o_frqfast - cgrid%qmean_wood_energy (t,ipy) = cgrid%qmean_wood_energy (t,ipy) & - * ndaysi * dtlsm_o_frqfast - cgrid%qmean_wood_water (t,ipy) = cgrid%qmean_wood_water (t,ipy) & - * ndaysi * dtlsm_o_frqfast - cgrid%qmean_wood_hcap (t,ipy) = cgrid%qmean_wood_hcap (t,ipy) & - * ndaysi * dtlsm_o_frqfast - cgrid%qmean_can_theta (t,ipy) = cgrid%qmean_can_theta (t,ipy) & - * ndaysi * dtlsm_o_frqfast - cgrid%qmean_can_theiv (t,ipy) = cgrid%qmean_can_theiv (t,ipy) & - * ndaysi * dtlsm_o_frqfast - cgrid%qmean_can_vpdef (t,ipy) = cgrid%qmean_can_vpdef (t,ipy) & - * ndaysi * dtlsm_o_frqfast - cgrid%qmean_can_shv (t,ipy) = cgrid%qmean_can_shv (t,ipy) & - * ndaysi * dtlsm_o_frqfast - cgrid%qmean_can_co2 (t,ipy) = cgrid%qmean_can_co2 (t,ipy) & - * ndaysi * dtlsm_o_frqfast - cgrid%qmean_can_prss (t,ipy) = cgrid%qmean_can_prss (t,ipy) & - * ndaysi * dtlsm_o_frqfast - cgrid%qmean_gnd_temp (t,ipy) = cgrid%qmean_gnd_temp (t,ipy) & - * ndaysi * dtlsm_o_frqfast - cgrid%qmean_gnd_shv (t,ipy) = cgrid%qmean_gnd_shv (t,ipy) & - * ndaysi * dtlsm_o_frqfast - cgrid%qmean_atm_temp (t,ipy) = cgrid%qmean_atm_temp (t,ipy) & - * ndaysi * dtlsm_o_frqfast - cgrid%qmean_atm_vpdef (t,ipy) = cgrid%qmean_atm_vpdef (t,ipy) & - * ndaysi * dtlsm_o_frqfast - cgrid%qmean_rshort (t,ipy) = cgrid%qmean_rshort (t,ipy) & - * ndaysi * dtlsm_o_frqfast - cgrid%qmean_rshort_diff (t,ipy) = cgrid%qmean_rshort_diff (t,ipy) & - * ndaysi * dtlsm_o_frqfast - cgrid%qmean_par (t,ipy) = cgrid%qmean_par (t,ipy) & - * ndaysi * dtlsm_o_frqfast - cgrid%qmean_par_diff (t,ipy) = cgrid%qmean_par_diff (t,ipy) & - * ndaysi * dtlsm_o_frqfast - cgrid%qmean_rlong (t,ipy) = cgrid%qmean_rlong (t,ipy) & - * ndaysi * dtlsm_o_frqfast - cgrid%qmean_atm_shv (t,ipy) = cgrid%qmean_atm_shv (t,ipy) & - * ndaysi * dtlsm_o_frqfast - cgrid%qmean_atm_co2 (t,ipy) = cgrid%qmean_atm_co2 (t,ipy) & - * ndaysi * dtlsm_o_frqfast - cgrid%qmean_atm_prss (t,ipy) = cgrid%qmean_atm_prss (t,ipy) & - * ndaysi * dtlsm_o_frqfast - cgrid%qmean_atm_vels (t,ipy) = cgrid%qmean_atm_vels (t,ipy) & - * ndaysi * dtlsm_o_frqfast - cgrid%qmean_gpp (t,ipy) = cgrid%qmean_gpp (t,ipy) * ndaysi - cgrid%qmean_leaf_resp (t,ipy) = cgrid%qmean_leaf_resp (t,ipy) * ndaysi - cgrid%qmean_root_resp (t,ipy) = cgrid%qmean_root_resp (t,ipy) * ndaysi - cgrid%qmean_plresp (t,ipy) = cgrid%qmean_plresp (t,ipy) * ndaysi - cgrid%qmean_nep (t,ipy) = cgrid%qmean_nep (t,ipy) * ndaysi - cgrid%qmean_rh (t,ipy) = cgrid%qmean_rh (t,ipy) * ndaysi - cgrid%qmean_cwd_rh (t,ipy) = cgrid%qmean_cwd_rh (t,ipy) * ndaysi - cgrid%qmean_sensible_lc (t,ipy) = cgrid%qmean_sensible_lc (t,ipy) * ndaysi - cgrid%qmean_sensible_wc (t,ipy) = cgrid%qmean_sensible_wc (t,ipy) * ndaysi - cgrid%qmean_sensible_gc (t,ipy) = cgrid%qmean_sensible_gc (t,ipy) * ndaysi - cgrid%qmean_sensible_ac (t,ipy) = cgrid%qmean_sensible_ac (t,ipy) * ndaysi - cgrid%qmean_rshort_gnd (t,ipy) = cgrid%qmean_rshort_gnd (t,ipy) * ndaysi - cgrid%qmean_par_gnd (t,ipy) = cgrid%qmean_par_gnd (t,ipy) * ndaysi - cgrid%qmean_rlong_gnd (t,ipy) = cgrid%qmean_rlong_gnd (t,ipy) * ndaysi - cgrid%qmean_rlongup (t,ipy) = cgrid%qmean_rlongup (t,ipy) * ndaysi - cgrid%qmean_parup (t,ipy) = cgrid%qmean_parup (t,ipy) * ndaysi - cgrid%qmean_nirup (t,ipy) = cgrid%qmean_nirup (t,ipy) * ndaysi - cgrid%qmean_rshortup (t,ipy) = cgrid%qmean_rshortup (t,ipy) * ndaysi - cgrid%qmean_rnet (t,ipy) = cgrid%qmean_rnet (t,ipy) * ndaysi - cgrid%qmean_rlong_albedo (t,ipy) = cgrid%qmean_rlong_albedo (t,ipy) * ndaysi - cgrid%qmean_albedo (t,ipy) = cgrid%qmean_albedo (t,ipy) * ndaysi - cgrid%qmean_albedo_beam (t,ipy) = cgrid%qmean_albedo_beam (t,ipy) * ndaysi - cgrid%qmean_albedo_diffuse(t,ipy) = cgrid%qmean_albedo_diffuse(t,ipy) * ndaysi - cgrid%qmean_ustar (t,ipy) = cgrid%qmean_ustar (t,ipy) * ndaysi - cgrid%qmean_tstar (t,ipy) = cgrid%qmean_tstar (t,ipy) * ndaysi - cgrid%qmean_qstar (t,ipy) = cgrid%qmean_qstar (t,ipy) * ndaysi - cgrid%qmean_cstar (t,ipy) = cgrid%qmean_cstar (t,ipy) * ndaysi - cgrid%qmean_carbon_ac (t,ipy) = cgrid%qmean_carbon_ac (t,ipy) * ndaysi - cgrid%qmean_carbon_st (t,ipy) = cgrid%qmean_carbon_st (t,ipy) * ndaysi - cgrid%qmean_pcpg (t,ipy) = cgrid%qmean_pcpg (t,ipy) * ndaysi - cgrid%qmean_evap (t,ipy) = cgrid%qmean_evap (t,ipy) * ndaysi - cgrid%qmean_transp (t,ipy) = cgrid%qmean_transp (t,ipy) * ndaysi - cgrid%qmean_runoff (t,ipy) = cgrid%qmean_runoff (t,ipy) * ndaysi - cgrid%qmean_drainage (t,ipy) = cgrid%qmean_drainage (t,ipy) * ndaysi - cgrid%qmean_vapor_lc (t,ipy) = cgrid%qmean_vapor_lc (t,ipy) * ndaysi - cgrid%qmean_vapor_wc (t,ipy) = cgrid%qmean_vapor_wc (t,ipy) * ndaysi - cgrid%qmean_vapor_gc (t,ipy) = cgrid%qmean_vapor_gc (t,ipy) * ndaysi - cgrid%qmean_vapor_ac (t,ipy) = cgrid%qmean_vapor_ac (t,ipy) * ndaysi - cgrid%qmean_soil_temp (:,t,ipy) = cgrid%qmean_soil_temp (:,t,ipy) * ndaysi - cgrid%qmean_soil_water (:,t,ipy) = cgrid%qmean_soil_water (:,t,ipy) * ndaysi - cgrid%qmean_soil_mstpot (:,t,ipy) = cgrid%qmean_soil_mstpot (:,t,ipy) * ndaysi - cgrid%qmsqu_gpp (t,ipy) = cgrid%qmsqu_gpp (t,ipy) * ndaysi - cgrid%qmsqu_leaf_resp (t,ipy) = cgrid%qmsqu_leaf_resp (t,ipy) * ndaysi - cgrid%qmsqu_root_resp (t,ipy) = cgrid%qmsqu_root_resp (t,ipy) * ndaysi - cgrid%qmsqu_plresp (t,ipy) = cgrid%qmsqu_plresp (t,ipy) * ndaysi - cgrid%qmsqu_carbon_ac (t,ipy) = cgrid%qmsqu_carbon_ac (t,ipy) * ndaysi - cgrid%qmsqu_carbon_st (t,ipy) = cgrid%qmsqu_carbon_st (t,ipy) * ndaysi - cgrid%qmsqu_nep (t,ipy) = cgrid%qmsqu_nep (t,ipy) * ndaysi - cgrid%qmsqu_rh (t,ipy) = cgrid%qmsqu_rh (t,ipy) * ndaysi - cgrid%qmsqu_cwd_rh (t,ipy) = cgrid%qmsqu_cwd_rh (t,ipy) * ndaysi - cgrid%qmsqu_sensible_ac (t,ipy) = cgrid%qmsqu_sensible_ac (t,ipy) * ndaysi - cgrid%qmsqu_sensible_lc (t,ipy) = cgrid%qmsqu_sensible_lc (t,ipy) * ndaysi - cgrid%qmsqu_sensible_wc (t,ipy) = cgrid%qmsqu_sensible_wc (t,ipy) * ndaysi - cgrid%qmsqu_sensible_gc (t,ipy) = cgrid%qmsqu_sensible_gc (t,ipy) * ndaysi - cgrid%qmsqu_evap (t,ipy) = cgrid%qmsqu_evap (t,ipy) * ndaysi - cgrid%qmsqu_transp (t,ipy) = cgrid%qmsqu_transp (t,ipy) * ndaysi - cgrid%qmsqu_vapor_ac (t,ipy) = cgrid%qmsqu_vapor_ac (t,ipy) * ndaysi - cgrid%qmsqu_vapor_lc (t,ipy) = cgrid%qmsqu_vapor_lc (t,ipy) * ndaysi - cgrid%qmsqu_vapor_wc (t,ipy) = cgrid%qmsqu_vapor_wc (t,ipy) * ndaysi - cgrid%qmsqu_vapor_gc (t,ipy) = cgrid%qmsqu_vapor_gc (t,ipy) * ndaysi - cgrid%qmsqu_ustar (t,ipy) = cgrid%qmsqu_ustar (t,ipy) * ndaysi - cgrid%qmsqu_rlongup (t,ipy) = cgrid%qmsqu_rlongup (t,ipy) * ndaysi - cgrid%qmsqu_parup (t,ipy) = cgrid%qmsqu_parup (t,ipy) * ndaysi - cgrid%qmsqu_nirup (t,ipy) = cgrid%qmsqu_nirup (t,ipy) * ndaysi - cgrid%qmsqu_rshortup (t,ipy) = cgrid%qmsqu_rshortup (t,ipy) * ndaysi - cgrid%qmsqu_rnet (t,ipy) = cgrid%qmsqu_rnet (t,ipy) * ndaysi - cgrid%qmsqu_albedo (t,ipy) = cgrid%qmsqu_albedo (t,ipy) * ndaysi + !---------------------------------------------------------------------------------! + ! Find the temperature and the fraction of liquid water. ! + !---------------------------------------------------------------------------------! + do k=1,nzg + call uextcm2tl( cgrid%qmean_soil_energy(k,t,ipy) & + , cgrid%qmean_soil_water (k,t,ipy) * wdns & + , cgrid_qmean_soil_hcap (k) & + , cgrid%qmean_soil_temp (k,t,ipy) & + , cgrid%qmean_soil_fliq (k,t,ipy) ) + end do + !---------------------------------------------------------------------------------! - !------------------------------------------------------------------------------! - ! Find the derived average propertiesof the canopy air space. ! - !------------------------------------------------------------------------------! - qmean_can_exner = press2exner (cgrid%qmean_can_prss(t,ipy)) - cgrid%qmean_can_temp (t,ipy) = extheta2temp( qmean_can_exner & - , cgrid%qmean_can_theta(t,ipy) ) - cgrid%qmean_can_rhos (t,ipy) = idealdenssh (cgrid%qmean_can_prss(t,ipy) & - ,cgrid%qmean_can_temp(t,ipy) & - ,cgrid%qmean_can_shv (t,ipy)) - !------------------------------------------------------------------------------! - ! Find the mean leaf and stem temperatures, provided that the mean heat ! - ! capacity is not zero. In case the heat capacity is zero, use the mean ! - ! canopy air space temperature. ! - !------------------------------------------------------------------------------! - if (cgrid%qmean_leaf_hcap(t,ipy) > 0.) then - call uextcm2tl(cgrid%qmean_leaf_energy(t,ipy),cgrid%qmean_leaf_water(t,ipy) & - ,cgrid%qmean_leaf_hcap(t,ipy),cgrid%qmean_leaf_temp(t,ipy) & - ,veg_fliq) + !---------------------------------------------------------------------------------! + ! Find the vegetation temperature and liquid fraction. ! + !---------------------------------------------------------------------------------! + !----- Leaf. ---------------------------------------------------------------------! + if (cgrid%qmean_leaf_hcap(t,ipy) > 0.) then + call uextcm2tl( cgrid%qmean_leaf_energy(t,ipy), cgrid%qmean_leaf_water (t,ipy) & + , cgrid%qmean_leaf_hcap (t,ipy), cgrid%qmean_leaf_temp (t,ipy) & + , cgrid%qmean_leaf_fliq (t,ipy) ) + else + cgrid%qmean_leaf_temp (t,ipy) = cgrid%qmean_can_temp (t,ipy) + if (cgrid%qmean_can_temp(t,ipy) > t00) then + cgrid%qmean_leaf_fliq(t,ipy) = 1.0 + elseif (cgrid%qmean_can_temp(t,ipy) == t00) then + cgrid%qmean_leaf_fliq(t,ipy) = 0.5 else - cgrid%qmean_leaf_temp(t,ipy) = cgrid%qmean_can_temp (t,ipy) + cgrid%qmean_leaf_fliq(t,ipy) = 0.0 end if - if (cgrid%qmean_wood_hcap(t,ipy) > 0.) then - call uextcm2tl(cgrid%qmean_wood_energy(t,ipy),cgrid%qmean_wood_water(t,ipy) & - ,cgrid%qmean_wood_hcap(t,ipy),cgrid%qmean_wood_temp(t,ipy) & - ,veg_fliq) + end if + !----- Wood. ---------------------------------------------------------------------! + if (cgrid%qmean_wood_hcap(t,ipy) > 0.) then + call uextcm2tl( cgrid%qmean_wood_energy(t,ipy) & + , cgrid%qmean_wood_water (t,ipy) & + , cgrid%qmean_wood_hcap (t,ipy) & + , cgrid%qmean_wood_temp (t,ipy) & + , cgrid%qmean_wood_fliq (t,ipy) ) + else + cgrid%qmean_wood_temp(t,ipy) = cgrid%qmean_can_temp(t,ipy) + if (cgrid%qmean_can_temp(t,ipy) > t00) then + cgrid%qmean_wood_fliq(t,ipy) = 1.0 + elseif (cgrid%qmean_can_temp(t,ipy) == t00) then + cgrid%qmean_wood_fliq(t,ipy) = 0.5 else - cgrid%qmean_wood_temp(t,ipy) = cgrid%qmean_can_temp (t,ipy) + cgrid%qmean_wood_fliq(t,ipy) = 0.0 end if - !------------------------------------------------------------------------------! - end do - !---------------------------------------------------------------------------------! - end if + end if + end do !------------------------------------------------------------------------------------! - end do polyloop - + !---------------------------------------------------------------------------------------! return -end subroutine normalize_ed_monthly_output_vars +end subroutine normalize_ed_qmean_vars !==========================================================================================! !==========================================================================================! @@ -4276,12 +5931,13 @@ end subroutine normalize_ed_monthly_output_vars !==========================================================================================! !==========================================================================================! -subroutine zero_ed_monthly_output_vars(cgrid) - use ed_state_vars , only : edtype & ! structure - , polygontype & ! structure - , sitetype & ! structure - , patchtype ! ! structure - use ed_misc_coms , only : iqoutput ! ! intent(in) +! This subroutine resets the mean diel once the "Q" file has been written. ! +!------------------------------------------------------------------------------------------! +subroutine zero_ed_qmean_vars(cgrid) + use ed_state_vars, only : edtype & ! structure + , polygontype & ! structure + , sitetype & ! structure + , patchtype ! ! structure implicit none !----- Arguments. ----------------------------------------------------------------------! type(edtype) , target :: cgrid @@ -4295,356 +5951,354 @@ subroutine zero_ed_monthly_output_vars(cgrid) integer :: ico !---------------------------------------------------------------------------------------! - !----- The loop is necessary for coupled runs (when npolygons may be 0) ----------------! - do ipy=1,cgrid%npolygons - cgrid%mmean_fs_open (ipy) = 0. - cgrid%mmean_fsw (ipy) = 0. - cgrid%mmean_fsn (ipy) = 0. - cgrid%mmean_gpp (ipy) = 0. - cgrid%mmean_nppleaf (ipy) = 0. - cgrid%mmean_nppfroot (ipy) = 0. - cgrid%mmean_nppsapwood (ipy) = 0. - cgrid%mmean_nppcroot (ipy) = 0. - cgrid%mmean_nppseeds (ipy) = 0. - cgrid%mmean_nppwood (ipy) = 0. - cgrid%mmean_nppdaily (ipy) = 0. - cgrid%mmean_evap (ipy) = 0. - cgrid%mmean_transp (ipy) = 0. - cgrid%mmean_vapor_ac (ipy) = 0. - cgrid%mmean_vapor_gc (ipy) = 0. - cgrid%mmean_vapor_lc (ipy) = 0. - cgrid%mmean_vapor_wc (ipy) = 0. - cgrid%mmean_sensible_ac (ipy) = 0. - cgrid%mmean_sensible_gc (ipy) = 0. - cgrid%mmean_sensible_lc (ipy) = 0. - cgrid%mmean_sensible_wc (ipy) = 0. - cgrid%mmean_rshort_gnd (ipy) = 0. - cgrid%mmean_par_gnd (ipy) = 0. - cgrid%mmean_rlong_gnd (ipy) = 0. - cgrid%mmean_rlongup (ipy) = 0. - cgrid%mmean_parup (ipy) = 0. - cgrid%mmean_nirup (ipy) = 0. - cgrid%mmean_rshortup (ipy) = 0. - cgrid%mmean_rnet (ipy) = 0. - cgrid%mmean_rlong_albedo (ipy) = 0. - cgrid%mmean_albedo (ipy) = 0. - cgrid%mmean_albedo_beam (ipy) = 0. - cgrid%mmean_albedo_diffuse (ipy) = 0. - cgrid%mmean_ustar (ipy) = 0. - cgrid%mmean_tstar (ipy) = 0. - cgrid%mmean_qstar (ipy) = 0. - cgrid%mmean_cstar (ipy) = 0. - cgrid%mmean_carbon_ac (ipy) = 0. - cgrid%mmean_carbon_st (ipy) = 0. - cgrid%mmean_nep (ipy) = 0. - cgrid%mmean_plresp (ipy) = 0. - cgrid%mmean_rh (ipy) = 0. - cgrid%mmean_cwd_rh (ipy) = 0. - cgrid%mmean_leaf_resp (ipy) = 0. - cgrid%mmean_root_resp (ipy) = 0. - cgrid%mmean_growth_resp (ipy) = 0. - cgrid%mmean_storage_resp (ipy) = 0. - cgrid%mmean_vleaf_resp (ipy) = 0. - cgrid%mmean_soil_temp (:,ipy) = 0. - cgrid%mmean_soil_water (:,ipy) = 0. - cgrid%mmean_soil_mstpot (:,ipy) = 0. - cgrid%mmean_transloss (:,ipy) = 0. - cgrid%mmean_gpp_dbh (:,ipy) = 0. - cgrid%mmean_leaf_energy (ipy) = 0. - cgrid%mmean_leaf_hcap (ipy) = 0. - cgrid%mmean_leaf_water (ipy) = 0. - cgrid%mmean_leaf_temp (ipy) = 0. - cgrid%mmean_leaf_vpdef (ipy) = 0. - cgrid%mmean_wood_energy (ipy) = 0. - cgrid%mmean_wood_hcap (ipy) = 0. - cgrid%mmean_wood_water (ipy) = 0. - cgrid%mmean_wood_temp (ipy) = 0. - cgrid%mmean_can_theta (ipy) = 0. - cgrid%mmean_can_theiv (ipy) = 0. - cgrid%mmean_can_vpdef (ipy) = 0. - cgrid%mmean_can_prss (ipy) = 0. - cgrid%mmean_can_temp (ipy) = 0. - cgrid%mmean_can_shv (ipy) = 0. - cgrid%mmean_can_co2 (ipy) = 0. - cgrid%mmean_can_rhos (ipy) = 0. - cgrid%mmean_gnd_temp (ipy) = 0. - cgrid%mmean_gnd_shv (ipy) = 0. - cgrid%mmean_atm_temp (ipy) = 0. - cgrid%mmean_atm_vpdef (ipy) = 0. - cgrid%mmean_rshort (ipy) = 0. - cgrid%mmean_rshort_diff (ipy) = 0. - cgrid%mmean_par (ipy) = 0. - cgrid%mmean_par_diff (ipy) = 0. - cgrid%mmean_rlong (ipy) = 0. - cgrid%mmean_atm_shv (ipy) = 0. - cgrid%mmean_atm_co2 (ipy) = 0. - cgrid%mmean_atm_prss (ipy) = 0. - cgrid%mmean_atm_vels (ipy) = 0. - cgrid%mmean_pcpg (ipy) = 0. - cgrid%mmean_runoff (ipy) = 0. - cgrid%mmean_drainage (ipy) = 0. - cgrid%mmean_lai_pft (:,ipy) = 0. - cgrid%mmean_wai_pft (:,ipy) = 0. - cgrid%agb_pft (:,ipy) = 0. - cgrid%ba_pft (:,ipy) = 0. - cgrid%mmsqu_gpp (ipy) = 0. - cgrid%mmsqu_leaf_resp (ipy) = 0. - cgrid%mmsqu_root_resp (ipy) = 0. - cgrid%mmsqu_plresp (ipy) = 0. - cgrid%mmsqu_carbon_ac (ipy) = 0. - cgrid%mmsqu_carbon_st (ipy) = 0. - cgrid%mmsqu_nep (ipy) = 0. - cgrid%mmsqu_rh (ipy) = 0. - cgrid%mmsqu_cwd_rh (ipy) = 0. - cgrid%mmsqu_sensible_ac (ipy) = 0. - cgrid%mmsqu_sensible_lc (ipy) = 0. - cgrid%mmsqu_sensible_wc (ipy) = 0. - cgrid%mmsqu_sensible_gc (ipy) = 0. - cgrid%mmsqu_evap (ipy) = 0. - cgrid%mmsqu_transp (ipy) = 0. - cgrid%mmsqu_vapor_ac (ipy) = 0. - cgrid%mmsqu_vapor_lc (ipy) = 0. - cgrid%mmsqu_vapor_wc (ipy) = 0. - cgrid%mmsqu_vapor_gc (ipy) = 0. - cgrid%mmsqu_ustar (ipy) = 0. - cgrid%mmsqu_rlongup (ipy) = 0. - cgrid%mmsqu_parup (ipy) = 0. - cgrid%mmsqu_nirup (ipy) = 0. - cgrid%mmsqu_rshortup (ipy) = 0. - cgrid%mmsqu_rnet (ipy) = 0. - cgrid%mmsqu_albedo (ipy) = 0. - cgrid%disturbance_rates (:,:,ipy) = 0. - - cgrid%mmean_co2_residual (ipy) = 0. - cgrid%mmean_energy_residual (ipy) = 0. - cgrid%mmean_water_residual (ipy) = 0. + !---------------------------------------------------------------------------------------! + ! Loop over polygons. ! + !---------------------------------------------------------------------------------------! + polyloop: do ipy = 1,cgrid%npolygons cpoly => cgrid%polygon(ipy) - do isi = 1, cpoly%nsites - cpoly%mmean_co2_residual (isi) = 0. - cpoly%mmean_energy_residual (isi) = 0. - cpoly%mmean_water_residual (isi) = 0. + cgrid%qmean_gpp (:,ipy) = 0.0 + cgrid%qmean_npp (:,ipy) = 0.0 + cgrid%qmean_leaf_resp (:,ipy) = 0.0 + cgrid%qmean_root_resp (:,ipy) = 0.0 + cgrid%qmean_growth_resp (:,ipy) = 0.0 + cgrid%qmean_storage_resp (:,ipy) = 0.0 + cgrid%qmean_vleaf_resp (:,ipy) = 0.0 + cgrid%qmean_plresp (:,ipy) = 0.0 + cgrid%qmean_leaf_energy (:,ipy) = 0.0 + cgrid%qmean_leaf_water (:,ipy) = 0.0 + cgrid%qmean_leaf_hcap (:,ipy) = 0.0 + cgrid%qmean_leaf_vpdef (:,ipy) = 0.0 + cgrid%qmean_leaf_temp (:,ipy) = 0.0 + cgrid%qmean_leaf_fliq (:,ipy) = 0.0 + cgrid%qmean_leaf_gsw (:,ipy) = 0.0 + cgrid%qmean_leaf_gbw (:,ipy) = 0.0 + cgrid%qmean_wood_energy (:,ipy) = 0.0 + cgrid%qmean_wood_water (:,ipy) = 0.0 + cgrid%qmean_wood_hcap (:,ipy) = 0.0 + cgrid%qmean_wood_temp (:,ipy) = 0.0 + cgrid%qmean_wood_fliq (:,ipy) = 0.0 + cgrid%qmean_wood_gbw (:,ipy) = 0.0 + cgrid%qmean_fs_open (:,ipy) = 0.0 + cgrid%qmean_fsw (:,ipy) = 0.0 + cgrid%qmean_fsn (:,ipy) = 0.0 + cgrid%qmean_psi_open (:,ipy) = 0.0 + cgrid%qmean_psi_closed (:,ipy) = 0.0 + cgrid%qmean_water_supply (:,ipy) = 0.0 + cgrid%qmean_par_l (:,ipy) = 0.0 + cgrid%qmean_par_l_beam (:,ipy) = 0.0 + cgrid%qmean_par_l_diff (:,ipy) = 0.0 + cgrid%qmean_rshort_l (:,ipy) = 0.0 + cgrid%qmean_rlong_l (:,ipy) = 0.0 + cgrid%qmean_sensible_lc (:,ipy) = 0.0 + cgrid%qmean_vapor_lc (:,ipy) = 0.0 + cgrid%qmean_transp (:,ipy) = 0.0 + cgrid%qmean_intercepted_al (:,ipy) = 0.0 + cgrid%qmean_wshed_lg (:,ipy) = 0.0 + cgrid%qmean_rshort_w (:,ipy) = 0.0 + cgrid%qmean_rlong_w (:,ipy) = 0.0 + cgrid%qmean_sensible_wc (:,ipy) = 0.0 + cgrid%qmean_vapor_wc (:,ipy) = 0.0 + cgrid%qmean_intercepted_aw (:,ipy) = 0.0 + cgrid%qmean_wshed_wg (:,ipy) = 0.0 + cgrid%qmean_rh (:,ipy) = 0.0 + cgrid%qmean_cwd_rh (:,ipy) = 0.0 + cgrid%qmean_nep (:,ipy) = 0.0 + cgrid%qmean_rk4step (:,ipy) = 0.0 + cgrid%qmean_available_water (:,ipy) = 0.0 + cgrid%qmean_can_theiv (:,ipy) = 0.0 + cgrid%qmean_can_theta (:,ipy) = 0.0 + cgrid%qmean_can_vpdef (:,ipy) = 0.0 + cgrid%qmean_can_temp (:,ipy) = 0.0 + cgrid%qmean_can_shv (:,ipy) = 0.0 + cgrid%qmean_can_co2 (:,ipy) = 0.0 + cgrid%qmean_can_rhos (:,ipy) = 0.0 + cgrid%qmean_can_prss (:,ipy) = 0.0 + cgrid%qmean_gnd_temp (:,ipy) = 0.0 + cgrid%qmean_gnd_shv (:,ipy) = 0.0 + cgrid%qmean_can_ggnd (:,ipy) = 0.0 + cgrid%qmean_sfcw_depth (:,ipy) = 0.0 + cgrid%qmean_sfcw_energy (:,ipy) = 0.0 + cgrid%qmean_sfcw_mass (:,ipy) = 0.0 + cgrid%qmean_sfcw_temp (:,ipy) = 0.0 + cgrid%qmean_sfcw_fliq (:,ipy) = 0.0 + cgrid%qmean_soil_energy (:,:,ipy) = 0.0 + cgrid%qmean_soil_mstpot (:,:,ipy) = 0.0 + cgrid%qmean_soil_water (:,:,ipy) = 0.0 + cgrid%qmean_soil_temp (:,:,ipy) = 0.0 + cgrid%qmean_soil_fliq (:,:,ipy) = 0.0 + cgrid%qmean_rshort_gnd (:,ipy) = 0.0 + cgrid%qmean_par_gnd (:,ipy) = 0.0 + cgrid%qmean_rlong_gnd (:,ipy) = 0.0 + cgrid%qmean_rlongup (:,ipy) = 0.0 + cgrid%qmean_parup (:,ipy) = 0.0 + cgrid%qmean_nirup (:,ipy) = 0.0 + cgrid%qmean_rshortup (:,ipy) = 0.0 + cgrid%qmean_rnet (:,ipy) = 0.0 + cgrid%qmean_albedo (:,ipy) = 0.0 + cgrid%qmean_albedo_beam (:,ipy) = 0.0 + cgrid%qmean_albedo_diff (:,ipy) = 0.0 + cgrid%qmean_rlong_albedo (:,ipy) = 0.0 + cgrid%qmean_ustar (:,ipy) = 0.0 + cgrid%qmean_tstar (:,ipy) = 0.0 + cgrid%qmean_qstar (:,ipy) = 0.0 + cgrid%qmean_cstar (:,ipy) = 0.0 + cgrid%qmean_carbon_ac (:,ipy) = 0.0 + cgrid%qmean_carbon_st (:,ipy) = 0.0 + cgrid%qmean_vapor_gc (:,ipy) = 0.0 + cgrid%qmean_vapor_ac (:,ipy) = 0.0 + cgrid%qmean_smoist_gg (:,:,ipy) = 0.0 + cgrid%qmean_throughfall (:,ipy) = 0.0 + cgrid%qmean_transloss (:,:,ipy) = 0.0 + cgrid%qmean_runoff (:,ipy) = 0.0 + cgrid%qmean_drainage (:,ipy) = 0.0 + cgrid%qmean_sensible_gc (:,ipy) = 0.0 + cgrid%qmean_sensible_ac (:,ipy) = 0.0 + cgrid%qmean_sensible_gg (:,:,ipy) = 0.0 + cgrid%qmean_qthroughfall (:,ipy) = 0.0 + cgrid%qmean_qrunoff (:,ipy) = 0.0 + cgrid%qmean_qdrainage (:,ipy) = 0.0 + cgrid%qmean_atm_theiv (:,ipy) = 0.0 + cgrid%qmean_atm_theta (:,ipy) = 0.0 + cgrid%qmean_atm_temp (:,ipy) = 0.0 + cgrid%qmean_atm_vpdef (:,ipy) = 0.0 + cgrid%qmean_atm_shv (:,ipy) = 0.0 + cgrid%qmean_atm_rshort (:,ipy) = 0.0 + cgrid%qmean_atm_rshort_diff (:,ipy) = 0.0 + cgrid%qmean_atm_par (:,ipy) = 0.0 + cgrid%qmean_atm_par_diff (:,ipy) = 0.0 + cgrid%qmean_atm_rlong (:,ipy) = 0.0 + cgrid%qmean_atm_vels (:,ipy) = 0.0 + cgrid%qmean_atm_rhos (:,ipy) = 0.0 + cgrid%qmean_atm_prss (:,ipy) = 0.0 + cgrid%qmean_atm_co2 (:,ipy) = 0.0 + cgrid%qmean_pcpg (:,ipy) = 0.0 + cgrid%qmean_qpcpg (:,ipy) = 0.0 + cgrid%qmean_dpcpg (:,ipy) = 0.0 + cgrid%qmsqu_gpp (:,ipy) = 0.0 + cgrid%qmsqu_npp (:,ipy) = 0.0 + cgrid%qmsqu_plresp (:,ipy) = 0.0 + cgrid%qmsqu_sensible_lc (:,ipy) = 0.0 + cgrid%qmsqu_vapor_lc (:,ipy) = 0.0 + cgrid%qmsqu_transp (:,ipy) = 0.0 + cgrid%qmsqu_sensible_wc (:,ipy) = 0.0 + cgrid%qmsqu_vapor_wc (:,ipy) = 0.0 + cgrid%qmsqu_rh (:,ipy) = 0.0 + cgrid%qmsqu_cwd_rh (:,ipy) = 0.0 + cgrid%qmsqu_nep (:,ipy) = 0.0 + cgrid%qmsqu_rlongup (:,ipy) = 0.0 + cgrid%qmsqu_parup (:,ipy) = 0.0 + cgrid%qmsqu_nirup (:,ipy) = 0.0 + cgrid%qmsqu_rshortup (:,ipy) = 0.0 + cgrid%qmsqu_rnet (:,ipy) = 0.0 + cgrid%qmsqu_albedo (:,ipy) = 0.0 + cgrid%qmsqu_ustar (:,ipy) = 0.0 + cgrid%qmsqu_carbon_ac (:,ipy) = 0.0 + cgrid%qmsqu_carbon_st (:,ipy) = 0.0 + cgrid%qmsqu_vapor_gc (:,ipy) = 0.0 + cgrid%qmsqu_vapor_ac (:,ipy) = 0.0 + cgrid%qmsqu_sensible_gc (:,ipy) = 0.0 + cgrid%qmsqu_sensible_ac (:,ipy) = 0.0 + + !------------------------------------------------------------------------------------! + ! Loop over sites. ! + !------------------------------------------------------------------------------------! + siteloop: do isi=1,cpoly%nsites csite => cpoly%site(isi) - do ipa=1,csite%npatches - csite%mmean_co2_residual (ipa) = 0. - csite%mmean_energy_residual (ipa) = 0. - csite%mmean_water_residual (ipa) = 0. - csite%mmean_rh (ipa) = 0. - csite%mmean_cwd_rh (ipa) = 0. - csite%mmean_rk4step (ipa) = 0. - csite%mmean_A_decomp (ipa) = 0. - csite%mmean_Af_decomp (ipa) = 0. - csite%mmean_albedo (ipa) = 0. - csite%mmean_albedo_beam (ipa) = 0. - csite%mmean_albedo_diffuse (ipa) = 0. - cpatch=> csite%patch(ipa) - do ico=1,cpatch%ncohorts - cpatch%mmean_par_l (ico) = 0. - cpatch%mmean_par_l_beam (ico) = 0. - cpatch%mmean_par_l_diff (ico) = 0. - cpatch%mmean_rshort_l (ico) = 0. - cpatch%mmean_rlong_l (ico) = 0. - cpatch%mmean_sensible_lc (ico) = 0. - cpatch%mmean_vapor_lc (ico) = 0. - cpatch%mmean_transp (ico) = 0. - cpatch%mmean_intercepted_al (ico) = 0. - cpatch%mmean_wshed_lg (ico) = 0. - cpatch%mmean_rshort_w (ico) = 0. - cpatch%mmean_rlong_w (ico) = 0. - cpatch%mmean_sensible_wc (ico) = 0. - cpatch%mmean_vapor_wc (ico) = 0. - cpatch%mmean_intercepted_aw (ico) = 0. - cpatch%mmean_wshed_wg (ico) = 0. - cpatch%mmean_fs_open (ico) = 0. - cpatch%mmean_fsw (ico) = 0. - cpatch%mmean_fsn (ico) = 0. - cpatch%mmean_psi_open (ico) = 0. - cpatch%mmean_psi_closed (ico) = 0. - cpatch%mmean_water_supply (ico) = 0. - cpatch%mmean_leaf_maintenance (ico) = 0. - cpatch%mmean_root_maintenance (ico) = 0. - cpatch%mmean_leaf_drop (ico) = 0. - cpatch%mmean_gpp (ico) = 0. - cpatch%mmean_nppleaf (ico) = 0. - cpatch%mmean_nppfroot (ico) = 0. - cpatch%mmean_nppsapwood (ico) = 0. - cpatch%mmean_nppcroot (ico) = 0. - cpatch%mmean_nppseeds (ico) = 0. - cpatch%mmean_nppwood (ico) = 0. - cpatch%mmean_nppdaily (ico) = 0. - cpatch%mmean_leaf_resp (ico) = 0. - cpatch%mmean_root_resp (ico) = 0. - cpatch%mmean_growth_resp (ico) = 0. - cpatch%mmean_storage_resp (ico) = 0. - cpatch%mmean_vleaf_resp (ico) = 0. - cpatch%mmean_light_level (ico) = 0. - cpatch%mmean_light_level_beam (ico) = 0. - cpatch%mmean_light_level_diff (ico) = 0. - cpatch%mmean_mort_rate (:,ico) = 0. - end do - end do - end do + cpoly%qmean_atm_theiv (:,isi) = 0.0 + cpoly%qmean_atm_theta (:,isi) = 0.0 + cpoly%qmean_atm_temp (:,isi) = 0.0 + cpoly%qmean_atm_vpdef (:,isi) = 0.0 + cpoly%qmean_atm_shv (:,isi) = 0.0 + cpoly%qmean_atm_rshort (:,isi) = 0.0 + cpoly%qmean_atm_rshort_diff(:,isi) = 0.0 + cpoly%qmean_atm_par (:,isi) = 0.0 + cpoly%qmean_atm_par_diff (:,isi) = 0.0 + cpoly%qmean_atm_rlong (:,isi) = 0.0 + cpoly%qmean_atm_vels (:,isi) = 0.0 + cpoly%qmean_atm_rhos (:,isi) = 0.0 + cpoly%qmean_atm_prss (:,isi) = 0.0 + cpoly%qmean_atm_co2 (:,isi) = 0.0 + cpoly%qmean_pcpg (:,isi) = 0.0 + cpoly%qmean_qpcpg (:,isi) = 0.0 + cpoly%qmean_dpcpg (:,isi) = 0.0 + !---------------------------------------------------------------------------------! + ! Loop over sites. ! + !---------------------------------------------------------------------------------! + patchloop: do ipa=1,csite%npatches + cpatch => csite%patch(ipa) + csite%qmean_rh (:,ipa) = 0.0 + csite%qmean_cwd_rh (:,ipa) = 0.0 + csite%qmean_nep (:,ipa) = 0.0 + csite%qmean_rk4step (:,ipa) = 0.0 + csite%qmean_available_water (:,ipa) = 0.0 + csite%qmean_can_theiv (:,ipa) = 0.0 + csite%qmean_can_theta (:,ipa) = 0.0 + csite%qmean_can_vpdef (:,ipa) = 0.0 + csite%qmean_can_temp (:,ipa) = 0.0 + csite%qmean_can_shv (:,ipa) = 0.0 + csite%qmean_can_co2 (:,ipa) = 0.0 + csite%qmean_can_rhos (:,ipa) = 0.0 + csite%qmean_can_prss (:,ipa) = 0.0 + csite%qmean_gnd_temp (:,ipa) = 0.0 + csite%qmean_gnd_shv (:,ipa) = 0.0 + csite%qmean_can_ggnd (:,ipa) = 0.0 + csite%qmean_sfcw_depth (:,ipa) = 0.0 + csite%qmean_sfcw_energy (:,ipa) = 0.0 + csite%qmean_sfcw_mass (:,ipa) = 0.0 + csite%qmean_sfcw_temp (:,ipa) = 0.0 + csite%qmean_sfcw_fliq (:,ipa) = 0.0 + csite%qmean_soil_energy (:,:,ipa) = 0.0 + csite%qmean_soil_mstpot (:,:,ipa) = 0.0 + csite%qmean_soil_water (:,:,ipa) = 0.0 + csite%qmean_soil_temp (:,:,ipa) = 0.0 + csite%qmean_soil_fliq (:,:,ipa) = 0.0 + csite%qmean_rshort_gnd (:,ipa) = 0.0 + csite%qmean_par_gnd (:,ipa) = 0.0 + csite%qmean_rlong_gnd (:,ipa) = 0.0 + csite%qmean_rlongup (:,ipa) = 0.0 + csite%qmean_parup (:,ipa) = 0.0 + csite%qmean_nirup (:,ipa) = 0.0 + csite%qmean_rshortup (:,ipa) = 0.0 + csite%qmean_rnet (:,ipa) = 0.0 + csite%qmean_albedo (:,ipa) = 0.0 + csite%qmean_albedo_beam (:,ipa) = 0.0 + csite%qmean_albedo_diff (:,ipa) = 0.0 + csite%qmean_rlong_albedo (:,ipa) = 0.0 + csite%qmean_ustar (:,ipa) = 0.0 + csite%qmean_tstar (:,ipa) = 0.0 + csite%qmean_qstar (:,ipa) = 0.0 + csite%qmean_cstar (:,ipa) = 0.0 + csite%qmean_carbon_ac (:,ipa) = 0.0 + csite%qmean_carbon_st (:,ipa) = 0.0 + csite%qmean_vapor_gc (:,ipa) = 0.0 + csite%qmean_vapor_ac (:,ipa) = 0.0 + csite%qmean_smoist_gg (:,:,ipa) = 0.0 + csite%qmean_throughfall (:,ipa) = 0.0 + csite%qmean_transloss (:,:,ipa) = 0.0 + csite%qmean_runoff (:,ipa) = 0.0 + csite%qmean_drainage (:,ipa) = 0.0 + csite%qmean_sensible_gc (:,ipa) = 0.0 + csite%qmean_sensible_ac (:,ipa) = 0.0 + csite%qmean_sensible_gg (:,:,ipa) = 0.0 + csite%qmean_qthroughfall (:,ipa) = 0.0 + csite%qmean_qrunoff (:,ipa) = 0.0 + csite%qmean_qdrainage (:,ipa) = 0.0 + csite%qmsqu_rh (:,ipa) = 0.0 + csite%qmsqu_cwd_rh (:,ipa) = 0.0 + csite%qmsqu_nep (:,ipa) = 0.0 + csite%qmsqu_rlongup (:,ipa) = 0.0 + csite%qmsqu_parup (:,ipa) = 0.0 + csite%qmsqu_nirup (:,ipa) = 0.0 + csite%qmsqu_rshortup (:,ipa) = 0.0 + csite%qmsqu_rnet (:,ipa) = 0.0 + csite%qmsqu_albedo (:,ipa) = 0.0 + csite%qmsqu_ustar (:,ipa) = 0.0 + csite%qmsqu_carbon_ac (:,ipa) = 0.0 + csite%qmsqu_carbon_st (:,ipa) = 0.0 + csite%qmsqu_vapor_gc (:,ipa) = 0.0 + csite%qmsqu_vapor_ac (:,ipa) = 0.0 + csite%qmsqu_sensible_gc (:,ipa) = 0.0 + csite%qmsqu_sensible_ac (:,ipa) = 0.0 - !------------------------------------------------------------------------------------! - ! The mean diurnal cycle is flushed here. ! - !------------------------------------------------------------------------------------! - if (iqoutput > 0) then - do isi=1,cpoly%nsites - csite => cpoly%site(isi) - do ipa = 1,csite%npatches - cpatch => csite%patch(ipa) - do ico=1,cpatch%ncohorts - !----- Convert GPP and plant respiration to kgC/plant/year. -------------! - cpatch%qmean_gpp (:,ico) = 0.0 - cpatch%qmean_leaf_resp (:,ico) = 0.0 - cpatch%qmean_root_resp (:,ico) = 0.0 - cpatch%qmean_fs_open (:,ico) = 0.0 - cpatch%qmean_fsw (:,ico) = 0.0 - cpatch%qmean_fsn (:,ico) = 0.0 - cpatch%qmean_psi_open (:,ico) = 0.0 - cpatch%qmean_psi_closed (:,ico) = 0.0 - cpatch%qmean_water_supply (:,ico) = 0.0 - cpatch%qmean_par_l (:,ico) = 0.0 - cpatch%qmean_par_l_beam (:,ico) = 0.0 - cpatch%qmean_par_l_diff (:,ico) = 0.0 - cpatch%qmean_rshort_l (:,ico) = 0.0 - cpatch%qmean_rlong_l (:,ico) = 0.0 - cpatch%qmean_sensible_lc (:,ico) = 0.0 - cpatch%qmean_vapor_lc (:,ico) = 0.0 - cpatch%qmean_transp (:,ico) = 0.0 - cpatch%qmean_intercepted_al (:,ico) = 0.0 - cpatch%qmean_wshed_lg (:,ico) = 0.0 - cpatch%qmean_rshort_w (:,ico) = 0.0 - cpatch%qmean_rlong_w (:,ico) = 0.0 - cpatch%qmean_sensible_wc (:,ico) = 0.0 - cpatch%qmean_vapor_wc (:,ico) = 0.0 - cpatch%qmean_intercepted_aw (:,ico) = 0.0 - cpatch%qmean_wshed_wg (:,ico) = 0.0 - end do - csite%qmean_rh (:,ipa) = 0.0 - csite%qmean_cwd_rh (:,ipa) = 0.0 - csite%qmean_albedo (:,ipa) = 0.0 - csite%qmean_albedo_beam (:,ipa) = 0.0 - csite%qmean_albedo_diffuse (:,ipa) = 0.0 - end do - end do - cgrid%qmean_fs_open (:,ipy) = 0.0 - cgrid%qmean_fsw (:,ipy) = 0.0 - cgrid%qmean_fsn (:,ipy) = 0.0 - cgrid%qmean_leaf_energy (:,ipy) = 0.0 - cgrid%qmean_leaf_water (:,ipy) = 0.0 - cgrid%qmean_leaf_hcap (:,ipy) = 0.0 - cgrid%qmean_leaf_vpdef (:,ipy) = 0.0 - cgrid%qmean_wood_energy (:,ipy) = 0.0 - cgrid%qmean_wood_water (:,ipy) = 0.0 - cgrid%qmean_wood_hcap (:,ipy) = 0.0 - cgrid%qmean_can_theta (:,ipy) = 0.0 - cgrid%qmean_can_theiv (:,ipy) = 0.0 - cgrid%qmean_can_vpdef (:,ipy) = 0.0 - cgrid%qmean_can_shv (:,ipy) = 0.0 - cgrid%qmean_can_co2 (:,ipy) = 0.0 - cgrid%qmean_can_prss (:,ipy) = 0.0 - cgrid%qmean_gnd_temp (:,ipy) = 0.0 - cgrid%qmean_gnd_shv (:,ipy) = 0.0 - cgrid%qmean_atm_temp (:,ipy) = 0.0 - cgrid%qmean_atm_vpdef (:,ipy) = 0.0 - cgrid%qmean_rshort (:,ipy) = 0.0 - cgrid%qmean_rshort_diff (:,ipy) = 0.0 - cgrid%qmean_par (:,ipy) = 0.0 - cgrid%qmean_par_diff (:,ipy) = 0.0 - cgrid%qmean_rlong (:,ipy) = 0.0 - cgrid%qmean_atm_shv (:,ipy) = 0.0 - cgrid%qmean_atm_co2 (:,ipy) = 0.0 - cgrid%qmean_atm_prss (:,ipy) = 0.0 - cgrid%qmean_atm_vels (:,ipy) = 0.0 - cgrid%qmean_gpp (:,ipy) = 0.0 - cgrid%qmean_leaf_resp (:,ipy) = 0.0 - cgrid%qmean_root_resp (:,ipy) = 0.0 - cgrid%qmean_plresp (:,ipy) = 0.0 - cgrid%qmean_nep (:,ipy) = 0.0 - cgrid%qmean_rh (:,ipy) = 0.0 - cgrid%qmean_cwd_rh (:,ipy) = 0.0 - cgrid%qmean_sensible_lc (:,ipy) = 0.0 - cgrid%qmean_sensible_wc (:,ipy) = 0.0 - cgrid%qmean_sensible_gc (:,ipy) = 0.0 - cgrid%qmean_sensible_ac (:,ipy) = 0.0 - cgrid%qmean_rshort_gnd (:,ipy) = 0.0 - cgrid%qmean_par_gnd (:,ipy) = 0.0 - cgrid%qmean_rlong_gnd (:,ipy) = 0.0 - cgrid%qmean_rlongup (:,ipy) = 0.0 - cgrid%qmean_parup (:,ipy) = 0.0 - cgrid%qmean_nirup (:,ipy) = 0.0 - cgrid%qmean_rshortup (:,ipy) = 0.0 - cgrid%qmean_rnet (:,ipy) = 0.0 - cgrid%qmean_rlong_albedo (:,ipy) = 0.0 - cgrid%qmean_albedo (:,ipy) = 0.0 - cgrid%qmean_albedo_beam (:,ipy) = 0.0 - cgrid%qmean_albedo_diffuse(:,ipy) = 0.0 - cgrid%qmean_ustar (:,ipy) = 0.0 - cgrid%qmean_tstar (:,ipy) = 0.0 - cgrid%qmean_qstar (:,ipy) = 0.0 - cgrid%qmean_cstar (:,ipy) = 0.0 - cgrid%qmean_carbon_ac (:,ipy) = 0.0 - cgrid%qmean_carbon_st (:,ipy) = 0.0 - cgrid%qmean_pcpg (:,ipy) = 0.0 - cgrid%qmean_evap (:,ipy) = 0.0 - cgrid%qmean_transp (:,ipy) = 0.0 - cgrid%qmean_runoff (:,ipy) = 0.0 - cgrid%qmean_drainage (:,ipy) = 0.0 - cgrid%qmean_vapor_lc (:,ipy) = 0.0 - cgrid%qmean_vapor_wc (:,ipy) = 0.0 - cgrid%qmean_vapor_gc (:,ipy) = 0.0 - cgrid%qmean_vapor_ac (:,ipy) = 0.0 - cgrid%qmean_soil_temp (:,:,ipy) = 0.0 - cgrid%qmean_soil_water (:,:,ipy) = 0.0 - cgrid%qmean_soil_mstpot (:,:,ipy) = 0.0 - cgrid%qmsqu_gpp (:,ipy) = 0.0 - cgrid%qmsqu_leaf_resp (:,ipy) = 0.0 - cgrid%qmsqu_root_resp (:,ipy) = 0.0 - cgrid%qmsqu_plresp (:,ipy) = 0.0 - cgrid%qmsqu_carbon_ac (:,ipy) = 0.0 - cgrid%qmsqu_carbon_st (:,ipy) = 0.0 - cgrid%qmsqu_nep (:,ipy) = 0.0 - cgrid%qmsqu_rh (:,ipy) = 0.0 - cgrid%qmsqu_cwd_rh (:,ipy) = 0.0 - cgrid%qmsqu_sensible_ac (:,ipy) = 0.0 - cgrid%qmsqu_sensible_lc (:,ipy) = 0.0 - cgrid%qmsqu_sensible_wc (:,ipy) = 0.0 - cgrid%qmsqu_sensible_gc (:,ipy) = 0.0 - cgrid%qmsqu_evap (:,ipy) = 0.0 - cgrid%qmsqu_transp (:,ipy) = 0.0 - cgrid%qmsqu_vapor_ac (:,ipy) = 0.0 - cgrid%qmsqu_vapor_lc (:,ipy) = 0.0 - cgrid%qmsqu_vapor_wc (:,ipy) = 0.0 - cgrid%qmsqu_vapor_gc (:,ipy) = 0.0 - cgrid%qmsqu_ustar (:,ipy) = 0.0 - cgrid%qmsqu_rlongup (:,ipy) = 0.0 - cgrid%qmsqu_parup (:,ipy) = 0.0 - cgrid%qmsqu_nirup (:,ipy) = 0.0 - cgrid%qmsqu_rshortup (:,ipy) = 0.0 - cgrid%qmsqu_rnet (:,ipy) = 0.0 - cgrid%qmsqu_albedo (:,ipy) = 0.0 - end if + !------------------------------------------------------------------------------! + ! Loop over cohorts. ! + !------------------------------------------------------------------------------! + cohortloop: do ico=1, cpatch%ncohorts + cpatch%qmean_gpp (:,ico) = 0.0 + cpatch%qmean_npp (:,ico) = 0.0 + cpatch%qmean_leaf_resp (:,ico) = 0.0 + cpatch%qmean_root_resp (:,ico) = 0.0 + cpatch%qmean_growth_resp (:,ico) = 0.0 + cpatch%qmean_storage_resp (:,ico) = 0.0 + cpatch%qmean_vleaf_resp (:,ico) = 0.0 + cpatch%qmean_plresp (:,ico) = 0.0 + cpatch%qmean_leaf_energy (:,ico) = 0.0 + cpatch%qmean_leaf_water (:,ico) = 0.0 + cpatch%qmean_leaf_hcap (:,ico) = 0.0 + cpatch%qmean_leaf_vpdef (:,ico) = 0.0 + cpatch%qmean_leaf_temp (:,ico) = 0.0 + cpatch%qmean_leaf_fliq (:,ico) = 0.0 + cpatch%qmean_leaf_gsw (:,ico) = 0.0 + cpatch%qmean_leaf_gbw (:,ico) = 0.0 + cpatch%qmean_wood_energy (:,ico) = 0.0 + cpatch%qmean_wood_water (:,ico) = 0.0 + cpatch%qmean_wood_hcap (:,ico) = 0.0 + cpatch%qmean_wood_temp (:,ico) = 0.0 + cpatch%qmean_wood_fliq (:,ico) = 0.0 + cpatch%qmean_wood_gbw (:,ico) = 0.0 + cpatch%qmean_fs_open (:,ico) = 0.0 + cpatch%qmean_fsw (:,ico) = 0.0 + cpatch%qmean_fsn (:,ico) = 0.0 + cpatch%qmean_psi_open (:,ico) = 0.0 + cpatch%qmean_psi_closed (:,ico) = 0.0 + cpatch%qmean_water_supply (:,ico) = 0.0 + cpatch%qmean_light_level (:,ico) = 0.0 + cpatch%qmean_light_level_beam (:,ico) = 0.0 + cpatch%qmean_light_level_diff (:,ico) = 0.0 + cpatch%qmean_par_l (:,ico) = 0.0 + cpatch%qmean_par_l_beam (:,ico) = 0.0 + cpatch%qmean_par_l_diff (:,ico) = 0.0 + cpatch%qmean_rshort_l (:,ico) = 0.0 + cpatch%qmean_rlong_l (:,ico) = 0.0 + cpatch%qmean_sensible_lc (:,ico) = 0.0 + cpatch%qmean_vapor_lc (:,ico) = 0.0 + cpatch%qmean_transp (:,ico) = 0.0 + cpatch%qmean_intercepted_al (:,ico) = 0.0 + cpatch%qmean_wshed_lg (:,ico) = 0.0 + cpatch%qmean_rshort_w (:,ico) = 0.0 + cpatch%qmean_rlong_w (:,ico) = 0.0 + cpatch%qmean_sensible_wc (:,ico) = 0.0 + cpatch%qmean_vapor_wc (:,ico) = 0.0 + cpatch%qmean_intercepted_aw (:,ico) = 0.0 + cpatch%qmean_wshed_wg (:,ico) = 0.0 + cpatch%qmsqu_gpp (:,ico) = 0.0 + cpatch%qmsqu_npp (:,ico) = 0.0 + cpatch%qmsqu_plresp (:,ico) = 0.0 + cpatch%qmsqu_sensible_lc (:,ico) = 0.0 + cpatch%qmsqu_vapor_lc (:,ico) = 0.0 + cpatch%qmsqu_transp (:,ico) = 0.0 + cpatch%qmsqu_sensible_wc (:,ico) = 0.0 + cpatch%qmsqu_vapor_wc (:,ico) = 0.0 + end do cohortloop + !------------------------------------------------------------------------------! + end do patchloop + !---------------------------------------------------------------------------------! + end do siteloop !------------------------------------------------------------------------------------! - - end do + end do polyloop + !---------------------------------------------------------------------------------------! return -end subroutine zero_ed_monthly_output_vars +end subroutine zero_ed_qmean_vars !==========================================================================================! !==========================================================================================! +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! + + + + +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! !==========================================================================================! !==========================================================================================! ! |--------------------------------| ! @@ -4652,88 +6306,159 @@ end subroutine zero_ed_monthly_output_vars ! |--------------------------------| ! !==========================================================================================! !==========================================================================================! +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! + + + + + + +!==========================================================================================! +!==========================================================================================! +! This sub-routine updates the yearly variables. ! +!------------------------------------------------------------------------------------------! subroutine update_ed_yearly_vars(cgrid) - use ed_state_vars,only:edtype,polygontype,sitetype,patchtype - use ed_max_dims, only: n_pft, n_dbh - use consts_coms, only: pi1 + use ed_state_vars, only : edtype & ! structure + , polygontype & ! structure + , sitetype & ! structure + , patchtype ! ! structure + use ed_max_dims , only : n_pft & ! intent(in) + , n_dbh ! ! intent(in) + use consts_coms , only : pi1 ! ! intent(in) implicit none + !------ Arguments. ---------------------------------------------------------------------! + type(edtype) , target :: cgrid + !------ Local variables. ---------------------------------------------------------------! + type(polygontype), pointer :: cpoly + type(sitetype) , pointer :: csite + type(patchtype) , pointer :: cpatch + integer :: ipy + integer :: isi + integer :: ipa + integer :: ico + real :: poly_area_i + real :: site_area_i + real :: site_wgt + real :: patch_wgt + !---------------------------------------------------------------------------------------! - type(edtype),target :: cgrid - type(polygontype),pointer :: cpoly - type(sitetype),pointer :: csite - type(patchtype),pointer :: cpatch - integer :: ipy,isi,ipa,ico - ! All agb's are in tC/ha/y; all basal areas are in m2/ha/y. - - do ipy = 1,cgrid%npolygons + !---------------------------------------------------------------------------------------! + ! All above-ground biomass variables are in kgC/m2 or kgC/m2/yr; and all basal ! + ! areas are in cm2/m2 or cm2/m2/yr. ! + !---------------------------------------------------------------------------------------! + + !---------------------------------------------------------------------------------------! + ! Loop over polygons. ! + !---------------------------------------------------------------------------------------! + polyloop: do ipy = 1,cgrid%npolygons cpoly => cgrid%polygon(ipy) - - cgrid%total_basal_area(ipy) = 0.0 - cgrid%total_basal_area_growth(ipy) = 0.0 - cgrid%total_basal_area_mort(ipy) = 0.0 + + + !----- Re-set the variables. --------------------------------------------------------! + cgrid%total_basal_area (ipy) = 0.0 + cgrid%total_basal_area_growth (ipy) = 0.0 + cgrid%total_basal_area_mort (ipy) = 0.0 cgrid%total_basal_area_recruit(ipy) = 0.0 - cgrid%total_agb(ipy) = 0.0 - cgrid%total_agb_growth(ipy) = 0.0 - cgrid%total_agb_mort(ipy) = 0.0 - cgrid%total_agb_recruit(ipy) = 0.0 - - ! Loop over sites - do isi = 1,cpoly%nsites + cgrid%total_agb (ipy) = 0.0 + cgrid%total_agb_growth (ipy) = 0.0 + cgrid%total_agb_mort (ipy) = 0.0 + cgrid%total_agb_recruit (ipy) = 0.0 + !------------------------------------------------------------------------------------! + + + !----- Inverse of this polygon area (it should be always 1.) ------------------------! + poly_area_i = 1./sum(cpoly%area) + !------------------------------------------------------------------------------------! + + + !------------------------------------------------------------------------------------! + ! Loop over polygons. ! + !------------------------------------------------------------------------------------! + siteloop: do isi = 1,cpoly%nsites csite => cpoly%site(isi) - - ! Do growth, mortality, harvesting. - cgrid%total_agb(ipy) = cgrid%total_agb(ipy) + sum(cpoly%agb(:,:,isi)) * cpoly%area(isi) - - cgrid%total_basal_area(ipy) = cgrid%total_basal_area(ipy) + & - sum(cpoly%basal_area(:,:,isi)) * cpoly%area(isi) - - cgrid%total_agb_growth(ipy) = cgrid%total_agb_growth(ipy) + & - sum(cpoly%agb_growth(:,:,isi)) * cpoly%area(isi) - cgrid%total_agb_mort(ipy) = cgrid%total_agb_mort(ipy) + & - sum(cpoly%agb_mort(1:n_pft, 1:n_dbh,:)) * cpoly%area(isi) + !----- Inverse of this site area (it should be always 1.) ------------------------! + site_area_i=1./sum(csite%area) + !---------------------------------------------------------------------------------! + - cgrid%total_basal_area_growth(ipy) = cgrid%total_basal_area_growth(ipy) + & - sum(cpoly%basal_area_growth(1:n_pft,2:n_dbh,isi)) * cpoly%area(isi) + !----- Site weight. --------------------------------------------------------------! + site_wgt = cpoly%area(isi) * poly_area_i + !---------------------------------------------------------------------------------! - cgrid%total_basal_area_mort(ipy) = cgrid%total_basal_area_mort(ipy) + & - sum(cpoly%basal_area_mort(1:n_pft,2:n_dbh,isi)) * cpoly%area(isi) - ! cgrid%total_agb_cut = & - ! sum(cgrid%cs(1)%agb_cut(1:n_pft, 1:n_dbh)) * 10.0 - ! Loop over cohorts to get recruitment. - do ipa = 1,csite%npatches + + !---------------------------------------------------------------------------------! + ! Do growth, mortality, harvesting. ! + !---------------------------------------------------------------------------------! + cgrid%total_agb (ipy) = cgrid%total_agb (ipy) & + + sum(cpoly%agb (:,:,isi)) & + * site_wgt + cgrid%total_basal_area (ipy) = cgrid%total_basal_area (ipy) & + + sum(cpoly%basal_area (:,:,isi)) & + * site_wgt + cgrid%total_agb_growth (ipy) = cgrid%total_agb_growth (ipy) & + + sum(cpoly%agb_growth (:,:,isi)) & + * site_wgt + cgrid%total_agb_mort (ipy) = cgrid%total_agb_mort (ipy) & + + sum(cpoly%agb_mort(1:n_pft,1:n_dbh,isi)) & + * site_wgt + cgrid%total_basal_area_growth(ipy) = cgrid%total_basal_area_growth(ipy) & + + sum(cpoly%basal_area_growth(1:n_pft,2:n_dbh,isi)) & + * site_wgt + cgrid%total_basal_area_mort (ipy) = cgrid%total_basal_area_mort (ipy) & + + sum(cpoly%basal_area_mort (1:n_pft,2:n_dbh,isi)) & + * site_wgt + !---------------------------------------------------------------------------------! + + + + + !---------------------------------------------------------------------------------! + ! Loop over patches and cohorts to get recruitment. ! + !---------------------------------------------------------------------------------! + patchloop: do ipa = 1,csite%npatches cpatch => csite%patch(ipa) - - ! Loop over cohorts - do ico = 1,cpatch%ncohorts - - if(cpatch%new_recruit_flag(ico) == 1)then - cgrid%total_agb_recruit(ipy) = cgrid%total_agb_recruit(ipy) + & - cpatch%agb(ico) * cpatch%nplant(ico) * csite%area(ipa) * & - cpoly%area(isi) - cgrid%total_basal_area_recruit(ipy) = & - cgrid%total_basal_area_recruit(ipy) + & - cpatch%basarea(ico) * cpatch%nplant(ico) *& - csite%area(ipa) * cpoly%area(isi) - cpatch%new_recruit_flag(ico) = 0 - endif - cpatch%first_census(ico) = 1 - - enddo - - enddo - enddo + !----- Site weight. -----------------------------------------------------------! + patch_wgt = csite%area(ipa) * site_area_i * site_wgt + !------------------------------------------------------------------------------! - enddo + !------------------------------------------------------------------------------! + ! Loop over patches and cohorts to get recruitment. ! + !------------------------------------------------------------------------------! + cohortloop: do ico = 1,cpatch%ncohorts + + if (cpatch%new_recruit_flag(ico) == 1) then + cgrid%total_agb_recruit (ipy)= cgrid%total_agb_recruit (ipy) & + + cpatch%agb (ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%total_basal_area_recruit(ipy)= cgrid%total_basal_area_recruit(ipy) & + + cpatch%basarea(ico) & + * cpatch%nplant (ico) & + * patch_wgt + cpatch%new_recruit_flag (ico)= 0 + end if + cpatch%first_census (ico) = 1 + end do cohortloop + !------------------------------------------------------------------------------! + end do patchloop + !---------------------------------------------------------------------------------! + end do siteloop + !------------------------------------------------------------------------------------! + end do polyloop + !---------------------------------------------------------------------------------------! return end subroutine update_ed_yearly_vars !==========================================================================================! @@ -4746,30 +6471,46 @@ end subroutine update_ed_yearly_vars !==========================================================================================! !==========================================================================================! +! This sub-routine re-sets the yearly variables. ! +!------------------------------------------------------------------------------------------! subroutine zero_ed_yearly_vars(cgrid) - use ed_max_dims, only: n_pft, n_dbh - use ed_state_vars,only:edtype,polygontype + use ed_max_dims , only : n_pft & ! intent(in) + , n_dbh ! ! intent(in) + use ed_state_vars, only : edtype & ! structure + , polygontype ! ! structure implicit none - integer :: ipy - type(edtype),target :: cgrid - type(polygontype),pointer :: cpoly + !------ Arguments. ---------------------------------------------------------------------! + type(edtype) , target :: cgrid + !------ Local variables. ---------------------------------------------------------------! + integer :: ipy + integer :: isi + type(polygontype), pointer :: cpoly + !---------------------------------------------------------------------------------------! + + + !---------------------------------------------------------------------------------------! + ! Loop over polygons. ! + !---------------------------------------------------------------------------------------! do ipy = 1,cgrid%npolygons cpoly => cgrid%polygon(ipy) - - cpoly%agb_growth = 0.0 - cpoly%agb_mort = 0.0 - cpoly%agb_cut = 0.0 -! cpoly%agb_recruit = 0.0 - cpoly%basal_area_growth = 0.0 - cpoly%basal_area_mort = 0.0 - cpoly%basal_area_cut = 0.0 -! cpoly%basal_area_recruit= 0.0 - - enddo + !------------------------------------------------------------------------------------! + ! Loop over sites. ! + !------------------------------------------------------------------------------------! + do isi = 1,cpoly%nsites + cpoly%agb_growth (:,:,isi) = 0.0 + cpoly%agb_mort (:,:,isi) = 0.0 + cpoly%agb_cut (:,:,isi) = 0.0 + cpoly%basal_area_growth (:,:,isi) = 0.0 + cpoly%basal_area_mort (:,:,isi) = 0.0 + cpoly%basal_area_cut (:,:,isi) = 0.0 + end do + !------------------------------------------------------------------------------------! + end do + !---------------------------------------------------------------------------------------! return end subroutine zero_ed_yearly_vars diff --git a/ED/src/io/ed_init_full_history.F90 b/ED/src/io/ed_init_full_history.F90 index 945b8cb88..fd4738d93 100644 --- a/ED/src/io/ed_init_full_history.F90 +++ b/ED/src/io/ed_init_full_history.F90 @@ -431,2919 +431,4003 @@ end subroutine init_full_history_restart !==========================================================================================! !==========================================================================================! subroutine fill_history_grid(cgrid,ipy,py_index) - - use ed_state_vars,only: edtype,polygontype - use grid_coms,only : nzg - use ed_max_dims,only : n_pft,n_dbh,n_age,n_dist_types - use hdf5 - use hdf5_coms,only:file_id,dset_id,dspace_id,plist_id, & - globdims,chnkdims,chnkoffs,cnt,stride, & - memdims,memoffs,memsize,datatype_id - use ed_misc_coms, only: ndcycle - implicit none - - + use ed_state_vars, only : edtype & ! structure + , polygontype ! ! structure + use grid_coms , only : nzg ! ! intent(in) + use ed_max_dims , only : n_pft & ! intent(in) + , n_dbh & ! intent(in) + , n_age & ! intent(in) + , max_site & ! intent(in) + , n_dist_types ! ! intent(in) + use hdf5 + use hdf5_coms , only : file_id & ! intent(inout) + , dset_id & ! intent(inout) + , dspace_id & ! intent(inout) + , plist_id & ! intent(inout) + , globdims & ! intent(inout) + , chnkdims & ! intent(inout) + , chnkoffs & ! intent(inout) + , cnt & ! intent(inout) + , stride & ! intent(inout) + , memdims & ! intent(inout) + , memoffs & ! intent(inout) + , memsize & ! intent(inout) + , datatype_id ! ! intent(inout) + use ed_misc_coms , only : ndcycle & ! intent(in) + , writing_long & ! intent(in) + , writing_eorq & ! intent(in) + , writing_dcyc ! ! intent(in) + implicit none + !----- Interfaces. ---------------------------------------------------------------------! #if USE_INTERF - interface - subroutine hdf_getslab_r(buff,varn,dsetrank,iparallel,required,foundvar) - use hdf5_coms,only:memsize - real,dimension(memsize(1),memsize(2),memsize(3),memsize(4)) :: buff - integer :: dsetrank,iparallel - character(len=*),intent(in) :: varn - logical,intent(in) :: required - logical,intent(out) :: foundvar - end subroutine hdf_getslab_r - subroutine hdf_getslab_d(buff,varn,dsetrank,iparallel,required,foundvar) - use hdf5_coms,only:memsize - real(kind=8),dimension(memsize(1),memsize(2),memsize(3),memsize(4)) :: buff - integer :: dsetrank,iparallel - character(len=*),intent(in) :: varn - logical,intent(in) :: required - logical,intent(out) :: foundvar - end subroutine hdf_getslab_d - subroutine hdf_getslab_i(buff,varn,dsetrank,iparallel,required,foundvar) - use hdf5_coms,only:memsize - integer,dimension(memsize(1),memsize(2),memsize(3),memsize(4)) :: buff - integer :: dsetrank,iparallel - character(len=*),intent(in) :: varn - logical,intent(in) :: required - logical,intent(out) :: foundvar - end subroutine hdf_getslab_i - end interface + interface + subroutine hdf_getslab_r(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + real(kind=4) , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_r + !------------------------------------------------------------------------------------! + subroutine hdf_getslab_d(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + real(kind=8) , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_d + !------------------------------------------------------------------------------------! + subroutine hdf_getslab_i(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + integer , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_i + !------------------------------------------------------------------------------------! + end interface #endif + !---------------------------------------------------------------------------------------! + + + !----- Arguments. ----------------------------------------------------------------------! + type(edtype) , target :: cgrid + integer , intent(in) :: ipy + integer , intent(in) :: py_index + !----- Local variables. ----------------------------------------------------------------! + integer :: iparallel + integer :: dsetrank + integer(SIZE_T) :: sz + integer :: hdferr + logical :: foundvar + !---------------------------------------------------------------------------------------! - type(edtype),target :: cgrid - integer,intent(in) :: ipy,py_index - integer :: iparallel - integer :: dsetrank - integer(SIZE_T) :: sz - integer :: hdferr - logical :: foundvar - iparallel = 0 + !----- Turn off parallel for this sub-routine. -----------------------------------------! + iparallel = 0 + !---------------------------------------------------------------------------------------! - globdims = 0_8 - chnkdims = 0_8 - chnkoffs = 0_8 - memoffs = 0_8 - memdims = 0_8 - memsize = 1_8 + !---------------------------------------------------------------------------------------! + ! Reset the dimension arrays. ! + !---------------------------------------------------------------------------------------! + globdims(:) = 0_8 + chnkdims(:) = 0_8 + chnkoffs(:) = 0_8 + memoffs (:) = 0_8 + memdims (:) = 0_8 + memsize (:) = 1_8 + !---------------------------------------------------------------------------------------! - dsetrank = 1 - ! These are the dimensions in the filespace - ! itself. Global is the size of the dataset, - ! chnkoffs is the offset of the chunk we - ! are going to read. Chnkdims is the size - ! of the slab that is to be read. - - globdims(1) = int(cgrid%npolygons_global,8) - chnkdims(1) = 1_8 - chnkoffs(1) = int(py_index - 1,8) + !---------------------------------------------------------------------------------------! + ! For the remainder of this sub-routine, we must load the polygon variables ! + ! according to the dimensionality. If you are adding a new variable, make sure that it ! + ! is placed together with variables of the same dimensions. ! + ! ! + ! DSETRANK -- the rank of the variable. ! + ! GLOBDIMS -- the size of each dimension ! + ! CHNKDIMS -- the size of the chunk to be read this time ! + ! CHNKOFFS -- the offset (number of indices to be skipped) ! + ! MEMDIMS -- the dimensions of the buffer to be filled. ! + ! MEMOFFS -- the offset of the memory ! + ! MEMSIZE -- the size of variable that will house the information read. ! + !---------------------------------------------------------------------------------------! - ! These are the dimensions for the memory space - ! this should essentially be the same dimensioning - ! as the buffer that we are filling. This routine - ! is just filling a scalar point in a vector - ! of polygons. - memdims(1) = 1_8 - memoffs(1) = 0_8 - memsize(1) = 1_8 + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! Single dimension variables. ! + !---------------------------------------------------------------------------------------! + dsetrank = 1 + globdims(1) = int(cgrid%npolygons_global,8) + chnkdims(1) = 1_8 + chnkoffs(1) = int(py_index - 1,8) + memdims (1) = 1_8 + memoffs (1) = 0_8 + memsize (1) = 1_8 + !---------------------------------------------------------------------------------------! - call hdf_getslab_d(cgrid%walltime_py(ipy:ipy),'WALLTIME_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_i(cgrid%load_adjacency (ipy:ipy) & + ,'LOAD_ADJACENCY ' ,dsetrank,iparallel,.true. ,foundvar) + + call hdf_getslab_r(cgrid%wbar (ipy:ipy) & + ,'WBAR ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%Te (ipy:ipy) & + ,'TE ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%zbar (ipy:ipy) & + ,'ZBAR ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%sheat (ipy:ipy) & + ,'SHEAT ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%baseflow (ipy:ipy) & + ,'BASEFLOW ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%runoff (ipy:ipy) & + ,'RUNOFF ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%qrunoff (ipy:ipy) & + ,'QRUNOFF ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%swliq (ipy:ipy) & + ,'SWLIQ ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%total_agb (ipy:ipy) & + ,'TOTAL_AGB ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%total_basal_area (ipy:ipy) & + ,'TOTAL_BASAL_AREA ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%total_agb_growth (ipy:ipy) & + ,'TOTAL_AGB_GROWTH ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%total_agb_mort (ipy:ipy) & + ,'TOTAL_AGB_MORT ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%total_agb_recruit (ipy:ipy) & + ,'TOTAL_AGB_RECRUIT ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%total_basal_area_growth (ipy:ipy) & + ,'TOTAL_BASAL_AREA_GROWTH ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%total_basal_area_mort (ipy:ipy) & + ,'TOTAL_BASAL_AREA_MORT ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%total_basal_area_recruit(ipy:ipy) & + ,'TOTAL_BASAL_AREA_RECRUIT ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%cosz (ipy:ipy) & + ,'COSZ ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%cbudget_initialstorage (ipy:ipy) & + ,'CBUDGET_INITIALSTORAGE ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%cbudget_nep (ipy:ipy) & + ,'CBUDGET_NEP ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%nbudget_initialstorage (ipy:ipy) & + ,'NBUDGET_INITIALSTORAGE ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%Cleaf_grow (ipy:ipy) & + ,'CLEAF_GROW ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%Croot_grow (ipy:ipy) & + ,'CROOT_GROW ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%Cdead_grow (ipy:ipy) & + ,'CDEAD_GROW ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%Cstore_grow (ipy:ipy) & + ,'CSTORE_GROW ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%Cleaf_litter_flux (ipy:ipy) & + ,'CLEAF_LITTER_FLUX ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%Croot_litter_flux (ipy:ipy) & + ,'CROOT_LITTER_FLUX ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%Ccwd_flux (ipy:ipy) & + ,'CCWD_FLUX ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%Nleaf_grow (ipy:ipy) & + ,'NLEAF_GROW ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%Ndead_grow (ipy:ipy) & + ,'NDEAD_GROW ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%Nroot_grow (ipy:ipy) & + ,'NROOT_GROW ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%Nstore_grow (ipy:ipy) & + ,'NSTORE_GROW ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%Nleaf_litter_flux (ipy:ipy) & + ,'NLEAF_LITTER_FLUX ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%Nroot_litter_flux (ipy:ipy) & + ,'NROOT_LITTER_FLUX ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%Ncwd_flux (ipy:ipy) & + ,'NCWD_FLUX ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%Nbiomass_uptake (ipy:ipy) & + ,'NBIOMASS_UPTAKE ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%Ngross_min (ipy:ipy) & + ,'NGROSS_MIN ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%Nnet_min (ipy:ipy) & + ,'NNET_MIN ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%fast_soil_c (ipy:ipy) & + ,'FAST_SOIL_C_PY ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%slow_soil_c (ipy:ipy) & + ,'SLOW_SOIL_C_PY ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%struct_soil_c (ipy:ipy) & + ,'STRUCT_SOIL_C_PY ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%struct_soil_l (ipy:ipy) & + ,'STRUCT_SOIL_L_PY ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%cwd_c (ipy:ipy) & + ,'CWD_C_PY ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%fast_soil_n (ipy:ipy) & + ,'FAST_SOIL_N_PY ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mineral_soil_n (ipy:ipy) & + ,'MINERAL_SOIL_N_PY ' ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%cwd_n (ipy:ipy) & + ,'CWD_N_PY ' ,dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_i(cgrid%lsl(ipy:ipy),'LSL ',dsetrank,iparallel,.true.,foundvar) + !---------------------------------------------------------------------------------------! + ! Try to load daily and monthly means if the user is going to write them. ! + !---------------------------------------------------------------------------------------! + !------ Daily means. -------------------------------------------------------------------! + if (writing_long) then + call hdf_getslab_r(cgrid%dmean_nppleaf (ipy:ipy) & + ,'DMEAN_NPPLEAF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_nppfroot (ipy:ipy) & + ,'DMEAN_NPPFROOT_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_nppsapwood (ipy:ipy) & + ,'DMEAN_NPPSAPWOOD_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_nppcroot (ipy:ipy) & + ,'DMEAN_NPPCROOT_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_nppseeds (ipy:ipy) & + ,'DMEAN_NPPSEEDS_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_nppwood (ipy:ipy) & + ,'DMEAN_NPPWOOD_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_nppdaily (ipy:ipy) & + ,'DMEAN_NPPDAILY_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_A_decomp (ipy:ipy) & + ,'DMEAN_A_DECOMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_Af_decomp (ipy:ipy) & + ,'DMEAN_AF_DECOMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_co2_residual (ipy:ipy) & + ,'DMEAN_CO2_RESIDUAL_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_energy_residual(ipy:ipy) & + ,'DMEAN_ENERGY_RESIDUAL_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_water_residual (ipy:ipy) & + ,'DMEAN_WATER_RESIDUAL_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_gpp (ipy:ipy) & + ,'DMEAN_GPP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_npp (ipy:ipy) & + ,'DMEAN_NPP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_leaf_resp (ipy:ipy) & + ,'DMEAN_LEAF_RESP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_root_resp (ipy:ipy) & + ,'DMEAN_ROOT_RESP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_growth_resp (ipy:ipy) & + ,'DMEAN_GROWTH_RESP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_storage_resp (ipy:ipy) & + ,'DMEAN_STORAGE_RESP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_vleaf_resp (ipy:ipy) & + ,'DMEAN_VLEAF_RESP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_plresp (ipy:ipy) & + ,'DMEAN_PLRESP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_leaf_energy (ipy:ipy) & + ,'DMEAN_LEAF_ENERGY_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_leaf_water (ipy:ipy) & + ,'DMEAN_LEAF_WATER_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_leaf_hcap (ipy:ipy) & + ,'DMEAN_LEAF_HCAP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_leaf_vpdef (ipy:ipy) & + ,'DMEAN_LEAF_VPDEF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_leaf_temp (ipy:ipy) & + ,'DMEAN_LEAF_TEMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_leaf_fliq (ipy:ipy) & + ,'DMEAN_LEAF_FLIQ_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_leaf_gsw (ipy:ipy) & + ,'DMEAN_LEAF_GSW_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_leaf_gbw (ipy:ipy) & + ,'DMEAN_LEAF_GBW_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_wood_energy (ipy:ipy) & + ,'DMEAN_WOOD_ENERGY_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_wood_water (ipy:ipy) & + ,'DMEAN_WOOD_WATER_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_wood_hcap (ipy:ipy) & + ,'DMEAN_WOOD_HCAP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_wood_temp (ipy:ipy) & + ,'DMEAN_WOOD_TEMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_wood_fliq (ipy:ipy) & + ,'DMEAN_WOOD_FLIQ_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_wood_gbw (ipy:ipy) & + ,'DMEAN_WOOD_GBW_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_fs_open (ipy:ipy) & + ,'DMEAN_FS_OPEN_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_fsw (ipy:ipy) & + ,'DMEAN_FSW_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_fsn (ipy:ipy) & + ,'DMEAN_FSN_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_psi_open (ipy:ipy) & + ,'DMEAN_PSI_OPEN_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_psi_closed (ipy:ipy) & + ,'DMEAN_PSI_CLOSED_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_water_supply (ipy:ipy) & + ,'DMEAN_WATER_SUPPLY_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_par_l (ipy:ipy) & + ,'DMEAN_PAR_L_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_par_l_beam (ipy:ipy) & + ,'DMEAN_PAR_L_BEAM_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_par_l_diff (ipy:ipy) & + ,'DMEAN_PAR_L_DIFF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_rshort_l (ipy:ipy) & + ,'DMEAN_RSHORT_L_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_rlong_l (ipy:ipy) & + ,'DMEAN_RLONG_L_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_sensible_lc (ipy:ipy) & + ,'DMEAN_SENSIBLE_LC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_vapor_lc (ipy:ipy) & + ,'DMEAN_VAPOR_LC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_transp (ipy:ipy) & + ,'DMEAN_TRANSP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_intercepted_al (ipy:ipy) & + ,'DMEAN_INTERCEPTED_AL_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_wshed_lg (ipy:ipy) & + ,'DMEAN_WSHED_LG_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_rshort_w (ipy:ipy) & + ,'DMEAN_RSHORT_W_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_rlong_w (ipy:ipy) & + ,'DMEAN_RLONG_W_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_sensible_wc (ipy:ipy) & + ,'DMEAN_SENSIBLE_WC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_vapor_wc (ipy:ipy) & + ,'DMEAN_VAPOR_WC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_intercepted_aw (ipy:ipy) & + ,'DMEAN_INTERCEPTED_AW_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_wshed_wg (ipy:ipy) & + ,'DMEAN_WSHED_WG_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_rh (ipy:ipy) & + ,'DMEAN_RH_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_cwd_rh (ipy:ipy) & + ,'DMEAN_CWD_RH_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_nep (ipy:ipy) & + ,'DMEAN_NEP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_rk4step (ipy:ipy) & + ,'DMEAN_RK4STEP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_available_water(ipy:ipy) & + ,'DMEAN_AVAILABLE_WATER_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_can_theiv (ipy:ipy) & + ,'DMEAN_CAN_THEIV_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_can_theta (ipy:ipy) & + ,'DMEAN_CAN_THETA_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_can_vpdef (ipy:ipy) & + ,'DMEAN_CAN_VPDEF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_can_temp (ipy:ipy) & + ,'DMEAN_CAN_TEMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_can_shv (ipy:ipy) & + ,'DMEAN_CAN_SHV_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_can_co2 (ipy:ipy) & + ,'DMEAN_CAN_CO2_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_can_rhos (ipy:ipy) & + ,'DMEAN_CAN_RHOS_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_can_prss (ipy:ipy) & + ,'DMEAN_CAN_PRSS_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_gnd_temp (ipy:ipy) & + ,'DMEAN_GND_TEMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_gnd_shv (ipy:ipy) & + ,'DMEAN_GND_SHV_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_can_ggnd (ipy:ipy) & + ,'DMEAN_CAN_GGND_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_sfcw_depth (ipy:ipy) & + ,'DMEAN_SFCW_DEPTH_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_sfcw_energy (ipy:ipy) & + ,'DMEAN_SFCW_ENERGY_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_sfcw_mass (ipy:ipy) & + ,'DMEAN_SFCW_MASS_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_sfcw_temp (ipy:ipy) & + ,'DMEAN_SFCW_TEMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_sfcw_fliq (ipy:ipy) & + ,'DMEAN_SFCW_FLIQ_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_rshort_gnd (ipy:ipy) & + ,'DMEAN_RSHORT_GND_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_par_gnd (ipy:ipy) & + ,'DMEAN_PAR_GND_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_rlong_gnd (ipy:ipy) & + ,'DMEAN_RLONG_GND_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_rlongup (ipy:ipy) & + ,'DMEAN_RLONGUP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_parup (ipy:ipy) & + ,'DMEAN_PARUP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_nirup (ipy:ipy) & + ,'DMEAN_NIRUP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_rshortup (ipy:ipy) & + ,'DMEAN_RSHORTUP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_rnet (ipy:ipy) & + ,'DMEAN_RNET_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_albedo (ipy:ipy) & + ,'DMEAN_ALBEDO_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_albedo_beam (ipy:ipy) & + ,'DMEAN_ALBEDO_BEAM_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_albedo_diff (ipy:ipy) & + ,'DMEAN_ALBEDO_DIFF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_rlong_albedo (ipy:ipy) & + ,'DMEAN_RLONG_ALBEDO_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_ustar (ipy:ipy) & + ,'DMEAN_USTAR_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_tstar (ipy:ipy) & + ,'DMEAN_TSTAR_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_qstar (ipy:ipy) & + ,'DMEAN_QSTAR_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_cstar (ipy:ipy) & + ,'DMEAN_CSTAR_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_carbon_ac (ipy:ipy) & + ,'DMEAN_CARBON_AC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_carbon_st (ipy:ipy) & + ,'DMEAN_CARBON_ST_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_vapor_gc (ipy:ipy) & + ,'DMEAN_VAPOR_GC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_vapor_ac (ipy:ipy) & + ,'DMEAN_VAPOR_AC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_throughfall (ipy:ipy) & + ,'DMEAN_THROUGHFALL_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_runoff (ipy:ipy) & + ,'DMEAN_RUNOFF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_drainage (ipy:ipy) & + ,'DMEAN_DRAINAGE_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_sensible_gc (ipy:ipy) & + ,'DMEAN_SENSIBLE_GC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_sensible_ac (ipy:ipy) & + ,'DMEAN_SENSIBLE_AC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_qthroughfall (ipy:ipy) & + ,'DMEAN_QTHROUGHFALL_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_qrunoff (ipy:ipy) & + ,'DMEAN_QRUNOFF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_qdrainage (ipy:ipy) & + ,'DMEAN_QDRAINAGE_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_atm_theiv (ipy:ipy) & + ,'DMEAN_ATM_THEIV_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_atm_theta (ipy:ipy) & + ,'DMEAN_ATM_THETA_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_atm_temp (ipy:ipy) & + ,'DMEAN_ATM_TEMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_atm_vpdef (ipy:ipy) & + ,'DMEAN_ATM_VPDEF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_atm_shv (ipy:ipy) & + ,'DMEAN_ATM_SHV_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_atm_rshort (ipy:ipy) & + ,'DMEAN_ATM_RSHORT_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_atm_rshort_diff(ipy:ipy) & + ,'DMEAN_ATM_RSHORT_DIFF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_atm_par (ipy:ipy) & + ,'DMEAN_ATM_PAR_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_atm_par_diff (ipy:ipy) & + ,'DMEAN_ATM_PAR_DIFF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_atm_rlong (ipy:ipy) & + ,'DMEAN_ATM_RLONG_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_atm_vels (ipy:ipy) & + ,'DMEAN_ATM_VELS_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_atm_rhos (ipy:ipy) & + ,'DMEAN_ATM_RHOS_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_atm_prss (ipy:ipy) & + ,'DMEAN_ATM_PRSS_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_atm_co2 (ipy:ipy) & + ,'DMEAN_ATM_CO2_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_pcpg (ipy:ipy) & + ,'DMEAN_PCPG_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_qpcpg (ipy:ipy) & + ,'DMEAN_QPCPG_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_dpcpg (ipy:ipy) & + ,'DMEAN_DPCPG_PY ',dsetrank,iparallel,.false.,foundvar) + end if + !------ Monthly means. -----------------------------------------------------------------! + if (writing_eorq) then + call hdf_getslab_r(cgrid%mmean_fast_soil_c (ipy:ipy) & + ,'MMEAN_FAST_SOIL_C_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_slow_soil_c (ipy:ipy) & + ,'MMEAN_SLOW_SOIL_C_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_struct_soil_c (ipy:ipy) & + ,'MMEAN_STRUCT_SOIL_C_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_struct_soil_l (ipy:ipy) & + ,'MMEAN_STRUCT_SOIL_L_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_fast_soil_n (ipy:ipy) & + ,'MMEAN_FAST_SOIL_N_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_cwd_c (ipy:ipy) & + ,'MMEAN_CWD_C_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_mineral_soil_n (ipy:ipy) & + ,'MMEAN_MINERAL_SOIL_N_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_cwd_n (ipy:ipy) & + ,'MMEAN_CWD_N_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_gpp (ipy:ipy) & + ,'MMEAN_GPP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_npp (ipy:ipy) & + ,'MMEAN_NPP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_leaf_resp (ipy:ipy) & + ,'MMEAN_LEAF_RESP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_root_resp (ipy:ipy) & + ,'MMEAN_ROOT_RESP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_growth_resp (ipy:ipy) & + ,'MMEAN_GROWTH_RESP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_storage_resp (ipy:ipy) & + ,'MMEAN_STORAGE_RESP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_vleaf_resp (ipy:ipy) & + ,'MMEAN_VLEAF_RESP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_plresp (ipy:ipy) & + ,'MMEAN_PLRESP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_leaf_energy (ipy:ipy) & + ,'MMEAN_LEAF_ENERGY_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_leaf_water (ipy:ipy) & + ,'MMEAN_LEAF_WATER_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_leaf_hcap (ipy:ipy) & + ,'MMEAN_LEAF_HCAP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_leaf_vpdef (ipy:ipy) & + ,'MMEAN_LEAF_VPDEF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_leaf_temp (ipy:ipy) & + ,'MMEAN_LEAF_TEMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_leaf_fliq (ipy:ipy) & + ,'MMEAN_LEAF_FLIQ_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_leaf_gsw (ipy:ipy) & + ,'MMEAN_LEAF_GSW_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_leaf_gbw (ipy:ipy) & + ,'MMEAN_LEAF_GBW_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_wood_energy (ipy:ipy) & + ,'MMEAN_WOOD_ENERGY_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_wood_water (ipy:ipy) & + ,'MMEAN_WOOD_WATER_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_wood_hcap (ipy:ipy) & + ,'MMEAN_WOOD_HCAP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_wood_temp (ipy:ipy) & + ,'MMEAN_WOOD_TEMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_wood_fliq (ipy:ipy) & + ,'MMEAN_WOOD_FLIQ_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_wood_gbw (ipy:ipy) & + ,'MMEAN_WOOD_GBW_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_fs_open (ipy:ipy) & + ,'MMEAN_FS_OPEN_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_fsw (ipy:ipy) & + ,'MMEAN_FSW_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_fsn (ipy:ipy) & + ,'MMEAN_FSN_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_psi_open (ipy:ipy) & + ,'MMEAN_PSI_OPEN_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_psi_closed (ipy:ipy) & + ,'MMEAN_PSI_CLOSED_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_water_supply (ipy:ipy) & + ,'MMEAN_WATER_SUPPLY_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_par_l (ipy:ipy) & + ,'MMEAN_PAR_L_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_par_l_beam (ipy:ipy) & + ,'MMEAN_PAR_L_BEAM_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_par_l_diff (ipy:ipy) & + ,'MMEAN_PAR_L_DIFF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_rshort_l (ipy:ipy) & + ,'MMEAN_RSHORT_L_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_rlong_l (ipy:ipy) & + ,'MMEAN_RLONG_L_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_sensible_lc (ipy:ipy) & + ,'MMEAN_SENSIBLE_LC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_vapor_lc (ipy:ipy) & + ,'MMEAN_VAPOR_LC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_transp (ipy:ipy) & + ,'MMEAN_TRANSP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_intercepted_al (ipy:ipy) & + ,'MMEAN_INTERCEPTED_AL_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_wshed_lg (ipy:ipy) & + ,'MMEAN_WSHED_LG_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_rshort_w (ipy:ipy) & + ,'MMEAN_RSHORT_W_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_rlong_w (ipy:ipy) & + ,'MMEAN_RLONG_W_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_sensible_wc (ipy:ipy) & + ,'MMEAN_SENSIBLE_WC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_vapor_wc (ipy:ipy) & + ,'MMEAN_VAPOR_WC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_intercepted_aw (ipy:ipy) & + ,'MMEAN_INTERCEPTED_AW_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_wshed_wg (ipy:ipy) & + ,'MMEAN_WSHED_WG_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_nppleaf (ipy:ipy) & + ,'MMEAN_NPPLEAF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_nppfroot (ipy:ipy) & + ,'MMEAN_NPPFROOT_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_nppsapwood (ipy:ipy) & + ,'MMEAN_NPPSAPWOOD_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_nppcroot (ipy:ipy) & + ,'MMEAN_NPPCROOT_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_nppseeds (ipy:ipy) & + ,'MMEAN_NPPSEEDS_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_nppwood (ipy:ipy) & + ,'MMEAN_NPPWOOD_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_nppdaily (ipy:ipy) & + ,'MMEAN_NPPDAILY_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_rh (ipy:ipy) & + ,'MMEAN_RH_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_cwd_rh (ipy:ipy) & + ,'MMEAN_CWD_RH_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_nep (ipy:ipy) & + ,'MMEAN_NEP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_rk4step (ipy:ipy) & + ,'MMEAN_RK4STEP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_available_water(ipy:ipy) & + ,'MMEAN_AVAILABLE_WATER_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_can_theiv (ipy:ipy) & + ,'MMEAN_CAN_THEIV_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_can_theta (ipy:ipy) & + ,'MMEAN_CAN_THETA_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_can_vpdef (ipy:ipy) & + ,'MMEAN_CAN_VPDEF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_can_temp (ipy:ipy) & + ,'MMEAN_CAN_TEMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_can_shv (ipy:ipy) & + ,'MMEAN_CAN_SHV_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_can_co2 (ipy:ipy) & + ,'MMEAN_CAN_CO2_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_can_rhos (ipy:ipy) & + ,'MMEAN_CAN_RHOS_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_can_prss (ipy:ipy) & + ,'MMEAN_CAN_PRSS_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_gnd_temp (ipy:ipy) & + ,'MMEAN_GND_TEMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_gnd_shv (ipy:ipy) & + ,'MMEAN_GND_SHV_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_can_ggnd (ipy:ipy) & + ,'MMEAN_CAN_GGND_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_sfcw_depth (ipy:ipy) & + ,'MMEAN_SFCW_DEPTH_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_sfcw_energy (ipy:ipy) & + ,'MMEAN_SFCW_ENERGY_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_sfcw_mass (ipy:ipy) & + ,'MMEAN_SFCW_MASS_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_sfcw_temp (ipy:ipy) & + ,'MMEAN_SFCW_TEMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_sfcw_fliq (ipy:ipy) & + ,'MMEAN_SFCW_FLIQ_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_rshort_gnd (ipy:ipy) & + ,'MMEAN_RSHORT_GND_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_par_gnd (ipy:ipy) & + ,'MMEAN_PAR_GND_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_rlong_gnd (ipy:ipy) & + ,'MMEAN_RLONG_GND_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_rlongup (ipy:ipy) & + ,'MMEAN_RLONGUP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_parup (ipy:ipy) & + ,'MMEAN_PARUP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_nirup (ipy:ipy) & + ,'MMEAN_NIRUP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_rshortup (ipy:ipy) & + ,'MMEAN_RSHORTUP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_rnet (ipy:ipy) & + ,'MMEAN_RNET_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_albedo (ipy:ipy) & + ,'MMEAN_ALBEDO_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_albedo_beam (ipy:ipy) & + ,'MMEAN_ALBEDO_BEAM_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_albedo_diff (ipy:ipy) & + ,'MMEAN_ALBEDO_DIFF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_rlong_albedo (ipy:ipy) & + ,'MMEAN_RLONG_ALBEDO_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_ustar (ipy:ipy) & + ,'MMEAN_USTAR_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_tstar (ipy:ipy) & + ,'MMEAN_TSTAR_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_qstar (ipy:ipy) & + ,'MMEAN_QSTAR_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_cstar (ipy:ipy) & + ,'MMEAN_CSTAR_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_carbon_ac (ipy:ipy) & + ,'MMEAN_CARBON_AC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_carbon_st (ipy:ipy) & + ,'MMEAN_CARBON_ST_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_vapor_gc (ipy:ipy) & + ,'MMEAN_VAPOR_GC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_vapor_ac (ipy:ipy) & + ,'MMEAN_VAPOR_AC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_throughfall (ipy:ipy) & + ,'MMEAN_THROUGHFALL_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_runoff (ipy:ipy) & + ,'MMEAN_RUNOFF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_drainage (ipy:ipy) & + ,'MMEAN_DRAINAGE_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_sensible_gc (ipy:ipy) & + ,'MMEAN_SENSIBLE_GC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_sensible_ac (ipy:ipy) & + ,'MMEAN_SENSIBLE_AC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_qthroughfall (ipy:ipy) & + ,'MMEAN_QTHROUGHFALL_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_qrunoff (ipy:ipy) & + ,'MMEAN_QRUNOFF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_qdrainage (ipy:ipy) & + ,'MMEAN_QDRAINAGE_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_nppleaf (ipy:ipy) & + ,'MMEAN_NPPLEAF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_nppfroot (ipy:ipy) & + ,'MMEAN_NPPFROOT_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_nppsapwood (ipy:ipy) & + ,'MMEAN_NPPSAPWOOD_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_nppcroot (ipy:ipy) & + ,'MMEAN_NPPCROOT_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_nppseeds (ipy:ipy) & + ,'MMEAN_NPPSEEDS_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_nppwood (ipy:ipy) & + ,'MMEAN_NPPWOOD_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_nppdaily (ipy:ipy) & + ,'MMEAN_NPPDAILY_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_A_decomp (ipy:ipy) & + ,'MMEAN_A_DECOMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_Af_decomp (ipy:ipy) & + ,'MMEAN_AF_DECOMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_co2_residual (ipy:ipy) & + ,'MMEAN_CO2_RESIDUAL_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_energy_residual(ipy:ipy) & + ,'MMEAN_ENERGY_RESIDUAL_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_water_residual (ipy:ipy) & + ,'MMEAN_WATER_RESIDUAL_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_atm_theiv (ipy:ipy) & + ,'MMEAN_ATM_THEIV_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_atm_theta (ipy:ipy) & + ,'MMEAN_ATM_THETA_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_atm_temp (ipy:ipy) & + ,'MMEAN_ATM_TEMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_atm_vpdef (ipy:ipy) & + ,'MMEAN_ATM_VPDEF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_atm_shv (ipy:ipy) & + ,'MMEAN_ATM_SHV_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_atm_rshort (ipy:ipy) & + ,'MMEAN_ATM_RSHORT_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_atm_rshort_diff(ipy:ipy) & + ,'MMEAN_ATM_RSHORT_DIFF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_atm_par (ipy:ipy) & + ,'MMEAN_ATM_PAR_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_atm_par_diff (ipy:ipy) & + ,'MMEAN_ATM_PAR_DIFF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_atm_rlong (ipy:ipy) & + ,'MMEAN_ATM_RLONG_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_atm_vels (ipy:ipy) & + ,'MMEAN_ATM_VELS_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_atm_rhos (ipy:ipy) & + ,'MMEAN_ATM_RHOS_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_atm_prss (ipy:ipy) & + ,'MMEAN_ATM_PRSS_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_atm_co2 (ipy:ipy) & + ,'MMEAN_ATM_CO2_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_pcpg (ipy:ipy) & + ,'MMEAN_PCPG_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_qpcpg (ipy:ipy) & + ,'MMEAN_QPCPG_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_dpcpg (ipy:ipy) & + ,'MMEAN_DPCPG_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmsqu_gpp (ipy:ipy) & + ,'MMSQU_GPP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmsqu_npp (ipy:ipy) & + ,'MMSQU_NPP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmsqu_plresp (ipy:ipy) & + ,'MMSQU_PLRESP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmsqu_sensible_lc (ipy:ipy) & + ,'MMSQU_SENSIBLE_LC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmsqu_vapor_lc (ipy:ipy) & + ,'MMSQU_VAPOR_LC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmsqu_transp (ipy:ipy) & + ,'MMSQU_TRANSP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmsqu_sensible_wc (ipy:ipy) & + ,'MMSQU_SENSIBLE_WC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmsqu_vapor_wc (ipy:ipy) & + ,'MMSQU_VAPOR_WC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmsqu_rh (ipy:ipy) & + ,'MMSQU_RH_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmsqu_cwd_rh (ipy:ipy) & + ,'MMSQU_CWD_RH_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmsqu_nep (ipy:ipy) & + ,'MMSQU_NEP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmsqu_rlongup (ipy:ipy) & + ,'MMSQU_RLONGUP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmsqu_parup (ipy:ipy) & + ,'MMSQU_PARUP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmsqu_nirup (ipy:ipy) & + ,'MMSQU_NIRUP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmsqu_rshortup (ipy:ipy) & + ,'MMSQU_RSHORTUP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmsqu_rnet (ipy:ipy) & + ,'MMSQU_RNET_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmsqu_albedo (ipy:ipy) & + ,'MMSQU_ALBEDO_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmsqu_ustar (ipy:ipy) & + ,'MMSQU_USTAR_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmsqu_carbon_ac (ipy:ipy) & + ,'MMSQU_CARBON_AC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmsqu_carbon_st (ipy:ipy) & + ,'MMSQU_CARBON_ST_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmsqu_vapor_gc (ipy:ipy) & + ,'MMSQU_VAPOR_GC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmsqu_vapor_ac (ipy:ipy) & + ,'MMSQU_VAPOR_AC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmsqu_sensible_gc (ipy:ipy) & + ,'MMSQU_SENSIBLE_GC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmsqu_sensible_ac (ipy:ipy) & + ,'MMSQU_SENSIBLE_AC_PY ',dsetrank,iparallel,.false.,foundvar) + end if + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! - call hdf_getslab_i(cgrid%ncol_soil(ipy:ipy),'NCOL_SOIL ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%wbar(ipy:ipy),'WBAR ',dsetrank,iparallel,.true.,foundvar) - - call hdf_getslab_r(cgrid%Te(ipy:ipy),'TE ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cgrid%zbar(ipy:ipy),'ZBAR ',dsetrank,iparallel,.true.,foundvar) -!! call hdf_getslab_r(cgrid%tau(ipy:ipy),'TAU ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cgrid%sheat(ipy:ipy),'SHEAT ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cgrid%baseflow(ipy:ipy),'BASEFLOW ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_i(cgrid%load_adjacency(ipy:ipy),'LOAD_ADJACENCY ',dsetrank,iparallel,.true.,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! 2-D variables, dimensions: (nzg; npolygons). ! + !---------------------------------------------------------------------------------------! + dsetrank = 2 + globdims(1) = int(nzg,8) + chnkdims(1) = int(nzg,8) + memdims (1) = int(nzg,8) + memsize (1) = int(nzg,8) + chnkoffs(1) = 0_8 + memoffs (1) = 0_8 + + globdims(2) = int(cgrid%npolygons_global,8) + chnkdims(2) = 1_8 + chnkoffs(2) = int(py_index - 1,8) + memdims (2) = 1_8 + memsize (2) = 1_8 + memoffs (2) = 0_8 + + if (writing_long) then + call hdf_getslab_r(cgrid%dmean_soil_energy(:,ipy) & + ,'DMEAN_SOIL_ENERGY_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_soil_mstpot(:,ipy) & + ,'DMEAN_SOIL_MSTPOT_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_soil_water (:,ipy) & + ,'DMEAN_SOIL_WATER_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_soil_temp (:,ipy) & + ,'DMEAN_SOIL_TEMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_soil_fliq (:,ipy) & + ,'DMEAN_SOIL_FLIQ_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_smoist_gg (:,ipy) & + ,'DMEAN_SMOIST_GG_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_transloss (:,ipy) & + ,'DMEAN_TRANSLOSS_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_sensible_gg(:,ipy) & + ,'DMEAN_SENSIBLE_GG_PY ',dsetrank,iparallel,.false.,foundvar) + end if + if (writing_eorq) then + call hdf_getslab_r(cgrid%mmean_soil_energy(:,ipy) & + ,'MMEAN_SOIL_ENERGY_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_soil_mstpot(:,ipy) & + ,'MMEAN_SOIL_MSTPOT_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_soil_water (:,ipy) & + ,'MMEAN_SOIL_WATER_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_soil_temp (:,ipy) & + ,'MMEAN_SOIL_TEMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_soil_fliq (:,ipy) & + ,'MMEAN_SOIL_FLIQ_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_smoist_gg (:,ipy) & + ,'MMEAN_SMOIST_GG_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_transloss (:,ipy) & + ,'MMEAN_TRANSLOSS_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_sensible_gg(:,ipy) & + ,'MMEAN_SENSIBLE_GG_PY ',dsetrank,iparallel,.false.,foundvar) + end if + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! - call hdf_getslab_r(cgrid%swliq(ipy:ipy),'SWLIQ ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cgrid%cosz(ipy:ipy),'COSZ ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cgrid%lai (ipy:ipy),'LAI ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cgrid%wai (ipy:ipy),'WAI ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cgrid%avg_lma(ipy:ipy),'AVG_LMA ',dsetrank,iparallel,.false.,foundvar) - - call hdf_getslab_r(cgrid%runoff(ipy:ipy),'RUNOFF ',dsetrank,iparallel,.true.,foundvar) - - call hdf_getslab_r(cgrid%cbudget_initialstorage (ipy:ipy),'CBUDGET_INITIALSTORAGE ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cgrid%cbudget_nep (ipy:ipy),'CBUDGET_NEP ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cgrid%nbudget_initialstorage (ipy:ipy),'NBUDGET_INITIALSTORAGE ' & - ,dsetrank,iparallel,.true.,foundvar) - - - call hdf_getslab_r(cgrid%total_agb (ipy:ipy),'TOTAL_AGB ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cgrid%total_agb_growth (ipy:ipy),'TOTAL_AGB_GROWTH ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cgrid%total_agb_mort (ipy:ipy),'TOTAL_AGB_MORT ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cgrid%total_agb_recruit (ipy:ipy),'TOTAL_AGB_RECRUIT ' & - ,dsetrank,iparallel,.true.,foundvar) - - call hdf_getslab_r(cgrid%total_basal_area (ipy:ipy),'TOTAL_BASAL_AREA ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cgrid%total_basal_area_growth (ipy:ipy),'TOTAL_BASAL_AREA_GROWTH ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cgrid%total_basal_area_mort (ipy:ipy),'TOTAL_BASAL_AREA_MORT ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cgrid%total_basal_area_recruit (ipy:ipy),'TOTAL_BASAL_AREA_RECRUIT ' & - ,dsetrank,iparallel,.true.,foundvar) - - ! All daily and monthly variables need to be retrieved if you are loading there... - - if (associated(cgrid%dmean_pcpg )) & - call hdf_getslab_r(cgrid%dmean_pcpg (ipy:ipy) ,'DMEAN_PCPG ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_runoff )) & - call hdf_getslab_r(cgrid%dmean_runoff (ipy:ipy) ,'DMEAN_RUNOFF ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_drainage )) & - call hdf_getslab_r(cgrid%dmean_drainage (ipy:ipy) ,'DMEAN_DRAINAGE ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_gpp )) & - call hdf_getslab_r(cgrid%dmean_gpp (ipy:ipy) ,'DMEAN_GPP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_nppleaf )) & - call hdf_getslab_r(cgrid%dmean_nppleaf (ipy:ipy) ,'DMEAN_NPPLEAF ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_nppfroot )) & - call hdf_getslab_r(cgrid%dmean_nppfroot (ipy:ipy) ,'DMEAN_NPPFROOT ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_nppsapwood )) & - call hdf_getslab_r(cgrid%dmean_nppsapwood (ipy:ipy) ,'DMEAN_NPPSAPWOOD ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_nppcroot )) & - call hdf_getslab_r(cgrid%dmean_nppcroot (ipy:ipy) ,'DMEAN_NPPCROOT ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_nppseeds )) & - call hdf_getslab_r(cgrid%dmean_nppseeds (ipy:ipy) ,'DMEAN_NPPSEEDS ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_nppwood )) & - call hdf_getslab_r(cgrid%dmean_nppwood (ipy:ipy) ,'DMEAN_NPPWOOD ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_nppdaily )) & - call hdf_getslab_r(cgrid%dmean_nppdaily (ipy:ipy) ,'DMEAN_NPPDAILY ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_evap )) & - call hdf_getslab_r(cgrid%dmean_evap (ipy:ipy) ,'DMEAN_EVAP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_transp )) & - call hdf_getslab_r(cgrid%dmean_transp (ipy:ipy) ,'DMEAN_TRANSP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_sensible_lc )) & - call hdf_getslab_r(cgrid%dmean_sensible_lc (ipy:ipy) ,'DMEAN_SENSIBLE_LC ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_sensible_wc )) & - call hdf_getslab_r(cgrid%dmean_sensible_wc (ipy:ipy) ,'DMEAN_SENSIBLE_WC ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_sensible_gc )) & - call hdf_getslab_r(cgrid%dmean_sensible_gc (ipy:ipy) ,'DMEAN_SENSIBLE_GC ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_sensible_ac )) & - call hdf_getslab_r(cgrid%dmean_sensible_ac (ipy:ipy) ,'DMEAN_SENSIBLE_AC ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_vapor_lc )) & - call hdf_getslab_r(cgrid%dmean_vapor_lc (ipy:ipy) ,'DMEAN_VAPOR_LC ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_vapor_wc )) & - call hdf_getslab_r(cgrid%dmean_vapor_wc (ipy:ipy) ,'DMEAN_VAPOR_WC ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_vapor_gc )) & - call hdf_getslab_r(cgrid%dmean_vapor_gc (ipy:ipy) ,'DMEAN_VAPOR_GC ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_vapor_ac )) & - call hdf_getslab_r(cgrid%dmean_vapor_ac (ipy:ipy) ,'DMEAN_VAPOR_AC ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_ustar )) & - call hdf_getslab_r(cgrid%dmean_ustar (ipy:ipy) ,'DMEAN_USTAR ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_tstar )) & - call hdf_getslab_r(cgrid%dmean_tstar (ipy:ipy) ,'DMEAN_TSTAR ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_qstar )) & - call hdf_getslab_r(cgrid%dmean_qstar (ipy:ipy) ,'DMEAN_QSTAR ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_cstar )) & - call hdf_getslab_r(cgrid%dmean_cstar (ipy:ipy) ,'DMEAN_CSTAR ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_nep )) & - call hdf_getslab_r(cgrid%dmean_nep (ipy:ipy) ,'DMEAN_NEP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_carbon_ac )) & - call hdf_getslab_r(cgrid%dmean_carbon_ac (ipy:ipy) ,'DMEAN_CARBON_AC ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_carbon_st )) & - call hdf_getslab_r(cgrid%dmean_carbon_st (ipy:ipy) ,'DMEAN_CARBON_ST ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_plresp )) & - call hdf_getslab_r(cgrid%dmean_plresp (ipy:ipy) ,'DMEAN_PLRESP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_rh )) & - call hdf_getslab_r(cgrid%dmean_rh (ipy:ipy) ,'DMEAN_RH ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_cwd_rh )) & - call hdf_getslab_r(cgrid%dmean_cwd_rh (ipy:ipy) ,'DMEAN_CWD_RH ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_leaf_resp )) & - call hdf_getslab_r(cgrid%dmean_leaf_resp (ipy:ipy) ,'DMEAN_LEAF_RESP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_root_resp )) & - call hdf_getslab_r(cgrid%dmean_root_resp (ipy:ipy) ,'DMEAN_ROOT_RESP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_growth_resp )) & - call hdf_getslab_r(cgrid%dmean_growth_resp (ipy:ipy) ,'DMEAN_GROWTH_RESP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_storage_resp )) & - call hdf_getslab_r(cgrid%dmean_storage_resp (ipy:ipy) ,'DMEAN_STORAGE_RESP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_vleaf_resp )) & - call hdf_getslab_r(cgrid%dmean_vleaf_resp (ipy:ipy) ,'DMEAN_VLEAF_RESP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_fs_open )) & - call hdf_getslab_r(cgrid%dmean_fs_open (ipy:ipy) ,'DMEAN_FS_OPEN ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%dmean_fsw )) & - call hdf_getslab_r(cgrid%dmean_fsw (ipy:ipy) ,'DMEAN_FSW ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%dmean_fsn )) & - call hdf_getslab_r(cgrid%dmean_fsn (ipy:ipy) ,'DMEAN_FSN ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%dmean_can_temp )) & - call hdf_getslab_r(cgrid%dmean_can_temp (ipy:ipy) ,'DMEAN_CAN_TEMP ' & - ,dsetrank,iparallel,.false.,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! 2-D variables, dimensions: (ndcycle; npolygons). ! + !---------------------------------------------------------------------------------------! + dsetrank = 2 + globdims(1) = int(ndcycle,8) + chnkdims(1) = int(ndcycle,8) + memdims (1) = int(ndcycle,8) + memsize (1) = int(ndcycle,8) + chnkoffs(1) = 0_8 + memoffs (1) = 0_8 + + globdims(2) = int(cgrid%npolygons_global,8) + chnkdims(2) = 1_8 + chnkoffs(2) = int(py_index - 1,8) + memdims (2) = 1_8 + memsize (2) = 1_8 + memoffs (2) = 0_8 + + if (writing_dcyc) then + call hdf_getslab_r(cgrid%qmean_gpp (:,ipy) & + ,'QMEAN_GPP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_npp (:,ipy) & + ,'QMEAN_NPP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_leaf_resp (:,ipy) & + ,'QMEAN_LEAF_RESP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_root_resp (:,ipy) & + ,'QMEAN_ROOT_RESP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_growth_resp (:,ipy) & + ,'QMEAN_GROWTH_RESP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_storage_resp (:,ipy) & + ,'QMEAN_STORAGE_RESP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_vleaf_resp (:,ipy) & + ,'QMEAN_VLEAF_RESP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_plresp (:,ipy) & + ,'QMEAN_PLRESP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_leaf_energy (:,ipy) & + ,'QMEAN_LEAF_ENERGY_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_leaf_water (:,ipy) & + ,'QMEAN_LEAF_WATER_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_leaf_hcap (:,ipy) & + ,'QMEAN_LEAF_HCAP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_leaf_vpdef (:,ipy) & + ,'QMEAN_LEAF_VPDEF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_leaf_temp (:,ipy) & + ,'QMEAN_LEAF_TEMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_leaf_fliq (:,ipy) & + ,'QMEAN_LEAF_FLIQ_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_leaf_gsw (:,ipy) & + ,'QMEAN_LEAF_GSW_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_leaf_gbw (:,ipy) & + ,'QMEAN_LEAF_GBW_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_wood_energy (:,ipy) & + ,'QMEAN_WOOD_ENERGY_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_wood_water (:,ipy) & + ,'QMEAN_WOOD_WATER_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_wood_hcap (:,ipy) & + ,'QMEAN_WOOD_HCAP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_wood_temp (:,ipy) & + ,'QMEAN_WOOD_TEMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_wood_fliq (:,ipy) & + ,'QMEAN_WOOD_FLIQ_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_wood_gbw (:,ipy) & + ,'QMEAN_WOOD_GBW_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_fs_open (:,ipy) & + ,'QMEAN_FS_OPEN_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_fsw (:,ipy) & + ,'QMEAN_FSW_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_fsn (:,ipy) & + ,'QMEAN_FSN_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_psi_open (:,ipy) & + ,'QMEAN_PSI_OPEN_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_psi_closed (:,ipy) & + ,'QMEAN_PSI_CLOSED_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_water_supply (:,ipy) & + ,'QMEAN_WATER_SUPPLY_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_par_l (:,ipy) & + ,'QMEAN_PAR_L_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_par_l_beam (:,ipy) & + ,'QMEAN_PAR_L_BEAM_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_par_l_diff (:,ipy) & + ,'QMEAN_PAR_L_DIFF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_rshort_l (:,ipy) & + ,'QMEAN_RSHORT_L_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_rlong_l (:,ipy) & + ,'QMEAN_RLONG_L_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_sensible_lc (:,ipy) & + ,'QMEAN_SENSIBLE_LC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_vapor_lc (:,ipy) & + ,'QMEAN_VAPOR_LC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_transp (:,ipy) & + ,'QMEAN_TRANSP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_intercepted_al (:,ipy) & + ,'QMEAN_INTERCEPTED_AL_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_wshed_lg (:,ipy) & + ,'QMEAN_WSHED_LG_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_rshort_w (:,ipy) & + ,'QMEAN_RSHORT_W_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_rlong_w (:,ipy) & + ,'QMEAN_RLONG_W_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_sensible_wc (:,ipy) & + ,'QMEAN_SENSIBLE_WC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_vapor_wc (:,ipy) & + ,'QMEAN_VAPOR_WC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_intercepted_aw (:,ipy) & + ,'QMEAN_INTERCEPTED_AW_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_wshed_wg (:,ipy) & + ,'QMEAN_WSHED_WG_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_rh (:,ipy) & + ,'QMEAN_RH_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_cwd_rh (:,ipy) & + ,'QMEAN_CWD_RH_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_nep (:,ipy) & + ,'QMEAN_NEP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_rk4step (:,ipy) & + ,'QMEAN_RK4STEP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_available_water(:,ipy) & + ,'QMEAN_AVAILABLE_WATER_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_can_theiv (:,ipy) & + ,'QMEAN_CAN_THEIV_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_can_theta (:,ipy) & + ,'QMEAN_CAN_THETA_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_can_vpdef (:,ipy) & + ,'QMEAN_CAN_VPDEF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_can_temp (:,ipy) & + ,'QMEAN_CAN_TEMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_can_shv (:,ipy) & + ,'QMEAN_CAN_SHV_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_can_co2 (:,ipy) & + ,'QMEAN_CAN_CO2_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_can_rhos (:,ipy) & + ,'QMEAN_CAN_RHOS_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_can_prss (:,ipy) & + ,'QMEAN_CAN_PRSS_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_gnd_temp (:,ipy) & + ,'QMEAN_GND_TEMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_gnd_shv (:,ipy) & + ,'QMEAN_GND_SHV_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_can_ggnd (:,ipy) & + ,'QMEAN_CAN_GGND_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_sfcw_depth (:,ipy) & + ,'QMEAN_SFCW_DEPTH_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_sfcw_energy (:,ipy) & + ,'QMEAN_SFCW_ENERGY_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_sfcw_mass (:,ipy) & + ,'QMEAN_SFCW_MASS_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_sfcw_temp (:,ipy) & + ,'QMEAN_SFCW_TEMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_sfcw_fliq (:,ipy) & + ,'QMEAN_SFCW_FLIQ_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_rshort_gnd (:,ipy) & + ,'QMEAN_RSHORT_GND_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_par_gnd (:,ipy) & + ,'QMEAN_PAR_GND_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_rlong_gnd (:,ipy) & + ,'QMEAN_RLONG_GND_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_rlongup (:,ipy) & + ,'QMEAN_RLONGUP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_parup (:,ipy) & + ,'QMEAN_PARUP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_nirup (:,ipy) & + ,'QMEAN_NIRUP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_rshortup (:,ipy) & + ,'QMEAN_RSHORTUP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_rnet (:,ipy) & + ,'QMEAN_RNET_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_albedo (:,ipy) & + ,'QMEAN_ALBEDO_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_albedo_beam (:,ipy) & + ,'QMEAN_ALBEDO_BEAM_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_albedo_diff (:,ipy) & + ,'QMEAN_ALBEDO_DIFF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_rlong_albedo (:,ipy) & + ,'QMEAN_RLONG_ALBEDO_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_ustar (:,ipy) & + ,'QMEAN_USTAR_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_tstar (:,ipy) & + ,'QMEAN_TSTAR_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_qstar (:,ipy) & + ,'QMEAN_QSTAR_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_cstar (:,ipy) & + ,'QMEAN_CSTAR_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_carbon_ac (:,ipy) & + ,'QMEAN_CARBON_AC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_carbon_st (:,ipy) & + ,'QMEAN_CARBON_ST_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_vapor_gc (:,ipy) & + ,'QMEAN_VAPOR_GC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_vapor_ac (:,ipy) & + ,'QMEAN_VAPOR_AC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_throughfall (:,ipy) & + ,'QMEAN_THROUGHFALL_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_runoff (:,ipy) & + ,'QMEAN_RUNOFF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_drainage (:,ipy) & + ,'QMEAN_DRAINAGE_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_sensible_gc (:,ipy) & + ,'QMEAN_SENSIBLE_GC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_sensible_ac (:,ipy) & + ,'QMEAN_SENSIBLE_AC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_qthroughfall (:,ipy) & + ,'QMEAN_QTHROUGHFALL_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_qrunoff (:,ipy) & + ,'QMEAN_QRUNOFF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_qdrainage (:,ipy) & + ,'QMEAN_QDRAINAGE_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_atm_theiv (:,ipy) & + ,'QMEAN_ATM_THEIV_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_atm_theta (:,ipy) & + ,'QMEAN_ATM_THETA_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_atm_temp (:,ipy) & + ,'QMEAN_ATM_TEMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_atm_vpdef (:,ipy) & + ,'QMEAN_ATM_VPDEF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_atm_shv (:,ipy) & + ,'QMEAN_ATM_SHV_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_atm_rshort (:,ipy) & + ,'QMEAN_ATM_RSHORT_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_atm_rshort_diff(:,ipy) & + ,'QMEAN_ATM_RSHORT_DIFF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_atm_par (:,ipy) & + ,'QMEAN_ATM_PAR_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_atm_par_diff (:,ipy) & + ,'QMEAN_ATM_PAR_DIFF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_atm_rlong (:,ipy) & + ,'QMEAN_ATM_RLONG_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_atm_vels (:,ipy) & + ,'QMEAN_ATM_VELS_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_atm_rhos (:,ipy) & + ,'QMEAN_ATM_RHOS_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_atm_prss (:,ipy) & + ,'QMEAN_ATM_PRSS_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_atm_co2 (:,ipy) & + ,'QMEAN_ATM_CO2_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_pcpg (:,ipy) & + ,'QMEAN_PCPG_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_qpcpg (:,ipy) & + ,'QMEAN_QPCPG_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_dpcpg (:,ipy) & + ,'QMEAN_DPCPG_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmsqu_gpp (:,ipy) & + ,'QMSQU_GPP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmsqu_npp (:,ipy) & + ,'QMSQU_NPP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmsqu_plresp (:,ipy) & + ,'QMSQU_PLRESP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmsqu_sensible_lc (:,ipy) & + ,'QMSQU_SENSIBLE_LC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmsqu_vapor_lc (:,ipy) & + ,'QMSQU_VAPOR_LC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmsqu_transp (:,ipy) & + ,'QMSQU_TRANSP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmsqu_sensible_wc (:,ipy) & + ,'QMSQU_SENSIBLE_WC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmsqu_vapor_wc (:,ipy) & + ,'QMSQU_VAPOR_WC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmsqu_rh (:,ipy) & + ,'QMSQU_RH_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmsqu_cwd_rh (:,ipy) & + ,'QMSQU_CWD_RH_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmsqu_nep (:,ipy) & + ,'QMSQU_NEP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmsqu_rlongup (:,ipy) & + ,'QMSQU_RLONGUP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmsqu_parup (:,ipy) & + ,'QMSQU_PARUP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmsqu_nirup (:,ipy) & + ,'QMSQU_NIRUP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmsqu_rshortup (:,ipy) & + ,'QMSQU_RSHORTUP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmsqu_rnet (:,ipy) & + ,'QMSQU_RNET_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmsqu_albedo (:,ipy) & + ,'QMSQU_ALBEDO_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmsqu_ustar (:,ipy) & + ,'QMSQU_USTAR_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmsqu_carbon_ac (:,ipy) & + ,'QMSQU_CARBON_AC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmsqu_carbon_st (:,ipy) & + ,'QMSQU_CARBON_ST_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmsqu_vapor_gc (:,ipy) & + ,'QMSQU_VAPOR_GC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmsqu_vapor_ac (:,ipy) & + ,'QMSQU_VAPOR_AC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmsqu_sensible_gc (:,ipy) & + ,'QMSQU_SENSIBLE_GC_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmsqu_sensible_ac (:,ipy) & + ,'QMSQU_SENSIBLE_AC_PY ',dsetrank,iparallel,.false.,foundvar) + end if + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! - if (associated(cgrid%dmean_can_shv )) & - call hdf_getslab_r(cgrid%dmean_can_shv (ipy:ipy) ,'DMEAN_CAN_SHV ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%dmean_can_prss )) & - call hdf_getslab_r(cgrid%dmean_can_prss (ipy:ipy) ,'DMEAN_CAN_PRSS ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%dmean_can_theta )) & - call hdf_getslab_r(cgrid%dmean_can_theta (ipy:ipy) ,'DMEAN_CAN_THETA ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%dmean_can_theiv )) & - call hdf_getslab_r(cgrid%dmean_can_theiv (ipy:ipy) ,'DMEAN_CAN_THEIV ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%dmean_can_vpdef )) & - call hdf_getslab_r(cgrid%dmean_can_vpdef (ipy:ipy) ,'DMEAN_CAN_VPDEF ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%dmean_can_co2 )) & - call hdf_getslab_r(cgrid%dmean_can_co2 (ipy:ipy) ,'DMEAN_CAN_CO2 ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%dmean_can_rhos )) & - call hdf_getslab_r(cgrid%dmean_can_rhos (ipy:ipy) ,'DMEAN_CAN_RHOS ' & - ,dsetrank,iparallel,.false.,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! 2-D variables, dimensions: (13 months; npolygons). ! + !---------------------------------------------------------------------------------------! + dsetrank = 2 + globdims(1) = int(13,8) + chnkdims(1) = int(13,8) + memdims (1) = int(13,8) + memsize (1) = int(13,8) + chnkoffs(1) = 0_8 + memoffs (1) = 0_8 + globdims(2) = int(cgrid%npolygons_global,8) + chnkdims(2) = 1_8 + chnkoffs(2) = int(py_index - 1,8) + memdims (2) = 1_8 + memsize (2) = 1_8 + memoffs (2) = 0_8 + + call hdf_getslab_r(cgrid%workload(:,ipy) & + ,'WORKLOAD ',dsetrank,iparallel,.true.,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! - if (associated(cgrid%dmean_gnd_temp )) & - call hdf_getslab_r(cgrid%dmean_gnd_temp (ipy:ipy) ,'DMEAN_GND_TEMP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%dmean_gnd_shv )) & - call hdf_getslab_r(cgrid%dmean_gnd_shv (ipy:ipy) ,'DMEAN_GND_SHV ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%dmean_leaf_energy )) & - call hdf_getslab_r(cgrid%dmean_leaf_energy (ipy:ipy) ,'DMEAN_LEAF_ENERGY ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%dmean_leaf_water )) & - call hdf_getslab_r(cgrid%dmean_leaf_water (ipy:ipy) ,'DMEAN_LEAF_WATER ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%dmean_leaf_hcap )) & - call hdf_getslab_r(cgrid%dmean_leaf_hcap (ipy:ipy) ,'DMEAN_LEAF_HCAP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%dmean_leaf_temp )) & - call hdf_getslab_r(cgrid%dmean_leaf_temp (ipy:ipy) ,'DMEAN_LEAF_TEMP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%dmean_leaf_vpdef )) & - call hdf_getslab_r(cgrid%dmean_leaf_vpdef (ipy:ipy) ,'DMEAN_LEAF_VPDEF ' & - ,dsetrank,iparallel,.false.,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! 3-D variables, dimensions: (max_site;max_site+1;npolygons). ! + !---------------------------------------------------------------------------------------! + dsetrank = 3 + globdims(1) = int(max_site,8) + chnkdims(1) = int(max_site,8) + memdims (1) = int(max_site,8) + memsize (1) = int(max_site,8) + chnkoffs(1) = 0_8 + memoffs (1) = 0_8 - if (associated(cgrid%dmean_wood_energy )) & - call hdf_getslab_r(cgrid%dmean_wood_energy (ipy:ipy) ,'DMEAN_WOOD_ENERGY ' & - ,dsetrank,iparallel,.false.,foundvar) + globdims(2) = int(max_site+1,8) + chnkdims(2) = int(max_site+1,8) + memdims (2) = int(max_site+1,8) + memsize (2) = int(max_site+1,8) + chnkoffs(2) = 0_8 + memoffs (2) = 0_8 - if (associated(cgrid%dmean_wood_water )) & - call hdf_getslab_r(cgrid%dmean_wood_water (ipy:ipy) ,'DMEAN_WOOD_WATER ' & - ,dsetrank,iparallel,.false.,foundvar) + globdims(3) = int(cgrid%npolygons_global,8) + chnkdims(3) = 1_8 + chnkoffs(3) = int(py_index - 1,8) + memdims (3) = 1_8 + memsize (3) = 1_8 + memoffs (3) = 0_8 - if (associated(cgrid%dmean_wood_hcap )) & - call hdf_getslab_r(cgrid%dmean_wood_hcap (ipy:ipy) ,'DMEAN_WOOD_HCAP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%dmean_wood_temp )) & - call hdf_getslab_r(cgrid%dmean_wood_temp (ipy:ipy) ,'DMEAN_WOOD_TEMP ' & - ,dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%site_adjacency(:,:,ipy) & + ,'SITE_ADJACENCY ',dsetrank,iparallel,.true.,foundvar) - if (associated(cgrid%dmean_atm_temp )) & - call hdf_getslab_r(cgrid%dmean_atm_temp (ipy:ipy) ,'DMEAN_ATM_TEMP ' & - ,dsetrank,iparallel,.false.,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! - if (associated(cgrid%dmean_atm_vpdef )) & - call hdf_getslab_r(cgrid%dmean_atm_vpdef (ipy:ipy) ,'DMEAN_ATM_VPDEF ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_rshort )) & - call hdf_getslab_r(cgrid%dmean_rshort (ipy:ipy) ,'DMEAN_RSHORT ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_rshort_diff )) & - call hdf_getslab_r(cgrid%dmean_rshort_diff (ipy:ipy) ,'DMEAN_RSHORT_DIFF ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_par )) & - call hdf_getslab_r(cgrid%dmean_par (ipy:ipy) ,'DMEAN_PAR ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_par_diff )) & - call hdf_getslab_r(cgrid%dmean_par_diff (ipy:ipy) ,'DMEAN_PAR_DIFF ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_rlong )) & - call hdf_getslab_r(cgrid%dmean_rlong (ipy:ipy) ,'DMEAN_RLONG ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_rlongup )) & - call hdf_getslab_r(cgrid%dmean_rlongup (ipy:ipy) ,'DMEAN_RLONGUP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_parup )) & - call hdf_getslab_r(cgrid%dmean_parup (ipy:ipy) ,'DMEAN_PARUP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_nirup )) & - call hdf_getslab_r(cgrid%dmean_nirup (ipy:ipy) ,'DMEAN_NIRUP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_rshortup )) & - call hdf_getslab_r(cgrid%dmean_rshortup (ipy:ipy) ,'DMEAN_RSHORTUP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_rnet )) & - call hdf_getslab_r(cgrid%dmean_rnet (ipy:ipy) ,'DMEAN_RNET ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_rshort_gnd )) & - call hdf_getslab_r(cgrid%dmean_rshort_gnd (ipy:ipy) ,'DMEAN_RSHORT_GND ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_par_gnd )) & - call hdf_getslab_r(cgrid%dmean_par_gnd (ipy:ipy) ,'DMEAN_PAR_GND ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%dmean_rlong_gnd )) & - call hdf_getslab_r(cgrid%dmean_rlong_gnd (ipy:ipy) ,'DMEAN_RLONG_GND ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%dmean_atm_shv )) & - call hdf_getslab_r(cgrid%dmean_atm_shv (ipy:ipy) ,'DMEAN_ATM_SHV ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%dmean_atm_co2 )) & - call hdf_getslab_r(cgrid%dmean_atm_co2 (ipy:ipy) ,'DMEAN_ATM_CO2 ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%dmean_atm_prss )) & - call hdf_getslab_r(cgrid%dmean_atm_prss (ipy:ipy) ,'DMEAN_ATM_PRSS ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%dmean_atm_vels )) & - call hdf_getslab_r(cgrid%dmean_atm_vels (ipy:ipy) ,'DMEAN_ATM_VELS ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%dmean_co2_residual )) & - call hdf_getslab_r(cgrid%dmean_co2_residual (ipy:ipy) ,'DMEAN_CO2_RESIDUAL ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%dmean_energy_residual)) & - call hdf_getslab_r(cgrid%dmean_energy_residual(ipy:ipy) ,'DMEAN_ENERGY_RESIDUAL ' & - ,dsetrank,iparallel,.false.,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! 3-D variables, dimensions: (nzg;ndcycle;npolygons). ! + !---------------------------------------------------------------------------------------! + dsetrank = 3 + globdims(1) = int(nzg,8) + chnkdims(1) = int(nzg,8) + memdims (1) = int(nzg,8) + memsize (1) = int(nzg,8) + chnkoffs(1) = 0_8 + memoffs (1) = 0_8 - if (associated(cgrid%dmean_water_residual )) & - call hdf_getslab_r(cgrid%dmean_water_residual (ipy:ipy) ,'DMEAN_WATER_RESIDUAL ' & - ,dsetrank,iparallel,.false.,foundvar) + globdims(2) = int(ndcycle,8) + chnkdims(2) = int(ndcycle,8) + memdims (2) = int(ndcycle,8) + memsize (2) = int(ndcycle,8) + chnkoffs(2) = 0_8 + memoffs (2) = 0_8 + globdims(3) = int(cgrid%npolygons_global,8) + chnkdims(3) = 1_8 + chnkoffs(3) = int(py_index - 1,8) + memdims (3) = 1_8 + memsize (3) = 1_8 + memoffs (3) = 0_8 + + if (writing_dcyc) then + call hdf_getslab_r(cgrid%qmean_soil_energy(:,:,ipy) & + ,'QMEAN_SOIL_ENERGY_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_soil_mstpot(:,:,ipy) & + ,'QMEAN_SOIL_MSTPOT_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_soil_water (:,:,ipy) & + ,'QMEAN_SOIL_WATER_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_soil_temp (:,:,ipy) & + ,'QMEAN_SOIL_TEMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_soil_fliq (:,:,ipy) & + ,'QMEAN_SOIL_FLIQ_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_smoist_gg (:,:,ipy) & + ,'QMEAN_SMOIST_GG_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_transloss (:,:,ipy) & + ,'QMEAN_TRANSLOSS_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%qmean_sensible_gg(:,:,ipy) & + ,'QMEAN_SENSIBLE_GG_PY ',dsetrank,iparallel,.false.,foundvar) + end if + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! - if (associated(cgrid%mmean_co2_residual )) & - call hdf_getslab_r(cgrid%mmean_co2_residual (ipy:ipy) ,'MMEAN_CO2_RESIDUAL ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_energy_residual)) & - call hdf_getslab_r(cgrid%mmean_energy_residual(ipy:ipy) ,'MMEAN_ENERGY_RESIDUAL ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_water_residual )) & - call hdf_getslab_r(cgrid%mmean_water_residual (ipy:ipy) ,'MMEAN_WATER_RESIDUAL ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_gpp )) & - call hdf_getslab_r(cgrid%mmean_gpp (ipy:ipy) ,'MMEAN_GPP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_nppleaf )) & - call hdf_getslab_r(cgrid%mmean_nppleaf (ipy:ipy) ,'MMEAN_NPPLEAF ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_nppfroot )) & - call hdf_getslab_r(cgrid%mmean_nppfroot (ipy:ipy) ,'MMEAN_NPPFROOT ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_nppsapwood )) & - call hdf_getslab_r(cgrid%mmean_nppsapwood (ipy:ipy) ,'MMEAN_NPPSAPWOOD ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_nppcroot )) & - call hdf_getslab_r(cgrid%mmean_nppcroot (ipy:ipy) ,'MMEAN_NPPCROOT ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_nppseeds )) & - call hdf_getslab_r(cgrid%mmean_nppseeds (ipy:ipy) ,'MMEAN_NPPSEEDS ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_nppwood )) & - call hdf_getslab_r(cgrid%mmean_nppwood (ipy:ipy) ,'MMEAN_NPPWOOD ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_nppdaily )) & - call hdf_getslab_r(cgrid%mmean_nppdaily (ipy:ipy) ,'MMEAN_NPPDAILY ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_evap )) & - call hdf_getslab_r(cgrid%mmean_evap (ipy:ipy) ,'MMEAN_EVAP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_transp )) & - call hdf_getslab_r(cgrid%mmean_transp (ipy:ipy) ,'MMEAN_TRANSP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_sensible_lc )) & - call hdf_getslab_r(cgrid%mmean_sensible_lc (ipy:ipy) ,'MMEAN_SENSIBLE_LC ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_sensible_wc )) & - call hdf_getslab_r(cgrid%mmean_sensible_wc (ipy:ipy) ,'MMEAN_SENSIBLE_WC ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_sensible_gc )) & - call hdf_getslab_r(cgrid%mmean_sensible_gc (ipy:ipy) ,'MMEAN_SENSIBLE_GC ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_sensible_ac )) & - call hdf_getslab_r(cgrid%mmean_sensible_ac (ipy:ipy) ,'MMEAN_SENSIBLE_AC ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_vapor_lc )) & - call hdf_getslab_r(cgrid%mmean_vapor_lc (ipy:ipy) ,'MMEAN_VAPOR_LC ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_vapor_wc )) & - call hdf_getslab_r(cgrid%mmean_vapor_wc (ipy:ipy) ,'MMEAN_VAPOR_WC ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_vapor_gc )) & - call hdf_getslab_r(cgrid%mmean_vapor_gc (ipy:ipy) ,'MMEAN_VAPOR_GC ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_vapor_ac )) & - call hdf_getslab_r(cgrid%mmean_vapor_ac (ipy:ipy) ,'MMEAN_VAPOR_AC ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_nep )) & - call hdf_getslab_r(cgrid%mmean_nep (ipy:ipy) ,'MMEAN_NEP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_ustar )) & - call hdf_getslab_r(cgrid%mmean_ustar (ipy:ipy) ,'MMEAN_USTAR ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_tstar )) & - call hdf_getslab_r(cgrid%mmean_tstar (ipy:ipy) ,'MMEAN_TSTAR ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_qstar )) & - call hdf_getslab_r(cgrid%mmean_qstar (ipy:ipy) ,'MMEAN_QSTAR ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_cstar )) & - call hdf_getslab_r(cgrid%mmean_cstar (ipy:ipy) ,'MMEAN_CSTAR ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_carbon_ac )) & - call hdf_getslab_r(cgrid%mmean_carbon_ac (ipy:ipy) ,'MMEAN_CARBON_AC ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_carbon_st )) & - call hdf_getslab_r(cgrid%mmean_carbon_st (ipy:ipy) ,'MMEAN_CARBON_ST ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_plresp )) & - call hdf_getslab_r(cgrid%mmean_plresp (ipy:ipy) ,'MMEAN_PLRESP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_rh )) & - call hdf_getslab_r(cgrid%mmean_rh (ipy:ipy) ,'MMEAN_RH ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_cwd_rh )) & - call hdf_getslab_r(cgrid%mmean_cwd_rh (ipy:ipy) ,'MMEAN_CWD_RH ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_leaf_resp )) & - call hdf_getslab_r(cgrid%mmean_leaf_resp (ipy:ipy) ,'MMEAN_LEAF_RESP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_root_resp )) & - call hdf_getslab_r(cgrid%mmean_root_resp (ipy:ipy) ,'MMEAN_ROOT_RESP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_growth_resp )) & - call hdf_getslab_r(cgrid%mmean_growth_resp (ipy:ipy) ,'MMEAN_GROWTH_RESP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_storage_resp )) & - call hdf_getslab_r(cgrid%mmean_storage_resp (ipy:ipy) ,'MMEAN_STORAGE_RESP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_vleaf_resp )) & - call hdf_getslab_r(cgrid%mmean_vleaf_resp (ipy:ipy) ,'MMEAN_VLEAF_RESP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_can_temp )) & - call hdf_getslab_r(cgrid%mmean_can_temp (ipy:ipy) ,'MMEAN_CAN_TEMP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_can_shv )) & - call hdf_getslab_r(cgrid%mmean_can_shv (ipy:ipy) ,'MMEAN_CAN_SHV ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_can_co2 )) & - call hdf_getslab_r(cgrid%mmean_can_co2 (ipy:ipy) ,'MMEAN_CAN_CO2 ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_can_rhos )) & - call hdf_getslab_r(cgrid%mmean_can_rhos (ipy:ipy) ,'MMEAN_CAN_RHOS ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmean_can_prss )) & - call hdf_getslab_r(cgrid%mmean_can_prss (ipy:ipy) ,'MMEAN_CAN_PRSS ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmean_can_theta )) & - call hdf_getslab_r(cgrid%mmean_can_theta (ipy:ipy) ,'MMEAN_CAN_THETA ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmean_can_theiv )) & - call hdf_getslab_r(cgrid%mmean_can_theiv (ipy:ipy) ,'MMEAN_CAN_THEIV ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmean_can_vpdef )) & - call hdf_getslab_r(cgrid%mmean_can_vpdef (ipy:ipy) ,'MMEAN_CAN_VPDEF ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmean_gnd_temp )) & - call hdf_getslab_r(cgrid%mmean_gnd_temp (ipy:ipy) ,'MMEAN_GND_TEMP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmean_gnd_shv )) & - call hdf_getslab_r(cgrid%mmean_gnd_shv (ipy:ipy) ,'MMEAN_GND_SHV ' & - ,dsetrank,iparallel,.false.,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! 3-D variables, dimensions: (nzg;ndcycle;npolygons). ! + !---------------------------------------------------------------------------------------! + dsetrank = 3 + globdims(1) = int(n_pft,8) + chnkdims(1) = int(n_pft,8) + memdims (1) = int(n_pft,8) + memsize (1) = int(n_pft,8) + chnkoffs(1) = 0_8 + memoffs (1) = 0_8 - if (associated(cgrid%mmean_leaf_energy )) & - call hdf_getslab_r(cgrid%mmean_leaf_energy (ipy:ipy) ,'MMEAN_LEAF_ENERGY ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_leaf_water )) & - call hdf_getslab_r(cgrid%mmean_leaf_water (ipy:ipy) ,'MMEAN_LEAF_WATER ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_leaf_temp )) & - call hdf_getslab_r(cgrid%mmean_leaf_temp (ipy:ipy) ,'MMEAN_LEAF_TEMP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_leaf_vpdef )) & - call hdf_getslab_r(cgrid%mmean_leaf_vpdef (ipy:ipy) ,'MMEAN_LEAF_VPDEF ' & - ,dsetrank,iparallel,.false.,foundvar) + globdims(2) = int(n_dbh,8) + chnkdims(2) = int(n_dbh,8) + memdims (2) = int(n_dbh,8) + memsize (2) = int(n_dbh,8) + chnkoffs(2) = 0_8 + memoffs (2) = 0_8 - if (associated(cgrid%mmean_leaf_hcap )) & - call hdf_getslab_r(cgrid%mmean_leaf_hcap (ipy:ipy) ,'MMEAN_LEAF_HCAP ' & - ,dsetrank,iparallel,.false.,foundvar) + globdims(3) = int(cgrid%npolygons_global,8) + chnkdims(3) = 1_8 + chnkoffs(3) = int(py_index - 1,8) + memdims (3) = 1_8 + memsize (3) = 1_8 + memoffs (3) = 0_8 + + call hdf_getslab_r(cgrid%nplant (:,:,ipy) & + ,'NPLANT_PY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%agb (:,:,ipy) & + ,'AGB_PY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%lai (:,:,ipy) & + ,'LAI_PY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%wai (:,:,ipy) & + ,'WAI_PY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%basal_area (:,:,ipy) & + ,'BASAL_AREA_PY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%bdead (:,:,ipy) & + ,'BDEAD_PY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%balive (:,:,ipy) & + ,'BALIVE_PY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%bleaf (:,:,ipy) & + ,'BLEAF_PY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%broot (:,:,ipy) & + ,'BROOT_PY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%bsapwooda (:,:,ipy) & + ,'BSAPWOODA_PY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%bsapwoodb (:,:,ipy) & + ,'BSAPWOODB_PY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%bseeds (:,:,ipy) & + ,'BSEEDS_PY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%bstorage (:,:,ipy) & + ,'BSTORAGE_PY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%bdead_n (:,:,ipy) & + ,'BDEAD_N_PY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%balive_n (:,:,ipy) & + ,'BALIVE_N_PY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%bleaf_n (:,:,ipy) & + ,'BLEAF_N_PY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%broot_n (:,:,ipy) & + ,'BROOT_N_PY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%bsapwooda_n (:,:,ipy) & + ,'BSAPWOODA_N_PY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%bsapwoodb_n (:,:,ipy) & + ,'BSAPWOODB_N_PY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%bseeds_n (:,:,ipy) & + ,'BSEEDS_N_PY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%bstorage_n (:,:,ipy) & + ,'BSTORAGE_N_PY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%leaf_maintenance (:,:,ipy) & + ,'LEAF_MAINTENANCE_PY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%root_maintenance (:,:,ipy) & + ,'ROOT_MAINTENANCE_PY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cgrid%leaf_drop (:,:,ipy) & + ,'LEAF_DROP_PY ',dsetrank,iparallel,.true. ,foundvar) + if (writing_eorq) then + call hdf_getslab_r(cgrid%mmean_lai (:,:,ipy) & + ,'MMEAN_LAI_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_bleaf (:,:,ipy) & + ,'MMEAN_BLEAF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_broot (:,:,ipy) & + ,'MMEAN_BROOT_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_bstorage (:,:,ipy) & + ,'MMEAN_BSTORAGE_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_bleaf_n (:,:,ipy) & + ,'MMEAN_BLEAF_N_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_broot_n (:,:,ipy) & + ,'MMEAN_BROOT_N_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_bstorage_n (:,:,ipy) & + ,'MMEAN_BSTORAGE_N_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_leaf_maintenance(:,:,ipy) & + ,'MMEAN_LEAF_MAINTENANCE_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_root_maintenance(:,:,ipy) & + ,'MMEAN_ROOT_MAINTENANCE_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_leaf_drop (:,:,ipy) & + ,'MMEAN_LEAF_DROP_PY ',dsetrank,iparallel,.false.,foundvar) + end if + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + return +end subroutine fill_history_grid +!==========================================================================================! +!==========================================================================================! - if (associated(cgrid%mmean_wood_energy )) & - call hdf_getslab_r(cgrid%mmean_wood_energy (ipy:ipy) ,'MMEAN_WOOD_ENERGY ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_wood_water )) & - call hdf_getslab_r(cgrid%mmean_wood_water (ipy:ipy) ,'MMEAN_WOOD_WATER ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_wood_temp )) & - call hdf_getslab_r(cgrid%mmean_wood_temp (ipy:ipy) ,'MMEAN_WOOD_TEMP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_wood_hcap )) & - call hdf_getslab_r(cgrid%mmean_wood_hcap (ipy:ipy) ,'MMEAN_WOOD_HCAP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmean_rshort )) & - call hdf_getslab_r(cgrid%mmean_rshort (ipy:ipy) ,'MMEAN_RSHORT ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmean_rshort_diff )) & - call hdf_getslab_r(cgrid%mmean_rshort_diff (ipy:ipy) ,'MMEAN_RSHORT_DIFF ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmean_par )) & - call hdf_getslab_r(cgrid%mmean_par (ipy:ipy) ,'MMEAN_PAR ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmean_par_diff )) & - call hdf_getslab_r(cgrid%mmean_par_diff (ipy:ipy) ,'MMEAN_PAR_DIFF ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmean_rlong )) & - call hdf_getslab_r(cgrid%mmean_rlong (ipy:ipy) ,'MMEAN_RLONG ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_rlongup )) & - call hdf_getslab_r(cgrid%mmean_rlongup (ipy:ipy) ,'MMEAN_RLONGUP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_parup )) & - call hdf_getslab_r(cgrid%mmean_parup (ipy:ipy) ,'MMEAN_PARUP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_nirup )) & - call hdf_getslab_r(cgrid%mmean_nirup (ipy:ipy) ,'MMEAN_NIRUP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_rshortup )) & - call hdf_getslab_r(cgrid%mmean_rshortup (ipy:ipy) ,'MMEAN_RSHORTUP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_rnet )) & - call hdf_getslab_r(cgrid%mmean_rnet (ipy:ipy) ,'MMEAN_RNET ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmean_rshort_gnd )) & - call hdf_getslab_r(cgrid%mmean_rshort_gnd (ipy:ipy) ,'MMEAN_RSHORT_GND ' & - ,dsetrank,iparallel,.false.,foundvar) +!==========================================================================================! +!==========================================================================================! +! This sub-routine loads all site-level variables from the history file. ! +!------------------------------------------------------------------------------------------! +subroutine fill_history_polygon(cpoly,pysi_index,nsites_global) + use ed_state_vars, only : polygontype ! ! structure + use grid_coms , only : nzg ! ! intent(in) + use ed_max_dims , only : n_pft & ! intent(in) + , n_dbh & ! intent(in) + , max_site & ! intent(in) + , n_dist_types ! ! intent(in) + use hdf5 + use hdf5_coms , only : file_id & ! intent(inout) + , dset_id & ! intent(inout) + , dspace_id & ! intent(inout) + , plist_id & ! intent(inout) + , globdims & ! intent(inout) + , chnkdims & ! intent(inout) + , chnkoffs & ! intent(inout) + , cnt & ! intent(inout) + , stride & ! intent(inout) + , memdims & ! intent(inout) + , memoffs & ! intent(inout) + , memsize & ! intent(inout) + , datatype_id ! ! intent(inout) + use ed_misc_coms , only : ndcycle & ! intent(in) + , writing_long & ! intent(in) + , writing_eorq & ! intent(in) + , writing_dcyc ! ! intent(in) + implicit none + !----- Interfaces. ---------------------------------------------------------------------! +#if USE_INTERF + interface + subroutine hdf_getslab_r(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + real(kind=4) , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_r + !------------------------------------------------------------------------------------! + subroutine hdf_getslab_d(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + real(kind=8) , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_d + !------------------------------------------------------------------------------------! + subroutine hdf_getslab_i(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + integer , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_i + !------------------------------------------------------------------------------------! + end interface +#endif + !---------------------------------------------------------------------------------------! - if (associated(cgrid%mmean_par_gnd )) & - call hdf_getslab_r(cgrid%mmean_par_gnd (ipy:ipy) ,'MMEAN_PAR_GND ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_rlong_gnd )) & - call hdf_getslab_r(cgrid%mmean_rlong_gnd (ipy:ipy) ,'MMEAN_RLONG_GND ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_atm_temp )) & - call hdf_getslab_r(cgrid%mmean_atm_temp (ipy:ipy) ,'MMEAN_ATM_TEMP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_atm_vpdef )) & - call hdf_getslab_r(cgrid%mmean_atm_vpdef (ipy:ipy) ,'MMEAN_ATM_VPDEF ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_atm_shv )) & - call hdf_getslab_r(cgrid%mmean_atm_shv (ipy:ipy) ,'MMEAN_ATM_SHV ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_atm_co2 )) & - call hdf_getslab_r(cgrid%mmean_atm_co2 (ipy:ipy) ,'MMEAN_ATM_CO2 ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_atm_prss )) & - call hdf_getslab_r(cgrid%mmean_atm_prss (ipy:ipy) ,'MMEAN_ATM_PRSS ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_atm_vels )) & - call hdf_getslab_r(cgrid%mmean_atm_vels (ipy:ipy) ,'MMEAN_ATM_VELS ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_pcpg )) & - call hdf_getslab_r(cgrid%mmean_pcpg (ipy:ipy) ,'MMEAN_PCPG ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_runoff )) & - call hdf_getslab_r(cgrid%mmean_runoff (ipy:ipy) ,'MMEAN_RUNOFF ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%mmean_drainage )) & - call hdf_getslab_r(cgrid%mmean_drainage (ipy:ipy) ,'MMEAN_DRAINAGE ' & - ,dsetrank,iparallel,.false.,foundvar) + !----- Arguments. ----------------------------------------------------------------------! + type(polygontype), target :: cpoly + integer , intent(in) :: pysi_index + integer , intent(in) :: nsites_global + !----- Local variables. ----------------------------------------------------------------! + integer :: iparallel + integer :: dsetrank + integer(SIZE_T) :: sz + integer :: hdferr + logical :: foundvar + !---------------------------------------------------------------------------------------! - if (associated(cgrid%mmean_fs_open )) & - call hdf_getslab_r(cgrid%mmean_fs_open (ipy:ipy) ,'MMEAN_FS_OPEN ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmean_fsw )) & - call hdf_getslab_r(cgrid%mmean_fsw (ipy:ipy) ,'MMEAN_FSW ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmean_fsn )) & - call hdf_getslab_r(cgrid%mmean_fsn (ipy:ipy) ,'MMEAN_FSN ' & - ,dsetrank,iparallel,.false.,foundvar) + !----- Turn off parallel for this sub-routine. -----------------------------------------! + iparallel = 0 + !---------------------------------------------------------------------------------------! + - if (associated(cgrid%mmsqu_gpp )) & - call hdf_getslab_r(cgrid%mmsqu_gpp (ipy:ipy) ,'MMSQU_GPP ' & - ,dsetrank,iparallel,.false.,foundvar) + !---------------------------------------------------------------------------------------! + ! Reset the dimension arrays. ! + !---------------------------------------------------------------------------------------! + globdims(:) = 0_8 + chnkdims(:) = 0_8 + chnkoffs(:) = 0_8 + memoffs (:) = 0_8 + memdims (:) = 0_8 + memsize (:) = 1_8 + !---------------------------------------------------------------------------------------! - if (associated(cgrid%mmsqu_leaf_resp )) & - call hdf_getslab_r(cgrid%mmsqu_leaf_resp (ipy:ipy) ,'MMSQU_LEAF_RESP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmsqu_root_resp )) & - call hdf_getslab_r(cgrid%mmsqu_root_resp (ipy:ipy) ,'MMSQU_ROOT_RESP ' & - ,dsetrank,iparallel,.false.,foundvar) + !---------------------------------------------------------------------------------------! + ! For the remainder of this sub-routine, we must load the polygon variables ! + ! according to the dimensionality. If you are adding a new variable, make sure that it ! + ! is placed together with variables of the same dimensions. ! + ! ! + ! DSETRANK -- the rank of the variable. ! + ! GLOBDIMS -- the size of each dimension ! + ! CHNKDIMS -- the size of the chunk to be read this time ! + ! CHNKOFFS -- the offset (number of indices to be skipped) ! + ! MEMDIMS -- the dimensions of the buffer to be filled. ! + ! MEMOFFS -- the offset of the memory ! + ! MEMSIZE -- the size of variable that will house the information read. ! + !---------------------------------------------------------------------------------------! - if (associated(cgrid%mmsqu_plresp )) & - call hdf_getslab_r(cgrid%mmsqu_plresp (ipy:ipy) ,'MMSQU_PLRESP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmsqu_carbon_ac )) & - call hdf_getslab_r(cgrid%mmsqu_carbon_ac (ipy:ipy) ,'MMSQU_CARBON_AC ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmsqu_carbon_st )) & - call hdf_getslab_r(cgrid%mmsqu_carbon_st (ipy:ipy) ,'MMSQU_CARBON_ST ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmsqu_nep )) & - call hdf_getslab_r(cgrid%mmsqu_nep (ipy:ipy) ,'MMSQU_NEP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmsqu_rh )) & - call hdf_getslab_r(cgrid%mmsqu_rh (ipy:ipy) ,'MMSQU_RH ' & - ,dsetrank,iparallel,.false.,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! Single dimension variables - Integers. ! + !---------------------------------------------------------------------------------------! + dsetrank = 1 + globdims(1) = int(nsites_global ,8) + chnkdims(1) = int(cpoly%nsites ,8) + chnkoffs(1) = int(pysi_index - 1,8) + memdims (1) = int(cpoly%nsites ,8) + memsize (1) = int(cpoly%nsites ,8) + memoffs (1) = 0_8 + call hdf_getslab_i(cpoly%patch_count & + ,'PATCH_COUNT ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_i(cpoly%sitenum & + ,'SITENUM ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_i(cpoly%num_landuse_years & + ,'NUM_LANDUSE_YEARS ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_i(cpoly%hydro_next & + ,'HYDRO_NEXT ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_i(cpoly%hydro_prev & + ,'HYDRO_PREV ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_i(cpoly%plantation & + ,'PLANTATION_SI ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_i(cpoly%nat_dist_type & + ,'NAT_DIST_TYPE ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_i(cpoly%agri_stocking_pft & + ,'AGRI_STOCKING_PFT ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_i(cpoly%plantation_stocking_pft & + ,'PLANTATION_STOCKING_PFT ',dsetrank,iparallel,.true. ,foundvar) + !---------------------------------------------------------------------------------------! + ! The _SI extension has been dropped as LSL and soil colour are no longer polygon ! + ! variables. In case the history is from an old file, they may still exist, so we try ! + ! them first and if it doesn't work we try the one without extension. ! + !---------------------------------------------------------------------------------------! + call hdf_getslab_i(cpoly%lsl & + ,'LSL_SI ',dsetrank,iparallel,.false.,foundvar) + if (.not.foundvar) then + call hdf_getslab_i(cpoly%lsl & + ,'LSL ',dsetrank,iparallel,.true. ,foundvar) + end if + call hdf_getslab_i(cpoly%ncol_soil & + ,'NCOL_SOIL_SI ',dsetrank,iparallel,.false.,foundvar) + if (.not.foundvar) then + call hdf_getslab_i(cpoly%ncol_soil & + ,'NCOL_SOIL ',dsetrank,iparallel,.true. ,foundvar) + end if + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! - if (associated(cgrid%mmsqu_sensible_ac )) & - call hdf_getslab_r(cgrid%mmsqu_sensible_ac (ipy:ipy) ,'MMSQU_SENSIBLE_AC ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmsqu_sensible_lc )) & - call hdf_getslab_r(cgrid%mmsqu_sensible_lc (ipy:ipy) ,'MMSQU_SENSIBLE_LC ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmsqu_sensible_wc )) & - call hdf_getslab_r(cgrid%mmsqu_sensible_wc (ipy:ipy) ,'MMSQU_SENSIBLE_WC ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmsqu_sensible_gc )) & - call hdf_getslab_r(cgrid%mmsqu_sensible_gc (ipy:ipy) ,'MMSQU_SENSIBLE_GC ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmsqu_evap )) & - call hdf_getslab_r(cgrid%mmsqu_evap (ipy:ipy) ,'MMSQU_EVAP ' & - ,dsetrank,iparallel,.false.,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! Single dimension variables - Real. ! + !---------------------------------------------------------------------------------------! + dsetrank = 1 + globdims(1) = int(nsites_global ,8) + chnkdims(1) = int(cpoly%nsites ,8) + chnkoffs(1) = int(pysi_index - 1,8) + memdims (1) = int(cpoly%nsites ,8) + memsize (1) = int(cpoly%nsites ,8) + memoffs (1) = 0_8 + call hdf_getslab_r(cpoly%area & + ,'AREA_SI ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%patch_area & + ,'PATCH_AREA ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%elevation & + ,'ELEVATION ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%slope & + ,'SLOPE ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%aspect & + ,'ASPECT ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%TCI & + ,'TCI ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%pptweight & + ,'PPTWEIGHT ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%moist_W & + ,'MOIST_W ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%moist_f & + ,'MOIST_F ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%moist_tau & + ,'MOIST_TAU ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%moist_zi & + ,'MOIST_ZI ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%baseflow & + ,'BASEFLOW_SI ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%min_monthly_temp & + ,'MIN_MONTHLY_TEMP ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%agri_stocking_density & + ,'AGRI_STOCKING_DENSITY ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%plantation_stocking_density & + ,'PLANTATION_STOCKING_DENSITY' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%primary_harvest_memory & + ,'PRIMARY_HARVEST_MEMORY ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%secondary_harvest_memory & + ,'SECONDARY_HARVEST_MEMORY ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%fire_disturbance_rate & + ,'FIRE_DISTURBANCE_RATE ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%ignition_rate & + ,'IGNITION_RATE ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%nat_disturbance_rate & + ,'NAT_DISTURBANCE_RATE ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%rad_avg & + ,'RAD_AVG ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%daylight & + ,'DAYLIGHT ' ,dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%cosaoi & + ,'COSAOI ' ,dsetrank,iparallel,.true. ,foundvar) + !------ Daily means. -------------------------------------------------------------------! + if (writing_long) then + call hdf_getslab_r(cpoly%dmean_atm_theiv & + ,'DMEAN_ATM_THEIV_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%dmean_atm_theta & + ,'DMEAN_ATM_THETA_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%dmean_atm_temp & + ,'DMEAN_ATM_TEMP_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%dmean_atm_vpdef & + ,'DMEAN_ATM_VPDEF_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%dmean_atm_shv & + ,'DMEAN_ATM_SHV_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%dmean_atm_rshort & + ,'DMEAN_ATM_RSHORT_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%dmean_atm_rshort_diff & + ,'DMEAN_ATM_RSHORT_DIFF_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%dmean_atm_par & + ,'DMEAN_ATM_PAR_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%dmean_atm_par_diff & + ,'DMEAN_ATM_PAR_DIFF_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%dmean_atm_rlong & + ,'DMEAN_ATM_RLONG_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%dmean_atm_vels & + ,'DMEAN_ATM_VELS_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%dmean_atm_rhos & + ,'DMEAN_ATM_RHOS_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%dmean_atm_prss & + ,'DMEAN_ATM_PRSS_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%dmean_atm_co2 & + ,'DMEAN_ATM_CO2_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%dmean_pcpg & + ,'DMEAN_PCPG_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%dmean_qpcpg & + ,'DMEAN_QPCPG_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%dmean_dpcpg & + ,'DMEAN_DPCPG_SI ',dsetrank,iparallel,.false.,foundvar) + end if + !------ Monthly means. -----------------------------------------------------------------! + if (writing_eorq) then + call hdf_getslab_r(cpoly%mmean_atm_theiv & + ,'MMEAN_ATM_THEIV_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%mmean_atm_theta & + ,'MMEAN_ATM_THETA_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%mmean_atm_temp & + ,'MMEAN_ATM_TEMP_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%mmean_atm_vpdef & + ,'MMEAN_ATM_VPDEF_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%mmean_atm_shv & + ,'MMEAN_ATM_SHV_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%mmean_atm_rshort & + ,'MMEAN_ATM_RSHORT_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%mmean_atm_rshort_diff & + ,'MMEAN_ATM_RSHORT_DIFF_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%mmean_atm_par & + ,'MMEAN_ATM_PAR_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%mmean_atm_par_diff & + ,'MMEAN_ATM_PAR_DIFF_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%mmean_atm_rlong & + ,'MMEAN_ATM_RLONG_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%mmean_atm_vels & + ,'MMEAN_ATM_VELS_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%mmean_atm_rhos & + ,'MMEAN_ATM_RHOS_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%mmean_atm_prss & + ,'MMEAN_ATM_PRSS_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%mmean_atm_co2 & + ,'MMEAN_ATM_CO2_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%mmean_pcpg & + ,'MMEAN_PCPG_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%mmean_qpcpg & + ,'MMEAN_QPCPG_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%mmean_dpcpg & + ,'MMEAN_DPCPG_SI ',dsetrank,iparallel,.false.,foundvar) + end if + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! - if (associated(cgrid%mmsqu_transp )) & - call hdf_getslab_r(cgrid%mmsqu_transp (ipy:ipy) ,'MMSQU_TRANSP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmsqu_vapor_ac )) & - call hdf_getslab_r(cgrid%mmsqu_vapor_ac (ipy:ipy) ,'MMSQU_VAPOR_AC ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmsqu_vapor_lc )) & - call hdf_getslab_r(cgrid%mmsqu_vapor_lc (ipy:ipy) ,'MMSQU_VAPOR_LC ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmsqu_vapor_wc )) & - call hdf_getslab_r(cgrid%mmsqu_vapor_wc (ipy:ipy) ,'MMSQU_VAPOR_WC ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmsqu_vapor_gc )) & - call hdf_getslab_r(cgrid%mmsqu_vapor_gc (ipy:ipy) ,'MMSQU_VAPOR_GC ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmsqu_ustar )) & - call hdf_getslab_r(cgrid%mmsqu_ustar (ipy:ipy) ,'MMSQU_USTAR ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmsqu_rlongup )) & - call hdf_getslab_r(cgrid%mmsqu_rlongup (ipy:ipy) ,'MMSQU_RLONGUP ' & - ,dsetrank,iparallel,.false.,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! 2-D variables, dimensions: (ndcycle;nsites). ! + !---------------------------------------------------------------------------------------! + dsetrank = 2 + globdims(1) = int(ndcycle,8) + chnkdims(1) = int(ndcycle,8) + memdims (1) = int(ndcycle,8) + memsize (1) = int(ndcycle,8) + chnkoffs(1) = 0_8 + memoffs (1) = 0_8 + globdims(2) = int(nsites_global ,8) + chnkdims(2) = int(cpoly%nsites ,8) + chnkoffs(2) = int(pysi_index - 1,8) + memdims (2) = int(cpoly%nsites ,8) + memsize (2) = int(cpoly%nsites ,8) + memoffs (2) = 0_8 + if (writing_dcyc) then + call hdf_getslab_r(cpoly%qmean_atm_theiv & + ,'QMEAN_ATM_THEIV_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%qmean_atm_theta & + ,'QMEAN_ATM_THETA_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%qmean_atm_temp & + ,'QMEAN_ATM_TEMP_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%qmean_atm_vpdef & + ,'QMEAN_ATM_VPDEF_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%qmean_atm_shv & + ,'QMEAN_ATM_SHV_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%qmean_atm_rshort & + ,'QMEAN_ATM_RSHORT_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%qmean_atm_rshort_diff & + ,'QMEAN_ATM_RSHORT_DIFF_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%qmean_atm_par & + ,'QMEAN_ATM_PAR_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%qmean_atm_par_diff & + ,'QMEAN_ATM_PAR_DIFF_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%qmean_atm_rlong & + ,'QMEAN_ATM_RLONG_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%qmean_atm_vels & + ,'QMEAN_ATM_VELS_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%qmean_atm_rhos & + ,'QMEAN_ATM_RHOS_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%qmean_atm_prss & + ,'QMEAN_ATM_PRSS_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%qmean_atm_co2 & + ,'QMEAN_ATM_CO2_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%qmean_pcpg & + ,'QMEAN_PCPG_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%qmean_qpcpg & + ,'QMEAN_QPCPG_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpoly%qmean_dpcpg & + ,'QMEAN_DPCPG_SI ',dsetrank,iparallel,.false.,foundvar) + end if + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! - if (associated(cgrid%mmsqu_parup )) & - call hdf_getslab_r(cgrid%mmsqu_parup (ipy:ipy) ,'MMSQU_PARUP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmsqu_nirup )) & - call hdf_getslab_r(cgrid%mmsqu_nirup (ipy:ipy) ,'MMSQU_NIRUP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmsqu_rshortup )) & - call hdf_getslab_r(cgrid%mmsqu_rshortup (ipy:ipy) ,'MMSQU_RSHORTUP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmsqu_rnet )) & - call hdf_getslab_r(cgrid%mmsqu_rnet (ipy:ipy) ,'MMSQU_RNET ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%mmsqu_albedo )) & - call hdf_getslab_r(cgrid%mmsqu_albedo (ipy:ipy) ,'MMSQU_ALBEDO ' & - ,dsetrank,iparallel,.false.,foundvar) - ! Variables with 2 dimensions (nzg,npolygons) - dsetrank = 2 - globdims(1) = int(nzg,8) - chnkdims(1) = int(nzg,8) - memdims(1) = int(nzg,8) - memsize(1) = int(nzg,8) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! 2-D variables, dimensions: (n_pft;nsites). ! + !---------------------------------------------------------------------------------------! + dsetrank = 2 + globdims(1) = int(n_pft,8) + chnkdims(1) = int(n_pft,8) + memdims (1) = int(n_pft,8) + memsize (1) = int(n_pft,8) chnkoffs(1) = 0_8 - memoffs(1) = 0_8 - - globdims(2) = int(cgrid%npolygons_global,8) - chnkdims(2) = 1_8 - chnkoffs(2) = int(py_index - 1,8) - memdims(2) = 1_8 - memsize(2) = 1_8 - memoffs(2) = 0_8 - - call hdf_getslab_i(cgrid%ntext_soil(:,ipy) ,'NTEXT_SOIL ' ,& - dsetrank,iparallel,.false.,foundvar) - - if(associated(cgrid%dmean_soil_temp)) & - call hdf_getslab_r(cgrid%dmean_soil_temp(:,ipy) ,'DMEAN_SOIL_TEMP ' ,& - dsetrank,iparallel,.false.,foundvar) - - if(associated(cgrid%dmean_soil_water)) & - call hdf_getslab_r(cgrid%dmean_soil_water(:,ipy) ,'DMEAN_SOIL_WATER ' ,& - dsetrank,iparallel,.false.,foundvar) + memoffs (1) = 0_8 + globdims(2) = int(nsites_global,8) + chnkdims(2) = int(cpoly%nsites,8) + chnkoffs(2) = int(pysi_index - 1,8) + memdims (2) = int(cpoly%nsites,8) + memsize (2) = int(cpoly%nsites,8) + memoffs (2) = 0_8 + + call hdf_getslab_r(cpoly%green_leaf_factor & + ,'GREEN_LEAF_FACTOR ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%leaf_aging_factor & + ,'LEAF_AGING_FACTOR ',dsetrank,iparallel,.true. ,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! - if(associated(cgrid%dmean_soil_mstpot)) & - call hdf_getslab_r(cgrid%dmean_soil_mstpot(:,ipy),'DMEAN_SOIL_MSTPOT ' ,& - dsetrank,iparallel,.false.,foundvar) - - if(associated(cgrid%dmean_transloss)) & - call hdf_getslab_r(cgrid%dmean_transloss(:,ipy) ,'DMEAN_TRANSLOSS ' ,& - dsetrank,iparallel,.false.,foundvar) - if(associated(cgrid%mmean_soil_temp)) & - call hdf_getslab_r(cgrid%mmean_soil_temp(:,ipy) ,'MMEAN_SOIL_TEMP ' ,& - dsetrank,iparallel,.false.,foundvar) - if(associated(cgrid%mmean_soil_water)) & - call hdf_getslab_r(cgrid%mmean_soil_water(:,ipy) ,'MMEAN_SOIL_WATER ' ,& - dsetrank,iparallel,.false.,foundvar) - if(associated(cgrid%mmean_soil_mstpot)) & - call hdf_getslab_r(cgrid%mmean_soil_mstpot(:,ipy),'MMEAN_SOIL_MSTPOT ' ,& - dsetrank,iparallel,.false.,foundvar) - if(associated(cgrid%mmean_transloss)) & - call hdf_getslab_r(cgrid%mmean_transloss(:,ipy) ,'MMEAN_TRANSLOSS ' ,& - dsetrank,iparallel,.false.,foundvar) - ! Variables with 2 dimensions (ndcycle,npolygons) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! 2-D variables, dimensions: (nzg;nsites). ! + !---------------------------------------------------------------------------------------! dsetrank = 2 - globdims(1) = int(ndcycle,8) - chnkdims(1) = int(ndcycle,8) - memdims(1) = int(ndcycle,8) - memsize(1) = int(ndcycle,8) + globdims(1) = int(nzg,8) + chnkdims(1) = int(nzg,8) + memdims (1) = int(nzg,8) + memsize (1) = int(nzg,8) chnkoffs(1) = 0_8 - memoffs(1) = 0_8 - - globdims(2) = int(cgrid%npolygons_global,8) - chnkdims(2) = 1_8 - chnkoffs(2) = int(py_index - 1,8) - memdims(2) = 1_8 - memsize(2) = 1_8 - memoffs(2) = 0_8 - - if (associated(cgrid%qmean_pcpg )) & - call hdf_getslab_r(cgrid%qmean_pcpg (:,ipy) ,'QMEAN_PCPG ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%qmean_runoff )) & - call hdf_getslab_r(cgrid%qmean_runoff (:,ipy) ,'QMEAN_RUNOFF ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%qmean_drainage )) & - call hdf_getslab_r(cgrid%qmean_drainage (:,ipy) ,'QMEAN_DRAINAGE ' & - ,dsetrank,iparallel,.false.,foundvar) + memoffs (1) = 0_8 + globdims(2) = int(nsites_global ,8) + chnkdims(2) = int(cpoly%nsites ,8) + chnkoffs(2) = int(pysi_index - 1,8) + memdims (2) = int(cpoly%nsites ,8) + memsize (2) = int(cpoly%nsites ,8) + memoffs (2) = 0_8 - if (associated(cgrid%qmean_gpp )) & - call hdf_getslab_r(cgrid%qmean_gpp (:,ipy) ,'QMEAN_GPP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%qmean_evap )) & - call hdf_getslab_r(cgrid%qmean_evap (:,ipy) ,'QMEAN_EVAP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%qmean_transp )) & - call hdf_getslab_r(cgrid%qmean_transp (:,ipy) ,'QMEAN_TRANSP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%qmean_sensible_lc )) & - call hdf_getslab_r(cgrid%qmean_sensible_lc (:,ipy) ,'QMEAN_SENSIBLE_LC ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%qmean_sensible_wc )) & - call hdf_getslab_r(cgrid%qmean_sensible_wc (:,ipy) ,'QMEAN_SENSIBLE_WC ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%qmean_sensible_gc )) & - call hdf_getslab_r(cgrid%qmean_sensible_gc (:,ipy) ,'QMEAN_SENSIBLE_GC ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%qmean_sensible_ac )) & - call hdf_getslab_r(cgrid%qmean_sensible_ac (:,ipy) ,'QMEAN_SENSIBLE_AC ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%qmean_vapor_lc )) & - call hdf_getslab_r(cgrid%qmean_vapor_lc (:,ipy) ,'QMEAN_VAPOR_LC ' & - ,dsetrank,iparallel,.false.,foundvar) + !---------------------------------------------------------------------------------------! + ! The _SI extension has been dropped as soil texture is no longer a polygon ! + ! variable. In case the history is from an old file, they may still exist, so we try ! + ! it first and if it doesn't work we try the one without extension. ! + !---------------------------------------------------------------------------------------! + call hdf_getslab_i(cpoly%ntext_soil & + ,'NTEXT_SOIL_SI ',dsetrank,iparallel,.false.,foundvar) + if (.not. foundvar) then + call hdf_getslab_i(cpoly%ntext_soil & + ,'NTEXT_SOIL ',dsetrank,iparallel,.true.,foundvar) + end if + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! - if (associated(cgrid%qmean_vapor_wc )) & - call hdf_getslab_r(cgrid%qmean_vapor_wc (:,ipy) ,'QMEAN_VAPOR_WC ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_vapor_gc )) & - call hdf_getslab_r(cgrid%qmean_vapor_gc (:,ipy) ,'QMEAN_VAPOR_GC ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_vapor_ac )) & - call hdf_getslab_r(cgrid%qmean_vapor_ac (:,ipy) ,'QMEAN_VAPOR_AC ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_ustar )) & - call hdf_getslab_r(cgrid%qmean_ustar (:,ipy) ,'QMEAN_USTAR ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_tstar )) & - call hdf_getslab_r(cgrid%qmean_tstar (:,ipy) ,'QMEAN_TSTAR ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_qstar )) & - call hdf_getslab_r(cgrid%qmean_qstar (:,ipy) ,'QMEAN_QSTAR ' & - ,dsetrank,iparallel,.false.,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! 2-D variables, dimensions: (n_pft;nsites). ! + !---------------------------------------------------------------------------------------! + dsetrank = 2 + globdims(1) = 12_8 + chnkdims(1) = 12_8 + memdims (1) = 12_8 + memsize (1) = 12_8 + chnkoffs(1) = 0_8 + memoffs (1) = 0_8 + globdims(2) = int(nsites_global ,8) + chnkdims(2) = int(cpoly%nsites ,8) + chnkoffs(2) = int(pysi_index - 1,8) + memdims (2) = int(cpoly%nsites ,8) + memsize (2) = int(cpoly%nsites ,8) + memoffs (2) = 0_8 + call hdf_getslab_r(cpoly%lambda_fire & + ,'LAMBDA_FIRE ',dsetrank,iparallel,.true.,foundvar) + call hdf_getslab_r(cpoly%avg_monthly_pcpg & + ,'AVG_MONTHLY_PCPG ',dsetrank,iparallel,.true.,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! - if (associated(cgrid%qmean_cstar )) & - call hdf_getslab_r(cgrid%qmean_cstar (:,ipy) ,'QMEAN_CSTAR ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_nep )) & - call hdf_getslab_r(cgrid%qmean_nep (:,ipy) ,'QMEAN_NEP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_carbon_ac )) & - call hdf_getslab_r(cgrid%qmean_carbon_ac (:,ipy) ,'QMEAN_CARBON_AC ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_carbon_st )) & - call hdf_getslab_r(cgrid%qmean_carbon_st (:,ipy) ,'QMEAN_CARBON_ST ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_plresp )) & - call hdf_getslab_r(cgrid%qmean_plresp (:,ipy) ,'QMEAN_PLRESP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_rh )) & - call hdf_getslab_r(cgrid%qmean_rh (:,ipy) ,'QMEAN_RH ' & - ,dsetrank,iparallel,.false.,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! 3-D variables, dimensions: (n_dist_types;n_dist_types;nsites). ! + !---------------------------------------------------------------------------------------! + dsetrank = 3 + globdims(1:2) = int(n_dist_types,8) + chnkdims(1:2) = int(n_dist_types,8) + memdims (1:2) = int(n_dist_types,8) + memsize (1:2) = int(n_dist_types,8) + chnkoffs(1:2) = 0_8 + memoffs (1:2) = 0_8 + globdims(3) = int(nsites_global ,8) + chnkdims(3) = int(cpoly%nsites ,8) + chnkoffs(3) = int(pysi_index - 1,8) + memdims(3) = int(cpoly%nsites ,8) + memsize(3) = int(cpoly%nsites ,8) + memoffs(3) = 0_8 + + call hdf_getslab_r(cpoly%disturbance_memory & + ,'DISTURBANCE_MEMORY ',dsetrank,iparallel,.true.,foundvar) + !---------------------------------------------------------------------------------------! + ! The _SI extension has been dropped as disturbance rate is no longer a polygon ! + ! variable. In case the history is from an old file, they may still exist, so we try ! + ! it first and if it doesn't work we try the one without extension. ! + !---------------------------------------------------------------------------------------! + call hdf_getslab_r(cpoly%disturbance_rates & + ,'DISTURBANCE_RATES_SI ',dsetrank,iparallel,.false.,foundvar) + if (.not. foundvar) then + call hdf_getslab_r(cpoly%disturbance_rates & + ,'DISTURBANCE_RATES_SI ',dsetrank,iparallel,.true.,foundvar) + end if + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! - if (associated(cgrid%qmean_cwd_rh )) & - call hdf_getslab_r(cgrid%qmean_cwd_rh (:,ipy) ,'QMEAN_CWD_RH ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_leaf_resp )) & - call hdf_getslab_r(cgrid%qmean_leaf_resp (:,ipy) ,'QMEAN_LEAF_RESP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_root_resp )) & - call hdf_getslab_r(cgrid%qmean_root_resp (:,ipy) ,'QMEAN_ROOT_RESP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_fs_open )) & - call hdf_getslab_r(cgrid%qmean_fs_open (:,ipy) ,'QMEAN_FS_OPEN ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_fsw )) & - call hdf_getslab_r(cgrid%qmean_fsw (:,ipy) ,'QMEAN_FSW ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_fsn )) & - call hdf_getslab_r(cgrid%qmean_fsn (:,ipy) ,'QMEAN_FSN ' & - ,dsetrank,iparallel,.false.,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! 3-D variables, dimensions: (n_pft;n_dbh_types;nsites). ! + !---------------------------------------------------------------------------------------! - if (associated(cgrid%qmean_can_temp )) & - call hdf_getslab_r(cgrid%qmean_can_temp (:,ipy) ,'QMEAN_CAN_TEMP ' & - ,dsetrank,iparallel,.false.,foundvar) + dsetrank = 3 + globdims(1) = int(n_pft,8) + chnkdims(1) = int(n_pft,8) + memdims (1) = int(n_pft,8) + memsize (1) = int(n_pft,8) + chnkoffs(1) = 0_8 + memoffs (1) = 0_8 + globdims(2) = int(n_dbh,8) + chnkdims(2) = int(n_dbh,8) + memdims (2) = int(n_dbh,8) + memsize (2) = int(n_dbh,8) + chnkoffs(2) = 0_8 + memoffs (2) = 0_8 + globdims(3) = int(nsites_global ,8) + chnkdims(3) = int(cpoly%nsites ,8) + chnkoffs(3) = int(pysi_index - 1,8) + memdims (3) = int(cpoly%nsites ,8) + memsize (3) = int(cpoly%nsites ,8) + memoffs (3) = 0_8 + + call hdf_getslab_r(cpoly%basal_area & + ,'BASAL_AREA_SI ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%agb & + ,'AGB_SI ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%basal_area_growth & + ,'BASAL_AREA_GROWTH ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%agb_growth & + ,'AGB_GROWTH ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%basal_area_mort & + ,'BASAL_AREA_MORT ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%basal_area_cut & + ,'BASAL_AREA_CUT ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%agb_mort & + ,'AGB_MORT ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpoly%agb_cut & + ,'AGB_CUT ',dsetrank,iparallel,.true. ,foundvar) - if (associated(cgrid%qmean_can_shv )) & - call hdf_getslab_r(cgrid%qmean_can_shv (:,ipy) ,'QMEAN_CAN_SHV ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_can_prss )) & - call hdf_getslab_r(cgrid%qmean_can_prss (:,ipy) ,'QMEAN_CAN_PRSS ' & - ,dsetrank,iparallel,.false.,foundvar) + return +end subroutine fill_history_polygon +!==========================================================================================! +!==========================================================================================! - if (associated(cgrid%qmean_can_theta )) & - call hdf_getslab_r(cgrid%qmean_can_theta (:,ipy) ,'QMEAN_CAN_THETA ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_can_theiv )) & - call hdf_getslab_r(cgrid%qmean_can_theiv (:,ipy) ,'QMEAN_CAN_THEIV ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_can_vpdef )) & - call hdf_getslab_r(cgrid%qmean_can_vpdef (:,ipy) ,'QMEAN_CAN_VPDEF ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_can_co2 )) & - call hdf_getslab_r(cgrid%qmean_can_co2 (:,ipy) ,'QMEAN_CAN_CO2 ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_can_rhos )) & - call hdf_getslab_r(cgrid%qmean_can_rhos (:,ipy) ,'QMEAN_CAN_RHOS ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_gnd_temp )) & - call hdf_getslab_r(cgrid%qmean_gnd_temp (:,ipy) ,'QMEAN_GND_TEMP ' & - ,dsetrank,iparallel,.false.,foundvar) +!==========================================================================================! +!==========================================================================================! +subroutine fill_history_site(csite,sipa_index,npatches_global) + use ed_state_vars , only : sitetype ! ! structure + use grid_coms , only : nzg & ! intent(in) + , nzs ! ! intent(in) + use ed_max_dims , only : n_pft & ! intent(in) + , n_dbh & ! intent(in) + , max_site & ! intent(in) + , n_dist_types ! ! intent(in) + use hdf5 + use hdf5_coms , only : file_id & ! intent(inout) + , dset_id & ! intent(inout) + , dspace_id & ! intent(inout) + , plist_id & ! intent(inout) + , globdims & ! intent(inout) + , chnkdims & ! intent(inout) + , chnkoffs & ! intent(inout) + , cnt & ! intent(inout) + , stride & ! intent(inout) + , memdims & ! intent(inout) + , memoffs & ! intent(inout) + , memsize & ! intent(inout) + , datatype_id & ! intent(inout) + , setsize ! ! intent(inout) + use ed_misc_coms , only : ndcycle & ! intent(in) + , writing_long & ! intent(in) + , writing_eorq & ! intent(in) + , writing_dcyc ! ! intent(in) + use fusion_fission_coms, only : ff_nhgt ! ! intent(in) + implicit none + !----- Interfaces. ---------------------------------------------------------------------! +#if USE_INTERF + interface + subroutine hdf_getslab_r(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + real(kind=4) , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_r + !------------------------------------------------------------------------------------! + subroutine hdf_getslab_d(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + real(kind=8) , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_d + !------------------------------------------------------------------------------------! + subroutine hdf_getslab_i(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + integer , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_i + !------------------------------------------------------------------------------------! + end interface +#endif + !---------------------------------------------------------------------------------------! - if (associated(cgrid%qmean_gnd_shv )) & - call hdf_getslab_r(cgrid%qmean_gnd_shv (:,ipy) ,'QMEAN_GND_SHV ' & - ,dsetrank,iparallel,.false.,foundvar) + !----- Arguments. ----------------------------------------------------------------------! + type(sitetype) , target :: csite + integer , intent(in) :: sipa_index + integer , intent(in) :: npatches_global + !----- Local variables. ----------------------------------------------------------------! + integer :: iparallel + integer :: dsetrank + integer :: hdferr + logical :: foundvar + integer :: ipa + integer :: ipft + real(kind=8), dimension(:,:), allocatable :: buff + !---------------------------------------------------------------------------------------! - if (associated(cgrid%qmean_leaf_energy )) & - call hdf_getslab_r(cgrid%qmean_leaf_energy (:,ipy) ,'QMEAN_LEAF_ENERGY ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_leaf_water )) & - call hdf_getslab_r(cgrid%qmean_leaf_water (:,ipy) ,'QMEAN_LEAF_WATER ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_leaf_hcap )) & - call hdf_getslab_r(cgrid%qmean_leaf_hcap (:,ipy) ,'QMEAN_LEAF_HCAP ' & - ,dsetrank,iparallel,.false.,foundvar) + !----- Turn off parallel for this sub-routine. -----------------------------------------! + iparallel = 0 + !---------------------------------------------------------------------------------------! + - if (associated(cgrid%qmean_leaf_temp )) & - call hdf_getslab_r(cgrid%qmean_leaf_temp (:,ipy) ,'QMEAN_LEAF_TEMP ' & - ,dsetrank,iparallel,.false.,foundvar) + !---------------------------------------------------------------------------------------! + ! Reset the dimension arrays. ! + !---------------------------------------------------------------------------------------! + globdims(:) = 0_8 + chnkdims(:) = 0_8 + chnkoffs(:) = 0_8 + memoffs (:) = 0_8 + memdims (:) = 0_8 + memsize (:) = 1_8 + !---------------------------------------------------------------------------------------! - if (associated(cgrid%qmean_leaf_vpdef )) & - call hdf_getslab_r(cgrid%qmean_leaf_vpdef (:,ipy) ,'QMEAN_LEAF_VPDEF ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_wood_energy )) & - call hdf_getslab_r(cgrid%qmean_wood_energy (:,ipy) ,'QMEAN_WOOD_ENERGY ' & - ,dsetrank,iparallel,.false.,foundvar) + !---------------------------------------------------------------------------------------! + ! For the remainder of this sub-routine, we must load the polygon variables ! + ! according to the dimensionality. If you are adding a new variable, make sure that it ! + ! is placed together with variables of the same dimensions. ! + ! ! + ! DSETRANK -- the rank of the variable. ! + ! GLOBDIMS -- the size of each dimension ! + ! CHNKDIMS -- the size of the chunk to be read this time ! + ! CHNKOFFS -- the offset (number of indices to be skipped) ! + ! MEMDIMS -- the dimensions of the buffer to be filled. ! + ! MEMOFFS -- the offset of the memory ! + ! MEMSIZE -- the size of variable that will house the information read. ! + !---------------------------------------------------------------------------------------! - if (associated(cgrid%qmean_wood_water )) & - call hdf_getslab_r(cgrid%qmean_wood_water (:,ipy) ,'QMEAN_WOOD_WATER ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_wood_hcap )) & - call hdf_getslab_r(cgrid%qmean_wood_hcap (:,ipy) ,'QMEAN_WOOD_HCAP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_wood_temp )) & - call hdf_getslab_r(cgrid%qmean_wood_temp (:,ipy) ,'QMEAN_WOOD_TEMP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_atm_temp )) & - call hdf_getslab_r(cgrid%qmean_atm_temp (:,ipy) ,'QMEAN_ATM_TEMP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_atm_vpdef )) & - call hdf_getslab_r(cgrid%qmean_atm_vpdef (:,ipy) ,'QMEAN_ATM_VPDEF ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%qmean_rshort )) & - call hdf_getslab_r(cgrid%qmean_rshort (:,ipy) ,'QMEAN_RSHORT ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%qmean_rshort_diff )) & - call hdf_getslab_r(cgrid%qmean_rshort_diff (:,ipy) ,'QMEAN_RSHORT_DIFF ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%qmean_par )) & - call hdf_getslab_r(cgrid%qmean_par (:,ipy) ,'QMEAN_PAR ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%qmean_par_diff )) & - call hdf_getslab_r(cgrid%qmean_par_diff (:,ipy) ,'QMEAN_PAR_DIFF ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%qmean_rlong )) & - call hdf_getslab_r(cgrid%qmean_rlong (:,ipy) ,'QMEAN_RLONG ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%qmean_rlongup )) & - call hdf_getslab_r(cgrid%qmean_rlongup (:,ipy) ,'QMEAN_RLONGUP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%qmean_parup )) & - call hdf_getslab_r(cgrid%qmean_parup (:,ipy) ,'QMEAN_PARUP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%qmean_nirup )) & - call hdf_getslab_r(cgrid%qmean_nirup (:,ipy) ,'QMEAN_NIRUP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%qmean_rshortup )) & - call hdf_getslab_r(cgrid%qmean_rshortup (:,ipy) ,'QMEAN_RSHORTUP ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%qmean_rnet )) & - call hdf_getslab_r(cgrid%qmean_rnet (:,ipy) ,'QMEAN_RNET ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%qmean_rshort_gnd )) & - call hdf_getslab_r(cgrid%qmean_rshort_gnd (:,ipy) ,'QMEAN_RSHORT_GND ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%qmean_par_gnd )) & - call hdf_getslab_r(cgrid%qmean_par_gnd (:,ipy) ,'QMEAN_PAR_GND ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%qmean_rlong_gnd )) & - call hdf_getslab_r(cgrid%qmean_rlong_gnd (:,ipy) ,'QMEAN_RLONG_GND ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%qmean_atm_shv )) & - call hdf_getslab_r(cgrid%qmean_atm_shv (:,ipy) ,'QMEAN_ATM_SHV ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cgrid%qmean_atm_co2 )) & - call hdf_getslab_r(cgrid%qmean_atm_co2 (:,ipy) ,'QMEAN_ATM_CO2 ' & - ,dsetrank,iparallel,.false.,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! Single dimension variables - Integers. ! + !---------------------------------------------------------------------------------------! + dsetrank = 1 + globdims(1) = int(npatches_global,8) + chnkdims(1) = int(csite%npatches,8) + chnkoffs(1) = int(sipa_index - 1,8) + memdims (1) = int(csite%npatches,8) + memsize (1) = int(csite%npatches,8) + memoffs (1) = 0_8 + call hdf_getslab_i(csite%dist_type & + ,'DIST_TYPE ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_i(csite%plantation & + ,'PLANTATION ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_i(csite%nlev_sfcwater & + ,'NLEV_SFCWATER ',dsetrank,iparallel,.true. ,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! - if (associated(cgrid%qmean_atm_prss )) & - call hdf_getslab_r(cgrid%qmean_atm_prss (:,ipy) ,'QMEAN_ATM_PRSS ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmean_atm_vels )) & - call hdf_getslab_r(cgrid%qmean_atm_vels (:,ipy) ,'QMEAN_ATM_VELS ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmsqu_gpp )) & - call hdf_getslab_r(cgrid%qmsqu_gpp (:,ipy) ,'QMSQU_GPP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmsqu_leaf_resp )) & - call hdf_getslab_r(cgrid%qmsqu_leaf_resp (:,ipy) ,'QMSQU_LEAF_RESP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmsqu_root_resp )) & - call hdf_getslab_r(cgrid%qmsqu_root_resp (:,ipy) ,'QMSQU_ROOT_RESP ' & - ,dsetrank,iparallel,.false.,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! Single dimension variables - Real. ! + !---------------------------------------------------------------------------------------! + dsetrank = 1 + globdims(1) = int(npatches_global,8) + chnkdims(1) = int(csite%npatches,8) + chnkoffs(1) = int(sipa_index - 1,8) + memdims (1) = int(csite%npatches,8) + memsize (1) = int(csite%npatches,8) + memoffs (1) = 0_8 + call hdf_getslab_r(csite%area & + ,'AREA ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%age & + ,'AGE ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%fast_soil_C & + ,'FAST_SOIL_C ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%slow_soil_C & + ,'SLOW_SOIL_C ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%structural_soil_C & + ,'STRUCTURAL_SOIL_C ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%structural_soil_L & + ,'STRUCTURAL_SOIL_L ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%mineralized_soil_N & + ,'MINERALIZED_SOIL_N ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%fast_soil_N & + ,'FAST_SOIL_N ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%sum_dgd & + ,'SUM_DGD ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%sum_chd & + ,'SUM_CHD ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%can_theiv & + ,'CAN_THEIV ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%can_vpdef & + ,'CAN_VPDEF ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%can_temp & + ,'CAN_TEMP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%can_temp_pv & + ,'CAN_TEMP_PV ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%can_shv & + ,'CAN_SHV ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%can_co2 & + ,'CAN_CO2 ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%can_rhos & + ,'CAN_RHOS ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%can_prss & + ,'CAN_PRSS ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%can_theta & + ,'CAN_THETA ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%can_depth & + ,'CAN_DEPTH ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%opencan_frac & + ,'OPENCAN_FRAC ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%ggbare & + ,'GGBARE ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%ggveg & + ,'GGVEG ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%ggnet & + ,'GGNET ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%ggsoil & + ,'GGSOIL ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%ground_shv & + ,'GROUND_SHV ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%ground_ssh & + ,'GROUND_SSH ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%ground_temp & + ,'GROUND_TEMP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%ground_fliq & + ,'GROUND_FLIQ ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%rough & + ,'ROUGH ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%par_l_max & + ,'PAR_L_MAX ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%par_l_beam_max & + ,'PAR_L_BEAM_MAX ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%par_l_diffuse_max & + ,'PAR_L_DIFFUSE_MAX ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%avg_daily_temp & + ,'AVG_DAILY_TEMP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%avg_monthly_gndwater & + ,'AVG_MONTHLY_GNDWATER ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%avg_monthly_waterdef & + ,'AVG_MONTHLY_WATERDEF ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%wbudget_loss2atm & + ,'WBUDGET_LOSS2ATM ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%wbudget_denseffect & + ,'WBUDGET_DENSEFFECT ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%wbudget_precipgain & + ,'WBUDGET_PRECIPGAIN ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%wbudget_loss2runoff & + ,'WBUDGET_LOSS2RUNOFF ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%wbudget_loss2drainage & + ,'WBUDGET_LOSS2DRAINAGE ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%wbudget_initialstorage & + ,'WBUDGET_INITIALSTORAGE ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%wbudget_residual & + ,'WBUDGET_RESIDUAL ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%ebudget_loss2atm & + ,'EBUDGET_LOSS2ATM ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%ebudget_denseffect & + ,'EBUDGET_DENSEFFECT ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%ebudget_prsseffect & + ,'EBUDGET_PRSSEFFECT ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%ebudget_loss2runoff & + ,'EBUDGET_LOSS2RUNOFF ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%ebudget_loss2drainage & + ,'EBUDGET_LOSS2DRAINAGE ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%ebudget_netrad & + ,'EBUDGET_NETRAD ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%ebudget_precipgain & + ,'EBUDGET_PRECIPGAIN ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%ebudget_initialstorage & + ,'EBUDGET_INITIALSTORAGE ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%ebudget_residual & + ,'EBUDGET_RESIDUAL ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%co2budget_initialstorage & + ,'CO2BUDGET_INITIALSTORAGE ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%co2budget_residual & + ,'CO2BUDGET_RESIDUAL ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%co2budget_loss2atm & + ,'CO2BUDGET_LOSS2ATM ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%co2budget_denseffect & + ,'CO2BUDGET_DENSEFFECT ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%co2budget_gpp & + ,'CO2BUDGET_GPP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%co2budget_plresp & + ,'CO2BUDGET_PLRESP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%co2budget_rh & + ,'CO2BUDGET_RH ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%today_A_decomp & + ,'TODAY_A_DECOMP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%today_Af_decomp & + ,'TODAY_AF_DECOMP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%veg_rough & + ,'VEG_ROUGH ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%veg_height & + ,'VEG_HEIGHT ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%veg_displace & + ,'VEG_DISPLACE ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%fsc_in & + ,'FSC_IN ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%ssc_in & + ,'SSC_IN ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%ssl_in & + ,'SSL_IN ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%fsn_in & + ,'FSN_IN ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%total_plant_nitrogen_uptake & + ,'TOTAL_PLANT_NITROGEN_UPTAKE ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%mineralized_N_loss & + ,'MINERALIZED_N_LOSS ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%mineralized_N_input & + ,'MINERALIZED_N_INPUT ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%rshort_g & + ,'RSHORT_G ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%rshort_g_beam & + ,'RSHORT_G_BEAM ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%rshort_g_diffuse & + ,'RSHORT_G_DIFFUSE ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%par_g & + ,'PAR_G ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%par_g_beam & + ,'PAR_G_BEAM ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%par_g_diffuse & + ,'PAR_G_DIFFUSE ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%par_b & + ,'PAR_B ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%par_b_beam & + ,'PAR_B_BEAM ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%par_b_diffuse & + ,'PAR_B_DIFFUSE ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%nir_b & + ,'NIR_B ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%nir_b_beam & + ,'NIR_B_BEAM ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%nir_b_diffuse & + ,'NIR_B_DIFFUSE ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%rlong_g & + ,'RLONG_G ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%rlong_g_surf & + ,'RLONG_G_SURF ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%rlong_g_incid & + ,'RLONG_G_INCID ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%rlong_s & + ,'RLONG_S ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%rlong_s_surf & + ,'RLONG_S_SURF ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%rlong_s_incid & + ,'RLONG_S_INCID ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%albedo & + ,'ALBEDO ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%albedo_beam & + ,'ALBEDO_BEAM ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%albedo_diffuse & + ,'ALBEDO_DIFFUSE ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%rlong_albedo & + ,'RLONG_ALBEDO ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%rnet & + ,'RNET ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%rlongup & + ,'RLONGUP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%parup & + ,'PARUP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%nirup & + ,'NIRUP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%rshortup & + ,'RSHORTUP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%total_sfcw_depth & + ,'TOTAL_SFCW_DEPTH ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%snowfac & + ,'SNOWFAC ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%A_decomp & + ,'A_DECOMP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%f_decomp & + ,'F_DECOMP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%rh & + ,'RH ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%cwd_rh & + ,'CWD_RH ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%plant_ag_biomass & + ,'PLANT_AG_BIOMASS ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%ustar & + ,'USTAR ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%tstar & + ,'TSTAR ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%qstar & + ,'QSTAR ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%cstar & + ,'CSTAR ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%zeta & + ,'ZETA ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%ribulk & + ,'RIBULK ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%upwp & + ,'UPWP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%qpwp & + ,'QPWP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%cpwp & + ,'CPWP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%tpwp & + ,'TPWP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%wpwp & + ,'WPWP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%htry & + ,'HTRY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%hprev & + ,'HPREV ',dsetrank,iparallel,.true. ,foundvar) + !----- Daily means. --------------------------------------------------------------------! + if (writing_long) then + call hdf_getslab_r(csite%dmean_A_decomp & + ,'DMEAN_A_DECOMP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_Af_decomp & + ,'DMEAN_AF_DECOMP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_co2_residual & + ,'DMEAN_CO2_RESIDUAL_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_energy_residual & + ,'DMEAN_ENERGY_RESIDUAL_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_water_residual & + ,'DMEAN_WATER_RESIDUAL_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_rh & + ,'DMEAN_RH_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_cwd_rh & + ,'DMEAN_CWD_RH_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_nep & + ,'DMEAN_NEP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_rk4step & + ,'DMEAN_RK4STEP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_available_water & + ,'DMEAN_AVAILABLE_WATER_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_can_theiv & + ,'DMEAN_CAN_THEIV_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_can_theta & + ,'DMEAN_CAN_THETA_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_can_vpdef & + ,'DMEAN_CAN_VPDEF_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_can_temp & + ,'DMEAN_CAN_TEMP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_can_shv & + ,'DMEAN_CAN_SHV_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_can_co2 & + ,'DMEAN_CAN_CO2_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_can_rhos & + ,'DMEAN_CAN_RHOS_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_can_prss & + ,'DMEAN_CAN_PRSS_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_gnd_temp & + ,'DMEAN_GND_TEMP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_gnd_shv & + ,'DMEAN_GND_SHV_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_can_ggnd & + ,'DMEAN_CAN_GGND_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_sfcw_depth & + ,'DMEAN_SFCW_DEPTH_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_sfcw_energy & + ,'DMEAN_SFCW_ENERGY_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_sfcw_mass & + ,'DMEAN_SFCW_MASS_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_sfcw_temp & + ,'DMEAN_SFCW_TEMP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_sfcw_fliq & + ,'DMEAN_SFCW_FLIQ_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_rshort_gnd & + ,'DMEAN_RSHORT_GND_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_par_gnd & + ,'DMEAN_PAR_GND_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_rlong_gnd & + ,'DMEAN_RLONG_GND_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_rlongup & + ,'DMEAN_RLONGUP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_parup & + ,'DMEAN_PARUP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_nirup & + ,'DMEAN_NIRUP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_rshortup & + ,'DMEAN_RSHORTUP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_rnet & + ,'DMEAN_RNET_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_albedo & + ,'DMEAN_ALBEDO_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_albedo_beam & + ,'DMEAN_ALBEDO_BEAM_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_albedo_diff & + ,'DMEAN_ALBEDO_DIFF_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_rlong_albedo & + ,'DMEAN_RLONG_ALBEDO_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_ustar & + ,'DMEAN_USTAR_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_tstar & + ,'DMEAN_TSTAR_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_qstar & + ,'DMEAN_QSTAR_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_cstar & + ,'DMEAN_CSTAR_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_carbon_ac & + ,'DMEAN_CARBON_AC_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_carbon_st & + ,'DMEAN_CARBON_ST_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_vapor_gc & + ,'DMEAN_VAPOR_GC_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_vapor_ac & + ,'DMEAN_VAPOR_AC_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_throughfall & + ,'DMEAN_THROUGHFALL_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_runoff & + ,'DMEAN_RUNOFF_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_drainage & + ,'DMEAN_DRAINAGE_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_sensible_gc & + ,'DMEAN_SENSIBLE_GC_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_sensible_ac & + ,'DMEAN_SENSIBLE_AC_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_qthroughfall & + ,'DMEAN_QTHROUGHFALL_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_qrunoff & + ,'DMEAN_QRUNOFF_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_qdrainage & + ,'DMEAN_QDRAINAGE_PA ',dsetrank,iparallel,.false.,foundvar) + end if + !----- Monthly means. ------------------------------------------------------------------! + if (writing_eorq) then + call hdf_getslab_r(csite%mmean_fast_soil_c & + ,'MMEAN_FAST_SOIL_C_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_slow_soil_c & + ,'MMEAN_SLOW_SOIL_C_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_struct_soil_c & + ,'MMEAN_STRUCT_SOIL_C_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_struct_soil_l & + ,'MMEAN_STRUCT_SOIL_L_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_fast_soil_n & + ,'MMEAN_FAST_SOIL_N_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_mineral_soil_n & + ,'MMEAN_MINERAL_SOIL_N_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_co2_residual & + ,'MMEAN_CO2_RESIDUAL_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_energy_residual & + ,'MMEAN_ENERGY_RESIDUAL_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_water_residual & + ,'MMEAN_WATER_RESIDUAL_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_rh & + ,'MMEAN_RH_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_cwd_rh & + ,'MMEAN_CWD_RH_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_nep & + ,'MMEAN_NEP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_A_decomp & + ,'MMEAN_A_DECOMP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_Af_decomp & + ,'MMEAN_AF_DECOMP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_rk4step & + ,'MMEAN_RK4STEP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_available_water & + ,'MMEAN_AVAILABLE_WATER_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_can_theiv & + ,'MMEAN_CAN_THEIV_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_can_theta & + ,'MMEAN_CAN_THETA_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_can_vpdef & + ,'MMEAN_CAN_VPDEF_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_can_temp & + ,'MMEAN_CAN_TEMP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_can_shv & + ,'MMEAN_CAN_SHV_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_can_co2 & + ,'MMEAN_CAN_CO2_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_can_rhos & + ,'MMEAN_CAN_RHOS_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_can_prss & + ,'MMEAN_CAN_PRSS_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_gnd_temp & + ,'MMEAN_GND_TEMP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_gnd_shv & + ,'MMEAN_GND_SHV_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_can_ggnd & + ,'MMEAN_CAN_GGND_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_sfcw_depth & + ,'MMEAN_SFCW_DEPTH_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_sfcw_energy & + ,'MMEAN_SFCW_ENERGY_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_sfcw_mass & + ,'MMEAN_SFCW_MASS_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_sfcw_temp & + ,'MMEAN_SFCW_TEMP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_sfcw_fliq & + ,'MMEAN_SFCW_FLIQ_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_rshort_gnd & + ,'MMEAN_RSHORT_GND_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_par_gnd & + ,'MMEAN_PAR_GND_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_rlong_gnd & + ,'MMEAN_RLONG_GND_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_rlongup & + ,'MMEAN_RLONGUP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_parup & + ,'MMEAN_PARUP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_nirup & + ,'MMEAN_NIRUP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_rshortup & + ,'MMEAN_RSHORTUP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_rnet & + ,'MMEAN_RNET_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_albedo & + ,'MMEAN_ALBEDO_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_albedo_beam & + ,'MMEAN_ALBEDO_BEAM_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_albedo_diff & + ,'MMEAN_ALBEDO_DIFF_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_rlong_albedo & + ,'MMEAN_RLONG_ALBEDO_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_ustar & + ,'MMEAN_USTAR_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_tstar & + ,'MMEAN_TSTAR_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_qstar & + ,'MMEAN_QSTAR_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_cstar & + ,'MMEAN_CSTAR_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_carbon_ac & + ,'MMEAN_CARBON_AC_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_carbon_st & + ,'MMEAN_CARBON_ST_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_vapor_gc & + ,'MMEAN_VAPOR_GC_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_vapor_ac & + ,'MMEAN_VAPOR_AC_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_throughfall & + ,'MMEAN_THROUGHFALL_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_runoff & + ,'MMEAN_RUNOFF_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_drainage & + ,'MMEAN_DRAINAGE_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_sensible_gc & + ,'MMEAN_SENSIBLE_GC_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_sensible_ac & + ,'MMEAN_SENSIBLE_AC_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_qthroughfall & + ,'MMEAN_QTHROUGHFALL_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_qrunoff & + ,'MMEAN_QRUNOFF_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_qdrainage & + ,'MMEAN_QDRAINAGE_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_A_decomp & + ,'MMEAN_A_DECOMP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_Af_decomp & + ,'MMEAN_AF_DECOMP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_co2_residual & + ,'MMEAN_CO2_RESIDUAL_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_energy_residual & + ,'MMEAN_ENERGY_RESIDUAL_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_water_residual & + ,'MMEAN_WATER_RESIDUAL_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmsqu_rh & + ,'MMSQU_RH_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmsqu_cwd_rh & + ,'MMSQU_CWD_RH_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmsqu_nep & + ,'MMSQU_NEP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmsqu_rlongup & + ,'MMSQU_RLONGUP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmsqu_parup & + ,'MMSQU_PARUP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmsqu_nirup & + ,'MMSQU_NIRUP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmsqu_rshortup & + ,'MMSQU_RSHORTUP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmsqu_rnet & + ,'MMSQU_RNET_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmsqu_albedo & + ,'MMSQU_ALBEDO_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmsqu_ustar & + ,'MMSQU_USTAR_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmsqu_carbon_ac & + ,'MMSQU_CARBON_AC_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmsqu_carbon_st & + ,'MMSQU_CARBON_ST_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmsqu_vapor_gc & + ,'MMSQU_VAPOR_GC_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmsqu_vapor_ac & + ,'MMSQU_VAPOR_AC_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmsqu_sensible_gc & + ,'MMSQU_SENSIBLE_GC_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmsqu_sensible_ac & + ,'MMSQU_SENSIBLE_AC_PA ',dsetrank,iparallel,.false.,foundvar) + end if + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! - if (associated(cgrid%qmsqu_plresp )) & - call hdf_getslab_r(cgrid%qmsqu_plresp (:,ipy) ,'QMSQU_PLRESP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmsqu_carbon_ac)) & - call hdf_getslab_r(cgrid%qmsqu_carbon_ac (:,ipy) ,'QMSQU_CARBON_AC ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmsqu_carbon_st)) & - call hdf_getslab_r(cgrid%qmsqu_carbon_st (:,ipy) ,'QMSQU_CARBON_ST ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmsqu_nep )) & - call hdf_getslab_r(cgrid%qmsqu_nep (:,ipy) ,'QMSQU_NEP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmsqu_rh )) & - call hdf_getslab_r(cgrid%qmsqu_rh (:,ipy) ,'QMSQU_RH ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmsqu_sensible_ac)) & - call hdf_getslab_r(cgrid%qmsqu_sensible_ac (:,ipy) ,'QMSQU_SENSIBLE_AC ' & - ,dsetrank,iparallel,.false.,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! 2-D variables, dimensions: (ndcycle,npatches). ! + !---------------------------------------------------------------------------------------! + dsetrank = 2 + globdims(1) = int(ndcycle,8) + chnkdims(1) = int(ndcycle,8) + memdims (1) = int(ndcycle,8) + memsize (1) = int(ndcycle,8) + chnkoffs(1) = 0_8 + memoffs (1) = 0_8 + globdims(2) = int(npatches_global,8) + chnkdims(2) = int(csite%npatches ,8) + chnkoffs(2) = int(sipa_index - 1 ,8) + memdims (2) = int(csite%npatches ,8) + memsize (2) = int(csite%npatches ,8) + memoffs (2) = 0_8 + + !----- Mean diel variables. ------------------------------------------------------------! + if (writing_dcyc) then + call hdf_getslab_r(csite%qmean_rh & + ,'QMEAN_RH_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_cwd_rh & + ,'QMEAN_CWD_RH_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_nep & + ,'QMEAN_NEP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_rk4step & + ,'QMEAN_RK4STEP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_available_water & + ,'QMEAN_AVAILABLE_WATER_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_can_theiv & + ,'QMEAN_CAN_THEIV_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_can_theta & + ,'QMEAN_CAN_THETA_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_can_vpdef & + ,'QMEAN_CAN_VPDEF_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_can_temp & + ,'QMEAN_CAN_TEMP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_can_shv & + ,'QMEAN_CAN_SHV_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_can_co2 & + ,'QMEAN_CAN_CO2_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_can_rhos & + ,'QMEAN_CAN_RHOS_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_can_prss & + ,'QMEAN_CAN_PRSS_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_gnd_temp & + ,'QMEAN_GND_TEMP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_gnd_shv & + ,'QMEAN_GND_SHV_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_can_ggnd & + ,'QMEAN_CAN_GGND_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_sfcw_depth & + ,'QMEAN_SFCW_DEPTH_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_sfcw_energy & + ,'QMEAN_SFCW_ENERGY_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_sfcw_mass & + ,'QMEAN_SFCW_MASS_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_sfcw_temp & + ,'QMEAN_SFCW_TEMP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_sfcw_fliq & + ,'QMEAN_SFCW_FLIQ_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_rshort_gnd & + ,'QMEAN_RSHORT_GND_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_par_gnd & + ,'QMEAN_PAR_GND_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_rlong_gnd & + ,'QMEAN_RLONG_GND_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_rlongup & + ,'QMEAN_RLONGUP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_parup & + ,'QMEAN_PARUP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_nirup & + ,'QMEAN_NIRUP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_rshortup & + ,'QMEAN_RSHORTUP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_rnet & + ,'QMEAN_RNET_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_albedo & + ,'QMEAN_ALBEDO_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_albedo_beam & + ,'QMEAN_ALBEDO_BEAM_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_albedo_diff & + ,'QMEAN_ALBEDO_DIFF_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_rlong_albedo & + ,'QMEAN_RLONG_ALBEDO_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_ustar & + ,'QMEAN_USTAR_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_tstar & + ,'QMEAN_TSTAR_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_qstar & + ,'QMEAN_QSTAR_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_cstar & + ,'QMEAN_CSTAR_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_carbon_ac & + ,'QMEAN_CARBON_AC_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_carbon_st & + ,'QMEAN_CARBON_ST_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_vapor_gc & + ,'QMEAN_VAPOR_GC_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_vapor_ac & + ,'QMEAN_VAPOR_AC_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_throughfall & + ,'QMEAN_THROUGHFALL_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_runoff & + ,'QMEAN_RUNOFF_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_drainage & + ,'QMEAN_DRAINAGE_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_sensible_gc & + ,'QMEAN_SENSIBLE_GC_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_sensible_ac & + ,'QMEAN_SENSIBLE_AC_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_qthroughfall & + ,'QMEAN_QTHROUGHFALL_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_qrunoff & + ,'QMEAN_QRUNOFF_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_qdrainage & + ,'QMEAN_QDRAINAGE_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmsqu_rh & + ,'QMSQU_RH_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmsqu_cwd_rh & + ,'QMSQU_CWD_RH_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmsqu_nep & + ,'QMSQU_NEP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmsqu_rlongup & + ,'QMSQU_RLONGUP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmsqu_parup & + ,'QMSQU_PARUP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmsqu_nirup & + ,'QMSQU_NIRUP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmsqu_rshortup & + ,'QMSQU_RSHORTUP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmsqu_rnet & + ,'QMSQU_RNET_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmsqu_albedo & + ,'QMSQU_ALBEDO_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmsqu_ustar & + ,'QMSQU_USTAR_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmsqu_carbon_ac & + ,'QMSQU_CARBON_AC_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmsqu_carbon_st & + ,'QMSQU_CARBON_ST_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmsqu_vapor_gc & + ,'QMSQU_VAPOR_GC_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmsqu_vapor_ac & + ,'QMSQU_VAPOR_AC_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmsqu_sensible_gc & + ,'QMSQU_SENSIBLE_GC_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmsqu_sensible_ac & + ,'QMSQU_SENSIBLE_AC_PA ',dsetrank,iparallel,.false.,foundvar) + end if + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! - if (associated(cgrid%qmsqu_sensible_lc)) & - call hdf_getslab_r(cgrid%qmsqu_sensible_lc (:,ipy) ,'QMSQU_SENSIBLE_LC ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmsqu_sensible_wc)) & - call hdf_getslab_r(cgrid%qmsqu_sensible_wc (:,ipy) ,'QMSQU_SENSIBLE_WC ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmsqu_sensible_gc)) & - call hdf_getslab_r(cgrid%qmsqu_sensible_gc (:,ipy) ,'QMSQU_SENSIBLE_GC ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmsqu_evap )) & - call hdf_getslab_r(cgrid%qmsqu_evap (:,ipy) ,'QMSQU_EVAP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmsqu_transp )) & - call hdf_getslab_r(cgrid%qmsqu_transp (:,ipy) ,'QMSQU_TRANSP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmsqu_vapor_ac)) & - call hdf_getslab_r(cgrid%qmsqu_vapor_ac (:,ipy) ,'QMSQU_VAPOR_AC ' & - ,dsetrank,iparallel,.false.,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! 2-D variables, dimensions: (nzs,npatches). ! + !---------------------------------------------------------------------------------------! + dsetrank = 2 + globdims(1) = int(nzs,8) + chnkdims(1) = int(nzs,8) + memdims (1) = int(nzs,8) + memsize (1) = int(nzs,8) + chnkoffs(1) = 0_8 + memoffs (1) = 0_8 + globdims(2) = int(npatches_global,8) + chnkdims(2) = int(csite%npatches ,8) + chnkoffs(2) = int(sipa_index - 1 ,8) + memdims (2) = int(csite%npatches ,8) + memsize (2) = int(csite%npatches ,8) + memoffs (2) = 0_8 + call hdf_getslab_r(csite%sfcwater_mass & + ,'SFCWATER_MASS ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%sfcwater_energy & + ,'SFCWATER_ENERGY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%sfcwater_depth & + ,'SFCWATER_DEPTH ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%sfcwater_tempk & + ,'SFCWATER_TEMPK ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%sfcwater_fracliq & + ,'SFCWATER_FRACLIQ ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%rshort_s & + ,'RSHORT_S ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%rshort_s_beam & + ,'RSHORT_S_BEAM ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%rshort_s_diffuse & + ,'RSHORT_S_DIFFUSE ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%par_s & + ,'PAR_S ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%par_s_beam & + ,'PAR_S_BEAM ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%par_s_diffuse & + ,'PAR_S_DIFFUSE ',dsetrank,iparallel,.true. ,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! - if (associated(cgrid%qmsqu_vapor_lc)) & - call hdf_getslab_r(cgrid%qmsqu_vapor_lc (:,ipy) ,'QMSQU_VAPOR_LC ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmsqu_vapor_wc)) & - call hdf_getslab_r(cgrid%qmsqu_vapor_wc (:,ipy) ,'QMSQU_VAPOR_WC ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmsqu_vapor_gc)) & - call hdf_getslab_r(cgrid%qmsqu_vapor_gc (:,ipy) ,'QMSQU_VAPOR_GC ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmsqu_ustar )) & - call hdf_getslab_r(cgrid%qmsqu_ustar (:,ipy) ,'QMSQU_USTAR ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmsqu_rlongup )) & - call hdf_getslab_r(cgrid%qmsqu_rlongup (:,ipy) ,'QMSQU_RLONGUP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmsqu_parup )) & - call hdf_getslab_r(cgrid%qmsqu_parup (:,ipy) ,'QMSQU_PARUP ' & - ,dsetrank,iparallel,.false.,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! 2-D variables, dimensions: (nzg,npatches). ! + !---------------------------------------------------------------------------------------! + dsetrank = 2 + globdims(1) = int(nzg,8) + chnkdims(1) = int(nzg,8) + memdims (1) = int(nzg,8) + memsize (1) = int(nzg,8) + chnkoffs(1) = 0_8 + memoffs (1) = 0_8 + globdims(2) = int(npatches_global,8) + chnkdims(2) = int(csite%npatches ,8) + chnkoffs(2) = int(sipa_index - 1 ,8) + memdims (2) = int(csite%npatches ,8) + memsize (2) = int(csite%npatches ,8) + memoffs (2) = 0_8 + call hdf_getslab_r(csite%soil_energy & + ,'SOIL_ENERGY_PA ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%soil_energy & + ,'SOIL_MSTPOT_PA ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%soil_water & + ,'SOIL_WATER_PA ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%soil_tempk & + ,'SOIL_TEMPK_PA ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%soil_fracliq & + ,'SOIL_FRACLIQ_PA ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%rootdense & + ,'PATCH_ROOT_DENSITY ',dsetrank,iparallel,.true. ,foundvar) + if (writing_long) then + call hdf_getslab_r(csite%dmean_soil_energy & + ,'DMEAN_SOIL_ENERGY_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_soil_mstpot & + ,'DMEAN_SOIL_MSTPOT_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_soil_water & + ,'DMEAN_SOIL_WATER_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_soil_temp & + ,'DMEAN_SOIL_TEMP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_soil_fliq & + ,'DMEAN_SOIL_FLIQ_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_smoist_gg & + ,'DMEAN_SMOIST_GG_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_transloss & + ,'DMEAN_TRANSLOSS_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%dmean_sensible_gg & + ,'DMEAN_SENSIBLE_GG_PA ',dsetrank,iparallel,.false.,foundvar) + end if + if (writing_eorq) then + call hdf_getslab_r(csite%mmean_soil_energy & + ,'MMEAN_SOIL_ENERGY_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_soil_mstpot & + ,'MMEAN_SOIL_MSTPOT_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_soil_water & + ,'MMEAN_SOIL_WATER_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_soil_temp & + ,'MMEAN_SOIL_TEMP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_soil_fliq & + ,'MMEAN_SOIL_FLIQ_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_smoist_gg & + ,'MMEAN_SMOIST_GG_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_transloss & + ,'MMEAN_TRANSLOSS_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%mmean_sensible_gg & + ,'MMEAN_SENSIBLE_GG_PA ',dsetrank,iparallel,.false.,foundvar) + end if + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! - if (associated(cgrid%qmsqu_nirup )) & - call hdf_getslab_r(cgrid%qmsqu_nirup (:,ipy) ,'QMSQU_NIRUP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmsqu_rshortup )) & - call hdf_getslab_r(cgrid%qmsqu_rshortup (:,ipy) ,'QMSQU_RSHORTUP ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmsqu_rnet )) & - call hdf_getslab_r(cgrid%qmsqu_rnet (:,ipy) ,'QMSQU_RNET ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cgrid%qmsqu_albedo )) & - call hdf_getslab_r(cgrid%qmsqu_albedo (:,ipy) ,'QMSQU_ALBEDO ' & - ,dsetrank,iparallel,.false.,foundvar) - ! Variables with 2 dimensions (n_pft,npolygons) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! 2-D variables, dimensions: (n_pft,npatches). ! + !---------------------------------------------------------------------------------------! dsetrank = 2 globdims(1) = int(n_pft,8) chnkdims(1) = int(n_pft,8) - memdims(1) = int(n_pft,8) - memsize(1) = int(n_pft,8) - chnkoffs(1) = 0_8 - memoffs(1) = 0_8 - - globdims(2) = int(cgrid%npolygons_global,8) - chnkdims(2) = 1_8 - chnkoffs(2) = int(py_index - 1,8) - memdims(2) = 1_8 - memsize(2) = 1_8 - memoffs(2) = 0_8 - - if(associated(cgrid%bseeds_pft)) call hdf_getslab_r(cgrid%bseeds_pft(:,ipy) ,'BSEEDS_PFT ' , & - dsetrank,iparallel,.false.,foundvar) - if(associated(cgrid%lai_pft)) call hdf_getslab_r(cgrid%lai_pft(:,ipy) ,'LAI_PFT ' , & - dsetrank,iparallel,.false.,foundvar) - if(associated(cgrid%wai_pft)) call hdf_getslab_r(cgrid%wai_pft(:,ipy) ,'WAI_PFT ' , & - dsetrank,iparallel,.false.,foundvar) - if(associated(cgrid%mmean_lai_pft)) call hdf_getslab_r(cgrid%mmean_lai_pft(:,ipy) ,'MMEAN_LAI_PFT ' , & - dsetrank,iparallel,.false.,foundvar) - if(associated(cgrid%mmean_wai_pft)) call hdf_getslab_r(cgrid%mmean_wai_pft(:,ipy) ,'MMEAN_WAI_PFT ' , & - dsetrank,iparallel,.false.,foundvar) - if(associated(cgrid%agb_pft)) call hdf_getslab_r(cgrid%agb_pft(:,ipy) ,'AGB_PFT ' , & - dsetrank,iparallel,.false.,foundvar) - if(associated(cgrid%ba_pft)) call hdf_getslab_r(cgrid%ba_pft(:,ipy) ,'BA_PFT ' , & - dsetrank,iparallel,.false.,foundvar) - - - ! Variables with 2 dimensions (n_dbh,npolygons) - dsetrank = 2 - globdims(1) = int(n_dbh,8) - chnkdims(1) = int(n_dbh,8) - memdims(1) = int(n_dbh,8) - memsize(1) = int(n_dbh,8) + memdims (1) = int(n_pft,8) + memsize (1) = int(n_pft,8) chnkoffs(1) = 0_8 - memoffs(1) = 0_8 + memoffs (1) = 0_8 + globdims(2) = int(npatches_global,8) + chnkdims(2) = int(csite%npatches,8) + chnkoffs(2) = int(sipa_index - 1,8) + memdims (2) = int(csite%npatches,8) + memsize (2) = int(csite%npatches,8) + memoffs (2) = 0_8 + + call hdf_getslab_r(csite%repro & + ,'REPRO_PA ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%A_o_max & + ,'A_O_MAX ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(csite%A_c_max & + ,'A_C_MAX ',dsetrank,iparallel,.true. ,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! - globdims(2) = int(cgrid%npolygons_global,8) - chnkdims(2) = 1_8 - chnkoffs(2) = int(py_index - 1,8) - memdims(2) = 1_8 - memsize(2) = 1_8 - memoffs(2) = 0_8 - if(associated(cgrid%dmean_gpp_dbh)) call hdf_getslab_r(cgrid%dmean_gpp_dbh(:,ipy) , & - 'DMEAN_GPP_DBH ' ,dsetrank,iparallel,.false.,foundvar) - if(associated(cgrid%mmean_gpp_dbh)) call hdf_getslab_r(cgrid%mmean_gpp_dbh(:,ipy) , & - 'MMEAN_GPP_DBH ' ,dsetrank,iparallel,.false.,foundvar) - ! Variables with 2 dimensions (13,npolygons) - dsetrank = 2 - globdims(1) = int(13,8) - chnkdims(1) = int(13,8) - memdims(1) = int(13,8) - memsize(1) = int(13,8) - chnkoffs(1) = 0_8 - memoffs(1) = 0_8 - - globdims(2) = int(cgrid%npolygons_global,8) - chnkdims(2) = 1_8 - chnkoffs(2) = int(py_index - 1,8) - memdims(2) = 1_8 - memsize(2) = 1_8 - memoffs(2) = 0_8 - if(associated(cgrid%workload)) call hdf_getslab_r(cgrid%workload(:,ipy) , & - 'WORKLOAD ' ,dsetrank,iparallel,.true.,foundvar) - ! Variables with three dimensions(n_dist_types,n_dist_types,npolygons) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! 3-D variables, dimensions: (n_pft,ff_nhgt,npatches). ! + !---------------------------------------------------------------------------------------! dsetrank = 3 - globdims(1) = int(n_dist_types,8) - chnkdims(1) = int(n_dist_types,8) - memdims(1) = int(n_dist_types,8) - memsize(1) = int(n_dist_types,8) + globdims(1) = int(n_pft,8) + chnkdims(1) = int(n_pft,8) + memdims (1) = int(n_pft,8) + memsize (1) = int(n_pft,8) chnkoffs(1) = 0_8 - memoffs(1) = 0_8 - - globdims(2) = int(n_dist_types,8) - chnkdims(2) = int(n_dist_types,8) - memdims(2) = int(n_dist_types,8) - memsize(2) = int(n_dist_types,8) + memoffs (1) = 0_8 + globdims(2) = int(ff_nhgt,8) + chnkdims(2) = int(ff_nhgt,8) + memdims (2) = int(ff_nhgt,8) + memsize (2) = int(ff_nhgt,8) chnkoffs(2) = 0_8 - memoffs(2) = 0_8 + memoffs (2) = 0_8 + globdims(3) = int(npatches_global,8) + chnkdims(3) = int(csite%npatches ,8) + chnkoffs(3) = int(sipa_index - 1 ,8) + memdims (3) = int(csite%npatches ,8) + memsize (3) = int(csite%npatches ,8) + memoffs (3) = 0_8 + call hdf_getslab_r(csite%cumlai_profile & + ,'CUMLAI_PROFILE ',dsetrank,iparallel,.true. ,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + - globdims(3) = int(cgrid%npolygons_global,8) - chnkdims(3) = 1_8 - chnkoffs(3) = int(py_index - 1,8) - memdims(3) = 1_8 - memsize(3) = 1_8 - memoffs(3) = 0_8 - if (associated(cgrid%disturbance_rates)) & - call hdf_getslab_r(cgrid%disturbance_rates(:,:,ipy),'DISTURBANCE_RATES ' & - ,dsetrank,iparallel,.false.,foundvar) - ! Variables with three dimensions(nzg,ndcycle,npolygons) + + + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! 3-D variables, dimensions: (nzg,ndcycle,npatches). ! + !---------------------------------------------------------------------------------------! dsetrank = 3 globdims(1) = int(nzg,8) chnkdims(1) = int(nzg,8) - memdims(1) = int(nzg,8) - memsize(1) = int(nzg,8) + memdims (1) = int(nzg,8) + memsize (1) = int(nzg,8) chnkoffs(1) = 0_8 - memoffs(1) = 0_8 - + memoffs (1) = 0_8 globdims(2) = int(ndcycle,8) chnkdims(2) = int(ndcycle,8) - memdims(2) = int(ndcycle,8) - memsize(2) = int(ndcycle,8) + memdims (2) = int(ndcycle,8) + memsize (2) = int(ndcycle,8) chnkoffs(2) = 0_8 - memoffs(2) = 0_8 - - globdims(3) = int(cgrid%npolygons_global,8) - chnkdims(3) = 1_8 - chnkoffs(3) = int(py_index - 1,8) - memdims(3) = 1_8 - memsize(3) = 1_8 - memoffs(3) = 0_8 - - if(associated(cgrid%qmean_soil_temp)) & - call hdf_getslab_r(cgrid%qmean_soil_temp(:,:,ipy) ,'QMEAN_SOIL_TEMP ' ,& - dsetrank,iparallel,.false.,foundvar) - - if(associated(cgrid%qmean_soil_water)) & - call hdf_getslab_r(cgrid%qmean_soil_water(:,:,ipy) ,'QMEAN_SOIL_WATER ' ,& - dsetrank,iparallel,.false.,foundvar) - - if(associated(cgrid%qmean_soil_mstpot)) & - call hdf_getslab_r(cgrid%qmean_soil_mstpot(:,:,ipy),'QMEAN_SOIL_MSTPOT' ,& - dsetrank,iparallel,.false.,foundvar) - - - dsetrank = 3 - globdims(1) = int(n_pft,8) - chnkdims(1) = int(n_pft,8) - memdims(1) = int(n_pft,8) - memsize(1) = int(n_pft,8) - chnkoffs(1) = 0 - memoffs(1) = 0 - globdims(2) = int(n_dbh,8) - chnkdims(2) = int(n_dbh,8) - memdims(2) = int(n_dbh,8) - memsize(2) = int(n_dbh,8) - chnkoffs(2) = 0 - memoffs(2) = 0 + memoffs (2) = 0_8 + globdims(3) = int(npatches_global,8) + chnkdims(3) = int(csite%npatches ,8) + chnkoffs(3) = int(sipa_index - 1 ,8) + memdims (3) = int(csite%npatches ,8) + memsize (3) = int(csite%npatches ,8) + memoffs (3) = 0_8 + if (writing_dcyc) then + call hdf_getslab_r(csite%qmean_soil_energy & + ,'QMEAN_SOIL_ENERGY_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_soil_mstpot & + ,'QMEAN_SOIL_MSTPOT_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_soil_water & + ,'QMEAN_SOIL_WATER_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_soil_temp & + ,'QMEAN_SOIL_TEMP_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_soil_fliq & + ,'QMEAN_SOIL_FLIQ_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_smoist_gg & + ,'QMEAN_SMOIST_GG_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_transloss & + ,'QMEAN_TRANSLOSS_PA ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(csite%qmean_sensible_gg & + ,'QMEAN_SENSIBLE_GG_PA ',dsetrank,iparallel,.false.,foundvar) + end if + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! - globdims(3) = int(cgrid%npolygons_global,8) - chnkdims(3) = 1_8 - chnkoffs(3) = int(py_index - 1,8) - memdims(3) = 1_8 - memsize(3) = 1_8 - memoffs(3) = 0_8 - call hdf_getslab_r(cgrid%basal_area(:,:,ipy),'BASAL_AREA ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%agb (:,:,ipy),'AGB ' ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cgrid%pldens (:,:,ipy),'PLDENS ' ,dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%bseeds (:,:,ipy),'BSEEDS ' ,dsetrank,iparallel,.false.,foundvar) + !---------------------------------------------------------------------------------------! + ! Once upon a time, soil water was double precision, but after the Runge-Kutta ! + ! integrator was entirely converted to double precision, we reverted back to single and ! + ! converted everything just for the Runge-Kutta. Of course, nothing in life is certain ! + ! but death and taxes, so we kept the recipe on how to read a double precision if we ! + ! ever change our minds again. ! + ! ! + ! call h5dopen_f(file_id,'SOIL_WATER_PA ', dset_id, hdferr) ! + ! if (hdferr /= 0 ) then ! + ! call fatal_error('Dataset did not have soil water?' & ! + ! ,'fill_history_site','ed_init_full_history.F90') ! + ! endif ! + ! ! + !------ These lines are useful for determining data size of any given object in a set.--! + ! call h5dget_type_f(dset_id,datatype_id,hdferr) ! + ! call h5tget_size_f(datatype_id,setsize,hdferr) ! + ! call h5dclose_f(dset_id , hdferr) ! + ! ! + !------ Check precision. ---------------------------------------------------------------! + ! if (setsize==4_8) then ! Single precision ! + ! call hdf_getslab_r(csite%soil_water & ! + ! ,'SOIL_WATER_PA ',dsetrank,iparallel,.true.,foundvar) ! + ! else if (setsize==8_8) then ! Double precision ! + ! allocate(buff(nzg,csite%npatches)) ! + ! write (unit=*,fmt='(a)') '----------------------------------------------------' ! + ! write (unit=*,fmt='(a)') ' Load 8-byte precision, and convert to 4-byte' ! + ! write (unit=*,fmt='(a)') '----------------------------------------------------' ! + ! call hdf_getslab_d(buff,'SOIL_WATER_PA ',dsetrank,iparallel,.true.,foundvar) ! + ! csite%soil_water(1:nzg,1:csite%npatches) = sngl(buff(1:nzg,1:csite%npatches)) ! + ! deallocate(buff) ! + ! else ! + ! call fatal_error('Soil water dataset is not real nor double?' & ! + ! ,'fill_history_site','ed_init_full_history.F90') ! + ! end if ! + !---------------------------------------------------------------------------------------! return - end subroutine fill_history_grid - !=========================================================================================! - !=========================================================================================! - +end subroutine fill_history_site +!==========================================================================================! +!==========================================================================================! - !==========================================================================================! - !==========================================================================================! - subroutine fill_history_polygon(cpoly,pysi_index,nsites_global) - use ed_state_vars,only: polygontype +!==========================================================================================! +!==========================================================================================! +! This sub-routine loads all state variables and partial integrations at the cohort ! +! level. ! +!------------------------------------------------------------------------------------------! +subroutine fill_history_patch(cpatch,paco_index,ncohorts_global,green_leaf_factor) + use ed_state_vars , only : patchtype ! ! structure + use grid_coms , only : nzg & ! intent(in) + , nzs ! ! intent(in) + use ed_max_dims , only : n_pft & ! intent(in) + , n_mort & ! intent(in) + , max_site & ! intent(in) + , n_dist_types ! ! intent(in) use hdf5 - use hdf5_coms,only:file_id,dset_id,dspace_id,plist_id, & - globdims,chnkdims,chnkoffs,cnt,stride, & - memdims,memoffs,memsize - - use grid_coms,only : nzg - use ed_max_dims,only : n_pft,n_dbh,n_dist_types - + use hdf5_coms , only : file_id & ! intent(inout) + , dset_id & ! intent(inout) + , dspace_id & ! intent(inout) + , plist_id & ! intent(inout) + , globdims & ! intent(inout) + , chnkdims & ! intent(inout) + , chnkoffs & ! intent(inout) + , cnt & ! intent(inout) + , stride & ! intent(inout) + , memdims & ! intent(inout) + , memoffs & ! intent(inout) + , memsize & ! intent(inout) + , datatype_id & ! intent(inout) + , setsize ! ! intent(inout) + use ed_misc_coms , only : ndcycle & ! intent(in) + , writing_long & ! intent(in) + , writing_eorq & ! intent(in) + , writing_dcyc ! ! intent(in) + use fusion_fission_coms, only : ff_nhgt ! ! intent(in) + use allometry , only : dbh2ca ! ! function implicit none - + !----- Interfaces. ---------------------------------------------------------------------! #if USE_INTERF - interface - subroutine hdf_getslab_r(buff,varn,dsetrank,iparallel,required,foundvar) - use hdf5_coms,only:memsize - real,dimension(memsize(1),memsize(2),memsize(3),memsize(4)) :: buff - integer :: dsetrank,iparallel - character(len=*),intent(in) :: varn - logical,intent(in) :: required - logical,intent(out) :: foundvar - end subroutine hdf_getslab_r - subroutine hdf_getslab_d(buff,varn,dsetrank,iparallel,required,foundvar) - use hdf5_coms,only:memsize - real(kind=8),dimension(memsize(1),memsize(2),memsize(3),memsize(4)) :: buff - integer :: dsetrank,iparallel - character(len=*),intent(in) :: varn - logical,intent(in) :: required - logical,intent(out) :: foundvar - end subroutine hdf_getslab_d - subroutine hdf_getslab_i(buff,varn,dsetrank,iparallel,required,foundvar) - use hdf5_coms,only:memsize - integer,dimension(memsize(1),memsize(2),memsize(3),memsize(4)) :: buff - integer :: dsetrank,iparallel - character(len=*),intent(in) :: varn - logical,intent(in) :: required - logical,intent(out) :: foundvar - end subroutine hdf_getslab_i - end interface + interface + subroutine hdf_getslab_r(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + real(kind=4) , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_r + !------------------------------------------------------------------------------------! + subroutine hdf_getslab_d(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + real(kind=8) , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_d + !------------------------------------------------------------------------------------! + subroutine hdf_getslab_i(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + integer , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_i + !------------------------------------------------------------------------------------! + end interface #endif + !---------------------------------------------------------------------------------------! - type(polygontype),target :: cpoly - integer,intent(in) :: pysi_index - integer,intent(in) :: nsites_global - integer :: iparallel - integer :: dsetrank - logical :: foundvar - - iparallel = 0 - - dsetrank = 1_8 - globdims = 0_8 - chnkdims = 0_8 - chnkoffs = 0_8 - memoffs = 0_8 - memdims = 0_8 - memsize = 1_8 - - globdims(1) = int(nsites_global,8) - chnkdims(1) = int(cpoly%nsites,8) - chnkoffs(1) = int(pysi_index - 1,8) - memdims(1) = int(cpoly%nsites,8) - memsize(1) = int(cpoly%nsites,8) - memoffs(1) = 0_8 - - call hdf_getslab_i(cpoly%patch_count,'PATCH_COUNT ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_i(cpoly%sitenum,'SITENUM ',dsetrank,iparallel,.true.,foundvar) - - call hdf_getslab_i(cpoly%lsl,'LSL_SI ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_i(cpoly%ncol_soil,'NCOL_SOIL_SI ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%area,'AREA_SI ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%patch_area,'PATCH_AREA ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%elevation,'ELEVATION ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%slope,'SLOPE ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%aspect,'ASPECT ',dsetrank,iparallel,.true.,foundvar) - - call hdf_getslab_i(cpoly%num_landuse_years,'NUM_LANDUSE_YEARS ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%TCI,'TCI ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%pptweight,'pptweight ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_i(cpoly%hydro_next,'HYDRO_NEXT ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_i(cpoly%hydro_prev,'HYDRO_PREV ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%moist_W,'MOIST_W ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%moist_f,'MOIST_F ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%moist_tau,'MOIST_TAU ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%moist_zi,'MOIST_ZI ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%baseflow,'BASEFLOW_SI ',dsetrank,iparallel,.true.,foundvar) -! call hdf_getslab_i(cpoly%metplex_beg_month,'METPLEX_BEG_MONTH ',dsetrank,iparallel,.true.,foundvar) -! call hdf_getslab_i(cpoly%metplex_beg_year,'METPLEX_BEG_YEAR ',dsetrank,iparallel,.true.,foundvar) -! call hdf_getslab_i(cpoly%metplex_end_year,'METPLEX_END_YEAR ',dsetrank,iparallel,.true.,foundvar) - - call hdf_getslab_r(cpoly%min_monthly_temp,'MIN_MONTHLY_TEMP ',dsetrank,iparallel,.true.,foundvar) -! call hdf_getslab_r(cpoly%removed_biomass,'REMOVED_BIOMASS ',dsetrank,iparallel,.true.,foundvar) -! call hdf_getslab_r(cpoly%harvested_biomass,'HARVESTED_BIOMASS ', & -! dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%rad_avg,'RAD_AVG ',dsetrank,iparallel,.true.,foundvar) - - call hdf_getslab_i(cpoly%plantation,'PLANTATION_SI ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_i(cpoly%agri_stocking_pft,'AGRI_STOCKING_PFT ', & - dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%agri_stocking_density,'AGRI_STOCKING_DENSITY ', & - dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_i(cpoly%plantation_stocking_pft,'PLANTATION_STOCKING_PFT ', & - dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%plantation_stocking_density,'PLANTATION_STOCKING_DENSITY ', & - dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%primary_harvest_memory,'PRIMARY_HARVEST_MEMORY ', & - dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%secondary_harvest_memory,'SECONDARY_HARVEST_MEMORY ', & - dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%fire_disturbance_rate,'FIRE_DISTURBANCE_RATE ', & - dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%ignition_rate,'IGNITION_RATE ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%nat_disturbance_rate,'NAT_DISTURBANCE_RATE ', & - dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_i(cpoly%nat_dist_type,'NAT_DIST_TYPE ',dsetrank,iparallel,.true.,foundvar) - - - if (associated(cpoly%dmean_co2_residual)) & - call hdf_getslab_r(cpoly%dmean_co2_residual , 'DMEAN_CO2_RESIDUAL_SI ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cpoly%dmean_water_residual)) & - call hdf_getslab_r(cpoly%dmean_water_residual , 'DMEAN_WATER_RESIDUAL_SI ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cpoly%dmean_energy_residual)) & - call hdf_getslab_r(cpoly%dmean_energy_residual, 'DMEAN_ENERGY_RESIDUAL_SI ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cpoly%mmean_co2_residual)) & - call hdf_getslab_r(cpoly%mmean_co2_residual , 'MMEAN_CO2_RESIDUAL_SI ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cpoly%mmean_water_residual)) & - call hdf_getslab_r(cpoly%mmean_water_residual , 'MMEAN_WATER_RESIDUAL_SI ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(cpoly%mmean_energy_residual)) & - call hdf_getslab_r(cpoly%mmean_energy_residual, 'MMEAN_ENERGY_RESIDUAL_SI ' & - ,dsetrank,iparallel,.false.,foundvar) - - dsetrank = 2_8 - globdims(1) = int(n_pft,8) - chnkdims(1) = int(n_pft,8) - memdims(1) = int(n_pft,8) - memsize(1) = int(n_pft,8) - chnkoffs(1) = 0_8 - memoffs(1) = 0_8 - globdims(2) = int(nsites_global,8) - chnkdims(2) = int(cpoly%nsites,8) - chnkoffs(2) = int(pysi_index - 1,8) - memdims(2) = int(cpoly%nsites,8) - memsize(2) = int(cpoly%nsites,8) - memoffs(2) = 0_8 - - if (associated(cpoly%lai_pft)) call hdf_getslab_r(cpoly%lai_pft,'LAI_PFT_SI ', & - dsetrank,iparallel,.false.,foundvar) - if (associated(cpoly%wai_pft)) call hdf_getslab_r(cpoly%wai_pft,'WAI_PFT_SI ', & - dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cpoly%green_leaf_factor,'GREEN_LEAF_FACTOR ', & - dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%leaf_aging_factor,'LEAF_AGING_FACTOR ', & - dsetrank,iparallel,.true.,foundvar) - - dsetrank = 2_8 - globdims(1) = int(nzg,8) - chnkdims(1) = int(nzg,8) - memdims(1) = int(nzg,8) - memsize(1) = int(nzg,8) - chnkoffs(1) = 0_8 - memoffs(1) = 0_8 - globdims(2) = int(nsites_global,8) - chnkdims(2) = int(cpoly%nsites,8) - chnkoffs(2) = int(pysi_index - 1,8) - memdims(2) = int(cpoly%nsites,8) - memsize(2) = int(cpoly%nsites,8) - memoffs(2) = 0_8 + !----- Arguments. ----------------------------------------------------------------------! + type(patchtype) , target :: cpatch + integer , intent(in) :: paco_index + integer , intent(in) :: ncohorts_global + real , dimension(n_pft), intent(in) :: green_leaf_factor + !----- Local variables. ----------------------------------------------------------------! + integer :: iparallel + integer :: dsetrank + integer :: hdferr + logical :: foundvar + integer :: ico + integer :: ipft + !---------------------------------------------------------------------------------------! - call hdf_getslab_i(cpoly%ntext_soil,'NTEXT_SOIL_SI ',dsetrank,iparallel,.true.,foundvar) - dsetrank = 2_8 - globdims(1) = 12_8 - chnkdims(1) = 12_8 - memdims(1) = 12_8 - memsize(1) = 12_8 - chnkoffs(1) = 0_8 - memoffs(1) = 0_8 - globdims(2) = int(nsites_global,8) - chnkdims(2) = int(cpoly%nsites,8) - chnkoffs(2) = int(pysi_index - 1,8) - memdims(2) = int(cpoly%nsites,8) - memsize(2) = int(cpoly%nsites,8) - memoffs(2) = 0_8 - - call hdf_getslab_r(cpoly%lambda_fire ,'LAMBDA_FIRE ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%avg_monthly_pcpg,'AVG_MONTHLY_PCPG ' & - ,dsetrank,iparallel,.true.,foundvar) - - dsetrank = 3_8 - globdims(1:2) = int(n_dist_types,8) - chnkdims(1:2) = int(n_dist_types,8) - memdims(1:2) = int(n_dist_types,8) - memsize(1:2) = int(n_dist_types,8) - chnkoffs(1:2) = 0 - memoffs(1:2) = 0 - globdims(3) = int(nsites_global,8) - chnkdims(3) = int(cpoly%nsites,8) - chnkoffs(3) = int(pysi_index - 1,8) - memdims(3) = int(cpoly%nsites,8) - memsize(3) = int(cpoly%nsites,8) - memoffs(3) = 0 - - call hdf_getslab_r(cpoly%disturbance_memory,'DISTURBANCE_MEMORY ', & - dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%disturbance_rates,'DISTURBANCE_RATES_SI ', & - dsetrank,iparallel,.true.,foundvar) + !---------------------------------------------------------------------------------------! + ! If this patch is empty, we don't need to do anything (actually the less we do the ! + ! better, we don't want to add segmentation violations in our beloved model!). ! + !---------------------------------------------------------------------------------------! + if (cpatch%ncohorts == 0) return + !---------------------------------------------------------------------------------------! - dsetrank = 3 - globdims(3) = int(nsites_global,8) - chnkdims(3) = int(cpoly%nsites,8) - chnkoffs(3) = int(pysi_index - 1,8) - memdims(3) = int(cpoly%nsites,8) - memsize(3) = int(cpoly%nsites,8) - memoffs(3) = 0 - globdims(2) = int(n_dbh,8) - chnkdims(2) = int(n_dbh,8) - memdims(2) = int(n_dbh,8) - memsize(2) = int(n_dbh,8) - chnkoffs(2) = 0 - memoffs(2) = 0 - globdims(1) = int(n_pft,8) - chnkdims(1) = int(n_pft,8) - memdims(1) = int(n_pft,8) - memsize(1) = int(n_pft,8) - chnkoffs(1) = 0 - memoffs(1) = 0 - - call hdf_getslab_r(cpoly%basal_area,'BASAL_AREA_SI ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%agb,'AGB_SI ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%bseeds,'BSEEDS_SI ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cpoly%pldens,'PLDENS_SI ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cpoly%basal_area_growth,'BASAL_AREA_GROWTH ', & - dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%agb_growth,'AGB_GROWTH ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%basal_area_mort,'BASAL_AREA_MORT ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%basal_area_cut,'BASAL_AREA_CUT ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%agb_mort,'AGB_MORT ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpoly%agb_cut,'AGB_CUT ',dsetrank,iparallel,.true.,foundvar) + !----- Turn off parallel for this sub-routine. -----------------------------------------! + iparallel = 0 + !---------------------------------------------------------------------------------------! + + !---------------------------------------------------------------------------------------! + ! Reset the dimension arrays. ! + !---------------------------------------------------------------------------------------! + globdims(:) = 0_8 + chnkdims(:) = 0_8 + chnkoffs(:) = 0_8 + memoffs (:) = 0_8 + memdims (:) = 0_8 + memsize (:) = 1_8 + !---------------------------------------------------------------------------------------! - return - end subroutine fill_history_polygon - !==========================================================================================! - !==========================================================================================! + !---------------------------------------------------------------------------------------! + ! For the remainder of this sub-routine, we must load the polygon variables ! + ! according to the dimensionality. If you are adding a new variable, make sure that it ! + ! is placed together with variables of the same dimensions. ! + ! ! + ! DSETRANK -- the rank of the variable. ! + ! GLOBDIMS -- the size of each dimension ! + ! CHNKDIMS -- the size of the chunk to be read this time ! + ! CHNKOFFS -- the offset (number of indices to be skipped) ! + ! MEMDIMS -- the dimensions of the buffer to be filled. ! + ! MEMOFFS -- the offset of the memory ! + ! MEMSIZE -- the size of variable that will house the information read. ! + !---------------------------------------------------------------------------------------! - !==========================================================================================! - !==========================================================================================! - subroutine fill_history_site(csite,sipa_index,npatches_global) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! Single dimension variables - Integers. ! + !---------------------------------------------------------------------------------------! + dsetrank = 1 + globdims(1) = int(ncohorts_global,8) + chnkdims(1) = int(cpatch%ncohorts,8) + chnkoffs(1) = int(paco_index - 1 ,8) + memdims (1) = int(cpatch%ncohorts,8) + memsize (1) = int(cpatch%ncohorts,8) + memoffs (1) = 0_8 + call hdf_getslab_i(cpatch%pft & + ,'PFT ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_i(cpatch%phenology_status & + ,'PHENOLOGY_STATUS ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_i(cpatch%recruit_dbh & + ,'RECRUIT_DBH ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_i(cpatch%census_status & + ,'CENSUS_STATUS ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_i(cpatch%krdepth & + ,'KRDEPTH ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_i(cpatch%first_census & + ,'FIRST_CENSUS ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_i(cpatch%new_recruit_flag & + ,'NEW_RECRUIT_FLAG ',dsetrank,iparallel,.true. ,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + - use ed_state_vars,only: sitetype - use grid_coms,only : nzg,nzs - use ed_max_dims,only : n_pft,n_dbh - use hdf5_coms,only:file_id,dset_id,dspace_id,plist_id, & - globdims,chnkdims,chnkoffs,cnt,stride, & - memdims,memoffs,memsize,datatype_id,setsize - use fusion_fission_coms, only: ff_nhgt - use ed_misc_coms, only : ndcycle - use hdf5 - implicit none -#if USE_INTERF - interface - subroutine hdf_getslab_r(buff,varn,dsetrank,iparallel,required,foundvar) - use hdf5_coms,only:memsize - real,dimension(memsize(1),memsize(2),memsize(3),memsize(4)) :: buff - integer :: dsetrank,iparallel - character(len=*),intent(in) :: varn - logical,intent(in) :: required - logical,intent(out) :: foundvar - end subroutine hdf_getslab_r - subroutine hdf_getslab_d(buff,varn,dsetrank,iparallel,required,foundvar) - use hdf5_coms,only:memsize - real(kind=8),dimension(memsize(1),memsize(2),memsize(3),memsize(4)) :: buff - integer :: dsetrank,iparallel - character(len=*),intent(in) :: varn - logical,intent(in) :: required - logical,intent(out) :: foundvar - end subroutine hdf_getslab_d - subroutine hdf_getslab_i(buff,varn,dsetrank,iparallel,required,foundvar) - use hdf5_coms,only:memsize - integer,dimension(memsize(1),memsize(2),memsize(3),memsize(4)) :: buff - integer :: dsetrank,iparallel - character(len=*),intent(in) :: varn - logical,intent(in) :: required - logical,intent(out) :: foundvar - end subroutine hdf_getslab_i - end interface -#endif - - type(sitetype),target :: csite - integer,intent(in) :: sipa_index - integer,intent(in) :: npatches_global - integer :: iparallel - integer :: dsetrank - integer :: hdferr - integer :: ipa,ipft - real(kind=8),allocatable, dimension(:,:) :: buff - logical :: foundvar - - iparallel = 0 + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! Single dimension variables - Real. ! + !---------------------------------------------------------------------------------------! dsetrank = 1 - globdims = 0 - chnkdims = 0 - chnkoffs = 0 - memoffs = 0 - memdims = 0 - memsize = 1 - - ! These are the dimensions in the filespace - ! itself. Global is the size of the dataset, - ! chnkoffs is the offset of the chunk we - ! are going to read. Chnkdims is the size - ! of the slab that is to be read. - - globdims(1) = int(npatches_global,8) - chnkdims(1) = int(csite%npatches,8) - chnkoffs(1) = int(sipa_index - 1,8) - - memdims(1) = int(csite%npatches,8) - memsize(1) = int(csite%npatches,8) - memoffs(1) = 0 - - call hdf_getslab_i(csite%dist_type,'DIST_TYPE ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%age,'AGE ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%area,'AREA ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%fast_soil_C,'FAST_SOIL_C ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%slow_soil_C,'SLOW_SOIL_C ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%structural_soil_C,'STRUCTURAL_SOIL_C ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%structural_soil_L,'STRUCTURAL_SOIL_L ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%mineralized_soil_N,'MINERALIZED_SOIL_N ', & - dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%fast_soil_N,'FAST_SOIL_N ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%sum_dgd,'SUM_DGD ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%sum_chd,'SUM_CHD ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_i(csite%plantation,'PLANTATION ',dsetrank,iparallel,.true.,foundvar) - ! call hdf_getslab_i(csite%cohort_count,'COHORT_COUNT ',dsetrank,iparallel) - call hdf_getslab_r(csite%can_theiv,'CAN_THEIV ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%can_vpdef,'CAN_VPDEF ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%can_prss,'CAN_PRSS ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%can_theta,'CAN_THETA ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%can_temp,'CAN_TEMP ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%can_temp_pv,'CAN_TEMP_PV ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(csite%can_shv,'CAN_SHV ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%can_co2,'CAN_CO2 ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%can_rhos,'CAN_RHOS ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%can_depth,'CAN_DEPTH ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%ggbare,'GGBARE ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(csite%ggveg,'GGVEG ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(csite%ggnet,'GGNET ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(csite%ggsoil,'GGSOIL ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(csite%opencan_frac,'OPENCAN_FRAC ',dsetrank,iparallel,.false.,foundvar) - ! call hdf_getslab_i(csite%pname,'PNAME ',dsetrank,iparallel) - call hdf_getslab_r(csite%lai,'LAI_PA ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%wai,'WAI_PA ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_i(csite%nlev_sfcwater,'NLEV_SFCWATER ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%ground_shv ,'GROUND_SHV ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(csite%ground_ssh ,'GROUND_SSH ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(csite%ground_temp,'GROUND_TEMP ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(csite%ground_fliq,'GROUND_FLIQ ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(csite%rough,'ROUGH ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%avg_daily_temp,'AVG_DAILY_TEMP ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%avg_monthly_gndwater,'AVG_MONTHLY_GNDWATER ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%avg_monthly_waterdef,'AVG_MONTHLY_WATERDEF ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%mean_rh,'MEAN_RH ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%mean_cwd_rh,'MEAN_CWD_RH ',dsetrank,iparallel,.true.,foundvar) - - if (associated(csite%dmean_rh )) & - call hdf_getslab_r(csite%dmean_rh,'DMEAN_RH_PA ',dsetrank,iparallel,.false.,foundvar) - if (associated(csite%mmean_rh )) & - call hdf_getslab_r(csite%mmean_rh,'MMEAN_RH_PA ',dsetrank,iparallel,.false.,foundvar) - if (associated(csite%dmean_cwd_rh )) & - call hdf_getslab_r(csite%dmean_cwd_rh,'DMEAN_CWD_RH_PA ',dsetrank,iparallel,.false.,foundvar) - if (associated(csite%mmean_cwd_rh )) & - call hdf_getslab_r(csite%mmean_cwd_rh,'MMEAN_CWD_RH_PA ',dsetrank,iparallel,.false.,foundvar) - - if (associated(csite%dmean_albedo )) & - call hdf_getslab_r(csite%dmean_albedo,'DMEAN_ALBEDO_PA ',dsetrank,iparallel,.false.,foundvar) - if (associated(csite%dmean_albedo_beam )) & - call hdf_getslab_r(csite%dmean_albedo_beam,'DMEAN_ALBEDO_BEAM_PA ',dsetrank,iparallel,.false.,foundvar) - if (associated(csite%dmean_albedo_diffuse )) & - call hdf_getslab_r(csite%dmean_albedo_diffuse,'DMEAN_ALBEDO_DIFFUSE_PA ',dsetrank,iparallel,.false.,foundvar) - - if (associated(csite%mmean_albedo )) & - call hdf_getslab_r(csite%mmean_albedo,'MMEAN_ALBEDO_PA ',dsetrank,iparallel,.false.,foundvar) - if (associated(csite%mmean_albedo_beam )) & - call hdf_getslab_r(csite%mmean_albedo_beam,'MMEAN_ALBEDO_BEAM_PA ',dsetrank,iparallel,.false.,foundvar) - if (associated(csite%mmean_albedo_diffuse )) & - call hdf_getslab_r(csite%mmean_albedo_diffuse,'MMEAN_ALBEDO_DIFFUSE_PA ',dsetrank,iparallel,.false.,foundvar) - - call hdf_getslab_r(csite%mean_nep,'MEAN_NEP ',dsetrank,iparallel,.true.,foundvar) - - call hdf_getslab_r(csite%wbudget_loss2atm,'WBUDGET_LOSS2ATM ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%wbudget_denseffect,'WBUDGET_DENSEFFECT ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%wbudget_precipgain,'WBUDGET_PRECIPGAIN ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%wbudget_loss2runoff,'WBUDGET_LOSS2RUNOFF ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%wbudget_initialstorage,'WBUDGET_INITIALSTORAGE ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%ebudget_loss2atm,'EBUDGET_LOSS2ATM ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%ebudget_denseffect,'EBUDGET_DENSEFFECT ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%ebudget_prsseffect,'EBUDGET_PRSSEFFECT ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(csite%ebudget_loss2runoff,'EBUDGET_LOSS2RUNOFF ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%ebudget_netrad,'EBUDGET_NETRAD ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%ebudget_precipgain,'EBUDGET_PRECIPGAIN ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%ebudget_initialstorage,'EBUDGET_INITIALSTORAGE ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%co2budget_initialstorage,'CO2BUDGET_INITIALSTORAGE ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%co2budget_loss2atm,'CO2BUDGET_LOSS2ATM ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%co2budget_denseffect,'CO2BUDGET_DENSEFFECT ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%co2budget_gpp,'CO2BUDGET_GPP ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%co2budget_plresp,'CO2BUDGET_PLRESP ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%co2budget_rh,'CO2BUDGET_RH ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%today_A_decomp,'TODAY_A_DECOMP ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%today_Af_decomp,'TODAY_AF_DECOMP ',dsetrank,iparallel,.true.,foundvar) - if (associated(csite%dmean_A_decomp )) & - call hdf_getslab_r(csite%dmean_A_decomp,'DMEAN_A_DECOMP ',dsetrank,iparallel,.false.,foundvar) - if (associated(csite%dmean_Af_decomp )) & - call hdf_getslab_r(csite%dmean_Af_decomp,'DMEAN_AF_DECOMP ',dsetrank,iparallel,.false.,foundvar) - if (associated(csite%mmean_A_decomp )) & - call hdf_getslab_r(csite%mmean_A_decomp,'MMEAN_A_DECOMP ',dsetrank,iparallel,.false.,foundvar) - if (associated(csite%mmean_Af_decomp )) & - call hdf_getslab_r(csite%mmean_Af_decomp,'MMEAN_AF_DECOMP ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(csite%veg_rough,'VEG_ROUGH ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%veg_height ,'VEG_HEIGHT ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%veg_displace ,'VEG_DISPLACE ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(csite%fsc_in,'FSC_IN ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%ssc_in,'SSC_IN ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%ssl_in,'SSL_IN ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%fsn_in,'FSN_IN ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%total_plant_nitrogen_uptake,'TOTAL_PLANT_NITROGEN_UPTAKE ',dsetrank,iparallel,.true.,foundvar) - - call hdf_getslab_r(csite%rshort_g,'RSHORT_G ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%rshort_g_beam,'RSHORT_G_BEAM ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%rshort_g_diffuse,'RSHORT_G_DIFFUSE ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%par_g,'PAR_G ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%par_g_beam,'PAR_G_BEAM ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%par_g_diffuse,'PAR_G_DIFFUSE ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%par_b,'PAR_B ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%par_b_beam,'PAR_B_BEAM ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%par_b_diffuse,'PAR_B_DIFFUSE ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%nir_b,'NIR_B ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%nir_b_beam,'NIR_B_BEAM ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%nir_b_diffuse,'NIR_B_DIFFUSE ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%rlong_g,'RLONG_G ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%rlong_g_surf,'RLONG_G_SURF ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%rlong_g_incid,'RLONG_G_INCID ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%rlong_s,'RLONG_S ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%rlong_s_surf,'RLONG_S_SURF ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%rlong_s_incid,'RLONG_S_INCID ',dsetrank,iparallel,.true.,foundvar) - - call hdf_getslab_r(csite%albedo,'ALBEDO ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%albedo_beam,'ALBEDO_BEAM ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%albedo_diffuse,'ALBEDO_DIFFUSE ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%rlong_albedo,'RLONG_ALBEDO ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%rlongup,'RLONGUP ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%parup,'PARUP ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(csite%nirup,'NIRUP ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(csite%rshortup,'RSHORTUP ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(csite%rnet,'RNET ',dsetrank,iparallel,.false.,foundvar) - - call hdf_getslab_r(csite%total_sfcw_depth,'TOTAL_SFCW_DEPTH ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(csite%snowfac,'SNOWFAC ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%A_decomp,'A_DECOMP ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%f_decomp,'F_DECOMP ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%rh,'RH ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%cwd_rh,'CWD_RH ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%plant_ag_biomass,'PLANT_AG_BIOMASS ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%htry,'HTRY ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%hprev,'HPREV ',dsetrank,iparallel,.false.,foundvar) - - if(csite%hprev(1) < 1.0d-10)then - csite%hprev=csite%htry + globdims(1) = int(ncohorts_global,8) + chnkdims(1) = int(cpatch%ncohorts,8) + chnkoffs(1) = int(paco_index - 1 ,8) + memdims (1) = int(cpatch%ncohorts,8) + memsize (1) = int(cpatch%ncohorts,8) + memoffs (1) = 0_8 + call hdf_getslab_r(cpatch%nplant & + ,'NPLANT ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%hite & + ,'HITE ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%agb & + ,'AGB_CO ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%basarea & + ,'BA_CO ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%dagb_dt & + ,'DAGB_DT ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%dlnagb_dt & + ,'DLNAGB_DT ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%dba_dt & + ,'DBA_DT ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%dlnba_dt & + ,'DLNBA_DT ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%ddbh_dt & + ,'DDBH_DT ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%dlndbh_dt & + ,'DLNDBH_DT ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%dbh & + ,'DBH ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%bdead & + ,'BDEAD ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%bleaf & + ,'BLEAF ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%balive & + ,'BALIVE ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%broot & + ,'BROOT ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%bsapwooda & + ,'BSAPWOODA ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%bsapwoodb & + ,'BSAPWOODB ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%bstorage & + ,'BSTORAGE ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%bseeds & + ,'BSEEDS ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%lai & + ,'LAI_CO ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%wai & + ,'WAI_CO ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%crown_area & + ,'CROWN_AREA_CO ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%cbr_bar & + ,'CBR_BAR ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%leaf_energy & + ,'LEAF_ENERGY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%leaf_temp & + ,'LEAF_TEMP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%leaf_vpdef & + ,'LEAF_VPDEF ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%leaf_temp_pv & + ,'LEAF_TEMP_PV ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%leaf_hcap & + ,'LEAF_HCAP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%leaf_fliq & + ,'LEAF_FLIQ ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%leaf_water & + ,'LEAF_WATER ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%wood_energy & + ,'WOOD_ENERGY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%wood_temp & + ,'WOOD_TEMP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%wood_temp_pv & + ,'WOOD_TEMP_PV ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%wood_hcap & + ,'WOOD_HCAP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%wood_fliq & + ,'WOOD_FLIQ ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%wood_water & + ,'WOOD_WATER ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%veg_wind & + ,'VEG_WIND ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%lsfc_shv_open & + ,'LSFC_SHV_OPEN ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%lsfc_shv_closed & + ,'LSFC_SHV_CLOSED ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%lsfc_co2_open & + ,'LSFC_CO2_OPEN ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%lsfc_co2_closed & + ,'LSFC_CO2_CLOSED ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%lint_shv & + ,'LINT_SHV ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%lint_co2_open & + ,'LINT_CO2_OPEN ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%lint_co2_closed & + ,'LINT_CO2_CLOSED ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%today_leaf_resp & + ,'TODAY_LEAF_RESP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%today_root_resp & + ,'TODAY_ROOT_RESP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%today_gpp & + ,'TODAY_GPP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%today_gpp_pot & + ,'TODAY_GPP_POT ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%today_gpp_lightmax & + ,'TODAY_GPP_LIGHTMAX ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%today_gpp_moistmax & + ,'TODAY_GPP_MOISTMAX ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%today_nppleaf & + ,'TODAY_NPPLEAF ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%today_nppfroot & + ,'TODAY_NPPFROOT ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%today_nppsapwood & + ,'TODAY_NPPSAPWOOD ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%today_nppcroot & + ,'TODAY_NPPCROOT ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%today_nppseeds & + ,'TODAY_NPPSEEDS ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%today_nppwood & + ,'TODAY_NPPWOOD ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%today_nppdaily & + ,'TODAY_NPPDAILY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%growth_respiration & + ,'GROWTH_RESPIRATION ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%storage_respiration & + ,'STORAGE_RESPIRATION ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%vleaf_respiration & + ,'VLEAF_RESPIRATION ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%monthly_dndt & + ,'MONTHLY_DNDT ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%monthly_dlnndt & + ,'MONTHLY_DLNNDT ',dsetrank,iparallel,.true. ,foundvar) + + call hdf_getslab_r(cpatch%light_level & + ,'LIGHT_LEVEL ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%light_level_beam & + ,'LIGHT_LEVEL_BEAM ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%light_level_diff & + ,'LIGHT_LEVEL_DIFF ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%par_l & + ,'PAR_L ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%par_l_beam & + ,'PAR_L_BEAM ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%par_l_diffuse & + ,'PAR_L_DIFFUSE ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%rshort_l & + ,'RSHORT_L ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%rshort_l_beam & + ,'RSHORT_L_BEAM ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%rshort_l_diffuse & + ,'RSHORT_L_DIFFUSE ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%rlong_l & + ,'RLONG_L ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%rlong_l_surf & + ,'RLONG_L_SURF ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%rlong_l_incid & + ,'RLONG_L_INCID ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%rshort_w & + ,'RSHORT_W ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%rshort_w_beam & + ,'RSHORT_W_BEAM ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%rshort_w_diffuse & + ,'RSHORT_W_DIFFUSE ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%rlong_w & + ,'RLONG_W ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%rlong_w_surf & + ,'RLONG_W_SURF ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%rlong_w_incid & + ,'RLONG_W_INCID ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%leaf_gbh & + ,'LEAF_GBH ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%leaf_gbw & + ,'LEAF_GBW ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%wood_gbh & + ,'WOOD_GBH ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%wood_gbw & + ,'WOOD_GBW ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%A_open & + ,'A_OPEN ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%A_closed & + ,'A_CLOSED ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%psi_open & + ,'PSI_OPEN ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%psi_closed & + ,'PSI_CLOSED ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%gsw_open & + ,'GSW_OPEN ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%gsw_closed & + ,'GSW_CLOSED ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%leaf_gsw & + ,'LEAF_GSW ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%fsw & + ,'FSW ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%fsn & + ,'FSN ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%fs_open & + ,'FS_OPEN ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%water_supply & + ,'WATER_SUPPLY ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%leaf_maintenance & + ,'LEAF_MAINTENANCE ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%root_maintenance & + ,'ROOT_MAINTENANCE ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%leaf_drop & + ,'LEAF_DROP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%leaf_respiration & + ,'LEAF_RESPIRATION ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%root_respiration & + ,'ROOT_RESPIRATION ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%gpp & + ,'GPP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%paw_avg & + ,'PAW_AVG ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%elongf & + ,'ELONGF ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%turnover_amp & + ,'TURNOVER_AMP ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%llspan & + ,'LLSPAN ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%vm_bar & + ,'VM_BAR ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%sla & + ,'SLA ',dsetrank,iparallel,.true. ,foundvar) + !----- Daily means. --------------------------------------------------------------------! + if (writing_long) then + call hdf_getslab_r(cpatch%dmean_nppleaf & + ,'DMEAN_NPPLEAF_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_nppfroot & + ,'DMEAN_NPPFROOT_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_nppsapwood & + ,'DMEAN_NPPSAPWOOD_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_nppcroot & + ,'DMEAN_NPPCROOT_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_nppseeds & + ,'DMEAN_NPPSEEDS_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_nppwood & + ,'DMEAN_NPPWOOD_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_nppdaily & + ,'DMEAN_NPPDAILY_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_gpp & + ,'DMEAN_GPP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_npp & + ,'DMEAN_NPP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_leaf_resp & + ,'DMEAN_LEAF_RESP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_root_resp & + ,'DMEAN_ROOT_RESP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_growth_resp & + ,'DMEAN_GROWTH_RESP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_storage_resp & + ,'DMEAN_STORAGE_RESP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_vleaf_resp & + ,'DMEAN_VLEAF_RESP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_plresp & + ,'DMEAN_PLRESP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_leaf_energy & + ,'DMEAN_LEAF_ENERGY_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_leaf_water & + ,'DMEAN_LEAF_WATER_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_leaf_hcap & + ,'DMEAN_LEAF_HCAP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_leaf_vpdef & + ,'DMEAN_LEAF_VPDEF_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_leaf_temp & + ,'DMEAN_LEAF_TEMP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_leaf_fliq & + ,'DMEAN_LEAF_FLIQ_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_leaf_gsw & + ,'DMEAN_LEAF_GSW_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_leaf_gbw & + ,'DMEAN_LEAF_GBW_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_wood_energy & + ,'DMEAN_WOOD_ENERGY_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_wood_water & + ,'DMEAN_WOOD_WATER_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_wood_hcap & + ,'DMEAN_WOOD_HCAP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_wood_temp & + ,'DMEAN_WOOD_TEMP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_wood_fliq & + ,'DMEAN_WOOD_FLIQ_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_wood_gbw & + ,'DMEAN_WOOD_GBW_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_fs_open & + ,'DMEAN_FS_OPEN_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_fsw & + ,'DMEAN_FSW_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_fsn & + ,'DMEAN_FSN_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_psi_open & + ,'DMEAN_PSI_OPEN_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_psi_closed & + ,'DMEAN_PSI_CLOSED_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_water_supply & + ,'DMEAN_WATER_SUPPLY_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_light_level & + ,'DMEAN_LIGHT_LEVEL_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_light_level_beam & + ,'DMEAN_LIGHT_LEVEL_BEAM_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_light_level_diff & + ,'DMEAN_LIGHT_LEVEL_DIFF_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_par_l & + ,'DMEAN_PAR_L_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_par_l_beam & + ,'DMEAN_PAR_L_BEAM_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_par_l_diff & + ,'DMEAN_PAR_L_DIFF_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_rshort_l & + ,'DMEAN_RSHORT_L_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_rlong_l & + ,'DMEAN_RLONG_L_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_sensible_lc & + ,'DMEAN_SENSIBLE_LC_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_vapor_lc & + ,'DMEAN_VAPOR_LC_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_transp & + ,'DMEAN_TRANSP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_intercepted_al & + ,'DMEAN_INTERCEPTED_AL_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_wshed_lg & + ,'DMEAN_WSHED_LG_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_rshort_w & + ,'DMEAN_RSHORT_W_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_rlong_w & + ,'DMEAN_RLONG_W_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_sensible_wc & + ,'DMEAN_SENSIBLE_WC_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_vapor_wc & + ,'DMEAN_VAPOR_WC_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_intercepted_aw & + ,'DMEAN_INTERCEPTED_AW_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%dmean_wshed_wg & + ,'DMEAN_WSHED_WG_CO ',dsetrank,iparallel,.false.,foundvar) end if - + !----- Daily means. --------------------------------------------------------------------! + if (writing_eorq) then + call hdf_getslab_r(cpatch%mmean_lai & + ,'MMEAN_LAI_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_bleaf & + ,'MMEAN_BLEAF_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_broot & + ,'MMEAN_BROOT_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_bstorage & + ,'MMEAN_BSTORAGE_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_leaf_maintenance & + ,'MMEAN_LEAF_MAINTENANCE_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_root_maintenance & + ,'MMEAN_ROOT_MAINTENANCE_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_leaf_drop & + ,'MMEAN_LEAF_DROP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_cb & + ,'MMEAN_CB_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_gpp & + ,'MMEAN_GPP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_npp & + ,'MMEAN_NPP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_leaf_resp & + ,'MMEAN_LEAF_RESP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_root_resp & + ,'MMEAN_ROOT_RESP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_growth_resp & + ,'MMEAN_GROWTH_RESP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_storage_resp & + ,'MMEAN_STORAGE_RESP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_vleaf_resp & + ,'MMEAN_VLEAF_RESP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_plresp & + ,'MMEAN_PLRESP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_leaf_energy & + ,'MMEAN_LEAF_ENERGY_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_leaf_water & + ,'MMEAN_LEAF_WATER_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_leaf_hcap & + ,'MMEAN_LEAF_HCAP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_leaf_vpdef & + ,'MMEAN_LEAF_VPDEF_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_leaf_temp & + ,'MMEAN_LEAF_TEMP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_leaf_fliq & + ,'MMEAN_LEAF_FLIQ_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_leaf_gsw & + ,'MMEAN_LEAF_GSW_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_leaf_gbw & + ,'MMEAN_LEAF_GBW_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_wood_energy & + ,'MMEAN_WOOD_ENERGY_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_wood_water & + ,'MMEAN_WOOD_WATER_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_wood_hcap & + ,'MMEAN_WOOD_HCAP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_wood_temp & + ,'MMEAN_WOOD_TEMP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_wood_fliq & + ,'MMEAN_WOOD_FLIQ_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_wood_gbw & + ,'MMEAN_WOOD_GBW_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_fs_open & + ,'MMEAN_FS_OPEN_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_fsw & + ,'MMEAN_FSW_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_fsn & + ,'MMEAN_FSN_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_psi_open & + ,'MMEAN_PSI_OPEN_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_psi_closed & + ,'MMEAN_PSI_CLOSED_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_water_supply & + ,'MMEAN_WATER_SUPPLY_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_light_level & + ,'MMEAN_LIGHT_LEVEL_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_light_level_beam & + ,'MMEAN_LIGHT_LEVEL_BEAM_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_light_level_diff & + ,'MMEAN_LIGHT_LEVEL_DIFF_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_par_l & + ,'MMEAN_PAR_L_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_par_l_beam & + ,'MMEAN_PAR_L_BEAM_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_par_l_diff & + ,'MMEAN_PAR_L_DIFF_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_rshort_l & + ,'MMEAN_RSHORT_L_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_rlong_l & + ,'MMEAN_RLONG_L_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_sensible_lc & + ,'MMEAN_SENSIBLE_LC_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_vapor_lc & + ,'MMEAN_VAPOR_LC_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_transp & + ,'MMEAN_TRANSP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_intercepted_al & + ,'MMEAN_INTERCEPTED_AL_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_wshed_lg & + ,'MMEAN_WSHED_LG_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_rshort_w & + ,'MMEAN_RSHORT_W_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_rlong_w & + ,'MMEAN_RLONG_W_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_sensible_wc & + ,'MMEAN_SENSIBLE_WC_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_vapor_wc & + ,'MMEAN_VAPOR_WC_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_intercepted_aw & + ,'MMEAN_INTERCEPTED_AW_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_wshed_wg & + ,'MMEAN_WSHED_WG_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_nppleaf & + ,'MMEAN_NPPLEAF_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_nppfroot & + ,'MMEAN_NPPFROOT_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_nppsapwood & + ,'MMEAN_NPPSAPWOOD_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_nppcroot & + ,'MMEAN_NPPCROOT_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_nppseeds & + ,'MMEAN_NPPSEEDS_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_nppwood & + ,'MMEAN_NPPWOOD_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmean_nppdaily & + ,'MMEAN_NPPDAILY_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmsqu_gpp & + ,'MMSQU_GPP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmsqu_npp & + ,'MMSQU_NPP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmsqu_plresp & + ,'MMSQU_PLRESP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmsqu_sensible_lc & + ,'MMSQU_SENSIBLE_LC_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmsqu_vapor_lc & + ,'MMSQU_VAPOR_LC_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmsqu_transp & + ,'MMSQU_TRANSP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmsqu_sensible_wc & + ,'MMSQU_SENSIBLE_WC_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%mmsqu_vapor_wc & + ,'MMSQU_VAPOR_WC_CO ',dsetrank,iparallel,.false.,foundvar) + end if + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + - if (associated(csite%dmean_rk4step)) & - call hdf_getslab_r(csite%dmean_rk4step,'DMEAN_RK4STEP ',dsetrank,iparallel,.false.,foundvar) - if (associated(csite%mmean_rk4step)) & - call hdf_getslab_r(csite%mmean_rk4step,'MMEAN_RK4STEP ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(csite%mineralized_N_loss ,'NMIN_LOSS ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%mineralized_N_input,'NMIN_INPUT ',dsetrank,iparallel,.true.,foundvar) - - call hdf_getslab_r(csite%ustar ,'USTAR ' ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%tstar ,'TSTAR ' ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%qstar ,'QSTAR ' ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%qstar ,'CSTAR ' ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%zeta ,'ZETA ' ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%ribulk ,'RIBULK ' ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%upwp ,'UPWP ' ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%tpwp ,'TPWP ' ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%qpwp ,'QPWP ' ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%cpwp ,'CPWP ' ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%wpwp ,'WPWP ' ,dsetrank,iparallel,.true.,foundvar) - - - call hdf_getslab_r(csite%par_l_max ,'PAR_L_MAX ' & - ,dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(csite%par_l_beam_max ,'PAR_L_BEAM_MAX ' & - ,dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(csite%par_l_diffuse_max,'PAR_L_DIFFUSE_MAX ' & - ,dsetrank,iparallel,.false.,foundvar) - - - call hdf_getslab_r(csite%co2budget_initialstorage ,'CO2BUDGET_INITIALSTORAGE ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%co2budget_residual ,'CO2BUDGET_RESIDUAL ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%co2budget_loss2atm ,'CO2BUDGET_LOSS2ATM ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%co2budget_denseffect ,'CO2BUDGET_DENSEFFECT ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%co2budget_gpp ,'CO2BUDGET_GPP ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%co2budget_plresp ,'CO2BUDGET_PLRESP ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%co2budget_rh ,'CO2BUDGET_RH ' & - ,dsetrank,iparallel,.true.,foundvar) - - call hdf_getslab_r(csite%ebudget_initialstorage ,'EBUDGET_INITIALSTORAGE ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%ebudget_residual ,'EBUDGET_RESIDUAL ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%ebudget_loss2atm ,'EBUDGET_LOSS2ATM ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%ebudget_denseffect ,'EBUDGET_DENSEFFECT ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%ebudget_prsseffect ,'EBUDGET_PRSSEFFECT ' & - ,dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(csite%ebudget_loss2runoff ,'EBUDGET_LOSS2RUNOFF ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%ebudget_loss2drainage ,'EBUDGET_LOSS2DRAINAGE ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%ebudget_netrad ,'EBUDGET_NETRAD ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%ebudget_precipgain ,'EBUDGET_PRECIPGAIN ' & - ,dsetrank,iparallel,.true.,foundvar) - - call hdf_getslab_r(csite%wbudget_initialstorage ,'WBUDGET_INITIALSTORAGE ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%wbudget_residual ,'WBUDGET_RESIDUAL ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%wbudget_loss2atm ,'WBUDGET_LOSS2ATM ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%wbudget_denseffect ,'WBUDGET_DENSEFFECT ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%wbudget_loss2runoff ,'WBUDGET_LOSS2RUNOFF ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%wbudget_loss2drainage ,'WBUDGET_LOSS2DRAINAGE ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%wbudget_precipgain ,'WBUDGET_PRECIPGAIN ' & - ,dsetrank,iparallel,.true.,foundvar) - - if (associated(csite%dmean_co2_residual)) & - call hdf_getslab_r(csite%dmean_co2_residual , 'DMEAN_CO2_RESIDUAL_PA ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(csite%dmean_water_residual)) & - call hdf_getslab_r(csite%dmean_water_residual , 'DMEAN_WATER_RESIDUAL_PA ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(csite%dmean_energy_residual)) & - call hdf_getslab_r(csite%dmean_energy_residual, 'DMEAN_ENERGY_RESIDUAL_PA ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(csite%mmean_co2_residual)) & - call hdf_getslab_r(csite%mmean_co2_residual , 'MMEAN_CO2_RESIDUAL_PA ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(csite%mmean_water_residual)) & - call hdf_getslab_r(csite%mmean_water_residual , 'MMEAN_WATER_RESIDUAL_PA ' & - ,dsetrank,iparallel,.false.,foundvar) - - if (associated(csite%mmean_energy_residual)) & - call hdf_getslab_r(csite%mmean_energy_residual, 'MMEAN_ENERGY_RESIDUAL_PA ' & - ,dsetrank,iparallel,.false.,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! 2-D variables, dimensions: (n_pft,npatches). ! + !---------------------------------------------------------------------------------------! + dsetrank = 2 + globdims(1) = 13_8 + chnkdims(1) = 13_8 + chnkoffs(1) = 0_8 + memdims (1) = 13_8 + memsize (1) = 13_8 + memoffs (1) = 0_8 + globdims(2) = int(ncohorts_global,8) + chnkdims(2) = int(cpatch%ncohorts,8) + chnkoffs(2) = int(paco_index - 1 ,8) + memdims (2) = int(cpatch%ncohorts,8) + memsize (2) = int(cpatch%ncohorts,8) + memoffs (2) = 0_8 + call hdf_getslab_r(cpatch%cb & + ,'CB ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%cb_lightmax & + ,'CB_LIGHTMAX ',dsetrank,iparallel,.true. ,foundvar) + call hdf_getslab_r(cpatch%cb_moistmax & + ,'CB_MOISTMAX ',dsetrank,iparallel,.true. ,foundvar) + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + - dsetrank = 2 - globdims(1) = int(ndcycle,8) - chnkdims(1) = int(ndcycle,8) - memdims(1) = int(ndcycle,8) - memsize(1) = int(ndcycle,8) - chnkoffs(1) = 0 - memoffs(1) = 0 - globdims(2) = int(npatches_global,8) - chnkdims(2) = int(csite%npatches,8) - chnkoffs(2) = int(sipa_index - 1,8) - memdims(2) = int(csite%npatches,8) - memsize(2) = int(csite%npatches,8) - memoffs(2) = 0 - - if (associated(csite%qmean_rh)) & - call hdf_getslab_r(csite%qmean_rh ,'QMEAN_RH_PA ' & - ,dsetrank,iparallel,.true.,foundvar) - if (associated(csite%qmean_cwd_rh)) & - call hdf_getslab_r(csite%qmean_cwd_rh,'QMEAN_CWD_RH_PA ' & - ,dsetrank,iparallel,.true.,foundvar) - - if (associated(csite%qmean_albedo )) & - call hdf_getslab_r(csite%qmean_albedo,'QMEAN_ALBEDO_PA ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(csite%qmean_albedo_beam )) & - call hdf_getslab_r(csite%qmean_albedo_beam,'QMEAN_ALBEDO_BEAM_PA ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(csite%qmean_albedo_diffuse )) & - call hdf_getslab_r(csite%qmean_albedo_diffuse,'QMEAN_ALBEDO_DIFFUSE_PA ' & - ,dsetrank,iparallel,.false.,foundvar) - - dsetrank = 2 - globdims(1) = int(nzs,8) - chnkdims(1) = int(nzs,8) - memdims(1) = int(nzs,8) - memsize(1) = int(nzs,8) - chnkoffs(1) = 0 - memoffs(1) = 0 - globdims(2) = int(npatches_global,8) - chnkdims(2) = int(csite%npatches,8) - chnkoffs(2) = int(sipa_index - 1,8) - memdims(2) = int(csite%npatches,8) - memsize(2) = int(csite%npatches,8) - memoffs(2) = 0 - - call hdf_getslab_r(csite%sfcwater_mass,'SFCWATER_MASS ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%sfcwater_energy,'SFCWATER_ENERGY ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%sfcwater_depth,'SFCWATER_DEPTH ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%rshort_s,'RSHORT_S ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%rshort_s_beam,'RSHORT_S_BEAM ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%rshort_s_diffuse,'RSHORT_S_DIFFUSE ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%par_s,'PAR_S ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%par_s_beam,'PAR_S_BEAM ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%par_s_diffuse,'PAR_S_DIFFUSE ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%sfcwater_tempk,'SFCWATER_TEMPK ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%sfcwater_fracliq,'SFCWATER_FRACLIQ ',dsetrank,iparallel,.true.,foundvar) - - dsetrank = 2 - globdims(1) = int(nzg,8) - chnkdims(1) = int(nzg,8) - memdims(1) = int(nzg,8) - memsize(1) = int(nzg,8) - chnkoffs(1) = 0 - memoffs(1) = 0 - globdims(2) = int(npatches_global,8) - chnkdims(2) = int(csite%npatches,8) - chnkoffs(2) = int(sipa_index - 1,8) - memdims(2) = int(csite%npatches,8) - memsize(2) = int(csite%npatches,8) - memoffs(2) = 0 - call hdf_getslab_r(csite%soil_energy,'SOIL_ENERGY_PA ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%soil_water,'SOIL_WATER_PA ',dsetrank,iparallel,.true.,foundvar) - - call hdf_getslab_r(csite%soil_tempk,'SOIL_TEMPK_PA ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%soil_fracliq,'SOIL_FRACLIQ_PA ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%rootdense,'PATCH_ROOT_DENSITY ',dsetrank,iparallel,.false.,foundvar) - !-----------------------------------------------------------------------------------! - ! Soil water is double precision, although it may not be DP in the dataset - ! The following lines make provisions for this by testing the dataset. - -! call h5dopen_f(file_id,'SOIL_WATER_PA ', dset_id, hdferr) -! if (hdferr /= 0 ) then -! call fatal_error('Dataset did not have soil water?' & -! ,'fill_history_site','ed_init_full_history.F90') -! endif - ! ---------------------------------------------------------------------------------! - ! THESE LINES ARE USEFULL FOR DETERMINING DATA SIZE OF ANY GIVEN OBJECT IN A SET ! - ! ---------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! 2-D variables, dimensions: (n_mort,npatches). ! + !---------------------------------------------------------------------------------------! + dsetrank = 2 + globdims(1) = int(n_mort,8) + chnkdims(1) = int(n_mort,8) + chnkoffs(1) = 0_8 + memdims (1) = int(n_mort,8) + memsize (1) = int(n_mort,8) + memoffs (1) = 0_8 - !call h5dget_type_f(dset_id,datatype_id,hdferr) - !call h5tget_size_f(datatype_id,setsize,hdferr) - !call h5dclose_f(dset_id , hdferr) - -! ============================================================================================= -! KEEP THIS CODE AS A TEMPLATE IN CASE WE NEED TO DO SOMETHING LIKE THIS IN THE FUTURE -! HELPFUL IF WE CHANGE DATA TYPES -! --------------------------------------------------------------------------------------------- -! if (setsize==4_8) then !Old precision -! call hdf_getslab_r(csite%soil_water,'SOIL_WATER_PA ',dsetrank,iparallel,.true.,foundvar) -! else if (setsize==8_8) then ! Newer precision -! allocate(buff(nzg,csite%npatches)) -! write (unit=*,fmt='(a)') '-------------------------------------------------------------------' -! write (unit=*,fmt='(a)') ' Loading 8-byte precision soil water and converting to 4-byte' -! write (unit=*,fmt='(a)') '-------------------------------------------------------------------' -! call hdf_getslab_d(buff,'SOIL_WATER_PA ',dsetrank,iparallel,.true.,foundvar) -! csite%soil_water(1:nzg,1:csite%npatches) = sngl(buff(1:nzg,1:csite%npatches)) -! deallocate(buff) -! else -! call fatal_error('Soil water dataset is not real nor double?' & -! ,'fill_history_site','ed_init_full_history.F90') -! end if - - !-------------------------------------------------------------------------------------------- - - dsetrank = 2 - globdims(1) = int(n_pft,8) - chnkdims(1) = int(n_pft,8) - memdims(1) = int(n_pft,8) - memsize(1) = int(n_pft,8) - chnkoffs(1) = 0_8 - memoffs(1) = 0_8 - globdims(2) = int(npatches_global,8) - chnkdims(2) = int(csite%npatches,8) - chnkoffs(2) = int(sipa_index - 1,8) - memdims(2) = int(csite%npatches,8) - memsize(2) = int(csite%npatches,8) - memoffs(2) = 0_8 - - call hdf_getslab_r(csite%A_o_max,'A_O_MAX ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%A_c_max,'A_C_MAX ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(csite%repro,'REPRO_PA ',dsetrank,iparallel,.true.,foundvar) - - - dsetrank = 2 - globdims(1) = int(n_dbh,8) - chnkdims(1) = int(n_dbh,8) - memdims(1) = int(n_dbh,8) - memsize(1) = int(n_dbh,8) - chnkoffs(1) = 0_8 - memoffs(1) = 0_8 - globdims(2) = int(npatches_global,8) - chnkdims(2) = int(csite%npatches,8) - chnkoffs(2) = int(sipa_index - 1,8) - memdims(2) = int(csite%npatches,8) - memsize(2) = int(csite%npatches,8) - memoffs(2) = 0_8 - call hdf_getslab_r(csite%co2budget_gpp_dbh,'CO2BUDGET_GPP_DBH ',dsetrank,iparallel,.true.,foundvar) - - dsetrank = 3 - globdims(3) = int(npatches_global,8) - chnkdims(3) = int(csite%npatches,8) - chnkoffs(3) = int(sipa_index - 1,8) - - memdims(3) = int(csite%npatches,8) - memsize(3) = int(csite%npatches,8) - memoffs(3) = 0_8 + globdims(2) = int(ncohorts_global,8) + chnkdims(2) = int(cpatch%ncohorts,8) + chnkoffs(2) = int(paco_index - 1,8) + memdims (2) = int(cpatch%ncohorts,8) + memsize (2) = int(cpatch%ncohorts,8) + memoffs (2) = 0_8 + call hdf_getslab_r(cpatch%mort_rate & + ,'MORT_RATE_CO ',dsetrank,iparallel,.true. ,foundvar) + if (writing_eorq) then + call hdf_getslab_r(cpatch%mmean_mort_rate & + ,'MMEAN_MORT_RATE_CO ',dsetrank,iparallel,.false.,foundvar) + end if + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! - globdims(2) = int(ff_nhgt,8) - chnkdims(2) = int(ff_nhgt,8) - memdims(2) = int(ff_nhgt,8) - memsize(2) = int(ff_nhgt,8) - chnkoffs(2) = 0_8 - memoffs(2) = 0_8 - - globdims(1) = int(n_pft,8) - chnkdims(1) = int(n_pft,8) - memdims(1) = int(n_pft,8) - memsize(1) = int(n_pft,8) - chnkoffs(1) = 0_8 - memoffs(1) = 0_8 - - call hdf_getslab_r(csite%cumlai_profile,'CUMLAI_PROFILE ',dsetrank,iparallel,.false.,foundvar) - - return -end subroutine fill_history_site - -!==========================================================================================! -!==========================================================================================! -subroutine fill_history_patch(cpatch,paco_index,ncohorts_global,green_leaf_factor) - - use ed_state_vars,only: patchtype - use hdf5_coms,only:file_id,dset_id,dspace_id,plist_id, & - filespace,memspace, & - globdims,chnkdims,chnkoffs,cnt,stride, & - memdims,memoffs,memsize - use ed_max_dims,only: n_pft, n_mort - use allometry, only : dbh2ca - use ed_misc_coms, only : ndcycle - implicit none -#if USE_INTERF - interface - subroutine hdf_getslab_r(buff,varn,dsetrank,iparallel,required,foundvar) - use hdf5_coms,only:memsize - real,dimension(memsize(1),memsize(2),memsize(3),memsize(4)) :: buff - integer :: dsetrank,iparallel - character(len=*),intent(in) :: varn - logical,intent(in) :: required - logical,intent(out) :: foundvar - end subroutine hdf_getslab_r - subroutine hdf_getslab_d(buff,varn,dsetrank,iparallel,required,foundvar) - use hdf5_coms,only:memsize - real(kind=8),dimension(memsize(1),memsize(2),memsize(3),memsize(4)) :: buff - integer :: dsetrank,iparallel - character(len=*),intent(in) :: varn - logical,intent(in) :: required - logical,intent(out) :: foundvar - end subroutine hdf_getslab_d - subroutine hdf_getslab_i(buff,varn,dsetrank,iparallel,required,foundvar) - use hdf5_coms,only:memsize - integer,dimension(memsize(1),memsize(2),memsize(3),memsize(4)) :: buff - integer :: dsetrank,iparallel - character(len=*),intent(in) :: varn - logical,intent(in) :: required - logical,intent(out) :: foundvar - end subroutine hdf_getslab_i - end interface -#endif - type(patchtype),target :: cpatch - integer,intent(in) :: paco_index - integer,intent(in) :: ncohorts_global - real, dimension(n_pft), intent(in) :: green_leaf_factor - integer :: iparallel,dsetrank - logical :: foundvar - - ! Needed for reconstructing veg_energy if using an old restart - ! ------------------------------------------------------------ - real :: plai - integer :: ico - ! ------------------------------------------------------------ - iparallel = 0 - - dsetrank = 1 - globdims = 0_8 - chnkdims = 0_8 - chnkoffs = 0_8 - memoffs = 0_8 - memdims = 0_8 - memsize = 1_8 - - globdims(1) = int(ncohorts_global,8) - chnkdims(1) = int(cpatch%ncohorts,8) - chnkoffs(1) = int(paco_index - 1,8) - - memdims(1) = int(cpatch%ncohorts,8) - memsize(1) = int(cpatch%ncohorts,8) - memoffs(1) = 0_8 - - if (cpatch%ncohorts > 0) then - - call hdf_getslab_i(cpatch%pft,'PFT ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%nplant,'NPLANT ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%hite,'HITE ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%dbh,'DBH ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%agb,'AGB_CO ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%basarea,'BA_CO',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%dagb_dt,'DAGB_DT ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%dlnagb_dt,'DLNAGB_DT ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%dba_dt,'DBA_DT',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%dlnba_dt,'DLNBA_DT',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%ddbh_dt,'DDBH_DT',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%dlndbh_dt,'DLNDBH_DT',dsetrank,iparallel,.true.,foundvar) - - call hdf_getslab_r(cpatch%bdead,'BDEAD ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%bleaf,'BLEAF ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_i(cpatch%phenology_status,'PHENOLOGY_STATUS ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_i(cpatch%recruit_dbh,'RECRUIT_DBH ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_i(cpatch%census_status,'CENSUS_STATUS ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%balive,'BALIVE ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%broot,'BROOT ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%bsapwooda,'BSAPWOODA ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%bsapwoodb,'BSAPWOODB ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%lai,'LAI_CO ',dsetrank,iparallel,.true.,foundvar) - - call hdf_getslab_r(cpatch%llspan,'LLSPAN ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%turnover_amp,'TURNOVER_AMP ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%vm_bar,'VM_BAR ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%sla,'SLA ',dsetrank,iparallel,.true.,foundvar) - - call hdf_getslab_r(cpatch%bstorage,'BSTORAGE ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%cbr_bar,'CBR_BAR ',dsetrank,iparallel,.true.,foundvar) - - call hdf_getslab_r(cpatch%wai,'WAI_CO ',dsetrank,iparallel,.true.,foundvar) - - call hdf_getslab_r(cpatch%crown_area,'CROWN_AREA_CO ',dsetrank,iparallel,.false.,foundvar) - if (all(cpatch%crown_area == 0.)) then - do ico= 1,cpatch%ncohorts - cpatch%crown_area(ico) = min(1.0, cpatch%nplant(ico) * dbh2ca(cpatch%dbh(ico) & - ,cpatch%hite(ico),cpatch%sla(ico),cpatch%pft(ico))) - end do - end if - - call hdf_getslab_r(cpatch%leaf_energy,'LEAF_ENERGY ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%leaf_hcap,'LEAF_HCAP ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%leaf_temp,'LEAF_TEMP ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%leaf_vpdef,'LEAF_VPDEF ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cpatch%leaf_temp_pv,'LEAF_TEMP_PV ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cpatch%leaf_water,'LEAF_WATER ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%leaf_fliq,'LEAF_FLIQ ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%wood_energy,'WOOD_ENERGY ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%wood_hcap,'WOOD_HCAP ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%wood_temp,'WOOD_TEMP ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%wood_temp_pv,'WOOD_TEMP_PV ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cpatch%wood_water,'WOOD_WATER ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%wood_fliq,'WOOD_FLIQ ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%veg_wind,'VEG_WIND ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%lsfc_co2_open,'LSFC_CO2_OPEN ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%lsfc_co2_closed,'LSFC_CO2_CLOSED ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%lsfc_shv_open,'LSFC_SHV_OPEN ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%lsfc_shv_closed,'LSFC_SHV_CLOSED ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%lint_shv,'LINT_SHV ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%lint_co2_open,'LINT_CO2_OPEN ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%lint_co2_closed,'LINT_CO2_CLOSED ',dsetrank,iparallel,.true.,foundvar) - - call hdf_getslab_r(cpatch%mean_gpp,'MEAN_GPP ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%mean_leaf_resp,'MEAN_LEAF_RESP ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%mean_root_resp,'MEAN_ROOT_RESP ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%today_leaf_resp,'TODAY_LEAF_RESP ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%today_root_resp,'TODAY_ROOT_RESP ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%today_gpp,'TODAY_GPP ',dsetrank,iparallel,.true.,foundvar) - - - call hdf_getslab_r(cpatch%mean_par_l ,'MEAN_PAR_L ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%mean_par_l_beam ,'MEAN_PAR_L_BEAM ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%mean_par_l_diff ,'MEAN_PAR_L_DIFF ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%mean_rshort_l ,'MEAN_RSHORT_L ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%mean_rlong_l ,'MEAN_RLONG_L ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%mean_sensible_lc ,'MEAN_SENSIBLE_LC ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%mean_vapor_lc ,'MEAN_VAPOR_LC ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%mean_transp ,'MEAN_TRANSP ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%mean_intercepted_al,'MEAN_INTERCEPTED_AL ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%mean_wshed_lg ,'MEAN_WSHED_LG ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%mean_rshort_w ,'MEAN_RSHORT_W ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%mean_rlong_w ,'MEAN_RLONG_W ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%mean_sensible_wc ,'MEAN_SENSIBLE_WC ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%mean_vapor_wc ,'MEAN_VAPOR_WC ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%mean_intercepted_aw,'MEAN_INTERCEPTED_AW ' & - ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%mean_wshed_wg ,'MEAN_WSHED_WG ' & - ,dsetrank,iparallel,.true.,foundvar) - - - if (associated(cpatch%today_nppleaf )) & - call hdf_getslab_r(cpatch%today_nppleaf ,'TODAY_NPPLEAF ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%today_nppfroot )) & - call hdf_getslab_r(cpatch%today_nppfroot,'TODAY_NPPFROOT ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%today_nppsapwood )) & - call hdf_getslab_r(cpatch%today_nppsapwood ,'TODAY_NPPSAPWOOD ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%today_nppcroot )) & - call hdf_getslab_r(cpatch%today_nppcroot,'TODAY_NPPCROOT ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%today_nppseeds )) & - call hdf_getslab_r(cpatch%today_nppseeds,'TODAY_NPPSEEDS ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%today_nppwood )) & - call hdf_getslab_r(cpatch%today_nppwood ,'TODAY_NPPWOOD ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%today_nppdaily )) & - call hdf_getslab_r(cpatch%today_nppdaily,'TODAY_NPPDAILY ',dsetrank,iparallel,.false.,foundvar) - - call hdf_getslab_r(cpatch%today_gpp_pot,'TODAY_GPP_POT ',dsetrank,iparallel,.true.,foundvar) - - !-------------------------------------------------------------------------------------! - ! Check whether this is a new or old history file. Old history files don't have ! - ! the light and moisture distinction. ! - !-------------------------------------------------------------------------------------! - call hdf_getslab_r(cpatch%today_gpp_lightmax,'TODAY_GPP_MAX ',dsetrank,iparallel & - ,.false.,foundvar) - if (.not. foundvar) then - !---- New history, load the new variables. ----------------------------------------! - call hdf_getslab_r(cpatch%today_gpp_lightmax,'TODAY_GPP_LIGHTMAX ',dsetrank & - ,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%today_gpp_moistmax,'TODAY_GPP_MOISTMAX ',dsetrank & - ,iparallel,.true.,foundvar) - !----------------------------------------------------------------------------------! - else - !---- Old history, make up something for the moisture maximum. --------------------! - cpatch%today_gpp_moistmax(:) = cpatch%today_gpp(:) - !----------------------------------------------------------------------------------! - end if - !-------------------------------------------------------------------------------------! - - - call hdf_getslab_r(cpatch%growth_respiration,'GROWTH_RESPIRATION ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%storage_respiration,'STORAGE_RESPIRATION ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%vleaf_respiration,'VLEAF_RESPIRATION ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%fsn,'FSN ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%monthly_dndt,'MONTHLY_DNDT ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%monthly_dlnndt,'MONTHLY_DLNNDT ',dsetrank,iparallel,.true.,foundvar) - - if (associated(cpatch%mmean_gpp )) & - call hdf_getslab_r(cpatch%mmean_gpp,'MMEAN_GPP_CO ',dsetrank,iparallel,.false.,foundvar) - - if (associated(cpatch%mmean_nppleaf )) & - call hdf_getslab_r(cpatch%mmean_nppleaf ,'MMEAN_NPPLEAF_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_nppfroot )) & - call hdf_getslab_r(cpatch%mmean_nppfroot,'MMEAN_NPPFROOT_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_nppsapwood )) & - call hdf_getslab_r(cpatch%mmean_nppsapwood ,'MMEAN_NPPSAPWOOD_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_nppcroot )) & - call hdf_getslab_r(cpatch%mmean_nppcroot,'MMEAN_NPPCROOT_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_nppseeds )) & - call hdf_getslab_r(cpatch%mmean_nppseeds,'MMEAN_NPPSEEDS_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_nppwood )) & - call hdf_getslab_r(cpatch%mmean_nppwood ,'MMEAN_NPPWOOD_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_nppdaily )) & - call hdf_getslab_r(cpatch%mmean_nppdaily,'MMEAN_NPPDAILY_CO ',dsetrank,iparallel,.false.,foundvar) - - if (associated(cpatch%mmean_leaf_resp )) & - call hdf_getslab_r(cpatch%mmean_leaf_resp,'MMEAN_LEAF_RESP_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_root_resp )) & - call hdf_getslab_r(cpatch%mmean_root_resp,'MMEAN_ROOT_RESP_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_growth_resp )) & - call hdf_getslab_r(cpatch%mmean_growth_resp,'MMEAN_GROWTH_RESP_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_storage_resp )) & - call hdf_getslab_r(cpatch%mmean_storage_resp,'MMEAN_STORAGE_RESP_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_vleaf_resp )) & - call hdf_getslab_r(cpatch%mmean_vleaf_resp,'MMEAN_VLEAF_RESP_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_leaf_resp )) & - call hdf_getslab_r(cpatch%dmean_leaf_resp,'DMEAN_LEAF_RESP_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_root_resp )) & - call hdf_getslab_r(cpatch%dmean_root_resp,'DMEAN_ROOT_RESP_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_gpp )) & - call hdf_getslab_r(cpatch%dmean_gpp,'DMEAN_GPP_CO ',dsetrank,iparallel,.false.,foundvar) - - if (associated(cpatch%dmean_nppleaf )) & - call hdf_getslab_r(cpatch%dmean_nppleaf ,'DMEAN_NPPLEAF_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_nppfroot )) & - call hdf_getslab_r(cpatch%dmean_nppfroot,'DMEAN_NPPFROOT_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_nppsapwood )) & - call hdf_getslab_r(cpatch%dmean_nppsapwood ,'DMEAN_NPPSAPWOOD_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_nppcroot )) & - call hdf_getslab_r(cpatch%dmean_nppcroot,'DMEAN_NPPCROOT_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_nppseeds )) & - call hdf_getslab_r(cpatch%dmean_nppseeds,'DMEAN_NPPSEEDS_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_nppwood )) & - call hdf_getslab_r(cpatch%dmean_nppwood ,'DMEAN_NPPWOOD_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_nppdaily )) & - call hdf_getslab_r(cpatch%dmean_nppdaily,'DMEAN_NPPDAILY_CO ',dsetrank,iparallel,.false.,foundvar) - - if (associated(cpatch%dmean_fs_open )) & - call hdf_getslab_r(cpatch%dmean_fs_open,'DMEAN_FS_OPEN_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_fs_open )) & - call hdf_getslab_r(cpatch%mmean_fs_open,'MMEAN_FS_OPEN_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_fsw )) & - call hdf_getslab_r(cpatch%dmean_fsw,'DMEAN_FSW_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_fsw )) & - call hdf_getslab_r(cpatch%mmean_fsw,'MMEAN_FSW_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_fsn )) & - call hdf_getslab_r(cpatch%dmean_fsn,'DMEAN_FSN_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_fsn )) & - call hdf_getslab_r(cpatch%mmean_fsn,'MMEAN_FSN_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_psi_open )) & - call hdf_getslab_r(cpatch%dmean_psi_open,'DMEAN_PSI_OPEN_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_psi_closed )) & - call hdf_getslab_r(cpatch%dmean_psi_closed,'DMEAN_PSI_CLOSED_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_psi_open )) & - call hdf_getslab_r(cpatch%mmean_psi_open,'MMEAN_PSI_OPEN_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_psi_closed )) & - call hdf_getslab_r(cpatch%mmean_psi_closed,'MMEAN_PSI_CLOSED_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_water_supply )) & - call hdf_getslab_r(cpatch%dmean_water_supply,'DMEAN_WATER_SUPPLY_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_water_supply )) & - call hdf_getslab_r(cpatch%mmean_water_supply,'MMEAN_WATER_SUPPLY_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_leaf_maintenance )) & - call hdf_getslab_r(cpatch%mmean_leaf_maintenance,'MMEAN_LEAF_MAINTENANCE ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_root_maintenance )) & - call hdf_getslab_r(cpatch%mmean_root_maintenance,'MMEAN_ROOT_MAINTENANCE ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_leaf_drop )) & - call hdf_getslab_r(cpatch%mmean_leaf_drop,'MMEAN_LEAF_DROP_CO ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_cb )) & - call hdf_getslab_r(cpatch%mmean_cb,'MMEAN_CB ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_light_level )) & - call hdf_getslab_r(cpatch%dmean_light_level,'DMEAN_LIGHT_LEVEL ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_light_level )) & - call hdf_getslab_r(cpatch%mmean_light_level,'MMEAN_LIGHT_LEVEL ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_light_level )) & - call hdf_getslab_r(cpatch%dmean_light_level_beam,'DMEAN_LIGHT_LEVEL_BEAM ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_light_level_beam )) & - call hdf_getslab_r(cpatch%mmean_light_level_beam,'MMEAN_LIGHT_LEVEL_BEAM ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_light_level_diff )) & - call hdf_getslab_r(cpatch%dmean_light_level_diff,'DMEAN_LIGHT_LEVEL_DIFF ',dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_light_level_diff )) & - call hdf_getslab_r(cpatch%mmean_light_level_diff,'MMEAN_LIGHT_LEVEL_DIFF ',dsetrank,iparallel,.false.,foundvar) - - - if (associated(cpatch%dmean_par_l )) & - call hdf_getslab_r(cpatch%dmean_par_l ,'DMEAN_PAR_L ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_par_l_beam )) & - call hdf_getslab_r(cpatch%dmean_par_l_beam ,'DMEAN_PAR_L_BEAM ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_par_l_diff )) & - call hdf_getslab_r(cpatch%dmean_par_l_diff ,'DMEAN_PAR_L_DIFF ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_rshort_l )) & - call hdf_getslab_r(cpatch%dmean_rshort_l ,'DMEAN_RSHORT_L ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_rlong_l )) & - call hdf_getslab_r(cpatch%dmean_rlong_l ,'DMEAN_RLONG_L ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_sensible_lc )) & - call hdf_getslab_r(cpatch%dmean_sensible_lc ,'DMEAN_SENSIBLE_LC_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_vapor_lc )) & - call hdf_getslab_r(cpatch%dmean_vapor_lc ,'DMEAN_VAPOR_LC_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_transp )) & - call hdf_getslab_r(cpatch%dmean_transp ,'DMEAN_TRANSP_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_intercepted_al)) & - call hdf_getslab_r(cpatch%dmean_intercepted_al,'DMEAN_INTERCEPTED_AL_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_wshed_lg )) & - call hdf_getslab_r(cpatch%dmean_wshed_lg ,'DMEAN_WSHED_LG_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_rshort_w )) & - call hdf_getslab_r(cpatch%dmean_rshort_w ,'DMEAN_RSHORT_W ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_rlong_w )) & - call hdf_getslab_r(cpatch%dmean_rlong_w ,'DMEAN_RLONG_W ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_sensible_wc )) & - call hdf_getslab_r(cpatch%dmean_sensible_wc ,'DMEAN_SENSIBLE_WC_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_vapor_wc )) & - call hdf_getslab_r(cpatch%dmean_vapor_wc ,'DMEAN_VAPOR_WC_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_intercepted_aw)) & - call hdf_getslab_r(cpatch%dmean_intercepted_aw,'DMEAN_INTERCEPTED_AW_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%dmean_wshed_wg )) & - call hdf_getslab_r(cpatch%dmean_wshed_wg ,'DMEAN_WSHED_WG_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_par_l )) & - call hdf_getslab_r(cpatch%mmean_par_l ,'MMEAN_PAR_L ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_par_l_beam )) & - call hdf_getslab_r(cpatch%mmean_par_l_beam ,'MMEAN_PAR_L_BEAM ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_par_l_diff )) & - call hdf_getslab_r(cpatch%mmean_par_l_diff ,'MMEAN_PAR_L_DIFF ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_rshort_l )) & - call hdf_getslab_r(cpatch%mmean_rshort_l ,'MMEAN_RSHORT_L ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_rlong_l )) & - call hdf_getslab_r(cpatch%mmean_rlong_l ,'MMEAN_RLONG_L ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_sensible_lc )) & - call hdf_getslab_r(cpatch%mmean_sensible_lc ,'MMEAN_SENSIBLE_LC_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_vapor_lc )) & - call hdf_getslab_r(cpatch%mmean_vapor_lc ,'MMEAN_VAPOR_LC_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_transp )) & - call hdf_getslab_r(cpatch%mmean_transp ,'MMEAN_TRANSP_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_intercepted_al)) & - call hdf_getslab_r(cpatch%mmean_intercepted_al,'MMEAN_INTERCEPTED_AL_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_wshed_lg )) & - call hdf_getslab_r(cpatch%mmean_wshed_lg ,'MMEAN_WSHED_LG_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_rshort_w )) & - call hdf_getslab_r(cpatch%mmean_rshort_w ,'MMEAN_RSHORT_W ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_rlong_w )) & - call hdf_getslab_r(cpatch%mmean_rlong_w ,'MMEAN_RLONG_W ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_sensible_wc )) & - call hdf_getslab_r(cpatch%mmean_sensible_wc ,'MMEAN_SENSIBLE_WC_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_vapor_wc )) & - call hdf_getslab_r(cpatch%mmean_vapor_wc ,'MMEAN_VAPOR_WC_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_intercepted_aw)) & - call hdf_getslab_r(cpatch%mmean_intercepted_aw,'MMEAN_INTERCEPTED_AW_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%mmean_wshed_wg )) & - call hdf_getslab_r(cpatch%mmean_wshed_wg ,'MMEAN_WSHED_WG_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - - call hdf_getslab_r(cpatch%Psi_open,'PSI_OPEN ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_i(cpatch%krdepth,'KRDEPTH ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_i(cpatch%first_census,'FIRST_CENSUS ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_i(cpatch%new_recruit_flag,'NEW_RECRUIT_FLAG ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%light_level,'LIGHT_LEVEL ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%light_level_beam,'LIGHT_LEVEL_BEAM ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%light_level_diff,'LIGHT_LEVEL_DIFF ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%par_l,'PAR_L ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%par_l_beam,'PAR_L_BEAM ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%par_l_diffuse,'PAR_L_DIFFUSE ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%rshort_l,'RSHORT_L ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%rshort_l_beam,'RSHORT_L_BEAM ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%rshort_l_diffuse,'RSHORT_L_DIFFUSE ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%rlong_l,'RLONG_L ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%rlong_l_surf,'RLONG_L_SURF ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%rlong_l_incid,'RLONG_L_INCID ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%rshort_w,'RSHORT_W ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%rshort_w_beam,'RSHORT_W_BEAM ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%rshort_w_diffuse,'RSHORT_W_DIFFUSE ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%rlong_w,'RLONG_W ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%rlong_w_surf,'RLONG_W_SURF ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%rlong_w_incid,'RLONG_W_INCID ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%leaf_gbh,'LEAF_GBH ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%leaf_gbw,'LEAF_GBW ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%wood_gbh,'WOOD_GBH ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%wood_gbw,'WOOD_GBW ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%A_open,'A_OPEN ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%A_closed,'A_CLOSED ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%Psi_closed,'PSI_CLOSED ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%gsw_open,'GSW_OPEN ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%gsw_closed,'GSW_CLOSED ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%fsw,'FSW ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%fs_open,'FS_OPEN ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%water_supply,'WATER_SUPPLY ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%stomatal_conductance,'STOMATAL_CONDUCTANCE ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%leaf_maintenance,'LEAF_MAINTENANCE ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%root_maintenance,'ROOT_MAINTENANCE ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%leaf_drop,'LEAF_DROP ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%bseeds,'BSEEDS_CO ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%leaf_respiration,'LEAF_RESPIRATION ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%root_respiration,'ROOT_RESPIRATION ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%gpp,'GPP ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%paw_avg,'PAW_AVG ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_r(cpatch%elongf,'ELONGF ',dsetrank,iparallel,.false.,foundvar) - - !----- 13-month dimension (12 previous months + current month). ----------------------! - dsetrank = 2 - globdims(1) = 13_8 - chnkdims(1) = 13_8 - chnkoffs(1) = 0_8 - memdims(1) = 13_8 - memsize(1) = 13_8 - memoffs(2) = 0_8 - - globdims(2) = int(ncohorts_global,8) - chnkdims(2) = int(cpatch%ncohorts,8) - chnkoffs(2) = int(paco_index - 1,8) - - memdims(2) = int(cpatch%ncohorts,8) - memsize(2) = int(cpatch%ncohorts,8) - memoffs(2) = 0_8 - - call hdf_getslab_r(cpatch%cb,'CB ',dsetrank,iparallel,.true.,foundvar) - !-------------------------------------------------------------------------------------! - ! Maximum Carbon balance has changed, so check whether this is an old history. ! - ! In case it is, we copy cb_max to lightmax, and assume cb_moistmax to be 1.0. ! - ! Otherwise, we read in both maxima. ! - !-------------------------------------------------------------------------------------! - call hdf_getslab_r(cpatch%cb_lightmax,'CB_MAX ',dsetrank,iparallel,.false.,foundvar) - if (.not. foundvar) then - !----- New file, both light and moisture are present. Read them instead. ---------! - call hdf_getslab_r(cpatch%cb_lightmax,'CB_LIGHTMAX ',dsetrank,iparallel & - ,.true.,foundvar) - call hdf_getslab_r(cpatch%cb_moistmax,'CB_MOISTMAX ',dsetrank,iparallel & - ,.true.,foundvar) - !----------------------------------------------------------------------------------! - else - !----------------------------------------------------------------------------------! - ! Old file, make up some initial condition to moisture. The only reason why ! - ! the 13th element is not set to 0 is because history files may be from the middle ! - ! of the month, which could mess things up. ! - !----------------------------------------------------------------------------------! - cpatch%cb_moistmax(1:12,:) = 1.0 - cpatch%cb_moistmax( 13,:) = cpatch%cb(13,:) - !----------------------------------------------------------------------------------! - end if - !-------------------------------------------------------------------------------------! - - - !----- 2-D, dimensioned by the number of mortality rates. ----------------------------! - dsetrank = 2 - globdims(1) = int(n_mort,8) - chnkdims(1) = int(n_mort,8) - chnkoffs(1) = 0_8 - memdims(1) = int(n_mort,8) - memsize(1) = int(n_mort,8) - memoffs(2) = 0_8 - - globdims(2) = int(ncohorts_global,8) - chnkdims(2) = int(cpatch%ncohorts,8) - chnkoffs(2) = int(paco_index - 1,8) - - memdims(2) = int(cpatch%ncohorts,8) - memsize(2) = int(cpatch%ncohorts,8) - memoffs(2) = 0_8 - - call hdf_getslab_r(cpatch%mort_rate,'MORT_RATE_CO ',dsetrank,iparallel,.true.,foundvar) - - if (associated(cpatch%mmean_mort_rate)) & - call hdf_getslab_r(cpatch%mmean_mort_rate,'MMEAN_MORT_RATE_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - - !----- 2-D, dimensioned by the number of diurnal cycle times. ------------------------! - dsetrank = 2 - globdims(1) = int(ndcycle,8) - chnkdims(1) = int(ndcycle,8) - chnkoffs(1) = 0_8 - memdims(1) = int(ndcycle,8) - memsize(1) = int(ndcycle,8) - memoffs(2) = 0_8 - - globdims(2) = int(ncohorts_global,8) - chnkdims(2) = int(cpatch%ncohorts,8) - chnkoffs(2) = int(paco_index - 1,8) - memdims(2) = int(cpatch%ncohorts,8) - memsize(2) = int(cpatch%ncohorts,8) - memoffs(2) = 0_8 - - if (associated(cpatch%qmean_gpp)) & - call hdf_getslab_r(cpatch%qmean_gpp ,'QMEAN_GPP_CO ' & - ,dsetrank,iparallel,.true.,foundvar) - - if (associated(cpatch%qmean_leaf_resp)) & - call hdf_getslab_r(cpatch%qmean_leaf_resp ,'QMEAN_LEAF_RESP_CO ' & - ,dsetrank,iparallel,.true.,foundvar) - - if (associated(cpatch%qmean_root_resp)) & - call hdf_getslab_r(cpatch%qmean_root_resp ,'QMEAN_ROOT_RESP_CO ' & - ,dsetrank,iparallel,.true.,foundvar) - - if (associated(cpatch%qmean_par_l)) & - call hdf_getslab_r(cpatch%qmean_par_l ,'QMEAN_PAR_L ' & - ,dsetrank,iparallel,.true.,foundvar) - - if (associated(cpatch%qmean_par_l_beam)) & - call hdf_getslab_r(cpatch%qmean_par_l_beam ,'QMEAN_PAR_L_BEAM ' & - ,dsetrank,iparallel,.true.,foundvar) - - if (associated(cpatch%qmean_par_l_diff)) & - call hdf_getslab_r(cpatch%qmean_par_l_diff ,'QMEAN_PAR_L_DIFF ' & - ,dsetrank,iparallel,.true.,foundvar) - - if (associated(cpatch%qmean_fs_open)) & - call hdf_getslab_r(cpatch%qmean_fs_open ,'QMEAN_FS_OPEN_CO ' & - ,dsetrank,iparallel,.true.,foundvar) - - if (associated(cpatch%qmean_fsn)) & - call hdf_getslab_r(cpatch%qmean_fsn ,'QMEAN_FSN_CO ' & - ,dsetrank,iparallel,.true.,foundvar) - - if (associated(cpatch%qmean_fsw)) & - call hdf_getslab_r(cpatch%qmean_fsw ,'QMEAN_FSW_CO ' & - ,dsetrank,iparallel,.true.,foundvar) - - if (associated(cpatch%qmean_psi_open)) & - call hdf_getslab_r(cpatch%qmean_psi_open ,'QMEAN_PSI_OPEN_CO ' & - ,dsetrank,iparallel,.true.,foundvar) - - if (associated(cpatch%qmean_psi_closed)) & - call hdf_getslab_r(cpatch%qmean_psi_closed ,'QMEAN_PSI_CLOSED_CO ' & - ,dsetrank,iparallel,.true.,foundvar) - - if (associated(cpatch%qmean_water_supply)) & - call hdf_getslab_r(cpatch%qmean_water_supply,'QMEAN_WATER_SUPPLY_CO ' & - ,dsetrank,iparallel,.true.,foundvar) - if (associated(cpatch%qmean_par_l )) & - call hdf_getslab_r(cpatch%qmean_par_l ,'QMEAN_PAR_L ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%qmean_par_l_beam )) & - call hdf_getslab_r(cpatch%qmean_par_l_beam ,'QMEAN_PAR_L_BEAM ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%qmean_par_l_diff )) & - call hdf_getslab_r(cpatch%qmean_par_l_diff ,'QMEAN_PAR_L_DIFF ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%qmean_rshort_l )) & - call hdf_getslab_r(cpatch%qmean_rshort_l ,'QMEAN_RSHORT_L ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%qmean_rlong_l )) & - call hdf_getslab_r(cpatch%qmean_rlong_l ,'QMEAN_RLONG_L ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%qmean_sensible_lc )) & - call hdf_getslab_r(cpatch%qmean_sensible_lc ,'QMEAN_SENSIBLE_LC_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%qmean_vapor_lc )) & - call hdf_getslab_r(cpatch%qmean_vapor_lc ,'QMEAN_VAPOR_LC_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%qmean_transp )) & - call hdf_getslab_r(cpatch%qmean_transp ,'QMEAN_TRANSP_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%qmean_intercepted_al)) & - call hdf_getslab_r(cpatch%qmean_intercepted_al,'QMEAN_INTERCEPTED_AL_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%qmean_wshed_lg )) & - call hdf_getslab_r(cpatch%qmean_wshed_lg ,'QMEAN_WSHED_LG_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%qmean_rshort_w )) & - call hdf_getslab_r(cpatch%qmean_rshort_w ,'QMEAN_RSHORT_W ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%qmean_rlong_w )) & - call hdf_getslab_r(cpatch%qmean_rlong_w ,'QMEAN_RLONG_W ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%qmean_sensible_wc )) & - call hdf_getslab_r(cpatch%qmean_sensible_wc ,'QMEAN_SENSIBLE_WC_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%qmean_vapor_wc )) & - call hdf_getslab_r(cpatch%qmean_vapor_wc ,'QMEAN_VAPOR_WC_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%qmean_intercepted_aw)) & - call hdf_getslab_r(cpatch%qmean_intercepted_aw,'QMEAN_INTERCEPTED_AW_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - if (associated(cpatch%qmean_wshed_wg )) & - call hdf_getslab_r(cpatch%qmean_wshed_wg ,'QMEAN_WSHED_WG_CO ' & - ,dsetrank,iparallel,.false.,foundvar) - end if + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! 2-D variables, dimensions: (ndcycle,npatches). ! + !---------------------------------------------------------------------------------------! + dsetrank = 2 + globdims(1) = int(ndcycle,8) + chnkdims(1) = int(ndcycle,8) + chnkoffs(1) = 0_8 + memdims (1) = int(ndcycle,8) + memsize (1) = int(ndcycle,8) + memoffs (1) = 0_8 + globdims(2) = int(ncohorts_global,8) + chnkdims(2) = int(cpatch%ncohorts,8) + chnkoffs(2) = int(paco_index - 1 ,8) + memdims (2) = int(cpatch%ncohorts,8) + memsize (2) = int(cpatch%ncohorts,8) + memoffs (2) = 0_8 + !----- Mean diel. ----------------------------------------------------------------------! + if (writing_dcyc) then + call hdf_getslab_r(cpatch%qmean_gpp & + ,'QMEAN_GPP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_npp & + ,'QMEAN_NPP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_leaf_resp & + ,'QMEAN_LEAF_RESP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_root_resp & + ,'QMEAN_ROOT_RESP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_growth_resp & + ,'QMEAN_GROWTH_RESP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_storage_resp & + ,'QMEAN_STORAGE_RESP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_vleaf_resp & + ,'QMEAN_VLEAF_RESP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_plresp & + ,'QMEAN_PLRESP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_leaf_energy & + ,'QMEAN_LEAF_ENERGY_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_leaf_water & + ,'QMEAN_LEAF_WATER_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_leaf_hcap & + ,'QMEAN_LEAF_HCAP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_leaf_vpdef & + ,'QMEAN_LEAF_VPDEF_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_leaf_temp & + ,'QMEAN_LEAF_TEMP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_leaf_fliq & + ,'QMEAN_LEAF_FLIQ_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_leaf_gsw & + ,'QMEAN_LEAF_GSW_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_leaf_gbw & + ,'QMEAN_LEAF_GBW_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_wood_energy & + ,'QMEAN_WOOD_ENERGY_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_wood_water & + ,'QMEAN_WOOD_WATER_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_wood_hcap & + ,'QMEAN_WOOD_HCAP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_wood_temp & + ,'QMEAN_WOOD_TEMP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_wood_fliq & + ,'QMEAN_WOOD_FLIQ_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_wood_gbw & + ,'QMEAN_WOOD_GBW_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_fs_open & + ,'QMEAN_FS_OPEN_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_fsw & + ,'QMEAN_FSW_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_fsn & + ,'QMEAN_FSN_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_psi_open & + ,'QMEAN_PSI_OPEN_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_psi_closed & + ,'QMEAN_PSI_CLOSED_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_water_supply & + ,'QMEAN_WATER_SUPPLY_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_light_level & + ,'QMEAN_LIGHT_LEVEL_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_light_level_beam & + ,'QMEAN_LIGHT_LEVEL_BEAM_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_light_level_diff & + ,'QMEAN_LIGHT_LEVEL_DIFF_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_par_l & + ,'QMEAN_PAR_L_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_par_l_beam & + ,'QMEAN_PAR_L_BEAM_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_par_l_diff & + ,'QMEAN_PAR_L_DIFF_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_rshort_l & + ,'QMEAN_RSHORT_L_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_rlong_l & + ,'QMEAN_RLONG_L_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_sensible_lc & + ,'QMEAN_SENSIBLE_LC_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_vapor_lc & + ,'QMEAN_VAPOR_LC_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_transp & + ,'QMEAN_TRANSP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_intercepted_al & + ,'QMEAN_INTERCEPTED_AL_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_wshed_lg & + ,'QMEAN_WSHED_LG_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_rshort_w & + ,'QMEAN_RSHORT_W_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_rlong_w & + ,'QMEAN_RLONG_W_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_sensible_wc & + ,'QMEAN_SENSIBLE_WC_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_vapor_wc & + ,'QMEAN_VAPOR_WC_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_intercepted_aw & + ,'QMEAN_INTERCEPTED_AW_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmean_wshed_wg & + ,'QMEAN_WSHED_WG_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmsqu_gpp & + ,'QMSQU_GPP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmsqu_npp & + ,'QMSQU_NPP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmsqu_plresp & + ,'QMSQU_PLRESP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmsqu_sensible_lc & + ,'QMSQU_SENSIBLE_LC_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmsqu_vapor_lc & + ,'QMSQU_VAPOR_LC_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmsqu_transp & + ,'QMSQU_TRANSP_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmsqu_sensible_wc & + ,'QMSQU_SENSIBLE_WC_CO ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cpatch%qmsqu_vapor_wc & + ,'QMSQU_VAPOR_WC_CO ',dsetrank,iparallel,.false.,foundvar) + end if + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! return diff --git a/ED/src/io/ed_load_namelist.f90 b/ED/src/io/ed_load_namelist.f90 index 324dc573a..ab8479de1 100644 --- a/ED/src/io/ed_load_namelist.f90 +++ b/ED/src/io/ed_load_namelist.f90 @@ -197,7 +197,14 @@ subroutine copy_nl(copy_type) , event_file & ! intent(out) , iallom & ! intent(out) , igrass & ! intent(out) - , min_site_area ! ! intent(out) + , min_site_area & ! intent(out) + , fast_diagnostics & ! intent(out) + , writing_dail & ! intent(out) + , writing_mont & ! intent(out) + , writing_dcyc & ! intent(out) + , writing_year & ! intent(out) + , writing_long & ! intent(out) + , writing_eorq ! ! intent(out) use grid_coms , only : time & ! intent(out) , centlon & ! intent(out) , centlat & ! intent(out) @@ -630,6 +637,17 @@ subroutine copy_nl(copy_type) + !----- Define some useful variables that control the output. ---------------------------! + writing_dail = idoutput > 0 + writing_mont = imoutput > 0 + writing_dcyc = iqoutput > 0 + writing_year = iyoutput > 0 + writing_long = writing_dail .or. writing_mont .or. writing_dcyc + writing_eorq = writing_mont .or. writing_dcyc + fast_diagnostics = ifoutput /= 0 .or. idoutput /= 0 .or. & + imoutput /= 0 .or. iqoutput /= 0 .or. itoutput /= 0 + !---------------------------------------------------------------------------------------! + return end subroutine copy_nl diff --git a/ED/src/io/ed_opspec.F90 b/ED/src/io/ed_opspec.F90 index e4a5bc0b7..162c587fc 100644 --- a/ED/src/io/ed_opspec.F90 +++ b/ED/src/io/ed_opspec.F90 @@ -428,6 +428,7 @@ end subroutine ed_opspec_par subroutine ed_opspec_times use ed_misc_coms , only : frqfast & ! intent(in) , frqstate & ! intent(in) + , frqsum & ! intent(in) , imontha & ! intent(in) , idatea & ! intent(in) , iyeara & ! intent(in) @@ -964,7 +965,7 @@ subroutine ed_opspec_times ! time, so that the integrated variables reported in the history file are integrated ! ! over the history period. ! !---------------------------------------------------------------------------------------! - if (isoutput /= 0 .and. ifoutput /= 0) then + if (isoutput /= 0 .and. (ifoutput /= 0 .or. iqoutput /= 0)) then if (unitfast == unitstate .and. mod(frqstate,frqfast) /= 0.0 ) then write(reason,fmt='(a,1x,2(a,1x,f10.2,1x))') & 'FRQFAST must be a divisor of FRQSTATE if both are outputing data.', & @@ -981,12 +982,14 @@ subroutine ed_opspec_times write(reason,fmt='(a,1x,2(a,1x,f10.2,1x))') & 'FRQFAST must be a divisor of FRQSTATE if both are outputing data.', & 'Yours is set to FRQFAST=',frqfast,'sec and FRQSTATE=',frqstate,'days!' + ifaterr=ifaterr+1 end if case (2,3) !---- State in months or years, frqfast must be divisor of 1 day ------! if (mod(frqstate*day_sec,frqfast) /= 0.0) then write(reason,fmt='(a,1x,a,1x,f10.2,1x,a,1x,f10.2)') & 'FRQFAST must be a divisor of one day when frqfast is in seconds and', & 'FRQSTATE is in months or years. Your FRQFAST=',frqfast,'sec.' + ifaterr=ifaterr+1 end if end select @@ -997,6 +1000,7 @@ subroutine ed_opspec_times write(reason,fmt='(a,1x,a,1x,f10.2,1x,a,1x,f10.2,1x,a)') & 'FRQFAST must be a divisor of FRQSTATE if both are outputing data.', & 'Yours is set to FRQFAST=',frqfast,'days and FRQSTATE=',frqstate,'sec!' + ifaterr=ifaterr+1 end if case (2,3) !---- State in months or years, frqfast must be divisor of 1 day ------! @@ -1004,6 +1008,7 @@ subroutine ed_opspec_times write(reason,fmt='(a,1x,a,1x,f10.2,1x,a,1x,f10.2,1x,a)') & 'FRQFAST must be a divisor of one day or 1 day when UNITFAST is in', & 'days and FRQSTATE is in months or years. Your FRQFAST=',frqfast,'days.' + ifaterr=ifaterr+1 end if end select @@ -1014,6 +1019,7 @@ subroutine ed_opspec_times write(reason,fmt='(a,1x,a,1x,i5)') & 'If UNITFAST is in months, UNITSTATE must be either months or year, and', & 'currently UNITSTATE=',unitstate + ifaterr=ifaterr+1 case (3) !---- State years, frqfast must be divisor ------------------------------! if (mod(frqstate*12.,frqfast) /= 0.) then @@ -1021,6 +1027,7 @@ subroutine ed_opspec_times 'FRQFAST must be a divisor of FRQSTATE if both are outputing data.', & 'Yours is set to FRQFAST=',frqfast,'mon and FRQSTATE=',frqstate,'yrs!' end if + ifaterr=ifaterr+1 end select @@ -1030,17 +1037,21 @@ subroutine ed_opspec_times write(reason,fmt='(a,1x,a,1x,i5)') & 'If UNITFAST is in months, UNITSTATE must be either months or year, and', & 'currently UNITSTATE=',unitstate + ifaterr=ifaterr+1 case (2) !---- State months, frqfast must be divisor -----------------------------! if (mod(frqstate,frqfast*12.) /= 0.) then write(reason,fmt='(a,1x,2(a,1x,f10.2,1x),a)') & 'FRQFAST must be a divisor of FRQSTATE if both are outputing data.', & 'Yours is set to FRQFAST=',frqfast,'yrs and FRQSTATE=',frqstate,'mon!' + ifaterr=ifaterr+1 end if end select end select end if + !----- + !Check if this simulation has a positive timmax. if (timmax < 0.0d0) then @@ -1052,21 +1063,36 @@ subroutine ed_opspec_times ifaterr=ifaterr+1 end if - !if (mod(hr_sec,dtlsm) /= 0.0) then - ! write(reason,fmt='(a,1x,f8.2,1x,a,1x,es14.7)') & - ! 'DTLSM must be a divisor of ',hr_sec,' sec. Yours is set to ',dtlsm - ! call opspec_fatal(reason,'opspec_times') - ! ifaterr=ifaterr+1 - !end if + !---------------------------------------------------------------------------------------! + ! If we made up to this point, find frqsum so we make sure that the main time step ! + ! and the radiation are both divisors of the frequency of output. ! + !---------------------------------------------------------------------------------------! + if (ifaterr == 0) then + call find_frqsum() + + !----- Check whether the time steps make sense. -------------------------------------! + if (mod(frqsum,dtlsm) /= 0.0) then + write(reason,fmt='(a,1x,f8.2,1x,a,1x,es14.7)') & + 'DTLSM must be a divisor of ',frqsum,' sec. Yours is set to ',dtlsm + call opspec_fatal(reason,'opspec_times') + ifaterr=ifaterr+1 + end if + + if (mod(frqsum,radfrq) /= 0.0) then + write(reason,fmt='(a,1x,f8.2,1x,a,1x,es14.7)') & + 'RADFRQ must be a divisor of ',frqsum,' sec. Yours is set to ',radfrq + call opspec_fatal(reason,'opspec_times') + ifaterr=ifaterr+1 + end if + !------------------------------------------------------------------------------------! + end if + !---------------------------------------------------------------------------------------! + + + - !if (mod(hr_sec,radfrq) /= 0.0) then - ! write(reason,fmt='(a,1x,f8.2,1x,a,1x,es14.7)') & - ! 'RADFRQ must be a divisor of ',hr_sec,' sec. Yours is set to ',radfrq - ! call opspec_fatal(reason,'opspec_times') - ! ifaterr=ifaterr+1 - !end if - ! Not sure if this is really necessary. If not, please remove it... + !----- DTLSM must be an integer divisor of RADFRQ so integrals make sense. -------------! if (mod(radfrq,dtlsm) /= 0.0) then write(reason,fmt='(a,1x,f8.2,1x,a,1x,f8.2,a)') & 'DTLSM must be a divisor of RADFRQ. Your DTLSM is set to',dtlsm, & @@ -1074,15 +1100,24 @@ subroutine ed_opspec_times call opspec_fatal(reason,'opspec_times') ifaterr=ifaterr+1 end if + !---------------------------------------------------------------------------------------! + - ! Stop the run if there are any fatal errors. + + + !------ Stop the run if there are any fatal errors. ------------------------------------! if (ifaterr > 0) then - write (unit=*,fmt='(a)') ' -----------ED_OPSPEC_TIMES -------------------------' + write (unit=*,fmt='(a)') ' -----------ED_OPSPEC_TIMES ------------------------' write (unit=*,fmt='(a,1x,i5)') ' Fatal errors:',ifaterr - write (unit=*,fmt='(a)') ' ----------------------------------------------------' + write (unit=*,fmt='(a)') ' ---------------------------------------------------' call fatal_error('Fatal errors at namelist - Time settings '& & ,'ed_opspec_times','ed_opspec.f90') end if + !---------------------------------------------------------------------------------------! + + + + return end subroutine ed_opspec_times !==========================================================================================! diff --git a/ED/src/io/ed_read_ed10_20_history.f90 b/ED/src/io/ed_read_ed10_20_history.f90 index 1f964549e..23ff68056 100644 --- a/ED/src/io/ed_read_ed10_20_history.f90 +++ b/ED/src/io/ed_read_ed10_20_history.f90 @@ -137,8 +137,6 @@ subroutine read_ed10_ed20_history_file real :: dummy real :: area_tot real :: area_sum - real :: poly_lai - real :: site_lai real(kind=8) , dimension(max_water) :: dwater real(kind=8) :: dage real(kind=8) :: darea @@ -194,13 +192,12 @@ subroutine read_ed10_ed20_history_file ! test. ! !---------------------------------------------------------------------------------! if (harvard_override) then - cpoly%lsl(1) = 1 - cgrid%lsl(ipy) = 1 - cgrid%ntext_soil(1,ipy) = 2 - cgrid%ntext_soil(2,ipy) = 2 - cgrid%ntext_soil(3,ipy) = 3 - cgrid%ntext_soil(4,ipy) = 3 - cgrid%ncol_soil(ipy) = 10 + cpoly%lsl(1) = 1 + cpoly%ntext_soil(1,isi) = 2 + cpoly%ntext_soil(2,isi) = 2 + cpoly%ntext_soil(3,isi) = 3 + cpoly%ntext_soil(4,isi) = 3 + cpoly%ncol_soil(isi) = 10 end if @@ -776,7 +773,6 @@ subroutine read_ed10_ed20_history_file do isi = 1,cpoly%nsites area_sum = 0.0 - site_lai = 0.0 ncohorts = 0 @@ -788,16 +784,11 @@ subroutine read_ed10_ed20_history_file !----- Find the patch-level LAI, WAI, and CAI. --------------------------------! do ipa=1,csite%npatches area_sum = area_sum + csite%area(ipa) - csite%lai(ipa) = 0.0 - csite%wai(ipa) = 0.0 - + cpatch => csite%patch(ipa) do ico = 1,cpatch%ncohorts - csite%lai(ipa) = csite%lai(ipa) + cpatch%lai(ico) - csite%wai(ipa) = csite%wai(ipa) + cpatch%wai(ico) ncohorts = ncohorts + 1 end do - site_lai = site_lai + csite%area(ipa) * csite%lai(ipa) end do !----- Initialise the cohort variables, then sort them by size. ---------------! @@ -823,7 +814,6 @@ subroutine read_ed10_ed20_history_file !----- Get a diagnostic on the polygon's vegetation. -----------------------------! - poly_lai = 0.0 ncohorts = 0 do isi = 1,cpoly%nsites @@ -831,19 +821,13 @@ subroutine read_ed10_ed20_history_file csite => cpoly%site(isi) do ipa = 1,csite%npatches - csite%lai(ipa) = 0.0 - csite%wai(ipa) = 0.0 npatchco = 0 cpatch => csite%patch(ipa) do ico = 1,cpatch%ncohorts ncohorts = ncohorts+1 npatchco = npatchco+1 - csite%lai(ipa) = csite%lai(ipa) + cpatch%lai(ico) - csite%wai(ipa) = csite%wai(ipa) + cpatch%wai(ico) end do - - poly_lai = poly_lai + cpoly%area(isi) * csite%area(ipa) * csite%lai(ipa) csite%cohort_count(ipa) = npatchco nsitepat = nsitepat + 1 end do diff --git a/ED/src/io/ed_read_ed21_history.F90 b/ED/src/io/ed_read_ed21_history.F90 index 936ffe803..6768cfa5f 100644 --- a/ED/src/io/ed_read_ed21_history.F90 +++ b/ED/src/io/ed_read_ed21_history.F90 @@ -330,7 +330,6 @@ subroutine read_ed21_history_file !---- The ipy:ipy notation is needed for ifort when checking interfaces. ---------! call hdf_getslab_i(cgrid%load_adjacency(ipy:ipy),'LOAD_ADJACENCY ' & ,dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_i(cgrid%ncol_soil(ipy:ipy),'NCOL_SOIL ',dsetrank,iparallel,.true.,foundvar) call hdf_getslab_r(cgrid%wbar(ipy:ipy),'WBAR ',dsetrank,iparallel,.true.,foundvar) !----- Load the workload (2D). ---------------------------------------------------! @@ -353,30 +352,6 @@ subroutine read_ed21_history_file - !----- Load 2D dataset. ----------------------------------------------------------! - dsetrank = 2_8 - globdims(1) = int(dset_nzg,8) ! How many layers in the dataset? - chnkdims(1) = int(1,8) ! We are only extracting one layer - memdims(1) = int(1,8) ! We only need memory for one layer - memsize(1) = int(1,8) ! On both sides - chnkoffs(1) = int(dset_nzg - 1,8) ! Take the top layer, not the bottom - memoffs(1) = 0_8 - globdims(2) = int(dset_npolygons_global,8) - chnkdims(2) = 1_8 - memdims(2) = 1_8 - memsize(2) = 1_8 - chnkoffs(2) = int(py_index - 1,8) - memoffs(2) = 0_8 - call hdf_getslab_i(cgrid%ntext_soil(nzg:nzg,ipy),'NTEXT_SOIL ',dsetrank & - ,iparallel,.true.,foundvar) - !----- Now fill the soil column based on the top layer data. ---------------------! - do k=1,nzg-1 - cgrid%ntext_soil(k,ipy) = cgrid%ntext_soil(nzg,ipy) - end do - !---------------------------------------------------------------------------------! - - - !----- Load the lakesite data-----------------------------------------------------! allocate(islakesite(pysi_n(py_index))) islakesite = 0 @@ -395,6 +370,7 @@ subroutine read_ed21_history_file !----- Allocate the vector of sites in the polygon. ------------------------------! call allocate_polygontype(cpoly,ndry_sites) + call soil_default_fill(cgrid,igr,ipy) !---------------------------------------------------------------------------------! is = 0 @@ -442,8 +418,6 @@ subroutine read_ed21_history_file , dsetrank, iparallel, .true.,foundvar) call hdf_getslab_i( cpoly%patch_count(is:is), 'PATCH_COUNT ' & , dsetrank, iparallel, .true.,foundvar) - call hdf_getslab_i( cpoly%ncol_soil (is:is), 'NCOL_SOIL_SI ' & - , dsetrank, iparallel, .true.,foundvar) !----- Load 2D dataset. ----------------------------------------------------! dsetrank = 2_8 @@ -460,18 +434,9 @@ subroutine read_ed21_history_file memdims(2) = int(1,8) memsize(2) = int(1,8) memoffs(2) = 0_8 - call hdf_getslab_i(cpoly%ntext_soil(nzg:nzg,is:is),'NTEXT_SOIL_SI ' & + call hdf_getslab_i(cpoly%ntext_soil(nzg:nzg,is:is),'NTEXT_SOIL ' & ,dsetrank,iparallel,.true.,foundvar) - - - - !---------------------------------------------------------------------------! - ! The soil layer in this case is use defined, so take this from the ! - ! grid level variable, and not from the dataset. ! - !---------------------------------------------------------------------------! - cpoly%lsl(is) = cgrid%lsl(ipy) ! Initialize lowest soil layer - !----- Now fill the soil column based on the top layer data. ---------------! do k=1,nzg-1 cpoly%ntext_soil(k,is) = cpoly%ntext_soil(nzg,is) @@ -552,8 +517,6 @@ subroutine read_ed21_history_file !---------------------------------------------------------------------! ! Initialise patch-level variables that depend on the cohort ones. ! !---------------------------------------------------------------------! - csite%lai(ipa) = 0.0 - csite%wai(ipa) = 0.0 csite%plant_ag_biomass(ipa) = 0.0 pa_index = sipa_id(si_index) + ipa - 1 @@ -775,8 +738,6 @@ subroutine read_ed21_history_file !----- Update the derived patch-level variables. ---------------! - csite%lai(ipa) = csite%lai(ipa) + cpatch%lai(ico) - csite%wai(ipa) = csite%wai(ipa) + cpatch%wai(ico) csite%plant_ag_biomass(ipa) = csite%plant_ag_biomass(ipa) & + cpatch%agb(ico)*cpatch%nplant(ico) @@ -1521,7 +1482,7 @@ subroutine read_ed21_history_unstruct , dsetrank, iparallel, .true.,foundvar) call hdf_getslab_i( tpoly_patch_count(is:is) , 'PATCH_COUNT ' & , dsetrank, iparallel, .true.,foundvar) - call hdf_getslab_i( tpoly_lsl (is:is) ,'LSL_SI ' & + call hdf_getslab_i( tpoly_lsl (is:is) ,'LSL ' & , dsetrank, iparallel, .true.,foundvar) !------------------------------------------------------------------------! @@ -1540,7 +1501,7 @@ subroutine read_ed21_history_unstruct memdims(2) = int(1,8) memsize(2) = int(1,8) memoffs(2) = 0_8 - call hdf_getslab_i( this_ntext (:,is) , 'NTEXT_SOIL_SI ' & + call hdf_getslab_i( this_ntext (:,is) , 'NTEXT_SOIL ' & , dsetrank, iparallel, .true.,foundvar) !------------------------------------------------------------------------! @@ -1738,8 +1699,6 @@ subroutine read_ed21_history_unstruct ! Initialise patch-level variables that depend on the cohort ! ! ones. ! !---------------------------------------------------------------------! - csite%lai(ipa) = 0.0 - csite%wai(ipa) = 0.0 csite%plant_ag_biomass(ipa) = 0.0 pa_index = sipa_id(si_index) + ipa - 1 @@ -1955,8 +1914,6 @@ subroutine read_ed21_history_unstruct !----- Update the derived patch-level variables. ---------------! - csite%lai(ipa) = csite%lai(ipa) + cpatch%lai(ico) - csite%wai(ipa) = csite%wai(ipa) + cpatch%wai(ico) csite%plant_ag_biomass(ipa) = csite%plant_ag_biomass(ipa) & + cpatch%agb(ico)*cpatch%nplant(ico) @@ -2041,6 +1998,13 @@ subroutine read_ed21_history_unstruct return end subroutine read_ed21_history_unstruct +!==========================================================================================! +!==========================================================================================! + + + + + !==========================================================================================! !==========================================================================================! @@ -2051,7 +2015,6 @@ end subroutine read_ed21_history_unstruct ! Aside from doing a history restart, this is the closest method to getting exact clones ! ! of the donor polygons. ! !==========================================================================================! - subroutine read_ed21_polyclone #if USE_HDF5 @@ -2626,11 +2589,12 @@ subroutine read_ed21_polyclone ndry_sites = int(pysi_n(py_index))-sum(islakesite) !------------------------------------------------------------------------------! + !------------------------------------------------------------------------------! ! Allocate the destination polygon with site level vector data ! !------------------------------------------------------------------------------! - call allocate_polygontype(cpoly,ndry_sites) + call soil_default_fill(cgrid,igr,ipy) !------------------------------------------------------------------------------! @@ -2665,20 +2629,18 @@ subroutine read_ed21_polyclone call hdf_getslab_i(cpoly%patch_count(is:is),'PATCH_COUNT ',dsetrank,iparallel,.true.,foundvar) call hdf_getslab_i(cpoly%sitenum(is:is),'SITENUM ',dsetrank,iparallel,.true.,foundvar) - call hdf_getslab_i(cpoly%lsl(is:is),'LSL_SI ',dsetrank,iparallel,.true.,foundvar) - - call hdf_getslab_i(cpoly%ncol_soil(is:is),'NCOL_SOIL_SI ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_i(cpoly%lsl(is:is),'LSL ',dsetrank,iparallel,.true.,foundvar) + call hdf_getslab_i(cpoly%ncol_soil(is:is),'NCOL_SOIL ',dsetrank,iparallel,.false.,foundvar) ! If this data is not available in the dataset, we should really just use ! a default value. It is probably not a good idea to use values derived from ! a soils dataset earlier in the code, if we are no longer using the associated ! textures. - if (cpoly%ncol_soil(is).eq.0) then + if (cpoly%ncol_soil(is) == 0) then write (unit=*,fmt='(a,i3)') & 'Soil color info not in ED2.1 state file, using ISOILCOL=',isoilcol cpoly%ncol_soil(is) = isoilcol - cgrid%ncol_soil(ipy) = isoilcol end if @@ -2714,7 +2676,7 @@ subroutine read_ed21_polyclone memoffs(2) = 0_8 call hdf_getslab_i( this_ntext(:), & - 'NTEXT_SOIL_SI ',dsetrank, iparallel, .true.,foundvar) + 'NTEXT_SOIL ',dsetrank, iparallel, .true.,foundvar) @@ -2902,8 +2864,6 @@ subroutine read_ed21_polyclone ! Initialise patch-level variables that depend on the cohort ! ! ones. ! !---------------------------------------------------------------------! - csite%lai(ipa) = 0.0 - csite%wai(ipa) = 0.0 csite%plant_ag_biomass(ipa) = 0.0 pa_index = sipa_id(si_index) + ipa - 1 @@ -3119,8 +3079,6 @@ subroutine read_ed21_polyclone !----- Update the derived patch-level variables. ---------------! - csite%lai(ipa) = csite%lai(ipa) + cpatch%lai(ico) - csite%wai(ipa) = csite%wai(ipa) + cpatch%wai(ico) csite%plant_ag_biomass(ipa) = csite%plant_ag_biomass(ipa) & + cpatch%agb(ico)*cpatch%nplant(ico) diff --git a/ED/src/io/edio.f90 b/ED/src/io/edio.f90 index c41c19a05..9d05a3159 100644 --- a/ED/src/io/edio.f90 +++ b/ED/src/io/edio.f90 @@ -3,8 +3,7 @@ ! This is the main driver for file output in ED. ! !------------------------------------------------------------------------------------------! subroutine ed_output(analysis_time,new_day,dail_analy_time,mont_analy_time,dcyc_analy_time & - ,annual_time,writing_dail,writing_mont,writing_dcyc,history_time & - ,dcycle_time,the_end) + ,annual_time,history_time,dcycle_time,the_end) use ed_state_vars, only : edgrid_g & ! structure , filltab_alltypes & ! subroutine @@ -15,13 +14,12 @@ subroutine ed_output(analysis_time,new_day,dail_analy_time,mont_analy_time,dcyc_ , nnodetot ! ! intent(in) use ed_misc_coms , only : dtlsm & ! intent(in) , current_time & ! intent(in) - , idoutput & ! intent(in) - , imoutput & ! intent(in) - , iqoutput & ! intent(in) - , iyoutput & ! intent(in) , isoutput & ! intent(in) , ifoutput & ! intent(in) , itoutput & ! intent(in) + , writing_dail & ! intent(in) + , writing_mont & ! intent(in) + , writing_dcyc & ! intent(in) , iprintpolys & ! intent(in) , frqsum ! ! intent(in) @@ -32,9 +30,6 @@ subroutine ed_output(analysis_time,new_day,dail_analy_time,mont_analy_time,dcyc_ logical, intent(in) :: dail_analy_time logical, intent(in) :: mont_analy_time logical, intent(in) :: dcyc_analy_time - logical, intent(in) :: writing_dail - logical, intent(in) :: writing_mont - logical, intent(in) :: writing_dcyc logical, intent(in) :: history_time logical, intent(in) :: dcycle_time logical, intent(in) :: new_day @@ -72,15 +67,14 @@ subroutine ed_output(analysis_time,new_day,dail_analy_time,mont_analy_time,dcyc_ if ( analysis_time .or. history_time .or. dcycle_time .or. & (new_day .and. (writing_dail .or. writing_mont .or. writing_dcyc))) then do ifm=1,ngrids - call normalize_averaged_vars(edgrid_g(ifm),frqsum,dtlsm) + call normalize_ed_fmean_vars (edgrid_g(ifm)) + call aggregate_polygon_fmean (edgrid_g(ifm)) end do - !----- Perform averaging and data preparation. --------------------------------------! - call spatial_averages - if (writing_dail .or. writing_mont .or. writing_dcyc) then do ifm=1,ngrids - call integrate_ed_daily_output_flux(edgrid_g(ifm)) + call integrate_ed_dmean_vars(edgrid_g(ifm)) + if (writing_dcyc) call integrate_ed_qmean_vars(edgrid_g(ifm)) end do end if end if @@ -107,19 +101,18 @@ subroutine ed_output(analysis_time,new_day,dail_analy_time,mont_analy_time,dcyc_ !----- Daily analysis output and monthly integration. ----------------------------------! if (new_day .and. (writing_dail .or. writing_mont .or. writing_dcyc)) then - call avg_ed_daily_output_pool() do ifm=1,ngrids - call normalize_ed_daily_output_vars(edgrid_g(ifm)) + call normalize_ed_dmean_vars(edgrid_g(ifm)) if (writing_mont .or. writing_dcyc) then - call integrate_ed_monthly_output_vars(edgrid_g(ifm)) + call integrate_ed_mmean_vars(edgrid_g(ifm)) end if end do if (dail_analy_time) call h5_output('DAIL') do ifm=1,ngrids - call zero_ed_daily_output_vars(edgrid_g(ifm)) + call zero_ed_dmean_vars(edgrid_g(ifm)) end do end if !---------------------------------------------------------------------------------------! @@ -130,12 +123,14 @@ subroutine ed_output(analysis_time,new_day,dail_analy_time,mont_analy_time,dcyc_ !----- Monthly analysis and monthly mean diurnal cycle output. -------------------------! if (mont_analy_time .or. dcyc_analy_time) then do ifm=1,ngrids - call normalize_ed_monthly_output_vars(edgrid_g(ifm)) + call normalize_ed_mmean_vars(edgrid_g(ifm)) + if (writing_dcyc) call normalize_ed_qmean_vars(edgrid_g(ifm)) end do if (mont_analy_time) call h5_output('MONT') if (dcyc_analy_time) call h5_output('DCYC') do ifm=1,ngrids - call zero_ed_monthly_output_vars(edgrid_g(ifm)) + call zero_ed_mmean_vars(edgrid_g(ifm)) + if (writing_dcyc) call zero_ed_qmean_vars(edgrid_g(ifm)) end do end if !---------------------------------------------------------------------------------------! @@ -173,142 +168,14 @@ end subroutine ed_output !==========================================================================================! !==========================================================================================! -! This subroutine calculates the polygon average of the carbon and nitrogen POOLS for ! -! outputting at a DAILY timestep. ! +! The following subroutine finds the polygon averages from site-, patch-, and cohort- ! +! -level properties that have fmean variables associated. ! !------------------------------------------------------------------------------------------! -subroutine avg_ed_daily_output_pool() - use ed_state_vars, only : edtype & ! structure - , polygontype & ! structure - , sitetype & ! structure - , patchtype & ! structure - , edgrid_g ! ! structure - use grid_coms , only : ngrids & ! intent(in) - , nzg & ! intent(in) - , nzs ! ! intent(in) - use pft_coms , only : c2n_leaf & ! intent(in) - , c2n_stem & ! intent(in) - , c2n_storage ! ! intent(in) - implicit none - - !----- Local variables. ----------------------------------------------------------------! - type(edtype) , pointer :: cgrid - type(polygontype), pointer :: cpoly - type(sitetype) , pointer :: csite - type(patchtype) , pointer :: cpatch - integer :: igr - integer :: ipy - integer :: isi - integer :: ipa - integer :: ico - integer :: ipft - real :: area_si - real :: area_pa - !---------------------------------------------------------------------------------------! - - gridloop: do igr=1,ngrids - cgrid => edgrid_g(igr) - - !------------------------------------------------------------------------------------! - ! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! ! - !------------------------------------------------------------------------------------! - ! Please, don't initialise polygon-level (cgrid) variables outside polyloop. ! - ! This works in off-line runs, but it causes memory leaks (and crashes) in the ! - ! coupled runs over the ocean, where cgrid%npolygons can be 0 if one of the sub- ! - ! domains falls entirely over the ocean. Thanks! ! - !------------------------------------------------------------------------------------! - ! cgrid%blah = 0. !<<--- This is a bad way of doing, look inside the loop for the - ! ! safe way of initialising the variable. - !------------------------------------------------------------------------------------! - polygonloop: do ipy=1,cgrid%npolygons - cpoly => cgrid%polygon(ipy) - - !---------------------------------------------------------------------------------! - ! This is the right and safe place to initialise polygon-level (cgrid) vari- ! - ! ables, so in case npolygons is zero this will not cause memory leaks. I know, ! - ! this never happens in off-line runs, but it is quite common in coupled runs... ! - ! Whenever one of the nodes receives a sub-domain where all the points are over ! - ! the ocean, ED will not assign any polygon in that sub-domain, which means that ! - ! that node will have 0 polygons, and the variables cannot be allocated. If you ! - ! try to access the polygon level variable outside the loop, then the model ! - ! crashes due to segmentation violation (a bad thing), whereas by putting the ! - ! variables here both the off-line model and the coupled runs will work, because ! - ! this loop will be skipped when there is no polygon. ! - !---------------------------------------------------------------------------------! - !----- Zero variables. -----------------------------------------------------------! - cgrid%Cleaf (ipy) = 0.0 - cgrid%Croot (ipy) = 0.0 - cgrid%Cstore(ipy) = 0.0 - cgrid%Ccwd (ipy) = -9999. !! haven't figured out simple way to get this yet - cgrid%Nleaf (ipy) = 0.0 - cgrid%Ndead (ipy) = 0.0 - cgrid%Nroot (ipy) = 0.0 - cgrid%Nstore(ipy) = 0.0 - cgrid%Ncwd (ipy) = -9999. !! haven't figured out simple way to get this yet - !! b.c. CWD is an implict part of stsc - - siteloop: do isi=1,cpoly%nsites - csite => cpoly%site(isi) - area_si = cpoly%area(isi) - patchloop: do ipa=1,csite%npatches - cpatch => csite%patch(ipa) - area_pa = area_si * csite%area(ipa) - !---------------------------------------------------------------------------! - ! Here we must include a loop through all cohorts, because this may be ! - ! an empty patch and vector operations cannot be done if the patchtype ! - ! structure is not allocated. This actually happens in both off-line and ! - ! coupled runs, especially over deserts... ! - !---------------------------------------------------------------------------! - cohortloop: do ico = 1,cpatch%ncohorts - ipft = cpatch%pft(ico) - - cgrid%Cleaf(ipy) = cgrid%Cleaf(ipy) & - + cpatch%bleaf(ico) * cpatch%nplant(ico) * area_pa - cgrid%Cstore(ipy) = cgrid%Cstore(ipy) & - + cpatch%bstorage(ico) * cpatch%nplant(ico) * area_pa - cgrid%Croot(ipy) = cgrid%Croot(ipy) & - + cpatch%broot(ico) * cpatch%nplant(ico) * area_pa - - cgrid%Nleaf(ipy) = cgrid%Nleaf(ipy) & - + cpatch%bleaf(ico) * cpatch%nplant(ico) & - / c2n_leaf(ipft) * area_pa - cgrid%Nstore(ipy) = cgrid%Nstore(ipy) & - * cpatch%bstorage(ico) * cpatch%nplant(ico) & - / c2n_storage * area_pa ! C:N not pft specific - !----- It appears we assume leaf and root have same C:N. ----------------! - cgrid%Nroot(ipy) = cgrid%Nroot(ipy) & - + cpatch%broot(ico) * cpatch%nplant(ico) & - / c2n_leaf(ipft) * area_pa - cgrid%Ndead(ipy) = cgrid%Ndead(ipy) & - + cpatch%bdead(ico) * cpatch%nplant(ico) & - / c2n_stem(ipft) * area_pa - end do cohortloop - end do patchloop - end do siteloop - end do polygonloop - end do gridloop - return -end subroutine avg_ed_daily_output_pool -!==========================================================================================! -!==========================================================================================! - - - - - - -!==========================================================================================! -!==========================================================================================! -! The following subroutine performs several spatial averaging functions and temporal ! -! integrations. Specifically, it area averages patch level quantities to the site, and ! -! site level quantities to the polygon. ! -!------------------------------------------------------------------------------------------! -subroutine spatial_averages - +subroutine aggregate_polygon_fmean(cgrid) use ed_state_vars , only : edtype & ! structure , polygontype & ! structure , sitetype & ! structure - , patchtype & ! structure - , edgrid_g ! ! structure + , patchtype ! ! structure use grid_coms , only : ngrids & ! intent(in) , nzg & ! intent(in) , nzs ! ! intent(in) @@ -325,22 +192,33 @@ subroutine spatial_averages , soil & ! intent(in) , dslz ! ! intent(in) use ed_max_dims , only : n_pft ! ! intent(in) + + implicit none - !----- Local variables -----------------------------------------------------------------! - type(edtype) , pointer :: cgrid + !----- Arguments. -----------------------------------------------------------------! + type(edtype) , target :: cgrid + !----- Local variables. ----------------------------------------------------------------! type(polygontype) , pointer :: cpoly type(sitetype) , pointer :: csite type(patchtype) , pointer :: cpatch - real, dimension(3) :: area_sum - real, dimension(nzg) :: site_avg_soil_hcap - real, dimension(nzg) :: poly_avg_soil_hcap - integer :: igr,ipy,isi,ipa,ico,ipft,iatt - integer :: k,ksn + real, dimension(nzg) :: cgrid_fmean_soil_hcap + integer :: ipy + integer :: isi + integer :: ipa + integer :: ico + integer :: p + integer :: d + integer :: k + integer :: ksn integer :: lai_index integer :: nsoil real :: site_area_i real :: poly_area_i - real :: frqsumi + real :: poly_lai + real :: poly_wai + real :: poly_nplant + real :: site_wgt + real :: patch_wgt real :: skin_energy real :: skin_water real :: skin_hcap @@ -350,968 +228,630 @@ subroutine spatial_averages real :: rdepth real :: soil_mstpot real :: can_exner + real :: atm_exner !---------------------------------------------------------------------------------------! - !----- Time scale for output. We will use the inverse more often. ---------------------! - frqsumi = 1.0 / frqsum - gridloop: do igr=1,ngrids - cgrid => edgrid_g(igr) + + + + !---------------------------------------------------------------------------------------! + ! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! ! + !---------------------------------------------------------------------------------------! + ! Please, don't initialise polygon-level (cgrid) variables outside polyloop. This ! + ! works in off-line runs, but it causes memory leaks (and crashes) in the coupled runs ! + ! over the ocean, where cgrid%npolygons can be 0 if one of the sub-domains falls ! + ! entirely over the ocean. Thanks! ! + !---------------------------------------------------------------------------------------! + ! cgrid%blah = 0. !<<--- This is a bad way of doing, look inside the loop for the + ! ! safe way of initialising the variable. + !---------------------------------------------------------------------------------------! + polyloop: do ipy=1,cgrid%npolygons + cpoly => cgrid%polygon(ipy) !------------------------------------------------------------------------------------! - ! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! ! + ! This is the right and safe place to initialise polygon-level (cgrid) vari- ! + ! ables, so in case npolygons is zero this will not cause memory leaks. I know, ! + ! this never happens in off-line runs, but it is quite common in coupled runs... ! + ! Whenever one of the nodes receives a sub-domain where all the points are over the ! + ! ocean, ED will not assign any polygon in that sub-domain, which means that that ! + ! node will have 0 polygons, and the variables cannot be allocated. If you try to ! + ! access the polygon level variable outside the loop, then the model crashes due to ! + ! segmentation violation (a bad thing), whereas by putting the variables here both ! + ! the off-line model and the coupled runs will work, because this loop will be ! + ! skipped when there is no polygon. ! !------------------------------------------------------------------------------------! - ! Please, don't initialise polygon-level (cgrid) variables outside polyloop. ! - ! This works in off-line runs, but it causes memory leaks (and crashes) in the ! - ! coupled runs over the ocean, where cgrid%npolygons can be 0 if one of the sub- ! - ! domains falls entirely over the ocean. Thanks! ! + ! cgrid%blah(ipy) = 0. ! <<- This way works for all cases. !------------------------------------------------------------------------------------! - ! cgrid%blah = 0. !<<--- This is a bad way of doing, look inside the loop for the - ! ! safe way of initialising the variable. + + + !----- Inverse of this polygon area (it should be always 1.) ------------------------! + poly_area_i = 1./sum(cpoly%area) !------------------------------------------------------------------------------------! - polyloop: do ipy=1,cgrid%npolygons - cpoly => cgrid%polygon(ipy) - !----- Initialise some integrated variables --------------------------------------! - area_sum = 0.0 - poly_avg_soil_hcap = 0.0 + !----- Re-set some support variables. -----------------------------------------------! + poly_lai = 0.0 + poly_wai = 0.0 + poly_nplant = 0.0 + cgrid_fmean_soil_hcap(:) = 0.0 + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + ! Loop over sites. ! + !------------------------------------------------------------------------------------! + siteloop: do isi=1,cpoly%nsites + csite => cpoly%site(isi) + + !----- Inverse of this site area (it should be always 1.) ------------------------! + site_area_i=1./sum(csite%area) !---------------------------------------------------------------------------------! - ! This is the right and safe place to initialise polygon-level (cgrid) vari- ! - ! ables, so in case npolygons is zero this will not cause memory leaks. I know, ! - ! this never happens in off-line runs, but it is quite common in coupled runs... ! - ! Whenever one of the nodes receives a sub-domain where all the points are over ! - ! the ocean, ED will not assign any polygon in that sub-domain, which means that ! - ! that node will have 0 polygons, and the variables cannot be allocated. If you ! - ! try to access the polygon level variable outside the loop, then the model ! - ! crashes due to segmentation violation (a bad thing), whereas by putting the ! - ! variables here both the off-line model and the coupled runs will work, because ! - ! this loop will be skipped when there is no polygon. ! - !---------------------------------------------------------------------------------! - cgrid%avg_lai_ebalvars(:,:,ipy) = 0.0 - cgrid%avg_balive (ipy) = 0.0 - cgrid%avg_bleaf (ipy) = 0.0 - cgrid%avg_broot (ipy) = 0.0 - cgrid%avg_bsapwooda (ipy) = 0.0 - cgrid%avg_bsapwoodb (ipy) = 0.0 - cgrid%avg_bdead (ipy) = 0.0 - cgrid%avg_bstorage (ipy) = 0.0 - cgrid%avg_bseeds (ipy) = 0.0 - cgrid%lai (ipy) = 0.0 - cgrid%avg_gpp (ipy) = 0.0 - cgrid%avg_nppleaf (ipy) = 0.0 - cgrid%avg_nppfroot (ipy) = 0.0 - cgrid%avg_nppsapwood (ipy) = 0.0 - cgrid%avg_nppcroot (ipy) = 0.0 - cgrid%avg_nppseeds (ipy) = 0.0 - cgrid%avg_nppwood (ipy) = 0.0 - cgrid%avg_nppdaily (ipy) = 0.0 - cgrid%avg_leaf_resp (ipy) = 0.0 - cgrid%avg_root_resp (ipy) = 0.0 - cgrid%avg_growth_resp (ipy) = 0.0 - cgrid%avg_storage_resp (ipy) = 0.0 - cgrid%avg_vleaf_resp (ipy) = 0.0 - cgrid%avg_plant_resp (ipy) = 0.0 - cgrid%avg_htroph_resp (ipy) = 0.0 - cgrid%avg_cwd_resp (ipy) = 0.0 - cgrid%avg_leaf_drop (ipy) = 0.0 - cgrid%avg_leaf_maintenance(ipy) = 0.0 - cgrid%avg_root_maintenance(ipy) = 0.0 - cgrid%avg_available_water (ipy) = 0.0 - cgrid%max_leaf_temp (ipy) = -huge(1.) - cgrid%min_leaf_temp (ipy) = huge(1.) - cgrid%max_wood_temp (ipy) = -huge(1.) - cgrid%min_wood_temp (ipy) = huge(1.) - - !----- Inverse of this polygon area (it should be always 1.) ---------------------! - poly_area_i = 1./sum(cpoly%area) - siteloop: do isi=1,cpoly%nsites - csite => cpoly%site(isi) - - if (csite%npatches == 0) then - call fatal_error('No patches in this site, impossible!!!' & - &,'spatial_averages','edio.f90') - end if - - !----- Inverse of this site area (it should be always 1.) ---------------------! - site_area_i=1./sum(csite%area) - - !----- LAI --------------------------------------------------------------------! - cpoly%lai(isi) = sum(csite%lai * csite%area ) * site_area_i - cpoly%wai(isi) = sum(csite%wai * csite%area ) * site_area_i - - - !----- Average fast time flux dynamics over sites. ----------------------------! - cpoly%avg_rshort_gnd(isi)= sum(csite%avg_rshort_gnd* csite%area ) * site_area_i - cpoly%avg_par_gnd (isi)= sum(csite%avg_par_gnd * csite%area ) * site_area_i - cpoly%avg_rlong_gnd (isi)= sum(csite%avg_rlong_gnd * csite%area ) * site_area_i - cpoly%avg_rlongup(isi) = sum(csite%avg_rlongup * csite%area ) * site_area_i - cpoly%avg_parup (isi) = sum(csite%avg_parup * csite%area ) * site_area_i - cpoly%avg_nirup (isi) = sum(csite%avg_nirup * csite%area ) * site_area_i - cpoly%avg_rshortup (isi) = sum(csite%avg_rshortup * csite%area ) * site_area_i - cpoly%avg_rnet (isi) = sum(csite%avg_rnet * csite%area ) * site_area_i - cpoly%avg_carbon_ac(isi) = sum(csite%avg_carbon_ac * csite%area ) * site_area_i - cpoly%avg_carbon_st(isi) = sum(csite%avg_carbon_st * csite%area ) * site_area_i - cpoly%avg_vapor_lc(isi) = sum(csite%avg_vapor_lc * csite%area ) * site_area_i - cpoly%avg_vapor_wc(isi) = sum(csite%avg_vapor_wc * csite%area ) * site_area_i - cpoly%avg_vapor_gc(isi) = sum(csite%avg_vapor_gc * csite%area ) * site_area_i - cpoly%avg_wshed_vg(isi) = sum(csite%avg_wshed_vg * csite%area ) * site_area_i - cpoly%avg_vapor_ac(isi) = sum(csite%avg_vapor_ac * csite%area ) * site_area_i - cpoly%avg_transp(isi) = sum(csite%avg_transp * csite%area ) * site_area_i - cpoly%avg_evap(isi) = sum(csite%avg_evap * csite%area ) * site_area_i - cpoly%avg_drainage(isi) = sum(csite%avg_drainage * csite%area ) * site_area_i - cpoly%avg_runoff(isi) = sum(csite%avg_runoff * csite%area ) * site_area_i - cpoly%avg_drainage_heat(isi) = sum(csite%avg_drainage_heat * csite%area ) & - * site_area_i - cpoly%avg_runoff_heat(isi) = sum(csite%avg_runoff_heat * csite%area ) & - * site_area_i - cpoly%avg_intercepted(isi) = sum(csite%avg_intercepted * csite%area ) & - * site_area_i - cpoly%avg_qintercepted(isi) = sum(csite%avg_qintercepted * csite%area ) & - * site_area_i - cpoly%avg_throughfall(isi) = sum(csite%avg_throughfall * csite%area ) & - * site_area_i - cpoly%avg_qthroughfall(isi) = sum(csite%avg_qthroughfall * csite%area ) & - * site_area_i - cpoly%avg_sensible_lc(isi) = sum(csite%avg_sensible_lc * csite%area ) & - * site_area_i - cpoly%avg_sensible_wc(isi) = sum(csite%avg_sensible_wc * csite%area ) & - * site_area_i - cpoly%avg_qwshed_vg(isi) = sum(csite%avg_qwshed_vg * csite%area ) & - * site_area_i - cpoly%avg_sensible_gc(isi) = sum(csite%avg_sensible_gc * csite%area ) & - * site_area_i - cpoly%avg_sensible_ac(isi) = sum(csite%avg_sensible_ac * csite%area ) & - * site_area_i - - !----- Average albedo values. -------------------------------------------------! - cpoly%avg_albedo (isi) = sum(csite%avg_albedo * csite%area) & - * site_area_i - cpoly%avg_albedo_beam (isi) = sum(csite%avg_albedo_beam * csite%area) & - * site_area_i - cpoly%avg_albedo_diffuse (isi) = sum(csite%avg_albedo_diffuse * csite%area) & - * site_area_i - cpoly%avg_rlong_albedo (isi) = sum(csite%avg_rlong_albedo * csite%area) & - * site_area_i - - - !----- Characteristic scales. -------------------------------------------------! - cpoly%avg_ustar (isi) = sum(csite%avg_ustar * csite%area) * site_area_i - cpoly%avg_tstar (isi) = sum(csite%avg_tstar * csite%area) * site_area_i - cpoly%avg_qstar (isi) = sum(csite%avg_qstar * csite%area) * site_area_i - cpoly%avg_cstar (isi) = sum(csite%avg_cstar * csite%area) * site_area_i - - !----- Extra variables for NACP intercomparision (MCD) ------------------------! - cpoly%avg_fsc(isi) = sum(csite%fast_soil_C * csite%area ) & - * site_area_i - cpoly%avg_ssc(isi) = sum(csite%slow_soil_C * csite%area ) & - * site_area_i - cpoly%avg_stsc(isi) = sum(csite%structural_soil_C * csite%area ) & - * site_area_i - cpoly%avg_fsn(isi) = sum(csite%fast_soil_N * csite%area ) & - * site_area_i - cpoly%avg_msn(isi) = sum(csite%mineralized_soil_N * csite%area ) & - * site_area_i - - !----- Available water. -------------------------------------------------------! - cpoly%avg_available_water(isi) = sum(csite%avg_available_water * csite%area) & - * site_area_i - !------------------------------------------------------------------------------! - !------------------------------------------------------------------------------! - ! Find average soil properties. The average soil temperature and liquid ! - ! fraction is not directly computed, since the total mass and therefore the ! - ! total heat capacity (dry + water/ice) is different from each patch. ! - !------------------------------------------------------------------------------! - cpoly%avg_soil_wetness(isi) = 0.0 - cpoly%avg_sensible_gg(:,isi) = matmul(csite%avg_sensible_gg,csite%area) & - * site_area_i - cpoly%avg_smoist_gg(:,isi) = matmul(csite%avg_smoist_gg ,csite%area) & - * site_area_i - cpoly%avg_transloss(:,isi) = matmul(csite%avg_transloss ,csite%area) & - * site_area_i - cpoly%avg_soil_energy(:,isi) = matmul(csite%soil_energy ,csite%area) & - * site_area_i - cpoly%avg_soil_water(:,isi) = matmul(csite%soil_water ,csite%area) & - * site_area_i - !------------------------------------------------------------------------------! - ! Initialise soil moisture potential. ! - !------------------------------------------------------------------------------! - cpoly%avg_soil_mstpot(:,isi) = 0.0 - do k=cpoly%lsl(isi),nzg - !---------------------------------------------------------------------------! - ! Find the mean heat capacity. This shouldn't matter in the current ! - ! version as all patches within the same site have the same soil texture. ! - ! Since heat capacity is given in J/m3/K, it's safe to average it even if ! - ! soil texture changed. ! - !---------------------------------------------------------------------------! - site_avg_soil_hcap(k) = 0. - dslzsum_i = 1./ sum(dslz(cpoly%lsl(isi):nzg)) - - do ipa=1,csite%npatches - nsoil = cpoly%ntext_soil(k,isi) - site_avg_soil_hcap(k) = site_avg_soil_hcap(k) & - + soil(cpoly%ntext_soil(k,isi))%slcpd & - * csite%area(ipa) * site_area_i - !----- Integrate soil wetness. ------------------------------------------! - cpoly%avg_soil_wetness(isi) = cpoly%avg_soil_wetness(isi) & - + ((csite%soil_water(k,ipa) - soil(nsoil)%soilwp)) & - / (soil(nsoil)%slmsts - soil(nsoil)%soilwp) & - * dslz(k) * dslzsum_i * csite%area(ipa) * site_area_i - - !------ Integrate the average soil moisture potential. ------------------! - soil_mstpot = soil(nsoil)%slpots & - * (soil(nsoil)%slmsts / csite%soil_water(k,ipa)) & - ** soil(nsoil)%slbs - cpoly%avg_soil_mstpot(k,isi) = cpoly%avg_soil_mstpot(k,isi) & - + soil_mstpot * csite%area(ipa) & - * site_area_i - end do - !----- Also integrate the polygon-level average. ---------------------------! - poly_avg_soil_hcap(k) = poly_avg_soil_hcap(k) & - + site_avg_soil_hcap(k) * cpoly%area(isi)*poly_area_i - - !----- Finding the average temperature and liquid fraction. ----------------! - call uextcm2tl( cpoly%avg_soil_energy (k,isi) & - , cpoly%avg_soil_water (k,isi) * wdns & - , site_avg_soil_hcap (k) & - , cpoly%avg_soil_temp (k,isi) & - , cpoly%avg_soil_fracliq(k,isi) ) - end do - - !------------------------------------------------------------------------------! - ! For layers beneath the lowest soil level, assign a default soil ! - ! potential and soil moisture consistent with the boundary condition. ! - !------------------------------------------------------------------------------! - select case (isoilbc) - case (0,1,2) - !----- Copy the potential from bottommost layer ----------------------------! - do k=1,cpoly%lsl(isi)-1 - cpoly%avg_soil_mstpot(k,isi) = cpoly%avg_soil_mstpot(cpoly%lsl(isi),isi) - end do - case (3) - !----- Aquifer, assume saturated soil moisture. ----------------------------! - do k=1,cpoly%lsl(isi)-1 - nsoil = cpoly%ntext_soil(k,isi) - cpoly%avg_soil_mstpot(k,isi) = soil(nsoil)%slpots - end do - !---------------------------------------------------------------------------! - end select - !------------------------------------------------------------------------------! + !----- Site weight. --------------------------------------------------------------! + site_wgt = cpoly%area(isi) * poly_area_i + !---------------------------------------------------------------------------------! + !----- Inverse of the soil depth. ------------------------------------------------! + dslzsum_i = 1./ sum(dslz(cpoly%lsl(isi):nzg)) + !---------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------! + ! Loop over patches. ! + !---------------------------------------------------------------------------------! + patchloop: do ipa=1,csite%npatches + cpatch => csite%patch(ipa) - !------------------------------------------------------------------------------! - ! Temporary water/snow layer must be averaged differently, since each patch ! - ! may or may not have the layer, and the number of layers may vary from patch ! - ! to patch. Here we average the integrated energy, mass and depth, and ! - ! compute the average temperature and liquid fraction from the average. ! - !------------------------------------------------------------------------------! - cpoly%avg_sfcw_depth(isi) = 0.0 - cpoly%avg_sfcw_energy(isi) = 0.0 - cpoly%avg_sfcw_mass(isi) = 0.0 - - do ipa=1,csite%npatches - ksn = csite%nlev_sfcwater(ipa) - !----- Check whether mass is present. If so, add this patch. --------------! - if (ksn > 0) then - do k=1,ksn - cpoly%avg_sfcw_depth(isi) = cpoly%avg_sfcw_depth(isi) & - + csite%sfcwater_depth(k,ipa) & - * csite%area(ipa) * site_area_i - cpoly%avg_sfcw_mass(isi) = cpoly%avg_sfcw_mass(isi) & - + csite%sfcwater_mass(k,ipa) & - * csite%area(ipa) * site_area_i - !---------------------------------------------------------------------! - ! Internal energy. For averaging we use the extensive one (J/m2) ! - ! we will switch back to J/kg after the mean mass is found. ! - !---------------------------------------------------------------------! - cpoly%avg_sfcw_energy(isi) = cpoly%avg_sfcw_energy(isi) & - + csite%sfcwater_energy(k,ipa) & - * csite%sfcwater_mass(k,ipa) & - * csite%area(ipa) * site_area_i - end do - end if - end do + !----- Site weight. -----------------------------------------------------------! + patch_wgt = csite%area(ipa) * site_area_i * site_wgt !------------------------------------------------------------------------------! - ! If the site had some layer, convert the mean energy to J/kg, then find ! - ! the mean temperature and liquid fraction. Otherwise, make them with zero/ ! - ! default values. ! + + !------------------------------------------------------------------------------! - if (cpoly%avg_sfcw_mass(isi) > tiny_sfcwater_mass) then - cpoly%avg_sfcw_energy(isi) = cpoly%avg_sfcw_energy(isi) & - / cpoly%avg_sfcw_mass(isi) - call uint2tl(cpoly%avg_sfcw_energy(isi),cpoly%avg_sfcw_tempk(isi) & - ,cpoly%avg_sfcw_fracliq(isi)) - else - cpoly%avg_sfcw_mass(isi) = 0. - cpoly%avg_sfcw_depth(isi) = 0. - cpoly%avg_sfcw_energy(isi) = 0. - cpoly%avg_sfcw_tempk(isi) = cpoly%avg_soil_temp(nzg,isi) - cpoly%avg_sfcw_fracliq(isi) = cpoly%avg_soil_fracliq(nzg,isi) - end if + ! Loop over cohorts. ! !------------------------------------------------------------------------------! + cohortloop: do ico=1,cpatch%ncohorts + !----- Aggregate AIs and density, they may be used to normalise averages. --! + poly_nplant = poly_nplant + cpatch%nplant(ico) * patch_wgt + poly_lai = poly_lai + cpatch%lai (ico) * patch_wgt + poly_wai = poly_wai + cpatch%wai (ico) * patch_wgt + !---------------------------------------------------------------------------! - !----- Average over patches. --------------------------------------------------! - longpatchloop: do ipa=1,csite%npatches - cpatch => csite%patch(ipa) - - !----- Zero the rootfraction diagnostic. -----------------------------------! - csite%rootdense(:,ipa) = 0. - !---------------------------------------------------------------------------! - ! Adding cohort "extensive" variables. Those that are not must be ! - ! scaled by nplant. Just make sure that we have at least one cohort. ! - !---------------------------------------------------------------------------! - if (cpatch%ncohorts > 0) then - - !------------------------------------------------------------------------! - ! Leaf water and energy properties. ! - !------------------------------------------------------------------------! - csite%avg_leaf_energy(ipa) = sum(cpatch%leaf_energy) - csite%avg_leaf_water (ipa) = sum(cpatch%leaf_water) - csite%avg_leaf_hcap (ipa) = sum(cpatch%leaf_hcap) - !----- Check whether there is any heat storage. -------------------------! - if (csite%avg_leaf_hcap(ipa) > 0.) then - !----- Yes, use the default thermodynamics. --------------------------! - call uextcm2tl(csite%avg_leaf_energy(ipa),csite%avg_leaf_water(ipa) & - ,csite%avg_leaf_hcap(ipa),csite%avg_leaf_temp(ipa) & - ,csite%avg_leaf_fliq(ipa)) - - !----- Find the mean vapour pressure deficit. ------------------------! - csite%avg_leaf_vpdef(ipa) = sum(cpatch%leaf_vpdef * cpatch%lai) & - / sum(cpatch%lai) - else - !----- No, copy the canopy air properties. ---------------------------! - csite%avg_leaf_temp(ipa) = csite%can_temp(ipa) - if (csite%can_temp(ipa) > t00) then - csite%avg_leaf_fliq(ipa) = 1.0 - elseif (csite%can_temp(ipa) == t00) then - csite%avg_leaf_fliq(ipa) = 0.5 - else - csite%avg_leaf_fliq(ipa) = 0.0 - end if - csite%avg_leaf_vpdef (ipa) = csite%can_vpdef(ipa) - end if - !------------------------------------------------------------------------! - ! Stem water and energy properties. - !------------------------------------------------------------------------! - csite%avg_wood_energy(ipa) = sum(cpatch%wood_energy) - csite%avg_wood_water (ipa) = sum(cpatch%wood_water) - csite%avg_wood_hcap (ipa) = sum(cpatch%wood_hcap) - !----- Check whether there is any heat storage. -------------------------! - if (csite%avg_wood_hcap(ipa) > 0.) then - !----- Yes, use the default thermodynamics. --------------------------! - call uextcm2tl(csite%avg_wood_energy(ipa),csite%avg_wood_water(ipa) & - ,csite%avg_wood_hcap(ipa),csite%avg_wood_temp(ipa) & - ,csite%avg_wood_fliq(ipa)) - else - !----- No, copy the canopy air properties. ---------------------------! - csite%avg_wood_temp(ipa) = csite%can_temp(ipa) - if (csite%can_temp(ipa) > t00) then - csite%avg_wood_fliq(ipa) = 1.0 - elseif (csite%can_temp(ipa) == t00) then - csite%avg_wood_fliq(ipa) = 0.5 - else - csite%avg_wood_fliq(ipa) = 0.0 - end if - end if - !------------------------------------------------------------------------! - - cgrid%avg_gpp(ipy) = cgrid%avg_gpp(ipy) & - + sum(cpatch%mean_gpp) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - - cgrid%avg_nppleaf(ipy) = cgrid%avg_nppleaf(ipy) & - + sum(cpatch%today_nppleaf & - * cpatch%nplant) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - - cgrid%avg_nppfroot(ipy) = cgrid%avg_nppfroot(ipy) & - + sum(cpatch%today_nppfroot & - * cpatch%nplant) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - - cgrid%avg_nppsapwood(ipy) = cgrid%avg_nppsapwood(ipy) & - + sum(cpatch%today_nppsapwood & - * cpatch%nplant) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - - cgrid%avg_nppcroot(ipy) = cgrid%avg_nppcroot(ipy) & - + sum(cpatch%today_nppcroot & - * cpatch%nplant) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - - cgrid%avg_nppseeds(ipy) = cgrid%avg_nppseeds(ipy) & - + sum(cpatch%today_nppseeds & - * cpatch%nplant) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - - cgrid%avg_nppwood(ipy) = cgrid%avg_nppwood(ipy) & - + sum(cpatch%today_nppwood & - * cpatch%nplant) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - - cgrid%avg_nppdaily(ipy) = cgrid%avg_nppdaily(ipy) & - + sum(cpatch%today_nppdaily & - * cpatch%nplant) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - - cgrid%avg_leaf_resp(ipy) = cgrid%avg_leaf_resp(ipy) & - + sum(cpatch%mean_leaf_resp) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - - cgrid%avg_root_resp(ipy) = cgrid%avg_root_resp(ipy) & - + sum(cpatch%mean_root_resp) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - - cgrid%avg_growth_resp(ipy) = cgrid%avg_growth_resp(ipy) & - + sum(cpatch%mean_growth_resp) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - - cgrid%avg_storage_resp(ipy) = cgrid%avg_storage_resp(ipy) & - + sum(cpatch%mean_storage_resp) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - - cgrid%avg_vleaf_resp(ipy) = cgrid%avg_vleaf_resp(ipy) & - + sum(cpatch%mean_vleaf_resp) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - !------------------------------------------------------------------------! - - cgrid%avg_balive(ipy) = cgrid%avg_balive(ipy) & - + sum(cpatch%balive*cpatch%nplant) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - - cgrid%avg_bleaf(ipy) = cgrid%avg_bleaf(ipy) & - + sum(cpatch%bleaf*cpatch%nplant) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - - cgrid%avg_broot(ipy) = cgrid%avg_broot(ipy) & - + sum(cpatch%broot*cpatch%nplant) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - - cgrid%avg_bsapwooda(ipy) = cgrid%avg_bsapwooda(ipy) & - + sum(cpatch%bsapwooda*cpatch%nplant) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - - cgrid%avg_bsapwoodb(ipy) = cgrid%avg_bsapwoodb(ipy) & - + sum(cpatch%bsapwoodb*cpatch%nplant) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - - cgrid%avg_bdead(ipy) = cgrid%avg_bdead(ipy) & - + sum(cpatch%bdead*cpatch%nplant) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - - cgrid%avg_bstorage(ipy) = cgrid%avg_bstorage(ipy) & - + sum(cpatch%bstorage*cpatch%nplant) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - - cgrid%avg_bseeds(ipy) = cgrid%avg_bseeds(ipy) & - + sum(cpatch%bseeds*cpatch%nplant) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - - !------------------------------------------------------------------------! - ! Leaf drop due to phenology and maintenance costs... I left it ! - ! in kgC/m2/yr... ! - !------------------------------------------------------------------------! - cgrid%avg_leaf_drop(ipy) = cgrid%avg_leaf_drop(ipy) & - + sum( cpatch%leaf_drop & - * cpatch%nplant) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - cgrid%avg_leaf_maintenance(ipy) = cgrid%avg_leaf_maintenance(ipy) & - + sum( cpatch%leaf_maintenance & - * cpatch%nplant) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - cgrid%avg_root_maintenance(ipy) = cgrid%avg_root_maintenance(ipy) & - + sum( cpatch%root_maintenance & - * cpatch%nplant) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - - !----- Check the extremes and update if necessary. ----------------------! - if (maxval(cpatch%leaf_temp) > cgrid%max_leaf_temp(ipy)) then - cgrid%max_leaf_temp(ipy) = maxval(cpatch%leaf_temp) - end if - if (minval(cpatch%leaf_temp) < cgrid%min_leaf_temp(ipy)) then - cgrid%min_leaf_temp(ipy) = minval(cpatch%leaf_temp) - end if - else - csite%avg_leaf_energy(ipa) = 0. - csite%avg_leaf_water(ipa) = 0. - csite%avg_leaf_hcap(ipa) = 0. - csite%avg_leaf_temp(ipa) = csite%can_temp(ipa) - csite%avg_leaf_vpdef (ipa) = csite%can_vpdef(ipa) - csite%avg_wood_energy(ipa) = 0. - csite%avg_wood_water(ipa) = 0. - csite%avg_wood_hcap(ipa) = 0. - csite%avg_wood_temp(ipa) = csite%can_temp(ipa) - if (csite%can_temp(ipa) > t00) then - csite%avg_leaf_fliq(ipa) = 1. - csite%avg_wood_fliq(ipa) = 1. - elseif (csite%can_temp(ipa) == t00) then - csite%avg_leaf_fliq(ipa) = 0.5 - csite%avg_wood_fliq(ipa) = 0.5 - else - csite%avg_leaf_fliq(ipa) = 0.0 - csite%avg_wood_fliq(ipa) = 0.0 - end if - end if - - cgrid%avg_htroph_resp(ipy) = cgrid%avg_htroph_resp(ipy) & - + csite%mean_rh(ipa) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - cgrid%avg_cwd_resp (ipy) = cgrid%avg_cwd_resp(ipy) & - + csite%mean_cwd_rh(ipa) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - - !----- Not sure what these variables do. -----------------------------------! - lai_index = min(3,max(1, floor(csite%lai(ipa)/2.0) + 1) ) - area_sum(lai_index) = area_sum(lai_index) + csite%area(ipa) - - !----- Net radiation. ------------------------------------------------------! - cgrid%avg_lai_ebalvars(lai_index,1,ipy) = & - cgrid%avg_lai_ebalvars(lai_index,1,ipy) & - + (csite%avg_rshort_gnd(ipa) + csite%avg_rlong_gnd(ipa)) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - - !----- Latent heat flux. ---------------------------------------------------! - cgrid%avg_lai_ebalvars(lai_index,2,ipy) = & - cgrid%avg_lai_ebalvars(lai_index,2,ipy) & - + csite%avg_vapor_ac(ipa) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - - !----- Sensible heat flux. -------------------------------------------------! - cgrid%avg_lai_ebalvars(lai_index,3,ipy) = & - cgrid%avg_lai_ebalvars(lai_index,3,ipy) & - + csite%avg_sensible_ac(ipa) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - - !----- Canopy temperature --------------------------------------------------! - cgrid%avg_lai_ebalvars(lai_index,4,ipy) = & - cgrid%avg_lai_ebalvars(lai_index,4,ipy) & - + csite%can_temp(ipa) & - * csite%area(ipa)*cpoly%area(isi) & - * site_area_i * poly_area_i - - - !------ Updating maximum and minimum soil temperature. ---------------------! - do k=1,nzg - if (csite%soil_tempk(k,ipa) > cgrid%max_soil_temp(ipy)) then - cgrid%max_soil_temp(ipy) = csite%soil_tempk(k,ipa) - end if - - if (csite%soil_tempk(k,ipa) < cgrid%min_soil_temp(ipy)) then - cgrid%min_soil_temp(ipy) = csite%soil_tempk(k,ipa) - end if - end do - - - cohortloop: do ico=1,cpatch%ncohorts - - - !------------------------------------------------------------------------! - ! Rooting fraction: step 1, find root biomass per cubic meter ! - ! broot*nplant/rooting_depth [kg/plant]*[plant/m2]/[m] ! - !------------------------------------------------------------------------! - rdepth = sum(dslz(cpatch%krdepth(ico):nzg)) - do k=cpatch%krdepth(ico),nzg - csite%rootdense(k,ipa) = csite%rootdense(k,ipa) & - + cpatch%broot(ico)*cpatch%nplant(ico)/rdepth - end do - !------------------------------------------------------------------------! - - - end do cohortloop - end do longpatchloop - - - ! Take an area weighted average of the root density to get site level fraction + !----- Aggregate the other properties. -------------------------------------! + cgrid%fmean_gpp (ipy) = cgrid%fmean_gpp (ipy) & + + cpatch%fmean_gpp (ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%fmean_npp (ipy) = cgrid%fmean_npp (ipy) & + + cpatch%fmean_npp (ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%fmean_leaf_resp (ipy) = cgrid%fmean_leaf_resp (ipy) & + + cpatch%fmean_leaf_resp (ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%fmean_root_resp (ipy) = cgrid%fmean_root_resp (ipy) & + + cpatch%fmean_root_resp (ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%fmean_growth_resp (ipy) = cgrid%fmean_growth_resp (ipy) & + + cpatch%fmean_growth_resp (ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%fmean_storage_resp (ipy) = cgrid%fmean_storage_resp (ipy) & + + cpatch%fmean_storage_resp (ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%fmean_vleaf_resp (ipy) = cgrid%fmean_vleaf_resp (ipy) & + + cpatch%fmean_vleaf_resp (ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%fmean_plresp (ipy) = cgrid%fmean_plresp (ipy) & + + cpatch%fmean_plresp (ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%fmean_leaf_energy (ipy) = cgrid%fmean_leaf_energy (ipy) & + + cpatch%fmean_leaf_energy (ico) & + * patch_wgt + cgrid%fmean_leaf_water (ipy) = cgrid%fmean_leaf_water (ipy) & + + cpatch%fmean_leaf_water (ico) & + * patch_wgt + cgrid%fmean_leaf_hcap (ipy) = cgrid%fmean_leaf_hcap (ipy) & + + cpatch%fmean_leaf_hcap (ico) & + * patch_wgt + cgrid%fmean_leaf_vpdef (ipy) = cgrid%fmean_leaf_vpdef (ipy) & + + cpatch%fmean_leaf_vpdef (ico) & + * cpatch%lai (ico) & + * patch_wgt + cgrid%fmean_leaf_gsw (ipy) = cgrid%fmean_leaf_gsw (ipy) & + + cpatch%fmean_leaf_gsw (ico) & + * cpatch%lai (ico) & + * patch_wgt + cgrid%fmean_leaf_gbw (ipy) = cgrid%fmean_leaf_gbw (ipy) & + + cpatch%fmean_leaf_gbw (ico) & + * cpatch%lai (ico) & + * patch_wgt + cgrid%fmean_wood_energy (ipy) = cgrid%fmean_wood_energy (ipy) & + + cpatch%fmean_wood_energy (ico) & + * patch_wgt + cgrid%fmean_wood_water (ipy) = cgrid%fmean_wood_water (ipy) & + + cpatch%fmean_wood_water (ico) & + * patch_wgt + cgrid%fmean_wood_hcap (ipy) = cgrid%fmean_wood_hcap (ipy) & + + cpatch%fmean_wood_hcap (ico) & + * patch_wgt + cgrid%fmean_wood_gbw (ipy) = cgrid%fmean_wood_gbw (ipy) & + + cpatch%fmean_wood_gbw (ico) & + * cpatch%wai (ico) & + * patch_wgt + cgrid%fmean_fs_open (ipy) = cgrid%fmean_fs_open (ipy) & + + cpatch%fmean_fs_open (ico) & + * cpatch%lai (ico) & + * patch_wgt + cgrid%fmean_fsw (ipy) = cgrid%fmean_fsw (ipy) & + + cpatch%fmean_fsw (ico) & + * cpatch%lai (ico) & + * patch_wgt + cgrid%fmean_fsn (ipy) = cgrid%fmean_fsn (ipy) & + + cpatch%fmean_fsn (ico) & + * cpatch%lai (ico) & + * patch_wgt + cgrid%fmean_psi_open (ipy) = cgrid%fmean_psi_open (ipy) & + + cpatch%fmean_psi_open (ico) & + * cpatch%lai (ico) & + * patch_wgt + cgrid%fmean_psi_closed (ipy) = cgrid%fmean_psi_closed (ipy) & + + cpatch%fmean_psi_closed (ico) & + * cpatch%lai (ico) & + * patch_wgt + cgrid%fmean_water_supply (ipy) = cgrid%fmean_water_supply (ipy) & + + cpatch%fmean_water_supply (ico) & + * patch_wgt + cgrid%fmean_par_l (ipy) = cgrid%fmean_par_l (ipy) & + + cpatch%fmean_par_l (ico) & + * patch_wgt + cgrid%fmean_par_l_beam (ipy) = cgrid%fmean_par_l_beam (ipy) & + + cpatch%fmean_par_l_beam (ico) & + * patch_wgt + cgrid%fmean_par_l_diff (ipy) = cgrid%fmean_par_l_diff (ipy) & + + cpatch%fmean_par_l_diff (ico) & + * patch_wgt + cgrid%fmean_rshort_l (ipy) = cgrid%fmean_rshort_l (ipy) & + + cpatch%fmean_rshort_l (ico) & + * patch_wgt + cgrid%fmean_rlong_l (ipy) = cgrid%fmean_rlong_l (ipy) & + + cpatch%fmean_rlong_l (ico) & + * patch_wgt + cgrid%fmean_sensible_lc (ipy) = cgrid%fmean_sensible_lc (ipy) & + + cpatch%fmean_sensible_lc (ico) & + * patch_wgt + cgrid%fmean_vapor_lc (ipy) = cgrid%fmean_vapor_lc (ipy) & + + cpatch%fmean_vapor_lc (ico) & + * patch_wgt + cgrid%fmean_transp (ipy) = cgrid%fmean_transp (ipy) & + + cpatch%fmean_transp (ico) & + * patch_wgt + cgrid%fmean_intercepted_al(ipy) = cgrid%fmean_intercepted_al (ipy) & + + cpatch%fmean_intercepted_al(ico) & + * patch_wgt + cgrid%fmean_wshed_lg (ipy) = cgrid%fmean_wshed_lg (ipy) & + + cpatch%fmean_wshed_lg (ico) & + * patch_wgt + cgrid%fmean_rshort_w (ipy) = cgrid%fmean_rshort_w (ipy) & + + cpatch%fmean_rshort_w (ico) & + * patch_wgt + cgrid%fmean_rlong_w (ipy) = cgrid%fmean_rlong_w (ipy) & + + cpatch%fmean_rlong_w (ico) & + * patch_wgt + cgrid%fmean_sensible_wc (ipy) = cgrid%fmean_sensible_wc (ipy) & + + cpatch%fmean_sensible_wc (ico) & + * patch_wgt + cgrid%fmean_vapor_wc (ipy) = cgrid%fmean_vapor_wc (ipy) & + + cpatch%fmean_vapor_wc (ico) & + * patch_wgt + cgrid%fmean_intercepted_aw(ipy) = cgrid%fmean_intercepted_aw (ipy) & + + cpatch%fmean_intercepted_aw(ico) & + * patch_wgt + cgrid%fmean_wshed_wg (ipy) = cgrid%fmean_wshed_wg (ipy) & + + cpatch%fmean_wshed_wg (ico) & + * patch_wgt + end do cohortloop !------------------------------------------------------------------------------! - cpoly%avg_soil_rootfrac(:,isi) = matmul(csite%rootdense,csite%area) & - * site_area_i - - !------------------------------------------------------------------------------! - ! Site average of canopy thermodynamic state. We average the variables ! - ! that are insensitive to changes in pressure (potential temperature, specific ! - ! humidity, CO2 mixing ratio and pressure itself) by averaging over sites. ! - ! The other variables are found using the prescribed diagnostic equations. ! - !------------------------------------------------------------------------------! - cpoly%avg_can_depth (isi) = sum(csite%can_depth * csite%area) * site_area_i - cpoly%avg_can_theta (isi) = sum(csite%can_theta * csite%area) * site_area_i - cpoly%avg_can_theiv (isi) = sum(csite%can_theiv * csite%area) * site_area_i - cpoly%avg_can_vpdef (isi) = sum(csite%can_vpdef * csite%area) * site_area_i - cpoly%avg_can_shv (isi) = sum(csite%can_shv * csite%area) * site_area_i - cpoly%avg_can_co2 (isi) = sum(csite%can_co2 * csite%area) * site_area_i - cpoly%avg_can_prss (isi) = sum(csite%can_prss * csite%area) * site_area_i - can_exner = press2exner (cpoly%avg_can_prss(isi)) - cpoly%avg_can_temp (isi) = extheta2temp(can_exner,cpoly%avg_can_theta (isi)) - cpoly%avg_can_rhos (isi) = idealdenssh( cpoly%avg_can_prss (isi) & - , cpoly%avg_can_temp (isi) & - , cpoly%avg_can_shv (isi) ) - !------------------------------------------------------------------------------! - ! Site average of leaf and stem properties. Again, we average "extensive" ! - ! properties and find the average temperature based on the average leaf and ! - ! stem internal energy mass, and heat capacity. ! - !------------------------------------------------------------------------------! - cpoly%avg_leaf_energy(isi) = sum(csite%avg_leaf_energy * csite%area) & - * site_area_i - cpoly%avg_leaf_water (isi) = sum(csite%avg_leaf_water * csite%area) & - * site_area_i - cpoly%avg_leaf_hcap (isi) = sum(csite%avg_leaf_hcap * csite%area) & - * site_area_i - cpoly%avg_leaf_vpdef (isi) = sum(csite%avg_leaf_vpdef * csite%area) & - * site_area_i - cpoly%avg_wood_energy(isi) = sum(csite%avg_wood_energy * csite%area) & - * site_area_i - cpoly%avg_wood_water (isi) = sum(csite%avg_wood_water * csite%area) & - * site_area_i - cpoly%avg_wood_hcap (isi) = sum(csite%avg_wood_hcap * csite%area) & - * site_area_i - !------------------------------------------------------------------------------! - ! Unless this is a bare site or it is absolute leafless, there should be ! - ! some heat capacity, then compute the average leaf temperature. Otherwise, ! - ! assign mean canopy temperature. ! - !------------------------------------------------------------------------------! - if (cpoly%avg_leaf_hcap(isi) > 0.) then - call uextcm2tl(cpoly%avg_leaf_energy(isi),cpoly%avg_leaf_water(isi) & - ,cpoly%avg_leaf_hcap(isi),cpoly%avg_leaf_temp(isi) & - ,cpoly%avg_leaf_fliq(isi)) - else - cpoly%avg_leaf_temp(isi) = cpoly%avg_can_temp(isi) - if (cpoly%avg_can_temp(isi) > t00) then - cpoly%avg_leaf_fliq(isi) = 1.0 - elseif (cpoly%avg_can_temp(isi) == t00) then - cpoly%avg_leaf_fliq(isi) = 0.5 - else - cpoly%avg_leaf_fliq(isi) = 0.0 - end if - end if - !------------------------------------------------------------------------------! - ! Unless this is a bare site, or the user doesn't want to solve branches, ! - ! there should be some heat capacity, in which case the average stem temper- ! - ! ature. Otherwise, assign mean canopy temperature. ! - !------------------------------------------------------------------------------! - if (cpoly%avg_wood_hcap(isi) > 0.) then - call uextcm2tl(cpoly%avg_wood_energy(isi),cpoly%avg_wood_water(isi) & - ,cpoly%avg_wood_hcap(isi),cpoly%avg_wood_temp(isi) & - ,cpoly%avg_wood_fliq(isi)) - else - cpoly%avg_wood_temp(isi) = cpoly%avg_can_temp(isi) - if (cpoly%avg_can_temp(isi) > t00) then - cpoly%avg_wood_fliq(isi) = 1.0 - elseif (cpoly%avg_can_temp(isi) == t00) then - cpoly%avg_wood_fliq(isi) = 0.5 - else - cpoly%avg_wood_fliq(isi) = 0.0 - end if - end if - !------------------------------------------------------------------------------! !------------------------------------------------------------------------------! - ! Compute the average amongst all surfaces (soil, temporary surface water, ! - ! and vegetation, the last two only if they really exist). All energy terms ! - ! are converted to J/m2, all water terms to kg/m2, and the heat capacities of ! - ! everything that is not water is in J/m2/K. ! + ! Aggregate the patch-level variables. ! + !------------------------------------------------------------------------------! + cgrid%fmean_rh (ipy) = cgrid%fmean_rh (ipy) & + + csite%fmean_rh (ipa) & + * patch_wgt + cgrid%fmean_cwd_rh (ipy) = cgrid%fmean_cwd_rh (ipy) & + + csite%fmean_cwd_rh (ipa) & + * patch_wgt + cgrid%fmean_nep (ipy) = cgrid%fmean_nep (ipy) & + + csite%fmean_nep (ipa) & + * patch_wgt + cgrid%fmean_rk4step (ipy) = cgrid%fmean_rk4step (ipy) & + + csite%fmean_rk4step (ipa) & + * patch_wgt + cgrid%fmean_available_water(ipy) = cgrid%fmean_available_water(ipy) & + + csite%fmean_available_water(ipa) & + * patch_wgt + cgrid%fmean_can_theiv (ipy) = cgrid%fmean_can_theiv (ipy) & + + csite%fmean_can_theiv (ipa) & + * patch_wgt + cgrid%fmean_can_theta (ipy) = cgrid%fmean_can_theta (ipy) & + + csite%fmean_can_theta (ipa) & + * patch_wgt + cgrid%fmean_can_vpdef (ipy) = cgrid%fmean_can_vpdef (ipy) & + + csite%fmean_can_vpdef (ipa) & + * patch_wgt + cgrid%fmean_can_shv (ipy) = cgrid%fmean_can_shv (ipy) & + + csite%fmean_can_shv (ipa) & + * patch_wgt + cgrid%fmean_can_co2 (ipy) = cgrid%fmean_can_co2 (ipy) & + + csite%fmean_can_co2 (ipa) & + * patch_wgt + cgrid%fmean_can_prss (ipy) = cgrid%fmean_can_prss (ipy) & + + csite%fmean_can_prss (ipa) & + * patch_wgt + cgrid%fmean_gnd_temp (ipy) = cgrid%fmean_gnd_temp (ipy) & + + csite%fmean_gnd_temp (ipa) & + * patch_wgt + cgrid%fmean_gnd_shv (ipy) = cgrid%fmean_gnd_shv (ipy) & + + csite%fmean_gnd_shv (ipa) & + * patch_wgt + cgrid%fmean_can_ggnd (ipy) = cgrid%fmean_can_ggnd (ipy) & + + csite%fmean_can_ggnd (ipa) & + * patch_wgt + cgrid%fmean_sfcw_depth (ipy) = cgrid%fmean_sfcw_depth (ipy) & + + csite%fmean_sfcw_depth (ipa) & + * patch_wgt + !----- Temporarily convert pounding internal energy to J/m2. ------------------! + cgrid%fmean_sfcw_energy (ipy) = cgrid%fmean_sfcw_energy (ipy) & + + csite%fmean_sfcw_energy (ipa) & + * csite%fmean_sfcw_mass (ipa) & + * patch_wgt !------------------------------------------------------------------------------! - skin_energy = cpoly%avg_leaf_energy(isi) & - + cpoly%avg_wood_energy(isi) & - + cpoly%avg_sfcw_energy(isi) * cpoly%avg_sfcw_mass(isi) & - + cpoly%avg_soil_energy(nzg,isi) * dslz(nzg) - skin_water = cpoly%avg_leaf_water(isi) & - + cpoly%avg_leaf_water(isi) & - + cpoly%avg_sfcw_mass(isi) & - + cpoly%avg_soil_water(nzg,isi) * dslz(nzg) * wdns - skin_hcap = cpoly%avg_leaf_hcap(isi) & - + cpoly%avg_wood_hcap(isi) & - + site_avg_soil_hcap(nzg) * dslz(nzg) - call uextcm2tl(skin_energy,skin_water,skin_hcap & - ,cpoly%avg_skin_temp(isi),skin_fliq) + cgrid%fmean_sfcw_mass (ipy) = cgrid%fmean_sfcw_mass (ipy) & + + csite%fmean_sfcw_mass (ipa) & + * patch_wgt + cgrid%fmean_rshort_gnd (ipy) = cgrid%fmean_rshort_gnd (ipy) & + + csite%fmean_rshort_gnd (ipa) & + * patch_wgt + cgrid%fmean_par_gnd (ipy) = cgrid%fmean_par_gnd (ipy) & + + csite%fmean_par_gnd (ipa) & + * patch_wgt + cgrid%fmean_rlong_gnd (ipy) = cgrid%fmean_rlong_gnd (ipy) & + + csite%fmean_rlong_gnd (ipa) & + * patch_wgt + cgrid%fmean_rlongup (ipy) = cgrid%fmean_rlongup (ipy) & + + csite%fmean_rlongup (ipa) & + * patch_wgt + cgrid%fmean_parup (ipy) = cgrid%fmean_parup (ipy) & + + csite%fmean_parup (ipa) & + * patch_wgt + cgrid%fmean_nirup (ipy) = cgrid%fmean_nirup (ipy) & + + csite%fmean_nirup (ipa) & + * patch_wgt + cgrid%fmean_rshortup (ipy) = cgrid%fmean_rshortup (ipy) & + + csite%fmean_rshortup (ipa) & + * patch_wgt + cgrid%fmean_rnet (ipy) = cgrid%fmean_rnet (ipy) & + + csite%fmean_rnet (ipa) & + * patch_wgt + cgrid%fmean_albedo (ipy) = cgrid%fmean_albedo (ipy) & + + csite%fmean_albedo (ipa) & + * patch_wgt + cgrid%fmean_albedo_beam (ipy) = cgrid%fmean_albedo_beam (ipy) & + + csite%fmean_albedo_beam (ipa) & + * patch_wgt + cgrid%fmean_albedo_diff (ipy) = cgrid%fmean_albedo_diff (ipy) & + + csite%fmean_albedo_diff (ipa) & + * patch_wgt + cgrid%fmean_rlong_albedo (ipy) = cgrid%fmean_rlong_albedo (ipy) & + + csite%fmean_rlong_albedo (ipa) & + * patch_wgt + cgrid%fmean_ustar (ipy) = cgrid%fmean_ustar (ipy) & + + csite%fmean_ustar (ipa) & + * patch_wgt + cgrid%fmean_tstar (ipy) = cgrid%fmean_tstar (ipy) & + + csite%fmean_tstar (ipa) & + * patch_wgt + cgrid%fmean_qstar (ipy) = cgrid%fmean_qstar (ipy) & + + csite%fmean_qstar (ipa) & + * patch_wgt + cgrid%fmean_cstar (ipy) = cgrid%fmean_cstar (ipy) & + + csite%fmean_cstar (ipa) & + * patch_wgt + cgrid%fmean_carbon_ac (ipy) = cgrid%fmean_carbon_ac (ipy) & + + csite%fmean_carbon_ac (ipa) & + * patch_wgt + cgrid%fmean_carbon_st (ipy) = cgrid%fmean_carbon_st (ipy) & + + csite%fmean_carbon_st (ipa) & + * patch_wgt + cgrid%fmean_vapor_gc (ipy) = cgrid%fmean_vapor_gc (ipy) & + + csite%fmean_vapor_gc (ipa) & + * patch_wgt + cgrid%fmean_vapor_ac (ipy) = cgrid%fmean_vapor_ac (ipy) & + + csite%fmean_vapor_ac (ipa) & + * patch_wgt + cgrid%fmean_throughfall (ipy) = cgrid%fmean_throughfall (ipy) & + + csite%fmean_throughfall (ipa) & + * patch_wgt + cgrid%fmean_runoff (ipy) = cgrid%fmean_runoff (ipy) & + + csite%fmean_runoff (ipa) & + * patch_wgt + cgrid%fmean_drainage (ipy) = cgrid%fmean_drainage (ipy) & + + csite%fmean_drainage (ipa) & + * patch_wgt + cgrid%fmean_sensible_gc (ipy) = cgrid%fmean_sensible_gc (ipy) & + + csite%fmean_sensible_gc (ipa) & + * patch_wgt + cgrid%fmean_sensible_ac (ipy) = cgrid%fmean_sensible_ac (ipy) & + + csite%fmean_sensible_ac (ipa) & + * patch_wgt + cgrid%fmean_qthroughfall (ipy) = cgrid%fmean_qthroughfall (ipy) & + + csite%fmean_qthroughfall (ipa) & + * patch_wgt + cgrid%fmean_qrunoff (ipy) = cgrid%fmean_qrunoff (ipy) & + + csite%fmean_qrunoff (ipa) & + * patch_wgt + cgrid%fmean_qdrainage (ipy) = cgrid%fmean_qdrainage (ipy) & + + csite%fmean_qdrainage (ipa) & + * patch_wgt + + !----- Soil (extensive) properties. -------------------------------------------! + do k=1,nzg + nsoil = cpoly%ntext_soil(k,isi) + cgrid%fmean_soil_energy (k,ipy) = cgrid%fmean_soil_energy (k,ipy) & + + csite%fmean_soil_energy (k,ipa) & + * patch_wgt + cgrid%fmean_soil_mstpot (k,ipy) = cgrid%fmean_soil_mstpot (k,ipy) & + + csite%fmean_soil_mstpot (k,ipa) & + * patch_wgt + cgrid%fmean_soil_water (k,ipy) = cgrid%fmean_soil_water (k,ipy) & + + csite%fmean_soil_water (k,ipa) & + * patch_wgt + cgrid%fmean_smoist_gg (k,ipy) = cgrid%fmean_smoist_gg (k,ipy) & + + csite%fmean_smoist_gg (k,ipa) & + * patch_wgt + cgrid%fmean_transloss (k,ipy) = cgrid%fmean_transloss (k,ipy) & + + csite%fmean_transloss (k,ipa) & + * patch_wgt + cgrid%fmean_sensible_gg (k,ipy) = cgrid%fmean_sensible_gg (k,ipy) & + + csite%fmean_sensible_gg (k,ipa) & + * patch_wgt + cgrid_fmean_soil_hcap (k) = cgrid_fmean_soil_hcap (k) & + + soil(nsoil)%slcpd & + * patch_wgt + + !----- Find the mean soil wetness. -----------------------------------------! + cgrid%fmean_soil_wetness (ipy) = cgrid%fmean_soil_wetness (ipy) & + + ( ( csite%fmean_soil_water(k,ipa) & + - soil(nsoil)%soilwp) ) & + / (soil(nsoil)%slmsts - soil(nsoil)%soilwp) & + * dslz(k) * dslzsum_i * patch_wgt + !---------------------------------------------------------------------------! + end do !------------------------------------------------------------------------------! - end do siteloop + end do patchloop !---------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------! - ! Find plant respiration using the other averaged quantities. ! - !---------------------------------------------------------------------------------! - cgrid%avg_plant_resp(ipy) = cgrid%avg_leaf_resp (ipy) & - + cgrid%avg_root_resp (ipy) & - + cgrid%avg_growth_resp (ipy) & - + cgrid%avg_storage_resp (ipy) & - + cgrid%avg_vleaf_resp (ipy) + ! Aggregate the patch-level variables. ! !---------------------------------------------------------------------------------! + cgrid%fmean_atm_theiv (ipy) = cgrid%fmean_atm_theiv (ipy) & + + cpoly%fmean_atm_theiv (isi) & + * site_wgt + cgrid%fmean_atm_theta (ipy) = cgrid%fmean_atm_theta (ipy) & + + cpoly%fmean_atm_theta (isi) & + * site_wgt + cgrid%fmean_atm_temp (ipy) = cgrid%fmean_atm_temp (ipy) & + + cpoly%fmean_atm_temp (isi) & + * site_wgt + cgrid%fmean_atm_vpdef (ipy) = cgrid%fmean_atm_vpdef (ipy) & + + cpoly%fmean_atm_vpdef (isi) & + * site_wgt + cgrid%fmean_atm_shv (ipy) = cgrid%fmean_atm_shv (ipy) & + + cpoly%fmean_atm_shv (isi) & + * site_wgt + cgrid%fmean_atm_rshort (ipy) = cgrid%fmean_atm_rshort (ipy) & + + cpoly%fmean_atm_rshort (isi) & + * site_wgt + cgrid%fmean_atm_rshort_diff(ipy) = cgrid%fmean_atm_rshort_diff(ipy) & + + cpoly%fmean_atm_rshort_diff(isi) & + * site_wgt + cgrid%fmean_atm_par (ipy) = cgrid%fmean_atm_par (ipy) & + + cpoly%fmean_atm_par (isi) & + * site_wgt + cgrid%fmean_atm_par_diff (ipy) = cgrid%fmean_atm_par_diff (ipy) & + + cpoly%fmean_atm_par_diff (isi) & + * site_wgt + cgrid%fmean_atm_rlong (ipy) = cgrid%fmean_atm_rlong (ipy) & + + cpoly%fmean_atm_rlong (isi) & + * site_wgt + cgrid%fmean_atm_vels (ipy) = cgrid%fmean_atm_vels (ipy) & + + cpoly%fmean_atm_vels (isi) & + * site_wgt + cgrid%fmean_atm_rhos (ipy) = cgrid%fmean_atm_rhos (ipy) & + + cpoly%fmean_atm_rhos (isi) & + * site_wgt + cgrid%fmean_atm_prss (ipy) = cgrid%fmean_atm_prss (ipy) & + + cpoly%fmean_atm_prss (isi) & + * site_wgt + cgrid%fmean_atm_co2 (ipy) = cgrid%fmean_atm_co2 (ipy) & + + cpoly%fmean_atm_co2 (isi) & + * site_wgt + cgrid%fmean_pcpg (ipy) = cgrid%fmean_pcpg (ipy) & + + cpoly%fmean_pcpg (isi) & + * site_wgt + cgrid%fmean_qpcpg (ipy) = cgrid%fmean_qpcpg (ipy) & + + cpoly%fmean_qpcpg (isi) & + * site_wgt + cgrid%fmean_dpcpg (ipy) = cgrid%fmean_dpcpg (ipy) & + + cpoly%fmean_dpcpg (isi) & + * site_wgt + end do siteloop + !------------------------------------------------------------------------------------! - !----- Normalize the lai specific quantities -------------------------------------! - if (area_sum(1)>0.) then - cgrid%avg_lai_ebalvars(1,1,ipy) = cgrid%avg_lai_ebalvars(1,1,ipy)/area_sum(1) - cgrid%avg_lai_ebalvars(1,2,ipy) = cgrid%avg_lai_ebalvars(1,2,ipy)/area_sum(1) - cgrid%avg_lai_ebalvars(1,3,ipy) = cgrid%avg_lai_ebalvars(1,3,ipy)/area_sum(1) - cgrid%avg_lai_ebalvars(1,4,ipy) = cgrid%avg_lai_ebalvars(1,4,ipy)/area_sum(1) - else - cgrid%avg_lai_ebalvars(1,:,ipy) = -9999.0 - end if - if (area_sum(2)>0.) then - cgrid%avg_lai_ebalvars(2,1,ipy) = cgrid%avg_lai_ebalvars(2,1,ipy)/area_sum(2) - cgrid%avg_lai_ebalvars(2,2,ipy) = cgrid%avg_lai_ebalvars(2,2,ipy)/area_sum(2) - cgrid%avg_lai_ebalvars(2,3,ipy) = cgrid%avg_lai_ebalvars(2,3,ipy)/area_sum(2) - cgrid%avg_lai_ebalvars(2,4,ipy) = cgrid%avg_lai_ebalvars(2,4,ipy)/area_sum(2) - else - cgrid%avg_lai_ebalvars(2,:,ipy) = -9999.0 - end if - if (area_sum(3)>0.) then - cgrid%avg_lai_ebalvars(3,1,ipy) = cgrid%avg_lai_ebalvars(3,1,ipy)/area_sum(3) - cgrid%avg_lai_ebalvars(3,2,ipy) = cgrid%avg_lai_ebalvars(3,2,ipy)/area_sum(3) - cgrid%avg_lai_ebalvars(3,3,ipy) = cgrid%avg_lai_ebalvars(3,3,ipy)/area_sum(3) - cgrid%avg_lai_ebalvars(3,4,ipy) = cgrid%avg_lai_ebalvars(3,4,ipy)/area_sum(3) - else - cgrid%avg_lai_ebalvars(3,:,ipy) = -9999.0 - end if - !----- Finding the polygon mean LAI ----------------------------------------------! - cgrid%lai(ipy) = sum(cpoly%lai * cpoly%area ) * poly_area_i - cgrid%wai(ipy) = sum(cpoly%wai * cpoly%area ) * poly_area_i - !----- Average fast time flux dynamics over polygons. ----------------------------! - cgrid%avg_rshort_gnd (ipy)= sum(cpoly%avg_rshort_gnd *cpoly%area)*poly_area_i - cgrid%avg_par_gnd (ipy)= sum(cpoly%avg_par_gnd *cpoly%area)*poly_area_i - cgrid%avg_rlong_gnd (ipy)= sum(cpoly%avg_rlong_gnd *cpoly%area)*poly_area_i - cgrid%avg_rlongup (ipy)= sum(cpoly%avg_rlongup *cpoly%area)*poly_area_i - cgrid%avg_parup (ipy)= sum(cpoly%avg_parup *cpoly%area)*poly_area_i - cgrid%avg_nirup (ipy)= sum(cpoly%avg_nirup *cpoly%area)*poly_area_i - cgrid%avg_rshortup (ipy)= sum(cpoly%avg_rshortup *cpoly%area)*poly_area_i - cgrid%avg_rnet (ipy)= sum(cpoly%avg_rnet *cpoly%area)*poly_area_i - cgrid%avg_carbon_ac (ipy)= sum(cpoly%avg_carbon_ac *cpoly%area)*poly_area_i - cgrid%avg_carbon_st (ipy)= sum(cpoly%avg_carbon_st *cpoly%area)*poly_area_i - cgrid%avg_vapor_lc (ipy)= sum(cpoly%avg_vapor_lc *cpoly%area)*poly_area_i - cgrid%avg_vapor_wc (ipy)= sum(cpoly%avg_vapor_wc *cpoly%area)*poly_area_i - cgrid%avg_vapor_gc (ipy)= sum(cpoly%avg_vapor_gc *cpoly%area)*poly_area_i - cgrid%avg_wshed_vg (ipy)= sum(cpoly%avg_wshed_vg *cpoly%area)*poly_area_i - cgrid%avg_intercepted (ipy)= sum(cpoly%avg_intercepted *cpoly%area)*poly_area_i - cgrid%avg_throughfall (ipy)= sum(cpoly%avg_throughfall *cpoly%area)*poly_area_i - cgrid%avg_fsc (ipy)= sum(cpoly%avg_fsc *cpoly%area)*poly_area_i - cgrid%avg_stsc (ipy)= sum(cpoly%avg_stsc *cpoly%area)*poly_area_i - cgrid%avg_ssc (ipy)= sum(cpoly%avg_ssc *cpoly%area)*poly_area_i - cgrid%avg_fsn (ipy)= sum(cpoly%avg_fsn *cpoly%area)*poly_area_i - cgrid%avg_msn (ipy)= sum(cpoly%avg_msn *cpoly%area)*poly_area_i - cgrid%avg_runoff_heat (ipy)= sum(cpoly%avg_runoff_heat *cpoly%area)*poly_area_i - cgrid%avg_runoff (ipy)= sum(cpoly%avg_runoff *cpoly%area)*poly_area_i - cgrid%avg_drainage (ipy)= sum(cpoly%avg_drainage *cpoly%area)*poly_area_i - cgrid%avg_drainage_heat(ipy)= sum(cpoly%avg_drainage_heat*cpoly%area)*poly_area_i - cgrid%avg_vapor_ac (ipy)= sum(cpoly%avg_vapor_ac *cpoly%area)*poly_area_i - cgrid%avg_transp (ipy)= sum(cpoly%avg_transp *cpoly%area)*poly_area_i - cgrid%avg_evap(ipy) = sum(cpoly%avg_evap *cpoly%area)*poly_area_i - cgrid%avg_sensible_lc(ipy) = sum(cpoly%avg_sensible_lc *cpoly%area)*poly_area_i - cgrid%avg_sensible_wc(ipy) = sum(cpoly%avg_sensible_wc *cpoly%area)*poly_area_i - cgrid%avg_qwshed_vg(ipy) = sum(cpoly%avg_qwshed_vg *cpoly%area)*poly_area_i - cgrid%avg_qintercepted(ipy) = sum(cpoly%avg_qintercepted *cpoly%area)*poly_area_i - cgrid%avg_qthroughfall(ipy) = sum(cpoly%avg_qthroughfall *cpoly%area)*poly_area_i - cgrid%avg_sensible_gc(ipy) = sum(cpoly%avg_sensible_gc *cpoly%area)*poly_area_i - cgrid%avg_sensible_ac(ipy) = sum(cpoly%avg_sensible_ac *cpoly%area)*poly_area_i - - !----- Average stars (characteristic scales). ------------------------------------! - cgrid%avg_ustar (ipy) = sum(cpoly%avg_ustar * cpoly%area) * poly_area_i - cgrid%avg_tstar (ipy) = sum(cpoly%avg_tstar * cpoly%area) * poly_area_i - cgrid%avg_qstar (ipy) = sum(cpoly%avg_qstar * cpoly%area) * poly_area_i - cgrid%avg_cstar (ipy) = sum(cpoly%avg_cstar * cpoly%area) * poly_area_i - - !----- Average albedo values. ----------------------------------------------------! - cgrid%avg_albedo (ipy) = sum(cpoly%avg_albedo * cpoly%area) & - * poly_area_i - cgrid%avg_albedo_beam (ipy) = sum(cpoly%avg_albedo_beam * cpoly%area) & - * poly_area_i - cgrid%avg_albedo_diffuse (ipy) = sum(cpoly%avg_albedo_diffuse * cpoly%area) & - * poly_area_i - cgrid%avg_rlong_albedo (ipy) = sum(cpoly%avg_rlong_albedo * cpoly%area) & - * poly_area_i - !---------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + ! Find the derived properties for the air above canopy. ! + !------------------------------------------------------------------------------------! + atm_exner = press2exner (cgrid%fmean_atm_prss(ipy)) + cgrid%fmean_atm_temp(ipy) = extheta2temp(atm_exner,cgrid%fmean_atm_theta(ipy)) + cgrid%fmean_atm_rhos(ipy) = idealdenssh ( cgrid%fmean_atm_prss (ipy) & + , cgrid%fmean_atm_temp (ipy) & + , cgrid%fmean_atm_shv (ipy) ) + !------------------------------------------------------------------------------------! - cgrid%avg_available_water(ipy) = sum(cpoly%avg_available_water *cpoly%area) & - * poly_area_i - !---------------------------------------------------------------------------------! - ! Polygon average of canopy thermodynamic state. We average the variables ! - ! that are insensitive to changes in pressure (potential temperature, specific ! - ! humidity, CO2 mixing ratio and pressure itself) by averaging over sites. The ! - ! other variables are found using the prescribed diagnostic equations. ! - !---------------------------------------------------------------------------------! - cgrid%avg_can_depth (ipy) = sum(cpoly%avg_can_depth * cpoly%area) * poly_area_i - cgrid%avg_can_theiv (ipy) = sum(cpoly%avg_can_theiv * cpoly%area) * poly_area_i - cgrid%avg_can_vpdef (ipy) = sum(cpoly%avg_can_vpdef * cpoly%area) * poly_area_i - cgrid%avg_can_theta (ipy) = sum(cpoly%avg_can_theta * cpoly%area) * poly_area_i - cgrid%avg_can_shv (ipy) = sum(cpoly%avg_can_shv * cpoly%area) * poly_area_i - cgrid%avg_can_co2 (ipy) = sum(cpoly%avg_can_co2 * cpoly%area) * poly_area_i - cgrid%avg_can_prss (ipy) = sum(cpoly%avg_can_prss * cpoly%area) * poly_area_i - can_exner = press2exner (cgrid%avg_can_prss(ipy)) - cgrid%avg_can_temp (ipy) = extheta2temp(can_exner,cgrid%avg_can_theta(ipy)) - cgrid%avg_can_rhos (ipy) = idealdenssh ( cgrid%avg_can_prss (ipy) & - , cgrid%avg_can_temp (ipy) & - , cgrid%avg_can_shv (ipy) ) - !---------------------------------------------------------------------------------! - ! Similar to the site level, average mass, heat capacity and energy then find ! - ! the average temperature and liquid water fraction. ! - !---------------------------------------------------------------------------------! - cgrid%avg_sensible_gg (:,ipy) = matmul(cpoly%avg_sensible_gg , cpoly%area) & - * poly_area_i - cgrid%avg_smoist_gg (:,ipy) = matmul(cpoly%avg_smoist_gg , cpoly%area) & - * poly_area_i - cgrid%avg_transloss (:,ipy) = matmul(cpoly%avg_transloss , cpoly%area) & - * poly_area_i - cgrid%avg_soil_energy (:,ipy) = matmul(cpoly%avg_soil_energy , cpoly%area) & - * poly_area_i - cgrid%avg_soil_water (:,ipy) = matmul(cpoly%avg_soil_water , cpoly%area) & - * poly_area_i - cgrid%avg_soil_mstpot (:,ipy) = matmul(cpoly%avg_soil_mstpot , cpoly%area) & - * poly_area_i - cgrid%avg_soil_rootfrac(:,ipy) = matmul(cpoly%avg_soil_rootfrac, cpoly%area) & - * poly_area_i - - - do k=cgrid%lsl(ipy),nzg - !------------------------------------------------------------------------------! - ! Finding the average temperature and liquid fraction. The polygon-level ! - ! mean heat capacity was already found during the site loop. ! - !------------------------------------------------------------------------------! - call uextcm2tl(cgrid%avg_soil_energy(k,ipy),cgrid%avg_soil_water(k,ipy)*wdns & - ,poly_avg_soil_hcap(k),cgrid%avg_soil_temp(k,ipy) & - ,cgrid%avg_soil_fracliq(k,ipy)) - end do - cgrid%avg_soil_wetness(ipy) = sum(cpoly%avg_soil_wetness * cpoly%area) & - * poly_area_i - !---------------------------------------------------------------------------------! - ! Also using the same idea as the site-level: average energy, mass, and depth, ! - ! but find temperature and liquid fraction with the averaged values. Again, use ! - ! the energy in J/m2 instead of J/kg to do the polygon averaging. ! - !---------------------------------------------------------------------------------! - cgrid%avg_sfcw_mass(ipy) = sum(cpoly%avg_sfcw_mass * cpoly%area) * poly_area_i - cgrid%avg_sfcw_depth(ipy) = sum(cpoly%avg_sfcw_depth * cpoly%area) * poly_area_i - cgrid%avg_sfcw_energy(ipy) = sum( cpoly%avg_sfcw_energy & - * cpoly%avg_sfcw_mass * cpoly%area) * poly_area_i - - !----- Scale energy and find temp and fracliq if there is enogh mass -------------! - if (cgrid%avg_sfcw_mass(ipy) > tiny_sfcwater_mass) then - cgrid%avg_sfcw_energy(ipy) = cgrid%avg_sfcw_energy(ipy) & - / cgrid%avg_sfcw_mass(ipy) - call uint2tl(cgrid%avg_sfcw_energy(ipy),cgrid%avg_sfcw_tempk(ipy) & - ,cgrid%avg_sfcw_fracliq(ipy)) - else - cgrid%avg_sfcw_mass(ipy) = 0. - cgrid%avg_sfcw_depth(ipy) = 0. - cgrid%avg_sfcw_energy(ipy) = 0. - cgrid%avg_sfcw_tempk(ipy) = cgrid%avg_soil_temp(nzg,ipy) - cgrid%avg_sfcw_fracliq(ipy) = cgrid%avg_soil_fracliq(nzg,ipy) - end if - !---------------------------------------------------------------------------------! - ! Similar to site level, compute mean leaf and stem internal energy, water ! - ! mass, and heat capacity. If there is some heat capacity, then find the mean ! - ! temperature, otherwise just assume to be the canopy temperature. ! - !---------------------------------------------------------------------------------! - cgrid%avg_leaf_energy(ipy) = sum(cpoly%avg_leaf_energy * cpoly%area) * poly_area_i - cgrid%avg_leaf_water(ipy) = sum(cpoly%avg_leaf_water * cpoly%area) * poly_area_i - cgrid%avg_leaf_hcap(ipy) = sum(cpoly%avg_leaf_hcap * cpoly%area) * poly_area_i - cgrid%avg_leaf_vpdef(ipy) = sum(cpoly%avg_leaf_vpdef * cpoly%area) * poly_area_i - cgrid%avg_wood_energy(ipy) = sum(cpoly%avg_wood_energy * cpoly%area) * poly_area_i - cgrid%avg_wood_water(ipy) = sum(cpoly%avg_wood_water * cpoly%area) * poly_area_i - cgrid%avg_wood_hcap(ipy) = sum(cpoly%avg_wood_hcap * cpoly%area) * poly_area_i - if (cgrid%avg_leaf_hcap(ipy) > 0.) then - call uextcm2tl(cgrid%avg_leaf_energy(ipy),cgrid%avg_leaf_water(ipy) & - ,cgrid%avg_leaf_hcap(ipy),cgrid%avg_leaf_temp(ipy) & - ,cgrid%avg_leaf_fliq(ipy)) + + !------------------------------------------------------------------------------------! + ! Find the derived properties for the canopy air space. ! + !------------------------------------------------------------------------------------! + can_exner = press2exner (cgrid%fmean_can_prss(ipy)) + cgrid%fmean_can_temp(ipy) = extheta2temp(can_exner,cgrid%fmean_can_theta(ipy)) + cgrid%fmean_can_rhos(ipy) = idealdenssh ( cgrid%fmean_can_prss (ipy) & + , cgrid%fmean_can_temp (ipy) & + , cgrid%fmean_can_shv (ipy) ) + !------------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------------! + ! If the patch had some temporary snow/pounding layer, convert the mean energy to ! + ! J/kg, then find the mean temperature and liquid fraction. Otherwise, set them to ! + ! either zero or default values. ! + !------------------------------------------------------------------------------------! + if (cgrid%fmean_sfcw_mass(ipy) > tiny_sfcwater_mass) then + cgrid%fmean_sfcw_energy(ipy) = cgrid%fmean_sfcw_energy(ipy) & + / cgrid%fmean_sfcw_mass(ipy) + call uint2tl(cgrid%fmean_sfcw_energy(ipy),cgrid%fmean_sfcw_temp(ipy) & + ,cgrid%fmean_sfcw_fliq(ipy)) + else + cgrid%fmean_sfcw_mass (ipy) = 0. + cgrid%fmean_sfcw_depth (ipy) = 0. + cgrid%fmean_sfcw_energy(ipy) = 0. + cgrid%fmean_sfcw_temp (ipy) = cgrid%fmean_soil_temp(nzg,ipy) + cgrid%fmean_sfcw_fliq (ipy) = cgrid%fmean_soil_fliq(nzg,ipy) + end if + !------------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------------! + ! Find the temperature and the fraction of liquid water. ! + !------------------------------------------------------------------------------------! + do k=1,nzg + call uextcm2tl(cgrid%fmean_soil_energy(k,ipy),cgrid%fmean_soil_water(k,ipy)*wdns & + ,cgrid_fmean_soil_hcap (k) ,cgrid%fmean_soil_temp (k,ipy) & + ,cgrid%fmean_soil_fliq (k,ipy)) + end do + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + ! Find the vegetation temperature and liquid fraction. ! + !------------------------------------------------------------------------------------! + !----- Leaf. ------------------------------------------------------------------------! + if (cgrid%fmean_leaf_hcap(ipy) > 0.) then + call uextcm2tl( cgrid%fmean_leaf_energy(ipy), cgrid%fmean_leaf_water (ipy) & + , cgrid%fmean_leaf_hcap (ipy), cgrid%fmean_leaf_temp (ipy) & + , cgrid%fmean_leaf_fliq (ipy) ) + else + cgrid%fmean_leaf_temp (ipy) = cgrid%fmean_can_temp (ipy) + if (cgrid%fmean_can_temp(ipy) > t00) then + cgrid%fmean_leaf_fliq(ipy) = 1.0 + elseif (cgrid%fmean_can_temp(ipy) == t00) then + cgrid%fmean_leaf_fliq(ipy) = 0.5 else - cgrid%avg_leaf_temp(ipy) = cgrid%avg_can_temp(ipy) - if (cgrid%avg_can_temp(ipy) > 0.0) then - cgrid%avg_leaf_fliq(ipy) = 1.0 - elseif (cgrid%avg_can_temp(ipy) == 0.0) then - cgrid%avg_leaf_fliq(ipy) = 0.5 - else - cgrid%avg_leaf_fliq(ipy) = 0.0 - end if + cgrid%fmean_leaf_fliq(ipy) = 0.0 end if - if (cgrid%avg_wood_hcap(ipy) > 0.) then - call uextcm2tl(cgrid%avg_wood_energy(ipy),cgrid%avg_wood_water(ipy) & - ,cgrid%avg_wood_hcap(ipy),cgrid%avg_wood_temp(ipy) & - ,cgrid%avg_wood_fliq(ipy)) + end if + !----- Wood. ------------------------------------------------------------------------! + if (cgrid%fmean_wood_hcap(ipy) > 0.) then + call uextcm2tl( cgrid%fmean_wood_energy(ipy) & + , cgrid%fmean_wood_water (ipy) & + , cgrid%fmean_wood_hcap (ipy) & + , cgrid%fmean_wood_temp (ipy) & + , cgrid%fmean_wood_fliq (ipy) ) + else + cgrid%fmean_wood_temp(ipy) = cgrid%fmean_can_temp(ipy) + if (cgrid%fmean_can_temp(ipy) > t00) then + cgrid%fmean_wood_fliq(ipy) = 1.0 + elseif (cgrid%fmean_can_temp(ipy) == t00) then + cgrid%fmean_wood_fliq(ipy) = 0.5 else - cgrid%avg_wood_temp(ipy) = cgrid%avg_can_temp(ipy) - if (cgrid%avg_can_temp(ipy) > 0.0) then - cgrid%avg_wood_fliq(ipy) = 1.0 - elseif (cgrid%avg_can_temp(ipy) == 0.0) then - cgrid%avg_wood_fliq(ipy) = 0.5 - else - cgrid%avg_wood_fliq(ipy) = 0.0 - end if + cgrid%fmean_wood_fliq(ipy) = 0.0 end if - !---------------------------------------------------------------------------------! + end if + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + ! Normalise the "intensive" properties. The weight was either the LAI, WAI, or ! + ! plant density. In case none of the cohorts qualified to contribute, then we ! + ! assign either the canopy air space property, or a default number. ! + !------------------------------------------------------------------------------------! + if (poly_lai > 0.) then + cgrid%fmean_leaf_vpdef(ipy) = cgrid%fmean_leaf_vpdef (ipy) / poly_lai + cgrid%fmean_leaf_gsw (ipy) = cgrid%fmean_leaf_gsw (ipy) / poly_lai + cgrid%fmean_leaf_gbw (ipy) = cgrid%fmean_leaf_gbw (ipy) / poly_lai + cgrid%fmean_fs_open (ipy) = cgrid%fmean_fs_open (ipy) / poly_lai + cgrid%fmean_fsw (ipy) = cgrid%fmean_fsw (ipy) / poly_lai + cgrid%fmean_fsn (ipy) = cgrid%fmean_fsn (ipy) / poly_lai + else + cgrid%fmean_leaf_vpdef(ipy) = cgrid%fmean_can_vpdef (ipy) + cgrid%fmean_leaf_gsw (ipy) = 0.0 + cgrid%fmean_leaf_gbw (ipy) = 0.0 + cgrid%fmean_fs_open (ipy) = 0.5 + cgrid%fmean_fsw (ipy) = 0.5 + cgrid%fmean_fsn (ipy) = 0.5 + end if + if (poly_wai > 0.) then + cgrid%fmean_wood_gbw (ipy) = cgrid%fmean_wood_gbw (ipy) / poly_wai + else + cgrid%fmean_wood_gbw (ipy) = 0.0 + end if + !------------------------------------------------------------------------------------! - !---------------------------------------------------------------------------------! - ! Compute the average amongst all surfaces (soil, temporary surface water, and ! - ! vegetation, the last two only if they really exist). All energy terms are ! - ! converted to J/m2, all water terms to kg/m2, and the heat capacities of every- ! - ! thing that is not water is in J/m2/K. ! - !---------------------------------------------------------------------------------! - skin_energy = cgrid%avg_leaf_energy(ipy) & - + cgrid%avg_wood_energy(ipy) & - + cgrid%avg_sfcw_energy(ipy) * cgrid%avg_sfcw_mass(ipy) & - + cgrid%avg_soil_energy(nzg,ipy) * dslz(nzg) - skin_water = cgrid%avg_leaf_water(ipy) & - + cgrid%avg_wood_water(ipy) & - + cgrid%avg_sfcw_mass(ipy) & - + cgrid%avg_soil_water(nzg,ipy) * dslz(nzg) * wdns - skin_hcap = cgrid%avg_leaf_hcap(ipy) & - + cgrid%avg_wood_hcap(ipy) & - + poly_avg_soil_hcap(nzg) * dslz(nzg) - call uextcm2tl(skin_energy,skin_water,skin_hcap & - ,cgrid%avg_skin_temp(ipy),skin_fliq) - !---------------------------------------------------------------------------------! - end do polyloop - end do gridloop + !------------------------------------------------------------------------------------! + ! Compute the average amongst all surfaces (soil, temporary surface water, and ! + ! vegetation, the last two only if they really exist). All energy terms are ! + ! converted to J/m2, all water terms to kg/m2, and the heat capacities of everything ! + ! that is not water is in J/m2/K. ! + !------------------------------------------------------------------------------------! + skin_energy = cgrid%fmean_leaf_energy(ipy) + cgrid%fmean_wood_energy(ipy) & + + cgrid%fmean_sfcw_energy(ipy) * cgrid%fmean_sfcw_mass (ipy) & + + cgrid%fmean_soil_energy(nzg,ipy) * dslz(nzg) + skin_water = cgrid%fmean_leaf_water(ipy) + cgrid%fmean_wood_water(ipy) & + + cgrid%fmean_sfcw_mass (ipy) & + + cgrid%fmean_soil_water(nzg,ipy) * dslz(nzg) * wdns + skin_hcap = cgrid%fmean_leaf_hcap(ipy) + cgrid%fmean_wood_hcap(ipy) & + + cgrid_fmean_soil_hcap(nzg) * dslz(nzg) + call uextcm2tl(skin_energy,skin_water,skin_hcap,cgrid%fmean_skin_temp(ipy),skin_fliq) + !------------------------------------------------------------------------------------! + end do polyloop + !---------------------------------------------------------------------------------------! return -end subroutine spatial_averages +end subroutine aggregate_polygon_fmean !==========================================================================================! !==========================================================================================! - - - - - diff --git a/ED/src/io/h5_output.F90 b/ED/src/io/h5_output.F90 index 04d53ae10..f51204308 100644 --- a/ED/src/io/h5_output.F90 +++ b/ED/src/io/h5_output.F90 @@ -1093,6 +1093,18 @@ subroutine geth5dims(idim_type,varlen,globid,var_len_global,dsetrank,varn,nrec,i cnt(1) = 1_8 stride(1) = 1_8 + case(-21) !(ndcycle,nsites) + ! Mean diel + dsetrank = 2 + globdims(1) = int(ndcycle,8) + chnkdims(1) = int(ndcycle,8) + chnkoffs(1) = 0_8 + globdims(2) = int(var_len_global,8) + chnkdims(2) = int(varlen,8) + chnkoffs(2) = int(globid,8) + cnt(1:2) = 1_8 + stride(1:2) = 1_8 + case(22,220) !(nzg,nsites) ! Soil column type @@ -1222,7 +1234,7 @@ subroutine geth5dims(idim_type,varlen,globid,var_len_global,dsetrank,varn,nrec,i case (-31) ! (ndcycle,npatches) ! Soil column type - dsetrank = 2 + dsetrank = 2 globdims(1) = int(ndcycle,8) chnkdims(1) = int(ndcycle,8) chnkoffs(1) = 0_8 @@ -1235,7 +1247,7 @@ subroutine geth5dims(idim_type,varlen,globid,var_len_global,dsetrank,varn,nrec,i case (32,320) ! (nzg,npatches) ! Soil column type - dsetrank = 2 + dsetrank = 2 globdims(1) = int(nzg,8) chnkdims(1) = int(nzg,8) chnkoffs(1) = 0_8 @@ -1244,7 +1256,23 @@ subroutine geth5dims(idim_type,varlen,globid,var_len_global,dsetrank,varn,nrec,i chnkoffs(2) = int(globid,8) cnt(1:2) = 1_8 stride(1:2) = 1_8 - + + case (-32) ! (nzg,ndcycle,npatches) + + ! Mean diel of soil column type + dsetrank = 3 + globdims(1) = int(nzg,8) + chnkdims(1) = int(nzg,8) + chnkoffs(1) = 0_8 + globdims(2) = int(ndcycle,8) + chnkdims(2) = int(ndcycle,8) + chnkoffs(2) = 0_8 + globdims(3) = int(var_len_global,8) + chnkdims(3) = int(varlen,8) + chnkoffs(3) = int(globid,8) + cnt(1:3) = 1_8 + stride(1:3) = 1_8 + case (33) !(nzs,npatches) ! Surface water column type diff --git a/ED/src/memory/canopy_air_coms.f90 b/ED/src/memory/canopy_air_coms.f90 index 0e81ae4c3..9caea402f 100644 --- a/ED/src/memory/canopy_air_coms.f90 +++ b/ED/src/memory/canopy_air_coms.f90 @@ -344,11 +344,10 @@ module canopy_air_coms !---------------------------------------------------------------------------------------! - ! Parameters to set the maximum vegetation-level aerodynamic resistance. ! - ! rb_max = rb_inter + rb_slope * TAI. ! + ! Parameter to set the minimum vegetation-level aerodynamic conductance. ! !---------------------------------------------------------------------------------------! - real :: rb_slope - real :: rb_inter + real :: gbhmos_min + real(kind=8) :: gbhmos_min8 !---------------------------------------------------------------------------------------! ! This is the minimum vegetation height. [m] ! diff --git a/ED/src/memory/consts_coms.F90 b/ED/src/memory/consts_coms.F90 index 0b484ad85..cb872924d 100644 --- a/ED/src/memory/consts_coms.F90 +++ b/ED/src/memory/consts_coms.F90 @@ -159,7 +159,17 @@ Module consts_coms , b_lnexp_min => lnexp_min & ! intent(in) , b_lnexp_max => lnexp_max & ! intent(in) , b_huge_num => huge_num & ! intent(in) - , b_tiny_num => tiny_num ! ! intent(in) + , b_tiny_num => tiny_num & ! intent(in) + , b_mol_2_umol => mol_2_umol & ! intent(in) + , b_umol_2_mol => umol_2_mol & ! intent(in) + , b_umol_2_kgC => umol_2_kgC & ! intent(in) + , b_Watts_2_Ein => Watts_2_Ein & ! intent(in) + , b_Ein_2_Watts => Ein_2_Watts & ! intent(in) + , b_kgC_2_umol => kgC_2_umol & ! intent(in) + , b_kgom2_2_tonoha => kgom2_2_tonoha & ! intent(in) + , b_tonoha_2_kgom2 => tonoha_2_kgom2 & ! intent(in) + , b_umols_2_kgCyr => umols_2_kgCyr & ! intent(in) + , b_kgCday_2_umols => kgCday_2_umols ! ! intent(in) implicit none !----- Copy the variables from BRAMS. --------------------------------------------------! @@ -317,6 +327,16 @@ Module consts_coms real, parameter :: lnexp_max = b_lnexp_max real, parameter :: huge_num = b_huge_num real, parameter :: tiny_num = b_tiny_num + real, parameter :: mol_2_umol = b_mol_2_umol + real, parameter :: umol_2_mol = b_umol_2_mol + real, parameter :: umol_2_kgC = b_umol_2_kgC + real, parameter :: Watts_2_Ein = b_Watts_2_Ein + real, parameter :: Ein_2_Watts = b_Ein_2_Watts + real, parameter :: kgC_2_umol = b_kgC_2_umol + real, parameter :: kgom2_2_tonoha = b_kgom2_2_tonoha + real, parameter :: tonoha_2_kgom2 = b_tonoha_2_kgom2 + real, parameter :: umols_2_kgCyr = b_umols_2_kgCyr + real, parameter :: kgCday_2_umols = b_kgCday_2_umols !---------------------------------------------------------------------------------------! #else @@ -603,10 +623,10 @@ Module consts_coms real, parameter :: tiny_num = 1.e-19 !---------------------------------------------------------------------------------------! -#endif + !---------------------------------------------------------------------------------------! - ! Unit conversion, it must be defined locally even for coupled runs. ! + ! Carbon-related unit conversions. ! !---------------------------------------------------------------------------------------! real, parameter :: mol_2_umol = 1.e6 ! mol => µmol real, parameter :: umol_2_mol = 1.e-6 ! µmol => mol @@ -620,6 +640,8 @@ Module consts_coms real, parameter :: kgCday_2_umols = kgC_2_umol / day_sec ! kg(C)/day => µmol(CO2)/s !---------------------------------------------------------------------------------------! +#endif + !---------------------------------------------------------------------------------------! ! Double precision version of all constants used in Runge-Kutta. ! diff --git a/ED/src/memory/ed_misc_coms.f90 b/ED/src/memory/ed_misc_coms.f90 index 97c65e415..b18e94ad2 100644 --- a/ED/src/memory/ed_misc_coms.f90 +++ b/ED/src/memory/ed_misc_coms.f90 @@ -184,6 +184,14 @@ Module ed_misc_coms logical :: fast_diagnostics !! If ifoutput,idoutput,and imoutput are zero, then !! there is no need to integrate fast flux diagnostics + + logical :: writing_dail ! Writing daily + logical :: writing_mont ! Writing monthly + logical :: writing_dcyc ! Writing mean diel + logical :: writing_year ! Writing yearly + logical :: writing_eorq ! If either monthly or mean diel are written. + logical :: writing_long ! If either daily, monthly, or mean diel are written. + ! Namelist option to attach metadata to HDF5 output files 0=no, 1=yes integer :: attach_metadata diff --git a/ED/src/memory/ed_state_vars.f90 b/ED/src/memory/ed_state_vars.f90 index 8f60b9fe8..6a612549c 100644 --- a/ED/src/memory/ed_state_vars.f90 +++ b/ED/src/memory/ed_state_vars.f90 @@ -5,8554 +5,3770 @@ !------------------------------------------------------------------------------------------! module ed_state_vars - use grid_coms, only: nzg,nzs,ngrids - use ed_max_dims, only: max_site,n_pft,n_dbh,n_age,n_mort,n_dist_types & - ,maxmach,maxgrds, str_len - use disturb_coms, only : lutime,num_lu_trans,max_lu_years - use met_driver_coms, only: met_driv_data,met_driv_state - use fusion_fission_coms, only: ff_nhgt,hgt_class - use phenology_coms, only: prescribed_phen - use ed_misc_coms, only: idoutput, imoutput, iqoutput, ndcycle - - implicit none -!============================================================================! -!============================================================================! - - - - - -!============================================================================! -!============================================================================! - - !--------------------------------------------------------------------------! - ! Patch type: - ! The following are arrays of cohorts that populate the current patch. - ! This is the lowest (most infantile) part of the memory structure. - !--------------------------------------------------------------------------! + use grid_coms , only : nzg & ! intent(in) + , nzs & ! intent(in) + , ngrids ! ! intent(in) + use ed_max_dims , only : max_site & ! intent(in) + , n_pft & ! intent(in) + , n_dbh & ! intent(in) + , n_mort & ! intent(in) + , n_dist_types & ! intent(in) + , maxmach & ! intent(in) + , maxgrds & ! intent(in) + , str_len ! ! intent(in) + use disturb_coms , only : lutime & ! intent(in) + , num_lu_trans & ! intent(in) + , max_lu_years ! ! intent(in) + use met_driver_coms , only : met_driv_data & ! intent(in) + , met_driv_state ! ! intent(in) + use fusion_fission_coms, only : ff_nhgt & ! intent(in) + , hgt_class ! ! intent(in) + use phenology_coms , only : prescribed_phen ! ! intent(in) + use ed_misc_coms , only : writing_long & ! intent(in) + , writing_eorq & ! intent(in) + , writing_dcyc & ! intent(in) + , ndcycle ! ! intent(in) + + implicit none + !=======================================================================================! + !=======================================================================================! - type patchtype - integer :: ncohorts - ! Global index of the first cohort across all cohorts - integer :: coglob_id - !================================================================ - ! Plant functional type: - ! 1 - C4 grass - ! 2 - tropical early successional tree - ! 3 - tropical mid successional tree - ! 4 - tropical late successional tree - ! 5 - C3 grass - ! 6 - northern pines (temperate) - ! 7 - southern pines (temperate) - ! 8 - late successional conifers - ! 9 - early successional cold-deciduous hardwood - ! 10 - mid successional cold-deciduous hardwood - ! 11 - late successional cold-deciduous hardwood - ! 12 - c3 pasture - ! 13 - c3 crop (e.g.,wheat, rice, soybean) - ! 14 - c4 pasture - ! 15 - c4 crop (e.g.,corn/maize) - ! 16 - tropical C3 grass - ! 17 - Araucaria (non-optim. south pine) + !=======================================================================================! + !=======================================================================================! + ! PATCH TYPE: The following are arrays of cohorts that populate the current patch. ! + ! This is the lowest (most nested) part of the memory structure. ! + !---------------------------------------------------------------------------------------! + type patchtype + !----- Number of cohorts in this patch. This number can be zero (empty patch). ----! + integer :: ncohorts + !------------------------------------------------------------------------------------! - integer ,pointer,dimension(:) :: pft - ! Density of plants (number/m2) - real ,pointer,dimension(:) :: nplant + !----- Global index of the first cohort across all cohorts. -------------------------! + integer :: coglob_id + !------------------------------------------------------------------------------------! - ! Plant height (m) - real ,pointer,dimension(:) :: hite - ! Above-ground biomass (kgC/plant) - real, pointer, dimension(:) :: agb - ! Basal area (cm2) - real, pointer, dimension(:) :: basarea + !------------------------------------------------------------------------------------! + ! Plant functional type. Default values are: ! + ! PFT | Name | Grass | Tropical | agriculture? ! + !-----+------------------------------------------+---------+----------+--------------! + ! 1 | C4 grass | yes | yes | yes ! + ! 2 | Early tropical | no | yes | no ! + ! 3 | Mid tropical | no | yes | no ! + ! 4 | Late tropical | no | yes | no ! + ! 5 | Temperate C3 grass | yes | no | yes ! + ! 6 | Northern pines | no | no | no ! + ! 7 | Southern pines | no | no | no ! + ! 8 | Late conifers | no | no | no ! + ! 9 | Early temperate deciduous | no | no | no ! + ! 10 | Mid temperate deciduous | no | no | no ! + ! 11 | Late temperate deciduous | no | no | no ! + ! 12 | C3 pasture | yes | no | yes ! + ! 13 | C3 crop (e.g.,wheat, rice, soybean) | yes | no | yes ! + ! 14 | C4 pasture | yes | yes | yes ! + ! 15 | C4 crop (e.g.,corn/maize) | yes | yes | yes ! + ! 16 | Tropical C3 grass | yes | yes | yes ! + ! 17 | Araucaria (based on 7, tropical allom.) | no | yes | no ! + !-----+------------------------------------------+---------+----------+--------------! + integer ,pointer,dimension(:) :: pft + + ! Density of plants (number/m2) + real ,pointer,dimension(:) :: nplant + + ! phenology_status codes: + ! 0 - plant has the maximum LAI, given its size + ! 1 - plant is growing leaves + ! -1 - plant is actively dropping leaves + ! 2 - plant has no leaves + integer ,pointer,dimension(:) :: phenology_status + + ! recruit_dbh codes (updated every month): + ! 0 - new plant + ! 1 - first month with DBH > 10cm + ! 2 - established as DBH > 10cm + integer, pointer, dimension(:) :: recruit_dbh + + ! census_status codes (updated every census): + ! 0 - this cohort has never been with DBH > 10 cm at census times + ! 1 - New recruit (DBH > 10 cm for the first census) + ! 2 - Established (DBH > 10 cm for at least two censuses + integer, pointer, dimension(:) :: census_status + + ! Plant height (m) + real ,pointer,dimension(:) :: hite + + ! Above-ground biomass (kgC/plant) + real, pointer, dimension(:) :: agb + + ! Basal area (cm2) + real, pointer, dimension(:) :: basarea - ! Rate of change in agb (kgC/plant/yr) - real, pointer, dimension(:) :: dagb_dt + ! Rate of change in agb (kgC/plant/yr) + real, pointer, dimension(:) :: dagb_dt - ! Rate of change in agb (1/yr) - real, pointer, dimension(:) :: dlnagb_dt + ! Rate of change in agb (1/yr) + real, pointer, dimension(:) :: dlnagb_dt - ! Rate of change in basal area (cm2/yr) - real, pointer, dimension(:) :: dba_dt + ! Rate of change in basal area (cm2/yr) + real, pointer, dimension(:) :: dba_dt - ! Rate of change in basal area (1/yr) - real, pointer, dimension(:) :: dlnba_dt + ! Rate of change in basal area (1/yr) + real, pointer, dimension(:) :: dlnba_dt - ! Rate of change in dbh (cm/yr) - real, pointer, dimension(:) :: ddbh_dt + ! Rate of change in dbh (cm/yr) + real, pointer, dimension(:) :: ddbh_dt - ! Rate of change in dbh ( 1/yr) - real, pointer, dimension(:) :: dlndbh_dt - - ! Plant diameter at breast height (cm) - real ,pointer,dimension(:) :: dbh + ! Rate of change in dbh ( 1/yr) + real, pointer, dimension(:) :: dlndbh_dt - ! Biomass of the structural wood (kgC/plant) - real ,pointer,dimension(:) :: bdead + ! Plant diameter at breast height (cm) + real ,pointer,dimension(:) :: dbh - ! Biomass of leaves (kgC/plant) - real ,pointer,dimension(:) :: bleaf - + ! Biomass of the structural wood (kgC/plant) + real ,pointer,dimension(:) :: bdead - ! phenology_status codes: - ! 0 - plant has the maximum LAI, given its size - ! 1 - plant is growing leaves - ! -1 - plant is actively dropping leaves - ! 2 - plant has no leaves - integer ,pointer,dimension(:) :: phenology_status + ! Biomass of leaves (kgC/plant) + real ,pointer,dimension(:) :: bleaf - ! recruit_dbh codes (updated every month): - ! 0 - new plant - ! 1 - first month with DBH > 10cm - ! 2 - established as DBH > 10cm - integer, pointer, dimension(:) :: recruit_dbh + ! Biomass of live tissue (kgC/plant) + real ,pointer,dimension(:) :: balive - ! census_status codes (updated every census): - ! 0 - this cohort has never been with DBH > 10 cm at census times - ! 1 - New recruit (DBH > 10 cm for the first census) - ! 2 - Established (DBH > 10 cm for at least two censuses - integer, pointer, dimension(:) :: census_status + ! Biomass of fine roots (kgC/plant) + real, pointer, dimension(:) :: broot + ! Biomass of sapwood above ground (kgC/plant) + real, pointer, dimension(:) :: bsapwooda - ! Biomass of live tissue (kgC/plant) - real ,pointer,dimension(:) :: balive + ! Biomass of sapwood below ground (kgC/plant) + real, pointer, dimension(:) :: bsapwoodb - ! Biomass of fine roots (kgC/plant) - real, pointer, dimension(:) :: broot + ! Plant storage pool of carbon [kgC/plant] + real ,pointer,dimension(:) :: bstorage - ! Biomass of sapwood above ground (kgC/plant) - real, pointer, dimension(:) :: bsapwooda + ! Amount of seeds produced for dispersal [kgC/plant] + real ,pointer,dimension(:) :: bseeds - ! Biomass of sapwood below ground (kgC/plant) - real, pointer, dimension(:) :: bsapwoodb + ! Leaf area index (m2 leaf / m2 ground) + real ,pointer,dimension(:) :: lai - ! Leaf area index (m2 leaf / m2 ground) - real ,pointer,dimension(:) :: lai + ! Wood area index (m2 wood / m2 ground) + real ,pointer,dimension(:) :: wai - ! Wood area index (m2 wood / m2 ground) - real ,pointer,dimension(:) :: wai + ! Crown area (m2 crown / m2 ground) + real ,pointer,dimension(:) :: crown_area - ! Crown area (m2 crown / m2 ground) - real ,pointer,dimension(:) :: crown_area + ! Logical test to check whether the cohort leaves can be resolved... + logical, pointer, dimension(:) :: leaf_resolvable + logical, pointer, dimension(:) :: wood_resolvable + + ! Monthly carbon balance for past 12 months and the current month + ! (kgC/plant/yr) - 13th column holds the partial month integration + real, pointer,dimension(:,:) :: cb !(13,ncohorts) - ! Logical test to check whether the cohort leaves can be resolved... - logical, pointer, dimension(:) :: leaf_resolvable - logical, pointer, dimension(:) :: wood_resolvable + ! Maximum monthly carbon balance for past 12 months and the current + ! month if cohort were at the top of the canopy (maximum light). + ! (kgC/plant/yr) - 13th column holds the partial month integration. + real, pointer,dimension(:,:) :: cb_lightmax !(13,ncohorts) - ! Plant storage pool of carbon [kgC/plant] - real ,pointer,dimension(:) :: bstorage - - ! Monthly carbon balance for past 12 months and the current month - ! (kgC/plant/yr) - 13th column holds the partial month integration - real, pointer,dimension(:,:) :: cb !(13,ncohorts) - - ! Maximum monthly carbon balance for past 12 months and the current - ! month if cohort were at the top of the canopy (maximum light). - ! (kgC/plant/yr) - 13th column holds the partial month integration. - real, pointer,dimension(:,:) :: cb_lightmax !(13,ncohorts) - - ! Maximum monthly carbon balance for past 12 months and the current - ! month if cohort had access to all soil moisture needed (maximum moisture/fsw). - ! (kgC/plant/yr) - 13th column holds the partial month integration. - real, pointer,dimension(:,:) :: cb_moistmax !(13,ncohorts) - - ! Relative carbon balance: - ! 1 CB_lightmax CB_watermax - ! ---- = k ------------- + (1 - k) ------------- - ! CR CB CB - ! k is the ddmort_const given on the namelist - real ,pointer,dimension(:) :: cbr_bar - - ! Monthly mean of cb. The only difference from cb is the way it is scaled, so - ! all months have the same "weight" - real, pointer, dimension(:) :: mmean_cb + ! Maximum monthly carbon balance for past 12 months and the current + ! month if cohort had access to all soil moisture needed (maximum moisture/fsw). + ! (kgC/plant/yr) - 13th column holds the partial month integration. + real, pointer,dimension(:,:) :: cb_moistmax !(13,ncohorts) - ! Leaf internal energy (J/m2 ground) - real ,pointer,dimension(:) :: leaf_energy + ! Relative carbon balance: + ! 1 CB_lightmax CB_watermax + ! ---- = k ------------- + (1 - k) ------------- + ! CR CB CB + ! k is the ddmort_const given on the namelist + real ,pointer,dimension(:) :: cbr_bar - ! Leaf temperature (K) - real ,pointer,dimension(:) :: leaf_temp + ! Leaf internal energy (J/m2 ground) + real ,pointer,dimension(:) :: leaf_energy - ! Leaf vapour pressure deficit (Pa) - real ,pointer,dimension(:) :: leaf_vpdef + ! Leaf temperature (K) + real ,pointer,dimension(:) :: leaf_temp - ! Leaf temperature of the previous step (K) - real, pointer,dimension(:) :: leaf_temp_pv + ! Leaf vapour pressure deficit (Pa) + real ,pointer,dimension(:) :: leaf_vpdef - ! Fraction of liquid water on top of leaves (dimensionless) - real ,pointer,dimension(:) :: leaf_fliq + ! Leaf temperature of the previous step (K) + real, pointer,dimension(:) :: leaf_temp_pv - ! Leaf surface water (kg/m2 ground) - real ,pointer,dimension(:) :: leaf_water + ! Fraction of liquid water on top of leaves (dimensionless) + real ,pointer,dimension(:) :: leaf_fliq - ! Leaf heat capacity [ J/m2/K] - real, pointer,dimension(:) :: leaf_hcap + ! Leaf surface water (kg/m2 ground) + real ,pointer,dimension(:) :: leaf_water - ! Wood internal energy (J/m2 ground) - real ,pointer,dimension(:) :: wood_energy + ! Leaf heat capacity [ J/m2/K] + real, pointer,dimension(:) :: leaf_hcap - ! Wood temperature (K) - real ,pointer,dimension(:) :: wood_temp + ! Wood internal energy (J/m2 ground) + real ,pointer,dimension(:) :: wood_energy - ! Wood temperature at previous step(K) - real ,pointer,dimension(:) :: wood_temp_pv + ! Wood temperature (K) + real ,pointer,dimension(:) :: wood_temp - ! Fraction of liquid water on top of wood (dimensionless) - real ,pointer,dimension(:) :: wood_fliq + ! Wood temperature at previous step(K) + real ,pointer,dimension(:) :: wood_temp_pv - ! Wood surface water (kg/m2 ground) - real ,pointer,dimension(:) :: wood_water + ! Fraction of liquid water on top of wood (dimensionless) + real ,pointer,dimension(:) :: wood_fliq - ! Wood heat capacity [ J/m2/K] - real, pointer,dimension(:) :: wood_hcap + ! Wood surface water (kg/m2 ground) + real ,pointer,dimension(:) :: wood_water - ! Reduced wind at the cohort level (m/s) - real ,pointer,dimension(:) :: veg_wind + ! Wood heat capacity [ J/m2/K] + real, pointer,dimension(:) :: wood_hcap - ! Leaf surface specific humidity for open stomata (kg/kg) - real ,pointer,dimension(:) :: lsfc_shv_open + ! Reduced wind at the cohort level (m/s) + real ,pointer,dimension(:) :: veg_wind - ! Leaf surface specific humidity for closed stomata (kg/kg) - real ,pointer,dimension(:) :: lsfc_shv_closed + ! Leaf surface specific humidity for open stomata (kg/kg) + real ,pointer,dimension(:) :: lsfc_shv_open - ! Leaf surface CO2 for open stomata (µmol/mol) - real ,pointer,dimension(:) :: lsfc_co2_open + ! Leaf surface specific humidity for closed stomata (kg/kg) + real ,pointer,dimension(:) :: lsfc_shv_closed - ! Leaf surface CO2 for closed stomata (µmol/mol) - real ,pointer,dimension(:) :: lsfc_co2_closed + ! Leaf surface CO2 for open stomata (µmol/mol) + real ,pointer,dimension(:) :: lsfc_co2_open - ! Leaf interecellular specific humidity (kg/kg) - real ,pointer,dimension(:) :: lint_shv + ! Leaf surface CO2 for closed stomata (µmol/mol) + real ,pointer,dimension(:) :: lsfc_co2_closed - ! Leaf intercellular CO2 for open stomata (µmol/mol) - real ,pointer,dimension(:) :: lint_co2_open + ! Leaf interecellular specific humidity (kg/kg) + real ,pointer,dimension(:) :: lint_shv - ! Leaf intercellular CO2 for closed stomata (µmol/mol) - real ,pointer,dimension(:) :: lint_co2_closed + ! Leaf intercellular CO2 for open stomata (µmol/mol) + real ,pointer,dimension(:) :: lint_co2_open - ! Gross primary productivity (GPP) [umol/m2/s], averaged over the - ! output frequency (FRQSTATE) - real ,pointer,dimension(:) :: mean_gpp + ! Leaf intercellular CO2 for closed stomata (µmol/mol) + real ,pointer,dimension(:) :: lint_co2_closed - ! Mean leaf respiration rate (umol/m2 ground/s), averaged over FRQSTATE - real ,pointer,dimension(:) :: mean_leaf_resp - ! Mean root respiration rate (umol/m2 ground/s), averaged over FRQSTATE - real ,pointer,dimension(:) :: mean_root_resp + !------------------------------------------------------------------------------------! + ! The following variables are used for growth rates. They are for internal use ! + ! only and are meaningless in the output files (they saved only in HISTORY). ! + !------------------------------------------------------------------------------------! + ! Mean leaf respiration rate (umol/m2 ground/s), averaged over 1 day + real ,pointer,dimension(:) :: today_leaf_resp + ! Mean root respiration rate (umol/m2 ground/s), averaged over 1 day + real ,pointer,dimension(:) :: today_root_resp + ! Gross primary productivity (GPP) [umol/m2 ground/s], averaged over 1 day + real,pointer,dimension(:) :: today_gpp + ! Potential GPP in the absence of N limitation [umol/m2 ground/s], + ! averaged over 1 day + real ,pointer,dimension(:) :: today_gpp_pot + ! Maximum GPP if cohort were at the top of the canopy (maximum light) + ! [umol/m2 ground/s], averaged over 1 day + real ,pointer,dimension(:) :: today_gpp_lightmax + ! Maximum GPP if cohort had all soil moisture needed (maximum soil moisture) + ! [umol/m2 ground/s], averaged over 1 day + real ,pointer,dimension(:) :: today_gpp_moistmax + + + real,pointer,dimension(:) :: today_nppleaf + real,pointer,dimension(:) :: today_nppfroot + real,pointer,dimension(:) :: today_nppsapwood + real,pointer,dimension(:) :: today_nppcroot + real,pointer,dimension(:) :: today_nppseeds + real,pointer,dimension(:) :: today_nppwood + real,pointer,dimension(:) :: today_nppdaily + !------------------------------------------------------------------------------------! - ! Mean growth respiration rate (umol/m2 ground/s), averaged over FRQSTATE - real ,pointer,dimension(:) :: mean_growth_resp - ! Mean storage respiration rate (umol/m2 ground/s), averaged over FRQSTATE - real ,pointer,dimension(:) :: mean_storage_resp - ! Mean vleaf respiration rate (umol/m2 ground/s), averaged over FRQSTATE - real ,pointer,dimension(:) :: mean_vleaf_resp + ! Plant growth respiration (kgC/plant/day) + real ,pointer,dimension(:) :: growth_respiration + ! Plant storage respiration (kgC/plant/day) + real ,pointer,dimension(:) :: storage_respiration + ! Plant virtual leaf respiration (kgC/plant/day) + real ,pointer,dimension(:) :: vleaf_respiration + ! Plant density tendency [plants/m2/month] + real ,pointer,dimension(:) :: monthly_dndt - ! Mean leaf respiration rate (umol/m2 ground/s), averaged over 1 day - real ,pointer,dimension(:) :: today_leaf_resp + ! Plant density tendency [1/month] + real ,pointer,dimension(:) :: monthly_dlnndt - ! Mean root respiration rate (umol/m2 ground/s), averaged over 1 day - real ,pointer,dimension(:) :: today_root_resp + ! Mortality rate [yr-1] + real , pointer, dimension(:,:) :: mort_rate - ! Gross primary productivity (GPP) [umol/m2 ground/s], averaged over 1 day - real ,pointer,dimension(:) :: today_gpp - real, pointer, dimension(:) :: today_nppleaf - real, pointer, dimension(:) :: today_nppfroot - real, pointer, dimension(:) :: today_nppsapwood - real, pointer, dimension(:) :: today_nppcroot - real, pointer, dimension(:) :: today_nppseeds - real, pointer, dimension(:) :: today_nppwood - real, pointer, dimension(:) :: today_nppdaily - - ! Potential GPP in the absence of N limitation [umol/m2 ground/s], - ! averaged over 1 day - real ,pointer,dimension(:) :: today_gpp_pot - - ! Maximum GPP if cohort were at the top of the canopy (maximum light) - ! [umol/m2 ground/s], averaged over 1 day - real ,pointer,dimension(:) :: today_gpp_lightmax - - ! Maximum GPP if cohort had all soil moisture needed (maximum soil moisture) - ! [umol/m2 ground/s], averaged over 1 day - real ,pointer,dimension(:) :: today_gpp_moistmax - - ! Plant growth respiration (kgC/plant/day) - real ,pointer,dimension(:) :: growth_respiration - - ! Plant storage respiration (kgC/plant/day) - real ,pointer,dimension(:) :: storage_respiration - - ! Plant virtual leaf respiration (kgC/plant/day) - real ,pointer,dimension(:) :: vleaf_respiration - - ! Daily and monthly means of the plant productivity terms, all in kgC/m2/yr - real, pointer, dimension(:) :: dmean_gpp - real, pointer, dimension(:) :: dmean_nppleaf - real, pointer, dimension(:) :: dmean_nppfroot - real, pointer, dimension(:) :: dmean_nppsapwood - real, pointer, dimension(:) :: dmean_nppcroot - real, pointer, dimension(:) :: dmean_nppseeds - real, pointer, dimension(:) :: dmean_nppwood - real, pointer, dimension(:) :: dmean_nppdaily - real, pointer, dimension(:) :: dmean_leaf_resp - real, pointer, dimension(:) :: dmean_root_resp - real, pointer, dimension(:,:) :: qmean_gpp - real, pointer, dimension(:,:) :: qmean_leaf_resp - real, pointer, dimension(:,:) :: qmean_root_resp - real, pointer, dimension(:) :: mmean_gpp - real, pointer, dimension(:) :: mmean_nppleaf - real, pointer, dimension(:) :: mmean_nppfroot - real, pointer, dimension(:) :: mmean_nppsapwood - real, pointer, dimension(:) :: mmean_nppcroot - real, pointer, dimension(:) :: mmean_nppseeds - real, pointer, dimension(:) :: mmean_nppwood - real, pointer, dimension(:) :: mmean_nppdaily - real, pointer, dimension(:) :: mmean_leaf_resp - real, pointer, dimension(:) :: mmean_root_resp - real, pointer, dimension(:) :: mmean_growth_resp - real, pointer, dimension(:) :: mmean_storage_resp - real, pointer, dimension(:) :: mmean_vleaf_resp - - ! Weighting factor for open and closed stomata due to N limitation - real ,pointer,dimension(:) :: fsn - - ! Plant density tendency [plants/m2/month] - real ,pointer,dimension(:) :: monthly_dndt - - ! Plant density tendency [1/month] - real ,pointer,dimension(:) :: monthly_dlnndt - - ! Mortality rate [yr-1] - real , pointer, dimension(:,:) :: mort_rate - - ! Monthly mean Mortality rate [yr-1] (only frost mortality changes...) - real , pointer, dimension(:,:) :: mmean_mort_rate - - ! Transpiration rate, open stomata (kg/m2_leaf/s) - real ,pointer,dimension(:) :: Psi_open - - ! This specifies the index of the deepest soil layer of which the - ! cohort can access water. - integer ,pointer,dimension(:) :: krdepth - - ! The model reports annual growth, mortality, cut and recruitment. - ! These rates are calculated with respect to two censuses. This - ! is the flag specifying if a cohort was present at the first - ! census. - integer ,pointer,dimension(:) :: first_census - - ! Flag specifying if this cohort is a new recruit with respect - ! to the first census. - integer ,pointer,dimension(:) :: new_recruit_flag - - ! Light level received by this cohort, its diurnal and monthly means - real, pointer, dimension(:) :: light_level - real, pointer, dimension(:) :: dmean_light_level - real, pointer, dimension(:) :: mmean_light_level - real, pointer, dimension(:) :: light_level_beam - real, pointer, dimension(:) :: dmean_light_level_beam - real, pointer, dimension(:) :: mmean_light_level_beam - real, pointer, dimension(:) :: light_level_diff - real, pointer, dimension(:) :: dmean_light_level_diff - real, pointer, dimension(:) :: mmean_light_level_diff - - ! Photosynthetically active radiation (PAR) absorbed by the - ! cohort leaves(units are W/m2) - real ,pointer,dimension(:) :: par_l - real ,pointer,dimension(:) :: mean_par_l - real ,pointer,dimension(:) :: dmean_par_l - real ,pointer,dimension(:,:) :: qmean_par_l - real ,pointer,dimension(:) :: mmean_par_l - - ! Photosynthetically active radiation (PAR) absorbed by the - ! cohort leaves (units are W/m2), beam component - real ,pointer,dimension(:) :: par_l_beam - real ,pointer,dimension(:) :: mean_par_l_beam - real ,pointer,dimension(:) :: dmean_par_l_beam - real ,pointer,dimension(:,:) :: qmean_par_l_beam - real ,pointer,dimension(:) :: mmean_par_l_beam - - ! Photosynthetically active radiation (PAR) absorbed by the - ! cohort leaves (units are W/m2), diffuse component - real ,pointer,dimension(:) :: par_l_diffuse - real ,pointer,dimension(:) :: mean_par_l_diff - real ,pointer,dimension(:) :: dmean_par_l_diff - real ,pointer,dimension(:,:) :: qmean_par_l_diff - real ,pointer,dimension(:) :: mmean_par_l_diff - - ! Total short wave radiation absorbed by the cohort leaves, W/m2 - real ,pointer,dimension(:) :: rshort_l - - ! Total short wave radiation absorbed by the cohort leaves, W/m2, beam component - real ,pointer,dimension(:) :: rshort_l_beam - - ! Total short wave radiation absorbed by the cohort leaves, W/m2, diffuse - ! component - real ,pointer,dimension(:) :: rshort_l_diffuse - - ! Total long wave radiation absorbed by the cohort leaves (W/m2) - real ,pointer,dimension(:) :: rlong_l - - ! Total long wave radiation absorbed by the cohort leaves (W/m2), due to - ! the temperature of the vegetation and surface alone - real ,pointer,dimension(:) :: rlong_l_surf - - ! Total long wave radiation absorbed by the cohort leaves (W/m2), due to - ! the incident atmospheric long wave alone - real ,pointer,dimension(:) :: rlong_l_incid - - ! Total short wave radiation absorbed by the cohort wood, W/m2 - real ,pointer,dimension(:) :: rshort_w - - ! Total short wave radiation absorbed by the cohort wood, W/m2, beam component - real ,pointer,dimension(:) :: rshort_w_beam - - ! Total short wave radiation absorbed by the cohort wood, W/m2, diffuse - ! component - real ,pointer,dimension(:) :: rshort_w_diffuse - - ! Total long wave radiation absorbed by the cohort wood (W/m2) - real ,pointer,dimension(:) :: rlong_w - - ! Total long wave radiation absorbed by the cohort wood (W/m2), due to - ! the temperature of the vegetation and surface alone - real ,pointer,dimension(:) :: rlong_w_surf - - ! Total long wave radiation absorbed by the cohort wood (W/m2), due to - ! the incident atmospheric long wave alone - real ,pointer,dimension(:) :: rlong_w_incid - - ! Leaf boundary layer conductance for heat/entropy (J/K/m2/s) - real ,pointer,dimension(:) :: leaf_gbh - - ! Leaf boundary layer conductance for water (kg/m2/s) - real ,pointer,dimension(:) :: leaf_gbw - - ! Wood boundary layer conductance for heat/entropy (J/K/m2/s) - real ,pointer,dimension(:) :: wood_gbh - - ! Wood boundary layer conductance for water (kg/m2/s) - real ,pointer,dimension(:) :: wood_gbw - - ! Photosynthesis rate, open stomata (umol/m2 leaf/s) - real ,pointer,dimension(:) :: A_open - - ! Photosynthesis rate, closed stomata (umol/m2 leaf/s) - real ,pointer,dimension(:) :: A_closed - - ! Transpiration rate, closed stomata (kg/m2_leaf/s) - real ,pointer,dimension(:) :: psi_closed - - ! Stomatal conductance for water, open stomata (kg_H2O/m2/s) - real ,pointer,dimension(:) :: gsw_open - - ! Stomatal conductance for water, closed stomata (kg_H2O/m2/s) - real ,pointer,dimension(:) :: gsw_closed - - ! Weighting factor for open and closed stomata (fsw=1 => fully open) - real ,pointer,dimension(:) :: fsw - - ! Product of fsw and fsn - real ,pointer,dimension(:) :: fs_open - - ! Water supply (kg_H2O/m2/s) - real , pointer, dimension(:) :: water_supply - - ! Daily and monthly means of the weighting factors for open and closed stomata - real , pointer, dimension(:) :: dmean_fs_open - real , pointer, dimension(:) :: dmean_fsw - real , pointer, dimension(:) :: dmean_fsn - real , pointer, dimension(:) :: dmean_psi_open - real , pointer, dimension(:) :: dmean_psi_closed - real , pointer, dimension(:) :: dmean_water_supply - real , pointer, dimension(:,:) :: qmean_fs_open - real , pointer, dimension(:,:) :: qmean_fsw - real , pointer, dimension(:,:) :: qmean_fsn - real , pointer, dimension(:,:) :: qmean_psi_open - real , pointer, dimension(:,:) :: qmean_psi_closed - real , pointer, dimension(:,:) :: qmean_water_supply - real , pointer, dimension(:) :: mmean_fs_open - real , pointer, dimension(:) :: mmean_fsw - real , pointer, dimension(:) :: mmean_fsn - real , pointer, dimension(:) :: mmean_psi_open - real , pointer, dimension(:) :: mmean_psi_closed - real , pointer, dimension(:) :: mmean_water_supply + ! This specifies the index of the deepest soil layer of which the + ! cohort can access water. + integer ,pointer,dimension(:) :: krdepth - ! Net stomatal conductance [kg_H2O/m2/s] - real ,pointer,dimension(:) :: stomatal_conductance - - ! Plant maintenance costs due to turnover of leaves and fine - ! roots [kgC/plant] - real ,pointer,dimension(:) :: leaf_maintenance - real ,pointer,dimension(:) :: root_maintenance - ! Monthly mean, in kgC/plant/year - real ,pointer,dimension(:) :: mmean_leaf_maintenance - real ,pointer,dimension(:) :: mmean_root_maintenance - - ! Leaf loss to litter layer due to phenology [kgC/plant] - real , pointer, dimension(:) :: leaf_drop - ! Monthly mean, in kgC/plant/year - real , pointer, dimension(:) :: mmean_leaf_drop - - ! Amount of seeds produced for dispersal [kgC/plant] - real ,pointer,dimension(:) :: bseeds - - ! Instantaneous values of leaf and root respiration [umol/m2/s] - real ,pointer,dimension(:) :: leaf_respiration - real ,pointer,dimension(:) :: root_respiration - - ! Gross Primary Productivity [umol/m2/s] - real, pointer,dimension(:) :: gpp - - ! Plant available water, (stress function) 0 to 1 [unitless] - real, pointer, dimension(:) :: paw_avg - - ! Elongation factor (0 - 1), factor to scale bleaf under drought. - real, pointer, dimension(:) :: elongf - - ! Phenology-related - real, pointer, dimension(:) :: turnover_amp - real, pointer, dimension(:) :: llspan - real, pointer, dimension(:) :: vm_bar - real, pointer, dimension(:) :: sla - - - ! Enthalpy and water fluxes at the cohort level, and their means. - real, pointer, dimension(:) :: mean_rshort_l - real, pointer, dimension(:) :: mean_rlong_l - real, pointer, dimension(:) :: mean_sensible_lc - real, pointer, dimension(:) :: mean_vapor_lc - real, pointer, dimension(:) :: mean_transp - real, pointer, dimension(:) :: mean_intercepted_al - real, pointer, dimension(:) :: mean_wshed_lg - real, pointer, dimension(:) :: mean_rshort_w - real, pointer, dimension(:) :: mean_rlong_w - real, pointer, dimension(:) :: mean_sensible_wc - real, pointer, dimension(:) :: mean_vapor_wc - real, pointer, dimension(:) :: mean_intercepted_aw - real, pointer, dimension(:) :: mean_wshed_wg - real, pointer, dimension(:) :: dmean_rshort_l - real, pointer, dimension(:) :: dmean_rlong_l - real, pointer, dimension(:) :: dmean_sensible_lc - real, pointer, dimension(:) :: dmean_vapor_lc - real, pointer, dimension(:) :: dmean_transp - real, pointer, dimension(:) :: dmean_intercepted_al - real, pointer, dimension(:) :: dmean_wshed_lg - real, pointer, dimension(:) :: dmean_rshort_w - real, pointer, dimension(:) :: dmean_rlong_w - real, pointer, dimension(:) :: dmean_sensible_wc - real, pointer, dimension(:) :: dmean_vapor_wc - real, pointer, dimension(:) :: dmean_intercepted_aw - real, pointer, dimension(:) :: dmean_wshed_wg - real, pointer, dimension(:,:) :: qmean_rshort_l - real, pointer, dimension(:,:) :: qmean_rlong_l - real, pointer, dimension(:,:) :: qmean_sensible_lc - real, pointer, dimension(:,:) :: qmean_vapor_lc - real, pointer, dimension(:,:) :: qmean_transp - real, pointer, dimension(:,:) :: qmean_intercepted_al - real, pointer, dimension(:,:) :: qmean_wshed_lg - real, pointer, dimension(:,:) :: qmean_rshort_w - real, pointer, dimension(:,:) :: qmean_rlong_w - real, pointer, dimension(:,:) :: qmean_sensible_wc - real, pointer, dimension(:,:) :: qmean_vapor_wc - real, pointer, dimension(:,:) :: qmean_intercepted_aw - real, pointer, dimension(:,:) :: qmean_wshed_wg - real, pointer, dimension(:) :: mmean_rshort_l - real, pointer, dimension(:) :: mmean_rlong_l - real, pointer, dimension(:) :: mmean_sensible_lc - real, pointer, dimension(:) :: mmean_vapor_lc - real, pointer, dimension(:) :: mmean_transp - real, pointer, dimension(:) :: mmean_intercepted_al - real, pointer, dimension(:) :: mmean_wshed_lg - real, pointer, dimension(:) :: mmean_rshort_w - real, pointer, dimension(:) :: mmean_rlong_w - real, pointer, dimension(:) :: mmean_sensible_wc - real, pointer, dimension(:) :: mmean_vapor_wc - real, pointer, dimension(:) :: mmean_intercepted_aw - real, pointer, dimension(:) :: mmean_wshed_wg - - end type patchtype -!============================================================================! -!============================================================================! - - - - - -!============================================================================! -!============================================================================! - !---------------------------------------------------------------------------! - ! Site type: - ! The following are the patch level arrays that populate the current site. - !---------------------------------------------------------------------------! - - type sitetype - + ! The model reports annual growth, mortality, cut and recruitment. + ! These rates are calculated with respect to two censuses. This + ! is the flag specifying if a cohort was present at the first + ! census. + integer ,pointer,dimension(:) :: first_census - integer :: npatches + ! Flag specifying if this cohort is a new recruit with respect + ! to the first census. + integer ,pointer,dimension(:) :: new_recruit_flag - ! The global index of the first cohort in all patches - integer,pointer,dimension(:) :: paco_id + ! Light level received by this cohort, its diurnal and monthly means + real, pointer, dimension(:) :: light_level + real, pointer, dimension(:) :: light_level_beam + real, pointer, dimension(:) :: light_level_diff - ! The number of cohorts in each patch - integer,pointer,dimension(:) :: paco_n + ! Photosynthetically active radiation (PAR) absorbed by the + ! cohort leaves(units are W/m2) + real ,pointer,dimension(:) :: par_l - ! Global index of the first patch in this vector, across all patches - ! on the grid + ! Photosynthetically active radiation (PAR) absorbed by the + ! cohort leaves (units are W/m2), beam component + real ,pointer,dimension(:) :: par_l_beam - integer :: paglob_id + ! Photosynthetically active radiation (PAR) absorbed by the + ! cohort leaves (units are W/m2), diffuse component + real ,pointer,dimension(:) :: par_l_diffuse - ! The patches containing the cohort arrays - type(patchtype),pointer,dimension(:) :: patch + ! Total short wave radiation absorbed by the cohort leaves, W/m2 + real ,pointer,dimension(:) :: rshort_l + ! Total short wave radiation absorbed by the cohort leaves, W/m2, beam component + real ,pointer,dimension(:) :: rshort_l_beam - ! Leaf area index (m2 leaf / m2 ground) - real, pointer,dimension(:) :: lai + ! Total short wave radiation absorbed by the cohort leaves, W/m2, diffuse + ! component + real ,pointer,dimension(:) :: rshort_l_diffuse - ! Wood area index (m2 wood / m2 ground) - real, pointer,dimension(:) :: wai + ! Total long wave radiation absorbed by the cohort leaves (W/m2) + real ,pointer,dimension(:) :: rlong_l - ! Patch type index: - ! Agriculture = 1 - ! Secondary Forest = 2 - ! Primary Forest = 3 - integer , pointer,dimension(:) :: dist_type + ! Total long wave radiation absorbed by the cohort leaves (W/m2), due to + ! the temperature of the vegetation and surface alone + real ,pointer,dimension(:) :: rlong_l_surf - ! Time since last disturbance (years) - real , pointer,dimension(:) :: age + ! Total long wave radiation absorbed by the cohort leaves (W/m2), due to + ! the incident atmospheric long wave alone + real ,pointer,dimension(:) :: rlong_l_incid - ! Fractional area of the patch - real , pointer,dimension(:) :: area + ! Total short wave radiation absorbed by the cohort wood, W/m2 + real ,pointer,dimension(:) :: rshort_w - ! Soil carbon concentration, fast pool (kg/m2) - real , pointer,dimension(:) :: fast_soil_C + ! Total short wave radiation absorbed by the cohort wood, W/m2, beam component + real ,pointer,dimension(:) :: rshort_w_beam - ! Soil carbon concentration, slow pool (kg/m2) - real , pointer,dimension(:) :: slow_soil_C + ! Total short wave radiation absorbed by the cohort wood, W/m2, diffuse + ! component + real ,pointer,dimension(:) :: rshort_w_diffuse - ! Soil carbon concentration, structural pool (kg/m2) - real , pointer,dimension(:) :: structural_soil_C + ! Total long wave radiation absorbed by the cohort wood (W/m2) + real ,pointer,dimension(:) :: rlong_w - ! Soil lignin concentration, structural pool (kg/m2) - real , pointer,dimension(:) :: structural_soil_L + ! Total long wave radiation absorbed by the cohort wood (W/m2), due to + ! the temperature of the vegetation and surface alone + real ,pointer,dimension(:) :: rlong_w_surf - ! Soil nitrogen concentration, mineralized pool (kg/m2) - real , pointer,dimension(:) :: mineralized_soil_N + ! Total long wave radiation absorbed by the cohort wood (W/m2), due to + ! the incident atmospheric long wave alone + real ,pointer,dimension(:) :: rlong_w_incid - ! Soil nitrogen concentration, fast pool (kg/m2) - real , pointer,dimension(:) :: fast_soil_N + ! Leaf boundary layer conductance for heat/entropy [J/K/m2leaf/s] + real ,pointer,dimension(:) :: leaf_gbh - ! Number of degree days - ! Degree days --- sum of daily average temperatures above 278.15 K - real , pointer,dimension(:) :: sum_dgd + ! Leaf boundary layer conductance for water [kg/m2leaf/s] + real ,pointer,dimension(:) :: leaf_gbw - ! Chill days --- number of days with average temperatures below 278.15 K - real , pointer,dimension(:) :: sum_chd + ! Wood boundary layer conductance for heat/entropy [J/K/m2wood/s] + real ,pointer,dimension(:) :: wood_gbh - ! Flag specifying whether (1) or not (0) this patch is a plantation - integer , pointer,dimension(:) :: plantation + ! Wood boundary layer conductance for water [kg/m2wood/s] + real ,pointer,dimension(:) :: wood_gbw - ! Ice-vapour equivalent potential temperature of canopy air space [K] - real , pointer,dimension(:) :: can_theiv + ! Photosynthesis rate, open stomata (umol/m2 leaf/s) + real ,pointer,dimension(:) :: A_open - ! Vapour pressure deficit [Pa] - real , pointer,dimension(:) :: can_vpdef + ! Photosynthesis rate, closed stomata (umol/m2 leaf/s) + real ,pointer,dimension(:) :: A_closed - ! Temperature (K) of canopy air - real , pointer,dimension(:) :: can_temp + ! Transpiration rate, open stomata (kg/m2_leaf/s) + real ,pointer,dimension(:) :: psi_open - ! Previous step's canopy air temperature - real , pointer,dimension(:) :: can_temp_pv + ! Transpiration rate, closed stomata (kg/m2_leaf/s) + real ,pointer,dimension(:) :: psi_closed + ! Stomatal conductance for water, open stomata [kg/m2leaf/s] + real ,pointer,dimension(:) :: gsw_open - ! Water vapor specific humidity (kg/kg) of canopy air - real , pointer,dimension(:) :: can_shv + ! Stomatal conductance for water, closed stomata [kg/m2leaf/s] + real ,pointer,dimension(:) :: gsw_closed - ! CO2 mixing ratio [umol/mol] of canopy air - real , pointer,dimension(:) :: can_co2 + ! Net stomatal conductance [kg/m2leaf/s] + real ,pointer,dimension(:) :: leaf_gsw - ! Density [kg/m3] of canopy air - real , pointer,dimension(:) :: can_rhos + ! Weighting factor for open and closed stomata (fsw=1 => fully open) + real ,pointer,dimension(:) :: fsw - ! Canopy air pressure. - real , pointer,dimension(:) :: can_prss + ! Weighting factor for open and closed stomata due to N limitation + real ,pointer,dimension(:) :: fsn - ! Canopy air potential temperature - real , pointer,dimension(:) :: can_theta + ! Product of fsw and fsn + real ,pointer,dimension(:) :: fs_open - ! Canopy depth (m) - real , pointer,dimension(:) :: can_depth + ! Water supply (kg_H2O/m2/s) + real , pointer, dimension(:) :: water_supply - ! Fraction of canopy that is open (---) - real , pointer,dimension(:) :: opencan_frac + ! Plant maintenance costs due to turnover of leaves and fine + ! roots [kgC/plant] + real ,pointer,dimension(:) :: leaf_maintenance + real ,pointer,dimension(:) :: root_maintenance - ! Ground to canopy conductances - real , pointer, dimension(:) :: ggbare - real , pointer, dimension(:) :: ggveg - real , pointer, dimension(:) :: ggnet - real , pointer, dimension(:) :: ggsoil + ! Leaf loss to litter layer due to phenology [kgC/plant] + real , pointer, dimension(:) :: leaf_drop + ! Instantaneous values of leaf and root respiration [umol/m2/s] + real ,pointer,dimension(:) :: leaf_respiration + real ,pointer,dimension(:) :: root_respiration - ! Number of cohorts in the patch - integer , pointer,dimension(:) :: cohort_count + ! Gross Primary Productivity [umol/m2/s] + real, pointer,dimension(:) :: gpp - ! Patch name (only used when restarting from ED1) - character(len=str_len), pointer,dimension(:) :: pname - - ! Number of surface water layers - integer,pointer,dimension(:) :: nlev_sfcwater + ! Plant available water, (stress function) 0 to 1 [unitless] + real, pointer, dimension(:) :: paw_avg - ! Surface water mass (kg/m2) - real, pointer,dimension(:,:) :: sfcwater_mass + ! Elongation factor (0 - 1), factor to scale bleaf under drought. + real, pointer, dimension(:) :: elongf - ! Surface water internal energy (J/kg) - real, pointer,dimension(:,:) :: sfcwater_energy + ! Phenology-related + real, pointer, dimension(:) :: turnover_amp + real, pointer, dimension(:) :: llspan + real, pointer, dimension(:) :: vm_bar + real, pointer, dimension(:) :: sla - ! Depth of surface water (m) - real, pointer,dimension(:,:) :: sfcwater_depth + !------------------------------------------------------------------------------------! + ! These are diagnostic variables, averaged over various time scales. ! + ! FMEAN -- averaged over FRQSUM (the least between FRQFAST, FRQSTATE and one day). ! + ! DMEAN -- daily averages ! + ! MMEAN -- monthly averages ! + ! MMSQU -- monthly mean sum of squares ! + ! QMEAN -- mean diel ! + ! QMSQU -- mean diel (mean sum of squares) ! + ! ! + ! pl means plant (intensive variable) ! + ! m2l means m2 of leaf area (intensive variable) ! + ! m2g means m2 of ground area (extensive variable) ! + !------------------------------------------------------------------------------------! + !----- Fast averages. ---------------------------------------------------------------! + real,pointer,dimension(:) :: fmean_gpp ! Gross primary prod. [kgC/pl/yr] + real,pointer,dimension(:) :: fmean_npp ! Net primary prod. [kgC/pl/yr] + real,pointer,dimension(:) :: fmean_leaf_resp ! Leaf respiration [kgC/pl/yr] + real,pointer,dimension(:) :: fmean_root_resp ! Root respiration [kgC/pl/yr] + real,pointer,dimension(:) :: fmean_growth_resp ! Growth resp. [kgC/pl/yr] + real,pointer,dimension(:) :: fmean_storage_resp ! Storage resp. [kgC/pl/yr] + real,pointer,dimension(:) :: fmean_vleaf_resp ! Virt. leaf resp. [kgC/pl/yr] + real,pointer,dimension(:) :: fmean_plresp ! Plant respiration. [kgC/pl/yr] + real,pointer,dimension(:) :: fmean_leaf_energy ! Leaf int. energy [ J/m2g] + real,pointer,dimension(:) :: fmean_leaf_water ! Leaf sfc. water [ kg/m2g] + real,pointer,dimension(:) :: fmean_leaf_hcap ! Leaf heat capacity [ J/m2g/K] + real,pointer,dimension(:) :: fmean_leaf_vpdef ! Leaf VPD [ Pa] + real,pointer,dimension(:) :: fmean_leaf_temp ! Leaf temperature [ K] + real,pointer,dimension(:) :: fmean_leaf_fliq ! Liquid fraction [ --] + real,pointer,dimension(:) :: fmean_leaf_gsw ! Stomatal conduct. [ m/s] + real,pointer,dimension(:) :: fmean_leaf_gbw ! Leaf BL conduct. [ m/s] + real,pointer,dimension(:) :: fmean_wood_energy ! Wood int. energy [ J/m2g] + real,pointer,dimension(:) :: fmean_wood_water ! Wood sfc. water [ kg/m2g] + real,pointer,dimension(:) :: fmean_wood_hcap ! Wood heat capacity [ J/m2g/K] + real,pointer,dimension(:) :: fmean_wood_temp ! Wood temperature [ K] + real,pointer,dimension(:) :: fmean_wood_fliq ! Liquid fraction [ --] + real,pointer,dimension(:) :: fmean_wood_gbw ! Wood BL conduct. [ m/s] + real,pointer,dimension(:) :: fmean_fs_open ! Net stress factor [ --] + real,pointer,dimension(:) :: fmean_fsw ! Moisture stress [ --] + real,pointer,dimension(:) :: fmean_fsn ! Nitrogen stress [ --] + real,pointer,dimension(:) :: fmean_psi_open ! Transp. no stress [ kg/m2l/s] + real,pointer,dimension(:) :: fmean_psi_closed ! Transp. max stress [ kg/m2l/s] + real,pointer,dimension(:) :: fmean_water_supply ! Water supply [ --] + real,pointer,dimension(:) :: fmean_light_level ! Light level (Total) [ --] + real,pointer,dimension(:) :: fmean_light_level_beam ! Light lev. (Direct) [ --] + real,pointer,dimension(:) :: fmean_light_level_diff ! Lighy lev. (Diff.) [ --] + real,pointer,dimension(:) :: fmean_par_l ! Absorbed PAR (Leaf) [ W/m2g] + real,pointer,dimension(:) :: fmean_par_l_beam ! Abs. Dir. PAR [ W/m2g] + real,pointer,dimension(:) :: fmean_par_l_diff ! Abs. Diffuse PAR [ W/m2g] + real,pointer,dimension(:) :: fmean_rshort_l ! Abs. SW (leaf) [ W/m2g] + real,pointer,dimension(:) :: fmean_rlong_l ! Abs. LW (leaf) [ W/m2g] + real,pointer,dimension(:) :: fmean_sensible_lc ! Sensible heat [ W/m2g] + real,pointer,dimension(:) :: fmean_vapor_lc ! Leaf evaporation [ kg/m2g/s] + real,pointer,dimension(:) :: fmean_transp ! Leaf transpiration [ kg/m2g/s] + real,pointer,dimension(:) :: fmean_intercepted_al ! Leaf interception [ kg/m2g/s] + real,pointer,dimension(:) :: fmean_wshed_lg ! Leaf shedding [ kg/m2g/s] + real,pointer,dimension(:) :: fmean_rshort_w ! Abs. SW (Wood) [ W/m2g] + real,pointer,dimension(:) :: fmean_rlong_w ! Abs. LW (Wood) [ W/m2g] + real,pointer,dimension(:) :: fmean_sensible_wc ! Sensible heat [ W/m2g] + real,pointer,dimension(:) :: fmean_vapor_wc ! Wood evaporation [ kg/m2g/s] + real,pointer,dimension(:) :: fmean_intercepted_aw ! Wood interception [ kg/m2g/s] + real,pointer,dimension(:) :: fmean_wshed_wg ! Wood shedding [ kg/m2g/s] + !----- Variables without sub-daily averages. ----------------------------------------! + real,pointer,dimension(:) :: dmean_nppleaf ! Leaf NPP [kgC/pl/yr] + real,pointer,dimension(:) :: dmean_nppfroot ! Fine root NPP [kgC/pl/yr] + real,pointer,dimension(:) :: dmean_nppsapwood ! Sapwood NPP [kgC/pl/yr] + real,pointer,dimension(:) :: dmean_nppcroot ! Coarse root NPP [kgC/pl/yr] + real,pointer,dimension(:) :: dmean_nppseeds ! Seed NPP [kgC/pl/yr] + real,pointer,dimension(:) :: dmean_nppwood ! Wood NPP [kgC/pl/yr] + real,pointer,dimension(:) :: dmean_nppdaily ! Daily NPP [kgC/pl/yr] + !----- Monthly means of variables that are integrated daily. ------------------------! + real,pointer,dimension(:) :: mmean_lai ! Leaf area index [ m2l/m2g] + real,pointer,dimension(:) :: mmean_bleaf ! Leaf biomass [ kgC/pl] + real,pointer,dimension(:) :: mmean_broot ! Root biomass [ kgC/pl] + real,pointer,dimension(:) :: mmean_bstorage ! Storage biomass [ kgC/pl] + real,pointer,dimension(:,:) :: mmean_mort_rate ! Mortality rate [ 1/yr] + real,pointer,dimension(:) :: mmean_leaf_maintenance ! Leaf maintenance [kgC/pl/yr] + real,pointer,dimension(:) :: mmean_root_maintenance ! Root mainten. [kgC/pl/yr] + real,pointer,dimension(:) :: mmean_leaf_drop ! Leaf drop [kgC/pl/yr] + real,pointer,dimension(:) :: mmean_cb ! 12-mon C balance [kgC/pl/yr] + !----- Daily mean (same units as fast mean). ----------------------------------------! + real,pointer,dimension(:) :: dmean_gpp + real,pointer,dimension(:) :: dmean_npp + real,pointer,dimension(:) :: dmean_leaf_resp + real,pointer,dimension(:) :: dmean_root_resp + real,pointer,dimension(:) :: dmean_growth_resp + real,pointer,dimension(:) :: dmean_storage_resp + real,pointer,dimension(:) :: dmean_vleaf_resp + real,pointer,dimension(:) :: dmean_plresp + real,pointer,dimension(:) :: dmean_leaf_energy + real,pointer,dimension(:) :: dmean_leaf_water + real,pointer,dimension(:) :: dmean_leaf_hcap + real,pointer,dimension(:) :: dmean_leaf_vpdef + real,pointer,dimension(:) :: dmean_leaf_temp + real,pointer,dimension(:) :: dmean_leaf_fliq + real,pointer,dimension(:) :: dmean_leaf_gsw + real,pointer,dimension(:) :: dmean_leaf_gbw + real,pointer,dimension(:) :: dmean_wood_energy + real,pointer,dimension(:) :: dmean_wood_water + real,pointer,dimension(:) :: dmean_wood_hcap + real,pointer,dimension(:) :: dmean_wood_temp + real,pointer,dimension(:) :: dmean_wood_fliq + real,pointer,dimension(:) :: dmean_wood_gbw + real,pointer,dimension(:) :: dmean_fs_open + real,pointer,dimension(:) :: dmean_fsw + real,pointer,dimension(:) :: dmean_fsn + real,pointer,dimension(:) :: dmean_psi_open + real,pointer,dimension(:) :: dmean_psi_closed + real,pointer,dimension(:) :: dmean_water_supply + real,pointer,dimension(:) :: dmean_light_level + real,pointer,dimension(:) :: dmean_light_level_beam + real,pointer,dimension(:) :: dmean_light_level_diff + real,pointer,dimension(:) :: dmean_par_l + real,pointer,dimension(:) :: dmean_par_l_beam + real,pointer,dimension(:) :: dmean_par_l_diff + real,pointer,dimension(:) :: dmean_rshort_l + real,pointer,dimension(:) :: dmean_rlong_l + real,pointer,dimension(:) :: dmean_sensible_lc + real,pointer,dimension(:) :: dmean_vapor_lc + real,pointer,dimension(:) :: dmean_transp + real,pointer,dimension(:) :: dmean_intercepted_al + real,pointer,dimension(:) :: dmean_wshed_lg + real,pointer,dimension(:) :: dmean_rshort_w + real,pointer,dimension(:) :: dmean_rlong_w + real,pointer,dimension(:) :: dmean_sensible_wc + real,pointer,dimension(:) :: dmean_vapor_wc + real,pointer,dimension(:) :: dmean_intercepted_aw + real,pointer,dimension(:) :: dmean_wshed_wg + !----- Monthly mean (same units as fast mean). --------------------------------------! + real,pointer,dimension(:) :: mmean_gpp + real,pointer,dimension(:) :: mmean_npp + real,pointer,dimension(:) :: mmean_leaf_resp + real,pointer,dimension(:) :: mmean_root_resp + real,pointer,dimension(:) :: mmean_growth_resp + real,pointer,dimension(:) :: mmean_storage_resp + real,pointer,dimension(:) :: mmean_vleaf_resp + real,pointer,dimension(:) :: mmean_plresp + real,pointer,dimension(:) :: mmean_leaf_energy + real,pointer,dimension(:) :: mmean_leaf_water + real,pointer,dimension(:) :: mmean_leaf_hcap + real,pointer,dimension(:) :: mmean_leaf_vpdef + real,pointer,dimension(:) :: mmean_leaf_temp + real,pointer,dimension(:) :: mmean_leaf_fliq + real,pointer,dimension(:) :: mmean_leaf_gsw + real,pointer,dimension(:) :: mmean_leaf_gbw + real,pointer,dimension(:) :: mmean_wood_energy + real,pointer,dimension(:) :: mmean_wood_water + real,pointer,dimension(:) :: mmean_wood_hcap + real,pointer,dimension(:) :: mmean_wood_temp + real,pointer,dimension(:) :: mmean_wood_fliq + real,pointer,dimension(:) :: mmean_wood_gbw + real,pointer,dimension(:) :: mmean_fs_open + real,pointer,dimension(:) :: mmean_fsw + real,pointer,dimension(:) :: mmean_fsn + real,pointer,dimension(:) :: mmean_psi_open + real,pointer,dimension(:) :: mmean_psi_closed + real,pointer,dimension(:) :: mmean_water_supply + real,pointer,dimension(:) :: mmean_light_level + real,pointer,dimension(:) :: mmean_light_level_beam + real,pointer,dimension(:) :: mmean_light_level_diff + real,pointer,dimension(:) :: mmean_par_l + real,pointer,dimension(:) :: mmean_par_l_beam + real,pointer,dimension(:) :: mmean_par_l_diff + real,pointer,dimension(:) :: mmean_rshort_l + real,pointer,dimension(:) :: mmean_rlong_l + real,pointer,dimension(:) :: mmean_sensible_lc + real,pointer,dimension(:) :: mmean_vapor_lc + real,pointer,dimension(:) :: mmean_transp + real,pointer,dimension(:) :: mmean_intercepted_al + real,pointer,dimension(:) :: mmean_wshed_lg + real,pointer,dimension(:) :: mmean_rshort_w + real,pointer,dimension(:) :: mmean_rlong_w + real,pointer,dimension(:) :: mmean_sensible_wc + real,pointer,dimension(:) :: mmean_vapor_wc + real,pointer,dimension(:) :: mmean_intercepted_aw + real,pointer,dimension(:) :: mmean_wshed_wg + real,pointer,dimension(:) :: mmean_nppleaf + real,pointer,dimension(:) :: mmean_nppfroot + real,pointer,dimension(:) :: mmean_nppsapwood + real,pointer,dimension(:) :: mmean_nppcroot + real,pointer,dimension(:) :: mmean_nppseeds + real,pointer,dimension(:) :: mmean_nppwood + real,pointer,dimension(:) :: mmean_nppdaily + !----- Monthly mean sum of squares. -------------------------------------------------! + real,pointer,dimension(:) :: mmsqu_gpp + real,pointer,dimension(:) :: mmsqu_npp + real,pointer,dimension(:) :: mmsqu_plresp + real,pointer,dimension(:) :: mmsqu_sensible_lc + real,pointer,dimension(:) :: mmsqu_vapor_lc + real,pointer,dimension(:) :: mmsqu_transp + real,pointer,dimension(:) :: mmsqu_sensible_wc + real,pointer,dimension(:) :: mmsqu_vapor_wc + !----- Mean diel (same units as fast mean). -----------------------------------------! + real,pointer,dimension(:,:) :: qmean_gpp + real,pointer,dimension(:,:) :: qmean_npp + real,pointer,dimension(:,:) :: qmean_leaf_resp + real,pointer,dimension(:,:) :: qmean_root_resp + real,pointer,dimension(:,:) :: qmean_growth_resp + real,pointer,dimension(:,:) :: qmean_storage_resp + real,pointer,dimension(:,:) :: qmean_vleaf_resp + real,pointer,dimension(:,:) :: qmean_plresp + real,pointer,dimension(:,:) :: qmean_leaf_energy + real,pointer,dimension(:,:) :: qmean_leaf_water + real,pointer,dimension(:,:) :: qmean_leaf_hcap + real,pointer,dimension(:,:) :: qmean_leaf_vpdef + real,pointer,dimension(:,:) :: qmean_leaf_temp + real,pointer,dimension(:,:) :: qmean_leaf_fliq + real,pointer,dimension(:,:) :: qmean_leaf_gsw + real,pointer,dimension(:,:) :: qmean_leaf_gbw + real,pointer,dimension(:,:) :: qmean_wood_energy + real,pointer,dimension(:,:) :: qmean_wood_water + real,pointer,dimension(:,:) :: qmean_wood_hcap + real,pointer,dimension(:,:) :: qmean_wood_temp + real,pointer,dimension(:,:) :: qmean_wood_fliq + real,pointer,dimension(:,:) :: qmean_wood_gbw + real,pointer,dimension(:,:) :: qmean_fs_open + real,pointer,dimension(:,:) :: qmean_fsw + real,pointer,dimension(:,:) :: qmean_fsn + real,pointer,dimension(:,:) :: qmean_psi_open + real,pointer,dimension(:,:) :: qmean_psi_closed + real,pointer,dimension(:,:) :: qmean_water_supply + real,pointer,dimension(:,:) :: qmean_light_level + real,pointer,dimension(:,:) :: qmean_light_level_beam + real,pointer,dimension(:,:) :: qmean_light_level_diff + real,pointer,dimension(:,:) :: qmean_par_l + real,pointer,dimension(:,:) :: qmean_par_l_beam + real,pointer,dimension(:,:) :: qmean_par_l_diff + real,pointer,dimension(:,:) :: qmean_rshort_l + real,pointer,dimension(:,:) :: qmean_rlong_l + real,pointer,dimension(:,:) :: qmean_sensible_lc + real,pointer,dimension(:,:) :: qmean_vapor_lc + real,pointer,dimension(:,:) :: qmean_transp + real,pointer,dimension(:,:) :: qmean_intercepted_al + real,pointer,dimension(:,:) :: qmean_wshed_lg + real,pointer,dimension(:,:) :: qmean_rshort_w + real,pointer,dimension(:,:) :: qmean_rlong_w + real,pointer,dimension(:,:) :: qmean_sensible_wc + real,pointer,dimension(:,:) :: qmean_vapor_wc + real,pointer,dimension(:,:) :: qmean_intercepted_aw + real,pointer,dimension(:,:) :: qmean_wshed_wg + !------ Mean diel of sum of squares. ------------------------------------------------! + real,pointer,dimension(:,:) :: qmsqu_gpp + real,pointer,dimension(:,:) :: qmsqu_npp + real,pointer,dimension(:,:) :: qmsqu_plresp + real,pointer,dimension(:,:) :: qmsqu_sensible_lc + real,pointer,dimension(:,:) :: qmsqu_vapor_lc + real,pointer,dimension(:,:) :: qmsqu_transp + real,pointer,dimension(:,:) :: qmsqu_sensible_wc + real,pointer,dimension(:,:) :: qmsqu_vapor_wc + !------------------------------------------------------------------------------------! + end type patchtype + !=======================================================================================! + !=======================================================================================! - ! Temperature of surface water (K) - real, pointer,dimension(:,:) :: sfcwater_tempk - - ! Liquid fraction of surface water - real, pointer,dimension(:,:) :: sfcwater_fracliq - ! Short wave radiation absorbed by the surface water (W/m2) - real, pointer,dimension(:,:) :: rshort_s - ! Short wave radiation absorbed by the surface water, - ! beam component (W/m2) - real, pointer,dimension(:,:) :: rshort_s_beam - ! Short wave radiation absorbed by the surface water, - ! diffuse component (W/m2) - real, pointer,dimension(:,:) :: rshort_s_diffuse - ! PAR absorbed by the surface water (W/m2) - real, pointer,dimension(:,:) :: par_s - ! PAR absorbed by the surface water, - ! beam component (W/m2) - real, pointer,dimension(:,:) :: par_s_beam + !=======================================================================================! + !=======================================================================================! + ! SITE TYPE: The following are the patch level arrays that populate the current site. ! + !---------------------------------------------------------------------------------------! + type sitetype + !----- Number of patches in this site. ----------------------------------------------! + integer :: npatches + !------------------------------------------------------------------------------------! - ! PAR absorbed by the surface water, - ! diffuse component (W/m2) - real, pointer,dimension(:,:) :: par_s_diffuse - - ! Soil internal energy (J/m3) - real, pointer,dimension(:,:) :: soil_energy - - ! Soil water (m3 water / m3 soil) - real, pointer,dimension(:,:) :: soil_water - - ! Temperature of soil (K) - real, pointer,dimension(:,:) :: soil_tempk - - ! Liquid fraction of soil - real, pointer,dimension(:,:) :: soil_fracliq - ! Root density [kg/m3] over the profile - ! Typically diagnosed for history or monthly output - real, pointer, dimension (:,:) :: rootdense - - ! Effective specific humidity (kg/kg) just above soil - real, pointer,dimension(:) :: ground_shv - - ! Surface saturation specific humidity (kg/kg) - real, pointer,dimension(:) :: ground_ssh - ! Ground temperature (either the top soil or top surface snow/water) (K) - real, pointer, dimension (:) :: ground_temp + !------------------------------------------------------------------------------------! + ! MAIN INDICES: ! + ! PACO_ID -- The global index of the first cohort in all patches ! + ! PACO_N -- The number of cohorts in each patch ! + ! PAGLOB_ID -- Global index of the first patch in this vector, across all patches. ! + !------------------------------------------------------------------------------------! + integer,pointer,dimension(:) :: paco_id + integer,pointer,dimension(:) :: paco_n + integer :: paglob_id + !------------------------------------------------------------------------------------! - ! Ground temperature (either the top soil or top surface snow/water) (K) - real, pointer, dimension (:) :: ground_fliq - ! Net roughness length (m) - real, pointer,dimension(:) :: rough + !------------------------------------------------------------------------------------! + ! This structure contains all cohorts in each patch. ! + !------------------------------------------------------------------------------------! + type(patchtype),pointer,dimension(:) :: patch + !------------------------------------------------------------------------------------! - ! Maximum PAR possibly attained in this patch. This is found by calling the radiation - ! scheme for a single cohort (the tallest that can be solved). - real, pointer, dimension(:) :: par_l_max - real, pointer, dimension(:) :: par_l_beam_max - real, pointer, dimension(:) :: par_l_diffuse_max - ! Photosynthetic rates for different PFTs, if they were at the top - ! of the canopy (umol/m2 leaf/s). Used by mortality function. - real, pointer,dimension(:,:) :: A_o_max ! open stomata - real, pointer,dimension(:,:) :: A_c_max ! closed stomata + !----- Number of cohorts in the patch. ----------------------------------------------! + integer, pointer,dimension(:) :: cohort_count + !------------------------------------------------------------------------------------! - ! Average daily temperature [K] - real , pointer,dimension(:) :: avg_daily_temp - ! Average monthly ground water [kg/m2], used for fire ignition - real , pointer,dimension(:) :: avg_monthly_gndwater + !----- Patch name (used only when restarting from ED1). -----------------------------! + character(len=str_len), pointer,dimension(:) :: pname + !------------------------------------------------------------------------------------! - ! Average monthly water deficit [kg/m2], used for fire ignition - real , pointer,dimension(:) :: avg_monthly_waterdef - ! average of rh and cwd_rh [umol/m2/s] over FRQSTATE - real , pointer,dimension(:) :: mean_rh - real , pointer,dimension(:) :: mean_cwd_rh + !------------------------------------------------------------------------------------! + ! BASIC INFORMATION ! + ! ! + ! AREA -- patch area (relative to the total SITE area). ! + ! AGE -- time since last disturbance (years) ! + ! DIST_TYPE -- patch type ! + ! 1. Agriculture ! + ! 2. Secondary forest ! + ! 3. Primary forest ! + !------------------------------------------------------------------------------------! + real , pointer,dimension(:) :: area + real , pointer,dimension(:) :: age + integer, pointer,dimension(:) :: dist_type + !------------------------------------------------------------------------------------! - ! average of rh and cwd_rh [kgC/m2/yr] over a day and a month, respectively - real , pointer,dimension(: ) :: dmean_rh - real , pointer,dimension(:,:) :: qmean_rh - real , pointer,dimension(: ) :: mmean_rh - real , pointer,dimension(: ) :: dmean_cwd_rh - real , pointer,dimension(:,:) :: qmean_cwd_rh - real , pointer,dimension(: ) :: mmean_cwd_rh + ! Soil carbon concentration, fast pool (kg/m2) + real , pointer,dimension(:) :: fast_soil_C - ! average of net ecosystem productivity (NEP) [umol/m2/s] over FRQSTATE - real , pointer,dimension(:) :: mean_nep + ! Soil carbon concentration, slow pool (kg/m2) + real , pointer,dimension(:) :: slow_soil_C - !=======================================================================! - ! These variables are terms of the water, carbon, and energy ! - ! budget, and will compute what enters, what stays, and what leaves ED. ! - ! They are averaged over FRQSTATE, so the units are now per unit of ! - ! time for all fluxes, and the total storage at the beginning of the ! - ! next time step (or the final storage between the previous analysis ! - ! and this one). ! - !=======================================================================! - ! Mean moisture transfer from the canopy air to the atmosphere - ! (kg_H2O/m2/s) - real , pointer,dimension(:) :: wbudget_loss2atm + ! Soil carbon concentration, structural pool (kg/m2) + real , pointer,dimension(:) :: structural_soil_C - ! Contribution of density change on change in the final storage - ! (kg_H2O/m2/s) - real , pointer,dimension(:) :: wbudget_denseffect + ! Soil lignin concentration, structural pool (kg/m2) + real , pointer,dimension(:) :: structural_soil_L - ! Precipitation [kg_H2O/m2/s] - real , pointer,dimension(:) :: wbudget_precipgain + ! Soil nitrogen concentration, mineralized pool (kg/m2) + real , pointer,dimension(:) :: mineralized_soil_N - ! Mean runoff (kg_H2O/m2/s) - real , pointer,dimension(:) :: wbudget_loss2runoff + ! Soil nitrogen concentration, fast pool (kg/m2) + real , pointer,dimension(:) :: fast_soil_N - ! Mean drainage (kg_H2O/m2/s) - real , pointer,dimension(:) :: wbudget_loss2drainage + ! Number of degree days + ! Degree days --- sum of daily average temperatures above 278.15 K + real , pointer,dimension(:) :: sum_dgd - ! Total water (soil, sfcwater, can_shv, veg_water) at the beginning - ! of budget-averaging time. [kg_H2O/m2] - real , pointer,dimension(:) :: wbudget_initialstorage + ! Chill days --- number of days with average temperatures below 278.15 K + real , pointer,dimension(:) :: sum_chd - ! Residual of the water budget (kg_H2O/m2/s) - real , pointer,dimension(:) :: wbudget_residual + ! Flag specifying whether (1) or not (0) this patch is a plantation + integer , pointer,dimension(:) :: plantation - ! Mean sensible heat transfer from the canopy air to the atmosphere - ! (J/m2/s) - real , pointer,dimension(:) :: ebudget_loss2atm + ! Ice-vapour equivalent potential temperature of canopy air space [K] + real , pointer,dimension(:) :: can_theiv - ! Mean change in storage due to change in density - ! (J/m2/s) - real , pointer,dimension(:) :: ebudget_denseffect + ! Vapour pressure deficit [Pa] + real , pointer,dimension(:) :: can_vpdef - ! Mean change in storage due to pressure change - ! (J/m2/s) - real , pointer,dimension(:) :: ebudget_prsseffect + ! Temperature (K) of canopy air + real , pointer,dimension(:) :: can_temp - ! Energy associated with runoff (J/m2/s) - real , pointer,dimension(:) :: ebudget_loss2runoff + ! Previous step's canopy air temperature + real , pointer,dimension(:) :: can_temp_pv - ! Energy associated with drainage (J/m2/s) - real , pointer,dimension(:) :: ebudget_loss2drainage - ! Net absorbed radiation by soil, sfcwater, vegetation [J/m2/s] - real , pointer,dimension(:) :: ebudget_netrad + ! Water vapor specific humidity (kg/kg) of canopy air + real , pointer,dimension(:) :: can_shv - ! Energy associated with precipitation (J/m2/s) - real , pointer,dimension(:) :: ebudget_precipgain + ! CO2 mixing ratio [umol/mol] of canopy air + real , pointer,dimension(:) :: can_co2 - ! Total energy (soil, sfcwater, can_shv, veg_water) at the beginning - ! of budget-averaging time. [J/m2] - real , pointer,dimension(:) :: ebudget_initialstorage + ! Density [kg/m3] of canopy air + real , pointer,dimension(:) :: can_rhos - ! Residual of the energy budget [J/m2/s] - real, pointer, dimension(:) :: ebudget_residual + ! Canopy air pressure. + real , pointer,dimension(:) :: can_prss - ! Total CO2 (can_shv) at the beginning of budget-averaging - ! time. [umol_CO2/m2] - real , pointer,dimension(:) :: co2budget_initialstorage + ! Canopy air potential temperature + real , pointer,dimension(:) :: can_theta - ! Residual of the CO2 budget [umol_CO2/m2/s] - real , pointer,dimension(:) :: co2budget_residual + ! Canopy depth (m) + real , pointer,dimension(:) :: can_depth - ! Flux of CO2 from the canopy air to the atmosphere [umol_CO2/m2/s] - real , pointer,dimension(:) :: co2budget_loss2atm + ! Fraction of canopy that is open (---) + real , pointer,dimension(:) :: opencan_frac + + ! Ground to canopy conductances + real , pointer, dimension(:) :: ggbare + real , pointer, dimension(:) :: ggveg + real , pointer, dimension(:) :: ggnet + real , pointer, dimension(:) :: ggsoil - ! Change in CO2 total storage due to change in density [umol_CO2/m2/s] - real , pointer,dimension(:) :: co2budget_denseffect + + ! Number of surface water layers + integer,pointer,dimension(:) :: nlev_sfcwater - ! Average GPP [umol_CO2/m2/s] - real , pointer,dimension(:) :: co2budget_gpp + ! Surface water mass (kg/m2) + real, pointer,dimension(:,:) :: sfcwater_mass - ! Average GPP by GPP class[umol_CO2/m2/s] - real , pointer,dimension(:,:) :: co2budget_gpp_dbh + ! Surface water internal energy (J/kg) + real, pointer,dimension(:,:) :: sfcwater_energy - ! Average plant respiration [umol_CO2/m2/s] - real , pointer,dimension(:) :: co2budget_plresp + ! Depth of surface water (m) + real, pointer,dimension(:,:) :: sfcwater_depth - ! Average heterotrophic respiration [umol_CO2/m2/s] - real , pointer,dimension(:) :: co2budget_rh + ! Temperature of surface water (K) + real, pointer,dimension(:,:) :: sfcwater_tempk + + ! Liquid fraction of surface water + real, pointer,dimension(:,:) :: sfcwater_fracliq - ! Average coarse woody debris respiration [umol_CO2/m2/s] - real , pointer,dimension(:) :: co2budget_cwd_rh + ! Short wave radiation absorbed by the surface water (W/m2) + real, pointer,dimension(:,:) :: rshort_s - ! Daily average residuals - real, pointer, dimension(:) :: dmean_co2_residual ! [umol_CO2/m2] - real, pointer, dimension(:) :: dmean_energy_residual ! [J/m2] - real, pointer, dimension(:) :: dmean_water_residual ! [kg_H20/m2] - ! Monthly average residuals - real, pointer, dimension(:) :: mmean_co2_residual ! [umol_CO2/m2] - real, pointer, dimension(:) :: mmean_energy_residual ! [J/m2] - real, pointer, dimension(:) :: mmean_water_residual ! [kg_H20/m2] + ! Short wave radiation absorbed by the surface water, + ! beam component (W/m2) + real, pointer,dimension(:,:) :: rshort_s_beam - ! Daily average of A_decomp, the temperature and moisture dependence - ! of heterotrophic respiration. The "today" variable is used in the - ! model, whereas dmean and mmean are for output only. - real , pointer,dimension(:) :: today_A_decomp - real , pointer,dimension(:) :: dmean_A_decomp - real , pointer,dimension(:) :: mmean_A_decomp + ! Short wave radiation absorbed by the surface water, + ! diffuse component (W/m2) + real, pointer,dimension(:,:) :: rshort_s_diffuse - ! Daily average of the product A_decomp * f_decomp, which incorporates - ! temperature, moisture, and N dependence of decomposition. The "today" - ! variable is used in the model, whereas dmean and mmean are for output only. - real , pointer,dimension(:) :: today_Af_decomp - real , pointer,dimension(:) :: dmean_Af_decomp - real , pointer,dimension(:) :: mmean_Af_decomp + ! PAR absorbed by the surface water (W/m2) + real, pointer,dimension(:,:) :: par_s - ! Carbon available to establish recruits [kgC/m2] - real, pointer,dimension(:,:) :: repro !(n_pft,npatches) + ! PAR absorbed by the surface water, + ! beam component (W/m2) + real, pointer,dimension(:,:) :: par_s_beam - ! Vegetation roughness length (m) - real , pointer,dimension(:) :: veg_rough + ! PAR absorbed by the surface water, + ! diffuse component (W/m2) + real, pointer,dimension(:,:) :: par_s_diffuse + + ! Soil internal energy (J/m3) + real, pointer,dimension(:,:) :: soil_energy + + ! Soil matric potential (m) + real, pointer,dimension(:,:) :: soil_mstpot + + ! Soil water (m3 water / m3 soil) + real, pointer,dimension(:,:) :: soil_water + + ! Temperature of soil (K) + real, pointer,dimension(:,:) :: soil_tempk + + ! Liquid fraction of soil + real, pointer,dimension(:,:) :: soil_fracliq - ! Vegetation height (m) - real , pointer,dimension(:) :: veg_height + ! Root density [kg/m3] over the profile + ! Typically diagnosed for history or monthly output + real, pointer, dimension (:,:) :: rootdense + + ! Effective specific humidity (kg/kg) just above soil + real, pointer,dimension(:) :: ground_shv + + ! Surface saturation specific humidity (kg/kg) + real, pointer,dimension(:) :: ground_ssh - ! 0-plane displacement height (m) - real , pointer,dimension(:) :: veg_displace + ! Ground temperature (either the top soil or top surface snow/water) (K) + real, pointer, dimension (:) :: ground_temp - ! Input to fast soil carbon pool [kgC/m2/day] - real , pointer,dimension(:) :: fsc_in + ! Ground temperature (either the top soil or top surface snow/water) (K) + real, pointer, dimension (:) :: ground_fliq - ! Input to structural soil carbon pool [kgC/m2/day] - real , pointer,dimension(:) :: ssc_in + ! Net roughness length (m) + real, pointer,dimension(:) :: rough - ! Input to soil lignin pool [kgC/m2/day] - real , pointer,dimension(:) :: ssl_in + ! Maximum PAR possibly attained in this patch. This is found by calling the radiation + ! scheme for a single cohort (the tallest that can be solved). + real, pointer, dimension(:) :: par_l_max + real, pointer, dimension(:) :: par_l_beam_max + real, pointer, dimension(:) :: par_l_diffuse_max - ! Input to fast soil nitrogen pool [kgN/m2/day] - real , pointer,dimension(:) :: fsn_in + ! Photosynthetic rates for different PFTs, if they were at the top + ! of the canopy (umol/m2 leaf/s). Used by mortality function. + real, pointer,dimension(:,:) :: A_o_max ! open stomata + real, pointer,dimension(:,:) :: A_c_max ! closed stomata - ! Plant nitrogen update summed over all cohorts [kgN/m2/day] - real , pointer,dimension(:) :: total_plant_nitrogen_uptake + ! Average daily temperature [K] + real , pointer,dimension(:) :: avg_daily_temp - !real, pointer,dimension(:) :: Nnet_min - !real, pointer,dimension(:) :: Ngross_min - real, pointer,dimension(:) :: mineralized_N_input - real, pointer,dimension(:) :: mineralized_N_loss + ! Average monthly ground water [kg/m2], used for fire ignition + real , pointer,dimension(:) :: avg_monthly_gndwater - ! Short wave radiation absorbed by the ground (W/m2) - real , pointer,dimension(:) :: rshort_g - - ! Short wave radiation absorbed by the ground, beam component (W/m2) - real , pointer,dimension(:) :: rshort_g_beam - - ! Short wave radiation absorbed by the ground, diffuse component (W/m2) - real , pointer,dimension(:) :: rshort_g_diffuse + ! Average monthly water deficit [kg/m2], used for fire ignition + real , pointer,dimension(:) :: avg_monthly_waterdef - ! PAR absorbed by the ground (W/m2) - real , pointer,dimension(:) :: par_g - - ! PAR absorbed by the ground, beam component (W/m2) - real , pointer,dimension(:) :: par_g_beam - - ! PAR absorbed by the ground, diffuse component (W/m2) - real , pointer,dimension(:) :: par_g_diffuse - ! Photosynthetically active radiation incident at the ground(W/m2) - real , pointer,dimension(:) :: par_b + !=======================================================================! + ! These variables are terms of the water, carbon, and energy ! + ! budget, and will compute what enters, what stays, and what leaves ED. ! + ! They are averaged over FRQSTATE, so the units are now per unit of ! + ! time for all fluxes, and the total storage at the beginning of the ! + ! next time step (or the final storage between the previous analysis ! + ! and this one). ! + !=======================================================================! + ! Mean moisture transfer from the canopy air to the atmosphere + ! (kg_H2O/m2/s) + real , pointer,dimension(:) :: wbudget_loss2atm - ! Photosynthetically active radiation incident at the ground, beam component (W/m2) - real , pointer,dimension(:) :: par_b_beam + ! Contribution of density change on change in the final storage + ! (kg_H2O/m2/s) + real , pointer,dimension(:) :: wbudget_denseffect - ! Photosynthetically active radiation incident at the ground, diffuse component (W/m2) - real , pointer,dimension(:) :: par_b_diffuse + ! Precipitation [kg_H2O/m2/s] + real , pointer,dimension(:) :: wbudget_precipgain - ! Near infrared radiation incident at the ground(W/m2) - real , pointer,dimension(:) :: nir_b + ! Mean runoff (kg_H2O/m2/s) + real , pointer,dimension(:) :: wbudget_loss2runoff - ! Near infrared radiation incident at the ground, beam component (W/m2) - real , pointer,dimension(:) :: nir_b_beam + ! Mean drainage (kg_H2O/m2/s) + real , pointer,dimension(:) :: wbudget_loss2drainage - ! Near infrared radiation incident at the ground, diffuse component (W/m2) - real , pointer,dimension(:) :: nir_b_diffuse + ! Total water (soil, sfcwater, can_shv, veg_water) at the beginning + ! of budget-averaging time. [kg_H2O/m2] + real , pointer,dimension(:) :: wbudget_initialstorage - ! Long wave radiation absorbed by the ground (W/m2) - real , pointer,dimension(:) :: rlong_g + ! Residual of the water budget (kg_H2O/m2/s) + real , pointer,dimension(:) :: wbudget_residual - ! Long wave radiation absorbed by the ground (W/m2), due to the - ! surface and vegetation alone - real , pointer,dimension(:) :: rlong_g_surf + ! Mean sensible heat transfer from the canopy air to the atmosphere + ! (J/m2/s) + real , pointer,dimension(:) :: ebudget_loss2atm - ! Long wave radiation absorbed by the ground (W/m2), due to the - ! incident long wave alone - real , pointer,dimension(:) :: rlong_g_incid + ! Mean change in storage due to change in density + ! (J/m2/s) + real , pointer,dimension(:) :: ebudget_denseffect - ! Long wave radiation absorbed by the surface water (W/m2) - real , pointer,dimension(:) :: rlong_s + ! Mean change in storage due to pressure change + ! (J/m2/s) + real , pointer,dimension(:) :: ebudget_prsseffect - ! Long wave radiation absorbed by the surface water (W/m2), due to - ! the surface and vegetation alone - real , pointer,dimension(:) :: rlong_s_surf + ! Energy associated with runoff (J/m2/s) + real , pointer,dimension(:) :: ebudget_loss2runoff - ! Long wave radiation absorbed by the surface water (W/m2), due - ! to the incident atmospheric long wave alone - real , pointer,dimension(:) :: rlong_s_incid + ! Energy associated with drainage (J/m2/s) + real , pointer,dimension(:) :: ebudget_loss2drainage - ! Patch albedo - real , pointer,dimension(:) :: albedo + ! Net absorbed radiation by soil, sfcwater, vegetation [J/m2/s] + real , pointer,dimension(:) :: ebudget_netrad - ! Patch albedo, beam component - real , pointer,dimension(:) :: albedo_beam + ! Energy associated with precipitation (J/m2/s) + real , pointer,dimension(:) :: ebudget_precipgain - ! Patch albedo, diffuse component - real , pointer,dimension(:) :: albedo_diffuse + ! Total energy (soil, sfcwater, can_shv, veg_water) at the beginning + ! of budget-averaging time. [J/m2] + real , pointer,dimension(:) :: ebudget_initialstorage - ! Net radiation at the top of the canopy (W/m2) - real , pointer,dimension(:) :: rnet + ! Residual of the energy budget [J/m2/s] + real, pointer, dimension(:) :: ebudget_residual - ! Upward long wave radiation at the top of the canopy (W/m2) - real , pointer,dimension(:) :: rlongup + ! Total CO2 (can_shv) at the beginning of budget-averaging + ! time. [umol_CO2/m2] + real , pointer,dimension(:) :: co2budget_initialstorage - ! Upward PAR radiation at the top of the canopy (W/m2) - real , pointer,dimension(:) :: parup + ! Residual of the CO2 budget [umol_CO2/m2/s] + real , pointer,dimension(:) :: co2budget_residual - ! Upward NIR radiation at the top of the canopy (W/m2) - real , pointer,dimension(:) :: nirup + ! Flux of CO2 from the canopy air to the atmosphere [umol_CO2/m2/s] + real , pointer,dimension(:) :: co2budget_loss2atm - ! Upward short wave radiation at the top of the canopy (W/m2) - real , pointer,dimension(:) :: rshortup + ! Change in CO2 total storage due to change in density [umol_CO2/m2/s] + real , pointer,dimension(:) :: co2budget_denseffect - ! Albedo for long wave radiation (whatever it means...) - real , pointer,dimension(:) :: rlong_albedo + ! Average GPP [umol_CO2/m2/s] + real , pointer,dimension(:) :: co2budget_gpp - ! Total snow depth as calculated in the radiation scheme. Used for - ! checking if cohorts are buried. [m] - real , pointer,dimension(:) :: total_sfcw_depth + ! Average plant respiration [umol_CO2/m2/s] + real , pointer,dimension(:) :: co2budget_plresp - ! Fraction of vegetation covered with snow. Used for computing - ! surface roughness. - real , pointer,dimension(:) :: snowfac + ! Average heterotrophic respiration [umol_CO2/m2/s] + real , pointer,dimension(:) :: co2budget_rh - ! limitation of heterotrophic respiration due to physical - ! environmental factors (0-1 coefficient) - real , pointer,dimension(:) :: A_decomp + ! Daily average of A_decomp, the temperature and moisture dependence + ! of heterotrophic respiration. The "today" variable is used in the + ! model, whereas dmean and mmean are for output only. + real , pointer,dimension(:) :: today_A_decomp - ! damping of decomposition due to nitrogen immobilization - ! (0-1 coefficient) - real , pointer,dimension(:) :: f_decomp + ! Daily average of the product A_decomp * f_decomp, which incorporates + ! temperature, moisture, and N dependence of decomposition. The "today" + ! variable is used in the model, whereas dmean and mmean are for output only. + real , pointer,dimension(:) :: today_Af_decomp - ! total heterotrophic respiration (umol/m2/s) - real , pointer,dimension(:) :: rh + ! Carbon available to establish recruits [kgC/m2] + real, pointer,dimension(:,:) :: repro !(n_pft,npatches) - ! coarse woody debris contribution to rh (umol/m2/s) - real , pointer,dimension(:) :: cwd_rh + ! Vegetation roughness length (m) + real , pointer,dimension(:) :: veg_rough - ! Plant density broken down into size and PFT bins. Used in patch fusion - real, pointer,dimension(:,:,:) :: cumlai_profile !(n_pft,ff_nhgt,npatches) + ! Vegetation height (m) + real , pointer,dimension(:) :: veg_height - ! Above ground biomass in this patch [kgC/m2] - real , pointer,dimension(:) :: plant_ag_biomass + ! 0-plane displacement height (m) + real , pointer,dimension(:) :: veg_displace - ! Last time step successfully completed by integrator. - real, pointer,dimension(:) :: htry + ! Input to fast soil carbon pool [kgC/m2/day] + real , pointer,dimension(:) :: fsc_in - ! Last previous time step successfully completed by the integrator - real, pointer,dimension(:) :: hprev + ! Input to structural soil carbon pool [kgC/m2/day] + real , pointer,dimension(:) :: ssc_in - ! Average time step used by the integrator, its daily and monthly mean - real, pointer, dimension(:) :: avg_rk4step - real, pointer, dimension(:) :: dmean_rk4step - real, pointer, dimension(:) :: mmean_rk4step + ! Input to soil lignin pool [kgC/m2/day] + real , pointer,dimension(:) :: ssl_in - ! Average available water for transpiration. - real, pointer,dimension(:) :: avg_available_water + ! Input to fast soil nitrogen pool [kgN/m2/day] + real , pointer,dimension(:) :: fsn_in - real, pointer,dimension(:) :: ustar ! Friction velocity [m/s] + ! Plant nitrogen update summed over all cohorts [kgN/m2/day] + real , pointer,dimension(:) :: total_plant_nitrogen_uptake - real, pointer,dimension(:) :: tstar ! Characteristic temperature fluctuation scale [K] + !real, pointer,dimension(:) :: Nnet_min + !real, pointer,dimension(:) :: Ngross_min + real, pointer,dimension(:) :: mineralized_N_input + real, pointer,dimension(:) :: mineralized_N_loss - real, pointer,dimension(:) :: qstar ! Characteristic specific humidity fluct. scale [kg/kg] + ! Short wave radiation absorbed by the ground (W/m2) + real , pointer,dimension(:) :: rshort_g + + ! Short wave radiation absorbed by the ground, beam component (W/m2) + real , pointer,dimension(:) :: rshort_g_beam + + ! Short wave radiation absorbed by the ground, diffuse component (W/m2) + real , pointer,dimension(:) :: rshort_g_diffuse - real, pointer,dimension(:) :: cstar ! Characteristic CO2 mix. ratio fluct. scale [ppm] + ! PAR absorbed by the ground (W/m2) + real , pointer,dimension(:) :: par_g + + ! PAR absorbed by the ground, beam component (W/m2) + real , pointer,dimension(:) :: par_g_beam + + ! PAR absorbed by the ground, diffuse component (W/m2) + real , pointer,dimension(:) :: par_g_diffuse - real, pointer,dimension(:) :: zeta ! Height / Obukhov length + ! Photosynthetically active radiation incident at the ground(W/m2) + real , pointer,dimension(:) :: par_b - real, pointer,dimension(:) :: ribulk ! Bulk Richardson number + ! Photosynthetically active radiation incident at the ground, beam component (W/m2) + real , pointer,dimension(:) :: par_b_beam - real, pointer,dimension(:) :: upwp !eddy mom. flux u-prime w-prime + ! Photosynthetically active radiation incident at the ground, diffuse component (W/m2) + real , pointer,dimension(:) :: par_b_diffuse - real, pointer,dimension(:) :: tpwp !eddy heat flux t-prime w-prime + ! Near infrared radiation incident at the ground(W/m2) + real , pointer,dimension(:) :: nir_b - real, pointer,dimension(:) :: qpwp !eddy moist. flux q-prime w-prime + ! Near infrared radiation incident at the ground, beam component (W/m2) + real , pointer,dimension(:) :: nir_b_beam - real, pointer,dimension(:) :: cpwp !eddy CO2 flux flux c-prime w-prime + ! Near infrared radiation incident at the ground, diffuse component (W/m2) + real , pointer,dimension(:) :: nir_b_diffuse - real, pointer,dimension(:) :: wpwp !eddy v. mom. flux w-prime w-prime + ! Long wave radiation absorbed by the ground (W/m2) + real , pointer,dimension(:) :: rlong_g - ! ----------------------------------------------------------------- - ! Fast time flux diagnostic variables - ! The following variables are all averaged over - ! the fast time flux period frqfast - !------------------------------------------------------------------ - - !----- Radiation -------------------------------------------------- - real, pointer, dimension(:) :: avg_rshort_gnd ! Absorbed SW rad. of soil + top water/snow layer [ W/m2] - real, pointer, dimension(:) :: avg_par_gnd ! Absorbed PAR of soil + top water/snow layer [ W/m2] - real, pointer, dimension(:) :: avg_rlong_gnd ! Emitted LW rad. from soil + top water/snow layer [ W/m2] - real, pointer, dimension(:) :: avg_rlongup ! Emitted LW rad. from soil + top water/snow layer [ W/m2] - real, pointer, dimension(:) :: avg_parup ! Reflected PAR at the top of the canopy [ W/m2] - real, pointer, dimension(:) :: avg_nirup ! Reflected NIR at the top of the canopy [ W/m2] - real, pointer, dimension(:) :: avg_rshortup ! Reflected SW rad. at the top of the canopy [ W/m2] - real, pointer, dimension(:) :: avg_rnet ! Net radiation at the top of the canopy [ W/m2] - real, pointer, dimension(:) :: avg_albedo ! Albedo [ ----] - real, pointer, dimension(:) :: avg_albedo_beam ! Direct Albedo [ ----] - real, pointer, dimension(:) :: avg_albedo_diffuse ! Diffuse Albedo [ ----] - real, pointer, dimension(:) :: avg_rlong_albedo ! Longwave Albedo [ ----] - real, pointer, dimension(:) :: dmean_albedo ! Albedo [ ----] - real, pointer, dimension(:) :: dmean_albedo_beam ! Direct Albedo [ ----] - real, pointer, dimension(:) :: dmean_albedo_diffuse ! Diffuse Albedo [ ----] - real, pointer, dimension(:) :: mmean_albedo ! Albedo [ ----] - real, pointer, dimension(:) :: mmean_albedo_beam ! Direct Albedo [ ----] - real, pointer, dimension(:) :: mmean_albedo_diffuse ! Diffuse Albedo [ ----] - real, pointer, dimension(:,:) :: qmean_albedo ! Albedo [ ----] - real, pointer, dimension(:,:) :: qmean_albedo_beam ! Direct Albedo [ ----] - real, pointer, dimension(:,:) :: qmean_albedo_diffuse ! Diffuse Albedo [ ----] - - - ! Notation - ! ATM - atmosphere, CAS - canopy air space - - - real,pointer,dimension(:) :: avg_ustar ! Average u* [ m/s] - real,pointer,dimension(:) :: avg_tstar ! Average Theta* [ K] - real,pointer,dimension(:) :: avg_qstar ! Average q* [ kg/kg] - real,pointer,dimension(:) :: avg_cstar ! Average CO2* [ umol/mol] - real,pointer,dimension(:) :: avg_carbon_ac ! Average carbon flux, ATM -> CAS [umol/m2/s] - real,pointer,dimension(:) :: avg_carbon_st ! Average carbon flux storage [umol/m2/s] - real,pointer,dimension(:) :: avg_vapor_lc ! Average water vapor flux, Leaf -> CAS [kg/m2/s] - real,pointer,dimension(:) :: avg_vapor_wc ! Average water vapor flux, wood -> CAS [kg/m2/s] - real,pointer,dimension(:) :: avg_vapor_gc ! Average water vapor flux, GND -> CAS [kg/m2/s] - real,pointer,dimension(:) :: avg_wshed_vg ! Average precip that falls from leaves [kg/m2/s] - real,pointer,dimension(:) :: avg_intercepted ! Average precip that is intercepted [kg/m2/s] - real,pointer,dimension(:) :: avg_throughfall ! Average precip that is never intercepted [kg/m2/s] - real,pointer,dimension(:) :: avg_vapor_ac ! Average water vapor flux, ATM-CAS [kg/m2/s] - real,pointer,dimension(:) :: avg_transp ! Average transpiration of water vapor [kg/m2/s] - real,pointer,dimension(:) :: avg_evap ! Average evaporation from leaf and - ! and ground surfaces -> CAS [kg/m2/s] - real,pointer,dimension(:,:) :: avg_smoist_gg ! Moisture flux between soil layers - ! where layer (nzg) is the flux from the - ! surface water into the top layer [kg/m2/s] - real,pointer,dimension(:,:) :: avg_transloss ! Transpired soil moisture sink in each layer - ! [kg/m2/s] - real,pointer,dimension(:) :: avg_runoff ! Average surface water runoff [kg/m2/s] - real,pointer,dimension(:) :: avg_drainage ! Average water drainage through the lower - ! soil layer [kg/m2/s] - real,pointer,dimension(:) :: avg_drainage_heat! Average internal energy loss due to water - ! drainage through the lower soil layer [kg/m2/s] - - !----- Sensible heat ------------------------------------------------------------------! - - real,pointer,dimension(:) :: avg_sensible_lc ! Sensible heat flux, Leaf -> CAS [ W/m2] - real,pointer,dimension(:) :: avg_sensible_wc ! Sensible heat flux, wood -> CAS [ W/m2] - real,pointer,dimension(:) :: avg_qwshed_vg ! Average precip that falls from leaves [ W/m2] - real,pointer,dimension(:) :: avg_qintercepted ! Average precip that is intercepted [ W/m2] - real,pointer,dimension(:) :: avg_qthroughfall ! Average precip that is never intercepted [ W/m2] - real,pointer,dimension(:) :: avg_sensible_gc ! Sensible heat flux, GND -> CAS [ W/m2] - real,pointer,dimension(:) :: avg_sensible_ac ! Sensible heat flux, ATM -> CAS [ W/m2] - real,pointer,dimension(:,:) :: avg_sensible_gg ! Net soil heat flux between layers [ W/m2] - real,pointer,dimension(:) :: avg_runoff_heat ! Surface runoff internal energy flux [ W/m2] - - !----- Mass and Energy ---------------------------------------------------------------! - real,pointer,dimension(:) :: avg_leaf_energy ! Average leaf internal energy [ J/m2] - real,pointer,dimension(:) :: avg_leaf_temp ! Average leaf temperature [ K] - real,pointer,dimension(:) :: avg_leaf_vpdef ! Average leaf VPD [ Pa] - real,pointer,dimension(:) :: avg_leaf_fliq ! Avg. liq. frac. of leaf water [ ---] - real,pointer,dimension(:) :: avg_leaf_water ! Avg. water on top of leaves [ kg/m2] - real,pointer,dimension(:) :: avg_leaf_hcap ! Avg. leaf heat capacity [J/m2/K] - real,pointer,dimension(:) :: avg_wood_energy ! Average wood internal energy [ J/m2] - real,pointer,dimension(:) :: avg_wood_temp ! Average wood temperature [ K] - real,pointer,dimension(:) :: avg_wood_fliq ! Avg. liq. frac. of wood water [ ---] - real,pointer,dimension(:) :: avg_wood_water ! Avg. water on top of woods [ kg/m2] - real,pointer,dimension(:) :: avg_wood_hcap ! Avg. wood heat capacity [J/m2/K] - - !----- Hydrology variables -----------------------------------------------------------! - - real,pointer,dimension(:) :: watertable - real,pointer,dimension(:) :: moist_dz - real,pointer,dimension(:) :: ksat - real,pointer,dimension(:) :: soil_sat_energy - real,pointer,dimension(:) :: soil_sat_water - real,pointer,dimension(:) :: soil_sat_heat - real,pointer,dimension(:,:) :: runoff_A ! Runoff parameters, 1st dimension is 3. - real,pointer,dimension(:) :: runoff_rate - real,pointer,dimension(:) :: runoff - - end type sitetype -!============================================================================! -!============================================================================! + ! Long wave radiation absorbed by the ground (W/m2), due to the + ! surface and vegetation alone + real , pointer,dimension(:) :: rlong_g_surf + ! Long wave radiation absorbed by the ground (W/m2), due to the + ! incident long wave alone + real , pointer,dimension(:) :: rlong_g_incid + ! Long wave radiation absorbed by the surface water (W/m2) + real , pointer,dimension(:) :: rlong_s + ! Long wave radiation absorbed by the surface water (W/m2), due to + ! the surface and vegetation alone + real , pointer,dimension(:) :: rlong_s_surf + ! Long wave radiation absorbed by the surface water (W/m2), due + ! to the incident atmospheric long wave alone + real , pointer,dimension(:) :: rlong_s_incid -!============================================================================! -!============================================================================! - !----------------------------------------------------------------------! - ! Polygon Type: - ! The following are the arrays of site level variables - ! that populate the current polygon. - ! ---------------------------------------------------- - type polygontype + ! Patch albedo + real , pointer,dimension(:) :: albedo - integer :: nsites + ! Patch albedo, beam component + real , pointer,dimension(:) :: albedo_beam - ! The global index of the first patch in all each site - integer,pointer,dimension(:) :: sipa_id + ! Patch albedo, diffuse component + real , pointer,dimension(:) :: albedo_diffuse - ! The number of patches in each site - integer,pointer,dimension(:) :: sipa_n + ! Albedo for long wave radiation (whatever it means...) + real , pointer,dimension(:) :: rlong_albedo - ! Global index of the first site in this vector across all sites - ! on the grid - integer :: siglob_id ! Global index of the first patch across all cohorts + ! Net radiation at the top of the canopy (W/m2) + real , pointer,dimension(:) :: rnet - integer,pointer,dimension(:) :: patch_count ! number of patches per site - - ! Pointer to the patch vectors - type(sitetype),pointer,dimension(:) :: site + ! Upward long wave radiation at the top of the canopy (W/m2) + real , pointer,dimension(:) :: rlongup - integer,pointer,dimension(:) :: sitenum + ! Upward PAR radiation at the top of the canopy (W/m2) + real , pointer,dimension(:) :: parup - ! The vectorized landuse matrix is allocated in landuse_init - type(lutime), pointer,dimension(:,:) :: clutimes !(luyears,nsites) + ! Upward NIR radiation at the top of the canopy (W/m2) + real , pointer,dimension(:) :: nirup - !-------------------------------------------------------------------------------------! - !-------------------------------------------------------------------------------------! - ! Additional land use-related variables. ! - !-------------------------------------------------------------------------------------! + ! Upward short wave radiation at the top of the canopy (W/m2) + real , pointer,dimension(:) :: rshortup - !-------------------------------------------------------------------------------------! - ! The number of years of landuse data calculated at read-in of data during ! - ! landuse_init. ! - !-------------------------------------------------------------------------------------! - integer,pointer,dimension(:) :: num_landuse_years - - !----- Minimum DBH and probability of being harvest when selective logging happens. --! - real , pointer, dimension(:,:) :: mindbh_primary - real , pointer, dimension(:,:) :: probharv_primary - real , pointer, dimension(:,:) :: mindbh_secondary - real , pointer, dimension(:,:) :: probharv_secondary - !-------------------------------------------------------------------------------------! - !-------------------------------------------------------------------------------------! - - real, pointer,dimension(:,:) :: lai_pft ! Site level mean LAI, grouped by cohort PFT - ! [m2/m2] (n_pft,nsites) - real, pointer,dimension(:,:) :: wai_pft ! Woody area index, grouped by cohort PFT - ! [m2/m2] (n_pft,nsites) - - !----------------------------------- - ! BASIC INFO - !----------------------------------- - - real,pointer,dimension(:) :: area ! Proportion of a grid cell occupied by the site - real,pointer,dimension(:) :: patch_area ! Un-normalized sum of patch areas - real,pointer,dimension(:) :: elevation ! mean site elevation (meters) - real,pointer,dimension(:) :: slope ! mean site slope (degrees) - real,pointer,dimension(:) :: aspect ! mean site aspect (degrees) + ! Total snow depth as calculated in the radiation scheme. Used for + ! checking if cohorts are buried. [m] + real , pointer,dimension(:) :: total_sfcw_depth - - !-------------------------- - ! hydrologic routing info - !-------------------------- - real,pointer,dimension(:) :: TCI ! topographic convergence index + ! Fraction of vegetation covered with snow. Used for computing + ! surface roughness. + real , pointer,dimension(:) :: snowfac - integer,pointer,dimension(:) :: lsl ! Index of the lowest soil layer + ! limitation of heterotrophic respiration due to physical + ! environmental factors (0-1 coefficient) + real , pointer,dimension(:) :: A_decomp - real,pointer,dimension(:) :: pptweight ! lapse weight for precip + ! damping of decomposition due to nitrogen immobilization + ! (0-1 coefficient) + real , pointer,dimension(:) :: f_decomp - ! The Following variables used to point to structures - ! Now they point to the array index of the site - ! type(site), pointer :: hydro_next !site run-off goes to - ! type(site), pointer :: hydro_prev !site run-on comes from - integer, pointer,dimension(:) :: hydro_next !site run-off goes to - integer, pointer,dimension(:) :: hydro_prev !site run-on comes from - - real,pointer,dimension(:) :: moist_W !Wetness index - real,pointer,dimension(:) :: moist_f ! decay of soil conductance w/ depth - real,pointer,dimension(:) :: moist_tau ! tau characteristic time scale for water redistribution - real,pointer,dimension(:) :: moist_zi ! TOPMODEL "equilibrium" water table depth - real,pointer,dimension(:) :: baseflow ! loss of water from site to watershed discharge (kg/m2/s) - - integer,pointer,dimension(:) :: ncol_soil ! The soil colour category, used to - ! determine ground albedo. - - integer,pointer,dimension(:,:) :: ntext_soil ! The soil classifications index of the soil layer - ! refer to soil_coms to view the soil parameters - ! associated with each of these classes - - !----------------------------------- - ! TEMPERATURE VARIABLES - !----------------------------------- - ! minimum daily-averaged temperature in this month -- determines whether - ! or not recruits come up this month. - real,pointer,dimension(:) :: min_monthly_temp - - - !----------------------------------- - ! FORESTRY - !----------------------------------- - - ! is the site under plantation management? (1=yes, 0=no) - integer,pointer,dimension(:) :: plantation ! initialized to zero in site creation - - ! Upon creating an agriculture patch in this site, stock it with this - ! PFT. Set, along with the other stocking parameters, in - ! init_ed_site_vars(). - integer,pointer,dimension(:) :: agri_stocking_pft - - ! Upon creating an agriculture patch in this site, stock it with - ! this density of plants [plants/m2] - real,pointer,dimension(:) :: agri_stocking_density - - ! Upon creating a plantation patch in this site, stock it with this PFT - integer,pointer,dimension(:) :: plantation_stocking_pft - - ! Upon creating an plantation patch in this site, stock it with - ! this density of plants [plants/m2] - real,pointer,dimension(:) :: plantation_stocking_density - - ! Unapplied primary forest harvest from previous years (save until - ! harvest is above minimum threshold.) [kgC/m2]. Initialized - ! together with secondary memory in init_ed_site_vars(). - real,pointer,dimension(:) :: primary_harvest_memory - - ! Unapplied secondary forest harvest from previous years (save until - ! harvest is above minimum threshold.) [kgC/m2] - real ,pointer,dimension(:):: secondary_harvest_memory - - - !----------------------------------- - ! FIRE - !----------------------------------- - - ! site average fire disturbance rate - real,pointer,dimension(:) :: fire_disturbance_rate - ! total fuel in the dry patches - real,pointer,dimension(:) :: ignition_rate - - real,pointer, dimension(:,:) :: lambda_fire ! initialized in create_site !(12,nsites) - ! Monthly rainfall [mm/month] for each month over the past 12 months. - real,pointer,dimension(:,:) :: avg_monthly_pcpg - - type(prescribed_phen),pointer, dimension(:) :: phen_pars - - !----------------------------------- - ! DISTURBANCE - !----------------------------------- - ! rate of natural disturbance - real,pointer, dimension(:) :: nat_disturbance_rate - - ! disturbance dist_type id: - ! dist_type = 0 if treefall was last disturbance - ! dist_type = 1 if fire was last disturbance - integer,pointer, dimension(:) :: nat_dist_type - - ! if new patch is less than min size, store information in the memory - real,pointer, dimension(:,:,:) :: disturbance_memory !(n_dist_types,n_dist_types,nsites) - - ! the disturbance matrix (to,from) - real,pointer,dimension(:,:,:) :: disturbance_rates !(n_dist_types,n_dist_types,nsites) - - real,pointer,dimension(:,:):: green_leaf_factor !(n_pft,nsites) - real,pointer,dimension(:,:) :: leaf_aging_factor !(n_pft,nsites) - - type(met_driv_state),pointer,dimension(:) :: met - - real,pointer, dimension(:,:,:) :: basal_area !(n_pft,n_dbh,nsites), cm2/m2 - real,pointer, dimension(:,:,:) :: agb !(n_pft,n_dbh,nsites), kgC/m2 - real,pointer, dimension(:,:,:) :: pldens !(n_pft,n_dbh,nsites) plant/m2 - real,pointer, dimension(:,:,:) :: bseeds !(n_pft,n_dbh,nsites) kgC/m2 - - real,pointer, dimension(:,:,:) :: basal_area_growth ! cm2/m2/yr - real,pointer, dimension(:,:,:) :: basal_area_mort ! c2/m2/yr - real,pointer, dimension(:,:,:) :: basal_area_cut ! c2/m2/yr - - real,pointer, dimension(:,:,:) :: agb_growth ! kgC/m2/yr - real,pointer, dimension(:,:,:) :: agb_mort ! kgC/m2/yr - real,pointer, dimension(:,:,:) :: agb_cut ! kgC/m2/yr - - - real,pointer,dimension(:) :: cosaoi - real,pointer,dimension(:) :: avg_albedo_beam - real,pointer,dimension(:) :: avg_albedo_diffuse - real,pointer,dimension(:) :: avg_rlong_albedo - real,pointer,dimension(:) :: avg_albedo - real,pointer,dimension(:) :: avg_rlongup - - real,pointer,dimension(:) :: avg_parup - real,pointer,dimension(:) :: avg_nirup - real,pointer,dimension(:) :: avg_rshortup - real,pointer,dimension(:) :: avg_rnet - - !----- Length of day light, used to average light levels properly. -------------------! - real, pointer, dimension(:) :: daylight - - ! ------------------------------------------ - ! Fast time flux diagnostic variables == Polygon Level - !------------------------------------------- - real,pointer,dimension(:) :: avg_rshort_gnd ! Total absorbed radiation at the ground - real,pointer,dimension(:) :: avg_par_gnd ! Total absorbed PAR at the ground - real,pointer,dimension(:) :: avg_rlong_gnd ! Total absorbed radiation at the ground - real,pointer,dimension(:) :: avg_ustar ! Average u* [ m/s] - real,pointer,dimension(:) :: avg_tstar ! Average Theta* [ K] - real,pointer,dimension(:) :: avg_qstar ! Average q* [ kg/kg] - real,pointer,dimension(:) :: avg_cstar ! Average CO2* [ umol/mol] - real,pointer,dimension(:) :: avg_carbon_ac ! Vegetation to Canopy carbon dioxide flux - real,pointer,dimension(:) :: avg_carbon_st ! Canopy carbon dioxide storage - - !----- Moisture ---------------------------- - ! | Description - real,pointer,dimension(:) :: avg_vapor_lc ! Leaf to canopy air water flux [kg/m2/s] - real,pointer,dimension(:) :: avg_vapor_wc ! wood to canopy air water flux [kg/m2/s] - real,pointer,dimension(:) :: avg_vapor_gc ! Ground to canopy air latent heat flux [kg/m2/s] - real,pointer,dimension(:) :: avg_wshed_vg ! Water shedding - real,pointer,dimension(:) :: avg_intercepted ! Intercepted - real,pointer,dimension(:) :: avg_throughfall ! Throughfall - real,pointer,dimension(:) :: avg_vapor_ac ! Canopy to atmosphere water flux [kg/m2/s] - real,pointer,dimension(:) :: avg_transp ! Transpiration - real,pointer,dimension(:) :: avg_evap ! Evaporation - real,pointer,dimension(:,:) :: avg_smoist_gg ! Moisture flux between layers - real,pointer,dimension(:,:) :: avg_transloss ! Trabspired soil moisture sink - real,pointer,dimension(:) :: avg_runoff ! Total runoff - real,pointer,dimension(:) :: avg_drainage ! Total drainage - real,pointer,dimension(:) :: avg_drainage_heat! Total drainage heat flux - - !---- Polygon LAI and WAI --------------------------------------------------------------------------------------! - real, pointer, dimension(:) :: lai - real, pointer, dimension(:) :: avg_lma - real, pointer, dimension(:) :: wai - - !----- Sensible heat -------------------------------------------------------------------------------------------! - ! | Description - real,pointer,dimension(:) :: avg_sensible_lc ! Leaf to Canopy sensible heat flux - real,pointer,dimension(:) :: avg_sensible_wc ! wood to Canopy sensible heat flux - real,pointer,dimension(:) :: avg_qwshed_vg ! Internal energy of water shedding from leaves - real,pointer,dimension(:) :: avg_qintercepted ! Internal energy of intercepted precipitation - real,pointer,dimension(:) :: avg_qthroughfall ! Internal energy of throughfall precipitation - real,pointer,dimension(:) :: avg_sensible_gc ! Ground to canopy air sensible heat flux - real,pointer,dimension(:) :: avg_sensible_ac ! Canopy to atmosphere sensible heat flux - real,pointer,dimension(:,:) :: avg_sensible_gg ! Net soil heat flux between layers - real,pointer,dimension(:) :: avg_runoff_heat ! Total runoff internal energy flux - - !----- Mass and Energy ---------------------------------------------------------------! - real,pointer,dimension(:) :: avg_leaf_energy ! Average leaf internal energy [ J/m2] - real,pointer,dimension(:) :: avg_leaf_temp ! Average leaf temperature [ K] - real,pointer,dimension(:) :: avg_leaf_vpdef ! Average leaf VPD [ Pa] - real,pointer,dimension(:) :: avg_leaf_fliq ! Avg. liq. frac. of leaf water [ ---] - real,pointer,dimension(:) :: avg_leaf_water ! Avg. water on top of leaves [ kg/m2] - real,pointer,dimension(:) :: avg_leaf_hcap ! Avg. leaf heat capacity [J/m2/K] - real,pointer,dimension(:) :: avg_wood_energy ! Average wood internal energy [ J/m2] - real,pointer,dimension(:) :: avg_wood_temp ! Average wood temperature [ K] - real,pointer,dimension(:) :: avg_wood_fliq ! Avg. liq. frac. of wood water [ ---] - real,pointer,dimension(:) :: avg_wood_water ! Avg. water on top of woods [ kg/m2] - real,pointer,dimension(:) :: avg_wood_hcap ! Avg. wood heat capacity [J/m2/K] - - real,pointer,dimension(:) :: avg_can_temp - real,pointer,dimension(:) :: avg_can_shv - real,pointer,dimension(:) :: avg_can_co2 - real,pointer,dimension(:) :: avg_can_rhos - real,pointer,dimension(:) :: avg_can_prss - real,pointer,dimension(:) :: avg_can_theta - real,pointer,dimension(:) :: avg_can_theiv - real,pointer,dimension(:) :: avg_can_vpdef - real,pointer,dimension(:) :: avg_can_depth - - real,pointer,dimension(:,:) :: avg_soil_energy - real,pointer,dimension(:,:) :: avg_soil_mstpot - real,pointer,dimension(:,:) :: avg_soil_water - real,pointer,dimension(:,:) :: avg_soil_temp - real,pointer,dimension(:,:) :: avg_soil_fracliq - real,pointer,dimension(:) :: avg_soil_wetness !relative to wilting point - real,pointer,dimension(:,:) :: avg_soil_rootfrac - - real,pointer,dimension(:) :: avg_skin_temp - real,pointer,dimension(:) :: avg_available_water + ! total heterotrophic respiration (umol/m2/s) + real , pointer,dimension(:) :: rh + + ! coarse woody debris contribution to rh (umol/m2/s) + real , pointer,dimension(:) :: cwd_rh - real,pointer,dimension(:) :: runoff + ! Plant density broken down into size and PFT bins. Used in patch fusion + real, pointer,dimension(:,:,:) :: cumlai_profile !(n_pft,ff_nhgt,npatches) - !----- Phenology - real, pointer, dimension(:) :: rad_avg + ! Above ground biomass in this patch [kgC/m2] + real , pointer,dimension(:) :: plant_ag_biomass - !----- Meteorological forcing - real,pointer,dimension(:) :: avg_atm_tmp - real,pointer,dimension(:) :: avg_atm_shv - real,pointer,dimension(:) :: avg_atm_prss - real,pointer,dimension(:) :: avg_atm_vpdef + ! Last time step successfully completed by integrator. + real, pointer,dimension(:) :: htry + ! Last previous time step successfully completed by the integrator + real, pointer,dimension(:) :: hprev - !----- NACP intercomparison ---------------------------------------------! - real,pointer,dimension(:) :: avg_sfcw_depth - real,pointer,dimension(:) :: avg_sfcw_energy - real,pointer,dimension(:) :: avg_sfcw_mass - real,pointer,dimension(:) :: avg_sfcw_tempk - real,pointer,dimension(:) :: avg_sfcw_fracliq - real,pointer,dimension(:) :: avg_fsc - real,pointer,dimension(:) :: avg_ssc - real,pointer,dimension(:) :: avg_stsc - real,pointer,dimension(:) :: avg_balive - real,pointer,dimension(:) :: avg_bleaf - real,pointer,dimension(:) :: avg_broot - real,pointer,dimension(:) :: avg_bsapwooda - real,pointer,dimension(:) :: avg_bsapwoodb - real,pointer,dimension(:) :: avg_bdead - real,pointer,dimension(:) :: avg_fsn - real,pointer,dimension(:) :: avg_msn - real,pointer,dimension(:) :: avg_bstorage - real,pointer,dimension(:) :: avg_bseeds + ! Friction velocity [m/s] + real, pointer,dimension(:) :: ustar - ! Daily average residuals - real, pointer, dimension(:) :: dmean_co2_residual ! [umol_CO2/m2] - real, pointer, dimension(:) :: dmean_energy_residual ! [J/m2] - real, pointer, dimension(:) :: dmean_water_residual ! [kg_H20/m2] - ! Monthly average residuals - real, pointer, dimension(:) :: mmean_co2_residual ! [umol_CO2/m2] - real, pointer, dimension(:) :: mmean_energy_residual ! [J/m2] - real, pointer, dimension(:) :: mmean_water_residual ! [kg_H20/m2] + ! Characteristic temperature gradient [K] + real, pointer,dimension(:) :: tstar - end type polygontype -!============================================================================! -!============================================================================! + ! Characteristic specific humidity gradient [kg/kg] + real, pointer,dimension(:) :: qstar + ! Characteristic CO2 mixing ratio gradient [umol/mol] + real, pointer,dimension(:) :: cstar + ! Height / Obukhov length + real, pointer,dimension(:) :: zeta + ! Bulk Richardson number + real, pointer,dimension(:) :: ribulk + real, pointer,dimension(:) :: upwp !eddy mom. flux u-prime w-prime -!============================================================================! -!============================================================================! - !--------------------------------------------------- - ! Ed Type: - ! The following are the arrays of polygon level variables - ! that populate the current grid. - !--------------------------------------------------- + real, pointer,dimension(:) :: tpwp !eddy heat flux t-prime w-prime - type edtype + real, pointer,dimension(:) :: qpwp !eddy moist. flux q-prime w-prime - !---- Data space indexing variables --------------- - ! - ! These variables are the total number of each - ! respective hierarchical type, summed across - ! all compute nodes if it is a parallel process - ! These values are mostly needed for output - ! dataspace dimensioning. + real, pointer,dimension(:) :: cpwp !eddy CO2 flux flux c-prime w-prime - integer :: npolygons_global - integer :: nsites_global - integer :: npatches_global - integer :: ncohorts_global + real, pointer,dimension(:) :: wpwp !eddy v. mom. flux w-prime w-prime - ! Index offsets for total counts of cohorts, patches - ! and sites. If this is the nth machine writing to - ! a file, it needs to know how many of these types - ! had come before, so it writes data contiguously - ! into the same file with the others + !----- Hydrology variables ----------------------------------------------------------! + real,pointer,dimension(:) :: watertable + real,pointer,dimension(:) :: moist_dz + real,pointer,dimension(:) :: ksat + real,pointer,dimension(:) :: soil_sat_energy + real,pointer,dimension(:) :: soil_sat_water + real,pointer,dimension(:) :: soil_sat_heat + real,pointer,dimension(:,:) :: runoff_A ! Runoff parameters, 1st dimension is 3. + real,pointer,dimension(:) :: runoff_rate + real,pointer,dimension(:) :: runoff + real,pointer,dimension(:) :: qrunoff - integer :: mach_cohort_offset_index - integer :: mach_patch_offset_index - integer :: mach_site_offset_index - integer :: mach_polygon_offset_index + !====================================================================================! + !====================================================================================! + ! Patch-level diagnostic variables: these are either fluxes or state variables, ! + ! averaged over different scales, for each patch. ! + ! ! + ! FMEAN -- average over one frqsum time interval (usually sub-daily) ! + ! DMEAN -- daily mean ! + ! MMEAN -- monthly mean ! + ! MMSQU -- monthly mean sum of squares ! + ! QMEAN -- mean diel ! + ! QMSQU -- mean sum of squares for the diel ! + ! ! + ! Acronyms used in the description below: ! + ! ATM -- air above canopy ! + ! CAS -- canopy air space ! + ! TSPL -- temporary snow/pounding layer ! + ! PAR -- photosynthetically active radiation ! + ! NIR -- near infra-red ! + ! SW -- short wave ! + ! LW -- long wave ! + ! VPD -- Vapour pressure deficit ! + ! Theta_Eiv -- ice vapour equivalent potential temperature ! + !------------------------------------------------------------------------------------! + !----- Photosynthesis/Decomposition. ------------------------------------------------! + real,pointer,dimension(:) :: fmean_rh ! Heterotr. resp. [umol/m2/s] + real,pointer,dimension(:) :: fmean_cwd_rh ! CWD respiration [umol/m2/s] + real,pointer,dimension(:) :: fmean_nep ! Net Ecosyst. Prod. [umol/m2/s] + !----- State variables. -------------------------------------------------------------! + real,pointer,dimension(:) :: fmean_rk4step ! RK4 time step [ s] + real,pointer,dimension(:) :: fmean_available_water ! Available water [ kg/m2] + real,pointer,dimension(:) :: fmean_can_theiv ! CAS Theta_Eiv [ K] + real,pointer,dimension(:) :: fmean_can_theta ! CAS Potential temp.[ K] + real,pointer,dimension(:) :: fmean_can_vpdef ! CAS Vap. Pres. Def.[ Pa] + real,pointer,dimension(:) :: fmean_can_temp ! CAS Temperature [ K] + real,pointer,dimension(:) :: fmean_can_shv ! CAS Specific hum. [ kg/kg] + real,pointer,dimension(:) :: fmean_can_co2 ! CAS CO2 mix. ratio [ umol/mol] + real,pointer,dimension(:) :: fmean_can_rhos ! CAS air density [ kg/m3] + real,pointer,dimension(:) :: fmean_can_prss ! CAS pressure [ Pa] + real,pointer,dimension(:) :: fmean_gnd_temp ! Ground temperature [ K] + real,pointer,dimension(:) :: fmean_gnd_shv ! Ground spec. hum. [ kg/kg] + real,pointer,dimension(:) :: fmean_can_ggnd ! Net canopy conduct.[ m/2] + real,pointer,dimension(:) :: fmean_sfcw_depth ! TPSL depth [ m] + real,pointer,dimension(:) :: fmean_sfcw_energy ! TPSL int. energy [ J/kg] + real,pointer,dimension(:) :: fmean_sfcw_mass ! TPSL water mass [ kg/m2] + real,pointer,dimension(:) :: fmean_sfcw_temp ! TPSL temperature [ K] + real,pointer,dimension(:) :: fmean_sfcw_fliq ! TPSL liquid frac. [ --] + real,pointer,dimension(:,:) :: fmean_soil_energy ! Soil int. energy [ J/m3] + real,pointer,dimension(:,:) :: fmean_soil_mstpot ! Soil matric potl. [ m] + real,pointer,dimension(:,:) :: fmean_soil_water ! Soil water content [ m3/m3] + real,pointer,dimension(:,:) :: fmean_soil_temp ! Soil temperature [ K] + real,pointer,dimension(:,:) :: fmean_soil_fliq ! Soil liquid frac. [ --] + !----- Radiation --------------------------------------------------------------------! + real,pointer,dimension(:) :: fmean_rshort_gnd ! Gnd. absp. SW Rad. [ W/m2] + real,pointer,dimension(:) :: fmean_par_gnd ! Absorbed PAR [ W/m2] + real,pointer,dimension(:) :: fmean_rlong_gnd ! Gnd. absp. LW Rad. [ W/m2] + real,pointer,dimension(:) :: fmean_rlongup ! Outgoing LW Rad. [ W/m2] + real,pointer,dimension(:) :: fmean_parup ! Outgoing PAR [ W/m2] + real,pointer,dimension(:) :: fmean_nirup ! Outgoing NIR [ W/m2] + real,pointer,dimension(:) :: fmean_rshortup ! Outgoing SW Rad. [ W/m2] + real,pointer,dimension(:) :: fmean_rnet ! Net radiation [ W/m2] + real,pointer,dimension(:) :: fmean_albedo ! Albedo [ ----] + real,pointer,dimension(:) :: fmean_albedo_beam ! Direct Albedo [ ----] + real,pointer,dimension(:) :: fmean_albedo_diff ! Diffuse Albedo [ ----] + real,pointer,dimension(:) :: fmean_rlong_albedo ! Longwave Albedo [ ----] + !----- Characteristic variables. ----------------------------------------------------! + real,pointer,dimension(:) :: fmean_ustar ! Friction velocity [ m/s] + real,pointer,dimension(:) :: fmean_tstar ! Pot. temp. scale [ K] + real,pointer,dimension(:) :: fmean_qstar ! Water vapour scale [ kg/kg] + real,pointer,dimension(:) :: fmean_cstar ! CO2 scale [ umol/mol] + real,pointer,dimension(:) :: fmean_carbon_ac ! CO2 flux, ATM->CAS [umol/m2/s] + real,pointer,dimension(:) :: fmean_carbon_st ! CO2 storage [umol/m2/s] + real,pointer,dimension(:) :: fmean_vapor_gc ! Water flux, Gnd->CAS [ kg/m2/s] + real,pointer,dimension(:) :: fmean_vapor_ac ! Water flux, Atm->CAS [ kg/m2/s] + real,pointer,dimension(:,:) :: fmean_smoist_gg ! Soil water flux [ kg/m2/s] + real,pointer,dimension(:) :: fmean_throughfall ! Throughfall rate [ kg/m2/s] + real,pointer,dimension(:,:) :: fmean_transloss ! Water loss (transp.) [ kg/m2/s] + real,pointer,dimension(:) :: fmean_runoff ! Water runoff [ kg/m2/s] + real,pointer,dimension(:) :: fmean_drainage ! Water drainage [ kg/m2/s] + !----- Sensible heat ----------------------------------------------------------------! + real,pointer,dimension(:) :: fmean_sensible_gc ! Sens. heat, GND->CAS [ W/m2] + real,pointer,dimension(:) :: fmean_sensible_ac ! Sens. heat, ATM->CAS [ W/m2] + real,pointer,dimension(:,:) :: fmean_sensible_gg ! Soil heat flux [ W/m2] + real,pointer,dimension(:) :: fmean_qthroughfall ! Throughfall rate [ W/m2] + real,pointer,dimension(:) :: fmean_qrunoff ! Surface runoff [ W/m2] + real,pointer,dimension(:) :: fmean_qdrainage ! Drainage energy loss [ W/m2] + !----- Variables with no sub-daily means. -------------------------------------------! + real,pointer,dimension(:) :: dmean_A_decomp ! Decomposition fact. [ --] + real,pointer,dimension(:) :: dmean_Af_decomp ! A with N immobil. [ --] + real,pointer,dimension(:) :: dmean_co2_residual ! CO2 residual [ umol/m2] + real,pointer,dimension(:) :: dmean_energy_residual ! Enthalpy residual [ J/m2] + real,pointer,dimension(:) :: dmean_water_residual ! Water residual [ kg/m2] + !----- Variables that are updated once a day. ---------------------------------------! + real,pointer,dimension(:) :: mmean_fast_soil_c ! Fast soil carbon [ kgC/m2] + real,pointer,dimension(:) :: mmean_slow_soil_c ! Slow soil carbon [ kgC/m2] + real,pointer,dimension(:) :: mmean_struct_soil_c ! Struct. soil carbon [ kgC/m2] + real,pointer,dimension(:) :: mmean_struct_soil_l ! Struct. soil lignin [ kgL/m2] + real,pointer,dimension(:) :: mmean_fast_soil_n ! Fast soil nitrogen [ kgN/m2] + real,pointer,dimension(:) :: mmean_mineral_soil_n ! Mineralised soil N [ kgN/m2] + !----- Daily means. Units are the same as the "avg" variables. ---------------------! + real,pointer,dimension(:) :: dmean_rh + real,pointer,dimension(:) :: dmean_cwd_rh + real,pointer,dimension(:) :: dmean_nep + real,pointer,dimension(:) :: dmean_rk4step + real,pointer,dimension(:) :: dmean_available_water + real,pointer,dimension(:) :: dmean_can_theiv + real,pointer,dimension(:) :: dmean_can_theta + real,pointer,dimension(:) :: dmean_can_vpdef + real,pointer,dimension(:) :: dmean_can_temp + real,pointer,dimension(:) :: dmean_can_shv + real,pointer,dimension(:) :: dmean_can_co2 + real,pointer,dimension(:) :: dmean_can_rhos + real,pointer,dimension(:) :: dmean_can_prss + real,pointer,dimension(:) :: dmean_gnd_temp + real,pointer,dimension(:) :: dmean_gnd_shv + real,pointer,dimension(:) :: dmean_can_ggnd + real,pointer,dimension(:) :: dmean_sfcw_depth + real,pointer,dimension(:) :: dmean_sfcw_energy + real,pointer,dimension(:) :: dmean_sfcw_mass + real,pointer,dimension(:) :: dmean_sfcw_temp + real,pointer,dimension(:) :: dmean_sfcw_fliq + real,pointer,dimension(:,:) :: dmean_soil_energy + real,pointer,dimension(:,:) :: dmean_soil_mstpot + real,pointer,dimension(:,:) :: dmean_soil_water + real,pointer,dimension(:,:) :: dmean_soil_temp + real,pointer,dimension(:,:) :: dmean_soil_fliq + real,pointer,dimension(:) :: dmean_rshort_gnd + real,pointer,dimension(:) :: dmean_par_gnd + real,pointer,dimension(:) :: dmean_rlong_gnd + real,pointer,dimension(:) :: dmean_rlongup + real,pointer,dimension(:) :: dmean_parup + real,pointer,dimension(:) :: dmean_nirup + real,pointer,dimension(:) :: dmean_rshortup + real,pointer,dimension(:) :: dmean_rnet + real,pointer,dimension(:) :: dmean_albedo + real,pointer,dimension(:) :: dmean_albedo_beam + real,pointer,dimension(:) :: dmean_albedo_diff + real,pointer,dimension(:) :: dmean_rlong_albedo + real,pointer,dimension(:) :: dmean_ustar + real,pointer,dimension(:) :: dmean_tstar + real,pointer,dimension(:) :: dmean_qstar + real,pointer,dimension(:) :: dmean_cstar + real,pointer,dimension(:) :: dmean_carbon_ac + real,pointer,dimension(:) :: dmean_carbon_st + real,pointer,dimension(:) :: dmean_vapor_gc + real,pointer,dimension(:) :: dmean_vapor_ac + real,pointer,dimension(:,:) :: dmean_smoist_gg + real,pointer,dimension(:) :: dmean_throughfall + real,pointer,dimension(:,:) :: dmean_transloss + real,pointer,dimension(:) :: dmean_runoff + real,pointer,dimension(:) :: dmean_drainage + real,pointer,dimension(:) :: dmean_sensible_gc + real,pointer,dimension(:) :: dmean_sensible_ac + real,pointer,dimension(:,:) :: dmean_sensible_gg + real,pointer,dimension(:) :: dmean_qthroughfall + real,pointer,dimension(:) :: dmean_qrunoff + real,pointer,dimension(:) :: dmean_qdrainage + !----- Monthly means. Units are the same as the "avg" variables. --------------------! + real,pointer,dimension(:) :: mmean_rh + real,pointer,dimension(:) :: mmean_cwd_rh + real,pointer,dimension(:) :: mmean_nep + real,pointer,dimension(:) :: mmean_rk4step + real,pointer,dimension(:) :: mmean_available_water + real,pointer,dimension(:) :: mmean_can_theiv + real,pointer,dimension(:) :: mmean_can_theta + real,pointer,dimension(:) :: mmean_can_vpdef + real,pointer,dimension(:) :: mmean_can_temp + real,pointer,dimension(:) :: mmean_can_shv + real,pointer,dimension(:) :: mmean_can_co2 + real,pointer,dimension(:) :: mmean_can_rhos + real,pointer,dimension(:) :: mmean_can_prss + real,pointer,dimension(:) :: mmean_gnd_temp + real,pointer,dimension(:) :: mmean_gnd_shv + real,pointer,dimension(:) :: mmean_can_ggnd + real,pointer,dimension(:) :: mmean_sfcw_depth + real,pointer,dimension(:) :: mmean_sfcw_energy + real,pointer,dimension(:) :: mmean_sfcw_mass + real,pointer,dimension(:) :: mmean_sfcw_temp + real,pointer,dimension(:) :: mmean_sfcw_fliq + real,pointer,dimension(:,:) :: mmean_soil_energy + real,pointer,dimension(:,:) :: mmean_soil_mstpot + real,pointer,dimension(:,:) :: mmean_soil_water + real,pointer,dimension(:,:) :: mmean_soil_temp + real,pointer,dimension(:,:) :: mmean_soil_fliq + real,pointer,dimension(:) :: mmean_rshort_gnd + real,pointer,dimension(:) :: mmean_par_gnd + real,pointer,dimension(:) :: mmean_rlong_gnd + real,pointer,dimension(:) :: mmean_rlongup + real,pointer,dimension(:) :: mmean_parup + real,pointer,dimension(:) :: mmean_nirup + real,pointer,dimension(:) :: mmean_rshortup + real,pointer,dimension(:) :: mmean_rnet + real,pointer,dimension(:) :: mmean_albedo + real,pointer,dimension(:) :: mmean_albedo_beam + real,pointer,dimension(:) :: mmean_albedo_diff + real,pointer,dimension(:) :: mmean_rlong_albedo + real,pointer,dimension(:) :: mmean_ustar + real,pointer,dimension(:) :: mmean_tstar + real,pointer,dimension(:) :: mmean_qstar + real,pointer,dimension(:) :: mmean_cstar + real,pointer,dimension(:) :: mmean_carbon_ac + real,pointer,dimension(:) :: mmean_carbon_st + real,pointer,dimension(:) :: mmean_vapor_gc + real,pointer,dimension(:) :: mmean_vapor_ac + real,pointer,dimension(:,:) :: mmean_smoist_gg + real,pointer,dimension(:) :: mmean_throughfall + real,pointer,dimension(:,:) :: mmean_transloss + real,pointer,dimension(:) :: mmean_runoff + real,pointer,dimension(:) :: mmean_drainage + real,pointer,dimension(:) :: mmean_sensible_gc + real,pointer,dimension(:) :: mmean_sensible_ac + real,pointer,dimension(:,:) :: mmean_sensible_gg + real,pointer,dimension(:) :: mmean_qthroughfall + real,pointer,dimension(:) :: mmean_qrunoff + real,pointer,dimension(:) :: mmean_qdrainage + real,pointer,dimension(:) :: mmean_A_decomp + real,pointer,dimension(:) :: mmean_Af_decomp + real,pointer,dimension(:) :: mmean_co2_residual + real,pointer,dimension(:) :: mmean_energy_residual + real,pointer,dimension(:) :: mmean_water_residual + !----- Monthly means sum of squares. Units are the square of "avg" variables. -------! + real,pointer,dimension(:) :: mmsqu_rh + real,pointer,dimension(:) :: mmsqu_cwd_rh + real,pointer,dimension(:) :: mmsqu_nep + real,pointer,dimension(:) :: mmsqu_rlongup + real,pointer,dimension(:) :: mmsqu_parup + real,pointer,dimension(:) :: mmsqu_nirup + real,pointer,dimension(:) :: mmsqu_rshortup + real,pointer,dimension(:) :: mmsqu_rnet + real,pointer,dimension(:) :: mmsqu_albedo + real,pointer,dimension(:) :: mmsqu_ustar + real,pointer,dimension(:) :: mmsqu_carbon_ac + real,pointer,dimension(:) :: mmsqu_carbon_st + real,pointer,dimension(:) :: mmsqu_vapor_gc + real,pointer,dimension(:) :: mmsqu_vapor_ac + real,pointer,dimension(:) :: mmsqu_transp + real,pointer,dimension(:) :: mmsqu_sensible_gc + real,pointer,dimension(:) :: mmsqu_sensible_ac + !----- Mean diel. Units are the same as the "avg" variables. ------------------------! + real,pointer,dimension(:,:) :: qmean_rh + real,pointer,dimension(:,:) :: qmean_cwd_rh + real,pointer,dimension(:,:) :: qmean_nep + real,pointer,dimension(:,:) :: qmean_rk4step + real,pointer,dimension(:,:) :: qmean_available_water + real,pointer,dimension(:,:) :: qmean_can_theiv + real,pointer,dimension(:,:) :: qmean_can_theta + real,pointer,dimension(:,:) :: qmean_can_vpdef + real,pointer,dimension(:,:) :: qmean_can_temp + real,pointer,dimension(:,:) :: qmean_can_shv + real,pointer,dimension(:,:) :: qmean_can_co2 + real,pointer,dimension(:,:) :: qmean_can_rhos + real,pointer,dimension(:,:) :: qmean_can_prss + real,pointer,dimension(:,:) :: qmean_gnd_temp + real,pointer,dimension(:,:) :: qmean_gnd_shv + real,pointer,dimension(:,:) :: qmean_can_ggnd + real,pointer,dimension(:,:) :: qmean_sfcw_depth + real,pointer,dimension(:,:) :: qmean_sfcw_energy + real,pointer,dimension(:,:) :: qmean_sfcw_mass + real,pointer,dimension(:,:) :: qmean_sfcw_temp + real,pointer,dimension(:,:) :: qmean_sfcw_fliq + real,pointer,dimension(:,:,:) :: qmean_soil_energy + real,pointer,dimension(:,:,:) :: qmean_soil_mstpot + real,pointer,dimension(:,:,:) :: qmean_soil_water + real,pointer,dimension(:,:,:) :: qmean_soil_temp + real,pointer,dimension(:,:,:) :: qmean_soil_fliq + real,pointer,dimension(:,:) :: qmean_rshort_gnd + real,pointer,dimension(:,:) :: qmean_par_gnd + real,pointer,dimension(:,:) :: qmean_rlong_gnd + real,pointer,dimension(:,:) :: qmean_rlongup + real,pointer,dimension(:,:) :: qmean_parup + real,pointer,dimension(:,:) :: qmean_nirup + real,pointer,dimension(:,:) :: qmean_rshortup + real,pointer,dimension(:,:) :: qmean_rnet + real,pointer,dimension(:,:) :: qmean_albedo + real,pointer,dimension(:,:) :: qmean_albedo_beam + real,pointer,dimension(:,:) :: qmean_albedo_diff + real,pointer,dimension(:,:) :: qmean_rlong_albedo + real,pointer,dimension(:,:) :: qmean_ustar + real,pointer,dimension(:,:) :: qmean_tstar + real,pointer,dimension(:,:) :: qmean_qstar + real,pointer,dimension(:,:) :: qmean_cstar + real,pointer,dimension(:,:) :: qmean_carbon_ac + real,pointer,dimension(:,:) :: qmean_carbon_st + real,pointer,dimension(:,:) :: qmean_vapor_gc + real,pointer,dimension(:,:) :: qmean_vapor_ac + real,pointer,dimension(:,:,:) :: qmean_smoist_gg + real,pointer,dimension(:,:) :: qmean_throughfall + real,pointer,dimension(:,:,:) :: qmean_transloss + real,pointer,dimension(:,:) :: qmean_runoff + real,pointer,dimension(:,:) :: qmean_drainage + real,pointer,dimension(:,:) :: qmean_sensible_gc + real,pointer,dimension(:,:) :: qmean_sensible_ac + real,pointer,dimension(:,:,:) :: qmean_sensible_gg + real,pointer,dimension(:,:) :: qmean_qthroughfall + real,pointer,dimension(:,:) :: qmean_qrunoff + real,pointer,dimension(:,:) :: qmean_qdrainage + !----- Means diel of the sum of squares. Units are the square of "avg" variables. ---! + real,pointer,dimension(:,:) :: qmsqu_rh + real,pointer,dimension(:,:) :: qmsqu_cwd_rh + real,pointer,dimension(:,:) :: qmsqu_nep + real,pointer,dimension(:,:) :: qmsqu_rlongup + real,pointer,dimension(:,:) :: qmsqu_parup + real,pointer,dimension(:,:) :: qmsqu_nirup + real,pointer,dimension(:,:) :: qmsqu_rshortup + real,pointer,dimension(:,:) :: qmsqu_rnet + real,pointer,dimension(:,:) :: qmsqu_albedo + real,pointer,dimension(:,:) :: qmsqu_ustar + real,pointer,dimension(:,:) :: qmsqu_carbon_ac + real,pointer,dimension(:,:) :: qmsqu_carbon_st + real,pointer,dimension(:,:) :: qmsqu_vapor_gc + real,pointer,dimension(:,:) :: qmsqu_vapor_ac + real,pointer,dimension(:,:) :: qmsqu_transp + real,pointer,dimension(:,:) :: qmsqu_sensible_gc + real,pointer,dimension(:,:) :: qmsqu_sensible_ac + !====================================================================================! + !====================================================================================! + end type sitetype + !=======================================================================================! + !=======================================================================================! - ! - !--------------------------------------------------- - integer :: npolygons - integer :: pyglob_id - ! The global index of the first site in each polygon - integer,pointer,dimension(:) :: pysi_id + !=======================================================================================! + !=======================================================================================! + ! POLYGON TYPE: The following are the arrays of site level variables that populate the ! + ! current polygon. ! + !---------------------------------------------------------------------------------------! + type polygontype + !----- Number of sites in this polygon. ---------------------------------------------! + integer :: nsites + !------------------------------------------------------------------------------------! - ! The number of sites in each polygon - integer,pointer,dimension(:) :: pysi_n + ! Global index of the first site in this vector across all sites + ! on the grid + integer :: siglob_id ! Global index of the first patch across all cohorts - real(kind=8),pointer,dimension(:) :: walltime_py + ! Pointer to the patch vectors + type(sitetype),pointer,dimension(:) :: site - real,pointer,dimension(:) :: lat + ! The global index of the first patch in all each site + integer,pointer,dimension(:) :: sipa_id - real,pointer,dimension(:) :: lon + ! The number of patches in each site + integer,pointer,dimension(:) :: sipa_n - integer,pointer,dimension(:) :: xatm - - integer,pointer,dimension(:) :: yatm + integer,pointer,dimension(:) :: patch_count ! number of patches per site - ! Sensible heat flux from the canopy to atmosphere, averaged across sites - - real,pointer,dimension(:) :: sensflux_py ! of dimension npolys + integer,pointer,dimension(:) :: sitenum - integer,pointer,dimension(:) :: ncol_soil ! Soil colour classification (npolygon) - integer,pointer,dimension(:,:) :: ntext_soil ! Soil texture classification - ! (nzg,polygon) - - integer,pointer,dimension(:) :: lsl ! Layer of lowest soil - - ! matrix of site hydrologic adjacency - real,pointer,dimension(:,:,:) :: site_adjacency + !------------------------------------------------------------------------------------! + ! METEOROLOGICAL INFORMATION. ! + !------------------------------------------------------------------------------------! + type(met_driv_state),pointer,dimension(:) :: met + !------------------------------------------------------------------------------------! - real,pointer,dimension(:) :: wbar - real,pointer,dimension(:) :: Te - real,pointer,dimension(:) :: zbar - real,pointer,dimension(:) :: tau - real,pointer,dimension(:) :: sheat - real,pointer,dimension(:) :: baseflow - real,pointer,dimension(:) :: runoff - real,pointer,dimension(:) :: swliq - type(polygontype),pointer,dimension(:) :: polygon - integer,pointer,dimension(:) :: ilon ! index for matching met. data - integer,pointer,dimension(:) :: ilat ! index for matching met. data - ! Polygon AGB (kgC/m2) - real,pointer,dimension(:) :: total_agb + !------------------------------------------------------------------------------------! + ! BASIC INFO + !------------------------------------------------------------------------------------! + real,pointer,dimension(:) :: area ! Relative area occupied by the site + real,pointer,dimension(:) :: patch_area ! Un-normalized sum of patch areas + real,pointer,dimension(:) :: elevation ! mean site elevation (meters) + real,pointer,dimension(:) :: slope ! mean site slope (degrees) + real,pointer,dimension(:) :: aspect ! mean site aspect (degrees) + !------------------------------------------------------------------------------------! - ! Polygon basal area (cm2/m2) - real,pointer,dimension(:) :: total_basal_area - ! AGB accruing due to growth (kgC/m2/yr) - real,pointer,dimension(:) :: total_agb_growth - ! AGB lost due to mortality (kgC/m2/yr) - real,pointer,dimension(:) :: total_agb_mort + !------------------------------------------------------------------------------------! + ! Soil properties. ! + ! LSL -- Index of the lowest soil layer (simulation dependent). + ! ! + ! NCOL_SOIL -- Index of the soil colour class (used to find the ground albedo) + ! |-----------------------------------------------------------------------| ! + ! | | Dry soil | Saturated | | Dry soil | Saturated | ! + ! | Class |-------------+-------------| Class +-------------+-------------| ! + ! | | VIS | NIR | VIS | NIR | | VIS | NIR | VIS | NIR | ! + ! |-------+------+------+------+------+-------+------+------+------+------| ! + ! | 1 | 0.36 | 0.61 | 0.25 | 0.50 | 11 | 0.24 | 0.37 | 0.13 | 0.26 | ! + ! | 2 | 0.34 | 0.57 | 0.23 | 0.46 | 12 | 0.23 | 0.35 | 0.12 | 0.24 | ! + ! | 3 | 0.32 | 0.53 | 0.21 | 0.42 | 13 | 0.22 | 0.33 | 0.11 | 0.22 | ! + ! | 4 | 0.31 | 0.51 | 0.20 | 0.40 | 14 | 0.20 | 0.31 | 0.10 | 0.20 | ! + ! | 5 | 0.30 | 0.49 | 0.19 | 0.38 | 15 | 0.18 | 0.29 | 0.09 | 0.18 | ! + ! | 6 | 0.29 | 0.48 | 0.18 | 0.36 | 16 | 0.16 | 0.27 | 0.08 | 0.16 | ! + ! | 7 | 0.28 | 0.45 | 0.17 | 0.34 | 17 | 0.14 | 0.25 | 0.07 | 0.14 | ! + ! | 8 | 0.27 | 0.43 | 0.16 | 0.32 | 18 | 0.12 | 0.23 | 0.06 | 0.12 | ! + ! | 9 | 0.26 | 0.41 | 0.15 | 0.30 | 19 | 0.10 | 0.21 | 0.05 | 0.10 | ! + ! | 10 | 0.25 | 0.39 | 0.14 | 0.28 | 20 | 0.08 | 0.16 | 0.04 | 0.08 | ! + ! |-----------------------------------------------------------------------| ! + ! ! + ! Soil type 21 is a special case in which we use the albedo method that used to be ! + ! the default in ED-2.1. ! + ! ! + ! ! + ! NTEXT_SOIL -- Index of the soil texture class, similar to the USDA classification ! + ! except that clay is split into four classes (11,15,16,17). ! + ! ! + ! 1 -- sand | 7 -- silty clay loam | 13 -- bedrock ! + ! 2 -- loamy sand | 8 -- clayey loam | 14 -- silt ! + ! 3 -- sandy loam | 9 -- sandy clay | 15 -- heavy clay ! + ! 4 -- silt loam | 10 -- silty clay | 16 -- clayey sand ! + ! 5 -- loam | 11 -- clay | 17 -- clayey silt ! + ! 6 -- sandy clay loam | 12 -- peat ! + !------------------------------------------------------------------------------------! + integer,pointer,dimension(:) :: lsl + integer,pointer,dimension(:) :: ncol_soil + integer,pointer,dimension(:,:) :: ntext_soil + !------------------------------------------------------------------------------------! - ! AGB used to generate recruits (kgC/m2/yr) - real,pointer,dimension(:) :: total_agb_recruit - ! CHANGED THE FOLLOWING UNIT DESCRIPTORS: FROM (cm2/m2/yr) RGK 6-13-08 - !------------ - ! BASAL_AREA accruing due to growth (cm2/m2/yr) - real,pointer,dimension(:) :: total_basal_area_growth + !------------------------------------------------------------------------------------! + ! hydrologic routing info + !------------------------------------------------------------------------------------! + real,pointer,dimension(:) :: TCI ! topographic convergence index - ! BASAL_AREA lost due to mortality (cm2/m2/yr) - real,pointer,dimension(:) :: total_basal_area_mort + real,pointer,dimension(:) :: pptweight ! lapse weight for precip - ! BASAL_AREA used to generate recruits (cm2/m2/yr) - real,pointer,dimension(:) :: total_basal_area_recruit - !------------ + ! The Following variables used to point to structures + ! Now they point to the array index of the site + ! type(site), pointer :: hydro_next !site run-off goes to + ! type(site), pointer :: hydro_prev !site run-on comes from + integer, pointer,dimension(:) :: hydro_next !site run-off goes to + integer, pointer,dimension(:) :: hydro_prev !site run-on comes from + + real,pointer,dimension(:) :: moist_W !Wetness index + real,pointer,dimension(:) :: moist_f ! decay of soil conductance w/ depth + real,pointer,dimension(:) :: moist_tau ! tau characteristic time scale for water redistribution + real,pointer,dimension(:) :: moist_zi ! TOPMODEL "equilibrium" water table depth + real,pointer,dimension(:) :: baseflow ! loss of water from site to watershed discharge (kg/m2/s) + real,pointer,dimension(:) :: runoff + real,pointer,dimension(:) :: qrunoff - integer,pointer,dimension(:) :: nsites - ! list of site numbers - integer,pointer,dimension(:,:) :: sitenums !(max_site,npolygons) - - ! specification if the adjacency table was loaded from a file - integer,pointer,dimension(:) :: load_adjacency - !! Meteorological driver data - type(met_driv_data),pointer,dimension(:) :: metinput - - !! Lapse rate transfer data - type(met_driv_state),pointer,dimension(:) :: met, lapse - real,pointer,dimension(:) :: cosz - real,pointer,dimension(:) :: mean_gpp - real,pointer,dimension(:) :: mean_precip - real,pointer,dimension(:) :: mean_qprecip - real,pointer,dimension(:) :: mean_netrad - ! Total carbon (vegetation plus soil) at the beginning of budget-averaging - ! time [kgC/m2] - real,pointer,dimension(:) :: cbudget_initialstorage + !------------------------------------------------------------------------------------! + ! Minimum daily-averaged temperature in this month -- determines whether + ! or not recruits come up this month. + !------------------------------------------------------------------------------------! + real,pointer,dimension(:) :: min_monthly_temp + !------------------------------------------------------------------------------------! - ! Average NEP (GPP - plant respiration - heterotrophic respiration) - ! [kgC/m2/day], used for evaluating daily carbon budget. - real,pointer,dimension(:) :: cbudget_nep - ! Total nitrogen (vegetation plus soil) at the beginning of - ! budget-averaging time [kgN/m2] - real,pointer,dimension(:) :: nbudget_initialstorage - ! Polygon basal area profile [cm2/m2] - real,pointer,dimension(:,:,:) :: basal_area !(n_pft,n_dbh,npolygons) + !------------------------------------------------------------------------------------! + ! The number of years of landuse data calculated at read-in of data during ! + ! landuse_init. ! + !------------------------------------------------------------------------------------! + integer ,pointer ,dimension(:) :: num_landuse_years + !----- The vectorized landuse matrix is allocated in landuse_init. ------------------! + type(lutime), pointer,dimension(:,:) :: clutimes !(luyears,nsites) + !----- Minimum DBH and probability of being harvest when selective logging happens. -! + real , pointer, dimension(:,:) :: mindbh_primary + real , pointer, dimension(:,:) :: probharv_primary + real , pointer, dimension(:,:) :: mindbh_secondary + real , pointer, dimension(:,:) :: probharv_secondary + !------------------------------------------------------------------------------------! - ! Polygon above-ground biomass [kgC/m2] - real,pointer,dimension(:,:,:) :: agb !(n_pft,n_dbh,npolygons) - ! Polygon plant density [plant/m2] - real,pointer, dimension(:,:,:) :: pldens !(n_pft,n_dbh,npolygons) - ! Seed biomass [kgC/m2] - real,pointer, dimension(:,:,:) :: bseeds !(n_pft,n_dbh,npolygons) + !----------------------------------- + ! FORESTRY + !----------------------------------- + ! is the site under plantation management? (1=yes, 0=no) + integer,pointer,dimension(:) :: plantation ! initialized to zero in site creation - ! ------------------------------------------ - ! Diagnostic variables - !------------------------------------------- - - real,pointer,dimension(:) :: avg_rshort_gnd ! Total absorbed radiation at the ground - real,pointer,dimension(:) :: avg_par_gnd ! Total absorbed PAR at the ground - real,pointer,dimension(:) :: avg_rlong_gnd ! Total absorbed radiation at the ground - real,pointer,dimension(:) :: avg_ustar ! Average u* [ m/s] - real,pointer,dimension(:) :: avg_tstar ! Average Theta* [ K] - real,pointer,dimension(:) :: avg_qstar ! Average q* [ kg/kg] - real,pointer,dimension(:) :: avg_cstar ! Average CO2* [ umol/mol] - real,pointer,dimension(:) :: avg_carbon_ac ! Vegetation to Canopy carbon dioxide flux - real,pointer,dimension(:) :: avg_carbon_st ! Canopy carbon dioxide storage - !----- Moisture Flux ---------------------------- - - real,pointer,dimension(:) :: avg_vapor_lc ! Leaf to canopy air water flux - real,pointer,dimension(:) :: avg_vapor_wc ! wood to canopy air water flux - real,pointer,dimension(:) :: avg_vapor_gc ! Ground to canopy air latent heat flux [kg/m2/s] - real,pointer,dimension(:) :: avg_wshed_vg ! Water shedding from the leaves - real,pointer,dimension(:) :: avg_intercepted ! Intercepted - real,pointer,dimension(:) :: avg_throughfall ! Throughfall - real,pointer,dimension(:) :: avg_vapor_ac ! Canopy to atmosphere water flux [kg/m2/s] - real,pointer,dimension(:) :: avg_transp ! Transpiration - real,pointer,dimension(:) :: avg_evap ! Evaporation - real,pointer,dimension(:,:) :: avg_smoist_gg ! Moisture flux between layers - real,pointer,dimension(:,:) :: avg_transloss ! Trabspired soil moisture sink - real,pointer,dimension(:) :: avg_runoff ! Total runoff - real,pointer,dimension(:) :: avg_drainage ! Total drainage through the soil bottom - real,pointer,dimension(:) :: avg_drainage_heat ! Total drainage internal heat loss - - !----- LAI, and WAI -----------------------------------------------------! - real,pointer,dimension(:) :: lai - real,pointer,dimension(:) :: avg_lma - real,pointer,dimension(:) :: wai - - - !----- Sensible heat Flux -----------------------------------------------! - - real,pointer,dimension(:) :: avg_sensible_lc ! Leaf to Canopy sensible heat flux - real,pointer,dimension(:) :: avg_sensible_wc ! wood to Canopy sensible heat flux - real,pointer,dimension(:) :: avg_qwshed_vg ! Internal energy of leaf water shedding - real,pointer,dimension(:) :: avg_qintercepted ! Internal energy of intercepted precipitation - real,pointer,dimension(:) :: avg_qthroughfall ! Internal energy of intercepted precipitation - real,pointer,dimension(:) :: avg_sensible_gc ! Ground to canopy air sensible heat flux - real,pointer,dimension(:) :: avg_sensible_ac ! Canopy to atmosphere sensible heat flux - real,pointer,dimension(:,:) :: avg_sensible_gg ! Net soil heat flux between layers - real,pointer,dimension(:) :: avg_runoff_heat ! Total runoff internal energy flux - - !----- Mass and Energy --------------------------------------------------! - - ! New variables for testing the model stability - real,pointer,dimension(:) :: max_leaf_temp - real,pointer,dimension(:) :: min_leaf_temp - real,pointer,dimension(:) :: max_wood_temp - real,pointer,dimension(:) :: min_wood_temp - real,pointer,dimension(:) :: max_soil_temp - real,pointer,dimension(:) :: min_soil_temp - !----- Mass and Energy ---------------------------------------------------------------! - real,pointer,dimension(:) :: avg_leaf_energy ! Average leaf internal energy [ J/m2] - real,pointer,dimension(:) :: avg_leaf_temp ! Average leaf temperature [ K] - real,pointer,dimension(:) :: avg_leaf_vpdef ! Average leaf VPD [ Pa] - real,pointer,dimension(:) :: avg_leaf_fliq ! Avg. liq. frac. of leaf water [ ---] - real,pointer,dimension(:) :: avg_leaf_water ! Avg. water on top of leaves [ kg/m2] - real,pointer,dimension(:) :: avg_leaf_hcap ! Avg. leaf heat capacity [J/m2/K] - real,pointer,dimension(:) :: avg_wood_energy ! Average wood internal energy [ J/m2] - real,pointer,dimension(:) :: avg_wood_temp ! Average wood temperature [ K] - real,pointer,dimension(:) :: avg_wood_fliq ! Avg. liq. frac. of wood water [ ---] - real,pointer,dimension(:) :: avg_wood_water ! Avg. water on top of woods [ kg/m2] - real,pointer,dimension(:) :: avg_wood_hcap ! Avg. wood heat capacity [J/m2/K] + ! Upon creating an agriculture patch in this site, stock it with this + ! PFT. Set, along with the other stocking parameters, in + ! init_ed_site_vars(). + integer,pointer,dimension(:) :: agri_stocking_pft - real,pointer,dimension(:) :: avg_can_temp - real,pointer,dimension(:) :: avg_can_shv - real,pointer,dimension(:) :: avg_can_co2 - real,pointer,dimension(:) :: avg_can_rhos - real,pointer,dimension(:) :: avg_can_prss - real,pointer,dimension(:) :: avg_can_theta - real,pointer,dimension(:) :: avg_can_theiv - real,pointer,dimension(:) :: avg_can_vpdef - real,pointer,dimension(:) :: avg_can_depth - - real,pointer,dimension(:,:) :: avg_soil_energy - real,pointer,dimension(:,:) :: avg_soil_mstpot - real,pointer,dimension(:,:) :: avg_soil_water - real,pointer,dimension(:,:) :: avg_soil_temp - real,pointer,dimension(:,:) :: avg_soil_fracliq - real,pointer,dimension(:,:) :: avg_soil_rootfrac + ! Upon creating an agriculture patch in this site, stock it with + ! this density of plants [plants/m2] + real,pointer,dimension(:) :: agri_stocking_density - real,pointer,dimension(:) :: avg_soil_wetness - real,pointer,dimension(:) :: avg_skin_temp - real,pointer,dimension(:) :: avg_available_water - - - real,pointer,dimension(:) :: avg_sfcw_depth !sfcwater_depth - real,pointer,dimension(:) :: avg_sfcw_energy !sfcwater_mass - real,pointer,dimension(:) :: avg_sfcw_mass !sfcwater_mass - real,pointer,dimension(:) :: avg_sfcw_tempk !sfcwater_tempk - real,pointer,dimension(:) :: avg_sfcw_fracliq !sfcwater_fracliq - real,pointer,dimension(:) :: avg_bdead - real,pointer,dimension(:) :: avg_balive - real,pointer,dimension(:) :: avg_bleaf - real,pointer,dimension(:) :: avg_broot - real,pointer,dimension(:) :: avg_bsapwooda - real,pointer,dimension(:) :: avg_bsapwoodb - real,pointer,dimension(:) :: avg_bseeds - real,pointer,dimension(:) :: avg_bstorage - real,pointer,dimension(:) :: avg_fsc - real,pointer,dimension(:) :: avg_ssc - real,pointer,dimension(:) :: avg_stsc - - real,pointer,dimension(:) :: avg_fsn - real,pointer,dimension(:) :: avg_msn - - !-------- TOTAL CARBON AND NITROGEN POOLS --------------- - ! Added by MCD for NCEAS/FACE intercomparison (Apr 7 2009) - real,pointer,dimension(:) :: Cleaf - real,pointer,dimension(:) :: Croot - real,pointer,dimension(:) :: Cstore - real,pointer,dimension(:) :: Ccwd - real,pointer,dimension(:) :: Nleaf - real,pointer,dimension(:) :: Ndead - real,pointer,dimension(:) :: Nroot - real,pointer,dimension(:) :: Nstore - real,pointer,dimension(:) :: Ncwd + ! Upon creating a plantation patch in this site, stock it with this PFT + integer,pointer,dimension(:) :: plantation_stocking_pft + ! Upon creating an plantation patch in this site, stock it with + ! this density of plants [plants/m2] + real,pointer,dimension(:) :: plantation_stocking_density + + ! Unapplied primary forest harvest from previous years (save until + ! harvest is above minimum threshold.) [kgC/m2]. Initialized + ! together with secondary memory in init_ed_site_vars(). + real,pointer,dimension(:) :: primary_harvest_memory - !-------- TOTAL CARBON AND NITROGEN FLUX --------------- - ! Added by MCD for NCEAS/FACE intercomparison (Apr 7 2009) - real,pointer,dimension(:) :: Cleaf_grow - real,pointer,dimension(:) :: Croot_grow - real,pointer,dimension(:) :: Cdead_grow - real,pointer,dimension(:) :: Cstore_grow - real,pointer,dimension(:) :: Cleaf_litter_flux - real,pointer,dimension(:) :: Croot_litter_flux - real,pointer,dimension(:) :: Ccwd_flux - real,pointer,dimension(:) :: Nleaf_grow - real,pointer,dimension(:) :: Ndead_grow - real,pointer,dimension(:) :: Nroot_grow - real,pointer,dimension(:) :: Nstore_grow - real,pointer,dimension(:) :: Nleaf_litter_flux - real,pointer,dimension(:) :: Nroot_litter_flux - real,pointer,dimension(:) :: Ncwd_flux - real,pointer,dimension(:) :: Nbiomass_uptake - real,pointer,dimension(:) :: Ngross_min - real,pointer,dimension(:) :: Nnet_min - - !----- Meteorologic Conditions ----------------------------------------------------! - real,pointer,dimension(:) :: avg_atm_tmp - real,pointer,dimension(:) :: avg_atm_vpdef - real,pointer,dimension(:) :: avg_atm_shv - real,pointer,dimension(:) :: avg_rshort - real,pointer,dimension(:) :: avg_rshort_diffuse - real,pointer,dimension(:) :: avg_par - real,pointer,dimension(:) :: avg_par_diffuse - real,pointer,dimension(:) :: avg_rlong - real,pointer,dimension(:) :: avg_pcpg - real,pointer,dimension(:) :: avg_qpcpg - real,pointer,dimension(:) :: avg_dpcpg - real,pointer,dimension(:) :: avg_vels - real,pointer,dimension(:) :: avg_atm_prss - real,pointer,dimension(:) :: avg_exner - real,pointer,dimension(:) :: avg_geoht - real,pointer,dimension(:) :: avg_atm_co2 - real,pointer,dimension(:) :: avg_albedo - real,pointer,dimension(:) :: avg_albedo_beam - real,pointer,dimension(:) :: avg_albedo_diffuse - real,pointer,dimension(:) :: avg_rlong_albedo - real,pointer,dimension(:) :: avg_rlongup - real,pointer,dimension(:) :: avg_parup - real,pointer,dimension(:) :: avg_nirup - real,pointer,dimension(:) :: avg_rshortup - real,pointer,dimension(:) :: avg_rnet - real,pointer,dimension(:,:,:) :: avg_lai_ebalvars ! This diagnostic partitions energy flux - ! variables into LAI regimes. - ! The matrix is arranged as follows - ! (LAI,VARIABLE,POLYGON) - ! Where LAI is (<2.0,2-4,>4) - ! Where Variable is (RNET,LHF,SHF,CANTEMP) - real,pointer,dimension(:) :: avg_gpp - real,pointer,dimension(:) :: avg_leaf_resp - real,pointer,dimension(:) :: avg_root_resp - real,pointer,dimension(:) :: avg_growth_resp - real,pointer,dimension(:) :: avg_storage_resp - real,pointer,dimension(:) :: avg_vleaf_resp - real,pointer,dimension(:) :: avg_plant_resp - real,pointer,dimension(:) :: avg_htroph_resp - real,pointer,dimension(:) :: avg_cwd_resp - real,pointer,dimension(:) :: avg_leaf_drop - real,pointer,dimension(:) :: avg_leaf_maintenance - real,pointer,dimension(:) :: avg_root_maintenance - real,pointer,dimension(:) :: avg_nppleaf - real,pointer,dimension(:) :: avg_nppfroot - real,pointer,dimension(:) :: avg_nppsapwood - real,pointer,dimension(:) :: avg_nppcroot - real,pointer,dimension(:) :: avg_nppseeds - real,pointer,dimension(:) :: avg_nppwood - real,pointer,dimension(:) :: avg_nppdaily - - - !-------------------------------------------------------------------! - ! These variables carry the daily mean, and are allocated only when ! - ! daily or monthly means are requested by the user. For now only ! - ! polygon-level averages are available, and these are (almost) the ! - ! same as the old structure, now only at the polygon level. This is ! - ! not a requirement at all, if you feel like looking at daily means ! - ! of site/patch/cohort level variables, feel free to include them. ! - !-------------------------------------------------------------------! - - real, pointer, dimension(:) :: dmean_pcpg ! [ kg/m²/s] - real, pointer, dimension(:) :: dmean_runoff ! [ kg/m²/s] - real, pointer, dimension(:) :: dmean_drainage ! [ kg/m²/s] - real, pointer, dimension(:) :: dmean_evap ! [ kg/m²/s] - real, pointer, dimension(:) :: dmean_transp ! [ kg/m²/s] - real, pointer, dimension(:) :: dmean_vapor_lc ! [ kg/m²/s] - real, pointer, dimension(:) :: dmean_vapor_wc ! [ kg/m²/s] - real, pointer, dimension(:) :: dmean_vapor_gc ! [ kg/m²/s] - real, pointer, dimension(:) :: dmean_vapor_ac ! [ kg/m²/s] - real, pointer, dimension(:) :: dmean_sensible_lc ! [ W/m2] - real, pointer, dimension(:) :: dmean_sensible_wc ! [ W/m2] - real, pointer, dimension(:) :: dmean_sensible_gc ! [ W/m2] - real, pointer, dimension(:) :: dmean_sensible_ac ! [ W/m2] - real, pointer, dimension(:) :: dmean_ustar ! [ m/s] - real, pointer, dimension(:) :: dmean_tstar ! [ K] - real, pointer, dimension(:) :: dmean_qstar ! [ kg/kg] - real, pointer, dimension(:) :: dmean_cstar ! [ umol/mol] - real, pointer, dimension(:) :: dmean_carbon_ac ! [ umol/m²/s] - real, pointer, dimension(:) :: dmean_carbon_st ! [ umol/m²/s] - real, pointer, dimension(:) :: dmean_gpp ! [ kgC/m²/yr] - real, pointer, dimension(:) :: dmean_nep ! [ kgC/m²/yr] - real, pointer, dimension(:) :: dmean_plresp ! [ kgC/m²/yr] - real, pointer, dimension(:) :: dmean_rh ! [ kgC/m²/yr] - real, pointer, dimension(:) :: dmean_cwd_rh ! [ kgC/m²/yr] - real, pointer, dimension(:) :: dmean_leaf_resp ! [ kgC/m²/yr] - real, pointer, dimension(:) :: dmean_root_resp ! [ kgC/m²/yr] - real, pointer, dimension(:) :: dmean_growth_resp ! [ kgC/m²/yr] - real, pointer, dimension(:) :: dmean_storage_resp ! [ kgC/m²/yr] - real, pointer, dimension(:) :: dmean_vleaf_resp ! [ kgC/m²/yr] - - real, pointer, dimension(:) :: dmean_nppleaf - real, pointer, dimension(:) :: dmean_nppfroot - real, pointer, dimension(:) :: dmean_nppsapwood - real, pointer, dimension(:) :: dmean_nppcroot - real, pointer, dimension(:) :: dmean_nppseeds - real, pointer, dimension(:) :: dmean_nppwood - real, pointer, dimension(:) :: dmean_nppdaily - - real, pointer, dimension(:,:) :: dmean_soil_temp !(nzg,npolygons) - real, pointer, dimension(:,:) :: dmean_soil_water !(nzg,npolygons) - real, pointer, dimension(:,:) :: dmean_soil_mstpot !(nzg,npolygons) - real, pointer, dimension(:,:) :: dmean_transloss !(nzg,npolygons) - real, pointer, dimension(:) :: dmean_fs_open - real, pointer, dimension(:) :: dmean_fsw - real, pointer, dimension(:) :: dmean_fsn - real, pointer, dimension(:) :: dmean_can_temp ! (npolygons) - real, pointer, dimension(:) :: dmean_can_shv ! (npolygons) - real, pointer, dimension(:) :: dmean_can_co2 ! (npolygons) - real, pointer, dimension(:) :: dmean_can_rhos ! (npolygons) - real, pointer, dimension(:) :: dmean_can_prss ! (npolygons) - real, pointer, dimension(:) :: dmean_can_theta ! (npolygons) - real, pointer, dimension(:) :: dmean_can_theiv ! (npolygons) - real, pointer, dimension(:) :: dmean_can_vpdef ! (npolygons) - real, pointer, dimension(:) :: dmean_gnd_temp ! (npolygons) - real, pointer, dimension(:) :: dmean_gnd_shv ! (npolygons) - real, pointer, dimension(:) :: dmean_leaf_energy ! (npolygons) - real, pointer, dimension(:) :: dmean_leaf_water ! (npolygons) - real, pointer, dimension(:) :: dmean_leaf_hcap ! (npolygons) - real, pointer, dimension(:) :: dmean_leaf_temp ! (npolygons) - real, pointer, dimension(:) :: dmean_leaf_vpdef ! (npolygons) - real, pointer, dimension(:) :: dmean_wood_energy ! (npolygons) - real, pointer, dimension(:) :: dmean_wood_water ! (npolygons) - real, pointer, dimension(:) :: dmean_wood_hcap ! (npolygons) - real, pointer, dimension(:) :: dmean_wood_temp ! (npolygons) - real, pointer, dimension(:) :: dmean_atm_temp ! (npolygons) - real, pointer, dimension(:) :: dmean_atm_vpdef ! (npolygons) - real, pointer, dimension(:) :: dmean_atm_shv ! (npolygons) - real, pointer, dimension(:) :: dmean_atm_co2 ! (npolygons) - real, pointer, dimension(:) :: dmean_atm_prss ! (npolygons) - real, pointer, dimension(:) :: dmean_atm_vels ! (npolygons) - real, pointer, dimension(:) :: dmean_rshort ! (npolygons) - real, pointer, dimension(:) :: dmean_rshort_diff ! (npolygons) - real, pointer, dimension(:) :: dmean_par ! (npolygons) - real, pointer, dimension(:) :: dmean_par_diff ! (npolygons) - real, pointer, dimension(:) :: dmean_rlong ! (npolygons) - real, pointer, dimension(:) :: dmean_rshort_gnd ! (npolygons) - real, pointer, dimension(:) :: dmean_par_gnd ! (npolygons) - real, pointer, dimension(:) :: dmean_rlong_gnd ! (npolygons) - real, pointer, dimension(:) :: dmean_albedo ! (npolygons) - real, pointer, dimension(:) :: dmean_albedo_beam ! (npolygons) - real, pointer, dimension(:) :: dmean_albedo_diffuse! (npolygons) - real, pointer, dimension(:) :: dmean_rlong_albedo ! (npolygons) - real, pointer, dimension(:) :: dmean_rlongup ! (npolygons) - real, pointer, dimension(:) :: dmean_parup ! (npolygons) - real, pointer, dimension(:) :: dmean_nirup ! (npolygons) - real, pointer, dimension(:) :: dmean_rshortup ! (npolygons) - real, pointer, dimension(:) :: dmean_rnet ! (npolygons) - - real, pointer, dimension(:,:) :: qmean_pcpg ! [ kg/m²/s] - real, pointer, dimension(:,:) :: qmean_runoff ! [ kg/m²/s] - real, pointer, dimension(:,:) :: qmean_drainage ! [ kg/m²/s] - real, pointer, dimension(:,:) :: qmean_evap ! [ kg/m²/s] - real, pointer, dimension(:,:) :: qmean_transp ! [ kg/m²/s] - real, pointer, dimension(:,:) :: qmean_vapor_lc ! [ kg/m²/s] - real, pointer, dimension(:,:) :: qmean_vapor_wc ! [ kg/m²/s] - real, pointer, dimension(:,:) :: qmean_vapor_gc ! [ kg/m²/s] - real, pointer, dimension(:,:) :: qmean_vapor_ac ! [ kg/m²/s] - real, pointer, dimension(:,:) :: qmean_sensible_lc ! [ W/m2] - real, pointer, dimension(:,:) :: qmean_sensible_wc ! [ W/m2] - real, pointer, dimension(:,:) :: qmean_sensible_gc ! [ W/m2] - real, pointer, dimension(:,:) :: qmean_sensible_ac ! [ W/m2] - real, pointer, dimension(:,:) :: qmean_ustar ! [ m/s] - real, pointer, dimension(:,:) :: qmean_tstar ! [ K] - real, pointer, dimension(:,:) :: qmean_qstar ! [ kg/kg] - real, pointer, dimension(:,:) :: qmean_cstar ! [ umol/mol] - real, pointer, dimension(:,:) :: qmean_carbon_ac ! [ umol/m²/s] - real, pointer, dimension(:,:) :: qmean_carbon_st ! [ umol/m²/s] - real, pointer, dimension(:,:) :: qmean_gpp ! [ kgC/m²/yr] - real, pointer, dimension(:,:) :: qmean_nep ! [ kgC/m²/yr] - real, pointer, dimension(:,:) :: qmean_plresp ! [ kgC/m²/yr] - real, pointer, dimension(:,:) :: qmean_rh ! [ kgC/m²/yr] - real, pointer, dimension(:,:) :: qmean_cwd_rh ! [ kgC/m²/yr] - real, pointer, dimension(:,:) :: qmean_leaf_resp ! [ kgC/m²/yr] - real, pointer, dimension(:,:) :: qmean_root_resp ! [ kgC/m²/yr] - - real, pointer, dimension(:,:,:) :: qmean_soil_temp ! (nzg,ndcycle,npolygons) - real, pointer, dimension(:,:,:) :: qmean_soil_water ! (nzg,ndcycle,npolygons) - real, pointer, dimension(:,:,:) :: qmean_soil_mstpot ! (nzg,ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_fs_open ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_fsw ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_fsn ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_can_temp ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_can_shv ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_can_co2 ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_can_rhos ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_can_prss ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_can_theta ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_can_theiv ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_can_vpdef ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_gnd_temp ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_gnd_shv ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_leaf_energy ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_leaf_water ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_leaf_hcap ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_leaf_temp ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_leaf_vpdef ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_wood_energy ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_wood_water ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_wood_hcap ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_wood_temp ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_atm_temp ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_atm_vpdef ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_atm_shv ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_atm_co2 ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_atm_prss ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_atm_vels ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_rshort ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_rshort_diff ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_par ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_par_diff ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_rlong ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_rshort_gnd ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_par_gnd ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_rlong_gnd ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_albedo ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_albedo_beam ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_albedo_diffuse ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_rlong_albedo ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_rlongup ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_parup ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_nirup ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_rshortup ! (ndcycle,npolygons) - real, pointer, dimension(:,:) :: qmean_rnet ! (ndcycle,npolygons) - - !-------------------------------------------------------------------------------------! - ! These variables have the monthly mean square, We save this instead of the standard ! - ! deviation because we can aggregate several months after the output. ! - !-------------------------------------------------------------------------------------! - real, pointer, dimension(:,:) :: qmsqu_gpp - real, pointer, dimension(:,:) :: qmsqu_leaf_resp - real, pointer, dimension(:,:) :: qmsqu_root_resp - real, pointer, dimension(:,:) :: qmsqu_plresp - real, pointer, dimension(:,:) :: qmsqu_carbon_ac - real, pointer, dimension(:,:) :: qmsqu_carbon_st - real, pointer, dimension(:,:) :: qmsqu_nep - real, pointer, dimension(:,:) :: qmsqu_rh - real, pointer, dimension(:,:) :: qmsqu_cwd_rh - real, pointer, dimension(:,:) :: qmsqu_sensible_ac - real, pointer, dimension(:,:) :: qmsqu_sensible_lc - real, pointer, dimension(:,:) :: qmsqu_sensible_wc - real, pointer, dimension(:,:) :: qmsqu_sensible_gc - real, pointer, dimension(:,:) :: qmsqu_evap - real, pointer, dimension(:,:) :: qmsqu_transp - real, pointer, dimension(:,:) :: qmsqu_vapor_ac - real, pointer, dimension(:,:) :: qmsqu_vapor_lc - real, pointer, dimension(:,:) :: qmsqu_vapor_wc - real, pointer, dimension(:,:) :: qmsqu_vapor_gc - real, pointer, dimension(:,:) :: qmsqu_ustar - real, pointer, dimension(:,:) :: qmsqu_rlongup - real, pointer, dimension(:,:) :: qmsqu_parup - real, pointer, dimension(:,:) :: qmsqu_nirup - real, pointer, dimension(:,:) :: qmsqu_rshortup - real, pointer, dimension(:,:) :: qmsqu_rnet - real, pointer, dimension(:,:) :: qmsqu_albedo - - ! Daily average residuals - real, pointer, dimension(:) :: dmean_co2_residual ! [umol_CO2/m2] - real, pointer, dimension(:) :: dmean_energy_residual ! [J/m2] - real, pointer, dimension(:) :: dmean_water_residual ! [kg_H20/m2] - ! Monthly average residuals - real, pointer, dimension(:) :: mmean_co2_residual ! [umol_CO2/m2] - real, pointer, dimension(:) :: mmean_energy_residual ! [J/m2] - real, pointer, dimension(:) :: mmean_water_residual ! [kg_H20/m2] - - !-------------------------------------------------------------------! - ! These are variables updated at a daily basis, so they are not ! - ! averages but they are written at the daily analysis ! - !-------------------------------------------------------------------! - real, pointer, dimension(:,:) :: lai_pft ! (n_pft , npolygons) - real, pointer, dimension(:,:) :: wai_pft ! (n_pft , npolygons) - real, pointer, dimension(:,:) :: dmean_gpp_dbh !(n_dbh ,npolygons) - - - !-------------------------------------------------------------------! - ! These are variables updated at a monthly basis, so they are not ! - ! averages but they are written at the monthly analysis ! - !-------------------------------------------------------------------! - real, pointer, dimension(:,:) :: agb_pft !(n_pft ,npolygons), kgC/m2 - real, pointer, dimension(:,:) :: ba_pft !(n_pft ,npolygons), cm2/m2 - real, pointer, dimension(:,:) :: bseeds_pft !(n_pft ,npolygons), kgC/m2 - - real, pointer, dimension(:,:) :: mmean_gpp_dbh !(n_dbh ,npolygons) - real, pointer, dimension(:,:) :: mmean_lai_pft !(n_pft ,npolygons) - real, pointer, dimension(:,:) :: mmean_wai_pft !(n_pft ,npolygons) - - !-------------------------------------------------------------------! - ! These variables carry the montlhly mean, and are allocated only ! - ! when monthly means are requested by the user. For now only ! - ! polygon-level averages are available, and these are (almost) the ! - ! same as the old structure, now only at the polygon level. This is ! - ! not a requirement at all, if you feel like looking at daily means ! - ! of site/patch/cohort level variables, feel free to include them. ! - !-------------------------------------------------------------------! - real, pointer, dimension(:) :: mmean_pcpg ! [ kg/m²/s] - real, pointer, dimension(:) :: mmean_runoff ! [ kg/m²/s] - real, pointer, dimension(:) :: mmean_drainage ! [ kg/m²/s] - real, pointer, dimension(:) :: mmean_evap ! [ kg/m²/s] - real, pointer, dimension(:) :: mmean_transp ! [ kg/m²/s] - real, pointer, dimension(:) :: mmean_vapor_lc ! [ kg/m²/s] - real, pointer, dimension(:) :: mmean_vapor_wc ! [ kg/m²/s] - real, pointer, dimension(:) :: mmean_vapor_gc ! [ kg/m²/s] - real, pointer, dimension(:) :: mmean_vapor_ac ! [ kg/m²/s] - real, pointer, dimension(:) :: mmean_sensible_lc ! [ W/m²] - real, pointer, dimension(:) :: mmean_sensible_wc ! [ W/m²] - real, pointer, dimension(:) :: mmean_sensible_gc ! [ W/m²] - real, pointer, dimension(:) :: mmean_sensible_ac ! [ W/m²] - real, pointer, dimension(:) :: mmean_ustar ! [ m/s] - real, pointer, dimension(:) :: mmean_tstar ! [ K] - real, pointer, dimension(:) :: mmean_qstar ! [ kg/kg] - real, pointer, dimension(:) :: mmean_cstar ! [ umol/mol] - real, pointer, dimension(:) :: mmean_carbon_ac ! [ umol/m²/s] - real, pointer, dimension(:) :: mmean_carbon_st ! [ umol/m²/s] - real, pointer, dimension(:) :: mmean_gpp ! [ kgC/m²/yr] - real, pointer, dimension(:) :: mmean_nppleaf ! [ kgC/m²/yr] - real, pointer, dimension(:) :: mmean_nppfroot ! [ kgC/m²/yr] - real, pointer, dimension(:) :: mmean_nppsapwood ! [ kgC/m²/yr] - real, pointer, dimension(:) :: mmean_nppcroot ! [ kgC/m²/yr] - real, pointer, dimension(:) :: mmean_nppseeds ! [ kgC/m²/yr] - real, pointer, dimension(:) :: mmean_nppwood ! [ kgC/m²/yr] - real, pointer, dimension(:) :: mmean_nppdaily ! [ kgC/m²/yr] - real, pointer, dimension(:) :: mmean_nep ! [ kgC/m²/yr] - real, pointer, dimension(:) :: mmean_plresp ! [ kgC/m²/yr] - real, pointer, dimension(:) :: mmean_rh ! [ kgC/m²/yr] - real, pointer, dimension(:) :: mmean_cwd_rh ! [ kgC/m²/yr] - real, pointer, dimension(:) :: mmean_leaf_resp ! [ kgC/m²/yr] - real, pointer, dimension(:) :: mmean_root_resp ! [ kgC/m²/yr] - real, pointer, dimension(:) :: mmean_growth_resp ! [ kgC/m²/yr] - real, pointer, dimension(:) :: mmean_storage_resp ! [ kgC/m²/yr] - real, pointer, dimension(:) :: mmean_vleaf_resp ! [ kgC/m²/yr] - real, pointer, dimension(:,:) :: mmean_soil_temp !(nzg,npolygons) - real, pointer, dimension(:,:) :: mmean_soil_water !(nzg,npolygons) - real, pointer, dimension(:,:) :: mmean_soil_mstpot !(nzg,npolygons) - real, pointer, dimension(:,:) :: mmean_transloss !(nzg,npolygons) - real, pointer, dimension(:) :: mmean_fs_open - real, pointer, dimension(:) :: mmean_fsw - real, pointer, dimension(:) :: mmean_fsn - - real, pointer, dimension(:) :: mmean_can_temp ! (npolygons) - real, pointer, dimension(:) :: mmean_can_shv ! (npolygons) - real, pointer, dimension(:) :: mmean_can_co2 ! (npolygons) - real, pointer, dimension(:) :: mmean_can_rhos ! (npolygons) - real, pointer, dimension(:) :: mmean_can_prss ! (npolygons) - real, pointer, dimension(:) :: mmean_can_theta ! (npolygons) - real, pointer, dimension(:) :: mmean_can_theiv ! (npolygons) - real, pointer, dimension(:) :: mmean_can_vpdef ! (npolygons) - real, pointer, dimension(:) :: mmean_gnd_temp ! (npolygons) - real, pointer, dimension(:) :: mmean_gnd_shv ! (npolygons) - real, pointer, dimension(:) :: mmean_leaf_energy ! (npolygons) - real, pointer, dimension(:) :: mmean_leaf_water ! (npolygons) - real, pointer, dimension(:) :: mmean_leaf_temp ! (npolygons) - real, pointer, dimension(:) :: mmean_leaf_vpdef ! (npolygons) - real, pointer, dimension(:) :: mmean_leaf_hcap ! (npolygons) - real, pointer, dimension(:) :: mmean_wood_energy ! (npolygons) - real, pointer, dimension(:) :: mmean_wood_water ! (npolygons) - real, pointer, dimension(:) :: mmean_wood_temp ! (npolygons) - real, pointer, dimension(:) :: mmean_wood_hcap ! (npolygons) - real, pointer, dimension(:) :: mmean_atm_temp ! (npolygons) - real, pointer, dimension(:) :: mmean_atm_vpdef ! (npolygons) - real, pointer, dimension(:) :: mmean_rshort ! (npolygons) - real, pointer, dimension(:) :: mmean_rshort_diff ! (npolygons) - real, pointer, dimension(:) :: mmean_par ! (npolygons) - real, pointer, dimension(:) :: mmean_par_diff ! (npolygons) - real, pointer, dimension(:) :: mmean_rlong ! (npolygons) - real, pointer, dimension(:) :: mmean_rshort_gnd ! (npolygons) - real, pointer, dimension(:) :: mmean_par_gnd ! (npolygons) - real, pointer, dimension(:) :: mmean_rlong_gnd ! (npolygons) - real, pointer, dimension(:) :: mmean_atm_shv ! (npolygons) - real, pointer, dimension(:) :: mmean_atm_co2 ! (npolygons) - real, pointer, dimension(:) :: mmean_atm_prss ! (npolygons) - real, pointer, dimension(:) :: mmean_atm_vels ! (npolygons) - real, pointer, dimension(:) :: mmean_albedo ! (npolygons) - real, pointer, dimension(:) :: mmean_albedo_beam ! (npolygons) - real, pointer, dimension(:) :: mmean_albedo_diffuse ! (npolygons) - real, pointer, dimension(:) :: mmean_rlong_albedo ! (npolygons) - real, pointer, dimension(:) :: mmean_rlongup ! (npolygons) - real, pointer, dimension(:) :: mmean_parup ! (npolygons) - real, pointer, dimension(:) :: mmean_nirup ! (npolygons) - real, pointer, dimension(:) :: mmean_rshortup ! (npolygons) - real, pointer, dimension(:) :: mmean_rnet ! (npolygons) - - !-------------------------------------------------------------------------------------! - ! These variables have the monthly mean square, We save this instead of the standard ! - ! deviation because we can aggregate several months afterwards. ! - !-------------------------------------------------------------------------------------! - real, pointer, dimension(:) :: mmsqu_gpp - real, pointer, dimension(:) :: mmsqu_leaf_resp - real, pointer, dimension(:) :: mmsqu_root_resp - real, pointer, dimension(:) :: mmsqu_plresp - real, pointer, dimension(:) :: mmsqu_carbon_ac - real, pointer, dimension(:) :: mmsqu_carbon_st - real, pointer, dimension(:) :: mmsqu_nep - real, pointer, dimension(:) :: mmsqu_rh - real, pointer, dimension(:) :: mmsqu_cwd_rh - real, pointer, dimension(:) :: mmsqu_sensible_ac - real, pointer, dimension(:) :: mmsqu_sensible_lc - real, pointer, dimension(:) :: mmsqu_sensible_wc - real, pointer, dimension(:) :: mmsqu_sensible_gc - real, pointer, dimension(:) :: mmsqu_evap - real, pointer, dimension(:) :: mmsqu_transp - real, pointer, dimension(:) :: mmsqu_vapor_ac - real, pointer, dimension(:) :: mmsqu_vapor_lc - real, pointer, dimension(:) :: mmsqu_vapor_wc - real, pointer, dimension(:) :: mmsqu_vapor_gc - real, pointer, dimension(:) :: mmsqu_ustar - real, pointer, dimension(:) :: mmsqu_rlongup - real, pointer, dimension(:) :: mmsqu_parup - real, pointer, dimension(:) :: mmsqu_nirup - real, pointer, dimension(:) :: mmsqu_rshortup - real, pointer, dimension(:) :: mmsqu_rnet - real, pointer, dimension(:) :: mmsqu_albedo - - - !----- Disturbance rates. ----------------------------------------------! - real, pointer, dimension(:,:,:) :: disturbance_rates - - !-----------------------------------------------------------------------! - ! This variable storages the workload of this polygon, and this is ! - ! "measured" by the total number of Runge-Kutta time steps this polygon ! - ! takes on average every day. This is not averaged by patch, instead ! - ! this is added (because having two patches is computationally more ! - ! expensive than having one). Since the number of patches changes by ! - ! season, and this may be dramatically different, we store the previous ! - ! 12 months. ! - !-----------------------------------------------------------------------! - real, pointer, dimension(:,:) :: workload - - end type edtype -!============================================================================! -!============================================================================! - - - - - -!============================================================================! -!============================================================================! - !----------------------------------------------! - ! GLOBAL VARIABLES - - - - !------------------------------------------------------------------------------------! - ! These variables are allocated and assigned before the parallel distribution, so we ! - ! don't want to keep it inside the structure. In case of serial runs, we should have ! - ! offset full of zeroes and the polygons numbered from 1 to the number of polygons. ! - ! In a non-POI parallel run, we want to allocate "mpolygons" in each node, but then ! - ! we need to keep track of the actual polygon "ID" to write the output correctly. ! - !------------------------------------------------------------------------------------! - - ! Number of polygons in each grid, for each machine. so this has a ngrids size. - integer, dimension(maxmach,maxgrds) :: gdpy - - ! Number of sites in each grid, for each machine. - integer, dimension(maxmach,maxgrds) :: gdsi + ! Unapplied secondary forest harvest from previous years (save until + ! harvest is above minimum threshold.) [kgC/m2] + real ,pointer,dimension(:):: secondary_harvest_memory + + + !----------------------------------- + ! FIRE + !----------------------------------- + ! site average fire disturbance rate + real,pointer,dimension(:) :: fire_disturbance_rate + ! total fuel in the dry patches + real,pointer,dimension(:) :: ignition_rate + + real,pointer, dimension(:,:) :: lambda_fire ! initialized in create_site !(12,nsites) + ! Monthly rainfall [mm/month] for each month over the past 12 months. + real,pointer,dimension(:,:) :: avg_monthly_pcpg + + type(prescribed_phen),pointer, dimension(:) :: phen_pars + + !----------------------------------- + ! DISTURBANCE + !----------------------------------- + ! rate of natural disturbance + real,pointer, dimension(:) :: nat_disturbance_rate + + ! disturbance dist_type id: + ! dist_type = 0 if treefall was last disturbance + ! dist_type = 1 if fire was last disturbance + integer,pointer, dimension(:) :: nat_dist_type + + ! if new patch is less than min size, store information in the memory + real,pointer, dimension(:,:,:) :: disturbance_memory !(n_dist_types,n_dist_types,nsites) + + ! the disturbance matrix (to,from) + real,pointer,dimension(:,:,:) :: disturbance_rates !(n_dist_types,n_dist_types,nsites) + + real,pointer,dimension(:,:) :: green_leaf_factor ! (n_pft,nsites) + real,pointer,dimension(:,:) :: leaf_aging_factor ! (n_pft,nsites) + + real,pointer, dimension(:,:,:) :: basal_area ! cm2/m2 + real,pointer, dimension(:,:,:) :: basal_area_growth ! cm2/m2/yr + real,pointer, dimension(:,:,:) :: basal_area_mort ! c2/m2/yr + real,pointer, dimension(:,:,:) :: basal_area_cut ! c2/m2/yr + + real,pointer, dimension(:,:,:) :: agb ! kgC/m2 + real,pointer, dimension(:,:,:) :: agb_growth ! kgC/m2/yr + real,pointer, dimension(:,:,:) :: agb_mort ! kgC/m2/yr + real,pointer, dimension(:,:,:) :: agb_cut ! kgC/m2/yr + + + real,pointer,dimension(:) :: cosaoi + + !----- Length of day light, used to average light levels properly. -------------------! + real , pointer, dimension(:) :: daylight + logical, pointer, dimension(:) :: nighttime + + !----- Light-phenology variable. + real, pointer, dimension(:) :: rad_avg + + !====================================================================================! + !====================================================================================! + ! Polygon-level diagnostic variables: these are pretty much the meteorological ! + ! forcing variables modified by each site configuration, averaged over different ! + ! time scales, for each site. ! + ! ! + ! FMEAN -- average over one frqsum time interval (usually sub-daily) ! + ! DMEAN -- daily mean ! + ! MMEAN -- monthly mean ! + ! MMSQU -- monthly mean sum of squares ! + ! QMEAN -- mean diel ! + ! QMSQU -- mean sum of squares for the diel ! + ! ! + !------------------------------------------------------------------------------------! + !------ Fast mean. ------------------------------------------------------------------! + real,pointer,dimension(:) :: fmean_atm_theiv ! IV Equiv. Pot. Temp [ K] + real,pointer,dimension(:) :: fmean_atm_theta ! Potential temperature [ K] + real,pointer,dimension(:) :: fmean_atm_temp ! Temperature [ K] + real,pointer,dimension(:) :: fmean_atm_vpdef ! Vapour pres. deficit [ Pa] + real,pointer,dimension(:) :: fmean_atm_shv ! Specific humidity [ kg/kg] + real,pointer,dimension(:) :: fmean_atm_rshort ! Shortwave radiation [ W/m2] + real,pointer,dimension(:) :: fmean_atm_rshort_diff ! Diffuse SW radiation [ W/m2] + real,pointer,dimension(:) :: fmean_atm_par ! Photosyn. Active Rad. [ W/m2] + real,pointer,dimension(:) :: fmean_atm_par_diff ! Diffuse PAR [ W/m2] + real,pointer,dimension(:) :: fmean_atm_rlong ! Longwave radiation [ W/m2] + real,pointer,dimension(:) :: fmean_atm_vels ! Wind speed [ m/s] + real,pointer,dimension(:) :: fmean_atm_rhos ! Air density [ kg/m3] + real,pointer,dimension(:) :: fmean_atm_prss ! Air pressure [ Pa] + real,pointer,dimension(:) :: fmean_atm_co2 ! Air CO2 [umol/mol] + real,pointer,dimension(:) :: fmean_pcpg ! Precipitation rate [ kg/m2/s] + real,pointer,dimension(:) :: fmean_qpcpg ! Energy gain - rain [ W/m2] + real,pointer,dimension(:) :: fmean_dpcpg ! Precipitation depth [ m] + !------ Daily mean. -----------------------------------------------------------------! + real,pointer,dimension(:) :: dmean_atm_theiv + real,pointer,dimension(:) :: dmean_atm_theta + real,pointer,dimension(:) :: dmean_atm_temp + real,pointer,dimension(:) :: dmean_atm_vpdef + real,pointer,dimension(:) :: dmean_atm_shv + real,pointer,dimension(:) :: dmean_atm_rshort + real,pointer,dimension(:) :: dmean_atm_rshort_diff + real,pointer,dimension(:) :: dmean_atm_par + real,pointer,dimension(:) :: dmean_atm_par_diff + real,pointer,dimension(:) :: dmean_atm_rlong + real,pointer,dimension(:) :: dmean_atm_vels + real,pointer,dimension(:) :: dmean_atm_rhos + real,pointer,dimension(:) :: dmean_atm_prss + real,pointer,dimension(:) :: dmean_atm_co2 + real,pointer,dimension(:) :: dmean_pcpg + real,pointer,dimension(:) :: dmean_qpcpg + real,pointer,dimension(:) :: dmean_dpcpg + !------ Monthly mean. ---------------------------------------------------------------! + real,pointer,dimension(:) :: mmean_atm_theiv + real,pointer,dimension(:) :: mmean_atm_theta + real,pointer,dimension(:) :: mmean_atm_temp + real,pointer,dimension(:) :: mmean_atm_vpdef + real,pointer,dimension(:) :: mmean_atm_shv + real,pointer,dimension(:) :: mmean_atm_rshort + real,pointer,dimension(:) :: mmean_atm_rshort_diff + real,pointer,dimension(:) :: mmean_atm_par + real,pointer,dimension(:) :: mmean_atm_par_diff + real,pointer,dimension(:) :: mmean_atm_rlong + real,pointer,dimension(:) :: mmean_atm_vels + real,pointer,dimension(:) :: mmean_atm_rhos + real,pointer,dimension(:) :: mmean_atm_prss + real,pointer,dimension(:) :: mmean_atm_co2 + real,pointer,dimension(:) :: mmean_pcpg + real,pointer,dimension(:) :: mmean_qpcpg + real,pointer,dimension(:) :: mmean_dpcpg + !------ Mean diel. ------------------------------------------------------------------! + real,pointer,dimension(:,:) :: qmean_atm_theiv + real,pointer,dimension(:,:) :: qmean_atm_theta + real,pointer,dimension(:,:) :: qmean_atm_temp + real,pointer,dimension(:,:) :: qmean_atm_vpdef + real,pointer,dimension(:,:) :: qmean_atm_shv + real,pointer,dimension(:,:) :: qmean_atm_rshort + real,pointer,dimension(:,:) :: qmean_atm_rshort_diff + real,pointer,dimension(:,:) :: qmean_atm_par + real,pointer,dimension(:,:) :: qmean_atm_par_diff + real,pointer,dimension(:,:) :: qmean_atm_rlong + real,pointer,dimension(:,:) :: qmean_atm_vels + real,pointer,dimension(:,:) :: qmean_atm_rhos + real,pointer,dimension(:,:) :: qmean_atm_prss + real,pointer,dimension(:,:) :: qmean_atm_co2 + real,pointer,dimension(:,:) :: qmean_pcpg + real,pointer,dimension(:,:) :: qmean_qpcpg + real,pointer,dimension(:,:) :: qmean_dpcpg + !------------------------------------------------------------------------------------! + end type polygontype + !=======================================================================================! + !=======================================================================================! - ! Number of patches in each grid, for each machine. - integer, dimension(maxmach,maxgrds) :: gdpa - ! Number of cohorts in each grid, for each machine. - integer, dimension(maxmach,maxgrds) :: gdco - - ! Offset for each machine, so this has a nmachs size. - integer, dimension(maxmach,maxgrds) :: py_off - - ! Offset for each machine, so this has a nmachs size. - integer, dimension(maxmach,maxgrds) :: si_off - ! Offset for each machine, so this has a nmachs size. - integer, dimension(maxmach,maxgrds) :: pa_off - ! Offset for each machine, so this has a nmachs size. - integer, dimension(maxmach,maxgrds) :: co_off + !=======================================================================================! + !=======================================================================================! + ! ED TYPE: These are the arrays of polygon level variables that populate the current ! + ! grid. This is the most averaged and least nested dimension. ! + !---------------------------------------------------------------------------------------! + type edtype + !---- Data space indexing variables --------------- + ! + ! These variables are the total number of each + ! respective hierarchical type, summed across + ! all compute nodes if it is a parallel process + ! These values are mostly needed for output + ! dataspace dimensioning. - type(edtype),pointer,dimension(:) :: edgrid_g + integer :: npolygons_global + integer :: nsites_global + integer :: npatches_global + integer :: ncohorts_global - ! The following are swap variables used during - ! deallocation-reallocation + ! Index offsets for total counts of cohorts, patches + ! and sites. If this is the nth machine writing to + ! a file, it needs to know how many of these types + ! had come before, so it writes data contiguously + ! into the same file with the others - type(edtype) :: edswap_g + integer :: mach_cohort_offset_index + integer :: mach_patch_offset_index + integer :: mach_site_offset_index + integer :: mach_polygon_offset_index - type(polygontype) :: polyswap_g + ! + !--------------------------------------------------- - type(sitetype) :: siteswap_g - type(patchtype) :: patchswap_g - -!------------------------------------------------------------------------------------------! -! The following variables are for tracking the number of variables written in the output,! -! this way we avoid having the same ID used twice. ! -!------------------------------------------------------------------------------------------! - integer :: nioglobal, niogrid, niopoly, niosite + integer :: npolygons -!------------------------------------------------------------------------------------------! -! Logical switch that decides if the pointer tables for IO need to be updated -! The number and allocation of cohorts and patches dictates this, and they -! change at a monthly frequency typically. -!------------------------------------------------------------------------------------------! - logical :: filltables + integer :: pyglob_id - - -contains -!============================================================================! -!============================================================================! + type(polygontype),pointer,dimension(:) :: polygon + ! The global index of the first site in each polygon + integer,pointer,dimension(:) :: pysi_id + ! The number of sites in each polygon + integer,pointer,dimension(:) :: pysi_n + real(kind=8),pointer,dimension(:) :: walltime_py -!============================================================================! -!============================================================================! - ! =================================================== - ! Allocation subroutines of ed state variables - ! =================================================== + ! Longitude at the middle point of this polygon + real,pointer,dimension(:) :: lon - subroutine allocate_edglobals(ngrids) + ! Latitude at the middle point of this polygon + real,pointer,dimension(:) :: lat - use ed_var_tables,only:num_var,vt_info,maxvars + integer,pointer,dimension(:) :: xatm + + integer,pointer,dimension(:) :: yatm + + ! matrix of site hydrologic adjacency + real,pointer,dimension(:,:,:) :: site_adjacency - implicit none - integer :: ngrids - - if (associated(edgrid_g)) then - print*,"SHOULD NOT HAVE ASSOCIATED GLOBALS" - else - nullify(edgrid_g) - allocate(edgrid_g(ngrids)) - end if + real,pointer,dimension(:) :: wbar + real,pointer,dimension(:) :: Te + real,pointer,dimension(:) :: zbar + real,pointer,dimension(:) :: tau + real,pointer,dimension(:) :: sheat + real,pointer,dimension(:) :: baseflow + real,pointer,dimension(:) :: runoff + real,pointer,dimension(:) :: qrunoff + real,pointer,dimension(:) :: swliq - ! Allocate the basic var-table structures + integer,pointer,dimension(:) :: ilon ! index for matching met. data + integer,pointer,dimension(:) :: ilat ! index for matching met. data - allocate(num_var(ngrids)) - num_var = 0 - - allocate(vt_info(maxvars,ngrids)) - vt_info(:,:)%vector_allocated = .false. + !------------------------------------------------------------------------------------! + ! This variable storages the workload of this polygon, and this is "measured" by ! + ! the total number of Runge-Kutta time steps this polygon takes on average every ! + ! day. This is not averaged by patch, instead this is added (because having two ! + ! patches is computationally more intensive than having one). Since the number of ! + ! time steps depends on the environmental conditions and may change a lot for ! + ! different seasons, we store the previous. Index 13 is used for the integral of ! + ! the current month. ! + !------------------------------------------------------------------------------------! + real, pointer, dimension(:,:) :: workload + !------------------------------------------------------------------------------------! - ! Initialize the global offsets - edgrid_g(:)%mach_cohort_offset_index = 0 - edgrid_g(:)%mach_patch_offset_index = 0 - edgrid_g(:)%mach_site_offset_index = 0 - edgrid_g(:)%mach_polygon_offset_index = 0 + ! Polygon AGB (kgC/m2) + real,pointer,dimension(:) :: total_agb - return - end subroutine allocate_edglobals -!============================================================================! -!============================================================================! + ! Polygon basal area (cm2/m2) + real,pointer,dimension(:) :: total_basal_area + ! AGB accruing due to growth (kgC/m2/yr) + real,pointer,dimension(:) :: total_agb_growth + ! AGB lost due to mortality (kgC/m2/yr) + real,pointer,dimension(:) :: total_agb_mort + ! AGB used to generate recruits (kgC/m2/yr) + real,pointer,dimension(:) :: total_agb_recruit -!============================================================================! -!============================================================================! - subroutine allocate_edtype(cgrid,npolygons) - - implicit none - - integer :: npolygons - type(edtype),target :: cgrid - - call nullify_edtype(cgrid) - cgrid%npolygons = npolygons - ! This if is needed for coupled runs: some nodes may receive areas exclusively over oceans, and - ! npolygons will be 0 in these nodes. Nothing should be allocated in these circumstances. - if (npolygons > 0) then - allocate(cgrid%polygon(npolygons)) - allocate(cgrid%lat(npolygons)) - allocate(cgrid%lon(npolygons)) - allocate(cgrid%xatm(npolygons)) - allocate(cgrid%yatm(npolygons)) - allocate(cgrid%ncol_soil(npolygons)) - allocate(cgrid%ntext_soil(nzg,npolygons)) - allocate(cgrid%lsl(npolygons)) - - allocate(cgrid%pysi_id(npolygons)) - allocate(cgrid%pysi_n(npolygons)) - allocate(cgrid%walltime_py(npolygons)) - allocate(cgrid%sensflux_py(npolygons)) - allocate(cgrid%site_adjacency(max_site,(max_site+1),npolygons)) - allocate(cgrid%wbar(npolygons)) - allocate(cgrid%Te(npolygons)) - allocate(cgrid%zbar(npolygons)) -!! NOT USED allocate(cgrid%tau(npolygons)) - allocate(cgrid%sheat(npolygons)) - allocate(cgrid%baseflow(npolygons)) - allocate(cgrid%runoff(npolygons)) - allocate(cgrid%swliq(npolygons)) - - allocate(cgrid%ilon(npolygons)) - allocate(cgrid%ilat(npolygons)) - allocate(cgrid%total_agb(npolygons)) - allocate(cgrid%total_basal_area(npolygons)) - allocate(cgrid%total_agb_growth(npolygons)) - allocate(cgrid%total_agb_mort(npolygons)) - allocate(cgrid%total_agb_recruit(npolygons)) - allocate(cgrid%total_basal_area_growth(npolygons)) - allocate(cgrid%total_basal_area_mort(npolygons)) - allocate(cgrid%total_basal_area_recruit(npolygons)) - allocate(cgrid%nsites(npolygons)) - allocate(cgrid%sitenums(max_site,npolygons)) - allocate(cgrid%load_adjacency(npolygons)) - allocate(cgrid%cosz(npolygons)) - allocate(cgrid%mean_gpp(npolygons)) - allocate(cgrid%mean_precip(npolygons)) - allocate(cgrid%mean_qprecip(npolygons)) - allocate(cgrid%mean_netrad(npolygons)) - allocate(cgrid%cbudget_initialstorage(npolygons)) - allocate(cgrid%cbudget_nep(npolygons)) - allocate(cgrid%nbudget_initialstorage(npolygons)) - allocate(cgrid%basal_area(n_pft,n_dbh,npolygons)) - allocate(cgrid%agb(n_pft,n_dbh,npolygons)) - allocate(cgrid%pldens(n_pft,n_dbh,npolygons)) - allocate(cgrid%bseeds(n_pft,n_dbh,npolygons)) - - allocate(cgrid%metinput(npolygons)) - allocate(cgrid%met(npolygons)) - - allocate(cgrid%lapse(npolygons)) - - allocate(cgrid%lai (npolygons)) - allocate(cgrid%avg_lma(npolygons)) - allocate(cgrid%wai (npolygons)) - - ! Fast time flux diagnostics - ! --------------------------------------------- - allocate(cgrid%avg_vapor_lc (npolygons)) - allocate(cgrid%avg_vapor_wc (npolygons)) - allocate(cgrid%avg_vapor_gc (npolygons)) - allocate(cgrid%avg_wshed_vg (npolygons)) - allocate(cgrid%avg_intercepted (npolygons)) - allocate(cgrid%avg_throughfall (npolygons)) - allocate(cgrid%avg_vapor_ac (npolygons)) - allocate(cgrid%avg_transp (npolygons)) - allocate(cgrid%avg_evap (npolygons)) - allocate(cgrid%avg_smoist_gg (nzg,npolygons)) - allocate(cgrid%avg_transloss (nzg,npolygons)) - allocate(cgrid%avg_runoff (npolygons)) - allocate(cgrid%avg_drainage (npolygons)) - allocate(cgrid%avg_drainage_heat (npolygons)) - allocate(cgrid%avg_rshort_gnd (npolygons)) - allocate(cgrid%avg_par_gnd (npolygons)) - allocate(cgrid%avg_rlong_gnd (npolygons)) - allocate(cgrid%avg_ustar (npolygons)) - allocate(cgrid%avg_tstar (npolygons)) - allocate(cgrid%avg_qstar (npolygons)) - allocate(cgrid%avg_cstar (npolygons)) - allocate(cgrid%avg_carbon_ac (npolygons)) - allocate(cgrid%avg_carbon_st (npolygons)) - allocate(cgrid%avg_qwshed_vg (npolygons)) - allocate(cgrid%avg_qintercepted (npolygons)) - allocate(cgrid%avg_qthroughfall (npolygons)) - allocate(cgrid%avg_sensible_lc (npolygons)) - allocate(cgrid%avg_sensible_wc (npolygons)) - allocate(cgrid%avg_sensible_gc (npolygons)) - allocate(cgrid%avg_sensible_ac (npolygons)) - allocate(cgrid%avg_sensible_gg (nzg,npolygons)) - allocate(cgrid%avg_runoff_heat (npolygons)) - - allocate(cgrid%max_leaf_temp(npolygons)) - allocate(cgrid%min_leaf_temp(npolygons)) - allocate(cgrid%max_wood_temp(npolygons)) - allocate(cgrid%min_wood_temp(npolygons)) - allocate(cgrid%max_soil_temp(npolygons)) - allocate(cgrid%min_soil_temp(npolygons)) - - ! Fast time state diagnostics - allocate(cgrid%avg_leaf_energy (npolygons)) - allocate(cgrid%avg_leaf_hcap (npolygons)) - allocate(cgrid%avg_leaf_temp (npolygons)) - allocate(cgrid%avg_leaf_vpdef (npolygons)) - allocate(cgrid%avg_leaf_fliq (npolygons)) - allocate(cgrid%avg_leaf_water (npolygons)) - allocate(cgrid%avg_wood_energy (npolygons)) - allocate(cgrid%avg_wood_hcap (npolygons)) - allocate(cgrid%avg_wood_temp (npolygons)) - allocate(cgrid%avg_wood_fliq (npolygons)) - allocate(cgrid%avg_wood_water (npolygons)) - allocate(cgrid%avg_can_temp (npolygons)) - allocate(cgrid%avg_can_shv (npolygons)) - allocate(cgrid%avg_can_co2 (npolygons)) - allocate(cgrid%avg_can_rhos (npolygons)) - allocate(cgrid%avg_can_prss (npolygons)) - allocate(cgrid%avg_can_theta (npolygons)) - allocate(cgrid%avg_can_theiv (npolygons)) - allocate(cgrid%avg_can_vpdef (npolygons)) - allocate(cgrid%avg_can_depth (npolygons)) - allocate(cgrid%avg_soil_energy(nzg,npolygons)) - allocate(cgrid%avg_soil_mstpot(nzg,npolygons)) - allocate(cgrid%avg_soil_water(nzg,npolygons)) - allocate(cgrid%avg_soil_temp (nzg,npolygons)) - allocate(cgrid%avg_soil_fracliq (nzg,npolygons)) - allocate(cgrid%avg_soil_rootfrac(nzg,npolygons)) - - allocate(cgrid%avg_soil_wetness (npolygons)) - allocate(cgrid%avg_skin_temp (npolygons)) - allocate(cgrid%avg_available_water(npolygons)) - - allocate(cgrid%avg_lai_ebalvars (3,4,npolygons)) - - allocate(cgrid%avg_gpp (npolygons)) - allocate(cgrid%avg_leaf_resp (npolygons)) - allocate(cgrid%avg_root_resp (npolygons)) - allocate(cgrid%avg_growth_resp (npolygons)) - allocate(cgrid%avg_storage_resp (npolygons)) - allocate(cgrid%avg_vleaf_resp (npolygons)) - allocate(cgrid%avg_plant_resp (npolygons)) - allocate(cgrid%avg_growth_resp (npolygons)) - allocate(cgrid%avg_storage_resp (npolygons)) - allocate(cgrid%avg_vleaf_resp (npolygons)) - allocate(cgrid%avg_htroph_resp (npolygons)) - allocate(cgrid%avg_cwd_resp (npolygons)) - allocate(cgrid%avg_leaf_drop (npolygons)) - allocate(cgrid%avg_leaf_maintenance(npolygons)) - allocate(cgrid%avg_root_maintenance(npolygons)) - allocate(cgrid%avg_nppleaf(npolygons)) - allocate(cgrid%avg_nppfroot(npolygons)) - allocate(cgrid%avg_nppsapwood(npolygons)) - allocate(cgrid%avg_nppcroot(npolygons)) - allocate(cgrid%avg_nppseeds(npolygons)) - allocate(cgrid%avg_nppwood(npolygons)) - allocate(cgrid%avg_nppdaily(npolygons)) - - !! added MCD for NACP intercomparison - allocate(cgrid%avg_sfcw_depth (npolygons)) - allocate(cgrid%avg_sfcw_energy (npolygons)) - allocate(cgrid%avg_sfcw_mass (npolygons)) - allocate(cgrid%avg_sfcw_tempk (npolygons)) - allocate(cgrid%avg_sfcw_fracliq (npolygons)) - allocate(cgrid%avg_bdead (npolygons)) - allocate(cgrid%avg_balive (npolygons)) - allocate(cgrid%avg_bleaf (npolygons)) - allocate(cgrid%avg_broot (npolygons)) - allocate(cgrid%avg_bsapwooda (npolygons)) - allocate(cgrid%avg_bsapwoodb (npolygons)) - allocate(cgrid%avg_bstorage (npolygons)) - allocate(cgrid%avg_bseeds (npolygons)) - allocate(cgrid%avg_fsc (npolygons)) - allocate(cgrid%avg_ssc (npolygons)) - allocate(cgrid%avg_stsc (npolygons)) - allocate(cgrid%avg_fsn (npolygons)) - allocate(cgrid%avg_msn (npolygons)) - - !! C & N fluxes and pools for NCEAS/FACE - allocate(cgrid%Cleaf (npolygons)) - allocate(cgrid%Croot (npolygons)) - allocate(cgrid%Cstore (npolygons)) - allocate(cgrid%Ccwd (npolygons)) - allocate(cgrid%Nleaf (npolygons)) - allocate(cgrid%Ndead (npolygons)) - allocate(cgrid%Nroot (npolygons)) - allocate(cgrid%Nstore (npolygons)) - allocate(cgrid%Ncwd (npolygons)) - allocate(cgrid%Cleaf_grow (npolygons)) - allocate(cgrid%Croot_grow (npolygons)) - allocate(cgrid%Cdead_grow (npolygons)) - allocate(cgrid%Cstore_grow (npolygons)) - allocate(cgrid%Cleaf_litter_flux(npolygons)) - allocate(cgrid%Croot_litter_flux(npolygons)) - allocate(cgrid%Ccwd_flux (npolygons)) - allocate(cgrid%Nleaf_grow (npolygons)) - allocate(cgrid%Ndead_grow (npolygons)) - allocate(cgrid%Nroot_grow (npolygons)) - allocate(cgrid%Nstore_grow (npolygons)) - allocate(cgrid%Nleaf_litter_flux(npolygons)) - allocate(cgrid%Nroot_litter_flux(npolygons)) - allocate(cgrid%Ncwd_flux (npolygons)) - allocate(cgrid%Nbiomass_uptake (npolygons)) - allocate(cgrid%Ngross_min (npolygons)) - allocate(cgrid%Nnet_min (npolygons)) - - - - ! Meteorologic conditions (forcing) - allocate(cgrid%avg_atm_tmp (npolygons)) - allocate(cgrid%avg_atm_vpdef (npolygons)) - allocate(cgrid%avg_atm_shv (npolygons)) - allocate(cgrid%avg_rshort (npolygons)) - allocate(cgrid%avg_rshort_diffuse (npolygons)) - allocate(cgrid%avg_par (npolygons)) - allocate(cgrid%avg_par_diffuse (npolygons)) - allocate(cgrid%avg_rlong (npolygons)) - allocate(cgrid%avg_pcpg (npolygons)) - allocate(cgrid%avg_qpcpg (npolygons)) - allocate(cgrid%avg_dpcpg (npolygons)) - allocate(cgrid%avg_vels (npolygons)) - allocate(cgrid%avg_atm_prss (npolygons)) - allocate(cgrid%avg_exner (npolygons)) - allocate(cgrid%avg_geoht (npolygons)) - allocate(cgrid%avg_atm_co2 (npolygons)) - allocate(cgrid%avg_albedo (npolygons)) - allocate(cgrid%avg_albedo_beam (npolygons)) - allocate(cgrid%avg_albedo_diffuse (npolygons)) - allocate(cgrid%avg_rlong_albedo (npolygons)) - allocate(cgrid%avg_rlongup (npolygons)) - allocate(cgrid%avg_parup (npolygons)) - allocate(cgrid%avg_nirup (npolygons)) - allocate(cgrid%avg_rshortup (npolygons)) - allocate(cgrid%avg_rnet (npolygons)) - - allocate(cgrid%lai_pft (n_pft ,npolygons)) - allocate(cgrid%wai_pft (n_pft ,npolygons)) - - allocate(cgrid%workload (13 ,npolygons)) - - !-----------------------------------------------------------------------------------! - ! Allocate the daily means, only if daily means, monthly means, or mean diurnal ! - ! cycles are requested by the user. ! - !-----------------------------------------------------------------------------------! - if (idoutput > 0 .or. imoutput > 0 .or. iqoutput > 0) then - allocate(cgrid%dmean_pcpg ( npolygons)) - allocate(cgrid%dmean_runoff ( npolygons)) - allocate(cgrid%dmean_drainage ( npolygons)) - allocate(cgrid%dmean_vapor_ac ( npolygons)) - allocate(cgrid%dmean_vapor_gc ( npolygons)) - allocate(cgrid%dmean_vapor_lc ( npolygons)) - allocate(cgrid%dmean_vapor_wc ( npolygons)) - allocate(cgrid%dmean_ustar ( npolygons)) - allocate(cgrid%dmean_tstar ( npolygons)) - allocate(cgrid%dmean_qstar ( npolygons)) - allocate(cgrid%dmean_cstar ( npolygons)) - allocate(cgrid%dmean_carbon_ac ( npolygons)) - allocate(cgrid%dmean_carbon_st ( npolygons)) - allocate(cgrid%dmean_gpp ( npolygons)) - allocate(cgrid%dmean_nppleaf ( npolygons)) - allocate(cgrid%dmean_nppfroot ( npolygons)) - allocate(cgrid%dmean_nppsapwood ( npolygons)) - allocate(cgrid%dmean_nppcroot ( npolygons)) - allocate(cgrid%dmean_nppseeds ( npolygons)) - allocate(cgrid%dmean_nppwood ( npolygons)) - allocate(cgrid%dmean_nppdaily ( npolygons)) - allocate(cgrid%dmean_evap ( npolygons)) - allocate(cgrid%dmean_transp ( npolygons)) - allocate(cgrid%dmean_sensible_ac ( npolygons)) - allocate(cgrid%dmean_sensible_lc ( npolygons)) - allocate(cgrid%dmean_sensible_wc ( npolygons)) - allocate(cgrid%dmean_sensible_gc ( npolygons)) - allocate(cgrid%dmean_plresp ( npolygons)) - allocate(cgrid%dmean_rh ( npolygons)) - allocate(cgrid%dmean_cwd_rh ( npolygons)) - allocate(cgrid%dmean_leaf_resp ( npolygons)) - allocate(cgrid%dmean_root_resp ( npolygons)) - allocate(cgrid%dmean_growth_resp ( npolygons)) - allocate(cgrid%dmean_storage_resp ( npolygons)) - allocate(cgrid%dmean_vleaf_resp ( npolygons)) - allocate(cgrid%dmean_nep ( npolygons)) - allocate(cgrid%dmean_soil_temp (nzg, npolygons)) - allocate(cgrid%dmean_soil_water (nzg, npolygons)) - allocate(cgrid%dmean_soil_mstpot (nzg, npolygons)) - allocate(cgrid%dmean_transloss (nzg, npolygons)) - allocate(cgrid%dmean_fs_open ( npolygons)) - allocate(cgrid%dmean_fsw ( npolygons)) - allocate(cgrid%dmean_fsn ( npolygons)) - allocate(cgrid%dmean_gpp_dbh (n_dbh ,npolygons)) - allocate(cgrid%dmean_can_temp ( npolygons)) - allocate(cgrid%dmean_can_shv ( npolygons)) - allocate(cgrid%dmean_can_co2 ( npolygons)) - allocate(cgrid%dmean_can_rhos ( npolygons)) - allocate(cgrid%dmean_can_prss ( npolygons)) - allocate(cgrid%dmean_can_theta ( npolygons)) - allocate(cgrid%dmean_can_theiv ( npolygons)) - allocate(cgrid%dmean_can_vpdef ( npolygons)) - allocate(cgrid%dmean_gnd_temp ( npolygons)) - allocate(cgrid%dmean_gnd_shv ( npolygons)) - allocate(cgrid%dmean_leaf_energy ( npolygons)) - allocate(cgrid%dmean_leaf_water ( npolygons)) - allocate(cgrid%dmean_leaf_hcap ( npolygons)) - allocate(cgrid%dmean_leaf_temp ( npolygons)) - allocate(cgrid%dmean_leaf_vpdef ( npolygons)) - allocate(cgrid%dmean_wood_energy ( npolygons)) - allocate(cgrid%dmean_wood_water ( npolygons)) - allocate(cgrid%dmean_wood_hcap ( npolygons)) - allocate(cgrid%dmean_wood_temp ( npolygons)) - allocate(cgrid%dmean_atm_temp ( npolygons)) - allocate(cgrid%dmean_atm_vpdef ( npolygons)) - allocate(cgrid%dmean_atm_shv ( npolygons)) - allocate(cgrid%dmean_atm_co2 ( npolygons)) - allocate(cgrid%dmean_atm_prss ( npolygons)) - allocate(cgrid%dmean_atm_vels ( npolygons)) - allocate(cgrid%dmean_rshort ( npolygons)) - allocate(cgrid%dmean_rshort_diff ( npolygons)) - allocate(cgrid%dmean_par ( npolygons)) - allocate(cgrid%dmean_par_diff ( npolygons)) - allocate(cgrid%dmean_rlong ( npolygons)) - allocate(cgrid%dmean_rshort_gnd ( npolygons)) - allocate(cgrid%dmean_par_gnd ( npolygons)) - allocate(cgrid%dmean_rlong_gnd ( npolygons)) - allocate(cgrid%dmean_albedo ( npolygons)) - allocate(cgrid%dmean_albedo_beam ( npolygons)) - allocate(cgrid%dmean_albedo_diffuse ( npolygons)) - allocate(cgrid%dmean_rlong_albedo ( npolygons)) - allocate(cgrid%dmean_rlongup ( npolygons)) - allocate(cgrid%dmean_parup ( npolygons)) - allocate(cgrid%dmean_nirup ( npolygons)) - allocate(cgrid%dmean_rshortup ( npolygons)) - allocate(cgrid%dmean_rnet ( npolygons)) - - allocate(cgrid%dmean_co2_residual ( npolygons)) - allocate(cgrid%dmean_energy_residual( npolygons)) - allocate(cgrid%dmean_water_residual ( npolygons)) - - end if - !-----------------------------------------------------------------------------------! - - - - - !-----------------------------------------------------------------------------------! - ! Allocate the monthly means only if monthly means or mean diurnal cycles are ! - ! requested by the user. ! - !-----------------------------------------------------------------------------------! - if (imoutput > 0 .or. iqoutput > 0) then - allocate(cgrid%mmean_pcpg ( npolygons)) - allocate(cgrid%mmean_runoff ( npolygons)) - allocate(cgrid%mmean_drainage ( npolygons)) - allocate(cgrid%mmean_evap ( npolygons)) - allocate(cgrid%mmean_transp ( npolygons)) - allocate(cgrid%mmean_vapor_ac ( npolygons)) - allocate(cgrid%mmean_vapor_gc ( npolygons)) - allocate(cgrid%mmean_vapor_lc ( npolygons)) - allocate(cgrid%mmean_vapor_wc ( npolygons)) - allocate(cgrid%mmean_sensible_ac ( npolygons)) - allocate(cgrid%mmean_sensible_gc ( npolygons)) - allocate(cgrid%mmean_sensible_lc ( npolygons)) - allocate(cgrid%mmean_sensible_wc ( npolygons)) - allocate(cgrid%mmean_ustar ( npolygons)) - allocate(cgrid%mmean_tstar ( npolygons)) - allocate(cgrid%mmean_qstar ( npolygons)) - allocate(cgrid%mmean_cstar ( npolygons)) - allocate(cgrid%mmean_carbon_ac ( npolygons)) - allocate(cgrid%mmean_carbon_st ( npolygons)) - allocate(cgrid%mmean_gpp ( npolygons)) - allocate(cgrid%mmean_nppleaf ( npolygons)) - allocate(cgrid%mmean_nppfroot ( npolygons)) - allocate(cgrid%mmean_nppsapwood ( npolygons)) - allocate(cgrid%mmean_nppcroot ( npolygons)) - allocate(cgrid%mmean_nppseeds ( npolygons)) - allocate(cgrid%mmean_nppwood ( npolygons)) - allocate(cgrid%mmean_nppdaily ( npolygons)) - allocate(cgrid%mmean_nep ( npolygons)) - allocate(cgrid%mmean_plresp ( npolygons)) - allocate(cgrid%mmean_rh ( npolygons)) - allocate(cgrid%mmean_cwd_rh ( npolygons)) - allocate(cgrid%mmean_leaf_resp ( npolygons)) - allocate(cgrid%mmean_root_resp ( npolygons)) - allocate(cgrid%mmean_growth_resp ( npolygons)) - allocate(cgrid%mmean_storage_resp ( npolygons)) - allocate(cgrid%mmean_vleaf_resp ( npolygons)) - allocate(cgrid%mmean_soil_temp (nzg, npolygons)) - allocate(cgrid%mmean_soil_water (nzg, npolygons)) - allocate(cgrid%mmean_soil_mstpot (nzg, npolygons)) - allocate(cgrid%mmean_transloss (nzg, npolygons)) - allocate(cgrid%mmean_fs_open ( npolygons)) - allocate(cgrid%mmean_fsw ( npolygons)) - allocate(cgrid%mmean_fsn ( npolygons)) - allocate(cgrid%mmean_gpp_dbh (n_dbh ,npolygons)) - allocate(cgrid%mmean_lai_pft (n_pft ,npolygons)) - allocate(cgrid%mmean_wai_pft (n_pft ,npolygons)) - allocate(cgrid%mmean_can_temp ( npolygons)) - allocate(cgrid%mmean_can_shv ( npolygons)) - allocate(cgrid%mmean_can_co2 ( npolygons)) - allocate(cgrid%mmean_can_rhos ( npolygons)) - allocate(cgrid%mmean_can_prss ( npolygons)) - allocate(cgrid%mmean_can_theta ( npolygons)) - allocate(cgrid%mmean_can_theiv ( npolygons)) - allocate(cgrid%mmean_can_vpdef ( npolygons)) - allocate(cgrid%mmean_gnd_temp ( npolygons)) - allocate(cgrid%mmean_gnd_shv ( npolygons)) - allocate(cgrid%mmean_leaf_energy ( npolygons)) - allocate(cgrid%mmean_leaf_water ( npolygons)) - allocate(cgrid%mmean_leaf_temp ( npolygons)) - allocate(cgrid%mmean_leaf_vpdef ( npolygons)) - allocate(cgrid%mmean_leaf_hcap ( npolygons)) - allocate(cgrid%mmean_wood_energy ( npolygons)) - allocate(cgrid%mmean_wood_water ( npolygons)) - allocate(cgrid%mmean_wood_temp ( npolygons)) - allocate(cgrid%mmean_wood_hcap ( npolygons)) - allocate(cgrid%mmean_atm_temp ( npolygons)) - allocate(cgrid%mmean_atm_vpdef ( npolygons)) - allocate(cgrid%mmean_rshort ( npolygons)) - allocate(cgrid%mmean_rshort_diff ( npolygons)) - allocate(cgrid%mmean_par ( npolygons)) - allocate(cgrid%mmean_par_diff ( npolygons)) - allocate(cgrid%mmean_rlong ( npolygons)) - allocate(cgrid%mmean_rshort_gnd ( npolygons)) - allocate(cgrid%mmean_par_gnd ( npolygons)) - allocate(cgrid%mmean_rlong_gnd ( npolygons)) - allocate(cgrid%mmean_albedo ( npolygons)) - allocate(cgrid%mmean_albedo_beam ( npolygons)) - allocate(cgrid%mmean_albedo_diffuse ( npolygons)) - allocate(cgrid%mmean_rlong_albedo ( npolygons)) - allocate(cgrid%mmean_rlongup ( npolygons)) - allocate(cgrid%mmean_parup ( npolygons)) - allocate(cgrid%mmean_nirup ( npolygons)) - allocate(cgrid%mmean_rshortup ( npolygons)) - allocate(cgrid%mmean_rnet ( npolygons)) - allocate(cgrid%mmean_atm_shv ( npolygons)) - allocate(cgrid%mmean_atm_co2 ( npolygons)) - allocate(cgrid%mmean_atm_prss ( npolygons)) - allocate(cgrid%mmean_atm_vels ( npolygons)) - allocate(cgrid%mmean_co2_residual ( npolygons)) - allocate(cgrid%mmean_energy_residual( npolygons)) - allocate(cgrid%mmean_water_residual ( npolygons)) - allocate(cgrid%bseeds_pft (n_pft ,npolygons)) - allocate(cgrid%agb_pft (n_pft ,npolygons)) - allocate(cgrid%ba_pft (n_pft ,npolygons)) - allocate(cgrid%mmsqu_gpp ( npolygons)) - allocate(cgrid%mmsqu_leaf_resp ( npolygons)) - allocate(cgrid%mmsqu_root_resp ( npolygons)) - allocate(cgrid%mmsqu_plresp ( npolygons)) - allocate(cgrid%mmsqu_carbon_ac ( npolygons)) - allocate(cgrid%mmsqu_carbon_st ( npolygons)) - allocate(cgrid%mmsqu_nep ( npolygons)) - allocate(cgrid%mmsqu_rh ( npolygons)) - allocate(cgrid%mmsqu_cwd_rh ( npolygons)) - allocate(cgrid%mmsqu_sensible_ac ( npolygons)) - allocate(cgrid%mmsqu_sensible_lc ( npolygons)) - allocate(cgrid%mmsqu_sensible_wc ( npolygons)) - allocate(cgrid%mmsqu_sensible_gc ( npolygons)) - allocate(cgrid%mmsqu_evap ( npolygons)) - allocate(cgrid%mmsqu_transp ( npolygons)) - allocate(cgrid%mmsqu_vapor_ac ( npolygons)) - allocate(cgrid%mmsqu_vapor_lc ( npolygons)) - allocate(cgrid%mmsqu_vapor_wc ( npolygons)) - allocate(cgrid%mmsqu_vapor_gc ( npolygons)) - allocate(cgrid%mmsqu_ustar ( npolygons)) - allocate(cgrid%mmsqu_rlongup ( npolygons)) - allocate(cgrid%mmsqu_parup ( npolygons)) - allocate(cgrid%mmsqu_nirup ( npolygons)) - allocate(cgrid%mmsqu_rshortup ( npolygons)) - allocate(cgrid%mmsqu_rnet ( npolygons)) - allocate(cgrid%mmsqu_albedo ( npolygons)) - - allocate(cgrid%disturbance_rates (n_dist_types,n_dist_types,npolygons)) - - end if - !-----------------------------------------------------------------------------------! - - - - - !-----------------------------------------------------------------------------------! - ! Allocate the mean diurnal cycles only if mean diurnal cycles are requested ! - ! by the user. ! - !-----------------------------------------------------------------------------------! - if (iqoutput > 0) then - allocate(cgrid%qmean_pcpg ( ndcycle, npolygons)) - allocate(cgrid%qmean_runoff ( ndcycle, npolygons)) - allocate(cgrid%qmean_drainage ( ndcycle, npolygons)) - allocate(cgrid%qmean_evap ( ndcycle, npolygons)) - allocate(cgrid%qmean_transp ( ndcycle, npolygons)) - allocate(cgrid%qmean_vapor_ac ( ndcycle, npolygons)) - allocate(cgrid%qmean_vapor_gc ( ndcycle, npolygons)) - allocate(cgrid%qmean_vapor_lc ( ndcycle, npolygons)) - allocate(cgrid%qmean_vapor_wc ( ndcycle, npolygons)) - allocate(cgrid%qmean_sensible_ac ( ndcycle, npolygons)) - allocate(cgrid%qmean_sensible_gc ( ndcycle, npolygons)) - allocate(cgrid%qmean_sensible_lc ( ndcycle, npolygons)) - allocate(cgrid%qmean_sensible_wc ( ndcycle, npolygons)) - allocate(cgrid%qmean_ustar ( ndcycle, npolygons)) - allocate(cgrid%qmean_tstar ( ndcycle, npolygons)) - allocate(cgrid%qmean_qstar ( ndcycle, npolygons)) - allocate(cgrid%qmean_cstar ( ndcycle, npolygons)) - allocate(cgrid%qmean_carbon_ac ( ndcycle, npolygons)) - allocate(cgrid%qmean_carbon_st ( ndcycle, npolygons)) - allocate(cgrid%qmean_gpp ( ndcycle, npolygons)) - allocate(cgrid%qmean_nep ( ndcycle, npolygons)) - allocate(cgrid%qmean_plresp ( ndcycle, npolygons)) - allocate(cgrid%qmean_rh ( ndcycle, npolygons)) - allocate(cgrid%qmean_cwd_rh ( ndcycle, npolygons)) - allocate(cgrid%qmean_leaf_resp ( ndcycle, npolygons)) - allocate(cgrid%qmean_root_resp ( ndcycle, npolygons)) - allocate(cgrid%qmean_soil_temp (nzg, ndcycle, npolygons)) - allocate(cgrid%qmean_soil_water (nzg, ndcycle, npolygons)) - allocate(cgrid%qmean_soil_mstpot (nzg, ndcycle, npolygons)) - allocate(cgrid%qmean_fs_open ( ndcycle, npolygons)) - allocate(cgrid%qmean_fsw ( ndcycle, npolygons)) - allocate(cgrid%qmean_fsn ( ndcycle, npolygons)) - allocate(cgrid%qmean_can_temp ( ndcycle, npolygons)) - allocate(cgrid%qmean_can_shv ( ndcycle, npolygons)) - allocate(cgrid%qmean_can_co2 ( ndcycle, npolygons)) - allocate(cgrid%qmean_can_rhos ( ndcycle, npolygons)) - allocate(cgrid%qmean_can_prss ( ndcycle, npolygons)) - allocate(cgrid%qmean_can_theta ( ndcycle, npolygons)) - allocate(cgrid%qmean_can_theiv ( ndcycle, npolygons)) - allocate(cgrid%qmean_can_vpdef ( ndcycle, npolygons)) - allocate(cgrid%qmean_gnd_temp ( ndcycle, npolygons)) - allocate(cgrid%qmean_gnd_shv ( ndcycle, npolygons)) - allocate(cgrid%qmean_leaf_energy ( ndcycle, npolygons)) - allocate(cgrid%qmean_leaf_water ( ndcycle, npolygons)) - allocate(cgrid%qmean_leaf_temp ( ndcycle, npolygons)) - allocate(cgrid%qmean_leaf_vpdef ( ndcycle, npolygons)) - allocate(cgrid%qmean_leaf_hcap ( ndcycle, npolygons)) - allocate(cgrid%qmean_wood_energy ( ndcycle, npolygons)) - allocate(cgrid%qmean_wood_water ( ndcycle, npolygons)) - allocate(cgrid%qmean_wood_temp ( ndcycle, npolygons)) - allocate(cgrid%qmean_wood_hcap ( ndcycle, npolygons)) - allocate(cgrid%qmean_atm_temp ( ndcycle, npolygons)) - allocate(cgrid%qmean_atm_vpdef ( ndcycle, npolygons)) - allocate(cgrid%qmean_rshort ( ndcycle, npolygons)) - allocate(cgrid%qmean_rshort_diff ( ndcycle, npolygons)) - allocate(cgrid%qmean_par ( ndcycle, npolygons)) - allocate(cgrid%qmean_par_diff ( ndcycle, npolygons)) - allocate(cgrid%qmean_rlong ( ndcycle, npolygons)) - allocate(cgrid%qmean_rshort_gnd ( ndcycle, npolygons)) - allocate(cgrid%qmean_par_gnd ( ndcycle, npolygons)) - allocate(cgrid%qmean_rlong_gnd ( ndcycle, npolygons)) - allocate(cgrid%qmean_albedo ( ndcycle, npolygons)) - allocate(cgrid%qmean_albedo_beam ( ndcycle, npolygons)) - allocate(cgrid%qmean_albedo_diffuse ( ndcycle, npolygons)) - allocate(cgrid%qmean_rlong_albedo ( ndcycle, npolygons)) - allocate(cgrid%qmean_rlongup ( ndcycle, npolygons)) - allocate(cgrid%qmean_parup ( ndcycle, npolygons)) - allocate(cgrid%qmean_nirup ( ndcycle, npolygons)) - allocate(cgrid%qmean_rshortup ( ndcycle, npolygons)) - allocate(cgrid%qmean_rnet ( ndcycle, npolygons)) - allocate(cgrid%qmean_atm_shv ( ndcycle, npolygons)) - allocate(cgrid%qmean_atm_co2 ( ndcycle, npolygons)) - allocate(cgrid%qmean_atm_prss ( ndcycle, npolygons)) - allocate(cgrid%qmean_atm_vels ( ndcycle, npolygons)) - allocate(cgrid%qmsqu_gpp ( ndcycle, npolygons)) - allocate(cgrid%qmsqu_leaf_resp ( ndcycle, npolygons)) - allocate(cgrid%qmsqu_root_resp ( ndcycle, npolygons)) - allocate(cgrid%qmsqu_plresp ( ndcycle, npolygons)) - allocate(cgrid%qmsqu_carbon_ac ( ndcycle, npolygons)) - allocate(cgrid%qmsqu_carbon_st ( ndcycle, npolygons)) - allocate(cgrid%qmsqu_nep ( ndcycle, npolygons)) - allocate(cgrid%qmsqu_rh ( ndcycle, npolygons)) - allocate(cgrid%qmsqu_cwd_rh ( ndcycle, npolygons)) - allocate(cgrid%qmsqu_sensible_ac ( ndcycle, npolygons)) - allocate(cgrid%qmsqu_sensible_lc ( ndcycle, npolygons)) - allocate(cgrid%qmsqu_sensible_wc ( ndcycle, npolygons)) - allocate(cgrid%qmsqu_sensible_gc ( ndcycle, npolygons)) - allocate(cgrid%qmsqu_evap ( ndcycle, npolygons)) - allocate(cgrid%qmsqu_transp ( ndcycle, npolygons)) - allocate(cgrid%qmsqu_vapor_ac ( ndcycle, npolygons)) - allocate(cgrid%qmsqu_vapor_lc ( ndcycle, npolygons)) - allocate(cgrid%qmsqu_vapor_wc ( ndcycle, npolygons)) - allocate(cgrid%qmsqu_vapor_gc ( ndcycle, npolygons)) - allocate(cgrid%qmsqu_ustar ( ndcycle, npolygons)) - allocate(cgrid%qmsqu_rlongup ( ndcycle, npolygons)) - allocate(cgrid%qmsqu_parup ( ndcycle, npolygons)) - allocate(cgrid%qmsqu_nirup ( ndcycle, npolygons)) - allocate(cgrid%qmsqu_rshortup ( ndcycle, npolygons)) - allocate(cgrid%qmsqu_rnet ( ndcycle, npolygons)) - allocate(cgrid%qmsqu_albedo ( ndcycle, npolygons)) - - end if - end if - return - end subroutine allocate_edtype -!============================================================================! -!============================================================================! - - - - - -!============================================================================! -!============================================================================! - subroutine allocate_polygontype(cpoly,nsites) - - implicit none - - integer :: nsites - type(polygontype),target :: cpoly - - call nullify_polygontype(cpoly) - - cpoly%nsites = nsites - - allocate(cpoly%sipa_id(nsites)) - allocate(cpoly%sipa_n(nsites)) - - allocate(cpoly%patch_count(nsites)) - allocate(cpoly%site(nsites)) - allocate(cpoly%sitenum(nsites)) - - allocate(cpoly%lsl(nsites)) - - allocate(cpoly%area(nsites)) - allocate(cpoly%patch_area(nsites)) - allocate(cpoly%elevation(nsites)) - allocate(cpoly%slope(nsites)) - allocate(cpoly%aspect(nsites)) - - allocate(cpoly%num_landuse_years(nsites)) - allocate(cpoly%mindbh_primary(n_pft,nsites)) - allocate(cpoly%probharv_primary(n_pft,nsites)) - allocate(cpoly%mindbh_secondary(n_pft,nsites)) - allocate(cpoly%probharv_secondary(n_pft,nsites)) - - allocate(cpoly%lai_pft(n_pft,nsites)) - allocate(cpoly%wai_pft(n_pft,nsites)) - - allocate(cpoly%TCI(nsites)) - allocate(cpoly%pptweight(nsites)) - allocate(cpoly%hydro_next(nsites)) - allocate(cpoly%hydro_prev(nsites)) - allocate(cpoly%moist_W(nsites)) - allocate(cpoly%moist_f(nsites)) - allocate(cpoly%moist_tau(nsites)) - allocate(cpoly%moist_zi(nsites)) - allocate(cpoly%baseflow(nsites)) - allocate(cpoly%ncol_soil(nsites)) - allocate(cpoly%ntext_soil(nzg,nsites)) - allocate(cpoly%min_monthly_temp(nsites)) - allocate(cpoly%plantation(nsites)) - allocate(cpoly%agri_stocking_pft(nsites)) - allocate(cpoly%agri_stocking_density(nsites)) - allocate(cpoly%plantation_stocking_pft(nsites)) - allocate(cpoly%plantation_stocking_density(nsites)) - allocate(cpoly%primary_harvest_memory(nsites)) - allocate(cpoly%secondary_harvest_memory(nsites)) - allocate(cpoly%fire_disturbance_rate(nsites)) - allocate(cpoly%ignition_rate(nsites)) - allocate(cpoly%lambda_fire(12,nsites)) - allocate(cpoly%avg_monthly_pcpg(12,nsites)) - allocate(cpoly%phen_pars(nsites))!THIS PTR IS ALLOCATED IN PHENOLOGY_INIT - allocate(cpoly%nat_disturbance_rate(nsites)) - allocate(cpoly%nat_dist_type(nsites)) - allocate(cpoly%disturbance_memory(n_dist_types,n_dist_types,nsites)) - allocate(cpoly%disturbance_rates(n_dist_types,n_dist_types,nsites)) - - allocate(cpoly%green_leaf_factor(n_pft,nsites)) - allocate(cpoly%leaf_aging_factor(n_pft,nsites)) - - allocate(cpoly%met(nsites)) - - allocate(cpoly%basal_area (n_pft,n_dbh,nsites)) - allocate(cpoly%agb (n_pft,n_dbh,nsites)) - allocate(cpoly%pldens (n_pft,n_dbh,nsites)) - allocate(cpoly%bseeds (n_pft,n_dbh,nsites)) - - allocate(cpoly%basal_area_growth (n_pft,n_dbh,nsites)) - allocate(cpoly%agb_growth (n_pft,n_dbh,nsites)) - allocate(cpoly%basal_area_mort (n_pft,n_dbh,nsites)) - allocate(cpoly%basal_area_cut (n_pft,n_dbh,nsites)) - allocate(cpoly%agb_mort (n_pft,n_dbh,nsites)) - allocate(cpoly%agb_cut (n_pft,n_dbh,nsites)) - - allocate(cpoly%cosaoi(nsites)) - allocate(cpoly%avg_albedo_beam(nsites)) - allocate(cpoly%avg_albedo_diffuse(nsites)) - allocate(cpoly%avg_rlong_albedo(nsites)) - - allocate(cpoly%avg_albedo(nsites)) - allocate(cpoly%avg_rlongup(nsites)) - allocate(cpoly%avg_parup(nsites)) - allocate(cpoly%avg_nirup(nsites)) - allocate(cpoly%avg_rshortup(nsites)) - allocate(cpoly%avg_rnet(nsites)) - allocate(cpoly%daylight(nsites)) - - allocate(cpoly%lai (nsites)) - allocate(cpoly%avg_lma(nsites)) - allocate(cpoly%wai (nsites)) - ! Fast time flux diagnostics - ! --------------------------------------------- - allocate(cpoly%avg_vapor_lc (nsites)) - allocate(cpoly%avg_vapor_wc (nsites)) - allocate(cpoly%avg_vapor_gc (nsites)) - allocate(cpoly%avg_wshed_vg (nsites)) - allocate(cpoly%avg_intercepted (nsites)) - allocate(cpoly%avg_throughfall (nsites)) - allocate(cpoly%avg_vapor_ac (nsites)) - allocate(cpoly%avg_transp (nsites)) - allocate(cpoly%avg_evap (nsites)) - - allocate(cpoly%avg_smoist_gg (nzg,nsites)) - allocate(cpoly%avg_transloss (nzg,nsites)) - allocate(cpoly%avg_runoff (nsites)) - allocate(cpoly%avg_drainage (nsites)) - allocate(cpoly%avg_drainage_heat (nsites)) - allocate(cpoly%avg_rshort_gnd (nsites)) - allocate(cpoly%avg_par_gnd (nsites)) - allocate(cpoly%avg_rlong_gnd (nsites)) - allocate(cpoly%avg_ustar (nsites)) - allocate(cpoly%avg_tstar (nsites)) - allocate(cpoly%avg_qstar (nsites)) - allocate(cpoly%avg_cstar (nsites)) - allocate(cpoly%avg_carbon_ac (nsites)) - allocate(cpoly%avg_carbon_st (nsites)) - allocate(cpoly%avg_sensible_lc (nsites)) - allocate(cpoly%avg_sensible_wc (nsites)) - allocate(cpoly%avg_qwshed_vg (nsites)) - allocate(cpoly%avg_qintercepted (nsites)) - allocate(cpoly%avg_qthroughfall (nsites)) - allocate(cpoly%avg_sensible_gc (nsites)) - allocate(cpoly%avg_sensible_ac (nsites)) - allocate(cpoly%avg_sensible_gg (nzg,nsites)) - allocate(cpoly%avg_runoff_heat (nsites)) - - ! Fast time state diagnostics - allocate(cpoly%avg_leaf_energy (nsites)) - allocate(cpoly%avg_leaf_hcap (nsites)) - allocate(cpoly%avg_leaf_temp (nsites)) - allocate(cpoly%avg_leaf_vpdef (nsites)) - allocate(cpoly%avg_leaf_fliq (nsites)) - allocate(cpoly%avg_leaf_water (nsites)) - allocate(cpoly%avg_wood_energy (nsites)) - allocate(cpoly%avg_wood_hcap (nsites)) - allocate(cpoly%avg_wood_temp (nsites)) - allocate(cpoly%avg_wood_fliq (nsites)) - allocate(cpoly%avg_wood_water (nsites)) - allocate(cpoly%avg_can_temp (nsites)) - allocate(cpoly%avg_can_shv (nsites)) - allocate(cpoly%avg_can_co2 (nsites)) - allocate(cpoly%avg_can_rhos (nsites)) - allocate(cpoly%avg_can_prss (nsites)) - allocate(cpoly%avg_can_theta (nsites)) - allocate(cpoly%avg_can_theiv (nsites)) - allocate(cpoly%avg_can_vpdef (nsites)) - allocate(cpoly%avg_can_depth (nsites)) - allocate(cpoly%avg_soil_energy (nzg,nsites)) - allocate(cpoly%avg_soil_mstpot (nzg,nsites)) - allocate(cpoly%avg_soil_water (nzg,nsites)) - allocate(cpoly%avg_soil_temp (nzg,nsites)) - allocate(cpoly%avg_soil_fracliq (nzg,nsites)) - allocate(cpoly%avg_soil_rootfrac (nzg,nsites)) - allocate(cpoly%avg_soil_wetness (nsites)) - allocate(cpoly%avg_skin_temp (nsites)) - allocate(cpoly%avg_available_water (nsites)) - allocate(cpoly%runoff (nsites)) - ! Phenology-related - allocate(cpoly%rad_avg (nsites)) - ! Meteorological data - allocate(cpoly%avg_atm_tmp (nsites)) - allocate(cpoly%avg_atm_vpdef (nsites)) - allocate(cpoly%avg_atm_shv (nsites)) - allocate(cpoly%avg_atm_prss (nsites)) - - !!!NACP - allocate(cpoly%avg_sfcw_depth (nsites)) - allocate(cpoly%avg_sfcw_energy (nsites)) - allocate(cpoly%avg_sfcw_mass (nsites)) - allocate(cpoly%avg_sfcw_fracliq (nsites)) - allocate(cpoly%avg_sfcw_tempk (nsites)) - allocate(cpoly%avg_fsc (nsites)) - allocate(cpoly%avg_stsc (nsites)) - allocate(cpoly%avg_ssc (nsites)) - allocate(cpoly%avg_balive (nsites)) - allocate(cpoly%avg_bleaf (nsites)) - allocate(cpoly%avg_broot (nsites)) - allocate(cpoly%avg_bsapwooda (nsites)) - allocate(cpoly%avg_bsapwoodb (nsites)) - allocate(cpoly%avg_bdead (nsites)) - allocate(cpoly%avg_fsn (nsites)) - allocate(cpoly%avg_msn (nsites)) - - - allocate(cpoly%avg_bstorage (nsites)) - allocate(cpoly%avg_bseeds (nsites)) - - - allocate(cpoly%dmean_co2_residual (nsites)) - allocate(cpoly%dmean_energy_residual (nsites)) - allocate(cpoly%dmean_water_residual (nsites)) - allocate(cpoly%mmean_co2_residual (nsites)) - allocate(cpoly%mmean_energy_residual (nsites)) - allocate(cpoly%mmean_water_residual (nsites)) - - return - end subroutine allocate_polygontype -!============================================================================! -!============================================================================! + ! CHANGED THE FOLLOWING UNIT DESCRIPTORS: FROM (cm2/m2/yr) RGK 6-13-08 + !------------ + ! BASAL_AREA accruing due to growth (cm2/m2/yr) + real,pointer,dimension(:) :: total_basal_area_growth + ! BASAL_AREA lost due to mortality (cm2/m2/yr) + real,pointer,dimension(:) :: total_basal_area_mort + ! BASAL_AREA used to generate recruits (cm2/m2/yr) + real,pointer,dimension(:) :: total_basal_area_recruit + !------------ -!============================================================================! -!============================================================================! - subroutine allocate_sitetype(csite,npatches) + integer,pointer,dimension(:) :: nsites + ! list of site numbers + integer,pointer,dimension(:,:) :: sitenums !(max_site,npolygons) + + ! specification if the adjacency table was loaded from a file + integer,pointer,dimension(:) :: load_adjacency - implicit none + !! Meteorological driver data + type(met_driv_data),pointer,dimension(:) :: metinput + + !! Lapse rate transfer data + type(met_driv_state),pointer,dimension(:) :: met, lapse - integer :: npatches,ipa - type(sitetype),target :: csite - - call nullify_sitetype(csite) - csite%npatches = npatches - allocate(csite%paco_id(npatches)) - allocate(csite%paco_n(npatches)) - allocate(csite%patch(npatches)) - - ! Initialize zero cohorts - do ipa=1,npatches - csite%patch(ipa)%ncohorts = 0 - end do - - allocate(csite%lai(npatches)) - allocate(csite%wai(npatches)) - allocate(csite%dist_type(npatches)) - allocate(csite%age(npatches)) - allocate(csite%area(npatches)) - allocate(csite%fast_soil_C(npatches)) - allocate(csite%slow_soil_C(npatches)) - allocate(csite%structural_soil_C(npatches)) - allocate(csite%structural_soil_L(npatches)) - allocate(csite%mineralized_soil_N(npatches)) - allocate(csite%fast_soil_N(npatches)) - allocate(csite%sum_dgd(npatches)) - allocate(csite%sum_chd(npatches)) - allocate(csite%plantation(npatches)) - allocate(csite%can_theiv(npatches)) - allocate(csite%can_vpdef(npatches)) - allocate(csite%can_temp(npatches)) - allocate(csite%can_temp_pv(npatches)) - allocate(csite%can_shv(npatches)) - allocate(csite%can_co2(npatches)) - allocate(csite%can_rhos(npatches)) - allocate(csite%can_prss(npatches)) - allocate(csite%can_theta(npatches)) - allocate(csite%can_depth(npatches)) - allocate(csite%opencan_frac(npatches)) - allocate(csite%ggbare(npatches)) - allocate(csite%ggveg(npatches)) - allocate(csite%ggnet(npatches)) - allocate(csite%ggsoil(npatches)) - allocate(csite%cohort_count(npatches)) - allocate(csite%pname(npatches)) - - allocate(csite%sfcwater_mass(nzs,npatches)) - allocate(csite%sfcwater_energy(nzs,npatches)) - allocate(csite%sfcwater_depth(nzs,npatches)) - allocate(csite%rshort_s(nzs,npatches)) - allocate(csite%rshort_s_beam(nzs,npatches)) - allocate(csite%rshort_s_diffuse(nzs,npatches)) - allocate(csite%par_s(nzs,npatches)) - allocate(csite%par_s_beam(nzs,npatches)) - allocate(csite%par_s_diffuse(nzs,npatches)) - allocate(csite%sfcwater_tempk(nzs,npatches)) - allocate(csite%sfcwater_fracliq(nzs,npatches)) - allocate(csite%nlev_sfcwater(npatches)) - allocate(csite%soil_energy(nzg,npatches)) - allocate(csite%soil_water(nzg,npatches)) - allocate(csite%soil_tempk(nzg,npatches)) - allocate(csite%soil_fracliq(nzg,npatches)) - allocate(csite%rootdense(nzg,npatches)) - allocate(csite%ground_shv(npatches)) - allocate(csite%ground_ssh(npatches)) - allocate(csite%ground_temp(npatches)) - allocate(csite%ground_fliq(npatches)) - allocate(csite%rough(npatches)) - allocate(csite%par_l_max(npatches)) - allocate(csite%par_l_beam_max(npatches)) - allocate(csite%par_l_diffuse_max(npatches)) - allocate(csite%A_o_max(n_pft,npatches)) - allocate(csite%A_c_max(n_pft,npatches)) - - allocate(csite%avg_daily_temp(npatches)) - allocate(csite%avg_monthly_gndwater(npatches)) - allocate(csite%avg_monthly_waterdef(npatches)) - allocate(csite%mean_rh(npatches)) - allocate(csite%mean_cwd_rh(npatches)) - allocate(csite%mean_nep(npatches)) - allocate(csite%wbudget_loss2atm(npatches)) - allocate(csite%wbudget_denseffect(npatches)) - allocate(csite%wbudget_precipgain(npatches)) - allocate(csite%wbudget_loss2runoff(npatches)) - allocate(csite%wbudget_loss2drainage(npatches)) - allocate(csite%wbudget_initialstorage(npatches)) - allocate(csite%wbudget_residual(npatches)) - allocate(csite%ebudget_loss2atm(npatches)) - allocate(csite%ebudget_denseffect(npatches)) - allocate(csite%ebudget_prsseffect(npatches)) - allocate(csite%ebudget_loss2runoff(npatches)) - allocate(csite%ebudget_loss2drainage(npatches)) - allocate(csite%ebudget_netrad(npatches)) - allocate(csite%ebudget_precipgain(npatches)) - allocate(csite%ebudget_initialstorage(npatches)) - allocate(csite%ebudget_residual(npatches)) - allocate(csite%co2budget_initialstorage(npatches)) - allocate(csite%co2budget_residual(npatches)) - allocate(csite%co2budget_loss2atm(npatches)) - allocate(csite%co2budget_denseffect(npatches)) - allocate(csite%co2budget_gpp(npatches)) - allocate(csite%co2budget_gpp_dbh(n_dbh,npatches)) - allocate(csite%co2budget_plresp(npatches)) - allocate(csite%co2budget_rh(npatches)) - allocate(csite%co2budget_cwd_rh(npatches)) - allocate(csite%today_A_decomp(npatches)) - allocate(csite%today_Af_decomp(npatches)) - allocate(csite%repro(n_pft,npatches)) - allocate(csite%veg_rough(npatches)) - allocate(csite%veg_height (npatches)) - allocate(csite%veg_displace (npatches)) - allocate(csite%fsc_in(npatches)) - allocate(csite%ssc_in(npatches)) - allocate(csite%ssl_in(npatches)) - allocate(csite%fsn_in(npatches)) - allocate(csite%total_plant_nitrogen_uptake(npatches)) - allocate(csite%mineralized_N_loss(npatches)) - allocate(csite%mineralized_N_input(npatches)) - allocate(csite%rshort_g(npatches)) - allocate(csite%rshort_g_beam(npatches)) - allocate(csite%rshort_g_diffuse(npatches)) - allocate(csite%par_g(npatches)) - allocate(csite%par_g_beam(npatches)) - allocate(csite%par_g_diffuse(npatches)) - allocate(csite%par_b(npatches)) - allocate(csite%par_b_beam(npatches)) - allocate(csite%par_b_diffuse(npatches)) - allocate(csite%nir_b(npatches)) - allocate(csite%nir_b_beam(npatches)) - allocate(csite%nir_b_diffuse(npatches)) - allocate(csite%rlong_g(npatches)) - allocate(csite%rlong_g_surf(npatches)) - allocate(csite%rlong_g_incid(npatches)) - allocate(csite%rlong_s(npatches)) - allocate(csite%rlong_s_surf(npatches)) - allocate(csite%rlong_s_incid(npatches)) - allocate(csite%albedo(npatches)) - allocate(csite%albedo_beam(npatches)) - allocate(csite%albedo_diffuse(npatches)) - allocate(csite%rnet(npatches)) - allocate(csite%rlongup(npatches)) - allocate(csite%parup(npatches)) - allocate(csite%nirup(npatches)) - allocate(csite%rshortup(npatches)) - allocate(csite%rlong_albedo(npatches)) - allocate(csite%total_sfcw_depth(npatches)) - allocate(csite%snowfac(npatches)) - allocate(csite%A_decomp(npatches)) - allocate(csite%f_decomp(npatches)) - allocate(csite%rh(npatches)) - allocate(csite%cwd_rh(npatches)) - allocate(csite%cumlai_profile(n_pft,ff_nhgt,npatches)) - allocate(csite%plant_ag_biomass(npatches)) - - allocate(csite%htry (npatches)) - allocate(csite%hprev (npatches)) - - allocate(csite%avg_rk4step(npatches)) - - allocate(csite%avg_available_water(npatches)) - - allocate(csite%ustar(npatches)) - allocate(csite%tstar(npatches)) - allocate(csite%qstar(npatches)) - allocate(csite%cstar(npatches)) - - allocate(csite%zeta (npatches)) - allocate(csite%ribulk(npatches)) - - allocate(csite%upwp(npatches)) - allocate(csite%qpwp(npatches)) - allocate(csite%cpwp(npatches)) - allocate(csite%tpwp(npatches)) - allocate(csite%wpwp(npatches)) - - allocate(csite%avg_rshort_gnd (npatches)) - allocate(csite%avg_par_gnd (npatches)) - allocate(csite%avg_rlong_gnd (npatches)) - allocate(csite%avg_ustar (npatches)) - allocate(csite%avg_tstar (npatches)) - allocate(csite%avg_qstar (npatches)) - allocate(csite%avg_cstar (npatches)) - allocate(csite%avg_carbon_ac (npatches)) - allocate(csite%avg_carbon_st (npatches)) - allocate(csite%avg_rlongup (npatches)) - allocate(csite%avg_parup (npatches)) - allocate(csite%avg_nirup (npatches)) - allocate(csite%avg_rshortup (npatches)) - allocate(csite%avg_rnet (npatches)) - allocate(csite%avg_albedo (npatches)) - allocate(csite%avg_albedo_beam (npatches)) - allocate(csite%avg_albedo_diffuse (npatches)) - allocate(csite%avg_rlong_albedo (npatches)) - - ! Fast time flux diagnostics - ! --------------------------------------------- - allocate(csite%avg_vapor_lc (npatches)) - allocate(csite%avg_vapor_wc (npatches)) - allocate(csite%avg_vapor_gc (npatches)) - allocate(csite%avg_wshed_vg (npatches)) - allocate(csite%avg_intercepted (npatches)) - allocate(csite%avg_throughfall (npatches)) - allocate(csite%avg_vapor_ac (npatches)) - allocate(csite%avg_transp (npatches)) - allocate(csite%avg_evap (npatches)) - allocate(csite%avg_smoist_gg (nzg,npatches)) - allocate(csite%avg_transloss (nzg,npatches)) - allocate(csite%avg_runoff (npatches)) - allocate(csite%avg_drainage (npatches)) - allocate(csite%avg_drainage_heat (npatches)) - allocate(csite%avg_sensible_lc (npatches)) - allocate(csite%avg_sensible_wc (npatches)) - allocate(csite%avg_qwshed_vg (npatches)) - allocate(csite%avg_qintercepted (npatches)) - allocate(csite%avg_qthroughfall (npatches)) - allocate(csite%avg_sensible_gc (npatches)) - allocate(csite%avg_sensible_ac (npatches)) - allocate(csite%avg_sensible_gg (nzg,npatches)) - allocate(csite%avg_runoff_heat (npatches)) - - ! ---------------------------------------------- - - allocate(csite%avg_leaf_energy(npatches)) - allocate(csite%avg_leaf_temp (npatches)) - allocate(csite%avg_leaf_vpdef (npatches)) - allocate(csite%avg_leaf_hcap (npatches)) - allocate(csite%avg_leaf_fliq (npatches)) - allocate(csite%avg_leaf_water (npatches)) - allocate(csite%avg_wood_energy(npatches)) - allocate(csite%avg_wood_temp (npatches)) - allocate(csite%avg_wood_hcap (npatches)) - allocate(csite%avg_wood_fliq (npatches)) - allocate(csite%avg_wood_water (npatches)) - - - allocate(csite%watertable (npatches)) - allocate(csite%moist_dz (npatches)) - allocate(csite%ksat (npatches)) - allocate(csite%soil_sat_energy (npatches)) - allocate(csite%soil_sat_water (npatches)) - allocate(csite%soil_sat_heat (npatches)) - - allocate(csite%runoff_A (3,npatches)) - allocate(csite%runoff_rate (npatches)) - allocate(csite%runoff (npatches)) - - if (imoutput > 0 .or. idoutput > 0 .or. iqoutput > 0) then - allocate(csite%dmean_rk4step (npatches)) - allocate(csite%dmean_co2_residual (npatches)) - allocate(csite%dmean_energy_residual (npatches)) - allocate(csite%dmean_water_residual (npatches)) - allocate(csite%dmean_rh (npatches)) - allocate(csite%dmean_cwd_rh (npatches)) - allocate(csite%dmean_A_decomp (npatches)) - allocate(csite%dmean_Af_decomp (npatches)) - allocate(csite%dmean_albedo (npatches)) - allocate(csite%dmean_albedo_beam (npatches)) - allocate(csite%dmean_albedo_diffuse (npatches)) - end if - if (imoutput > 0 .or. iqoutput > 0) then - allocate(csite%mmean_rk4step (npatches)) - allocate(csite%mmean_co2_residual (npatches)) - allocate(csite%mmean_energy_residual (npatches)) - allocate(csite%mmean_water_residual (npatches)) - allocate(csite%mmean_rh (npatches)) - allocate(csite%mmean_cwd_rh (npatches)) - allocate(csite%mmean_A_decomp (npatches)) - allocate(csite%mmean_Af_decomp (npatches)) - allocate(csite%mmean_albedo (npatches)) - allocate(csite%mmean_albedo_beam (npatches)) - allocate(csite%mmean_albedo_diffuse (npatches)) - end if - if (iqoutput > 0) then - allocate(csite%qmean_rh (ndcycle,npatches)) - allocate(csite%qmean_cwd_rh (ndcycle,npatches)) - allocate(csite%qmean_albedo (ndcycle,npatches)) - allocate(csite%qmean_albedo_beam (ndcycle,npatches)) - allocate(csite%qmean_albedo_diffuse(ndcycle,npatches)) - end if - - return - end subroutine allocate_sitetype -!============================================================================! -!============================================================================! - - - - - -!============================================================================! -!============================================================================! - subroutine allocate_patchtype(cpatch,ncohorts) - - implicit none - - integer :: ncohorts - type(patchtype),target :: cpatch - - call nullify_patchtype(cpatch) - cpatch%ncohorts = ncohorts + real,pointer,dimension(:) :: cosz - !----- We need to leave the subroutine in case this patch is empty. -------------------! - if (ncohorts == 0) return - - allocate(cpatch%pft(ncohorts)) - allocate(cpatch%nplant(ncohorts)) - allocate(cpatch%hite(ncohorts)) - allocate(cpatch%agb(ncohorts)) - allocate(cpatch%basarea(ncohorts)) - allocate(cpatch%dagb_dt(ncohorts)) - allocate(cpatch%dlnagb_dt(ncohorts)) - allocate(cpatch%dba_dt(ncohorts)) - allocate(cpatch%dlnba_dt(ncohorts)) - allocate(cpatch%ddbh_dt(ncohorts)) - allocate(cpatch%dlndbh_dt(ncohorts)) - allocate(cpatch%dbh(ncohorts)) - allocate(cpatch%bdead(ncohorts)) - allocate(cpatch%bleaf(ncohorts)) - allocate(cpatch%phenology_status(ncohorts)) - allocate(cpatch%recruit_dbh(ncohorts)) - allocate(cpatch%census_status(ncohorts)) - allocate(cpatch%balive(ncohorts)) - allocate(cpatch%broot(ncohorts)) - allocate(cpatch%bsapwooda(ncohorts)) - allocate(cpatch%bsapwoodb(ncohorts)) - allocate(cpatch%lai(ncohorts)) - allocate(cpatch%wai(ncohorts)) - allocate(cpatch%crown_area(ncohorts)) - allocate(cpatch%leaf_resolvable(ncohorts)) - allocate(cpatch%wood_resolvable(ncohorts)) - allocate(cpatch%bstorage(ncohorts)) - allocate(cpatch%cb(13,ncohorts)) - allocate(cpatch%cb_lightmax(13,ncohorts)) - allocate(cpatch%cb_moistmax(13,ncohorts)) - allocate(cpatch%cbr_bar(ncohorts)) - allocate(cpatch%leaf_energy(ncohorts)) - allocate(cpatch%leaf_temp (ncohorts)) - allocate(cpatch%leaf_vpdef (ncohorts)) - allocate(cpatch%leaf_temp_pv(ncohorts)) - allocate(cpatch%leaf_hcap (ncohorts)) - allocate(cpatch%leaf_fliq (ncohorts)) - allocate(cpatch%leaf_water (ncohorts)) - allocate(cpatch%wood_energy(ncohorts)) - allocate(cpatch%wood_temp (ncohorts)) - allocate(cpatch%wood_temp_pv (ncohorts)) - allocate(cpatch%wood_hcap (ncohorts)) - allocate(cpatch%wood_fliq (ncohorts)) - allocate(cpatch%wood_water (ncohorts)) - allocate(cpatch%veg_wind(ncohorts)) - allocate(cpatch%lsfc_shv_open(ncohorts)) - allocate(cpatch%lsfc_shv_closed(ncohorts)) - allocate(cpatch%lsfc_co2_open(ncohorts)) - allocate(cpatch%lsfc_co2_closed(ncohorts)) - allocate(cpatch%lint_shv(ncohorts)) - allocate(cpatch%lint_co2_open(ncohorts)) - allocate(cpatch%lint_co2_closed(ncohorts)) - allocate(cpatch%mean_gpp(ncohorts)) - allocate(cpatch%mean_leaf_resp(ncohorts)) - allocate(cpatch%mean_root_resp(ncohorts)) - allocate(cpatch%mean_growth_resp(ncohorts)) - allocate(cpatch%mean_storage_resp(ncohorts)) - allocate(cpatch%mean_vleaf_resp(ncohorts)) - allocate(cpatch%today_leaf_resp(ncohorts)) - allocate(cpatch%today_root_resp(ncohorts)) - allocate(cpatch%today_gpp(ncohorts)) - allocate(cpatch%today_nppleaf(ncohorts)) - allocate(cpatch%today_nppfroot(ncohorts)) - allocate(cpatch%today_nppsapwood(ncohorts)) - allocate(cpatch%today_nppcroot(ncohorts)) - allocate(cpatch%today_nppseeds(ncohorts)) - allocate(cpatch%today_nppwood(ncohorts)) - allocate(cpatch%today_nppdaily(ncohorts)) - allocate(cpatch%today_gpp_pot(ncohorts)) - allocate(cpatch%today_gpp_lightmax(ncohorts)) - allocate(cpatch%today_gpp_moistmax(ncohorts)) - allocate(cpatch%growth_respiration(ncohorts)) - allocate(cpatch%storage_respiration(ncohorts)) - allocate(cpatch%vleaf_respiration(ncohorts)) - allocate(cpatch%fsn(ncohorts)) - allocate(cpatch%monthly_dndt(ncohorts)) - allocate(cpatch%monthly_dlnndt(ncohorts)) - allocate(cpatch%mort_rate(n_mort,ncohorts)) - - allocate(cpatch%Psi_open(ncohorts)) - allocate(cpatch%krdepth(ncohorts)) - allocate(cpatch%first_census(ncohorts)) - allocate(cpatch%new_recruit_flag(ncohorts)) - allocate(cpatch%light_level(ncohorts)) - allocate(cpatch%light_level_beam(ncohorts)) - allocate(cpatch%light_level_diff(ncohorts)) - allocate(cpatch%par_l(ncohorts)) - allocate(cpatch%par_l_beam(ncohorts)) - allocate(cpatch%par_l_diffuse(ncohorts)) - allocate(cpatch%rshort_l(ncohorts)) - allocate(cpatch%rshort_l_beam(ncohorts)) - allocate(cpatch%rshort_l_diffuse(ncohorts)) - allocate(cpatch%rlong_l(ncohorts)) - allocate(cpatch%rlong_l_surf(ncohorts)) - allocate(cpatch%rlong_l_incid(ncohorts)) - allocate(cpatch%rshort_w(ncohorts)) - allocate(cpatch%rshort_w_beam(ncohorts)) - allocate(cpatch%rshort_w_diffuse(ncohorts)) - allocate(cpatch%rlong_w(ncohorts)) - allocate(cpatch%rlong_w_surf(ncohorts)) - allocate(cpatch%rlong_w_incid(ncohorts)) - allocate(cpatch%leaf_gbh(ncohorts)) - allocate(cpatch%leaf_gbw(ncohorts)) - allocate(cpatch%wood_gbh(ncohorts)) - allocate(cpatch%wood_gbw(ncohorts)) - allocate(cpatch%A_open(ncohorts)) - allocate(cpatch%A_closed(ncohorts)) - allocate(cpatch%Psi_closed(ncohorts)) - allocate(cpatch%gsw_open(ncohorts)) - allocate(cpatch%gsw_closed(ncohorts)) - allocate(cpatch%fsw(ncohorts)) - allocate(cpatch%fs_open(ncohorts)) - allocate(cpatch%water_supply(ncohorts)) - allocate(cpatch%stomatal_conductance(ncohorts)) - allocate(cpatch%leaf_maintenance(ncohorts)) - allocate(cpatch%root_maintenance(ncohorts)) - allocate(cpatch%leaf_drop(ncohorts)) - allocate(cpatch%bseeds(ncohorts)) - allocate(cpatch%leaf_respiration(ncohorts)) - allocate(cpatch%root_respiration(ncohorts)) - allocate(cpatch%gpp(ncohorts)) - allocate(cpatch%paw_avg(ncohorts)) - allocate(cpatch%elongf(ncohorts)) - allocate(cpatch%turnover_amp(ncohorts)) - allocate(cpatch%llspan(ncohorts)) - allocate(cpatch%vm_bar(ncohorts)) - allocate(cpatch%sla(ncohorts)) - - allocate(cpatch%mean_par_l (ncohorts)) - allocate(cpatch%mean_par_l_beam (ncohorts)) - allocate(cpatch%mean_par_l_diff (ncohorts)) - - allocate(cpatch%mean_rshort_l (ncohorts)) - allocate(cpatch%mean_rlong_l (ncohorts)) - allocate(cpatch%mean_sensible_lc (ncohorts)) - allocate(cpatch%mean_vapor_lc (ncohorts)) - allocate(cpatch%mean_transp (ncohorts)) - allocate(cpatch%mean_intercepted_al(ncohorts)) - allocate(cpatch%mean_wshed_lg (ncohorts)) - allocate(cpatch%mean_rshort_w (ncohorts)) - allocate(cpatch%mean_rlong_w (ncohorts)) - allocate(cpatch%mean_sensible_wc (ncohorts)) - allocate(cpatch%mean_vapor_wc (ncohorts)) - allocate(cpatch%mean_intercepted_aw(ncohorts)) - allocate(cpatch%mean_wshed_wg (ncohorts)) - - - - if (idoutput > 0 .or. imoutput > 0 .or. iqoutput > 0) then - allocate(cpatch%dmean_par_l(ncohorts)) - allocate(cpatch%dmean_par_l_beam(ncohorts)) - allocate(cpatch%dmean_par_l_diff(ncohorts)) - allocate(cpatch%dmean_light_level(ncohorts)) - allocate(cpatch%dmean_light_level_beam(ncohorts)) - allocate(cpatch%dmean_light_level_diff(ncohorts)) - allocate(cpatch%dmean_fs_open(ncohorts)) - allocate(cpatch%dmean_fsw(ncohorts)) - allocate(cpatch%dmean_fsn(ncohorts)) - allocate(cpatch%dmean_psi_open(ncohorts)) - allocate(cpatch%dmean_psi_closed(ncohorts)) - allocate(cpatch%dmean_water_supply(ncohorts)) - allocate(cpatch%dmean_gpp(ncohorts)) - allocate(cpatch%dmean_leaf_resp(ncohorts)) - allocate(cpatch%dmean_root_resp(ncohorts)) - allocate(cpatch%dmean_rshort_l (ncohorts)) - allocate(cpatch%dmean_rlong_l (ncohorts)) - allocate(cpatch%dmean_sensible_lc (ncohorts)) - allocate(cpatch%dmean_vapor_lc (ncohorts)) - allocate(cpatch%dmean_transp (ncohorts)) - allocate(cpatch%dmean_intercepted_al(ncohorts)) - allocate(cpatch%dmean_wshed_lg (ncohorts)) - allocate(cpatch%dmean_rshort_w (ncohorts)) - allocate(cpatch%dmean_rlong_w (ncohorts)) - allocate(cpatch%dmean_sensible_wc (ncohorts)) - allocate(cpatch%dmean_vapor_wc (ncohorts)) - allocate(cpatch%dmean_intercepted_aw(ncohorts)) - allocate(cpatch%dmean_wshed_wg (ncohorts)) - end if - - allocate(cpatch%dmean_nppleaf(ncohorts)) - allocate(cpatch%dmean_nppfroot(ncohorts)) - allocate(cpatch%dmean_nppsapwood(ncohorts)) - allocate(cpatch%dmean_nppcroot(ncohorts)) - allocate(cpatch%dmean_nppseeds(ncohorts)) - allocate(cpatch%dmean_nppwood(ncohorts)) - allocate(cpatch%dmean_nppdaily(ncohorts)) - - !end if - - if (imoutput > 0 .or. iqoutput > 0) then - allocate(cpatch%mmean_par_l(ncohorts)) - allocate(cpatch%mmean_par_l_beam(ncohorts)) - allocate(cpatch%mmean_par_l_diff(ncohorts)) - allocate(cpatch%mmean_light_level(ncohorts)) - allocate(cpatch%mmean_light_level_beam(ncohorts)) - allocate(cpatch%mmean_light_level_diff(ncohorts)) - allocate(cpatch%mmean_fs_open(ncohorts)) - allocate(cpatch%mmean_fsw(ncohorts)) - allocate(cpatch%mmean_fsn(ncohorts)) - allocate(cpatch%mmean_psi_open(ncohorts)) - allocate(cpatch%mmean_psi_closed(ncohorts)) - allocate(cpatch%mmean_water_supply(ncohorts)) - allocate(cpatch%mmean_leaf_maintenance(ncohorts)) - allocate(cpatch%mmean_root_maintenance(ncohorts)) - allocate(cpatch%mmean_leaf_drop(ncohorts)) - allocate(cpatch%mmean_cb(ncohorts)) - allocate(cpatch%mmean_gpp(ncohorts)) - allocate(cpatch%mmean_leaf_resp(ncohorts)) - allocate(cpatch%mmean_root_resp(ncohorts)) - allocate(cpatch%mmean_growth_resp(ncohorts)) - allocate(cpatch%mmean_storage_resp(ncohorts)) - allocate(cpatch%mmean_vleaf_resp(ncohorts)) - allocate(cpatch%mmean_mort_rate(n_mort,ncohorts)) - allocate(cpatch%mmean_rshort_l (ncohorts)) - allocate(cpatch%mmean_rlong_l (ncohorts)) - allocate(cpatch%mmean_sensible_lc (ncohorts)) - allocate(cpatch%mmean_vapor_lc (ncohorts)) - allocate(cpatch%mmean_transp (ncohorts)) - allocate(cpatch%mmean_intercepted_al(ncohorts)) - allocate(cpatch%mmean_wshed_lg (ncohorts)) - allocate(cpatch%mmean_rshort_w (ncohorts)) - allocate(cpatch%mmean_rlong_w (ncohorts)) - allocate(cpatch%mmean_sensible_wc (ncohorts)) - allocate(cpatch%mmean_vapor_wc (ncohorts)) - allocate(cpatch%mmean_intercepted_aw(ncohorts)) - allocate(cpatch%mmean_wshed_wg (ncohorts)) - end if - - allocate(cpatch%mmean_nppleaf(ncohorts)) - allocate(cpatch%mmean_nppfroot(ncohorts)) - allocate(cpatch%mmean_nppsapwood(ncohorts)) - allocate(cpatch%mmean_nppcroot(ncohorts)) - allocate(cpatch%mmean_nppseeds(ncohorts)) - allocate(cpatch%mmean_nppwood(ncohorts)) - allocate(cpatch%mmean_nppdaily(ncohorts)) - - if (iqoutput > 0) then - allocate(cpatch%qmean_par_l (ndcycle,ncohorts)) - allocate(cpatch%qmean_par_l_beam (ndcycle,ncohorts)) - allocate(cpatch%qmean_par_l_diff (ndcycle,ncohorts)) - allocate(cpatch%qmean_fs_open (ndcycle,ncohorts)) - allocate(cpatch%qmean_fsw (ndcycle,ncohorts)) - allocate(cpatch%qmean_fsn (ndcycle,ncohorts)) - allocate(cpatch%qmean_psi_open (ndcycle,ncohorts)) - allocate(cpatch%qmean_psi_closed (ndcycle,ncohorts)) - allocate(cpatch%qmean_water_supply (ndcycle,ncohorts)) - allocate(cpatch%qmean_gpp (ndcycle,ncohorts)) - allocate(cpatch%qmean_leaf_resp (ndcycle,ncohorts)) - allocate(cpatch%qmean_root_resp (ndcycle,ncohorts)) - allocate(cpatch%qmean_rshort_l (ndcycle,ncohorts)) - allocate(cpatch%qmean_rlong_l (ndcycle,ncohorts)) - allocate(cpatch%qmean_sensible_lc (ndcycle,ncohorts)) - allocate(cpatch%qmean_vapor_lc (ndcycle,ncohorts)) - allocate(cpatch%qmean_transp (ndcycle,ncohorts)) - allocate(cpatch%qmean_intercepted_al(ndcycle,ncohorts)) - allocate(cpatch%qmean_wshed_lg (ndcycle,ncohorts)) - allocate(cpatch%qmean_rshort_w (ndcycle,ncohorts)) - allocate(cpatch%qmean_rlong_w (ndcycle,ncohorts)) - allocate(cpatch%qmean_sensible_wc (ndcycle,ncohorts)) - allocate(cpatch%qmean_vapor_wc (ndcycle,ncohorts)) - allocate(cpatch%qmean_intercepted_aw(ndcycle,ncohorts)) - allocate(cpatch%qmean_wshed_wg (ndcycle,ncohorts)) - end if - - return - end subroutine allocate_patchtype -!============================================================================! -!============================================================================! - - - - - -!============================================================================! -!============================================================================! - subroutine nullify_edtype(cgrid) - - implicit none - type(edtype),target :: cgrid - - - nullify(cgrid%polygon ) - nullify(cgrid%lat ) - nullify(cgrid%lon ) - nullify(cgrid%xatm ) - nullify(cgrid%yatm ) - nullify(cgrid%ncol_soil ) - nullify(cgrid%ntext_soil ) - nullify(cgrid%lsl ) - - nullify(cgrid%pysi_id ) - nullify(cgrid%pysi_n ) - nullify(cgrid%walltime_py ) - nullify(cgrid%sensflux_py ) - nullify(cgrid%site_adjacency ) - nullify(cgrid%wbar ) - nullify(cgrid%Te ) - nullify(cgrid%zbar ) - nullify(cgrid%sheat ) - nullify(cgrid%baseflow ) - nullify(cgrid%runoff ) - nullify(cgrid%swliq ) - - nullify(cgrid%ilon ) - nullify(cgrid%ilat ) - nullify(cgrid%total_agb ) - nullify(cgrid%total_basal_area ) - nullify(cgrid%total_agb_growth ) - nullify(cgrid%total_agb_mort ) - nullify(cgrid%total_agb_recruit ) - nullify(cgrid%total_basal_area_growth ) - nullify(cgrid%total_basal_area_mort ) - nullify(cgrid%total_basal_area_recruit) - nullify(cgrid%nsites ) - nullify(cgrid%sitenums ) - nullify(cgrid%load_adjacency ) - nullify(cgrid%cosz ) - nullify(cgrid%mean_gpp ) - nullify(cgrid%mean_precip ) - nullify(cgrid%mean_qprecip ) - nullify(cgrid%mean_netrad ) - nullify(cgrid%cbudget_initialstorage ) - nullify(cgrid%cbudget_nep ) - nullify(cgrid%nbudget_initialstorage ) - nullify(cgrid%basal_area ) - nullify(cgrid%agb ) - nullify(cgrid%pldens ) - nullify(cgrid%bseeds ) - - nullify(cgrid%metinput ) - nullify(cgrid%met ) - - nullify(cgrid%lapse ) - - nullify(cgrid%lai ) - nullify(cgrid%avg_lma ) - nullify(cgrid%wai ) - - ! Fast time flux diagnostics - ! --------------------------------------------- - nullify(cgrid%avg_vapor_lc ) - nullify(cgrid%avg_vapor_wc ) - nullify(cgrid%avg_vapor_gc ) - nullify(cgrid%avg_wshed_vg ) - nullify(cgrid%avg_intercepted ) - nullify(cgrid%avg_throughfall ) - nullify(cgrid%avg_vapor_ac ) - nullify(cgrid%avg_transp ) - nullify(cgrid%avg_evap ) - nullify(cgrid%avg_smoist_gg ) - nullify(cgrid%avg_transloss ) - nullify(cgrid%avg_runoff ) - nullify(cgrid%avg_drainage ) - nullify(cgrid%avg_drainage_heat ) - nullify(cgrid%avg_rshort_gnd ) - nullify(cgrid%avg_par_gnd ) - nullify(cgrid%avg_rlong_gnd ) - nullify(cgrid%avg_ustar ) - nullify(cgrid%avg_tstar ) - nullify(cgrid%avg_qstar ) - nullify(cgrid%avg_cstar ) - nullify(cgrid%avg_carbon_ac ) - nullify(cgrid%avg_carbon_st ) - nullify(cgrid%avg_sensible_lc ) - nullify(cgrid%avg_sensible_wc ) - nullify(cgrid%avg_qwshed_vg ) - nullify(cgrid%avg_qintercepted ) - nullify(cgrid%avg_qthroughfall ) - nullify(cgrid%avg_sensible_gc ) - nullify(cgrid%avg_sensible_ac ) - nullify(cgrid%avg_sensible_gg ) - nullify(cgrid%avg_runoff_heat ) - - ! Fast time state diagnostics - nullify(cgrid%avg_leaf_energy ) - nullify(cgrid%avg_leaf_hcap ) - nullify(cgrid%avg_leaf_temp ) - nullify(cgrid%avg_leaf_vpdef ) - nullify(cgrid%avg_leaf_fliq ) - nullify(cgrid%avg_leaf_water ) - nullify(cgrid%avg_wood_energy ) - nullify(cgrid%avg_wood_hcap ) - nullify(cgrid%avg_wood_temp ) - nullify(cgrid%avg_wood_fliq ) - nullify(cgrid%avg_wood_water ) - nullify(cgrid%avg_can_temp ) - nullify(cgrid%avg_can_shv ) - nullify(cgrid%avg_can_co2 ) - nullify(cgrid%avg_can_rhos ) - nullify(cgrid%avg_can_prss ) - nullify(cgrid%avg_can_theta ) - nullify(cgrid%avg_can_theiv ) - nullify(cgrid%avg_can_vpdef ) - nullify(cgrid%avg_can_depth ) - nullify(cgrid%avg_soil_energy ) - nullify(cgrid%avg_soil_mstpot ) - nullify(cgrid%avg_soil_water ) - nullify(cgrid%avg_soil_temp ) - nullify(cgrid%avg_soil_fracliq ) - nullify(cgrid%avg_soil_rootfrac ) - nullify(cgrid%avg_soil_wetness ) - nullify(cgrid%avg_skin_temp ) - nullify(cgrid%avg_available_water ) - - nullify(cgrid%avg_lai_ebalvars) - - nullify(cgrid%avg_gpp ) - nullify(cgrid%avg_leaf_resp ) - nullify(cgrid%avg_root_resp ) - nullify(cgrid%avg_growth_resp ) - nullify(cgrid%avg_storage_resp ) - nullify(cgrid%avg_vleaf_resp ) - nullify(cgrid%avg_plant_resp ) - nullify(cgrid%avg_htroph_resp ) - nullify(cgrid%avg_cwd_resp ) - nullify(cgrid%avg_leaf_drop ) - nullify(cgrid%avg_leaf_maintenance) - nullify(cgrid%avg_root_maintenance) - - nullify(cgrid%avg_nppleaf ) - nullify(cgrid%avg_nppfroot ) - nullify(cgrid%avg_nppsapwood ) - nullify(cgrid%avg_nppcroot ) - nullify(cgrid%avg_nppseeds ) - nullify(cgrid%avg_nppwood ) - nullify(cgrid%avg_nppdaily ) - - !!! added for NACP intercomparison (MCD) - nullify(cgrid%avg_sfcw_depth ) - nullify(cgrid%avg_sfcw_energy ) - nullify(cgrid%avg_sfcw_mass ) - nullify(cgrid%avg_sfcw_tempk ) - nullify(cgrid%avg_sfcw_fracliq ) - nullify(cgrid%avg_bdead ) - nullify(cgrid%avg_balive ) - nullify(cgrid%avg_bleaf ) - nullify(cgrid%avg_broot ) - nullify(cgrid%avg_bsapwooda ) - nullify(cgrid%avg_bsapwoodb ) - nullify(cgrid%avg_bstorage ) - nullify(cgrid%avg_bseeds ) - - nullify(cgrid%avg_fsc ) - nullify(cgrid%avg_ssc ) - nullify(cgrid%avg_stsc ) - nullify(cgrid%avg_fsn ) - nullify(cgrid%avg_msn ) - - - - !-------- TOTAL CARBON AND NITROGEN POOLS --------------- - ! Added by MCD for NCEAS/FACE intercomparison (Apr 7 2009) - nullify(cgrid%Cleaf ) - nullify(cgrid%Croot ) - nullify(cgrid%Cstore ) - nullify(cgrid%Ccwd ) - nullify(cgrid%Nleaf ) - nullify(cgrid%Ndead ) - nullify(cgrid%Nroot ) - nullify(cgrid%Nstore ) - nullify(cgrid%Ncwd ) - - - !-------- TOTAL CARBON AND NITROGEN FLUX --------------- - ! Added by MCD for NCEAS/FACE intercomparison (Apr 7 2009) - nullify(cgrid%Cleaf_grow ) - nullify(cgrid%Croot_grow ) - nullify(cgrid%Cdead_grow ) - nullify(cgrid%Cstore_grow ) - nullify(cgrid%Cleaf_litter_flux) - nullify(cgrid%Croot_litter_flux) - nullify(cgrid%Ccwd_flux ) - nullify(cgrid%Nleaf_grow ) - nullify(cgrid%Ndead_grow ) - nullify(cgrid%Nroot_grow ) - nullify(cgrid%Nstore_grow ) - nullify(cgrid%Nleaf_litter_flux) - nullify(cgrid%Nroot_litter_flux) - nullify(cgrid%Ncwd_flux ) - nullify(cgrid%Nbiomass_uptake ) - nullify(cgrid%Ngross_min ) - nullify(cgrid%Nnet_min ) - - - ! Meteorologic conditions (forcing) - nullify(cgrid%avg_atm_tmp ) - nullify(cgrid%avg_atm_vpdef ) - nullify(cgrid%avg_atm_shv ) - nullify(cgrid%avg_rshort ) - nullify(cgrid%avg_rshort_diffuse ) - nullify(cgrid%avg_par ) - nullify(cgrid%avg_par_diffuse ) - nullify(cgrid%avg_rlong ) - nullify(cgrid%avg_pcpg ) - nullify(cgrid%avg_qpcpg ) - nullify(cgrid%avg_dpcpg ) - nullify(cgrid%avg_vels ) - nullify(cgrid%avg_atm_prss ) - nullify(cgrid%avg_exner ) - nullify(cgrid%avg_geoht ) - nullify(cgrid%avg_atm_co2 ) - nullify(cgrid%avg_albedo ) - nullify(cgrid%avg_albedo_beam ) - nullify(cgrid%avg_albedo_diffuse ) - nullify(cgrid%avg_rlong_albedo ) - nullify(cgrid%avg_rlongup ) - nullify(cgrid%avg_parup ) - nullify(cgrid%avg_nirup ) - nullify(cgrid%avg_rshortup ) - nullify(cgrid%avg_rnet ) - nullify(cgrid%dmean_pcpg ) - nullify(cgrid%dmean_runoff ) - nullify(cgrid%dmean_drainage ) - nullify(cgrid%dmean_vapor_ac ) - nullify(cgrid%dmean_vapor_gc ) - nullify(cgrid%dmean_vapor_lc ) - nullify(cgrid%dmean_vapor_wc ) - nullify(cgrid%dmean_ustar ) - nullify(cgrid%dmean_tstar ) - nullify(cgrid%dmean_qstar ) - nullify(cgrid%dmean_cstar ) - nullify(cgrid%dmean_carbon_ac ) - nullify(cgrid%dmean_carbon_st ) - nullify(cgrid%dmean_gpp ) - nullify(cgrid%dmean_nppleaf ) - nullify(cgrid%dmean_nppfroot ) - nullify(cgrid%dmean_nppsapwood ) - nullify(cgrid%dmean_nppcroot ) - nullify(cgrid%dmean_nppseeds ) - nullify(cgrid%dmean_nppwood ) - nullify(cgrid%dmean_nppdaily ) - nullify(cgrid%dmean_evap ) - nullify(cgrid%dmean_transp ) - nullify(cgrid%dmean_sensible_lc ) - nullify(cgrid%dmean_sensible_wc ) - nullify(cgrid%dmean_sensible_gc ) - nullify(cgrid%dmean_sensible_ac ) - nullify(cgrid%dmean_plresp ) - nullify(cgrid%dmean_rh ) - nullify(cgrid%dmean_cwd_rh ) - nullify(cgrid%dmean_leaf_resp ) - nullify(cgrid%dmean_root_resp ) - nullify(cgrid%dmean_growth_resp ) - nullify(cgrid%dmean_storage_resp ) - nullify(cgrid%dmean_vleaf_resp ) - nullify(cgrid%dmean_nep ) - nullify(cgrid%dmean_soil_temp ) - nullify(cgrid%dmean_soil_water ) - nullify(cgrid%dmean_soil_mstpot ) - nullify(cgrid%dmean_transloss ) - nullify(cgrid%dmean_fs_open ) - nullify(cgrid%dmean_fsw ) - nullify(cgrid%dmean_fsn ) - nullify(cgrid%dmean_gpp_dbh ) - nullify(cgrid%dmean_can_temp ) - nullify(cgrid%dmean_can_shv ) - nullify(cgrid%dmean_can_co2 ) - nullify(cgrid%dmean_can_rhos ) - nullify(cgrid%dmean_can_prss ) - nullify(cgrid%dmean_can_theta ) - nullify(cgrid%dmean_can_theiv ) - nullify(cgrid%dmean_can_vpdef ) - nullify(cgrid%dmean_gnd_temp ) - nullify(cgrid%dmean_gnd_shv ) - nullify(cgrid%dmean_leaf_energy ) - nullify(cgrid%dmean_leaf_water ) - nullify(cgrid%dmean_leaf_hcap ) - nullify(cgrid%dmean_leaf_temp ) - nullify(cgrid%dmean_leaf_vpdef ) - nullify(cgrid%dmean_wood_energy ) - nullify(cgrid%dmean_wood_water ) - nullify(cgrid%dmean_wood_hcap ) - nullify(cgrid%dmean_wood_temp ) - nullify(cgrid%dmean_atm_temp ) - nullify(cgrid%dmean_atm_vpdef ) - nullify(cgrid%dmean_atm_shv ) - nullify(cgrid%dmean_atm_co2 ) - nullify(cgrid%dmean_atm_prss ) - nullify(cgrid%dmean_atm_vels ) - nullify(cgrid%dmean_rshort ) - nullify(cgrid%dmean_rshort_diff ) - nullify(cgrid%dmean_par ) - nullify(cgrid%dmean_par_diff ) - nullify(cgrid%dmean_rlong ) - nullify(cgrid%dmean_rshort_gnd ) - nullify(cgrid%dmean_par_gnd ) - nullify(cgrid%dmean_rlong_gnd ) - nullify(cgrid%dmean_albedo ) - nullify(cgrid%dmean_albedo_beam ) - nullify(cgrid%dmean_albedo_diffuse ) - nullify(cgrid%dmean_rlong_albedo ) - nullify(cgrid%dmean_rlongup ) - nullify(cgrid%dmean_parup ) - nullify(cgrid%dmean_nirup ) - nullify(cgrid%dmean_rshortup ) - nullify(cgrid%dmean_rnet ) - nullify(cgrid%dmean_co2_residual ) - nullify(cgrid%dmean_energy_residual ) - nullify(cgrid%dmean_water_residual ) - nullify(cgrid%lai_pft ) - nullify(cgrid%wai_pft ) - nullify(cgrid%mmean_ustar ) - nullify(cgrid%mmean_tstar ) - nullify(cgrid%mmean_qstar ) - nullify(cgrid%mmean_cstar ) - nullify(cgrid%mmean_carbon_ac ) - nullify(cgrid%mmean_carbon_st ) - nullify(cgrid%mmean_gpp ) - nullify(cgrid%mmean_nppleaf ) - nullify(cgrid%mmean_nppfroot ) - nullify(cgrid%mmean_nppsapwood ) - nullify(cgrid%mmean_nppcroot ) - nullify(cgrid%mmean_nppseeds ) - nullify(cgrid%mmean_nppwood ) - nullify(cgrid%mmean_nppdaily ) - nullify(cgrid%mmean_evap ) - nullify(cgrid%mmean_transp ) - nullify(cgrid%mmean_sensible_lc ) - nullify(cgrid%mmean_sensible_wc ) - nullify(cgrid%mmean_sensible_gc ) - nullify(cgrid%mmean_sensible_ac ) - nullify(cgrid%mmean_vapor_lc ) - nullify(cgrid%mmean_vapor_wc ) - nullify(cgrid%mmean_vapor_gc ) - nullify(cgrid%mmean_vapor_ac ) - nullify(cgrid%mmean_nep ) - nullify(cgrid%mmean_soil_temp ) - nullify(cgrid%mmean_soil_water ) - nullify(cgrid%mmean_soil_mstpot ) - nullify(cgrid%mmean_transloss ) - nullify(cgrid%mmean_fs_open ) - nullify(cgrid%mmean_fsw ) - nullify(cgrid%mmean_fsn ) - nullify(cgrid%mmean_plresp ) - nullify(cgrid%mmean_rh ) - nullify(cgrid%mmean_cwd_rh ) - nullify(cgrid%mmean_leaf_resp ) - nullify(cgrid%mmean_root_resp ) - nullify(cgrid%mmean_growth_resp ) - nullify(cgrid%mmean_storage_resp ) - nullify(cgrid%mmean_vleaf_resp ) - nullify(cgrid%mmean_gpp_dbh ) - nullify(cgrid%mmean_lai_pft ) - nullify(cgrid%mmean_wai_pft ) - nullify(cgrid%mmean_can_temp ) - nullify(cgrid%mmean_can_shv ) - nullify(cgrid%mmean_can_co2 ) - nullify(cgrid%mmean_can_rhos ) - nullify(cgrid%mmean_can_prss ) - nullify(cgrid%mmean_can_theta ) - nullify(cgrid%mmean_can_theiv ) - nullify(cgrid%mmean_can_vpdef ) - nullify(cgrid%mmean_gnd_temp ) - nullify(cgrid%mmean_gnd_shv ) - nullify(cgrid%mmean_leaf_energy ) - nullify(cgrid%mmean_leaf_water ) - nullify(cgrid%mmean_leaf_hcap ) - nullify(cgrid%mmean_leaf_temp ) - nullify(cgrid%mmean_leaf_vpdef ) - nullify(cgrid%mmean_wood_energy ) - nullify(cgrid%mmean_wood_water ) - nullify(cgrid%mmean_wood_hcap ) - nullify(cgrid%mmean_wood_temp ) - nullify(cgrid%mmean_atm_temp ) - nullify(cgrid%mmean_atm_vpdef ) - nullify(cgrid%mmean_rshort ) - nullify(cgrid%mmean_rshort_diff ) - nullify(cgrid%mmean_par ) - nullify(cgrid%mmean_par_diff ) - nullify(cgrid%mmean_rlong ) - nullify(cgrid%mmean_rshort_gnd ) - nullify(cgrid%mmean_par_gnd ) - nullify(cgrid%mmean_rlong_gnd ) - nullify(cgrid%mmean_albedo ) - nullify(cgrid%mmean_albedo_beam ) - nullify(cgrid%mmean_albedo_diffuse ) - nullify(cgrid%mmean_rlong_albedo ) - nullify(cgrid%mmean_rlongup ) - nullify(cgrid%mmean_parup ) - nullify(cgrid%mmean_nirup ) - nullify(cgrid%mmean_rshortup ) - nullify(cgrid%mmean_rnet ) - nullify(cgrid%mmean_atm_shv ) - nullify(cgrid%mmean_atm_co2 ) - nullify(cgrid%mmean_atm_prss ) - nullify(cgrid%mmean_atm_vels ) - nullify(cgrid%mmean_pcpg ) - nullify(cgrid%mmean_runoff ) - nullify(cgrid%mmean_drainage ) - nullify(cgrid%mmean_co2_residual ) - nullify(cgrid%mmean_energy_residual ) - nullify(cgrid%mmean_water_residual ) - nullify(cgrid%bseeds_pft ) - nullify(cgrid%agb_pft ) - nullify(cgrid%ba_pft ) - - nullify(cgrid%mmsqu_gpp ) - nullify(cgrid%mmsqu_leaf_resp ) - nullify(cgrid%mmsqu_root_resp ) - nullify(cgrid%mmsqu_plresp ) - nullify(cgrid%mmsqu_carbon_ac ) - nullify(cgrid%mmsqu_carbon_st ) - nullify(cgrid%mmsqu_nep ) - nullify(cgrid%mmsqu_rh ) - nullify(cgrid%mmsqu_cwd_rh ) - nullify(cgrid%mmsqu_sensible_ac ) - nullify(cgrid%mmsqu_sensible_lc ) - nullify(cgrid%mmsqu_sensible_wc ) - nullify(cgrid%mmsqu_sensible_gc ) - nullify(cgrid%mmsqu_evap ) - nullify(cgrid%mmsqu_transp ) - nullify(cgrid%mmsqu_vapor_ac ) - nullify(cgrid%mmsqu_vapor_lc ) - nullify(cgrid%mmsqu_vapor_wc ) - nullify(cgrid%mmsqu_vapor_gc ) - nullify(cgrid%mmsqu_ustar ) - nullify(cgrid%mmsqu_rlongup ) - nullify(cgrid%mmsqu_parup ) - nullify(cgrid%mmsqu_nirup ) - nullify(cgrid%mmsqu_rshortup ) - nullify(cgrid%mmsqu_rnet ) - nullify(cgrid%mmsqu_albedo ) - - nullify(cgrid%disturbance_rates ) - nullify(cgrid%workload ) - - nullify(cgrid%qmean_pcpg ) - nullify(cgrid%qmean_runoff ) - nullify(cgrid%qmean_drainage ) - nullify(cgrid%qmean_evap ) - nullify(cgrid%qmean_transp ) - nullify(cgrid%qmean_vapor_ac ) - nullify(cgrid%qmean_vapor_gc ) - nullify(cgrid%qmean_vapor_wc ) - nullify(cgrid%qmean_vapor_lc ) - nullify(cgrid%qmean_sensible_ac ) - nullify(cgrid%qmean_sensible_gc ) - nullify(cgrid%qmean_sensible_wc ) - nullify(cgrid%qmean_sensible_lc ) - nullify(cgrid%qmean_ustar ) - nullify(cgrid%qmean_tstar ) - nullify(cgrid%qmean_qstar ) - nullify(cgrid%qmean_cstar ) - nullify(cgrid%qmean_carbon_ac ) - nullify(cgrid%qmean_carbon_st ) - nullify(cgrid%qmean_gpp ) - nullify(cgrid%qmean_nep ) - nullify(cgrid%qmean_plresp ) - nullify(cgrid%qmean_rh ) - nullify(cgrid%qmean_cwd_rh ) - nullify(cgrid%qmean_leaf_resp ) - nullify(cgrid%qmean_root_resp ) - nullify(cgrid%qmean_soil_temp ) - nullify(cgrid%qmean_soil_water ) - nullify(cgrid%qmean_soil_mstpot ) - nullify(cgrid%qmean_fs_open ) - nullify(cgrid%qmean_fsw ) - nullify(cgrid%qmean_fsn ) - nullify(cgrid%qmean_can_temp ) - nullify(cgrid%qmean_can_shv ) - nullify(cgrid%qmean_can_co2 ) - nullify(cgrid%qmean_can_rhos ) - nullify(cgrid%qmean_can_prss ) - nullify(cgrid%qmean_can_theta ) - nullify(cgrid%qmean_can_theiv ) - nullify(cgrid%qmean_can_vpdef ) - nullify(cgrid%qmean_gnd_temp ) - nullify(cgrid%qmean_gnd_shv ) - nullify(cgrid%qmean_leaf_energy ) - nullify(cgrid%qmean_leaf_water ) - nullify(cgrid%qmean_leaf_temp ) - nullify(cgrid%qmean_leaf_vpdef ) - nullify(cgrid%qmean_leaf_hcap ) - nullify(cgrid%qmean_wood_energy ) - nullify(cgrid%qmean_wood_water ) - nullify(cgrid%qmean_wood_temp ) - nullify(cgrid%qmean_wood_hcap ) - nullify(cgrid%qmean_atm_temp ) - nullify(cgrid%qmean_atm_vpdef ) - nullify(cgrid%qmean_rshort ) - nullify(cgrid%qmean_rshort_diff ) - nullify(cgrid%qmean_par ) - nullify(cgrid%qmean_par_diff ) - nullify(cgrid%qmean_rlong ) - nullify(cgrid%qmean_rshort_gnd ) - nullify(cgrid%qmean_par_gnd ) - nullify(cgrid%qmean_rlong_gnd ) - nullify(cgrid%qmean_albedo ) - nullify(cgrid%qmean_albedo_beam ) - nullify(cgrid%qmean_albedo_diffuse ) - nullify(cgrid%qmean_rlong_albedo ) - nullify(cgrid%qmean_rlongup ) - nullify(cgrid%qmean_parup ) - nullify(cgrid%qmean_nirup ) - nullify(cgrid%qmean_rshortup ) - nullify(cgrid%qmean_rnet ) - nullify(cgrid%qmean_atm_shv ) - nullify(cgrid%qmean_atm_co2 ) - nullify(cgrid%qmean_atm_prss ) - nullify(cgrid%qmean_atm_vels ) - nullify(cgrid%qmsqu_gpp ) - nullify(cgrid%qmsqu_leaf_resp ) - nullify(cgrid%qmsqu_root_resp ) - nullify(cgrid%qmsqu_plresp ) - nullify(cgrid%qmsqu_carbon_ac ) - nullify(cgrid%qmsqu_carbon_st ) - nullify(cgrid%qmsqu_nep ) - nullify(cgrid%qmsqu_rh ) - nullify(cgrid%qmsqu_cwd_rh ) - nullify(cgrid%qmsqu_sensible_ac ) - nullify(cgrid%qmsqu_sensible_lc ) - nullify(cgrid%qmsqu_sensible_wc ) - nullify(cgrid%qmsqu_sensible_gc ) - nullify(cgrid%qmsqu_evap ) - nullify(cgrid%qmsqu_transp ) - nullify(cgrid%qmsqu_vapor_ac ) - nullify(cgrid%qmsqu_vapor_lc ) - nullify(cgrid%qmsqu_vapor_wc ) - nullify(cgrid%qmsqu_vapor_gc ) - nullify(cgrid%qmsqu_ustar ) - nullify(cgrid%qmsqu_rlongup ) - nullify(cgrid%qmsqu_parup ) - nullify(cgrid%qmsqu_nirup ) - nullify(cgrid%qmsqu_rshortup ) - nullify(cgrid%qmsqu_rnet ) - nullify(cgrid%qmsqu_albedo ) - - return - end subroutine nullify_edtype -!============================================================================! -!============================================================================! - - - - - -!============================================================================! -!============================================================================! - subroutine nullify_polygontype(cpoly) - - implicit none - - type(polygontype),target :: cpoly - - nullify(cpoly%sipa_id) - nullify(cpoly%sipa_n) - nullify(cpoly%patch_count) - nullify(cpoly%site) - nullify(cpoly%sitenum) - - nullify(cpoly%area) - nullify(cpoly%patch_area) - nullify(cpoly%elevation) - nullify(cpoly%slope) - nullify(cpoly%aspect) - - nullify(cpoly%num_landuse_years) - nullify(cpoly%mindbh_primary) - nullify(cpoly%probharv_primary) - nullify(cpoly%mindbh_secondary) - nullify(cpoly%probharv_secondary) - - - nullify(cpoly%lai_pft) - nullify(cpoly%wai_pft) - - nullify(cpoly%TCI) - nullify(cpoly%pptweight) - nullify(cpoly%lsl) - nullify(cpoly%hydro_next) - nullify(cpoly%hydro_prev) - nullify(cpoly%moist_W) - nullify(cpoly%moist_f) - nullify(cpoly%moist_tau) - nullify(cpoly%moist_zi) - nullify(cpoly%baseflow) - nullify(cpoly%ncol_soil) - nullify(cpoly%ntext_soil) - nullify(cpoly%min_monthly_temp) - nullify(cpoly%plantation) - nullify(cpoly%agri_stocking_pft) - nullify(cpoly%agri_stocking_density) - nullify(cpoly%plantation_stocking_pft) - nullify(cpoly%plantation_stocking_density) - nullify(cpoly%primary_harvest_memory) - nullify(cpoly%secondary_harvest_memory) - nullify(cpoly%fire_disturbance_rate) - nullify(cpoly%ignition_rate) - nullify(cpoly%lambda_fire) - nullify(cpoly%avg_monthly_pcpg) - nullify(cpoly%phen_pars) - nullify(cpoly%nat_disturbance_rate) - nullify(cpoly%nat_dist_type) - nullify(cpoly%disturbance_memory) - nullify(cpoly%disturbance_rates) - nullify(cpoly%green_leaf_factor) - nullify(cpoly%leaf_aging_factor) - nullify(cpoly%met) - nullify(cpoly%basal_area) - nullify(cpoly%agb) - nullify(cpoly%pldens) - nullify(cpoly%bseeds) - - nullify(cpoly%basal_area_growth) - nullify(cpoly%agb_growth ) - nullify(cpoly%basal_area_mort ) - nullify(cpoly%agb_mort ) - nullify(cpoly%basal_area_cut ) !NOT IN REGISTRY - nullify(cpoly%agb_cut ) - - nullify(cpoly%cosaoi) - nullify(cpoly%avg_albedo) - nullify(cpoly%avg_albedo_beam) - nullify(cpoly%avg_albedo_diffuse) - nullify(cpoly%avg_rlong_albedo) - nullify(cpoly%avg_rlongup) - nullify(cpoly%avg_parup) - nullify(cpoly%avg_nirup) - nullify(cpoly%avg_rshortup) - nullify(cpoly%avg_rnet) - - nullify(cpoly%avg_lma ) - nullify(cpoly%daylight) - nullify(cpoly%lai ) - nullify(cpoly%wai ) - - ! Fast time flux diagnostics - ! --------------------------------------------- - nullify(cpoly%avg_vapor_lc ) - nullify(cpoly%avg_vapor_wc ) - nullify(cpoly%avg_vapor_gc ) - nullify(cpoly%avg_wshed_vg ) - nullify(cpoly%avg_intercepted) - nullify(cpoly%avg_throughfall) - nullify(cpoly%avg_vapor_ac ) - nullify(cpoly%avg_transp ) - nullify(cpoly%avg_evap ) - nullify(cpoly%avg_smoist_gg ) - nullify(cpoly%avg_transloss ) - nullify(cpoly%avg_runoff ) - nullify(cpoly%avg_drainage ) - nullify(cpoly%avg_drainage_heat ) - nullify(cpoly%avg_rshort_gnd ) - nullify(cpoly%avg_par_gnd ) - nullify(cpoly%avg_rlong_gnd ) - nullify(cpoly%avg_ustar ) - nullify(cpoly%avg_tstar ) - nullify(cpoly%avg_qstar ) - nullify(cpoly%avg_cstar ) - nullify(cpoly%avg_carbon_ac ) - nullify(cpoly%avg_carbon_st ) - nullify(cpoly%avg_sensible_lc ) - nullify(cpoly%avg_sensible_wc ) - nullify(cpoly%avg_qwshed_vg ) - nullify(cpoly%avg_qintercepted ) - nullify(cpoly%avg_qthroughfall ) - nullify(cpoly%avg_sensible_gc ) - nullify(cpoly%avg_sensible_ac ) - nullify(cpoly%avg_sensible_gg ) - nullify(cpoly%avg_runoff_heat ) - - ! ---------------------------------------------- - nullify(cpoly%avg_leaf_energy) - nullify(cpoly%avg_leaf_hcap ) - nullify(cpoly%avg_leaf_temp ) - nullify(cpoly%avg_leaf_vpdef ) - nullify(cpoly%avg_leaf_fliq ) - nullify(cpoly%avg_leaf_water ) - nullify(cpoly%avg_wood_energy) - nullify(cpoly%avg_wood_hcap ) - nullify(cpoly%avg_wood_temp ) - nullify(cpoly%avg_wood_fliq ) - nullify(cpoly%avg_wood_water ) - nullify(cpoly%avg_can_temp ) - nullify(cpoly%avg_can_shv ) - nullify(cpoly%avg_can_co2 ) - nullify(cpoly%avg_can_rhos ) - nullify(cpoly%avg_can_prss ) - nullify(cpoly%avg_can_theta ) - nullify(cpoly%avg_can_theiv ) - nullify(cpoly%avg_can_vpdef ) - nullify(cpoly%avg_can_depth ) - nullify(cpoly%avg_soil_energy) - nullify(cpoly%avg_soil_mstpot) - nullify(cpoly%avg_soil_water) - nullify(cpoly%avg_soil_temp ) - nullify(cpoly%avg_soil_fracliq ) - nullify(cpoly%avg_soil_rootfrac) - nullify(cpoly%avg_soil_wetness ) - nullify(cpoly%avg_skin_temp ) - nullify(cpoly%avg_available_water) - nullify(cpoly%runoff ) - ! Phenology - nullify(cpoly%rad_avg ) - ! Meteorological conditions - nullify(cpoly%avg_atm_tmp ) - nullify(cpoly%avg_atm_vpdef ) - nullify(cpoly%avg_atm_shv ) - nullify(cpoly%avg_atm_prss ) - ! NACP - nullify(cpoly%avg_sfcw_depth ) - nullify(cpoly%avg_sfcw_energy ) - nullify(cpoly%avg_sfcw_mass ) - nullify(cpoly%avg_sfcw_tempk ) - nullify(cpoly%avg_sfcw_fracliq ) - nullify(cpoly%avg_fsc ) - nullify(cpoly%avg_stsc ) - nullify(cpoly%avg_ssc ) - nullify(cpoly%avg_balive ) - nullify(cpoly%avg_bleaf ) - nullify(cpoly%avg_broot ) - nullify(cpoly%avg_bsapwooda ) - nullify(cpoly%avg_bsapwoodb ) - nullify(cpoly%avg_bdead ) - nullify(cpoly%avg_fsn ) - nullify(cpoly%avg_msn ) - nullify(cpoly%avg_bstorage ) - nullify(cpoly%avg_bseeds ) - - nullify(cpoly%dmean_co2_residual ) - nullify(cpoly%dmean_energy_residual ) - nullify(cpoly%dmean_water_residual ) - nullify(cpoly%mmean_co2_residual ) - nullify(cpoly%mmean_energy_residual ) - nullify(cpoly%mmean_water_residual ) - - return - end subroutine nullify_polygontype -!============================================================================! -!============================================================================! - - - - - -!============================================================================! -!============================================================================! - subroutine nullify_sitetype(csite) - - implicit none - - type(sitetype),target :: csite - - nullify(csite%paco_id) - nullify(csite%paco_n) - - nullify(csite%dist_type) - nullify(csite%age) - nullify(csite%area) - nullify(csite%fast_soil_C) - nullify(csite%slow_soil_C) - nullify(csite%structural_soil_C) - nullify(csite%structural_soil_L) - nullify(csite%mineralized_soil_N) - nullify(csite%fast_soil_N) - nullify(csite%pname) - nullify(csite%sum_dgd) - nullify(csite%sum_chd) - nullify(csite%plantation) - nullify(csite%cohort_count) - nullify(csite%can_theiv) - nullify(csite%can_vpdef) - nullify(csite%can_temp) - nullify(csite%can_temp_pv) - nullify(csite%can_shv) - nullify(csite%can_co2) - nullify(csite%can_rhos) - nullify(csite%can_prss) - nullify(csite%can_theta) - nullify(csite%can_depth) - nullify(csite%opencan_frac) - nullify(csite%ggbare) - nullify(csite%ggveg) - nullify(csite%ggnet) - nullify(csite%ggsoil) - nullify(csite%lai) - nullify(csite%wai) - - nullify(csite%sfcwater_mass) - nullify(csite%sfcwater_energy) - nullify(csite%sfcwater_depth) - nullify(csite%rshort_s) - nullify(csite%rshort_s_beam) - nullify(csite%rshort_s_diffuse) - nullify(csite%par_s) - nullify(csite%par_s_beam) - nullify(csite%par_s_diffuse) - nullify(csite%sfcwater_tempk) - nullify(csite%sfcwater_fracliq) - nullify(csite%nlev_sfcwater) - nullify(csite%soil_energy) - nullify(csite%soil_water) - nullify(csite%soil_tempk) - nullify(csite%soil_fracliq) - nullify(csite%rootdense) - nullify(csite%ground_shv) - nullify(csite%ground_ssh) - nullify(csite%ground_temp) - nullify(csite%ground_fliq) - nullify(csite%rough) - nullify(csite%par_l_max) - nullify(csite%par_l_beam_max) - nullify(csite%par_l_diffuse_max) - nullify(csite%A_o_max) - nullify(csite%A_c_max) - nullify(csite%avg_daily_temp) - nullify(csite%avg_monthly_gndwater) - nullify(csite%avg_monthly_waterdef) - nullify(csite%mean_rh) - nullify(csite%dmean_rh) - nullify(csite%mmean_rh) - nullify(csite%qmean_rh) - nullify(csite%mean_cwd_rh) - nullify(csite%dmean_cwd_rh) - nullify(csite%mmean_cwd_rh) - nullify(csite%qmean_cwd_rh) - nullify(csite%dmean_albedo) - nullify(csite%dmean_albedo_beam) - nullify(csite%dmean_albedo_diffuse) - nullify(csite%mmean_albedo) - nullify(csite%mmean_albedo_beam) - nullify(csite%mmean_albedo_diffuse) - nullify(csite%qmean_albedo) - nullify(csite%qmean_albedo_beam) - nullify(csite%qmean_albedo_diffuse) - nullify(csite%mean_nep) - nullify(csite%wbudget_loss2atm) - nullify(csite%wbudget_denseffect) - nullify(csite%wbudget_precipgain) - nullify(csite%wbudget_loss2runoff) - nullify(csite%wbudget_loss2drainage) - nullify(csite%wbudget_initialstorage) - nullify(csite%wbudget_residual) - nullify(csite%ebudget_loss2atm) - nullify(csite%ebudget_denseffect) - nullify(csite%ebudget_prsseffect) - nullify(csite%ebudget_loss2runoff) - nullify(csite%ebudget_loss2drainage) - nullify(csite%ebudget_netrad) - nullify(csite%ebudget_precipgain) - nullify(csite%ebudget_initialstorage) - nullify(csite%ebudget_residual) - nullify(csite%co2budget_initialstorage) - nullify(csite%co2budget_residual) - nullify(csite%co2budget_loss2atm) - nullify(csite%co2budget_denseffect) - nullify(csite%co2budget_gpp) - nullify(csite%co2budget_gpp_dbh) - nullify(csite%co2budget_plresp) - nullify(csite%co2budget_rh) - nullify(csite%co2budget_cwd_rh) - nullify(csite%today_A_decomp) - nullify(csite%today_Af_decomp) - nullify(csite%dmean_A_decomp) - nullify(csite%dmean_Af_decomp) - nullify(csite%mmean_A_decomp) - nullify(csite%mmean_Af_decomp) - nullify(csite%repro) - nullify(csite%veg_rough) - nullify(csite%veg_height) - nullify(csite%veg_displace) - nullify(csite%fsc_in) - nullify(csite%ssc_in) - nullify(csite%ssl_in) - nullify(csite%fsn_in) - nullify(csite%total_plant_nitrogen_uptake) - nullify(csite%mineralized_N_loss) - nullify(csite%mineralized_N_input) - nullify(csite%rshort_g) - nullify(csite%rshort_g_beam) - nullify(csite%rshort_g_diffuse) - nullify(csite%par_g) - nullify(csite%par_g_beam) - nullify(csite%par_g_diffuse) - nullify(csite%par_b) - nullify(csite%par_b_beam) - nullify(csite%par_b_diffuse) - nullify(csite%nir_b) - nullify(csite%nir_b_beam) - nullify(csite%nir_b_diffuse) - nullify(csite%rlong_g) - nullify(csite%rlong_g_surf) - nullify(csite%rlong_g_incid) - nullify(csite%rlong_s) - nullify(csite%rlong_s_surf) - nullify(csite%rlong_s_incid) - nullify(csite%albedo) - nullify(csite%albedo_beam) - nullify(csite%albedo_diffuse) - nullify(csite%rnet) - nullify(csite%rlongup) - nullify(csite%parup) - nullify(csite%nirup) - nullify(csite%rshortup) - nullify(csite%rlong_albedo) - nullify(csite%total_sfcw_depth) - nullify(csite%snowfac) - nullify(csite%A_decomp) - nullify(csite%f_decomp) - nullify(csite%rh) - nullify(csite%cwd_rh) - nullify(csite%cumlai_profile) - nullify(csite%plant_ag_biomass) - - nullify(csite%htry) - nullify(csite%hprev) - nullify(csite%avg_rk4step) - nullify(csite%dmean_rk4step) - nullify(csite%mmean_rk4step) - - nullify(csite%avg_available_water) - - nullify(csite%ustar) - nullify(csite%tstar) - nullify(csite%qstar) - nullify(csite%cstar) - - nullify(csite%zeta) - nullify(csite%ribulk) - - nullify(csite%upwp) - nullify(csite%qpwp) - nullify(csite%cpwp) - nullify(csite%tpwp) - nullify(csite%wpwp) - - - nullify(csite%avg_rshort_gnd ) - nullify(csite%avg_par_gnd ) - nullify(csite%avg_rlong_gnd ) - nullify(csite%avg_ustar ) - nullify(csite%avg_tstar ) - nullify(csite%avg_qstar ) - nullify(csite%avg_cstar ) - nullify(csite%avg_carbon_ac ) - nullify(csite%avg_carbon_st ) - nullify(csite%avg_rlongup ) - nullify(csite%avg_parup ) - nullify(csite%avg_nirup ) - nullify(csite%avg_rshortup ) - nullify(csite%avg_rnet ) - nullify(csite%avg_albedo ) - nullify(csite%avg_albedo_beam ) - nullify(csite%avg_albedo_diffuse) - nullify(csite%avg_rlong_albedo ) - - ! Fast time flux diagnostics - ! --------------------------------------------- - nullify(csite%avg_vapor_lc ) - nullify(csite%avg_vapor_wc ) - nullify(csite%avg_vapor_gc ) - nullify(csite%avg_wshed_vg ) - nullify(csite%avg_intercepted) - nullify(csite%avg_throughfall) - nullify(csite%avg_vapor_ac ) - nullify(csite%avg_transp ) - nullify(csite%avg_evap ) - nullify(csite%avg_smoist_gg ) - nullify(csite%avg_transloss ) - nullify(csite%avg_runoff ) - nullify(csite%avg_drainage ) - nullify(csite%avg_drainage_heat ) - nullify(csite%avg_sensible_lc ) - nullify(csite%avg_sensible_wc ) - nullify(csite%avg_qwshed_vg ) - nullify(csite%avg_qintercepted ) - nullify(csite%avg_qthroughfall ) - nullify(csite%avg_sensible_gc ) - nullify(csite%avg_sensible_ac ) - nullify(csite%avg_sensible_gg ) - nullify(csite%avg_runoff_heat ) - - ! ---------------------------------------------- - nullify(csite%avg_leaf_energy) - nullify(csite%avg_leaf_temp ) - nullify(csite%avg_leaf_vpdef ) - nullify(csite%avg_leaf_hcap ) - nullify(csite%avg_leaf_fliq ) - nullify(csite%avg_leaf_water ) - nullify(csite%avg_wood_energy) - nullify(csite%avg_wood_temp ) - nullify(csite%avg_wood_hcap ) - nullify(csite%avg_wood_fliq ) - nullify(csite%avg_wood_water ) - - nullify(csite%watertable ) - nullify(csite%moist_dz ) - nullify(csite%ksat ) - nullify(csite%soil_sat_energy ) - nullify(csite%soil_sat_water ) - nullify(csite%soil_sat_heat ) - nullify(csite%runoff_A ) - nullify(csite%runoff_rate ) - nullify(csite%runoff ) - - nullify(csite%patch) - - nullify(csite%dmean_co2_residual ) - nullify(csite%dmean_energy_residual ) - nullify(csite%dmean_water_residual ) - nullify(csite%mmean_co2_residual ) - nullify(csite%mmean_energy_residual ) - nullify(csite%mmean_water_residual ) - - return - end subroutine nullify_sitetype -!============================================================================! -!============================================================================! - - - - - -!============================================================================! -!============================================================================! - subroutine nullify_patchtype(cpatch) - - implicit none - - type(patchtype),target :: cpatch - - nullify(cpatch%pft) - nullify(cpatch%nplant) - nullify(cpatch%hite) - nullify(cpatch%agb) - nullify(cpatch%basarea) - nullify(cpatch%dagb_dt) - nullify(cpatch%dlnagb_dt) - nullify(cpatch%dba_dt) - nullify(cpatch%dlnba_dt) - nullify(cpatch%ddbh_dt) - nullify(cpatch%dlndbh_dt) - nullify(cpatch%dbh) - nullify(cpatch%bdead) - nullify(cpatch%bleaf) - nullify(cpatch%phenology_status) - nullify(cpatch%recruit_dbh) - nullify(cpatch%census_status) - nullify(cpatch%balive) - nullify(cpatch%broot) - nullify(cpatch%bsapwooda) - nullify(cpatch%bsapwoodb) - nullify(cpatch%lai) - nullify(cpatch%wai) - nullify(cpatch%crown_area) - nullify(cpatch%leaf_resolvable) - nullify(cpatch%wood_resolvable) - nullify(cpatch%bstorage) - nullify(cpatch%cb) - nullify(cpatch%cb_lightmax) - nullify(cpatch%cb_moistmax) - nullify(cpatch%cbr_bar) - nullify(cpatch%mmean_cb) - nullify(cpatch%leaf_energy) - nullify(cpatch%leaf_temp ) - nullify(cpatch%leaf_vpdef ) - nullify(cpatch%leaf_temp_pv) - nullify(cpatch%leaf_hcap ) - nullify(cpatch%leaf_fliq ) - nullify(cpatch%leaf_water ) - nullify(cpatch%wood_energy) - nullify(cpatch%wood_temp ) - nullify(cpatch%wood_temp_pv ) - nullify(cpatch%wood_hcap ) - nullify(cpatch%wood_fliq ) - nullify(cpatch%wood_water ) - nullify(cpatch%veg_wind ) - nullify(cpatch%lsfc_shv_open) - nullify(cpatch%lsfc_shv_closed) - nullify(cpatch%lsfc_co2_open) - nullify(cpatch%lsfc_co2_closed) - nullify(cpatch%lint_shv) - nullify(cpatch%lint_co2_open) - nullify(cpatch%lint_co2_closed) - nullify(cpatch%mean_gpp) - nullify(cpatch%mean_leaf_resp) - nullify(cpatch%mean_root_resp) - nullify(cpatch%mean_storage_resp) - nullify(cpatch%mean_growth_resp) - nullify(cpatch%mean_vleaf_resp) - nullify(cpatch%today_leaf_resp) - nullify(cpatch%today_root_resp) - nullify(cpatch%today_gpp) - nullify(cpatch%today_nppleaf) - nullify(cpatch%today_nppfroot) - nullify(cpatch%today_nppsapwood) - nullify(cpatch%today_nppcroot) - nullify(cpatch%today_nppseeds) - nullify(cpatch%today_nppwood) - nullify(cpatch%today_nppdaily) - nullify(cpatch%today_gpp_pot) - nullify(cpatch%today_gpp_lightmax) - nullify(cpatch%today_gpp_moistmax) - nullify(cpatch%dmean_gpp ) - nullify(cpatch%dmean_nppleaf ) - nullify(cpatch%dmean_nppfroot ) - nullify(cpatch%dmean_nppsapwood ) - nullify(cpatch%dmean_nppcroot ) - nullify(cpatch%dmean_nppseeds ) - nullify(cpatch%dmean_nppwood ) - nullify(cpatch%dmean_nppdaily ) - nullify(cpatch%dmean_leaf_resp ) - nullify(cpatch%dmean_root_resp ) - nullify(cpatch%mmean_gpp ) - nullify(cpatch%mmean_nppleaf ) - nullify(cpatch%mmean_nppfroot ) - nullify(cpatch%mmean_nppsapwood ) - nullify(cpatch%mmean_nppcroot ) - nullify(cpatch%mmean_nppseeds ) - nullify(cpatch%mmean_nppwood ) - nullify(cpatch%mmean_nppdaily ) - nullify(cpatch%mmean_leaf_resp ) - nullify(cpatch%mmean_root_resp ) - nullify(cpatch%mmean_growth_resp ) - nullify(cpatch%mmean_storage_resp) - nullify(cpatch%mmean_vleaf_resp ) - nullify(cpatch%growth_respiration) - nullify(cpatch%storage_respiration) - nullify(cpatch%vleaf_respiration) - nullify(cpatch%fsn) - nullify(cpatch%monthly_dndt) - nullify(cpatch%monthly_dlnndt) - nullify(cpatch%mort_rate) - nullify(cpatch%mmean_mort_rate) - nullify(cpatch%Psi_open) - nullify(cpatch%krdepth) - nullify(cpatch%first_census) - nullify(cpatch%new_recruit_flag) - nullify(cpatch%light_level) - nullify(cpatch%dmean_light_level) - nullify(cpatch%mmean_light_level) - nullify(cpatch%light_level_beam) - nullify(cpatch%dmean_light_level_beam) - nullify(cpatch%mmean_light_level_beam) - nullify(cpatch%light_level_diff) - nullify(cpatch%dmean_light_level_diff) - nullify(cpatch%mmean_light_level_diff) - nullify(cpatch%mean_par_l) - nullify(cpatch%mean_par_l_beam) - nullify(cpatch%mean_par_l_diff) - nullify(cpatch%dmean_par_l) - nullify(cpatch%dmean_par_l_beam) - nullify(cpatch%dmean_par_l_diff) - nullify(cpatch%mmean_par_l) - nullify(cpatch%mmean_par_l_beam) - nullify(cpatch%mmean_par_l_diff) - nullify(cpatch%par_l) - nullify(cpatch%par_l_beam) - nullify(cpatch%par_l_diffuse) - nullify(cpatch%rshort_l) - nullify(cpatch%rshort_l_beam) - nullify(cpatch%rshort_l_diffuse) - nullify(cpatch%rlong_l) - nullify(cpatch%rlong_l_surf) - nullify(cpatch%rlong_l_incid) - nullify(cpatch%rshort_w) - nullify(cpatch%rshort_w_beam) - nullify(cpatch%rshort_w_diffuse) - nullify(cpatch%rlong_w) - nullify(cpatch%rlong_w_surf) - nullify(cpatch%rlong_w_incid) - nullify(cpatch%leaf_gbh) - nullify(cpatch%leaf_gbw) - nullify(cpatch%wood_gbh) - nullify(cpatch%wood_gbw) - nullify(cpatch%A_open) - nullify(cpatch%A_closed) - nullify(cpatch%Psi_closed) - nullify(cpatch%gsw_open) - nullify(cpatch%gsw_closed) - nullify(cpatch%fsw) - nullify(cpatch%fs_open) - nullify(cpatch%water_supply) - nullify(cpatch%dmean_fs_open) - nullify(cpatch%dmean_fsw) - nullify(cpatch%dmean_fsn) - nullify(cpatch%dmean_psi_open) - nullify(cpatch%dmean_psi_closed) - nullify(cpatch%dmean_water_supply) - nullify(cpatch%mmean_fs_open) - nullify(cpatch%mmean_fsw) - nullify(cpatch%mmean_fsn) - nullify(cpatch%mmean_psi_open) - nullify(cpatch%mmean_psi_closed) - nullify(cpatch%mmean_water_supply) - nullify(cpatch%stomatal_conductance) - nullify(cpatch%leaf_maintenance) - nullify(cpatch%root_maintenance) - nullify(cpatch%mmean_leaf_maintenance) - nullify(cpatch%mmean_root_maintenance) - nullify(cpatch%leaf_drop) - nullify(cpatch%mmean_leaf_drop) - nullify(cpatch%bseeds) - nullify(cpatch%leaf_respiration) - nullify(cpatch%root_respiration) - nullify(cpatch%gpp) - nullify(cpatch%paw_avg) - nullify(cpatch%elongf) - nullify(cpatch%turnover_amp) - nullify(cpatch%llspan) - nullify(cpatch%vm_bar) - nullify(cpatch%sla) - - nullify(cpatch%qmean_par_l ) - nullify(cpatch%qmean_par_l_beam ) - nullify(cpatch%qmean_par_l_diff ) - nullify(cpatch%qmean_fs_open ) - nullify(cpatch%qmean_fsw ) - nullify(cpatch%qmean_fsn ) - nullify(cpatch%qmean_psi_open ) - nullify(cpatch%qmean_psi_closed ) - nullify(cpatch%qmean_water_supply) - nullify(cpatch%qmean_gpp ) - nullify(cpatch%qmean_leaf_resp ) - nullify(cpatch%qmean_root_resp ) - - - nullify(cpatch%mean_rshort_l ) - nullify(cpatch%mean_rlong_l ) - nullify(cpatch%mean_sensible_lc ) - nullify(cpatch%mean_vapor_lc ) - nullify(cpatch%mean_transp ) - nullify(cpatch%mean_intercepted_al ) - nullify(cpatch%mean_wshed_lg ) - nullify(cpatch%mean_rshort_w ) - nullify(cpatch%mean_rlong_w ) - nullify(cpatch%mean_sensible_wc ) - nullify(cpatch%mean_vapor_wc ) - nullify(cpatch%mean_intercepted_aw ) - nullify(cpatch%mean_wshed_wg ) - nullify(cpatch%dmean_rshort_l ) - nullify(cpatch%dmean_rlong_l ) - nullify(cpatch%dmean_sensible_lc ) - nullify(cpatch%dmean_vapor_lc ) - nullify(cpatch%dmean_transp ) - nullify(cpatch%dmean_intercepted_al) - nullify(cpatch%dmean_wshed_lg ) - nullify(cpatch%dmean_rshort_w ) - nullify(cpatch%dmean_rlong_w ) - nullify(cpatch%dmean_sensible_wc ) - nullify(cpatch%dmean_vapor_wc ) - nullify(cpatch%dmean_intercepted_aw) - nullify(cpatch%dmean_wshed_wg ) - nullify(cpatch%qmean_rshort_l ) - nullify(cpatch%qmean_rlong_l ) - nullify(cpatch%qmean_sensible_lc ) - nullify(cpatch%qmean_vapor_lc ) - nullify(cpatch%qmean_transp ) - nullify(cpatch%qmean_intercepted_al) - nullify(cpatch%qmean_wshed_lg ) - nullify(cpatch%qmean_rshort_w ) - nullify(cpatch%qmean_rlong_w ) - nullify(cpatch%qmean_sensible_wc ) - nullify(cpatch%qmean_vapor_wc ) - nullify(cpatch%qmean_intercepted_aw) - nullify(cpatch%qmean_wshed_wg ) - nullify(cpatch%mmean_rshort_l ) - nullify(cpatch%mmean_rlong_l ) - nullify(cpatch%mmean_sensible_lc ) - nullify(cpatch%mmean_vapor_lc ) - nullify(cpatch%mmean_transp ) - nullify(cpatch%mmean_intercepted_al) - nullify(cpatch%mmean_wshed_lg ) - nullify(cpatch%mmean_rshort_w ) - nullify(cpatch%mmean_rlong_w ) - nullify(cpatch%mmean_sensible_wc ) - nullify(cpatch%mmean_vapor_wc ) - nullify(cpatch%mmean_intercepted_aw) - nullify(cpatch%mmean_wshed_wg ) - - return - end subroutine nullify_patchtype -!============================================================================! -!============================================================================! - - - - - -!============================================================================! -!============================================================================! - subroutine deallocate_edtype(cgrid) - ! =================================================== - ! Deallocation subroutines of ed state variables - ! =================================================== - - implicit none - - type(edtype),target :: cgrid - integer :: ipy - - if(associated(cgrid%lat )) deallocate(cgrid%lat ) - if(associated(cgrid%lon )) deallocate(cgrid%lon ) - if(associated(cgrid%xatm )) deallocate(cgrid%xatm ) - if(associated(cgrid%yatm )) deallocate(cgrid%yatm ) - if(associated(cgrid%ncol_soil )) deallocate(cgrid%ncol_soil ) - if(associated(cgrid%ntext_soil )) deallocate(cgrid%ntext_soil ) - if(associated(cgrid%lsl )) deallocate(cgrid%lsl ) - - if(associated(cgrid%pysi_n )) deallocate(cgrid%pysi_n ) - if(associated(cgrid%pysi_id )) deallocate(cgrid%pysi_id ) - if(associated(cgrid%walltime_py )) deallocate(cgrid%walltime_py ) - if(associated(cgrid%sensflux_py )) deallocate(cgrid%sensflux_py ) - if(associated(cgrid%site_adjacency )) deallocate(cgrid%site_adjacency ) - if(associated(cgrid%wbar )) deallocate(cgrid%wbar ) - if(associated(cgrid%Te )) deallocate(cgrid%Te ) - if(associated(cgrid%zbar )) deallocate(cgrid%zbar ) - if(associated(cgrid%sheat )) deallocate(cgrid%sheat ) - if(associated(cgrid%baseflow )) deallocate(cgrid%baseflow ) - if(associated(cgrid%runoff )) deallocate(cgrid%runoff ) - if(associated(cgrid%swliq )) deallocate(cgrid%swliq ) - - if(associated(cgrid%ilon )) deallocate(cgrid%ilon ) - if(associated(cgrid%ilat )) deallocate(cgrid%ilat ) - if(associated(cgrid%total_agb )) deallocate(cgrid%total_agb ) - if(associated(cgrid%total_basal_area )) deallocate(cgrid%total_basal_area ) - if(associated(cgrid%total_agb_growth )) deallocate(cgrid%total_agb_growth ) - if(associated(cgrid%total_agb_mort )) deallocate(cgrid%total_agb_mort ) - if(associated(cgrid%total_agb_recruit )) deallocate(cgrid%total_agb_recruit ) - if(associated(cgrid%total_basal_area_growth )) deallocate(cgrid%total_basal_area_growth ) - if(associated(cgrid%total_basal_area_mort )) deallocate(cgrid%total_basal_area_mort ) - if(associated(cgrid%total_basal_area_recruit)) deallocate(cgrid%total_basal_area_recruit) - if(associated(cgrid%nsites )) deallocate(cgrid%nsites ) - if(associated(cgrid%sitenums )) deallocate(cgrid%sitenums ) - if(associated(cgrid%load_adjacency )) deallocate(cgrid%load_adjacency ) - if(associated(cgrid%cosz )) deallocate(cgrid%cosz ) - if(associated(cgrid%mean_gpp )) deallocate(cgrid%mean_gpp ) - if(associated(cgrid%mean_precip )) deallocate(cgrid%mean_precip ) - if(associated(cgrid%mean_qprecip )) deallocate(cgrid%mean_qprecip ) - if(associated(cgrid%mean_netrad )) deallocate(cgrid%mean_netrad ) - if(associated(cgrid%cbudget_initialstorage )) deallocate(cgrid%cbudget_initialstorage ) - if(associated(cgrid%cbudget_nep )) deallocate(cgrid%cbudget_nep ) - if(associated(cgrid%nbudget_initialstorage )) deallocate(cgrid%nbudget_initialstorage ) - if(associated(cgrid%basal_area )) deallocate(cgrid%basal_area ) - if(associated(cgrid%agb )) deallocate(cgrid%agb ) - if(associated(cgrid%pldens )) deallocate(cgrid%pldens ) - if(associated(cgrid%bseeds )) deallocate(cgrid%bseeds ) - - if(associated(cgrid%metinput )) deallocate(cgrid%metinput ) - if(associated(cgrid%met )) deallocate(cgrid%met ) - if(associated(cgrid%lapse )) deallocate(cgrid%lapse ) - - if(associated(cgrid%lai )) deallocate(cgrid%lai ) - if(associated(cgrid%avg_lma )) deallocate(cgrid%avg_lma ) - if(associated(cgrid%wai )) deallocate(cgrid%wai ) - - ! Fast time flux diagnostics - ! --------------------------------------------- - if(associated(cgrid%avg_vapor_lc )) deallocate(cgrid%avg_vapor_lc ) - if(associated(cgrid%avg_vapor_wc )) deallocate(cgrid%avg_vapor_wc ) - if(associated(cgrid%avg_vapor_gc )) deallocate(cgrid%avg_vapor_gc ) - if(associated(cgrid%avg_wshed_vg )) deallocate(cgrid%avg_wshed_vg ) - if(associated(cgrid%avg_intercepted )) deallocate(cgrid%avg_intercepted ) - if(associated(cgrid%avg_throughfall )) deallocate(cgrid%avg_throughfall ) - if(associated(cgrid%avg_vapor_ac )) deallocate(cgrid%avg_vapor_ac ) - if(associated(cgrid%avg_transp )) deallocate(cgrid%avg_transp ) - if(associated(cgrid%avg_evap )) deallocate(cgrid%avg_evap ) - if(associated(cgrid%avg_smoist_gg )) deallocate(cgrid%avg_smoist_gg ) - if(associated(cgrid%avg_transloss )) deallocate(cgrid%avg_transloss ) - if(associated(cgrid%avg_runoff )) deallocate(cgrid%avg_runoff ) - if(associated(cgrid%avg_drainage )) deallocate(cgrid%avg_drainage ) - if(associated(cgrid%avg_drainage_heat )) deallocate(cgrid%avg_drainage_heat ) - if(associated(cgrid%avg_rshort_gnd )) deallocate(cgrid%avg_rshort_gnd ) - if(associated(cgrid%avg_par_gnd )) deallocate(cgrid%avg_par_gnd ) - if(associated(cgrid%avg_rlong_gnd )) deallocate(cgrid%avg_rlong_gnd ) - if(associated(cgrid%avg_ustar )) deallocate(cgrid%avg_ustar ) - if(associated(cgrid%avg_tstar )) deallocate(cgrid%avg_tstar ) - if(associated(cgrid%avg_qstar )) deallocate(cgrid%avg_qstar ) - if(associated(cgrid%avg_cstar )) deallocate(cgrid%avg_cstar ) - if(associated(cgrid%avg_carbon_ac )) deallocate(cgrid%avg_carbon_ac ) - if(associated(cgrid%avg_carbon_st )) deallocate(cgrid%avg_carbon_st ) - if(associated(cgrid%avg_sensible_lc )) deallocate(cgrid%avg_sensible_lc ) - if(associated(cgrid%avg_sensible_wc )) deallocate(cgrid%avg_sensible_wc ) - if(associated(cgrid%avg_qwshed_vg )) deallocate(cgrid%avg_qwshed_vg ) - if(associated(cgrid%avg_qintercepted )) deallocate(cgrid%avg_qintercepted ) - if(associated(cgrid%avg_qthroughfall )) deallocate(cgrid%avg_qthroughfall ) - if(associated(cgrid%avg_sensible_gc )) deallocate(cgrid%avg_sensible_gc ) - if(associated(cgrid%avg_sensible_ac )) deallocate(cgrid%avg_sensible_ac ) - if(associated(cgrid%avg_sensible_gg )) deallocate(cgrid%avg_sensible_gg ) - if(associated(cgrid%avg_runoff_heat )) deallocate(cgrid%avg_runoff_heat ) - - if(associated(cgrid%max_leaf_temp )) deallocate(cgrid%max_leaf_temp ) - if(associated(cgrid%min_leaf_temp )) deallocate(cgrid%min_leaf_temp ) - if(associated(cgrid%max_wood_temp )) deallocate(cgrid%max_wood_temp ) - if(associated(cgrid%min_wood_temp )) deallocate(cgrid%min_wood_temp ) - if(associated(cgrid%max_soil_temp )) deallocate(cgrid%max_soil_temp ) - if(associated(cgrid%min_soil_temp )) deallocate(cgrid%min_soil_temp ) - - ! Fast time state diagnostics - if(associated(cgrid%avg_leaf_energy )) deallocate(cgrid%avg_leaf_energy ) - if(associated(cgrid%avg_leaf_hcap )) deallocate(cgrid%avg_leaf_hcap ) - if(associated(cgrid%avg_leaf_temp )) deallocate(cgrid%avg_leaf_temp ) - if(associated(cgrid%avg_leaf_vpdef )) deallocate(cgrid%avg_leaf_vpdef ) - if(associated(cgrid%avg_leaf_fliq )) deallocate(cgrid%avg_leaf_fliq ) - if(associated(cgrid%avg_leaf_water )) deallocate(cgrid%avg_leaf_water ) - if(associated(cgrid%avg_wood_energy )) deallocate(cgrid%avg_wood_energy ) - if(associated(cgrid%avg_wood_hcap )) deallocate(cgrid%avg_wood_hcap ) - if(associated(cgrid%avg_wood_temp )) deallocate(cgrid%avg_wood_temp ) - if(associated(cgrid%avg_wood_fliq )) deallocate(cgrid%avg_wood_fliq ) - if(associated(cgrid%avg_wood_water )) deallocate(cgrid%avg_wood_water ) - if(associated(cgrid%avg_can_temp )) deallocate(cgrid%avg_can_temp ) - if(associated(cgrid%avg_can_shv )) deallocate(cgrid%avg_can_shv ) - if(associated(cgrid%avg_can_co2 )) deallocate(cgrid%avg_can_co2 ) - if(associated(cgrid%avg_can_rhos )) deallocate(cgrid%avg_can_rhos ) - if(associated(cgrid%avg_can_prss )) deallocate(cgrid%avg_can_prss ) - if(associated(cgrid%avg_can_theta )) deallocate(cgrid%avg_can_theta ) - if(associated(cgrid%avg_can_theiv )) deallocate(cgrid%avg_can_theiv ) - if(associated(cgrid%avg_can_vpdef )) deallocate(cgrid%avg_can_vpdef ) - if(associated(cgrid%avg_can_depth )) deallocate(cgrid%avg_can_depth ) - if(associated(cgrid%avg_soil_energy )) deallocate(cgrid%avg_soil_energy ) - if(associated(cgrid%avg_soil_mstpot )) deallocate(cgrid%avg_soil_mstpot ) - if(associated(cgrid%avg_soil_water )) deallocate(cgrid%avg_soil_water ) - if(associated(cgrid%avg_soil_temp )) deallocate(cgrid%avg_soil_temp ) - if(associated(cgrid%avg_soil_fracliq )) deallocate(cgrid%avg_soil_fracliq ) - if(associated(cgrid%avg_soil_rootfrac )) deallocate(cgrid%avg_soil_rootfrac ) - if(associated(cgrid%avg_soil_wetness )) deallocate(cgrid%avg_soil_wetness ) - if(associated(cgrid%avg_skin_temp )) deallocate(cgrid%avg_skin_temp ) - if(associated(cgrid%avg_available_water )) deallocate(cgrid%avg_available_water ) - - if(associated(cgrid%avg_lai_ebalvars )) deallocate(cgrid%avg_lai_ebalvars ) - - if(associated(cgrid%avg_gpp )) deallocate(cgrid%avg_gpp ) - if(associated(cgrid%avg_leaf_resp )) deallocate(cgrid%avg_leaf_resp ) - if(associated(cgrid%avg_root_resp )) deallocate(cgrid%avg_root_resp ) - if(associated(cgrid%avg_growth_resp )) deallocate(cgrid%avg_growth_resp ) - if(associated(cgrid%avg_storage_resp )) deallocate(cgrid%avg_storage_resp ) - if(associated(cgrid%avg_vleaf_resp )) deallocate(cgrid%avg_vleaf_resp ) - if(associated(cgrid%avg_plant_resp )) deallocate(cgrid%avg_plant_resp ) - if(associated(cgrid%avg_htroph_resp )) deallocate(cgrid%avg_htroph_resp ) - if(associated(cgrid%avg_cwd_resp )) deallocate(cgrid%avg_cwd_resp ) - if(associated(cgrid%avg_leaf_drop )) deallocate(cgrid%avg_leaf_drop ) - if(associated(cgrid%avg_leaf_maintenance )) deallocate(cgrid%avg_leaf_maintenance ) - if(associated(cgrid%avg_root_maintenance )) deallocate(cgrid%avg_root_maintenance ) - - if(associated(cgrid%avg_nppleaf )) deallocate(cgrid%avg_nppleaf ) - if(associated(cgrid%avg_nppfroot )) deallocate(cgrid%avg_nppfroot ) - if(associated(cgrid%avg_nppsapwood )) deallocate(cgrid%avg_nppsapwood ) - if(associated(cgrid%avg_nppcroot )) deallocate(cgrid%avg_nppcroot ) - if(associated(cgrid%avg_nppseeds )) deallocate(cgrid%avg_nppseeds ) - if(associated(cgrid%avg_nppwood )) deallocate(cgrid%avg_nppwood ) - if(associated(cgrid%avg_nppdaily )) deallocate(cgrid%avg_nppdaily ) - - !!! added for NACP intercomparison (MCD) - if(associated(cgrid%avg_sfcw_depth )) deallocate(cgrid%avg_sfcw_depth ) - if(associated(cgrid%avg_sfcw_energy )) deallocate(cgrid%avg_sfcw_energy ) - if(associated(cgrid%avg_sfcw_mass )) deallocate(cgrid%avg_sfcw_mass ) - if(associated(cgrid%avg_sfcw_tempk )) deallocate(cgrid%avg_sfcw_tempk ) - if(associated(cgrid%avg_sfcw_fracliq )) deallocate(cgrid%avg_sfcw_fracliq ) - if(associated(cgrid%avg_bdead )) deallocate(cgrid%avg_bdead ) - if(associated(cgrid%avg_balive )) deallocate(cgrid%avg_balive ) - if(associated(cgrid%avg_broot )) deallocate(cgrid%avg_broot ) - if(associated(cgrid%avg_bleaf )) deallocate(cgrid%avg_bleaf ) - if(associated(cgrid%avg_bsapwooda )) deallocate(cgrid%avg_bsapwooda ) - if(associated(cgrid%avg_bsapwoodb )) deallocate(cgrid%avg_bsapwoodb ) - if(associated(cgrid%avg_bstorage )) deallocate(cgrid%avg_bstorage ) - if(associated(cgrid%avg_bseeds )) deallocate(cgrid%avg_bseeds ) - if(associated(cgrid%avg_fsc )) deallocate(cgrid%avg_fsc ) - if(associated(cgrid%avg_ssc )) deallocate(cgrid%avg_ssc ) - if(associated(cgrid%avg_stsc )) deallocate(cgrid%avg_stsc ) - - if(associated(cgrid%avg_fsn )) deallocate(cgrid%avg_fsn ) - if(associated(cgrid%avg_msn )) deallocate(cgrid%avg_msn ) - - - !-------- TOTAL CARBON AND NITROGEN POOLS --------------- - ! Added by MCD for NCEAS/FACE intercomparison (Apr 7 2009) - if(associated(cgrid%Cleaf )) deallocate(cgrid%Cleaf) - if(associated(cgrid%Croot )) deallocate(cgrid%Croot) - if(associated(cgrid%Cstore )) deallocate(cgrid%Cstore) - if(associated(cgrid%Ccwd )) deallocate(cgrid%Ccwd) - if(associated(cgrid%Nleaf )) deallocate(cgrid%Nleaf) - if(associated(cgrid%Ndead )) deallocate(cgrid%Ndead) - if(associated(cgrid%Nroot )) deallocate(cgrid%Nroot) - if(associated(cgrid%Nstore )) deallocate(cgrid%Nstore) - if(associated(cgrid%Ncwd )) deallocate(cgrid%Ncwd) - - - !-------- TOTAL CARBON AND NITROGEN FLUX --------------- - ! Added by MCD for NCEAS/FACE intercomparison (Apr 7 2009) - if(associated(cgrid%Cleaf_grow )) deallocate(cgrid%Cleaf_grow) - if(associated(cgrid%Croot_grow )) deallocate(cgrid%Croot_grow) - if(associated(cgrid%Cdead_grow )) deallocate(cgrid%Cdead_grow) - if(associated(cgrid%Cstore_grow )) deallocate(cgrid%Cstore_grow) - if(associated(cgrid%Cleaf_litter_flux)) deallocate(cgrid%Cleaf_litter_flux) - if(associated(cgrid%Croot_litter_flux)) deallocate(cgrid%Croot_litter_flux) - if(associated(cgrid%Ccwd_flux )) deallocate(cgrid%Ccwd_flux) - if(associated(cgrid%Nleaf_grow )) deallocate(cgrid%Nleaf_grow) - if(associated(cgrid%Ndead_grow )) deallocate(cgrid%Ndead_grow) - if(associated(cgrid%Nroot_grow )) deallocate(cgrid%Nroot_grow) - if(associated(cgrid%Nstore_grow )) deallocate(cgrid%Nstore_grow) - if(associated(cgrid%Nleaf_litter_flux)) deallocate(cgrid%Nleaf_litter_flux) - if(associated(cgrid%Nroot_litter_flux)) deallocate(cgrid%Nroot_litter_flux) - if(associated(cgrid%Ncwd_flux )) deallocate(cgrid%Ncwd_flux) - if(associated(cgrid%Nbiomass_uptake )) deallocate(cgrid%Nbiomass_uptake) - if(associated(cgrid%Ngross_min )) deallocate(cgrid%Ngross_min) - if(associated(cgrid%Nnet_min )) deallocate(cgrid%Nnet_min) + ! Total carbon (vegetation plus soil) at the beginning of budget-averaging + ! time [kgC/m2] + real,pointer,dimension(:) :: cbudget_initialstorage + ! Average NEP (GPP - plant respiration - heterotrophic respiration) + ! [kgC/m2/day], used for evaluating daily carbon budget. + real,pointer,dimension(:) :: cbudget_nep - + ! Total nitrogen (vegetation plus soil) at the beginning of + ! budget-averaging time [kgN/m2] + real,pointer,dimension(:) :: nbudget_initialstorage + !----- Mass and Energy --------------------------------------------------! + ! New variables for testing the model stability + real,pointer,dimension(:) :: max_leaf_temp + real,pointer,dimension(:) :: min_leaf_temp + real,pointer,dimension(:) :: max_wood_temp + real,pointer,dimension(:) :: min_wood_temp + real,pointer,dimension(:) :: max_soil_temp + real,pointer,dimension(:) :: min_soil_temp - ! ---------------------------------------------- - - if(associated(cgrid%avg_atm_tmp )) deallocate(cgrid%avg_atm_tmp ) - if(associated(cgrid%avg_atm_vpdef )) deallocate(cgrid%avg_atm_vpdef ) - if(associated(cgrid%avg_atm_shv )) deallocate(cgrid%avg_atm_shv ) - if(associated(cgrid%avg_rshort )) deallocate(cgrid%avg_rshort ) - if(associated(cgrid%avg_rshort_diffuse )) deallocate(cgrid%avg_rshort_diffuse ) - if(associated(cgrid%avg_par )) deallocate(cgrid%avg_par ) - if(associated(cgrid%avg_par_diffuse )) deallocate(cgrid%avg_par_diffuse ) - if(associated(cgrid%avg_rlong )) deallocate(cgrid%avg_rlong ) - if(associated(cgrid%avg_pcpg )) deallocate(cgrid%avg_pcpg ) - if(associated(cgrid%avg_qpcpg )) deallocate(cgrid%avg_qpcpg ) - if(associated(cgrid%avg_dpcpg )) deallocate(cgrid%avg_dpcpg ) - if(associated(cgrid%avg_vels )) deallocate(cgrid%avg_vels ) - if(associated(cgrid%avg_atm_prss )) deallocate(cgrid%avg_atm_prss ) - if(associated(cgrid%avg_exner )) deallocate(cgrid%avg_exner ) - if(associated(cgrid%avg_geoht )) deallocate(cgrid%avg_geoht ) - if(associated(cgrid%avg_atm_co2 )) deallocate(cgrid%avg_atm_co2 ) - if(associated(cgrid%avg_albedo )) deallocate(cgrid%avg_albedo ) - if(associated(cgrid%avg_albedo_beam )) deallocate(cgrid%avg_albedo_beam ) - if(associated(cgrid%avg_albedo_diffuse )) deallocate(cgrid%avg_albedo_diffuse ) - if(associated(cgrid%avg_rlong_albedo )) deallocate(cgrid%avg_rlong_albedo ) - if(associated(cgrid%avg_rlongup )) deallocate(cgrid%avg_rlongup ) - if(associated(cgrid%avg_parup )) deallocate(cgrid%avg_parup ) - if(associated(cgrid%avg_nirup )) deallocate(cgrid%avg_nirup ) - if(associated(cgrid%avg_rshortup )) deallocate(cgrid%avg_rshortup ) - if(associated(cgrid%avg_rnet )) deallocate(cgrid%avg_rnet ) - - - if(associated(cgrid%runoff )) deallocate(cgrid%runoff ) - - if(associated(cgrid%dmean_pcpg )) deallocate(cgrid%dmean_pcpg ) - if(associated(cgrid%dmean_runoff )) deallocate(cgrid%dmean_runoff ) - if(associated(cgrid%dmean_drainage )) deallocate(cgrid%dmean_drainage ) - if(associated(cgrid%dmean_vapor_ac )) deallocate(cgrid%dmean_vapor_ac ) - if(associated(cgrid%dmean_vapor_gc )) deallocate(cgrid%dmean_vapor_gc ) - if(associated(cgrid%dmean_vapor_lc )) deallocate(cgrid%dmean_vapor_lc ) - if(associated(cgrid%dmean_vapor_wc )) deallocate(cgrid%dmean_vapor_wc ) - if(associated(cgrid%dmean_ustar )) deallocate(cgrid%dmean_ustar ) - if(associated(cgrid%dmean_tstar )) deallocate(cgrid%dmean_tstar ) - if(associated(cgrid%dmean_qstar )) deallocate(cgrid%dmean_qstar ) - if(associated(cgrid%dmean_cstar )) deallocate(cgrid%dmean_cstar ) - if(associated(cgrid%dmean_carbon_ac )) deallocate(cgrid%dmean_carbon_ac ) - if(associated(cgrid%dmean_carbon_st )) deallocate(cgrid%dmean_carbon_st ) - if(associated(cgrid%dmean_gpp )) deallocate(cgrid%dmean_gpp ) - if(associated(cgrid%dmean_nppleaf )) deallocate(cgrid%dmean_nppleaf ) - if(associated(cgrid%dmean_nppfroot )) deallocate(cgrid%dmean_nppfroot ) - if(associated(cgrid%dmean_nppsapwood )) deallocate(cgrid%dmean_nppsapwood ) - if(associated(cgrid%dmean_nppcroot )) deallocate(cgrid%dmean_nppcroot ) - if(associated(cgrid%dmean_nppseeds )) deallocate(cgrid%dmean_nppseeds ) - if(associated(cgrid%dmean_nppwood )) deallocate(cgrid%dmean_nppwood ) - if(associated(cgrid%dmean_nppdaily )) deallocate(cgrid%dmean_nppdaily ) - if(associated(cgrid%dmean_evap )) deallocate(cgrid%dmean_evap ) - if(associated(cgrid%dmean_transp )) deallocate(cgrid%dmean_transp ) - if(associated(cgrid%dmean_sensible_lc )) deallocate(cgrid%dmean_sensible_lc ) - if(associated(cgrid%dmean_sensible_wc )) deallocate(cgrid%dmean_sensible_wc ) - if(associated(cgrid%dmean_sensible_gc )) deallocate(cgrid%dmean_sensible_gc ) - if(associated(cgrid%dmean_sensible_ac )) deallocate(cgrid%dmean_sensible_ac ) - if(associated(cgrid%dmean_plresp )) deallocate(cgrid%dmean_plresp ) - if(associated(cgrid%dmean_rh )) deallocate(cgrid%dmean_rh ) - if(associated(cgrid%dmean_cwd_rh )) deallocate(cgrid%dmean_cwd_rh ) - if(associated(cgrid%dmean_leaf_resp )) deallocate(cgrid%dmean_leaf_resp ) - if(associated(cgrid%dmean_root_resp )) deallocate(cgrid%dmean_root_resp ) - if(associated(cgrid%dmean_growth_resp )) deallocate(cgrid%dmean_growth_resp ) - if(associated(cgrid%dmean_storage_resp )) deallocate(cgrid%dmean_storage_resp ) - if(associated(cgrid%dmean_vleaf_resp )) deallocate(cgrid%dmean_vleaf_resp ) - if(associated(cgrid%dmean_nep )) deallocate(cgrid%dmean_nep ) - if(associated(cgrid%dmean_soil_temp )) deallocate(cgrid%dmean_soil_temp ) - if(associated(cgrid%dmean_soil_water )) deallocate(cgrid%dmean_soil_water ) - if(associated(cgrid%dmean_soil_mstpot )) deallocate(cgrid%dmean_soil_mstpot ) - if(associated(cgrid%dmean_transloss )) deallocate(cgrid%dmean_transloss ) - if(associated(cgrid%dmean_fs_open )) deallocate(cgrid%dmean_fs_open ) - if(associated(cgrid%dmean_fsw )) deallocate(cgrid%dmean_fsw ) - if(associated(cgrid%dmean_fsn )) deallocate(cgrid%dmean_fsn ) - if(associated(cgrid%dmean_gpp_dbh )) deallocate(cgrid%dmean_gpp_dbh ) - if(associated(cgrid%dmean_can_temp )) deallocate(cgrid%dmean_can_temp ) - if(associated(cgrid%dmean_can_shv )) deallocate(cgrid%dmean_can_shv ) - if(associated(cgrid%dmean_can_co2 )) deallocate(cgrid%dmean_can_co2 ) - if(associated(cgrid%dmean_can_rhos )) deallocate(cgrid%dmean_can_rhos ) - if(associated(cgrid%dmean_can_prss )) deallocate(cgrid%dmean_can_prss ) - if(associated(cgrid%dmean_can_theta )) deallocate(cgrid%dmean_can_theta ) - if(associated(cgrid%dmean_can_theiv )) deallocate(cgrid%dmean_can_theiv ) - if(associated(cgrid%dmean_can_vpdef )) deallocate(cgrid%dmean_can_vpdef ) - if(associated(cgrid%dmean_gnd_temp )) deallocate(cgrid%dmean_gnd_temp ) - if(associated(cgrid%dmean_gnd_shv )) deallocate(cgrid%dmean_gnd_shv ) - if(associated(cgrid%dmean_leaf_energy )) deallocate(cgrid%dmean_leaf_energy ) - if(associated(cgrid%dmean_leaf_water )) deallocate(cgrid%dmean_leaf_water ) - if(associated(cgrid%dmean_leaf_hcap )) deallocate(cgrid%dmean_leaf_hcap ) - if(associated(cgrid%dmean_leaf_temp )) deallocate(cgrid%dmean_leaf_temp ) - if(associated(cgrid%dmean_leaf_vpdef )) deallocate(cgrid%dmean_leaf_vpdef ) - if(associated(cgrid%dmean_wood_energy )) deallocate(cgrid%dmean_wood_energy ) - if(associated(cgrid%dmean_wood_water )) deallocate(cgrid%dmean_wood_water ) - if(associated(cgrid%dmean_wood_hcap )) deallocate(cgrid%dmean_wood_hcap ) - if(associated(cgrid%dmean_wood_temp )) deallocate(cgrid%dmean_wood_temp ) - if(associated(cgrid%dmean_atm_temp )) deallocate(cgrid%dmean_atm_temp ) - if(associated(cgrid%dmean_atm_vpdef )) deallocate(cgrid%dmean_atm_vpdef ) - if(associated(cgrid%dmean_atm_shv )) deallocate(cgrid%dmean_atm_shv ) - if(associated(cgrid%dmean_atm_co2 )) deallocate(cgrid%dmean_atm_co2 ) - if(associated(cgrid%dmean_atm_prss )) deallocate(cgrid%dmean_atm_prss ) - if(associated(cgrid%dmean_atm_vels )) deallocate(cgrid%dmean_atm_vels ) - if(associated(cgrid%dmean_rshort )) deallocate(cgrid%dmean_rshort ) - if(associated(cgrid%dmean_rshort_diff )) deallocate(cgrid%dmean_rshort_diff ) - if(associated(cgrid%dmean_par )) deallocate(cgrid%dmean_par ) - if(associated(cgrid%dmean_par_diff )) deallocate(cgrid%dmean_par_diff ) - if(associated(cgrid%dmean_rlong )) deallocate(cgrid%dmean_rlong ) - if(associated(cgrid%dmean_rshort_gnd )) deallocate(cgrid%dmean_rshort_gnd ) - if(associated(cgrid%dmean_par_gnd )) deallocate(cgrid%dmean_par_gnd ) - if(associated(cgrid%dmean_rlong_gnd )) deallocate(cgrid%dmean_rlong_gnd ) - if(associated(cgrid%dmean_albedo )) deallocate(cgrid%dmean_albedo ) - if(associated(cgrid%dmean_albedo_beam )) deallocate(cgrid%dmean_albedo_beam ) - if(associated(cgrid%dmean_albedo_diffuse )) deallocate(cgrid%dmean_albedo_diffuse ) - if(associated(cgrid%dmean_rlong_albedo )) deallocate(cgrid%dmean_rlong_albedo ) - if(associated(cgrid%dmean_rlongup )) deallocate(cgrid%dmean_rlongup ) - if(associated(cgrid%dmean_nirup )) deallocate(cgrid%dmean_nirup ) - if(associated(cgrid%dmean_parup )) deallocate(cgrid%dmean_parup ) - if(associated(cgrid%dmean_rshortup )) deallocate(cgrid%dmean_rshortup ) - if(associated(cgrid%dmean_rnet )) deallocate(cgrid%dmean_rnet ) - if(associated(cgrid%dmean_co2_residual )) deallocate(cgrid%dmean_co2_residual ) - if(associated(cgrid%dmean_energy_residual )) deallocate(cgrid%dmean_energy_residual ) - if(associated(cgrid%dmean_water_residual )) deallocate(cgrid%dmean_water_residual ) - - if(associated(cgrid%lai_pft )) deallocate(cgrid%lai_pft ) - if(associated(cgrid%wai_pft )) deallocate(cgrid%wai_pft ) - if(associated(cgrid%mmean_gpp )) deallocate(cgrid%mmean_gpp ) - if(associated(cgrid%mmean_nppleaf )) deallocate(cgrid%mmean_nppleaf ) - if(associated(cgrid%mmean_nppfroot )) deallocate(cgrid%mmean_nppfroot ) - if(associated(cgrid%mmean_nppsapwood )) deallocate(cgrid%mmean_nppsapwood ) - if(associated(cgrid%mmean_nppcroot )) deallocate(cgrid%mmean_nppcroot ) - if(associated(cgrid%mmean_nppseeds )) deallocate(cgrid%mmean_nppseeds ) - if(associated(cgrid%mmean_nppwood )) deallocate(cgrid%mmean_nppwood ) - if(associated(cgrid%mmean_nppdaily )) deallocate(cgrid%mmean_nppdaily ) - if(associated(cgrid%mmean_evap )) deallocate(cgrid%mmean_evap ) - if(associated(cgrid%mmean_transp )) deallocate(cgrid%mmean_transp ) - if(associated(cgrid%mmean_vapor_lc )) deallocate(cgrid%mmean_vapor_lc ) - if(associated(cgrid%mmean_vapor_wc )) deallocate(cgrid%mmean_vapor_wc ) - if(associated(cgrid%mmean_vapor_gc )) deallocate(cgrid%mmean_vapor_gc ) - if(associated(cgrid%mmean_vapor_ac )) deallocate(cgrid%mmean_vapor_ac ) - if(associated(cgrid%mmean_sensible_lc )) deallocate(cgrid%mmean_sensible_lc ) - if(associated(cgrid%mmean_sensible_wc )) deallocate(cgrid%mmean_sensible_wc ) - if(associated(cgrid%mmean_sensible_gc )) deallocate(cgrid%mmean_sensible_gc ) - if(associated(cgrid%mmean_sensible_ac )) deallocate(cgrid%mmean_sensible_ac ) - if(associated(cgrid%mmean_ustar )) deallocate(cgrid%mmean_ustar ) - if(associated(cgrid%mmean_tstar )) deallocate(cgrid%mmean_tstar ) - if(associated(cgrid%mmean_qstar )) deallocate(cgrid%mmean_qstar ) - if(associated(cgrid%mmean_cstar )) deallocate(cgrid%mmean_cstar ) - if(associated(cgrid%mmean_carbon_ac )) deallocate(cgrid%mmean_carbon_ac ) - if(associated(cgrid%mmean_carbon_st )) deallocate(cgrid%mmean_carbon_st ) - if(associated(cgrid%mmean_nep )) deallocate(cgrid%mmean_nep ) - if(associated(cgrid%mmean_soil_temp )) deallocate(cgrid%mmean_soil_temp ) - if(associated(cgrid%mmean_soil_water )) deallocate(cgrid%mmean_soil_water ) - if(associated(cgrid%mmean_soil_mstpot )) deallocate(cgrid%mmean_soil_mstpot ) - if(associated(cgrid%dmean_transloss )) deallocate(cgrid%dmean_transloss ) - if(associated(cgrid%mmean_fs_open )) deallocate(cgrid%mmean_fs_open ) - if(associated(cgrid%mmean_fsw )) deallocate(cgrid%mmean_fsw ) - if(associated(cgrid%mmean_fsn )) deallocate(cgrid%mmean_fsn ) - if(associated(cgrid%mmean_plresp )) deallocate(cgrid%mmean_plresp ) - if(associated(cgrid%mmean_rh )) deallocate(cgrid%mmean_rh ) - if(associated(cgrid%mmean_cwd_rh )) deallocate(cgrid%mmean_cwd_rh ) - if(associated(cgrid%mmean_leaf_resp )) deallocate(cgrid%mmean_leaf_resp ) - if(associated(cgrid%mmean_root_resp )) deallocate(cgrid%mmean_root_resp ) - if(associated(cgrid%mmean_growth_resp )) deallocate(cgrid%mmean_growth_resp ) - if(associated(cgrid%mmean_storage_resp )) deallocate(cgrid%mmean_storage_resp ) - if(associated(cgrid%mmean_vleaf_resp )) deallocate(cgrid%mmean_vleaf_resp ) - if(associated(cgrid%mmean_gpp_dbh )) deallocate(cgrid%mmean_gpp_dbh ) - if(associated(cgrid%mmean_lai_pft )) deallocate(cgrid%mmean_lai_pft ) - if(associated(cgrid%mmean_wai_pft )) deallocate(cgrid%mmean_wai_pft ) - if(associated(cgrid%mmean_can_temp )) deallocate(cgrid%mmean_can_temp ) - if(associated(cgrid%mmean_can_shv )) deallocate(cgrid%mmean_can_shv ) - if(associated(cgrid%mmean_can_co2 )) deallocate(cgrid%mmean_can_co2 ) - if(associated(cgrid%mmean_can_rhos )) deallocate(cgrid%mmean_can_rhos ) - if(associated(cgrid%mmean_can_prss )) deallocate(cgrid%mmean_can_prss ) - if(associated(cgrid%mmean_can_theta )) deallocate(cgrid%mmean_can_theta ) - if(associated(cgrid%mmean_can_theiv )) deallocate(cgrid%mmean_can_theiv ) - if(associated(cgrid%mmean_can_vpdef )) deallocate(cgrid%mmean_can_vpdef ) - if(associated(cgrid%mmean_gnd_temp )) deallocate(cgrid%mmean_gnd_temp ) - if(associated(cgrid%mmean_gnd_shv )) deallocate(cgrid%mmean_gnd_shv ) - if(associated(cgrid%mmean_leaf_energy )) deallocate(cgrid%mmean_leaf_energy ) - if(associated(cgrid%mmean_leaf_water )) deallocate(cgrid%mmean_leaf_water ) - if(associated(cgrid%mmean_leaf_hcap )) deallocate(cgrid%mmean_leaf_hcap ) - if(associated(cgrid%mmean_leaf_temp )) deallocate(cgrid%mmean_leaf_temp ) - if(associated(cgrid%mmean_leaf_vpdef )) deallocate(cgrid%mmean_leaf_vpdef ) - if(associated(cgrid%mmean_wood_energy )) deallocate(cgrid%mmean_wood_energy ) - if(associated(cgrid%mmean_wood_water )) deallocate(cgrid%mmean_wood_water ) - if(associated(cgrid%mmean_wood_hcap )) deallocate(cgrid%mmean_wood_hcap ) - if(associated(cgrid%mmean_wood_temp )) deallocate(cgrid%mmean_wood_temp ) - if(associated(cgrid%mmean_atm_temp )) deallocate(cgrid%mmean_atm_temp ) - if(associated(cgrid%mmean_atm_vpdef )) deallocate(cgrid%mmean_atm_vpdef ) - if(associated(cgrid%mmean_rshort )) deallocate(cgrid%mmean_rshort ) - if(associated(cgrid%mmean_rshort_diff )) deallocate(cgrid%mmean_rshort_diff ) - if(associated(cgrid%mmean_par )) deallocate(cgrid%mmean_par ) - if(associated(cgrid%mmean_par_diff )) deallocate(cgrid%mmean_par_diff ) - if(associated(cgrid%mmean_rlong )) deallocate(cgrid%mmean_rlong ) - if(associated(cgrid%mmean_rshort_gnd )) deallocate(cgrid%mmean_rshort_gnd ) - if(associated(cgrid%mmean_par_gnd )) deallocate(cgrid%mmean_par_gnd ) - if(associated(cgrid%mmean_rlong_gnd )) deallocate(cgrid%mmean_rlong_gnd ) - if(associated(cgrid%mmean_albedo )) deallocate(cgrid%mmean_albedo ) - if(associated(cgrid%mmean_albedo_beam )) deallocate(cgrid%mmean_albedo_beam ) - if(associated(cgrid%mmean_albedo_diffuse )) deallocate(cgrid%mmean_albedo_diffuse ) - if(associated(cgrid%mmean_rlong_albedo )) deallocate(cgrid%mmean_rlong_albedo ) - if(associated(cgrid%mmean_rlongup )) deallocate(cgrid%mmean_rlongup ) - if(associated(cgrid%mmean_nirup )) deallocate(cgrid%mmean_nirup ) - if(associated(cgrid%mmean_parup )) deallocate(cgrid%mmean_parup ) - if(associated(cgrid%mmean_rshortup )) deallocate(cgrid%mmean_rshortup ) - if(associated(cgrid%mmean_rnet )) deallocate(cgrid%mmean_rnet ) - if(associated(cgrid%mmean_atm_shv )) deallocate(cgrid%mmean_atm_shv ) - if(associated(cgrid%mmean_atm_co2 )) deallocate(cgrid%mmean_atm_co2 ) - if(associated(cgrid%mmean_atm_prss )) deallocate(cgrid%mmean_atm_prss ) - if(associated(cgrid%mmean_atm_vels )) deallocate(cgrid%mmean_atm_vels ) - if(associated(cgrid%mmean_pcpg )) deallocate(cgrid%mmean_pcpg ) - if(associated(cgrid%mmean_runoff )) deallocate(cgrid%mmean_runoff ) - if(associated(cgrid%mmean_drainage )) deallocate(cgrid%mmean_drainage ) - if(associated(cgrid%mmean_co2_residual )) deallocate(cgrid%mmean_co2_residual ) - if(associated(cgrid%mmean_energy_residual )) deallocate(cgrid%mmean_energy_residual ) - if(associated(cgrid%mmean_water_residual )) deallocate(cgrid%mmean_water_residual ) - if(associated(cgrid%bseeds_pft )) deallocate(cgrid%bseeds_pft ) - if(associated(cgrid%agb_pft )) deallocate(cgrid%agb_pft ) - if(associated(cgrid%ba_pft )) deallocate(cgrid%ba_pft ) - - - if(associated(cgrid%mmsqu_gpp )) deallocate(cgrid%mmsqu_gpp ) - if(associated(cgrid%mmsqu_leaf_resp )) deallocate(cgrid%mmsqu_leaf_resp ) - if(associated(cgrid%mmsqu_root_resp )) deallocate(cgrid%mmsqu_root_resp ) - if(associated(cgrid%mmsqu_plresp )) deallocate(cgrid%mmsqu_plresp ) - if(associated(cgrid%mmsqu_carbon_ac )) deallocate(cgrid%mmsqu_carbon_ac ) - if(associated(cgrid%mmsqu_carbon_st )) deallocate(cgrid%mmsqu_carbon_st ) - if(associated(cgrid%mmsqu_nep )) deallocate(cgrid%mmsqu_nep ) - if(associated(cgrid%mmsqu_rh )) deallocate(cgrid%mmsqu_rh ) - if(associated(cgrid%mmsqu_cwd_rh )) deallocate(cgrid%mmsqu_cwd_rh ) - if(associated(cgrid%mmsqu_sensible_ac )) deallocate(cgrid%mmsqu_sensible_ac ) - if(associated(cgrid%mmsqu_sensible_lc )) deallocate(cgrid%mmsqu_sensible_lc ) - if(associated(cgrid%mmsqu_sensible_wc )) deallocate(cgrid%mmsqu_sensible_wc ) - if(associated(cgrid%mmsqu_sensible_gc )) deallocate(cgrid%mmsqu_sensible_gc ) - if(associated(cgrid%mmsqu_evap )) deallocate(cgrid%mmsqu_evap ) - if(associated(cgrid%mmsqu_transp )) deallocate(cgrid%mmsqu_transp ) - if(associated(cgrid%mmsqu_vapor_ac )) deallocate(cgrid%mmsqu_vapor_ac ) - if(associated(cgrid%mmsqu_vapor_lc )) deallocate(cgrid%mmsqu_vapor_lc ) - if(associated(cgrid%mmsqu_vapor_wc )) deallocate(cgrid%mmsqu_vapor_wc ) - if(associated(cgrid%mmsqu_vapor_gc )) deallocate(cgrid%mmsqu_vapor_gc ) - if(associated(cgrid%mmsqu_ustar )) deallocate(cgrid%mmsqu_ustar ) - if(associated(cgrid%mmsqu_rlongup )) deallocate(cgrid%mmsqu_rlongup ) - if(associated(cgrid%mmsqu_parup )) deallocate(cgrid%mmsqu_parup ) - if(associated(cgrid%mmsqu_nirup )) deallocate(cgrid%mmsqu_nirup ) - if(associated(cgrid%mmsqu_rshortup )) deallocate(cgrid%mmsqu_rshortup ) - if(associated(cgrid%mmsqu_rnet )) deallocate(cgrid%mmsqu_rnet ) - if(associated(cgrid%mmsqu_albedo )) deallocate(cgrid%mmsqu_albedo ) - - if(associated(cgrid%disturbance_rates )) deallocate(cgrid%disturbance_rates ) - if(associated(cgrid%workload )) deallocate(cgrid%workload ) - - if(associated(cgrid%qmean_pcpg )) deallocate(cgrid%qmean_pcpg ) - if(associated(cgrid%qmean_runoff )) deallocate(cgrid%qmean_runoff ) - if(associated(cgrid%qmean_drainage )) deallocate(cgrid%qmean_drainage ) - if(associated(cgrid%qmean_evap )) deallocate(cgrid%qmean_evap ) - if(associated(cgrid%qmean_transp )) deallocate(cgrid%qmean_transp ) - if(associated(cgrid%qmean_vapor_ac )) deallocate(cgrid%qmean_vapor_ac ) - if(associated(cgrid%qmean_vapor_gc )) deallocate(cgrid%qmean_vapor_gc ) - if(associated(cgrid%qmean_vapor_lc )) deallocate(cgrid%qmean_vapor_lc ) - if(associated(cgrid%qmean_vapor_wc )) deallocate(cgrid%qmean_vapor_wc ) - if(associated(cgrid%qmean_sensible_ac )) deallocate(cgrid%qmean_sensible_ac ) - if(associated(cgrid%qmean_sensible_gc )) deallocate(cgrid%qmean_sensible_gc ) - if(associated(cgrid%qmean_sensible_lc )) deallocate(cgrid%qmean_sensible_lc ) - if(associated(cgrid%qmean_sensible_wc )) deallocate(cgrid%qmean_sensible_wc ) - if(associated(cgrid%qmean_ustar )) deallocate(cgrid%qmean_ustar ) - if(associated(cgrid%qmean_tstar )) deallocate(cgrid%qmean_tstar ) - if(associated(cgrid%qmean_qstar )) deallocate(cgrid%qmean_qstar ) - if(associated(cgrid%qmean_cstar )) deallocate(cgrid%qmean_cstar ) - if(associated(cgrid%qmean_carbon_ac )) deallocate(cgrid%qmean_carbon_ac ) - if(associated(cgrid%qmean_carbon_st )) deallocate(cgrid%qmean_carbon_st ) - if(associated(cgrid%qmean_gpp )) deallocate(cgrid%qmean_gpp ) - if(associated(cgrid%qmean_nep )) deallocate(cgrid%qmean_nep ) - if(associated(cgrid%qmean_plresp )) deallocate(cgrid%qmean_plresp ) - if(associated(cgrid%qmean_rh )) deallocate(cgrid%qmean_rh ) - if(associated(cgrid%qmean_cwd_rh )) deallocate(cgrid%qmean_cwd_rh ) - if(associated(cgrid%qmean_leaf_resp )) deallocate(cgrid%qmean_leaf_resp ) - if(associated(cgrid%qmean_root_resp )) deallocate(cgrid%qmean_root_resp ) - if(associated(cgrid%qmean_soil_temp )) deallocate(cgrid%qmean_soil_temp ) - if(associated(cgrid%qmean_soil_mstpot )) deallocate(cgrid%qmean_soil_mstpot ) - if(associated(cgrid%qmean_soil_water )) deallocate(cgrid%qmean_soil_water ) - if(associated(cgrid%qmean_fs_open )) deallocate(cgrid%qmean_fs_open ) - if(associated(cgrid%qmean_fsw )) deallocate(cgrid%qmean_fsw ) - if(associated(cgrid%qmean_fsn )) deallocate(cgrid%qmean_fsn ) - if(associated(cgrid%qmean_can_temp )) deallocate(cgrid%qmean_can_temp ) - if(associated(cgrid%qmean_can_shv )) deallocate(cgrid%qmean_can_shv ) - if(associated(cgrid%qmean_can_co2 )) deallocate(cgrid%qmean_can_co2 ) - if(associated(cgrid%qmean_can_rhos )) deallocate(cgrid%qmean_can_rhos ) - if(associated(cgrid%qmean_can_prss )) deallocate(cgrid%qmean_can_prss ) - if(associated(cgrid%qmean_can_theta )) deallocate(cgrid%qmean_can_theta ) - if(associated(cgrid%qmean_can_theiv )) deallocate(cgrid%qmean_can_theiv ) - if(associated(cgrid%qmean_can_vpdef )) deallocate(cgrid%qmean_can_vpdef ) - if(associated(cgrid%qmean_gnd_temp )) deallocate(cgrid%qmean_gnd_temp ) - if(associated(cgrid%qmean_gnd_shv )) deallocate(cgrid%qmean_gnd_shv ) - if(associated(cgrid%qmean_leaf_energy )) deallocate(cgrid%qmean_leaf_energy ) - if(associated(cgrid%qmean_leaf_water )) deallocate(cgrid%qmean_leaf_water ) - if(associated(cgrid%qmean_leaf_temp )) deallocate(cgrid%qmean_leaf_temp ) - if(associated(cgrid%qmean_leaf_vpdef )) deallocate(cgrid%qmean_leaf_vpdef ) - if(associated(cgrid%qmean_leaf_hcap )) deallocate(cgrid%qmean_leaf_hcap ) - if(associated(cgrid%qmean_wood_energy )) deallocate(cgrid%qmean_wood_energy ) - if(associated(cgrid%qmean_wood_water )) deallocate(cgrid%qmean_wood_water ) - if(associated(cgrid%qmean_wood_temp )) deallocate(cgrid%qmean_wood_temp ) - if(associated(cgrid%qmean_wood_hcap )) deallocate(cgrid%qmean_wood_hcap ) - if(associated(cgrid%qmean_atm_temp )) deallocate(cgrid%qmean_atm_temp ) - if(associated(cgrid%qmean_atm_vpdef )) deallocate(cgrid%qmean_atm_vpdef ) - if(associated(cgrid%qmean_rshort )) deallocate(cgrid%qmean_rshort ) - if(associated(cgrid%qmean_rshort_diff )) deallocate(cgrid%qmean_rshort_diff ) - if(associated(cgrid%qmean_par )) deallocate(cgrid%qmean_par ) - if(associated(cgrid%qmean_par_diff )) deallocate(cgrid%qmean_par_diff ) - if(associated(cgrid%qmean_rlong )) deallocate(cgrid%qmean_rlong ) - if(associated(cgrid%qmean_rshort_gnd )) deallocate(cgrid%qmean_rshort_gnd ) - if(associated(cgrid%qmean_par_gnd )) deallocate(cgrid%qmean_par_gnd ) - if(associated(cgrid%qmean_rlong_gnd )) deallocate(cgrid%qmean_rlong_gnd ) - if(associated(cgrid%qmean_albedo )) deallocate(cgrid%qmean_albedo ) - if(associated(cgrid%qmean_albedo_beam )) deallocate(cgrid%qmean_albedo_beam ) - if(associated(cgrid%qmean_albedo_diffuse )) deallocate(cgrid%qmean_albedo_diffuse ) - if(associated(cgrid%qmean_rlong_albedo )) deallocate(cgrid%qmean_rlong_albedo ) - if(associated(cgrid%qmean_rlongup )) deallocate(cgrid%qmean_rlongup ) - if(associated(cgrid%qmean_parup )) deallocate(cgrid%qmean_parup ) - if(associated(cgrid%qmean_nirup )) deallocate(cgrid%qmean_nirup ) - if(associated(cgrid%qmean_rshortup )) deallocate(cgrid%qmean_rshortup ) - if(associated(cgrid%qmean_rnet )) deallocate(cgrid%qmean_rnet ) - if(associated(cgrid%qmean_atm_co2 )) deallocate(cgrid%qmean_atm_co2 ) - if(associated(cgrid%qmean_atm_prss )) deallocate(cgrid%qmean_atm_prss ) - if(associated(cgrid%qmean_atm_vels )) deallocate(cgrid%qmean_atm_vels ) - if(associated(cgrid%qmsqu_gpp )) deallocate(cgrid%qmsqu_gpp ) - if(associated(cgrid%qmsqu_leaf_resp )) deallocate(cgrid%qmsqu_leaf_resp ) - if(associated(cgrid%qmsqu_root_resp )) deallocate(cgrid%qmsqu_root_resp ) - if(associated(cgrid%qmsqu_plresp )) deallocate(cgrid%qmsqu_plresp ) - if(associated(cgrid%qmsqu_carbon_ac )) deallocate(cgrid%qmsqu_carbon_ac ) - if(associated(cgrid%qmsqu_carbon_st )) deallocate(cgrid%qmsqu_carbon_st ) - if(associated(cgrid%qmsqu_nep )) deallocate(cgrid%qmsqu_nep ) - if(associated(cgrid%qmsqu_rh )) deallocate(cgrid%qmsqu_rh ) - if(associated(cgrid%qmsqu_cwd_rh )) deallocate(cgrid%qmsqu_cwd_rh ) - if(associated(cgrid%qmsqu_sensible_ac )) deallocate(cgrid%qmsqu_sensible_ac ) - if(associated(cgrid%qmsqu_sensible_lc )) deallocate(cgrid%qmsqu_sensible_lc ) - if(associated(cgrid%qmsqu_sensible_wc )) deallocate(cgrid%qmsqu_sensible_wc ) - if(associated(cgrid%qmsqu_sensible_gc )) deallocate(cgrid%qmsqu_sensible_gc ) - if(associated(cgrid%qmsqu_evap )) deallocate(cgrid%qmsqu_evap ) - if(associated(cgrid%qmsqu_transp )) deallocate(cgrid%qmsqu_transp ) - if(associated(cgrid%qmsqu_vapor_ac )) deallocate(cgrid%qmsqu_vapor_ac ) - if(associated(cgrid%qmsqu_vapor_lc )) deallocate(cgrid%qmsqu_vapor_lc ) - if(associated(cgrid%qmsqu_vapor_wc )) deallocate(cgrid%qmsqu_vapor_wc ) - if(associated(cgrid%qmsqu_vapor_gc )) deallocate(cgrid%qmsqu_vapor_gc ) - if(associated(cgrid%qmsqu_ustar )) deallocate(cgrid%qmsqu_ustar ) - if(associated(cgrid%qmsqu_rlongup )) deallocate(cgrid%qmsqu_rlongup ) - if(associated(cgrid%qmsqu_parup )) deallocate(cgrid%qmsqu_parup ) - if(associated(cgrid%qmsqu_nirup )) deallocate(cgrid%qmsqu_nirup ) - if(associated(cgrid%qmsqu_rshortup )) deallocate(cgrid%qmsqu_rshortup ) - if(associated(cgrid%qmsqu_rnet )) deallocate(cgrid%qmsqu_rnet ) - if(associated(cgrid%qmsqu_albedo )) deallocate(cgrid%qmsqu_albedo ) - - do ipy=1,cgrid%npolygons - call deallocate_polygontype(cgrid%polygon(ipy)) - end do - if(associated(cgrid%polygon )) deallocate(cgrid%polygon ) - - - return - end subroutine deallocate_edtype -!============================================================================! -!============================================================================! - - - - - -!============================================================================! -!============================================================================! - subroutine deallocate_polygontype(cpoly) - - implicit none - - type(polygontype),target :: cpoly - integer :: isi - - if(associated(cpoly%sipa_id )) deallocate(cpoly%sipa_id ) - if(associated(cpoly%sipa_n )) deallocate(cpoly%sipa_n ) - if(associated(cpoly%patch_count )) deallocate(cpoly%patch_count ) - if(associated(cpoly%sitenum )) deallocate(cpoly%sitenum ) - - if(associated(cpoly%lsl )) deallocate(cpoly%lsl ) - - if(associated(cpoly%area )) deallocate(cpoly%area ) - if(associated(cpoly%patch_area )) deallocate(cpoly%patch_area ) - if(associated(cpoly%elevation )) deallocate(cpoly%elevation ) - if(associated(cpoly%slope )) deallocate(cpoly%slope ) - if(associated(cpoly%aspect )) deallocate(cpoly%aspect ) - - if(associated(cpoly%num_landuse_years )) deallocate(cpoly%num_landuse_years ) - if(associated(cpoly%mindbh_primary )) deallocate(cpoly%mindbh_primary ) - if(associated(cpoly%probharv_primary )) deallocate(cpoly%probharv_primary ) - if(associated(cpoly%mindbh_secondary )) deallocate(cpoly%mindbh_secondary ) - if(associated(cpoly%probharv_secondary )) deallocate(cpoly%probharv_secondary ) - - - if(associated(cpoly%lai_pft )) deallocate(cpoly%lai_pft ) - if(associated(cpoly%wai_pft )) deallocate(cpoly%wai_pft ) - - if(associated(cpoly%TCI )) deallocate(cpoly%TCI ) - if(associated(cpoly%pptweight )) deallocate(cpoly%pptweight ) - if(associated(cpoly%lsl )) deallocate(cpoly%lsl ) - if(associated(cpoly%hydro_next )) deallocate(cpoly%hydro_next ) - if(associated(cpoly%hydro_prev )) deallocate(cpoly%hydro_prev ) - if(associated(cpoly%moist_W )) deallocate(cpoly%moist_W ) - if(associated(cpoly%moist_f )) deallocate(cpoly%moist_f ) - if(associated(cpoly%moist_tau )) deallocate(cpoly%moist_tau ) - if(associated(cpoly%moist_zi )) deallocate(cpoly%moist_zi ) - if(associated(cpoly%baseflow )) deallocate(cpoly%baseflow ) - if(associated(cpoly%ncol_soil )) deallocate(cpoly%ncol_soil ) - if(associated(cpoly%ntext_soil )) deallocate(cpoly%ntext_soil ) - if(associated(cpoly%min_monthly_temp )) deallocate(cpoly%min_monthly_temp ) - if(associated(cpoly%plantation )) deallocate(cpoly%plantation ) - if(associated(cpoly%agri_stocking_pft )) deallocate(cpoly%agri_stocking_pft ) - if(associated(cpoly%agri_stocking_density )) deallocate(cpoly%agri_stocking_density ) - if(associated(cpoly%plantation_stocking_pft )) deallocate(cpoly%plantation_stocking_pft ) - if(associated(cpoly%plantation_stocking_density )) deallocate(cpoly%plantation_stocking_density ) - if(associated(cpoly%primary_harvest_memory )) deallocate(cpoly%primary_harvest_memory ) - if(associated(cpoly%secondary_harvest_memory )) deallocate(cpoly%secondary_harvest_memory ) - if(associated(cpoly%fire_disturbance_rate )) deallocate(cpoly%fire_disturbance_rate ) - if(associated(cpoly%ignition_rate )) deallocate(cpoly%ignition_rate ) - if(associated(cpoly%lambda_fire )) deallocate(cpoly%lambda_fire ) - if(associated(cpoly%avg_monthly_pcpg )) deallocate(cpoly%avg_monthly_pcpg ) - if(associated(cpoly%phen_pars )) deallocate(cpoly%phen_pars ) - if(associated(cpoly%nat_disturbance_rate )) deallocate(cpoly%nat_disturbance_rate ) - if(associated(cpoly%nat_dist_type )) deallocate(cpoly%nat_dist_type ) - if(associated(cpoly%disturbance_memory )) deallocate(cpoly%disturbance_memory ) - if(associated(cpoly%disturbance_rates )) deallocate(cpoly%disturbance_rates ) - if(associated(cpoly%green_leaf_factor )) deallocate(cpoly%green_leaf_factor ) - if(associated(cpoly%leaf_aging_factor )) deallocate(cpoly%leaf_aging_factor ) - if(associated(cpoly%met )) deallocate(cpoly%met ) - if(associated(cpoly%basal_area )) deallocate(cpoly%basal_area ) - if(associated(cpoly%agb )) deallocate(cpoly%agb ) - if(associated(cpoly%pldens )) deallocate(cpoly%pldens ) - if(associated(cpoly%bseeds )) deallocate(cpoly%bseeds ) - - if(associated(cpoly%basal_area_growth )) deallocate(cpoly%basal_area_growth ) - if(associated(cpoly%agb_growth )) deallocate(cpoly%agb_growth ) - if(associated(cpoly%basal_area_mort )) deallocate(cpoly%basal_area_mort ) - if(associated(cpoly%agb_mort )) deallocate(cpoly%agb_mort ) - if(associated(cpoly%basal_area_cut )) deallocate(cpoly%basal_area_cut )!NOT IN REGISTRY - if(associated(cpoly%agb_cut )) deallocate(cpoly%agb_cut ) - - if(associated(cpoly%cosaoi )) deallocate(cpoly%cosaoi ) - if(associated(cpoly%avg_albedo_beam )) deallocate(cpoly%avg_albedo_beam ) - if(associated(cpoly%avg_albedo_diffuse )) deallocate(cpoly%avg_albedo_diffuse ) - if(associated(cpoly%avg_rlong_albedo )) deallocate(cpoly%avg_rlong_albedo ) - if(associated(cpoly%avg_albedo )) deallocate(cpoly%avg_albedo ) - if(associated(cpoly%avg_rlongup )) deallocate(cpoly%avg_rlongup ) - if(associated(cpoly%avg_parup )) deallocate(cpoly%avg_parup ) - if(associated(cpoly%avg_nirup )) deallocate(cpoly%avg_nirup ) - if(associated(cpoly%avg_rshortup )) deallocate(cpoly%avg_rshortup ) - if(associated(cpoly%avg_rnet )) deallocate(cpoly%avg_rnet ) - - if(associated(cpoly%daylight )) deallocate(cpoly%daylight ) - - if(associated(cpoly%lai )) deallocate(cpoly%lai ) - if(associated(cpoly%avg_lma )) deallocate(cpoly%avg_lma ) - if(associated(cpoly%wai )) deallocate(cpoly%wai ) - - ! Fast time flux diagnostics - ! --------------------------------------------- - if(associated(cpoly%avg_vapor_lc )) deallocate(cpoly%avg_vapor_lc ) - if(associated(cpoly%avg_vapor_wc )) deallocate(cpoly%avg_vapor_wc ) - if(associated(cpoly%avg_vapor_gc )) deallocate(cpoly%avg_vapor_gc ) - if(associated(cpoly%avg_wshed_vg )) deallocate(cpoly%avg_wshed_vg ) - if(associated(cpoly%avg_intercepted )) deallocate(cpoly%avg_intercepted ) - if(associated(cpoly%avg_throughfall )) deallocate(cpoly%avg_throughfall ) - if(associated(cpoly%avg_vapor_ac )) deallocate(cpoly%avg_vapor_ac ) - if(associated(cpoly%avg_transp )) deallocate(cpoly%avg_transp ) - if(associated(cpoly%avg_evap )) deallocate(cpoly%avg_evap ) - if(associated(cpoly%avg_smoist_gg )) deallocate(cpoly%avg_smoist_gg ) - if(associated(cpoly%avg_transloss )) deallocate(cpoly%avg_transloss ) - if(associated(cpoly%avg_runoff )) deallocate(cpoly%avg_runoff ) - if(associated(cpoly%avg_drainage )) deallocate(cpoly%avg_drainage ) - if(associated(cpoly%avg_drainage_heat )) deallocate(cpoly%avg_drainage_heat ) - if(associated(cpoly%avg_rshort_gnd )) deallocate(cpoly%avg_rshort_gnd ) - if(associated(cpoly%avg_par_gnd )) deallocate(cpoly%avg_par_gnd ) - if(associated(cpoly%avg_rlong_gnd )) deallocate(cpoly%avg_rlong_gnd ) - if(associated(cpoly%avg_ustar )) deallocate(cpoly%avg_ustar ) - if(associated(cpoly%avg_tstar )) deallocate(cpoly%avg_tstar ) - if(associated(cpoly%avg_qstar )) deallocate(cpoly%avg_qstar ) - if(associated(cpoly%avg_cstar )) deallocate(cpoly%avg_cstar ) - if(associated(cpoly%avg_carbon_ac )) deallocate(cpoly%avg_carbon_ac ) - if(associated(cpoly%avg_carbon_st )) deallocate(cpoly%avg_carbon_st ) - if(associated(cpoly%avg_sensible_lc )) deallocate(cpoly%avg_sensible_lc ) - if(associated(cpoly%avg_sensible_wc )) deallocate(cpoly%avg_sensible_wc ) - if(associated(cpoly%avg_qwshed_vg )) deallocate(cpoly%avg_qwshed_vg ) - if(associated(cpoly%avg_qintercepted )) deallocate(cpoly%avg_qintercepted ) - if(associated(cpoly%avg_qthroughfall )) deallocate(cpoly%avg_qthroughfall ) - if(associated(cpoly%avg_sensible_gc )) deallocate(cpoly%avg_sensible_gc ) - if(associated(cpoly%avg_sensible_ac )) deallocate(cpoly%avg_sensible_ac ) - if(associated(cpoly%avg_sensible_gg )) deallocate(cpoly%avg_sensible_gg ) - if(associated(cpoly%avg_runoff_heat )) deallocate(cpoly%avg_runoff_heat ) - if(associated(cpoly%avg_leaf_energy )) deallocate(cpoly%avg_leaf_energy ) - if(associated(cpoly%avg_leaf_hcap )) deallocate(cpoly%avg_leaf_hcap ) - if(associated(cpoly%avg_leaf_temp )) deallocate(cpoly%avg_leaf_temp ) - if(associated(cpoly%avg_leaf_vpdef )) deallocate(cpoly%avg_leaf_vpdef ) - if(associated(cpoly%avg_leaf_fliq )) deallocate(cpoly%avg_leaf_fliq ) - if(associated(cpoly%avg_leaf_water )) deallocate(cpoly%avg_leaf_water ) - if(associated(cpoly%avg_wood_energy )) deallocate(cpoly%avg_wood_energy ) - if(associated(cpoly%avg_wood_hcap )) deallocate(cpoly%avg_wood_hcap ) - if(associated(cpoly%avg_wood_temp )) deallocate(cpoly%avg_wood_temp ) - if(associated(cpoly%avg_wood_fliq )) deallocate(cpoly%avg_wood_fliq ) - if(associated(cpoly%avg_wood_water )) deallocate(cpoly%avg_wood_water ) - if(associated(cpoly%avg_can_temp )) deallocate(cpoly%avg_can_temp ) - if(associated(cpoly%avg_can_shv )) deallocate(cpoly%avg_can_shv ) - if(associated(cpoly%avg_can_co2 )) deallocate(cpoly%avg_can_co2 ) - if(associated(cpoly%avg_can_rhos )) deallocate(cpoly%avg_can_rhos ) - if(associated(cpoly%avg_can_prss )) deallocate(cpoly%avg_can_prss ) - if(associated(cpoly%avg_can_theta )) deallocate(cpoly%avg_can_theta ) - if(associated(cpoly%avg_can_theiv )) deallocate(cpoly%avg_can_theiv ) - if(associated(cpoly%avg_can_vpdef )) deallocate(cpoly%avg_can_vpdef ) - if(associated(cpoly%avg_can_depth )) deallocate(cpoly%avg_can_depth ) - if(associated(cpoly%avg_soil_energy )) deallocate(cpoly%avg_soil_energy ) - if(associated(cpoly%avg_soil_mstpot )) deallocate(cpoly%avg_soil_mstpot ) - if(associated(cpoly%avg_soil_water )) deallocate(cpoly%avg_soil_water ) - if(associated(cpoly%avg_soil_temp )) deallocate(cpoly%avg_soil_temp ) - if(associated(cpoly%avg_soil_fracliq )) deallocate(cpoly%avg_soil_fracliq ) - if(associated(cpoly%avg_soil_rootfrac )) deallocate(cpoly%avg_soil_rootfrac ) - if(associated(cpoly%avg_soil_wetness )) deallocate(cpoly%avg_soil_wetness ) - if(associated(cpoly%avg_skin_temp )) deallocate(cpoly%avg_skin_temp ) - if(associated(cpoly%avg_available_water )) deallocate(cpoly%avg_available_water ) - if(associated(cpoly%runoff )) deallocate(cpoly%runoff ) - if(associated(cpoly%rad_avg )) deallocate(cpoly%rad_avg ) - ! Meteorological information - if(associated(cpoly%avg_atm_tmp )) deallocate(cpoly%avg_atm_tmp ) - if(associated(cpoly%avg_atm_vpdef )) deallocate(cpoly%avg_atm_vpdef ) - if(associated(cpoly%avg_atm_shv )) deallocate(cpoly%avg_atm_shv ) - if(associated(cpoly%avg_atm_prss )) deallocate(cpoly%avg_atm_prss ) - ! NACP - if(associated(cpoly%avg_sfcw_depth )) deallocate(cpoly%avg_sfcw_depth ) - if(associated(cpoly%avg_sfcw_energy )) deallocate(cpoly%avg_sfcw_energy ) - if(associated(cpoly%avg_sfcw_mass )) deallocate(cpoly%avg_sfcw_mass ) - if(associated(cpoly%avg_sfcw_fracliq )) deallocate(cpoly%avg_sfcw_fracliq ) - if(associated(cpoly%avg_sfcw_tempk )) deallocate(cpoly%avg_sfcw_tempk ) - if(associated(cpoly%avg_fsc )) deallocate(cpoly%avg_fsc ) - if(associated(cpoly%avg_stsc )) deallocate(cpoly%avg_stsc ) - if(associated(cpoly%avg_ssc )) deallocate(cpoly%avg_ssc ) - if(associated(cpoly%avg_bdead )) deallocate(cpoly%avg_bdead ) - if(associated(cpoly%avg_balive )) deallocate(cpoly%avg_balive ) - if(associated(cpoly%avg_fsn )) deallocate(cpoly%avg_fsn ) - if(associated(cpoly%avg_msn )) deallocate(cpoly%avg_msn ) - - if(associated(cpoly%avg_bleaf )) deallocate(cpoly%avg_bleaf ) - if(associated(cpoly%avg_broot )) deallocate(cpoly%avg_broot ) - if(associated(cpoly%avg_bsapwooda )) deallocate(cpoly%avg_bsapwooda ) - if(associated(cpoly%avg_bsapwoodb )) deallocate(cpoly%avg_bsapwoodb ) - if(associated(cpoly%avg_bstorage )) deallocate(cpoly%avg_bstorage ) - if(associated(cpoly%avg_bseeds )) deallocate(cpoly%avg_bseeds ) - - if(associated(cpoly%dmean_co2_residual )) deallocate(cpoly%dmean_co2_residual ) - if(associated(cpoly%dmean_energy_residual )) deallocate(cpoly%dmean_energy_residual ) - if(associated(cpoly%dmean_water_residual )) deallocate(cpoly%dmean_water_residual ) - if(associated(cpoly%mmean_co2_residual )) deallocate(cpoly%mmean_co2_residual ) - if(associated(cpoly%mmean_energy_residual )) deallocate(cpoly%mmean_energy_residual ) - if(associated(cpoly%mmean_water_residual )) deallocate(cpoly%mmean_water_residual ) - - do isi = 1, cpoly%nsites - call deallocate_sitetype(cpoly%site(isi)) - end do - if(associated(cpoly%site )) deallocate(cpoly%site ) - - - return - end subroutine deallocate_polygontype -!============================================================================! -!============================================================================! - - - - - -!============================================================================! -!============================================================================! - subroutine deallocate_sitetype(csite) - - implicit none - - type(sitetype),target :: csite - integer :: ipa - - if(associated(csite%paco_id )) deallocate(csite%paco_id ) - if(associated(csite%paco_n )) deallocate(csite%paco_n ) - - if(associated(csite%dist_type )) deallocate(csite%dist_type ) - if(associated(csite%age )) deallocate(csite%age ) - if(associated(csite%area )) deallocate(csite%area ) - if(associated(csite%fast_soil_C )) deallocate(csite%fast_soil_C ) - if(associated(csite%slow_soil_C )) deallocate(csite%slow_soil_C ) - if(associated(csite%structural_soil_C )) deallocate(csite%structural_soil_C ) - if(associated(csite%structural_soil_L )) deallocate(csite%structural_soil_L ) - if(associated(csite%mineralized_soil_N )) deallocate(csite%mineralized_soil_N ) - if(associated(csite%fast_soil_N )) deallocate(csite%fast_soil_N ) - if(associated(csite%pname )) deallocate(csite%pname ) - if(associated(csite%sum_dgd )) deallocate(csite%sum_dgd ) - if(associated(csite%sum_chd )) deallocate(csite%sum_chd ) - if(associated(csite%plantation )) deallocate(csite%plantation ) - if(associated(csite%cohort_count )) deallocate(csite%cohort_count ) - if(associated(csite%can_theiv )) deallocate(csite%can_theiv ) - if(associated(csite%can_vpdef )) deallocate(csite%can_vpdef ) - if(associated(csite%can_temp )) deallocate(csite%can_temp ) - if(associated(csite%can_temp_pv )) deallocate(csite%can_temp_pv ) - if(associated(csite%can_shv )) deallocate(csite%can_shv ) - if(associated(csite%can_co2 )) deallocate(csite%can_co2 ) - if(associated(csite%can_rhos )) deallocate(csite%can_rhos ) - if(associated(csite%can_prss )) deallocate(csite%can_prss ) - if(associated(csite%can_theta )) deallocate(csite%can_theta ) - if(associated(csite%can_depth )) deallocate(csite%can_depth ) - if(associated(csite%opencan_frac )) deallocate(csite%opencan_frac ) - if(associated(csite%ggbare )) deallocate(csite%ggbare ) - if(associated(csite%ggveg )) deallocate(csite%ggveg ) - if(associated(csite%ggnet )) deallocate(csite%ggnet ) - if(associated(csite%ggsoil )) deallocate(csite%ggsoil ) - if(associated(csite%lai )) deallocate(csite%lai ) - if(associated(csite%wai )) deallocate(csite%wai ) - - if(associated(csite%sfcwater_mass )) deallocate(csite%sfcwater_mass ) - if(associated(csite%sfcwater_energy )) deallocate(csite%sfcwater_energy ) - if(associated(csite%sfcwater_depth )) deallocate(csite%sfcwater_depth ) - if(associated(csite%rshort_s )) deallocate(csite%rshort_s ) - if(associated(csite%rshort_s_beam )) deallocate(csite%rshort_s_beam ) - if(associated(csite%rshort_s_diffuse )) deallocate(csite%rshort_s_diffuse ) - if(associated(csite%par_s )) deallocate(csite%par_s ) - if(associated(csite%par_s_beam )) deallocate(csite%par_s_beam ) - if(associated(csite%par_s_diffuse )) deallocate(csite%par_s_diffuse ) - if(associated(csite%sfcwater_tempk )) deallocate(csite%sfcwater_tempk ) - if(associated(csite%sfcwater_fracliq )) deallocate(csite%sfcwater_fracliq ) - if(associated(csite%nlev_sfcwater )) deallocate(csite%nlev_sfcwater ) - if(associated(csite%soil_energy )) deallocate(csite%soil_energy ) - if(associated(csite%soil_water )) deallocate(csite%soil_water ) - if(associated(csite%soil_tempk )) deallocate(csite%soil_tempk ) - if(associated(csite%soil_fracliq )) deallocate(csite%soil_fracliq ) - if(associated(csite%rootdense )) deallocate(csite%rootdense ) - if(associated(csite%ground_shv )) deallocate(csite%ground_shv ) - if(associated(csite%ground_ssh )) deallocate(csite%ground_ssh ) - if(associated(csite%ground_temp )) deallocate(csite%ground_temp ) - if(associated(csite%ground_fliq )) deallocate(csite%ground_fliq ) - if(associated(csite%rough )) deallocate(csite%rough ) - if(associated(csite%par_l_max )) deallocate(csite%par_l_max ) - if(associated(csite%par_l_beam_max )) deallocate(csite%par_l_beam_max ) - if(associated(csite%par_l_diffuse_max )) deallocate(csite%par_l_diffuse_max ) - if(associated(csite%A_o_max )) deallocate(csite%A_o_max ) - if(associated(csite%A_c_max )) deallocate(csite%A_c_max ) - - if(associated(csite%avg_daily_temp )) deallocate(csite%avg_daily_temp ) - if(associated(csite%avg_monthly_gndwater )) deallocate(csite%avg_monthly_gndwater ) - if(associated(csite%avg_monthly_waterdef )) deallocate(csite%avg_monthly_waterdef ) - if(associated(csite%mean_rh )) deallocate(csite%mean_rh ) - if(associated(csite%dmean_rh )) deallocate(csite%dmean_rh ) - if(associated(csite%qmean_rh )) deallocate(csite%qmean_rh ) - if(associated(csite%mmean_rh )) deallocate(csite%mmean_rh ) - if(associated(csite%mean_cwd_rh )) deallocate(csite%mean_cwd_rh ) - if(associated(csite%dmean_cwd_rh )) deallocate(csite%dmean_cwd_rh ) - if(associated(csite%qmean_cwd_rh )) deallocate(csite%qmean_cwd_rh ) - if(associated(csite%mmean_cwd_rh )) deallocate(csite%mmean_cwd_rh ) - if(associated(csite%dmean_albedo )) deallocate(csite%dmean_albedo ) - if(associated(csite%dmean_albedo_beam )) deallocate(csite%dmean_albedo_beam ) - if(associated(csite%dmean_albedo_diffuse )) deallocate(csite%dmean_albedo_diffuse ) - if(associated(csite%mmean_albedo )) deallocate(csite%mmean_albedo ) - if(associated(csite%mmean_albedo_beam )) deallocate(csite%mmean_albedo_beam ) - if(associated(csite%mmean_albedo_diffuse )) deallocate(csite%mmean_albedo_diffuse ) - if(associated(csite%qmean_albedo )) deallocate(csite%qmean_albedo ) - if(associated(csite%qmean_albedo_beam )) deallocate(csite%qmean_albedo_beam ) - if(associated(csite%qmean_albedo_diffuse )) deallocate(csite%qmean_albedo_diffuse ) - if(associated(csite%mean_nep )) deallocate(csite%mean_nep ) - if(associated(csite%wbudget_loss2atm )) deallocate(csite%wbudget_loss2atm ) - if(associated(csite%wbudget_denseffect )) deallocate(csite%wbudget_denseffect ) - if(associated(csite%wbudget_precipgain )) deallocate(csite%wbudget_precipgain ) - if(associated(csite%wbudget_loss2runoff )) deallocate(csite%wbudget_loss2runoff ) - if(associated(csite%wbudget_loss2drainage )) deallocate(csite%wbudget_loss2drainage ) - if(associated(csite%wbudget_initialstorage )) deallocate(csite%wbudget_initialstorage ) - if(associated(csite%wbudget_residual )) deallocate(csite%wbudget_residual ) - if(associated(csite%ebudget_loss2atm )) deallocate(csite%ebudget_loss2atm ) - if(associated(csite%ebudget_denseffect )) deallocate(csite%ebudget_denseffect ) - if(associated(csite%ebudget_prsseffect )) deallocate(csite%ebudget_prsseffect ) - if(associated(csite%ebudget_loss2runoff )) deallocate(csite%ebudget_loss2runoff ) - if(associated(csite%ebudget_loss2drainage )) deallocate(csite%ebudget_loss2drainage ) - if(associated(csite%ebudget_netrad )) deallocate(csite%ebudget_netrad ) - if(associated(csite%ebudget_precipgain )) deallocate(csite%ebudget_precipgain ) - if(associated(csite%ebudget_initialstorage )) deallocate(csite%ebudget_initialstorage ) - if(associated(csite%ebudget_residual )) deallocate(csite%ebudget_residual ) - if(associated(csite%co2budget_initialstorage )) deallocate(csite%co2budget_initialstorage ) - if(associated(csite%co2budget_residual )) deallocate(csite%co2budget_residual ) - if(associated(csite%co2budget_loss2atm )) deallocate(csite%co2budget_loss2atm ) - if(associated(csite%co2budget_denseffect )) deallocate(csite%co2budget_denseffect ) - if(associated(csite%co2budget_gpp )) deallocate(csite%co2budget_gpp ) - if(associated(csite%co2budget_gpp_dbh )) deallocate(csite%co2budget_gpp_dbh ) - if(associated(csite%co2budget_plresp )) deallocate(csite%co2budget_plresp ) - if(associated(csite%co2budget_rh )) deallocate(csite%co2budget_rh ) - if(associated(csite%co2budget_cwd_rh )) deallocate(csite%co2budget_cwd_rh ) - if(associated(csite%today_A_decomp )) deallocate(csite%today_A_decomp ) - if(associated(csite%today_Af_decomp )) deallocate(csite%today_Af_decomp ) - if(associated(csite%dmean_A_decomp )) deallocate(csite%dmean_A_decomp ) - if(associated(csite%dmean_Af_decomp )) deallocate(csite%dmean_Af_decomp ) - if(associated(csite%mmean_A_decomp )) deallocate(csite%mmean_A_decomp ) - if(associated(csite%mmean_Af_decomp )) deallocate(csite%mmean_Af_decomp ) - if(associated(csite%repro )) deallocate(csite%repro ) - if(associated(csite%veg_rough )) deallocate(csite%veg_rough ) - if(associated(csite%veg_height )) deallocate(csite%veg_height ) - if(associated(csite%veg_displace )) deallocate(csite%veg_displace ) - if(associated(csite%fsc_in )) deallocate(csite%fsc_in ) - if(associated(csite%ssc_in )) deallocate(csite%ssc_in ) - if(associated(csite%ssl_in )) deallocate(csite%ssl_in ) - if(associated(csite%fsn_in )) deallocate(csite%fsn_in ) - if(associated(csite%total_plant_nitrogen_uptake )) deallocate(csite%total_plant_nitrogen_uptake ) - if(associated(csite%mineralized_N_input )) deallocate(csite%mineralized_N_input ) - if(associated(csite%mineralized_N_loss )) deallocate(csite%mineralized_N_loss ) - if(associated(csite%rshort_g )) deallocate(csite%rshort_g ) - if(associated(csite%rshort_g_beam )) deallocate(csite%rshort_g_beam ) - if(associated(csite%rshort_g_diffuse )) deallocate(csite%rshort_g_diffuse ) - if(associated(csite%par_g )) deallocate(csite%par_g ) - if(associated(csite%par_g_beam )) deallocate(csite%par_g_beam ) - if(associated(csite%par_g_diffuse )) deallocate(csite%par_g_diffuse ) - if(associated(csite%par_b )) deallocate(csite%par_b ) - if(associated(csite%par_b_beam )) deallocate(csite%par_b_beam ) - if(associated(csite%par_b_diffuse )) deallocate(csite%par_b_diffuse ) - if(associated(csite%nir_b )) deallocate(csite%nir_b ) - if(associated(csite%nir_b_beam )) deallocate(csite%nir_b_beam ) - if(associated(csite%nir_b_diffuse )) deallocate(csite%nir_b_diffuse ) - if(associated(csite%rlong_g )) deallocate(csite%rlong_g ) - if(associated(csite%rlong_g_surf )) deallocate(csite%rlong_g_surf ) - if(associated(csite%rlong_g_incid )) deallocate(csite%rlong_g_incid ) - if(associated(csite%rlong_s )) deallocate(csite%rlong_s ) - if(associated(csite%rlong_s_surf )) deallocate(csite%rlong_s_surf ) - if(associated(csite%rlong_s_incid )) deallocate(csite%rlong_s_incid ) - if(associated(csite%albedo )) deallocate(csite%albedo ) - if(associated(csite%albedo_beam )) deallocate(csite%albedo_beam ) - if(associated(csite%albedo_diffuse )) deallocate(csite%albedo_diffuse ) - if(associated(csite%rnet )) deallocate(csite%rnet ) - if(associated(csite%rlongup )) deallocate(csite%rlongup ) - if(associated(csite%parup )) deallocate(csite%parup ) - if(associated(csite%nirup )) deallocate(csite%nirup ) - if(associated(csite%rshortup )) deallocate(csite%rshortup ) - if(associated(csite%rlong_albedo )) deallocate(csite%rlong_albedo ) - if(associated(csite%total_sfcw_depth )) deallocate(csite%total_sfcw_depth ) - if(associated(csite%snowfac )) deallocate(csite%snowfac ) - if(associated(csite%A_decomp )) deallocate(csite%A_decomp ) - if(associated(csite%f_decomp )) deallocate(csite%f_decomp ) - if(associated(csite%rh )) deallocate(csite%rh ) - if(associated(csite%cwd_rh )) deallocate(csite%cwd_rh ) - if(associated(csite%cumlai_profile )) deallocate(csite%cumlai_profile ) - if(associated(csite%plant_ag_biomass )) deallocate(csite%plant_ag_biomass ) - - if(associated(csite%htry )) deallocate(csite%htry ) - if(associated(csite%hprev )) deallocate(csite%hprev ) - if(associated(csite%avg_rk4step )) deallocate(csite%avg_rk4step ) - if(associated(csite%dmean_rk4step )) deallocate(csite%dmean_rk4step ) - if(associated(csite%mmean_rk4step )) deallocate(csite%mmean_rk4step ) - - if(associated(csite%avg_available_water )) deallocate(csite%avg_available_water ) - - if(associated(csite%ustar )) deallocate(csite%ustar ) - if(associated(csite%tstar )) deallocate(csite%tstar ) - if(associated(csite%qstar )) deallocate(csite%qstar ) - if(associated(csite%cstar )) deallocate(csite%cstar ) - - if(associated(csite%zeta )) deallocate(csite%zeta ) - if(associated(csite%ribulk )) deallocate(csite%ribulk ) - - if(associated(csite%upwp )) deallocate(csite%upwp ) - if(associated(csite%qpwp )) deallocate(csite%qpwp ) - if(associated(csite%cpwp )) deallocate(csite%cpwp ) - if(associated(csite%tpwp )) deallocate(csite%tpwp ) - if(associated(csite%wpwp )) deallocate(csite%wpwp ) - - if(associated(csite%avg_rshort_gnd )) deallocate(csite%avg_rshort_gnd ) - if(associated(csite%avg_par_gnd )) deallocate(csite%avg_par_gnd ) - if(associated(csite%avg_rlong_gnd )) deallocate(csite%avg_rlong_gnd ) - if(associated(csite%avg_ustar )) deallocate(csite%avg_ustar ) - if(associated(csite%avg_tstar )) deallocate(csite%avg_tstar ) - if(associated(csite%avg_qstar )) deallocate(csite%avg_qstar ) - if(associated(csite%avg_cstar )) deallocate(csite%avg_cstar ) - if(associated(csite%avg_carbon_ac )) deallocate(csite%avg_carbon_ac ) - if(associated(csite%avg_carbon_st )) deallocate(csite%avg_carbon_st ) - if(associated(csite%avg_rlongup )) deallocate(csite%avg_rlongup ) - if(associated(csite%avg_parup )) deallocate(csite%avg_parup ) - if(associated(csite%avg_nirup )) deallocate(csite%avg_nirup ) - if(associated(csite%avg_rshortup )) deallocate(csite%avg_rshortup ) - if(associated(csite%avg_rnet )) deallocate(csite%avg_rnet ) - if(associated(csite%avg_albedo )) deallocate(csite%avg_albedo ) - if(associated(csite%avg_albedo_beam )) deallocate(csite%avg_albedo_beam ) - if(associated(csite%avg_albedo_diffuse )) deallocate(csite%avg_albedo_diffuse ) - if(associated(csite%avg_rlong_albedo )) deallocate(csite%avg_rlong_albedo ) - - if(associated(csite%avg_vapor_lc )) deallocate(csite%avg_vapor_lc ) - if(associated(csite%avg_vapor_wc )) deallocate(csite%avg_vapor_wc ) - if(associated(csite%avg_vapor_gc )) deallocate(csite%avg_vapor_gc ) - if(associated(csite%avg_wshed_vg )) deallocate(csite%avg_wshed_vg ) - if(associated(csite%avg_intercepted )) deallocate(csite%avg_intercepted ) - if(associated(csite%avg_throughfall )) deallocate(csite%avg_throughfall ) - if(associated(csite%avg_vapor_ac )) deallocate(csite%avg_vapor_ac ) - if(associated(csite%avg_transp )) deallocate(csite%avg_transp ) - if(associated(csite%avg_evap )) deallocate(csite%avg_evap ) - if(associated(csite%avg_smoist_gg )) deallocate(csite%avg_smoist_gg ) - if(associated(csite%avg_transloss )) deallocate(csite%avg_transloss ) - if(associated(csite%avg_runoff )) deallocate(csite%avg_runoff ) - if(associated(csite%avg_drainage )) deallocate(csite%avg_drainage ) - if(associated(csite%avg_drainage_heat )) deallocate(csite%avg_drainage_heat ) - if(associated(csite%avg_sensible_lc )) deallocate(csite%avg_sensible_lc ) - if(associated(csite%avg_sensible_wc )) deallocate(csite%avg_sensible_wc ) - if(associated(csite%avg_qwshed_vg )) deallocate(csite%avg_qwshed_vg ) - if(associated(csite%avg_qintercepted )) deallocate(csite%avg_qintercepted ) - if(associated(csite%avg_qthroughfall )) deallocate(csite%avg_qthroughfall ) - if(associated(csite%avg_sensible_gc )) deallocate(csite%avg_sensible_gc ) - if(associated(csite%avg_sensible_ac )) deallocate(csite%avg_sensible_ac ) - if(associated(csite%avg_sensible_gg )) deallocate(csite%avg_sensible_gg ) - if(associated(csite%avg_runoff_heat )) deallocate(csite%avg_runoff_heat ) - if(associated(csite%avg_leaf_energy )) deallocate(csite%avg_leaf_energy ) - if(associated(csite%avg_leaf_temp )) deallocate(csite%avg_leaf_temp ) - if(associated(csite%avg_leaf_vpdef )) deallocate(csite%avg_leaf_vpdef ) - if(associated(csite%avg_leaf_hcap )) deallocate(csite%avg_leaf_hcap ) - if(associated(csite%avg_leaf_fliq )) deallocate(csite%avg_leaf_fliq ) - if(associated(csite%avg_leaf_water )) deallocate(csite%avg_leaf_water ) - if(associated(csite%avg_wood_energy )) deallocate(csite%avg_wood_energy ) - if(associated(csite%avg_wood_temp )) deallocate(csite%avg_wood_temp ) - if(associated(csite%avg_wood_hcap )) deallocate(csite%avg_wood_hcap ) - if(associated(csite%avg_wood_fliq )) deallocate(csite%avg_wood_fliq ) - if(associated(csite%avg_wood_water )) deallocate(csite%avg_wood_water ) - - if(associated(csite%watertable )) deallocate(csite%watertable ) - if(associated(csite%moist_dz )) deallocate(csite%moist_dz ) - if(associated(csite%ksat )) deallocate(csite%ksat ) - if(associated(csite%soil_sat_energy )) deallocate(csite%soil_sat_energy ) - if(associated(csite%soil_sat_water )) deallocate(csite%soil_sat_water ) - if(associated(csite%soil_sat_heat )) deallocate(csite%soil_sat_heat ) - if(associated(csite%runoff_A )) deallocate(csite%runoff_A ) - if(associated(csite%runoff_rate )) deallocate(csite%runoff_rate ) - if(associated(csite%runoff )) deallocate(csite%runoff ) - - if(associated(csite%dmean_co2_residual )) deallocate(csite%dmean_co2_residual ) - if(associated(csite%dmean_energy_residual )) deallocate(csite%dmean_energy_residual ) - if(associated(csite%dmean_water_residual )) deallocate(csite%dmean_water_residual ) - if(associated(csite%mmean_co2_residual )) deallocate(csite%mmean_co2_residual ) - if(associated(csite%mmean_energy_residual )) deallocate(csite%mmean_energy_residual ) - if(associated(csite%mmean_water_residual )) deallocate(csite%mmean_water_residual ) - - do ipa=1,csite%npatches - if (csite%patch(ipa)%ncohorts > 0) call deallocate_patchtype(csite%patch(ipa)) - end do - - if(associated(csite%patch )) deallocate(csite%patch ) - - return - end subroutine deallocate_sitetype -!============================================================================! -!============================================================================! - - - - - -!============================================================================! -!============================================================================! - subroutine deallocate_patchtype(cpatch) - - implicit none - - type(patchtype),target :: cpatch - - if (cpatch%ncohorts == 0) return - - if(associated(cpatch%pft)) deallocate(cpatch%pft) - if(associated(cpatch%nplant)) deallocate(cpatch%nplant) - if(associated(cpatch%hite)) deallocate(cpatch%hite) - if(associated(cpatch%agb)) deallocate(cpatch%agb) - if(associated(cpatch%basarea)) deallocate(cpatch%basarea) - if(associated(cpatch%dagb_dt)) deallocate(cpatch%dagb_dt) - if(associated(cpatch%dlnagb_dt)) deallocate(cpatch%dlnagb_dt) - if(associated(cpatch%dba_dt)) deallocate(cpatch%dba_dt) - if(associated(cpatch%dlnba_dt)) deallocate(cpatch%dlnba_dt) - if(associated(cpatch%ddbh_dt)) deallocate(cpatch%ddbh_dt) - if(associated(cpatch%dlndbh_dt)) deallocate(cpatch%dlndbh_dt) - if(associated(cpatch%dbh)) deallocate(cpatch%dbh) - if(associated(cpatch%bdead)) deallocate(cpatch%bdead) - if(associated(cpatch%bleaf)) deallocate(cpatch%bleaf) - if(associated(cpatch%phenology_status)) deallocate(cpatch%phenology_status) - if(associated(cpatch%recruit_dbh)) deallocate(cpatch%recruit_dbh) - if(associated(cpatch%census_status)) deallocate(cpatch%census_status) - if(associated(cpatch%balive)) deallocate(cpatch%balive) - if(associated(cpatch%broot)) deallocate(cpatch%broot) - if(associated(cpatch%bsapwooda)) deallocate(cpatch%bsapwooda) - if(associated(cpatch%bsapwoodb)) deallocate(cpatch%bsapwoodb) - if(associated(cpatch%lai)) deallocate(cpatch%lai) - if(associated(cpatch%wai)) deallocate(cpatch%wai) - if(associated(cpatch%crown_area)) deallocate(cpatch%crown_area) - if(associated(cpatch%leaf_resolvable)) deallocate(cpatch%leaf_resolvable) - if(associated(cpatch%wood_resolvable)) deallocate(cpatch%wood_resolvable) - if(associated(cpatch%bstorage)) deallocate(cpatch%bstorage) - if(associated(cpatch%cb)) deallocate(cpatch%cb) - if(associated(cpatch%cb_lightmax)) deallocate(cpatch%cb_lightmax) - if(associated(cpatch%cb_moistmax)) deallocate(cpatch%cb_moistmax) - if(associated(cpatch%cbr_bar)) deallocate(cpatch%cbr_bar) - if(associated(cpatch%mmean_cb)) deallocate(cpatch%mmean_cb) - if(associated(cpatch%leaf_energy)) deallocate(cpatch%leaf_energy) - if(associated(cpatch%leaf_temp )) deallocate(cpatch%leaf_temp ) - if(associated(cpatch%leaf_vpdef )) deallocate(cpatch%leaf_vpdef ) - if(associated(cpatch%leaf_temp_pv )) deallocate(cpatch%leaf_temp_pv ) - if(associated(cpatch%leaf_hcap )) deallocate(cpatch%leaf_hcap ) - if(associated(cpatch%leaf_fliq )) deallocate(cpatch%leaf_fliq ) - if(associated(cpatch%leaf_water )) deallocate(cpatch%leaf_water ) - if(associated(cpatch%wood_energy)) deallocate(cpatch%wood_energy) - if(associated(cpatch%wood_temp )) deallocate(cpatch%wood_temp ) - if(associated(cpatch%wood_temp_pv )) deallocate(cpatch%wood_temp_pv ) - if(associated(cpatch%wood_hcap )) deallocate(cpatch%wood_hcap ) - if(associated(cpatch%wood_fliq )) deallocate(cpatch%wood_fliq ) - if(associated(cpatch%wood_water )) deallocate(cpatch%wood_water ) - if(associated(cpatch%veg_wind )) deallocate(cpatch%veg_wind ) - if(associated(cpatch%lsfc_shv_open)) deallocate(cpatch%lsfc_shv_open) - if(associated(cpatch%lsfc_shv_closed)) deallocate(cpatch%lsfc_shv_closed) - if(associated(cpatch%lsfc_co2_open)) deallocate(cpatch%lsfc_co2_open) - if(associated(cpatch%lsfc_co2_closed)) deallocate(cpatch%lsfc_co2_closed) - if(associated(cpatch%lint_shv)) deallocate(cpatch%lint_shv) - if(associated(cpatch%lint_co2_open)) deallocate(cpatch%lint_co2_open) - if(associated(cpatch%lint_co2_closed)) deallocate(cpatch%lint_co2_closed) - if(associated(cpatch%mean_gpp)) deallocate(cpatch%mean_gpp) - if(associated(cpatch%mean_leaf_resp)) deallocate(cpatch%mean_leaf_resp) - if(associated(cpatch%mean_root_resp)) deallocate(cpatch%mean_root_resp) - if(associated(cpatch%mean_growth_resp)) deallocate(cpatch%mean_growth_resp) - if(associated(cpatch%mean_storage_resp)) deallocate(cpatch%mean_storage_resp) - if(associated(cpatch%mean_vleaf_resp)) deallocate(cpatch%mean_vleaf_resp) - if(associated(cpatch%today_leaf_resp)) deallocate(cpatch%today_leaf_resp) - if(associated(cpatch%today_root_resp)) deallocate(cpatch%today_root_resp) - if(associated(cpatch%today_gpp)) deallocate(cpatch%today_gpp) - if(associated(cpatch%today_nppleaf)) deallocate(cpatch%today_nppleaf) - if(associated(cpatch%today_nppfroot)) deallocate(cpatch%today_nppfroot) - if(associated(cpatch%today_nppsapwood)) deallocate(cpatch%today_nppsapwood) - if(associated(cpatch%today_nppcroot)) deallocate(cpatch%today_nppcroot) - if(associated(cpatch%today_nppseeds)) deallocate(cpatch%today_nppseeds) - if(associated(cpatch%today_nppwood)) deallocate(cpatch%today_nppwood) - if(associated(cpatch%today_nppdaily)) deallocate(cpatch%today_nppdaily) - if(associated(cpatch%today_gpp_pot)) deallocate(cpatch%today_gpp_pot) - if(associated(cpatch%today_gpp_lightmax)) deallocate(cpatch%today_gpp_lightmax) - if(associated(cpatch%today_gpp_moistmax)) deallocate(cpatch%today_gpp_moistmax) - if(associated(cpatch%growth_respiration)) deallocate(cpatch%growth_respiration) - if(associated(cpatch%storage_respiration)) deallocate(cpatch%storage_respiration) - if(associated(cpatch%vleaf_respiration)) deallocate(cpatch%vleaf_respiration) - if(associated(cpatch%dmean_gpp )) deallocate(cpatch%dmean_gpp ) - if(associated(cpatch%dmean_nppleaf )) deallocate(cpatch%dmean_nppleaf ) - if(associated(cpatch%dmean_nppfroot )) deallocate(cpatch%dmean_nppfroot ) - if(associated(cpatch%dmean_nppsapwood )) deallocate(cpatch%dmean_nppsapwood ) - if(associated(cpatch%dmean_nppcroot )) deallocate(cpatch%dmean_nppcroot ) - if(associated(cpatch%dmean_nppseeds )) deallocate(cpatch%dmean_nppseeds ) - if(associated(cpatch%dmean_nppwood )) deallocate(cpatch%dmean_nppwood ) - if(associated(cpatch%dmean_nppdaily )) deallocate(cpatch%dmean_nppdaily ) - if(associated(cpatch%dmean_leaf_resp )) deallocate(cpatch%dmean_leaf_resp ) - if(associated(cpatch%dmean_root_resp )) deallocate(cpatch%dmean_root_resp ) - if(associated(cpatch%mmean_gpp )) deallocate(cpatch%mmean_gpp ) - if(associated(cpatch%mmean_nppleaf )) deallocate(cpatch%mmean_nppleaf ) - if(associated(cpatch%mmean_nppfroot )) deallocate(cpatch%mmean_nppfroot ) - if(associated(cpatch%mmean_nppsapwood )) deallocate(cpatch%mmean_nppsapwood ) - if(associated(cpatch%mmean_nppcroot )) deallocate(cpatch%mmean_nppcroot ) - if(associated(cpatch%mmean_nppseeds )) deallocate(cpatch%mmean_nppseeds ) - if(associated(cpatch%mmean_nppwood )) deallocate(cpatch%mmean_nppwood ) - if(associated(cpatch%mmean_nppdaily )) deallocate(cpatch%mmean_nppdaily ) - if(associated(cpatch%mmean_leaf_resp )) deallocate(cpatch%mmean_leaf_resp ) - if(associated(cpatch%mmean_root_resp )) deallocate(cpatch%mmean_root_resp ) - if(associated(cpatch%mmean_growth_resp )) deallocate(cpatch%mmean_growth_resp ) - if(associated(cpatch%mmean_storage_resp)) deallocate(cpatch%mmean_storage_resp) - if(associated(cpatch%mmean_vleaf_resp )) deallocate(cpatch%mmean_vleaf_resp ) - if(associated(cpatch%fsn)) deallocate(cpatch%fsn) - if(associated(cpatch%monthly_dndt)) deallocate(cpatch%monthly_dndt) - if(associated(cpatch%monthly_dlnndt)) deallocate(cpatch%monthly_dlnndt) - if(associated(cpatch%mort_rate)) deallocate(cpatch%mort_rate) - if(associated(cpatch%mmean_mort_rate)) deallocate(cpatch%mmean_mort_rate) - - if(associated(cpatch%Psi_open)) deallocate(cpatch%Psi_open) - if(associated(cpatch%krdepth)) deallocate(cpatch%krdepth) - if(associated(cpatch%first_census)) deallocate(cpatch%first_census) - if(associated(cpatch%new_recruit_flag)) deallocate(cpatch%new_recruit_flag) - if(associated(cpatch%light_level)) deallocate(cpatch%light_level) - if(associated(cpatch%dmean_light_level)) deallocate(cpatch%dmean_light_level) - if(associated(cpatch%mmean_light_level)) deallocate(cpatch%mmean_light_level) - if(associated(cpatch%light_level_beam)) deallocate(cpatch%light_level_beam) - if(associated(cpatch%dmean_light_level_beam)) deallocate(cpatch%dmean_light_level_beam) - if(associated(cpatch%mmean_light_level_beam)) deallocate(cpatch%mmean_light_level_beam) - if(associated(cpatch%light_level_diff)) deallocate(cpatch%light_level_diff) - if(associated(cpatch%dmean_light_level_diff)) deallocate(cpatch%dmean_light_level_diff) - if(associated(cpatch%mmean_light_level_diff)) deallocate(cpatch%mmean_light_level_diff) - if(associated(cpatch%par_l)) deallocate(cpatch%par_l) - if(associated(cpatch%par_l_beam)) deallocate(cpatch%par_l_beam) - if(associated(cpatch%par_l_diffuse)) deallocate(cpatch%par_l_diffuse) - if(associated(cpatch%mean_par_l)) deallocate(cpatch%mean_par_l) - if(associated(cpatch%mean_par_l_beam)) deallocate(cpatch%mean_par_l_beam) - if(associated(cpatch%mean_par_l_diff)) deallocate(cpatch%mean_par_l_diff) - if(associated(cpatch%dmean_par_l)) deallocate(cpatch%dmean_par_l) - if(associated(cpatch%dmean_par_l_beam)) deallocate(cpatch%dmean_par_l_beam) - if(associated(cpatch%dmean_par_l_diff)) deallocate(cpatch%dmean_par_l_diff) - if(associated(cpatch%mmean_par_l)) deallocate(cpatch%mmean_par_l) - if(associated(cpatch%mmean_par_l_beam)) deallocate(cpatch%mmean_par_l_beam) - if(associated(cpatch%mmean_par_l_diff)) deallocate(cpatch%mmean_par_l_diff) - if(associated(cpatch%rshort_l)) deallocate(cpatch%rshort_l) - if(associated(cpatch%rshort_l_beam)) deallocate(cpatch%rshort_l_beam) - if(associated(cpatch%rshort_l_diffuse)) deallocate(cpatch%rshort_l_diffuse) - if(associated(cpatch%rlong_l)) deallocate(cpatch%rlong_l) - if(associated(cpatch%rlong_l_surf)) deallocate(cpatch%rlong_l_surf) - if(associated(cpatch%rlong_l_incid)) deallocate(cpatch%rlong_l_incid) - if(associated(cpatch%rshort_w)) deallocate(cpatch%rshort_w) - if(associated(cpatch%rshort_w_beam)) deallocate(cpatch%rshort_w_beam) - if(associated(cpatch%rshort_w_diffuse)) deallocate(cpatch%rshort_w_diffuse) - if(associated(cpatch%rlong_w)) deallocate(cpatch%rlong_w) - if(associated(cpatch%rlong_w_surf)) deallocate(cpatch%rlong_w_surf) - if(associated(cpatch%rlong_w_incid)) deallocate(cpatch%rlong_w_incid) - if(associated(cpatch%leaf_gbh)) deallocate(cpatch%leaf_gbh) - if(associated(cpatch%leaf_gbw)) deallocate(cpatch%leaf_gbw) - if(associated(cpatch%wood_gbh)) deallocate(cpatch%wood_gbh) - if(associated(cpatch%wood_gbw)) deallocate(cpatch%wood_gbw) - if(associated(cpatch%A_open)) deallocate(cpatch%A_open) - if(associated(cpatch%A_closed)) deallocate(cpatch%A_closed) - if(associated(cpatch%Psi_closed)) deallocate(cpatch%Psi_closed) - if(associated(cpatch%gsw_open)) deallocate(cpatch%gsw_open) - if(associated(cpatch%gsw_closed)) deallocate(cpatch%gsw_closed) - if(associated(cpatch%fsw)) deallocate(cpatch%fsw) - if(associated(cpatch%fs_open)) deallocate(cpatch%fs_open) - if(associated(cpatch%water_supply)) deallocate(cpatch%water_supply) - if(associated(cpatch%dmean_fs_open)) deallocate(cpatch%dmean_fs_open) - if(associated(cpatch%dmean_fsw)) deallocate(cpatch%dmean_fsw) - if(associated(cpatch%dmean_fsn)) deallocate(cpatch%dmean_fsn) - if(associated(cpatch%dmean_psi_open)) deallocate(cpatch%dmean_psi_open) - if(associated(cpatch%dmean_psi_closed)) deallocate(cpatch%dmean_psi_closed) - if(associated(cpatch%dmean_water_supply)) deallocate(cpatch%dmean_water_supply) - if(associated(cpatch%mmean_fs_open)) deallocate(cpatch%mmean_fs_open) - if(associated(cpatch%mmean_fsw)) deallocate(cpatch%mmean_fsw) - if(associated(cpatch%mmean_fsn)) deallocate(cpatch%mmean_fsn) - if(associated(cpatch%mmean_psi_open)) deallocate(cpatch%mmean_psi_open) - if(associated(cpatch%mmean_psi_closed)) deallocate(cpatch%mmean_psi_closed) - if(associated(cpatch%mmean_water_supply)) deallocate(cpatch%mmean_water_supply) - if(associated(cpatch%stomatal_conductance)) deallocate(cpatch%stomatal_conductance) - if(associated(cpatch%leaf_maintenance)) deallocate(cpatch%leaf_maintenance) - if(associated(cpatch%root_maintenance)) deallocate(cpatch%root_maintenance) - if(associated(cpatch%mmean_leaf_maintenance)) deallocate(cpatch%mmean_leaf_maintenance) - if(associated(cpatch%mmean_root_maintenance)) deallocate(cpatch%mmean_root_maintenance) - if(associated(cpatch%leaf_drop)) deallocate(cpatch%leaf_drop) - if(associated(cpatch%mmean_leaf_drop)) deallocate(cpatch%mmean_leaf_drop) - if(associated(cpatch%bseeds)) deallocate(cpatch%bseeds) - if(associated(cpatch%leaf_respiration)) deallocate(cpatch%leaf_respiration) - if(associated(cpatch%root_respiration)) deallocate(cpatch%root_respiration) - if(associated(cpatch%gpp)) deallocate(cpatch%gpp) - if(associated(cpatch%paw_avg)) deallocate(cpatch%paw_avg) - if(associated(cpatch%elongf)) deallocate(cpatch%elongf) - if(associated(cpatch%turnover_amp)) deallocate(cpatch%turnover_amp) - if(associated(cpatch%llspan)) deallocate(cpatch%llspan) - if(associated(cpatch%vm_bar)) deallocate(cpatch%vm_bar) - if(associated(cpatch%sla)) deallocate(cpatch%sla) - - if(associated(cpatch%qmean_par_l )) deallocate(cpatch%qmean_par_l ) - if(associated(cpatch%qmean_par_l_beam )) deallocate(cpatch%qmean_par_l_beam ) - if(associated(cpatch%qmean_par_l_diff )) deallocate(cpatch%qmean_par_l_diff ) - if(associated(cpatch%qmean_fs_open )) deallocate(cpatch%qmean_fs_open ) - if(associated(cpatch%qmean_fsw )) deallocate(cpatch%qmean_fsw ) - if(associated(cpatch%qmean_fsn )) deallocate(cpatch%qmean_fsn ) - if(associated(cpatch%qmean_psi_open )) deallocate(cpatch%qmean_psi_open ) - if(associated(cpatch%qmean_psi_closed )) deallocate(cpatch%qmean_psi_closed ) - if(associated(cpatch%qmean_water_supply )) deallocate(cpatch%qmean_water_supply ) - if(associated(cpatch%qmean_gpp )) deallocate(cpatch%qmean_gpp ) - if(associated(cpatch%qmean_leaf_resp )) deallocate(cpatch%qmean_leaf_resp ) - if(associated(cpatch%qmean_root_resp )) deallocate(cpatch%qmean_root_resp ) - if(associated(cpatch%mean_rshort_l )) deallocate(cpatch%mean_rshort_l ) - if(associated(cpatch%mean_rlong_l )) deallocate(cpatch%mean_rlong_l ) - if(associated(cpatch%mean_sensible_lc )) deallocate(cpatch%mean_sensible_lc ) - if(associated(cpatch%mean_vapor_lc )) deallocate(cpatch%mean_vapor_lc ) - if(associated(cpatch%mean_transp )) deallocate(cpatch%mean_transp ) - if(associated(cpatch%mean_intercepted_al )) deallocate(cpatch%mean_intercepted_al ) - if(associated(cpatch%mean_wshed_lg )) deallocate(cpatch%mean_wshed_lg ) - if(associated(cpatch%mean_rshort_w )) deallocate(cpatch%mean_rshort_w ) - if(associated(cpatch%mean_rlong_w )) deallocate(cpatch%mean_rlong_w ) - if(associated(cpatch%mean_sensible_wc )) deallocate(cpatch%mean_sensible_wc ) - if(associated(cpatch%mean_vapor_wc )) deallocate(cpatch%mean_vapor_wc ) - if(associated(cpatch%mean_intercepted_aw )) deallocate(cpatch%mean_intercepted_aw ) - if(associated(cpatch%mean_wshed_wg )) deallocate(cpatch%mean_wshed_wg ) - if(associated(cpatch%dmean_rshort_l )) deallocate(cpatch%dmean_rshort_l ) - if(associated(cpatch%dmean_rlong_l )) deallocate(cpatch%dmean_rlong_l ) - if(associated(cpatch%dmean_sensible_lc )) deallocate(cpatch%dmean_sensible_lc ) - if(associated(cpatch%dmean_vapor_lc )) deallocate(cpatch%dmean_vapor_lc ) - if(associated(cpatch%dmean_transp )) deallocate(cpatch%dmean_transp ) - if(associated(cpatch%dmean_intercepted_al)) deallocate(cpatch%dmean_intercepted_al) - if(associated(cpatch%dmean_wshed_lg )) deallocate(cpatch%dmean_wshed_lg ) - if(associated(cpatch%dmean_rshort_w )) deallocate(cpatch%dmean_rshort_w ) - if(associated(cpatch%dmean_rlong_w )) deallocate(cpatch%dmean_rlong_w ) - if(associated(cpatch%dmean_sensible_wc )) deallocate(cpatch%dmean_sensible_wc ) - if(associated(cpatch%dmean_vapor_wc )) deallocate(cpatch%dmean_vapor_wc ) - if(associated(cpatch%dmean_intercepted_aw)) deallocate(cpatch%dmean_intercepted_aw) - if(associated(cpatch%dmean_wshed_wg )) deallocate(cpatch%dmean_wshed_wg ) - if(associated(cpatch%qmean_rshort_l )) deallocate(cpatch%qmean_rshort_l ) - if(associated(cpatch%qmean_rlong_l )) deallocate(cpatch%qmean_rlong_l ) - if(associated(cpatch%qmean_sensible_lc )) deallocate(cpatch%qmean_sensible_lc ) - if(associated(cpatch%qmean_vapor_lc )) deallocate(cpatch%qmean_vapor_lc ) - if(associated(cpatch%qmean_transp )) deallocate(cpatch%qmean_transp ) - if(associated(cpatch%qmean_intercepted_al)) deallocate(cpatch%qmean_intercepted_al) - if(associated(cpatch%qmean_wshed_lg )) deallocate(cpatch%qmean_wshed_lg ) - if(associated(cpatch%qmean_rshort_w )) deallocate(cpatch%qmean_rshort_w ) - if(associated(cpatch%qmean_rlong_w )) deallocate(cpatch%qmean_rlong_w ) - if(associated(cpatch%qmean_sensible_wc )) deallocate(cpatch%qmean_sensible_wc ) - if(associated(cpatch%qmean_vapor_wc )) deallocate(cpatch%qmean_vapor_wc ) - if(associated(cpatch%qmean_intercepted_aw)) deallocate(cpatch%qmean_intercepted_aw) - if(associated(cpatch%qmean_wshed_wg )) deallocate(cpatch%qmean_wshed_wg ) - if(associated(cpatch%mmean_rshort_l )) deallocate(cpatch%mmean_rshort_l ) - if(associated(cpatch%mmean_rlong_l )) deallocate(cpatch%mmean_rlong_l ) - if(associated(cpatch%mmean_sensible_lc )) deallocate(cpatch%mmean_sensible_lc ) - if(associated(cpatch%mmean_vapor_lc )) deallocate(cpatch%mmean_vapor_lc ) - if(associated(cpatch%mmean_transp )) deallocate(cpatch%mmean_transp ) - if(associated(cpatch%mmean_intercepted_al)) deallocate(cpatch%mmean_intercepted_al) - if(associated(cpatch%mmean_wshed_lg )) deallocate(cpatch%mmean_wshed_lg ) - if(associated(cpatch%mmean_rshort_w )) deallocate(cpatch%mmean_rshort_w ) - if(associated(cpatch%mmean_rlong_w )) deallocate(cpatch%mmean_rlong_w ) - if(associated(cpatch%mmean_sensible_wc )) deallocate(cpatch%mmean_sensible_wc ) - if(associated(cpatch%mmean_vapor_wc )) deallocate(cpatch%mmean_vapor_wc ) - if(associated(cpatch%mmean_intercepted_aw)) deallocate(cpatch%mmean_intercepted_aw) - if(associated(cpatch%mmean_wshed_wg )) deallocate(cpatch%mmean_wshed_wg ) - - return - end subroutine deallocate_patchtype -!============================================================================! -!============================================================================! - - - - - - - !=======================================================================================! - !=======================================================================================! - ! This subroutine copies the patches from the input site to the output. The ! - ! number of patches to be copied should be always match between the input and output, ! - ! and every single variable, including the cohorts, will be copied. ! - ! IMPORTANT. This subroutine assumes that the output patches still don't have cohorts ! - ! allocated, so this should be never used in a previously allocated patch. ! - !---------------------------------------------------------------------------------------! - subroutine copy_sitetype(isite,osite,ipaa,ipaz,opaa,opaz) - implicit none - !----- Arguments. -------------------------------------------------------------------! - type(sitetype) , target :: isite ! Input (donor) site - type(sitetype) , target :: osite ! Output (receptor) site - integer , intent(in) :: ipaa ! First input patch index - integer , intent(in) :: ipaz ! Last input patch index - integer , intent(in) :: opaa ! First output patch index - integer , intent(in) :: opaz ! Last output patch index - !----- Local variables. -------------------------------------------------------------! - integer :: ipa ! Counter for the input site patches - integer :: opa ! Counter for the output site patches - integer :: k ! Vertical layer counter - integer :: ipft ! PFT counter - integer :: isto ! Stomate attribute counter - integer :: idbh ! DBH counter - integer :: ihgt ! Height counter - integer :: icyc ! Time of day counter + !------------------------------------------------------------------------------------! + ! Polygon-level profile of the vegetation properties. All variables are split ! + ! by DBH and PFT, and units are based on area, not individuals. ! + !------------------------------------------------------------------------------------! + real,pointer,dimension(:,:,:) :: nplant + real,pointer,dimension(:,:,:) :: agb + real,pointer,dimension(:,:,:) :: lai + real,pointer,dimension(:,:,:) :: wai + real,pointer,dimension(:,:,:) :: basal_area + real,pointer,dimension(:,:,:) :: bdead + real,pointer,dimension(:,:,:) :: balive + real,pointer,dimension(:,:,:) :: bleaf + real,pointer,dimension(:,:,:) :: broot + real,pointer,dimension(:,:,:) :: bsapwooda + real,pointer,dimension(:,:,:) :: bsapwoodb + real,pointer,dimension(:,:,:) :: bseeds + real,pointer,dimension(:,:,:) :: bstorage + real,pointer,dimension(:,:,:) :: bdead_n + real,pointer,dimension(:,:,:) :: balive_n + real,pointer,dimension(:,:,:) :: bleaf_n + real,pointer,dimension(:,:,:) :: broot_n + real,pointer,dimension(:,:,:) :: bsapwooda_n + real,pointer,dimension(:,:,:) :: bsapwoodb_n + real,pointer,dimension(:,:,:) :: bseeds_n + real,pointer,dimension(:,:,:) :: bstorage_n + real,pointer,dimension(:,:,:) :: leaf_maintenance + real,pointer,dimension(:,:,:) :: root_maintenance + real,pointer,dimension(:,:,:) :: leaf_drop !------------------------------------------------------------------------------------! - !------ Check whether this patch copying makes sense. -------------------------------! - if (ipaz - ipaa /= opaz - opaa) then - write (unit=*,fmt='(a)') '------------------------------------------------' - write (unit=*,fmt='(a)') ' - Input site:' - write (unit=*,fmt='(a,1x,i6)') ' * First patch: ',ipaa - write (unit=*,fmt='(a,1x,i6)') ' * Last patch: ',ipaz - write (unit=*,fmt='(a,1x,i6)') ' * Patch count: ',ipaz-ipaa+1 - write (unit=*,fmt='(a)') ' - Output site:' - write (unit=*,fmt='(a,1x,i6)') ' * First patch: ',opaa - write (unit=*,fmt='(a,1x,i6)') ' * Last patch: ',opaz - write (unit=*,fmt='(a,1x,i6)') ' * Patch count: ',opaz-opaa+1 - write (unit=*,fmt='(a)' ) '------------------------------------------------' - call fatal_error ('Patch count of input and output paths don''t match' & - ,'copy_sitetype','ed_state_vars.f90') - end if - !------------------------------------------------------------------------------------! - ipa = ipaa - 1 - opaloop: do opa = opaa, opaz - ipa = ipa + 1 - osite%paco_id(opa) = isite%paco_id(ipa) - osite%paco_n(opa) = isite%paco_n(ipa) - osite%dist_type(opa) = isite%dist_type(ipa) - osite%age(opa) = isite%age(ipa) - osite%area(opa) = isite%area(ipa) - osite%fast_soil_C(opa) = isite%fast_soil_C(ipa) - osite%slow_soil_C(opa) = isite%slow_soil_C(ipa) - osite%structural_soil_C(opa) = isite%structural_soil_C(ipa) - osite%structural_soil_L(opa) = isite%structural_soil_L(ipa) - osite%mineralized_soil_N(opa) = isite%mineralized_soil_N(ipa) - osite%fast_soil_N(opa) = isite%fast_soil_N(ipa) - osite%sum_dgd(opa) = isite%sum_dgd(ipa) - osite%sum_chd(opa) = isite%sum_chd(ipa) - osite%plantation(opa) = isite%plantation(ipa) - osite%cohort_count(opa) = isite%cohort_count(ipa) - osite%can_theiv(opa) = isite%can_theiv(ipa) - osite%can_vpdef(opa) = isite%can_vpdef(ipa) - osite%can_temp(opa) = isite%can_temp(ipa) - osite%can_temp_pv(opa) = isite%can_temp_pv(ipa) - osite%can_shv(opa) = isite%can_shv(ipa) - osite%can_co2(opa) = isite%can_co2(ipa) - osite%can_rhos(opa) = isite%can_rhos(ipa) - osite%can_prss(opa) = isite%can_prss(ipa) - osite%can_theta(opa) = isite%can_theta(ipa) - osite%can_depth(opa) = isite%can_depth(ipa) - osite%opencan_frac(opa) = isite%opencan_frac(ipa) - osite%ggbare(opa) = isite%ggbare(ipa) - osite%ggveg(opa) = isite%ggveg(ipa) - osite%ggnet(opa) = isite%ggnet(ipa) - osite%ggsoil(opa) = isite%ggsoil(ipa) - osite%lai(opa) = isite%lai(ipa) - osite%wai(opa) = isite%wai(ipa) - osite%avg_daily_temp(opa) = isite%avg_daily_temp(ipa) - osite%avg_monthly_gndwater(opa) = isite%avg_monthly_gndwater(ipa) - osite%avg_monthly_waterdef(opa) = isite%avg_monthly_waterdef(ipa) - osite%mean_rh(opa) = isite%mean_rh(ipa) - osite%mean_cwd_rh(opa) = isite%mean_cwd_rh(ipa) - osite%mean_nep(opa) = isite%mean_nep(ipa) - osite%wbudget_loss2atm(opa) = isite%wbudget_loss2atm(ipa) - osite%wbudget_denseffect(opa) = isite%wbudget_denseffect(ipa) - osite%wbudget_precipgain(opa) = isite%wbudget_precipgain(ipa) - osite%wbudget_loss2runoff(opa) = isite%wbudget_loss2runoff(ipa) - osite%wbudget_loss2drainage(opa) = isite%wbudget_loss2drainage(ipa) - osite%wbudget_initialstorage(opa) = isite%wbudget_initialstorage(ipa) - osite%wbudget_residual(opa) = isite%wbudget_residual(ipa) - osite%ebudget_loss2atm(opa) = isite%ebudget_loss2atm(ipa) - osite%ebudget_denseffect(opa) = isite%ebudget_denseffect(ipa) - osite%ebudget_prsseffect(opa) = isite%ebudget_prsseffect(ipa) - osite%ebudget_loss2runoff(opa) = isite%ebudget_loss2runoff(ipa) - osite%ebudget_loss2drainage(opa) = isite%ebudget_loss2drainage(ipa) - osite%ebudget_netrad(opa) = isite%ebudget_netrad(ipa) - osite%ebudget_precipgain(opa) = isite%ebudget_precipgain(ipa) - osite%ebudget_initialstorage(opa) = isite%ebudget_initialstorage(ipa) - osite%ebudget_residual(opa) = isite%ebudget_residual(ipa) - osite%co2budget_initialstorage(opa) = isite%co2budget_initialstorage(ipa) - osite%co2budget_residual(opa) = isite%co2budget_residual(ipa) - osite%co2budget_loss2atm(opa) = isite%co2budget_loss2atm(ipa) - osite%co2budget_denseffect(opa) = isite%co2budget_denseffect(ipa) - osite%co2budget_gpp(opa) = isite%co2budget_gpp(ipa) - osite%co2budget_plresp(opa) = isite%co2budget_plresp(ipa) - osite%co2budget_rh(opa) = isite%co2budget_rh(ipa) - osite%co2budget_cwd_rh(opa) = isite%co2budget_cwd_rh(ipa) - osite%today_A_decomp(opa) = isite%today_A_decomp(ipa) - osite%today_Af_decomp(opa) = isite%today_Af_decomp(ipa) - osite%veg_rough(opa) = isite%veg_rough(ipa) - osite%veg_height(opa) = isite%veg_height(ipa) - osite%veg_displace(opa) = isite%veg_displace(ipa) - osite%fsc_in(opa) = isite%fsc_in(ipa) - osite%ssc_in(opa) = isite%ssc_in(ipa) - osite%ssl_in(opa) = isite%ssl_in(ipa) - osite%fsn_in(opa) = isite%fsn_in(ipa) - osite%total_plant_nitrogen_uptake(opa) = isite%total_plant_nitrogen_uptake(ipa) - osite%mineralized_N_loss(opa) = isite%mineralized_N_loss(ipa) - osite%mineralized_N_input(opa) = isite%mineralized_N_input(ipa) - osite%rshort_g(opa) = isite%rshort_g(ipa) - osite%rshort_g_beam(opa) = isite%rshort_g_beam(ipa) - osite%rshort_g_diffuse(opa) = isite%rshort_g_diffuse(ipa) - osite%par_g(opa) = isite%par_g(ipa) - osite%par_g_beam(opa) = isite%par_g_beam(ipa) - osite%par_g_diffuse(opa) = isite%par_g_diffuse(ipa) - osite%par_b(opa) = isite%par_b(ipa) - osite%par_b_beam(opa) = isite%par_b_beam(ipa) - osite%par_b_diffuse(opa) = isite%par_b_diffuse(ipa) - osite%nir_b(opa) = isite%nir_b(ipa) - osite%nir_b_beam(opa) = isite%nir_b_beam(ipa) - osite%nir_b_diffuse(opa) = isite%nir_b_diffuse(ipa) - osite%rlong_g(opa) = isite%rlong_g(ipa) - osite%rlong_g_surf(opa) = isite%rlong_g_surf(ipa) - osite%rlong_g_incid(opa) = isite%rlong_g_incid(ipa) - osite%rlong_s(opa) = isite%rlong_s(ipa) - osite%rlong_s_surf(opa) = isite%rlong_s_surf(ipa) - osite%rlong_s_incid(opa) = isite%rlong_s_incid(ipa) - osite%albedo(opa) = isite%albedo(ipa) - osite%albedo_beam(opa) = isite%albedo_beam(ipa) - osite%albedo_diffuse(opa) = isite%albedo_diffuse(ipa) - osite%rnet(opa) = isite%rnet(ipa) - osite%rlongup(opa) = isite%rlongup(ipa) - osite%parup(opa) = isite%parup(ipa) - osite%nirup(opa) = isite%nirup(ipa) - osite%rshortup(opa) = isite%rshortup(ipa) - osite%rlong_albedo(opa) = isite%rlong_albedo(ipa) - osite%total_sfcw_depth(opa) = isite%total_sfcw_depth(ipa) - osite%snowfac(opa) = isite%snowfac(ipa) - osite%A_decomp(opa) = isite%A_decomp(ipa) - osite%f_decomp(opa) = isite%f_decomp(ipa) - osite%rh(opa) = isite%rh(ipa) - osite%cwd_rh(opa) = isite%cwd_rh(ipa) - osite%plant_ag_biomass(opa) = isite%plant_ag_biomass(ipa) - osite%runoff(opa) = isite%runoff(ipa) - osite%htry(opa) = isite%htry(ipa) - osite%hprev(opa) = isite%hprev(ipa) - osite%avg_rk4step(opa) = isite%avg_rk4step(ipa) - osite%avg_available_water(opa) = isite%avg_available_water(ipa) - osite%ustar(opa) = isite%ustar(ipa) - osite%tstar(opa) = isite%tstar(ipa) - osite%qstar(opa) = isite%qstar(ipa) - osite%cstar(opa) = isite%cstar(ipa) - - osite%zeta(opa) = isite%zeta(ipa) - osite%ribulk(opa) = isite%ribulk(ipa) - - osite%upwp(opa) = isite%upwp(ipa) - osite%tpwp(opa) = isite%tpwp(ipa) - osite%qpwp(opa) = isite%qpwp(ipa) - osite%cpwp(opa) = isite%cpwp(ipa) - osite%wpwp(opa) = isite%wpwp(ipa) - - osite%nlev_sfcwater(opa) = isite%nlev_sfcwater(ipa) - osite%ground_shv(opa) = isite%ground_shv(ipa) - osite%ground_ssh(opa) = isite%ground_ssh(ipa) - osite%ground_temp(opa) = isite%ground_temp(ipa) - osite%ground_fliq(opa) = isite%ground_fliq(ipa) - osite%rough(opa) = isite%rough(ipa) - - osite%avg_rshort_gnd (opa) = isite%avg_rshort_gnd (ipa) - osite%avg_par_gnd (opa) = isite%avg_par_gnd (ipa) - osite%avg_rlong_gnd (opa) = isite%avg_rlong_gnd (ipa) - osite%avg_ustar (opa) = isite%avg_ustar (ipa) - osite%avg_tstar (opa) = isite%avg_tstar (ipa) - osite%avg_qstar (opa) = isite%avg_qstar (ipa) - osite%avg_cstar (opa) = isite%avg_cstar (ipa) - osite%avg_carbon_ac (opa) = isite%avg_carbon_ac (ipa) - osite%avg_carbon_st (opa) = isite%avg_carbon_st (ipa) - osite%avg_rlongup (opa) = isite%avg_rlongup (ipa) - osite%avg_parup (opa) = isite%avg_parup (ipa) - osite%avg_nirup (opa) = isite%avg_nirup (ipa) - osite%avg_rshortup (opa) = isite%avg_rshortup (ipa) - osite%avg_rnet (opa) = isite%avg_rnet (ipa) - osite%avg_albedo (opa) = isite%avg_albedo (ipa) - osite%avg_albedo_beam (opa) = isite%avg_albedo_beam (ipa) - osite%avg_albedo_diffuse (opa) = isite%avg_albedo_diffuse (ipa) - osite%avg_rlong_albedo (opa) = isite%avg_rlong_albedo (ipa) - - osite%avg_vapor_lc(opa) = isite%avg_vapor_lc(ipa) - osite%avg_vapor_wc(opa) = isite%avg_vapor_wc(ipa) - osite%avg_vapor_gc(opa) = isite%avg_vapor_gc(ipa) - osite%avg_wshed_vg(opa) = isite%avg_wshed_vg(ipa) - osite%avg_intercepted(opa) = isite%avg_intercepted(ipa) - osite%avg_throughfall(opa) = isite%avg_throughfall(ipa) - osite%avg_vapor_ac(opa) = isite%avg_vapor_ac(ipa) - osite%avg_transp(opa) = isite%avg_transp(ipa) - osite%avg_evap(opa) = isite%avg_evap(ipa) - osite%avg_runoff(opa) = isite%avg_runoff(ipa) - osite%avg_drainage(opa) = isite%avg_drainage(ipa) - osite%avg_drainage_heat(opa) = isite%avg_drainage_heat(ipa) - osite%avg_sensible_lc(opa) = isite%avg_sensible_lc(ipa) - osite%avg_sensible_wc(opa) = isite%avg_sensible_wc(ipa) - osite%avg_qwshed_vg(opa) = isite%avg_qwshed_vg(ipa) - osite%avg_qintercepted(opa) = isite%avg_qintercepted(ipa) - osite%avg_qthroughfall(opa) = isite%avg_qthroughfall(ipa) - osite%avg_sensible_gc(opa) = isite%avg_sensible_gc(ipa) - osite%avg_sensible_ac(opa) = isite%avg_sensible_ac(ipa) - osite%avg_runoff_heat(opa) = isite%avg_runoff_heat(ipa) - osite%avg_leaf_energy(opa) = isite%avg_leaf_energy(ipa) - osite%avg_leaf_temp(opa) = isite%avg_leaf_temp(ipa) - osite%avg_leaf_vpdef(opa) = isite%avg_leaf_vpdef(ipa) - osite%avg_leaf_hcap(opa) = isite%avg_leaf_hcap(ipa) - osite%avg_leaf_fliq(opa) = isite%avg_leaf_fliq(ipa) - osite%avg_leaf_water(opa) = isite%avg_leaf_water(ipa) - osite%avg_wood_energy(opa) = isite%avg_wood_energy(ipa) - osite%avg_wood_temp(opa) = isite%avg_wood_temp(ipa) - osite%avg_wood_hcap(opa) = isite%avg_wood_hcap(ipa) - osite%avg_wood_fliq(opa) = isite%avg_wood_fliq(ipa) - osite%avg_wood_water(opa) = isite%avg_wood_water(ipa) - osite%par_l_max(opa) = isite%par_l_max(ipa) - osite%par_l_beam_max(opa) = isite%par_l_beam_max(ipa) - osite%par_l_diffuse_max(opa) = isite%par_l_diffuse_max(ipa) - - !----- Copy the temporary surface water variables. -------------------------------! - do k=1,nzs - osite%sfcwater_mass(k,opa) = isite%sfcwater_mass(k,ipa) - osite%sfcwater_energy(k,opa) = isite%sfcwater_energy(k,ipa) - osite%sfcwater_depth(k,opa) = isite%sfcwater_depth(k,ipa) - osite%rshort_s(k,opa) = isite%rshort_s(k,ipa) - osite%rshort_s_beam(k,opa) = isite%rshort_s_beam(k,ipa) - osite%rshort_s_diffuse(k,opa) = isite%rshort_s_diffuse(k,ipa) - osite%par_s(k,opa) = isite%par_s(k,ipa) - osite%par_s_beam(k,opa) = isite%par_s_beam(k,ipa) - osite%par_s_diffuse(k,opa) = isite%par_s_diffuse(k,ipa) - osite%sfcwater_tempk(k,opa) = isite%sfcwater_tempk(k,ipa) - osite%sfcwater_fracliq(k,opa) = isite%sfcwater_fracliq(k,ipa) - end do + !----- Polygon-average of soil pools. -----------------------------------------------! + real,pointer,dimension(:) :: fast_soil_c + real,pointer,dimension(:) :: slow_soil_c + real,pointer,dimension(:) :: struct_soil_c + real,pointer,dimension(:) :: struct_soil_l + real,pointer,dimension(:) :: cwd_c + real,pointer,dimension(:) :: fast_soil_n + real,pointer,dimension(:) :: mineral_soil_n + real,pointer,dimension(:) :: cwd_n + !------------------------------------------------------------------------------------! - !----- Copy the soil variables. --------------------------------------------------! - do k=1,nzg - osite%soil_energy(k,opa) = isite%soil_energy(k,ipa) - osite%soil_water(k,opa) = isite%soil_water(k,ipa) - osite%soil_tempk(k,opa) = isite%soil_tempk(k,ipa) - osite%soil_fracliq(k,opa) = isite%soil_fracliq(k,ipa) - osite%rootdense(k,opa) = isite%rootdense(k,ipa) - osite%avg_smoist_gg(k,opa) = isite%avg_smoist_gg(k,ipa) - osite%avg_transloss(k,opa) = isite%avg_transloss(k,ipa) - osite%avg_sensible_gg(k,opa) = isite%avg_sensible_gg(k,ipa) - end do - !----- PFT types. ----------------------------------------------------------------! - do ipft=1,n_pft - osite%repro(ipft,opa) = isite%repro(ipft,ipa) - osite%A_o_max(ipft,opa) = isite%A_o_max(ipft,ipa) - osite%A_c_max(ipft,opa) = isite%A_c_max(ipft,ipa) - do ihgt=1,ff_nhgt - osite%cumlai_profile(ipft,ihgt,opa) = isite%cumlai_profile(ipft,ihgt,ipa) - end do - end do - !----- DBH types. ----------------------------------------------------------------! - do idbh=1,n_dbh - osite%co2budget_gpp_dbh(idbh,opa) = isite%co2budget_gpp_dbh(idbh,ipa) - end do + !-------- TOTAL CARBON AND NITROGEN POOLS --------------- + ! Added by MCD for NCEAS/FACE intercomparison (Apr 7 2009) + !real,pointer,dimension(:) :: Cleaf + !real,pointer,dimension(:) :: Croot + !real,pointer,dimension(:) :: Cstore + !real,pointer,dimension(:) :: Ccwd + !real,pointer,dimension(:) :: Nleaf + !real,pointer,dimension(:) :: Ndead + !real,pointer,dimension(:) :: Nroot + !real,pointer,dimension(:) :: Nstore + !real,pointer,dimension(:) :: Ncwd + ! MLO (8-Nov-2012) -- these were merged with the PFT/DBH structures above, + ! CWD pools are reported, but I am not sure about them, they are simply + ! a constant fraction of the structural and slow pools. + + + !-------- TOTAL CARBON AND NITROGEN FLUX --------------- + ! Added by MCD for NCEAS/FACE intercomparison (Apr 7 2009) + real,pointer,dimension(:) :: Cleaf_grow + real,pointer,dimension(:) :: Croot_grow + real,pointer,dimension(:) :: Cdead_grow + real,pointer,dimension(:) :: Cstore_grow + real,pointer,dimension(:) :: Cleaf_litter_flux + real,pointer,dimension(:) :: Croot_litter_flux + real,pointer,dimension(:) :: Ccwd_flux + real,pointer,dimension(:) :: Nleaf_grow + real,pointer,dimension(:) :: Ndead_grow + real,pointer,dimension(:) :: Nroot_grow + real,pointer,dimension(:) :: Nstore_grow + real,pointer,dimension(:) :: Nleaf_litter_flux + real,pointer,dimension(:) :: Nroot_litter_flux + real,pointer,dimension(:) :: Ncwd_flux + real,pointer,dimension(:) :: Nbiomass_uptake + real,pointer,dimension(:) :: Ngross_min + real,pointer,dimension(:) :: Nnet_min + + + ! This diagnostic partitions energy flux variables into LAI regimes. + ! The matrix is arranged as follows (LAI,VARIABLE,POLYGON) + ! Where LAI is (<2.0,2-4,>4) + ! Where Variable is (RNET,LHF,SHF,CANTEMP) + real,pointer,dimension(:,:,:) :: avg_lai_ebalvars + + + !====================================================================================! + !====================================================================================! + ! Polygon-level diagnostic variables: these are either fluxes or state ! + ! variables, averaged over different time scales, for each polygon. They are in the ! + ! output for convenience only. Most came from the nested dimensions (sites, patches ! + ! and cohorts). ! + ! ! + ! FMEAN -- average over one frqsum time interval (usually sub-daily) ! + ! DMEAN -- daily mean ! + ! MMEAN -- monthly mean ! + ! MMSQU -- monthly mean sum of squares ! + ! QMEAN -- mean diel ! + ! QMSQU -- mean sum of squares for the diel ! + ! ! + ! Acronyms used in the description below: ! + ! ATM -- air above canopy ! + ! CAS -- canopy air space ! + ! TSPL -- temporary snow/pounding layer ! + ! PAR -- photosynthetically active radiation ! + ! NIR -- near infra-red ! + ! SW -- short wave ! + ! LW -- long wave ! + ! VPD -- Vapour pressure deficit ! + ! Theta_Eiv -- ice vapour equivalent potential temperature ! + + + !----- Fast averages. ---------------------------------------------------------------! + real,pointer,dimension(:) :: fmean_gpp ! Gross primary prod. [kgC/m2/yr] + real,pointer,dimension(:) :: fmean_npp ! Net primary prod. [kgC/m2/yr] + real,pointer,dimension(:) :: fmean_leaf_resp ! Leaf respiration [kgC/m2/yr] + real,pointer,dimension(:) :: fmean_root_resp ! Root respiration [kgC/m2/yr] + real,pointer,dimension(:) :: fmean_growth_resp ! Growth resp. [kgC/m2/yr] + real,pointer,dimension(:) :: fmean_storage_resp ! Storage resp. [kgC/m2/yr] + real,pointer,dimension(:) :: fmean_vleaf_resp ! Virt. leaf resp. [kgC/m2/yr] + real,pointer,dimension(:) :: fmean_plresp ! Plant respiration. [kgC/m2/yr] + real,pointer,dimension(:) :: fmean_leaf_energy ! Leaf int. energy [ J/m2] + real,pointer,dimension(:) :: fmean_leaf_water ! Leaf sfc. water [ kg/m2] + real,pointer,dimension(:) :: fmean_leaf_hcap ! Leaf heat capacity [ J/m2/K] + real,pointer,dimension(:) :: fmean_leaf_vpdef ! Leaf VPD [ Pa] + real,pointer,dimension(:) :: fmean_leaf_temp ! Leaf temperature [ K] + real,pointer,dimension(:) :: fmean_leaf_fliq ! Liquid fraction [ --] + real,pointer,dimension(:) :: fmean_leaf_gsw ! Stomatal conduct. [ m/s] + real,pointer,dimension(:) :: fmean_leaf_gbw ! Leaf BL conduct. [ m/s] + real,pointer,dimension(:) :: fmean_wood_energy ! Wood int. energy [ J/m2] + real,pointer,dimension(:) :: fmean_wood_water ! Wood sfc. water [ kg/m2] + real,pointer,dimension(:) :: fmean_wood_hcap ! Wood heat capacity [ J/m2/K] + real,pointer,dimension(:) :: fmean_wood_temp ! Wood temperature [ K] + real,pointer,dimension(:) :: fmean_wood_fliq ! Liquid fraction [ --] + real,pointer,dimension(:) :: fmean_wood_gbw ! Wood BL conduct. [ m/s] + real,pointer,dimension(:) :: fmean_fs_open ! Net stress factor [ --] + real,pointer,dimension(:) :: fmean_fsw ! Moisture stress [ --] + real,pointer,dimension(:) :: fmean_fsn ! Nitrogen stress [ --] + real,pointer,dimension(:) :: fmean_psi_open ! Transp. no stress [ kg/m2/s] + real,pointer,dimension(:) :: fmean_psi_closed ! Transp. max stress [ kg/m2/s] + real,pointer,dimension(:) :: fmean_water_supply ! Water supply [ --] + real,pointer,dimension(:) :: fmean_par_l ! Absorbed PAR (Leaf) [ W/m2] + real,pointer,dimension(:) :: fmean_par_l_beam ! Abs. Dir. PAR [ W/m2] + real,pointer,dimension(:) :: fmean_par_l_diff ! Abs. Diffuse PAR [ W/m2] + real,pointer,dimension(:) :: fmean_rshort_l ! Abs. SW (leaf) [ W/m2] + real,pointer,dimension(:) :: fmean_rlong_l ! Abs. LW (leaf) [ W/m2] + real,pointer,dimension(:) :: fmean_sensible_lc ! Sensible heat [ W/m2] + real,pointer,dimension(:) :: fmean_vapor_lc ! Leaf evaporation [ kg/m2/s] + real,pointer,dimension(:) :: fmean_transp ! Leaf transpiration [ kg/m2/s] + real,pointer,dimension(:) :: fmean_intercepted_al ! Leaf interception [ kg/m2/s] + real,pointer,dimension(:) :: fmean_wshed_lg ! Leaf shedding [ kg/m2/s] + real,pointer,dimension(:) :: fmean_rshort_w ! Abs. SW (Wood) [ W/m2] + real,pointer,dimension(:) :: fmean_rlong_w ! Abs. LW (Wood) [ W/m2] + real,pointer,dimension(:) :: fmean_sensible_wc ! Sensible heat [ W/m2] + real,pointer,dimension(:) :: fmean_vapor_wc ! Wood evaporation [ kg/m2/s] + real,pointer,dimension(:) :: fmean_intercepted_aw ! Wood interception [ kg/m2/s] + real,pointer,dimension(:) :: fmean_wshed_wg ! Wood shedding [ kg/m2/s] + !----- Photosynthesis/Decomposition. ------------------------------------------------! + real,pointer,dimension(:) :: fmean_rh ! Heterotr. resp. [kgC/m2/yr] + real,pointer,dimension(:) :: fmean_cwd_rh ! CWD respiration [kgC/m2/yr] + real,pointer,dimension(:) :: fmean_nep ! Net Ecosyst. Prod. [kgC/m2/yr] + !----- State variables. -------------------------------------------------------------! + real,pointer,dimension(:) :: fmean_rk4step ! RK4 time step [ s] + real,pointer,dimension(:) :: fmean_available_water ! Available water [ kg/m2] + real,pointer,dimension(:) :: fmean_can_theiv ! CAS Theta_Eiv [ K] + real,pointer,dimension(:) :: fmean_can_theta ! CAS Potential temp.[ K] + real,pointer,dimension(:) :: fmean_can_vpdef ! CAS Vap. Pres. Def.[ Pa] + real,pointer,dimension(:) :: fmean_can_temp ! CAS Temperature [ K] + real,pointer,dimension(:) :: fmean_can_shv ! CAS Specific hum. [ kg/kg] + real,pointer,dimension(:) :: fmean_can_co2 ! CAS CO2 mix. ratio [ umol/mol] + real,pointer,dimension(:) :: fmean_can_rhos ! CAS air density [ kg/m3] + real,pointer,dimension(:) :: fmean_can_prss ! CAS pressure [ Pa] + real,pointer,dimension(:) :: fmean_gnd_temp ! Ground temperature [ K] + real,pointer,dimension(:) :: fmean_gnd_shv ! Ground spec. hum. [ kg/kg] + real,pointer,dimension(:) :: fmean_can_ggnd ! Net canopy conduct.[ m/2] + real,pointer,dimension(:) :: fmean_sfcw_depth ! TPSL depth [ m] + real,pointer,dimension(:) :: fmean_sfcw_energy ! TPSL int. energy [ J/kg] + real,pointer,dimension(:) :: fmean_sfcw_mass ! TPSL water mass [ kg/m2] + real,pointer,dimension(:) :: fmean_sfcw_temp ! TPSL temperature [ K] + real,pointer,dimension(:) :: fmean_sfcw_fliq ! TPSL liquid frac. [ --] + real,pointer,dimension(:,:) :: fmean_soil_energy ! Soil int. energy [ J/m3] + real,pointer,dimension(:,:) :: fmean_soil_mstpot ! Soil matric potl. [ m] + real,pointer,dimension(:,:) :: fmean_soil_water ! Soil water content [ m3/m3] + real,pointer,dimension(:,:) :: fmean_soil_temp ! Soil temperature [ K] + real,pointer,dimension(:,:) :: fmean_soil_fliq ! Soil liquid frac. [ --] + !----- Radiation --------------------------------------------------------------------! + real,pointer,dimension(:) :: fmean_rshort_gnd ! Gnd. absp. SW Rad. [ W/m2] + real,pointer,dimension(:) :: fmean_par_gnd ! Absorbed PAR [ W/m2] + real,pointer,dimension(:) :: fmean_rlong_gnd ! Gnd. absp. LW Rad. [ W/m2] + real,pointer,dimension(:) :: fmean_rlongup ! Outgoing LW Rad. [ W/m2] + real,pointer,dimension(:) :: fmean_parup ! Outgoing PAR [ W/m2] + real,pointer,dimension(:) :: fmean_nirup ! Outgoing NIR [ W/m2] + real,pointer,dimension(:) :: fmean_rshortup ! Outgoing SW Rad. [ W/m2] + real,pointer,dimension(:) :: fmean_rnet ! Net radiation [ W/m2] + real,pointer,dimension(:) :: fmean_albedo ! Albedo [ ----] + real,pointer,dimension(:) :: fmean_albedo_beam ! Direct Albedo [ ----] + real,pointer,dimension(:) :: fmean_albedo_diff ! Diffuse Albedo [ ----] + real,pointer,dimension(:) :: fmean_rlong_albedo ! Longwave Albedo [ ----] + !----- Characteristic variables. ----------------------------------------------------! + real,pointer,dimension(:) :: fmean_ustar ! Friction velocity [ m/s] + real,pointer,dimension(:) :: fmean_tstar ! Pot. temp. scale [ K] + real,pointer,dimension(:) :: fmean_qstar ! Water vapour scale [ kg/kg] + real,pointer,dimension(:) :: fmean_cstar ! CO2 scale [ umol/mol] + real,pointer,dimension(:) :: fmean_carbon_ac ! CO2 flux, ATM->CAS [umol/m2/s] + real,pointer,dimension(:) :: fmean_carbon_st ! CO2 storage [umol/m2/s] + real,pointer,dimension(:) :: fmean_vapor_gc ! Water flux, Gnd->CAS [ kg/m2/s] + real,pointer,dimension(:) :: fmean_vapor_ac ! Water flux, Atm->CAS [ kg/m2/s] + real,pointer,dimension(:,:) :: fmean_smoist_gg ! Soil water flux [ kg/m2/s] + real,pointer,dimension(:) :: fmean_throughfall ! Throughfall rate [ kg/m2/s] + real,pointer,dimension(:,:) :: fmean_transloss ! Water loss (transp.) [ kg/m2/s] + real,pointer,dimension(:) :: fmean_runoff ! Water runoff [ kg/m2/s] + real,pointer,dimension(:) :: fmean_drainage ! Water drainage [ kg/m2/s] + !----- Sensible heat ----------------------------------------------------------------! + real,pointer,dimension(:) :: fmean_sensible_gc ! Sens. heat, GND->CAS [ W/m2] + real,pointer,dimension(:) :: fmean_sensible_ac ! Sens. heat, ATM->CAS [ W/m2] + real,pointer,dimension(:,:) :: fmean_sensible_gg ! Soil heat flux [ W/m2] + real,pointer,dimension(:) :: fmean_qthroughfall ! Throughfall rate [ W/m2] + real,pointer,dimension(:) :: fmean_qrunoff ! Surface runoff [ W/m2] + real,pointer,dimension(:) :: fmean_qdrainage ! Drainage energy loss [ W/m2] + !------ Met driver. -----------------------------------------------------------------! + real,pointer,dimension(:) :: fmean_atm_theiv ! IV Equiv. Pot. Temp [ K] + real,pointer,dimension(:) :: fmean_atm_theta ! Potential temperature [ K] + real,pointer,dimension(:) :: fmean_atm_temp ! Temperature [ K] + real,pointer,dimension(:) :: fmean_atm_vpdef ! Vapour pres. deficit [ Pa] + real,pointer,dimension(:) :: fmean_atm_shv ! Specific humidity [ kg/kg] + real,pointer,dimension(:) :: fmean_atm_rshort ! Shortwave radiation [ W/m2] + real,pointer,dimension(:) :: fmean_atm_rshort_diff ! Diffuse SW radiation [ W/m2] + real,pointer,dimension(:) :: fmean_atm_par ! Photosyn. Active Rad. [ W/m2] + real,pointer,dimension(:) :: fmean_atm_par_diff ! Diffuse PAR [ W/m2] + real,pointer,dimension(:) :: fmean_atm_rlong ! Longwave radiation [ W/m2] + real,pointer,dimension(:) :: fmean_atm_vels ! Wind speed [ m/s] + real,pointer,dimension(:) :: fmean_atm_rhos ! Air density [ kg/m3] + real,pointer,dimension(:) :: fmean_atm_prss ! Air pressure [ Pa] + real,pointer,dimension(:) :: fmean_atm_co2 ! Air CO2 [umol/mol] + real,pointer,dimension(:) :: fmean_pcpg ! Precipitation rate [ kg/m2/s] + real,pointer,dimension(:) :: fmean_qpcpg ! Energy gain - rain [ W/m2] + real,pointer,dimension(:) :: fmean_dpcpg ! Precipitation depth [ m] + !----- Moore Foundation variables. --------------------------------------------------! + real,pointer,dimension(:) :: fmean_soil_wetness ! Soil wetness index [ --] + real,pointer,dimension(:) :: fmean_skin_temp ! Skin temperature [ K] + !----- Variables without sub-daily averages. ----------------------------------------! + real,pointer,dimension(:) :: dmean_nppleaf ! Leaf NPP [kgC/m2/yr] + real,pointer,dimension(:) :: dmean_nppfroot ! Fine root NPP [kgC/m2/yr] + real,pointer,dimension(:) :: dmean_nppsapwood ! Sapwood NPP [kgC/m2/yr] + real,pointer,dimension(:) :: dmean_nppcroot ! Coarse root NPP [kgC/m2/yr] + real,pointer,dimension(:) :: dmean_nppseeds ! Seed NPP [kgC/m2/yr] + real,pointer,dimension(:) :: dmean_nppwood ! Wood NPP [kgC/m2/yr] + real,pointer,dimension(:) :: dmean_nppdaily ! Daily NPP [kgC/m2/yr] + real,pointer,dimension(:) :: dmean_A_decomp ! Decomposition fact. [ --] + real,pointer,dimension(:) :: dmean_Af_decomp ! A with N immobil. [ --] + real,pointer,dimension(:) :: dmean_co2_residual ! CO2 residual [ umol/m2] + real,pointer,dimension(:) :: dmean_energy_residual ! Enthalpy residual [ J/m2] + real,pointer,dimension(:) :: dmean_water_residual ! Water residual [ kg/m2] + !----- Variables that are updated once a day. ---------------------------------------! + real,pointer,dimension(:,:,:) :: mmean_lai ! Leaf area index [ m2/m2] + real,pointer,dimension(:,:,:) :: mmean_bleaf ! Leaf biomass [ kgC/m2] + real,pointer,dimension(:,:,:) :: mmean_broot ! Root biomass [ kgC/m2] + real,pointer,dimension(:,:,:) :: mmean_bstorage ! Storage [ kgC/m2] + real,pointer,dimension(:,:,:) :: mmean_bleaf_n ! Leaf N mass [ kgN/m2] + real,pointer,dimension(:,:,:) :: mmean_broot_n ! Root N mass [ kgN/m2] + real,pointer,dimension(:,:,:) :: mmean_bstorage_n ! Storage N [ kgN/m2] + real,pointer,dimension(:,:,:) :: mmean_leaf_maintenance ! Leaf maintenance[kgC/m2/yr] + real,pointer,dimension(:,:,:) :: mmean_root_maintenance ! Root maintenance[kgC/m2/yr] + real,pointer,dimension(:,:,:) :: mmean_leaf_drop ! Leaf shedding [kgC/m2/yr] + real,pointer,dimension(:) :: mmean_fast_soil_c ! Fast soil C [ kgC/m2] + real,pointer,dimension(:) :: mmean_slow_soil_c ! Slow soil C [ kgC/m2] + real,pointer,dimension(:) :: mmean_struct_soil_c ! Struct. soil C [ kgC/m2] + real,pointer,dimension(:) :: mmean_struct_soil_l ! Struct. soil L [ kgL/m2] + real,pointer,dimension(:) :: mmean_cwd_c ! CWD carbon [ kgC/m2] + real,pointer,dimension(:) :: mmean_fast_soil_n ! Fast soil N [ kgN/m2] + real,pointer,dimension(:) :: mmean_mineral_soil_n ! Mineral. soil N [ kgN/m2] + real,pointer,dimension(:) :: mmean_cwd_n ! CWD nitrogen [ kgN/m2] + !----- Daily mean (same units as fast mean). ----------------------------------------! + real,pointer,dimension(:) :: dmean_gpp + real,pointer,dimension(:) :: dmean_npp + real,pointer,dimension(:) :: dmean_leaf_resp + real,pointer,dimension(:) :: dmean_root_resp + real,pointer,dimension(:) :: dmean_growth_resp + real,pointer,dimension(:) :: dmean_storage_resp + real,pointer,dimension(:) :: dmean_vleaf_resp + real,pointer,dimension(:) :: dmean_plresp + real,pointer,dimension(:) :: dmean_leaf_energy + real,pointer,dimension(:) :: dmean_leaf_water + real,pointer,dimension(:) :: dmean_leaf_hcap + real,pointer,dimension(:) :: dmean_leaf_vpdef + real,pointer,dimension(:) :: dmean_leaf_temp + real,pointer,dimension(:) :: dmean_leaf_fliq + real,pointer,dimension(:) :: dmean_leaf_gsw + real,pointer,dimension(:) :: dmean_leaf_gbw + real,pointer,dimension(:) :: dmean_wood_energy + real,pointer,dimension(:) :: dmean_wood_water + real,pointer,dimension(:) :: dmean_wood_hcap + real,pointer,dimension(:) :: dmean_wood_temp + real,pointer,dimension(:) :: dmean_wood_fliq + real,pointer,dimension(:) :: dmean_wood_gbw + real,pointer,dimension(:) :: dmean_fs_open + real,pointer,dimension(:) :: dmean_fsw + real,pointer,dimension(:) :: dmean_fsn + real,pointer,dimension(:) :: dmean_psi_open + real,pointer,dimension(:) :: dmean_psi_closed + real,pointer,dimension(:) :: dmean_water_supply + real,pointer,dimension(:) :: dmean_par_l + real,pointer,dimension(:) :: dmean_par_l_beam + real,pointer,dimension(:) :: dmean_par_l_diff + real,pointer,dimension(:) :: dmean_rshort_l + real,pointer,dimension(:) :: dmean_rlong_l + real,pointer,dimension(:) :: dmean_sensible_lc + real,pointer,dimension(:) :: dmean_vapor_lc + real,pointer,dimension(:) :: dmean_transp + real,pointer,dimension(:) :: dmean_intercepted_al + real,pointer,dimension(:) :: dmean_wshed_lg + real,pointer,dimension(:) :: dmean_rshort_w + real,pointer,dimension(:) :: dmean_rlong_w + real,pointer,dimension(:) :: dmean_sensible_wc + real,pointer,dimension(:) :: dmean_vapor_wc + real,pointer,dimension(:) :: dmean_intercepted_aw + real,pointer,dimension(:) :: dmean_wshed_wg + real,pointer,dimension(:) :: dmean_rh + real,pointer,dimension(:) :: dmean_cwd_rh + real,pointer,dimension(:) :: dmean_nep + real,pointer,dimension(:) :: dmean_rk4step + real,pointer,dimension(:) :: dmean_available_water + real,pointer,dimension(:) :: dmean_can_theiv + real,pointer,dimension(:) :: dmean_can_theta + real,pointer,dimension(:) :: dmean_can_vpdef + real,pointer,dimension(:) :: dmean_can_temp + real,pointer,dimension(:) :: dmean_can_shv + real,pointer,dimension(:) :: dmean_can_co2 + real,pointer,dimension(:) :: dmean_can_rhos + real,pointer,dimension(:) :: dmean_can_prss + real,pointer,dimension(:) :: dmean_gnd_temp + real,pointer,dimension(:) :: dmean_gnd_shv + real,pointer,dimension(:) :: dmean_can_ggnd + real,pointer,dimension(:) :: dmean_sfcw_depth + real,pointer,dimension(:) :: dmean_sfcw_energy + real,pointer,dimension(:) :: dmean_sfcw_mass + real,pointer,dimension(:) :: dmean_sfcw_temp + real,pointer,dimension(:) :: dmean_sfcw_fliq + real,pointer,dimension(:,:) :: dmean_soil_energy + real,pointer,dimension(:,:) :: dmean_soil_mstpot + real,pointer,dimension(:,:) :: dmean_soil_water + real,pointer,dimension(:,:) :: dmean_soil_temp + real,pointer,dimension(:,:) :: dmean_soil_fliq + real,pointer,dimension(:) :: dmean_rshort_gnd + real,pointer,dimension(:) :: dmean_par_gnd + real,pointer,dimension(:) :: dmean_rlong_gnd + real,pointer,dimension(:) :: dmean_rlongup + real,pointer,dimension(:) :: dmean_parup + real,pointer,dimension(:) :: dmean_nirup + real,pointer,dimension(:) :: dmean_rshortup + real,pointer,dimension(:) :: dmean_rnet + real,pointer,dimension(:) :: dmean_albedo + real,pointer,dimension(:) :: dmean_albedo_beam + real,pointer,dimension(:) :: dmean_albedo_diff + real,pointer,dimension(:) :: dmean_rlong_albedo + real,pointer,dimension(:) :: dmean_ustar + real,pointer,dimension(:) :: dmean_tstar + real,pointer,dimension(:) :: dmean_qstar + real,pointer,dimension(:) :: dmean_cstar + real,pointer,dimension(:) :: dmean_carbon_ac + real,pointer,dimension(:) :: dmean_carbon_st + real,pointer,dimension(:) :: dmean_vapor_gc + real,pointer,dimension(:) :: dmean_vapor_ac + real,pointer,dimension(:,:) :: dmean_smoist_gg + real,pointer,dimension(:) :: dmean_throughfall + real,pointer,dimension(:,:) :: dmean_transloss + real,pointer,dimension(:) :: dmean_runoff + real,pointer,dimension(:) :: dmean_drainage + real,pointer,dimension(:) :: dmean_sensible_gc + real,pointer,dimension(:) :: dmean_sensible_ac + real,pointer,dimension(:,:) :: dmean_sensible_gg + real,pointer,dimension(:) :: dmean_qthroughfall + real,pointer,dimension(:) :: dmean_qrunoff + real,pointer,dimension(:) :: dmean_qdrainage + real,pointer,dimension(:) :: dmean_atm_theiv + real,pointer,dimension(:) :: dmean_atm_theta + real,pointer,dimension(:) :: dmean_atm_temp + real,pointer,dimension(:) :: dmean_atm_vpdef + real,pointer,dimension(:) :: dmean_atm_shv + real,pointer,dimension(:) :: dmean_atm_rshort + real,pointer,dimension(:) :: dmean_atm_rshort_diff + real,pointer,dimension(:) :: dmean_atm_par + real,pointer,dimension(:) :: dmean_atm_par_diff + real,pointer,dimension(:) :: dmean_atm_rlong + real,pointer,dimension(:) :: dmean_atm_vels + real,pointer,dimension(:) :: dmean_atm_rhos + real,pointer,dimension(:) :: dmean_atm_prss + real,pointer,dimension(:) :: dmean_atm_co2 + real,pointer,dimension(:) :: dmean_pcpg + real,pointer,dimension(:) :: dmean_qpcpg + real,pointer,dimension(:) :: dmean_dpcpg + !----- Monthly mean (same units as fast mean). --------------------------------------! + real,pointer,dimension(:) :: mmean_gpp + real,pointer,dimension(:) :: mmean_npp + real,pointer,dimension(:) :: mmean_leaf_resp + real,pointer,dimension(:) :: mmean_root_resp + real,pointer,dimension(:) :: mmean_growth_resp + real,pointer,dimension(:) :: mmean_storage_resp + real,pointer,dimension(:) :: mmean_vleaf_resp + real,pointer,dimension(:) :: mmean_plresp + real,pointer,dimension(:) :: mmean_leaf_energy + real,pointer,dimension(:) :: mmean_leaf_water + real,pointer,dimension(:) :: mmean_leaf_hcap + real,pointer,dimension(:) :: mmean_leaf_vpdef + real,pointer,dimension(:) :: mmean_leaf_temp + real,pointer,dimension(:) :: mmean_leaf_fliq + real,pointer,dimension(:) :: mmean_leaf_gsw + real,pointer,dimension(:) :: mmean_leaf_gbw + real,pointer,dimension(:) :: mmean_wood_energy + real,pointer,dimension(:) :: mmean_wood_water + real,pointer,dimension(:) :: mmean_wood_hcap + real,pointer,dimension(:) :: mmean_wood_temp + real,pointer,dimension(:) :: mmean_wood_fliq + real,pointer,dimension(:) :: mmean_wood_gbw + real,pointer,dimension(:) :: mmean_fs_open + real,pointer,dimension(:) :: mmean_fsw + real,pointer,dimension(:) :: mmean_fsn + real,pointer,dimension(:) :: mmean_psi_open + real,pointer,dimension(:) :: mmean_psi_closed + real,pointer,dimension(:) :: mmean_water_supply + real,pointer,dimension(:) :: mmean_par_l + real,pointer,dimension(:) :: mmean_par_l_beam + real,pointer,dimension(:) :: mmean_par_l_diff + real,pointer,dimension(:) :: mmean_rshort_l + real,pointer,dimension(:) :: mmean_rlong_l + real,pointer,dimension(:) :: mmean_sensible_lc + real,pointer,dimension(:) :: mmean_vapor_lc + real,pointer,dimension(:) :: mmean_transp + real,pointer,dimension(:) :: mmean_intercepted_al + real,pointer,dimension(:) :: mmean_wshed_lg + real,pointer,dimension(:) :: mmean_rshort_w + real,pointer,dimension(:) :: mmean_rlong_w + real,pointer,dimension(:) :: mmean_sensible_wc + real,pointer,dimension(:) :: mmean_vapor_wc + real,pointer,dimension(:) :: mmean_intercepted_aw + real,pointer,dimension(:) :: mmean_wshed_wg + real,pointer,dimension(:) :: mmean_rh + real,pointer,dimension(:) :: mmean_cwd_rh + real,pointer,dimension(:) :: mmean_nep + real,pointer,dimension(:) :: mmean_rk4step + real,pointer,dimension(:) :: mmean_available_water + real,pointer,dimension(:) :: mmean_can_theiv + real,pointer,dimension(:) :: mmean_can_theta + real,pointer,dimension(:) :: mmean_can_vpdef + real,pointer,dimension(:) :: mmean_can_temp + real,pointer,dimension(:) :: mmean_can_shv + real,pointer,dimension(:) :: mmean_can_co2 + real,pointer,dimension(:) :: mmean_can_rhos + real,pointer,dimension(:) :: mmean_can_prss + real,pointer,dimension(:) :: mmean_gnd_temp + real,pointer,dimension(:) :: mmean_gnd_shv + real,pointer,dimension(:) :: mmean_can_ggnd + real,pointer,dimension(:) :: mmean_sfcw_depth + real,pointer,dimension(:) :: mmean_sfcw_energy + real,pointer,dimension(:) :: mmean_sfcw_mass + real,pointer,dimension(:) :: mmean_sfcw_temp + real,pointer,dimension(:) :: mmean_sfcw_fliq + real,pointer,dimension(:,:) :: mmean_soil_energy + real,pointer,dimension(:,:) :: mmean_soil_mstpot + real,pointer,dimension(:,:) :: mmean_soil_water + real,pointer,dimension(:,:) :: mmean_soil_temp + real,pointer,dimension(:,:) :: mmean_soil_fliq + real,pointer,dimension(:) :: mmean_rshort_gnd + real,pointer,dimension(:) :: mmean_par_gnd + real,pointer,dimension(:) :: mmean_rlong_gnd + real,pointer,dimension(:) :: mmean_rlongup + real,pointer,dimension(:) :: mmean_parup + real,pointer,dimension(:) :: mmean_nirup + real,pointer,dimension(:) :: mmean_rshortup + real,pointer,dimension(:) :: mmean_rnet + real,pointer,dimension(:) :: mmean_albedo + real,pointer,dimension(:) :: mmean_albedo_beam + real,pointer,dimension(:) :: mmean_albedo_diff + real,pointer,dimension(:) :: mmean_rlong_albedo + real,pointer,dimension(:) :: mmean_ustar + real,pointer,dimension(:) :: mmean_tstar + real,pointer,dimension(:) :: mmean_qstar + real,pointer,dimension(:) :: mmean_cstar + real,pointer,dimension(:) :: mmean_carbon_ac + real,pointer,dimension(:) :: mmean_carbon_st + real,pointer,dimension(:) :: mmean_vapor_gc + real,pointer,dimension(:) :: mmean_vapor_ac + real,pointer,dimension(:,:) :: mmean_smoist_gg + real,pointer,dimension(:) :: mmean_throughfall + real,pointer,dimension(:,:) :: mmean_transloss + real,pointer,dimension(:) :: mmean_runoff + real,pointer,dimension(:) :: mmean_drainage + real,pointer,dimension(:) :: mmean_sensible_gc + real,pointer,dimension(:) :: mmean_sensible_ac + real,pointer,dimension(:,:) :: mmean_sensible_gg + real,pointer,dimension(:) :: mmean_qthroughfall + real,pointer,dimension(:) :: mmean_qrunoff + real,pointer,dimension(:) :: mmean_qdrainage + real,pointer,dimension(:) :: mmean_nppleaf + real,pointer,dimension(:) :: mmean_nppfroot + real,pointer,dimension(:) :: mmean_nppsapwood + real,pointer,dimension(:) :: mmean_nppcroot + real,pointer,dimension(:) :: mmean_nppseeds + real,pointer,dimension(:) :: mmean_nppwood + real,pointer,dimension(:) :: mmean_nppdaily + real,pointer,dimension(:) :: mmean_A_decomp + real,pointer,dimension(:) :: mmean_Af_decomp + real,pointer,dimension(:) :: mmean_co2_residual + real,pointer,dimension(:) :: mmean_energy_residual + real,pointer,dimension(:) :: mmean_water_residual + real,pointer,dimension(:) :: mmean_atm_theiv + real,pointer,dimension(:) :: mmean_atm_theta + real,pointer,dimension(:) :: mmean_atm_temp + real,pointer,dimension(:) :: mmean_atm_vpdef + real,pointer,dimension(:) :: mmean_atm_shv + real,pointer,dimension(:) :: mmean_atm_rshort + real,pointer,dimension(:) :: mmean_atm_rshort_diff + real,pointer,dimension(:) :: mmean_atm_par + real,pointer,dimension(:) :: mmean_atm_par_diff + real,pointer,dimension(:) :: mmean_atm_rlong + real,pointer,dimension(:) :: mmean_atm_vels + real,pointer,dimension(:) :: mmean_atm_rhos + real,pointer,dimension(:) :: mmean_atm_prss + real,pointer,dimension(:) :: mmean_atm_co2 + real,pointer,dimension(:) :: mmean_pcpg + real,pointer,dimension(:) :: mmean_qpcpg + real,pointer,dimension(:) :: mmean_dpcpg + !----- Monthly mean sum of squares. -------------------------------------------------! + real,pointer,dimension(:) :: mmsqu_gpp + real,pointer,dimension(:) :: mmsqu_npp + real,pointer,dimension(:) :: mmsqu_plresp + real,pointer,dimension(:) :: mmsqu_sensible_lc + real,pointer,dimension(:) :: mmsqu_vapor_lc + real,pointer,dimension(:) :: mmsqu_transp + real,pointer,dimension(:) :: mmsqu_sensible_wc + real,pointer,dimension(:) :: mmsqu_vapor_wc + real,pointer,dimension(:) :: mmsqu_rh + real,pointer,dimension(:) :: mmsqu_cwd_rh + real,pointer,dimension(:) :: mmsqu_nep + real,pointer,dimension(:) :: mmsqu_rlongup + real,pointer,dimension(:) :: mmsqu_parup + real,pointer,dimension(:) :: mmsqu_nirup + real,pointer,dimension(:) :: mmsqu_rshortup + real,pointer,dimension(:) :: mmsqu_rnet + real,pointer,dimension(:) :: mmsqu_albedo + real,pointer,dimension(:) :: mmsqu_ustar + real,pointer,dimension(:) :: mmsqu_carbon_ac + real,pointer,dimension(:) :: mmsqu_carbon_st + real,pointer,dimension(:) :: mmsqu_vapor_gc + real,pointer,dimension(:) :: mmsqu_vapor_ac + real,pointer,dimension(:) :: mmsqu_sensible_gc + real,pointer,dimension(:) :: mmsqu_sensible_ac + !----- Mean diel (same units as fast mean). -----------------------------------------! + real,pointer,dimension(:,:) :: qmean_gpp + real,pointer,dimension(:,:) :: qmean_npp + real,pointer,dimension(:,:) :: qmean_leaf_resp + real,pointer,dimension(:,:) :: qmean_root_resp + real,pointer,dimension(:,:) :: qmean_growth_resp + real,pointer,dimension(:,:) :: qmean_storage_resp + real,pointer,dimension(:,:) :: qmean_vleaf_resp + real,pointer,dimension(:,:) :: qmean_plresp + real,pointer,dimension(:,:) :: qmean_leaf_energy + real,pointer,dimension(:,:) :: qmean_leaf_water + real,pointer,dimension(:,:) :: qmean_leaf_hcap + real,pointer,dimension(:,:) :: qmean_leaf_vpdef + real,pointer,dimension(:,:) :: qmean_leaf_temp + real,pointer,dimension(:,:) :: qmean_leaf_fliq + real,pointer,dimension(:,:) :: qmean_leaf_gsw + real,pointer,dimension(:,:) :: qmean_leaf_gbw + real,pointer,dimension(:,:) :: qmean_wood_energy + real,pointer,dimension(:,:) :: qmean_wood_water + real,pointer,dimension(:,:) :: qmean_wood_hcap + real,pointer,dimension(:,:) :: qmean_wood_temp + real,pointer,dimension(:,:) :: qmean_wood_fliq + real,pointer,dimension(:,:) :: qmean_wood_gbw + real,pointer,dimension(:,:) :: qmean_fs_open + real,pointer,dimension(:,:) :: qmean_fsw + real,pointer,dimension(:,:) :: qmean_fsn + real,pointer,dimension(:,:) :: qmean_psi_open + real,pointer,dimension(:,:) :: qmean_psi_closed + real,pointer,dimension(:,:) :: qmean_water_supply + real,pointer,dimension(:,:) :: qmean_par_l + real,pointer,dimension(:,:) :: qmean_par_l_beam + real,pointer,dimension(:,:) :: qmean_par_l_diff + real,pointer,dimension(:,:) :: qmean_rshort_l + real,pointer,dimension(:,:) :: qmean_rlong_l + real,pointer,dimension(:,:) :: qmean_sensible_lc + real,pointer,dimension(:,:) :: qmean_vapor_lc + real,pointer,dimension(:,:) :: qmean_transp + real,pointer,dimension(:,:) :: qmean_intercepted_al + real,pointer,dimension(:,:) :: qmean_wshed_lg + real,pointer,dimension(:,:) :: qmean_rshort_w + real,pointer,dimension(:,:) :: qmean_rlong_w + real,pointer,dimension(:,:) :: qmean_sensible_wc + real,pointer,dimension(:,:) :: qmean_vapor_wc + real,pointer,dimension(:,:) :: qmean_intercepted_aw + real,pointer,dimension(:,:) :: qmean_wshed_wg + real,pointer,dimension(:,:) :: qmean_rh + real,pointer,dimension(:,:) :: qmean_cwd_rh + real,pointer,dimension(:,:) :: qmean_nep + real,pointer,dimension(:,:) :: qmean_rk4step + real,pointer,dimension(:,:) :: qmean_available_water + real,pointer,dimension(:,:) :: qmean_can_theiv + real,pointer,dimension(:,:) :: qmean_can_theta + real,pointer,dimension(:,:) :: qmean_can_vpdef + real,pointer,dimension(:,:) :: qmean_can_temp + real,pointer,dimension(:,:) :: qmean_can_shv + real,pointer,dimension(:,:) :: qmean_can_co2 + real,pointer,dimension(:,:) :: qmean_can_rhos + real,pointer,dimension(:,:) :: qmean_can_prss + real,pointer,dimension(:,:) :: qmean_gnd_temp + real,pointer,dimension(:,:) :: qmean_gnd_shv + real,pointer,dimension(:,:) :: qmean_can_ggnd + real,pointer,dimension(:,:) :: qmean_sfcw_depth + real,pointer,dimension(:,:) :: qmean_sfcw_energy + real,pointer,dimension(:,:) :: qmean_sfcw_mass + real,pointer,dimension(:,:) :: qmean_sfcw_temp + real,pointer,dimension(:,:) :: qmean_sfcw_fliq + real,pointer,dimension(:,:,:) :: qmean_soil_energy + real,pointer,dimension(:,:,:) :: qmean_soil_mstpot + real,pointer,dimension(:,:,:) :: qmean_soil_water + real,pointer,dimension(:,:,:) :: qmean_soil_temp + real,pointer,dimension(:,:,:) :: qmean_soil_fliq + real,pointer,dimension(:,:) :: qmean_rshort_gnd + real,pointer,dimension(:,:) :: qmean_par_gnd + real,pointer,dimension(:,:) :: qmean_rlong_gnd + real,pointer,dimension(:,:) :: qmean_rlongup + real,pointer,dimension(:,:) :: qmean_parup + real,pointer,dimension(:,:) :: qmean_nirup + real,pointer,dimension(:,:) :: qmean_rshortup + real,pointer,dimension(:,:) :: qmean_rnet + real,pointer,dimension(:,:) :: qmean_albedo + real,pointer,dimension(:,:) :: qmean_albedo_beam + real,pointer,dimension(:,:) :: qmean_albedo_diff + real,pointer,dimension(:,:) :: qmean_rlong_albedo + real,pointer,dimension(:,:) :: qmean_ustar + real,pointer,dimension(:,:) :: qmean_tstar + real,pointer,dimension(:,:) :: qmean_qstar + real,pointer,dimension(:,:) :: qmean_cstar + real,pointer,dimension(:,:) :: qmean_carbon_ac + real,pointer,dimension(:,:) :: qmean_carbon_st + real,pointer,dimension(:,:) :: qmean_vapor_gc + real,pointer,dimension(:,:) :: qmean_vapor_ac + real,pointer,dimension(:,:,:) :: qmean_smoist_gg + real,pointer,dimension(:,:) :: qmean_throughfall + real,pointer,dimension(:,:,:) :: qmean_transloss + real,pointer,dimension(:,:) :: qmean_runoff + real,pointer,dimension(:,:) :: qmean_drainage + real,pointer,dimension(:,:) :: qmean_sensible_gc + real,pointer,dimension(:,:) :: qmean_sensible_ac + real,pointer,dimension(:,:,:) :: qmean_sensible_gg + real,pointer,dimension(:,:) :: qmean_qthroughfall + real,pointer,dimension(:,:) :: qmean_qrunoff + real,pointer,dimension(:,:) :: qmean_qdrainage + real,pointer,dimension(:,:) :: qmean_atm_theiv + real,pointer,dimension(:,:) :: qmean_atm_theta + real,pointer,dimension(:,:) :: qmean_atm_temp + real,pointer,dimension(:,:) :: qmean_atm_vpdef + real,pointer,dimension(:,:) :: qmean_atm_shv + real,pointer,dimension(:,:) :: qmean_atm_rshort + real,pointer,dimension(:,:) :: qmean_atm_rshort_diff + real,pointer,dimension(:,:) :: qmean_atm_par + real,pointer,dimension(:,:) :: qmean_atm_par_diff + real,pointer,dimension(:,:) :: qmean_atm_rlong + real,pointer,dimension(:,:) :: qmean_atm_vels + real,pointer,dimension(:,:) :: qmean_atm_rhos + real,pointer,dimension(:,:) :: qmean_atm_prss + real,pointer,dimension(:,:) :: qmean_atm_co2 + real,pointer,dimension(:,:) :: qmean_pcpg + real,pointer,dimension(:,:) :: qmean_qpcpg + real,pointer,dimension(:,:) :: qmean_dpcpg + !------ Mean diel of sum of squares. ------------------------------------------------! + real,pointer,dimension(:,:) :: qmsqu_gpp + real,pointer,dimension(:,:) :: qmsqu_npp + real,pointer,dimension(:,:) :: qmsqu_plresp + real,pointer,dimension(:,:) :: qmsqu_sensible_lc + real,pointer,dimension(:,:) :: qmsqu_vapor_lc + real,pointer,dimension(:,:) :: qmsqu_transp + real,pointer,dimension(:,:) :: qmsqu_sensible_wc + real,pointer,dimension(:,:) :: qmsqu_vapor_wc + real,pointer,dimension(:,:) :: qmsqu_rh + real,pointer,dimension(:,:) :: qmsqu_cwd_rh + real,pointer,dimension(:,:) :: qmsqu_nep + real,pointer,dimension(:,:) :: qmsqu_rlongup + real,pointer,dimension(:,:) :: qmsqu_parup + real,pointer,dimension(:,:) :: qmsqu_nirup + real,pointer,dimension(:,:) :: qmsqu_rshortup + real,pointer,dimension(:,:) :: qmsqu_rnet + real,pointer,dimension(:,:) :: qmsqu_albedo + real,pointer,dimension(:,:) :: qmsqu_ustar + real,pointer,dimension(:,:) :: qmsqu_carbon_ac + real,pointer,dimension(:,:) :: qmsqu_carbon_st + real,pointer,dimension(:,:) :: qmsqu_vapor_gc + real,pointer,dimension(:,:) :: qmsqu_vapor_ac + real,pointer,dimension(:,:) :: qmsqu_sensible_gc + real,pointer,dimension(:,:) :: qmsqu_sensible_ac + !------------------------------------------------------------------------------------! + end type edtype + !=======================================================================================! + !=======================================================================================! + - !----- Daily averages. -----------------------------------------------------------! - if (idoutput > 0 .or. imoutput > 0 .or. iqoutput > 0) then - osite%dmean_rh (opa) = isite%dmean_rh (ipa) - osite%dmean_cwd_rh (opa) = isite%dmean_cwd_rh (ipa) - osite%dmean_co2_residual (opa) = isite%dmean_co2_residual (ipa) - osite%dmean_energy_residual(opa) = isite%dmean_energy_residual(ipa) - osite%dmean_water_residual (opa) = isite%dmean_water_residual (ipa) - osite%dmean_A_decomp (opa) = isite%dmean_A_decomp (ipa) - osite%dmean_Af_decomp (opa) = isite%dmean_Af_decomp (ipa) - osite%dmean_rk4step (opa) = isite%dmean_rk4step (ipa) - osite%dmean_albedo (opa) = isite%dmean_albedo (ipa) - osite%dmean_albedo_beam (opa) = isite%dmean_albedo_beam (ipa) - osite%dmean_albedo_diffuse (opa) = isite%dmean_albedo_diffuse (ipa) - end if - if (imoutput > 0 .or. iqoutput > 0) then - osite%mmean_rh (opa) = isite%mmean_rh (ipa) - osite%mmean_cwd_rh (opa) = isite%mmean_cwd_rh (ipa) - osite%mmean_co2_residual (opa) = isite%mmean_co2_residual (ipa) - osite%mmean_energy_residual(opa) = isite%mmean_energy_residual(ipa) - osite%mmean_water_residual (opa) = isite%mmean_water_residual (ipa) - osite%mmean_A_decomp (opa) = isite%mmean_A_decomp (ipa) - osite%mmean_Af_decomp (opa) = isite%mmean_Af_decomp (ipa) - osite%mmean_rk4step (opa) = isite%mmean_rk4step (ipa) - osite%mmean_albedo (opa) = isite%mmean_albedo (ipa) - osite%mmean_albedo_beam (opa) = isite%mmean_albedo_beam (ipa) - osite%mmean_albedo_diffuse (opa) = isite%mmean_albedo_diffuse (ipa) - end if - if (iqoutput > 0) then - do icyc=1,ndcycle - osite%qmean_rh (icyc,opa) = isite%qmean_rh (icyc,ipa) - osite%qmean_cwd_rh (icyc,opa) = isite%qmean_cwd_rh (icyc,ipa) - osite%qmean_albedo (icyc,opa) = isite%qmean_albedo (icyc,ipa) - osite%qmean_albedo_beam (icyc,opa) = isite%qmean_albedo_beam (icyc,ipa) - osite%qmean_albedo_diffuse (icyc,opa) = isite%qmean_albedo_diffuse (icyc,ipa) - end do - end if - !----- Copy all cohorts. ---------------------------------------------------------! - call allocate_patchtype(osite%patch(opa),isite%patch(ipa)%ncohorts) - call copy_patchtype(isite%patch(ipa),osite%patch(opa),1,isite%patch(ipa)%ncohorts & - ,1,isite%patch(ipa)%ncohorts) - end do opaloop - return - end subroutine copy_sitetype !=======================================================================================! !=======================================================================================! + ! GLOBAL VARIABLES -- These variables are allocated and assigned before the parallel ! + ! distribution, so we don't want to keep it inside the structure. ! + ! In case of serial runs, we should have offset full of zeroes and ! + ! the polygons numbered from 1 to the number of polygons. In a ! + ! non-POI parallel run, we want to allocate "mpolygons" in each ! + ! node, but then must keep track of the actual polygon "ID" to ! + ! write the output correctly. ! + !---------------------------------------------------------------------------------------! + ! Number of polygons in each grid, for each machine. so this has a ngrids size. + integer, dimension(maxmach,maxgrds) :: gdpy + ! Number of sites in each grid, for each machine. + integer, dimension(maxmach,maxgrds) :: gdsi + ! Number of patches in each grid, for each machine. + integer, dimension(maxmach,maxgrds) :: gdpa + ! Number of cohorts in each grid, for each machine. + integer, dimension(maxmach,maxgrds) :: gdco + + ! Offset for each machine, so this has a nmachs size. + integer, dimension(maxmach,maxgrds) :: py_off + + ! Offset for each machine, so this has a nmachs size. + integer, dimension(maxmach,maxgrds) :: si_off -!============================================================================! -!============================================================================! - subroutine copy_sitetype_mask(sitein,siteout,logmask,masksz,newsz) - - ! This subroutine assumes that the size of vectors in siteout - ! are the number of true elements in mask, while the size of the - ! vectors in sitein are of the size of the mask itself. If this - ! is not true, you will get a segmentation violation and the - ! code will crash.args 1 and 3 must be dimension of arg 4 - ! argument 2 must be the dimension of the sum of the 3rd argument - ! - ! THIS ROUTINE CURRENTLY ASSUMES THAT THE OUTPUT SITE - ! HAS NOT ALLOCATED IT'S PATCH'S COHORT VECTORS YET, THIS - ! IS BECAUSE THE LENGTHS OF THESE VECTORS ARE BASED ON THE - ! DONOR PATH'S VECTOR SIZES. DO NOT USE PRE-ALLOCATED - ! RECIPIENTS - - implicit none - - type(sitetype),target :: sitein,siteout - integer :: masksz,newsz - integer,dimension(newsz) :: incmask - logical,dimension(masksz) :: logmask - integer :: i,k,m,inc,ipft,icyc - - inc = 0 - do i=1,masksz - if (logmask(i)) then - inc = inc + 1 - incmask(inc) = i - end if - end do - - ! First do all of the true vectors - siteout%paco_id(1:inc) = pack(sitein%paco_id,logmask) - siteout%paco_n(1:inc) = pack(sitein%paco_n,logmask) - siteout%dist_type(1:inc) = pack(sitein%dist_type,logmask) - siteout%age(1:inc) = pack(sitein%age,logmask) - siteout%area(1:inc) = pack(sitein%area,logmask) - siteout%fast_soil_C(1:inc) = pack(sitein%fast_soil_C,logmask) - siteout%slow_soil_C(1:inc) = pack(sitein%slow_soil_C,logmask) - siteout%structural_soil_C(1:inc) = pack(sitein%structural_soil_C,logmask) - siteout%structural_soil_L(1:inc) = pack(sitein%structural_soil_L,logmask) - siteout%mineralized_soil_N(1:inc) = pack(sitein%mineralized_soil_N,logmask) - siteout%fast_soil_N(1:inc) = pack(sitein%fast_soil_N,logmask) - siteout%sum_dgd(1:inc) = pack(sitein%sum_dgd,logmask) - siteout%sum_chd(1:inc) = pack(sitein%sum_chd,logmask) - siteout%plantation(1:inc) = pack(sitein%plantation,logmask) - siteout%cohort_count(1:inc) = pack(sitein%cohort_count,logmask) - siteout%can_theiv(1:inc) = pack(sitein%can_theiv,logmask) - siteout%can_vpdef(1:inc) = pack(sitein%can_vpdef,logmask) - siteout%can_temp(1:inc) = pack(sitein%can_temp,logmask) - siteout%can_temp_pv(1:inc) = pack(sitein%can_temp_pv,logmask) - siteout%can_shv(1:inc) = pack(sitein%can_shv,logmask) - siteout%can_co2(1:inc) = pack(sitein%can_co2,logmask) - siteout%can_rhos(1:inc) = pack(sitein%can_rhos,logmask) - siteout%can_prss(1:inc) = pack(sitein%can_prss,logmask) - siteout%can_theta(1:inc) = pack(sitein%can_theta,logmask) - siteout%can_depth(1:inc) = pack(sitein%can_depth,logmask) - siteout%opencan_frac(1:inc) = pack(sitein%opencan_frac,logmask) - siteout%ggbare(1:inc) = pack(sitein%ggbare,logmask) - siteout%ggveg(1:inc) = pack(sitein%ggveg,logmask) - siteout%ggnet(1:inc) = pack(sitein%ggnet,logmask) - siteout%ggsoil(1:inc) = pack(sitein%ggsoil,logmask) - siteout%lai(1:inc) = pack(sitein%lai,logmask) - siteout%wai(1:inc) = pack(sitein%wai,logmask) - siteout%avg_daily_temp(1:inc) = pack(sitein%avg_daily_temp,logmask) - siteout%avg_monthly_gndwater(1:inc) = pack(sitein%avg_monthly_gndwater,logmask) - siteout%avg_monthly_waterdef(1:inc) = pack(sitein%avg_monthly_waterdef,logmask) - siteout%mean_rh(1:inc) = pack(sitein%mean_rh,logmask) - siteout%mean_cwd_rh(1:inc) = pack(sitein%mean_cwd_rh,logmask) - siteout%mean_nep(1:inc) = pack(sitein%mean_nep,logmask) - siteout%wbudget_loss2atm(1:inc) = pack(sitein%wbudget_loss2atm,logmask) - siteout%wbudget_denseffect(1:inc) = pack(sitein%wbudget_denseffect,logmask) - siteout%wbudget_precipgain(1:inc) = pack(sitein%wbudget_precipgain,logmask) - siteout%wbudget_loss2runoff(1:inc) = pack(sitein%wbudget_loss2runoff,logmask) - siteout%wbudget_loss2drainage(1:inc) = pack(sitein%wbudget_loss2drainage,logmask) - siteout%wbudget_initialstorage(1:inc) = pack(sitein%wbudget_initialstorage,logmask) - siteout%wbudget_residual(1:inc) = pack(sitein%wbudget_residual,logmask) - siteout%ebudget_loss2atm(1:inc) = pack(sitein%ebudget_loss2atm,logmask) - siteout%ebudget_denseffect(1:inc) = pack(sitein%ebudget_denseffect,logmask) - siteout%ebudget_prsseffect(1:inc) = pack(sitein%ebudget_prsseffect,logmask) - siteout%ebudget_loss2runoff(1:inc) = pack(sitein%ebudget_loss2runoff,logmask) - siteout%ebudget_loss2drainage(1:inc) = pack(sitein%ebudget_loss2drainage,logmask) - siteout%ebudget_netrad(1:inc) = pack(sitein%ebudget_netrad,logmask) - siteout%ebudget_precipgain(1:inc) = pack(sitein%ebudget_precipgain,logmask) - siteout%ebudget_initialstorage(1:inc) = pack(sitein%ebudget_initialstorage,logmask) - siteout%ebudget_residual(1:inc) = pack(sitein%ebudget_residual,logmask) - siteout%co2budget_initialstorage(1:inc) = pack(sitein%co2budget_initialstorage,logmask) - siteout%co2budget_residual(1:inc) = pack(sitein%co2budget_residual,logmask) - siteout%co2budget_loss2atm(1:inc) = pack(sitein%co2budget_loss2atm,logmask) - siteout%co2budget_denseffect(1:inc) = pack(sitein%co2budget_denseffect,logmask) - siteout%co2budget_gpp(1:inc) = pack(sitein%co2budget_gpp,logmask) - siteout%co2budget_plresp(1:inc) = pack(sitein%co2budget_plresp,logmask) - siteout%co2budget_rh(1:inc) = pack(sitein%co2budget_rh,logmask) - siteout%co2budget_cwd_rh(1:inc) = pack(sitein%co2budget_cwd_rh,logmask) - siteout%today_A_decomp(1:inc) = pack(sitein%today_A_decomp,logmask) - siteout%today_Af_decomp(1:inc) = pack(sitein%today_Af_decomp,logmask) - siteout%veg_rough(1:inc) = pack(sitein%veg_rough,logmask) - siteout%veg_height(1:inc) = pack(sitein%veg_height,logmask) - siteout%veg_displace(1:inc) = pack(sitein%veg_displace,logmask) - siteout%fsc_in(1:inc) = pack(sitein%fsc_in,logmask) - siteout%ssc_in(1:inc) = pack(sitein%ssc_in,logmask) - siteout%ssl_in(1:inc) = pack(sitein%ssl_in,logmask) - siteout%fsn_in(1:inc) = pack(sitein%fsn_in,logmask) - siteout%total_plant_nitrogen_uptake(1:inc) = pack(sitein%total_plant_nitrogen_uptake,logmask) - siteout%mineralized_N_loss(1:inc) = pack(sitein%mineralized_N_loss,logmask) - siteout%mineralized_N_input(1:inc) = pack(sitein%mineralized_N_input,logmask) - siteout%rshort_g(1:inc) = pack(sitein%rshort_g,logmask) - siteout%rshort_g_beam(1:inc) = pack(sitein%rshort_g_beam,logmask) - siteout%rshort_g_diffuse(1:inc) = pack(sitein%rshort_g_diffuse,logmask) - siteout%par_g(1:inc) = pack(sitein%par_g,logmask) - siteout%par_g_beam(1:inc) = pack(sitein%par_g_beam,logmask) - siteout%par_g_diffuse(1:inc) = pack(sitein%par_g_diffuse,logmask) - siteout%par_b(1:inc) = pack(sitein%par_b,logmask) - siteout%par_b_beam(1:inc) = pack(sitein%par_b_beam,logmask) - siteout%par_b_diffuse(1:inc) = pack(sitein%par_b_diffuse,logmask) - siteout%nir_b(1:inc) = pack(sitein%nir_b,logmask) - siteout%nir_b_beam(1:inc) = pack(sitein%nir_b_beam,logmask) - siteout%nir_b_diffuse(1:inc) = pack(sitein%nir_b_diffuse,logmask) - siteout%rlong_g(1:inc) = pack(sitein%rlong_g,logmask) - siteout%rlong_g_surf(1:inc) = pack(sitein%rlong_g_surf,logmask) - siteout%rlong_g_incid(1:inc) = pack(sitein%rlong_g_incid,logmask) - siteout%rlong_s(1:inc) = pack(sitein%rlong_s,logmask) - siteout%rlong_s_surf(1:inc) = pack(sitein%rlong_s_surf,logmask) - siteout%rlong_s_incid(1:inc) = pack(sitein%rlong_s_incid,logmask) - siteout%albedo(1:inc) = pack(sitein%albedo,logmask) - siteout%albedo_beam(1:inc) = pack(sitein%albedo_beam,logmask) - siteout%albedo_diffuse(1:inc) = pack(sitein%albedo_diffuse,logmask) - siteout%rnet(1:inc) = pack(sitein%rnet,logmask) - siteout%rlongup(1:inc) = pack(sitein%rlongup,logmask) - siteout%parup(1:inc) = pack(sitein%parup,logmask) - siteout%nirup(1:inc) = pack(sitein%nirup,logmask) - siteout%rshortup(1:inc) = pack(sitein%rshortup,logmask) - siteout%rlong_albedo(1:inc) = pack(sitein%rlong_albedo,logmask) - siteout%total_sfcw_depth(1:inc) = pack(sitein%total_sfcw_depth,logmask) - siteout%snowfac(1:inc) = pack(sitein%snowfac,logmask) - siteout%A_decomp(1:inc) = pack(sitein%A_decomp,logmask) - siteout%f_decomp(1:inc) = pack(sitein%f_decomp,logmask) - siteout%rh(1:inc) = pack(sitein%rh,logmask) - siteout%cwd_rh(1:inc) = pack(sitein%cwd_rh,logmask) - siteout%plant_ag_biomass(1:inc) = pack(sitein%plant_ag_biomass,logmask) - siteout%runoff(1:inc) = pack(sitein%runoff,logmask) - siteout%htry(1:inc) = pack(sitein%htry,logmask) - siteout%hprev(1:inc) = pack(sitein%hprev,logmask) - siteout%avg_rk4step(1:inc) = pack(sitein%avg_rk4step,logmask) - siteout%avg_available_water(1:inc) = pack(sitein%avg_available_water,logmask) - siteout%ustar(1:inc) = pack(sitein%ustar,logmask) - siteout%tstar(1:inc) = pack(sitein%tstar,logmask) - siteout%qstar(1:inc) = pack(sitein%qstar,logmask) - siteout%cstar(1:inc) = pack(sitein%cstar,logmask) - - siteout%zeta(1:inc) = pack(sitein%zeta,logmask) - siteout%ribulk(1:inc) = pack(sitein%ribulk,logmask) - - siteout%upwp(1:inc) = pack(sitein%upwp,logmask) - siteout%tpwp(1:inc) = pack(sitein%tpwp,logmask) - siteout%qpwp(1:inc) = pack(sitein%qpwp,logmask) - siteout%cpwp(1:inc) = pack(sitein%cpwp,logmask) - siteout%wpwp(1:inc) = pack(sitein%wpwp,logmask) - - siteout%nlev_sfcwater(1:inc) = pack(sitein%nlev_sfcwater,logmask) - siteout%ground_shv(1:inc) = pack(sitein%ground_shv,logmask) - siteout%ground_ssh(1:inc) = pack(sitein%ground_ssh,logmask) - siteout%ground_temp(1:inc) = pack(sitein%ground_temp,logmask) - siteout%ground_fliq(1:inc) = pack(sitein%ground_fliq,logmask) - siteout%rough(1:inc) = pack(sitein%rough,logmask) - - siteout%avg_rshort_gnd (1:inc) = pack(sitein%avg_rshort_gnd ,logmask) - siteout%avg_par_gnd (1:inc) = pack(sitein%avg_par_gnd ,logmask) - siteout%avg_rlong_gnd (1:inc) = pack(sitein%avg_rlong_gnd ,logmask) - siteout%avg_ustar (1:inc) = pack(sitein%avg_ustar ,logmask) - siteout%avg_tstar (1:inc) = pack(sitein%avg_tstar ,logmask) - siteout%avg_qstar (1:inc) = pack(sitein%avg_qstar ,logmask) - siteout%avg_cstar (1:inc) = pack(sitein%avg_cstar ,logmask) - siteout%avg_carbon_ac (1:inc) = pack(sitein%avg_carbon_ac ,logmask) - siteout%avg_carbon_st (1:inc) = pack(sitein%avg_carbon_st ,logmask) - siteout%avg_rlongup (1:inc) = pack(sitein%avg_rlongup ,logmask) - siteout%avg_parup (1:inc) = pack(sitein%avg_parup ,logmask) - siteout%avg_nirup (1:inc) = pack(sitein%avg_nirup ,logmask) - siteout%avg_rshortup (1:inc) = pack(sitein%avg_rshortup ,logmask) - siteout%avg_rnet (1:inc) = pack(sitein%avg_rnet ,logmask) - siteout%avg_albedo (1:inc) = pack(sitein%avg_albedo ,logmask) - siteout%avg_albedo_beam (1:inc) = pack(sitein%avg_albedo_beam ,logmask) - siteout%avg_albedo_diffuse (1:inc) = pack(sitein%avg_albedo_diffuse,logmask) - siteout%avg_rlong_albedo (1:inc) = pack(sitein%avg_rlong_albedo ,logmask) - - siteout%avg_vapor_lc(1:inc) = pack(sitein%avg_vapor_lc,logmask) - siteout%avg_vapor_wc(1:inc) = pack(sitein%avg_vapor_wc,logmask) - siteout%avg_vapor_gc(1:inc) = pack(sitein%avg_vapor_gc,logmask) - siteout%avg_wshed_vg(1:inc) = pack(sitein%avg_wshed_vg,logmask) - siteout%avg_intercepted(1:inc) = pack(sitein%avg_intercepted,logmask) - siteout%avg_throughfall(1:inc) = pack(sitein%avg_throughfall,logmask) - siteout%avg_vapor_ac(1:inc) = pack(sitein%avg_vapor_ac,logmask) - siteout%avg_transp(1:inc) = pack(sitein%avg_transp,logmask) - siteout%avg_evap(1:inc) = pack(sitein%avg_evap,logmask) - siteout%avg_runoff(1:inc) = pack(sitein%avg_runoff,logmask) - siteout%avg_drainage(1:inc) = pack(sitein%avg_drainage,logmask) - siteout%avg_drainage_heat(1:inc) = pack(sitein%avg_drainage_heat,logmask) - siteout%avg_sensible_lc(1:inc) = pack(sitein%avg_sensible_lc,logmask) - siteout%avg_sensible_wc(1:inc) = pack(sitein%avg_sensible_wc,logmask) - siteout%avg_qwshed_vg(1:inc) = pack(sitein%avg_qwshed_vg,logmask) - siteout%avg_qintercepted(1:inc) = pack(sitein%avg_qintercepted,logmask) - siteout%avg_qthroughfall(1:inc) = pack(sitein%avg_qthroughfall,logmask) - siteout%avg_sensible_gc(1:inc) = pack(sitein%avg_sensible_gc,logmask) - siteout%avg_sensible_ac(1:inc) = pack(sitein%avg_sensible_ac,logmask) - siteout%avg_runoff_heat(1:inc) = pack(sitein%avg_runoff_heat,logmask) - siteout%avg_leaf_energy(1:inc) = pack(sitein%avg_leaf_energy,logmask) - siteout%avg_leaf_temp(1:inc) = pack(sitein%avg_leaf_temp,logmask) - siteout%avg_leaf_vpdef(1:inc) = pack(sitein%avg_leaf_vpdef,logmask) - siteout%avg_leaf_hcap(1:inc) = pack(sitein%avg_leaf_hcap,logmask) - siteout%avg_leaf_fliq(1:inc) = pack(sitein%avg_leaf_fliq,logmask) - siteout%avg_leaf_water(1:inc) = pack(sitein%avg_leaf_water,logmask) - siteout%avg_wood_energy(1:inc) = pack(sitein%avg_wood_energy,logmask) - siteout%avg_wood_temp(1:inc) = pack(sitein%avg_wood_temp,logmask) - siteout%avg_wood_hcap(1:inc) = pack(sitein%avg_wood_hcap,logmask) - siteout%avg_wood_fliq(1:inc) = pack(sitein%avg_wood_fliq,logmask) - siteout%avg_wood_water(1:inc) = pack(sitein%avg_wood_water,logmask) - siteout%par_l_max(1:inc) = pack(sitein%par_l_max,logmask) - siteout%par_l_beam_max(1:inc) = pack(sitein%par_l_beam_max,logmask) - siteout%par_l_diffuse_max(1:inc) = pack(sitein%par_l_diffuse_max,logmask) - - ! Water layers 1:nzs - - do k=1,nzs - siteout%sfcwater_mass(k,1:inc) = pack(sitein%sfcwater_mass(k,:),logmask) - siteout%sfcwater_energy(k,1:inc) = pack(sitein%sfcwater_energy(k,:),logmask) - siteout%sfcwater_depth(k,1:inc) = pack(sitein%sfcwater_depth(k,:),logmask) - siteout%rshort_s(k,1:inc) = pack(sitein%rshort_s(k,:),logmask) - siteout%rshort_s_beam(k,1:inc) = pack(sitein%rshort_s_beam(k,:),logmask) - siteout%rshort_s_diffuse(k,1:inc) = pack(sitein%rshort_s_diffuse(k,:),logmask) - siteout%par_s(k,1:inc) = pack(sitein%par_s(k,:),logmask) - siteout%par_s_beam(k,1:inc) = pack(sitein%par_s_beam(k,:),logmask) - siteout%par_s_diffuse(k,1:inc) = pack(sitein%par_s_diffuse(k,:),logmask) - siteout%sfcwater_tempk(k,1:inc) = pack(sitein%sfcwater_tempk(k,:),logmask) - siteout%sfcwater_fracliq(k,1:inc) = pack(sitein%sfcwater_fracliq(k,:),logmask) - end do - - ! Soil layers 1:nzg - - do k=1,nzg - siteout%soil_energy(k,1:inc) = pack(sitein%soil_energy(k,:),logmask) - siteout%soil_water(k,1:inc) = pack(sitein%soil_water(k,:),logmask) - siteout%soil_tempk(k,1:inc) = pack(sitein%soil_tempk(k,:),logmask) - siteout%soil_fracliq(k,1:inc) = pack(sitein%soil_fracliq(k,:),logmask) - siteout%rootdense(k,1:inc) = pack(sitein%rootdense(k,:),logmask) - siteout%avg_smoist_gg(k,1:inc) = pack(sitein%avg_smoist_gg(k,:),logmask) - siteout%avg_transloss(k,1:inc) = pack(sitein%avg_transloss(k,:),logmask) - siteout%avg_sensible_gg(k,1:inc) = pack(sitein%avg_sensible_gg(k,:),logmask) - end do - - ! pft types - - do k=1,n_pft - siteout%repro(k,1:inc) = pack(sitein%repro(k,:),logmask) - siteout%A_o_max(k,1:inc) = pack(sitein%A_o_max(k,:),logmask) - siteout%A_c_max(k,1:inc) = pack(sitein%A_c_max(k,:),logmask) - - do m=1,ff_nhgt - siteout%cumlai_profile(k,m,1:inc) = pack(sitein%cumlai_profile(k,m,:),logmask) - end do - end do - - !dbh types - do k=1,n_dbh - siteout%co2budget_gpp_dbh(k,1:inc) = pack(sitein%co2budget_gpp_dbh(k,:),logmask) - end do - - do m=1,newsz - k=incmask(m) - call allocate_patchtype(siteout%patch(m),sitein%patch(k)%ncohorts) - call copy_patchtype(sitein%patch(k),siteout%patch(m),1,sitein%patch(k)%ncohorts,1,sitein%patch(k)%ncohorts) - end do - - - if (idoutput > 0 .or. imoutput > 0 .or. iqoutput > 0) then - siteout%dmean_rh (1:inc) = pack(sitein%dmean_rh ,logmask) - siteout%dmean_cwd_rh (1:inc) = pack(sitein%dmean_cwd_rh ,logmask) - siteout%dmean_co2_residual (1:inc) = pack(sitein%dmean_co2_residual ,logmask) - siteout%dmean_energy_residual(1:inc) = pack(sitein%dmean_energy_residual,logmask) - siteout%dmean_water_residual (1:inc) = pack(sitein%dmean_water_residual ,logmask) - siteout%dmean_A_decomp (1:inc) = pack(sitein%dmean_A_decomp ,logmask) - siteout%dmean_Af_decomp (1:inc) = pack(sitein%dmean_Af_decomp ,logmask) - siteout%dmean_rk4step (1:inc) = pack(sitein%dmean_rk4step ,logmask) - siteout%dmean_albedo (1:inc) = pack(sitein%dmean_albedo ,logmask) - siteout%dmean_albedo_beam (1:inc) = pack(sitein%dmean_albedo_beam ,logmask) - siteout%dmean_albedo_diffuse (1:inc) = pack(sitein%dmean_albedo_diffuse ,logmask) - end if - - if (imoutput > 0 .or. iqoutput > 0) then - siteout%mmean_rh (1:inc) = pack(sitein%mmean_rh ,logmask) - siteout%mmean_cwd_rh (1:inc) = pack(sitein%mmean_cwd_rh ,logmask) - siteout%mmean_co2_residual (1:inc) = pack(sitein%mmean_co2_residual ,logmask) - siteout%mmean_energy_residual(1:inc) = pack(sitein%mmean_energy_residual,logmask) - siteout%mmean_water_residual (1:inc) = pack(sitein%mmean_water_residual ,logmask) - siteout%mmean_A_decomp (1:inc) = pack(sitein%mmean_A_decomp ,logmask) - siteout%mmean_Af_decomp (1:inc) = pack(sitein%mmean_Af_decomp ,logmask) - siteout%mmean_rk4step (1:inc) = pack(sitein%mmean_rk4step ,logmask) - siteout%mmean_albedo (1:inc) = pack(sitein%mmean_albedo ,logmask) - siteout%mmean_albedo_beam (1:inc) = pack(sitein%mmean_albedo_beam ,logmask) - siteout%mmean_albedo_diffuse (1:inc) = pack(sitein%mmean_albedo_diffuse ,logmask) - end if - - if (iqoutput > 0) then - do icyc=1,ndcycle - siteout%qmean_rh (icyc,1:inc) = pack(sitein%qmean_rh (icyc,:) ,logmask) - siteout%qmean_cwd_rh (icyc,1:inc) = pack(sitein%qmean_cwd_rh (icyc,:) ,logmask) - siteout%qmean_albedo (icyc,1:inc) = pack(sitein%qmean_albedo (icyc,:) ,logmask) - siteout%qmean_albedo_beam (icyc,1:inc) = pack(sitein%qmean_albedo_beam (icyc,:) ,logmask) - siteout%qmean_albedo_diffuse (icyc,1:inc) = pack(sitein%qmean_albedo_diffuse(icyc,:) ,logmask) - end do - end if - - return - end subroutine copy_sitetype_mask -!============================================================================! -!============================================================================! - - - - - -!============================================================================! -!============================================================================! - subroutine copy_patchtype_mask(patchin,patchout,mask,masksz,newsz) - - ! This subroutine assumes that the size of vectors in siteout - ! are the number of true elements in mask, while the size of the - ! vectors in sitein are of the size of the mask itself. If this - ! is not true, you will get a segmentation violation and the - ! code will crash.args 1 and 3 must be dimension of arg 4 - ! argument 2 must be the dimension of the sum of the 3rd argument - ! - ! THIS ROUTINE CURRENTLY ASSUMES THAT THE OUTPUT SITE - ! HAS NOT ALLOCATED IT'S PATCH'S COHORT VECTORS YET, THIS - ! IS BECAUSE THE LENGTHS OF THESE VECTORS ARE BASED ON THE - ! DONOR PATH'S VECTOR SIZES. DO NOT USE PRE-ALLOCATED - ! RECIPIENTS - - implicit none - - type(patchtype),target :: patchin,patchout - integer :: masksz,newsz - integer,dimension(newsz) :: incmask - integer,dimension(masksz):: imask - logical,dimension(masksz) :: mask - integer :: i,k,m,inc - - do i=1,masksz - imask(i) = i - end do - inc=count(mask) ! Number of true elements - - if (inc == 0) return + ! Offset for each machine, so this has a nmachs size. + integer, dimension(maxmach,maxgrds) :: pa_off - incmask=pack(imask,mask) ! List of true elements - - patchout%pft(1:inc) = pack(patchin%pft,mask) - patchout%nplant(1:inc) = pack(patchin%nplant,mask) - patchout%hite(1:inc) = pack(patchin%hite,mask) - patchout%agb(1:inc) = pack(patchin%agb,mask) - patchout%basarea(1:inc) = pack(patchin%basarea,mask) - patchout%dagb_dt(1:inc) = pack(patchin%dagb_dt,mask) - patchout%dlnagb_dt(1:inc) = pack(patchin%dlnagb_dt,mask) - patchout%dba_dt(1:inc) = pack(patchin%dba_dt,mask) - patchout%dlnba_dt(1:inc) = pack(patchin%dlnba_dt,mask) - patchout%ddbh_dt(1:inc) = pack(patchin%ddbh_dt,mask) - patchout%dlndbh_dt(1:inc) = pack(patchin%dlndbh_dt,mask) - patchout%dbh(1:inc) = pack(patchin%dbh,mask) - patchout%bdead(1:inc) = pack(patchin%bdead,mask) - patchout%bleaf(1:inc) = pack(patchin%bleaf,mask) - patchout%phenology_status(1:inc) = pack(patchin%phenology_status,mask) - patchout%recruit_dbh(1:inc) = pack(patchin%recruit_dbh,mask) - patchout%census_status(1:inc) = pack(patchin%census_status,mask) - patchout%balive(1:inc) = pack(patchin%balive,mask) - patchout%broot(1:inc) = pack(patchin%broot,mask) - patchout%bsapwooda(1:inc) = pack(patchin%bsapwooda,mask) - patchout%bsapwoodb(1:inc) = pack(patchin%bsapwoodb,mask) - patchout%lai(1:inc) = pack(patchin%lai,mask) - patchout%wai(1:inc) = pack(patchin%wai,mask) - patchout%crown_area(1:inc) = pack(patchin%crown_area,mask) - patchout%leaf_resolvable(1:inc) = pack(patchin%leaf_resolvable,mask) - patchout%wood_resolvable(1:inc) = pack(patchin%wood_resolvable,mask) - patchout%bstorage(1:inc) = pack(patchin%bstorage,mask) - patchout%cbr_bar(1:inc) = pack(patchin%cbr_bar,mask) - patchout%leaf_energy(1:inc) = pack(patchin%leaf_energy,mask) - patchout%leaf_hcap(1:inc) = pack(patchin%leaf_hcap,mask) - patchout%leaf_temp(1:inc) = pack(patchin%leaf_temp,mask) - patchout%leaf_vpdef(1:inc) = pack(patchin%leaf_vpdef,mask) - patchout%leaf_temp_pv(1:inc) = pack(patchin%leaf_temp_pv,mask) - patchout%leaf_fliq(1:inc) = pack(patchin%leaf_fliq,mask) - patchout%leaf_water(1:inc) = pack(patchin%leaf_water,mask) - patchout%wood_energy(1:inc) = pack(patchin%wood_energy,mask) - patchout%wood_hcap(1:inc) = pack(patchin%wood_hcap,mask) - patchout%wood_temp(1:inc) = pack(patchin%wood_temp,mask) - patchout%wood_temp_pv(1:inc) = pack(patchin%wood_temp_pv,mask) - patchout%wood_fliq(1:inc) = pack(patchin%wood_fliq,mask) - patchout%wood_water(1:inc) = pack(patchin%wood_water,mask) - patchout%veg_wind(1:inc) = pack(patchin%veg_wind,mask) - patchout%lsfc_shv_open(1:inc) = pack(patchin%lsfc_shv_open,mask) - patchout%lsfc_shv_closed(1:inc) = pack(patchin%lsfc_shv_closed,mask) - patchout%lsfc_co2_open(1:inc) = pack(patchin%lsfc_co2_open,mask) - patchout%lsfc_co2_closed(1:inc) = pack(patchin%lsfc_co2_closed,mask) - patchout%lint_shv(1:inc) = pack(patchin%lint_shv,mask) - patchout%lint_co2_open(1:inc) = pack(patchin%lint_co2_open,mask) - patchout%lint_co2_closed(1:inc) = pack(patchin%lint_co2_closed,mask) - patchout%mean_gpp(1:inc) = pack(patchin%mean_gpp,mask) - patchout%mean_leaf_resp(1:inc) = pack(patchin%mean_leaf_resp,mask) - patchout%mean_root_resp(1:inc) = pack(patchin%mean_root_resp,mask) - patchout%mean_growth_resp(1:inc) = pack(patchin%mean_growth_resp,mask) - patchout%mean_storage_resp(1:inc)= pack(patchin%mean_storage_resp,mask) - patchout%mean_vleaf_resp(1:inc) = pack(patchin%mean_vleaf_resp,mask) - patchout%today_leaf_resp(1:inc) = pack(patchin%today_leaf_resp,mask) - patchout%today_root_resp(1:inc) = pack(patchin%today_root_resp,mask) - patchout%today_gpp(1:inc) = pack(patchin%today_gpp,mask) - patchout%today_nppleaf(1:inc) = pack(patchin%today_nppleaf,mask) - patchout%today_nppfroot(1:inc) = pack(patchin%today_nppfroot,mask) - patchout%today_nppsapwood(1:inc) = pack(patchin%today_nppsapwood,mask) - patchout%today_nppcroot(1:inc) = pack(patchin%today_nppcroot,mask) - patchout%today_nppseeds(1:inc) = pack(patchin%today_nppseeds,mask) - patchout%today_nppwood(1:inc) = pack(patchin%today_nppwood,mask) - patchout%today_nppdaily(1:inc) = pack(patchin%today_nppdaily,mask) - patchout%today_gpp_pot(1:inc) = pack(patchin%today_gpp_pot,mask) - patchout%today_gpp_lightmax(1:inc) = pack(patchin%today_gpp_lightmax,mask) - patchout%today_gpp_moistmax(1:inc) = pack(patchin%today_gpp_moistmax,mask) - patchout%growth_respiration(1:inc) = pack(patchin%growth_respiration,mask) - patchout%storage_respiration(1:inc) = pack(patchin%storage_respiration,mask) - patchout%vleaf_respiration(1:inc) = pack(patchin%vleaf_respiration,mask) - patchout%fsn(1:inc) = pack(patchin%fsn,mask) - patchout%monthly_dndt(1:inc) = pack(patchin%monthly_dndt,mask) - patchout%monthly_dlnndt(1:inc) = pack(patchin%monthly_dlnndt,mask) - - patchout%Psi_open(1:inc) = pack(patchin%Psi_open,mask) - patchout%krdepth(1:inc) = pack(patchin%krdepth,mask) - patchout%first_census(1:inc) = pack(patchin%first_census,mask) - patchout%new_recruit_flag(1:inc) = pack(patchin%new_recruit_flag,mask) - patchout%light_level(1:inc) = pack(patchin%light_level,mask) - patchout%light_level_beam(1:inc) = pack(patchin%light_level_beam,mask) - patchout%light_level_diff(1:inc) = pack(patchin%light_level_diff,mask) - patchout%par_l(1:inc) = pack(patchin%par_l,mask) - patchout%par_l_beam(1:inc) = pack(patchin%par_l_beam,mask) - patchout%par_l_diffuse(1:inc) = pack(patchin%par_l_diffuse,mask) - patchout%rshort_l(1:inc) = pack(patchin%rshort_l,mask) - patchout%rshort_l_beam(1:inc) = pack(patchin%rshort_l_beam,mask) - patchout%rshort_l_diffuse(1:inc) = pack(patchin%rshort_l_diffuse,mask) - patchout%rlong_l(1:inc) = pack(patchin%rlong_l,mask) - patchout%rlong_l_surf(1:inc) = pack(patchin%rlong_l_surf,mask) - patchout%rlong_l_incid(1:inc) = pack(patchin%rlong_l_incid,mask) - patchout%rshort_w(1:inc) = pack(patchin%rshort_w,mask) - patchout%rshort_w_beam(1:inc) = pack(patchin%rshort_w_beam,mask) - patchout%rshort_w_diffuse(1:inc) = pack(patchin%rshort_w_diffuse,mask) - patchout%rlong_w(1:inc) = pack(patchin%rlong_w,mask) - patchout%rlong_w_surf(1:inc) = pack(patchin%rlong_w_surf,mask) - patchout%rlong_w_incid(1:inc) = pack(patchin%rlong_w_incid,mask) - patchout%leaf_gbh(1:inc) = pack(patchin%leaf_gbh,mask) - patchout%leaf_gbw(1:inc) = pack(patchin%leaf_gbw,mask) - patchout%wood_gbh(1:inc) = pack(patchin%wood_gbh,mask) - patchout%wood_gbw(1:inc) = pack(patchin%wood_gbw,mask) - patchout%A_open(1:inc) = pack(patchin%A_open,mask) - patchout%A_closed(1:inc) = pack(patchin%A_closed,mask) - patchout%Psi_closed(1:inc) = pack(patchin%Psi_closed,mask) - patchout%gsw_open(1:inc) = pack(patchin%gsw_open,mask) - patchout%gsw_closed(1:inc) = pack(patchin%gsw_closed,mask) - patchout%fsw(1:inc) = pack(patchin%fsw,mask) - patchout%fs_open(1:inc) = pack(patchin%fs_open,mask) - patchout%water_supply(1:inc) = pack(patchin%water_supply,mask) - patchout%stomatal_conductance(1:inc) = pack(patchin%stomatal_conductance,mask) - patchout%leaf_maintenance(1:inc) = pack(patchin%leaf_maintenance,mask) - patchout%root_maintenance(1:inc) = pack(patchin%root_maintenance,mask) - patchout%leaf_drop(1:inc) = pack(patchin%leaf_drop,mask) - patchout%bseeds(1:inc) = pack(patchin%bseeds,mask) - patchout%leaf_respiration(1:inc) = pack(patchin%leaf_respiration,mask) - patchout%root_respiration(1:inc) = pack(patchin%root_respiration,mask) - patchout%gpp(1:inc) = pack(patchin%gpp,mask) - patchout%paw_avg(1:inc) = pack(patchin%paw_avg,mask) - patchout%elongf(1:inc) = pack(patchin%elongf,mask) - patchout%turnover_amp(1:inc) = pack(patchin%turnover_amp,mask) - patchout%llspan(1:inc) = pack(patchin%llspan,mask) - patchout%vm_bar(1:inc) = pack(patchin%vm_bar,mask) - patchout%sla(1:inc) = pack(patchin%sla,mask) - - - patchout%mean_par_l (1:inc) = pack(patchin%mean_par_l ,mask) - patchout%mean_par_l_beam (1:inc) = pack(patchin%mean_par_l_beam ,mask) - patchout%mean_par_l_diff (1:inc) = pack(patchin%mean_par_l_diff ,mask) - patchout%mean_rshort_l (1:inc) = pack(patchin%mean_rshort_l ,mask) - patchout%mean_rlong_l (1:inc) = pack(patchin%mean_rlong_l ,mask) - patchout%mean_sensible_lc (1:inc) = pack(patchin%mean_sensible_lc ,mask) - patchout%mean_vapor_lc (1:inc) = pack(patchin%mean_vapor_lc ,mask) - patchout%mean_transp (1:inc) = pack(patchin%mean_transp ,mask) - patchout%mean_intercepted_al (1:inc) = pack(patchin%mean_intercepted_al ,mask) - patchout%mean_wshed_lg (1:inc) = pack(patchin%mean_wshed_lg ,mask) - patchout%mean_rshort_w (1:inc) = pack(patchin%mean_rshort_w ,mask) - patchout%mean_rlong_w (1:inc) = pack(patchin%mean_rlong_w ,mask) - patchout%mean_sensible_wc (1:inc) = pack(patchin%mean_sensible_wc ,mask) - patchout%mean_vapor_wc (1:inc) = pack(patchin%mean_vapor_wc ,mask) - patchout%mean_intercepted_aw (1:inc) = pack(patchin%mean_intercepted_aw ,mask) - patchout%mean_wshed_wg (1:inc) = pack(patchin%mean_wshed_wg ,mask) - - - - - - do m=1,inc - k=incmask(m) - do i = 1,13 - patchout%cb (i,m) = patchin%cb (i,k) - patchout%cb_lightmax(i,m) = patchin%cb_lightmax(i,k) - patchout%cb_moistmax(i,m) = patchin%cb_moistmax(i,k) - end do - do i = 1,n_mort - patchout%mort_rate(i,m) = patchin%mort_rate(i,k) - end do - end do - - - - if (idoutput > 0 .or. imoutput > 0 .or. iqoutput > 0) then - patchout%dmean_fs_open (1:inc) = pack(patchin%dmean_fs_open ,mask) - patchout%dmean_fsw (1:inc) = pack(patchin%dmean_fsw ,mask) - patchout%dmean_fsn (1:inc) = pack(patchin%dmean_fsn ,mask) - patchout%dmean_psi_open (1:inc) = pack(patchin%dmean_psi_open ,mask) - patchout%dmean_psi_closed (1:inc) = pack(patchin%dmean_psi_closed ,mask) - patchout%dmean_water_supply (1:inc) = pack(patchin%dmean_water_supply ,mask) - patchout%dmean_light_level (1:inc) = pack(patchin%dmean_light_level ,mask) - patchout%dmean_light_level_beam(1:inc) = pack(patchin%dmean_light_level_beam,mask) - patchout%dmean_light_level_diff(1:inc) = pack(patchin%dmean_light_level_diff,mask) - patchout%dmean_gpp (1:inc) = pack(patchin%dmean_gpp ,mask) - patchout%dmean_nppleaf (1:inc) = pack(patchin%dmean_nppleaf ,mask) - patchout%dmean_nppfroot (1:inc) = pack(patchin%dmean_nppfroot ,mask) - patchout%dmean_nppsapwood (1:inc) = pack(patchin%dmean_nppsapwood ,mask) - patchout%dmean_nppcroot (1:inc) = pack(patchin%dmean_nppcroot ,mask) - patchout%dmean_nppseeds (1:inc) = pack(patchin%dmean_nppseeds ,mask) - patchout%dmean_nppwood (1:inc) = pack(patchin%dmean_nppwood ,mask) - patchout%dmean_nppdaily (1:inc) = pack(patchin%dmean_nppdaily ,mask) - patchout%dmean_leaf_resp (1:inc) = pack(patchin%dmean_leaf_resp ,mask) - patchout%dmean_root_resp (1:inc) = pack(patchin%dmean_root_resp ,mask) - patchout%dmean_par_l (1:inc) = pack(patchin%dmean_par_l ,mask) - patchout%dmean_par_l_beam (1:inc) = pack(patchin%dmean_par_l_beam ,mask) - patchout%dmean_par_l_diff (1:inc) = pack(patchin%dmean_par_l_diff ,mask) - patchout%dmean_rshort_l (1:inc) = pack(patchin%dmean_rshort_l ,mask) - patchout%dmean_rlong_l (1:inc) = pack(patchin%dmean_rlong_l ,mask) - patchout%dmean_sensible_lc (1:inc) = pack(patchin%dmean_sensible_lc ,mask) - patchout%dmean_vapor_lc (1:inc) = pack(patchin%dmean_vapor_lc ,mask) - patchout%dmean_transp (1:inc) = pack(patchin%dmean_transp ,mask) - patchout%dmean_intercepted_al (1:inc) = pack(patchin%dmean_intercepted_al ,mask) - patchout%dmean_wshed_lg (1:inc) = pack(patchin%dmean_wshed_lg ,mask) - patchout%dmean_rshort_w (1:inc) = pack(patchin%dmean_rshort_w ,mask) - patchout%dmean_rlong_w (1:inc) = pack(patchin%dmean_rlong_w ,mask) - patchout%dmean_sensible_wc (1:inc) = pack(patchin%dmean_sensible_wc ,mask) - patchout%dmean_vapor_wc (1:inc) = pack(patchin%dmean_vapor_wc ,mask) - patchout%dmean_intercepted_aw (1:inc) = pack(patchin%dmean_intercepted_aw ,mask) - patchout%dmean_wshed_wg (1:inc) = pack(patchin%dmean_wshed_wg ,mask) - end if - if (imoutput > 0 .or. iqoutput > 0) then - patchout%mmean_fs_open (1:inc) = pack(patchin%mmean_fs_open ,mask) - patchout%mmean_fsw (1:inc) = pack(patchin%mmean_fsw ,mask) - patchout%mmean_fsn (1:inc) = pack(patchin%mmean_fsn ,mask) - patchout%mmean_psi_open (1:inc) = pack(patchin%mmean_psi_open ,mask) - patchout%mmean_psi_closed (1:inc) = pack(patchin%mmean_psi_closed ,mask) - patchout%mmean_water_supply (1:inc) = pack(patchin%mmean_water_supply ,mask) - patchout%mmean_leaf_maintenance(1:inc) = pack(patchin%mmean_leaf_maintenance,mask) - patchout%mmean_root_maintenance(1:inc) = pack(patchin%mmean_root_maintenance,mask) - patchout%mmean_leaf_drop (1:inc) = pack(patchin%mmean_leaf_drop ,mask) - patchout%mmean_cb (1:inc) = pack(patchin%mmean_cb ,mask) - patchout%mmean_light_level (1:inc) = pack(patchin%mmean_light_level ,mask) - patchout%mmean_light_level_beam(1:inc) = pack(patchin%mmean_light_level_beam,mask) - patchout%mmean_light_level_diff(1:inc) = pack(patchin%mmean_light_level_diff,mask) - patchout%mmean_gpp (1:inc) = pack(patchin%mmean_gpp ,mask) - patchout%mmean_nppleaf (1:inc) = pack(patchin%mmean_nppleaf ,mask) - patchout%mmean_nppfroot (1:inc) = pack(patchin%mmean_nppfroot ,mask) - patchout%mmean_nppsapwood (1:inc) = pack(patchin%mmean_nppsapwood ,mask) - patchout%mmean_nppcroot (1:inc) = pack(patchin%mmean_nppcroot ,mask) - patchout%mmean_nppseeds (1:inc) = pack(patchin%mmean_nppseeds ,mask) - patchout%mmean_nppwood (1:inc) = pack(patchin%mmean_nppwood ,mask) - patchout%mmean_nppdaily (1:inc) = pack(patchin%mmean_nppdaily ,mask) - patchout%mmean_leaf_resp (1:inc) = pack(patchin%mmean_leaf_resp ,mask) - patchout%mmean_root_resp (1:inc) = pack(patchin%mmean_root_resp ,mask) - patchout%mmean_growth_resp (1:inc) = pack(patchin%mmean_growth_resp ,mask) - patchout%mmean_storage_resp (1:inc) = pack(patchin%mmean_storage_resp ,mask) - patchout%mmean_vleaf_resp (1:inc) = pack(patchin%mmean_vleaf_resp ,mask) - patchout%mmean_par_l (1:inc) = pack(patchin%mmean_par_l ,mask) - patchout%mmean_par_l_beam (1:inc) = pack(patchin%mmean_par_l_beam ,mask) - patchout%mmean_par_l_diff (1:inc) = pack(patchin%mmean_par_l_diff ,mask) - patchout%mmean_rshort_l (1:inc) = pack(patchin%mmean_rshort_l ,mask) - patchout%mmean_rlong_l (1:inc) = pack(patchin%mmean_rlong_l ,mask) - patchout%mmean_sensible_lc (1:inc) = pack(patchin%mmean_sensible_lc ,mask) - patchout%mmean_vapor_lc (1:inc) = pack(patchin%mmean_vapor_lc ,mask) - patchout%mmean_transp (1:inc) = pack(patchin%mmean_transp ,mask) - patchout%mmean_intercepted_al (1:inc) = pack(patchin%mmean_intercepted_al ,mask) - patchout%mmean_wshed_lg (1:inc) = pack(patchin%mmean_wshed_lg ,mask) - patchout%mmean_rshort_w (1:inc) = pack(patchin%mmean_rshort_w ,mask) - patchout%mmean_rlong_w (1:inc) = pack(patchin%mmean_rlong_w ,mask) - patchout%mmean_sensible_wc (1:inc) = pack(patchin%mmean_sensible_wc ,mask) - patchout%mmean_vapor_wc (1:inc) = pack(patchin%mmean_vapor_wc ,mask) - patchout%mmean_intercepted_aw (1:inc) = pack(patchin%mmean_intercepted_aw ,mask) - patchout%mmean_wshed_wg (1:inc) = pack(patchin%mmean_wshed_wg ,mask) - - do m=1,inc - k=incmask(m) - do i = 1,n_mort - patchout%mmean_mort_rate(i,m) = patchin%mmean_mort_rate(i,k) - end do - end do - end if - - if (iqoutput > 0) then - do m=1,ndcycle - patchout%qmean_par_l (m,1:inc) = pack(patchin%qmean_par_l (m,:),mask) - patchout%qmean_par_l_beam (m,1:inc) = pack(patchin%qmean_par_l_beam (m,:),mask) - patchout%qmean_par_l_diff (m,1:inc) = pack(patchin%qmean_par_l_diff (m,:),mask) - patchout%qmean_fs_open (m,1:inc) = pack(patchin%qmean_fs_open (m,:),mask) - patchout%qmean_fsw (m,1:inc) = pack(patchin%qmean_fsw (m,:),mask) - patchout%qmean_fsn (m,1:inc) = pack(patchin%qmean_fsn (m,:),mask) - patchout%qmean_psi_open (m,1:inc) = pack(patchin%qmean_psi_open (m,:),mask) - patchout%qmean_psi_closed (m,1:inc) = pack(patchin%qmean_psi_closed (m,:),mask) - patchout%qmean_water_supply (m,1:inc) = pack(patchin%qmean_water_supply (m,:),mask) - patchout%qmean_gpp (m,1:inc) = pack(patchin%qmean_gpp (m,:),mask) - patchout%qmean_leaf_resp (m,1:inc) = pack(patchin%qmean_leaf_resp (m,:),mask) - patchout%qmean_root_resp (m,1:inc) = pack(patchin%qmean_root_resp (m,:),mask) - patchout%qmean_rshort_l (m,1:inc) = pack(patchin%qmean_rshort_l (m,:),mask) - patchout%qmean_rlong_l (m,1:inc) = pack(patchin%qmean_rlong_l (m,:),mask) - patchout%qmean_sensible_lc (m,1:inc) = pack(patchin%qmean_sensible_lc (m,:),mask) - patchout%qmean_vapor_lc (m,1:inc) = pack(patchin%qmean_vapor_lc (m,:),mask) - patchout%qmean_transp (m,1:inc) = pack(patchin%qmean_transp (m,:),mask) - patchout%qmean_intercepted_al(m,1:inc) = pack(patchin%qmean_intercepted_al(m,:),mask) - patchout%qmean_wshed_lg (m,1:inc) = pack(patchin%qmean_wshed_lg (m,:),mask) - patchout%qmean_rshort_w (m,1:inc) = pack(patchin%qmean_rshort_w (m,:),mask) - patchout%qmean_rlong_w (m,1:inc) = pack(patchin%qmean_rlong_w (m,:),mask) - patchout%qmean_sensible_wc (m,1:inc) = pack(patchin%qmean_sensible_wc (m,:),mask) - patchout%qmean_vapor_wc (m,1:inc) = pack(patchin%qmean_vapor_wc (m,:),mask) - patchout%qmean_intercepted_aw(m,1:inc) = pack(patchin%qmean_intercepted_aw(m,:),mask) - patchout%qmean_wshed_wg (m,1:inc) = pack(patchin%qmean_wshed_wg (m,:),mask) - end do - end if - return - end subroutine copy_patchtype_mask -!============================================================================! -!============================================================================! - - - - - -!============================================================================! -!============================================================================! - subroutine copy_patchtype(patchin,patchout,ipin1,ipin2,ipout1,ipout2) - - implicit none - integer :: ipin1,ipin2,ipout1,ipout2 - type(patchtype),target :: patchin,patchout - integer :: iout,iin - - if (ipout2-ipout1.ne.ipin2-ipin1) then - print*,"In copy_patchtype:" - print*,"You specified unequal vector lengths" - print*,"in the input and output targets" - print*,"This cannot be..stopping" - call fatal_error('unequal vector lengths','copy_patchtype','ed_state_vars.f90') - end if - - ! Copy the stoma data. Added the loop back here because sometimes ipin1 < ipin2 - ! for example, when ncohorts=0 - - iin = ipin1 - do iout=ipout1,ipout2 - - patchout%pft(iout) = patchin%pft(iin) - patchout%nplant(iout) = patchin%nplant(iin) - patchout%hite(iout) = patchin%hite(iin) - patchout%agb(iout) = patchin%agb(iin) - patchout%basarea(iout) = patchin%basarea(iin) - patchout%dagb_dt(iout) = patchin%dagb_dt(iin) - patchout%dlnagb_dt(iout) = patchin%dlnagb_dt(iin) - patchout%dba_dt(iout) = patchin%dba_dt(iin) - patchout%dlnba_dt(iout) = patchin%dlnba_dt(iin) - patchout%ddbh_dt(iout) = patchin%ddbh_dt(iin) - patchout%dlndbh_dt(iout) = patchin%dlndbh_dt(iin) - patchout%dbh(iout) = patchin%dbh(iin) - patchout%bdead(iout) = patchin%bdead(iin) - patchout%bleaf(iout) = patchin%bleaf(iin) - patchout%phenology_status(iout) = patchin%phenology_status(iin) - patchout%recruit_dbh(iout) = patchin%recruit_dbh(iin) - patchout%census_status(iout) = patchin%census_status(iin) - patchout%balive(iout) = patchin%balive(iin) - patchout%broot(iout) = patchin%broot(iin) - patchout%bsapwooda(iout) = patchin%bsapwooda(iin) - patchout%bsapwoodb(iout) = patchin%bsapwoodb(iin) - patchout%lai(iout) = patchin%lai(iin) - patchout%wai(iout) = patchin%wai(iin) - patchout%crown_area(iout) = patchin%crown_area(iin) - patchout%leaf_resolvable(iout) = patchin%leaf_resolvable(iin) - patchout%wood_resolvable(iout) = patchin%wood_resolvable(iin) - patchout%bstorage(iout) = patchin%bstorage(iin) - patchout%cb(:,iout) = patchin%cb(:,iin) - patchout%cb_lightmax(:,iout) = patchin%cb_lightmax(:,iin) - patchout%cb_moistmax(:,iout) = patchin%cb_moistmax(:,iin) - patchout%cbr_bar(iout) = patchin%cbr_bar(iin) - patchout%leaf_energy(iout) = patchin%leaf_energy(iin) - patchout%leaf_hcap(iout) = patchin%leaf_hcap(iin) - patchout%leaf_temp(iout) = patchin%leaf_temp(iin) - patchout%leaf_vpdef(iout) = patchin%leaf_vpdef(iin) - patchout%leaf_temp_pv(iout) = patchin%leaf_temp_pv(iin) - patchout%leaf_fliq(iout) = patchin%leaf_fliq(iin) - patchout%leaf_water(iout) = patchin%leaf_water(iin) - patchout%wood_energy(iout) = patchin%wood_energy(iin) - patchout%wood_hcap(iout) = patchin%wood_hcap(iin) - patchout%wood_temp(iout) = patchin%wood_temp(iin) - patchout%wood_temp_pv(iout) = patchin%wood_temp_pv(iin) - patchout%wood_fliq(iout) = patchin%wood_fliq(iin) - patchout%wood_water(iout) = patchin%wood_water(iin) - patchout%veg_wind(iout) = patchin%veg_wind(iin) - patchout%lsfc_shv_open(iout) = patchin%lsfc_shv_open(iin) - patchout%lsfc_shv_closed(iout) = patchin%lsfc_shv_closed(iin) - patchout%lsfc_co2_open(iout) = patchin%lsfc_co2_open(iin) - patchout%lsfc_co2_closed(iout) = patchin%lsfc_co2_closed(iin) - patchout%lint_shv(iout) = patchin%lint_shv(iin) - patchout%lint_co2_open(iout) = patchin%lint_co2_open(iin) - patchout%lint_co2_closed(iout) = patchin%lint_co2_closed(iin) - patchout%mean_gpp(iout) = patchin%mean_gpp(iin) - patchout%mean_leaf_resp(iout) = patchin%mean_leaf_resp(iin) - patchout%mean_root_resp(iout) = patchin%mean_root_resp(iin) - patchout%mean_growth_resp(iout) = patchin%mean_growth_resp(iin) - patchout%mean_storage_resp(iout)= patchin%mean_storage_resp(iin) - patchout%mean_vleaf_resp(iout) = patchin%mean_vleaf_resp(iin) - patchout%today_leaf_resp(iout) = patchin%today_leaf_resp(iin) - patchout%today_root_resp(iout) = patchin%today_root_resp(iin) - patchout%today_gpp(iout) = patchin%today_gpp(iin) - patchout%today_nppleaf(iout) = patchin%today_nppleaf(iin) - patchout%today_nppfroot(iout) = patchin%today_nppfroot(iin) - patchout%today_nppsapwood(iout) = patchin%today_nppsapwood(iin) - patchout%today_nppcroot(iout) = patchin%today_nppcroot(iin) - patchout%today_nppseeds(iout) = patchin%today_nppseeds(iin) - patchout%today_nppwood(iout) = patchin%today_nppwood(iin) - patchout%today_nppdaily(iout) = patchin%today_nppdaily(iin) - patchout%today_gpp_pot(iout) = patchin%today_gpp_pot(iin) - patchout%today_gpp_lightmax(iout) = patchin%today_gpp_lightmax(iin) - patchout%today_gpp_moistmax(iout) = patchin%today_gpp_moistmax(iin) - patchout%growth_respiration(iout) = patchin%growth_respiration(iin) - patchout%storage_respiration(iout) = patchin%storage_respiration(iin) - patchout%vleaf_respiration(iout) = patchin%vleaf_respiration(iin) - patchout%fsn(iout) = patchin%fsn(iin) - patchout%monthly_dndt(iout) = patchin%monthly_dndt(iin) - patchout%monthly_dlnndt(iout) = patchin%monthly_dlnndt(iin) - patchout%mort_rate(:,iout) = patchin%mort_rate(:,iin) - - patchout%Psi_open(iout) = patchin%Psi_open(iin) - patchout%krdepth(iout) = patchin%krdepth(iin) - patchout%first_census(iout) = patchin%first_census(iin) - patchout%new_recruit_flag(iout) = patchin%new_recruit_flag(iin) - patchout%light_level(iout) = patchin%light_level(iin) - patchout%light_level_beam(iout) = patchin%light_level_beam(iin) - patchout%light_level_diff(iout) = patchin%light_level_diff(iin) - patchout%par_l(iout) = patchin%par_l(iin) - patchout%par_l_beam(iout) = patchin%par_l_beam(iin) - patchout%par_l_diffuse(iout) = patchin%par_l_diffuse(iin) - patchout%rshort_l(iout) = patchin%rshort_l(iin) - patchout%rshort_l_beam(iout) = patchin%rshort_l_beam(iin) - patchout%rshort_l_diffuse(iout) = patchin%rshort_l_diffuse(iin) - patchout%rlong_l(iout) = patchin%rlong_l(iin) - patchout%rlong_l_surf(iout) = patchin%rlong_l_surf(iin) - patchout%rlong_l_incid(iout) = patchin%rlong_l_incid(iin) - patchout%rshort_w(iout) = patchin%rshort_w(iin) - patchout%rshort_w_beam(iout) = patchin%rshort_w_beam(iin) - patchout%rshort_w_diffuse(iout) = patchin%rshort_w_diffuse(iin) - patchout%rlong_w(iout) = patchin%rlong_w(iin) - patchout%rlong_w_surf(iout) = patchin%rlong_w_surf(iin) - patchout%rlong_w_incid(iout) = patchin%rlong_w_incid(iin) - patchout%leaf_gbh(iout) = patchin%leaf_gbh(iin) - patchout%leaf_gbw(iout) = patchin%leaf_gbw(iin) - patchout%wood_gbh(iout) = patchin%wood_gbh(iin) - patchout%wood_gbw(iout) = patchin%wood_gbw(iin) - patchout%A_open(iout) = patchin%A_open(iin) - patchout%A_closed(iout) = patchin%A_closed(iin) - patchout%Psi_closed(iout) = patchin%Psi_closed(iin) - patchout%gsw_open(iout) = patchin%gsw_open(iin) - patchout%gsw_closed(iout) = patchin%gsw_closed(iin) - patchout%fsw(iout) = patchin%fsw(iin) - patchout%fs_open(iout) = patchin%fs_open(iin) - patchout%water_supply(iout) = patchin%water_supply(iin) - patchout%stomatal_conductance(iout) = patchin%stomatal_conductance(iin) - patchout%leaf_maintenance(iout) = patchin%leaf_maintenance(iin) - patchout%root_maintenance(iout) = patchin%root_maintenance(iin) - patchout%leaf_drop(iout) = patchin%leaf_drop(iin) - patchout%bseeds(iout) = patchin%bseeds(iin) - patchout%leaf_respiration(iout) = patchin%leaf_respiration(iin) - patchout%root_respiration(iout) = patchin%root_respiration(iin) - patchout%gpp(iout) = patchin%gpp(iin) - patchout%paw_avg(iout) = patchin%paw_avg(iin) - patchout%elongf(iout) = patchin%elongf(iin) - patchout%turnover_amp(iout) = patchin%turnover_amp(iin) - patchout%llspan(iout) = patchin%llspan(iin) - patchout%vm_bar(iout) = patchin%vm_bar(iin) - patchout%sla(iout) = patchin%sla(iin) - - patchout%mean_par_l (iout) = patchin%mean_par_l (iin) - patchout%mean_par_l_beam (iout) = patchin%mean_par_l_beam (iin) - patchout%mean_par_l_diff (iout) = patchin%mean_par_l_diff (iin) - - patchout%mean_rshort_l (iout) = patchin%mean_rshort_l (iin) - patchout%mean_rlong_l (iout) = patchin%mean_rlong_l (iin) - patchout%mean_sensible_lc (iout) = patchin%mean_sensible_lc (iin) - patchout%mean_vapor_lc (iout) = patchin%mean_vapor_lc (iin) - patchout%mean_transp (iout) = patchin%mean_transp (iin) - patchout%mean_intercepted_al (iout) = patchin%mean_intercepted_al (iin) - patchout%mean_wshed_lg (iout) = patchin%mean_wshed_lg (iin) - patchout%mean_rshort_w (iout) = patchin%mean_rshort_w (iin) - patchout%mean_rlong_w (iout) = patchin%mean_rlong_w (iin) - patchout%mean_sensible_wc (iout) = patchin%mean_sensible_wc (iin) - patchout%mean_vapor_wc (iout) = patchin%mean_vapor_wc (iin) - patchout%mean_intercepted_aw (iout) = patchin%mean_intercepted_aw (iin) - patchout%mean_wshed_wg (iout) = patchin%mean_wshed_wg (iin) - - - if (imoutput > 0 .or. idoutput > 0 .or. iqoutput > 0) then - patchout%dmean_fs_open (iout) = patchin%dmean_fs_open (iin) - patchout%dmean_fsw (iout) = patchin%dmean_fsw (iin) - patchout%dmean_fsn (iout) = patchin%dmean_fsn (iin) - patchout%dmean_psi_open (iout) = patchin%dmean_psi_open (iin) - patchout%dmean_psi_closed (iout) = patchin%dmean_psi_closed (iin) - patchout%dmean_water_supply (iout) = patchin%dmean_water_supply (iin) - patchout%dmean_light_level (iout) = patchin%dmean_light_level (iin) - patchout%dmean_light_level_beam (iout) = patchin%dmean_light_level_beam (iin) - patchout%dmean_light_level_diff (iout) = patchin%dmean_light_level_diff (iin) - patchout%dmean_gpp (iout) = patchin%dmean_gpp (iin) - patchout%dmean_nppleaf (iout) = patchin%dmean_nppleaf (iin) - patchout%dmean_nppfroot (iout) = patchin%dmean_nppfroot (iin) - patchout%dmean_nppsapwood (iout) = patchin%dmean_nppsapwood (iin) - patchout%dmean_nppcroot (iout) = patchin%dmean_nppcroot (iin) - patchout%dmean_nppseeds (iout) = patchin%dmean_nppseeds (iin) - patchout%dmean_nppwood (iout) = patchin%dmean_nppwood (iin) - patchout%dmean_nppdaily (iout) = patchin%dmean_nppdaily (iin) - patchout%dmean_leaf_resp (iout) = patchin%dmean_leaf_resp (iin) - patchout%dmean_root_resp (iout) = patchin%dmean_root_resp (iin) - patchout%dmean_par_l (iout) = patchin%dmean_par_l (iin) - patchout%dmean_par_l_beam (iout) = patchin%dmean_par_l_beam (iin) - patchout%dmean_par_l_diff (iout) = patchin%dmean_par_l_diff (iin) - patchout%dmean_rshort_l (iout) = patchin%dmean_rshort_l (iin) - patchout%dmean_rlong_l (iout) = patchin%dmean_rlong_l (iin) - patchout%dmean_sensible_lc (iout) = patchin%dmean_sensible_lc (iin) - patchout%dmean_vapor_lc (iout) = patchin%dmean_vapor_lc (iin) - patchout%dmean_transp (iout) = patchin%dmean_transp (iin) - patchout%dmean_intercepted_al (iout) = patchin%dmean_intercepted_al (iin) - patchout%dmean_wshed_lg (iout) = patchin%dmean_wshed_lg (iin) - patchout%dmean_rshort_w (iout) = patchin%dmean_rshort_w (iin) - patchout%dmean_rlong_w (iout) = patchin%dmean_rlong_w (iin) - patchout%dmean_sensible_wc (iout) = patchin%dmean_sensible_wc (iin) - patchout%dmean_vapor_wc (iout) = patchin%dmean_vapor_wc (iin) - patchout%dmean_intercepted_aw (iout) = patchin%dmean_intercepted_aw (iin) - patchout%dmean_wshed_wg (iout) = patchin%dmean_wshed_wg (iin) - end if - if (imoutput > 0 .or. iqoutput > 0) then - patchout%mmean_fs_open (iout) = patchin%mmean_fs_open (iin) - patchout%mmean_fsw (iout) = patchin%mmean_fsw (iin) - patchout%mmean_fsn (iout) = patchin%mmean_fsn (iin) - patchout%mmean_psi_open (iout) = patchin%mmean_psi_open (iin) - patchout%mmean_psi_closed (iout) = patchin%mmean_psi_closed (iin) - patchout%mmean_water_supply (iout) = patchin%mmean_water_supply (iin) - patchout%mmean_leaf_maintenance (iout) = patchin%mmean_leaf_maintenance (iin) - patchout%mmean_root_maintenance (iout) = patchin%mmean_root_maintenance (iin) - patchout%mmean_leaf_drop (iout) = patchin%mmean_leaf_drop (iin) - patchout%mmean_cb (iout) = patchin%mmean_cb (iin) - patchout%mmean_light_level (iout) = patchin%mmean_light_level (iin) - patchout%mmean_light_level_beam (iout) = patchin%mmean_light_level_beam (iin) - patchout%mmean_light_level_diff (iout) = patchin%mmean_light_level_diff (iin) - patchout%mmean_gpp (iout) = patchin%mmean_gpp (iin) - patchout%mmean_nppleaf (iout) = patchin%mmean_nppleaf (iin) - patchout%mmean_nppfroot (iout) = patchin%mmean_nppfroot (iin) - patchout%mmean_nppsapwood (iout) = patchin%mmean_nppsapwood (iin) - patchout%mmean_nppcroot (iout) = patchin%mmean_nppcroot (iin) - patchout%mmean_nppseeds (iout) = patchin%mmean_nppseeds (iin) - patchout%mmean_nppwood (iout) = patchin%mmean_nppwood (iin) - patchout%mmean_nppdaily (iout) = patchin%mmean_nppdaily (iin) - patchout%mmean_leaf_resp (iout) = patchin%mmean_leaf_resp (iin) - patchout%mmean_root_resp (iout) = patchin%mmean_root_resp (iin) - patchout%mmean_growth_resp (iout) = patchin%mmean_growth_resp (iin) - patchout%mmean_storage_resp (iout) = patchin%mmean_storage_resp (iin) - patchout%mmean_vleaf_resp (iout) = patchin%mmean_vleaf_resp (iin) - patchout%mmean_mort_rate (:,iout) = patchin%mmean_mort_rate (:,iin) - patchout%mmean_par_l (iout) = patchin%mmean_par_l (iin) - patchout%mmean_par_l_beam (iout) = patchin%mmean_par_l_beam (iin) - patchout%mmean_par_l_diff (iout) = patchin%mmean_par_l_diff (iin) - patchout%mmean_rshort_l (iout) = patchin%mmean_rshort_l (iin) - patchout%mmean_rlong_l (iout) = patchin%mmean_rlong_l (iin) - patchout%mmean_sensible_lc (iout) = patchin%mmean_sensible_lc (iin) - patchout%mmean_vapor_lc (iout) = patchin%mmean_vapor_lc (iin) - patchout%mmean_transp (iout) = patchin%mmean_transp (iin) - patchout%mmean_intercepted_al (iout) = patchin%mmean_intercepted_al (iin) - patchout%mmean_wshed_lg (iout) = patchin%mmean_wshed_lg (iin) - patchout%mmean_rshort_w (iout) = patchin%mmean_rshort_w (iin) - patchout%mmean_rlong_w (iout) = patchin%mmean_rlong_w (iin) - patchout%mmean_sensible_wc (iout) = patchin%mmean_sensible_wc (iin) - patchout%mmean_vapor_wc (iout) = patchin%mmean_vapor_wc (iin) - patchout%mmean_intercepted_aw (iout) = patchin%mmean_intercepted_aw (iin) - patchout%mmean_wshed_wg (iout) = patchin%mmean_wshed_wg (iin) - end if - - if (iqoutput > 0) then - patchout%qmean_par_l (:,iout) = patchin%qmean_par_l (:,iin) - patchout%qmean_par_l_beam (:,iout) = patchin%qmean_par_l_beam (:,iin) - patchout%qmean_par_l_diff (:,iout) = patchin%qmean_par_l_diff (:,iin) - patchout%qmean_fs_open (:,iout) = patchin%qmean_fs_open (:,iin) - patchout%qmean_fsw (:,iout) = patchin%qmean_fsw (:,iin) - patchout%qmean_fsn (:,iout) = patchin%qmean_fsn (:,iin) - patchout%qmean_psi_open (:,iout) = patchin%qmean_psi_open (:,iin) - patchout%qmean_psi_closed (:,iout) = patchin%qmean_psi_closed (:,iin) - patchout%qmean_water_supply (:,iout) = patchin%qmean_water_supply (:,iin) - patchout%qmean_gpp (:,iout) = patchin%qmean_gpp (:,iin) - patchout%qmean_leaf_resp (:,iout) = patchin%qmean_leaf_resp (:,iin) - patchout%qmean_root_resp (:,iout) = patchin%qmean_root_resp (:,iin) - patchout%qmean_rshort_l (:,iout) = patchin%qmean_rshort_l (:,iin) - patchout%qmean_rlong_l (:,iout) = patchin%qmean_rlong_l (:,iin) - patchout%qmean_sensible_lc (:,iout) = patchin%qmean_sensible_lc (:,iin) - patchout%qmean_vapor_lc (:,iout) = patchin%qmean_vapor_lc (:,iin) - patchout%qmean_transp (:,iout) = patchin%qmean_transp (:,iin) - patchout%qmean_intercepted_al (:,iout) = patchin%qmean_intercepted_al (:,iin) - patchout%qmean_wshed_lg (:,iout) = patchin%qmean_wshed_lg (:,iin) - patchout%qmean_rshort_w (:,iout) = patchin%qmean_rshort_w (:,iin) - patchout%qmean_rlong_w (:,iout) = patchin%qmean_rlong_w (:,iin) - patchout%qmean_sensible_wc (:,iout) = patchin%qmean_sensible_wc (:,iin) - patchout%qmean_vapor_wc (:,iout) = patchin%qmean_vapor_wc (:,iin) - patchout%qmean_intercepted_aw (:,iout) = patchin%qmean_intercepted_aw (:,iin) - patchout%qmean_wshed_wg (:,iout) = patchin%qmean_wshed_wg (:,iin) - end if - - iin = iin + 1 - - end do - - return - end subroutine copy_patchtype -!============================================================================! -!============================================================================! - - - - - - !=======================================================================================! - !=======================================================================================! - ! This subroutine duplicates a cohort. Because this must be updated whenever any ! - ! variable is added/removed, we moved it to here (it used to be in fuse_fiss_utils.f90) ! - !---------------------------------------------------------------------------------------! - subroutine clone_cohort(cpatch,donc,recc) - implicit none - !------ Arguments. ------------------------------------------------------------------! - type(patchtype), target :: cpatch - integer , intent(in) :: donc - integer , intent(in) :: recc - !------------------------------------------------------------------------------------! - - cpatch%pft (recc) = cpatch%pft (donc) - cpatch%nplant (recc) = cpatch%nplant (donc) - cpatch%hite (recc) = cpatch%hite (donc) - cpatch%agb (recc) = cpatch%agb (donc) - cpatch%basarea (recc) = cpatch%basarea (donc) - cpatch%dagb_dt (recc) = cpatch%dagb_dt (donc) - cpatch%dlnagb_dt (recc) = cpatch%dlnagb_dt (donc) - cpatch%dba_dt (recc) = cpatch%dba_dt (donc) - cpatch%dlnba_dt (recc) = cpatch%dlnba_dt (donc) - cpatch%ddbh_dt (recc) = cpatch%ddbh_dt (donc) - cpatch%dlndbh_dt (recc) = cpatch%dlndbh_dt (donc) - cpatch%dbh (recc) = cpatch%dbh (donc) - cpatch%bdead (recc) = cpatch%bdead (donc) - cpatch%bleaf (recc) = cpatch%bleaf (donc) - cpatch%phenology_status (recc) = cpatch%phenology_status (donc) - cpatch%recruit_dbh (recc) = cpatch%recruit_dbh (donc) - cpatch%census_status (recc) = cpatch%census_status (donc) - cpatch%balive (recc) = cpatch%balive (donc) - cpatch%broot (recc) = cpatch%broot (donc) - cpatch%bsapwooda (recc) = cpatch%bsapwooda (donc) - cpatch%bsapwoodb (recc) = cpatch%bsapwoodb (donc) - cpatch%lai (recc) = cpatch%lai (donc) - cpatch%wai (recc) = cpatch%wai (donc) - cpatch%crown_area (recc) = cpatch%crown_area (donc) - cpatch%leaf_resolvable (recc) = cpatch%leaf_resolvable (donc) - cpatch%wood_resolvable (recc) = cpatch%wood_resolvable (donc) - cpatch%bstorage (recc) = cpatch%bstorage (donc) - cpatch%cb (:,recc) = cpatch%cb (:,donc) - cpatch%cb_lightmax (:,recc) = cpatch%cb_lightmax (:,donc) - cpatch%cb_moistmax (:,recc) = cpatch%cb_moistmax (:,donc) - cpatch%cbr_bar (recc) = cpatch%cbr_bar (donc) - cpatch%leaf_energy (recc) = cpatch%leaf_energy (donc) - cpatch%leaf_hcap (recc) = cpatch%leaf_hcap (donc) - cpatch%leaf_temp (recc) = cpatch%leaf_temp (donc) - cpatch%leaf_vpdef (recc) = cpatch%leaf_vpdef (donc) - cpatch%leaf_temp_pv (recc) = cpatch%leaf_temp_pv (donc) - cpatch%leaf_fliq (recc) = cpatch%leaf_fliq (donc) - cpatch%leaf_water (recc) = cpatch%leaf_water (donc) - cpatch%wood_energy (recc) = cpatch%wood_energy (donc) - cpatch%wood_hcap (recc) = cpatch%wood_hcap (donc) - cpatch%wood_temp (recc) = cpatch%wood_temp (donc) - cpatch%wood_temp_pv (recc) = cpatch%wood_temp_pv (donc) - cpatch%wood_fliq (recc) = cpatch%wood_fliq (donc) - cpatch%wood_water (recc) = cpatch%wood_water (donc) - cpatch%veg_wind (recc) = cpatch%veg_wind (donc) - cpatch%lsfc_shv_open (recc) = cpatch%lsfc_shv_open (donc) - cpatch%lsfc_shv_closed (recc) = cpatch%lsfc_shv_closed (donc) - cpatch%lsfc_co2_open (recc) = cpatch%lsfc_co2_open (donc) - cpatch%lsfc_co2_closed (recc) = cpatch%lsfc_co2_closed (donc) - cpatch%lint_shv (recc) = cpatch%lint_shv (donc) - cpatch%lint_co2_open (recc) = cpatch%lint_co2_open (donc) - cpatch%lint_co2_closed (recc) = cpatch%lint_co2_closed (donc) - cpatch%mean_gpp (recc) = cpatch%mean_gpp (donc) - cpatch%mean_leaf_resp (recc) = cpatch%mean_leaf_resp (donc) - cpatch%mean_root_resp (recc) = cpatch%mean_root_resp (donc) - cpatch%mean_growth_resp (recc) = cpatch%mean_growth_resp (donc) - cpatch%mean_storage_resp (recc) = cpatch%mean_storage_resp (donc) - cpatch%mean_vleaf_resp (recc) = cpatch%mean_vleaf_resp (donc) - cpatch%today_leaf_resp (recc) = cpatch%today_leaf_resp (donc) - cpatch%today_root_resp (recc) = cpatch%today_root_resp (donc) - cpatch%today_gpp (recc) = cpatch%today_gpp (donc) - cpatch%today_nppleaf (recc) = cpatch%today_nppleaf (donc) - cpatch%today_nppfroot (recc) = cpatch%today_nppfroot (donc) - cpatch%today_nppsapwood (recc) = cpatch%today_nppsapwood (donc) - cpatch%today_nppcroot (recc) = cpatch%today_nppcroot (donc) - cpatch%today_nppseeds (recc) = cpatch%today_nppseeds (donc) - cpatch%today_nppwood (recc) = cpatch%today_nppwood (donc) - cpatch%today_nppdaily (recc) = cpatch%today_nppdaily (donc) - cpatch%today_gpp_pot (recc) = cpatch%today_gpp_pot (donc) - cpatch%today_gpp_lightmax (recc) = cpatch%today_gpp_lightmax (donc) - cpatch%today_gpp_moistmax (recc) = cpatch%today_gpp_moistmax (donc) - cpatch%growth_respiration (recc) = cpatch%growth_respiration (donc) - cpatch%storage_respiration (recc) = cpatch%storage_respiration (donc) - cpatch%vleaf_respiration (recc) = cpatch%vleaf_respiration (donc) - cpatch%fsn (recc) = cpatch%fsn (donc) - cpatch%monthly_dndt (recc) = cpatch%monthly_dndt (donc) - cpatch%monthly_dlnndt (recc) = cpatch%monthly_dlnndt (donc) - cpatch%mort_rate (:,recc) = cpatch%mort_rate (:,donc) - - cpatch%Psi_open (recc) = cpatch%Psi_open (donc) - cpatch%krdepth (recc) = cpatch%krdepth (donc) - cpatch%first_census (recc) = cpatch%first_census (donc) - cpatch%new_recruit_flag (recc) = cpatch%new_recruit_flag (donc) - cpatch%light_level (recc) = cpatch%light_level (donc) - cpatch%light_level_beam (recc) = cpatch%light_level_beam (donc) - cpatch%light_level_diff (recc) = cpatch%light_level_diff (donc) - cpatch%par_l (recc) = cpatch%par_l (donc) - cpatch%par_l_beam (recc) = cpatch%par_l_beam (donc) - cpatch%par_l_diffuse (recc) = cpatch%par_l_diffuse (donc) - cpatch%rshort_l (recc) = cpatch%rshort_l (donc) - cpatch%rshort_l_beam (recc) = cpatch%rshort_l_beam (donc) - cpatch%rshort_l_diffuse (recc) = cpatch%rshort_l_diffuse (donc) - cpatch%rlong_l (recc) = cpatch%rlong_l (donc) - cpatch%rlong_l_surf (recc) = cpatch%rlong_l_surf (donc) - cpatch%rlong_l_incid (recc) = cpatch%rlong_l_incid (donc) - cpatch%rshort_w (recc) = cpatch%rshort_w (donc) - cpatch%rshort_w_beam (recc) = cpatch%rshort_w_beam (donc) - cpatch%rshort_w_diffuse (recc) = cpatch%rshort_w_diffuse (donc) - cpatch%rlong_w (recc) = cpatch%rlong_w (donc) - cpatch%rlong_w_surf (recc) = cpatch%rlong_w_surf (donc) - cpatch%rlong_w_incid (recc) = cpatch%rlong_w_incid (donc) - cpatch%leaf_gbh (recc) = cpatch%leaf_gbh (donc) - cpatch%leaf_gbw (recc) = cpatch%leaf_gbw (donc) - cpatch%wood_gbh (recc) = cpatch%wood_gbh (donc) - cpatch%wood_gbw (recc) = cpatch%wood_gbw (donc) - cpatch%A_open (recc) = cpatch%A_open (donc) - cpatch%A_closed (recc) = cpatch%A_closed (donc) - cpatch%Psi_closed (recc) = cpatch%Psi_closed (donc) - cpatch%gsw_open (recc) = cpatch%gsw_open (donc) - cpatch%gsw_closed (recc) = cpatch%gsw_closed (donc) - cpatch%fsw (recc) = cpatch%fsw (donc) - cpatch%fs_open (recc) = cpatch%fs_open (donc) - cpatch%water_supply (recc) = cpatch%water_supply (donc) - cpatch%stomatal_conductance (recc) = cpatch%stomatal_conductance (donc) - cpatch%leaf_maintenance (recc) = cpatch%leaf_maintenance (donc) - cpatch%root_maintenance (recc) = cpatch%root_maintenance (donc) - cpatch%leaf_drop (recc) = cpatch%leaf_drop (donc) - cpatch%bseeds (recc) = cpatch%bseeds (donc) - cpatch%leaf_respiration (recc) = cpatch%leaf_respiration (donc) - cpatch%root_respiration (recc) = cpatch%root_respiration (donc) - cpatch%gpp (recc) = cpatch%gpp (donc) - cpatch%paw_avg (recc) = cpatch%paw_avg (donc) - cpatch%elongf (recc) = cpatch%elongf (donc) - cpatch%turnover_amp (recc) = cpatch%turnover_amp (donc) - cpatch%llspan (recc) = cpatch%llspan (donc) - cpatch%vm_bar (recc) = cpatch%vm_bar (donc) - cpatch%sla (recc) = cpatch%sla (donc) - cpatch%mean_par_l (recc) = cpatch%mean_par_l (donc) - cpatch%mean_par_l_beam (recc) = cpatch%mean_par_l_beam (donc) - cpatch%mean_par_l_diff (recc) = cpatch%mean_par_l_diff (donc) - cpatch%mean_rshort_l (recc) = cpatch%mean_rshort_l (donc) - cpatch%mean_rlong_l (recc) = cpatch%mean_rlong_l (donc) - cpatch%mean_sensible_lc (recc) = cpatch%mean_sensible_lc (donc) - cpatch%mean_vapor_lc (recc) = cpatch%mean_vapor_lc (donc) - cpatch%mean_transp (recc) = cpatch%mean_transp (donc) - cpatch%mean_intercepted_al (recc) = cpatch%mean_intercepted_al (donc) - cpatch%mean_wshed_lg (recc) = cpatch%mean_wshed_lg (donc) - cpatch%mean_rshort_w (recc) = cpatch%mean_rshort_w (donc) - cpatch%mean_rlong_w (recc) = cpatch%mean_rlong_w (donc) - cpatch%mean_sensible_wc (recc) = cpatch%mean_sensible_wc (donc) - cpatch%mean_vapor_wc (recc) = cpatch%mean_vapor_wc (donc) - cpatch%mean_intercepted_aw (recc) = cpatch%mean_intercepted_aw (donc) - cpatch%mean_wshed_wg (recc) = cpatch%mean_wshed_wg (donc) - - - if (imoutput > 0 .or. idoutput > 0 .or. iqoutput > 0) then - cpatch%dmean_fs_open (recc) = cpatch%dmean_fs_open (donc) - cpatch%dmean_fsw (recc) = cpatch%dmean_fsw (donc) - cpatch%dmean_fsn (recc) = cpatch%dmean_fsn (donc) - cpatch%dmean_psi_open (recc) = cpatch%dmean_psi_open (donc) - cpatch%dmean_psi_closed (recc) = cpatch%dmean_psi_closed (donc) - cpatch%dmean_water_supply (recc) = cpatch%dmean_water_supply (donc) - cpatch%dmean_light_level (recc) = cpatch%dmean_light_level (donc) - cpatch%dmean_light_level_beam (recc) = cpatch%dmean_light_level_beam (donc) - cpatch%dmean_light_level_diff (recc) = cpatch%dmean_light_level_diff (donc) - cpatch%dmean_gpp (recc) = cpatch%dmean_gpp (donc) - cpatch%dmean_nppleaf (recc) = cpatch%dmean_nppleaf (donc) - cpatch%dmean_nppfroot (recc) = cpatch%dmean_nppfroot (donc) - cpatch%dmean_nppsapwood (recc) = cpatch%dmean_nppsapwood (donc) - cpatch%dmean_nppcroot (recc) = cpatch%dmean_nppcroot (donc) - cpatch%dmean_nppseeds (recc) = cpatch%dmean_nppseeds (donc) - cpatch%dmean_nppwood (recc) = cpatch%dmean_nppwood (donc) - cpatch%dmean_nppdaily (recc) = cpatch%dmean_nppdaily (donc) - cpatch%dmean_leaf_resp (recc) = cpatch%dmean_leaf_resp (donc) - cpatch%dmean_root_resp (recc) = cpatch%dmean_root_resp (donc) - cpatch%dmean_par_l (recc) = cpatch%dmean_par_l (donc) - cpatch%dmean_par_l_beam (recc) = cpatch%dmean_par_l_beam (donc) - cpatch%dmean_par_l_diff (recc) = cpatch%dmean_par_l_diff (donc) - cpatch%dmean_rshort_l (recc) = cpatch%dmean_rshort_l (donc) - cpatch%dmean_rlong_l (recc) = cpatch%dmean_rlong_l (donc) - cpatch%dmean_sensible_lc (recc) = cpatch%dmean_sensible_lc (donc) - cpatch%dmean_vapor_lc (recc) = cpatch%dmean_vapor_lc (donc) - cpatch%dmean_transp (recc) = cpatch%dmean_transp (donc) - cpatch%dmean_intercepted_al (recc) = cpatch%dmean_intercepted_al (donc) - cpatch%dmean_wshed_lg (recc) = cpatch%dmean_wshed_lg (donc) - cpatch%dmean_rshort_w (recc) = cpatch%dmean_rshort_w (donc) - cpatch%dmean_rlong_w (recc) = cpatch%dmean_rlong_w (donc) - cpatch%dmean_sensible_wc (recc) = cpatch%dmean_sensible_wc (donc) - cpatch%dmean_vapor_wc (recc) = cpatch%dmean_vapor_wc (donc) - cpatch%dmean_intercepted_aw (recc) = cpatch%dmean_intercepted_aw (donc) - cpatch%dmean_wshed_wg (recc) = cpatch%dmean_wshed_wg (donc) - end if - if (imoutput > 0 .or. iqoutput > 0) then - cpatch%mmean_fs_open (recc) = cpatch%mmean_fs_open (donc) - cpatch%mmean_fsw (recc) = cpatch%mmean_fsw (donc) - cpatch%mmean_fsn (recc) = cpatch%mmean_fsn (donc) - cpatch%mmean_psi_open (recc) = cpatch%mmean_psi_open (donc) - cpatch%mmean_psi_closed (recc) = cpatch%mmean_psi_closed (donc) - cpatch%mmean_water_supply (recc) = cpatch%mmean_water_supply (donc) - cpatch%mmean_leaf_maintenance (recc) = cpatch%mmean_leaf_maintenance (donc) - cpatch%mmean_root_maintenance (recc) = cpatch%mmean_root_maintenance (donc) - cpatch%mmean_leaf_drop (recc) = cpatch%mmean_leaf_drop (donc) - cpatch%mmean_cb (recc) = cpatch%mmean_cb (donc) - cpatch%mmean_light_level (recc) = cpatch%mmean_light_level (donc) - cpatch%mmean_light_level_beam (recc) = cpatch%mmean_light_level_beam (donc) - cpatch%mmean_light_level_diff (recc) = cpatch%mmean_light_level_diff (donc) - cpatch%mmean_gpp (recc) = cpatch%mmean_gpp (donc) - cpatch%mmean_nppleaf (recc) = cpatch%mmean_nppleaf (donc) - cpatch%mmean_nppfroot (recc) = cpatch%mmean_nppfroot (donc) - cpatch%mmean_nppsapwood (recc) = cpatch%mmean_nppsapwood (donc) - cpatch%mmean_nppcroot (recc) = cpatch%mmean_nppcroot (donc) - cpatch%mmean_nppseeds (recc) = cpatch%mmean_nppseeds (donc) - cpatch%mmean_nppwood (recc) = cpatch%mmean_nppwood (donc) - cpatch%mmean_nppdaily (recc) = cpatch%mmean_nppdaily (donc) - cpatch%mmean_leaf_resp (recc) = cpatch%mmean_leaf_resp (donc) - cpatch%mmean_root_resp (recc) = cpatch%mmean_root_resp (donc) - cpatch%mmean_growth_resp (recc) = cpatch%mmean_growth_resp (donc) - cpatch%mmean_storage_resp (recc) = cpatch%mmean_storage_resp (donc) - cpatch%mmean_vleaf_resp (recc) = cpatch%mmean_vleaf_resp (donc) - cpatch%mmean_mort_rate (:,recc) = cpatch%mmean_mort_rate (:,donc) - cpatch%mmean_par_l (recc) = cpatch%mmean_par_l (donc) - cpatch%mmean_par_l_beam (recc) = cpatch%mmean_par_l_beam (donc) - cpatch%mmean_par_l_diff (recc) = cpatch%mmean_par_l_diff (donc) - cpatch%mmean_rshort_l (recc) = cpatch%mmean_rshort_l (donc) - cpatch%mmean_rlong_l (recc) = cpatch%mmean_rlong_l (donc) - cpatch%mmean_sensible_lc (recc) = cpatch%mmean_sensible_lc (donc) - cpatch%mmean_vapor_lc (recc) = cpatch%mmean_vapor_lc (donc) - cpatch%mmean_transp (recc) = cpatch%mmean_transp (donc) - cpatch%mmean_intercepted_al (recc) = cpatch%mmean_intercepted_al (donc) - cpatch%mmean_wshed_lg (recc) = cpatch%mmean_wshed_lg (donc) - cpatch%mmean_rshort_w (recc) = cpatch%mmean_rshort_w (donc) - cpatch%mmean_rlong_w (recc) = cpatch%mmean_rlong_w (donc) - cpatch%mmean_sensible_wc (recc) = cpatch%mmean_sensible_wc (donc) - cpatch%mmean_vapor_wc (recc) = cpatch%mmean_vapor_wc (donc) - cpatch%mmean_intercepted_aw (recc) = cpatch%mmean_intercepted_aw (donc) - cpatch%mmean_wshed_wg (recc) = cpatch%mmean_wshed_wg (donc) - end if - - if (iqoutput > 0) then - cpatch%qmean_par_l (:,recc) = cpatch%qmean_par_l (:,donc) - cpatch%qmean_par_l_beam (:,recc) = cpatch%qmean_par_l_beam (:,donc) - cpatch%qmean_par_l_diff (:,recc) = cpatch%qmean_par_l_diff (:,donc) - cpatch%qmean_fs_open (:,recc) = cpatch%qmean_fs_open (:,donc) - cpatch%qmean_fsw (:,recc) = cpatch%qmean_fsw (:,donc) - cpatch%qmean_fsn (:,recc) = cpatch%qmean_fsn (:,donc) - cpatch%qmean_psi_open (:,recc) = cpatch%qmean_psi_open (:,donc) - cpatch%qmean_psi_closed (:,recc) = cpatch%qmean_psi_closed (:,donc) - cpatch%qmean_water_supply (:,recc) = cpatch%qmean_water_supply (:,donc) - cpatch%qmean_gpp (:,recc) = cpatch%qmean_gpp (:,donc) - cpatch%qmean_leaf_resp (:,recc) = cpatch%qmean_leaf_resp (:,donc) - cpatch%qmean_root_resp (:,recc) = cpatch%qmean_root_resp (:,donc) - cpatch%qmean_rshort_l (:,recc) = cpatch%qmean_rshort_l (:,donc) - cpatch%qmean_rlong_l (:,recc) = cpatch%qmean_rlong_l (:,donc) - cpatch%qmean_sensible_lc (:,recc) = cpatch%qmean_sensible_lc (:,donc) - cpatch%qmean_vapor_lc (:,recc) = cpatch%qmean_vapor_lc (:,donc) - cpatch%qmean_transp (:,recc) = cpatch%qmean_transp (:,donc) - cpatch%qmean_intercepted_al (:,recc) = cpatch%qmean_intercepted_al (:,donc) - cpatch%qmean_wshed_lg (:,recc) = cpatch%qmean_wshed_lg (:,donc) - cpatch%qmean_rshort_w (:,recc) = cpatch%qmean_rshort_w (:,donc) - cpatch%qmean_rlong_w (:,recc) = cpatch%qmean_rlong_w (:,donc) - cpatch%qmean_sensible_wc (:,recc) = cpatch%qmean_sensible_wc (:,donc) - cpatch%qmean_vapor_wc (:,recc) = cpatch%qmean_vapor_wc (:,donc) - cpatch%qmean_intercepted_aw (:,recc) = cpatch%qmean_intercepted_aw (:,donc) - cpatch%qmean_wshed_wg (:,recc) = cpatch%qmean_wshed_wg (:,donc) - end if + ! Offset for each machine, so this has a nmachs size. + integer, dimension(maxmach,maxgrds) :: co_off - return - end subroutine clone_cohort - !=======================================================================================! - !=======================================================================================! + type(edtype),pointer,dimension(:) :: edgrid_g + ! The following are swap variables used during + ! deallocation-reallocation + type(edtype) :: edswap_g + type(polygontype) :: polyswap_g -!============================================================================! -!============================================================================! - + type(sitetype) :: siteswap_g - ! =============================================================== - ! Define the vtables of the state/output variables - ! - ! The various state scalars, vectors and arrays are - ! now populate the vtable. The vtable indexes the array - ! gives it a name, records its dimensions, when it is to be - ! used as output and how (averaging and such) and most importantly - ! saves a pointer to its starting position. If this routine is - ! being called as a compute node in parallel, the first position - ! is not necessarily the first position of the whole datavector, - ! but will only be the first position of that nodes hyperslab chunk - ! within the given continuous dataset. - ! - ! The first number correspond to the data level: - ! 1. Gridtype (polygon level) - ! 2. Polygontype (site level) - ! 3. Sitetype (patch level) - ! 4. Patchtype (cohort level) - - ! 9. Scalar - ! The other numbers correspond to the kind of dimension and variable. - ! 0. Main vector ordinate only, integer. - ! 1. Main vector ordinate only, real. - ! 2. Soil layer - ! 3. Surface water layer - ! 4. PFT - ! 5. Disturbance Type - ! 6. DBH class - ! 7. FF_DBH class - ! 8. Mortality - ! 9. Month/13 months - ! - ! An extra dimension for diurnal cycle can be denoted by the negative sign - ! - ! Of these possible dimensions (2-9), they may be used concurrently - ! to partition the data into multi-dimensional spaces, but all seven - ! will not be used simultaneously. The highest ranks in use are 3. - ! Each unique combination will have a call number associated with it. - ! - ! 10 : rank 1 : polygon, integer - ! 11 : rank 1 : polygon - ! -11 : rank 2 : polygon, diurnal cycle - ! 12 : rank 2 : polygon, s-layer - ! 120 : rank 2 : polygon, s-layer, integer - ! -12 : rank 3 : polygon, s-layer, diurnal cycle - ! 13 : rank 2 : polygon, w-layer - ! 14 : rank 2 : polygon, pft - ! 14567 : rank 5 : polygon, pft, disturbance, dbh, age - ! 146 : rank 3 : polygon, pft, dbh - ! 15 : rank 2 : polygon, disturbance - ! 155 : rank 3 : polygon, disturbance, disturbance - ! 157 : rank 3 : polygon, disturbance, age - ! 16 : rank 2 : polygon, dbh - ! 17 : rank 2 : polygon, age - ! 18 : rank 2 : polygon, mort - ! 19 : rank 2 : polygon, month+1 - ! - ! 20 : rank 1 : site, integer - ! 21 : rank 1 : site - ! 22 : rank 2 : site, s-layer - ! 23 : rank 2 : site, w-layer - ! 24 : rank 2 : site, pft - ! 246 : rank 3 : site, pft, dbh - ! 25 : rank 2 : site, disturbance - ! 255 : rank 3 : site, disturbance, disturbance - ! 26 : rank 2 : site, dbh - ! 27 : rank 2 : site, age - ! 28 : rank 2 : site, mort - ! 29 : rank 2 : site, month - ! - ! 30 : rank 1 : patch, integer - ! 31 : rank 1 : patch - ! -31 : rank 2 : patch, diurnal cycle - ! 32 : rank 2 : patch, s-layer - ! 33 : rank 2 : patch, w-layer - ! 34 : rank 2 : patch, pft - ! 346 : rank 3 : patch, pft, ff_dbh - ! 35 : rank 2 : patch, disturbance - ! 36 : rank 2 : patch, dbh - ! 37 : rank 2 : patch, age - ! 38 : rank 2 : patch, mort - ! - ! 40 : rank 1 : cohort, integer - ! 41 : rank 1 : cohort - ! -41 : rank 2 : cohort, diurnal cycle - ! 44 : rank 2 : cohort, pft - ! 46 : rank 2 : cohort, dbh - ! 47 : rank 2 : cohort, age - ! 48 : rank 2 : cohort, mort - ! 49 : rank 2 : cohort, month+1 - ! - ! 90 : rank 0 : integer scalar - ! 92 : rank 1 : s-layer - !=================================================================== + type(patchtype) :: patchswap_g - subroutine filltab_alltypes - - ! ================================================= - ! - ! This subroutine is the main driver for filling - ! filling the var_table of ED variables. On a - ! serial computing environment, this routine should be - ! called near the end of the initialization process - ! after the hierarchical tree structure has been - ! trimmed via fusion/fission. Similiarly, this - ! routine should be called after any fusion/fission - ! process, assuming that the major vtable structures - ! have been deallocated prior to reallocation. - ! - ! In a paralell environment, this routine should - ! operate in a similiar fashion on each of the compute - ! nodes. It is designed such that the compute nodes - ! will write hyperslabs of data in parallel to a - ! joing HDF5 dataset as "collective-chunked" data - ! The modifications that must be made after running this - ! subroutine, are that the indexes should account - ! for the offset of the current compute node. - ! - ! ================================================= - - - use ed_var_tables,only:num_var,vt_info,var_table,reset_vt_vector_pointers - use ed_node_coms,only:mynum,mchnum,machs,nmachs,nnodetot,sendnum,recvnum,master_num - use ed_max_dims, only: maxgrds, maxmach - implicit none - - include 'mpif.h' + !---------------------------------------------------------------------------------------! + ! The following variables are for tracking the number of variables written in the ! + ! output, this way we avoid having the same ID used twice. ! + !---------------------------------------------------------------------------------------! + integer :: nioglobal, niogrid, niopoly, niosite - integer :: ncohorts_g,npatches_g,nsites_g - integer :: igr,ipy,isi,ipa,nv,ierr,nm,iptr - integer, dimension(MPI_STATUS_SIZE) :: status - integer :: ping,uniqueid - logical,save :: model_start = .true. - - type(edtype),pointer :: cgrid - type(polygontype),pointer :: cpoly - type(sitetype),pointer :: csite - type(patchtype),pointer :: cpatch - logical :: verbose = .false. - - if (mynum == 1) then - write(*,"(a)")'--- Re-hashing the IO pointer tables and mapping arrays' - end if - - - ! The first loop through populates the info tables - - do igr = 1,ngrids - cgrid => edgrid_g(igr) - if (num_var(igr)>0) then - do nv=1,num_var(igr) - call reset_vt_vector_pointers(vt_info(nv,igr)) - end do - end if - - num_var(igr) = 0 - - cgrid%npolygons_global = cgrid%npolygons - cgrid%nsites_global = get_nsites(cgrid) - cgrid%npatches_global = get_npatches(cgrid) - cgrid%ncohorts_global = get_ncohorts(cgrid) - - cgrid%mach_cohort_offset_index = 0 - cgrid%mach_patch_offset_index = 0 - cgrid%mach_site_offset_index = 0 - cgrid%mach_polygon_offset_index= 0 - - if (nnodetot /= 1) then - - ! Send all them sizes to root (CHANGED, NODE 1) - + !---------------------------------------------------------------------------------------! + ! Logical switch that decides if the pointer tables for IO need to be updated + ! The number and allocation of cohorts and patches dictates this, and they + ! change at a monthly frequency typically. + !---------------------------------------------------------------------------------------! + logical :: filltables + !=======================================================================================! + !=======================================================================================! - if (mynum == 1) then - - gdpy(1,igr) = cgrid%npolygons_global - gdsi(1,igr) = cgrid%nsites_global - gdpa(1,igr) = cgrid%npatches_global - gdco(1,igr) = cgrid%ncohorts_global - - call MPI_Send(ping,1,MPI_INTEGER,sendnum,94,MPI_COMM_WORLD,ierr) - - ! Have node 1 recieve the info - do nm=2,nnodetot - uniqueid=((igr-1)*maxmach)+nm - call MPI_Recv(gdpy(nm,igr),1,MPI_INTEGER,machs(nm),500000+uniqueid,MPI_COMM_WORLD,status,ierr) - call MPI_Recv(gdsi(nm,igr),1,MPI_INTEGER,machs(nm),600000+uniqueid,MPI_COMM_WORLD,status,ierr) - call MPI_Recv(gdpa(nm,igr),1,MPI_INTEGER,machs(nm),700000+uniqueid,MPI_COMM_WORLD,status,ierr) - call MPI_Recv(gdco(nm,igr),1,MPI_INTEGER,machs(nm),800000+uniqueid,MPI_COMM_WORLD,status,ierr) - end do - - ! Broadcast all this info to the nodes - do nm=2,nnodetot - uniqueid=((igr-1)*maxmach)+nm - call MPI_Send(gdpy,maxmach*maxgrds,MPI_INTEGER,machs(nm), 900000+uniqueid,MPI_COMM_WORLD,ierr) - call MPI_Send(gdsi,maxmach*maxgrds,MPI_INTEGER,machs(nm),1000000+uniqueid,MPI_COMM_WORLD,ierr) - call MPI_Send(gdpa,maxmach*maxgrds,MPI_INTEGER,machs(nm),1100000+uniqueid,MPI_COMM_WORLD,ierr) - call MPI_Send(gdco,maxmach*maxgrds,MPI_INTEGER,machs(nm),1200000+uniqueid,MPI_COMM_WORLD,ierr) - end do - - else - - ! Set the blocking recieve to allow ordering, start with machine 1 - call MPI_Recv(ping,1,MPI_INTEGER,recvnum,94,MPI_COMM_WORLD,status,ierr) - - uniqueid=((igr-1)*maxmach)+mynum - ! Send the information to node (1) - call MPI_Send(cgrid%npolygons_global, 1,MPI_INTEGER,machs(1),500000+uniqueid,MPI_COMM_WORLD,ierr) - call MPI_Send(cgrid%nsites_global , 1,MPI_INTEGER,machs(1),600000+uniqueid,MPI_COMM_WORLD,ierr) - call MPI_Send(cgrid%npatches_global , 1,MPI_INTEGER,machs(1),700000+uniqueid,MPI_COMM_WORLD,ierr) - call MPI_Send(cgrid%ncohorts_global , 1,MPI_INTEGER,machs(1),800000+uniqueid,MPI_COMM_WORLD,ierr) - - ! When this node is finished, send the blocking MPI_Send to the next machine - if (mynum /= nnodetot) call MPI_Send(ping,1,MPI_INTEGER,sendnum,94,MPI_COMM_WORLD,ierr) - - uniqueid=((igr-1)*maxmach)+mynum - call MPI_Recv(gdpy,maxmach*maxgrds,MPI_INTEGER,machs(1), 900000+uniqueid,MPI_COMM_WORLD,status,ierr) - call MPI_Recv(gdsi,maxmach*maxgrds,MPI_INTEGER,machs(1),1000000+uniqueid,MPI_COMM_WORLD,status,ierr) - call MPI_Recv(gdpa,maxmach*maxgrds,MPI_INTEGER,machs(1),1100000+uniqueid,MPI_COMM_WORLD,status,ierr) - call MPI_Recv(gdco,maxmach*maxgrds,MPI_INTEGER,machs(1),1200000+uniqueid,MPI_COMM_WORLD,status,ierr) - - end if + contains - if(mynum == 1 .and. model_start .and. verbose) then - - print*,"Global Polygons: ",gdpy(1:nnodetot,igr) - print*,"Global Site: " ,gdsi(1:nnodetot,igr) - print*,"Global Patches: " ,gdpa(1:nnodetot,igr) - print*,"Global Cohorts: " ,gdco(1:nnodetot,igr) - end if - ! Calculate the offsets that each machine has - - py_off(1,igr) = 0 - si_off(1,igr) = 0 - pa_off(1,igr) = 0 - co_off(1,igr) = 0 - do nm=2,nnodetot - py_off(nm,igr) = py_off(nm-1,igr) + gdpy(nm-1,igr) - si_off(nm,igr) = si_off(nm-1,igr) + gdsi(nm-1,igr) - pa_off(nm,igr) = pa_off(nm-1,igr) + gdpa(nm-1,igr) - co_off(nm,igr) = co_off(nm-1,igr) + gdco(nm-1,igr) - end do - - ! Calculate the total sizes of the arrays - - cgrid%npolygons_global = sum(gdpy(1:nnodetot,igr)) - cgrid%nsites_global = sum(gdsi(1:nnodetot,igr)) - cgrid%npatches_global = sum(gdpa(1:nnodetot,igr)) - cgrid%ncohorts_global = sum(gdco(1:nnodetot,igr)) + !=======================================================================================! + !=======================================================================================! + ! This sub-routine allocates the global dimensions (outside the structure). ! + !---------------------------------------------------------------------------------------! + subroutine allocate_edglobals(ngrids) - ! Calculate the local offsets - - cgrid%mach_polygon_offset_index = py_off(mynum,igr) - cgrid%mach_site_offset_index = si_off(mynum,igr) - cgrid%mach_patch_offset_index = pa_off(mynum,igr) - cgrid%mach_cohort_offset_index = co_off(mynum,igr) + use ed_var_tables, only : num_var & ! intent(in) + , vt_info & ! intent(in) + , maxvars ! ! intent(in) + implicit none - - end if - - call filltab_globtype(igr) - - call filltab_edtype(igr,0) - - if (gdpy(mynum,igr)>0) then - call filltab_polygontype(igr,1,0) - call filltab_sitetype(igr,1,1,0) - call filltab_patchtype(igr,1,1,1,0) - end if - - - end do - - - do igr = 1,ngrids - - ! Test to see if the var_table has been initialized. If it has - ! then deallocate its pointers and reset its first flag. These - ! will be reallocated on the first pass of the filltab_ - ! subroutines. - - cgrid => edgrid_g(igr) - - cgrid%pyglob_id = 0 + cgrid%mach_polygon_offset_index - - ! Determine the total number of variables for each grid - ! These will determine the length of the vt_vector - - call filltab_edtype(igr,1) - - ncohorts_g = 0 + cgrid%mach_cohort_offset_index - npatches_g = 0 + cgrid%mach_patch_offset_index - nsites_g = 0 + cgrid%mach_site_offset_index - - do ipy = 1,cgrid%npolygons - - cpoly => cgrid%polygon(ipy) - - cpoly%siglob_id = nsites_g + 0 ! This is the offset for the vtable write - - cgrid%pysi_id(ipy) = nsites_g + 1 ! This is the index written in the file - ! for the user to reference + !----- Arguments. -------------------------------------------------------------------! + integer :: ngrids + !------------------------------------------------------------------------------------! + - cgrid%pysi_n(ipy) = cpoly%nsites - nsites_g = nsites_g + cpoly%nsites - - call filltab_polygontype(igr,ipy,1) - - do isi = 1,cpoly%nsites - - csite => cpoly%site(isi) - - csite%paglob_id = npatches_g + 0 + !------------------------------------------------------------------------------------! + ! Check that the structure is free. ! + !------------------------------------------------------------------------------------! + if (associated(edgrid_g)) then + call fatal_error('Attempt to allocate global dimensions again!' & + ,'allocate_edglobals','ed_state_vars.f90') + else + nullify (edgrid_g) + allocate(edgrid_g(ngrids)) + end if + !------------------------------------------------------------------------------------! - cpoly%sipa_id(isi) = npatches_g + 1 - cpoly%sipa_n(isi) = csite%npatches - npatches_g = npatches_g + csite%npatches - - call filltab_sitetype(igr,ipy,isi,1) - - do ipa = 1,csite%npatches + !------------------------------------------------------------------------------------! + ! Allocate the basic variable table structures. ! + !------------------------------------------------------------------------------------! + allocate(num_var(ngrids)) + num_var = 0 + + allocate(vt_info(maxvars,ngrids)) + vt_info(:,:)%vector_allocated = .false. - cpatch => csite%patch(ipa) - - cpatch%coglob_id = ncohorts_g + 0 - csite%paco_id(ipa) = ncohorts_g + 1 + !----- Initialize the global offsets. -----------------------------------------------! + edgrid_g(:)%mach_cohort_offset_index = 0 + edgrid_g(:)%mach_patch_offset_index = 0 + edgrid_g(:)%mach_site_offset_index = 0 + edgrid_g(:)%mach_polygon_offset_index = 0 + !------------------------------------------------------------------------------------! - csite%paco_n(ipa) = cpatch%ncohorts - ncohorts_g = ncohorts_g + cpatch%ncohorts + return + end subroutine allocate_edglobals + !=======================================================================================! + !=======================================================================================! - if (cpatch%ncohorts > 0 ) then - - call filltab_patchtype(igr,ipy,isi,ipa,1) - - end if - end do - - end do - - end do - if (mynum.eq.1) then - write(*,"(a)")'--- Mapping Completed' - end if - if (mynum.eq.1 .and. model_start .and. verbose) then - model_start = .false. - do nv=1,num_var(igr) -! write(*,"(a,i4,a,i4,a,a)")'Registering: ',nv,' of',num_var(igr),' ',vt_info(nv,igr)%name - end do - end if - end do - return - end subroutine filltab_alltypes -!==========================================================================================! -!==========================================================================================! + !=======================================================================================! + !=======================================================================================! + ! This subroutine allocates the polygon-level variables. ! + !---------------------------------------------------------------------------------------! + subroutine allocate_edtype(cgrid,npolygons) + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(edtype), target :: cgrid + integer , intent(in) :: npolygons + !----- Local variables. -------------------------------------------------------------! + integer :: max_sitep1 + !------------------------------------------------------------------------------------! + !------ For site adjacency.---------------------------------------------------------! + max_sitep1 = max_site + 1 + !------------------------------------------------------------------------------------! - !=======================================================================================! - !=======================================================================================! - subroutine filltab_globtype(igr) + !----- Make sure that we nullify all pointers for a safe allocation. ----------------! + call nullify_edtype(cgrid) + !------------------------------------------------------------------------------------! - use ed_var_tables, only : vtable_edio_r & ! sub-routine - , vtable_edio_r_sca & ! sub-rouitne - , vtable_edio_i_sca ! ! sub-rouitne - use soil_coms , only : slz & ! intent(in) - , slxclay & ! intent(in) - , slxsand & ! intent(in) - , isoilflg ! ! intent(in) + !----- Define the number of polygons. -----------------------------------------------! + cgrid%npolygons = npolygons + !------------------------------------------------------------------------------------! - implicit none - !----- Arguments. -------------------------------------------------------------------! - integer , intent(in) :: igr - !----- Local variables. -------------------------------------------------------------! - integer :: var_len - integer :: max_ptrs - integer :: var_len_global - integer :: nvar - type(edtype), pointer :: cgrid + !------------------------------------------------------------------------------------! + ! There may be empty grids. It never happens in the offline runs, but it is ! + ! common in coupled model settings: some nodes may receive areas exclusively over ! + ! oceans, and npolygons will be 0 in these nodes. In this case, we should not ! + ! attempt to allocate anything. ! + !------------------------------------------------------------------------------------! + if (npolygons == 0) return !------------------------------------------------------------------------------------! + allocate(cgrid%polygon (npolygons)) + + + allocate(cgrid%pysi_id ( npolygons)) + allocate(cgrid%pysi_n ( npolygons)) + allocate(cgrid%walltime_py ( npolygons)) + allocate(cgrid%lon ( npolygons)) + allocate(cgrid%lat ( npolygons)) + allocate(cgrid%xatm ( npolygons)) + allocate(cgrid%yatm ( npolygons)) + allocate(cgrid%site_adjacency (max_site,max_sitep1,npolygons)) + allocate(cgrid%wbar ( npolygons)) + allocate(cgrid%Te ( npolygons)) + allocate(cgrid%zbar ( npolygons)) + allocate(cgrid%sheat ( npolygons)) + allocate(cgrid%baseflow ( npolygons)) + allocate(cgrid%runoff ( npolygons)) + allocate(cgrid%qrunoff ( npolygons)) + allocate(cgrid%swliq ( npolygons)) + allocate(cgrid%ilon ( npolygons)) + allocate(cgrid%ilat ( npolygons)) + allocate(cgrid%workload ( 13,npolygons)) + allocate(cgrid%total_agb ( npolygons)) + allocate(cgrid%total_basal_area ( npolygons)) + allocate(cgrid%total_agb_growth ( npolygons)) + allocate(cgrid%total_agb_mort ( npolygons)) + allocate(cgrid%total_agb_recruit ( npolygons)) + allocate(cgrid%total_basal_area_growth ( npolygons)) + allocate(cgrid%total_basal_area_mort ( npolygons)) + allocate(cgrid%total_basal_area_recruit ( npolygons)) + allocate(cgrid%nsites ( npolygons)) + allocate(cgrid%sitenums ( max_site,npolygons)) + allocate(cgrid%load_adjacency ( npolygons)) + allocate(cgrid%metinput ( npolygons)) + allocate(cgrid%met ( npolygons)) + allocate(cgrid%lapse ( npolygons)) + allocate(cgrid%cosz ( npolygons)) + allocate(cgrid%cbudget_initialstorage ( npolygons)) + allocate(cgrid%cbudget_nep ( npolygons)) + allocate(cgrid%nbudget_initialstorage ( npolygons)) + allocate(cgrid%max_leaf_temp ( npolygons)) + allocate(cgrid%min_leaf_temp ( npolygons)) + allocate(cgrid%max_wood_temp ( npolygons)) + allocate(cgrid%min_wood_temp ( npolygons)) + allocate(cgrid%max_soil_temp ( npolygons)) + allocate(cgrid%min_soil_temp ( npolygons)) + + allocate(cgrid%nplant ( n_pft, n_dbh,npolygons)) + allocate(cgrid%agb ( n_pft, n_dbh,npolygons)) + allocate(cgrid%lai ( n_pft, n_dbh,npolygons)) + allocate(cgrid%wai ( n_pft, n_dbh,npolygons)) + allocate(cgrid%basal_area ( n_pft, n_dbh,npolygons)) + allocate(cgrid%bdead ( n_pft, n_dbh,npolygons)) + allocate(cgrid%balive ( n_pft, n_dbh,npolygons)) + allocate(cgrid%bleaf ( n_pft, n_dbh,npolygons)) + allocate(cgrid%broot ( n_pft, n_dbh,npolygons)) + allocate(cgrid%bsapwooda ( n_pft, n_dbh,npolygons)) + allocate(cgrid%bsapwoodb ( n_pft, n_dbh,npolygons)) + allocate(cgrid%bseeds ( n_pft, n_dbh,npolygons)) + allocate(cgrid%bstorage ( n_pft, n_dbh,npolygons)) + allocate(cgrid%bdead_n ( n_pft, n_dbh,npolygons)) + allocate(cgrid%balive_n ( n_pft, n_dbh,npolygons)) + allocate(cgrid%bleaf_n ( n_pft, n_dbh,npolygons)) + allocate(cgrid%broot_n ( n_pft, n_dbh,npolygons)) + allocate(cgrid%bsapwooda_n ( n_pft, n_dbh,npolygons)) + allocate(cgrid%bsapwoodb_n ( n_pft, n_dbh,npolygons)) + allocate(cgrid%bseeds_n ( n_pft, n_dbh,npolygons)) + allocate(cgrid%bstorage_n ( n_pft, n_dbh,npolygons)) + allocate(cgrid%leaf_maintenance ( n_pft, n_dbh,npolygons)) + allocate(cgrid%root_maintenance ( n_pft, n_dbh,npolygons)) + allocate(cgrid%leaf_drop ( n_pft, n_dbh,npolygons)) + allocate(cgrid%fast_soil_c ( npolygons)) + allocate(cgrid%slow_soil_c ( npolygons)) + allocate(cgrid%struct_soil_c ( npolygons)) + allocate(cgrid%struct_soil_l ( npolygons)) + allocate(cgrid%cwd_c ( npolygons)) + allocate(cgrid%fast_soil_n ( npolygons)) + allocate(cgrid%mineral_soil_n ( npolygons)) + allocate(cgrid%cwd_n ( npolygons)) + allocate(cgrid%Cleaf_grow ( npolygons)) + allocate(cgrid%Croot_grow ( npolygons)) + allocate(cgrid%Cdead_grow ( npolygons)) + allocate(cgrid%Cstore_grow ( npolygons)) + allocate(cgrid%Cleaf_litter_flux ( npolygons)) + allocate(cgrid%Croot_litter_flux ( npolygons)) + allocate(cgrid%Ccwd_flux ( npolygons)) + allocate(cgrid%Nleaf_grow ( npolygons)) + allocate(cgrid%Ndead_grow ( npolygons)) + allocate(cgrid%Nroot_grow ( npolygons)) + allocate(cgrid%Nstore_grow ( npolygons)) + allocate(cgrid%Nleaf_litter_flux ( npolygons)) + allocate(cgrid%Nroot_litter_flux ( npolygons)) + allocate(cgrid%Ncwd_flux ( npolygons)) + allocate(cgrid%Nbiomass_uptake ( npolygons)) + allocate(cgrid%Ngross_min ( npolygons)) + allocate(cgrid%Nnet_min ( npolygons)) + allocate(cgrid%avg_lai_ebalvars ( 3, 4,npolygons)) + + allocate(cgrid%fmean_gpp ( npolygons)) + allocate(cgrid%fmean_npp ( npolygons)) + allocate(cgrid%fmean_leaf_resp ( npolygons)) + allocate(cgrid%fmean_root_resp ( npolygons)) + allocate(cgrid%fmean_growth_resp ( npolygons)) + allocate(cgrid%fmean_storage_resp ( npolygons)) + allocate(cgrid%fmean_vleaf_resp ( npolygons)) + allocate(cgrid%fmean_plresp ( npolygons)) + allocate(cgrid%fmean_leaf_energy ( npolygons)) + allocate(cgrid%fmean_leaf_water ( npolygons)) + allocate(cgrid%fmean_leaf_hcap ( npolygons)) + allocate(cgrid%fmean_leaf_vpdef ( npolygons)) + allocate(cgrid%fmean_leaf_temp ( npolygons)) + allocate(cgrid%fmean_leaf_fliq ( npolygons)) + allocate(cgrid%fmean_leaf_gsw ( npolygons)) + allocate(cgrid%fmean_leaf_gbw ( npolygons)) + allocate(cgrid%fmean_wood_energy ( npolygons)) + allocate(cgrid%fmean_wood_water ( npolygons)) + allocate(cgrid%fmean_wood_hcap ( npolygons)) + allocate(cgrid%fmean_wood_temp ( npolygons)) + allocate(cgrid%fmean_wood_fliq ( npolygons)) + allocate(cgrid%fmean_wood_gbw ( npolygons)) + allocate(cgrid%fmean_fs_open ( npolygons)) + allocate(cgrid%fmean_fsw ( npolygons)) + allocate(cgrid%fmean_fsn ( npolygons)) + allocate(cgrid%fmean_psi_open ( npolygons)) + allocate(cgrid%fmean_psi_closed ( npolygons)) + allocate(cgrid%fmean_water_supply ( npolygons)) + allocate(cgrid%fmean_par_l ( npolygons)) + allocate(cgrid%fmean_par_l_beam ( npolygons)) + allocate(cgrid%fmean_par_l_diff ( npolygons)) + allocate(cgrid%fmean_rshort_l ( npolygons)) + allocate(cgrid%fmean_rlong_l ( npolygons)) + allocate(cgrid%fmean_sensible_lc ( npolygons)) + allocate(cgrid%fmean_vapor_lc ( npolygons)) + allocate(cgrid%fmean_transp ( npolygons)) + allocate(cgrid%fmean_intercepted_al ( npolygons)) + allocate(cgrid%fmean_wshed_lg ( npolygons)) + allocate(cgrid%fmean_rshort_w ( npolygons)) + allocate(cgrid%fmean_rlong_w ( npolygons)) + allocate(cgrid%fmean_sensible_wc ( npolygons)) + allocate(cgrid%fmean_vapor_wc ( npolygons)) + allocate(cgrid%fmean_intercepted_aw ( npolygons)) + allocate(cgrid%fmean_wshed_wg ( npolygons)) + allocate(cgrid%fmean_rh ( npolygons)) + allocate(cgrid%fmean_cwd_rh ( npolygons)) + allocate(cgrid%fmean_nep ( npolygons)) + allocate(cgrid%fmean_rk4step ( npolygons)) + allocate(cgrid%fmean_available_water ( npolygons)) + allocate(cgrid%fmean_can_theiv ( npolygons)) + allocate(cgrid%fmean_can_theta ( npolygons)) + allocate(cgrid%fmean_can_vpdef ( npolygons)) + allocate(cgrid%fmean_can_temp ( npolygons)) + allocate(cgrid%fmean_can_shv ( npolygons)) + allocate(cgrid%fmean_can_co2 ( npolygons)) + allocate(cgrid%fmean_can_rhos ( npolygons)) + allocate(cgrid%fmean_can_prss ( npolygons)) + allocate(cgrid%fmean_gnd_temp ( npolygons)) + allocate(cgrid%fmean_gnd_shv ( npolygons)) + allocate(cgrid%fmean_can_ggnd ( npolygons)) + allocate(cgrid%fmean_sfcw_depth ( npolygons)) + allocate(cgrid%fmean_sfcw_energy ( npolygons)) + allocate(cgrid%fmean_sfcw_mass ( npolygons)) + allocate(cgrid%fmean_sfcw_temp ( npolygons)) + allocate(cgrid%fmean_sfcw_fliq ( npolygons)) + allocate(cgrid%fmean_soil_energy ( nzg,npolygons)) + allocate(cgrid%fmean_soil_mstpot ( nzg,npolygons)) + allocate(cgrid%fmean_soil_water ( nzg,npolygons)) + allocate(cgrid%fmean_soil_temp ( nzg,npolygons)) + allocate(cgrid%fmean_soil_fliq ( nzg,npolygons)) + allocate(cgrid%fmean_rshort_gnd ( npolygons)) + allocate(cgrid%fmean_par_gnd ( npolygons)) + allocate(cgrid%fmean_rlong_gnd ( npolygons)) + allocate(cgrid%fmean_rlongup ( npolygons)) + allocate(cgrid%fmean_parup ( npolygons)) + allocate(cgrid%fmean_nirup ( npolygons)) + allocate(cgrid%fmean_rshortup ( npolygons)) + allocate(cgrid%fmean_rnet ( npolygons)) + allocate(cgrid%fmean_albedo ( npolygons)) + allocate(cgrid%fmean_albedo_beam ( npolygons)) + allocate(cgrid%fmean_albedo_diff ( npolygons)) + allocate(cgrid%fmean_rlong_albedo ( npolygons)) + allocate(cgrid%fmean_ustar ( npolygons)) + allocate(cgrid%fmean_tstar ( npolygons)) + allocate(cgrid%fmean_qstar ( npolygons)) + allocate(cgrid%fmean_cstar ( npolygons)) + allocate(cgrid%fmean_carbon_ac ( npolygons)) + allocate(cgrid%fmean_carbon_st ( npolygons)) + allocate(cgrid%fmean_vapor_gc ( npolygons)) + allocate(cgrid%fmean_vapor_ac ( npolygons)) + allocate(cgrid%fmean_smoist_gg ( nzg,npolygons)) + allocate(cgrid%fmean_throughfall ( npolygons)) + allocate(cgrid%fmean_transloss ( nzg,npolygons)) + allocate(cgrid%fmean_runoff ( npolygons)) + allocate(cgrid%fmean_drainage ( npolygons)) + allocate(cgrid%fmean_sensible_gc ( npolygons)) + allocate(cgrid%fmean_sensible_ac ( npolygons)) + allocate(cgrid%fmean_sensible_gg ( nzg,npolygons)) + allocate(cgrid%fmean_qthroughfall ( npolygons)) + allocate(cgrid%fmean_qrunoff ( npolygons)) + allocate(cgrid%fmean_qdrainage ( npolygons)) + allocate(cgrid%fmean_atm_theiv ( npolygons)) + allocate(cgrid%fmean_atm_theta ( npolygons)) + allocate(cgrid%fmean_atm_temp ( npolygons)) + allocate(cgrid%fmean_atm_vpdef ( npolygons)) + allocate(cgrid%fmean_atm_shv ( npolygons)) + allocate(cgrid%fmean_atm_rshort ( npolygons)) + allocate(cgrid%fmean_atm_rshort_diff ( npolygons)) + allocate(cgrid%fmean_atm_par ( npolygons)) + allocate(cgrid%fmean_atm_par_diff ( npolygons)) + allocate(cgrid%fmean_atm_rlong ( npolygons)) + allocate(cgrid%fmean_atm_vels ( npolygons)) + allocate(cgrid%fmean_atm_rhos ( npolygons)) + allocate(cgrid%fmean_atm_prss ( npolygons)) + allocate(cgrid%fmean_atm_co2 ( npolygons)) + allocate(cgrid%fmean_pcpg ( npolygons)) + allocate(cgrid%fmean_qpcpg ( npolygons)) + allocate(cgrid%fmean_dpcpg ( npolygons)) + allocate(cgrid%fmean_soil_wetness ( npolygons)) + allocate(cgrid%fmean_skin_temp ( npolygons)) - cgrid => edgrid_g(igr) !------------------------------------------------------------------------------------! - ! Single values (scalars). ! + ! Allocate the daily means, only if daily means, monthly means, or mean diurnal ! + ! cycles are requested by the user. ! + !------------------------------------------------------------------------------------! + if (writing_long) then + allocate(cgrid%dmean_nppleaf ( npolygons)) + allocate(cgrid%dmean_nppfroot ( npolygons)) + allocate(cgrid%dmean_nppsapwood ( npolygons)) + allocate(cgrid%dmean_nppcroot ( npolygons)) + allocate(cgrid%dmean_nppseeds ( npolygons)) + allocate(cgrid%dmean_nppwood ( npolygons)) + allocate(cgrid%dmean_nppdaily ( npolygons)) + allocate(cgrid%dmean_A_decomp ( npolygons)) + allocate(cgrid%dmean_Af_decomp ( npolygons)) + allocate(cgrid%dmean_co2_residual ( npolygons)) + allocate(cgrid%dmean_energy_residual ( npolygons)) + allocate(cgrid%dmean_water_residual ( npolygons)) + allocate(cgrid%dmean_gpp ( npolygons)) + allocate(cgrid%dmean_npp ( npolygons)) + allocate(cgrid%dmean_leaf_resp ( npolygons)) + allocate(cgrid%dmean_root_resp ( npolygons)) + allocate(cgrid%dmean_growth_resp ( npolygons)) + allocate(cgrid%dmean_storage_resp ( npolygons)) + allocate(cgrid%dmean_vleaf_resp ( npolygons)) + allocate(cgrid%dmean_plresp ( npolygons)) + allocate(cgrid%dmean_leaf_energy ( npolygons)) + allocate(cgrid%dmean_leaf_water ( npolygons)) + allocate(cgrid%dmean_leaf_hcap ( npolygons)) + allocate(cgrid%dmean_leaf_vpdef ( npolygons)) + allocate(cgrid%dmean_leaf_temp ( npolygons)) + allocate(cgrid%dmean_leaf_fliq ( npolygons)) + allocate(cgrid%dmean_leaf_gsw ( npolygons)) + allocate(cgrid%dmean_leaf_gbw ( npolygons)) + allocate(cgrid%dmean_wood_energy ( npolygons)) + allocate(cgrid%dmean_wood_water ( npolygons)) + allocate(cgrid%dmean_wood_hcap ( npolygons)) + allocate(cgrid%dmean_wood_temp ( npolygons)) + allocate(cgrid%dmean_wood_fliq ( npolygons)) + allocate(cgrid%dmean_wood_gbw ( npolygons)) + allocate(cgrid%dmean_fs_open ( npolygons)) + allocate(cgrid%dmean_fsw ( npolygons)) + allocate(cgrid%dmean_fsn ( npolygons)) + allocate(cgrid%dmean_psi_open ( npolygons)) + allocate(cgrid%dmean_psi_closed ( npolygons)) + allocate(cgrid%dmean_water_supply ( npolygons)) + allocate(cgrid%dmean_par_l ( npolygons)) + allocate(cgrid%dmean_par_l_beam ( npolygons)) + allocate(cgrid%dmean_par_l_diff ( npolygons)) + allocate(cgrid%dmean_rshort_l ( npolygons)) + allocate(cgrid%dmean_rlong_l ( npolygons)) + allocate(cgrid%dmean_sensible_lc ( npolygons)) + allocate(cgrid%dmean_vapor_lc ( npolygons)) + allocate(cgrid%dmean_transp ( npolygons)) + allocate(cgrid%dmean_intercepted_al ( npolygons)) + allocate(cgrid%dmean_wshed_lg ( npolygons)) + allocate(cgrid%dmean_rshort_w ( npolygons)) + allocate(cgrid%dmean_rlong_w ( npolygons)) + allocate(cgrid%dmean_sensible_wc ( npolygons)) + allocate(cgrid%dmean_vapor_wc ( npolygons)) + allocate(cgrid%dmean_intercepted_aw ( npolygons)) + allocate(cgrid%dmean_wshed_wg ( npolygons)) + allocate(cgrid%dmean_rh ( npolygons)) + allocate(cgrid%dmean_cwd_rh ( npolygons)) + allocate(cgrid%dmean_nep ( npolygons)) + allocate(cgrid%dmean_rk4step ( npolygons)) + allocate(cgrid%dmean_available_water ( npolygons)) + allocate(cgrid%dmean_can_theiv ( npolygons)) + allocate(cgrid%dmean_can_theta ( npolygons)) + allocate(cgrid%dmean_can_vpdef ( npolygons)) + allocate(cgrid%dmean_can_temp ( npolygons)) + allocate(cgrid%dmean_can_shv ( npolygons)) + allocate(cgrid%dmean_can_co2 ( npolygons)) + allocate(cgrid%dmean_can_rhos ( npolygons)) + allocate(cgrid%dmean_can_prss ( npolygons)) + allocate(cgrid%dmean_gnd_temp ( npolygons)) + allocate(cgrid%dmean_gnd_shv ( npolygons)) + allocate(cgrid%dmean_can_ggnd ( npolygons)) + allocate(cgrid%dmean_sfcw_depth ( npolygons)) + allocate(cgrid%dmean_sfcw_energy ( npolygons)) + allocate(cgrid%dmean_sfcw_mass ( npolygons)) + allocate(cgrid%dmean_sfcw_temp ( npolygons)) + allocate(cgrid%dmean_sfcw_fliq ( npolygons)) + allocate(cgrid%dmean_soil_energy ( nzg,npolygons)) + allocate(cgrid%dmean_soil_mstpot ( nzg,npolygons)) + allocate(cgrid%dmean_soil_water ( nzg,npolygons)) + allocate(cgrid%dmean_soil_temp ( nzg,npolygons)) + allocate(cgrid%dmean_soil_fliq ( nzg,npolygons)) + allocate(cgrid%dmean_rshort_gnd ( npolygons)) + allocate(cgrid%dmean_par_gnd ( npolygons)) + allocate(cgrid%dmean_rlong_gnd ( npolygons)) + allocate(cgrid%dmean_rlongup ( npolygons)) + allocate(cgrid%dmean_parup ( npolygons)) + allocate(cgrid%dmean_nirup ( npolygons)) + allocate(cgrid%dmean_rshortup ( npolygons)) + allocate(cgrid%dmean_rnet ( npolygons)) + allocate(cgrid%dmean_albedo ( npolygons)) + allocate(cgrid%dmean_albedo_beam ( npolygons)) + allocate(cgrid%dmean_albedo_diff ( npolygons)) + allocate(cgrid%dmean_rlong_albedo ( npolygons)) + allocate(cgrid%dmean_ustar ( npolygons)) + allocate(cgrid%dmean_tstar ( npolygons)) + allocate(cgrid%dmean_qstar ( npolygons)) + allocate(cgrid%dmean_cstar ( npolygons)) + allocate(cgrid%dmean_carbon_ac ( npolygons)) + allocate(cgrid%dmean_carbon_st ( npolygons)) + allocate(cgrid%dmean_vapor_gc ( npolygons)) + allocate(cgrid%dmean_vapor_ac ( npolygons)) + allocate(cgrid%dmean_smoist_gg ( nzg,npolygons)) + allocate(cgrid%dmean_throughfall ( npolygons)) + allocate(cgrid%dmean_transloss ( nzg,npolygons)) + allocate(cgrid%dmean_runoff ( npolygons)) + allocate(cgrid%dmean_drainage ( npolygons)) + allocate(cgrid%dmean_sensible_gc ( npolygons)) + allocate(cgrid%dmean_sensible_ac ( npolygons)) + allocate(cgrid%dmean_sensible_gg ( nzg,npolygons)) + allocate(cgrid%dmean_qthroughfall ( npolygons)) + allocate(cgrid%dmean_qrunoff ( npolygons)) + allocate(cgrid%dmean_qdrainage ( npolygons)) + allocate(cgrid%dmean_atm_theiv ( npolygons)) + allocate(cgrid%dmean_atm_theta ( npolygons)) + allocate(cgrid%dmean_atm_temp ( npolygons)) + allocate(cgrid%dmean_atm_vpdef ( npolygons)) + allocate(cgrid%dmean_atm_shv ( npolygons)) + allocate(cgrid%dmean_atm_rshort ( npolygons)) + allocate(cgrid%dmean_atm_rshort_diff ( npolygons)) + allocate(cgrid%dmean_atm_par ( npolygons)) + allocate(cgrid%dmean_atm_par_diff ( npolygons)) + allocate(cgrid%dmean_atm_rlong ( npolygons)) + allocate(cgrid%dmean_atm_vels ( npolygons)) + allocate(cgrid%dmean_atm_rhos ( npolygons)) + allocate(cgrid%dmean_atm_prss ( npolygons)) + allocate(cgrid%dmean_atm_co2 ( npolygons)) + allocate(cgrid%dmean_pcpg ( npolygons)) + allocate(cgrid%dmean_qpcpg ( npolygons)) + allocate(cgrid%dmean_dpcpg ( npolygons)) + end if !------------------------------------------------------------------------------------! - var_len = 1 - var_len_global = 1 - max_ptrs = 1 - nvar=1 - call vtable_edio_i_sca(cgrid%npolygons_global,nvar,igr,0,0 & - ,var_len,var_len_global,max_ptrs & - ,'NPOLYGONS_GLOBAL :90:hist:anal:dail:mont:dcyc:year') - call vtable_edio_i_sca(cgrid%npolygons_global,nvar,igr,1,0 & - ,var_len,var_len_global,max_ptrs & - ,'NPOLYGONS_GLOBAL :90:hist:anal:dail:mont:dcyc:year') - - nvar=nvar+1 - call vtable_edio_i_sca(cgrid%nsites_global,nvar,igr,0,0 & - ,var_len,var_len_global,max_ptrs & - ,'NSITES_GLOBAL :90:hist:anal:dail:mont:dcyc:year') - call vtable_edio_i_sca(cgrid%nsites_global,nvar,igr,1,0 & - ,var_len,var_len_global,max_ptrs & - ,'NSITES_GLOBAL :90:hist:anal:dail:mont:dcyc:year') - - nvar=nvar+1 - call vtable_edio_i_sca(cgrid%npatches_global,nvar,igr,0,0 & - ,var_len,var_len_global,max_ptrs & - ,'NPATCHES_GLOBAL :90:hist:anal:dail:mont:dcyc:year') - call vtable_edio_i_sca(cgrid%npatches_global,nvar,igr,1,0 & - ,var_len,var_len_global,max_ptrs & - ,'NPATCHES_GLOBAL :90:hist:anal:dail:mont:dcyc:year') - nvar=nvar+1 - call vtable_edio_i_sca(cgrid%ncohorts_global,nvar,igr,0,0 & - ,var_len,var_len_global,max_ptrs & - ,'NCOHORTS_GLOBAL :90:hist:anal:dail:mont:dcyc:year') - call vtable_edio_i_sca(cgrid%ncohorts_global,nvar,igr,1,0 & - ,var_len,var_len_global,max_ptrs & - ,'NCOHORTS_GLOBAL :90:hist:anal:dail:mont:dcyc:year') - nvar=nvar+1 - call vtable_edio_i_sca(nzg,nvar,igr,0,0 & - ,var_len,var_len_global,max_ptrs & - ,'NZG :90:hist:anal:dail:mont:dcyc:year') - call vtable_edio_i_sca(nzg,nvar,igr,1,0 & - ,var_len,var_len_global,max_ptrs & - ,'NZG :90:hist:anal:dail:mont:dcyc:year') - nvar=nvar+1 - call vtable_edio_i_sca(nzs,nvar,igr,0,0 & - ,var_len,var_len_global,max_ptrs & - ,'NZS :90:hist:anal:dail:mont:dcyc:year') - call vtable_edio_i_sca(nzs,nvar,igr,1,0 & - ,var_len,var_len_global,max_ptrs & - ,'NZS :90:hist:anal:dail:mont:dcyc:year') + !------------------------------------------------------------------------------------! + ! Allocate the monthly means only if monthly means or mean diurnal cycles are ! + ! requested by the user. ! + !------------------------------------------------------------------------------------! + if (writing_eorq) then + allocate(cgrid%mmean_lai ( n_pft, n_dbh,npolygons)) + allocate(cgrid%mmean_bleaf ( n_pft, n_dbh,npolygons)) + allocate(cgrid%mmean_broot ( n_pft, n_dbh,npolygons)) + allocate(cgrid%mmean_bstorage ( n_pft, n_dbh,npolygons)) + allocate(cgrid%mmean_bleaf_n ( n_pft, n_dbh,npolygons)) + allocate(cgrid%mmean_broot_n ( n_pft, n_dbh,npolygons)) + allocate(cgrid%mmean_bstorage_n ( n_pft, n_dbh,npolygons)) + allocate(cgrid%mmean_leaf_maintenance ( n_pft, n_dbh,npolygons)) + allocate(cgrid%mmean_root_maintenance ( n_pft, n_dbh,npolygons)) + allocate(cgrid%mmean_leaf_drop ( n_pft, n_dbh,npolygons)) + allocate(cgrid%mmean_fast_soil_c ( npolygons)) + allocate(cgrid%mmean_slow_soil_c ( npolygons)) + allocate(cgrid%mmean_struct_soil_c ( npolygons)) + allocate(cgrid%mmean_struct_soil_l ( npolygons)) + allocate(cgrid%mmean_cwd_c ( npolygons)) + allocate(cgrid%mmean_fast_soil_n ( npolygons)) + allocate(cgrid%mmean_mineral_soil_n ( npolygons)) + allocate(cgrid%mmean_cwd_n ( npolygons)) + allocate(cgrid%mmean_gpp ( npolygons)) + allocate(cgrid%mmean_npp ( npolygons)) + allocate(cgrid%mmean_leaf_resp ( npolygons)) + allocate(cgrid%mmean_root_resp ( npolygons)) + allocate(cgrid%mmean_growth_resp ( npolygons)) + allocate(cgrid%mmean_storage_resp ( npolygons)) + allocate(cgrid%mmean_vleaf_resp ( npolygons)) + allocate(cgrid%mmean_plresp ( npolygons)) + allocate(cgrid%mmean_leaf_energy ( npolygons)) + allocate(cgrid%mmean_leaf_water ( npolygons)) + allocate(cgrid%mmean_leaf_hcap ( npolygons)) + allocate(cgrid%mmean_leaf_vpdef ( npolygons)) + allocate(cgrid%mmean_leaf_temp ( npolygons)) + allocate(cgrid%mmean_leaf_fliq ( npolygons)) + allocate(cgrid%mmean_leaf_gsw ( npolygons)) + allocate(cgrid%mmean_leaf_gbw ( npolygons)) + allocate(cgrid%mmean_wood_energy ( npolygons)) + allocate(cgrid%mmean_wood_water ( npolygons)) + allocate(cgrid%mmean_wood_hcap ( npolygons)) + allocate(cgrid%mmean_wood_temp ( npolygons)) + allocate(cgrid%mmean_wood_fliq ( npolygons)) + allocate(cgrid%mmean_wood_gbw ( npolygons)) + allocate(cgrid%mmean_fs_open ( npolygons)) + allocate(cgrid%mmean_fsw ( npolygons)) + allocate(cgrid%mmean_fsn ( npolygons)) + allocate(cgrid%mmean_psi_open ( npolygons)) + allocate(cgrid%mmean_psi_closed ( npolygons)) + allocate(cgrid%mmean_water_supply ( npolygons)) + allocate(cgrid%mmean_par_l ( npolygons)) + allocate(cgrid%mmean_par_l_beam ( npolygons)) + allocate(cgrid%mmean_par_l_diff ( npolygons)) + allocate(cgrid%mmean_rshort_l ( npolygons)) + allocate(cgrid%mmean_rlong_l ( npolygons)) + allocate(cgrid%mmean_sensible_lc ( npolygons)) + allocate(cgrid%mmean_vapor_lc ( npolygons)) + allocate(cgrid%mmean_transp ( npolygons)) + allocate(cgrid%mmean_intercepted_al ( npolygons)) + allocate(cgrid%mmean_wshed_lg ( npolygons)) + allocate(cgrid%mmean_rshort_w ( npolygons)) + allocate(cgrid%mmean_rlong_w ( npolygons)) + allocate(cgrid%mmean_sensible_wc ( npolygons)) + allocate(cgrid%mmean_vapor_wc ( npolygons)) + allocate(cgrid%mmean_intercepted_aw ( npolygons)) + allocate(cgrid%mmean_wshed_wg ( npolygons)) + allocate(cgrid%mmean_rh ( npolygons)) + allocate(cgrid%mmean_cwd_rh ( npolygons)) + allocate(cgrid%mmean_nep ( npolygons)) + allocate(cgrid%mmean_rk4step ( npolygons)) + allocate(cgrid%mmean_available_water ( npolygons)) + allocate(cgrid%mmean_can_theiv ( npolygons)) + allocate(cgrid%mmean_can_theta ( npolygons)) + allocate(cgrid%mmean_can_vpdef ( npolygons)) + allocate(cgrid%mmean_can_temp ( npolygons)) + allocate(cgrid%mmean_can_shv ( npolygons)) + allocate(cgrid%mmean_can_co2 ( npolygons)) + allocate(cgrid%mmean_can_rhos ( npolygons)) + allocate(cgrid%mmean_can_prss ( npolygons)) + allocate(cgrid%mmean_gnd_temp ( npolygons)) + allocate(cgrid%mmean_gnd_shv ( npolygons)) + allocate(cgrid%mmean_can_ggnd ( npolygons)) + allocate(cgrid%mmean_sfcw_depth ( npolygons)) + allocate(cgrid%mmean_sfcw_energy ( npolygons)) + allocate(cgrid%mmean_sfcw_mass ( npolygons)) + allocate(cgrid%mmean_sfcw_temp ( npolygons)) + allocate(cgrid%mmean_sfcw_fliq ( npolygons)) + allocate(cgrid%mmean_soil_energy ( nzg,npolygons)) + allocate(cgrid%mmean_soil_mstpot ( nzg,npolygons)) + allocate(cgrid%mmean_soil_water ( nzg,npolygons)) + allocate(cgrid%mmean_soil_temp ( nzg,npolygons)) + allocate(cgrid%mmean_soil_fliq ( nzg,npolygons)) + allocate(cgrid%mmean_rshort_gnd ( npolygons)) + allocate(cgrid%mmean_par_gnd ( npolygons)) + allocate(cgrid%mmean_rlong_gnd ( npolygons)) + allocate(cgrid%mmean_rlongup ( npolygons)) + allocate(cgrid%mmean_parup ( npolygons)) + allocate(cgrid%mmean_nirup ( npolygons)) + allocate(cgrid%mmean_rshortup ( npolygons)) + allocate(cgrid%mmean_rnet ( npolygons)) + allocate(cgrid%mmean_albedo ( npolygons)) + allocate(cgrid%mmean_albedo_beam ( npolygons)) + allocate(cgrid%mmean_albedo_diff ( npolygons)) + allocate(cgrid%mmean_rlong_albedo ( npolygons)) + allocate(cgrid%mmean_ustar ( npolygons)) + allocate(cgrid%mmean_tstar ( npolygons)) + allocate(cgrid%mmean_qstar ( npolygons)) + allocate(cgrid%mmean_cstar ( npolygons)) + allocate(cgrid%mmean_carbon_ac ( npolygons)) + allocate(cgrid%mmean_carbon_st ( npolygons)) + allocate(cgrid%mmean_vapor_gc ( npolygons)) + allocate(cgrid%mmean_vapor_ac ( npolygons)) + allocate(cgrid%mmean_smoist_gg ( nzg,npolygons)) + allocate(cgrid%mmean_throughfall ( npolygons)) + allocate(cgrid%mmean_transloss ( nzg,npolygons)) + allocate(cgrid%mmean_runoff ( npolygons)) + allocate(cgrid%mmean_drainage ( npolygons)) + allocate(cgrid%mmean_sensible_gc ( npolygons)) + allocate(cgrid%mmean_sensible_ac ( npolygons)) + allocate(cgrid%mmean_sensible_gg ( nzg,npolygons)) + allocate(cgrid%mmean_qthroughfall ( npolygons)) + allocate(cgrid%mmean_qrunoff ( npolygons)) + allocate(cgrid%mmean_qdrainage ( npolygons)) + allocate(cgrid%mmean_nppleaf ( npolygons)) + allocate(cgrid%mmean_nppfroot ( npolygons)) + allocate(cgrid%mmean_nppsapwood ( npolygons)) + allocate(cgrid%mmean_nppcroot ( npolygons)) + allocate(cgrid%mmean_nppseeds ( npolygons)) + allocate(cgrid%mmean_nppwood ( npolygons)) + allocate(cgrid%mmean_nppdaily ( npolygons)) + allocate(cgrid%mmean_A_decomp ( npolygons)) + allocate(cgrid%mmean_Af_decomp ( npolygons)) + allocate(cgrid%mmean_co2_residual ( npolygons)) + allocate(cgrid%mmean_energy_residual ( npolygons)) + allocate(cgrid%mmean_water_residual ( npolygons)) + allocate(cgrid%mmean_atm_theiv ( npolygons)) + allocate(cgrid%mmean_atm_theta ( npolygons)) + allocate(cgrid%mmean_atm_temp ( npolygons)) + allocate(cgrid%mmean_atm_vpdef ( npolygons)) + allocate(cgrid%mmean_atm_shv ( npolygons)) + allocate(cgrid%mmean_atm_rshort ( npolygons)) + allocate(cgrid%mmean_atm_rshort_diff ( npolygons)) + allocate(cgrid%mmean_atm_par ( npolygons)) + allocate(cgrid%mmean_atm_par_diff ( npolygons)) + allocate(cgrid%mmean_atm_rlong ( npolygons)) + allocate(cgrid%mmean_atm_vels ( npolygons)) + allocate(cgrid%mmean_atm_rhos ( npolygons)) + allocate(cgrid%mmean_atm_prss ( npolygons)) + allocate(cgrid%mmean_atm_co2 ( npolygons)) + allocate(cgrid%mmean_pcpg ( npolygons)) + allocate(cgrid%mmean_qpcpg ( npolygons)) + allocate(cgrid%mmean_dpcpg ( npolygons)) + allocate(cgrid%mmsqu_gpp ( npolygons)) + allocate(cgrid%mmsqu_npp ( npolygons)) + allocate(cgrid%mmsqu_plresp ( npolygons)) + allocate(cgrid%mmsqu_sensible_lc ( npolygons)) + allocate(cgrid%mmsqu_vapor_lc ( npolygons)) + allocate(cgrid%mmsqu_transp ( npolygons)) + allocate(cgrid%mmsqu_sensible_wc ( npolygons)) + allocate(cgrid%mmsqu_vapor_wc ( npolygons)) + allocate(cgrid%mmsqu_rh ( npolygons)) + allocate(cgrid%mmsqu_cwd_rh ( npolygons)) + allocate(cgrid%mmsqu_nep ( npolygons)) + allocate(cgrid%mmsqu_rlongup ( npolygons)) + allocate(cgrid%mmsqu_parup ( npolygons)) + allocate(cgrid%mmsqu_nirup ( npolygons)) + allocate(cgrid%mmsqu_rshortup ( npolygons)) + allocate(cgrid%mmsqu_rnet ( npolygons)) + allocate(cgrid%mmsqu_albedo ( npolygons)) + allocate(cgrid%mmsqu_ustar ( npolygons)) + allocate(cgrid%mmsqu_carbon_ac ( npolygons)) + allocate(cgrid%mmsqu_carbon_st ( npolygons)) + allocate(cgrid%mmsqu_vapor_gc ( npolygons)) + allocate(cgrid%mmsqu_vapor_ac ( npolygons)) + allocate(cgrid%mmsqu_sensible_gc ( npolygons)) + allocate(cgrid%mmsqu_sensible_ac ( npolygons)) + end if + !------------------------------------------------------------------------------------! - nvar=nvar+1 - call vtable_edio_i_sca(ff_nhgt,nvar,igr,0,0 & - ,var_len,var_len_global,max_ptrs & - ,'FF_NHGT :90:hist:anal:dail:mont:dcyc:year') - call vtable_edio_i_sca(ff_nhgt,nvar,igr,1,0 & - ,var_len,var_len_global,max_ptrs & - ,'FF_NHGT :90:hist:anal:dail:mont:dcyc:year') - nvar=nvar+1 - call vtable_edio_i_sca(ndcycle,nvar,igr,0,0 & - ,var_len,var_len_global,max_ptrs & - ,'NDCYCLE :90:hist:anal:dail:mont:dcyc:year') - call vtable_edio_i_sca(ndcycle,nvar,igr,1,0 & - ,var_len,var_len_global,max_ptrs & - ,'NDCYCLE :90:hist:anal:dail:mont:dcyc:year') - nvar=nvar+1 - call vtable_edio_i_sca(isoilflg(igr),nvar,igr,0,0 & - ,var_len,var_len_global,max_ptrs & - ,'ISOILFLG :90:hist:anal:dail:mont:dcyc:year') - call vtable_edio_i_sca(isoilflg(igr),nvar,igr,1,0 & - ,var_len,var_len_global,max_ptrs & - ,'ISOILFLG :90:hist:anal:dail:mont:dcyc:year') - nvar=nvar+1 - call vtable_edio_r_sca(slxsand,nvar,igr,0,0 & - ,var_len,var_len_global,max_ptrs & - ,'SLXSAND :90:hist:anal:dail:mont:dcyc:year') - call vtable_edio_r_sca(slxsand,nvar,igr,1,0 & - ,var_len,var_len_global,max_ptrs & - ,'SLXSAND :90:hist:anal:dail:mont:dcyc:year') + !------------------------------------------------------------------------------------! + ! Allocate the mean diurnal cycles only if mean diurnal cycles are requested ! + ! by the user. ! + !------------------------------------------------------------------------------------! + if (writing_dcyc) then + allocate(cgrid%qmean_gpp ( ndcycle,npolygons)) + allocate(cgrid%qmean_npp ( ndcycle,npolygons)) + allocate(cgrid%qmean_leaf_resp ( ndcycle,npolygons)) + allocate(cgrid%qmean_root_resp ( ndcycle,npolygons)) + allocate(cgrid%qmean_growth_resp ( ndcycle,npolygons)) + allocate(cgrid%qmean_storage_resp ( ndcycle,npolygons)) + allocate(cgrid%qmean_vleaf_resp ( ndcycle,npolygons)) + allocate(cgrid%qmean_plresp ( ndcycle,npolygons)) + allocate(cgrid%qmean_leaf_energy ( ndcycle,npolygons)) + allocate(cgrid%qmean_leaf_water ( ndcycle,npolygons)) + allocate(cgrid%qmean_leaf_hcap ( ndcycle,npolygons)) + allocate(cgrid%qmean_leaf_vpdef ( ndcycle,npolygons)) + allocate(cgrid%qmean_leaf_temp ( ndcycle,npolygons)) + allocate(cgrid%qmean_leaf_fliq ( ndcycle,npolygons)) + allocate(cgrid%qmean_leaf_gsw ( ndcycle,npolygons)) + allocate(cgrid%qmean_leaf_gbw ( ndcycle,npolygons)) + allocate(cgrid%qmean_wood_energy ( ndcycle,npolygons)) + allocate(cgrid%qmean_wood_water ( ndcycle,npolygons)) + allocate(cgrid%qmean_wood_hcap ( ndcycle,npolygons)) + allocate(cgrid%qmean_wood_temp ( ndcycle,npolygons)) + allocate(cgrid%qmean_wood_fliq ( ndcycle,npolygons)) + allocate(cgrid%qmean_wood_gbw ( ndcycle,npolygons)) + allocate(cgrid%qmean_fs_open ( ndcycle,npolygons)) + allocate(cgrid%qmean_fsw ( ndcycle,npolygons)) + allocate(cgrid%qmean_fsn ( ndcycle,npolygons)) + allocate(cgrid%qmean_psi_open ( ndcycle,npolygons)) + allocate(cgrid%qmean_psi_closed ( ndcycle,npolygons)) + allocate(cgrid%qmean_water_supply ( ndcycle,npolygons)) + allocate(cgrid%qmean_par_l ( ndcycle,npolygons)) + allocate(cgrid%qmean_par_l_beam ( ndcycle,npolygons)) + allocate(cgrid%qmean_par_l_diff ( ndcycle,npolygons)) + allocate(cgrid%qmean_rshort_l ( ndcycle,npolygons)) + allocate(cgrid%qmean_rlong_l ( ndcycle,npolygons)) + allocate(cgrid%qmean_sensible_lc ( ndcycle,npolygons)) + allocate(cgrid%qmean_vapor_lc ( ndcycle,npolygons)) + allocate(cgrid%qmean_transp ( ndcycle,npolygons)) + allocate(cgrid%qmean_intercepted_al ( ndcycle,npolygons)) + allocate(cgrid%qmean_wshed_lg ( ndcycle,npolygons)) + allocate(cgrid%qmean_rshort_w ( ndcycle,npolygons)) + allocate(cgrid%qmean_rlong_w ( ndcycle,npolygons)) + allocate(cgrid%qmean_sensible_wc ( ndcycle,npolygons)) + allocate(cgrid%qmean_vapor_wc ( ndcycle,npolygons)) + allocate(cgrid%qmean_intercepted_aw ( ndcycle,npolygons)) + allocate(cgrid%qmean_wshed_wg ( ndcycle,npolygons)) + allocate(cgrid%qmean_rh ( ndcycle,npolygons)) + allocate(cgrid%qmean_cwd_rh ( ndcycle,npolygons)) + allocate(cgrid%qmean_nep ( ndcycle,npolygons)) + allocate(cgrid%qmean_rk4step ( ndcycle,npolygons)) + allocate(cgrid%qmean_available_water ( ndcycle,npolygons)) + allocate(cgrid%qmean_can_theiv ( ndcycle,npolygons)) + allocate(cgrid%qmean_can_theta ( ndcycle,npolygons)) + allocate(cgrid%qmean_can_vpdef ( ndcycle,npolygons)) + allocate(cgrid%qmean_can_temp ( ndcycle,npolygons)) + allocate(cgrid%qmean_can_shv ( ndcycle,npolygons)) + allocate(cgrid%qmean_can_co2 ( ndcycle,npolygons)) + allocate(cgrid%qmean_can_rhos ( ndcycle,npolygons)) + allocate(cgrid%qmean_can_prss ( ndcycle,npolygons)) + allocate(cgrid%qmean_gnd_temp ( ndcycle,npolygons)) + allocate(cgrid%qmean_gnd_shv ( ndcycle,npolygons)) + allocate(cgrid%qmean_can_ggnd ( ndcycle,npolygons)) + allocate(cgrid%qmean_sfcw_depth ( ndcycle,npolygons)) + allocate(cgrid%qmean_sfcw_energy ( ndcycle,npolygons)) + allocate(cgrid%qmean_sfcw_mass ( ndcycle,npolygons)) + allocate(cgrid%qmean_sfcw_temp ( ndcycle,npolygons)) + allocate(cgrid%qmean_sfcw_fliq ( ndcycle,npolygons)) + allocate(cgrid%qmean_soil_energy ( nzg, ndcycle,npolygons)) + allocate(cgrid%qmean_soil_mstpot ( nzg, ndcycle,npolygons)) + allocate(cgrid%qmean_soil_water ( nzg, ndcycle,npolygons)) + allocate(cgrid%qmean_soil_temp ( nzg, ndcycle,npolygons)) + allocate(cgrid%qmean_soil_fliq ( nzg, ndcycle,npolygons)) + allocate(cgrid%qmean_rshort_gnd ( ndcycle,npolygons)) + allocate(cgrid%qmean_par_gnd ( ndcycle,npolygons)) + allocate(cgrid%qmean_rlong_gnd ( ndcycle,npolygons)) + allocate(cgrid%qmean_rlongup ( ndcycle,npolygons)) + allocate(cgrid%qmean_parup ( ndcycle,npolygons)) + allocate(cgrid%qmean_nirup ( ndcycle,npolygons)) + allocate(cgrid%qmean_rshortup ( ndcycle,npolygons)) + allocate(cgrid%qmean_rnet ( ndcycle,npolygons)) + allocate(cgrid%qmean_albedo ( ndcycle,npolygons)) + allocate(cgrid%qmean_albedo_beam ( ndcycle,npolygons)) + allocate(cgrid%qmean_albedo_diff ( ndcycle,npolygons)) + allocate(cgrid%qmean_rlong_albedo ( ndcycle,npolygons)) + allocate(cgrid%qmean_ustar ( ndcycle,npolygons)) + allocate(cgrid%qmean_tstar ( ndcycle,npolygons)) + allocate(cgrid%qmean_qstar ( ndcycle,npolygons)) + allocate(cgrid%qmean_cstar ( ndcycle,npolygons)) + allocate(cgrid%qmean_carbon_ac ( ndcycle,npolygons)) + allocate(cgrid%qmean_carbon_st ( ndcycle,npolygons)) + allocate(cgrid%qmean_vapor_gc ( ndcycle,npolygons)) + allocate(cgrid%qmean_vapor_ac ( ndcycle,npolygons)) + allocate(cgrid%qmean_smoist_gg ( nzg, ndcycle,npolygons)) + allocate(cgrid%qmean_throughfall ( ndcycle,npolygons)) + allocate(cgrid%qmean_transloss ( nzg, ndcycle,npolygons)) + allocate(cgrid%qmean_runoff ( ndcycle,npolygons)) + allocate(cgrid%qmean_drainage ( ndcycle,npolygons)) + allocate(cgrid%qmean_sensible_gc ( ndcycle,npolygons)) + allocate(cgrid%qmean_sensible_ac ( ndcycle,npolygons)) + allocate(cgrid%qmean_sensible_gg ( nzg, ndcycle,npolygons)) + allocate(cgrid%qmean_qthroughfall ( ndcycle,npolygons)) + allocate(cgrid%qmean_qrunoff ( ndcycle,npolygons)) + allocate(cgrid%qmean_qdrainage ( ndcycle,npolygons)) + allocate(cgrid%qmean_atm_theiv ( ndcycle,npolygons)) + allocate(cgrid%qmean_atm_theta ( ndcycle,npolygons)) + allocate(cgrid%qmean_atm_temp ( ndcycle,npolygons)) + allocate(cgrid%qmean_atm_vpdef ( ndcycle,npolygons)) + allocate(cgrid%qmean_atm_shv ( ndcycle,npolygons)) + allocate(cgrid%qmean_atm_rshort ( ndcycle,npolygons)) + allocate(cgrid%qmean_atm_rshort_diff ( ndcycle,npolygons)) + allocate(cgrid%qmean_atm_par ( ndcycle,npolygons)) + allocate(cgrid%qmean_atm_par_diff ( ndcycle,npolygons)) + allocate(cgrid%qmean_atm_rlong ( ndcycle,npolygons)) + allocate(cgrid%qmean_atm_vels ( ndcycle,npolygons)) + allocate(cgrid%qmean_atm_rhos ( ndcycle,npolygons)) + allocate(cgrid%qmean_atm_prss ( ndcycle,npolygons)) + allocate(cgrid%qmean_atm_co2 ( ndcycle,npolygons)) + allocate(cgrid%qmean_pcpg ( ndcycle,npolygons)) + allocate(cgrid%qmean_qpcpg ( ndcycle,npolygons)) + allocate(cgrid%qmean_dpcpg ( ndcycle,npolygons)) + allocate(cgrid%qmsqu_gpp ( ndcycle,npolygons)) + allocate(cgrid%qmsqu_npp ( ndcycle,npolygons)) + allocate(cgrid%qmsqu_plresp ( ndcycle,npolygons)) + allocate(cgrid%qmsqu_sensible_lc ( ndcycle,npolygons)) + allocate(cgrid%qmsqu_vapor_lc ( ndcycle,npolygons)) + allocate(cgrid%qmsqu_transp ( ndcycle,npolygons)) + allocate(cgrid%qmsqu_sensible_wc ( ndcycle,npolygons)) + allocate(cgrid%qmsqu_vapor_wc ( ndcycle,npolygons)) + allocate(cgrid%qmsqu_rh ( ndcycle,npolygons)) + allocate(cgrid%qmsqu_cwd_rh ( ndcycle,npolygons)) + allocate(cgrid%qmsqu_nep ( ndcycle,npolygons)) + allocate(cgrid%qmsqu_rlongup ( ndcycle,npolygons)) + allocate(cgrid%qmsqu_parup ( ndcycle,npolygons)) + allocate(cgrid%qmsqu_nirup ( ndcycle,npolygons)) + allocate(cgrid%qmsqu_rshortup ( ndcycle,npolygons)) + allocate(cgrid%qmsqu_rnet ( ndcycle,npolygons)) + allocate(cgrid%qmsqu_albedo ( ndcycle,npolygons)) + allocate(cgrid%qmsqu_ustar ( ndcycle,npolygons)) + allocate(cgrid%qmsqu_carbon_ac ( ndcycle,npolygons)) + allocate(cgrid%qmsqu_carbon_st ( ndcycle,npolygons)) + allocate(cgrid%qmsqu_vapor_gc ( ndcycle,npolygons)) + allocate(cgrid%qmsqu_vapor_ac ( ndcycle,npolygons)) + allocate(cgrid%qmsqu_sensible_gc ( ndcycle,npolygons)) + allocate(cgrid%qmsqu_sensible_ac ( ndcycle,npolygons)) + end if + return + end subroutine allocate_edtype + !=======================================================================================! + !=======================================================================================! - nvar=nvar+1 - call vtable_edio_r_sca(slxclay,nvar,igr,0,0 & - ,var_len,var_len_global,max_ptrs & - ,'SLXCLAY :90:hist:anal:dail:mont:dcyc:year') - call vtable_edio_r_sca(slxclay,nvar,igr,1,0 & - ,var_len,var_len_global,max_ptrs & - ,'SLXCLAY :90:hist:anal:dail:mont:dcyc:year') - !------------------------------------------------------------------------------------! - ! 1-D variables, soil layers. ! - !------------------------------------------------------------------------------------! - var_len = nzg - var_len_global = nzg + !=======================================================================================! + !=======================================================================================! + ! This subroutine allocates the site-level variables. ! + !---------------------------------------------------------------------------------------! + subroutine allocate_polygontype(cpoly,nsites) - nvar=nvar+1 - call vtable_edio_r(nzg,slz,nvar,igr,0,0 & - ,var_len,var_len_global,max_ptrs & - ,'SLZ :92:hist:anal:dail:mont:dcyc:year') - call vtable_edio_r(nzg,slz,nvar,igr,1,0 & - ,var_len,var_len_global,max_ptrs & - ,'SLZ :92:hist:anal:dail:mont:dcyc:year') + implicit none + + !----- Arguments. -------------------------------------------------------------------! + type(polygontype), target :: cpoly + integer , intent(in) :: nsites !------------------------------------------------------------------------------------! + !----- Make sure that we nullify all pointers for a safe allocation. ----------------! + call nullify_polygontype(cpoly) !------------------------------------------------------------------------------------! - ! 1-D variables, height classes. ! - !------------------------------------------------------------------------------------! - var_len = ff_nhgt - var_len_global = ff_nhgt - - nvar=nvar+1 - call vtable_edio_r(ff_nhgt,hgt_class,nvar,igr,0,0 & - ,var_len,var_len_global,max_ptrs & - ,'HGT_CLASS :96:hist:anal:dail:mont:dcyc:year') - call vtable_edio_r(ff_nhgt,hgt_class,nvar,igr,1,0 & - ,var_len,var_len_global,max_ptrs & - ,'HGT_CLASS :96:hist:anal:dail:mont:dcyc:year') + !----- Define the number of sites. --------------------------------------------------! + cpoly%nsites = nsites !------------------------------------------------------------------------------------! - + !------------------------------------------------------------------------------------! + ! Up to now, there is no reason for an empty polygon, so the code will always ! + ! assume that there is at least one site in the polygon. In case nsites is zero, ! + ! we should stop the run and warn the user. ! + !------------------------------------------------------------------------------------! + if (nsites == 0) then + call fatal_error('Attempt to set a polygon with 0 sites. This cannot happen!' & + ,'allocate_polygontype','ed_state_vars.f90') + end if + !------------------------------------------------------------------------------------! - !----- Save the number of global-level variables that go to the output. -------------! - nioglobal=nvar - !------------------------------------------------------------------------------------! + allocate(cpoly%site ( nsites)) + + allocate(cpoly%sipa_id ( nsites)) + allocate(cpoly%sipa_n ( nsites)) + + allocate(cpoly%patch_count ( nsites)) + allocate(cpoly%sitenum ( nsites)) + allocate(cpoly%met ( nsites)) + allocate(cpoly%area ( nsites)) + allocate(cpoly%patch_area ( nsites)) + allocate(cpoly%elevation ( nsites)) + allocate(cpoly%slope ( nsites)) + allocate(cpoly%aspect ( nsites)) + allocate(cpoly%lsl ( nsites)) + allocate(cpoly%ncol_soil ( nsites)) + allocate(cpoly%ntext_soil ( nzg,nsites)) + allocate(cpoly%TCI ( nsites)) + allocate(cpoly%pptweight ( nsites)) + allocate(cpoly%hydro_next ( nsites)) + allocate(cpoly%hydro_prev ( nsites)) + allocate(cpoly%moist_W ( nsites)) + allocate(cpoly%moist_f ( nsites)) + allocate(cpoly%moist_tau ( nsites)) + allocate(cpoly%moist_zi ( nsites)) + allocate(cpoly%baseflow ( nsites)) + allocate(cpoly%runoff ( nsites)) + allocate(cpoly%qrunoff ( nsites)) + allocate(cpoly%min_monthly_temp ( nsites)) + allocate(cpoly%num_landuse_years ( nsites)) + allocate(cpoly%mindbh_primary ( n_pft,nsites)) + allocate(cpoly%probharv_primary ( n_pft,nsites)) + allocate(cpoly%mindbh_secondary ( n_pft,nsites)) + allocate(cpoly%probharv_secondary ( n_pft,nsites)) + allocate(cpoly%plantation ( nsites)) + allocate(cpoly%agri_stocking_pft ( nsites)) + allocate(cpoly%agri_stocking_density ( nsites)) + allocate(cpoly%plantation_stocking_pft ( nsites)) + allocate(cpoly%plantation_stocking_density ( nsites)) + allocate(cpoly%primary_harvest_memory ( nsites)) + allocate(cpoly%secondary_harvest_memory ( nsites)) + allocate(cpoly%fire_disturbance_rate ( nsites)) + allocate(cpoly%ignition_rate ( nsites)) + allocate(cpoly%lambda_fire ( 12,nsites)) + allocate(cpoly%avg_monthly_pcpg ( 12,nsites)) + allocate(cpoly%phen_pars ( nsites)) + allocate(cpoly%nat_disturbance_rate ( nsites)) + allocate(cpoly%nat_dist_type ( nsites)) + allocate(cpoly%disturbance_memory (n_dist_types,n_dist_types,nsites)) + allocate(cpoly%disturbance_rates (n_dist_types,n_dist_types,nsites)) + allocate(cpoly%green_leaf_factor ( n_pft,nsites)) + allocate(cpoly%leaf_aging_factor ( n_pft,nsites)) + allocate(cpoly%basal_area ( n_pft, n_dbh,nsites)) + allocate(cpoly%basal_area_growth ( n_pft, n_dbh,nsites)) + allocate(cpoly%agb ( n_pft, n_dbh,nsites)) + allocate(cpoly%agb_growth ( n_pft, n_dbh,nsites)) + allocate(cpoly%basal_area_mort ( n_pft, n_dbh,nsites)) + allocate(cpoly%basal_area_cut ( n_pft, n_dbh,nsites)) + allocate(cpoly%agb_mort ( n_pft, n_dbh,nsites)) + allocate(cpoly%agb_cut ( n_pft, n_dbh,nsites)) + + allocate(cpoly%cosaoi ( nsites)) + allocate(cpoly%daylight ( nsites)) + allocate(cpoly%nighttime ( nsites)) + allocate(cpoly%rad_avg ( nsites)) + + allocate(cpoly%fmean_atm_theiv ( nsites)) + allocate(cpoly%fmean_atm_theta ( nsites)) + allocate(cpoly%fmean_atm_temp ( nsites)) + allocate(cpoly%fmean_atm_vpdef ( nsites)) + allocate(cpoly%fmean_atm_shv ( nsites)) + allocate(cpoly%fmean_atm_rshort ( nsites)) + allocate(cpoly%fmean_atm_rshort_diff ( nsites)) + allocate(cpoly%fmean_atm_par ( nsites)) + allocate(cpoly%fmean_atm_par_diff ( nsites)) + allocate(cpoly%fmean_atm_rlong ( nsites)) + allocate(cpoly%fmean_atm_vels ( nsites)) + allocate(cpoly%fmean_atm_rhos ( nsites)) + allocate(cpoly%fmean_atm_prss ( nsites)) + allocate(cpoly%fmean_atm_co2 ( nsites)) + allocate(cpoly%fmean_pcpg ( nsites)) + allocate(cpoly%fmean_qpcpg ( nsites)) + allocate(cpoly%fmean_dpcpg ( nsites)) + + if (writing_long) then + allocate(cpoly%dmean_atm_theiv ( nsites)) + allocate(cpoly%dmean_atm_theta ( nsites)) + allocate(cpoly%dmean_atm_temp ( nsites)) + allocate(cpoly%dmean_atm_vpdef ( nsites)) + allocate(cpoly%dmean_atm_shv ( nsites)) + allocate(cpoly%dmean_atm_rshort ( nsites)) + allocate(cpoly%dmean_atm_rshort_diff ( nsites)) + allocate(cpoly%dmean_atm_par ( nsites)) + allocate(cpoly%dmean_atm_par_diff ( nsites)) + allocate(cpoly%dmean_atm_rlong ( nsites)) + allocate(cpoly%dmean_atm_vels ( nsites)) + allocate(cpoly%dmean_atm_rhos ( nsites)) + allocate(cpoly%dmean_atm_prss ( nsites)) + allocate(cpoly%dmean_atm_co2 ( nsites)) + allocate(cpoly%dmean_pcpg ( nsites)) + allocate(cpoly%dmean_qpcpg ( nsites)) + allocate(cpoly%dmean_dpcpg ( nsites)) + end if + + if (writing_eorq) then + allocate(cpoly%mmean_atm_theiv ( nsites)) + allocate(cpoly%mmean_atm_theta ( nsites)) + allocate(cpoly%mmean_atm_temp ( nsites)) + allocate(cpoly%mmean_atm_vpdef ( nsites)) + allocate(cpoly%mmean_atm_shv ( nsites)) + allocate(cpoly%mmean_atm_rshort ( nsites)) + allocate(cpoly%mmean_atm_rshort_diff ( nsites)) + allocate(cpoly%mmean_atm_par ( nsites)) + allocate(cpoly%mmean_atm_par_diff ( nsites)) + allocate(cpoly%mmean_atm_rlong ( nsites)) + allocate(cpoly%mmean_atm_vels ( nsites)) + allocate(cpoly%mmean_atm_rhos ( nsites)) + allocate(cpoly%mmean_atm_prss ( nsites)) + allocate(cpoly%mmean_atm_co2 ( nsites)) + allocate(cpoly%mmean_pcpg ( nsites)) + allocate(cpoly%mmean_qpcpg ( nsites)) + allocate(cpoly%mmean_dpcpg ( nsites)) + end if + + if (writing_dcyc) then + allocate(cpoly%qmean_atm_theiv ( ndcycle,nsites)) + allocate(cpoly%qmean_atm_theta ( ndcycle,nsites)) + allocate(cpoly%qmean_atm_temp ( ndcycle,nsites)) + allocate(cpoly%qmean_atm_vpdef ( ndcycle,nsites)) + allocate(cpoly%qmean_atm_shv ( ndcycle,nsites)) + allocate(cpoly%qmean_atm_rshort ( ndcycle,nsites)) + allocate(cpoly%qmean_atm_rshort_diff ( ndcycle,nsites)) + allocate(cpoly%qmean_atm_par ( ndcycle,nsites)) + allocate(cpoly%qmean_atm_par_diff ( ndcycle,nsites)) + allocate(cpoly%qmean_atm_rlong ( ndcycle,nsites)) + allocate(cpoly%qmean_atm_vels ( ndcycle,nsites)) + allocate(cpoly%qmean_atm_rhos ( ndcycle,nsites)) + allocate(cpoly%qmean_atm_prss ( ndcycle,nsites)) + allocate(cpoly%qmean_atm_co2 ( ndcycle,nsites)) + allocate(cpoly%qmean_pcpg ( ndcycle,nsites)) + allocate(cpoly%qmean_qpcpg ( ndcycle,nsites)) + allocate(cpoly%qmean_dpcpg ( ndcycle,nsites)) + end if return - end subroutine filltab_globtype + end subroutine allocate_polygontype !=======================================================================================! !=======================================================================================! @@ -8563,53 +3779,499 @@ end subroutine filltab_globtype !=======================================================================================! !=======================================================================================! - ! This routine will fill the pointer table with the polygon-level variables ! - ! (edtype). ! + ! This subroutine allocates the patch-level variables. ! !---------------------------------------------------------------------------------------! - subroutine filltab_edtype(igr,init) + subroutine allocate_sitetype(csite,npatches) implicit none + !----- Arguments. -------------------------------------------------------------------! - integer , intent(in) :: init - integer , intent(in) :: igr + type(sitetype), target :: csite + integer , intent(in) :: npatches !----- Local variables. -------------------------------------------------------------! - type(edtype), pointer :: cgrid - integer :: var_len - integer :: max_ptrs - integer :: var_len_global - integer :: nvar - integer :: npts + integer :: ipa !------------------------------------------------------------------------------------! - cgrid => edgrid_g(igr) - !------ Define the global dimensions. -----------------------------------------------! - var_len = cgrid%npolygons - var_len_global = cgrid%npolygons_global - max_ptrs = 1 + !----- Make sure that we nullify all pointers for a safe allocation. ----------------! + call nullify_sitetype(csite) + !------------------------------------------------------------------------------------! - !------ Continue the counting. ------------------------------------------------------! - nvar = nioglobal - call filltab_edtype_p10 (cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) - call filltab_edtype_p11 (cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) - call filltab_edtype_m11 (cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) - call filltab_edtype_p120(cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) - call filltab_edtype_p12 (cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) - call filltab_edtype_m12 (cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) - call filltab_edtype_p14 (cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) - call filltab_edtype_p16 (cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) - call filltab_edtype_p19 (cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) - call filltab_edtype_p146(cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) - call filltab_edtype_p199(cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) - call filltab_edtype_p155(cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) - !----- Save the number of polygon-level (edtype) variables that go to the output. ---! - if (init == 0) niogrid=nvar-nioglobal + !----- Define the number of sites. --------------------------------------------------! + csite%npatches = npatches + !------------------------------------------------------------------------------------! + + + !------------------------------------------------------------------------------------! + ! Up to now, there is no reason for an empty site, so the code will always ! + ! assume that there is at least one patch in the site. In case npatches is zero, ! + ! we should stop the run and warn the user. ! + !------------------------------------------------------------------------------------! + if (npatches == 0) then + call fatal_error('Attempt to set a site with 0 patches. This cannot happen!' & + ,'allocate_sitetype','ed_state_vars.f90') + end if + !------------------------------------------------------------------------------------! + + + + + allocate(csite%patch (npatches)) + + !----- Assume that all patches are empty. -------------------------------------------! + do ipa=1,npatches + csite%patch(ipa)%ncohorts = 0 + end do !------------------------------------------------------------------------------------! + allocate(csite%paco_id ( npatches)) + allocate(csite%paco_n ( npatches)) + allocate(csite%cohort_count ( npatches)) + allocate(csite%pname ( npatches)) + allocate(csite%area ( npatches)) + allocate(csite%age ( npatches)) + allocate(csite%dist_type ( npatches)) + allocate(csite%fast_soil_C ( npatches)) + allocate(csite%slow_soil_C ( npatches)) + allocate(csite%structural_soil_C ( npatches)) + allocate(csite%structural_soil_L ( npatches)) + allocate(csite%mineralized_soil_N ( npatches)) + allocate(csite%fast_soil_N ( npatches)) + allocate(csite%sum_dgd ( npatches)) + allocate(csite%sum_chd ( npatches)) + allocate(csite%plantation ( npatches)) + allocate(csite%can_theiv ( npatches)) + allocate(csite%can_vpdef ( npatches)) + allocate(csite%can_temp ( npatches)) + allocate(csite%can_temp_pv ( npatches)) + allocate(csite%can_shv ( npatches)) + allocate(csite%can_co2 ( npatches)) + allocate(csite%can_rhos ( npatches)) + allocate(csite%can_prss ( npatches)) + allocate(csite%can_theta ( npatches)) + allocate(csite%can_depth ( npatches)) + allocate(csite%opencan_frac ( npatches)) + allocate(csite%ggbare ( npatches)) + allocate(csite%ggveg ( npatches)) + allocate(csite%ggnet ( npatches)) + allocate(csite%ggsoil ( npatches)) + allocate(csite%nlev_sfcwater ( npatches)) + allocate(csite%sfcwater_mass ( nzs,npatches)) + allocate(csite%sfcwater_energy ( nzs,npatches)) + allocate(csite%sfcwater_depth ( nzs,npatches)) + allocate(csite%sfcwater_tempk ( nzs,npatches)) + allocate(csite%sfcwater_fracliq ( nzs,npatches)) + allocate(csite%rshort_s ( nzs,npatches)) + allocate(csite%rshort_s_beam ( nzs,npatches)) + allocate(csite%rshort_s_diffuse ( nzs,npatches)) + allocate(csite%par_s ( nzs,npatches)) + allocate(csite%par_s_beam ( nzs,npatches)) + allocate(csite%par_s_diffuse ( nzs,npatches)) + allocate(csite%soil_energy ( nzg,npatches)) + allocate(csite%soil_mstpot ( nzg,npatches)) + allocate(csite%soil_water ( nzg,npatches)) + allocate(csite%soil_tempk ( nzg,npatches)) + allocate(csite%soil_fracliq ( nzg,npatches)) + allocate(csite%rootdense ( nzg,npatches)) + allocate(csite%ground_shv ( npatches)) + allocate(csite%ground_ssh ( npatches)) + allocate(csite%ground_temp ( npatches)) + allocate(csite%ground_fliq ( npatches)) + allocate(csite%rough ( npatches)) + allocate(csite%par_l_max ( npatches)) + allocate(csite%par_l_beam_max ( npatches)) + allocate(csite%par_l_diffuse_max ( npatches)) + allocate(csite%A_o_max ( n_pft,npatches)) + allocate(csite%A_c_max ( n_pft,npatches)) + allocate(csite%avg_daily_temp ( npatches)) + allocate(csite%avg_monthly_gndwater ( npatches)) + allocate(csite%avg_monthly_waterdef ( npatches)) + allocate(csite%wbudget_loss2atm ( npatches)) + allocate(csite%wbudget_denseffect ( npatches)) + allocate(csite%wbudget_precipgain ( npatches)) + allocate(csite%wbudget_loss2runoff ( npatches)) + allocate(csite%wbudget_loss2drainage ( npatches)) + allocate(csite%wbudget_initialstorage ( npatches)) + allocate(csite%wbudget_residual ( npatches)) + allocate(csite%ebudget_loss2atm ( npatches)) + allocate(csite%ebudget_denseffect ( npatches)) + allocate(csite%ebudget_prsseffect ( npatches)) + allocate(csite%ebudget_loss2runoff ( npatches)) + allocate(csite%ebudget_loss2drainage ( npatches)) + allocate(csite%ebudget_netrad ( npatches)) + allocate(csite%ebudget_precipgain ( npatches)) + allocate(csite%ebudget_initialstorage ( npatches)) + allocate(csite%ebudget_residual ( npatches)) + allocate(csite%co2budget_initialstorage ( npatches)) + allocate(csite%co2budget_residual ( npatches)) + allocate(csite%co2budget_loss2atm ( npatches)) + allocate(csite%co2budget_denseffect ( npatches)) + allocate(csite%co2budget_gpp ( npatches)) + allocate(csite%co2budget_plresp ( npatches)) + allocate(csite%co2budget_rh ( npatches)) + allocate(csite%today_A_decomp ( npatches)) + allocate(csite%today_Af_decomp ( npatches)) + allocate(csite%repro ( n_pft,npatches)) + allocate(csite%veg_rough ( npatches)) + allocate(csite%veg_height ( npatches)) + allocate(csite%veg_displace ( npatches)) + allocate(csite%fsc_in ( npatches)) + allocate(csite%ssc_in ( npatches)) + allocate(csite%ssl_in ( npatches)) + allocate(csite%fsn_in ( npatches)) + allocate(csite%total_plant_nitrogen_uptake ( npatches)) + allocate(csite%mineralized_N_loss ( npatches)) + allocate(csite%mineralized_N_input ( npatches)) + allocate(csite%rshort_g ( npatches)) + allocate(csite%rshort_g_beam ( npatches)) + allocate(csite%rshort_g_diffuse ( npatches)) + allocate(csite%par_g ( npatches)) + allocate(csite%par_g_beam ( npatches)) + allocate(csite%par_g_diffuse ( npatches)) + allocate(csite%par_b ( npatches)) + allocate(csite%par_b_beam ( npatches)) + allocate(csite%par_b_diffuse ( npatches)) + allocate(csite%nir_b ( npatches)) + allocate(csite%nir_b_beam ( npatches)) + allocate(csite%nir_b_diffuse ( npatches)) + allocate(csite%rlong_g ( npatches)) + allocate(csite%rlong_g_surf ( npatches)) + allocate(csite%rlong_g_incid ( npatches)) + allocate(csite%rlong_s ( npatches)) + allocate(csite%rlong_s_surf ( npatches)) + allocate(csite%rlong_s_incid ( npatches)) + allocate(csite%albedo ( npatches)) + allocate(csite%albedo_beam ( npatches)) + allocate(csite%albedo_diffuse ( npatches)) + allocate(csite%rlong_albedo ( npatches)) + allocate(csite%rnet ( npatches)) + allocate(csite%rlongup ( npatches)) + allocate(csite%parup ( npatches)) + allocate(csite%nirup ( npatches)) + allocate(csite%rshortup ( npatches)) + allocate(csite%total_sfcw_depth ( npatches)) + allocate(csite%snowfac ( npatches)) + allocate(csite%A_decomp ( npatches)) + allocate(csite%f_decomp ( npatches)) + allocate(csite%rh ( npatches)) + allocate(csite%cwd_rh ( npatches)) + allocate(csite%cumlai_profile (n_pft,ff_nhgt,npatches)) + allocate(csite%plant_ag_biomass ( npatches)) + allocate(csite%htry ( npatches)) + allocate(csite%hprev ( npatches)) + allocate(csite%ustar ( npatches)) + allocate(csite%tstar ( npatches)) + allocate(csite%qstar ( npatches)) + allocate(csite%cstar ( npatches)) + allocate(csite%zeta ( npatches)) + allocate(csite%ribulk ( npatches)) + allocate(csite%upwp ( npatches)) + allocate(csite%qpwp ( npatches)) + allocate(csite%cpwp ( npatches)) + allocate(csite%tpwp ( npatches)) + allocate(csite%wpwp ( npatches)) + allocate(csite%watertable ( npatches)) + allocate(csite%moist_dz ( npatches)) + allocate(csite%ksat ( npatches)) + allocate(csite%soil_sat_energy ( npatches)) + allocate(csite%soil_sat_water ( npatches)) + allocate(csite%soil_sat_heat ( npatches)) + allocate(csite%runoff_A ( 3,npatches)) + allocate(csite%runoff_rate ( npatches)) + allocate(csite%runoff ( npatches)) + allocate(csite%qrunoff ( npatches)) + allocate(csite%fmean_rh ( npatches)) + allocate(csite%fmean_cwd_rh ( npatches)) + allocate(csite%fmean_nep ( npatches)) + allocate(csite%fmean_rk4step ( npatches)) + allocate(csite%fmean_available_water ( npatches)) + allocate(csite%fmean_can_theiv ( npatches)) + allocate(csite%fmean_can_theta ( npatches)) + allocate(csite%fmean_can_vpdef ( npatches)) + allocate(csite%fmean_can_temp ( npatches)) + allocate(csite%fmean_can_shv ( npatches)) + allocate(csite%fmean_can_co2 ( npatches)) + allocate(csite%fmean_can_rhos ( npatches)) + allocate(csite%fmean_can_prss ( npatches)) + allocate(csite%fmean_gnd_temp ( npatches)) + allocate(csite%fmean_gnd_shv ( npatches)) + allocate(csite%fmean_can_ggnd ( npatches)) + allocate(csite%fmean_sfcw_depth ( npatches)) + allocate(csite%fmean_sfcw_energy ( npatches)) + allocate(csite%fmean_sfcw_mass ( npatches)) + allocate(csite%fmean_sfcw_temp ( npatches)) + allocate(csite%fmean_sfcw_fliq ( npatches)) + allocate(csite%fmean_soil_energy ( nzg,npatches)) + allocate(csite%fmean_soil_mstpot ( nzg,npatches)) + allocate(csite%fmean_soil_water ( nzg,npatches)) + allocate(csite%fmean_soil_temp ( nzg,npatches)) + allocate(csite%fmean_soil_fliq ( nzg,npatches)) + allocate(csite%fmean_rshort_gnd ( npatches)) + allocate(csite%fmean_par_gnd ( npatches)) + allocate(csite%fmean_rlong_gnd ( npatches)) + allocate(csite%fmean_rlongup ( npatches)) + allocate(csite%fmean_parup ( npatches)) + allocate(csite%fmean_nirup ( npatches)) + allocate(csite%fmean_rshortup ( npatches)) + allocate(csite%fmean_rnet ( npatches)) + allocate(csite%fmean_albedo ( npatches)) + allocate(csite%fmean_albedo_beam ( npatches)) + allocate(csite%fmean_albedo_diff ( npatches)) + allocate(csite%fmean_rlong_albedo ( npatches)) + allocate(csite%fmean_ustar ( npatches)) + allocate(csite%fmean_tstar ( npatches)) + allocate(csite%fmean_qstar ( npatches)) + allocate(csite%fmean_cstar ( npatches)) + allocate(csite%fmean_carbon_ac ( npatches)) + allocate(csite%fmean_carbon_st ( npatches)) + allocate(csite%fmean_vapor_gc ( npatches)) + allocate(csite%fmean_vapor_ac ( npatches)) + allocate(csite%fmean_smoist_gg ( nzg,npatches)) + allocate(csite%fmean_throughfall ( npatches)) + allocate(csite%fmean_transloss ( nzg,npatches)) + allocate(csite%fmean_runoff ( npatches)) + allocate(csite%fmean_drainage ( npatches)) + allocate(csite%fmean_sensible_gc ( npatches)) + allocate(csite%fmean_sensible_ac ( npatches)) + allocate(csite%fmean_sensible_gg ( nzg,npatches)) + allocate(csite%fmean_qthroughfall ( npatches)) + allocate(csite%fmean_qrunoff ( npatches)) + allocate(csite%fmean_qdrainage ( npatches)) + + if (writing_long) then + allocate(csite%dmean_A_decomp ( npatches)) + allocate(csite%dmean_Af_decomp ( npatches)) + allocate(csite%dmean_co2_residual ( npatches)) + allocate(csite%dmean_energy_residual ( npatches)) + allocate(csite%dmean_water_residual ( npatches)) + allocate(csite%dmean_rh ( npatches)) + allocate(csite%dmean_cwd_rh ( npatches)) + allocate(csite%dmean_nep ( npatches)) + allocate(csite%dmean_rk4step ( npatches)) + allocate(csite%dmean_available_water ( npatches)) + allocate(csite%dmean_can_theiv ( npatches)) + allocate(csite%dmean_can_theta ( npatches)) + allocate(csite%dmean_can_vpdef ( npatches)) + allocate(csite%dmean_can_temp ( npatches)) + allocate(csite%dmean_can_shv ( npatches)) + allocate(csite%dmean_can_co2 ( npatches)) + allocate(csite%dmean_can_rhos ( npatches)) + allocate(csite%dmean_can_prss ( npatches)) + allocate(csite%dmean_gnd_temp ( npatches)) + allocate(csite%dmean_gnd_shv ( npatches)) + allocate(csite%dmean_can_ggnd ( npatches)) + allocate(csite%dmean_sfcw_depth ( npatches)) + allocate(csite%dmean_sfcw_energy ( npatches)) + allocate(csite%dmean_sfcw_mass ( npatches)) + allocate(csite%dmean_sfcw_temp ( npatches)) + allocate(csite%dmean_sfcw_fliq ( npatches)) + allocate(csite%dmean_soil_energy ( nzg,npatches)) + allocate(csite%dmean_soil_mstpot ( nzg,npatches)) + allocate(csite%dmean_soil_water ( nzg,npatches)) + allocate(csite%dmean_soil_temp ( nzg,npatches)) + allocate(csite%dmean_soil_fliq ( nzg,npatches)) + allocate(csite%dmean_rshort_gnd ( npatches)) + allocate(csite%dmean_par_gnd ( npatches)) + allocate(csite%dmean_rlong_gnd ( npatches)) + allocate(csite%dmean_rlongup ( npatches)) + allocate(csite%dmean_parup ( npatches)) + allocate(csite%dmean_nirup ( npatches)) + allocate(csite%dmean_rshortup ( npatches)) + allocate(csite%dmean_rnet ( npatches)) + allocate(csite%dmean_albedo ( npatches)) + allocate(csite%dmean_albedo_beam ( npatches)) + allocate(csite%dmean_albedo_diff ( npatches)) + allocate(csite%dmean_rlong_albedo ( npatches)) + allocate(csite%dmean_ustar ( npatches)) + allocate(csite%dmean_tstar ( npatches)) + allocate(csite%dmean_qstar ( npatches)) + allocate(csite%dmean_cstar ( npatches)) + allocate(csite%dmean_carbon_ac ( npatches)) + allocate(csite%dmean_carbon_st ( npatches)) + allocate(csite%dmean_vapor_gc ( npatches)) + allocate(csite%dmean_vapor_ac ( npatches)) + allocate(csite%dmean_smoist_gg ( nzg,npatches)) + allocate(csite%dmean_throughfall ( npatches)) + allocate(csite%dmean_transloss ( nzg,npatches)) + allocate(csite%dmean_runoff ( npatches)) + allocate(csite%dmean_drainage ( npatches)) + allocate(csite%dmean_sensible_gc ( npatches)) + allocate(csite%dmean_sensible_ac ( npatches)) + allocate(csite%dmean_sensible_gg ( nzg,npatches)) + allocate(csite%dmean_qthroughfall ( npatches)) + allocate(csite%dmean_qrunoff ( npatches)) + allocate(csite%dmean_qdrainage ( npatches)) + end if + if (writing_eorq) then + allocate(csite%mmean_fast_soil_c ( npatches)) + allocate(csite%mmean_slow_soil_c ( npatches)) + allocate(csite%mmean_struct_soil_c ( npatches)) + allocate(csite%mmean_struct_soil_l ( npatches)) + allocate(csite%mmean_fast_soil_n ( npatches)) + allocate(csite%mmean_mineral_soil_n ( npatches)) + allocate(csite%mmean_co2_residual ( npatches)) + allocate(csite%mmean_energy_residual ( npatches)) + allocate(csite%mmean_water_residual ( npatches)) + allocate(csite%mmean_rh ( npatches)) + allocate(csite%mmean_cwd_rh ( npatches)) + allocate(csite%mmean_nep ( npatches)) + allocate(csite%mmean_A_decomp ( npatches)) + allocate(csite%mmean_Af_decomp ( npatches)) + allocate(csite%mmean_rk4step ( npatches)) + allocate(csite%mmean_available_water ( npatches)) + allocate(csite%mmean_can_theiv ( npatches)) + allocate(csite%mmean_can_theta ( npatches)) + allocate(csite%mmean_can_vpdef ( npatches)) + allocate(csite%mmean_can_temp ( npatches)) + allocate(csite%mmean_can_shv ( npatches)) + allocate(csite%mmean_can_co2 ( npatches)) + allocate(csite%mmean_can_rhos ( npatches)) + allocate(csite%mmean_can_prss ( npatches)) + allocate(csite%mmean_gnd_temp ( npatches)) + allocate(csite%mmean_gnd_shv ( npatches)) + allocate(csite%mmean_can_ggnd ( npatches)) + allocate(csite%mmean_sfcw_depth ( npatches)) + allocate(csite%mmean_sfcw_energy ( npatches)) + allocate(csite%mmean_sfcw_mass ( npatches)) + allocate(csite%mmean_sfcw_temp ( npatches)) + allocate(csite%mmean_sfcw_fliq ( npatches)) + allocate(csite%mmean_soil_energy ( nzg,npatches)) + allocate(csite%mmean_soil_mstpot ( nzg,npatches)) + allocate(csite%mmean_soil_water ( nzg,npatches)) + allocate(csite%mmean_soil_temp ( nzg,npatches)) + allocate(csite%mmean_soil_fliq ( nzg,npatches)) + allocate(csite%mmean_rshort_gnd ( npatches)) + allocate(csite%mmean_par_gnd ( npatches)) + allocate(csite%mmean_rlong_gnd ( npatches)) + allocate(csite%mmean_rlongup ( npatches)) + allocate(csite%mmean_parup ( npatches)) + allocate(csite%mmean_nirup ( npatches)) + allocate(csite%mmean_rshortup ( npatches)) + allocate(csite%mmean_rnet ( npatches)) + allocate(csite%mmean_albedo ( npatches)) + allocate(csite%mmean_albedo_beam ( npatches)) + allocate(csite%mmean_albedo_diff ( npatches)) + allocate(csite%mmean_rlong_albedo ( npatches)) + allocate(csite%mmean_ustar ( npatches)) + allocate(csite%mmean_tstar ( npatches)) + allocate(csite%mmean_qstar ( npatches)) + allocate(csite%mmean_cstar ( npatches)) + allocate(csite%mmean_carbon_ac ( npatches)) + allocate(csite%mmean_carbon_st ( npatches)) + allocate(csite%mmean_vapor_gc ( npatches)) + allocate(csite%mmean_vapor_ac ( npatches)) + allocate(csite%mmean_smoist_gg ( nzg,npatches)) + allocate(csite%mmean_throughfall ( npatches)) + allocate(csite%mmean_transloss ( nzg,npatches)) + allocate(csite%mmean_runoff ( npatches)) + allocate(csite%mmean_drainage ( npatches)) + allocate(csite%mmean_sensible_gc ( npatches)) + allocate(csite%mmean_sensible_ac ( npatches)) + allocate(csite%mmean_sensible_gg ( nzg,npatches)) + allocate(csite%mmean_qthroughfall ( npatches)) + allocate(csite%mmean_qrunoff ( npatches)) + allocate(csite%mmean_qdrainage ( npatches)) + allocate(csite%mmean_A_decomp ( npatches)) + allocate(csite%mmean_Af_decomp ( npatches)) + allocate(csite%mmean_co2_residual ( npatches)) + allocate(csite%mmean_energy_residual ( npatches)) + allocate(csite%mmean_water_residual ( npatches)) + allocate(csite%mmsqu_rh ( npatches)) + allocate(csite%mmsqu_cwd_rh ( npatches)) + allocate(csite%mmsqu_nep ( npatches)) + allocate(csite%mmsqu_rlongup ( npatches)) + allocate(csite%mmsqu_parup ( npatches)) + allocate(csite%mmsqu_nirup ( npatches)) + allocate(csite%mmsqu_rshortup ( npatches)) + allocate(csite%mmsqu_rnet ( npatches)) + allocate(csite%mmsqu_albedo ( npatches)) + allocate(csite%mmsqu_ustar ( npatches)) + allocate(csite%mmsqu_carbon_ac ( npatches)) + allocate(csite%mmsqu_carbon_st ( npatches)) + allocate(csite%mmsqu_vapor_gc ( npatches)) + allocate(csite%mmsqu_vapor_ac ( npatches)) + allocate(csite%mmsqu_sensible_gc ( npatches)) + allocate(csite%mmsqu_sensible_ac ( npatches)) + end if + if (writing_dcyc) then + allocate(csite%qmean_rh ( ndcycle,npatches)) + allocate(csite%qmean_cwd_rh ( ndcycle,npatches)) + allocate(csite%qmean_nep ( ndcycle,npatches)) + allocate(csite%qmean_rk4step ( ndcycle,npatches)) + allocate(csite%qmean_available_water ( ndcycle,npatches)) + allocate(csite%qmean_can_theiv ( ndcycle,npatches)) + allocate(csite%qmean_can_theta ( ndcycle,npatches)) + allocate(csite%qmean_can_vpdef ( ndcycle,npatches)) + allocate(csite%qmean_can_temp ( ndcycle,npatches)) + allocate(csite%qmean_can_shv ( ndcycle,npatches)) + allocate(csite%qmean_can_co2 ( ndcycle,npatches)) + allocate(csite%qmean_can_rhos ( ndcycle,npatches)) + allocate(csite%qmean_can_prss ( ndcycle,npatches)) + allocate(csite%qmean_gnd_temp ( ndcycle,npatches)) + allocate(csite%qmean_gnd_shv ( ndcycle,npatches)) + allocate(csite%qmean_can_ggnd ( ndcycle,npatches)) + allocate(csite%qmean_sfcw_depth ( ndcycle,npatches)) + allocate(csite%qmean_sfcw_energy ( ndcycle,npatches)) + allocate(csite%qmean_sfcw_mass ( ndcycle,npatches)) + allocate(csite%qmean_sfcw_temp ( ndcycle,npatches)) + allocate(csite%qmean_sfcw_fliq ( ndcycle,npatches)) + allocate(csite%qmean_soil_energy ( nzg,ndcycle,npatches)) + allocate(csite%qmean_soil_mstpot ( nzg,ndcycle,npatches)) + allocate(csite%qmean_soil_water ( nzg,ndcycle,npatches)) + allocate(csite%qmean_soil_temp ( nzg,ndcycle,npatches)) + allocate(csite%qmean_soil_fliq ( nzg,ndcycle,npatches)) + allocate(csite%qmean_rshort_gnd ( ndcycle,npatches)) + allocate(csite%qmean_par_gnd ( ndcycle,npatches)) + allocate(csite%qmean_rlong_gnd ( ndcycle,npatches)) + allocate(csite%qmean_rlongup ( ndcycle,npatches)) + allocate(csite%qmean_parup ( ndcycle,npatches)) + allocate(csite%qmean_nirup ( ndcycle,npatches)) + allocate(csite%qmean_rshortup ( ndcycle,npatches)) + allocate(csite%qmean_rnet ( ndcycle,npatches)) + allocate(csite%qmean_albedo ( ndcycle,npatches)) + allocate(csite%qmean_albedo_beam ( ndcycle,npatches)) + allocate(csite%qmean_albedo_diff ( ndcycle,npatches)) + allocate(csite%qmean_rlong_albedo ( ndcycle,npatches)) + allocate(csite%qmean_ustar ( ndcycle,npatches)) + allocate(csite%qmean_tstar ( ndcycle,npatches)) + allocate(csite%qmean_qstar ( ndcycle,npatches)) + allocate(csite%qmean_cstar ( ndcycle,npatches)) + allocate(csite%qmean_carbon_ac ( ndcycle,npatches)) + allocate(csite%qmean_carbon_st ( ndcycle,npatches)) + allocate(csite%qmean_vapor_gc ( ndcycle,npatches)) + allocate(csite%qmean_vapor_ac ( ndcycle,npatches)) + allocate(csite%qmean_smoist_gg ( nzg,ndcycle,npatches)) + allocate(csite%qmean_throughfall ( ndcycle,npatches)) + allocate(csite%qmean_transloss ( nzg,ndcycle,npatches)) + allocate(csite%qmean_runoff ( ndcycle,npatches)) + allocate(csite%qmean_drainage ( ndcycle,npatches)) + allocate(csite%qmean_sensible_gc ( ndcycle,npatches)) + allocate(csite%qmean_sensible_ac ( ndcycle,npatches)) + allocate(csite%qmean_sensible_gg ( nzg,ndcycle,npatches)) + allocate(csite%qmean_qthroughfall ( ndcycle,npatches)) + allocate(csite%qmean_qrunoff ( ndcycle,npatches)) + allocate(csite%qmean_qdrainage ( ndcycle,npatches)) + allocate(csite%qmsqu_rh ( ndcycle,npatches)) + allocate(csite%qmsqu_cwd_rh ( ndcycle,npatches)) + allocate(csite%qmsqu_nep ( ndcycle,npatches)) + allocate(csite%qmsqu_rlongup ( ndcycle,npatches)) + allocate(csite%qmsqu_parup ( ndcycle,npatches)) + allocate(csite%qmsqu_nirup ( ndcycle,npatches)) + allocate(csite%qmsqu_rshortup ( ndcycle,npatches)) + allocate(csite%qmsqu_rnet ( ndcycle,npatches)) + allocate(csite%qmsqu_albedo ( ndcycle,npatches)) + allocate(csite%qmsqu_ustar ( ndcycle,npatches)) + allocate(csite%qmsqu_carbon_ac ( ndcycle,npatches)) + allocate(csite%qmsqu_carbon_st ( ndcycle,npatches)) + allocate(csite%qmsqu_vapor_gc ( ndcycle,npatches)) + allocate(csite%qmsqu_vapor_ac ( ndcycle,npatches)) + allocate(csite%qmsqu_sensible_gc ( ndcycle,npatches)) + allocate(csite%qmsqu_sensible_ac ( ndcycle,npatches)) + end if + return - - end subroutine filltab_edtype + end subroutine allocate_sitetype !=======================================================================================! !=======================================================================================! @@ -8618,99 +4280,1083 @@ end subroutine filltab_edtype - !=======================================================================================! - !=======================================================================================! - ! This routine will fill the pointer table with the polygon-level variables ! - ! (edtype) that have one dimension and are integer (type 10). ! + !=======================================================================================! + !=======================================================================================! + ! This subroutine allocates the cohort-level variables. ! !---------------------------------------------------------------------------------------! - subroutine filltab_edtype_p10(cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) - use ed_var_tables, only : vtable_edio_i & ! sub-routine - , metadata_edio ! ! sub-routine + subroutine allocate_patchtype(cpatch,ncohorts) implicit none + !----- Arguments. -------------------------------------------------------------------! - type(edtype), target :: cgrid - integer , intent(in) :: init - integer , intent(in) :: igr - integer , intent(in) :: var_len - integer , intent(in) :: max_ptrs - integer , intent(in) :: var_len_global - integer , intent(inout) :: nvar - !----- Local variables. -------------------------------------------------------------! - integer :: npts + type(patchtype), target :: cpatch + integer , intent(in) :: ncohorts !------------------------------------------------------------------------------------! - + + + !----- Make sure that we nullify all pointers for a safe allocation. ----------------! + call nullify_patchtype (cpatch) !------------------------------------------------------------------------------------! + + + !----- Define the number of cohorts. ------------------------------------------------! + cpatch%ncohorts = ncohorts !------------------------------------------------------------------------------------! - ! This is the 1-D block. All variables must have the number of points defined ! - ! by npts. ! + + + !------------------------------------------------------------------------------------! + ! Some cohorts may be empty. If all plants die, or if this simulation is a ! + ! true bare ground run, no cohort should exist, in which case we return. ! + !------------------------------------------------------------------------------------! + if (ncohorts == 0) return !------------------------------------------------------------------------------------! - npts = cgrid%npolygons - if (associated(cgrid%pysi_id)) then - nvar = nvar + 1 - call vtable_edio_i(npts,cgrid%pysi_id,nvar,igr,init,cgrid%pyglob_id & - ,var_len,var_len_global,max_ptrs & - ,'PYSI_ID :10:hist:anal:dail:mont:dcyc:year') - call metadata_edio(nvar,igr,'Polygons first site indices','NA','ipoly') + allocate(cpatch%pft ( ncohorts)) + allocate(cpatch%nplant ( ncohorts)) + allocate(cpatch%phenology_status ( ncohorts)) + allocate(cpatch%recruit_dbh ( ncohorts)) + allocate(cpatch%census_status ( ncohorts)) + allocate(cpatch%hite ( ncohorts)) + allocate(cpatch%agb ( ncohorts)) + allocate(cpatch%basarea ( ncohorts)) + allocate(cpatch%dagb_dt ( ncohorts)) + allocate(cpatch%dlnagb_dt ( ncohorts)) + allocate(cpatch%dba_dt ( ncohorts)) + allocate(cpatch%dlnba_dt ( ncohorts)) + allocate(cpatch%ddbh_dt ( ncohorts)) + allocate(cpatch%dlndbh_dt ( ncohorts)) + allocate(cpatch%dbh ( ncohorts)) + allocate(cpatch%bdead ( ncohorts)) + allocate(cpatch%bleaf ( ncohorts)) + allocate(cpatch%balive ( ncohorts)) + allocate(cpatch%broot ( ncohorts)) + allocate(cpatch%bsapwooda ( ncohorts)) + allocate(cpatch%bsapwoodb ( ncohorts)) + allocate(cpatch%bstorage ( ncohorts)) + allocate(cpatch%bseeds ( ncohorts)) + allocate(cpatch%lai ( ncohorts)) + allocate(cpatch%wai ( ncohorts)) + allocate(cpatch%crown_area ( ncohorts)) + allocate(cpatch%leaf_resolvable ( ncohorts)) + allocate(cpatch%wood_resolvable ( ncohorts)) + allocate(cpatch%cb ( 13,ncohorts)) + allocate(cpatch%cb_lightmax ( 13,ncohorts)) + allocate(cpatch%cb_moistmax ( 13,ncohorts)) + allocate(cpatch%cbr_bar ( ncohorts)) + allocate(cpatch%leaf_energy ( ncohorts)) + allocate(cpatch%leaf_temp ( ncohorts)) + allocate(cpatch%leaf_vpdef ( ncohorts)) + allocate(cpatch%leaf_temp_pv ( ncohorts)) + allocate(cpatch%leaf_hcap ( ncohorts)) + allocate(cpatch%leaf_fliq ( ncohorts)) + allocate(cpatch%leaf_water ( ncohorts)) + allocate(cpatch%wood_energy ( ncohorts)) + allocate(cpatch%wood_temp ( ncohorts)) + allocate(cpatch%wood_temp_pv ( ncohorts)) + allocate(cpatch%wood_hcap ( ncohorts)) + allocate(cpatch%wood_fliq ( ncohorts)) + allocate(cpatch%wood_water ( ncohorts)) + allocate(cpatch%veg_wind ( ncohorts)) + allocate(cpatch%lsfc_shv_open ( ncohorts)) + allocate(cpatch%lsfc_shv_closed ( ncohorts)) + allocate(cpatch%lsfc_co2_open ( ncohorts)) + allocate(cpatch%lsfc_co2_closed ( ncohorts)) + allocate(cpatch%lint_shv ( ncohorts)) + allocate(cpatch%lint_co2_open ( ncohorts)) + allocate(cpatch%lint_co2_closed ( ncohorts)) + allocate(cpatch%today_leaf_resp ( ncohorts)) + allocate(cpatch%today_root_resp ( ncohorts)) + allocate(cpatch%today_gpp ( ncohorts)) + allocate(cpatch%today_gpp_pot ( ncohorts)) + allocate(cpatch%today_gpp_lightmax ( ncohorts)) + allocate(cpatch%today_gpp_moistmax ( ncohorts)) + allocate(cpatch%today_nppleaf ( ncohorts)) + allocate(cpatch%today_nppfroot ( ncohorts)) + allocate(cpatch%today_nppsapwood ( ncohorts)) + allocate(cpatch%today_nppcroot ( ncohorts)) + allocate(cpatch%today_nppseeds ( ncohorts)) + allocate(cpatch%today_nppwood ( ncohorts)) + allocate(cpatch%today_nppdaily ( ncohorts)) + allocate(cpatch%growth_respiration ( ncohorts)) + allocate(cpatch%storage_respiration ( ncohorts)) + allocate(cpatch%vleaf_respiration ( ncohorts)) + allocate(cpatch%monthly_dndt ( ncohorts)) + allocate(cpatch%monthly_dlnndt ( ncohorts)) + allocate(cpatch%mort_rate ( n_mort,ncohorts)) + + allocate(cpatch%krdepth ( ncohorts)) + allocate(cpatch%first_census ( ncohorts)) + allocate(cpatch%new_recruit_flag ( ncohorts)) + allocate(cpatch%light_level ( ncohorts)) + allocate(cpatch%light_level_beam ( ncohorts)) + allocate(cpatch%light_level_diff ( ncohorts)) + allocate(cpatch%par_l ( ncohorts)) + allocate(cpatch%par_l_beam ( ncohorts)) + allocate(cpatch%par_l_diffuse ( ncohorts)) + allocate(cpatch%rshort_l ( ncohorts)) + allocate(cpatch%rshort_l_beam ( ncohorts)) + allocate(cpatch%rshort_l_diffuse ( ncohorts)) + allocate(cpatch%rlong_l ( ncohorts)) + allocate(cpatch%rlong_l_surf ( ncohorts)) + allocate(cpatch%rlong_l_incid ( ncohorts)) + allocate(cpatch%rshort_w ( ncohorts)) + allocate(cpatch%rshort_w_beam ( ncohorts)) + allocate(cpatch%rshort_w_diffuse ( ncohorts)) + allocate(cpatch%rlong_w ( ncohorts)) + allocate(cpatch%rlong_w_surf ( ncohorts)) + allocate(cpatch%rlong_w_incid ( ncohorts)) + allocate(cpatch%leaf_gbh ( ncohorts)) + allocate(cpatch%leaf_gbw ( ncohorts)) + allocate(cpatch%wood_gbh ( ncohorts)) + allocate(cpatch%wood_gbw ( ncohorts)) + allocate(cpatch%A_open ( ncohorts)) + allocate(cpatch%A_closed ( ncohorts)) + allocate(cpatch%psi_open ( ncohorts)) + allocate(cpatch%psi_closed ( ncohorts)) + allocate(cpatch%gsw_open ( ncohorts)) + allocate(cpatch%gsw_closed ( ncohorts)) + allocate(cpatch%leaf_gsw ( ncohorts)) + allocate(cpatch%fsw ( ncohorts)) + allocate(cpatch%fsn ( ncohorts)) + allocate(cpatch%fs_open ( ncohorts)) + allocate(cpatch%water_supply ( ncohorts)) + allocate(cpatch%leaf_maintenance ( ncohorts)) + allocate(cpatch%root_maintenance ( ncohorts)) + allocate(cpatch%leaf_drop ( ncohorts)) + allocate(cpatch%leaf_respiration ( ncohorts)) + allocate(cpatch%root_respiration ( ncohorts)) + allocate(cpatch%gpp ( ncohorts)) + allocate(cpatch%paw_avg ( ncohorts)) + allocate(cpatch%elongf ( ncohorts)) + allocate(cpatch%turnover_amp ( ncohorts)) + allocate(cpatch%llspan ( ncohorts)) + allocate(cpatch%vm_bar ( ncohorts)) + allocate(cpatch%sla ( ncohorts)) + + allocate(cpatch%fmean_gpp ( ncohorts)) + allocate(cpatch%fmean_npp ( ncohorts)) + allocate(cpatch%fmean_leaf_resp ( ncohorts)) + allocate(cpatch%fmean_root_resp ( ncohorts)) + allocate(cpatch%fmean_growth_resp ( ncohorts)) + allocate(cpatch%fmean_storage_resp ( ncohorts)) + allocate(cpatch%fmean_vleaf_resp ( ncohorts)) + allocate(cpatch%fmean_plresp ( ncohorts)) + allocate(cpatch%fmean_leaf_energy ( ncohorts)) + allocate(cpatch%fmean_leaf_water ( ncohorts)) + allocate(cpatch%fmean_leaf_hcap ( ncohorts)) + allocate(cpatch%fmean_leaf_vpdef ( ncohorts)) + allocate(cpatch%fmean_leaf_temp ( ncohorts)) + allocate(cpatch%fmean_leaf_fliq ( ncohorts)) + allocate(cpatch%fmean_leaf_gsw ( ncohorts)) + allocate(cpatch%fmean_leaf_gbw ( ncohorts)) + allocate(cpatch%fmean_wood_energy ( ncohorts)) + allocate(cpatch%fmean_wood_water ( ncohorts)) + allocate(cpatch%fmean_wood_hcap ( ncohorts)) + allocate(cpatch%fmean_wood_temp ( ncohorts)) + allocate(cpatch%fmean_wood_fliq ( ncohorts)) + allocate(cpatch%fmean_wood_gbw ( ncohorts)) + allocate(cpatch%fmean_fs_open ( ncohorts)) + allocate(cpatch%fmean_fsw ( ncohorts)) + allocate(cpatch%fmean_fsn ( ncohorts)) + allocate(cpatch%fmean_psi_open ( ncohorts)) + allocate(cpatch%fmean_psi_closed ( ncohorts)) + allocate(cpatch%fmean_water_supply ( ncohorts)) + allocate(cpatch%fmean_light_level ( ncohorts)) + allocate(cpatch%fmean_light_level_beam ( ncohorts)) + allocate(cpatch%fmean_light_level_diff ( ncohorts)) + allocate(cpatch%fmean_par_l ( ncohorts)) + allocate(cpatch%fmean_par_l_beam ( ncohorts)) + allocate(cpatch%fmean_par_l_diff ( ncohorts)) + allocate(cpatch%fmean_rshort_l ( ncohorts)) + allocate(cpatch%fmean_rlong_l ( ncohorts)) + allocate(cpatch%fmean_sensible_lc ( ncohorts)) + allocate(cpatch%fmean_vapor_lc ( ncohorts)) + allocate(cpatch%fmean_transp ( ncohorts)) + allocate(cpatch%fmean_intercepted_al ( ncohorts)) + allocate(cpatch%fmean_wshed_lg ( ncohorts)) + allocate(cpatch%fmean_rshort_w ( ncohorts)) + allocate(cpatch%fmean_rlong_w ( ncohorts)) + allocate(cpatch%fmean_sensible_wc ( ncohorts)) + allocate(cpatch%fmean_vapor_wc ( ncohorts)) + allocate(cpatch%fmean_intercepted_aw ( ncohorts)) + allocate(cpatch%fmean_wshed_wg ( ncohorts)) + + + if (writing_long) then + allocate(cpatch%dmean_nppleaf ( ncohorts)) + allocate(cpatch%dmean_nppfroot ( ncohorts)) + allocate(cpatch%dmean_nppsapwood ( ncohorts)) + allocate(cpatch%dmean_nppcroot ( ncohorts)) + allocate(cpatch%dmean_nppseeds ( ncohorts)) + allocate(cpatch%dmean_nppwood ( ncohorts)) + allocate(cpatch%dmean_nppdaily ( ncohorts)) + allocate(cpatch%dmean_gpp ( ncohorts)) + allocate(cpatch%dmean_npp ( ncohorts)) + allocate(cpatch%dmean_leaf_resp ( ncohorts)) + allocate(cpatch%dmean_root_resp ( ncohorts)) + allocate(cpatch%dmean_growth_resp ( ncohorts)) + allocate(cpatch%dmean_storage_resp ( ncohorts)) + allocate(cpatch%dmean_vleaf_resp ( ncohorts)) + allocate(cpatch%dmean_plresp ( ncohorts)) + allocate(cpatch%dmean_leaf_energy ( ncohorts)) + allocate(cpatch%dmean_leaf_water ( ncohorts)) + allocate(cpatch%dmean_leaf_hcap ( ncohorts)) + allocate(cpatch%dmean_leaf_vpdef ( ncohorts)) + allocate(cpatch%dmean_leaf_temp ( ncohorts)) + allocate(cpatch%dmean_leaf_fliq ( ncohorts)) + allocate(cpatch%dmean_leaf_gsw ( ncohorts)) + allocate(cpatch%dmean_leaf_gbw ( ncohorts)) + allocate(cpatch%dmean_wood_energy ( ncohorts)) + allocate(cpatch%dmean_wood_water ( ncohorts)) + allocate(cpatch%dmean_wood_hcap ( ncohorts)) + allocate(cpatch%dmean_wood_temp ( ncohorts)) + allocate(cpatch%dmean_wood_fliq ( ncohorts)) + allocate(cpatch%dmean_wood_gbw ( ncohorts)) + allocate(cpatch%dmean_fs_open ( ncohorts)) + allocate(cpatch%dmean_fsw ( ncohorts)) + allocate(cpatch%dmean_fsn ( ncohorts)) + allocate(cpatch%dmean_psi_open ( ncohorts)) + allocate(cpatch%dmean_psi_closed ( ncohorts)) + allocate(cpatch%dmean_water_supply ( ncohorts)) + allocate(cpatch%dmean_light_level ( ncohorts)) + allocate(cpatch%dmean_light_level_beam ( ncohorts)) + allocate(cpatch%dmean_light_level_diff ( ncohorts)) + allocate(cpatch%dmean_par_l ( ncohorts)) + allocate(cpatch%dmean_par_l_beam ( ncohorts)) + allocate(cpatch%dmean_par_l_diff ( ncohorts)) + allocate(cpatch%dmean_rshort_l ( ncohorts)) + allocate(cpatch%dmean_rlong_l ( ncohorts)) + allocate(cpatch%dmean_sensible_lc ( ncohorts)) + allocate(cpatch%dmean_vapor_lc ( ncohorts)) + allocate(cpatch%dmean_transp ( ncohorts)) + allocate(cpatch%dmean_intercepted_al ( ncohorts)) + allocate(cpatch%dmean_wshed_lg ( ncohorts)) + allocate(cpatch%dmean_rshort_w ( ncohorts)) + allocate(cpatch%dmean_rlong_w ( ncohorts)) + allocate(cpatch%dmean_sensible_wc ( ncohorts)) + allocate(cpatch%dmean_vapor_wc ( ncohorts)) + allocate(cpatch%dmean_intercepted_aw ( ncohorts)) + allocate(cpatch%dmean_wshed_wg ( ncohorts)) + end if + + if (writing_eorq) then + allocate(cpatch%mmean_lai ( ncohorts)) + allocate(cpatch%mmean_bleaf ( ncohorts)) + allocate(cpatch%mmean_broot ( ncohorts)) + allocate(cpatch%mmean_bstorage ( ncohorts)) + allocate(cpatch%mmean_mort_rate ( n_mort,ncohorts)) + allocate(cpatch%mmean_leaf_maintenance ( ncohorts)) + allocate(cpatch%mmean_root_maintenance ( ncohorts)) + allocate(cpatch%mmean_leaf_drop ( ncohorts)) + allocate(cpatch%mmean_cb ( ncohorts)) + allocate(cpatch%mmean_gpp ( ncohorts)) + allocate(cpatch%mmean_npp ( ncohorts)) + allocate(cpatch%mmean_leaf_resp ( ncohorts)) + allocate(cpatch%mmean_root_resp ( ncohorts)) + allocate(cpatch%mmean_growth_resp ( ncohorts)) + allocate(cpatch%mmean_storage_resp ( ncohorts)) + allocate(cpatch%mmean_vleaf_resp ( ncohorts)) + allocate(cpatch%mmean_plresp ( ncohorts)) + allocate(cpatch%mmean_leaf_energy ( ncohorts)) + allocate(cpatch%mmean_leaf_water ( ncohorts)) + allocate(cpatch%mmean_leaf_hcap ( ncohorts)) + allocate(cpatch%mmean_leaf_vpdef ( ncohorts)) + allocate(cpatch%mmean_leaf_temp ( ncohorts)) + allocate(cpatch%mmean_leaf_fliq ( ncohorts)) + allocate(cpatch%mmean_leaf_gsw ( ncohorts)) + allocate(cpatch%mmean_leaf_gbw ( ncohorts)) + allocate(cpatch%mmean_wood_energy ( ncohorts)) + allocate(cpatch%mmean_wood_water ( ncohorts)) + allocate(cpatch%mmean_wood_hcap ( ncohorts)) + allocate(cpatch%mmean_wood_temp ( ncohorts)) + allocate(cpatch%mmean_wood_fliq ( ncohorts)) + allocate(cpatch%mmean_wood_gbw ( ncohorts)) + allocate(cpatch%mmean_fs_open ( ncohorts)) + allocate(cpatch%mmean_fsw ( ncohorts)) + allocate(cpatch%mmean_fsn ( ncohorts)) + allocate(cpatch%mmean_psi_open ( ncohorts)) + allocate(cpatch%mmean_psi_closed ( ncohorts)) + allocate(cpatch%mmean_water_supply ( ncohorts)) + allocate(cpatch%mmean_light_level ( ncohorts)) + allocate(cpatch%mmean_light_level_beam ( ncohorts)) + allocate(cpatch%mmean_light_level_diff ( ncohorts)) + allocate(cpatch%mmean_par_l ( ncohorts)) + allocate(cpatch%mmean_par_l_beam ( ncohorts)) + allocate(cpatch%mmean_par_l_diff ( ncohorts)) + allocate(cpatch%mmean_rshort_l ( ncohorts)) + allocate(cpatch%mmean_rlong_l ( ncohorts)) + allocate(cpatch%mmean_sensible_lc ( ncohorts)) + allocate(cpatch%mmean_vapor_lc ( ncohorts)) + allocate(cpatch%mmean_transp ( ncohorts)) + allocate(cpatch%mmean_intercepted_al ( ncohorts)) + allocate(cpatch%mmean_wshed_lg ( ncohorts)) + allocate(cpatch%mmean_rshort_w ( ncohorts)) + allocate(cpatch%mmean_rlong_w ( ncohorts)) + allocate(cpatch%mmean_sensible_wc ( ncohorts)) + allocate(cpatch%mmean_vapor_wc ( ncohorts)) + allocate(cpatch%mmean_intercepted_aw ( ncohorts)) + allocate(cpatch%mmean_wshed_wg ( ncohorts)) + allocate(cpatch%mmean_nppleaf ( ncohorts)) + allocate(cpatch%mmean_nppfroot ( ncohorts)) + allocate(cpatch%mmean_nppsapwood ( ncohorts)) + allocate(cpatch%mmean_nppcroot ( ncohorts)) + allocate(cpatch%mmean_nppseeds ( ncohorts)) + allocate(cpatch%mmean_nppwood ( ncohorts)) + allocate(cpatch%mmean_nppdaily ( ncohorts)) + allocate(cpatch%mmsqu_gpp ( ncohorts)) + allocate(cpatch%mmsqu_npp ( ncohorts)) + allocate(cpatch%mmsqu_plresp ( ncohorts)) + allocate(cpatch%mmsqu_sensible_lc ( ncohorts)) + allocate(cpatch%mmsqu_vapor_lc ( ncohorts)) + allocate(cpatch%mmsqu_transp ( ncohorts)) + allocate(cpatch%mmsqu_sensible_wc ( ncohorts)) + allocate(cpatch%mmsqu_vapor_wc ( ncohorts)) + end if + + if (writing_dcyc) then + allocate(cpatch%qmean_gpp (ndcycle,ncohorts)) + allocate(cpatch%qmean_npp (ndcycle,ncohorts)) + allocate(cpatch%qmean_leaf_resp (ndcycle,ncohorts)) + allocate(cpatch%qmean_root_resp (ndcycle,ncohorts)) + allocate(cpatch%qmean_growth_resp (ndcycle,ncohorts)) + allocate(cpatch%qmean_storage_resp (ndcycle,ncohorts)) + allocate(cpatch%qmean_vleaf_resp (ndcycle,ncohorts)) + allocate(cpatch%qmean_plresp (ndcycle,ncohorts)) + allocate(cpatch%qmean_leaf_energy (ndcycle,ncohorts)) + allocate(cpatch%qmean_leaf_water (ndcycle,ncohorts)) + allocate(cpatch%qmean_leaf_hcap (ndcycle,ncohorts)) + allocate(cpatch%qmean_leaf_vpdef (ndcycle,ncohorts)) + allocate(cpatch%qmean_leaf_temp (ndcycle,ncohorts)) + allocate(cpatch%qmean_leaf_fliq (ndcycle,ncohorts)) + allocate(cpatch%qmean_leaf_gsw (ndcycle,ncohorts)) + allocate(cpatch%qmean_leaf_gbw (ndcycle,ncohorts)) + allocate(cpatch%qmean_wood_energy (ndcycle,ncohorts)) + allocate(cpatch%qmean_wood_water (ndcycle,ncohorts)) + allocate(cpatch%qmean_wood_hcap (ndcycle,ncohorts)) + allocate(cpatch%qmean_wood_temp (ndcycle,ncohorts)) + allocate(cpatch%qmean_wood_fliq (ndcycle,ncohorts)) + allocate(cpatch%qmean_wood_gbw (ndcycle,ncohorts)) + allocate(cpatch%qmean_fs_open (ndcycle,ncohorts)) + allocate(cpatch%qmean_fsw (ndcycle,ncohorts)) + allocate(cpatch%qmean_fsn (ndcycle,ncohorts)) + allocate(cpatch%qmean_psi_open (ndcycle,ncohorts)) + allocate(cpatch%qmean_psi_closed (ndcycle,ncohorts)) + allocate(cpatch%qmean_water_supply (ndcycle,ncohorts)) + allocate(cpatch%qmean_light_level (ndcycle,ncohorts)) + allocate(cpatch%qmean_light_level_beam (ndcycle,ncohorts)) + allocate(cpatch%qmean_light_level_diff (ndcycle,ncohorts)) + allocate(cpatch%qmean_par_l (ndcycle,ncohorts)) + allocate(cpatch%qmean_par_l_beam (ndcycle,ncohorts)) + allocate(cpatch%qmean_par_l_diff (ndcycle,ncohorts)) + allocate(cpatch%qmean_rshort_l (ndcycle,ncohorts)) + allocate(cpatch%qmean_rlong_l (ndcycle,ncohorts)) + allocate(cpatch%qmean_sensible_lc (ndcycle,ncohorts)) + allocate(cpatch%qmean_vapor_lc (ndcycle,ncohorts)) + allocate(cpatch%qmean_transp (ndcycle,ncohorts)) + allocate(cpatch%qmean_intercepted_al (ndcycle,ncohorts)) + allocate(cpatch%qmean_wshed_lg (ndcycle,ncohorts)) + allocate(cpatch%qmean_rshort_w (ndcycle,ncohorts)) + allocate(cpatch%qmean_rlong_w (ndcycle,ncohorts)) + allocate(cpatch%qmean_sensible_wc (ndcycle,ncohorts)) + allocate(cpatch%qmean_vapor_wc (ndcycle,ncohorts)) + allocate(cpatch%qmean_intercepted_aw (ndcycle,ncohorts)) + allocate(cpatch%qmean_wshed_wg (ndcycle,ncohorts)) + allocate(cpatch%qmsqu_gpp (ndcycle,ncohorts)) + allocate(cpatch%qmsqu_npp (ndcycle,ncohorts)) + allocate(cpatch%qmsqu_plresp (ndcycle,ncohorts)) + allocate(cpatch%qmsqu_sensible_lc (ndcycle,ncohorts)) + allocate(cpatch%qmsqu_vapor_lc (ndcycle,ncohorts)) + allocate(cpatch%qmsqu_transp (ndcycle,ncohorts)) + allocate(cpatch%qmsqu_sensible_wc (ndcycle,ncohorts)) + allocate(cpatch%qmsqu_vapor_wc (ndcycle,ncohorts)) end if - - if (associated(cgrid%pysi_n)) then - nvar=nvar+1 - call vtable_edio_i(npts,cgrid%pysi_n,nvar,igr,init,cgrid%pyglob_id & - ,var_len,var_len_global,max_ptrs & - ,'PYSI_N :10:hist:anal:dail:mont:dcyc:year') - call metadata_edio(nvar,igr,'Number of sites per polygon','NA','ipoly') - end if + return + end subroutine allocate_patchtype + !=======================================================================================! + !=======================================================================================! + + + - if (associated(cgrid%xatm)) then - nvar=nvar+1 - call vtable_edio_i(npts,cgrid%xatm,nvar,igr,init,cgrid%pyglob_id & - ,var_len,var_len_global,max_ptrs & - ,'XATM :10:hist:anal:dail:mont:dcyc:year') - call metadata_edio(nvar,igr,'Atm. cell x-indices of polygon','NA','ipoly') - end if - - if (associated(cgrid%yatm)) then - nvar=nvar+1 - call vtable_edio_i(npts,cgrid%yatm,nvar,igr,init,cgrid%pyglob_id & - ,var_len,var_len_global,max_ptrs & - ,'YATM :10:hist:anal:dail:mont:dcyc:year') - call metadata_edio(nvar,igr,'Atm cell y-indices of polygon','NA','ipoly') - end if - - if (associated(cgrid%lsl)) then - nvar=nvar+1 - call vtable_edio_i(npts,cgrid%lsl,nvar,igr,init,cgrid%pyglob_id & - ,var_len,var_len_global,max_ptrs & - ,'LSL :10:hist:anal:dail:mont:dcyc:year') - call metadata_edio(nvar,igr,'Index of lowest soil layer','NA','ipoly') - - end if - - if (associated(cgrid%ncol_soil)) then - nvar=nvar+1 - call vtable_edio_i(npts,cgrid%ncol_soil,nvar,igr,init,cgrid%pyglob_id & - ,var_len,var_len_global,max_ptrs & - ,'NCOL_SOIL :10:hist:anal:dail:mont:dcyc:year') - call metadata_edio(nvar,igr,'Soil colour','NA','ipoly') - - end if - - if (associated(cgrid%load_adjacency)) then - nvar=nvar+1 - call vtable_edio_i(npts,cgrid%load_adjacency,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'LOAD_ADJACENCY :10:hist') - call metadata_edio(nvar,igr,'Load Adjacency','[NA]','ipoly') - end if - return - end subroutine filltab_edtype_p10 !=======================================================================================! !=======================================================================================! + ! This sub-routine nullifies all polygon pointers. ! + !---------------------------------------------------------------------------------------! + subroutine nullify_edtype(cgrid) + + implicit none + + !----- Arguments. -------------------------------------------------------------------! + type(edtype), target :: cgrid + !------------------------------------------------------------------------------------! + nullify(cgrid%polygon ) + + nullify(cgrid%pysi_id ) + nullify(cgrid%pysi_n ) + nullify(cgrid%walltime_py ) + nullify(cgrid%lon ) + nullify(cgrid%lat ) + nullify(cgrid%xatm ) + nullify(cgrid%yatm ) + nullify(cgrid%site_adjacency ) + nullify(cgrid%wbar ) + nullify(cgrid%Te ) + nullify(cgrid%zbar ) + nullify(cgrid%sheat ) + nullify(cgrid%baseflow ) + nullify(cgrid%runoff ) + nullify(cgrid%qrunoff ) + nullify(cgrid%swliq ) + nullify(cgrid%ilon ) + nullify(cgrid%ilat ) + nullify(cgrid%workload ) + nullify(cgrid%total_agb ) + nullify(cgrid%total_basal_area ) + nullify(cgrid%total_agb_growth ) + nullify(cgrid%total_agb_mort ) + nullify(cgrid%total_agb_recruit ) + nullify(cgrid%total_basal_area_growth ) + nullify(cgrid%total_basal_area_mort ) + nullify(cgrid%total_basal_area_recruit) + nullify(cgrid%nsites ) + nullify(cgrid%sitenums ) + nullify(cgrid%load_adjacency ) + nullify(cgrid%metinput ) + nullify(cgrid%met ) + nullify(cgrid%lapse ) + nullify(cgrid%cosz ) + nullify(cgrid%cbudget_initialstorage ) + nullify(cgrid%cbudget_nep ) + nullify(cgrid%nbudget_initialstorage ) + nullify(cgrid%max_leaf_temp ) + nullify(cgrid%min_leaf_temp ) + nullify(cgrid%max_wood_temp ) + nullify(cgrid%min_wood_temp ) + nullify(cgrid%max_soil_temp ) + nullify(cgrid%min_soil_temp ) + nullify(cgrid%nplant ) + nullify(cgrid%agb ) + nullify(cgrid%lai ) + nullify(cgrid%wai ) + nullify(cgrid%basal_area ) + nullify(cgrid%bdead ) + nullify(cgrid%balive ) + nullify(cgrid%bleaf ) + nullify(cgrid%broot ) + nullify(cgrid%bsapwooda ) + nullify(cgrid%bsapwoodb ) + nullify(cgrid%bseeds ) + nullify(cgrid%bstorage ) + nullify(cgrid%bdead_n ) + nullify(cgrid%balive_n ) + nullify(cgrid%bleaf_n ) + nullify(cgrid%broot_n ) + nullify(cgrid%bsapwooda_n ) + nullify(cgrid%bsapwoodb_n ) + nullify(cgrid%bseeds_n ) + nullify(cgrid%bstorage_n ) + nullify(cgrid%leaf_maintenance ) + nullify(cgrid%root_maintenance ) + nullify(cgrid%leaf_drop ) + nullify(cgrid%fast_soil_c ) + nullify(cgrid%slow_soil_c ) + nullify(cgrid%struct_soil_c ) + nullify(cgrid%struct_soil_l ) + nullify(cgrid%cwd_c ) + nullify(cgrid%fast_soil_n ) + nullify(cgrid%mineral_soil_n ) + nullify(cgrid%cwd_n ) + nullify(cgrid%Cleaf_grow ) + nullify(cgrid%Croot_grow ) + nullify(cgrid%Cdead_grow ) + nullify(cgrid%Cstore_grow ) + nullify(cgrid%Cleaf_litter_flux ) + nullify(cgrid%Croot_litter_flux ) + nullify(cgrid%Ccwd_flux ) + nullify(cgrid%Nleaf_grow ) + nullify(cgrid%Ndead_grow ) + nullify(cgrid%Nroot_grow ) + nullify(cgrid%Nstore_grow ) + nullify(cgrid%Nleaf_litter_flux ) + nullify(cgrid%Nroot_litter_flux ) + nullify(cgrid%Ncwd_flux ) + nullify(cgrid%Nbiomass_uptake ) + nullify(cgrid%Ngross_min ) + nullify(cgrid%Nnet_min ) + nullify(cgrid%avg_lai_ebalvars ) + nullify(cgrid%fmean_gpp ) + nullify(cgrid%fmean_npp ) + nullify(cgrid%fmean_leaf_resp ) + nullify(cgrid%fmean_root_resp ) + nullify(cgrid%fmean_growth_resp ) + nullify(cgrid%fmean_storage_resp ) + nullify(cgrid%fmean_vleaf_resp ) + nullify(cgrid%fmean_plresp ) + nullify(cgrid%fmean_leaf_energy ) + nullify(cgrid%fmean_leaf_water ) + nullify(cgrid%fmean_leaf_hcap ) + nullify(cgrid%fmean_leaf_vpdef ) + nullify(cgrid%fmean_leaf_temp ) + nullify(cgrid%fmean_leaf_fliq ) + nullify(cgrid%fmean_leaf_gsw ) + nullify(cgrid%fmean_leaf_gbw ) + nullify(cgrid%fmean_wood_energy ) + nullify(cgrid%fmean_wood_water ) + nullify(cgrid%fmean_wood_hcap ) + nullify(cgrid%fmean_wood_temp ) + nullify(cgrid%fmean_wood_fliq ) + nullify(cgrid%fmean_wood_gbw ) + nullify(cgrid%fmean_fs_open ) + nullify(cgrid%fmean_fsw ) + nullify(cgrid%fmean_fsn ) + nullify(cgrid%fmean_psi_open ) + nullify(cgrid%fmean_psi_closed ) + nullify(cgrid%fmean_water_supply ) + nullify(cgrid%fmean_par_l ) + nullify(cgrid%fmean_par_l_beam ) + nullify(cgrid%fmean_par_l_diff ) + nullify(cgrid%fmean_rshort_l ) + nullify(cgrid%fmean_rlong_l ) + nullify(cgrid%fmean_sensible_lc ) + nullify(cgrid%fmean_vapor_lc ) + nullify(cgrid%fmean_transp ) + nullify(cgrid%fmean_intercepted_al ) + nullify(cgrid%fmean_wshed_lg ) + nullify(cgrid%fmean_rshort_w ) + nullify(cgrid%fmean_rlong_w ) + nullify(cgrid%fmean_sensible_wc ) + nullify(cgrid%fmean_vapor_wc ) + nullify(cgrid%fmean_intercepted_aw ) + nullify(cgrid%fmean_wshed_wg ) + nullify(cgrid%fmean_rh ) + nullify(cgrid%fmean_cwd_rh ) + nullify(cgrid%fmean_nep ) + nullify(cgrid%fmean_rk4step ) + nullify(cgrid%fmean_available_water ) + nullify(cgrid%fmean_can_theiv ) + nullify(cgrid%fmean_can_theta ) + nullify(cgrid%fmean_can_vpdef ) + nullify(cgrid%fmean_can_temp ) + nullify(cgrid%fmean_can_shv ) + nullify(cgrid%fmean_can_co2 ) + nullify(cgrid%fmean_can_rhos ) + nullify(cgrid%fmean_can_prss ) + nullify(cgrid%fmean_gnd_temp ) + nullify(cgrid%fmean_gnd_shv ) + nullify(cgrid%fmean_can_ggnd ) + nullify(cgrid%fmean_sfcw_depth ) + nullify(cgrid%fmean_sfcw_energy ) + nullify(cgrid%fmean_sfcw_mass ) + nullify(cgrid%fmean_sfcw_temp ) + nullify(cgrid%fmean_sfcw_fliq ) + nullify(cgrid%fmean_soil_energy ) + nullify(cgrid%fmean_soil_mstpot ) + nullify(cgrid%fmean_soil_water ) + nullify(cgrid%fmean_soil_temp ) + nullify(cgrid%fmean_soil_fliq ) + nullify(cgrid%fmean_rshort_gnd ) + nullify(cgrid%fmean_par_gnd ) + nullify(cgrid%fmean_rlong_gnd ) + nullify(cgrid%fmean_rlongup ) + nullify(cgrid%fmean_parup ) + nullify(cgrid%fmean_nirup ) + nullify(cgrid%fmean_rshortup ) + nullify(cgrid%fmean_rnet ) + nullify(cgrid%fmean_albedo ) + nullify(cgrid%fmean_albedo_beam ) + nullify(cgrid%fmean_albedo_diff ) + nullify(cgrid%fmean_rlong_albedo ) + nullify(cgrid%fmean_ustar ) + nullify(cgrid%fmean_tstar ) + nullify(cgrid%fmean_qstar ) + nullify(cgrid%fmean_cstar ) + nullify(cgrid%fmean_carbon_ac ) + nullify(cgrid%fmean_carbon_st ) + nullify(cgrid%fmean_vapor_gc ) + nullify(cgrid%fmean_vapor_ac ) + nullify(cgrid%fmean_smoist_gg ) + nullify(cgrid%fmean_throughfall ) + nullify(cgrid%fmean_transloss ) + nullify(cgrid%fmean_runoff ) + nullify(cgrid%fmean_drainage ) + nullify(cgrid%fmean_sensible_gc ) + nullify(cgrid%fmean_sensible_ac ) + nullify(cgrid%fmean_sensible_gg ) + nullify(cgrid%fmean_qthroughfall ) + nullify(cgrid%fmean_qrunoff ) + nullify(cgrid%fmean_qdrainage ) + nullify(cgrid%fmean_atm_theiv ) + nullify(cgrid%fmean_atm_theta ) + nullify(cgrid%fmean_atm_temp ) + nullify(cgrid%fmean_atm_vpdef ) + nullify(cgrid%fmean_atm_shv ) + nullify(cgrid%fmean_atm_rshort ) + nullify(cgrid%fmean_atm_rshort_diff ) + nullify(cgrid%fmean_atm_par ) + nullify(cgrid%fmean_atm_par_diff ) + nullify(cgrid%fmean_atm_rlong ) + nullify(cgrid%fmean_atm_vels ) + nullify(cgrid%fmean_atm_rhos ) + nullify(cgrid%fmean_atm_prss ) + nullify(cgrid%fmean_atm_co2 ) + nullify(cgrid%fmean_pcpg ) + nullify(cgrid%fmean_qpcpg ) + nullify(cgrid%fmean_dpcpg ) + nullify(cgrid%fmean_soil_wetness ) + nullify(cgrid%fmean_skin_temp ) + nullify(cgrid%dmean_nppleaf ) + nullify(cgrid%dmean_nppfroot ) + nullify(cgrid%dmean_nppsapwood ) + nullify(cgrid%dmean_nppcroot ) + nullify(cgrid%dmean_nppseeds ) + nullify(cgrid%dmean_nppwood ) + nullify(cgrid%dmean_nppdaily ) + nullify(cgrid%dmean_A_decomp ) + nullify(cgrid%dmean_Af_decomp ) + nullify(cgrid%dmean_co2_residual ) + nullify(cgrid%dmean_energy_residual ) + nullify(cgrid%dmean_water_residual ) + nullify(cgrid%dmean_gpp ) + nullify(cgrid%dmean_npp ) + nullify(cgrid%dmean_leaf_resp ) + nullify(cgrid%dmean_root_resp ) + nullify(cgrid%dmean_growth_resp ) + nullify(cgrid%dmean_storage_resp ) + nullify(cgrid%dmean_vleaf_resp ) + nullify(cgrid%dmean_plresp ) + nullify(cgrid%dmean_leaf_energy ) + nullify(cgrid%dmean_leaf_water ) + nullify(cgrid%dmean_leaf_hcap ) + nullify(cgrid%dmean_leaf_vpdef ) + nullify(cgrid%dmean_leaf_temp ) + nullify(cgrid%dmean_leaf_fliq ) + nullify(cgrid%dmean_leaf_gsw ) + nullify(cgrid%dmean_leaf_gbw ) + nullify(cgrid%dmean_wood_energy ) + nullify(cgrid%dmean_wood_water ) + nullify(cgrid%dmean_wood_hcap ) + nullify(cgrid%dmean_wood_temp ) + nullify(cgrid%dmean_wood_fliq ) + nullify(cgrid%dmean_wood_gbw ) + nullify(cgrid%dmean_fs_open ) + nullify(cgrid%dmean_fsw ) + nullify(cgrid%dmean_fsn ) + nullify(cgrid%dmean_psi_open ) + nullify(cgrid%dmean_psi_closed ) + nullify(cgrid%dmean_water_supply ) + nullify(cgrid%dmean_par_l ) + nullify(cgrid%dmean_par_l_beam ) + nullify(cgrid%dmean_par_l_diff ) + nullify(cgrid%dmean_rshort_l ) + nullify(cgrid%dmean_rlong_l ) + nullify(cgrid%dmean_sensible_lc ) + nullify(cgrid%dmean_vapor_lc ) + nullify(cgrid%dmean_transp ) + nullify(cgrid%dmean_intercepted_al ) + nullify(cgrid%dmean_wshed_lg ) + nullify(cgrid%dmean_rshort_w ) + nullify(cgrid%dmean_rlong_w ) + nullify(cgrid%dmean_sensible_wc ) + nullify(cgrid%dmean_vapor_wc ) + nullify(cgrid%dmean_intercepted_aw ) + nullify(cgrid%dmean_wshed_wg ) + nullify(cgrid%dmean_rh ) + nullify(cgrid%dmean_cwd_rh ) + nullify(cgrid%dmean_nep ) + nullify(cgrid%dmean_rk4step ) + nullify(cgrid%dmean_available_water ) + nullify(cgrid%dmean_can_theiv ) + nullify(cgrid%dmean_can_theta ) + nullify(cgrid%dmean_can_vpdef ) + nullify(cgrid%dmean_can_temp ) + nullify(cgrid%dmean_can_shv ) + nullify(cgrid%dmean_can_co2 ) + nullify(cgrid%dmean_can_rhos ) + nullify(cgrid%dmean_can_prss ) + nullify(cgrid%dmean_gnd_temp ) + nullify(cgrid%dmean_gnd_shv ) + nullify(cgrid%dmean_can_ggnd ) + nullify(cgrid%dmean_sfcw_depth ) + nullify(cgrid%dmean_sfcw_energy ) + nullify(cgrid%dmean_sfcw_mass ) + nullify(cgrid%dmean_sfcw_temp ) + nullify(cgrid%dmean_sfcw_fliq ) + nullify(cgrid%dmean_soil_energy ) + nullify(cgrid%dmean_soil_mstpot ) + nullify(cgrid%dmean_soil_water ) + nullify(cgrid%dmean_soil_temp ) + nullify(cgrid%dmean_soil_fliq ) + nullify(cgrid%dmean_rshort_gnd ) + nullify(cgrid%dmean_par_gnd ) + nullify(cgrid%dmean_rlong_gnd ) + nullify(cgrid%dmean_rlongup ) + nullify(cgrid%dmean_parup ) + nullify(cgrid%dmean_nirup ) + nullify(cgrid%dmean_rshortup ) + nullify(cgrid%dmean_rnet ) + nullify(cgrid%dmean_albedo ) + nullify(cgrid%dmean_albedo_beam ) + nullify(cgrid%dmean_albedo_diff ) + nullify(cgrid%dmean_rlong_albedo ) + nullify(cgrid%dmean_ustar ) + nullify(cgrid%dmean_tstar ) + nullify(cgrid%dmean_qstar ) + nullify(cgrid%dmean_cstar ) + nullify(cgrid%dmean_carbon_ac ) + nullify(cgrid%dmean_carbon_st ) + nullify(cgrid%dmean_vapor_gc ) + nullify(cgrid%dmean_vapor_ac ) + nullify(cgrid%dmean_smoist_gg ) + nullify(cgrid%dmean_throughfall ) + nullify(cgrid%dmean_transloss ) + nullify(cgrid%dmean_runoff ) + nullify(cgrid%dmean_drainage ) + nullify(cgrid%dmean_sensible_gc ) + nullify(cgrid%dmean_sensible_ac ) + nullify(cgrid%dmean_sensible_gg ) + nullify(cgrid%dmean_qthroughfall ) + nullify(cgrid%dmean_qrunoff ) + nullify(cgrid%dmean_qdrainage ) + nullify(cgrid%dmean_atm_theiv ) + nullify(cgrid%dmean_atm_theta ) + nullify(cgrid%dmean_atm_temp ) + nullify(cgrid%dmean_atm_vpdef ) + nullify(cgrid%dmean_atm_shv ) + nullify(cgrid%dmean_atm_rshort ) + nullify(cgrid%dmean_atm_rshort_diff ) + nullify(cgrid%dmean_atm_par ) + nullify(cgrid%dmean_atm_par_diff ) + nullify(cgrid%dmean_atm_rlong ) + nullify(cgrid%dmean_atm_vels ) + nullify(cgrid%dmean_atm_rhos ) + nullify(cgrid%dmean_atm_prss ) + nullify(cgrid%dmean_atm_co2 ) + nullify(cgrid%dmean_pcpg ) + nullify(cgrid%dmean_qpcpg ) + nullify(cgrid%dmean_dpcpg ) + nullify(cgrid%mmean_lai ) + nullify(cgrid%mmean_bleaf ) + nullify(cgrid%mmean_broot ) + nullify(cgrid%mmean_bstorage ) + nullify(cgrid%mmean_bleaf_n ) + nullify(cgrid%mmean_broot_n ) + nullify(cgrid%mmean_bstorage_n ) + nullify(cgrid%mmean_leaf_maintenance ) + nullify(cgrid%mmean_root_maintenance ) + nullify(cgrid%mmean_leaf_drop ) + nullify(cgrid%mmean_fast_soil_c ) + nullify(cgrid%mmean_slow_soil_c ) + nullify(cgrid%mmean_struct_soil_c ) + nullify(cgrid%mmean_struct_soil_l ) + nullify(cgrid%mmean_cwd_c ) + nullify(cgrid%mmean_fast_soil_n ) + nullify(cgrid%mmean_mineral_soil_n ) + nullify(cgrid%mmean_cwd_n ) + nullify(cgrid%mmean_gpp ) + nullify(cgrid%mmean_npp ) + nullify(cgrid%mmean_leaf_resp ) + nullify(cgrid%mmean_root_resp ) + nullify(cgrid%mmean_growth_resp ) + nullify(cgrid%mmean_storage_resp ) + nullify(cgrid%mmean_vleaf_resp ) + nullify(cgrid%mmean_plresp ) + nullify(cgrid%mmean_leaf_energy ) + nullify(cgrid%mmean_leaf_water ) + nullify(cgrid%mmean_leaf_hcap ) + nullify(cgrid%mmean_leaf_vpdef ) + nullify(cgrid%mmean_leaf_temp ) + nullify(cgrid%mmean_leaf_fliq ) + nullify(cgrid%mmean_leaf_gsw ) + nullify(cgrid%mmean_leaf_gbw ) + nullify(cgrid%mmean_wood_energy ) + nullify(cgrid%mmean_wood_water ) + nullify(cgrid%mmean_wood_hcap ) + nullify(cgrid%mmean_wood_temp ) + nullify(cgrid%mmean_wood_fliq ) + nullify(cgrid%mmean_wood_gbw ) + nullify(cgrid%mmean_fs_open ) + nullify(cgrid%mmean_fsw ) + nullify(cgrid%mmean_fsn ) + nullify(cgrid%mmean_psi_open ) + nullify(cgrid%mmean_psi_closed ) + nullify(cgrid%mmean_water_supply ) + nullify(cgrid%mmean_par_l ) + nullify(cgrid%mmean_par_l_beam ) + nullify(cgrid%mmean_par_l_diff ) + nullify(cgrid%mmean_rshort_l ) + nullify(cgrid%mmean_rlong_l ) + nullify(cgrid%mmean_sensible_lc ) + nullify(cgrid%mmean_vapor_lc ) + nullify(cgrid%mmean_transp ) + nullify(cgrid%mmean_intercepted_al ) + nullify(cgrid%mmean_wshed_lg ) + nullify(cgrid%mmean_rshort_w ) + nullify(cgrid%mmean_rlong_w ) + nullify(cgrid%mmean_sensible_wc ) + nullify(cgrid%mmean_vapor_wc ) + nullify(cgrid%mmean_intercepted_aw ) + nullify(cgrid%mmean_wshed_wg ) + nullify(cgrid%mmean_rh ) + nullify(cgrid%mmean_cwd_rh ) + nullify(cgrid%mmean_nep ) + nullify(cgrid%mmean_rk4step ) + nullify(cgrid%mmean_available_water ) + nullify(cgrid%mmean_can_theiv ) + nullify(cgrid%mmean_can_theta ) + nullify(cgrid%mmean_can_vpdef ) + nullify(cgrid%mmean_can_temp ) + nullify(cgrid%mmean_can_shv ) + nullify(cgrid%mmean_can_co2 ) + nullify(cgrid%mmean_can_rhos ) + nullify(cgrid%mmean_can_prss ) + nullify(cgrid%mmean_gnd_temp ) + nullify(cgrid%mmean_gnd_shv ) + nullify(cgrid%mmean_can_ggnd ) + nullify(cgrid%mmean_sfcw_depth ) + nullify(cgrid%mmean_sfcw_energy ) + nullify(cgrid%mmean_sfcw_mass ) + nullify(cgrid%mmean_sfcw_temp ) + nullify(cgrid%mmean_sfcw_fliq ) + nullify(cgrid%mmean_soil_energy ) + nullify(cgrid%mmean_soil_mstpot ) + nullify(cgrid%mmean_soil_water ) + nullify(cgrid%mmean_soil_temp ) + nullify(cgrid%mmean_soil_fliq ) + nullify(cgrid%mmean_rshort_gnd ) + nullify(cgrid%mmean_par_gnd ) + nullify(cgrid%mmean_rlong_gnd ) + nullify(cgrid%mmean_rlongup ) + nullify(cgrid%mmean_parup ) + nullify(cgrid%mmean_nirup ) + nullify(cgrid%mmean_rshortup ) + nullify(cgrid%mmean_rnet ) + nullify(cgrid%mmean_albedo ) + nullify(cgrid%mmean_albedo_beam ) + nullify(cgrid%mmean_albedo_diff ) + nullify(cgrid%mmean_rlong_albedo ) + nullify(cgrid%mmean_ustar ) + nullify(cgrid%mmean_tstar ) + nullify(cgrid%mmean_qstar ) + nullify(cgrid%mmean_cstar ) + nullify(cgrid%mmean_carbon_ac ) + nullify(cgrid%mmean_carbon_st ) + nullify(cgrid%mmean_vapor_gc ) + nullify(cgrid%mmean_vapor_ac ) + nullify(cgrid%mmean_smoist_gg ) + nullify(cgrid%mmean_throughfall ) + nullify(cgrid%mmean_transloss ) + nullify(cgrid%mmean_runoff ) + nullify(cgrid%mmean_drainage ) + nullify(cgrid%mmean_sensible_gc ) + nullify(cgrid%mmean_sensible_ac ) + nullify(cgrid%mmean_sensible_gg ) + nullify(cgrid%mmean_qthroughfall ) + nullify(cgrid%mmean_qrunoff ) + nullify(cgrid%mmean_qdrainage ) + nullify(cgrid%mmean_nppleaf ) + nullify(cgrid%mmean_nppfroot ) + nullify(cgrid%mmean_nppsapwood ) + nullify(cgrid%mmean_nppcroot ) + nullify(cgrid%mmean_nppseeds ) + nullify(cgrid%mmean_nppwood ) + nullify(cgrid%mmean_nppdaily ) + nullify(cgrid%mmean_A_decomp ) + nullify(cgrid%mmean_Af_decomp ) + nullify(cgrid%mmean_co2_residual ) + nullify(cgrid%mmean_energy_residual ) + nullify(cgrid%mmean_water_residual ) + nullify(cgrid%mmean_atm_theiv ) + nullify(cgrid%mmean_atm_theta ) + nullify(cgrid%mmean_atm_temp ) + nullify(cgrid%mmean_atm_vpdef ) + nullify(cgrid%mmean_atm_shv ) + nullify(cgrid%mmean_atm_rshort ) + nullify(cgrid%mmean_atm_rshort_diff ) + nullify(cgrid%mmean_atm_par ) + nullify(cgrid%mmean_atm_par_diff ) + nullify(cgrid%mmean_atm_rlong ) + nullify(cgrid%mmean_atm_vels ) + nullify(cgrid%mmean_atm_rhos ) + nullify(cgrid%mmean_atm_prss ) + nullify(cgrid%mmean_atm_co2 ) + nullify(cgrid%mmean_pcpg ) + nullify(cgrid%mmean_qpcpg ) + nullify(cgrid%mmean_dpcpg ) + nullify(cgrid%mmsqu_gpp ) + nullify(cgrid%mmsqu_npp ) + nullify(cgrid%mmsqu_plresp ) + nullify(cgrid%mmsqu_sensible_lc ) + nullify(cgrid%mmsqu_vapor_lc ) + nullify(cgrid%mmsqu_transp ) + nullify(cgrid%mmsqu_sensible_wc ) + nullify(cgrid%mmsqu_vapor_wc ) + nullify(cgrid%mmsqu_rh ) + nullify(cgrid%mmsqu_cwd_rh ) + nullify(cgrid%mmsqu_nep ) + nullify(cgrid%mmsqu_rlongup ) + nullify(cgrid%mmsqu_parup ) + nullify(cgrid%mmsqu_nirup ) + nullify(cgrid%mmsqu_rshortup ) + nullify(cgrid%mmsqu_rnet ) + nullify(cgrid%mmsqu_albedo ) + nullify(cgrid%mmsqu_ustar ) + nullify(cgrid%mmsqu_carbon_ac ) + nullify(cgrid%mmsqu_carbon_st ) + nullify(cgrid%mmsqu_vapor_gc ) + nullify(cgrid%mmsqu_vapor_ac ) + nullify(cgrid%mmsqu_sensible_gc ) + nullify(cgrid%mmsqu_sensible_ac ) + nullify(cgrid%qmean_gpp ) + nullify(cgrid%qmean_npp ) + nullify(cgrid%qmean_leaf_resp ) + nullify(cgrid%qmean_root_resp ) + nullify(cgrid%qmean_growth_resp ) + nullify(cgrid%qmean_storage_resp ) + nullify(cgrid%qmean_vleaf_resp ) + nullify(cgrid%qmean_plresp ) + nullify(cgrid%qmean_leaf_energy ) + nullify(cgrid%qmean_leaf_water ) + nullify(cgrid%qmean_leaf_hcap ) + nullify(cgrid%qmean_leaf_vpdef ) + nullify(cgrid%qmean_leaf_temp ) + nullify(cgrid%qmean_leaf_fliq ) + nullify(cgrid%qmean_leaf_gsw ) + nullify(cgrid%qmean_leaf_gbw ) + nullify(cgrid%qmean_wood_energy ) + nullify(cgrid%qmean_wood_water ) + nullify(cgrid%qmean_wood_hcap ) + nullify(cgrid%qmean_wood_temp ) + nullify(cgrid%qmean_wood_fliq ) + nullify(cgrid%qmean_wood_gbw ) + nullify(cgrid%qmean_fs_open ) + nullify(cgrid%qmean_fsw ) + nullify(cgrid%qmean_fsn ) + nullify(cgrid%qmean_psi_open ) + nullify(cgrid%qmean_psi_closed ) + nullify(cgrid%qmean_water_supply ) + nullify(cgrid%qmean_par_l ) + nullify(cgrid%qmean_par_l_beam ) + nullify(cgrid%qmean_par_l_diff ) + nullify(cgrid%qmean_rshort_l ) + nullify(cgrid%qmean_rlong_l ) + nullify(cgrid%qmean_sensible_lc ) + nullify(cgrid%qmean_vapor_lc ) + nullify(cgrid%qmean_transp ) + nullify(cgrid%qmean_intercepted_al ) + nullify(cgrid%qmean_wshed_lg ) + nullify(cgrid%qmean_rshort_w ) + nullify(cgrid%qmean_rlong_w ) + nullify(cgrid%qmean_sensible_wc ) + nullify(cgrid%qmean_vapor_wc ) + nullify(cgrid%qmean_intercepted_aw ) + nullify(cgrid%qmean_wshed_wg ) + nullify(cgrid%qmean_rh ) + nullify(cgrid%qmean_cwd_rh ) + nullify(cgrid%qmean_nep ) + nullify(cgrid%qmean_rk4step ) + nullify(cgrid%qmean_available_water ) + nullify(cgrid%qmean_can_theiv ) + nullify(cgrid%qmean_can_theta ) + nullify(cgrid%qmean_can_vpdef ) + nullify(cgrid%qmean_can_temp ) + nullify(cgrid%qmean_can_shv ) + nullify(cgrid%qmean_can_co2 ) + nullify(cgrid%qmean_can_rhos ) + nullify(cgrid%qmean_can_prss ) + nullify(cgrid%qmean_gnd_temp ) + nullify(cgrid%qmean_gnd_shv ) + nullify(cgrid%qmean_can_ggnd ) + nullify(cgrid%qmean_sfcw_depth ) + nullify(cgrid%qmean_sfcw_energy ) + nullify(cgrid%qmean_sfcw_mass ) + nullify(cgrid%qmean_sfcw_temp ) + nullify(cgrid%qmean_sfcw_fliq ) + nullify(cgrid%qmean_soil_energy ) + nullify(cgrid%qmean_soil_mstpot ) + nullify(cgrid%qmean_soil_water ) + nullify(cgrid%qmean_soil_temp ) + nullify(cgrid%qmean_soil_fliq ) + nullify(cgrid%qmean_rshort_gnd ) + nullify(cgrid%qmean_par_gnd ) + nullify(cgrid%qmean_rlong_gnd ) + nullify(cgrid%qmean_rlongup ) + nullify(cgrid%qmean_parup ) + nullify(cgrid%qmean_nirup ) + nullify(cgrid%qmean_rshortup ) + nullify(cgrid%qmean_rnet ) + nullify(cgrid%qmean_albedo ) + nullify(cgrid%qmean_albedo_beam ) + nullify(cgrid%qmean_albedo_diff ) + nullify(cgrid%qmean_rlong_albedo ) + nullify(cgrid%qmean_ustar ) + nullify(cgrid%qmean_tstar ) + nullify(cgrid%qmean_qstar ) + nullify(cgrid%qmean_cstar ) + nullify(cgrid%qmean_carbon_ac ) + nullify(cgrid%qmean_carbon_st ) + nullify(cgrid%qmean_vapor_gc ) + nullify(cgrid%qmean_vapor_ac ) + nullify(cgrid%qmean_smoist_gg ) + nullify(cgrid%qmean_throughfall ) + nullify(cgrid%qmean_transloss ) + nullify(cgrid%qmean_runoff ) + nullify(cgrid%qmean_drainage ) + nullify(cgrid%qmean_sensible_gc ) + nullify(cgrid%qmean_sensible_ac ) + nullify(cgrid%qmean_sensible_gg ) + nullify(cgrid%qmean_qthroughfall ) + nullify(cgrid%qmean_qrunoff ) + nullify(cgrid%qmean_qdrainage ) + nullify(cgrid%qmean_atm_theiv ) + nullify(cgrid%qmean_atm_theta ) + nullify(cgrid%qmean_atm_temp ) + nullify(cgrid%qmean_atm_vpdef ) + nullify(cgrid%qmean_atm_shv ) + nullify(cgrid%qmean_atm_rshort ) + nullify(cgrid%qmean_atm_rshort_diff ) + nullify(cgrid%qmean_atm_par ) + nullify(cgrid%qmean_atm_par_diff ) + nullify(cgrid%qmean_atm_rlong ) + nullify(cgrid%qmean_atm_vels ) + nullify(cgrid%qmean_atm_rhos ) + nullify(cgrid%qmean_atm_prss ) + nullify(cgrid%qmean_atm_co2 ) + nullify(cgrid%qmean_pcpg ) + nullify(cgrid%qmean_qpcpg ) + nullify(cgrid%qmean_dpcpg ) + nullify(cgrid%qmsqu_gpp ) + nullify(cgrid%qmsqu_npp ) + nullify(cgrid%qmsqu_plresp ) + nullify(cgrid%qmsqu_sensible_lc ) + nullify(cgrid%qmsqu_vapor_lc ) + nullify(cgrid%qmsqu_transp ) + nullify(cgrid%qmsqu_sensible_wc ) + nullify(cgrid%qmsqu_vapor_wc ) + nullify(cgrid%qmsqu_rh ) + nullify(cgrid%qmsqu_cwd_rh ) + nullify(cgrid%qmsqu_nep ) + nullify(cgrid%qmsqu_rlongup ) + nullify(cgrid%qmsqu_parup ) + nullify(cgrid%qmsqu_nirup ) + nullify(cgrid%qmsqu_rshortup ) + nullify(cgrid%qmsqu_rnet ) + nullify(cgrid%qmsqu_albedo ) + nullify(cgrid%qmsqu_ustar ) + nullify(cgrid%qmsqu_carbon_ac ) + nullify(cgrid%qmsqu_carbon_st ) + nullify(cgrid%qmsqu_vapor_gc ) + nullify(cgrid%qmsqu_vapor_ac ) + nullify(cgrid%qmsqu_sensible_gc ) + nullify(cgrid%qmsqu_sensible_ac ) + + return + end subroutine nullify_edtype + !=======================================================================================! + !=======================================================================================! @@ -8718,2603 +5364,5713 @@ end subroutine filltab_edtype_p10 !=======================================================================================! !=======================================================================================! - ! This routine will fill the pointer table with the polygon-level variables ! - ! (edtype) that have one dimension and are real (type 11). ! + ! This sub-routine nullifies all site pointers. ! !---------------------------------------------------------------------------------------! - subroutine filltab_edtype_p11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) - use ed_var_tables, only : vtable_edio_r & ! sub-routine - , metadata_edio ! ! sub-routine + subroutine nullify_polygontype(cpoly) implicit none + !----- Arguments. -------------------------------------------------------------------! - type(edtype), target :: cgrid - integer , intent(in) :: init - integer , intent(in) :: igr - integer , intent(in) :: var_len - integer , intent(in) :: max_ptrs - integer , intent(in) :: var_len_global - integer , intent(inout) :: nvar + type(polygontype), target :: cpoly + !------------------------------------------------------------------------------------! + + nullify(cpoly%site ) + + nullify(cpoly%sipa_id ) + nullify(cpoly%sipa_n ) + nullify(cpoly%patch_count ) + nullify(cpoly%sitenum ) + nullify(cpoly%met ) + nullify(cpoly%area ) + nullify(cpoly%patch_area ) + nullify(cpoly%elevation ) + nullify(cpoly%slope ) + nullify(cpoly%aspect ) + nullify(cpoly%lsl ) + nullify(cpoly%ncol_soil ) + nullify(cpoly%ntext_soil ) + nullify(cpoly%TCI ) + nullify(cpoly%pptweight ) + nullify(cpoly%hydro_next ) + nullify(cpoly%hydro_prev ) + nullify(cpoly%moist_W ) + nullify(cpoly%moist_f ) + nullify(cpoly%moist_tau ) + nullify(cpoly%moist_zi ) + nullify(cpoly%baseflow ) + nullify(cpoly%runoff ) + nullify(cpoly%qrunoff ) + nullify(cpoly%min_monthly_temp ) + nullify(cpoly%num_landuse_years ) + nullify(cpoly%mindbh_primary ) + nullify(cpoly%probharv_primary ) + nullify(cpoly%mindbh_secondary ) + nullify(cpoly%probharv_secondary ) + nullify(cpoly%plantation ) + nullify(cpoly%agri_stocking_pft ) + nullify(cpoly%agri_stocking_density ) + nullify(cpoly%plantation_stocking_pft ) + nullify(cpoly%plantation_stocking_density) + nullify(cpoly%primary_harvest_memory ) + nullify(cpoly%secondary_harvest_memory ) + nullify(cpoly%fire_disturbance_rate ) + nullify(cpoly%ignition_rate ) + nullify(cpoly%lambda_fire ) + nullify(cpoly%avg_monthly_pcpg ) + nullify(cpoly%phen_pars ) + nullify(cpoly%nat_disturbance_rate ) + nullify(cpoly%nat_dist_type ) + nullify(cpoly%disturbance_memory ) + nullify(cpoly%disturbance_rates ) + nullify(cpoly%green_leaf_factor ) + nullify(cpoly%leaf_aging_factor ) + nullify(cpoly%basal_area ) + nullify(cpoly%basal_area_growth ) + nullify(cpoly%agb ) + nullify(cpoly%agb_growth ) + nullify(cpoly%basal_area_mort ) + nullify(cpoly%basal_area_cut ) + nullify(cpoly%agb_mort ) + nullify(cpoly%agb_cut ) + nullify(cpoly%cosaoi ) + nullify(cpoly%daylight ) + nullify(cpoly%nighttime ) + nullify(cpoly%rad_avg ) + nullify(cpoly%fmean_atm_theiv ) + nullify(cpoly%fmean_atm_theta ) + nullify(cpoly%fmean_atm_temp ) + nullify(cpoly%fmean_atm_vpdef ) + nullify(cpoly%fmean_atm_shv ) + nullify(cpoly%fmean_atm_rshort ) + nullify(cpoly%fmean_atm_rshort_diff ) + nullify(cpoly%fmean_atm_par ) + nullify(cpoly%fmean_atm_par_diff ) + nullify(cpoly%fmean_atm_rlong ) + nullify(cpoly%fmean_atm_vels ) + nullify(cpoly%fmean_atm_rhos ) + nullify(cpoly%fmean_atm_prss ) + nullify(cpoly%fmean_atm_co2 ) + nullify(cpoly%fmean_pcpg ) + nullify(cpoly%fmean_qpcpg ) + nullify(cpoly%fmean_dpcpg ) + nullify(cpoly%dmean_atm_theiv ) + nullify(cpoly%dmean_atm_theta ) + nullify(cpoly%dmean_atm_temp ) + nullify(cpoly%dmean_atm_vpdef ) + nullify(cpoly%dmean_atm_shv ) + nullify(cpoly%dmean_atm_rshort ) + nullify(cpoly%dmean_atm_rshort_diff ) + nullify(cpoly%dmean_atm_par ) + nullify(cpoly%dmean_atm_par_diff ) + nullify(cpoly%dmean_atm_rlong ) + nullify(cpoly%dmean_atm_vels ) + nullify(cpoly%dmean_atm_rhos ) + nullify(cpoly%dmean_atm_prss ) + nullify(cpoly%dmean_atm_co2 ) + nullify(cpoly%dmean_pcpg ) + nullify(cpoly%dmean_qpcpg ) + nullify(cpoly%dmean_dpcpg ) + nullify(cpoly%mmean_atm_theiv ) + nullify(cpoly%mmean_atm_theta ) + nullify(cpoly%mmean_atm_temp ) + nullify(cpoly%mmean_atm_vpdef ) + nullify(cpoly%mmean_atm_shv ) + nullify(cpoly%mmean_atm_rshort ) + nullify(cpoly%mmean_atm_rshort_diff ) + nullify(cpoly%mmean_atm_par ) + nullify(cpoly%mmean_atm_par_diff ) + nullify(cpoly%mmean_atm_rlong ) + nullify(cpoly%mmean_atm_vels ) + nullify(cpoly%mmean_atm_rhos ) + nullify(cpoly%mmean_atm_prss ) + nullify(cpoly%mmean_atm_co2 ) + nullify(cpoly%mmean_pcpg ) + nullify(cpoly%mmean_qpcpg ) + nullify(cpoly%mmean_dpcpg ) + nullify(cpoly%qmean_atm_theiv ) + nullify(cpoly%qmean_atm_theta ) + nullify(cpoly%qmean_atm_temp ) + nullify(cpoly%qmean_atm_vpdef ) + nullify(cpoly%qmean_atm_shv ) + nullify(cpoly%qmean_atm_rshort ) + nullify(cpoly%qmean_atm_rshort_diff ) + nullify(cpoly%qmean_atm_par ) + nullify(cpoly%qmean_atm_par_diff ) + nullify(cpoly%qmean_atm_rlong ) + nullify(cpoly%qmean_atm_vels ) + nullify(cpoly%qmean_atm_rhos ) + nullify(cpoly%qmean_atm_prss ) + nullify(cpoly%qmean_atm_co2 ) + nullify(cpoly%qmean_pcpg ) + nullify(cpoly%qmean_qpcpg ) + nullify(cpoly%qmean_dpcpg ) + + return + end subroutine nullify_polygontype + !=======================================================================================! + !=======================================================================================! + + + + + + !=======================================================================================! + !=======================================================================================! + ! This sub-routine nullifies all patch pointers. ! + !---------------------------------------------------------------------------------------! + subroutine nullify_sitetype(csite) + + implicit none + + !----- Arguments. -------------------------------------------------------------------! + type(sitetype), target :: csite + !------------------------------------------------------------------------------------! + + nullify(csite%paco_id ) + nullify(csite%paco_n ) + nullify(csite%patch ) + nullify(csite%cohort_count ) + nullify(csite%pname ) + nullify(csite%area ) + nullify(csite%age ) + nullify(csite%dist_type ) + nullify(csite%fast_soil_C ) + nullify(csite%slow_soil_C ) + nullify(csite%structural_soil_C ) + nullify(csite%structural_soil_L ) + nullify(csite%mineralized_soil_N ) + nullify(csite%fast_soil_N ) + nullify(csite%sum_dgd ) + nullify(csite%sum_chd ) + nullify(csite%plantation ) + nullify(csite%can_theiv ) + nullify(csite%can_vpdef ) + nullify(csite%can_temp ) + nullify(csite%can_temp_pv ) + nullify(csite%can_shv ) + nullify(csite%can_co2 ) + nullify(csite%can_rhos ) + nullify(csite%can_prss ) + nullify(csite%can_theta ) + nullify(csite%can_depth ) + nullify(csite%opencan_frac ) + nullify(csite%ggbare ) + nullify(csite%ggveg ) + nullify(csite%ggnet ) + nullify(csite%ggsoil ) + nullify(csite%nlev_sfcwater ) + nullify(csite%sfcwater_mass ) + nullify(csite%sfcwater_energy ) + nullify(csite%sfcwater_depth ) + nullify(csite%sfcwater_tempk ) + nullify(csite%sfcwater_fracliq ) + nullify(csite%rshort_s ) + nullify(csite%rshort_s_beam ) + nullify(csite%rshort_s_diffuse ) + nullify(csite%par_s ) + nullify(csite%par_s_beam ) + nullify(csite%par_s_diffuse ) + nullify(csite%soil_energy ) + nullify(csite%soil_mstpot ) + nullify(csite%soil_water ) + nullify(csite%soil_tempk ) + nullify(csite%soil_fracliq ) + nullify(csite%rootdense ) + nullify(csite%ground_shv ) + nullify(csite%ground_ssh ) + nullify(csite%ground_temp ) + nullify(csite%ground_fliq ) + nullify(csite%rough ) + nullify(csite%par_l_max ) + nullify(csite%par_l_beam_max ) + nullify(csite%par_l_diffuse_max ) + nullify(csite%A_o_max ) + nullify(csite%A_c_max ) + nullify(csite%avg_daily_temp ) + nullify(csite%avg_monthly_gndwater ) + nullify(csite%avg_monthly_waterdef ) + nullify(csite%wbudget_loss2atm ) + nullify(csite%wbudget_denseffect ) + nullify(csite%wbudget_precipgain ) + nullify(csite%wbudget_loss2runoff ) + nullify(csite%wbudget_loss2drainage ) + nullify(csite%wbudget_initialstorage ) + nullify(csite%wbudget_residual ) + nullify(csite%ebudget_loss2atm ) + nullify(csite%ebudget_denseffect ) + nullify(csite%ebudget_prsseffect ) + nullify(csite%ebudget_loss2runoff ) + nullify(csite%ebudget_loss2drainage ) + nullify(csite%ebudget_netrad ) + nullify(csite%ebudget_precipgain ) + nullify(csite%ebudget_initialstorage ) + nullify(csite%ebudget_residual ) + nullify(csite%co2budget_initialstorage ) + nullify(csite%co2budget_residual ) + nullify(csite%co2budget_loss2atm ) + nullify(csite%co2budget_denseffect ) + nullify(csite%co2budget_gpp ) + nullify(csite%co2budget_plresp ) + nullify(csite%co2budget_rh ) + nullify(csite%today_A_decomp ) + nullify(csite%today_Af_decomp ) + nullify(csite%repro ) + nullify(csite%veg_rough ) + nullify(csite%veg_height ) + nullify(csite%veg_displace ) + nullify(csite%fsc_in ) + nullify(csite%ssc_in ) + nullify(csite%ssl_in ) + nullify(csite%fsn_in ) + nullify(csite%total_plant_nitrogen_uptake) + nullify(csite%mineralized_N_loss ) + nullify(csite%mineralized_N_input ) + nullify(csite%rshort_g ) + nullify(csite%rshort_g_beam ) + nullify(csite%rshort_g_diffuse ) + nullify(csite%par_g ) + nullify(csite%par_g_beam ) + nullify(csite%par_g_diffuse ) + nullify(csite%par_b ) + nullify(csite%par_b_beam ) + nullify(csite%par_b_diffuse ) + nullify(csite%nir_b ) + nullify(csite%nir_b_beam ) + nullify(csite%nir_b_diffuse ) + nullify(csite%rlong_g ) + nullify(csite%rlong_g_surf ) + nullify(csite%rlong_g_incid ) + nullify(csite%rlong_s ) + nullify(csite%rlong_s_surf ) + nullify(csite%rlong_s_incid ) + nullify(csite%albedo ) + nullify(csite%albedo_beam ) + nullify(csite%albedo_diffuse ) + nullify(csite%rlong_albedo ) + nullify(csite%rnet ) + nullify(csite%rlongup ) + nullify(csite%parup ) + nullify(csite%nirup ) + nullify(csite%rshortup ) + nullify(csite%total_sfcw_depth ) + nullify(csite%snowfac ) + nullify(csite%A_decomp ) + nullify(csite%f_decomp ) + nullify(csite%rh ) + nullify(csite%cwd_rh ) + nullify(csite%cumlai_profile ) + nullify(csite%plant_ag_biomass ) + nullify(csite%htry ) + nullify(csite%hprev ) + nullify(csite%ustar ) + nullify(csite%tstar ) + nullify(csite%qstar ) + nullify(csite%cstar ) + nullify(csite%zeta ) + nullify(csite%ribulk ) + nullify(csite%upwp ) + nullify(csite%qpwp ) + nullify(csite%cpwp ) + nullify(csite%tpwp ) + nullify(csite%wpwp ) + nullify(csite%watertable ) + nullify(csite%moist_dz ) + nullify(csite%ksat ) + nullify(csite%soil_sat_energy ) + nullify(csite%soil_sat_water ) + nullify(csite%soil_sat_heat ) + nullify(csite%runoff_A ) + nullify(csite%runoff_rate ) + nullify(csite%runoff ) + nullify(csite%qrunoff ) + nullify(csite%fmean_rh ) + nullify(csite%fmean_cwd_rh ) + nullify(csite%fmean_nep ) + nullify(csite%fmean_rk4step ) + nullify(csite%fmean_available_water ) + nullify(csite%fmean_can_theiv ) + nullify(csite%fmean_can_theta ) + nullify(csite%fmean_can_vpdef ) + nullify(csite%fmean_can_temp ) + nullify(csite%fmean_can_shv ) + nullify(csite%fmean_can_co2 ) + nullify(csite%fmean_can_rhos ) + nullify(csite%fmean_can_prss ) + nullify(csite%fmean_gnd_temp ) + nullify(csite%fmean_gnd_shv ) + nullify(csite%fmean_can_ggnd ) + nullify(csite%fmean_sfcw_depth ) + nullify(csite%fmean_sfcw_energy ) + nullify(csite%fmean_sfcw_mass ) + nullify(csite%fmean_sfcw_temp ) + nullify(csite%fmean_sfcw_fliq ) + nullify(csite%fmean_soil_energy ) + nullify(csite%fmean_soil_mstpot ) + nullify(csite%fmean_soil_water ) + nullify(csite%fmean_soil_temp ) + nullify(csite%fmean_soil_fliq ) + nullify(csite%fmean_rshort_gnd ) + nullify(csite%fmean_par_gnd ) + nullify(csite%fmean_rlong_gnd ) + nullify(csite%fmean_rlongup ) + nullify(csite%fmean_parup ) + nullify(csite%fmean_nirup ) + nullify(csite%fmean_rshortup ) + nullify(csite%fmean_rnet ) + nullify(csite%fmean_albedo ) + nullify(csite%fmean_albedo_beam ) + nullify(csite%fmean_albedo_diff ) + nullify(csite%fmean_rlong_albedo ) + nullify(csite%fmean_ustar ) + nullify(csite%fmean_tstar ) + nullify(csite%fmean_qstar ) + nullify(csite%fmean_cstar ) + nullify(csite%fmean_carbon_ac ) + nullify(csite%fmean_carbon_st ) + nullify(csite%fmean_vapor_gc ) + nullify(csite%fmean_vapor_ac ) + nullify(csite%fmean_smoist_gg ) + nullify(csite%fmean_throughfall ) + nullify(csite%fmean_transloss ) + nullify(csite%fmean_runoff ) + nullify(csite%fmean_drainage ) + nullify(csite%fmean_sensible_gc ) + nullify(csite%fmean_sensible_ac ) + nullify(csite%fmean_sensible_gg ) + nullify(csite%fmean_qthroughfall ) + nullify(csite%fmean_qrunoff ) + nullify(csite%fmean_qdrainage ) + nullify(csite%dmean_A_decomp ) + nullify(csite%dmean_Af_decomp ) + nullify(csite%dmean_co2_residual ) + nullify(csite%dmean_energy_residual ) + nullify(csite%dmean_water_residual ) + nullify(csite%dmean_rh ) + nullify(csite%dmean_cwd_rh ) + nullify(csite%dmean_nep ) + nullify(csite%dmean_rk4step ) + nullify(csite%dmean_available_water ) + nullify(csite%dmean_can_theiv ) + nullify(csite%dmean_can_theta ) + nullify(csite%dmean_can_vpdef ) + nullify(csite%dmean_can_temp ) + nullify(csite%dmean_can_shv ) + nullify(csite%dmean_can_co2 ) + nullify(csite%dmean_can_rhos ) + nullify(csite%dmean_can_prss ) + nullify(csite%dmean_gnd_temp ) + nullify(csite%dmean_gnd_shv ) + nullify(csite%dmean_can_ggnd ) + nullify(csite%dmean_sfcw_depth ) + nullify(csite%dmean_sfcw_energy ) + nullify(csite%dmean_sfcw_mass ) + nullify(csite%dmean_sfcw_temp ) + nullify(csite%dmean_sfcw_fliq ) + nullify(csite%dmean_soil_energy ) + nullify(csite%dmean_soil_mstpot ) + nullify(csite%dmean_soil_water ) + nullify(csite%dmean_soil_temp ) + nullify(csite%dmean_soil_fliq ) + nullify(csite%dmean_rshort_gnd ) + nullify(csite%dmean_par_gnd ) + nullify(csite%dmean_rlong_gnd ) + nullify(csite%dmean_rlongup ) + nullify(csite%dmean_parup ) + nullify(csite%dmean_nirup ) + nullify(csite%dmean_rshortup ) + nullify(csite%dmean_rnet ) + nullify(csite%dmean_albedo ) + nullify(csite%dmean_albedo_beam ) + nullify(csite%dmean_albedo_diff ) + nullify(csite%dmean_rlong_albedo ) + nullify(csite%dmean_ustar ) + nullify(csite%dmean_tstar ) + nullify(csite%dmean_qstar ) + nullify(csite%dmean_cstar ) + nullify(csite%dmean_carbon_ac ) + nullify(csite%dmean_carbon_st ) + nullify(csite%dmean_vapor_gc ) + nullify(csite%dmean_vapor_ac ) + nullify(csite%dmean_smoist_gg ) + nullify(csite%dmean_throughfall ) + nullify(csite%dmean_transloss ) + nullify(csite%dmean_runoff ) + nullify(csite%dmean_drainage ) + nullify(csite%dmean_sensible_gc ) + nullify(csite%dmean_sensible_ac ) + nullify(csite%dmean_sensible_gg ) + nullify(csite%dmean_qthroughfall ) + nullify(csite%dmean_qrunoff ) + nullify(csite%dmean_qdrainage ) + nullify(csite%mmean_fast_soil_c ) + nullify(csite%mmean_slow_soil_c ) + nullify(csite%mmean_struct_soil_c ) + nullify(csite%mmean_struct_soil_l ) + nullify(csite%mmean_fast_soil_n ) + nullify(csite%mmean_mineral_soil_n ) + nullify(csite%mmean_co2_residual ) + nullify(csite%mmean_energy_residual ) + nullify(csite%mmean_water_residual ) + nullify(csite%mmean_rh ) + nullify(csite%mmean_cwd_rh ) + nullify(csite%mmean_nep ) + nullify(csite%mmean_A_decomp ) + nullify(csite%mmean_Af_decomp ) + nullify(csite%mmean_rk4step ) + nullify(csite%mmean_available_water ) + nullify(csite%mmean_can_theiv ) + nullify(csite%mmean_can_theta ) + nullify(csite%mmean_can_vpdef ) + nullify(csite%mmean_can_temp ) + nullify(csite%mmean_can_shv ) + nullify(csite%mmean_can_co2 ) + nullify(csite%mmean_can_rhos ) + nullify(csite%mmean_can_prss ) + nullify(csite%mmean_gnd_temp ) + nullify(csite%mmean_gnd_shv ) + nullify(csite%mmean_can_ggnd ) + nullify(csite%mmean_sfcw_depth ) + nullify(csite%mmean_sfcw_energy ) + nullify(csite%mmean_sfcw_mass ) + nullify(csite%mmean_sfcw_temp ) + nullify(csite%mmean_sfcw_fliq ) + nullify(csite%mmean_soil_energy ) + nullify(csite%mmean_soil_mstpot ) + nullify(csite%mmean_soil_water ) + nullify(csite%mmean_soil_temp ) + nullify(csite%mmean_soil_fliq ) + nullify(csite%mmean_rshort_gnd ) + nullify(csite%mmean_par_gnd ) + nullify(csite%mmean_rlong_gnd ) + nullify(csite%mmean_rlongup ) + nullify(csite%mmean_parup ) + nullify(csite%mmean_nirup ) + nullify(csite%mmean_rshortup ) + nullify(csite%mmean_rnet ) + nullify(csite%mmean_albedo ) + nullify(csite%mmean_albedo_beam ) + nullify(csite%mmean_albedo_diff ) + nullify(csite%mmean_rlong_albedo ) + nullify(csite%mmean_ustar ) + nullify(csite%mmean_tstar ) + nullify(csite%mmean_qstar ) + nullify(csite%mmean_cstar ) + nullify(csite%mmean_carbon_ac ) + nullify(csite%mmean_carbon_st ) + nullify(csite%mmean_vapor_gc ) + nullify(csite%mmean_vapor_ac ) + nullify(csite%mmean_smoist_gg ) + nullify(csite%mmean_throughfall ) + nullify(csite%mmean_transloss ) + nullify(csite%mmean_runoff ) + nullify(csite%mmean_drainage ) + nullify(csite%mmean_sensible_gc ) + nullify(csite%mmean_sensible_ac ) + nullify(csite%mmean_sensible_gg ) + nullify(csite%mmean_qthroughfall ) + nullify(csite%mmean_qrunoff ) + nullify(csite%mmean_qdrainage ) + nullify(csite%mmean_A_decomp ) + nullify(csite%mmean_Af_decomp ) + nullify(csite%mmean_co2_residual ) + nullify(csite%mmean_energy_residual ) + nullify(csite%mmean_water_residual ) + nullify(csite%mmsqu_rh ) + nullify(csite%mmsqu_cwd_rh ) + nullify(csite%mmsqu_nep ) + nullify(csite%mmsqu_rlongup ) + nullify(csite%mmsqu_parup ) + nullify(csite%mmsqu_nirup ) + nullify(csite%mmsqu_rshortup ) + nullify(csite%mmsqu_rnet ) + nullify(csite%mmsqu_albedo ) + nullify(csite%mmsqu_ustar ) + nullify(csite%mmsqu_carbon_ac ) + nullify(csite%mmsqu_carbon_st ) + nullify(csite%mmsqu_vapor_gc ) + nullify(csite%mmsqu_vapor_ac ) + nullify(csite%mmsqu_sensible_gc ) + nullify(csite%mmsqu_sensible_ac ) + nullify(csite%qmean_rh ) + nullify(csite%qmean_cwd_rh ) + nullify(csite%qmean_nep ) + nullify(csite%qmean_rk4step ) + nullify(csite%qmean_available_water ) + nullify(csite%qmean_can_theiv ) + nullify(csite%qmean_can_theta ) + nullify(csite%qmean_can_vpdef ) + nullify(csite%qmean_can_temp ) + nullify(csite%qmean_can_shv ) + nullify(csite%qmean_can_co2 ) + nullify(csite%qmean_can_rhos ) + nullify(csite%qmean_can_prss ) + nullify(csite%qmean_gnd_temp ) + nullify(csite%qmean_gnd_shv ) + nullify(csite%qmean_can_ggnd ) + nullify(csite%qmean_sfcw_depth ) + nullify(csite%qmean_sfcw_energy ) + nullify(csite%qmean_sfcw_mass ) + nullify(csite%qmean_sfcw_temp ) + nullify(csite%qmean_sfcw_fliq ) + nullify(csite%qmean_soil_energy ) + nullify(csite%qmean_soil_mstpot ) + nullify(csite%qmean_soil_water ) + nullify(csite%qmean_soil_temp ) + nullify(csite%qmean_soil_fliq ) + nullify(csite%qmean_rshort_gnd ) + nullify(csite%qmean_par_gnd ) + nullify(csite%qmean_rlong_gnd ) + nullify(csite%qmean_rlongup ) + nullify(csite%qmean_parup ) + nullify(csite%qmean_nirup ) + nullify(csite%qmean_rshortup ) + nullify(csite%qmean_rnet ) + nullify(csite%qmean_albedo ) + nullify(csite%qmean_albedo_beam ) + nullify(csite%qmean_albedo_diff ) + nullify(csite%qmean_rlong_albedo ) + nullify(csite%qmean_ustar ) + nullify(csite%qmean_tstar ) + nullify(csite%qmean_qstar ) + nullify(csite%qmean_cstar ) + nullify(csite%qmean_carbon_ac ) + nullify(csite%qmean_carbon_st ) + nullify(csite%qmean_vapor_gc ) + nullify(csite%qmean_vapor_ac ) + nullify(csite%qmean_smoist_gg ) + nullify(csite%qmean_throughfall ) + nullify(csite%qmean_transloss ) + nullify(csite%qmean_runoff ) + nullify(csite%qmean_drainage ) + nullify(csite%qmean_sensible_gc ) + nullify(csite%qmean_sensible_ac ) + nullify(csite%qmean_sensible_gg ) + nullify(csite%qmean_qthroughfall ) + nullify(csite%qmean_qrunoff ) + nullify(csite%qmean_qdrainage ) + nullify(csite%qmsqu_rh ) + nullify(csite%qmsqu_cwd_rh ) + nullify(csite%qmsqu_nep ) + nullify(csite%qmsqu_rlongup ) + nullify(csite%qmsqu_parup ) + nullify(csite%qmsqu_nirup ) + nullify(csite%qmsqu_rshortup ) + nullify(csite%qmsqu_rnet ) + nullify(csite%qmsqu_albedo ) + nullify(csite%qmsqu_ustar ) + nullify(csite%qmsqu_carbon_ac ) + nullify(csite%qmsqu_carbon_st ) + nullify(csite%qmsqu_vapor_gc ) + nullify(csite%qmsqu_vapor_ac ) + nullify(csite%qmsqu_sensible_gc ) + nullify(csite%qmsqu_sensible_ac ) + + return + end subroutine nullify_sitetype + !=======================================================================================! + !=======================================================================================! + + + + + + !=======================================================================================! + !=======================================================================================! + ! This sub-routine nullifies all cohort pointers. ! + !---------------------------------------------------------------------------------------! + subroutine nullify_patchtype(cpatch) + + implicit none + + !----- Arguments. -------------------------------------------------------------------! + type(patchtype), target :: cpatch + !------------------------------------------------------------------------------------! + + nullify(cpatch%pft ) + nullify(cpatch%nplant ) + nullify(cpatch%phenology_status ) + nullify(cpatch%recruit_dbh ) + nullify(cpatch%census_status ) + nullify(cpatch%hite ) + nullify(cpatch%agb ) + nullify(cpatch%basarea ) + nullify(cpatch%dagb_dt ) + nullify(cpatch%dlnagb_dt ) + nullify(cpatch%dba_dt ) + nullify(cpatch%dlnba_dt ) + nullify(cpatch%ddbh_dt ) + nullify(cpatch%dlndbh_dt ) + nullify(cpatch%dbh ) + nullify(cpatch%bdead ) + nullify(cpatch%bleaf ) + nullify(cpatch%balive ) + nullify(cpatch%broot ) + nullify(cpatch%bsapwooda ) + nullify(cpatch%bsapwoodb ) + nullify(cpatch%bstorage ) + nullify(cpatch%bseeds ) + nullify(cpatch%lai ) + nullify(cpatch%wai ) + nullify(cpatch%crown_area ) + nullify(cpatch%leaf_resolvable ) + nullify(cpatch%wood_resolvable ) + nullify(cpatch%cb ) + nullify(cpatch%cb_lightmax ) + nullify(cpatch%cb_moistmax ) + nullify(cpatch%cbr_bar ) + nullify(cpatch%leaf_energy ) + nullify(cpatch%leaf_temp ) + nullify(cpatch%leaf_vpdef ) + nullify(cpatch%leaf_temp_pv ) + nullify(cpatch%leaf_hcap ) + nullify(cpatch%leaf_fliq ) + nullify(cpatch%leaf_water ) + nullify(cpatch%wood_energy ) + nullify(cpatch%wood_temp ) + nullify(cpatch%wood_temp_pv ) + nullify(cpatch%wood_hcap ) + nullify(cpatch%wood_fliq ) + nullify(cpatch%wood_water ) + nullify(cpatch%veg_wind ) + nullify(cpatch%lsfc_shv_open ) + nullify(cpatch%lsfc_shv_closed ) + nullify(cpatch%lsfc_co2_open ) + nullify(cpatch%lsfc_co2_closed ) + nullify(cpatch%lint_shv ) + nullify(cpatch%lint_co2_open ) + nullify(cpatch%lint_co2_closed ) + nullify(cpatch%today_leaf_resp ) + nullify(cpatch%today_root_resp ) + nullify(cpatch%today_gpp ) + nullify(cpatch%today_gpp_pot ) + nullify(cpatch%today_gpp_lightmax ) + nullify(cpatch%today_gpp_moistmax ) + nullify(cpatch%today_nppleaf ) + nullify(cpatch%today_nppfroot ) + nullify(cpatch%today_nppsapwood ) + nullify(cpatch%today_nppcroot ) + nullify(cpatch%today_nppseeds ) + nullify(cpatch%today_nppwood ) + nullify(cpatch%today_nppdaily ) + nullify(cpatch%growth_respiration ) + nullify(cpatch%storage_respiration ) + nullify(cpatch%vleaf_respiration ) + nullify(cpatch%monthly_dndt ) + nullify(cpatch%monthly_dlnndt ) + nullify(cpatch%mort_rate ) + nullify(cpatch%krdepth ) + nullify(cpatch%first_census ) + nullify(cpatch%new_recruit_flag ) + nullify(cpatch%light_level ) + nullify(cpatch%light_level_beam ) + nullify(cpatch%light_level_diff ) + nullify(cpatch%par_l ) + nullify(cpatch%par_l_beam ) + nullify(cpatch%par_l_diffuse ) + nullify(cpatch%rshort_l ) + nullify(cpatch%rshort_l_beam ) + nullify(cpatch%rshort_l_diffuse ) + nullify(cpatch%rlong_l ) + nullify(cpatch%rlong_l_surf ) + nullify(cpatch%rlong_l_incid ) + nullify(cpatch%rshort_w ) + nullify(cpatch%rshort_w_beam ) + nullify(cpatch%rshort_w_diffuse ) + nullify(cpatch%rlong_w ) + nullify(cpatch%rlong_w_surf ) + nullify(cpatch%rlong_w_incid ) + nullify(cpatch%leaf_gbh ) + nullify(cpatch%leaf_gbw ) + nullify(cpatch%wood_gbh ) + nullify(cpatch%wood_gbw ) + nullify(cpatch%A_open ) + nullify(cpatch%A_closed ) + nullify(cpatch%psi_open ) + nullify(cpatch%psi_closed ) + nullify(cpatch%gsw_open ) + nullify(cpatch%gsw_closed ) + nullify(cpatch%leaf_gsw ) + nullify(cpatch%fsw ) + nullify(cpatch%fsn ) + nullify(cpatch%fs_open ) + nullify(cpatch%water_supply ) + nullify(cpatch%leaf_maintenance ) + nullify(cpatch%root_maintenance ) + nullify(cpatch%leaf_drop ) + nullify(cpatch%leaf_respiration ) + nullify(cpatch%root_respiration ) + nullify(cpatch%gpp ) + nullify(cpatch%paw_avg ) + nullify(cpatch%elongf ) + nullify(cpatch%turnover_amp ) + nullify(cpatch%llspan ) + nullify(cpatch%vm_bar ) + nullify(cpatch%sla ) + nullify(cpatch%fmean_gpp ) + nullify(cpatch%fmean_npp ) + nullify(cpatch%fmean_leaf_resp ) + nullify(cpatch%fmean_root_resp ) + nullify(cpatch%fmean_growth_resp ) + nullify(cpatch%fmean_storage_resp ) + nullify(cpatch%fmean_vleaf_resp ) + nullify(cpatch%fmean_plresp ) + nullify(cpatch%fmean_leaf_energy ) + nullify(cpatch%fmean_leaf_water ) + nullify(cpatch%fmean_leaf_hcap ) + nullify(cpatch%fmean_leaf_vpdef ) + nullify(cpatch%fmean_leaf_temp ) + nullify(cpatch%fmean_leaf_fliq ) + nullify(cpatch%fmean_leaf_gsw ) + nullify(cpatch%fmean_leaf_gbw ) + nullify(cpatch%fmean_wood_energy ) + nullify(cpatch%fmean_wood_water ) + nullify(cpatch%fmean_wood_hcap ) + nullify(cpatch%fmean_wood_temp ) + nullify(cpatch%fmean_wood_fliq ) + nullify(cpatch%fmean_wood_gbw ) + nullify(cpatch%fmean_fs_open ) + nullify(cpatch%fmean_fsw ) + nullify(cpatch%fmean_fsn ) + nullify(cpatch%fmean_psi_open ) + nullify(cpatch%fmean_psi_closed ) + nullify(cpatch%fmean_water_supply ) + nullify(cpatch%fmean_light_level ) + nullify(cpatch%fmean_light_level_beam) + nullify(cpatch%fmean_light_level_diff) + nullify(cpatch%fmean_par_l ) + nullify(cpatch%fmean_par_l_beam ) + nullify(cpatch%fmean_par_l_diff ) + nullify(cpatch%fmean_rshort_l ) + nullify(cpatch%fmean_rlong_l ) + nullify(cpatch%fmean_sensible_lc ) + nullify(cpatch%fmean_vapor_lc ) + nullify(cpatch%fmean_transp ) + nullify(cpatch%fmean_intercepted_al ) + nullify(cpatch%fmean_wshed_lg ) + nullify(cpatch%fmean_rshort_w ) + nullify(cpatch%fmean_rlong_w ) + nullify(cpatch%fmean_sensible_wc ) + nullify(cpatch%fmean_vapor_wc ) + nullify(cpatch%fmean_intercepted_aw ) + nullify(cpatch%fmean_wshed_wg ) + nullify(cpatch%dmean_nppleaf ) + nullify(cpatch%dmean_nppfroot ) + nullify(cpatch%dmean_nppsapwood ) + nullify(cpatch%dmean_nppcroot ) + nullify(cpatch%dmean_nppseeds ) + nullify(cpatch%dmean_nppwood ) + nullify(cpatch%dmean_nppdaily ) + nullify(cpatch%dmean_gpp ) + nullify(cpatch%dmean_npp ) + nullify(cpatch%dmean_leaf_resp ) + nullify(cpatch%dmean_root_resp ) + nullify(cpatch%dmean_growth_resp ) + nullify(cpatch%dmean_storage_resp ) + nullify(cpatch%dmean_vleaf_resp ) + nullify(cpatch%dmean_plresp ) + nullify(cpatch%dmean_leaf_energy ) + nullify(cpatch%dmean_leaf_water ) + nullify(cpatch%dmean_leaf_hcap ) + nullify(cpatch%dmean_leaf_vpdef ) + nullify(cpatch%dmean_leaf_temp ) + nullify(cpatch%dmean_leaf_fliq ) + nullify(cpatch%dmean_leaf_gsw ) + nullify(cpatch%dmean_leaf_gbw ) + nullify(cpatch%dmean_wood_energy ) + nullify(cpatch%dmean_wood_water ) + nullify(cpatch%dmean_wood_hcap ) + nullify(cpatch%dmean_wood_temp ) + nullify(cpatch%dmean_wood_fliq ) + nullify(cpatch%dmean_wood_gbw ) + nullify(cpatch%dmean_fs_open ) + nullify(cpatch%dmean_fsw ) + nullify(cpatch%dmean_fsn ) + nullify(cpatch%dmean_psi_open ) + nullify(cpatch%dmean_psi_closed ) + nullify(cpatch%dmean_water_supply ) + nullify(cpatch%dmean_light_level ) + nullify(cpatch%dmean_light_level_beam) + nullify(cpatch%dmean_light_level_diff) + nullify(cpatch%dmean_par_l ) + nullify(cpatch%dmean_par_l_beam ) + nullify(cpatch%dmean_par_l_diff ) + nullify(cpatch%dmean_rshort_l ) + nullify(cpatch%dmean_rlong_l ) + nullify(cpatch%dmean_sensible_lc ) + nullify(cpatch%dmean_vapor_lc ) + nullify(cpatch%dmean_transp ) + nullify(cpatch%dmean_intercepted_al ) + nullify(cpatch%dmean_wshed_lg ) + nullify(cpatch%dmean_rshort_w ) + nullify(cpatch%dmean_rlong_w ) + nullify(cpatch%dmean_sensible_wc ) + nullify(cpatch%dmean_vapor_wc ) + nullify(cpatch%dmean_intercepted_aw ) + nullify(cpatch%dmean_wshed_wg ) + nullify(cpatch%mmean_lai ) + nullify(cpatch%mmean_bleaf ) + nullify(cpatch%mmean_broot ) + nullify(cpatch%mmean_bstorage ) + nullify(cpatch%mmean_mort_rate ) + nullify(cpatch%mmean_leaf_maintenance) + nullify(cpatch%mmean_root_maintenance) + nullify(cpatch%mmean_leaf_drop ) + nullify(cpatch%mmean_cb ) + nullify(cpatch%mmean_gpp ) + nullify(cpatch%mmean_npp ) + nullify(cpatch%mmean_leaf_resp ) + nullify(cpatch%mmean_root_resp ) + nullify(cpatch%mmean_growth_resp ) + nullify(cpatch%mmean_storage_resp ) + nullify(cpatch%mmean_vleaf_resp ) + nullify(cpatch%mmean_plresp ) + nullify(cpatch%mmean_leaf_energy ) + nullify(cpatch%mmean_leaf_water ) + nullify(cpatch%mmean_leaf_hcap ) + nullify(cpatch%mmean_leaf_vpdef ) + nullify(cpatch%mmean_leaf_temp ) + nullify(cpatch%mmean_leaf_fliq ) + nullify(cpatch%mmean_leaf_gsw ) + nullify(cpatch%mmean_leaf_gbw ) + nullify(cpatch%mmean_wood_energy ) + nullify(cpatch%mmean_wood_water ) + nullify(cpatch%mmean_wood_hcap ) + nullify(cpatch%mmean_wood_temp ) + nullify(cpatch%mmean_wood_fliq ) + nullify(cpatch%mmean_wood_gbw ) + nullify(cpatch%mmean_fs_open ) + nullify(cpatch%mmean_fsw ) + nullify(cpatch%mmean_fsn ) + nullify(cpatch%mmean_psi_open ) + nullify(cpatch%mmean_psi_closed ) + nullify(cpatch%mmean_water_supply ) + nullify(cpatch%mmean_light_level ) + nullify(cpatch%mmean_light_level_beam) + nullify(cpatch%mmean_light_level_diff) + nullify(cpatch%mmean_par_l ) + nullify(cpatch%mmean_par_l_beam ) + nullify(cpatch%mmean_par_l_diff ) + nullify(cpatch%mmean_rshort_l ) + nullify(cpatch%mmean_rlong_l ) + nullify(cpatch%mmean_sensible_lc ) + nullify(cpatch%mmean_vapor_lc ) + nullify(cpatch%mmean_transp ) + nullify(cpatch%mmean_intercepted_al ) + nullify(cpatch%mmean_wshed_lg ) + nullify(cpatch%mmean_rshort_w ) + nullify(cpatch%mmean_rlong_w ) + nullify(cpatch%mmean_sensible_wc ) + nullify(cpatch%mmean_vapor_wc ) + nullify(cpatch%mmean_intercepted_aw ) + nullify(cpatch%mmean_wshed_wg ) + nullify(cpatch%mmean_nppleaf ) + nullify(cpatch%mmean_nppfroot ) + nullify(cpatch%mmean_nppsapwood ) + nullify(cpatch%mmean_nppcroot ) + nullify(cpatch%mmean_nppseeds ) + nullify(cpatch%mmean_nppwood ) + nullify(cpatch%mmean_nppdaily ) + nullify(cpatch%mmsqu_gpp ) + nullify(cpatch%mmsqu_npp ) + nullify(cpatch%mmsqu_plresp ) + nullify(cpatch%mmsqu_sensible_lc ) + nullify(cpatch%mmsqu_vapor_lc ) + nullify(cpatch%mmsqu_transp ) + nullify(cpatch%mmsqu_sensible_wc ) + nullify(cpatch%mmsqu_vapor_wc ) + nullify(cpatch%qmean_gpp ) + nullify(cpatch%qmean_npp ) + nullify(cpatch%qmean_leaf_resp ) + nullify(cpatch%qmean_root_resp ) + nullify(cpatch%qmean_growth_resp ) + nullify(cpatch%qmean_storage_resp ) + nullify(cpatch%qmean_vleaf_resp ) + nullify(cpatch%qmean_plresp ) + nullify(cpatch%qmean_leaf_energy ) + nullify(cpatch%qmean_leaf_water ) + nullify(cpatch%qmean_leaf_hcap ) + nullify(cpatch%qmean_leaf_vpdef ) + nullify(cpatch%qmean_leaf_temp ) + nullify(cpatch%qmean_leaf_fliq ) + nullify(cpatch%qmean_leaf_gsw ) + nullify(cpatch%qmean_leaf_gbw ) + nullify(cpatch%qmean_wood_energy ) + nullify(cpatch%qmean_wood_water ) + nullify(cpatch%qmean_wood_hcap ) + nullify(cpatch%qmean_wood_temp ) + nullify(cpatch%qmean_wood_fliq ) + nullify(cpatch%qmean_wood_gbw ) + nullify(cpatch%qmean_fs_open ) + nullify(cpatch%qmean_fsw ) + nullify(cpatch%qmean_fsn ) + nullify(cpatch%qmean_psi_open ) + nullify(cpatch%qmean_psi_closed ) + nullify(cpatch%qmean_water_supply ) + nullify(cpatch%qmean_light_level ) + nullify(cpatch%qmean_light_level_beam) + nullify(cpatch%qmean_light_level_diff) + nullify(cpatch%qmean_par_l ) + nullify(cpatch%qmean_par_l_beam ) + nullify(cpatch%qmean_par_l_diff ) + nullify(cpatch%qmean_rshort_l ) + nullify(cpatch%qmean_rlong_l ) + nullify(cpatch%qmean_sensible_lc ) + nullify(cpatch%qmean_vapor_lc ) + nullify(cpatch%qmean_transp ) + nullify(cpatch%qmean_intercepted_al ) + nullify(cpatch%qmean_wshed_lg ) + nullify(cpatch%qmean_rshort_w ) + nullify(cpatch%qmean_rlong_w ) + nullify(cpatch%qmean_sensible_wc ) + nullify(cpatch%qmean_vapor_wc ) + nullify(cpatch%qmean_intercepted_aw ) + nullify(cpatch%qmean_wshed_wg ) + nullify(cpatch%qmsqu_gpp ) + nullify(cpatch%qmsqu_npp ) + nullify(cpatch%qmsqu_plresp ) + nullify(cpatch%qmsqu_sensible_lc ) + nullify(cpatch%qmsqu_vapor_lc ) + nullify(cpatch%qmsqu_transp ) + nullify(cpatch%qmsqu_sensible_wc ) + nullify(cpatch%qmsqu_vapor_wc ) + + return + end subroutine nullify_patchtype + !=======================================================================================! + !=======================================================================================! + + + + + + !=======================================================================================! + !=======================================================================================! + ! This sub-routine de-allocates all polygon pointers. ! + !---------------------------------------------------------------------------------------! + subroutine deallocate_edtype(cgrid) + implicit none + + !----- Arguments. -------------------------------------------------------------------! + type(edtype) , target :: cgrid !----- Local variables. -------------------------------------------------------------! - integer :: npts + integer :: ipy !------------------------------------------------------------------------------------! - !------------------------------------------------------------------------------------! + ! First thing we must do is to deallocate the nested dimensions. ! !------------------------------------------------------------------------------------! - ! This is the 1-D block. All variables must have the number of points defined ! - ! by npts. ! + do ipy=1,cgrid%npolygons + call deallocate_polygontype(cgrid%polygon(ipy)) + end do + if (associated(cgrid%polygon)) deallocate(cgrid%polygon) !------------------------------------------------------------------------------------! - npts = cgrid%npolygons + if(associated(cgrid%pysi_id )) deallocate(cgrid%pysi_id ) + if(associated(cgrid%pysi_n )) deallocate(cgrid%pysi_n ) + if(associated(cgrid%walltime_py )) deallocate(cgrid%walltime_py ) + if(associated(cgrid%lon )) deallocate(cgrid%lon ) + if(associated(cgrid%lat )) deallocate(cgrid%lat ) + if(associated(cgrid%xatm )) deallocate(cgrid%xatm ) + if(associated(cgrid%yatm )) deallocate(cgrid%yatm ) + if(associated(cgrid%site_adjacency )) deallocate(cgrid%site_adjacency ) + if(associated(cgrid%wbar )) deallocate(cgrid%wbar ) + if(associated(cgrid%Te )) deallocate(cgrid%Te ) + if(associated(cgrid%zbar )) deallocate(cgrid%zbar ) + if(associated(cgrid%sheat )) deallocate(cgrid%sheat ) + if(associated(cgrid%baseflow )) deallocate(cgrid%baseflow ) + if(associated(cgrid%runoff )) deallocate(cgrid%runoff ) + if(associated(cgrid%qrunoff )) deallocate(cgrid%qrunoff ) + if(associated(cgrid%swliq )) deallocate(cgrid%swliq ) + if(associated(cgrid%ilon )) deallocate(cgrid%ilon ) + if(associated(cgrid%ilat )) deallocate(cgrid%ilat ) + if(associated(cgrid%workload )) deallocate(cgrid%workload ) + if(associated(cgrid%total_agb )) deallocate(cgrid%total_agb ) + if(associated(cgrid%total_basal_area )) deallocate(cgrid%total_basal_area ) + if(associated(cgrid%total_agb_growth )) deallocate(cgrid%total_agb_growth ) + if(associated(cgrid%total_agb_mort )) deallocate(cgrid%total_agb_mort ) + if(associated(cgrid%total_agb_recruit )) deallocate(cgrid%total_agb_recruit ) + if(associated(cgrid%total_basal_area_growth )) & + deallocate(cgrid%total_basal_area_growth ) + if(associated(cgrid%total_basal_area_mort )) & + deallocate(cgrid%total_basal_area_mort ) + if(associated(cgrid%total_basal_area_recruit)) & + deallocate(cgrid%total_basal_area_recruit) + if(associated(cgrid%nsites )) deallocate(cgrid%nsites ) + if(associated(cgrid%sitenums )) deallocate(cgrid%sitenums ) + if(associated(cgrid%load_adjacency )) deallocate(cgrid%load_adjacency ) + if(associated(cgrid%metinput )) deallocate(cgrid%metinput ) + if(associated(cgrid%met )) deallocate(cgrid%met ) + if(associated(cgrid%lapse )) deallocate(cgrid%lapse ) + if(associated(cgrid%cosz )) deallocate(cgrid%cosz ) + if(associated(cgrid%cbudget_initialstorage)) deallocate(cgrid%cbudget_initialstorage) + if(associated(cgrid%cbudget_nep )) deallocate(cgrid%cbudget_nep ) + if(associated(cgrid%nbudget_initialstorage)) deallocate(cgrid%nbudget_initialstorage) + if(associated(cgrid%max_leaf_temp )) deallocate(cgrid%max_leaf_temp ) + if(associated(cgrid%min_leaf_temp )) deallocate(cgrid%min_leaf_temp ) + if(associated(cgrid%max_wood_temp )) deallocate(cgrid%max_wood_temp ) + if(associated(cgrid%min_wood_temp )) deallocate(cgrid%min_wood_temp ) + if(associated(cgrid%max_soil_temp )) deallocate(cgrid%max_soil_temp ) + if(associated(cgrid%min_soil_temp )) deallocate(cgrid%min_soil_temp ) + if(associated(cgrid%nplant )) deallocate(cgrid%nplant ) + if(associated(cgrid%agb )) deallocate(cgrid%agb ) + if(associated(cgrid%lai )) deallocate(cgrid%lai ) + if(associated(cgrid%wai )) deallocate(cgrid%wai ) + if(associated(cgrid%basal_area )) deallocate(cgrid%basal_area ) + if(associated(cgrid%bdead )) deallocate(cgrid%bdead ) + if(associated(cgrid%balive )) deallocate(cgrid%balive ) + if(associated(cgrid%bleaf )) deallocate(cgrid%bleaf ) + if(associated(cgrid%broot )) deallocate(cgrid%broot ) + if(associated(cgrid%bsapwooda )) deallocate(cgrid%bsapwooda ) + if(associated(cgrid%bsapwoodb )) deallocate(cgrid%bsapwoodb ) + if(associated(cgrid%bseeds )) deallocate(cgrid%bseeds ) + if(associated(cgrid%bstorage )) deallocate(cgrid%bstorage ) + if(associated(cgrid%bdead_n )) deallocate(cgrid%bdead_n ) + if(associated(cgrid%balive_n )) deallocate(cgrid%balive_n ) + if(associated(cgrid%bleaf_n )) deallocate(cgrid%bleaf_n ) + if(associated(cgrid%broot_n )) deallocate(cgrid%broot_n ) + if(associated(cgrid%bsapwooda_n )) deallocate(cgrid%bsapwooda_n ) + if(associated(cgrid%bsapwoodb_n )) deallocate(cgrid%bsapwoodb_n ) + if(associated(cgrid%bseeds_n )) deallocate(cgrid%bseeds_n ) + if(associated(cgrid%bstorage_n )) deallocate(cgrid%bstorage_n ) + if(associated(cgrid%leaf_maintenance )) deallocate(cgrid%leaf_maintenance ) + if(associated(cgrid%root_maintenance )) deallocate(cgrid%root_maintenance ) + if(associated(cgrid%leaf_drop )) deallocate(cgrid%leaf_drop ) + if(associated(cgrid%fast_soil_c )) deallocate(cgrid%fast_soil_c ) + if(associated(cgrid%slow_soil_c )) deallocate(cgrid%slow_soil_c ) + if(associated(cgrid%struct_soil_c )) deallocate(cgrid%struct_soil_c ) + if(associated(cgrid%struct_soil_l )) deallocate(cgrid%struct_soil_l ) + if(associated(cgrid%cwd_c )) deallocate(cgrid%cwd_c ) + if(associated(cgrid%fast_soil_n )) deallocate(cgrid%fast_soil_n ) + if(associated(cgrid%mineral_soil_n )) deallocate(cgrid%mineral_soil_n ) + if(associated(cgrid%cwd_n )) deallocate(cgrid%cwd_n ) + if(associated(cgrid%Cleaf_grow )) deallocate(cgrid%Cleaf_grow ) + if(associated(cgrid%Croot_grow )) deallocate(cgrid%Croot_grow ) + if(associated(cgrid%Cdead_grow )) deallocate(cgrid%Cdead_grow ) + if(associated(cgrid%Cstore_grow )) deallocate(cgrid%Cstore_grow ) + if(associated(cgrid%Cleaf_litter_flux )) deallocate(cgrid%Cleaf_litter_flux ) + if(associated(cgrid%Croot_litter_flux )) deallocate(cgrid%Croot_litter_flux ) + if(associated(cgrid%Ccwd_flux )) deallocate(cgrid%Ccwd_flux ) + if(associated(cgrid%Nleaf_grow )) deallocate(cgrid%Nleaf_grow ) + if(associated(cgrid%Ndead_grow )) deallocate(cgrid%Ndead_grow ) + if(associated(cgrid%Nroot_grow )) deallocate(cgrid%Nroot_grow ) + if(associated(cgrid%Nstore_grow )) deallocate(cgrid%Nstore_grow ) + if(associated(cgrid%Nleaf_litter_flux )) deallocate(cgrid%Nleaf_litter_flux ) + if(associated(cgrid%Nroot_litter_flux )) deallocate(cgrid%Nroot_litter_flux ) + if(associated(cgrid%Ncwd_flux )) deallocate(cgrid%Ncwd_flux ) + if(associated(cgrid%Nbiomass_uptake )) deallocate(cgrid%Nbiomass_uptake ) + if(associated(cgrid%Ngross_min )) deallocate(cgrid%Ngross_min ) + if(associated(cgrid%Nnet_min )) deallocate(cgrid%Nnet_min ) + if(associated(cgrid%avg_lai_ebalvars )) deallocate(cgrid%avg_lai_ebalvars ) + if(associated(cgrid%fmean_gpp )) deallocate(cgrid%fmean_gpp ) + if(associated(cgrid%fmean_npp )) deallocate(cgrid%fmean_npp ) + if(associated(cgrid%fmean_leaf_resp )) deallocate(cgrid%fmean_leaf_resp ) + if(associated(cgrid%fmean_root_resp )) deallocate(cgrid%fmean_root_resp ) + if(associated(cgrid%fmean_growth_resp )) deallocate(cgrid%fmean_growth_resp ) + if(associated(cgrid%fmean_storage_resp )) deallocate(cgrid%fmean_storage_resp ) + if(associated(cgrid%fmean_vleaf_resp )) deallocate(cgrid%fmean_vleaf_resp ) + if(associated(cgrid%fmean_plresp )) deallocate(cgrid%fmean_plresp ) + if(associated(cgrid%fmean_leaf_energy )) deallocate(cgrid%fmean_leaf_energy ) + if(associated(cgrid%fmean_leaf_water )) deallocate(cgrid%fmean_leaf_water ) + if(associated(cgrid%fmean_leaf_hcap )) deallocate(cgrid%fmean_leaf_hcap ) + if(associated(cgrid%fmean_leaf_vpdef )) deallocate(cgrid%fmean_leaf_vpdef ) + if(associated(cgrid%fmean_leaf_temp )) deallocate(cgrid%fmean_leaf_temp ) + if(associated(cgrid%fmean_leaf_fliq )) deallocate(cgrid%fmean_leaf_fliq ) + if(associated(cgrid%fmean_leaf_gsw )) deallocate(cgrid%fmean_leaf_gsw ) + if(associated(cgrid%fmean_leaf_gbw )) deallocate(cgrid%fmean_leaf_gbw ) + if(associated(cgrid%fmean_wood_energy )) deallocate(cgrid%fmean_wood_energy ) + if(associated(cgrid%fmean_wood_water )) deallocate(cgrid%fmean_wood_water ) + if(associated(cgrid%fmean_wood_hcap )) deallocate(cgrid%fmean_wood_hcap ) + if(associated(cgrid%fmean_wood_temp )) deallocate(cgrid%fmean_wood_temp ) + if(associated(cgrid%fmean_wood_fliq )) deallocate(cgrid%fmean_wood_fliq ) + if(associated(cgrid%fmean_wood_gbw )) deallocate(cgrid%fmean_wood_gbw ) + if(associated(cgrid%fmean_fs_open )) deallocate(cgrid%fmean_fs_open ) + if(associated(cgrid%fmean_fsw )) deallocate(cgrid%fmean_fsw ) + if(associated(cgrid%fmean_fsn )) deallocate(cgrid%fmean_fsn ) + if(associated(cgrid%fmean_psi_open )) deallocate(cgrid%fmean_psi_open ) + if(associated(cgrid%fmean_psi_closed )) deallocate(cgrid%fmean_psi_closed ) + if(associated(cgrid%fmean_water_supply )) deallocate(cgrid%fmean_water_supply ) + if(associated(cgrid%fmean_par_l )) deallocate(cgrid%fmean_par_l ) + if(associated(cgrid%fmean_par_l_beam )) deallocate(cgrid%fmean_par_l_beam ) + if(associated(cgrid%fmean_par_l_diff )) deallocate(cgrid%fmean_par_l_diff ) + if(associated(cgrid%fmean_rshort_l )) deallocate(cgrid%fmean_rshort_l ) + if(associated(cgrid%fmean_rlong_l )) deallocate(cgrid%fmean_rlong_l ) + if(associated(cgrid%fmean_sensible_lc )) deallocate(cgrid%fmean_sensible_lc ) + if(associated(cgrid%fmean_vapor_lc )) deallocate(cgrid%fmean_vapor_lc ) + if(associated(cgrid%fmean_transp )) deallocate(cgrid%fmean_transp ) + if(associated(cgrid%fmean_intercepted_al )) deallocate(cgrid%fmean_intercepted_al ) + if(associated(cgrid%fmean_wshed_lg )) deallocate(cgrid%fmean_wshed_lg ) + if(associated(cgrid%fmean_rshort_w )) deallocate(cgrid%fmean_rshort_w ) + if(associated(cgrid%fmean_rlong_w )) deallocate(cgrid%fmean_rlong_w ) + if(associated(cgrid%fmean_sensible_wc )) deallocate(cgrid%fmean_sensible_wc ) + if(associated(cgrid%fmean_vapor_wc )) deallocate(cgrid%fmean_vapor_wc ) + if(associated(cgrid%fmean_intercepted_aw )) deallocate(cgrid%fmean_intercepted_aw ) + if(associated(cgrid%fmean_wshed_wg )) deallocate(cgrid%fmean_wshed_wg ) + if(associated(cgrid%fmean_rh )) deallocate(cgrid%fmean_rh ) + if(associated(cgrid%fmean_cwd_rh )) deallocate(cgrid%fmean_cwd_rh ) + if(associated(cgrid%fmean_nep )) deallocate(cgrid%fmean_nep ) + if(associated(cgrid%fmean_rk4step )) deallocate(cgrid%fmean_rk4step ) + if(associated(cgrid%fmean_available_water )) deallocate(cgrid%fmean_available_water ) + if(associated(cgrid%fmean_can_theiv )) deallocate(cgrid%fmean_can_theiv ) + if(associated(cgrid%fmean_can_theta )) deallocate(cgrid%fmean_can_theta ) + if(associated(cgrid%fmean_can_vpdef )) deallocate(cgrid%fmean_can_vpdef ) + if(associated(cgrid%fmean_can_temp )) deallocate(cgrid%fmean_can_temp ) + if(associated(cgrid%fmean_can_shv )) deallocate(cgrid%fmean_can_shv ) + if(associated(cgrid%fmean_can_co2 )) deallocate(cgrid%fmean_can_co2 ) + if(associated(cgrid%fmean_can_rhos )) deallocate(cgrid%fmean_can_rhos ) + if(associated(cgrid%fmean_can_prss )) deallocate(cgrid%fmean_can_prss ) + if(associated(cgrid%fmean_gnd_temp )) deallocate(cgrid%fmean_gnd_temp ) + if(associated(cgrid%fmean_gnd_shv )) deallocate(cgrid%fmean_gnd_shv ) + if(associated(cgrid%fmean_can_ggnd )) deallocate(cgrid%fmean_can_ggnd ) + if(associated(cgrid%fmean_sfcw_depth )) deallocate(cgrid%fmean_sfcw_depth ) + if(associated(cgrid%fmean_sfcw_energy )) deallocate(cgrid%fmean_sfcw_energy ) + if(associated(cgrid%fmean_sfcw_mass )) deallocate(cgrid%fmean_sfcw_mass ) + if(associated(cgrid%fmean_sfcw_temp )) deallocate(cgrid%fmean_sfcw_temp ) + if(associated(cgrid%fmean_sfcw_fliq )) deallocate(cgrid%fmean_sfcw_fliq ) + if(associated(cgrid%fmean_soil_energy )) deallocate(cgrid%fmean_soil_energy ) + if(associated(cgrid%fmean_soil_mstpot )) deallocate(cgrid%fmean_soil_mstpot ) + if(associated(cgrid%fmean_soil_water )) deallocate(cgrid%fmean_soil_water ) + if(associated(cgrid%fmean_soil_temp )) deallocate(cgrid%fmean_soil_temp ) + if(associated(cgrid%fmean_soil_fliq )) deallocate(cgrid%fmean_soil_fliq ) + if(associated(cgrid%fmean_rshort_gnd )) deallocate(cgrid%fmean_rshort_gnd ) + if(associated(cgrid%fmean_par_gnd )) deallocate(cgrid%fmean_par_gnd ) + if(associated(cgrid%fmean_rlong_gnd )) deallocate(cgrid%fmean_rlong_gnd ) + if(associated(cgrid%fmean_rlongup )) deallocate(cgrid%fmean_rlongup ) + if(associated(cgrid%fmean_parup )) deallocate(cgrid%fmean_parup ) + if(associated(cgrid%fmean_nirup )) deallocate(cgrid%fmean_nirup ) + if(associated(cgrid%fmean_rshortup )) deallocate(cgrid%fmean_rshortup ) + if(associated(cgrid%fmean_rnet )) deallocate(cgrid%fmean_rnet ) + if(associated(cgrid%fmean_albedo )) deallocate(cgrid%fmean_albedo ) + if(associated(cgrid%fmean_albedo_beam )) deallocate(cgrid%fmean_albedo_beam ) + if(associated(cgrid%fmean_albedo_diff )) deallocate(cgrid%fmean_albedo_diff ) + if(associated(cgrid%fmean_rlong_albedo )) deallocate(cgrid%fmean_rlong_albedo ) + if(associated(cgrid%fmean_ustar )) deallocate(cgrid%fmean_ustar ) + if(associated(cgrid%fmean_tstar )) deallocate(cgrid%fmean_tstar ) + if(associated(cgrid%fmean_qstar )) deallocate(cgrid%fmean_qstar ) + if(associated(cgrid%fmean_cstar )) deallocate(cgrid%fmean_cstar ) + if(associated(cgrid%fmean_carbon_ac )) deallocate(cgrid%fmean_carbon_ac ) + if(associated(cgrid%fmean_carbon_st )) deallocate(cgrid%fmean_carbon_st ) + if(associated(cgrid%fmean_vapor_gc )) deallocate(cgrid%fmean_vapor_gc ) + if(associated(cgrid%fmean_vapor_ac )) deallocate(cgrid%fmean_vapor_ac ) + if(associated(cgrid%fmean_smoist_gg )) deallocate(cgrid%fmean_smoist_gg ) + if(associated(cgrid%fmean_throughfall )) deallocate(cgrid%fmean_throughfall ) + if(associated(cgrid%fmean_transloss )) deallocate(cgrid%fmean_transloss ) + if(associated(cgrid%fmean_runoff )) deallocate(cgrid%fmean_runoff ) + if(associated(cgrid%fmean_drainage )) deallocate(cgrid%fmean_drainage ) + if(associated(cgrid%fmean_sensible_gc )) deallocate(cgrid%fmean_sensible_gc ) + if(associated(cgrid%fmean_sensible_ac )) deallocate(cgrid%fmean_sensible_ac ) + if(associated(cgrid%fmean_sensible_gg )) deallocate(cgrid%fmean_sensible_gg ) + if(associated(cgrid%fmean_qthroughfall )) deallocate(cgrid%fmean_qthroughfall ) + if(associated(cgrid%fmean_qrunoff )) deallocate(cgrid%fmean_qrunoff ) + if(associated(cgrid%fmean_qdrainage )) deallocate(cgrid%fmean_qdrainage ) + if(associated(cgrid%fmean_atm_theiv )) deallocate(cgrid%fmean_atm_theiv ) + if(associated(cgrid%fmean_atm_theta )) deallocate(cgrid%fmean_atm_theta ) + if(associated(cgrid%fmean_atm_temp )) deallocate(cgrid%fmean_atm_temp ) + if(associated(cgrid%fmean_atm_vpdef )) deallocate(cgrid%fmean_atm_vpdef ) + if(associated(cgrid%fmean_atm_shv )) deallocate(cgrid%fmean_atm_shv ) + if(associated(cgrid%fmean_atm_rshort )) deallocate(cgrid%fmean_atm_rshort ) + if(associated(cgrid%fmean_atm_rshort_diff )) deallocate(cgrid%fmean_atm_rshort_diff ) + if(associated(cgrid%fmean_atm_par )) deallocate(cgrid%fmean_atm_par ) + if(associated(cgrid%fmean_atm_par_diff )) deallocate(cgrid%fmean_atm_par_diff ) + if(associated(cgrid%fmean_atm_rlong )) deallocate(cgrid%fmean_atm_rlong ) + if(associated(cgrid%fmean_atm_vels )) deallocate(cgrid%fmean_atm_vels ) + if(associated(cgrid%fmean_atm_rhos )) deallocate(cgrid%fmean_atm_rhos ) + if(associated(cgrid%fmean_atm_prss )) deallocate(cgrid%fmean_atm_prss ) + if(associated(cgrid%fmean_atm_co2 )) deallocate(cgrid%fmean_atm_co2 ) + if(associated(cgrid%fmean_pcpg )) deallocate(cgrid%fmean_pcpg ) + if(associated(cgrid%fmean_qpcpg )) deallocate(cgrid%fmean_qpcpg ) + if(associated(cgrid%fmean_dpcpg )) deallocate(cgrid%fmean_dpcpg ) + if(associated(cgrid%fmean_soil_wetness )) deallocate(cgrid%fmean_soil_wetness ) + if(associated(cgrid%fmean_skin_temp )) deallocate(cgrid%fmean_skin_temp ) + if(associated(cgrid%dmean_nppleaf )) deallocate(cgrid%dmean_nppleaf ) + if(associated(cgrid%dmean_nppfroot )) deallocate(cgrid%dmean_nppfroot ) + if(associated(cgrid%dmean_nppsapwood )) deallocate(cgrid%dmean_nppsapwood ) + if(associated(cgrid%dmean_nppcroot )) deallocate(cgrid%dmean_nppcroot ) + if(associated(cgrid%dmean_nppseeds )) deallocate(cgrid%dmean_nppseeds ) + if(associated(cgrid%dmean_nppwood )) deallocate(cgrid%dmean_nppwood ) + if(associated(cgrid%dmean_nppdaily )) deallocate(cgrid%dmean_nppdaily ) + if(associated(cgrid%dmean_A_decomp )) deallocate(cgrid%dmean_A_decomp ) + if(associated(cgrid%dmean_Af_decomp )) deallocate(cgrid%dmean_Af_decomp ) + if(associated(cgrid%dmean_co2_residual )) deallocate(cgrid%dmean_co2_residual ) + if(associated(cgrid%dmean_energy_residual )) deallocate(cgrid%dmean_energy_residual ) + if(associated(cgrid%dmean_water_residual )) deallocate(cgrid%dmean_water_residual ) + if(associated(cgrid%dmean_gpp )) deallocate(cgrid%dmean_gpp ) + if(associated(cgrid%dmean_npp )) deallocate(cgrid%dmean_npp ) + if(associated(cgrid%dmean_leaf_resp )) deallocate(cgrid%dmean_leaf_resp ) + if(associated(cgrid%dmean_root_resp )) deallocate(cgrid%dmean_root_resp ) + if(associated(cgrid%dmean_growth_resp )) deallocate(cgrid%dmean_growth_resp ) + if(associated(cgrid%dmean_storage_resp )) deallocate(cgrid%dmean_storage_resp ) + if(associated(cgrid%dmean_vleaf_resp )) deallocate(cgrid%dmean_vleaf_resp ) + if(associated(cgrid%dmean_plresp )) deallocate(cgrid%dmean_plresp ) + if(associated(cgrid%dmean_leaf_energy )) deallocate(cgrid%dmean_leaf_energy ) + if(associated(cgrid%dmean_leaf_water )) deallocate(cgrid%dmean_leaf_water ) + if(associated(cgrid%dmean_leaf_hcap )) deallocate(cgrid%dmean_leaf_hcap ) + if(associated(cgrid%dmean_leaf_vpdef )) deallocate(cgrid%dmean_leaf_vpdef ) + if(associated(cgrid%dmean_leaf_temp )) deallocate(cgrid%dmean_leaf_temp ) + if(associated(cgrid%dmean_leaf_fliq )) deallocate(cgrid%dmean_leaf_fliq ) + if(associated(cgrid%dmean_leaf_gsw )) deallocate(cgrid%dmean_leaf_gsw ) + if(associated(cgrid%dmean_leaf_gbw )) deallocate(cgrid%dmean_leaf_gbw ) + if(associated(cgrid%dmean_wood_energy )) deallocate(cgrid%dmean_wood_energy ) + if(associated(cgrid%dmean_wood_water )) deallocate(cgrid%dmean_wood_water ) + if(associated(cgrid%dmean_wood_hcap )) deallocate(cgrid%dmean_wood_hcap ) + if(associated(cgrid%dmean_wood_temp )) deallocate(cgrid%dmean_wood_temp ) + if(associated(cgrid%dmean_wood_fliq )) deallocate(cgrid%dmean_wood_fliq ) + if(associated(cgrid%dmean_wood_gbw )) deallocate(cgrid%dmean_wood_gbw ) + if(associated(cgrid%dmean_fs_open )) deallocate(cgrid%dmean_fs_open ) + if(associated(cgrid%dmean_fsw )) deallocate(cgrid%dmean_fsw ) + if(associated(cgrid%dmean_fsn )) deallocate(cgrid%dmean_fsn ) + if(associated(cgrid%dmean_psi_open )) deallocate(cgrid%dmean_psi_open ) + if(associated(cgrid%dmean_psi_closed )) deallocate(cgrid%dmean_psi_closed ) + if(associated(cgrid%dmean_water_supply )) deallocate(cgrid%dmean_water_supply ) + if(associated(cgrid%dmean_par_l )) deallocate(cgrid%dmean_par_l ) + if(associated(cgrid%dmean_par_l_beam )) deallocate(cgrid%dmean_par_l_beam ) + if(associated(cgrid%dmean_par_l_diff )) deallocate(cgrid%dmean_par_l_diff ) + if(associated(cgrid%dmean_rshort_l )) deallocate(cgrid%dmean_rshort_l ) + if(associated(cgrid%dmean_rlong_l )) deallocate(cgrid%dmean_rlong_l ) + if(associated(cgrid%dmean_sensible_lc )) deallocate(cgrid%dmean_sensible_lc ) + if(associated(cgrid%dmean_vapor_lc )) deallocate(cgrid%dmean_vapor_lc ) + if(associated(cgrid%dmean_transp )) deallocate(cgrid%dmean_transp ) + if(associated(cgrid%dmean_intercepted_al )) deallocate(cgrid%dmean_intercepted_al ) + if(associated(cgrid%dmean_wshed_lg )) deallocate(cgrid%dmean_wshed_lg ) + if(associated(cgrid%dmean_rshort_w )) deallocate(cgrid%dmean_rshort_w ) + if(associated(cgrid%dmean_rlong_w )) deallocate(cgrid%dmean_rlong_w ) + if(associated(cgrid%dmean_sensible_wc )) deallocate(cgrid%dmean_sensible_wc ) + if(associated(cgrid%dmean_vapor_wc )) deallocate(cgrid%dmean_vapor_wc ) + if(associated(cgrid%dmean_intercepted_aw )) deallocate(cgrid%dmean_intercepted_aw ) + if(associated(cgrid%dmean_wshed_wg )) deallocate(cgrid%dmean_wshed_wg ) + if(associated(cgrid%dmean_rh )) deallocate(cgrid%dmean_rh ) + if(associated(cgrid%dmean_cwd_rh )) deallocate(cgrid%dmean_cwd_rh ) + if(associated(cgrid%dmean_nep )) deallocate(cgrid%dmean_nep ) + if(associated(cgrid%dmean_rk4step )) deallocate(cgrid%dmean_rk4step ) + if(associated(cgrid%dmean_available_water )) deallocate(cgrid%dmean_available_water ) + if(associated(cgrid%dmean_can_theiv )) deallocate(cgrid%dmean_can_theiv ) + if(associated(cgrid%dmean_can_theta )) deallocate(cgrid%dmean_can_theta ) + if(associated(cgrid%dmean_can_vpdef )) deallocate(cgrid%dmean_can_vpdef ) + if(associated(cgrid%dmean_can_temp )) deallocate(cgrid%dmean_can_temp ) + if(associated(cgrid%dmean_can_shv )) deallocate(cgrid%dmean_can_shv ) + if(associated(cgrid%dmean_can_co2 )) deallocate(cgrid%dmean_can_co2 ) + if(associated(cgrid%dmean_can_rhos )) deallocate(cgrid%dmean_can_rhos ) + if(associated(cgrid%dmean_can_prss )) deallocate(cgrid%dmean_can_prss ) + if(associated(cgrid%dmean_gnd_temp )) deallocate(cgrid%dmean_gnd_temp ) + if(associated(cgrid%dmean_gnd_shv )) deallocate(cgrid%dmean_gnd_shv ) + if(associated(cgrid%dmean_can_ggnd )) deallocate(cgrid%dmean_can_ggnd ) + if(associated(cgrid%dmean_sfcw_depth )) deallocate(cgrid%dmean_sfcw_depth ) + if(associated(cgrid%dmean_sfcw_energy )) deallocate(cgrid%dmean_sfcw_energy ) + if(associated(cgrid%dmean_sfcw_mass )) deallocate(cgrid%dmean_sfcw_mass ) + if(associated(cgrid%dmean_sfcw_temp )) deallocate(cgrid%dmean_sfcw_temp ) + if(associated(cgrid%dmean_sfcw_fliq )) deallocate(cgrid%dmean_sfcw_fliq ) + if(associated(cgrid%dmean_soil_energy )) deallocate(cgrid%dmean_soil_energy ) + if(associated(cgrid%dmean_soil_mstpot )) deallocate(cgrid%dmean_soil_mstpot ) + if(associated(cgrid%dmean_soil_water )) deallocate(cgrid%dmean_soil_water ) + if(associated(cgrid%dmean_soil_temp )) deallocate(cgrid%dmean_soil_temp ) + if(associated(cgrid%dmean_soil_fliq )) deallocate(cgrid%dmean_soil_fliq ) + if(associated(cgrid%dmean_rshort_gnd )) deallocate(cgrid%dmean_rshort_gnd ) + if(associated(cgrid%dmean_par_gnd )) deallocate(cgrid%dmean_par_gnd ) + if(associated(cgrid%dmean_rlong_gnd )) deallocate(cgrid%dmean_rlong_gnd ) + if(associated(cgrid%dmean_rlongup )) deallocate(cgrid%dmean_rlongup ) + if(associated(cgrid%dmean_parup )) deallocate(cgrid%dmean_parup ) + if(associated(cgrid%dmean_nirup )) deallocate(cgrid%dmean_nirup ) + if(associated(cgrid%dmean_rshortup )) deallocate(cgrid%dmean_rshortup ) + if(associated(cgrid%dmean_rnet )) deallocate(cgrid%dmean_rnet ) + if(associated(cgrid%dmean_albedo )) deallocate(cgrid%dmean_albedo ) + if(associated(cgrid%dmean_albedo_beam )) deallocate(cgrid%dmean_albedo_beam ) + if(associated(cgrid%dmean_albedo_diff )) deallocate(cgrid%dmean_albedo_diff ) + if(associated(cgrid%dmean_rlong_albedo )) deallocate(cgrid%dmean_rlong_albedo ) + if(associated(cgrid%dmean_ustar )) deallocate(cgrid%dmean_ustar ) + if(associated(cgrid%dmean_tstar )) deallocate(cgrid%dmean_tstar ) + if(associated(cgrid%dmean_qstar )) deallocate(cgrid%dmean_qstar ) + if(associated(cgrid%dmean_cstar )) deallocate(cgrid%dmean_cstar ) + if(associated(cgrid%dmean_carbon_ac )) deallocate(cgrid%dmean_carbon_ac ) + if(associated(cgrid%dmean_carbon_st )) deallocate(cgrid%dmean_carbon_st ) + if(associated(cgrid%dmean_vapor_gc )) deallocate(cgrid%dmean_vapor_gc ) + if(associated(cgrid%dmean_vapor_ac )) deallocate(cgrid%dmean_vapor_ac ) + if(associated(cgrid%dmean_smoist_gg )) deallocate(cgrid%dmean_smoist_gg ) + if(associated(cgrid%dmean_throughfall )) deallocate(cgrid%dmean_throughfall ) + if(associated(cgrid%dmean_transloss )) deallocate(cgrid%dmean_transloss ) + if(associated(cgrid%dmean_runoff )) deallocate(cgrid%dmean_runoff ) + if(associated(cgrid%dmean_drainage )) deallocate(cgrid%dmean_drainage ) + if(associated(cgrid%dmean_sensible_gc )) deallocate(cgrid%dmean_sensible_gc ) + if(associated(cgrid%dmean_sensible_ac )) deallocate(cgrid%dmean_sensible_ac ) + if(associated(cgrid%dmean_sensible_gg )) deallocate(cgrid%dmean_sensible_gg ) + if(associated(cgrid%dmean_qthroughfall )) deallocate(cgrid%dmean_qthroughfall ) + if(associated(cgrid%dmean_qrunoff )) deallocate(cgrid%dmean_qrunoff ) + if(associated(cgrid%dmean_qdrainage )) deallocate(cgrid%dmean_qdrainage ) + if(associated(cgrid%dmean_atm_theiv )) deallocate(cgrid%dmean_atm_theiv ) + if(associated(cgrid%dmean_atm_theta )) deallocate(cgrid%dmean_atm_theta ) + if(associated(cgrid%dmean_atm_temp )) deallocate(cgrid%dmean_atm_temp ) + if(associated(cgrid%dmean_atm_vpdef )) deallocate(cgrid%dmean_atm_vpdef ) + if(associated(cgrid%dmean_atm_shv )) deallocate(cgrid%dmean_atm_shv ) + if(associated(cgrid%dmean_atm_rshort )) deallocate(cgrid%dmean_atm_rshort ) + if(associated(cgrid%dmean_atm_rshort_diff )) deallocate(cgrid%dmean_atm_rshort_diff ) + if(associated(cgrid%dmean_atm_par )) deallocate(cgrid%dmean_atm_par ) + if(associated(cgrid%dmean_atm_par_diff )) deallocate(cgrid%dmean_atm_par_diff ) + if(associated(cgrid%dmean_atm_rlong )) deallocate(cgrid%dmean_atm_rlong ) + if(associated(cgrid%dmean_atm_vels )) deallocate(cgrid%dmean_atm_vels ) + if(associated(cgrid%dmean_atm_rhos )) deallocate(cgrid%dmean_atm_rhos ) + if(associated(cgrid%dmean_atm_prss )) deallocate(cgrid%dmean_atm_prss ) + if(associated(cgrid%dmean_atm_co2 )) deallocate(cgrid%dmean_atm_co2 ) + if(associated(cgrid%dmean_pcpg )) deallocate(cgrid%dmean_pcpg ) + if(associated(cgrid%dmean_qpcpg )) deallocate(cgrid%dmean_qpcpg ) + if(associated(cgrid%dmean_dpcpg )) deallocate(cgrid%dmean_dpcpg ) + if(associated(cgrid%mmean_lai )) deallocate(cgrid%mmean_lai ) + if(associated(cgrid%mmean_bleaf )) deallocate(cgrid%mmean_bleaf ) + if(associated(cgrid%mmean_broot )) deallocate(cgrid%mmean_broot ) + if(associated(cgrid%mmean_bstorage )) deallocate(cgrid%mmean_bstorage ) + if(associated(cgrid%mmean_bleaf_n )) deallocate(cgrid%mmean_bleaf_n ) + if(associated(cgrid%mmean_broot_n )) deallocate(cgrid%mmean_broot_n ) + if(associated(cgrid%mmean_bstorage_n )) deallocate(cgrid%mmean_bstorage_n ) + if(associated(cgrid%mmean_leaf_maintenance)) deallocate(cgrid%mmean_leaf_maintenance) + if(associated(cgrid%mmean_root_maintenance)) deallocate(cgrid%mmean_root_maintenance) + if(associated(cgrid%mmean_leaf_drop )) deallocate(cgrid%mmean_leaf_drop ) + if(associated(cgrid%mmean_fast_soil_c )) deallocate(cgrid%mmean_fast_soil_c ) + if(associated(cgrid%mmean_slow_soil_c )) deallocate(cgrid%mmean_slow_soil_c ) + if(associated(cgrid%mmean_struct_soil_c )) deallocate(cgrid%mmean_struct_soil_c ) + if(associated(cgrid%mmean_struct_soil_l )) deallocate(cgrid%mmean_struct_soil_l ) + if(associated(cgrid%mmean_cwd_c )) deallocate(cgrid%mmean_cwd_c ) + if(associated(cgrid%mmean_fast_soil_n )) deallocate(cgrid%mmean_fast_soil_n ) + if(associated(cgrid%mmean_mineral_soil_n )) deallocate(cgrid%mmean_mineral_soil_n ) + if(associated(cgrid%mmean_cwd_n )) deallocate(cgrid%mmean_cwd_n ) + if(associated(cgrid%mmean_gpp )) deallocate(cgrid%mmean_gpp ) + if(associated(cgrid%mmean_npp )) deallocate(cgrid%mmean_npp ) + if(associated(cgrid%mmean_leaf_resp )) deallocate(cgrid%mmean_leaf_resp ) + if(associated(cgrid%mmean_root_resp )) deallocate(cgrid%mmean_root_resp ) + if(associated(cgrid%mmean_growth_resp )) deallocate(cgrid%mmean_growth_resp ) + if(associated(cgrid%mmean_storage_resp )) deallocate(cgrid%mmean_storage_resp ) + if(associated(cgrid%mmean_vleaf_resp )) deallocate(cgrid%mmean_vleaf_resp ) + if(associated(cgrid%mmean_plresp )) deallocate(cgrid%mmean_plresp ) + if(associated(cgrid%mmean_leaf_energy )) deallocate(cgrid%mmean_leaf_energy ) + if(associated(cgrid%mmean_leaf_water )) deallocate(cgrid%mmean_leaf_water ) + if(associated(cgrid%mmean_leaf_hcap )) deallocate(cgrid%mmean_leaf_hcap ) + if(associated(cgrid%mmean_leaf_vpdef )) deallocate(cgrid%mmean_leaf_vpdef ) + if(associated(cgrid%mmean_leaf_temp )) deallocate(cgrid%mmean_leaf_temp ) + if(associated(cgrid%mmean_leaf_fliq )) deallocate(cgrid%mmean_leaf_fliq ) + if(associated(cgrid%mmean_leaf_gsw )) deallocate(cgrid%mmean_leaf_gsw ) + if(associated(cgrid%mmean_leaf_gbw )) deallocate(cgrid%mmean_leaf_gbw ) + if(associated(cgrid%mmean_wood_energy )) deallocate(cgrid%mmean_wood_energy ) + if(associated(cgrid%mmean_wood_water )) deallocate(cgrid%mmean_wood_water ) + if(associated(cgrid%mmean_wood_hcap )) deallocate(cgrid%mmean_wood_hcap ) + if(associated(cgrid%mmean_wood_temp )) deallocate(cgrid%mmean_wood_temp ) + if(associated(cgrid%mmean_wood_fliq )) deallocate(cgrid%mmean_wood_fliq ) + if(associated(cgrid%mmean_wood_gbw )) deallocate(cgrid%mmean_wood_gbw ) + if(associated(cgrid%mmean_fs_open )) deallocate(cgrid%mmean_fs_open ) + if(associated(cgrid%mmean_fsw )) deallocate(cgrid%mmean_fsw ) + if(associated(cgrid%mmean_fsn )) deallocate(cgrid%mmean_fsn ) + if(associated(cgrid%mmean_psi_open )) deallocate(cgrid%mmean_psi_open ) + if(associated(cgrid%mmean_psi_closed )) deallocate(cgrid%mmean_psi_closed ) + if(associated(cgrid%mmean_water_supply )) deallocate(cgrid%mmean_water_supply ) + if(associated(cgrid%mmean_par_l )) deallocate(cgrid%mmean_par_l ) + if(associated(cgrid%mmean_par_l_beam )) deallocate(cgrid%mmean_par_l_beam ) + if(associated(cgrid%mmean_par_l_diff )) deallocate(cgrid%mmean_par_l_diff ) + if(associated(cgrid%mmean_rshort_l )) deallocate(cgrid%mmean_rshort_l ) + if(associated(cgrid%mmean_rlong_l )) deallocate(cgrid%mmean_rlong_l ) + if(associated(cgrid%mmean_sensible_lc )) deallocate(cgrid%mmean_sensible_lc ) + if(associated(cgrid%mmean_vapor_lc )) deallocate(cgrid%mmean_vapor_lc ) + if(associated(cgrid%mmean_transp )) deallocate(cgrid%mmean_transp ) + if(associated(cgrid%mmean_intercepted_al )) deallocate(cgrid%mmean_intercepted_al ) + if(associated(cgrid%mmean_wshed_lg )) deallocate(cgrid%mmean_wshed_lg ) + if(associated(cgrid%mmean_rshort_w )) deallocate(cgrid%mmean_rshort_w ) + if(associated(cgrid%mmean_rlong_w )) deallocate(cgrid%mmean_rlong_w ) + if(associated(cgrid%mmean_sensible_wc )) deallocate(cgrid%mmean_sensible_wc ) + if(associated(cgrid%mmean_vapor_wc )) deallocate(cgrid%mmean_vapor_wc ) + if(associated(cgrid%mmean_intercepted_aw )) deallocate(cgrid%mmean_intercepted_aw ) + if(associated(cgrid%mmean_wshed_wg )) deallocate(cgrid%mmean_wshed_wg ) + if(associated(cgrid%mmean_rh )) deallocate(cgrid%mmean_rh ) + if(associated(cgrid%mmean_cwd_rh )) deallocate(cgrid%mmean_cwd_rh ) + if(associated(cgrid%mmean_nep )) deallocate(cgrid%mmean_nep ) + if(associated(cgrid%mmean_rk4step )) deallocate(cgrid%mmean_rk4step ) + if(associated(cgrid%mmean_available_water )) deallocate(cgrid%mmean_available_water ) + if(associated(cgrid%mmean_can_theiv )) deallocate(cgrid%mmean_can_theiv ) + if(associated(cgrid%mmean_can_theta )) deallocate(cgrid%mmean_can_theta ) + if(associated(cgrid%mmean_can_vpdef )) deallocate(cgrid%mmean_can_vpdef ) + if(associated(cgrid%mmean_can_temp )) deallocate(cgrid%mmean_can_temp ) + if(associated(cgrid%mmean_can_shv )) deallocate(cgrid%mmean_can_shv ) + if(associated(cgrid%mmean_can_co2 )) deallocate(cgrid%mmean_can_co2 ) + if(associated(cgrid%mmean_can_rhos )) deallocate(cgrid%mmean_can_rhos ) + if(associated(cgrid%mmean_can_prss )) deallocate(cgrid%mmean_can_prss ) + if(associated(cgrid%mmean_gnd_temp )) deallocate(cgrid%mmean_gnd_temp ) + if(associated(cgrid%mmean_gnd_shv )) deallocate(cgrid%mmean_gnd_shv ) + if(associated(cgrid%mmean_can_ggnd )) deallocate(cgrid%mmean_can_ggnd ) + if(associated(cgrid%mmean_sfcw_depth )) deallocate(cgrid%mmean_sfcw_depth ) + if(associated(cgrid%mmean_sfcw_energy )) deallocate(cgrid%mmean_sfcw_energy ) + if(associated(cgrid%mmean_sfcw_mass )) deallocate(cgrid%mmean_sfcw_mass ) + if(associated(cgrid%mmean_sfcw_temp )) deallocate(cgrid%mmean_sfcw_temp ) + if(associated(cgrid%mmean_sfcw_fliq )) deallocate(cgrid%mmean_sfcw_fliq ) + if(associated(cgrid%mmean_soil_energy )) deallocate(cgrid%mmean_soil_energy ) + if(associated(cgrid%mmean_soil_mstpot )) deallocate(cgrid%mmean_soil_mstpot ) + if(associated(cgrid%mmean_soil_water )) deallocate(cgrid%mmean_soil_water ) + if(associated(cgrid%mmean_soil_temp )) deallocate(cgrid%mmean_soil_temp ) + if(associated(cgrid%mmean_soil_fliq )) deallocate(cgrid%mmean_soil_fliq ) + if(associated(cgrid%mmean_rshort_gnd )) deallocate(cgrid%mmean_rshort_gnd ) + if(associated(cgrid%mmean_par_gnd )) deallocate(cgrid%mmean_par_gnd ) + if(associated(cgrid%mmean_rlong_gnd )) deallocate(cgrid%mmean_rlong_gnd ) + if(associated(cgrid%mmean_rlongup )) deallocate(cgrid%mmean_rlongup ) + if(associated(cgrid%mmean_parup )) deallocate(cgrid%mmean_parup ) + if(associated(cgrid%mmean_nirup )) deallocate(cgrid%mmean_nirup ) + if(associated(cgrid%mmean_rshortup )) deallocate(cgrid%mmean_rshortup ) + if(associated(cgrid%mmean_rnet )) deallocate(cgrid%mmean_rnet ) + if(associated(cgrid%mmean_albedo )) deallocate(cgrid%mmean_albedo ) + if(associated(cgrid%mmean_albedo_beam )) deallocate(cgrid%mmean_albedo_beam ) + if(associated(cgrid%mmean_albedo_diff )) deallocate(cgrid%mmean_albedo_diff ) + if(associated(cgrid%mmean_rlong_albedo )) deallocate(cgrid%mmean_rlong_albedo ) + if(associated(cgrid%mmean_ustar )) deallocate(cgrid%mmean_ustar ) + if(associated(cgrid%mmean_tstar )) deallocate(cgrid%mmean_tstar ) + if(associated(cgrid%mmean_qstar )) deallocate(cgrid%mmean_qstar ) + if(associated(cgrid%mmean_cstar )) deallocate(cgrid%mmean_cstar ) + if(associated(cgrid%mmean_carbon_ac )) deallocate(cgrid%mmean_carbon_ac ) + if(associated(cgrid%mmean_carbon_st )) deallocate(cgrid%mmean_carbon_st ) + if(associated(cgrid%mmean_vapor_gc )) deallocate(cgrid%mmean_vapor_gc ) + if(associated(cgrid%mmean_vapor_ac )) deallocate(cgrid%mmean_vapor_ac ) + if(associated(cgrid%mmean_smoist_gg )) deallocate(cgrid%mmean_smoist_gg ) + if(associated(cgrid%mmean_throughfall )) deallocate(cgrid%mmean_throughfall ) + if(associated(cgrid%mmean_transloss )) deallocate(cgrid%mmean_transloss ) + if(associated(cgrid%mmean_runoff )) deallocate(cgrid%mmean_runoff ) + if(associated(cgrid%mmean_drainage )) deallocate(cgrid%mmean_drainage ) + if(associated(cgrid%mmean_sensible_gc )) deallocate(cgrid%mmean_sensible_gc ) + if(associated(cgrid%mmean_sensible_ac )) deallocate(cgrid%mmean_sensible_ac ) + if(associated(cgrid%mmean_sensible_gg )) deallocate(cgrid%mmean_sensible_gg ) + if(associated(cgrid%mmean_qthroughfall )) deallocate(cgrid%mmean_qthroughfall ) + if(associated(cgrid%mmean_qrunoff )) deallocate(cgrid%mmean_qrunoff ) + if(associated(cgrid%mmean_qdrainage )) deallocate(cgrid%mmean_qdrainage ) + if(associated(cgrid%mmean_nppleaf )) deallocate(cgrid%mmean_nppleaf ) + if(associated(cgrid%mmean_nppfroot )) deallocate(cgrid%mmean_nppfroot ) + if(associated(cgrid%mmean_nppsapwood )) deallocate(cgrid%mmean_nppsapwood ) + if(associated(cgrid%mmean_nppcroot )) deallocate(cgrid%mmean_nppcroot ) + if(associated(cgrid%mmean_nppseeds )) deallocate(cgrid%mmean_nppseeds ) + if(associated(cgrid%mmean_nppwood )) deallocate(cgrid%mmean_nppwood ) + if(associated(cgrid%mmean_nppdaily )) deallocate(cgrid%mmean_nppdaily ) + if(associated(cgrid%mmean_A_decomp )) deallocate(cgrid%mmean_A_decomp ) + if(associated(cgrid%mmean_Af_decomp )) deallocate(cgrid%mmean_Af_decomp ) + if(associated(cgrid%mmean_co2_residual )) deallocate(cgrid%mmean_co2_residual ) + if(associated(cgrid%mmean_energy_residual )) deallocate(cgrid%mmean_energy_residual ) + if(associated(cgrid%mmean_water_residual )) deallocate(cgrid%mmean_water_residual ) + if(associated(cgrid%mmean_atm_theiv )) deallocate(cgrid%mmean_atm_theiv ) + if(associated(cgrid%mmean_atm_theta )) deallocate(cgrid%mmean_atm_theta ) + if(associated(cgrid%mmean_atm_temp )) deallocate(cgrid%mmean_atm_temp ) + if(associated(cgrid%mmean_atm_vpdef )) deallocate(cgrid%mmean_atm_vpdef ) + if(associated(cgrid%mmean_atm_shv )) deallocate(cgrid%mmean_atm_shv ) + if(associated(cgrid%mmean_atm_rshort )) deallocate(cgrid%mmean_atm_rshort ) + if(associated(cgrid%mmean_atm_rshort_diff )) deallocate(cgrid%mmean_atm_rshort_diff ) + if(associated(cgrid%mmean_atm_par )) deallocate(cgrid%mmean_atm_par ) + if(associated(cgrid%mmean_atm_par_diff )) deallocate(cgrid%mmean_atm_par_diff ) + if(associated(cgrid%mmean_atm_rlong )) deallocate(cgrid%mmean_atm_rlong ) + if(associated(cgrid%mmean_atm_vels )) deallocate(cgrid%mmean_atm_vels ) + if(associated(cgrid%mmean_atm_rhos )) deallocate(cgrid%mmean_atm_rhos ) + if(associated(cgrid%mmean_atm_prss )) deallocate(cgrid%mmean_atm_prss ) + if(associated(cgrid%mmean_atm_co2 )) deallocate(cgrid%mmean_atm_co2 ) + if(associated(cgrid%mmean_pcpg )) deallocate(cgrid%mmean_pcpg ) + if(associated(cgrid%mmean_qpcpg )) deallocate(cgrid%mmean_qpcpg ) + if(associated(cgrid%mmean_dpcpg )) deallocate(cgrid%mmean_dpcpg ) + if(associated(cgrid%mmsqu_gpp )) deallocate(cgrid%mmsqu_gpp ) + if(associated(cgrid%mmsqu_npp )) deallocate(cgrid%mmsqu_npp ) + if(associated(cgrid%mmsqu_plresp )) deallocate(cgrid%mmsqu_plresp ) + if(associated(cgrid%mmsqu_sensible_lc )) deallocate(cgrid%mmsqu_sensible_lc ) + if(associated(cgrid%mmsqu_vapor_lc )) deallocate(cgrid%mmsqu_vapor_lc ) + if(associated(cgrid%mmsqu_transp )) deallocate(cgrid%mmsqu_transp ) + if(associated(cgrid%mmsqu_sensible_wc )) deallocate(cgrid%mmsqu_sensible_wc ) + if(associated(cgrid%mmsqu_vapor_wc )) deallocate(cgrid%mmsqu_vapor_wc ) + if(associated(cgrid%mmsqu_rh )) deallocate(cgrid%mmsqu_rh ) + if(associated(cgrid%mmsqu_cwd_rh )) deallocate(cgrid%mmsqu_cwd_rh ) + if(associated(cgrid%mmsqu_nep )) deallocate(cgrid%mmsqu_nep ) + if(associated(cgrid%mmsqu_rlongup )) deallocate(cgrid%mmsqu_rlongup ) + if(associated(cgrid%mmsqu_parup )) deallocate(cgrid%mmsqu_parup ) + if(associated(cgrid%mmsqu_nirup )) deallocate(cgrid%mmsqu_nirup ) + if(associated(cgrid%mmsqu_rshortup )) deallocate(cgrid%mmsqu_rshortup ) + if(associated(cgrid%mmsqu_rnet )) deallocate(cgrid%mmsqu_rnet ) + if(associated(cgrid%mmsqu_albedo )) deallocate(cgrid%mmsqu_albedo ) + if(associated(cgrid%mmsqu_ustar )) deallocate(cgrid%mmsqu_ustar ) + if(associated(cgrid%mmsqu_carbon_ac )) deallocate(cgrid%mmsqu_carbon_ac ) + if(associated(cgrid%mmsqu_carbon_st )) deallocate(cgrid%mmsqu_carbon_st ) + if(associated(cgrid%mmsqu_vapor_gc )) deallocate(cgrid%mmsqu_vapor_gc ) + if(associated(cgrid%mmsqu_vapor_ac )) deallocate(cgrid%mmsqu_vapor_ac ) + if(associated(cgrid%mmsqu_sensible_gc )) deallocate(cgrid%mmsqu_sensible_gc ) + if(associated(cgrid%mmsqu_sensible_ac )) deallocate(cgrid%mmsqu_sensible_ac ) + if(associated(cgrid%qmean_gpp )) deallocate(cgrid%qmean_gpp ) + if(associated(cgrid%qmean_npp )) deallocate(cgrid%qmean_npp ) + if(associated(cgrid%qmean_leaf_resp )) deallocate(cgrid%qmean_leaf_resp ) + if(associated(cgrid%qmean_root_resp )) deallocate(cgrid%qmean_root_resp ) + if(associated(cgrid%qmean_growth_resp )) deallocate(cgrid%qmean_growth_resp ) + if(associated(cgrid%qmean_storage_resp )) deallocate(cgrid%qmean_storage_resp ) + if(associated(cgrid%qmean_vleaf_resp )) deallocate(cgrid%qmean_vleaf_resp ) + if(associated(cgrid%qmean_plresp )) deallocate(cgrid%qmean_plresp ) + if(associated(cgrid%qmean_leaf_energy )) deallocate(cgrid%qmean_leaf_energy ) + if(associated(cgrid%qmean_leaf_water )) deallocate(cgrid%qmean_leaf_water ) + if(associated(cgrid%qmean_leaf_hcap )) deallocate(cgrid%qmean_leaf_hcap ) + if(associated(cgrid%qmean_leaf_vpdef )) deallocate(cgrid%qmean_leaf_vpdef ) + if(associated(cgrid%qmean_leaf_temp )) deallocate(cgrid%qmean_leaf_temp ) + if(associated(cgrid%qmean_leaf_fliq )) deallocate(cgrid%qmean_leaf_fliq ) + if(associated(cgrid%qmean_leaf_gsw )) deallocate(cgrid%qmean_leaf_gsw ) + if(associated(cgrid%qmean_leaf_gbw )) deallocate(cgrid%qmean_leaf_gbw ) + if(associated(cgrid%qmean_wood_energy )) deallocate(cgrid%qmean_wood_energy ) + if(associated(cgrid%qmean_wood_water )) deallocate(cgrid%qmean_wood_water ) + if(associated(cgrid%qmean_wood_hcap )) deallocate(cgrid%qmean_wood_hcap ) + if(associated(cgrid%qmean_wood_temp )) deallocate(cgrid%qmean_wood_temp ) + if(associated(cgrid%qmean_wood_fliq )) deallocate(cgrid%qmean_wood_fliq ) + if(associated(cgrid%qmean_wood_gbw )) deallocate(cgrid%qmean_wood_gbw ) + if(associated(cgrid%qmean_fs_open )) deallocate(cgrid%qmean_fs_open ) + if(associated(cgrid%qmean_fsw )) deallocate(cgrid%qmean_fsw ) + if(associated(cgrid%qmean_fsn )) deallocate(cgrid%qmean_fsn ) + if(associated(cgrid%qmean_psi_open )) deallocate(cgrid%qmean_psi_open ) + if(associated(cgrid%qmean_psi_closed )) deallocate(cgrid%qmean_psi_closed ) + if(associated(cgrid%qmean_water_supply )) deallocate(cgrid%qmean_water_supply ) + if(associated(cgrid%qmean_par_l )) deallocate(cgrid%qmean_par_l ) + if(associated(cgrid%qmean_par_l_beam )) deallocate(cgrid%qmean_par_l_beam ) + if(associated(cgrid%qmean_par_l_diff )) deallocate(cgrid%qmean_par_l_diff ) + if(associated(cgrid%qmean_rshort_l )) deallocate(cgrid%qmean_rshort_l ) + if(associated(cgrid%qmean_rlong_l )) deallocate(cgrid%qmean_rlong_l ) + if(associated(cgrid%qmean_sensible_lc )) deallocate(cgrid%qmean_sensible_lc ) + if(associated(cgrid%qmean_vapor_lc )) deallocate(cgrid%qmean_vapor_lc ) + if(associated(cgrid%qmean_transp )) deallocate(cgrid%qmean_transp ) + if(associated(cgrid%qmean_intercepted_al )) deallocate(cgrid%qmean_intercepted_al ) + if(associated(cgrid%qmean_wshed_lg )) deallocate(cgrid%qmean_wshed_lg ) + if(associated(cgrid%qmean_rshort_w )) deallocate(cgrid%qmean_rshort_w ) + if(associated(cgrid%qmean_rlong_w )) deallocate(cgrid%qmean_rlong_w ) + if(associated(cgrid%qmean_sensible_wc )) deallocate(cgrid%qmean_sensible_wc ) + if(associated(cgrid%qmean_vapor_wc )) deallocate(cgrid%qmean_vapor_wc ) + if(associated(cgrid%qmean_intercepted_aw )) deallocate(cgrid%qmean_intercepted_aw ) + if(associated(cgrid%qmean_wshed_wg )) deallocate(cgrid%qmean_wshed_wg ) + if(associated(cgrid%qmean_rh )) deallocate(cgrid%qmean_rh ) + if(associated(cgrid%qmean_cwd_rh )) deallocate(cgrid%qmean_cwd_rh ) + if(associated(cgrid%qmean_nep )) deallocate(cgrid%qmean_nep ) + if(associated(cgrid%qmean_rk4step )) deallocate(cgrid%qmean_rk4step ) + if(associated(cgrid%qmean_available_water )) deallocate(cgrid%qmean_available_water ) + if(associated(cgrid%qmean_can_theiv )) deallocate(cgrid%qmean_can_theiv ) + if(associated(cgrid%qmean_can_theta )) deallocate(cgrid%qmean_can_theta ) + if(associated(cgrid%qmean_can_vpdef )) deallocate(cgrid%qmean_can_vpdef ) + if(associated(cgrid%qmean_can_temp )) deallocate(cgrid%qmean_can_temp ) + if(associated(cgrid%qmean_can_shv )) deallocate(cgrid%qmean_can_shv ) + if(associated(cgrid%qmean_can_co2 )) deallocate(cgrid%qmean_can_co2 ) + if(associated(cgrid%qmean_can_rhos )) deallocate(cgrid%qmean_can_rhos ) + if(associated(cgrid%qmean_can_prss )) deallocate(cgrid%qmean_can_prss ) + if(associated(cgrid%qmean_gnd_temp )) deallocate(cgrid%qmean_gnd_temp ) + if(associated(cgrid%qmean_gnd_shv )) deallocate(cgrid%qmean_gnd_shv ) + if(associated(cgrid%qmean_can_ggnd )) deallocate(cgrid%qmean_can_ggnd ) + if(associated(cgrid%qmean_sfcw_depth )) deallocate(cgrid%qmean_sfcw_depth ) + if(associated(cgrid%qmean_sfcw_energy )) deallocate(cgrid%qmean_sfcw_energy ) + if(associated(cgrid%qmean_sfcw_mass )) deallocate(cgrid%qmean_sfcw_mass ) + if(associated(cgrid%qmean_sfcw_temp )) deallocate(cgrid%qmean_sfcw_temp ) + if(associated(cgrid%qmean_sfcw_fliq )) deallocate(cgrid%qmean_sfcw_fliq ) + if(associated(cgrid%qmean_soil_energy )) deallocate(cgrid%qmean_soil_energy ) + if(associated(cgrid%qmean_soil_mstpot )) deallocate(cgrid%qmean_soil_mstpot ) + if(associated(cgrid%qmean_soil_water )) deallocate(cgrid%qmean_soil_water ) + if(associated(cgrid%qmean_soil_temp )) deallocate(cgrid%qmean_soil_temp ) + if(associated(cgrid%qmean_soil_fliq )) deallocate(cgrid%qmean_soil_fliq ) + if(associated(cgrid%qmean_rshort_gnd )) deallocate(cgrid%qmean_rshort_gnd ) + if(associated(cgrid%qmean_par_gnd )) deallocate(cgrid%qmean_par_gnd ) + if(associated(cgrid%qmean_rlong_gnd )) deallocate(cgrid%qmean_rlong_gnd ) + if(associated(cgrid%qmean_rlongup )) deallocate(cgrid%qmean_rlongup ) + if(associated(cgrid%qmean_parup )) deallocate(cgrid%qmean_parup ) + if(associated(cgrid%qmean_nirup )) deallocate(cgrid%qmean_nirup ) + if(associated(cgrid%qmean_rshortup )) deallocate(cgrid%qmean_rshortup ) + if(associated(cgrid%qmean_rnet )) deallocate(cgrid%qmean_rnet ) + if(associated(cgrid%qmean_albedo )) deallocate(cgrid%qmean_albedo ) + if(associated(cgrid%qmean_albedo_beam )) deallocate(cgrid%qmean_albedo_beam ) + if(associated(cgrid%qmean_albedo_diff )) deallocate(cgrid%qmean_albedo_diff ) + if(associated(cgrid%qmean_rlong_albedo )) deallocate(cgrid%qmean_rlong_albedo ) + if(associated(cgrid%qmean_ustar )) deallocate(cgrid%qmean_ustar ) + if(associated(cgrid%qmean_tstar )) deallocate(cgrid%qmean_tstar ) + if(associated(cgrid%qmean_qstar )) deallocate(cgrid%qmean_qstar ) + if(associated(cgrid%qmean_cstar )) deallocate(cgrid%qmean_cstar ) + if(associated(cgrid%qmean_carbon_ac )) deallocate(cgrid%qmean_carbon_ac ) + if(associated(cgrid%qmean_carbon_st )) deallocate(cgrid%qmean_carbon_st ) + if(associated(cgrid%qmean_vapor_gc )) deallocate(cgrid%qmean_vapor_gc ) + if(associated(cgrid%qmean_vapor_ac )) deallocate(cgrid%qmean_vapor_ac ) + if(associated(cgrid%qmean_smoist_gg )) deallocate(cgrid%qmean_smoist_gg ) + if(associated(cgrid%qmean_throughfall )) deallocate(cgrid%qmean_throughfall ) + if(associated(cgrid%qmean_transloss )) deallocate(cgrid%qmean_transloss ) + if(associated(cgrid%qmean_runoff )) deallocate(cgrid%qmean_runoff ) + if(associated(cgrid%qmean_drainage )) deallocate(cgrid%qmean_drainage ) + if(associated(cgrid%qmean_sensible_gc )) deallocate(cgrid%qmean_sensible_gc ) + if(associated(cgrid%qmean_sensible_ac )) deallocate(cgrid%qmean_sensible_ac ) + if(associated(cgrid%qmean_sensible_gg )) deallocate(cgrid%qmean_sensible_gg ) + if(associated(cgrid%qmean_qthroughfall )) deallocate(cgrid%qmean_qthroughfall ) + if(associated(cgrid%qmean_qrunoff )) deallocate(cgrid%qmean_qrunoff ) + if(associated(cgrid%qmean_qdrainage )) deallocate(cgrid%qmean_qdrainage ) + if(associated(cgrid%qmean_atm_theiv )) deallocate(cgrid%qmean_atm_theiv ) + if(associated(cgrid%qmean_atm_theta )) deallocate(cgrid%qmean_atm_theta ) + if(associated(cgrid%qmean_atm_temp )) deallocate(cgrid%qmean_atm_temp ) + if(associated(cgrid%qmean_atm_vpdef )) deallocate(cgrid%qmean_atm_vpdef ) + if(associated(cgrid%qmean_atm_shv )) deallocate(cgrid%qmean_atm_shv ) + if(associated(cgrid%qmean_atm_rshort )) deallocate(cgrid%qmean_atm_rshort ) + if(associated(cgrid%qmean_atm_rshort_diff )) deallocate(cgrid%qmean_atm_rshort_diff ) + if(associated(cgrid%qmean_atm_par )) deallocate(cgrid%qmean_atm_par ) + if(associated(cgrid%qmean_atm_par_diff )) deallocate(cgrid%qmean_atm_par_diff ) + if(associated(cgrid%qmean_atm_rlong )) deallocate(cgrid%qmean_atm_rlong ) + if(associated(cgrid%qmean_atm_vels )) deallocate(cgrid%qmean_atm_vels ) + if(associated(cgrid%qmean_atm_rhos )) deallocate(cgrid%qmean_atm_rhos ) + if(associated(cgrid%qmean_atm_prss )) deallocate(cgrid%qmean_atm_prss ) + if(associated(cgrid%qmean_atm_co2 )) deallocate(cgrid%qmean_atm_co2 ) + if(associated(cgrid%qmean_pcpg )) deallocate(cgrid%qmean_pcpg ) + if(associated(cgrid%qmean_qpcpg )) deallocate(cgrid%qmean_qpcpg ) + if(associated(cgrid%qmean_dpcpg )) deallocate(cgrid%qmean_dpcpg ) + if(associated(cgrid%qmsqu_gpp )) deallocate(cgrid%qmsqu_gpp ) + if(associated(cgrid%qmsqu_npp )) deallocate(cgrid%qmsqu_npp ) + if(associated(cgrid%qmsqu_plresp )) deallocate(cgrid%qmsqu_plresp ) + if(associated(cgrid%qmsqu_sensible_lc )) deallocate(cgrid%qmsqu_sensible_lc ) + if(associated(cgrid%qmsqu_vapor_lc )) deallocate(cgrid%qmsqu_vapor_lc ) + if(associated(cgrid%qmsqu_transp )) deallocate(cgrid%qmsqu_transp ) + if(associated(cgrid%qmsqu_sensible_wc )) deallocate(cgrid%qmsqu_sensible_wc ) + if(associated(cgrid%qmsqu_vapor_wc )) deallocate(cgrid%qmsqu_vapor_wc ) + if(associated(cgrid%qmsqu_rh )) deallocate(cgrid%qmsqu_rh ) + if(associated(cgrid%qmsqu_cwd_rh )) deallocate(cgrid%qmsqu_cwd_rh ) + if(associated(cgrid%qmsqu_nep )) deallocate(cgrid%qmsqu_nep ) + if(associated(cgrid%qmsqu_rlongup )) deallocate(cgrid%qmsqu_rlongup ) + if(associated(cgrid%qmsqu_parup )) deallocate(cgrid%qmsqu_parup ) + if(associated(cgrid%qmsqu_nirup )) deallocate(cgrid%qmsqu_nirup ) + if(associated(cgrid%qmsqu_rshortup )) deallocate(cgrid%qmsqu_rshortup ) + if(associated(cgrid%qmsqu_rnet )) deallocate(cgrid%qmsqu_rnet ) + if(associated(cgrid%qmsqu_albedo )) deallocate(cgrid%qmsqu_albedo ) + if(associated(cgrid%qmsqu_ustar )) deallocate(cgrid%qmsqu_ustar ) + if(associated(cgrid%qmsqu_carbon_ac )) deallocate(cgrid%qmsqu_carbon_ac ) + if(associated(cgrid%qmsqu_carbon_st )) deallocate(cgrid%qmsqu_carbon_st ) + if(associated(cgrid%qmsqu_vapor_gc )) deallocate(cgrid%qmsqu_vapor_gc ) + if(associated(cgrid%qmsqu_vapor_ac )) deallocate(cgrid%qmsqu_vapor_ac ) + if(associated(cgrid%qmsqu_sensible_gc )) deallocate(cgrid%qmsqu_sensible_gc ) + if(associated(cgrid%qmsqu_sensible_ac )) deallocate(cgrid%qmsqu_sensible_ac ) + return + end subroutine deallocate_edtype + !=======================================================================================! + !=======================================================================================! - if (associated(cgrid%lat)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%lat,nvar,igr,init,cgrid%pyglob_id & - ,var_len,var_len_global,max_ptrs & - ,'LATITUDE :11:hist:anal:dail:mont:dcyc:year') - call metadata_edio(nvar,igr,'Latitude of Polygon','decimal degrees','ipoly') - end if - if (associated(cgrid%lon)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%lon,nvar,igr,init,cgrid%pyglob_id & - ,var_len,var_len_global,max_ptrs & - ,'LONGITUDE :11:hist:anal:dail:mont:dcyc:year') - call metadata_edio(nvar,igr,'Longitude of Polygon','decimal degrees','ipoly') - end if - - if (associated(cgrid%wbar)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%wbar,nvar,igr,init,cgrid%pyglob_id & - ,var_len,var_len_global,max_ptrs & - ,'WBAR :11:hist') - call metadata_edio(nvar,igr,'Polygon average topographic moisture index' & - ,'NA','ipoly') - end if - - if (associated(cgrid%Te)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%Te,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'TE :11:hist') - call metadata_edio(nvar,igr,'NA','NA','ipoly') - end if - - if (associated(cgrid%zbar)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%zbar,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'ZBAR :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon average water table depth','[m]','ipoly') - end if - - if (associated(cgrid%sheat)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%sheat,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'SHEAT :11:hist') - call metadata_edio(nvar,igr,'soil heat pool for lateral hydrology','NA','ipoly') - end if - - if (associated(cgrid%baseflow)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%baseflow,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'BASEFLOW :11:hist:anal:opti') - call metadata_edio(nvar,igr,'loss of water from site to watershed discharge','kg/m2/s','ipoly') - end if - - if (associated(cgrid%runoff)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%runoff,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'RUNOFF :11:hist:anal:opti') - call metadata_edio(nvar,igr,'NA','NA','ipoly') - end if - - if (associated(cgrid%swliq)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%swliq,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'SWLIQ :11:hist:anal') - call metadata_edio(nvar,igr,'NA','NA','ipoly') - end if - if (associated(cgrid%total_agb)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%total_agb,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'TOTAL_AGB :11:hist:anal:year') - call metadata_edio(nvar,igr,'Polygon Total Above Ground Biomass','[kgC/m2]','ipoly') - end if - - if (associated(cgrid%total_basal_area)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%total_basal_area,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'TOTAL_BASAL_AREA :11:hist:anal:year') - call metadata_edio(nvar,igr,'Polygon Total Basal Area','[cm2/m2]','ipoly') - - end if - if (associated(cgrid%total_agb_growth)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%total_agb_growth,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'TOTAL_AGB_GROWTH:11:hist:anal:year') - call metadata_edio(nvar,igr,'Polygon AGB gain through growth','[kgC/m2/yr]','ipoly') - end if - - if (associated(cgrid%total_agb_mort)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%total_agb_mort,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'TOTAL_AGB_MORT :11:hist:anal:year') - call metadata_edio(nvar,igr,'Polygon AGB lost due to mortality','[kgC/m2/yr]','ipoly') - end if - - if (associated(cgrid%total_agb_recruit)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%total_agb_recruit,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'TOTAL_AGB_RECRUIT :11:hist:anal:year') - call metadata_edio(nvar,igr,'Polygon AGB used to generate recruits','[kgC/m2/yr]','ipoly') - end if - - if (associated(cgrid%total_basal_area_growth)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%total_basal_area_growth,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'TOTAL_BASAL_AREA_GROWTH :11:hist:anal:year') - call metadata_edio(nvar,igr,'Polygon basal area gained through growth ','[kgC/m2/yr]','ipoly') - end if - - if (associated(cgrid%total_basal_area_mort)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%total_basal_area_mort,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'TOTAL_BASAL_AREA_MORT :11:hist:anal:year') - call metadata_edio(nvar,igr,'Polygon basal area lost through growth ','[cm2/m2/yr]','ipoly') - end if - - if (associated(cgrid%total_basal_area_recruit)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%total_basal_area_recruit,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'TOTAL_BASAL_AREA_RECRUIT :11:hist:anal:year') - call metadata_edio(nvar,igr,'Polygon basal area gained by recruits','[cm2/m2/yr]','ipoly') - end if - - if (associated(cgrid%cosz)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%cosz,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'COSZ :11:hist') - call metadata_edio(nvar,igr,'Cosine of the zenith angle','[a/h]','ipoly') - end if - - if (associated(cgrid%cbudget_initialstorage)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%cbudget_initialstorage,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'CBUDGET_INITIALSTORAGE :11:hist') - call metadata_edio(nvar,igr,'Vegetation and soil carbon,at start of budget-averaging','[kgC/m2]','ipoly') - end if - - if (associated(cgrid%cbudget_nep)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%cbudget_nep,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'CBUDGET_NEP :11:hist') - call metadata_edio(nvar,igr,'Polygon average net ecosystem production','[kgC/m2/day]','ipoly') - end if - - if (associated(cgrid%nbudget_initialstorage)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%nbudget_initialstorage,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'NBUDGET_INITIALSTORAGE :11:hist') - call metadata_edio(nvar,igr,'Veg and soil nitrogen, at start of budget-averaging','[kgN/m2]','ipoly') - end if - - if (associated(cgrid%avg_vapor_lc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_vapor_lc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_VAPOR_LC :11:hist:anal:opti') - call metadata_edio(nvar,igr,'polygon leaf to canopy air vapor flux','[kg/m2/s]','ipoly') - end if + !=======================================================================================! + !=======================================================================================! + ! This sub-routine de-allocates all site pointers. ! + !---------------------------------------------------------------------------------------! + subroutine deallocate_polygontype(cpoly) + implicit none - if (associated(cgrid%avg_vapor_wc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_vapor_wc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_VAPOR_WC :11:hist:anal:opti') - call metadata_edio(nvar,igr,'polygon wood to canopy air vapor flux','[kg/m2/s]','ipoly') - end if - - if (associated(cgrid%avg_vapor_gc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_vapor_gc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_VAPOR_GC :11:hist:anal:opti') - call metadata_edio(nvar,igr,'polygon moisture flux ground to canopy air','[kg/m2/s]','ipoly') - end if - - if (associated(cgrid%avg_wshed_vg)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_wshed_vg,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_WSHED_VG :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon averaged water shed from vegetation to ground','[kg/m2/s]','ipoly') - end if - - if (associated(cgrid%avg_intercepted)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_intercepted,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_INTERCEPTED :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon averaged intercepted precipitation by vegetation','[kg/m2/s]','ipoly') - end if - - if (associated(cgrid%avg_throughfall)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_throughfall,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_THROUGHFALL :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon averaged throughfall precipitation','[kg/m2/s]','ipoly') - end if - - if (associated(cgrid%avg_vapor_ac)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_vapor_ac,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_VAPOR_AC :11:hist:anal:opti') - call metadata_edio(nvar,igr,'polygon vapor flux atmosphere to canopy air','[kg/m2/s]','ipoly') - end if - - if (associated(cgrid%avg_transp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_transp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_TRANSP :11:hist:anal:opti') - call metadata_edio(nvar,igr,'polygon transpiration from stomata to canopy air space','[kg/m2/s]','ipoly') - end if - - if (associated(cgrid%avg_evap)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_evap,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_EVAP :11:hist:anal:opti') - call metadata_edio(nvar,igr,'Polygon averaged evap/dew from ground and leaves to CAS','[kg/m2/s]','ipoly') - end if + !----- Arguments. -------------------------------------------------------------------! + type(polygontype), target :: cpoly + !----- Local variables. -------------------------------------------------------------! + integer :: isi + !------------------------------------------------------------------------------------! - if (associated(cgrid%avg_runoff)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_runoff,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_RUNOFF :11:hist:anal:opti') - call metadata_edio(nvar,igr,'Polygon average surface runoff','[kg/m2/s]','NA') - end if - - if (associated(cgrid%avg_drainage)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_drainage,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_DRAINAGE :11:hist:anal') - call metadata_edio(nvar,igr,'polygon average water flux through lower soil layer','[kg/m2/s]','ipoly') - end if - - if (associated(cgrid%avg_drainage_heat)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_drainage_heat,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_DRAINAGE_HEAT :11:hist:anal') - call metadata_edio(nvar,igr,'polygon average internal energy loss through lower soil layer','[W/m2]','ipoly') - end if - - if (associated(cgrid%avg_rshort_gnd)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_rshort_gnd,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_RSHORT_GND :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon averaged ground absorbed SW radiation','[W/m2]','ipoly') - end if + !------------------------------------------------------------------------------------! + ! First thing we must do is to deallocate the nested dimensions. ! + !------------------------------------------------------------------------------------! + do isi = 1, cpoly%nsites + call deallocate_sitetype(cpoly%site(isi)) + end do + if(associated(cpoly%site)) deallocate(cpoly%site) + !------------------------------------------------------------------------------------! - if (associated(cgrid%avg_par_gnd)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_par_gnd,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_PAR_GND :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon averaged ground absorbed PAR','[W/m2]','ipoly') - end if - if (associated(cgrid%avg_rlong_gnd)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_rlong_gnd,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_RLONG_GND :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon averaged ground absorbed LW radiation','[W/m2]','ipoly') - end if + if(associated(cpoly%sipa_id )) deallocate(cpoly%sipa_id ) + if(associated(cpoly%sipa_n )) deallocate(cpoly%sipa_n ) + if(associated(cpoly%patch_count )) deallocate(cpoly%patch_count ) + if(associated(cpoly%sitenum )) deallocate(cpoly%sitenum ) + if(associated(cpoly%met )) deallocate(cpoly%met ) + if(associated(cpoly%area )) deallocate(cpoly%area ) + if(associated(cpoly%patch_area )) deallocate(cpoly%patch_area ) + if(associated(cpoly%elevation )) deallocate(cpoly%elevation ) + if(associated(cpoly%slope )) deallocate(cpoly%slope ) + if(associated(cpoly%aspect )) deallocate(cpoly%aspect ) + if(associated(cpoly%lsl )) deallocate(cpoly%lsl ) + if(associated(cpoly%ncol_soil )) deallocate(cpoly%ncol_soil ) + if(associated(cpoly%ntext_soil )) deallocate(cpoly%ntext_soil ) + if(associated(cpoly%TCI )) deallocate(cpoly%TCI ) + if(associated(cpoly%pptweight )) deallocate(cpoly%pptweight ) + if(associated(cpoly%hydro_next )) deallocate(cpoly%hydro_next ) + if(associated(cpoly%hydro_prev )) deallocate(cpoly%hydro_prev ) + if(associated(cpoly%moist_W )) deallocate(cpoly%moist_W ) + if(associated(cpoly%moist_f )) deallocate(cpoly%moist_f ) + if(associated(cpoly%moist_tau )) deallocate(cpoly%moist_tau ) + if(associated(cpoly%moist_zi )) deallocate(cpoly%moist_zi ) + if(associated(cpoly%baseflow )) deallocate(cpoly%baseflow ) + if(associated(cpoly%runoff )) deallocate(cpoly%runoff ) + if(associated(cpoly%qrunoff )) deallocate(cpoly%qrunoff ) + if(associated(cpoly%min_monthly_temp )) deallocate(cpoly%min_monthly_temp ) + if(associated(cpoly%num_landuse_years )) deallocate(cpoly%num_landuse_years ) + if(associated(cpoly%mindbh_primary )) deallocate(cpoly%mindbh_primary ) + if(associated(cpoly%probharv_primary )) deallocate(cpoly%probharv_primary ) + if(associated(cpoly%mindbh_secondary )) deallocate(cpoly%mindbh_secondary ) + if(associated(cpoly%probharv_secondary )) deallocate(cpoly%probharv_secondary ) + if(associated(cpoly%plantation )) deallocate(cpoly%plantation ) + if(associated(cpoly%agri_stocking_pft )) deallocate(cpoly%agri_stocking_pft ) + if(associated(cpoly%agri_stocking_density )) deallocate(cpoly%agri_stocking_density ) + if(associated(cpoly%plantation_stocking_pft )) & + deallocate(cpoly%plantation_stocking_pft ) + if(associated(cpoly%plantation_stocking_density)) & + deallocate(cpoly%plantation_stocking_density) + if(associated(cpoly%primary_harvest_memory )) & + deallocate(cpoly%primary_harvest_memory ) + if(associated(cpoly%secondary_harvest_memory )) & + deallocate(cpoly%secondary_harvest_memory ) + if(associated(cpoly%fire_disturbance_rate )) deallocate(cpoly%fire_disturbance_rate ) + if(associated(cpoly%ignition_rate )) deallocate(cpoly%ignition_rate ) + if(associated(cpoly%lambda_fire )) deallocate(cpoly%lambda_fire ) + if(associated(cpoly%avg_monthly_pcpg )) deallocate(cpoly%avg_monthly_pcpg ) + if(associated(cpoly%phen_pars )) deallocate(cpoly%phen_pars ) + if(associated(cpoly%nat_disturbance_rate )) deallocate(cpoly%nat_disturbance_rate ) + if(associated(cpoly%nat_dist_type )) deallocate(cpoly%nat_dist_type ) + if(associated(cpoly%disturbance_memory )) deallocate(cpoly%disturbance_memory ) + if(associated(cpoly%disturbance_rates )) deallocate(cpoly%disturbance_rates ) + if(associated(cpoly%green_leaf_factor )) deallocate(cpoly%green_leaf_factor ) + if(associated(cpoly%leaf_aging_factor )) deallocate(cpoly%leaf_aging_factor ) + if(associated(cpoly%basal_area )) deallocate(cpoly%basal_area ) + if(associated(cpoly%basal_area_growth )) deallocate(cpoly%basal_area_growth ) + if(associated(cpoly%agb )) deallocate(cpoly%agb ) + if(associated(cpoly%agb_growth )) deallocate(cpoly%agb_growth ) + if(associated(cpoly%basal_area_mort )) deallocate(cpoly%basal_area_mort ) + if(associated(cpoly%basal_area_cut )) deallocate(cpoly%basal_area_cut ) + if(associated(cpoly%agb_mort )) deallocate(cpoly%agb_mort ) + if(associated(cpoly%agb_cut )) deallocate(cpoly%agb_cut ) + if(associated(cpoly%cosaoi )) deallocate(cpoly%cosaoi ) + if(associated(cpoly%daylight )) deallocate(cpoly%daylight ) + if(associated(cpoly%nighttime )) deallocate(cpoly%nighttime ) + if(associated(cpoly%rad_avg )) deallocate(cpoly%rad_avg ) + if(associated(cpoly%fmean_atm_theiv )) deallocate(cpoly%fmean_atm_theiv ) + if(associated(cpoly%fmean_atm_theta )) deallocate(cpoly%fmean_atm_theta ) + if(associated(cpoly%fmean_atm_temp )) deallocate(cpoly%fmean_atm_temp ) + if(associated(cpoly%fmean_atm_vpdef )) deallocate(cpoly%fmean_atm_vpdef ) + if(associated(cpoly%fmean_atm_shv )) deallocate(cpoly%fmean_atm_shv ) + if(associated(cpoly%fmean_atm_rshort )) deallocate(cpoly%fmean_atm_rshort ) + if(associated(cpoly%fmean_atm_rshort_diff )) deallocate(cpoly%fmean_atm_rshort_diff ) + if(associated(cpoly%fmean_atm_par )) deallocate(cpoly%fmean_atm_par ) + if(associated(cpoly%fmean_atm_par_diff )) deallocate(cpoly%fmean_atm_par_diff ) + if(associated(cpoly%fmean_atm_rlong )) deallocate(cpoly%fmean_atm_rlong ) + if(associated(cpoly%fmean_atm_vels )) deallocate(cpoly%fmean_atm_vels ) + if(associated(cpoly%fmean_atm_rhos )) deallocate(cpoly%fmean_atm_rhos ) + if(associated(cpoly%fmean_atm_prss )) deallocate(cpoly%fmean_atm_prss ) + if(associated(cpoly%fmean_atm_co2 )) deallocate(cpoly%fmean_atm_co2 ) + if(associated(cpoly%fmean_pcpg )) deallocate(cpoly%fmean_pcpg ) + if(associated(cpoly%fmean_qpcpg )) deallocate(cpoly%fmean_qpcpg ) + if(associated(cpoly%fmean_dpcpg )) deallocate(cpoly%fmean_dpcpg ) + if(associated(cpoly%dmean_atm_theiv )) deallocate(cpoly%dmean_atm_theiv ) + if(associated(cpoly%dmean_atm_theta )) deallocate(cpoly%dmean_atm_theta ) + if(associated(cpoly%dmean_atm_temp )) deallocate(cpoly%dmean_atm_temp ) + if(associated(cpoly%dmean_atm_vpdef )) deallocate(cpoly%dmean_atm_vpdef ) + if(associated(cpoly%dmean_atm_shv )) deallocate(cpoly%dmean_atm_shv ) + if(associated(cpoly%dmean_atm_rshort )) deallocate(cpoly%dmean_atm_rshort ) + if(associated(cpoly%dmean_atm_rshort_diff )) deallocate(cpoly%dmean_atm_rshort_diff ) + if(associated(cpoly%dmean_atm_par )) deallocate(cpoly%dmean_atm_par ) + if(associated(cpoly%dmean_atm_par_diff )) deallocate(cpoly%dmean_atm_par_diff ) + if(associated(cpoly%dmean_atm_rlong )) deallocate(cpoly%dmean_atm_rlong ) + if(associated(cpoly%dmean_atm_vels )) deallocate(cpoly%dmean_atm_vels ) + if(associated(cpoly%dmean_atm_rhos )) deallocate(cpoly%dmean_atm_rhos ) + if(associated(cpoly%dmean_atm_prss )) deallocate(cpoly%dmean_atm_prss ) + if(associated(cpoly%dmean_atm_co2 )) deallocate(cpoly%dmean_atm_co2 ) + if(associated(cpoly%dmean_pcpg )) deallocate(cpoly%dmean_pcpg ) + if(associated(cpoly%dmean_qpcpg )) deallocate(cpoly%dmean_qpcpg ) + if(associated(cpoly%dmean_dpcpg )) deallocate(cpoly%dmean_dpcpg ) + if(associated(cpoly%mmean_atm_theiv )) deallocate(cpoly%mmean_atm_theiv ) + if(associated(cpoly%mmean_atm_theta )) deallocate(cpoly%mmean_atm_theta ) + if(associated(cpoly%mmean_atm_temp )) deallocate(cpoly%mmean_atm_temp ) + if(associated(cpoly%mmean_atm_vpdef )) deallocate(cpoly%mmean_atm_vpdef ) + if(associated(cpoly%mmean_atm_shv )) deallocate(cpoly%mmean_atm_shv ) + if(associated(cpoly%mmean_atm_rshort )) deallocate(cpoly%mmean_atm_rshort ) + if(associated(cpoly%mmean_atm_rshort_diff )) deallocate(cpoly%mmean_atm_rshort_diff ) + if(associated(cpoly%mmean_atm_par )) deallocate(cpoly%mmean_atm_par ) + if(associated(cpoly%mmean_atm_par_diff )) deallocate(cpoly%mmean_atm_par_diff ) + if(associated(cpoly%mmean_atm_rlong )) deallocate(cpoly%mmean_atm_rlong ) + if(associated(cpoly%mmean_atm_vels )) deallocate(cpoly%mmean_atm_vels ) + if(associated(cpoly%mmean_atm_rhos )) deallocate(cpoly%mmean_atm_rhos ) + if(associated(cpoly%mmean_atm_prss )) deallocate(cpoly%mmean_atm_prss ) + if(associated(cpoly%mmean_atm_co2 )) deallocate(cpoly%mmean_atm_co2 ) + if(associated(cpoly%mmean_pcpg )) deallocate(cpoly%mmean_pcpg ) + if(associated(cpoly%mmean_qpcpg )) deallocate(cpoly%mmean_qpcpg ) + if(associated(cpoly%mmean_dpcpg )) deallocate(cpoly%mmean_dpcpg ) + if(associated(cpoly%qmean_atm_theiv )) deallocate(cpoly%qmean_atm_theiv ) + if(associated(cpoly%qmean_atm_theta )) deallocate(cpoly%qmean_atm_theta ) + if(associated(cpoly%qmean_atm_temp )) deallocate(cpoly%qmean_atm_temp ) + if(associated(cpoly%qmean_atm_vpdef )) deallocate(cpoly%qmean_atm_vpdef ) + if(associated(cpoly%qmean_atm_shv )) deallocate(cpoly%qmean_atm_shv ) + if(associated(cpoly%qmean_atm_rshort )) deallocate(cpoly%qmean_atm_rshort ) + if(associated(cpoly%qmean_atm_rshort_diff )) deallocate(cpoly%qmean_atm_rshort_diff ) + if(associated(cpoly%qmean_atm_par )) deallocate(cpoly%qmean_atm_par ) + if(associated(cpoly%qmean_atm_par_diff )) deallocate(cpoly%qmean_atm_par_diff ) + if(associated(cpoly%qmean_atm_rlong )) deallocate(cpoly%qmean_atm_rlong ) + if(associated(cpoly%qmean_atm_vels )) deallocate(cpoly%qmean_atm_vels ) + if(associated(cpoly%qmean_atm_rhos )) deallocate(cpoly%qmean_atm_rhos ) + if(associated(cpoly%qmean_atm_prss )) deallocate(cpoly%qmean_atm_prss ) + if(associated(cpoly%qmean_atm_co2 )) deallocate(cpoly%qmean_atm_co2 ) + if(associated(cpoly%qmean_pcpg )) deallocate(cpoly%qmean_pcpg ) + if(associated(cpoly%qmean_qpcpg )) deallocate(cpoly%qmean_qpcpg ) + if(associated(cpoly%qmean_dpcpg )) deallocate(cpoly%qmean_dpcpg ) + return + end subroutine deallocate_polygontype + !=======================================================================================! + !=======================================================================================! - if (associated(cgrid%avg_ustar)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_ustar,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_USTAR :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon averaged friction velocity','[m/s]','ipoly') - end if - if (associated(cgrid%avg_tstar)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_tstar,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_TSTAR :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon averaged characteristic temp. gradient','[K]','ipoly') - end if - if (associated(cgrid%avg_qstar)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_qstar,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_QSTAR :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon averaged characteristic specific humidity gradient','[kg/kg]','ipoly') - end if - if (associated(cgrid%avg_cstar)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_cstar,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_CSTAR :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon averaged characteristic CO2 gradient','[umol/mol]','ipoly') - end if - if (associated(cgrid%avg_carbon_ac)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_carbon_ac,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_CARBON_AC :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon averaged vegetation to canopy air CO2 flux','[umol/m2/s]','ipoly') - end if + !=======================================================================================! + !=======================================================================================! + ! This sub-routine de-allocates all patch pointers. ! + !---------------------------------------------------------------------------------------! + subroutine deallocate_sitetype(csite) + implicit none - if (associated(cgrid%avg_carbon_st)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_carbon_st,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_CARBON_ST :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon averaged canopy CO2 storage flux','[umol/m2/s]','ipoly') - end if + !----- Arguments. -------------------------------------------------------------------! + type(sitetype) , target :: csite + !----- Local variables. -------------------------------------------------------------! + integer :: ipa + !------------------------------------------------------------------------------------! - if (associated(cgrid%avg_sensible_lc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_sensible_lc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_SENSIBLE_LC :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon averaged leaf to canopy air sensible heat flux','[W/m2]','ipoly') - end if - - if (associated(cgrid%avg_sensible_wc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_sensible_wc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_SENSIBLE_WC :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon averaged wood to canopy air sensible heat flux','[W/m2]','ipoly') - end if - - if (associated(cgrid%avg_qwshed_vg)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_qwshed_vg,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_QWSHED_VG :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon averaged internal energy flux of water shed from vegetation to ground','[W/m2]','ipoly') - end if - - if (associated(cgrid%avg_qintercepted)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_qintercepted,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_QINTERCEPTED :11:hist:anal') - call metadata_edio(nvar,igr,& - 'Polygon averaged internal energy flux of intercepted precipitation by vegetation','[W/m2]','ipoly') - end if - - if (associated(cgrid%avg_qthroughfall)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_qthroughfall,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_QTHROUGHFALL :11:hist:anal') - call metadata_edio(nvar,igr,& - 'Polygon averaged internal energy flux of throughfall precipitation','[W/m2]','ipoly') - end if - - if (associated(cgrid%avg_sensible_gc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_sensible_gc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_SENSIBLE_GC :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon averaged sensible heat flux ground to canopy air','[W/m2]','ipoly') - end if - - if (associated(cgrid%avg_sensible_ac)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_sensible_ac,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_SENSIBLE_AC :11:hist:anal:opti') - call metadata_edio(nvar,igr,'Polygon averaged sensible heat flux atmosphere to canopy','[W/m2]','ipoly') - end if - if (associated(cgrid%avg_runoff_heat)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_runoff_heat,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_RUNOFF_HEAT :11:hist:anal') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - ! --------------------------------------------- - - if (associated(cgrid%avg_gpp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_gpp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_GPP :11:hist:anal:opti') - call metadata_edio(nvar,igr,'Polygon Average GPP','[umol/m2/s]','ipoly') - end if + !------------------------------------------------------------------------------------! + ! First thing we must do is to deallocate the nested dimensions. ! + !------------------------------------------------------------------------------------! + do ipa=1,csite%npatches + call deallocate_patchtype(csite%patch(ipa)) + end do + if (associated(csite%patch)) deallocate(csite%patch) + !------------------------------------------------------------------------------------! - if (associated(cgrid%avg_nppleaf)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_nppleaf,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_NPPLEAF :11:hist:anal:opti') - call metadata_edio(nvar,igr,'Polygon Average NPP leaf','[kgC/m2/day]','ipoly') - end if + if(associated(csite%paco_id )) deallocate(csite%paco_id ) + if(associated(csite%paco_n )) deallocate(csite%paco_n ) + if(associated(csite%patch )) deallocate(csite%patch ) + if(associated(csite%cohort_count )) deallocate(csite%cohort_count ) + if(associated(csite%pname )) deallocate(csite%pname ) + if(associated(csite%area )) deallocate(csite%area ) + if(associated(csite%age )) deallocate(csite%age ) + if(associated(csite%dist_type )) deallocate(csite%dist_type ) + if(associated(csite%fast_soil_C )) deallocate(csite%fast_soil_C ) + if(associated(csite%slow_soil_C )) deallocate(csite%slow_soil_C ) + if(associated(csite%structural_soil_C )) deallocate(csite%structural_soil_C ) + if(associated(csite%structural_soil_L )) deallocate(csite%structural_soil_L ) + if(associated(csite%mineralized_soil_N )) deallocate(csite%mineralized_soil_N ) + if(associated(csite%fast_soil_N )) deallocate(csite%fast_soil_N ) + if(associated(csite%sum_dgd )) deallocate(csite%sum_dgd ) + if(associated(csite%sum_chd )) deallocate(csite%sum_chd ) + if(associated(csite%plantation )) deallocate(csite%plantation ) + if(associated(csite%can_theiv )) deallocate(csite%can_theiv ) + if(associated(csite%can_vpdef )) deallocate(csite%can_vpdef ) + if(associated(csite%can_temp )) deallocate(csite%can_temp ) + if(associated(csite%can_temp_pv )) deallocate(csite%can_temp_pv ) + if(associated(csite%can_shv )) deallocate(csite%can_shv ) + if(associated(csite%can_co2 )) deallocate(csite%can_co2 ) + if(associated(csite%can_rhos )) deallocate(csite%can_rhos ) + if(associated(csite%can_prss )) deallocate(csite%can_prss ) + if(associated(csite%can_theta )) deallocate(csite%can_theta ) + if(associated(csite%can_depth )) deallocate(csite%can_depth ) + if(associated(csite%opencan_frac )) deallocate(csite%opencan_frac ) + if(associated(csite%ggbare )) deallocate(csite%ggbare ) + if(associated(csite%ggveg )) deallocate(csite%ggveg ) + if(associated(csite%ggnet )) deallocate(csite%ggnet ) + if(associated(csite%ggsoil )) deallocate(csite%ggsoil ) + if(associated(csite%nlev_sfcwater )) deallocate(csite%nlev_sfcwater ) + if(associated(csite%sfcwater_mass )) deallocate(csite%sfcwater_mass ) + if(associated(csite%sfcwater_energy )) deallocate(csite%sfcwater_energy ) + if(associated(csite%sfcwater_depth )) deallocate(csite%sfcwater_depth ) + if(associated(csite%sfcwater_tempk )) deallocate(csite%sfcwater_tempk ) + if(associated(csite%sfcwater_fracliq )) deallocate(csite%sfcwater_fracliq ) + if(associated(csite%rshort_s )) deallocate(csite%rshort_s ) + if(associated(csite%rshort_s_beam )) deallocate(csite%rshort_s_beam ) + if(associated(csite%rshort_s_diffuse )) deallocate(csite%rshort_s_diffuse ) + if(associated(csite%par_s )) deallocate(csite%par_s ) + if(associated(csite%par_s_beam )) deallocate(csite%par_s_beam ) + if(associated(csite%par_s_diffuse )) deallocate(csite%par_s_diffuse ) + if(associated(csite%soil_energy )) deallocate(csite%soil_energy ) + if(associated(csite%soil_mstpot )) deallocate(csite%soil_mstpot ) + if(associated(csite%soil_water )) deallocate(csite%soil_water ) + if(associated(csite%soil_tempk )) deallocate(csite%soil_tempk ) + if(associated(csite%soil_fracliq )) deallocate(csite%soil_fracliq ) + if(associated(csite%rootdense )) deallocate(csite%rootdense ) + if(associated(csite%ground_shv )) deallocate(csite%ground_shv ) + if(associated(csite%ground_ssh )) deallocate(csite%ground_ssh ) + if(associated(csite%ground_temp )) deallocate(csite%ground_temp ) + if(associated(csite%ground_fliq )) deallocate(csite%ground_fliq ) + if(associated(csite%rough )) deallocate(csite%rough ) + if(associated(csite%par_l_max )) deallocate(csite%par_l_max ) + if(associated(csite%par_l_beam_max )) deallocate(csite%par_l_beam_max ) + if(associated(csite%par_l_diffuse_max )) deallocate(csite%par_l_diffuse_max ) + if(associated(csite%A_o_max )) deallocate(csite%A_o_max ) + if(associated(csite%A_c_max )) deallocate(csite%A_c_max ) + if(associated(csite%avg_daily_temp )) deallocate(csite%avg_daily_temp ) + if(associated(csite%avg_monthly_gndwater )) deallocate(csite%avg_monthly_gndwater ) + if(associated(csite%avg_monthly_waterdef )) deallocate(csite%avg_monthly_waterdef ) + if(associated(csite%wbudget_loss2atm )) deallocate(csite%wbudget_loss2atm ) + if(associated(csite%wbudget_denseffect )) deallocate(csite%wbudget_denseffect ) + if(associated(csite%wbudget_precipgain )) deallocate(csite%wbudget_precipgain ) + if(associated(csite%wbudget_loss2runoff )) deallocate(csite%wbudget_loss2runoff ) + if(associated(csite%wbudget_loss2drainage )) deallocate(csite%wbudget_loss2drainage ) + if(associated(csite%wbudget_initialstorage)) deallocate(csite%wbudget_initialstorage) + if(associated(csite%wbudget_residual )) deallocate(csite%wbudget_residual ) + if(associated(csite%ebudget_loss2atm )) deallocate(csite%ebudget_loss2atm ) + if(associated(csite%ebudget_denseffect )) deallocate(csite%ebudget_denseffect ) + if(associated(csite%ebudget_prsseffect )) deallocate(csite%ebudget_prsseffect ) + if(associated(csite%ebudget_loss2runoff )) deallocate(csite%ebudget_loss2runoff ) + if(associated(csite%ebudget_loss2drainage )) deallocate(csite%ebudget_loss2drainage ) + if(associated(csite%ebudget_netrad )) deallocate(csite%ebudget_netrad ) + if(associated(csite%ebudget_precipgain )) deallocate(csite%ebudget_precipgain ) + if(associated(csite%ebudget_initialstorage)) deallocate(csite%ebudget_initialstorage) + if(associated(csite%ebudget_residual )) deallocate(csite%ebudget_residual ) + if(associated(csite%co2budget_initialstorage )) & + deallocate(csite%co2budget_initialstorage ) + if(associated(csite%co2budget_residual )) deallocate(csite%co2budget_residual ) + if(associated(csite%co2budget_loss2atm )) deallocate(csite%co2budget_loss2atm ) + if(associated(csite%co2budget_denseffect )) deallocate(csite%co2budget_denseffect ) + if(associated(csite%co2budget_gpp )) deallocate(csite%co2budget_gpp ) + if(associated(csite%co2budget_plresp )) deallocate(csite%co2budget_plresp ) + if(associated(csite%co2budget_rh )) deallocate(csite%co2budget_rh ) + if(associated(csite%today_A_decomp )) deallocate(csite%today_A_decomp ) + if(associated(csite%today_Af_decomp )) deallocate(csite%today_Af_decomp ) + if(associated(csite%repro )) deallocate(csite%repro ) + if(associated(csite%veg_rough )) deallocate(csite%veg_rough ) + if(associated(csite%veg_height )) deallocate(csite%veg_height ) + if(associated(csite%veg_displace )) deallocate(csite%veg_displace ) + if(associated(csite%fsc_in )) deallocate(csite%fsc_in ) + if(associated(csite%ssc_in )) deallocate(csite%ssc_in ) + if(associated(csite%ssl_in )) deallocate(csite%ssl_in ) + if(associated(csite%fsn_in )) deallocate(csite%fsn_in ) + if(associated(csite%total_plant_nitrogen_uptake)) & + deallocate(csite%total_plant_nitrogen_uptake) + if(associated(csite%mineralized_N_loss )) deallocate(csite%mineralized_N_loss ) + if(associated(csite%mineralized_N_input )) deallocate(csite%mineralized_N_input ) + if(associated(csite%rshort_g )) deallocate(csite%rshort_g ) + if(associated(csite%rshort_g_beam )) deallocate(csite%rshort_g_beam ) + if(associated(csite%rshort_g_diffuse )) deallocate(csite%rshort_g_diffuse ) + if(associated(csite%par_g )) deallocate(csite%par_g ) + if(associated(csite%par_g_beam )) deallocate(csite%par_g_beam ) + if(associated(csite%par_g_diffuse )) deallocate(csite%par_g_diffuse ) + if(associated(csite%par_b )) deallocate(csite%par_b ) + if(associated(csite%par_b_beam )) deallocate(csite%par_b_beam ) + if(associated(csite%par_b_diffuse )) deallocate(csite%par_b_diffuse ) + if(associated(csite%nir_b )) deallocate(csite%nir_b ) + if(associated(csite%nir_b_beam )) deallocate(csite%nir_b_beam ) + if(associated(csite%nir_b_diffuse )) deallocate(csite%nir_b_diffuse ) + if(associated(csite%rlong_g )) deallocate(csite%rlong_g ) + if(associated(csite%rlong_g_surf )) deallocate(csite%rlong_g_surf ) + if(associated(csite%rlong_g_incid )) deallocate(csite%rlong_g_incid ) + if(associated(csite%rlong_s )) deallocate(csite%rlong_s ) + if(associated(csite%rlong_s_surf )) deallocate(csite%rlong_s_surf ) + if(associated(csite%rlong_s_incid )) deallocate(csite%rlong_s_incid ) + if(associated(csite%albedo )) deallocate(csite%albedo ) + if(associated(csite%albedo_beam )) deallocate(csite%albedo_beam ) + if(associated(csite%albedo_diffuse )) deallocate(csite%albedo_diffuse ) + if(associated(csite%rlong_albedo )) deallocate(csite%rlong_albedo ) + if(associated(csite%rnet )) deallocate(csite%rnet ) + if(associated(csite%rlongup )) deallocate(csite%rlongup ) + if(associated(csite%parup )) deallocate(csite%parup ) + if(associated(csite%nirup )) deallocate(csite%nirup ) + if(associated(csite%rshortup )) deallocate(csite%rshortup ) + if(associated(csite%total_sfcw_depth )) deallocate(csite%total_sfcw_depth ) + if(associated(csite%snowfac )) deallocate(csite%snowfac ) + if(associated(csite%A_decomp )) deallocate(csite%A_decomp ) + if(associated(csite%f_decomp )) deallocate(csite%f_decomp ) + if(associated(csite%rh )) deallocate(csite%rh ) + if(associated(csite%cwd_rh )) deallocate(csite%cwd_rh ) + if(associated(csite%cumlai_profile )) deallocate(csite%cumlai_profile ) + if(associated(csite%plant_ag_biomass )) deallocate(csite%plant_ag_biomass ) + if(associated(csite%htry )) deallocate(csite%htry ) + if(associated(csite%hprev )) deallocate(csite%hprev ) + if(associated(csite%ustar )) deallocate(csite%ustar ) + if(associated(csite%tstar )) deallocate(csite%tstar ) + if(associated(csite%qstar )) deallocate(csite%qstar ) + if(associated(csite%cstar )) deallocate(csite%cstar ) + if(associated(csite%zeta )) deallocate(csite%zeta ) + if(associated(csite%ribulk )) deallocate(csite%ribulk ) + if(associated(csite%upwp )) deallocate(csite%upwp ) + if(associated(csite%qpwp )) deallocate(csite%qpwp ) + if(associated(csite%cpwp )) deallocate(csite%cpwp ) + if(associated(csite%tpwp )) deallocate(csite%tpwp ) + if(associated(csite%wpwp )) deallocate(csite%wpwp ) + if(associated(csite%watertable )) deallocate(csite%watertable ) + if(associated(csite%moist_dz )) deallocate(csite%moist_dz ) + if(associated(csite%ksat )) deallocate(csite%ksat ) + if(associated(csite%soil_sat_energy )) deallocate(csite%soil_sat_energy ) + if(associated(csite%soil_sat_water )) deallocate(csite%soil_sat_water ) + if(associated(csite%soil_sat_heat )) deallocate(csite%soil_sat_heat ) + if(associated(csite%runoff_A )) deallocate(csite%runoff_A ) + if(associated(csite%runoff_rate )) deallocate(csite%runoff_rate ) + if(associated(csite%runoff )) deallocate(csite%runoff ) + if(associated(csite%qrunoff )) deallocate(csite%qrunoff ) + if(associated(csite%fmean_rh )) deallocate(csite%fmean_rh ) + if(associated(csite%fmean_cwd_rh )) deallocate(csite%fmean_cwd_rh ) + if(associated(csite%fmean_nep )) deallocate(csite%fmean_nep ) + if(associated(csite%fmean_rk4step )) deallocate(csite%fmean_rk4step ) + if(associated(csite%fmean_available_water )) deallocate(csite%fmean_available_water ) + if(associated(csite%fmean_can_theiv )) deallocate(csite%fmean_can_theiv ) + if(associated(csite%fmean_can_theta )) deallocate(csite%fmean_can_theta ) + if(associated(csite%fmean_can_vpdef )) deallocate(csite%fmean_can_vpdef ) + if(associated(csite%fmean_can_temp )) deallocate(csite%fmean_can_temp ) + if(associated(csite%fmean_can_shv )) deallocate(csite%fmean_can_shv ) + if(associated(csite%fmean_can_co2 )) deallocate(csite%fmean_can_co2 ) + if(associated(csite%fmean_can_rhos )) deallocate(csite%fmean_can_rhos ) + if(associated(csite%fmean_can_prss )) deallocate(csite%fmean_can_prss ) + if(associated(csite%fmean_gnd_temp )) deallocate(csite%fmean_gnd_temp ) + if(associated(csite%fmean_gnd_shv )) deallocate(csite%fmean_gnd_shv ) + if(associated(csite%fmean_can_ggnd )) deallocate(csite%fmean_can_ggnd ) + if(associated(csite%fmean_sfcw_depth )) deallocate(csite%fmean_sfcw_depth ) + if(associated(csite%fmean_sfcw_energy )) deallocate(csite%fmean_sfcw_energy ) + if(associated(csite%fmean_sfcw_mass )) deallocate(csite%fmean_sfcw_mass ) + if(associated(csite%fmean_sfcw_temp )) deallocate(csite%fmean_sfcw_temp ) + if(associated(csite%fmean_sfcw_fliq )) deallocate(csite%fmean_sfcw_fliq ) + if(associated(csite%fmean_soil_energy )) deallocate(csite%fmean_soil_energy ) + if(associated(csite%fmean_soil_mstpot )) deallocate(csite%fmean_soil_mstpot ) + if(associated(csite%fmean_soil_water )) deallocate(csite%fmean_soil_water ) + if(associated(csite%fmean_soil_temp )) deallocate(csite%fmean_soil_temp ) + if(associated(csite%fmean_soil_fliq )) deallocate(csite%fmean_soil_fliq ) + if(associated(csite%fmean_rshort_gnd )) deallocate(csite%fmean_rshort_gnd ) + if(associated(csite%fmean_par_gnd )) deallocate(csite%fmean_par_gnd ) + if(associated(csite%fmean_rlong_gnd )) deallocate(csite%fmean_rlong_gnd ) + if(associated(csite%fmean_rlongup )) deallocate(csite%fmean_rlongup ) + if(associated(csite%fmean_parup )) deallocate(csite%fmean_parup ) + if(associated(csite%fmean_nirup )) deallocate(csite%fmean_nirup ) + if(associated(csite%fmean_rshortup )) deallocate(csite%fmean_rshortup ) + if(associated(csite%fmean_rnet )) deallocate(csite%fmean_rnet ) + if(associated(csite%fmean_albedo )) deallocate(csite%fmean_albedo ) + if(associated(csite%fmean_albedo_beam )) deallocate(csite%fmean_albedo_beam ) + if(associated(csite%fmean_albedo_diff )) deallocate(csite%fmean_albedo_diff ) + if(associated(csite%fmean_rlong_albedo )) deallocate(csite%fmean_rlong_albedo ) + if(associated(csite%fmean_ustar )) deallocate(csite%fmean_ustar ) + if(associated(csite%fmean_tstar )) deallocate(csite%fmean_tstar ) + if(associated(csite%fmean_qstar )) deallocate(csite%fmean_qstar ) + if(associated(csite%fmean_cstar )) deallocate(csite%fmean_cstar ) + if(associated(csite%fmean_carbon_ac )) deallocate(csite%fmean_carbon_ac ) + if(associated(csite%fmean_carbon_st )) deallocate(csite%fmean_carbon_st ) + if(associated(csite%fmean_vapor_gc )) deallocate(csite%fmean_vapor_gc ) + if(associated(csite%fmean_vapor_ac )) deallocate(csite%fmean_vapor_ac ) + if(associated(csite%fmean_smoist_gg )) deallocate(csite%fmean_smoist_gg ) + if(associated(csite%fmean_throughfall )) deallocate(csite%fmean_throughfall ) + if(associated(csite%fmean_transloss )) deallocate(csite%fmean_transloss ) + if(associated(csite%fmean_runoff )) deallocate(csite%fmean_runoff ) + if(associated(csite%fmean_drainage )) deallocate(csite%fmean_drainage ) + if(associated(csite%fmean_sensible_gc )) deallocate(csite%fmean_sensible_gc ) + if(associated(csite%fmean_sensible_ac )) deallocate(csite%fmean_sensible_ac ) + if(associated(csite%fmean_sensible_gg )) deallocate(csite%fmean_sensible_gg ) + if(associated(csite%fmean_qthroughfall )) deallocate(csite%fmean_qthroughfall ) + if(associated(csite%fmean_qrunoff )) deallocate(csite%fmean_qrunoff ) + if(associated(csite%fmean_qdrainage )) deallocate(csite%fmean_qdrainage ) + if(associated(csite%dmean_A_decomp )) deallocate(csite%dmean_A_decomp ) + if(associated(csite%dmean_Af_decomp )) deallocate(csite%dmean_Af_decomp ) + if(associated(csite%dmean_co2_residual )) deallocate(csite%dmean_co2_residual ) + if(associated(csite%dmean_energy_residual )) deallocate(csite%dmean_energy_residual ) + if(associated(csite%dmean_water_residual )) deallocate(csite%dmean_water_residual ) + if(associated(csite%dmean_rh )) deallocate(csite%dmean_rh ) + if(associated(csite%dmean_cwd_rh )) deallocate(csite%dmean_cwd_rh ) + if(associated(csite%dmean_nep )) deallocate(csite%dmean_nep ) + if(associated(csite%dmean_rk4step )) deallocate(csite%dmean_rk4step ) + if(associated(csite%dmean_available_water )) deallocate(csite%dmean_available_water ) + if(associated(csite%dmean_can_theiv )) deallocate(csite%dmean_can_theiv ) + if(associated(csite%dmean_can_theta )) deallocate(csite%dmean_can_theta ) + if(associated(csite%dmean_can_vpdef )) deallocate(csite%dmean_can_vpdef ) + if(associated(csite%dmean_can_temp )) deallocate(csite%dmean_can_temp ) + if(associated(csite%dmean_can_shv )) deallocate(csite%dmean_can_shv ) + if(associated(csite%dmean_can_co2 )) deallocate(csite%dmean_can_co2 ) + if(associated(csite%dmean_can_rhos )) deallocate(csite%dmean_can_rhos ) + if(associated(csite%dmean_can_prss )) deallocate(csite%dmean_can_prss ) + if(associated(csite%dmean_gnd_temp )) deallocate(csite%dmean_gnd_temp ) + if(associated(csite%dmean_gnd_shv )) deallocate(csite%dmean_gnd_shv ) + if(associated(csite%dmean_can_ggnd )) deallocate(csite%dmean_can_ggnd ) + if(associated(csite%dmean_sfcw_depth )) deallocate(csite%dmean_sfcw_depth ) + if(associated(csite%dmean_sfcw_energy )) deallocate(csite%dmean_sfcw_energy ) + if(associated(csite%dmean_sfcw_mass )) deallocate(csite%dmean_sfcw_mass ) + if(associated(csite%dmean_sfcw_temp )) deallocate(csite%dmean_sfcw_temp ) + if(associated(csite%dmean_sfcw_fliq )) deallocate(csite%dmean_sfcw_fliq ) + if(associated(csite%dmean_soil_energy )) deallocate(csite%dmean_soil_energy ) + if(associated(csite%dmean_soil_mstpot )) deallocate(csite%dmean_soil_mstpot ) + if(associated(csite%dmean_soil_water )) deallocate(csite%dmean_soil_water ) + if(associated(csite%dmean_soil_temp )) deallocate(csite%dmean_soil_temp ) + if(associated(csite%dmean_soil_fliq )) deallocate(csite%dmean_soil_fliq ) + if(associated(csite%dmean_rshort_gnd )) deallocate(csite%dmean_rshort_gnd ) + if(associated(csite%dmean_par_gnd )) deallocate(csite%dmean_par_gnd ) + if(associated(csite%dmean_rlong_gnd )) deallocate(csite%dmean_rlong_gnd ) + if(associated(csite%dmean_rlongup )) deallocate(csite%dmean_rlongup ) + if(associated(csite%dmean_parup )) deallocate(csite%dmean_parup ) + if(associated(csite%dmean_nirup )) deallocate(csite%dmean_nirup ) + if(associated(csite%dmean_rshortup )) deallocate(csite%dmean_rshortup ) + if(associated(csite%dmean_rnet )) deallocate(csite%dmean_rnet ) + if(associated(csite%dmean_albedo )) deallocate(csite%dmean_albedo ) + if(associated(csite%dmean_albedo_beam )) deallocate(csite%dmean_albedo_beam ) + if(associated(csite%dmean_albedo_diff )) deallocate(csite%dmean_albedo_diff ) + if(associated(csite%dmean_rlong_albedo )) deallocate(csite%dmean_rlong_albedo ) + if(associated(csite%dmean_ustar )) deallocate(csite%dmean_ustar ) + if(associated(csite%dmean_tstar )) deallocate(csite%dmean_tstar ) + if(associated(csite%dmean_qstar )) deallocate(csite%dmean_qstar ) + if(associated(csite%dmean_cstar )) deallocate(csite%dmean_cstar ) + if(associated(csite%dmean_carbon_ac )) deallocate(csite%dmean_carbon_ac ) + if(associated(csite%dmean_carbon_st )) deallocate(csite%dmean_carbon_st ) + if(associated(csite%dmean_vapor_gc )) deallocate(csite%dmean_vapor_gc ) + if(associated(csite%dmean_vapor_ac )) deallocate(csite%dmean_vapor_ac ) + if(associated(csite%dmean_smoist_gg )) deallocate(csite%dmean_smoist_gg ) + if(associated(csite%dmean_throughfall )) deallocate(csite%dmean_throughfall ) + if(associated(csite%dmean_transloss )) deallocate(csite%dmean_transloss ) + if(associated(csite%dmean_runoff )) deallocate(csite%dmean_runoff ) + if(associated(csite%dmean_drainage )) deallocate(csite%dmean_drainage ) + if(associated(csite%dmean_sensible_gc )) deallocate(csite%dmean_sensible_gc ) + if(associated(csite%dmean_sensible_ac )) deallocate(csite%dmean_sensible_ac ) + if(associated(csite%dmean_sensible_gg )) deallocate(csite%dmean_sensible_gg ) + if(associated(csite%dmean_qthroughfall )) deallocate(csite%dmean_qthroughfall ) + if(associated(csite%dmean_qrunoff )) deallocate(csite%dmean_qrunoff ) + if(associated(csite%dmean_qdrainage )) deallocate(csite%dmean_qdrainage ) + if(associated(csite%mmean_fast_soil_c )) deallocate(csite%mmean_fast_soil_c ) + if(associated(csite%mmean_slow_soil_c )) deallocate(csite%mmean_slow_soil_c ) + if(associated(csite%mmean_struct_soil_c )) deallocate(csite%mmean_struct_soil_c ) + if(associated(csite%mmean_struct_soil_l )) deallocate(csite%mmean_struct_soil_l ) + if(associated(csite%mmean_fast_soil_n )) deallocate(csite%mmean_fast_soil_n ) + if(associated(csite%mmean_mineral_soil_n )) deallocate(csite%mmean_mineral_soil_n ) + if(associated(csite%mmean_co2_residual )) deallocate(csite%mmean_co2_residual ) + if(associated(csite%mmean_energy_residual )) deallocate(csite%mmean_energy_residual ) + if(associated(csite%mmean_water_residual )) deallocate(csite%mmean_water_residual ) + if(associated(csite%mmean_rh )) deallocate(csite%mmean_rh ) + if(associated(csite%mmean_cwd_rh )) deallocate(csite%mmean_cwd_rh ) + if(associated(csite%mmean_nep )) deallocate(csite%mmean_nep ) + if(associated(csite%mmean_A_decomp )) deallocate(csite%mmean_A_decomp ) + if(associated(csite%mmean_Af_decomp )) deallocate(csite%mmean_Af_decomp ) + if(associated(csite%mmean_rk4step )) deallocate(csite%mmean_rk4step ) + if(associated(csite%mmean_available_water )) deallocate(csite%mmean_available_water ) + if(associated(csite%mmean_can_theiv )) deallocate(csite%mmean_can_theiv ) + if(associated(csite%mmean_can_theta )) deallocate(csite%mmean_can_theta ) + if(associated(csite%mmean_can_vpdef )) deallocate(csite%mmean_can_vpdef ) + if(associated(csite%mmean_can_temp )) deallocate(csite%mmean_can_temp ) + if(associated(csite%mmean_can_shv )) deallocate(csite%mmean_can_shv ) + if(associated(csite%mmean_can_co2 )) deallocate(csite%mmean_can_co2 ) + if(associated(csite%mmean_can_rhos )) deallocate(csite%mmean_can_rhos ) + if(associated(csite%mmean_can_prss )) deallocate(csite%mmean_can_prss ) + if(associated(csite%mmean_gnd_temp )) deallocate(csite%mmean_gnd_temp ) + if(associated(csite%mmean_gnd_shv )) deallocate(csite%mmean_gnd_shv ) + if(associated(csite%mmean_can_ggnd )) deallocate(csite%mmean_can_ggnd ) + if(associated(csite%mmean_sfcw_depth )) deallocate(csite%mmean_sfcw_depth ) + if(associated(csite%mmean_sfcw_energy )) deallocate(csite%mmean_sfcw_energy ) + if(associated(csite%mmean_sfcw_mass )) deallocate(csite%mmean_sfcw_mass ) + if(associated(csite%mmean_sfcw_temp )) deallocate(csite%mmean_sfcw_temp ) + if(associated(csite%mmean_sfcw_fliq )) deallocate(csite%mmean_sfcw_fliq ) + if(associated(csite%mmean_soil_energy )) deallocate(csite%mmean_soil_energy ) + if(associated(csite%mmean_soil_mstpot )) deallocate(csite%mmean_soil_mstpot ) + if(associated(csite%mmean_soil_water )) deallocate(csite%mmean_soil_water ) + if(associated(csite%mmean_soil_temp )) deallocate(csite%mmean_soil_temp ) + if(associated(csite%mmean_soil_fliq )) deallocate(csite%mmean_soil_fliq ) + if(associated(csite%mmean_rshort_gnd )) deallocate(csite%mmean_rshort_gnd ) + if(associated(csite%mmean_par_gnd )) deallocate(csite%mmean_par_gnd ) + if(associated(csite%mmean_rlong_gnd )) deallocate(csite%mmean_rlong_gnd ) + if(associated(csite%mmean_rlongup )) deallocate(csite%mmean_rlongup ) + if(associated(csite%mmean_parup )) deallocate(csite%mmean_parup ) + if(associated(csite%mmean_nirup )) deallocate(csite%mmean_nirup ) + if(associated(csite%mmean_rshortup )) deallocate(csite%mmean_rshortup ) + if(associated(csite%mmean_rnet )) deallocate(csite%mmean_rnet ) + if(associated(csite%mmean_albedo )) deallocate(csite%mmean_albedo ) + if(associated(csite%mmean_albedo_beam )) deallocate(csite%mmean_albedo_beam ) + if(associated(csite%mmean_albedo_diff )) deallocate(csite%mmean_albedo_diff ) + if(associated(csite%mmean_rlong_albedo )) deallocate(csite%mmean_rlong_albedo ) + if(associated(csite%mmean_ustar )) deallocate(csite%mmean_ustar ) + if(associated(csite%mmean_tstar )) deallocate(csite%mmean_tstar ) + if(associated(csite%mmean_qstar )) deallocate(csite%mmean_qstar ) + if(associated(csite%mmean_cstar )) deallocate(csite%mmean_cstar ) + if(associated(csite%mmean_carbon_ac )) deallocate(csite%mmean_carbon_ac ) + if(associated(csite%mmean_carbon_st )) deallocate(csite%mmean_carbon_st ) + if(associated(csite%mmean_vapor_gc )) deallocate(csite%mmean_vapor_gc ) + if(associated(csite%mmean_vapor_ac )) deallocate(csite%mmean_vapor_ac ) + if(associated(csite%mmean_smoist_gg )) deallocate(csite%mmean_smoist_gg ) + if(associated(csite%mmean_throughfall )) deallocate(csite%mmean_throughfall ) + if(associated(csite%mmean_transloss )) deallocate(csite%mmean_transloss ) + if(associated(csite%mmean_runoff )) deallocate(csite%mmean_runoff ) + if(associated(csite%mmean_drainage )) deallocate(csite%mmean_drainage ) + if(associated(csite%mmean_sensible_gc )) deallocate(csite%mmean_sensible_gc ) + if(associated(csite%mmean_sensible_ac )) deallocate(csite%mmean_sensible_ac ) + if(associated(csite%mmean_sensible_gg )) deallocate(csite%mmean_sensible_gg ) + if(associated(csite%mmean_qthroughfall )) deallocate(csite%mmean_qthroughfall ) + if(associated(csite%mmean_qrunoff )) deallocate(csite%mmean_qrunoff ) + if(associated(csite%mmean_qdrainage )) deallocate(csite%mmean_qdrainage ) + if(associated(csite%mmean_A_decomp )) deallocate(csite%mmean_A_decomp ) + if(associated(csite%mmean_Af_decomp )) deallocate(csite%mmean_Af_decomp ) + if(associated(csite%mmean_co2_residual )) deallocate(csite%mmean_co2_residual ) + if(associated(csite%mmean_energy_residual )) deallocate(csite%mmean_energy_residual ) + if(associated(csite%mmean_water_residual )) deallocate(csite%mmean_water_residual ) + if(associated(csite%mmsqu_rh )) deallocate(csite%mmsqu_rh ) + if(associated(csite%mmsqu_cwd_rh )) deallocate(csite%mmsqu_cwd_rh ) + if(associated(csite%mmsqu_nep )) deallocate(csite%mmsqu_nep ) + if(associated(csite%mmsqu_rlongup )) deallocate(csite%mmsqu_rlongup ) + if(associated(csite%mmsqu_parup )) deallocate(csite%mmsqu_parup ) + if(associated(csite%mmsqu_nirup )) deallocate(csite%mmsqu_nirup ) + if(associated(csite%mmsqu_rshortup )) deallocate(csite%mmsqu_rshortup ) + if(associated(csite%mmsqu_rnet )) deallocate(csite%mmsqu_rnet ) + if(associated(csite%mmsqu_albedo )) deallocate(csite%mmsqu_albedo ) + if(associated(csite%mmsqu_ustar )) deallocate(csite%mmsqu_ustar ) + if(associated(csite%mmsqu_carbon_ac )) deallocate(csite%mmsqu_carbon_ac ) + if(associated(csite%mmsqu_carbon_st )) deallocate(csite%mmsqu_carbon_st ) + if(associated(csite%mmsqu_vapor_gc )) deallocate(csite%mmsqu_vapor_gc ) + if(associated(csite%mmsqu_vapor_ac )) deallocate(csite%mmsqu_vapor_ac ) + if(associated(csite%mmsqu_sensible_gc )) deallocate(csite%mmsqu_sensible_gc ) + if(associated(csite%mmsqu_sensible_ac )) deallocate(csite%mmsqu_sensible_ac ) + if(associated(csite%qmean_rh )) deallocate(csite%qmean_rh ) + if(associated(csite%qmean_cwd_rh )) deallocate(csite%qmean_cwd_rh ) + if(associated(csite%qmean_nep )) deallocate(csite%qmean_nep ) + if(associated(csite%qmean_rk4step )) deallocate(csite%qmean_rk4step ) + if(associated(csite%qmean_available_water )) deallocate(csite%qmean_available_water ) + if(associated(csite%qmean_can_theiv )) deallocate(csite%qmean_can_theiv ) + if(associated(csite%qmean_can_theta )) deallocate(csite%qmean_can_theta ) + if(associated(csite%qmean_can_vpdef )) deallocate(csite%qmean_can_vpdef ) + if(associated(csite%qmean_can_temp )) deallocate(csite%qmean_can_temp ) + if(associated(csite%qmean_can_shv )) deallocate(csite%qmean_can_shv ) + if(associated(csite%qmean_can_co2 )) deallocate(csite%qmean_can_co2 ) + if(associated(csite%qmean_can_rhos )) deallocate(csite%qmean_can_rhos ) + if(associated(csite%qmean_can_prss )) deallocate(csite%qmean_can_prss ) + if(associated(csite%qmean_gnd_temp )) deallocate(csite%qmean_gnd_temp ) + if(associated(csite%qmean_gnd_shv )) deallocate(csite%qmean_gnd_shv ) + if(associated(csite%qmean_can_ggnd )) deallocate(csite%qmean_can_ggnd ) + if(associated(csite%qmean_sfcw_depth )) deallocate(csite%qmean_sfcw_depth ) + if(associated(csite%qmean_sfcw_energy )) deallocate(csite%qmean_sfcw_energy ) + if(associated(csite%qmean_sfcw_mass )) deallocate(csite%qmean_sfcw_mass ) + if(associated(csite%qmean_sfcw_temp )) deallocate(csite%qmean_sfcw_temp ) + if(associated(csite%qmean_sfcw_fliq )) deallocate(csite%qmean_sfcw_fliq ) + if(associated(csite%qmean_soil_energy )) deallocate(csite%qmean_soil_energy ) + if(associated(csite%qmean_soil_mstpot )) deallocate(csite%qmean_soil_mstpot ) + if(associated(csite%qmean_soil_water )) deallocate(csite%qmean_soil_water ) + if(associated(csite%qmean_soil_temp )) deallocate(csite%qmean_soil_temp ) + if(associated(csite%qmean_soil_fliq )) deallocate(csite%qmean_soil_fliq ) + if(associated(csite%qmean_rshort_gnd )) deallocate(csite%qmean_rshort_gnd ) + if(associated(csite%qmean_par_gnd )) deallocate(csite%qmean_par_gnd ) + if(associated(csite%qmean_rlong_gnd )) deallocate(csite%qmean_rlong_gnd ) + if(associated(csite%qmean_rlongup )) deallocate(csite%qmean_rlongup ) + if(associated(csite%qmean_parup )) deallocate(csite%qmean_parup ) + if(associated(csite%qmean_nirup )) deallocate(csite%qmean_nirup ) + if(associated(csite%qmean_rshortup )) deallocate(csite%qmean_rshortup ) + if(associated(csite%qmean_rnet )) deallocate(csite%qmean_rnet ) + if(associated(csite%qmean_albedo )) deallocate(csite%qmean_albedo ) + if(associated(csite%qmean_albedo_beam )) deallocate(csite%qmean_albedo_beam ) + if(associated(csite%qmean_albedo_diff )) deallocate(csite%qmean_albedo_diff ) + if(associated(csite%qmean_rlong_albedo )) deallocate(csite%qmean_rlong_albedo ) + if(associated(csite%qmean_ustar )) deallocate(csite%qmean_ustar ) + if(associated(csite%qmean_tstar )) deallocate(csite%qmean_tstar ) + if(associated(csite%qmean_qstar )) deallocate(csite%qmean_qstar ) + if(associated(csite%qmean_cstar )) deallocate(csite%qmean_cstar ) + if(associated(csite%qmean_carbon_ac )) deallocate(csite%qmean_carbon_ac ) + if(associated(csite%qmean_carbon_st )) deallocate(csite%qmean_carbon_st ) + if(associated(csite%qmean_vapor_gc )) deallocate(csite%qmean_vapor_gc ) + if(associated(csite%qmean_vapor_ac )) deallocate(csite%qmean_vapor_ac ) + if(associated(csite%qmean_smoist_gg )) deallocate(csite%qmean_smoist_gg ) + if(associated(csite%qmean_throughfall )) deallocate(csite%qmean_throughfall ) + if(associated(csite%qmean_transloss )) deallocate(csite%qmean_transloss ) + if(associated(csite%qmean_runoff )) deallocate(csite%qmean_runoff ) + if(associated(csite%qmean_drainage )) deallocate(csite%qmean_drainage ) + if(associated(csite%qmean_sensible_gc )) deallocate(csite%qmean_sensible_gc ) + if(associated(csite%qmean_sensible_ac )) deallocate(csite%qmean_sensible_ac ) + if(associated(csite%qmean_sensible_gg )) deallocate(csite%qmean_sensible_gg ) + if(associated(csite%qmean_qthroughfall )) deallocate(csite%qmean_qthroughfall ) + if(associated(csite%qmean_qrunoff )) deallocate(csite%qmean_qrunoff ) + if(associated(csite%qmean_qdrainage )) deallocate(csite%qmean_qdrainage ) + if(associated(csite%qmsqu_rh )) deallocate(csite%qmsqu_rh ) + if(associated(csite%qmsqu_cwd_rh )) deallocate(csite%qmsqu_cwd_rh ) + if(associated(csite%qmsqu_nep )) deallocate(csite%qmsqu_nep ) + if(associated(csite%qmsqu_rlongup )) deallocate(csite%qmsqu_rlongup ) + if(associated(csite%qmsqu_parup )) deallocate(csite%qmsqu_parup ) + if(associated(csite%qmsqu_nirup )) deallocate(csite%qmsqu_nirup ) + if(associated(csite%qmsqu_rshortup )) deallocate(csite%qmsqu_rshortup ) + if(associated(csite%qmsqu_rnet )) deallocate(csite%qmsqu_rnet ) + if(associated(csite%qmsqu_albedo )) deallocate(csite%qmsqu_albedo ) + if(associated(csite%qmsqu_ustar )) deallocate(csite%qmsqu_ustar ) + if(associated(csite%qmsqu_carbon_ac )) deallocate(csite%qmsqu_carbon_ac ) + if(associated(csite%qmsqu_carbon_st )) deallocate(csite%qmsqu_carbon_st ) + if(associated(csite%qmsqu_vapor_gc )) deallocate(csite%qmsqu_vapor_gc ) + if(associated(csite%qmsqu_vapor_ac )) deallocate(csite%qmsqu_vapor_ac ) + if(associated(csite%qmsqu_sensible_gc )) deallocate(csite%qmsqu_sensible_gc ) + if(associated(csite%qmsqu_sensible_ac )) deallocate(csite%qmsqu_sensible_ac ) - if (associated(cgrid%avg_nppfroot)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_nppfroot,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_NPPFROOT :11:hist:anal:opti') - call metadata_edio(nvar,igr,'Polygon Average NPP froot','[kgC/m2/day]','ipoly') - end if - - if (associated(cgrid%avg_nppsapwood)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_nppsapwood,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_NPPSAPWOOD :11:hist:anal:opti') - call metadata_edio(nvar,igr,'Polygon Average NPP sapwood','[kgC/m2/day]','ipoly') - end if - - if (associated(cgrid%avg_nppcroot)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_nppcroot,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_NPPCROOT :11:hist:anal:opti') - call metadata_edio(nvar,igr,'Polygon Average NPP croot','[kgC/m2/day]','ipoly') - end if + return + end subroutine deallocate_sitetype + !=======================================================================================! + !=======================================================================================! - if (associated(cgrid%avg_nppseeds)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_nppseeds,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_NPPSEEDS :11:hist:anal:opti') - call metadata_edio(nvar,igr,'Polygon Average NPP seeds','[kgC/m2/day]','ipoly') - end if - if (associated(cgrid%avg_nppwood)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_nppwood,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_NPPWOOD :11:hist:anal:opti') - call metadata_edio(nvar,igr,'Polygon Average NPP wood','[kgC/m2/day]','ipoly') - end if - - if (associated(cgrid%avg_nppdaily)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_nppdaily,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_NPPDAILY :11:hist:anal:opti') - call metadata_edio(nvar,igr,'Polygon Average NPP daily','[kgC/m2/day]','ipoly') - end if - if (associated(cgrid%lai)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%lai,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'LAI :11:hist:anal:dail') - call metadata_edio(nvar,igr,'Polygon LAI','[m2/m2]','ipoly') - end if - if (associated(cgrid%avg_lma)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_lma,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_LMA :11:hist:dail') - call metadata_edio(nvar,igr,'Polygon LMA','[NA]','ipoly') - end if + !=======================================================================================! + !=======================================================================================! + ! This sub-routine de-allocates all patch pointers. ! + !---------------------------------------------------------------------------------------! + subroutine deallocate_patchtype(cpatch) - if (associated(cgrid%wai)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%wai,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'WAI :11:hist:anal:dail') - call metadata_edio(nvar,igr,'Polygon wood area index','[m2/m2]','ipoly') - end if + implicit none - if (associated(cgrid%avg_leaf_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_leaf_resp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_LEAF_RESP :11:hist:anal:opti') - call metadata_edio(nvar,igr,'Polygon Average Leaf Respiration','[umol/m2/s]','ipoly') - end if + !----- Arguments. -------------------------------------------------------------------! + type(patchtype) , target :: cpatch + !----- Local variables. -------------------------------------------------------------! + !------------------------------------------------------------------------------------! + + if (cpatch%ncohorts == 0) return - if (associated(cgrid%avg_root_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_root_resp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_ROOT_RESP :11:hist:anal:opti') - call metadata_edio(nvar,igr,'Polygon Average Root Respiration','[umol/m2/s]','ipoly') - end if + if(associated(cpatch%pft )) deallocate(cpatch%pft ) + if(associated(cpatch%nplant )) deallocate(cpatch%nplant ) + if(associated(cpatch%phenology_status )) deallocate(cpatch%phenology_status ) + if(associated(cpatch%recruit_dbh )) deallocate(cpatch%recruit_dbh ) + if(associated(cpatch%census_status )) deallocate(cpatch%census_status ) + if(associated(cpatch%hite )) deallocate(cpatch%hite ) + if(associated(cpatch%agb )) deallocate(cpatch%agb ) + if(associated(cpatch%basarea )) deallocate(cpatch%basarea ) + if(associated(cpatch%dagb_dt )) deallocate(cpatch%dagb_dt ) + if(associated(cpatch%dlnagb_dt )) deallocate(cpatch%dlnagb_dt ) + if(associated(cpatch%dba_dt )) deallocate(cpatch%dba_dt ) + if(associated(cpatch%dlnba_dt )) deallocate(cpatch%dlnba_dt ) + if(associated(cpatch%ddbh_dt )) deallocate(cpatch%ddbh_dt ) + if(associated(cpatch%dlndbh_dt )) deallocate(cpatch%dlndbh_dt ) + if(associated(cpatch%dbh )) deallocate(cpatch%dbh ) + if(associated(cpatch%bdead )) deallocate(cpatch%bdead ) + if(associated(cpatch%bleaf )) deallocate(cpatch%bleaf ) + if(associated(cpatch%balive )) deallocate(cpatch%balive ) + if(associated(cpatch%broot )) deallocate(cpatch%broot ) + if(associated(cpatch%bsapwooda )) deallocate(cpatch%bsapwooda ) + if(associated(cpatch%bsapwoodb )) deallocate(cpatch%bsapwoodb ) + if(associated(cpatch%bstorage )) deallocate(cpatch%bstorage ) + if(associated(cpatch%bseeds )) deallocate(cpatch%bseeds ) + if(associated(cpatch%lai )) deallocate(cpatch%lai ) + if(associated(cpatch%wai )) deallocate(cpatch%wai ) + if(associated(cpatch%crown_area )) deallocate(cpatch%crown_area ) + if(associated(cpatch%leaf_resolvable )) deallocate(cpatch%leaf_resolvable ) + if(associated(cpatch%wood_resolvable )) deallocate(cpatch%wood_resolvable ) + if(associated(cpatch%cb )) deallocate(cpatch%cb ) + if(associated(cpatch%cb_lightmax )) deallocate(cpatch%cb_lightmax ) + if(associated(cpatch%cb_moistmax )) deallocate(cpatch%cb_moistmax ) + if(associated(cpatch%cbr_bar )) deallocate(cpatch%cbr_bar ) + if(associated(cpatch%leaf_energy )) deallocate(cpatch%leaf_energy ) + if(associated(cpatch%leaf_temp )) deallocate(cpatch%leaf_temp ) + if(associated(cpatch%leaf_vpdef )) deallocate(cpatch%leaf_vpdef ) + if(associated(cpatch%leaf_temp_pv )) deallocate(cpatch%leaf_temp_pv ) + if(associated(cpatch%leaf_hcap )) deallocate(cpatch%leaf_hcap ) + if(associated(cpatch%leaf_fliq )) deallocate(cpatch%leaf_fliq ) + if(associated(cpatch%leaf_water )) deallocate(cpatch%leaf_water ) + if(associated(cpatch%wood_energy )) deallocate(cpatch%wood_energy ) + if(associated(cpatch%wood_temp )) deallocate(cpatch%wood_temp ) + if(associated(cpatch%wood_temp_pv )) deallocate(cpatch%wood_temp_pv ) + if(associated(cpatch%wood_hcap )) deallocate(cpatch%wood_hcap ) + if(associated(cpatch%wood_fliq )) deallocate(cpatch%wood_fliq ) + if(associated(cpatch%wood_water )) deallocate(cpatch%wood_water ) + if(associated(cpatch%veg_wind )) deallocate(cpatch%veg_wind ) + if(associated(cpatch%lsfc_shv_open )) deallocate(cpatch%lsfc_shv_open ) + if(associated(cpatch%lsfc_shv_closed )) deallocate(cpatch%lsfc_shv_closed ) + if(associated(cpatch%lsfc_co2_open )) deallocate(cpatch%lsfc_co2_open ) + if(associated(cpatch%lsfc_co2_closed )) deallocate(cpatch%lsfc_co2_closed ) + if(associated(cpatch%lint_shv )) deallocate(cpatch%lint_shv ) + if(associated(cpatch%lint_co2_open )) deallocate(cpatch%lint_co2_open ) + if(associated(cpatch%lint_co2_closed )) deallocate(cpatch%lint_co2_closed ) + if(associated(cpatch%today_leaf_resp )) deallocate(cpatch%today_leaf_resp ) + if(associated(cpatch%today_root_resp )) deallocate(cpatch%today_root_resp ) + if(associated(cpatch%today_gpp )) deallocate(cpatch%today_gpp ) + if(associated(cpatch%today_gpp_pot )) deallocate(cpatch%today_gpp_pot ) + if(associated(cpatch%today_gpp_lightmax )) deallocate(cpatch%today_gpp_lightmax ) + if(associated(cpatch%today_gpp_moistmax )) deallocate(cpatch%today_gpp_moistmax ) + if(associated(cpatch%today_nppleaf )) deallocate(cpatch%today_nppleaf ) + if(associated(cpatch%today_nppfroot )) deallocate(cpatch%today_nppfroot ) + if(associated(cpatch%today_nppsapwood )) deallocate(cpatch%today_nppsapwood ) + if(associated(cpatch%today_nppcroot )) deallocate(cpatch%today_nppcroot ) + if(associated(cpatch%today_nppseeds )) deallocate(cpatch%today_nppseeds ) + if(associated(cpatch%today_nppwood )) deallocate(cpatch%today_nppwood ) + if(associated(cpatch%today_nppdaily )) deallocate(cpatch%today_nppdaily ) + if(associated(cpatch%growth_respiration )) deallocate(cpatch%growth_respiration ) + if(associated(cpatch%storage_respiration )) deallocate(cpatch%storage_respiration ) + if(associated(cpatch%vleaf_respiration )) deallocate(cpatch%vleaf_respiration ) + if(associated(cpatch%monthly_dndt )) deallocate(cpatch%monthly_dndt ) + if(associated(cpatch%monthly_dlnndt )) deallocate(cpatch%monthly_dlnndt ) + if(associated(cpatch%mort_rate )) deallocate(cpatch%mort_rate ) + if(associated(cpatch%krdepth )) deallocate(cpatch%krdepth ) + if(associated(cpatch%first_census )) deallocate(cpatch%first_census ) + if(associated(cpatch%new_recruit_flag )) deallocate(cpatch%new_recruit_flag ) + if(associated(cpatch%light_level )) deallocate(cpatch%light_level ) + if(associated(cpatch%light_level_beam )) deallocate(cpatch%light_level_beam ) + if(associated(cpatch%light_level_diff )) deallocate(cpatch%light_level_diff ) + if(associated(cpatch%par_l )) deallocate(cpatch%par_l ) + if(associated(cpatch%par_l_beam )) deallocate(cpatch%par_l_beam ) + if(associated(cpatch%par_l_diffuse )) deallocate(cpatch%par_l_diffuse ) + if(associated(cpatch%rshort_l )) deallocate(cpatch%rshort_l ) + if(associated(cpatch%rshort_l_beam )) deallocate(cpatch%rshort_l_beam ) + if(associated(cpatch%rshort_l_diffuse )) deallocate(cpatch%rshort_l_diffuse ) + if(associated(cpatch%rlong_l )) deallocate(cpatch%rlong_l ) + if(associated(cpatch%rlong_l_surf )) deallocate(cpatch%rlong_l_surf ) + if(associated(cpatch%rlong_l_incid )) deallocate(cpatch%rlong_l_incid ) + if(associated(cpatch%rshort_w )) deallocate(cpatch%rshort_w ) + if(associated(cpatch%rshort_w_beam )) deallocate(cpatch%rshort_w_beam ) + if(associated(cpatch%rshort_w_diffuse )) deallocate(cpatch%rshort_w_diffuse ) + if(associated(cpatch%rlong_w )) deallocate(cpatch%rlong_w ) + if(associated(cpatch%rlong_w_surf )) deallocate(cpatch%rlong_w_surf ) + if(associated(cpatch%rlong_w_incid )) deallocate(cpatch%rlong_w_incid ) + if(associated(cpatch%leaf_gbh )) deallocate(cpatch%leaf_gbh ) + if(associated(cpatch%leaf_gbw )) deallocate(cpatch%leaf_gbw ) + if(associated(cpatch%wood_gbh )) deallocate(cpatch%wood_gbh ) + if(associated(cpatch%wood_gbw )) deallocate(cpatch%wood_gbw ) + if(associated(cpatch%A_open )) deallocate(cpatch%A_open ) + if(associated(cpatch%A_closed )) deallocate(cpatch%A_closed ) + if(associated(cpatch%psi_open )) deallocate(cpatch%psi_open ) + if(associated(cpatch%psi_closed )) deallocate(cpatch%psi_closed ) + if(associated(cpatch%gsw_open )) deallocate(cpatch%gsw_open ) + if(associated(cpatch%gsw_closed )) deallocate(cpatch%gsw_closed ) + if(associated(cpatch%leaf_gsw )) deallocate(cpatch%leaf_gsw ) + if(associated(cpatch%fsw )) deallocate(cpatch%fsw ) + if(associated(cpatch%fsn )) deallocate(cpatch%fsn ) + if(associated(cpatch%fs_open )) deallocate(cpatch%fs_open ) + if(associated(cpatch%water_supply )) deallocate(cpatch%water_supply ) + if(associated(cpatch%leaf_maintenance )) deallocate(cpatch%leaf_maintenance ) + if(associated(cpatch%root_maintenance )) deallocate(cpatch%root_maintenance ) + if(associated(cpatch%leaf_drop )) deallocate(cpatch%leaf_drop ) + if(associated(cpatch%leaf_respiration )) deallocate(cpatch%leaf_respiration ) + if(associated(cpatch%root_respiration )) deallocate(cpatch%root_respiration ) + if(associated(cpatch%gpp )) deallocate(cpatch%gpp ) + if(associated(cpatch%paw_avg )) deallocate(cpatch%paw_avg ) + if(associated(cpatch%elongf )) deallocate(cpatch%elongf ) + if(associated(cpatch%turnover_amp )) deallocate(cpatch%turnover_amp ) + if(associated(cpatch%llspan )) deallocate(cpatch%llspan ) + if(associated(cpatch%vm_bar )) deallocate(cpatch%vm_bar ) + if(associated(cpatch%sla )) deallocate(cpatch%sla ) + if(associated(cpatch%fmean_gpp )) deallocate(cpatch%fmean_gpp ) + if(associated(cpatch%fmean_npp )) deallocate(cpatch%fmean_npp ) + if(associated(cpatch%fmean_leaf_resp )) deallocate(cpatch%fmean_leaf_resp ) + if(associated(cpatch%fmean_root_resp )) deallocate(cpatch%fmean_root_resp ) + if(associated(cpatch%fmean_growth_resp )) deallocate(cpatch%fmean_growth_resp ) + if(associated(cpatch%fmean_storage_resp )) deallocate(cpatch%fmean_storage_resp ) + if(associated(cpatch%fmean_vleaf_resp )) deallocate(cpatch%fmean_vleaf_resp ) + if(associated(cpatch%fmean_plresp )) deallocate(cpatch%fmean_plresp ) + if(associated(cpatch%fmean_leaf_energy )) deallocate(cpatch%fmean_leaf_energy ) + if(associated(cpatch%fmean_leaf_water )) deallocate(cpatch%fmean_leaf_water ) + if(associated(cpatch%fmean_leaf_hcap )) deallocate(cpatch%fmean_leaf_hcap ) + if(associated(cpatch%fmean_leaf_vpdef )) deallocate(cpatch%fmean_leaf_vpdef ) + if(associated(cpatch%fmean_leaf_temp )) deallocate(cpatch%fmean_leaf_temp ) + if(associated(cpatch%fmean_leaf_fliq )) deallocate(cpatch%fmean_leaf_fliq ) + if(associated(cpatch%fmean_leaf_gsw )) deallocate(cpatch%fmean_leaf_gsw ) + if(associated(cpatch%fmean_leaf_gbw )) deallocate(cpatch%fmean_leaf_gbw ) + if(associated(cpatch%fmean_wood_energy )) deallocate(cpatch%fmean_wood_energy ) + if(associated(cpatch%fmean_wood_water )) deallocate(cpatch%fmean_wood_water ) + if(associated(cpatch%fmean_wood_hcap )) deallocate(cpatch%fmean_wood_hcap ) + if(associated(cpatch%fmean_wood_temp )) deallocate(cpatch%fmean_wood_temp ) + if(associated(cpatch%fmean_wood_fliq )) deallocate(cpatch%fmean_wood_fliq ) + if(associated(cpatch%fmean_wood_gbw )) deallocate(cpatch%fmean_wood_gbw ) + if(associated(cpatch%fmean_fs_open )) deallocate(cpatch%fmean_fs_open ) + if(associated(cpatch%fmean_fsw )) deallocate(cpatch%fmean_fsw ) + if(associated(cpatch%fmean_fsn )) deallocate(cpatch%fmean_fsn ) + if(associated(cpatch%fmean_psi_open )) deallocate(cpatch%fmean_psi_open ) + if(associated(cpatch%fmean_psi_closed )) deallocate(cpatch%fmean_psi_closed ) + if(associated(cpatch%fmean_water_supply )) deallocate(cpatch%fmean_water_supply ) + if(associated(cpatch%fmean_light_level )) deallocate(cpatch%fmean_light_level ) + if(associated(cpatch%fmean_light_level_beam)) & + deallocate(cpatch%fmean_light_level_beam) + if(associated(cpatch%fmean_light_level_diff)) & + deallocate(cpatch%fmean_light_level_diff) + if(associated(cpatch%fmean_par_l )) deallocate(cpatch%fmean_par_l ) + if(associated(cpatch%fmean_par_l_beam )) deallocate(cpatch%fmean_par_l_beam ) + if(associated(cpatch%fmean_par_l_diff )) deallocate(cpatch%fmean_par_l_diff ) + if(associated(cpatch%fmean_rshort_l )) deallocate(cpatch%fmean_rshort_l ) + if(associated(cpatch%fmean_rlong_l )) deallocate(cpatch%fmean_rlong_l ) + if(associated(cpatch%fmean_sensible_lc )) deallocate(cpatch%fmean_sensible_lc ) + if(associated(cpatch%fmean_vapor_lc )) deallocate(cpatch%fmean_vapor_lc ) + if(associated(cpatch%fmean_transp )) deallocate(cpatch%fmean_transp ) + if(associated(cpatch%fmean_intercepted_al)) deallocate(cpatch%fmean_intercepted_al) + if(associated(cpatch%fmean_wshed_lg )) deallocate(cpatch%fmean_wshed_lg ) + if(associated(cpatch%fmean_rshort_w )) deallocate(cpatch%fmean_rshort_w ) + if(associated(cpatch%fmean_rlong_w )) deallocate(cpatch%fmean_rlong_w ) + if(associated(cpatch%fmean_sensible_wc )) deallocate(cpatch%fmean_sensible_wc ) + if(associated(cpatch%fmean_vapor_wc )) deallocate(cpatch%fmean_vapor_wc ) + if(associated(cpatch%fmean_intercepted_aw)) deallocate(cpatch%fmean_intercepted_aw) + if(associated(cpatch%fmean_wshed_wg )) deallocate(cpatch%fmean_wshed_wg ) + if(associated(cpatch%dmean_nppleaf )) deallocate(cpatch%dmean_nppleaf ) + if(associated(cpatch%dmean_nppfroot )) deallocate(cpatch%dmean_nppfroot ) + if(associated(cpatch%dmean_nppsapwood )) deallocate(cpatch%dmean_nppsapwood ) + if(associated(cpatch%dmean_nppcroot )) deallocate(cpatch%dmean_nppcroot ) + if(associated(cpatch%dmean_nppseeds )) deallocate(cpatch%dmean_nppseeds ) + if(associated(cpatch%dmean_nppwood )) deallocate(cpatch%dmean_nppwood ) + if(associated(cpatch%dmean_nppdaily )) deallocate(cpatch%dmean_nppdaily ) + if(associated(cpatch%dmean_gpp )) deallocate(cpatch%dmean_gpp ) + if(associated(cpatch%dmean_npp )) deallocate(cpatch%dmean_npp ) + if(associated(cpatch%dmean_leaf_resp )) deallocate(cpatch%dmean_leaf_resp ) + if(associated(cpatch%dmean_root_resp )) deallocate(cpatch%dmean_root_resp ) + if(associated(cpatch%dmean_growth_resp )) deallocate(cpatch%dmean_growth_resp ) + if(associated(cpatch%dmean_storage_resp )) deallocate(cpatch%dmean_storage_resp ) + if(associated(cpatch%dmean_vleaf_resp )) deallocate(cpatch%dmean_vleaf_resp ) + if(associated(cpatch%dmean_plresp )) deallocate(cpatch%dmean_plresp ) + if(associated(cpatch%dmean_leaf_energy )) deallocate(cpatch%dmean_leaf_energy ) + if(associated(cpatch%dmean_leaf_water )) deallocate(cpatch%dmean_leaf_water ) + if(associated(cpatch%dmean_leaf_hcap )) deallocate(cpatch%dmean_leaf_hcap ) + if(associated(cpatch%dmean_leaf_vpdef )) deallocate(cpatch%dmean_leaf_vpdef ) + if(associated(cpatch%dmean_leaf_temp )) deallocate(cpatch%dmean_leaf_temp ) + if(associated(cpatch%dmean_leaf_fliq )) deallocate(cpatch%dmean_leaf_fliq ) + if(associated(cpatch%dmean_leaf_gsw )) deallocate(cpatch%dmean_leaf_gsw ) + if(associated(cpatch%dmean_leaf_gbw )) deallocate(cpatch%dmean_leaf_gbw ) + if(associated(cpatch%dmean_wood_energy )) deallocate(cpatch%dmean_wood_energy ) + if(associated(cpatch%dmean_wood_water )) deallocate(cpatch%dmean_wood_water ) + if(associated(cpatch%dmean_wood_hcap )) deallocate(cpatch%dmean_wood_hcap ) + if(associated(cpatch%dmean_wood_temp )) deallocate(cpatch%dmean_wood_temp ) + if(associated(cpatch%dmean_wood_fliq )) deallocate(cpatch%dmean_wood_fliq ) + if(associated(cpatch%dmean_wood_gbw )) deallocate(cpatch%dmean_wood_gbw ) + if(associated(cpatch%dmean_fs_open )) deallocate(cpatch%dmean_fs_open ) + if(associated(cpatch%dmean_fsw )) deallocate(cpatch%dmean_fsw ) + if(associated(cpatch%dmean_fsn )) deallocate(cpatch%dmean_fsn ) + if(associated(cpatch%dmean_psi_open )) deallocate(cpatch%dmean_psi_open ) + if(associated(cpatch%dmean_psi_closed )) deallocate(cpatch%dmean_psi_closed ) + if(associated(cpatch%dmean_water_supply )) deallocate(cpatch%dmean_water_supply ) + if(associated(cpatch%dmean_light_level )) deallocate(cpatch%dmean_light_level ) + if(associated(cpatch%dmean_light_level_beam)) & + deallocate(cpatch%dmean_light_level_beam) + if(associated(cpatch%dmean_light_level_diff)) & + deallocate(cpatch%dmean_light_level_diff) + if(associated(cpatch%dmean_par_l )) deallocate(cpatch%dmean_par_l ) + if(associated(cpatch%dmean_par_l_beam )) deallocate(cpatch%dmean_par_l_beam ) + if(associated(cpatch%dmean_par_l_diff )) deallocate(cpatch%dmean_par_l_diff ) + if(associated(cpatch%dmean_rshort_l )) deallocate(cpatch%dmean_rshort_l ) + if(associated(cpatch%dmean_rlong_l )) deallocate(cpatch%dmean_rlong_l ) + if(associated(cpatch%dmean_sensible_lc )) deallocate(cpatch%dmean_sensible_lc ) + if(associated(cpatch%dmean_vapor_lc )) deallocate(cpatch%dmean_vapor_lc ) + if(associated(cpatch%dmean_transp )) deallocate(cpatch%dmean_transp ) + if(associated(cpatch%dmean_intercepted_al)) deallocate(cpatch%dmean_intercepted_al) + if(associated(cpatch%dmean_wshed_lg )) deallocate(cpatch%dmean_wshed_lg ) + if(associated(cpatch%dmean_rshort_w )) deallocate(cpatch%dmean_rshort_w ) + if(associated(cpatch%dmean_rlong_w )) deallocate(cpatch%dmean_rlong_w ) + if(associated(cpatch%dmean_sensible_wc )) deallocate(cpatch%dmean_sensible_wc ) + if(associated(cpatch%dmean_vapor_wc )) deallocate(cpatch%dmean_vapor_wc ) + if(associated(cpatch%dmean_intercepted_aw)) deallocate(cpatch%dmean_intercepted_aw) + if(associated(cpatch%dmean_wshed_wg )) deallocate(cpatch%dmean_wshed_wg ) + if(associated(cpatch%mmean_lai )) deallocate(cpatch%mmean_lai ) + if(associated(cpatch%mmean_bleaf )) deallocate(cpatch%mmean_bleaf ) + if(associated(cpatch%mmean_broot )) deallocate(cpatch%mmean_broot ) + if(associated(cpatch%mmean_bstorage )) deallocate(cpatch%mmean_bstorage ) + if(associated(cpatch%mmean_mort_rate )) deallocate(cpatch%mmean_mort_rate ) + if(associated(cpatch%mmean_leaf_maintenance)) & + deallocate(cpatch%mmean_leaf_maintenance) + if(associated(cpatch%mmean_root_maintenance)) & + deallocate(cpatch%mmean_root_maintenance) + if(associated(cpatch%mmean_leaf_drop )) deallocate(cpatch%mmean_leaf_drop ) + if(associated(cpatch%mmean_cb )) deallocate(cpatch%mmean_cb ) + if(associated(cpatch%mmean_gpp )) deallocate(cpatch%mmean_gpp ) + if(associated(cpatch%mmean_npp )) deallocate(cpatch%mmean_npp ) + if(associated(cpatch%mmean_leaf_resp )) deallocate(cpatch%mmean_leaf_resp ) + if(associated(cpatch%mmean_root_resp )) deallocate(cpatch%mmean_root_resp ) + if(associated(cpatch%mmean_growth_resp )) deallocate(cpatch%mmean_growth_resp ) + if(associated(cpatch%mmean_storage_resp )) deallocate(cpatch%mmean_storage_resp ) + if(associated(cpatch%mmean_vleaf_resp )) deallocate(cpatch%mmean_vleaf_resp ) + if(associated(cpatch%mmean_plresp )) deallocate(cpatch%mmean_plresp ) + if(associated(cpatch%mmean_leaf_energy )) deallocate(cpatch%mmean_leaf_energy ) + if(associated(cpatch%mmean_leaf_water )) deallocate(cpatch%mmean_leaf_water ) + if(associated(cpatch%mmean_leaf_hcap )) deallocate(cpatch%mmean_leaf_hcap ) + if(associated(cpatch%mmean_leaf_vpdef )) deallocate(cpatch%mmean_leaf_vpdef ) + if(associated(cpatch%mmean_leaf_temp )) deallocate(cpatch%mmean_leaf_temp ) + if(associated(cpatch%mmean_leaf_fliq )) deallocate(cpatch%mmean_leaf_fliq ) + if(associated(cpatch%mmean_leaf_gsw )) deallocate(cpatch%mmean_leaf_gsw ) + if(associated(cpatch%mmean_leaf_gbw )) deallocate(cpatch%mmean_leaf_gbw ) + if(associated(cpatch%mmean_wood_energy )) deallocate(cpatch%mmean_wood_energy ) + if(associated(cpatch%mmean_wood_water )) deallocate(cpatch%mmean_wood_water ) + if(associated(cpatch%mmean_wood_hcap )) deallocate(cpatch%mmean_wood_hcap ) + if(associated(cpatch%mmean_wood_temp )) deallocate(cpatch%mmean_wood_temp ) + if(associated(cpatch%mmean_wood_fliq )) deallocate(cpatch%mmean_wood_fliq ) + if(associated(cpatch%mmean_wood_gbw )) deallocate(cpatch%mmean_wood_gbw ) + if(associated(cpatch%mmean_fs_open )) deallocate(cpatch%mmean_fs_open ) + if(associated(cpatch%mmean_fsw )) deallocate(cpatch%mmean_fsw ) + if(associated(cpatch%mmean_fsn )) deallocate(cpatch%mmean_fsn ) + if(associated(cpatch%mmean_psi_open )) deallocate(cpatch%mmean_psi_open ) + if(associated(cpatch%mmean_psi_closed )) deallocate(cpatch%mmean_psi_closed ) + if(associated(cpatch%mmean_water_supply )) deallocate(cpatch%mmean_water_supply ) + if(associated(cpatch%mmean_light_level )) deallocate(cpatch%mmean_light_level ) + if(associated(cpatch%mmean_light_level_beam)) & + deallocate(cpatch%mmean_light_level_beam) + if(associated(cpatch%mmean_light_level_diff)) & + deallocate(cpatch%mmean_light_level_diff) + if(associated(cpatch%mmean_par_l )) deallocate(cpatch%mmean_par_l ) + if(associated(cpatch%mmean_par_l_beam )) deallocate(cpatch%mmean_par_l_beam ) + if(associated(cpatch%mmean_par_l_diff )) deallocate(cpatch%mmean_par_l_diff ) + if(associated(cpatch%mmean_rshort_l )) deallocate(cpatch%mmean_rshort_l ) + if(associated(cpatch%mmean_rlong_l )) deallocate(cpatch%mmean_rlong_l ) + if(associated(cpatch%mmean_sensible_lc )) deallocate(cpatch%mmean_sensible_lc ) + if(associated(cpatch%mmean_vapor_lc )) deallocate(cpatch%mmean_vapor_lc ) + if(associated(cpatch%mmean_transp )) deallocate(cpatch%mmean_transp ) + if(associated(cpatch%mmean_intercepted_al)) deallocate(cpatch%mmean_intercepted_al) + if(associated(cpatch%mmean_wshed_lg )) deallocate(cpatch%mmean_wshed_lg ) + if(associated(cpatch%mmean_rshort_w )) deallocate(cpatch%mmean_rshort_w ) + if(associated(cpatch%mmean_rlong_w )) deallocate(cpatch%mmean_rlong_w ) + if(associated(cpatch%mmean_sensible_wc )) deallocate(cpatch%mmean_sensible_wc ) + if(associated(cpatch%mmean_vapor_wc )) deallocate(cpatch%mmean_vapor_wc ) + if(associated(cpatch%mmean_intercepted_aw)) deallocate(cpatch%mmean_intercepted_aw) + if(associated(cpatch%mmean_wshed_wg )) deallocate(cpatch%mmean_wshed_wg ) + if(associated(cpatch%mmean_nppleaf )) deallocate(cpatch%mmean_nppleaf ) + if(associated(cpatch%mmean_nppfroot )) deallocate(cpatch%mmean_nppfroot ) + if(associated(cpatch%mmean_nppsapwood )) deallocate(cpatch%mmean_nppsapwood ) + if(associated(cpatch%mmean_nppcroot )) deallocate(cpatch%mmean_nppcroot ) + if(associated(cpatch%mmean_nppseeds )) deallocate(cpatch%mmean_nppseeds ) + if(associated(cpatch%mmean_nppwood )) deallocate(cpatch%mmean_nppwood ) + if(associated(cpatch%mmean_nppdaily )) deallocate(cpatch%mmean_nppdaily ) + if(associated(cpatch%mmsqu_gpp )) deallocate(cpatch%mmsqu_gpp ) + if(associated(cpatch%mmsqu_npp )) deallocate(cpatch%mmsqu_npp ) + if(associated(cpatch%mmsqu_plresp )) deallocate(cpatch%mmsqu_plresp ) + if(associated(cpatch%mmsqu_sensible_lc )) deallocate(cpatch%mmsqu_sensible_lc ) + if(associated(cpatch%mmsqu_vapor_lc )) deallocate(cpatch%mmsqu_vapor_lc ) + if(associated(cpatch%mmsqu_transp )) deallocate(cpatch%mmsqu_transp ) + if(associated(cpatch%mmsqu_sensible_wc )) deallocate(cpatch%mmsqu_sensible_wc ) + if(associated(cpatch%mmsqu_vapor_wc )) deallocate(cpatch%mmsqu_vapor_wc ) + if(associated(cpatch%qmean_gpp )) deallocate(cpatch%qmean_gpp ) + if(associated(cpatch%qmean_npp )) deallocate(cpatch%qmean_npp ) + if(associated(cpatch%qmean_leaf_resp )) deallocate(cpatch%qmean_leaf_resp ) + if(associated(cpatch%qmean_root_resp )) deallocate(cpatch%qmean_root_resp ) + if(associated(cpatch%qmean_growth_resp )) deallocate(cpatch%qmean_growth_resp ) + if(associated(cpatch%qmean_storage_resp )) deallocate(cpatch%qmean_storage_resp ) + if(associated(cpatch%qmean_vleaf_resp )) deallocate(cpatch%qmean_vleaf_resp ) + if(associated(cpatch%qmean_plresp )) deallocate(cpatch%qmean_plresp ) + if(associated(cpatch%qmean_leaf_energy )) deallocate(cpatch%qmean_leaf_energy ) + if(associated(cpatch%qmean_leaf_water )) deallocate(cpatch%qmean_leaf_water ) + if(associated(cpatch%qmean_leaf_hcap )) deallocate(cpatch%qmean_leaf_hcap ) + if(associated(cpatch%qmean_leaf_vpdef )) deallocate(cpatch%qmean_leaf_vpdef ) + if(associated(cpatch%qmean_leaf_temp )) deallocate(cpatch%qmean_leaf_temp ) + if(associated(cpatch%qmean_leaf_fliq )) deallocate(cpatch%qmean_leaf_fliq ) + if(associated(cpatch%qmean_leaf_gsw )) deallocate(cpatch%qmean_leaf_gsw ) + if(associated(cpatch%qmean_leaf_gbw )) deallocate(cpatch%qmean_leaf_gbw ) + if(associated(cpatch%qmean_wood_energy )) deallocate(cpatch%qmean_wood_energy ) + if(associated(cpatch%qmean_wood_water )) deallocate(cpatch%qmean_wood_water ) + if(associated(cpatch%qmean_wood_hcap )) deallocate(cpatch%qmean_wood_hcap ) + if(associated(cpatch%qmean_wood_temp )) deallocate(cpatch%qmean_wood_temp ) + if(associated(cpatch%qmean_wood_fliq )) deallocate(cpatch%qmean_wood_fliq ) + if(associated(cpatch%qmean_wood_gbw )) deallocate(cpatch%qmean_wood_gbw ) + if(associated(cpatch%qmean_fs_open )) deallocate(cpatch%qmean_fs_open ) + if(associated(cpatch%qmean_fsw )) deallocate(cpatch%qmean_fsw ) + if(associated(cpatch%qmean_fsn )) deallocate(cpatch%qmean_fsn ) + if(associated(cpatch%qmean_psi_open )) deallocate(cpatch%qmean_psi_open ) + if(associated(cpatch%qmean_psi_closed )) deallocate(cpatch%qmean_psi_closed ) + if(associated(cpatch%qmean_water_supply )) deallocate(cpatch%qmean_water_supply ) + if(associated(cpatch%qmean_light_level )) deallocate(cpatch%qmean_light_level ) + if(associated(cpatch%qmean_light_level_beam)) & + deallocate(cpatch%qmean_light_level_beam) + if(associated(cpatch%qmean_light_level_diff)) & + deallocate(cpatch%qmean_light_level_diff) + if(associated(cpatch%qmean_par_l )) deallocate(cpatch%qmean_par_l ) + if(associated(cpatch%qmean_par_l_beam )) deallocate(cpatch%qmean_par_l_beam ) + if(associated(cpatch%qmean_par_l_diff )) deallocate(cpatch%qmean_par_l_diff ) + if(associated(cpatch%qmean_rshort_l )) deallocate(cpatch%qmean_rshort_l ) + if(associated(cpatch%qmean_rlong_l )) deallocate(cpatch%qmean_rlong_l ) + if(associated(cpatch%qmean_sensible_lc )) deallocate(cpatch%qmean_sensible_lc ) + if(associated(cpatch%qmean_vapor_lc )) deallocate(cpatch%qmean_vapor_lc ) + if(associated(cpatch%qmean_transp )) deallocate(cpatch%qmean_transp ) + if(associated(cpatch%qmean_intercepted_al)) deallocate(cpatch%qmean_intercepted_al) + if(associated(cpatch%qmean_wshed_lg )) deallocate(cpatch%qmean_wshed_lg ) + if(associated(cpatch%qmean_rshort_w )) deallocate(cpatch%qmean_rshort_w ) + if(associated(cpatch%qmean_rlong_w )) deallocate(cpatch%qmean_rlong_w ) + if(associated(cpatch%qmean_sensible_wc )) deallocate(cpatch%qmean_sensible_wc ) + if(associated(cpatch%qmean_vapor_wc )) deallocate(cpatch%qmean_vapor_wc ) + if(associated(cpatch%qmean_intercepted_aw)) deallocate(cpatch%qmean_intercepted_aw) + if(associated(cpatch%qmean_wshed_wg )) deallocate(cpatch%qmean_wshed_wg ) + if(associated(cpatch%qmsqu_gpp )) deallocate(cpatch%qmsqu_gpp ) + if(associated(cpatch%qmsqu_npp )) deallocate(cpatch%qmsqu_npp ) + if(associated(cpatch%qmsqu_plresp )) deallocate(cpatch%qmsqu_plresp ) + if(associated(cpatch%qmsqu_sensible_lc )) deallocate(cpatch%qmsqu_sensible_lc ) + if(associated(cpatch%qmsqu_vapor_lc )) deallocate(cpatch%qmsqu_vapor_lc ) + if(associated(cpatch%qmsqu_transp )) deallocate(cpatch%qmsqu_transp ) + if(associated(cpatch%qmsqu_sensible_wc )) deallocate(cpatch%qmsqu_sensible_wc ) + if(associated(cpatch%qmsqu_vapor_wc )) deallocate(cpatch%qmsqu_vapor_wc ) - if (associated(cgrid%avg_growth_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_growth_resp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_GROWTH_RESP :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Growth Respiration','[umol/m2/s]','ipoly') - end if + return + end subroutine deallocate_patchtype + !=======================================================================================! + !=======================================================================================! - if (associated(cgrid%avg_storage_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_storage_resp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_STORAGE_RESP :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Storage Respiration','[umol/m2/s]','ipoly') - end if - if (associated(cgrid%avg_vleaf_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_vleaf_resp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_VLEAF_RESP :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Virtual Leaf Respiration','[umol/m2/s]','ipoly') - end if - if (associated(cgrid%avg_plant_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_plant_resp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_PLANT_RESP :11:hist:anal:opti') - call metadata_edio(nvar,igr,'Polygon Average Plant Respiration','[umol/m2/s]','ipoly') - end if - if (associated(cgrid%avg_growth_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_growth_resp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_GROWTH_RESP :11:opti') - call metadata_edio(nvar,igr,'Polygon Average Growth Respiration','[umol/m2/s]','ipoly') - end if - if (associated(cgrid%avg_storage_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_storage_resp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_STORAGE_RESP :11:opti') - call metadata_edio(nvar,igr,'Polygon Average Storage Respiration','[umol/m2/s]','ipoly') - end if - if (associated(cgrid%avg_vleaf_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_vleaf_resp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_VLEAF_RESP :11:opti') - call metadata_edio(nvar,igr,'Polygon Average VLeaf Respiration','[umol/m2/s]','ipoly') - end if + !=======================================================================================! + !=======================================================================================! + ! This subroutine copies a continuous chunk of patches from one place to another. ! + ! The number of patches to be copied must match between the input and output, and every ! + ! single variable, including the cohorts, will be copied. ! + ! IMPORTANT. This subroutine assumes that the output patches still don't have cohorts ! + ! allocated, so this should be never used in a previously allocated patch. ! + !---------------------------------------------------------------------------------------! + subroutine copy_sitetype(isite,osite,ipaa,ipaz,opaa,opaz) + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(sitetype) , target :: isite ! Input (donor) site + type(sitetype) , target :: osite ! Output (receptor) site + integer , intent(in) :: ipaa ! First input patch index + integer , intent(in) :: ipaz ! Last input patch index + integer , intent(in) :: opaa ! First output patch index + integer , intent(in) :: opaz ! Last output patch index + !----- Local variables. -------------------------------------------------------------! + integer :: ipa ! Counter for the input site patches + integer :: opa ! Counter for the output site patches + integer :: m ! First counter + integer :: n ! Second counter + !------------------------------------------------------------------------------------! - if (associated(cgrid%avg_htroph_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_htroph_resp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_HTROPH_RESP :11:hist:anal:opti') - call metadata_edio(nvar,igr,'Polygon Average Heterotrohic Respiration','[umol/m2/s]','ipoly') - end if - if (associated(cgrid%avg_cwd_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_cwd_resp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_CWD_RESP :11:hist:anal:opti') - call metadata_edio(nvar,igr,'Polygon Avg. coarse woody debris Resp.','[umol/m2/s]','ipoly') + !------ Check whether this patch copying makes sense. -------------------------------! + if (ipaz - ipaa /= opaz - opaa) then + write (unit=*,fmt='(a)') '------------------------------------------------' + write (unit=*,fmt='(a)') ' - Input site:' + write (unit=*,fmt='(a,1x,i6)') ' * First patch: ',ipaa + write (unit=*,fmt='(a,1x,i6)') ' * Last patch: ',ipaz + write (unit=*,fmt='(a,1x,i6)') ' * Patch count: ',ipaz-ipaa+1 + write (unit=*,fmt='(a)') ' - Output site:' + write (unit=*,fmt='(a,1x,i6)') ' * First patch: ',opaa + write (unit=*,fmt='(a,1x,i6)') ' * Last patch: ',opaz + write (unit=*,fmt='(a,1x,i6)') ' * Patch count: ',opaz-opaa+1 + write (unit=*,fmt='(a)' ) '------------------------------------------------' + call fatal_error ('Patch count of input and output sites don''t match' & + ,'copy_sitetype','ed_state_vars.f90') end if + !------------------------------------------------------------------------------------! - if (associated(cgrid%avg_leaf_drop)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_leaf_drop,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_LEAF_DROP :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Leaf loss','[kgC/m2/yr]','ipoly') - end if - if (associated(cgrid%avg_leaf_maintenance)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_leaf_maintenance,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_LEAF_MAINTENANCE :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Leaf maintenance cost','[kgC/m2/day]','ipoly') - end if - if (associated(cgrid%avg_root_maintenance)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_root_maintenance,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_ROOT_MAINTENANCE :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average fine root maintenance cost','[kgC/m2/yr]','ipoly') - end if + !------------------------------------------------------------------------------------! + ! First we copy the cohorts. ! + !------------------------------------------------------------------------------------! + ipa = ipaa - 1 + opaloop: do opa = opaa, opaz + ipa = ipa + 1 + !----- Copy all cohorts. ---------------------------------------------------------! + call allocate_patchtype(osite%patch(opa),isite%patch(ipa)%ncohorts) + call copy_patchtype (isite%patch(ipa),osite%patch(opa) & + ,1,isite%patch(ipa)%ncohorts,1,isite%patch(ipa)%ncohorts) + !---------------------------------------------------------------------------------! + + + !----- Scalars. ------------------------------------------------------------------! + osite%paco_id (opa) = isite%paco_id (ipa) + osite%paco_n (opa) = isite%paco_n (ipa) + osite%cohort_count (opa) = isite%cohort_count (ipa) + osite%pname (opa) = isite%pname (ipa) + osite%area (opa) = isite%area (ipa) + osite%age (opa) = isite%age (ipa) + osite%dist_type (opa) = isite%dist_type (ipa) + osite%fast_soil_C (opa) = isite%fast_soil_C (ipa) + osite%slow_soil_C (opa) = isite%slow_soil_C (ipa) + osite%structural_soil_C (opa) = isite%structural_soil_C (ipa) + osite%structural_soil_L (opa) = isite%structural_soil_L (ipa) + osite%mineralized_soil_N (opa) = isite%mineralized_soil_N (ipa) + osite%fast_soil_N (opa) = isite%fast_soil_N (ipa) + osite%sum_dgd (opa) = isite%sum_dgd (ipa) + osite%sum_chd (opa) = isite%sum_chd (ipa) + osite%plantation (opa) = isite%plantation (ipa) + osite%can_theiv (opa) = isite%can_theiv (ipa) + osite%can_vpdef (opa) = isite%can_vpdef (ipa) + osite%can_temp (opa) = isite%can_temp (ipa) + osite%can_temp_pv (opa) = isite%can_temp_pv (ipa) + osite%can_shv (opa) = isite%can_shv (ipa) + osite%can_co2 (opa) = isite%can_co2 (ipa) + osite%can_rhos (opa) = isite%can_rhos (ipa) + osite%can_prss (opa) = isite%can_prss (ipa) + osite%can_theta (opa) = isite%can_theta (ipa) + osite%can_depth (opa) = isite%can_depth (ipa) + osite%opencan_frac (opa) = isite%opencan_frac (ipa) + osite%ggbare (opa) = isite%ggbare (ipa) + osite%ggveg (opa) = isite%ggveg (ipa) + osite%ggnet (opa) = isite%ggnet (ipa) + osite%ggsoil (opa) = isite%ggsoil (ipa) + osite%nlev_sfcwater (opa) = isite%nlev_sfcwater (ipa) + osite%ground_shv (opa) = isite%ground_shv (ipa) + osite%ground_ssh (opa) = isite%ground_ssh (ipa) + osite%ground_temp (opa) = isite%ground_temp (ipa) + osite%ground_fliq (opa) = isite%ground_fliq (ipa) + osite%rough (opa) = isite%rough (ipa) + osite%par_l_max (opa) = isite%par_l_max (ipa) + osite%par_l_beam_max (opa) = isite%par_l_beam_max (ipa) + osite%par_l_diffuse_max (opa) = isite%par_l_diffuse_max (ipa) + osite%avg_daily_temp (opa) = isite%avg_daily_temp (ipa) + osite%avg_monthly_gndwater (opa) = isite%avg_monthly_gndwater (ipa) + osite%avg_monthly_waterdef (opa) = isite%avg_monthly_waterdef (ipa) + osite%wbudget_loss2atm (opa) = isite%wbudget_loss2atm (ipa) + osite%wbudget_denseffect (opa) = isite%wbudget_denseffect (ipa) + osite%wbudget_precipgain (opa) = isite%wbudget_precipgain (ipa) + osite%wbudget_loss2runoff (opa) = isite%wbudget_loss2runoff (ipa) + osite%wbudget_loss2drainage (opa) = isite%wbudget_loss2drainage (ipa) + osite%wbudget_initialstorage (opa) = isite%wbudget_initialstorage (ipa) + osite%wbudget_residual (opa) = isite%wbudget_residual (ipa) + osite%ebudget_loss2atm (opa) = isite%ebudget_loss2atm (ipa) + osite%ebudget_denseffect (opa) = isite%ebudget_denseffect (ipa) + osite%ebudget_prsseffect (opa) = isite%ebudget_prsseffect (ipa) + osite%ebudget_loss2runoff (opa) = isite%ebudget_loss2runoff (ipa) + osite%ebudget_loss2drainage (opa) = isite%ebudget_loss2drainage (ipa) + osite%ebudget_netrad (opa) = isite%ebudget_netrad (ipa) + osite%ebudget_precipgain (opa) = isite%ebudget_precipgain (ipa) + osite%ebudget_initialstorage (opa) = isite%ebudget_initialstorage (ipa) + osite%ebudget_residual (opa) = isite%ebudget_residual (ipa) + osite%co2budget_initialstorage (opa) = isite%co2budget_initialstorage (ipa) + osite%co2budget_residual (opa) = isite%co2budget_residual (ipa) + osite%co2budget_loss2atm (opa) = isite%co2budget_loss2atm (ipa) + osite%co2budget_denseffect (opa) = isite%co2budget_denseffect (ipa) + osite%co2budget_gpp (opa) = isite%co2budget_gpp (ipa) + osite%co2budget_plresp (opa) = isite%co2budget_plresp (ipa) + osite%co2budget_rh (opa) = isite%co2budget_rh (ipa) + osite%today_A_decomp (opa) = isite%today_A_decomp (ipa) + osite%today_Af_decomp (opa) = isite%today_Af_decomp (ipa) + osite%veg_rough (opa) = isite%veg_rough (ipa) + osite%veg_height (opa) = isite%veg_height (ipa) + osite%veg_displace (opa) = isite%veg_displace (ipa) + osite%fsc_in (opa) = isite%fsc_in (ipa) + osite%ssc_in (opa) = isite%ssc_in (ipa) + osite%ssl_in (opa) = isite%ssl_in (ipa) + osite%fsn_in (opa) = isite%fsn_in (ipa) + osite%total_plant_nitrogen_uptake(opa) = isite%total_plant_nitrogen_uptake(ipa) + osite%mineralized_N_loss (opa) = isite%mineralized_N_loss (ipa) + osite%mineralized_N_input (opa) = isite%mineralized_N_input (ipa) + osite%rshort_g (opa) = isite%rshort_g (ipa) + osite%rshort_g_beam (opa) = isite%rshort_g_beam (ipa) + osite%rshort_g_diffuse (opa) = isite%rshort_g_diffuse (ipa) + osite%par_g (opa) = isite%par_g (ipa) + osite%par_g_beam (opa) = isite%par_g_beam (ipa) + osite%par_g_diffuse (opa) = isite%par_g_diffuse (ipa) + osite%par_b (opa) = isite%par_b (ipa) + osite%par_b_beam (opa) = isite%par_b_beam (ipa) + osite%par_b_diffuse (opa) = isite%par_b_diffuse (ipa) + osite%nir_b (opa) = isite%nir_b (ipa) + osite%nir_b_beam (opa) = isite%nir_b_beam (ipa) + osite%nir_b_diffuse (opa) = isite%nir_b_diffuse (ipa) + osite%rlong_g (opa) = isite%rlong_g (ipa) + osite%rlong_g_surf (opa) = isite%rlong_g_surf (ipa) + osite%rlong_g_incid (opa) = isite%rlong_g_incid (ipa) + osite%rlong_s (opa) = isite%rlong_s (ipa) + osite%rlong_s_surf (opa) = isite%rlong_s_surf (ipa) + osite%rlong_s_incid (opa) = isite%rlong_s_incid (ipa) + osite%albedo (opa) = isite%albedo (ipa) + osite%albedo_beam (opa) = isite%albedo_beam (ipa) + osite%albedo_diffuse (opa) = isite%albedo_diffuse (ipa) + osite%rlong_albedo (opa) = isite%rlong_albedo (ipa) + osite%rnet (opa) = isite%rnet (ipa) + osite%rlongup (opa) = isite%rlongup (ipa) + osite%parup (opa) = isite%parup (ipa) + osite%nirup (opa) = isite%nirup (ipa) + osite%rshortup (opa) = isite%rshortup (ipa) + osite%total_sfcw_depth (opa) = isite%total_sfcw_depth (ipa) + osite%snowfac (opa) = isite%snowfac (ipa) + osite%A_decomp (opa) = isite%A_decomp (ipa) + osite%f_decomp (opa) = isite%f_decomp (ipa) + osite%rh (opa) = isite%rh (ipa) + osite%cwd_rh (opa) = isite%cwd_rh (ipa) + osite%plant_ag_biomass (opa) = isite%plant_ag_biomass (ipa) + osite%htry (opa) = isite%htry (ipa) + osite%hprev (opa) = isite%hprev (ipa) + osite%ustar (opa) = isite%ustar (ipa) + osite%tstar (opa) = isite%tstar (ipa) + osite%qstar (opa) = isite%qstar (ipa) + osite%cstar (opa) = isite%cstar (ipa) + osite%zeta (opa) = isite%zeta (ipa) + osite%ribulk (opa) = isite%ribulk (ipa) + osite%upwp (opa) = isite%upwp (ipa) + osite%qpwp (opa) = isite%qpwp (ipa) + osite%cpwp (opa) = isite%cpwp (ipa) + osite%tpwp (opa) = isite%tpwp (ipa) + osite%wpwp (opa) = isite%wpwp (ipa) + osite%watertable (opa) = isite%watertable (ipa) + osite%moist_dz (opa) = isite%moist_dz (ipa) + osite%ksat (opa) = isite%ksat (ipa) + osite%soil_sat_energy (opa) = isite%soil_sat_energy (ipa) + osite%soil_sat_water (opa) = isite%soil_sat_water (ipa) + osite%soil_sat_heat (opa) = isite%soil_sat_heat (ipa) + osite%runoff_rate (opa) = isite%runoff_rate (ipa) + osite%runoff (opa) = isite%runoff (ipa) + osite%qrunoff (opa) = isite%qrunoff (ipa) + osite%fmean_rh (opa) = isite%fmean_rh (ipa) + osite%fmean_cwd_rh (opa) = isite%fmean_cwd_rh (ipa) + osite%fmean_nep (opa) = isite%fmean_nep (ipa) + osite%fmean_rk4step (opa) = isite%fmean_rk4step (ipa) + osite%fmean_available_water (opa) = isite%fmean_available_water (ipa) + osite%fmean_can_theiv (opa) = isite%fmean_can_theiv (ipa) + osite%fmean_can_theta (opa) = isite%fmean_can_theta (ipa) + osite%fmean_can_vpdef (opa) = isite%fmean_can_vpdef (ipa) + osite%fmean_can_temp (opa) = isite%fmean_can_temp (ipa) + osite%fmean_can_shv (opa) = isite%fmean_can_shv (ipa) + osite%fmean_can_co2 (opa) = isite%fmean_can_co2 (ipa) + osite%fmean_can_rhos (opa) = isite%fmean_can_rhos (ipa) + osite%fmean_can_prss (opa) = isite%fmean_can_prss (ipa) + osite%fmean_gnd_temp (opa) = isite%fmean_gnd_temp (ipa) + osite%fmean_gnd_shv (opa) = isite%fmean_gnd_shv (ipa) + osite%fmean_can_ggnd (opa) = isite%fmean_can_ggnd (ipa) + osite%fmean_sfcw_depth (opa) = isite%fmean_sfcw_depth (ipa) + osite%fmean_sfcw_energy (opa) = isite%fmean_sfcw_energy (ipa) + osite%fmean_sfcw_mass (opa) = isite%fmean_sfcw_mass (ipa) + osite%fmean_sfcw_temp (opa) = isite%fmean_sfcw_temp (ipa) + osite%fmean_sfcw_fliq (opa) = isite%fmean_sfcw_fliq (ipa) + osite%fmean_rshort_gnd (opa) = isite%fmean_rshort_gnd (ipa) + osite%fmean_par_gnd (opa) = isite%fmean_par_gnd (ipa) + osite%fmean_rlong_gnd (opa) = isite%fmean_rlong_gnd (ipa) + osite%fmean_rlongup (opa) = isite%fmean_rlongup (ipa) + osite%fmean_parup (opa) = isite%fmean_parup (ipa) + osite%fmean_nirup (opa) = isite%fmean_nirup (ipa) + osite%fmean_rshortup (opa) = isite%fmean_rshortup (ipa) + osite%fmean_rnet (opa) = isite%fmean_rnet (ipa) + osite%fmean_albedo (opa) = isite%fmean_albedo (ipa) + osite%fmean_albedo_beam (opa) = isite%fmean_albedo_beam (ipa) + osite%fmean_albedo_diff (opa) = isite%fmean_albedo_diff (ipa) + osite%fmean_rlong_albedo (opa) = isite%fmean_rlong_albedo (ipa) + osite%fmean_ustar (opa) = isite%fmean_ustar (ipa) + osite%fmean_tstar (opa) = isite%fmean_tstar (ipa) + osite%fmean_qstar (opa) = isite%fmean_qstar (ipa) + osite%fmean_cstar (opa) = isite%fmean_cstar (ipa) + osite%fmean_carbon_ac (opa) = isite%fmean_carbon_ac (ipa) + osite%fmean_carbon_st (opa) = isite%fmean_carbon_st (ipa) + osite%fmean_vapor_gc (opa) = isite%fmean_vapor_gc (ipa) + osite%fmean_vapor_ac (opa) = isite%fmean_vapor_ac (ipa) + osite%fmean_throughfall (opa) = isite%fmean_throughfall (ipa) + osite%fmean_runoff (opa) = isite%fmean_runoff (ipa) + osite%fmean_drainage (opa) = isite%fmean_drainage (ipa) + osite%fmean_sensible_gc (opa) = isite%fmean_sensible_gc (ipa) + osite%fmean_sensible_ac (opa) = isite%fmean_sensible_ac (ipa) + osite%fmean_qthroughfall (opa) = isite%fmean_qthroughfall (ipa) + osite%fmean_qrunoff (opa) = isite%fmean_qrunoff (ipa) + osite%fmean_qdrainage (opa) = isite%fmean_qdrainage (ipa) + + !----- Temporary pounding/snow layer variables. ----------------------------------! + do m=1,nzs + osite%sfcwater_mass (m,opa) = isite%sfcwater_mass (m,ipa) + osite%sfcwater_energy (m,opa) = isite%sfcwater_energy (m,ipa) + osite%sfcwater_depth (m,opa) = isite%sfcwater_depth (m,ipa) + osite%sfcwater_tempk (m,opa) = isite%sfcwater_tempk (m,ipa) + osite%sfcwater_fracliq(m,opa) = isite%sfcwater_fracliq(m,ipa) + osite%rshort_s (m,opa) = isite%rshort_s (m,ipa) + osite%rshort_s_beam (m,opa) = isite%rshort_s_beam (m,ipa) + osite%rshort_s_diffuse(m,opa) = isite%rshort_s_diffuse(m,ipa) + osite%par_s (m,opa) = isite%par_s (m,ipa) + osite%par_s_beam (m,opa) = isite%par_s_beam (m,ipa) + osite%par_s_diffuse (m,opa) = isite%par_s_diffuse (m,ipa) + end do + !---------------------------------------------------------------------------------! + + + !----- Soil variables. -----------------------------------------------------------! + do m=1,nzg + osite%soil_energy (m,opa) = isite%soil_energy (m,ipa) + osite%soil_mstpot (m,opa) = isite%soil_mstpot (m,ipa) + osite%soil_water (m,opa) = isite%soil_water (m,ipa) + osite%soil_tempk (m,opa) = isite%soil_tempk (m,ipa) + osite%soil_fracliq (m,opa) = isite%soil_fracliq (m,ipa) + osite%rootdense (m,opa) = isite%rootdense (m,ipa) + osite%fmean_soil_energy(m,opa) = isite%fmean_soil_energy(m,ipa) + osite%fmean_soil_mstpot(m,opa) = isite%fmean_soil_mstpot(m,ipa) + osite%fmean_soil_water (m,opa) = isite%fmean_soil_water (m,ipa) + osite%fmean_soil_temp (m,opa) = isite%fmean_soil_temp (m,ipa) + osite%fmean_soil_fliq (m,opa) = isite%fmean_soil_fliq (m,ipa) + osite%fmean_smoist_gg (m,opa) = isite%fmean_smoist_gg (m,ipa) + osite%fmean_transloss (m,opa) = isite%fmean_transloss (m,ipa) + osite%fmean_sensible_gg(m,opa) = isite%fmean_sensible_gg(m,ipa) + end do + !---------------------------------------------------------------------------------! - !!! added for NACP intercomparison (MCD) - if (associated(cgrid%avg_sfcw_depth)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_sfcw_depth,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_SNOWDEPTH :11:hist:anal:opti') - call metadata_edio(nvar,igr,'Poly Avg. Snow Depth ','[m]','ipoly') - end if - if (associated(cgrid%avg_sfcw_energy)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_sfcw_energy,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_SNOWENERGY :11:hist:anal') - call metadata_edio(nvar,igr,'Poly Avg. Snow Energy ','[J/kg]','ipoly') - end if - if (associated(cgrid%avg_sfcw_mass)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_sfcw_mass,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_SNOWMASS :11:hist:anal:opti') - call metadata_edio(nvar,igr,'Poly Avg. Snow Mass (SWE) ','[kg/m2]','ipoly') - end if - if (associated(cgrid%avg_sfcw_tempk)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_sfcw_tempk,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_SNOWTEMP :11:hist:anal:opti') - call metadata_edio(nvar,igr,'Poly Avg. Snow Temperature','[K]','ipoly') - end if - if (associated(cgrid%avg_sfcw_fracliq)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_sfcw_fracliq,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_SNOWFRACLIQ :11:hist:anal:opti') - call metadata_edio(nvar,igr,'Poly Avg. Snow liquid fraction','[proportion]','ipoly') - end if - if (associated(cgrid%avg_bdead)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_bdead,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_BDEAD :11:hist:opti:dail:anal:year') - call metadata_edio(nvar,igr,'Poly Avg. Biomass - structural','[kgC/m2]','ipoly') - end if - if (associated(cgrid%avg_bstorage)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_bstorage,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_BSTORAGE :11:hist:anal:year') - call metadata_edio(nvar,igr,'Poly Avg. Biomass - storage','[kgC/m2]','ipoly') - end if - if (associated(cgrid%avg_bseeds)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_bseeds,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_BSEEDS :11:hist:anal:year') - call metadata_edio(nvar,igr,'Poly Avg. Biomass - seeds','[kgC/m2]','ipoly') - end if + !----- PFT variables. ------------------------------------------------------------! + do m=1,n_pft + osite%A_o_max ( m,opa) = isite%A_o_max ( m,ipa) + osite%A_c_max ( m,opa) = isite%A_c_max ( m,ipa) + osite%repro ( m,opa) = isite%repro ( m,ipa) + do n=1,ff_nhgt + osite%cumlai_profile(m,n,opa) = isite%cumlai_profile(m,n,ipa) + end do + end do + !---------------------------------------------------------------------------------! - if (associated(cgrid%avg_balive)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_balive,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_BALIVE :11:hist:anal:year') - call metadata_edio(nvar,igr,'Poly Avg. Biomass -- living','[kgC/m2]','ipoly') - end if - if (associated(cgrid%avg_bleaf)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_bleaf,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_BLEAF :11:hist:anal:year') - call metadata_edio(nvar,igr,'Poly Avg. Biomass -- leaf','[kgC/m2]','ipoly') - end if + !----- "3" variables. ------------------------------------------------------------! + do m=1,3 + osite%runoff_A(m,opa) = isite%runoff_A(m,ipa) + end do + !---------------------------------------------------------------------------------! - if (associated(cgrid%avg_broot)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_broot,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_BROOT :11:hist:anal:year') - call metadata_edio(nvar,igr,'Poly Avg. Biomass -- fine roots','[kgC/m2]','ipoly') - end if - if (associated(cgrid%avg_bsapwooda)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_bsapwooda,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_BSAPWOODA :11:hist:anal:year') - call metadata_edio(nvar,igr,'Poly Avg. Biomass -- sapwood above ground','[kgC/m2]','ipoly') - end if - - if (associated(cgrid%avg_bsapwoodb)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_bsapwoodb,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_BSAPWOODB :11:hist:anal:year') - call metadata_edio(nvar,igr,'Poly Avg. Biomass -- sapwood below ground','[kgC/m2]','ipoly') - end if - if (associated(cgrid%avg_fsc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_fsc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_FSC :11:hist:anal:opti:dail:year') - call metadata_edio(nvar,igr,'Poly Avg. Fast Soil Carbon','[kg/m2]','ipoly') - end if - if (associated(cgrid%avg_ssc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_stsc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_SSC :11:hist:anal:opti:dail:year') - call metadata_edio(nvar,igr,'Poly Avg. Slow Soil Carbon','[kg/m2]','ipoly') - end if - if (associated(cgrid%avg_stsc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_stsc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_STSC :11:hist:anal:opti:year:dail') - call metadata_edio(nvar,igr,'Poly Avg. Structural Soil Carbon','[kg/m2]','ipoly') - end if + !---------------------------------------------------------------------------------! + ! Daily means. ! + !---------------------------------------------------------------------------------! + if (writing_long) then + !----- Scalars. ---------------------------------------------------------------! + osite%dmean_A_decomp (opa) = isite%dmean_A_decomp (ipa) + osite%dmean_Af_decomp (opa) = isite%dmean_Af_decomp (ipa) + osite%dmean_co2_residual (opa) = isite%dmean_co2_residual (ipa) + osite%dmean_energy_residual(opa) = isite%dmean_energy_residual(ipa) + osite%dmean_water_residual (opa) = isite%dmean_water_residual (ipa) + osite%dmean_rh (opa) = isite%dmean_rh (ipa) + osite%dmean_cwd_rh (opa) = isite%dmean_cwd_rh (ipa) + osite%dmean_nep (opa) = isite%dmean_nep (ipa) + osite%dmean_rk4step (opa) = isite%dmean_rk4step (ipa) + osite%dmean_available_water(opa) = isite%dmean_available_water(ipa) + osite%dmean_can_theiv (opa) = isite%dmean_can_theiv (ipa) + osite%dmean_can_theta (opa) = isite%dmean_can_theta (ipa) + osite%dmean_can_vpdef (opa) = isite%dmean_can_vpdef (ipa) + osite%dmean_can_temp (opa) = isite%dmean_can_temp (ipa) + osite%dmean_can_shv (opa) = isite%dmean_can_shv (ipa) + osite%dmean_can_co2 (opa) = isite%dmean_can_co2 (ipa) + osite%dmean_can_rhos (opa) = isite%dmean_can_rhos (ipa) + osite%dmean_can_prss (opa) = isite%dmean_can_prss (ipa) + osite%dmean_gnd_temp (opa) = isite%dmean_gnd_temp (ipa) + osite%dmean_gnd_shv (opa) = isite%dmean_gnd_shv (ipa) + osite%dmean_can_ggnd (opa) = isite%dmean_can_ggnd (ipa) + osite%dmean_sfcw_depth (opa) = isite%dmean_sfcw_depth (ipa) + osite%dmean_sfcw_energy (opa) = isite%dmean_sfcw_energy (ipa) + osite%dmean_sfcw_mass (opa) = isite%dmean_sfcw_mass (ipa) + osite%dmean_sfcw_temp (opa) = isite%dmean_sfcw_temp (ipa) + osite%dmean_sfcw_fliq (opa) = isite%dmean_sfcw_fliq (ipa) + osite%dmean_rshort_gnd (opa) = isite%dmean_rshort_gnd (ipa) + osite%dmean_par_gnd (opa) = isite%dmean_par_gnd (ipa) + osite%dmean_rlong_gnd (opa) = isite%dmean_rlong_gnd (ipa) + osite%dmean_rlongup (opa) = isite%dmean_rlongup (ipa) + osite%dmean_parup (opa) = isite%dmean_parup (ipa) + osite%dmean_nirup (opa) = isite%dmean_nirup (ipa) + osite%dmean_rshortup (opa) = isite%dmean_rshortup (ipa) + osite%dmean_rnet (opa) = isite%dmean_rnet (ipa) + osite%dmean_albedo (opa) = isite%dmean_albedo (ipa) + osite%dmean_albedo_beam (opa) = isite%dmean_albedo_beam (ipa) + osite%dmean_albedo_diff (opa) = isite%dmean_albedo_diff (ipa) + osite%dmean_rlong_albedo (opa) = isite%dmean_rlong_albedo (ipa) + osite%dmean_ustar (opa) = isite%dmean_ustar (ipa) + osite%dmean_tstar (opa) = isite%dmean_tstar (ipa) + osite%dmean_qstar (opa) = isite%dmean_qstar (ipa) + osite%dmean_cstar (opa) = isite%dmean_cstar (ipa) + osite%dmean_carbon_ac (opa) = isite%dmean_carbon_ac (ipa) + osite%dmean_carbon_st (opa) = isite%dmean_carbon_st (ipa) + osite%dmean_vapor_gc (opa) = isite%dmean_vapor_gc (ipa) + osite%dmean_vapor_ac (opa) = isite%dmean_vapor_ac (ipa) + osite%dmean_throughfall (opa) = isite%dmean_throughfall (ipa) + osite%dmean_runoff (opa) = isite%dmean_runoff (ipa) + osite%dmean_drainage (opa) = isite%dmean_drainage (ipa) + osite%dmean_sensible_gc (opa) = isite%dmean_sensible_gc (ipa) + osite%dmean_sensible_ac (opa) = isite%dmean_sensible_ac (ipa) + osite%dmean_qthroughfall (opa) = isite%dmean_qthroughfall (ipa) + osite%dmean_qrunoff (opa) = isite%dmean_qrunoff (ipa) + osite%dmean_qdrainage (opa) = isite%dmean_qdrainage (ipa) + !------------------------------------------------------------------------------! + + + !----- Soil variables. --------------------------------------------------------! + do m=1,nzg + osite%dmean_soil_energy(m,opa) = isite%dmean_soil_energy(m,ipa) + osite%dmean_soil_mstpot(m,opa) = isite%dmean_soil_mstpot(m,ipa) + osite%dmean_soil_water (m,opa) = isite%dmean_soil_water (m,ipa) + osite%dmean_soil_temp (m,opa) = isite%dmean_soil_temp (m,ipa) + osite%dmean_soil_fliq (m,opa) = isite%dmean_soil_fliq (m,ipa) + osite%dmean_smoist_gg (m,opa) = isite%dmean_smoist_gg (m,ipa) + osite%dmean_transloss (m,opa) = isite%dmean_transloss (m,ipa) + osite%dmean_sensible_gg(m,opa) = isite%dmean_sensible_gg(m,ipa) + end do + !------------------------------------------------------------------------------! + end if + !---------------------------------------------------------------------------------! - if (associated(cgrid%avg_fsn)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_fsn,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_FSN :11:hist:anal:opti:dail:year') - call metadata_edio(nvar,igr,'Poly Avg. Fast Soil Nitrogen','[kg/m2]','ipoly') - end if - if (associated(cgrid%avg_msn)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_msn,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_MSN :11:hist:anal:opti:dail:year') - call metadata_edio(nvar,igr,'Poly Avg. Mineralized Soil Carbon','[kg/m2]','ipoly') - end if + !---------------------------------------------------------------------------------! + ! Monthly means. ! + !---------------------------------------------------------------------------------! + if (writing_eorq) then + !----- Scalars. ---------------------------------------------------------------! + osite%mmean_fast_soil_c (opa) = isite%mmean_fast_soil_c (ipa) + osite%mmean_slow_soil_c (opa) = isite%mmean_slow_soil_c (ipa) + osite%mmean_struct_soil_c (opa) = isite%mmean_struct_soil_c (ipa) + osite%mmean_struct_soil_l (opa) = isite%mmean_struct_soil_l (ipa) + osite%mmean_fast_soil_n (opa) = isite%mmean_fast_soil_n (ipa) + osite%mmean_mineral_soil_n (opa) = isite%mmean_mineral_soil_n (ipa) + osite%mmean_co2_residual (opa) = isite%mmean_co2_residual (ipa) + osite%mmean_energy_residual(opa) = isite%mmean_energy_residual(ipa) + osite%mmean_water_residual (opa) = isite%mmean_water_residual (ipa) + osite%mmean_rh (opa) = isite%mmean_rh (ipa) + osite%mmean_cwd_rh (opa) = isite%mmean_cwd_rh (ipa) + osite%mmean_nep (opa) = isite%mmean_nep (ipa) + osite%mmean_A_decomp (opa) = isite%mmean_A_decomp (ipa) + osite%mmean_Af_decomp (opa) = isite%mmean_Af_decomp (ipa) + osite%mmean_rk4step (opa) = isite%mmean_rk4step (ipa) + osite%mmean_available_water(opa) = isite%mmean_available_water(ipa) + osite%mmean_can_theiv (opa) = isite%mmean_can_theiv (ipa) + osite%mmean_can_theta (opa) = isite%mmean_can_theta (ipa) + osite%mmean_can_vpdef (opa) = isite%mmean_can_vpdef (ipa) + osite%mmean_can_temp (opa) = isite%mmean_can_temp (ipa) + osite%mmean_can_shv (opa) = isite%mmean_can_shv (ipa) + osite%mmean_can_co2 (opa) = isite%mmean_can_co2 (ipa) + osite%mmean_can_rhos (opa) = isite%mmean_can_rhos (ipa) + osite%mmean_can_prss (opa) = isite%mmean_can_prss (ipa) + osite%mmean_gnd_temp (opa) = isite%mmean_gnd_temp (ipa) + osite%mmean_gnd_shv (opa) = isite%mmean_gnd_shv (ipa) + osite%mmean_can_ggnd (opa) = isite%mmean_can_ggnd (ipa) + osite%mmean_sfcw_depth (opa) = isite%mmean_sfcw_depth (ipa) + osite%mmean_sfcw_energy (opa) = isite%mmean_sfcw_energy (ipa) + osite%mmean_sfcw_mass (opa) = isite%mmean_sfcw_mass (ipa) + osite%mmean_sfcw_temp (opa) = isite%mmean_sfcw_temp (ipa) + osite%mmean_sfcw_fliq (opa) = isite%mmean_sfcw_fliq (ipa) + osite%mmean_rshort_gnd (opa) = isite%mmean_rshort_gnd (ipa) + osite%mmean_par_gnd (opa) = isite%mmean_par_gnd (ipa) + osite%mmean_rlong_gnd (opa) = isite%mmean_rlong_gnd (ipa) + osite%mmean_rlongup (opa) = isite%mmean_rlongup (ipa) + osite%mmean_parup (opa) = isite%mmean_parup (ipa) + osite%mmean_nirup (opa) = isite%mmean_nirup (ipa) + osite%mmean_rshortup (opa) = isite%mmean_rshortup (ipa) + osite%mmean_rnet (opa) = isite%mmean_rnet (ipa) + osite%mmean_albedo (opa) = isite%mmean_albedo (ipa) + osite%mmean_albedo_beam (opa) = isite%mmean_albedo_beam (ipa) + osite%mmean_albedo_diff (opa) = isite%mmean_albedo_diff (ipa) + osite%mmean_rlong_albedo (opa) = isite%mmean_rlong_albedo (ipa) + osite%mmean_ustar (opa) = isite%mmean_ustar (ipa) + osite%mmean_tstar (opa) = isite%mmean_tstar (ipa) + osite%mmean_qstar (opa) = isite%mmean_qstar (ipa) + osite%mmean_cstar (opa) = isite%mmean_cstar (ipa) + osite%mmean_carbon_ac (opa) = isite%mmean_carbon_ac (ipa) + osite%mmean_carbon_st (opa) = isite%mmean_carbon_st (ipa) + osite%mmean_vapor_gc (opa) = isite%mmean_vapor_gc (ipa) + osite%mmean_vapor_ac (opa) = isite%mmean_vapor_ac (ipa) + osite%mmean_throughfall (opa) = isite%mmean_throughfall (ipa) + osite%mmean_runoff (opa) = isite%mmean_runoff (ipa) + osite%mmean_drainage (opa) = isite%mmean_drainage (ipa) + osite%mmean_sensible_gc (opa) = isite%mmean_sensible_gc (ipa) + osite%mmean_sensible_ac (opa) = isite%mmean_sensible_ac (ipa) + osite%mmean_qthroughfall (opa) = isite%mmean_qthroughfall (ipa) + osite%mmean_qrunoff (opa) = isite%mmean_qrunoff (ipa) + osite%mmean_qdrainage (opa) = isite%mmean_qdrainage (ipa) + osite%mmean_A_decomp (opa) = isite%mmean_A_decomp (ipa) + osite%mmean_Af_decomp (opa) = isite%mmean_Af_decomp (ipa) + osite%mmean_co2_residual (opa) = isite%mmean_co2_residual (ipa) + osite%mmean_energy_residual(opa) = isite%mmean_energy_residual(ipa) + osite%mmean_water_residual (opa) = isite%mmean_water_residual (ipa) + osite%mmsqu_rh (opa) = isite%mmsqu_rh (ipa) + osite%mmsqu_cwd_rh (opa) = isite%mmsqu_cwd_rh (ipa) + osite%mmsqu_nep (opa) = isite%mmsqu_nep (ipa) + osite%mmsqu_rlongup (opa) = isite%mmsqu_rlongup (ipa) + osite%mmsqu_parup (opa) = isite%mmsqu_parup (ipa) + osite%mmsqu_nirup (opa) = isite%mmsqu_nirup (ipa) + osite%mmsqu_rshortup (opa) = isite%mmsqu_rshortup (ipa) + osite%mmsqu_rnet (opa) = isite%mmsqu_rnet (ipa) + osite%mmsqu_albedo (opa) = isite%mmsqu_albedo (ipa) + osite%mmsqu_ustar (opa) = isite%mmsqu_ustar (ipa) + osite%mmsqu_carbon_ac (opa) = isite%mmsqu_carbon_ac (ipa) + osite%mmsqu_carbon_st (opa) = isite%mmsqu_carbon_st (ipa) + osite%mmsqu_vapor_gc (opa) = isite%mmsqu_vapor_gc (ipa) + osite%mmsqu_vapor_ac (opa) = isite%mmsqu_vapor_ac (ipa) + osite%mmsqu_sensible_gc (opa) = isite%mmsqu_sensible_gc (ipa) + osite%mmsqu_sensible_ac (opa) = isite%mmsqu_sensible_ac (ipa) + !------------------------------------------------------------------------------! + + + !----- Soil variables. --------------------------------------------------------! + do m=1,nzg + osite%mmean_soil_energy(m,opa) = isite%mmean_soil_energy(m,ipa) + osite%mmean_soil_mstpot(m,opa) = isite%mmean_soil_mstpot(m,ipa) + osite%mmean_soil_water (m,opa) = isite%mmean_soil_water (m,ipa) + osite%mmean_soil_temp (m,opa) = isite%mmean_soil_temp (m,ipa) + osite%mmean_soil_fliq (m,opa) = isite%mmean_soil_fliq (m,ipa) + osite%mmean_smoist_gg (m,opa) = isite%mmean_smoist_gg (m,ipa) + osite%mmean_transloss (m,opa) = isite%mmean_transloss (m,ipa) + osite%mmean_sensible_gg(m,opa) = isite%mmean_sensible_gg(m,ipa) + end do + !------------------------------------------------------------------------------! + end if + !---------------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------------! + ! Mean diel. ! + !---------------------------------------------------------------------------------! + if (writing_dcyc) then + do n=1,ndcycle + !----- Scalars. ------------------------------------------------------------! + osite%qmean_rh (n,opa) = isite%qmean_rh (n,ipa) + osite%qmean_cwd_rh (n,opa) = isite%qmean_cwd_rh (n,ipa) + osite%qmean_nep (n,opa) = isite%qmean_nep (n,ipa) + osite%qmean_rk4step (n,opa) = isite%qmean_rk4step (n,ipa) + osite%qmean_available_water(n,opa) = isite%qmean_available_water(n,ipa) + osite%qmean_can_theiv (n,opa) = isite%qmean_can_theiv (n,ipa) + osite%qmean_can_theta (n,opa) = isite%qmean_can_theta (n,ipa) + osite%qmean_can_vpdef (n,opa) = isite%qmean_can_vpdef (n,ipa) + osite%qmean_can_temp (n,opa) = isite%qmean_can_temp (n,ipa) + osite%qmean_can_shv (n,opa) = isite%qmean_can_shv (n,ipa) + osite%qmean_can_co2 (n,opa) = isite%qmean_can_co2 (n,ipa) + osite%qmean_can_rhos (n,opa) = isite%qmean_can_rhos (n,ipa) + osite%qmean_can_prss (n,opa) = isite%qmean_can_prss (n,ipa) + osite%qmean_gnd_temp (n,opa) = isite%qmean_gnd_temp (n,ipa) + osite%qmean_gnd_shv (n,opa) = isite%qmean_gnd_shv (n,ipa) + osite%qmean_can_ggnd (n,opa) = isite%qmean_can_ggnd (n,ipa) + osite%qmean_sfcw_depth (n,opa) = isite%qmean_sfcw_depth (n,ipa) + osite%qmean_sfcw_energy (n,opa) = isite%qmean_sfcw_energy (n,ipa) + osite%qmean_sfcw_mass (n,opa) = isite%qmean_sfcw_mass (n,ipa) + osite%qmean_sfcw_temp (n,opa) = isite%qmean_sfcw_temp (n,ipa) + osite%qmean_sfcw_fliq (n,opa) = isite%qmean_sfcw_fliq (n,ipa) + osite%qmean_rshort_gnd (n,opa) = isite%qmean_rshort_gnd (n,ipa) + osite%qmean_par_gnd (n,opa) = isite%qmean_par_gnd (n,ipa) + osite%qmean_rlong_gnd (n,opa) = isite%qmean_rlong_gnd (n,ipa) + osite%qmean_rlongup (n,opa) = isite%qmean_rlongup (n,ipa) + osite%qmean_parup (n,opa) = isite%qmean_parup (n,ipa) + osite%qmean_nirup (n,opa) = isite%qmean_nirup (n,ipa) + osite%qmean_rshortup (n,opa) = isite%qmean_rshortup (n,ipa) + osite%qmean_rnet (n,opa) = isite%qmean_rnet (n,ipa) + osite%qmean_albedo (n,opa) = isite%qmean_albedo (n,ipa) + osite%qmean_albedo_beam (n,opa) = isite%qmean_albedo_beam (n,ipa) + osite%qmean_albedo_diff (n,opa) = isite%qmean_albedo_diff (n,ipa) + osite%qmean_rlong_albedo (n,opa) = isite%qmean_rlong_albedo (n,ipa) + osite%qmean_ustar (n,opa) = isite%qmean_ustar (n,ipa) + osite%qmean_tstar (n,opa) = isite%qmean_tstar (n,ipa) + osite%qmean_qstar (n,opa) = isite%qmean_qstar (n,ipa) + osite%qmean_cstar (n,opa) = isite%qmean_cstar (n,ipa) + osite%qmean_carbon_ac (n,opa) = isite%qmean_carbon_ac (n,ipa) + osite%qmean_carbon_st (n,opa) = isite%qmean_carbon_st (n,ipa) + osite%qmean_vapor_gc (n,opa) = isite%qmean_vapor_gc (n,ipa) + osite%qmean_vapor_ac (n,opa) = isite%qmean_vapor_ac (n,ipa) + osite%qmean_throughfall (n,opa) = isite%qmean_throughfall (n,ipa) + osite%qmean_runoff (n,opa) = isite%qmean_runoff (n,ipa) + osite%qmean_drainage (n,opa) = isite%qmean_drainage (n,ipa) + osite%qmean_sensible_gc (n,opa) = isite%qmean_sensible_gc (n,ipa) + osite%qmean_sensible_ac (n,opa) = isite%qmean_sensible_ac (n,ipa) + osite%qmean_qthroughfall (n,opa) = isite%qmean_qthroughfall (n,ipa) + osite%qmean_qrunoff (n,opa) = isite%qmean_qrunoff (n,ipa) + osite%qmean_qdrainage (n,opa) = isite%qmean_qdrainage (n,ipa) + osite%qmsqu_rh (n,opa) = isite%qmsqu_rh (n,ipa) + osite%qmsqu_cwd_rh (n,opa) = isite%qmsqu_cwd_rh (n,ipa) + osite%qmsqu_nep (n,opa) = isite%qmsqu_nep (n,ipa) + osite%qmsqu_rlongup (n,opa) = isite%qmsqu_rlongup (n,ipa) + osite%qmsqu_parup (n,opa) = isite%qmsqu_parup (n,ipa) + osite%qmsqu_nirup (n,opa) = isite%qmsqu_nirup (n,ipa) + osite%qmsqu_rshortup (n,opa) = isite%qmsqu_rshortup (n,ipa) + osite%qmsqu_rnet (n,opa) = isite%qmsqu_rnet (n,ipa) + osite%qmsqu_albedo (n,opa) = isite%qmsqu_albedo (n,ipa) + osite%qmsqu_ustar (n,opa) = isite%qmsqu_ustar (n,ipa) + osite%qmsqu_carbon_ac (n,opa) = isite%qmsqu_carbon_ac (n,ipa) + osite%qmsqu_carbon_st (n,opa) = isite%qmsqu_carbon_st (n,ipa) + osite%qmsqu_vapor_gc (n,opa) = isite%qmsqu_vapor_gc (n,ipa) + osite%qmsqu_vapor_ac (n,opa) = isite%qmsqu_vapor_ac (n,ipa) + osite%qmsqu_sensible_gc (n,opa) = isite%qmsqu_sensible_gc (n,ipa) + osite%qmsqu_sensible_ac (n,opa) = isite%qmsqu_sensible_ac (n,ipa) + !---------------------------------------------------------------------------! + + + !----- Soil variables. -----------------------------------------------------! + do m=1,nzg + osite%qmean_soil_energy(m,n,opa) = isite%qmean_soil_energy(m,n,ipa) + osite%qmean_soil_mstpot(m,n,opa) = isite%qmean_soil_mstpot(m,n,ipa) + osite%qmean_soil_water (m,n,opa) = isite%qmean_soil_water (m,n,ipa) + osite%qmean_soil_temp (m,n,opa) = isite%qmean_soil_temp (m,n,ipa) + osite%qmean_soil_fliq (m,n,opa) = isite%qmean_soil_fliq (m,n,ipa) + osite%qmean_smoist_gg (m,n,opa) = isite%qmean_smoist_gg (m,n,ipa) + osite%qmean_transloss (m,n,opa) = isite%qmean_transloss (m,n,ipa) + osite%qmean_sensible_gg(m,n,opa) = isite%qmean_sensible_gg(m,n,ipa) + end do + !---------------------------------------------------------------------------! + end do + !------------------------------------------------------------------------------! + end if + !---------------------------------------------------------------------------------! + end do opaloop + !------------------------------------------------------------------------------------! + return + end subroutine copy_sitetype + !=======================================================================================! + !=======================================================================================! - !-------- TOTAL CARBON AND NITROGEN POOLS --------------- - ! Added by MCD for NCEAS/FACE intercomparison (Apr 7 2009) - if (associated(cgrid%Cleaf)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%Cleaf,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'CLEAF :11:dail') - call metadata_edio(nvar,igr,'Poly Avg. Leaf Carbon','?','ipoly') - end if - if (associated(cgrid%Croot)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%Croot,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'CROOT :11:dail') - call metadata_edio(nvar,igr,'Poly Avg. Fine Root Carbon','?','ipoly') - end if - if (associated(cgrid%Cstore)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%cstore,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'CSTORE :11:dail') - call metadata_edio(nvar,igr,'Poly Avg. Storage/TNC Carbon','?','ipoly') - end if - if (associated(cgrid%Ccwd)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%Ccwd,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'CCWD :11:dail') - call metadata_edio(nvar,igr,'Poly Avg. Coarse Woody Debris Carbon','?','ipoly') - end if - if (associated(cgrid%Nleaf)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%Nleaf,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'NLEAF :11:dail') - call metadata_edio(nvar,igr,'Poly Avg. Leaf Nitrogen','?','ipoly') - end if - if (associated(cgrid%Ndead)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%Ndead,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'NDEAD :11:dail') - call metadata_edio(nvar,igr,'Poly Avg. Wood Nitrogen','?','ipoly') - end if - if (associated(cgrid%Nroot)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%Nroot,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'NROOT :11:dail') - call metadata_edio(nvar,igr,'Poly Avg. Fine Root Nitrogen','?','ipoly') - end if - if (associated(cgrid%Nstore)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%Nstore,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'NSTORE :11:dail') - call metadata_edio(nvar,igr,'Poly Avg. Storage Nitrogen','?','ipoly') - end if - if (associated(cgrid%Ncwd)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%Ncwd,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'NCWD :11:dail') - call metadata_edio(nvar,igr,'Poly Avg. Leaf Carbon','?','ipoly') - end if - !-------- TOTAL CARBON AND NITROGEN FLUX --------------- - ! Added by MCD for NCEAS/FACE intercomparison (Apr 7 2009) - if (associated(cgrid%Cleaf_grow)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%Cleaf_grow,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'CLEAF_GROW :11:dail') - call metadata_edio(nvar,igr,'Poly Avg. Leaf Carbon Growth','?','ipoly') - end if - if (associated(cgrid%Croot_grow)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%Croot_grow,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'CROOT_GROW :11:dail') - call metadata_edio(nvar,igr,'Poly Avg. Fine Root Carbon Growth','?','ipoly') - end if - if (associated(cgrid%Cdead_grow)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%Cdead_grow,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'CDEAD_GROW :11:dail') - call metadata_edio(nvar,igr,'Poly Avg. Wood Carbon Growth','?','ipoly') - end if - if (associated(cgrid%Cstore_grow)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%Cstore_Grow,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'CSTORE_GROW :11:dail') - call metadata_edio(nvar,igr,'Poly Avg. Storage Carbon growth','?','ipoly') - end if - if (associated(cgrid%Cleaf_litter_flux)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%Cleaf_litter_flux,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'CLEAF_LITTER_FLUX :11:dail') - call metadata_edio(nvar,igr,'Poly Avg. Leaf Litter Carbon Flux','?','ipoly') - end if - if (associated(cgrid%Croot_litter_flux)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%Croot_litter_flux,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'CROOT_LITTER_FLUX :11:dail') - call metadata_edio(nvar,igr,'Poly Avg. Fine Root Litter Carbon Flux','?','ipoly') - end if - if (associated(cgrid%Ccwd_flux)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%Ccwd_flux,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'CCWD_FLUX :11:dail') - call metadata_edio(nvar,igr,'Poly Avg. Coarse Woody Debris Carbon FLUX','?','ipoly') - end if - if (associated(cgrid%Nleaf_grow)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%Nleaf_grow,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'NLEAF_GROW :11:dail') - call metadata_edio(nvar,igr,'Poly Avg. Leaf Nitrogen growth','?','ipoly') - end if - if (associated(cgrid%Nroot_grow)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%Nroot_grow,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'NROOT_GROW :11:dail') - call metadata_edio(nvar,igr,'Poly Avg. Fine Root Nitrogen Growth','?','ipoly') - end if - if (associated(cgrid%Ndead_grow)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%Ndead_grow,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'NDEAD_GROW :11:dail') - call metadata_edio(nvar,igr,'Poly Avg. Wood Nitrogen growth','?','ipoly') - end if - if (associated(cgrid%Nstore_grow)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%Nstore_grow,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'NSTORE_GROW :11:dail') - call metadata_edio(nvar,igr,'Poly Avg. Storage Nitrogen Growth','?','ipoly') - end if - if (associated(cgrid%Nleaf_litter_flux)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%Nleaf_litter_flux,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'NLEAF_LITTER_FLUX :11:dail') - call metadata_edio(nvar,igr,'Poly Avg. Leaf litter Nitrogen flux','?','ipoly') - end if - if (associated(cgrid%Nroot_litter_flux)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%Nroot_litter_flux,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'NROOT_LITTER_FLUX :11:dail') - call metadata_edio(nvar,igr,'Poly Avg. fine root litter Nitrogen flux','?','ipoly') - end if - if (associated(cgrid%Ncwd_flux)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%Ncwd_flux,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'NCWD_FLUX :11:dail') - call metadata_edio(nvar,igr,'Poly Avg. CWD Nitrogen flux','?','ipoly') - end if - if (associated(cgrid%Nbiomass_uptake)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%Nbiomass_uptake,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'NBIOMASS_UPTAKE :11:dail') - call metadata_edio(nvar,igr,'Poly Avg. Nitrogen Uptake','?','ipoly') - end if - if (associated(cgrid%Ngross_min)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%Ngross_min,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'NGROSS_MIN :11:dail') - call metadata_edio(nvar,igr,'Poly Avg. Gross Nitrogen mineralization','?','ipoly') - end if - if (associated(cgrid%Nnet_min)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%Nnet_min,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'NNET_MIN :11:dail') - call metadata_edio(nvar,igr,'Poly Avg. Net Nitrogen mineralization','?','ipoly') - end if - ! ---------------------------------------------- - if (associated(cgrid%avg_atm_tmp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_atm_tmp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_ATM_TMP :11:hist:opti:anal') - call metadata_edio(nvar,igr,'Polygon Averaged Atmospheric Temperature at Reference Height','[K]','ipoly') - end if - - if (associated(cgrid%avg_atm_vpdef)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_atm_vpdef,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_ATM_VPDEF :11:hist:opti:anal') - call metadata_edio(nvar,igr,'Polygon Averaged Atmospheric VPD at Reference Height','[Pa]','ipoly') - end if - - if (associated(cgrid%avg_atm_shv)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_atm_shv,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_ATM_SHV :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Averaged Atmospheric Specific Humidity at Reference Height','[kg/kg]','ipoly') - end if - - if (associated(cgrid%avg_rshort)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_rshort,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_RSHORT :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Total Incident Shortwave Radiation','[W/m2]','ipoly') - end if - - if (associated(cgrid%avg_rshort_diffuse)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_rshort_diffuse,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_RSHORT_DIFFUSE :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Diffuse Incident Shortwave Radiation','[W/m2]','ipoly') - end if - - if (associated(cgrid%avg_par)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_par,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_PAR :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Total Incident PAR','[W/m2]','ipoly') - end if - - if (associated(cgrid%avg_par_diffuse)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_par_diffuse,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_PAR_DIFFUSE :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Diffuse Incident PAR','[W/m2]','ipoly') - end if - - if (associated(cgrid%avg_rlong)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_rlong,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_RLONG :11:hist:opti:anal') - call metadata_edio(nvar,igr,'Polygon Average Incident Longwave Radiation','[W/m2]','ipoly') - end if - - if (associated(cgrid%avg_pcpg)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_pcpg,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_PCPG :11:hist:opti:anal') - call metadata_edio(nvar,igr,'Polygon Average Total Precipitation Rate','[kg/m2/s]','ipoly') - end if - - if (associated(cgrid%avg_qpcpg)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_qpcpg,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_QPCPG:11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Precipitation Internal Energy Deposition Rate','[W/m2/s]','ipoly') - end if - - if (associated(cgrid%avg_dpcpg)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_dpcpg,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_DPCPG :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Total Precipitation Depth Rate ','[mm/m2/s]','ipoly') - end if - - if (associated(cgrid%avg_vels)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_vels,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_VELS :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Wind Magnitude (with instability correction)','[m/s]','ipoly') - end if - - if (associated(cgrid%avg_atm_prss)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_atm_prss,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_ATM_PRSS :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Atmospheric Pressure at Ref. Height','[Pa]','ipoly') - end if - - if (associated(cgrid%avg_exner)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_exner,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_EXNER :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Exner Correction','[????]','ipoly') - end if - - if (associated(cgrid%avg_geoht)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_geoht,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_GEOHT :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Geopotential of Met. Forcing Refernce Height','[m]','ipoly') - end if - - if (associated(cgrid%avg_atm_co2)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_atm_co2,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_ATM_CO2 :11:hist:opti:anal') - call metadata_edio(nvar,igr,'Polygon Average Atmospheric CO2 Concentration at Ref. Height','[ppm]','ipoly') - end if - - if (associated(cgrid%avg_albedo)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_albedo,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_ALBEDO :11:hist:anal:opti') - call metadata_edio(nvar,igr,'Polygon Average Surface Albedo','[W/W]','ipoly') - end if - - if (associated(cgrid%avg_albedo_beam)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_albedo_beam,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_ALBEDO_BEAM :11:hist:anal:opti') - call metadata_edio(nvar,igr,'Polygon Average Surface direct Albedo','[W/W]','ipoly') - end if - - if (associated(cgrid%avg_albedo_diffuse)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_albedo_diffuse,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_ALBEDO_DIFFUSE :11:hist:anal:opti') - call metadata_edio(nvar,igr,'Polygon Average Surface diffuse Albedo','[W/W]','ipoly') - end if - - if (associated(cgrid%avg_rlong_albedo)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_rlong_albedo,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_RLONG_ALBEDO :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Albedo for Longwave Radiation','[W/m2]','ipoly') - end if - - if (associated(cgrid%avg_rlongup)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_rlongup,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_RLONGUP :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Upwelling Longwave Radiation','[W/m2]','ipoly') - end if - - if (associated(cgrid%avg_parup)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_parup,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_PARUP :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Upwelling PAR','[W/m2]','ipoly') - end if - - if (associated(cgrid%avg_nirup)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_nirup,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_NIRUP :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Upwelling NIR','[W/m2]','ipoly') - end if - - if (associated(cgrid%avg_rshortup)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_rshortup,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_RSHORTUP :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Upwelling Shortwave Radiation','[W/m2]','ipoly') - end if - - if (associated(cgrid%avg_rnet)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_rnet,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_RNET :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Net Radiation','[W/m2]','ipoly') - end if - if (associated(cgrid%max_leaf_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%max_leaf_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MAX_LEAF_TEMP :11:anal') - call metadata_edio(nvar,igr,'Temp of the hottest cohort in the polygon','[K]','ipoly') - end if + !=======================================================================================! + !=======================================================================================! + ! This subroutine copies part of one patch to another (only the ones where mask ! + ! is .true.). Please notice the following requirements. ! + ! ! + ! 1. ISITE and LMASK must have dimension MASKSZ ! + ! 2. OSITE must have dimension NEWSZ ! + ! 3. The number of .true. elements of LMASK must be NEWSZ ! + ! This subroutine assumes that the size of vectors in osite is the number of true ! + ! elements in mask, whilst the size of the vectors in isite must be the size of the ! + ! mask itself. ! + ! ! + ! IMPORTANT: This routine currently assumes that the output site has not allocated ! + ! any cohort yet, because the length of these nested vectors depend on the ! + ! donor patch vector sizes. Never call this sub-routine if osite has been ! + ! allocated before. ! + !---------------------------------------------------------------------------------------! + subroutine copy_sitetype_mask(isite,osite,lmask,isize,osize) - if (associated(cgrid%min_leaf_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%min_leaf_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MIN_LEAF_TEMP :11:anal') - call metadata_edio(nvar,igr,'Temp of the coldest cohort in the polygon','[K]','ipoly') - end if - if (associated(cgrid%max_wood_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%max_wood_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MAX_WOOD_TEMP :11:anal') - call metadata_edio(nvar,igr,'Temp of the hottest cohort in the polygon','[K]','ipoly') - end if + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(sitetype) , target :: isite ! Input (donor) site + type(sitetype) , target :: osite ! Output (receptor) site + integer , intent(in) :: isize ! Input size + integer , intent(in) :: osize ! Output size + logical , dimension(isize), intent(in) :: lmask ! Mask + !----- Local variables. -------------------------------------------------------------! + integer , dimension(isize) :: allind + integer , dimension(osize) :: iindex + integer :: i + integer :: o + integer :: z + integer :: m + integer :: n + !------------------------------------------------------------------------------------! - if (associated(cgrid%min_wood_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%min_wood_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MIN_WOOD_TEMP :11:anal') - call metadata_edio(nvar,igr,'Temp of the coldest cohort in the polygon','[K]','ipoly') - end if - if (associated(cgrid%max_soil_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%max_soil_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MAX_SOIL_TEMP :11:anal') - call metadata_edio(nvar,igr,'Temp of the hottest soil layer in the polygon','[K]','ipoly') - end if + !------------------------------------------------------------------------------------! + ! Map the indices between the input and the output vectors. ! + !------------------------------------------------------------------------------------! + z = count(lmask) + !----- Crash if the dimensions don't match. -----------------------------------------! + if (z /= osize) then + write (unit=*,fmt='(a,1x,i12)') ' Z = ',z + write (unit=*,fmt='(a,1x,i12)') ' OSIZE = ',osize + call fatal_error('Mask doesn''t have OSIZE .true. elements' & + ,'copy_sitetype_mask','ed_state_vars.f90') + end if + !----- Save the indices from where we are going to copy. ----------------------------! + allind = (/ (i,i=1,isize) /) + iindex = pack(allind,lmask) + !------------------------------------------------------------------------------------! - if (associated(cgrid%min_soil_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%min_soil_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MIN_SOIL_TEMP :11:anal') - call metadata_edio(nvar,igr,'Temp of the coldest soil layer in the polygon','[K]','ipoly') - end if - - if (associated(cgrid%avg_leaf_energy)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_leaf_energy,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_LEAF_ENERGY :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Internal Energy of Vegetation','[J/m2]','ipoly') - end if - if (associated(cgrid%avg_leaf_hcap)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_leaf_hcap,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_LEAF_HCAP :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average of Vegetation heat capacity','[J/m2/K]','ipoly') - end if - if (associated(cgrid%avg_leaf_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_leaf_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_LEAF_TEMP :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Temperature of Vegetation','[K]','ipoly') - end if - if (associated(cgrid%avg_leaf_vpdef)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_leaf_vpdef,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_LEAF_VPDEF :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average VPD of Vegetation','[Pa]','ipoly') - end if + !------------------------------------------------------------------------------------! + ! Copy the cohorts. ! + !------------------------------------------------------------------------------------! + do o=1,osize + i = iindex(o) + call allocate_patchtype(osite%patch(o),isite%patch(i)%ncohorts) + call copy_patchtype (isite%patch(i),osite%patch(o) & + ,1,isite%patch(i)%ncohorts,1,osite%patch(o)%ncohorts) + end do + !------------------------------------------------------------------------------------! - if (associated(cgrid%avg_leaf_fliq)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_leaf_fliq,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_LEAF_FLIQ :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Liquid fraction of Vegetation Sfc Water','[--]','ipoly') - end if - - if (associated(cgrid%avg_leaf_water)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_leaf_water,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_LEAF_WATER :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Resident Leaf Surface Water','[kg/m2]','ipoly') - end if - - if (associated(cgrid%avg_wood_energy)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_wood_energy,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_WOOD_ENERGY :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Internal Energy of wood','[J/m2]','ipoly') - end if - if (associated(cgrid%avg_wood_hcap)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_wood_hcap,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_WOOD_HCAP :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average of wood heat capacity','[J/m2/K]','ipoly') - end if + !------------------------------------------------------------------------------------! + ! We break the subroutines into smaller pieces so Fortran doesn't complain... ! + !------------------------------------------------------------------------------------! + call copy_sitetype_mask_inst (isite,osite,z,lmask,isize,osize) + call copy_sitetype_mask_fmean(isite,osite,z,lmask,isize,osize) + if (writing_long) call copy_sitetype_mask_dmean(isite,osite,z,lmask,isize,osize) + if (writing_eorq) call copy_sitetype_mask_mmean(isite,osite,z,lmask,isize,osize) + if (writing_eorq) call copy_sitetype_mask_qmean(isite,osite,z,lmask,isize,osize) + !------------------------------------------------------------------------------------! - if (associated(cgrid%avg_wood_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_wood_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_WOOD_TEMP :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Wood of Vegetation','[K]','ipoly') - end if + return + end subroutine copy_sitetype_mask + !=======================================================================================! + !=======================================================================================! - if (associated(cgrid%avg_wood_fliq)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_wood_fliq,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_WOOD_FLIQ :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Liquid fraction of Vegetation Sfc Water','[--]','ipoly') - end if - - if (associated(cgrid%avg_wood_water)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_wood_water,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_WOOD_WATER :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Resident Wood Surface Water','[kg/m2]','ipoly') - end if - - if (associated(cgrid%avg_can_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_can_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_CAN_TEMP :11:hist:anal:opti') - call metadata_edio(nvar,igr,'Polygon Average Temperature of Canopy Air Space','[K]','ipoly') - end if - - if (associated(cgrid%avg_can_shv)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_can_shv,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_CAN_SHV :11:hist:anal:opti') - call metadata_edio(nvar,igr,'Polygon Average Specific Humidity of Canopy Air','[kg/kg]','NA') - end if - - if (associated(cgrid%avg_can_co2)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_can_co2,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_CAN_CO2 :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average CO2 mixing ratio of Canopy Air','[umol/mol]','NA') - end if - - if (associated(cgrid%avg_can_rhos)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_can_rhos,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_CAN_RHOS :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Density of Canopy Air','[kg/m3]','NA') - end if - - if (associated(cgrid%avg_can_prss)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_can_prss,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_CAN_PRSS :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Canopy Air Pressure','[Pa]','NA') - end if - - if (associated(cgrid%avg_can_theta)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_can_theta,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_CAN_THETA :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Canopy Air Potential temperature','[K]','NA') - end if - - if (associated(cgrid%avg_can_theiv)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_can_theiv,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_CAN_THEIV :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Canopy Air ice-vapour equiv. pot. temp.','[K]','NA') - end if - - if (associated(cgrid%avg_can_vpdef)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_can_vpdef,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_CAN_VPDEF :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Canopy Air VPD.','[Pa]','NA') - end if - - if (associated(cgrid%avg_can_depth)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_can_depth,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_CAN_DEPTH :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Canopy height','[m]','NA') - end if - - if (associated(cgrid%avg_soil_wetness)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_soil_wetness,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_SOIL_WETNESS :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Soil Wetness RELATIVE TO WILTING POINT','[m3/m3]','ipoly') !relative to wilting point - end if - - if (associated(cgrid%avg_skin_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_skin_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_SKIN_TEMP :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Temperature of all surfaces','[K]','ipoly') - end if - - if (associated(cgrid%avg_available_water)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_available_water,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_AVAILABLE_WATER :11:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Available water','[K]','ipoly') - end if - - ! Daily and monthly variables. Note that all these variables need to be stored at the - ! history file, because the averaging can be resumed... - - if(associated(cgrid%dmean_gpp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_gpp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_GPP :11:hist:dail') - call metadata_edio(nvar,igr,'Polygon Average Daily Integrated Gross Primary Productivity','[kgC/m2/yr]','ipoly') - end if - - if (associated(cgrid%dmean_nppleaf)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_nppleaf,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_NPPLEAF :11:hist:dail') - call metadata_edio(nvar,igr,'Polygon Average Daily NPP leaf','[kgC/m2/yr]','ipoly') - end if - if (associated(cgrid%dmean_nppfroot)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_nppfroot,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_NPPFROOT :11:hist:dail') - call metadata_edio(nvar,igr,'Polygon Average Daily NPP froot','[kgC/m2/yr]','ipoly') - end if - - if (associated(cgrid%dmean_nppsapwood)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_nppsapwood,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_NPPSAPWOOD :11:hist:dail') - call metadata_edio(nvar,igr,'Polygon Average Daily NPP sapwood','[kgC/m2/yr]','ipoly') - end if - if (associated(cgrid%dmean_nppcroot)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_nppcroot,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_NPPCROOT :11:hist:dail') - call metadata_edio(nvar,igr,'Polygon Average Daily NPP croot','[kgC/m2/yr]','ipoly') - end if - if (associated(cgrid%dmean_nppseeds)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_nppseeds,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_NPPSEEDS :11:hist:dail') - call metadata_edio(nvar,igr,'Polygon Average Daily NPP seeds','[kgC/m2/yr]','ipoly') - end if - if (associated(cgrid%dmean_nppwood)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_nppwood,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_NPPWOOD :11:hist:dail') - call metadata_edio(nvar,igr,'Polygon Average Daily NPP wood','[kgC/m2/yr]','ipoly') - end if - - if (associated(cgrid%dmean_nppdaily)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_nppdaily,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_NPPDAILY :11:hist:dail') - call metadata_edio(nvar,igr,'Polygon Average Daily NPP daily','[kgC/m2/yr]','ipoly') - end if + !=======================================================================================! + !=======================================================================================! + ! This sub-routine copies the variables that are not fmean, dmean, mmean, mmsqu, ! + ! qmean, and qmsqu. This sub-routine should be called only from copy_sitetype_mask!!! ! + !---------------------------------------------------------------------------------------! + subroutine copy_sitetype_mask_inst (isite,osite,z,lmask,isize,osize) + + + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(sitetype) , target :: isite ! Input (donor) site + type(sitetype) , target :: osite ! Output (receptor) site + integer , intent(in) :: z ! Number of elements + integer , intent(in) :: isize ! Input size + integer , intent(in) :: osize ! Output size + logical , dimension(isize), intent(in) :: lmask ! Mask + !----- Local variables. -------------------------------------------------------------! + integer :: i + integer :: o + integer :: m + integer :: n + !------------------------------------------------------------------------------------! + + + !----- Scalars. ---------------------------------------------------------------------! + osite%paco_id (1:z) = pack(isite%paco_id ,lmask) + osite%paco_n (1:z) = pack(isite%paco_n ,lmask) + osite%cohort_count (1:z) = pack(isite%cohort_count ,lmask) + osite%pname (1:z) = pack(isite%pname ,lmask) + osite%area (1:z) = pack(isite%area ,lmask) + osite%age (1:z) = pack(isite%age ,lmask) + osite%dist_type (1:z) = pack(isite%dist_type ,lmask) + osite%fast_soil_C (1:z) = pack(isite%fast_soil_C ,lmask) + osite%slow_soil_C (1:z) = pack(isite%slow_soil_C ,lmask) + osite%structural_soil_C (1:z) = pack(isite%structural_soil_C ,lmask) + osite%structural_soil_L (1:z) = pack(isite%structural_soil_L ,lmask) + osite%mineralized_soil_N (1:z) = pack(isite%mineralized_soil_N ,lmask) + osite%fast_soil_N (1:z) = pack(isite%fast_soil_N ,lmask) + osite%sum_dgd (1:z) = pack(isite%sum_dgd ,lmask) + osite%sum_chd (1:z) = pack(isite%sum_chd ,lmask) + osite%plantation (1:z) = pack(isite%plantation ,lmask) + osite%can_theiv (1:z) = pack(isite%can_theiv ,lmask) + osite%can_vpdef (1:z) = pack(isite%can_vpdef ,lmask) + osite%can_temp (1:z) = pack(isite%can_temp ,lmask) + osite%can_temp_pv (1:z) = pack(isite%can_temp_pv ,lmask) + osite%can_shv (1:z) = pack(isite%can_shv ,lmask) + osite%can_co2 (1:z) = pack(isite%can_co2 ,lmask) + osite%can_rhos (1:z) = pack(isite%can_rhos ,lmask) + osite%can_prss (1:z) = pack(isite%can_prss ,lmask) + osite%can_theta (1:z) = pack(isite%can_theta ,lmask) + osite%can_depth (1:z) = pack(isite%can_depth ,lmask) + osite%opencan_frac (1:z) = pack(isite%opencan_frac ,lmask) + osite%ggbare (1:z) = pack(isite%ggbare ,lmask) + osite%ggveg (1:z) = pack(isite%ggveg ,lmask) + osite%ggnet (1:z) = pack(isite%ggnet ,lmask) + osite%ggsoil (1:z) = pack(isite%ggsoil ,lmask) + osite%nlev_sfcwater (1:z) = pack(isite%nlev_sfcwater ,lmask) + osite%ground_shv (1:z) = pack(isite%ground_shv ,lmask) + osite%ground_ssh (1:z) = pack(isite%ground_ssh ,lmask) + osite%ground_temp (1:z) = pack(isite%ground_temp ,lmask) + osite%ground_fliq (1:z) = pack(isite%ground_fliq ,lmask) + osite%rough (1:z) = pack(isite%rough ,lmask) + osite%par_l_max (1:z) = pack(isite%par_l_max ,lmask) + osite%par_l_beam_max (1:z) = pack(isite%par_l_beam_max ,lmask) + osite%par_l_diffuse_max (1:z) = pack(isite%par_l_diffuse_max ,lmask) + osite%avg_daily_temp (1:z) = pack(isite%avg_daily_temp ,lmask) + osite%avg_monthly_gndwater (1:z) = pack(isite%avg_monthly_gndwater ,lmask) + osite%avg_monthly_waterdef (1:z) = pack(isite%avg_monthly_waterdef ,lmask) + osite%wbudget_loss2atm (1:z) = pack(isite%wbudget_loss2atm ,lmask) + osite%wbudget_denseffect (1:z) = pack(isite%wbudget_denseffect ,lmask) + osite%wbudget_precipgain (1:z) = pack(isite%wbudget_precipgain ,lmask) + osite%wbudget_loss2runoff (1:z) = pack(isite%wbudget_loss2runoff ,lmask) + osite%wbudget_loss2drainage (1:z) = pack(isite%wbudget_loss2drainage ,lmask) + osite%wbudget_initialstorage (1:z) = pack(isite%wbudget_initialstorage ,lmask) + osite%wbudget_residual (1:z) = pack(isite%wbudget_residual ,lmask) + osite%ebudget_loss2atm (1:z) = pack(isite%ebudget_loss2atm ,lmask) + osite%ebudget_denseffect (1:z) = pack(isite%ebudget_denseffect ,lmask) + osite%ebudget_prsseffect (1:z) = pack(isite%ebudget_prsseffect ,lmask) + osite%ebudget_loss2runoff (1:z) = pack(isite%ebudget_loss2runoff ,lmask) + osite%ebudget_loss2drainage (1:z) = pack(isite%ebudget_loss2drainage ,lmask) + osite%ebudget_netrad (1:z) = pack(isite%ebudget_netrad ,lmask) + osite%ebudget_precipgain (1:z) = pack(isite%ebudget_precipgain ,lmask) + osite%ebudget_initialstorage (1:z) = pack(isite%ebudget_initialstorage ,lmask) + osite%ebudget_residual (1:z) = pack(isite%ebudget_residual ,lmask) + osite%co2budget_initialstorage (1:z) = pack(isite%co2budget_initialstorage ,lmask) + osite%co2budget_residual (1:z) = pack(isite%co2budget_residual ,lmask) + osite%co2budget_loss2atm (1:z) = pack(isite%co2budget_loss2atm ,lmask) + osite%co2budget_denseffect (1:z) = pack(isite%co2budget_denseffect ,lmask) + osite%co2budget_gpp (1:z) = pack(isite%co2budget_gpp ,lmask) + osite%co2budget_plresp (1:z) = pack(isite%co2budget_plresp ,lmask) + osite%co2budget_rh (1:z) = pack(isite%co2budget_rh ,lmask) + osite%today_A_decomp (1:z) = pack(isite%today_A_decomp ,lmask) + osite%today_Af_decomp (1:z) = pack(isite%today_Af_decomp ,lmask) + osite%veg_rough (1:z) = pack(isite%veg_rough ,lmask) + osite%veg_height (1:z) = pack(isite%veg_height ,lmask) + osite%veg_displace (1:z) = pack(isite%veg_displace ,lmask) + osite%fsc_in (1:z) = pack(isite%fsc_in ,lmask) + osite%ssc_in (1:z) = pack(isite%ssc_in ,lmask) + osite%ssl_in (1:z) = pack(isite%ssl_in ,lmask) + osite%fsn_in (1:z) = pack(isite%fsn_in ,lmask) + osite%total_plant_nitrogen_uptake(1:z) = & + pack(isite%total_plant_nitrogen_uptake,lmask) + osite%mineralized_N_loss (1:z) = pack(isite%mineralized_N_loss ,lmask) + osite%mineralized_N_input (1:z) = pack(isite%mineralized_N_input ,lmask) + osite%rshort_g (1:z) = pack(isite%rshort_g ,lmask) + osite%rshort_g_beam (1:z) = pack(isite%rshort_g_beam ,lmask) + osite%rshort_g_diffuse (1:z) = pack(isite%rshort_g_diffuse ,lmask) + osite%par_g (1:z) = pack(isite%par_g ,lmask) + osite%par_g_beam (1:z) = pack(isite%par_g_beam ,lmask) + osite%par_g_diffuse (1:z) = pack(isite%par_g_diffuse ,lmask) + osite%par_b (1:z) = pack(isite%par_b ,lmask) + osite%par_b_beam (1:z) = pack(isite%par_b_beam ,lmask) + osite%par_b_diffuse (1:z) = pack(isite%par_b_diffuse ,lmask) + osite%nir_b (1:z) = pack(isite%nir_b ,lmask) + osite%nir_b_beam (1:z) = pack(isite%nir_b_beam ,lmask) + osite%nir_b_diffuse (1:z) = pack(isite%nir_b_diffuse ,lmask) + osite%rlong_g (1:z) = pack(isite%rlong_g ,lmask) + osite%rlong_g_surf (1:z) = pack(isite%rlong_g_surf ,lmask) + osite%rlong_g_incid (1:z) = pack(isite%rlong_g_incid ,lmask) + osite%rlong_s (1:z) = pack(isite%rlong_s ,lmask) + osite%rlong_s_surf (1:z) = pack(isite%rlong_s_surf ,lmask) + osite%rlong_s_incid (1:z) = pack(isite%rlong_s_incid ,lmask) + osite%albedo (1:z) = pack(isite%albedo ,lmask) + osite%albedo_beam (1:z) = pack(isite%albedo_beam ,lmask) + osite%albedo_diffuse (1:z) = pack(isite%albedo_diffuse ,lmask) + osite%rlong_albedo (1:z) = pack(isite%rlong_albedo ,lmask) + osite%rnet (1:z) = pack(isite%rnet ,lmask) + osite%rlongup (1:z) = pack(isite%rlongup ,lmask) + osite%parup (1:z) = pack(isite%parup ,lmask) + osite%nirup (1:z) = pack(isite%nirup ,lmask) + osite%rshortup (1:z) = pack(isite%rshortup ,lmask) + osite%total_sfcw_depth (1:z) = pack(isite%total_sfcw_depth ,lmask) + osite%snowfac (1:z) = pack(isite%snowfac ,lmask) + osite%A_decomp (1:z) = pack(isite%A_decomp ,lmask) + osite%f_decomp (1:z) = pack(isite%f_decomp ,lmask) + osite%rh (1:z) = pack(isite%rh ,lmask) + osite%cwd_rh (1:z) = pack(isite%cwd_rh ,lmask) + osite%plant_ag_biomass (1:z) = pack(isite%plant_ag_biomass ,lmask) + osite%htry (1:z) = pack(isite%htry ,lmask) + osite%hprev (1:z) = pack(isite%hprev ,lmask) + osite%ustar (1:z) = pack(isite%ustar ,lmask) + osite%tstar (1:z) = pack(isite%tstar ,lmask) + osite%qstar (1:z) = pack(isite%qstar ,lmask) + osite%cstar (1:z) = pack(isite%cstar ,lmask) + osite%zeta (1:z) = pack(isite%zeta ,lmask) + osite%ribulk (1:z) = pack(isite%ribulk ,lmask) + osite%upwp (1:z) = pack(isite%upwp ,lmask) + osite%qpwp (1:z) = pack(isite%qpwp ,lmask) + osite%cpwp (1:z) = pack(isite%cpwp ,lmask) + osite%tpwp (1:z) = pack(isite%tpwp ,lmask) + osite%wpwp (1:z) = pack(isite%wpwp ,lmask) + osite%watertable (1:z) = pack(isite%watertable ,lmask) + osite%moist_dz (1:z) = pack(isite%moist_dz ,lmask) + osite%ksat (1:z) = pack(isite%ksat ,lmask) + osite%soil_sat_energy (1:z) = pack(isite%soil_sat_energy ,lmask) + osite%soil_sat_water (1:z) = pack(isite%soil_sat_water ,lmask) + osite%soil_sat_heat (1:z) = pack(isite%soil_sat_heat ,lmask) + osite%runoff_rate (1:z) = pack(isite%runoff_rate ,lmask) + osite%runoff (1:z) = pack(isite%runoff ,lmask) + osite%qrunoff (1:z) = pack(isite%qrunoff ,lmask) + !------------------------------------------------------------------------------------! + + !----- Temporary pounding/snow layer variables. -------------------------------------! + do m=1,nzs + osite%sfcwater_mass (m,1:z) = pack(isite%sfcwater_mass (m,:),lmask) + osite%sfcwater_energy (m,1:z) = pack(isite%sfcwater_energy (m,:),lmask) + osite%sfcwater_depth (m,1:z) = pack(isite%sfcwater_depth (m,:),lmask) + osite%sfcwater_tempk (m,1:z) = pack(isite%sfcwater_tempk (m,:),lmask) + osite%sfcwater_fracliq(m,1:z) = pack(isite%sfcwater_fracliq(m,:),lmask) + osite%rshort_s (m,1:z) = pack(isite%rshort_s (m,:),lmask) + osite%rshort_s_beam (m,1:z) = pack(isite%rshort_s_beam (m,:),lmask) + osite%rshort_s_diffuse(m,1:z) = pack(isite%rshort_s_diffuse(m,:),lmask) + osite%par_s (m,1:z) = pack(isite%par_s (m,:),lmask) + osite%par_s_beam (m,1:z) = pack(isite%par_s_beam (m,:),lmask) + osite%par_s_diffuse (m,1:z) = pack(isite%par_s_diffuse (m,:),lmask) + end do + !------------------------------------------------------------------------------------! + + + !----- Soil variables. --------------------------------------------------------------! + do m=1,nzg + osite%soil_energy (m,1:z) = pack(isite%soil_energy (m,:),lmask) + osite%soil_mstpot (m,1:z) = pack(isite%soil_mstpot (m,:),lmask) + osite%soil_water (m,1:z) = pack(isite%soil_water (m,:),lmask) + osite%soil_tempk (m,1:z) = pack(isite%soil_tempk (m,:),lmask) + osite%soil_fracliq (m,1:z) = pack(isite%soil_fracliq (m,:),lmask) + osite%rootdense (m,1:z) = pack(isite%rootdense (m,:),lmask) + end do + !------------------------------------------------------------------------------------! + + + !----- PFT variables. ---------------------------------------------------------------! + do m=1,n_pft + osite%A_o_max ( m,1:z) = pack(isite%A_o_max ( m,:),lmask) + osite%A_c_max ( m,1:z) = pack(isite%A_c_max ( m,:),lmask) + osite%repro ( m,1:z) = pack(isite%repro ( m,:),lmask) + do n=1,ff_nhgt + osite%cumlai_profile(m,n,1:z) = pack(isite%cumlai_profile(m,n,:),lmask) + end do + end do + !------------------------------------------------------------------------------------! + + + !----- "3" variables. ---------------------------------------------------------------! + do m=1,3 + osite%runoff_A(m,1:z) = pack(isite%runoff_A(m,:),lmask) + end do + !------------------------------------------------------------------------------------! + + + + return + end subroutine copy_sitetype_mask_inst + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This sub-routine copies the variables that are fmean. This sub-routine should be ! + ! called only from copy_sitetype_mask!!! ! + !---------------------------------------------------------------------------------------! + subroutine copy_sitetype_mask_fmean(isite,osite,z,lmask,isize,osize) + + + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(sitetype) , target :: isite ! Input (donor) site + type(sitetype) , target :: osite ! Output (receptor) site + integer , intent(in) :: z ! Number of elements + integer , intent(in) :: isize ! Input size + integer , intent(in) :: osize ! Output size + logical , dimension(isize), intent(in) :: lmask ! Mask + !----- Local variables. -------------------------------------------------------------! + integer :: i + integer :: o + integer :: m + integer :: n + !------------------------------------------------------------------------------------! + + osite%fmean_rh (1:z) = pack(isite%fmean_rh ,lmask) + osite%fmean_cwd_rh (1:z) = pack(isite%fmean_cwd_rh ,lmask) + osite%fmean_nep (1:z) = pack(isite%fmean_nep ,lmask) + osite%fmean_rk4step (1:z) = pack(isite%fmean_rk4step ,lmask) + osite%fmean_available_water (1:z) = pack(isite%fmean_available_water ,lmask) + osite%fmean_can_theiv (1:z) = pack(isite%fmean_can_theiv ,lmask) + osite%fmean_can_theta (1:z) = pack(isite%fmean_can_theta ,lmask) + osite%fmean_can_vpdef (1:z) = pack(isite%fmean_can_vpdef ,lmask) + osite%fmean_can_temp (1:z) = pack(isite%fmean_can_temp ,lmask) + osite%fmean_can_shv (1:z) = pack(isite%fmean_can_shv ,lmask) + osite%fmean_can_co2 (1:z) = pack(isite%fmean_can_co2 ,lmask) + osite%fmean_can_rhos (1:z) = pack(isite%fmean_can_rhos ,lmask) + osite%fmean_can_prss (1:z) = pack(isite%fmean_can_prss ,lmask) + osite%fmean_gnd_temp (1:z) = pack(isite%fmean_gnd_temp ,lmask) + osite%fmean_gnd_shv (1:z) = pack(isite%fmean_gnd_shv ,lmask) + osite%fmean_can_ggnd (1:z) = pack(isite%fmean_can_ggnd ,lmask) + osite%fmean_sfcw_depth (1:z) = pack(isite%fmean_sfcw_depth ,lmask) + osite%fmean_sfcw_energy (1:z) = pack(isite%fmean_sfcw_energy ,lmask) + osite%fmean_sfcw_mass (1:z) = pack(isite%fmean_sfcw_mass ,lmask) + osite%fmean_sfcw_temp (1:z) = pack(isite%fmean_sfcw_temp ,lmask) + osite%fmean_sfcw_fliq (1:z) = pack(isite%fmean_sfcw_fliq ,lmask) + osite%fmean_rshort_gnd (1:z) = pack(isite%fmean_rshort_gnd ,lmask) + osite%fmean_par_gnd (1:z) = pack(isite%fmean_par_gnd ,lmask) + osite%fmean_rlong_gnd (1:z) = pack(isite%fmean_rlong_gnd ,lmask) + osite%fmean_rlongup (1:z) = pack(isite%fmean_rlongup ,lmask) + osite%fmean_parup (1:z) = pack(isite%fmean_parup ,lmask) + osite%fmean_nirup (1:z) = pack(isite%fmean_nirup ,lmask) + osite%fmean_rshortup (1:z) = pack(isite%fmean_rshortup ,lmask) + osite%fmean_rnet (1:z) = pack(isite%fmean_rnet ,lmask) + osite%fmean_albedo (1:z) = pack(isite%fmean_albedo ,lmask) + osite%fmean_albedo_beam (1:z) = pack(isite%fmean_albedo_beam ,lmask) + osite%fmean_albedo_diff (1:z) = pack(isite%fmean_albedo_diff ,lmask) + osite%fmean_rlong_albedo (1:z) = pack(isite%fmean_rlong_albedo ,lmask) + osite%fmean_ustar (1:z) = pack(isite%fmean_ustar ,lmask) + osite%fmean_tstar (1:z) = pack(isite%fmean_tstar ,lmask) + osite%fmean_qstar (1:z) = pack(isite%fmean_qstar ,lmask) + osite%fmean_cstar (1:z) = pack(isite%fmean_cstar ,lmask) + osite%fmean_carbon_ac (1:z) = pack(isite%fmean_carbon_ac ,lmask) + osite%fmean_carbon_st (1:z) = pack(isite%fmean_carbon_st ,lmask) + osite%fmean_vapor_gc (1:z) = pack(isite%fmean_vapor_gc ,lmask) + osite%fmean_vapor_ac (1:z) = pack(isite%fmean_vapor_ac ,lmask) + osite%fmean_throughfall (1:z) = pack(isite%fmean_throughfall ,lmask) + osite%fmean_runoff (1:z) = pack(isite%fmean_runoff ,lmask) + osite%fmean_drainage (1:z) = pack(isite%fmean_drainage ,lmask) + osite%fmean_sensible_gc (1:z) = pack(isite%fmean_sensible_gc ,lmask) + osite%fmean_sensible_ac (1:z) = pack(isite%fmean_sensible_ac ,lmask) + osite%fmean_qthroughfall (1:z) = pack(isite%fmean_qthroughfall ,lmask) + osite%fmean_qrunoff (1:z) = pack(isite%fmean_qrunoff ,lmask) + osite%fmean_qdrainage (1:z) = pack(isite%fmean_qdrainage ,lmask) + + + !----- Soil variables. --------------------------------------------------------------! + do m=1,nzg + osite%fmean_soil_energy(m,1:z) = pack(isite%fmean_soil_energy(m,:),lmask) + osite%fmean_soil_mstpot(m,1:z) = pack(isite%fmean_soil_mstpot(m,:),lmask) + osite%fmean_soil_water (m,1:z) = pack(isite%fmean_soil_water (m,:),lmask) + osite%fmean_soil_temp (m,1:z) = pack(isite%fmean_soil_temp (m,:),lmask) + osite%fmean_soil_fliq (m,1:z) = pack(isite%fmean_soil_fliq (m,:),lmask) + osite%fmean_smoist_gg (m,1:z) = pack(isite%fmean_smoist_gg (m,:),lmask) + osite%fmean_transloss (m,1:z) = pack(isite%fmean_transloss (m,:),lmask) + osite%fmean_sensible_gg(m,1:z) = pack(isite%fmean_sensible_gg(m,:),lmask) + end do + !------------------------------------------------------------------------------------! + + + + return + end subroutine copy_sitetype_mask_fmean + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This sub-routine copies the variables that are dmean. This sub-routine should be ! + ! called only from copy_sitetype_mask!!! ! + !---------------------------------------------------------------------------------------! + subroutine copy_sitetype_mask_dmean(isite,osite,z,lmask,isize,osize) + + + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(sitetype) , target :: isite ! Input (donor) site + type(sitetype) , target :: osite ! Output (receptor) site + integer , intent(in) :: z ! Number of elements + integer , intent(in) :: isize ! Input size + integer , intent(in) :: osize ! Output size + logical , dimension(isize), intent(in) :: lmask ! Mask + !----- Local variables. -------------------------------------------------------------! + integer :: i + integer :: o + integer :: m + integer :: n + !------------------------------------------------------------------------------------! + + + + !----- Scalars. ---------------------------------------------------------------------! + osite%dmean_A_decomp (1:z) = pack(isite%dmean_A_decomp (:),lmask) + osite%dmean_Af_decomp (1:z) = pack(isite%dmean_Af_decomp (:),lmask) + osite%dmean_co2_residual (1:z) = pack(isite%dmean_co2_residual (:),lmask) + osite%dmean_energy_residual(1:z) = pack(isite%dmean_energy_residual(:),lmask) + osite%dmean_water_residual (1:z) = pack(isite%dmean_water_residual (:),lmask) + osite%dmean_rh (1:z) = pack(isite%dmean_rh (:),lmask) + osite%dmean_cwd_rh (1:z) = pack(isite%dmean_cwd_rh (:),lmask) + osite%dmean_nep (1:z) = pack(isite%dmean_nep (:),lmask) + osite%dmean_rk4step (1:z) = pack(isite%dmean_rk4step (:),lmask) + osite%dmean_available_water(1:z) = pack(isite%dmean_available_water(:),lmask) + osite%dmean_can_theiv (1:z) = pack(isite%dmean_can_theiv (:),lmask) + osite%dmean_can_theta (1:z) = pack(isite%dmean_can_theta (:),lmask) + osite%dmean_can_vpdef (1:z) = pack(isite%dmean_can_vpdef (:),lmask) + osite%dmean_can_temp (1:z) = pack(isite%dmean_can_temp (:),lmask) + osite%dmean_can_shv (1:z) = pack(isite%dmean_can_shv (:),lmask) + osite%dmean_can_co2 (1:z) = pack(isite%dmean_can_co2 (:),lmask) + osite%dmean_can_rhos (1:z) = pack(isite%dmean_can_rhos (:),lmask) + osite%dmean_can_prss (1:z) = pack(isite%dmean_can_prss (:),lmask) + osite%dmean_gnd_temp (1:z) = pack(isite%dmean_gnd_temp (:),lmask) + osite%dmean_gnd_shv (1:z) = pack(isite%dmean_gnd_shv (:),lmask) + osite%dmean_can_ggnd (1:z) = pack(isite%dmean_can_ggnd (:),lmask) + osite%dmean_sfcw_depth (1:z) = pack(isite%dmean_sfcw_depth (:),lmask) + osite%dmean_sfcw_energy (1:z) = pack(isite%dmean_sfcw_energy (:),lmask) + osite%dmean_sfcw_mass (1:z) = pack(isite%dmean_sfcw_mass (:),lmask) + osite%dmean_sfcw_temp (1:z) = pack(isite%dmean_sfcw_temp (:),lmask) + osite%dmean_sfcw_fliq (1:z) = pack(isite%dmean_sfcw_fliq (:),lmask) + osite%dmean_rshort_gnd (1:z) = pack(isite%dmean_rshort_gnd (:),lmask) + osite%dmean_par_gnd (1:z) = pack(isite%dmean_par_gnd (:),lmask) + osite%dmean_rlong_gnd (1:z) = pack(isite%dmean_rlong_gnd (:),lmask) + osite%dmean_rlongup (1:z) = pack(isite%dmean_rlongup (:),lmask) + osite%dmean_parup (1:z) = pack(isite%dmean_parup (:),lmask) + osite%dmean_nirup (1:z) = pack(isite%dmean_nirup (:),lmask) + osite%dmean_rshortup (1:z) = pack(isite%dmean_rshortup (:),lmask) + osite%dmean_rnet (1:z) = pack(isite%dmean_rnet (:),lmask) + osite%dmean_albedo (1:z) = pack(isite%dmean_albedo (:),lmask) + osite%dmean_albedo_beam (1:z) = pack(isite%dmean_albedo_beam (:),lmask) + osite%dmean_albedo_diff (1:z) = pack(isite%dmean_albedo_diff (:),lmask) + osite%dmean_rlong_albedo (1:z) = pack(isite%dmean_rlong_albedo (:),lmask) + osite%dmean_ustar (1:z) = pack(isite%dmean_ustar (:),lmask) + osite%dmean_tstar (1:z) = pack(isite%dmean_tstar (:),lmask) + osite%dmean_qstar (1:z) = pack(isite%dmean_qstar (:),lmask) + osite%dmean_cstar (1:z) = pack(isite%dmean_cstar (:),lmask) + osite%dmean_carbon_ac (1:z) = pack(isite%dmean_carbon_ac (:),lmask) + osite%dmean_carbon_st (1:z) = pack(isite%dmean_carbon_st (:),lmask) + osite%dmean_vapor_gc (1:z) = pack(isite%dmean_vapor_gc (:),lmask) + osite%dmean_vapor_ac (1:z) = pack(isite%dmean_vapor_ac (:),lmask) + osite%dmean_throughfall (1:z) = pack(isite%dmean_throughfall (:),lmask) + osite%dmean_runoff (1:z) = pack(isite%dmean_runoff (:),lmask) + osite%dmean_drainage (1:z) = pack(isite%dmean_drainage (:),lmask) + osite%dmean_sensible_gc (1:z) = pack(isite%dmean_sensible_gc (:),lmask) + osite%dmean_sensible_ac (1:z) = pack(isite%dmean_sensible_ac (:),lmask) + osite%dmean_qthroughfall (1:z) = pack(isite%dmean_qthroughfall (:),lmask) + osite%dmean_qrunoff (1:z) = pack(isite%dmean_qrunoff (:),lmask) + osite%dmean_qdrainage (1:z) = pack(isite%dmean_qdrainage (:),lmask) + !------------------------------------------------------------------------------------! + + + !----- Soil variables. --------------------------------------------------------------! + do m=1,nzg + osite%dmean_soil_energy(m,1:z) = pack(isite%dmean_soil_energy(m,:),lmask) + osite%dmean_soil_mstpot(m,1:z) = pack(isite%dmean_soil_mstpot(m,:),lmask) + osite%dmean_soil_water (m,1:z) = pack(isite%dmean_soil_water (m,:),lmask) + osite%dmean_soil_temp (m,1:z) = pack(isite%dmean_soil_temp (m,:),lmask) + osite%dmean_soil_fliq (m,1:z) = pack(isite%dmean_soil_fliq (m,:),lmask) + osite%dmean_smoist_gg (m,1:z) = pack(isite%dmean_smoist_gg (m,:),lmask) + osite%dmean_transloss (m,1:z) = pack(isite%dmean_transloss (m,:),lmask) + osite%dmean_sensible_gg(m,1:z) = pack(isite%dmean_sensible_gg(m,:),lmask) + end do + !------------------------------------------------------------------------------------! + + + + return + end subroutine copy_sitetype_mask_dmean + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This sub-routine copies the variables that are mmean. This sub-routine should be ! + ! called only from copy_sitetype_mask!!! ! + !---------------------------------------------------------------------------------------! + subroutine copy_sitetype_mask_mmean(isite,osite,z,lmask,isize,osize) + + + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(sitetype) , target :: isite ! Input (donor) site + type(sitetype) , target :: osite ! Output (receptor) site + integer , intent(in) :: z ! Number of elements + integer , intent(in) :: isize ! Input size + integer , intent(in) :: osize ! Output size + logical , dimension(isize), intent(in) :: lmask ! Mask + !----- Local variables. -------------------------------------------------------------! + integer :: i + integer :: o + integer :: m + integer :: n + !------------------------------------------------------------------------------------! + + + + + !----- Scalars. ---------------------------------------------------------------------! + osite%mmean_fast_soil_c (1:z) = pack(isite%mmean_fast_soil_c (:),lmask) + osite%mmean_slow_soil_c (1:z) = pack(isite%mmean_slow_soil_c (:),lmask) + osite%mmean_struct_soil_c (1:z) = pack(isite%mmean_struct_soil_c (:),lmask) + osite%mmean_struct_soil_l (1:z) = pack(isite%mmean_struct_soil_l (:),lmask) + osite%mmean_fast_soil_n (1:z) = pack(isite%mmean_fast_soil_n (:),lmask) + osite%mmean_mineral_soil_n (1:z) = pack(isite%mmean_mineral_soil_n (:),lmask) + osite%mmean_co2_residual (1:z) = pack(isite%mmean_co2_residual (:),lmask) + osite%mmean_energy_residual(1:z) = pack(isite%mmean_energy_residual(:),lmask) + osite%mmean_water_residual (1:z) = pack(isite%mmean_water_residual (:),lmask) + osite%mmean_rh (1:z) = pack(isite%mmean_rh (:),lmask) + osite%mmean_cwd_rh (1:z) = pack(isite%mmean_cwd_rh (:),lmask) + osite%mmean_nep (1:z) = pack(isite%mmean_nep (:),lmask) + osite%mmean_A_decomp (1:z) = pack(isite%mmean_A_decomp (:),lmask) + osite%mmean_Af_decomp (1:z) = pack(isite%mmean_Af_decomp (:),lmask) + osite%mmean_rk4step (1:z) = pack(isite%mmean_rk4step (:),lmask) + osite%mmean_available_water(1:z) = pack(isite%mmean_available_water(:),lmask) + osite%mmean_can_theiv (1:z) = pack(isite%mmean_can_theiv (:),lmask) + osite%mmean_can_theta (1:z) = pack(isite%mmean_can_theta (:),lmask) + osite%mmean_can_vpdef (1:z) = pack(isite%mmean_can_vpdef (:),lmask) + osite%mmean_can_temp (1:z) = pack(isite%mmean_can_temp (:),lmask) + osite%mmean_can_shv (1:z) = pack(isite%mmean_can_shv (:),lmask) + osite%mmean_can_co2 (1:z) = pack(isite%mmean_can_co2 (:),lmask) + osite%mmean_can_rhos (1:z) = pack(isite%mmean_can_rhos (:),lmask) + osite%mmean_can_prss (1:z) = pack(isite%mmean_can_prss (:),lmask) + osite%mmean_gnd_temp (1:z) = pack(isite%mmean_gnd_temp (:),lmask) + osite%mmean_gnd_shv (1:z) = pack(isite%mmean_gnd_shv (:),lmask) + osite%mmean_can_ggnd (1:z) = pack(isite%mmean_can_ggnd (:),lmask) + osite%mmean_sfcw_depth (1:z) = pack(isite%mmean_sfcw_depth (:),lmask) + osite%mmean_sfcw_energy (1:z) = pack(isite%mmean_sfcw_energy (:),lmask) + osite%mmean_sfcw_mass (1:z) = pack(isite%mmean_sfcw_mass (:),lmask) + osite%mmean_sfcw_temp (1:z) = pack(isite%mmean_sfcw_temp (:),lmask) + osite%mmean_sfcw_fliq (1:z) = pack(isite%mmean_sfcw_fliq (:),lmask) + osite%mmean_rshort_gnd (1:z) = pack(isite%mmean_rshort_gnd (:),lmask) + osite%mmean_par_gnd (1:z) = pack(isite%mmean_par_gnd (:),lmask) + osite%mmean_rlong_gnd (1:z) = pack(isite%mmean_rlong_gnd (:),lmask) + osite%mmean_rlongup (1:z) = pack(isite%mmean_rlongup (:),lmask) + osite%mmean_parup (1:z) = pack(isite%mmean_parup (:),lmask) + osite%mmean_nirup (1:z) = pack(isite%mmean_nirup (:),lmask) + osite%mmean_rshortup (1:z) = pack(isite%mmean_rshortup (:),lmask) + osite%mmean_rnet (1:z) = pack(isite%mmean_rnet (:),lmask) + osite%mmean_albedo (1:z) = pack(isite%mmean_albedo (:),lmask) + osite%mmean_albedo_beam (1:z) = pack(isite%mmean_albedo_beam (:),lmask) + osite%mmean_albedo_diff (1:z) = pack(isite%mmean_albedo_diff (:),lmask) + osite%mmean_rlong_albedo (1:z) = pack(isite%mmean_rlong_albedo (:),lmask) + osite%mmean_ustar (1:z) = pack(isite%mmean_ustar (:),lmask) + osite%mmean_tstar (1:z) = pack(isite%mmean_tstar (:),lmask) + osite%mmean_qstar (1:z) = pack(isite%mmean_qstar (:),lmask) + osite%mmean_cstar (1:z) = pack(isite%mmean_cstar (:),lmask) + osite%mmean_carbon_ac (1:z) = pack(isite%mmean_carbon_ac (:),lmask) + osite%mmean_carbon_st (1:z) = pack(isite%mmean_carbon_st (:),lmask) + osite%mmean_vapor_gc (1:z) = pack(isite%mmean_vapor_gc (:),lmask) + osite%mmean_vapor_ac (1:z) = pack(isite%mmean_vapor_ac (:),lmask) + osite%mmean_throughfall (1:z) = pack(isite%mmean_throughfall (:),lmask) + osite%mmean_runoff (1:z) = pack(isite%mmean_runoff (:),lmask) + osite%mmean_drainage (1:z) = pack(isite%mmean_drainage (:),lmask) + osite%mmean_sensible_gc (1:z) = pack(isite%mmean_sensible_gc (:),lmask) + osite%mmean_sensible_ac (1:z) = pack(isite%mmean_sensible_ac (:),lmask) + osite%mmean_qthroughfall (1:z) = pack(isite%mmean_qthroughfall (:),lmask) + osite%mmean_qrunoff (1:z) = pack(isite%mmean_qrunoff (:),lmask) + osite%mmean_qdrainage (1:z) = pack(isite%mmean_qdrainage (:),lmask) + osite%mmean_A_decomp (1:z) = pack(isite%mmean_A_decomp (:),lmask) + osite%mmean_Af_decomp (1:z) = pack(isite%mmean_Af_decomp (:),lmask) + osite%mmean_co2_residual (1:z) = pack(isite%mmean_co2_residual (:),lmask) + osite%mmean_energy_residual(1:z) = pack(isite%mmean_energy_residual(:),lmask) + osite%mmean_water_residual (1:z) = pack(isite%mmean_water_residual (:),lmask) + osite%mmsqu_rh (1:z) = pack(isite%mmsqu_rh (:),lmask) + osite%mmsqu_cwd_rh (1:z) = pack(isite%mmsqu_cwd_rh (:),lmask) + osite%mmsqu_nep (1:z) = pack(isite%mmsqu_nep (:),lmask) + osite%mmsqu_rlongup (1:z) = pack(isite%mmsqu_rlongup (:),lmask) + osite%mmsqu_parup (1:z) = pack(isite%mmsqu_parup (:),lmask) + osite%mmsqu_nirup (1:z) = pack(isite%mmsqu_nirup (:),lmask) + osite%mmsqu_rshortup (1:z) = pack(isite%mmsqu_rshortup (:),lmask) + osite%mmsqu_rnet (1:z) = pack(isite%mmsqu_rnet (:),lmask) + osite%mmsqu_albedo (1:z) = pack(isite%mmsqu_albedo (:),lmask) + osite%mmsqu_ustar (1:z) = pack(isite%mmsqu_ustar (:),lmask) + osite%mmsqu_carbon_ac (1:z) = pack(isite%mmsqu_carbon_ac (:),lmask) + osite%mmsqu_carbon_st (1:z) = pack(isite%mmsqu_carbon_st (:),lmask) + osite%mmsqu_vapor_gc (1:z) = pack(isite%mmsqu_vapor_gc (:),lmask) + osite%mmsqu_vapor_ac (1:z) = pack(isite%mmsqu_vapor_ac (:),lmask) + osite%mmsqu_sensible_gc (1:z) = pack(isite%mmsqu_sensible_gc (:),lmask) + osite%mmsqu_sensible_ac (1:z) = pack(isite%mmsqu_sensible_ac (:),lmask) + !------------------------------------------------------------------------------------! + + + !----- Soil variables. --------------------------------------------------------------! + do m=1,nzg + osite%mmean_soil_energy(m,1:z) = pack(isite%mmean_soil_energy(m,:),lmask) + osite%mmean_soil_mstpot(m,1:z) = pack(isite%mmean_soil_mstpot(m,:),lmask) + osite%mmean_soil_water (m,1:z) = pack(isite%mmean_soil_water (m,:),lmask) + osite%mmean_soil_temp (m,1:z) = pack(isite%mmean_soil_temp (m,:),lmask) + osite%mmean_soil_fliq (m,1:z) = pack(isite%mmean_soil_fliq (m,:),lmask) + osite%mmean_smoist_gg (m,1:z) = pack(isite%mmean_smoist_gg (m,:),lmask) + osite%mmean_transloss (m,1:z) = pack(isite%mmean_transloss (m,:),lmask) + osite%mmean_sensible_gg(m,1:z) = pack(isite%mmean_sensible_gg(m,:),lmask) + end do + !------------------------------------------------------------------------------------! + + + return + end subroutine copy_sitetype_mask_mmean + !=======================================================================================! + !=======================================================================================! + + + + + - - if(associated(cgrid%dmean_ustar)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_ustar,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_USTAR :11:hist:dail') - call metadata_edio(nvar,igr,'Polygon Average Daily friction velocity','[m/s]','ipoly') - end if - - if(associated(cgrid%dmean_tstar)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_tstar,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_TSTAR :11:hist:dail') - call metadata_edio(nvar,igr,'Polygon Average Daily temperature gradient scale','[K]','ipoly') - end if - - if(associated(cgrid%dmean_qstar)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_qstar,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_QSTAR :11:hist:dail') - call metadata_edio(nvar,igr,'Polygon Average Daily sp. humidity gradient scale','[K]','ipoly') - end if - - if(associated(cgrid%dmean_cstar)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_cstar,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_CSTAR :11:hist:dail') - call metadata_edio(nvar,igr,'Polygon Average Daily CO2 gradient scale','[K]','ipoly') - end if + !=======================================================================================! + !=======================================================================================! + ! This sub-routine copies the variables that are qmean. This sub-routine should be ! + ! called only from copy_sitetype_mask!!! ! + !---------------------------------------------------------------------------------------! + subroutine copy_sitetype_mask_qmean(isite,osite,z,lmask,isize,osize) - if(associated(cgrid%dmean_carbon_ac)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_carbon_ac,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_CARBON_AC :11:hist:dail') - call metadata_edio(nvar,igr,'Polygon Average Daily Integrated CO2 flux','[umol/m2/s]','ipoly') - end if - - if(associated(cgrid%dmean_carbon_st)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_carbon_st,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_CARBON_ST :11:hist:dail') - call metadata_edio(nvar,igr,'Polygon Average Daily Integrated CO2 storage flux','[umol/m2/s]','ipoly') - end if - - - if(associated(cgrid%dmean_pcpg)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_pcpg,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_PCPG :11:hist:dail') - call metadata_edio(nvar,igr,'total daily precipitation','[kg/m2/day]','ipoly') - end if - if(associated(cgrid%dmean_runoff)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_runoff,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_RUNOFF :11:hist:dail') - call metadata_edio(nvar,igr,'total daily surface runoff','[kg/m2/day]','ipoly') - end if + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(sitetype) , target :: isite ! Input (donor) site + type(sitetype) , target :: osite ! Output (receptor) site + integer , intent(in) :: z ! Number of elements + integer , intent(in) :: isize ! Input size + integer , intent(in) :: osize ! Output size + logical , dimension(isize), intent(in) :: lmask ! Mask + !----- Local variables. -------------------------------------------------------------! + integer :: i + integer :: o + integer :: m + integer :: n + !------------------------------------------------------------------------------------! - if(associated(cgrid%dmean_drainage)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_drainage,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_DRAINAGE :11:hist:dail') - call metadata_edio(nvar,igr,'total daily water flux through lower soil layer','[kg/m2/day]','ipoly') - end if - if(associated(cgrid%dmean_vapor_ac)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_vapor_ac,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_VAPOR_AC :11:hist:dail') - call metadata_edio(nvar,igr,'total daily vapor flux atm->canopy','[kg/m2/day]','ipoly') - end if + do n=1,ndcycle + !----- Scalars. ------------------------------------------------------------------! + osite%qmean_rh (n,1:z) = pack(isite%qmean_rh (n,:),lmask) + osite%qmean_cwd_rh (n,1:z) = pack(isite%qmean_cwd_rh (n,:),lmask) + osite%qmean_nep (n,1:z) = pack(isite%qmean_nep (n,:),lmask) + osite%qmean_rk4step (n,1:z) = pack(isite%qmean_rk4step (n,:),lmask) + osite%qmean_available_water(n,1:z) = pack(isite%qmean_available_water(n,:),lmask) + osite%qmean_can_theiv (n,1:z) = pack(isite%qmean_can_theiv (n,:),lmask) + osite%qmean_can_theta (n,1:z) = pack(isite%qmean_can_theta (n,:),lmask) + osite%qmean_can_vpdef (n,1:z) = pack(isite%qmean_can_vpdef (n,:),lmask) + osite%qmean_can_temp (n,1:z) = pack(isite%qmean_can_temp (n,:),lmask) + osite%qmean_can_shv (n,1:z) = pack(isite%qmean_can_shv (n,:),lmask) + osite%qmean_can_co2 (n,1:z) = pack(isite%qmean_can_co2 (n,:),lmask) + osite%qmean_can_rhos (n,1:z) = pack(isite%qmean_can_rhos (n,:),lmask) + osite%qmean_can_prss (n,1:z) = pack(isite%qmean_can_prss (n,:),lmask) + osite%qmean_gnd_temp (n,1:z) = pack(isite%qmean_gnd_temp (n,:),lmask) + osite%qmean_gnd_shv (n,1:z) = pack(isite%qmean_gnd_shv (n,:),lmask) + osite%qmean_can_ggnd (n,1:z) = pack(isite%qmean_can_ggnd (n,:),lmask) + osite%qmean_sfcw_depth (n,1:z) = pack(isite%qmean_sfcw_depth (n,:),lmask) + osite%qmean_sfcw_energy (n,1:z) = pack(isite%qmean_sfcw_energy (n,:),lmask) + osite%qmean_sfcw_mass (n,1:z) = pack(isite%qmean_sfcw_mass (n,:),lmask) + osite%qmean_sfcw_temp (n,1:z) = pack(isite%qmean_sfcw_temp (n,:),lmask) + osite%qmean_sfcw_fliq (n,1:z) = pack(isite%qmean_sfcw_fliq (n,:),lmask) + osite%qmean_rshort_gnd (n,1:z) = pack(isite%qmean_rshort_gnd (n,:),lmask) + osite%qmean_par_gnd (n,1:z) = pack(isite%qmean_par_gnd (n,:),lmask) + osite%qmean_rlong_gnd (n,1:z) = pack(isite%qmean_rlong_gnd (n,:),lmask) + osite%qmean_rlongup (n,1:z) = pack(isite%qmean_rlongup (n,:),lmask) + osite%qmean_parup (n,1:z) = pack(isite%qmean_parup (n,:),lmask) + osite%qmean_nirup (n,1:z) = pack(isite%qmean_nirup (n,:),lmask) + osite%qmean_rshortup (n,1:z) = pack(isite%qmean_rshortup (n,:),lmask) + osite%qmean_rnet (n,1:z) = pack(isite%qmean_rnet (n,:),lmask) + osite%qmean_albedo (n,1:z) = pack(isite%qmean_albedo (n,:),lmask) + osite%qmean_albedo_beam (n,1:z) = pack(isite%qmean_albedo_beam (n,:),lmask) + osite%qmean_albedo_diff (n,1:z) = pack(isite%qmean_albedo_diff (n,:),lmask) + osite%qmean_rlong_albedo (n,1:z) = pack(isite%qmean_rlong_albedo (n,:),lmask) + osite%qmean_ustar (n,1:z) = pack(isite%qmean_ustar (n,:),lmask) + osite%qmean_tstar (n,1:z) = pack(isite%qmean_tstar (n,:),lmask) + osite%qmean_qstar (n,1:z) = pack(isite%qmean_qstar (n,:),lmask) + osite%qmean_cstar (n,1:z) = pack(isite%qmean_cstar (n,:),lmask) + osite%qmean_carbon_ac (n,1:z) = pack(isite%qmean_carbon_ac (n,:),lmask) + osite%qmean_carbon_st (n,1:z) = pack(isite%qmean_carbon_st (n,:),lmask) + osite%qmean_vapor_gc (n,1:z) = pack(isite%qmean_vapor_gc (n,:),lmask) + osite%qmean_vapor_ac (n,1:z) = pack(isite%qmean_vapor_ac (n,:),lmask) + osite%qmean_throughfall (n,1:z) = pack(isite%qmean_throughfall (n,:),lmask) + osite%qmean_runoff (n,1:z) = pack(isite%qmean_runoff (n,:),lmask) + osite%qmean_drainage (n,1:z) = pack(isite%qmean_drainage (n,:),lmask) + osite%qmean_sensible_gc (n,1:z) = pack(isite%qmean_sensible_gc (n,:),lmask) + osite%qmean_sensible_ac (n,1:z) = pack(isite%qmean_sensible_ac (n,:),lmask) + osite%qmean_qthroughfall (n,1:z) = pack(isite%qmean_qthroughfall (n,:),lmask) + osite%qmean_qrunoff (n,1:z) = pack(isite%qmean_qrunoff (n,:),lmask) + osite%qmean_qdrainage (n,1:z) = pack(isite%qmean_qdrainage (n,:),lmask) + osite%qmsqu_rh (n,1:z) = pack(isite%qmsqu_rh (n,:),lmask) + osite%qmsqu_cwd_rh (n,1:z) = pack(isite%qmsqu_cwd_rh (n,:),lmask) + osite%qmsqu_nep (n,1:z) = pack(isite%qmsqu_nep (n,:),lmask) + osite%qmsqu_rlongup (n,1:z) = pack(isite%qmsqu_rlongup (n,:),lmask) + osite%qmsqu_parup (n,1:z) = pack(isite%qmsqu_parup (n,:),lmask) + osite%qmsqu_nirup (n,1:z) = pack(isite%qmsqu_nirup (n,:),lmask) + osite%qmsqu_rshortup (n,1:z) = pack(isite%qmsqu_rshortup (n,:),lmask) + osite%qmsqu_rnet (n,1:z) = pack(isite%qmsqu_rnet (n,:),lmask) + osite%qmsqu_albedo (n,1:z) = pack(isite%qmsqu_albedo (n,:),lmask) + osite%qmsqu_ustar (n,1:z) = pack(isite%qmsqu_ustar (n,:),lmask) + osite%qmsqu_carbon_ac (n,1:z) = pack(isite%qmsqu_carbon_ac (n,:),lmask) + osite%qmsqu_carbon_st (n,1:z) = pack(isite%qmsqu_carbon_st (n,:),lmask) + osite%qmsqu_vapor_gc (n,1:z) = pack(isite%qmsqu_vapor_gc (n,:),lmask) + osite%qmsqu_vapor_ac (n,1:z) = pack(isite%qmsqu_vapor_ac (n,:),lmask) + osite%qmsqu_sensible_gc (n,1:z) = pack(isite%qmsqu_sensible_gc (n,:),lmask) + osite%qmsqu_sensible_ac (n,1:z) = pack(isite%qmsqu_sensible_ac (n,:),lmask) + !---------------------------------------------------------------------------------! + + + !----- Soil variables. -----------------------------------------------------------! + do m=1,nzg + osite%qmean_soil_energy(m,n,1:z) = pack(isite%qmean_soil_energy(m,n,:),lmask) + osite%qmean_soil_mstpot(m,n,1:z) = pack(isite%qmean_soil_mstpot(m,n,:),lmask) + osite%qmean_soil_water (m,n,1:z) = pack(isite%qmean_soil_water (m,n,:),lmask) + osite%qmean_soil_temp (m,n,1:z) = pack(isite%qmean_soil_temp (m,n,:),lmask) + osite%qmean_soil_fliq (m,n,1:z) = pack(isite%qmean_soil_fliq (m,n,:),lmask) + osite%qmean_smoist_gg (m,n,1:z) = pack(isite%qmean_smoist_gg (m,n,:),lmask) + osite%qmean_transloss (m,n,1:z) = pack(isite%qmean_transloss (m,n,:),lmask) + osite%qmean_sensible_gg(m,n,1:z) = pack(isite%qmean_sensible_gg(m,n,:),lmask) + end do + !---------------------------------------------------------------------------------! + end do + !------------------------------------------------------------------------------------! - if(associated(cgrid%dmean_vapor_gc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_vapor_gc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_VAPOR_GC :11:hist:dail') - call metadata_edio(nvar,igr,'total daily vapor flux ground->canopy','[kg/m2/day]','ipoly') - end if + return + end subroutine copy_sitetype_mask_qmean + !=======================================================================================! + !=======================================================================================! - if(associated(cgrid%dmean_vapor_lc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_vapor_lc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_VAPOR_LC :11:hist:dail') - call metadata_edio(nvar,igr,'total daily vapor flux leaf->canopy','[kg/m2/day]','ipoly') - end if - if(associated(cgrid%dmean_vapor_wc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_vapor_wc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_VAPOR_WC :11:hist:dail') - call metadata_edio(nvar,igr,'total daily vapor flux wood->canopy','[kg/m2/day]','ipoly') - end if - if(associated(cgrid%dmean_evap)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_evap,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_EVAP :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean (leaf+soil) evaporation','[kg/m2/s]','ipoly') - end if - - if(associated(cgrid%dmean_transp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_transp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_TRANSP :11:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%dmean_sensible_lc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_sensible_lc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_SENSIBLE_LC :11:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%dmean_sensible_wc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_sensible_wc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_SENSIBLE_WC :11:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%dmean_sensible_gc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_sensible_gc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_SENSIBLE_GC :11:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%dmean_sensible_ac)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_sensible_ac,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_SENSIBLE_AC :11:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%dmean_plresp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_plresp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_PLRESP :11:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%dmean_rh)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_rh,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_RH :11:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%dmean_cwd_rh)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_cwd_rh,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_CWD_RH :11:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%dmean_leaf_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_leaf_resp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_LEAF_RESP :11:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%dmean_root_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_root_resp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_ROOT_RESP :11:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%dmean_growth_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_growth_resp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_GROWTH_RESP :11:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%dmean_storage_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_storage_resp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_STORAGE_RESP :11:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%dmean_vleaf_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_vleaf_resp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_VLEAF_RESP :11:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%dmean_nep)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_nep,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_NEP :11:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + !=======================================================================================! + !=======================================================================================! + ! This subroutine copies a continuous chunk of patches from one place to another. ! + ! The number of patches to be copied must match between the input and output, and every ! + ! single variable, including the cohorts, will be copied. ! + ! IMPORTANT. This subroutine assumes that the output patches still don't have cohorts ! + ! allocated, so this should be never used in a previously allocated patch. ! + !---------------------------------------------------------------------------------------! + subroutine copy_patchtype(ipatch,opatch,icoa,icoz,ocoa,ocoz) + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(patchtype) , target :: ipatch + type(patchtype) , target :: opatch + integer , intent(in) :: icoa + integer , intent(in) :: icoz + integer , intent(in) :: ocoa + integer , intent(in) :: ocoz + !----- Local variables. -------------------------------------------------------------! + integer :: ico + integer :: oco + integer :: m + integer :: n + !------------------------------------------------------------------------------------! - if(associated(cgrid%dmean_fs_open)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_fs_open,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_FS_OPEN :11:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%dmean_fsw)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_fsw,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_FSW :11:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%dmean_fsn)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_fsn,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_FSN :11:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%dmean_can_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_can_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_CAN_TEMP :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean canopy temperature','[K]','ipoly') - end if - - if(associated(cgrid%dmean_can_shv)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_can_shv,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_CAN_SHV :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean canopy specific humidity','[kg/kg]','ipoly') - end if - - if(associated(cgrid%dmean_can_co2)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_can_co2,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_CAN_CO2 :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean canopy CO2 mixing ratio','[umol/mol]','ipoly') - end if - - if(associated(cgrid%dmean_can_rhos)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_can_rhos,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_CAN_RHOS :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean canopy air density','[kg/m3]','ipoly') - end if - - if(associated(cgrid%dmean_can_prss)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_can_prss,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_CAN_PRSS :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean canopy air pressure','[Pa]','ipoly') - end if - - if(associated(cgrid%dmean_can_theta)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_can_theta,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_CAN_THETA :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean canopy air potential temperature','[K]','ipoly') - end if - - if(associated(cgrid%dmean_can_theiv)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_can_theiv,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_CAN_THEIV :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean canopy air theta_Eiv','[K]','ipoly') - end if - - if(associated(cgrid%dmean_can_vpdef)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_can_vpdef,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_CAN_VPDEF :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean canopy air VPD','[Pa]','ipoly') - end if - - if(associated(cgrid%dmean_gnd_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_gnd_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_GND_TEMP :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean of ground temperature','[K]','ipoly') - end if - - if(associated(cgrid%dmean_gnd_shv)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_gnd_shv,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_GND_SHV :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean of ground specific humidity','[kg/kg]','ipoly') - end if - - if(associated(cgrid%dmean_leaf_energy)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_leaf_energy,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_LEAF_ENERGY :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean vegetation internal energy','[J/m2]','ipoly') - end if - - if(associated(cgrid%dmean_leaf_water)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_leaf_water,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_LEAF_WATER :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean vegetation surface water','[kg/m2]','ipoly') - end if - - if(associated(cgrid%dmean_leaf_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_leaf_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_LEAF_TEMP :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean vegetation temperature','[K]','ipoly') - end if - - if(associated(cgrid%dmean_leaf_vpdef)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_leaf_vpdef,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_LEAF_VPDEF :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean vegetation VPD','[Pa]','ipoly') - end if - - if(associated(cgrid%dmean_leaf_hcap)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_leaf_hcap,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_LEAF_HCAP :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean vegetation heat capacity','[J/m2/K]','ipoly') - end if - - if(associated(cgrid%dmean_wood_energy)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_wood_energy,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_WOOD_ENERGY :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean wood internal energy','[J/m2]','ipoly') - end if - - if(associated(cgrid%dmean_wood_water)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_wood_water,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_WOOD_WATER :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean wood surface water','[kg/m2]','ipoly') - end if - - if(associated(cgrid%dmean_wood_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_wood_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_WOOD_TEMP :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean wood temperature','[K]','ipoly') - end if - - if(associated(cgrid%dmean_wood_hcap)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_wood_hcap,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_WOOD_HCAP :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean vegetation heat capacity','[J/m2/K]','ipoly') - end if - - if(associated(cgrid%dmean_atm_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_atm_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_ATM_TEMP :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean air temperature','[K]','ipoly') - end if - - if(associated(cgrid%dmean_atm_vpdef)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_atm_vpdef,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_ATM_VPDEF :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean air VPD','[Pa]','ipoly') - end if - - if(associated(cgrid%dmean_atm_shv)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_atm_shv,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_ATM_SHV :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean air specific humidity','[kg/kg]','ipoly') - end if - - if(associated(cgrid%dmean_atm_co2)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_atm_co2,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_ATM_CO2 :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean air specific humidity','[kg/kg]','ipoly') - end if - - if(associated(cgrid%dmean_atm_prss)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_atm_prss,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_ATM_PRSS :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean air pressure','[ Pa]','ipoly') - end if - - if(associated(cgrid%dmean_atm_vels)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_atm_vels,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_ATM_VELS :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean wind speed','[m/s]','ipoly') + + !------ Check whether this cohort copying makes sense. ------------------------------! + if (icoz - icoa /= ocoz - ocoa) then + write (unit=*,fmt='(a)') '------------------------------------------------' + write (unit=*,fmt='(a)') ' - Input patch:' + write (unit=*,fmt='(a,1x,i6)') ' * First cohort: ',icoa + write (unit=*,fmt='(a,1x,i6)') ' * Last cohort: ',icoz + write (unit=*,fmt='(a,1x,i6)') ' * Cohort count: ',icoz-icoa+1 + write (unit=*,fmt='(a)') ' - Output site:' + write (unit=*,fmt='(a,1x,i6)') ' * First cohort: ',ocoa + write (unit=*,fmt='(a,1x,i6)') ' * Last cohort: ',ocoz + write (unit=*,fmt='(a,1x,i6)') ' * Cohort count: ',ocoz-ocoa+1 + write (unit=*,fmt='(a)' ) '------------------------------------------------' + call fatal_error ('Cohort count of input and output patches don''t match' & + ,'copy_patchtype','ed_state_vars.f90') end if + !------------------------------------------------------------------------------------! + + ico = icoa - 1 + cohortloop: do oco = ocoa,ocoz + ico = ico + 1 + + !----- Scalars. ------------------------------------------------------------------! + opatch%pft (oco) = ipatch%pft (ico) + opatch%nplant (oco) = ipatch%nplant (ico) + opatch%phenology_status (oco) = ipatch%phenology_status (ico) + opatch%recruit_dbh (oco) = ipatch%recruit_dbh (ico) + opatch%census_status (oco) = ipatch%census_status (ico) + opatch%hite (oco) = ipatch%hite (ico) + opatch%agb (oco) = ipatch%agb (ico) + opatch%basarea (oco) = ipatch%basarea (ico) + opatch%dagb_dt (oco) = ipatch%dagb_dt (ico) + opatch%dlnagb_dt (oco) = ipatch%dlnagb_dt (ico) + opatch%dba_dt (oco) = ipatch%dba_dt (ico) + opatch%dlnba_dt (oco) = ipatch%dlnba_dt (ico) + opatch%ddbh_dt (oco) = ipatch%ddbh_dt (ico) + opatch%dlndbh_dt (oco) = ipatch%dlndbh_dt (ico) + opatch%dbh (oco) = ipatch%dbh (ico) + opatch%bdead (oco) = ipatch%bdead (ico) + opatch%bleaf (oco) = ipatch%bleaf (ico) + opatch%balive (oco) = ipatch%balive (ico) + opatch%broot (oco) = ipatch%broot (ico) + opatch%bsapwooda (oco) = ipatch%bsapwooda (ico) + opatch%bsapwoodb (oco) = ipatch%bsapwoodb (ico) + opatch%bstorage (oco) = ipatch%bstorage (ico) + opatch%bseeds (oco) = ipatch%bseeds (ico) + opatch%lai (oco) = ipatch%lai (ico) + opatch%wai (oco) = ipatch%wai (ico) + opatch%crown_area (oco) = ipatch%crown_area (ico) + opatch%leaf_resolvable (oco) = ipatch%leaf_resolvable (ico) + opatch%wood_resolvable (oco) = ipatch%wood_resolvable (ico) + opatch%cbr_bar (oco) = ipatch%cbr_bar (ico) + opatch%leaf_energy (oco) = ipatch%leaf_energy (ico) + opatch%leaf_temp (oco) = ipatch%leaf_temp (ico) + opatch%leaf_vpdef (oco) = ipatch%leaf_vpdef (ico) + opatch%leaf_temp_pv (oco) = ipatch%leaf_temp_pv (ico) + opatch%leaf_hcap (oco) = ipatch%leaf_hcap (ico) + opatch%leaf_fliq (oco) = ipatch%leaf_fliq (ico) + opatch%leaf_water (oco) = ipatch%leaf_water (ico) + opatch%wood_energy (oco) = ipatch%wood_energy (ico) + opatch%wood_temp (oco) = ipatch%wood_temp (ico) + opatch%wood_temp_pv (oco) = ipatch%wood_temp_pv (ico) + opatch%wood_hcap (oco) = ipatch%wood_hcap (ico) + opatch%wood_fliq (oco) = ipatch%wood_fliq (ico) + opatch%wood_water (oco) = ipatch%wood_water (ico) + opatch%veg_wind (oco) = ipatch%veg_wind (ico) + opatch%lsfc_shv_open (oco) = ipatch%lsfc_shv_open (ico) + opatch%lsfc_shv_closed (oco) = ipatch%lsfc_shv_closed (ico) + opatch%lsfc_co2_open (oco) = ipatch%lsfc_co2_open (ico) + opatch%lsfc_co2_closed (oco) = ipatch%lsfc_co2_closed (ico) + opatch%lint_shv (oco) = ipatch%lint_shv (ico) + opatch%lint_co2_open (oco) = ipatch%lint_co2_open (ico) + opatch%lint_co2_closed (oco) = ipatch%lint_co2_closed (ico) + opatch%today_leaf_resp (oco) = ipatch%today_leaf_resp (ico) + opatch%today_root_resp (oco) = ipatch%today_root_resp (ico) + opatch%today_gpp (oco) = ipatch%today_gpp (ico) + opatch%today_gpp_pot (oco) = ipatch%today_gpp_pot (ico) + opatch%today_gpp_lightmax (oco) = ipatch%today_gpp_lightmax (ico) + opatch%today_gpp_moistmax (oco) = ipatch%today_gpp_moistmax (ico) + opatch%today_nppleaf (oco) = ipatch%today_nppleaf (ico) + opatch%today_nppfroot (oco) = ipatch%today_nppfroot (ico) + opatch%today_nppsapwood (oco) = ipatch%today_nppsapwood (ico) + opatch%today_nppcroot (oco) = ipatch%today_nppcroot (ico) + opatch%today_nppseeds (oco) = ipatch%today_nppseeds (ico) + opatch%today_nppwood (oco) = ipatch%today_nppwood (ico) + opatch%today_nppdaily (oco) = ipatch%today_nppdaily (ico) + opatch%growth_respiration (oco) = ipatch%growth_respiration (ico) + opatch%storage_respiration (oco) = ipatch%storage_respiration (ico) + opatch%vleaf_respiration (oco) = ipatch%vleaf_respiration (ico) + opatch%monthly_dndt (oco) = ipatch%monthly_dndt (ico) + opatch%monthly_dlnndt (oco) = ipatch%monthly_dlnndt (ico) + opatch%krdepth (oco) = ipatch%krdepth (ico) + opatch%first_census (oco) = ipatch%first_census (ico) + opatch%new_recruit_flag (oco) = ipatch%new_recruit_flag (ico) + opatch%light_level (oco) = ipatch%light_level (ico) + opatch%light_level_beam (oco) = ipatch%light_level_beam (ico) + opatch%light_level_diff (oco) = ipatch%light_level_diff (ico) + opatch%par_l (oco) = ipatch%par_l (ico) + opatch%par_l_beam (oco) = ipatch%par_l_beam (ico) + opatch%par_l_diffuse (oco) = ipatch%par_l_diffuse (ico) + opatch%rshort_l (oco) = ipatch%rshort_l (ico) + opatch%rshort_l_beam (oco) = ipatch%rshort_l_beam (ico) + opatch%rshort_l_diffuse (oco) = ipatch%rshort_l_diffuse (ico) + opatch%rlong_l (oco) = ipatch%rlong_l (ico) + opatch%rlong_l_surf (oco) = ipatch%rlong_l_surf (ico) + opatch%rlong_l_incid (oco) = ipatch%rlong_l_incid (ico) + opatch%rshort_w (oco) = ipatch%rshort_w (ico) + opatch%rshort_w_beam (oco) = ipatch%rshort_w_beam (ico) + opatch%rshort_w_diffuse (oco) = ipatch%rshort_w_diffuse (ico) + opatch%rlong_w (oco) = ipatch%rlong_w (ico) + opatch%rlong_w_surf (oco) = ipatch%rlong_w_surf (ico) + opatch%rlong_w_incid (oco) = ipatch%rlong_w_incid (ico) + opatch%leaf_gbh (oco) = ipatch%leaf_gbh (ico) + opatch%leaf_gbw (oco) = ipatch%leaf_gbw (ico) + opatch%wood_gbh (oco) = ipatch%wood_gbh (ico) + opatch%wood_gbw (oco) = ipatch%wood_gbw (ico) + opatch%A_open (oco) = ipatch%A_open (ico) + opatch%A_closed (oco) = ipatch%A_closed (ico) + opatch%psi_open (oco) = ipatch%psi_open (ico) + opatch%psi_closed (oco) = ipatch%psi_closed (ico) + opatch%gsw_open (oco) = ipatch%gsw_open (ico) + opatch%gsw_closed (oco) = ipatch%gsw_closed (ico) + opatch%leaf_gsw (oco) = ipatch%leaf_gsw (ico) + opatch%fsw (oco) = ipatch%fsw (ico) + opatch%fsn (oco) = ipatch%fsn (ico) + opatch%fs_open (oco) = ipatch%fs_open (ico) + opatch%water_supply (oco) = ipatch%water_supply (ico) + opatch%leaf_maintenance (oco) = ipatch%leaf_maintenance (ico) + opatch%root_maintenance (oco) = ipatch%root_maintenance (ico) + opatch%leaf_drop (oco) = ipatch%leaf_drop (ico) + opatch%leaf_respiration (oco) = ipatch%leaf_respiration (ico) + opatch%root_respiration (oco) = ipatch%root_respiration (ico) + opatch%gpp (oco) = ipatch%gpp (ico) + opatch%paw_avg (oco) = ipatch%paw_avg (ico) + opatch%elongf (oco) = ipatch%elongf (ico) + opatch%turnover_amp (oco) = ipatch%turnover_amp (ico) + opatch%llspan (oco) = ipatch%llspan (ico) + opatch%vm_bar (oco) = ipatch%vm_bar (ico) + opatch%sla (oco) = ipatch%sla (ico) + opatch%fmean_gpp (oco) = ipatch%fmean_gpp (ico) + opatch%fmean_npp (oco) = ipatch%fmean_npp (ico) + opatch%fmean_leaf_resp (oco) = ipatch%fmean_leaf_resp (ico) + opatch%fmean_root_resp (oco) = ipatch%fmean_root_resp (ico) + opatch%fmean_growth_resp (oco) = ipatch%fmean_growth_resp (ico) + opatch%fmean_storage_resp (oco) = ipatch%fmean_storage_resp (ico) + opatch%fmean_vleaf_resp (oco) = ipatch%fmean_vleaf_resp (ico) + opatch%fmean_plresp (oco) = ipatch%fmean_plresp (ico) + opatch%fmean_leaf_energy (oco) = ipatch%fmean_leaf_energy (ico) + opatch%fmean_leaf_water (oco) = ipatch%fmean_leaf_water (ico) + opatch%fmean_leaf_hcap (oco) = ipatch%fmean_leaf_hcap (ico) + opatch%fmean_leaf_vpdef (oco) = ipatch%fmean_leaf_vpdef (ico) + opatch%fmean_leaf_temp (oco) = ipatch%fmean_leaf_temp (ico) + opatch%fmean_leaf_fliq (oco) = ipatch%fmean_leaf_fliq (ico) + opatch%fmean_leaf_gsw (oco) = ipatch%fmean_leaf_gsw (ico) + opatch%fmean_leaf_gbw (oco) = ipatch%fmean_leaf_gbw (ico) + opatch%fmean_wood_energy (oco) = ipatch%fmean_wood_energy (ico) + opatch%fmean_wood_water (oco) = ipatch%fmean_wood_water (ico) + opatch%fmean_wood_hcap (oco) = ipatch%fmean_wood_hcap (ico) + opatch%fmean_wood_temp (oco) = ipatch%fmean_wood_temp (ico) + opatch%fmean_wood_fliq (oco) = ipatch%fmean_wood_fliq (ico) + opatch%fmean_wood_gbw (oco) = ipatch%fmean_wood_gbw (ico) + opatch%fmean_fs_open (oco) = ipatch%fmean_fs_open (ico) + opatch%fmean_fsw (oco) = ipatch%fmean_fsw (ico) + opatch%fmean_fsn (oco) = ipatch%fmean_fsn (ico) + opatch%fmean_psi_open (oco) = ipatch%fmean_psi_open (ico) + opatch%fmean_psi_closed (oco) = ipatch%fmean_psi_closed (ico) + opatch%fmean_water_supply (oco) = ipatch%fmean_water_supply (ico) + opatch%fmean_light_level (oco) = ipatch%fmean_light_level (ico) + opatch%fmean_light_level_beam(oco) = ipatch%fmean_light_level_beam(ico) + opatch%fmean_light_level_diff(oco) = ipatch%fmean_light_level_diff(ico) + opatch%fmean_par_l (oco) = ipatch%fmean_par_l (ico) + opatch%fmean_par_l_beam (oco) = ipatch%fmean_par_l_beam (ico) + opatch%fmean_par_l_diff (oco) = ipatch%fmean_par_l_diff (ico) + opatch%fmean_rshort_l (oco) = ipatch%fmean_rshort_l (ico) + opatch%fmean_rlong_l (oco) = ipatch%fmean_rlong_l (ico) + opatch%fmean_sensible_lc (oco) = ipatch%fmean_sensible_lc (ico) + opatch%fmean_vapor_lc (oco) = ipatch%fmean_vapor_lc (ico) + opatch%fmean_transp (oco) = ipatch%fmean_transp (ico) + opatch%fmean_intercepted_al (oco) = ipatch%fmean_intercepted_al (ico) + opatch%fmean_wshed_lg (oco) = ipatch%fmean_wshed_lg (ico) + opatch%fmean_rshort_w (oco) = ipatch%fmean_rshort_w (ico) + opatch%fmean_rlong_w (oco) = ipatch%fmean_rlong_w (ico) + opatch%fmean_sensible_wc (oco) = ipatch%fmean_sensible_wc (ico) + opatch%fmean_vapor_wc (oco) = ipatch%fmean_vapor_wc (ico) + opatch%fmean_intercepted_aw (oco) = ipatch%fmean_intercepted_aw (ico) + opatch%fmean_wshed_wg (oco) = ipatch%fmean_wshed_wg (ico) + !---------------------------------------------------------------------------------! + + + !------ Carbon balance variables. ------------------------------------------------! + do m=1,13 + opatch%cb (m,oco) = ipatch%cb (m,ico) + opatch%cb_lightmax(m,oco) = ipatch%cb_lightmax(m,ico) + opatch%cb_moistmax(m,oco) = ipatch%cb_moistmax(m,ico) + end do + !---------------------------------------------------------------------------------! + + + !------ Mortality variables. -----------------------------------------------------! + do m=1,n_mort + opatch%mort_rate(m,oco) = ipatch%mort_rate(m,ico) + end do + !---------------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------------! + ! Daily means. ! + !---------------------------------------------------------------------------------! + if (writing_long) then + !----- Scalars. ---------------------------------------------------------------! + opatch%dmean_nppleaf (oco) = ipatch%dmean_nppleaf (ico) + opatch%dmean_nppfroot (oco) = ipatch%dmean_nppfroot (ico) + opatch%dmean_nppsapwood (oco) = ipatch%dmean_nppsapwood (ico) + opatch%dmean_nppcroot (oco) = ipatch%dmean_nppcroot (ico) + opatch%dmean_nppseeds (oco) = ipatch%dmean_nppseeds (ico) + opatch%dmean_nppwood (oco) = ipatch%dmean_nppwood (ico) + opatch%dmean_nppdaily (oco) = ipatch%dmean_nppdaily (ico) + opatch%dmean_gpp (oco) = ipatch%dmean_gpp (ico) + opatch%dmean_npp (oco) = ipatch%dmean_npp (ico) + opatch%dmean_leaf_resp (oco) = ipatch%dmean_leaf_resp (ico) + opatch%dmean_root_resp (oco) = ipatch%dmean_root_resp (ico) + opatch%dmean_growth_resp (oco) = ipatch%dmean_growth_resp (ico) + opatch%dmean_storage_resp (oco) = ipatch%dmean_storage_resp (ico) + opatch%dmean_vleaf_resp (oco) = ipatch%dmean_vleaf_resp (ico) + opatch%dmean_plresp (oco) = ipatch%dmean_plresp (ico) + opatch%dmean_leaf_energy (oco) = ipatch%dmean_leaf_energy (ico) + opatch%dmean_leaf_water (oco) = ipatch%dmean_leaf_water (ico) + opatch%dmean_leaf_hcap (oco) = ipatch%dmean_leaf_hcap (ico) + opatch%dmean_leaf_vpdef (oco) = ipatch%dmean_leaf_vpdef (ico) + opatch%dmean_leaf_temp (oco) = ipatch%dmean_leaf_temp (ico) + opatch%dmean_leaf_fliq (oco) = ipatch%dmean_leaf_fliq (ico) + opatch%dmean_leaf_gsw (oco) = ipatch%dmean_leaf_gsw (ico) + opatch%dmean_leaf_gbw (oco) = ipatch%dmean_leaf_gbw (ico) + opatch%dmean_wood_energy (oco) = ipatch%dmean_wood_energy (ico) + opatch%dmean_wood_water (oco) = ipatch%dmean_wood_water (ico) + opatch%dmean_wood_hcap (oco) = ipatch%dmean_wood_hcap (ico) + opatch%dmean_wood_temp (oco) = ipatch%dmean_wood_temp (ico) + opatch%dmean_wood_fliq (oco) = ipatch%dmean_wood_fliq (ico) + opatch%dmean_wood_gbw (oco) = ipatch%dmean_wood_gbw (ico) + opatch%dmean_fs_open (oco) = ipatch%dmean_fs_open (ico) + opatch%dmean_fsw (oco) = ipatch%dmean_fsw (ico) + opatch%dmean_fsn (oco) = ipatch%dmean_fsn (ico) + opatch%dmean_psi_open (oco) = ipatch%dmean_psi_open (ico) + opatch%dmean_psi_closed (oco) = ipatch%dmean_psi_closed (ico) + opatch%dmean_water_supply (oco) = ipatch%dmean_water_supply (ico) + opatch%dmean_light_level (oco) = ipatch%dmean_light_level (ico) + opatch%dmean_light_level_beam(oco) = ipatch%dmean_light_level_beam(ico) + opatch%dmean_light_level_diff(oco) = ipatch%dmean_light_level_diff(ico) + opatch%dmean_par_l (oco) = ipatch%dmean_par_l (ico) + opatch%dmean_par_l_beam (oco) = ipatch%dmean_par_l_beam (ico) + opatch%dmean_par_l_diff (oco) = ipatch%dmean_par_l_diff (ico) + opatch%dmean_rshort_l (oco) = ipatch%dmean_rshort_l (ico) + opatch%dmean_rlong_l (oco) = ipatch%dmean_rlong_l (ico) + opatch%dmean_sensible_lc (oco) = ipatch%dmean_sensible_lc (ico) + opatch%dmean_vapor_lc (oco) = ipatch%dmean_vapor_lc (ico) + opatch%dmean_transp (oco) = ipatch%dmean_transp (ico) + opatch%dmean_intercepted_al (oco) = ipatch%dmean_intercepted_al (ico) + opatch%dmean_wshed_lg (oco) = ipatch%dmean_wshed_lg (ico) + opatch%dmean_rshort_w (oco) = ipatch%dmean_rshort_w (ico) + opatch%dmean_rlong_w (oco) = ipatch%dmean_rlong_w (ico) + opatch%dmean_sensible_wc (oco) = ipatch%dmean_sensible_wc (ico) + opatch%dmean_vapor_wc (oco) = ipatch%dmean_vapor_wc (ico) + opatch%dmean_intercepted_aw (oco) = ipatch%dmean_intercepted_aw (ico) + opatch%dmean_wshed_wg (oco) = ipatch%dmean_wshed_wg (ico) + end if + !---------------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------------! + ! Monthly means. ! + !---------------------------------------------------------------------------------! + if (writing_eorq) then + !----- Scalars. ---------------------------------------------------------------! + opatch%mmean_lai (oco) = ipatch%mmean_lai (ico) + opatch%mmean_bleaf (oco) = ipatch%mmean_bleaf (ico) + opatch%mmean_broot (oco) = ipatch%mmean_broot (ico) + opatch%mmean_bstorage (oco) = ipatch%mmean_bstorage (ico) + opatch%mmean_leaf_maintenance(oco) = ipatch%mmean_leaf_maintenance(ico) + opatch%mmean_root_maintenance(oco) = ipatch%mmean_root_maintenance(ico) + opatch%mmean_leaf_drop (oco) = ipatch%mmean_leaf_drop (ico) + opatch%mmean_cb (oco) = ipatch%mmean_cb (ico) + opatch%mmean_gpp (oco) = ipatch%mmean_gpp (ico) + opatch%mmean_npp (oco) = ipatch%mmean_npp (ico) + opatch%mmean_leaf_resp (oco) = ipatch%mmean_leaf_resp (ico) + opatch%mmean_root_resp (oco) = ipatch%mmean_root_resp (ico) + opatch%mmean_growth_resp (oco) = ipatch%mmean_growth_resp (ico) + opatch%mmean_storage_resp (oco) = ipatch%mmean_storage_resp (ico) + opatch%mmean_vleaf_resp (oco) = ipatch%mmean_vleaf_resp (ico) + opatch%mmean_plresp (oco) = ipatch%mmean_plresp (ico) + opatch%mmean_leaf_energy (oco) = ipatch%mmean_leaf_energy (ico) + opatch%mmean_leaf_water (oco) = ipatch%mmean_leaf_water (ico) + opatch%mmean_leaf_hcap (oco) = ipatch%mmean_leaf_hcap (ico) + opatch%mmean_leaf_vpdef (oco) = ipatch%mmean_leaf_vpdef (ico) + opatch%mmean_leaf_temp (oco) = ipatch%mmean_leaf_temp (ico) + opatch%mmean_leaf_fliq (oco) = ipatch%mmean_leaf_fliq (ico) + opatch%mmean_leaf_gsw (oco) = ipatch%mmean_leaf_gsw (ico) + opatch%mmean_leaf_gbw (oco) = ipatch%mmean_leaf_gbw (ico) + opatch%mmean_wood_energy (oco) = ipatch%mmean_wood_energy (ico) + opatch%mmean_wood_water (oco) = ipatch%mmean_wood_water (ico) + opatch%mmean_wood_hcap (oco) = ipatch%mmean_wood_hcap (ico) + opatch%mmean_wood_temp (oco) = ipatch%mmean_wood_temp (ico) + opatch%mmean_wood_fliq (oco) = ipatch%mmean_wood_fliq (ico) + opatch%mmean_wood_gbw (oco) = ipatch%mmean_wood_gbw (ico) + opatch%mmean_fs_open (oco) = ipatch%mmean_fs_open (ico) + opatch%mmean_fsw (oco) = ipatch%mmean_fsw (ico) + opatch%mmean_fsn (oco) = ipatch%mmean_fsn (ico) + opatch%mmean_psi_open (oco) = ipatch%mmean_psi_open (ico) + opatch%mmean_psi_closed (oco) = ipatch%mmean_psi_closed (ico) + opatch%mmean_water_supply (oco) = ipatch%mmean_water_supply (ico) + opatch%mmean_light_level (oco) = ipatch%mmean_light_level (ico) + opatch%mmean_light_level_beam(oco) = ipatch%mmean_light_level_beam(ico) + opatch%mmean_light_level_diff(oco) = ipatch%mmean_light_level_diff(ico) + opatch%mmean_par_l (oco) = ipatch%mmean_par_l (ico) + opatch%mmean_par_l_beam (oco) = ipatch%mmean_par_l_beam (ico) + opatch%mmean_par_l_diff (oco) = ipatch%mmean_par_l_diff (ico) + opatch%mmean_rshort_l (oco) = ipatch%mmean_rshort_l (ico) + opatch%mmean_rlong_l (oco) = ipatch%mmean_rlong_l (ico) + opatch%mmean_sensible_lc (oco) = ipatch%mmean_sensible_lc (ico) + opatch%mmean_vapor_lc (oco) = ipatch%mmean_vapor_lc (ico) + opatch%mmean_transp (oco) = ipatch%mmean_transp (ico) + opatch%mmean_intercepted_al (oco) = ipatch%mmean_intercepted_al (ico) + opatch%mmean_wshed_lg (oco) = ipatch%mmean_wshed_lg (ico) + opatch%mmean_rshort_w (oco) = ipatch%mmean_rshort_w (ico) + opatch%mmean_rlong_w (oco) = ipatch%mmean_rlong_w (ico) + opatch%mmean_sensible_wc (oco) = ipatch%mmean_sensible_wc (ico) + opatch%mmean_vapor_wc (oco) = ipatch%mmean_vapor_wc (ico) + opatch%mmean_intercepted_aw (oco) = ipatch%mmean_intercepted_aw (ico) + opatch%mmean_wshed_wg (oco) = ipatch%mmean_wshed_wg (ico) + opatch%mmean_nppleaf (oco) = ipatch%mmean_nppleaf (ico) + opatch%mmean_nppfroot (oco) = ipatch%mmean_nppfroot (ico) + opatch%mmean_nppsapwood (oco) = ipatch%mmean_nppsapwood (ico) + opatch%mmean_nppcroot (oco) = ipatch%mmean_nppcroot (ico) + opatch%mmean_nppseeds (oco) = ipatch%mmean_nppseeds (ico) + opatch%mmean_nppwood (oco) = ipatch%mmean_nppwood (ico) + opatch%mmean_nppdaily (oco) = ipatch%mmean_nppdaily (ico) + opatch%mmsqu_gpp (oco) = ipatch%mmsqu_gpp (ico) + opatch%mmsqu_npp (oco) = ipatch%mmsqu_npp (ico) + opatch%mmsqu_plresp (oco) = ipatch%mmsqu_plresp (ico) + opatch%mmsqu_sensible_lc (oco) = ipatch%mmsqu_sensible_lc (ico) + opatch%mmsqu_vapor_lc (oco) = ipatch%mmsqu_vapor_lc (ico) + opatch%mmsqu_transp (oco) = ipatch%mmsqu_transp (ico) + opatch%mmsqu_sensible_wc (oco) = ipatch%mmsqu_sensible_wc (ico) + opatch%mmsqu_vapor_wc (oco) = ipatch%mmsqu_vapor_wc (ico) + !----- Mortality variables. ---------------------------------------------------! + do m=1,n_mort + opatch%mmean_mort_rate(m,oco) = ipatch%mmean_mort_rate(m,ico) + end do + !------------------------------------------------------------------------------! + end if + !---------------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------------! + ! Mean diel. ! + !---------------------------------------------------------------------------------! + + if (writing_dcyc) then + do m=1,ndcycle + opatch%qmean_gpp (m,oco) = ipatch%qmean_gpp (m,ico) + opatch%qmean_npp (m,oco) = ipatch%qmean_npp (m,ico) + opatch%qmean_leaf_resp (m,oco) = ipatch%qmean_leaf_resp (m,ico) + opatch%qmean_root_resp (m,oco) = ipatch%qmean_root_resp (m,ico) + opatch%qmean_growth_resp (m,oco) = ipatch%qmean_growth_resp (m,ico) + opatch%qmean_storage_resp (m,oco) = ipatch%qmean_storage_resp (m,ico) + opatch%qmean_vleaf_resp (m,oco) = ipatch%qmean_vleaf_resp (m,ico) + opatch%qmean_plresp (m,oco) = ipatch%qmean_plresp (m,ico) + opatch%qmean_leaf_energy (m,oco) = ipatch%qmean_leaf_energy (m,ico) + opatch%qmean_leaf_water (m,oco) = ipatch%qmean_leaf_water (m,ico) + opatch%qmean_leaf_hcap (m,oco) = ipatch%qmean_leaf_hcap (m,ico) + opatch%qmean_leaf_vpdef (m,oco) = ipatch%qmean_leaf_vpdef (m,ico) + opatch%qmean_leaf_temp (m,oco) = ipatch%qmean_leaf_temp (m,ico) + opatch%qmean_leaf_fliq (m,oco) = ipatch%qmean_leaf_fliq (m,ico) + opatch%qmean_leaf_gsw (m,oco) = ipatch%qmean_leaf_gsw (m,ico) + opatch%qmean_leaf_gbw (m,oco) = ipatch%qmean_leaf_gbw (m,ico) + opatch%qmean_wood_energy (m,oco) = ipatch%qmean_wood_energy (m,ico) + opatch%qmean_wood_water (m,oco) = ipatch%qmean_wood_water (m,ico) + opatch%qmean_wood_hcap (m,oco) = ipatch%qmean_wood_hcap (m,ico) + opatch%qmean_wood_temp (m,oco) = ipatch%qmean_wood_temp (m,ico) + opatch%qmean_wood_fliq (m,oco) = ipatch%qmean_wood_fliq (m,ico) + opatch%qmean_wood_gbw (m,oco) = ipatch%qmean_wood_gbw (m,ico) + opatch%qmean_fs_open (m,oco) = ipatch%qmean_fs_open (m,ico) + opatch%qmean_fsw (m,oco) = ipatch%qmean_fsw (m,ico) + opatch%qmean_fsn (m,oco) = ipatch%qmean_fsn (m,ico) + opatch%qmean_psi_open (m,oco) = ipatch%qmean_psi_open (m,ico) + opatch%qmean_psi_closed (m,oco) = ipatch%qmean_psi_closed (m,ico) + opatch%qmean_water_supply (m,oco) = ipatch%qmean_water_supply (m,ico) + opatch%qmean_light_level (m,oco) = ipatch%qmean_light_level (m,ico) + opatch%qmean_light_level_beam(m,oco) = ipatch%qmean_light_level_beam(m,ico) + opatch%qmean_light_level_diff(m,oco) = ipatch%qmean_light_level_diff(m,ico) + opatch%qmean_par_l (m,oco) = ipatch%qmean_par_l (m,ico) + opatch%qmean_par_l_beam (m,oco) = ipatch%qmean_par_l_beam (m,ico) + opatch%qmean_par_l_diff (m,oco) = ipatch%qmean_par_l_diff (m,ico) + opatch%qmean_rshort_l (m,oco) = ipatch%qmean_rshort_l (m,ico) + opatch%qmean_rlong_l (m,oco) = ipatch%qmean_rlong_l (m,ico) + opatch%qmean_sensible_lc (m,oco) = ipatch%qmean_sensible_lc (m,ico) + opatch%qmean_vapor_lc (m,oco) = ipatch%qmean_vapor_lc (m,ico) + opatch%qmean_transp (m,oco) = ipatch%qmean_transp (m,ico) + opatch%qmean_intercepted_al (m,oco) = ipatch%qmean_intercepted_al (m,ico) + opatch%qmean_wshed_lg (m,oco) = ipatch%qmean_wshed_lg (m,ico) + opatch%qmean_rshort_w (m,oco) = ipatch%qmean_rshort_w (m,ico) + opatch%qmean_rlong_w (m,oco) = ipatch%qmean_rlong_w (m,ico) + opatch%qmean_sensible_wc (m,oco) = ipatch%qmean_sensible_wc (m,ico) + opatch%qmean_vapor_wc (m,oco) = ipatch%qmean_vapor_wc (m,ico) + opatch%qmean_intercepted_aw (m,oco) = ipatch%qmean_intercepted_aw (m,ico) + opatch%qmean_wshed_wg (m,oco) = ipatch%qmean_wshed_wg (m,ico) + opatch%qmsqu_gpp (m,oco) = ipatch%qmsqu_gpp (m,ico) + opatch%qmsqu_npp (m,oco) = ipatch%qmsqu_npp (m,ico) + opatch%qmsqu_plresp (m,oco) = ipatch%qmsqu_plresp (m,ico) + opatch%qmsqu_sensible_lc (m,oco) = ipatch%qmsqu_sensible_lc (m,ico) + opatch%qmsqu_vapor_lc (m,oco) = ipatch%qmsqu_vapor_lc (m,ico) + opatch%qmsqu_transp (m,oco) = ipatch%qmsqu_transp (m,ico) + opatch%qmsqu_sensible_wc (m,oco) = ipatch%qmsqu_sensible_wc (m,ico) + opatch%qmsqu_vapor_wc (m,oco) = ipatch%qmsqu_vapor_wc (m,ico) + end do + !------------------------------------------------------------------------------! + end if + !---------------------------------------------------------------------------------! + end do cohortloop + + return + end subroutine copy_patchtype + !=======================================================================================! + !=======================================================================================! + + + + + + !=======================================================================================! + !=======================================================================================! + ! This subroutine copies part of one cohort to another (only the ones where mask ! + ! is .true.). Please notice the following requirements. ! + ! ! + ! 1. IPATCH and LMASK must have dimension MASKSZ ! + ! 2. OPATCH must have dimension NEWSZ ! + ! 3. The number of .true. elements of LMASK must be NEWSZ ! + ! ! + ! In case these conditions aren't met, then the code will crash due to ! + ! segmentation violation. ! + ! ! + ! Also, NEVER use this sub-routine for a pre-allocated OPATCH. This will try to ! + ! allocate cohorts and you may experience horrible memory leaks. ! + !---------------------------------------------------------------------------------------! + subroutine copy_patchtype_mask(ipatch,opatch,lmask,isize,osize) + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(patchtype) , target :: ipatch + type(patchtype) , target :: opatch + integer , intent(in) :: isize + integer , intent(in) :: osize + logical,dimension(isize), intent(in) :: lmask + !----- Local variables. -------------------------------------------------------------! + integer :: i + integer :: m + integer :: n + integer :: z + !------------------------------------------------------------------------------------! + + + !------------------------------------------------------------------------------------! + ! Map the indices between the input and the output vectors. ! + !------------------------------------------------------------------------------------! + z = count(lmask) + !----- Crash if the dimensions don't match. -----------------------------------------! + if (z /= osize) then + write (unit=*,fmt='(a,1x,i12)') ' Z = ',z + write (unit=*,fmt='(a,1x,i12)') ' OSIZE = ',osize + call fatal_error('Mask doesn''t have OSIZE .true. elements' & + ,'copy_sitetype_mask','ed_state_vars.f90') + end if + !----- In case nothing should be copied, we return. ---------------------------------! + if (z == 0) return + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + ! Fortran doesn't like sub-routines that call too many sub-routines or ! + ! functions. We split the packing procedure to reduce the number of calls per ! + ! procedure and make the compilation more efficient. ! + !------------------------------------------------------------------------------------! + call copy_patchtype_mask_inst (ipatch,opatch,z,lmask,isize,osize) + call copy_patchtype_mask_fmean(ipatch,opatch,z,lmask,isize,osize) + if (writing_long) call copy_patchtype_mask_dmean(ipatch,opatch,z,lmask,isize,osize) + if (writing_eorq) call copy_patchtype_mask_mmean(ipatch,opatch,z,lmask,isize,osize) + if (writing_dcyc) call copy_patchtype_mask_qmean(ipatch,opatch,z,lmask,isize,osize) + !------------------------------------------------------------------------------------! + + return + end subroutine copy_patchtype_mask + !=======================================================================================! + !=======================================================================================! + - if(associated(cgrid%dmean_rshort)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_rshort,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_RSHORT :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean shortwave radiation','[w/m2]','ipoly') - end if - if(associated(cgrid%dmean_rshort_diff)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_rshort_diff,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_RSHORT_DIFF :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean diffuse shortwave radiation','[w/m2]','ipoly') - end if - if(associated(cgrid%dmean_par)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_par,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_PAR :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean PAR','[w/m2]','ipoly') - end if - if(associated(cgrid%dmean_par_diff)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_par_diff,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_PAR_DIFF :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean diffuse PAR','[w/m2]','ipoly') - end if - - if(associated(cgrid%dmean_rlong)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_rlong,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_RLONG :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean longwave radiation','[w/m2]','ipoly') - end if + !=======================================================================================! + !=======================================================================================! + ! This sub-routine copies the cohort-level variables that are not fmean, mmean, ! + ! mmsqu, qmean, qmsqu. The only sub-routine that should ever call this one is ! + ! copy_patchtype_mask. ! + !---------------------------------------------------------------------------------------! + subroutine copy_patchtype_mask_inst(ipatch,opatch,z,lmask,isize,osize) + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(patchtype) , target :: ipatch + type(patchtype) , target :: opatch + integer , intent(in) :: z + integer , intent(in) :: isize + integer , intent(in) :: osize + logical,dimension(isize), intent(in) :: lmask + !----- Local variables. -------------------------------------------------------------! + integer :: i + integer :: m + integer :: n + !------------------------------------------------------------------------------------! - if(associated(cgrid%dmean_rshort_gnd)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_rshort_gnd,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_RSHORT_GND :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean ground abs. shortwave radiation','[w/m2]','ipoly') - end if - if(associated(cgrid%dmean_par_gnd)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_par_gnd,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_PAR_GND :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean ground abs. PAR','[w/m2]','ipoly') - end if - - if(associated(cgrid%dmean_rlong_gnd)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_rlong_gnd,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_RLONG_GND :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean ground abs. longwave radiation','[w/m2]','ipoly') - end if - - if(associated(cgrid%dmean_albedo)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_albedo,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_ALBEDO :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean albedo','[---]','ipoly') - end if - - if(associated(cgrid%dmean_albedo_beam)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_albedo_beam,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_ALBEDO_BEAM :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean direct albedo','[---]','ipoly') - end if - - if(associated(cgrid%dmean_albedo_diffuse)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_albedo_diffuse,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_ALBEDO_DIFFUSE :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean diffuse albedo','[---]','ipoly') - end if - - if(associated(cgrid%dmean_rlong_albedo)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_rlong_albedo,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_RLONG_ALBEDO :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean longwave albedo','[---]','ipoly') - end if - - if(associated(cgrid%dmean_rlongup)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_rlongup,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_RLONGUP :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean longwave emission from ground','[---]','ipoly') - end if - - if(associated(cgrid%dmean_parup)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_parup,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_PARUP :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean upwelling PAR at top of canopy','[---]','ipoly') - end if - - if(associated(cgrid%dmean_nirup)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_nirup,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_NIRUP :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean upwelling NIR at top of canopy','[---]','ipoly') - end if - - if(associated(cgrid%dmean_rshortup)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_rshortup,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_RSHORTUP :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean upwelling SW radiation at top of canopy','[---]','ipoly') - end if - - if(associated(cgrid%dmean_rnet)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_rnet,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_RNET :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean net radiation at top of canopy','[---]','ipoly') - end if - if(associated(cgrid%dmean_co2_residual)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_co2_residual,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_CO2_RESIDUAL :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean of residual canopy CO2 ','[umol/m2/s]','ipoly') - end if + !----- Scalars. ---------------------------------------------------------------------! + opatch%pft (1:z) = pack(ipatch%pft ,lmask) + opatch%nplant (1:z) = pack(ipatch%nplant ,lmask) + opatch%phenology_status (1:z) = pack(ipatch%phenology_status ,lmask) + opatch%recruit_dbh (1:z) = pack(ipatch%recruit_dbh ,lmask) + opatch%census_status (1:z) = pack(ipatch%census_status ,lmask) + opatch%hite (1:z) = pack(ipatch%hite ,lmask) + opatch%agb (1:z) = pack(ipatch%agb ,lmask) + opatch%basarea (1:z) = pack(ipatch%basarea ,lmask) + opatch%dagb_dt (1:z) = pack(ipatch%dagb_dt ,lmask) + opatch%dlnagb_dt (1:z) = pack(ipatch%dlnagb_dt ,lmask) + opatch%dba_dt (1:z) = pack(ipatch%dba_dt ,lmask) + opatch%dlnba_dt (1:z) = pack(ipatch%dlnba_dt ,lmask) + opatch%ddbh_dt (1:z) = pack(ipatch%ddbh_dt ,lmask) + opatch%dlndbh_dt (1:z) = pack(ipatch%dlndbh_dt ,lmask) + opatch%dbh (1:z) = pack(ipatch%dbh ,lmask) + opatch%bdead (1:z) = pack(ipatch%bdead ,lmask) + opatch%bleaf (1:z) = pack(ipatch%bleaf ,lmask) + opatch%balive (1:z) = pack(ipatch%balive ,lmask) + opatch%broot (1:z) = pack(ipatch%broot ,lmask) + opatch%bsapwooda (1:z) = pack(ipatch%bsapwooda ,lmask) + opatch%bsapwoodb (1:z) = pack(ipatch%bsapwoodb ,lmask) + opatch%bstorage (1:z) = pack(ipatch%bstorage ,lmask) + opatch%bseeds (1:z) = pack(ipatch%bseeds ,lmask) + opatch%lai (1:z) = pack(ipatch%lai ,lmask) + opatch%wai (1:z) = pack(ipatch%wai ,lmask) + opatch%crown_area (1:z) = pack(ipatch%crown_area ,lmask) + opatch%leaf_resolvable (1:z) = pack(ipatch%leaf_resolvable ,lmask) + opatch%wood_resolvable (1:z) = pack(ipatch%wood_resolvable ,lmask) + opatch%cbr_bar (1:z) = pack(ipatch%cbr_bar ,lmask) + opatch%leaf_energy (1:z) = pack(ipatch%leaf_energy ,lmask) + opatch%leaf_temp (1:z) = pack(ipatch%leaf_temp ,lmask) + opatch%leaf_vpdef (1:z) = pack(ipatch%leaf_vpdef ,lmask) + opatch%leaf_temp_pv (1:z) = pack(ipatch%leaf_temp_pv ,lmask) + opatch%leaf_hcap (1:z) = pack(ipatch%leaf_hcap ,lmask) + opatch%leaf_fliq (1:z) = pack(ipatch%leaf_fliq ,lmask) + opatch%leaf_water (1:z) = pack(ipatch%leaf_water ,lmask) + opatch%wood_energy (1:z) = pack(ipatch%wood_energy ,lmask) + opatch%wood_temp (1:z) = pack(ipatch%wood_temp ,lmask) + opatch%wood_temp_pv (1:z) = pack(ipatch%wood_temp_pv ,lmask) + opatch%wood_hcap (1:z) = pack(ipatch%wood_hcap ,lmask) + opatch%wood_fliq (1:z) = pack(ipatch%wood_fliq ,lmask) + opatch%wood_water (1:z) = pack(ipatch%wood_water ,lmask) + opatch%veg_wind (1:z) = pack(ipatch%veg_wind ,lmask) + opatch%lsfc_shv_open (1:z) = pack(ipatch%lsfc_shv_open ,lmask) + opatch%lsfc_shv_closed (1:z) = pack(ipatch%lsfc_shv_closed ,lmask) + opatch%lsfc_co2_open (1:z) = pack(ipatch%lsfc_co2_open ,lmask) + opatch%lsfc_co2_closed (1:z) = pack(ipatch%lsfc_co2_closed ,lmask) + opatch%lint_shv (1:z) = pack(ipatch%lint_shv ,lmask) + opatch%lint_co2_open (1:z) = pack(ipatch%lint_co2_open ,lmask) + opatch%lint_co2_closed (1:z) = pack(ipatch%lint_co2_closed ,lmask) + opatch%today_leaf_resp (1:z) = pack(ipatch%today_leaf_resp ,lmask) + opatch%today_root_resp (1:z) = pack(ipatch%today_root_resp ,lmask) + opatch%today_gpp (1:z) = pack(ipatch%today_gpp ,lmask) + opatch%today_gpp_pot (1:z) = pack(ipatch%today_gpp_pot ,lmask) + opatch%today_gpp_lightmax (1:z) = pack(ipatch%today_gpp_lightmax ,lmask) + opatch%today_gpp_moistmax (1:z) = pack(ipatch%today_gpp_moistmax ,lmask) + opatch%today_nppleaf (1:z) = pack(ipatch%today_nppleaf ,lmask) + opatch%today_nppfroot (1:z) = pack(ipatch%today_nppfroot ,lmask) + opatch%today_nppsapwood (1:z) = pack(ipatch%today_nppsapwood ,lmask) + opatch%today_nppcroot (1:z) = pack(ipatch%today_nppcroot ,lmask) + opatch%today_nppseeds (1:z) = pack(ipatch%today_nppseeds ,lmask) + opatch%today_nppwood (1:z) = pack(ipatch%today_nppwood ,lmask) + opatch%today_nppdaily (1:z) = pack(ipatch%today_nppdaily ,lmask) + opatch%growth_respiration (1:z) = pack(ipatch%growth_respiration ,lmask) + opatch%storage_respiration (1:z) = pack(ipatch%storage_respiration ,lmask) + opatch%vleaf_respiration (1:z) = pack(ipatch%vleaf_respiration ,lmask) + opatch%monthly_dndt (1:z) = pack(ipatch%monthly_dndt ,lmask) + opatch%monthly_dlnndt (1:z) = pack(ipatch%monthly_dlnndt ,lmask) + opatch%krdepth (1:z) = pack(ipatch%krdepth ,lmask) + opatch%first_census (1:z) = pack(ipatch%first_census ,lmask) + opatch%new_recruit_flag (1:z) = pack(ipatch%new_recruit_flag ,lmask) + opatch%light_level (1:z) = pack(ipatch%light_level ,lmask) + opatch%light_level_beam (1:z) = pack(ipatch%light_level_beam ,lmask) + opatch%light_level_diff (1:z) = pack(ipatch%light_level_diff ,lmask) + opatch%par_l (1:z) = pack(ipatch%par_l ,lmask) + opatch%par_l_beam (1:z) = pack(ipatch%par_l_beam ,lmask) + opatch%par_l_diffuse (1:z) = pack(ipatch%par_l_diffuse ,lmask) + opatch%rshort_l (1:z) = pack(ipatch%rshort_l ,lmask) + opatch%rshort_l_beam (1:z) = pack(ipatch%rshort_l_beam ,lmask) + opatch%rshort_l_diffuse (1:z) = pack(ipatch%rshort_l_diffuse ,lmask) + opatch%rlong_l (1:z) = pack(ipatch%rlong_l ,lmask) + opatch%rlong_l_surf (1:z) = pack(ipatch%rlong_l_surf ,lmask) + opatch%rlong_l_incid (1:z) = pack(ipatch%rlong_l_incid ,lmask) + opatch%rshort_w (1:z) = pack(ipatch%rshort_w ,lmask) + opatch%rshort_w_beam (1:z) = pack(ipatch%rshort_w_beam ,lmask) + opatch%rshort_w_diffuse (1:z) = pack(ipatch%rshort_w_diffuse ,lmask) + opatch%rlong_w (1:z) = pack(ipatch%rlong_w ,lmask) + opatch%rlong_w_surf (1:z) = pack(ipatch%rlong_w_surf ,lmask) + opatch%rlong_w_incid (1:z) = pack(ipatch%rlong_w_incid ,lmask) + opatch%leaf_gbh (1:z) = pack(ipatch%leaf_gbh ,lmask) + opatch%leaf_gbw (1:z) = pack(ipatch%leaf_gbw ,lmask) + opatch%wood_gbh (1:z) = pack(ipatch%wood_gbh ,lmask) + opatch%wood_gbw (1:z) = pack(ipatch%wood_gbw ,lmask) + opatch%A_open (1:z) = pack(ipatch%A_open ,lmask) + opatch%A_closed (1:z) = pack(ipatch%A_closed ,lmask) + opatch%psi_open (1:z) = pack(ipatch%psi_open ,lmask) + opatch%psi_closed (1:z) = pack(ipatch%psi_closed ,lmask) + opatch%gsw_open (1:z) = pack(ipatch%gsw_open ,lmask) + opatch%gsw_closed (1:z) = pack(ipatch%gsw_closed ,lmask) + opatch%leaf_gsw (1:z) = pack(ipatch%leaf_gsw ,lmask) + opatch%fsw (1:z) = pack(ipatch%fsw ,lmask) + opatch%fsn (1:z) = pack(ipatch%fsn ,lmask) + opatch%fs_open (1:z) = pack(ipatch%fs_open ,lmask) + opatch%water_supply (1:z) = pack(ipatch%water_supply ,lmask) + opatch%leaf_maintenance (1:z) = pack(ipatch%leaf_maintenance ,lmask) + opatch%root_maintenance (1:z) = pack(ipatch%root_maintenance ,lmask) + opatch%leaf_drop (1:z) = pack(ipatch%leaf_drop ,lmask) + opatch%leaf_respiration (1:z) = pack(ipatch%leaf_respiration ,lmask) + opatch%root_respiration (1:z) = pack(ipatch%root_respiration ,lmask) + opatch%gpp (1:z) = pack(ipatch%gpp ,lmask) + opatch%paw_avg (1:z) = pack(ipatch%paw_avg ,lmask) + opatch%elongf (1:z) = pack(ipatch%elongf ,lmask) + opatch%turnover_amp (1:z) = pack(ipatch%turnover_amp ,lmask) + opatch%llspan (1:z) = pack(ipatch%llspan ,lmask) + opatch%vm_bar (1:z) = pack(ipatch%vm_bar ,lmask) + opatch%sla (1:z) = pack(ipatch%sla ,lmask) + !------------------------------------------------------------------------------------! - if(associated(cgrid%dmean_water_residual)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_water_residual,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_WATER_RESIDUAL :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean of residual water ','[kg/m2/s]','ipoly') - end if - if(associated(cgrid%dmean_energy_residual)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_energy_residual,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_ENERGY_RESIDUAL :11:hist:dail') - call metadata_edio(nvar,igr,'Daily mean of residual water ','[J/m2/s]','ipoly') - end if + !------ Carbon balance variables. ---------------------------------------------------! + do m=1,13 + opatch%cb (m,1:z) = pack(ipatch%cb (m,:),lmask) + opatch%cb_lightmax(m,1:z) = pack(ipatch%cb_lightmax (m,:),lmask) + opatch%cb_moistmax(m,1:z) = pack(ipatch%cb_moistmax (m,:),lmask) + end do + !------------------------------------------------------------------------------------! - if(associated(cgrid%mmean_gpp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_gpp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_GPP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if (associated(cgrid%mmean_nppleaf)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_nppleaf,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_NPPLEAF :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Polygon Average Monthly NPP leaf','[kgC/m2/yr]','ipoly') - end if + !------ Mortality variables. --------------------------------------------------------! + do m=1,n_mort + opatch%mort_rate(m,1:z) = pack(ipatch%mort_rate (m,:),lmask) + end do + !------------------------------------------------------------------------------------! - if (associated(cgrid%mmean_nppfroot)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_nppfroot,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_NPPFROOT :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Polygon Average Monthly NPP froot','[kgC/m2/yr]','ipoly') - end if - - if (associated(cgrid%mmean_nppsapwood)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_nppsapwood,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_NPPSAPWOOD :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Polygon Average Monthly NPP sapwood','[kgC/m2/yr]','ipoly') - end if + return + end subroutine copy_patchtype_mask_inst + !=======================================================================================! + !=======================================================================================! - if (associated(cgrid%mmean_nppcroot)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_nppcroot,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_NPPCROOT :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Polygon Average Monthly NPP croot','[kgC/m2/yr]','ipoly') - end if - if (associated(cgrid%mmean_nppseeds)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_nppseeds,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_NPPSEEDS :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Polygon Average Monthly NPP seeds','[kgC/m2/yr]','ipoly') - end if - if (associated(cgrid%mmean_nppwood)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_nppwood,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_NPPWOOD :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Polygon Average Monthly NPP wood','[kgC/m2/yr]','ipoly') - end if - - if (associated(cgrid%mmean_nppdaily)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_nppdaily,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_NPPDAILY :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Polygon Average Monthly NPP daily','[kgC/m2/yr]','ipoly') - end if - - if(associated(cgrid%mmean_ustar)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_ustar,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_USTAR :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%mmean_tstar)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_tstar,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_TSTAR :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%mmean_qstar)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_qstar,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_QSTAR :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%mmean_cstar)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_cstar,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_CSTAR :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%mmean_carbon_ac)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_carbon_ac,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_CARBON_AC :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%mmean_carbon_st)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_carbon_st,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_CARBON_ST :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%mmean_evap)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_evap,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_EVAP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly Mean (leaf+soil) Evaporation Rate','[kg/m2/s]','ipoly') - end if - - if(associated(cgrid%mmean_transp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_transp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_TRANSP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%mmean_sensible_ac)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_sensible_ac,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_SENSIBLE_AC :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%mmean_sensible_gc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_sensible_gc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_SENSIBLE_GC :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + !=======================================================================================! + !=======================================================================================! + ! This sub-routine copies the cohort-level variables that are fmean. ! + ! The only sub-routine that should ever call this one is copy_patchtype_mask. ! + !---------------------------------------------------------------------------------------! + subroutine copy_patchtype_mask_fmean(ipatch,opatch,z,lmask,isize,osize) + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(patchtype) , target :: ipatch + type(patchtype) , target :: opatch + integer , intent(in) :: z + integer , intent(in) :: isize + integer , intent(in) :: osize + logical,dimension(isize), intent(in) :: lmask + !----- Local variables. -------------------------------------------------------------! + integer :: i + integer :: m + integer :: n + !------------------------------------------------------------------------------------! - if(associated(cgrid%mmean_sensible_lc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_sensible_lc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_SENSIBLE_LC :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%mmean_sensible_wc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_sensible_wc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_SENSIBLE_WC :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%mmean_vapor_ac)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_vapor_ac,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_VAPOR_AC :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + opatch%fmean_gpp (1:z) = pack(ipatch%fmean_gpp ,lmask) + opatch%fmean_npp (1:z) = pack(ipatch%fmean_npp ,lmask) + opatch%fmean_leaf_resp (1:z) = pack(ipatch%fmean_leaf_resp ,lmask) + opatch%fmean_root_resp (1:z) = pack(ipatch%fmean_root_resp ,lmask) + opatch%fmean_growth_resp (1:z) = pack(ipatch%fmean_growth_resp ,lmask) + opatch%fmean_storage_resp (1:z) = pack(ipatch%fmean_storage_resp ,lmask) + opatch%fmean_vleaf_resp (1:z) = pack(ipatch%fmean_vleaf_resp ,lmask) + opatch%fmean_plresp (1:z) = pack(ipatch%fmean_plresp ,lmask) + opatch%fmean_leaf_energy (1:z) = pack(ipatch%fmean_leaf_energy ,lmask) + opatch%fmean_leaf_water (1:z) = pack(ipatch%fmean_leaf_water ,lmask) + opatch%fmean_leaf_hcap (1:z) = pack(ipatch%fmean_leaf_hcap ,lmask) + opatch%fmean_leaf_vpdef (1:z) = pack(ipatch%fmean_leaf_vpdef ,lmask) + opatch%fmean_leaf_temp (1:z) = pack(ipatch%fmean_leaf_temp ,lmask) + opatch%fmean_leaf_fliq (1:z) = pack(ipatch%fmean_leaf_fliq ,lmask) + opatch%fmean_leaf_gsw (1:z) = pack(ipatch%fmean_leaf_gsw ,lmask) + opatch%fmean_leaf_gbw (1:z) = pack(ipatch%fmean_leaf_gbw ,lmask) + opatch%fmean_wood_energy (1:z) = pack(ipatch%fmean_wood_energy ,lmask) + opatch%fmean_wood_water (1:z) = pack(ipatch%fmean_wood_water ,lmask) + opatch%fmean_wood_hcap (1:z) = pack(ipatch%fmean_wood_hcap ,lmask) + opatch%fmean_wood_temp (1:z) = pack(ipatch%fmean_wood_temp ,lmask) + opatch%fmean_wood_fliq (1:z) = pack(ipatch%fmean_wood_fliq ,lmask) + opatch%fmean_wood_gbw (1:z) = pack(ipatch%fmean_wood_gbw ,lmask) + opatch%fmean_fs_open (1:z) = pack(ipatch%fmean_fs_open ,lmask) + opatch%fmean_fsw (1:z) = pack(ipatch%fmean_fsw ,lmask) + opatch%fmean_fsn (1:z) = pack(ipatch%fmean_fsn ,lmask) + opatch%fmean_psi_open (1:z) = pack(ipatch%fmean_psi_open ,lmask) + opatch%fmean_psi_closed (1:z) = pack(ipatch%fmean_psi_closed ,lmask) + opatch%fmean_water_supply (1:z) = pack(ipatch%fmean_water_supply ,lmask) + opatch%fmean_light_level (1:z) = pack(ipatch%fmean_light_level ,lmask) + opatch%fmean_light_level_beam(1:z) = pack(ipatch%fmean_light_level_beam ,lmask) + opatch%fmean_light_level_diff(1:z) = pack(ipatch%fmean_light_level_diff ,lmask) + opatch%fmean_par_l (1:z) = pack(ipatch%fmean_par_l ,lmask) + opatch%fmean_par_l_beam (1:z) = pack(ipatch%fmean_par_l_beam ,lmask) + opatch%fmean_par_l_diff (1:z) = pack(ipatch%fmean_par_l_diff ,lmask) + opatch%fmean_rshort_l (1:z) = pack(ipatch%fmean_rshort_l ,lmask) + opatch%fmean_rlong_l (1:z) = pack(ipatch%fmean_rlong_l ,lmask) + opatch%fmean_sensible_lc (1:z) = pack(ipatch%fmean_sensible_lc ,lmask) + opatch%fmean_vapor_lc (1:z) = pack(ipatch%fmean_vapor_lc ,lmask) + opatch%fmean_transp (1:z) = pack(ipatch%fmean_transp ,lmask) + opatch%fmean_intercepted_al (1:z) = pack(ipatch%fmean_intercepted_al ,lmask) + opatch%fmean_wshed_lg (1:z) = pack(ipatch%fmean_wshed_lg ,lmask) + opatch%fmean_rshort_w (1:z) = pack(ipatch%fmean_rshort_w ,lmask) + opatch%fmean_rlong_w (1:z) = pack(ipatch%fmean_rlong_w ,lmask) + opatch%fmean_sensible_wc (1:z) = pack(ipatch%fmean_sensible_wc ,lmask) + opatch%fmean_vapor_wc (1:z) = pack(ipatch%fmean_vapor_wc ,lmask) + opatch%fmean_intercepted_aw (1:z) = pack(ipatch%fmean_intercepted_aw ,lmask) + opatch%fmean_wshed_wg (1:z) = pack(ipatch%fmean_wshed_wg ,lmask) + !------------------------------------------------------------------------------------! - if(associated(cgrid%mmean_vapor_gc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_vapor_gc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_VAPOR_GC :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + return + end subroutine copy_patchtype_mask_fmean + !=======================================================================================! + !=======================================================================================! - if(associated(cgrid%mmean_vapor_lc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_vapor_lc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_VAPOR_LC :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%mmean_vapor_wc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_vapor_wc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_VAPOR_WC :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%mmean_nep)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_nep,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_NEP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%mmean_fs_open)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_fs_open,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_FS_OPEN :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%mmean_fsw)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_fsw,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_FSW :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%mmean_fsn)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_fsn,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_FSN :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%mmean_plresp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_plresp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_PLRESP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%mmean_rh)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_rh,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_RH :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%mmean_cwd_rh)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_cwd_rh,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_CWD_RH :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%mmean_leaf_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_leaf_resp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_LEAF_RESP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%mmean_root_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_root_resp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_ROOT_RESP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%mmean_growth_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_growth_resp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_GROWTH_RESP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%mmean_storage_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_storage_resp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_STORAGE_RESP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%mmean_vleaf_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_vleaf_resp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_VLEAF_RESP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%mmean_can_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_can_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_CAN_TEMP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean canopy temperature','[K]','ipoly') - end if - - if(associated(cgrid%mmean_can_shv)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_can_shv,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_CAN_SHV :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean canopy specific humidity','[kg/kg]','ipoly') - end if - - if(associated(cgrid%mmean_can_co2)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_can_co2,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_CAN_CO2 :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean canopy CO2 mixing ratio','[umol/mol]','ipoly') - end if - - if(associated(cgrid%mmean_can_rhos)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_can_rhos,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_CAN_RHOS :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean canopy air density','[kg/m3]','ipoly') - end if - - if(associated(cgrid%mmean_can_prss)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_can_prss,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_CAN_PRSS :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean canopy air pressure','[Pa]','ipoly') - end if - - if(associated(cgrid%mmean_can_theta)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_can_theta,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_CAN_THETA :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean canopy air potential temperature','[K]','ipoly') - end if - - if(associated(cgrid%mmean_can_theiv)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_can_theiv,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_CAN_THEIV :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean canopy air theta_Eiv','[K]','ipoly') - end if - - if(associated(cgrid%mmean_can_vpdef)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_can_vpdef,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_CAN_VPDEF :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean canopy air VPD','[Pa]','ipoly') - end if - - if(associated(cgrid%mmean_gnd_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_gnd_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_GND_TEMP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean ground temperature','[K]','ipoly') - end if - - if(associated(cgrid%mmean_gnd_shv)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_gnd_shv,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_GND_SHV :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean ground specific humidity','[kg/kg]','ipoly') - end if + !=======================================================================================! + !=======================================================================================! + ! This sub-routine copies the cohort-level variables that are dmean. ! + ! The only sub-routine that should ever call this one is copy_patchtype_mask. ! + !---------------------------------------------------------------------------------------! + subroutine copy_patchtype_mask_dmean(ipatch,opatch,z,lmask,isize,osize) + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(patchtype) , target :: ipatch + type(patchtype) , target :: opatch + integer , intent(in) :: z + integer , intent(in) :: isize + integer , intent(in) :: osize + logical,dimension(isize), intent(in) :: lmask + !----- Local variables. -------------------------------------------------------------! + integer :: i + integer :: m + integer :: n + !------------------------------------------------------------------------------------! + + + + !----- Scalars. ------------------------------------------------------------------! + opatch%dmean_nppleaf (1:z) = pack(ipatch%dmean_nppleaf ,lmask) + opatch%dmean_nppfroot (1:z) = pack(ipatch%dmean_nppfroot ,lmask) + opatch%dmean_nppsapwood (1:z) = pack(ipatch%dmean_nppsapwood ,lmask) + opatch%dmean_nppcroot (1:z) = pack(ipatch%dmean_nppcroot ,lmask) + opatch%dmean_nppseeds (1:z) = pack(ipatch%dmean_nppseeds ,lmask) + opatch%dmean_nppwood (1:z) = pack(ipatch%dmean_nppwood ,lmask) + opatch%dmean_nppdaily (1:z) = pack(ipatch%dmean_nppdaily ,lmask) + opatch%dmean_gpp (1:z) = pack(ipatch%dmean_gpp ,lmask) + opatch%dmean_npp (1:z) = pack(ipatch%dmean_npp ,lmask) + opatch%dmean_leaf_resp (1:z) = pack(ipatch%dmean_leaf_resp ,lmask) + opatch%dmean_root_resp (1:z) = pack(ipatch%dmean_root_resp ,lmask) + opatch%dmean_growth_resp (1:z) = pack(ipatch%dmean_growth_resp ,lmask) + opatch%dmean_storage_resp (1:z) = pack(ipatch%dmean_storage_resp ,lmask) + opatch%dmean_vleaf_resp (1:z) = pack(ipatch%dmean_vleaf_resp ,lmask) + opatch%dmean_plresp (1:z) = pack(ipatch%dmean_plresp ,lmask) + opatch%dmean_leaf_energy (1:z) = pack(ipatch%dmean_leaf_energy ,lmask) + opatch%dmean_leaf_water (1:z) = pack(ipatch%dmean_leaf_water ,lmask) + opatch%dmean_leaf_hcap (1:z) = pack(ipatch%dmean_leaf_hcap ,lmask) + opatch%dmean_leaf_vpdef (1:z) = pack(ipatch%dmean_leaf_vpdef ,lmask) + opatch%dmean_leaf_temp (1:z) = pack(ipatch%dmean_leaf_temp ,lmask) + opatch%dmean_leaf_fliq (1:z) = pack(ipatch%dmean_leaf_fliq ,lmask) + opatch%dmean_leaf_gsw (1:z) = pack(ipatch%dmean_leaf_gsw ,lmask) + opatch%dmean_leaf_gbw (1:z) = pack(ipatch%dmean_leaf_gbw ,lmask) + opatch%dmean_wood_energy (1:z) = pack(ipatch%dmean_wood_energy ,lmask) + opatch%dmean_wood_water (1:z) = pack(ipatch%dmean_wood_water ,lmask) + opatch%dmean_wood_hcap (1:z) = pack(ipatch%dmean_wood_hcap ,lmask) + opatch%dmean_wood_temp (1:z) = pack(ipatch%dmean_wood_temp ,lmask) + opatch%dmean_wood_fliq (1:z) = pack(ipatch%dmean_wood_fliq ,lmask) + opatch%dmean_wood_gbw (1:z) = pack(ipatch%dmean_wood_gbw ,lmask) + opatch%dmean_fs_open (1:z) = pack(ipatch%dmean_fs_open ,lmask) + opatch%dmean_fsw (1:z) = pack(ipatch%dmean_fsw ,lmask) + opatch%dmean_fsn (1:z) = pack(ipatch%dmean_fsn ,lmask) + opatch%dmean_psi_open (1:z) = pack(ipatch%dmean_psi_open ,lmask) + opatch%dmean_psi_closed (1:z) = pack(ipatch%dmean_psi_closed ,lmask) + opatch%dmean_water_supply (1:z) = pack(ipatch%dmean_water_supply ,lmask) + opatch%dmean_light_level (1:z) = pack(ipatch%dmean_light_level ,lmask) + opatch%dmean_light_level_beam(1:z) = pack(ipatch%dmean_light_level_beam ,lmask) + opatch%dmean_light_level_diff(1:z) = pack(ipatch%dmean_light_level_diff ,lmask) + opatch%dmean_par_l (1:z) = pack(ipatch%dmean_par_l ,lmask) + opatch%dmean_par_l_beam (1:z) = pack(ipatch%dmean_par_l_beam ,lmask) + opatch%dmean_par_l_diff (1:z) = pack(ipatch%dmean_par_l_diff ,lmask) + opatch%dmean_rshort_l (1:z) = pack(ipatch%dmean_rshort_l ,lmask) + opatch%dmean_rlong_l (1:z) = pack(ipatch%dmean_rlong_l ,lmask) + opatch%dmean_sensible_lc (1:z) = pack(ipatch%dmean_sensible_lc ,lmask) + opatch%dmean_vapor_lc (1:z) = pack(ipatch%dmean_vapor_lc ,lmask) + opatch%dmean_transp (1:z) = pack(ipatch%dmean_transp ,lmask) + opatch%dmean_intercepted_al (1:z) = pack(ipatch%dmean_intercepted_al ,lmask) + opatch%dmean_wshed_lg (1:z) = pack(ipatch%dmean_wshed_lg ,lmask) + opatch%dmean_rshort_w (1:z) = pack(ipatch%dmean_rshort_w ,lmask) + opatch%dmean_rlong_w (1:z) = pack(ipatch%dmean_rlong_w ,lmask) + opatch%dmean_sensible_wc (1:z) = pack(ipatch%dmean_sensible_wc ,lmask) + opatch%dmean_vapor_wc (1:z) = pack(ipatch%dmean_vapor_wc ,lmask) + opatch%dmean_intercepted_aw (1:z) = pack(ipatch%dmean_intercepted_aw ,lmask) + opatch%dmean_wshed_wg (1:z) = pack(ipatch%dmean_wshed_wg ,lmask) + !------------------------------------------------------------------------------------! + + return + end subroutine copy_patchtype_mask_dmean + !=======================================================================================! + !=======================================================================================! + + + + + + !=======================================================================================! + !=======================================================================================! + ! This sub-routine copies the cohort-level variables that are mmean or mmsqu. ! + ! The only sub-routine that should ever call this one is copy_patchtype_mask. ! + !---------------------------------------------------------------------------------------! + subroutine copy_patchtype_mask_mmean(ipatch,opatch,z,lmask,isize,osize) + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(patchtype) , target :: ipatch + type(patchtype) , target :: opatch + integer , intent(in) :: z + integer , intent(in) :: isize + integer , intent(in) :: osize + logical,dimension(isize), intent(in) :: lmask + !----- Local variables. -------------------------------------------------------------! + integer :: i + integer :: m + integer :: n + !------------------------------------------------------------------------------------! + + + + !----- Scalars. ---------------------------------------------------------------------! + opatch%mmean_lai (1:z) = pack(ipatch%mmean_lai ,lmask) + opatch%mmean_bleaf (1:z) = pack(ipatch%mmean_bleaf ,lmask) + opatch%mmean_broot (1:z) = pack(ipatch%mmean_broot ,lmask) + opatch%mmean_bstorage (1:z) = pack(ipatch%mmean_bstorage ,lmask) + opatch%mmean_leaf_maintenance(1:z) = pack(ipatch%mmean_leaf_maintenance ,lmask) + opatch%mmean_root_maintenance(1:z) = pack(ipatch%mmean_root_maintenance ,lmask) + opatch%mmean_leaf_drop (1:z) = pack(ipatch%mmean_leaf_drop ,lmask) + opatch%mmean_cb (1:z) = pack(ipatch%mmean_cb ,lmask) + opatch%mmean_gpp (1:z) = pack(ipatch%mmean_gpp ,lmask) + opatch%mmean_npp (1:z) = pack(ipatch%mmean_npp ,lmask) + opatch%mmean_leaf_resp (1:z) = pack(ipatch%mmean_leaf_resp ,lmask) + opatch%mmean_root_resp (1:z) = pack(ipatch%mmean_root_resp ,lmask) + opatch%mmean_growth_resp (1:z) = pack(ipatch%mmean_growth_resp ,lmask) + opatch%mmean_storage_resp (1:z) = pack(ipatch%mmean_storage_resp ,lmask) + opatch%mmean_vleaf_resp (1:z) = pack(ipatch%mmean_vleaf_resp ,lmask) + opatch%mmean_plresp (1:z) = pack(ipatch%mmean_plresp ,lmask) + opatch%mmean_leaf_energy (1:z) = pack(ipatch%mmean_leaf_energy ,lmask) + opatch%mmean_leaf_water (1:z) = pack(ipatch%mmean_leaf_water ,lmask) + opatch%mmean_leaf_hcap (1:z) = pack(ipatch%mmean_leaf_hcap ,lmask) + opatch%mmean_leaf_vpdef (1:z) = pack(ipatch%mmean_leaf_vpdef ,lmask) + opatch%mmean_leaf_temp (1:z) = pack(ipatch%mmean_leaf_temp ,lmask) + opatch%mmean_leaf_fliq (1:z) = pack(ipatch%mmean_leaf_fliq ,lmask) + opatch%mmean_leaf_gsw (1:z) = pack(ipatch%mmean_leaf_gsw ,lmask) + opatch%mmean_leaf_gbw (1:z) = pack(ipatch%mmean_leaf_gbw ,lmask) + opatch%mmean_wood_energy (1:z) = pack(ipatch%mmean_wood_energy ,lmask) + opatch%mmean_wood_water (1:z) = pack(ipatch%mmean_wood_water ,lmask) + opatch%mmean_wood_hcap (1:z) = pack(ipatch%mmean_wood_hcap ,lmask) + opatch%mmean_wood_temp (1:z) = pack(ipatch%mmean_wood_temp ,lmask) + opatch%mmean_wood_fliq (1:z) = pack(ipatch%mmean_wood_fliq ,lmask) + opatch%mmean_wood_gbw (1:z) = pack(ipatch%mmean_wood_gbw ,lmask) + opatch%mmean_fs_open (1:z) = pack(ipatch%mmean_fs_open ,lmask) + opatch%mmean_fsw (1:z) = pack(ipatch%mmean_fsw ,lmask) + opatch%mmean_fsn (1:z) = pack(ipatch%mmean_fsn ,lmask) + opatch%mmean_psi_open (1:z) = pack(ipatch%mmean_psi_open ,lmask) + opatch%mmean_psi_closed (1:z) = pack(ipatch%mmean_psi_closed ,lmask) + opatch%mmean_water_supply (1:z) = pack(ipatch%mmean_water_supply ,lmask) + opatch%mmean_light_level (1:z) = pack(ipatch%mmean_light_level ,lmask) + opatch%mmean_light_level_beam(1:z) = pack(ipatch%mmean_light_level_beam ,lmask) + opatch%mmean_light_level_diff(1:z) = pack(ipatch%mmean_light_level_diff ,lmask) + opatch%mmean_par_l (1:z) = pack(ipatch%mmean_par_l ,lmask) + opatch%mmean_par_l_beam (1:z) = pack(ipatch%mmean_par_l_beam ,lmask) + opatch%mmean_par_l_diff (1:z) = pack(ipatch%mmean_par_l_diff ,lmask) + opatch%mmean_rshort_l (1:z) = pack(ipatch%mmean_rshort_l ,lmask) + opatch%mmean_rlong_l (1:z) = pack(ipatch%mmean_rlong_l ,lmask) + opatch%mmean_sensible_lc (1:z) = pack(ipatch%mmean_sensible_lc ,lmask) + opatch%mmean_vapor_lc (1:z) = pack(ipatch%mmean_vapor_lc ,lmask) + opatch%mmean_transp (1:z) = pack(ipatch%mmean_transp ,lmask) + opatch%mmean_intercepted_al (1:z) = pack(ipatch%mmean_intercepted_al ,lmask) + opatch%mmean_wshed_lg (1:z) = pack(ipatch%mmean_wshed_lg ,lmask) + opatch%mmean_rshort_w (1:z) = pack(ipatch%mmean_rshort_w ,lmask) + opatch%mmean_rlong_w (1:z) = pack(ipatch%mmean_rlong_w ,lmask) + opatch%mmean_sensible_wc (1:z) = pack(ipatch%mmean_sensible_wc ,lmask) + opatch%mmean_vapor_wc (1:z) = pack(ipatch%mmean_vapor_wc ,lmask) + opatch%mmean_intercepted_aw (1:z) = pack(ipatch%mmean_intercepted_aw ,lmask) + opatch%mmean_wshed_wg (1:z) = pack(ipatch%mmean_wshed_wg ,lmask) + opatch%mmean_nppleaf (1:z) = pack(ipatch%mmean_nppleaf ,lmask) + opatch%mmean_nppfroot (1:z) = pack(ipatch%mmean_nppfroot ,lmask) + opatch%mmean_nppsapwood (1:z) = pack(ipatch%mmean_nppsapwood ,lmask) + opatch%mmean_nppcroot (1:z) = pack(ipatch%mmean_nppcroot ,lmask) + opatch%mmean_nppseeds (1:z) = pack(ipatch%mmean_nppseeds ,lmask) + opatch%mmean_nppwood (1:z) = pack(ipatch%mmean_nppwood ,lmask) + opatch%mmean_nppdaily (1:z) = pack(ipatch%mmean_nppdaily ,lmask) + opatch%mmsqu_gpp (1:z) = pack(ipatch%mmsqu_gpp ,lmask) + opatch%mmsqu_npp (1:z) = pack(ipatch%mmsqu_npp ,lmask) + opatch%mmsqu_plresp (1:z) = pack(ipatch%mmsqu_plresp ,lmask) + opatch%mmsqu_sensible_lc (1:z) = pack(ipatch%mmsqu_sensible_lc ,lmask) + opatch%mmsqu_vapor_lc (1:z) = pack(ipatch%mmsqu_vapor_lc ,lmask) + opatch%mmsqu_transp (1:z) = pack(ipatch%mmsqu_transp ,lmask) + opatch%mmsqu_sensible_wc (1:z) = pack(ipatch%mmsqu_sensible_wc ,lmask) + opatch%mmsqu_vapor_wc (1:z) = pack(ipatch%mmsqu_vapor_wc ,lmask) + !------------------------------------------------------------------------------------! + + + !----- Mortality variables. ---------------------------------------------------------! + do m=1,n_mort + opatch%mmean_mort_rate(m,1:z) = pack(ipatch%mmean_mort_rate (m,:),lmask) + end do + !------------------------------------------------------------------------------------! + + return + end subroutine copy_patchtype_mask_mmean + !=======================================================================================! + !=======================================================================================! + + + + + + !=======================================================================================! + !=======================================================================================! + ! This sub-routine copies the cohort-level variables that are qmean or qmsqu. ! + ! The only sub-routine that should ever call this one is copy_patchtype_mask. ! + !---------------------------------------------------------------------------------------! + subroutine copy_patchtype_mask_qmean(ipatch,opatch,z,lmask,isize,osize) + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(patchtype) , target :: ipatch + type(patchtype) , target :: opatch + integer , intent(in) :: z + integer , intent(in) :: isize + integer , intent(in) :: osize + logical,dimension(isize), intent(in) :: lmask + !----- Local variables. -------------------------------------------------------------! + integer :: i + integer :: m + integer :: n + !------------------------------------------------------------------------------------! + + + + do m=1,ndcycle + opatch%qmean_gpp (m,1:z) = pack(ipatch%qmean_gpp (m,:),lmask) + opatch%qmean_npp (m,1:z) = pack(ipatch%qmean_npp (m,:),lmask) + opatch%qmean_leaf_resp (m,1:z) = pack(ipatch%qmean_leaf_resp (m,:),lmask) + opatch%qmean_root_resp (m,1:z) = pack(ipatch%qmean_root_resp (m,:),lmask) + opatch%qmean_growth_resp (m,1:z) = pack(ipatch%qmean_growth_resp (m,:),lmask) + opatch%qmean_storage_resp (m,1:z) = pack(ipatch%qmean_storage_resp (m,:),lmask) + opatch%qmean_vleaf_resp (m,1:z) = pack(ipatch%qmean_vleaf_resp (m,:),lmask) + opatch%qmean_plresp (m,1:z) = pack(ipatch%qmean_plresp (m,:),lmask) + opatch%qmean_leaf_energy (m,1:z) = pack(ipatch%qmean_leaf_energy (m,:),lmask) + opatch%qmean_leaf_water (m,1:z) = pack(ipatch%qmean_leaf_water (m,:),lmask) + opatch%qmean_leaf_hcap (m,1:z) = pack(ipatch%qmean_leaf_hcap (m,:),lmask) + opatch%qmean_leaf_vpdef (m,1:z) = pack(ipatch%qmean_leaf_vpdef (m,:),lmask) + opatch%qmean_leaf_temp (m,1:z) = pack(ipatch%qmean_leaf_temp (m,:),lmask) + opatch%qmean_leaf_fliq (m,1:z) = pack(ipatch%qmean_leaf_fliq (m,:),lmask) + opatch%qmean_leaf_gsw (m,1:z) = pack(ipatch%qmean_leaf_gsw (m,:),lmask) + opatch%qmean_leaf_gbw (m,1:z) = pack(ipatch%qmean_leaf_gbw (m,:),lmask) + opatch%qmean_wood_energy (m,1:z) = pack(ipatch%qmean_wood_energy (m,:),lmask) + opatch%qmean_wood_water (m,1:z) = pack(ipatch%qmean_wood_water (m,:),lmask) + opatch%qmean_wood_hcap (m,1:z) = pack(ipatch%qmean_wood_hcap (m,:),lmask) + opatch%qmean_wood_temp (m,1:z) = pack(ipatch%qmean_wood_temp (m,:),lmask) + opatch%qmean_wood_fliq (m,1:z) = pack(ipatch%qmean_wood_fliq (m,:),lmask) + opatch%qmean_wood_gbw (m,1:z) = pack(ipatch%qmean_wood_gbw (m,:),lmask) + opatch%qmean_fs_open (m,1:z) = pack(ipatch%qmean_fs_open (m,:),lmask) + opatch%qmean_fsw (m,1:z) = pack(ipatch%qmean_fsw (m,:),lmask) + opatch%qmean_fsn (m,1:z) = pack(ipatch%qmean_fsn (m,:),lmask) + opatch%qmean_psi_open (m,1:z) = pack(ipatch%qmean_psi_open (m,:),lmask) + opatch%qmean_psi_closed (m,1:z) = pack(ipatch%qmean_psi_closed (m,:),lmask) + opatch%qmean_water_supply (m,1:z) = pack(ipatch%qmean_water_supply (m,:),lmask) + opatch%qmean_light_level (m,1:z) = pack(ipatch%qmean_light_level (m,:),lmask) + opatch%qmean_light_level_beam(m,1:z) = & + pack(ipatch%qmean_light_level_beam(m,:),lmask) + opatch%qmean_light_level_diff(m,1:z) = & + pack(ipatch%qmean_light_level_diff(m,:),lmask) + opatch%qmean_par_l (m,1:z) = pack(ipatch%qmean_par_l (m,:),lmask) + opatch%qmean_par_l_beam (m,1:z) = pack(ipatch%qmean_par_l_beam (m,:),lmask) + opatch%qmean_par_l_diff (m,1:z) = pack(ipatch%qmean_par_l_diff (m,:),lmask) + opatch%qmean_rshort_l (m,1:z) = pack(ipatch%qmean_rshort_l (m,:),lmask) + opatch%qmean_rlong_l (m,1:z) = pack(ipatch%qmean_rlong_l (m,:),lmask) + opatch%qmean_sensible_lc (m,1:z) = pack(ipatch%qmean_sensible_lc (m,:),lmask) + opatch%qmean_vapor_lc (m,1:z) = pack(ipatch%qmean_vapor_lc (m,:),lmask) + opatch%qmean_transp (m,1:z) = pack(ipatch%qmean_transp (m,:),lmask) + opatch%qmean_intercepted_al(m,1:z) = pack(ipatch%qmean_intercepted_al(m,:),lmask) + opatch%qmean_wshed_lg (m,1:z) = pack(ipatch%qmean_wshed_lg (m,:),lmask) + opatch%qmean_rshort_w (m,1:z) = pack(ipatch%qmean_rshort_w (m,:),lmask) + opatch%qmean_rlong_w (m,1:z) = pack(ipatch%qmean_rlong_w (m,:),lmask) + opatch%qmean_sensible_wc (m,1:z) = pack(ipatch%qmean_sensible_wc (m,:),lmask) + opatch%qmean_vapor_wc (m,1:z) = pack(ipatch%qmean_vapor_wc (m,:),lmask) + opatch%qmean_intercepted_aw(m,1:z) = pack(ipatch%qmean_intercepted_aw(m,:),lmask) + opatch%qmean_wshed_wg (m,1:z) = pack(ipatch%qmean_wshed_wg (m,:),lmask) + opatch%qmsqu_gpp (m,1:z) = pack(ipatch%qmsqu_gpp (m,:),lmask) + opatch%qmsqu_npp (m,1:z) = pack(ipatch%qmsqu_npp (m,:),lmask) + opatch%qmsqu_plresp (m,1:z) = pack(ipatch%qmsqu_plresp (m,:),lmask) + opatch%qmsqu_sensible_lc (m,1:z) = pack(ipatch%qmsqu_sensible_lc (m,:),lmask) + opatch%qmsqu_vapor_lc (m,1:z) = pack(ipatch%qmsqu_vapor_lc (m,:),lmask) + opatch%qmsqu_transp (m,1:z) = pack(ipatch%qmsqu_transp (m,:),lmask) + opatch%qmsqu_sensible_wc (m,1:z) = pack(ipatch%qmsqu_sensible_wc (m,:),lmask) + opatch%qmsqu_vapor_wc (m,1:z) = pack(ipatch%qmsqu_vapor_wc (m,:),lmask) + end do + !------------------------------------------------------------------------------------! + + + return + end subroutine copy_patchtype_mask_qmean + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This subroutine is the main driver for filling the variable table (var_table) of ! + ! ED variables. On a serial computing environment, this routine should be called near ! + ! the end of the initialization process after the hierarchical tree structure has been ! + ! trimmed via fusion/splitting/termination. Similiarly, this routine should be called ! + ! after any fusion/splitting/termination process, assuming that the major vtable ! + ! structures have been deallocated prior to reallocation. ! + ! ! + ! In a parallel environment, this routine should operate in a similiar fashion on ! + ! each of the compute nodes. It is designed such that the compute nodes will write ! + ! hyperslabs of data in parallel to a joining HDF5 dataset as "collective-chunked" ! + ! data. The modifications that must be made after running this subroutine, are that ! + ! the indexes should account for the offset of the current compute node. ! + ! !! + ! The various state scalars, vectors and arrays are now populate the vtable. The ! + ! vtable indexes the array gives it a name, records its dimensions, when it is to be ! + ! used as output and how (averaging and such) and most importantly saves a pointer to ! + ! its starting position. If this routine is being called as a compute node in ! + ! parallel, the first position is not necessarily the first position of the whole ! + ! datavector, but will only be the first position of that nodes hyperslab chunk ! + ! within the given continuous dataset. ! + ! ! + ! The first number correspond to the data level: ! + ! 1. Gridtype (polygon level) ! + ! 2. Polygontype (site level) ! + ! 3. Sitetype (patch level) ! + ! 4. Patchtype (cohort level) ! + ! 9. Scalar ! + ! ! + ! The other numbers correspond to the kind of dimension and variable. ! + ! 0. Main vector ordinate only, integer. ! + ! 1. Main vector ordinate only, real. ! + ! 2. Soil layer ! + ! 3. Surface water layer ! + ! 4. PFT ! + ! 5. Disturbance Type ! + ! 6. DBH class ! + ! 7. FF_DBH class ! + ! 8. Mortality ! + ! 9. Month/13 months ! + ! ! + ! The negative sign means that the variable has an extra dimension, for the diurnal ! + ! cycle output. ! + ! ! + ! Of these possible dimensions (2-9), they may be used concurrently to partition the ! + ! data into multi-dimensional spaces, but all seven will not be used simultaneously. ! + ! Currently the highest ranks in use is 3, and you should think twice before making ! + ! new types with higher dimensionality: these arrays may become huge. ! + ! ! + ! Each unique combination will have a call number associated with it. ! + ! ! + ! 10 : rank 1 : polygon, integer ! + ! 11 : rank 1 : polygon ! + ! -11 : rank 2 : polygon, diurnal cycle ! + ! 12 : rank 2 : polygon, s-layer ! + ! 120 : rank 2 : polygon, s-layer, integer ! + ! -12 : rank 3 : polygon, s-layer, diurnal cycle ! + ! 13 : rank 2 : polygon, w-layer ! + ! 14 : rank 2 : polygon, pft ! + ! 146 : rank 3 : polygon, pft, dbh ! + ! 15 : rank 2 : polygon, disturbance ! + ! 155 : rank 3 : polygon, disturbance, disturbance ! + ! 157 : rank 3 : polygon, disturbance, age ! + ! 16 : rank 2 : polygon, dbh ! + ! 17 : rank 2 : polygon, age ! + ! 18 : rank 2 : polygon, mort ! + ! 19 : rank 2 : polygon, month+1 ! + ! ! + ! 20 : rank 1 : site, integer ! + ! 21 : rank 1 : site ! + ! 22 : rank 2 : site, s-layer ! + ! 23 : rank 2 : site, w-layer ! + ! 24 : rank 2 : site, pft ! + ! 246 : rank 3 : site, pft, dbh ! + ! 25 : rank 2 : site, disturbance ! + ! 255 : rank 3 : site, disturbance, disturbance ! + ! 26 : rank 2 : site, dbh ! + ! 27 : rank 2 : site, age ! + ! 28 : rank 2 : site, mort ! + ! 29 : rank 2 : site, month ! + ! ! + ! 30 : rank 1 : patch, integer ! + ! 31 : rank 1 : patch ! + ! -31 : rank 2 : patch, diurnal cycle ! + ! 32 : rank 2 : patch, s-layer ! + ! 33 : rank 2 : patch, w-layer ! + ! 34 : rank 2 : patch, pft ! + ! 346 : rank 3 : patch, pft, ff_dbh ! + ! 35 : rank 2 : patch, disturbance ! + ! 36 : rank 2 : patch, dbh ! + ! 37 : rank 2 : patch, age ! + ! 38 : rank 2 : patch, mort ! + ! ! + ! 40 : rank 1 : cohort, integer ! + ! 41 : rank 1 : cohort ! + ! -41 : rank 2 : cohort, diurnal cycle ! + ! 44 : rank 2 : cohort, pft ! + ! 46 : rank 2 : cohort, dbh ! + ! 47 : rank 2 : cohort, age ! + ! 48 : rank 2 : cohort, mort ! + ! 49 : rank 2 : cohort, month+1 ! + ! ! + ! 90 : rank 0 : integer scalar ! + ! 92 : rank 1 : s-layer ! + !---------------------------------------------------------------------------------------! + subroutine filltab_alltypes + + use ed_var_tables, only : num_var & ! intent(in) + , vt_info & ! intent(inout) + , var_table & ! intent(inout) + , reset_vt_vector_pointers ! ! sub-routine + use ed_node_coms , only : mynum & ! intent(in) + , mchnum & ! intent(in) + , machs & ! intent(in) + , nmachs & ! intent(in) + , nnodetot & ! intent(in) + , sendnum & ! intent(in) + , recvnum & ! intent(in) + , master_num ! ! intent(in) + use ed_max_dims , only : maxgrds & ! intent(in) + , maxmach ! ! intent(in) + implicit none + + include 'mpif.h' + !----- Local variables. -------------------------------------------------------------! + type(edtype) , pointer :: cgrid + type(polygontype) , pointer :: cpoly + type(sitetype) , pointer :: csite + type(patchtype) , pointer :: cpatch + integer :: ncohorts_g + integer :: npatches_g + integer :: nsites_g + integer :: igr + integer :: ipy + integer :: isi + integer :: ipa + integer :: nv + integer :: ierr + integer :: nm + integer :: iptr + integer , dimension(MPI_STATUS_SIZE) :: status + integer :: ping + integer :: uniqueid + !----- Local constants. -------------------------------------------------------------! + logical , parameter :: verbose = .false. + !----- Local saved variables. -------------------------------------------------------! + logical , save :: model_start = .true. + !------------------------------------------------------------------------------------! - if(associated(cgrid%mmean_leaf_energy)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_leaf_energy,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_LEAF_ENERGY :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean leaf internal energy','[J/m2]','ipoly') - end if - if(associated(cgrid%mmean_leaf_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_leaf_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_LEAF_TEMP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean leaf temperature','[K]','ipoly') + !------------------------------------------------------------------------------------! + if (mynum == 1 .and. verbose) then + write(unit=*,fmt='(a)') '--- Re-hashing the IO pointer tables and mapping arrays' end if + !------------------------------------------------------------------------------------! - if(associated(cgrid%mmean_leaf_vpdef)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_leaf_vpdef,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_LEAF_VPDEF :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean leaf VPD','[Pa]','ipoly') - end if - if(associated(cgrid%mmean_leaf_water)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_leaf_water,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_LEAF_WATER :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean leaf water ','[kg/m2]','ipoly') - end if - if(associated(cgrid%mmean_leaf_hcap)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_leaf_hcap,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_LEAF_HCAP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean leaf heat capacity','[J/m2/K]','ipoly') - end if + !------------------------------------------------------------------------------------! + ! The first loop through populates the info tables. ! + !------------------------------------------------------------------------------------! + do igr = 1,ngrids + cgrid => edgrid_g(igr) + if (num_var(igr) > 0) then + do nv=1,num_var(igr) + call reset_vt_vector_pointers(vt_info(nv,igr)) + end do + end if - if(associated(cgrid%mmean_wood_energy)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_wood_energy,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_WOOD_ENERGY :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean wood internal energy','[J/m2]','ipoly') - end if + num_var(igr) = 0 - if(associated(cgrid%mmean_wood_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_wood_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_WOOD_TEMP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean wood temperature','[K]','ipoly') - end if + cgrid%npolygons_global = cgrid%npolygons + cgrid%nsites_global = get_nsites(cgrid) + cgrid%npatches_global = get_npatches(cgrid) + cgrid%ncohorts_global = get_ncohorts(cgrid) + + cgrid%mach_cohort_offset_index = 0 + cgrid%mach_patch_offset_index = 0 + cgrid%mach_site_offset_index = 0 + cgrid%mach_polygon_offset_index= 0 - if(associated(cgrid%mmean_wood_water)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_wood_water,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_WOOD_WATER :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean wood water ','[kg/m2]','ipoly') - end if + if (nnodetot /= 1) then - if(associated(cgrid%mmean_wood_hcap)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_wood_hcap,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_WOOD_HCAP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean wood heat capacity','[J/m2/K]','ipoly') - end if + !----- Send all them sizes to root (CHANGED, NODE 1). -------------------------! + if (mynum == 1) then + + gdpy(1,igr) = cgrid%npolygons_global + gdsi(1,igr) = cgrid%nsites_global + gdpa(1,igr) = cgrid%npatches_global + gdco(1,igr) = cgrid%ncohorts_global + + call MPI_Send(ping,1,MPI_INTEGER,sendnum,94,MPI_COMM_WORLD,ierr) + + !----- Have node 1 recieve the info. ---------------------------------------! + do nm=2,nnodetot + uniqueid = ((igr-1)*maxmach)+nm + call MPI_Recv(gdpy(nm,igr),1,MPI_INTEGER,machs(nm) & + ,500000+uniqueid,MPI_COMM_WORLD,status,ierr) + call MPI_Recv(gdsi(nm,igr),1,MPI_INTEGER,machs(nm) & + ,600000+uniqueid,MPI_COMM_WORLD,status,ierr) + call MPI_Recv(gdpa(nm,igr),1,MPI_INTEGER,machs(nm) & + ,700000+uniqueid,MPI_COMM_WORLD,status,ierr) + call MPI_Recv(gdco(nm,igr),1,MPI_INTEGER,machs(nm) & + ,800000+uniqueid,MPI_COMM_WORLD,status,ierr) + end do + !---------------------------------------------------------------------------! + + + + !----- Broadcast all this info to the nodes. -------------------------------! + do nm=2,nnodetot + uniqueid=((igr-1)*maxmach)+nm + call MPI_Send(gdpy,maxmach*maxgrds,MPI_INTEGER,machs(nm) & + , 900000+uniqueid,MPI_COMM_WORLD,ierr) + call MPI_Send(gdsi,maxmach*maxgrds,MPI_INTEGER,machs(nm) & + ,1000000+uniqueid,MPI_COMM_WORLD,ierr) + call MPI_Send(gdpa,maxmach*maxgrds,MPI_INTEGER,machs(nm) & + ,1100000+uniqueid,MPI_COMM_WORLD,ierr) + call MPI_Send(gdco,maxmach*maxgrds,MPI_INTEGER,machs(nm) & + ,1200000+uniqueid,MPI_COMM_WORLD,ierr) + end do + !---------------------------------------------------------------------------! + else + + !----- Set the blocking receive to allow ordering, start with machine 1. ---! + call MPI_Recv(ping,1,MPI_INTEGER,recvnum,94,MPI_COMM_WORLD,status,ierr) + !---------------------------------------------------------------------------! + + uniqueid=((igr-1)*maxmach)+mynum + !----- Send the information to node (1). -----------------------------------! + call MPI_Send(cgrid%npolygons_global, 1,MPI_INTEGER,machs(1) & + ,500000+uniqueid,MPI_COMM_WORLD,ierr) + call MPI_Send(cgrid%nsites_global , 1,MPI_INTEGER,machs(1) & + ,600000+uniqueid,MPI_COMM_WORLD,ierr) + call MPI_Send(cgrid%npatches_global , 1,MPI_INTEGER,machs(1) & + ,700000+uniqueid,MPI_COMM_WORLD,ierr) + call MPI_Send(cgrid%ncohorts_global , 1,MPI_INTEGER,machs(1) & + ,800000+uniqueid,MPI_COMM_WORLD,ierr) + + !---------------------------------------------------------------------------! + ! When this node is finished, send the blocking MPI_Send to the next ! + ! machine. ! + !---------------------------------------------------------------------------! + if (mynum /= nnodetot) call MPI_Send(ping,1,MPI_INTEGER,sendnum & + ,94,MPI_COMM_WORLD,ierr) + !---------------------------------------------------------------------------! + + + !------ Receive the data from the main node. -------------------------------! + uniqueid=((igr-1)*maxmach)+mynum + call MPI_Recv(gdpy,maxmach*maxgrds,MPI_INTEGER,machs(1) & + , 900000+uniqueid,MPI_COMM_WORLD,status,ierr) + call MPI_Recv(gdsi,maxmach*maxgrds,MPI_INTEGER,machs(1) & + ,1000000+uniqueid,MPI_COMM_WORLD,status,ierr) + call MPI_Recv(gdpa,maxmach*maxgrds,MPI_INTEGER,machs(1) & + ,1100000+uniqueid,MPI_COMM_WORLD,status,ierr) + call MPI_Recv(gdco,maxmach*maxgrds,MPI_INTEGER,machs(1) & + ,1200000+uniqueid,MPI_COMM_WORLD,status,ierr) + !---------------------------------------------------------------------------! + end if + !------------------------------------------------------------------------------! + + + !------------------------------------------------------------------------------! + ! Display the information. ! + !------------------------------------------------------------------------------! + if (mynum == 1 .and. model_start .and. verbose) then + + print*,"Global Polygons: ",gdpy(1:nnodetot,igr) + print*,"Global Site: " ,gdsi(1:nnodetot,igr) + print*,"Global Patches: " ,gdpa(1:nnodetot,igr) + print*,"Global Cohorts: " ,gdco(1:nnodetot,igr) + end if + !------------------------------------------------------------------------------! + + + + + !----- Calculate the offsets that each machine has. ---------------------------! + py_off(1,igr) = 0 + si_off(1,igr) = 0 + pa_off(1,igr) = 0 + co_off(1,igr) = 0 + do nm=2,nnodetot + py_off(nm,igr) = py_off(nm-1,igr) + gdpy(nm-1,igr) + si_off(nm,igr) = si_off(nm-1,igr) + gdsi(nm-1,igr) + pa_off(nm,igr) = pa_off(nm-1,igr) + gdpa(nm-1,igr) + co_off(nm,igr) = co_off(nm-1,igr) + gdco(nm-1,igr) + end do + !------------------------------------------------------------------------------! - if(associated(cgrid%mmean_rshort)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_rshort,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_RSHORT :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean downwelling solar radiation','[w/m2]','ipoly') - end if - - if(associated(cgrid%mmean_rshort_diff)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_rshort_diff,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_RSHORT_DIFF :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean incoming diffuse solar radiation','[w/m2]','ipoly') - end if - if(associated(cgrid%mmean_par)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_par,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_PAR :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean downwelling PAR','[w/m2]','ipoly') - end if - - if(associated(cgrid%mmean_par_diff)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_par_diff,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_PAR_DIFF :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean incoming diffuse PAR','[w/m2]','ipoly') - end if - - if(associated(cgrid%mmean_rlong)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_rlong,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_RLONG :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean downwelling longwave radiation','[w/m2]','ipoly') - end if - - if(associated(cgrid%mmean_rshort_gnd)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_rshort_gnd,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_RSHORT_GND :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean ground abs. solar radiation','[w/m2]','ipoly') - end if - - if(associated(cgrid%mmean_par_gnd)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_par_gnd,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_PAR_GND :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean ground abs. PAR','[w/m2]','ipoly') - end if - - if(associated(cgrid%mmean_rlong_gnd)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_rlong_gnd,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_RLONG_GND :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean ground abs. longwave radiation','[w/m2]','ipoly') - end if - - if(associated(cgrid%mmean_albedo)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_albedo,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_ALBEDO :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean albedo','[---]','ipoly') - end if - - if(associated(cgrid%mmean_albedo_beam)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_albedo_beam,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_ALBEDO_BEAM :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean direct albedo','[---]','ipoly') - end if - - if(associated(cgrid%mmean_albedo_diffuse)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_albedo_diffuse,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_ALBEDO_DIFFUSE :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean diffuse albedo','[---]','ipoly') - end if - - if(associated(cgrid%mmean_rlong_albedo)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_rlong_albedo,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_RLONG_ALBEDO :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean longwave albedo','[---]','ipoly') - end if - - if(associated(cgrid%mmean_rlongup)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_rlongup,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_RLONGUP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean longwave emission from ground','[---]','ipoly') - end if - - if(associated(cgrid%mmean_parup)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_parup,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_PARUP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean upwelling PAR at top of canopy','[---]','ipoly') - end if - - if(associated(cgrid%mmean_nirup)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_nirup,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_NIRUP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean upwelling NIR at top of canopy','[---]','ipoly') - end if - - if(associated(cgrid%mmean_rshortup)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_rshortup,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_RSHORTUP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean upwelling SW Rad. at top of canopy','[---]','ipoly') - end if - - if(associated(cgrid%mmean_rnet)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_rnet,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_RNET :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean Net Rad. at top of canopy','[---]','ipoly') - end if - - if(associated(cgrid%mmean_atm_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_atm_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_ATM_TEMP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean air temperature','[K]','ipoly') - end if - - if(associated(cgrid%mmean_atm_vpdef)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_atm_vpdef,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_ATM_VPDEF :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean air VPD','[Pa]','ipoly') - end if - - if(associated(cgrid%mmean_atm_shv)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_atm_shv,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_ATM_SHV :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean air specific humidity','[kg/kg]','ipoly') - end if - - if(associated(cgrid%mmean_atm_co2)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_atm_co2,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_ATM_CO2 :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean air specific humidity','[kg/kg]','ipoly') - end if - - if(associated(cgrid%mmean_atm_prss)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_atm_prss,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_ATM_PRSS :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean air pressure','[ Pa]','ipoly') - end if - - if(associated(cgrid%mmean_atm_vels)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_atm_vels,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_ATM_VELS :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean wind speed','[m/s]','ipoly') - end if - - if(associated(cgrid%mmean_pcpg)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_pcpg,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_PCPG :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean precipitation rate','[kg/m2/s]','ipoly') - end if - - if(associated(cgrid%mmean_runoff)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_runoff,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_RUNOFF :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean runoff','[kg/m2/s]','ipoly') - end if - - if(associated(cgrid%mmean_drainage)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_drainage,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_DRAINAGE :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean drainage','[kg/m2/day]','ipoly') - end if + !----- Calculate the total sizes of the arrays. -------------------------------! + cgrid%npolygons_global = sum(gdpy(1:nnodetot,igr)) + cgrid%nsites_global = sum(gdsi(1:nnodetot,igr)) + cgrid%npatches_global = sum(gdpa(1:nnodetot,igr)) + cgrid%ncohorts_global = sum(gdco(1:nnodetot,igr)) + !------------------------------------------------------------------------------! - if(associated(cgrid%mmean_co2_residual)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_co2_residual,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_CO2_RESIDUAL :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean of residual canopy CO2 ','[umol/m2/s]','ipoly') - end if - if(associated(cgrid%mmean_water_residual)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_water_residual,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_WATER_RESIDUAL :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean of residual water ','[kg/m2/s]','ipoly') - end if - if(associated(cgrid%mmean_energy_residual)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_energy_residual,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_ENERGY_RESIDUAL :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean of residual energy ','[J/m2/s]','ipoly') - end if + !----- Calculate the local offsets. -------------------------------------------! + cgrid%mach_polygon_offset_index = py_off(mynum,igr) + cgrid%mach_site_offset_index = si_off(mynum,igr) + cgrid%mach_patch_offset_index = pa_off(mynum,igr) + cgrid%mach_cohort_offset_index = co_off(mynum,igr) + !------------------------------------------------------------------------------! + end if + !---------------------------------------------------------------------------------! - if(associated(cgrid%mmsqu_gpp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmsqu_gpp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMSQU_GPP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%mmsqu_leaf_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmsqu_leaf_resp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMSQU_LEAF_RESP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + !---------------------------------------------------------------------------------! + ! Call the routines that will fill the variable table for the first time. ! + !---------------------------------------------------------------------------------! + call filltab_globtype(igr) + call filltab_edtype(igr,0) + if (gdpy(mynum,igr) > 0) then + call filltab_polygontype(igr,1,0) + call filltab_sitetype (igr,1,1,0) + call filltab_patchtype (igr,1,1,1,0) + end if + !---------------------------------------------------------------------------------! + end do + !------------------------------------------------------------------------------------! - if(associated(cgrid%mmsqu_root_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmsqu_root_resp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMSQU_ROOT_RESP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%mmsqu_plresp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmsqu_plresp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMSQU_PLRESP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + !------------------------------------------------------------------------------------! + ! Loop over all grids again. ! + !------------------------------------------------------------------------------------! + do igr = 1,ngrids + !---------------------------------------------------------------------------------! + ! Test to see if the var_table has been initialized. If it has, then ! + ! de-allocate its pointers and reset its first flag. These will be reallocated ! + ! on the first pass of the filltab_ subroutines. ! + !---------------------------------------------------------------------------------! + cgrid => edgrid_g(igr) + + !----- Find the global index. ----------------------------------------------------! + cgrid%pyglob_id = 0 + cgrid%mach_polygon_offset_index + !---------------------------------------------------------------------------------! + + + !---------------------------------------------------------------------------------! + ! Determine the total number of variables for each grid. These will ! + ! determine the length of the vt_vector. ! + !---------------------------------------------------------------------------------! + call filltab_edtype(igr,1) + !---------------------------------------------------------------------------------! + + ncohorts_g = 0 + cgrid%mach_cohort_offset_index + npatches_g = 0 + cgrid%mach_patch_offset_index + nsites_g = 0 + cgrid%mach_site_offset_index + + + do ipy = 1,cgrid%npolygons + cpoly => cgrid%polygon(ipy) + !----- This is the offset for the vtable write. -------------------------------! + cpoly%siglob_id = nsites_g + 0 + !------------------------------------------------------------------------------! + + !----- This is the index written in the file for the user to reference. -------! + cgrid%pysi_id(ipy) = nsites_g + 1 ! + !------------------------------------------------------------------------------! + + + !----- This is the dimension of the sites that belong to this polygon. --------! + cgrid%pysi_n(ipy) = cpoly%nsites + !------------------------------------------------------------------------------! + + nsites_g = nsites_g + cpoly%nsites + call filltab_polygontype(igr,ipy,1) + + do isi = 1,cpoly%nsites + csite => cpoly%site(isi) + + csite%paglob_id = npatches_g + 0 + cpoly%sipa_id(isi) = npatches_g + 1 + cpoly%sipa_n(isi) = csite%npatches + npatches_g = npatches_g + csite%npatches + call filltab_sitetype(igr,ipy,isi,1) + + do ipa = 1,csite%npatches + cpatch => csite%patch(ipa) + + cpatch%coglob_id = ncohorts_g + 0 + csite%paco_id(ipa) = ncohorts_g + 1 + csite%paco_n(ipa) = cpatch%ncohorts + ncohorts_g = ncohorts_g + cpatch%ncohorts + + if (cpatch%ncohorts > 0) then + call filltab_patchtype(igr,ipy,isi,ipa,1) + end if + end do + end do + end do + if (mynum == 1 .and. verbose) then + write(*,"(a)")'--- Mapping Completed' + end if - if(associated(cgrid%mmsqu_carbon_ac)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmsqu_carbon_ac,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMSQU_CARBON_AC :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + if (mynum == 1 .and. model_start .and. verbose) then + model_start = .false. + do nv=1,num_var(igr) + write(unit=*,fmt='(a,i4,a,i4,a,a)') 'Registering: ',nv,' of',num_var(igr) & + ,' ',vt_info(nv,igr)%name + end do + end if + end do - if(associated(cgrid%mmsqu_carbon_st)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmsqu_carbon_st,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMSQU_CARBON_ST :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%mmsqu_rh)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmsqu_rh,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMSQU_RH :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + return + end subroutine filltab_alltypes + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + subroutine filltab_globtype(igr) + + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , vtable_edio_r_sca & ! sub-rouitne + , vtable_edio_i_sca ! ! sub-rouitne + use soil_coms , only : slz & ! intent(in) + , slxclay & ! intent(in) + , slxsand & ! intent(in) + , isoilflg ! ! intent(in) + + + implicit none + !----- Arguments. -------------------------------------------------------------------! + integer , intent(in) :: igr + !----- Local variables. -------------------------------------------------------------! + integer :: var_len + integer :: max_ptrs + integer :: var_len_global + integer :: nvar + type(edtype), pointer :: cgrid + !------------------------------------------------------------------------------------! + + + cgrid => edgrid_g(igr) + + + !------------------------------------------------------------------------------------! + ! Single values (scalars). ! + !------------------------------------------------------------------------------------! + var_len = 1 + var_len_global = 1 + max_ptrs = 1 + + nvar=1 + call vtable_edio_i_sca(cgrid%npolygons_global,nvar,igr,0,0 & + ,var_len,var_len_global,max_ptrs & + ,'NPOLYGONS_GLOBAL :90:hist:anal:dail:mont:dcyc:year') + call vtable_edio_i_sca(cgrid%npolygons_global,nvar,igr,1,0 & + ,var_len,var_len_global,max_ptrs & + ,'NPOLYGONS_GLOBAL :90:hist:anal:dail:mont:dcyc:year') + + nvar=nvar+1 + call vtable_edio_i_sca(cgrid%nsites_global,nvar,igr,0,0 & + ,var_len,var_len_global,max_ptrs & + ,'NSITES_GLOBAL :90:hist:anal:dail:mont:dcyc:year') + call vtable_edio_i_sca(cgrid%nsites_global,nvar,igr,1,0 & + ,var_len,var_len_global,max_ptrs & + ,'NSITES_GLOBAL :90:hist:anal:dail:mont:dcyc:year') + + nvar=nvar+1 + call vtable_edio_i_sca(cgrid%npatches_global,nvar,igr,0,0 & + ,var_len,var_len_global,max_ptrs & + ,'NPATCHES_GLOBAL :90:hist:anal:dail:mont:dcyc:year') + call vtable_edio_i_sca(cgrid%npatches_global,nvar,igr,1,0 & + ,var_len,var_len_global,max_ptrs & + ,'NPATCHES_GLOBAL :90:hist:anal:dail:mont:dcyc:year') + + nvar=nvar+1 + call vtable_edio_i_sca(cgrid%ncohorts_global,nvar,igr,0,0 & + ,var_len,var_len_global,max_ptrs & + ,'NCOHORTS_GLOBAL :90:hist:anal:dail:mont:dcyc:year') + call vtable_edio_i_sca(cgrid%ncohorts_global,nvar,igr,1,0 & + ,var_len,var_len_global,max_ptrs & + ,'NCOHORTS_GLOBAL :90:hist:anal:dail:mont:dcyc:year') + + nvar=nvar+1 + call vtable_edio_i_sca(nzg,nvar,igr,0,0 & + ,var_len,var_len_global,max_ptrs & + ,'NZG :90:hist:anal:dail:mont:dcyc:year') + call vtable_edio_i_sca(nzg,nvar,igr,1,0 & + ,var_len,var_len_global,max_ptrs & + ,'NZG :90:hist:anal:dail:mont:dcyc:year') + + nvar=nvar+1 + call vtable_edio_i_sca(nzs,nvar,igr,0,0 & + ,var_len,var_len_global,max_ptrs & + ,'NZS :90:hist:anal:dail:mont:dcyc:year') + call vtable_edio_i_sca(nzs,nvar,igr,1,0 & + ,var_len,var_len_global,max_ptrs & + ,'NZS :90:hist:anal:dail:mont:dcyc:year') + + nvar=nvar+1 + call vtable_edio_i_sca(ff_nhgt,nvar,igr,0,0 & + ,var_len,var_len_global,max_ptrs & + ,'FF_NHGT :90:hist:anal:dail:mont:dcyc:year') + call vtable_edio_i_sca(ff_nhgt,nvar,igr,1,0 & + ,var_len,var_len_global,max_ptrs & + ,'FF_NHGT :90:hist:anal:dail:mont:dcyc:year') - if(associated(cgrid%mmsqu_cwd_rh)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmsqu_cwd_rh,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMSQU_CWD_RH :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + nvar=nvar+1 + call vtable_edio_i_sca(ndcycle,nvar,igr,0,0 & + ,var_len,var_len_global,max_ptrs & + ,'NDCYCLE :90:hist:anal:dail:mont:dcyc:year') + call vtable_edio_i_sca(ndcycle,nvar,igr,1,0 & + ,var_len,var_len_global,max_ptrs & + ,'NDCYCLE :90:hist:anal:dail:mont:dcyc:year') - if(associated(cgrid%mmsqu_sensible_ac)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmsqu_sensible_ac,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMSQU_SENSIBLE_AC :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + nvar=nvar+1 + call vtable_edio_i_sca(isoilflg(igr),nvar,igr,0,0 & + ,var_len,var_len_global,max_ptrs & + ,'ISOILFLG :90:hist:anal:dail:mont:dcyc:year') + call vtable_edio_i_sca(isoilflg(igr),nvar,igr,1,0 & + ,var_len,var_len_global,max_ptrs & + ,'ISOILFLG :90:hist:anal:dail:mont:dcyc:year') - if(associated(cgrid%mmsqu_sensible_lc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmsqu_sensible_lc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMSQU_SENSIBLE_LC :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + nvar=nvar+1 + call vtable_edio_r_sca(slxsand,nvar,igr,0,0 & + ,var_len,var_len_global,max_ptrs & + ,'SLXSAND :90:hist:anal:dail:mont:dcyc:year') + call vtable_edio_r_sca(slxsand,nvar,igr,1,0 & + ,var_len,var_len_global,max_ptrs & + ,'SLXSAND :90:hist:anal:dail:mont:dcyc:year') - if(associated(cgrid%mmsqu_sensible_wc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmsqu_sensible_wc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMSQU_SENSIBLE_WC :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + nvar=nvar+1 + call vtable_edio_r_sca(slxclay,nvar,igr,0,0 & + ,var_len,var_len_global,max_ptrs & + ,'SLXCLAY :90:hist:anal:dail:mont:dcyc:year') + call vtable_edio_r_sca(slxclay,nvar,igr,1,0 & + ,var_len,var_len_global,max_ptrs & + ,'SLXCLAY :90:hist:anal:dail:mont:dcyc:year') - if(associated(cgrid%mmsqu_sensible_gc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmsqu_sensible_gc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMSQU_SENSIBLE_GC :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%mmsqu_evap)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmsqu_evap,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMSQU_EVAP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + !------------------------------------------------------------------------------------! + ! 1-D variables, soil layers. ! + !------------------------------------------------------------------------------------! + var_len = nzg + var_len_global = nzg - if(associated(cgrid%mmsqu_transp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmsqu_transp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMSQU_TRANSP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%mmsqu_vapor_ac)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmsqu_vapor_ac,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMSQU_VAPOR_AC :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%mmsqu_vapor_lc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmsqu_vapor_lc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMSQU_VAPOR_LC :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + nvar=nvar+1 + call vtable_edio_r(nzg,slz,nvar,igr,0,0 & + ,var_len,var_len_global,max_ptrs & + ,'SLZ :92:hist:anal:dail:mont:dcyc:year') + call vtable_edio_r(nzg,slz,nvar,igr,1,0 & + ,var_len,var_len_global,max_ptrs & + ,'SLZ :92:hist:anal:dail:mont:dcyc:year') + !------------------------------------------------------------------------------------! - if(associated(cgrid%mmsqu_vapor_wc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmsqu_vapor_wc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMSQU_VAPOR_WC :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%mmsqu_vapor_gc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmsqu_vapor_gc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMSQU_VAPOR_GC :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + !------------------------------------------------------------------------------------! + ! 1-D variables, height classes. ! + !------------------------------------------------------------------------------------! + var_len = ff_nhgt + var_len_global = ff_nhgt - if(associated(cgrid%mmsqu_ustar)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmsqu_ustar,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMSQU_USTAR :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%mmsqu_rlongup)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmsqu_rlongup,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMSQU_RLONGUP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%mmsqu_parup)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmsqu_parup,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMSQU_PARUP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + nvar=nvar+1 + call vtable_edio_r(ff_nhgt,hgt_class,nvar,igr,0,0 & + ,var_len,var_len_global,max_ptrs & + ,'HGT_CLASS :96:hist:anal:dail:mont:dcyc:year') + call vtable_edio_r(ff_nhgt,hgt_class,nvar,igr,1,0 & + ,var_len,var_len_global,max_ptrs & + ,'HGT_CLASS :96:hist:anal:dail:mont:dcyc:year') + !------------------------------------------------------------------------------------! - if(associated(cgrid%mmsqu_nirup)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmsqu_nirup,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMSQU_NIRUP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%mmsqu_rshortup)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmsqu_rshortup,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMSQU_RSHORTUP :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + - if(associated(cgrid%mmsqu_rnet)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmsqu_rnet,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMSQU_RNET :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%mmsqu_albedo)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmsqu_albedo,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMSQU_ALBEDO :11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - !------------------------------------------------------------------------------------! + !----- Save the number of global-level variables that go to the output. -------------! + nioglobal=nvar !------------------------------------------------------------------------------------! - return - end subroutine filltab_edtype_p11 + return + end subroutine filltab_globtype !=======================================================================================! !=======================================================================================! @@ -11326,720 +11082,572 @@ end subroutine filltab_edtype_p11 !=======================================================================================! !=======================================================================================! ! This routine will fill the pointer table with the polygon-level variables ! - ! (edtype) that have two dimensions (ndcycle,npolygons) and are real (type -11). ! + ! (edtype). ! !---------------------------------------------------------------------------------------! - subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) - use ed_var_tables, only : vtable_edio_r & ! sub-routine - , metadata_edio ! ! sub-routine + subroutine filltab_edtype(igr,init) implicit none !----- Arguments. -------------------------------------------------------------------! - type(edtype), target :: cgrid - integer , intent(in) :: init - integer , intent(in) :: igr - integer , intent(in) :: var_len - integer , intent(in) :: max_ptrs - integer , intent(in) :: var_len_global - integer , intent(inout) :: nvar + integer , intent(in) :: init + integer , intent(in) :: igr !----- Local variables. -------------------------------------------------------------! - integer :: npts - !------------------------------------------------------------------------------------! - - - - - !------------------------------------------------------------------------------------! - !------------------------------------------------------------------------------------! - ! This is the 2-D block, with diurnal cycle. All variables must have the number ! - ! of points defined by npts. ! + type(edtype), pointer :: cgrid + integer :: var_len + integer :: max_ptrs + integer :: var_len_global + integer :: nvar + integer :: npts !------------------------------------------------------------------------------------! - npts = cgrid%npolygons * ndcycle - - if(associated(cgrid%qmean_pcpg)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_pcpg,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_PCPG :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%qmean_runoff)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_runoff,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_RUNOFF :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%qmean_drainage)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_drainage,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_DRAINAGE :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%qmean_evap)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_evap,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_EVAP :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%qmean_transp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_transp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_TRANSP :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%qmean_vapor_ac)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_vapor_ac,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_VAPOR_AC :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%qmean_vapor_gc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_vapor_gc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_VAPOR_GC :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%qmean_vapor_lc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_vapor_lc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_VAPOR_LC :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%qmean_vapor_wc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_vapor_wc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_VAPOR_WC :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%qmean_sensible_ac)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_sensible_ac,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_SENSIBLE_AC :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%qmean_sensible_gc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_sensible_gc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_SENSIBLE_GC :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%qmean_sensible_lc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_sensible_lc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_SENSIBLE_LC :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%qmean_sensible_wc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_sensible_wc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_SENSIBLE_WC :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%qmean_ustar)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_ustar,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_USTAR :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%qmean_tstar)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_tstar,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_TSTAR :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%qmean_qstar)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_qstar,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_QSTAR :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%qmean_cstar)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_cstar,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_CSTAR :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%qmean_carbon_ac)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_carbon_ac,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_CARBON_AC :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%qmean_carbon_st)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_carbon_st,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_CARBON_ST :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%qmean_gpp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_gpp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_GPP :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + cgrid => edgrid_g(igr) - if(associated(cgrid%qmean_nep)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_nep,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_NEP :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + !------ Define the global dimensions. -----------------------------------------------! + var_len = cgrid%npolygons + var_len_global = cgrid%npolygons_global + max_ptrs = 1 - if(associated(cgrid%qmean_plresp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_plresp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_PLRESP :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + !------ Continue the counting. ------------------------------------------------------! + nvar = nioglobal - if(associated(cgrid%qmean_rh)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_rh,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_RH :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + call filltab_edtype_p10 (cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_edtype_p11inst (cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_edtype_m11 (cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_edtype_p12 (cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_edtype_m12 (cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_edtype_p19 (cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_edtype_p146 (cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_edtype_p199 (cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) + !----- Save the number of polygon-level (edtype) variables that go to the output. ---! + if (init == 0) niogrid=nvar-nioglobal + !------------------------------------------------------------------------------------! - if(associated(cgrid%qmean_cwd_rh)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_cwd_rh,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_CWD_RH :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + return + + end subroutine filltab_edtype + !=======================================================================================! + !=======================================================================================! - if(associated(cgrid%qmean_leaf_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_leaf_resp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_LEAF_RESP :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%qmean_root_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_root_resp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_ROOT_RESP :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%qmean_fs_open)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_fs_open,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_FS_OPEN :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%qmean_fsw)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_fsw,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_FSW :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%qmean_fsn)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_fsn,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_FSN :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%qmean_can_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_can_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_CAN_TEMP :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the polygon-level variables ! + ! (edtype) that have one dimension and are integer (type 10). ! + !---------------------------------------------------------------------------------------! + subroutine filltab_edtype_p10(cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) + use ed_var_tables, only : vtable_edio_i & ! sub-routine + , metadata_edio ! ! sub-routine - if(associated(cgrid%qmean_can_shv)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_can_shv,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_CAN_SHV :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(edtype), target :: cgrid + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! + + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + ! This is the 1-D block. All variables must have the number of points defined ! + ! by npts. ! + !------------------------------------------------------------------------------------! - if(associated(cgrid%qmean_can_co2)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_can_co2,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_CAN_CO2 :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + npts = cgrid%npolygons - if(associated(cgrid%qmean_can_rhos)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_can_rhos,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_CAN_RHOS :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + if (associated(cgrid%pysi_id)) then + nvar = nvar + 1 + call vtable_edio_i(npts,cgrid%pysi_id,nvar,igr,init,cgrid%pyglob_id & + ,var_len,var_len_global,max_ptrs & + ,'PYSI_ID :10:hist:anal:dail:mont:dcyc:year') + call metadata_edio(nvar,igr,'Polygons first site indices','[--]','(ipoly)') end if - if(associated(cgrid%qmean_can_prss)) then + + if (associated(cgrid%pysi_n)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_can_prss,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_CAN_PRSS :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_i(npts,cgrid%pysi_n,nvar,igr,init,cgrid%pyglob_id & + ,var_len,var_len_global,max_ptrs & + ,'PYSI_N :10:hist:anal:dail:mont:dcyc:year') + call metadata_edio(nvar,igr,'Number of sites per polygon','[--]','(ipoly)') end if - if(associated(cgrid%qmean_can_theta)) then + if (associated(cgrid%xatm)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_can_theta,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_CAN_THETA :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_i(npts,cgrid%xatm,nvar,igr,init,cgrid%pyglob_id & + ,var_len,var_len_global,max_ptrs & + ,'XATM :10:hist:anal:dail:mont:dcyc:year') + call metadata_edio(nvar,igr,'Atm. cell x-indices of polygon','NA','ipoly') end if - - if(associated(cgrid%qmean_can_theiv)) then + + if (associated(cgrid%yatm)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_can_theiv,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_CAN_THEIV :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_i(npts,cgrid%yatm,nvar,igr,init,cgrid%pyglob_id & + ,var_len,var_len_global,max_ptrs & + ,'YATM :10:hist:anal:dail:mont:dcyc:year') + call metadata_edio(nvar,igr,'Atm cell y-indices of polygon','NA','ipoly') end if - - if(associated(cgrid%qmean_can_vpdef)) then + + if (associated(cgrid%load_adjacency)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_can_vpdef,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_CAN_VPDEF :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_i(npts,cgrid%load_adjacency,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'LOAD_ADJACENCY :10:hist') + call metadata_edio(nvar,igr,'Load Adjacency','[NA]','ipoly') end if + !------------------------------------------------------------------------------------! - if(associated(cgrid%qmean_gnd_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_gnd_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_GND_TEMP :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + return + end subroutine filltab_edtype_p10 + !=======================================================================================! + !=======================================================================================! - if(associated(cgrid%qmean_gnd_shv)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_gnd_shv,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_GND_SHV :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%qmean_leaf_energy)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_leaf_energy,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_LEAF_ENERGY :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%qmean_leaf_water)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_leaf_water,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_LEAF_WATER :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%qmean_leaf_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_leaf_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_LEAF_TEMP :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%qmean_leaf_vpdef)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_leaf_vpdef,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_LEAF_VPDEF :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%qmean_leaf_hcap)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_leaf_hcap,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_LEAF_HCAP :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the polygon-level variables ! + ! (edtype) that have one dimension and are real (type 11), and are instantaneous. ! + !---------------------------------------------------------------------------------------! + subroutine filltab_edtype_p11inst(cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine - if(associated(cgrid%qmean_wood_energy)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_wood_energy,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_WOOD_ENERGY :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(edtype), target :: cgrid + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! - if(associated(cgrid%qmean_wood_water)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_wood_water,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_WOOD_WATER :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%qmean_wood_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_wood_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_WOOD_TEMP :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + ! This is the 1-D block. All variables must have the number of points defined ! + ! by npts. ! + !------------------------------------------------------------------------------------! + npts = cgrid%npolygons - if(associated(cgrid%qmean_wood_hcap)) then + if (associated(cgrid%lon)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_wood_hcap,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_WOOD_HCAP :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%lon,nvar,igr,init,cgrid%pyglob_id & + ,var_len,var_len_global,max_ptrs & + ,'LONGITUDE :11:hist:anal:dail:mont:dcyc:year') + call metadata_edio(nvar,igr,'Longitude of Polygon','[deg]','(ipoly)') end if - if(associated(cgrid%qmean_atm_temp)) then + if (associated(cgrid%lat)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_atm_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_ATM_TEMP :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%lat,nvar,igr,init,cgrid%pyglob_id & + ,var_len,var_len_global,max_ptrs & + ,'LATITUDE :11:hist:anal:dail:mont:dcyc:year') + call metadata_edio(nvar,igr,'Latitude of Polygon','[deg]','(ipoly)') end if - if(associated(cgrid%qmean_atm_vpdef)) then + + if (associated(cgrid%wbar)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_atm_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_ATM_VPDEF :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%wbar,nvar,igr,init,cgrid%pyglob_id & + ,var_len,var_len_global,max_ptrs & + ,'WBAR :11:hist') + call metadata_edio(nvar,igr & + ,'Polygon average topographic moisture index' & + ,'NA','(ipoly)') end if - - if(associated(cgrid%qmean_rshort)) then + + if (associated(cgrid%Te)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_rshort,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_RSHORT :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%Te & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'TE :11:hist') + call metadata_edio(nvar,igr,'No metadata available','NA','(ipoly)') end if - - if(associated(cgrid%qmean_rshort_diff)) then + + if (associated(cgrid%zbar)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_rshort_diff,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_RSHORT_DIFF :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%zbar & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'ZBAR :11:hist:anal') + call metadata_edio(nvar,igr,'Polygon average water table depth','[m]','(ipoly)') end if - - if(associated(cgrid%qmean_par)) then + + if (associated(cgrid%sheat)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_par,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_PAR :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%sheat & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'SHEAT :11:hist') + call metadata_edio(nvar,igr,'Soil heat pool for lateral hydrology','NA','(ipoly)') end if - - if(associated(cgrid%qmean_par_diff)) then + + if (associated(cgrid%baseflow)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_par_diff,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_PAR_DIFF :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%baseflow & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'BASEFLOW :11:hist:anal:opti') + call metadata_edio(nvar,igr & + ,'Loss of water from site to watershed discharge' & + ,'[kg/m2/s]','(ipoly)') end if - - if(associated(cgrid%qmean_rlong)) then + + if (associated(cgrid%runoff)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_rlong,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_RLONG :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%runoff & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'RUNOFF :11:hist:anal:opti') + call metadata_edio(nvar,igr,'NA','NA','ipoly') end if - - if(associated(cgrid%qmean_rshort_gnd)) then + + if (associated(cgrid%qrunoff)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_rshort_gnd,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_RSHORT_GND :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%qrunoff & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QRUNOFF :11:hist:anal:opti') + call metadata_edio(nvar,igr,'NA','NA','ipoly') end if - - if(associated(cgrid%qmean_par_gnd)) then + + if (associated(cgrid%swliq)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_par_gnd,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_PAR_GND :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%swliq,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'SWLIQ :11:hist:anal') + call metadata_edio(nvar,igr,'NA','NA','ipoly') end if - if(associated(cgrid%qmean_rlong_gnd)) then + if (associated(cgrid%total_agb)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_rlong_gnd,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_RLONG_GND :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%total_agb,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'TOTAL_AGB :11:hist:anal:year') + call metadata_edio(nvar,igr,'Polygon Total Above Ground Biomass','[kgC/m2]','ipoly') end if - if(associated(cgrid%qmean_albedo)) then + if (associated(cgrid%total_basal_area)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_albedo,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_ALBEDO :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%total_basal_area,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'TOTAL_BASAL_AREA :11:hist:anal:year') + call metadata_edio(nvar,igr,'Polygon Total Basal Area','[cm2/m2]','ipoly') + end if - - if(associated(cgrid%qmean_albedo_beam)) then + + if (associated(cgrid%total_agb_growth)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_albedo_beam,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_ALBEDO_BEAM :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%total_agb_growth,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'TOTAL_AGB_GROWTH:11:hist:anal:year') + call metadata_edio(nvar,igr,'Polygon AGB gain through growth','[kgC/m2/yr]','ipoly') end if - if(associated(cgrid%qmean_albedo_diffuse)) then + if (associated(cgrid%total_agb_mort)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_albedo_diffuse,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_ALBEDO_DIFFUSE :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%total_agb_mort,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'TOTAL_AGB_MORT :11:hist:anal:year') + call metadata_edio(nvar,igr,'Polygon AGB lost due to mortality','[kgC/m2/yr]','ipoly') end if - if(associated(cgrid%qmean_rlong_albedo)) then + if (associated(cgrid%total_agb_recruit)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_rlong_albedo,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_RLONG_ALBEDO :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%total_agb_recruit,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'TOTAL_AGB_RECRUIT :11:hist:anal:year') + call metadata_edio(nvar,igr,'Polygon AGB used to generate recruits','[kgC/m2/yr]','ipoly') end if - if(associated(cgrid%qmean_rlongup)) then + if (associated(cgrid%total_basal_area_growth)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_rlongup,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_RLONGUP :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%total_basal_area_growth,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'TOTAL_BASAL_AREA_GROWTH :11:hist:anal:year') + call metadata_edio(nvar,igr,'Polygon basal area gained through growth ','[kgC/m2/yr]','ipoly') end if - if(associated(cgrid%qmean_parup)) then + if (associated(cgrid%total_basal_area_mort)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_parup,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_PARUP :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%total_basal_area_mort,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'TOTAL_BASAL_AREA_MORT :11:hist:anal:year') + call metadata_edio(nvar,igr,'Polygon basal area lost through growth ','[cm2/m2/yr]','ipoly') end if - if(associated(cgrid%qmean_nirup)) then + if (associated(cgrid%total_basal_area_recruit)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_nirup,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_NIRUP :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%total_basal_area_recruit,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'TOTAL_BASAL_AREA_RECRUIT :11:hist:anal:year') + call metadata_edio(nvar,igr,'Polygon basal area gained by recruits','[cm2/m2/yr]','ipoly') end if - if(associated(cgrid%qmean_rshortup)) then + if (associated(cgrid%cosz)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_rshortup,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_RSHORTUP :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%cosz,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'COSZ :11:hist') + call metadata_edio(nvar,igr,'Cosine of the zenith angle','[a/h]','ipoly') end if - if(associated(cgrid%qmean_rnet)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_rnet,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_RNET :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%qmean_atm_shv)) then + if (associated(cgrid%cbudget_initialstorage)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_atm_shv,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_ATM_SHV :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%cbudget_initialstorage,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'CBUDGET_INITIALSTORAGE :11:hist') + call metadata_edio(nvar,igr,'Vegetation and soil carbon,at start of budget-averaging','[kgC/m2]','ipoly') end if - - if(associated(cgrid%qmean_atm_co2)) then + + if (associated(cgrid%cbudget_nep)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_atm_co2,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_ATM_CO2 :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%cbudget_nep,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'CBUDGET_NEP :11:hist') + call metadata_edio(nvar,igr,'Polygon average net ecosystem production','[kgC/m2/day]','ipoly') end if - - if(associated(cgrid%qmean_atm_prss)) then + + if (associated(cgrid%nbudget_initialstorage)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_atm_prss,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_ATM_PRSS :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%nbudget_initialstorage,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'NBUDGET_INITIALSTORAGE :11:hist') + call metadata_edio(nvar,igr,'Veg and soil nitrogen, at start of budget-averaging','[kgN/m2]','ipoly') end if - if(associated(cgrid%qmean_atm_vels)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_atm_vels,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_ATM_VELS :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + !-------- TOTAL CARBON AND NITROGEN POOLS --------------- + ! Added by MCD for NCEAS/FACE intercomparison (Apr 7 2009) + ! if (associated(cgrid%Cleaf)) then + ! nvar=nvar+1 + ! call vtable_edio_r(npts,cgrid%Cleaf,nvar,igr,init,cgrid%pyglob_id, & + ! var_len,var_len_global,max_ptrs,'CLEAF :11:dail') + ! call metadata_edio(nvar,igr,'Poly Avg. Leaf Carbon','?','ipoly') + ! end if + ! if (associated(cgrid%Croot)) then + ! nvar=nvar+1 + ! call vtable_edio_r(npts,cgrid%Croot,nvar,igr,init,cgrid%pyglob_id, & + ! var_len,var_len_global,max_ptrs,'CROOT :11:dail') + ! call metadata_edio(nvar,igr,'Poly Avg. Fine Root Carbon','?','ipoly') + ! end if + ! if (associated(cgrid%Cstore)) then + ! nvar=nvar+1 + ! call vtable_edio_r(npts,cgrid%cstore,nvar,igr,init,cgrid%pyglob_id, & + ! var_len,var_len_global,max_ptrs,'CSTORE :11:dail') + ! call metadata_edio(nvar,igr,'Poly Avg. Storage/TNC Carbon','?','ipoly') + ! end if + ! if (associated(cgrid%Ccwd)) then + ! nvar=nvar+1 + ! call vtable_edio_r(npts,cgrid%Ccwd,nvar,igr,init,cgrid%pyglob_id, & + ! var_len,var_len_global,max_ptrs,'CCWD :11:dail') + ! call metadata_edio(nvar,igr,'Poly Avg. Coarse Woody Debris Carbon','?','ipoly') + ! end if + ! if (associated(cgrid%Nleaf)) then + ! nvar=nvar+1 + ! call vtable_edio_r(npts,cgrid%Nleaf,nvar,igr,init,cgrid%pyglob_id, & + ! var_len,var_len_global,max_ptrs,'NLEAF :11:dail') + ! call metadata_edio(nvar,igr,'Poly Avg. Leaf Nitrogen','?','ipoly') + ! end if + ! if (associated(cgrid%Ndead)) then + ! nvar=nvar+1 + ! call vtable_edio_r(npts,cgrid%Ndead,nvar,igr,init,cgrid%pyglob_id, & + ! var_len,var_len_global,max_ptrs,'NDEAD :11:dail') + ! call metadata_edio(nvar,igr,'Poly Avg. Wood Nitrogen','?','ipoly') + ! end if + ! if (associated(cgrid%Nroot)) then + ! nvar=nvar+1 + ! call vtable_edio_r(npts,cgrid%Nroot,nvar,igr,init,cgrid%pyglob_id, & + ! var_len,var_len_global,max_ptrs,'NROOT :11:dail') + ! call metadata_edio(nvar,igr,'Poly Avg. Fine Root Nitrogen','?','ipoly') + ! end if + ! if (associated(cgrid%Nstore)) then + ! nvar=nvar+1 + ! call vtable_edio_r(npts,cgrid%Nstore,nvar,igr,init,cgrid%pyglob_id, & + ! var_len,var_len_global,max_ptrs,'NSTORE :11:dail') + ! call metadata_edio(nvar,igr,'Poly Avg. Storage Nitrogen','?','ipoly') + ! end if + ! if (associated(cgrid%Ncwd)) then + ! nvar=nvar+1 + ! call vtable_edio_r(npts,cgrid%Ncwd,nvar,igr,init,cgrid%pyglob_id, & + ! var_len,var_len_global,max_ptrs,'NCWD :11:dail') + ! call metadata_edio(nvar,igr,'Poly Avg. Leaf Carbon','?','ipoly') + ! end if - if(associated(cgrid%qmsqu_gpp)) then + !-------- TOTAL CARBON AND NITROGEN FLUX --------------- + ! Added by MCD for NCEAS/FACE intercomparison (Apr 7 2009) + if (associated(cgrid%Cleaf_grow)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmsqu_gpp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMSQU_GPP :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%Cleaf_grow,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'CLEAF_GROW :11:dail') + call metadata_edio(nvar,igr,'Poly Avg. Leaf Carbon Growth','?','ipoly') end if - - if(associated(cgrid%qmsqu_leaf_resp)) then + if (associated(cgrid%Croot_grow)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmsqu_leaf_resp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMSQU_LEAF_RESP :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%Croot_grow,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'CROOT_GROW :11:dail') + call metadata_edio(nvar,igr,'Poly Avg. Fine Root Carbon Growth','?','ipoly') end if - - if(associated(cgrid%qmsqu_root_resp)) then + if (associated(cgrid%Cdead_grow)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmsqu_root_resp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMSQU_ROOT_RESP :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%Cdead_grow,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'CDEAD_GROW :11:dail') + call metadata_edio(nvar,igr,'Poly Avg. Wood Carbon Growth','?','ipoly') end if - - if(associated(cgrid%qmsqu_plresp)) then + if (associated(cgrid%Cstore_grow)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmsqu_plresp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMSQU_PLRESP :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%Cstore_Grow,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'CSTORE_GROW :11:dail') + call metadata_edio(nvar,igr,'Poly Avg. Storage Carbon growth','?','ipoly') end if - - if(associated(cgrid%qmsqu_carbon_ac)) then + if (associated(cgrid%Cleaf_litter_flux)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmsqu_carbon_ac,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMSQU_CARBON_AC :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%Cleaf_litter_flux,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'CLEAF_LITTER_FLUX :11:dail') + call metadata_edio(nvar,igr,'Poly Avg. Leaf Litter Carbon Flux','?','ipoly') end if - - if(associated(cgrid%qmsqu_carbon_st)) then + if (associated(cgrid%Croot_litter_flux)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmsqu_carbon_st,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMSQU_CARBON_ST :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%Croot_litter_flux,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'CROOT_LITTER_FLUX :11:dail') + call metadata_edio(nvar,igr,'Poly Avg. Fine Root Litter Carbon Flux','?','ipoly') end if - - if(associated(cgrid%qmsqu_nep)) then + if (associated(cgrid%Ccwd_flux)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmsqu_nep,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMSQU_NEP :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%Ccwd_flux,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'CCWD_FLUX :11:dail') + call metadata_edio(nvar,igr,'Poly Avg. Coarse Woody Debris Carbon FLUX','?','ipoly') end if - - if(associated(cgrid%qmsqu_rh)) then + if (associated(cgrid%Nleaf_grow)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmsqu_rh,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMSQU_RH :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%Nleaf_grow,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'NLEAF_GROW :11:dail') + call metadata_edio(nvar,igr,'Poly Avg. Leaf Nitrogen growth','?','ipoly') end if - - if(associated(cgrid%qmsqu_cwd_rh)) then + if (associated(cgrid%Nroot_grow)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmsqu_cwd_rh,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMSQU_CWD_RH :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%Nroot_grow,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'NROOT_GROW :11:dail') + call metadata_edio(nvar,igr,'Poly Avg. Fine Root Nitrogen Growth','?','ipoly') end if - - if(associated(cgrid%qmsqu_sensible_ac)) then + if (associated(cgrid%Ndead_grow)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmsqu_sensible_ac,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMSQU_SENSIBLE_AC :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%Ndead_grow,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'NDEAD_GROW :11:dail') + call metadata_edio(nvar,igr,'Poly Avg. Wood Nitrogen growth','?','ipoly') end if - - if(associated(cgrid%qmsqu_sensible_lc)) then + if (associated(cgrid%Nstore_grow)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmsqu_sensible_lc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMSQU_SENSIBLE_LC :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%Nstore_grow,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'NSTORE_GROW :11:dail') + call metadata_edio(nvar,igr,'Poly Avg. Storage Nitrogen Growth','?','ipoly') end if - - if(associated(cgrid%qmsqu_sensible_wc)) then + if (associated(cgrid%Nleaf_litter_flux)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmsqu_sensible_wc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMSQU_SENSIBLE_WC :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%Nleaf_litter_flux,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'NLEAF_LITTER_FLUX :11:dail') + call metadata_edio(nvar,igr,'Poly Avg. Leaf litter Nitrogen flux','?','ipoly') end if - - if(associated(cgrid%qmsqu_sensible_gc)) then + if (associated(cgrid%Nroot_litter_flux)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmsqu_sensible_gc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMSQU_SENSIBLE_GC :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%Nroot_litter_flux,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'NROOT_LITTER_FLUX :11:dail') + call metadata_edio(nvar,igr,'Poly Avg. fine root litter Nitrogen flux','?','ipoly') end if - - if(associated(cgrid%qmsqu_evap)) then + if (associated(cgrid%Ncwd_flux)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmsqu_evap,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMSQU_EVAP :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%Ncwd_flux,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'NCWD_FLUX :11:dail') + call metadata_edio(nvar,igr,'Poly Avg. CWD Nitrogen flux','?','ipoly') end if - - if(associated(cgrid%qmsqu_transp)) then + if (associated(cgrid%Nbiomass_uptake)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmsqu_transp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMSQU_TRANSP :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%Nbiomass_uptake,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'NBIOMASS_UPTAKE :11:dail') + call metadata_edio(nvar,igr,'Poly Avg. Nitrogen Uptake','?','ipoly') end if - - if(associated(cgrid%qmsqu_vapor_ac)) then + if (associated(cgrid%Ngross_min)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmsqu_vapor_ac,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMSQU_VAPOR_AC :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%Ngross_min,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'NGROSS_MIN :11:dail') + call metadata_edio(nvar,igr,'Poly Avg. Gross Nitrogen mineralization','?','ipoly') end if - - if(associated(cgrid%qmsqu_vapor_lc)) then + if (associated(cgrid%Nnet_min)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmsqu_vapor_lc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMSQU_VAPOR_LC :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,cgrid%Nnet_min,nvar,igr,init,cgrid%pyglob_id, & + var_len,var_len_global,max_ptrs,'NNET_MIN :11:dail') + call metadata_edio(nvar,igr,'Poly Avg. Net Nitrogen mineralization','?','ipoly') end if - if(associated(cgrid%qmsqu_vapor_wc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmsqu_vapor_wc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMSQU_VAPOR_WC :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if(associated(cgrid%qmsqu_vapor_gc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmsqu_vapor_gc,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMSQU_VAPOR_GC :-11:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + !------ Polygon average of soil C and N pools. --------------------------------------! + if(associated(cgrid%fast_soil_c )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%fast_soil_c & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FAST_SOIL_C_PY :11:hist:anal:dail') + call metadata_edio(nvar,igr,'Soil Carbon (Fast pool)' & + ,'[kgC/m2]','(ipoly)') end if - - if(associated(cgrid%qmsqu_ustar)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmsqu_ustar,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMSQU_USTAR :-11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + if(associated(cgrid%slow_soil_c )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%slow_soil_c & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'SLOW_SOIL_C_PY :11:hist:anal:dail') + call metadata_edio(nvar,igr,'Soil Carbon (Slow pool)' & + ,'[kgC/m2]','(ipoly)') end if - - if(associated(cgrid%qmsqu_rlongup)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmsqu_rlongup,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMSQU_RLONGUP :-11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + if(associated(cgrid%struct_soil_c )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%struct_soil_c & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'STRUCT_SOIL_C_PY :11:hist:anal:dail') + call metadata_edio(nvar,igr,'Soil Carbon (Structural pool)' & + ,'[kgC/m2]','(ipoly)') end if - - if(associated(cgrid%qmsqu_parup)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmsqu_parup,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMSQU_PARUP :-11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + if(associated(cgrid%struct_soil_l )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%struct_soil_l & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'STRUCT_SOIL_L_PY :11:hist:anal:dail') + call metadata_edio(nvar,igr,'Soil Lignin (Structural pool)' & + ,'[kgC/m2]','(ipoly)') end if - - if(associated(cgrid%qmsqu_nirup)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmsqu_nirup,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMSQU_NIRUP :-11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + if(associated(cgrid%cwd_c )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%cwd_c & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'CWD_C :11:hist:anal:dail') + call metadata_edio(nvar,igr,'Coarse woody debris' & + ,'[kgC/m2]','(ipoly)') end if - - if(associated(cgrid%qmsqu_rshortup)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmsqu_rshortup,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMSQU_RSHORTUP :-11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + if(associated(cgrid%fast_soil_n )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%fast_soil_n & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FAST_SOIL_N_PY :11:hist:anal:dail') + call metadata_edio(nvar,igr,'Soil Nitrogen (Fast pool)' & + ,'[kgN/m2]','(ipoly)') end if - - if(associated(cgrid%qmsqu_rnet)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmsqu_rnet,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMSQU_RNET :-11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + if(associated(cgrid%mineral_soil_n )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%mineral_soil_n & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MINERAL_SOIL_N_PY :11:hist:anal:dail') + call metadata_edio(nvar,igr,'Soil Nitrogen (Mineralised pool)' & + ,'[kgN/m2]','(ipoly)') end if - - if(associated(cgrid%qmsqu_albedo)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmsqu_albedo,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMSQU_ALBEDO :-11:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + if(associated(cgrid%cwd_n )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%cwd_n & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'CWD_N :11:hist:anal:dail') + call metadata_edio(nvar,igr,'Coarse woody debris nitrogen' & + ,'[kgN/m2]','(ipoly)') end if - - !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! - - return - end subroutine filltab_edtype_m11 + return + end subroutine filltab_edtype_p11inst !=======================================================================================! !=======================================================================================! @@ -12051,10 +11659,10 @@ end subroutine filltab_edtype_m11 !=======================================================================================! !=======================================================================================! ! This routine will fill the pointer table with the polygon-level variables ! - ! (edtype) that have two dimensions (nzg,npolygons) and are integer (type 120). ! + ! (edtype) that have one dimension and are real (type 11), and are fast mean variables. ! !---------------------------------------------------------------------------------------! - subroutine filltab_edtype_p120(cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) - use ed_var_tables, only : vtable_edio_i & ! sub-routine + subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine , metadata_edio ! ! sub-routine implicit none @@ -12071,26 +11679,1028 @@ subroutine filltab_edtype_p120(cgrid,igr,init,var_len,var_len_global,max_ptrs,nv !------------------------------------------------------------------------------------! - + !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! - ! This is the 2-D block, with soil layers. All variables must have the number ! - ! of points defined by npts. ! + ! This is the 1-D block. All variables must have the number of points defined ! + ! by npts. ! !------------------------------------------------------------------------------------! - npts = cgrid%npolygons * nzg + npts = cgrid%npolygons - if (associated(cgrid%ntext_soil)) then - nvar=nvar+1 - call vtable_edio_i(npts,cgrid%ntext_soil,nvar,igr,init,cgrid%pyglob_id & - ,var_len,var_len_global,max_ptrs & - ,'NTEXT_SOIL :120:hist:anal:dail:mont:dcyc:year') - call metadata_edio(nvar,igr,'Polygon mode soil class','OGE2 Class','ipoly-ngz') - end if + if (associated(cgrid%fmean_gpp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_gpp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_GPP_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Gross primary productivity' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%fmean_npp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_npp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_NPP_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Net primary productivity' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%fmean_leaf_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_leaf_resp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_LEAF_RESP_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Leaf respiration' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%fmean_root_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_root_resp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ROOT_RESP_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Root respiration' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%fmean_growth_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_growth_resp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_GROWTH_RESP_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Growth respiration' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%fmean_storage_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_storage_resp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_STORAGE_RESP_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Storage respiration' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%fmean_vleaf_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_vleaf_resp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_VLEAF_RESP_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Virtual leaf respiration' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%fmean_plresp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_plresp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_PLRESP_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Plant respiration' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%fmean_leaf_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_leaf_energy & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_LEAF_ENERGY_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Leaf internal energy' & + ,'[ J/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_leaf_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_leaf_water & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_LEAF_WATER_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Leaf surface water' & + ,'[ kg/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_leaf_hcap )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_leaf_hcap & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_LEAF_HCAP_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Leaf heat capacity' & + ,'[ J/m2/K]','(ipoly)' ) + end if + if (associated(cgrid%fmean_leaf_vpdef )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_leaf_vpdef & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_LEAF_VPDEF_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Leaf vapour pressure deficit' & + ,'[ Pa]','(ipoly)' ) + end if + if (associated(cgrid%fmean_leaf_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_leaf_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_LEAF_TEMP_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Leaf temperature' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%fmean_leaf_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_leaf_fliq & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_LEAF_FLIQ_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Liquid fraction' & + ,'[ --]','(ipoly)' ) + end if + if (associated(cgrid%fmean_leaf_gsw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_leaf_gsw & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_LEAF_GSW_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Stomatal conductance' & + ,'[kg/m2leaf/s]','(ipoly)' ) + end if + if (associated(cgrid%fmean_leaf_gbw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_leaf_gbw & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_LEAF_GBW_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Leaf boundary layer conductance' & + ,'[kg/m2leaf/s]','(ipoly)' ) + end if + if (associated(cgrid%fmean_wood_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_wood_energy & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_WOOD_ENERGY_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Wood internal energy' & + ,'[ J/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_wood_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_wood_water & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_WOOD_WATER_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Wood surface water' & + ,'[ kg/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_wood_hcap )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_wood_hcap & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_WOOD_HCAP_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Wood heat capacity' & + ,'[ J/m2/K]','(ipoly)' ) + end if + if (associated(cgrid%fmean_wood_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_wood_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_WOOD_TEMP_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Wood temperature' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%fmean_wood_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_wood_fliq & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_WOOD_FLIQ_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Liquid fraction' & + ,'[ --]','(ipoly)' ) + end if + if (associated(cgrid%fmean_wood_gbw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_wood_gbw & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_WOOD_GBW_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Wood boundary layer conductance' & + ,'[kg/m2wood/s]','(ipoly)' ) + end if + if (associated(cgrid%fmean_fs_open )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_fs_open & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_FS_OPEN_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Net stress factor' & + ,'[ --]','(ipoly)' ) + end if + if (associated(cgrid%fmean_fsw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_fsw & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_FSW_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Moisture stress' & + ,'[ --]','(ipoly)' ) + end if + if (associated(cgrid%fmean_fsn )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_fsn & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_FSN_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Nitrogen stress' & + ,'[ --]','(ipoly)' ) + end if + if (associated(cgrid%fmean_psi_open )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_psi_open & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_PSI_OPEN_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Transpiration with no stress' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%fmean_psi_closed )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_psi_closed & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_PSI_CLOSED_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Transpiration at maximum stress' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%fmean_water_supply )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_water_supply & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_WATER_SUPPLY_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Water supply' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%fmean_par_l )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_par_l & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_PAR_L_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - PAR absorbed by leaves' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_par_l_beam )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_par_l_beam & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_PAR_L_BEAM_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Direct PAR absorbed by leaves' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_par_l_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_par_l_diff & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_PAR_L_DIFF_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Diffuse PAR absorbed by leaves' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_rshort_l )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_rshort_l & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_RSHORT_L_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Shortwave radiation absorbed by leaves' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_rlong_l )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_rlong_l & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_RLONG_L_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Longwave radiation absorbed by leaves' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_sensible_lc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_sensible_lc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SENSIBLE_LC_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Sensible heat' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_vapor_lc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_vapor_lc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_VAPOR_LC_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Leaf evaporation' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%fmean_transp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_transp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_TRANSP_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Leaf transpiration' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%fmean_intercepted_al )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_intercepted_al & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_INTERCEPTED_AL_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Leaf interception' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%fmean_wshed_lg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_wshed_lg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_WSHED_LG_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Leaf shedding' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%fmean_rshort_w )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_rshort_w & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_RSHORT_W_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Shortwave radiation absorbed by wood' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_rlong_w )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_rlong_w & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_RLONG_W_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Longwave radiation absorbed by wood' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_sensible_wc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_sensible_wc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SENSIBLE_WC_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Sensible heat' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_vapor_wc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_vapor_wc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_VAPOR_WC_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Wood evaporation' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%fmean_intercepted_aw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_intercepted_aw & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_INTERCEPTED_AW_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Wood interception' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%fmean_wshed_wg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_wshed_wg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_WSHED_WG_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Wood shedding' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%fmean_rh )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_rh & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_RH_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Heterotrophic respiration' & + ,'[ kg/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%fmean_cwd_rh )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_cwd_rh & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_CWD_RH_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Coarse woody debris respiration' & + ,'[ kg/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%fmean_nep )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_nep & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_NEP_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Net Ecosystem productivity' & + ,'[ kg/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%fmean_rk4step )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_rk4step & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_RK4STEP_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - RK4 time step' & + ,'[ s]','(ipoly)' ) + end if + if (associated(cgrid%fmean_available_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_available_water & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_AVAILABLE_WATER_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Available water' & + ,'[ kg/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_can_theiv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_can_theiv & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_CAN_THEIV_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Ice-vapour equiv. pot. temperature - CAS' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%fmean_can_theta )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_can_theta & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_CAN_THETA_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Potential temperature - CAS' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%fmean_can_vpdef )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_can_vpdef & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_CAN_VPDEF_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Vapour pressure deficit - CAS' & + ,'[ Pa]','(ipoly)' ) + end if + if (associated(cgrid%fmean_can_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_can_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_CAN_TEMP_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Temperature - CAS' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%fmean_can_shv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_can_shv & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_CAN_SHV_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Specific humidity - CAS' & + ,'[ kg/kg]','(ipoly)' ) + end if + if (associated(cgrid%fmean_can_co2 )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_can_co2 & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_CAN_CO2_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - CO2 mixing ratio - CAS' & + ,'[ umol/mol]','(ipoly)' ) + end if + if (associated(cgrid%fmean_can_rhos )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_can_rhos & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_CAN_RHOS_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Air density - CAS' & + ,'[ kg/m3]','(ipoly)' ) + end if + if (associated(cgrid%fmean_can_prss )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_can_prss & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_CAN_PRSS_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Pressure - CAS' & + ,'[ Pa]','(ipoly)' ) + end if + if (associated(cgrid%fmean_gnd_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_gnd_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_GND_TEMP_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Ground temperature' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%fmean_gnd_shv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_gnd_shv & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_GND_SHV_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Ground specific humidity' & + ,'[ kg/kg]','(ipoly)' ) + end if + if (associated(cgrid%fmean_can_ggnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_can_ggnd & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_CAN_GGND_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Net canopy conductance' & + ,'[ m/2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_sfcw_depth )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_sfcw_depth & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SFCW_DEPTH_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Depth - temporary water layer' & + ,'[ m]','(ipoly)' ) + end if + if (associated(cgrid%fmean_sfcw_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_sfcw_energy & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SFCW_ENERGY_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Internal energy - temporary water layer' & + ,'[ J/kg]','(ipoly)' ) + end if + if (associated(cgrid%fmean_sfcw_mass )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_sfcw_mass & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SFCW_MASS_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Water mass - temporary water layer' & + ,'[ kg/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_sfcw_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_sfcw_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SFCW_TEMP_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Temperature - temporary water layer' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%fmean_sfcw_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_sfcw_fliq & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SFCW_FLIQ_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Liquid fraction - temporary water layer' & + ,'[ --]','(ipoly)' ) + end if + if (associated(cgrid%fmean_rshort_gnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_rshort_gnd & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_RSHORT_GND_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Shortwave radiation absorbed by ground' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_par_gnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_par_gnd & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_PAR_GND_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - PAR absorbed by ground' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_rlong_gnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_rlong_gnd & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_RLONG_GND_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Longwave radiation absorbed by ground' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_rlongup )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_rlongup & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_RLONGUP_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Outgoing longwave radiation' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_parup )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_parup & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_PARUP_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Outgoing PAR' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_nirup )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_nirup & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_NIRUP_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Outgoing near infra-red radiation' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_rshortup )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_rshortup & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_RSHORTUP_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Outgoing shortwave radiation' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_rnet )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_rnet & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_RNET_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Net radiation at top of canopy' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_albedo )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_albedo & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ALBEDO_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Albedo' & + ,'[ ----]','(ipoly)' ) + end if + if (associated(cgrid%fmean_albedo_beam )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_albedo_beam & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ALBEDO_BEAM_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Albedo - direct radiation' & + ,'[ ----]','(ipoly)' ) + end if + if (associated(cgrid%fmean_albedo_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_albedo_diff & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ALBEDO_DIFF_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Albedo - diffuse radiation' & + ,'[ ----]','(ipoly)' ) + end if + if (associated(cgrid%fmean_rlong_albedo )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_rlong_albedo & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_RLONG_ALBEDO_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Kind of albedo - longwave radiation' & + ,'[ ----]','(ipoly)' ) + end if + if (associated(cgrid%fmean_ustar )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_ustar & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_USTAR_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Friction velocity' & + ,'[ m/s]','(ipoly)' ) + end if + if (associated(cgrid%fmean_tstar )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_tstar & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_TSTAR_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Gradient scale for potential temperature' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%fmean_qstar )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_qstar & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_QSTAR_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Gradient scale for specific humidity' & + ,'[ kg/kg]','(ipoly)' ) + end if + if (associated(cgrid%fmean_cstar )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_cstar & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_CSTAR_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Gradient scale for CO2 mixing ratio' & + ,'[ umol/mol]','(ipoly)' ) + end if + if (associated(cgrid%fmean_carbon_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_carbon_ac & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_CARBON_AC_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - CO2 flux: atmosphere -> CAS' & + ,'[ umol/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%fmean_carbon_st )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_carbon_st & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_CARBON_ST_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - CO2 storage at CAS' & + ,'[ umol/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%fmean_vapor_gc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_vapor_gc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_VAPOR_GC_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Water vapour flux: ground -> CAS' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%fmean_vapor_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_vapor_ac & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_VAPOR_AC_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Water vapour flux: atmosphere -> CAS' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%fmean_throughfall )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_throughfall & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_THROUGHFALL_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Throughfall rate' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%fmean_runoff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_runoff & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_RUNOFF_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Water runoff' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%fmean_drainage )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_drainage & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_DRAINAGE_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Water drainage' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%fmean_sensible_gc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_sensible_gc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SENSIBLE_GC_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Sensible heat flux: ground -> CAS' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_sensible_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_sensible_ac & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SENSIBLE_AC_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Sensible heat flux: atmosphere -> CAS' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_qthroughfall )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_qthroughfall & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_QTHROUGHFALL_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Throughfall rate' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_qrunoff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_qrunoff & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_QRUNOFF_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Surface runoff' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_qdrainage )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_qdrainage & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_QDRAINAGE_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Drainage energy loss' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_atm_theiv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_atm_theiv & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_THEIV_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Ice-vapour equiv. pot. temp.: Atmosphere' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%fmean_atm_theta )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_atm_theta & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_THETA_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Potential temperature: Atmosphere' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%fmean_atm_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_atm_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_TEMP_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Temperature: Atmosphere' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%fmean_atm_vpdef )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_atm_vpdef & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_VPDEF_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Vapour pressure deficit: Atmosphere' & + ,'[ Pa]','(ipoly)' ) + end if + if (associated(cgrid%fmean_atm_shv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_atm_shv & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_SHV_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Specific humidity: Atmosphere' & + ,'[ kg/kg]','(ipoly)' ) + end if + if (associated(cgrid%fmean_atm_rshort )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_atm_rshort & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_RSHORT_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Shortwave radiation: Atmosphere' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_atm_rshort_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_atm_rshort_diff & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_RSHORT_DIFF_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Diffuse SW radiation: Atmosphere' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_atm_par )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_atm_par & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_PAR_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - PAR: Atmosphere' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_atm_par_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_atm_par_diff & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_PAR_DIFF_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Diffuse PAR: Atmosphere' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_atm_rlong )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_atm_rlong & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_RLONG_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Longwave radiation: Atmosphere' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_atm_vels )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_atm_vels & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_VELS_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Wind speed: atmosphere' & + ,'[ m/s]','(ipoly)' ) + end if + if (associated(cgrid%fmean_atm_rhos )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_atm_rhos & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_RHOS_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Air density: Atmosphere' & + ,'[ kg/m3]','(ipoly)' ) + end if + if (associated(cgrid%fmean_atm_prss )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_atm_prss & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_PRSS_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Air pressure: Atmosphere' & + ,'[ Pa]','(ipoly)' ) + end if + if (associated(cgrid%fmean_atm_co2 )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_atm_co2 & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_CO2_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - CO2 mixing ratio: Atmosphere' & + ,'[ umol/mol]','(ipoly)' ) + end if + if (associated(cgrid%fmean_pcpg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_pcpg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_PCPG_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Precipitation rate' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%fmean_qpcpg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_qpcpg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_QPCPG_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Energy gain - rain' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%fmean_dpcpg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_dpcpg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_DPCPG_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Precipitation depth' & + ,'[ m]','(ipoly)' ) + end if + if (associated(cgrid%fmean_soil_wetness )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_soil_wetness & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SOIL_WETNESS_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Soil wetness index' & + ,'[ --]','(ipoly)' ) + end if + if (associated(cgrid%fmean_skin_temp)) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_skin_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SKIN_TEMP_PY :11:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Skin temperature' & + ,'[ K]','(ipoly)' ) + end if + !------------------------------------------------------------------------------------! - return - end subroutine filltab_edtype_p120 + return + end subroutine filltab_edtype_p11fmean !=======================================================================================! !=======================================================================================! @@ -12102,9 +12712,10 @@ end subroutine filltab_edtype_p120 !=======================================================================================! !=======================================================================================! ! This routine will fill the pointer table with the polygon-level variables ! - ! (edtype) that have two dimensions (ndcycle,npolygons) and are real (type 12). ! + ! (edtype) that have one dimension and are real (type 11), and are daily mean ! + ! variables. ! !---------------------------------------------------------------------------------------! - subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) + subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) use ed_var_tables, only : vtable_edio_r & ! sub-routine , metadata_edio ! ! sub-routine @@ -12122,143 +12733,2540 @@ subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! - ! This is the 2-D block, with soil layers. All variables must have the number ! - ! of points defined by npts. ! + ! This is the 1-D block. All variables must have the number of points defined ! + ! by npts. ! !------------------------------------------------------------------------------------! - npts = cgrid%npolygons * nzg + npts = cgrid%npolygons - - if (associated(cgrid%avg_smoist_gg)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_smoist_gg,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_SMOIST_GG :12:hist:anal') - call metadata_edio(nvar,igr,'Polygon averaged soil moisture flux,layer nzg is flux with CAS','[kg/m2/s]','ipoly-nzg') - end if - - if (associated(cgrid%avg_transloss)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_transloss,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_TRANSLOSS :12:hist:anal') - call metadata_edio(nvar,igr,'Polygon averaged soil moisture sink to transpiration','[kg/m2/s]','ipoly-nzg') - end if - - if (associated(cgrid%avg_sensible_gg)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_sensible_gg,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_SENSIBLE_GG :12:hist:anal') - call metadata_edio(nvar,igr,'Polygon averaged soil sensible heat flux,layer nzg is flux with CAS ','[W/m2]','ipoly-nzg') + if (associated(cgrid%dmean_nppleaf )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_nppleaf & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_NPPLEAF_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Net primary productivity - Leaf' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%dmean_nppfroot )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_nppfroot & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_NPPFROOT_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Net primary productivity - Fine root' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%dmean_nppsapwood )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_nppsapwood & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_NPPSAPWOOD_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Net primary productivity - Sap wood' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%dmean_nppcroot )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_nppcroot & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_NPPCROOT_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Net primary productivity - Coarse root' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%dmean_nppseeds )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_nppseeds & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_NPPSEEDS_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Net primary productivity - seeds' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%dmean_nppwood )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_nppwood & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_NPPWOOD_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Net primary productivity - heart wood' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%dmean_nppdaily )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_nppdaily & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_NPPDAILY_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Net primary productivity - total' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%dmean_A_decomp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_A_decomp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_A_DECOMP_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Decomposition scale' & + ,'[ --]','(ipoly)' ) + end if + if (associated(cgrid%dmean_Af_decomp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_Af_decomp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_AF_DECOMP_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Decomposition scale with N immobilisation' & + ,'[ --]','(ipoly)' ) + end if + if (associated(cgrid%dmean_co2_residual )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_co2_residual & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CO2_RESIDUAL_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Budget check - CO2 residual' & + ,'[ umol/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_energy_residual )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_energy_residual & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ENERGY_RESIDUAL_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Budget check - Enthalpy residual' & + ,'[ J/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_water_residual )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_water_residual & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_WATER_RESIDUAL_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Budget check - Water residual' & + ,'[ kg/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_gpp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_gpp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_GPP_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Gross primary productivity' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%dmean_npp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_npp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_NPP_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Net primary productivity' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%dmean_leaf_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_leaf_resp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_LEAF_RESP_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Leaf respiration' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%dmean_root_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_root_resp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ROOT_RESP_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Root respiration' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%dmean_growth_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_growth_resp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_GROWTH_RESP_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Growth respiration' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%dmean_storage_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_storage_resp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_STORAGE_RESP_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Storage respiration' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%dmean_vleaf_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_vleaf_resp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_VLEAF_RESP_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Virtual leaf respiration' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%dmean_plresp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_plresp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_PLRESP_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Plant respiration' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%dmean_leaf_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_leaf_energy & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_LEAF_ENERGY_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Leaf internal energy' & + ,'[ J/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_leaf_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_leaf_water & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_LEAF_WATER_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Leaf surface water' & + ,'[ kg/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_leaf_hcap )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_leaf_hcap & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_LEAF_HCAP_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Leaf heat capacity' & + ,'[ J/m2/K]','(ipoly)' ) + end if + if (associated(cgrid%dmean_leaf_vpdef )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_leaf_vpdef & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_LEAF_VPDEF_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Leaf vapour pressure deficit' & + ,'[ Pa]','(ipoly)' ) + end if + if (associated(cgrid%dmean_leaf_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_leaf_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_LEAF_TEMP_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Leaf temperature' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%dmean_leaf_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_leaf_fliq & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_LEAF_FLIQ_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Liquid fraction' & + ,'[ --]','(ipoly)' ) + end if + if (associated(cgrid%dmean_leaf_gsw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_leaf_gsw & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_LEAF_GSW_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Stomatal conductance' & + ,'[kg/m2leaf/s]','(ipoly)' ) + end if + if (associated(cgrid%dmean_leaf_gbw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_leaf_gbw & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_LEAF_GBW_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Leaf boundary layer conductance' & + ,'[kg/m2leaf/s]','(ipoly)' ) + end if + if (associated(cgrid%dmean_wood_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_wood_energy & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_WOOD_ENERGY_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Wood internal energy' & + ,'[ J/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_wood_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_wood_water & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_WOOD_WATER_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Wood surface water' & + ,'[ kg/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_wood_hcap )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_wood_hcap & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_WOOD_HCAP_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Wood heat capacity' & + ,'[ J/m2/K]','(ipoly)' ) + end if + if (associated(cgrid%dmean_wood_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_wood_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_WOOD_TEMP_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Wood temperature' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%dmean_wood_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_wood_fliq & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_WOOD_FLIQ_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Liquid fraction' & + ,'[ --]','(ipoly)' ) + end if + if (associated(cgrid%dmean_wood_gbw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_wood_gbw & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_WOOD_GBW_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Wood boundary layer conductance' & + ,'[kg/m2wood/s]','(ipoly)' ) + end if + if (associated(cgrid%dmean_fs_open )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_fs_open & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_FS_OPEN_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Net stress factor' & + ,'[ --]','(ipoly)' ) + end if + if (associated(cgrid%dmean_fsw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_fsw & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_FSW_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Moisture stress' & + ,'[ --]','(ipoly)' ) + end if + if (associated(cgrid%dmean_fsn )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_fsn & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_FSN_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Nitrogen stress' & + ,'[ --]','(ipoly)' ) + end if + if (associated(cgrid%dmean_psi_open )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_psi_open & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_PSI_OPEN_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Transpiration with no stress' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%dmean_psi_closed )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_psi_closed & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_PSI_CLOSED_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Transpiration at maximum stress' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%dmean_water_supply )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_water_supply & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_WATER_SUPPLY_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Water supply' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%dmean_par_l )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_par_l & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_PAR_L_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - PAR absorbed by leaves' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_par_l_beam )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_par_l_beam & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_PAR_L_BEAM_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Direct PAR absorbed by leaves' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_par_l_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_par_l_diff & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_PAR_L_DIFF_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Diffuse PAR absorbed by leaves' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_rshort_l )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_rshort_l & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_RSHORT_L_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Shortwave radiation absorbed by leaves' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_rlong_l )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_rlong_l & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_RLONG_L_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Longwave radiation absorbed by leaves' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_sensible_lc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_sensible_lc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SENSIBLE_LC_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Sensible heat' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_vapor_lc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_vapor_lc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_VAPOR_LC_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Leaf evaporation' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%dmean_transp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_transp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_TRANSP_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Leaf transpiration' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%dmean_intercepted_al )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_intercepted_al & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_INTERCEPTED_AL_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Leaf interception' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%dmean_wshed_lg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_wshed_lg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_WSHED_LG_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Leaf shedding' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%dmean_rshort_w )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_rshort_w & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_RSHORT_W_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Shortwave radiation absorbed by wood' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_rlong_w )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_rlong_w & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_RLONG_W_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Longwave radiation absorbed by wood' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_sensible_wc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_sensible_wc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SENSIBLE_WC_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Sensible heat' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_vapor_wc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_vapor_wc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_VAPOR_WC_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Wood evaporation' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%dmean_intercepted_aw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_intercepted_aw & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_INTERCEPTED_AW_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Wood interception' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%dmean_wshed_wg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_wshed_wg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_WSHED_WG_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Wood shedding' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%dmean_rh )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_rh & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_RH_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Heterotrophic respiration' & + ,'[ kg/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%dmean_cwd_rh )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_cwd_rh & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CWD_RH_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Coarse woody debris respiration' & + ,'[ kg/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%dmean_nep )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_nep & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_NEP_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Net Ecosystem productivity' & + ,'[ kg/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%dmean_rk4step )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_rk4step & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_RK4STEP_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - RK4 time step' & + ,'[ s]','(ipoly)' ) + end if + if (associated(cgrid%dmean_available_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_available_water & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_AVAILABLE_WATER_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Available water' & + ,'[ kg/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_can_theiv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_can_theiv & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CAN_THEIV_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Ice-vapour equiv. pot. temperature - CAS' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%dmean_can_theta )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_can_theta & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CAN_THETA_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Potential temperature - CAS' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%dmean_can_vpdef )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_can_vpdef & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CAN_VPDEF_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Vapour pressure deficit - CAS' & + ,'[ Pa]','(ipoly)' ) + end if + if (associated(cgrid%dmean_can_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_can_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CAN_TEMP_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Temperature - CAS' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%dmean_can_shv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_can_shv & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CAN_SHV_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Specific humidity - CAS' & + ,'[ kg/kg]','(ipoly)' ) + end if + if (associated(cgrid%dmean_can_co2 )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_can_co2 & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CAN_CO2_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - CO2 mixing ratio - CAS' & + ,'[ umol/mol]','(ipoly)' ) + end if + if (associated(cgrid%dmean_can_rhos )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_can_rhos & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CAN_RHOS_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Air density - CAS' & + ,'[ kg/m3]','(ipoly)' ) + end if + if (associated(cgrid%dmean_can_prss )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_can_prss & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CAN_PRSS_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Pressure - CAS' & + ,'[ Pa]','(ipoly)' ) + end if + if (associated(cgrid%dmean_gnd_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_gnd_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_GND_TEMP_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Ground temperature' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%dmean_gnd_shv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_gnd_shv & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_GND_SHV_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Ground specific humidity' & + ,'[ kg/kg]','(ipoly)' ) + end if + if (associated(cgrid%dmean_can_ggnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_can_ggnd & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CAN_GGND_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Net canopy conductance' & + ,'[ m/2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_sfcw_depth )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_sfcw_depth & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SFCW_DEPTH_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Depth - temporary water layer' & + ,'[ m]','(ipoly)' ) + end if + if (associated(cgrid%dmean_sfcw_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_sfcw_energy & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SFCW_ENERGY_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Internal energy - temporary water layer' & + ,'[ J/kg]','(ipoly)' ) + end if + if (associated(cgrid%dmean_sfcw_mass )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_sfcw_mass & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SFCW_MASS_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Water mass - temporary water layer' & + ,'[ kg/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_sfcw_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_sfcw_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SFCW_TEMP_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Temperature - temporary water layer' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%dmean_sfcw_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_sfcw_fliq & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SFCW_FLIQ_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Liquid fraction - temporary water layer' & + ,'[ --]','(ipoly)' ) + end if + if (associated(cgrid%dmean_rshort_gnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_rshort_gnd & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_RSHORT_GND_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Shortwave radiation absorbed by ground' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_par_gnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_par_gnd & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_PAR_GND_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - PAR absorbed by ground' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_rlong_gnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_rlong_gnd & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_RLONG_GND_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Longwave radiation absorbed by ground' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_rlongup )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_rlongup & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_RLONGUP_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Outgoing longwave radiation' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_parup )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_parup & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_PARUP_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Outgoing PAR' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_nirup )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_nirup & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_NIRUP_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Outgoing near infra-red radiation' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_rshortup )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_rshortup & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_RSHORTUP_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Outgoing shortwave radiation' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_rnet )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_rnet & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_RNET_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Net radiation at top of canopy' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_albedo )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_albedo & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ALBEDO_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Albedo' & + ,'[ ----]','(ipoly)' ) + end if + if (associated(cgrid%dmean_albedo_beam )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_albedo_beam & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ALBEDO_BEAM_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Albedo - direct radiation' & + ,'[ ----]','(ipoly)' ) + end if + if (associated(cgrid%dmean_albedo_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_albedo_diff & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ALBEDO_DIFF_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Albedo - diffuse radiation' & + ,'[ ----]','(ipoly)' ) + end if + if (associated(cgrid%dmean_rlong_albedo )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_rlong_albedo & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_RLONG_ALBEDO_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Kind of albedo - longwave radiation' & + ,'[ ----]','(ipoly)' ) + end if + if (associated(cgrid%dmean_ustar )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_ustar & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_USTAR_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Friction velocity' & + ,'[ m/s]','(ipoly)' ) + end if + if (associated(cgrid%dmean_tstar )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_tstar & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_TSTAR_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Gradient scale for potential temperature' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%dmean_qstar )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_qstar & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_QSTAR_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Gradient scale for specific humidity' & + ,'[ kg/kg]','(ipoly)' ) + end if + if (associated(cgrid%dmean_cstar )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_cstar & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CSTAR_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Gradient scale for CO2 mixing ratio' & + ,'[ umol/mol]','(ipoly)' ) + end if + if (associated(cgrid%dmean_carbon_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_carbon_ac & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CARBON_AC_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - CO2 flux: atmosphere -> CAS' & + ,'[ umol/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%dmean_carbon_st )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_carbon_st & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CARBON_ST_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - CO2 storage at CAS' & + ,'[ umol/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%dmean_vapor_gc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_vapor_gc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_VAPOR_GC_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Water vapour flux: ground -> CAS' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%dmean_vapor_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_vapor_ac & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_VAPOR_AC_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Water vapour flux: atmosphere -> CAS' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%dmean_throughfall )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_throughfall & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_THROUGHFALL_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Throughfall rate' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%dmean_runoff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_runoff & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_RUNOFF_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Water runoff' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%dmean_drainage )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_drainage & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_DRAINAGE_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Water drainage' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%dmean_sensible_gc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_sensible_gc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SENSIBLE_GC_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Sensible heat flux: ground -> CAS' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_sensible_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_sensible_ac & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SENSIBLE_AC_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Sensible heat flux: atmosphere -> CAS' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_qthroughfall )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_qthroughfall & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_QTHROUGHFALL_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Throughfall rate' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_qrunoff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_qrunoff & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_QRUNOFF_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Surface runoff' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_qdrainage )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_qdrainage & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_QDRAINAGE_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Drainage energy loss' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_atm_theiv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_atm_theiv & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_THEIV_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Ice-vapour equiv. pot. temp.: Atmosphere' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%dmean_atm_theta )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_atm_theta & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_THETA_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Potential temperature: Atmosphere' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%dmean_atm_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_atm_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_TEMP_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Temperature: Atmosphere' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%dmean_atm_vpdef )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_atm_vpdef & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_VPDEF_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Vapour pressure deficit: Atmosphere' & + ,'[ Pa]','(ipoly)' ) + end if + if (associated(cgrid%dmean_atm_shv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_atm_shv & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_SHV_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Specific humidity: Atmosphere' & + ,'[ kg/kg]','(ipoly)' ) + end if + if (associated(cgrid%dmean_atm_rshort )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_atm_rshort & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_RSHORT_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Shortwave radiation: Atmosphere' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_atm_rshort_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_atm_rshort_diff & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_RSHORT_DIFF_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Diffuse SW radiation: Atmosphere' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_atm_par )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_atm_par & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_PAR_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - PAR: Atmosphere' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_atm_par_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_atm_par_diff & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_PAR_DIFF_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Diffuse PAR: Atmosphere' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_atm_rlong )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_atm_rlong & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_RLONG_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Longwave radiation: Atmosphere' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_atm_vels )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_atm_vels & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_VELS_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Wind speed: atmosphere' & + ,'[ m/s]','(ipoly)' ) + end if + if (associated(cgrid%dmean_atm_rhos )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_atm_rhos & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_RHOS_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Air density: Atmosphere' & + ,'[ kg/m3]','(ipoly)' ) + end if + if (associated(cgrid%dmean_atm_prss )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_atm_prss & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_PRSS_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Air pressure: Atmosphere' & + ,'[ Pa]','(ipoly)' ) + end if + if (associated(cgrid%dmean_atm_co2 )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_atm_co2 & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_CO2_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - CO2 mixing ratio: Atmosphere' & + ,'[ umol/mol]','(ipoly)' ) + end if + if (associated(cgrid%dmean_pcpg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_pcpg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_PCPG_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Precipitation rate' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%dmean_qpcpg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_qpcpg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_QPCPG_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Energy gain - rain' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%dmean_dpcpg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_dpcpg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_DPCPG_PY :11:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Precipitation depth' & + ,'[ m]','(ipoly)' ) end if + !------------------------------------------------------------------------------------! - if (associated(cgrid%avg_soil_energy)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_soil_energy,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_SOIL_ENERGY :12:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Volumetric Soil Water','[m/m]','ipoly - nzg') - end if - - if (associated(cgrid%avg_soil_water)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_soil_water,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_SOIL_WATER :12:hist:anal:opti') - call metadata_edio(nvar,igr,'Polygon Average Volumetric Soil Water','[m/m]','ipoly - nzg') - end if - - if (associated(cgrid%avg_soil_mstpot)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_soil_mstpot,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_SOIL_MSTPOT :12:hist:anal:opti') - call metadata_edio(nvar,igr,'Polygon Average Soil Moisture Potential','[m]','ipoly - nzg') - end if - - if (associated(cgrid%avg_soil_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_soil_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_SOIL_TEMP :12:hist:anal:opti') - call metadata_edio(nvar,igr,'Polygon Average Soil Temperature','[K]','ipoly - nzg') - end if + return + end subroutine filltab_edtype_p11dmean + !=======================================================================================! + !=======================================================================================! - if (associated(cgrid%avg_soil_fracliq)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_soil_fracliq,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_SOIL_FRACLIQ :12:hist:anal') - call metadata_edio(nvar,igr,'Polygon Average Soil Fraction Liquid','[proportion]','ipoly - nzg') - end if - - if (associated(cgrid%avg_soil_rootfrac)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_soil_rootfrac,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'POLY_SOIL_ROOTFRAC :12:hist:mont:year') - call metadata_edio(nvar,igr,'Polygon Average Root Fraction','[pdf]','ipoly - nzg') - end if - if(associated(cgrid%dmean_soil_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_soil_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_SOIL_TEMP :12:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + + + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the polygon-level variables ! + ! (edtype) that have one dimension and are real (type 11), and are monthly mean ! + ! variables. ! + !---------------------------------------------------------------------------------------! + subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine + + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(edtype), target :: cgrid + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! + + - if(associated(cgrid%dmean_soil_water)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_soil_water,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_SOIL_WATER :12:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + ! This is the 1-D block. All variables must have the number of points defined ! + ! by npts. ! + !------------------------------------------------------------------------------------! + npts = cgrid%npolygons + + if (associated(cgrid%mmean_gpp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_gpp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_GPP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Gross primary productivity' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%mmean_npp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_npp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_NPP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Net primary productivity' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%mmean_leaf_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_leaf_resp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_LEAF_RESP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Leaf respiration' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%mmean_root_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_root_resp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ROOT_RESP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Root respiration' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%mmean_growth_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_growth_resp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_GROWTH_RESP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Growth respiration' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%mmean_storage_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_storage_resp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_STORAGE_RESP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Storage respiration' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%mmean_vleaf_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_vleaf_resp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_VLEAF_RESP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Virtual leaf respiration' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%mmean_plresp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_plresp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_PLRESP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Plant respiration' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%mmean_leaf_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_leaf_energy & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_LEAF_ENERGY_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Leaf internal energy' & + ,'[ J/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_leaf_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_leaf_water & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_LEAF_WATER_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Leaf surface water' & + ,'[ kg/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_leaf_hcap )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_leaf_hcap & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_LEAF_HCAP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Leaf heat capacity' & + ,'[ J/m2/K]','(ipoly)' ) + end if + if (associated(cgrid%mmean_leaf_vpdef )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_leaf_vpdef & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_LEAF_VPDEF_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Leaf vapour pressure deficit' & + ,'[ Pa]','(ipoly)' ) + end if + if (associated(cgrid%mmean_leaf_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_leaf_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_LEAF_TEMP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Leaf temperature' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%mmean_leaf_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_leaf_fliq & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_LEAF_FLIQ_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Liquid fraction' & + ,'[ --]','(ipoly)' ) + end if + if (associated(cgrid%mmean_leaf_gsw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_leaf_gsw & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_LEAF_GSW_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Stomatal conductance' & + ,'[kg/m2leaf/s]','(ipoly)' ) + end if + if (associated(cgrid%mmean_leaf_gbw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_leaf_gbw & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_LEAF_GBW_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Leaf boundary layer conductance' & + ,'[kg/m2leaf/s]','(ipoly)' ) + end if + if (associated(cgrid%mmean_wood_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_wood_energy & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_WOOD_ENERGY_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Wood internal energy' & + ,'[ J/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_wood_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_wood_water & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_WOOD_WATER_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Wood surface water' & + ,'[ kg/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_wood_hcap )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_wood_hcap & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_WOOD_HCAP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Wood heat capacity' & + ,'[ J/m2/K]','(ipoly)' ) + end if + if (associated(cgrid%mmean_wood_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_wood_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_WOOD_TEMP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Wood temperature' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%mmean_wood_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_wood_fliq & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_WOOD_FLIQ_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Liquid fraction' & + ,'[ --]','(ipoly)' ) + end if + if (associated(cgrid%mmean_wood_gbw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_wood_gbw & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_WOOD_GBW_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Wood boundary layer conductance' & + ,'[kg/m2wood/s]','(ipoly)' ) + end if + if (associated(cgrid%mmean_fs_open )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_fs_open & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_FS_OPEN_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Net stress factor' & + ,'[ --]','(ipoly)' ) + end if + if (associated(cgrid%mmean_fsw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_fsw & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_FSW_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Moisture stress' & + ,'[ --]','(ipoly)' ) + end if + if (associated(cgrid%mmean_fsn )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_fsn & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_FSN_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Nitrogen stress' & + ,'[ --]','(ipoly)' ) + end if + if (associated(cgrid%mmean_psi_open )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_psi_open & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_PSI_OPEN_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Transpiration with no stress' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%mmean_psi_closed )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_psi_closed & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_PSI_CLOSED_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Transpiration at maximum stress' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%mmean_water_supply )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_water_supply & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_WATER_SUPPLY_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Water supply' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%mmean_par_l )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_par_l & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_PAR_L_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - PAR absorbed by leaves' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_par_l_beam )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_par_l_beam & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_PAR_L_BEAM_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Direct PAR absorbed by leaves' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_par_l_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_par_l_diff & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_PAR_L_DIFF_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Diffuse PAR absorbed by leaves' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_rshort_l )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_rshort_l & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_RSHORT_L_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Shortwave radiation absorbed by leaves' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_rlong_l )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_rlong_l & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_RLONG_L_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Longwave radiation absorbed by leaves' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_sensible_lc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_sensible_lc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SENSIBLE_LC_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Sensible heat' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_vapor_lc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_vapor_lc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_VAPOR_LC_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Leaf evaporation' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%mmean_transp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_transp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_TRANSP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Leaf transpiration' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%mmean_intercepted_al )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_intercepted_al & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_INTERCEPTED_AL_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Leaf interception' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%mmean_wshed_lg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_wshed_lg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_WSHED_LG_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Leaf shedding' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%mmean_rshort_w )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_rshort_w & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_RSHORT_W_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Shortwave radiation absorbed by wood' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_rlong_w )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_rlong_w & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_RLONG_W_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Longwave radiation absorbed by wood' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_sensible_wc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_sensible_wc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SENSIBLE_WC_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Sensible heat' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_vapor_wc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_vapor_wc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_VAPOR_WC_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Wood evaporation' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%mmean_intercepted_aw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_intercepted_aw & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_INTERCEPTED_AW_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Wood interception' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%mmean_wshed_wg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_wshed_wg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_WSHED_WG_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Wood shedding' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%mmean_rh )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_rh & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_RH_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Heterotrophic respiration' & + ,'[ kg/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%mmean_cwd_rh )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_cwd_rh & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CWD_RH_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Coarse woody debris respiration' & + ,'[ kg/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%mmean_nep )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_nep & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_NEP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Net Ecosystem productivity' & + ,'[ kg/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%mmean_rk4step )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_rk4step & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_RK4STEP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - RK4 time step' & + ,'[ s]','(ipoly)' ) + end if + if (associated(cgrid%mmean_available_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_available_water & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_AVAILABLE_WATER_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Available water' & + ,'[ kg/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_can_theiv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_can_theiv & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CAN_THEIV_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Ice-vapour equiv. pot. temperature - CAS' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%mmean_can_theta )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_can_theta & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CAN_THETA_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Potential temperature - CAS' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%mmean_can_vpdef )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_can_vpdef & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CAN_VPDEF_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Vapour pressure deficit - CAS' & + ,'[ Pa]','(ipoly)' ) + end if + if (associated(cgrid%mmean_can_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_can_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CAN_TEMP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Temperature - CAS' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%mmean_can_shv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_can_shv & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CAN_SHV_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Specific humidity - CAS' & + ,'[ kg/kg]','(ipoly)' ) + end if + if (associated(cgrid%mmean_can_co2 )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_can_co2 & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CAN_CO2_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - CO2 mixing ratio - CAS' & + ,'[ umol/mol]','(ipoly)' ) + end if + if (associated(cgrid%mmean_can_rhos )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_can_rhos & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CAN_RHOS_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Air density - CAS' & + ,'[ kg/m3]','(ipoly)' ) + end if + if (associated(cgrid%mmean_can_prss )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_can_prss & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CAN_PRSS_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Pressure - CAS' & + ,'[ Pa]','(ipoly)' ) + end if + if (associated(cgrid%mmean_gnd_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_gnd_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_GND_TEMP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Ground temperature' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%mmean_gnd_shv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_gnd_shv & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_GND_SHV_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Ground specific humidity' & + ,'[ kg/kg]','(ipoly)' ) + end if + if (associated(cgrid%mmean_can_ggnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_can_ggnd & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CAN_GGND_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Net canopy conductance' & + ,'[ m/2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_sfcw_depth )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_sfcw_depth & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SFCW_DEPTH_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Depth - temporary water layer' & + ,'[ m]','(ipoly)' ) + end if + if (associated(cgrid%mmean_sfcw_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_sfcw_energy & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SFCW_ENERGY_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Internal energy - temporary water layer' & + ,'[ J/kg]','(ipoly)' ) + end if + if (associated(cgrid%mmean_sfcw_mass )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_sfcw_mass & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SFCW_MASS_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Water mass - temporary water layer' & + ,'[ kg/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_sfcw_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_sfcw_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SFCW_TEMP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Temperature - temporary water layer' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%mmean_sfcw_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_sfcw_fliq & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SFCW_FLIQ_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Liquid fraction - temporary water layer' & + ,'[ --]','(ipoly)' ) + end if + if (associated(cgrid%mmean_rshort_gnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_rshort_gnd & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_RSHORT_GND_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Shortwave radiation absorbed by ground' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_par_gnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_par_gnd & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_PAR_GND_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - PAR absorbed by ground' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_rlong_gnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_rlong_gnd & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_RLONG_GND_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Longwave radiation absorbed by ground' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_rlongup )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_rlongup & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_RLONGUP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Outgoing longwave radiation' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_parup )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_parup & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_PARUP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Outgoing PAR' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_nirup )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_nirup & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_NIRUP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Outgoing near infra-red radiation' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_rshortup )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_rshortup & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_RSHORTUP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Outgoing shortwave radiation' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_rnet )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_rnet & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_RNET_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Net radiation at top of canopy' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_albedo )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_albedo & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ALBEDO_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Albedo' & + ,'[ ----]','(ipoly)' ) + end if + if (associated(cgrid%mmean_albedo_beam )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_albedo_beam & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ALBEDO_BEAM_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Albedo - direct radiation' & + ,'[ ----]','(ipoly)' ) + end if + if (associated(cgrid%mmean_albedo_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_albedo_diff & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ALBEDO_DIFF_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Albedo - diffuse radiation' & + ,'[ ----]','(ipoly)' ) + end if + if (associated(cgrid%mmean_rlong_albedo )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_rlong_albedo & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_RLONG_ALBEDO_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Kind of albedo - longwave radiation' & + ,'[ ----]','(ipoly)' ) + end if + if (associated(cgrid%mmean_ustar )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_ustar & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_USTAR_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Friction velocity' & + ,'[ m/s]','(ipoly)' ) + end if + if (associated(cgrid%mmean_tstar )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_tstar & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_TSTAR_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Gradient scale for potential temperature' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%mmean_qstar )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_qstar & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_QSTAR_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Gradient scale for specific humidity' & + ,'[ kg/kg]','(ipoly)' ) + end if + if (associated(cgrid%mmean_cstar )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_cstar & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CSTAR_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Gradient scale for CO2 mixing ratio' & + ,'[ umol/mol]','(ipoly)' ) + end if + if (associated(cgrid%mmean_carbon_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_carbon_ac & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CARBON_AC_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - CO2 flux: atmosphere -> CAS' & + ,'[ umol/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%mmean_carbon_st )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_carbon_st & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CARBON_ST_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - CO2 storage at CAS' & + ,'[ umol/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%mmean_vapor_gc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_vapor_gc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_VAPOR_GC_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Water vapour flux: ground -> CAS' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%mmean_vapor_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_vapor_ac & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_VAPOR_AC_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Water vapour flux: atmosphere -> CAS' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%mmean_throughfall )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_throughfall & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_THROUGHFALL_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Throughfall rate' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%mmean_runoff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_runoff & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_RUNOFF_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Water runoff' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%mmean_drainage )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_drainage & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_DRAINAGE_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Water drainage' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%mmean_sensible_gc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_sensible_gc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SENSIBLE_GC_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Sensible heat flux: ground -> CAS' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_sensible_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_sensible_ac & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SENSIBLE_AC_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Sensible heat flux: atmosphere -> CAS' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_qthroughfall )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_qthroughfall & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_QTHROUGHFALL_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Throughfall rate' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_qrunoff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_qrunoff & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_QRUNOFF_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Surface runoff' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_qdrainage )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_qdrainage & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_QDRAINAGE_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Drainage energy loss' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_nppleaf )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_nppleaf & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_NPPLEAF_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Net primary productivity - Leaf' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%mmean_nppfroot )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_nppfroot & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_NPPFROOT_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Net primary productivity - Fine root' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%mmean_nppsapwood )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_nppsapwood & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_NPPSAPWOOD_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Net primary productivity - Sap wood' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%mmean_nppcroot )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_nppcroot & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_NPPCROOT_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Net primary productivity - Coarse root' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%mmean_nppseeds )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_nppseeds & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_NPPSEEDS_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Net primary productivity - seeds' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%mmean_nppwood )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_nppwood & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_NPPWOOD_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Net primary productivity - heart wood' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%mmean_nppdaily )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_nppdaily & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_NPPDAILY_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Net primary productivity - total' & + ,'[ kgC/m2/yr]','(ipoly)' ) + end if + if (associated(cgrid%mmean_A_decomp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_A_decomp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_A_DECOMP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Decomposition scale' & + ,'[ --]','(ipoly)' ) + end if + if (associated(cgrid%mmean_Af_decomp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_Af_decomp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_AF_DECOMP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Decomposition scale with N immobilisation' & + ,'[ --]','(ipoly)' ) + end if + if (associated(cgrid%mmean_co2_residual )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_co2_residual & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CO2_RESIDUAL_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Budget check - CO2 residual' & + ,'[ umol/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_energy_residual )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_energy_residual & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ENERGY_RESIDUAL_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Budget check - Enthalpy residual' & + ,'[ J/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_water_residual )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_water_residual & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_WATER_RESIDUAL_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Budget check - Water residual' & + ,'[ kg/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_atm_theiv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_atm_theiv & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_THEIV_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Ice-vapour equiv. pot. temp.: Atmosphere' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%mmean_atm_theta )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_atm_theta & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_THETA_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Potential temperature: Atmosphere' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%mmean_atm_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_atm_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_TEMP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Temperature: Atmosphere' & + ,'[ K]','(ipoly)' ) + end if + if (associated(cgrid%mmean_atm_vpdef )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_atm_vpdef & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_VPDEF_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Vapour pressure deficit: Atmosphere' & + ,'[ Pa]','(ipoly)' ) + end if + if (associated(cgrid%mmean_atm_shv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_atm_shv & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_SHV_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Specific humidity: Atmosphere' & + ,'[ kg/kg]','(ipoly)' ) + end if + if (associated(cgrid%mmean_atm_rshort )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_atm_rshort & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_RSHORT_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Shortwave radiation: Atmosphere' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_atm_rshort_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_atm_rshort_diff & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_RSHORT_DIFF_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Diffuse SW radiation: Atmosphere' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_atm_par )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_atm_par & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_PAR_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - PAR: Atmosphere' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_atm_par_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_atm_par_diff & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_PAR_DIFF_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Diffuse PAR: Atmosphere' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_atm_rlong )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_atm_rlong & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_RLONG_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Longwave radiation: Atmosphere' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_atm_vels )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_atm_vels & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_VELS_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Wind speed: atmosphere' & + ,'[ m/s]','(ipoly)' ) + end if + if (associated(cgrid%mmean_atm_rhos )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_atm_rhos & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_RHOS_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Air density: Atmosphere' & + ,'[ kg/m3]','(ipoly)' ) + end if + if (associated(cgrid%mmean_atm_prss )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_atm_prss & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_PRSS_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Air pressure: Atmosphere' & + ,'[ Pa]','(ipoly)' ) + end if + if (associated(cgrid%mmean_atm_co2 )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_atm_co2 & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_CO2_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - CO2 mixing ratio: Atmosphere' & + ,'[ umol/mol]','(ipoly)' ) + end if + if (associated(cgrid%mmean_pcpg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_pcpg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_PCPG_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Precipitation rate' & + ,'[ kg/m2/s]','(ipoly)' ) + end if + if (associated(cgrid%mmean_qpcpg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_qpcpg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_QPCPG_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Energy gain - rain' & + ,'[ W/m2]','(ipoly)' ) + end if + if (associated(cgrid%mmean_dpcpg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_dpcpg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_DPCPG_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Precipitation depth' & + ,'[ m]','(ipoly)' ) + end if + if(associated(cgrid%mmean_fast_soil_c )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%mmean_fast_soil_c & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_FAST_SOIL_C_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr,'Monthly mean - Soil Carbon (Fast pool)' & + ,'[kgC/m2]','(ipoly)') end if - - if(associated(cgrid%dmean_soil_mstpot)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_soil_mstpot,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_SOIL_MSTPOT :12:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + if(associated(cgrid%mmean_slow_soil_c )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%mmean_slow_soil_c & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SLOW_SOIL_C_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr,'Monthly mean - Soil Carbon (Slow pool)' & + ,'[kgC/m2]','(ipoly)') end if - - if(associated(cgrid%dmean_transloss)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_transloss,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_TRANSLOSS :12:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + if(associated(cgrid%mmean_struct_soil_c )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%mmean_struct_soil_c & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_STRUCT_SOIL_C_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr,'Monthly mean - Soil Carbon (Structural pool)' & + ,'[kgC/m2]','(ipoly)') end if - - if(associated(cgrid%mmean_soil_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_soil_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_SOIL_TEMP :12:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + if(associated(cgrid%mmean_struct_soil_l )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%mmean_struct_soil_l & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_STRUCT_SOIL_L_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr,'Monthly mean - Soil Lignin (Structural pool)' & + ,'[kgC/m2]','(ipoly)') end if - - if(associated(cgrid%mmean_soil_water)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_soil_water,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_SOIL_WATER :12:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + if(associated(cgrid%mmean_cwd_c )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%mmean_cwd_c & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CWD_C_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr,'Monthly mean - Coarse woody debris' & + ,'[kgC/m2]','(ipoly)') end if - - if(associated(cgrid%mmean_soil_mstpot)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_soil_mstpot,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_SOIL_MSTPOT :12:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + if(associated(cgrid%mmean_fast_soil_n )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%mmean_fast_soil_n & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_FAST_SOIL_N_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr,'Monthly mean - Soil Nitrogen (Fast pool)' & + ,'[kgN/m2]','(ipoly)') end if - - if(associated(cgrid%mmean_transloss)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_transloss,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_TRANSLOSS :12:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + if(associated(cgrid%mmean_mineral_soil_n )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%mmean_mineral_soil_n & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_MINERAL_SOIL_N_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr,'Monthly mean - Soil Nitrogen (Mineralised pool)' & + ,'[kgN/m2]','(ipoly)') + end if + if(associated(cgrid%mmean_cwd_n )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%mmean_cwd_n & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CWD_N_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr,'Monthly mean - Coarse woody debris nitrogen' & + ,'[kgN/m2]','(ipoly)') + end if + if (associated(cgrid%mmsqu_gpp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmsqu_gpp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_GPP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Gross primary productivity' & + ,'[kgC2/m4/yr2]','(ipoly)' ) + end if + if (associated(cgrid%mmsqu_npp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmsqu_npp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_NPP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Net primary productivity' & + ,'[kgC2/m4/yr2]','(ipoly)' ) + end if + if (associated(cgrid%mmsqu_plresp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmsqu_plresp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_PLRESP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Plant respiration' & + ,'[kgC2/m4/yr2]','(ipoly)' ) + end if + if (associated(cgrid%mmsqu_sensible_lc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmsqu_sensible_lc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_SENSIBLE_LC_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Sensible heat' & + ,'[ W2/m4]','(ipoly)' ) + end if + if (associated(cgrid%mmsqu_vapor_lc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmsqu_vapor_lc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_VAPOR_LC_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Leaf evaporation' & + ,'[ kg2/m4/s2]','(ipoly)' ) + end if + if (associated(cgrid%mmsqu_transp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmsqu_transp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_TRANSP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Leaf transpiration' & + ,'[ kg2/m4/s2]','(ipoly)' ) + end if + if (associated(cgrid%mmsqu_sensible_wc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmsqu_sensible_wc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_SENSIBLE_WC_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Sensible heat' & + ,'[ W2/m4]','(ipoly)' ) + end if + if (associated(cgrid%mmsqu_vapor_wc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmsqu_vapor_wc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_VAPOR_WC_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Wood evaporation' & + ,'[ kg2/m4/s2]','(ipoly)' ) + end if + if (associated(cgrid%mmsqu_rh )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmsqu_rh & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_RH_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Heterotrophic respiration' & + ,'[ kg2/m4/yr2]','(ipoly)' ) + end if + if (associated(cgrid%mmsqu_cwd_rh )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmsqu_cwd_rh & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_CWD_RH_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Coarse woody debris respiration' & + ,'[ kg2/m4/yr2]','(ipoly)' ) + end if + if (associated(cgrid%mmsqu_nep )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmsqu_nep & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_NEP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Net Ecosystem productivity' & + ,'[ kg2/m4/yr2]','(ipoly)' ) + end if + if (associated(cgrid%mmsqu_rlongup )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmsqu_rlongup & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_RLONGUP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Outgoing longwave radiation' & + ,'[ W2/m4]','(ipoly)' ) + end if + if (associated(cgrid%mmsqu_parup )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmsqu_parup & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_PARUP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Outgoing PAR' & + ,'[ W2/m4]','(ipoly)' ) + end if + if (associated(cgrid%mmsqu_nirup )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmsqu_nirup & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_NIRUP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Outgoing near infra-red radiation' & + ,'[ W2/m4]','(ipoly)' ) + end if + if (associated(cgrid%mmsqu_rshortup )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmsqu_rshortup & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_RSHORTUP_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Outgoing shortwave radiation' & + ,'[ W2/m4]','(ipoly)' ) + end if + if (associated(cgrid%mmsqu_rnet )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmsqu_rnet & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_RNET_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Net radiation at top of canopy' & + ,'[ W2/m4]','(ipoly)' ) + end if + if (associated(cgrid%mmsqu_albedo )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmsqu_albedo & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_ALBEDO_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Albedo' & + ,'[ ----]','(ipoly)' ) + end if + if (associated(cgrid%mmsqu_ustar )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmsqu_ustar & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_USTAR_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Friction velocity' & + ,'[ m2/s2]','(ipoly)' ) + end if + if (associated(cgrid%mmsqu_carbon_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmsqu_carbon_ac & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_CARBON_AC_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - CO2 flux: atmosphere -> CAS' & + ,'[umol2/m4/s2]','(ipoly)' ) + end if + if (associated(cgrid%mmsqu_carbon_st )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmsqu_carbon_st & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_CARBON_ST_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - CO2 storage at CAS' & + ,'[umol2/m4/s2]','(ipoly)' ) + end if + if (associated(cgrid%mmsqu_vapor_gc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmsqu_vapor_gc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_VAPOR_GC_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Water vapour flux: ground -> CAS' & + ,'[ kg2/m4/s2]','(ipoly)' ) + end if + if (associated(cgrid%mmsqu_vapor_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmsqu_vapor_ac & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_VAPOR_AC_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Water vapour flux: atmosphere -> CAS' & + ,'[ kg2/m4/s2]','(ipoly)' ) + end if + if (associated(cgrid%mmsqu_sensible_gc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmsqu_sensible_gc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_SENSIBLE_GC_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Sensible heat flux: ground -> CAS' & + ,'[ W2/m4]','(ipoly)' ) + end if + if (associated(cgrid%mmsqu_sensible_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmsqu_sensible_ac & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_SENSIBLE_AC_PY :11:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Sensible heat flux: atmosphere -> CAS' & + ,'[ W2/m4]','(ipoly)' ) end if - - !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! - - return - end subroutine filltab_edtype_p12 + return + end subroutine filltab_edtype_p11mmean !=======================================================================================! !=======================================================================================! @@ -12270,9 +15278,9 @@ end subroutine filltab_edtype_p12 !=======================================================================================! !=======================================================================================! ! This routine will fill the pointer table with the polygon-level variables ! - ! (edtype) that have three dimensions (nzg,ndcycle,npolygons) and are real (type -12). ! + ! (edtype) that have two dimensions (ndcycle,npolygons) and are real (type -11). ! !---------------------------------------------------------------------------------------! - subroutine filltab_edtype_m12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) + subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) use ed_var_tables, only : vtable_edio_r & ! sub-routine , metadata_edio ! ! sub-routine @@ -12290,39 +15298,1226 @@ subroutine filltab_edtype_m12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva !------------------------------------------------------------------------------------! + + !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! - ! This is the 3-D block, with soil depth class and diurnal cycle. All vari- ! - ! ables must have the number of points defined by npts. ! + ! This is the 2-D block, with diurnal cycle. All variables must have the number ! + ! of points defined by npts. ! !------------------------------------------------------------------------------------! - npts = cgrid%npolygons * nzg * ndcycle - - if(associated(cgrid%qmean_soil_temp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_soil_temp,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_SOIL_TEMP :-12:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%qmean_soil_water)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_soil_water,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_SOIL_WATER :-12:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%qmean_soil_mstpot)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%qmean_soil_mstpot,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_SOIL_MSTPOT :-12:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + npts = cgrid%npolygons * ndcycle + if (associated(cgrid%qmean_gpp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_gpp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_GPP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Gross primary productivity' & + ,'[ kgC/m2/yr]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_npp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_npp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_NPP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Net primary productivity' & + ,'[ kgC/m2/yr]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_leaf_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_leaf_resp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_LEAF_RESP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Leaf respiration' & + ,'[ kgC/m2/yr]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_root_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_root_resp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ROOT_RESP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Root respiration' & + ,'[ kgC/m2/yr]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_growth_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_growth_resp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_GROWTH_RESP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Growth respiration' & + ,'[ kgC/m2/yr]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_storage_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_storage_resp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_STORAGE_RESP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Storage respiration' & + ,'[ kgC/m2/yr]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_vleaf_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_vleaf_resp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_VLEAF_RESP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Virtual leaf respiration' & + ,'[ kgC/m2/yr]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_plresp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_plresp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_PLRESP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Plant respiration' & + ,'[ kgC/m2/yr]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_leaf_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_leaf_energy & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_LEAF_ENERGY_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Leaf internal energy' & + ,'[ J/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_leaf_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_leaf_water & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_LEAF_WATER_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Leaf surface water' & + ,'[ kg/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_leaf_hcap )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_leaf_hcap & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_LEAF_HCAP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Leaf heat capacity' & + ,'[ J/m2/K]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_leaf_vpdef )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_leaf_vpdef & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_LEAF_VPDEF_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Leaf vapour pressure deficit' & + ,'[ Pa]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_leaf_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_leaf_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_LEAF_TEMP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Leaf temperature' & + ,'[ K]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_leaf_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_leaf_fliq & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_LEAF_FLIQ_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Liquid fraction' & + ,'[ --]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_leaf_gsw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_leaf_gsw & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_LEAF_GSW_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Stomatal conductance' & + ,'[kg/m2leaf/s]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_leaf_gbw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_leaf_gbw & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_LEAF_GBW_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Leaf boundary layer conductance' & + ,'[kg/m2leaf/s]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_wood_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_wood_energy & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_WOOD_ENERGY_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Wood internal energy' & + ,'[ J/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_wood_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_wood_water & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_WOOD_WATER_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Wood surface water' & + ,'[ kg/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_wood_hcap )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_wood_hcap & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_WOOD_HCAP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Wood heat capacity' & + ,'[ J/m2/K]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_wood_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_wood_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_WOOD_TEMP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Wood temperature' & + ,'[ K]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_wood_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_wood_fliq & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_WOOD_FLIQ_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Liquid fraction' & + ,'[ --]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_wood_gbw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_wood_gbw & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_WOOD_GBW_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Wood boundary layer conductance' & + ,'[kg/m2wood/s]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_fs_open )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_fs_open & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_FS_OPEN_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Net stress factor' & + ,'[ --]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_fsw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_fsw & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_FSW_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Moisture stress' & + ,'[ --]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_fsn )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_fsn & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_FSN_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Nitrogen stress' & + ,'[ --]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_psi_open )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_psi_open & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_PSI_OPEN_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Transpiration with no stress' & + ,'[ kg/m2/s]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_psi_closed )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_psi_closed & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_PSI_CLOSED_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Transpiration at maximum stress' & + ,'[ kg/m2/s]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_water_supply )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_water_supply & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_WATER_SUPPLY_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Water supply' & + ,'[ kg/m2/s]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_par_l )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_par_l & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_PAR_L_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - PAR absorbed by leaves' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_par_l_beam )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_par_l_beam & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_PAR_L_BEAM_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Direct PAR absorbed by leaves' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_par_l_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_par_l_diff & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_PAR_L_DIFF_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Diffuse PAR absorbed by leaves' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_rshort_l )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_rshort_l & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_RSHORT_L_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Shortwave radiation absorbed by leaves' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_rlong_l )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_rlong_l & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_RLONG_L_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Longwave radiation absorbed by leaves' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_sensible_lc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_sensible_lc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SENSIBLE_LC_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Sensible heat' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_vapor_lc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_vapor_lc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_VAPOR_LC_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Leaf evaporation' & + ,'[ kg/m2/s]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_transp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_transp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_TRANSP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Leaf transpiration' & + ,'[ kg/m2/s]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_intercepted_al )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_intercepted_al & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_INTERCEPTED_AL_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Leaf interception' & + ,'[ kg/m2/s]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_wshed_lg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_wshed_lg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_WSHED_LG_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Leaf shedding' & + ,'[ kg/m2/s]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_rshort_w )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_rshort_w & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_RSHORT_W_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Shortwave radiation absorbed by wood' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_rlong_w )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_rlong_w & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_RLONG_W_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Longwave radiation absorbed by wood' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_sensible_wc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_sensible_wc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SENSIBLE_WC_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Sensible heat' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_vapor_wc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_vapor_wc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_VAPOR_WC_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Wood evaporation' & + ,'[ kg/m2/s]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_intercepted_aw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_intercepted_aw & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_INTERCEPTED_AW_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Wood interception' & + ,'[ kg/m2/s]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_wshed_wg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_wshed_wg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_WSHED_WG_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Wood shedding' & + ,'[ kg/m2/s]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_rh )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_rh & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_RH_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Heterotrophic respiration' & + ,'[ kg/m2/yr]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_cwd_rh )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_cwd_rh & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_CWD_RH_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Coarse woody debris respiration' & + ,'[ kg/m2/yr]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_nep )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_nep & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_NEP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Net Ecosystem productivity' & + ,'[ kg/m2/yr]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_rk4step )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_rk4step & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_RK4STEP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - RK4 time step' & + ,'[ s]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_available_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_available_water & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_AVAILABLE_WATER_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Available water' & + ,'[ kg/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_can_theiv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_can_theiv & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_CAN_THEIV_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Ice-vapour equiv. pot. temperature - CAS' & + ,'[ K]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_can_theta )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_can_theta & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_CAN_THETA_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Potential temperature - CAS' & + ,'[ K]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_can_vpdef )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_can_vpdef & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_CAN_VPDEF_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Vapour pressure deficit - CAS' & + ,'[ Pa]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_can_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_can_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_CAN_TEMP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Temperature - CAS' & + ,'[ K]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_can_shv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_can_shv & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_CAN_SHV_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Specific humidity - CAS' & + ,'[ kg/kg]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_can_co2 )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_can_co2 & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_CAN_CO2_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - CO2 mixing ratio - CAS' & + ,'[ umol/mol]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_can_rhos )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_can_rhos & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_CAN_RHOS_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Air density - CAS' & + ,'[ kg/m3]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_can_prss )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_can_prss & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_CAN_PRSS_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Pressure - CAS' & + ,'[ Pa]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_gnd_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_gnd_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_GND_TEMP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Ground temperature' & + ,'[ K]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_gnd_shv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_gnd_shv & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_GND_SHV_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Ground specific humidity' & + ,'[ kg/kg]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_can_ggnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_can_ggnd & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_CAN_GGND_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Net canopy conductance' & + ,'[ m/2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_sfcw_depth )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_sfcw_depth & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SFCW_DEPTH_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Depth - temporary water layer' & + ,'[ m]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_sfcw_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_sfcw_energy & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SFCW_ENERGY_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Internal energy - temporary water layer' & + ,'[ J/kg]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_sfcw_mass )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_sfcw_mass & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SFCW_MASS_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Water mass - temporary water layer' & + ,'[ kg/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_sfcw_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_sfcw_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SFCW_TEMP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Temperature - temporary water layer' & + ,'[ K]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_sfcw_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_sfcw_fliq & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SFCW_FLIQ_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Liquid fraction - temporary water layer' & + ,'[ --]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_rshort_gnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_rshort_gnd & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_RSHORT_GND_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Shortwave radiation absorbed by ground' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_par_gnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_par_gnd & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_PAR_GND_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - PAR absorbed by ground' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_rlong_gnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_rlong_gnd & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_RLONG_GND_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Longwave radiation absorbed by ground' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_rlongup )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_rlongup & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_RLONGUP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Outgoing longwave radiation' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_parup )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_parup & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_PARUP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Outgoing PAR' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_nirup )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_nirup & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_NIRUP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Outgoing near infra-red radiation' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_rshortup )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_rshortup & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_RSHORTUP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Outgoing shortwave radiation' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_rnet )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_rnet & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_RNET_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Net radiation at top of canopy' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_albedo )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_albedo & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ALBEDO_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Albedo' & + ,'[ ----]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_albedo_beam )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_albedo_beam & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ALBEDO_BEAM_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Albedo - direct radiation' & + ,'[ ----]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_albedo_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_albedo_diff & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ALBEDO_DIFF_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Albedo - diffuse radiation' & + ,'[ ----]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_rlong_albedo )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_rlong_albedo & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_RLONG_ALBEDO_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Kind of albedo - longwave radiation' & + ,'[ ----]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_ustar )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_ustar & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_USTAR_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Friction velocity' & + ,'[ m/s]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_tstar )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_tstar & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_TSTAR_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Gradient scale for potential temperature' & + ,'[ K]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_qstar )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_qstar & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_QSTAR_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Gradient scale for specific humidity' & + ,'[ kg/kg]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_cstar )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_cstar & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_CSTAR_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Gradient scale for CO2 mixing ratio' & + ,'[ umol/mol]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_carbon_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_carbon_ac & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_CARBON_AC_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - CO2 flux: atmosphere -> CAS' & + ,'[ umol/m2/s]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_carbon_st )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_carbon_st & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_CARBON_ST_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - CO2 storage at CAS' & + ,'[ umol/m2/s]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_vapor_gc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_vapor_gc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_VAPOR_GC_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Water vapour flux: ground -> CAS' & + ,'[ kg/m2/s]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_vapor_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_vapor_ac & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_VAPOR_AC_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Water vapour flux: atmosphere -> CAS' & + ,'[ kg/m2/s]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_throughfall )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_throughfall & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_THROUGHFALL_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Throughfall rate' & + ,'[ kg/m2/s]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_runoff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_runoff & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_RUNOFF_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Water runoff' & + ,'[ kg/m2/s]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_drainage )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_drainage & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_DRAINAGE_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Water drainage' & + ,'[ kg/m2/s]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_sensible_gc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_sensible_gc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SENSIBLE_GC_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Sensible heat flux: ground -> CAS' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_sensible_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_sensible_ac & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SENSIBLE_AC_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Sensible heat flux: atmosphere -> CAS' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_qthroughfall )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_qthroughfall & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_QTHROUGHFALL_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Throughfall rate' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_qrunoff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_qrunoff & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_QRUNOFF_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Surface runoff' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_qdrainage )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_qdrainage & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_QDRAINAGE_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Drainage energy loss' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_atm_theiv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_atm_theiv & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_THEIV_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Ice-vapour equiv. pot. temp.: Atmosphere' & + ,'[ K]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_atm_theta )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_atm_theta & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_THETA_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Potential temperature: Atmosphere' & + ,'[ K]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_atm_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_atm_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_TEMP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Temperature: Atmosphere' & + ,'[ K]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_atm_vpdef )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_atm_vpdef & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_VPDEF_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Vapour pressure deficit: Atmosphere' & + ,'[ Pa]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_atm_shv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_atm_shv & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_SHV_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Specific humidity: Atmosphere' & + ,'[ kg/kg]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_atm_rshort )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_atm_rshort & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_RSHORT_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Shortwave radiation: Atmosphere' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_atm_rshort_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_atm_rshort_diff & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_RSHORT_DIFF_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Diffuse SW radiation: Atmosphere' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_atm_par )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_atm_par & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_PAR_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - PAR: Atmosphere' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_atm_par_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_atm_par_diff & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_PAR_DIFF_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Diffuse PAR: Atmosphere' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_atm_rlong )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_atm_rlong & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_RLONG_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Longwave radiation: Atmosphere' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_atm_vels )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_atm_vels & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_VELS_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Wind speed: atmosphere' & + ,'[ m/s]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_atm_rhos )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_atm_rhos & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_RHOS_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Air density: Atmosphere' & + ,'[ kg/m3]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_atm_prss )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_atm_prss & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_PRSS_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Air pressure: Atmosphere' & + ,'[ Pa]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_atm_co2 )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_atm_co2 & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_CO2_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - CO2 mixing ratio: Atmosphere' & + ,'[ umol/mol]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_pcpg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_pcpg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_PCPG_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Precipitation rate' & + ,'[ kg/m2/s]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_qpcpg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_qpcpg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_QPCPG_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Energy gain - rain' & + ,'[ W/m2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmean_dpcpg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_dpcpg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_DPCPG_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Precipitation depth' & + ,'[ m]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmsqu_gpp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmsqu_gpp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_GPP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Gross primary productivity' & + ,'[kgC2/m4/yr2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmsqu_npp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmsqu_npp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_NPP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Net primary productivity' & + ,'[kgC2/m4/yr2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmsqu_plresp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmsqu_plresp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_PLRESP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Plant respiration' & + ,'[kgC2/m4/yr2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmsqu_sensible_lc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmsqu_sensible_lc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_SENSIBLE_LC_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Sensible heat' & + ,'[ W2/m4]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmsqu_vapor_lc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmsqu_vapor_lc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_VAPOR_LC_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Leaf evaporation' & + ,'[ kg2/m4/s2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmsqu_transp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmsqu_transp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_TRANSP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Leaf transpiration' & + ,'[ kg2/m4/s2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmsqu_sensible_wc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmsqu_sensible_wc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_SENSIBLE_WC_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Sensible heat' & + ,'[ W2/m4]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmsqu_vapor_wc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmsqu_vapor_wc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_VAPOR_WC_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Wood evaporation' & + ,'[ kg2/m4/s2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmsqu_rh )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmsqu_rh & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_RH_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Heterotrophic respiration' & + ,'[ kg2/m4/yr2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmsqu_cwd_rh )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmsqu_cwd_rh & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_CWD_RH_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Coarse woody debris respiration' & + ,'[ kg2/m4/yr2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmsqu_nep )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmsqu_nep & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_NEP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Net Ecosystem productivity' & + ,'[ kg2/m4/yr2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmsqu_rlongup )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmsqu_rlongup & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_RLONGUP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Outgoing longwave radiation' & + ,'[ W2/m4]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmsqu_parup )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmsqu_parup & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_PARUP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Outgoing PAR' & + ,'[ W2/m4]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmsqu_nirup )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmsqu_nirup & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_NIRUP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Outgoing near infra-red radiation' & + ,'[ W2/m4]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmsqu_rshortup )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmsqu_rshortup & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_RSHORTUP_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Outgoing shortwave radiation' & + ,'[ W2/m4]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmsqu_rnet )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmsqu_rnet & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_RNET_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Net radiation at top of canopy' & + ,'[ W2/m4]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmsqu_albedo )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmsqu_albedo & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_ALBEDO_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Albedo' & + ,'[ ----]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmsqu_ustar )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmsqu_ustar & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_USTAR_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Friction velocity' & + ,'[ m2/s2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmsqu_carbon_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmsqu_carbon_ac & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_CARBON_AC_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - CO2 flux: atmosphere -> CAS' & + ,'[umol2/m4/s2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmsqu_carbon_st )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmsqu_carbon_st & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_CARBON_ST_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - CO2 storage at CAS' & + ,'[umol2/m4/s2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmsqu_vapor_gc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmsqu_vapor_gc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_VAPOR_GC_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Water vapour flux: ground -> CAS' & + ,'[ kg2/m4/s2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmsqu_vapor_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmsqu_vapor_ac & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_VAPOR_AC_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Water vapour flux: atmosphere -> CAS' & + ,'[ kg2/m4/s2]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmsqu_sensible_gc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmsqu_sensible_gc & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_SENSIBLE_GC_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Sensible heat flux: ground -> CAS' & + ,'[ W2/m4]','(ndcycle,ipoly)' ) + end if + if (associated(cgrid%qmsqu_sensible_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmsqu_sensible_ac & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_SENSIBLE_AC_PY :-11:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Sensible heat flux: atmosphere -> CAS' & + ,'[ W2/m4]','(ndcycle,ipoly)' ) end if !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! return - end subroutine filltab_edtype_m12 + end subroutine filltab_edtype_m11 !=======================================================================================! !=======================================================================================! @@ -12334,9 +16529,9 @@ end subroutine filltab_edtype_m12 !=======================================================================================! !=======================================================================================! ! This routine will fill the pointer table with the polygon-level variables ! - ! (edtype) that have two dimensions (n_pft,npolygons) and are real (type 14). ! + ! (edtype) that have two dimensions (ndcycle,npolygons) and are real (type 12). ! !---------------------------------------------------------------------------------------! - subroutine filltab_edtype_p14(cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) + subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) use ed_var_tables, only : vtable_edio_r & ! sub-routine , metadata_edio ! ! sub-routine @@ -12354,70 +16549,235 @@ subroutine filltab_edtype_p14(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva !------------------------------------------------------------------------------------! - !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! - ! This is the 2-D block, with PFT class. All variables must have the number of ! - ! points defined by npts. ! + ! This is the 2-D block, with soil layers. All variables must have the number ! + ! of points defined by npts. ! !------------------------------------------------------------------------------------! - npts = cgrid%npolygons * n_pft - - - if(associated(cgrid%lai_pft)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%lai_pft,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'LAI_PFT :14:hist:anal:dail') - call metadata_edio(nvar,igr,'Leaf Area Index','[m2/m2]','NA') - end if - - if(associated(cgrid%wai_pft)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%wai_pft,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'WAI_PFT :14:hist:anal:dail') - call metadata_edio(nvar,igr,'Wood Area Index','[m2/m2]','NA') - end if - - if(associated(cgrid%mmean_lai_pft)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_lai_pft,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_LAI_PFT :14:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%mmean_wai_pft)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_wai_pft,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_WAI_PFT :14:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%bseeds_pft)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%bseeds_pft,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'BSEEDS_PFT :14:hist:dail:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if(associated(cgrid%agb_pft)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%agb_pft,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AGB_PFT :14:hist:dail:mont:dcyc') - call metadata_edio(nvar,igr,'Above-ground biomass by PFT','[kgC/m2]','NA') - end if - - if(associated(cgrid%ba_pft)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%ba_pft,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'BA_PFT :14:hist:dail:mont:dcyc') - call metadata_edio(nvar,igr,'Basal area by PFT','[cm2/m2]','NA') + npts = cgrid%npolygons * nzg + if (associated(cgrid%fmean_soil_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_soil_energy & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SOIL_ENERGY_PY :12:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Soil internal energy' & + ,'[ J/m3]','(nzg,ipoly)' ) + end if + if (associated(cgrid%fmean_soil_mstpot )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_soil_mstpot & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SOIL_MSTPOT_PY :12:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Soil matric potential' & + ,'[ m]','(nzg,ipoly)' ) + end if + if (associated(cgrid%fmean_soil_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_soil_water & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SOIL_WATER_PY :12:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Soil water content' & + ,'[ m3/m3]','(nzg,ipoly)' ) + end if + if (associated(cgrid%fmean_soil_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_soil_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SOIL_TEMP_PY :12:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Soil temperature' & + ,'[ K]','(nzg,ipoly)' ) + end if + if (associated(cgrid%fmean_soil_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_soil_fliq & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SOIL_FLIQ_PY :12:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Soil liquid fraction' & + ,'[ --]','(nzg,ipoly)' ) + end if + if (associated(cgrid%fmean_smoist_gg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_smoist_gg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SMOIST_GG_PY :12:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Soil water flux' & + ,'[ kg/m2/s]','(nzg,ipoly)' ) + end if + if (associated(cgrid%fmean_transloss )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_transloss & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_TRANSLOSS_PY :12:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Water loss through transpiration' & + ,'[ kg/m2/s]','(nzg,ipoly)' ) + end if + if (associated(cgrid%fmean_sensible_gg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%fmean_sensible_gg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SENSIBLE_GG_PY :12:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Soil heat flux' & + ,'[ W/m2]','(nzg,ipoly)' ) + end if + if (associated(cgrid%dmean_soil_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_soil_energy & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SOIL_ENERGY_PY :12:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Soil internal energy' & + ,'[ J/m3]','(nzg,ipoly)' ) + end if + if (associated(cgrid%dmean_soil_mstpot )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_soil_mstpot & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SOIL_MSTPOT_PY :12:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Soil matric potential' & + ,'[ m]','(nzg,ipoly)' ) + end if + if (associated(cgrid%dmean_soil_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_soil_water & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SOIL_WATER_PY :12:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Soil water content' & + ,'[ m3/m3]','(nzg,ipoly)' ) + end if + if (associated(cgrid%dmean_soil_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_soil_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SOIL_TEMP_PY :12:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Soil temperature' & + ,'[ K]','(nzg,ipoly)' ) + end if + if (associated(cgrid%dmean_soil_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_soil_fliq & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SOIL_FLIQ_PY :12:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Soil liquid fraction' & + ,'[ --]','(nzg,ipoly)' ) + end if + if (associated(cgrid%dmean_smoist_gg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_smoist_gg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SMOIST_GG_PY :12:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Soil water flux' & + ,'[ kg/m2/s]','(nzg,ipoly)' ) + end if + if (associated(cgrid%dmean_transloss )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_transloss & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_TRANSLOSS_PY :12:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Water loss through transpiration' & + ,'[ kg/m2/s]','(nzg,ipoly)' ) + end if + if (associated(cgrid%dmean_sensible_gg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%dmean_sensible_gg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SENSIBLE_GG_PY :12:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Soil heat flux' & + ,'[ W/m2]','(nzg,ipoly)' ) + end if + if (associated(cgrid%mmean_soil_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_soil_energy & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SOIL_ENERGY_PY :12:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Soil internal energy' & + ,'[ J/m3]','(nzg,ipoly)' ) + end if + if (associated(cgrid%mmean_soil_mstpot )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_soil_mstpot & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SOIL_MSTPOT_PY :12:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Soil matric potential' & + ,'[ m]','(nzg,ipoly)' ) + end if + if (associated(cgrid%mmean_soil_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_soil_water & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SOIL_WATER_PY :12:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Soil water content' & + ,'[ m3/m3]','(nzg,ipoly)' ) + end if + if (associated(cgrid%mmean_soil_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_soil_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SOIL_TEMP_PY :12:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Soil temperature' & + ,'[ K]','(nzg,ipoly)' ) + end if + if (associated(cgrid%mmean_soil_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_soil_fliq & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SOIL_FLIQ_PY :12:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Soil liquid fraction' & + ,'[ --]','(nzg,ipoly)' ) + end if + if (associated(cgrid%mmean_smoist_gg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_smoist_gg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SMOIST_GG_PY :12:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Soil water flux' & + ,'[ kg/m2/s]','(nzg,ipoly)' ) + end if + if (associated(cgrid%mmean_transloss )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_transloss & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_TRANSLOSS_PY :12:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Water loss through transpiration' & + ,'[ kg/m2/s]','(nzg,ipoly)' ) + end if + if (associated(cgrid%mmean_sensible_gg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%mmean_sensible_gg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SENSIBLE_GG_PY :12:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Soil heat flux' & + ,'[ W/m2]','(nzg,ipoly)' ) end if - !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! + return - end subroutine filltab_edtype_p14 + end subroutine filltab_edtype_p12 !=======================================================================================! !=======================================================================================! @@ -12429,9 +16789,9 @@ end subroutine filltab_edtype_p14 !=======================================================================================! !=======================================================================================! ! This routine will fill the pointer table with the polygon-level variables ! - ! (edtype) that have two dimensions (n_dbh,npolygons) and are real (type 16). ! + ! (edtype) that have three dimensions (nzg,ndcycle,npolygons) and are real (type -12). ! !---------------------------------------------------------------------------------------! - subroutine filltab_edtype_p16(cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) + subroutine filltab_edtype_m12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) use ed_var_tables, only : vtable_edio_r & ! sub-routine , metadata_edio ! ! sub-routine @@ -12449,33 +16809,86 @@ subroutine filltab_edtype_p16(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva !------------------------------------------------------------------------------------! - !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! - ! This is the 2-D block, with size (DBH) class. All variables must have the ! - ! number of points defined by npts. ! + ! This is the 3-D block, with soil depth class and diurnal cycle. All vari- ! + ! ables must have the number of points defined by npts. ! !------------------------------------------------------------------------------------! - npts = cgrid%npolygons * n_dbh - - if(associated(cgrid%dmean_gpp_dbh)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%dmean_gpp_dbh,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_GPP_DBH :16:hist:dail') - call metadata_edio(nvar,igr,'Polygon Averaged by DBH, Daily Integrated Gross Primary Production' & - ,'[kgC/m2/yr]','ipoly - ndbh') - end if - - if(associated(cgrid%mmean_gpp_dbh)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%mmean_gpp_dbh,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_GPP_DBH :16:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + npts = cgrid%npolygons * nzg * ndcycle + if (associated(cgrid%qmean_soil_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_soil_energy & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SOIL_ENERGY_PY :-12:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Soil internal energy' & + ,'[ J/m3]','(nzg,ndcycle,ipoly)') + end if + if (associated(cgrid%qmean_soil_mstpot )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_soil_mstpot & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SOIL_MSTPOT_PY :-12:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Soil matric potential' & + ,'[ m]','(nzg,ndcycle,ipoly)') + end if + if (associated(cgrid%qmean_soil_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_soil_water & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SOIL_WATER_PY :-12:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Soil water content' & + ,'[ m3/m3]','(nzg,ndcycle,ipoly)') + end if + if (associated(cgrid%qmean_soil_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_soil_temp & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SOIL_TEMP_PY :-12:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Soil temperature' & + ,'[ K]','(nzg,ndcycle,ipoly)') + end if + if (associated(cgrid%qmean_soil_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_soil_fliq & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SOIL_FLIQ_PY :-12:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Soil liquid fraction' & + ,'[ --]','(nzg,ndcycle,ipoly)') + end if + if (associated(cgrid%qmean_smoist_gg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_smoist_gg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SMOIST_GG_PY :-12:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Soil water flux' & + ,'[ kg/m2/s]','(nzg,ndcycle,ipoly)') + end if + if (associated(cgrid%qmean_transloss )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_transloss & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_TRANSLOSS_PY :-12:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Water loss through transpiration' & + ,'[ kg/m2/s]','(nzg,ndcycle,ipoly)') + end if + if (associated(cgrid%qmean_sensible_gg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cgrid%qmean_sensible_gg & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SENSIBLE_GG_PY :-12:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Soil heat flux' & + ,'[ W/m2]','(nzg,ndcycle,ipoly)') end if - !------------------------------------------------------------------------------------! - !------------------------------------------------------------------------------------! - return - end subroutine filltab_edtype_p16 + end subroutine filltab_edtype_m12 !=======================================================================================! !=======================================================================================! @@ -12515,9 +16928,11 @@ subroutine filltab_edtype_p19(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva if(associated(cgrid%workload)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%workload,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'WORKLOAD :19:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Disturbance Rates','[NA]','NA') + call vtable_edio_r(npts,cgrid%workload & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'WORKLOAD :19:hist:mont:dcyc') + call metadata_edio(nvar,igr,'Polygon computational workload' & + ,'[steps/month]','(13,ipoly)') end if !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! @@ -12563,35 +16978,278 @@ subroutine filltab_edtype_p146(cgrid,igr,init,var_len,var_len_global,max_ptrs,nv ! number of points defined by npts. ! !------------------------------------------------------------------------------------! npts = cgrid%npolygons * n_pft * n_dbh - - if (associated(cgrid%basal_area)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%basal_area,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'BASAL_AREA :146:hist:anal:dail:mont:dcyc:year') - call metadata_edio(nvar,igr,'Polygon basal area profile','[cm2/m2]','ipoly - n_dbh - n_pft') + if (associated(cgrid%nplant )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%nplant & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'NPLANT_PY :146:hist:anal:mont:dail:dcyc') + call metadata_edio(nvar,igr,'Plant density' & + ,'[plants/m2]','(n_pft,n_dbh,ipoly)') end if - - if (associated(cgrid%agb)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%agb,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AGB :146:hist:anal:dail:mont:dcyc:year') - call metadata_edio(nvar,igr,'Polygon above ground biomass profile','[kgC/m2]','ipoly - n_dbh - n_pft') + if (associated(cgrid%agb )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%agb & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'AGB_PY :146:hist:anal:mont:dail:dcyc') + call metadata_edio(nvar,igr,'Above-ground biomass' & + , '[kgC/m2]','(n_pft,n_dbh,ipoly)') end if - - if (associated(cgrid%pldens)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%pldens,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'PLDENS :146:hist:anal:dail:dcyc:mont:year') - call metadata_edio(nvar,igr,'Polygon plant density profile','[#/m2]','ipoly - n_dbh - n_pft') + if (associated(cgrid%lai )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%lai & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'LAI_PY :146:hist:anal:dail') + call metadata_edio(nvar,igr,'Leaf area index' & + ,'[m2leaf/m2]','(n_pft,n_dbh,ipoly)') end if - - if (associated(cgrid%bseeds)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%bseeds,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'BSEEDS :146:hist:anal:dail:dcyc:mont:year') - call metadata_edio(nvar,igr,'Polygon seed biomass','[kgC/m2]','ipoly - n_dbh - n_pft') + if (associated(cgrid%wai )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%wai & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'WAI_PY :146:hist:anal:mont:dail:dcyc') + call metadata_edio(nvar,igr,'Wood area index' & + ,'[m2wood/m2]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%basal_area )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%basal_area & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'BASAL_AREA_PY :146:hist:anal:mont:dail:dcyc') + call metadata_edio(nvar,igr,'Basal area' & + , '[cm2/m2]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%bdead )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%bdead & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'BDEAD_PY :146:hist:anal:mont:dail:dcyc') + call metadata_edio(nvar,igr,'Biomass of structural (dead) tissues' & + , '[kgC/m2]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%balive )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%balive & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'BALIVE_PY :146:hist:anal:mont:dail:dcyc') + call metadata_edio(nvar,igr,'Biomass of active (living) tissues' & + , '[kgC/m2]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%bleaf )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%bleaf & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'BLEAF_PY :146:hist:anal:dail') + call metadata_edio(nvar,igr,'Leaf biomass' & + , '[kgC/m2]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%broot )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%broot & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'BROOT_PY :146:hist:anal:dail') + call metadata_edio(nvar,igr,'Root biomass' & + , '[kgC/m2]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%bsapwooda )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%bsapwooda & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'BSAPWOODA_PY :146:hist:anal:mont:dail:dcyc') + call metadata_edio(nvar,igr,'Above-ground sapwood biomass' & + , '[kgC/m2]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%bsapwoodb )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%bsapwoodb & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'BSAPWOODB_PY :146:hist:anal:mont:dail:dcyc') + call metadata_edio(nvar,igr,'Below-ground sapwood biomass' & + , '[kgC/m2]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%bseeds )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%bseeds & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'BSEEDS_PY :146:hist:anal:mont:dail:dcyc') + call metadata_edio(nvar,igr,'Seed biomass' & + , '[kgC/m2]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%bstorage )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%bstorage & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'BSTORAGE_PY :146:hist:anal:dail') + call metadata_edio(nvar,igr,'Storage biomass' & + , '[kgC/m2]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%bdead_n )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%bdead_n & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'BDEAD_N_PY :146:hist:anal:mont:dail:dcyc') + call metadata_edio(nvar,igr,'Nitrogen mass of structural (dead) tissues' & + , '[kgN/m2]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%balive_n )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%balive_n & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'BALIVE_N_PY :146:hist:anal:mont:dail:dcyc') + call metadata_edio(nvar,igr,'Nitrogen mass of active (living) tissues' & + , '[kgN/m2]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%bleaf_n )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%bleaf_n & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'BLEAF_N_PY :146:hist:anal:dail') + call metadata_edio(nvar,igr,'Leaf nitrogen mass' & + , '[kgN/m2]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%broot_n )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%broot_n & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'BROOT_N_PY :146:hist:anal:dail') + call metadata_edio(nvar,igr,'Root nitrogen mass' & + , '[kgN/m2]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%bsapwooda_n)) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%bsapwooda_n & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'BSAPWOODA_N_PY :146:hist:anal:mont:dail:dcyc') + call metadata_edio(nvar,igr,'Above-ground sapwood nitrogen mass' & + , '[kgN/m2]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%bsapwoodb_n)) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%bsapwoodb_n & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'BSAPWOODB_N_PY :146:hist:anal:mont:dail:dcyc') + call metadata_edio(nvar,igr,'Below-ground sapwood nitrogen mass' & + , '[kgN/m2]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%bseeds_n )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%bseeds_n & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'BSEEDS_N_PY :146:hist:anal:mont:dail:dcyc') + call metadata_edio(nvar,igr,'Seed nitrogen mass' & + , '[kgN/m2]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%bstorage_n )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%bstorage_n & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'BSTORAGE_N_PY :146:hist:anal:dail') + call metadata_edio(nvar,igr,'Storage nitrogen mass' & + , '[kgN/m2]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%leaf_maintenance)) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%leaf_maintenance & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'LEAF_MAINTENANCE_PY :146:hist:anal:dail') + call metadata_edio(nvar,igr,'Leaf maintenance rate' & + , '[kgC/m2/yr]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%root_maintenance)) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%root_maintenance & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'ROOT_MAINTENANCE_PY :146:hist:anal:dail') + call metadata_edio(nvar,igr,'Root maintenance rate' & + , '[kgC/m2/yr]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%leaf_drop)) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%leaf_drop & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'LEAF_DROP_PY :146:hist:anal:dail') + call metadata_edio(nvar,igr,'Leaf drop' & + , '[kgC/m2/yr]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%mmean_lai)) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%mmean_lai & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_LAI_PY :146:hist:mont:dcyc') + call metadata_edio(nvar,igr,'Monthly mean - Leaf area index' & + ,'[m2leaf/m2]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%mmean_bleaf )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%mmean_bleaf & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_BLEAF_PY :146:hist:mont:dcyc') + call metadata_edio(nvar,igr,'Monthly mean - Leaf biomass' & + , '[kgC/m2]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%mmean_broot )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%mmean_broot & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_BROOT_PY :146:hist:mont:dcyc') + call metadata_edio(nvar,igr,'Monthly mean - Root biomass' & + , '[kgC/m2]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%mmean_bstorage )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%mmean_bstorage & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_BSTORAGE_PY :146:hist:mont:dcyc') + call metadata_edio(nvar,igr,'Monthly mean - Storage biomass' & + , '[kgC/m2]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%mmean_bleaf_n )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%mmean_bleaf_n & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_BLEAF_N_PY :146:hist:mont:dcyc') + call metadata_edio(nvar,igr,'Monthly mean - Leaf nitrogen mass' & + , '[kgN/m2]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%mmean_broot_n )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%mmean_broot_n & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_BROOT_N_PY :146:hist:mont:dcyc') + call metadata_edio(nvar,igr,'Monthly mean - Root nitrogen mass' & + , '[kgN/m2]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%mmean_bstorage_n )) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%mmean_bstorage_n & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_BSTORAGE_N_PY :146:hist:mont:dcyc') + call metadata_edio(nvar,igr,'Monthly mean - Storage nitrogen mass' & + , '[kgN/m2]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%mmean_leaf_maintenance)) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%mmean_leaf_maintenance & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_LEAF_MAINTENANCE_PY :146:hist:mont:dcyc') + call metadata_edio(nvar,igr,'Monthly mean - Leaf maintenance rate' & + , '[kgC/m2/yr]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%mmean_root_maintenance)) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%mmean_root_maintenance & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ROOT_MAINTENANCE_PY :146:hist:mont:dcyc') + call metadata_edio(nvar,igr,'Monthly mean - Root maintenance rate' & + , '[kgC/m2/yr]','(n_pft,n_dbh,ipoly)') + end if + if (associated(cgrid%mmean_leaf_drop)) then + nvar = nvar + 1 + call vtable_edio_r(npts,cgrid%mmean_leaf_drop & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_LEAF_DROP_PY :146:hist:mont:dcyc') + call metadata_edio(nvar,igr,'Monthly mean - Leaf drop' & + , '[kgC/m2/yr]','(n_pft,n_dbh,ipoly)') end if - !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! @@ -12638,9 +17296,11 @@ subroutine filltab_edtype_p199(cgrid,igr,init,var_len,var_len_global,max_ptrs,nv if (associated(cgrid%avg_lai_ebalvars)) then nvar=nvar+1 - call vtable_edio_r(npts,cgrid%avg_lai_ebalvars,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'AVG_LAI_EBALVARS :199:anal') - call metadata_edio(nvar,igr,'Polygon Average Energy Balance Variables','[variable]','ipoly - 4 - 3') + call vtable_edio_r(npts,cgrid%avg_lai_ebalvars & + ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & + ,'AVG_LAI_EBALVARS :199:anal') + call metadata_edio(nvar,igr,'Polygon Average Energy Balance Variables' & + ,'[variable]','(4,3,ipoly)') end if !------------------------------------------------------------------------------------! @@ -12660,63 +17320,9 @@ end subroutine filltab_edtype_p199 !=======================================================================================! !=======================================================================================! - ! This routine will fill the pointer table with the polygon-level variables ! - ! (edtype) that have three dimensions (n_dist_types,n_dist_types,npolygons) and are ! - ! real (type 155). ! + ! This sub-routine fills in the variable table with site-level variables. ! !---------------------------------------------------------------------------------------! - subroutine filltab_edtype_p155(cgrid,igr,init,var_len,var_len_global,max_ptrs,nvar) - use ed_var_tables, only : vtable_edio_r & ! sub-routine - , metadata_edio ! ! sub-routine - - implicit none - !----- Arguments. -------------------------------------------------------------------! - type(edtype), target :: cgrid - integer , intent(in) :: init - integer , intent(in) :: igr - integer , intent(in) :: var_len - integer , intent(in) :: max_ptrs - integer , intent(in) :: var_len_global - integer , intent(inout) :: nvar - !----- Local variables. -------------------------------------------------------------! - integer :: npts - !------------------------------------------------------------------------------------! - - - !------------------------------------------------------------------------------------! - !------------------------------------------------------------------------------------! - ! This is the 3-D block, with disturbance transitions. All variables must have ! - ! the number of points defined by npts. ! - !------------------------------------------------------------------------------------! - npts = cgrid%npolygons * n_dist_types * n_dist_types - - if(associated(cgrid%disturbance_rates)) then - nvar=nvar+1 - call vtable_edio_r(npts,cgrid%disturbance_rates,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'DISTURBANCE_RATES :155:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Disturbance Rates','[NA]','NA') - end if - !------------------------------------------------------------------------------------! - !------------------------------------------------------------------------------------! - - - return - end subroutine filltab_edtype_p155 - !=======================================================================================! - !=======================================================================================! - - - - - - - !=======================================================================================! - !=======================================================================================! subroutine filltab_polygontype(igr,ipy,init) - - use ed_var_tables, only : vtable_edio_r & ! sub-routine - , vtable_edio_i & ! sub-routine - , metadata_edio ! ! sub-routine - implicit none !----- Arguments. -------------------------------------------------------------------! integer, intent(in) :: init @@ -12753,100 +17359,176 @@ subroutine filltab_polygontype(igr,ipy,init) - !----- Define some variables to be used by all variables. ---------------------------! - var_len = cpoly%nsites - var_len_global = edgrid_g(igr)%nsites_global - max_ptrs = edgrid_g(igr)%npolygons + !----- Define some variables to be used by all variables. ---------------------------! + var_len = cpoly%nsites + var_len_global = edgrid_g(igr)%nsites_global + max_ptrs = edgrid_g(igr)%npolygons + !------------------------------------------------------------------------------------! + + + !------------------------------------------------------------------------------------! + ! Initialise the variable number, which should be unique for each variable. ! + ! nioglobal has the current position after all the parent structure variables have ! + ! been positioned in the variable table. ! + !------------------------------------------------------------------------------------! + nvar=nioglobal+niogrid + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + ! We split the routine into smaller ones to avoid excessive number of calls to ! + ! sub-routines from the same routine (this allows more optimisation for ifort, and ! + ! reduces chances of segmentation violation during the compilation). ! + !------------------------------------------------------------------------------------! + call filltab_polygontype_p20 (cpoly,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_polygontype_p21inst (cpoly,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_polygontype_p21fmean(cpoly,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_polygontype_p21dmean(cpoly,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_polygontype_p21mmean(cpoly,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_polygontype_p220 (cpoly,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_polygontype_p24 (cpoly,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_polygontype_m21 (cpoly,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_polygontype_p29 (cpoly,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_polygontype_p246 (cpoly,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_polygontype_p255 (cpoly,igr,init,var_len,var_len_global,max_ptrs,nvar) + !------------------------------------------------------------------------------------! + + + !----- Save the number of site-level (polygontype) variables that go to the output. -! + if (init == 0) niopoly=nvar-niogrid-nioglobal + !------------------------------------------------------------------------------------! + + return + end subroutine filltab_polygontype + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the site-level variables ! + ! (polygontype) that have one dimension and are integer (type 20). ! + !---------------------------------------------------------------------------------------! + subroutine filltab_polygontype_p20(cpoly,igr,init,var_len,var_len_global,max_ptrs,nvar) + use ed_var_tables, only : vtable_edio_i & ! sub-routine + , metadata_edio ! ! sub-routine + + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(polygontype), target :: cpoly + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts !------------------------------------------------------------------------------------! + + !------------------------------------------------------------------------------------! - ! Initialise the variable number, which should be unique for each variable. ! - ! nioglobal has the current position after all the parent structure variables have ! - ! been positioned in the variable table. ! !------------------------------------------------------------------------------------! - nvar=nioglobal+niogrid + ! This is the 1-D block. All variables must have the number of points defined ! + ! by npts. ! !------------------------------------------------------------------------------------! - !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! ! This part should have only 1-D vectors (nsites). Notice that they all use ! - ! npts = cpoly%nsites. Add only variables of types 20 and 21 here. ! + ! npts = cpoly%nsites. Add only variables of types 20, integer variables. ! !------------------------------------------------------------------------------------! npts = cpoly%nsites if (associated(cpoly%sipa_id)) then nvar=nvar+1 - call vtable_edio_i(npts,cpoly%sipa_id,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'SIPA_ID :20:hist:dail:mont:dcyc:year') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_i(npts,cpoly%sipa_id & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'SIPA_ID :20:hist:dail:mont:dcyc:year') + call metadata_edio(nvar,igr,'Sites first patch indices','[--]','(isite)') end if if (associated(cpoly%sipa_n)) then nvar=nvar+1 - call vtable_edio_i(npts,cpoly%sipa_n,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'SIPA_N :20:hist:dail:mont:dcyc:year') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_i(npts,cpoly%sipa_n & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'SIPA_N :20:hist:dail:mont:dcyc:year') + call metadata_edio(nvar,igr,'Number of patches per site','[--]','(isite)') end if if (associated(cpoly%patch_count)) then nvar=nvar+1 - call vtable_edio_i(npts,cpoly%patch_count,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'PATCH_COUNT :20:hist:dail:mont:dcyc:year') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_i(npts,cpoly%patch_count & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'PATCH_COUNT :20:hist:dail:mont:dcyc:year') + call metadata_edio(nvar,igr,'Patch count for each site','[--]','(isite)') end if if (associated(cpoly%sitenum)) then nvar=nvar+1 - call vtable_edio_i(npts,cpoly%sitenum,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'SITENUM :20:hist:year') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_i(npts,cpoly%sitenum & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'SITENUM :20:hist:year') + call metadata_edio(nvar,igr,'Site number','[--]','(isite)') end if if (associated(cpoly%lsl)) then nvar=nvar+1 - call vtable_edio_i(npts,cpoly%lsl,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'LSL_SI :20:hist:dail:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_i(npts,cpoly%lsl & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'LSL :20:hist:dail:mont:dcyc') + call metadata_edio(nvar,igr,'Lowest soil layer','[--]','(isite)') end if if (associated(cpoly%ncol_soil)) then nvar=nvar+1 - call vtable_edio_i(npts,cpoly%ncol_soil,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'NCOL_SOIL_SI :20:hist:dail:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_i(npts,cpoly%ncol_soil & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'NCOL_SOIL :20:hist:dail:mont:dcyc') + call metadata_edio(nvar,igr,'Soil colour index','[--]','(isite)') end if if (associated(cpoly%num_landuse_years)) then nvar=nvar+1 - call vtable_edio_i(npts,cpoly%num_landuse_years,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'NUM_LANDUSE_YEARS :20:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_i(npts,cpoly%num_landuse_years & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'NUM_LANDUSE_YEARS :20:hist') + call metadata_edio(nvar,igr,'Number of years with land use data','[--]','(isite)') end if if (associated(cpoly%hydro_next)) then nvar=nvar+1 - call vtable_edio_i(npts,cpoly%hydro_next,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'HYDRO_NEXT :20:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_i(npts,cpoly%hydro_next & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'HYDRO_NEXT :20:hist') + call metadata_edio(nvar,igr,'Next site for hydrological routing' & + ,'[--]','(isite)') end if if (associated(cpoly%hydro_prev)) then nvar=nvar+1 - call vtable_edio_i(npts,cpoly%hydro_prev,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'HYDRO_PREV :20:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_i(npts,cpoly%hydro_prev & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'HYDRO_PREV :20:hist') + call metadata_edio(nvar,igr,'Previous site for hydrological routing' & + ,'[--]','(isite)') end if if (associated(cpoly%plantation)) then nvar=nvar+1 call vtable_edio_i(npts,cpoly%plantation,nvar,igr,init,cpoly%siglob_id, & var_len,var_len_global,max_ptrs,'PLANTATION_SI :20:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call metadata_edio(nvar,igr,'Plantation flag (0-no;1-yes)','[--]','(isite)') end if if (associated(cpoly%agri_stocking_pft)) then @@ -12869,6 +17551,51 @@ subroutine filltab_polygontype(igr,ipy,init) var_len,var_len_global,max_ptrs,'NAT_DIST_TYPE :20:hist') call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if + !------------------------------------------------------------------------------------! + + return + end subroutine filltab_polygontype_p20 + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the site-level variables ! + ! (polygontype) that have one dimension and are real (type 21), and are not averaged ! + ! variable (fmean, dmean, mmean, mmsqu, qmean, qmsqu). ! + !---------------------------------------------------------------------------------------! + subroutine filltab_polygontype_p21inst(cpoly,igr,init,var_len,var_len_global,max_ptrs & + ,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine + + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(polygontype), target :: cpoly + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + ! This part should have only 1-D vectors (nsites). Notice that they all use ! + ! npts = cpoly%nsites. Add only variables of types 21, real variables, that are not ! + ! ?mean or ?msqu. ! + !------------------------------------------------------------------------------------! + npts = cpoly%nsites if (associated(cpoly%area)) then nvar=nvar+1 @@ -12915,7 +17642,7 @@ subroutine filltab_polygontype(igr,ipy,init) if (associated(cpoly%pptweight)) then nvar=nvar+1 call vtable_edio_r(npts,cpoly%TCI,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'pptweight :21:hist') + var_len,var_len_global,max_ptrs,'PPTWEIGHT :21:hist') call metadata_edio(nvar,igr,'precip lapse weighting','[NA]','NA') end if @@ -13009,128 +17736,954 @@ subroutine filltab_polygontype(igr,ipy,init) var_len,var_len_global,max_ptrs,'NAT_DISTURBANCE_RATE :21:hist') call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if - + + if (associated(cpoly%daylight)) then + nvar = nvar + 1 + call vtable_edio_r(npts,cpoly%daylight & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'DAYLIGHT :21:hist:dail') + call metadata_edio(nvar,igr,'Length of day time light','[s]','(isite)') + end if + + if (associated(cpoly%cosaoi)) then + nvar = nvar + 1 + call vtable_edio_r(npts,cpoly%cosaoi & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'COSAOI :21:hist') + call metadata_edio(nvar,igr,'Co-sine of the angle of incidence','[--]','(isite)') + end if + if (associated(cpoly%rad_avg)) then nvar=nvar+1 call vtable_edio_r(npts,cpoly%rad_avg,nvar,igr,init,cpoly%siglob_id, & var_len,var_len_global,max_ptrs,'RAD_AVG :21:hist') call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if + !------------------------------------------------------------------------------------! + + return + end subroutine filltab_polygontype_p21inst + !=======================================================================================! + !=======================================================================================! - if(associated(cpoly%dmean_co2_residual)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpoly%dmean_co2_residual,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_CO2_RESIDUAL_SI :21:hist:dail') - call metadata_edio(nvar,igr,'Daily mean of residual canopy CO2 ','[umol/m2/day]','ipoly') + + + + + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the site-level variables ! + ! (polygontype) that have one dimension and are real (type 21), and are sub-daily ! + ! averages (fmean). ! + !---------------------------------------------------------------------------------------! + subroutine filltab_polygontype_p21fmean(cpoly,igr,init,var_len,var_len_global,max_ptrs & + ,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine + + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(polygontype), target :: cpoly + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + ! This part should have only 1-D vectors (nsites). Notice that they all use ! + ! npts = cpoly%nsites. Add only variables of types 21, real variables, that are ! + ! fmean. ! + !------------------------------------------------------------------------------------! + npts = cpoly%nsites + + + if (associated(cpoly%fmean_atm_theiv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%fmean_atm_theiv & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_THEIV_SI :21:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Ice-vapour equiv. pot. temp.: Atmosphere' & + ,'[ K]','(isite)' ) + end if + if (associated(cpoly%fmean_atm_theta )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%fmean_atm_theta & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_THETA_SI :21:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Potential temperature: Atmosphere' & + ,'[ K]','(isite)' ) + end if + if (associated(cpoly%fmean_atm_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%fmean_atm_temp & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_TEMP_SI :21:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Temperature: Atmosphere' & + ,'[ K]','(isite)' ) + end if + if (associated(cpoly%fmean_atm_vpdef )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%fmean_atm_vpdef & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_VPDEF_SI :21:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Vapour pressure deficit: Atmosphere' & + ,'[ Pa]','(isite)' ) + end if + if (associated(cpoly%fmean_atm_shv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%fmean_atm_shv & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_SHV_SI :21:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Specific humidity: Atmosphere' & + ,'[ kg/kg]','(isite)' ) + end if + if (associated(cpoly%fmean_atm_rshort )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%fmean_atm_rshort & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_RSHORT_SI :21:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Shortwave radiation: Atmosphere' & + ,'[ W/m2]','(isite)' ) + end if + if (associated(cpoly%fmean_atm_rshort_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%fmean_atm_rshort_diff & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_RSHORT_DIFF_SI :21:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Diffuse SW radiation: Atmosphere' & + ,'[ W/m2]','(isite)' ) + end if + if (associated(cpoly%fmean_atm_par )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%fmean_atm_par & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_PAR_SI :21:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - PAR: Atmosphere' & + ,'[ W/m2]','(isite)' ) + end if + if (associated(cpoly%fmean_atm_par_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%fmean_atm_par_diff & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_PAR_DIFF_SI :21:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Diffuse PAR: Atmosphere' & + ,'[ W/m2]','(isite)' ) + end if + if (associated(cpoly%fmean_atm_rlong )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%fmean_atm_rlong & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_RLONG_SI :21:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Longwave radiation: Atmosphere' & + ,'[ W/m2]','(isite)' ) + end if + if (associated(cpoly%fmean_atm_vels )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%fmean_atm_vels & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_VELS_SI :21:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Wind speed: atmosphere' & + ,'[ m/s]','(isite)' ) + end if + if (associated(cpoly%fmean_atm_rhos )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%fmean_atm_rhos & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_RHOS_SI :21:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Air density: Atmosphere' & + ,'[ kg/m3]','(isite)' ) + end if + if (associated(cpoly%fmean_atm_prss )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%fmean_atm_prss & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_PRSS_SI :21:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Air pressure: Atmosphere' & + ,'[ Pa]','(isite)' ) + end if + if (associated(cpoly%fmean_atm_co2 )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%fmean_atm_co2 & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ATM_CO2_SI :21:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - CO2 mixing ratio: Atmosphere' & + ,'[ umol/mol]','(isite)' ) + end if + if (associated(cpoly%fmean_pcpg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%fmean_pcpg & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_PCPG_SI :21:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Precipitation rate' & + ,'[ kg/m2/s]','(isite)' ) + end if + if (associated(cpoly%fmean_qpcpg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%fmean_qpcpg & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_QPCPG_SI :21:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Energy gain - rain' & + ,'[ W/m2]','(isite)' ) + end if + if (associated(cpoly%fmean_dpcpg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%fmean_dpcpg & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_DPCPG_SI :21:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Precipitation depth' & + ,'[ m]','(isite)' ) end if + !------------------------------------------------------------------------------------! - if(associated(cpoly%dmean_water_residual)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpoly%dmean_water_residual,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_WATER_RESIDUAL_SI :21:hist:dail') - call metadata_edio(nvar,igr,'Daily mean of residual water ','[kg/m2/day]','ipoly') + return + end subroutine filltab_polygontype_p21fmean + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the site-level variables ! + ! (polygontype) that have one dimension and are real (type 21), and are daily ! + ! averages (dmean). ! + !---------------------------------------------------------------------------------------! + subroutine filltab_polygontype_p21dmean(cpoly,igr,init,var_len,var_len_global,max_ptrs & + ,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine + + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(polygontype), target :: cpoly + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + ! This part should have only 1-D vectors (nsites). Notice that they all use ! + ! npts = cpoly%nsites. Add only variables of types 21, real variables, that are ! + ! dmean. ! + !------------------------------------------------------------------------------------! + npts = cpoly%nsites + + if (associated(cpoly%dmean_atm_theiv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%dmean_atm_theiv & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_THEIV_SI :21:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Ice-vapour equiv. pot. temp.: Atmosphere' & + ,'[ K]','(isite)' ) + end if + if (associated(cpoly%dmean_atm_theta )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%dmean_atm_theta & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_THETA_SI :21:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Potential temperature: Atmosphere' & + ,'[ K]','(isite)' ) + end if + if (associated(cpoly%dmean_atm_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%dmean_atm_temp & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_TEMP_SI :21:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Temperature: Atmosphere' & + ,'[ K]','(isite)' ) + end if + if (associated(cpoly%dmean_atm_vpdef )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%dmean_atm_vpdef & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_VPDEF_SI :21:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Vapour pressure deficit: Atmosphere' & + ,'[ Pa]','(isite)' ) + end if + if (associated(cpoly%dmean_atm_shv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%dmean_atm_shv & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_SHV_SI :21:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Specific humidity: Atmosphere' & + ,'[ kg/kg]','(isite)' ) + end if + if (associated(cpoly%dmean_atm_rshort )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%dmean_atm_rshort & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_RSHORT_SI :21:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Shortwave radiation: Atmosphere' & + ,'[ W/m2]','(isite)' ) + end if + if (associated(cpoly%dmean_atm_rshort_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%dmean_atm_rshort_diff & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_RSHORT_DIFF_SI :21:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Diffuse SW radiation: Atmosphere' & + ,'[ W/m2]','(isite)' ) + end if + if (associated(cpoly%dmean_atm_par )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%dmean_atm_par & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_PAR_SI :21:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - PAR: Atmosphere' & + ,'[ W/m2]','(isite)' ) + end if + if (associated(cpoly%dmean_atm_par_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%dmean_atm_par_diff & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_PAR_DIFF_SI :21:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Diffuse PAR: Atmosphere' & + ,'[ W/m2]','(isite)' ) + end if + if (associated(cpoly%dmean_atm_rlong )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%dmean_atm_rlong & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_RLONG_SI :21:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Longwave radiation: Atmosphere' & + ,'[ W/m2]','(isite)' ) + end if + if (associated(cpoly%dmean_atm_vels )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%dmean_atm_vels & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_VELS_SI :21:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Wind speed: atmosphere' & + ,'[ m/s]','(isite)' ) + end if + if (associated(cpoly%dmean_atm_rhos )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%dmean_atm_rhos & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_RHOS_SI :21:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Air density: Atmosphere' & + ,'[ kg/m3]','(isite)' ) + end if + if (associated(cpoly%dmean_atm_prss )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%dmean_atm_prss & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_PRSS_SI :21:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Air pressure: Atmosphere' & + ,'[ Pa]','(isite)' ) + end if + if (associated(cpoly%dmean_atm_co2 )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%dmean_atm_co2 & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ATM_CO2_SI :21:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - CO2 mixing ratio: Atmosphere' & + ,'[ umol/mol]','(isite)' ) end if + !------------------------------------------------------------------------------------! - if(associated(cpoly%dmean_energy_residual)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpoly%dmean_energy_residual,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_ENERGY_RESIDUAL_SI :21:hist:dail') - call metadata_edio(nvar,igr,'Daily mean of residual water ','[J/m2/day]','ipoly') + return + end subroutine filltab_polygontype_p21dmean + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the site-level variables ! + ! (polygontype) that have one dimension and are real (type 21), and are monthly ! + ! averages (mmean or mmsqu). ! + !---------------------------------------------------------------------------------------! + subroutine filltab_polygontype_p21mmean(cpoly,igr,init,var_len,var_len_global,max_ptrs & + ,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine + + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(polygontype), target :: cpoly + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + ! This part should have only 1-D vectors (nsites). Notice that they all use ! + ! npts = cpoly%nsites. Add only variables of types 21, real variables, that are ! + ! mmean or mmsqu. ! + !------------------------------------------------------------------------------------! + npts = cpoly%nsites + + if (associated(cpoly%mmean_atm_theiv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%mmean_atm_theiv & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_THEIV_SI :21:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Ice-vapour equiv. pot. temp.: Atmosphere' & + ,'[ K]','(isite)' ) + end if + if (associated(cpoly%mmean_atm_theta )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%mmean_atm_theta & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_THETA_SI :21:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Potential temperature: Atmosphere' & + ,'[ K]','(isite)' ) + end if + if (associated(cpoly%mmean_atm_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%mmean_atm_temp & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_TEMP_SI :21:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Temperature: Atmosphere' & + ,'[ K]','(isite)' ) + end if + if (associated(cpoly%mmean_atm_vpdef )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%mmean_atm_vpdef & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_VPDEF_SI :21:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Vapour pressure deficit: Atmosphere' & + ,'[ Pa]','(isite)' ) + end if + if (associated(cpoly%mmean_atm_shv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%mmean_atm_shv & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_SHV_SI :21:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Specific humidity: Atmosphere' & + ,'[ kg/kg]','(isite)' ) + end if + if (associated(cpoly%mmean_atm_rshort )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%mmean_atm_rshort & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_RSHORT_SI :21:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Shortwave radiation: Atmosphere' & + ,'[ W/m2]','(isite)' ) + end if + if (associated(cpoly%mmean_atm_rshort_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%mmean_atm_rshort_diff & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_RSHORT_DIFF_SI :21:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Diffuse SW radiation: Atmosphere' & + ,'[ W/m2]','(isite)' ) + end if + if (associated(cpoly%mmean_atm_par )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%mmean_atm_par & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_PAR_SI :21:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - PAR: Atmosphere' & + ,'[ W/m2]','(isite)' ) + end if + if (associated(cpoly%mmean_atm_par_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%mmean_atm_par_diff & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_PAR_DIFF_SI :21:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Diffuse PAR: Atmosphere' & + ,'[ W/m2]','(isite)' ) + end if + if (associated(cpoly%mmean_atm_rlong )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%mmean_atm_rlong & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_RLONG_SI :21:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Longwave radiation: Atmosphere' & + ,'[ W/m2]','(isite)' ) + end if + if (associated(cpoly%mmean_atm_vels )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%mmean_atm_vels & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_VELS_SI :21:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Wind speed: atmosphere' & + ,'[ m/s]','(isite)' ) + end if + if (associated(cpoly%mmean_atm_rhos )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%mmean_atm_rhos & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_RHOS_SI :21:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Air density: Atmosphere' & + ,'[ kg/m3]','(isite)' ) + end if + if (associated(cpoly%mmean_atm_prss )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%mmean_atm_prss & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_PRSS_SI :21:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Air pressure: Atmosphere' & + ,'[ Pa]','(isite)' ) + end if + if (associated(cpoly%mmean_atm_co2 )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%mmean_atm_co2 & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ATM_CO2_SI :21:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - CO2 mixing ratio: Atmosphere' & + ,'[ umol/mol]','(isite)' ) + end if + if (associated(cpoly%mmean_pcpg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%mmean_pcpg & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_PCPG_SI :21:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Precipitation rate' & + ,'[ kg/m2/s]','(isite)' ) + end if + if (associated(cpoly%mmean_qpcpg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%mmean_qpcpg & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_QPCPG_SI :21:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Energy gain - rain' & + ,'[ W/m2]','(isite)' ) + end if + if (associated(cpoly%mmean_dpcpg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%mmean_dpcpg & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_DPCPG_SI :21:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Precipitation depth' & + ,'[ m]','(isite)' ) end if + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + + return + end subroutine filltab_polygontype_p21mmean + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the site-level variables ! + ! (polygontype) that have two dimensions (nzg,nsites) and are integer (type 220). ! + !---------------------------------------------------------------------------------------! + subroutine filltab_polygontype_p220(cpoly,igr,init,var_len,var_len_global,max_ptrs,nvar) + use ed_var_tables, only : vtable_edio_i & ! sub-routine + , metadata_edio ! ! sub-routine + + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(polygontype), target :: cpoly + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! + + + + + + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + ! This is the 2-D block, with dimensions being nsites and nzg. Make sure to ! + ! include only variables of types 22 and 220 here, as they will all use the same ! + ! npts. ! + !------------------------------------------------------------------------------------! + npts = cpoly%nsites * nzg - if(associated(cpoly%mmean_co2_residual)) then + + if (associated(cpoly%ntext_soil)) then nvar=nvar+1 - call vtable_edio_r(npts,cpoly%mmean_co2_residual,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_CO2_RESIDUAL_SI :21:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean of residual canopy CO2 ','[umol/m2/day]','ipoly') + call vtable_edio_i(npts,cpoly%ntext_soil & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'NTEXT_SOIL :220:hist:anal:dail:mont:dcyc:year') + call metadata_edio(nvar,igr,'Soil texture class','[--]','(isite)') end if - if(associated(cpoly%mmean_water_residual)) then + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + + return + end subroutine filltab_polygontype_p220 + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the site-level variables ! + ! (polygontype) that have two dimensions (n_pft,nsites) and are real (type 24). ! + !---------------------------------------------------------------------------------------! + subroutine filltab_polygontype_p24(cpoly,igr,init,var_len,var_len_global,max_ptrs,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine + + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(polygontype), target :: cpoly + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! + + + + + + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + ! This is the 2-D block, with dimensions being nsites and n_pft. Make sure to ! + ! include only variables of type 24 here, as they will all use the same npts. ! + !------------------------------------------------------------------------------------! + npts = cpoly%nsites * n_pft + + if (associated(cpoly%green_leaf_factor)) then nvar=nvar+1 - call vtable_edio_r(npts,cpoly%mmean_water_residual,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_WATER_RESIDUAL_SI :21:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean of residual water ','[kg/m2/day]','ipoly') + call vtable_edio_r(npts,cpoly%green_leaf_factor,nvar,igr,init,cpoly%siglob_id, & + var_len,var_len_global,max_ptrs,'GREEN_LEAF_FACTOR :24:hist') + call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if - if(associated(cpoly%mmean_energy_residual)) then + if (associated(cpoly%leaf_aging_factor)) then nvar=nvar+1 - call vtable_edio_r(npts,cpoly%mmean_energy_residual,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_ENERGY_RESIDUAL_SI :21:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean of residual energy ','[J/m2/day]','ipoly') + call vtable_edio_r(npts,cpoly%leaf_aging_factor,nvar,igr,init,cpoly%siglob_id, & + var_len,var_len_global,max_ptrs,'LEAF_AGING_FACTOR :24:hist') + call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if - !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! + return + end subroutine filltab_polygontype_p24 + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the site-level variables ! + ! (polygontype) that have two dimensions (ndcycle,nsites) and are real (type -21). ! + !---------------------------------------------------------------------------------------! + subroutine filltab_polygontype_m21(cpoly,igr,init,var_len,var_len_global,max_ptrs,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine + + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(polygontype), target :: cpoly + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! - ! This is the 2-D block, with dimensions being nsites and nzg. Make sure to ! - ! include only variables of types 22 and 220 here, as they will all use the same ! - ! npts. ! + ! This is the 2-D block, with dimensions being nsites and ndcycle. Make sure ! + ! to include only variables of type -21 here, as they will all use the same npts. ! !------------------------------------------------------------------------------------! - npts = cpoly%nsites * nzg - - - if (associated(cpoly%ntext_soil)) then - nvar=nvar+1 - call vtable_edio_i(npts,cpoly%ntext_soil,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'NTEXT_SOIL_SI :220:hist:year') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + npts = cpoly%nsites * ndcycle + + if (associated(cpoly%qmean_atm_theiv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%qmean_atm_theiv & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_THEIV_SI :-21:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Ice-vapour equiv. pot. temp.: Atmosphere' & + ,'[ K]','(ndcycle,isite)' ) + end if + if (associated(cpoly%qmean_atm_theta )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%qmean_atm_theta & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_THETA_SI :-21:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Potential temperature: Atmosphere' & + ,'[ K]','(ndcycle,isite)' ) + end if + if (associated(cpoly%qmean_atm_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%qmean_atm_temp & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_TEMP_SI :-21:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Temperature: Atmosphere' & + ,'[ K]','(ndcycle,isite)' ) + end if + if (associated(cpoly%qmean_atm_vpdef )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%qmean_atm_vpdef & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_VPDEF_SI :-21:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Vapour pressure deficit: Atmosphere' & + ,'[ Pa]','(ndcycle,isite)' ) + end if + if (associated(cpoly%qmean_atm_shv )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%qmean_atm_shv & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_SHV_SI :-21:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Specific humidity: Atmosphere' & + ,'[ kg/kg]','(ndcycle,isite)' ) + end if + if (associated(cpoly%qmean_atm_rshort )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%qmean_atm_rshort & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_RSHORT_SI :-21:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Shortwave radiation: Atmosphere' & + ,'[ W/m2]','(ndcycle,isite)' ) + end if + if (associated(cpoly%qmean_atm_rshort_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%qmean_atm_rshort_diff & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_RSHORT_DIFF_SI :-21:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Diffuse SW radiation: Atmosphere' & + ,'[ W/m2]','(ndcycle,isite)' ) + end if + if (associated(cpoly%qmean_atm_par )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%qmean_atm_par & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_PAR_SI :-21:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - PAR: Atmosphere' & + ,'[ W/m2]','(ndcycle,isite)' ) + end if + if (associated(cpoly%qmean_atm_par_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%qmean_atm_par_diff & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_PAR_DIFF_SI :-21:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Diffuse PAR: Atmosphere' & + ,'[ W/m2]','(ndcycle,isite)' ) + end if + if (associated(cpoly%qmean_atm_rlong )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%qmean_atm_rlong & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_RLONG_SI :-21:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Longwave radiation: Atmosphere' & + ,'[ W/m2]','(ndcycle,isite)' ) + end if + if (associated(cpoly%qmean_atm_vels )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%qmean_atm_vels & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_VELS_SI :-21:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Wind speed: atmosphere' & + ,'[ m/s]','(ndcycle,isite)' ) + end if + if (associated(cpoly%qmean_atm_rhos )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%qmean_atm_rhos & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_RHOS_SI :-21:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Air density: Atmosphere' & + ,'[ kg/m3]','(ndcycle,isite)' ) + end if + if (associated(cpoly%qmean_atm_prss )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%qmean_atm_prss & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_PRSS_SI :-21:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Air pressure: Atmosphere' & + ,'[ Pa]','(ndcycle,isite)' ) + end if + if (associated(cpoly%qmean_atm_co2 )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%qmean_atm_co2 & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ATM_CO2_SI :-21:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - CO2 mixing ratio: Atmosphere' & + ,'[ umol/mol]','(ndcycle,isite)' ) + end if + if (associated(cpoly%qmean_pcpg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%qmean_pcpg & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_PCPG_SI :-21:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Precipitation rate' & + ,'[ kg/m2/s]','(ndcycle,isite)' ) + end if + if (associated(cpoly%qmean_qpcpg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%qmean_qpcpg & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_QPCPG_SI :-21:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Energy gain - rain' & + ,'[ W/m2]','(ndcycle,isite)' ) + end if + if (associated(cpoly%qmean_dpcpg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpoly%qmean_dpcpg & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_DPCPG_SI :-21:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Precipitation depth' & + ,'[ m]','(ndcycle,isite)' ) end if - !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! + return + end subroutine filltab_polygontype_m21 + !=======================================================================================! + !=======================================================================================! - !------------------------------------------------------------------------------------! - !------------------------------------------------------------------------------------! - ! This is the 2-D block, with dimensions being nsites and n_pft. Make sure to ! - ! include only variables of type 24 here, as they will all use the same npts. ! - !------------------------------------------------------------------------------------! - npts = cpoly%nsites * n_pft - - if (associated(cpoly%lai_pft)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpoly%lai_pft,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'LAI_PFT_SI :24:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpoly%wai_pft)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpoly%wai_pft,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'WAI_PFT_SI :24:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if (associated(cpoly%green_leaf_factor)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpoly%green_leaf_factor,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'GREEN_LEAF_FACTOR :24:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the site-level variables ! + ! (polygontype) that have two dimensions (12 months,nsites) and are real (type 29). ! + !---------------------------------------------------------------------------------------! + subroutine filltab_polygontype_p29(cpoly,igr,init,var_len,var_len_global,max_ptrs,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine - if (associated(cpoly%leaf_aging_factor)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpoly%leaf_aging_factor,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'LEAF_AGING_FACTOR :24:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - !------------------------------------------------------------------------------------! + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(polygontype), target :: cpoly + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! ! This is the 2-D block, with dimensions being nsites and 12 months. Make sure ! @@ -13141,7 +18694,7 @@ subroutine filltab_polygontype(igr,ipy,init) if (associated(cpoly%lambda_fire)) then nvar=nvar+1 call vtable_edio_r(npts,cpoly%lambda_fire,nvar,igr,init,cpoly%siglob_id & - ,var_len,var_len_global,max_ptrs,'LAMBDA_FIRE :29:hist') + ,var_len,var_len_global,max_ptrs,'LAMBDA_FIRE :29:hist') call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if @@ -13153,6 +18706,37 @@ subroutine filltab_polygontype(igr,ipy,init) end if !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! + return + end subroutine filltab_polygontype_p29 + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the site-level variables ! + ! (polygontype) that have three dimensions (n_pft,n_dbh,nsites) and are real (type 246).! + !---------------------------------------------------------------------------------------! + subroutine filltab_polygontype_p246(cpoly,igr,init,var_len,var_len_global,max_ptrs,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine + + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(polygontype), target :: cpoly + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! @@ -13167,83 +18751,101 @@ subroutine filltab_polygontype(igr,ipy,init) if (associated(cpoly%basal_area)) then nvar=nvar+1 - call vtable_edio_r(npts,cpoly%basal_area,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'BASAL_AREA_SI :246:hist') + call vtable_edio_r(npts,cpoly%basal_area & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'BASAL_AREA_SI :246:hist') call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if if (associated(cpoly%agb)) then nvar=nvar+1 - call vtable_edio_r(npts,cpoly%agb,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'AGB_SI :246:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpoly%pldens)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpoly%pldens,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'PLDENS_SI :246:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpoly%bseeds)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpoly%bseeds,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'BSEEDS_SI :246:hist') + call vtable_edio_r(npts,cpoly%agb & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'AGB_SI :246:hist') call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if if (associated(cpoly%basal_area_growth)) then nvar=nvar+1 - call vtable_edio_r(npts,cpoly%basal_area_growth,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'BASAL_AREA_GROWTH :246:hist:year') + call vtable_edio_r(npts,cpoly%basal_area_growth & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'BASAL_AREA_GROWTH :246:hist:year') call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if if (associated(cpoly%agb_growth)) then nvar=nvar+1 - call vtable_edio_r(npts,cpoly%agb_growth,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'AGB_GROWTH :246:hist:year') + call vtable_edio_r(npts,cpoly%agb_growth & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'AGB_GROWTH :246:hist:year') call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if if (associated(cpoly%basal_area_mort)) then nvar=nvar+1 - call vtable_edio_r(npts,cpoly%basal_area_mort,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'BASAL_AREA_MORT :246:hist:year') + call vtable_edio_r(npts,cpoly%basal_area_mort & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'BASAL_AREA_MORT :246:hist:year') call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if if (associated(cpoly%basal_area_cut)) then nvar=nvar+1 - call vtable_edio_r(npts,cpoly%basal_area_cut,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'BASAL_AREA_CUT :246:year:hist') + call vtable_edio_r(npts,cpoly%basal_area_cut & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'BASAL_AREA_CUT :246:year:hist') call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if if (associated(cpoly%agb_mort)) then nvar=nvar+1 - call vtable_edio_r(npts,cpoly%agb_mort,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'AGB_MORT :246:hist:year') + call vtable_edio_r(npts,cpoly%agb_mort & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'AGB_MORT :246:hist:year') call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if if (associated(cpoly%agb_cut)) then nvar=nvar+1 - call vtable_edio_r(npts,cpoly%agb_cut,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'AGB_CUT :246:hist:year') + call vtable_edio_r(npts,cpoly%agb_cut & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'AGB_CUT :246:hist:year') call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + return + end subroutine filltab_polygontype_p246 + !=======================================================================================! + !=======================================================================================! - if (associated(cpoly%avg_soil_rootfrac)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpoly%avg_soil_rootfrac,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'SITE_SOIL_ROOTFRAC :12:hist:mont:year') - call metadata_edio(nvar,igr,'Site Average Root Fraction','[kg m-3]','ipoly - nzg') - end if - !------------------------------------------------------------------------------------! + + + + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the site-level variables ! + ! (polygontype) that have three dimensions (n_dist_types,n_dist_types,nsites) and are ! + ! real (type 255). ! + !---------------------------------------------------------------------------------------! + subroutine filltab_polygontype_p255(cpoly,igr,init,var_len,var_len_global,max_ptrs,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine + + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(polygontype), target :: cpoly + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts !------------------------------------------------------------------------------------! @@ -13267,21 +18869,17 @@ subroutine filltab_polygontype(igr,ipy,init) if (associated(cpoly%disturbance_rates)) then nvar=nvar+1 - call vtable_edio_r(npts,cpoly%disturbance_rates,nvar,igr,init,cpoly%siglob_id, & - var_len,var_len_global,max_ptrs,'DISTURBANCE_RATES_SI :255:hist') + call vtable_edio_r(npts,cpoly%disturbance_rates & + ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & + ,'DISTURBANCE_RATES :255:hist:anal:dail:mont:dcyc') call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! - - !----- Save the number of site-level (polygontype) variables that go to the output. -! - if (init == 0) niopoly=nvar-niogrid-nioglobal - !------------------------------------------------------------------------------------! - return - end subroutine filltab_polygontype + end subroutine filltab_polygontype_p255 !=======================================================================================! !=======================================================================================! @@ -13293,14 +18891,11 @@ end subroutine filltab_polygontype !=======================================================================================! !=======================================================================================! ! This sub-routine will fill the variable table with the sitetype variables (patch- ! - ! -level). ! + ! -level). Because of the sheer number of variables, we must split the subroutines ! + ! into smaller routines. ! !---------------------------------------------------------------------------------------! subroutine filltab_sitetype(igr,ipy,isi,init) - use ed_var_tables, only : vtable_edio_r & ! sub-routine - , vtable_edio_i & ! sub-routine - , metadata_edio ! ! sub-routine - implicit none !----- Arguments. -------------------------------------------------------------------! integer , intent(in) :: init @@ -13339,13 +18934,61 @@ subroutine filltab_sitetype(igr,ipy,isi,init) nvar=nioglobal+niogrid+niopoly !------------------------------------------------------------------------------------! + call filltab_sitetype_p30 (csite,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_sitetype_p31inst (csite,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_sitetype_m31 (csite,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_sitetype_p32 (csite,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_sitetype_p33 (csite,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_sitetype_p34 (csite,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_sitetype_p346 (csite,igr,init,var_len,var_len_global,max_ptrs,nvar) + !------------------------------------------------------------------------------------! + + !----- Save the number of patch-level (sitetype) variables that go to the output. ---! + if (init == 0) niosite=nvar-niopoly-niogrid-nioglobal + !------------------------------------------------------------------------------------! + + return + end subroutine filltab_sitetype + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the patch-level variables ! + ! (sitetype) that have one dimension and are integer (type 30). ! + !---------------------------------------------------------------------------------------! + subroutine filltab_sitetype_p30(csite,igr,init,var_len,var_len_global,max_ptrs,nvar) + use ed_var_tables, only : vtable_edio_i & ! sub-routine + , metadata_edio ! ! sub-routine + + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(sitetype), target :: csite + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! ! This part should have only 1-D vectors (npatches). Notice that they all use ! - ! npts = csite%npatches. Add only variables of types 30 and 31 here. ! + ! npts = csite%npatches. Add only variables of type 30. ! !------------------------------------------------------------------------------------! npts = csite%npatches @@ -13384,6 +19027,51 @@ subroutine filltab_sitetype(igr,ipy,isi,init) var_len,var_len_global,max_ptrs,'NLEV_SFCWATER :30:hist:year') call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if + !------------------------------------------------------------------------------------! + + return + end subroutine filltab_sitetype_p30 + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the patch-level variables ! + ! (sitetype) that have one dimension and are real (type 31). Because of the sheer ! + ! amount of variables with type 31, we do the averages in separate sub-routines. ! + !---------------------------------------------------------------------------------------! + subroutine filltab_sitetype_p31inst(csite,igr,init,var_len,var_len_global,max_ptrs,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine + + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(sitetype), target :: csite + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + ! This part should have only 1-D vectors (npatches). Notice that they all use ! + ! npts = csite%npatches. Add only variables of type 31 that are not fmean, dmean, ! + ! mmean, or mmsqu. ! + !------------------------------------------------------------------------------------! + npts = csite%npatches if (associated(csite%age)) then nvar=nvar+1 @@ -13402,42 +19090,42 @@ subroutine filltab_sitetype(igr,ipy,isi,init) if (associated(csite%fast_soil_C)) then nvar=nvar+1 call vtable_edio_r(npts,csite%fast_soil_C,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'FAST_SOIL_C :31:hist:year:dcyc') + var_len,var_len_global,max_ptrs,'FAST_SOIL_C :31:hist:year:anal') call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if if (associated(csite%slow_soil_C)) then nvar=nvar+1 call vtable_edio_r(npts,csite%slow_soil_C,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'SLOW_SOIL_C :31:hist:year:dcyc') + var_len,var_len_global,max_ptrs,'SLOW_SOIL_C :31:hist:year:anal') call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if if (associated(csite%structural_soil_C)) then nvar=nvar+1 call vtable_edio_r(npts,csite%structural_soil_C,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'STRUCTURAL_SOIL_C :31:hist:year:dcyc') + var_len,var_len_global,max_ptrs,'STRUCTURAL_SOIL_C :31:hist:year:anal') call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if if (associated(csite%structural_soil_L)) then nvar=nvar+1 call vtable_edio_r(npts,csite%structural_soil_L,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'STRUCTURAL_SOIL_L :31:hist:year:dcyc') + var_len,var_len_global,max_ptrs,'STRUCTURAL_SOIL_L :31:hist:year:anal') call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if if (associated(csite%mineralized_soil_N)) then nvar=nvar+1 call vtable_edio_r(npts,csite%mineralized_soil_N,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'MINERALIZED_SOIL_N :31:hist:year:dcyc') + var_len,var_len_global,max_ptrs,'MINERALIZED_SOIL_N :31:hist:year:anal') call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if if (associated(csite%fast_soil_N)) then nvar=nvar+1 call vtable_edio_r(npts,csite%fast_soil_N,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'FAST_SOIL_N :31:hist:year:dcyc') + var_len,var_len_global,max_ptrs,'FAST_SOIL_N :31:hist:year:anal') call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if @@ -13455,8 +19143,6 @@ subroutine filltab_sitetype(igr,ipy,isi,init) call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if - - if (associated(csite%can_theiv)) then nvar=nvar+1 call vtable_edio_r(npts,csite%can_theiv,nvar,igr,init,csite%paglob_id, & @@ -13562,20 +19248,6 @@ subroutine filltab_sitetype(igr,ipy,isi,init) call metadata_edio(nvar,igr,'Soil conductance for evaporation','[m/s]','NA') end if - if (associated(csite%lai)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%lai,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'LAI_PA :31:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(csite%wai)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%wai,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'WAI_PA :31:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if (associated(csite%ground_shv)) then nvar=nvar+1 call vtable_edio_r(npts,csite%ground_shv,nvar,igr,init,csite%paglob_id, & @@ -13611,98 +19283,6 @@ subroutine filltab_sitetype(igr,ipy,isi,init) call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if - - if (associated(csite%mean_rh)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%mean_rh,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'MEAN_RH :31:hist') - call metadata_edio(nvar,igr,'Heterotrophic respiration','[umol/m2/s]','ipatch') - end if - - if (associated(csite%mean_cwd_rh)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%mean_cwd_rh,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'MEAN_CWD_RH :31:hist') - call metadata_edio(nvar,igr,'Coarse woody debris respiration','[umol/m2/s]','ipatch') - end if - - if (associated(csite%dmean_rh)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%dmean_rh,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_RH_PA :31:hist:dail') - call metadata_edio(nvar,igr,'Daily mean of heterotrophic respiration','[kgC/m2/yr]','ipatch') - end if - - if (associated(csite%dmean_cwd_rh)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%dmean_cwd_rh,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_CWD_RH_PA :31:hist:dail') - call metadata_edio(nvar,igr,'Daily mean of CWD respiration','[kgC/m2/yr]','ipatch') - end if - - if (associated(csite%mmean_rh)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%mmean_rh,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_RH_PA :31:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean of heterotrophic respiration','[kgC/m2/yr]','ipatch') - end if - - if (associated(csite%mmean_cwd_rh)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%mmean_cwd_rh,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_CWD_RH_PA :31:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean of CWD respiration','[kgC/m2/yr]','ipatch') - end if - - if (associated(csite%dmean_albedo)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%dmean_albedo,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_ALBEDO_PA :31:hist:dail') - call metadata_edio(nvar,igr,'Daily mean of albedo','[---]','ipatch') - end if - - if (associated(csite%dmean_albedo_beam)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%dmean_albedo_beam,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_ALBEDO_BEAM_PA :31:hist:dail') - call metadata_edio(nvar,igr,'Daily mean of beam albedo','[---]','ipatch') - end if - - if (associated(csite%dmean_albedo_diffuse)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%dmean_albedo_diffuse,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_ALBEDO_DIFFUSE_PA :31:hist:dail') - call metadata_edio(nvar,igr,'Daily mean of diffuse albedo','[---]','ipatch') - end if - - if (associated(csite%mmean_albedo)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%mmean_albedo,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_ALBEDO_PA :31:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean of albedo','[---]','ipatch') - end if - - if (associated(csite%mmean_albedo_beam)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%mmean_albedo_beam,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_ALBEDO_BEAM_PA :31:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean of beam albedo','[---]','ipatch') - end if - - if (associated(csite%mmean_albedo_diffuse)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%mmean_albedo_diffuse,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_ALBEDO_DIFFUSE_PA :31:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean of diffuse albedo','[---]','ipatch') - end if - - if (associated(csite%mean_nep)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%mean_nep,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'MEAN_NEP :31:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if (associated(csite%wbudget_loss2atm)) then nvar=nvar+1 call vtable_edio_r(npts,csite%wbudget_loss2atm,nvar,igr,init,csite%paglob_id, & @@ -13886,13 +19466,6 @@ subroutine filltab_sitetype(igr,ipy,isi,init) call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if - if (associated(csite%co2budget_cwd_rh)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%co2budget_cwd_rh,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'CO2BUDGET_CWD_RH :31:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if (associated(csite%today_A_decomp)) then nvar=nvar+1 call vtable_edio_r(npts,csite%today_A_decomp,nvar,igr,init,csite%paglob_id, & @@ -13907,35 +19480,6 @@ subroutine filltab_sitetype(igr,ipy,isi,init) call metadata_edio(nvar,igr,'NOT A DIAGNOSTIC-WILL ZERO AT END OF DAY','[NA]','NA') end if - if (associated(csite%dmean_A_decomp)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%dmean_A_decomp,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_A_DECOMP :31:hist:dail') - call metadata_edio(nvar,igr,'A factor for decomposition','[--]','ipatch') - end if - - if (associated(csite%dmean_Af_decomp)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%dmean_Af_decomp,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_AF_DECOMP :31:hist:dail') - call metadata_edio(nvar,igr,'A factor for decomposition, including N','[--]','ipatch') - end if - - if (associated(csite%mmean_A_decomp)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%mmean_A_decomp,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_A_DECOMP :31:hist:dcyc:mont') - call metadata_edio(nvar,igr,'Monthly mean of A factor for decomposition','[--]','ipatch') - end if - - if (associated(csite%mmean_Af_decomp)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%mmean_Af_decomp,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_AF_DECOMP :31:hist:dcyc:mont') - call metadata_edio(nvar,igr,'Monthly mean A factor for decomposition, including N','[--]','ipatch') - end if - - if (associated(csite%veg_rough)) then nvar=nvar+1 call vtable_edio_r(npts,csite%veg_rough,nvar,igr,init,csite%paglob_id, & @@ -14258,35 +19802,7 @@ subroutine filltab_sitetype(igr,ipy,isi,init) var_len,var_len_global,max_ptrs,'HPREV :31:hist') call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if - - if (associated(csite%avg_rk4step)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%avg_rk4step,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'AVG_RK4STEP :31:hist:anal') - call metadata_edio(nvar,igr,'Average time step used by Runge-Kutta','[s]','ipatch') - end if - - if (associated(csite%avg_available_water)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%avg_available_water,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'AVG_AVAILABLE_WATER_PA :31:hist:anal') - call metadata_edio(nvar,igr,'Average available water for transpiration','[kg/m2]','ipatch') - end if - - if (associated(csite%dmean_rk4step)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%dmean_rk4step,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_RK4STEP :31:hist:dail') - call metadata_edio(nvar,igr,'Daily mean time step used by Runge-Kutta','[s]','ipatch') - end if - - if (associated(csite%mmean_rk4step)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%mmean_rk4step,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_RK4STEP :31:hist:dcyc:mont') - call metadata_edio(nvar,igr,'Monthly mean time step used by Runge-Kutta','[s]','ipatch') - end if - + if (associated(csite%ustar)) then nvar=nvar+1 call vtable_edio_r(npts,csite%ustar,nvar,igr,init,csite%paglob_id, & @@ -14386,178 +19902,1780 @@ subroutine filltab_sitetype(igr,ipy,isi,init) call metadata_edio(nvar,igr,'Maximum diffuse PAR - not an output variable' & ,'[W/m2]','ipatch') end if + !------------------------------------------------------------------------------------! + + return + end subroutine filltab_sitetype_p31inst + !=======================================================================================! + !=======================================================================================! + - if (associated(csite%avg_rshort_gnd)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%avg_rshort_gnd,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'AVG_RSHORT_GND_PA :31:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if (associated(csite%avg_par_gnd)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%avg_par_gnd,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'AVG_PAR_GND_PA :31:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if (associated(csite%avg_rlong_gnd)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%avg_rlong_gnd,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'AVG_RLONG_GND_PA :31:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if (associated(csite%avg_rlongup)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%avg_rlongup,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'AVG_RLONGUP_PA :31:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if (associated(csite%avg_parup)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%avg_parup,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'AVG_PARUP_PA :31:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the patch-level variables ! + ! (sitetype) that have one dimension, are real (type 31), and are sub-daily averages. ! + !---------------------------------------------------------------------------------------! + subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_ptrs,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine - if (associated(csite%avg_nirup)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%avg_nirup,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'AVG_NIRUP_PA :31:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(sitetype), target :: csite + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! - if (associated(csite%avg_rshortup)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%avg_rshortup,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'AVG_RSHORTUP_PA :31:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if (associated(csite%avg_rnet)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%avg_rnet,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'AVG_RNET_PA :31:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if (associated(csite%avg_albedo)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%avg_albedo,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'AVG_ALBEDO_PA :31:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if (associated(csite%avg_albedo_beam)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%avg_albedo_beam,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'AVG_ALBEDO_BEAM_PA :31:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + ! This part should have only 1-D vectors (npatches). Notice that they all use ! + ! npts = csite%npatches. Add only variables of type 31 that are sub-daily means. ! + !------------------------------------------------------------------------------------! + npts = csite%npatches - if (associated(csite%avg_albedo_diffuse)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%avg_albedo_diffuse,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'AVG_ALBEDO_DIFFUSE_PA :31:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + !------ Averaged properties. --------------------------------------------------------! + if (associated(csite%fmean_rh )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_rh & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_RH_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Heterotrophic respiration' & + ,'[ kg/m2/yr]','(ipatch)' ) + end if + if (associated(csite%fmean_cwd_rh )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_cwd_rh & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_CWD_RH_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Coarse woody debris respiration' & + ,'[ kg/m2/yr]','(ipatch)' ) + end if + if (associated(csite%fmean_nep )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_nep & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_NEP_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Net Ecosystem productivity' & + ,'[ kg/m2/yr]','(ipatch)' ) + end if + if (associated(csite%fmean_rk4step )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_rk4step & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_RK4STEP_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - RK4 time step' & + ,'[ s]','(ipatch)' ) + end if + if (associated(csite%fmean_available_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_available_water & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_AVAILABLE_WATER_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Available water' & + ,'[ kg/m2]','(ipatch)' ) + end if + if (associated(csite%fmean_can_theiv )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_can_theiv & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_CAN_THEIV_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Ice-vapour equiv. pot. temperature - CAS' & + ,'[ K]','(ipatch)' ) + end if + if (associated(csite%fmean_can_theta )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_can_theta & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_CAN_THETA_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Potential temperature - CAS' & + ,'[ K]','(ipatch)' ) + end if + if (associated(csite%fmean_can_vpdef )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_can_vpdef & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_CAN_VPDEF_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Vapour pressure deficit - CAS' & + ,'[ Pa]','(ipatch)' ) + end if + if (associated(csite%fmean_can_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_can_temp & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_CAN_TEMP_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Temperature - CAS' & + ,'[ K]','(ipatch)' ) + end if + if (associated(csite%fmean_can_shv )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_can_shv & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_CAN_SHV_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Specific humidity - CAS' & + ,'[ kg/kg]','(ipatch)' ) + end if + if (associated(csite%fmean_can_co2 )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_can_co2 & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_CAN_CO2_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - CO2 mixing ratio - CAS' & + ,'[ umol/mol]','(ipatch)' ) + end if + if (associated(csite%fmean_can_rhos )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_can_rhos & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_CAN_RHOS_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Air density - CAS' & + ,'[ kg/m3]','(ipatch)' ) + end if + if (associated(csite%fmean_can_prss )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_can_prss & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_CAN_PRSS_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Pressure - CAS' & + ,'[ Pa]','(ipatch)' ) + end if + if (associated(csite%fmean_gnd_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_gnd_temp & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_GND_TEMP_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Ground temperature' & + ,'[ K]','(ipatch)' ) + end if + if (associated(csite%fmean_gnd_shv )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_gnd_shv & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_GND_SHV_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Ground specific humidity' & + ,'[ kg/kg]','(ipatch)' ) + end if + if (associated(csite%fmean_can_ggnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_can_ggnd & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_CAN_GGND_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Net canopy conductance' & + ,'[ m/2]','(ipatch)' ) + end if + if (associated(csite%fmean_sfcw_depth )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_sfcw_depth & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SFCW_DEPTH_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Depth - temporary water layer' & + ,'[ m]','(ipatch)' ) + end if + if (associated(csite%fmean_sfcw_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_sfcw_energy & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SFCW_ENERGY_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Internal energy - temporary water layer' & + ,'[ J/kg]','(ipatch)' ) + end if + if (associated(csite%fmean_sfcw_mass )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_sfcw_mass & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SFCW_MASS_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Water mass - temporary water layer' & + ,'[ kg/m2]','(ipatch)' ) + end if + if (associated(csite%fmean_sfcw_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_sfcw_temp & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SFCW_TEMP_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Temperature - temporary water layer' & + ,'[ K]','(ipatch)' ) + end if + if (associated(csite%fmean_sfcw_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_sfcw_fliq & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SFCW_FLIQ_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Liquid fraction - temporary water layer' & + ,'[ --]','(ipatch)' ) + end if + if (associated(csite%fmean_rshort_gnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_rshort_gnd & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_RSHORT_GND_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Shortwave radiation absorbed by ground' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%fmean_par_gnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_par_gnd & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_PAR_GND_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - PAR absorbed by ground' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%fmean_rlong_gnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_rlong_gnd & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_RLONG_GND_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Longwave radiation absorbed by ground' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%fmean_rlongup )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_rlongup & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_RLONGUP_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Outgoing longwave radiation' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%fmean_parup )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_parup & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_PARUP_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Outgoing PAR' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%fmean_nirup )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_nirup & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_NIRUP_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Outgoing near infra-red radiation' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%fmean_rshortup )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_rshortup & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_RSHORTUP_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Outgoing shortwave radiation' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%fmean_rnet )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_rnet & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_RNET_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Net radiation at top of canopy' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%fmean_albedo )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_albedo & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ALBEDO_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Albedo' & + ,'[ ----]','(ipatch)' ) + end if + if (associated(csite%fmean_albedo_beam )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_albedo_beam & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ALBEDO_BEAM_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Albedo - direct radiation' & + ,'[ ----]','(ipatch)' ) + end if + if (associated(csite%fmean_albedo_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_albedo_diff & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ALBEDO_DIFF_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Albedo - diffuse radiation' & + ,'[ ----]','(ipatch)' ) + end if + if (associated(csite%fmean_rlong_albedo )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_rlong_albedo & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_RLONG_ALBEDO_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Kind of albedo - longwave radiation' & + ,'[ ----]','(ipatch)' ) + end if + if (associated(csite%fmean_ustar )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_ustar & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_USTAR_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Friction velocity' & + ,'[ m/s]','(ipatch)' ) + end if + if (associated(csite%fmean_tstar )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_tstar & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_TSTAR_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Gradient scale for potential temperature' & + ,'[ K]','(ipatch)' ) + end if + if (associated(csite%fmean_qstar )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_qstar & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_QSTAR_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Gradient scale for specific humidity' & + ,'[ kg/kg]','(ipatch)' ) + end if + if (associated(csite%fmean_cstar )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_cstar & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_CSTAR_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Gradient scale for CO2 mixing ratio' & + ,'[ umol/mol]','(ipatch)' ) + end if + if (associated(csite%fmean_carbon_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_carbon_ac & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_CARBON_AC_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - CO2 flux: atmosphere -> CAS' & + ,'[ umol/m2/s]','(ipatch)' ) + end if + if (associated(csite%fmean_carbon_st )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_carbon_st & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_CARBON_ST_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - CO2 storage at CAS' & + ,'[ umol/m2/s]','(ipatch)' ) + end if + if (associated(csite%fmean_vapor_gc )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_vapor_gc & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_VAPOR_GC_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Water vapour flux: ground -> CAS' & + ,'[ kg/m2/s]','(ipatch)' ) + end if + if (associated(csite%fmean_vapor_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_vapor_ac & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_VAPOR_AC_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Water vapour flux: atmosphere -> CAS' & + ,'[ kg/m2/s]','(ipatch)' ) + end if + if (associated(csite%fmean_throughfall )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_throughfall & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_THROUGHFALL_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Throughfall rate' & + ,'[ kg/m2/s]','(ipatch)' ) + end if + if (associated(csite%fmean_runoff )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_runoff & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_RUNOFF_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Water runoff' & + ,'[ kg/m2/s]','(ipatch)' ) + end if + if (associated(csite%fmean_drainage )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_drainage & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_DRAINAGE_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Water drainage' & + ,'[ kg/m2/s]','(ipatch)' ) + end if + if (associated(csite%fmean_sensible_gc )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_sensible_gc & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SENSIBLE_GC_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Sensible heat flux: ground -> CAS' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%fmean_sensible_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_sensible_ac & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SENSIBLE_AC_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Sensible heat flux: atmosphere -> CAS' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%fmean_qthroughfall )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_qthroughfall & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_QTHROUGHFALL_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Throughfall rate' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%fmean_qrunoff )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_qrunoff & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_QRUNOFF_PA :31:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Surface runoff' & + ,'[ W/m2]','(ipatch)' ) end if + !------------------------------------------------------------------------------------! - if (associated(csite%avg_rlong_albedo)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%avg_rlong_albedo,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'AVG_RLONG_ALBEDO_PA :31:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + return + end subroutine filltab_sitetype_p31fmean + !=======================================================================================! + !=======================================================================================! - if (associated(csite%avg_ustar)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%avg_ustar,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'AVG_USTAR_PA :31:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if (associated(csite%avg_tstar)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%avg_tstar,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'AVG_TSTAR_PA :31:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if (associated(csite%avg_qstar)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%avg_qstar,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'AVG_QSTAR_PA :31:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if (associated(csite%avg_cstar)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%avg_cstar,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'AVG_CSTAR_PA :31:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if (associated(csite%avg_carbon_ac)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%avg_carbon_ac,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'AVG_CARBON_AC_PA :31:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if (associated(csite%avg_carbon_st)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%avg_carbon_st,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'AVG_CARBON_ST_PA :31:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the patch-level variables ! + ! (sitetype) that have one dimension, are real (type 31), and are daily averages. ! + !---------------------------------------------------------------------------------------! + subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_ptrs,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine - if(associated(csite%dmean_co2_residual)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%dmean_co2_residual,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_CO2_RESIDUAL_PA :31:hist:dail') - call metadata_edio(nvar,igr,'Daily mean of residual canopy CO2 ','[umol/m2/day]','ipoly') - end if + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(sitetype), target :: csite + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! - if(associated(csite%dmean_water_residual)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%dmean_water_residual,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_WATER_RESIDUAL_PA :31:hist:dail') - call metadata_edio(nvar,igr,'Daily mean of residual water ','[kg/m2/day]','ipoly') - end if - if(associated(csite%dmean_energy_residual)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%dmean_energy_residual,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_ENERGY_RESIDUAL_PA :31:hist:dail') - call metadata_edio(nvar,igr,'Daily mean of residual water ','[J/m2/day]','ipoly') - end if - if(associated(csite%mmean_co2_residual)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%mmean_co2_residual,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_CO2_RESIDUAL_PA :31:hist:dcyc:mont') - call metadata_edio(nvar,igr,'Monthly mean of residual canopy CO2 ','[umol/m2/day]','ipoly') - end if - if(associated(csite%mmean_water_residual)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%mmean_water_residual,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_WATER_RESIDUAL_PA :31:hist:dcyc:mont') - call metadata_edio(nvar,igr,'Monthly mean of residual water ','[kg/m2/day]','ipoly') - end if + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + ! This part should have only 1-D vectors (npatches). Notice that they all use ! + ! npts = csite%npatches. Add only variables of type 31 that are daily means. ! + !------------------------------------------------------------------------------------! + npts = csite%npatches - if(associated(csite%mmean_energy_residual)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%mmean_energy_residual,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_ENERGY_RESIDUAL_PA :31:hist:dcyc:mont') - call metadata_edio(nvar,igr,'Monthly mean of residual energy ','[J/m2/day]','ipoly') + + if (associated(csite%dmean_A_decomp )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_A_decomp & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_A_DECOMP_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Decomposition scale' & + ,'[ --]','(ipatch)' ) + end if + if (associated(csite%dmean_Af_decomp )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_Af_decomp & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_AF_DECOMP_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Decomposition scale with N immobilisation' & + ,'[ --]','(ipatch)' ) + end if + if (associated(csite%dmean_co2_residual )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_co2_residual & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CO2_RESIDUAL_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Budget check - CO2 residual' & + ,'[ umol/m2]','(ipatch)' ) + end if + if (associated(csite%dmean_energy_residual )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_energy_residual & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ENERGY_RESIDUAL_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Budget check - Enthalpy residual' & + ,'[ J/m2]','(ipatch)' ) + end if + if (associated(csite%dmean_water_residual )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_water_residual & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_WATER_RESIDUAL_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Budget check - Water residual' & + ,'[ kg/m2]','(ipatch)' ) + end if + + if (associated(csite%dmean_rh )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_rh & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_RH_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Heterotrophic respiration' & + ,'[ kg/m2/yr]','(ipatch)' ) + end if + if (associated(csite%dmean_cwd_rh )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_cwd_rh & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CWD_RH_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Coarse woody debris respiration' & + ,'[ kg/m2/yr]','(ipatch)' ) + end if + if (associated(csite%dmean_nep )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_nep & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_NEP_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Net Ecosystem productivity' & + ,'[ kg/m2/yr]','(ipatch)' ) + end if + if (associated(csite%dmean_rk4step )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_rk4step & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_RK4STEP_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - RK4 time step' & + ,'[ s]','(ipatch)' ) + end if + if (associated(csite%dmean_available_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_available_water & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_AVAILABLE_WATER_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Available water' & + ,'[ kg/m2]','(ipatch)' ) + end if + if (associated(csite%dmean_can_theiv )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_can_theiv & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CAN_THEIV_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Ice-vapour equiv. pot. temperature - CAS' & + ,'[ K]','(ipatch)' ) + end if + if (associated(csite%dmean_can_theta )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_can_theta & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CAN_THETA_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Potential temperature - CAS' & + ,'[ K]','(ipatch)' ) + end if + if (associated(csite%dmean_can_vpdef )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_can_vpdef & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CAN_VPDEF_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Vapour pressure deficit - CAS' & + ,'[ Pa]','(ipatch)' ) + end if + if (associated(csite%dmean_can_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_can_temp & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CAN_TEMP_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Temperature - CAS' & + ,'[ K]','(ipatch)' ) + end if + if (associated(csite%dmean_can_shv )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_can_shv & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CAN_SHV_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Specific humidity - CAS' & + ,'[ kg/kg]','(ipatch)' ) + end if + if (associated(csite%dmean_can_co2 )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_can_co2 & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CAN_CO2_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - CO2 mixing ratio - CAS' & + ,'[ umol/mol]','(ipatch)' ) + end if + if (associated(csite%dmean_can_rhos )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_can_rhos & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CAN_RHOS_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Air density - CAS' & + ,'[ kg/m3]','(ipatch)' ) + end if + if (associated(csite%dmean_can_prss )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_can_prss & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CAN_PRSS_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Pressure - CAS' & + ,'[ Pa]','(ipatch)' ) + end if + if (associated(csite%dmean_gnd_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_gnd_temp & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_GND_TEMP_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Ground temperature' & + ,'[ K]','(ipatch)' ) + end if + if (associated(csite%dmean_gnd_shv )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_gnd_shv & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_GND_SHV_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Ground specific humidity' & + ,'[ kg/kg]','(ipatch)' ) + end if + if (associated(csite%dmean_can_ggnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_can_ggnd & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CAN_GGND_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Net canopy conductance' & + ,'[ m/2]','(ipatch)' ) + end if + if (associated(csite%dmean_sfcw_depth )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_sfcw_depth & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SFCW_DEPTH_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Depth - temporary water layer' & + ,'[ m]','(ipatch)' ) + end if + if (associated(csite%dmean_sfcw_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_sfcw_energy & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SFCW_ENERGY_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Internal energy - temporary water layer' & + ,'[ J/kg]','(ipatch)' ) + end if + if (associated(csite%dmean_sfcw_mass )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_sfcw_mass & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SFCW_MASS_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Water mass - temporary water layer' & + ,'[ kg/m2]','(ipatch)' ) + end if + if (associated(csite%dmean_sfcw_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_sfcw_temp & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SFCW_TEMP_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Temperature - temporary water layer' & + ,'[ K]','(ipatch)' ) + end if + if (associated(csite%dmean_sfcw_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_sfcw_fliq & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SFCW_FLIQ_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Liquid fraction - temporary water layer' & + ,'[ --]','(ipatch)' ) + end if + if (associated(csite%dmean_rshort_gnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_rshort_gnd & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_RSHORT_GND_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Shortwave radiation absorbed by ground' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%dmean_par_gnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_par_gnd & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_PAR_GND_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - PAR absorbed by ground' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%dmean_rlong_gnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_rlong_gnd & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_RLONG_GND_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Longwave radiation absorbed by ground' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%dmean_rlongup )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_rlongup & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_RLONGUP_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Outgoing longwave radiation' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%dmean_parup )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_parup & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_PARUP_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Outgoing PAR' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%dmean_nirup )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_nirup & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_NIRUP_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Outgoing near infra-red radiation' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%dmean_rshortup )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_rshortup & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_RSHORTUP_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Outgoing shortwave radiation' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%dmean_rnet )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_rnet & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_RNET_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Net radiation at top of canopy' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%dmean_albedo )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_albedo & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ALBEDO_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Albedo' & + ,'[ ----]','(ipatch)' ) + end if + if (associated(csite%dmean_albedo_beam )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_albedo_beam & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ALBEDO_BEAM_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Albedo - direct radiation' & + ,'[ ----]','(ipatch)' ) + end if + if (associated(csite%dmean_albedo_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_albedo_diff & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ALBEDO_DIFF_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Albedo - diffuse radiation' & + ,'[ ----]','(ipatch)' ) + end if + if (associated(csite%dmean_rlong_albedo )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_rlong_albedo & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_RLONG_ALBEDO_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Kind of albedo - longwave radiation' & + ,'[ ----]','(ipatch)' ) + end if + if (associated(csite%dmean_ustar )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_ustar & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_USTAR_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Friction velocity' & + ,'[ m/s]','(ipatch)' ) + end if + if (associated(csite%dmean_tstar )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_tstar & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_TSTAR_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Gradient scale for potential temperature' & + ,'[ K]','(ipatch)' ) + end if + if (associated(csite%dmean_qstar )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_qstar & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_QSTAR_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Gradient scale for specific humidity' & + ,'[ kg/kg]','(ipatch)' ) + end if + if (associated(csite%dmean_cstar )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_cstar & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CSTAR_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Gradient scale for CO2 mixing ratio' & + ,'[ umol/mol]','(ipatch)' ) + end if + if (associated(csite%dmean_carbon_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_carbon_ac & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CARBON_AC_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - CO2 flux: atmosphere -> CAS' & + ,'[ umol/m2/s]','(ipatch)' ) + end if + if (associated(csite%dmean_carbon_st )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_carbon_st & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_CARBON_ST_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - CO2 storage at CAS' & + ,'[ umol/m2/s]','(ipatch)' ) + end if + if (associated(csite%dmean_vapor_gc )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_vapor_gc & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_VAPOR_GC_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Water vapour flux: ground -> CAS' & + ,'[ kg/m2/s]','(ipatch)' ) + end if + if (associated(csite%dmean_vapor_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_vapor_ac & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_VAPOR_AC_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Water vapour flux: atmosphere -> CAS' & + ,'[ kg/m2/s]','(ipatch)' ) + end if + if (associated(csite%dmean_throughfall )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_throughfall & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_THROUGHFALL_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Throughfall rate' & + ,'[ kg/m2/s]','(ipatch)' ) + end if + if (associated(csite%dmean_runoff )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_runoff & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_RUNOFF_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Water runoff' & + ,'[ kg/m2/s]','(ipatch)' ) + end if + if (associated(csite%dmean_drainage )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_drainage & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_DRAINAGE_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Water drainage' & + ,'[ kg/m2/s]','(ipatch)' ) + end if + if (associated(csite%dmean_sensible_gc )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_sensible_gc & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SENSIBLE_GC_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Sensible heat flux: ground -> CAS' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%dmean_sensible_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_sensible_ac & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SENSIBLE_AC_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Sensible heat flux: atmosphere -> CAS' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%dmean_qthroughfall )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_qthroughfall & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_QTHROUGHFALL_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Throughfall rate' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%dmean_qrunoff )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_qrunoff & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_QRUNOFF_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Surface runoff' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%dmean_qdrainage )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_qdrainage & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_QDRAINAGE_PA :31:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Drainage energy loss' & + ,'[ W/m2]','(ipatch)' ) end if + !------------------------------------------------------------------------------------! + + return + end subroutine filltab_sitetype_p31dmean + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the patch-level variables ! + ! (sitetype) that have one dimension, are real (type 31), and are monthly means or mean ! + ! sum of squares. ! + !---------------------------------------------------------------------------------------! + subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_ptrs,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine + + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(sitetype), target :: csite + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + ! This part should have only 1-D vectors (npatches). Notice that they all use ! + ! npts = csite%npatches. Add only variables of type 31 that are monthly means. ! + !------------------------------------------------------------------------------------! + npts = csite%npatches + if (associated(csite%mmean_rh )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_rh & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_RH_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Heterotrophic respiration' & + ,'[ kg/m2/yr]','(ipatch)' ) + end if + if (associated(csite%mmean_cwd_rh )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_cwd_rh & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CWD_RH_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Coarse woody debris respiration' & + ,'[ kg/m2/yr]','(ipatch)' ) + end if + if (associated(csite%mmean_nep )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_nep & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_NEP_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Net Ecosystem productivity' & + ,'[ kg/m2/yr]','(ipatch)' ) + end if + if (associated(csite%mmean_rk4step )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_rk4step & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_RK4STEP_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - RK4 time step' & + ,'[ s]','(ipatch)' ) + end if + if (associated(csite%mmean_available_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_available_water & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_AVAILABLE_WATER_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Available water' & + ,'[ kg/m2]','(ipatch)' ) + end if + if (associated(csite%mmean_can_theiv )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_can_theiv & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CAN_THEIV_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Ice-vapour equiv. pot. temperature - CAS' & + ,'[ K]','(ipatch)' ) + end if + if (associated(csite%mmean_can_theta )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_can_theta & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CAN_THETA_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Potential temperature - CAS' & + ,'[ K]','(ipatch)' ) + end if + if (associated(csite%mmean_can_vpdef )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_can_vpdef & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CAN_VPDEF_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Vapour pressure deficit - CAS' & + ,'[ Pa]','(ipatch)' ) + end if + if (associated(csite%mmean_can_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_can_temp & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CAN_TEMP_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Temperature - CAS' & + ,'[ K]','(ipatch)' ) + end if + if (associated(csite%mmean_can_shv )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_can_shv & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CAN_SHV_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Specific humidity - CAS' & + ,'[ kg/kg]','(ipatch)' ) + end if + if (associated(csite%mmean_can_co2 )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_can_co2 & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CAN_CO2_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - CO2 mixing ratio - CAS' & + ,'[ umol/mol]','(ipatch)' ) + end if + if (associated(csite%mmean_can_rhos )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_can_rhos & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CAN_RHOS_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Air density - CAS' & + ,'[ kg/m3]','(ipatch)' ) + end if + if (associated(csite%mmean_can_prss )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_can_prss & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CAN_PRSS_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Pressure - CAS' & + ,'[ Pa]','(ipatch)' ) + end if + if (associated(csite%mmean_gnd_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_gnd_temp & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_GND_TEMP_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Ground temperature' & + ,'[ K]','(ipatch)' ) + end if + if (associated(csite%mmean_gnd_shv )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_gnd_shv & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_GND_SHV_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Ground specific humidity' & + ,'[ kg/kg]','(ipatch)' ) + end if + if (associated(csite%mmean_can_ggnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_can_ggnd & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CAN_GGND_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Net canopy conductance' & + ,'[ m/2]','(ipatch)' ) + end if + if (associated(csite%mmean_sfcw_depth )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_sfcw_depth & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SFCW_DEPTH_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Depth - temporary water layer' & + ,'[ m]','(ipatch)' ) + end if + if (associated(csite%mmean_sfcw_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_sfcw_energy & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SFCW_ENERGY_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Internal energy - temporary water layer' & + ,'[ J/kg]','(ipatch)' ) + end if + if (associated(csite%mmean_sfcw_mass )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_sfcw_mass & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SFCW_MASS_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Water mass - temporary water layer' & + ,'[ kg/m2]','(ipatch)' ) + end if + if (associated(csite%mmean_sfcw_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_sfcw_temp & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SFCW_TEMP_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Temperature - temporary water layer' & + ,'[ K]','(ipatch)' ) + end if + if (associated(csite%mmean_sfcw_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_sfcw_fliq & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SFCW_FLIQ_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Liquid fraction - temporary water layer' & + ,'[ --]','(ipatch)' ) + end if + if (associated(csite%mmean_rshort_gnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_rshort_gnd & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_RSHORT_GND_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Shortwave radiation absorbed by ground' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%mmean_par_gnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_par_gnd & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_PAR_GND_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - PAR absorbed by ground' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%mmean_rlong_gnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_rlong_gnd & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_RLONG_GND_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Longwave radiation absorbed by ground' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%mmean_rlongup )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_rlongup & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_RLONGUP_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Outgoing longwave radiation' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%mmean_parup )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_parup & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_PARUP_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Outgoing PAR' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%mmean_nirup )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_nirup & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_NIRUP_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Outgoing near infra-red radiation' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%mmean_rshortup )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_rshortup & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_RSHORTUP_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Outgoing shortwave radiation' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%mmean_rnet )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_rnet & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_RNET_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Net radiation at top of canopy' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%mmean_albedo )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_albedo & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ALBEDO_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Albedo' & + ,'[ ----]','(ipatch)' ) + end if + if (associated(csite%mmean_albedo_beam )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_albedo_beam & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ALBEDO_BEAM_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Albedo - direct radiation' & + ,'[ ----]','(ipatch)' ) + end if + if (associated(csite%mmean_albedo_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_albedo_diff & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ALBEDO_DIFF_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Albedo - diffuse radiation' & + ,'[ ----]','(ipatch)' ) + end if + if (associated(csite%mmean_rlong_albedo )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_rlong_albedo & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_RLONG_ALBEDO_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Kind of albedo - longwave radiation' & + ,'[ ----]','(ipatch)' ) + end if + if (associated(csite%mmean_ustar )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_ustar & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_USTAR_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Friction velocity' & + ,'[ m/s]','(ipatch)' ) + end if + if (associated(csite%mmean_tstar )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_tstar & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_TSTAR_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Gradient scale for potential temperature' & + ,'[ K]','(ipatch)' ) + end if + if (associated(csite%mmean_qstar )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_qstar & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_QSTAR_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Gradient scale for specific humidity' & + ,'[ kg/kg]','(ipatch)' ) + end if + if (associated(csite%mmean_cstar )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_cstar & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CSTAR_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Gradient scale for CO2 mixing ratio' & + ,'[ umol/mol]','(ipatch)' ) + end if + if (associated(csite%mmean_carbon_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_carbon_ac & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CARBON_AC_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - CO2 flux: atmosphere -> CAS' & + ,'[ umol/m2/s]','(ipatch)' ) + end if + if (associated(csite%mmean_carbon_st )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_carbon_st & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CARBON_ST_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - CO2 storage at CAS' & + ,'[ umol/m2/s]','(ipatch)' ) + end if + if (associated(csite%mmean_vapor_gc )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_vapor_gc & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_VAPOR_GC_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Water vapour flux: ground -> CAS' & + ,'[ kg/m2/s]','(ipatch)' ) + end if + if (associated(csite%mmean_vapor_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_vapor_ac & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_VAPOR_AC_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Water vapour flux: atmosphere -> CAS' & + ,'[ kg/m2/s]','(ipatch)' ) + end if + if (associated(csite%mmean_throughfall )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_throughfall & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_THROUGHFALL_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Throughfall rate' & + ,'[ kg/m2/s]','(ipatch)' ) + end if + if (associated(csite%mmean_runoff )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_runoff & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_RUNOFF_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Water runoff' & + ,'[ kg/m2/s]','(ipatch)' ) + end if + if (associated(csite%mmean_drainage )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_drainage & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_DRAINAGE_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Water drainage' & + ,'[ kg/m2/s]','(ipatch)' ) + end if + if (associated(csite%mmean_sensible_gc )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_sensible_gc & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SENSIBLE_GC_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Sensible heat flux: ground -> CAS' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%mmean_sensible_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_sensible_ac & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SENSIBLE_AC_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Sensible heat flux: atmosphere -> CAS' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%mmean_qthroughfall )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_qthroughfall & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_QTHROUGHFALL_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Throughfall rate' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%mmean_qrunoff )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_qrunoff & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_QRUNOFF_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Surface runoff' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%mmean_qdrainage )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_qdrainage & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_QDRAINAGE_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Drainage energy loss' & + ,'[ W/m2]','(ipatch)' ) + end if + if (associated(csite%mmean_fast_soil_c )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_fast_soil_c & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_FAST_SOIL_C :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Soil Carbon (Fast pool)' & + ,'[ kgC/m2]','(ipatch)' ) + end if + if (associated(csite%mmean_slow_soil_c )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_slow_soil_c & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SLOW_SOIL_C :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Soil Carbon (Slow pool)' & + ,'[ kgC/m2]','(ipatch)' ) + end if + if (associated(csite%mmean_struct_soil_c )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_struct_soil_c & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_STRUCT_SOIL_C :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Soil Carbon (Structural pool)' & + ,'[ kgC/m2]','(ipatch)' ) + end if + if (associated(csite%mmean_struct_soil_l )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_struct_soil_l & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_STRUCT_SOIL_L :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Soil Lignin (Structural pool)' & + ,'[ kgL/m2]','(ipatch)' ) + end if + if (associated(csite%mmean_fast_soil_n )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_fast_soil_n & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_FAST_SOIL_N :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Soil Nitrogen (Fast pool)' & + ,'[ kgN/m2]','(ipatch)' ) + end if + if (associated(csite%mmean_mineral_soil_n )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_mineral_soil_n & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_MINERAL_SOIL_N :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Soil Nitrogen (Mineralised pool)' & + ,'[ kgN/m2]','(ipatch)' ) + end if + if (associated(csite%mmean_A_decomp )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_A_decomp & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_A_DECOMP_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Decomposition scale' & + ,'[ --]','(ipatch)' ) + end if + if (associated(csite%mmean_Af_decomp )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_Af_decomp & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_AF_DECOMP_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Decomposition scale with N immobilisation' & + ,'[ --]','(ipatch)' ) + end if + if (associated(csite%mmean_co2_residual )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_co2_residual & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CO2_RESIDUAL_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Budget check - CO2 residual' & + ,'[ umol/m2]','(ipatch)' ) + end if + if (associated(csite%mmean_energy_residual )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_energy_residual & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ENERGY_RESIDUAL_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Budget check - Enthalpy residual' & + ,'[ J/m2]','(ipatch)' ) + end if + if (associated(csite%mmean_water_residual )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_water_residual & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_WATER_RESIDUAL_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Budget check - Water residual' & + ,'[ kg/m2]','(ipatch)' ) + end if + if (associated(csite%mmsqu_rh )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmsqu_rh & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_RH_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Heterotrophic respiration' & + ,'[ kg2/m4/yr2]','(ipatch)' ) + end if + if (associated(csite%mmsqu_cwd_rh )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmsqu_cwd_rh & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_CWD_RH_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Coarse woody debris respiration' & + ,'[ kg2/m4/yr2]','(ipatch)' ) + end if + if (associated(csite%mmsqu_nep )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmsqu_nep & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_NEP_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Net Ecosystem productivity' & + ,'[ kg2/m4/yr2]','(ipatch)' ) + end if + if (associated(csite%mmsqu_rlongup )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmsqu_rlongup & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_RLONGUP_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Outgoing longwave radiation' & + ,'[ W2/m4]','(ipatch)' ) + end if + if (associated(csite%mmsqu_parup )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmsqu_parup & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_PARUP_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Outgoing PAR' & + ,'[ W2/m4]','(ipatch)' ) + end if + if (associated(csite%mmsqu_nirup )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmsqu_nirup & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_NIRUP_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Outgoing near infra-red radiation' & + ,'[ W2/m4]','(ipatch)' ) + end if + if (associated(csite%mmsqu_rshortup )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmsqu_rshortup & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_RSHORTUP_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Outgoing shortwave radiation' & + ,'[ W2/m4]','(ipatch)' ) + end if + if (associated(csite%mmsqu_rnet )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmsqu_rnet & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_RNET_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Net radiation at top of canopy' & + ,'[ W2/m4]','(ipatch)' ) + end if + if (associated(csite%mmsqu_albedo )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmsqu_albedo & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_ALBEDO_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Albedo' & + ,'[ ----]','(ipatch)' ) + end if + if (associated(csite%mmsqu_ustar )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmsqu_ustar & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_USTAR_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Friction velocity' & + ,'[ m2/s2]','(ipatch)' ) + end if + if (associated(csite%mmsqu_carbon_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmsqu_carbon_ac & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_CARBON_AC_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - CO2 flux: atmosphere -> CAS' & + ,'[umol2/m4/s2]','(ipatch)' ) + end if + if (associated(csite%mmsqu_carbon_st )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmsqu_carbon_st & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_CARBON_ST_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - CO2 storage at CAS' & + ,'[umol2/m4/s2]','(ipatch)' ) + end if + if (associated(csite%mmsqu_vapor_gc )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmsqu_vapor_gc & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_VAPOR_GC_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Water vapour flux: ground -> CAS' & + ,'[ kg2/m4/s2]','(ipatch)' ) + end if + if (associated(csite%mmsqu_vapor_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmsqu_vapor_ac & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_VAPOR_AC_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Water vapour flux: atmosphere -> CAS' & + ,'[ kg2/m4/s2]','(ipatch)' ) + end if + if (associated(csite%mmsqu_sensible_gc )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmsqu_sensible_gc & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_SENSIBLE_GC_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Sensible heat flux: ground -> CAS' & + ,'[ W2/m4]','(ipatch)' ) + end if + if (associated(csite%mmsqu_sensible_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmsqu_sensible_ac & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_SENSIBLE_AC_PA :31:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Sensible heat flux: atmosphere -> CAS' & + ,'[ W2/m4]','(ipatch)' ) + end if + !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! + return + end subroutine filltab_sitetype_p31mmean + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the patch-level variables ! + ! (sitetype) that have two dimensions (ndcycle,npatches), and are of type -31 (qmean ! + ! and qmsqu). ! + !---------------------------------------------------------------------------------------! + subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine + + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(sitetype), target :: csite + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! @@ -14571,44 +21689,626 @@ subroutine filltab_sitetype(igr,ipy,isi,init) !------------------------------------------------------------------------------------! npts = csite%npatches * ndcycle - if (associated(csite%qmean_rh)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%qmean_rh,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_RH_PA :-31:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if (associated(csite%qmean_cwd_rh)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%qmean_cwd_rh,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_CWD_RH_PA :-31:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + if (associated(csite%qmean_rh )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_rh & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_RH_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Heterotrophic respiration' & + ,'[ kg/m2/yr]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_cwd_rh )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_cwd_rh & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_CWD_RH_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Coarse woody debris respiration' & + ,'[ kg/m2/yr]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_nep )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_nep & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_NEP_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Net Ecosystem productivity' & + ,'[ kg/m2/yr]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_rk4step )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_rk4step & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_RK4STEP_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - RK4 time step' & + ,'[ s]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_available_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_available_water & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_AVAILABLE_WATER_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Available water' & + ,'[ kg/m2]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_can_theiv )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_can_theiv & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_CAN_THEIV_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Ice-vapour equiv. pot. temperature - CAS' & + ,'[ K]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_can_theta )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_can_theta & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_CAN_THETA_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Potential temperature - CAS' & + ,'[ K]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_can_vpdef )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_can_vpdef & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_CAN_VPDEF_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Vapour pressure deficit - CAS' & + ,'[ Pa]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_can_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_can_temp & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_CAN_TEMP_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Temperature - CAS' & + ,'[ K]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_can_shv )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_can_shv & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_CAN_SHV_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Specific humidity - CAS' & + ,'[ kg/kg]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_can_co2 )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_can_co2 & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_CAN_CO2_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - CO2 mixing ratio - CAS' & + ,'[ umol/mol]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_can_rhos )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_can_rhos & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_CAN_RHOS_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Air density - CAS' & + ,'[ kg/m3]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_can_prss )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_can_prss & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_CAN_PRSS_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Pressure - CAS' & + ,'[ Pa]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_gnd_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_gnd_temp & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_GND_TEMP_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Ground temperature' & + ,'[ K]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_gnd_shv )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_gnd_shv & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_GND_SHV_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Ground specific humidity' & + ,'[ kg/kg]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_can_ggnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_can_ggnd & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_CAN_GGND_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Net canopy conductance' & + ,'[ m/2]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_sfcw_depth )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_sfcw_depth & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SFCW_DEPTH_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Depth - temporary water layer' & + ,'[ m]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_sfcw_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_sfcw_energy & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SFCW_ENERGY_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Internal energy - temporary water layer' & + ,'[ J/kg]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_sfcw_mass )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_sfcw_mass & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SFCW_MASS_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Water mass - temporary water layer' & + ,'[ kg/m2]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_sfcw_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_sfcw_temp & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SFCW_TEMP_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Temperature - temporary water layer' & + ,'[ K]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_sfcw_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_sfcw_fliq & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SFCW_FLIQ_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Liquid fraction - temporary water layer' & + ,'[ --]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_rshort_gnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_rshort_gnd & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_RSHORT_GND_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Shortwave radiation absorbed by ground' & + ,'[ W/m2]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_par_gnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_par_gnd & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_PAR_GND_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - PAR absorbed by ground' & + ,'[ W/m2]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_rlong_gnd )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_rlong_gnd & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_RLONG_GND_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Longwave radiation absorbed by ground' & + ,'[ W/m2]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_rlongup )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_rlongup & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_RLONGUP_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Outgoing longwave radiation' & + ,'[ W/m2]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_parup )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_parup & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_PARUP_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Outgoing PAR' & + ,'[ W/m2]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_nirup )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_nirup & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_NIRUP_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Outgoing near infra-red radiation' & + ,'[ W/m2]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_rshortup )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_rshortup & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_RSHORTUP_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Outgoing shortwave radiation' & + ,'[ W/m2]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_rnet )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_rnet & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_RNET_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Net radiation at top of canopy' & + ,'[ W/m2]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_albedo )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_albedo & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ALBEDO_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Albedo' & + ,'[ ----]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_albedo_beam )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_albedo_beam & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ALBEDO_BEAM_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Albedo - direct radiation' & + ,'[ ----]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_albedo_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_albedo_diff & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ALBEDO_DIFF_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Albedo - diffuse radiation' & + ,'[ ----]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_rlong_albedo )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_rlong_albedo & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_RLONG_ALBEDO_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Kind of albedo - longwave radiation' & + ,'[ ----]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_ustar )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_ustar & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_USTAR_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Friction velocity' & + ,'[ m/s]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_tstar )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_tstar & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_TSTAR_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Gradient scale for potential temperature' & + ,'[ K]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_qstar )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_qstar & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_QSTAR_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Gradient scale for specific humidity' & + ,'[ kg/kg]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_cstar )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_cstar & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_CSTAR_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Gradient scale for CO2 mixing ratio' & + ,'[ umol/mol]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_carbon_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_carbon_ac & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_CARBON_AC_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - CO2 flux: atmosphere -> CAS' & + ,'[ umol/m2/s]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_carbon_st )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_carbon_st & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_CARBON_ST_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - CO2 storage at CAS' & + ,'[ umol/m2/s]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_vapor_gc )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_vapor_gc & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_VAPOR_GC_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Water vapour flux: ground -> CAS' & + ,'[ kg/m2/s]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_vapor_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_vapor_ac & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_VAPOR_AC_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Water vapour flux: atmosphere -> CAS' & + ,'[ kg/m2/s]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_throughfall )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_throughfall & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_THROUGHFALL_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Throughfall rate' & + ,'[ kg/m2/s]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_runoff )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_runoff & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_RUNOFF_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Water runoff' & + ,'[ kg/m2/s]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_drainage )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_drainage & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_DRAINAGE_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Water drainage' & + ,'[ kg/m2/s]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_sensible_gc )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_sensible_gc & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SENSIBLE_GC_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Sensible heat flux: ground -> CAS' & + ,'[ W/m2]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_sensible_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_sensible_ac & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SENSIBLE_AC_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Sensible heat flux: atmosphere -> CAS' & + ,'[ W/m2]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_qthroughfall )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_qthroughfall & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_QTHROUGHFALL_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Throughfall rate' & + ,'[ W/m2]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_qrunoff )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_qrunoff & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_QRUNOFF_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Surface runoff' & + ,'[ W/m2]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmean_qdrainage )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_qdrainage & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_QDRAINAGE_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Drainage energy loss' & + ,'[ W/m2]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmsqu_rh )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmsqu_rh & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_RH_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Heterotrophic respiration' & + ,'[ kg2/m4/yr2]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmsqu_cwd_rh )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmsqu_cwd_rh & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_CWD_RH_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Coarse woody debris respiration' & + ,'[ kg2/m4/yr2]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmsqu_nep )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmsqu_nep & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_NEP_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Net Ecosystem productivity' & + ,'[ kg2/m4/yr2]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmsqu_rlongup )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmsqu_rlongup & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_RLONGUP_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Outgoing longwave radiation' & + ,'[ W2/m4]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmsqu_parup )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmsqu_parup & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_PARUP_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Outgoing PAR' & + ,'[ W2/m4]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmsqu_nirup )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmsqu_nirup & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_NIRUP_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Outgoing near infra-red radiation' & + ,'[ W2/m4]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmsqu_rshortup )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmsqu_rshortup & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_RSHORTUP_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Outgoing shortwave radiation' & + ,'[ W2/m4]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmsqu_rnet )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmsqu_rnet & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_RNET_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Net radiation at top of canopy' & + ,'[ W2/m4]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmsqu_albedo )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmsqu_albedo & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_ALBEDO_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Albedo' & + ,'[ ----]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmsqu_ustar )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmsqu_ustar & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_USTAR_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Friction velocity' & + ,'[ m2/s2]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmsqu_carbon_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmsqu_carbon_ac & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_CARBON_AC_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - CO2 flux: atmosphere -> CAS' & + ,'[umol2/m4/s2]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmsqu_carbon_st )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmsqu_carbon_st & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_CARBON_ST_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - CO2 storage at CAS' & + ,'[umol2/m4/s2]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmsqu_vapor_gc )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmsqu_vapor_gc & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_VAPOR_GC_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Water vapour flux: ground -> CAS' & + ,'[ kg2/m4/s2]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmsqu_vapor_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmsqu_vapor_ac & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_VAPOR_AC_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Water vapour flux: atmosphere -> CAS' & + ,'[ kg2/m4/s2]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmsqu_sensible_gc )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmsqu_sensible_gc & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_SENSIBLE_GC_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Sensible heat flux: ground -> CAS' & + ,'[ W2/m4]','(ndcycle,ipatch)' ) + end if + if (associated(csite%qmsqu_sensible_ac )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmsqu_sensible_ac & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_SENSIBLE_AC_PA :-31:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Sensible heat flux: atmosphere -> CAS' & + ,'[ W2/m4]','(ndcycle,ipatch)' ) end if + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + + return + end subroutine filltab_sitetype_m31 + !=======================================================================================! + !=======================================================================================! + + - if (associated(csite%qmean_albedo)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%qmean_albedo,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_ALBEDO_PA :-31:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if (associated(csite%qmean_albedo_beam)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%qmean_albedo_beam,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_ALBEDO_BEAM_PA :-31:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if (associated(csite%qmean_albedo_diffuse)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%qmean_albedo_diffuse,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_ALBEDO_DIFFUSE_PA :-31:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - !------------------------------------------------------------------------------------! - !------------------------------------------------------------------------------------! + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the patch-level variables ! + ! (sitetype) that have two dimensions (nzg,npatches). ! + !---------------------------------------------------------------------------------------! + subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(sitetype), target :: csite + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! @@ -14623,42 +22323,430 @@ subroutine filltab_sitetype(igr,ipy,isi,init) if (associated(csite%soil_energy)) then nvar=nvar+1 - call vtable_edio_r(npts,csite%soil_energy,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'SOIL_ENERGY_PA :32:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,csite%soil_energy & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'SOIL_ENERGY_PA :32:hist') + call metadata_edio(nvar,igr,'Instantaneous - Soil internal energy' & + ,'[J/m3]','(nzg,ipatch)') + end if + + if (associated(csite%soil_mstpot)) then + nvar=nvar+1 + call vtable_edio_r(npts,csite%soil_mstpot & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'SOIL_MSTPOT_PA :32:hist') + call metadata_edio(nvar,igr,'Instantaneous - Soil matric potential' & + ,'[m]','(nzg,ipatch)') end if if (associated(csite%soil_water)) then nvar=nvar+1 - call vtable_edio_r(npts,csite%soil_water,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'SOIL_WATER_PA :32:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call vtable_edio_r(npts,csite%soil_water & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'SOIL_WATER_PA :32:hist') + call metadata_edio(nvar,igr,'Soil moisture','[m3/m3]','(nzg,ipatch)') end if if (associated(csite%soil_tempk)) then nvar=nvar+1 - call vtable_edio_r(npts,csite%soil_tempk,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'SOIL_TEMPK_PA :32:hist') - call metadata_edio(nvar,igr,'No metadata available','[K]','ipatch : nzg') + call vtable_edio_r(npts,csite%soil_tempk & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'SOIL_TEMPK_PA :32:hist') + call metadata_edio(nvar,igr,'Instantaneous - Soil temperature' & + ,'[K]','(nzg,ipatch)') + end if + + if (associated(csite%soil_fracliq)) then + nvar=nvar+1 + call vtable_edio_r(npts,csite%soil_fracliq & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'SOIL_FRACLIQ_PA :32:hist') + call metadata_edio(nvar,igr,'Instantaneous - Soil liquid water fraction' & + ,'[--]','(nzg,ipatch)') + end if + + if (associated(csite%rootdense)) then + nvar=nvar+1 + call vtable_edio_r(npts,csite%rootdense & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'PATCH_ROOT_DENSITY :32:hist') + call metadata_edio(nvar,igr,'Patch level root density with depth' & + ,'[kg/m3]','(nzg,ipatch)') + end if + + if (associated(csite%fmean_soil_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_soil_energy & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SOIL_ENERGY_PA :32:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Soil internal energy' & + ,'[ J/m3]','(nzg,ipatch)' ) + end if + if (associated(csite%fmean_soil_mstpot )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_soil_mstpot & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SOIL_MSTPOT_PA :32:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Soil matric potential' & + ,'[ m]','(nzg,ipatch)' ) + end if + if (associated(csite%fmean_soil_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_soil_water & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SOIL_WATER_PA :32:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Soil water content' & + ,'[ m3/m3]','(nzg,ipatch)' ) + end if + if (associated(csite%fmean_soil_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_soil_temp & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SOIL_TEMP_PA :32:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Soil temperature' & + ,'[ K]','(nzg,ipatch)' ) + end if + if (associated(csite%fmean_soil_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_soil_fliq & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SOIL_FLIQ_PA :32:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Soil liquid fraction' & + ,'[ --]','(nzg,ipatch)' ) + end if + if (associated(csite%fmean_smoist_gg )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_smoist_gg & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SMOIST_GG_PA :32:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Soil water flux' & + ,'[ kg/m2/s]','(nzg,ipatch)' ) + end if + if (associated(csite%fmean_transloss )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_transloss & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_TRANSLOSS_PA :32:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Water loss through transpiration' & + ,'[ kg/m2/s]','(nzg,ipatch)' ) + end if + if (associated(csite%fmean_sensible_gg )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%fmean_sensible_gg & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SENSIBLE_GG_PA :32:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Soil heat flux' & + ,'[ W/m2]','(nzg,ipatch)' ) + end if + if (associated(csite%dmean_soil_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_soil_energy & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SOIL_ENERGY_PA :32:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Soil internal energy' & + ,'[ J/m3]','(nzg,ipatch)' ) + end if + if (associated(csite%dmean_soil_mstpot )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_soil_mstpot & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SOIL_MSTPOT_PA :32:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Soil matric potential' & + ,'[ m]','(nzg,ipatch)' ) + end if + if (associated(csite%dmean_soil_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_soil_water & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SOIL_WATER_PA :32:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Soil water content' & + ,'[ m3/m3]','(nzg,ipatch)' ) + end if + if (associated(csite%dmean_soil_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_soil_temp & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SOIL_TEMP_PA :32:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Soil temperature' & + ,'[ K]','(nzg,ipatch)' ) + end if + if (associated(csite%dmean_soil_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_soil_fliq & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SOIL_FLIQ_PA :32:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Soil liquid fraction' & + ,'[ --]','(nzg,ipatch)' ) + end if + if (associated(csite%dmean_smoist_gg )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_smoist_gg & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SMOIST_GG_PA :32:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Soil water flux' & + ,'[ kg/m2/s]','(nzg,ipatch)' ) + end if + if (associated(csite%dmean_transloss )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_transloss & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_TRANSLOSS_PA :32:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Water loss through transpiration' & + ,'[ kg/m2/s]','(nzg,ipatch)' ) + end if + if (associated(csite%dmean_sensible_gg )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%dmean_sensible_gg & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SENSIBLE_GG_PA :32:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Soil heat flux' & + ,'[ W/m2]','(nzg,ipatch)' ) + end if + if (associated(csite%mmean_soil_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_soil_energy & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SOIL_ENERGY_PA :32:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Soil internal energy' & + ,'[ J/m3]','(nzg,ipatch)' ) + end if + if (associated(csite%mmean_soil_mstpot )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_soil_mstpot & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SOIL_MSTPOT_PA :32:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Soil matric potential' & + ,'[ m]','(nzg,ipatch)' ) + end if + if (associated(csite%mmean_soil_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_soil_water & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SOIL_WATER_PA :32:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Soil water content' & + ,'[ m3/m3]','(nzg,ipatch)' ) + end if + if (associated(csite%mmean_soil_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_soil_temp & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SOIL_TEMP_PA :32:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Soil temperature' & + ,'[ K]','(nzg,ipatch)' ) + end if + if (associated(csite%mmean_soil_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_soil_fliq & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SOIL_FLIQ_PA :32:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Soil liquid fraction' & + ,'[ --]','(nzg,ipatch)' ) + end if + if (associated(csite%mmean_smoist_gg )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_smoist_gg & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SMOIST_GG_PA :32:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Soil water flux' & + ,'[ kg/m2/s]','(nzg,ipatch)' ) + end if + if (associated(csite%mmean_transloss )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_transloss & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_TRANSLOSS_PA :32:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Water loss through transpiration' & + ,'[ kg/m2/s]','(nzg,ipatch)' ) + end if + if (associated(csite%mmean_sensible_gg )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%mmean_sensible_gg & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SENSIBLE_GG_PA :32:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Soil heat flux' & + ,'[ W/m2]','(nzg,ipatch)' ) + end if + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + + return + end subroutine filltab_sitetype_p32 + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the patch-level variables ! + ! (sitetype) that have three dimensions (nzg,ndcycle,npatches). ! + !---------------------------------------------------------------------------------------! + subroutine filltab_sitetype_m32(csite,igr,init,var_len,var_len_global,max_ptrs,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine + + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(sitetype), target :: csite + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! + + + + + + + + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + ! This part should have only 3-D vectors with dimensions npatches, ndcycle, ! + ! and nzg. Notice that they all use the same npts. Here you should only add vari- ! + ! ables of type -32. ! + !------------------------------------------------------------------------------------! + npts = csite%npatches * ndcycle * nzg + if (associated(csite%qmean_soil_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_soil_energy & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SOIL_ENERGY_PA :-32:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Soil internal energy' & + ,'[ J/m3]','(nzg,ndcycle,ipatch)') + end if + if (associated(csite%qmean_soil_mstpot )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_soil_mstpot & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SOIL_MSTPOT_PA :-32:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Soil matric potential' & + ,'[ m]','(nzg,ndcycle,ipatch)') + end if + if (associated(csite%qmean_soil_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_soil_water & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SOIL_WATER_PA :-32:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Soil water content' & + ,'[ m3/m3]','(nzg,ndcycle,ipatch)') + end if + if (associated(csite%qmean_soil_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_soil_temp & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SOIL_TEMP_PA :-32:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Soil temperature' & + ,'[ K]','(nzg,ndcycle,ipatch)') + end if + if (associated(csite%qmean_soil_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_soil_fliq & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SOIL_FLIQ_PA :-32:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Soil liquid fraction' & + ,'[ --]','(nzg,ndcycle,ipatch)') + end if + if (associated(csite%qmean_smoist_gg )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_smoist_gg & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SMOIST_GG_PA :-32:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Soil water flux' & + ,'[ kg/m2/s]','(nzg,ndcycle,ipatch)') + end if + if (associated(csite%qmean_transloss )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_transloss & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_TRANSLOSS_PA :-32:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Water loss through transpiration' & + ,'[ kg/m2/s]','(nzg,ndcycle,ipatch)') + end if + if (associated(csite%qmean_sensible_gg )) then + nvar = nvar+1 + call vtable_edio_r(npts,csite%qmean_sensible_gg & + ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SENSIBLE_GG_PA :-32:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Soil heat flux' & + ,'[ W/m2]','(nzg,ndcycle,ipatch)') end if + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + + return + end subroutine filltab_sitetype_m32 + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the patch-level variables ! + ! (sitetype) that have two dimensions (nzs,npatches). ! + !---------------------------------------------------------------------------------------! + subroutine filltab_sitetype_p33(csite,igr,init,var_len,var_len_global,max_ptrs,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine + + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(sitetype), target :: csite + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! - if (associated(csite%soil_fracliq)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%soil_fracliq,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'SOIL_FRACLIQ_PA :32:hist') - call metadata_edio(nvar,igr,'No metadata available','[normalized]','ipatch : nzg') - end if - if (associated(csite%rootdense)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%rootdense,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'PATCH_ROOT_DENSITY :32:hist') - call metadata_edio(nvar,igr,'Patch level root density with depth','[kg/m3]',& - 'ipatch : nzg') - end if - !------------------------------------------------------------------------------------! - !------------------------------------------------------------------------------------! @@ -14747,9 +22835,39 @@ subroutine filltab_sitetype(igr,ipy,isi,init) var_len,var_len_global,max_ptrs,'SFCWATER_FRACLIQ :33:hist') call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if - !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! + return + end subroutine filltab_sitetype_p33 + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the patch-level variables ! + ! (sitetype) that have two dimensions (n_pft,npatches). ! + !---------------------------------------------------------------------------------------! + subroutine filltab_sitetype_p34(csite,igr,init,var_len,var_len_global,max_ptrs,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine + + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(sitetype), target :: csite + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! @@ -14787,26 +22905,36 @@ subroutine filltab_sitetype(igr,ipy,isi,init) !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! + return + end subroutine filltab_sitetype_p34 + !=======================================================================================! + !=======================================================================================! + - !------------------------------------------------------------------------------------! - !------------------------------------------------------------------------------------! - ! This part should have only 2-D vectors with dimensions npatches and n_dbh. ! - ! Notice that they all use the same npts. Here you should only add variables of ! - ! type 36. ! - !------------------------------------------------------------------------------------! - npts = csite%npatches * n_dbh + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the patch-level variables ! + ! (sitetype) that have three dimensions (n_pft,ff_nhgt,npatches). ! + !---------------------------------------------------------------------------------------! + subroutine filltab_sitetype_p346(csite,igr,init,var_len,var_len_global,max_ptrs,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine - if (associated(csite%co2budget_gpp_dbh)) then - nvar=nvar+1 - call vtable_edio_r(npts,csite%co2budget_gpp_dbh,nvar,igr,init,csite%paglob_id, & - var_len,var_len_global,max_ptrs,'CO2BUDGET_GPP_DBH :36:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - !------------------------------------------------------------------------------------! + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(sitetype), target :: csite + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts !------------------------------------------------------------------------------------! @@ -14829,17 +22957,10 @@ subroutine filltab_sitetype(igr,ipy,isi,init) call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if !------------------------------------------------------------------------------------! - !------------------------------------------------------------------------------------! - - - - !----- Save the number of patch-level (sitetype) variables that go to the output. ---! - if (init == 0) niosite=nvar-niopoly-niogrid-nioglobal - !------------------------------------------------------------------------------------! return - end subroutine filltab_sitetype + end subroutine filltab_sitetype_p346 !=======================================================================================! !=======================================================================================! @@ -14850,6 +22971,8 @@ end subroutine filltab_sitetype !=======================================================================================! !=======================================================================================! + ! This sub-routine fills in the variable table for cohort-level variables. ! + !---------------------------------------------------------------------------------------! subroutine filltab_patchtype(igr,ipy,isi,ipa,init) use ed_var_tables, only : vtable_edio_r & ! sub-routine @@ -14935,16 +23058,70 @@ subroutine filltab_patchtype(igr,ipy,isi,ipa,init) + !------------------------------------------------------------------------------------! + ! We split the routine into smaller ones to avoid excessive number of calls to ! + ! sub-routines from the same routine (this allows more optimisation for ifort, and ! + ! reduces chances of segmentation violation during the compilation). ! + !------------------------------------------------------------------------------------! + call filltab_patchtype_p40 (cpatch,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_patchtype_p41inst (cpatch,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_patchtype_m41 (cpatch,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_patchtype_p48 (cpatch,igr,init,var_len,var_len_global,max_ptrs,nvar) + call filltab_patchtype_p49 (cpatch,igr,init,var_len,var_len_global,max_ptrs,nvar) + !------------------------------------------------------------------------------------! + + return + end subroutine filltab_patchtype + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the cohort-level variables ! + ! (patchtype) that have one dimension and are integer (type 40). ! + !---------------------------------------------------------------------------------------! + subroutine filltab_patchtype_p40(cpatch,igr,init,var_len,var_len_global,max_ptrs,nvar) + use ed_var_tables, only : vtable_edio_i & ! sub-routine + , metadata_edio ! ! sub-routine + + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(patchtype), target :: cpatch + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! + + + + + + !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! ! This part should have only 1-D vectors, with dimension ncohorts. Notice ! ! that they all use the same npts. Here you should only add variables of type 40 ! - ! and 41. ! + ! (integers and scalars). ! !------------------------------------------------------------------------------------! npts = cpatch%ncohorts + + if (associated(cpatch%pft)) then nvar=nvar+1 call vtable_edio_i(npts,cpatch%pft,nvar,igr,init,cpatch%coglob_id, & @@ -14994,6 +23171,56 @@ subroutine filltab_patchtype(igr,ipy,isi,ipa,init) var_len,var_len_global,max_ptrs,'NEW_RECRUIT_FLAG :40:hist') call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if + !------------------------------------------------------------------------------------! + + return + end subroutine filltab_patchtype_p40 + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the cohort-level variables ! + ! (patchtype) that have one dimension and are real (type 41) and not fmean, dmean, ! + ! mmean, mmsqu, qmean, or qmsqu. ! + !---------------------------------------------------------------------------------------! + subroutine filltab_patchtype_p41inst (cpatch,igr,init,var_len,var_len_global,max_ptrs & + ,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine + + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(patchtype), target :: cpatch + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! + + + + + + + + + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + ! This part should have only 1-D vectors, with dimension ncohorts. Notice ! + ! that they all use the same npts. Here you should only add variables of type 41 ! + ! (real, scalar, and not one of the fmean, dmean, mmean, mmsqu variables). ! + !------------------------------------------------------------------------------------! + npts = cpatch%ncohorts if (associated(cpatch%nplant)) then @@ -15150,13 +23377,6 @@ subroutine filltab_patchtype(igr,ipy,isi,ipa,init) call metadata_edio(nvar,igr,'Relative carbon balance','[NA]','NA') end if - if (associated(cpatch%mmean_cb)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_cb,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_CB :41:hist:mont:year:dcyc') - call metadata_edio(nvar,igr,'Monthly mean of carbon balance','[kgC/plant/yr]','NA') - end if - if (associated(cpatch%leaf_energy)) then nvar=nvar+1 call vtable_edio_r(npts,cpatch%leaf_energy,nvar,igr,init,cpatch%coglob_id, & @@ -15306,309 +23526,117 @@ subroutine filltab_patchtype(igr,ipy,isi,ipa,init) call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if - if (associated(cpatch%mean_gpp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mean_gpp,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MEAN_GPP :41:hist:anal') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpatch%mean_leaf_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mean_leaf_resp,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MEAN_LEAF_RESP :41:hist:anal') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpatch%mean_root_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mean_root_resp,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MEAN_ROOT_RESP :41:hist:anal') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if (associated(cpatch%today_leaf_resp)) then nvar=nvar+1 call vtable_edio_r(npts,cpatch%today_leaf_resp,nvar,igr,init,cpatch%coglob_id, & var_len,var_len_global,max_ptrs,'TODAY_LEAF_RESP :41:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call metadata_edio(nvar,igr,'NOT A DIAGNOSTIC VARIABLE','[NA]','icohort') end if if (associated(cpatch%today_root_resp)) then nvar=nvar+1 call vtable_edio_r(npts,cpatch%today_root_resp,nvar,igr,init,cpatch%coglob_id, & var_len,var_len_global,max_ptrs,'TODAY_ROOT_RESP :41:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + call metadata_edio(nvar,igr,'NOT A DIAGNOSTIC VARIABLE','[NA]','icohort') end if if (associated(cpatch%today_gpp)) then nvar=nvar+1 call vtable_edio_r(npts,cpatch%today_gpp,nvar,igr,init,cpatch%coglob_id, & var_len,var_len_global,max_ptrs,'TODAY_GPP :41:hist') - call metadata_edio(nvar,igr,'NOT A DIAGNOSTIC-WILL ZERO PRIOR TO DAILY WRITE OUT','[umol/m2/s]','icohort') + call metadata_edio(nvar,igr,'NOT A DIAGNOSTIC VARIABLE','[NA]','icohort') end if if (associated(cpatch%today_nppleaf)) then nvar=nvar+1 call vtable_edio_r(npts,cpatch%today_nppleaf,nvar,igr,init,cpatch%coglob_id, & var_len,var_len_global,max_ptrs,'TODAY_NPPLEAF :41:hist') - call metadata_edio(nvar,igr,'NOT A DIAGNOSTIC-WILL ZERO PRIOR TO DAILY WRITE OUT','[kgc/m2/day]','icohort') - end if - - if (associated(cpatch%today_nppfroot)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%today_nppfroot,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'TODAY_NPPFROOT :41:hist') - call metadata_edio(nvar,igr,'NOT A DIAGNOSTIC-WILL ZERO PRIOR TO DAILY WRITE OUT','[kgc/m2/day]','icohort') - end if - - if (associated(cpatch%today_nppsapwood)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%today_nppsapwood,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'TODAY_NPPSAPWOOD :41:hist') - call metadata_edio(nvar,igr,'NOT A DIAGNOSTIC-WILL ZERO PRIOR TO DAILY WRITE OUT','[kgc/m2/day]','icohort') - end if - - if (associated(cpatch%today_nppcroot)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%today_nppcroot,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'TODAY_NPPCROOT :41:hist') - call metadata_edio(nvar,igr,'NOT A DIAGNOSTIC-WILL ZERO PRIOR TO DAILY WRITE OUT','[kgc/m2/day]','icohort') - end if - - if (associated(cpatch%today_nppseeds)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%today_nppseeds,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'TODAY_NPPSEEDS :41:hist') - call metadata_edio(nvar,igr,'NOT A DIAGNOSTIC-WILL ZERO PRIOR TO DAILY WRITE OUT','[kgc/m2/day]','icohort') - end if - - if (associated(cpatch%today_nppwood)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%today_nppwood,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'TODAY_NPPWOOD :41:hist') - call metadata_edio(nvar,igr,'NOT A DIAGNOSTIC-WILL ZERO PRIOR TO DAILY WRITE OUT','[kgc/m2/day]','icohort') - end if - - if (associated(cpatch%today_nppdaily)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%today_nppdaily,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'TODAY_NPPDAILY :41:hist') - call metadata_edio(nvar,igr,'NOT A DIAGNOSTIC-WILL ZERO PRIOR TO DAILY WRITE OUT','[kgc/m2/day]','icohort') - end if - - if (associated(cpatch%today_gpp_pot)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%today_gpp_pot,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'TODAY_GPP_POT :41:hist') - call metadata_edio(nvar,igr,'NOT A DIAGNOSTIC-WILL ZERO PRIOR TO DAILY WRITE OUT','[NA]','NA') - end if - - if (associated(cpatch%today_gpp_lightmax)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%today_gpp_lightmax,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'TODAY_GPP_LIGHTMAX :41:hist') - call metadata_edio(nvar,igr,'NOT A DIANOSTIC-WILL ZERO PRIOR TO DAILY WRITE OUT','[NA]','NA') - end if - - if (associated(cpatch%today_gpp_moistmax)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%today_gpp_moistmax,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'TODAY_GPP_MOISTMAX :41:hist') - call metadata_edio(nvar,igr,'NOT A DIANOSTIC-WILL ZERO PRIOR TO DAILY WRITE OUT','[NA]','NA') - end if - - if (associated(cpatch%growth_respiration)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%growth_respiration,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'GROWTH_RESPIRATION :41:hist:anal') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpatch%storage_respiration)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%storage_respiration,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'STORAGE_RESPIRATION :41:hist:anal') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpatch%vleaf_respiration)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%vleaf_respiration,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'VLEAF_RESPIRATION :41:hist:anal') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpatch%dmean_gpp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_gpp,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_GPP_CO :41:hist:dail') - call metadata_edio(nvar,igr,'Daily mean Gross Primary Productivity','[kgC/plant/yr]','icohort') - end if - - if (associated(cpatch%dmean_nppleaf)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_nppleaf,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_NPPLEAF_CO :41:hist:dail') - call metadata_edio(nvar,igr,'Daily mean NPP leaf','[kgC/plant/yr]','ipoly') - end if - - if (associated(cpatch%dmean_nppfroot)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_nppfroot,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_NPPFROOT_CO :41:hist:dail') - call metadata_edio(nvar,igr,'Daily mean NPP froot','[kgC/plant/yr]','ipoly') - end if - - - if (associated(cpatch%dmean_nppsapwood)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_nppsapwood,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_NPPSAPWOOD_CO :41:hist:dail') - call metadata_edio(nvar,igr,'Daily mean NPP sapwood','[kgC/plant/yr]','ipoly') - end if - - if (associated(cpatch%dmean_nppcroot)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_nppcroot,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_NPPCROOT_CO :41:hist:dail') - call metadata_edio(nvar,igr,'Daily mean NPP croot','[kgC/plant/yr]','ipoly') - end if - - if (associated(cpatch%dmean_nppseeds)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_nppseeds,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_NPPSEEDS_CO :41:hist:dail') - call metadata_edio(nvar,igr,'Daily mean NPP seeds','[kgC/plant/yr]','ipoly') - end if - - if (associated(cpatch%dmean_nppwood)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_nppwood,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_NPPWOOD_CO :41:hist:dail') - call metadata_edio(nvar,igr,'Daily mean NPP wood','[kgC/plant/yr]','ipoly') - end if - - if (associated(cpatch%dmean_nppdaily)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_nppdaily,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_NPPDAILY_CO :41:hist:dail') - call metadata_edio(nvar,igr,'Daily mean NPP daily','[kgC/plant/yr]','ipoly') - end if - - - if (associated(cpatch%dmean_leaf_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_leaf_resp,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_LEAF_RESP_CO :41:hist:dail') - call metadata_edio(nvar,igr,'Daily mean leaf respiration','[kgC/plant/yr]','icohort') - end if - - if (associated(cpatch%dmean_root_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_root_resp,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_ROOT_RESP_CO :41:hist:dail') - call metadata_edio(nvar,igr,'Daily mean root respiration','[kgC/plant/yr]','icohort') - end if - - if (associated(cpatch%mmean_gpp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_gpp,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_GPP_CO :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean Gross Primary Productivity','[kgC/plant/yr]','icohort') + call metadata_edio(nvar,igr,'NOT A DIAGNOSTIC VARIABLE','[NA]','icohort') end if - - if (associated(cpatch%mmean_nppleaf)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_nppleaf,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_NPPLEAF_CO :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean NPP leaf','[kgC/plant/yr]','ipoly') - end if - - if (associated(cpatch%mmean_nppfroot)) then + + if (associated(cpatch%today_nppfroot)) then nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_nppfroot,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_NPPFROOT_CO :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean NPP froot','[kgC/plant/yr]','ipoly') + call vtable_edio_r(npts,cpatch%today_nppfroot,nvar,igr,init,cpatch%coglob_id, & + var_len,var_len_global,max_ptrs,'TODAY_NPPFROOT :41:hist') + call metadata_edio(nvar,igr,'NOT A DIAGNOSTIC VARIABLE','[NA]','icohort') end if - - - if (associated(cpatch%mmean_nppsapwood)) then + + if (associated(cpatch%today_nppsapwood)) then nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_nppsapwood,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_NPPSAPWOOD_CO :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean NPP sapwood','[kgC/plant/yr]','ipoly') + call vtable_edio_r(npts,cpatch%today_nppsapwood,nvar,igr,init,cpatch%coglob_id, & + var_len,var_len_global,max_ptrs,'TODAY_NPPSAPWOOD :41:hist') + call metadata_edio(nvar,igr,'NOT A DIAGNOSTIC VARIABLE','[NA]','icohort') end if - - if (associated(cpatch%mmean_nppcroot)) then + + if (associated(cpatch%today_nppcroot)) then nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_nppcroot,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_NPPCROOT_CO :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean NPP croot','[kgC/plant/yr]','ipoly') + call vtable_edio_r(npts,cpatch%today_nppcroot,nvar,igr,init,cpatch%coglob_id, & + var_len,var_len_global,max_ptrs,'TODAY_NPPCROOT :41:hist') + call metadata_edio(nvar,igr,'NOT A DIAGNOSTIC VARIABLE','[NA]','icohort') end if - - if (associated(cpatch%mmean_nppseeds)) then + + if (associated(cpatch%today_nppseeds)) then nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_nppseeds,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_NPPSEEDS_CO :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean NPP seeds','[kgC/plant/yr]','ipoly') + call vtable_edio_r(npts,cpatch%today_nppseeds,nvar,igr,init,cpatch%coglob_id, & + var_len,var_len_global,max_ptrs,'TODAY_NPPSEEDS :41:hist') + call metadata_edio(nvar,igr,'NOT A DIAGNOSTIC VARIABLE','[NA]','icohort') end if - - if (associated(cpatch%mmean_nppwood)) then + + if (associated(cpatch%today_nppwood)) then nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_nppwood,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_NPPWOOD_CO :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean NPP wood','[kgC/plant/yr]','ipoly') + call vtable_edio_r(npts,cpatch%today_nppwood,nvar,igr,init,cpatch%coglob_id, & + var_len,var_len_global,max_ptrs,'TODAY_NPPWOOD :41:hist') + call metadata_edio(nvar,igr,'NOT A DIAGNOSTIC VARIABLE','[NA]','icohort') end if - if (associated(cpatch%mmean_nppdaily)) then + if (associated(cpatch%today_nppdaily)) then nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_nppdaily,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_NPPDAILY_CO :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean NPP daily','[kgC/plant/yr]','ipoly') + call vtable_edio_r(npts,cpatch%today_nppdaily,nvar,igr,init,cpatch%coglob_id, & + var_len,var_len_global,max_ptrs,'TODAY_NPPDAILY :41:hist') + call metadata_edio(nvar,igr,'NOT A DIAGNOSTIC VARIABLE','[NA]','icohort') end if - - if (associated(cpatch%mmean_leaf_resp)) then + + if (associated(cpatch%today_gpp_pot)) then nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_leaf_resp,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_LEAF_RESP_CO :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mstructural_growthean leaf respiration','[kgC/plant/yr]','icohort') + call vtable_edio_r(npts,cpatch%today_gpp_pot,nvar,igr,init,cpatch%coglob_id, & + var_len,var_len_global,max_ptrs,'TODAY_GPP_POT :41:hist') + call metadata_edio(nvar,igr,'NOT A DIAGNOSTIC VARIABLE','[NA]','icohort') end if - if (associated(cpatch%mmean_root_resp)) then + if (associated(cpatch%today_gpp_lightmax)) then nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_root_resp,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_ROOT_RESP_CO :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean root respiration','[kgC/plant/yr]','icohort') + call vtable_edio_r(npts,cpatch%today_gpp_lightmax,nvar,igr,init,cpatch%coglob_id, & + var_len,var_len_global,max_ptrs,'TODAY_GPP_LIGHTMAX :41:hist') + call metadata_edio(nvar,igr,'NOT A DIAGNOSTIC VARIABLE','[NA]','icohort') end if - if (associated(cpatch%mmean_growth_resp)) then + if (associated(cpatch%today_gpp_moistmax)) then nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_growth_resp,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_GROWTH_RESP_CO :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean growth respiration','[kgC/plant/yr]','icohort') + call vtable_edio_r(npts,cpatch%today_gpp_moistmax,nvar,igr,init,cpatch%coglob_id, & + var_len,var_len_global,max_ptrs,'TODAY_GPP_MOISTMAX :41:hist') + call metadata_edio(nvar,igr,'NOT A DIAGNOSTIC VARIABLE','[NA]','icohort') end if - if (associated(cpatch%mmean_storage_resp)) then + if (associated(cpatch%growth_respiration)) then nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_storage_resp,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_STORAGE_RESP_CO :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean storage respiration','[kgC/plant/yr]','icohort') + call vtable_edio_r(npts,cpatch%growth_respiration,nvar,igr,init,cpatch%coglob_id, & + var_len,var_len_global,max_ptrs,'GROWTH_RESPIRATION :41:hist:anal') + call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if - if (associated(cpatch%mmean_vleaf_resp)) then + if (associated(cpatch%storage_respiration)) then nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_vleaf_resp,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_VLEAF_RESP_CO :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean virtual leaf respiration','[kgC/plant/yr]','icohort') + call vtable_edio_r(npts,cpatch%storage_respiration,nvar,igr,init,cpatch%coglob_id, & + var_len,var_len_global,max_ptrs,'STORAGE_RESPIRATION :41:hist:anal') + call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if - if (associated(cpatch%fsn)) then + if (associated(cpatch%vleaf_respiration)) then nvar=nvar+1 - call vtable_edio_r(npts,cpatch%fsn,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'FSN :41:hist') + call vtable_edio_r(npts,cpatch%vleaf_respiration,nvar,igr,init,cpatch%coglob_id, & + var_len,var_len_global,max_ptrs,'VLEAF_RESPIRATION :41:hist:anal') call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if + end if if (associated(cpatch%monthly_dndt)) then nvar=nvar+1 @@ -15652,48 +23680,6 @@ subroutine filltab_patchtype(igr,ipy,isi,ipa,init) call metadata_edio(nvar,igr,'Relative light level, diffuse fraction','[NA]','icohort') end if - if (associated(cpatch%dmean_light_level)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_light_level,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_LIGHT_LEVEL :41:hist:dail') - call metadata_edio(nvar,igr,'Diurnal mean of Relative light level ','[NA]','icohort') - end if - - if (associated(cpatch%dmean_light_level_beam)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_light_level_beam,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_LIGHT_LEVEL_BEAM :41:hist:dail') - call metadata_edio(nvar,igr,'Diurnal mean of Relative light level (beam)','[NA]','icohort') - end if - - if (associated(cpatch%dmean_light_level_diff)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_light_level_diff,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_LIGHT_LEVEL_DIFF :41:hist:dail') - call metadata_edio(nvar,igr,'Diurnal mean of Relative light level (diffuse)','[NA]','icohort') - end if - - if (associated(cpatch%mmean_light_level)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_light_level,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_LIGHT_LEVEL :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean of Relative light level ','[NA]','icohort') - end if - - if (associated(cpatch%mmean_light_level_beam)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_light_level_beam,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_LIGHT_LEVEL_BEAM :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean of Relative light level (beam)','[NA]','icohort') - end if - - if (associated(cpatch%mmean_light_level_diff)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_light_level_diff,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_LIGHT_LEVEL_DIFF :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Monthly mean of Relative light level (diff)','[NA]','icohort') - end if - if (associated(cpatch%par_l)) then nvar=nvar+1 call vtable_edio_r(npts,cpatch%par_l,nvar,igr,init,cpatch%coglob_id, & @@ -15715,69 +23701,6 @@ subroutine filltab_patchtype(igr,ipy,isi,ipa,init) call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if - if (associated(cpatch%mean_par_l)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mean_par_l,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MEAN_PAR_L :41:hist:anal') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpatch%mean_par_l_beam)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mean_par_l_beam,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MEAN_PAR_L_BEAM :41:hist:anal') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpatch%mean_par_l_diff)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mean_par_l_diff,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MEAN_PAR_L_DIFF :41:hist:anal') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpatch%dmean_par_l)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_par_l,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_PAR_L :41:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpatch%dmean_par_l_beam)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_par_l_beam,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_PAR_L_BEAM :41:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpatch%dmean_par_l_diff)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_par_l_diff,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_PAR_L_DIFF :41:hist:dail') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpatch%mmean_par_l)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_par_l,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_PAR_L :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpatch%mmean_par_l_beam)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_par_l_beam,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_PAR_L_BEAM :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpatch%mmean_par_l_diff)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_par_l_diff,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_PAR_L_DIFF :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if (associated(cpatch%rshort_l)) then nvar=nvar+1 call vtable_edio_r(npts,cpatch%rshort_l,nvar,igr,init,cpatch%coglob_id, & @@ -15932,6 +23855,13 @@ subroutine filltab_patchtype(igr,ipy,isi,ipa,init) call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if + if (associated(cpatch%leaf_gsw)) then + nvar=nvar+1 + call vtable_edio_r(npts,cpatch%leaf_gsw,nvar,igr,init,cpatch%coglob_id, & + var_len,var_len_global,max_ptrs,'LEAF_GSW :41:hist') + call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + end if + if (associated(cpatch%fsw)) then nvar=nvar+1 call vtable_edio_r(npts,cpatch%fsw,nvar,igr,init,cpatch%coglob_id, & @@ -15939,6 +23869,13 @@ subroutine filltab_patchtype(igr,ipy,isi,ipa,init) call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if + if (associated(cpatch%fsn)) then + nvar=nvar+1 + call vtable_edio_r(npts,cpatch%fsn,nvar,igr,init,cpatch%coglob_id, & + var_len,var_len_global,max_ptrs,'FSN :41:hist') + call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') + end if + if (associated(cpatch%fs_open)) then nvar=nvar+1 call vtable_edio_r(npts,cpatch%fs_open,nvar,igr,init,cpatch%coglob_id, & @@ -15953,97 +23890,6 @@ subroutine filltab_patchtype(igr,ipy,isi,ipa,init) call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if - if (associated(cpatch%dmean_fs_open)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_fs_open,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_FS_OPEN_CO :41:dail:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpatch%dmean_fsw)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_fsw,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_FSW_CO :41:dail:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpatch%dmean_fsn)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_fsn,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_FSN_CO :41:dail:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpatch%dmean_psi_open)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_psi_open,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_PSI_OPEN_CO :41:dail:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpatch%dmean_psi_closed)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_psi_closed,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_PSI_CLOSED_CO :41:dail:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpatch%dmean_water_supply)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_water_supply,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'DMEAN_WATER_SUPPLY_CO :41:dail:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpatch%mmean_fs_open)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_fs_open,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_FS_OPEN_CO :41:mont:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpatch%mmean_fsw)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_fsw,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_FSW_CO :41:mont:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpatch%mmean_fsn)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_fsn,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_FSN_CO :41:mont:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpatch%mmean_psi_open)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_psi_open,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_PSI_OPEN_CO :41:mont:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpatch%mmean_psi_closed)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_psi_closed,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_PSI_CLOSED_CO :41:mont:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpatch%mmean_water_supply)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_water_supply,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_WATER_SUPPLY_CO :41:mont:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpatch%stomatal_conductance)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%stomatal_conductance,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'STOMATAL_CONDUCTANCE :41:hist') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if (associated(cpatch%leaf_maintenance)) then nvar=nvar+1 call vtable_edio_r(npts,cpatch%leaf_maintenance,nvar,igr,init,cpatch%coglob_id, & @@ -16058,20 +23904,6 @@ subroutine filltab_patchtype(igr,ipy,isi,ipa,init) call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if - if (associated(cpatch%mmean_leaf_maintenance)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_leaf_maintenance,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_LEAF_MAINTENANCE :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - - if (associated(cpatch%mmean_root_maintenance)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_root_maintenance,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_ROOT_MAINTENANCE :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if (associated(cpatch%leaf_drop)) then nvar=nvar+1 call vtable_edio_r(npts,cpatch%leaf_drop,nvar,igr,init,cpatch%coglob_id, & @@ -16079,13 +23911,6 @@ subroutine filltab_patchtype(igr,ipy,isi,ipa,init) call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if - if (associated(cpatch%mmean_leaf_drop)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_leaf_drop,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_LEAF_DROP_CO :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') - end if - if (associated(cpatch%bseeds)) then nvar=nvar+1 call vtable_edio_r(npts,cpatch%bseeds,nvar,igr,init,cpatch%coglob_id, & @@ -16148,320 +23973,1053 @@ subroutine filltab_patchtype(igr,ipy,isi,ipa,init) var_len,var_len_global,max_ptrs,'SLA :41:hist') call metadata_edio(nvar,igr,'No metadata available','[NA]','NA') end if + !------------------------------------------------------------------------------------! - if (associated(cpatch%mean_rshort_l)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mean_rshort_l,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MEAN_RSHORT_L :41:hist:anal') - call metadata_edio(nvar,igr,'Absorbed SW radiation (Leaf)','[W/m2]','icohort') - end if + return + end subroutine filltab_patchtype_p41inst + !=======================================================================================! + !=======================================================================================! - if (associated(cpatch%mean_rlong_l)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mean_rlong_l,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MEAN_RLONG_L :41:hist:anal') - call metadata_edio(nvar,igr,'Absorbed LW radiation (Leaf)','[W/m2]','icohort') - end if - if (associated(cpatch%mean_sensible_lc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mean_sensible_lc,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MEAN_SENSIBLE_LC :41:hist:anal') - call metadata_edio(nvar,igr,'Sensible heat flux (Leaf->CAS)','[W/m2]','icohort') - end if - if (associated(cpatch%mean_vapor_lc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mean_vapor_lc,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MEAN_VAPOR_LC :41:hist:anal') - call metadata_edio(nvar,igr,'Vapour flux (Leaf sfc->CAS)','[kg/m2/s]','icohort') - end if - if (associated(cpatch%mean_transp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mean_transp,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MEAN_TRANSP :41:hist:anal') - call metadata_edio(nvar,igr,'Leaf transpiration','[kg/m2/s]','icohort') - end if - if (associated(cpatch%mean_intercepted_al)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mean_intercepted_al,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MEAN_INTERCEPTED_AL :41:hist:anal') - call metadata_edio(nvar,igr,'Leaf interception','[kg/m2/s]','icohort') - end if - if (associated(cpatch%mean_wshed_lg)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mean_wshed_lg,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MEAN_WSHED_LG :41:hist:anal') - call metadata_edio(nvar,igr,'Leaf water shedding','[kg/m2/s]','icohort') - end if + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the cohort-level variables ! + ! (patchtype) that have one dimension and are real (type 41) and fmean. ! + !---------------------------------------------------------------------------------------! + subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max_ptrs & + ,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine - if (associated(cpatch%mean_rshort_w)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mean_rshort_w,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MEAN_RSHORT_W :41:hist:anal') - call metadata_edio(nvar,igr,'Absorbed SW radiation (Wood)','[W/m2]','icohort') - end if + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(patchtype), target :: cpatch + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! - if (associated(cpatch%mean_rlong_w)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mean_rlong_w,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MEAN_RLONG_W :41:hist:anal') - call metadata_edio(nvar,igr,'Absorbed LW radiation (Wood)','[W/m2]','icohort') - end if - if (associated(cpatch%mean_sensible_wc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mean_sensible_wc,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MEAN_SENSIBLE_WC :41:hist:anal') - call metadata_edio(nvar,igr,'Sensible heat flux (Wood->CAS)','[W/m2]','icohort') - end if - if (associated(cpatch%mean_vapor_wc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mean_vapor_wc,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MEAN_VAPOR_WC :41:hist:anal') - call metadata_edio(nvar,igr,'Vapour flux (Wood sfc->CAS)','[kg/m2/s]','icohort') - end if - if (associated(cpatch%mean_intercepted_aw)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mean_intercepted_aw,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MEAN_INTERCEPTED_AW :41:hist:anal') - call metadata_edio(nvar,igr,'Wood interception','[kg/m2/s]','icohort') - end if - if (associated(cpatch%mean_wshed_wg)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mean_wshed_lg,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MEAN_WSHED_WG :41:hist:anal') - call metadata_edio(nvar,igr,'Wood water shedding','[kg/m2/s]','icohort') - end if - if (associated(cpatch%dmean_rshort_l)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_rshort_l,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RSHORT_L :41:hist:dail') - call metadata_edio(nvar,igr,'Absorbed SW radiation (Leaf)','[W/m2]','icohort') - end if - if (associated(cpatch%dmean_rlong_l)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_rlong_l,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RLONG_L :41:hist:dail') - call metadata_edio(nvar,igr,'Absorbed LW radiation (Leaf)','[W/m2]','icohort') - end if - if (associated(cpatch%dmean_sensible_lc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_sensible_lc,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SENSIBLE_LC_CO :41:hist:dail') - call metadata_edio(nvar,igr,'Sensible heat flux (Leaf->CAS)','[W/m2]','icohort') + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + ! This part should have only 1-D vectors, with dimension ncohorts. Notice ! + ! that they all use the same npts. Here you should only add variables of type 41 ! + ! (real, scalar), and a "fmean" variable. ! + !------------------------------------------------------------------------------------! + npts = cpatch%ncohorts + + if (associated(cpatch%fmean_gpp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_gpp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_GPP_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Gross primary productivity' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%fmean_npp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_npp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_NPP_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Net primary productivity' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%fmean_leaf_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_leaf_resp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_LEAF_RESP_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Leaf respiration' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%fmean_root_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_root_resp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_ROOT_RESP_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Root respiration' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%fmean_growth_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_growth_resp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_GROWTH_RESP_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Growth respiration' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%fmean_storage_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_storage_resp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_STORAGE_RESP_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Storage respiration' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%fmean_vleaf_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_vleaf_resp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_VLEAF_RESP_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Virtual leaf respiration' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%fmean_plresp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_plresp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_PLRESP_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Plant respiration' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%fmean_leaf_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_leaf_energy & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_LEAF_ENERGY_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Leaf internal energy' & + ,'[ J/m2]','(icohort)' ) + end if + if (associated(cpatch%fmean_leaf_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_leaf_water & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_LEAF_WATER_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Leaf surface water' & + ,'[ kg/m2]','(icohort)' ) + end if + if (associated(cpatch%fmean_leaf_hcap )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_leaf_hcap & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_LEAF_HCAP_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Leaf heat capacity' & + ,'[ J/m2/K]','(icohort)' ) + end if + if (associated(cpatch%fmean_leaf_vpdef )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_leaf_vpdef & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_LEAF_VPDEF_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Leaf vapour pressure deficit' & + ,'[ Pa]','(icohort)' ) + end if + if (associated(cpatch%fmean_leaf_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_leaf_temp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_LEAF_TEMP_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Leaf temperature' & + ,'[ K]','(icohort)' ) + end if + if (associated(cpatch%fmean_leaf_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_leaf_fliq & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_LEAF_FLIQ_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Liquid fraction' & + ,'[ --]','(icohort)' ) + end if + if (associated(cpatch%fmean_leaf_gsw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_leaf_gsw & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_LEAF_GSW_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Stomatal conductance' & + ,'[kg/m2leaf/s]','(icohort)' ) + end if + if (associated(cpatch%fmean_leaf_gbw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_leaf_gbw & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_LEAF_GBW_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Leaf boundary layer conductance' & + ,'[kg/m2leaf/s]','(icohort)' ) + end if + if (associated(cpatch%fmean_wood_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_wood_energy & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_WOOD_ENERGY_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Wood internal energy' & + ,'[ J/m2]','(icohort)' ) + end if + if (associated(cpatch%fmean_wood_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_wood_water & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_WOOD_WATER_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Wood surface water' & + ,'[ kg/m2]','(icohort)' ) + end if + if (associated(cpatch%fmean_wood_hcap )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_wood_hcap & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_WOOD_HCAP_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Wood heat capacity' & + ,'[ J/m2/K]','(icohort)' ) + end if + if (associated(cpatch%fmean_wood_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_wood_temp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_WOOD_TEMP_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Wood temperature' & + ,'[ K]','(icohort)' ) + end if + if (associated(cpatch%fmean_wood_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_wood_fliq & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_WOOD_FLIQ_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Liquid fraction' & + ,'[ --]','(icohort)' ) + end if + if (associated(cpatch%fmean_wood_gbw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_wood_gbw & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_WOOD_GBW_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Wood boundary layer conductance' & + ,'[kg/m2wood/s]','(icohort)' ) + end if + if (associated(cpatch%fmean_fs_open )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_fs_open & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_FS_OPEN_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Net stress factor' & + ,'[ --]','(icohort)' ) + end if + if (associated(cpatch%fmean_fsw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_fsw & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_FSW_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Moisture stress' & + ,'[ --]','(icohort)' ) + end if + if (associated(cpatch%fmean_fsn )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_fsn & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_FSN_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Nitrogen stress' & + ,'[ --]','(icohort)' ) + end if + if (associated(cpatch%fmean_psi_open )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_psi_open & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_PSI_OPEN_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Transpiration with no stress' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%fmean_psi_closed )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_psi_closed & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_PSI_CLOSED_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Transpiration at maximum stress' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%fmean_water_supply )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_water_supply & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_WATER_SUPPLY_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Water supply' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%fmean_light_level )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_light_level & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_LIGHT_LEVEL_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Light level' & + ,'[ --]','(icohort)' ) + end if + if (associated(cpatch%fmean_light_level_beam)) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_light_level_beam & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_LIGHT_LEVEL_BEAM_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Light level (direct radiation)' & + ,'[ --]','(icohort)' ) + end if + if (associated(cpatch%fmean_light_level_diff)) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_light_level_diff & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_LIGHT_LEVEL_DIFF_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Light level (diffuse radiation)' & + ,'[ --]','(icohort)' ) + end if + if (associated(cpatch%fmean_par_l )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_par_l & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_PAR_L_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - PAR absorbed by leaves' & + ,'[ W/m2]','(icohort)' ) + end if + if (associated(cpatch%fmean_par_l_beam )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_par_l_beam & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_PAR_L_BEAM_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Direct PAR absorbed by leaves' & + ,'[ W/m2]','(icohort)' ) + end if + if (associated(cpatch%fmean_par_l_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_par_l_diff & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_PAR_L_DIFF_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Diffuse PAR absorbed by leaves' & + ,'[ W/m2]','(icohort)' ) + end if + if (associated(cpatch%fmean_rshort_l )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_rshort_l & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_RSHORT_L_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Shortwave radiation absorbed by leaves' & + ,'[ W/m2]','(icohort)' ) + end if + if (associated(cpatch%fmean_rlong_l )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_rlong_l & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_RLONG_L_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Longwave radiation absorbed by leaves' & + ,'[ W/m2]','(icohort)' ) + end if + if (associated(cpatch%fmean_sensible_lc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_sensible_lc & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SENSIBLE_LC_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Sensible heat' & + ,'[ W/m2]','(icohort)' ) + end if + if (associated(cpatch%fmean_vapor_lc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_vapor_lc & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_VAPOR_LC_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Leaf evaporation' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%fmean_transp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_transp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_TRANSP_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Leaf transpiration' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%fmean_intercepted_al )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_intercepted_al & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_INTERCEPTED_AL_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Leaf interception' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%fmean_wshed_lg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_wshed_lg & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_WSHED_LG_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Leaf shedding' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%fmean_rshort_w )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_rshort_w & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_RSHORT_W_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Shortwave radiation absorbed by wood' & + ,'[ W/m2]','(icohort)' ) + end if + if (associated(cpatch%fmean_rlong_w )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_rlong_w & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_RLONG_W_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Longwave radiation absorbed by wood' & + ,'[ W/m2]','(icohort)' ) + end if + if (associated(cpatch%fmean_sensible_wc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_sensible_wc & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_SENSIBLE_WC_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Sensible heat' & + ,'[ W/m2]','(icohort)' ) + end if + if (associated(cpatch%fmean_vapor_wc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_vapor_wc & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_VAPOR_WC_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Wood evaporation' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%fmean_intercepted_aw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_intercepted_aw & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_INTERCEPTED_AW_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Wood interception' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%fmean_wshed_wg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%fmean_wshed_wg & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'FMEAN_WSHED_WG_CO :41:hist:anal' ) + call metadata_edio(nvar,igr & + ,'Sub-daily mean - Wood shedding' & + ,'[ kg/m2/s]','(icohort)' ) end if + !------------------------------------------------------------------------------------! + + return + end subroutine filltab_patchtype_p41fmean + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the cohort-level variables ! + ! (patchtype) that have one dimension and are real (type 41) and dmean. ! + !---------------------------------------------------------------------------------------! + subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max_ptrs & + ,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine - if (associated(cpatch%dmean_vapor_lc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_vapor_lc,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_VAPOR_LC_CO :41:hist:dail') - call metadata_edio(nvar,igr,'Vapour flux (Leaf sfc->CAS)','[kg/m2/s]','icohort') - end if + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(patchtype), target :: cpatch + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! - if (associated(cpatch%dmean_transp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_transp,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_TRANSP_CO :41:hist:dail') - call metadata_edio(nvar,igr,'Leaf transpiration','[kg/m2/s]','icohort') - end if - if (associated(cpatch%dmean_intercepted_al)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_intercepted_al,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_INTERCEPTED_AL_CO :41:hist:dail') - call metadata_edio(nvar,igr,'Leaf interception','[kg/m2/s]','icohort') - end if - if (associated(cpatch%dmean_wshed_lg)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_wshed_lg,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_WSHED_LG_CO :41:hist:dail') - call metadata_edio(nvar,igr,'Leaf water shedding','[kg/m2/s]','icohort') - end if - if (associated(cpatch%dmean_rshort_w)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_rshort_w,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RSHORT_W :41:hist:dail') - call metadata_edio(nvar,igr,'Absorbed SW radiation (Wood)','[W/m2]','icohort') - end if - if (associated(cpatch%dmean_rlong_w)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_rlong_w,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RLONG_W :41:hist:dail') - call metadata_edio(nvar,igr,'Absorbed LW radiation (Wood)','[W/m2]','icohort') - end if - if (associated(cpatch%dmean_sensible_wc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_sensible_wc,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SENSIBLE_WC_CO :41:hist:dail') - call metadata_edio(nvar,igr,'Sensible heat flux (Wood->CAS)','[W/m2]','icohort') - end if - if (associated(cpatch%dmean_vapor_wc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_vapor_wc,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_VAPOR_WC_CO :41:hist:dail') - call metadata_edio(nvar,igr,'Vapour flux (Wood sfc->CAS)','[kg/m2/s]','icohort') - end if - if (associated(cpatch%dmean_intercepted_aw)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_intercepted_aw,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_INTERCEPTED_AW_CO :41:hist:dail') - call metadata_edio(nvar,igr,'Wood interception','[kg/m2/s]','icohort') - end if + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + ! This part should have only 1-D vectors, with dimension ncohorts. Notice ! + ! that they all use the same npts. Here you should only add variables of type 41 ! + ! (real, scalar), and a "dmean" variable. ! + !------------------------------------------------------------------------------------! + npts = cpatch%ncohorts - if (associated(cpatch%dmean_wshed_wg)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%dmean_wshed_lg,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_WSHED_WG_CO :41:hist:dail') - call metadata_edio(nvar,igr,'Wood water shedding','[kg/m2/s]','icohort') - end if - if (associated(cpatch%mmean_rshort_l)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_rshort_l,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RSHORT_L :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Absorbed SW radiation (Leaf)','[W/m2]','icohort') + if (associated(cpatch%dmean_nppleaf )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_nppleaf & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_NPPLEAF_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Net primary productivity - Leaf' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%dmean_nppfroot )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_nppfroot & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_NPPFROOT_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Net primary productivity - Fine root' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%dmean_nppsapwood )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_nppsapwood & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_NPPSAPWOOD_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Net primary productivity - Sap wood' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%dmean_nppcroot )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_nppcroot & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_NPPCROOT_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Net primary productivity - Coarse root' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%dmean_nppseeds )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_nppseeds & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_NPPSEEDS_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Net primary productivity - seeds' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%dmean_nppwood )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_nppwood & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_NPPWOOD_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Net primary productivity - heart wood' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%dmean_nppdaily )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_nppdaily & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_NPPDAILY_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Net primary productivity - total' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%dmean_gpp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_gpp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_GPP_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Gross primary productivity' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%dmean_npp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_npp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_NPP_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Net primary productivity' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%dmean_leaf_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_leaf_resp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_LEAF_RESP_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Leaf respiration' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%dmean_root_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_root_resp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_ROOT_RESP_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Root respiration' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%dmean_growth_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_growth_resp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_GROWTH_RESP_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Growth respiration' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%dmean_storage_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_storage_resp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_STORAGE_RESP_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Storage respiration' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%dmean_vleaf_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_vleaf_resp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_VLEAF_RESP_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Virtual leaf respiration' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%dmean_plresp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_plresp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_PLRESP_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Plant respiration' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%dmean_leaf_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_leaf_energy & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_LEAF_ENERGY_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Leaf internal energy' & + ,'[ J/m2]','(icohort)' ) + end if + if (associated(cpatch%dmean_leaf_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_leaf_water & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_LEAF_WATER_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Leaf surface water' & + ,'[ kg/m2]','(icohort)' ) + end if + if (associated(cpatch%dmean_leaf_hcap )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_leaf_hcap & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_LEAF_HCAP_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Leaf heat capacity' & + ,'[ J/m2/K]','(icohort)' ) + end if + if (associated(cpatch%dmean_leaf_vpdef )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_leaf_vpdef & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_LEAF_VPDEF_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Leaf vapour pressure deficit' & + ,'[ Pa]','(icohort)' ) + end if + if (associated(cpatch%dmean_leaf_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_leaf_temp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_LEAF_TEMP_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Leaf temperature' & + ,'[ K]','(icohort)' ) + end if + if (associated(cpatch%dmean_leaf_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_leaf_fliq & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_LEAF_FLIQ_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Liquid fraction' & + ,'[ --]','(icohort)' ) + end if + if (associated(cpatch%dmean_leaf_gsw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_leaf_gsw & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_LEAF_GSW_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Stomatal conductance' & + ,'[kg/m2leaf/s]','(icohort)' ) + end if + if (associated(cpatch%dmean_leaf_gbw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_leaf_gbw & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_LEAF_GBW_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Leaf boundary layer conductance' & + ,'[kg/m2leaf/s]','(icohort)' ) + end if + if (associated(cpatch%dmean_wood_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_wood_energy & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_WOOD_ENERGY_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Wood internal energy' & + ,'[ J/m2]','(icohort)' ) + end if + if (associated(cpatch%dmean_wood_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_wood_water & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_WOOD_WATER_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Wood surface water' & + ,'[ kg/m2]','(icohort)' ) + end if + if (associated(cpatch%dmean_wood_hcap )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_wood_hcap & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_WOOD_HCAP_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Wood heat capacity' & + ,'[ J/m2/K]','(icohort)' ) + end if + if (associated(cpatch%dmean_wood_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_wood_temp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_WOOD_TEMP_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Wood temperature' & + ,'[ K]','(icohort)' ) + end if + if (associated(cpatch%dmean_wood_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_wood_fliq & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_WOOD_FLIQ_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Liquid fraction' & + ,'[ --]','(icohort)' ) + end if + if (associated(cpatch%dmean_wood_gbw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_wood_gbw & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_WOOD_GBW_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Wood boundary layer conductance' & + ,'[kg/m2wood/s]','(icohort)' ) + end if + if (associated(cpatch%dmean_fs_open )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_fs_open & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_FS_OPEN_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Net stress factor' & + ,'[ --]','(icohort)' ) + end if + if (associated(cpatch%dmean_fsw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_fsw & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_FSW_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Moisture stress' & + ,'[ --]','(icohort)' ) + end if + if (associated(cpatch%dmean_fsn )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_fsn & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_FSN_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Nitrogen stress' & + ,'[ --]','(icohort)' ) + end if + if (associated(cpatch%dmean_psi_open )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_psi_open & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_PSI_OPEN_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Transpiration with no stress' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%dmean_psi_closed )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_psi_closed & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_PSI_CLOSED_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Transpiration at maximum stress' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%dmean_water_supply )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_water_supply & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_WATER_SUPPLY_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Water supply' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%dmean_light_level )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_light_level & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_LIGHT_LEVEL_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Light level' & + ,'[ --]','(icohort)' ) end if - - if (associated(cpatch%mmean_rlong_l)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_rlong_l,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RLONG_L :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Absorbed LW radiation (Leaf)','[W/m2]','icohort') + if (associated(cpatch%dmean_light_level_beam)) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_light_level_beam & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_LIGHT_LEVEL_BEAM_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Light level (direct radiation)' & + ,'[ --]','(icohort)' ) end if - - if (associated(cpatch%mmean_sensible_lc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_sensible_lc,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SENSIBLE_LC_CO :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Sensible heat flux (Leaf->CAS)','[W/m2]','icohort') + if (associated(cpatch%dmean_light_level_diff)) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_light_level_diff & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_LIGHT_LEVEL_DIFF_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Light level (diffuse radiation)' & + ,'[ --]','(icohort)' ) + end if + if (associated(cpatch%dmean_par_l )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_par_l & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_PAR_L_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - PAR absorbed by leaves' & + ,'[ W/m2]','(icohort)' ) + end if + if (associated(cpatch%dmean_par_l_beam )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_par_l_beam & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_PAR_L_BEAM_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Direct PAR absorbed by leaves' & + ,'[ W/m2]','(icohort)' ) + end if + if (associated(cpatch%dmean_par_l_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_par_l_diff & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_PAR_L_DIFF_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Diffuse PAR absorbed by leaves' & + ,'[ W/m2]','(icohort)' ) + end if + if (associated(cpatch%dmean_rshort_l )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_rshort_l & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_RSHORT_L_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Shortwave radiation absorbed by leaves' & + ,'[ W/m2]','(icohort)' ) + end if + if (associated(cpatch%dmean_rlong_l )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_rlong_l & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_RLONG_L_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Longwave radiation absorbed by leaves' & + ,'[ W/m2]','(icohort)' ) + end if + if (associated(cpatch%dmean_sensible_lc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_sensible_lc & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SENSIBLE_LC_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Sensible heat' & + ,'[ W/m2]','(icohort)' ) + end if + if (associated(cpatch%dmean_vapor_lc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_vapor_lc & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_VAPOR_LC_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Leaf evaporation' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%dmean_transp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_transp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_TRANSP_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Leaf transpiration' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%dmean_intercepted_al )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_intercepted_al & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_INTERCEPTED_AL_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Leaf interception' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%dmean_wshed_lg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_wshed_lg & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_WSHED_LG_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Leaf shedding' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%dmean_rshort_w )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_rshort_w & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_RSHORT_W_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Shortwave radiation absorbed by wood' & + ,'[ W/m2]','(icohort)' ) + end if + if (associated(cpatch%dmean_rlong_w )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_rlong_w & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_RLONG_W_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Longwave radiation absorbed by wood' & + ,'[ W/m2]','(icohort)' ) + end if + if (associated(cpatch%dmean_sensible_wc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_sensible_wc & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_SENSIBLE_WC_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Sensible heat' & + ,'[ W/m2]','(icohort)' ) + end if + if (associated(cpatch%dmean_vapor_wc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_vapor_wc & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_VAPOR_WC_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Wood evaporation' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%dmean_intercepted_aw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_intercepted_aw & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_INTERCEPTED_AW_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Wood interception' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%dmean_wshed_wg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%dmean_wshed_wg & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'DMEAN_WSHED_WG_CO :41:hist:dail' ) + call metadata_edio(nvar,igr & + ,'Daily mean - Wood shedding' & + ,'[ kg/m2/s]','(icohort)' ) end if + !------------------------------------------------------------------------------------! - if (associated(cpatch%mmean_vapor_lc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_vapor_lc,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_VAPOR_LC_CO :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Vapour flux (Leaf sfc->CAS)','[kg/m2/s]','icohort') - end if + return + end subroutine filltab_patchtype_p41dmean + !=======================================================================================! + !=======================================================================================! - if (associated(cpatch%mmean_transp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_transp,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_TRANSP_CO :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Leaf transpiration','[kg/m2/s]','icohort') - end if - if (associated(cpatch%mmean_intercepted_al)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_intercepted_al,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_INTERCEPTED_AL_CO :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Leaf interception','[kg/m2/s]','icohort') - end if - if (associated(cpatch%mmean_wshed_lg)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_wshed_lg,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_WSHED_LG_CO :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Leaf water shedding','[kg/m2/s]','icohort') - end if - if (associated(cpatch%mmean_rshort_w)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_rshort_w,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RSHORT_W :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Absorbed SW radiation (Wood)','[W/m2]','icohort') - end if - if (associated(cpatch%mmean_rlong_w)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_rlong_w,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RLONG_W :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Absorbed LW radiation (Wood)','[W/m2]','icohort') - end if - if (associated(cpatch%mmean_sensible_wc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_sensible_wc,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SENSIBLE_WC_CO :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Sensible heat flux (Wood->CAS)','[W/m2]','icohort') - end if + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the cohort-level variables ! + ! (patchtype) that have one dimension and are real (type 41) and mmean. ! + !---------------------------------------------------------------------------------------! + subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max_ptrs & + ,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine + + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(patchtype), target :: cpatch + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! - if (associated(cpatch%mmean_vapor_wc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_vapor_wc,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_VAPOR_WC_CO :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Vapour flux (Wood sfc->CAS)','[kg/m2/s]','icohort') - end if - if (associated(cpatch%mmean_intercepted_aw)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_intercepted_aw,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_INTERCEPTED_AW_CO :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Wood interception','[kg/m2/s]','icohort') - end if - if (associated(cpatch%mmean_wshed_wg)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_wshed_lg,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_WSHED_WG_CO :41:hist:mont:dcyc') - call metadata_edio(nvar,igr,'Wood water shedding','[kg/m2/s]','icohort') - end if - !------------------------------------------------------------------------------------! - !------------------------------------------------------------------------------------! @@ -16469,200 +25027,1217 @@ subroutine filltab_patchtype(igr,ipy,isi,ipa,init) !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! - ! This part should have only 2-D vectors, with dimension ncohorts and ndcycle. ! - ! Notice that they all use the same npts. Here you should only add variables of ! - ! type -41. ! + ! This part should have only 1-D vectors, with dimension ncohorts. Notice ! + ! that they all use the same npts. Here you should only add variables of type 41 ! + ! (real, scalar), and a "mmean" or "mmsqu" variable. ! !------------------------------------------------------------------------------------! - npts = cpatch%ncohorts * ndcycle + npts = cpatch%ncohorts - if (associated(cpatch%qmean_par_l)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%qmean_par_l,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_PAR_L :-41:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata avaialable','[NA]','NA') - end if - if (associated(cpatch%qmean_par_l_beam)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%qmean_par_l_beam,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_PAR_L_BEAM :-41:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata avaialable','[NA]','NA') + if (associated(cpatch%mmean_gpp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_gpp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_GPP_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Gross primary productivity' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%mmean_npp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_npp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_NPP_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Net primary productivity' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%mmean_leaf_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_leaf_resp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_LEAF_RESP_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Leaf respiration' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%mmean_root_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_root_resp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ROOT_RESP_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Root respiration' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%mmean_growth_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_growth_resp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_GROWTH_RESP_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Growth respiration' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%mmean_storage_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_storage_resp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_STORAGE_RESP_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Storage respiration' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%mmean_vleaf_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_vleaf_resp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_VLEAF_RESP_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Virtual leaf respiration' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%mmean_plresp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_plresp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_PLRESP_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Plant respiration' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%mmean_leaf_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_leaf_energy & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_LEAF_ENERGY_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Leaf internal energy' & + ,'[ J/m2]','(icohort)' ) + end if + if (associated(cpatch%mmean_leaf_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_leaf_water & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_LEAF_WATER_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Leaf surface water' & + ,'[ kg/m2]','(icohort)' ) + end if + if (associated(cpatch%mmean_leaf_hcap )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_leaf_hcap & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_LEAF_HCAP_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Leaf heat capacity' & + ,'[ J/m2/K]','(icohort)' ) + end if + if (associated(cpatch%mmean_leaf_vpdef )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_leaf_vpdef & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_LEAF_VPDEF_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Leaf vapour pressure deficit' & + ,'[ Pa]','(icohort)' ) + end if + if (associated(cpatch%mmean_leaf_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_leaf_temp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_LEAF_TEMP_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Leaf temperature' & + ,'[ K]','(icohort)' ) + end if + if (associated(cpatch%mmean_leaf_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_leaf_fliq & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_LEAF_FLIQ_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Liquid fraction' & + ,'[ --]','(icohort)' ) + end if + if (associated(cpatch%mmean_leaf_gsw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_leaf_gsw & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_LEAF_GSW_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Stomatal conductance' & + ,'[kg/m2leaf/s]','(icohort)' ) + end if + if (associated(cpatch%mmean_leaf_gbw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_leaf_gbw & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_LEAF_GBW_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Leaf boundary layer conductance' & + ,'[kg/m2leaf/s]','(icohort)' ) + end if + if (associated(cpatch%mmean_wood_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_wood_energy & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_WOOD_ENERGY_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Wood internal energy' & + ,'[ J/m2]','(icohort)' ) + end if + if (associated(cpatch%mmean_wood_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_wood_water & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_WOOD_WATER_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Wood surface water' & + ,'[ kg/m2]','(icohort)' ) + end if + if (associated(cpatch%mmean_wood_hcap )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_wood_hcap & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_WOOD_HCAP_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Wood heat capacity' & + ,'[ J/m2/K]','(icohort)' ) + end if + if (associated(cpatch%mmean_wood_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_wood_temp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_WOOD_TEMP_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Wood temperature' & + ,'[ K]','(icohort)' ) + end if + if (associated(cpatch%mmean_wood_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_wood_fliq & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_WOOD_FLIQ_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Liquid fraction' & + ,'[ --]','(icohort)' ) + end if + if (associated(cpatch%mmean_wood_gbw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_wood_gbw & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_WOOD_GBW_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Wood boundary layer conductance' & + ,'[kg/m2wood/s]','(icohort)' ) + end if + if (associated(cpatch%mmean_fs_open )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_fs_open & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_FS_OPEN_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Net stress factor' & + ,'[ --]','(icohort)' ) + end if + if (associated(cpatch%mmean_fsw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_fsw & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_FSW_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Moisture stress' & + ,'[ --]','(icohort)' ) + end if + if (associated(cpatch%mmean_fsn )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_fsn & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_FSN_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Nitrogen stress' & + ,'[ --]','(icohort)' ) + end if + if (associated(cpatch%mmean_psi_open )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_psi_open & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_PSI_OPEN_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Transpiration with no stress' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%mmean_psi_closed )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_psi_closed & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_PSI_CLOSED_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Transpiration at maximum stress' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%mmean_water_supply )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_water_supply & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_WATER_SUPPLY_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Water supply' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%mmean_light_level )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_light_level & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_LIGHT_LEVEL_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Light level' & + ,'[ --]','(icohort)' ) end if - - if (associated(cpatch%qmean_par_l_diff)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%qmean_par_l_diff,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_PAR_L_DIFF :-41:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata avaialable','[NA]','NA') + if (associated(cpatch%mmean_light_level_beam)) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_light_level_beam & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_LIGHT_LEVEL_BEAM_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Light level (direct radiation)' & + ,'[ --]','(icohort)' ) end if - - if (associated(cpatch%qmean_fs_open)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%qmean_fs_open,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_FS_OPEN_CO :-41:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata avaialable','[NA]','NA') + if (associated(cpatch%mmean_light_level_diff)) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_light_level_diff & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_LIGHT_LEVEL_DIFF_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Light level (diffuse radiation)' & + ,'[ --]','(icohort)' ) + end if + if (associated(cpatch%mmean_par_l )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_par_l & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_PAR_L_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - PAR absorbed by leaves' & + ,'[ W/m2]','(icohort)' ) + end if + if (associated(cpatch%mmean_par_l_beam )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_par_l_beam & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_PAR_L_BEAM_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Direct PAR absorbed by leaves' & + ,'[ W/m2]','(icohort)' ) + end if + if (associated(cpatch%mmean_par_l_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_par_l_diff & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_PAR_L_DIFF_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Diffuse PAR absorbed by leaves' & + ,'[ W/m2]','(icohort)' ) + end if + if (associated(cpatch%mmean_rshort_l )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_rshort_l & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_RSHORT_L_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Shortwave radiation absorbed by leaves' & + ,'[ W/m2]','(icohort)' ) + end if + if (associated(cpatch%mmean_rlong_l )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_rlong_l & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_RLONG_L_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Longwave radiation absorbed by leaves' & + ,'[ W/m2]','(icohort)' ) + end if + if (associated(cpatch%mmean_sensible_lc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_sensible_lc & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SENSIBLE_LC_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Sensible heat' & + ,'[ W/m2]','(icohort)' ) + end if + if (associated(cpatch%mmean_vapor_lc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_vapor_lc & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_VAPOR_LC_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Leaf evaporation' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%mmean_transp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_transp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_TRANSP_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Leaf transpiration' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%mmean_intercepted_al )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_intercepted_al & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_INTERCEPTED_AL_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Leaf interception' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%mmean_wshed_lg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_wshed_lg & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_WSHED_LG_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Leaf shedding' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%mmean_rshort_w )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_rshort_w & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_RSHORT_W_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Shortwave radiation absorbed by wood' & + ,'[ W/m2]','(icohort)' ) + end if + if (associated(cpatch%mmean_rlong_w )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_rlong_w & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_RLONG_W_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Longwave radiation absorbed by wood' & + ,'[ W/m2]','(icohort)' ) + end if + if (associated(cpatch%mmean_sensible_wc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_sensible_wc & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_SENSIBLE_WC_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Sensible heat' & + ,'[ W/m2]','(icohort)' ) + end if + if (associated(cpatch%mmean_vapor_wc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_vapor_wc & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_VAPOR_WC_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Wood evaporation' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%mmean_intercepted_aw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_intercepted_aw & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_INTERCEPTED_AW_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Wood interception' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%mmean_wshed_wg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_wshed_wg & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_WSHED_WG_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Wood shedding' & + ,'[ kg/m2/s]','(icohort)' ) + end if + if (associated(cpatch%mmean_lai )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_lai & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_LAI_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Leaf area index' & + ,'[ m2leaf/m2]','(icohort)' ) + end if + if (associated(cpatch%mmean_bleaf )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_bleaf & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_BLEAF_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Leaf biomass' & + ,'[ kgC/pl]','(icohort)' ) + end if + if (associated(cpatch%mmean_broot )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_broot & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_BROOT_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Root biomass' & + ,'[ kgC/pl]','(icohort)' ) + end if + if (associated(cpatch%mmean_bstorage )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_bstorage & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_BSTORAGE_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Storage biomass' & + ,'[ kgC/pl]','(icohort)' ) end if - - if (associated(cpatch%qmean_fsw)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%qmean_fsw,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_FSW_CO :-41:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata avaialable','[NA]','NA') + if (associated(cpatch%mmean_leaf_maintenance)) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_leaf_maintenance & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_LEAF_MAINTENANCE_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Leaf maintenance rate' & + ,'[ kgC/pl/yr]','(icohort)' ) end if - - if (associated(cpatch%qmean_fsn)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%qmean_fsn,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_FSN_CO :-41:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata avaialable','[NA]','NA') + if (associated(cpatch%mmean_root_maintenance)) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_root_maintenance & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_ROOT_MAINTENANCE_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Root maintenance rate' & + ,'[ kgC/pl/yr]','(icohort)' ) + end if + if (associated(cpatch%mmean_leaf_drop )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_leaf_drop & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_LEAF_DROP_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Leaf drop' & + ,'[ kgC/pl/yr]','(icohort)' ) + end if + if (associated(cpatch%mmean_cb )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_cb & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_CB_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Carbon balance' & + ,'[ kgC/pl/yr]','(icohort)' ) + end if + if (associated(cpatch%mmean_nppleaf )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_nppleaf & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_NPPLEAF_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Net primary productivity - Leaf' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%mmean_nppfroot )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_nppfroot & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_NPPFROOT_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Net primary productivity - Fine root' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%mmean_nppsapwood )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_nppsapwood & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_NPPSAPWOOD_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Net primary productivity - Sap wood' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%mmean_nppcroot )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_nppcroot & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_NPPCROOT_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Net primary productivity - Coarse root' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%mmean_nppseeds )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_nppseeds & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_NPPSEEDS_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Net primary productivity - seeds' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%mmean_nppwood )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_nppwood & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_NPPWOOD_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Net primary productivity - heart wood' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%mmean_nppdaily )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmean_nppdaily & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_NPPDAILY_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly mean - Net primary productivity - total' & + ,'[ kgC/m2/yr]','(icohort)' ) + end if + if (associated(cpatch%mmsqu_gpp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmsqu_gpp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_GPP_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Gross primary productivity' & + ,'[kgC2/m4/yr2]','(icohort)' ) + end if + if (associated(cpatch%mmsqu_npp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmsqu_npp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_NPP_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Net primary productivity' & + ,'[kgC2/m4/yr2]','(icohort)' ) + end if + if (associated(cpatch%mmsqu_plresp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmsqu_plresp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_PLRESP_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Plant respiration' & + ,'[kgC2/m4/yr2]','(icohort)' ) + end if + if (associated(cpatch%mmsqu_sensible_lc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmsqu_sensible_lc & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_SENSIBLE_LC_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Sensible heat' & + ,'[ W2/m4]','(icohort)' ) + end if + if (associated(cpatch%mmsqu_vapor_lc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmsqu_vapor_lc & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_VAPOR_LC_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Leaf evaporation' & + ,'[ kg2/m4/s2]','(icohort)' ) + end if + if (associated(cpatch%mmsqu_transp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmsqu_transp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_TRANSP_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Leaf transpiration' & + ,'[ kg2/m4/s2]','(icohort)' ) + end if + if (associated(cpatch%mmsqu_sensible_wc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmsqu_sensible_wc & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_SENSIBLE_WC_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Sensible heat' & + ,'[ W2/m4]','(icohort)' ) + end if + if (associated(cpatch%mmsqu_vapor_wc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%mmsqu_vapor_wc & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMSQU_VAPOR_WC_CO :41:hist:mont:dcyc') + call metadata_edio(nvar,igr & + ,'Monthly MSSq - Wood evaporation' & + ,'[ kg2/m4/s2]','(icohort)' ) end if + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! - if (associated(cpatch%qmean_psi_open)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%qmean_psi_open,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_PSI_OPEN_CO :-41:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata avaialable','[NA]','NA') - end if + return + end subroutine filltab_patchtype_p41mmean + !=======================================================================================! + !=======================================================================================! - if (associated(cpatch%qmean_psi_closed)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%qmean_psi_closed,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_PSI_CLOSED_CO :-41:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata avaialable','[NA]','NA') - end if - if (associated(cpatch%qmean_water_supply)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%qmean_water_supply,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_WATER_SUPPLY_CO :-41:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata avaialable','[NA]','NA') - end if - if (associated(cpatch%qmean_gpp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%qmean_gpp,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_GPP_CO :-41:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata avaialable','[NA]','NA') - end if - if (associated(cpatch%qmean_leaf_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%qmean_leaf_resp,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_LEAF_RESP_CO :-41:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata avaialable','[NA]','NA') - end if - if (associated(cpatch%qmean_root_resp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%qmean_root_resp,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'QMEAN_ROOT_RESP_CO :-41:hist:dcyc') - call metadata_edio(nvar,igr,'No metadata avaialable','[NA]','NA') - end if - if (associated(cpatch%qmean_rshort_l)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%qmean_rshort_l,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RSHORT_L :-41:hist:dcyc') - call metadata_edio(nvar,igr,'Absorbed SW radiation (Leaf)','[W/m2]','icohort') - end if + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the cohort-level variables ! + ! (patchtype) that have two dimensions (ndcycle,ncohorts) and are real (type -41). ! + !---------------------------------------------------------------------------------------! + subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine - if (associated(cpatch%qmean_rlong_l)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%qmean_rlong_l,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RLONG_L :-41:hist:dcyc') - call metadata_edio(nvar,igr,'Absorbed LW radiation (Leaf)','[W/m2]','icohort') - end if + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(patchtype), target :: cpatch + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! - if (associated(cpatch%qmean_sensible_lc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%qmean_sensible_lc,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SENSIBLE_LC_CO :-41:hist:dcyc') - call metadata_edio(nvar,igr,'Sensible heat flux (Leaf->CAS)','[W/m2]','icohort') - end if - if (associated(cpatch%qmean_vapor_lc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%qmean_vapor_lc,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_VAPOR_LC_CO :-41:hist:dcyc') - call metadata_edio(nvar,igr,'Vapour flux (Leaf sfc->CAS)','[kg/m2/s]','icohort') - end if - if (associated(cpatch%qmean_transp)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%qmean_transp,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_TRANSP_CO :-41:hist:dcyc') - call metadata_edio(nvar,igr,'Leaf transpiration','[kg/m2/s]','icohort') - end if - if (associated(cpatch%qmean_intercepted_al)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%qmean_intercepted_al,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_INTERCEPTED_AL_CO :-41:hist:dcyc') - call metadata_edio(nvar,igr,'Leaf interception','[kg/m2/s]','icohort') + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + ! This part should have only 2-D vectors, with dimension ncohorts and ndcycle. ! + ! Notice that they all use the same npts. Here you should only add variables of ! + ! type -41. ! + !------------------------------------------------------------------------------------! + npts = cpatch%ncohorts * ndcycle + if (associated(cpatch%qmean_gpp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_gpp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_GPP_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Gross primary productivity' & + ,'[ kgC/m2/yr]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_npp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_npp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_NPP_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Net primary productivity' & + ,'[ kgC/m2/yr]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_leaf_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_leaf_resp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_LEAF_RESP_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Leaf respiration' & + ,'[ kgC/m2/yr]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_root_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_root_resp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_ROOT_RESP_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Root respiration' & + ,'[ kgC/m2/yr]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_growth_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_growth_resp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_GROWTH_RESP_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Growth respiration' & + ,'[ kgC/m2/yr]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_storage_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_storage_resp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_STORAGE_RESP_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Storage respiration' & + ,'[ kgC/m2/yr]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_vleaf_resp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_vleaf_resp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_VLEAF_RESP_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Virtual leaf respiration' & + ,'[ kgC/m2/yr]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_plresp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_plresp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_PLRESP_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Plant respiration' & + ,'[ kgC/m2/yr]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_leaf_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_leaf_energy & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_LEAF_ENERGY_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Leaf internal energy' & + ,'[ J/m2]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_leaf_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_leaf_water & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_LEAF_WATER_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Leaf surface water' & + ,'[ kg/m2]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_leaf_hcap )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_leaf_hcap & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_LEAF_HCAP_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Leaf heat capacity' & + ,'[ J/m2/K]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_leaf_vpdef )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_leaf_vpdef & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_LEAF_VPDEF_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Leaf vapour pressure deficit' & + ,'[ Pa]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_leaf_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_leaf_temp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_LEAF_TEMP_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Leaf temperature' & + ,'[ K]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_leaf_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_leaf_fliq & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_LEAF_FLIQ_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Liquid fraction' & + ,'[ --]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_leaf_gsw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_leaf_gsw & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_LEAF_GSW_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Stomatal conductance' & + ,'[kg/m2leaf/s]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_leaf_gbw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_leaf_gbw & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_LEAF_GBW_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Leaf boundary layer conductance' & + ,'[kg/m2leaf/s]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_wood_energy )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_wood_energy & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_WOOD_ENERGY_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Wood internal energy' & + ,'[ J/m2]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_wood_water )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_wood_water & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_WOOD_WATER_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Wood surface water' & + ,'[ kg/m2]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_wood_hcap )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_wood_hcap & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_WOOD_HCAP_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Wood heat capacity' & + ,'[ J/m2/K]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_wood_temp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_wood_temp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_WOOD_TEMP_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Wood temperature' & + ,'[ K]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_wood_fliq )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_wood_fliq & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_WOOD_FLIQ_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Liquid fraction' & + ,'[ --]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_wood_gbw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_wood_gbw & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_WOOD_GBW_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Wood boundary layer conductance' & + ,'[kg/m2wood/s]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_fs_open )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_fs_open & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_FS_OPEN_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Net stress factor' & + ,'[ --]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_fsw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_fsw & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_FSW_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Moisture stress' & + ,'[ --]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_fsn )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_fsn & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_FSN_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Nitrogen stress' & + ,'[ --]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_psi_open )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_psi_open & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_PSI_OPEN_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Transpiration with no stress' & + ,'[ kg/m2/s]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_psi_closed )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_psi_closed & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_PSI_CLOSED_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Transpiration at maximum stress' & + ,'[ kg/m2/s]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_water_supply )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_water_supply & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_WATER_SUPPLY_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Water supply' & + ,'[ kg/m2/s]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_light_level )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_light_level & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_LIGHT_LEVEL_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Light level' & + ,'[ --]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_light_level_beam)) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_light_level_beam & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_LIGHT_LEVEL_BEAM_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Light level (direct radiation)' & + ,'[ --]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_light_level_diff)) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_light_level_diff & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_LIGHT_LEVEL_DIFF_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Light level (diffuse radiation)' & + ,'[ --]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_par_l )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_par_l & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_PAR_L_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - PAR absorbed by leaves' & + ,'[ W/m2]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_par_l_beam )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_par_l_beam & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_PAR_L_BEAM_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Direct PAR absorbed by leaves' & + ,'[ W/m2]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_par_l_diff )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_par_l_diff & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_PAR_L_DIFF_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Diffuse PAR absorbed by leaves' & + ,'[ W/m2]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_rshort_l )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_rshort_l & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_RSHORT_L_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Shortwave radiation absorbed by leaves' & + ,'[ W/m2]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_rlong_l )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_rlong_l & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_RLONG_L_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Longwave radiation absorbed by leaves' & + ,'[ W/m2]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_sensible_lc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_sensible_lc & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SENSIBLE_LC_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Sensible heat' & + ,'[ W/m2]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_vapor_lc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_vapor_lc & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_VAPOR_LC_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Leaf evaporation' & + ,'[ kg/m2/s]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_transp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_transp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_TRANSP_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Leaf transpiration' & + ,'[ kg/m2/s]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_intercepted_al )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_intercepted_al & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_INTERCEPTED_AL_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Leaf interception' & + ,'[ kg/m2/s]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_wshed_lg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_wshed_lg & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_WSHED_LG_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Leaf shedding' & + ,'[ kg/m2/s]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_rshort_w )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_rshort_w & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_RSHORT_W_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Shortwave radiation absorbed by wood' & + ,'[ W/m2]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_rlong_w )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_rlong_w & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_RLONG_W_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Longwave radiation absorbed by wood' & + ,'[ W/m2]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_sensible_wc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_sensible_wc & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_SENSIBLE_WC_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Sensible heat' & + ,'[ W/m2]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_vapor_wc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_vapor_wc & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_VAPOR_WC_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Wood evaporation' & + ,'[ kg/m2/s]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_intercepted_aw )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_intercepted_aw & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_INTERCEPTED_AW_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Wood interception' & + ,'[ kg/m2/s]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmean_wshed_wg )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmean_wshed_wg & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMEAN_WSHED_WG_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'Mean diel - Wood shedding' & + ,'[ kg/m2/s]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmsqu_gpp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmsqu_gpp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_GPP_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Gross primary productivity' & + ,'[kgC2/m4/yr2]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmsqu_npp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmsqu_npp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_NPP_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Net primary productivity' & + ,'[kgC2/m4/yr2]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmsqu_plresp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmsqu_plresp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_PLRESP_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Plant respiration' & + ,'[kgC2/m4/yr2]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmsqu_sensible_lc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmsqu_sensible_lc & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_SENSIBLE_LC_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Sensible heat' & + ,'[ W2/m4]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmsqu_vapor_lc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmsqu_vapor_lc & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_VAPOR_LC_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Leaf evaporation' & + ,'[ kg2/m4/s2]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmsqu_transp )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmsqu_transp & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_TRANSP_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Leaf transpiration' & + ,'[ kg2/m4/s2]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmsqu_sensible_wc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmsqu_sensible_wc & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_SENSIBLE_WC_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Sensible heat' & + ,'[ W2/m4]','(ndcycle,icohort)' ) + end if + if (associated(cpatch%qmsqu_vapor_wc )) then + nvar = nvar+1 + call vtable_edio_r(npts,cpatch%qmsqu_vapor_wc & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'QMSQU_VAPOR_WC_CO :-41:hist:dcyc' ) + call metadata_edio(nvar,igr & + ,'MSSq diel - Wood evaporation' & + ,'[ kg2/m4/s2]','(ndcycle,icohort)' ) end if + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! - if (associated(cpatch%qmean_wshed_lg)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%qmean_wshed_lg,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_WSHED_LG_CO :-41:hist:dcyc') - call metadata_edio(nvar,igr,'Leaf water shedding','[kg/m2/s]','icohort') - end if + return + end subroutine filltab_patchtype_m41 + !=======================================================================================! + !=======================================================================================! - if (associated(cpatch%qmean_rshort_w)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%qmean_rshort_w,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RSHORT_L :-41:hist:dcyc') - call metadata_edio(nvar,igr,'Absorbed SW radiation (Wood)','[W/m2]','icohort') - end if - if (associated(cpatch%qmean_rlong_w)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%qmean_rlong_w,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RLONG_W :-41:hist:dcyc') - call metadata_edio(nvar,igr,'Absorbed LW radiation (Wood)','[W/m2]','icohort') - end if - if (associated(cpatch%qmean_sensible_wc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%qmean_sensible_wc,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SENSIBLE_WC_CO :-41:hist:dcyc') - call metadata_edio(nvar,igr,'Sensible heat flux (Wood->CAS)','[W/m2]','icohort') - end if - if (associated(cpatch%qmean_vapor_wc)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%qmean_vapor_wc,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_VAPOR_WC_CO :-41:hist:dcyc') - call metadata_edio(nvar,igr,'Vapour flux (Wood sfc->CAS)','[kg/m2/s]','icohort') - end if - if (associated(cpatch%qmean_intercepted_aw)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%qmean_intercepted_aw,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_INTERCEPTED_AW_CO :-41:hist:dcyc') - call metadata_edio(nvar,igr,'Wood interception','[kg/m2/s]','icohort') - end if - if (associated(cpatch%qmean_wshed_wg)) then - nvar=nvar+1 - call vtable_edio_r(npts,cpatch%qmean_wshed_lg,nvar,igr,init & - ,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_WSHED_WG_CO :-41:hist:dcyc') - call metadata_edio(nvar,igr,'Wood water shedding','[kg/m2/s]','icohort') - end if - !------------------------------------------------------------------------------------! + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the cohort-level variables ! + ! (patchtype) that have two dimensions (n_mort,ncohorts) and are real (type 48). ! + !---------------------------------------------------------------------------------------! + subroutine filltab_patchtype_p48(cpatch,igr,init,var_len,var_len_global,max_ptrs,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine + + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(patchtype), target :: cpatch + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts !------------------------------------------------------------------------------------! @@ -16672,8 +26247,8 @@ subroutine filltab_patchtype(igr,ipy,isi,ipa,init) !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! ! This part should have only 2-D vectors, with dimension ncohorts and mortal- ! - ! ity types months. Notice that they all use the same npts. Here you should only add vari- ! - ! ables of type 48. ! + ! ity types months. Notice that they all use the same npts. Only variables of type ! + ! 48 should be placed here. ! !------------------------------------------------------------------------------------! npts = cpatch%ncohorts * n_mort @@ -16692,6 +26267,39 @@ subroutine filltab_patchtype(igr,ipy,isi,ipa,init) end if !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + + return + end subroutine filltab_patchtype_p48 + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This routine will fill the pointer table with the cohort-level variables ! + ! (patchtype) that have two dimensions (13 months,ncohorts) and are real (type 49). ! + !---------------------------------------------------------------------------------------! + subroutine filltab_patchtype_p49(cpatch,igr,init,var_len,var_len_global,max_ptrs,nvar) + use ed_var_tables, only : vtable_edio_r & ! sub-routine + , metadata_edio ! ! sub-routine + + implicit none + !----- Arguments. -------------------------------------------------------------------! + type(patchtype), target :: cpatch + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar + !----- Local variables. -------------------------------------------------------------! + integer :: npts + !------------------------------------------------------------------------------------! @@ -16736,108 +26344,134 @@ subroutine filltab_patchtype(igr,ipy,isi,ipa,init) !------------------------------------------------------------------------------------! return - end subroutine filltab_patchtype -!==========================================================================================! -!==========================================================================================! + end subroutine filltab_patchtype_p49 + !=======================================================================================! + !=======================================================================================! -!==========================================================================================! -!==========================================================================================! - ! ========= UTILITITY FUNCTIONS =========== ! -!==========================================================================================! -!==========================================================================================! - function get_nsites(cgrid) + !=======================================================================================! + !=======================================================================================! + ! UTILITY FUNCTIONS ! + !=======================================================================================! + !=======================================================================================! - implicit none - integer :: get_nsites - integer :: ipy,isi - type(edtype),target :: cgrid - type(polygontype),pointer :: cpoly - get_nsites = 0 - do ipy=1,cgrid%npolygons - cpoly=>cgrid%polygon(ipy) - do isi=1,cpoly%nsites - get_nsites = get_nsites + 1 - end do - end do - return - end function get_nsites -!==========================================================================================! -!==========================================================================================! + !=======================================================================================! + !=======================================================================================! + ! This function gets the total number of sites. ! + !---------------------------------------------------------------------------------------! + integer function get_nsites(cgrid) + + implicit none + !------ Arguments. ------------------------------------------------------------------! + type(edtype) , target :: cgrid + !------ Local variables. ------------------------------------------------------------! + type(polygontype), pointer :: cpoly + integer :: ipy + integer :: isi + !------------------------------------------------------------------------------------! + + get_nsites = 0 + + do ipy=1,cgrid%npolygons + cpoly=>cgrid%polygon(ipy) + do isi=1,cpoly%nsites + get_nsites = get_nsites + 1 + end do + end do + + return + end function get_nsites + !=======================================================================================! + !=======================================================================================! -!==========================================================================================! -!==========================================================================================! - function get_npatches(cgrid) - - implicit none - integer :: get_npatches - integer :: ipy,isi,ipa - type(edtype),target :: cgrid - type(polygontype),pointer :: cpoly - type(sitetype),pointer :: csite - - get_npatches = 0 - - do ipy=1,cgrid%npolygons - cpoly=>cgrid%polygon(ipy) - do isi=1,cpoly%nsites - csite=>cpoly%site(isi) - do ipa=1,csite%npatches - get_npatches = get_npatches + 1 - end do - end do - end do - return - end function get_npatches -!==========================================================================================! -!==========================================================================================! + !=======================================================================================! + !=======================================================================================! + ! This function gets the total number of patches. ! + !---------------------------------------------------------------------------------------! + integer function get_npatches(cgrid) + + implicit none + !------ Arguments. ------------------------------------------------------------------! + type(edtype) , target :: cgrid + !------ Local variables. ------------------------------------------------------------! + type(polygontype), pointer :: cpoly + type(sitetype) , pointer :: csite + integer :: ipy + integer :: isi + integer :: ipa + !------------------------------------------------------------------------------------! + + + get_npatches = 0 + do ipy=1,cgrid%npolygons + cpoly=>cgrid%polygon(ipy) + do isi=1,cpoly%nsites + csite=>cpoly%site(isi) + do ipa=1,csite%npatches + get_npatches = get_npatches + 1 + end do + end do + end do + return + end function get_npatches + !=======================================================================================! + !=======================================================================================! + !=======================================================================================! + !=======================================================================================! + ! This function gets the total number of ncohorts. ! + !---------------------------------------------------------------------------------------! + integer function get_ncohorts(cgrid) + + implicit none + !------ Arguments. ------------------------------------------------------------------! + type(edtype) , target :: cgrid + !------ Local variables. ------------------------------------------------------------! + type(polygontype), pointer :: cpoly + type(sitetype) , pointer :: csite + type(patchtype) , pointer :: cpatch + integer :: ipy + integer :: isi + integer :: ipa + integer :: ico + !------------------------------------------------------------------------------------! + + get_ncohorts = 0 + + do ipy=1,cgrid%npolygons + cpoly=>cgrid%polygon(ipy) + do isi=1,cpoly%nsites + csite=>cpoly%site(isi) + do ipa=1,csite%npatches + cpatch=>csite%patch(ipa) + get_ncohorts = get_ncohorts + cpatch%ncohorts + end do + end do + end do + return + end function get_ncohorts + !=======================================================================================! + !=======================================================================================! +end module ed_state_vars !==========================================================================================! !==========================================================================================! - function get_ncohorts(cgrid) - - implicit none - integer :: get_ncohorts - integer :: ipy,isi,ipa,ico - type(edtype),target :: cgrid - type(polygontype),pointer :: cpoly - type(sitetype),pointer :: csite - type(patchtype),pointer :: cpatch - - get_ncohorts = 0 - - do ipy=1,cgrid%npolygons - cpoly=>cgrid%polygon(ipy) - do isi=1,cpoly%nsites - csite=>cpoly%site(isi) - do ipa=1,csite%npatches - cpatch=>csite%patch(ipa) - get_ncohorts = get_ncohorts + cpatch%ncohorts - end do - end do - end do - return - end function get_ncohorts -!==========================================================================================! -!==========================================================================================! -end module ed_state_vars diff --git a/ED/src/memory/ed_var_tables.f90 b/ED/src/memory/ed_var_tables.f90 index a87384bda..00e777547 100644 --- a/ED/src/memory/ed_var_tables.f90 +++ b/ED/src/memory/ed_var_tables.f90 @@ -10,7 +10,7 @@ ! ! -11 : rank 2 : ndcycle ! ! ! ! 12 : rank 2 : s-layer ! ! ! ! 120 : rank 2 : s-layer, integer ! ! -! ! -12 : rank 3 : ndcycle,s-layer ! ! +! ! -12 : rank 3 : s-layer,ndcycle ! ! ! ! 13 : rank 2 : w-layer ! ! ! ! 14 : rank 2 : pft ! ! ! ! 146 : rank 3 : npft,ndbh ! ! @@ -43,6 +43,7 @@ ! ! 31 : rank 1 : real ! ! ! ! -31 : rank 2 : ndcycle ! ! ! ! 32 : rank 2 : s-layer ! ! +! ! -32 : rank 3 : s-layer, ndcycle ! ! ! ! 320 : rank 2 : s-layer, integer ! ! ! ! 33 : rank 2 : w-layer ! ! ! ! 34 : rank 2 : pft ! ! @@ -76,7 +77,7 @@ module ed_var_tables !---------------------------------------------------------------------------------------! ! Define data type for main variable table ! !---------------------------------------------------------------------------------------! - integer, parameter :: maxvars = 1100 + integer, parameter :: maxvars = 1600 !---------------------------------------------------------------------------------------! diff --git a/ED/src/memory/fusion_fission_coms.f90 b/ED/src/memory/fusion_fission_coms.f90 index 1cb80b641..f0502e34e 100644 --- a/ED/src/memory/fusion_fission_coms.f90 +++ b/ED/src/memory/fusion_fission_coms.f90 @@ -54,6 +54,14 @@ module fusion_fission_coms real :: light_toler_max real :: light_toler_mult + !---------------------------------------------------------------------------------------! + ! Correlation coefficient that is assumed between two patches and two cohorts when ! + ! they are fused. This only affects the mean sum of squares. ! + !---------------------------------------------------------------------------------------! + real :: corr_patch + real :: corr_cohort + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! ! Flag to decide whether we should print the full details of the patch fusion ! ! process. ! diff --git a/ED/src/memory/rk4_coms.f90 b/ED/src/memory/rk4_coms.f90 index c7e640c52..ef7b0e3b0 100644 --- a/ED/src/memory/rk4_coms.f90 +++ b/ED/src/memory/rk4_coms.f90 @@ -75,6 +75,7 @@ module rk4_coms !----- Soil variables. --------------------------------------------------------------! real(kind=8), dimension(:), pointer :: soil_energy ! Internal energy [ J/m³] + real(kind=8), dimension(:), pointer :: soil_mstpot ! Soil matric potential [ m] real(kind=8), dimension(:), pointer :: soil_tempk ! Specific humidity [ K] real(kind=8), dimension(:), pointer :: soil_fracliq ! Liquid fraction [ ----] real(kind=8), dimension(:), pointer :: soil_water ! Water content [ m³/m³] @@ -234,28 +235,16 @@ module rk4_coms ! Fast time flux diagnostic variables. These variables may be turned off under ! ! different conditions. ! !------------------------------------------------------------------------------------! - real(kind=8) :: avg_rshort_gnd ! Total absorbed SW radiation (ground) - real(kind=8) :: avg_par_gnd ! Total absorbed PAR radiation (ground) - real(kind=8) :: avg_rlong_gnd ! Net absorbed LW radiation (ground) + real(kind=8) :: avg_rshort_gnd ! Total absorbed SW radiation (ground) + real(kind=8) :: avg_par_gnd ! Total absorbed PAR radiation (ground) + real(kind=8) :: avg_rlong_gnd ! Net absorbed LW radiation (ground) !----- Water fluxes -----------------------------------------------------------------! - real(kind=8) :: avg_vapor_lc ! Leaf -> canopy air: evap./cond. flux - real(kind=8) :: avg_vapor_wc ! Wood -> canopy air: evap./cond. flux - real(kind=8) :: avg_vapor_gc ! Ground -> canopy air: evaporation flux - real(kind=8) :: avg_vapor_ac ! Free atm. -> canopy air: vapour flux - real(kind=8) :: avg_transp ! Transpiration - real(kind=8) :: avg_evap ! Evaporation - !----- Mass and energy fluxes due to water shedding. --------------------------------! - real(kind=8) :: avg_wshed_vg ! Mass flux - real(kind=8) :: avg_qwshed_vg ! Energy flux - !----- Mass and energy input due to intercepted water. ------------------------------! - real(kind=8) :: avg_intercepted ! Mass flux - real(kind=8) :: avg_qintercepted ! Energy flux + real(kind=8) :: avg_vapor_gc ! Ground -> canopy air: evaporation flux + real(kind=8) :: avg_vapor_ac ! Free atm. -> canopy air: vapour flux !----- Mass and energy input due to throughfall precipitation. ----------------------! real(kind=8) :: avg_throughfall ! Mass flux real(kind=8) :: avg_qthroughfall ! Energy flux !----- Sensible heat flux -----------------------------------------------------------! - real(kind=8) :: avg_sensible_lc ! Leaf -> canopy air - real(kind=8) :: avg_sensible_wc ! Wood -> canopy air real(kind=8) :: avg_sensible_gc ! Ground -> canopy air real(kind=8) :: avg_sensible_ac ! Free atm. -> canopy air real(kind=8) :: avg_heatstor_veg ! Heat storage in vegetation @@ -272,17 +261,17 @@ module rk4_coms real(kind=8),pointer,dimension(:) :: avg_transloss ! Transpired soil moisture sink real(kind=8),pointer,dimension(:) :: avg_sensible_gg ! Soil heat flux between layers real(kind=8) :: avg_drainage ! Drainage at the bottom. - real(kind=8) :: avg_drainage_heat ! Drainage at the bottom. + real(kind=8) :: avg_qdrainage ! Drainage at the bottom. !----- Cohort-level fluxes. ---------------------------------------------------------! - real(kind=8),pointer,dimension(:) :: cav_sensible_lc ! Sensible heat (Leaf-CAS) - real(kind=8),pointer,dimension(:) :: cav_sensible_wc ! Sensible heat (Wood-CAS) - real(kind=8),pointer,dimension(:) :: cav_vapor_lc ! Water flux (Leaf sfc - CAS) - real(kind=8),pointer,dimension(:) :: cav_vapor_wc ! Water flux (Wood sfc - CAS) - real(kind=8),pointer,dimension(:) :: cav_transp ! Transpiration (Leaf - CAS) - real(kind=8),pointer,dimension(:) :: cav_intercepted_al ! Leaf interception - real(kind=8),pointer,dimension(:) :: cav_intercepted_aw ! Wood interception - real(kind=8),pointer,dimension(:) :: cav_wshed_lg ! Leaf shedding - real(kind=8),pointer,dimension(:) :: cav_wshed_wg ! Wood shedding + real(kind=8),pointer,dimension(:) :: avg_sensible_lc ! Sensible heat (Leaf-CAS) + real(kind=8),pointer,dimension(:) :: avg_sensible_wc ! Sensible heat (Wood-CAS) + real(kind=8),pointer,dimension(:) :: avg_vapor_lc ! Water flux (Leaf sfc - CAS) + real(kind=8),pointer,dimension(:) :: avg_vapor_wc ! Water flux (Wood sfc - CAS) + real(kind=8),pointer,dimension(:) :: avg_transp ! Transpiration (Leaf - CAS) + real(kind=8),pointer,dimension(:) :: avg_intercepted_al ! Leaf interception + real(kind=8),pointer,dimension(:) :: avg_intercepted_aw ! Wood interception + real(kind=8),pointer,dimension(:) :: avg_wshed_lg ! Leaf shedding + real(kind=8),pointer,dimension(:) :: avg_wshed_wg ! Wood shedding !----- Water deficit. ---------------------------------------------------------------! real(kind=8) :: water_deficit ! Step water deficit !------------------------------------------------------------------------------------! @@ -298,7 +287,6 @@ module rk4_coms real(kind=8) :: flx_vapor_gc ! Ground -> canopy air: evaporation flux real(kind=8) :: flx_vapor_ac ! Free atm. -> canopy air: vapour flux real(kind=8) :: flx_transp ! Transpiration - real(kind=8) :: flx_evap ! Evaporation !----- Mass and energy fluxes due to water shedding. --------------------------------! real(kind=8) :: flx_wshed_vg ! Mass flux real(kind=8) :: flx_qwshed_vg ! Energy flux @@ -322,7 +310,7 @@ module rk4_coms real(kind=8),pointer,dimension(:) :: flx_transloss ! Transpired soil moisture sink real(kind=8),pointer,dimension(:) :: flx_sensible_gg ! Soil heat flux between layers real(kind=8) :: flx_drainage ! Drainage at the bottom. - real(kind=8) :: flx_drainage_heat ! Drainage at the bottom. + real(kind=8) :: flx_qdrainage ! Drainage at the bottom. !----- Cohort-level fluxes. ---------------------------------------------------------! real(kind=8),pointer,dimension(:) :: cfx_hflxlc ! Sensible heat real(kind=8),pointer,dimension(:) :: cfx_hflxwc ! Sensible heat @@ -872,6 +860,7 @@ subroutine allocate_rk4_patch(y) call nullify_rk4_patch(y) allocate(y%soil_energy (0:nzg)) + allocate(y%soil_mstpot (0:nzg)) allocate(y%soil_water (0:nzg)) allocate(y%soil_fracliq (0:nzg)) allocate(y%soil_tempk (0:nzg)) @@ -915,26 +904,27 @@ subroutine nullify_rk4_patch(y) type(rk4patchtype), target :: y !------------------------------------------------------------------------------------! - nullify(y%soil_energy) - nullify(y%soil_water) + nullify(y%soil_energy ) + nullify(y%soil_mstpot ) + nullify(y%soil_water ) nullify(y%soil_fracliq) - nullify(y%soil_tempk) + nullify(y%soil_tempk ) - nullify(y%sfcwater_energy) - nullify(y%sfcwater_mass) - nullify(y%sfcwater_depth) + nullify(y%sfcwater_energy ) + nullify(y%sfcwater_mass ) + nullify(y%sfcwater_depth ) nullify(y%sfcwater_fracliq) - nullify(y%sfcwater_tempk) + nullify(y%sfcwater_tempk ) !------------------------------------------------------------------------------------! ! Diagnostics - for now we will always allocate the diagnostics, even if they ! ! aren't used. ! !------------------------------------------------------------------------------------! - nullify(y%avg_smoist_gg) - nullify(y%avg_transloss) + nullify(y%avg_smoist_gg ) + nullify(y%avg_transloss ) nullify(y%avg_sensible_gg) - nullify(y%flx_smoist_gg) - nullify(y%flx_transloss) + nullify(y%flx_smoist_gg ) + nullify(y%flx_transloss ) nullify(y%flx_sensible_gg) return @@ -1051,29 +1041,19 @@ subroutine zero_rk4_patch(y) y%avg_carbon_ac = 0.d0 y%avg_carbon_st = 0.d0 - y%avg_vapor_lc = 0.d0 - y%avg_vapor_wc = 0.d0 y%avg_vapor_gc = 0.d0 - y%avg_wshed_vg = 0.d0 - y%avg_intercepted = 0.d0 y%avg_throughfall = 0.d0 y%avg_vapor_ac = 0.d0 - y%avg_transp = 0.d0 - y%avg_evap = 0.d0 y%avg_rshort_gnd = 0.d0 y%avg_par_gnd = 0.d0 y%avg_rlong_gnd = 0.d0 - y%avg_sensible_lc = 0.d0 - y%avg_sensible_wc = 0.d0 - y%avg_qwshed_vg = 0.d0 - y%avg_qintercepted = 0.d0 y%avg_qthroughfall = 0.d0 y%avg_sensible_gc = 0.d0 y%avg_sensible_ac = 0.d0 y%avg_heatstor_veg = 0.d0 y%avg_drainage = 0.d0 - y%avg_drainage_heat = 0.d0 + y%avg_qdrainage = 0.d0 y%water_deficit = 0.d0 @@ -1087,7 +1067,6 @@ subroutine zero_rk4_patch(y) y%flx_throughfall = 0.d0 y%flx_vapor_ac = 0.d0 y%flx_transp = 0.d0 - y%flx_evap = 0.d0 y%flx_rshort_gnd = 0.d0 y%flx_par_gnd = 0.d0 y%flx_rlong_gnd = 0.d0 @@ -1104,27 +1083,28 @@ subroutine zero_rk4_patch(y) y%wflxac = 0.d0 y%flx_drainage = 0.d0 - y%flx_drainage_heat = 0.d0 + y%flx_qdrainage = 0.d0 !----- The following variables are pointers, check whether they are linked or not. --! - if(associated(y%soil_energy )) y%soil_energy(:) = 0.d0 - if(associated(y%soil_tempk )) y%soil_tempk(:) = 0.d0 - if(associated(y%soil_fracliq )) y%soil_fracliq(:) = 0.d0 - if(associated(y%soil_water )) y%soil_water(:) = 0.d0 + if(associated(y%soil_energy )) y%soil_energy (:) = 0.d0 + if(associated(y%soil_mstpot )) y%soil_mstpot (:) = 0.d0 + if(associated(y%soil_tempk )) y%soil_tempk (:) = 0.d0 + if(associated(y%soil_fracliq )) y%soil_fracliq (:) = 0.d0 + if(associated(y%soil_water )) y%soil_water (:) = 0.d0 - if(associated(y%sfcwater_depth )) y%sfcwater_depth(:) = 0.d0 - if(associated(y%sfcwater_mass )) y%sfcwater_mass(:) = 0.d0 - if(associated(y%sfcwater_energy )) y%sfcwater_energy(:) = 0.d0 - if(associated(y%sfcwater_tempk )) y%sfcwater_tempk(:) = 0.d0 + if(associated(y%sfcwater_depth )) y%sfcwater_depth (:) = 0.d0 + if(associated(y%sfcwater_mass )) y%sfcwater_mass (:) = 0.d0 + if(associated(y%sfcwater_energy )) y%sfcwater_energy (:) = 0.d0 + if(associated(y%sfcwater_tempk )) y%sfcwater_tempk (:) = 0.d0 if(associated(y%sfcwater_fracliq )) y%sfcwater_fracliq(:) = 0.d0 - if(associated(y%avg_smoist_gg )) y%avg_smoist_gg(:) = 0.d0 - if(associated(y%avg_transloss )) y%avg_transloss(:) = 0.d0 - if(associated(y%avg_sensible_gg )) y%avg_sensible_gg(:) = 0.d0 + if(associated(y%avg_smoist_gg )) y%avg_smoist_gg (:) = 0.d0 + if(associated(y%avg_transloss )) y%avg_transloss (:) = 0.d0 + if(associated(y%avg_sensible_gg )) y%avg_sensible_gg (:) = 0.d0 - if(associated(y%flx_smoist_gg )) y%flx_smoist_gg (:) = 0.d0 - if(associated(y%flx_transloss )) y%flx_transloss (:) = 0.d0 - if(associated(y%flx_sensible_gg )) y%flx_sensible_gg(:) = 0.d0 + if(associated(y%flx_smoist_gg )) y%flx_smoist_gg (:) = 0.d0 + if(associated(y%flx_transloss )) y%flx_transloss (:) = 0.d0 + if(associated(y%flx_sensible_gg )) y%flx_sensible_gg (:) = 0.d0 return end subroutine zero_rk4_patch @@ -1146,23 +1126,24 @@ subroutine deallocate_rk4_patch(y) type(rk4patchtype), target :: y !------------------------------------------------------------------------------------! - if (associated(y%soil_energy)) deallocate(y%soil_energy) - if (associated(y%soil_water)) deallocate(y%soil_water) + if (associated(y%soil_energy )) deallocate(y%soil_energy ) + if (associated(y%soil_mstpot )) deallocate(y%soil_mstpot ) + if (associated(y%soil_water )) deallocate(y%soil_water ) if (associated(y%soil_fracliq)) deallocate(y%soil_fracliq) - if (associated(y%soil_tempk)) deallocate(y%soil_tempk) + if (associated(y%soil_tempk )) deallocate(y%soil_tempk ) - if (associated(y%sfcwater_energy)) deallocate(y%sfcwater_energy) - if (associated(y%sfcwater_mass)) deallocate(y%sfcwater_mass) - if (associated(y%sfcwater_depth)) deallocate(y%sfcwater_depth) + if (associated(y%sfcwater_energy )) deallocate(y%sfcwater_energy ) + if (associated(y%sfcwater_mass )) deallocate(y%sfcwater_mass ) + if (associated(y%sfcwater_depth )) deallocate(y%sfcwater_depth ) if (associated(y%sfcwater_fracliq)) deallocate(y%sfcwater_fracliq) - if (associated(y%sfcwater_tempk)) deallocate(y%sfcwater_tempk) + if (associated(y%sfcwater_tempk )) deallocate(y%sfcwater_tempk ) ! Diagnostics - if (associated(y%avg_smoist_gg)) deallocate(y%avg_smoist_gg) - if (associated(y%avg_transloss)) deallocate(y%avg_transloss) + if (associated(y%avg_smoist_gg )) deallocate(y%avg_smoist_gg ) + if (associated(y%avg_transloss )) deallocate(y%avg_transloss ) if (associated(y%avg_sensible_gg)) deallocate(y%avg_sensible_gg) - if (associated(y%flx_smoist_gg)) deallocate(y%flx_smoist_gg) - if (associated(y%flx_transloss)) deallocate(y%flx_transloss) + if (associated(y%flx_smoist_gg )) deallocate(y%flx_smoist_gg ) + if (associated(y%flx_transloss )) deallocate(y%flx_transloss ) if (associated(y%flx_sensible_gg)) deallocate(y%flx_sensible_gg) return @@ -1256,15 +1237,15 @@ subroutine allocate_rk4_coh(maxcohort,y) allocate(y%cfx_qtransp (maxcohort)) allocate(y%cfx_qintercepted (maxcohort)) - allocate(y%cav_sensible_lc (maxcohort)) - allocate(y%cav_sensible_wc (maxcohort)) - allocate(y%cav_vapor_lc (maxcohort)) - allocate(y%cav_vapor_wc (maxcohort)) - allocate(y%cav_transp (maxcohort)) - allocate(y%cav_intercepted_al(maxcohort)) - allocate(y%cav_intercepted_aw(maxcohort)) - allocate(y%cav_wshed_lg (maxcohort)) - allocate(y%cav_wshed_wg (maxcohort)) + allocate(y%avg_sensible_lc (maxcohort)) + allocate(y%avg_sensible_wc (maxcohort)) + allocate(y%avg_vapor_lc (maxcohort)) + allocate(y%avg_vapor_wc (maxcohort)) + allocate(y%avg_transp (maxcohort)) + allocate(y%avg_intercepted_al(maxcohort)) + allocate(y%avg_intercepted_aw(maxcohort)) + allocate(y%avg_wshed_lg (maxcohort)) + allocate(y%avg_wshed_wg (maxcohort)) call zero_rk4_cohort(y) @@ -1357,15 +1338,15 @@ subroutine nullify_rk4_cohort(y) - nullify(y%cav_sensible_lc ) - nullify(y%cav_sensible_wc ) - nullify(y%cav_vapor_lc ) - nullify(y%cav_vapor_wc ) - nullify(y%cav_transp ) - nullify(y%cav_intercepted_al) - nullify(y%cav_intercepted_aw) - nullify(y%cav_wshed_lg ) - nullify(y%cav_wshed_wg ) + nullify(y%avg_sensible_lc ) + nullify(y%avg_sensible_wc ) + nullify(y%avg_vapor_lc ) + nullify(y%avg_vapor_wc ) + nullify(y%avg_transp ) + nullify(y%avg_intercepted_al) + nullify(y%avg_intercepted_aw) + nullify(y%avg_wshed_lg ) + nullify(y%avg_wshed_wg ) return end subroutine nullify_rk4_cohort @@ -1454,15 +1435,15 @@ subroutine zero_rk4_cohort(y) if (associated(y%cfx_qintercepted )) y%cfx_qintercepted = 0.d0 - if(associated(y%cav_sensible_lc )) y%cav_sensible_lc = 0.d0 - if(associated(y%cav_sensible_wc )) y%cav_sensible_wc = 0.d0 - if(associated(y%cav_vapor_lc )) y%cav_vapor_lc = 0.d0 - if(associated(y%cav_vapor_wc )) y%cav_vapor_wc = 0.d0 - if(associated(y%cav_transp )) y%cav_transp = 0.d0 - if(associated(y%cav_intercepted_al)) y%cav_intercepted_al = 0.d0 - if(associated(y%cav_intercepted_aw)) y%cav_intercepted_aw = 0.d0 - if(associated(y%cav_wshed_lg )) y%cav_wshed_lg = 0.d0 - if(associated(y%cav_wshed_wg )) y%cav_wshed_wg = 0.d0 + if(associated(y%avg_sensible_lc )) y%avg_sensible_lc = 0.d0 + if(associated(y%avg_sensible_wc )) y%avg_sensible_wc = 0.d0 + if(associated(y%avg_vapor_lc )) y%avg_vapor_lc = 0.d0 + if(associated(y%avg_vapor_wc )) y%avg_vapor_wc = 0.d0 + if(associated(y%avg_transp )) y%avg_transp = 0.d0 + if(associated(y%avg_intercepted_al)) y%avg_intercepted_al = 0.d0 + if(associated(y%avg_intercepted_aw)) y%avg_intercepted_aw = 0.d0 + if(associated(y%avg_wshed_lg )) y%avg_wshed_lg = 0.d0 + if(associated(y%avg_wshed_wg )) y%avg_wshed_wg = 0.d0 return end subroutine zero_rk4_cohort @@ -1553,15 +1534,15 @@ subroutine deallocate_rk4_coh(y) - if(associated(y%cav_sensible_lc )) deallocate(y%cav_sensible_lc ) - if(associated(y%cav_sensible_wc )) deallocate(y%cav_sensible_wc ) - if(associated(y%cav_vapor_lc )) deallocate(y%cav_vapor_lc ) - if(associated(y%cav_vapor_wc )) deallocate(y%cav_vapor_wc ) - if(associated(y%cav_transp )) deallocate(y%cav_transp ) - if(associated(y%cav_intercepted_al)) deallocate(y%cav_intercepted_al) - if(associated(y%cav_intercepted_aw)) deallocate(y%cav_intercepted_aw) - if(associated(y%cav_wshed_lg )) deallocate(y%cav_wshed_lg ) - if(associated(y%cav_wshed_wg )) deallocate(y%cav_wshed_wg ) + if(associated(y%avg_sensible_lc )) deallocate(y%avg_sensible_lc ) + if(associated(y%avg_sensible_wc )) deallocate(y%avg_sensible_wc ) + if(associated(y%avg_vapor_lc )) deallocate(y%avg_vapor_lc ) + if(associated(y%avg_vapor_wc )) deallocate(y%avg_vapor_wc ) + if(associated(y%avg_transp )) deallocate(y%avg_transp ) + if(associated(y%avg_intercepted_al)) deallocate(y%avg_intercepted_al) + if(associated(y%avg_intercepted_aw)) deallocate(y%avg_intercepted_aw) + if(associated(y%avg_wshed_lg )) deallocate(y%avg_wshed_lg ) + if(associated(y%avg_wshed_wg )) deallocate(y%avg_wshed_wg ) return end subroutine deallocate_rk4_coh !=======================================================================================! @@ -1593,7 +1574,6 @@ subroutine reset_rk4_fluxes(y) y%flx_throughfall = 0.d0 y%flx_vapor_ac = 0.d0 y%flx_transp = 0.d0 - y%flx_evap = 0.d0 y%flx_rshort_gnd = 0.d0 y%flx_par_gnd = 0.d0 y%flx_rlong_gnd = 0.d0 @@ -1607,7 +1587,7 @@ subroutine reset_rk4_fluxes(y) y%flx_heatstor_veg = 0.d0 y%flx_drainage = 0.d0 - y%flx_drainage_heat = 0.d0 + y%flx_qdrainage = 0.d0 !----- Reset soil fluxes only when they are allocated. ------------------------------! if(associated(y%flx_smoist_gg )) y%flx_smoist_gg (:) = 0.d0 @@ -1659,7 +1639,6 @@ subroutine norm_rk4_fluxes(y,hdid) y%flx_throughfall = y%flx_throughfall * hdidi y%flx_vapor_ac = y%flx_vapor_ac * hdidi y%flx_transp = y%flx_transp * hdidi - y%flx_evap = y%flx_evap * hdidi y%flx_rshort_gnd = y%flx_rshort_gnd * hdidi y%flx_par_gnd = y%flx_par_gnd * hdidi y%flx_rlong_gnd = y%flx_rlong_gnd * hdidi @@ -1673,7 +1652,7 @@ subroutine norm_rk4_fluxes(y,hdid) y%flx_heatstor_veg = y%flx_heatstor_veg * hdidi y%flx_drainage = y%flx_drainage * hdidi - y%flx_drainage_heat = y%flx_drainage_heat * hdidi + y%flx_qdrainage = y%flx_qdrainage * hdidi if(associated(y%flx_smoist_gg )) y%flx_smoist_gg (:) = y%flx_smoist_gg (:) & * hdidi diff --git a/ED/src/memory/soil_coms.F90 b/ED/src/memory/soil_coms.F90 index ac71b1a31..ed8ca7a9e 100644 --- a/ED/src/memory/soil_coms.F90 +++ b/ED/src/memory/soil_coms.F90 @@ -613,8 +613,154 @@ real(kind=4) function ed_soil_idx2water(soil_index,ntext) return end function ed_soil_idx2water - !==========================================================================================! - !==========================================================================================! + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This function converts soil moisture to soil matric potential. ! + !---------------------------------------------------------------------------------------! + real(kind=4) function matric_potential(nsoil,soil_water) + implicit none + !----- Arguments. -------------------------------------------------------------------! + integer , intent(in) :: nsoil ! Soil texture [ idx] + real(kind=4), intent(in) :: soil_water ! Soil moisture [m3/m3] + !----- Internal variables. ----------------------------------------------------------! + real(kind=4) :: relmoist ! Relative soil moisture [ ---] + !------------------------------------------------------------------------------------! + + + + !------ Find relative soil moisture. ------------------------------------------------! + relmoist = min(soil_water/soil(nsoil)%slmsts,1.0) + !------------------------------------------------------------------------------------! + + + + !----- Find the matric potential. ---------------------------------------------------! + matric_potential = soil(nsoil)%slpots / relmoist ** soil(nsoil)%slbs + !------------------------------------------------------------------------------------! + + return + end function matric_potential + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This function is the double precision version of the function above, so it also ! + ! converts soil moisture to soil matric potential. ! + !---------------------------------------------------------------------------------------! + real(kind=8) function matric_potential8(nsoil,soil_water) + implicit none + !----- Arguments. -------------------------------------------------------------------! + integer , intent(in) :: nsoil ! Soil texture [ idx] + real(kind=8), intent(in) :: soil_water ! Soil moisture [m3/m3] + !----- Internal variables. ----------------------------------------------------------! + real(kind=8) :: relmoist ! Relative soil moisture [ ---] + !------------------------------------------------------------------------------------! + + + + !------ Find relative soil moisture. ------------------------------------------------! + relmoist = min(soil_water/soil8(nsoil)%slmsts,1.d0) + !------------------------------------------------------------------------------------! + + + + !----- Find the matric potential. ---------------------------------------------------! + matric_potential8 = soil8(nsoil)%slpots / relmoist ** soil8(nsoil)%slbs + !------------------------------------------------------------------------------------! + + return + end function matric_potential8 + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This function converts soil moisture to hydraulic conductivity. ! + !---------------------------------------------------------------------------------------! + real(kind=4) function hydr_conduct(k,nsoil,soil_water) + implicit none + !----- Arguments. -------------------------------------------------------------------! + integer , intent(in) :: k ! Layer index [ idx] + integer , intent(in) :: nsoil ! Soil texture [ idx] + real(kind=4), intent(in) :: soil_water ! Soil moisture [m3/m3] + !----- Internal variables. ----------------------------------------------------------! + real(kind=4) :: relmoist ! Relative soil moisture [ ---] + !------------------------------------------------------------------------------------! + + + + !------ Find relative soil moisture. ------------------------------------------------! + relmoist = min(soil_water/soil(nsoil)%slmsts,1.0) + !------------------------------------------------------------------------------------! + + + + !----- Find the hydraulic conductivity. ---------------------------------------------! + hydr_conduct = slcons1(k,nsoil) * relmoist ** (2. * soil(nsoil)%slbs + 3.) + !------------------------------------------------------------------------------------! + + + return + end function hydr_conduct + !=======================================================================================! + !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This function is the double precision version of the function above, so it also ! + ! converts soil moisture to hydraulic conductivity. ! + !---------------------------------------------------------------------------------------! + real(kind=8) function hydr_conduct8(k,nsoil,soil_water) + implicit none + !----- Arguments. -------------------------------------------------------------------! + integer , intent(in) :: k ! Layer index [ idx] + integer , intent(in) :: nsoil ! Soil texture [ idx] + real(kind=8), intent(in) :: soil_water ! Soil moisture [m3/m3] + !----- Internal variables. ----------------------------------------------------------! + real(kind=8) :: relmoist ! Relative soil moisture [ ---] + !------------------------------------------------------------------------------------! + + + + !------ Find relative soil moisture. ------------------------------------------------! + relmoist = min(soil_water/soil8(nsoil)%slmsts,1.d0) + !------------------------------------------------------------------------------------! + + + + !----- Find the hydraulic conductivity. ---------------------------------------------! + hydr_conduct8 = slcons18(k,nsoil) * relmoist ** (2.d0 * soil8(nsoil)%slbs + 3.d0) + !------------------------------------------------------------------------------------! + + + return + end function hydr_conduct8 + !=======================================================================================! + !=======================================================================================! end module soil_coms !==========================================================================================! !==========================================================================================! diff --git a/ED/src/mpi/ed_mpass_init.f90 b/ED/src/mpi/ed_mpass_init.f90 index 876aae8c4..946af9f10 100644 --- a/ED/src/mpi/ed_mpass_init.f90 +++ b/ED/src/mpi/ed_mpass_init.f90 @@ -134,7 +134,14 @@ subroutine ed_masterput_nl(par_run) , iallom & ! intent(in) , igrass & ! intent(in) , min_site_area & ! intent(in) - , attach_metadata ! ! intent(in) + , attach_metadata & ! intent(in) + , fast_diagnostics & ! intent(in) + , writing_dail & ! intent(in) + , writing_mont & ! intent(in) + , writing_dcyc & ! intent(in) + , writing_year & ! intent(in) + , writing_long & ! intent(in) + , writing_eorq ! ! intent(in) use canopy_air_coms , only : icanturb & ! intent(in) , isfclyrm & ! intent(in) , ied_grndvap & ! intent(in) @@ -533,12 +540,27 @@ subroutine ed_masterput_nl(par_run) call MPI_Bcast(idetailed,1,MPI_INTEGER,mainnum,MPI_COMM_WORLD,ierr) call MPI_Bcast(patch_keep,1,MPI_INTEGER,mainnum,MPI_COMM_WORLD,ierr) + + !---------------------------------------------------------------------------------------! + ! These variables are useful to check for which output types to allocate. ! + !---------------------------------------------------------------------------------------! + call MPI_Bcast(writing_dail ,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) + call MPI_Bcast(writing_mont ,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) + call MPI_Bcast(writing_dcyc ,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) + call MPI_Bcast(writing_year ,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) + call MPI_Bcast(writing_long ,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) + call MPI_Bcast(writing_eorq ,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) + call MPI_Bcast(fast_diagnostics,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) + !---------------------------------------------------------------------------------------! + + !---------------------------------------------------------------------------------------! ! One last thing to send is the layer index based on the soil_depth. It is not really ! ! a namelist thing, but it is still a setup variable. ! !---------------------------------------------------------------------------------------! call MPI_Barrier(MPI_COMM_WORLD,ierr) ! Just to wait until the matrix is allocated call MPI_Bcast(layer_index,nlat_lyr*nlon_lyr,MPI_INTEGER,mainnum,MPI_COMM_WORLD,ierr) + !---------------------------------------------------------------------------------------! return end subroutine ed_masterput_nl @@ -1241,7 +1263,14 @@ subroutine ed_nodeget_nl , iallom & ! intent(out) , igrass & ! intent(out) , min_site_area & ! intent(out) - , attach_metadata ! ! intent(out) + , attach_metadata & ! intent(out) + , fast_diagnostics & ! intent(out) + , writing_dail & ! intent(out) + , writing_mont & ! intent(out) + , writing_dcyc & ! intent(out) + , writing_year & ! intent(out) + , writing_long & ! intent(out) + , writing_eorq ! ! intent(out) use canopy_air_coms , only : icanturb & ! intent(out) , isfclyrm & ! intent(out) , ied_grndvap & ! intent(out) @@ -1644,7 +1673,21 @@ subroutine ed_nodeget_nl call MPI_Bcast(min_recruit_dbh,1,MPI_REAL,master_num,MPI_COMM_WORLD,ierr) call MPI_Bcast(idetailed,1,MPI_INTEGER,master_num,MPI_COMM_WORLD,ierr) call MPI_Bcast(patch_keep,1,MPI_INTEGER,master_num,MPI_COMM_WORLD,ierr) - + + !---------------------------------------------------------------------------------------! + ! These variables are useful to check for which output types to allocate. ! + !---------------------------------------------------------------------------------------! + call MPI_Bcast(writing_dail ,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) + call MPI_Bcast(writing_mont ,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) + call MPI_Bcast(writing_dcyc ,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) + call MPI_Bcast(writing_year ,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) + call MPI_Bcast(writing_long ,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) + call MPI_Bcast(writing_eorq ,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) + call MPI_Bcast(fast_diagnostics,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) + !---------------------------------------------------------------------------------------! + + + !---------------------------------------------------------------------------------------! ! Receive the layer index based on soil_depth. This is allocatable, so we first ! ! allocate, then let the master know that it is safe to send to this node and then the ! diff --git a/ED/src/utils/budget_utils.f90 b/ED/src/utils/budget_utils.f90 index 37c3dc34b..c942d41e3 100644 --- a/ED/src/utils/budget_utils.f90 +++ b/ED/src/utils/budget_utils.f90 @@ -58,7 +58,8 @@ subroutine compute_budget(csite,lsl,pcpg,qpcpg,ipa,wcurr_loss2atm,ecurr_netrad ,ecurr_loss2drainage,wcurr_loss2runoff,ecurr_loss2runoff & ,site_area,cbudget_nep,old_can_enthalpy,old_can_shv & ,old_can_co2,old_can_rhos,old_can_temp,old_can_prss) - use ed_state_vars, only : sitetype ! ! structure + use ed_state_vars, only : sitetype & ! structure + , patchtype ! ! structure use ed_max_dims , only : str_len ! ! intent(in) use ed_misc_coms , only : dtlsm & ! intent(in) , fast_diagnostics & ! intent(in) @@ -98,8 +99,8 @@ subroutine compute_budget(csite,lsl,pcpg,qpcpg,ipa,wcurr_loss2atm,ecurr_netrad real , intent(in) :: old_can_temp real , intent(in) :: old_can_prss !----- Local variables --------------------------------------------------------------! + type(patchtype) , pointer :: cpatch character(len=str_len) :: budget_fout - real, dimension(n_dbh) :: gpp_dbh real :: co2budget_finalstorage real :: co2budget_deltastorage real :: co2curr_gpp @@ -133,7 +134,10 @@ subroutine compute_budget(csite,lsl,pcpg,qpcpg,ipa,wcurr_loss2atm,ecurr_netrad real :: co2_factor real :: ene_factor real :: h2o_factor + real :: patch_lai + real :: patch_wai integer :: jpa + integer :: ico logical :: isthere logical :: co2_ok logical :: energy_ok @@ -248,7 +252,7 @@ subroutine compute_budget(csite,lsl,pcpg,qpcpg,ipa,wcurr_loss2atm,ecurr_netrad !------------------------------------------------------------------------------------! ! Compute the carbon flux components. ! !------------------------------------------------------------------------------------! - call sum_plant_cfluxes(csite,ipa,gpp,gpp_dbh,leaf_resp,root_resp,growth_resp & + call sum_plant_cfluxes(csite,ipa,gpp,leaf_resp,root_resp,growth_resp & ,storage_resp,vleaf_resp) co2curr_gpp = gpp * dtlsm co2curr_leafresp = leaf_resp * dtlsm @@ -309,14 +313,11 @@ subroutine compute_budget(csite,lsl,pcpg,qpcpg,ipa,wcurr_loss2atm,ecurr_netrad !------------------------------------------------------------------------------------! !----- 1. Carbon dioxide. -----------------------------------------------------------! csite%co2budget_gpp(ipa) = csite%co2budget_gpp(ipa) + gpp *dtlsm - csite%co2budget_gpp_dbh(:,ipa) = csite%co2budget_gpp_dbh(:,ipa) + gpp_dbh(:)*dtlsm csite%co2budget_plresp(ipa) = csite%co2budget_plresp(ipa) & + ( leaf_resp + root_resp + growth_resp & + storage_resp + vleaf_resp ) * dtlsm csite%co2budget_rh(ipa) = csite%co2budget_rh(ipa) & + csite%rh(ipa) * dtlsm - csite%co2budget_cwd_rh(ipa) = csite%co2budget_cwd_rh(ipa) & - + csite%cwd_rh(ipa) * dtlsm csite%co2budget_denseffect(ipa) = csite%co2budget_denseffect(ipa) & + co2curr_denseffect csite%co2budget_loss2atm(ipa) = csite%co2budget_loss2atm(ipa) & @@ -364,13 +365,28 @@ subroutine compute_budget(csite,lsl,pcpg,qpcpg,ipa,wcurr_loss2atm,ecurr_netrad + abs(wbudget_deltastorage) ) + !---------------------------------------------------------------------------------! + ! Find the patch LAI and WAI for output, only if it is needed. ! + !---------------------------------------------------------------------------------! + if (.not. (co2_ok .and. energy_ok .and. water_ok) .or. print_budget) then + cpatch => csite%patch(ipa) + patch_lai = 0.0 + patch_wai = 0.0 + do ico=1,cpatch%ncohorts + patch_lai = patch_lai + cpatch%lai(ico) + patch_wai = patch_wai + cpatch%wai(ico) + end do + end if + !---------------------------------------------------------------------------------! + + if (.not. co2_ok) then write (unit=*,fmt='(a)') '|--------------------------------------------------|' write (unit=*,fmt='(a)') '| !!! ): CO2 budget failed :( !!! |' write (unit=*,fmt='(a)') '|--------------------------------------------------|' write (unit=*,fmt='(a,i4.4,2(1x,i2.2),1x,f6.0)') ' TIME : ', & current_time%year,current_time%month,current_time%date ,current_time%time - write (unit=*,fmt=fmtf ) ' LAI : ',csite%lai(ipa) + write (unit=*,fmt=fmtf ) ' LAI : ',patch_lai write (unit=*,fmt=fmtf ) ' VEG_HEIGHT : ',csite%veg_height(ipa) write (unit=*,fmt=fmtf ) ' CAN_RHOS : ',csite%can_rhos(ipa) write (unit=*,fmt=fmtf ) ' OLD_CAN_RHOS : ',old_can_rhos @@ -400,7 +416,7 @@ subroutine compute_budget(csite,lsl,pcpg,qpcpg,ipa,wcurr_loss2atm,ecurr_netrad write (unit=*,fmt='(a)') '|--------------------------------------------------|' write (unit=*,fmt='(a,i4.4,2(1x,i2.2),1x,f6.0)') ' TIME : ', & current_time%year,current_time%month,current_time%date ,current_time%time - write (unit=*,fmt=fmtf ) ' LAI : ',csite%lai(ipa) + write (unit=*,fmt=fmtf ) ' LAI : ',patch_lai write (unit=*,fmt=fmtf ) ' VEG_HEIGHT : ',csite%veg_height(ipa) write (unit=*,fmt=fmtf ) ' CAN_DEPTH : ',csite%can_depth(ipa) write (unit=*,fmt=fmtf ) ' RESIDUAL : ',ecurr_residual @@ -425,7 +441,7 @@ subroutine compute_budget(csite,lsl,pcpg,qpcpg,ipa,wcurr_loss2atm,ecurr_netrad write (unit=*,fmt='(a)') '|--------------------------------------------------|' write (unit=*,fmt='(a,i4.4,2(1x,i2.2),1x,f6.0)') ' TIME : ', & current_time%year,current_time%month,current_time%date ,current_time%time - write (unit=*,fmt=fmtf ) ' LAI : ',csite%lai(ipa) + write (unit=*,fmt=fmtf ) ' LAI : ',patch_lai write (unit=*,fmt=fmtf ) ' VEG_HEIGHT : ',csite%veg_height(ipa) write (unit=*,fmt=fmtf ) ' CAN_DEPTH : ',csite%can_depth(ipa) write (unit=*,fmt=fmtf ) ' RESIDUAL : ',wcurr_residual @@ -484,7 +500,7 @@ subroutine compute_budget(csite,lsl,pcpg,qpcpg,ipa,wcurr_loss2atm,ecurr_netrad ,position='append') write(unit=86,fmt=bbfmt) & current_time%year , current_time%month , current_time%date & - , current_time%time , csite%lai(ipa) , csite%wai(ipa) & + , current_time%time , patch_lai , patch_wai & , csite%veg_height(ipa) , co2budget_finalstorage , co2curr_residual & , co2budget_deltastorage , co2curr_nep , co2curr_denseffect & , co2curr_loss2atm , ebudget_finalstorage , ecurr_residual & @@ -703,7 +719,7 @@ end function compute_energy_storage !=======================================================================================! ! This subroutine computes the carbon flux terms. ! !---------------------------------------------------------------------------------------! - subroutine sum_plant_cfluxes(csite,ipa, gpp, gpp_dbh,leaf_resp,root_resp,growth_resp & + subroutine sum_plant_cfluxes(csite,ipa, gpp, leaf_resp,root_resp,growth_resp & ,storage_resp,vleaf_resp) use ed_state_vars , only : sitetype & ! structure , patchtype ! ! structure @@ -716,7 +732,6 @@ subroutine sum_plant_cfluxes(csite,ipa, gpp, gpp_dbh,leaf_resp,root_resp,growth_ type(sitetype) , target :: csite integer , intent(in) :: ipa real , intent(out) :: gpp - real, dimension(n_dbh), intent(out) :: gpp_dbh real , intent(out) :: leaf_resp real , intent(out) :: root_resp real , intent(out) :: growth_resp @@ -738,7 +753,6 @@ subroutine sum_plant_cfluxes(csite,ipa, gpp, gpp_dbh,leaf_resp,root_resp,growth_ !----- Initializing some variables. -------------------------------------------------! gpp = 0.0 - gpp_dbh = 0.0 leaf_resp = 0.0 root_resp = 0.0 growth_resp = 0.0 @@ -752,12 +766,7 @@ subroutine sum_plant_cfluxes(csite,ipa, gpp, gpp_dbh,leaf_resp,root_resp,growth_ do ico = 1,cpatch%ncohorts !----- Add GPP and leaf respiration only for those cohorts with enough leaves. ---! if (cpatch%leaf_resolvable(ico)) then - gpp = gpp + cpatch%gpp(ico) - !----- Forest cohorts have dbh distribution, add them to gpp_dbh. -------------! - if (forest) then - idbh=max(1,min(n_dbh,ceiling(cpatch%dbh(ico)*ddbhi))) - gpp_dbh(idbh) = gpp_dbh(idbh) + cpatch%gpp(ico) - end if + gpp = gpp + cpatch%gpp(ico) leaf_resp = leaf_resp + cpatch%leaf_respiration(ico) end if diff --git a/ED/src/utils/fatal_error.f90 b/ED/src/utils/fatal_error.f90 index 7ec564118..68fd492e2 100644 --- a/ED/src/utils/fatal_error.f90 +++ b/ED/src/utils/fatal_error.f90 @@ -1,41 +1,58 @@ -subroutine fatal_error(reason,subr,file) -!------------------------------------------------------------------------------------------! -! Subroutine based on RAMS, just to output error messages and halts the execution ! -! properly. You should alway use this one, since it checks whether the run is running in ! -! parallel. If so, it will use MPI_Abort rather than stop, so it will exit rather than ! -!being frozen. ! +!==========================================================================================! +!==========================================================================================! +! Subroutine based on RAMS, just to output error messages and halts the execution ! +! properly. You should alway use this one, since it checks whether the run is running in ! +! parallel. If so, it will use MPI_Abort rather than stop, so it will exit rather than ! +! being frozen. ! !------------------------------------------------------------------------------------------! +subroutine fatal_error(reason,subr,file) use ed_node_coms , only : nnodetot & ! intent(in) , mynum ! ! intent(in) implicit none + !----- Arguments. ----------------------------------------------------------------------! character(len=*), intent(in) :: reason - character(len=*), intent(in) :: subr,file + character(len=*), intent(in) :: subr + character(len=*), intent(in) :: file + !----- Local variables. ----------------------------------------------------------------! + logical :: parallel + logical :: slavenode + !---------------------------------------------------------------------------------------! include 'mpif.h' - - write(unit=*,fmt='(a)') '::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::' - write(unit=*,fmt='(a)') '::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::' - write(unit=*,fmt='(a)') '::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::' + + !------ Check which type of end we should use. -----------------------------------------! + if (trim(file) == 'edmain.f90' .or. trim(file) == 'rammain.f90') then + parallel = .false. + slavenode = .false. + else + parallel = nnodetot > 1 + slavenode = mynum /= nnodetot + end if + !---------------------------------------------------------------------------------------! + + write(unit=*,fmt='(a)') '::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::' + write(unit=*,fmt='(a)') '::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::' + write(unit=*,fmt='(a)') '::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::' write(unit=*,fmt='(a)') ' ' - write(unit=*,fmt='(a)') '------------------------------------------------------------------' - write(unit=*,fmt='(a)') ' !!! FATAL ERROR !!! ' - write(unit=*,fmt='(a)') '------------------------------------------------------------------' - if (nnodetot > 1 .and. mynum /= nnodetot) then - write(unit=*,fmt='(a,1x,i5,a)') ' On node: ',mynum,':' - elseif (nnodetot > 1) then - write(unit=*,fmt='(a)') ' On the master node:' + write(unit=*,fmt='(a)') '--------------------------------------------------------------' + write(unit=*,fmt='(a)') ' !!! FATAL ERROR !!! ' + write(unit=*,fmt='(a)') '--------------------------------------------------------------' + if (slavenode) then + write (unit=*,fmt='(a,1x,i5,a)') ' On node: ',mynum,':' + elseif (parallel) then + write (unit=*,fmt='(a)') ' On the master node:' end if - write (unit=*,fmt='(a,1x,a)') ' ---> File: ',trim(file) - write (unit=*,fmt='(a,1x,a)') ' ---> Subroutine: ',trim(subr) - write (unit=*,fmt='(a,1x,a)') ' ---> Reason: ',trim(reason) - write(unit=*,fmt='(a)') '------------------------------------------------------------------' + write (unit=*,fmt='(a,1x,a)') ' ---> File: ',trim(file) + write (unit=*,fmt='(a,1x,a)') ' ---> Subroutine: ',trim(subr) + write (unit=*,fmt='(a,1x,a)') ' ---> Reason: ',trim(reason) + write(unit=*,fmt='(a)') '--------------------------------------------------------------' write(unit=*,fmt='(a)') ' ED execution halts (see previous error message)...' - write(unit=*,fmt='(a)') '------------------------------------------------------------------' + write(unit=*,fmt='(a)') '--------------------------------------------------------------' !---------------------------------------------------------------------------------------! ! Remind the user of deprecated ED2IN choices... ! !---------------------------------------------------------------------------------------! - if (nnodetot > 1) call MPI_Abort(MPI_COMM_WORLD, 1) + if (parallel) call MPI_Abort(MPI_COMM_WORLD, 1) stop 'fatal_error' end subroutine fatal_error !==========================================================================================! @@ -48,11 +65,10 @@ end subroutine fatal_error !==========================================================================================! !==========================================================================================! -subroutine opspec_fatal(reason,opssub) -!------------------------------------------------------------------------------------------! ! This is just a first warning to be given in the standard output. Since the namelist ! ! may have more than one error, I list all the problems, then the model will stop. ! !------------------------------------------------------------------------------------------! +subroutine opspec_fatal(reason,opssub) implicit none character(len=*), intent(in) :: reason,opssub @@ -75,10 +91,9 @@ end subroutine opspec_fatal !==========================================================================================! !==========================================================================================! -subroutine warning(reason,subr,file) -!------------------------------------------------------------------------------------------! ! Warning message, does not exit ! !------------------------------------------------------------------------------------------! +subroutine warning(reason,subr,file) use ed_node_coms, only: nnodetot,mynum implicit none diff --git a/ED/src/utils/fuse_fiss_utils.f90 b/ED/src/utils/fuse_fiss_utils.f90 index 7e37a47da..8cc77f72d 100644 --- a/ED/src/utils/fuse_fiss_utils.f90 +++ b/ED/src/utils/fuse_fiss_utils.f90 @@ -839,7 +839,7 @@ end subroutine fuse_cohorts subroutine split_cohorts(cpatch, green_leaf_factor, lsl) use ed_state_vars , only : patchtype & ! structure - , clone_cohort ! ! sub-routine + , copy_patchtype ! ! sub-routine use pft_coms , only : q & ! intent(in), lookup table , qsw & ! intent(in), lookup table , is_grass ! ! intent(in) @@ -945,7 +945,7 @@ subroutine split_cohorts(cpatch, green_leaf_factor, lsl) !----- Apply these values to the new cohort. -------------------------------! inew = inew+1 - call clone_cohort(cpatch,ico,inew) + call copy_patchtype(cpatch,cpatch,ico,ico,inew,inew) !---------------------------------------------------------------------------! !----- Tweaking bdead, to ensure carbon is conserved. ----------------------! @@ -1015,24 +1015,27 @@ end subroutine split_cohorts ! ! !---------------------------------------------------------------------------------------! subroutine fuse_2_cohorts(cpatch,donc,recc, newn,green_leaf_factor,can_prss,can_shv,lsl) - use ed_state_vars , only : patchtype ! ! Structure - use pft_coms , only : q & ! intent(in), lookup table - , qsw & ! intent(in), lookup table - , is_grass ! ! intent(in) - use therm_lib , only : uextcm2tl & ! subroutine - , vpdefil & ! subroutine - , qslif ! ! function - use allometry , only : dbh2krdepth & ! function - , bd2dbh & ! function - , bl2dbh & ! function - , bl2h & ! function - , dbh2h ! ! function - use ed_max_dims , only : n_mort ! ! intent(in) - use ed_misc_coms , only : imoutput & ! intent(in) - , iqoutput & ! intent(in) - , idoutput & ! intent(in) - , ndcycle & ! intent(in) - , igrass ! ! intent(in) + use ed_state_vars , only : patchtype ! ! Structure + use pft_coms , only : q & ! intent(in), lookup table + , qsw & ! intent(in), lookup table + , is_grass ! ! intent(in) + use therm_lib , only : uextcm2tl & ! subroutine + , vpdefil & ! subroutine + , qslif ! ! function + use allometry , only : dbh2krdepth & ! function + , bd2dbh & ! function + , bl2dbh & ! function + , bl2h & ! function + , dbh2h ! ! function + use ed_max_dims , only : n_mort ! ! intent(in) + use ed_misc_coms , only : writing_long & ! intent(in) + , writing_eorq & ! intent(in) + , writing_dcyc & ! intent(in) + , ndcycle & ! intent(in) + , igrass ! ! intent(in) + use consts_coms , only : lnexp_min & ! intent(in) + , lnexp_max ! ! intent(in) + use fusion_fission_coms, only : corr_cohort implicit none !----- Arguments --------------------------------------------------------------------! type(patchtype) , target :: cpatch ! Current patch @@ -1045,17 +1048,23 @@ subroutine fuse_2_cohorts(cpatch,donc,recc, newn,green_leaf_factor,can_prss,can_ integer , intent(in) :: lsl ! Lowest soil level !----- Local variables --------------------------------------------------------------! integer :: imon ! Month for cb loop - integer :: icyc ! Time of day for dcycle loop + integer :: t ! Time of day for dcycle loop integer :: imty ! Mortality type real :: newni ! Inverse of new nplants real :: newlaii ! Inverse of new LAI + real :: newwaii ! Inverse of new WAI + real :: veg_fliq ! Liquid fraction + real :: exp_mort_donc ! Exp(mortality) donor + real :: exp_mort_recc ! Exp(mortality) receptor !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! ! Find the scaling factor for variables that are not "extensive". ! ! - If the unit is X/plant, then we scale by nplant. ! ! - If the unit is X/m2_leaf, then we scale by LAI. ! + ! - If the unit is X/m2_wood, then we scale by WAI. ! ! - If the unit is X/m2_gnd, then we add, since they are "extensive". ! !------------------------------------------------------------------------------------! newni = 1.0 / newn @@ -1064,6 +1073,11 @@ subroutine fuse_2_cohorts(cpatch,donc,recc, newn,green_leaf_factor,can_prss,can_ else newlaii = 0.0 end if + if (cpatch%wai(recc) + cpatch%wai(donc) > 0.0) then + newwaii = 1.0 / (cpatch%wai(recc) + cpatch%wai(donc)) + else + newwaii = 0.0 + end if !------------------------------------------------------------------------------------! @@ -1128,8 +1142,6 @@ subroutine fuse_2_cohorts(cpatch,donc,recc, newn,green_leaf_factor,can_prss,can_ end if !------------------------------------------------------------------------------------! - cpatch%wai (recc) = cpatch%wai(recc) + cpatch%wai (donc) - cpatch%crown_area (recc) = min(1.,cpatch%crown_area(recc) + cpatch%crown_area(donc)) cpatch%leaf_energy(recc) = cpatch%leaf_energy(recc) + cpatch%leaf_energy(donc) cpatch%leaf_water (recc) = cpatch%leaf_water (recc) + cpatch%leaf_water (donc) cpatch%leaf_hcap (recc) = cpatch%leaf_hcap (recc) + cpatch%leaf_hcap (donc) @@ -1226,24 +1238,6 @@ subroutine fuse_2_cohorts(cpatch,donc,recc, newn,green_leaf_factor,can_prss,can_ - !------------------------------------------------------------------------------------! - ! Updating the mean carbon fluxes. They are fluxes per unit of area, so they ! - ! should be added, not scaled. ! - !------------------------------------------------------------------------------------! - cpatch%mean_gpp(recc) = cpatch%mean_gpp(recc) & - + cpatch%mean_gpp(donc) - cpatch%mean_leaf_resp(recc) = cpatch%mean_leaf_resp(recc) & - + cpatch%mean_leaf_resp(donc) - cpatch%mean_root_resp(recc) = cpatch%mean_root_resp(recc) & - + cpatch%mean_root_resp(donc) - cpatch%mean_storage_resp(recc) = cpatch%mean_storage_resp(recc) & - + cpatch%mean_storage_resp(donc) - cpatch%mean_growth_resp(recc) = cpatch%mean_growth_resp(recc) & - + cpatch%mean_growth_resp(donc) - cpatch%mean_vleaf_resp(recc) = cpatch%mean_vleaf_resp(recc) & - + cpatch%mean_vleaf_resp(donc) - !------------------------------------------------------------------------------------! - cpatch%today_gpp (recc) = cpatch%today_gpp (recc) & + cpatch%today_gpp (donc) @@ -1285,46 +1279,6 @@ subroutine fuse_2_cohorts(cpatch,donc,recc, newn,green_leaf_factor,can_prss,can_ !------------------------------------------------------------------------------------! - - !------------------------------------------------------------------------------------! - ! Mean radiation, energy, and water flux. Units are per m2 ground, so we add ! - ! them. ! - !------------------------------------------------------------------------------------! - cpatch%mean_par_l (recc) = cpatch%mean_par_l (recc) & - + cpatch%mean_par_l (donc) - cpatch%mean_par_l_beam (recc) = cpatch%mean_par_l_beam (recc) & - + cpatch%mean_par_l_beam (donc) - cpatch%mean_par_l_diff (recc) = cpatch%mean_par_l_diff (recc) & - + cpatch%mean_par_l_diff (donc) - cpatch%mean_rshort_l (recc) = cpatch%mean_rshort_l (recc) & - + cpatch%mean_rshort_l (donc) - cpatch%mean_rlong_l (recc) = cpatch%mean_rlong_l (recc) & - + cpatch%mean_rlong_l (donc) - cpatch%mean_sensible_lc (recc) = cpatch%mean_sensible_lc (recc) & - + cpatch%mean_sensible_lc (donc) - cpatch%mean_vapor_lc (recc) = cpatch%mean_vapor_lc (recc) & - + cpatch%mean_vapor_lc (donc) - cpatch%mean_transp (recc) = cpatch%mean_transp (recc) & - + cpatch%mean_transp (donc) - cpatch%mean_intercepted_al(recc) = cpatch%mean_intercepted_al(recc) & - + cpatch%mean_intercepted_al(donc) - cpatch%mean_wshed_lg (recc) = cpatch%mean_wshed_lg (recc) & - + cpatch%mean_wshed_lg (donc) - cpatch%mean_rshort_w (recc) = cpatch%mean_rshort_w (recc) & - + cpatch%mean_rshort_w (donc) - cpatch%mean_rlong_w (recc) = cpatch%mean_rlong_w (recc) & - + cpatch%mean_rlong_w (donc) - cpatch%mean_sensible_wc (recc) = cpatch%mean_sensible_wc (recc) & - + cpatch%mean_sensible_wc (donc) - cpatch%mean_vapor_wc (recc) = cpatch%mean_vapor_wc (recc) & - + cpatch%mean_vapor_wc (donc) - cpatch%mean_intercepted_aw(recc) = cpatch%mean_intercepted_aw(recc) & - + cpatch%mean_intercepted_aw(donc) - cpatch%mean_wshed_wg (recc) = cpatch%mean_wshed_wg (recc) & - + cpatch%mean_wshed_wg (donc) - !------------------------------------------------------------------------------------! - - !------------------------------------------------------------------------------------! ! Fuse the leaf surface and intenal properties. Since they are intensive ! ! properties, they are scaled by the number of plants. These numbers are diagnostic ! @@ -1353,14 +1307,35 @@ subroutine fuse_2_cohorts(cpatch,donc,recc, newn,green_leaf_factor,can_prss,can_ !------------------------------------------------------------------------------------! - ! Fusing the mortality rates. The terms that are PFT-dependent but density- ! - ! independent should be the same, so it doesn't matter which average we use. The ! - ! density-dependent should be averaged using nplant as the relative weight. ! + ! Fuse mortality rates. By definition, mortality rate M for is given by: ! + ! ! + ! ln(A) - ln(N) ! + ! m = --------------- ! + ! dt ! + ! ! + ! where A is the population that was previously alive, and N is the population that ! + ! survived the mortality. The cohorts represent a group of individuals with the ! + ! same size and PFT, so they don't mix new recruits and old plants. Therefore, we ! + ! can assume that N is actually nplant. We don't know A, if the mortality rate is ! + ! assumed constant during the interval dt, A = N * exp(m dt). ! + ! ! + ! For fusion we don't really care about dt, so any number will do as long as it is ! + ! the same for both cohorts. With these assumptions, the mortality rate for the ! + ! fused cohort mf is: ! + ! ! + ! mf = ln (Ad+Ar) - ln(Nd+Nr) = ln[Nd*exp(md) + Nr*exp(mr)] - ln[Nd+Nr] ! + ! ! + ! / Nd*exp(md) + Nr*exp(mr) \ ! + ! mf = ln |-------------------------| ! + ! \ Nd + Nr / ! !------------------------------------------------------------------------------------! do imty=1,n_mort - cpatch%mort_rate(imty,recc) = ( cpatch%mort_rate(imty,recc) *cpatch%nplant(recc) & - + cpatch%mort_rate(imty,donc) *cpatch%nplant(donc)) & - * newni + exp_mort_donc = exp(max(lnexp_min,min(lnexp_max,cpatch%mort_rate(imty,donc)))) + exp_mort_recc = exp(max(lnexp_min,min(lnexp_max,cpatch%mort_rate(imty,recc)))) + + cpatch%mort_rate(imty,recc) = log( ( cpatch%nplant (recc) * exp_mort_recc & + + cpatch%nplant (donc) * exp_mort_donc ) & + * newni ) end do !------------------------------------------------------------------------------------! @@ -1475,7 +1450,7 @@ subroutine fuse_2_cohorts(cpatch,donc,recc, newn,green_leaf_factor,can_prss,can_ ! Update the carbon fluxes. They are fluxes per unit of area, so they should be ! ! added, not scaled. ! !------------------------------------------------------------------------------------! - cpatch%gpp(recc) = cpatch%gpp(recc) + cpatch%gpp(donc) + cpatch%gpp (recc) = cpatch%gpp(recc) + cpatch%gpp(donc) cpatch%leaf_respiration(recc) = cpatch%leaf_respiration(recc) & + cpatch%leaf_respiration(donc) @@ -1522,377 +1497,1249 @@ subroutine fuse_2_cohorts(cpatch,donc,recc, newn,green_leaf_factor,can_prss,can_ + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + ! Fast averages. ! + !------------------------------------------------------------------------------------! + + !------------------------------------------------------------------------------------! + ! Intensive variables, scaled by plant density. ! + !------------------------------------------------------------------------------------! + cpatch%fmean_gpp (recc) = ( cpatch%fmean_gpp (recc) & + * cpatch%nplant (recc) & + + cpatch%fmean_gpp (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%fmean_npp (recc) = ( cpatch%fmean_npp (recc) & + * cpatch%nplant (recc) & + + cpatch%fmean_npp (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%fmean_leaf_resp (recc) = ( cpatch%fmean_leaf_resp (recc) & + * cpatch%nplant (recc) & + + cpatch%fmean_leaf_resp (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%fmean_root_resp (recc) = ( cpatch%fmean_root_resp (recc) & + * cpatch%nplant (recc) & + + cpatch%fmean_root_resp (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%fmean_growth_resp (recc) = ( cpatch%fmean_growth_resp (recc) & + * cpatch%nplant (recc) & + + cpatch%fmean_growth_resp (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%fmean_storage_resp (recc) = ( cpatch%fmean_storage_resp (recc) & + * cpatch%nplant (recc) & + + cpatch%fmean_storage_resp (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%fmean_vleaf_resp (recc) = ( cpatch%fmean_vleaf_resp (recc) & + * cpatch%nplant (recc) & + + cpatch%fmean_vleaf_resp (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%fmean_plresp (recc) = ( cpatch%fmean_plresp (recc) & + * cpatch%nplant (recc) & + + cpatch%fmean_plresp (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%fmean_light_level (recc) = ( cpatch%fmean_light_level (recc) & + * cpatch%nplant (recc) & + + cpatch%fmean_light_level (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%fmean_light_level_beam(recc) = ( cpatch%fmean_light_level_beam(recc) & + * cpatch%nplant (recc) & + + cpatch%fmean_light_level_beam(donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%fmean_light_level_diff(recc) = ( cpatch%fmean_light_level_diff(recc) & + * cpatch%nplant (recc) & + + cpatch%fmean_light_level_diff(donc) & + * cpatch%nplant (donc) ) & + * newni + !------------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------------! + ! Intensive variables, scaled by LAI. ! + !------------------------------------------------------------------------------------! + cpatch%fmean_leaf_gsw (recc) = ( cpatch%fmean_leaf_gsw (recc) & + * cpatch%lai (recc) & + + cpatch%fmean_leaf_gsw (donc) & + * cpatch%lai (donc) ) & + * newlaii + cpatch%fmean_leaf_gbw (recc) = ( cpatch%fmean_leaf_gbw (recc) & + * cpatch%lai (recc) & + + cpatch%fmean_leaf_gbw (donc) & + * cpatch%lai (donc) ) & + * newlaii + cpatch%fmean_fs_open (recc) = ( cpatch%fmean_fs_open (recc) & + * cpatch%lai (recc) & + + cpatch%fmean_fs_open (donc) & + * cpatch%lai (donc) ) & + * newlaii + cpatch%fmean_fsw (recc) = ( cpatch%fmean_fsw (recc) & + * cpatch%lai (recc) & + + cpatch%fmean_fsw (donc) & + * cpatch%lai (donc) ) & + * newlaii + cpatch%fmean_fsn (recc) = ( cpatch%fmean_fsn (recc) & + * cpatch%lai (recc) & + + cpatch%fmean_fsn (donc) & + * cpatch%lai (donc) ) & + * newlaii + cpatch%fmean_psi_open (recc) = ( cpatch%fmean_psi_open (recc) & + * cpatch%lai (recc) & + + cpatch%fmean_psi_open (donc) & + * cpatch%lai (donc) ) & + * newlaii + cpatch%fmean_psi_closed (recc) = ( cpatch%fmean_psi_closed (recc) & + * cpatch%lai (recc) & + + cpatch%fmean_psi_closed (donc) & + * cpatch%lai (donc) ) & + * newlaii + !------------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------------! + ! Intensive variables, scaled by WAI. ! + !------------------------------------------------------------------------------------! + cpatch%fmean_wood_gbw (recc) = ( cpatch%fmean_wood_gbw (recc) & + * cpatch%wai (recc) & + + cpatch%fmean_wood_gbw (recc) & + * cpatch%wai (recc) ) & + * newwaii + !------------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------------! + ! Extensive variables. ! + !------------------------------------------------------------------------------------! + cpatch%fmean_leaf_energy (recc) = cpatch%fmean_leaf_energy (recc) & + + cpatch%fmean_leaf_energy (donc) + cpatch%fmean_leaf_water (recc) = cpatch%fmean_leaf_water (recc) & + + cpatch%fmean_leaf_water (donc) + cpatch%fmean_leaf_hcap (recc) = cpatch%fmean_leaf_hcap (recc) & + + cpatch%fmean_leaf_hcap (donc) + cpatch%fmean_wood_energy (recc) = cpatch%fmean_wood_energy (recc) & + + cpatch%fmean_wood_energy (donc) + cpatch%fmean_wood_water (recc) = cpatch%fmean_wood_water (recc) & + + cpatch%fmean_wood_water (donc) + cpatch%fmean_wood_hcap (recc) = cpatch%fmean_wood_hcap (recc) & + + cpatch%fmean_wood_hcap (donc) + cpatch%fmean_water_supply (recc) = cpatch%fmean_water_supply (recc) & + + cpatch%fmean_water_supply (donc) + cpatch%fmean_par_l (recc) = cpatch%fmean_par_l (recc) & + + cpatch%fmean_par_l (donc) + cpatch%fmean_par_l_beam (recc) = cpatch%fmean_par_l_beam (recc) & + + cpatch%fmean_par_l_beam (donc) + cpatch%fmean_par_l_diff (recc) = cpatch%fmean_par_l_diff (recc) & + + cpatch%fmean_par_l_diff (donc) + cpatch%fmean_rshort_l (recc) = cpatch%fmean_rshort_l (recc) & + + cpatch%fmean_rshort_l (donc) + cpatch%fmean_rlong_l (recc) = cpatch%fmean_rlong_l (recc) & + + cpatch%fmean_rlong_l (donc) + cpatch%fmean_sensible_lc (recc) = cpatch%fmean_sensible_lc (recc) & + + cpatch%fmean_sensible_lc (donc) + cpatch%fmean_vapor_lc (recc) = cpatch%fmean_vapor_lc (recc) & + + cpatch%fmean_vapor_lc (donc) + cpatch%fmean_transp (recc) = cpatch%fmean_transp (recc) & + + cpatch%fmean_transp (donc) + cpatch%fmean_intercepted_al (recc) = cpatch%fmean_intercepted_al (recc) & + + cpatch%fmean_intercepted_al (donc) + cpatch%fmean_wshed_lg (recc) = cpatch%fmean_wshed_lg (recc) & + + cpatch%fmean_wshed_lg (donc) + cpatch%fmean_rshort_w (recc) = cpatch%fmean_rshort_w (recc) & + + cpatch%fmean_rshort_w (donc) + cpatch%fmean_rlong_w (recc) = cpatch%fmean_rlong_w (recc) & + + cpatch%fmean_rlong_w (donc) + cpatch%fmean_sensible_wc (recc) = cpatch%fmean_sensible_wc (recc) & + + cpatch%fmean_sensible_wc (donc) + cpatch%fmean_vapor_wc (recc) = cpatch%fmean_vapor_wc (recc) & + + cpatch%fmean_vapor_wc (donc) + cpatch%fmean_intercepted_aw (recc) = cpatch%fmean_intercepted_aw (recc) & + + cpatch%fmean_intercepted_aw (donc) + cpatch%fmean_wshed_wg (recc) = cpatch%fmean_wshed_wg (recc) & + + cpatch%fmean_wshed_wg (donc) + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + ! We update temperature and liquid water fraction. We check whether the heat ! + ! capacity is non-zero. If it is a normal number, use the standard thermodynamic ! + ! library, otherwise, average temperature, this is probably a blend of tiny cohorts ! + ! that couldn't be solved, or the wood is not solved. ! + !------------------------------------------------------------------------------------! + !------ Leaf. -----------------------------------------------------------------------! + if ( cpatch%fmean_leaf_hcap(recc) > 0. ) then + !----- Update temperature and liquid fraction using standard thermodynamics. -----! + call uextcm2tl(cpatch%fmean_leaf_energy(recc),cpatch%fmean_leaf_water(recc) & + ,cpatch%fmean_leaf_hcap (recc),cpatch%fmean_leaf_temp (recc) & + ,cpatch%fmean_leaf_fliq (recc)) + !---------------------------------------------------------------------------------! + + + !----- Scale vapour pressure deficit using LAI. ----------------------------------! + cpatch%fmean_leaf_vpdef (recc) = ( cpatch%fmean_leaf_vpdef (recc) & + * cpatch%lai (recc) & + + cpatch%fmean_leaf_vpdef (donc) & + * cpatch%lai (donc) ) & + * newlaii + !---------------------------------------------------------------------------------! + else + !----- None of the cohorts has leaf biomass use nplant to scale them. ------------! + cpatch%fmean_leaf_temp (recc) = ( cpatch%fmean_leaf_temp (recc) & + * cpatch%nplant (recc) & + + cpatch%fmean_leaf_temp (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%fmean_leaf_fliq (recc) = 0.0 + cpatch%fmean_leaf_vpdef(recc) = ( cpatch%fmean_leaf_vpdef(recc) & + * cpatch%nplant (recc) & + + cpatch%fmean_leaf_vpdef(donc) & + * cpatch%nplant (donc) ) & + * newni + !---------------------------------------------------------------------------------! + end if + !------ Wood. -----------------------------------------------------------------------! + if ( cpatch%fmean_wood_hcap(recc) > 0. ) then + !----- Update temperature using the standard thermodynamics. ---------------------! + call uextcm2tl(cpatch%fmean_wood_energy(recc),cpatch%fmean_wood_water(recc) & + ,cpatch%fmean_wood_hcap (recc),cpatch%fmean_wood_temp (recc) & + ,cpatch%fmean_wood_fliq (recc)) + !---------------------------------------------------------------------------------! + else + !----- Wood temperature can't be found using uextcm2tl (singularity). ------------! + cpatch%fmean_wood_temp(recc) = ( cpatch%fmean_wood_temp(recc) & + * cpatch%nplant (recc) & + + cpatch%fmean_wood_temp(donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%fmean_wood_fliq(recc) = 0.0 + !---------------------------------------------------------------------------------! + end if + !------------------------------------------------------------------------------------! + + + !------------------------------------------------------------------------------------! - ! Now that we have daily and monthly means going to the cohort level, we must ! - ! fuse them too. ! - !------------------------------------------------------------------------------------! - if (idoutput > 0 .or. imoutput > 0 .or. iqoutput > 0) then - cpatch%dmean_light_level (recc) = ( cpatch%dmean_light_level(recc) & - * cpatch%nplant(recc) & - + cpatch%dmean_light_level(donc) & - * cpatch%nplant(donc) ) * newni - cpatch%dmean_light_level_beam (recc) = ( cpatch%dmean_light_level_beam(recc) & - * cpatch%nplant(recc) & - + cpatch%dmean_light_level_beam(donc) & - * cpatch%nplant(donc) ) * newni - cpatch%dmean_light_level_diff (recc) = ( cpatch%dmean_light_level_diff(recc) & - * cpatch%nplant(recc) & - + cpatch%dmean_light_level_diff(donc) & - * cpatch%nplant(donc) ) * newni - cpatch%dmean_gpp (recc) = ( cpatch%dmean_gpp(recc) & - * cpatch%nplant(recc) & - + cpatch%dmean_gpp(donc) & - * cpatch%nplant(donc) ) * newni - - cpatch%dmean_nppleaf (recc) = ( cpatch%dmean_nppleaf(recc) & - * cpatch%nplant(recc) & - + cpatch%dmean_nppleaf(donc) & - * cpatch%nplant(donc) ) * newni - - cpatch%dmean_nppfroot (recc) = ( cpatch%dmean_nppfroot(recc) & - * cpatch%nplant(recc) & - + cpatch%dmean_nppfroot(donc) & - * cpatch%nplant(donc) ) * newni - - cpatch%dmean_nppsapwood (recc) = ( cpatch%dmean_nppsapwood(recc) & - * cpatch%nplant(recc) & - + cpatch%dmean_nppsapwood(donc) & - * cpatch%nplant(donc) ) * newni - - cpatch%dmean_nppcroot (recc) = ( cpatch%dmean_nppcroot(recc) & - * cpatch%nplant(recc) & - + cpatch%dmean_nppcroot(donc) & - * cpatch%nplant(donc) ) * newni - - cpatch%dmean_nppseeds (recc) = ( cpatch%dmean_nppseeds(recc) & - * cpatch%nplant(recc) & - + cpatch%dmean_nppseeds(donc) & - * cpatch%nplant(donc) ) * newni - - cpatch%dmean_nppwood (recc) = ( cpatch%dmean_nppwood(recc) & - * cpatch%nplant(recc) & - + cpatch%dmean_nppwood(donc) & - * cpatch%nplant(donc) ) * newni - - cpatch%dmean_nppdaily (recc) = ( cpatch%dmean_nppdaily(recc) & - * cpatch%nplant(recc) & - + cpatch%dmean_nppdaily(donc) & - * cpatch%nplant(donc) ) * newni - - cpatch%dmean_leaf_resp (recc) = ( cpatch%dmean_leaf_resp(recc) & - * cpatch%nplant(recc) & - + cpatch%dmean_leaf_resp(donc) & - * cpatch%nplant(donc) ) * newni - cpatch%dmean_root_resp (recc) = ( cpatch%dmean_root_resp(recc) & - * cpatch%nplant(recc) & - + cpatch%dmean_root_resp(donc) & - * cpatch%nplant(donc) ) * newni - !----- The following variables depend on LAI more than nplant. -------------------! - cpatch%dmean_fs_open (recc) = ( cpatch%dmean_fs_open(recc) & - * cpatch%lai(recc) & - + cpatch%dmean_fs_open(donc) & - * cpatch%lai(donc) ) * newlaii - cpatch%dmean_fsw (recc) = ( cpatch%dmean_fsw(recc) & - * cpatch%lai(recc) & - + cpatch%dmean_fsw(donc) & - * cpatch%lai(donc) ) * newlaii - cpatch%dmean_fsn (recc) = ( cpatch%dmean_fsn(recc) & - * cpatch%lai(recc) & - + cpatch%dmean_fsn(donc) & - * cpatch%lai(donc) ) * newlaii - - !----- The following variables are "extensive", add them. ------------------------! - cpatch%dmean_par_l (recc) = cpatch%dmean_par_l (recc) & - + cpatch%dmean_par_l (donc) - cpatch%dmean_par_l_beam (recc) = cpatch%dmean_par_l_beam (recc) & - + cpatch%dmean_par_l_beam (donc) - cpatch%dmean_par_l_diff (recc) = cpatch%dmean_par_l_diff (recc) & - + cpatch%dmean_par_l_diff (donc) - cpatch%dmean_rshort_l (recc) = cpatch%dmean_rshort_l (recc) & - + cpatch%dmean_rshort_l (donc) - cpatch%dmean_rlong_l (recc) = cpatch%dmean_rlong_l (recc) & - + cpatch%dmean_rlong_l (donc) - cpatch%dmean_sensible_lc (recc) = cpatch%dmean_sensible_lc (recc) & - + cpatch%dmean_sensible_lc (donc) - cpatch%dmean_vapor_lc (recc) = cpatch%dmean_vapor_lc (recc) & - + cpatch%dmean_vapor_lc (donc) - cpatch%dmean_transp (recc) = cpatch%dmean_transp (recc) & - + cpatch%dmean_transp (donc) - cpatch%dmean_intercepted_al(recc) = cpatch%dmean_intercepted_al(recc) & - + cpatch%dmean_intercepted_al(donc) - cpatch%dmean_wshed_lg (recc) = cpatch%dmean_wshed_lg (recc) & - + cpatch%dmean_wshed_lg (donc) - cpatch%dmean_rshort_w (recc) = cpatch%dmean_rshort_w (recc) & - + cpatch%dmean_rshort_w (donc) - cpatch%dmean_rlong_w (recc) = cpatch%dmean_rlong_w (recc) & - + cpatch%dmean_rlong_w (donc) - cpatch%dmean_sensible_wc (recc) = cpatch%dmean_sensible_wc (recc) & - + cpatch%dmean_sensible_wc (donc) - cpatch%dmean_vapor_wc (recc) = cpatch%dmean_vapor_wc (recc) & - + cpatch%dmean_vapor_wc (donc) - cpatch%dmean_intercepted_aw(recc) = cpatch%dmean_intercepted_aw(recc) & - + cpatch%dmean_intercepted_aw(donc) - cpatch%dmean_wshed_wg (recc) = cpatch%dmean_wshed_wg (recc) & - + cpatch%dmean_wshed_wg (donc) - cpatch%dmean_psi_open (recc) = cpatch%dmean_psi_open (recc) & - + cpatch%dmean_psi_open (donc) - cpatch%dmean_psi_closed (recc) = cpatch%dmean_psi_closed (recc) & - + cpatch%dmean_psi_closed (donc) - cpatch%dmean_water_supply (recc) = cpatch%dmean_water_supply (recc) & - + cpatch%dmean_water_supply (donc) + ! Daily means. ! + !------------------------------------------------------------------------------------! + if (writing_long) then + + !---------------------------------------------------------------------------------! + ! Intensive variables, scaled by plant density. ! + !---------------------------------------------------------------------------------! + cpatch%dmean_nppleaf (recc) = ( cpatch%dmean_nppleaf (recc) & + * cpatch%nplant (recc) & + * cpatch%dmean_nppleaf (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%dmean_nppfroot (recc) = ( cpatch%dmean_nppfroot (recc) & + * cpatch%nplant (recc) & + * cpatch%dmean_nppfroot (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%dmean_nppsapwood (recc) = ( cpatch%dmean_nppsapwood (recc) & + * cpatch%nplant (recc) & + * cpatch%dmean_nppsapwood (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%dmean_nppcroot (recc) = ( cpatch%dmean_nppcroot (recc) & + * cpatch%nplant (recc) & + * cpatch%dmean_nppcroot (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%dmean_nppseeds (recc) = ( cpatch%dmean_nppseeds (recc) & + * cpatch%nplant (recc) & + * cpatch%dmean_nppseeds (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%dmean_nppwood (recc) = ( cpatch%dmean_nppwood (recc) & + * cpatch%nplant (recc) & + * cpatch%dmean_nppwood (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%dmean_nppdaily (recc) = ( cpatch%dmean_nppdaily (recc) & + * cpatch%nplant (recc) & + * cpatch%dmean_nppdaily (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%dmean_gpp (recc) = ( cpatch%dmean_gpp (recc) & + * cpatch%nplant (recc) & + + cpatch%dmean_gpp (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%dmean_npp (recc) = ( cpatch%dmean_npp (recc) & + * cpatch%nplant (recc) & + + cpatch%dmean_npp (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%dmean_leaf_resp (recc) = ( cpatch%dmean_leaf_resp (recc) & + * cpatch%nplant (recc) & + + cpatch%dmean_leaf_resp (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%dmean_root_resp (recc) = ( cpatch%dmean_root_resp (recc) & + * cpatch%nplant (recc) & + + cpatch%dmean_root_resp (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%dmean_growth_resp (recc) = ( cpatch%dmean_growth_resp (recc) & + * cpatch%nplant (recc) & + + cpatch%dmean_growth_resp (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%dmean_storage_resp (recc) = ( cpatch%dmean_storage_resp (recc) & + * cpatch%nplant (recc) & + + cpatch%dmean_storage_resp (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%dmean_vleaf_resp (recc) = ( cpatch%dmean_vleaf_resp (recc) & + * cpatch%nplant (recc) & + + cpatch%dmean_vleaf_resp (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%dmean_plresp (recc) = ( cpatch%dmean_plresp (recc) & + * cpatch%nplant (recc) & + + cpatch%dmean_plresp (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%dmean_light_level (recc) = ( cpatch%dmean_light_level (recc) & + * cpatch%nplant (recc) & + + cpatch%dmean_light_level (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%dmean_light_level_beam(recc) = ( cpatch%dmean_light_level_beam(recc) & + * cpatch%nplant (recc) & + + cpatch%dmean_light_level_beam(donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%dmean_light_level_diff(recc) = ( cpatch%dmean_light_level_diff(recc) & + * cpatch%nplant (recc) & + + cpatch%dmean_light_level_diff(donc) & + * cpatch%nplant (donc) ) & + * newni + !---------------------------------------------------------------------------------! + + + + + !---------------------------------------------------------------------------------! + ! Intensive variables, scaled by LAI. ! + !---------------------------------------------------------------------------------! + cpatch%dmean_leaf_gsw (recc) = ( cpatch%dmean_leaf_gsw (recc) & + * cpatch%lai (recc) & + + cpatch%dmean_leaf_gsw (donc) & + * cpatch%lai (donc) ) & + * newlaii + cpatch%dmean_leaf_gbw (recc) = ( cpatch%dmean_leaf_gbw (recc) & + * cpatch%lai (recc) & + + cpatch%dmean_leaf_gbw (donc) & + * cpatch%lai (donc) ) & + * newlaii + cpatch%dmean_fs_open (recc) = ( cpatch%dmean_fs_open (recc) & + * cpatch%lai (recc) & + + cpatch%dmean_fs_open (donc) & + * cpatch%lai (donc) ) & + * newlaii + cpatch%dmean_fsw (recc) = ( cpatch%dmean_fsw (recc) & + * cpatch%lai (recc) & + + cpatch%dmean_fsw (donc) & + * cpatch%lai (donc) ) & + * newlaii + cpatch%dmean_fsn (recc) = ( cpatch%dmean_fsn (recc) & + * cpatch%lai (recc) & + + cpatch%dmean_fsn (donc) & + * cpatch%lai (donc) ) & + * newlaii + cpatch%dmean_psi_open (recc) = ( cpatch%dmean_psi_open (recc) & + * cpatch%lai (recc) & + + cpatch%dmean_psi_open (donc) & + * cpatch%lai (donc) ) & + * newlaii + cpatch%dmean_psi_closed (recc) = ( cpatch%dmean_psi_closed (recc) & + * cpatch%lai (recc) & + + cpatch%dmean_psi_closed (donc) & + * cpatch%lai (donc) ) & + * newlaii + !---------------------------------------------------------------------------------! + + + + + !---------------------------------------------------------------------------------! + ! Intensive variables, scaled by WAI. ! + !---------------------------------------------------------------------------------! + cpatch%dmean_wood_gbw (recc) = ( cpatch%dmean_wood_gbw (recc) & + * cpatch%wai (recc) & + + cpatch%dmean_wood_gbw (recc) & + * cpatch%wai (recc) ) & + * newwaii + !---------------------------------------------------------------------------------! + + + + + !---------------------------------------------------------------------------------! + ! Extensive variables. ! + !---------------------------------------------------------------------------------! + cpatch%dmean_leaf_energy (recc) = cpatch%dmean_leaf_energy (recc) & + + cpatch%dmean_leaf_energy (donc) + cpatch%dmean_leaf_water (recc) = cpatch%dmean_leaf_water (recc) & + + cpatch%dmean_leaf_water (donc) + cpatch%dmean_leaf_hcap (recc) = cpatch%dmean_leaf_hcap (recc) & + + cpatch%dmean_leaf_hcap (donc) + cpatch%dmean_wood_energy (recc) = cpatch%dmean_wood_energy (recc) & + + cpatch%dmean_wood_energy (donc) + cpatch%dmean_wood_water (recc) = cpatch%dmean_wood_water (recc) & + + cpatch%dmean_wood_water (donc) + cpatch%dmean_wood_hcap (recc) = cpatch%dmean_wood_hcap (recc) & + + cpatch%dmean_wood_hcap (donc) + cpatch%dmean_water_supply (recc) = cpatch%dmean_water_supply (recc) & + + cpatch%dmean_water_supply (donc) + cpatch%dmean_par_l (recc) = cpatch%dmean_par_l (recc) & + + cpatch%dmean_par_l (donc) + cpatch%dmean_par_l_beam (recc) = cpatch%dmean_par_l_beam (recc) & + + cpatch%dmean_par_l_beam (donc) + cpatch%dmean_par_l_diff (recc) = cpatch%dmean_par_l_diff (recc) & + + cpatch%dmean_par_l_diff (donc) + cpatch%dmean_rshort_l (recc) = cpatch%dmean_rshort_l (recc) & + + cpatch%dmean_rshort_l (donc) + cpatch%dmean_rlong_l (recc) = cpatch%dmean_rlong_l (recc) & + + cpatch%dmean_rlong_l (donc) + cpatch%dmean_sensible_lc (recc) = cpatch%dmean_sensible_lc (recc) & + + cpatch%dmean_sensible_lc (donc) + cpatch%dmean_vapor_lc (recc) = cpatch%dmean_vapor_lc (recc) & + + cpatch%dmean_vapor_lc (donc) + cpatch%dmean_transp (recc) = cpatch%dmean_transp (recc) & + + cpatch%dmean_transp (donc) + cpatch%dmean_intercepted_al (recc) = cpatch%dmean_intercepted_al (recc) & + + cpatch%dmean_intercepted_al (donc) + cpatch%dmean_wshed_lg (recc) = cpatch%dmean_wshed_lg (recc) & + + cpatch%dmean_wshed_lg (donc) + cpatch%dmean_rshort_w (recc) = cpatch%dmean_rshort_w (recc) & + + cpatch%dmean_rshort_w (donc) + cpatch%dmean_rlong_w (recc) = cpatch%dmean_rlong_w (recc) & + + cpatch%dmean_rlong_w (donc) + cpatch%dmean_sensible_wc (recc) = cpatch%dmean_sensible_wc (recc) & + + cpatch%dmean_sensible_wc (donc) + cpatch%dmean_vapor_wc (recc) = cpatch%dmean_vapor_wc (recc) & + + cpatch%dmean_vapor_wc (donc) + cpatch%dmean_intercepted_aw (recc) = cpatch%dmean_intercepted_aw (recc) & + + cpatch%dmean_intercepted_aw (donc) + cpatch%dmean_wshed_wg (recc) = cpatch%dmean_wshed_wg (recc) & + + cpatch%dmean_wshed_wg (donc) + !---------------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------------! + ! We update temperature and liquid water fraction. We check whether the ! + ! heat capacity is non-zero. If it is a normal number, use the standard thermo- ! + ! dynamic library, otherwise, average temperature, this is probably a blend of ! + ! tiny cohorts that couldn't be solved, or the wood is not solved. ! + !---------------------------------------------------------------------------------! + !------ Leaf. --------------------------------------------------------------------! + if ( cpatch%dmean_leaf_hcap(recc) > 0. ) then + !----- Update temperature and liquid fraction using standard thermodynamics. --! + call uextcm2tl(cpatch%dmean_leaf_energy(recc),cpatch%dmean_leaf_water(recc) & + ,cpatch%dmean_leaf_hcap (recc),cpatch%dmean_leaf_temp (recc) & + ,cpatch%dmean_leaf_fliq (recc)) + !------------------------------------------------------------------------------! + + + !----- Scale vapour pressure deficit using LAI. -------------------------------! + cpatch%dmean_leaf_vpdef (recc) = ( cpatch%dmean_leaf_vpdef (recc) & + * cpatch%lai (recc) & + + cpatch%dmean_leaf_vpdef (donc) & + * cpatch%lai (donc) ) & + * newlaii + !------------------------------------------------------------------------------! + else + !----- None of the cohorts has leaf biomass use nplant to scale them. ---------! + cpatch%dmean_leaf_temp (recc) = ( cpatch%dmean_leaf_temp (recc) & + * cpatch%nplant (recc) & + + cpatch%dmean_leaf_temp (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%dmean_leaf_fliq (recc) = 0.0 + cpatch%dmean_leaf_vpdef(recc) = ( cpatch%dmean_leaf_vpdef(recc) & + * cpatch%nplant (recc) & + + cpatch%dmean_leaf_vpdef(donc) & + * cpatch%nplant (donc) ) & + * newni + !------------------------------------------------------------------------------! + end if + !------ Wood. --------------------------------------------------------------------! + if ( cpatch%dmean_wood_hcap(recc) > 0. ) then + !----- Update temperature using the standard thermodynamics. ------------------! + call uextcm2tl(cpatch%dmean_wood_energy(recc),cpatch%dmean_wood_water(recc) & + ,cpatch%dmean_wood_hcap (recc),cpatch%dmean_wood_temp (recc) & + ,cpatch%dmean_wood_fliq (recc)) + !------------------------------------------------------------------------------! + else + !----- Wood temperature can't be found using uextcm2tl (singularity). ---------! + cpatch%dmean_wood_temp(recc) = ( cpatch%dmean_wood_temp(recc) & + * cpatch%nplant (recc) & + + cpatch%dmean_wood_temp(donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%dmean_wood_fliq(recc) = 0.0 + !------------------------------------------------------------------------------! + end if !---------------------------------------------------------------------------------! end if - if (imoutput > 0 .or. iqoutput > 0) then - cpatch%mmean_light_level (recc) = ( cpatch%mmean_light_level(recc) & - * cpatch%nplant(recc) & - + cpatch%mmean_light_level(donc) & - * cpatch%nplant(donc) ) * newni + !------------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------------! + ! Monthly means. ! + !------------------------------------------------------------------------------------! + if (writing_eorq) then + !---------------------------------------------------------------------------------! + ! First we merge the squares, as they require the means. ! + !---------------------------------------------------------------------------------! + !----- Intensive. ----------------------------------------------------------------! + cpatch%mmsqu_gpp (recc) = fuse_msqu( cpatch%mmean_gpp (recc) & + , cpatch%mmsqu_gpp (recc) & + , cpatch%nplant (recc) & + , cpatch%mmean_gpp (donc) & + , cpatch%mmsqu_gpp (donc) & + , cpatch%nplant (donc) & + , corr_cohort, .false.) + cpatch%mmsqu_npp (recc) = fuse_msqu( cpatch%mmean_npp (recc) & + , cpatch%mmsqu_npp (recc) & + , cpatch%nplant (recc) & + , cpatch%mmean_npp (donc) & + , cpatch%mmsqu_npp (donc) & + , cpatch%nplant (donc) & + , corr_cohort, .false.) + cpatch%mmsqu_plresp (recc) = fuse_msqu( cpatch%mmean_plresp (recc) & + , cpatch%mmsqu_plresp (recc) & + , cpatch%nplant (recc) & + , cpatch%mmean_plresp (donc) & + , cpatch%mmsqu_plresp (donc) & + , cpatch%nplant (donc) & + , corr_cohort, .false.) + !----- Extensive variables. ------------------------------------------------------! + cpatch%mmsqu_sensible_lc(recc) = fuse_msqu( cpatch%mmean_sensible_lc(recc) & + , cpatch%mmsqu_sensible_lc(recc) & + , cpatch%nplant (recc) & + , cpatch%mmean_sensible_lc(donc) & + , cpatch%mmsqu_sensible_lc(donc) & + , cpatch%nplant (donc) & + , corr_cohort, .true. ) + cpatch%mmsqu_vapor_lc (recc) = fuse_msqu( cpatch%mmean_vapor_lc (recc) & + , cpatch%mmsqu_vapor_lc (recc) & + , cpatch%nplant (recc) & + , cpatch%mmean_vapor_lc (donc) & + , cpatch%mmsqu_vapor_lc (donc) & + , cpatch%nplant (donc) & + , corr_cohort, .true. ) + cpatch%mmsqu_transp (recc) = fuse_msqu( cpatch%mmean_transp (recc) & + , cpatch%mmsqu_transp (recc) & + , cpatch%nplant (recc) & + , cpatch%mmean_transp (donc) & + , cpatch%mmsqu_transp (donc) & + , cpatch%nplant (donc) & + , corr_cohort, .true. ) + cpatch%mmsqu_sensible_wc(recc) = fuse_msqu( cpatch%mmean_sensible_wc(recc) & + , cpatch%mmsqu_sensible_wc(recc) & + , cpatch%nplant (recc) & + , cpatch%mmean_sensible_wc(donc) & + , cpatch%mmsqu_sensible_wc(donc) & + , cpatch%nplant (donc) & + , corr_cohort, .true. ) + cpatch%mmsqu_vapor_wc (recc) = fuse_msqu( cpatch%mmean_vapor_wc (recc) & + , cpatch%mmsqu_vapor_wc (recc) & + , cpatch%nplant (recc) & + , cpatch%mmean_vapor_wc (donc) & + , cpatch%mmsqu_vapor_wc (donc) & + , cpatch%nplant (donc) & + , corr_cohort, .true. ) + !---------------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------------! + ! Intensive variables, scaled by plant density. ! + !---------------------------------------------------------------------------------! + cpatch%mmean_nppleaf (recc) = ( cpatch%mmean_nppleaf (recc) & + * cpatch%nplant (recc) & + * cpatch%mmean_nppleaf (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%mmean_nppfroot (recc) = ( cpatch%mmean_nppfroot (recc) & + * cpatch%nplant (recc) & + * cpatch%mmean_nppfroot (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%mmean_nppsapwood (recc) = ( cpatch%mmean_nppsapwood (recc) & + * cpatch%nplant (recc) & + * cpatch%mmean_nppsapwood (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%mmean_nppcroot (recc) = ( cpatch%mmean_nppcroot (recc) & + * cpatch%nplant (recc) & + * cpatch%mmean_nppcroot (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%mmean_nppseeds (recc) = ( cpatch%mmean_nppseeds (recc) & + * cpatch%nplant (recc) & + * cpatch%mmean_nppseeds (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%mmean_nppwood (recc) = ( cpatch%mmean_nppwood (recc) & + * cpatch%nplant (recc) & + * cpatch%mmean_nppwood (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%mmean_nppdaily (recc) = ( cpatch%mmean_nppdaily (recc) & + * cpatch%nplant (recc) & + * cpatch%mmean_nppdaily (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%mmean_gpp (recc) = ( cpatch%mmean_gpp (recc) & + * cpatch%nplant (recc) & + + cpatch%mmean_gpp (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%mmean_npp (recc) = ( cpatch%mmean_npp (recc) & + * cpatch%nplant (recc) & + + cpatch%mmean_npp (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%mmean_leaf_resp (recc) = ( cpatch%mmean_leaf_resp (recc) & + * cpatch%nplant (recc) & + + cpatch%mmean_leaf_resp (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%mmean_root_resp (recc) = ( cpatch%mmean_root_resp (recc) & + * cpatch%nplant (recc) & + + cpatch%mmean_root_resp (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%mmean_growth_resp (recc) = ( cpatch%mmean_growth_resp (recc) & + * cpatch%nplant (recc) & + + cpatch%mmean_growth_resp (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%mmean_storage_resp (recc) = ( cpatch%mmean_storage_resp (recc) & + * cpatch%nplant (recc) & + + cpatch%mmean_storage_resp (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%mmean_vleaf_resp (recc) = ( cpatch%mmean_vleaf_resp (recc) & + * cpatch%nplant (recc) & + + cpatch%mmean_vleaf_resp (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%mmean_plresp (recc) = ( cpatch%mmean_plresp (recc) & + * cpatch%nplant (recc) & + + cpatch%mmean_plresp (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%mmean_light_level (recc) = ( cpatch%mmean_light_level (recc) & + * cpatch%nplant (recc) & + + cpatch%mmean_light_level (donc) & + * cpatch%nplant (donc) ) & + * newni cpatch%mmean_light_level_beam(recc) = ( cpatch%mmean_light_level_beam(recc) & - * cpatch%nplant(recc) & + * cpatch%nplant (recc) & + cpatch%mmean_light_level_beam(donc) & - * cpatch%nplant(donc) ) * newni + * cpatch%nplant (donc) ) & + * newni cpatch%mmean_light_level_diff(recc) = ( cpatch%mmean_light_level_diff(recc) & - * cpatch%nplant(recc) & + * cpatch%nplant (recc) & + cpatch%mmean_light_level_diff(donc) & - * cpatch%nplant(donc) ) * newni + * cpatch%nplant (donc) ) & + * newni + cpatch%mmean_bleaf (recc) = ( cpatch%mmean_bleaf (recc) & + * cpatch%nplant (recc) & + * cpatch%mmean_bleaf (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%mmean_broot (recc) = ( cpatch%mmean_broot (recc) & + * cpatch%nplant (recc) & + * cpatch%mmean_broot (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%mmean_bstorage (recc) = ( cpatch%mmean_bstorage (recc) & + * cpatch%nplant (recc) & + * cpatch%mmean_bstorage (donc) & + * cpatch%nplant (donc) ) & + * newni cpatch%mmean_leaf_maintenance(recc) = ( cpatch%mmean_leaf_maintenance(recc) & - * cpatch%nplant(recc) & - + cpatch%mmean_leaf_maintenance(donc) & - * cpatch%nplant(donc) ) * newni + * cpatch%nplant (recc) & + * cpatch%mmean_leaf_maintenance(donc) & + * cpatch%nplant (donc) ) & + * newni cpatch%mmean_root_maintenance(recc) = ( cpatch%mmean_root_maintenance(recc) & - * cpatch%nplant(recc) & - + cpatch%mmean_root_maintenance(donc) & - * cpatch%nplant(donc) ) * newni - cpatch%mmean_leaf_drop (recc) = ( cpatch%mmean_leaf_drop(recc) & - * cpatch%nplant(recc) & - + cpatch%mmean_leaf_drop(donc) & - * cpatch%nplant(donc) ) * newni - cpatch%mmean_cb (recc) = ( cpatch%mmean_cb(recc) & - * cpatch%nplant(recc) & - + cpatch%mmean_cb(donc) & - * cpatch%nplant(donc) ) * newni - cpatch%mmean_gpp (recc) = ( cpatch%mmean_gpp(recc) & - * cpatch%nplant(recc) & - + cpatch%mmean_gpp(donc) & - * cpatch%nplant(donc) ) * newni - - cpatch%mmean_nppleaf (recc) = ( cpatch%mmean_nppleaf(recc) & - * cpatch%nplant(recc) & - + cpatch%mmean_nppleaf(donc) & - * cpatch%nplant(donc) ) * newni - - cpatch%mmean_nppfroot (recc) = ( cpatch%mmean_nppfroot(recc) & - * cpatch%nplant(recc) & - + cpatch%mmean_nppfroot(donc) & - * cpatch%nplant(donc) ) * newni - - cpatch%mmean_nppsapwood (recc) = ( cpatch%mmean_nppsapwood(recc) & - * cpatch%nplant(recc) & - + cpatch%mmean_nppsapwood(donc) & - * cpatch%nplant(donc) ) * newni - - cpatch%mmean_nppcroot (recc) = ( cpatch%mmean_nppcroot(recc) & - * cpatch%nplant(recc) & - + cpatch%mmean_nppcroot(donc) & - * cpatch%nplant(donc) ) * newni - - cpatch%mmean_nppseeds (recc) = ( cpatch%mmean_nppseeds(recc) & - * cpatch%nplant(recc) & - + cpatch%mmean_nppseeds(donc) & - * cpatch%nplant(donc) ) * newni - - cpatch%mmean_nppwood (recc) = ( cpatch%mmean_nppwood(recc) & - * cpatch%nplant(recc) & - + cpatch%mmean_nppwood(donc) & - * cpatch%nplant(donc) ) * newni - - cpatch%mmean_nppdaily (recc) = ( cpatch%mmean_nppdaily(recc) & - * cpatch%nplant(recc) & - + cpatch%mmean_nppdaily(donc) & - * cpatch%nplant(donc) ) * newni - - cpatch%mmean_leaf_resp (recc) = ( cpatch%mmean_leaf_resp(recc) & - * cpatch%nplant(recc) & - + cpatch%mmean_leaf_resp(donc) & - * cpatch%nplant(donc) ) * newni - cpatch%mmean_root_resp (recc) = ( cpatch%mmean_root_resp(recc) & - * cpatch%nplant(recc) & - + cpatch%mmean_root_resp(donc) & - * cpatch%nplant(donc) ) * newni - cpatch%mmean_growth_resp (recc) = ( cpatch%mmean_growth_resp(recc) & - * cpatch%nplant(recc) & - + cpatch%mmean_growth_resp(donc) & - * cpatch%nplant(donc) ) * newni - cpatch%mmean_storage_resp (recc) = ( cpatch%mmean_storage_resp(recc) & - * cpatch%nplant(recc) & - + cpatch%mmean_storage_resp(donc) & - * cpatch%nplant(donc) ) * newni - cpatch%mmean_vleaf_resp (recc) = ( cpatch%mmean_vleaf_resp(recc) & - * cpatch%nplant(recc) & - + cpatch%mmean_vleaf_resp(donc) & - * cpatch%nplant(donc) ) * newni - - !---------------------------------------------------------------------------------! - ! Fusing the mortality rates. The terms that are PFT-dependent but density- ! - ! independent should be the same, so it doesn't matter which average we use. The ! - ! density-dependent should be averaged using nplant as the relative weight. ! + * cpatch%nplant (recc) & + * cpatch%mmean_root_maintenance(donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%mmean_leaf_drop (recc) = ( cpatch%mmean_leaf_drop (recc) & + * cpatch%nplant (recc) & + * cpatch%mmean_leaf_drop (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%mmean_cb (recc) = ( cpatch%mmean_cb (recc) & + * cpatch%nplant (recc) & + * cpatch%mmean_cb (donc) & + * cpatch%nplant (donc) ) & + * newni !---------------------------------------------------------------------------------! - do imty=1,n_mort - cpatch%mmean_mort_rate(imty,recc) = ( cpatch%mmean_mort_rate(imty,recc) & - * cpatch%nplant(recc) & - + cpatch%mort_rate(imty,donc) & - * cpatch%nplant(donc)) & - * newni - end do - !----- The following variables depend on LAI more than nplant. -------------------! - cpatch%mmean_fs_open (recc) = ( cpatch%mmean_fs_open(recc) & - * cpatch%lai(recc) & - + cpatch%mmean_fs_open(donc) & - * cpatch%lai(donc) ) * newlaii - cpatch%mmean_fsw (recc) = ( cpatch%mmean_fsw(recc) & - * cpatch%lai(recc) & - + cpatch%mmean_fsw(donc) & - * cpatch%lai(donc) ) * newlaii - cpatch%mmean_fsn (recc) = ( cpatch%mmean_fsn(recc) & - * cpatch%lai(recc) & - + cpatch%mmean_fsn(donc) & - * cpatch%lai(donc) ) * newlaii - - !----- The following variables are "extensive", add them. ------------------------! - cpatch%mmean_par_l (recc) = cpatch%mmean_par_l (recc) & - + cpatch%mmean_par_l (donc) - cpatch%mmean_par_l_beam (recc) = cpatch%mmean_par_l_beam (recc) & - + cpatch%mmean_par_l_beam (donc) - cpatch%mmean_par_l_diff (recc) = cpatch%mmean_par_l_diff (recc) & - + cpatch%mmean_par_l_diff (donc) - cpatch%mmean_rshort_l (recc) = cpatch%mmean_rshort_l (recc) & - + cpatch%mmean_rshort_l (donc) - cpatch%mmean_rlong_l (recc) = cpatch%mmean_rlong_l (recc) & - + cpatch%mmean_rlong_l (donc) - cpatch%mmean_sensible_lc (recc) = cpatch%mmean_sensible_lc (recc) & - + cpatch%mmean_sensible_lc (donc) - cpatch%mmean_vapor_lc (recc) = cpatch%mmean_vapor_lc (recc) & - + cpatch%mmean_vapor_lc (donc) - cpatch%mmean_transp (recc) = cpatch%mmean_transp (recc) & - + cpatch%mmean_transp (donc) - cpatch%mmean_intercepted_al(recc) = cpatch%mmean_intercepted_al(recc) & - + cpatch%mmean_intercepted_al(donc) - cpatch%mmean_wshed_lg (recc) = cpatch%mmean_wshed_lg (recc) & - + cpatch%mmean_wshed_lg (donc) - cpatch%mmean_rshort_w (recc) = cpatch%mmean_rshort_w (recc) & - + cpatch%mmean_rshort_w (donc) - cpatch%mmean_rlong_w (recc) = cpatch%mmean_rlong_w (recc) & - + cpatch%mmean_rlong_w (donc) - cpatch%mmean_sensible_wc (recc) = cpatch%mmean_sensible_wc (recc) & - + cpatch%mmean_sensible_wc (donc) - cpatch%mmean_vapor_wc (recc) = cpatch%mmean_vapor_wc (recc) & - + cpatch%mmean_vapor_wc (donc) - cpatch%mmean_intercepted_aw(recc) = cpatch%mmean_intercepted_aw(recc) & - + cpatch%mmean_intercepted_aw(donc) - cpatch%mmean_wshed_wg (recc) = cpatch%mmean_wshed_wg (recc) & - + cpatch%mmean_wshed_wg (donc) - cpatch%mmean_psi_open (recc) = cpatch%mmean_psi_open (recc) & - + cpatch%mmean_psi_open (donc) - cpatch%mmean_psi_closed (recc) = cpatch%mmean_psi_closed (recc) & - + cpatch%mmean_psi_closed (donc) - cpatch%mmean_water_supply (recc) = cpatch%mmean_water_supply (recc) & - + cpatch%mmean_water_supply (donc) + + + + !---------------------------------------------------------------------------------! + ! Intensive variables, scaled by LAI. ! + !---------------------------------------------------------------------------------! + cpatch%mmean_leaf_gsw (recc) = ( cpatch%mmean_leaf_gsw (recc) & + * cpatch%lai (recc) & + + cpatch%mmean_leaf_gsw (donc) & + * cpatch%lai (donc) ) & + * newlaii + cpatch%mmean_leaf_gbw (recc) = ( cpatch%mmean_leaf_gbw (recc) & + * cpatch%lai (recc) & + + cpatch%mmean_leaf_gbw (donc) & + * cpatch%lai (donc) ) & + * newlaii + cpatch%mmean_fs_open (recc) = ( cpatch%mmean_fs_open (recc) & + * cpatch%lai (recc) & + + cpatch%mmean_fs_open (donc) & + * cpatch%lai (donc) ) & + * newlaii + cpatch%mmean_fsw (recc) = ( cpatch%mmean_fsw (recc) & + * cpatch%lai (recc) & + + cpatch%mmean_fsw (donc) & + * cpatch%lai (donc) ) & + * newlaii + cpatch%mmean_fsn (recc) = ( cpatch%mmean_fsn (recc) & + * cpatch%lai (recc) & + + cpatch%mmean_fsn (donc) & + * cpatch%lai (donc) ) & + * newlaii + cpatch%mmean_psi_open (recc) = ( cpatch%mmean_psi_open (recc) & + * cpatch%lai (recc) & + + cpatch%mmean_psi_open (donc) & + * cpatch%lai (donc) ) & + * newlaii + cpatch%mmean_psi_closed (recc) = ( cpatch%mmean_psi_closed (recc) & + * cpatch%lai (recc) & + + cpatch%mmean_psi_closed (donc) & + * cpatch%lai (donc) ) & + * newlaii !---------------------------------------------------------------------------------! - end if - !------------------------------------------------------------------------------------! - ! Fuse the mean diurnal cycle. ! - !------------------------------------------------------------------------------------! - if (iqoutput > 0) then - do icyc=1,ndcycle - cpatch%qmean_gpp (icyc,recc) = ( cpatch%qmean_gpp (icyc,recc) & - * cpatch%nplant (recc) & - + cpatch%qmean_gpp (icyc,donc) & - * cpatch%nplant (donc)) & - * newni - cpatch%qmean_leaf_resp (icyc,recc) = ( cpatch%qmean_leaf_resp (icyc,recc) & - * cpatch%nplant (recc) & - + cpatch%qmean_leaf_resp (icyc,donc) & - * cpatch%nplant (donc)) & - * newni - cpatch%qmean_root_resp (icyc,recc) = ( cpatch%qmean_root_resp (icyc,recc) & - * cpatch%nplant (recc) & - + cpatch%qmean_root_resp (icyc,donc) & - * cpatch%nplant (donc)) & - * newni - !----- The following variables depend on LAI more than nplant. ----------------! - cpatch%qmean_fs_open (icyc,recc) = ( cpatch%qmean_fs_open (icyc,recc) & - * cpatch%lai (recc) & - + cpatch%qmean_fs_open (icyc,donc) & - * cpatch%lai (donc)) & - * newlaii - cpatch%qmean_fsw (icyc,recc) = ( cpatch%qmean_fsw (icyc,recc) & - * cpatch%lai (recc) & - + cpatch%qmean_fsw (icyc,donc) & - * cpatch%lai (donc)) & - * newlaii - cpatch%qmean_fsn (icyc,recc) = ( cpatch%qmean_fsn (icyc,recc) & - * cpatch%lai (recc) & - + cpatch%qmean_fsn (icyc,donc) & - * cpatch%lai (donc)) & - * newlaii - - !----- The following variables are "extensive", add them. ------------------------! - cpatch%qmean_par_l (icyc,recc) = cpatch%qmean_par_l (icyc,recc) & - + cpatch%qmean_par_l (icyc,donc) - cpatch%qmean_par_l_beam (icyc,recc) = cpatch%qmean_par_l_beam (icyc,recc) & - + cpatch%qmean_par_l_beam (icyc,donc) - cpatch%qmean_par_l_diff (icyc,recc) = cpatch%qmean_par_l_diff (icyc,recc) & - + cpatch%qmean_par_l_diff (icyc,donc) - cpatch%qmean_rshort_l (icyc,recc) = cpatch%qmean_rshort_l (icyc,recc) & - + cpatch%qmean_rshort_l (icyc,donc) - cpatch%qmean_rlong_l (icyc,recc) = cpatch%qmean_rlong_l (icyc,recc) & - + cpatch%qmean_rlong_l (icyc,donc) - cpatch%qmean_sensible_lc (icyc,recc) = cpatch%qmean_sensible_lc (icyc,recc) & - + cpatch%qmean_sensible_lc (icyc,donc) - cpatch%qmean_vapor_lc (icyc,recc) = cpatch%qmean_vapor_lc (icyc,recc) & - + cpatch%qmean_vapor_lc (icyc,donc) - cpatch%qmean_transp (icyc,recc) = cpatch%qmean_transp (icyc,recc) & - + cpatch%qmean_transp (icyc,donc) - cpatch%qmean_intercepted_al(icyc,recc) = cpatch%qmean_intercepted_al(icyc,recc) & - + cpatch%qmean_intercepted_al(icyc,donc) - cpatch%qmean_wshed_lg (icyc,recc) = cpatch%qmean_wshed_lg (icyc,recc) & - + cpatch%qmean_wshed_lg (icyc,donc) - cpatch%qmean_rshort_w (icyc,recc) = cpatch%qmean_rshort_w (icyc,recc) & - + cpatch%qmean_rshort_w (icyc,donc) - cpatch%qmean_rlong_w (icyc,recc) = cpatch%qmean_rlong_w (icyc,recc) & - + cpatch%qmean_rlong_w (icyc,donc) - cpatch%qmean_sensible_wc (icyc,recc) = cpatch%qmean_sensible_wc (icyc,recc) & - + cpatch%qmean_sensible_wc (icyc,donc) - cpatch%qmean_vapor_wc (icyc,recc) = cpatch%qmean_vapor_wc (icyc,recc) & - + cpatch%qmean_vapor_wc (icyc,donc) - cpatch%qmean_intercepted_aw(icyc,recc) = cpatch%qmean_intercepted_aw(icyc,recc) & - + cpatch%qmean_intercepted_aw(icyc,donc) - cpatch%qmean_wshed_wg (icyc,recc) = cpatch%qmean_wshed_wg (icyc,recc) & - + cpatch%qmean_wshed_wg (icyc,donc) - cpatch%qmean_psi_open (icyc,recc) = cpatch%qmean_psi_open (icyc,recc) & - + cpatch%qmean_psi_open (icyc,donc) - cpatch%qmean_psi_closed (icyc,recc) = cpatch%qmean_psi_closed (icyc,recc) & - + cpatch%qmean_psi_closed (icyc,donc) - cpatch%qmean_water_supply (icyc,recc) = cpatch%qmean_water_supply (icyc,recc) & - + cpatch%qmean_water_supply (icyc,donc) + + + + !---------------------------------------------------------------------------------! + ! Intensive variables, scaled by WAI. ! + !---------------------------------------------------------------------------------! + cpatch%mmean_wood_gbw (recc) = ( cpatch%mmean_wood_gbw (recc) & + * cpatch%wai (recc) & + + cpatch%mmean_wood_gbw (recc) & + * cpatch%wai (recc) ) & + * newwaii + !---------------------------------------------------------------------------------! + + + + + !---------------------------------------------------------------------------------! + ! Extensive variables. ! + !---------------------------------------------------------------------------------! + cpatch%mmean_lai (recc) = cpatch%mmean_lai (recc) & + + cpatch%mmean_lai (donc) + cpatch%mmean_leaf_energy (recc) = cpatch%mmean_leaf_energy (recc) & + + cpatch%mmean_leaf_energy (donc) + cpatch%mmean_leaf_water (recc) = cpatch%mmean_leaf_water (recc) & + + cpatch%mmean_leaf_water (donc) + cpatch%mmean_leaf_hcap (recc) = cpatch%mmean_leaf_hcap (recc) & + + cpatch%mmean_leaf_hcap (donc) + cpatch%mmean_wood_energy (recc) = cpatch%mmean_wood_energy (recc) & + + cpatch%mmean_wood_energy (donc) + cpatch%mmean_wood_water (recc) = cpatch%mmean_wood_water (recc) & + + cpatch%mmean_wood_water (donc) + cpatch%mmean_wood_hcap (recc) = cpatch%mmean_wood_hcap (recc) & + + cpatch%mmean_wood_hcap (donc) + cpatch%mmean_water_supply (recc) = cpatch%mmean_water_supply (recc) & + + cpatch%mmean_water_supply (donc) + cpatch%mmean_par_l (recc) = cpatch%mmean_par_l (recc) & + + cpatch%mmean_par_l (donc) + cpatch%mmean_par_l_beam (recc) = cpatch%mmean_par_l_beam (recc) & + + cpatch%mmean_par_l_beam (donc) + cpatch%mmean_par_l_diff (recc) = cpatch%mmean_par_l_diff (recc) & + + cpatch%mmean_par_l_diff (donc) + cpatch%mmean_rshort_l (recc) = cpatch%mmean_rshort_l (recc) & + + cpatch%mmean_rshort_l (donc) + cpatch%mmean_rlong_l (recc) = cpatch%mmean_rlong_l (recc) & + + cpatch%mmean_rlong_l (donc) + cpatch%mmean_sensible_lc (recc) = cpatch%mmean_sensible_lc (recc) & + + cpatch%mmean_sensible_lc (donc) + cpatch%mmean_vapor_lc (recc) = cpatch%mmean_vapor_lc (recc) & + + cpatch%mmean_vapor_lc (donc) + cpatch%mmean_transp (recc) = cpatch%mmean_transp (recc) & + + cpatch%mmean_transp (donc) + cpatch%mmean_intercepted_al (recc) = cpatch%mmean_intercepted_al (recc) & + + cpatch%mmean_intercepted_al (donc) + cpatch%mmean_wshed_lg (recc) = cpatch%mmean_wshed_lg (recc) & + + cpatch%mmean_wshed_lg (donc) + cpatch%mmean_rshort_w (recc) = cpatch%mmean_rshort_w (recc) & + + cpatch%mmean_rshort_w (donc) + cpatch%mmean_rlong_w (recc) = cpatch%mmean_rlong_w (recc) & + + cpatch%mmean_rlong_w (donc) + cpatch%mmean_sensible_wc (recc) = cpatch%mmean_sensible_wc (recc) & + + cpatch%mmean_sensible_wc (donc) + cpatch%mmean_vapor_wc (recc) = cpatch%mmean_vapor_wc (recc) & + + cpatch%mmean_vapor_wc (donc) + cpatch%mmean_intercepted_aw (recc) = cpatch%mmean_intercepted_aw (recc) & + + cpatch%mmean_intercepted_aw (donc) + cpatch%mmean_wshed_wg (recc) = cpatch%mmean_wshed_wg (recc) & + + cpatch%mmean_wshed_wg (donc) + !---------------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------------! + ! We update temperature and liquid water fraction. We check whether the ! + ! heat capacity is non-zero. If it is a normal number, use the standard thermo- ! + ! dynamic library, otherwise, average temperature, this is probably a blend of ! + ! tiny cohorts that couldn't be solved, or the wood is not solved. ! + !---------------------------------------------------------------------------------! + !------ Leaf. --------------------------------------------------------------------! + if ( cpatch%mmean_leaf_hcap(recc) > 0. ) then + !----- Update temperature and liquid fraction using standard thermodynamics. --! + call uextcm2tl(cpatch%mmean_leaf_energy(recc),cpatch%mmean_leaf_water(recc) & + ,cpatch%mmean_leaf_hcap (recc),cpatch%mmean_leaf_temp (recc) & + ,cpatch%mmean_leaf_fliq (recc)) + !------------------------------------------------------------------------------! + + + !----- Scale vapour pressure deficit using LAI. -------------------------------! + cpatch%mmean_leaf_vpdef (recc) = ( cpatch%mmean_leaf_vpdef (recc) & + * cpatch%lai (recc) & + + cpatch%mmean_leaf_vpdef (donc) & + * cpatch%lai (donc) ) & + * newlaii + !------------------------------------------------------------------------------! + else + !----- None of the cohorts has leaf biomass use nplant to scale them. ---------! + cpatch%mmean_leaf_temp (recc) = ( cpatch%mmean_leaf_temp (recc) & + * cpatch%nplant (recc) & + + cpatch%mmean_leaf_temp (donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%mmean_leaf_fliq (recc) = 0.0 + cpatch%mmean_leaf_vpdef(recc) = ( cpatch%mmean_leaf_vpdef(recc) & + * cpatch%nplant (recc) & + + cpatch%mmean_leaf_vpdef(donc) & + * cpatch%nplant (donc) ) & + * newni + !------------------------------------------------------------------------------! + end if + !------ Wood. --------------------------------------------------------------------! + if ( cpatch%mmean_wood_hcap(recc) > 0. ) then + !----- Update temperature using the standard thermodynamics. ------------------! + call uextcm2tl(cpatch%mmean_wood_energy(recc),cpatch%mmean_wood_water(recc) & + ,cpatch%mmean_wood_hcap (recc),cpatch%mmean_wood_temp (recc) & + ,cpatch%mmean_wood_fliq (recc)) + !------------------------------------------------------------------------------! + else + !----- Wood temperature can't be found using uextcm2tl (singularity). ---------! + cpatch%mmean_wood_temp(recc) = ( cpatch%mmean_wood_temp(recc) & + * cpatch%nplant (recc) & + + cpatch%mmean_wood_temp(donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%mmean_wood_fliq(recc) = 0.0 + !------------------------------------------------------------------------------! + end if + !---------------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------------! + ! Fuse mortality rates. By definition, mortality rate M for is given by: ! + ! ! + ! ln(A) - ln(N) ! + ! m = --------------- ! + ! dt ! + ! ! + ! where A is the population that was previously alive, and N is the population ! + ! that survived the mortality. The cohorts represent a group of individuals with ! + ! the same size and PFT, so they don't mix new recruits and old plants. There- ! + ! fore, we can assume that N is actually nplant. We don't know A, if the ! + ! mortality rate is assumed constant during the interval dt, A = N * exp(m dt). ! + ! ! + ! For fusion we don't really care about dt, so any number will do as long as it ! + ! is the same for both cohorts. With these assumptions, the mortality rate for ! + ! the fused cohort mf is: ! + ! ! + ! mf = ln (Ad+Ar) - ln(Nd+Nr) = ln[Nd*exp(md) + Nr*exp(mr)] - ln[Nd+Nr] ! + ! ! + ! / Nd*exp(md) + Nr*exp(mr) \ ! + ! mf = ln |-------------------------| ! + ! \ Nd + Nr / ! !---------------------------------------------------------------------------------! + do imty=1,n_mort + exp_mort_donc = exp(max(lnexp_min,min(lnexp_max & + ,cpatch%mmean_mort_rate(imty,donc)))) + exp_mort_recc = exp(max(lnexp_min,min(lnexp_max & + ,cpatch%mmean_mort_rate(imty,recc)))) + + cpatch%mmean_mort_rate(imty,recc) = log( ( cpatch%nplant (recc) & + * exp_mort_recc & + + cpatch%nplant (donc) & + * exp_mort_donc ) & + * newni ) end do + !------------------------------------------------------------------------------------! end if + !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! - ! Lastly, we update nplant and LAI. ! + ! Mean diel. ! !------------------------------------------------------------------------------------! - cpatch%nplant(recc) = newn + if (writing_dcyc) then + !---------------------------------------------------------------------------------! + ! First we merge the squares, as they require the means. ! + !---------------------------------------------------------------------------------! + do t=1,ndcycle + !----- Intensive. -------------------------------------------------------------! + cpatch%qmsqu_gpp (t,recc) = fuse_msqu(cpatch%qmean_gpp (t,recc) & + ,cpatch%qmsqu_gpp (t,recc) & + ,cpatch%nplant (recc) & + ,cpatch%qmean_gpp (t,donc) & + ,cpatch%qmsqu_gpp (t,donc) & + ,cpatch%nplant (donc) & + ,corr_cohort,.false.) + cpatch%qmsqu_npp (t,recc) = fuse_msqu(cpatch%qmean_npp (t,recc) & + ,cpatch%qmsqu_npp (t,recc) & + ,cpatch%nplant (recc) & + ,cpatch%qmean_npp (t,donc) & + ,cpatch%qmsqu_npp (t,donc) & + ,cpatch%nplant (donc) & + ,corr_cohort,.false.) + cpatch%qmsqu_plresp (t,recc) = fuse_msqu(cpatch%qmean_plresp (t,recc) & + ,cpatch%qmsqu_plresp (t,recc) & + ,cpatch%nplant (recc) & + ,cpatch%qmean_plresp (t,donc) & + ,cpatch%qmsqu_plresp (t,donc) & + ,cpatch%nplant (donc) & + ,corr_cohort,.false.) + !----- Extensive variables. ---------------------------------------------------! + cpatch%qmsqu_sensible_lc(t,recc) = fuse_msqu(cpatch%qmean_sensible_lc(t,recc) & + ,cpatch%qmsqu_sensible_lc(t,recc) & + ,cpatch%nplant (recc) & + ,cpatch%qmean_sensible_lc(t,donc) & + ,cpatch%qmsqu_sensible_lc(t,donc) & + ,cpatch%nplant (donc) & + ,corr_cohort,.true. ) + cpatch%qmsqu_vapor_lc (t,recc) = fuse_msqu(cpatch%qmean_vapor_lc (t,recc) & + ,cpatch%qmsqu_vapor_lc (t,recc) & + ,cpatch%nplant (recc) & + ,cpatch%qmean_vapor_lc (t,donc) & + ,cpatch%qmsqu_vapor_lc (t,donc) & + ,cpatch%nplant (donc) & + ,corr_cohort,.true. ) + cpatch%qmsqu_transp (t,recc) = fuse_msqu(cpatch%qmean_transp (t,recc) & + ,cpatch%qmsqu_transp (t,recc) & + ,cpatch%nplant (recc) & + ,cpatch%qmean_transp (t,donc) & + ,cpatch%qmsqu_transp (t,donc) & + ,cpatch%nplant (donc) & + ,corr_cohort,.true. ) + cpatch%qmsqu_sensible_wc(t,recc) = fuse_msqu(cpatch%qmean_sensible_wc(t,recc) & + ,cpatch%qmsqu_sensible_wc(t,recc) & + ,cpatch%nplant (recc) & + ,cpatch%qmean_sensible_wc(t,donc) & + ,cpatch%qmsqu_sensible_wc(t,donc) & + ,cpatch%nplant (donc) & + ,corr_cohort,.true. ) + cpatch%qmsqu_vapor_wc (t,recc) = fuse_msqu(cpatch%qmean_vapor_wc (t,recc) & + ,cpatch%qmsqu_vapor_wc (t,recc) & + ,cpatch%nplant (recc) & + ,cpatch%qmean_vapor_wc (t,donc) & + ,cpatch%qmsqu_vapor_wc (t,donc) & + ,cpatch%nplant (donc) & + ,corr_cohort,.true. ) + !------------------------------------------------------------------------------! + end do + !---------------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------------! + ! Intensive variables, scaled by plant density. ! + !---------------------------------------------------------------------------------! + cpatch%qmean_gpp (:,recc) = ( cpatch%qmean_gpp (:,recc) & + * cpatch%nplant (recc) & + + cpatch%qmean_gpp (:,donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%qmean_npp (:,recc) = ( cpatch%qmean_npp (:,recc) & + * cpatch%nplant (recc) & + + cpatch%qmean_npp (:,donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%qmean_leaf_resp (:,recc) = ( cpatch%qmean_leaf_resp (:,recc) & + * cpatch%nplant (recc) & + + cpatch%qmean_leaf_resp (:,donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%qmean_root_resp (:,recc) = ( cpatch%qmean_root_resp (:,recc) & + * cpatch%nplant (recc) & + + cpatch%qmean_root_resp (:,donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%qmean_growth_resp (:,recc) = ( cpatch%qmean_growth_resp (:,recc) & + * cpatch%nplant (recc) & + + cpatch%qmean_growth_resp (:,donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%qmean_storage_resp (:,recc) = ( cpatch%qmean_storage_resp (:,recc) & + * cpatch%nplant (recc) & + + cpatch%qmean_storage_resp (:,donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%qmean_vleaf_resp (:,recc) = ( cpatch%qmean_vleaf_resp (:,recc) & + * cpatch%nplant (recc) & + + cpatch%qmean_vleaf_resp (:,donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%qmean_plresp (:,recc) = ( cpatch%qmean_plresp (:,recc) & + * cpatch%nplant (recc) & + + cpatch%qmean_plresp (:,donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%qmean_light_level (:,recc) = ( cpatch%qmean_light_level (:,recc) & + * cpatch%nplant (recc) & + + cpatch%qmean_light_level (:,donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%qmean_light_level_beam(:,recc) = ( cpatch%qmean_light_level_beam(:,recc) & + * cpatch%nplant (recc) & + + cpatch%qmean_light_level_beam(:,donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%qmean_light_level_diff(:,recc) = ( cpatch%qmean_light_level_diff(:,recc) & + * cpatch%nplant (recc) & + + cpatch%qmean_light_level_diff(:,donc) & + * cpatch%nplant (donc) ) & + * newni + !---------------------------------------------------------------------------------! + + + + + !---------------------------------------------------------------------------------! + ! Intensive variables, scaled by LAI. ! + !---------------------------------------------------------------------------------! + cpatch%qmean_leaf_gsw (:,recc) = ( cpatch%qmean_leaf_gsw (:,recc) & + * cpatch%lai (recc) & + + cpatch%qmean_leaf_gsw (:,donc) & + * cpatch%lai (donc) ) & + * newlaii + cpatch%qmean_leaf_gbw (:,recc) = ( cpatch%qmean_leaf_gbw (:,recc) & + * cpatch%lai (recc) & + + cpatch%qmean_leaf_gbw (:,donc) & + * cpatch%lai (donc) ) & + * newlaii + cpatch%qmean_fs_open (:,recc) = ( cpatch%qmean_fs_open (:,recc) & + * cpatch%lai (recc) & + + cpatch%qmean_fs_open (:,donc) & + * cpatch%lai (donc) ) & + * newlaii + cpatch%qmean_fsw (:,recc) = ( cpatch%qmean_fsw (:,recc) & + * cpatch%lai (recc) & + + cpatch%qmean_fsw (:,donc) & + * cpatch%lai (donc) ) & + * newlaii + cpatch%qmean_fsn (:,recc) = ( cpatch%qmean_fsn (:,recc) & + * cpatch%lai (recc) & + + cpatch%qmean_fsn (:,donc) & + * cpatch%lai (donc) ) & + * newlaii + cpatch%qmean_psi_open (:,recc) = ( cpatch%qmean_psi_open (:,recc) & + * cpatch%lai (recc) & + + cpatch%qmean_psi_open (:,donc) & + * cpatch%lai (donc) ) & + * newlaii + cpatch%qmean_psi_closed (:,recc) = ( cpatch%qmean_psi_closed (:,recc) & + * cpatch%lai (recc) & + + cpatch%qmean_psi_closed (:,donc) & + * cpatch%lai (donc) ) & + * newlaii + !---------------------------------------------------------------------------------! + + + + + !---------------------------------------------------------------------------------! + ! Intensive variables, scaled by WAI. ! + !---------------------------------------------------------------------------------! + cpatch%qmean_wood_gbw (:,recc) = ( cpatch%qmean_wood_gbw (:,recc) & + * cpatch%wai (recc) & + + cpatch%qmean_wood_gbw (:,donc) & + * cpatch%wai (donc) ) & + * newwaii + !---------------------------------------------------------------------------------! + + + + + !---------------------------------------------------------------------------------! + ! Extensive variables. ! + !---------------------------------------------------------------------------------! + cpatch%qmean_leaf_energy (:,recc) = cpatch%qmean_leaf_energy (:,recc) & + + cpatch%qmean_leaf_energy (:,donc) + cpatch%qmean_leaf_water (:,recc) = cpatch%qmean_leaf_water (:,recc) & + + cpatch%qmean_leaf_water (:,donc) + cpatch%qmean_leaf_hcap (:,recc) = cpatch%qmean_leaf_hcap (:,recc) & + + cpatch%qmean_leaf_hcap (:,donc) + cpatch%qmean_wood_energy (:,recc) = cpatch%qmean_wood_energy (:,recc) & + + cpatch%qmean_wood_energy (:,donc) + cpatch%qmean_wood_water (:,recc) = cpatch%qmean_wood_water (:,recc) & + + cpatch%qmean_wood_water (:,donc) + cpatch%qmean_wood_hcap (:,recc) = cpatch%qmean_wood_hcap (:,recc) & + + cpatch%qmean_wood_hcap (:,donc) + cpatch%qmean_water_supply (:,recc) = cpatch%qmean_water_supply (:,recc) & + + cpatch%qmean_water_supply (:,donc) + cpatch%qmean_par_l (:,recc) = cpatch%qmean_par_l (:,recc) & + + cpatch%qmean_par_l (:,donc) + cpatch%qmean_par_l_beam (:,recc) = cpatch%qmean_par_l_beam (:,recc) & + + cpatch%qmean_par_l_beam (:,donc) + cpatch%qmean_par_l_diff (:,recc) = cpatch%qmean_par_l_diff (:,recc) & + + cpatch%qmean_par_l_diff (:,donc) + cpatch%qmean_rshort_l (:,recc) = cpatch%qmean_rshort_l (:,recc) & + + cpatch%qmean_rshort_l (:,donc) + cpatch%qmean_rlong_l (:,recc) = cpatch%qmean_rlong_l (:,recc) & + + cpatch%qmean_rlong_l (:,donc) + cpatch%qmean_sensible_lc (:,recc) = cpatch%qmean_sensible_lc (:,recc) & + + cpatch%qmean_sensible_lc (:,donc) + cpatch%qmean_vapor_lc (:,recc) = cpatch%qmean_vapor_lc (:,recc) & + + cpatch%qmean_vapor_lc (:,donc) + cpatch%qmean_transp (:,recc) = cpatch%qmean_transp (:,recc) & + + cpatch%qmean_transp (:,donc) + cpatch%qmean_intercepted_al(:,recc) = cpatch%qmean_intercepted_al(:,recc) & + + cpatch%qmean_intercepted_al(:,donc) + cpatch%qmean_wshed_lg (:,recc) = cpatch%qmean_wshed_lg (:,recc) & + + cpatch%qmean_wshed_lg (:,donc) + cpatch%qmean_rshort_w (:,recc) = cpatch%qmean_rshort_w (:,recc) & + + cpatch%qmean_rshort_w (:,donc) + cpatch%qmean_rlong_w (:,recc) = cpatch%qmean_rlong_w (:,recc) & + + cpatch%qmean_rlong_w (:,donc) + cpatch%qmean_sensible_wc (:,recc) = cpatch%qmean_sensible_wc (:,recc) & + + cpatch%qmean_sensible_wc (:,donc) + cpatch%qmean_vapor_wc (:,recc) = cpatch%qmean_vapor_wc (:,recc) & + + cpatch%qmean_vapor_wc (:,donc) + cpatch%qmean_intercepted_aw(:,recc) = cpatch%qmean_intercepted_aw(:,recc) & + + cpatch%qmean_intercepted_aw(:,donc) + cpatch%qmean_wshed_wg (:,recc) = cpatch%qmean_wshed_wg (:,recc) & + + cpatch%qmean_wshed_wg (:,donc) + !---------------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------------! + ! We update temperature and liquid water fraction. We check whether the ! + ! heat capacity is non-zero. If it is a normal number, use the standard thermo- ! + ! dynamic library, otherwise, average temperature, this is probably a blend of ! + ! tiny cohorts that couldn't be solved, or the wood is not solved. ! + !---------------------------------------------------------------------------------! + do t=1,ndcycle + !------ Leaf. -----------------------------------------------------------------! + if ( cpatch%qmean_leaf_hcap(t,recc) > 0. ) then + !----- Update temperature and liquid fraction. -----------------------------! + call uextcm2tl(cpatch%qmean_leaf_energy(t,recc) & + ,cpatch%qmean_leaf_water (t,recc) & + ,cpatch%qmean_leaf_hcap (t,recc) & + ,cpatch%qmean_leaf_temp (t,recc) & + ,cpatch%qmean_leaf_fliq (t,recc)) + !---------------------------------------------------------------------------! + + + !----- Scale vapour pressure deficit using LAI. ----------------------------! + cpatch%qmean_leaf_vpdef (t,recc) = ( cpatch%qmean_leaf_vpdef (t,recc) & + * cpatch%lai (recc) & + + cpatch%qmean_leaf_vpdef (t,donc) & + * cpatch%lai (donc) ) & + * newlaii + !---------------------------------------------------------------------------! + else + !----- None of the cohorts has leaf biomass use nplant to scale them. ------! + cpatch%qmean_leaf_temp (t,recc) = ( cpatch%qmean_leaf_temp (t,recc) & + * cpatch%nplant (recc) & + + cpatch%qmean_leaf_temp (t,donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%qmean_leaf_fliq (t,recc) = 0.0 + cpatch%qmean_leaf_vpdef(t,recc) = ( cpatch%qmean_leaf_vpdef(t,recc) & + * cpatch%nplant (recc) & + + cpatch%qmean_leaf_vpdef(t,donc) & + * cpatch%nplant (donc) ) & + * newni + !---------------------------------------------------------------------------! + end if + !------ Wood. -----------------------------------------------------------------! + if ( cpatch%qmean_wood_hcap(t,recc) > 0. ) then + !----- Update temperature and liquid fraction. -----------------------------! + call uextcm2tl(cpatch%qmean_wood_energy(t,recc) & + ,cpatch%qmean_wood_water (t,recc) & + ,cpatch%qmean_wood_hcap (t,recc) & + ,cpatch%qmean_wood_temp (t,recc) & + ,cpatch%qmean_wood_fliq (t,recc)) + !---------------------------------------------------------------------------! + else + !----- None of the cohorts has leaf biomass use nplant to scale them. ------! + cpatch%qmean_wood_temp (t,recc) = ( cpatch%qmean_wood_temp (t,recc) & + * cpatch%nplant (recc) & + + cpatch%qmean_wood_temp (t,donc) & + * cpatch%nplant (donc) ) & + * newni + cpatch%qmean_wood_fliq (t,recc) = 0.0 + !---------------------------------------------------------------------------! + end if + !------------------------------------------------------------------------------! + end do + !---------------------------------------------------------------------------------! + end if !------------------------------------------------------------------------------------! - ! LAI must be zero if phenology status is 2. This is probably done correctly ! - ! throughout the code, but being safe here. ! + + + + !------------------------------------------------------------------------------------! + ! Lastly, we update nplant, LAI, WAI, and crown area. They may be used as ! + ! weighting factors so we leave them to the end. ! !------------------------------------------------------------------------------------! - cpatch%lai(recc) = cpatch%lai(recc) + cpatch%lai(donc) + cpatch%nplant (recc) = cpatch%nplant(recc) + cpatch%nplant(donc) + cpatch%lai (recc) = cpatch%lai (recc) + cpatch%lai (donc) + cpatch%wai (recc) = cpatch%wai (recc) + cpatch%wai (donc) + !----- Make sure that crown area is bounded. ----------------------------------------! + cpatch%crown_area (recc) = min(1.,cpatch%crown_area(recc) + cpatch%crown_area(donc)) !------------------------------------------------------------------------------------! return @@ -3040,16 +3887,24 @@ subroutine fuse_2_patches(csite,donp,recp,mzg,mzs,prss,lsl,ntext_soil,green_leaf ,elim_nplant,elim_lai) use ed_state_vars , only : sitetype & ! Structure , patchtype ! ! Structure - use soil_coms , only : soil ! ! intent(in), lookup table + use soil_coms , only : soil & ! intent(in), lookup table + , tiny_sfcwater_mass & ! intent(in) + , matric_potential ! ! intent(in) use ed_max_dims , only : n_pft & ! intent(in) , n_dbh ! ! intent(in) use mem_polygons , only : maxcohort ! ! intent(in) - use therm_lib , only : uextcm2tl ! ! function - use ed_misc_coms , only : iqoutput & ! intent(in) - , idoutput & ! intent(in) - , imoutput & ! intent(in) + use therm_lib , only : uextcm2tl & ! subroutine + , uint2tl & ! subroutine + , idealdenssh & ! function + , press2exner & ! function + , extheta2temp ! ! function + use ed_misc_coms , only : writing_long & ! intent(in) + , writing_eorq & ! intent(in) + , writing_dcyc & ! intent(in) , ndcycle ! ! intent(in) use budget_utils , only : update_budget ! ! intent(in) + use consts_coms , only : wdns ! ! intent(in) + use fusion_fission_coms, only : corr_patch ! ! intent(in) implicit none !----- Arguments --------------------------------------------------------------------! type(sitetype) , target :: csite ! Current site @@ -3066,9 +3921,12 @@ subroutine fuse_2_patches(csite,donp,recp,mzg,mzs,prss,lsl,ntext_soil,green_leaf !----- Local variables --------------------------------------------------------------! type(patchtype) , pointer :: cpatch ! Current patch type(patchtype) , pointer :: temppatch ! Temporary patch - integer :: ico,iii,icyc ! Counters + integer :: ico,iii ! Counters + integer :: nsoil ! Alias for soil texture + integer :: t ! Counter for time of day integer :: ndc ! # of cohorts - donp patch integer :: nrc ! # of cohorts - recp patch + real :: can_exner ! Exner function - CAS real :: newarea ! new patch area real :: newareai ! 1./(new patch area) real :: area_scale ! Cohort rescaling factor. @@ -3181,11 +4039,11 @@ subroutine fuse_2_patches(csite,donp,recp,mzg,mzs,prss,lsl,ntext_soil,green_leaf !----- 1. Find the "extensive" sfcwater_energy (convert from J/kg to J/m2); ---------! do iii=1,csite%nlev_sfcwater(recp) csite%sfcwater_energy(iii,recp) = csite%sfcwater_energy(iii,recp) & - * csite%sfcwater_mass(iii,recp) + * csite%sfcwater_mass (iii,recp) end do do iii=1,csite%nlev_sfcwater(donp) csite%sfcwater_energy(iii,donp) = csite%sfcwater_energy(iii,donp) & - * csite%sfcwater_mass(iii,donp) + * csite%sfcwater_mass (iii,donp) end do !------------------------------------------------------------------------------------! ! 2. Squeeze all layers into one. If needed, the layer will be split again next ! @@ -3292,13 +4150,6 @@ subroutine fuse_2_patches(csite,donp,recp,mzg,mzs,prss,lsl,ntext_soil,green_leaf call new_patch_sfc_props(csite,recp,mzg,mzs,ntext_soil) !------------------------------------------------------------------------------------! - csite%mean_rh(recp) = newareai * & - ( csite%mean_rh(donp) * csite%area(donp) & - + csite%mean_rh(recp) * csite%area(recp) ) - csite%mean_cwd_rh(recp) = newareai * & - ( csite%mean_cwd_rh(donp) * csite%area(donp) & - + csite%mean_cwd_rh(recp) * csite%area(recp) ) - csite%today_A_decomp(recp) = newareai * & ( csite%today_A_decomp(donp) * csite%area(donp) & + csite%today_A_decomp(recp) * csite%area(recp) ) @@ -3312,387 +4163,1671 @@ subroutine fuse_2_patches(csite,donp,recp,mzg,mzs,prss,lsl,ntext_soil,green_leaf ( csite%repro(iii,donp) * csite%area(donp) & + csite%repro(iii,recp) * csite%area(recp) ) end do - !------------------------------------------------------------------------------------! - ! Even though these variables are not prognostic, they need to be copied so the ! - ! output will have the values. Other variables will probably be scaled here as ! - ! well. ! - !------------------------------------------------------------------------------------! - csite%avg_ustar (recp) = newareai * & - ( csite%avg_ustar (donp)* csite%area(donp) & - + csite%avg_ustar (recp)* csite%area(recp) ) - - csite%avg_tstar (recp) = newareai * & - ( csite%avg_tstar (donp)* csite%area(donp) & - + csite%avg_tstar (recp)* csite%area(recp) ) - - csite%avg_qstar (recp) = newareai * & - ( csite%avg_qstar (donp)* csite%area(donp) & - + csite%avg_qstar (recp)* csite%area(recp) ) - - csite%avg_cstar (recp) = newareai * & - ( csite%avg_cstar (donp)* csite%area(donp) & - + csite%avg_cstar (recp)* csite%area(recp) ) - - csite%avg_rshort_gnd(recp) = newareai * & - ( csite%avg_rshort_gnd (donp)* csite%area(donp) & - + csite%avg_rshort_gnd (recp)* csite%area(recp) ) - - csite%avg_par_gnd (recp) = newareai * & - ( csite%avg_par_gnd (donp)* csite%area(donp) & - + csite%avg_par_gnd (recp)* csite%area(recp) ) - - csite%avg_rlong_gnd(recp) = newareai * & - ( csite%avg_rlong_gnd (donp)* csite%area(donp) & - + csite%avg_rlong_gnd (recp)* csite%area(recp) ) - csite%avg_carbon_ac(recp) = newareai * & - ( csite%avg_carbon_ac (donp)* csite%area(donp) & - + csite%avg_carbon_ac (recp)* csite%area(recp) ) - csite%avg_carbon_st(recp) = newareai * & - ( csite%avg_carbon_st (donp)* csite%area(donp) & - + csite%avg_carbon_st (recp)* csite%area(recp) ) - csite%avg_vapor_lc(recp) = newareai * & - ( csite%avg_vapor_lc (donp)* csite%area(donp) & - + csite%avg_vapor_lc (recp)* csite%area(recp) ) - csite%avg_vapor_wc(recp) = newareai * & - ( csite%avg_vapor_wc (donp)* csite%area(donp) & - + csite%avg_vapor_wc (recp)* csite%area(recp) ) - csite%avg_vapor_gc(recp) = newareai * & - ( csite%avg_vapor_gc (donp)* csite%area(donp) & - + csite%avg_vapor_gc (recp)* csite%area(recp) ) - - csite%avg_wshed_vg(recp) = newareai * & - ( csite%avg_wshed_vg (donp)* csite%area(donp) & - + csite%avg_wshed_vg (recp)* csite%area(recp) ) - - csite%avg_intercepted(recp) = newareai * & - ( csite%avg_intercepted (donp)* csite%area(donp) & - + csite%avg_intercepted (recp)* csite%area(donp) ) - - csite%avg_throughfall(recp) = newareai * & - ( csite%avg_throughfall (donp)* csite%area(donp) & - + csite%avg_throughfall (recp)* csite%area(donp) ) - - csite%avg_vapor_ac(recp) = newareai * & - ( csite%avg_vapor_ac (donp)* csite%area(donp) & - + csite%avg_vapor_ac (recp)* csite%area(recp) ) - - csite%avg_transp(recp) = newareai * & - ( csite%avg_transp (donp)* csite%area(donp) & - + csite%avg_transp (recp)* csite%area(recp) ) - - csite%avg_evap(recp) = newareai * & - ( csite%avg_evap (donp)* csite%area(donp) & - + csite%avg_evap (recp)* csite%area(recp) ) - - csite%avg_runoff(recp) = newareai * & - ( csite%avg_runoff (donp)* csite%area(donp) & - + csite%avg_runoff (recp)* csite%area(recp) ) + !------------------------------------------------------------------------------------! + ! Budget variables. ! + !------------------------------------------------------------------------------------! + csite%co2budget_residual (recp) = ( csite%co2budget_residual (recp) & + * csite%area (recp) & + + csite%co2budget_residual (donp) & + * csite%area (donp) ) & + * newareai + csite%co2budget_loss2atm (recp) = ( csite%co2budget_loss2atm (recp) & + * csite%area (recp) & + + csite%co2budget_loss2atm (donp) & + * csite%area (donp) ) & + * newareai + csite%co2budget_denseffect (recp) = ( csite%co2budget_denseffect (recp) & + * csite%area (recp) & + + csite%co2budget_denseffect (donp) & + * csite%area (donp) ) & + * newareai + csite%co2budget_gpp (recp) = ( csite%co2budget_gpp (recp) & + * csite%area (recp) & + + csite%co2budget_gpp (donp) & + * csite%area (donp) ) & + * newareai + csite%co2budget_plresp (recp) = ( csite%co2budget_plresp (recp) & + * csite%area (recp) & + + csite%co2budget_plresp (donp) & + * csite%area (donp) ) & + * newareai + csite%co2budget_rh (recp) = ( csite%co2budget_rh (recp) & + * csite%area (recp) & + + csite%co2budget_rh (donp) & + * csite%area (donp) ) & + * newareai + csite%ebudget_residual (recp) = ( csite%ebudget_residual (recp) & + * csite%area (recp) & + + csite%ebudget_residual (donp) & + * csite%area (donp) ) & + * newareai + csite%ebudget_netrad (recp) = ( csite%ebudget_netrad (recp) & + * csite%area (recp) & + + csite%ebudget_netrad (donp) & + * csite%area (donp) ) & + * newareai + csite%ebudget_loss2atm (recp) = ( csite%ebudget_loss2atm (recp) & + * csite%area (recp) & + + csite%ebudget_loss2atm (donp) & + * csite%area (donp) ) & + * newareai + csite%ebudget_denseffect (recp) = ( csite%ebudget_denseffect (recp) & + * csite%area (recp) & + + csite%ebudget_denseffect (donp) & + * csite%area (donp) ) & + * newareai + csite%ebudget_prsseffect (recp) = ( csite%ebudget_prsseffect (recp) & + * csite%area (recp) & + + csite%ebudget_prsseffect (donp) & + * csite%area (donp) ) & + * newareai + csite%ebudget_loss2runoff (recp) = ( csite%ebudget_loss2runoff (recp) & + * csite%area (recp) & + + csite%ebudget_loss2runoff (donp) & + * csite%area (donp) ) & + * newareai + csite%ebudget_loss2drainage (recp) = ( csite%ebudget_loss2drainage (recp) & + * csite%area (recp) & + + csite%ebudget_loss2drainage (donp) & + * csite%area (donp) ) & + * newareai + csite%ebudget_precipgain (recp) = ( csite%ebudget_precipgain (recp) & + * csite%area (recp) & + + csite%ebudget_precipgain (donp) & + * csite%area (donp) ) & + * newareai + csite%wbudget_residual (recp) = ( csite%wbudget_residual (recp) & + * csite%area (recp) & + + csite%wbudget_residual (donp) & + * csite%area (donp) ) & + * newareai + csite%wbudget_loss2atm (recp) = ( csite%wbudget_loss2atm (recp) & + * csite%area (recp) & + + csite%wbudget_loss2atm (donp) & + * csite%area (donp) ) & + * newareai + csite%wbudget_denseffect (recp) = ( csite%wbudget_denseffect (recp) & + * csite%area (recp) & + + csite%wbudget_denseffect (donp) & + * csite%area (donp) ) & + * newareai + csite%wbudget_loss2runoff (recp) = ( csite%wbudget_loss2runoff (recp) & + * csite%area (recp) & + + csite%wbudget_loss2runoff (donp) & + * csite%area (donp) ) & + * newareai + csite%wbudget_loss2drainage (recp) = ( csite%wbudget_loss2drainage (recp) & + * csite%area (recp) & + + csite%wbudget_loss2drainage (donp) & + * csite%area (donp) ) & + * newareai + csite%wbudget_precipgain (recp) = ( csite%wbudget_precipgain (recp) & + * csite%area (recp) & + + csite%wbudget_precipgain (donp) & + * csite%area (donp) ) & + * newareai + !------------------------------------------------------------------------------------! - csite%avg_drainage(recp) = newareai * & - ( csite%avg_drainage (donp)* csite%area(donp) & - + csite%avg_drainage (recp)* csite%area(recp) ) - csite%avg_sensible_lc(recp) = newareai * & - ( csite%avg_sensible_lc (donp)* csite%area(donp) & - + csite%avg_sensible_lc (recp)* csite%area(recp) ) - csite%avg_sensible_wc(recp) = newareai * & - ( csite%avg_sensible_wc (donp)* csite%area(donp) & - + csite%avg_sensible_wc (recp)* csite%area(recp) ) - csite%avg_qwshed_vg(recp) = newareai * & - ( csite%avg_qwshed_vg (donp)* csite%area(donp) & - + csite%avg_qwshed_vg (recp)* csite%area(recp) ) + !------------------------------------------------------------------------------------! + ! Sub-daily means. ! + !------------------------------------------------------------------------------------! + csite%fmean_rh (recp) = ( csite%fmean_rh (recp) & + * csite%area (recp) & + + csite%fmean_rh (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_cwd_rh (recp) = ( csite%fmean_cwd_rh (recp) & + * csite%area (recp) & + + csite%fmean_cwd_rh (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_nep (recp) = ( csite%fmean_nep (recp) & + * csite%area (recp) & + + csite%fmean_nep (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_rk4step (recp) = ( csite%fmean_rk4step (recp) & + * csite%area (recp) & + + csite%fmean_rk4step (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_available_water (recp) = ( csite%fmean_available_water (recp) & + * csite%area (recp) & + + csite%fmean_available_water (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_can_theiv (recp) = ( csite%fmean_can_theiv (recp) & + * csite%area (recp) & + + csite%fmean_can_theiv (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_can_theta (recp) = ( csite%fmean_can_theta (recp) & + * csite%area (recp) & + + csite%fmean_can_theta (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_can_vpdef (recp) = ( csite%fmean_can_vpdef (recp) & + * csite%area (recp) & + + csite%fmean_can_vpdef (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_can_shv (recp) = ( csite%fmean_can_shv (recp) & + * csite%area (recp) & + + csite%fmean_can_shv (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_can_co2 (recp) = ( csite%fmean_can_co2 (recp) & + * csite%area (recp) & + + csite%fmean_can_co2 (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_can_prss (recp) = ( csite%fmean_can_prss (recp) & + * csite%area (recp) & + + csite%fmean_can_prss (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_gnd_temp (recp) = ( csite%fmean_gnd_temp (recp) & + * csite%area (recp) & + + csite%fmean_gnd_temp (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_gnd_shv (recp) = ( csite%fmean_gnd_shv (recp) & + * csite%area (recp) & + + csite%fmean_gnd_shv (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_can_ggnd (recp) = ( csite%fmean_can_ggnd (recp) & + * csite%area (recp) & + + csite%fmean_can_ggnd (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_rshort_gnd (recp) = ( csite%fmean_rshort_gnd (recp) & + * csite%area (recp) & + + csite%fmean_rshort_gnd (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_par_gnd (recp) = ( csite%fmean_par_gnd (recp) & + * csite%area (recp) & + + csite%fmean_par_gnd (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_rlong_gnd (recp) = ( csite%fmean_rlong_gnd (recp) & + * csite%area (recp) & + + csite%fmean_rlong_gnd (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_rlongup (recp) = ( csite%fmean_rlongup (recp) & + * csite%area (recp) & + + csite%fmean_rlongup (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_parup (recp) = ( csite%fmean_parup (recp) & + * csite%area (recp) & + + csite%fmean_parup (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_nirup (recp) = ( csite%fmean_nirup (recp) & + * csite%area (recp) & + + csite%fmean_nirup (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_rshortup (recp) = ( csite%fmean_rshortup (recp) & + * csite%area (recp) & + + csite%fmean_rshortup (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_rnet (recp) = ( csite%fmean_rnet (recp) & + * csite%area (recp) & + + csite%fmean_rnet (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_albedo (recp) = ( csite%fmean_albedo (recp) & + * csite%area (recp) & + + csite%fmean_albedo (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_albedo_beam (recp) = ( csite%fmean_albedo_beam (recp) & + * csite%area (recp) & + + csite%fmean_albedo_beam (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_albedo_diff (recp) = ( csite%fmean_albedo_diff (recp) & + * csite%area (recp) & + + csite%fmean_albedo_diff (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_rlong_albedo (recp) = ( csite%fmean_rlong_albedo (recp) & + * csite%area (recp) & + + csite%fmean_rlong_albedo (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_ustar (recp) = ( csite%fmean_ustar (recp) & + * csite%area (recp) & + + csite%fmean_ustar (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_tstar (recp) = ( csite%fmean_tstar (recp) & + * csite%area (recp) & + + csite%fmean_tstar (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_qstar (recp) = ( csite%fmean_qstar (recp) & + * csite%area (recp) & + + csite%fmean_qstar (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_cstar (recp) = ( csite%fmean_cstar (recp) & + * csite%area (recp) & + + csite%fmean_cstar (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_carbon_ac (recp) = ( csite%fmean_carbon_ac (recp) & + * csite%area (recp) & + + csite%fmean_carbon_ac (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_carbon_st (recp) = ( csite%fmean_carbon_st (recp) & + * csite%area (recp) & + + csite%fmean_carbon_st (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_vapor_gc (recp) = ( csite%fmean_vapor_gc (recp) & + * csite%area (recp) & + + csite%fmean_vapor_gc (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_vapor_ac (recp) = ( csite%fmean_vapor_ac (recp) & + * csite%area (recp) & + + csite%fmean_vapor_ac (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_throughfall (recp) = ( csite%fmean_throughfall (recp) & + * csite%area (recp) & + + csite%fmean_throughfall (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_runoff (recp) = ( csite%fmean_runoff (recp) & + * csite%area (recp) & + + csite%fmean_runoff (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_drainage (recp) = ( csite%fmean_drainage (recp) & + * csite%area (recp) & + + csite%fmean_drainage (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_sensible_gc (recp) = ( csite%fmean_sensible_gc (recp) & + * csite%area (recp) & + + csite%fmean_sensible_gc (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_sensible_ac (recp) = ( csite%fmean_sensible_ac (recp) & + * csite%area (recp) & + + csite%fmean_sensible_ac (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_qthroughfall (recp) = ( csite%fmean_qthroughfall (recp) & + * csite%area (recp) & + + csite%fmean_qthroughfall (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_qrunoff (recp) = ( csite%fmean_qrunoff (recp) & + * csite%area (recp) & + + csite%fmean_qrunoff (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_qdrainage (recp) = ( csite%fmean_qdrainage (recp) & + * csite%area (recp) & + + csite%fmean_qdrainage (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_soil_energy (:,recp) = ( csite%fmean_soil_energy (:,recp) & + * csite%area (recp) & + + csite%fmean_soil_energy (:,donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_soil_water (:,recp) = ( csite%fmean_soil_water (:,recp) & + * csite%area (recp) & + + csite%fmean_soil_water (:,donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_smoist_gg (:,recp) = ( csite%fmean_smoist_gg (:,recp) & + * csite%area (recp) & + + csite%fmean_smoist_gg (:,donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_transloss (:,recp) = ( csite%fmean_transloss (:,recp) & + * csite%area (recp) & + + csite%fmean_transloss (:,donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_sensible_gg (:,recp) = ( csite%fmean_sensible_gg (:,recp) & + * csite%area (recp) & + + csite%fmean_sensible_gg (:,donp) & + * csite%area (donp) ) & + * newareai + !------------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------------! + ! Now we find the derived properties for the canopy air space. ! + !------------------------------------------------------------------------------------! + can_exner = press2exner (csite%fmean_can_prss(recp)) + csite%fmean_can_temp (recp) = extheta2temp(can_exner,csite%fmean_can_theta (recp)) + csite%fmean_can_rhos (recp) = idealdenssh ( csite%fmean_can_prss (recp) & + , csite%fmean_can_temp (recp) & + , csite%fmean_can_shv (recp) ) + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + ! Find the soil mean temperature, liquid water fraction, and matric ! + ! potential. ! + !------------------------------------------------------------------------------------! + do iii=lsl,mzg + nsoil = ntext_soil(iii) + call uextcm2tl( csite%fmean_soil_energy(iii,recp) & + , csite%fmean_soil_water (iii,recp) * wdns & + , soil(nsoil)%slcpd & + , csite%fmean_soil_temp (iii,recp) & + , csite%fmean_soil_fliq (iii,recp)) + + csite%fmean_soil_mstpot(iii,recp) = & + matric_potential(nsoil,csite%fmean_soil_water (iii,recp)) + end do + !------------------------------------------------------------------------------------! - csite%avg_qintercepted(recp) = newareai * & - ( csite%avg_qintercepted (donp)* csite%area(donp) & - + csite%avg_qintercepted (recp)* csite%area(donp) ) - csite%avg_qthroughfall(recp) = newareai * & - ( csite%avg_qthroughfall (donp)* csite%area(donp) & - + csite%avg_qthroughfall (recp)* csite%area(donp) ) + !------------------------------------------------------------------------------------! + ! Find the temporary surface water properties. They may not be available at all ! + ! times, so we must check. ! + !------------------------------------------------------------------------------------! + !----- Temporarily make energy extensive [J/m2]. ------------------------------------! + csite%fmean_sfcw_depth (recp) = ( csite%fmean_sfcw_depth (recp) & + * csite%area (recp) & + + csite%fmean_sfcw_depth (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_sfcw_energy (recp) = ( csite%fmean_sfcw_energy (recp) & + * csite%fmean_sfcw_mass (recp) & + * csite%area (recp) & + + csite%fmean_sfcw_energy (donp) & + * csite%fmean_sfcw_mass (donp) & + * csite%area (donp) ) & + * newareai + csite%fmean_sfcw_mass (recp) = ( csite%fmean_sfcw_mass (recp) & + * csite%area (recp) & + + csite%fmean_sfcw_mass (donp) & + * csite%area (donp) ) & + * newareai + !----- Check whether there is enough surface water. ---------------------------------! + if (csite%fmean_sfcw_mass(recp) > tiny_sfcwater_mass) then + csite%fmean_sfcw_energy (recp) = csite%fmean_sfcw_energy (recp) & + / csite%fmean_sfcw_mass (recp) + call uint2tl( csite%fmean_sfcw_energy(recp) & + , csite%fmean_sfcw_temp (recp) & + , csite%fmean_sfcw_fliq (recp) ) + else + csite%fmean_sfcw_mass (recp) = 0. + csite%fmean_sfcw_depth (recp) = 0. + csite%fmean_sfcw_energy(recp) = 0. + csite%fmean_sfcw_temp (recp) = csite%fmean_soil_temp(mzg,recp) + csite%fmean_sfcw_fliq (recp) = csite%fmean_soil_fliq(mzg,recp) + end if + !------------------------------------------------------------------------------------! - csite%avg_sensible_gc(recp) = newareai * & - ( csite%avg_sensible_gc (donp)* csite%area(donp) & - + csite%avg_sensible_gc (recp)* csite%area(recp) ) - csite%avg_sensible_ac(recp) = newareai * & - ( csite%avg_sensible_ac (donp)* csite%area(donp) & - + csite%avg_sensible_ac (recp)* csite%area(recp) ) - csite%avg_runoff_heat(recp) = newareai * & - ( csite%avg_runoff_heat (donp)* csite%area(donp) & - + csite%avg_runoff_heat (recp)* csite%area(recp) ) - csite%avg_drainage_heat(recp) = newareai * & - ( csite%avg_drainage_heat (donp)* csite%area(donp) & - + csite%avg_drainage_heat (recp)* csite%area(recp) ) + !------------------------------------------------------------------------------------! + ! Daily means. ! + !------------------------------------------------------------------------------------! + if (writing_long) then + csite%dmean_A_decomp (recp) = ( csite%dmean_A_decomp (recp) & + * csite%area (recp) & + + csite%dmean_A_decomp (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_Af_decomp (recp) = ( csite%dmean_Af_decomp (recp) & + * csite%area (recp) & + + csite%dmean_Af_decomp (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_co2_residual (recp) = ( csite%dmean_co2_residual (recp) & + * csite%area (recp) & + + csite%dmean_co2_residual (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_energy_residual (recp) = ( csite%dmean_energy_residual (recp) & + * csite%area (recp) & + + csite%dmean_energy_residual (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_water_residual (recp) = ( csite%dmean_water_residual (recp) & + * csite%area (recp) & + + csite%dmean_water_residual (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_rh (recp) = ( csite%dmean_rh (recp) & + * csite%area (recp) & + + csite%dmean_rh (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_cwd_rh (recp) = ( csite%dmean_cwd_rh (recp) & + * csite%area (recp) & + + csite%dmean_cwd_rh (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_nep (recp) = ( csite%dmean_nep (recp) & + * csite%area (recp) & + + csite%dmean_nep (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_rk4step (recp) = ( csite%dmean_rk4step (recp) & + * csite%area (recp) & + + csite%dmean_rk4step (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_available_water (recp) = ( csite%dmean_available_water (recp) & + * csite%area (recp) & + + csite%dmean_available_water (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_can_theiv (recp) = ( csite%dmean_can_theiv (recp) & + * csite%area (recp) & + + csite%dmean_can_theiv (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_can_theta (recp) = ( csite%dmean_can_theta (recp) & + * csite%area (recp) & + + csite%dmean_can_theta (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_can_vpdef (recp) = ( csite%dmean_can_vpdef (recp) & + * csite%area (recp) & + + csite%dmean_can_vpdef (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_can_shv (recp) = ( csite%dmean_can_shv (recp) & + * csite%area (recp) & + + csite%dmean_can_shv (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_can_co2 (recp) = ( csite%dmean_can_co2 (recp) & + * csite%area (recp) & + + csite%dmean_can_co2 (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_can_prss (recp) = ( csite%dmean_can_prss (recp) & + * csite%area (recp) & + + csite%dmean_can_prss (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_gnd_temp (recp) = ( csite%dmean_gnd_temp (recp) & + * csite%area (recp) & + + csite%dmean_gnd_temp (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_gnd_shv (recp) = ( csite%dmean_gnd_shv (recp) & + * csite%area (recp) & + + csite%dmean_gnd_shv (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_can_ggnd (recp) = ( csite%dmean_can_ggnd (recp) & + * csite%area (recp) & + + csite%dmean_can_ggnd (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_rshort_gnd (recp) = ( csite%dmean_rshort_gnd (recp) & + * csite%area (recp) & + + csite%dmean_rshort_gnd (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_par_gnd (recp) = ( csite%dmean_par_gnd (recp) & + * csite%area (recp) & + + csite%dmean_par_gnd (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_rlong_gnd (recp) = ( csite%dmean_rlong_gnd (recp) & + * csite%area (recp) & + + csite%dmean_rlong_gnd (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_rlongup (recp) = ( csite%dmean_rlongup (recp) & + * csite%area (recp) & + + csite%dmean_rlongup (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_parup (recp) = ( csite%dmean_parup (recp) & + * csite%area (recp) & + + csite%dmean_parup (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_nirup (recp) = ( csite%dmean_nirup (recp) & + * csite%area (recp) & + + csite%dmean_nirup (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_rshortup (recp) = ( csite%dmean_rshortup (recp) & + * csite%area (recp) & + + csite%dmean_rshortup (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_rnet (recp) = ( csite%dmean_rnet (recp) & + * csite%area (recp) & + + csite%dmean_rnet (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_albedo (recp) = ( csite%dmean_albedo (recp) & + * csite%area (recp) & + + csite%dmean_albedo (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_albedo_beam (recp) = ( csite%dmean_albedo_beam (recp) & + * csite%area (recp) & + + csite%dmean_albedo_beam (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_albedo_diff (recp) = ( csite%dmean_albedo_diff (recp) & + * csite%area (recp) & + + csite%dmean_albedo_diff (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_rlong_albedo (recp) = ( csite%dmean_rlong_albedo (recp) & + * csite%area (recp) & + + csite%dmean_rlong_albedo (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_ustar (recp) = ( csite%dmean_ustar (recp) & + * csite%area (recp) & + + csite%dmean_ustar (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_tstar (recp) = ( csite%dmean_tstar (recp) & + * csite%area (recp) & + + csite%dmean_tstar (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_qstar (recp) = ( csite%dmean_qstar (recp) & + * csite%area (recp) & + + csite%dmean_qstar (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_cstar (recp) = ( csite%dmean_cstar (recp) & + * csite%area (recp) & + + csite%dmean_cstar (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_carbon_ac (recp) = ( csite%dmean_carbon_ac (recp) & + * csite%area (recp) & + + csite%dmean_carbon_ac (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_carbon_st (recp) = ( csite%dmean_carbon_st (recp) & + * csite%area (recp) & + + csite%dmean_carbon_st (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_vapor_gc (recp) = ( csite%dmean_vapor_gc (recp) & + * csite%area (recp) & + + csite%dmean_vapor_gc (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_vapor_ac (recp) = ( csite%dmean_vapor_ac (recp) & + * csite%area (recp) & + + csite%dmean_vapor_ac (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_throughfall (recp) = ( csite%dmean_throughfall (recp) & + * csite%area (recp) & + + csite%dmean_throughfall (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_runoff (recp) = ( csite%dmean_runoff (recp) & + * csite%area (recp) & + + csite%dmean_runoff (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_drainage (recp) = ( csite%dmean_drainage (recp) & + * csite%area (recp) & + + csite%dmean_drainage (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_sensible_gc (recp) = ( csite%dmean_sensible_gc (recp) & + * csite%area (recp) & + + csite%dmean_sensible_gc (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_sensible_ac (recp) = ( csite%dmean_sensible_ac (recp) & + * csite%area (recp) & + + csite%dmean_sensible_ac (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_qthroughfall (recp) = ( csite%dmean_qthroughfall (recp) & + * csite%area (recp) & + + csite%dmean_qthroughfall (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_qrunoff (recp) = ( csite%dmean_qrunoff (recp) & + * csite%area (recp) & + + csite%dmean_qrunoff (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_qdrainage (recp) = ( csite%dmean_qdrainage (recp) & + * csite%area (recp) & + + csite%dmean_qdrainage (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_smoist_gg (:,recp) = ( csite%dmean_smoist_gg (:,recp) & + * csite%area (recp) & + + csite%dmean_smoist_gg (:,donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_transloss (:,recp) = ( csite%dmean_transloss (:,recp) & + * csite%area (recp) & + + csite%dmean_transloss (:,donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_sensible_gg (:,recp) = ( csite%dmean_sensible_gg (:,recp) & + * csite%area (recp) & + + csite%dmean_sensible_gg (:,donp) & + * csite%area (donp) ) & + * newareai + !---------------------------------------------------------------------------------! - csite%avg_leaf_energy(recp) = newareai * & - ( csite%avg_leaf_energy (donp)* csite%area(donp) & - + csite%avg_leaf_energy (recp)* csite%area(recp) ) - csite%avg_leaf_water(recp) = newareai * & - ( csite%avg_leaf_water (donp)* csite%area(donp) & - + csite%avg_leaf_water (recp)* csite%area(recp) ) - csite%avg_leaf_hcap(recp) = newareai * & - ( csite%avg_leaf_hcap (donp)* csite%area(donp) & - + csite%avg_leaf_hcap (recp)* csite%area(recp) ) + !---------------------------------------------------------------------------------! + ! Now we find the derived properties for the canopy air space. ! + !---------------------------------------------------------------------------------! + can_exner = press2exner (csite%dmean_can_prss(recp)) + csite%dmean_can_temp (recp) = extheta2temp(can_exner,csite%dmean_can_theta(recp)) + csite%dmean_can_rhos (recp) = idealdenssh ( csite%dmean_can_prss (recp) & + , csite%dmean_can_temp (recp) & + , csite%dmean_can_shv (recp) ) + !---------------------------------------------------------------------------------! - csite%avg_leaf_vpdef(recp) = newareai * & - ( csite%avg_leaf_vpdef (donp)* csite%area(donp) & - + csite%avg_leaf_vpdef (recp)* csite%area(recp) ) - csite%avg_wood_energy(recp) = newareai * & - ( csite%avg_wood_energy (donp)* csite%area(donp) & - + csite%avg_wood_energy (recp)* csite%area(recp) ) - csite%avg_wood_water(recp) = newareai * & - ( csite%avg_wood_water (donp)* csite%area(donp) & - + csite%avg_wood_water (recp)* csite%area(recp) ) + !---------------------------------------------------------------------------------! + ! Find the soil mean temperature, liquid water fraction, and matric ! + ! potential. ! + !---------------------------------------------------------------------------------! + do iii=lsl,mzg + nsoil = ntext_soil(iii) + call uextcm2tl( csite%dmean_soil_energy(iii,recp) & + , csite%dmean_soil_water (iii,recp) * wdns & + , soil(nsoil)%slcpd & + , csite%dmean_soil_temp (iii,recp) & + , csite%dmean_soil_fliq (iii,recp)) + + csite%dmean_soil_mstpot(iii,recp) = & + matric_potential(nsoil,csite%dmean_soil_water(iii,recp)) + end do + !---------------------------------------------------------------------------------! - csite%avg_wood_hcap(recp) = newareai * & - ( csite%avg_wood_hcap (donp)* csite%area(donp) & - + csite%avg_wood_hcap (recp)* csite%area(recp) ) - csite%co2budget_residual(recp) = newareai * & - ( csite%co2budget_residual(donp)* csite%area(donp) & - + csite%co2budget_residual(recp)* csite%area(recp) ) + !---------------------------------------------------------------------------------! + ! Find the temporary surface water properties. They may not be available at ! + ! all times, so we must check. ! + !---------------------------------------------------------------------------------! + !----- Temporarily make energy extensive [J/m2]. ---------------------------------! + csite%dmean_sfcw_depth (recp) = ( csite%dmean_sfcw_depth (recp) & + * csite%area (recp) & + + csite%dmean_sfcw_depth (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_sfcw_energy (recp) = ( csite%dmean_sfcw_energy (recp) & + * csite%dmean_sfcw_mass (recp) & + * csite%area (recp) & + + csite%dmean_sfcw_energy (donp) & + * csite%dmean_sfcw_mass (donp) & + * csite%area (donp) ) & + * newareai + csite%dmean_sfcw_mass (recp) = ( csite%dmean_sfcw_mass (recp) & + * csite%area (recp) & + + csite%dmean_sfcw_mass (donp) & + * csite%area (donp) ) & + * newareai + !----- Check whether there is enough surface water. ------------------------------! + if (csite%dmean_sfcw_mass(recp) > tiny_sfcwater_mass) then + csite%dmean_sfcw_energy (recp) = csite%dmean_sfcw_energy (recp) & + / csite%dmean_sfcw_mass (recp) + call uint2tl( csite%dmean_sfcw_energy(recp) & + , csite%dmean_sfcw_temp (recp) & + , csite%dmean_sfcw_fliq (recp) ) + else + csite%dmean_sfcw_mass (recp) = 0. + csite%dmean_sfcw_depth (recp) = 0. + csite%dmean_sfcw_energy(recp) = 0. + csite%dmean_sfcw_temp (recp) = csite%dmean_soil_temp(mzg,recp) + csite%dmean_sfcw_fliq (recp) = csite%dmean_soil_fliq(mzg,recp) + end if + !------------------------------------------------------------------------------------! - csite%co2budget_loss2atm(recp) = newareai * & - ( csite%co2budget_loss2atm(donp)* csite%area(donp) & - + csite%co2budget_loss2atm(recp)* csite%area(recp) ) + end if + !------------------------------------------------------------------------------------! - csite%co2budget_denseffect(recp)= newareai * & - ( csite%co2budget_denseffect(donp) * csite%area(donp) & - + csite%co2budget_denseffect(recp) * csite%area(recp) ) - csite%co2budget_gpp(recp) = newareai * & - ( csite%co2budget_gpp(donp) * csite%area(donp) & - + csite%co2budget_gpp(recp) * csite%area(recp) ) - csite%co2budget_plresp(recp) = newareai * & - ( csite%co2budget_plresp(donp) * csite%area(donp) & - + csite%co2budget_plresp(recp) * csite%area(recp) ) - csite%co2budget_rh(recp) = newareai * & - ( csite%co2budget_rh(donp) * csite%area(donp) & - + csite%co2budget_rh(recp) * csite%area(recp) ) - csite%co2budget_cwd_rh(recp) = newareai * & - ( csite%co2budget_cwd_rh(donp) * csite%area(donp) & - + csite%co2budget_cwd_rh(recp) * csite%area(recp) ) + !------------------------------------------------------------------------------------! + ! Monthly means. ! + !------------------------------------------------------------------------------------! + if (writing_eorq) then + !---------------------------------------------------------------------------------! + ! First we find the mean sum of squares, because they depend on the means too, ! + ! and the receptor values are lost after fusion. All variables are intensive at ! + ! the patch level. ! + !---------------------------------------------------------------------------------! - csite%ebudget_residual(recp) = newareai * & - ( csite%ebudget_residual(donp) * csite%area(donp) & - + csite%ebudget_residual(recp) * csite%area(recp) ) + csite%mmsqu_rh (recp) = fuse_msqu( csite%mmean_rh (recp) & + , csite%mmsqu_rh (recp) & + , csite%area (recp) & + , csite%mmean_rh (donp) & + , csite%mmsqu_rh (donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%mmsqu_cwd_rh (recp) = fuse_msqu( csite%mmean_cwd_rh (recp) & + , csite%mmsqu_cwd_rh (recp) & + , csite%area (recp) & + , csite%mmean_cwd_rh (donp) & + , csite%mmsqu_cwd_rh (donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%mmsqu_nep (recp) = fuse_msqu( csite%mmean_nep (recp) & + , csite%mmsqu_nep (recp) & + , csite%area (recp) & + , csite%mmean_nep (donp) & + , csite%mmsqu_nep (donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%mmsqu_rlongup (recp) = fuse_msqu( csite%mmean_rlongup (recp) & + , csite%mmsqu_rlongup (recp) & + , csite%area (recp) & + , csite%mmean_rlongup (donp) & + , csite%mmsqu_rlongup (donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%mmsqu_parup (recp) = fuse_msqu( csite%mmean_parup (recp) & + , csite%mmsqu_parup (recp) & + , csite%area (recp) & + , csite%mmean_parup (donp) & + , csite%mmsqu_parup (donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%mmsqu_nirup (recp) = fuse_msqu( csite%mmean_nirup (recp) & + , csite%mmsqu_nirup (recp) & + , csite%area (recp) & + , csite%mmean_nirup (donp) & + , csite%mmsqu_nirup (donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%mmsqu_rshortup (recp) = fuse_msqu( csite%mmean_rshortup (recp) & + , csite%mmsqu_rshortup (recp) & + , csite%area (recp) & + , csite%mmean_rshortup (donp) & + , csite%mmsqu_rshortup (donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%mmsqu_rnet (recp) = fuse_msqu( csite%mmean_rnet (recp) & + , csite%mmsqu_rnet (recp) & + , csite%area (recp) & + , csite%mmean_rnet (donp) & + , csite%mmsqu_rnet (donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%mmsqu_albedo (recp) = fuse_msqu( csite%mmean_albedo (recp) & + , csite%mmsqu_albedo (recp) & + , csite%area (recp) & + , csite%mmean_albedo (donp) & + , csite%mmsqu_albedo (donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%mmsqu_ustar (recp) = fuse_msqu( csite%mmean_ustar (recp) & + , csite%mmsqu_ustar (recp) & + , csite%area (recp) & + , csite%mmean_ustar (donp) & + , csite%mmsqu_ustar (donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%mmsqu_carbon_ac (recp) = fuse_msqu( csite%mmean_carbon_ac (recp) & + , csite%mmsqu_carbon_ac (recp) & + , csite%area (recp) & + , csite%mmean_carbon_ac (donp) & + , csite%mmsqu_carbon_ac (donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%mmsqu_carbon_st (recp) = fuse_msqu( csite%mmean_carbon_st (recp) & + , csite%mmsqu_carbon_st (recp) & + , csite%area (recp) & + , csite%mmean_carbon_st (donp) & + , csite%mmsqu_carbon_st (donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%mmsqu_vapor_gc (recp) = fuse_msqu( csite%mmean_vapor_gc (recp) & + , csite%mmsqu_vapor_gc (recp) & + , csite%area (recp) & + , csite%mmean_vapor_gc (donp) & + , csite%mmsqu_vapor_gc (donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%mmsqu_vapor_ac (recp) = fuse_msqu( csite%mmean_vapor_ac (recp) & + , csite%mmsqu_vapor_ac (recp) & + , csite%area (recp) & + , csite%mmean_vapor_ac (donp) & + , csite%mmsqu_vapor_ac (donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%mmsqu_sensible_gc(recp) = fuse_msqu( csite%mmean_sensible_gc(recp) & + , csite%mmsqu_sensible_gc(recp) & + , csite%area (recp) & + , csite%mmean_sensible_gc(donp) & + , csite%mmsqu_sensible_gc(donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%mmsqu_sensible_ac(recp) = fuse_msqu( csite%mmean_sensible_ac(recp) & + , csite%mmsqu_sensible_ac(recp) & + , csite%area (recp) & + , csite%mmean_sensible_ac(donp) & + , csite%mmsqu_sensible_ac(donp) & + , csite%area (donp) & + , corr_patch, .false.) + !---------------------------------------------------------------------------------! - csite%ebudget_netrad(recp) = newareai * & - ( csite%ebudget_netrad (donp) * csite%area(donp) & - + csite%ebudget_netrad (recp) * csite%area(recp) ) - csite%ebudget_loss2atm(recp) = newareai * & - ( csite%ebudget_loss2atm(donp) * csite%area(donp) & - + csite%ebudget_loss2atm(recp) * csite%area(recp) ) + csite%mmean_rh (recp) = ( csite%mmean_rh (recp) & + * csite%area (recp) & + + csite%mmean_rh (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_cwd_rh (recp) = ( csite%mmean_cwd_rh (recp) & + * csite%area (recp) & + + csite%mmean_cwd_rh (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_nep (recp) = ( csite%mmean_nep (recp) & + * csite%area (recp) & + + csite%mmean_nep (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_rk4step (recp) = ( csite%mmean_rk4step (recp) & + * csite%area (recp) & + + csite%mmean_rk4step (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_available_water (recp) = ( csite%mmean_available_water (recp) & + * csite%area (recp) & + + csite%mmean_available_water (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_can_theiv (recp) = ( csite%mmean_can_theiv (recp) & + * csite%area (recp) & + + csite%mmean_can_theiv (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_can_theta (recp) = ( csite%mmean_can_theta (recp) & + * csite%area (recp) & + + csite%mmean_can_theta (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_can_vpdef (recp) = ( csite%mmean_can_vpdef (recp) & + * csite%area (recp) & + + csite%mmean_can_vpdef (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_can_shv (recp) = ( csite%mmean_can_shv (recp) & + * csite%area (recp) & + + csite%mmean_can_shv (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_can_co2 (recp) = ( csite%mmean_can_co2 (recp) & + * csite%area (recp) & + + csite%mmean_can_co2 (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_can_prss (recp) = ( csite%mmean_can_prss (recp) & + * csite%area (recp) & + + csite%mmean_can_prss (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_gnd_temp (recp) = ( csite%mmean_gnd_temp (recp) & + * csite%area (recp) & + + csite%mmean_gnd_temp (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_gnd_shv (recp) = ( csite%mmean_gnd_shv (recp) & + * csite%area (recp) & + + csite%mmean_gnd_shv (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_can_ggnd (recp) = ( csite%mmean_can_ggnd (recp) & + * csite%area (recp) & + + csite%mmean_can_ggnd (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_rshort_gnd (recp) = ( csite%mmean_rshort_gnd (recp) & + * csite%area (recp) & + + csite%mmean_rshort_gnd (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_par_gnd (recp) = ( csite%mmean_par_gnd (recp) & + * csite%area (recp) & + + csite%mmean_par_gnd (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_rlong_gnd (recp) = ( csite%mmean_rlong_gnd (recp) & + * csite%area (recp) & + + csite%mmean_rlong_gnd (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_rlongup (recp) = ( csite%mmean_rlongup (recp) & + * csite%area (recp) & + + csite%mmean_rlongup (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_parup (recp) = ( csite%mmean_parup (recp) & + * csite%area (recp) & + + csite%mmean_parup (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_nirup (recp) = ( csite%mmean_nirup (recp) & + * csite%area (recp) & + + csite%mmean_nirup (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_rshortup (recp) = ( csite%mmean_rshortup (recp) & + * csite%area (recp) & + + csite%mmean_rshortup (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_rnet (recp) = ( csite%mmean_rnet (recp) & + * csite%area (recp) & + + csite%mmean_rnet (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_albedo (recp) = ( csite%mmean_albedo (recp) & + * csite%area (recp) & + + csite%mmean_albedo (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_albedo_beam (recp) = ( csite%mmean_albedo_beam (recp) & + * csite%area (recp) & + + csite%mmean_albedo_beam (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_albedo_diff (recp) = ( csite%mmean_albedo_diff (recp) & + * csite%area (recp) & + + csite%mmean_albedo_diff (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_rlong_albedo (recp) = ( csite%mmean_rlong_albedo (recp) & + * csite%area (recp) & + + csite%mmean_rlong_albedo (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_ustar (recp) = ( csite%mmean_ustar (recp) & + * csite%area (recp) & + + csite%mmean_ustar (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_tstar (recp) = ( csite%mmean_tstar (recp) & + * csite%area (recp) & + + csite%mmean_tstar (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_qstar (recp) = ( csite%mmean_qstar (recp) & + * csite%area (recp) & + + csite%mmean_qstar (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_cstar (recp) = ( csite%mmean_cstar (recp) & + * csite%area (recp) & + + csite%mmean_cstar (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_carbon_ac (recp) = ( csite%mmean_carbon_ac (recp) & + * csite%area (recp) & + + csite%mmean_carbon_ac (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_carbon_st (recp) = ( csite%mmean_carbon_st (recp) & + * csite%area (recp) & + + csite%mmean_carbon_st (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_vapor_gc (recp) = ( csite%mmean_vapor_gc (recp) & + * csite%area (recp) & + + csite%mmean_vapor_gc (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_vapor_ac (recp) = ( csite%mmean_vapor_ac (recp) & + * csite%area (recp) & + + csite%mmean_vapor_ac (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_throughfall (recp) = ( csite%mmean_throughfall (recp) & + * csite%area (recp) & + + csite%mmean_throughfall (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_runoff (recp) = ( csite%mmean_runoff (recp) & + * csite%area (recp) & + + csite%mmean_runoff (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_drainage (recp) = ( csite%mmean_drainage (recp) & + * csite%area (recp) & + + csite%mmean_drainage (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_sensible_gc (recp) = ( csite%mmean_sensible_gc (recp) & + * csite%area (recp) & + + csite%mmean_sensible_gc (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_sensible_ac (recp) = ( csite%mmean_sensible_ac (recp) & + * csite%area (recp) & + + csite%mmean_sensible_ac (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_qthroughfall (recp) = ( csite%mmean_qthroughfall (recp) & + * csite%area (recp) & + + csite%mmean_qthroughfall (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_qrunoff (recp) = ( csite%mmean_qrunoff (recp) & + * csite%area (recp) & + + csite%mmean_qrunoff (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_qdrainage (recp) = ( csite%mmean_qdrainage (recp) & + * csite%area (recp) & + + csite%mmean_qdrainage (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_fast_soil_c (recp) = ( csite%mmean_fast_soil_c (recp) & + * csite%area (recp) & + + csite%mmean_fast_soil_c (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_slow_soil_c (recp) = ( csite%mmean_slow_soil_c (recp) & + * csite%area (recp) & + + csite%mmean_slow_soil_c (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_struct_soil_c (recp) = ( csite%mmean_struct_soil_c (recp) & + * csite%area (recp) & + + csite%mmean_struct_soil_c (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_struct_soil_l (recp) = ( csite%mmean_struct_soil_l (recp) & + * csite%area (recp) & + + csite%mmean_struct_soil_l (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_fast_soil_n (recp) = ( csite%mmean_fast_soil_n (recp) & + * csite%area (recp) & + + csite%mmean_fast_soil_n (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_mineral_soil_n (recp) = ( csite%mmean_mineral_soil_n (recp) & + * csite%area (recp) & + + csite%mmean_mineral_soil_n (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_A_decomp (recp) = ( csite%mmean_A_decomp (recp) & + * csite%area (recp) & + + csite%mmean_A_decomp (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_Af_decomp (recp) = ( csite%mmean_Af_decomp (recp) & + * csite%area (recp) & + + csite%mmean_Af_decomp (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_co2_residual (recp) = ( csite%mmean_co2_residual (recp) & + * csite%area (recp) & + + csite%mmean_co2_residual (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_energy_residual (recp) = ( csite%mmean_energy_residual (recp) & + * csite%area (recp) & + + csite%mmean_energy_residual (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_water_residual (recp) = ( csite%mmean_water_residual (recp) & + * csite%area (recp) & + + csite%mmean_water_residual (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_smoist_gg (:,recp) = ( csite%mmean_smoist_gg (:,recp) & + * csite%area (recp) & + + csite%mmean_smoist_gg (:,donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_transloss (:,recp) = ( csite%mmean_transloss (:,recp) & + * csite%area (recp) & + + csite%mmean_transloss (:,donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_sensible_gg (:,recp) = ( csite%mmean_sensible_gg (:,recp) & + * csite%area (recp) & + + csite%mmean_sensible_gg (:,donp) & + * csite%area (donp) ) & + * newareai + !---------------------------------------------------------------------------------! - csite%ebudget_denseffect(recp) = newareai * & - ( csite%ebudget_denseffect(donp) * csite%area(donp) & - + csite%ebudget_denseffect(recp) * csite%area(recp) ) - csite%ebudget_prsseffect(recp) = newareai * & - ( csite%ebudget_prsseffect(donp) * csite%area(donp) & - + csite%ebudget_prsseffect(recp) * csite%area(recp) ) - csite%ebudget_loss2runoff(recp) = newareai * & - ( csite%ebudget_loss2runoff(donp) * csite%area(donp) & - + csite%ebudget_loss2runoff(recp) * csite%area(recp) ) + !---------------------------------------------------------------------------------! + ! Now we find the derived properties for the canopy air space. ! + !---------------------------------------------------------------------------------! + can_exner = press2exner (csite%mmean_can_prss(recp)) + csite%mmean_can_temp (recp) = extheta2temp(can_exner,csite%mmean_can_theta(recp)) + csite%mmean_can_rhos (recp) = idealdenssh ( csite%mmean_can_prss (recp) & + , csite%mmean_can_temp (recp) & + , csite%mmean_can_shv (recp) ) + !---------------------------------------------------------------------------------! - csite%ebudget_loss2drainage(recp) = newareai * & - ( csite%ebudget_loss2drainage(donp) * csite%area(donp) & - + csite%ebudget_loss2drainage(recp) * csite%area(recp) ) - csite%ebudget_precipgain(recp) = newareai * & - ( csite%ebudget_precipgain(donp) * csite%area(donp) & - + csite%ebudget_precipgain(recp) * csite%area(recp) ) + !---------------------------------------------------------------------------------! + ! Find the soil mean temperature, liquid water fraction, and matric ! + ! potential. ! + !---------------------------------------------------------------------------------! + do iii=lsl,mzg + nsoil = ntext_soil(iii) + call uextcm2tl( csite%mmean_soil_energy(iii,recp) & + , csite%mmean_soil_water (iii,recp) * wdns & + , soil(nsoil)%slcpd & + , csite%mmean_soil_temp (iii,recp) & + , csite%mmean_soil_fliq (iii,recp)) + + csite%mmean_soil_mstpot(iii,recp) = & + matric_potential(nsoil,csite%mmean_soil_water(iii,recp)) + end do + !---------------------------------------------------------------------------------! - csite%wbudget_residual(recp) = newareai * & - ( csite%wbudget_residual(donp) * csite%area(donp) & - + csite%wbudget_residual(recp) * csite%area(recp) ) - csite%wbudget_loss2atm(recp) = newareai * & - ( csite%wbudget_loss2atm(donp) * csite%area(donp) & - + csite%wbudget_loss2atm(recp) * csite%area(recp) ) + !---------------------------------------------------------------------------------! + ! Find the temporary surface water properties. They may not be available at ! + ! all times, so we must check. ! + !---------------------------------------------------------------------------------! + !----- Temporarily make energy extensive [J/m2]. ---------------------------------! + csite%mmean_sfcw_depth (recp) = ( csite%mmean_sfcw_depth (recp) & + * csite%area (recp) & + + csite%mmean_sfcw_depth (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_sfcw_energy (recp) = ( csite%mmean_sfcw_energy (recp) & + * csite%mmean_sfcw_mass (recp) & + * csite%area (recp) & + + csite%mmean_sfcw_energy (donp) & + * csite%mmean_sfcw_mass (donp) & + * csite%area (donp) ) & + * newareai + csite%mmean_sfcw_mass (recp) = ( csite%mmean_sfcw_mass (recp) & + * csite%area (recp) & + + csite%mmean_sfcw_mass (donp) & + * csite%area (donp) ) & + * newareai + !----- Check whether there is enough surface water. ------------------------------! + if (csite%mmean_sfcw_mass(recp) > tiny_sfcwater_mass) then + csite%mmean_sfcw_energy (recp) = csite%mmean_sfcw_energy (recp) & + / csite%mmean_sfcw_mass (recp) + call uint2tl( csite%mmean_sfcw_energy(recp) & + , csite%mmean_sfcw_temp (recp) & + , csite%mmean_sfcw_fliq (recp) ) + else + csite%mmean_sfcw_mass (recp) = 0. + csite%mmean_sfcw_depth (recp) = 0. + csite%mmean_sfcw_energy(recp) = 0. + csite%mmean_sfcw_temp (recp) = csite%mmean_soil_temp(mzg,recp) + csite%mmean_sfcw_fliq (recp) = csite%mmean_soil_fliq(mzg,recp) + end if + !------------------------------------------------------------------------------------! + end if + !------------------------------------------------------------------------------------! - csite%wbudget_denseffect(recp) = newareai * & - ( csite%wbudget_denseffect(donp) * csite%area(donp) & - + csite%wbudget_denseffect(recp) * csite%area(recp) ) - csite%wbudget_loss2runoff(recp) = newareai * & - ( csite%wbudget_loss2runoff(donp) * csite%area(donp) & - + csite%wbudget_loss2runoff(recp) * csite%area(recp) ) - csite%wbudget_loss2drainage(recp) = newareai * & - ( csite%wbudget_loss2drainage(donp) * csite%area(donp) & - + csite%wbudget_loss2drainage(recp) * csite%area(recp) ) - csite%wbudget_precipgain(recp) = newareai * & - ( csite%wbudget_precipgain(donp) * csite%area(donp) & - + csite%wbudget_precipgain(recp) * csite%area(recp) ) + !------------------------------------------------------------------------------------! + ! Mean diel. ! + !------------------------------------------------------------------------------------! + if (writing_dcyc) then + !---------------------------------------------------------------------------------! + ! First we solve the mean sum of squares as they depend on the mean and the ! + ! original receptor data is lost after fusion takes place. ! + !---------------------------------------------------------------------------------! + do t=1,ndcycle + csite%qmsqu_rh (t,recp) = fuse_msqu( csite%qmean_rh (t,recp) & + , csite%qmsqu_rh (t,recp) & + , csite%area (recp) & + , csite%qmean_rh (t,donp) & + , csite%qmsqu_rh (t,donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%qmsqu_cwd_rh (t,recp) = fuse_msqu( csite%qmean_cwd_rh (t,recp) & + , csite%qmsqu_cwd_rh (t,recp) & + , csite%area (recp) & + , csite%qmean_cwd_rh (t,donp) & + , csite%qmsqu_cwd_rh (t,donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%qmsqu_nep (t,recp) = fuse_msqu( csite%qmean_nep (t,recp) & + , csite%qmsqu_nep (t,recp) & + , csite%area (recp) & + , csite%qmean_nep (t,donp) & + , csite%qmsqu_nep (t,donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%qmsqu_rlongup (t,recp) = fuse_msqu( csite%qmean_rlongup (t,recp) & + , csite%qmsqu_rlongup (t,recp) & + , csite%area (recp) & + , csite%qmean_rlongup (t,donp) & + , csite%qmsqu_rlongup (t,donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%qmsqu_parup (t,recp) = fuse_msqu( csite%qmean_parup (t,recp) & + , csite%qmsqu_parup (t,recp) & + , csite%area (recp) & + , csite%qmean_parup (t,donp) & + , csite%qmsqu_parup (t,donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%qmsqu_nirup (t,recp) = fuse_msqu( csite%qmean_nirup (t,recp) & + , csite%qmsqu_nirup (t,recp) & + , csite%area (recp) & + , csite%qmean_nirup (t,donp) & + , csite%qmsqu_nirup (t,donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%qmsqu_rshortup (t,recp) = fuse_msqu( csite%qmean_rshortup (t,recp) & + , csite%qmsqu_rshortup (t,recp) & + , csite%area (recp) & + , csite%qmean_rshortup (t,donp) & + , csite%qmsqu_rshortup (t,donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%qmsqu_rnet (t,recp) = fuse_msqu( csite%qmean_rnet (t,recp) & + , csite%qmsqu_rnet (t,recp) & + , csite%area (recp) & + , csite%qmean_rnet (t,donp) & + , csite%qmsqu_rnet (t,donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%qmsqu_albedo (t,recp) = fuse_msqu( csite%qmean_albedo (t,recp) & + , csite%qmsqu_albedo (t,recp) & + , csite%area (recp) & + , csite%qmean_albedo (t,donp) & + , csite%qmsqu_albedo (t,donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%qmsqu_ustar (t,recp) = fuse_msqu( csite%qmean_ustar (t,recp) & + , csite%qmsqu_ustar (t,recp) & + , csite%area (recp) & + , csite%qmean_ustar (t,donp) & + , csite%qmsqu_ustar (t,donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%qmsqu_carbon_ac (t,recp) = fuse_msqu( csite%qmean_carbon_ac (t,recp) & + , csite%qmsqu_carbon_ac (t,recp) & + , csite%area (recp) & + , csite%qmean_carbon_ac (t,donp) & + , csite%qmsqu_carbon_ac (t,donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%qmsqu_carbon_st (t,recp) = fuse_msqu( csite%qmean_carbon_st (t,recp) & + , csite%qmsqu_carbon_st (t,recp) & + , csite%area (recp) & + , csite%qmean_carbon_st (t,donp) & + , csite%qmsqu_carbon_st (t,donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%qmsqu_vapor_gc (t,recp) = fuse_msqu( csite%qmean_vapor_gc (t,recp) & + , csite%qmsqu_vapor_gc (t,recp) & + , csite%area (recp) & + , csite%qmean_vapor_gc (t,donp) & + , csite%qmsqu_vapor_gc (t,donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%qmsqu_vapor_ac (t,recp) = fuse_msqu( csite%qmean_vapor_ac (t,recp) & + , csite%qmsqu_vapor_ac (t,recp) & + , csite%area (recp) & + , csite%qmean_vapor_ac (t,donp) & + , csite%qmsqu_vapor_ac (t,donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%qmsqu_sensible_gc(t,recp) = fuse_msqu( csite%qmean_sensible_gc(t,recp) & + , csite%qmsqu_sensible_gc(t,recp) & + , csite%area (recp) & + , csite%qmean_sensible_gc(t,donp) & + , csite%qmsqu_sensible_gc(t,donp) & + , csite%area (donp) & + , corr_patch, .false.) + csite%qmsqu_sensible_ac(t,recp) = fuse_msqu( csite%qmean_sensible_ac(t,recp) & + , csite%qmsqu_sensible_ac(t,recp) & + , csite%area (recp) & + , csite%qmean_sensible_ac(t,donp) & + , csite%qmsqu_sensible_ac(t,donp) & + , csite%area (donp) & + , corr_patch, .false.) + end do + !---------------------------------------------------------------------------------! - do iii=1,mzg - csite%avg_smoist_gg(iii,recp) = newareai * & - ( csite%avg_smoist_gg(iii,donp) * csite%area(donp) & - + csite%avg_smoist_gg(iii,recp) * csite%area(recp) ) + csite%qmean_rh (:,recp) = ( csite%qmean_rh (:,recp) & + * csite%area (recp) & + + csite%qmean_rh (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_cwd_rh (:,recp) = ( csite%qmean_cwd_rh (:,recp) & + * csite%area (recp) & + + csite%qmean_cwd_rh (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_nep (:,recp) = ( csite%qmean_nep (:,recp) & + * csite%area (recp) & + + csite%qmean_nep (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_rk4step (:,recp) = ( csite%qmean_rk4step (:,recp) & + * csite%area (recp) & + + csite%qmean_rk4step (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_available_water (:,recp) = ( csite%qmean_available_water (:,recp) & + * csite%area (recp) & + + csite%qmean_available_water (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_can_theiv (:,recp) = ( csite%qmean_can_theiv (:,recp) & + * csite%area (recp) & + + csite%qmean_can_theiv (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_can_theta (:,recp) = ( csite%qmean_can_theta (:,recp) & + * csite%area (recp) & + + csite%qmean_can_theta (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_can_vpdef (:,recp) = ( csite%qmean_can_vpdef (:,recp) & + * csite%area (recp) & + + csite%qmean_can_vpdef (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_can_shv (:,recp) = ( csite%qmean_can_shv (:,recp) & + * csite%area (recp) & + + csite%qmean_can_shv (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_can_co2 (:,recp) = ( csite%qmean_can_co2 (:,recp) & + * csite%area (recp) & + + csite%qmean_can_co2 (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_can_prss (:,recp) = ( csite%qmean_can_prss (:,recp) & + * csite%area (recp) & + + csite%qmean_can_prss (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_gnd_temp (:,recp) = ( csite%qmean_gnd_temp (:,recp) & + * csite%area (recp) & + + csite%qmean_gnd_temp (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_gnd_shv (:,recp) = ( csite%qmean_gnd_shv (:,recp) & + * csite%area (recp) & + + csite%qmean_gnd_shv (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_can_ggnd (:,recp) = ( csite%qmean_can_ggnd (:,recp) & + * csite%area (recp) & + + csite%qmean_can_ggnd (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_rshort_gnd (:,recp) = ( csite%qmean_rshort_gnd (:,recp) & + * csite%area (recp) & + + csite%qmean_rshort_gnd (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_par_gnd (:,recp) = ( csite%qmean_par_gnd (:,recp) & + * csite%area (recp) & + + csite%qmean_par_gnd (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_rlong_gnd (:,recp) = ( csite%qmean_rlong_gnd (:,recp) & + * csite%area (recp) & + + csite%qmean_rlong_gnd (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_rlongup (:,recp) = ( csite%qmean_rlongup (:,recp) & + * csite%area (recp) & + + csite%qmean_rlongup (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_parup (:,recp) = ( csite%qmean_parup (:,recp) & + * csite%area (recp) & + + csite%qmean_parup (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_nirup (:,recp) = ( csite%qmean_nirup (:,recp) & + * csite%area (recp) & + + csite%qmean_nirup (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_rshortup (:,recp) = ( csite%qmean_rshortup (:,recp) & + * csite%area (recp) & + + csite%qmean_rshortup (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_rnet (:,recp) = ( csite%qmean_rnet (:,recp) & + * csite%area (recp) & + + csite%qmean_rnet (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_albedo (:,recp) = ( csite%qmean_albedo (:,recp) & + * csite%area (recp) & + + csite%qmean_albedo (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_albedo_beam (:,recp) = ( csite%qmean_albedo_beam (:,recp) & + * csite%area (recp) & + + csite%qmean_albedo_beam (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_albedo_diff (:,recp) = ( csite%qmean_albedo_diff (:,recp) & + * csite%area (recp) & + + csite%qmean_albedo_diff (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_rlong_albedo (:,recp) = ( csite%qmean_rlong_albedo (:,recp) & + * csite%area (recp) & + + csite%qmean_rlong_albedo (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_ustar (:,recp) = ( csite%qmean_ustar (:,recp) & + * csite%area (recp) & + + csite%qmean_ustar (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_tstar (:,recp) = ( csite%qmean_tstar (:,recp) & + * csite%area (recp) & + + csite%qmean_tstar (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_qstar (:,recp) = ( csite%qmean_qstar (:,recp) & + * csite%area (recp) & + + csite%qmean_qstar (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_cstar (:,recp) = ( csite%qmean_cstar (:,recp) & + * csite%area (recp) & + + csite%qmean_cstar (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_carbon_ac (:,recp) = ( csite%qmean_carbon_ac (:,recp) & + * csite%area (recp) & + + csite%qmean_carbon_ac (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_carbon_st (:,recp) = ( csite%qmean_carbon_st (:,recp) & + * csite%area (recp) & + + csite%qmean_carbon_st (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_vapor_gc (:,recp) = ( csite%qmean_vapor_gc (:,recp) & + * csite%area (recp) & + + csite%qmean_vapor_gc (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_vapor_ac (:,recp) = ( csite%qmean_vapor_ac (:,recp) & + * csite%area (recp) & + + csite%qmean_vapor_ac (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_throughfall (:,recp) = ( csite%qmean_throughfall (:,recp) & + * csite%area (recp) & + + csite%qmean_throughfall (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_runoff (:,recp) = ( csite%qmean_runoff (:,recp) & + * csite%area (recp) & + + csite%qmean_runoff (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_drainage (:,recp) = ( csite%qmean_drainage (:,recp) & + * csite%area (recp) & + + csite%qmean_drainage (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_sensible_gc (:,recp) = ( csite%qmean_sensible_gc (:,recp) & + * csite%area (recp) & + + csite%qmean_sensible_gc (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_sensible_ac (:,recp) = ( csite%qmean_sensible_ac (:,recp) & + * csite%area (recp) & + + csite%qmean_sensible_ac (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_qthroughfall (:,recp) = ( csite%qmean_qthroughfall (:,recp) & + * csite%area (recp) & + + csite%qmean_qthroughfall (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_qrunoff (:,recp) = ( csite%qmean_qrunoff (:,recp) & + * csite%area (recp) & + + csite%qmean_qrunoff (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_qdrainage (:,recp) = ( csite%qmean_qdrainage (:,recp) & + * csite%area (recp) & + + csite%qmean_qdrainage (:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_smoist_gg (:,:,recp) = ( csite%qmean_smoist_gg (:,:,recp) & + * csite%area (recp) & + + csite%qmean_smoist_gg (:,:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_transloss (:,:,recp) = ( csite%qmean_transloss (:,:,recp) & + * csite%area (recp) & + + csite%qmean_transloss (:,:,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_sensible_gg (:,:,recp) = ( csite%qmean_sensible_gg (:,:,recp) & + * csite%area (recp) & + + csite%qmean_sensible_gg (:,:,donp) & + * csite%area (donp) ) & + * newareai + + + do t=1,ndcycle + !------------------------------------------------------------------------------! + ! Now we find the derived properties for the canopy air space. ! + !------------------------------------------------------------------------------! + can_exner = press2exner (csite%qmean_can_prss(t,recp)) + csite%qmean_can_temp (t,recp) = extheta2temp( can_exner & + , csite%qmean_can_theta(t,recp)) + csite%qmean_can_rhos (t,recp) = idealdenssh ( csite%qmean_can_prss (t,recp) & + , csite%qmean_can_temp (t,recp) & + , csite%qmean_can_shv (t,recp) ) + !------------------------------------------------------------------------------! - csite%avg_transloss(iii,recp) = newareai * & - ( csite%avg_transloss(iii,donp) * csite%area(donp) & - + csite%avg_transloss(iii,recp) * csite%area(recp) ) - csite%avg_sensible_gg(iii,recp) = newareai * & - ( csite%avg_sensible_gg(iii,donp) * csite%area(donp) & - + csite%avg_sensible_gg(iii,recp) * csite%area(recp) ) - end do - do iii=1,n_dbh - csite%co2budget_gpp_dbh(iii,recp) = newareai * & - ( csite%co2budget_gpp_dbh(iii,donp) * csite%area(donp) & - + csite%co2budget_gpp_dbh(iii,recp) * csite%area(recp) ) - end do - !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------! + ! Find the soil mean temperature, liquid water fraction, and matric ! + ! potential. ! + !------------------------------------------------------------------------------! + do iii=lsl,mzg + nsoil = ntext_soil(iii) + call uextcm2tl( csite%qmean_soil_energy(iii,t,recp) & + , csite%qmean_soil_water (iii,t,recp) * wdns & + , soil(nsoil)%slcpd & + , csite%qmean_soil_temp (iii,t,recp) & + , csite%qmean_soil_fliq (iii,t,recp) ) + + csite%qmean_soil_mstpot(iii,t,recp) = & + matric_potential(nsoil,csite%qmean_soil_water(iii,t,recp)) + end do + !------------------------------------------------------------------------------! - !------------------------------------------------------------------------------------! - ! We must also check whether daily/monthly output variables exist. If they do, ! - ! then we must fuse them too. ! - !------------------------------------------------------------------------------------! - if (idoutput > 0 .or. imoutput > 0 .or. iqoutput > 0) then - csite%dmean_rh(recp) = newareai & - * ( csite%dmean_rh(donp) * csite%area(donp) & - + csite%dmean_rh(recp) * csite%area(recp) ) - csite%dmean_cwd_rh(recp) = newareai & - * ( csite%dmean_cwd_rh(donp) * csite%area(donp) & - + csite%dmean_cwd_rh(recp) * csite%area(recp) ) - csite%dmean_co2_residual(recp) = newareai & - * ( csite%dmean_co2_residual(donp) & - * csite%area(donp) & - + csite%dmean_co2_residual(recp) & - * csite%area(recp) ) - csite%dmean_energy_residual(recp) = newareai & - * ( csite%dmean_energy_residual(donp) & - * csite%area(donp) & - + csite%dmean_energy_residual(recp) & - * csite%area(recp) ) - csite%dmean_water_residual(recp) = newareai & - * ( csite%dmean_water_residual(donp) & - * csite%area(donp) & - + csite%dmean_water_residual(recp) & - * csite%area(recp) ) - csite%dmean_A_decomp(recp) = newareai & - * ( csite%dmean_A_decomp(donp) & - * csite%area(donp) & - + csite%dmean_A_decomp(recp) & - * csite%area(recp) ) - - csite%dmean_Af_decomp(recp) = newareai & - * ( csite%dmean_Af_decomp(donp) & - * csite%area(donp) & - + csite%dmean_Af_decomp(recp) & - * csite%area(recp) ) - csite%dmean_rk4step(recp) = newareai & - * ( csite%dmean_rk4step(donp) & - * csite%area(donp) & - + csite%dmean_rk4step(recp) & - * csite%area(recp) ) - end if - if (imoutput > 0 .or. iqoutput > 0) then - csite%mmean_rh(recp) = newareai & - * ( csite%mmean_rh(donp) * csite%area(donp) & - + csite%mmean_rh(recp) * csite%area(recp) ) - csite%mmean_cwd_rh(recp) = newareai & - * ( csite%mmean_cwd_rh(donp) * csite%area(donp) & - + csite%mmean_cwd_rh(recp) * csite%area(recp) ) - csite%mmean_co2_residual(recp) = newareai & - * ( csite%mmean_co2_residual(donp) & - * csite%area(donp) & - + csite%mmean_co2_residual(recp) & - * csite%area(recp) ) - csite%mmean_energy_residual(recp) = newareai & - * ( csite%mmean_energy_residual(donp) & - * csite%area(donp) & - + csite%mmean_energy_residual(recp) & - * csite%area(recp) ) - csite%mmean_water_residual(recp) = newareai & - * ( csite%mmean_water_residual(donp) & - * csite%area(donp) & - + csite%mmean_water_residual(recp) & - * csite%area(recp) ) - csite%mmean_A_decomp(recp) = newareai & - * ( csite%mmean_A_decomp(donp) & - * csite%area(donp) & - + csite%mmean_A_decomp(recp) & - * csite%area(recp) ) - csite%mmean_Af_decomp(recp) = newareai & - * ( csite%mmean_Af_decomp(donp) & - * csite%area(donp) & - + csite%mmean_Af_decomp(recp) & - * csite%area(recp) ) - csite%mmean_rk4step(recp) = newareai & - * ( csite%mmean_rk4step(donp) & - * csite%area(donp) & - + csite%mmean_rk4step(recp) & - * csite%area(recp) ) - end if - if (iqoutput > 0) then - do icyc=1,ndcycle - csite%qmean_rh (icyc,recp) = newareai & - * ( csite%qmean_rh (icyc,donp) & - * csite%area (donp) & - + csite%qmean_rh (icyc,recp) & - * csite%area (recp)) - csite%qmean_cwd_rh (icyc,recp) = newareai & - * ( csite%qmean_cwd_rh (icyc,donp) & - * csite%area (donp) & - + csite%qmean_cwd_rh (icyc,recp) & - * csite%area (recp)) + !------------------------------------------------------------------------------! + ! Find the temporary surface water properties. They may not be available ! + ! at all times, so we must check. ! + !------------------------------------------------------------------------------! + !----- Temporarily make energy extensive [J/m2]. ------------------------------! + csite%qmean_sfcw_depth (t,recp) = ( csite%qmean_sfcw_depth (t,recp) & + * csite%area (recp) & + + csite%qmean_sfcw_depth (t,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_sfcw_energy (t,recp) = ( csite%qmean_sfcw_energy (t,recp) & + * csite%qmean_sfcw_mass (t,recp) & + * csite%area (recp) & + + csite%qmean_sfcw_energy (t,donp) & + * csite%qmean_sfcw_mass (t,donp) & + * csite%area (donp) ) & + * newareai + csite%qmean_sfcw_mass (t,recp) = ( csite%qmean_sfcw_mass (t,recp) & + * csite%area (recp) & + + csite%qmean_sfcw_mass (t,donp) & + * csite%area (donp) ) & + * newareai + !----- Check whether there is enough surface water. ---------------------------! + if (csite%qmean_sfcw_mass(t,recp) > tiny_sfcwater_mass) then + csite%qmean_sfcw_energy (t,recp) = csite%qmean_sfcw_energy (t,recp) & + / csite%qmean_sfcw_mass (t,recp) + call uint2tl( csite%qmean_sfcw_energy(t,recp) & + , csite%qmean_sfcw_temp (t,recp) & + , csite%qmean_sfcw_fliq (t,recp) ) + else + csite%qmean_sfcw_mass (t,recp) = 0. + csite%qmean_sfcw_depth (t,recp) = 0. + csite%qmean_sfcw_energy(t,recp) = 0. + csite%qmean_sfcw_temp (t,recp) = csite%qmean_soil_temp(mzg,t,recp) + csite%qmean_sfcw_fliq (t,recp) = csite%qmean_soil_fliq(mzg,t,recp) + end if + !------------------------------------------------------------------------------! end do - end if - - !------------------------------------------------------------------------------------! - ! Update the leaf and wood temperature and liquid fraction. We must check ! - ! whether we can solve the average or not, because it may be an empty patch or the ! - ! user may have disabled branchwood thermodynamics. ! - !------------------------------------------------------------------------------------! - if (csite%avg_leaf_hcap(recp) > 0.) then - call uextcm2tl(csite%avg_leaf_energy(recp),csite%avg_leaf_water(recp) & - ,csite%avg_leaf_hcap(recp),csite%avg_leaf_temp(recp) & - ,csite%avg_leaf_fliq(recp)) - else - csite%avg_leaf_temp(recp) = newareai & - * ( csite%avg_leaf_temp(donp) * csite%area(donp) & - + csite%avg_leaf_temp(recp) * csite%area(recp) ) - csite%avg_leaf_fliq(recp) = newareai & - * ( csite%avg_leaf_fliq(donp) * csite%area(donp) & - + csite%avg_leaf_fliq(recp) * csite%area(recp) ) - end if - if (csite%avg_wood_hcap(recp) > 0.) then - call uextcm2tl(csite%avg_wood_energy(recp),csite%avg_wood_water(recp) & - ,csite%avg_wood_hcap(recp),csite%avg_wood_temp(recp) & - ,csite%avg_wood_fliq(recp)) - else - csite%avg_wood_temp(recp) = newareai & - * ( csite%avg_wood_temp(donp) * csite%area(donp) & - + csite%avg_wood_temp(recp) * csite%area(recp) ) - csite%avg_wood_fliq(recp) = newareai & - * ( csite%avg_wood_fliq(donp) * csite%area(donp) & - + csite%avg_wood_fliq(recp) * csite%area(recp) ) + !---------------------------------------------------------------------------------! end if !------------------------------------------------------------------------------------! @@ -3761,7 +5896,6 @@ subroutine fuse_2_patches(csite,donp,recp,mzg,mzs,prss,lsl,ntext_soil,green_leaf ! + csite%veg_height(recp) ! ! + csite%veg_displace(recp) ! ! + csite%disp_height(recp) ! - ! + csite%lai(recp) ! ! + csite%veg_rough(recp) ! ! + csite%total_sfcw_depth(recp) ! ! + csite%snowfac(recp) ! @@ -3891,6 +6025,75 @@ subroutine patch_pft_size_profile(csite,ipa) end subroutine patch_pft_size_profile !=======================================================================================! !=======================================================================================! + + + + + + + !=======================================================================================! + !=======================================================================================! + ! This subroutine combines the mean sum of squares of two quantities (x and y). ! + ! ! + ! xmean, ymean -- the mean values of x and y ! + ! xmsqu, ymsqu -- the mean sum of squares of x and y ! + ! xwght, ywght -- the weights for x and y ! + ! r_xy -- correlation between x and y ! + !---------------------------------------------------------------------------------------! + real(kind=4) function fuse_msqu(xmean,xmsqu,xwght,ymean,ymsqu,ywght,r_xy,extensive) + implicit none + !----- Arguments. -------------------------------------------------------------------! + real(kind=4), intent(in) :: xmean + real(kind=4), intent(in) :: xmsqu + real(kind=4), intent(in) :: xwght + real(kind=4), intent(in) :: ymean + real(kind=4), intent(in) :: ymsqu + real(kind=4), intent(in) :: ywght + real(kind=4), intent(in) :: r_xy + logical , intent(in) :: extensive + !----- Local variables. -------------------------------------------------------------! + real(kind=4) :: xwmean + real(kind=4) :: xwmsqu + real(kind=4) :: ywmean + real(kind=4) :: ywmsqu + real(kind=4) :: w2sumi + real(kind=4) :: xwpywp + !------------------------------------------------------------------------------------! + + + !------------------------------------------------------------------------------------! + ! Correct the scales. If the property is extensive, we aggregate them, other- ! + ! wise we find the weighted sum of squares. ! + !------------------------------------------------------------------------------------! + if (extensive) then + xwmean = xmean + xwmsqu = xmsqu + ywmean = ymean + ywmsqu = ymsqu + w2sumi = 1. + else + xwmean = xmean * xwght + xwmsqu = xmsqu * xwght * xwght + ywmean = ymean * ywght + ywmsqu = ymsqu * ywght * ywght + w2sumi = 1. / ( (xwght + ywght) * (xwght + ywght) ) + end if + !------------------------------------------------------------------------------------! + + + !----- Find the terms. --------------------------------------------------------------! + xwpywp = r_xy * sqrt( ( xwmsqu + xwmean*xwmean) * (ywmsqu + ywmean*ywmean) ) + !------------------------------------------------------------------------------------! + + + !----- Add the terms to the answer. -------------------------------------------------! + fuse_msqu = ( xwmsqu + ywmsqu + 2. * ( xwmean * ywmean + xwpywp ) ) * w2sumi + !------------------------------------------------------------------------------------! + + return + end function fuse_msqu + !=======================================================================================! + !=======================================================================================! end module fuse_fiss_utils !==========================================================================================! !==========================================================================================! diff --git a/ED/src/utils/invmondays.f90 b/ED/src/utils/invmondays.f90 index 4baeebc43..8dc26dc45 100644 --- a/ED/src/utils/invmondays.f90 +++ b/ED/src/utils/invmondays.f90 @@ -60,6 +60,64 @@ end subroutine lastmonthdate +!==========================================================================================! +!==========================================================================================! +! Function that determines the inverse of the number of days of the previous day. ! +!------------------------------------------------------------------------------------------! +subroutine yesterday_info(au_jour_d_hui,hier,maxjoursi) + use ed_misc_coms, only: simtime + implicit none + !----- Arguments. ----------------------------------------------------------------------! + type(simtime) , intent(in) :: au_jour_d_hui + type(simtime) , intent(out) :: hier + real , intent(out) :: maxjoursi + !----- Local variables. ----------------------------------------------------------------! + integer , dimension(12) :: maxdays + !----- External functions. -------------------------------------------------------------! + logical , external :: isleap + !---------------------------------------------------------------------------------------! + + + !----- Initialise the array assuming it is a regular year. -----------------------------! + maxdays = (/ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 /) + !---------------------------------------------------------------------------------------! + + + + !----- Copy the time structure to the previous month, and assign dummy time. -----------! + hier = au_jour_d_hui + hier%time = 0. + !---------------------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------------------! + ! Call function "yesterday" to determine the correct date. ! + !---------------------------------------------------------------------------------------! + call yesterday( au_jour_d_hui%year, au_jour_d_hui%month, au_jour_d_hui%date & + , hier%year , hier%month , hier%date ) + !---------------------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------------------! + ! Change the number of days in February if the previous month falls in a ! + ! leap year. ! + !---------------------------------------------------------------------------------------! + if (isleap(hier%year)) maxdays(2)=29 + !---------------------------------------------------------------------------------------! + + maxjoursi = 1.0 / real(maxdays(hier%month)) + return +end subroutine yesterday_info +!==========================================================================================! +!==========================================================================================! + + + + + + !==========================================================================================! !==========================================================================================! ! Function that determines the which day was the day before. ! diff --git a/ED/src/utils/update_derived_props.f90 b/ED/src/utils/update_derived_props.f90 index b8b923e07..ef8781fd7 100644 --- a/ED/src/utils/update_derived_props.f90 +++ b/ED/src/utils/update_derived_props.f90 @@ -92,8 +92,6 @@ subroutine update_patch_derived_props(csite,lsl,prss,ipa) !----- Reset properties. ---------------------------------------------------------------! csite%veg_height(ipa) = 0.0 - csite%lai(ipa) = 0.0 - csite%wai(ipa) = 0.0 weight_sum = 0.0 csite%opencan_frac(ipa) = 1.0 csite%plant_ag_biomass(ipa) = 0.0 @@ -107,12 +105,6 @@ subroutine update_patch_derived_props(csite,lsl,prss,ipa) ipft = cpatch%pft(ico) - !----- Update the patch-level area indices. -----------------------------------------! - csite%lai(ipa) = csite%lai(ipa) + cpatch%lai(ico) - csite%wai(ipa) = csite%wai(ipa) + cpatch%wai(ico) - !------------------------------------------------------------------------------------! - - !----- Compute the patch-level above-ground biomass csite%plant_ag_biomass(ipa) = csite%plant_ag_biomass(ipa) & @@ -198,20 +190,20 @@ end subroutine update_patch_derived_props !==========================================================================================! !==========================================================================================! -! This subroutine will take care of some diagnostic thermodynamic properties, namely ! -! the canopy air density and temperature. ! +! This subroutine will take care of some diagnostic thermodynamic properties. ! !------------------------------------------------------------------------------------------! subroutine update_patch_thermo_props(csite,ipaa,ipaz,mzg,mzs,ntext_soil) - use ed_state_vars, only : sitetype ! ! structure - use therm_lib , only : idealdenssh & ! function - , uextcm2tl & ! function - , uint2tl ! ! function - use consts_coms , only : p00i & ! intent(in) - , rocp & ! intent(in) - , t00 & ! intent(in) - , wdns ! ! intent(in) - use soil_coms , only : soil ! ! intent(in) + use ed_state_vars, only : sitetype ! ! structure + use therm_lib , only : idealdenssh & ! function + , press2exner & ! function + , extheta2temp & ! function + , uextcm2tl & ! function + , uint2tl ! ! function + use consts_coms , only : t00 & ! intent(in) + , wdns ! ! intent(in) + use soil_coms , only : soil & ! intent(in) + , matric_potential ! ! function implicit none !----- Arguments -----------------------------------------------------------------------! @@ -227,14 +219,20 @@ subroutine update_patch_thermo_props(csite,ipaa,ipaz,mzg,mzs,ntext_soil) integer :: ksn integer :: k real :: soilhcap + real :: can_exner !---------------------------------------------------------------------------------------! do ipa=ipaa,ipaz - csite%can_temp(ipa) = csite%can_theta(ipa) * (p00i * csite%can_prss(ipa)) ** rocp - csite%can_rhos(ipa) = idealdenssh(csite%can_prss(ipa),csite%can_temp(ipa) & - ,csite%can_shv(ipa)) + !----- Canopy air temperature and density. ------------------------------------------! + can_exner = press2exner (csite%can_prss(ipa)) + csite%can_temp(ipa) = extheta2temp(can_exner,csite%can_theta(ipa)) + csite%can_rhos(ipa) = idealdenssh ( csite%can_prss (ipa) & + , csite%can_temp (ipa) & + , csite%can_shv (ipa) ) + !------------------------------------------------------------------------------------! + !----- Update soil temperature and liquid water fraction. ---------------------------! do k = 1, mzg @@ -242,7 +240,11 @@ subroutine update_patch_thermo_props(csite,ipaa,ipaz,mzg,mzs,ntext_soil) soilhcap = soil(nsoil)%slcpd call uextcm2tl(csite%soil_energy(k,ipa),csite%soil_water(k,ipa)*wdns,soilhcap & ,csite%soil_tempk(k,ipa),csite%soil_fracliq(k,ipa)) + csite%soil_mstpot(k,ipa) = matric_potential(nsoil,csite%soil_water(k,ipa)) end do + !------------------------------------------------------------------------------------! + + !----- Update temporary surface water temperature and liquid water fraction. --------! ksn = csite%nlev_sfcwater(ipa) @@ -262,7 +264,9 @@ subroutine update_patch_thermo_props(csite,ipaa,ipaz,mzg,mzs,ntext_soil) csite%sfcwater_fracliq(k,ipa) = csite%sfcwater_fracliq(k-1,ipa) end if end do + !------------------------------------------------------------------------------------! end do + !---------------------------------------------------------------------------------------! return end subroutine update_patch_thermo_props @@ -274,6 +278,100 @@ end subroutine update_patch_thermo_props +!==========================================================================================! +!==========================================================================================! +! This subroutine will update the fast mean properties, similarly to the routine ! +! above. ! +!------------------------------------------------------------------------------------------! +subroutine update_patch_thermo_fmean(csite,ipaa,ipaz,mzg,ntext_soil) + + use ed_state_vars, only : sitetype ! ! structure + use therm_lib , only : idealdenssh & ! function + , press2exner & ! function + , extheta2temp & ! function + , uextcm2tl & ! function + , uint2tl ! ! function + use consts_coms , only : t00 & ! intent(in) + , wdns ! ! intent(in) + use soil_coms , only : soil & ! intent(in) + , tiny_sfcwater_mass & ! intent(in) + , matric_potential ! ! function + implicit none + + !----- Arguments -----------------------------------------------------------------------! + type(sitetype) , target :: csite + integer , intent(in) :: ipaa + integer , intent(in) :: ipaz + integer , intent(in) :: mzg + integer , dimension(mzg), intent(in) :: ntext_soil + !----- Local variables. ----------------------------------------------------------------! + integer :: ipa + integer :: nsoil + integer :: ksn + integer :: k + real :: soilhcap + real :: can_exner + !---------------------------------------------------------------------------------------! + + + !---------------------------------------------------------------------------------------! + do ipa=ipaa,ipaz + + !----- Canopy air temperature and density. ------------------------------------------! + can_exner = press2exner (csite%fmean_can_prss(ipa)) + csite%fmean_can_temp(ipa) = extheta2temp(can_exner,csite%fmean_can_theta(ipa)) + csite%fmean_can_rhos(ipa) = idealdenssh ( csite%fmean_can_prss (ipa) & + , csite%fmean_can_temp (ipa) & + , csite%fmean_can_shv (ipa) ) + !------------------------------------------------------------------------------------! + + + !----- Update soil temperature and liquid water fraction. ---------------------------! + do k = 1, mzg + nsoil = ntext_soil(k) + soilhcap = soil(nsoil)%slcpd + call uextcm2tl( csite%fmean_soil_energy(k,ipa) & + , csite%fmean_soil_water (k,ipa) * wdns & + , soilhcap & + , csite%fmean_soil_temp (k,ipa) & + , csite%fmean_soil_fliq (k,ipa) ) + csite%fmean_soil_mstpot(k,ipa) = matric_potential( nsoil & + , csite%fmean_soil_water(k,ipa)) + end do + !------------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------------! + ! If the patch had some temporary snow/pounding layer, convert the mean energy to ! + ! J/kg, then find the mean temperature and liquid fraction. Otherwise, set them to ! + ! either zero or default values. ! + !------------------------------------------------------------------------------------! + if (csite%fmean_sfcw_mass(ipa) > tiny_sfcwater_mass) then + csite%fmean_sfcw_energy(ipa) = csite%fmean_sfcw_energy(ipa) & + / csite%fmean_sfcw_mass(ipa) + call uint2tl(csite%fmean_sfcw_energy(ipa),csite%fmean_sfcw_temp(ipa) & + ,csite%fmean_sfcw_fliq(ipa)) + else + csite%fmean_sfcw_mass (ipa) = 0. + csite%fmean_sfcw_depth (ipa) = 0. + csite%fmean_sfcw_energy(ipa) = 0. + csite%fmean_sfcw_temp (ipa) = csite%fmean_soil_temp(mzg,ipa) + csite%fmean_sfcw_fliq (ipa) = csite%fmean_soil_fliq(mzg,ipa) + end if + !-----------------------------------------------------------------------------------! + end do + return +end subroutine update_patch_thermo_fmean +!==========================================================================================! +!==========================================================================================! + + + + + + !==========================================================================================! !==========================================================================================! ! This subroutine will update the derived properties at the site level. ! @@ -297,13 +395,12 @@ subroutine update_site_derived_props(cpoly,census_flag,isi) integer :: ico integer :: ipft integer :: ilu - real :: ba !---------------------------------------------------------------------------------------! !----- Initialise the variables before looping. ----------------------------------------! cpoly%basal_area(:,:,isi) = 0.0 - cpoly%agb(:,:,isi) = 0.0 - + cpoly%agb (:,:,isi) = 0.0 + csite => cpoly%site(isi) !----- Loop over patches. --------------------------------------------------------------! @@ -341,36 +438,392 @@ end subroutine update_site_derived_props !==========================================================================================! !==========================================================================================! -! This subroutine will update the derived properties at the polygon level. ! +! The following subroutine finds the polygon averages from site-, patch-, and cohort- ! +! -level properties whose time step is longer than DTLSM (days, months, years). Fluxes, ! +! meteorological input, thermodynamic properties, and radiation are aggregated in sub- ! +! -routine aggregate_polygon_fmean. ! !------------------------------------------------------------------------------------------! subroutine update_polygon_derived_props(cgrid) + use ed_state_vars , only : edtype & ! structure + , polygontype & ! structure + , sitetype & ! structure + , patchtype ! ! structure + use soil_coms , only : soil & ! intent(in) + , dslz ! ! intent(in) + use grid_coms , only : nzg & ! intent(in) + , nzs ! ! intent(in) + use ed_max_dims , only : n_dbh ! ! intent(in) + use ed_misc_coms , only : ddbhi ! ! intent(in) + use pft_coms , only : c2n_leaf & ! intent(in) + , c2n_stem & ! intent(in) + , c2n_storage & ! intent(in) + , c2n_recruit & ! intent(in) + , c2n_slow & ! intent(in) + , c2n_structural ! ! intent(in) + use decomp_coms , only : cwd_frac ! ! intent(in) - use ed_state_vars , only : edtype & ! structure - , polygontype ! ! structure implicit none - - !----- Arguments -----------------------------------------------------------------------! - type(edtype) , target :: cgrid - !----- Local variables -----------------------------------------------------------------! - type(polygontype) , pointer :: cpoly - integer :: ipy - integer :: isi + !----- Arguments. -----------------------------------------------------------------! + type(edtype) , target :: cgrid + !----- Local variables. ----------------------------------------------------------------! + type(polygontype) , pointer :: cpoly + type(sitetype) , pointer :: csite + type(patchtype) , pointer :: cpatch + integer :: ipy + integer :: isi + integer :: ipa + integer :: ico + integer :: p + integer :: d + integer :: k + real :: poly_area_i + real :: site_area_i + real :: site_wgt + real :: patch_wgt + real :: rdepth !---------------------------------------------------------------------------------------! - do ipy=1,cgrid%npolygons - cgrid%agb(:,:,ipy) = 0.0 - cgrid%basal_area(:,:,ipy) = 0.0 - + + + !---------------------------------------------------------------------------------------! + ! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! ! + !---------------------------------------------------------------------------------------! + ! Please, don't initialise polygon-level (cgrid) variables outside polyloop. This ! + ! works in off-line runs, but it causes memory leaks (and crashes) in the coupled runs ! + ! over the ocean, where cgrid%npolygons can be 0 if one of the sub-domains falls ! + ! entirely over the ocean. Thanks! ! + !---------------------------------------------------------------------------------------! + ! cgrid%blah = 0. !<<--- This is a bad way of doing, look inside the loop for the + ! ! safe way of initialising the variable. + !---------------------------------------------------------------------------------------! + polyloop: do ipy=1,cgrid%npolygons cpoly => cgrid%polygon(ipy) - do isi = 1,cpoly%nsites - cgrid%agb(:,:,ipy) = cgrid%agb(:,:,ipy) & - + cpoly%area(isi) * cpoly%agb(:,:,isi) - cgrid%basal_area(:,:,ipy) = cgrid%basal_area(:,:,ipy) & - + cpoly%area(isi) * cpoly%basal_area(:,:,isi) - end do - end do + !------------------------------------------------------------------------------------! + ! ! + ! Initialise properties. ! + ! ! + ! This is the right and safe place to initialise polygon-level (cgrid) vari- ! + ! ables, so in case npolygons is zero this will not cause memory leaks. I know, ! + ! this never happens in off-line runs, but it is quite common in coupled runs... ! + ! Whenever one of the nodes receives a sub-domain where all the points are over the ! + ! ocean, ED will not assign any polygon in that sub-domain, which means that that ! + ! node will have 0 polygons, and the variables cannot be allocated. If you try to ! + ! access the polygon level variable outside the loop, then the model crashes due to ! + ! segmentation violation (a bad thing), whereas by putting the variables here both ! + ! the off-line model and the coupled runs will work, because this loop will be ! + ! skipped when there is no polygon. ! + !------------------------------------------------------------------------------------! + ! cgrid%blah(ipy) = 0.0 ! <<- This way works for all cases. + !------------------------------------------------------------------------------------! + cgrid%nplant (:,:,ipy) = 0.0 + cgrid%agb (:,:,ipy) = 0.0 + cgrid%lai (:,:,ipy) = 0.0 + cgrid%wai (:,:,ipy) = 0.0 + cgrid%basal_area (:,:,ipy) = 0.0 + cgrid%bdead (:,:,ipy) = 0.0 + cgrid%balive (:,:,ipy) = 0.0 + cgrid%bleaf (:,:,ipy) = 0.0 + cgrid%broot (:,:,ipy) = 0.0 + cgrid%bsapwooda (:,:,ipy) = 0.0 + cgrid%bsapwoodb (:,:,ipy) = 0.0 + cgrid%bseeds (:,:,ipy) = 0.0 + cgrid%bstorage (:,:,ipy) = 0.0 + cgrid%bdead_n (:,:,ipy) = 0.0 + cgrid%balive_n (:,:,ipy) = 0.0 + cgrid%bleaf_n (:,:,ipy) = 0.0 + cgrid%broot_n (:,:,ipy) = 0.0 + cgrid%bsapwooda_n (:,:,ipy) = 0.0 + cgrid%bsapwoodb_n (:,:,ipy) = 0.0 + cgrid%bseeds_n (:,:,ipy) = 0.0 + cgrid%bstorage_n (:,:,ipy) = 0.0 + cgrid%leaf_maintenance (:,:,ipy) = 0.0 + cgrid%root_maintenance (:,:,ipy) = 0.0 + cgrid%leaf_drop (:,:,ipy) = 0.0 + cgrid%fast_soil_c (ipy) = 0.0 + cgrid%slow_soil_c (ipy) = 0.0 + cgrid%struct_soil_c (ipy) = 0.0 + cgrid%struct_soil_l (ipy) = 0.0 + cgrid%cwd_c (ipy) = 0.0 + cgrid%fast_soil_n (ipy) = 0.0 + cgrid%mineral_soil_n (ipy) = 0.0 + cgrid%cwd_n (ipy) = 0.0 + !------------------------------------------------------------------------------------! + ! Some of these variables are redundant with variables above. Perhaps we should ! + ! find a single way to report them. ! + !------------------------------------------------------------------------------------! + cgrid%Nbiomass_uptake (ipy) = 0.0 + cgrid%Cleaf_litter_flux (ipy) = 0.0 + cgrid%Croot_litter_flux (ipy) = 0.0 + cgrid%Nleaf_litter_flux (ipy) = 0.0 + cgrid%Nroot_litter_flux (ipy) = 0.0 + cgrid%Ngross_min (ipy) = 0.0 + cgrid%Nnet_min (ipy) = 0.0 + !------------------------------------------------------------------------------------! + + + + + !----- Inverse of this polygon area (it should be always 1.) ------------------------! + poly_area_i = 1./sum(cpoly%area) + !------------------------------------------------------------------------------------! + + + !------------------------------------------------------------------------------------! + ! Loop over sites. ! + !------------------------------------------------------------------------------------! + siteloop: do isi=1,cpoly%nsites + csite => cpoly%site(isi) + + !----- Inverse of this site area (it should be always 1.) ------------------------! + site_area_i=1./sum(csite%area) + !---------------------------------------------------------------------------------! + + + !----- Site weight. --------------------------------------------------------------! + site_wgt = cpoly%area(isi) * poly_area_i + !---------------------------------------------------------------------------------! + + + !---------------------------------------------------------------------------------! + ! Loop over patches. ! + !---------------------------------------------------------------------------------! + patchloop: do ipa=1,csite%npatches + cpatch => csite%patch(ipa) + + + !----- Site weight. -----------------------------------------------------------! + patch_wgt = csite%area(ipa) * site_area_i * site_wgt + !------------------------------------------------------------------------------! + + + !----- Integrate soil properties. ---------------------------------------------! + cgrid%fast_soil_c (ipy) = cgrid%fast_soil_c (ipy) & + + csite%fast_soil_c (ipa) & + * patch_wgt + cgrid%slow_soil_c (ipy) = cgrid%slow_soil_c (ipy) & + + csite%slow_soil_c (ipa) & + * patch_wgt + cgrid%struct_soil_c (ipy) = cgrid%struct_soil_c (ipy) & + + csite%structural_soil_c (ipa) & + * patch_wgt + cgrid%struct_soil_l (ipy) = cgrid%struct_soil_l (ipy) & + + csite%structural_soil_l (ipa) & + * patch_wgt + cgrid%fast_soil_n (ipy) = cgrid%fast_soil_n (ipy) & + + csite%fast_soil_n (ipa) & + * patch_wgt + cgrid%mineral_soil_n(ipy) = cgrid%mineral_soil_n (ipy) & + + csite%mineralized_soil_n (ipa) & + * patch_wgt + !------------------------------------------------------------------------------! + ! I am definitely not sure about the way I did CWD. I just used the same ! + ! fraction used to compute cwd_rh in soil_rh (soil_respiration.f90) to ! + ! determine the fraction of the pools that are CWD. ! + !------------------------------------------------------------------------------! + cgrid%cwd_c (ipy) = cgrid%cwd_c (ipy) & + + ( csite%slow_soil_c (ipa) & + + csite%structural_soil_c(ipa) ) & + * cwd_frac * patch_wgt + cgrid%cwd_n (ipy) = cgrid%cwd_n (ipy) & + + ( csite%slow_soil_c (ipa) / c2n_slow & + + csite%structural_soil_c(ipa) / c2n_structural ) & + * cwd_frac * patch_wgt + !------------------------------------------------------------------------------! + + + + !----- Zero the root fraction (patch-level diagnostic). -----------------------! + csite%rootdense(:,ipa) = 0. + !------------------------------------------------------------------------------! + + + !------------------------------------------------------------------------------! + ! Loop over cohorts. ! + !------------------------------------------------------------------------------! + cohortloop: do ico=1,cpatch%ncohorts + !----- Find the PFT and DBH class to which this cohort belongs. ------------! + p = cpatch%pft(ico) + d = max(1,min(n_dbh,ceiling(cpatch%dbh(ico)*ddbhi))) + !---------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------! + ! Rooting fraction: step 1, find root biomass per cubic meter ! + ! broot*nplant/rooting_depth [kg/plant]*[plant/m2]/[m] ! + !---------------------------------------------------------------------------! + rdepth = sum(dslz(cpatch%krdepth(ico):nzg)) + do k=cpatch%krdepth(ico),nzg + csite%rootdense(k,ipa) = csite%rootdense(k,ipa) & + + cpatch%broot(ico)*cpatch%nplant(ico) / rdepth + end do + !---------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------! + ! Integrate cohort-based properties. Make sure that the polygon- ! + ! -level gets the right units (i.e., no /plant, but /m2). ! + !---------------------------------------------------------------------------! + cgrid%nplant (p,d,ipy) = cgrid%nplant (p,d,ipy) & + + cpatch%nplant (ico) & + * patch_wgt + cgrid%agb (p,d,ipy) = cgrid%agb (p,d,ipy) & + + cpatch%agb (ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%lai (p,d,ipy) = cgrid%lai (p,d,ipy) & + + cpatch%lai (ico) & + * cpatch%nplant (ico) + cgrid%wai (p,d,ipy) = cgrid%wai (p,d,ipy) & + + cpatch%wai (ico) & + * cpatch%nplant (ico) + cgrid%basal_area (p,d,ipy) = cgrid%basal_area (p,d,ipy) & + + cpatch%basarea (ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%bdead (p,d,ipy) = cgrid%bdead (p,d,ipy) & + + cpatch%bdead (ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%balive (p,d,ipy) = cgrid%balive (p,d,ipy) & + + cpatch%balive (ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%bleaf (p,d,ipy) = cgrid%bleaf (p,d,ipy) & + + cpatch%bleaf (ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%broot (p,d,ipy) = cgrid%broot (p,d,ipy) & + + cpatch%broot (ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%bsapwooda (p,d,ipy) = cgrid%bsapwooda (p,d,ipy) & + + cpatch%bsapwooda (ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%bsapwoodb (p,d,ipy) = cgrid%bsapwoodb (p,d,ipy) & + + cpatch%bsapwoodb (ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%bseeds (p,d,ipy) = cgrid%bseeds (p,d,ipy) & + + cpatch%bseeds (ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%bstorage (p,d,ipy) = cgrid%bstorage (p,d,ipy) & + + cpatch%bstorage (ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%bdead_n (p,d,ipy) = cgrid%bdead_n (p,d,ipy) & + + cpatch%bdead (ico) & + / c2n_stem (p) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%balive_n (p,d,ipy) = cgrid%balive_n (p,d,ipy) & + + ( ( cpatch%bleaf (ico) & + + cpatch%broot (ico) ) & + / c2n_leaf (p) & + + ( cpatch%bsapwooda (ico) & + + cpatch%bsapwoodb (ico) ) & + / c2n_stem (p) ) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%bleaf_n (p,d,ipy) = cgrid%bleaf_n (p,d,ipy) & + + cpatch%bleaf (ico) & + / c2n_leaf (p) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%broot_n (p,d,ipy) = cgrid%broot_n (p,d,ipy) & + + cpatch%broot (ico) & + / c2n_leaf (p) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%bsapwooda_n (p,d,ipy) = cgrid%bsapwooda_n (p,d,ipy) & + + cpatch%bsapwooda (ico) & + / c2n_stem (p) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%bsapwoodb_n (p,d,ipy) = cgrid%bsapwoodb_n (p,d,ipy) & + + cpatch%bsapwoodb (ico) & + / c2n_stem (p) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%bseeds_n (p,d,ipy) = cgrid%bseeds_n (p,d,ipy) & + + cpatch%bseeds (ico) & + / c2n_recruit (p) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%bstorage_n (p,d,ipy) = cgrid%bstorage_n (p,d,ipy) & + + cpatch%bstorage (ico) & + / c2n_storage & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%leaf_maintenance(p,d,ipy) = cgrid%leaf_maintenance(p,d,ipy) & + + cpatch%leaf_maintenance (ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%root_maintenance(p,d,ipy) = cgrid%root_maintenance(p,d,ipy) & + + cpatch%root_maintenance (ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%leaf_drop (p,d,ipy) = cgrid%leaf_drop (p,d,ipy) & + + cpatch%leaf_drop (ico) & + * cpatch%nplant (ico) & + * patch_wgt + !---------------------------------------------------------------------------! + + + !---------------------------------------------------------------------------! + ! CHECK! CHECK! CHECK! CHECK! CHECK! CHECK! CHECK! CHECK! CHECK! CHECK! ! + !---------------------------------------------------------------------------! + ! These variables were originally in integrate_ed_daily_output_flux, I ! + ! moved them to here just to be consistent (they are not "dmean" ! + ! variables). However, they are slightly different than the original, ! + ! which were missing nplant (so the results were in not in units of ! + ! kg/m2/yr, but kg/plant/yr). ! + !---------------------------------------------------------------------------! + cgrid%Cleaf_litter_flux(ipy) = cgrid%Cleaf_litter_flux(ipy) & + + cpatch%leaf_maintenance(ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%Croot_litter_flux(ipy) = cgrid%Croot_litter_flux(ipy) & + + cpatch%root_maintenance(ico) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%Nleaf_litter_flux(ipy) = cgrid%Cleaf_litter_flux(ipy) & + + cpatch%leaf_maintenance(ico) / c2n_leaf(p) & + * cpatch%nplant (ico) & + * patch_wgt + cgrid%Nroot_litter_flux(ipy) = cgrid%Croot_litter_flux(ipy) & + + cpatch%root_maintenance(ico) / c2n_leaf(p) & + * cpatch%nplant (ico) & + * patch_wgt + !---------------------------------------------------------------------------! + end do cohortloop + !------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------! + ! Update the patch-related N budget variables. ! + !------------------------------------------------------------------------------! + cgrid%Ngross_min (ipy) = cgrid%Ngross_min(ipy) & + + csite%mineralized_N_input (ipa) * patch_wgt + cgrid%Ngross_min (ipy) = cgrid%Ngross_min(ipy) & + + ( csite%mineralized_N_input (ipa) & + - csite%mineralized_N_loss (ipa) ) * patch_wgt + cgrid%Nbiomass_uptake(ipy) = cgrid%Ngross_min(ipy) & + + csite%total_plant_nitrogen_uptake(ipa)* patch_wgt + !------------------------------------------------------------------------------! + + end do patchloop + !---------------------------------------------------------------------------------! + end do siteloop + !------------------------------------------------------------------------------------! + end do polyloop + !---------------------------------------------------------------------------------------! return end subroutine update_polygon_derived_props !==========================================================================================! @@ -722,132 +1175,178 @@ end subroutine update_model_time_dm ! rescaled. Variables whose units are per plant, m2 leaf, or m2 wood ! ! SHOULD NOT be included here. ! !------------------------------------------------------------------------------------------! -subroutine update_cohort_extensive_props(cpatch,aco,zco,scale_fac) +subroutine update_cohort_extensive_props(cpatch,aco,zco,mult) use ed_state_vars, only : patchtype ! ! structure - use ed_misc_coms , only : idoutput & ! intent(in) - , iqoutput & ! intent(in) - , imoutput ! ! intent(in) + use ed_misc_coms , only : writing_long & ! intent(in) + , writing_eorq & ! intent(in) + , writing_dcyc ! ! intent(in) implicit none !----- Arguments. ----------------------------------------------------------------------! type(patchtype), target :: cpatch ! Current patch integer , intent(in) :: aco ! First cohort to be rescaled integer , intent(in) :: zco ! Last cohort to be rescaled - real , intent(in) :: scale_fac ! Scale factor + real , intent(in) :: mult ! Scale factor !----- Local variables. ----------------------------------------------------------------! integer :: ico ! Cohort counter + real :: mult_2 ! Square of the scale factor !---------------------------------------------------------------------------------------! + !----- Set up the scale factor for monthly mean sum of squares. ------------------------! + mult_2 = mult * mult + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! ! Loop over all cohorts. ! !---------------------------------------------------------------------------------------! cohortloop: do ico=aco,zco - cpatch%lai (ico) = cpatch%lai (ico) * scale_fac - cpatch%wai (ico) = cpatch%wai (ico) * scale_fac - cpatch%nplant (ico) = cpatch%nplant (ico) * scale_fac - cpatch%mean_gpp (ico) = cpatch%mean_gpp (ico) * scale_fac - cpatch%mean_leaf_resp (ico) = cpatch%mean_leaf_resp (ico) * scale_fac - cpatch%mean_root_resp (ico) = cpatch%mean_root_resp (ico) * scale_fac - cpatch%mean_growth_resp (ico) = cpatch%mean_growth_resp (ico) * scale_fac - cpatch%mean_storage_resp (ico) = cpatch%mean_storage_resp (ico) * scale_fac - cpatch%mean_vleaf_resp (ico) = cpatch%mean_vleaf_resp (ico) * scale_fac - cpatch%today_gpp (ico) = cpatch%today_gpp (ico) * scale_fac - cpatch%today_nppleaf (ico) = cpatch%today_nppleaf (ico) * scale_fac - cpatch%today_nppfroot (ico) = cpatch%today_nppfroot (ico) * scale_fac - cpatch%today_nppsapwood (ico) = cpatch%today_nppsapwood (ico) * scale_fac - cpatch%today_nppcroot (ico) = cpatch%today_nppcroot (ico) * scale_fac - cpatch%today_nppseeds (ico) = cpatch%today_nppseeds (ico) * scale_fac - cpatch%today_nppwood (ico) = cpatch%today_nppwood (ico) * scale_fac - cpatch%today_nppdaily (ico) = cpatch%today_nppdaily (ico) * scale_fac - cpatch%today_gpp_pot (ico) = cpatch%today_gpp_pot (ico) * scale_fac - cpatch%today_gpp_lightmax (ico) = cpatch%today_gpp_lightmax (ico) * scale_fac - cpatch%today_gpp_moistmax (ico) = cpatch%today_gpp_moistmax (ico) * scale_fac - cpatch%today_leaf_resp (ico) = cpatch%today_leaf_resp (ico) * scale_fac - cpatch%today_root_resp (ico) = cpatch%today_root_resp (ico) * scale_fac - cpatch%gpp (ico) = cpatch%gpp (ico) * scale_fac - cpatch%leaf_respiration (ico) = cpatch%leaf_respiration (ico) * scale_fac - cpatch%root_respiration (ico) = cpatch%root_respiration (ico) * scale_fac - cpatch%monthly_dndt (ico) = cpatch%monthly_dndt (ico) * scale_fac - cpatch%leaf_water (ico) = cpatch%leaf_water (ico) * scale_fac - cpatch%leaf_hcap (ico) = cpatch%leaf_hcap (ico) * scale_fac - cpatch%leaf_energy (ico) = cpatch%leaf_energy (ico) * scale_fac - cpatch%wood_water (ico) = cpatch%wood_water (ico) * scale_fac - cpatch%wood_hcap (ico) = cpatch%wood_hcap (ico) * scale_fac - cpatch%wood_energy (ico) = cpatch%wood_energy (ico) * scale_fac - !----- Energy and water fluxes. -----------------------------------------------------! - cpatch%mean_par_l (ico) = cpatch%mean_par_l (ico) * scale_fac - cpatch%mean_par_l_beam (ico) = cpatch%mean_par_l_beam (ico) * scale_fac - cpatch%mean_par_l_diff (ico) = cpatch%mean_par_l_diff (ico) * scale_fac - cpatch%mean_rshort_l (ico) = cpatch%mean_rshort_l (ico) * scale_fac - cpatch%mean_rlong_l (ico) = cpatch%mean_rlong_l (ico) * scale_fac - cpatch%mean_sensible_lc (ico) = cpatch%mean_sensible_lc (ico) * scale_fac - cpatch%mean_vapor_lc (ico) = cpatch%mean_vapor_lc (ico) * scale_fac - cpatch%mean_transp (ico) = cpatch%mean_transp (ico) * scale_fac - cpatch%mean_intercepted_al(ico) = cpatch%mean_intercepted_al(ico) * scale_fac - cpatch%mean_wshed_lg (ico) = cpatch%mean_wshed_lg (ico) * scale_fac - cpatch%mean_rshort_w (ico) = cpatch%mean_rshort_w (ico) * scale_fac - cpatch%mean_rlong_w (ico) = cpatch%mean_rlong_w (ico) * scale_fac - cpatch%mean_sensible_wc (ico) = cpatch%mean_sensible_wc (ico) * scale_fac - cpatch%mean_vapor_wc (ico) = cpatch%mean_vapor_wc (ico) * scale_fac - cpatch%mean_intercepted_aw(ico) = cpatch%mean_intercepted_aw(ico) * scale_fac - cpatch%mean_wshed_wg (ico) = cpatch%mean_wshed_wg (ico) * scale_fac + cpatch%lai (ico) = cpatch%lai (ico) * mult + cpatch%wai (ico) = cpatch%wai (ico) * mult + cpatch%nplant (ico) = cpatch%nplant (ico) * mult + cpatch%today_gpp (ico) = cpatch%today_gpp (ico) * mult + cpatch%today_nppleaf (ico) = cpatch%today_nppleaf (ico) * mult + cpatch%today_nppfroot (ico) = cpatch%today_nppfroot (ico) * mult + cpatch%today_nppsapwood (ico) = cpatch%today_nppsapwood (ico) * mult + cpatch%today_nppcroot (ico) = cpatch%today_nppcroot (ico) * mult + cpatch%today_nppseeds (ico) = cpatch%today_nppseeds (ico) * mult + cpatch%today_nppwood (ico) = cpatch%today_nppwood (ico) * mult + cpatch%today_nppdaily (ico) = cpatch%today_nppdaily (ico) * mult + cpatch%today_gpp_pot (ico) = cpatch%today_gpp_pot (ico) * mult + cpatch%today_gpp_lightmax (ico) = cpatch%today_gpp_lightmax (ico) * mult + cpatch%today_gpp_moistmax (ico) = cpatch%today_gpp_moistmax (ico) * mult + cpatch%today_leaf_resp (ico) = cpatch%today_leaf_resp (ico) * mult + cpatch%today_root_resp (ico) = cpatch%today_root_resp (ico) * mult + cpatch%gpp (ico) = cpatch%gpp (ico) * mult + cpatch%leaf_respiration (ico) = cpatch%leaf_respiration (ico) * mult + cpatch%root_respiration (ico) = cpatch%root_respiration (ico) * mult + cpatch%monthly_dndt (ico) = cpatch%monthly_dndt (ico) * mult + cpatch%leaf_water (ico) = cpatch%leaf_water (ico) * mult + cpatch%leaf_hcap (ico) = cpatch%leaf_hcap (ico) * mult + cpatch%leaf_energy (ico) = cpatch%leaf_energy (ico) * mult + cpatch%wood_water (ico) = cpatch%wood_water (ico) * mult + cpatch%wood_hcap (ico) = cpatch%wood_hcap (ico) * mult + cpatch%wood_energy (ico) = cpatch%wood_energy (ico) * mult !----- Crown area shall not exceed 1. -----------------------------------------------! - cpatch%crown_area (ico) = min(1.,cpatch%crown_area (ico) * scale_fac) - !----- Carbon flux monthly means are extensive, we must convert them. ---------------! - if (idoutput > 0 .or. imoutput > 0 .or. iqoutput > 0) then - cpatch%dmean_par_l (ico) = cpatch%dmean_par_l (ico) * scale_fac - cpatch%dmean_par_l_beam (ico) = cpatch%dmean_par_l_beam (ico) * scale_fac - cpatch%dmean_par_l_diff (ico) = cpatch%dmean_par_l_diff (ico) * scale_fac - cpatch%dmean_rshort_l (ico) = cpatch%dmean_rshort_l (ico) * scale_fac - cpatch%dmean_rlong_l (ico) = cpatch%dmean_rlong_l (ico) * scale_fac - cpatch%dmean_sensible_lc (ico) = cpatch%dmean_sensible_lc (ico) * scale_fac - cpatch%dmean_vapor_lc (ico) = cpatch%dmean_vapor_lc (ico) * scale_fac - cpatch%dmean_transp (ico) = cpatch%dmean_transp (ico) * scale_fac - cpatch%dmean_intercepted_al(ico) = cpatch%dmean_intercepted_al(ico) * scale_fac - cpatch%dmean_wshed_lg (ico) = cpatch%dmean_wshed_lg (ico) * scale_fac - cpatch%dmean_rshort_w (ico) = cpatch%dmean_rshort_w (ico) * scale_fac - cpatch%dmean_rlong_w (ico) = cpatch%dmean_rlong_w (ico) * scale_fac - cpatch%dmean_sensible_wc (ico) = cpatch%dmean_sensible_wc (ico) * scale_fac - cpatch%dmean_vapor_wc (ico) = cpatch%dmean_vapor_wc (ico) * scale_fac - cpatch%dmean_intercepted_aw(ico) = cpatch%dmean_intercepted_aw(ico) * scale_fac - cpatch%dmean_wshed_wg (ico) = cpatch%dmean_wshed_wg (ico) * scale_fac + cpatch%crown_area (ico) = min(1.,cpatch%crown_area (ico) * mult) + !----- Fast-scale means. ------------------------------------------------------------! + cpatch%fmean_leaf_energy (ico) = cpatch%fmean_leaf_energy (ico) * mult + cpatch%fmean_leaf_water (ico) = cpatch%fmean_leaf_water (ico) * mult + cpatch%fmean_leaf_hcap (ico) = cpatch%fmean_leaf_hcap (ico) * mult + cpatch%fmean_wood_energy (ico) = cpatch%fmean_wood_energy (ico) * mult + cpatch%fmean_wood_water (ico) = cpatch%fmean_wood_water (ico) * mult + cpatch%fmean_wood_hcap (ico) = cpatch%fmean_wood_hcap (ico) * mult + cpatch%fmean_water_supply (ico) = cpatch%fmean_water_supply (ico) * mult + cpatch%fmean_par_l (ico) = cpatch%fmean_par_l (ico) * mult + cpatch%fmean_par_l_beam (ico) = cpatch%fmean_par_l_beam (ico) * mult + cpatch%fmean_par_l_diff (ico) = cpatch%fmean_par_l_diff (ico) * mult + cpatch%fmean_rshort_l (ico) = cpatch%fmean_rshort_l (ico) * mult + cpatch%fmean_rlong_l (ico) = cpatch%fmean_rlong_l (ico) * mult + cpatch%fmean_sensible_lc (ico) = cpatch%fmean_sensible_lc (ico) * mult + cpatch%fmean_vapor_lc (ico) = cpatch%fmean_vapor_lc (ico) * mult + cpatch%fmean_transp (ico) = cpatch%fmean_transp (ico) * mult + cpatch%fmean_intercepted_al(ico) = cpatch%fmean_intercepted_al(ico) * mult + cpatch%fmean_wshed_lg (ico) = cpatch%fmean_wshed_lg (ico) * mult + cpatch%fmean_rshort_w (ico) = cpatch%fmean_rshort_w (ico) * mult + cpatch%fmean_rlong_w (ico) = cpatch%fmean_rlong_w (ico) * mult + cpatch%fmean_sensible_wc (ico) = cpatch%fmean_sensible_wc (ico) * mult + cpatch%fmean_vapor_wc (ico) = cpatch%fmean_vapor_wc (ico) * mult + cpatch%fmean_intercepted_aw(ico) = cpatch%fmean_intercepted_aw(ico) * mult + cpatch%fmean_wshed_wg (ico) = cpatch%fmean_wshed_wg (ico) * mult + !----- Daily means. -----------------------------------------------------------------! + if (writing_long) then + cpatch%dmean_leaf_energy (ico) = cpatch%dmean_leaf_energy (ico) * mult + cpatch%dmean_leaf_water (ico) = cpatch%dmean_leaf_water (ico) * mult + cpatch%dmean_leaf_hcap (ico) = cpatch%dmean_leaf_hcap (ico) * mult + cpatch%dmean_wood_energy (ico) = cpatch%dmean_wood_energy (ico) * mult + cpatch%dmean_wood_water (ico) = cpatch%dmean_wood_water (ico) * mult + cpatch%dmean_wood_hcap (ico) = cpatch%dmean_wood_hcap (ico) * mult + cpatch%dmean_water_supply (ico) = cpatch%dmean_water_supply (ico) * mult + cpatch%dmean_par_l (ico) = cpatch%dmean_par_l (ico) * mult + cpatch%dmean_par_l_beam (ico) = cpatch%dmean_par_l_beam (ico) * mult + cpatch%dmean_par_l_diff (ico) = cpatch%dmean_par_l_diff (ico) * mult + cpatch%dmean_rshort_l (ico) = cpatch%dmean_rshort_l (ico) * mult + cpatch%dmean_rlong_l (ico) = cpatch%dmean_rlong_l (ico) * mult + cpatch%dmean_sensible_lc (ico) = cpatch%dmean_sensible_lc (ico) * mult + cpatch%dmean_vapor_lc (ico) = cpatch%dmean_vapor_lc (ico) * mult + cpatch%dmean_transp (ico) = cpatch%dmean_transp (ico) * mult + cpatch%dmean_intercepted_al(ico) = cpatch%dmean_intercepted_al(ico) * mult + cpatch%dmean_wshed_lg (ico) = cpatch%dmean_wshed_lg (ico) * mult + cpatch%dmean_rshort_w (ico) = cpatch%dmean_rshort_w (ico) * mult + cpatch%dmean_rlong_w (ico) = cpatch%dmean_rlong_w (ico) * mult + cpatch%dmean_sensible_wc (ico) = cpatch%dmean_sensible_wc (ico) * mult + cpatch%dmean_vapor_wc (ico) = cpatch%dmean_vapor_wc (ico) * mult + cpatch%dmean_intercepted_aw(ico) = cpatch%dmean_intercepted_aw(ico) * mult + cpatch%dmean_wshed_wg (ico) = cpatch%dmean_wshed_wg (ico) * mult end if - if (imoutput > 0 .or. iqoutput > 0) then - cpatch%mmean_par_l (ico) = cpatch%mmean_par_l (ico) * scale_fac - cpatch%mmean_par_l_beam (ico) = cpatch%mmean_par_l_beam (ico) * scale_fac - cpatch%mmean_par_l_diff (ico) = cpatch%mmean_par_l_diff (ico) * scale_fac - cpatch%dmean_rshort_l (ico) = cpatch%dmean_rshort_l (ico) * scale_fac - cpatch%dmean_rlong_l (ico) = cpatch%dmean_rlong_l (ico) * scale_fac - cpatch%dmean_sensible_lc (ico) = cpatch%dmean_sensible_lc (ico) * scale_fac - cpatch%dmean_vapor_lc (ico) = cpatch%dmean_vapor_lc (ico) * scale_fac - cpatch%dmean_transp (ico) = cpatch%dmean_transp (ico) * scale_fac - cpatch%dmean_intercepted_al(ico) = cpatch%dmean_intercepted_al(ico) * scale_fac - cpatch%dmean_wshed_lg (ico) = cpatch%dmean_wshed_lg (ico) * scale_fac - cpatch%dmean_rshort_w (ico) = cpatch%dmean_rshort_w (ico) * scale_fac - cpatch%dmean_rlong_w (ico) = cpatch%dmean_rlong_w (ico) * scale_fac - cpatch%dmean_sensible_wc (ico) = cpatch%dmean_sensible_wc (ico) * scale_fac - cpatch%dmean_vapor_wc (ico) = cpatch%dmean_vapor_wc (ico) * scale_fac - cpatch%dmean_intercepted_aw(ico) = cpatch%dmean_intercepted_aw(ico) * scale_fac - cpatch%dmean_wshed_wg (ico) = cpatch%dmean_wshed_wg (ico) * scale_fac + !----- Monthly means. ---------------------------------------------------------------! + if (writing_eorq) then + cpatch%mmean_lai (ico) = cpatch%mmean_lai (ico) * mult + cpatch%mmean_leaf_energy (ico) = cpatch%mmean_leaf_energy (ico) * mult + cpatch%mmean_leaf_water (ico) = cpatch%mmean_leaf_water (ico) * mult + cpatch%mmean_leaf_hcap (ico) = cpatch%mmean_leaf_hcap (ico) * mult + cpatch%mmean_wood_energy (ico) = cpatch%mmean_wood_energy (ico) * mult + cpatch%mmean_wood_water (ico) = cpatch%mmean_wood_water (ico) * mult + cpatch%mmean_wood_hcap (ico) = cpatch%mmean_wood_hcap (ico) * mult + cpatch%mmean_water_supply (ico) = cpatch%mmean_water_supply (ico) * mult + cpatch%mmean_par_l (ico) = cpatch%mmean_par_l (ico) * mult + cpatch%mmean_par_l_beam (ico) = cpatch%mmean_par_l_beam (ico) * mult + cpatch%mmean_par_l_diff (ico) = cpatch%mmean_par_l_diff (ico) * mult + cpatch%mmean_rshort_l (ico) = cpatch%mmean_rshort_l (ico) * mult + cpatch%mmean_rlong_l (ico) = cpatch%mmean_rlong_l (ico) * mult + cpatch%mmean_sensible_lc (ico) = cpatch%mmean_sensible_lc (ico) * mult + cpatch%mmean_vapor_lc (ico) = cpatch%mmean_vapor_lc (ico) * mult + cpatch%mmean_transp (ico) = cpatch%mmean_transp (ico) * mult + cpatch%mmean_intercepted_al(ico) = cpatch%mmean_intercepted_al(ico) * mult + cpatch%mmean_wshed_lg (ico) = cpatch%mmean_wshed_lg (ico) * mult + cpatch%mmean_rshort_w (ico) = cpatch%mmean_rshort_w (ico) * mult + cpatch%mmean_rlong_w (ico) = cpatch%mmean_rlong_w (ico) * mult + cpatch%mmean_sensible_wc (ico) = cpatch%mmean_sensible_wc (ico) * mult + cpatch%mmean_vapor_wc (ico) = cpatch%mmean_vapor_wc (ico) * mult + cpatch%mmean_intercepted_aw(ico) = cpatch%mmean_intercepted_aw(ico) * mult + cpatch%mmean_wshed_wg (ico) = cpatch%mmean_wshed_wg (ico) * mult + cpatch%mmsqu_gpp (ico) = cpatch%mmsqu_gpp (ico) * mult_2 + cpatch%mmsqu_npp (ico) = cpatch%mmsqu_npp (ico) * mult_2 + cpatch%mmsqu_plresp (ico) = cpatch%mmsqu_plresp (ico) * mult_2 + cpatch%mmsqu_sensible_lc (ico) = cpatch%mmsqu_sensible_lc (ico) * mult_2 + cpatch%mmsqu_vapor_lc (ico) = cpatch%mmsqu_vapor_lc (ico) * mult_2 + cpatch%mmsqu_transp (ico) = cpatch%mmsqu_transp (ico) * mult_2 + cpatch%mmsqu_sensible_wc (ico) = cpatch%mmsqu_sensible_wc (ico) * mult_2 + cpatch%mmsqu_vapor_wc (ico) = cpatch%mmsqu_vapor_wc (ico) * mult_2 end if - if (iqoutput > 0) then - cpatch%qmean_par_l (:,ico) = cpatch%qmean_par_l (:,ico) *scale_fac - cpatch%qmean_par_l_beam (:,ico) = cpatch%qmean_par_l_beam (:,ico) *scale_fac - cpatch%qmean_par_l_diff (:,ico) = cpatch%qmean_par_l_diff (:,ico) *scale_fac - cpatch%qmean_rshort_l (:,ico) = cpatch%qmean_rshort_l (:,ico) *scale_fac - cpatch%qmean_rlong_l (:,ico) = cpatch%qmean_rlong_l (:,ico) *scale_fac - cpatch%qmean_sensible_lc (:,ico) = cpatch%qmean_sensible_lc (:,ico) *scale_fac - cpatch%qmean_vapor_lc (:,ico) = cpatch%qmean_vapor_lc (:,ico) *scale_fac - cpatch%qmean_transp (:,ico) = cpatch%qmean_transp (:,ico) *scale_fac - cpatch%qmean_intercepted_al(:,ico) = cpatch%qmean_intercepted_al(:,ico) *scale_fac - cpatch%qmean_wshed_lg (:,ico) = cpatch%qmean_wshed_lg (:,ico) *scale_fac - cpatch%qmean_rshort_w (:,ico) = cpatch%qmean_rshort_w (:,ico) *scale_fac - cpatch%qmean_rlong_w (:,ico) = cpatch%qmean_rlong_w (:,ico) *scale_fac - cpatch%qmean_sensible_wc (:,ico) = cpatch%qmean_sensible_wc (:,ico) *scale_fac - cpatch%qmean_vapor_wc (:,ico) = cpatch%qmean_vapor_wc (:,ico) *scale_fac - cpatch%qmean_intercepted_aw(:,ico) = cpatch%qmean_intercepted_aw(:,ico) *scale_fac - cpatch%qmean_wshed_wg (:,ico) = cpatch%qmean_wshed_wg (:,ico) *scale_fac + !----- Mean diel. -------------------------------------------------------------------! + if (writing_dcyc) then + cpatch%qmean_leaf_energy (:,ico) = cpatch%qmean_leaf_energy (:,ico) * mult + cpatch%qmean_leaf_water (:,ico) = cpatch%qmean_leaf_water (:,ico) * mult + cpatch%qmean_leaf_hcap (:,ico) = cpatch%qmean_leaf_hcap (:,ico) * mult + cpatch%qmean_wood_energy (:,ico) = cpatch%qmean_wood_energy (:,ico) * mult + cpatch%qmean_wood_water (:,ico) = cpatch%qmean_wood_water (:,ico) * mult + cpatch%qmean_wood_hcap (:,ico) = cpatch%qmean_wood_hcap (:,ico) * mult + cpatch%qmean_water_supply (:,ico) = cpatch%qmean_water_supply (:,ico) * mult + cpatch%qmean_par_l (:,ico) = cpatch%qmean_par_l (:,ico) * mult + cpatch%qmean_par_l_beam (:,ico) = cpatch%qmean_par_l_beam (:,ico) * mult + cpatch%qmean_par_l_diff (:,ico) = cpatch%qmean_par_l_diff (:,ico) * mult + cpatch%qmean_rshort_l (:,ico) = cpatch%qmean_rshort_l (:,ico) * mult + cpatch%qmean_rlong_l (:,ico) = cpatch%qmean_rlong_l (:,ico) * mult + cpatch%qmean_sensible_lc (:,ico) = cpatch%qmean_sensible_lc (:,ico) * mult + cpatch%qmean_vapor_lc (:,ico) = cpatch%qmean_vapor_lc (:,ico) * mult + cpatch%qmean_transp (:,ico) = cpatch%qmean_transp (:,ico) * mult + cpatch%qmean_intercepted_al(:,ico) = cpatch%qmean_intercepted_al(:,ico) * mult + cpatch%qmean_wshed_lg (:,ico) = cpatch%qmean_wshed_lg (:,ico) * mult + cpatch%qmean_rshort_w (:,ico) = cpatch%qmean_rshort_w (:,ico) * mult + cpatch%qmean_rlong_w (:,ico) = cpatch%qmean_rlong_w (:,ico) * mult + cpatch%qmean_sensible_wc (:,ico) = cpatch%qmean_sensible_wc (:,ico) * mult + cpatch%qmean_vapor_wc (:,ico) = cpatch%qmean_vapor_wc (:,ico) * mult + cpatch%qmean_intercepted_aw(:,ico) = cpatch%qmean_intercepted_aw(:,ico) * mult + cpatch%qmean_wshed_wg (:,ico) = cpatch%qmean_wshed_wg (:,ico) * mult + cpatch%qmsqu_gpp (:,ico) = cpatch%qmsqu_gpp (:,ico) * mult_2 + cpatch%qmsqu_npp (:,ico) = cpatch%qmsqu_npp (:,ico) * mult_2 + cpatch%qmsqu_plresp (:,ico) = cpatch%qmsqu_plresp (:,ico) * mult_2 + cpatch%qmsqu_sensible_lc (:,ico) = cpatch%qmsqu_sensible_lc (:,ico) * mult_2 + cpatch%qmsqu_vapor_lc (:,ico) = cpatch%qmsqu_vapor_lc (:,ico) * mult_2 + cpatch%qmsqu_transp (:,ico) = cpatch%qmsqu_transp (:,ico) * mult_2 + cpatch%qmsqu_sensible_wc (:,ico) = cpatch%qmsqu_sensible_wc (:,ico) * mult_2 + cpatch%qmsqu_vapor_wc (:,ico) = cpatch%qmsqu_vapor_wc (:,ico) * mult_2 end if !------------------------------------------------------------------------------------! From 6dd8c5c7ac561be771be0453d7e65fc7ac6c9b45 Mon Sep 17 00:00:00 2001 From: Marcos Longo Date: Sat, 17 Nov 2012 20:01:40 -0500 Subject: [PATCH 2/6] 1. Added a few scripts that are useful for controlling massive simulations (thousands of runs). a. make_joborder.r - It helps creating the joborder.txt. b. read_monthly.r - It reads the monthly mean files but it doesn't create anything c. run_monthly.sh - script to call read_monthly.r for all simulations (useful for crontab) d. plot.status.r - suggested script to plot stuff for the runs, but it is not a general script, you will probably need to adjust it for each group of runs. 2. Changed ed_state_vars.f90 so it only writes fmean, dmean, mmean, qmean variables to history if it makes sense to do so. For example, there is no need to write daily means to history unless history files are written more often than once a day. 3. Updated some R scripts to be able to read the new output variables. --- .bzrignore | 1133 +++++ BRAMS/src/ed2/edcp_load_namelist.f90 | 10 +- BRAMS/src/ed2/edcp_mpiutils.f90 | 16 +- ED/Template/Template/callserial.sh | 2 +- ED/Template/Template/plot_monthly.r | 422 +- ED/Template/Template/plot_ycomp.r | 33 +- ED/Template/Template/plot_yearly.r | 923 ++-- ED/Template/Template/read_monthly.r | 203 + ED/Template/Template/whichrun.r | 157 +- ED/Template/compare_scenarios.r | 6267 +++++++++++++++++++------- ED/Template/epost.sh | 29 +- ED/Template/make_joborder.r | 276 ++ ED/Template/read_monthly.sh | 517 +++ ED/Template/run_sitter.sh | 1487 +++++- ED/Template/sit_utils/head.txt | 3 + ED/Template/sit_utils/plot.status.r | 623 +++ ED/Template/sit_utils/tail.txt | 10 + ED/Template/spawn_poly.sh | 121 +- ED/src/dynamics/disturbance.f90 | 719 ++- ED/src/io/ed_init_full_history.F90 | 54 +- ED/src/io/ed_load_namelist.f90 | 10 +- ED/src/memory/ed_misc_coms.f90 | 3 + ED/src/memory/ed_state_vars.f90 | 2967 ++++++------ ED/src/mpi/ed_mpass_init.f90 | 16 +- 24 files changed, 11942 insertions(+), 4059 deletions(-) create mode 100644 ED/Template/Template/read_monthly.r create mode 100644 ED/Template/make_joborder.r create mode 100755 ED/Template/read_monthly.sh create mode 100644 ED/Template/sit_utils/head.txt create mode 100644 ED/Template/sit_utils/plot.status.r create mode 100644 ED/Template/sit_utils/tail.txt diff --git a/.bzrignore b/.bzrignore index d1cea2efc..d930302c5 100644 --- a/.bzrignore +++ b/.bzrignore @@ -12168,3 +12168,1136 @@ ED/dbgbuild/bin/budget_utils.mod BRAMS/i12build ED/dbgbuild/bin/update_cohort_extensive_props_mod.f90 ED/dbgbuild/bin/update_cohort_extensive_props_mod.mod +ED/dbgbuild/bin/a3e0_mod.f90 +ED/dbgbuild/bin/a3e1_mod.f90 +ED/dbgbuild/bin/a3e2_mod.f90 +ED/dbgbuild/bin/accum_mod.f90 +ED/dbgbuild/bin/acnst_mod.f90 +ED/dbgbuild/bin/adivb_mod.f90 +ED/dbgbuild/bin/adjust_sfcw_properties_mod.f90 +ED/dbgbuild/bin/adjust_topsoil_properties_mod.f90 +ED/dbgbuild/bin/adjust_veg_properties_mod.f90 +ED/dbgbuild/bin/ae0_mod.f90 +ED/dbgbuild/bin/ae1m1_mod.f90 +ED/dbgbuild/bin/ae1_mod.f90 +ED/dbgbuild/bin/ae1p1_mod.f90 +ED/dbgbuild/bin/ae1p1p1_mod.f90 +ED/dbgbuild/bin/ae1t0_mod.f90 +ED/dbgbuild/bin/ae1t0p1_mod.f90 +ED/dbgbuild/bin/ae1t1_mod.f90 +ED/dbgbuild/bin/ae1t1p1_mod.f90 +ED/dbgbuild/bin/ae1tn1_mod.f90 +ED/dbgbuild/bin/ae2_mod.f90 +ED/dbgbuild/bin/ae3m3d0_mod.f90 +ED/dbgbuild/bin/ae3m3_mod.f90 +ED/dbgbuild/bin/ae3_mod.f90 +ED/dbgbuild/bin/ae3p3_mod.f90 +ED/dbgbuild/bin/ae3t0p3_mod.f90 +ED/dbgbuild/bin/ae3t3_mod.f90 +ED/dbgbuild/bin/ae3t3p3_mod.f90 +ED/dbgbuild/bin/aen1_mod.f90 +ED/dbgbuild/bin/aen3t0p3_mod.f90 +ED/dbgbuild/bin/aggregate_polygon_fmean_mod.f90 +ED/dbgbuild/bin/aggregate_polygon_not_fmean_mod.f90 +ED/dbgbuild/bin/alebl_mod.f90 +ED/dbgbuild/bin/allometry.f90 +ED/dbgbuild/bin/angle_of_incid_mod.f90 +ED/dbgbuild/bin/an_header.f90 +ED/dbgbuild/bin/aone_mod.f90 +ED/dbgbuild/bin/apply_forestry_mod.f90 +ED/dbgbuild/bin/array2xcol_mod.f90 +ED/dbgbuild/bin/array2ycol_mod.f90 +ED/dbgbuild/bin/array2zcol_mod.f90 +ED/dbgbuild/bin/assign_prescribed_phen_mod.f90 +ED/dbgbuild/bin/atimb_mod.f90 +ED/dbgbuild/bin/atob_log_mod.f90 +ED/dbgbuild/bin/atob_mod.f90 +ED/dbgbuild/bin/average_utils.f90 +ED/dbgbuild/bin/avg_ed_daily_output_pool_mod.f90 +ED/dbgbuild/bin/azero_mod.f90 +ED/dbgbuild/bin/banbks_mod.f90 +ED/dbgbuild/bin/bandec_mod.f90 +ED/dbgbuild/bin/bdf2_solver.f90 +ED/dbgbuild/bin/bdf2_solver_mod.f90 +ED/dbgbuild/bin/budget_utils.f90 +ED/dbgbuild/bin/c34constants.f90 +ED/dbgbuild/bin/calc_flow_routing_mod.f90 +ED/dbgbuild/bin/calchydrosubsurface_mod.f90 +ED/dbgbuild/bin/calchydrosurface_mod.f90 +ED/dbgbuild/bin/calc_met_lapse_mod.f90 +ED/dbgbuild/bin/calcwatertable_mod.f90 +ED/dbgbuild/bin/canopy_air_coms.f90 +ED/dbgbuild/bin/canopy_derivs_two_mod.f90 +ED/dbgbuild/bin/canopy_layer_coms.f90 +ED/dbgbuild/bin/canopy_photosynthesis_mod.f90 +ED/dbgbuild/bin/canopy_radiation_coms.f90 +ED/dbgbuild/bin/canopy_struct_dynamics.f90 +ED/dbgbuild/bin/cbrt8_mod.f90 +ED/dbgbuild/bin/cbrt_mod.f90 +ED/dbgbuild/bin/cdf2normal_mod.f90 +ED/dbgbuild/bin/cdf_mod.f90 +ED/dbgbuild/bin/char_strip_var_mod.f90 +ED/dbgbuild/bin/charutils.f90 +ED/dbgbuild/bin/check_real_mod.f90 +ED/dbgbuild/bin/check_rescale_mod.f90 +ED/dbgbuild/bin/compute_c_and_n_storage_mod.f90 +ED/dbgbuild/bin/copy_bdf2_prev_mod.f90 +ED/dbgbuild/bin/copy_fb_patch_mod.f90 +ED/dbgbuild/bin/copy_initp2prev_mod.f90 +ED/dbgbuild/bin/copy_met_2_rk4site_mod.f90 +ED/dbgbuild/bin/copy_nl_mod.f90 +ED/dbgbuild/bin/copy_patch_init_carbon_mod.f90 +ED/dbgbuild/bin/copy_patch_init_mod.f90 +ED/dbgbuild/bin/copy_path_from_grid_1_mod.f90 +ED/dbgbuild/bin/copy_prev2patch_mod.f90 +ED/dbgbuild/bin/copy_rk4_patch_mod.f90 +ED/dbgbuild/bin/count_pft_xml_config_mod.f90 +ED/dbgbuild/bin/cputime_mod.f90 +ED/dbgbuild/bin/create_ed10_ed20_fname_mod.f90 +ED/dbgbuild/bin/cumsum_mod.f90 +ED/dbgbuild/bin/cvmgm_mod.f90 +ED/dbgbuild/bin/cvmgn_mod.f90 +ED/dbgbuild/bin/cvmgp_mod.f90 +ED/dbgbuild/bin/cvmgz_mod.f90 +ED/dbgbuild/bin/date_2_seconds_mod.f90 +ED/dbgbuild/bin/date_abs_secs2_mod.f90 +ED/dbgbuild/bin/date_add_to_mod.f90 +ED/dbgbuild/bin/date_secs_ymdt_mod.f90 +ED/dbgbuild/bin/date_unmake_big_mod.f90 +ED/dbgbuild/bin/dateutils.f90 +ED/dbgbuild/bin/dcvmgm_mod.f90 +ED/dbgbuild/bin/dcvmgp_mod.f90 +ED/dbgbuild/bin/dcw_swap16_mod.f90 +ED/dbgbuild/bin/dcw_swap32_mod.f90 +ED/dbgbuild/bin/dcw_swap64_mod.f90 +ED/dbgbuild/bin/deblank_mod.f90 +ED/dbgbuild/bin/decomp_coms.f90 +ED/dbgbuild/bin/detab_mod.f90 +ED/dbgbuild/bin/detailed_coms.f90 +ED/dbgbuild/bin/diagon_mod.f90 +ED/dbgbuild/bin/dist_gc_mod.f90 +ED/dbgbuild/bin/disturbance.f90 +ED/dbgbuild/bin/disturb_coms.f90 +ED/dbgbuild/bin/dmax2_mod.f90 +ED/dbgbuild/bin/dmin2_mod.f90 +ED/dbgbuild/bin/dssum_mod.f90 +ED/dbgbuild/bin/dump_radinfo_mod.f90 +ED/dbgbuild/bin/ed1_fileinfo_mod.f90 +ED/dbgbuild/bin/ed_1st.f90 +ED/dbgbuild/bin/ed_1st_master_mod.f90 +ED/dbgbuild/bin/ed_1st_node_mod.f90 +ED/dbgbuild/bin/ed21_fileinfo_mod.f90 +ED/dbgbuild/bin/ed_bigleaf_init.f90 +ED/dbgbuild/bin/ed_bigleaf_init_mod.f90 +ED/dbgbuild/bin/ed_datp_datq_mod.f90 +ED/dbgbuild/bin/ed_datp_datsoil_mod.f90 +ED/dbgbuild/bin/ed_driver.f90 +ED/dbgbuild/bin/ed_driver_mod.f90 +ED/dbgbuild/bin/ed_filelist_mod.f90 +ED/dbgbuild/bin/ed_grid.f90 +ED/dbgbuild/bin/ed_gridset_mod.f90 +ED/dbgbuild/bin/ed_init_atm_mod.f90 +ED/dbgbuild/bin/ed_init.f90 +ED/dbgbuild/bin/edio.f90 +ED/dbgbuild/bin/ed_ll_xy_mod.f90 +ED/dbgbuild/bin/ed_load_namelist.f90 +ED/dbgbuild/bin/ed_load_work_from_history_mod.f90 +ED/dbgbuild/bin/ed_masterput_met_header_mod.f90 +ED/dbgbuild/bin/ed_masterput_nl_mod.f90 +ED/dbgbuild/bin/ed_masterput_poly_dims_mod.f90 +ED/dbgbuild/bin/ed_masterput_processid_mod.f90 +ED/dbgbuild/bin/ed_masterput_worklist_info_mod.f90 +ED/dbgbuild/bin/ed_mem_alloc.f90 +ED/dbgbuild/bin/ed_mem_alloc_mod.f90 +ED/dbgbuild/bin/ed_mem_grid_dim_defs.f90 +ED/dbgbuild/bin/ed_met_driver.f90 +ED/dbgbuild/bin/ed_misc_coms.f90 +ED/dbgbuild/bin/ed_model.f90 +ED/dbgbuild/bin/ed_model_mod.f90 +ED/dbgbuild/bin/ed_mpass_init.f90 +ED/dbgbuild/bin/ed_nbg_init.f90 +ED/dbgbuild/bin/ed_newgrid_mod.f90 +ED/dbgbuild/bin/ed_node_coms.f90 +ED/dbgbuild/bin/ed_node_decomp_mod.f90 +ED/dbgbuild/bin/ed_nodeget_met_header_mod.f90 +ED/dbgbuild/bin/ed_nodeget_nl_mod.f90 +ED/dbgbuild/bin/ed_nodeget_poly_dims_mod.f90 +ED/dbgbuild/bin/ed_nodeget_processid_mod.f90 +ED/dbgbuild/bin/ed_nodeget_worklist_info_mod.f90 +ED/dbgbuild/bin/ed_opspec_grid_mod.f90 +ED/dbgbuild/bin/ed_opspec_misc_mod.f90 +ED/dbgbuild/bin/ed_opspec_par_mod.f90 +ED/dbgbuild/bin/ed_opspec_times_mod.f90 +ED/dbgbuild/bin/ed_output_mod.f90 +ED/dbgbuild/bin/ed_para_coms.f90 +ED/dbgbuild/bin/ed_params.f90 +ED/dbgbuild/bin/ed_parvec_work_mod.f90 +ED/dbgbuild/bin/ed_polarst_mod.f90 +ED/dbgbuild/bin/ed_print.f90 +ED/dbgbuild/bin/ed_read_ed10_20_history.f90 +ED/dbgbuild/bin/ed_state_vars.f90 +ED/dbgbuild/bin/ed_therm_lib.f90 +ED/dbgbuild/bin/ed_type_init.f90 +ED/dbgbuild/bin/ed_var_tables.f90 +ED/dbgbuild/bin/ed_work_vars.f90 +ED/dbgbuild/bin/ed_xml_config.f90 +ED/dbgbuild/bin/ed_xy_ll_mod.f90 +ED/dbgbuild/bin/ed_zen_mod.f90 +ED/dbgbuild/bin/eifun8_mod.f90 +ED/dbgbuild/bin/elgs_mod.f90 +ED/dbgbuild/bin/ename_coms.f90 +ED/dbgbuild/bin/endian_mod.f90 +ED/dbgbuild/bin/errorfun_mod.f90 +ED/dbgbuild/bin/euler_driver.f90 +ED/dbgbuild/bin/euler_integ_mod.f90 +ED/dbgbuild/bin/euler_timestep_mod.f90 +ED/dbgbuild/bin/event_fertilize_mod.f90 +ED/dbgbuild/bin/event_fire_mod.f90 +ED/dbgbuild/bin/event_harvest_mod.f90 +ED/dbgbuild/bin/event_irrigate_mod.f90 +ED/dbgbuild/bin/event_planting_mod.f90 +ED/dbgbuild/bin/events.f90 +ED/dbgbuild/bin/event_till_mod.f90 +ED/dbgbuild/bin/expected_mod.f90 +ED/dbgbuild/bin/expmsq_mod.f90 +ED/dbgbuild/bin/exterminate_patches_except_mod.f90 +ED/dbgbuild/bin/fail_whale_mod.f90 +ED/dbgbuild/bin/farq_leuning.f90 +ED/dbgbuild/bin/fatal_error.f90 +ED/dbgbuild/bin/fatal_error_mod.f90 +ED/dbgbuild/bin/fb_dy_step_trunc_mod.f90 +ED/dbgbuild/bin/fb_sanity_check_mod.f90 +ED/dbgbuild/bin/fill_history_grid_mod.f90 +ED/dbgbuild/bin/fill_history_patch_mod.f90 +ED/dbgbuild/bin/fill_history_polygon_mod.f90 +ED/dbgbuild/bin/fill_history_site_mod.f90 +ED/dbgbuild/bin/fillvar_l_mod.f90 +ED/dbgbuild/bin/find_closing_comment_mod.f90 +ED/dbgbuild/bin/find_frqsum_mod.f90 +ED/dbgbuild/bin/findln_mod.f90 +ED/dbgbuild/bin/find_rank_mod.f90 +ED/dbgbuild/bin/fire.f90 +ED/dbgbuild/bin/fire_frequency_mod.f90 +ED/dbgbuild/bin/flag_stable_cohorts_mod.f90 +ED/dbgbuild/bin/forestry.f90 +ED/dbgbuild/bin/fuse_fiss_utils.f90 +ED/dbgbuild/bin/fusion_fission_coms.f90 +ED/dbgbuild/bin/getconfigint_mod.f90 +ED/dbgbuild/bin/getconfigreal_mod.f90 +ED/dbgbuild/bin/getconfigstring_mod.f90 +ED/dbgbuild/bin/get_errmax_mod.f90 +ED/dbgbuild/bin/get_file_indices_mod.f90 +ED/dbgbuild/bin/get_grid_mod.f90 +ED/dbgbuild/bin/geth5dims_mod.f90 +ED/dbgbuild/bin/getll_mod.f90 +ED/dbgbuild/bin/get_work_mod.f90 +ED/dbgbuild/bin/get_yscal_mod.f90 +ED/dbgbuild/bin/great_circle.f90 +ED/dbgbuild/bin/grid_coms.f90 +ED/dbgbuild/bin/growth_balive.f90 +ED/dbgbuild/bin/h5_output_mod.f90 +ED/dbgbuild/bin/harv_immat_patches_mod.f90 +ED/dbgbuild/bin/harv_mat_patches_mod.f90 +ED/dbgbuild/bin/hdf_getslab_d_mod.f90 +ED/dbgbuild/bin/hdf_getslab_i_mod.f90 +ED/dbgbuild/bin/hdf_getslab_r_mod.f90 +ED/dbgbuild/bin/heav_mod.f90 +ED/dbgbuild/bin/het_resp_weight_mod.f90 +ED/dbgbuild/bin/heun_driver.f90 +ED/dbgbuild/bin/heun_integ_mod.f90 +ED/dbgbuild/bin/heun_stepper_mod.f90 +ED/dbgbuild/bin/heun_timestep_mod.f90 +ED/dbgbuild/bin/how_to_read_a_file_mod.f90 +ED/dbgbuild/bin/hybrid_driver.f90 +ED/dbgbuild/bin/hybrid_integ_mod.f90 +ED/dbgbuild/bin/hybrid_timestep_mod.f90 +ED/dbgbuild/bin/hydrology_coms.f90 +ED/dbgbuild/bin/hydrology_constants.f90 +ED/dbgbuild/bin/ibias_mod.f90 +ED/dbgbuild/bin/ibindec_mod.f90 +ED/dbgbuild/bin/ifirstchar_mod.f90 +ED/dbgbuild/bin/inc_fwd_patch_mod.f90 +ED/dbgbuild/bin/inc_rk4_patch_mod.f90 +ED/dbgbuild/bin/init_can_air_params_mod.f90 +ED/dbgbuild/bin/init_can_lyr_params_mod.f90 +ED/dbgbuild/bin/init_can_rad_params_mod.f90 +ED/dbgbuild/bin/init_cohorts_by_layers_mod.f90 +ED/dbgbuild/bin/init_decomp_params_mod.f90 +ED/dbgbuild/bin/init_disturb_params_mod.f90 +ED/dbgbuild/bin/init_ed_cohort_vars_mod.f90 +ED/dbgbuild/bin/init_ed_misc_coms_mod.f90 +ED/dbgbuild/bin/init_ed_patch_vars_mod.f90 +ED/dbgbuild/bin/init_ed_poly_vars_mod.f90 +ED/dbgbuild/bin/init_ed_site_vars_mod.f90 +ED/dbgbuild/bin/init_ff_coms_mod.f90 +ED/dbgbuild/bin/init_full_history_restart_mod.f90 +ED/dbgbuild/bin/init_hydro_coms_mod.f90 +ED/dbgbuild/bin/inithydrology_mod.f90 +ED/dbgbuild/bin/init_hydro_sites.f90 +ED/dbgbuild/bin/inithydrosubsurface_mod.f90 +ED/dbgbuild/bin/initialize_rk4patches_mod.f90 +ED/dbgbuild/bin/init_lapse_params_mod.f90 +ED/dbgbuild/bin/init_met_drivers_mod.f90 +ED/dbgbuild/bin/init_met_params_mod.f90 +ED/dbgbuild/bin/init_nbg_cohorts_mod.f90 +ED/dbgbuild/bin/init_output_params_mod.f90 +ED/dbgbuild/bin/init_pft_alloc_params_mod.f90 +ED/dbgbuild/bin/init_pft_derived_params_mod.f90 +ED/dbgbuild/bin/init_pft_leaf_params_mod.f90 +ED/dbgbuild/bin/init_pft_mort_params_mod.f90 +ED/dbgbuild/bin/init_pft_nitro_params_mod.f90 +ED/dbgbuild/bin/init_pft_photo_params_mod.f90 +ED/dbgbuild/bin/init_pft_repro_params_mod.f90 +ED/dbgbuild/bin/init_pft_resp_params_mod.f90 +ED/dbgbuild/bin/init_phen_coms_mod.f90 +ED/dbgbuild/bin/init_physiology_params_mod.f90 +ED/dbgbuild/bin/init_rk4_params_mod.f90 +ED/dbgbuild/bin/init_soil_coms_mod.f90 +ED/dbgbuild/bin/integrate_ed_dmean_vars_mod.f90 +ED/dbgbuild/bin/integrate_ed_fmean_met_vars_mod.f90 +ED/dbgbuild/bin/integrate_ed_mmean_vars_mod.f90 +ED/dbgbuild/bin/integrate_ed_qmean_vars_mod.f90 +ED/dbgbuild/bin/integrate_patch_euler_mod.f90 +ED/dbgbuild/bin/integrate_patch_heun_mod.f90 +ED/dbgbuild/bin/int_met_avg_mod.f90 +ED/dbgbuild/bin/inventory_mat_forests_mod.f90 +ED/dbgbuild/bin/invmondays.f90 +ED/dbgbuild/bin/iprim_mod.f90 +ED/dbgbuild/bin/iran_recsize_mod.f90 +ED/dbgbuild/bin/is_finite8_mod.f90 +ED/dbgbuild/bin/is_finite_mod.f90 +ED/dbgbuild/bin/isleap_mod.f90 +ED/dbgbuild/bin/ismax_mod.f90 +ED/dbgbuild/bin/ismin_mod.f90 +ED/dbgbuild/bin/is_resolvable_mod.f90 +ED/dbgbuild/bin/ivalugp_mod.f90 +ED/dbgbuild/bin/izero_mod.f90 +ED/dbgbuild/bin/julday1000_mod.f90 +ED/dbgbuild/bin/julday_mod.f90 +ED/dbgbuild/bin/landuse_init.f90 +ED/dbgbuild/bin/landuse_init_mod.f90 +ED/dbgbuild/bin/lapse.f90 +ED/dbgbuild/bin/large_error_mod.f90 +ED/dbgbuild/bin/lastchar_mod.f90 +ED/dbgbuild/bin/lastmonthdate_mod.f90 +ED/dbgbuild/bin/lastslash_mod.f90 +ED/dbgbuild/bin/leaf_database.f90 +ED/dbgbuild/bin/leaf_database_mod.f90 +ED/dbgbuild/bin/leaf_derivs_mod.f90 +ED/dbgbuild/bin/leaftw_derivs_mod.f90 +ED/dbgbuild/bin/libxml2f90__closeall_mod.f90 +ED/dbgbuild/bin/libxml2f90__closefile_mod.f90 +ED/dbgbuild/bin/libxml2f90_error_getline_mod.f90 +ED/dbgbuild/bin/libxml2f90__existid_mod.f90 +ED/dbgbuild/bin/libxml2f90_existid_mod.f90 +ED/dbgbuild/bin/libxml2f90__existpid_mod.f90 +ED/dbgbuild/bin/libxml2f90.f90_pp.f90 +ED/dbgbuild/bin/libxml2f90__findinchara_mod.f90 +ED/dbgbuild/bin/libxml2f90__flush_mod.f90 +ED/dbgbuild/bin/libxml2f90__get_fileunit_mod.f90 +ED/dbgbuild/bin/libxml2f90_getline_mod.f90 +ED/dbgbuild/bin/libxml2f90_getsafec8_mod.f90 +ED/dbgbuild/bin/libxml2f90_getsafei4_mod.f90 +ED/dbgbuild/bin/libxml2f90_getsafel4_mod.f90 +ED/dbgbuild/bin/libxml2f90_getsafer8_mod.f90 +ED/dbgbuild/bin/libxml2f90__getunit_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_addid_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_addid_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_add_list_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_add_list_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_addpid_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_addpid_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_addpureid_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_closetag_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_closetag_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_down_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_edit_id_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_edit_id_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_edit_pid_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_edit_pid_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_exist_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getc8__mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getc8_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_getc8_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getch_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_getch_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getch_scal_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_geti4__mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_geti4_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_geti4_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getl4__mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getl4_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_getl4_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getpc8__mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getpc8_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getpch_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getpi4__mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getpi4_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getpl4__mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getpl4_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getpr8__mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getpr8_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getpsize_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getpstring__mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getpstring_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getr8__mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getr8_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_getr8_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getsize_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_getsize_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getstring__mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getstring_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_getstring_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_initlist_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_inittag_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_opentag_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_opentag_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_report_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_report_rec_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_report_rec_wrap_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_selectlist_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_selecttag_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_up_mod.f90 +ED/dbgbuild/bin/libxml2f90__openfile_mod.f90 +ED/dbgbuild/bin/libxml2f90_parse_file_mod.f90 +ED/dbgbuild/bin/libxml2f90_parse_find_char_mod.f90 +ED/dbgbuild/bin/libxml2f90__readin_file_mod.f90 +ED/dbgbuild/bin/libxml2f90_readin_file_mod.f90 +ED/dbgbuild/bin/libxml2f90__readin_nfil_mod.f90 +ED/dbgbuild/bin/libxml2f90__set_casesensitive_mod.f90 +ED/dbgbuild/bin/libxml2f90__set_default_ll_id_mod.f90 +ED/dbgbuild/bin/libxml2f90__setformat_mod.f90 +ED/dbgbuild/bin/libxml2f90__set_paw_mod.f90 +ED/dbgbuild/bin/libxml2f90__set_rmcomma_mod.f90 +ED/dbgbuild/bin/libxml2f90__set_rmquotes_mod.f90 +ED/dbgbuild/bin/libxml2f90__settransform_exm_mod.f90 +ED/dbgbuild/bin/libxml2f90__setwrite_exm_mod.f90 +ED/dbgbuild/bin/libxml2f90_tostringa_mod.f90 +ED/dbgbuild/bin/libxml2f90_tostring_mod.f90 +ED/dbgbuild/bin/libxml2f90_transform_paw_mod.f90 +ED/dbgbuild/bin/lisys_solver8_mod.f90 +ED/dbgbuild/bin/lisys_solver_mod.f90 +ED/dbgbuild/bin/load_ecosystem_state_mod.f90 +ED/dbgbuild/bin/load_ed_ecosystem_params_mod.f90 +ED/dbgbuild/bin/lsm_hyd.f90 +ED/dbgbuild/bin/lubksb_dble_mod.f90 +ED/dbgbuild/bin/ludcmp_dble_mod.f90 +ED/dbgbuild/bin/lw_multiple_scatter_mod.f90 +ED/dbgbuild/bin/lw_twostream_mod.f90 +ED/dbgbuild/bin/makefnam_mod.f90 +ED/dbgbuild/bin/match_poly_grid_mod.f90 +ED/dbgbuild/bin/mat_forest_harv_rates_mod.f90 +ED/dbgbuild/bin/mean_daysecz_mod.f90 +ED/dbgbuild/bin/mem_polygons.f90 +ED/dbgbuild/bin/met_driver_coms.f90 +ED/dbgbuild/bin/met_sanity_check_mod.f90 +ED/dbgbuild/bin/migs_mod.f90 +ED/dbgbuild/bin/mk_2_buff_mod.f90 +ED/dbgbuild/bin/mk_2p_buff_mod.f90 +ED/dbgbuild/bin/mk_3_buff_mod.f90 +ED/dbgbuild/bin/mk_4_buff_mod.f90 +ED/dbgbuild/bin/mortality.f90 +ED/dbgbuild/bin/mprove_mod.f90 +ED/dbgbuild/bin/multiple_scatter.f90 +ED/dbgbuild/bin/near_bare_ground_big_leaf_init_mod.f90 +ED/dbgbuild/bin/near_bare_ground_init_mod.f90 +ED/dbgbuild/bin/new_patch_sfc_props_mod.f90 +ED/dbgbuild/bin/normalize_ed_dmean_vars_mod.f90 +ED/dbgbuild/bin/normalize_ed_fmean_vars_mod.f90 +ED/dbgbuild/bin/normalize_ed_mmean_vars_mod.f90 +ED/dbgbuild/bin/normalize_ed_qmean_vars_mod.f90 +ED/dbgbuild/bin/normalize_ed_todaynpp_vars_mod.f90 +ED/dbgbuild/bin/normalize_ed_today_vars_mod.f90 +ED/dbgbuild/bin/normalize_fmean_vars_mod.f90 +ED/dbgbuild/bin/norm_harv_patch_mod.f90 +ED/dbgbuild/bin/num_days_mod.f90 +ED/dbgbuild/bin/numutils.f90 +ED/dbgbuild/bin/odeint_mod.f90 +ED/dbgbuild/bin/opspec_fatal_mod.f90 +ED/dbgbuild/bin/optimiz_coms.f90 +ED/dbgbuild/bin/overwrite_with_xml_config_mod.f90 +ED/dbgbuild/bin/parsefnam_mod.f90 +ED/dbgbuild/bin/parse_mod.f90 +ED/dbgbuild/bin/pft_coms.f90 +ED/dbgbuild/bin/phenology_aux.f90 +ED/dbgbuild/bin/phenology_coms.f90 +ED/dbgbuild/bin/phenology_driver_eq_0_mod.f90 +ED/dbgbuild/bin/phenology_driver_mod.f90 +ED/dbgbuild/bin/phenology_driv.f90 +ED/dbgbuild/bin/phenology_startup.f90 +ED/dbgbuild/bin/phenology_thresholds_mod.f90 +ED/dbgbuild/bin/photosyn_driv.f90 +ED/dbgbuild/bin/physiology_coms.f90 +ED/dbgbuild/bin/plant_structural_allocation_mod.f90 +ED/dbgbuild/bin/prescribed_event_mod.f90 +ED/dbgbuild/bin/print_c_and_n_budgets_mod.f90 +ED/dbgbuild/bin/print_csiteipa_mod.f90 +ED/dbgbuild/bin/print_errmax_mod.f90 +ED/dbgbuild/bin/print_fields_mod.f90 +ED/dbgbuild/bin/print_photo_details_mod.f90 +ED/dbgbuild/bin/print_rk4patch_mod.f90 +ED/dbgbuild/bin/print_rk4_state_mod.f90 +ED/dbgbuild/bin/print_soil_info_mod.f90 +ED/dbgbuild/bin/putconfigint_mod.f90 +ED/dbgbuild/bin/putconfigreal8_mod.f90 +ED/dbgbuild/bin/putconfigreal_mod.f90 +ED/dbgbuild/bin/putconfigstring_mod.f90 +ED/dbgbuild/bin/radiate_driver.f90 +ED/dbgbuild/bin/radiate_driver_mod.f90 +ED/dbgbuild/bin/radiate_utils.f90 +ED/dbgbuild/bin/rams_f_open_mod.f90 +ED/dbgbuild/bin/rank_down_mod.f90 +ED/dbgbuild/bin/rank_up_mod.f90 +ED/dbgbuild/bin/read_ed10_ed20_history_file_mod.f90 +ED/dbgbuild/bin/read_ed21_history_file_mod.f90 +ED/dbgbuild/bin/read_ed21_history_unstruct_mod.f90 +ED/dbgbuild/bin/read_ed21_polyclone_mod.f90 +ED/dbgbuild/bin/read_ed_xml_config_mod.f90 +ED/dbgbuild/bin/read_events_xml_mod.f90 +ED/dbgbuild/bin/read_met_driver_head_mod.f90 +ED/dbgbuild/bin/read_met_drivers_init_mod.f90 +ED/dbgbuild/bin/read_met_drivers_mod.f90 +ED/dbgbuild/bin/read_nl_mod.f90 +ED/dbgbuild/bin/read_ol_file_mod.f90 +ED/dbgbuild/bin/read_plantation_fractions_mod.f90 +ED/dbgbuild/bin/read_site_file_mod.f90 +ED/dbgbuild/bin/read_soil_depth_mod.f90 +ED/dbgbuild/bin/read_soil_moist_temp_mod.f90 +ED/dbgbuild/bin/rearrange_mod.f90 +ED/dbgbuild/bin/reproduction_eq_0_mod.f90 +ED/dbgbuild/bin/reproduction.f90 +ED/dbgbuild/bin/reproduction_mod.f90 +ED/dbgbuild/bin/reset_fmean_vars_mod.f90 +ED/dbgbuild/bin/resp_f_decomp_mod.f90 +ED/dbgbuild/bin/resp_rh_mod.f90 +ED/dbgbuild/bin/rk4_coms.f90 +ED/dbgbuild/bin/rk4_integ_utils.f90 +ED/dbgbuild/bin/rk4_misc.f90 +ED/dbgbuild/bin/root_resp_norm_mod.f90 +ED/dbgbuild/bin/scale_ed_radiation_mod.f90 +ED/dbgbuild/bin/seed_dispersal_mod.f90 +ED/dbgbuild/bin/selective_gaussian_2body_mod.f90 +ED/dbgbuild/bin/setlapseparms_mod.f90 +ED/dbgbuild/bin/set_polygon_coordinates_mod.f90 +ED/dbgbuild/bin/set_site_defprops_mod.f90 +ED/dbgbuild/bin/sfcdata_ed_mod.f90 +ED/dbgbuild/bin/sfcrad_ed_mod.f90 +ED/dbgbuild/bin/short2diff_sib_mod.f90 +ED/dbgbuild/bin/short_bdown_weissnorman_mod.f90 +ED/dbgbuild/bin/sngloff_mod.f90 +ED/dbgbuild/bin/soil_default_fill_mod.f90 +ED/dbgbuild/bin/soil_respiration.f90 +ED/dbgbuild/bin/soil_respiration_mod.f90 +ED/dbgbuild/bin/solar_radiation_breakdown_mod.f90 +ED/dbgbuild/bin/sort3_mod.f90 +ED/dbgbuild/bin/sort_down_mod.f90 +ED/dbgbuild/bin/sort_up_mod.f90 +ED/dbgbuild/bin/ssum_mod.f90 +ED/dbgbuild/bin/stable_cohorts.f90 +ED/dbgbuild/bin/structural_growth_eq_0_mod.f90 +ED/dbgbuild/bin/structural_growth.f90 +ED/dbgbuild/bin/structural_growth_mod.f90 +ED/dbgbuild/bin/sw_multiple_scatter_mod.f90 +ED/dbgbuild/bin/sw_twostream_clump_mod.f90 +ED/dbgbuild/bin/test_mod.f90 +ED/dbgbuild/bin/therm_lib8.f90 +ED/dbgbuild/bin/therm_lib.f90 +ED/dbgbuild/bin/timing_mod.f90 +ED/dbgbuild/bin/tokenize1_mod.f90 +ED/dbgbuild/bin/tolower_mod.f90 +ED/dbgbuild/bin/transfer_ol_month_mod.f90 +ED/dbgbuild/bin/trid2_mod.f90 +ED/dbgbuild/bin/trid_mod.f90 +ED/dbgbuild/bin/twostream_rad.f90 +ED/dbgbuild/bin/ugetarg_mod.f90 +ED/dbgbuild/bin/unarrange_mod.f90 +ED/dbgbuild/bin/update_c_and_n_pools_mod.f90 +ED/dbgbuild/bin/update_cohort_extensive_props_mod.f90 +ED/dbgbuild/bin/update_derived_cohort_props_mod.f90 +ED/dbgbuild/bin/update_derived_props.f90 +ED/dbgbuild/bin/update_derived_props_mod.f90 +ED/dbgbuild/bin/update_diagnostic_vars_mod.f90 +ED/dbgbuild/bin/update_ed_yearly_vars_mod.f90 +ED/dbgbuild/bin/updatehydroparms_mod.f90 +ED/dbgbuild/bin/update_met_drivers_mod.f90 +ED/dbgbuild/bin/update_model_time_dm_mod.f90 +ED/dbgbuild/bin/update_mod.f90 +ED/dbgbuild/bin/update_patch_derived_props_mod.f90 +ED/dbgbuild/bin/update_patch_thermo_fmean_mod.f90 +ED/dbgbuild/bin/update_patch_thermo_props_mod.f90 +ED/dbgbuild/bin/update_phenology_eq_0_mod.f90 +ED/dbgbuild/bin/update_phenology_mod.f90 +ED/dbgbuild/bin/update_polygon_derived_props_mod.f90 +ED/dbgbuild/bin/update_rad_avg_mod.f90 +ED/dbgbuild/bin/update_site_derived_props_mod.f90 +ED/dbgbuild/bin/update_vital_rates_mod.f90 +ED/dbgbuild/bin/updatewatertableadd_mod.f90 +ED/dbgbuild/bin/updatewatertablebaseflow_mod.f90 +ED/dbgbuild/bin/updatewatertablesubtract_mod.f90 +ED/dbgbuild/bin/update_workload_mod.f90 +ED/dbgbuild/bin/utils_f.f90 +ED/dbgbuild/bin/valugp_mod.f90 +ED/dbgbuild/bin/vegetation_dynamics_eq_0_mod.f90 +ED/dbgbuild/bin/vegetation_dynamics.f90 +ED/dbgbuild/bin/vegetation_dynamics_mod.f90 +ED/dbgbuild/bin/walltime_mod.f90 +ED/dbgbuild/bin/warning_mod.f90 +ED/dbgbuild/bin/write_ed_xml_config_mod.f90 +ED/dbgbuild/bin/writehydro_mod.f90 +ED/dbgbuild/bin/xcol2array_mod.f90 +ED/dbgbuild/bin/ycol2array_mod.f90 +ED/dbgbuild/bin/yesterday_info_mod.f90 +ED/dbgbuild/bin/yesterday_mod.f90 +ED/dbgbuild/bin/zcol2array_mod.f90 +ED/dbgbuild/bin/zero_ed_dmean_vars_mod.f90 +ED/dbgbuild/bin/zero_ed_fmean_vars_mod.f90 +ED/dbgbuild/bin/zero_ed_mmean_vars_mod.f90 +ED/dbgbuild/bin/zero_ed_qmean_vars_mod.f90 +ED/dbgbuild/bin/zero_ed_today_vars_mod.f90 +ED/dbgbuild/bin/zero_ed_yearly_vars_mod.f90 +ED/dbgbuild/bin/a3e0_mod.mod +ED/dbgbuild/bin/a3e1_mod.mod +ED/dbgbuild/bin/a3e2_mod.mod +ED/dbgbuild/bin/accum_mod.mod +ED/dbgbuild/bin/acnst_mod.mod +ED/dbgbuild/bin/adivb_mod.mod +ED/dbgbuild/bin/adjust_sfcw_properties_mod.mod +ED/dbgbuild/bin/adjust_topsoil_properties_mod.mod +ED/dbgbuild/bin/adjust_veg_properties_mod.mod +ED/dbgbuild/bin/ae0_mod.mod +ED/dbgbuild/bin/ae1m1_mod.mod +ED/dbgbuild/bin/ae1_mod.mod +ED/dbgbuild/bin/ae1p1_mod.mod +ED/dbgbuild/bin/ae1p1p1_mod.mod +ED/dbgbuild/bin/ae1t0_mod.mod +ED/dbgbuild/bin/ae1t0p1_mod.mod +ED/dbgbuild/bin/ae1t1_mod.mod +ED/dbgbuild/bin/ae1t1p1_mod.mod +ED/dbgbuild/bin/ae1tn1_mod.mod +ED/dbgbuild/bin/ae2_mod.mod +ED/dbgbuild/bin/ae3m3d0_mod.mod +ED/dbgbuild/bin/ae3m3_mod.mod +ED/dbgbuild/bin/ae3_mod.mod +ED/dbgbuild/bin/ae3p3_mod.mod +ED/dbgbuild/bin/ae3t0p3_mod.mod +ED/dbgbuild/bin/ae3t3_mod.mod +ED/dbgbuild/bin/ae3t3p3_mod.mod +ED/dbgbuild/bin/aen1_mod.mod +ED/dbgbuild/bin/aen3t0p3_mod.mod +ED/dbgbuild/bin/aggregate_polygon_fmean_mod.mod +ED/dbgbuild/bin/aggregate_polygon_not_fmean_mod.mod +ED/dbgbuild/bin/alebl_mod.mod +ED/dbgbuild/bin/allometry.mod +ED/dbgbuild/bin/angle_of_incid_mod.mod +ED/dbgbuild/bin/an_header.mod +ED/dbgbuild/bin/aone_mod.mod +ED/dbgbuild/bin/apply_forestry_mod.mod +ED/dbgbuild/bin/array2xcol_mod.mod +ED/dbgbuild/bin/array2ycol_mod.mod +ED/dbgbuild/bin/array2zcol_mod.mod +ED/dbgbuild/bin/assign_prescribed_phen_mod.mod +ED/dbgbuild/bin/atimb_mod.mod +ED/dbgbuild/bin/atob_log_mod.mod +ED/dbgbuild/bin/atob_mod.mod +ED/dbgbuild/bin/avg_ed_daily_output_pool_mod.mod +ED/dbgbuild/bin/azero_mod.mod +ED/dbgbuild/bin/banbks_mod.mod +ED/dbgbuild/bin/bandec_mod.mod +ED/dbgbuild/bin/bdf2_solver_mod.mod +ED/dbgbuild/bin/budget_utils.mod +ED/dbgbuild/bin/c34constants.mod +ED/dbgbuild/bin/calc_flow_routing_mod.mod +ED/dbgbuild/bin/calchydrosubsurface_mod.mod +ED/dbgbuild/bin/calchydrosurface_mod.mod +ED/dbgbuild/bin/calc_met_lapse_mod.mod +ED/dbgbuild/bin/calcwatertable_mod.mod +ED/dbgbuild/bin/canopy_air_coms.mod +ED/dbgbuild/bin/canopy_derivs_two_mod.mod +ED/dbgbuild/bin/canopy_layer_coms.mod +ED/dbgbuild/bin/canopy_photosynthesis_mod.mod +ED/dbgbuild/bin/canopy_radiation_coms.mod +ED/dbgbuild/bin/canopy_struct_dynamics.mod +ED/dbgbuild/bin/cbrt8_mod.mod +ED/dbgbuild/bin/cbrt_mod.mod +ED/dbgbuild/bin/cdf2normal_mod.mod +ED/dbgbuild/bin/cdf_mod.mod +ED/dbgbuild/bin/char_strip_var_mod.mod +ED/dbgbuild/bin/check_real_mod.mod +ED/dbgbuild/bin/check_rescale_mod.mod +ED/dbgbuild/bin/compute_c_and_n_storage_mod.mod +ED/dbgbuild/bin/consts_coms.mod +ED/dbgbuild/bin/copy_bdf2_prev_mod.mod +ED/dbgbuild/bin/copy_fb_patch_mod.mod +ED/dbgbuild/bin/copy_initp2prev_mod.mod +ED/dbgbuild/bin/copy_met_2_rk4site_mod.mod +ED/dbgbuild/bin/copy_nl_mod.mod +ED/dbgbuild/bin/copy_patch_init_carbon_mod.mod +ED/dbgbuild/bin/copy_patch_init_mod.mod +ED/dbgbuild/bin/copy_path_from_grid_1_mod.mod +ED/dbgbuild/bin/copy_prev2patch_mod.mod +ED/dbgbuild/bin/copy_rk4_patch_mod.mod +ED/dbgbuild/bin/count_pft_xml_config_mod.mod +ED/dbgbuild/bin/cputime_mod.mod +ED/dbgbuild/bin/create_ed10_ed20_fname_mod.mod +ED/dbgbuild/bin/cumsum_mod.mod +ED/dbgbuild/bin/cvmgm_mod.mod +ED/dbgbuild/bin/cvmgn_mod.mod +ED/dbgbuild/bin/cvmgp_mod.mod +ED/dbgbuild/bin/cvmgz_mod.mod +ED/dbgbuild/bin/date_2_seconds_mod.mod +ED/dbgbuild/bin/date_abs_secs2_mod.mod +ED/dbgbuild/bin/date_add_to_mod.mod +ED/dbgbuild/bin/date_secs_ymdt_mod.mod +ED/dbgbuild/bin/date_unmake_big_mod.mod +ED/dbgbuild/bin/dcvmgm_mod.mod +ED/dbgbuild/bin/dcvmgp_mod.mod +ED/dbgbuild/bin/dcw_swap16_mod.mod +ED/dbgbuild/bin/dcw_swap32_mod.mod +ED/dbgbuild/bin/dcw_swap64_mod.mod +ED/dbgbuild/bin/deblank_mod.mod +ED/dbgbuild/bin/decomp_coms.mod +ED/dbgbuild/bin/detab_mod.mod +ED/dbgbuild/bin/detailed_coms.mod +ED/dbgbuild/bin/diagon_mod.mod +ED/dbgbuild/bin/dist_gc_mod.mod +ED/dbgbuild/bin/disturbance_utils.mod +ED/dbgbuild/bin/disturb_coms.mod +ED/dbgbuild/bin/dmax2_mod.mod +ED/dbgbuild/bin/dmin2_mod.mod +ED/dbgbuild/bin/dssum_mod.mod +ED/dbgbuild/bin/dump_radinfo_mod.mod +ED/dbgbuild/bin/ed1_fileinfo_mod.mod +ED/dbgbuild/bin/ed_1st_master_mod.mod +ED/dbgbuild/bin/ed_1st_node_mod.mod +ED/dbgbuild/bin/ed21_fileinfo_mod.mod +ED/dbgbuild/bin/ed_bigleaf_init_mod.mod +ED/dbgbuild/bin/ed_datp_datq_mod.mod +ED/dbgbuild/bin/ed_datp_datsoil_mod.mod +ED/dbgbuild/bin/ed_driver_mod.mod +ED/dbgbuild/bin/ed_filelist_mod.mod +ED/dbgbuild/bin/ed_gridset_mod.mod +ED/dbgbuild/bin/ed_init_atm_mod.mod +ED/dbgbuild/bin/ed_ll_xy_mod.mod +ED/dbgbuild/bin/ed_load_work_from_history_mod.mod +ED/dbgbuild/bin/ed_masterput_met_header_mod.mod +ED/dbgbuild/bin/ed_masterput_nl_mod.mod +ED/dbgbuild/bin/ed_masterput_poly_dims_mod.mod +ED/dbgbuild/bin/ed_masterput_processid_mod.mod +ED/dbgbuild/bin/ed_masterput_worklist_info_mod.mod +ED/dbgbuild/bin/ed_max_dims.mod +ED/dbgbuild/bin/ed_mem_alloc_mod.mod +ED/dbgbuild/bin/ed_mem_grid_dim_defs.mod +ED/dbgbuild/bin/ed_misc_coms.mod +ED/dbgbuild/bin/ed_model_mod.mod +ED/dbgbuild/bin/ed_newgrid_mod.mod +ED/dbgbuild/bin/ed_node_coms.mod +ED/dbgbuild/bin/ed_node_decomp_mod.mod +ED/dbgbuild/bin/ed_nodeget_met_header_mod.mod +ED/dbgbuild/bin/ed_nodeget_nl_mod.mod +ED/dbgbuild/bin/ed_nodeget_poly_dims_mod.mod +ED/dbgbuild/bin/ed_nodeget_processid_mod.mod +ED/dbgbuild/bin/ed_nodeget_worklist_info_mod.mod +ED/dbgbuild/bin/ed_opspec_grid_mod.mod +ED/dbgbuild/bin/ed_opspec_misc_mod.mod +ED/dbgbuild/bin/ed_opspec_par_mod.mod +ED/dbgbuild/bin/ed_opspec_times_mod.mod +ED/dbgbuild/bin/ed_output_mod.mod +ED/dbgbuild/bin/ed_para_coms.mod +ED/dbgbuild/bin/ed_parvec_work_mod.mod +ED/dbgbuild/bin/ed_polarst_mod.mod +ED/dbgbuild/bin/ed_state_vars.mod +ED/dbgbuild/bin/ed_therm_lib.mod +ED/dbgbuild/bin/ed_var_tables.mod +ED/dbgbuild/bin/ed_work_vars.mod +ED/dbgbuild/bin/ed_xy_ll_mod.mod +ED/dbgbuild/bin/ed_zen_mod.mod +ED/dbgbuild/bin/eifun8_mod.mod +ED/dbgbuild/bin/elgs_mod.mod +ED/dbgbuild/bin/ename_coms.mod +ED/dbgbuild/bin/endian_mod.mod +ED/dbgbuild/bin/errorfun_mod.mod +ED/dbgbuild/bin/euler_integ_mod.mod +ED/dbgbuild/bin/euler_timestep_mod.mod +ED/dbgbuild/bin/event_fertilize_mod.mod +ED/dbgbuild/bin/event_fire_mod.mod +ED/dbgbuild/bin/event_harvest_mod.mod +ED/dbgbuild/bin/event_irrigate_mod.mod +ED/dbgbuild/bin/event_planting_mod.mod +ED/dbgbuild/bin/event_till_mod.mod +ED/dbgbuild/bin/expected_mod.mod +ED/dbgbuild/bin/expmsq_mod.mod +ED/dbgbuild/bin/exterminate_patches_except_mod.mod +ED/dbgbuild/bin/fail_whale_mod.mod +ED/dbgbuild/bin/farq_leuning.mod +ED/dbgbuild/bin/fatal_error_mod.mod +ED/dbgbuild/bin/fb_dy_step_trunc_mod.mod +ED/dbgbuild/bin/fb_sanity_check_mod.mod +ED/dbgbuild/bin/fill_history_grid_mod.mod +ED/dbgbuild/bin/fill_history_patch_mod.mod +ED/dbgbuild/bin/fill_history_polygon_mod.mod +ED/dbgbuild/bin/fill_history_site_mod.mod +ED/dbgbuild/bin/fillvar_l_mod.mod +ED/dbgbuild/bin/find_closing_comment_mod.mod +ED/dbgbuild/bin/find_frqsum_mod.mod +ED/dbgbuild/bin/findln_mod.mod +ED/dbgbuild/bin/find_rank_mod.mod +ED/dbgbuild/bin/fire_frequency_mod.mod +ED/dbgbuild/bin/flag_stable_cohorts_mod.mod +ED/dbgbuild/bin/fuse_fiss_utils.mod +ED/dbgbuild/bin/fusion_fission_coms.mod +ED/dbgbuild/bin/getconfigint_mod.mod +ED/dbgbuild/bin/getconfigreal_mod.mod +ED/dbgbuild/bin/getconfigstring_mod.mod +ED/dbgbuild/bin/get_errmax_mod.mod +ED/dbgbuild/bin/get_file_indices_mod.mod +ED/dbgbuild/bin/get_grid_mod.mod +ED/dbgbuild/bin/geth5dims_mod.mod +ED/dbgbuild/bin/getll_mod.mod +ED/dbgbuild/bin/get_work_mod.mod +ED/dbgbuild/bin/get_yscal_mod.mod +ED/dbgbuild/bin/grid_coms.mod +ED/dbgbuild/bin/growth_balive.mod +ED/dbgbuild/bin/h5_output_mod.mod +ED/dbgbuild/bin/harv_immat_patches_mod.mod +ED/dbgbuild/bin/harv_mat_patches_mod.mod +ED/dbgbuild/bin/hdf5_coms.mod +ED/dbgbuild/bin/hdf5_utils.mod +ED/dbgbuild/bin/hdf_getslab_d_mod.mod +ED/dbgbuild/bin/hdf_getslab_i_mod.mod +ED/dbgbuild/bin/hdf_getslab_r_mod.mod +ED/dbgbuild/bin/heav_mod.mod +ED/dbgbuild/bin/het_resp_weight_mod.mod +ED/dbgbuild/bin/heun_integ_mod.mod +ED/dbgbuild/bin/heun_stepper_mod.mod +ED/dbgbuild/bin/heun_timestep_mod.mod +ED/dbgbuild/bin/how_to_read_a_file_mod.mod +ED/dbgbuild/bin/hybrid_integ_mod.mod +ED/dbgbuild/bin/hybrid_timestep_mod.mod +ED/dbgbuild/bin/hydrology_coms.mod +ED/dbgbuild/bin/hydrology_constants.mod +ED/dbgbuild/bin/ibias_mod.mod +ED/dbgbuild/bin/ibindec_mod.mod +ED/dbgbuild/bin/ifirstchar_mod.mod +ED/dbgbuild/bin/inc_fwd_patch_mod.mod +ED/dbgbuild/bin/inc_rk4_patch_mod.mod +ED/dbgbuild/bin/init_can_air_params_mod.mod +ED/dbgbuild/bin/init_can_lyr_params_mod.mod +ED/dbgbuild/bin/init_can_rad_params_mod.mod +ED/dbgbuild/bin/init_cohorts_by_layers_mod.mod +ED/dbgbuild/bin/init_decomp_params_mod.mod +ED/dbgbuild/bin/init_disturb_params_mod.mod +ED/dbgbuild/bin/init_ed_cohort_vars_mod.mod +ED/dbgbuild/bin/init_ed_misc_coms_mod.mod +ED/dbgbuild/bin/init_ed_patch_vars_mod.mod +ED/dbgbuild/bin/init_ed_poly_vars_mod.mod +ED/dbgbuild/bin/init_ed_site_vars_mod.mod +ED/dbgbuild/bin/init_ff_coms_mod.mod +ED/dbgbuild/bin/init_full_history_restart_mod.mod +ED/dbgbuild/bin/init_hydro_coms_mod.mod +ED/dbgbuild/bin/inithydrology_mod.mod +ED/dbgbuild/bin/inithydrosubsurface_mod.mod +ED/dbgbuild/bin/initialize_rk4patches_mod.mod +ED/dbgbuild/bin/init_lapse_params_mod.mod +ED/dbgbuild/bin/init_met_drivers_mod.mod +ED/dbgbuild/bin/init_met_params_mod.mod +ED/dbgbuild/bin/init_nbg_cohorts_mod.mod +ED/dbgbuild/bin/init_output_params_mod.mod +ED/dbgbuild/bin/init_pft_alloc_params_mod.mod +ED/dbgbuild/bin/init_pft_derived_params_mod.mod +ED/dbgbuild/bin/init_pft_leaf_params_mod.mod +ED/dbgbuild/bin/init_pft_mort_params_mod.mod +ED/dbgbuild/bin/init_pft_nitro_params_mod.mod +ED/dbgbuild/bin/init_pft_photo_params_mod.mod +ED/dbgbuild/bin/init_pft_repro_params_mod.mod +ED/dbgbuild/bin/init_pft_resp_params_mod.mod +ED/dbgbuild/bin/init_phen_coms_mod.mod +ED/dbgbuild/bin/init_physiology_params_mod.mod +ED/dbgbuild/bin/init_rk4_params_mod.mod +ED/dbgbuild/bin/init_soil_coms_mod.mod +ED/dbgbuild/bin/integrate_ed_dmean_vars_mod.mod +ED/dbgbuild/bin/integrate_ed_fmean_met_vars_mod.mod +ED/dbgbuild/bin/integrate_ed_mmean_vars_mod.mod +ED/dbgbuild/bin/integrate_ed_qmean_vars_mod.mod +ED/dbgbuild/bin/integrate_patch_euler_mod.mod +ED/dbgbuild/bin/integrate_patch_heun_mod.mod +ED/dbgbuild/bin/int_met_avg_mod.mod +ED/dbgbuild/bin/inventory_mat_forests_mod.mod +ED/dbgbuild/bin/iprim_mod.mod +ED/dbgbuild/bin/iran_recsize_mod.mod +ED/dbgbuild/bin/is_finite8_mod.mod +ED/dbgbuild/bin/is_finite_mod.mod +ED/dbgbuild/bin/isleap_mod.mod +ED/dbgbuild/bin/ismax_mod.mod +ED/dbgbuild/bin/ismin_mod.mod +ED/dbgbuild/bin/is_resolvable_mod.mod +ED/dbgbuild/bin/ivalugp_mod.mod +ED/dbgbuild/bin/izero_mod.mod +ED/dbgbuild/bin/julday1000_mod.mod +ED/dbgbuild/bin/julday_mod.mod +ED/dbgbuild/bin/landuse_init_mod.mod +ED/dbgbuild/bin/large_error_mod.mod +ED/dbgbuild/bin/lastchar_mod.mod +ED/dbgbuild/bin/lastmonthdate_mod.mod +ED/dbgbuild/bin/lastslash_mod.mod +ED/dbgbuild/bin/leaf_database_mod.mod +ED/dbgbuild/bin/leaf_derivs_mod.mod +ED/dbgbuild/bin/leaftw_derivs_mod.mod +ED/dbgbuild/bin/libxml2f90__closeall_mod.mod +ED/dbgbuild/bin/libxml2f90__closefile_mod.mod +ED/dbgbuild/bin/libxml2f90_error_getline_mod.mod +ED/dbgbuild/bin/libxml2f90__existid_mod.mod +ED/dbgbuild/bin/libxml2f90_existid_mod.mod +ED/dbgbuild/bin/libxml2f90__existpid_mod.mod +ED/dbgbuild/bin/libxml2f90__findinchara_mod.mod +ED/dbgbuild/bin/libxml2f90__flush_mod.mod +ED/dbgbuild/bin/libxml2f90__get_fileunit_mod.mod +ED/dbgbuild/bin/libxml2f90_getline_mod.mod +ED/dbgbuild/bin/libxml2f90_getsafec8_mod.mod +ED/dbgbuild/bin/libxml2f90_getsafei4_mod.mod +ED/dbgbuild/bin/libxml2f90_getsafel4_mod.mod +ED/dbgbuild/bin/libxml2f90_getsafer8_mod.mod +ED/dbgbuild/bin/libxml2f90__getunit_mod.mod +ED/dbgbuild/bin/libxml2f90_interface_module.mod +ED/dbgbuild/bin/libxml2f90__ll_addid_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_addid_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_add_list_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_add_list_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_addpid_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_addpid_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_addpureid_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_closetag_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_closetag_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_down_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_edit_id_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_edit_id_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_edit_pid_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_edit_pid_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_exist_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getc8__mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getc8_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_getc8_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getch_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_getch_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getch_scal_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_geti4__mod.mod +ED/dbgbuild/bin/libxml2f90__ll_geti4_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_geti4_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getl4__mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getl4_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_getl4_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getpc8__mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getpc8_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getpch_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getpi4__mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getpi4_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getpl4__mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getpl4_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getpr8__mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getpr8_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getpsize_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getpstring__mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getpstring_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getr8__mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getr8_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_getr8_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getsize_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_getsize_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getstring__mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getstring_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_getstring_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_initlist_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_inittag_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_opentag_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_opentag_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_report_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_report_rec_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_report_rec_wrap_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_selectlist_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_selecttag_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_up_mod.mod +ED/dbgbuild/bin/libxml2f90_module.mod +ED/dbgbuild/bin/libxml2f90__openfile_mod.mod +ED/dbgbuild/bin/libxml2f90_parse_file_mod.mod +ED/dbgbuild/bin/libxml2f90_parse_find_char_mod.mod +ED/dbgbuild/bin/libxml2f90__readin_file_mod.mod +ED/dbgbuild/bin/libxml2f90_readin_file_mod.mod +ED/dbgbuild/bin/libxml2f90__readin_nfil_mod.mod +ED/dbgbuild/bin/libxml2f90__set_casesensitive_mod.mod +ED/dbgbuild/bin/libxml2f90__set_default_ll_id_mod.mod +ED/dbgbuild/bin/libxml2f90__setformat_mod.mod +ED/dbgbuild/bin/libxml2f90__set_paw_mod.mod +ED/dbgbuild/bin/libxml2f90__set_rmcomma_mod.mod +ED/dbgbuild/bin/libxml2f90__set_rmquotes_mod.mod +ED/dbgbuild/bin/libxml2f90__settransform_exm_mod.mod +ED/dbgbuild/bin/libxml2f90__setwrite_exm_mod.mod +ED/dbgbuild/bin/libxml2f90_strings_module.mod +ED/dbgbuild/bin/libxml2f90_tostringa_mod.mod +ED/dbgbuild/bin/libxml2f90_tostring_mod.mod +ED/dbgbuild/bin/libxml2f90_transform_paw_mod.mod +ED/dbgbuild/bin/lisys_solver8_mod.mod +ED/dbgbuild/bin/lisys_solver_mod.mod +ED/dbgbuild/bin/ll_module.mod +ED/dbgbuild/bin/load_ecosystem_state_mod.mod +ED/dbgbuild/bin/load_ed_ecosystem_params_mod.mod +ED/dbgbuild/bin/lubksb_dble_mod.mod +ED/dbgbuild/bin/ludcmp_dble_mod.mod +ED/dbgbuild/bin/lw_multiple_scatter_mod.mod +ED/dbgbuild/bin/lw_twostream_mod.mod +ED/dbgbuild/bin/makefnam_mod.mod +ED/dbgbuild/bin/match_poly_grid_mod.mod +ED/dbgbuild/bin/mat_forest_harv_rates_mod.mod +ED/dbgbuild/bin/mean_daysecz_mod.mod +ED/dbgbuild/bin/mem_polygons.mod +ED/dbgbuild/bin/met_driver_coms.mod +ED/dbgbuild/bin/met_sanity_check_mod.mod +ED/dbgbuild/bin/migs_mod.mod +ED/dbgbuild/bin/mk_2_buff_mod.mod +ED/dbgbuild/bin/mk_2p_buff_mod.mod +ED/dbgbuild/bin/mk_3_buff_mod.mod +ED/dbgbuild/bin/mk_4_buff_mod.mod +ED/dbgbuild/bin/mortality.mod +ED/dbgbuild/bin/mprove_mod.mod +ED/dbgbuild/bin/near_bare_ground_big_leaf_init_mod.mod +ED/dbgbuild/bin/near_bare_ground_init_mod.mod +ED/dbgbuild/bin/new_patch_sfc_props_mod.mod +ED/dbgbuild/bin/normalize_ed_dmean_vars_mod.mod +ED/dbgbuild/bin/normalize_ed_fmean_vars_mod.mod +ED/dbgbuild/bin/normalize_ed_mmean_vars_mod.mod +ED/dbgbuild/bin/normalize_ed_qmean_vars_mod.mod +ED/dbgbuild/bin/normalize_ed_todaynpp_vars_mod.mod +ED/dbgbuild/bin/normalize_ed_today_vars_mod.mod +ED/dbgbuild/bin/normalize_fmean_vars_mod.mod +ED/dbgbuild/bin/norm_harv_patch_mod.mod +ED/dbgbuild/bin/num_days_mod.mod +ED/dbgbuild/bin/odeint_mod.mod +ED/dbgbuild/bin/opspec_fatal_mod.mod +ED/dbgbuild/bin/optimiz_coms.mod +ED/dbgbuild/bin/overwrite_with_xml_config_mod.mod +ED/dbgbuild/bin/parsefnam_mod.mod +ED/dbgbuild/bin/parse_mod.mod +ED/dbgbuild/bin/pft_coms.mod +ED/dbgbuild/bin/phenology_aux.mod +ED/dbgbuild/bin/phenology_coms.mod +ED/dbgbuild/bin/phenology_driver_eq_0_mod.mod +ED/dbgbuild/bin/phenology_driver_mod.mod +ED/dbgbuild/bin/phenology_startup.mod +ED/dbgbuild/bin/phenology_thresholds_mod.mod +ED/dbgbuild/bin/physiology_coms.mod +ED/dbgbuild/bin/plant_structural_allocation_mod.mod +ED/dbgbuild/bin/prescribed_event_mod.mod +ED/dbgbuild/bin/print_c_and_n_budgets_mod.mod +ED/dbgbuild/bin/print_csiteipa_mod.mod +ED/dbgbuild/bin/print_errmax_mod.mod +ED/dbgbuild/bin/print_fields_mod.mod +ED/dbgbuild/bin/print_photo_details_mod.mod +ED/dbgbuild/bin/print_rk4patch_mod.mod +ED/dbgbuild/bin/print_rk4_state_mod.mod +ED/dbgbuild/bin/print_soil_info_mod.mod +ED/dbgbuild/bin/putconfigint_mod.mod +ED/dbgbuild/bin/putconfigreal8_mod.mod +ED/dbgbuild/bin/putconfigreal_mod.mod +ED/dbgbuild/bin/putconfigstring_mod.mod +ED/dbgbuild/bin/radiate_driver_mod.mod +ED/dbgbuild/bin/rams_f_open_mod.mod +ED/dbgbuild/bin/rank_down_mod.mod +ED/dbgbuild/bin/rank_up_mod.mod +ED/dbgbuild/bin/read_ed10_ed20_history_file_mod.mod +ED/dbgbuild/bin/read_ed21_history_file_mod.mod +ED/dbgbuild/bin/read_ed21_history_unstruct_mod.mod +ED/dbgbuild/bin/read_ed21_polyclone_mod.mod +ED/dbgbuild/bin/read_ed_xml_config_mod.mod +ED/dbgbuild/bin/read_events_xml_mod.mod +ED/dbgbuild/bin/read_met_driver_head_mod.mod +ED/dbgbuild/bin/read_met_drivers_init_mod.mod +ED/dbgbuild/bin/read_met_drivers_mod.mod +ED/dbgbuild/bin/read_nl_mod.mod +ED/dbgbuild/bin/read_ol_file_mod.mod +ED/dbgbuild/bin/read_plantation_fractions_mod.mod +ED/dbgbuild/bin/read_site_file_mod.mod +ED/dbgbuild/bin/read_soil_depth_mod.mod +ED/dbgbuild/bin/read_soil_moist_temp_mod.mod +ED/dbgbuild/bin/rearrange_mod.mod +ED/dbgbuild/bin/reproduction_eq_0_mod.mod +ED/dbgbuild/bin/reproduction_mod.mod +ED/dbgbuild/bin/reset_fmean_vars_mod.mod +ED/dbgbuild/bin/resp_f_decomp_mod.mod +ED/dbgbuild/bin/resp_rh_mod.mod +ED/dbgbuild/bin/rk4_coms.mod +ED/dbgbuild/bin/rk4_driver.mod +ED/dbgbuild/bin/rk4_stepper.mod +ED/dbgbuild/bin/root_resp_norm_mod.mod +ED/dbgbuild/bin/scale_ed_radiation_mod.mod +ED/dbgbuild/bin/seed_dispersal_mod.mod +ED/dbgbuild/bin/selective_gaussian_2body_mod.mod +ED/dbgbuild/bin/setlapseparms_mod.mod +ED/dbgbuild/bin/set_polygon_coordinates_mod.mod +ED/dbgbuild/bin/set_site_defprops_mod.mod +ED/dbgbuild/bin/sfcdata_ed_mod.mod +ED/dbgbuild/bin/sfcrad_ed_mod.mod +ED/dbgbuild/bin/short2diff_sib_mod.mod +ED/dbgbuild/bin/short_bdown_weissnorman_mod.mod +ED/dbgbuild/bin/sngloff_mod.mod +ED/dbgbuild/bin/soil_coms.mod +ED/dbgbuild/bin/soil_default_fill_mod.mod +ED/dbgbuild/bin/soil_respiration_mod.mod +ED/dbgbuild/bin/solar_radiation_breakdown_mod.mod +ED/dbgbuild/bin/sort3_mod.mod +ED/dbgbuild/bin/sort_down_mod.mod +ED/dbgbuild/bin/sort_up_mod.mod +ED/dbgbuild/bin/ssum_mod.mod +ED/dbgbuild/bin/structural_growth_eq_0_mod.mod +ED/dbgbuild/bin/structural_growth_mod.mod +ED/dbgbuild/bin/sw_multiple_scatter_mod.mod +ED/dbgbuild/bin/sw_twostream_clump_mod.mod +ED/dbgbuild/bin/test_mod.mod +ED/dbgbuild/bin/therm_lib8.mod +ED/dbgbuild/bin/therm_lib.mod +ED/dbgbuild/bin/timing_mod.mod +ED/dbgbuild/bin/tokenize1_mod.mod +ED/dbgbuild/bin/tolower_mod.mod +ED/dbgbuild/bin/transfer_ol_month_mod.mod +ED/dbgbuild/bin/trid2_mod.mod +ED/dbgbuild/bin/trid_mod.mod +ED/dbgbuild/bin/ugetarg_mod.mod +ED/dbgbuild/bin/unarrange_mod.mod +ED/dbgbuild/bin/update_c_and_n_pools_mod.mod +ED/dbgbuild/bin/update_cohort_extensive_props_mod.mod +ED/dbgbuild/bin/update_derived_cohort_props_mod.mod +ED/dbgbuild/bin/update_derived_props_mod.mod +ED/dbgbuild/bin/update_diagnostic_vars_mod.mod +ED/dbgbuild/bin/update_ed_yearly_vars_mod.mod +ED/dbgbuild/bin/updatehydroparms_mod.mod +ED/dbgbuild/bin/update_met_drivers_mod.mod +ED/dbgbuild/bin/update_model_time_dm_mod.mod +ED/dbgbuild/bin/update_mod.mod +ED/dbgbuild/bin/update_patch_derived_props_mod.mod +ED/dbgbuild/bin/update_patch_thermo_fmean_mod.mod +ED/dbgbuild/bin/update_patch_thermo_props_mod.mod +ED/dbgbuild/bin/update_phenology_eq_0_mod.mod +ED/dbgbuild/bin/update_phenology_mod.mod +ED/dbgbuild/bin/update_polygon_derived_props_mod.mod +ED/dbgbuild/bin/update_rad_avg_mod.mod +ED/dbgbuild/bin/update_site_derived_props_mod.mod +ED/dbgbuild/bin/update_vital_rates_mod.mod +ED/dbgbuild/bin/updatewatertableadd_mod.mod +ED/dbgbuild/bin/updatewatertablebaseflow_mod.mod +ED/dbgbuild/bin/updatewatertablesubtract_mod.mod +ED/dbgbuild/bin/update_workload_mod.mod +ED/dbgbuild/bin/valugp_mod.mod +ED/dbgbuild/bin/vegetation_dynamics_eq_0_mod.mod +ED/dbgbuild/bin/vegetation_dynamics_mod.mod +ED/dbgbuild/bin/walltime_mod.mod +ED/dbgbuild/bin/warning_mod.mod +ED/dbgbuild/bin/write_ed_xml_config_mod.mod +ED/dbgbuild/bin/writehydro_mod.mod +ED/dbgbuild/bin/xcol2array_mod.mod +ED/dbgbuild/bin/ycol2array_mod.mod +ED/dbgbuild/bin/yesterday_info_mod.mod +ED/dbgbuild/bin/yesterday_mod.mod +ED/dbgbuild/bin/zcol2array_mod.mod +ED/dbgbuild/bin/zero_ed_dmean_vars_mod.mod +ED/dbgbuild/bin/zero_ed_fmean_vars_mod.mod +ED/dbgbuild/bin/zero_ed_mmean_vars_mod.mod +ED/dbgbuild/bin/zero_ed_qmean_vars_mod.mod +ED/dbgbuild/bin/zero_ed_today_vars_mod.mod +ED/dbgbuild/bin/zero_ed_yearly_vars_mod.mod diff --git a/BRAMS/src/ed2/edcp_load_namelist.f90 b/BRAMS/src/ed2/edcp_load_namelist.f90 index 698b4a458..a9abd96a5 100644 --- a/BRAMS/src/ed2/edcp_load_namelist.f90 +++ b/BRAMS/src/ed2/edcp_load_namelist.f90 @@ -143,7 +143,10 @@ subroutine read_ednl(iunit,filename) , writing_dcyc & ! intent(out) , writing_year & ! intent(out) , writing_long & ! intent(out) - , writing_eorq ! ! intent(out) + , writing_eorq & ! intent(out) + , history_fast & ! intent(out) + , history_dail & ! intent(out) + , history_eorq ! ! intent(out) use canopy_air_coms , only : icanturb & ! intent(out) , isfclyrm & ! intent(out) , ied_grndvap ! ! intent(out) @@ -565,6 +568,11 @@ subroutine read_ednl(iunit,filename) writing_year = iyoutput > 0 writing_long = writing_dail .or. writing_mont .or. writing_dcyc writing_eorq = writing_mont .or. writing_dcyc + history_fast = ifoutput == 0 .and. & + ( ( unitstate == 0 .and. frqstate <= day_sec ) .or. & + ( unitstate == 1 .and. frqstate == 1. ) ) + history_dail = unitstate == 0 .and. frqstate < day_sec + history_eorq = unitstate <= 1 fast_diagnostics = ioutput /= 0 .or. ifoutput /= 0 .or. idoutput /= 0 .or. & imoutput /= 0 .or. iqoutput /= 0 .or. itoutput /= 0 !---------------------------------------------------------------------------------------! diff --git a/BRAMS/src/ed2/edcp_mpiutils.f90 b/BRAMS/src/ed2/edcp_mpiutils.f90 index 6625fa2b0..02f694b31 100644 --- a/BRAMS/src/ed2/edcp_mpiutils.f90 +++ b/BRAMS/src/ed2/edcp_mpiutils.f90 @@ -71,7 +71,10 @@ subroutine masterput_ednl(mainnum) , writing_dcyc & ! intent(in) , writing_year & ! intent(in) , writing_long & ! intent(in) - , writing_eorq ! ! intent(in) + , writing_eorq & ! intent(in) + , history_fast & ! intent(in) + , history_dail & ! intent(in) + , history_eorq ! ! intent(in) use grid_coms , only : nzg & ! intent(in) , nzs & ! intent(in) , ngrids & ! intent(in) @@ -422,6 +425,9 @@ subroutine masterput_ednl(mainnum) call MPI_Bcast(writing_year ,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) call MPI_Bcast(writing_long ,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) call MPI_Bcast(writing_eorq ,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) + call MPI_Bcast(history_fast ,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) + call MPI_Bcast(history_dail ,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) + call MPI_Bcast(history_eorq ,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) call MPI_Bcast(fast_diagnostics,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) !---------------------------------------------------------------------------------------! @@ -508,7 +514,10 @@ subroutine nodeget_ednl(master_num) , writing_dcyc & ! intent(out) , writing_year & ! intent(out) , writing_long & ! intent(out) - , writing_eorq ! ! intent(out) + , writing_eorq & ! intent(out) + , history_fast & ! intent(out) + , history_dail & ! intent(out) + , history_eorq ! ! intent(out) use grid_coms , only : nzg & ! intent(out) , nzs & ! intent(out) , ngrids & ! intent(out) @@ -860,6 +869,9 @@ subroutine nodeget_ednl(master_num) call MPI_Bcast(writing_year ,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) call MPI_Bcast(writing_long ,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) call MPI_Bcast(writing_eorq ,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) + call MPI_Bcast(history_fast ,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) + call MPI_Bcast(history_dail ,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) + call MPI_Bcast(history_eorq ,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) call MPI_Bcast(fast_diagnostics,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) !---------------------------------------------------------------------------------------! diff --git a/ED/Template/Template/callserial.sh b/ED/Template/Template/callserial.sh index 50ded4b73..b711a3a22 100755 --- a/ED/Template/Template/callserial.sh +++ b/ED/Template/Template/callserial.sh @@ -11,7 +11,7 @@ currloc=`pwd` # Current location mddir='met_driver' datasrc='mypackdata' -datadest='/scratch/mlongo' +datadest="/scratch/${moi}" datasize=39000000 #------------------------------------------------------------------------------------------# diff --git a/ED/Template/Template/plot_monthly.r b/ED/Template/Template/plot_monthly.r index a5e423e46..45eb3052d 100644 --- a/ED/Template/Template/plot_monthly.r +++ b/ED/Template/Template/plot_monthly.r @@ -30,6 +30,7 @@ reload.data = TRUE # Should I reload partially loaded data? sasmonth.short = c(2,5,8,11) # Months for SAS plots (short runs) sasmonth.long = 5 # Months for SAS plots (long runs) nyears.long = 25 # Runs longer than this are considered long runs. +n.density = 256 # Number of density points #------------------------------------------------------------------------------------------# @@ -54,9 +55,8 @@ plotgrid = TRUE # Should I plot the grid in the backgrou sasfixlimits = FALSE # Use a fixed scale for size and age-structure # plots? (FALSE will set a suitable scale for # each plot) -ncolsfc = 200 # Target number of colours for filled contour. fcgrid = TRUE # Include a grid on the filled contour plots? -ncolshov = 200 # Target number of colours for Hovmoller diagrams. +ncolsfc = 80 # Target number of colours for filled contour. hovgrid = TRUE # Include a grid on the Hovmoller plots? legwhere = "topleft" # Where should I place the legend? inset = 0.01 # Inset between legend and edge of plot region. @@ -310,6 +310,54 @@ for (place in myplaces){ + #---------------------------------------------------------------------------------------# + # Define a suitable scale for those time series that uses datum$tomonth... # + #---------------------------------------------------------------------------------------# + whenplot6 = pretty.time(datum$tomonth,n=6) + whenplot8 = pretty.time(datum$tomonth,n=8) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Define a suitable scale for diurnal cycle... # + #---------------------------------------------------------------------------------------# + thisday = seq(from=0,to=ndcycle,by=1) * 24 / ndcycle + uplot = list() + uplot$levels = c(0,4,8,12,16,20,24) + uplot$n = 7 + uplot$scale = "hours" + uplot$padj = rep(0,times=uplot$n) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Define a suitable scale for soil profile layers... # + #---------------------------------------------------------------------------------------# + znice = -pretty.log(-slz,n=8) + znice = sort(c(znice,slz[1],slz[nzg])) + sel = znice >= slz[1] & znice <= slz[nzg] + znice = znice[sel] + zat = -log(-znice) + nznice = length(znice) + znice = sprintf("%.2f",znice) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Define a suitable scale for monthly means... # + #---------------------------------------------------------------------------------------# + montmont = seq(from=1,to=12,by=1) + mplot = list() + mplot$levels = montmont + mplot$labels = capwords(mon2mmm(montmont)) + mplot$n = 12 + mplot$scale = "months" + mplot$padj = rep(0,times=mplot$n) + #---------------------------------------------------------------------------------------# + + + #----- Make some shorter versions of some variables. -----------------------------------# mfac = datum$month @@ -777,6 +825,80 @@ for (place in myplaces){ #---------------------------------------------------------------------------------------# + + #---------------------------------------------------------------------------------------# + # Find the patch density function for all patch-level data. # + #---------------------------------------------------------------------------------------# + cat (" - Finding the distribution function of patch properties...","\n") + patchpdf = list() + for (pp in 1:nplotpatch){ + this = plotpatch[[pp]] + vname = this$vnam + col.scheme = get(this$col.scheme)(n=ncolsfc) + emean.area = patch$area + emean.vname = patch[[vname]] + mmean.area = tapply(X=emean.area ,INDEX=mfac,FUN=unlist) + mmean.vname = tapply(X=emean.vname,INDEX=mfac,FUN=unlist) + + #----- Find the range for which we find the density function. -----------------------# + low.vname = min(unlist(emean.vname),na.rm=TRUE) + high.vname = max(unlist(emean.vname),na.rm=TRUE) + #------------------------------------------------------------------------------------# + + + + #----- Find the density function for each time. -------------------------------------# + edfun.now = mapply( FUN = density.safe + , x = emean.vname + , weights = emean.area + , MoreArgs = list(n=n.density,from=low.vname,to=high.vname) + )#end mapply + mdfun.now = mapply( FUN = density.safe + , x = mmean.vname + , weights = mmean.area + , MoreArgs = list(n=n.density,from=low.vname,to=high.vname) + )#end mapply + #------------------------------------------------------------------------------------# + + + + + #----- Save the density function. ---------------------------------------------------# + edfun = list() + edfun$x = chron(datum$when) + edfun$y = seq(from=low.vname,to=high.vname,length.out=n.density) + edfun$z = t(sapply(X=edfun.now["y",],FUN=cbind)) + #------------------------------------------------------------------------------------# + + + + + #----- Save the density function. ---------------------------------------------------# + mdfun = list() + mdfun$x = montmont + mdfun$y = seq(from=low.vname,to=high.vname,length.out=n.density) + mdfun$z = t(sapply(X=mdfun.now["y",],FUN=cbind)) + #------------------------------------------------------------------------------------# + + + + #----- Remove tiny values (even with log scale values can be very hard to see. ------# + bye = is.finite(edfun$z) & edfun$z < 1.e-6 * max(unlist(edfun$z),na.rm=TRUE) + edfun$z[bye] = NA + #------------------------------------------------------------------------------------# + + + #----- Remove tiny values (even with log scale values can be very hard to see. ------# + bye = is.finite(mdfun$z) & mdfun$z < 1.e-6 * max(unlist(mdfun$z),na.rm=TRUE) + mdfun$z[bye] = NA + #------------------------------------------------------------------------------------# + patchpdf[[vname]] = list(edensity=edfun,mdensity=mdfun) + }#end for + #---------------------------------------------------------------------------------------# + + + + #----- Find which PFTs, land uses and transitions we need to consider ------------------# pftave = apply( X = szpft$agb[,ndbh+1,] , MARGIN = 2 @@ -799,54 +921,6 @@ for (place in myplaces){ - #---------------------------------------------------------------------------------------# - # Define a suitable scale for those time series that uses datum$tomonth... # - #---------------------------------------------------------------------------------------# - whenplot6 = pretty.time(datum$tomonth,n=6) - whenplot8 = pretty.time(datum$tomonth,n=8) - #---------------------------------------------------------------------------------------# - - - - #---------------------------------------------------------------------------------------# - # Define a suitable scale for diurnal cycle... # - #---------------------------------------------------------------------------------------# - thisday = seq(from=0,to=ndcycle,by=1) * 24 / ndcycle - uplot = list() - uplot$levels = c(0,4,8,12,16,20,24) - uplot$n = 7 - uplot$scale = "hours" - uplot$padj = rep(0,times=uplot$n) - #---------------------------------------------------------------------------------------# - - - #---------------------------------------------------------------------------------------# - # Define a suitable scale for soil profile layers... # - #---------------------------------------------------------------------------------------# - znice = -pretty.log(-slz,n=8) - znice = sort(c(znice,slz[1],slz[nzg])) - sel = znice >= slz[1] & znice <= slz[nzg] - znice = znice[sel] - zat = -log(-znice) - nznice = length(znice) - znice = sprintf("%.2f",znice) - #---------------------------------------------------------------------------------------# - - - #---------------------------------------------------------------------------------------# - # Define a suitable scale for monthly means... # - #---------------------------------------------------------------------------------------# - montmont = seq(from=1,to=12,by=1) - mplot = list() - mplot$levels = montmont - mplot$labels = capwords(mon2mmm(montmont)) - mplot$n = 12 - mplot$scale = "months" - mplot$padj = rep(0,times=mplot$n) - #---------------------------------------------------------------------------------------# - - - @@ -860,6 +934,9 @@ for (place in myplaces){ + + + #---------------------------------------------------------------------------------------# # Time series by PFT. # #---------------------------------------------------------------------------------------# @@ -2273,11 +2350,11 @@ for (place in myplaces){ if (pnlog){ vrange = range(varbuff,na.rm=TRUE) - vlevels = pretty.log(x=vrange,n=ncolshov) + vlevels = pretty.log(x=vrange,n=ncolsfc) vnlev = length(vlevels) }else{ vrange = range(varbuff,na.rm=TRUE) - vlevels = pretty(x=vrange,n=ncolshov) + vlevels = pretty(x=vrange,n=ncolsfc) vnlev = length(vlevels) }#end if @@ -2306,9 +2383,9 @@ for (place in myplaces){ ,key.log=pnlog ,plot.axes={axis(side=1,at=monat,labels=monlab) axis(side=2,at=zat,labels=znice) - if (hovgrid){ + if (fcgrid){ abline(h=zat,v=monat,col="grey52",lty="dotted") - }#end if hovgrid + }#end if fcgrid }#end plot.axes ) @@ -2385,11 +2462,11 @@ for (place in myplaces){ if (pnlog){ vrange = range(varbuff,na.rm=TRUE) - vlevels = pretty.log(x=vrange,n=ncolshov) + vlevels = pretty.log(x=vrange,n=ncolsfc) vnlev = length(vlevels) }else{ vrange = range(varbuff,na.rm=TRUE) - vlevels = pretty(x=vrange,n=ncolshov) + vlevels = pretty(x=vrange,n=ncolsfc) vnlev = length(vlevels) }#end if @@ -2419,10 +2496,10 @@ for (place in myplaces){ ,plot.axes={axis(side=1,at=whenplot6$levels ,labels=whenplot6$labels,padj=whenplot6$padj) axis(side=2,at=zat,labels=znice) - if (hovgrid){ + if (fcgrid){ abline(h=zat,v=whenplot6$levels,col="grey52" ,lty="dotted") - }#end if hovgrid + }#end if fcgrid }#end plot.axes )#end sombreado @@ -2515,7 +2592,7 @@ for (place in myplaces){ yraxis = c(min(yraxis)-1,yraxis,max(yraxis)+1) vrange = range(varbuff,na.rm=TRUE) - vlevels = pretty(x=vrange,n=ncolshov) + vlevels = pretty(x=vrange,n=ncolsfc) vnlev = length(vlevels) #----- Loop over formats. --------------------------------------------------------# @@ -2541,14 +2618,14 @@ for (place in myplaces){ ,key.title=title(main=unit,cex.main=0.8) ,plot.axes={axis(side=1,at=monat,labels=monlab) axis(side=2,at=yrat) - if (hovgrid){ + if (fcgrid){ for (yl in yrat){ abline(h=yl,col="grey52",lty="dotted") } #end for yl for (ml in monat){ abline(v=ml,col="grey52",lty="dotted") } #end for ml - }#end if hovgrid + }#end if fcgrid }#end plot.axes ) @@ -2612,7 +2689,7 @@ for (place in myplaces){ huplot = pretty.time(whenaxis,n=8) vrange = range(varbuff,na.rm=TRUE) - vlevels = pretty(x=vrange,n=ncolshov) + vlevels = pretty(x=vrange,n=ncolsfc) vnlev = length(vlevels) #----- Loop over formats. --------------------------------------------------------# @@ -2639,10 +2716,10 @@ for (place in myplaces){ ,key.title=title(main=unit,cex.main=0.8) ,plot.axes={axis(side=1,at=huplot$level,labels=huplot$labels) axis(side=2,at=uplot$levels,labels=uplot$labels) - if (hovgrid){ + if (fcgrid){ abline(v=huplot$levels,h=uplot$levels ,col="grey52",lty="dotted") - }#end if hovgrid + }#end if fcgrid }#end plot.axes ) @@ -2721,6 +2798,217 @@ for (place in myplaces){ + #---------------------------------------------------------------------------------------# + # Plot the PDF of patch-level properties as a function of time. # + #---------------------------------------------------------------------------------------# + cat (" * Time series of PDF of properties by patch...","\n") + for (v in 1:nplotpatch){ + + #----- Retrieve variable information from the list. ---------------------------------# + thispatch = plotpatch[[v]] + vnam = thispatch$vnam + description = thispatch$desc + unit = thispatch$unit + vcscheme = thispatch$col.scheme + plog = thispatch$plog + plotit = thispatch$emean + + if (plotit){ + + #---------------------------------------------------------------------------------# + # Check if the directory exists. If not, create it. # + #---------------------------------------------------------------------------------# + outdir = paste(outpref,"patch_emean",sep="/") + if (! file.exists(outdir)) dir.create(outdir) + cat(" + PDF plot of ",description,"...","\n") + + this = patchpdf[[vnam]]$edensity + + + #----- Loop over formats. --------------------------------------------------------# + for (o in 1:nout){ + fichier = paste(outdir,"/",vnam,"-",suffix,".",outform[o],sep="") + if (outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth,height=size$height*depth + ,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE + ,width=size$width,height=size$height,pointsize=ptsz,paper=size$paper) + }#end if + + letitre = paste("Density function of ",description," \ ",lieu,sep="") + lex = "Time" + ley = paste(description," [",unit,"]",sep="") + + + #------------------------------------------------------------------------------# + # Plot the PDF distribution. # + #------------------------------------------------------------------------------# + sombreado( x = this$x + , y = this$y + , z = this$z + , nlevels = ncolsfc + , colour.palette = get(vcscheme) + , plot.title = title(main=letitre,xlab=lex,ylab=ley,cex.main=0.7) + , key.title = title(main="Density",cex.main=0.8) + , key.log = plog + , plot.axes = { axis( side = 1 + , at = whenplot8$levels + , labels = whenplot8$labels + , padj = whenplot8$padj + )#end axis + axis( side = 2 + , at = pretty(this$y) + , labels = NULL + )#end axis + if (fcgrid){ + abline( v = whenplot8$levels + , h = pretty(this$y) + , col = "grey52" + , lty = "dotted" + )#end abline + }#end if fcgrid + }#end plot.axes + )#end sombreado + #------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------# + # Close the device. # + #------------------------------------------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + #------------------------------------------------------------------------------# + dummy = clean.tmp() + #------------------------------------------------------------------------------# + } #end for outform + #---------------------------------------------------------------------------------# + }#end if plotit + #------------------------------------------------------------------------------------# + }#end for (v in 1:npatchplot) + #---------------------------------------------------------------------------------------# + + + + + + #---------------------------------------------------------------------------------------# + # Plot the PDF of patch-level properties as a function of time. # + #---------------------------------------------------------------------------------------# + cat (" * Monthly PDF of properties by patch...","\n") + for (v in 1:nplotpatch){ + + #----- Retrieve variable information from the list. ---------------------------------# + thispatch = plotpatch[[v]] + vnam = thispatch$vnam + description = thispatch$desc + unit = thispatch$unit + vcscheme = thispatch$col.scheme + plog = thispatch$plog + plotit = thispatch$mmean + + if (plotit){ + + #---------------------------------------------------------------------------------# + # Check if the directory exists. If not, create it. # + #---------------------------------------------------------------------------------# + outdir = paste(outpref,"patch_mmean",sep="/") + if (! file.exists(outdir)) dir.create(outdir) + cat(" + PDF plot of ",description,"...","\n") + + this = patchpdf[[vnam]]$mdensity + + + #----- Find the month tick marks. ------------------------------------------------# + monat = 1:12 + monlab = c("J","F","M","A","M","J","J","A","S","O","N","D") + #---------------------------------------------------------------------------------# + + + #----- Loop over formats. --------------------------------------------------------# + for (o in 1:nout){ + fichier = paste(outdir,"/",vnam,"-",suffix,".",outform[o],sep="") + if(outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth,height=size$height*depth + ,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE + ,width=size$width,height=size$height,pointsize=ptsz,paper=size$paper) + }#end if + + letitre = paste("Density function of ",description," \ ",lieu,sep="") + lex = "Months" + ley = paste(description," [",unit,"]",sep="") + + + #------------------------------------------------------------------------------# + # Plot the PDF distribution. # + #------------------------------------------------------------------------------# + sombreado( x = this$x + , y = this$y + , z = this$z + , nlevels = ncolsfc + , colour.palette = get(vcscheme) + , plot.title = title(main=letitre,xlab=lex,ylab=ley,cex.main=0.7) + , key.title = title(main="Density",cex.main=0.8) + , key.log = plog + , plot.axes = { axis( side = 1 + , at = monat + , labels = monlab + )#end axis + axis( side = 2 + , at = pretty(this$y) + , labels = NULL + )#end axis + if (fcgrid){ + abline( v = monat + , h = pretty(this$y) + , col = "grey52" + , lty = "dotted" + )#end abline + }#end if fcgrid + }#end plot.axes + )#end sombreado + #------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------# + # Close the device. # + #------------------------------------------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + #------------------------------------------------------------------------------# + dummy = clean.tmp() + #------------------------------------------------------------------------------# + } #end for outform + #---------------------------------------------------------------------------------# + }#end if plotit + #------------------------------------------------------------------------------------# + }#end for (v in 1:npatchplot) + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# # Bar plot by DBH class. # @@ -3029,7 +3317,7 @@ for (place in myplaces){ , inset = inset , legend = pftleg , fill = colleg - , ncol = min(2,pretty.box(n.selpft)$ncol) + , ncol = 1 , title = expression(bold("PFT")) , bg = "white" , cex = 0.9 @@ -3050,5 +3338,5 @@ for (place in myplaces){ }#end for npsas #---------------------------------------------------------------------------------------# }#end for places - -#q("no") +#==========================================================================================# +#==========================================================================================# diff --git a/ED/Template/Template/plot_ycomp.r b/ED/Template/Template/plot_ycomp.r index 2274f0fc6..98546ff4e 100644 --- a/ED/Template/Template/plot_ycomp.r +++ b/ED/Template/Template/plot_ycomp.r @@ -269,6 +269,20 @@ for (place in myplaces){ + #---------------------------------------------------------------------------------------# + # Copy the data to temporary variables. # + #---------------------------------------------------------------------------------------# + emean = datum$emean + emsqu = datum$emsqu + qmean = datum$qmean + qmsqu = datum$qmsqu + szpft = datum$szpft + lu = datum$lu + patch = datum$patch + cohort = datum$cohort + #---------------------------------------------------------------------------------------# + + #---------------------------------------------------------------------------------------# # Create a list with unique years. # #---------------------------------------------------------------------------------------# @@ -348,11 +362,11 @@ for (place in myplaces){ outplot[[y]] = list() outplot[[y]]$x = month.when if (cumul){ - copy.datum = datum[[vname]][sel] + copy.datum = emean[[vname]][sel] copy.datum[is.na(copy.datum)] = 0 outplot[[y]]$y = cumsum(copy.datum) }else{ - outplot[[y]]$y = datum[[vname]][sel] + outplot[[y]]$y = emean[[vname]][sel] }#end if #----- Update range. ----------------------------------------------------------# @@ -424,6 +438,7 @@ for (place in myplaces){ }else{ dev.off() }#end if + dummy = clean.tmp() #------------------------------------------------------------------------------# }#end for #---------------------------------------------------------------------------------# @@ -449,7 +464,7 @@ for (place in myplaces){ #---------------------------------------------------------------------------------# # Find the seasonality matrix. # #---------------------------------------------------------------------------------# - this.var = datum[[vname]] + this.var = emean[[vname]] if (cumul){ season.vec = tapply(X=this.var,INDEX=this.season,FUN=sum) }else{ @@ -458,7 +473,7 @@ for (place in myplaces){ season.mat = matrix( data = season.vec , ncol = 4 , nrow = nyr3mon - , dimnames = list(yr3mon.desc,season.list) + , dimnames = list(yr3mon.desc,season.list[-nseasons]) , byrow = TRUE )#end matrix if (vname == "rain"){ @@ -526,6 +541,7 @@ for (place in myplaces){ }else{ dev.off() }#end if + dummy = clean.tmp() #------------------------------------------------------------------------------# }#end for #---------------------------------------------------------------------------------# @@ -578,21 +594,21 @@ for (place in myplaces){ #----- Attribute symbols according to the year. -------------------------------# this.pch = eft.pch[match(yr.season,eft.year)] #----- Expand the edges of the x axis. ----------------------------------------# - xvar = datum[[xvname]] + xvar = emean[[xvname]] lex = paste(xdesc," [",xunit,"]",sep="") xrange = range(xvar,na.rm=TRUE) xlimit = xrange xlimit[1] = xrange[1] - 0.05 * (xrange[2] - xrange[1]) xlimit[2] = xrange[2] + 0.05 * (xrange[2] - xrange[1]) #----- Expand the edges of the y axis. ----------------------------------------# - yvar = datum[[yvname]] + yvar = emean[[yvname]] ley = paste(ydesc," [",yunit[y],"]",sep="") yrange = range(yvar,na.rm=TRUE) ylimit = yrange ylimit[1] = yrange[1] - 0.05 * (yrange[2] - yrange[1]) ylimit[2] = yrange[2] + 0.40 * (yrange[2] - yrange[1]) #----- Annotation for the colour map ("Z" axis). ------------------------------# - zvar = datum[[zvname]] + zvar = emean[[zvname]] lez = paste(zkey,"\n [",zunit,"]",sep="") #----- Find the position to plot the legend. ----------------------------------# leg.pos = paste(yleg,xleg,sep="") @@ -663,6 +679,7 @@ for (place in myplaces){ }else{ dev.off() }#end if + dummy = clean.tmp() #---------------------------------------------------------------------------# }#end for outform #------------------------------------------------------------------------------# @@ -674,5 +691,3 @@ for (place in myplaces){ #---------------------------------------------------------------------------------------# }#end for places #------------------------------------------------------------------------------------------# - -#q("no") diff --git a/ED/Template/Template/plot_yearly.r b/ED/Template/Template/plot_yearly.r index e472f01ec..7ec93ba6e 100644 --- a/ED/Template/Template/plot_yearly.r +++ b/ED/Template/Template/plot_yearly.r @@ -281,10 +281,16 @@ for (place in myplaces){ #----- Make some shorter versions of some variables. -----------------------------------# - mfac = datum$month - yfac = datum$year - dcycmean = datum$dcycmean - dcycmsqu = datum$dcycmsqu + mfac = datum$month + yfac = datum$year + emean = datum$emean + emsqu = datum$emsqu + qmean = datum$qmean + qmsqu = datum$qmsqu + szpft = datum$szpft + lu = datum$lu + patch = datum$patch + cohort = datum$cohort #---------------------------------------------------------------------------------------# @@ -294,310 +300,57 @@ for (place in myplaces){ #---------------------------------------------------------------------------------------# cat (" - Finding the annual statistics for multi-dimensional variables...","\n") cat (" * Aggregating the annual mean of PFT-DBH variables...","\n") - datum$agbpftdbh = qapply(datum$agbpftdbh ,yfac,1,mean,na.rm=TRUE) - datum$basareapftdbh = qapply(datum$basareapftdbh ,yfac,1,mean,na.rm=TRUE) - datum$laipftdbh = qapply(datum$laipftdbh ,yfac,1,mean,na.rm=TRUE) - datum$waipftdbh = qapply(datum$waipftdbh ,yfac,1,mean,na.rm=TRUE) - datum$taipftdbh = qapply(datum$taipftdbh ,yfac,1,mean,na.rm=TRUE) - datum$gpppftdbh = qapply(datum$gpppftdbh ,yfac,1,mean,na.rm=TRUE) - datum$npppftdbh = qapply(datum$npppftdbh ,yfac,1,mean,na.rm=TRUE) - datum$mcopftdbh = qapply(datum$mcopftdbh ,yfac,1,mean,na.rm=TRUE) - datum$cbapftdbh = qapply(datum$cbapftdbh ,yfac,1,mean,na.rm=TRUE) - datum$cbalightpftdbh = qapply(datum$cbalightpftdbh ,yfac,1,mean,na.rm=TRUE) - datum$cbamoistpftdbh = qapply(datum$cbamoistpftdbh ,yfac,1,mean,na.rm=TRUE) - datum$cbal12lightpftdbh = qapply(datum$cbal12lightpftdbh ,yfac,1,mean,na.rm=TRUE) - datum$cbal12moistpftdbh = qapply(datum$cbal12moistpftdbh ,yfac,1,mean,na.rm=TRUE) - datum$cbarelpftdbh = qapply(datum$cbarelpftdbh ,yfac,1,mean,na.rm=TRUE) - datum$ldroppftdbh = qapply(datum$ldroppftdbh ,yfac,1,mean,na.rm=TRUE) - datum$fsopftdbh = qapply(datum$fsopftdbh ,yfac,1,mean,na.rm=TRUE) - datum$demandpftdbh = qapply(datum$demandpftdbh ,yfac,1,mean,na.rm=TRUE) - datum$supplypftdbh = qapply(datum$supplypftdbh ,yfac,1,mean,na.rm=TRUE) - datum$nplantpftdbh = qapply(datum$nplantpftdbh ,yfac,1,mean,na.rm=TRUE) - datum$mortpftdbh = qapply(datum$mortpftdbh ,yfac,1,mean,na.rm=TRUE) - datum$agemortpftdbh = qapply(datum$agemortpftdbh ,yfac,1,mean,na.rm=TRUE) - datum$ncbmortpftdbh = qapply(datum$ncbmortpftdbh ,yfac,1,mean,na.rm=TRUE) - datum$tfallmortpftdbh = qapply(datum$tfallmortpftdbh ,yfac,1,mean,na.rm=TRUE) - datum$coldmortpftdbh = qapply(datum$coldmortpftdbh ,yfac,1,mean,na.rm=TRUE) - datum$distmortpftdbh = qapply(datum$distmortpftdbh ,yfac,1,mean,na.rm=TRUE) - datum$growthpftdbh = qapply(datum$growthpftdbh ,yfac,1,mean,na.rm=TRUE) - datum$plresppftdbh = qapply(datum$plresppftdbh ,yfac,1,mean,na.rm=TRUE) - datum$bstorepftdbh = qapply(datum$bstorepftdbh ,yfac,1,mean,na.rm=TRUE) - datum$hflxlcpftdbh = qapply(datum$hflxlcpftdbh ,yfac,1,mean,na.rm=TRUE) - datum$wflxlcpftdbh = qapply(datum$wflxlcpftdbh ,yfac,1,mean,na.rm=TRUE) - datum$transppftdbh = qapply(datum$transppftdbh ,yfac,1,mean,na.rm=TRUE) - datum$i.gpppftdbh = qapply(datum$i.gpppftdbh ,yfac,1,mean,na.rm=TRUE) - datum$i.npppftdbh = qapply(datum$i.npppftdbh ,yfac,1,mean,na.rm=TRUE) - datum$i.plresppftdbh = qapply(datum$i.plresppftdbh ,yfac,1,mean,na.rm=TRUE) - datum$i.mcopftdbh = qapply(datum$i.mcopftdbh ,yfac,1,mean,na.rm=TRUE) - datum$i.cbapftdbh = qapply(datum$i.cbapftdbh ,yfac,1,mean,na.rm=TRUE) - datum$i.cbalightpftdbh = qapply(datum$i.cbalightpftdbh ,yfac,1,mean,na.rm=TRUE) - datum$i.cbamoistpftdbh = qapply(datum$i.cbamoistpftdbh ,yfac,1,mean,na.rm=TRUE) - datum$i.cbal12lightpftdbh = qapply(datum$i.cbal12lightpftdbh ,yfac,1,mean,na.rm=TRUE) - datum$i.cbal12moistpftdbh = qapply(datum$i.cbal12moistpftdbh ,yfac,1,mean,na.rm=TRUE) - datum$i.transppftdbh = qapply(datum$i.transppftdbh ,yfac,1,mean,na.rm=TRUE) - datum$i.wflxlcpftdbh = qapply(datum$i.wflxlcpftdbh ,yfac,1,mean,na.rm=TRUE) - datum$i.hflxlcpftdbh = qapply(datum$i.hflxlcpftdbh ,yfac,1,mean,na.rm=TRUE) - #----- PFT arrays. The "+1" column contains the total. -------------------------------# - cat (" * Aggregating the annual mean of PFT variables...","\n") - datum$agbpft = qapply(datum$agbpft ,yfac,1,mean,na.rm=TRUE) - datum$bseedspft = qapply(datum$bseedspft ,yfac,1,mean,na.rm=TRUE) - datum$nplantpft = qapply(datum$nplantpft ,yfac,1,mean,na.rm=TRUE) - datum$laipft = qapply(datum$laipft ,yfac,1,mean,na.rm=TRUE) - datum$waipft = qapply(datum$waipft ,yfac,1,mean,na.rm=TRUE) - datum$taipft = qapply(datum$taipft ,yfac,1,mean,na.rm=TRUE) - datum$gpppft = qapply(datum$gpppft ,yfac,1,mean,na.rm=TRUE) - datum$npppft = qapply(datum$npppft ,yfac,1,mean,na.rm=TRUE) - datum$mcopft = qapply(datum$mcopft ,yfac,1,mean,na.rm=TRUE) - datum$cbapft = qapply(datum$cbapft ,yfac,1,mean,na.rm=TRUE) - datum$cbalightpft = qapply(datum$cbalightpft ,yfac,1,mean,na.rm=TRUE) - datum$cbamoistpft = qapply(datum$cbamoistpft ,yfac,1,mean,na.rm=TRUE) - datum$cbal12lightpft = qapply(datum$cbal12lightpft ,yfac,1,mean,na.rm=TRUE) - datum$cbal12moistpft = qapply(datum$cbal12moistpft ,yfac,1,mean,na.rm=TRUE) - datum$cbarelpft = qapply(datum$cbarelpft ,yfac,1,mean,na.rm=TRUE) - datum$ldroppft = qapply(datum$ldroppft ,yfac,1,mean,na.rm=TRUE) - datum$fsopft = qapply(datum$fsopft ,yfac,1,mean,na.rm=TRUE) - datum$balivepft = qapply(datum$balivepft ,yfac,1,mean,na.rm=TRUE) - datum$bdeadpft = qapply(datum$bdeadpft ,yfac,1,mean,na.rm=TRUE) - datum$bleafpft = qapply(datum$bleafpft ,yfac,1,mean,na.rm=TRUE) - datum$brootpft = qapply(datum$brootpft ,yfac,1,mean,na.rm=TRUE) - datum$bswoodpft = qapply(datum$bswoodpft ,yfac,1,mean,na.rm=TRUE) - datum$bstorepft = qapply(datum$bstorepft ,yfac,1,mean,na.rm=TRUE) - datum$basareapft = qapply(datum$basareapft ,yfac,1,mean,na.rm=TRUE) - datum$leafresppft = qapply(datum$leafresppft ,yfac,1,mean,na.rm=TRUE) - datum$rootresppft = qapply(datum$rootresppft ,yfac,1,mean,na.rm=TRUE) - datum$growthresppft = qapply(datum$growthresppft ,yfac,1,mean,na.rm=TRUE) - datum$plresppft = qapply(datum$plresppft ,yfac,1,mean,na.rm=TRUE) - datum$hflxlcpft = qapply(datum$hflxlcpft ,yfac,1,mean,na.rm=TRUE) - datum$wflxlcpft = qapply(datum$wflxlcpft ,yfac,1,mean,na.rm=TRUE) - datum$transppft = qapply(datum$transppft ,yfac,1,mean,na.rm=TRUE) - datum$i.gpppft = qapply(datum$i.gpppft ,yfac,1,mean,na.rm=TRUE) - datum$i.npppft = qapply(datum$i.npppft ,yfac,1,mean,na.rm=TRUE) - datum$i.plresppft = qapply(datum$i.plresppft ,yfac,1,mean,na.rm=TRUE) - datum$i.mcopft = qapply(datum$i.mcopft ,yfac,1,mean,na.rm=TRUE) - datum$i.cbapft = qapply(datum$i.cbapft ,yfac,1,mean,na.rm=TRUE) - datum$i.cbalightpft = qapply(datum$i.cbalightpft ,yfac,1,mean,na.rm=TRUE) - datum$i.cbamoistpft = qapply(datum$i.cbamoistpft ,yfac,1,mean,na.rm=TRUE) - datum$i.cbal12lightpft = qapply(datum$i.cbal12lightpft ,yfac,1,mean,na.rm=TRUE) - datum$i.cbal12moistpft = qapply(datum$i.cbal12moistpft ,yfac,1,mean,na.rm=TRUE) - datum$i.transppft = qapply(datum$i.transppft ,yfac,1,mean,na.rm=TRUE) - datum$i.wflxlcpft = qapply(datum$i.wflxlcpft ,yfac,1,mean,na.rm=TRUE) - datum$i.hflxlcpft = qapply(datum$i.hflxlcpft ,yfac,1,mean,na.rm=TRUE) - datum$mortpft = qapply(datum$mortpft ,yfac,1,mean,na.rm=TRUE) - datum$agemortpft = qapply(datum$agemortpft ,yfac,1,mean,na.rm=TRUE) - datum$ncbmortpft = qapply(datum$ncbmortpft ,yfac,1,mean,na.rm=TRUE) - datum$tfallmortpft = qapply(datum$tfallmortpft ,yfac,1,mean,na.rm=TRUE) - datum$coldmortpft = qapply(datum$coldmortpft ,yfac,1,mean,na.rm=TRUE) - datum$distmortpft = qapply(datum$distmortpft ,yfac,1,mean,na.rm=TRUE) - datum$recrpft = qapply(datum$recrpft ,yfac,1,mean,na.rm=TRUE) - datum$growthpft = qapply(datum$growthpft ,yfac,1,mean,na.rm=TRUE) - datum$censusnplantpft = qapply(datum$censusnplantpft ,yfac,1,mean,na.rm=TRUE) - datum$censuslaipft = qapply(datum$censuslaipft ,yfac,1,mean,na.rm=TRUE) - datum$censuswaipft = qapply(datum$censuswaipft ,yfac,1,mean,na.rm=TRUE) - datum$censustaipft = qapply(datum$censustaipft ,yfac,1,mean,na.rm=TRUE) - datum$censusagbpft = qapply(datum$censusagbpft ,yfac,1,mean,na.rm=TRUE) - datum$censusbapft = qapply(datum$censusbapft ,yfac,1,mean,na.rm=TRUE) + for (vname in names(szpft)){ + szpft[[vname]] = qapply(X=szpft[[vname]],INDEX=yfac,DIM=1,FUN=mean,na.rm=TRUE) + }#end for #----- LU arrays. The "+1" column contains the total. --------------------------------# cat (" * Aggregating the annual mean of LU variables...","\n") - datum$agblu = qapply(datum$agblu ,yfac,1,mean,na.rm=TRUE) - datum$lailu = qapply(datum$lailu ,yfac,1,mean,na.rm=TRUE) - datum$gpplu = qapply(datum$gpplu ,yfac,1,mean,na.rm=TRUE) - datum$npplu = qapply(datum$npplu ,yfac,1,mean,na.rm=TRUE) - datum$arealu = qapply(datum$arealu ,yfac,1,mean,na.rm=TRUE) - datum$basarealu = qapply(datum$basarealu ,yfac,1,mean,na.rm=TRUE) - #----- Miscellaneous arrays. -----------------------------------------------------------# - cat (" * Aggregating the annual mean of DIST variables...","\n") - datum$dist = qapply(datum$dist ,yfac,1,mean,na.rm=TRUE) + for (vname in names(lu)){ + lu [[vname]] = qapply(X=lu [[vname]],INDEX=yfac,DIM=1,FUN=mean,na.rm=TRUE) + }#end for #---------------------------------------------------------------------------------------# #---------------------------------------------------------------------------------------# # Here we find the monthly means for month, then compute the standard deviation. # #---------------------------------------------------------------------------------------# - cat (" - Finding the monthly mean...","\n") - cat (" * Aggregating the monthly mean...","\n") - mont12mn = list() - mont12mn$gpp = tapply(X=datum$gpp ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$npp = tapply(X=datum$npp ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$nep = tapply(X=datum$nep ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$plresp = tapply(X=datum$plresp ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$leaf.resp = tapply(X=datum$leaf.resp ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$root.resp = tapply(X=datum$root.resp ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$growth.resp = tapply(X=datum$growth.resp ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$hetresp = tapply(X=datum$hetresp ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$cwdresp = tapply(X=datum$cwdresp ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$cflxca = tapply(X=datum$cflxca ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$cflxst = tapply(X=datum$cflxst ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$nee = tapply(X=datum$nee ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$reco = tapply(X=datum$reco ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$hflxca = tapply(X=datum$hflxca ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$hflxlc = tapply(X=datum$hflxlc ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$hflxwc = tapply(X=datum$hflxwc ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$hflxgc = tapply(X=datum$hflxgc ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$wflxca = tapply(X=datum$wflxca ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$qwflxca = tapply(X=datum$qwflxca ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$wflxlc = tapply(X=datum$wflxlc ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$wflxwc = tapply(X=datum$wflxwc ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$wflxgc = tapply(X=datum$wflxgc ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$evap = tapply(X=datum$evap ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$transp = tapply(X=datum$transp ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$rain = tapply(X=datum$rain ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$atm.temp = tapply(X=datum$atm.temp ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$rshort = tapply(X=datum$rshort ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$rshortup = tapply(X=datum$rshortup ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$rlong = tapply(X=datum$rlong ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$rlongup = tapply(X=datum$rlongup ,INDEX=mfac ,FUN=mean,na.rm=T) - # mont12mn$par.tot = tapply(X=datum$par.tot ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$parup = tapply(X=datum$parup ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$rnet = tapply(X=datum$rnet ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$albedo = tapply(X=datum$albedo ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$atm.shv = tapply(X=datum$atm.shv ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$atm.co2 = tapply(X=datum$atm.co2 ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$atm.prss = tapply(X=datum$atm.prss ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$atm.vels = tapply(X=datum$atm.vels ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$ustar = tapply(X=datum$ustar ,INDEX=mfac ,FUN=mean,na.rm=T) - mont12mn$soil.temp = qapply(X=datum$soil.temp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - mont12mn$soil.water = qapply(X=datum$soil.water ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - mont12mn$soil.mstpot = qapply(X=datum$soil.mstpot ,INDEX=mfac,DIM=1,FUN=mean,na.rm=T) - #----- Find the mean sum of squares. ---------------------------------------------------# - cat (" * Standard deviation of the monthly means...","\n") - mont12sd = list() - mont12sd$gpp = tapply(X=datum$gpp ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$npp = tapply(X=datum$npp ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$nep = tapply(X=datum$nep ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$plresp = tapply(X=datum$plresp ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$leaf.resp = tapply(X=datum$leaf.resp ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$root.resp = tapply(X=datum$root.resp ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$growth.resp = tapply(X=datum$growth.resp ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$hetresp = tapply(X=datum$hetresp ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$cwdresp = tapply(X=datum$cwdresp ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$cflxca = tapply(X=datum$cflxca ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$cflxst = tapply(X=datum$cflxst ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$nee = tapply(X=datum$nee ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$reco = tapply(X=datum$reco ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$hflxca = tapply(X=datum$hflxca ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$hflxlc = tapply(X=datum$hflxlc ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$hflxwc = tapply(X=datum$hflxwc ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$hflxgc = tapply(X=datum$hflxgc ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$wflxca = tapply(X=datum$wflxca ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$qwflxca = tapply(X=datum$qwflxca ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$wflxlc = tapply(X=datum$wflxlc ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$wflxwc = tapply(X=datum$wflxwc ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$wflxgc = tapply(X=datum$wflxgc ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$evap = tapply(X=datum$evap ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$transp = tapply(X=datum$transp ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$rain = tapply(X=datum$rain ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$atm.temp = tapply(X=datum$atm.temp ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$rshort = tapply(X=datum$rshort ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$rshortup = tapply(X=datum$rshortup ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$rlong = tapply(X=datum$rlong ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$rlongup = tapply(X=datum$rlongup ,INDEX=mfac ,FUN=sd ,na.rm=T) - # mont12sd$par.tot = tapply(X=datum$par.tot ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$parup = tapply(X=datum$parup ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$rnet = tapply(X=datum$rnet ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$albedo = tapply(X=datum$albedo ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$atm.shv = tapply(X=datum$atm.shv ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$atm.co2 = tapply(X=datum$atm.co2 ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$atm.prss = tapply(X=datum$atm.prss ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$atm.vels = tapply(X=datum$atm.vels ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$ustar = tapply(X=datum$ustar ,INDEX=mfac ,FUN=sd ,na.rm=T) - mont12sd$soil.temp = qapply(X=datum$soil.temp ,INDEX=mfac,DIM=1,FUN=sd ,na.rm=T) - mont12sd$soil.water = qapply(X=datum$soil.water ,INDEX=mfac,DIM=1,FUN=sd ,na.rm=T) - mont12sd$soil.mstpot = qapply(X=datum$soil.mstpot ,INDEX=mfac,DIM=1,FUN=sd ,na.rm=T) - #---------------------------------------------------------------------------------------# + cat (" - Finding the monthly and annual means...","\n") + cat (" * Aggregating the monthly mean and standard deviation...","\n") + mmean = list() + msdev = list() + ymean = list() + ysdev = list() + for (vname in names(emean)){ + if (vname %in% c("soil.temp","soil.water","soil.mstpot")){ + mmean[[vname]] = qapply(X=emean[[vname]], INDEX=mfac, DIM=1, FUN=mean, na.rm=TRUE) + msdev[[vname]] = qapply(X=emean[[vname]], INDEX=mfac, DIM=1, FUN=sd , na.rm=TRUE) + ymean[[vname]] = qapply(X=emean[[vname]], INDEX=yfac, DIM=1, FUN=mean, na.rm=TRUE) + ysdev[[vname]] = qapply(X=emean[[vname]], INDEX=yfac, DIM=1, FUN=sd , na.rm=TRUE) + }else if (vname %in% c("rain")){ + mmean[[vname]] = tapply(X=emean[[vname]], INDEX=mfac, FUN=mean, na.rm=TRUE) + msdev[[vname]] = tapply(X=emean[[vname]], INDEX=mfac, FUN=sd , na.rm=TRUE) + ymean[[vname]] = tapply(X=emean[[vname]], INDEX=yfac, FUN=sum , na.rm=TRUE) + ysdev[[vname]] = tapply(X=emean[[vname]], INDEX=yfac, FUN=sd , na.rm=TRUE) + }else{ + mmean[[vname]] = tapply(X=emean[[vname]], INDEX=mfac, FUN=mean, na.rm=TRUE) + msdev[[vname]] = tapply(X=emean[[vname]], INDEX=mfac, FUN=sd , na.rm=TRUE) + ymean[[vname]] = tapply(X=emean[[vname]], INDEX=yfac, FUN=mean, na.rm=TRUE) + ysdev[[vname]] = tapply(X=emean[[vname]], INDEX=yfac, FUN=sd , na.rm=TRUE) + }#end if + #------------------------------------------------------------------------------------# - #---------------------------------------------------------------------------------------# - # Here we find the monthly means for month, then compute the standard deviation. # - #---------------------------------------------------------------------------------------# - cat (" - Finding the annual mean...","\n") - cat (" * Aggregating the annual mean...","\n") - year12mn = list() - year12mn$gpp = tapply(X=datum$gpp ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$npp = tapply(X=datum$npp ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$nep = tapply(X=datum$nep ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$plresp = tapply(X=datum$plresp ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$leaf.resp = tapply(X=datum$leaf.resp ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$root.resp = tapply(X=datum$root.resp ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$growth.resp = tapply(X=datum$growth.resp ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$hetresp = tapply(X=datum$hetresp ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$cwdresp = tapply(X=datum$cwdresp ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$cflxca = tapply(X=datum$cflxca ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$cflxst = tapply(X=datum$cflxst ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$nee = tapply(X=datum$nee ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$reco = tapply(X=datum$reco ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$hflxca = tapply(X=datum$hflxca ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$hflxlc = tapply(X=datum$hflxlc ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$hflxwc = tapply(X=datum$hflxwc ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$hflxgc = tapply(X=datum$hflxgc ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$wflxca = tapply(X=datum$wflxca ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$qwflxca = tapply(X=datum$qwflxca ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$wflxlc = tapply(X=datum$wflxlc ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$wflxwc = tapply(X=datum$wflxwc ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$wflxgc = tapply(X=datum$wflxgc ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$evap = tapply(X=datum$evap ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$transp = tapply(X=datum$transp ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$rain = tapply(X=datum$rain ,INDEX=yfac ,FUN=sum ,na.rm=T) - year12mn$atm.temp = tapply(X=datum$atm.temp ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$rshort = tapply(X=datum$rshort ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$rshortup = tapply(X=datum$rshortup ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$rlong = tapply(X=datum$rlong ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$rlongup = tapply(X=datum$rlongup ,INDEX=yfac ,FUN=mean,na.rm=T) - # year12mn$par.tot = tapply(X=datum$par.tot ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$parup = tapply(X=datum$parup ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$rnet = tapply(X=datum$rnet ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$albedo = tapply(X=datum$albedo ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$atm.shv = tapply(X=datum$atm.shv ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$atm.co2 = tapply(X=datum$atm.co2 ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$atm.prss = tapply(X=datum$atm.prss ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$atm.vels = tapply(X=datum$atm.vels ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$ustar = tapply(X=datum$ustar ,INDEX=yfac ,FUN=mean,na.rm=T) - year12mn$soil.temp = qapply(X=datum$soil.temp ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - year12mn$soil.water = qapply(X=datum$soil.water ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - year12mn$soil.mstpot = qapply(X=datum$soil.mstpot ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - cat (" * Standard deviation of the annual mean...","\n") - year12sd = list() - year12sd$gpp = tapply(X=datum$gpp ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$npp = tapply(X=datum$npp ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$nep = tapply(X=datum$nep ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$plresp = tapply(X=datum$plresp ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$leaf.resp = tapply(X=datum$leaf.resp ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$root.resp = tapply(X=datum$root.resp ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$growth.resp = tapply(X=datum$growth.resp ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$hetresp = tapply(X=datum$hetresp ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$cwdresp = tapply(X=datum$cwdresp ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$cflxca = tapply(X=datum$cflxca ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$cflxst = tapply(X=datum$cflxst ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$nee = tapply(X=datum$nee ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$reco = tapply(X=datum$reco ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$hflxca = tapply(X=datum$hflxca ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$hflxlc = tapply(X=datum$hflxlc ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$hflxwc = tapply(X=datum$hflxwc ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$hflxgc = tapply(X=datum$hflxgc ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$wflxca = tapply(X=datum$wflxca ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$qwflxca = tapply(X=datum$qwflxca ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$wflxlc = tapply(X=datum$wflxlc ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$wflxwc = tapply(X=datum$wflxwc ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$wflxgc = tapply(X=datum$wflxgc ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$evap = tapply(X=datum$evap ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$transp = tapply(X=datum$transp ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$rain = tapply(X=datum$rain*12 ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$atm.temp = tapply(X=datum$atm.temp ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$rshort = tapply(X=datum$rshort ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$rshortup = tapply(X=datum$rshortup ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$rlong = tapply(X=datum$rlong ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$rlongup = tapply(X=datum$rlongup ,INDEX=yfac ,FUN=sd ,na.rm=T) - # year12sd$par.tot = tapply(X=datum$par.tot ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$parup = tapply(X=datum$parup ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$rnet = tapply(X=datum$rnet ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$albedo = tapply(X=datum$albedo ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$atm.shv = tapply(X=datum$atm.shv ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$atm.co2 = tapply(X=datum$atm.co2 ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$atm.prss = tapply(X=datum$atm.prss ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$atm.vels = tapply(X=datum$atm.vels ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$ustar = tapply(X=datum$ustar ,INDEX=yfac ,FUN=sd ,na.rm=T) - year12sd$soil.temp = qapply(X=datum$soil.temp ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - year12sd$soil.water = qapply(X=datum$soil.water ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - year12sd$soil.mstpot = qapply(X=datum$soil.mstpot ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) + #----- Fix the bad data. ------------------------------------------------------------# + bad.mmean = ! is.finite(mmean[[vname]]) + bad.msdev = ! is.finite(msdev[[vname]]) + bad.ymean = ! is.finite(ymean[[vname]]) + bad.ysdev = ! is.finite(ysdev[[vname]]) + mmean[[vname]][bad.mmean] = NA + msdev[[vname]][bad.msdev] = 0. + ymean[[vname]][bad.ymean] = NA + ysdev[[vname]][bad.ysdev] = 0. + #------------------------------------------------------------------------------------# + }#end for #---------------------------------------------------------------------------------------# @@ -607,130 +360,17 @@ for (place in myplaces){ # Here we find the Mean diurnal cycle for each month, then compute the standard # # deviation. # #---------------------------------------------------------------------------------------# - cat (" - Aggregating the annual mean of the diurnal cycle...","\n") - dcyc12mn =list() - dcyc12mn$gpp =qapply(X=dcycmean$gpp ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$npp =qapply(X=dcycmean$npp ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$plresp =qapply(X=dcycmean$plresp ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$leaf.resp =qapply(X=dcycmean$leaf.resp ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$root.resp =qapply(X=dcycmean$root.resp ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$hetresp =qapply(X=dcycmean$hetresp ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$cwdresp =qapply(X=dcycmean$cwdresp ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$nep =qapply(X=dcycmean$nep ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$nee =qapply(X=dcycmean$nee ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$reco =qapply(X=dcycmean$reco ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$cflxca =qapply(X=dcycmean$cflxca ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$cflxst =qapply(X=dcycmean$cflxst ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$hflxca =qapply(X=dcycmean$hflxca ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$hflxlc =qapply(X=dcycmean$hflxlc ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$hflxwc =qapply(X=dcycmean$hflxwc ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$hflxgc =qapply(X=dcycmean$hflxgc ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$wflxca =qapply(X=dcycmean$wflxca ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$qwflxca =qapply(X=dcycmean$qwflxca ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$wflxlc =qapply(X=dcycmean$wflxlc ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$wflxwc =qapply(X=dcycmean$wflxwc ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$wflxgc =qapply(X=dcycmean$wflxgc ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$evap =qapply(X=dcycmean$evap ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$transp =qapply(X=dcycmean$transp ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$atm.temp =qapply(X=dcycmean$atm.temp ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$can.temp =qapply(X=dcycmean$can.temp ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$leaf.temp =qapply(X=dcycmean$leaf.temp ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$wood.temp =qapply(X=dcycmean$wood.temp ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$gnd.temp =qapply(X=dcycmean$gnd.temp ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$atm.shv =qapply(X=dcycmean$atm.shv ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$can.shv =qapply(X=dcycmean$can.shv ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$gnd.shv =qapply(X=dcycmean$gnd.shv ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$atm.vpd =qapply(X=dcycmean$atm.vpd ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$can.vpd =qapply(X=dcycmean$can.vpd ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$leaf.vpd =qapply(X=dcycmean$leaf.vpd ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$atm.co2 =qapply(X=dcycmean$atm.co2 ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$can.co2 =qapply(X=dcycmean$can.co2 ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$atm.prss =qapply(X=dcycmean$atm.prss ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$can.prss =qapply(X=dcycmean$can.prss ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$atm.vels =qapply(X=dcycmean$atm.vels ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$ustar =qapply(X=dcycmean$ustar ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$fs.open =qapply(X=dcycmean$fs.open ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$rain =qapply(X=dcycmean$rain ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$rshort =qapply(X=dcycmean$rshort ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$rshort.beam =qapply(X=dcycmean$rshort.beam ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$rshort.diff =qapply(X=dcycmean$rshort.diff ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$rshort.gnd =qapply(X=dcycmean$rshort.gnd ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$rshortup =qapply(X=dcycmean$rshortup ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$rlong =qapply(X=dcycmean$rlong ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$rlong.gnd =qapply(X=dcycmean$rlong.gnd ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$rlongup =qapply(X=dcycmean$rlongup ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - # dcyc12mn$par.tot =qapply(X=dcycmean$par.tot ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - # dcyc12mn$par.beam =qapply(X=dcycmean$par.beam ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - # dcyc12mn$par.diff =qapply(X=dcycmean$par.diff ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - # dcyc12mn$par.gnd =qapply(X=dcycmean$par.gnd ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$parup =qapply(X=dcycmean$parup ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$rnet =qapply(X=dcycmean$rnet ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$albedo =qapply(X=dcycmean$albedo ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$albedo.beam =qapply(X=dcycmean$albedo.beam ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$albedo.diff =qapply(X=dcycmean$albedo.diff ,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - dcyc12mn$rlong.albedo=qapply(X=dcycmean$rlong.albedo,INDEX=yfac,DIM=1,FUN=mean,na.rm=T) - #----- Find the mean sum of squares. ---------------------------------------------------# - dcyc12sd =list() - dcyc12sd$gpp =qapply(X=dcycmean$gpp ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$npp =qapply(X=dcycmean$npp ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$plresp =qapply(X=dcycmean$plresp ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$leaf.resp =qapply(X=dcycmean$leaf.resp ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$root.resp =qapply(X=dcycmean$root.resp ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$hetresp =qapply(X=dcycmean$hetresp ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$cwdresp =qapply(X=dcycmean$cwdresp ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$nep =qapply(X=dcycmean$nep ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$nee =qapply(X=dcycmean$nee ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$reco =qapply(X=dcycmean$reco ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$cflxca =qapply(X=dcycmean$cflxca ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$cflxst =qapply(X=dcycmean$cflxst ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$hflxca =qapply(X=dcycmean$hflxca ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$hflxlc =qapply(X=dcycmean$hflxlc ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$hflxwc =qapply(X=dcycmean$hflxwc ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$hflxgc =qapply(X=dcycmean$hflxgc ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$wflxca =qapply(X=dcycmean$wflxca ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$qwflxca =qapply(X=dcycmean$qwflxca ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$wflxlc =qapply(X=dcycmean$wflxlc ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$wflxwc =qapply(X=dcycmean$wflxwc ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$wflxgc =qapply(X=dcycmean$wflxgc ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$evap =qapply(X=dcycmean$evap ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$transp =qapply(X=dcycmean$transp ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$atm.temp =qapply(X=dcycmean$atm.temp ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$can.temp =qapply(X=dcycmean$can.temp ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$leaf.temp =qapply(X=dcycmean$leaf.temp ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$wood.temp =qapply(X=dcycmean$wood.temp ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$gnd.temp =qapply(X=dcycmean$gnd.temp ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$atm.shv =qapply(X=dcycmean$atm.shv ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$can.shv =qapply(X=dcycmean$can.shv ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$gnd.shv =qapply(X=dcycmean$gnd.shv ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$atm.vpd =qapply(X=dcycmean$atm.vpd ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$can.vpd =qapply(X=dcycmean$can.vpd ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$leaf.vpd =qapply(X=dcycmean$leaf.vpd ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$atm.co2 =qapply(X=dcycmean$atm.co2 ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$can.co2 =qapply(X=dcycmean$can.co2 ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$atm.prss =qapply(X=dcycmean$atm.prss ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$can.prss =qapply(X=dcycmean$can.prss ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$atm.vels =qapply(X=dcycmean$atm.vels ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$ustar =qapply(X=dcycmean$ustar ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$fs.open =qapply(X=dcycmean$fs.open ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$rain =qapply(X=dcycmean$rain ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$rshort =qapply(X=dcycmean$rshort ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$rshort.beam =qapply(X=dcycmean$rshort.beam ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$rshort.diff =qapply(X=dcycmean$rshort.diff ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$rshort.gnd =qapply(X=dcycmean$rshort.gnd ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$rshortup =qapply(X=dcycmean$rshortup ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$rlong =qapply(X=dcycmean$rlong ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$rlong.gnd =qapply(X=dcycmean$rlong.gnd ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$rlongup =qapply(X=dcycmean$rlongup ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - # dcyc12sd$par.tot =qapply(X=dcycmean$par.tot ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - # dcyc12sd$par.beam =qapply(X=dcycmean$par.beam ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - # dcyc12sd$par.diff =qapply(X=dcycmean$par.diff ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - # dcyc12sd$par.gnd =qapply(X=dcycmean$par.gnd ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$parup =qapply(X=dcycmean$parup ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$rnet =qapply(X=dcycmean$rnet ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$albedo =qapply(X=dcycmean$albedo ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$albedo.beam =qapply(X=dcycmean$albedo.beam ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$albedo.diff =qapply(X=dcycmean$albedo.diff ,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) - dcyc12sd$rlong.albedo=qapply(X=dcycmean$rlong.albedo,INDEX=yfac,DIM=1,FUN=sd ,na.rm=T) + cat (" - Aggregating the annual mean and std. dev. of the diurnal cycle...","\n") + umean = list() + usdev = list() + for (vname in names(qmean)){ + umean[[vname]] = qapply(qmean[[vname]],INDEX=yfac,DIM=1,FUN=mean,na.rm=TRUE) + usdev[[vname]] = qapply(qmean[[vname]],INDEX=yfac,DIM=1,FUN=sd ,na.rm=TRUE) + bad.umean = ! is.finite(umean[[vname]]) + bad.usdev = ! is.finite(usdev[[vname]]) + umean[[vname]][bad.umean] = NA + usdev[[vname]][bad.usdev] = 0. + }#end for #---------------------------------------------------------------------------------------# @@ -739,84 +379,81 @@ for (place in myplaces){ # Remove all elements of the DBH/PFT class that do not have a single valid cohort # # at any given time. # #---------------------------------------------------------------------------------------# - empty = datum$nplantpftdbh == 0 - datum$agbpftdbh [empty] = NA - datum$basareapftdbh [empty] = NA - datum$laipftdbh [empty] = NA - datum$waipftdbh [empty] = NA - datum$taipftdbh [empty] = NA - datum$gpppftdbh [empty] = NA - datum$npppftdbh [empty] = NA - datum$mcopftdbh [empty] = NA - datum$cbapftdbh [empty] = NA - datum$cbalightpftdbh [empty] = NA - datum$cbamoistpftdbh [empty] = NA - datum$cbal12lightpftdbh [empty] = NA - datum$cbal12moistpftdbh [empty] = NA - datum$cbarelpftdbh [empty] = NA - datum$ldroppftdbh [empty] = NA - datum$fsopftdbh [empty] = NA - datum$demandpftdbh [empty] = NA - datum$supplypftdbh [empty] = NA - datum$mortpftdbh [empty] = NA - datum$agemortpftdbh [empty] = NA - datum$ncbmortpftdbh [empty] = NA - datum$tfallmortpftdbh [empty] = NA - datum$coldmortpftdbh [empty] = NA - datum$distmortpftdbh [empty] = NA - datum$growthpftdbh [empty] = NA - datum$plresppftdbh [empty] = NA - datum$bstorepftdbh [empty] = NA - datum$hflxlcpftdbh [empty] = NA - datum$wflxlcpftdbh [empty] = NA - datum$transppftdbh [empty] = NA - datum$i.gpppftdbh [empty] = NA - datum$i.npppftdbh [empty] = NA - datum$i.plresppftdbh [empty] = NA - datum$i.mcopftdbh [empty] = NA - datum$i.cbapftdbh [empty] = NA - datum$i.cbalightpftdbh [empty] = NA - datum$i.cbamoistpftdbh [empty] = NA - datum$i.cbal12lightpftdbh[empty] = NA - datum$i.cbal12moistpftdbh[empty] = NA - datum$i.transppftdbh [empty] = NA - datum$i.wflxlcpftdbh [empty] = NA - datum$i.hflxlcpftdbh [empty] = NA - datum$nplantpftdbh [empty] = NA + empty = szpft$nplant == 0 + szpft$agb [empty] = NA + szpft$basarea [empty] = NA + szpft$lai [empty] = NA + szpft$wai [empty] = NA + szpft$tai [empty] = NA + szpft$gpp [empty] = NA + szpft$npp [empty] = NA + szpft$mco [empty] = NA + szpft$cba [empty] = NA + szpft$cbalight [empty] = NA + szpft$cbamoist [empty] = NA + szpft$cbal12light [empty] = NA + szpft$cbal12moist [empty] = NA + szpft$cbarel [empty] = NA + szpft$ldrop [empty] = NA + szpft$fso [empty] = NA + szpft$demand [empty] = NA + szpft$supply [empty] = NA + szpft$mort [empty] = NA + szpft$agemort [empty] = NA + szpft$ncbmort [empty] = NA + szpft$tfallmort [empty] = NA + szpft$coldmort [empty] = NA + szpft$distmort [empty] = NA + szpft$growth [empty] = NA + szpft$plresp [empty] = NA + szpft$bstore [empty] = NA + szpft$hflxlc [empty] = NA + szpft$wflxlc [empty] = NA + szpft$transp [empty] = NA + szpft$i.gpp [empty] = NA + szpft$i.npp [empty] = NA + szpft$i.plresp [empty] = NA + szpft$i.mco [empty] = NA + szpft$i.cba [empty] = NA + szpft$i.cbalight [empty] = NA + szpft$i.cbamoist [empty] = NA + szpft$i.cbal12light[empty] = NA + szpft$i.cbal12moist[empty] = NA + szpft$i.transp [empty] = NA + szpft$i.wflxlc [empty] = NA + szpft$i.hflxlc [empty] = NA + szpft$nplant [empty] = NA #---------------------------------------------------------------------------------------# #---------------------------------------------------------------------------------------# # Convert mortality and recruitment so it is scaled between 0 and 100%. # #---------------------------------------------------------------------------------------# - datum$mortpftdbh = 100. * (1.0 - exp(- datum$mortpftdbh )) - datum$agemortpftdbh = 100. * (1.0 - exp(- datum$agemortpftdbh )) - datum$ncbmortpftdbh = 100. * (1.0 - exp(- datum$ncbmortpftdbh )) - datum$tfallmortpftdbh = 100. * (1.0 - exp(- datum$tfallmortpftdbh)) - datum$coldmortpftdbh = 100. * (1.0 - exp(- datum$coldmortpftdbh )) - datum$distmortpftdbh = 100. * (1.0 - exp(- datum$distmortpftdbh )) - datum$mortpft = 100. * (1.0 - exp(- datum$mortpft )) - datum$agemortpft = 100. * (1.0 - exp(- datum$agemortpft )) - datum$ncbmortpft = 100. * (1.0 - exp(- datum$ncbmortpft )) - datum$tfallmortpft = 100. * (1.0 - exp(- datum$tfallmortpft )) - datum$coldmortpft = 100. * (1.0 - exp(- datum$coldmortpft )) - datum$distmortpft = 100. * (1.0 - exp(- datum$distmortpft )) - datum$recrpft = 100. * (exp( datum$recrpft ) - 1.0) + szpft$mort = 100. * (1.0 - exp(- szpft$mort )) + szpft$dimort = 100. * (1.0 - exp(- szpft$dimort )) + szpft$ncbmort = 100. * (1.0 - exp(- szpft$ncbmort)) + szpft$recr = 100. * (exp( szpft$recr ) - 1.0) #---------------------------------------------------------------------------------------# #----- Find which PFTs, land uses and transitions we need to consider ------------------# - pftave = colMeans(datum$agbpft,na.rm=TRUE) - luave = colMeans(datum$agblu ,na.rm=TRUE) - distave = matrix(NA,nrow=3,ncol=3) - for (jlu in 1:nlu){ - for (ilu in 1:nlu){ - distave[ilu,jlu] = mean(datum$dist[,ilu,jlu]) - }#end for - }#end for - selpft = pftave > 0. - sellu = luave > 0. - seldist = distave > 0. + pftave = apply( X = szpft$agb[,ndbh+1,] + , MARGIN = 2 + , FUN = mean + , na.rm = TRUE + )#end apply + luave = apply( X = lu$agb + , MARGIN = 2 + , FUN = mean + , na.rm = TRUE + )#end apply + distave = apply(X=lu$dist,MARGIN=c(2,3),FUN=mean) + selpft = is.finite(pftave ) & pftave > 0. + sellu = is.finite(luave ) & luave > 0. + seldist = is.finite(distave) & distave > 0. + n.selpft = sum(selpft ) + n.sellu = sum(sellu ) + n.seldist = sum(seldist) #---------------------------------------------------------------------------------------# @@ -825,11 +462,11 @@ for (place in myplaces){ # Define a suitable scale for diurnal cycle... # #---------------------------------------------------------------------------------------# thisday = seq(from=0,to=ndcycle,by=1) * 24 / ndcycle - dcycplot = list() - dcycplot$levels = c(0,4,8,12,16,20,24) - dcycplot$n = 7 - dcycplot$scale = "hours" - dcycplot$padj = rep(0,times=dcycplot$n) + uplot = list() + uplot$levels = c(0,4,8,12,16,20,24) + uplot$n = 7 + uplot$scale = "hours" + uplot$padj = rep(0,times=uplot$n) #---------------------------------------------------------------------------------------# @@ -852,12 +489,12 @@ for (place in myplaces){ # Define a suitable scale for monthly means... # #---------------------------------------------------------------------------------------# montmont = seq(from=1,to=12,by=1) - montplot = list() - montplot$levels = montmont - montplot$labels = capwords(mon2mmm(montmont)) - montplot$n = 12 - montplot$scale = "months" - montplot$padj = rep(0,times=dcycplot$n) + mplot = list() + mplot$levels = montmont + mplot$labels = capwords(mon2mmm(montmont)) + mplot$n = 12 + mplot$scale = "months" + mplot$padj = rep(0,times=mplot$n) #---------------------------------------------------------------------------------------# @@ -877,13 +514,13 @@ for (place in myplaces){ #---------------------------------------------------------------------------------------# # Time series by PFT. # #---------------------------------------------------------------------------------------# - for (v in 1:ntspft){ - thistspft = tspft[[v]] + for (v in 1:ntspftdbh){ + thistspft = tspftdbh[[v]] vnam = thistspft$vnam description = thistspft$desc - unit = thistspft$unit + unit = thistspft$e.unit plog = thistspft$plog - plotit = thistspft$plt + plotit = thistspft$pft #----- Check whether the user wants to have this variable plotted. ------------------# if (plotit && any(selpft)){ @@ -896,8 +533,8 @@ for (place in myplaces){ cat(" +",description,"time series for all PFTs...","\n") #----- Load variable -------------------------------------------------------------# - if (vnam %in% names(datum)){ - thisvar = datum[[vnam]] + if (vnam %in% names(szpft)){ + thisvar = szpft[[vnam]][,ndbh+1,] if (plog){ #----- Eliminate non-positive values in case it is a log plot. -------------# thisvar[thisvar <= 0] = NA @@ -954,19 +591,27 @@ for (place in myplaces){ for (n in 1:ndrought){ rect(xleft = drought[[n]][1],ybottom = ydrought[1] ,xright = drought[[n]][2],ytop = ydrought[2] - ,col = "gray84",border=NA) + ,col = "grey84",border=NA) }#end for }#end if if (plotgrid){ - abline(v=axTicks(side=1),h=axTicks(side=2),col="gray52",lty="solid") + abline(v=axTicks(side=1),h=axTicks(side=2),col="grey52",lty="solid") }#end if for (n in 1:(npft+1)){ if (selpft[n]){ lines(datum$toyear,thisvar[,n],type="l",col=pft$colour[n],lwd=lwidth) }#end if }#end for - legend(x=legwhere,inset=inset,bg=legbg,legend=legs,col=cols,lwd=lwidth) + legend( x = legwhere + , inset = inset + , bg = legbg + , legend = legs + , col = cols + , lwd = lwidth + , ncol = min(pretty.box(n.selpft)$ncol,3) + , title = expression(bold("Plant Functional Type")) + )#end legend if (outform[o] == "x11"){ locator(n=1) @@ -974,6 +619,7 @@ for (place in myplaces){ }else{ dev.off() }#end if + dummy=clean.tmp() } #end for outform }#end if (tseragbpft) } #end for tseries @@ -986,19 +632,19 @@ for (place in myplaces){ # Time series by DBH, by PFT. # #---------------------------------------------------------------------------------------# #----- Find the PFTs to plot. ----------------------------------------------------------# - pftuse = which(apply(X=datum$agbpftdbh,MARGIN=3,FUN=sum,na.rm=TRUE) > 0.) + pftuse = which(apply(X=szpft$nplant,MARGIN=3,FUN=sum,na.rm=TRUE) > 0.) pftuse = pftuse[pftuse != (npft+1)] for (v in 1:ntspftdbh){ thistspftdbh = tspftdbh[[v]] vnam = thistspftdbh$vnam description = thistspftdbh$desc - unit = thistspftdbh$unit + unit = thistspftdbh$e.unit plog = thistspftdbh$plog - plotit = thistspftdbh$plt + plotit = thistspftdbh$pftdbh #----- Load variable ----------------------------------------------------------------# - if (vnam %in% names(datum)){ - thisvar = datum[[vnam]] + if (vnam %in% names(szpft)){ + thisvar = szpft[[vnam]] if (plog){ xylog="y" thisvar[thisvar <= 0] = NA @@ -1070,17 +716,24 @@ for (place in myplaces){ for (n in 1:ndrought){ rect(xleft = drought[[n]][1],ybottom = ydrought[1] ,xright = drought[[n]][2],ytop = ydrought[2] - ,col = "gray84",border=NA) + ,col = "grey84",border=NA) }#end for }#end if if (plotgrid){ - abline(v=axTicks(side=1),h=axTicks(side=2),col="gray52",lty="solid") + abline(v=axTicks(side=1),h=axTicks(side=2),col="grey52",lty="solid") }#end if for (d in seq(from=1,to=ndbh+1,by=1)){ lines(datum$toyear,thisvar[,d,p],type="l",col=dbhcols[d],lwd=lwidth) }#end for - legend(x=legwhere,inset=inset,bg=legbg,legend=dbhnames,col=dbhcols - ,ncol=2,title="DBH class",lwd=lwidth,cex=0.8) + legend( x = legwhere + , inset = inset + , bg = legbg + , legend = dbhnames + , col = dbhcols + , ncol = min(pretty.box(ndbh+1)$ncol,3) + , title = expression(bold("DBH class")) + , lwd = lwidth + )#end legend if (outform[o] == "x11"){ locator(n=1) @@ -1088,6 +741,7 @@ for (place in myplaces){ }else{ dev.off() }#end if + dummy=clean.tmp() } #end for outform }#end for (p in pftuse) }#end if (tseragbpft) @@ -1101,10 +755,10 @@ for (place in myplaces){ # Plot the comparison between observations and model. # #---------------------------------------------------------------------------------------# cat(" + Year-by-year comparisons of monthly means...","\n") - for (cc in 1:ncompmmean){ + for (cc in 1:ncompmodel){ #----- Retrieve variable information from the list. ---------------------------------# - compnow = compmmean[[cc]] + compnow = compmodel[[cc]] vname = compnow$vnam description = compnow$desc unit = compnow$unit @@ -1119,21 +773,20 @@ for (place in myplaces){ ltype = compnow$type plog = compnow$plog legpos = compnow$legpos - plotit = compnow$plt + plotit = compnow$mmean - plotit = plotit && vname %in% ls() && vname %in% names(mont12mn) + plotit = plotit && vname %in% names(emean) && vname %in% names(mmean) if (plotit){ #---------------------------------------------------------------------------------# # Copy the observations to a scratch variable. # #---------------------------------------------------------------------------------# - thisvar = datum[[vname]] - thismean = mont12mn[[vname]] - thissdev = mont12sd[[vname]] - if (length(mont12sd[[vname]]) == 0){ + thisvar = emean [[vname]] + thismean = mmean [[vname]] + if (length(msdev[[vname]]) == 0){ thissdev = 0. * thismean }else{ - thissdev = mont12sd[[vname]] + thissdev = msdev[[vname]] }#end if mod.x = montmont mod.ylow = thismean - thissdev @@ -1204,9 +857,9 @@ for (place in myplaces){ plot(x=montmont,y=var.year,type="n",main=letitre,xlab="Time" ,ylim=ylimit,ylab=paste("[",unit,"]",sep=""),log=plog,xaxt="n" ,cex.main=cex.main) - axis(side=1,at=montplot$levels,labels=montplot$labels,padj=montplot$padj) + axis(side=1,at=mplot$levels,labels=mplot$labels,padj=mplot$padj) if (plotgrid){ - abline(v=montplot$levels,h=axTicks(side=2),col="gray52",lty="solid") + abline(v=mplot$levels,h=axTicks(side=2),col="grey52",lty="solid") }#end if if (plotsd){ polygon(x=mod.x.poly,y=mod.y.poly,col=errcolours[2],angle=angle[2] @@ -1226,7 +879,7 @@ for (place in myplaces){ , lwd = llwd , col = lcolours , bg = "white" - , title = "Shaded areas = 1 SD" + , title = expression(bold("Shaded areas = 1 SD")) , cex = 1.0 , pch = 16 )#end legend @@ -1246,6 +899,7 @@ for (place in myplaces){ }else{ dev.off() }#end if + dummy=clean.tmp() #---------------------------------------------------------------------------# } #end for outform #------------------------------------------------------------------------------# @@ -1283,7 +937,7 @@ for (place in myplaces){ #----- Load variable -------------------------------------------------------------# - thisvar = datum[[vnam]] + thisvar = lu[[vnam]] if (plog){ #----- Eliminate non-positive values in case it is a log plot. ----------------# thisvar[thisvar <= 0] = NA @@ -1333,18 +987,26 @@ for (place in myplaces){ for (n in 1:ndrought){ rect(xleft = drought[[n]][1],ybottom = ydrought[1] ,xright = drought[[n]][2],ytop = ydrought[2] - ,col = "gray84",border=NA) + ,col = "grey84",border=NA) }#end for }#end if if (plotgrid){ - abline(v=axTicks(side=1),h=axTicks(side=2),col="gray52",lty="solid") + abline(v=axTicks(side=1),h=axTicks(side=2),col="grey52",lty="solid") }#end if for (n in 1:(nlu+1)){ if (sellu[n]){ lines(datum$toyear,thisvar[,n],type="l",col=lucols[n],lwd=lwidth) }#end if }#end for - legend(x=legwhere,inset=inset,bg=legbg,legend=legs,col=cols,lwd=lwidth) + legend( x = legwhere + , inset = inset + , bg = legbg + , legend = legs + , col = cols + , lwd = lwidth + , ncol = min(3,pretty.box(n.sellu)$ncol) + , title = expression(bold("Land use type")) + )#end legend if (outform[o] == "x11"){ locator(n=1) @@ -1352,6 +1014,7 @@ for (place in myplaces){ }else{ dev.off() }#end if + dummy=clean.tmp() } #end for outform }#end if (tseragbpft) } #end for tseries @@ -1406,11 +1069,11 @@ for (place in myplaces){ for (n in 1:ndrought){ rect(xleft = drought[[n]][1],ybottom = ydrought[1] ,xright = drought[[n]][2],ytop = ydrought[2] - ,col = "gray84",border=NA) + ,col = "grey84",border=NA) }#end for }#end if if (plotgrid){ - abline(v=axTicks(side=1),h=axTicks(side=2),col="gray52",lty="solid") + abline(v=axTicks(side=1),h=axTicks(side=2),col="grey52",lty="solid") }#end if n = 0 for (jlu in 1:nlu){ @@ -1424,7 +1087,15 @@ for (place in myplaces){ }#end if }#end for }#end for - legend(x=legwhere,inset=inset,bg=legbg,legend=legs,col=cols,lwd=lwidth) + legend(x = legwhere + ,inset = inset + ,bg = legbg + ,legend = legs + ,col = cols + ,lwd = lwidth + , ncol = min(3,pretty.box(n)$ncol) + , title = expression(bold("Transition")) + )#end legend if (outform[o] == "x11"){ locator(n=1) @@ -1432,6 +1103,7 @@ for (place in myplaces){ }else{ dev.off() }#end if + dummy=clean.tmp() } #end for outform #------------------------------------------------------------------------------------# }#end if @@ -1443,31 +1115,31 @@ for (place in myplaces){ #---------------------------------------------------------------------------------------# # Plot the time series diagrams showing annual means. # #---------------------------------------------------------------------------------------# - cat(" * Plot some time series...","\n") - for (hh in 1:ntser){ + cat(" * Plot time series of groups of variables...","\n") + for (hh in 1:ntheme){ #----- Retrieve variable information from the list. ---------------------------------# - tsernow = tser[[hh]] - vnames = tsernow$vnam - description = tsernow$desc - lcolours = tsernow$colour - llwd = tsernow$lwd - ltype = tsernow$type - plog = tsernow$plog - prefix = tsernow$prefix - theme = tsernow$theme - unit = tsernow$unit - legpos = tsernow$legpos - plotit = tsernow$plt & all(vnames %in% names(year12mn)) + themenow = theme[[hh]] + vnames = themenow$vnam + description = themenow$desc + lcolours = themenow$colour + llwd = themenow$lwd + ltype = themenow$type + plog = themenow$plog + prefix = themenow$prefix + group = themenow$title + unit = themenow$unit + legpos = themenow$legpos + plotit = themenow$ymean if (plotit){ #---------------------------------------------------------------------------------# # Check whether the time series directory exists. If not, create it. # #---------------------------------------------------------------------------------# - outdir = paste(outpref,"tseries",sep="/") + outdir = paste(outpref,"theme_ymean",sep="/") if (! file.exists(outdir)) dir.create(outdir) - cat(" +",theme,"time series for several variables...","\n") + cat(" +",group,"time series...","\n") #----- Define the number of layers. ----------------------------------------------# @@ -1482,7 +1154,7 @@ for (place in myplaces){ #---------------------------------------------------------------------------------# ylimit = NULL for (l in 1:nlayers){ - thisvar = year12mn[[vnames[l]]] + thisvar = ymean[[vnames[l]]] ylimit = range(c(ylimit,thisvar),na.rm=TRUE) }#end for ylimit = pretty.xylim(u=ylimit,fracexp=scalleg,is.log=plog) @@ -1502,7 +1174,6 @@ for (place in myplaces){ #---------------------------------------------------------------------------------# # Check if the directory exists. If not, create it. # #---------------------------------------------------------------------------------# - cat(" > ",theme," time series ...","\n") #----- Loop over formats. --------------------------------------------------------# for (o in 1:nout){ @@ -1521,9 +1192,9 @@ for (place in myplaces){ }#end if #----- Load variable ----------------------------------------------------------# - thisvar = year12mn[[vnames[1]]] + thisvar = ymean[[vnames[1]]] - letitre = paste(theme," - ",lieu," \n"," Time series: ",theme,sep="") + letitre = paste(" Time series: ",group,"\n",lieu,sep="") plot(x=datum$toyear,y=thisvar,type="n",main=letitre,xlab="Year" ,ylim=ylimit,ylab=paste("[",unit,"]",sep=""),log=xylog,cex.main=cex.main) @@ -1531,24 +1202,31 @@ for (place in myplaces){ for (n in 1:ndrought){ rect(xleft = drought[[n]][1],ybottom = ydrought[1] ,xright = drought[[n]][2],ytop = ydrought[2] - ,col = "gray84",border=NA) + ,col = "grey84",border=NA) }#end for }#end if if (plotgrid){ - abline(v=axTicks(side=1),h=axTicks(side=2),col="gray52",lty="solid") + abline(v=axTicks(side=1),h=axTicks(side=2),col="grey52",lty="solid") }#end if for (l in 1:nlayers){ - thisvar = year12mn[[vnames[l]]] + thisvar = ymean[[vnames[l]]] points(x=datum$toyear,y=thisvar,col=lcolours[l],lwd=llwd[l],type=ltype ,pch=16,cex=0.8) }#end for - legend(x=legpos,inset=inset,legend=description,col=lcolours,lwd=llwd,cex=0.8) + legend( x = legpos + , inset = inset + , legend = description + , col = lcolours + , lwd = llwd + , ncol = min(3,pretty.box(nlayers)$ncol) + )#end legend if (outform[o] == "x11"){ locator(n=1) dev.off() }else{ dev.off() }#end if + dummy=clean.tmp() #------------------------------------------------------------------------------# } #end for outform #---------------------------------------------------------------------------------# @@ -1563,40 +1241,45 @@ for (place in myplaces){ #---------------------------------------------------------------------------------------# # Plot the climatology of the mean diurnal cycle. # #---------------------------------------------------------------------------------------# - cat(" * Plot some climatology of diurnal cycle...","\n") - for (hh in 1:nclim){ + cat(" * Plot mean diel for groups of variables...","\n") + for (hh in 1:ntheme){ #----- Retrieve variable information from the list. ---------------------------------# - climnow = clim[[hh]] - vnames = climnow$vnam - description = climnow$desc - lcolours = climnow$colour - llwd = climnow$lwd - ltype = climnow$type - plog = climnow$plog - prefix = climnow$prefix - theme = climnow$theme - unit = climnow$unit - legpos = climnow$legpos - plotit = climnow$plt + themenow = theme[[hh]] + vnames = themenow$vnam + description = themenow$desc + lcolours = themenow$colour + llwd = themenow$lwd + ltype = themenow$type + plog = themenow$plog + prefix = themenow$prefix + group = themenow$title + unit = themenow$unit + legpos = themenow$legpos + plotit = themenow$qmean + if (plog){ + xylog = "y" + }else{ + xylog = "" + }#end if if (plotit){ #---------------------------------------------------------------------------------# # Check whether the time series directory exists. If not, create it. # #---------------------------------------------------------------------------------# - outdir = paste(outpref,"climdcyc",sep="/") + outdir = paste(outpref,"theme_qmean",sep="/") if (! file.exists(outdir)) dir.create(outdir) outtheme = paste(outdir,prefix,sep="/") if (! file.exists(outtheme)) dir.create(outtheme) - cat(" +",theme,"diurnal cycle for several variables...","\n") + cat(" +",group," diurnal cycle...","\n") #----- Define the number of layers. ----------------------------------------------# nlayers = length(vnames) ylimit = NULL for (l in 1:nlayers){ - thisvar = dcyc12mn[[vnames[l]]] + thisvar = umean[[vnames[l]]] ylimit = c(ylimit,thisvar) }#end for ylimit = pretty.xylim(u=ylimit,fracexp=scalleg,is.log=length(grep("y",plog)) > 0) @@ -1606,18 +1289,17 @@ for (place in myplaces){ #---------------------------------------------------------------------------------# # Loop over all months. # #---------------------------------------------------------------------------------# - for (pmon in 1:12){ - cmon = sprintf("%2.2i",pmon) - namemon = mlist[pmon] + yplot = as.numeric(dimnames(umean[[vnames[1]]])[[1]]) + for (yy in 1:length(yplot)){ + cyear = sprintf("%4.4i",yplot[yy]) #------------------------------------------------------------------------------# # Check if the directory exists. If not, create it. # #------------------------------------------------------------------------------# - cat(" > ",theme," time series - ",namemon,"...","\n") #----- Loop over formats. -----------------------------------------------------# for (o in 1:nout){ - fichier = paste(outtheme,"/",prefix,"-",cmon,"-",suffix,".",outform[o] + fichier = paste(outtheme,"/",prefix,"-",cyear,"-",suffix,".",outform[o] ,sep="") if(outform[o] == "x11"){ X11(width=size$width,height=size$height,pointsize=ptsz) @@ -1633,32 +1315,38 @@ for (place in myplaces){ }#end if #----- Load variable -------------------------------------------------------# - thisvar = dcyc12mn[[vnames[1]]] + thisvar = umean[[vnames[1]]] thisvar = cbind(thisvar[,ndcycle],thisvar) - letitre = paste(theme," - ",lieu,"\n" - ,"Mean diurnal cycle - ",namemon,sep="") + letitre = paste(group," - Mean diurnal cycle - ",cyear,"\n",lieu,sep="") - plot(x=thisday,y=thisvar[pmon,],type="n",main=letitre,xlab="Time" - ,ylim=ylimit,ylab=paste("[",unit,"]",sep=""),log=plog,xaxt="n" + plot(x=thisday,y=thisvar[yy,],type="n",main=letitre,xlab="Time" + ,ylim=ylimit,ylab=paste("[",unit,"]",sep=""),log=xylog,xaxt="n" ,cex.main=cex.main) - axis(side=1,at=dcycplot$levels,labels=dcycplot$labels,padj=dcycplot$padj) + axis(side=1,at=uplot$levels,labels=uplot$labels,padj=uplot$padj) if (plotgrid){ - abline(v=dcycplot$levels,h=axTicks(side=2),col="gray52",lty="solid") + abline(v=uplot$levels,h=axTicks(side=2),col="grey52",lty="solid") }#end if for (l in 1:nlayers){ - thisvar = dcyc12mn[[vnames[l]]] + thisvar = umean[[vnames[l]]] thisvar = cbind(thisvar[,ndcycle],thisvar) - points(x=thisday,y=thisvar[pmon,],col=lcolours[l] - ,lwd=llwd[l],type=ltype,pch=16,cex=0.8) + points(x=thisday,y=thisvar[yy,],col=lcolours[l] + ,lwd=llwd[l],type=ltype,pch=16) }#end for - legend(x=legpos,inset=0.05,legend=description,col=lcolours,lwd=llwd) + legend( x = legpos + , inset = inset + , legend = description + , col = lcolours + , lwd = llwd + , ncol = min(3,pretty.box(nlayers)$ncol) + )#end legend if (outform[o] == "x11"){ locator(n=1) dev.off() }else{ dev.off() }#end if + dummy=clean.tmp() #---------------------------------------------------------------------------# }#end for outform #------------------------------------------------------------------------------# @@ -1676,23 +1364,23 @@ for (place in myplaces){ #---------------------------------------------------------------------------------------# # Plot the climatology of the soil properties. # #---------------------------------------------------------------------------------------# - for (v in 1:nsoilclim){ + for (v in 1:nsoilplot){ #----- Retrieve variable information from the list. ---------------------------------# - thisclim = soilclim[[v]] + thisclim = soilplot[[v]] vnam = thisclim$vnam description = thisclim$desc unit = thisclim$unit vcscheme = thisclim$csch pnlog = thisclim$pnlog - plotit = thisclim$plt + plotit = thisclim$ymean if (plotit){ #---------------------------------------------------------------------------------# # Check if the directory exists. If not, create it. # #---------------------------------------------------------------------------------# - outdir = paste(outpref,"soilclim",sep="/") + outdir = paste(outpref,"soil_ymean",sep="/") if (! file.exists(outdir)) dir.create(outdir) cat(" + Climatology profile of ",description,"...","\n") @@ -1703,7 +1391,7 @@ for (place in myplaces){ nsoil = nzg #----- Convert the vector data into an array. ------------------------------------# - vararr = year12mn[[vnam]] + vararr = ymean[[vnam]] #----- Copy the first and the last year to make the edges buffered. --------------# first = vararr[1,] @@ -1755,7 +1443,7 @@ for (place in myplaces){ ,width=size$width,height=size$height,pointsize=ptsz,paper=size$paper) }#end if - letitre = paste(description," - ",lieu,sep="") + letitre = paste(description,"\n",lieu,sep="") sombreado(x=yearaxis,y=soilaxis,z=varbuff,levels=vlevels,nlevels=vnlev ,color.palette=get(vcscheme) ,plot.title=title(main=letitre,xlab="Month",ylab="Soil depth [m]" @@ -1765,7 +1453,7 @@ for (place in myplaces){ ,plot.axes={axis(side=1) axis(side=2,at=zat,labels=znice) if (hovgrid){ - abline(h=zat,v=axTicks(1),col="gray52",lty="dotted") + abline(h=zat,v=axTicks(1),col="grey52",lty="dotted") }#end if hovgrid }#end plot.axes ) @@ -1776,6 +1464,7 @@ for (place in myplaces){ }else{ dev.off() }#end if + dummy = clean.tmp() } #end for outform }#end if plotit }#end for nhov @@ -1790,19 +1479,19 @@ for (place in myplaces){ # Bar plot by DBH class. # #---------------------------------------------------------------------------------------# cat(" + Bar plot by DBH classes...","\n") - pftuse = which(apply(X=datum$nplantpftdbh,MARGIN=3,FUN=sum,na.rm=TRUE) > 0.) + pftuse = which(apply(X=szpft$nplant,MARGIN=3,FUN=sum,na.rm=TRUE) > 0.) pftuse = pftuse[pftuse != (npft+1)] npftuse = length(pftuse) pftname.use = pft$name [pftuse] pftcol.use = pft$colour[pftuse] - for (v in 1:nbarplotdbh){ + for (v in 1:ntspftdbh){ #----- Load settings for this variable.----------------------------------------------# - thisbar = barplotdbh[[v]] + thisbar = tspftdbh[[v]] vnam = thisbar$vnam description = thisbar$desc - unit = thisbar$unit + unit = thisbar$e.unit stacked = thisbar$stack - plotit = thisbar$plt + plotit = thisbar$bar.plot plog = thisbar$plog if (plog){ stacked = FALSE @@ -1823,7 +1512,7 @@ for (place in myplaces){ #---------------------------------------------------------------------------------# # Retrieve the variable, and keep only the part that is usable. # #---------------------------------------------------------------------------------# - thisvnam = datum[[vnam]] + thisvnam = szpft[[vnam]] thisvnam = thisvnam [,,pftuse] thisvnam = thisvnam [,-(ndbh+1),] @@ -1848,7 +1537,7 @@ for (place in myplaces){ #---------------------------------------------------------------------------------# # Check if the directory exists. If not, create it. # #---------------------------------------------------------------------------------# - barplotdir = paste(outpref,"barplotdbh",sep="/") + barplotdir = paste(outpref,"barplot_dbh",sep="/") if (! file.exists(barplotdir)) dir.create(barplotdir) outdir = paste(barplotdir,vnam,sep="/") if (! file.exists(outdir)) dir.create(outdir) @@ -1897,14 +1586,21 @@ for (place in myplaces){ barplot(height=t(thisvnam[y,,]),names.arg=dbhnames[1:ndbh],width=1.0 ,main=letitre,xlab=lexlab,ylab=leylab,ylim=ylimit,legend.text=FALSE ,beside=(! stacked),col=pftcol.use,log=xylog - ,border="gray23",xpd=FALSE,cex.main=cex.main) + ,border="grey23",xpd=FALSE,cex.main=cex.main) if (plotgrid & (! stacked)){ xgrid=0.5+(1:ndbh)*(1+npftuse) - abline(v=xgrid,col="gray46",lty="solid") + abline(v=xgrid,col="grey46",lty="solid") }#end if box() - legend(x="topleft",inset=0.01,legend=pftname.use,fill=pftcol.use - ,ncol=1,title="PFT",cex=1.0,bg="white") + legend( x = "topleft" + , inset = inset + , legend = pftname.use + , fill = pftcol.use + , ncol = min(3,pretty.box(n.selpft)$ncol) + , title = expression(bold("Plant functional type")) + , cex = 1.0 + , bg = "white" + )#end legend #---------------------------------------------------------------------------# @@ -1918,6 +1614,7 @@ for (place in myplaces){ }else{ dev.off() }#end if + dummy = clean.tmp() #---------------------------------------------------------------------------# } #end for outform #------------------------------------------------------------------------------# diff --git a/ED/Template/Template/read_monthly.r b/ED/Template/Template/read_monthly.r new file mode 100644 index 000000000..9927c0c6e --- /dev/null +++ b/ED/Template/Template/read_monthly.r @@ -0,0 +1,203 @@ +#==========================================================================================# +#==========================================================================================# +# Leave these commands at the beginning. They will refresh the session. # +#------------------------------------------------------------------------------------------# +rm(list=ls()) +graphics.off() +#==========================================================================================# +#==========================================================================================# + + + +#==========================================================================================# +#==========================================================================================# +# Here is the user defined variable section. # +#------------------------------------------------------------------------------------------# + +#----- Paths. -----------------------------------------------------------------------------# +here = "thispath" # Current directory. +there = "thatpath" # Directory where analyses/history are +srcdir = "/n/moorcroft_data/mlongo/util/Rsc" # Source directory. +#------------------------------------------------------------------------------------------# + + +#----- Time options. ----------------------------------------------------------------------# +monthbeg = thismontha # First month to use +yearbeg = thisyeara # First year to consider +yearend = thisyearz # Maximum year to consider +reload.data = TRUE # Should I reload partially loaded data? +sasmonth.short = c(2,5,8,11) # Months for SAS plots (short runs) +sasmonth.long = 5 # Months for SAS plots (long runs) +nyears.long = 25 # Runs longer than this are considered long runs. +#------------------------------------------------------------------------------------------# + + + +#----- Name of the simulations. -----------------------------------------------------------# +myplaces = c("thispoly") +#------------------------------------------------------------------------------------------# + + +#------ Miscellaneous settings. -----------------------------------------------------------# +slz.min = -5.0 # The deepest depth that trees access water. +idbh.type = myidbhtype # Type of DBH class + # 1 -- Every 10 cm until 100cm; > 100cm + # 2 -- 0-10; 10-20; 20-35; 35-50; 50-70; > 70 (cm) +#------------------------------------------------------------------------------------------# + + + +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +# NO NEED TO CHANGE ANYTHING BEYOND THIS POINT UNLESS YOU ARE DEVELOPING THE CODE... # +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# + + + +#----- Loading some packages and scripts. -------------------------------------------------# +source(file.path(srcdir,"load.everything.r")) +#------------------------------------------------------------------------------------------# + + + +#----- Load observations. -----------------------------------------------------------------# +obsrfile = paste(srcdir,"LBA_MIP.v8.RData",sep="/") +load(file=obsrfile) +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Big place loop starts here... # +#------------------------------------------------------------------------------------------# +for (place in myplaces){ + + #----- Retrieve default information about this place and set up some variables. --------# + thispoi = locations(where=place,here=there,yearbeg=yearbeg,yearend=yearend + ,monthbeg=monthbeg) + inpref = thispoi$pathin + lieu = thispoi$lieu + iata = thispoi$iata + suffix = thispoi$iata + yeara = thispoi$yeara + yearz = thispoi$yearz + meszz = thispoi$monz + #---------------------------------------------------------------------------------------# + + + + #----- Decide how frequently the cohort-level variables should be saved. ---------------# + if (yearend - yearbeg + 1 <= nyears.long){ + sasmonth = sasmonth.short + }else{ + sasmonth = sasmonth.long + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the total number of months that can be loaded this time. # + #---------------------------------------------------------------------------------------# + ntimes = (yearz-yeara-1)*12+meszz+(12-monthbeg+1) + #---------------------------------------------------------------------------------------# + + + + #----- Print a banner to entretain the user. -------------------------------------------# + cat(" + Post-processing output from ",lieu,"...","\n") + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Make the RData file name, then we check whether we must read the files again # + # or use the stored RData. # + #---------------------------------------------------------------------------------------# + path.data = paste(here,place,"rdata_month",sep="/") + if (! file.exists(path.data)) dir.create(path.data) + ed22.rdata = paste(path.data,paste(place,"RData",sep="."),sep="/") + if (reload.data && file.exists(ed22.rdata)){ + #----- Load the modelled dataset. ---------------------------------------------------# + cat(" - Loading previous session...","\n") + load(ed22.rdata) + tresume = datum$ntimes + 1 + datum = update.monthly( new.ntimes = ntimes + , old.datum = datum + , montha = monthbeg + , yeara = yeara + , inpref = inpref + , slz.min = slz.min + )#end update.monthly + }else{ + cat(" - Starting new session...","\n") + tresume = 1 + datum = create.monthly( ntimes = ntimes + , montha = monthbeg + , yeara = yeara + , inpref = inpref + , slz.min = slz.min + )#end create.monthly + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Check whether we have anything to update. # + #---------------------------------------------------------------------------------------# + complete = tresume > ntimes + #---------------------------------------------------------------------------------------# + + + + #----- Copy some dimensions to scalars. ------------------------------------------------# + nzg = datum$nzg + nzs = datum$nzs + ndcycle = datum$ndcycle + isoilflg = datum$isoilflg + slz = datum$slz + slxsand = datum$slxsand + slxclay = datum$slxclay + ntext = datum$ntext + soil.prop = datum$soil.prop + dslz = datum$dslz + soil.depth = datum$soil.depth + soil.dry = datum$soil.dry + soil.poro = datum$soil.poro + ka = datum$ka + kz = datum$kz + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # Loop over all times in case there is anything new to be read. # + #---------------------------------------------------------------------------------------# + if (! complete){ + + #------------------------------------------------------------------------------------# + # This function will read the files. # + #------------------------------------------------------------------------------------# + datum = read.q.files(datum=datum,ntimes=ntimes,tresume=tresume,sasmonth=sasmonth) + #------------------------------------------------------------------------------------# + + #------ Save the data to the R object. ----------------------------------------------# + cat(" + Saving data to ",basename(ed22.rdata),"...","\n") + save(datum,file=ed22.rdata) + #------------------------------------------------------------------------------------# + }#end if (! complete) + #---------------------------------------------------------------------------------------# +}#end for places + +#q("no") diff --git a/ED/Template/Template/whichrun.r b/ED/Template/Template/whichrun.r index 697d43fd8..eef0d8c0d 100644 --- a/ED/Template/Template/whichrun.r +++ b/ED/Template/Template/whichrun.r @@ -1,15 +1,46 @@ -#----- This should be called before anything else, don't define stuff before this line. ------# +#----- This should be called before anything else, don't define stuff before this line. ---# rm(list=ls()) +graphics.off() +#------------------------------------------------------------------------------------------# -#----- workdir is the user-defined variable section. -----------------------------------------# -main = "pathhere" -histomain = "paththere" -polyg = "thispoly" -queue = "thisqueue" +#----- The user-defined variable section. -------------------------------------------------# +main = "pathhere" +histomain = "pathhere" +srcdir = "/n/moorcroft_data/mlongo/util/Rsc" +polyg = "thispoly" +queue = "thisqueue" +yeara = thisyeara +montha = thismontha +datea = thisdatea +timea = thistimea output = paste(main,polyg,sep="/") # Current directory. +#------------------------------------------------------------------------------------------# + + + + +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +# No need to change anything beyond this point unless you are developing the script. # +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# + + + +#----- Load some useful scripts and packages. ---------------------------------------------# +isok = require(hdf5) +source(paste(srcdir,"globdims.r",sep="/")) +#------------------------------------------------------------------------------------------# + + -library(hdf5) #----- Retrieve the last history file. ----------------------------------------------------# histodir = paste(histomain,polyg,"histo",NULL,sep="/") @@ -17,8 +48,12 @@ histolist = dir(histodir) bye =-grep("-Z-",histolist) if (length(bye) > 0) histolist = histolist[bye] nhisto = length(histolist) +#------------------------------------------------------------------------------------------# + -#----- Check whether there is a last history file or not... -------------------------------# +#------------------------------------------------------------------------------------------# +# Check whether there is a last history file or not... # +#------------------------------------------------------------------------------------------# if (nhisto > 0){ latesthisto = histolist[nhisto] pathhisto = paste(histodir,histolist[nhisto],sep="/") @@ -29,31 +64,72 @@ if (nhisto > 0){ fl=nchar(latesthisto) + #------ Determine the time. ------------------------------------------------------------# yyyy = substring(latesthisto,fl-23,fl-20) mm = substring(latesthisto,fl-18,fl-17) dd = substring(latesthisto,fl-15,fl-14) - hhhh = substring(latesthisto,fl-12,fl-9) + hhhh = substring(latesthisto,fl-12,fl- 9) + #---------------------------------------------------------------------------------------# + + - #----- Check whether the job is still running. -----------------------------------------# + #----- Find the standard output files. -------------------------------------------------# endrun = paste(main,polyg,"serial_lsf.out",sep="/") hasrun = paste(main,polyg,"serial_out.out",sep="/") + haserr = paste(main,polyg,"serial_out.err",sep="/") + #---------------------------------------------------------------------------------------# + + #----- Check whether it is still running. ----------------------------------------------# running = file.exists(hasrun) && ! file.exists(endrun) + #---------------------------------------------------------------------------------------# + + + #----- Check whether it doesn't have segmentation violation. ---------------------------# + if ( file.exists(haserr)){ + errout = scan(haserr,what="raw") + errout = paste(errout,collapse=" ") + sigsegv = ( length(grep("sigsegv" ,errout,ignore.case=TRUE)) > 0 + | length(grep("segmentation fault",errout,ignore.case=TRUE)) > 0 + )#end sigsegv + }else{ + sigsegv = FALSE + }#end if + #---------------------------------------------------------------------------------------# + + #---------------------------------------------------------------------------------------# # Here we check whether the simulation is actually running, or if it has finished # # or crashed. the existence of serial_lsf.out does not tell the entire story, because # # the polygon may be running under the "unrestricted_parallel" queue. # #---------------------------------------------------------------------------------------# - if (file.exists(hasrun)){ + running = file.exists(hasrun) && ! file.exists(endrun) + if (file.exists(hasrun) && ! sigsegv){ simout = scan(hasrun,what="raw") simout = paste(simout,collapse=" ") - crashed = length(grep("FATAL ERROR",simout)) > 0 - finished = length(grep("ED execution ends",simout)) > 0 + metmiss = ( length(grep("Cannot open met driver input file",simout)) > 0 + | length(grep("Specify ED_MET_DRIVER_DB properly",simout)) > 0 ) + crashed = length(grep("IFLAG1 problem." ,simout)) > 0 + stopped = length(grep("FATAL ERROR" ,simout)) > 0 + finished = length(grep("ED execution ends" ,simout)) > 0 }else{ + metmiss = FALSE crashed = FALSE + stopped = FALSE finished = FALSE }#end if + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Sum the AGB and basal area for each PFT. # + #---------------------------------------------------------------------------------------# + agb.pft = colSums(mydata$AGB.PY [1,,],na.rm=TRUE) + bsa.pft = colSums(mydata$BASAL.AREA.PY[1,,],na.rm=TRUE) + lai.pft = colSums(mydata$LAI.PY [1,,],na.rm=TRUE) + #---------------------------------------------------------------------------------------# + #---------------------------------------------------------------------------------------# @@ -61,26 +137,65 @@ if (nhisto > 0){ # ning on unrestricted_parallel, because the jobs have other jobs in it. # #---------------------------------------------------------------------------------------# desert = mydata$NCOHORTS.GLOBAL == 0 - agb = sum(mydata$AGB) - lai = mydata$LAI + agb = sprintf("%7.3f",sum(agb.pft)) + bsa = sprintf("%7.3f",sum(bsa.pft)) + lai = sprintf("%7.3f",sum(lai.pft)) + #---------------------------------------------------------------------------------------# + + #----- Find out whether this job can be killed. ----------------------------------------# killable = queue != "unrestricted_parallel" + #---------------------------------------------------------------------------------------# - if (desert){ - status = paste(polyg,yyyy,mm,dd,hhhh,"EXTINCT",agb,lai,sep=" ") + + + #---------------------------------------------------------------------------------------# + # Determine the status (be pessimistic and check for all possible errors before # + # convincing that the run is working). # + #---------------------------------------------------------------------------------------# + if (sigsegv){ + status = paste(polyg,yyyy,mm,dd,hhhh,"SIGSEGV",agb,bsa,lai,sep=" ") + }else if (metmiss){ + status = paste(polyg,yyyy,mm,dd,hhhh,"METMISS",agb,bsa,lai,sep=" ") }else if(crashed){ - status = paste(polyg,yyyy,mm,dd,hhhh,"CRASHED",agb,lai,sep=" ") + status = paste(polyg,yyyy,mm,dd,hhhh,"CRASHED",agb,bsa,lai,sep=" ") + }else if(stopped){ + status = paste(polyg,yyyy,mm,dd,hhhh,"STOPPED",agb,bsa,lai,sep=" ") }else if(finished){ - status = paste(polyg,yyyy,mm,dd,hhhh,"THE_END",agb,lai,sep=" ") + status = paste(polyg,yyyy,mm,dd,hhhh,"THE_END",agb,bsa,lai,sep=" ") }else{ - status = paste(polyg,yyyy,mm,dd,hhhh,"HISTORY",agb,lai,sep=" ") + status = paste(polyg,yyyy,mm,dd,hhhh,"HISTORY",agb,bsa,lai,sep=" ") }#end if + #---------------------------------------------------------------------------------------# }else{ - status = paste(polyg,"1500","01","01","0000","INITIAL","NA","NA",sep=" ") + #---------------------------------------------------------------------------------------# + # No history file, the run hasn't started yet... # + #---------------------------------------------------------------------------------------# + yyyy = sprintf("%4.4i",yeara ) + mm = sprintf("%2.2i",montha) + dd = sprintf("%2.2i",datea ) + hhhh = sprintf("%4.4i",timea ) + agb = sprintf("%7.3f",NA ) + bsa = sprintf("%7.3f",NA ) + lai = sprintf("%7.3f",NA ) + status = paste(polyg,yyyy,mm,dd,hhhh,"INITIAL",agb,bsa,lai,sep=" ") + #---------------------------------------------------------------------------------------# }#end if (nhisto > 0) +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# Dump the output to a file. # +#------------------------------------------------------------------------------------------# statusout = paste(output,"statusrun.txt",sep="/") dum = write(x=status,file=statusout,append=FALSE) +#------------------------------------------------------------------------------------------# + +#------------------------------------------------------------------------------------------# +# Quit R. # +#------------------------------------------------------------------------------------------# q("no") +#------------------------------------------------------------------------------------------# diff --git a/ED/Template/compare_scenarios.r b/ED/Template/compare_scenarios.r index 9d1336e1e..e83486a6f 100644 --- a/ED/Template/compare_scenarios.r +++ b/ED/Template/compare_scenarios.r @@ -10,41 +10,162 @@ graphics.off() +#==========================================================================================# +#==========================================================================================# +# Here is the user defined variable section. # +#------------------------------------------------------------------------------------------# +here = getwd() # Current directory +srcdir = "/n/moorcroft_data/mlongo/util/Rsc" # Script directory +outroot = file.path(here,"scenario_comp") #------------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------------# # Here is the user defined variable section. # #------------------------------------------------------------------------------------------# +retrieve.siminfo = FALSE # Retrieve previously loaded simul. info +retrieve.global = TRUE # Retrieve previously loaded data +rdata.path = file.path(here,"RData_scomp") # Path for the scenario comparison. +#------------------------------------------------------------------------------------------# + + + + +#------------------------------------------------------------------------------------------# +# The following variables control whether to plot the different stuff. For all of # +# them, the values are: # +# TRUE -- plot all of them # +# NA -- plot only the first (debugging only). # +# FALSE -- skip them altogether # +#------------------------------------------------------------------------------------------# +plot.panel = TRUE +plot.tseries = TRUE +plot.szpft = TRUE +plot.barplot = TRUE +plot.xyzvars = TRUE +plot.scencomp = TRUE +#------------------------------------------------------------------------------------------# + + + + +#------------------------------------------------------------------------------------------# +# Variable name.template has the general format of the simulations. Put some patterns # +# instead of the actual values, and use these patterns in the variables below to replace # +# and substitute by the actual names. For the other variables you must provide the # +# following lists: # +# # +# global -- These are global variables, forced to be unidimensional. Direct comparison # +# plots will never happen amongst these variables. At least one global # +# dimension must be given. # +# panel -- Similar to global variables, they will be used to generate multiple panels # +# 0 dimension -- Single panel # +# 1 dimension -- One panel for each value # +# 2 dimensions -- All combinations # +# 3+ dimension -- Not allowed # +# scenario -- Scenario variables. # +# 0 dimension -- Not allowed (and btw, did you notice the script is called # +# compare scenarios?) # +# 1 dimension -- line plots with the average properties # +# 2 dimensions -- image plots. # +# 3+ dimensions -- Not allowed. I'm not the one who likes 3D plots :). # +# # +# Each list element of the list must contain the following variables: # +# # +# key -- the identifier for the variable, that is in the name of the simulation # +# and may be used in the output file name and in the array dimension # +# names. # +# desc -- a nicer name that describes the variable. They will be used in title # +# or axis labels. # +# pattern -- the pattern that will be replaced by the key in name.template. This # +# should be a scalar. # +# # +# The following elements are used only by the scenario variables, but they must be # +# set for all elements (NA is enough for the others) # +# # +# value -- The values so we can build the image plot with reasonable axis. # +# default -- The default value, the other simulations will be scaled against this # +# variable. # +# colour -- The colours that identify this scenario. # +# pch -- The symbols that identify this scenario. # +# alabel -- The axis labels. This should be a scalar. # +# # +# # +# # +# In addition, you must define a list with the configurations of each realisation. # +# In case you didn't run any realisation, define the elements as empty vectors. # +# (only key, desc, and pattern are defined). # #------------------------------------------------------------------------------------------# -here = getwd() # Current directory -srcdir = "/n/moorcroft_data/mlongo/util/Rsc" # Script directory -outroot = paste(here,"scenario_evergreen",sep="/") # Output directory - -sites = c("gyf","s67","m34","rja","cax","pdg","ban","pnz") -simul = list() -simul[[1]] = list( name = "iscen-01_phen-01_canrad01" - , key = "past" - , desc = "Historical rainfall" - , colour = "royalblue4" - , pch = 15 - )#end list -simul[[2]] = list( name = "iscen+01_phen-01_canrad01" - , key = "unif" - , desc = "Uniform resampling" - , colour = "steelblue3" - , pch = 17 - )#end list -simul[[3]] = list( name = "iscen-02_phen-01_canrad01" - , key = "dry02" - , desc = "Dry bias (A = -2)" - , colour = "orange1" - , pch = 9 - )#end list -simul[[4]] = list( name = "iscen-06_phen-01_canrad01" - , key = "dry06" - , desc = "Dry bias (A = -6)" - , colour = "firebrick" - , pch = 13 - )#end list +name.template = "tPPP_rRRRR_tTTTT_real-ZZ_iphenDDD_stextSS" +use.global = c(4,2) # Which global to use (TRUE means all of them) +#----- Global variables. ------------------------------------------------------------------# +global = list() +global$stext = list( key = c("stext02","stext06","stext08","stext16","stext17") + , desc = paste( "Soil type:" + , c("Loamy sand","Sandy clay loam","Clayey loam" + ,"Clayey sand","Clayey silt") + ,sep = " " + )#end paste + , pattern = "stextSS" + , value = NA_real_ + , label = NA_real_ + , default = NA_character_ + , colour = NA_character_ + , pch = NA_integer_ + , alabel = NA_character_ + )#end list +#----- Panel variables. -------------------------------------------------------------------# +panel = list() +panel$iata = list( key = c("gyf","s67") + , desc = c("Paracou, GUF","Santarem km 67") + , pattern = "PPP" + , value = NA_real_ + , label = NA_real_ + , default = NA_character_ + , colour = NA_character_ + , pch = NA_integer_ + , alabel = NA_character_ + )#end list +panel$iphen = list( key = c("iphen-01","iphen+02") + , desc = paste("Phenology:",c("Evergreen","Drought Deciduous")) + , pattern = "iphenDDD" + , value = NA_real_ + , label = NA_real_ + , default = NA_character_ + , colour = NA_character_ + , pch = NA_integer_ + , alabel = NA_character_ + )#end list +#----- Scenario variables. ----------------------------------------------------------------# +scenario = list() +scenario$drain = list( key = c("r+000","r-020","r-040","r-060","r-080","r-100") + , desc = c("dR = 0.00 S","dR = -0.20 S","dR = -0.40 S" + ,"dR = -0.60 S","dR = -0.80 S","dR = -1.00 S") + , pattern = "rRRRR" + , value = c( 0.0, 0.2, 0.4, 0.6, 0.8, 1.0) + , label = c( 0.0, -0.2, -0.4, -0.6, -0.8, -1.0) + , colour = c("royalblue4","deepskyblue","yellow3","darkorange2" + ,"firebrick","#520000") + , pch = c(15L,17L,12L,13L,6L,8L) + , default = "r+000" + , alabel = c("Mean rainfall change [units of scale parameter]") + )#end list +scenario$dtemp = list( key = c("t+000","t+100","t+200","t+300") + , desc = c("dT = +0.0 K","dT = +1.0 K","dT = +2.0 K","dT = +3.0 K") + , pattern = "tTTTT" + , value = c(0.0,1.0,2.0,3.0) + , label = c(0.0,1.0,2.0,3.0) + , colour = c("dodgerblue","yellow3","darkorange2","firebrick") + , pch = c(18L,17L,13L,6L) + , default = "t+000" + , alabel = c("Mean temperature change [K]") + )#end list +#----- Realisation variables. -------------------------------------------------------------# +realisation = list( key = paste("real",sprintf("%2.2i",0:9),sep="-") + , desc = paste("Realisation",sprintf("%2.2i",0:9),sep=" ") + , pattern = "real-ZZ" + )#end list #------------------------------------------------------------------------------------------# @@ -53,6 +174,7 @@ simul[[4]] = list( name = "iscen-06_phen-01_canrad01" #------ Miscellaneous settings. -----------------------------------------------------------# yeara = 1972 # First year we will include +yeare = 2001 # First year to use in the averaged output yearz = 2011 # Last year we will include slz.min = -5.0 # The deepest depth that trees access water. idbh.type = 2 # Type of DBH class @@ -66,7 +188,7 @@ idbh.type = 2 # Type of DBH class #------------------------------------------------------------------------------------------# # Plot options. # #------------------------------------------------------------------------------------------# -outform = c("eps","png","pdf") # Formats for output file. Supported formats are: +outform = c("png","eps","pdf") # Formats for output file. Supported formats are: # - "X11" - for printing on screen # - "eps" - for postscript printing # - "png" - for PNG printing @@ -85,13 +207,15 @@ inset = 0.01 # Inset between legend and edge of plot r legbg = "white" # Legend background colour. fracexp = 0.40 # Expansion factor for y axis (to fit legend) cex.main = 0.8 # Scale coefficient for the title -xyz.ncolour = 20 # Number of colours for the xyz +n.colourbar = 32 # Number of colours for the colour bars +n.whitebar = 1 # Number of levels around zero to be set to white notch = FALSE # Add notches to the box plots. +mtext.xoff.im = -8.50 # Offset for the x label mtext.xoff = -7.00 # Offset for the x label mtext.yoff = -1.00 # Offset for the y label mtext.xadj = 0.50 # Offset for the x label mtext.yadj = 0.65 # Offset for the y label -barplot.lwd = 2.00 # Line width for the bar plots +barplot.lwd = 1.50 # Line width for the bar plots #------------------------------------------------------------------------------------------# @@ -127,161 +251,53 @@ nout = length (outform) #----- Set some dimensions associated with the simulations. -------------------------------# -n.sites = length(sites) -n.simul = length(simul) +n.global = length(global ) +n.panel = length(panel ) +n.scenario = length(scenario ) +n.realisation = length(realisation$key) #------------------------------------------------------------------------------------------# - - #------------------------------------------------------------------------------------------# -# Replace the list by a data frame. # +# Check the number of dimensions in scenario and panel are correct. # #------------------------------------------------------------------------------------------# -simul = data.frame( apply( X = sapply(X=simul,FUN=c), MARGIN = 1, FUN = unlist ) - , stringsAsFactors = FALSE - )#end data.frame -for (nn in c("pch")) simul[[nn]] = as.numeric(simul[[nn]]) +ok.global = n.global > 0 +ok.panel = n.panel %in% c(0,1,2) +ok.scenario = n.scenario %in% c(1,2) +if (! ( ok.global && ok.panel && ok.scenario)){ + cat (" Invalid dimensions!") + cat (" Acceptable number of dimensions:") + cat (" -- GLOBAL = > 0" ,"\n") + cat (" -- PANEL = 0, 1, or 2","\n") + cat (" -- SCENARIO = 1 or 2" ,"\n") + cat (" Given number of dimensions:") + cat (" -- GLOBAL =",n.global ,"\n") + cat (" -- PANEL =",n.panel ,"\n") + cat (" -- SCENARIO =",n.scenario ,"\n") + cat (" -- REALISATION =",n.realisation,"\n") + stop("Correct the number of dimensions or re-write the script...") +}#end if #------------------------------------------------------------------------------------------# - - #----- Avoid unecessary and extremely annoying beeps. -------------------------------------# options(locatorBell=FALSE) #------------------------------------------------------------------------------------------# -#==========================================================================================# -#==========================================================================================# -# Create the output paths. # +#----- Define plot window size ------------------------------------------------------------# +size = plotsize(proje=FALSE,paper=paper) #------------------------------------------------------------------------------------------# - #----- Make sure that the base directory exists. ---------------------------------------# - if (! file.exists(outroot)) dir.create(outroot) - #---------------------------------------------------------------------------------------# - - - - - #----- Create the paths by type of plot. -----------------------------------------------# - root.ts.season = file.path(outroot,"ts_season" ) - root.ts.year = file.path(outroot,"ts_year" ) - root.tspft.season = file.path(outroot,"tspft_season" ) - root.tspft.year = file.path(outroot,"tspft_year" ) - root.boxpft.season = file.path(outroot,"boxpft_season" ) - root.boxpft.year = file.path(outroot,"boxpft_year" ) - root.boxpftdbh = file.path(outroot,"boxpftdbh" ) - root.barplot.season = file.path(outroot,"barplot_season") - root.barplot.year = file.path(outroot,"barplot_year" ) - root.xyz.season = file.path(outroot,"xyz_season" ) - root.xyz.pft = file.path(outroot,"xyz_pft" ) - if (! file.exists(root.ts.season )) dir.create(root.ts.season ) - if (! file.exists(root.ts.year )) dir.create(root.ts.year ) - if (! file.exists(root.tspft.season )) dir.create(root.tspft.season ) - if (! file.exists(root.tspft.year )) dir.create(root.tspft.year ) - if (! file.exists(root.boxpft.season )) dir.create(root.boxpft.season ) - if (! file.exists(root.boxpft.year )) dir.create(root.boxpft.year ) - if (! file.exists(root.boxpftdbh )) dir.create(root.boxpftdbh ) - if (! file.exists(root.barplot.season)) dir.create(root.barplot.season) - if (! file.exists(root.barplot.year )) dir.create(root.barplot.year ) - if (! file.exists(root.xyz.season )) dir.create(root.xyz.season ) - if (! file.exists(root.xyz.pft )) dir.create(root.xyz.pft ) - #---------------------------------------------------------------------------------------# - - - - - #----- Generate the names of the sub-sub-directories by variable. ----------------------# - out.ts.season = file.path(root.ts.season ,scen.ts$vname ) - out.ts.year = file.path(root.ts.year ,scen.ts$vname ) - out.tspft.season = file.path(root.tspft.season ,scen.ts$vname ) - out.tspft.year = file.path(root.tspft.year ,scen.ts$vname ) - out.boxpft.season = file.path(root.boxpft.season ,scen.szpft$vname ) - out.boxpft.year = file.path(root.boxpft.year ,scen.szpft$vname ) - out.boxpftdbh = file.path(root.boxpftdbh ,scen.szpft$vname ) - out.barplot.season = file.path(root.barplot.season,scen.barplot$vname ) - out.barplot.year = file.path(root.barplot.year ,scen.barplot$vname ) - out.xyz.season = file.path(root.xyz.season ,scen.xyz$yvar$vname) - out.xyz.pft = file.path(root.xyz.pft ,scen.xyz$yvar$vname) - #---------------------------------------------------------------------------------------# - - - - #----- Loop over all time series variables and create the paths as needed. -------------# - for (n in 1:nscen.ts){ - #----- Check whether this variable is to be plotted. --------------------------------# - if (scen.ts$plt[n]){ - if (! file.exists(out.ts.season[n])) dir.create(out.ts.season[n]) - if (! file.exists(out.ts.year [n])) dir.create(out.ts.year [n]) - }#end if - #------------------------------------------------------------------------------------# - - - #----- Check whether this variable is to be plotted by PFT. -------------------------# - if (scen.ts$plt[n] && scen.ts$pftvar[n]){ - if (! file.exists(out.tspft.season[n])) dir.create(out.tspft.season[n]) - if (! file.exists(out.tspft.year [n])) dir.create(out.tspft.year [n]) - }#end if - #------------------------------------------------------------------------------------# - }#end for - #---------------------------------------------------------------------------------------# - - - - #----- Loop over all box plot variables and create the paths as needed. ----------------# - for (n in 1:nscen.szpft){ - #----- Check whether this variable is to be plotted. --------------------------------# - if (scen.szpft$plt[n]){ - if (! file.exists(out.boxpft.season[n])) dir.create(out.boxpft.season[n]) - if (! file.exists(out.boxpft.year [n])) dir.create(out.boxpft.year [n]) - }#end if - #------------------------------------------------------------------------------------# - - - #----- Check whether this variable is to be plotted by PFT. -------------------------# - if (scen.szpft$plt[n] && scen.szpft$dbhvar[n]){ - if (! file.exists(out.boxpftdbh[n])) dir.create(out.boxpftdbh[n]) - }#end if - #------------------------------------------------------------------------------------# - }#end for - #---------------------------------------------------------------------------------------# - - - - #----- Loop over all bar plot variables and create the paths as needed. ----------------# - for (n in 1:nscen.barplot){ - #----- Check whether this variable is to be plotted. --------------------------------# - if (scen.barplot$plt[n]){ - if (! file.exists(out.barplot.season[n])) dir.create(out.barplot.season[n]) - if (! file.exists(out.barplot.year [n])) dir.create(out.barplot.year [n]) - }#end if - #------------------------------------------------------------------------------------# - }#end for - #---------------------------------------------------------------------------------------# - - - - #----- Loop over all parameter space variables (Y) and create the paths as needed. -----# - for (n in 1:nscen.yvar){ - if (! file.exists(out.xyz.season[n])) dir.create(out.xyz.season[n]) - if (! file.exists(out.xyz.pft [n])) dir.create(out.xyz.pft [n]) - }#end for - #---------------------------------------------------------------------------------------# -#==========================================================================================# -#==========================================================================================# - - -#----- Load observations. -----------------------------------------------------------------# -obsrfile = paste(srcdir,"LBA_MIP.v8.RData",sep="/") -load(file=obsrfile) +#----- Make sure that the base directory exists. ------------------------------------------# +if (! file.exists(outroot)) dir.create(outroot) #------------------------------------------------------------------------------------------# - -#----- Define plot window size ------------------------------------------------------------# -size = plotsize(proje=FALSE,paper=paper) +#----- Make sure that the RData directory exists. -----------------------------------------# +if (! file.exists(rdata.path)) dir.create(rdata.path) #------------------------------------------------------------------------------------------# @@ -303,12 +319,12 @@ season.key = season.list[season.use] # Keys for the seasons. season.desc = season.full[season.use] # Full names of all seasons. season.colour = season.cols[season.use] # Colours for seasons. year.use = yeara:yearz # Years to use +year.avg = yeare:yearz # Years used for averages. year.key = year.use # Year keys (for dimnames) year.desc = year.use # Year names (for titles) #------------------------------------------------------------------------------------------# - #------------------------------------------------------------------------------------------# # Transform pft.mp into an index linked to pft.use and associated variables. # #------------------------------------------------------------------------------------------# @@ -329,1310 +345,4156 @@ n.dbh = length(dbh.use) # Number of DBH classes n.season = length(season.use) # Number of seasons n.season.mp = n.season-1 # Number of seasons for multiple panels n.year = length(year.use) # Number of years +y.sel = year.use %in% year.avg # This will select the years for the output #------------------------------------------------------------------------------------------# - - #------------------------------------------------------------------------------------------# -# Find the best set up for plotting all seasons and all PFTs in the same plot. # +# Create season suffix. # #------------------------------------------------------------------------------------------# -lo.season = pretty.box(n=n.season.mp) -lo.pft = pretty.box(n=n.pft.mp ) +season.suffix = paste(sprintf("%2.2i",sequence(n.season)),tolower(season.key),sep="-") +pft.suffix = paste("pft",sprintf("%2.2i",pft.use),sep="") +dbh.suffix = paste("dbh",tolower(dbh.key),sep="-") #------------------------------------------------------------------------------------------# #------------------------------------------------------------------------------------------# -# Loop over all sites. # +# This is the R object that has the simulation information. # +#------------------------------------------------------------------------------------------# +rdata.siminfo = file.path(rdata.path,"SimInfo.RData") #------------------------------------------------------------------------------------------# -for (p in 1:n.sites){ - #----- Retrieve the site information. --------------------------------------------------# - pidx = match(sites[p],poilist$iata) - short = poilist$short [pidx] - longname = poilist$longname[pidx] - iata = poilist$iata [pidx] - lon = poilist$lon [pidx] - lat = poilist$lat [pidx] - cat(" + Comparing simulations for ",longname,"...","\n",sep="") - #---------------------------------------------------------------------------------------# - - - #---------------------------------------------------------------------------------------# - # Initialise the list of variables. # - #---------------------------------------------------------------------------------------# - eft = list() - #---------------------------------------------------------------------------------------# - #---------------------------------------------------------------------------------------# - # Create a general time stamp that works for all simulations. # - #---------------------------------------------------------------------------------------# - #----- Get all times. ------------------------------------------------------------------# - eft$when = c(chron(paste(12,1,yeara-1,sep="/")) - ,chron(paste(rep(1:12,times=n.year),1,rep(year.use,each=12),sep="/")) - )#end c - eft$when = eft$when[-length(eft$when)] - eft$year = numyears (eft$when) - eft$month = nummonths(eft$when) - n.when = length(eft$when) - #---- Find the seasons. ----------------------------------------------------------------# - eft$season = season(eft$when,add.year=TRUE,dec.next=TRUE) - eft$ss.year = as.numeric(substring(eft$season,1,4)) - eft$ss.season = as.numeric(substring(eft$season,5,6)) - #---- Find unique identifiers for seasons and years based on season, not months. -------# - eft$toseason = unique(eft$season) - eft$toyear = unique(eft$ss.year) - #---------------------------------------------------------------------------------------# +#==========================================================================================# +#==========================================================================================# +# Here we read or reload the simulations. # +#------------------------------------------------------------------------------------------# +if (retrieve.siminfo && file.exists(rdata.siminfo)){ + #----- Retrieve the data. --------------------------------------------------------------# + cat (" + Loading simulation information from ",basename(rdata.siminfo),"...","\n") + load(rdata.siminfo) + n.simul = simul$n.simul + n.dims = simul$n.dims #---------------------------------------------------------------------------------------# - # Make some arrays with the right dimensions. # +}else{ #---------------------------------------------------------------------------------------# - empty = rep (NA,times=n.when) - empty.pft = array(NA,dim=c(n.when,n.pft)) - empty.pftdbh = array(NA,dim=c(n.when,n.dbh,n.pft)) - ts.array = array( data = NA - , dim = c ( n.year, n.season, n.simul) - , dimnames = list(year.key,season.key,simul$key) - )#end array - tspft.array = array( data = NA - , dim = c ( n.year, n.season, n.pft, n.simul) - , dimnames = list(year.key,season.key,pft.key,simul$key) - )#end array - tspftdbh.array = array( data = NA - , dim = c ( n.year, n.season, n.dbh, n.pft, n.simul) - , dimnames = list( year.key,season.key,dbh.key,pft.key,simul$key) - )#end array + # Load the simulations again. # #---------------------------------------------------------------------------------------# + cat (" + Reloading the simulation output...","\n") - - #=======================================================================================# - #=======================================================================================# - # Initialise all variables. # + #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + # In this block we concatenate all dimensions in a way that we can easily modify # + # the dimensions later. # #---------------------------------------------------------------------------------------# - for (v in 1:nscen.ts){ - #----- Copy variable info. ----------------------------------------------------------# - var.vname = scen.ts$vname[v] - var.desc = scen.ts$desc [v] - var.quant = scen.ts$quant[v] - is.pft = scen.ts$pft [v] - is.dbh = scen.ts$dbh [v] - var.pft = paste(var.vname,"pft" ,sep="") - var.pftdbh = paste(var.vname,"pftdbh",sep="") - cat (" * Creating data holders for ",var.desc,"...","\n") - - #----- Append the lists to a common name. -------------------------------------------# - eft[[var.vname]] = list() - eft[[var.vname]]$ts = ts.array - if (is.pft) eft[[var.vname]]$tspft = tspft.array - if (is.dbh) eft[[var.vname]]$tspftdbh = tspftdbh.array - #------------------------------------------------------------------------------------# - }#end for (v in 1:nscen.ts) - #=======================================================================================# - #=======================================================================================# - - + cat (" - Finding the parameter space dimensions for these simulations...","\n") + #----- Combine all the dimensions we are going to explore. --------------------------# + rdims = c("global","panel","scenario") + simul.a = NULL + simul.b = NULL + dim.type = NULL + pattern = NULL + default = NULL + alabel = NULL + for (r in 1:length(rdims)){ + this = get(rdims[r]) + this.a = lapply(X=this ,FUN= data.frame,stringsAsFactors=FALSE) + this.b = sapply(X=this.a,FUN=rbind ) + this.e = t(apply(X = sapply(X=this,FUN=c), MARGIN=1,FUN=unlist)) + simul.a = c (simul.a,this.a) + simul.b = cbind(simul.b,this.b) + dim.type = c (dim.type,rep(rdims[r],times=length(this))) + #---------------------------------------------------------------------------------# + # These variables should remain scalars. # + #---------------------------------------------------------------------------------# + pattern = unlist(c(pattern, this.e[,"pattern"])) + default = unlist(c(default, this.e[,"default"])) + alabel = unlist(c(alabel , this.e[,"alabel" ])) + #---------------------------------------------------------------------------------# + rm(this,this.a,this.b,this.e) + }#end for + #------------------------------------------------------------------------------------# - #=======================================================================================# - #=======================================================================================# - # Loop over the simulations. # - #---------------------------------------------------------------------------------------# - for (s in 1:n.simul){ - #---- Copy the settings to local variables. -----------------------------------------# - sim.name = simul$name [s] - sim.desc = simul$desc [s] - sim.colour = simul$colour[s] - sim.pch = simul$pch [s] - sim.full = paste("t",iata,"_",sim.name,sep="") + #------------------------------------------------------------------------------------# + # Rename the elements of the 3 simple vectors. # + #------------------------------------------------------------------------------------# + names(pattern) = names(default) = names(alabel) = names(simul.a) #------------------------------------------------------------------------------------# #------------------------------------------------------------------------------------# - # Load the data set. # + # Find all dimensions and dimension names, then we transform the internal # + # vectors in arrays, so it is easier to track # #------------------------------------------------------------------------------------# - rdata.simul = paste(here,"/",sim.full,"/rdata_month/",sim.full,".RData",sep="") - cat (" - Load data from file ",basename(rdata.simul),"...","\n") - load (rdata.simul) + dim.simul = sapply(X=simul.a,FUN=nrow) + dnames.simul = simul.b ["key",] + simul = apply(X=simul.b,FUN=expand.grid,MARGIN=1,stringsAsFactors=FALSE) #------------------------------------------------------------------------------------# - #------------------------------------------------------------------------------------# - # Find the indices for mapping the data from the original data set to the # - # combined one. # - #------------------------------------------------------------------------------------# - idx = match(eft$when,datum$when) - sel = is.finite(idx) - idx = idx[sel] + #----- Append the dimensions to the list. -------------------------------------------# + simul$dim = dim.simul + simul$dimnames = dnames.simul + simul$dim.type = dim.type + simul$pattern = pattern + simul$default = default + simul$alabel = alabel #------------------------------------------------------------------------------------# + #----- Map the indices onto the dimension names. ------------------------------------# + simul$index = mapply(FUN= match,x= simul$key,table= simul$dimnames) #------------------------------------------------------------------------------------# - # These are shorter versions of the season indices. # - #------------------------------------------------------------------------------------# - ee = sequence(n.season.mp) - e5 = n.season - #------------------------------------------------------------------------------------# + + #----- Map the default indices onto the dimension names. ----------------------------# + simul$def.idx = mapply(FUN= match,x= simul$default,table= simul$dimnames) #------------------------------------------------------------------------------------# - # Copy the time variables to the consolidated list. # + + + + + #----- Map the indices onto the dimension names. ------------------------------------# + simul$name = rep(name.template,times=nrow(simul$index)) + for (l in 1:length(simul$key)){ + simul$name = mapply( FUN = gsub + , replacement = simul$key[[l]] + , x = simul$name + , MoreArgs = list(pattern=simul$pattern[l]) + )#end mapply + dimnames(simul$name) = NULL + }#end for #------------------------------------------------------------------------------------# - for (v in 1:nscen.ts){ - #----- Copy variable info. -------------------------------------------------------# - var.vname = scen.ts$vname [v] - var.desc = scen.ts$desc [v] - var.f.aggr = get(scen.ts$f.aggr[v]) - is.pft = scen.ts$pft [v] - is.dbh = scen.ts$dbh [v] - is.mort = scen.ts$mort [v] - is.recr = scen.ts$recr [v] - var.pft = paste(var.vname,"pft" ,sep="") - var.pftdbh = paste(var.vname,"pftdbh",sep="") - cat (" * Processing ",var.desc,"...","\n") - #---------------------------------------------------------------------------------# + #----- Find the global number of runs and dimensions. -------------------------------# + simul$n.simul = length(simul$name) + simul$n.dims = length(simul$dim) + n.simul = simul$n.simul + n.dims = simul$n.dims + sim.width = nchar(n.simul) + sim.label = paste( "sim" + , sprintf( paste("%",sim.width,".",sim.width,"i",sep="") + , sequence(n.simul)) + , sep="-" + )#end paste + + + #------------------------------------------------------------------------------------# + # Check whether there are realisations or not. # + #------------------------------------------------------------------------------------# + if (n.realisation == 0){ #---------------------------------------------------------------------------------# - # Grab the time series. # + # No realisation, still make a dummy matrix. # #---------------------------------------------------------------------------------# - var.now = empty - if (is.pft){ - var.now[sel] = datum[[var.pft]][idx,pft.use[n.pft]] - }else{ - var.now[sel] = datum[[var.vname]][idx] - }#end if (is.pft) - #------ Find the means/sum by year and by season. --------------------------------# - eft[[var.vname]]$ts[,ee,s] = tapply( X = var.now - , INDEX = list(eft$ss.year,eft$ss.season) - , FUN = var.f.aggr - , na.rm = TRUE - )#end tapply - eft[[var.vname]]$ts[,e5,s] = tapply( X = var.now - , INDEX = eft$ss.year - , FUN = var.f.aggr - , na.rm = TRUE - )#end tapply - #---------------------------------------------------------------------------------# - - - - #---------------------------------------------------------------------------------# - # Check what to do depending on whether the variable is a PFT and/or DBH. # - #---------------------------------------------------------------------------------# - if (is.pft){ - var.now = empty.pft - var.now[sel,] = datum[[var.pft]][idx,pft.use] - - #----- Find the means/sum by year and by season. ------------------------------# - eft[[var.vname]]$tspft[,ee,,s] = qapply( X = var.now - , INDEX = list( eft$ss.year - , eft$ss.season - )#end list - , DIM = 1 - , FUN = var.f.aggr - , na.rm = TRUE - )#end qapply - eft[[var.vname]]$tspft[,e5,,s] = qapply( X = var.now - , INDEX = eft$ss.year - , DIM = 1 - , FUN = var.f.aggr - , na.rm = TRUE - )#end qapply - #------------------------------------------------------------------------------# - }#end if (var.pft) + simul$n.real = 1 + n.real = simul$nreal + simul$name = matrix(simul$name,nrow=n.simul,ncol=n.real) + dimnames(simul$name) = list(sim.label,"real-00") #---------------------------------------------------------------------------------# + }else{ + #----- Find the combination of all realisations. ---------------------------------# + simul$n.real = n.realisation + n.real = simul$n.real + simul$name = rep (simul$name ,times = n.real ) + replace.by = rep (realisation$key,each = n.simul) + simul$name = matrix( data = mapply( FUN = gsub + , replacement = replace.by + , x = simul$name + , MoreArgs = list(pattern=realisation$pattern) + )#end mapply + , nrow = n.simul + , ncol = n.real + )#end matrix + dimnames(simul$name) = list(sim.label,realisation$key) + }#end if + #------------------------------------------------------------------------------------# - #---------------------------------------------------------------------------------# - # Check what to do depending on whether the variable is a PFT and/or DBH. # - #---------------------------------------------------------------------------------# - if (is.dbh){ - var.now = empty.pftdbh - var.now[sel,,] = datum[[var.pftdbh]][idx,dbh.use,pft.use] - #----- Find the means/sum by year and by season. ------------------------------# - eft[[var.vname]]$tspftdbh[,ee,,,s] = qapply( X = var.now - , INDEX = list( eft$ss.year - , eft$ss.season - )#end list - , DIM = 1 - , FUN = var.f.aggr - , na.rm = TRUE - )#end qapply - eft[[var.vname]]$tspftdbh[,e5,,,s] = qapply( X = var.now - , INDEX = eft$ss.year - , DIM = 1 - , FUN = var.f.aggr - , na.rm = TRUE - )#end qapply - #------------------------------------------------------------------------------# - }#end if (var.dbh) - #---------------------------------------------------------------------------------# - }#end for (v in 1:nscen.ts) #------------------------------------------------------------------------------------# - }#end for (s in 1:n.simul) - #=======================================================================================# - #=======================================================================================# + # Create all possible combinations of global and panel variables. # + #------------------------------------------------------------------------------------# + #----- Global variables. ------------------------------------------------------------# + i.global = which(simul$dim.type == "global") + simul$global = list() + if (n.global == 1){ + simul$global$index = unlist(simul$key [,i.global]) + simul$global$title = unlist(simul$desc[,i.global]) + }else{ + simul$global$index = apply( X = simul$key [,i.global] + , MARGIN = 1 + , FUN = paste + , collapse = "-" + )#end apply + simul$global$title = apply( X = simul$desc[,i.global] + , MARGIN = 1 + , FUN = paste + , collapse = " - " + )#end apply + }#end if + simul$global$level = unique(simul$global$index) + simul$global$title = unique(simul$global$title) + simul$global$index = match(simul$global$index,simul$global$level) + simul$global$n.level = length(simul$global$level) + #----- Panel variables. -------------------------------------------------------------# + i.panel = which(simul$dim.type == "panel") + simul$panel = list() + if (n.panel == 0){ + simul$panel$index = character(0) + simul$panel$title = character(0) + }else if (n.panel == 1){ + simul$panel$index = c(simul$key [,i.panel]) + simul$panel$title = c(simul$desc[,i.panel]) + }else{ + simul$panel$index = apply( X = simul$key [,i.panel] + , MARGIN = 1 + , FUN = paste + , collapse = "-" + )#end apply + simul$panel$title = apply( X = simul$desc[,i.panel] + , MARGIN = 1 + , FUN = paste + , collapse = " - " + )#end apply + }#end if + simul$panel$level = unique(simul$panel$index) + simul$panel$title = unique(simul$panel$title) + simul$panel$index = match (simul$panel$index,simul$panel$level) + simul$panel$n.level = length(simul$panel$level) + #====================================================================================# + #====================================================================================# - #=======================================================================================# - #=======================================================================================# - # Loop over variables and find the ones that are mortality or recruitment. We # - # must transform them so they are always between 0 and 100. # - #---------------------------------------------------------------------------------------# - cat (" * Transforming mortality and recruitment variables...","\n") - for (v in 1:nscen.ts){ - #----- Copy variable info. ----------------------------------------------------------# - var.vname = scen.ts$vname[v] - var.desc = scen.ts$desc [v] - is.pft = scen.ts$pft [v] - is.dbh = scen.ts$dbh [v] - is.mort = scen.ts$mort [v] - is.recr = scen.ts$recr [v] - cat (" * Creating data holders for ",var.desc,"...","\n") - - #----- Transform mortality data. ----------------------------------------------------# - if (is.mort){ - eft[[var.vname]]$ts = 100.*(1. - exp(-eft[[var.vname]]$ts )) - if(is.pft) eft[[var.vname]]$tspft = 100.*(1. - exp(-eft[[var.vname]]$tspft )) - if(is.dbh) eft[[var.vname]]$tspftdbh = 100.*(1. - exp(-eft[[var.vname]]$tspftdbh)) + + #====================================================================================# + #====================================================================================# + # The scenario variables are done in a slightly different way because when two # + # dimensions are given, we must fix one and let the other vary. # + #------------------------------------------------------------------------------------# + i.scenario = which(simul$dim.type == "scenario") + simul$scenario = list() + if (n.scenario == 1){ + simul$scenario$level = character(0) + simul$scenario$title = character(0) + simul$scenario$fixcol = integer(0) + simul$scenario$idxcol = integer(0) + simul$scenario$index = list(sequence(n.simul)) + simul$scenario$idxoff = simul$scenario$index + }else{ + my.keys = simul$key [,i.scenario] + my.desc = simul$desc[,i.scenario] + un.level = lapply((X = my.keys),FUN=unique) + un.title = lapply((X = my.desc),FUN=unique) + simul$scenario$level = unlist(un.level) + simul$scenario$title = unlist(un.title) + simul$scenario$fixcol = rep(i.scenario,times=sapply(X=un.level,FUN=length)) + simul$scenario$idxcol = match(simul$scenario$fixcol,unique(simul$scenario$fixcol)) + simul$scenario$index = mapply(match,my.keys,un.level) + #----- Correct the indices so they are in sequence. ------------------------------# + off = c( 0, apply( X = simul$scenario$index + , MARGIN = 2 + , FUN = max)[-n.scenario] + )#end c + names(off) = colnames(simul$scenario$index) + simul$scenario$idxoff = ( mapply("+",data.frame(simul$scenario$index),off) + + 0*simul$scenario$index ) }#end if + simul$scenario$n.level = length(simul$scenario$level) #------------------------------------------------------------------------------------# - - #----- Transform recruitment data. --------------------------------------------------# - if (is.recr){ - eft[[var.vname]]$ts = 100.*(exp(eft[[var.vname]]$ts ) - 1.0) - if(is.pft) eft[[var.vname]]$tspft = 100.*(exp(eft[[var.vname]]$tspft ) - 1.0) - if(is.dbh) eft[[var.vname]]$tspftdbh = 100.*(exp(eft[[var.vname]]$tspftdbh) - 1.0) - }#end if + #----- Delete the temporary arrays. -------------------------------------------------# + rm(simul.a,simul.b,pattern,default,alabel,dim.simul,dnames.simul) #------------------------------------------------------------------------------------# - }#end for (v in 1:nscen.ts) - #=======================================================================================# - #=======================================================================================# + #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + #------ Save the header. ---------------------------------------------------------------# + cat (" + Loading simulation information from ",basename(rdata.siminfo),"...","\n") + save(simul,file=rdata.siminfo) + #---------------------------------------------------------------------------------------# +}#end if +#==========================================================================================# +#==========================================================================================# - #=======================================================================================# - #=======================================================================================# - # Plot the comparison between time series, by season. # - #---------------------------------------------------------------------------------------# - cat (" - Plotting the time series...","\n") - for (v in 1:nscen.ts){ - #----- Copy variable info. ----------------------------------------------------------# - var.vname = scen.ts$vname [v] - var.desc = scen.ts$desc [v] - var.unit = scen.ts$unit [v] - is.pft = scen.ts$pftvar[v] - var.plog = scen.ts$plog [v] - var.plt = scen.ts$plt [v] - if (var.plog){ - var.xylog = "y" - }else{ - var.xylog = "" - }#end if - if (var.plt){ - cat (" - ",var.desc,"...","\n") - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# - # Plot the variable by season. # - #---------------------------------------------------------------------------------# - #----- Load variable. ------------------------------------------------------------# - this = eft[[var.vname]]$ts - xlimit = pretty.xylim(year.use ,fracexp=0.0,is.log=FALSE ) - ylimit = pretty.xylim(this[,1:n.season.mp,],fracexp=0.0,is.log=var.plog) - #---------------------------------------------------------------------------------# +#==========================================================================================# +#==========================================================================================# +# Find the best set up for plotting all seasons and all PFTs in the same plot. # +#------------------------------------------------------------------------------------------# +lo.season = pretty.box(n=n.season.mp ) +lo.pft = pretty.box(n=n.pft.mp ) +if (n.panel == 0 | n.panel == 1){ + lo.panel = pretty.box(n=simul$panel$n.level) +}else if (n.panel == 2){ + lo.panel = pretty.box(n=simul$dim[simul$dim.type == "panel"]) +}#end if +#==========================================================================================# +#==========================================================================================# - #----- Set the title. ------------------------------------------------------------# - letitre = paste(var.desc," (Seasonal means) - ",longname,sep="") - lex = paste("Year") - ley = paste(var.desc," [",var.unit,"]",sep=" ") - #---------------------------------------------------------------------------------# - #---------------------------------------------------------------------------------# - # Loop over all formats. # - #---------------------------------------------------------------------------------# - for (o in 1:nout){ - #----- Open file or display. --------------------------------------------------# - fichier = paste(out.ts.season[v],"/",var.vname,"-",iata,"-ts_season." - ,outform[o],sep="") - if (outform[o] == "x11"){ - X11(width=size$width,height=size$height,pointsize=ptsz) - }else if(outform[o] == "png"){ - png(filename=fichier,width=size$width*depth,height=size$height*depth - ,pointsize=ptsz,res=depth) - }else if(outform[o] == "eps"){ - postscript(file=fichier,width=size$width,height=size$height,pointsize=ptsz - ,paper=size$paper) - }else if(outform[o] == "pdf"){ - pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height - ,pointsize=ptsz,paper=size$paper) - }#end if - #------------------------------------------------------------------------------# +#==========================================================================================# +#==========================================================================================# +# Create all directories. # +#------------------------------------------------------------------------------------------# +outpath = list() +for (o in 1:nout){ + this.out = outform[o] + + onow = list() + if (! this.out %in% "x11"){ + #------ Main directory for this output format. --------------------------------------# + onow$main = file.path(outroot,this.out) + if (! file.exists(onow$main)) dir.create(onow$main) + #------------------------------------------------------------------------------------# + + #------ Loop over global variables. -------------------------------------------------# + onow$global = list() + if (is.logical(use.global) && all(use.global)){ + loop.global = sequence(max(1,simul$global$n.level )) + }else{ + loop.global = use.global + }#end if + loop.panel = sequence(max(1,simul$panel$n.level )) + loop.scenario = which(simul$scenario$level %in% simul$default) + for (g in loop.global){ + gnow = list() + + #---- Main directory for this global combination. --------------------------------# + gnow$main = file.path(onow$main,simul$global$level[g]) + if (! file.exists(gnow$main)) dir.create(gnow$main) + #---------------------------------------------------------------------------------# + + #---------------------------------------------------------------------------------# + # Create one directory for each scenario, or dump everything in the main # + # path if it is a scenario for all. # + #---------------------------------------------------------------------------------# + if (n.scenario > 1){ #------------------------------------------------------------------------------# - # Split the window into several smaller windows. Add a bottom row to fit # - # the legend. # + # Create the directory where the 2-D scenario comparison will be placed. # #------------------------------------------------------------------------------# - par.orig = par(no.readonly = TRUE) - mar.orig = par.orig$mar - par(oma = c(0.2,3,4,0)) - layout(mat = rbind(1+lo.season$mat,rep(1,times=lo.season$ncol)) - ,height = c(rep(5/lo.season$nrow,times=lo.season$nrow),1) - )#end layout + root.scenpanel.season = file.path(gnow$main,"scenpanel_season") + gnow$scenpanel.year = file.path(gnow$main,"scenpanel_year" ) + root.scenpanelpft.season = file.path(gnow$main,"scenpanelpft_season") + root.scenpanelpft.year = file.path(gnow$main,"scenpanelpft_year" ) + root.scenpaneldbh.season = file.path(gnow$main,"scenpaneldbh_season") + root.scenpaneldbh.year = file.path(gnow$main,"scenpaneldbh_year" ) + if (! file.exists(root.scenpanel.season )){ + dir.create(root.scenpanel.season ) + }#end if + if (! file.exists(root.scenpanelpft.season)){ + dir.create(root.scenpanelpft.season) + }#end if + if (! file.exists(root.scenpanelpft.year )){ + dir.create(root.scenpanelpft.year ) + }#end if + if (! file.exists(root.scenpaneldbh.season)){ + dir.create(root.scenpaneldbh.season) + }#end if + if (! file.exists(root.scenpaneldbh.year )){ + dir.create(root.scenpaneldbh.year ) + }#end if + if (! file.exists(gnow$scenpanel.year )){ + dir.create(gnow$scenpanel.year ) + }#end if #------------------------------------------------------------------------------# - #----- Plot legend. -----------------------------------------------------------# - par(mar=c(0.1,0.1,0.1,0.1)) - plot.new() - plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") - legend ( x = "bottom" - , inset = 0.0 - , legend = simul$desc - , col = simul$colour - , lwd = 2.0 - , pch = 16 - , bg = "white" - , ncol = min(3,pretty.box(n.simul)$ncol) - , title = expression(bold("Simulation")) - , cex = 1.0 - )#end legend #------------------------------------------------------------------------------# + # Create one directory by season. # + #------------------------------------------------------------------------------# + gnow$scenpanel.season = file.path(root.scenpanel.season,season.suffix) + for (e in season.mp){ + #----- Create one directory for each season. -------------------------------# + if (! file.exists(gnow$scenpanel.season[e])){ + dir.create(gnow$scenpanel.season[e]) + }#end if + #---------------------------------------------------------------------------# + }#end for + #------------------------------------------------------------------------------# #------------------------------------------------------------------------------# - # Loop over all seasons, and plot the bar plots. # + # Create one directory by PFT or DBH. # #------------------------------------------------------------------------------# - for (e in 1:n.season.mp){ - #----- Find out where is this box going, and set up axes and margins. ------# - left = (e %% lo.season$ncol) == 1 - right = (e %% lo.season$ncol) == 0 - top = e <= lo.season$ncol - bottom = e > (lo.season$nrow - 1) * lo.season$ncol - mar.now = c(1 + 3 * bottom,1 + 1 * left,1 + 2 * top,1 + 1 * right) + 0.1 + gnow$scenpanelpft.year = file.path(root.scenpanelpft.year,pft.suffix) + gnow$scenpaneldbh.year = file.path(root.scenpaneldbh.year,dbh.suffix) + for (f in 1:(n.pft-1)){ + #----- Create one directory for each season. -------------------------------# + if (! file.exists(gnow$scenpanelpft.year[f])){ + dir.create(gnow$scenpanelpft.year[f]) + }#end if + #---------------------------------------------------------------------------# + }#end for + for (d in 1:n.dbh){ + #----- Create one directory for each season. -------------------------------# + if (! file.exists(gnow$scenpaneldbh.year[d])){ + dir.create(gnow$scenpaneldbh.year[d]) + }#end if #---------------------------------------------------------------------------# + }#end for + #------------------------------------------------------------------------------# - #----- Set up the title for each plot. -------------------------------------# - lesub = paste(season.desc[e],sep="") - #---------------------------------------------------------------------------# + #------------------------------------------------------------------------------# + # Create one directory by season, then by PFT or DBH. # + #------------------------------------------------------------------------------# + #----- Combine all PFT/DBHs. and seasons. -------------------------------------# + pft.season.suffix = expand.grid(pft.suffix,season.suffix) + dbh.season.suffix = expand.grid(dbh.suffix,season.suffix) + #----- Create the "branches". -------------------------------------------------# + branch.scenpanelpft.season = apply( X = pft.season.suffix + , MARGIN = 1 + , FUN = paste + , collapse ="/" + )#end apply + branch.scenpaneldbh.season = apply( X = dbh.season.suffix + , MARGIN = 1 + , FUN = paste + , collapse ="/" + )#end apply + gnow$scenpanelpft.season = matrix( data = file.path(root.scenpanelpft.season + ,branch.scenpanelpft.season) + , nrow = n.pft + , ncol = n.season + )#end matrix + gnow$scenpaneldbh.season = matrix( data = file.path(root.scenpaneldbh.season + ,branch.scenpaneldbh.season) + , nrow = n.dbh + , ncol = n.season + )#end matrix + for (e in season.mp){ + for (f in 1:(n.pft-1)){ + #----- Create one directory for each PFT. -------------------------------# + if (! file.exists(dirname(gnow$scenpanelpft.season[f,e]))){ + dir.create(dirname(gnow$scenpanelpft.season[f,e])) + }#end if + #------------------------------------------------------------------------# + #----- Create one directory for each season. ----------------------------# + if (! file.exists(gnow$scenpanelpft.season[f,e])){ + dir.create(gnow$scenpanelpft.season[f,e]) + }#end if + #------------------------------------------------------------------------# + }#end for + for (d in 1:n.dbh){ + #----- Create one directory for each DBH. -------------------------------# + if (! file.exists(dirname(gnow$scenpaneldbh.season[d,e]))){ + dir.create(dirname(gnow$scenpaneldbh.season[d,e])) + }#end if + #------------------------------------------------------------------------# - #----- Plot window and grid. -----------------------------------------------# - par(mar=mar.now) - plot.new() - plot.window(xlim=xlimit,ylim=ylimit,xaxt="n",yaxt="n") - if (bottom) axis(side=1) - if (left ) axis(side=2) - box() - title(main=lesub) - if (plotgrid) grid(col="grey83",lty="solid") - #----- Plot the lines. -----------------------------------------------------# - for (s in 1:n.simul){ - points(x=year.use,y=this[,e,s],type="o",pch=16,col=simul$colour[s] - ,lwd=2.0) + #----- Create one directory for each season. ----------------------------# + if (! file.exists(gnow$scenpaneldbh.season[d,e])){ + dir.create(gnow$scenpaneldbh.season[d,e]) + }#end if + #------------------------------------------------------------------------# }#end for #---------------------------------------------------------------------------# - }#end for (e in 1:n.season.mp) + }#end for #------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------# - #------------------------------------------------------------------------------# - # Plot the global title. # - #------------------------------------------------------------------------------# - par(las=0) - mtext(text=lex ,side=1,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) - mtext(text=ley ,side=2,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) - mtext(text=letitre,side=3,outer=TRUE,cex=1.1,font=2) - #------------------------------------------------------------------------------# - + #---------------------------------------------------------------------------------# + # Loop over all possible scenarios. # + #---------------------------------------------------------------------------------# + gnow$scenario = list() + for (s in loop.scenario){ + snow = list() - #----- Close the device. ------------------------------------------------------# - if (outform[o] == "x11"){ - locator(n=1) - dev.off() + #------------------------------------------------------------------------------# + # We only create scenario-specific simulations if 2-D scenarios were run. # + #------------------------------------------------------------------------------# + if (n.scenario == 1){ + snow$main = gnow$main }else{ - dev.off() + snow$main = file.path(gnow$main,simul$scenario$level[s]) + if (! file.exists(snow$main )) dir.create(snow$main ) }#end if #------------------------------------------------------------------------------# - }#end for (o in 1:nout) - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + #----- Create the paths by type of plot. --------------------------------------# + snow$ts.season = file.path(snow$main,"ts_season" ) + snow$ts.year = file.path(snow$main,"ts_year" ) + snow$tspft.year = file.path(snow$main,"tspft_year" ) + snow$box.season = file.path(snow$main,"box_season" ) + snow$box.year = file.path(snow$main,"box_year" ) + snow$boxpft.season = file.path(snow$main,"boxpft_season" ) + snow$boxpft.year = file.path(snow$main,"boxpft_year" ) + snow$boxdbh.season = file.path(snow$main,"boxdbh_season" ) + snow$boxdbh.year = file.path(snow$main,"boxdbh_year" ) + snow$boxpftdbh = file.path(snow$main,"boxpftdbh" ) + snow$barplot.season = file.path(snow$main,"barplot_season" ) + snow$barplot.year = file.path(snow$main,"barplot_year" ) + + root.tspft.season = file.path(snow$main,"tspft_season" ) + root.xyz.season = file.path(snow$main,"xyz_season" ) + root.xyz.pft = file.path(snow$main,"xyz_pft" ) + + if (! file.exists(snow$ts.season )) dir.create(snow$ts.season ) + if (! file.exists(snow$ts.year )) dir.create(snow$ts.year ) + if (! file.exists(snow$tspft.year )) dir.create(snow$tspft.year ) + if (! file.exists(snow$box.season )) dir.create(snow$box.season ) + if (! file.exists(snow$box.year )) dir.create(snow$box.year ) + if (! file.exists(snow$boxpft.season )) dir.create(snow$boxpft.season ) + if (! file.exists(snow$boxpft.year )) dir.create(snow$boxpft.year ) + if (! file.exists(snow$boxdbh.season )) dir.create(snow$boxdbh.season ) + if (! file.exists(snow$boxdbh.year )) dir.create(snow$boxdbh.year ) + if (! file.exists(snow$boxpftdbh )) dir.create(snow$boxpftdbh ) + if (! file.exists(snow$barplot.season )) dir.create(snow$barplot.season ) + if (! file.exists(snow$barplot.year )) dir.create(snow$barplot.year ) + if (! file.exists(root.tspft.season )) dir.create(root.tspft.season ) + if (! file.exists(root.xyz.season )) dir.create(root.xyz.season ) + if (! file.exists(root.xyz.pft )) dir.create(root.xyz.pft ) + #------------------------------------------------------------------------------# - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# - # Now we plot the annual data. # - #---------------------------------------------------------------------------------# + #----- Directories that have sub-directories. ---------------------------------# + snow$tspft.season = file.path(root.tspft.season ,pft.key) + #------------------------------------------------------------------------------# - #----- Update limits. ------------------------------------------------------------# - xlimit = pretty.xylim(year.use ,fracexp=0.0 ,is.log=FALSE ) - ylimit = pretty.xylim(this[,n.season,],fracexp=fracexp,is.log=var.plog) - #---------------------------------------------------------------------------------# + #----- Create the sub-subdirectories by PFT. ----------------------------------# + for (f in 1:(n.pft-1)){ + if (! file.exists(snow$tspft.season[f])) dir.create(snow$tspft.season[f]) + }#end for + #------------------------------------------------------------------------------# - #----- Set the title. ------------------------------------------------------------# - letitre = paste(var.desc," (Annual means) ",longname,sep="") - lex = paste("Year") - ley = paste(var.desc," [",var.unit,"]",sep=" ") - #---------------------------------------------------------------------------------# + #----- Generate the names of the sub-sub-directories by variable. -------------# + snow$xyz.season = file.path(root.xyz.season ,scen.xyz$yvar$vname) + snow$xyz.pft = file.path(root.xyz.pft ,scen.xyz$yvar$vname) + #------------------------------------------------------------------------------# - #---------------------------------------------------------------------------------# - # Loop over all formats. # - #---------------------------------------------------------------------------------# - for (o in 1:nout){ - #----- Open file or display. --------------------------------------------------# - fichier = paste(out.ts.year[v],"/",var.vname,"-",iata,"-ts_year." - ,outform[o],sep="") - if (outform[o] == "x11"){ - X11(width=size$width,height=size$height,pointsize=ptsz) - }else if(outform[o] == "png"){ - png(filename=fichier,width=size$width*depth,height=size$height*depth - ,pointsize=ptsz,res=depth) - }else if(outform[o] == "eps"){ - postscript(file=fichier,width=size$width,height=size$height,pointsize=ptsz - ,paper=size$paper) - }else if(outform[o] == "pdf"){ - pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height - ,pointsize=ptsz,paper=size$paper) - }#end if #------------------------------------------------------------------------------# + # Loop over all parameter space variables (Y) and create the paths as # + # needed. # + #------------------------------------------------------------------------------# + for (n in 1:nscen.yvar){ + if (! file.exists(snow$xyz.season[n])) dir.create(snow$xyz.season[n]) + if (! file.exists(snow$xyz.pft [n])) dir.create(snow$xyz.pft [n]) + }#end for + #---------------------------------------------------------------------------------------# + gnow$scenario[[s]] = snow + }#end (s in sequence(max(1,simul$scenario$n.level)) + #---------------------------------------------------------------------------------# - #----- Plot window and grid. --------------------------------------------------# - plot.new() - plot.window(xlim=xlimit,ylim=ylimit) - axis(side=1) - axis(side=2) - box() - title(main=letitre,xlab=lex,ylab=ley) - if (plotgrid) grid(col="grey83",lty="solid") - #------------------------------------------------------------------------------# - + onow$global[[g]] = gnow + }#end for (g in 1:simul$global$n.level) + #------------------------------------------------------------------------------------# + }#end if (! this.out %in% "x11") + #---------------------------------------------------------------------------------------# + outpath[[o]] = onow +}#end for (o in 1:nout) +#==========================================================================================# +#==========================================================================================# - #----- Plot the lines. --------------------------------------------------------# - for (s in 1:n.simul){ - points(x=year.use,y=this[,n.season,s],type="o",pch=16,col=simul$colour[s] - ,lwd=2.0) - }#end for - #------------------------------------------------------------------------------# - #---- Add the legend. ---------------------------------------------------------# - legend ( x = "topright" - , inset = inset - , legend = simul$desc - , col = simul$colour - , lwd = 2.0 - , pch = 16 - , bg = "white" - , ncol = min(3,pretty.box(n.simul)$ncol) - , title = expression(bold("Simulation")) - , cex = 1.0 - )#end legend - #------------------------------------------------------------------------------# - #----- Close the device. ------------------------------------------------------# - if (outform[o] == "x11"){ - locator(n=1) - dev.off() - }else{ - dev.off() - }#end if - #------------------------------------------------------------------------------# - }#end for (o in 1:nout) - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# - }#end if (var.plt) - #------------------------------------------------------------------------------------# +#==========================================================================================# +#==========================================================================================# +# For simplicity, detach the results from the structure, and free memory from simul. # +#------------------------------------------------------------------------------------------# +eft = simul$eft +simul$eft = NULL +#------------------------------------------------------------------------------------------# +#==========================================================================================# +#==========================================================================================# +# Time to plot. Here we must loop over all scenarios, nested within the panels, # +# which are nested within the global. # +#------------------------------------------------------------------------------------------# +cat(" + Processing data for:","\n",sep="") +if (is.logical(use.global) && all(use.global)){ + loop.global = sequence(max(1,simul$global$n.level )) +}else{ + loop.global = use.global +}#end if +if (is.na(plot.panel)){ + loop.panel = sequence(max(1,simul$panel$n.level))[1] +}else if (plot.panel){ + loop.panel = sequence(max(1,simul$panel$n.level)) +}else{ + loop.panel = integer(0) +}#end if +loop.scenario = which(simul$scenario$level %in% simul$default) +#------------------------------------------------------------------------------------------# +# Loop over all global dimensions. # +#------------------------------------------------------------------------------------------# +for (g in loop.global){ + + + #---------------------------------------------------------------------------------------# + # Select the runs that belong to this global dimension. # + #---------------------------------------------------------------------------------------# + if (simul$global$n.level == 0){ + g.sel = rep(TRUE,times=n.simul) + global.suffix = "comp" + global.desc = "" + }else{ + g.sel = simul$global$index == g + global.suffix = simul$global$level[g] + global.desc = simul$global$title[g] + }#end if + #----- Define useful aliases. ----------------------------------------------------------# + g.type = simul$dim.type == "global" + n.gsel = sum(g.sel) + loop.gsel = which(g.sel) + gsel.name = simul$name[g.sel,] + real.name = realisation$key + #---------------------------------------------------------------------------------------# + + + + #----- File name for this global scenario. ---------------------------------------------# + rdata.global = file.path(rdata.path,paste("sim_",simul$global$level[g],".RData",sep="")) + #---------------------------------------------------------------------------------------# + + + + #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + # Retrieve or load the data. # + #---------------------------------------------------------------------------------------# + if (retrieve.global && file.exists(rdata.global)){ + #----- Grab data from previously loaded variable. -----------------------------------# + cat(" - Retrieving data from file :",basename(rdata.global),"...","\n") + load(rdata.global) + eft = get(simul$global$level[g]) + rm(list=simul$global$level[g]) #------------------------------------------------------------------------------------# - # If this is a PFT variable, plot the time series by PFT and season. # - #------------------------------------------------------------------------------------# - if (var.plt && is.pft){ - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# - # Plot the seasonal time series for each PFT. # + }else{ + #----- Grab data from previously loaded variable. -----------------------------------# + + #------------------------------------------------------------------------------------# + # Initialise the list of variables. # + #------------------------------------------------------------------------------------# + eft = list() + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Select the runs that belong to this global dimension. # + #------------------------------------------------------------------------------------# + cat(" - Load data from global: ",simul$global$title[g],"...","\n") + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Create a general time stamp that works for all simulations. # + #------------------------------------------------------------------------------------# + #----- Get all times. ---------------------------------------------------------------# + eft$when = c(chron(paste(12,1,yeara-1,sep="/")) + ,chron(paste(rep(1:12,times=n.year),1,rep(year.use,each=12),sep="/"))) + eft$when = eft$when[-length(eft$when)] + eft$year = numyears (eft$when) + eft$month = nummonths(eft$when) + n.when = length(eft$when) + #---- Find the seasons. -------------------------------------------------------------# + eft$season = season(eft$when,add.year=TRUE,dec.next=TRUE) + eft$ss.year = as.numeric(substring(eft$season,1,4)) + eft$ss.season = as.numeric(substring(eft$season,5,6)) + #---- Find unique identifiers for seasons and years based on season, not months. ----# + eft$toseason = unique(eft$season) + eft$toyear = unique(eft$ss.year) + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Make some arrays with the right dimensions. # + #------------------------------------------------------------------------------------# + empty = rep (NA,times=n.when) + empty.pft = array(NA,dim=c(n.when,n.pft)) + empty.pftdbh = array(NA,dim=c(n.when,n.dbh,n.pft)) + ts.array = array( data = NA + , dim = c ( n.gsel, n.real, n.year, n.season) + , dimnames = list(gsel.name[,1],real.name,year.key,season.key) + )#end array + tspft.array = array( data = NA + , dim = c ( n.gsel, n.real, n.year + , n.season, n.pft) + , dimnames = list( gsel.name[,1],real.name,year.key + , season.key, pft.key) + )#end array + tspftdbh.array = array( data = NA + , dim = c ( n.gsel, n.real, n.year + , n.season, n.dbh, n.pft) + , dimnames = list(gsel.name[,1],real.name,year.key + , season.key, dbh.key,pft.key) + )#end array + #------------------------------------------------------------------------------------# + + + + + + + #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + # Initialise all variables. # + #------------------------------------------------------------------------------------# + for (v in 1:nscen.ts){ + #----- Copy variable info. -------------------------------------------------------# + var.vname = scen.ts$vname[v] + var.desc = scen.ts$desc [v] + var.quant = scen.ts$quant[v] + is.pft = scen.ts$pft [v] + is.dbh = scen.ts$dbh [v] + var.pft = paste(var.vname,"pft" ,sep="") + var.pftdbh = paste(var.vname,"pftdbh",sep="") + + #----- Append the lists to a common name. ----------------------------------------# + eft[[var.vname]] = list() + eft[[var.vname]]$ts = ts.array + if (is.pft) eft[[var.vname]]$tspft = tspft.array + if (is.dbh) eft[[var.vname]]$tspftdbh = tspftdbh.array #---------------------------------------------------------------------------------# - for (f in 1:(n.pft-1)){ - cpft = sprintf("%2.2i",pft.use[f]) + }#end for (v in 1:nscen.ts) + #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + + + + + + #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + # Loop over all global variables. # + #------------------------------------------------------------------------------------# + cat (" - Reading the output from each simulation...","\n") + jr = 0 + n.total = n.gsel * n.real + for (j in 1:n.gsel){ + #;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;# + #;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;# + for (r in 1:n.real){ + jr = jr + 1 - #----- Load variable. ---------------------------------------------------------# - this = eft[[var.vname]]$tspft - xlimit = pretty.xylim(year.use ,fracexp=0.0,is.log=FALSE ) - ylimit = pretty.xylim(this[,1:n.season.mp,f,],fracexp=0.0,is.log=var.plog) + #------------------------------------------------------------------------------# + # Load the data set. # + #------------------------------------------------------------------------------# + rdata.simul = paste(here,"/",gsel.name[j,r],"/rdata_month/",gsel.name[j,r] + ,".RData",sep="") + + cat (" * Load data from file ",paste("(",jr,"/",n.total,")",sep="") + ,basename(rdata.simul),"...","\n") + load (rdata.simul) #------------------------------------------------------------------------------# - #----- Set the title. ---------------------------------------------------------# - letitre = paste(var.desc," (Seasonal means) - ",longname - ,"\n",pft.desc[f],sep="") - lex = paste("Year") - ley = paste(var.desc," [",var.unit,"]",sep=" ") #------------------------------------------------------------------------------# + # Find the indices for mapping the data from the original data set to the # + # combined one. # + #------------------------------------------------------------------------------# + idx = match(eft$when,datum$when) + w.sel = is.finite(idx) + idx = idx[w.sel] + #------------------------------------------------------------------------------# + #------------------------------------------------------------------------------# - # Loop over all formats. # + # These are shorter versions of the season indices. # #------------------------------------------------------------------------------# - for (o in 1:nout){ - #----- Open file or display. -----------------------------------------------# - fichier = paste(out.tspft.season[v],"/",var.vname,"-",iata,"-",cpft - ,"-ts_season.",outform[o],sep="") - if (outform[o] == "x11"){ - X11(width=size$width,height=size$height,pointsize=ptsz) - }else if(outform[o] == "png"){ - png(filename=fichier,width=size$width*depth,height=size$height*depth - ,pointsize=ptsz,res=depth) - }else if(outform[o] == "eps"){ - postscript(file=fichier,width=size$width,height=size$height - ,pointsize=ptsz,paper=size$paper) - }else if(outform[o] == "pdf"){ - pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height - ,pointsize=ptsz,paper=size$paper) + ee = sequence(n.season.mp) + e5 = n.season + #------------------------------------------------------------------------------# + + + + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + # Copy the time variables to the consolidated list. # + #------------------------------------------------------------------------------# + for (v in 1:nscen.ts){ + #----- Copy variable info. -------------------------------------------------# + var.vname = scen.ts$vname [v] + var.desc = scen.ts$desc [v] + var.f.aggr = get(scen.ts$f.aggr[v]) + is.pft = scen.ts$pft [v] + is.dbh = scen.ts$dbh [v] + is.mort = scen.ts$mort [v] + is.recr = scen.ts$recr [v] + var.pft = paste(var.vname,"pft" ,sep="") + var.pftdbh = paste(var.vname,"pftdbh",sep="") + cat (" > Processing ",var.desc,"...","\n") + #---------------------------------------------------------------------------# + + + + + + #---------------------------------------------------------------------------# + # Grab the time series. # + #---------------------------------------------------------------------------# + var.now = empty + if (is.pft){ + var.now[w.sel] = datum[[var.pft]][idx,pft.use[n.pft]] + }else{ + var.now[w.sel] = datum[[var.vname]][idx] + }#end if (is.pft) + #------ Find the means/sum by year and by season. --------------------------# + if (var.vname %in% c("rain","water.deficit")){ + eft[[var.vname]]$ts[j,r,,ee] = tapply( X = var.now + , INDEX = list(eft$ss.year + ,eft$ss.season) + , FUN = var.f.aggr + , na.rm = TRUE + )#end tapply + eft[[var.vname]]$ts[j,r,,e5] = tapply( X = var.now + , INDEX = eft$ss.year + , FUN = var.f.aggr + , na.rm = TRUE + )#end tapply + }else{ + eft[[var.vname]]$ts[j,r,,ee] = tapply( X = var.now + , INDEX = list(eft$ss.year + ,eft$ss.season) + , FUN = var.f.aggr + , na.rm = TRUE + )#end tapply + eft[[var.vname]]$ts[j,r,,e5] = tapply( X = var.now + , INDEX = eft$ss.year + , FUN = var.f.aggr + , na.rm = TRUE + )#end tapply }#end if #---------------------------------------------------------------------------# #---------------------------------------------------------------------------# - # Split the window into several smaller windows. Add a bottom row to # - # fit the legend. # + # Check what to do depending on whether the variable is a PFT and/or # + # DBH. # #---------------------------------------------------------------------------# - par.orig = par(no.readonly = TRUE) - mar.orig = par.orig$mar - par(oma = c(0.2,3,4,0)) - layout(mat = rbind(1+lo.season$mat,rep(1,times=lo.season$ncol)) - ,height = c(rep(5/lo.season$nrow,times=lo.season$nrow),1) - )#end layout + if (is.pft){ + var.now = empty.pft + var.now[w.sel,] = datum[[var.pft]][idx,pft.use] + + + #----- Find the means/sum by year and by season. ------------------------# + eft[[var.vname]]$tspft[j,r,,ee,] = qapply( X = var.now + , INDEX = list( eft$ss.year + , eft$ss.season + )#end list + , DIM = 1 + , FUN = mean + , na.rm = TRUE + )#end qapply + eft[[var.vname]]$tspft[j,r,,e5,] = qapply( X = var.now + , INDEX = eft$ss.year + , DIM = 1 + , FUN = mean + , na.rm = TRUE + )#end qapply + #------------------------------------------------------------------------# + }#end if (var.pft) + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Check what to do depending on whether the variable is a PFT and/or # + # DBH. # + #---------------------------------------------------------------------------# + if (is.dbh){ + var.now = empty.pftdbh + var.now[w.sel,,] = datum[[var.pftdbh]][idx,dbh.use,pft.use] + + #----- Find the means/sum by year and by season. ------------------------# + eft[[var.vname]]$tspftdbh[j,r,,ee,,] = qapply( X = var.now + , INDEX = list(eft$ss.year + ,eft$ss.season + )#end list + , DIM = 1 + , FUN = mean + , na.rm = TRUE + )#end qapply + eft[[var.vname]]$tspftdbh[j,r,,e5,,] = qapply( X = var.now + , INDEX = eft$ss.year + , DIM = 1 + , FUN = mean + , na.rm = TRUE + )#end qapply + #------------------------------------------------------------------------# + }#end if (var.dbh) + #---------------------------------------------------------------------------# + }#end for (v in 1:nscen.ts) + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + }#end for + #;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;# + #;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;# + }#end for + #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + + + + + + + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + # Loop over variables and find the ones that are mortality or recruitment. We # + # must transform them so they are always between 0 and 100. # + #------------------------------------------------------------------------------------# + cat (" > Transforming mortality and recruitment variables...","\n") + for (v in 1:nscen.ts){ + #----- Copy variable info. -------------------------------------------------------# + v.vname = scen.ts$vname[v] + v.desc = scen.ts$desc [v] + is.pft = scen.ts$pft [v] + is.dbh = scen.ts$dbh [v] + is.mort = scen.ts$mort [v] + is.recr = scen.ts$recr [v] + + #----- Transform mortality data. -------------------------------------------------# + if (is.mort){ + eft[[v.vname]]$ts = 100.*(1. - exp(-eft[[v.vname]]$ts )) + if(is.pft) eft[[v.vname]]$tspft = 100.*(1. - exp(-eft[[v.vname]]$tspft )) + if(is.dbh) eft[[v.vname]]$tspftdbh = 100.*(1. - exp(-eft[[v.vname]]$tspftdbh)) + }#end if + #---------------------------------------------------------------------------------# + + + + #----- Transform recruitment data. -----------------------------------------------# + if (is.recr){ + eft[[v.vname]]$ts = 100.*(exp(eft[[v.vname]]$ts ) - 1.0) + if(is.pft) eft[[v.vname]]$tspft = 100.*(exp(eft[[v.vname]]$tspft ) - 1.0) + if(is.dbh) eft[[v.vname]]$tspftdbh = 100.*(exp(eft[[v.vname]]$tspftdbh) - 1.0) + }#end if + #---------------------------------------------------------------------------------# + }#end for (v in 1:nscen.ts) + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + + + #----- Save this variable to the global structure. ----------------------------------# + cat (" + Copying simulation to the structure...","\n") + dummy = assign(x=simul$global$level[g],value=eft) + #------------------------------------------------------------------------------------# + + + + #----- Save object simul to the R file but keep using eft. --------------------------# + cat (" + Saving the simulation output to ",basename(rdata.global),"...","\n") + save(list=simul$global$level[g],file=rdata.global) + rm (list=simul$global$level[g]) + #------------------------------------------------------------------------------------# + }#end if + #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + + + + + + + #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + # Loop over the panel combinations. # + #---------------------------------------------------------------------------------------# + for (p in loop.panel){ + #------------------------------------------------------------------------------------# + # Select the runs that belong to this panel. # + #------------------------------------------------------------------------------------# + if (simul$panel$n.level == 0){ + p.sel = rep(TRUE,times=n.gsel) + cat(" * Single panel","\n",sep="") + }else{ + p.sel = simul$panel$index[g.sel] == p + cat(" * Panel: ",p," - ",simul$panel$title[p],"\n",sep="") + }#end if + #------------------------------------------------------------------------------------# + + + + + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + # Loop over all scenarios. # + #------------------------------------------------------------------------------------# + for (s in loop.scenario){ + #---------------------------------------------------------------------------------# + # Select the runs that belong to this panel. # + #---------------------------------------------------------------------------------# + if (simul$scenario$n.level == 0){ + s.sel = rep(TRUE,times=n.gsel) + cat(" > Single scenario","\n",sep="") + }else{ + s.sel = simul$scenario$idxoff[g.sel,simul$scenario$idxcol[s]] == s + cat(" > Scenario:",simul$scenario$title[s],"\n",sep="") + }#end if + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Build the total selection, the total description, and the total suffix. # + #---------------------------------------------------------------------------------# + sel = p.sel & s.sel + if (simul$scenario$n.level == 0){ + if (simul$panel$n.level == 0){ + if (simul$global$n.level == 0){ + #----- No panels or global. Only scenarios. ----------------------------# + out.desc = NULL + out.suffix = "scencomp" + #------------------------------------------------------------------------# + }else{ + #----- Scenarios and global. --------------------------------------------# + out.desc = simul$global$title[g] + out.suffix = simul$global$level[g] + #------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------# + }else{ + if (simul$global$n.level == 0){ + #----- Scenarios and panel. ---------------------------------------------# + out.desc = simul$panel$title[p] + out.suffix = simul$panel$level[p] + #------------------------------------------------------------------------# + }else{ + #----- Scenarios, panel, and global. ------------------------------------# + out.desc = paste(simul$panel$title[p],simul$global$title[g],sep=" - ") + out.suffix = paste(simul$panel$level[p],simul$global$level[g],sep="-") + #------------------------------------------------------------------------# + }#end if (simul$global$n.level == 0) + #---------------------------------------------------------------------------# + }#end if (simul$panel$n.level == 0) + #------------------------------------------------------------------------------# + }else{ + if (simul$panel$n.level == 0){ + if (simul$global$n.level == 0){ + #----- 2-D scenarios but no panels or global variables. -----------------# + out.desc = simul$scenario$title[s] + out.suffix = simul$scenario$level[s] + #------------------------------------------------------------------------# + }else{ + #----- 2-D scenarios and global variables. ------------------------------# + out.desc = paste(simul$scenario$title[s] + ,simul$global$title [g] + ,sep=" - ") + out.suffix = paste(simul$scenario$level[s] + ,simul$global$level [g] + ,sep="-") + #------------------------------------------------------------------------# + }#end if (simul$global$n.level == 0) + #---------------------------------------------------------------------------# + }else{ + if (simul$global$n.level == 0){ + #----- 2-D scenarios and panel variables. -------------------------------# + out.desc = paste(simul$scenario$title[s] + ,simul$panel$title [p] + ,sep=" - ") + out.suffix = paste(simul$scenario$level[s] + ,simul$panel$level [p] + ,sep="-") + #------------------------------------------------------------------------# + }else{ + #----- 2-D scenarios, panel, and global variables. ----------------------# + out.desc = paste(paste(simul$scenario$title[s] + ,simul$panel$title [p] + ,sep=" - ") + ,simul$global$title [g] + ,sep="\n") + out.suffix = paste(simul$scenario$level[s] + ,simul$panel$level [p] + ,simul$global$level [g] + ,sep="-") + #------------------------------------------------------------------------# + }#end if (simul$global$n.level == 0) + #---------------------------------------------------------------------------# + }#end if (simul$panel$n.level == 0) + #------------------------------------------------------------------------------# + }#end if (simul$scenario$n.level == 0) + #---------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------# + # Find the column with the plot information. # + #---------------------------------------------------------------------------------# + if (simul$scenario$n.level == 0){ + now = scenario[[1]] + }else{ + now = scenario[-simul$scenario$idxcol[s]][[1]] + }#end if + n.now = length(now$key) + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # Find the loop for all plots. # + #---------------------------------------------------------------------------------# + if (is.na(plot.tseries)){ + loop.tseries = sequence(nscen.ts)[1] + }else if (plot.tseries){ + loop.tseries = sequence(nscen.ts) + }else{ + loop.tseries = integer(0) + }#end if + if (is.na(plot.szpft)){ + loop.szpft = sequence(nscen.szpft)[1] + }else if (plot.szpft){ + loop.szpft = sequence(nscen.szpft) + }else{ + loop.szpft = integer(0) + }#end if + if (is.na(plot.barplot)){ + loop.barplot = sequence(nscen.barplot)[1] + }else if (plot.barplot){ + loop.barplot = sequence(nscen.barplot) + }else{ + loop.barplot = integer(0) + }#end if + if (is.na(plot.xyzvars)){ + loop.x = sequence(nscen.xvar)[1] + loop.y = sequence(nscen.yvar)[1] + loop.z = sequence(nscen.zvar)[1] + }else if (plot.xyzvars){ + loop.x = sequence(nscen.xvar) + loop.y = sequence(nscen.yvar) + loop.z = sequence(nscen.zvar) + }else{ + loop.x = integer(0) + loop.y = integer(0) + loop.z = integer(0) + }#end if + #---------------------------------------------------------------------------------# + + + #.................................................................................# + #.................................................................................# + # Plot the comparison between time series, by season. # + #---------------------------------------------------------------------------------# + cat (" ~ Plotting the time series...","\n") + for (v in loop.tseries){ + #----- Copy variable info. ----------------------------------------------------# + var.vname = scen.ts$vname [v] + var.desc = scen.ts$desc [v] + var.unit = scen.ts$unit [v] + is.pft = scen.ts$pftvar[v] + var.plog = scen.ts$plog [v] + var.plt = scen.ts$plt [v] + if (var.plog){ + var.xylog = "y" + }else{ + var.xylog = "" + }#end if + #------------------------------------------------------------------------------# + + + #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# + # Decide whether to plot or not. # + #------------------------------------------------------------------------------# + if (var.plt){ + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + # Plot the variable by season. # + #---------------------------------------------------------------------------# + + + #----- Load variable. ------------------------------------------------------# + this = apply( X = eft[[var.vname]]$ts[sel,,,] + , MARGIN = c(1,3,4) + , FUN = mean + , na.rm = TRUE + )#end apply + xlimit = pretty.xylim(year.use ,fracexp=0.0,is.log=FALSE ) + ylimit = pretty.xylim(this[,,1:n.season.mp],fracexp=0.0,is.log=var.plog) + #---------------------------------------------------------------------------# + + + + #----- Set the title. ------------------------------------------------------# + letitre = paste(var.desc," (Seasonal means)","\n",out.desc,sep="") + lex = paste("Year") + ley = paste(var.desc," [",var.unit,"]",sep=" ") + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Loop over all formats. # #---------------------------------------------------------------------------# + for (o in 1:nout){ + #----- Get the path. ----------------------------------------------------# + now.outpath = outpath[[o]]$global[[g]]$scenario[[s]]$ts.season + #------------------------------------------------------------------------# + + + + #----- Open file or display. --------------------------------------------# + fichier = paste(now.outpath,"/",var.vname,"-",out.suffix,"-ts_season." + ,outform[o],sep="") + if (outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth,height=size$height*depth + ,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }#end if + #------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------# + # Split the window into several smaller windows. Add a bottom row # + # to fit the legend. # + #------------------------------------------------------------------------# + par.orig = par(no.readonly = TRUE) + mar.orig = par.orig$mar + par(oma = c(0.2,3,4.5,0)) + layout(mat = rbind(1+lo.season$mat,rep(1,times=lo.season$ncol)) + ,height = c(rep(5/lo.season$nrow,times=lo.season$nrow),1) + )#end layout + #------------------------------------------------------------------------# + + + + #----- Plot legend. -----------------------------------------------------# + par(mar=c(0.2,0.1,0.1,0.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + legend ( x = "bottom" + , inset = 0.0 + , legend = now$desc + , col = now$colour + , lwd = 2.0 + , pch = 16 + , bg = "white" + , ncol = min(3,pretty.box(n.now)$ncol) + , title = expression(bold("Simulation")) + , cex = 1.0 + )#end legend + #------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------# + # Loop over all seasons, and plot the bar plots. # + #------------------------------------------------------------------------# + for (e in 1:n.season.mp){ + #----- Find out where the box goes, and set up axes and margins. -----# + left = (e %% lo.season$ncol) == 1 + right = (e %% lo.season$ncol) == 0 + top = e <= lo.season$ncol + bottom = e > (lo.season$nrow - 1) * lo.season$ncol + mar.now = c(1 + 3*bottom,1 + 1*left,1 + 2*top,1 + 1*right) + 0.1 + #---------------------------------------------------------------------# + + + #----- Set up the title for each plot. -------------------------------# + lesub = paste(season.desc[e],sep="") + #---------------------------------------------------------------------# + + + + #----- Plot window and grid. -----------------------------------------# + par(mar=mar.now) + plot.new() + plot.window(xlim=xlimit,ylim=ylimit,xaxt="n",yaxt="n") + if (bottom) axis(side=1) + if (left ) axis(side=2) + box() + title(main=lesub) + if (plotgrid) grid(col="grey83",lty="solid") + + #----- Plot the lines. -----------------------------------------------# + for (n in 1:n.now){ + points(x=year.use,y=this[n,,e],type="o",pch=16,col=now$colour[n] + ,lwd=2.0) + }#end for + #---------------------------------------------------------------------# + }#end for (e in 1:n.season.mp) + #------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------# + # Plot the global title. # + #------------------------------------------------------------------------# + par(las=0) + mtext(text=lex ,side=1,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) + mtext(text=ley ,side=2,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) + mtext(text=letitre,side=3,outer=TRUE,cex=1.1,font=2) + #------------------------------------------------------------------------# + + + + #----- Close the device. ------------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + clean.tmp() + #------------------------------------------------------------------------# + }#end for (o in 1:nout) + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + + + + + + + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + # Now we plot the annual data. # + #---------------------------------------------------------------------------# + + + #----- Update limits. ------------------------------------------------------# + xlimit = pretty.xylim(year.use ,fracexp=0.0 ,is.log=FALSE ) + ylimit = pretty.xylim(this[,,n.season],fracexp=fracexp,is.log=var.plog) + #---------------------------------------------------------------------------# + + + + #----- Set the title. ------------------------------------------------------# + letitre = paste(var.desc," (Annual means) ","\n",out.desc,sep="") + lex = paste("Year") + ley = paste(var.desc," [",var.unit,"]",sep=" ") + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Loop over all formats. # + #---------------------------------------------------------------------------# + for (o in 1:nout){ + #----- Get the path. ----------------------------------------------------# + now.outpath = outpath[[o]]$global[[g]]$scenario[[s]]$ts.year + #------------------------------------------------------------------------# + + + #----- Open file or display. --------------------------------------------# + fichier = paste(now.outpath,"/",var.vname,"-",out.suffix,"-ts_year." + ,outform[o],sep="") + if (outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth,height=size$height*depth + ,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }#end if + #------------------------------------------------------------------------# + + + + #----- Plot window and grid. --------------------------------------------# + plot.new() + plot.window(xlim=xlimit,ylim=ylimit) + axis(side=1) + axis(side=2) + box() + title(main=letitre,xlab=lex,ylab=ley) + if (plotgrid) grid(col="grey83",lty="solid") + #------------------------------------------------------------------------# + + + + #----- Plot the lines. --------------------------------------------------# + for (n in 1:n.now){ + points(x=year.use,y=this[n,,n.season],type="o",pch=16 + ,col=now$colour[n],lwd=2.0) + }#end for + #------------------------------------------------------------------------# + + + + #---- Add the legend. ---------------------------------------------------# + legend ( x = "topright" + , inset = inset + , legend = now$desc + , col = now$colour + , lwd = 2.0 + , pch = 16 + , bg = "white" + , ncol = min(3,pretty.box(n.now)$ncol) + , title = expression(bold("Simulation")) + , cex = 1.0 + )#end legend + #------------------------------------------------------------------------# + + + + #----- Close the device. ------------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + clean.tmp() + #------------------------------------------------------------------------# + }#end for (o in 1:nout) + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + }#end if (var.plt) + #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# + + + + + + + + + #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# + # If this is a PFT variable, plot the time series by PFT and season. # + #------------------------------------------------------------------------------# + if (var.plt && is.pft){ + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + # Plot the seasonal time series for each PFT. # + #---------------------------------------------------------------------------# + for (f in 1:(n.pft-1)){ + + #----- Load variable. ---------------------------------------------------# + this = apply( X = eft[[var.vname]]$tspft[sel,,,,] + , MARGIN = c(1,3,4,5) + , FUN = mean + , na.rm = TRUE + )#end apply + xlimit = pretty.xylim(year.use + ,fracexp=0.0,is.log=FALSE ) + ylimit = pretty.xylim(this[,,1:n.season.mp,f] + ,fracexp=0.0,is.log=var.plog) + #------------------------------------------------------------------------# + + + + #----- Set the title. ---------------------------------------------------# + letitre = paste(var.desc," (Seasonal means) - ",pft.desc[f] + ,"\n",out.desc,sep="") + lex = paste("Year") + ley = paste(var.desc," [",var.unit,"]",sep=" ") + #------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------# + # Loop over all formats. # + #------------------------------------------------------------------------# + for (o in 1:nout){ + #----- Get the path. -------------------------------------------------# + now.outpath = outpath[[o]]$global[[g]]$scenario[[s]]$tspft.season[f] + #---------------------------------------------------------------------# + + + #----- Open file or display. -----------------------------------------# + fichier = paste(now.outpath,"/",var.vname,"-",pft.suffix[f],"-" + ,out.suffix,"-ts_season.",outform[o],sep="") + if (outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth + ,height=size$height*depth,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }#end if + #---------------------------------------------------------------------# + + + + #---------------------------------------------------------------------# + # Split the window into several smaller windows. Add a bottom # + # row to fit the legend. # + #---------------------------------------------------------------------# + par.orig = par(no.readonly = TRUE) + mar.orig = par.orig$mar + par(oma = c(0.2,3,4.5,0)) + layout(mat = rbind(1+lo.season$mat,rep(1,times=lo.season$ncol)) + ,height = c(rep(5/lo.season$nrow,times=lo.season$nrow),1) + )#end layout + #---------------------------------------------------------------------# + + + + #----- Plot legend. --------------------------------------------------# + par(mar=c(0.2,0.1,0.1,0.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + legend ( x = "bottom" + , inset = 0.0 + , legend = now$desc + , col = now$colour + , lwd = 2.0 + , pch = 16 + , bg = "white" + , ncol = min(3,pretty.box(n.now)$ncol) + , title = expression(bold("Simulation")) + , cex = 1.0 + )#end legend + #---------------------------------------------------------------------# + + + + #---------------------------------------------------------------------# + # Loop over all seasons, and plot the bar plots. # + #---------------------------------------------------------------------# + for (e in 1:n.season.mp){ + #------------------------------------------------------------------# + # Find out where is this box going, and set up axes and # + # margins. # + #------------------------------------------------------------------# + left = (e %% lo.season$ncol) == 1 + right = (e %% lo.season$ncol) == 0 + top = e <= lo.season$ncol + bottom = e > (lo.season$nrow - 1) * lo.season$ncol + mar.now = c(1 + 3*bottom,1 + 1*left,1 + 2*top,1 + 1*right) + 0.1 + #------------------------------------------------------------------# + + + #----- Set up the title for each plot. ----------------------------# + lesub = paste(season.desc[e],sep="") + #------------------------------------------------------------------# + + + + #----- Plot window and grid. --------------------------------------# + par(mar=mar.now) + plot.new() + plot.window(xlim=xlimit,ylim=ylimit,xaxt="n",yaxt="n") + if (bottom) axis(side=1) + if (left ) axis(side=2) + box() + title(main=lesub) + if (plotgrid) grid(col="grey83",lty="solid") + + #----- Plot the lines. --------------------------------------------# + for (n in 1:n.now){ + points(x=year.use,y=this[n,,e,f],type="o",pch=16 + ,col=now$colour[n],lwd=2.0) + }#end for + #------------------------------------------------------------------# + }#end for (e in 1:n.season.mp) + #---------------------------------------------------------------------# + + + + #---------------------------------------------------------------------# + # Plot the global title. # + #---------------------------------------------------------------------# + par(las=0) + mtext(text=lex ,side=1,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) + mtext(text=ley ,side=2,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) + mtext(text=letitre,side=3,outer=TRUE,cex=1.1,font=2) + #---------------------------------------------------------------------# + + + + #----- Close the device. ---------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + clean.tmp() + #---------------------------------------------------------------------# + }#end for (o in 1:nout) + #------------------------------------------------------------------------# + }#end for (f in 1:(n.pft-1)) + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + + + + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + # Plot the time series by PFT (annual, one panel for each PFT). # + #---------------------------------------------------------------------------# + + + #----- Reset limits. -------------------------------------------------------# + xlimit = pretty.xylim(year.use,fracexp=0.0,is.log=FALSE ) + ylimit = pretty.xylim(this[,,n.season,pft.mp],fracexp=0.0,is.log=var.plog) + #---------------------------------------------------------------------------# + + + + #----- Set the title. ------------------------------------------------------# + letitre = paste(var.desc," (Annual means)","\n",out.desc,sep="") + lex = paste("Year") + ley = paste(var.desc," [",var.unit,"]",sep=" ") + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Loop over all formats. # + #---------------------------------------------------------------------------# + for (o in 1:nout){ + #----- Get the path. ----------------------------------------------------# + now.outpath = outpath[[o]]$global[[g]]$scenario[[s]]$tspft.year + #------------------------------------------------------------------------# + + #----- Open file or display. --------------------------------------------# + fichier = paste(now.outpath,"/",var.vname,"-",out.suffix,"-tspft_year." + ,outform[o],sep="") + if (outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth,height=size$height*depth + ,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }#end if + #------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------# + # Split the window into several smaller windows. Add a bottom row # + # to fit the legend. # + #------------------------------------------------------------------------# + par.orig = par(no.readonly = TRUE) + mar.orig = par.orig$mar + par(oma = c(0.2,3,4.5,0)) + layout(mat = rbind(1+lo.pft$mat,rep(1,times=lo.pft$ncol)) + ,height = c(rep(5/lo.pft$nrow,times=lo.pft$nrow),1) + )#end layout + #------------------------------------------------------------------------# + + + + #----- Plot legend. -----------------------------------------------------# + par(mar=c(0.2,0.1,0.1,0.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + legend ( x = "bottom" + , inset = 0.0 + , legend = now$desc + , col = now$colour + , lwd = 2.0 + , pch = 16 + , bg = "white" + , ncol = min(3,pretty.box(n.now)$ncol) + , title = expression(bold("Simulation")) + , cex = 1.0 + )#end legend + #------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------# + # Loop over all seasons, and plot the bar plots. # + #------------------------------------------------------------------------# + for (f in 1:n.pft.mp){ + + #---------------------------------------------------------------------# + # Find out where is this box going, and set up axes and margins. # + #---------------------------------------------------------------------# + left = (f %% lo.pft$ncol) == 1 + right = (f %% lo.pft$ncol) == 0 + top = f <= lo.pft$ncol + bottom = f > (lo.pft$nrow - 1) * lo.pft$ncol + mar.now = c(1 + 3*bottom,1 + 1*left,1 + 2*top,1 + 1*right) + 0.1 + #---------------------------------------------------------------------# + + + #----- Set up the title for each plot. -------------------------------# + lesub = paste(pft.desc[pft.mp[f]],sep="") + #---------------------------------------------------------------------# + + + + #----- Plot window and grid. -----------------------------------------# + par(mar=mar.now) + plot.new() + plot.window(xlim=xlimit,ylim=ylimit,xaxt="n",yaxt="n") + if (bottom) axis(side=1) + if (left ) axis(side=2) + box() + title(main=lesub) + if (plotgrid) grid(col="grey83",lty="solid") + + #----- Plot the lines. -----------------------------------------------# + for (n in 1:n.now){ + points(x=year.use,y=this[n,,n.season,pft.mp[f]],type="o",pch=16 + ,col=now$colour[n],lwd=2.0) + }#end for + #---------------------------------------------------------------------# + }#end for (e in 1:n.pft) + #------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------# + # Plot the global title. # + #------------------------------------------------------------------------# + par(las=0) + mtext(text=lex ,side=1,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) + mtext(text=ley ,side=2,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) + mtext(text=letitre,side=3,outer=TRUE,cex=1.1,font=2) + #------------------------------------------------------------------------# + + + + #----- Close the device. ------------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + clean.tmp() + #------------------------------------------------------------------------# + }#end for (o in 1:nout) + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + }#end if (is.pft && var.plt) + #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# + }#end for (v in 1:nscen.ts){ + #.................................................................................# + #.................................................................................# + + + + + #.................................................................................# + #.................................................................................# + # Plot the box plots. # + #---------------------------------------------------------------------------------# + cat (" ~ Plotting the box plots...","\n") + for (v in loop.szpft){ + #----- Copy variable info. ----------------------------------------------------# + var.vname = scen.szpft$vname [v] + var.desc = scen.szpft$desc [v] + var.unit = scen.szpft$unit [v] + is.pft = scen.szpft$pftvar[v] + is.dbh = scen.szpft$dbhvar[v] + var.plog = scen.szpft$plog [v] + var.plt = scen.szpft$plt [v] + if (var.plog){ + var.xylog = "y" + }else{ + var.xylog = "" + }#end if + #------------------------------------------------------------------------------# + + + + + + + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + if (var.plt){ + #---------------------------------------------------------------------------# + # Plot the box plot by season. # + #---------------------------------------------------------------------------# + xlimit = c(0,n.now) + 0.5 + xat = sequence(n.now) + xgrid = seq(from=0.5, to=n.now + 0.5,by=1) + #---------------------------------------------------------------------------# + + + #----- Load variable and set y axis. ---------------------------------------# + if (n.real == 1){ + this = eft[[var.vname]]$ts[sel,1,,1:n.season.mp] + }else{ + this = apply( X = eft[[var.vname]]$ts[sel,,y.sel,1:n.season.mp] + , MARGIN = c(1,2,4) + , FUN = mean + , na.rm = TRUE + )#end apply + }#end if + ylimit = pretty.xylim(u=this,fracexp=0.0,is.log=var.plog) + #---------------------------------------------------------------------------# + + + + #----- Set the title. ------------------------------------------------------# + letitre = paste(var.desc," (Seasonal means)","\n",out.desc,sep="") + lex = now$alabel + ley = paste(var.desc," [",var.unit,"]",sep=" ") + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Set up the box plot colour. # + #---------------------------------------------------------------------------# + bp.colour = rep(now$colour) + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Loop over all formats. # + #---------------------------------------------------------------------------# + for (o in 1:nout){ + #----- Get the path. ----------------------------------------------------# + now.outpath = outpath[[o]]$global[[g]]$scenario[[s]]$box.season + #------------------------------------------------------------------------# + + + #----- Open file or display. --------------------------------------------# + fichier = paste(now.outpath,"/",var.vname,"-",out.suffix + ,"-boxplot_season.",outform[o],sep="") + if (outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth,height=size$height*depth + ,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }#end if + #------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------# + # Split the window into several smaller windows. Add a bottom row # + # to fit the legend. # + #------------------------------------------------------------------------# + par.orig = par(no.readonly = TRUE) + mar.orig = par.orig$mar + par(oma = c(0.2,3,4.5,0)) + layout(mat = lo.season$mat) + #------------------------------------------------------------------------# + + + + + #------------------------------------------------------------------------# + # Loop over all seasons, and plot the bar plots. # + #------------------------------------------------------------------------# + for (e in 1:n.season.mp){ + + #---------------------------------------------------------------------# + # Find out where is this box going, and set up axes and margins. # + #---------------------------------------------------------------------# + left = (e %% lo.season$ncol) == 1 + right = (e %% lo.season$ncol) == 0 + top = e <= lo.season$ncol + bottom = e > (lo.season$nrow - 1) * lo.season$ncol + mar.now = c(1 + 3*bottom,1 + 1*left,1 + 2*top,1 + 1*right) + 0.1 + #---------------------------------------------------------------------# + + + #----- Set up the title for each plot. -------------------------------# + lesub = paste(season.desc[e],sep="") + #---------------------------------------------------------------------# + + + + #----- Create the temporary box plot list. ---------------------------# + ss.this = this[,,e] + ai = arrayInd(sequence(length(ss.this)),.dim=dim(ss.this)) + bp.plot = split(x=ss.this,f=list(ai[,1])) + #---------------------------------------------------------------------# + + + + + #----- Plot window and grid. -----------------------------------------# + par(mar=mar.now) + plot.new() + plot.window(xlim=xlimit,ylim=ylimit,xaxt="n",yaxt="n") + if (bottom) axis(side=1,at=xat,labels=now$label) + if (left ) axis(side=2) + box() + title(main=lesub) + if (plotgrid) abline(v=xgrid,h=axTicks(2),col="grey40",lty="solid") + + #----- Add the box plot, without the x axis. -------------------------# + boxplot(x=bp.plot,col=bp.colour,notch=notch,add=TRUE,show.names=FALSE + ,yaxt="n") + #---------------------------------------------------------------------# + }#end for (e in 1:n.season.mp) + #------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------# + # Plot the global title. # + #------------------------------------------------------------------------# + par(las=0) + mtext(text=lex ,side=1,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff/3) + mtext(text=ley ,side=2,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) + mtext(text=letitre,side=3,outer=TRUE,cex=1.1,font=2) + #------------------------------------------------------------------------# + + + + #----- Close the device. ------------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + clean.tmp() + #------------------------------------------------------------------------# + }#end for (o in 1:nout) + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + + + + + + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + # Plot the box plot by PFT (annual means). # + #---------------------------------------------------------------------------# + xlimit = c(0,n.now) + 0.5 + xat = sequence(n.now) + xgrid = seq(from=0.5, to=n.now + 0.5,by=1) + #---------------------------------------------------------------------------# + + + #----- Load variable and set y axis. ---------------------------------------# + if (n.real == 1){ + this = eft[[var.vname]]$ts[sel,1,,n.season] + }else{ + this = apply( X = eft[[var.vname]]$ts[sel,,y.sel,n.season] + , MARGIN = c(1,2) + , FUN = mean + , na.rm = TRUE + )#end apply + }#end if + ylimit = pretty.xylim(u=this,fracexp=0.0,is.log=var.plog) + #---------------------------------------------------------------------------# + + + + + #----- Set the title. ------------------------------------------------------# + letitre = paste(var.desc," (Annual means)","\n",out.desc,sep="") + lex = now$alabel + ley = paste(var.desc," [",var.unit,"]",sep=" ") + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Set up the box plot colour. # + #---------------------------------------------------------------------------# + bp.colour = now$colour + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Loop over all formats. # + #---------------------------------------------------------------------------# + for (o in 1:nout){ + #----- Get the path. ----------------------------------------------------# + now.outpath = outpath[[o]]$global[[g]]$scenario[[s]]$box.year + #------------------------------------------------------------------------# + + #----- Open file or display. --------------------------------------------# + fichier = paste(now.outpath,"/",var.vname,"-",out.suffix + ,"-boxplot_year.",outform[o],sep="") + if (outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth,height=size$height*depth + ,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }#end if + #------------------------------------------------------------------------# + + + + #----- Create the temporary box plot list. ------------------------------# + ai = arrayInd(sequence(length(this)),.dim=dim(this)) + bp.plot = split(x=this,f=list(ai[,1])) + #------------------------------------------------------------------------# + + + + #----- Plot window and grid. --------------------------------------------# + plot.new() + plot.window(xlim=xlimit,ylim=ylimit,xaxt="n",yaxt="n") + axis(side=1,at=xat,labels=now$label) + axis(side=2) + box() + title(main=letitre,xlab=lex,ylab=ley) + if (plotgrid) abline(v=xgrid,h=axTicks(2),col="grey40",lty="solid") + #----- Add the box plot, without the x axis. ----------------------------# + boxplot(x=bp.plot,col=bp.colour,notch=notch,add=TRUE,show.names=FALSE + ,yaxt="n") + #------------------------------------------------------------------------# + + + + #----- Close the device. ------------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + clean.tmp() + #------------------------------------------------------------------------# + }#end for (o in 1:nout) + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + }#end if (var.plt) + #..............................................................................# + #..............................................................................# + + + + + + + #..............................................................................# + #..............................................................................# + if (var.plt && is.pft){ + #---------------------------------------------------------------------------# + # Plot the box plot by PFT and by season. # + #---------------------------------------------------------------------------# + xlimit = c(0,n.pft.bp*n.now) + 0.5 + xat = seq(from=1 + 0.5*(n.now-1), to=n.pft.bp*n.now, by=n.now) + xgrid = seq(from=0.5, to=(n.pft.bp+1)*n.now - 0.5*(n.now-1),by=n.now) + #---------------------------------------------------------------------------# + + + #----- Load variable and set y axis. ---------------------------------------# + if (n.real == 1){ + this = eft[[var.vname]]$tspft[sel,1,,1:n.season.mp,pft.bp] + }else{ + this = apply( X = eft[[var.vname]]$tspft[sel,,y.sel,1:n.season.mp,pft.bp] + , MARGIN = c(1,2,4,5) + , FUN = mean + , na.rm = TRUE + )#end apply + }#end if + ylimit = pretty.xylim(u=this,fracexp=0.0,is.log=var.plog) + #---------------------------------------------------------------------------# + + + + #----- Set the title. ------------------------------------------------------# + letitre = paste(var.desc," (Seasonal means)","\n",out.desc,sep="") + lex = paste("Plant functional type") + ley = paste(var.desc," [",var.unit,"]",sep=" ") + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Set up the box plot colour. # + #---------------------------------------------------------------------------# + bp.colour = rep(now$colour,times=n.pft.bp) + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Loop over all formats. # + #---------------------------------------------------------------------------# + for (o in 1:nout){ + #----- Get the path. ----------------------------------------------------# + now.outpath = outpath[[o]]$global[[g]]$scenario[[s]]$boxpft.season + #------------------------------------------------------------------------# + + + #----- Open file or display. --------------------------------------------# + fichier = paste(now.outpath,"/",var.vname,"-",out.suffix + ,"-boxplot_season.",outform[o],sep="") + if (outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth,height=size$height*depth + ,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }#end if + #------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------# + # Split the window into several smaller windows. Add a bottom row # + # to fit the legend. # + #------------------------------------------------------------------------# + par.orig = par(no.readonly = TRUE) + mar.orig = par.orig$mar + par(oma = c(0.2,3,4.5,0)) + layout(mat = rbind(1+lo.season$mat,rep(1,times=lo.season$ncol)) + ,height = c(rep(5/lo.season$nrow,times=lo.season$nrow),1) + )#end layout + #------------------------------------------------------------------------# + + + + #----- Plot legend. -----------------------------------------------------# + par(mar=c(0.2,0.1,0.1,0.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + legend ( x = "bottom" + , inset = 0.0 + , legend = now$desc + , fill = now$colour + , border = "black" + , bg = "white" + , ncol = min(3,pretty.box(n.now)$ncol) + , title = expression(bold("Simulation")) + , cex = 1.0 + )#end legend + #------------------------------------------------------------------------# + + + + + #------------------------------------------------------------------------# + # Loop over all seasons, and plot the bar plots. # + #------------------------------------------------------------------------# + for (e in 1:n.season.mp){ + + #---------------------------------------------------------------------# + # Find out where is this box going, and set up axes and margins. # + #---------------------------------------------------------------------# + left = (e %% lo.season$ncol) == 1 + right = (e %% lo.season$ncol) == 0 + top = e <= lo.season$ncol + bottom = e > (lo.season$nrow - 1) * lo.season$ncol + mar.now = c(1 + 3*bottom,1 + 1*left,1 + 2*top,1 + 1*right) + 0.1 + #---------------------------------------------------------------------# + + + #----- Set up the title for each plot. -------------------------------# + lesub = paste(season.desc[e],sep="") + #---------------------------------------------------------------------# + + + + #----- Create the temporary box plot list. ---------------------------# + ss.this = this[,,e,] + ai = arrayInd(sequence(length(ss.this)),.dim=dim(ss.this)) + bp.plot = split(x=ss.this,f=list(ai[,1],ai[,3])) + #---------------------------------------------------------------------# + + + + + #----- Plot window and grid. -----------------------------------------# + par(mar=mar.now) + plot.new() + plot.window(xlim=xlimit,ylim=ylimit,xaxt="n",yaxt="n") + if (bottom) axis(side=1,at=xat,labels=pft.key[pft.bp]) + if (left ) axis(side=2) + box() + title(main=lesub) + if (plotgrid) abline(v=xgrid,h=axTicks(2),col="grey40",lty="solid") + + #----- Add the box plot, without the x axis. -------------------------# + boxplot(x=bp.plot,col=bp.colour,notch=notch,add=TRUE,show.names=FALSE + ,yaxt="n") + #---------------------------------------------------------------------# + }#end for (e in 1:n.season.mp) + #------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------# + # Plot the global title. # + #------------------------------------------------------------------------# + par(las=0) + mtext(text=lex ,side=1,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) + mtext(text=ley ,side=2,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) + mtext(text=letitre,side=3,outer=TRUE,cex=1.1,font=2) + #------------------------------------------------------------------------# + + + + #----- Close the device. ------------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + clean.tmp() + #------------------------------------------------------------------------# + }#end for (o in 1:nout) + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + + + + + + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + # Plot the box plot by PFT (annual means). # + #---------------------------------------------------------------------------# + xlimit = c(0,n.pft.bp*n.now) + 0.5 + xat = seq(from=1 + 0.5*(n.now-1), to=n.pft.bp*n.now, by=n.now) + xgrid = seq(from=0.5, to=(n.pft.bp+1)*n.now - 0.5*(n.now-1),by=n.now) + #---------------------------------------------------------------------------# + + + #----- Load variable and set y axis. ---------------------------------------# + if (n.real == 1){ + this = eft[[var.vname]]$tspft[sel,1,,n.season,pft.bp] + }else{ + this = apply( X = eft[[var.vname]]$tspft[sel,,y.sel,n.season,pft.bp] + , MARGIN = c(1,2,4) + , FUN = mean + , na.rm = TRUE + )#end apply + }#end if + ylimit = pretty.xylim(u=this,fracexp=0.0,is.log=var.plog) + #---------------------------------------------------------------------------# + + + + + #----- Set the title. ------------------------------------------------------# + letitre = paste(var.desc," (Annual means)","\n",out.desc,sep="") + lex = paste("Plant functional type") + ley = paste(var.desc," [",var.unit,"]",sep=" ") + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Set up the box plot colour. # + #---------------------------------------------------------------------------# + bp.colour = rep(now$colour,times=n.pft.bp) + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Loop over all formats. # + #---------------------------------------------------------------------------# + for (o in 1:nout){ + #----- Get the path. ----------------------------------------------------# + now.outpath = outpath[[o]]$global[[g]]$scenario[[s]]$boxpft.year + #------------------------------------------------------------------------# + + #----- Open file or display. --------------------------------------------# + fichier = paste(now.outpath,"/",var.vname,"-",out.suffix + ,"-boxplot_year.",outform[o],sep="") + if (outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth,height=size$height*depth + ,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }#end if + #------------------------------------------------------------------------# + + + + #----- Create the temporary box plot list. ------------------------------# + ai = arrayInd(sequence(length(this)),.dim=dim(this)) + bp.plot = split(x=this,f=list(ai[,1],ai[,3])) + #------------------------------------------------------------------------# + + + #----- Split into two plots. --------------------------------------------# + layout(mat=matrix(c(2,1),nrow=2),heights=c(5,1)) + #------------------------------------------------------------------------# + + + + #----- Add the legend. --------------------------------------------------# + par(mar=c(0.2,4.1,0.1,2.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + legend ( x = "bottom" + , inset = inset + , legend = now$desc + , fill = now$colour + , border = "black" + , bg = "white" + , ncol = min(3,pretty.box(n.now)$ncol) + , title = expression(bold("Simulation")) + , cex = 1.0 + )#end legend + #------------------------------------------------------------------------# + + + + #----- Plot window and grid. --------------------------------------------# + par(mar=c(3.1,4.1,4.1,2.1)) + plot.new() + plot.window(xlim=xlimit,ylim=ylimit,xaxt="n",yaxt="n") + axis(side=1,at=xat,labels=pft.key[pft.bp]) + axis(side=2) + box() + title(main=letitre,xlab=lex,ylab=ley) + if (plotgrid) abline(v=xgrid,h=axTicks(2),col="grey40",lty="solid") + #----- Add the box plot, without the x axis. ----------------------------# + boxplot(x=bp.plot,col=bp.colour,notch=notch,add=TRUE,show.names=FALSE + ,yaxt="n") + #------------------------------------------------------------------------# + + + + #----- Close the device. ------------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + clean.tmp() + #------------------------------------------------------------------------# + }#end for (o in 1:nout) + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + }#end if (var.plt) + #..............................................................................# + #..............................................................................# + + + + + + + #..............................................................................# + #..............................................................................# + if (var.plt & is.dbh){ + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + # Plot the box plot by PFT and by season. # + #---------------------------------------------------------------------------# + xlimit = c(0,n.dbh*n.now) + 0.5 + xat = seq(from=1 + 0.5*(n.now-1), to=n.dbh*n.now, by=n.now) + xgrid = seq(from=0.5, to=(n.dbh+1)*n.now - 0.5*(n.now-1), by=n.now) + #---------------------------------------------------------------------------# + + + #----- Load variable and set y axis. ---------------------------------------# + if (n.real == 1){ + this = eft[[var.vname]]$tspftdbh[sel,1,,1:n.season.mp,,n.pft] + }else{ + this = eft[[var.vname]]$tspftdbh[sel,,y.sel,1:n.season.mp,,n.pft] + this = apply( X = this + , MARGIN = c(1,2,4,5) + , FUN = mean + , na.rm = TRUE + )#end apply + }#end if + ylimit = pretty.xylim(u=this,fracexp=0.0,is.log=var.plog) + #---------------------------------------------------------------------------# + + + + #----- Set the title. ------------------------------------------------------# + letitre = paste(var.desc," (Seasonal means) ","\n",out.desc,sep="") + lex = paste("DBH class") + ley = paste(var.desc," [",var.unit,"]",sep=" ") + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Set up the box plot colour. # + #---------------------------------------------------------------------------# + bp.colour = rep(now$colour,times=n.dbh) + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Loop over all formats. # + #---------------------------------------------------------------------------# + for (o in 1:nout){ + #----- Get the path. ----------------------------------------------------# + now.outpath = outpath[[o]]$global[[g]]$scenario[[s]]$boxdbh.season + #------------------------------------------------------------------------# + + + #----- Open file or display. --------------------------------------------# + fichier = paste(now.outpath,"/",var.vname,"-",out.suffix + ,"-boxplot_season.",outform[o],sep="") + if (outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth,height=size$height*depth + ,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }#end if + #------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------# + # Split the window into several smaller windows. Add a bottom row # + # to fit the legend. # + #------------------------------------------------------------------------# + par.orig = par(no.readonly = TRUE) + mar.orig = par.orig$mar + par(oma = c(0.2,3,4.5,0)) + layout(mat = rbind(1+lo.season$mat,rep(1,times=lo.season$ncol)) + ,height = c(rep(5/lo.season$nrow,times=lo.season$nrow),1) + )#end layout + #------------------------------------------------------------------------# + + + + #----- Plot legend. -----------------------------------------------------# + par(mar=c(0.2,0.1,0.1,0.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + legend ( x = "bottom" + , inset = 0.0 + , legend = now$desc + , fill = now$colour + , border = "black" + , bg = "white" + , ncol = min(3,pretty.box(n.now)$ncol) + , title = expression(bold("Simulation")) + , cex = 1.0 + )#end legend + #------------------------------------------------------------------------# + + + + + #------------------------------------------------------------------------# + # Loop over all seasons, and plot the bar plots. # + #------------------------------------------------------------------------# + for (e in 1:n.season.mp){ + + #---------------------------------------------------------------------# + # Find out where is this box going, and set up axes and margins. # + #---------------------------------------------------------------------# + left = (e %% lo.season$ncol) == 1 + right = (e %% lo.season$ncol) == 0 + top = e <= lo.season$ncol + bottom = e > (lo.season$nrow - 1) * lo.season$ncol + mar.now = c(1 + 3*bottom,1 + 1*left,1 + 2*top,1 + 1*right) + 0.1 + #---------------------------------------------------------------------# + + + #----- Set up the title for each plot. -------------------------------# + lesub = paste(season.desc[e],sep="") + #---------------------------------------------------------------------# + + + + #----- Create the temporary box plot list. ---------------------------# + ss.this = this[,,e,] + ai = arrayInd(sequence(length(ss.this)),.dim=dim(ss.this)) + bp.plot = split(x=ss.this,f=list(ai[,1],ai[,3])) + #---------------------------------------------------------------------# + + + + #----- Plot window and grid. -----------------------------------------# + par(mar=mar.now) + plot.new() + plot.window(xlim=xlimit,ylim=ylimit,xaxt="n",yaxt="n") + if (bottom) axis(side=1,at=xat,labels=dbh.key) + if (left ) axis(side=2) + box() + title(main=lesub) + if (plotgrid) abline(v=xgrid,h=axTicks(2),col="grey40",lty="solid") + + #----- Add the box plot, without the x axis. -------------------------# + boxplot(x=bp.plot,col=bp.colour,notch=notch,add=TRUE,show.names=FALSE + ,yaxt="n") + #---------------------------------------------------------------------# + }#end for (e in 1:n.season.mp) + #------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------# + # Plot the global title. # + #------------------------------------------------------------------------# + par(las=0) + mtext(text=lex ,side=1,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) + mtext(text=ley ,side=2,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) + mtext(text=letitre,side=3,outer=TRUE,cex=1.1,font=2) + #------------------------------------------------------------------------# + + + + #----- Close the device. ------------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + clean.tmp() + #------------------------------------------------------------------------# + }#end for (o in 1:nout) + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + + + + + + + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + # Plot the box plot by DBH (annual means). # + #---------------------------------------------------------------------------# + xlimit = c(0,n.dbh*n.now) + 0.5 + xat = seq(from=1 + 0.5*(n.now-1), to=n.dbh*n.now, by=n.now) + xgrid = seq(from=0.5, to=(n.dbh+1)*n.now - 0.5*(n.now-1), by=n.now) + #---------------------------------------------------------------------------# + + + #----- Load variable and set y axis. ---------------------------------------# + if (n.real == 1){ + this = eft[[var.vname]]$tspftdbh[sel,1,,n.season,,n.pft] + }else{ + this = eft[[var.vname]]$tspftdbh[sel,,y.sel,n.season,,n.pft] + this = apply( X = this + , MARGIN = c(1,2,4) + , FUN = mean + , na.rm = TRUE + )#end apply + }#end if + ylimit = pretty.xylim(u=this,fracexp=0.0,is.log=var.plog) + #---------------------------------------------------------------------------# + + + + #----- Set the title. ------------------------------------------------------# + letitre = paste(var.desc," (Annual means)","\n",out.desc,sep="") + lex = paste("DBH class") + ley = paste(var.desc," [",var.unit,"]",sep=" ") + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Set up the box plot colour. # + #---------------------------------------------------------------------------# + bp.colour = rep(now$colour,times=n.dbh) + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Loop over all formats. # + #---------------------------------------------------------------------------# + for (o in 1:nout){ + #----- Get the path. ----------------------------------------------------# + now.outpath = outpath[[o]]$global[[g]]$scenario[[s]]$boxdbh.year + #------------------------------------------------------------------------# + + + #----- Open file or display. --------------------------------------------# + fichier = paste(now.outpath,"/",var.vname,"-",out.suffix,"-boxplot_year." + ,outform[o],sep="") + if (outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth,height=size$height*depth + ,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }#end if + #------------------------------------------------------------------------# + + + + #----- Create the temporary box plot list. ------------------------------# + ai = arrayInd(sequence(length(this)),.dim=dim(this)) + bp.plot = split(x=this,f=list(ai[,1],ai[,3])) + #------------------------------------------------------------------------# + + + #----- Split into two plots. --------------------------------------------# + layout(mat=matrix(c(2,1),nrow=2),heights=c(5,1)) + #------------------------------------------------------------------------# + + + + #----- Add the legend. --------------------------------------------------# + par(mar=c(0.2,4.1,0.1,2.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + legend ( x = "bottom" + , inset = inset + , legend = now$desc + , fill = now$colour + , border = "black" + , bg = "white" + , ncol = min(3,pretty.box(n.now)$ncol) + , title = expression(bold("Simulation")) + , cex = 1.0 + )#end legend + #------------------------------------------------------------------------# + + + + #----- Plot window and grid. --------------------------------------------# + par(mar=c(3.1,4.1,4.1,2.1)) + plot.new() + plot.window(xlim=xlimit,ylim=ylimit,xaxt="n",yaxt="n") + axis(side=1,at=xat,labels=dbh.key) + axis(side=2) + box() + title(main=letitre,xlab=lex,ylab=ley) + if (plotgrid) abline(v=xgrid,h=axTicks(2),col="grey40",lty="solid") + + #----- Add the box plot, without the x axis. ----------------------------# + boxplot(x=bp.plot,col=bp.colour,notch=notch,add=TRUE,show.names=FALSE + ,yaxt="n") + #------------------------------------------------------------------------# + + + + #----- Close the device. ------------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + clean.tmp() + #------------------------------------------------------------------------# + }#end for (o in 1:nout) + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + }#end if (var.plt & is.dbh) + #..............................................................................# + #..............................................................................# + + + + + + + #..............................................................................# + #..............................................................................# + # Boxplots by PFT, DBH, and season... # + #------------------------------------------------------------------------------# + if (var.plt & is.dbh){ + #---------------------------------------------------------------------------# + # Loop over each season. # + #---------------------------------------------------------------------------# + for (e in 1:n.season){ + + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + # Plot the box plot by PFT and by season. # + #------------------------------------------------------------------------# + xlimit = c(0,n.pft.bp*n.now) + 0.5 + xat = seq(from=1 + 0.5*(n.now-1), to=n.pft.bp*n.now, by=n.now) + xgrid = seq(from=0.5,to=(n.pft.bp+1)*n.now-0.5*(n.now-1),by=n.now) + #------------------------------------------------------------------------# + + + + #----- Load variable and set y axis. ------------------------------------# + if (n.real == 1){ + this = eft[[var.vname]]$tspftdbh[sel,1,,e,,pft.mp] + }else{ + this = eft[[var.vname]]$tspftdbh[sel,,y.sel,e,,pft.mp] + this = apply( X = this + , MARGIN = c(1,2,4,5) + , FUN = mean + , na.rm = TRUE + )#end apply + }#end if + ylimit = pretty.xylim(u=this,fracexp=0.0,is.log=var.plog) + #------------------------------------------------------------------------# + + + + #----- Set the title. ---------------------------------------------------# + letitre = paste(var.desc," - ","Season: ",season.desc[e] + ,"\n",out.desc,sep="") + lex = paste("DBH Class [cm]") + ley = paste(var.desc," [",var.unit,"]",sep=" ") + #------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------# + # Set up the box plot colour. # + #------------------------------------------------------------------------# + bp.colour = rep(now$colour,times=n.dbh) + #------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------# + # Loop over all formats. # + #------------------------------------------------------------------------# + for (o in 1:nout){ + #----- Get the path. -------------------------------------------------# + now.outpath = outpath[[o]]$global[[g]]$scenario[[s]]$boxpftdbh + #---------------------------------------------------------------------# + + + #----- Open file or display. -----------------------------------------# + fichier = paste(now.outpath,"/",var.vname,"-",season.suffix,"-" + ,out.suffix,"-boxplot.",outform[o],sep="") + if (outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth + ,height=size$height*depth,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }#end if + #---------------------------------------------------------------------# + + + + #---------------------------------------------------------------------# + # Split the window into several smaller windows. Add a bottom # + # row to fit the legend. # + #---------------------------------------------------------------------# + par.orig = par(no.readonly = TRUE) + mar.orig = par.orig$mar + par(oma = c(0.2,3,4.5,0)) + layout(mat = rbind(1+lo.pft$mat,rep(1,times=lo.pft$ncol)) + ,height = c(rep(5/lo.pft$nrow,times=lo.pft$nrow),1) + )#end layout + #---------------------------------------------------------------------# + + + + #----- Plot legend. --------------------------------------------------# + par(mar=c(0.2,0.1,0.1,0.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + legend ( x = "bottom" + , inset = 0.0 + , legend = now$desc + , fill = now$colour + , border = "black" + , bg = "white" + , ncol = min(3,pretty.box(n.now)$ncol) + , title = expression(bold("Simulation")) + , cex = 1.0 + )#end legend + #---------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------# + # Loop over all seasons, and plot the bar plots. # + #---------------------------------------------------------------------# + for (f in 1:n.pft.mp){ + #------------------------------------------------------------------# + # Find out where is this box going, and set up axes and # + # margins. # + #------------------------------------------------------------------# + left = (f %% lo.pft$ncol) == 1 + right = (f %% lo.pft$ncol) == 0 + top = f <= lo.pft$ncol + bottom = f > (lo.pft$nrow - 1) * lo.pft$ncol + mar.now = c(1 + 3*bottom,1 + 1*left,1 + 2*top,1 + 1*right) + 0.1 + #------------------------------------------------------------------# + + + #----- Set up the title for each plot. ----------------------------# + lesub = paste(pft.desc[pft.mp[f]],sep="") + #------------------------------------------------------------------# + + + + #----- Create the temporary box plot list. ------------------------# + ss.this = this[,,,f] + ai = arrayInd(sequence(length(ss.this)),.dim=dim(ss.this)) + bp.plot = split(x=ss.this,f=list(ai[,1],ai[,3])) + #------------------------------------------------------------------# + + + + #----- Plot window and grid. --------------------------------------# + par(mar=mar.now) + plot.new() + plot.window(xlim=xlimit,ylim=ylimit,xaxt="n",yaxt="n") + if (bottom) axis(side=1,at=xat,labels=dbh.key) + if (left ) axis(side=2) + box() + title(main=lesub) + if (plotgrid) abline(v=xgrid,h=axTicks(2),col="grey40",lty="solid") + + #----- Add the box plot, without the x axis. ----------------------# + boxplot(x=bp.plot,col=bp.colour,notch=notch,add=TRUE + ,show.names=FALSE,yaxt="n") + #------------------------------------------------------------------# + }#end for (f in 1:n.pft.mp) + #---------------------------------------------------------------------# + + + + #---------------------------------------------------------------------# + # Plot the global title. # + #---------------------------------------------------------------------# + par(las=0) + mtext(text=lex ,side=1,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) + mtext(text=ley ,side=2,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) + mtext(text=letitre,side=3,outer=TRUE,cex=1.1,font=2) + #---------------------------------------------------------------------# + + + + #----- Close the device. ---------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + clean.tmp() + #---------------------------------------------------------------------# + }#end for (o in 1:nout) + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + }#end for (e in 1:n.season) + #---------------------------------------------------------------------------# + }#end if (var.plt && is.dbh) + #------------------------------------------------------------------------------# + }#end for + #=================================================================================# + #=================================================================================# + #.................................................................................# + #.................................................................................# + + + + + + + #.................................................................................# + #.................................................................................# + # Plot the bar plots. # + #---------------------------------------------------------------------------------# + cat (" ~ Plotting the bar plots...","\n") + for (v in loop.barplot){ + #----- Copy variable info. ----------------------------------------------------# + var.vname = scen.barplot$vname [v] + var.desc = scen.barplot$desc [v] + var.unit = scen.barplot$unit [v] + is.pft = scen.barplot$pftvar[v] + is.dbh = scen.barplot$dbhvar[v] + var.plog = scen.barplot$plog [v] + var.plt = scen.barplot$plt [v] + if (var.plog){ + var.xylog = "y" + }else{ + var.xylog = "" + }#end if + #------------------------------------------------------------------------------# + + + if (var.plt){ + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + # Plot the bar plot by PFT, DBH class, and season. # + #---------------------------------------------------------------------------# + + + #----- Load variable and set y axis. ---------------------------------------# + if (n.real == 1){ + this.5d = eft[[var.vname]]$tspftdbh[sel,1,,1:n.season.mp,,pft.bp] + dimnames(this.5d)[[1]] = now$key + this = apply(X=this.5d,MARGIN=c(1,3,4,5),FUN=mean,na.rm=TRUE) + }else{ + this.6d = eft[[var.vname]]$tspftdbh[sel,,y.sel,1:n.season.mp,,pft.bp] + dimnames(this.6d)[[1]] = now$key + this = apply(X=this.6d,MARGIN=c(1,4,5,6),FUN=mean,na.rm=TRUE) + }#end if + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Stack the PFT data. # + #---------------------------------------------------------------------------# + this = apply(X=this,MARGIN=c(1,2,3),FUN=cumsum) + this = aperm(a=this,perm=c(2,4,1,3)) + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Combine simulation and size into one dimension. # + #---------------------------------------------------------------------------# + dth = dim(this) + dnth = list( paste(rep(dimnames(this)[[1]],times=dth[2]) + ,rep(dimnames(this)[[2]],each =dth[1]) + ,sep=".") + , dimnames(this)[[3]] + , dimnames(this)[[4]] + )#end list + this = array(data= this,dim=c(dth[1]*dth[2],dth[3],dth[4]),dimnames=dnth) + #---------------------------------------------------------------------------# + + + #----- Set the title. ------------------------------------------------------# + letitre = paste(var.desc," (Seasonal means)","\n",out.desc,sep="") + lex = paste("DBH class [cm]") + ley = paste(var.desc," [",var.unit,"]",sep=" ") + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Find the x dimensions. # + #---------------------------------------------------------------------------# + xleft = ( rep(sequence(n.now),times=n.dbh) + + rep((n.now+1)*(sequence(n.dbh)-1),each=n.now) ) - 0.9 + xright = xleft + 0.8 + xat = seq(from=0.5*n.now,by=n.now+1,length.out=n.dbh) + xgrid = seq(from=0,by=n.now+1,length.out=n.dbh+1)-0.5 + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Find out the colour filling. # + #---------------------------------------------------------------------------# + fill.col = array( data = rep(pft.colour[pft.bp],each=dim(this)[1]) + , dim = dim(this)[1:2] + , dimnames = dimnames(this)[1:2] + )#end array + refer.col = array( data = rep(now$colour,times=dim(this)[2]) + , dim = dim(this)[1:2] + , dimnames = dimnames(this)[1:2] + )#end array + xleft = array( data = xleft + , dim = dim(this)[1:2] + , dimnames = dimnames(this)[1:2] + )#end array + xright = array( data = xright + , dim = dim(this)[1:2] + , dimnames = dimnames(this)[1:2] + )#end array + #------- Fix the y for stacked. --------------------------------------------# + ybottom = this + ybottom[,-1,] = ybottom[,-dim(ybottom)[2],] + ybottom[ ,1,] = 0 + ytop = this + #---------------------------------------------------------------------------# + + + + + #----- Find the limits for the plot. ---------------------------------------# + xlimit = range(c(xat,xgrid)) + yrange = pretty.xylim(u=this,fracexp= 0.00,is.log=var.plog) + ylimit = pretty.xylim(u=this,fracexp=-0.06,is.log=var.plog) + #---------------------------------------------------------------------------# + + + + #------- Fix the y for stacked. --------------------------------------------# + lbottom = yrange[1] - 0.06 * diff(yrange) + 0 * ybottom + ltop = yrange[1] - 0.02 * diff(yrange) + 0 * ybottom + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Loop over all formats. # + #---------------------------------------------------------------------------# + for (o in 1:nout){ + #----- Get the path. ----------------------------------------------------# + now.outpath = outpath[[o]]$global[[g]]$scenario[[s]]$barplot.season + #------------------------------------------------------------------------# + + + #----- Open file or display. --------------------------------------------# + fichier = paste(now.outpath,"/",var.vname,"-",out.suffix + ,"-barplot_season.",outform[o],sep="") + if (outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth,height=size$height*depth + ,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }#end if + #------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------# + # Split the window into several smaller windows. Add a bottom row # + # to fit the legend. # + #------------------------------------------------------------------------# + par.orig = par(no.readonly = TRUE) + mar.orig = par.orig$mar + par(oma = c(0.2,3,4.5,0)) + + emat = matrix( data = c( rep(2+t(lo.season$mat),each=2) + , rep(1,times=lo.season$ncol) + , rep(2,times=lo.season$ncol) + )#end c + , ncol = 2*lo.season$ncol + , nrow = 1+lo.season$nrow + , byrow = TRUE + )#end matrix + + layout(mat = emat + ,heights = c(rep(5/lo.season$nrow,times=lo.season$nrow),1) + )#end layout + #------------------------------------------------------------------------# - #----- Plot legend. --------------------------------------------------------# - par(mar=c(0.1,0.1,0.1,0.1)) - plot.new() - plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") - legend ( x = "bottom" - , inset = 0.0 - , legend = simul$desc - , col = simul$colour - , lwd = 2.0 - , pch = 16 - , bg = "white" - , ncol = min(3,pretty.box(n.simul)$ncol) - , title = expression(bold("Simulation")) - , cex = 1.0 - )#end legend - #---------------------------------------------------------------------------# + #----- Plot simulation legend. ------------------------------------------# + par(mar=c(0.2,0.1,0.1,0.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + legend ( x = "bottom" + , inset = 0.0 + , legend = now$desc + , fill = now$colour + , bg = "white" + , ncol = min(3,pretty.box(n.now)$ncol) + , title = expression(bold("Simulation")) + , cex = 1.0 + )#end legend + #------------------------------------------------------------------------# - #---------------------------------------------------------------------------# - # Loop over all seasons, and plot the bar plots. # - #---------------------------------------------------------------------------# - for (e in 1:n.season.mp){ - #----- Find out where is this box going, and set up axes and margins. ---# - left = (e %% lo.season$ncol) == 1 - right = (e %% lo.season$ncol) == 0 - top = e <= lo.season$ncol - bottom = e > (lo.season$nrow - 1) * lo.season$ncol - mar.now = c(1 + 3 * bottom,1 + 1 * left,1 + 2 * top,1 + 1 * right) + 0.1 + #----- Plot PFT legend. -------------------------------------------------# + par(mar=c(0.2,0.1,0.1,0.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + legend ( x = "bottom" + , inset = 0.0 + , legend = pft.desc [pft.bp] + , fill = pft.colour[pft.bp] + , border = "black" + , bg = "white" + , ncol = min(2,pretty.box(n.pft.bp)$ncol) + , title = expression(bold("Plant Functional Type")) + , cex = 1.0 + )#end legend #------------------------------------------------------------------------# - #----- Set up the title for each plot. ----------------------------------# - lesub = paste(season.desc[e],sep="") + + + #------------------------------------------------------------------------# + # Loop over all seasons, and plot the bar plots. # + #------------------------------------------------------------------------# + for (e in 1:n.season.mp){ + + #---------------------------------------------------------------------# + # Find out where is this box going, and set up axes and margins. # + #---------------------------------------------------------------------# + left = (e %% lo.season$ncol) == 1 + right = (e %% lo.season$ncol) == 0 + top = e <= lo.season$ncol + bottom = e > (lo.season$nrow - 1) * lo.season$ncol + mar.now = c(1 + 3*bottom,1 + 1*left,1 + 2*top,1 + 1*right) + 0.1 + #---------------------------------------------------------------------# + + + #----- Set up the title for each plot. -------------------------------# + lesub = paste(season.desc[e],sep="") + #---------------------------------------------------------------------# + + + + #----- Plot window and grid. -----------------------------------------# + par(mar=mar.now) + plot.new() + plot.window(xlim=xlimit,ylim=ylimit,xaxt="n",yaxt="n") + if (bottom) axis(side=1,at=xat,labels=dbh.key) + if (left ) axis(side=2) + box() + title(main=lesub) + if (plotgrid) abline(v=xgrid,h=axTicks(2),col="grey40",lty="solid") + #---------------------------------------------------------------------# + + + + #----- Add the bar plot using rect, so we can change the line width. -# + rect( xleft = xleft + , ybottom = ybottom [,,e] + , xright = xright + , ytop = ytop [,,e] + , density = -1 + , col = fill.col + , border = "black" + , lwd = barplot.lwd + )#end rect + #---------------------------------------------------------------------# + + + + #----- Add the simulation colour beneath the bar plot. ---------------# + rect( xleft = xleft + , ybottom = lbottom [,,e] + , xright = xright + , ytop = ltop [,,e] + , density = -1 + , col = refer.col + , border = refer.col + , lwd = barplot.lwd + )#end rect + #---------------------------------------------------------------------# + }#end for (e in 1:n.season.mp) #------------------------------------------------------------------------# - #----- Plot window and grid. --------------------------------------------# - par(mar=mar.now) - plot.new() - plot.window(xlim=xlimit,ylim=ylimit,xaxt="n",yaxt="n") - if (bottom) axis(side=1) - if (left ) axis(side=2) - box() - title(main=lesub) - if (plotgrid) grid(col="grey83",lty="solid") + #------------------------------------------------------------------------# + # Plot the global title. # + #------------------------------------------------------------------------# + par(las=0) + mtext(text=lex ,side=1,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) + mtext(text=ley ,side=2,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) + mtext(text=letitre,side=3,outer=TRUE,cex=1.1,font=2) + #------------------------------------------------------------------------# - #----- Plot the lines. --------------------------------------------------# - for (s in 1:n.simul){ - points(x=year.use,y=this[,e,f,s],type="o",pch=16,col=simul$colour[s] - ,lwd=2.0) - }#end for + + + #----- Close the device. ------------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + clean.tmp() #------------------------------------------------------------------------# - }#end for (e in 1:n.season.mp) - #---------------------------------------------------------------------------# + }#end for (o in 1:nout) + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# - #---------------------------------------------------------------------------# - # Plot the global title. # - #---------------------------------------------------------------------------# - par(las=0) - mtext(text=lex ,side=1,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) - mtext(text=ley ,side=2,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) - mtext(text=letitre,side=3,outer=TRUE,cex=1.1,font=2) - #---------------------------------------------------------------------------# + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + # Plot the bar plot by PFT, DBH class, using annual means. # + #---------------------------------------------------------------------------# - #----- Close the device. ---------------------------------------------------# - if (outform[o] == "x11"){ - locator(n=1) - dev.off() + + #----- Load variable and set y axis. ---------------------------------------# + if (n.real == 1){ + this.4d = eft[[var.vname]]$tspftdbh[sel,1,,n.season,,pft.bp] + dimnames(this.4d)[[1]] = now$key + this = apply(X=this.4d,MARGIN=c(1,3,4),FUN=mean,na.rm=TRUE) }else{ - dev.off() + this.5d = eft[[var.vname]]$tspftdbh[sel,,y.sel,n.season,,pft.bp] + dimnames(this.5d)[[1]] = now$key + this = apply(X=this.5d,MARGIN=c(1,4,5),FUN=mean,na.rm=TRUE) }#end if #---------------------------------------------------------------------------# - }#end for (o in 1:nout) - #------------------------------------------------------------------------------# - }#end for (f in 1:(n.pft-1)) - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# - # Plot the time series by PFT (annual, one panel for each PFT). # - #---------------------------------------------------------------------------------# + #---------------------------------------------------------------------------# + # Stack the PFT data. # + #---------------------------------------------------------------------------# + this = apply(X=this,MARGIN=c(1,2),FUN=cumsum) + this = aperm(a=this,perm=c(2,3,1)) + #---------------------------------------------------------------------------# - #----- Reset limits. -------------------------------------------------------------# - this = eft[[var.vname]]$tspft - xlimit = pretty.xylim(year.use ,fracexp=0.0,is.log=FALSE ) - ylimit = pretty.xylim(this[,n.season,pft.mp,],fracexp=0.0,is.log=var.plog) - #---------------------------------------------------------------------------------# + #---------------------------------------------------------------------------# + # Combine simulation and size into one dimension. # + #---------------------------------------------------------------------------# + dth = dim(this) + dnth = list( paste(rep(dimnames(this)[[1]],times=dth[2]) + ,rep(dimnames(this)[[2]],each =dth[1]) + ,sep=".") + , dimnames(this)[[3]] + )#end list + this = array(data= this,dim=c(dth[1]*dth[2],dth[3]),dimnames=dnth) + #---------------------------------------------------------------------------# - #----- Set the title. ------------------------------------------------------------# - letitre = paste(var.desc," (Annual means) - ",longname,sep="") - lex = paste("Year") - ley = paste(var.desc," [",var.unit,"]",sep=" ") - #---------------------------------------------------------------------------------# + #----- Set the title. ------------------------------------------------------# + letitre = paste(var.desc," (Annual means)","\n",out.desc,sep="") + lex = paste("DBH class [cm]") + ley = paste(var.desc," [",var.unit,"]",sep=" ") + #---------------------------------------------------------------------------# - #---------------------------------------------------------------------------------# - # Loop over all formats. # - #---------------------------------------------------------------------------------# - for (o in 1:nout){ - #----- Open file or display. --------------------------------------------------# - fichier = paste(out.tspft.year[v],"/",var.vname,"-",iata,"-tspft_year." - ,outform[o],sep="") - if (outform[o] == "x11"){ - X11(width=size$width,height=size$height,pointsize=ptsz) - }else if(outform[o] == "png"){ - png(filename=fichier,width=size$width*depth,height=size$height*depth - ,pointsize=ptsz,res=depth) - }else if(outform[o] == "eps"){ - postscript(file=fichier,width=size$width,height=size$height,pointsize=ptsz - ,paper=size$paper) - }else if(outform[o] == "pdf"){ - pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height - ,pointsize=ptsz,paper=size$paper) - }#end if - #------------------------------------------------------------------------------# + #---------------------------------------------------------------------------# + # Find the x dimensions. # + #---------------------------------------------------------------------------# + xleft = ( rep(sequence(n.now),times=n.dbh) + + rep((n.now+1)*(sequence(n.dbh)-1),each=n.now) ) - 0.9 + xright = xleft + 0.8 + xat = seq(from=0.5*n.now,by=n.now+1,length.out=n.dbh) + xgrid = seq(from=0,by=n.now+1,length.out=n.dbh+1)-0.5 + #---------------------------------------------------------------------------# - #------------------------------------------------------------------------------# - # Split the window into several smaller windows. Add a bottom row to fit # - # the legend. # - #------------------------------------------------------------------------------# - par.orig = par(no.readonly = TRUE) - mar.orig = par.orig$mar - par(oma = c(0.2,3,4,0)) - layout(mat = rbind(1+lo.pft$mat,rep(1,times=lo.pft$ncol)) - ,height = c(rep(5/lo.pft$nrow,times=lo.pft$nrow),1) - )#end layout - #------------------------------------------------------------------------------# + #---------------------------------------------------------------------------# + # Find out the colour filling. # + #---------------------------------------------------------------------------# + fill.col = array( data = rep(pft.colour[pft.bp],each=dim(this)[1]) + , dim = dim(this)[1:2] + , dimnames = dimnames(this)[1:2] + )#end array + refer.col = array( data = rep(now$colour,times=dim(this)[2]) + , dim = dim(this)[1:2] + , dimnames = dimnames(this)[1:2] + )#end array + xleft = array( data = xleft + , dim = dim(this)[1:2] + , dimnames = dimnames(this)[1:2] + )#end array + xright = array( data = xright + , dim = dim(this)[1:2] + , dimnames = dimnames(this)[1:2] + )#end array + #----- Vertical. Force the bottom to be zero. ------------------------------# + ybottom = this + ybottom[,-1] = ybottom[,-dim(ybottom)[2]] + ybottom[, 1] = 0 + ytop = this + #---------------------------------------------------------------------------# - #----- Plot legend. -----------------------------------------------------------# - par(mar=c(0.1,0.1,0.1,0.1)) - plot.new() - plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") - legend ( x = "bottom" - , inset = 0.0 - , legend = simul$desc - , col = simul$colour - , lwd = 2.0 - , pch = 16 - , bg = "white" - , ncol = min(3,pretty.box(n.simul)$ncol) - , title = expression(bold("Simulation")) - , cex = 1.0 - )#end legend - #------------------------------------------------------------------------------# + #----- Find the limits for the plot. ---------------------------------------# + xlimit = range(c(xat,xgrid)) + yrange = pretty.xylim(u=this,fracexp= 0.00,is.log=var.plog) + ylimit = pretty.xylim(u=this,fracexp=-0.06,is.log=var.plog) + #---------------------------------------------------------------------------# - #------------------------------------------------------------------------------# - # Loop over all seasons, and plot the bar plots. # - #------------------------------------------------------------------------------# - for (f in 1:n.pft.mp){ - #----- Find out where is this box going, and set up axes and margins. ------# - left = (f %% lo.pft$ncol) == 1 - right = (f %% lo.pft$ncol) == 0 - top = f <= lo.pft$ncol - bottom = f > (lo.pft$nrow - 1) * lo.pft$ncol - mar.now = c(1 + 3 * bottom,1 + 1 * left,1 + 2 * top,1 + 1 * right) + 0.1 + #------- Fix the y for stacked. --------------------------------------------# + lbottom = yrange[1] - 0.06 * diff(yrange) + 0 * ybottom + ltop = yrange[1] - 0.02 * diff(yrange) + 0 * ybottom #---------------------------------------------------------------------------# - #----- Set up the title for each plot. -------------------------------------# - lesub = paste(pft.desc[pft.mp[f]],sep="") - #---------------------------------------------------------------------------# + #---------------------------------------------------------------------------# + # Loop over all formats. # + #---------------------------------------------------------------------------# + for (o in 1:nout){ + #----- Get the path. ----------------------------------------------------# + now.outpath = outpath[[o]]$global[[g]]$scenario[[s]]$barplot.year + #------------------------------------------------------------------------# - #----- Plot window and grid. -----------------------------------------------# - par(mar=mar.now) - plot.new() - plot.window(xlim=xlimit,ylim=ylimit,xaxt="n",yaxt="n") - if (bottom) axis(side=1) - if (left ) axis(side=2) - box() - title(main=lesub) - if (plotgrid) grid(col="grey83",lty="solid") + #----- Open file or display. --------------------------------------------# + fichier = paste(now.outpath,"/",var.vname,"-",out.suffix + ,"-barplot_year.",outform[o],sep="") + if (outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth,height=size$height*depth + ,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }#end if + #------------------------------------------------------------------------# - #----- Plot the lines. -----------------------------------------------------# - for (s in 1:n.simul){ - points(x=year.use,y=this[,n.season,pft.mp[f],s],type="o",pch=16 - ,col=simul$colour[s],lwd=2.0) - }#end for - #---------------------------------------------------------------------------# - }#end for (e in 1:n.pft) - #------------------------------------------------------------------------------# + #------------------------------------------------------------------------# + # Split the window into several smaller windows. Add a bottom row # + # to fit the legend. # + #------------------------------------------------------------------------# + par.orig = par(no.readonly = TRUE) + emat = matrix(c(3,3,1,2),ncol=2,nrow=2,byrow=T) + layout(mat=emat,heights=c(5,1)) + #------------------------------------------------------------------------# - #------------------------------------------------------------------------------# - # Plot the global title. # - #------------------------------------------------------------------------------# - par(las=0) - mtext(text=lex ,side=1,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) - mtext(text=ley ,side=2,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) - mtext(text=letitre,side=3,outer=TRUE,cex=1.1,font=2) - #------------------------------------------------------------------------------# + #----- Plot simulation legend. ------------------------------------------# + par(mar=c(0.2,4.1,0.1,0.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + legend ( x = "bottom" + , inset = 0.0 + , legend = now$desc + , fill = now$colour + , bg = "white" + , ncol = min(3,pretty.box(n.now)$ncol) + , title = expression(bold("Simulation")) + , cex = 1.0 + )#end legend + #------------------------------------------------------------------------# - #----- Close the device. ------------------------------------------------------# - if (outform[o] == "x11"){ - locator(n=1) - dev.off() - }else{ - dev.off() - }#end if - #------------------------------------------------------------------------------# - }#end for (o in 1:nout) - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# - }#end if (is.pft && var.plt) - #------------------------------------------------------------------------------------# - }#end for (v in 1:nscen.ts) - #=======================================================================================# - #=======================================================================================# + #----- Plot PFT legend. -------------------------------------------------# + par(mar=c(0.2,0.1,0.1,2.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + legend ( x = "bottom" + , inset = 0.0 + , legend = pft.desc [pft.bp] + , fill = pft.colour[pft.bp] + , border = "black" + , bg = "white" + , ncol = min(3,pretty.box(n.pft.bp)$ncol) + , title = expression(bold("Plant Functional Type")) + , cex = 1.0 + )#end legend + #------------------------------------------------------------------------# + #----- Plot window and grid. --------------------------------------------# + par(mar=mar.orig) + plot.new() + plot.window(xlim=xlimit,ylim=ylimit,xaxt="n",yaxt="n") + axis(side=1,at=xat,labels=dbh.key) + axis(side=2) + box() + title(main=letitre,xlab=lex,ylab=ley) + if (plotgrid) abline(v=xgrid,h=axTicks(2),col="grey40",lty="solid") + #------------------------------------------------------------------------# - #=======================================================================================# - #=======================================================================================# - # Plot the box plots. # - #---------------------------------------------------------------------------------------# - cat (" - Plotting the box plots...","\n") - for (v in 1:nscen.szpft){ - #----- Copy variable info. ----------------------------------------------------------# - var.vname = scen.szpft$vname [v] - var.desc = scen.szpft$desc [v] - var.unit = scen.szpft$unit [v] - is.pft = scen.szpft$pftvar[v] - is.dbh = scen.szpft$dbhvar[v] - var.plog = scen.szpft$plog [v] - var.plt = scen.szpft$plt [v] - if (var.plog){ - var.xylog = "y" - }else{ - var.xylog = "" - }#end if - #------------------------------------------------------------------------------------# + #----- Add the bar plot using rect, so we can change the line width. ----# + rect( xleft = xleft + , ybottom = ybottom + , xright = xright + , ytop = ytop + , density = -1 + , col = fill.col + , border = "black" + , lwd = barplot.lwd + )#end rect + #------------------------------------------------------------------------# - if (var.plt){ - cat (" - ",var.desc,"...","\n") - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# - # Plot the box plot by PFT and by season. # - #---------------------------------------------------------------------------------# - xlimit = c(0,n.pft.bp*n.simul) + 0.5 - xat = seq(from=1 + 0.5*(n.simul-1), to=n.pft.bp*n.simul, by=n.simul) - xgrid = seq(from=0.5, to=(n.pft.bp+1)*n.simul - 0.5*(n.simul-1), by=n.simul) - #---------------------------------------------------------------------------------# + #----- Add the simulation colour beneath the bars. ----------------------# + rect( xleft = xleft + , ybottom = lbottom + , xright = xright + , ytop = ltop + , density = -1 + , col = refer.col + , border = refer.col + , lwd = barplot.lwd + )#end rect + #------------------------------------------------------------------------# - #----- Load variable and set y axis. ---------------------------------------------# - this = eft[[var.vname]]$tspft[,1:n.season.mp,pft.bp,] - ylimit = pretty.xylim(u=this,fracexp=0.0,is.log=var.plog) - #---------------------------------------------------------------------------------# + #----- Close the device. ------------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + clean.tmp() + #------------------------------------------------------------------------# + }#end for (o in 1:nout) + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + }#end if (var.plt) + #------------------------------------------------------------------------------# + }#end for (v in 1:nscen.barplot) + #.................................................................................# + #.................................................................................# - #----- Set the title. ------------------------------------------------------------# - letitre = paste(var.desc," (Seasonal means) - ",longname,sep="") - lex = paste("Plant functional type") - ley = paste(var.desc," [",var.unit,"]",sep=" ") - #---------------------------------------------------------------------------------# - #---------------------------------------------------------------------------------# - # Set up the box plot colour. # - #---------------------------------------------------------------------------------# - bp.colour = rep(simul$colour,times=n.pft.bp) - #---------------------------------------------------------------------------------# + #.................................................................................# + #.................................................................................# + # Plot the parameter space. # #---------------------------------------------------------------------------------# - # Loop over all formats. # + cat (" ~ Plotting the parameter space...","\n") #---------------------------------------------------------------------------------# - for (o in 1:nout){ - #----- Open file or display. --------------------------------------------------# - fichier = paste(out.boxpft.season[v],"/",var.vname,"-",iata,"-boxplot_season." - ,outform[o],sep="") - if (outform[o] == "x11"){ - X11(width=size$width,height=size$height,pointsize=ptsz) - }else if(outform[o] == "png"){ - png(filename=fichier,width=size$width*depth,height=size$height*depth - ,pointsize=ptsz,res=depth) - }else if(outform[o] == "eps"){ - postscript(file=fichier,width=size$width,height=size$height,pointsize=ptsz - ,paper=size$paper) - }else if(outform[o] == "pdf"){ - pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height - ,pointsize=ptsz,paper=size$paper) - }#end if - #------------------------------------------------------------------------------# + # Loop over Y variables. # + #---------------------------------------------------------------------------------# + for (y in loop.y){ + y.vname = scen.xyz$yvar$vname[y] + y.desc = scen.xyz$yvar$desc [y] + y.unit = scen.xyz$yvar$unit [y] + y.plog = scen.xyz$yvar$plog [y] + y.leg = scen.xyz$yvar$leg [y] + y.ts = eft[[y.vname]]$ts [sel,,,season.mp] + y.tspft = eft[[y.vname]]$tspft[sel,,,n.season,pft.mp] - #------------------------------------------------------------------------------# - # Split the window into several smaller windows. Add a bottom row to fit # - # the legend. # - #------------------------------------------------------------------------------# - par.orig = par(no.readonly = TRUE) - mar.orig = par.orig$mar - par(oma = c(0.2,3,4,0)) - layout(mat = rbind(1+lo.season$mat,rep(1,times=lo.season$ncol)) - ,height = c(rep(5/lo.season$nrow,times=lo.season$nrow),1) - )#end layout + #----- Create indices to split the arrays into lists. -------------------------# + ai.ts = arrayInd(sequence(length(y.ts )),.dim=dim(y.ts )) + ai.tspft = arrayInd(sequence(length(y.tspft)),.dim=dim(y.tspft)) #------------------------------------------------------------------------------# - - #----- Plot legend. -----------------------------------------------------------# - par(mar=c(0.1,0.1,0.1,0.1)) - plot.new() - plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") - legend ( x = "bottom" - , inset = 0.0 - , legend = simul$desc - , fill = simul$colour - , border = "black" - , bg = "white" - , ncol = min(3,pretty.box(n.simul)$ncol) - , title = expression(bold("Simulation")) - , cex = 1.0 - )#end legend + #----- Find the format of the points for the plots. ---------------------------# + pch.ts = array( data = now$pch[arrayInd(1:length(y.ts ) + ,.dim=dim(y.ts ))[,1]] + , dim = dim(y.ts) + )#end array + pch.tspft = array( data = now$pch[arrayInd( 1:length(y.tspft) + , .dim=dim(y.tspft))[,1]] + , dim = dim(y.tspft) + )#end array #------------------------------------------------------------------------------# #------------------------------------------------------------------------------# - # Loop over all seasons, and plot the bar plots. # + # Loop over X variables. # #------------------------------------------------------------------------------# - for (e in 1:n.season.mp){ - - #----- Find out where is this box going, and set up axes and margins. ------# - left = (e %% lo.season$ncol) == 1 - right = (e %% lo.season$ncol) == 0 - top = e <= lo.season$ncol - bottom = e > (lo.season$nrow - 1) * lo.season$ncol - mar.now = c(1 + 3 * bottom,1 + 1 * left,1 + 2 * top,1 + 1 * right) + 0.1 + for (x in loop.x){ + x.vname = scen.xyz$xvar$vname [x] + x.desc = scen.xyz$xvar$desc [x] + x.unit = scen.xyz$xvar$unit [x] + x.plog = scen.xyz$xvar$plog [x] + x.leg = scen.xyz$xvar$leg [x] + x.pft = scen.xyz$xvar$pftvar[x] + x.ts = eft[[x.vname]]$ts [sel,,,season.mp] + if (x.pft){ + x.tspft = eft[[x.vname]]$tspft[sel,,,n.season,pft.mp] + }else{ + x.tspft = array(NA,dim(y.tspft),dimnames=dimnames(y.tspft)) + for (f in 1:n.pft.mp){ + x.tspft[,,,f] = eft[[x.vname]]$ts[sel,,,n.season] + }#end for + }#end if #---------------------------------------------------------------------------# - #----- Set up the title for each plot. -------------------------------------# - lesub = paste(season.desc[e],sep="") #---------------------------------------------------------------------------# - - - - #----- Create the temporary box plot list. ---------------------------------# - ss.this = this[,e,,] - ai = arrayInd(sequence(length(ss.this)),.dim=dim(ss.this)) - bp.plot = split(x=ss.this,f=list(ai[,3],ai[,2])) + # Plot only when x and y are different. # #---------------------------------------------------------------------------# + if (x.vname != y.vname){ + #----- Build the log info. ----------------------------------------------# + xy.plog="" + if (x.plog) xy.plog=paste(xy.plog,"x",sep="") + if (y.plog) xy.plog=paste(xy.plog,"y",sep="") + #------------------------------------------------------------------------# - #----- Plot window and grid. -----------------------------------------------# - par(mar=mar.now) - plot.new() - plot.window(xlim=xlimit,ylim=ylimit,xaxt="n",yaxt="n") - if (bottom) axis(side=1,at=xat,labels=pft.key[pft.bp]) - if (left ) axis(side=2) - box() - title(main=lesub) - if (plotgrid) abline(v=xgrid,h=axTicks(2),col="grey40",lty="solid") + #------------------------------------------------------------------------# + # Loop over Z variables. # + #------------------------------------------------------------------------# + for (z in loop.z){ + z.vname = scen.xyz$zvar$vname [z] + z.desc = scen.xyz$zvar$desc [z] + z.unit = scen.xyz$zvar$unit [z] + z.plog = scen.xyz$zvar$plog [z] + z.pft = scen.xyz$zvar$pftvar [z] + z.cscheme = get(scen.xyz$zvar$col.scheme[z]) + z.ts = eft[[z.vname]]$ts [sel,,,season.mp] + if (z.pft){ + z.tspft = eft[[z.vname]]$tspft[sel,,,n.season,pft.mp] + }else{ + z.tspft = array(NA,dim=dim(y.tspft),dimnames=dimnames(y.tspft)) + for (f in 1:n.pft.mp){ + z.tspft[,,,f] = eft[[z.vname]]$ts [sel,,,n.season] + }#end z.tspft + }#end + + + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + # Split the arrays into lists. # + #---------------------------------------------------------------------# + x.list = split(x=x.ts ,f=ai.ts[,4]) + y.list = split(x=y.ts ,f=ai.ts[,4]) + z.list = split(x=z.ts ,f=ai.ts[,4]) + pch.list = split(x=pch.ts,f=ai.ts[,4]) + #---------------------------------------------------------------------# + + + + #---------------------------------------------------------------------# + # Fix the titles. # + #---------------------------------------------------------------------# + letitre = paste("Seasonal means - ",z.desc,"\n",out.desc,sep="") + lex = paste(x.desc," [",x.unit,"]",sep="") + ley = paste(y.desc," [",y.unit,"]",sep="") + lacle = paste("[",z.unit,"]",sep="") + #---------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------# + # Plot the parameter space by season. # + #---------------------------------------------------------------------# + for (o in 1:nout){ + #----- Get the path. ----------------------------------------------# + now.outpath = outpath[[o]]$global[[g]]$scenario[[s]]$xyz.season[y] + #------------------------------------------------------------------# + + + + #----- Open file or display. --------------------------------------# + fichier = paste(now.outpath,"/y-",y.vname,"_x-",x.vname + ,"_z-",z.vname,"-",out.suffix,"-season." + ,outform[o],sep="") + if (outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth + ,height=size$height*depth,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE,width=size$width + ,height=size$height,pointsize=ptsz,paper=size$paper) + }#end if + #------------------------------------------------------------------# + + + + #------------------------------------------------------------------# + # Plot the boxes. # + #------------------------------------------------------------------# + leg.ncol = min(3,pretty.box(n.now)$ncol) + leg.letitre = expression(bold("Simulation")) + xyz.plot( x = x.list + , y = y.list + , z = z.list + , fixed.xlim = TRUE + , fixed.ylim = TRUE + , xy.log = xy.plog + , pch = pch.list + , cex = 1.2 + , nlevels = n.colourbar + , colour.palette = z.cscheme + , xyz.main = list(text=letitre) + , xyz.sub = season.mp.desc + , xyz.xlab = list( text = lex + , adj = mtext.xadj + , padj = mtext.xoff + )#end list + , xyz.ylab = list( text = ley + , adj = mtext.yadj + , padj = mtext.yoff + )#end list + , xyz.more = list(grid=list(col="grey83",lty="solid")) + , key.log = z.plog + , key.title = list(main=lacle,cex.main=0.8) + , xyz.legend = list( x = "bottom" + , inset = 0.0 + , legend = now$desc + , pch = now$pch + , col = "grey16" + , border = "black" + , bg = "white" + , ncol = leg.ncol + , title = leg.letitre + , cex = 1.2 + )#end legend + )#end xyz.plot + #------------------------------------------------------------------# + + + + #----- Close the device. ------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + clean.tmp() + #------------------------------------------------------------------# + }#end for + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + + + + + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + # Split the arrays into lists. # + #---------------------------------------------------------------------# + x.list = split(x=x.tspft ,f=ai.tspft[,4]) + y.list = split(x=y.tspft ,f=ai.tspft[,4]) + z.list = split(x=z.tspft ,f=ai.tspft[,4]) + pch.list = split(x=pch.tspft,f=ai.tspft[,4]) + #---------------------------------------------------------------------# + + + + #---------------------------------------------------------------------# + # Fix the titles. # + #---------------------------------------------------------------------# + letitre = paste("Seasonal means - ",z.desc,"\n",out.desc,sep="") + lex = paste(x.desc," [",x.unit,"]",sep="") + ley = paste(y.desc," [",y.unit,"]",sep="") + lacle = paste("[",z.unit,"]",sep="") + #---------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------# + # Plot the parameter space by season. # + #---------------------------------------------------------------------# + for (o in 1:nout){ + #----- Get the path. ----------------------------------------------# + now.outpath = outpath[[o]]$global[[g]]$scenario[[s]]$xyz.pft[y] + #------------------------------------------------------------------# + + #----- Open file or display. --------------------------------------# + fichier = paste(now.outpath,"/y-",y.vname,"_x-",x.vname + ,"_z-",z.vname,"-",out.suffix,"-pft." + ,outform[o],sep="") + if (outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth + ,height=size$height*depth,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE,width=size$width + ,height=size$height,pointsize=ptsz,paper=size$paper) + }#end if + #------------------------------------------------------------------# + + + + #------------------------------------------------------------------# + # Plot the boxes. # + #------------------------------------------------------------------# + leg.ncol = min(3,pretty.box(n.now)$ncol) + leg.title = expression(bold("Simulation")) + xyz.plot( x = x.list + , y = y.list + , z = z.list + , fixed.xlim = FALSE + , fixed.ylim = TRUE + , xy.log = xy.plog + , pch = pch.list + , cex = 1.2 + , nlevels = n.colourbar + , colour.palette = z.cscheme + , xyz.main = list(text=letitre) + , xyz.sub = pft.desc[pft.mp] + , xyz.xlab = list( text = lex + , adj = mtext.xadj + , padj = mtext.xoff + )#end list + , xyz.ylab = list( text = ley + , adj = mtext.yadj + , padj = mtext.yoff + )#end list + , xyz.more = list(grid=list(col="grey83",lty="solid")) + , key.log = z.plog + , key.title = list(main=lacle,cex.main=0.8) + , xyz.legend = list( x = "bottom" + , inset = 0.0 + , legend = now$desc + , pch = now$pch + , col = "grey16" + , border = "black" + , bg = "white" + , ncol = leg.ncol + , title = leg.title + , cex = 1.0 + )#end legend + )#end xyz.plot + #------------------------------------------------------------------# + + + + #----- Close the device. ------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + clean.tmp() + #------------------------------------------------------------------# + }#end for + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# - #----- Add the box plot, without the x axis. -------------------------------# - boxplot(x=bp.plot,col=bp.colour,notch=notch,add=TRUE,show.names=FALSE - ,yaxt="n") + }#end for + #------------------------------------------------------------------------# + }#end if (x.vname != y.vname) #---------------------------------------------------------------------------# - }#end for (e in 1:n.season.mp) - #------------------------------------------------------------------------------# - - - #------------------------------------------------------------------------------# - # Plot the global title. # - #------------------------------------------------------------------------------# - par(las=0) - mtext(text=lex ,side=1,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) - mtext(text=ley ,side=2,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) - mtext(text=letitre,side=3,outer=TRUE,cex=1.1,font=2) + }#end for #------------------------------------------------------------------------------# + }#end for + #.................................................................................# + #.................................................................................# + }#end for (s in loop.scenario) + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + }#end for (p in loop.panel) + #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# - #----- Close the device. ------------------------------------------------------# - if (outform[o] == "x11"){ - locator(n=1) - dev.off() - }else{ - dev.off() - }#end if - #------------------------------------------------------------------------------# - }#end for (o in 1:nout) - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# - - + #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + # Now we plot panels comparing the different scenarios. We use the same list # + # of variables as the time series. # + #---------------------------------------------------------------------------------------# + if (n.scenario == 2){ + if (is.na(plot.scencomp)){ + loop.scencomp = sequence(nscen.comp)[1] + }else if (plot.scencomp){ + loop.scencomp = sequence(nscen.comp) + }else{ + loop.scencomp = integer(0) + }#end if + }else{ + loop.scencomp = integer(0) + }#end if + cat(" * Plot the scenario comparison...","\n") + for (v in loop.scencomp){ + #----- Copy variable info. ----------------------------------------------------------# + var.vname = scen.comp$vname [v] + var.desc = scen.comp$desc [v] + var.quant = scen.comp$quant [v] + var.low = scen.comp$low [v] + var.high = scen.comp$high [v] + var.unit = scen.comp$unit [v] + is.pft = scen.comp$pft [v] + is.dbh = scen.comp$dbh [v] + var.plt = scen.comp$plt [v] + var.pft = paste(var.vname,"pft" ,sep="") + var.pftdbh = paste(var.vname,"pftdbh",sep="") + #------------------------------------------------------------------------------------# + #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# + # Decide whether to plot or not. # + #------------------------------------------------------------------------------------# + if (var.plt){ + cat (" . ",var.desc,"...","\n") #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# - # Plot the box plot by PFT and by season. # - #---------------------------------------------------------------------------------# - xlimit = c(0,n.pft.bp*n.simul) + 0.5 - xat = seq(from=1 + 0.5*(n.simul-1), to=n.pft.bp*n.simul, by=n.simul) - xgrid = seq(from=0.5, to=(n.pft.bp+1)*n.simul - 0.5*(n.simul-1), by=n.simul) + # Plot the variable difference by panel. # #---------------------------------------------------------------------------------# - #----- Load variable and set y axis. ---------------------------------------------# - this = eft[[var.vname]]$tspft[,n.season,pft.bp,] - ylimit = pretty.xylim(u=this,fracexp=fracexp,is.log=var.plog) + + #----- Retrieve all simulations from this panel. ---------------------------------# + this = eft[[var.vname]]$ts[,,y.sel,] + this = apply(X = this, FUN = mean, MARGIN = c(1,4),na.rm=TRUE) + o.dim = dim(this)[-1] ; names(o.dim ) = "season" + o.dname = dimnames(this)[-1] ; names(o.dname) = "season" + o.seq = mapply( FUN = sequence, nvec = o.dim, SIMPLIFY = FALSE) #---------------------------------------------------------------------------------# - #----- Set the title. ------------------------------------------------------------# - letitre = paste(var.desc," (Annual means) - ",longname,sep="") - lex = paste("Plant functional type") - ley = paste(var.desc," [",var.unit,"]",sep=" ") + #----- Find the panel information. -----------------------------------------------# + p.type = simul$dim.type == "panel" + p.name = "panel" + p.ind = simul$panel$index [g.sel] + p.key = simul$key[g.sel,p.type] + p.level = list(simul$panel$level) + p.dim = simul$panel$n.level + p.seq = sequence(p.dim) + names(p.level) = "panel" #---------------------------------------------------------------------------------# + #---------------------------------------------------------------------------------# - # Set up the box plot colour. # + # Retrieve the scenarios and the default for each scenario. # #---------------------------------------------------------------------------------# - bp.colour = rep(simul$colour,times=n.pft.bp) + s.type = simul$dim.type == "scenario" + s.name = names(simul$dim[s.type]) + s.dim = simul$dim[s.type] + s.dnames = simul$panel$level + s.value = simul$value[g.sel,s.type] + s.key = simul$key[g.sel,s.type] + s.level = split(x=simul$scenario$level,f=simul$scenario$idxcol) + names(s.level) = names(simul$dim)[s.type] #---------------------------------------------------------------------------------# + #---------------------------------------------------------------------------------# - # Loop over all formats. # + # Find the array names, and determine the index that has the "zero" scenario # + # so the figures are relative to the reference scenario. # + #---------------------------------------------------------------------------------# + if (n.scenario == 1){ + s.ind = simul$scenario$index[g.sel] + zero = s.key == simul$default[s.type] + a.dim = sapply(X=c(s.dim,o.dim),FUN=c) + a.dnames = c(list(s.level),o.dname) + names(a.dnames) = c(names(simul$dim)[s.type],names(o.dim)) + }else{ + s.default = split(simul$default[s.type],index(simul$default[s.type])) + s.ind = data.frame( apply(X=simul$scenario$index,MARGIN=2,FUN="[",g.sel) + , stringsAsFactors = FALSE + )#end data.frame + zero = apply( X = mapply(FUN="==", s.key,s.default) + , MARGIN = 1 + , FUN = all + )#end apply + a.dim = sapply(X=c(p.dim,s.dim ,o.dim ),FUN=c) + a.dnames = c(p.level,s.level,o.dname) + }#end if #---------------------------------------------------------------------------------# - for (o in 1:nout){ - #----- Open file or display. --------------------------------------------------# - fichier = paste(out.boxpft.year[v],"/",var.vname,"-",iata,"-boxplot_year." - ,outform[o],sep="") - if (outform[o] == "x11"){ - X11(width=size$width,height=size$height,pointsize=ptsz) - }else if(outform[o] == "png"){ - png(filename=fichier,width=size$width*depth,height=size$height*depth - ,pointsize=ptsz,res=depth) - }else if(outform[o] == "eps"){ - postscript(file=fichier,width=size$width,height=size$height,pointsize=ptsz - ,paper=size$paper) - }else if(outform[o] == "pdf"){ - pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height - ,pointsize=ptsz,paper=size$paper) - }#end if - #------------------------------------------------------------------------------# - - - - #----- Create the temporary box plot list. ------------------------------------# - ai = arrayInd(sequence(length(this)),.dim=dim(this)) - bp.plot = split(x=ss.this,f=list(ai[,3],ai[,2])) - #------------------------------------------------------------------------------# - - - - #----- Plot window and grid. --------------------------------------------------# - plot.new() - plot.window(xlim=xlimit,ylim=ylimit,xaxt="n",yaxt="n") - if (bottom) axis(side=1,at=xat,labels=pft.key[pft.bp]) - if (left ) axis(side=2) - box() - title(main=lesub) - if (plotgrid) abline(v=xgrid,h=axTicks(2),col="grey40",lty="solid") - - #----- Add the box plot, without the x axis. ----------------------------------# - boxplot(x=bp.plot,col=bp.colour,notch=notch,add=TRUE,show.names=FALSE,yaxt="n") - #------------------------------------------------------------------------------# - - - #----- Add the legend. --------------------------------------------------------# - legend ( x = "topright" - , inset = inset - , legend = simul$desc - , fill = simul$colour - , border = "black" - , bg = "white" - , ncol = min(3,pretty.box(n.simul)$ncol) - , title = expression(bold("Simulation")) - , cex = 1.0 - )#end legend - #------------------------------------------------------------------------------# + #---------------------------------------------------------------------------------# + # Build the lists to split the array by simulation and panel. # + #---------------------------------------------------------------------------------# + if (! is.list(p.ind)) p.ind = list(p.ind) + if (! is.list(s.ind)) s.ind = list(s.ind) + #---------------------------------------------------------------------------------# - #----- Close the device. ------------------------------------------------------# - if (outform[o] == "x11"){ - locator(n=1) - dev.off() - }else{ - dev.off() - }#end if - #------------------------------------------------------------------------------# - }#end for (o in 1:nout) - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# - }#end if (var.plt) - #------------------------------------------------------------------------------------# + #---------------------------------------------------------------------------------# + # Find the zero for all simulations. # + #---------------------------------------------------------------------------------# + zero = as.matrix(expand.grid(c(list(rep(which(zero), times=prod(s.dim))),o.seq))) + this = this - this[zero] + #---------------------------------------------------------------------------------# + #---------------------------------------------------------------------------------# + # Split the stuff into panels, and create the scenario maps. # + #---------------------------------------------------------------------------------# + this = array(data=this,dim=a.dim,dimnames=a.dnames) + n.a.dim = length(a.dim) + #---------------------------------------------------------------------------------# - #------------------------------------------------------------------------------------# - # DBH plots by season. # - #------------------------------------------------------------------------------------# - if (var.plt & is.dbh){ #---------------------------------------------------------------------------------# - # Loop over each season. # + # Plot the data by season. # #---------------------------------------------------------------------------------# for (e in 1:n.season){ - cseason=paste(sprintf("%2.2i",e),season.key[e],sep="-") - - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# - # Plot the box plot by PFT and by season. # #------------------------------------------------------------------------------# - xlimit = c(0,n.pft.bp*n.simul) + 0.5 - xat = seq(from=1 + 0.5*(n.simul-1), to=n.pft.bp*n.simul, by=n.simul) - xgrid = seq(from=0.5, to=(n.pft.bp+1)*n.simul - 0.5*(n.simul-1), by=n.simul) + # Keep the current season only. # + #------------------------------------------------------------------------------# + bye = n.a.dim + inds = as.matrix(expand.grid(mapply(FUN=sequence,a.dim[-bye]))) + inds = cbind(inds,e) + this.var = array(this[inds],dim=a.dim[-bye],dimnames=a.dnames[-bye]) #------------------------------------------------------------------------------# - #----- Load variable and set y axis. ------------------------------------------# - this = eft[[var.vname]]$tspftdbh[,e,,pft.mp,] - ylimit = pretty.xylim(u=this,fracexp=0.0,is.log=var.plog) #------------------------------------------------------------------------------# + # Set the annotation and some auxiliary variables. These depend on the # + # number of scenario dimensions. # + #------------------------------------------------------------------------------# + letitre = paste("Scenario comparision - ",var.desc,"\n",season.desc[e] + ," - ",global.desc,sep="") + if (n.scenario == 1){ + now = scenario[[1]] + n.now = length(now$key) + #---------------------------------------------------------------------------# + # Find the axis limits and labels. # + #---------------------------------------------------------------------------# + xlimit = pretty.xylim(u=now$value,fracexp=0.,is.log=FALSE) + ylimit = pretty.xylim(u=this.var ,fracexp=0.,is.log=FALSE) + x.value = now$value + x.label = now$label + lex = now$alabel + ley = paste(var.desc," [",var.unit,"]",sep="") + #---------------------------------------------------------------------------# - #----- Set the title. ---------------------------------------------------------# - letitre = paste(var.desc," - ",longname,"\n"," Season: ",season.desc[e],sep="") - lex = paste("DBH Class [cm]") - ley = paste(var.desc," [",var.unit,"]",sep=" ") - #------------------------------------------------------------------------------# + }else{ + #----- Axis labels. --------------------------------------------------------# + lex = scenario[[1]]$alabel + x.value = scenario[[1]]$value + x.label = scenario[[1]]$label + ley = scenario[[2]]$alabel + y.value = scenario[[2]]$value + y.label = scenario[[2]]$label + #---------------------------------------------------------------------------# - #------------------------------------------------------------------------------# - # Set up the box plot colour. # - #------------------------------------------------------------------------------# - bp.colour = rep(simul$colour,times=n.dbh) + #---------------------------------------------------------------------------# + # Break the values into bins. # + #---------------------------------------------------------------------------# + var.scheme = two.palettes( x = this.var + , n = n.colourbar + , white = n.whitebar + , low = var.low + , high = var.high + )#end two.palettes + var.brks = var.scheme$breaks + var.colours = var.scheme$colours + n.brks = var.scheme$n.breaks + #---------------------------------------------------------------------------# + + + #----- Make the edges. -----------------------------------------------------# + xleft = var.brks[-n.brks] + xright = var.brks[ -1] + ybottom = rep(0,times=n.brks) + ytop = rep(1,times=n.brks) + legat = var.brks + #---------------------------------------------------------------------------# + }#end if #------------------------------------------------------------------------------# + #------------------------------------------------------------------------------# - # Loop over all formats. # + # Loop over all output formats. # #------------------------------------------------------------------------------# for (o in 1:nout){ - #----- Open file or display. -----------------------------------------------# - fichier = paste(out.boxpftdbh[v],"/",var.vname,"-",iata,"-",cseason - ,"-boxplot.",outform[o],sep="") + #----- Get the path and create file name. ----------------------------------# + if ( e == n.season){ + now.outpath = outpath[[o]]$global[[g]]$scenpanel.year + fichier = paste(now.outpath,"/scencomp-year-" + ,var.vname,"-",global.suffix,".",outform[o],sep="") + }else{ + now.outpath = outpath[[o]]$global[[g]]$scenpanel.season[e] + fichier = paste(now.outpath,"/scencomp-",season.suffix[e],"-" + ,var.vname,"-",global.suffix,".",outform[o],sep="") + }#end if + #---------------------------------------------------------------------------# + + + #----- Open the file. ------------------------------------------------------# if (outform[o] == "x11"){ X11(width=size$width,height=size$height,pointsize=ptsz) }else if(outform[o] == "png"){ - png(filename=fichier,width=size$width*depth,height=size$height*depth - ,pointsize=ptsz,res=depth) + png(filename=fichier,width=size$width*depth + ,height=size$height*depth,pointsize=ptsz,res=depth) }else if(outform[o] == "eps"){ postscript(file=fichier,width=size$width,height=size$height ,pointsize=ptsz,paper=size$paper) }else if(outform[o] == "pdf"){ - pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height - ,pointsize=ptsz,paper=size$paper) + pdf(file=fichier,onefile=FALSE,width=size$width + ,height=size$height,pointsize=ptsz,paper=size$paper) }#end if #---------------------------------------------------------------------------# - #---------------------------------------------------------------------------# - # Split the window into several smaller windows. Add a bottom row to # - # fit the legend. # - #---------------------------------------------------------------------------# + #----- Save the margins to avoid losing the data. --------------------------# par.orig = par(no.readonly = TRUE) mar.orig = par.orig$mar - par(oma = c(0.2,3,4,0)) - layout(mat = rbind(1+lo.pft$mat,rep(1,times=lo.pft$ncol)) - ,height = c(rep(5/lo.pft$nrow,times=lo.pft$nrow),1) - )#end layout #---------------------------------------------------------------------------# - #----- Plot legend. --------------------------------------------------------# - par(mar=c(0.1,0.1,0.1,0.1)) - plot.new() - plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") - legend ( x = "bottom" - , inset = 0.0 - , legend = simul$desc - , fill = simul$colour - , border = "black" - , bg = "white" - , ncol = min(3,pretty.box(n.simul)$ncol) - , title = expression(bold("Simulation")) - , cex = 1.0 - )#end legend #---------------------------------------------------------------------------# - + # Split the plotting window. # + #---------------------------------------------------------------------------# + par(oma = c(0.2,3,4.5,0)) + layout( mat = rbind(lo.panel$mat+1,rep(1,times=lo.panel$ncol)) + , heights = c(rep(5/lo.panel$nrow,lo.panel$nrow),1) + )#end layout + #---------------------------------------------------------------------------# #---------------------------------------------------------------------------# - # Loop over all seasons, and plot the bar plots. # + # Plot the legend. What goes into the legend depends on the number of # + # scenarios. # + #---------------------------------------------------------------------------# + if (n.scenario == 1){ + par(mar=c(0.2,4.1,0.1,2.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1)) + legend( x = "bottom" + , inset = inset + , legend = now$desc + , col = now$colour + , pch = 16 + , lwd = 2.5 + , title = expression(bold(now$alabel)) + , cex = 1.0 + )#end legend + }else{ + par(mar=c(3,3,2,3)+0.1) + plot.new() + plot.window(xlim=range(xleft,xright),ylim=range(ybottom,ytop) + ,xaxs="i",yaxs="i") + rect(xleft=xleft,ybottom=ybottom,xright=xright,ytop=ytop,col=var.colours) + box() + axis(side=1,at=legat) + title(main=paste(var.desc," change [",var.unit,"]",sep="") + ,xlab="",ylab="") + }#end if #---------------------------------------------------------------------------# - for (f in 1:n.pft.mp){ - #----- Find out where is this box going, and set up axes and margins. ---# - left = (f %% lo.pft$ncol) == 1 - right = (f %% lo.pft$ncol) == 0 - top = f <= lo.pft$ncol - bottom = f > (lo.pft$nrow - 1) * lo.pft$ncol - mar.now = c(1 + 3 * bottom,1 + 1 * left,1 + 2 * top,1 + 1 * right) + 0.1 - #------------------------------------------------------------------------# - #----- Set up the title for each plot. ----------------------------------# - lesub = paste(pft.desc[pft.mp[f]],sep="") - #------------------------------------------------------------------------# + #---------------------------------------------------------------------------# + # Loop over all panels, and plot the data for this season. # + #---------------------------------------------------------------------------# + loop.panel = sequence(max(1,simul$panel$n.level )) + for (p in loop.panel){ + #----- Find out where is this box going, and set up axes and margins. ---# + left = (p %% lo.panel$ncol) == 1 || lo.panel$ncol == 1 + right = (p %% lo.panel$ncol) == 0 + top = p <= lo.panel$ncol + bottom = p > (lo.panel$nrow - 1) * lo.panel$ncol + if (n.scenario == 1){ + mar.now = c(1 + 3*bottom,1 + 1*left,1 + 2*top,1 + 1*right) + 0.1 + }else{ + mar.now = c(3 + 1*bottom,1 + 1*left,1 + 1*top,1 + 1*right) + 0.1 + }#end if + #------------------------------------------------------------------------# - #----- Create the temporary box plot list. ------------------------------# - ss.this = this[,,f,] - ai = arrayInd(sequence(length(ss.this)),.dim=dim(ss.this)) - bp.plot = split(x=ss.this,f=list(ai[,3],ai[,2])) + #----- Make the sub-title. ----------------------------------------------# + lesub=simul$panel$title[p] #------------------------------------------------------------------------# - #----- Plot window and grid. --------------------------------------------# - par(mar=mar.now) - plot.new() - plot.window(xlim=xlimit,ylim=ylimit,xaxt="n",yaxt="n") - if (bottom) axis(side=1,at=xat,labels=dbh.key) - if (left ) axis(side=2) - box() - title(main=lesub) - if (plotgrid) abline(v=xgrid,h=axTicks(2),col="grey40",lty="solid") - - #----- Add the box plot, without the x axis. ----------------------------# - boxplot(x=bp.plot,col=bp.colour,notch=notch,add=TRUE,show.names=FALSE - ,yaxt="n") + #----- Set the window. --------------------------------------------------# + par(mar = mar.now) + if (n.scenario == 1){ + plot.new() + plot.window(xlim=xlimit,ylim=ylimit) + if (bottom) axis(side=1,at=x.value,labels=x.label) + if (left) axis(side=2) + box() + grid(col="grey60",lty="solid") + title(main=lesub) + abline(h=0,v=0,col="black",lty="dotdash",lwd=2.0) + for (n in 1:n.now){ + points(x = now$value,y=this.var[p,],type="o",col=now$colour[n] + ,pch=16,lwd=2.5) + }#end for + }else{ + image(x=x.value,y=y.value,z=this.var[p,,],col=var.colours + ,breaks=var.brks + ,xaxt="n",yaxt="n",main=lesub,xlab="",ylab="") + text (x=0,y=0,labels="0",col="black",font=2,cex=2) + if (bottom) axis(side=1,at=x.value,labels=x.label) + if (left) axis(side=2,at=y.value,labels=y.label) + }#end if #------------------------------------------------------------------------# - }#end for (f in 1:n.pft.mp) + }#end for #---------------------------------------------------------------------------# @@ -1641,9 +4503,13 @@ for (p in 1:n.sites){ # Plot the global title. # #---------------------------------------------------------------------------# par(las=0) - mtext(text=lex ,side=1,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) - mtext(text=ley ,side=2,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) - mtext(text=letitre,side=3,outer=TRUE,cex=1.1,font=2) + if (n.scenario == 1){ + mtext(side=1,text=lex ,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) + }else{ + mtext(side=1,text=lex ,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff.im) + }#end if + mtext(side=2,text=ley ,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) + mtext(side=3,text=letitre,outer=TRUE,cex=1.10,font=2) #---------------------------------------------------------------------------# @@ -1655,783 +4521,738 @@ for (p in 1:n.sites){ }else{ dev.off() }#end if + clean.tmp() #---------------------------------------------------------------------------# }#end for (o in 1:nout) - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + #------------------------------------------------------------------------------# }#end for (e in 1:n.season) - #---------------------------------------------------------------------------------# - }#end if (var.plt && is.dbh) - #------------------------------------------------------------------------------------# - }#end for - #=======================================================================================# - #=======================================================================================# - - + #---------------------------------------------------------------------------------# + }#end if + #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# - #=======================================================================================# - #=======================================================================================# - # Plot the bar plots. # - #---------------------------------------------------------------------------------------# - cat (" - Plotting the bar plots...","\n") - for (v in 1:nscen.barplot){ - #----- Copy variable info. ----------------------------------------------------------# - var.vname = scen.barplot$vname [v] - var.desc = scen.barplot$desc [v] - var.unit = scen.barplot$unit [v] - is.pft = scen.barplot$pftvar[v] - is.dbh = scen.barplot$dbhvar[v] - var.plog = scen.barplot$plog [v] - var.plt = scen.barplot$plt [v] - if (var.plog){ - var.xylog = "y" - }else{ - var.xylog = "" - }#end if + #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# + # Check whether to plot the comparison by PFT. # #------------------------------------------------------------------------------------# - - - if (var.plt){ + if (var.plt && is.pft){ #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# - # Plot the bar plot by PFT, DBH class, and season. # - #---------------------------------------------------------------------------------# - cat (" - ",var.desc,"...","\n") + # Plot the variable difference by panel. # #---------------------------------------------------------------------------------# - #----- Load variable and set y axis. ---------------------------------------------# - this.5d = eft[[var.vname]]$tspftdbh[,1:n.season.mp,,pft.bp,] - this = apply(X=this.5d,MARGIN=c(2,3,4,5),FUN=mean,na.rm=TRUE) + + #----- Retrieve all simulations from this panel. ---------------------------------# + this = eft[[var.vname]]$tspft[,,y.sel,,] + this = apply(X = this, FUN = mean, MARGIN = c(1,4,5),na.rm=TRUE) + o.dim = dim(this)[-1] ; names(o.dim ) = c("season","pft") + o.dname = dimnames(this)[-1] ; names(o.dname) = c("season","pft") + o.seq = mapply( FUN = sequence, nvec = o.dim, SIMPLIFY = FALSE) #---------------------------------------------------------------------------------# - #---------------------------------------------------------------------------------# - # Stack the PFT data. # - #---------------------------------------------------------------------------------# - this = apply(X=this,MARGIN=c(1,2,4),FUN=cumsum) - this = aperm(a=this,perm=c(4,3,1,2)) + #----- Find the panel information. -----------------------------------------------# + p.type = simul$dim.type == "panel" + p.name = "panel" + p.ind = simul$panel$index [g.sel] + p.key = simul$key[g.sel,p.type] + p.level = list(simul$panel$level) + p.dim = simul$panel$n.level + p.seq = sequence(p.dim) + names(p.level) = "panel" #---------------------------------------------------------------------------------# + #---------------------------------------------------------------------------------# - # Combine simulation and size into one dimension. # + # Retrieve the scenarios and the default for each scenario. # #---------------------------------------------------------------------------------# - dth = dim(this) - dnth = list( paste(rep(dimnames(this)[[1]],times=dth[2]) - ,rep(dimnames(this)[[2]],each =dth[1]) - ,sep=".") - , dimnames(this)[[3]] - , dimnames(this)[[4]] - )#end list - this = array(data= this,dim=c(dth[1]*dth[2],dth[3],dth[4]),dimnames=dnth) + s.type = simul$dim.type == "scenario" + s.name = names(simul$dim[s.type]) + s.dim = simul$dim[s.type] + s.dnames = simul$panel$level + s.value = simul$value[g.sel,s.type] + s.key = simul$key[g.sel,s.type] + s.level = split(x=simul$scenario$level,f=simul$scenario$idxcol) + names(s.level) = names(simul$dim)[s.type] #---------------------------------------------------------------------------------# - #----- Set the title. ------------------------------------------------------------# - letitre = paste(var.desc," (Seasonal means) - ",longname,sep="") - lex = paste("DBH class [cm]") - ley = paste(var.desc," [",var.unit,"]",sep=" ") - #---------------------------------------------------------------------------------# - #---------------------------------------------------------------------------------# - # Find the x dimensions. # + # Find the array names, and determine the index that has the "zero" scenario # + # so the figures are relative to the reference scenario. # #---------------------------------------------------------------------------------# - xleft = ( rep(sequence(n.simul),times=n.dbh) - + rep((n.simul+1)*(sequence(n.dbh)-1),each=n.simul) ) - 0.9 - xright = xleft + 0.8 - xat = seq(from=0.5*n.simul,by=n.simul+1,length.out=n.dbh) - xgrid = seq(from=0,by=n.dbh,length.out=n.simul+2)-0.5 + if (n.scenario == 1){ + s.ind = simul$scenario$index[g.sel] + zero = s.key == simul$default[s.type] + a.dim = sapply(X=c(s.dim,o.dim),FUN=c) + a.dnames = c(list(s.level),o.dname) + names(a.dnames) = c(names(simul$dim)[s.type],names(o.dim)) + }else{ + s.default = split(simul$default[s.type],index(simul$default[s.type])) + s.ind = data.frame( apply(X=simul$scenario$index,MARGIN=2,FUN="[",g.sel) + , stringsAsFactors = FALSE + )#end data.frame + zero = apply( X = mapply(FUN="==", s.key,s.default) + , MARGIN = 1 + , FUN = all + )#end apply + a.dim = sapply(X=c(p.dim,s.dim ,o.dim ),FUN=c) + a.dnames = c(p.level,s.level,o.dname) + }#end if #---------------------------------------------------------------------------------# #---------------------------------------------------------------------------------# - # Find out the colour filling. # + # Build the lists to split the array by simulation and panel. # #---------------------------------------------------------------------------------# - fill.col = array( data = rep(pft.colour[pft.bp],each=dim(this)[1]) - , dim = dim(this)[1:2] - , dimnames = dimnames(this)[1:2] - )#end array - border.col = array( data = rep(simul$colour,times=dim(this)[2]) - , dim = dim(this)[1:2] - , dimnames = dimnames(this)[1:2] - )#end array - xleft = array( data = xleft - , dim = dim(this)[1:2] - , dimnames = dimnames(this)[1:2] - )#end array - xright = array( data = xright - , dim = dim(this)[1:2] - , dimnames = dimnames(this)[1:2] - )#end array - ybottom = this; ybottom[,-1,] = ybottom[,-dim(ybottom)[2],]; ybottom[,1,] = 0 - ytop = this + if (! is.list(p.ind)) p.ind = list(p.ind) + if (! is.list(s.ind)) s.ind = list(s.ind) #---------------------------------------------------------------------------------# - #----- Find the limits for the plot. ---------------------------------------------# - xlimit = range(c(xat,xgrid)) - ylimit = pretty.xylim(u=this,fracexp=0.0,is.log=var.plog) #---------------------------------------------------------------------------------# + # Find the zero for all simulations. # + #---------------------------------------------------------------------------------# + zero = as.matrix(expand.grid(c(list(rep(which(zero), times=prod(s.dim))),o.seq))) + this = this - this[zero] + #---------------------------------------------------------------------------------# + + #---------------------------------------------------------------------------------# + # Split the stuff into panels, and create the scenario maps. # + #---------------------------------------------------------------------------------# + this = array(data=this,dim=a.dim,dimnames=a.dnames) + n.a.dim = length(a.dim) + #---------------------------------------------------------------------------------# #---------------------------------------------------------------------------------# - # Loop over all formats. # + # Plot the data by PFT and season. # #---------------------------------------------------------------------------------# - for (o in 1:nout){ - #----- Open file or display. --------------------------------------------------# - fichier = paste(out.barplot.season[v],"/",var.vname,"-",iata - ,"-barplot_season.",outform[o],sep="") - if (outform[o] == "x11"){ - X11(width=size$width,height=size$height,pointsize=ptsz) - }else if(outform[o] == "png"){ - png(filename=fichier,width=size$width*depth,height=size$height*depth - ,pointsize=ptsz,res=depth) - }else if(outform[o] == "eps"){ - postscript(file=fichier,width=size$width,height=size$height,pointsize=ptsz - ,paper=size$paper) - }else if(outform[o] == "pdf"){ - pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height - ,pointsize=ptsz,paper=size$paper) - }#end if - #------------------------------------------------------------------------------# + for (f in 1:(n.pft-1)){ + for (e in 1:n.season){ + #------ Keep only the current season. --------------------------------------# + bye = n.a.dim + c(-1,0) + inds = as.matrix(expand.grid(mapply(FUN=sequence,a.dim[-bye]))) + inds = cbind(inds,e,f) + this.var = array(this[inds],dim=a.dim[-bye],dimnames=a.dnames[-bye]) + #---------------------------------------------------------------------------# - #------------------------------------------------------------------------------# - # Split the window into several smaller windows. Add a bottom row to fit # - # the legend. # - #------------------------------------------------------------------------------# - par.orig = par(no.readonly = TRUE) - mar.orig = par.orig$mar - par(oma = c(0.2,3,4,0)) - - emat = matrix( data = c( rep(2+t(lo.season$mat),each=2) - , rep(1,times=lo.season$ncol) - , rep(2,times=lo.season$ncol) - )#end c - , ncol = 2*lo.season$ncol - , nrow = 1+lo.season$nrow - , byrow = TRUE - )#end matrix - - layout(mat = emat - ,heights = c(rep(5/lo.season$nrow,times=lo.season$nrow),1) - )#end layout - #------------------------------------------------------------------------------# + + #---------------------------------------------------------------------------# + # Set the annotation and some auxiliary variables. These depend on # + # the number of scenario dimensions. # + #---------------------------------------------------------------------------# + letitre = paste("Scenario comparision - ",var.desc + ,"\n",pft.desc[f]," - ",season.desc[e] + ,"\n",global.desc,sep="") + if (n.scenario == 1){ + now = scenario[[1]] + n.now = length(now$key) + #------------------------------------------------------------------------# + # Find the axis limits and labels. # + #------------------------------------------------------------------------# + xlimit = pretty.xylim(u=now$value,fracexp=0.,is.log=FALSE) + ylimit = pretty.xylim(u=this.var,fracexp=0.,is.log=FALSE) + lex = now$alabel + ley = paste(var.desc," [",var.unit,"]",sep="") + x.value = now$value + x.label = now$label + #------------------------------------------------------------------------# - #----- Plot simulation legend. ------------------------------------------------# - par(mar=c(0.1,0.1,0.1,0.1)) - plot.new() - plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") - legend ( x = "bottom" - , inset = 0.0 - , legend = simul$desc - , fill = simul$colour - , bg = "white" - , ncol = min(3,pretty.box(n.simul)$ncol) - , title = expression(bold("Simulation")) - , cex = 1.0 - )#end legend - #------------------------------------------------------------------------------# + }else{ + #----- Axis labels. -----------------------------------------------------# + lex = scenario[[1]]$alabel + x.value = scenario[[1]]$value + x.label = scenario[[1]]$label + ley = scenario[[2]]$alabel + y.value = scenario[[2]]$value + y.label = scenario[[2]]$label + #------------------------------------------------------------------------# - #----- Plot PFT legend. -------------------------------------------------------# - par(mar=c(0.1,0.1,0.1,0.1)) - plot.new() - plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") - legend ( x = "bottom" - , inset = 0.0 - , legend = pft.desc [pft.bp] - , fill = pft.colour[pft.bp] - , border = "black" - , bg = "white" - , ncol = min(3,pretty.box(n.pft.bp)$ncol) - , title = expression(bold("Plant Functional Type")) - , cex = 1.0 - )#end legend - #------------------------------------------------------------------------------# + #------------------------------------------------------------------------# + # Break the values into bins. # + #------------------------------------------------------------------------# + var.scheme = two.palettes( x = this.var + , n = n.colourbar + , white = n.whitebar + , low = var.low + , high = var.high + )#end two.palettes + var.brks = var.scheme$breaks + var.colours = var.scheme$colours + n.brks = var.scheme$n.breaks + #------------------------------------------------------------------------# + #----- Make the edges. --------------------------------------------------# + xleft = var.brks[-n.brks] + xright = var.brks[ -1] + ybottom = rep(0,times=n.brks) + ytop = rep(1,times=n.brks) + legat = var.brks + #------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------# + - #------------------------------------------------------------------------------# - # Loop over all seasons, and plot the bar plots. # - #------------------------------------------------------------------------------# - for (e in 1:n.season.mp){ - #----- Find out where is this box going, and set up axes and margins. ------# - left = (e %% lo.season$ncol) == 1 - right = (e %% lo.season$ncol) == 0 - top = e <= lo.season$ncol - bottom = e > (lo.season$nrow - 1) * lo.season$ncol - mar.now = c(1 + 3 * bottom,1 + 1 * left,1 + 2 * top,1 + 1 * right) + 0.1 #---------------------------------------------------------------------------# + # Loop over all output formats. # + #---------------------------------------------------------------------------# + for (o in 1:nout){ + #----- Get the path and create file name. -------------------------------# + if ( e == n.season){ + now.outpath = outpath[[o]]$global[[g]]$scenpanelpft.year[f] + fichier = paste(now.outpath,"/scencomp-year-",pft.suffix[f],"-" + ,var.vname,"-",global.suffix,".",outform[o] + ,sep="") + }else{ + now.outpath = outpath[[o]]$global[[g]]$scenpanelpft.season[f,e] + fichier = paste(now.outpath,"/scencomp-",pft.suffix[f],"-" + ,season.suffix[e],"-",var.vname,"-",global.suffix + ,".",outform[o],sep="") + }#end if + #------------------------------------------------------------------------# - #----- Set up the title for each plot. -------------------------------------# - lesub = paste(season.desc[e],sep="") - #---------------------------------------------------------------------------# + #----- Open the file. ---------------------------------------------------# + if (outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth + ,height=size$height*depth,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE,width=size$width + ,height=size$height,pointsize=ptsz,paper=size$paper) + }#end if + #------------------------------------------------------------------------# - #----- Plot window and grid. -----------------------------------------------# - par(mar=mar.now) - plot.new() - plot.window(xlim=xlimit,ylim=ylimit,xaxt="n",yaxt="n") - if (bottom) axis(side=1,at=xat,labels=dbh.key) - if (left ) axis(side=2) - box() - title(main=lesub) - if (plotgrid) abline(v=xgrid,h=axTicks(2),col="grey40",lty="solid") + #----- Save the margins to avoid losing the data. -----------------------# + par.orig = par(no.readonly = TRUE) + mar.orig = par.orig$mar + #------------------------------------------------------------------------# - #----- Add the bar plot using rect, so we can change the line width. -------# - rect( xleft = xleft - , ybottom = ybottom [,,e] - , xright = xright - , ytop = ytop [,,e] - , density = -1 - , col = fill.col - , border = border.col - , lwd = barplot.lwd - )#end rect - #---------------------------------------------------------------------------# - }#end for (e in 1:n.season.mp) - #------------------------------------------------------------------------------# + #------------------------------------------------------------------------# + # Split the plotting window. # + #------------------------------------------------------------------------# + par(oma = c(0.2,3,4.5,0)) + layout( mat = rbind(lo.panel$mat+1,rep(1,times=lo.panel$ncol)) + , heights = c(rep(5/lo.panel$nrow,lo.panel$nrow),1) + )#end layout + #------------------------------------------------------------------------# - #------------------------------------------------------------------------------# - # Plot the global title. # - #------------------------------------------------------------------------------# - par(las=0) - mtext(text=lex ,side=1,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) - mtext(text=ley ,side=2,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) - mtext(text=letitre,side=3,outer=TRUE,cex=1.1,font=2) - #------------------------------------------------------------------------------# + #------------------------------------------------------------------------# + # Plot the legend. What goes into the legend depends on the number # + # of scenarios. # + #------------------------------------------------------------------------# + if (n.scenario == 1){ + par(mar=c(0.2,4.1,0.1,2.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1)) + legend( x = "bottom" + , inset = inset + , legend = now$desc + , col = now$colour + , pch = 16 + , lwd = 2.5 + , title = expression(bold(now$alabel)) + , cex = 1.0 + )#end legend + }else{ + par(mar=c(3,3,2,3)+0.1) + plot.new() + plot.window(xlim=range(xleft,xright),ylim=range(ybottom,ytop) + ,xaxs="i",yaxs="i") + rect(xleft=xleft,ybottom=ybottom,xright=xright,ytop=ytop + ,col=var.colours) + box() + axis(side=1,at=legat) + title(main=paste(var.desc," change [",var.unit,"]",sep="") + ,xlab="",ylab="") + }#end if + #------------------------------------------------------------------------# - #----- Close the device. ------------------------------------------------------# - if (outform[o] == "x11"){ - locator(n=1) - dev.off() - }else{ - dev.off() - }#end if - #------------------------------------------------------------------------------# - }#end for (o in 1:nout) - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + #------------------------------------------------------------------------# + # Loop over all panels, and plot the data for this season. # + #------------------------------------------------------------------------# + loop.panel = sequence(max(1,simul$panel$n.level )) + for (p in loop.panel){ + + #----- Find out where this box goes, and set up axes and margins. ----# + left = (p %% lo.panel$ncol) == 1 || lo.panel$ncol == 1 + right = (p %% lo.panel$ncol) == 0 + top = p <= lo.panel$ncol + bottom = p > (lo.panel$nrow - 1) * lo.panel$ncol + if (n.scenario == 1){ + mar.now = c(1 + 3*bottom,1 + 1*left,1 + 2*top,1 + 1*right) + 0.1 + }else{ + mar.now = c(3 + 1*bottom,1 + 1*left,1 + 1*top,1 + 1*right) + 0.1 + }#end if + #---------------------------------------------------------------------# + + + #----- Make the sub-title. -------------------------------------------# + lesub=simul$panel$title[p] + #---------------------------------------------------------------------# + + + + #----- Set the window. -----------------------------------------------# + par(mar = mar.now) + if (n.scenario == 1){ + plot.new() + plot.window(xlim=xlimit,ylim=ylimit) + if (bottom) axis(side=1,at=x.value,labels=x.label) + if (left) axis(side=2) + box() + grid(col="grey60",lty="solid") + title(main=lesub) + abline(h=0,v=0,col="black",lty="dotdash",lwd=2.0) + for (n in 1:n.now){ + points(x = now$value,y=this.var[p,],type="o",col=now$colour[n] + ,pch=16,lwd=2.5) + }#end for + }else{ + image(x=scenario[[1]]$value,y=scenario[[2]]$value + ,z=this.var[p,,],col=var.colours,breaks=var.brks + ,xaxt="n",yaxt="n",main=lesub,xlab="",ylab="") + text (x=0,y=0,labels="0",col="black",font=2,cex=2) + if (bottom) axis(side=1,at=x.value,labels=x.label) + if (left) axis(side=2,at=y.value,labels=y.label) + }#end if + #---------------------------------------------------------------------# + }#end for + #------------------------------------------------------------------------# + #------------------------------------------------------------------------# + # Plot the global title. # + #------------------------------------------------------------------------# + par(las=0) + if (n.scenario == 1){ + mtext(side=1,text=lex ,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) + }else{ + mtext(side=1,text=lex ,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff.im) + }#end if + mtext(side=2,text=ley ,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) + mtext(side=3,text=letitre,outer=TRUE,cex=1.0,font=2) + #------------------------------------------------------------------------# - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# - # Plot the bar plot by PFT, DBH class, using annual means. # - #---------------------------------------------------------------------------------# - #----- Load variable and set y axis. ---------------------------------------------# - this.4d = eft[[var.vname]]$tspftdbh[,n.season,,pft.bp,] - this = apply(X=this.4d,MARGIN=c(2,3,4),FUN=mean,na.rm=TRUE) + #----- Close the device. ------------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + clean.tmp() + #------------------------------------------------------------------------# + }#end for (o in 1:nout) + #---------------------------------------------------------------------------# + }#end for (e in 1:n.season) + #------------------------------------------------------------------------------# + }#end for (f in 1:(n.pft-1)) #---------------------------------------------------------------------------------# + }#end if (var.plt && is.pft) + #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# - #---------------------------------------------------------------------------------# - # Stack the PFT data. # - #---------------------------------------------------------------------------------# - this = apply(X=this,MARGIN=c(1,3),FUN=cumsum) - this = aperm(a=this,perm=c(3,2,1)) - #---------------------------------------------------------------------------------# + #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# + # Check whether to plot the comparison by DBH. # + #------------------------------------------------------------------------------------# + if (var.plt && is.pft && is.dbh){ + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + # Plot the variable difference by panel. # #---------------------------------------------------------------------------------# - # Combine simulation and size into one dimension. # - #---------------------------------------------------------------------------------# - dth = dim(this) - dnth = list( paste(rep(dimnames(this)[[1]],times=dth[2]) - ,rep(dimnames(this)[[2]],each =dth[1]) - ,sep=".") - , dimnames(this)[[3]] - )#end list - this = array(data= this,dim=c(dth[1]*dth[2],dth[3]),dimnames=dnth) - #---------------------------------------------------------------------------------# - #----- Set the title. ------------------------------------------------------------# - letitre = paste(var.desc," (Annual means) - ",longname,sep="") - lex = paste("DBH class [cm]") - ley = paste(var.desc," [",var.unit,"]",sep=" ") + + #----- Retrieve all simulations from this panel. ---------------------------------# + this = eft[[var.vname]]$tspftdbh[,,y.sel,,,n.pft] + this = apply(X = this, FUN = mean, MARGIN = c(1,4,5),na.rm=TRUE) + o.dim = dim(this)[-1] ; names(o.dim ) = c("season","dbh") + o.dname = dimnames(this)[-1] ; names(o.dname) = c("season","dbh") + o.seq = mapply( FUN = sequence, nvec = o.dim, SIMPLIFY = FALSE) #---------------------------------------------------------------------------------# - #---------------------------------------------------------------------------------# - # Find the x dimensions. # - #---------------------------------------------------------------------------------# - xleft = ( rep(sequence(n.simul),times=n.dbh) - + rep((n.simul+1)*(sequence(n.dbh)-1),each=n.simul) ) - 0.9 - xright = xleft + 0.8 - xat = seq(from=0.5*n.simul,by=n.simul+1,length.out=n.dbh) - xgrid = seq(from=0,by=n.dbh,length.out=n.simul+2)-0.5 + #----- Find the panel information. -----------------------------------------------# + p.type = simul$dim.type == "panel" + p.name = "panel" + p.ind = simul$panel$index [g.sel] + p.key = simul$key[g.sel,p.type] + p.level = list(simul$panel$level) + p.dim = simul$panel$n.level + p.seq = sequence(p.dim) + names(p.level) = "panel" #---------------------------------------------------------------------------------# + #---------------------------------------------------------------------------------# - # Find out the colour filling. # + # Retrieve the scenarios and the default for each scenario. # #---------------------------------------------------------------------------------# - fill.col = array( data = rep(pft.colour[pft.bp],each=dim(this)[1]) - , dim = dim(this)[1:2] - , dimnames = dimnames(this)[1:2] - )#end array - border.col = array( data = rep(simul$colour,times=dim(this)[2]) - , dim = dim(this)[1:2] - , dimnames = dimnames(this)[1:2] - )#end array - xleft = array( data = xleft - , dim = dim(this)[1:2] - , dimnames = dimnames(this)[1:2] - )#end array - xright = array( data = xright - , dim = dim(this)[1:2] - , dimnames = dimnames(this)[1:2] - )#end array - ybottom = this; ybottom[,-1] = ybottom[,-dim(ybottom)[2]]; ybottom[,1] = 0 - ytop = this + s.type = simul$dim.type == "scenario" + s.name = names(simul$dim[s.type]) + s.dim = simul$dim[s.type] + s.dnames = simul$panel$level + s.value = simul$value[g.sel,s.type] + s.key = simul$key[g.sel,s.type] + s.level = split(x=simul$scenario$level,f=simul$scenario$idxcol) + names(s.level) = names(simul$dim)[s.type] #---------------------------------------------------------------------------------# - #----- Find the limits for the plot. ---------------------------------------------# - xlimit = range(c(xat,xgrid)) - ylimit = pretty.xylim(u=this,fracexp=0.0,is.log=var.plog) #---------------------------------------------------------------------------------# - - - + # Find the array names, and determine the index that has the "zero" scenario # + # so the figures are relative to the reference scenario. # #---------------------------------------------------------------------------------# - # Loop over all formats. # + if (n.scenario == 1){ + s.ind = simul$scenario$index[g.sel] + zero = s.key == simul$default[s.type] + a.dim = sapply(X=c(s.dim,o.dim),FUN=c) + a.dnames = c(list(s.level),o.dname) + names(a.dnames) = c(names(simul$dim)[s.type],names(o.dim)) + }else{ + s.default = split(simul$default[s.type],index(simul$default[s.type])) + s.ind = data.frame( apply(X=simul$scenario$index,MARGIN=2,FUN="[",g.sel) + , stringsAsFactors = FALSE + )#end data.frame + zero = apply( X = mapply(FUN="==", s.key,s.default) + , MARGIN = 1 + , FUN = all + )#end apply + a.dim = sapply(X=c(p.dim,s.dim ,o.dim ),FUN=c) + a.dnames = c(p.level,s.level,o.dname) + }#end if #---------------------------------------------------------------------------------# - for (o in 1:nout){ - #----- Open file or display. --------------------------------------------------# - fichier = paste(out.barplot.year[v],"/",var.vname,"-",iata - ,"-barplot_year.",outform[o],sep="") - if (outform[o] == "x11"){ - X11(width=size$width,height=size$height,pointsize=ptsz) - }else if(outform[o] == "png"){ - png(filename=fichier,width=size$width*depth,height=size$height*depth - ,pointsize=ptsz,res=depth) - }else if(outform[o] == "eps"){ - postscript(file=fichier,width=size$width,height=size$height,pointsize=ptsz - ,paper=size$paper) - }else if(outform[o] == "pdf"){ - pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height - ,pointsize=ptsz,paper=size$paper) - }#end if - #------------------------------------------------------------------------------# - - - - #------------------------------------------------------------------------------# - # Split the window into several smaller windows. Add a bottom row to fit # - # the legend. # - #------------------------------------------------------------------------------# - par.orig = par(no.readonly = TRUE) - emat = matrix(c(3,3,1,2),ncol=2,nrow=2,byrow=T) - layout(mat=emat,heights=c(5,1)) - #------------------------------------------------------------------------------# - - - - #----- Plot simulation legend. ------------------------------------------------# - par(mar=c(0.1,0.1,0.1,0.1)) - plot.new() - plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") - legend ( x = "bottom" - , inset = 0.0 - , legend = simul$desc - , fill = simul$colour - , bg = "white" - , ncol = min(3,pretty.box(n.simul)$ncol) - , title = expression(bold("Simulation")) - , cex = 1.0 - )#end legend - #------------------------------------------------------------------------------# - - - - #----- Plot PFT legend. -------------------------------------------------------# - par(mar=c(0.1,0.1,0.1,0.1)) - plot.new() - plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") - legend ( x = "bottom" - , inset = 0.0 - , legend = pft.desc [pft.bp] - , fill = pft.colour[pft.bp] - , border = "black" - , bg = "white" - , ncol = min(3,pretty.box(n.pft.bp)$ncol) - , title = expression(bold("Plant Functional Type")) - , cex = 1.0 - )#end legend - #------------------------------------------------------------------------------# - - - - - #----- Plot window and grid. --------------------------------------------------# - par(mar=mar.orig) - plot.new() - plot.window(xlim=xlimit,ylim=ylimit,xaxt="n",yaxt="n") - axis(side=1,at=xat,labels=dbh.key) - axis(side=2) - box() - title(main=letitre,xlab=lex,ylab=ley) - if (plotgrid) abline(v=xgrid,h=axTicks(2),col="grey40",lty="solid") - #------------------------------------------------------------------------------# - - - - #----- Add the bar plot using rect, so we can change the line width. ----------# - rect( xleft = xleft - , ybottom = ybottom - , xright = xright - , ytop = ytop - , density = -1 - , col = fill.col - , border = border.col - , lwd = 2.5 - )#end rect - #------------------------------------------------------------------------------# - - - - #----- Close the device. ------------------------------------------------------# - if (outform[o] == "x11"){ - locator(n=1) - dev.off() - }else{ - dev.off() - }#end if - #------------------------------------------------------------------------------# - }#end for (o in 1:nout) - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# - }#end if (var.plt) - #------------------------------------------------------------------------------------# - }#end for (v in 1:nscen.barplot) - #=======================================================================================# - #=======================================================================================# - - - - - #=======================================================================================# - #=======================================================================================# - # Plot the parameter space. # - #---------------------------------------------------------------------------------------# - cat (" - Plotting the parameter space...","\n") - #---------------------------------------------------------------------------------------# - # Loop over Y variables. # - #---------------------------------------------------------------------------------------# - for (y in 1:nscen.yvar){ - y.vname = scen.xyz$yvar$vname[y] - y.desc = scen.xyz$yvar$desc [y] - y.unit = scen.xyz$yvar$unit [y] - y.plog = scen.xyz$yvar$plog [y] - y.leg = scen.xyz$yvar$leg [y] - y.ts = eft[[y.vname]]$ts [,season.mp,] - y.tspft = eft[[y.vname]]$tspft[,n.season,pft.mp,] - - - #----- Create indices to split the arrays into lists. -------------------------------# - ai.ts = arrayInd(sequence(length(y.ts )),.dim=dim(y.ts )) - ai.tspft = arrayInd(sequence(length(y.tspft)),.dim=dim(y.tspft)) - #------------------------------------------------------------------------------------# - - #----- Find the format of the points for the plots. ---------------------------------# - pch.ts = array( data = simul$pch[arrayInd(1:length(y.ts ),.dim=dim(y.ts ))[,3]] - , dim = dim(y.ts) - )#end array - pch.tspft = array( data = simul$pch[arrayInd(1:length(y.tspft),.dim=dim(y.tspft))[,3]] - , dim = dim(y.tspft) - )#end array - #------------------------------------------------------------------------------------# + #---------------------------------------------------------------------------------# + # Build the lists to split the array by simulation and panel. # + #---------------------------------------------------------------------------------# + if (! is.list(p.ind)) p.ind = list(p.ind) + if (! is.list(s.ind)) s.ind = list(s.ind) + #---------------------------------------------------------------------------------# - cat(" * ",y.desc,"\n") - #------------------------------------------------------------------------------------# - # Loop over X variables. # - #------------------------------------------------------------------------------------# - for (x in 1:nscen.xvar){ - x.vname = scen.xyz$xvar$vname[x] - x.desc = scen.xyz$xvar$desc [x] - x.unit = scen.xyz$xvar$unit [x] - x.plog = scen.xyz$xvar$plog [x] - x.leg = scen.xyz$xvar$leg [x] - x.ts = eft[[x.vname]]$ts [,season.mp,] - x.tspft = eft[[x.vname]]$tspft[,n.season,pft.mp,] + #---------------------------------------------------------------------------------# + # Find the zero for all simulations. # + #---------------------------------------------------------------------------------# + zero = as.matrix(expand.grid(c(list(rep(which(zero), times=prod(s.dim))),o.seq))) + this = this - this[zero] #---------------------------------------------------------------------------------# - #----- Build the log info. -------------------------------------------------------# - xy.plog="" - if (x.plog) xy.plog=paste(xy.plog,"x",sep="") - if (y.plog) xy.plog=paste(xy.plog,"y",sep="") #---------------------------------------------------------------------------------# - + # Split the stuff into panels, and create the scenario maps. # + #---------------------------------------------------------------------------------# + this = array(data=this,dim=a.dim,dimnames=a.dnames) + n.a.dim = length(a.dim) + #---------------------------------------------------------------------------------# #---------------------------------------------------------------------------------# - # Loop over Z variables. # + # Plot the data by PFT and season. # #---------------------------------------------------------------------------------# - for (z in 1:nscen.zvar){ - z.vname = scen.xyz$zvar$vname [z] - z.desc = scen.xyz$zvar$desc [z] - z.unit = scen.xyz$zvar$unit [z] - z.plog = scen.xyz$zvar$plog [z] - z.pft = scen.xyz$zvar$pftvar [z] - z.cscheme = get(scen.xyz$zvar$col.scheme[z]) - z.ts = eft[[z.vname]]$ts [,season.mp,] - if (z.pft){ - z.tspft = eft[[z.vname]]$tspft[,n.season,pft.mp,] - }else{ - z.tspft = array(NA,dim=dim(y.tspft),dimnames=dimnames(y.tspft)) - for (f in 1:n.pft.mp){ - z.tspft[,f,] = eft[[z.vname]]$ts [,n.season,] - }#end z.tspft - }#end + for (d in 1:n.dbh){ + for (e in 1:n.season){ + + #------ Keep only the current season. --------------------------------------# + bye = n.a.dim + c(-1,0) + inds = as.matrix(expand.grid(mapply(FUN=sequence,a.dim[-bye]))) + inds = cbind(inds,e,f) + this.var = array(this[inds],dim=a.dim[-bye],dimnames=a.dnames[-bye]) + #---------------------------------------------------------------------------# - cat(" ~ X = ",x.desc," Z = ",z.desc,"\n") - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# - # Split the arrays into lists. # - #------------------------------------------------------------------------------# - x.list = split(x=x.ts ,f=ai.ts[,2]) - y.list = split(x=y.ts ,f=ai.ts[,2]) - z.list = split(x=z.ts ,f=ai.ts[,2]) - pch.list = split(x=pch.ts,f=ai.ts[,2]) - #------------------------------------------------------------------------------# + + #---------------------------------------------------------------------------# + # Set the annotation and some auxiliary variables. These depend on # + # the number of scenario dimensions. # + #---------------------------------------------------------------------------# + letitre = paste("Change in mean ",var.desc + ,"\n",dbh.desc[d]," - ",season.desc[e] + ,"\n",global.desc,sep="") + if (n.scenario == 1){ + now = scenario[[1]] + n.now = length(now$key) + #------------------------------------------------------------------------# + # Find the axis limits and labels. # + #------------------------------------------------------------------------# + xlimit = pretty.xylim(u=now$value,fracexp=0.,is.log=FALSE) + ylimit = pretty.xylim(u=this.var,fracexp=0.,is.log=FALSE) + x.value = now$value + x.label = now$label + lex = now$alabel + ley = paste(var.desc," [",var.unit,"]",sep="") + #------------------------------------------------------------------------# - #------------------------------------------------------------------------------# - # Fix the titles. # - #------------------------------------------------------------------------------# - letitre = paste("Seasonal means - ",z.desc,"\n",longname,sep="") - lex = paste(x.desc," [",x.unit,"]",sep="") - ley = paste(y.desc," [",y.unit,"]",sep="") - lacle = paste("[",z.unit,"]",sep="") - #------------------------------------------------------------------------------# + }else{ + #----- Axis labels. -----------------------------------------------------# + lex = scenario[[1]]$alabel + x.value = scenario[[1]]$value + x.label = scenario[[1]]$label + ley = scenario[[2]]$alabel + y.value = scenario[[2]]$value + y.label = scenario[[2]]$label + #------------------------------------------------------------------------# + #------------------------------------------------------------------------# + # Break the values into bins. # + #------------------------------------------------------------------------# + var.scheme = two.palettes( x = this.var + , n = n.colourbar + , white = n.whitebar + , low = var.low + , high = var.high + )#end two.palettes + var.brks = var.scheme$breaks + var.colours = var.scheme$colours + n.brks = var.scheme$n.breaks + #------------------------------------------------------------------------# - #------------------------------------------------------------------------------# - # Plot the parameter space by season. # - #------------------------------------------------------------------------------# - for (o in 1:nout){ - #----- Open file or display. -----------------------------------------------# - fichier = paste(out.xyz.season[y],"/y-",y.vname,"_x-",x.vname,"_z-",z.vname - ,"-",iata,"-season.",outform[o],sep="") - if (outform[o] == "x11"){ - X11(width=size$width,height=size$height,pointsize=ptsz) - }else if(outform[o] == "png"){ - png(filename=fichier,width=size$width*depth,height=size$height*depth - ,pointsize=ptsz,res=depth) - }else if(outform[o] == "eps"){ - postscript(file=fichier,width=size$width,height=size$height - ,pointsize=ptsz,paper=size$paper) - }else if(outform[o] == "pdf"){ - pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height - ,pointsize=ptsz,paper=size$paper) + + #----- Make the edges. --------------------------------------------------# + xleft = var.brks[-n.brks] + xright = var.brks[ -1] + ybottom = rep(0,times=n.brks) + ytop = rep(1,times=n.brks) + legat = var.brks + #------------------------------------------------------------------------# }#end if #---------------------------------------------------------------------------# + #---------------------------------------------------------------------------# - # Plot the boxes. # - #---------------------------------------------------------------------------# - xyz.plot( x = x.list - , y = y.list - , z = z.list - , fixed.xlim = TRUE - , fixed.ylim = TRUE - , xy.log = xy.plog - , pch = pch.list - , cex = 1.2 - , nlevels = xyz.ncolour - , colour.palette = z.cscheme - , xyz.main = list(text=letitre) - , xyz.sub = season.mp.desc - , xyz.xlab = list(text=lex,adj=mtext.xadj,padj=mtext.xoff) - , xyz.ylab = list(text=ley,adj=mtext.yadj,padj=mtext.yoff) - , xyz.more = list(grid=list(col="grey83",lty="solid")) - , key.log = z.plog - , key.title = list(main=lacle,cex.main=0.8) - , xyz.legend = list( x = "bottom" - , inset = 0.0 - , legend = simul$desc - , pch = simul$pch - , col = "grey16" - , border = "black" - , bg = "white" - , ncol = min(3,pretty.box(n.simul)$ncol) - , title = expression(bold("Simulation")) - , cex = 1.0 - )#end legend - )#end xyz.plot + # Loop over all output formats. # #---------------------------------------------------------------------------# + for (o in 1:nout){ + #----- Get the path and create file name. -------------------------------# + if ( e == n.season){ + now.outpath = outpath[[o]]$global[[g]]$scenpaneldbh.year[d] + fichier = paste(now.outpath,"/scencomp-year-",dbh.suffix[d],"-" + ,var.vname,"-",global.suffix,".",outform[o] + ,sep="") + }else{ + now.outpath = outpath[[o]]$global[[g]]$scenpaneldbh.season[d,e] + fichier = paste(now.outpath,"/scencomp-",dbh.suffix[d],"-" + ,season.suffix[e],"-",var.vname,"-",global.suffix + ,".",outform[o],sep="") + }#end if + #------------------------------------------------------------------------# + #----- Open the file. ---------------------------------------------------# + if (outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth + ,height=size$height*depth,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE,width=size$width + ,height=size$height,pointsize=ptsz,paper=size$paper) + }#end if + #------------------------------------------------------------------------# - #----- Close the device. ---------------------------------------------------# - if (outform[o] == "x11"){ - locator(n=1) - dev.off() - }else{ - dev.off() - }#end if - #---------------------------------------------------------------------------# - }#end for - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + #----- Save the margins to avoid losing the data. -----------------------# + par.orig = par(no.readonly = TRUE) + mar.orig = par.orig$mar + #------------------------------------------------------------------------# - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# - # Split the arrays into lists. # - #------------------------------------------------------------------------------# - x.list = split(x=x.tspft ,f=ai.tspft[,2]) - y.list = split(x=y.tspft ,f=ai.tspft[,2]) - z.list = split(x=z.tspft ,f=ai.tspft[,2]) - pch.list = split(x=pch.tspft,f=ai.tspft[,2]) - #------------------------------------------------------------------------------# + #------------------------------------------------------------------------# + # Split the plotting window. # + #------------------------------------------------------------------------# + par(oma = c(0.2,3,4.5,0)) + layout( mat = rbind(lo.panel$mat+1,rep(1,times=lo.panel$ncol)) + , heights = c(rep(5/lo.panel$nrow,lo.panel$nrow),1) + )#end layout + #------------------------------------------------------------------------# - #------------------------------------------------------------------------------# - # Fix the titles. # - #------------------------------------------------------------------------------# - letitre = paste("Seasonal means - ",z.desc,"\n",longname,sep="") - lex = paste(x.desc," [",x.unit,"]",sep="") - ley = paste(y.desc," [",y.unit,"]",sep="") - lacle = paste("[",z.unit,"]",sep="") - #------------------------------------------------------------------------------# + #------------------------------------------------------------------------# + # Plot the legend. What goes into the legend depends on the number # + # of scenarios. # + #------------------------------------------------------------------------# + if (n.scenario == 1){ + par(mar=c(0.2,4.1,0.1,2.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1)) + legend( x = "bottom" + , inset = inset + , legend = now$desc + , col = now$colour + , pch = 16 + , lwd = 2.5 + , title = expression(bold(now$alabel)) + , cex = 1.0 + )#end legend + }else{ + par(mar=c(3,3,2,3)+0.1) + plot.new() + plot.window(xlim=range(xleft,xright),ylim=range(ybottom,ytop) + ,xaxs="i",yaxs="i") + rect(xleft=xleft,ybottom=ybottom,xright=xright,ytop=ytop + ,col=var.colours) + box() + axis(side=1,at=legat) + title(main=paste(var.desc," change [",var.unit,"]",sep="") + ,xlab="",ylab="") + }#end if + #------------------------------------------------------------------------# - #------------------------------------------------------------------------------# - # Plot the parameter space by season. # - #------------------------------------------------------------------------------# - for (o in 1:nout){ - #----- Open file or display. -----------------------------------------------# - fichier = paste(out.xyz.pft[y],"/y-",y.vname,"_x-",x.vname,"_z-",z.vname - ,"-",iata,"-pft.",outform[o],sep="") - if (outform[o] == "x11"){ - X11(width=size$width,height=size$height,pointsize=ptsz) - }else if(outform[o] == "png"){ - png(filename=fichier,width=size$width*depth,height=size$height*depth - ,pointsize=ptsz,res=depth) - }else if(outform[o] == "eps"){ - postscript(file=fichier,width=size$width,height=size$height - ,pointsize=ptsz,paper=size$paper) - }else if(outform[o] == "pdf"){ - pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height - ,pointsize=ptsz,paper=size$paper) - }#end if - #---------------------------------------------------------------------------# + #------------------------------------------------------------------------# + # Loop over all panels, and plot the data for this season. # + #------------------------------------------------------------------------# + loop.panel = sequence(max(1,simul$panel$n.level )) + for (p in loop.panel){ + + #----- Find out where this box goes, and set up axes and margins. ----# + left = (p %% lo.panel$ncol) == 1 || lo.panel$ncol == 1 + right = (p %% lo.panel$ncol) == 0 + top = p <= lo.panel$ncol + bottom = p > (lo.panel$nrow - 1) * lo.panel$ncol + if (n.scenario == 1){ + mar.now = c(1 + 3*bottom,1 + 1*left,1 + 2*top,1 + 1*right) + 0.1 + }else{ + mar.now = c(3 + 1*bottom,1 + 1*left,1 + 1*top,1 + 1*right) + 0.1 + }#end if + #---------------------------------------------------------------------# + + + #----- Make the sub-title. -------------------------------------------# + lesub=simul$panel$title[p] + #---------------------------------------------------------------------# + + + + #----- Set the window. -----------------------------------------------# + par(mar = mar.now) + if (n.scenario == 1){ + plot.new() + plot.window(xlim=xlimit,ylim=ylimit) + if (bottom) axis(side=1,at=x.value,labels=x.label) + if (left) axis(side=2) + box() + grid(col="grey60",lty="solid") + title(main=lesub) + abline(h=0,v=0,col="black",lty="dotdash",lwd=2.0) + for (n in 1:n.now){ + points(x = now$value,y=this.var[p,],type="o",col=now$colour[n] + ,pch=16,lwd=2.5) + }#end forscen + }else{ + image(x=scenario[[1]]$value,y=scenario[[2]]$value + ,z=this.var[p,,],col=var.colours,breaks=var.brks + ,xaxt="n",yaxt="n",main=lesub,xlab="",ylab="") + text (x=0,y=0,labels="0",col="black",font=2,cex=2) + if (bottom) axis(side=1,at=x.value,labels=x.label) + if (left) axis(side=2,at=y.value,labels=y.label) + }#end if + #---------------------------------------------------------------------# + }#end for + #------------------------------------------------------------------------# - #---------------------------------------------------------------------------# - # Plot the boxes. # - #---------------------------------------------------------------------------# - xyz.plot( x = x.list - , y = y.list - , z = z.list - , fixed.xlim = FALSE - , fixed.ylim = TRUE - , xy.log = xy.plog - , pch = pch.list - , cex = 1.2 - , nlevels = xyz.ncolour - , colour.palette = z.cscheme - , xyz.main = list(text=letitre) - , xyz.sub = pft.desc[pft.mp] - , xyz.xlab = list(text=lex,adj=mtext.xadj,padj=mtext.xoff) - , xyz.ylab = list(text=ley,adj=mtext.yadj,padj=mtext.yoff) - , xyz.more = list(grid=list(col="grey83",lty="solid")) - , key.log = z.plog - , key.title = list(main=lacle,cex.main=0.8) - , xyz.legend = list( x = "bottom" - , inset = 0.0 - , legend = simul$desc - , pch = simul$pch - , col = "grey16" - , border = "black" - , bg = "white" - , ncol = min(3,pretty.box(n.simul)$ncol) - , title = expression(bold("Simulation")) - , cex = 1.0 - )#end legend - )#end xyz.plot - #---------------------------------------------------------------------------# + #------------------------------------------------------------------------# + # Plot the global title. # + #------------------------------------------------------------------------# + par(las=0) + if (n.scenario == 1){ + mtext(side=1,text=lex ,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) + }else{ + mtext(side=1,text=lex ,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff.im) + }#end if + mtext(side=2,text=ley ,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) + mtext(side=3,text=letitre,outer=TRUE,cex=1.0,font=2) + #------------------------------------------------------------------------# - #----- Close the device. ---------------------------------------------------# - if (outform[o] == "x11"){ - locator(n=1) - dev.off() - }else{ - dev.off() - }#end if + #----- Close the device. ------------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + clean.tmp() + #------------------------------------------------------------------------# + }#end for (o in 1:nout) #---------------------------------------------------------------------------# - }#end for - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# - - - - }#end for + }#end for (e in 1:n.season) + #------------------------------------------------------------------------------# + }#end for (d in 1:n.dbh) #---------------------------------------------------------------------------------# - }#end for - #------------------------------------------------------------------------------------# - }#end for - #=======================================================================================# - #=======================================================================================# - -}#end for (p in 1:n.sites) -#------------------------------------------------------------------------------------------# + }#end if (var.plt && is.pft && is.dbh) + #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# + }#end for (v in 1:nscen.comp) + #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + rm(eft) +}#end for (g in loop.global) +#==========================================================================================# +#==========================================================================================# diff --git a/ED/Template/epost.sh b/ED/Template/epost.sh index e7721f4f9..e7b5cc553 100755 --- a/ED/Template/epost.sh +++ b/ED/Template/epost.sh @@ -55,6 +55,7 @@ idbhtype=2 # Type of DBH class # (patch-level only). # # - plot_eval_ed.r - This creates plots comparing model with eddy flux observations. # # - plot_census.r - This creates plots comparing model with biometric data. # +# - whichrun.r - This checks the run status. # # # # The following scripts should work too, but I haven't tested them. # # - plot_daily.r - This creates plots from the daily mean output. # @@ -166,6 +167,8 @@ while [ ${ff} -lt ${npolys} ] do let ff=${ff}+1 let line=${ff}+3 + + fflab="${ff}/${npolys}" #---------------------------------------------------------------------------------------# # Read the ffth line of the polygon list. There must be smarter ways of doing # @@ -323,12 +326,12 @@ do #----- Print a banner. --------------------------------------------------------------# if [ ${script} == 'plot_census.r' ] && [ ${subcens} -eq 0 ] then - "Skipping submission of ${script} for polygon: ${polyname}..." + echo "${fflab} - Skipping submission of ${script} for polygon: ${polyname}..." elif [ 'x'${submit} == 'xy' ] || [ 'x'${submit} == 'xY' ] then - echo "Submitting script ${script} for polygon: ${polyname}..." + echo "${fflab} - Submitting script ${script} for polygon: ${polyname}..." else - echo "Copying script ${script} to polygon: ${polyname}..." + echo "${fflab} - Copying script ${script} to polygon: ${polyname}..." fi #------------------------------------------------------------------------------------# @@ -551,7 +554,7 @@ do ;; - patchprops.r) + whichrun.r|patchprops.r) #---------------------------------------------------------------------------------# # Script with time-independent patch properties. No need to skip anything. # #---------------------------------------------------------------------------------# @@ -577,10 +580,20 @@ do #----- Define the job name, and the names of the output files. -------------------# - epostout='ppro_epost.out' - epostsh='ppro_epost.sh' - epostlsf='ppro_epost.lsf' - epostjob='eb-ppro-'${polyname} + case ${script} in + patchprops.r) + epostout='ppro_epost.out' + epostsh='ppro_epost.sh' + epostlsf='ppro_epost.lsf' + epostjob='eb-ppro-'${polyname} + ;; + whichrun.r) + epostout='pwhr_epost.out' + epostsh='pwhr_epost.sh' + epostlsf='pwhr_epost.lsf' + epostjob='eb-pwhr-'${polyname} + ;; + esac #---------------------------------------------------------------------------------# ;; plot_daily.r) diff --git a/ED/Template/make_joborder.r b/ED/Template/make_joborder.r new file mode 100644 index 000000000..4ab1f669a --- /dev/null +++ b/ED/Template/make_joborder.r @@ -0,0 +1,276 @@ +#==========================================================================================# +#==========================================================================================# +# Reset session. # +#------------------------------------------------------------------------------------------# +rm(list=ls()) +graphics.off() +#------------------------------------------------------------------------------------------# + + + + + +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +# Here is the user defined variable section. # +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +here = getwd() # Current directory +srcdir = "/n/moorcroft_data/mlongo/util/Rsc" # Script directory +outfile = file.path(here,"newjoborder.txt") # Job order +#------------------------------------------------------------------------------------------# + +#------------------------------------------------------------------------------------------# +# Variables that will vary (check the list below for all possibilities. # +#------------------------------------------------------------------------------------------# +rscen = c("r+000","r-020","r-040","r-060","r-080","r-100") +tscen = c("t+000","t+100","t+200","t+300") +escen = paste("real",sprintf("%2.2i",seq(from=0,to=9,by=1)),sep="-") + +scenario = apply( X = expand.grid(list(rscen,tscen,escen), stringsAsFactors = FALSE) + , MARGIN = 1 + , FUN = paste + , collapse = "_" + )#end apply + + +varrun = list( iata = c("gyf","s67","rja") + , iscenario = scenario + , iphen = c(-1,2) + , yeara = 1962 + , yearz = 2012 + , isoilflg = 2 + , istext = c(16,6,2,8,11) + )#end list +varlabel = list( iata = varrun$iata + , iscenario = scenario + , iphen = paste("iphen",sprintf("%+2.2i",varrun$iphen) ,sep="") + , yeara = "yr1962" + , yearz = "yr2012" + , isoilflg = "isoil02" + , istext = paste("stext",sprintf("%2.2i",varrun$istext),sep="") + )#end list +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +# NO NEED TO CHANGE ANYTHING BEYOND THIS POINT UNLESS YOU ARE DEVELOPING THE CODE... # +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# + + + + +#----- Load some packages and scripts. ----------------------------------------------------# +source(file.path(srcdir,"load.everything.r")) +#------------------------------------------------------------------------------------------# + + + + +#----- Check that varrun and varlabel have the same length and dimensions. ----------------# +if (length(varrun) != length(varlabel)){ + stop(" Varrun and varlabel must have the same number of variables!") +}else if (any(names(varrun) != names(varlabel))){ + stop(" Variable names of varrun and varlabel must match an be in the same order!") +}else if (any(sapply(X=varrun,FUN=length) != sapply(X=varlabel,FUN=length))){ + length.matrix = cbind( run = sapply(X=varrun ,FUN=length) + , label = sapply(X=varlabel,FUN=length) + )#end cbind + print(length.matrix) + stop(" Length of all variables in varrun and varlabel must match!") +}#end if +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# Default properties. # +#------------------------------------------------------------------------------------------# +default = list( run = "unnamed" + , iata = "xxx" + , lon = 0.00 + , lat = 0.00 + , yeara = "1967" + , montha = "01" + , daya = "01" + , timea = "0000" + , yearz = "2013" + , monthz = "01" + , dayz = "01" + , timez = "0000" + , init.mode = 6 + , iscenario = "default" + , isizepft = 0 + , isoilflg = 1 + , istext = 1 + , sand = -1.0 + , clay = -1.0 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , slzres = 0 + , queue = "long_serial" + , met.driver = "tower" + , dtlsm = 600. + , vmfact.c3 = 1.00 + , vmfact.c4 = 1.00 + , mphoto.trc3 = 9.0 + , mphoto.tec3 = 7.2 + , mphoto.c4 = 5.2 + , bphoto.blc3 = 10000. + , bphoto.nlc3 = 1000. + , bphoto.c4 = 10000. + , kw.grass = 900. + , kw.tree = 600. + , gamma.c3 = 0.0145 + , gamma.c4 = 0.035 + , d0.grass = 0.016 + , d0.tree = 0.016 + , alpha.c3 = 0.080 + , alpha.c4 = 0.055 + , klowco2 = 4000. + , decomp.scheme = 2 + , rrffact = 1.000 + , growthresp = 0.333 + , lwidth.grass = 0.05 + , lwidth.bltree = 0.10 + , lwidth.nltree = 0.05 + , q10.c3 = 2.4 + , q10.c4 = 2.4 + , h2o.limit = 2 + , imort.scheme = 1 + , ddmort.const = 0.8 + , isfclyrm = 3 + , icanturb = 2 + , ubmin = 0.65 + , ugbmin = 0.25 + , ustmin = 0.05 + , gamm = 13.0 + , gamh = 13.0 + , tprandtl = 0.74 + , ribmax = 0.50 + , atmco2 = 378. + , thcrit = -1.20 + , sm.fire = -1.40 + , ifire = 0 + , fire.parm = 0.5 + , ipercol = 0 + , runoff.time = 3600. + , imetrad = 2 + , ibranch = 1 + , icanrad = 1 + , crown.mod = 0 + , ltrans.vis = 0.050 + , lreflect.vis = 0.100 + , ltrans.nir = 0.230 + , lreflect.nir = 0.460 + , orient.tree = 0.100 + , orient.grass = 0.000 + , clump.tree = 0.800 + , clump.grass = 1.000 + , ivegtdyn = 1 + , igndvap = 0 + , iphen = -1 + , iallom = 2 + , ibigleaf = 0 + , irepro = 2 + , treefall = 0.0111 + ) #end list +#------------------------------------------------------------------------------------------# + + + + +#------------------------------------------------------------------------------------------# +# Create the full combination of runs. # +#------------------------------------------------------------------------------------------# +myruns = expand.grid(varrun,stringsAsFactors=FALSE) +nvars = ncol(myruns) +nruns = nrow(myruns) +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# Create a table with room for all simulations. # +#------------------------------------------------------------------------------------------# +joborder = data.frame(sapply(X=default,FUN=rep,times=nruns),stringsAsFactors=FALSE) +for (n in 1:nvars) joborder[[names(myruns)[n]]] = myruns[[names(myruns)[n]]] +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# Create a table with room for all simulations. # +#------------------------------------------------------------------------------------------# +poidata = poilist[match(joborder$iata,poilist$iata),] +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# Replace met driver when it is supposed to be tower data. # +#------------------------------------------------------------------------------------------# +is.tower = joborder$met.driver == "tower" +joborder$met.driver[is.tower] = poidata$met.driver[is.tower] +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# Replace other POI-specific variables as long as they are not to be specified by the # +# user settings. # +#------------------------------------------------------------------------------------------# +keep = ( names(poidata) %in% names(joborder) + & ( ! names(poidata) %in% names(myruns) ) + & ( ! names(poidata) %in% c("iata","met.driver") ) + )#end keep +poidata = poidata[,keep] +npois = ncol(poidata) +if (npois > 0){ + for (p in 1:npois) joborder[[names(poidata)[p]]] = poidata[[names(poidata)[p]]] +}#end if +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Build the name of the simulations. # +#------------------------------------------------------------------------------------------# +bye = which(sapply(X=varlabel,FUN=length) == 1) +if (length(bye) > 0) for (b in sort(bye,decreasing=TRUE)) varlabel[[b]] = NULL +runname = apply( X = expand.grid(varlabel, stringsAsFactors = FALSE) + , MARGIN = 1 + , FUN = paste + , collapse = "_" + )#end apply +metname = "s" +metname[is.tower] = "t" +joborder$run = paste(metname,runname,sep="") +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Write the joborder table. # +#------------------------------------------------------------------------------------------# +dash = sapply( FUN = paste + , X = mapply( FUN = rep + , times = nchar(names(joborder)) + , MoreArgs = list(x="-") + )#end mapply + , collapse = "") +jobneat = format(rbind(dash,toupper(names(joborder)),dash,joborder),justify="right" + ,width=nchar(names(joborder))) +jobneat = apply(X=jobneat,MARGIN=1,FUN=paste,collapse=" ") +jobneat[1] = gsub(pattern=" ",replacement="-",x=jobneat[1]) +jobneat[3] = gsub(pattern=" ",replacement="-",x=jobneat[3]) +dum = write.table(x=jobneat,file=outfile,quote=FALSE,row.names=FALSE,col.names=FALSE) +#------------------------------------------------------------------------------------------# diff --git a/ED/Template/read_monthly.sh b/ED/Template/read_monthly.sh new file mode 100755 index 000000000..8f65edd10 --- /dev/null +++ b/ED/Template/read_monthly.sh @@ -0,0 +1,517 @@ +#!/bin/bash +. ${HOME}/.bashrc +here='/xxxxxxxx/xxxxxxxx/xxx_XXX/XXXXXXXXXXX' # ! Main path +diskthere='/n/moorcroftfs2' # ! Disk where the output files are +thisqueue='moorcroft2c' # ! Queue where jobs should be submitted +lonlat=${here}'/joborder.txt' # ! File with the job instructions +#----- Outroot is the main output directory. ----------------------------------------------# +outroot='/xxxxxxxx/xxxxxxxx/xxx_XXX/XXXXXXXXXXX/figures' +submit='y' # y = Submit the script; n = Copy the script +#----- Plot only one meteorological cycle. ------------------------------------------------# +useperiod='t' # Which bounds should I use? (Ignored by plot_eval_ed.r) + # 'a' -- All period + # 't' -- One eddy flux tower met cycle + # 'u' -- User defined period, defined by the variables below. +yusera=1972 # First year to use +yuserz=2011 # Last year to use +#----- Check whether to use openlava or typical job submission. ---------------------------# +openlava='n' +#----- Yearly comparison . ----------------------------------------------------------------# +seasonmona=1 +#----- Census comparison. -----------------------------------------------------------------# +varcycle='TRUE' # Find the average mortality for various cycles (TRUE/FALSE). +#----- Hourly comparison. -----------------------------------------------------------------# +usedistrib='edf' # Which distribution to plot on top of histograms: + # norm -- Normal distribution + # sn -- Skewed normal distribution (requires package sn) + # edf -- Empirical distribution function (function density) +#----- Output format. ---------------------------------------------------------------------# +outform='c("eps","png","pdf")' # x11 - On screen (deprecated on shell scripts) + # png - Portable Network Graphics + # eps - Encapsulated Post Script + # pdf - Portable Document Format +#----- DBH classes. -----------------------------------------------------------------------# +idbhtype=2 # Type of DBH class + # 1 -- Every 10 cm until 100cm; > 100cm + # 2 -- 0-10; 10-20; 20-35; 35-50; 50-70; > 70 (cm) +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Tell whether to plot pseudo-drought or not. # +#------------------------------------------------------------------------------------------# +droughtmark="FALSE" # Should I plot a rectangle to show the drought? + # capital letters only: TRUE means yes, FALSE means no +droughtyeara=1605 # Year that the first drought instance happens (even if it is + # just the last bit) +droughtyearz=1609 # Year that the last drought instance happens (even if it + # partial) +monthsdrought="c(12,1,2,3)" # List of months that get drought, if it starts late in the + # year, put the last month first. +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# If this is an openlava run, load the openlava stuff. # +#------------------------------------------------------------------------------------------# +if [ 'x'${openlava} == 'xy' ] || [ 'x'${openlava} == 'xY' ] +then + . /opt/openlava-2.0/etc/openlava-client.sh +fi +#------------------------------------------------------------------------------------------# + + + + +#----- Check whether run_sitter.sh is still running or not. If it is, exit. --------------# +if [ -s ${here}/read_monthly.lock ] +then + exit +else + echo 'I am going to submit post-processors. Lots of them!' > ${here}/read_monthly.lock +fi +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Make sure that the directory there exists, if not, create all parent directories # +# needed. # +#------------------------------------------------------------------------------------------# +while [ ! -s ${outroot} ] +do + namecheck=`basename ${outroot}` + dircheck=`dirname ${outroot}` + while [ ! -s ${dircheck} ] && [ ${namecheck} != '/' ] + do + namecheck=`basename ${dircheck}` + dircheck=`dirname ${dircheck}` + done + + if [ ${namecheck} == '/' ] + then + echo 'Invalid disk for variable outroot:' + echo ' DISK ='${diskhere} + exit 58 + elif [ ${namecheck} == 'xxxxxxxx' ] || [ ${namecheck} == 'xxx_XXX' ] || + [ ${namecheck} == 'XXXXXXXXXXX' ] + then + echo " - Found this directory in your path: ${namecheck} ..." + echo " - Outroot given: ${outroot} ..." + echo " - It looks like you forgot to set up your outroot path, check it!" + exit 92 + else + echo 'Making directory: '${dircheck}/${namecheck} + mkdir ${dircheck}/${namecheck} + fi +done +#------------------------------------------------------------------------------------------# + + +#----- Find the disk here to create the "there" path. -------------------------------------# +moi=`whoami` +namehere=`basename ${here}` +diskhere=`dirname ${here}` +while [ ${namehere} != ${moi} ] +do + namehere=`basename ${diskhere}` + diskhere=`dirname ${diskhere}` +done +if [ 'x'${diskthere} == 'x' ] +then + there=${here} +else + there=`echo ${here} | sed s@${diskhere}@${diskthere}@g` +fi +#------------------------------------------------------------------------------------------# + + +#----- Determine the number of polygons to run. -------------------------------------------# +let npolys=`wc -l ${lonlat} | awk '{print $1 }'`-3 +echo 'Number of polygons: '${npolys}'...' +#------------------------------------------------------------------------------------------# + + + + +#------------------------------------------------------------------------------------------# +# Loop over all polygons. # +#------------------------------------------------------------------------------------------# +ff=0 +while [ ${ff} -lt ${npolys} ] +do + let ff=${ff}+1 + let line=${ff}+3 + + #---------------------------------------------------------------------------------------# + # Read the ffth line of the polygon list. There must be smarter ways of doing # + # this, but this works. Here we obtain the polygon name, and its longitude and # + # latitude. # + #---------------------------------------------------------------------------------------# + oi=`head -${line} ${lonlat} | tail -1` + polyname=`echo ${oi} | awk '{print $1 }'` + polyiata=`echo ${oi} | awk '{print $2 }'` + polylon=`echo ${oi} | awk '{print $3 }'` + polylat=`echo ${oi} | awk '{print $4 }'` + yeara=`echo ${oi} | awk '{print $5 }'` + montha=`echo ${oi} | awk '{print $6 }'` + datea=`echo ${oi} | awk '{print $7 }'` + timea=`echo ${oi} | awk '{print $8 }'` + yearz=`echo ${oi} | awk '{print $9 }'` + monthz=`echo ${oi} | awk '{print $10}'` + datez=`echo ${oi} | awk '{print $11}'` + timez=`echo ${oi} | awk '{print $12}'` + initmode=`echo ${oi} | awk '{print $13}'` + iscenario=`echo ${oi} | awk '{print $14}'` + isizepft=`echo ${oi} | awk '{print $15}'` + polyisoil=`echo ${oi} | awk '{print $16}'` + polyntext=`echo ${oi} | awk '{print $17}'` + polysand=`echo ${oi} | awk '{print $18}'` + polyclay=`echo ${oi} | awk '{print $19}'` + polydepth=`echo ${oi} | awk '{print $20}'` + polysoilbc=`echo ${oi} | awk '{print $21}'` + polysldrain=`echo ${oi} | awk '{print $22}'` + polycol=`echo ${oi} | awk '{print $23}'` + slzres=`echo ${oi} | awk '{print $24}'` + queue=`echo ${oi} | awk '{print $25}'` + metdriver=`echo ${oi} | awk '{print $26}'` + dtlsm=`echo ${oi} | awk '{print $27}'` + vmfactc3=`echo ${oi} | awk '{print $28}'` + vmfactc4=`echo ${oi} | awk '{print $29}'` + mphototrc3=`echo ${oi} | awk '{print $30}'` + mphototec3=`echo ${oi} | awk '{print $31}'` + mphotoc4=`echo ${oi} | awk '{print $32}'` + bphotoblc3=`echo ${oi} | awk '{print $33}'` + bphotonlc3=`echo ${oi} | awk '{print $34}'` + bphotoc4=`echo ${oi} | awk '{print $35}'` + kwgrass=`echo ${oi} | awk '{print $36}'` + kwtree=`echo ${oi} | awk '{print $37}'` + gammac3=`echo ${oi} | awk '{print $38}'` + gammac4=`echo ${oi} | awk '{print $39}'` + d0grass=`echo ${oi} | awk '{print $40}'` + d0tree=`echo ${oi} | awk '{print $41}'` + alphac3=`echo ${oi} | awk '{print $42}'` + alphac4=`echo ${oi} | awk '{print $43}'` + klowco2=`echo ${oi} | awk '{print $44}'` + decomp=`echo ${oi} | awk '{print $45}'` + rrffact=`echo ${oi} | awk '{print $46}'` + growthresp=`echo ${oi} | awk '{print $47}'` + lwidthgrass=`echo ${oi} | awk '{print $48}'` + lwidthbltree=`echo ${oi} | awk '{print $49}'` + lwidthnltree=`echo ${oi} | awk '{print $50}'` + q10c3=`echo ${oi} | awk '{print $51}'` + q10c4=`echo ${oi} | awk '{print $52}'` + h2olimit=`echo ${oi} | awk '{print $53}'` + imortscheme=`echo ${oi} | awk '{print $54}'` + ddmortconst=`echo ${oi} | awk '{print $55}'` + isfclyrm=`echo ${oi} | awk '{print $56}'` + icanturb=`echo ${oi} | awk '{print $57}'` + ubmin=`echo ${oi} | awk '{print $58}'` + ugbmin=`echo ${oi} | awk '{print $59}'` + ustmin=`echo ${oi} | awk '{print $60}'` + gamm=`echo ${oi} | awk '{print $61}'` + gamh=`echo ${oi} | awk '{print $62}'` + tprandtl=`echo ${oi} | awk '{print $63}'` + ribmax=`echo ${oi} | awk '{print $64}'` + atmco2=`echo ${oi} | awk '{print $65}'` + thcrit=`echo ${oi} | awk '{print $66}'` + smfire=`echo ${oi} | awk '{print $67}'` + ifire=`echo ${oi} | awk '{print $68}'` + fireparm=`echo ${oi} | awk '{print $69}'` + ipercol=`echo ${oi} | awk '{print $70}'` + runoff=`echo ${oi} | awk '{print $71}'` + imetrad=`echo ${oi} | awk '{print $72}'` + ibranch=`echo ${oi} | awk '{print $73}'` + icanrad=`echo ${oi} | awk '{print $74}'` + crown=`echo ${oi} | awk '{print $75}'` + ltransvis=`echo ${oi} | awk '{print $76}'` + lreflectvis=`echo ${oi} | awk '{print $77}'` + ltransnir=`echo ${oi} | awk '{print $78}'` + lreflectnir=`echo ${oi} | awk '{print $79}'` + orienttree=`echo ${oi} | awk '{print $80}'` + orientgrass=`echo ${oi} | awk '{print $81}'` + clumptree=`echo ${oi} | awk '{print $82}'` + clumpgrass=`echo ${oi} | awk '{print $83}'` + ivegtdyn=`echo ${oi} | awk '{print $84}'` + igndvap=`echo ${oi} | awk '{print $85}'` + iphen=`echo ${oi} | awk '{print $86}'` + iallom=`echo ${oi} | awk '{print $87}'` + ibigleaf=`echo ${oi} | awk '{print $88}'` + irepro=`echo ${oi} | awk '{print $89}'` + treefall=`echo ${oi} | awk '{print $90}'` + #---------------------------------------------------------------------------------------# + + + #----- Find time and minute. -----------------------------------------------------------# + houra=`echo ${timea} | awk '{print substr($1,1,2)}'` + minua=`echo ${timea} | awk '{print substr($1,3,2)}'` + hourz=`echo ${timez} | awk '{print substr($1,1,2)}'` + minuz=`echo ${timez} | awk '{print substr($1,3,2)}'` + #---------------------------------------------------------------------------------------# + + + #----- Retrieve some information from ED2IN. -------------------------------------------# + iphysiol=`grep -i NL%IPHYSIOL ${here}/${polyname}/ED2IN | awk '{print $3}'` + iallom=`grep -i NL%IALLOM ${here}/${polyname}/ED2IN | awk '{print $3}'` + metcyca=`grep -i NL%METCYC1 ${here}/${polyname}/ED2IN | awk '{print $3}'` + metcycz=`grep -i NL%METCYCF ${here}/${polyname}/ED2IN | awk '{print $3}'` + #---------------------------------------------------------------------------------------# + + + #---- Find the forest inventory cycle. -------------------------------------------------# + case ${polyiata} in + gyf|s67) + biocyca=2004 + biocycz=2009 + subcens=1 + ;; + s67) + biocyca=2001 + biocycz=2011 + subcens=1 + ;; + *) + biocyca=${metcyca} + biocycz=${metcycz} + subcens=0 + ;; + esac + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Switch years in case this is a specific drought run. # + #---------------------------------------------------------------------------------------# + if [ ${droughtmark} == "TRUE" ] + then + let yeara=${droughtyeara}-1 + let yearz=${droughtyearz}+1 + fi + #---------------------------------------------------------------------------------------# + + + #------ Check which period to use. -----------------------------------------------------# + if [ ${useperiod} == 't' ] + then + #------ One meteorological cycle. Check the type of meteorological driver. ---------# + if [ ${metdriver} != 'Sheffield' ] + then + thisyeara=${metcyca} + thisyearz=${metcycz} + for i in ${shiftiata} + do + if [ 'x'${i} == 'x'${polyiata} ] + then + echo ' -> Shifting met cycle' + let metcycle=${metcycz}-${metcyca}+1 + let deltayr=${shiftcycle}*${metcycle} + let thisyeara=${metcyca}+${deltayr} + let thisyearz=${metcycz}+${deltayr} + fi # end [ ${i} == ${iata} ] + done #end for i in ${shiftiata} + else + thisyeara=${metcyca} + thisyearz=${metcycz} + fi # end [ ${metdriver} != 'Sheffield' ] + #------------------------------------------------------------------------------------# + + elif [ ${useperiod} == 'u' ] + then + #----- The user said which period to use. -------------------------------------------# + thisyeara=${yusera} + thisyearz=${yuserz} + #------------------------------------------------------------------------------------# + else + #----- Grab all years that the simulation is supposed to run. -----------------------# + thisyeara=${yeara} + thisyearz=${yearz} + #------------------------------------------------------------------------------------# + fi # end [ ${useperiod} == 't' ] + #---------------------------------------------------------------------------------------# + + + + #----- Set up months and days. ---------------------------------------------------------# + thismontha=${montha} + thismonthz=${monthz} + thisdatea=${datea} + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Define the job name, and the names of the output files. # + #---------------------------------------------------------------------------------------# + epostout='rmon_epost.out' + epostsh='rmon_epost.sh' + epostlsf='rmon_epost.lsf' + epostjob='eb-rmon-'${polyname} + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Check the status of the run. # + #---------------------------------------------------------------------------------------# + statrun=${here}/${polyname}/statusrun.txt + if [ -s ${statrun} ] + then + runt=`cat ${statrun} | awk '{print $6}'` + else + runt='INITIAL' + fi + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # We submit only the jobs that haven't finished. If the job has just finished, we # + # submit once again, but save a file to remember that this polygon is loaded. # + #---------------------------------------------------------------------------------------# + fullload="${here}/${polyname}/qfiles_loaded.txt" + if [ ${runt} == "INITIAL" ] + then + submitnow="n" + echo "${ff} - ${polyname} : polygon hasn't started yet" + + elif [ ${runt} == "THE_END" ] && [ -s ${fullload} ] + then + #----- Job has ended and all files have been processed. -----------------------------# + submitnow="n" + #------------------------------------------------------------------------------------# + + echo "${ff} - ${polyname} : polygon is already loaded or queued for the last time" + + elif [ ${runt} == "THE_END" ] + then + #------------------------------------------------------------------------------------# + # Job has ended but loading is not complete. Run for one last time. # + #------------------------------------------------------------------------------------# + #----- Check that the script is not in the queue. -----------------------------------# + inqueue=`bjobs -w -q ${thisqueue} -J ${epostjob} 2> /dev/null | wc -l` + if [ ${inqueue} -eq 0 ] + then + #----- Save the time to the file that will block future submissions. -------------# + when=`date +'%d %B %Y - %R %Z'` + echo "Last submission on ${when}" > ${fullload} + #---------------------------------------------------------------------------------# + + submitnow="y" + echo "${ff} - ${polyname}: run has finished! Submit script for the last time." + else + submitnow="n" + echo "${ff} - ${polyname}: post-processor job has already been queued." + fi + #------------------------------------------------------------------------------------# + else + #------------------------------------------------------------------------------------# + # Job is still running or it has started again... Remove the blocker and # + # re-submit if the post-processor is not queued. # + #------------------------------------------------------------------------------------# + #----- Delete the blocker. ----------------------------------------------------------# + /bin/rm -f ${fullload} + #----- Check that the script is not in the queue. -----------------------------------# + inqueue=`bjobs -w -q ${thisqueue} -J ${epostjob} 2> /dev/null | wc -l` + if [ ${inqueue} -eq 0 ] + then + submitnow="y" + echo "${ff} - ${polyname}: submit post-processor script." + else + submitnow="n" + echo "${ff} - ${polyname}: post-processor job has already been queued." + fi + #------------------------------------------------------------------------------------# + fi + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find out whether the job is on the queue. In case it is not, re-submit. # + #---------------------------------------------------------------------------------------# + if [ "x${submitnow}" == "xy" ] + then + + #----- Copy the R script from the Template folder to the local path. ----------------# + cp -f ${here}/Template/read_monthly.r ${here}/${polyname} + scriptnow=${here}/${polyname}/read_monthly.r + #------------------------------------------------------------------------------------# + + + + #----- Switch the keywords by the current settings. ---------------------------------# + sed -i s@thispoly@${polyname}@g ${scriptnow} + sed -i s@thisoutroot@${outroot}@g ${scriptnow} + sed -i s@thispath@${here}@g ${scriptnow} + sed -i s@thatpath@${there}@g ${scriptnow} + sed -i s@thisyeara@${thisyeara}@g ${scriptnow} + sed -i s@thismontha@${thismontha}@g ${scriptnow} + sed -i s@thisdatea@${thisdatea}@g ${scriptnow} + sed -i s@thishoura@${houra}@g ${scriptnow} + sed -i s@thisminua@${minua}@g ${scriptnow} + sed -i s@thisyearz@${thisyearz}@g ${scriptnow} + sed -i s@thismonthz@${thismonthz}@g ${scriptnow} + sed -i s@thisdatez@${datez}@g ${scriptnow} + sed -i s@thishourz@${hourz}@g ${scriptnow} + sed -i s@thisminuz@${minuz}@g ${scriptnow} + sed -i s@thisseasonmona@${seasonmona}@g ${scriptnow} + sed -i s@myphysiol@${iphysiol}@g ${scriptnow} + sed -i s@myallom@${iallom}@g ${scriptnow} + sed -i s@mydroughtmark@${droughtmark}@g ${scriptnow} + sed -i s@mydroughtyeara@${droughtyeara}@g ${scriptnow} + sed -i s@mydroughtyearz@${droughtyearz}@g ${scriptnow} + sed -i s@mymonthsdrought@${monthsdrought}@g ${scriptnow} + sed -i s@myvarcycle@${varcycle}@g ${scriptnow} + sed -i s@thisoutform@${outform}@g ${scriptnow} + sed -i s@mydistrib@${usedistrib}@g ${scriptnow} + sed -i s@mymetcyca@${metcyca}@g ${scriptnow} + sed -i s@mymetcycz@${metcycz}@g ${scriptnow} + sed -i s@mybiocyca@${biocyca}@g ${scriptnow} + sed -i s@mybiocycz@${biocycz}@g ${scriptnow} + sed -i s@myidbhtype@${idbhtype}@g ${scriptnow} + #------------------------------------------------------------------------------------# + + + + #----- Run R to get the plots. ------------------------------------------------------# + rbin="R CMD BATCH --no-save --no-restore" + comm="${rbin} ${scriptnow} ${here}/${polyname}/${epostout}" + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # plot_eval_ed won't run all at once due to the sheer number of HDF5 files. # + # Run it several times until it is complete. # + #------------------------------------------------------------------------------------# + echo '#!/bin/bash' > ${here}/${polyname}/${epostsh} + echo ${comm} >> ${here}/${polyname}/${epostsh} + chmod +x ${here}/${polyname}/${epostsh} + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Submit the job according to the style (LSF or openlava). # + #------------------------------------------------------------------------------------# + if [ 'x'${submit} == 'xy' ] || [ 'x'${submit} == 'xY' ] + then + #------ Check whether to use openlava or LSF. ------------------------------------# + if [ 'x'${openlava} == 'xy' ] || [ 'x'${openlava} == 'xY' ] + then + bsub="iobsub -J ${epostjob} -o ${here}/${polyname}/${epostlsf}" + bsub="${bsub} ${here}/${polyname}/${epostsh} 1> /dev/null 2> /dev/null" + else + bsub="bsub -q ${thisqueue} -J ${epostjob} -o ${here}/${polyname}/${epostlsf}" + bsub="${bsub} ${here}/${polyname}/${epostsh} 1> /dev/null 2> /dev/null" + fi + #---------------------------------------------------------------------------------# + ${bsub} + fi + #------------------------------------------------------------------------------------# + fi + #---------------------------------------------------------------------------------------# +done +#------------------------------------------------------------------------------------------# + +/bin/rm -f ${here}/read_monthly.lock diff --git a/ED/Template/run_sitter.sh b/ED/Template/run_sitter.sh index 4a72e591f..5ff07ddb0 100755 --- a/ED/Template/run_sitter.sh +++ b/ED/Template/run_sitter.sh @@ -26,20 +26,47 @@ fi #------------------------------------------------------------------------------------------# +#----- Where the output is. ---------------------------------------------------------------# +there=${here} +#------------------------------------------------------------------------------------------# + + #----- Path with some utilities for run_sitter.sh (this script). --------------------------# situtils="${here}/sit_utils" #------------------------------------------------------------------------------------------# -#----- Where the output is. ---------------------------------------------------------------# -there=${here} +#----- Path where biomass initialisation files are: ---------------------------------------# +bioinit='/n/moorcroft_data/mlongo/data/ed2_data/site_bio_data' #------------------------------------------------------------------------------------------# + +#------------------------------------------------------------------------------------------# +# desc -- Unique job description for these simulations (it really must be unique). # +# Normally it is the path name. # +# runtitle -- Full name of this simulation, this is used only in the e-mail subject. # +#------------------------------------------------------------------------------------------# +desc=`basename ${here}` +runtitle="Drought/warming scenario" +#------------------------------------------------------------------------------------------# + + + #----- User name, usually set by `whoami` so you don't need to change it. -----------------# moi=`whoami` #------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +# Met driver location settings. # +# copy2scratch -- Should the met driver be copied to local scratch disks? ("y"|"n") # +# packdatasrc -- Source path from where to copy to scratch. # +#------------------------------------------------------------------------------------------# +copy2scratch='y' +packdatasrc='/n/moorcroft_data/mlongo/data/tower_scratch' +#------------------------------------------------------------------------------------------# + + #------------------------------------------------------------------------------------------# # Main actions. # # printevery -- when looping through jobs, print something on screen every printevery # @@ -100,22 +127,22 @@ ccc='/n/Moorcroft_Lab/Users/mlongo/util/calc.sh' # Calculator #------------------------------------------------------------------------------------------# #------ Queue: moorcroft2a. ---------------------------------------------------------------# m2afull=96 -m2aumax=80 +m2aumax=48 #------ Queue: moorcroft2b. ---------------------------------------------------------------# m2bfull=88 m2bumax=88 #------ Queue: moorcroft2c. ---------------------------------------------------------------# -m2cfull=64 +m2cfull=0 m2cumax=64 #------ Queue: moorcroft_6100a. -----------------------------------------------------------# a61full=48 -a61umax=36 +a61umax=18 #------ Queue: moorcroft_6100b. -----------------------------------------------------------# b61full=480 -b61umax=380 +b61umax=320 #------ Queue: wofsy. ---------------------------------------------------------------------# wsyfull=96 -wsyumax=24 +wsyumax=48 #------ Queue: unrestricted_serial. -------------------------------------------------------# usefull=80 useumax=80 @@ -126,22 +153,33 @@ upapmax=0 #------------------------------------------------------------------------------------------# # E-mail options (normally only the first three options may require changes. # -# email1day -- Should I e-mail once a day (1) or every time I run (0)? # -# recipient -- To which e-mail should I send the update? # -# plotstatus -- Plot the current status of the run (you will need to edit the R script # -# for each simulation). 0: no; 1: yes # -# emailbody -- File that will contain the e-mail. # -# headfile -- File with header # -# tailfile -- File with "bye" # -# recefile -- File with the recent activity # -# statfile -- File with the current status # -# queuefile -- File with queue status # -# pendfile -- File with pending status # -# email1day -- Reminder so the script knows whether an e-mail has been sent or not. # +# email1day -- Should I e-mail once a day (1) or every time I run (0)? # +# recipient -- To which e-mail should I send the update? # +# plotstatus -- Plot the current status of the run (you will need to create some R # +# script for each simulation). 0: no; 1: yes # +# Rscript_plot -- Script that you want to run to generate some plots. # +# R_figlist -- List with figure names (you must list all files you want to append) # +# emailbody -- File that will contain the e-mail. # +# headfile -- File with header # +# tailfile -- File with "bye" # +# recefile -- File with the recent activity # +# statfile -- File with the current status # +# queuefile -- File with queue status # +# pendfile -- File with pending status # +# email1day -- Reminder so the script knows whether an e-mail has been sent or not. # #------------------------------------------------------------------------------------------# email1day=1 recipient='xxxxxx@xxxx.com' -plotstatus='n' +plotstatus=1 +Rscript_plot="${situtils}/plot.status.r" +R_figlist="${situtils}/stt_stext16.png + ${situtils}/stt_stext06.png + ${situtils}/agb_stext16.png + ${situtils}/agb_stext06.png + ${situtils}/bsa_stext16.png + ${situtils}/bsa_stext06.png + ${situtils}/lai_stext16.png + ${situtils}/lai_stext06.png" emailbody="${situtils}/email.txt" headfile="${situtils}/head.txt" tailfile="${situtils}/tail.txt" @@ -168,12 +206,6 @@ unparun=${here}'/unparun.sh' -#----- Unique job description for these simulations (it really must be unique). -----------# -desc=`basename ${here}` -#------------------------------------------------------------------------------------------# - - - #==========================================================================================# @@ -216,6 +248,20 @@ fi #------------------------------------------------------------------------------------------# +#----- Set the main path for the site, pseudo past and Sheffield met drivers. -------------# +if [ ${copy2scratch} == 'y' -o ${copy2scratch} == 'Y' ] +then + sitemet='/scratch/mlongo/met_driver/site_met_driver' + scenariopath='/scratch/mlongo/met_driver/realisation_scen_driver' + shefpath='/scratch/mlongo/met_driver/sheffield' +else + sitemet=${sitemetdef} + scenariopath=${scenariopathdef} + shefpath='' +fi +#------------------------------------------------------------------------------------------# + + #----- Determine the number of polygons to check. -----------------------------------------# let npolys=`wc -l ${joborder} | awk '{print $1 }'`-3 @@ -231,6 +277,7 @@ echo 'Number of polygons: '${npolys}'...' ff=0 # Polygon counter. nstart=0 # Number of new polygons that initialised nmetmiss=0 # Number of new polygons that crashed due to missing met driver +nsigsegv=0 # Number of new polygons that crashed due to segmentation violation nstopped=0 # Number of new polygons that crashed due to unknown reason ncrashed=0 # Number of new polygons that crashed due to numeric instability newststate=0 # Number of new polygons at steady state @@ -262,16 +309,6 @@ then do let ff=${ff}+1 let line=${ff}+3 - let rem=${ff}%${printevery} - - #------------------------------------------------------------------------------------# - # Plot a banner to entertain the user. # - #------------------------------------------------------------------------------------# - if [ ${rem} -eq 0 -o ${ff} -eq ${npolys} ] - then - echo ' - Checked '${ff}' polygons so far...' - fi - #------------------------------------------------------------------------------------# @@ -280,7 +317,7 @@ then # ing this, but this works. Here we obtain the polygon name, and its longitude and # # latitude. # #------------------------------------------------------------------------------------# - oi=`head -${line} ${lonlat} | tail -1` + oi=`head -${line} ${joborder} | tail -1` polyname=`echo ${oi} | awk '{print $1 }'` polyiata=`echo ${oi} | awk '{print $2 }'` polylon=`echo ${oi} | awk '{print $3 }'` @@ -374,6 +411,643 @@ then #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Define whether we use the met cycle to define the first and last year, or the # + # default year. # + #------------------------------------------------------------------------------------# + if [ ${yeara} -eq 0 ] + then + thisyeara=${metcyc1} + else + thisyeara=${yeara} + fi + if [ ${yearz} -eq 0 ] + then + thisyearz=${metcycf} + else + thisyearz=${yearz} + fi + #------------------------------------------------------------------------------------# + + + + + #------------------------------------------------------------------------------------# + # Determine which soil profile to use. We have eight categories (A-H), and the # + # soil resolution. # + #------------------------------------------------------------------------------------# + polyslz1='' + polyslz2='' + polyslz3='' + polyslz4='' + polyslz5='' + polyslz6='' + polyslz7='' + polyslm1='' + polyslm2='' + polyslm3='' + polyslm4='' + polyslm5='' + polyslm6='' + polyslm7='' + polyslt1='' + polyslt2='' + polyslt3='' + polyslt4='' + polyslt5='' + polyslt6='' + polyslt7='' + case ${slzres} in + 0) + case ${polydepth} in + A) + polynzg=16 + polyslz1='-1.250,-1.135,-1.024,-0.917,-0.814,-0.715,-0.620,-0.530,-0.445,-0.364,' + polyslz2='-0.289,-0.221,-0.158,-0.103,-0.056,-0.020' + polyslm1=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslm2=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000' + polyslt1=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslt2=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000' + ;; + B) + polynzg=16 + polyslz1='-2.000,-1.797,-1.602,-1.417,-1.240,-1.073,-0.916,-0.769,-0.632,-0.507,' + polyslz2='-0.392,-0.290,-0.200,-0.124,-0.063,-0.020' + polyslm1=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslm2=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000' + polyslt1=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslt2=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000' + ;; + C) + polynzg=16 + polyslz1='-3.000,-2.670,-2.357,-2.061,-1.784,-1.524,-1.283,-1.061,-0.857,-0.673,' + polyslz2='-0.510,-0.367,-0.245,-0.146,-0.070,-0.020' + polyslm1=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslm2=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000' + polyslt1=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslt2=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000' + ;; + D) + polynzg=16 + polyslz1='-4.000,-3.536,-3.099,-2.690,-2.308,-1.955,-1.629,-1.332,-1.064,-0.824,' + polyslz2='-0.614,-0.433,-0.283,-0.163,-0.075,-0.020' + polyslm1=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslm2=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000' + polyslt1=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslt2=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000' + ;; + E) + polynzg=16 + polyslz1='-4.500,-3.967,-3.467,-3.000,-2.565,-2.164,-1.797,-1.462,-1.162,-0.895,' + polyslz2='-0.662,-0.464,-0.300,-0.171,-0.077,-0.020' + polyslm1=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslm2=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000' + polyslt1=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslt2=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000' + ;; + F) + polynzg=16 + polyslz1='-6.000,-5.254,-4.559,-3.914,-3.320,-2.776,-2.282,-1.837,-1.442,-1.095,' + polyslz2='-0.798,-0.548,-0.346,-0.192,-0.083,-0.020' + polyslm1=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslm2=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000' + polyslt1=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslt2=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000' + ;; + G) + polynzg=16 + polyslz1='-7.000,-6.108,-5.279,-4.514,-3.812,-3.172,-2.593,-2.076,-1.618,-1.221,' + polyslz2='-0.881,-0.600,-0.374,-0.204,-0.087,-0.020' + polyslm1=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslm2=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000' + polyslt1=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslt2=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000' + ;; + H) + polynzg=16 + polyslz1='-8.000,-6.959,-5.995,-5.108,-4.296,-3.560,-2.897,-2.307,-1.789,-1.340,' + polyslz2='-0.961,-0.648,-0.400,-0.215,-0.089,-0.020' + polyslm1=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslm2=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000' + polyslt1=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslt2=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000' + ;; + *) + polynzg=16 + polyslz1='-8.000,-6.959,-5.995,-5.108,-4.296,-3.560,-2.897,-2.307,-1.789,-1.340,' + polyslz2='-0.961,-0.648,-0.400,-0.215,-0.089,-0.020' + polyslm1=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslm2=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000' + polyslt1=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslt2=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000' + ;; + esac + ;; + 1) + case ${polydepth} in + A) + polynzg='30' + polyslz1='-1.329,-1.246,-1.168,-1.093,-1.022,-0.955,-0.890,-0.829,-0.770,-0.714,' + polyslm1=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt1=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz2='-0.661,-0.611,-0.563,-0.517,-0.473,-0.432,-0.392,-0.354,-0.318,-0.284,' + polyslm2=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt2=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz3='-0.252,-0.221,-0.191,-0.163,-0.136,-0.111,-0.086,-0.063,-0.041,-0.020' + polyslm3=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000' + polyslt3=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000' + ;; + B) + polynzg='37' + polyslz1='-2.033,-1.917,-1.806,-1.701,-1.601,-1.506,-1.415,-1.329,-1.246,-1.168,' + polyslm1=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt1=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz2='-1.093,-1.022,-0.955,-0.890,-0.829,-0.770,-0.714,-0.661,-0.611,-0.563,' + polyslm2=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt2=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz3='-0.517,-0.473,-0.432,-0.392,-0.354,-0.318,-0.284,-0.252,-0.221,-0.191,' + polyslm3=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt3=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz4='-0.163,-0.136,-0.111,-0.086,-0.063,-0.041,-0.020' + polyslm4=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000' + polyslt4=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000' + ;; + C) + polynzg='44' + polyslz1='-3.023,-2.860,-2.705,-2.557,-2.416,-2.282,-2.154,-2.033,-1.917,-1.806,' + polyslm1=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt1=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz2='-1.701,-1.601,-1.506,-1.415,-1.329,-1.246,-1.168,-1.093,-1.022,-0.955,' + polyslm2=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt2=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz3='-0.890,-0.829,-0.770,-0.714,-0.661,-0.611,-0.563,-0.517,-0.473,-0.432,' + polyslm3=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt3=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz4='-0.392,-0.354,-0.318,-0.284,-0.252,-0.221,-0.191,-0.163,-0.136,-0.111,' + polyslm4=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt4=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz5='-0.086,-0.063,-0.041,-0.020' + polyslm5=' 1.000, 1.000, 1.000, 1.000' + polyslt5=' 0.000, 0.000, 0.000, 0.000' + ;; + D) + polynzg='50' + polyslz1='-4.187,-3.969,-3.761,-3.562,-3.374,-3.194,-3.023,-2.860,-2.705,-2.557,' + polyslm1=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt1=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz2='-2.416,-2.282,-2.154,-2.033,-1.917,-1.806,-1.701,-1.601,-1.506,-1.415,' + polyslm2=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt2=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz3='-1.329,-1.246,-1.168,-1.093,-1.022,-0.955,-0.890,-0.829,-0.770,-0.714,' + polyslm3=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt3=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz4='-0.661,-0.611,-0.563,-0.517,-0.473,-0.432,-0.392,-0.354,-0.318,-0.284,' + polyslm4=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt4=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz5='-0.252,-0.221,-0.191,-0.163,-0.136,-0.111,-0.086,-0.063,-0.041,-0.020' + polyslm5=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000' + polyslt5=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000' + ;; + E) + polynzg='52' + polyslz1='-4.657,-4.416,-4.187,-3.969,-3.761,-3.562,-3.374,-3.194,-3.023,-2.860,' + polyslm1=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt1=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz2='-2.705,-2.557,-2.416,-2.282,-2.154,-2.033,-1.917,-1.806,-1.701,-1.601,' + polyslm2=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt2=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz3='-1.506,-1.415,-1.329,-1.246,-1.168,-1.093,-1.022,-0.955,-0.890,-0.829,' + polyslm3=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt3=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz4='-0.770,-0.714,-0.661,-0.611,-0.563,-0.517,-0.473,-0.432,-0.392,-0.354,' + polyslm4=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt4=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz5='-0.318,-0.284,-0.252,-0.221,-0.191,-0.163,-0.136,-0.111,-0.086,-0.063,' + polyslm5=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt5=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz6='-0.041,-0.020' + polyslm6=' 1.000, 1.000' + polyslt6=' 0.000, 0.000' + ;; + F) + polynzg='58' + polyslz1='-6.157,-5.907,-5.657,-5.407,-5.157,-4.907,-4.657,-4.416,-4.187,-3.969,' + polyslm1=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt1=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz2='-3.761,-3.562,-3.374,-3.194,-3.023,-2.860,-2.705,-2.557,-2.416,-2.282,' + polyslm2=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt2=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz3='-2.154,-2.033,-1.917,-1.806,-1.701,-1.601,-1.506,-1.415,-1.329,-1.246,' + polyslm3=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt3=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz4='-1.168,-1.093,-1.022,-0.955,-0.890,-0.829,-0.770,-0.714,-0.661,-0.611,' + polyslm4=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt4=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz5='-0.563,-0.517,-0.473,-0.432,-0.392,-0.354,-0.318,-0.284,-0.252,-0.221,' + polyslm5=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt5=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz6='-0.191,-0.163,-0.136,-0.111,-0.086,-0.063,-0.041,-0.020' + polyslm6=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000' + polyslt6=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000' + ;; + G) + polynzg='62' + polyslz1='-7.157,-6.907,-6.657,-6.407,-6.157,-5.907,-5.657,-5.407,-5.157,-4.907,' + polyslm1=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt1=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz2='-4.657,-4.416,-4.187,-3.969,-3.761,-3.562,-3.374,-3.194,-3.023,-2.860,' + polyslm2=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt2=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz3='-2.705,-2.557,-2.416,-2.282,-2.154,-2.033,-1.917,-1.806,-1.701,-1.601,' + polyslm3=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt3=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz4='-1.506,-1.415,-1.329,-1.246,-1.168,-1.093,-1.022,-0.955,-0.890,-0.829,' + polyslm4=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt4=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz5='-0.770,-0.714,-0.661,-0.611,-0.563,-0.517,-0.473,-0.432,-0.392,-0.354,' + polyslm5=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt5=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz6='-0.318,-0.284,-0.252,-0.221,-0.191,-0.163,-0.136,-0.111,-0.086,-0.063,' + polyslm6=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt6=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz7='-0.041,-0.020' + polyslm7=' 1.000, 1.000' + polyslt7=' 0.000, 0.000' + ;; + H) + polynzg='66' + polyslz1='-8.157,-7.907,-7.657,-7.407,-7.157,-6.907,-6.657,-6.407,-6.157,-5.907,' + polyslm1=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt1=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz2='-5.657,-5.407,-5.157,-4.907,-4.657,-4.416,-4.187,-3.969,-3.761,-3.562,' + polyslm2=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt2=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz3='-3.374,-3.194,-3.023,-2.860,-2.705,-2.557,-2.416,-2.282,-2.154,-2.033,' + polyslm3=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt3=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz4='-1.917,-1.806,-1.701,-1.601,-1.506,-1.415,-1.329,-1.246,-1.168,-1.093,' + polyslm4=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt4=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz5='-1.022,-0.955,-0.890,-0.829,-0.770,-0.714,-0.661,-0.611,-0.563,-0.517,' + polyslm5=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt5=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz6='-0.473,-0.432,-0.392,-0.354,-0.318,-0.284,-0.252,-0.221,-0.191,-0.163,' + polyslm6=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000,' + polyslt6=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,' + polyslz7='-0.136,-0.111,-0.086,-0.063,-0.041,-0.020' + polyslm7=' 1.000, 1.000, 1.000, 1.000, 1.000, 1.000' + polyslt7=' 0.000, 0.000, 0.000, 0.000, 0.000, 0.000' + ;; + *) + ;; + esac + ;; + esac + #------------------------------------------------------------------------------------# + + + + + + #------------------------------------------------------------------------------------# + # Determine which PFTs to use based on the "iata" code and isizepft. # + #------------------------------------------------------------------------------------# + case ${isizepft} in + 0|1) + case ${polyiata} in + tzi|zmh|nqn) + pfts='6,7,9,10,11,16,17' + crop=16 + plantation=17 + ;; + hvd|wch|tqh) + pfts='6,8,9,10,11,16,17' + crop=16 + plantation=17 + ;; + asu|cnf|bnu|cwb|erm|iqq|ipv|mgf|rao|sla|zpe|kna|sfn) + pfts='1,2,3,4,16,17' + crop=16 + plantation=17 + ;; + fns*) + pfts='1,16' + crop=1 + plantation=17 + ;; + s77*) + pfts='1,16' + crop=16 + plantation=17 + ;; + *) + pfts='1,2,3,4,16' + crop=1 + plantation=3 + ;; + esac + ;; + 2) + case ${polyiata} in + tzi|zmh|nqn|hvd|wch|tqh) + pfts='10,16' + crop=16 + plantation=17 + ;; + fns*|s77*) + pfts='1' + crop=1 + plantation=17 + ;; + *) + pfts='1,3' + crop=1 + plantation=3 + ;; + esac + ;; + esac + #------------------------------------------------------------------------------------# + + + + + + #------------------------------------------------------------------------------------# + # Determine the census structure. # + #------------------------------------------------------------------------------------# + let yodd=${yeara}%2 + case ${polyiata} in + gyf) + dtcensus=24 + let yr1stcensus=${yeara}+${yodd} + mon1stcensus=7 + minrecruitdbh=10 + ;; + s67) + dtcensus=24 + let yr1stcensus=${yeara}+1-${yodd} + mon1stcensus=7 + minrecruitdbh=10 + ;; + *) + dtcensus=1 + yr1stcensus=${yeara} + mon1stcensus=1 + minrecruitdbh=10 + ;; + esac + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Find the biometric files. This has been checked in spawn_poly.sh so they are # + # correct. Add a dummy name in case this is not supposed to be a biomass # + # initialisation run. # + #------------------------------------------------------------------------------------# + case ${isizepft} in + 0) + #----- Frankeinstein's under storey. ---------------------------------------------# + thisbiomin="${bioinit}/${polyiata}_default." + ;; + 1) + #----- No under storey. ----------------------------------------------------------# + thisbiomin="${bioinit}/${polyiata}_nounder." + ;; + 2) + #----- Same as default, but with only one grass and one tree. --------------------# + thisbiomin="${bioinit}/${polyiata}_twopft." + ;; + *) + thisbiomin="${bioinit}/${polyiata}_nothing." + ;; + esac + #------------------------------------------------------------------------------------# + + + + + #------------------------------------------------------------------------------------# + # Choose the scenario to use. Iscenario follows the following convention: # + # "default" -- No scenario. Use the tower/Sheffield data. # + # "rRRR_tTTT -- Use scenarios, with rRRRR controlling the rainfall, and tTTTT # + # controlling temperature. # + # # + # rRRR -- Rainfall scenarios, where rRRRR means: # + # r+000: INMET-based time series, no resampling. # + # r+010: Re-sampling with substitution, but equal chances for all # + # years # + # r-XXX: Shift the location (similar to mean) of the distribution by # + # -X.XX units of scale (similar to standard deviation), so # + # the time series becomes drier. # + # r+XXX: Similar to above, but make the time series wetter. # + # # + # tTTT -- Temperature scenarios, where tTTTT means: # + # t+000: No change in temperature # + # t-YYY: Change temperature by -Y.YY Kelvin. Keep relative humidity # + # the same and correct specific humidity. # + # t+YYY: Change temperature by +Y.YY Kelvin. Keep relative humidity # + # the same and correct by +Y.YY Kelvin. # + # r+XXX: Similar to above, but make the time series wetter. # + #------------------------------------------------------------------------------------# + if [ ${iscenario} == "default" ] + then + #---------------------------------------------------------------------------------# + # Determine which meteorological data set to use. Default is the # + # Sheffield/NCEP dataset, otherwise the site-level tower data is used. # + #---------------------------------------------------------------------------------# + case ${metdriver} in + Bananal) + metdriverdb=${sitemet}'/Bananal/Bananal_HEADER' + metcyc1=2004 + metcycf=2006 + imetavg=1 + ;; + Caxiuana) + metdriverdb=${sitemet}'/Caxiuana/Caxiuana_HEADER' + metcyc1=1999 + metcycf=2003 + imetavg=1 + ;; + Fazenda_Nossa_Senhora) + metdriverdb=${sitemet}'/Fazenda_Nossa_Senhora/Fazenda_Nossa_Senhora_HEADER' + metcyc1=1999 + metcycf=2002 + imetavg=1 + ;; + Harvard) + metdriverdb=${sitemet}'/Harvard/Harvard_HEADER' + metcyc1=1992 + metcycf=2003 + imetavg=1 + ;; + Manaus_Km34) + metdriverdb=${sitemet}'/Manaus_Km34/Manaus_Km34_HEADER' + metcyc1=1999 + metcycf=2005 + imetavg=1 + ;; + Paracou) + metdriverdb=${sitemet}'/Paracou/Paracou_HEADER' + metcyc1=2004 + metcycf=2009 + imetavg=1 + ;; + Pe-de-Gigante) + metdriverdb=${sitemet}'/Pe-de-Gigante/Pe-de-Gigante_HEADER' + metcyc1=2001 + metcycf=2003 + imetavg=1 + ;; + Petrolina) + metdriverdb=${sitemet}'/Petrolina/Petrolina_HEADER' + metcyc1=2004 + metcycf=2011 + imetavg=1 + ;; + Rebio_Jaru) + metdriverdb=${sitemet}'/Rebio_Jaru/Rebio_Jaru_HEADER' + metcyc1=1999 + metcycf=2002 + imetavg=1 + ;; + Santarem_Km67) + metdriverdb=${sitemet}'/Santarem_Km67/Santarem_Km67_HEADER' + metcyc1=2001 + metcycf=2010 + imetavg=1 + ;; + Santarem_Km77) + metdriverdb=${sitemet}'/Santarem_Km77/Santarem_Km77_HEADER' + metcyc1=2001 + metcycf=2005 + imetavg=1 + ;; + Santarem_Km83) + metdriverdb=${sitemet}'/Santarem_Km83/Santarem_Km83_HEADER' + metcyc1=2000 + metcycf=2003 + imetavg=1 + ;; + Sheffield) + if [ 'x'${shefpath} == 'x' ] + then + metdriverdb=${here}/${polyname}/${shefhead} + else + metdriverdb=${shefpath}/${shefhead} + fi + metcyc1=1969 + metcycf=2008 + imetavg=2 + ;; + Tonzi) + metdriverdb=${sitemet}'/Tonzi/Tonzi_HEADER' + metcyc1=2000 + metcycf=2010 + imetavg=1 + ;; + *) + echo 'Met driver: '${metdriver} + echo 'Sorry, this met driver is not valid for regular runs' + exit 85 + ;; + esac + #---------------------------------------------------------------------------------# + else + #---------------------------------------------------------------------------------# + # Find out which scenario to use. # + #---------------------------------------------------------------------------------# + fullscen="${scenariopath}/${iscenario}" + #---------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------# + # Determine which meteorological data set to use. Default is the # + # Sheffield/NCEP dataset, otherwise the site-level tower data is used. # + #---------------------------------------------------------------------------------# + case ${metdriver} in + Bananal) + metdriverdb="${fullscen}/Bananal/Bananal_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Caxiuana) + metdriverdb="${fullscen}/Caxiuana/Caxiuana_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Fazenda_Nossa_Senhora) + metdriverdb="${fullscen}/Fazenda_Nossa_Senhora/Fazenda_Nossa_Senhora_HEADER" + metcyc1=1977 + metcycf=2002 + imetavg=1 + ;; + Manaus_Km34) + metdriverdb="${fullscen}/Manaus_Km34/Manaus_Km34_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Paracou) + metdriverdb="${fullscen}/Paracou/Paracou_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Pe-de-Gigante) + metdriverdb="${fullscen}/Pe-de-Gigante/Pe-de-Gigante_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Petrolina) + metdriverdb="${fullscen}/Petrolina/Petrolina_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Rebio_Jaru) + metdriverdb="${fullscen}/Rebio_Jaru/Rebio_Jaru_HEADER" + metcyc1=1977 + metcycf=2002 + imetavg=1 + ;; + Santarem_Km67) + metdriverdb="${fullscen}/Santarem_Km67/Santarem_Km67_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Santarem_Km77) + metdriverdb="${fullscen}/Santarem_Km77/Santarem_Km77_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Santarem_Km83) + metdriverdb="${fullscen}/Santarem_Km83/Santarem_Km83_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + *) + echo 'Met driver: '${metdriver} + echo 'Sorry, this met driver is not valid for scenario runs' + exit 85 + ;; + esac + #---------------------------------------------------------------------------------# + fi + #------------------------------------------------------------------------------------# + + #----- Define the job name. ---------------------------------------------------------# jobname="${desc}-${polyname}" #------------------------------------------------------------------------------------# @@ -386,12 +1060,6 @@ then sed -i s@thisqueue@${queue}@g ${here}/${polyname}/whichrun.r sed -i s@pathhere@${here}@g ${here}/${polyname}/whichrun.r sed -i s@paththere@${here}@g ${here}/${polyname}/whichrun.r - sed -i s@thisfirst@${yr1sthisto}@g ${here}/${polyname}/whichrun.r - sed -i s@thisdthisto@${dthisto}@g ${here}/${polyname}/whichrun.r - sed -i s@thismetyeara@${metyeara}@g ${here}/${polyname}/whichrun.r - sed -i s@thismetcycle@${metcycle}@g ${here}/${polyname}/whichrun.r - sed -i s@thisststcrit@${ststcrit}@g ${here}/${polyname}/whichrun.r - sed -i s@thisncycle@${ncycle}@g ${here}/${polyname}/whichrun.r sed -i s@thisyeara@${yeara}@g ${here}/${polyname}/whichrun.r sed -i s@thismontha@${montha}@g ${here}/${polyname}/whichrun.r sed -i s@thisdatea@${datea}@g ${here}/${polyname}/whichrun.r @@ -435,10 +1103,12 @@ then # long. Once a polygon has reached a steady state / gone extinct / crashed (oh # # well, that happens unfortunately), then its status should remain the same. # #------------------------------------------------------------------------------------# - if [ ${runt} != 'EXTINCT' ] && [ ${runt} != 'STSTATE' ] && [ ${runt} != 'THE_END' ] - then + #if [ ${runt} != 'EXTINCT' ] && [ ${runt} != 'STSTATE' ] && [ ${runt} != 'THE_END' ] + #then #----- Call R to check status. ---------------------------------------------------# - R CMD BATCH ${here}/${polyname}/whichrun.r ${here}/${polyname}/outwhich.txt + whichrun=${here}/${polyname}/whichrun.r + outwhich=${here}/${polyname}/outwhich.txt + R CMD BATCH --no-save --no-restore ${whichrun} ${outwhich} year=`cat ${statrun} | awk '{print $2}'` month=`cat ${statrun} | awk '{print $3}'` day=`cat ${statrun} | awk '{print $4}'` @@ -447,18 +1117,18 @@ then agb=`cat ${statrun} | awk '{print $7}'` bsa=`cat ${statrun} | awk '{print $8}'` lai=`cat ${statrun} | awk '{print $9}'` - fi + #fi #------------------------------------------------------------------------------------# #------------------------------------------------------------------------------------# - # In case the polygon is extinct or it has crashed, we must do some stuff... # + # In case the polygon has crashed, we must do some stuff... # #------------------------------------------------------------------------------------# - if [ ${runt} == 'CRASHED' ] || [ ${runt} == 'STOPPED' ] || [ ${runt} == 'METMISS' ] + if [ ${runt} == 'CRASHED' ] || [ ${runt} == 'STOPPED' ] || + [ ${runt} == 'METMISS' ] || [ ${runt} == 'SIGSEGV' ] then - #---------------------------------------------------------------------------------# # Find out the tolerance used in the unfortunate run, then submit the job # # with a tolerance 10 times more strict. # @@ -475,23 +1145,29 @@ then if [ ${runt} == 'CRASHED' ] then - echo ' :-( Polygon '${polyname}' has crashed !!!' + echo "${ff} :-( ${polyname} HAS CRASHED (RK4 PROBLEM)..." let ncrashed=${ncrashed}+1 #----- Make the tolerance 10 times smaller. -----------------------------------# toler=`${ccc} ${toler}/10` - echo ' - New tolerance = '${toler} + echo " - New tolerance = ${toler}" /bin/mv ${here}/${polyname}/serial_out.out ${here}/${polyname}/crashed_out.out /bin/mv ${here}/${polyname}/serial_out.err ${here}/${polyname}/crashed_out.err + elif [ ${runt} == 'SIGSEGV' ] + then + let nsigsegv=${nsigsegv}+1 + echo "${ff} >:-# ${polyname} HAD SEGMENTATION VIOLATION... <===========" + /bin/mv ${here}/${polyname}/serial_out.out ${here}/${polyname}/sigsegv_out.out + /bin/mv ${here}/${polyname}/serial_out.err ${here}/${polyname}/sigsegv_out.err elif [ ${runt} == 'METMISS' ] then let nmetmiss=${nmetmiss}+1 - echo ' :-{ Polygon '${polyname}' stopped due to missing met driver !!!' + echo "${ff} :-/ ${polyname} DID NOT FIND MET DRIVERS... <===========" /bin/mv ${here}/${polyname}/serial_out.out ${here}/${polyname}/metmiss_out.out /bin/mv ${here}/${polyname}/serial_out.err ${here}/${polyname}/metmiss_out.err elif [ ${runt} == 'STOPPED' ] then let nstopped=${nstopped}+1 - echo ' o_0 Polygon '${polyname}' mysteriously stopped!!!' + echo "${ff} :-S ${polyname} STOPPED (UNKNOWN REASON)... <===========" /bin/mv ${here}/${polyname}/serial_out.out ${here}/${polyname}/stopped_out.out /bin/mv ${here}/${polyname}/serial_out.err ${here}/${polyname}/stopped_out.err fi @@ -508,43 +1184,6 @@ then cp ${here}/Template/ED2IN ${ED2IN} - #------------------------------------------------------------------------------# - # Determine which PFTs to use. # - #------------------------------------------------------------------------------# - lonint=${polylon/.*} - latint=${polylat/.*} - pfts='1,2,3,4,16' - #------------------------------------------------------------------------------# - - - - #------------------------------------------------------------------------------# - # Find the biometric files. This has been checked in spawn_poly.sh so they # - # are correct. Add a dummy name in case this is not supposed to be a biomass # - # initialisation run. # - #------------------------------------------------------------------------------# - case ${isizepft} in - 0) - #----- Frankeinstein's under storey. ---------------------------------------# - thisbiomin="${bioinit}/${polyiata}_default." - ;; - 1) - #----- No under storey. ----------------------------------------------------# - thisbiomin="${bioinit}/${polyiata}_nounder." - ;; - 2) - #----- Same as default, but with only one grass and one tree. --------------# - thisbiomin="${bioinit}/${polyiata}_twopft." - ;; - *) - thisbiomin="${bioinit}/${polyiata}_nothing." - ;; - esac - #------------------------------------------------------------------------------# - - - - #----- Check whether to use SFILIN as restart or history. ---------------------# if [ ${runt} == 'INITIAL' ] && [ ${initmode} -eq 6 ] then @@ -569,10 +1208,10 @@ then sed -i s@thispoly@${polyname}@g ${ED2IN} sed -i s@plonflag@${polylon}@g ${ED2IN} sed -i s@platflag@${polylat}@g ${ED2IN} - sed -i s@timehhhh@${time}@g ${ED2IN} - sed -i s@datehhhh@${date}@g ${ED2IN} - sed -i s@monthhhh@${month}@g ${ED2IN} - sed -i s@yearhhhh@${year}@g ${ED2IN} + sed -i s@timehhhh@${timeh}@g ${ED2IN} + sed -i s@datehhhh@${dateh}@g ${ED2IN} + sed -i s@monthhhh@${monthh}@g ${ED2IN} + sed -i s@yearhhhh@${yearh}@g ${ED2IN} sed -i s@myinitmode@${initmode}@g ${ED2IN} sed -i s@mysfilin@${thissfilin}@g ${ED2IN} sed -i s@mytrees@${pfts}@g ${ED2IN} @@ -701,7 +1340,8 @@ then then thisname=${jobname} else - thisname="app-${thisname}" + polyIATA=`echo ${polyiata} | tr '[:lower:]' '[:upper:]'` + thisname=`echo ${jobname} | sed s@${polyiata}@${polyIATA}@g` fi #------------------------------------------------------------------------------# @@ -733,12 +1373,12 @@ then sed -i s@thisdesc@${desc}@g ${srun} sed -i s@thisqueue@${newqueue}@g ${srun} sed -i s@zzzzzzzz@${wtime}@g ${srun} - sed -i s@myorder@${poly}@g ${srun} + sed -i s@myorder@${ff}@g ${srun} #------------------------------------------------------------------------------# else #----- Give up on this node. --------------------------------------------------# - echo ' :-/ Tolerance is tiny and it still does not work. Giving up...' + echo '${ff} :-{ Tolerance is tiny and it still does not work. Giving up...' runt='THE_END' #------------------------------------------------------------------------------# fi # [ ${toler} != '0.0000010' -a ${toler} != '0.0000001' -a ${toler} != '00' ] @@ -746,7 +1386,7 @@ then elif [ ${runt} == 'THE_END' ] then - echo ' :-) Polygon '${polyname}' finished !!!' + echo "${ff} o/\o ${polyname} has finished..." elif [ ${runt} == 'EXTINCT' -o ${runt} == 'STSTATE' ] && [ ${queue} != 'unrestricted_parallel' ] @@ -758,12 +1398,29 @@ then if [ ${runt} == 'EXTINCT' ] then let newextinct=${newextinct}+1 + echo "${ff} B-) ${polyname} has become a desert..." elif [ ${runt} == 'STSTATE' ] then let newststate=${newststate}+1 + echo "${ff} :-D ${polyname} has reached steady state..." fi fi - fi # [ ${runt} == 'CRASHED' ] + elif [ ${runt} == 'HISTORY' ] + then + #----- Check whether the simulation is running, and when in model time it is. ----# + stdout="${here}/${polyname}/serial_out.out" + simline=`grep "Simulating: " ${stdout} | tail -1` + runtime=`echo ${simline} | awk '{print $3}'` + simline=`grep "Simulating: " ${stdout} | tail -1` + runtime=`echo ${simline} | awk '{print $3}'` + echo "${ff} :-) ${polyname} is running (${runtime})..." + #---------------------------------------------------------------------------------# + elif [ ${runt} == 'INITIAL' ] + then + echo "${ff} :-| ${polyname} is pending ..." + else + echo "${ff} <:-| ${polyname} status is unknown..." + fi # [ ${runt} == 'CRASHED' ]... #------------------------------------------------------------------------------------# @@ -864,10 +1521,10 @@ then sed -i s@thispoly@${polyname}@g ${ED2IN} sed -i s@plonflag@${polylon}@g ${ED2IN} sed -i s@platflag@${polylat}@g ${ED2IN} - sed -i s@timehhhh@${time}@g ${ED2IN} - sed -i s@datehhhh@${date}@g ${ED2IN} - sed -i s@monthhhh@${month}@g ${ED2IN} - sed -i s@yearhhhh@${year}@g ${ED2IN} + sed -i s@timehhhh@${timeh}@g ${ED2IN} + sed -i s@datehhhh@${dateh}@g ${ED2IN} + sed -i s@monthhhh@${monthh}@g ${ED2IN} + sed -i s@yearhhhh@${yearh}@g ${ED2IN} sed -i s@myinitmode@${initmode}@g ${ED2IN} sed -i s@mysfilin@${thissfilin}@g ${ED2IN} sed -i s@mytrees@${pfts}@g ${ED2IN} @@ -996,7 +1653,7 @@ then thiswait=`grep 'Sleep time is' ${polyname}/srun.sh | awk '{print $5}'` if [ 'x'${thiswait} == 'x' ] then - let wtime=${poly}%8 + let wtime=${ff}%8 let wtime=${wtime}*20 nudge=`date +%S` if [ ${nudge} -lt 10 ] @@ -1022,7 +1679,7 @@ then sed -i s@thisqueue@${newqueue}@g ${srun} sed -i s@thisdesc@${desc}@g ${srun} sed -i s@zzzzzzzz@${wtime}@g ${srun} - sed -i s@myorder@${poly}@g ${srun} + sed -i s@myorder@${ff}@g ${srun} #----- Re-submit the job to long_serial queue. --------------------------------# ${here}'/'${polyname}'/srun.sh' @@ -1031,7 +1688,7 @@ then year=${yeara} month=${montha} day=${datea} - hhmm=${houra} + hhmm=${timea} runt='INITIAL' agb='NA' bsa='NA' @@ -1227,11 +1884,11 @@ then fi #------------------------------------------------------------------------------------# - # Read the polyth line of the polygon list. There must be smarter ways of do- # + # Read the lineth line of the polygon list. There must be smarter ways of do- # # ing this, but this works. Here we obtain the polygon name, and its longitude and # # latitude. # #------------------------------------------------------------------------------------# - oi=`head -${line} ${lonlat} | tail -1` + oi=`head -${line} ${joborder} | tail -1` polyname=`echo ${oi} | awk '{print $1 }'` polyiata=`echo ${oi} | awk '{print $2 }'` polylon=`echo ${oi} | awk '{print $3 }'` @@ -1362,7 +2019,8 @@ fi if [ ${plotstatus} -eq 1 ] then echo 'Running the status check...' - R CMD BATCH "${situtils}/status.r" "${situtils}/rout.rout" + Rscript_out="`dirname ${Rscript_plot}`/`basename ${Rscript_plot} .r`.txt" + R CMD BATCH --no-save --no-restore ${Rscript_plot} ${Rscript_out} fi #------------------------------------------------------------------------------------------# @@ -1420,8 +2078,9 @@ wsymoi=`bjobs -q wofsy 2> /dev/null | wc -l` let wsyrun=${wmorun}+${wprrun} let wsypen=${wmopen}+${wprpen} #----- Unrestricted serial. Count only the jobs by the user. -----------------------------# -userun=`bjobs -q unrestricted_serial 2> /dev/null | grep RUN | wc -l` -usepen=`bjobs -q unrestricted_serial 2> /dev/null | grep PEND | wc -l` +userun=`bqueues unrestricted_serial | tail -1 | awk '{print $10}'` +usepen=`bqueues unrestricted_serial | tail -1 | awk '{print $9}'` +usemoi=`bjobs -q unrestricted_serial 2> /dev/null | wc -l` #----- Create a file with the pending jobs. -----------------------------------------------# @@ -1639,14 +2298,137 @@ ll=0 while [ ${ff} -lt ${nfill} ] do let ll=${ll}+1 + let line=${ll}+3 + + #---------------------------------------------------------------------------------------# + # Read the lineth line of the polygon list. There must be smarter ways of doing # + # this, but this works. Here we obtain the polygon name, and its longitude and # + # latitude. # + #---------------------------------------------------------------------------------------# + oi=`head -${line} ${joborder} | tail -1` + polyname=`echo ${oi} | awk '{print $1 }'` + polyiata=`echo ${oi} | awk '{print $2 }'` + polylon=`echo ${oi} | awk '{print $3 }'` + polylat=`echo ${oi} | awk '{print $4 }'` + yeara=`echo ${oi} | awk '{print $5 }'` + montha=`echo ${oi} | awk '{print $6 }'` + datea=`echo ${oi} | awk '{print $7 }'` + timea=`echo ${oi} | awk '{print $8 }'` + yearz=`echo ${oi} | awk '{print $9 }'` + monthz=`echo ${oi} | awk '{print $10}'` + datez=`echo ${oi} | awk '{print $11}'` + timez=`echo ${oi} | awk '{print $12}'` + initmode=`echo ${oi} | awk '{print $13}'` + iscenario=`echo ${oi} | awk '{print $14}'` + isizepft=`echo ${oi} | awk '{print $15}'` + polyisoil=`echo ${oi} | awk '{print $16}'` + polyntext=`echo ${oi} | awk '{print $17}'` + polysand=`echo ${oi} | awk '{print $18}'` + polyclay=`echo ${oi} | awk '{print $19}'` + polydepth=`echo ${oi} | awk '{print $20}'` + polysoilbc=`echo ${oi} | awk '{print $21}'` + polysldrain=`echo ${oi} | awk '{print $22}'` + polycol=`echo ${oi} | awk '{print $23}'` + slzres=`echo ${oi} | awk '{print $24}'` + queue=`echo ${oi} | awk '{print $25}'` + metdriver=`echo ${oi} | awk '{print $26}'` + dtlsm=`echo ${oi} | awk '{print $27}'` + vmfactc3=`echo ${oi} | awk '{print $28}'` + vmfactc4=`echo ${oi} | awk '{print $29}'` + mphototrc3=`echo ${oi} | awk '{print $30}'` + mphototec3=`echo ${oi} | awk '{print $31}'` + mphotoc4=`echo ${oi} | awk '{print $32}'` + bphotoblc3=`echo ${oi} | awk '{print $33}'` + bphotonlc3=`echo ${oi} | awk '{print $34}'` + bphotoc4=`echo ${oi} | awk '{print $35}'` + kwgrass=`echo ${oi} | awk '{print $36}'` + kwtree=`echo ${oi} | awk '{print $37}'` + gammac3=`echo ${oi} | awk '{print $38}'` + gammac4=`echo ${oi} | awk '{print $39}'` + d0grass=`echo ${oi} | awk '{print $40}'` + d0tree=`echo ${oi} | awk '{print $41}'` + alphac3=`echo ${oi} | awk '{print $42}'` + alphac4=`echo ${oi} | awk '{print $43}'` + klowco2=`echo ${oi} | awk '{print $44}'` + decomp=`echo ${oi} | awk '{print $45}'` + rrffact=`echo ${oi} | awk '{print $46}'` + growthresp=`echo ${oi} | awk '{print $47}'` + lwidthgrass=`echo ${oi} | awk '{print $48}'` + lwidthbltree=`echo ${oi} | awk '{print $49}'` + lwidthnltree=`echo ${oi} | awk '{print $50}'` + q10c3=`echo ${oi} | awk '{print $51}'` + q10c4=`echo ${oi} | awk '{print $52}'` + h2olimit=`echo ${oi} | awk '{print $53}'` + imortscheme=`echo ${oi} | awk '{print $54}'` + ddmortconst=`echo ${oi} | awk '{print $55}'` + isfclyrm=`echo ${oi} | awk '{print $56}'` + icanturb=`echo ${oi} | awk '{print $57}'` + ubmin=`echo ${oi} | awk '{print $58}'` + ugbmin=`echo ${oi} | awk '{print $59}'` + ustmin=`echo ${oi} | awk '{print $60}'` + gamm=`echo ${oi} | awk '{print $61}'` + gamh=`echo ${oi} | awk '{print $62}'` + tprandtl=`echo ${oi} | awk '{print $63}'` + ribmax=`echo ${oi} | awk '{print $64}'` + atmco2=`echo ${oi} | awk '{print $65}'` + thcrit=`echo ${oi} | awk '{print $66}'` + smfire=`echo ${oi} | awk '{print $67}'` + ifire=`echo ${oi} | awk '{print $68}'` + fireparm=`echo ${oi} | awk '{print $69}'` + ipercol=`echo ${oi} | awk '{print $70}'` + runoff=`echo ${oi} | awk '{print $71}'` + imetrad=`echo ${oi} | awk '{print $72}'` + ibranch=`echo ${oi} | awk '{print $73}'` + icanrad=`echo ${oi} | awk '{print $74}'` + crown=`echo ${oi} | awk '{print $75}'` + ltransvis=`echo ${oi} | awk '{print $76}'` + lreflectvis=`echo ${oi} | awk '{print $77}'` + ltransnir=`echo ${oi} | awk '{print $78}'` + lreflectnir=`echo ${oi} | awk '{print $79}'` + orienttree=`echo ${oi} | awk '{print $80}'` + orientgrass=`echo ${oi} | awk '{print $81}'` + clumptree=`echo ${oi} | awk '{print $82}'` + clumpgrass=`echo ${oi} | awk '{print $83}'` + ivegtdyn=`echo ${oi} | awk '{print $84}'` + igndvap=`echo ${oi} | awk '{print $85}'` + iphen=`echo ${oi} | awk '{print $86}'` + iallom=`echo ${oi} | awk '{print $87}'` + ibigleaf=`echo ${oi} | awk '{print $88}'` + irepro=`echo ${oi} | awk '{print $89}'` + treefall=`echo ${oi} | awk '{print $90}'` + #---------------------------------------------------------------------------------------# + + + + #----- Find the job name (or the alternative job name). --------------------------------# + polyIATA=`echo ${polyiata} | tr '[:lower:]' '[:upper:]'` + jobname="${desc}-${polyname}" + altname=`echo ${jobname} | sed s@${polyiata}@${polyIATA}@g` + #---------------------------------------------------------------------------------------# - oi=`head -${ll} ${joborder} | tail -1` - polyname=`echo ${oi} | awk '{print $1}'` - thisjob="${desc}-${polyname}" #----- Check whether the job is pending or not. If it is, then switch queues. ---------# - ispending=`grep ${thisjob} ${pendfile} | wc -l` - + jobpending=`grep ${jobname} ${pendfile} | wc -l` + altpending=`grep ${altname} ${pendfile} | wc -l` + if [ ${jobpending} -gt 0 ] + then + ispending=${jobpending} + thisjob=${jobname} + elif [ ${altpending} -gt 0 ] + then + ispending=${altpending} + thisjob=${altname} + else + ispending=0 + thisjob=${jobname} + fi + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # If the job is pending, switch the queue. # + #---------------------------------------------------------------------------------------# if [ ${ispending} -gt 0 ] then let ff=${ff}+1 @@ -1677,16 +2459,17 @@ do bswitch -J ${thisjob} ${newqueue} #----- Update the queue in joborder.txt. --------------------------------------------# - line=`grep ${polyname} ${joborder}` - thislon=`echo ${line} | awk '{print $2}'` - thislat=`echo ${line} | awk '{print $3}'` - oldqueue=`echo ${line} | awk '{print $4}'` - - oldline=${polyname}' '${thislon}' '${thislat}' '${oldqueue} - newline=${polyname}' '${thislon}' '${thislat}' '${newqueue} - sed -i s@"${line}"@"${newline}"@g ${joborder} + oldline=${oi} + newline=`echo ${oldline} | sed s@${queue}@${newqueue}@g` + sed -i s@"${oldline}"@"${newline}"@g ${joborder} + #------------------------------------------------------------------------------------# fi # [ ${ispending} -gt 0 ] + #---------------------------------------------------------------------------------------# done # [ ${ff} -lt ${nfill} ] +#------------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------------# # If unrestricted_parallel has some room, we also create new jobs there. # @@ -1712,14 +2495,138 @@ nnff=0 while [ ${nnff} -lt ${nodefill} ] do let ll=${ll}+1 + let line=${ll}+3 + + + #---------------------------------------------------------------------------------------# + # Read the lineth line of the polygon list. There must be smarter ways of doing # + # this, but this works. Here we obtain the polygon name, and its longitude and # + # latitude. # + #---------------------------------------------------------------------------------------# + oi=`head -${line} ${joborder} | tail -1` + polyname=`echo ${oi} | awk '{print $1 }'` + polyiata=`echo ${oi} | awk '{print $2 }'` + polylon=`echo ${oi} | awk '{print $3 }'` + polylat=`echo ${oi} | awk '{print $4 }'` + yeara=`echo ${oi} | awk '{print $5 }'` + montha=`echo ${oi} | awk '{print $6 }'` + datea=`echo ${oi} | awk '{print $7 }'` + timea=`echo ${oi} | awk '{print $8 }'` + yearz=`echo ${oi} | awk '{print $9 }'` + monthz=`echo ${oi} | awk '{print $10}'` + datez=`echo ${oi} | awk '{print $11}'` + timez=`echo ${oi} | awk '{print $12}'` + initmode=`echo ${oi} | awk '{print $13}'` + iscenario=`echo ${oi} | awk '{print $14}'` + isizepft=`echo ${oi} | awk '{print $15}'` + polyisoil=`echo ${oi} | awk '{print $16}'` + polyntext=`echo ${oi} | awk '{print $17}'` + polysand=`echo ${oi} | awk '{print $18}'` + polyclay=`echo ${oi} | awk '{print $19}'` + polydepth=`echo ${oi} | awk '{print $20}'` + polysoilbc=`echo ${oi} | awk '{print $21}'` + polysldrain=`echo ${oi} | awk '{print $22}'` + polycol=`echo ${oi} | awk '{print $23}'` + slzres=`echo ${oi} | awk '{print $24}'` + queue=`echo ${oi} | awk '{print $25}'` + metdriver=`echo ${oi} | awk '{print $26}'` + dtlsm=`echo ${oi} | awk '{print $27}'` + vmfactc3=`echo ${oi} | awk '{print $28}'` + vmfactc4=`echo ${oi} | awk '{print $29}'` + mphototrc3=`echo ${oi} | awk '{print $30}'` + mphototec3=`echo ${oi} | awk '{print $31}'` + mphotoc4=`echo ${oi} | awk '{print $32}'` + bphotoblc3=`echo ${oi} | awk '{print $33}'` + bphotonlc3=`echo ${oi} | awk '{print $34}'` + bphotoc4=`echo ${oi} | awk '{print $35}'` + kwgrass=`echo ${oi} | awk '{print $36}'` + kwtree=`echo ${oi} | awk '{print $37}'` + gammac3=`echo ${oi} | awk '{print $38}'` + gammac4=`echo ${oi} | awk '{print $39}'` + d0grass=`echo ${oi} | awk '{print $40}'` + d0tree=`echo ${oi} | awk '{print $41}'` + alphac3=`echo ${oi} | awk '{print $42}'` + alphac4=`echo ${oi} | awk '{print $43}'` + klowco2=`echo ${oi} | awk '{print $44}'` + decomp=`echo ${oi} | awk '{print $45}'` + rrffact=`echo ${oi} | awk '{print $46}'` + growthresp=`echo ${oi} | awk '{print $47}'` + lwidthgrass=`echo ${oi} | awk '{print $48}'` + lwidthbltree=`echo ${oi} | awk '{print $49}'` + lwidthnltree=`echo ${oi} | awk '{print $50}'` + q10c3=`echo ${oi} | awk '{print $51}'` + q10c4=`echo ${oi} | awk '{print $52}'` + h2olimit=`echo ${oi} | awk '{print $53}'` + imortscheme=`echo ${oi} | awk '{print $54}'` + ddmortconst=`echo ${oi} | awk '{print $55}'` + isfclyrm=`echo ${oi} | awk '{print $56}'` + icanturb=`echo ${oi} | awk '{print $57}'` + ubmin=`echo ${oi} | awk '{print $58}'` + ugbmin=`echo ${oi} | awk '{print $59}'` + ustmin=`echo ${oi} | awk '{print $60}'` + gamm=`echo ${oi} | awk '{print $61}'` + gamh=`echo ${oi} | awk '{print $62}'` + tprandtl=`echo ${oi} | awk '{print $63}'` + ribmax=`echo ${oi} | awk '{print $64}'` + atmco2=`echo ${oi} | awk '{print $65}'` + thcrit=`echo ${oi} | awk '{print $66}'` + smfire=`echo ${oi} | awk '{print $67}'` + ifire=`echo ${oi} | awk '{print $68}'` + fireparm=`echo ${oi} | awk '{print $69}'` + ipercol=`echo ${oi} | awk '{print $70}'` + runoff=`echo ${oi} | awk '{print $71}'` + imetrad=`echo ${oi} | awk '{print $72}'` + ibranch=`echo ${oi} | awk '{print $73}'` + icanrad=`echo ${oi} | awk '{print $74}'` + crown=`echo ${oi} | awk '{print $75}'` + ltransvis=`echo ${oi} | awk '{print $76}'` + lreflectvis=`echo ${oi} | awk '{print $77}'` + ltransnir=`echo ${oi} | awk '{print $78}'` + lreflectnir=`echo ${oi} | awk '{print $79}'` + orienttree=`echo ${oi} | awk '{print $80}'` + orientgrass=`echo ${oi} | awk '{print $81}'` + clumptree=`echo ${oi} | awk '{print $82}'` + clumpgrass=`echo ${oi} | awk '{print $83}'` + ivegtdyn=`echo ${oi} | awk '{print $84}'` + igndvap=`echo ${oi} | awk '{print $85}'` + iphen=`echo ${oi} | awk '{print $86}'` + iallom=`echo ${oi} | awk '{print $87}'` + ibigleaf=`echo ${oi} | awk '{print $88}'` + irepro=`echo ${oi} | awk '{print $89}'` + treefall=`echo ${oi} | awk '{print $90}'` + #---------------------------------------------------------------------------------------# + + + + #----- Find the job name (or the alternative job name). --------------------------------# + polyIATA=`echo ${polyiata} | tr '[:lower:]' '[:upper:]'` + jobname="${desc}-${polyname}" + altname=`echo ${jobname} | sed s@${polyiata}@${polyIATA}@g` + #---------------------------------------------------------------------------------------# - oi=`head -${ll} ${joborder} | tail -1` - polyname=`echo ${oi} | awk '{print $1}'` - thisjob="${desc}-${polyname}" #----- Check whether the job is pending or not. If it is, then switch queues. ---------# - ispending1=`grep ${thisjob} ${pendfile} | wc -l` - + jobpending=`grep ${jobname} ${pendfile} | wc -l` + altpending=`grep ${altname} ${pendfile} | wc -l` + if [ ${jobpending} -gt 0 ] + then + ispending1=${jobpending} + thisjob=${jobname} + elif [ ${altpending} -gt 0 ] + then + ispending1=${altpending} + thisjob=${altname} + else + ispending1=0 + thisjob=${jobname} + fi + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # If the job is pending, switch the queue. # + #---------------------------------------------------------------------------------------# if [ ${ispending1} -gt 0 ] then let nnff=${nnff}+1 @@ -1747,71 +2654,213 @@ do while [ ${ispending2} -eq 0 ] do let ll=${ll}+1 + let line=${ll}+3 + + #---------------------------------------------------------------------------# + # Read the lineth line of the polygon list. There must be smarter # + # ways of doing this, but this works. Here we obtain the polygon name, and # + # its longitude and latitude. # + #---------------------------------------------------------------------------# + oi=`head -${line} ${joborder} | tail -1` + polyname=`echo ${oi} | awk '{print $1 }'` + polyiata=`echo ${oi} | awk '{print $2 }'` + polylon=`echo ${oi} | awk '{print $3 }'` + polylat=`echo ${oi} | awk '{print $4 }'` + yeara=`echo ${oi} | awk '{print $5 }'` + montha=`echo ${oi} | awk '{print $6 }'` + datea=`echo ${oi} | awk '{print $7 }'` + timea=`echo ${oi} | awk '{print $8 }'` + yearz=`echo ${oi} | awk '{print $9 }'` + monthz=`echo ${oi} | awk '{print $10}'` + datez=`echo ${oi} | awk '{print $11}'` + timez=`echo ${oi} | awk '{print $12}'` + initmode=`echo ${oi} | awk '{print $13}'` + iscenario=`echo ${oi} | awk '{print $14}'` + isizepft=`echo ${oi} | awk '{print $15}'` + polyisoil=`echo ${oi} | awk '{print $16}'` + polyntext=`echo ${oi} | awk '{print $17}'` + polysand=`echo ${oi} | awk '{print $18}'` + polyclay=`echo ${oi} | awk '{print $19}'` + polydepth=`echo ${oi} | awk '{print $20}'` + polysoilbc=`echo ${oi} | awk '{print $21}'` + polysldrain=`echo ${oi} | awk '{print $22}'` + polycol=`echo ${oi} | awk '{print $23}'` + slzres=`echo ${oi} | awk '{print $24}'` + queue=`echo ${oi} | awk '{print $25}'` + metdriver=`echo ${oi} | awk '{print $26}'` + dtlsm=`echo ${oi} | awk '{print $27}'` + vmfactc3=`echo ${oi} | awk '{print $28}'` + vmfactc4=`echo ${oi} | awk '{print $29}'` + mphototrc3=`echo ${oi} | awk '{print $30}'` + mphototec3=`echo ${oi} | awk '{print $31}'` + mphotoc4=`echo ${oi} | awk '{print $32}'` + bphotoblc3=`echo ${oi} | awk '{print $33}'` + bphotonlc3=`echo ${oi} | awk '{print $34}'` + bphotoc4=`echo ${oi} | awk '{print $35}'` + kwgrass=`echo ${oi} | awk '{print $36}'` + kwtree=`echo ${oi} | awk '{print $37}'` + gammac3=`echo ${oi} | awk '{print $38}'` + gammac4=`echo ${oi} | awk '{print $39}'` + d0grass=`echo ${oi} | awk '{print $40}'` + d0tree=`echo ${oi} | awk '{print $41}'` + alphac3=`echo ${oi} | awk '{print $42}'` + alphac4=`echo ${oi} | awk '{print $43}'` + klowco2=`echo ${oi} | awk '{print $44}'` + decomp=`echo ${oi} | awk '{print $45}'` + rrffact=`echo ${oi} | awk '{print $46}'` + growthresp=`echo ${oi} | awk '{print $47}'` + lwidthgrass=`echo ${oi} | awk '{print $48}'` + lwidthbltree=`echo ${oi} | awk '{print $49}'` + lwidthnltree=`echo ${oi} | awk '{print $50}'` + q10c3=`echo ${oi} | awk '{print $51}'` + q10c4=`echo ${oi} | awk '{print $52}'` + h2olimit=`echo ${oi} | awk '{print $53}'` + imortscheme=`echo ${oi} | awk '{print $54}'` + ddmortconst=`echo ${oi} | awk '{print $55}'` + isfclyrm=`echo ${oi} | awk '{print $56}'` + icanturb=`echo ${oi} | awk '{print $57}'` + ubmin=`echo ${oi} | awk '{print $58}'` + ugbmin=`echo ${oi} | awk '{print $59}'` + ustmin=`echo ${oi} | awk '{print $60}'` + gamm=`echo ${oi} | awk '{print $61}'` + gamh=`echo ${oi} | awk '{print $62}'` + tprandtl=`echo ${oi} | awk '{print $63}'` + ribmax=`echo ${oi} | awk '{print $64}'` + atmco2=`echo ${oi} | awk '{print $65}'` + thcrit=`echo ${oi} | awk '{print $66}'` + smfire=`echo ${oi} | awk '{print $67}'` + ifire=`echo ${oi} | awk '{print $68}'` + fireparm=`echo ${oi} | awk '{print $69}'` + ipercol=`echo ${oi} | awk '{print $70}'` + runoff=`echo ${oi} | awk '{print $71}'` + imetrad=`echo ${oi} | awk '{print $72}'` + ibranch=`echo ${oi} | awk '{print $73}'` + icanrad=`echo ${oi} | awk '{print $74}'` + crown=`echo ${oi} | awk '{print $75}'` + ltransvis=`echo ${oi} | awk '{print $76}'` + lreflectvis=`echo ${oi} | awk '{print $77}'` + ltransnir=`echo ${oi} | awk '{print $78}'` + lreflectnir=`echo ${oi} | awk '{print $79}'` + orienttree=`echo ${oi} | awk '{print $80}'` + orientgrass=`echo ${oi} | awk '{print $81}'` + clumptree=`echo ${oi} | awk '{print $82}'` + clumpgrass=`echo ${oi} | awk '{print $83}'` + ivegtdyn=`echo ${oi} | awk '{print $84}'` + igndvap=`echo ${oi} | awk '{print $85}'` + iphen=`echo ${oi} | awk '{print $86}'` + iallom=`echo ${oi} | awk '{print $87}'` + ibigleaf=`echo ${oi} | awk '{print $88}'` + irepro=`echo ${oi} | awk '{print $89}'` + treefall=`echo ${oi} | awk '{print $90}'` + #---------------------------------------------------------------------------# - oi=`head -${ll} ${joborder} | tail -1` - polyname=`echo ${oi} | awk '{print $1}'` - thisjob="${desc}-${polyname}" + + #----- Find the job name (or the alternative job name). --------------------# + polyIATA=`echo ${polyiata} | tr '[:lower:]' '[:upper:]'` + jobname="${desc}-${polyname}" + altname=`echo ${jobname} | sed s@${polyiata}@${polyIATA}@g` #---------------------------------------------------------------------------# - # Check whether the job is pending or not. If it is, then switch # + + + #---------------------------------------------------------------------------# + # Check whether the job is pending or not. If it is, then switch # # queues. # #---------------------------------------------------------------------------# - ispending2=`grep ${thisjob} ${pendfile} | wc -l` + jobpending=`grep ${jobname} ${pendfile} | wc -l` + altpending=`grep ${altname} ${pendfile} | wc -l` + if [ ${jobpending} -gt 0 ] + then + ispending2=${jobpending} + thisjob=${jobname} + elif [ ${altpending} -gt 0 ] + then + ispending2=${altpending} + thisjob=${altname} + else + ispending2=0 + thisjob=${jobname} + fi + #---------------------------------------------------------------------------# done + #------------------------------------------------------------------------------# fi + #---------------------------------------------------------------------------------# + + #----- Put the skipping flag to the job. -----------------------------------------# echo 'Skip this node for now.' > ${here}/${polyname}/skipper.txt + #---------------------------------------------------------------------------------# #----- Kill the job because it will go to the unrestricted_parallel. -------------# bkill -J ${thisjob} + #---------------------------------------------------------------------------------# + #----- Add the command to call this job from unrestricted_parallel driver. -------# mycomm="${here}/${polyname}/callserial.sh ${wtime} &" echo ${mycomm} >> ${callunpa} + #---------------------------------------------------------------------------------# - #----- Update the queue in joborder.txt. --------------------------------------------# - line=`grep ${polyname} ${joborder}` - thislon=`echo ${line} | awk '{print $2}'` - thislat=`echo ${line} | awk '{print $3}'` - oldqueue=`echo ${line} | awk '{print $4}'` - newqueue='unrestricted_parallel' - oldline=${polyname}' '${thislon}' '${thislat}' '${oldqueue} - newline=${polyname}' '${thislon}' '${thislat}' '${newqueue} - sed -i s@"${line}"@"${newline}"@g ${joborder} + #----- Update the queue in joborder.txt. -----------------------------------------# + oldline=${oi} + newqueue='unrestricted_parallel' + newline=`echo ${oldline} | sed s@${queue}@${newqueue}@g` + sed -i s@"${oldline}"@"${newline}"@g ${joborder} + #---------------------------------------------------------------------------------# done - - #----- Finalise the script that controls submits the jobs, then submit the job... ------# + #------------------------------------------------------------------------------------# + + + #----- Finalise the script that controls submits the jobs, then submit the job... ---# echo 'wait' >> ${callunpa} chmod u+x ${callunpa} mv ${callunpa} ${here}/${polyname} + #------------------------------------------------------------------------------------# #----- Create the shell script that will call bsub. ------------------------------------# /bin/rm -f ${unparun} echo '#!/bin/sh' > ${unparun} - bsub="bsub -q unrestricted_parallel -R 'hname!=hero3114'" + bsub="bsub -q unrestricted_parallel" bsub="${bsub} -J ${thisjob}" bsub="${bsub} -o ${here}/${polyname}/serial_lsf.out -n 8" bsub="${bsub} < ${here}/${polyname}/"`basename ${callunpa}` echo ${bsub} >> ${unparun} chmod u+x ${unparun} mv ${unparun} ${here}/${polyname} + #------------------------------------------------------------------------------------# + - #----- Submit the jobs to the queue. ---------------------------------------------------# + #----- Submit the jobs to the queue. ------------------------------------------------# ${here}/${polyname}/unparun.sh + #------------------------------------------------------------------------------------# fi # [ ${ispending1} -gt 0 ] + #---------------------------------------------------------------------------------------# done +#------------------------------------------------------------------------------------------# + + + +#----- Get the number of polygons that went to unrestricted_parallel. ---------------------# let nptounpa=${nodefill}*8 +#------------------------------------------------------------------------------------------# #----- Get rid of the temporary file. -----------------------------------------------------# /bin/rm -f ${pendfile} +#------------------------------------------------------------------------------------------# + + #----- Sleep 5 more minutes. --------------------------------------------------------------# echo 'Taking another nap before checking the queues again...' sleep 300 +#------------------------------------------------------------------------------------------# + + #----- Quick check the status of the queues. ----------------------------------------------# /bin/rm -f ${recefile} @@ -1823,6 +2872,10 @@ echo 'Number of polygons to unrestricted_parallel: '${nptounpa} >> ${recefile echo 'Number of polygons that went extinct: '${newextinct} >> ${recefile} echo 'Number of polygons that reached steady state: '${newststate} >> ${recefile} echo '--------------------------------------------------------------------' >> ${recefile} +#------------------------------------------------------------------------------------------# + + + #----- Check the queue status. ------------------------------------------------------------# echo 'Counting the jobs...' @@ -1862,16 +2915,23 @@ a61ptot=`bjobs -q moorcroft_6100a 2> /dev/null | grep PEND b61ptot=`bjobs -q moorcroft_6100b 2> /dev/null | grep PEND | wc -l` useptot=`bjobs -q unrestricted_serial 2> /dev/null | grep PEND | wc -l` upaptot=`bjobs -q unrestricted_parallel 2> /dev/null | grep PEND | wc -l` -let lsertot=${lsertot}+${lseptot} -let m2artot=${m2artot}+${m2aptot} -let m2brtot=${m2brtot}+${m2bptot} -let m2crtot=${m2crtot}+${m2cptot} -let wsyrtot=${wsyrtot}+${wsyptot} -let a61rtot=${a61rtot}+${a61ptot} -let b61rtot=${b61rtot}+${b61ptot} -let usertot=${usertot}+${useptot} -let upartot=${upartot}+${upaptot} +let lsetot=${lsertot}+${lseptot} +let m2atot=${m2artot}+${m2aptot} +let m2btot=${m2brtot}+${m2bptot} +let m2ctot=${m2crtot}+${m2cptot} +let wsytot=${wsyrtot}+${wsyptot} +let a61tot=${a61rtot}+${a61ptot} +let b61tot=${b61rtot}+${b61ptot} +let usetot=${usertot}+${useptot} +let upatot=${upartot}+${upaptot} +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Make the table with the queue statuses. # +#------------------------------------------------------------------------------------------# /bin/rm -f ${queuefile} touch ${queuefile} echo "------- Queue status. --------------------------------------------" >> ${queuefile} @@ -1885,6 +2945,9 @@ echo "Long_serial RUN=${lserun} PEN=${lsepen} TOT=${lsetot}" >> ${q echo "Unrestricted_serial RUN=${userun} PEN=${usepen} TOT=${usetot}" >> ${queuefile} echo "Unrestricted_parallel RUN=${uparun} PEN=${upapen} TOT=${upatot}" >> ${queuefile} echo "------------------------------------------------------------------" >> ${queuefile} +#------------------------------------------------------------------------------------------# + + #----- Current simulation status. ---------------------------------------------------------# n_initial=`grep INITIAL ${outcheck} | wc -l` @@ -1907,19 +2970,32 @@ echo " Number of polygons that became desert : ${n_extinct}" >> $ echo " Number of polygons that have reached steady state : ${n_ststate}" >> ${statfile} echo " Number of polygons that have reached the end : ${n_the_end}" >> ${statfile} echo "--------------------------------------------------------------------" >> ${statfile} +#------------------------------------------------------------------------------------------# + + -#----- Convert the PNG files to an e-mail friendly format. --------------------------------# + +#----- Convert the figure files to an e-mail friendly format. -----------------------------# if [ ${plotstatus} -eq 1 ] then echo 'Converting the PNG files to e-mail format...' - uuencode ${situtils}/polystatus.png polystat.png > ${situtils}/polystat.txt - uuencode ${situtils}/polyagb.png polyagb.png > ${situtils}/polyagb.txt - uuencode ${situtils}/polybsa.png polybsa.png > ${situtils}/polybsa.txt - uuencode ${situtils}/polylai.png polylai.png > ${situtils}/polylai.txt - uuencode ${situtils}/polyvel.png polyvel.png > ${situtils}/polyvel.txt + for fichier in ${R_figlist} + do + ext=`echo ${fichier##*.}` + path=`dirname ${fichier}` + base=`basename ${fichier}` + prefix=`basename ${base} .${ext}` + text="${path}/${prefix}.txt" + uuencode ${fichier} ${base} > ${text} + done fi +#------------------------------------------------------------------------------------------# + -#------ Build the e-mail body. ------------------------------------------------------------# + +#------------------------------------------------------------------------------------------# +# Build the e-mail body. # +#------------------------------------------------------------------------------------------# echo 'Building the e-mail...' /bin/rm -f ${emailbody} touch ${emailbody} @@ -1933,53 +3009,80 @@ cat ${queuefile} >> ${emailbody} echo ' ' >> ${emailbody} cat ${tailfile} >> ${emailbody} echo ' ' >> ${emailbody} - +#----- Check whether to append some plots. ------------------------------------------------# if [ ${plotstatus} -eq 1 ] then - cat ${situtils}/polystat.txt >> ${emailbody} - echo ' ' >> ${emailbody} - cat ${situtils}/polyagb.txt >> ${emailbody} - echo ' ' >> ${emailbody} - cat ${situtils}/polybsa.txt >> ${emailbody} - echo ' ' >> ${emailbody} - cat ${situtils}/polylai.txt >> ${emailbody} - echo ' ' >> ${emailbody} - cat ${situtils}/polyvel.txt >> ${emailbody} - echo ' ' >> ${emailbody} + for fichier in ${R_figlist} + do + ext=`echo ${fichier##*.}` + path=`dirname ${fichier}` + base=`basename ${fichier}` + prefix=`basename ${base} .${ext}` + text="${path}/${prefix}.txt" + cat ${text} >> ${emailbody} + echo ' ' >> ${emailbody} + /bin/rm -f ${text} + done fi +#------------------------------------------------------------------------------------------# + -when=`date +'%B %d, %Y - %R %Z'` +#------------------------------------------------------------------------------------------# +# Create the subject for the e-mail. # +#------------------------------------------------------------------------------------------# +when=`date +'%d %B %Y - %R %Z'` today=`date +'%Y-%m-%d'` -subject="${desc} run status as of ${when}" +subject="${runtitle} run status as of ${when}" +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# Check whether to send the e-mail or not. # +#------------------------------------------------------------------------------------------# if [ ${email1day} -eq 0 ] then - echo ${today} > ${emailday} - echo 'Sending e-mail...' - mail -s "${subject}" ${recipient} < ${emailbody} + #----- Always send e-mail. --------------------------------------------------------------# + sendemail="y" + #----------------------------------------------------------------------------------------# elif [ -s ${emailday} ] then + #----- E-mail has been sent. Check whether it is time to send again. ------------------# lastemail=`cat ${emailday}` if [ ${today} != ${lastemail} ] then - echo ${today} > ${emailday} - echo 'Sending e-mail...' - mail -s "${subject}" ${recipient} < ${emailbody} + #----- Time to send another e-mail. -------------------------------------------------# + sendemail="y" + #------------------------------------------------------------------------------------# else - echo 'Skipping e-mail...' + #----- E-mail has been sent recently. Don't send another one now. ------------------# + sendemail="n" + #------------------------------------------------------------------------------------# fi + #---------------------------------------------------------------------------------------# +else + #----- E-mail has not been sent yet. Send it. -----------------------------------------# + sendemail="y" + #---------------------------------------------------------------------------------------# +fi +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# Send/skip the e-mail. # +#------------------------------------------------------------------------------------------# +if [ ${sendemail} == "y" ] +then + echo ${today} > ${emailday} + echo 'Sending e-mail...' + mail -s "${subject}" ${recipient} < ${emailbody} else - echo ${today} > ${emailday} - echo 'Sending e-mail...' - mail -s "${subject}" ${recipient} < ${emailbody} + echo 'Skipping e-mail...' fi +#------------------------------------------------------------------------------------------# #----- Clean-up stuff. --------------------------------------------------------------------# echo 'Deleting some temporary files...' -/bin/rm -f ${emailbody} ${queuefile} ${recefile} -/bin/rm -f ${situtils}/polystat.txt -/bin/rm -f ${situtils}/polyagb.txt -/bin/rm -f ${situtils}/polybsa.txt -/bin/rm -f ${situtils}/polylai.txt +/bin/rm -f ${queuefile} ${recefile} /bin/rm -f ${here}/run_sitter.lock echo '==== run_sitter.sh execution ends. ====' diff --git a/ED/Template/sit_utils/head.txt b/ED/Template/sit_utils/head.txt new file mode 100644 index 000000000..c6ef10c88 --- /dev/null +++ b/ED/Template/sit_utils/head.txt @@ -0,0 +1,3 @@ +Hello, + +Here is the updated report: diff --git a/ED/Template/sit_utils/plot.status.r b/ED/Template/sit_utils/plot.status.r new file mode 100644 index 000000000..cd72902a8 --- /dev/null +++ b/ED/Template/sit_utils/plot.status.r @@ -0,0 +1,623 @@ +#==========================================================================================# +#==========================================================================================# +# Leave these commands at the beginning. They will refresh the session. # +#------------------------------------------------------------------------------------------# +rm(list=ls()) +graphics.off() +#==========================================================================================# +#==========================================================================================# + + + +#==========================================================================================# +#==========================================================================================# +# Here is the user defined variable section. # +#------------------------------------------------------------------------------------------# + + +#----- Paths. -----------------------------------------------------------------------------# +main = "/n/moorcroftfs2/mlongo/EDBRAMS/final_ed/drought/realisation+rtsph" # Current directory. +here = "/n/moorcroftfs2/mlongo/EDBRAMS/final_ed/drought/realisation+rtsph/sit_utils" + +srcdir = "/n/moorcroft_data/mlongo/util/Rsc" # Source directory. +outroot = here # Directory for figures +#------------------------------------------------------------------------------------------# + + + + +#------------------------------------------------------------------------------------------# +# List files to be read. The current and the previous check, and the path with the # +# job order. # +#------------------------------------------------------------------------------------------# +joborder = file.path(main,"joborder.txt" ) +lastcheck = file.path(here,"lastcheck.txt") +mycheck = file.path(here,"mycheck.txt" ) +#------------------------------------------------------------------------------------------# + + + + +#----- Plot options. ----------------------------------------------------------------------# +outform = c("png","eps","pdf") # Formats for output file. Supported formats are: + # - "X11" - for printing on screen + # - "eps" - for postscript printing + # - "png" - for PNG printing + # - "pdf" - for PDF printing +depth = 96 # PNG resolution, in pixels per inch +paper = "letter" # Paper size, to define the plot shape +ptsz = 14 # Font size. +lwidth = 2.5 # Line width +inset = 0.01 # inset between legend and edge of plot region. +fracexp = 0.40 # Expand the y axis by this amount. +ncolours = 20 # Number of colours to split the real variables +mtext.xoff = -8.50 # Offset for the x label +mtext.yoff = -1.00 # Offset for the y label +mtext.xadj = 0.50 # Offset for the x label +mtext.yadj = 0.65 # Offset for the y label +#------------------------------------------------------------------------------------------# + + + +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +# NO NEED TO CHANGE ANYTHING BEYOND THIS POINT UNLESS YOU ARE DEVELOPING THE CODE... # +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# + + + + +#----- Loading some packages and scripts. -------------------------------------------------# +source(file.path(srcdir,"load.everything.r")) +#------------------------------------------------------------------------------------------# + + + +#----- Set how many formats we must output. -----------------------------------------------# +outform = tolower(outform) +nout = length (outform) +#------------------------------------------------------------------------------------------# + + +#----- Avoid unecessary and extremely annoying beeps. -------------------------------------# +options(locatorBell=FALSE) +#------------------------------------------------------------------------------------------# + + + +#----- Define plot window size ------------------------------------------------------------# +size = plotsize(proje=FALSE,paper=paper) +#------------------------------------------------------------------------------------------# + + + +#---- Create the main output directory in case there is none. -----------------------------# +if (! file.exists(outroot)) dir.create(outroot) +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Read job order. We always use this file to build the array. # +#------------------------------------------------------------------------------------------# +cat (" + Reading ",basename(joborder),"...","\n") +names.jobs = scan(file=joborder,skip=1,nlines=1,what="character",quiet=TRUE) +names.jobs = gsub(pattern="_",replacement=".",x=tolower(names.jobs)) +jobs = read.table(file=joborder,skip=3,header=FALSE,comment.char="" + ,stringsAsFactors=FALSE) +names(jobs) = names.jobs +njobs = nrow(jobs) +jobs$drain = as.numeric(substring(jobs$run, 7,10)) / 100 +jobs$dtemp = as.numeric(substring(jobs$run,13,16)) / 100 +jobs$realisation = as.numeric(substring(jobs$run,23,24)) +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Read the last and the current check. For the current check, we normally skip the # +# last line to avoid trouble, unless the file is complete. # +#------------------------------------------------------------------------------------------# +names.check = c("run","lon","lat","year","month","day","hhmm","runt" + ,"agb","bsa","lai","vel") +cat (" + Reading ",basename(lastcheck),"...","\n") +last = read.table(file=lastcheck,skip=0,header=FALSE,comment.char="" + ,col.names=names.check,stringsAsFactors=FALSE) +cat (" + Reading ",basename(mycheck),"...","\n") +ncurr = length(readLines(mycheck)) +if (ncurr == njobs){ + curr = read.table(file=mycheck,skip=0,header=FALSE,comment.char="" + ,col.names=names.check,stringsAsFactors=FALSE) +}else if (ncurr > 0){ + curr = read.table(file=mycheck,skip=0,nrows=ncurr-1,header=FALSE,comment.char="" + ,col.names=names.check,stringsAsFactors=FALSE) +}else{ + curr = data.frame(rep(NA,times=length(names.check)),names=names.check) + curr = curr[-1,] +}#end f +#------------------------------------------------------------------------------------------# + + + + + +#------------------------------------------------------------------------------------------# +# Find the dimensions. # +#------------------------------------------------------------------------------------------# +iata = unique(sort(jobs$iata )) +drain = unique(sort(jobs$drain )) +dtemp = unique(sort(jobs$dtemp )) +realisation = unique(sort(jobs$realisation)) +iphen = unique(sort(jobs$iphen )) +stext = unique(sort(jobs$istext )) +n.iata = length(iata ) +n.drain = length(drain ) +n.dtemp = length(dtemp ) +n.realisation = length(realisation) +n.stext = length(stext ) +n.iphen = length(iphen ) +key.iata = toupper(iata ) +key.drain = paste("r" ,sprintf("%+3.3i",sort(100*unique(jobs$drain ))),sep="") +key.dtemp = paste("t" ,sprintf("%+3.3i",sort(100*unique(jobs$dtemp ))),sep="") +key.realisation = paste("real" ,sprintf("%2.2i" ,sort( unique(jobs$realisation))),sep="") +key.stext = paste("stext",sprintf("%2.2i" ,sort( unique(jobs$istext ))),sep="") +key.iphen = c("Evergreen","Deciduous") +desc.iata = poilist$longname[match(iata,poilist$iata)] +desc.stext = stext.names[stext] +desc.iphen = c("Evergreen","Drought deciduous") +#------------------------------------------------------------------------------------------# + + + + +#------------------------------------------------------------------------------------------# +# Initialise the variables. # +#------------------------------------------------------------------------------------------# +template = array( data = NA + , dim = c(n.drain,n.dtemp,n.realisation,n.iphen,n.iata,n.stext) + , dimnames = list(key.drain,key.dtemp,key.realisation,key.iphen + ,key.iata,key.stext) + )#end array +datum = list ( agb = template + , lai = template + , bsa = template + , status = template + , yearn = template + )#end list +#------------------------------------------------------------------------------------------# + + + + +#------------------------------------------------------------------------------------------# +# Copy the information from last check to joborder. # +#------------------------------------------------------------------------------------------# +jobs$status = rep("INITIAL",times=njobs) +jobs$yearn = jobs$yeara +jobs$agb = rep(NA,times=njobs) +jobs$bsa = rep(NA,times=njobs) +jobs$lai = rep(NA,times=njobs) + +il = match(last$run,jobs$run); l.sel = ! is.na(il) +ic = match(curr$run,jobs$run); c.sel = ! is.na(ic) +jobs$status[il[l.sel]] = last$runt[l.sel] ; jobs$status[ic[c.sel]] = curr$runt[c.sel] +jobs$agb [il[l.sel]] = last$agb [l.sel] ; jobs$agb [ic[c.sel]] = curr$agb [c.sel] +jobs$lai [il[l.sel]] = last$lai [l.sel] ; jobs$lai [ic[c.sel]] = curr$lai [c.sel] +jobs$bsa [il[l.sel]] = last$bsa [l.sel] ; jobs$bsa [ic[c.sel]] = curr$bsa [c.sel] +jobs$yearn [il[l.sel]] = last$year[l.sel] ; jobs$yearn [ic[c.sel]] = curr$year[c.sel] + + + + + +keep = names(jobs) %in% c("drain","dtemp","realisation","iphen","iata","istext" + ,"yeara","yearz","yearn","status","agb","bsa","lai") +jobs = jobs[,keep] +weird = is.finite(jobs$lai) & abs(jobs$lai) > 20 +jobs$lai[weird] = NA +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Find the indices to map the data to the arrays. # +#------------------------------------------------------------------------------------------# +i.drain = match(jobs$drain ,drain ) +i.dtemp = match(jobs$dtemp ,dtemp ) +i.realisation = match(jobs$realisation,realisation) +i.iphen = match(jobs$iphen ,iphen ) +i.iata = match(jobs$iata ,iata ) +i.stext = match(jobs$istext ,stext ) +index = cbind(i.drain,i.dtemp,i.realisation,i.iphen,i.iata,i.stext) +datum$agb [index] = jobs$agb +datum$lai [index] = jobs$lai +datum$bsa [index] = jobs$bsa +datum$status[index] = jobs$status +datum$yearn [index] = jobs$yearn +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Run the matrices. # +#------------------------------------------------------------------------------------------# +yr.range = range(c(jobs$yeara,jobs$yearz)) +yr.cut = pretty(yr.range,n=10) +yr.keep = yr.cut > yr.range[1] & yr.cut < yr.range[2] +yr.brks = c(-Inf,c(yr.range[1],yr.cut[yr.keep],yr.range[2])) +n.cut = length(yr.cut)-1 +yr.cut = cut(datum$yearn,yr.brks) +yr.level = levels(yr.cut) +n.level = length(yr.level) +#------------------------------------------------------------------------------------------# + + + +#------ Find the year colours. ------------------------------------------------------------# +datum$yr.idx = match(yr.cut,yr.level) + 0 * datum$yearn +initial = datum$status == "INITIAL" +crashed = datum$status == "CRASHED" +metmiss = datum$status == "METMISS" +stopped = datum$status == "STOPPED" +extinct = datum$status == "EXTINCT" +ststate = datum$status == "STSTATE" +the.end = datum$status == "THE_END" +datum$yr.idx[initial] = 0 +datum$yr.idx[the.end] = n.level + 1 +datum$yr.idx[ststate] = n.level + 2 +datum$yr.idx[extinct] = n.level + 3 +datum$yr.idx[stopped] = n.level + 4 +datum$yr.idx[metmiss] = n.level + 5 +datum$yr.idx[crashed] = n.level + 6 +yr.cscheme = c("grey89",iatlas(n=n.level),"royalblue4","steelblue3","purple3" + ,"mediumpurple1","deepskyblue","hotpink") +ybottom = rep(0,times=n.level+7) +ytop = rep(1,times=n.level+7) +xleft = seq(from=-1,to=n.level+5) +xright = seq(from= 0,to=n.level+6) +xat = seq(from=-1,to=n.level+5)+0.5 +xbrks = seq(from=-1,to=n.level+6)+0.5 +xlabel = c("Initial",yr.brks[-1],"Finish","StState","Extinct" + ,"Stopped","MetMiss","Crashed") +#------------------------------------------------------------------------------------------# + + + + + +#------------------------------------------------------------------------------------------# +# Pick a random realisation to send to the user. # +#------------------------------------------------------------------------------------------# +use.yr.idx = apply( X = datum$yr.idx + , FUN = max + , MARGIN = c(1,2,4,5,6) + , na.rm = TRUE + )#end use.idx +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Create the status map for all sites. # +#------------------------------------------------------------------------------------------# +cat(" Plot the current status...","\n") +lo.box = pretty.box(n.iphen*n.iata) +for (st in 1:n.stext){ + #------ Find the soil texture key and description. -------------------------------------# + this.st.key = key.stext [st] + letitre = paste("Polygon status -- Soil type: ",desc.stext[st] + ,sep="") + lex = paste("Rainfall change [scale parameter]") + ley = paste("Temperature change [K]") + #---------------------------------------------------------------------------------------# + + for (o in 1:nout){ + #----- Open file. -------------------------------------------------------------------# + fichier = paste(here,"/stt_",this.st.key,".",outform[o],sep="") + if(outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth,height=size$height*depth + ,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }#end if + #------------------------------------------------------------------------------------# + + + #----- Save the margins to avoid losing the data. -----------------------------------# + par.orig = par(no.readonly = TRUE) + mar.orig = par.orig$mar + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Split the plotting window. # + #------------------------------------------------------------------------------------# + par(oma = c(0.2,3,4,0)) + layout( mat = rbind(lo.box$mat+1,rep(1,times=lo.box$ncol)) + , heights = c(rep(5/lo.box$nrow,lo.box$nrow),1) + )#end layout + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # First, let's plot the legend. # + #------------------------------------------------------------------------------------# + par(mar=c(3,3,2,3)+0.1) + plot.new() + plot.window(xlim=range(xleft,xright),ylim=range(ybottom,ytop),xaxs="i",yaxs="i") + rect(xleft=xleft,ybottom=ybottom,xright=xright,ytop=ytop,col=yr.cscheme) + box() + axis(side=1,at=xat,srt=45,labels=FALSE) + text(x=xat,y=par("usr")[3]-0.6,labels=xlabel,srt=30,adj=1,xpd=TRUE,cex=1.15) + title(main="Status",ylab="",xlab="") + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Now we loop over sites and pheonologies. # + #------------------------------------------------------------------------------------# + k = 0 + for (ph in 1:n.iphen){ + for (pl in 1:n.iata){ + #----- Make the sub-title. ----------------------------------------------------# + lesub=paste(desc.iata[pl],desc.iphen[ph],sep=" - ") + #------------------------------------------------------------------------------# + + #----- Find out where is this box going, and set up axes and margins. ---------# + k = k + 1 + left = (k %% lo.box$ncol) == 1 || lo.box$ncol == 1 + right = (k %% lo.box$ncol) == 0 + top = k <= lo.box$ncol + bottom = k > (lo.box$nrow - 1) * lo.box$ncol + mar.now = c(3 + 1 * bottom,1 + 1 * left,1 + 1 * top,1 + 1 * right) + 0.1 + if (bottom){ + xaxt = "s" + }else{ + xaxt = "n" + }#end if + if (left){ + yaxt = "s" + }else{ + yaxt = "n" + }#end if + #------------------------------------------------------------------------------# + + + + #----- Set the window. --------------------------------------------------------# + par(mar = mar.now) + image(x=drain,y=dtemp,z=use.yr.idx[,,ph,pl,st],col=yr.cscheme,breaks=xbrks + ,xaxt=xaxt,yaxt=yaxt,main=lesub,xlab="",ylab="") + #------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------# + }#end for + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Plot the global title. # + #------------------------------------------------------------------------------------# + par(las=0) + mtext(side=1,text=lex ,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) + mtext(side=2,text=ley ,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) + mtext(side=3,text=letitre,outer=TRUE,font=2) + #------------------------------------------------------------------------------------# + + + + #----- Close the device. ------------------------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + bye = clean.tmp() + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# +}#end for +#------------------------------------------------------------------------------------------# + + + + +#------------------------------------------------------------------------------------------# +# Create parameter space maps for all other variables. # +#------------------------------------------------------------------------------------------# +cat(" Plot the current properties...","\n") +key.var = c("lai","bsa","agb") +desc.var = c("Leaf area index [m2/m2]","Basal area [cm2/m2]" + ,"Above-ground biomass [kgC/m2]") +n.var = length(key.var) +lo.box = pretty.box(n.iphen*n.iata) +for (v in 1:n.var){ + cat(" - ",desc.var[v],"...","\n") + #----- Collapse realisations using the median. -----------------------------------------# + this.var = apply( X = datum[[key.var[v]]] + , MARGIN = c(1,2,4,5,6) + , FUN = median + , na.rm = TRUE + )#end apply + rien = ! is.finite(this.var) + this.var[rien] = NA + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Break the data into bins. # + #---------------------------------------------------------------------------------------# + if (all(is.na(this.var))){ + var.brks = c(-1,0,1) + n.brks = length(var.brks) + var.cut = cut(as.numeric(this.var),breaks=var.brks) + }else{ + var.brks = pretty(this.var,n=ncolours) + n.brks = length(var.brks) + var.cut = cut(this.var,breaks=var.brks) + }#end if + n.brks = length(var.brks) + var.cut = cut(this.var,breaks=var.brks) + var.lev = levels(var.cut) + var.idx = match(var.cut,var.lev) + 0 * this.var + var.cscheme = iatlas(n=n.brks-1) + #---------------------------------------------------------------------------------------# + + + #----- Make the edges. -----------------------------------------------------------------# + xleft = var.brks[-n.brks] + xright = var.brks[ -1] + ybottom = rep(0,times=n.brks) + ytop = rep(1,times=n.brks) + xat = var.brks + #---------------------------------------------------------------------------------------# + + + for (st in 1:n.stext){ + #------ Find the soil texture key and description. ----------------------------------# + this.st.key = key.stext [st] + letitre = paste(desc.var[v]," -- Soil type: ",desc.stext[st],sep="") + lex = paste("Rainfall change [scale parameter]") + ley = paste("Temperature change [K]") + #------------------------------------------------------------------------------------# + + for (o in 1:nout){ + #----- Open file. ----------------------------------------------------------------# + fichier = paste(here,"/",key.var[v],"_",this.st.key,".",outform[o],sep="") + if(outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth,height=size$height*depth + ,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }#end if + #---------------------------------------------------------------------------------# + + + #----- Save the margins to avoid losing the data. --------------------------------# + par.orig = par(no.readonly = TRUE) + mar.orig = par.orig$mar + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Split the plotting window. # + #---------------------------------------------------------------------------------# + par(oma = c(0.2,3,4,0)) + layout( mat = rbind(lo.box$mat+1,rep(1,times=lo.box$ncol)) + , heights = c(rep(5/lo.box$nrow,lo.box$nrow),1) + )#end layout + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # First, let's plot the legend. # + #---------------------------------------------------------------------------------# + par(mar=c(3,3,2,3)+0.1) + plot.new() + plot.window(xlim=range(xleft,xright),ylim=range(ybottom,ytop),xaxs="i",yaxs="i") + rect(xleft=xleft,ybottom=ybottom,xright=xright,ytop=ytop,col=var.cscheme) + box() + axis(side=1,at=xat) + title(main=desc.var[v],xlab="",ylab="") + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Now we loop over sites and pheonologies. # + #---------------------------------------------------------------------------------# + k = 0 + for (ph in 1:n.iphen){ + for (pl in 1:n.iata){ + #----- Make the sub-title. -------------------------------------------------# + lesub=paste(desc.iata[pl],desc.iphen[ph],sep=" - ") + #---------------------------------------------------------------------------# + + #----- Find out where is this box going, and set up axes and margins. ------# + k = k + 1 + left = (k %% lo.box$ncol) == 1 || lo.box$ncol == 1 + right = (k %% lo.box$ncol) == 0 + top = k <= lo.box$ncol + bottom = k > (lo.box$nrow - 1) * lo.box$ncol + mar.now = c(3 + 1 * bottom,1 + 1 * left,1 + 1 * top,1 + 1 * right) + 0.1 + if (bottom){ + xaxt = "s" + }else{ + xaxt = "n" + }#end if + if (left){ + yaxt = "s" + }else{ + yaxt = "n" + }#end if + #---------------------------------------------------------------------------# + + + + #----- Set the window. -----------------------------------------------------# + par(mar = mar.now) + image(x=drain,y=dtemp,z=this.var[,,ph,pl,st],col=var.cscheme + ,breaks=var.brks,xaxt=xaxt,yaxt=yaxt,main=lesub,xlab="",ylab="") + #---------------------------------------------------------------------------# + }#end for + #------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Plot the global title. # + #---------------------------------------------------------------------------------# + par(las=0) + mtext(side=1,text=lex ,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) + mtext(side=2,text=ley ,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) + mtext(side=3,text=letitre,outer=TRUE,font=2) + #---------------------------------------------------------------------------------# + + + + #----- Close the device. ---------------------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + bye = clean.tmp() + #---------------------------------------------------------------------------------# + }#end for + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# +}#end for +#------------------------------------------------------------------------------------------# diff --git a/ED/Template/sit_utils/tail.txt b/ED/Template/sit_utils/tail.txt new file mode 100644 index 000000000..83260b504 --- /dev/null +++ b/ED/Template/sit_utils/tail.txt @@ -0,0 +1,10 @@ +Attached are a few plots showing the simulation status. The estimated time to reach the +end is in days. + +-- +Odyssey + + + + + diff --git a/ED/Template/spawn_poly.sh b/ED/Template/spawn_poly.sh index 9b568b6d9..827ee6268 100755 --- a/ED/Template/spawn_poly.sh +++ b/ED/Template/spawn_poly.sh @@ -23,14 +23,14 @@ sitemetdef='/n/moorcroft_data/mlongo/data/ed2_data/site_met_driver' #----- This is the header with the Sheffield data. ----------------------------------------# shefhead='SHEF_NCEP_DRIVER_DS314' #----- Path with default pseudo past drivers. ---------------------------------------------# -scenariopathdef='/n/moorcroft_data/mlongo/data/ed2_data/scenario_met_driver' +scenariopathdef='/n/moorcroft_data/mlongo/data/ed2_data/realisation_scen_driver' #----- Should the met driver be copied to local scratch disks? ----------------------------# copy2scratch='n' #------------------------------------------------------------------------------------------# # In case we should copy, this is the source where the data is organised to go. This # # will override sitemetdef and scenariopath. # #------------------------------------------------------------------------------------------# -packdatasrc='/n/moorcroft_data/mlongo/data/2scratch' +packdatasrc='/n/moorcroft_data/mlongo/data/tower_scratch' #------------------------------------------------------------------------------------------# #------------------------------------------------------------------------------------------# @@ -82,7 +82,7 @@ execname='ed_2.1-opt' if [ ${copy2scratch} == 'y' -o ${copy2scratch} == 'Y' ] then sitemet='/scratch/mlongo/met_driver/site_met_driver' - scenariopath='/scratch/mlongo/met_driver/scenario_met_driver' + scenariopath='/scratch/mlongo/met_driver/realisation_scen_driver' shefpath='/scratch/mlongo/met_driver/sheffield' else sitemet=${sitemetdef} @@ -407,11 +407,20 @@ do # Run the small R script to check whether the simulation was running or not, # # and whether there was any cohort left by the time the runs were stopped. # #---------------------------------------------------------------------------------# - sed -i s@thispoly@${polyname}@g ${here}/${polyname}/whichrun.r - sed -i s@thisqueue@${queue}@g ${here}/${polyname}/whichrun.r - sed -i s@pathhere@${here}@g ${here}/${polyname}/whichrun.r - sed -i s@paththere@${there}@g ${here}/${polyname}/whichrun.r - R CMD BATCH ${here}/${polyname}/whichrun.r ${here}/${polyname}/outwhichrun.txt + /bin/rm -f ${here}/${polyname}/statusrun.txt + /bin/rm -f ${here}/${polyname}/whichrun.r + /bin/cp -f ${here}/Template/whichrun.r ${here}/${polyname}/whichrun.r + whichrun="${here}/${polyname}/whichrun.r" + outwhich="${here}/${polyname}/outwhichrun.txt" + sed -i s@thispoly@${polyname}@g ${whichrun} + sed -i s@thisqueue@${queue}@g ${whichrun} + sed -i s@pathhere@${here}@g ${whichrun} + sed -i s@paththere@${there}@g ${whichrun} + sed -i s@thisyeara@${yeara}@g ${whichrun} + sed -i s@thismontha@${montha}@g ${whichrun} + sed -i s@thisdatea@${datea}@g ${whichrun} + sed -i s@thistimea@${timea}@g ${whichrun} + R CMD BATCH --no-save --no-restore ${whichrun} ${outwhich} while [ ! -s ${here}/${polyname}/statusrun.txt ] do sleep 0.5 @@ -433,10 +442,19 @@ do cp -r ${here}/Template ${there}/${polyname} fi - sed -i s@thispoly@${polyname}@g ${here}/${polyname}/whichrun.r - sed -i s@thisqueue@${queue}@g ${here}/${polyname}/whichrun.r - sed -i s@pathhere@${here}@g ${here}/${polyname}/whichrun.r - sed -i s@paththere@${there}@g ${here}/${polyname}/whichrun.r + /bin/rm -f ${here}/${polyname}/statusrun.txt + /bin/rm -f ${here}/${polyname}/whichrun.r + /bin/cp -f ${here}/Template/whichrun.r ${here}/${polyname}/whichrun.r + whichrun="${here}/${polyname}/whichrun.r" + outwhich="${here}/${polyname}/outwhichrun.txt" + sed -i s@thispoly@${polyname}@g ${whichrun} + sed -i s@thisqueue@${queue}@g ${whichrun} + sed -i s@pathhere@${here}@g ${whichrun} + sed -i s@paththere@${there}@g ${whichrun} + sed -i s@thisyeara@${yeara}@g ${whichrun} + sed -i s@thismontha@${montha}@g ${whichrun} + sed -i s@thisdatea@${datea}@g ${whichrun} + sed -i s@thistimea@${timea}@g ${whichrun} year=${yeara} month=${montha} date=${datea} @@ -452,11 +470,20 @@ do then cp -r ${here}/Template ${there}/${polyname} fi - - sed -i s@thispoly@${polyname}@g ${here}/${polyname}/whichrun.r - sed -i s@thisqueue@${queue}@g ${here}/${polyname}/whichrun.r - sed -i s@pathhere@${here}@g ${here}/${polyname}/whichrun.r - sed -i s@paththere@${there}@g ${here}/${polyname}/whichrun.r + /bin/rm -f ${here}/${polyname}/statusrun.txt + /bin/rm -f ${here}/${polyname}/whichrun.r + /bin/cp -f ${here}/Template/whichrun.r ${here}/${polyname}/whichrun.r + whichrun="${here}/${polyname}/whichrun.r" + outwhich="${here}/${polyname}/outwhichrun.txt" + sed -i s@thispoly@${polyname}@g ${whichrun} + sed -i s@thisqueue@${queue}@g ${whichrun} + sed -i s@pathhere@${here}@g ${whichrun} + sed -i s@paththere@${there}@g ${whichrun} + sed -i s@thisyeara@${yeara}@g ${whichrun} + sed -i s@thismontha@${montha}@g ${whichrun} + sed -i s@thisdatea@${datea}@g ${whichrun} + sed -i s@thistimea@${timea}@g ${whichrun} + R CMD BATCH --no-save --no-restore ${whichrun} ${outwhich} year=${yeara} month=${montha} date=${datea} @@ -564,31 +591,27 @@ do #---------------------------------------------------------------------------------------# # Choose the scenario to use. Iscenario follows the following convention: # - # 0 -- No scenario, this only uses the tower years. # - # -1 -- Gap-filled data for the past 40 years, using historical rain but no sampling # - # 1 -- The gap-filled data is resampled with uniform distribution for probability of # - # picking any year (WITH replacement) # - # # - # For any A other than 0 or 1, a non-uniform probability of picking any year p(y): # - # (A is always positive the minus is just a flag) # - # # - # -A -- p (y) = k * A ^ [1 - 2*q(y)] # - # A -- p (y) = k * A ^ [2*q(y) - 1] # - # # - # where q(y) is the year ranking, q(driest) = 0, q(wettest) = 1) # - # # - # k is just a constant to make the CDF 1 for q>=1, it doesn't really matter, but in # - # case you're curious: # - # # - # 2 * A * ln(A) # - # k = --------------- # - # A^2 - A # + # "default" -- No scenario. Use the tower/Sheffield data. # + # "rRRR_tTTT -- Use scenarios, with rRRRR controlling the rainfall, and tTTTT # + # controlling temperature. # # # - # In summary, Negative A means that dry years are going to be picked more often, # - # whereas positive means that wet years are picked more often. # + # rRRR -- Rainfall scenarios, where rRRRR means: # + # r+000: INMET-based time series, no resampling. # + # r+010: Re-sampling with substitution, but equal chances for all years # + # r-XXX: Shift the location (similar to mean) of the distribution by # + # -X.XX units of scale (similar to standard deviation), so the # + # time series becomes drier. # + # r+XXX: Similar to above, but make the time series wetter. # # # + # tTTT -- Temperature scenarios, where tTTTT means: # + # t+000: No change in temperature # + # t-YYY: Change temperature by -Y.YY Kelvin. Keep relative humidity # + # the same and correct specific humidity. # + # t+YYY: Change temperature by +Y.YY Kelvin. Keep relative humidity # + # the same and correct by +Y.YY Kelvin. # + # r+XXX: Similar to above, but make the time series wetter. # #---------------------------------------------------------------------------------------# - if [ ${iscenario} -eq 0 ] + if [ ${iscenario} == "default" ] then #------------------------------------------------------------------------------------# # Determine which meteorological data set to use. Default is the Sheffield/NCEP # @@ -695,22 +718,7 @@ do #------------------------------------------------------------------------------------# # Find out which scenario to use. # #------------------------------------------------------------------------------------# - if [ ${iscenario} -eq -1 ] - then - whichscen='past' - elif [ ${iscenario} -eq 1 ] - then - whichscen='unif' - elif [ ${iscenario} -gt 1 ] - then - let wetter=1000+${iscenario} - whichscen='w'`echo ${wetter} | awk '{print substr($1,2,3)}'` - elif [ ${iscenario} -lt -1 ] - then - let drier=1000-${iscenario} - whichscen='d'`echo ${drier} | awk '{print substr($1,2,3)}'` - fi - fullscen="${scenariopath}/${whichscen}" + fullscen="${scenariopath}/${iscenario}" #------------------------------------------------------------------------------------# @@ -1425,10 +1433,11 @@ do sed -i s@myexec@${execname}@g ${callserial} sed -i s@myname@${moi}@g ${callserial} sed -i s@mypackdata@${packdatasrc}@g ${callserial} + sed -i s@myscenario@${iscenario}@g ${callserial} if [ ${queue} == 'unrestricted_parallel' ] then - sed -i s@thisqueue@GC3@g ${srun} + sed -i s@thisqueue@long_serial@g ${srun} echo 'Skip this node for now.' > ${here}/${polyname}/skipper.txt else sed -i s@thisqueue@${queue}@g ${srun} diff --git a/ED/src/dynamics/disturbance.f90 b/ED/src/dynamics/disturbance.f90 index 7a8897a21..14034a14c 100644 --- a/ED/src/dynamics/disturbance.f90 +++ b/ED/src/dynamics/disturbance.f90 @@ -1230,7 +1230,7 @@ subroutine initialize_disturbed_patch(csite,atm_tmp,np,dp,lsl) if (atm_tmp >= t3ple) then csite%sfcwater_fracliq(k,np) = 1.0 else - csite%sfcwater_fracliq(k,np) = 1.0 + csite%sfcwater_fracliq(k,np) = 0.0 end if end do @@ -1270,7 +1270,7 @@ subroutine initialize_disturbed_patch(csite,atm_tmp,np,dp,lsl) csite%total_plant_nitrogen_uptake(np) = 0.0 !------------------------------------------------------------------------------------! - !----- Initialise all fast variables. -----------------------------------------------! + !----- Initialise all fast and long-term variables. ---------------------------------! call init_ed_patch_vars(csite,np,np,lsl) return @@ -1422,11 +1422,13 @@ end subroutine normal_patch_vars ! the new, disturbed patch (np). ! !---------------------------------------------------------------------------------------! subroutine increment_patch_vars(csite,np, cp, area_fac) - use ed_state_vars, only : sitetype & ! structure - , patchtype ! ! structure - use ed_max_dims , only : n_pft ! ! intent(in) - use grid_coms , only : nzg ! ! intent(in) - + use ed_state_vars, only : sitetype & ! structure + , patchtype ! ! structure + use ed_max_dims , only : n_pft ! ! intent(in) + use grid_coms , only : nzg ! ! intent(in) + use ed_misc_coms , only : writing_long & ! intent(in) + , writing_eorq & ! intent(in) + , writing_dcyc ! ! intent(in) implicit none !----- Arguments. -------------------------------------------------------------------! type(sitetype), target :: csite @@ -1435,6 +1437,7 @@ subroutine increment_patch_vars(csite,np, cp, area_fac) real , intent(in) :: area_fac !----- Local variables. -------------------------------------------------------------! integer :: k + integer :: t !------------------------------------------------------------------------------------! csite%fast_soil_C (np) = csite%fast_soil_C (np) & @@ -1717,6 +1720,708 @@ subroutine increment_patch_vars(csite,np, cp, area_fac) !------------------------------------------------------------------------------------! + + + !------------------------------------------------------------------------------------! + ! Daily means... ! + !------------------------------------------------------------------------------------! + if (writing_long) then + csite%dmean_A_decomp ( np) = csite%dmean_A_decomp ( np) & + + csite%dmean_A_decomp ( cp) & + * area_fac + csite%dmean_Af_decomp ( np) = csite%dmean_Af_decomp ( np) & + + csite%dmean_Af_decomp ( cp) & + * area_fac + csite%dmean_co2_residual ( np) = csite%dmean_co2_residual ( np) & + + csite%dmean_co2_residual ( cp) & + * area_fac + csite%dmean_energy_residual( np) = csite%dmean_energy_residual( np) & + + csite%dmean_energy_residual( cp) & + * area_fac + csite%dmean_water_residual ( np) = csite%dmean_water_residual ( np) & + + csite%dmean_water_residual ( cp) & + * area_fac + csite%dmean_rh ( np) = csite%dmean_rh ( np) & + + csite%dmean_rh ( cp) & + * area_fac + csite%dmean_cwd_rh ( np) = csite%dmean_cwd_rh ( np) & + + csite%dmean_cwd_rh ( cp) & + * area_fac + csite%dmean_nep ( np) = csite%dmean_nep ( np) & + + csite%dmean_nep ( cp) & + * area_fac + csite%dmean_rk4step ( np) = csite%dmean_rk4step ( np) & + + csite%dmean_rk4step ( cp) & + * area_fac + csite%dmean_available_water( np) = csite%dmean_available_water( np) & + + csite%dmean_available_water( cp) & + * area_fac + csite%dmean_can_theiv ( np) = csite%dmean_can_theiv ( np) & + + csite%dmean_can_theiv ( cp) & + * area_fac + csite%dmean_can_theta ( np) = csite%dmean_can_theta ( np) & + + csite%dmean_can_theta ( cp) & + * area_fac + csite%dmean_can_vpdef ( np) = csite%dmean_can_vpdef ( np) & + + csite%dmean_can_vpdef ( cp) & + * area_fac + csite%dmean_can_temp ( np) = csite%dmean_can_temp ( np) & + + csite%dmean_can_temp ( cp) & + * area_fac + csite%dmean_can_shv ( np) = csite%dmean_can_shv ( np) & + + csite%dmean_can_shv ( cp) & + * area_fac + csite%dmean_can_co2 ( np) = csite%dmean_can_co2 ( np) & + + csite%dmean_can_co2 ( cp) & + * area_fac + csite%dmean_can_rhos ( np) = csite%dmean_can_rhos ( np) & + + csite%dmean_can_rhos ( cp) & + * area_fac + csite%dmean_can_prss ( np) = csite%dmean_can_prss ( np) & + + csite%dmean_can_prss ( cp) & + * area_fac + csite%dmean_gnd_temp ( np) = csite%dmean_gnd_temp ( np) & + + csite%dmean_gnd_temp ( cp) & + * area_fac + csite%dmean_gnd_shv ( np) = csite%dmean_gnd_shv ( np) & + + csite%dmean_gnd_shv ( cp) & + * area_fac + csite%dmean_can_ggnd ( np) = csite%dmean_can_ggnd ( np) & + + csite%dmean_can_ggnd ( cp) & + * area_fac + csite%dmean_sfcw_depth ( np) = csite%dmean_sfcw_depth ( np) & + + csite%dmean_sfcw_depth ( cp) & + * area_fac + csite%dmean_sfcw_energy ( np) = csite%dmean_sfcw_energy ( np) & + + csite%dmean_sfcw_energy ( cp) & + * area_fac + csite%dmean_sfcw_mass ( np) = csite%dmean_sfcw_mass ( np) & + + csite%dmean_sfcw_mass ( cp) & + * area_fac + csite%dmean_sfcw_temp ( np) = csite%dmean_sfcw_temp ( np) & + + csite%dmean_sfcw_temp ( cp) & + * area_fac + csite%dmean_sfcw_fliq ( np) = csite%dmean_sfcw_fliq ( np) & + + csite%dmean_sfcw_fliq ( cp) & + * area_fac + csite%dmean_rshort_gnd ( np) = csite%dmean_rshort_gnd ( np) & + + csite%dmean_rshort_gnd ( cp) & + * area_fac + csite%dmean_par_gnd ( np) = csite%dmean_par_gnd ( np) & + + csite%dmean_par_gnd ( cp) & + * area_fac + csite%dmean_rlong_gnd ( np) = csite%dmean_rlong_gnd ( np) & + + csite%dmean_rlong_gnd ( cp) & + * area_fac + csite%dmean_rlongup ( np) = csite%dmean_rlongup ( np) & + + csite%dmean_rlongup ( cp) & + * area_fac + csite%dmean_parup ( np) = csite%dmean_parup ( np) & + + csite%dmean_parup ( cp) & + * area_fac + csite%dmean_nirup ( np) = csite%dmean_nirup ( np) & + + csite%dmean_nirup ( cp) & + * area_fac + csite%dmean_rshortup ( np) = csite%dmean_rshortup ( np) & + + csite%dmean_rshortup ( cp) & + * area_fac + csite%dmean_rnet ( np) = csite%dmean_rnet ( np) & + + csite%dmean_rnet ( cp) & + * area_fac + csite%dmean_albedo ( np) = csite%dmean_albedo ( np) & + + csite%dmean_albedo ( cp) & + * area_fac + csite%dmean_albedo_beam ( np) = csite%dmean_albedo_beam ( np) & + + csite%dmean_albedo_beam ( cp) & + * area_fac + csite%dmean_albedo_diff ( np) = csite%dmean_albedo_diff ( np) & + + csite%dmean_albedo_diff ( cp) & + * area_fac + csite%dmean_rlong_albedo ( np) = csite%dmean_rlong_albedo ( np) & + + csite%dmean_rlong_albedo ( cp) & + * area_fac + csite%dmean_ustar ( np) = csite%dmean_ustar ( np) & + + csite%dmean_ustar ( cp) & + * area_fac + csite%dmean_tstar ( np) = csite%dmean_tstar ( np) & + + csite%dmean_tstar ( cp) & + * area_fac + csite%dmean_qstar ( np) = csite%dmean_qstar ( np) & + + csite%dmean_qstar ( cp) & + * area_fac + csite%dmean_cstar ( np) = csite%dmean_cstar ( np) & + + csite%dmean_cstar ( cp) & + * area_fac + csite%dmean_carbon_ac ( np) = csite%dmean_carbon_ac ( np) & + + csite%dmean_carbon_ac ( cp) & + * area_fac + csite%dmean_carbon_st ( np) = csite%dmean_carbon_st ( np) & + + csite%dmean_carbon_st ( cp) & + * area_fac + csite%dmean_vapor_gc ( np) = csite%dmean_vapor_gc ( np) & + + csite%dmean_vapor_gc ( cp) & + * area_fac + csite%dmean_vapor_ac ( np) = csite%dmean_vapor_ac ( np) & + + csite%dmean_vapor_ac ( cp) & + * area_fac + csite%dmean_throughfall ( np) = csite%dmean_throughfall ( np) & + + csite%dmean_throughfall ( cp) & + * area_fac + csite%dmean_runoff ( np) = csite%dmean_runoff ( np) & + + csite%dmean_runoff ( cp) & + * area_fac + csite%dmean_drainage ( np) = csite%dmean_drainage ( np) & + + csite%dmean_drainage ( cp) & + * area_fac + csite%dmean_sensible_gc ( np) = csite%dmean_sensible_gc ( np) & + + csite%dmean_sensible_gc ( cp) & + * area_fac + csite%dmean_sensible_ac ( np) = csite%dmean_sensible_ac ( np) & + + csite%dmean_sensible_ac ( cp) & + * area_fac + csite%dmean_qthroughfall ( np) = csite%dmean_qthroughfall ( np) & + + csite%dmean_qthroughfall ( cp) & + * area_fac + csite%dmean_qrunoff ( np) = csite%dmean_qrunoff ( np) & + + csite%dmean_qrunoff ( cp) & + * area_fac + csite%dmean_qdrainage ( np) = csite%dmean_qdrainage ( np) & + + csite%dmean_qdrainage ( cp) & + * area_fac + csite%dmean_soil_energy ( :,np) = csite%dmean_soil_energy ( :,np) & + + csite%dmean_soil_energy ( :,cp) & + * area_fac + csite%dmean_soil_mstpot ( :,np) = csite%dmean_soil_mstpot ( :,np) & + + csite%dmean_soil_mstpot ( :,cp) & + * area_fac + csite%dmean_soil_water ( :,np) = csite%dmean_soil_water ( :,np) & + + csite%dmean_soil_water ( :,cp) & + * area_fac + csite%dmean_soil_temp ( :,np) = csite%dmean_soil_temp ( :,np) & + + csite%dmean_soil_temp ( :,cp) & + * area_fac + csite%dmean_soil_fliq ( :,np) = csite%dmean_soil_fliq ( :,np) & + + csite%dmean_soil_fliq ( :,cp) & + * area_fac + csite%dmean_smoist_gg ( :,np) = csite%dmean_smoist_gg ( :,np) & + + csite%dmean_smoist_gg ( :,cp) & + * area_fac + csite%dmean_transloss ( :,np) = csite%dmean_transloss ( :,np) & + + csite%dmean_transloss ( :,cp) & + * area_fac + csite%dmean_sensible_gg ( :,np) = csite%dmean_sensible_gg ( :,np) & + + csite%dmean_sensible_gg ( :,cp) & + * area_fac + end if + !------------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------------! + ! Monthly means... ! + !------------------------------------------------------------------------------------! + if (writing_eorq) then + csite%mmean_fast_soil_c ( np) = csite%mmean_fast_soil_c ( np) & + + csite%mmean_fast_soil_c ( cp) & + * area_fac + csite%mmean_slow_soil_c ( np) = csite%mmean_slow_soil_c ( np) & + + csite%mmean_slow_soil_c ( cp) & + * area_fac + csite%mmean_struct_soil_c ( np) = csite%mmean_struct_soil_c ( np) & + + csite%mmean_struct_soil_c ( cp) & + * area_fac + csite%mmean_struct_soil_l ( np) = csite%mmean_struct_soil_l ( np) & + + csite%mmean_struct_soil_l ( cp) & + * area_fac + csite%mmean_fast_soil_n ( np) = csite%mmean_fast_soil_n ( np) & + + csite%mmean_fast_soil_n ( cp) & + * area_fac + csite%mmean_mineral_soil_n ( np) = csite%mmean_mineral_soil_n ( np) & + + csite%mmean_mineral_soil_n ( cp) & + * area_fac + csite%mmean_co2_residual ( np) = csite%mmean_co2_residual ( np) & + + csite%mmean_co2_residual ( cp) & + * area_fac + csite%mmean_energy_residual( np) = csite%mmean_energy_residual( np) & + + csite%mmean_energy_residual( cp) & + * area_fac + csite%mmean_water_residual ( np) = csite%mmean_water_residual ( np) & + + csite%mmean_water_residual ( cp) & + * area_fac + csite%mmean_rh ( np) = csite%mmean_rh ( np) & + + csite%mmean_rh ( cp) & + * area_fac + csite%mmean_cwd_rh ( np) = csite%mmean_cwd_rh ( np) & + + csite%mmean_cwd_rh ( cp) & + * area_fac + csite%mmean_nep ( np) = csite%mmean_nep ( np) & + + csite%mmean_nep ( cp) & + * area_fac + csite%mmean_A_decomp ( np) = csite%mmean_A_decomp ( np) & + + csite%mmean_A_decomp ( cp) & + * area_fac + csite%mmean_Af_decomp ( np) = csite%mmean_Af_decomp ( np) & + + csite%mmean_Af_decomp ( cp) & + * area_fac + csite%mmean_rk4step ( np) = csite%mmean_rk4step ( np) & + + csite%mmean_rk4step ( cp) & + * area_fac + csite%mmean_available_water( np) = csite%mmean_available_water( np) & + + csite%mmean_available_water( cp) & + * area_fac + csite%mmean_can_theiv ( np) = csite%mmean_can_theiv ( np) & + + csite%mmean_can_theiv ( cp) & + * area_fac + csite%mmean_can_theta ( np) = csite%mmean_can_theta ( np) & + + csite%mmean_can_theta ( cp) & + * area_fac + csite%mmean_can_vpdef ( np) = csite%mmean_can_vpdef ( np) & + + csite%mmean_can_vpdef ( cp) & + * area_fac + csite%mmean_can_temp ( np) = csite%mmean_can_temp ( np) & + + csite%mmean_can_temp ( cp) & + * area_fac + csite%mmean_can_shv ( np) = csite%mmean_can_shv ( np) & + + csite%mmean_can_shv ( cp) & + * area_fac + csite%mmean_can_co2 ( np) = csite%mmean_can_co2 ( np) & + + csite%mmean_can_co2 ( cp) & + * area_fac + csite%mmean_can_rhos ( np) = csite%mmean_can_rhos ( np) & + + csite%mmean_can_rhos ( cp) & + * area_fac + csite%mmean_can_prss ( np) = csite%mmean_can_prss ( np) & + + csite%mmean_can_prss ( cp) & + * area_fac + csite%mmean_gnd_temp ( np) = csite%mmean_gnd_temp ( np) & + + csite%mmean_gnd_temp ( cp) & + * area_fac + csite%mmean_gnd_shv ( np) = csite%mmean_gnd_shv ( np) & + + csite%mmean_gnd_shv ( cp) & + * area_fac + csite%mmean_can_ggnd ( np) = csite%mmean_can_ggnd ( np) & + + csite%mmean_can_ggnd ( cp) & + * area_fac + csite%mmean_sfcw_depth ( np) = csite%mmean_sfcw_depth ( np) & + + csite%mmean_sfcw_depth ( cp) & + * area_fac + csite%mmean_sfcw_energy ( np) = csite%mmean_sfcw_energy ( np) & + + csite%mmean_sfcw_energy ( cp) & + * area_fac + csite%mmean_sfcw_mass ( np) = csite%mmean_sfcw_mass ( np) & + + csite%mmean_sfcw_mass ( cp) & + * area_fac + csite%mmean_sfcw_temp ( np) = csite%mmean_sfcw_temp ( np) & + + csite%mmean_sfcw_temp ( cp) & + * area_fac + csite%mmean_sfcw_fliq ( np) = csite%mmean_sfcw_fliq ( np) & + + csite%mmean_sfcw_fliq ( cp) & + * area_fac + csite%mmean_rshort_gnd ( np) = csite%mmean_rshort_gnd ( np) & + + csite%mmean_rshort_gnd ( cp) & + * area_fac + csite%mmean_par_gnd ( np) = csite%mmean_par_gnd ( np) & + + csite%mmean_par_gnd ( cp) & + * area_fac + csite%mmean_rlong_gnd ( np) = csite%mmean_rlong_gnd ( np) & + + csite%mmean_rlong_gnd ( cp) & + * area_fac + csite%mmean_rlongup ( np) = csite%mmean_rlongup ( np) & + + csite%mmean_rlongup ( cp) & + * area_fac + csite%mmean_parup ( np) = csite%mmean_parup ( np) & + + csite%mmean_parup ( cp) & + * area_fac + csite%mmean_nirup ( np) = csite%mmean_nirup ( np) & + + csite%mmean_nirup ( cp) & + * area_fac + csite%mmean_rshortup ( np) = csite%mmean_rshortup ( np) & + + csite%mmean_rshortup ( cp) & + * area_fac + csite%mmean_rnet ( np) = csite%mmean_rnet ( np) & + + csite%mmean_rnet ( cp) & + * area_fac + csite%mmean_albedo ( np) = csite%mmean_albedo ( np) & + + csite%mmean_albedo ( cp) & + * area_fac + csite%mmean_albedo_beam ( np) = csite%mmean_albedo_beam ( np) & + + csite%mmean_albedo_beam ( cp) & + * area_fac + csite%mmean_albedo_diff ( np) = csite%mmean_albedo_diff ( np) & + + csite%mmean_albedo_diff ( cp) & + * area_fac + csite%mmean_rlong_albedo ( np) = csite%mmean_rlong_albedo ( np) & + + csite%mmean_rlong_albedo ( cp) & + * area_fac + csite%mmean_ustar ( np) = csite%mmean_ustar ( np) & + + csite%mmean_ustar ( cp) & + * area_fac + csite%mmean_tstar ( np) = csite%mmean_tstar ( np) & + + csite%mmean_tstar ( cp) & + * area_fac + csite%mmean_qstar ( np) = csite%mmean_qstar ( np) & + + csite%mmean_qstar ( cp) & + * area_fac + csite%mmean_cstar ( np) = csite%mmean_cstar ( np) & + + csite%mmean_cstar ( cp) & + * area_fac + csite%mmean_carbon_ac ( np) = csite%mmean_carbon_ac ( np) & + + csite%mmean_carbon_ac ( cp) & + * area_fac + csite%mmean_carbon_st ( np) = csite%mmean_carbon_st ( np) & + + csite%mmean_carbon_st ( cp) & + * area_fac + csite%mmean_vapor_gc ( np) = csite%mmean_vapor_gc ( np) & + + csite%mmean_vapor_gc ( cp) & + * area_fac + csite%mmean_vapor_ac ( np) = csite%mmean_vapor_ac ( np) & + + csite%mmean_vapor_ac ( cp) & + * area_fac + csite%mmean_throughfall ( np) = csite%mmean_throughfall ( np) & + + csite%mmean_throughfall ( cp) & + * area_fac + csite%mmean_runoff ( np) = csite%mmean_runoff ( np) & + + csite%mmean_runoff ( cp) & + * area_fac + csite%mmean_drainage ( np) = csite%mmean_drainage ( np) & + + csite%mmean_drainage ( cp) & + * area_fac + csite%mmean_sensible_gc ( np) = csite%mmean_sensible_gc ( np) & + + csite%mmean_sensible_gc ( cp) & + * area_fac + csite%mmean_sensible_ac ( np) = csite%mmean_sensible_ac ( np) & + + csite%mmean_sensible_ac ( cp) & + * area_fac + csite%mmean_qthroughfall ( np) = csite%mmean_qthroughfall ( np) & + + csite%mmean_qthroughfall ( cp) & + * area_fac + csite%mmean_qrunoff ( np) = csite%mmean_qrunoff ( np) & + + csite%mmean_qrunoff ( cp) & + * area_fac + csite%mmean_qdrainage ( np) = csite%mmean_qdrainage ( np) & + + csite%mmean_qdrainage ( cp) & + * area_fac + csite%mmean_A_decomp ( np) = csite%mmean_A_decomp ( np) & + + csite%mmean_A_decomp ( cp) & + * area_fac + csite%mmean_Af_decomp ( np) = csite%mmean_Af_decomp ( np) & + + csite%mmean_Af_decomp ( cp) & + * area_fac + csite%mmean_co2_residual ( np) = csite%mmean_co2_residual ( np) & + + csite%mmean_co2_residual ( cp) & + * area_fac + csite%mmean_energy_residual( np) = csite%mmean_energy_residual( np) & + + csite%mmean_energy_residual( cp) & + * area_fac + csite%mmean_water_residual ( np) = csite%mmean_water_residual ( np) & + + csite%mmean_water_residual ( cp) & + * area_fac + csite%mmsqu_rh ( np) = csite%mmsqu_rh ( np) & + + csite%mmsqu_rh ( cp) & + * area_fac + csite%mmsqu_cwd_rh ( np) = csite%mmsqu_cwd_rh ( np) & + + csite%mmsqu_cwd_rh ( cp) & + * area_fac + csite%mmsqu_nep ( np) = csite%mmsqu_nep ( np) & + + csite%mmsqu_nep ( cp) & + * area_fac + csite%mmsqu_rlongup ( np) = csite%mmsqu_rlongup ( np) & + + csite%mmsqu_rlongup ( cp) & + * area_fac + csite%mmsqu_parup ( np) = csite%mmsqu_parup ( np) & + + csite%mmsqu_parup ( cp) & + * area_fac + csite%mmsqu_nirup ( np) = csite%mmsqu_nirup ( np) & + + csite%mmsqu_nirup ( cp) & + * area_fac + csite%mmsqu_rshortup ( np) = csite%mmsqu_rshortup ( np) & + + csite%mmsqu_rshortup ( cp) & + * area_fac + csite%mmsqu_rnet ( np) = csite%mmsqu_rnet ( np) & + + csite%mmsqu_rnet ( cp) & + * area_fac + csite%mmsqu_albedo ( np) = csite%mmsqu_albedo ( np) & + + csite%mmsqu_albedo ( cp) & + * area_fac + csite%mmsqu_ustar ( np) = csite%mmsqu_ustar ( np) & + + csite%mmsqu_ustar ( cp) & + * area_fac + csite%mmsqu_carbon_ac ( np) = csite%mmsqu_carbon_ac ( np) & + + csite%mmsqu_carbon_ac ( cp) & + * area_fac + csite%mmsqu_carbon_st ( np) = csite%mmsqu_carbon_st ( np) & + + csite%mmsqu_carbon_st ( cp) & + * area_fac + csite%mmsqu_vapor_gc ( np) = csite%mmsqu_vapor_gc ( np) & + + csite%mmsqu_vapor_gc ( cp) & + * area_fac + csite%mmsqu_vapor_ac ( np) = csite%mmsqu_vapor_ac ( np) & + + csite%mmsqu_vapor_ac ( cp) & + * area_fac + csite%mmsqu_sensible_gc ( np) = csite%mmsqu_sensible_gc ( np) & + + csite%mmsqu_sensible_gc ( cp) & + * area_fac + csite%mmsqu_sensible_ac ( np) = csite%mmsqu_sensible_ac ( np) & + + csite%mmsqu_sensible_ac ( cp) & + * area_fac + csite%mmean_soil_energy ( :,np) = csite%mmean_soil_energy ( :,np) & + + csite%mmean_soil_energy ( :,cp) & + * area_fac + csite%mmean_soil_mstpot ( :,np) = csite%mmean_soil_mstpot ( :,np) & + + csite%mmean_soil_mstpot ( :,cp) & + * area_fac + csite%mmean_soil_water ( :,np) = csite%mmean_soil_water ( :,np) & + + csite%mmean_soil_water ( :,cp) & + * area_fac + csite%mmean_soil_temp ( :,np) = csite%mmean_soil_temp ( :,np) & + + csite%mmean_soil_temp ( :,cp) & + * area_fac + csite%mmean_soil_fliq ( :,np) = csite%mmean_soil_fliq ( :,np) & + + csite%mmean_soil_fliq ( :,cp) & + * area_fac + csite%mmean_smoist_gg ( :,np) = csite%mmean_smoist_gg ( :,np) & + + csite%mmean_smoist_gg ( :,cp) & + * area_fac + csite%mmean_transloss ( :,np) = csite%mmean_transloss ( :,np) & + + csite%mmean_transloss ( :,cp) & + * area_fac + csite%mmean_sensible_gg ( :,np) = csite%mmean_sensible_gg ( :,np) & + + csite%mmean_sensible_gg ( :,cp) & + * area_fac + end if + !------------------------------------------------------------------------------------! + + + + + !------------------------------------------------------------------------------------! + ! Mean diel... ! + !------------------------------------------------------------------------------------! + if (writing_dcyc) then + csite%qmean_rh ( :,np) = csite%qmean_rh ( :,np) & + + csite%qmean_rh ( :,cp) & + * area_fac + csite%qmean_cwd_rh ( :,np) = csite%qmean_cwd_rh ( :,np) & + + csite%qmean_cwd_rh ( :,cp) & + * area_fac + csite%qmean_nep ( :,np) = csite%qmean_nep ( :,np) & + + csite%qmean_nep ( :,cp) & + * area_fac + csite%qmean_rk4step ( :,np) = csite%qmean_rk4step ( :,np) & + + csite%qmean_rk4step ( :,cp) & + * area_fac + csite%qmean_available_water( :,np) = csite%qmean_available_water( :,np) & + + csite%qmean_available_water( :,cp) & + * area_fac + csite%qmean_can_theiv ( :,np) = csite%qmean_can_theiv ( :,np) & + + csite%qmean_can_theiv ( :,cp) & + * area_fac + csite%qmean_can_theta ( :,np) = csite%qmean_can_theta ( :,np) & + + csite%qmean_can_theta ( :,cp) & + * area_fac + csite%qmean_can_vpdef ( :,np) = csite%qmean_can_vpdef ( :,np) & + + csite%qmean_can_vpdef ( :,cp) & + * area_fac + csite%qmean_can_temp ( :,np) = csite%qmean_can_temp ( :,np) & + + csite%qmean_can_temp ( :,cp) & + * area_fac + csite%qmean_can_shv ( :,np) = csite%qmean_can_shv ( :,np) & + + csite%qmean_can_shv ( :,cp) & + * area_fac + csite%qmean_can_co2 ( :,np) = csite%qmean_can_co2 ( :,np) & + + csite%qmean_can_co2 ( :,cp) & + * area_fac + csite%qmean_can_rhos ( :,np) = csite%qmean_can_rhos ( :,np) & + + csite%qmean_can_rhos ( :,cp) & + * area_fac + csite%qmean_can_prss ( :,np) = csite%qmean_can_prss ( :,np) & + + csite%qmean_can_prss ( :,cp) & + * area_fac + csite%qmean_gnd_temp ( :,np) = csite%qmean_gnd_temp ( :,np) & + + csite%qmean_gnd_temp ( :,cp) & + * area_fac + csite%qmean_gnd_shv ( :,np) = csite%qmean_gnd_shv ( :,np) & + + csite%qmean_gnd_shv ( :,cp) & + * area_fac + csite%qmean_can_ggnd ( :,np) = csite%qmean_can_ggnd ( :,np) & + + csite%qmean_can_ggnd ( :,cp) & + * area_fac + csite%qmean_sfcw_depth ( :,np) = csite%qmean_sfcw_depth ( :,np) & + + csite%qmean_sfcw_depth ( :,cp) & + * area_fac + csite%qmean_sfcw_energy ( :,np) = csite%qmean_sfcw_energy ( :,np) & + + csite%qmean_sfcw_energy ( :,cp) & + * area_fac + csite%qmean_sfcw_mass ( :,np) = csite%qmean_sfcw_mass ( :,np) & + + csite%qmean_sfcw_mass ( :,cp) & + * area_fac + csite%qmean_sfcw_temp ( :,np) = csite%qmean_sfcw_temp ( :,np) & + + csite%qmean_sfcw_temp ( :,cp) & + * area_fac + csite%qmean_sfcw_fliq ( :,np) = csite%qmean_sfcw_fliq ( :,np) & + + csite%qmean_sfcw_fliq ( :,cp) & + * area_fac + csite%qmean_soil_energy (:,:,np) = csite%qmean_soil_energy (:,:,np) & + + csite%qmean_soil_energy (:,:,cp) & + * area_fac + csite%qmean_soil_mstpot (:,:,np) = csite%qmean_soil_mstpot (:,:,np) & + + csite%qmean_soil_mstpot (:,:,cp) & + * area_fac + csite%qmean_soil_water (:,:,np) = csite%qmean_soil_water (:,:,np) & + + csite%qmean_soil_water (:,:,cp) & + * area_fac + csite%qmean_soil_temp (:,:,np) = csite%qmean_soil_temp (:,:,np) & + + csite%qmean_soil_temp (:,:,cp) & + * area_fac + csite%qmean_soil_fliq (:,:,np) = csite%qmean_soil_fliq (:,:,np) & + + csite%qmean_soil_fliq (:,:,cp) & + * area_fac + csite%qmean_rshort_gnd ( :,np) = csite%qmean_rshort_gnd ( :,np) & + + csite%qmean_rshort_gnd ( :,cp) & + * area_fac + csite%qmean_par_gnd ( :,np) = csite%qmean_par_gnd ( :,np) & + + csite%qmean_par_gnd ( :,cp) & + * area_fac + csite%qmean_rlong_gnd ( :,np) = csite%qmean_rlong_gnd ( :,np) & + + csite%qmean_rlong_gnd ( :,cp) & + * area_fac + csite%qmean_rlongup ( :,np) = csite%qmean_rlongup ( :,np) & + + csite%qmean_rlongup ( :,cp) & + * area_fac + csite%qmean_parup ( :,np) = csite%qmean_parup ( :,np) & + + csite%qmean_parup ( :,cp) & + * area_fac + csite%qmean_nirup ( :,np) = csite%qmean_nirup ( :,np) & + + csite%qmean_nirup ( :,cp) & + * area_fac + csite%qmean_rshortup ( :,np) = csite%qmean_rshortup ( :,np) & + + csite%qmean_rshortup ( :,cp) & + * area_fac + csite%qmean_rnet ( :,np) = csite%qmean_rnet ( :,np) & + + csite%qmean_rnet ( :,cp) & + * area_fac + csite%qmean_albedo ( :,np) = csite%qmean_albedo ( :,np) & + + csite%qmean_albedo ( :,cp) & + * area_fac + csite%qmean_albedo_beam ( :,np) = csite%qmean_albedo_beam ( :,np) & + + csite%qmean_albedo_beam ( :,cp) & + * area_fac + csite%qmean_albedo_diff ( :,np) = csite%qmean_albedo_diff ( :,np) & + + csite%qmean_albedo_diff ( :,cp) & + * area_fac + csite%qmean_rlong_albedo ( :,np) = csite%qmean_rlong_albedo ( :,np) & + + csite%qmean_rlong_albedo ( :,cp) & + * area_fac + csite%qmean_ustar ( :,np) = csite%qmean_ustar ( :,np) & + + csite%qmean_ustar ( :,cp) & + * area_fac + csite%qmean_tstar ( :,np) = csite%qmean_tstar ( :,np) & + + csite%qmean_tstar ( :,cp) & + * area_fac + csite%qmean_qstar ( :,np) = csite%qmean_qstar ( :,np) & + + csite%qmean_qstar ( :,cp) & + * area_fac + csite%qmean_cstar ( :,np) = csite%qmean_cstar ( :,np) & + + csite%qmean_cstar ( :,cp) & + * area_fac + csite%qmean_carbon_ac ( :,np) = csite%qmean_carbon_ac ( :,np) & + + csite%qmean_carbon_ac ( :,cp) & + * area_fac + csite%qmean_carbon_st ( :,np) = csite%qmean_carbon_st ( :,np) & + + csite%qmean_carbon_st ( :,cp) & + * area_fac + csite%qmean_vapor_gc ( :,np) = csite%qmean_vapor_gc ( :,np) & + + csite%qmean_vapor_gc ( :,cp) & + * area_fac + csite%qmean_vapor_ac ( :,np) = csite%qmean_vapor_ac ( :,np) & + + csite%qmean_vapor_ac ( :,cp) & + * area_fac + csite%qmean_smoist_gg (:,:,np) = csite%qmean_smoist_gg (:,:,np) & + + csite%qmean_smoist_gg (:,:,cp) & + * area_fac + csite%qmean_throughfall ( :,np) = csite%qmean_throughfall ( :,np) & + + csite%qmean_throughfall ( :,cp) & + * area_fac + csite%qmean_transloss (:,:,np) = csite%qmean_transloss (:,:,np) & + + csite%qmean_transloss (:,:,cp) & + * area_fac + csite%qmean_runoff ( :,np) = csite%qmean_runoff ( :,np) & + + csite%qmean_runoff ( :,cp) & + * area_fac + csite%qmean_drainage ( :,np) = csite%qmean_drainage ( :,np) & + + csite%qmean_drainage ( :,cp) & + * area_fac + csite%qmean_sensible_gc ( :,np) = csite%qmean_sensible_gc ( :,np) & + + csite%qmean_sensible_gc ( :,cp) & + * area_fac + csite%qmean_sensible_ac ( :,np) = csite%qmean_sensible_ac ( :,np) & + + csite%qmean_sensible_ac ( :,cp) & + * area_fac + csite%qmean_sensible_gg (:,:,np) = csite%qmean_sensible_gg (:,:,np) & + + csite%qmean_sensible_gg (:,:,cp) & + * area_fac + csite%qmean_qthroughfall ( :,np) = csite%qmean_qthroughfall ( :,np) & + + csite%qmean_qthroughfall ( :,cp) & + * area_fac + csite%qmean_qrunoff ( :,np) = csite%qmean_qrunoff ( :,np) & + + csite%qmean_qrunoff ( :,cp) & + * area_fac + csite%qmean_qdrainage ( :,np) = csite%qmean_qdrainage ( :,np) & + + csite%qmean_qdrainage ( :,cp) & + * area_fac + csite%qmsqu_rh ( :,np) = csite%qmsqu_rh ( :,np) & + + csite%qmsqu_rh ( :,cp) & + * area_fac + csite%qmsqu_cwd_rh ( :,np) = csite%qmsqu_cwd_rh ( :,np) & + + csite%qmsqu_cwd_rh ( :,cp) & + * area_fac + csite%qmsqu_nep ( :,np) = csite%qmsqu_nep ( :,np) & + + csite%qmsqu_nep ( :,cp) & + * area_fac + csite%qmsqu_rlongup ( :,np) = csite%qmsqu_rlongup ( :,np) & + + csite%qmsqu_rlongup ( :,cp) & + * area_fac + csite%qmsqu_parup ( :,np) = csite%qmsqu_parup ( :,np) & + + csite%qmsqu_parup ( :,cp) & + * area_fac + csite%qmsqu_nirup ( :,np) = csite%qmsqu_nirup ( :,np) & + + csite%qmsqu_nirup ( :,cp) & + * area_fac + csite%qmsqu_rshortup ( :,np) = csite%qmsqu_rshortup ( :,np) & + + csite%qmsqu_rshortup ( :,cp) & + * area_fac + csite%qmsqu_rnet ( :,np) = csite%qmsqu_rnet ( :,np) & + + csite%qmsqu_rnet ( :,cp) & + * area_fac + csite%qmsqu_albedo ( :,np) = csite%qmsqu_albedo ( :,np) & + + csite%qmsqu_albedo ( :,cp) & + * area_fac + csite%qmsqu_ustar ( :,np) = csite%qmsqu_ustar ( :,np) & + + csite%qmsqu_ustar ( :,cp) & + * area_fac + csite%qmsqu_carbon_ac ( :,np) = csite%qmsqu_carbon_ac ( :,np) & + + csite%qmsqu_carbon_ac ( :,cp) & + * area_fac + csite%qmsqu_carbon_st ( :,np) = csite%qmsqu_carbon_st ( :,np) & + + csite%qmsqu_carbon_st ( :,cp) & + * area_fac + csite%qmsqu_vapor_gc ( :,np) = csite%qmsqu_vapor_gc ( :,np) & + + csite%qmsqu_vapor_gc ( :,cp) & + * area_fac + csite%qmsqu_vapor_ac ( :,np) = csite%qmsqu_vapor_ac ( :,np) & + + csite%qmsqu_vapor_ac ( :,cp) & + * area_fac + csite%qmsqu_sensible_gc ( :,np) = csite%qmsqu_sensible_gc ( :,np) & + + csite%qmsqu_sensible_gc ( :,cp) & + * area_fac + csite%qmsqu_sensible_ac ( :,np) = csite%qmsqu_sensible_ac ( :,np) & + + csite%qmsqu_sensible_ac ( :,cp) & + * area_fac + end if + !------------------------------------------------------------------------------------! + + return end subroutine increment_patch_vars !=======================================================================================! diff --git a/ED/src/io/ed_init_full_history.F90 b/ED/src/io/ed_init_full_history.F90 index fd4738d93..ad44b9009 100644 --- a/ED/src/io/ed_init_full_history.F90 +++ b/ED/src/io/ed_init_full_history.F90 @@ -1647,31 +1647,31 @@ end subroutine hdf_getslab_i !---------------------------------------------------------------------------------------! ! 3-D variables, dimensions: (max_site;max_site+1;npolygons). ! !---------------------------------------------------------------------------------------! - dsetrank = 3 - globdims(1) = int(max_site,8) - chnkdims(1) = int(max_site,8) - memdims (1) = int(max_site,8) - memsize (1) = int(max_site,8) - chnkoffs(1) = 0_8 - memoffs (1) = 0_8 + ! dsetrank = 3 + ! globdims(1) = int(max_site,8) + ! chnkdims(1) = int(max_site,8) + ! memdims (1) = int(max_site,8) + ! memsize (1) = int(max_site,8) + ! chnkoffs(1) = 0_8 + ! memoffs (1) = 0_8 - globdims(2) = int(max_site+1,8) - chnkdims(2) = int(max_site+1,8) - memdims (2) = int(max_site+1,8) - memsize (2) = int(max_site+1,8) - chnkoffs(2) = 0_8 - memoffs (2) = 0_8 + ! globdims(2) = int(max_site+1,8) + ! chnkdims(2) = int(max_site+1,8) + ! memdims (2) = int(max_site+1,8) + ! memsize (2) = int(max_site+1,8) + ! chnkoffs(2) = 0_8 + ! memoffs (2) = 0_8 - globdims(3) = int(cgrid%npolygons_global,8) - chnkdims(3) = 1_8 - chnkoffs(3) = int(py_index - 1,8) - memdims (3) = 1_8 - memsize (3) = 1_8 - memoffs (3) = 0_8 + ! globdims(3) = int(cgrid%npolygons_global,8) + ! chnkdims(3) = 1_8 + ! chnkoffs(3) = int(py_index - 1,8) + ! memdims (3) = 1_8 + ! memsize (3) = 1_8 + ! memoffs (3) = 0_8 - call hdf_getslab_r(cgrid%site_adjacency(:,:,ipy) & - ,'SITE_ADJACENCY ',dsetrank,iparallel,.true.,foundvar) + ! call hdf_getslab_r(cgrid%site_adjacency(:,:,ipy) & + ! ,'SITE_ADJACENCY ',dsetrank,iparallel,.true.,foundvar) !---------------------------------------------------------------------------------------! !---------------------------------------------------------------------------------------! @@ -2366,7 +2366,7 @@ end subroutine hdf_getslab_i ,'DISTURBANCE_RATES_SI ',dsetrank,iparallel,.false.,foundvar) if (.not. foundvar) then call hdf_getslab_r(cpoly%disturbance_rates & - ,'DISTURBANCE_RATES_SI ',dsetrank,iparallel,.true.,foundvar) + ,'DISTURBANCE_RATES ',dsetrank,iparallel,.true.,foundvar) end if !---------------------------------------------------------------------------------------! !---------------------------------------------------------------------------------------! @@ -2734,11 +2734,11 @@ end subroutine hdf_getslab_i call hdf_getslab_r(csite%fsn_in & ,'FSN_IN ',dsetrank,iparallel,.true. ,foundvar) call hdf_getslab_r(csite%total_plant_nitrogen_uptake & - ,'TOTAL_PLANT_NITROGEN_UPTAKE ',dsetrank,iparallel,.true. ,foundvar) + ,'TOTAL_PLANT_NITROGEN_UPTAKE ',dsetrank,iparallel,.false.,foundvar) call hdf_getslab_r(csite%mineralized_N_loss & - ,'MINERALIZED_N_LOSS ',dsetrank,iparallel,.true. ,foundvar) + ,'MINERALIZED_N_LOSS ',dsetrank,iparallel,.false.,foundvar) call hdf_getslab_r(csite%mineralized_N_input & - ,'MINERALIZED_N_INPUT ',dsetrank,iparallel,.true. ,foundvar) + ,'MINERALIZED_N_INPUT ',dsetrank,iparallel,.false.,foundvar) call hdf_getslab_r(csite%rshort_g & ,'RSHORT_G ',dsetrank,iparallel,.true. ,foundvar) call hdf_getslab_r(csite%rshort_g_beam & @@ -3348,7 +3348,7 @@ end subroutine hdf_getslab_i memoffs (2) = 0_8 call hdf_getslab_r(csite%soil_energy & ,'SOIL_ENERGY_PA ',dsetrank,iparallel,.true. ,foundvar) - call hdf_getslab_r(csite%soil_energy & + call hdf_getslab_r(csite%soil_mstpot & ,'SOIL_MSTPOT_PA ',dsetrank,iparallel,.true. ,foundvar) call hdf_getslab_r(csite%soil_water & ,'SOIL_WATER_PA ',dsetrank,iparallel,.true. ,foundvar) @@ -3787,7 +3787,7 @@ end subroutine hdf_getslab_i call hdf_getslab_r(cpatch%bstorage & ,'BSTORAGE ',dsetrank,iparallel,.true. ,foundvar) call hdf_getslab_r(cpatch%bseeds & - ,'BSEEDS ',dsetrank,iparallel,.true. ,foundvar) + ,'BSEEDS_CO ',dsetrank,iparallel,.true. ,foundvar) call hdf_getslab_r(cpatch%lai & ,'LAI_CO ',dsetrank,iparallel,.true. ,foundvar) call hdf_getslab_r(cpatch%wai & diff --git a/ED/src/io/ed_load_namelist.f90 b/ED/src/io/ed_load_namelist.f90 index ab8479de1..c5c653c48 100644 --- a/ED/src/io/ed_load_namelist.f90 +++ b/ED/src/io/ed_load_namelist.f90 @@ -204,7 +204,10 @@ subroutine copy_nl(copy_type) , writing_dcyc & ! intent(out) , writing_year & ! intent(out) , writing_long & ! intent(out) - , writing_eorq ! ! intent(out) + , writing_eorq & ! intent(out) + , history_fast & ! intent(out) + , history_dail & ! intent(out) + , history_eorq ! ! intent(out) use grid_coms , only : time & ! intent(out) , centlon & ! intent(out) , centlat & ! intent(out) @@ -644,6 +647,11 @@ subroutine copy_nl(copy_type) writing_year = iyoutput > 0 writing_long = writing_dail .or. writing_mont .or. writing_dcyc writing_eorq = writing_mont .or. writing_dcyc + history_fast = ifoutput == 0 .and. & + ( ( unitstate == 0 .and. frqstate <= day_sec ) .or. & + ( unitstate == 1 .and. frqstate == 1. ) ) + history_dail = unitstate == 0 .and. frqstate < day_sec + history_eorq = unitstate <= 1 fast_diagnostics = ifoutput /= 0 .or. idoutput /= 0 .or. & imoutput /= 0 .or. iqoutput /= 0 .or. itoutput /= 0 !---------------------------------------------------------------------------------------! diff --git a/ED/src/memory/ed_misc_coms.f90 b/ED/src/memory/ed_misc_coms.f90 index b18e94ad2..21a771544 100644 --- a/ED/src/memory/ed_misc_coms.f90 +++ b/ED/src/memory/ed_misc_coms.f90 @@ -191,6 +191,9 @@ Module ed_misc_coms logical :: writing_year ! Writing yearly logical :: writing_eorq ! If either monthly or mean diel are written. logical :: writing_long ! If either daily, monthly, or mean diel are written. + logical :: history_fast ! Save sub-daily (fast) means to history + logical :: history_dail ! Save daily means to history + logical :: history_eorq ! Save monthly means and mean diel to history ! Namelist option to attach metadata to HDF5 output files 0=no, 1=yes diff --git a/ED/src/memory/ed_state_vars.f90 b/ED/src/memory/ed_state_vars.f90 index 6a612549c..4774b4901 100644 --- a/ED/src/memory/ed_state_vars.f90 +++ b/ED/src/memory/ed_state_vars.f90 @@ -27,6 +27,9 @@ module ed_state_vars use ed_misc_coms , only : writing_long & ! intent(in) , writing_eorq & ! intent(in) , writing_dcyc & ! intent(in) + , history_fast & ! intent(in) + , history_dail & ! intent(in) + , history_eorq & ! intent(in) , ndcycle ! ! intent(in) implicit none @@ -11478,103 +11481,103 @@ subroutine filltab_edtype_p11inst(cgrid,igr,init,var_len,var_len_global,max_ptrs if (associated(cgrid%Cleaf_grow)) then nvar=nvar+1 call vtable_edio_r(npts,cgrid%Cleaf_grow,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'CLEAF_GROW :11:dail') + var_len,var_len_global,max_ptrs,'CLEAF_GROW :11:hist:anal:dail') call metadata_edio(nvar,igr,'Poly Avg. Leaf Carbon Growth','?','ipoly') end if if (associated(cgrid%Croot_grow)) then nvar=nvar+1 call vtable_edio_r(npts,cgrid%Croot_grow,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'CROOT_GROW :11:dail') + var_len,var_len_global,max_ptrs,'CROOT_GROW :11:hist:anal:dail') call metadata_edio(nvar,igr,'Poly Avg. Fine Root Carbon Growth','?','ipoly') end if if (associated(cgrid%Cdead_grow)) then nvar=nvar+1 call vtable_edio_r(npts,cgrid%Cdead_grow,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'CDEAD_GROW :11:dail') + var_len,var_len_global,max_ptrs,'CDEAD_GROW :11:hist:anal:dail') call metadata_edio(nvar,igr,'Poly Avg. Wood Carbon Growth','?','ipoly') end if if (associated(cgrid%Cstore_grow)) then nvar=nvar+1 call vtable_edio_r(npts,cgrid%Cstore_Grow,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'CSTORE_GROW :11:dail') + var_len,var_len_global,max_ptrs,'CSTORE_GROW :11:hist:anal:dail') call metadata_edio(nvar,igr,'Poly Avg. Storage Carbon growth','?','ipoly') end if if (associated(cgrid%Cleaf_litter_flux)) then nvar=nvar+1 call vtable_edio_r(npts,cgrid%Cleaf_litter_flux,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'CLEAF_LITTER_FLUX :11:dail') + var_len,var_len_global,max_ptrs,'CLEAF_LITTER_FLUX :11:hist:anal:dail') call metadata_edio(nvar,igr,'Poly Avg. Leaf Litter Carbon Flux','?','ipoly') end if if (associated(cgrid%Croot_litter_flux)) then nvar=nvar+1 call vtable_edio_r(npts,cgrid%Croot_litter_flux,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'CROOT_LITTER_FLUX :11:dail') + var_len,var_len_global,max_ptrs,'CROOT_LITTER_FLUX :11:hist:anal:dail') call metadata_edio(nvar,igr,'Poly Avg. Fine Root Litter Carbon Flux','?','ipoly') end if if (associated(cgrid%Ccwd_flux)) then nvar=nvar+1 call vtable_edio_r(npts,cgrid%Ccwd_flux,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'CCWD_FLUX :11:dail') + var_len,var_len_global,max_ptrs,'CCWD_FLUX :11:hist:anal:dail') call metadata_edio(nvar,igr,'Poly Avg. Coarse Woody Debris Carbon FLUX','?','ipoly') end if if (associated(cgrid%Nleaf_grow)) then nvar=nvar+1 call vtable_edio_r(npts,cgrid%Nleaf_grow,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'NLEAF_GROW :11:dail') + var_len,var_len_global,max_ptrs,'NLEAF_GROW :11:hist:anal:dail') call metadata_edio(nvar,igr,'Poly Avg. Leaf Nitrogen growth','?','ipoly') end if if (associated(cgrid%Nroot_grow)) then nvar=nvar+1 call vtable_edio_r(npts,cgrid%Nroot_grow,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'NROOT_GROW :11:dail') + var_len,var_len_global,max_ptrs,'NROOT_GROW :11:hist:anal:dail') call metadata_edio(nvar,igr,'Poly Avg. Fine Root Nitrogen Growth','?','ipoly') end if if (associated(cgrid%Ndead_grow)) then nvar=nvar+1 call vtable_edio_r(npts,cgrid%Ndead_grow,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'NDEAD_GROW :11:dail') + var_len,var_len_global,max_ptrs,'NDEAD_GROW :11:hist:anal:dail') call metadata_edio(nvar,igr,'Poly Avg. Wood Nitrogen growth','?','ipoly') end if if (associated(cgrid%Nstore_grow)) then nvar=nvar+1 call vtable_edio_r(npts,cgrid%Nstore_grow,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'NSTORE_GROW :11:dail') + var_len,var_len_global,max_ptrs,'NSTORE_GROW :11:hist:anal:dail') call metadata_edio(nvar,igr,'Poly Avg. Storage Nitrogen Growth','?','ipoly') end if if (associated(cgrid%Nleaf_litter_flux)) then nvar=nvar+1 call vtable_edio_r(npts,cgrid%Nleaf_litter_flux,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'NLEAF_LITTER_FLUX :11:dail') + var_len,var_len_global,max_ptrs,'NLEAF_LITTER_FLUX :11:hist:anal:dail') call metadata_edio(nvar,igr,'Poly Avg. Leaf litter Nitrogen flux','?','ipoly') end if if (associated(cgrid%Nroot_litter_flux)) then nvar=nvar+1 call vtable_edio_r(npts,cgrid%Nroot_litter_flux,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'NROOT_LITTER_FLUX :11:dail') + var_len,var_len_global,max_ptrs,'NROOT_LITTER_FLUX :11:hist:anal:dail') call metadata_edio(nvar,igr,'Poly Avg. fine root litter Nitrogen flux','?','ipoly') end if if (associated(cgrid%Ncwd_flux)) then nvar=nvar+1 call vtable_edio_r(npts,cgrid%Ncwd_flux,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'NCWD_FLUX :11:dail') + var_len,var_len_global,max_ptrs,'NCWD_FLUX :11:hist:anal:dail') call metadata_edio(nvar,igr,'Poly Avg. CWD Nitrogen flux','?','ipoly') end if if (associated(cgrid%Nbiomass_uptake)) then nvar=nvar+1 call vtable_edio_r(npts,cgrid%Nbiomass_uptake,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'NBIOMASS_UPTAKE :11:dail') + var_len,var_len_global,max_ptrs,'NBIOMASS_UPTAKE :11:hist:anal:dail') call metadata_edio(nvar,igr,'Poly Avg. Nitrogen Uptake','?','ipoly') end if if (associated(cgrid%Ngross_min)) then nvar=nvar+1 call vtable_edio_r(npts,cgrid%Ngross_min,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'NGROSS_MIN :11:dail') + var_len,var_len_global,max_ptrs,'NGROSS_MIN :11:hist:anal:dail') call metadata_edio(nvar,igr,'Poly Avg. Gross Nitrogen mineralization','?','ipoly') end if if (associated(cgrid%Nnet_min)) then nvar=nvar+1 call vtable_edio_r(npts,cgrid%Nnet_min,nvar,igr,init,cgrid%pyglob_id, & - var_len,var_len_global,max_ptrs,'NNET_MIN :11:dail') + var_len,var_len_global,max_ptrs,'NNET_MIN :11:hist:anal:dail') call metadata_edio(nvar,igr,'Poly Avg. Net Nitrogen mineralization','?','ipoly') end if @@ -11616,7 +11619,7 @@ subroutine filltab_edtype_p11inst(cgrid,igr,init,var_len,var_len_global,max_ptrs nvar = nvar + 1 call vtable_edio_r(npts,cgrid%cwd_c & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'CWD_C :11:hist:anal:dail') + ,'CWD_C_PY :11:hist:anal:dail') call metadata_edio(nvar,igr,'Coarse woody debris' & ,'[kgC/m2]','(ipoly)') end if @@ -11640,7 +11643,7 @@ subroutine filltab_edtype_p11inst(cgrid,igr,init,var_len,var_len_global,max_ptrs nvar = nvar + 1 call vtable_edio_r(npts,cgrid%cwd_n & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'CWD_N :11:hist:anal:dail') + ,'CWD_N_PY :11:hist:anal:dail') call metadata_edio(nvar,igr,'Coarse woody debris nitrogen' & ,'[kgN/m2]','(ipoly)') end if @@ -11667,15 +11670,28 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr implicit none !----- Arguments. -------------------------------------------------------------------! - type(edtype), target :: cgrid - integer , intent(in) :: init - integer , intent(in) :: igr - integer , intent(in) :: var_len - integer , intent(in) :: max_ptrs - integer , intent(in) :: var_len_global - integer , intent(inout) :: nvar + type(edtype) , target :: cgrid + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar !----- Local variables. -------------------------------------------------------------! - integer :: npts + integer :: npts + character(len=str_len) :: fast_keys + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + ! Decide whether to write the sub-daily means to the history file. ! + !------------------------------------------------------------------------------------! + if (history_fast) then + fast_keys = 'hist:anal' + else + fast_keys = 'anal' + end if !------------------------------------------------------------------------------------! @@ -11693,7 +11709,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_gpp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_GPP_PY :11:hist:anal' ) + ,'FMEAN_GPP_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Gross primary productivity' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -11702,7 +11718,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_npp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_NPP_PY :11:hist:anal' ) + ,'FMEAN_NPP_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Net primary productivity' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -11711,7 +11727,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_leaf_resp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_LEAF_RESP_PY :11:hist:anal' ) + ,'FMEAN_LEAF_RESP_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Leaf respiration' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -11720,7 +11736,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_root_resp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ROOT_RESP_PY :11:hist:anal' ) + ,'FMEAN_ROOT_RESP_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Root respiration' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -11729,7 +11745,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_growth_resp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_GROWTH_RESP_PY :11:hist:anal' ) + ,'FMEAN_GROWTH_RESP_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Growth respiration' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -11738,7 +11754,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_storage_resp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_STORAGE_RESP_PY :11:hist:anal' ) + ,'FMEAN_STORAGE_RESP_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Storage respiration' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -11747,7 +11763,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_vleaf_resp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_VLEAF_RESP_PY :11:hist:anal' ) + ,'FMEAN_VLEAF_RESP_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Virtual leaf respiration' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -11756,7 +11772,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_plresp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_PLRESP_PY :11:hist:anal' ) + ,'FMEAN_PLRESP_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Plant respiration' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -11765,7 +11781,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_leaf_energy & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_LEAF_ENERGY_PY :11:hist:anal' ) + ,'FMEAN_LEAF_ENERGY_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Leaf internal energy' & ,'[ J/m2]','(ipoly)' ) @@ -11774,7 +11790,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_leaf_water & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_LEAF_WATER_PY :11:hist:anal' ) + ,'FMEAN_LEAF_WATER_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Leaf surface water' & ,'[ kg/m2]','(ipoly)' ) @@ -11783,7 +11799,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_leaf_hcap & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_LEAF_HCAP_PY :11:hist:anal' ) + ,'FMEAN_LEAF_HCAP_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Leaf heat capacity' & ,'[ J/m2/K]','(ipoly)' ) @@ -11792,7 +11808,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_leaf_vpdef & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_LEAF_VPDEF_PY :11:hist:anal' ) + ,'FMEAN_LEAF_VPDEF_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Leaf vapour pressure deficit' & ,'[ Pa]','(ipoly)' ) @@ -11801,7 +11817,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_leaf_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_LEAF_TEMP_PY :11:hist:anal' ) + ,'FMEAN_LEAF_TEMP_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Leaf temperature' & ,'[ K]','(ipoly)' ) @@ -11810,7 +11826,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_leaf_fliq & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_LEAF_FLIQ_PY :11:hist:anal' ) + ,'FMEAN_LEAF_FLIQ_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Liquid fraction' & ,'[ --]','(ipoly)' ) @@ -11819,7 +11835,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_leaf_gsw & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_LEAF_GSW_PY :11:hist:anal' ) + ,'FMEAN_LEAF_GSW_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Stomatal conductance' & ,'[kg/m2leaf/s]','(ipoly)' ) @@ -11828,7 +11844,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_leaf_gbw & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_LEAF_GBW_PY :11:hist:anal' ) + ,'FMEAN_LEAF_GBW_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Leaf boundary layer conductance' & ,'[kg/m2leaf/s]','(ipoly)' ) @@ -11837,7 +11853,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_wood_energy & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_WOOD_ENERGY_PY :11:hist:anal' ) + ,'FMEAN_WOOD_ENERGY_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Wood internal energy' & ,'[ J/m2]','(ipoly)' ) @@ -11846,7 +11862,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_wood_water & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_WOOD_WATER_PY :11:hist:anal' ) + ,'FMEAN_WOOD_WATER_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Wood surface water' & ,'[ kg/m2]','(ipoly)' ) @@ -11855,7 +11871,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_wood_hcap & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_WOOD_HCAP_PY :11:hist:anal' ) + ,'FMEAN_WOOD_HCAP_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Wood heat capacity' & ,'[ J/m2/K]','(ipoly)' ) @@ -11864,7 +11880,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_wood_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_WOOD_TEMP_PY :11:hist:anal' ) + ,'FMEAN_WOOD_TEMP_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Wood temperature' & ,'[ K]','(ipoly)' ) @@ -11873,7 +11889,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_wood_fliq & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_WOOD_FLIQ_PY :11:hist:anal' ) + ,'FMEAN_WOOD_FLIQ_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Liquid fraction' & ,'[ --]','(ipoly)' ) @@ -11882,7 +11898,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_wood_gbw & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_WOOD_GBW_PY :11:hist:anal' ) + ,'FMEAN_WOOD_GBW_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Wood boundary layer conductance' & ,'[kg/m2wood/s]','(ipoly)' ) @@ -11891,7 +11907,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_fs_open & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_FS_OPEN_PY :11:hist:anal' ) + ,'FMEAN_FS_OPEN_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Net stress factor' & ,'[ --]','(ipoly)' ) @@ -11900,7 +11916,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_fsw & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_FSW_PY :11:hist:anal' ) + ,'FMEAN_FSW_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Moisture stress' & ,'[ --]','(ipoly)' ) @@ -11909,7 +11925,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_fsn & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_FSN_PY :11:hist:anal' ) + ,'FMEAN_FSN_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Nitrogen stress' & ,'[ --]','(ipoly)' ) @@ -11918,7 +11934,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_psi_open & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_PSI_OPEN_PY :11:hist:anal' ) + ,'FMEAN_PSI_OPEN_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Transpiration with no stress' & ,'[ kg/m2/s]','(ipoly)' ) @@ -11927,7 +11943,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_psi_closed & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_PSI_CLOSED_PY :11:hist:anal' ) + ,'FMEAN_PSI_CLOSED_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Transpiration at maximum stress' & ,'[ kg/m2/s]','(ipoly)' ) @@ -11936,7 +11952,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_water_supply & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_WATER_SUPPLY_PY :11:hist:anal' ) + ,'FMEAN_WATER_SUPPLY_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Water supply' & ,'[ kg/m2/s]','(ipoly)' ) @@ -11945,7 +11961,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_par_l & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_PAR_L_PY :11:hist:anal' ) + ,'FMEAN_PAR_L_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - PAR absorbed by leaves' & ,'[ W/m2]','(ipoly)' ) @@ -11954,7 +11970,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_par_l_beam & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_PAR_L_BEAM_PY :11:hist:anal' ) + ,'FMEAN_PAR_L_BEAM_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Direct PAR absorbed by leaves' & ,'[ W/m2]','(ipoly)' ) @@ -11963,7 +11979,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_par_l_diff & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_PAR_L_DIFF_PY :11:hist:anal' ) + ,'FMEAN_PAR_L_DIFF_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Diffuse PAR absorbed by leaves' & ,'[ W/m2]','(ipoly)' ) @@ -11972,7 +11988,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_rshort_l & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_RSHORT_L_PY :11:hist:anal' ) + ,'FMEAN_RSHORT_L_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Shortwave radiation absorbed by leaves' & ,'[ W/m2]','(ipoly)' ) @@ -11981,7 +11997,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_rlong_l & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_RLONG_L_PY :11:hist:anal' ) + ,'FMEAN_RLONG_L_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Longwave radiation absorbed by leaves' & ,'[ W/m2]','(ipoly)' ) @@ -11990,7 +12006,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_sensible_lc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SENSIBLE_LC_PY :11:hist:anal' ) + ,'FMEAN_SENSIBLE_LC_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Sensible heat' & ,'[ W/m2]','(ipoly)' ) @@ -11999,7 +12015,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_vapor_lc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_VAPOR_LC_PY :11:hist:anal' ) + ,'FMEAN_VAPOR_LC_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Leaf evaporation' & ,'[ kg/m2/s]','(ipoly)' ) @@ -12008,7 +12024,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_transp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_TRANSP_PY :11:hist:anal' ) + ,'FMEAN_TRANSP_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Leaf transpiration' & ,'[ kg/m2/s]','(ipoly)' ) @@ -12017,7 +12033,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_intercepted_al & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_INTERCEPTED_AL_PY :11:hist:anal' ) + ,'FMEAN_INTERCEPTED_AL_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Leaf interception' & ,'[ kg/m2/s]','(ipoly)' ) @@ -12026,7 +12042,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_wshed_lg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_WSHED_LG_PY :11:hist:anal' ) + ,'FMEAN_WSHED_LG_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Leaf shedding' & ,'[ kg/m2/s]','(ipoly)' ) @@ -12035,7 +12051,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_rshort_w & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_RSHORT_W_PY :11:hist:anal' ) + ,'FMEAN_RSHORT_W_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Shortwave radiation absorbed by wood' & ,'[ W/m2]','(ipoly)' ) @@ -12044,7 +12060,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_rlong_w & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_RLONG_W_PY :11:hist:anal' ) + ,'FMEAN_RLONG_W_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Longwave radiation absorbed by wood' & ,'[ W/m2]','(ipoly)' ) @@ -12053,7 +12069,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_sensible_wc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SENSIBLE_WC_PY :11:hist:anal' ) + ,'FMEAN_SENSIBLE_WC_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Sensible heat' & ,'[ W/m2]','(ipoly)' ) @@ -12062,7 +12078,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_vapor_wc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_VAPOR_WC_PY :11:hist:anal' ) + ,'FMEAN_VAPOR_WC_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Wood evaporation' & ,'[ kg/m2/s]','(ipoly)' ) @@ -12071,7 +12087,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_intercepted_aw & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_INTERCEPTED_AW_PY :11:hist:anal' ) + ,'FMEAN_INTERCEPTED_AW_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Wood interception' & ,'[ kg/m2/s]','(ipoly)' ) @@ -12080,7 +12096,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_wshed_wg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_WSHED_WG_PY :11:hist:anal' ) + ,'FMEAN_WSHED_WG_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Wood shedding' & ,'[ kg/m2/s]','(ipoly)' ) @@ -12089,7 +12105,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_rh & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_RH_PY :11:hist:anal' ) + ,'FMEAN_RH_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Heterotrophic respiration' & ,'[ kg/m2/yr]','(ipoly)' ) @@ -12098,7 +12114,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_cwd_rh & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_CWD_RH_PY :11:hist:anal' ) + ,'FMEAN_CWD_RH_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Coarse woody debris respiration' & ,'[ kg/m2/yr]','(ipoly)' ) @@ -12107,7 +12123,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_nep & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_NEP_PY :11:hist:anal' ) + ,'FMEAN_NEP_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Net Ecosystem productivity' & ,'[ kg/m2/yr]','(ipoly)' ) @@ -12116,7 +12132,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_rk4step & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_RK4STEP_PY :11:hist:anal' ) + ,'FMEAN_RK4STEP_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - RK4 time step' & ,'[ s]','(ipoly)' ) @@ -12125,7 +12141,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_available_water & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_AVAILABLE_WATER_PY :11:hist:anal' ) + ,'FMEAN_AVAILABLE_WATER_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Available water' & ,'[ kg/m2]','(ipoly)' ) @@ -12134,7 +12150,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_can_theiv & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_CAN_THEIV_PY :11:hist:anal' ) + ,'FMEAN_CAN_THEIV_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Ice-vapour equiv. pot. temperature - CAS' & ,'[ K]','(ipoly)' ) @@ -12143,7 +12159,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_can_theta & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_CAN_THETA_PY :11:hist:anal' ) + ,'FMEAN_CAN_THETA_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Potential temperature - CAS' & ,'[ K]','(ipoly)' ) @@ -12152,7 +12168,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_can_vpdef & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_CAN_VPDEF_PY :11:hist:anal' ) + ,'FMEAN_CAN_VPDEF_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Vapour pressure deficit - CAS' & ,'[ Pa]','(ipoly)' ) @@ -12161,7 +12177,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_can_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_CAN_TEMP_PY :11:hist:anal' ) + ,'FMEAN_CAN_TEMP_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Temperature - CAS' & ,'[ K]','(ipoly)' ) @@ -12170,7 +12186,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_can_shv & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_CAN_SHV_PY :11:hist:anal' ) + ,'FMEAN_CAN_SHV_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Specific humidity - CAS' & ,'[ kg/kg]','(ipoly)' ) @@ -12179,7 +12195,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_can_co2 & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_CAN_CO2_PY :11:hist:anal' ) + ,'FMEAN_CAN_CO2_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - CO2 mixing ratio - CAS' & ,'[ umol/mol]','(ipoly)' ) @@ -12188,7 +12204,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_can_rhos & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_CAN_RHOS_PY :11:hist:anal' ) + ,'FMEAN_CAN_RHOS_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Air density - CAS' & ,'[ kg/m3]','(ipoly)' ) @@ -12197,7 +12213,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_can_prss & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_CAN_PRSS_PY :11:hist:anal' ) + ,'FMEAN_CAN_PRSS_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Pressure - CAS' & ,'[ Pa]','(ipoly)' ) @@ -12206,7 +12222,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_gnd_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_GND_TEMP_PY :11:hist:anal' ) + ,'FMEAN_GND_TEMP_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Ground temperature' & ,'[ K]','(ipoly)' ) @@ -12215,7 +12231,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_gnd_shv & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_GND_SHV_PY :11:hist:anal' ) + ,'FMEAN_GND_SHV_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Ground specific humidity' & ,'[ kg/kg]','(ipoly)' ) @@ -12224,7 +12240,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_can_ggnd & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_CAN_GGND_PY :11:hist:anal' ) + ,'FMEAN_CAN_GGND_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Net canopy conductance' & ,'[ m/2]','(ipoly)' ) @@ -12233,7 +12249,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_sfcw_depth & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SFCW_DEPTH_PY :11:hist:anal' ) + ,'FMEAN_SFCW_DEPTH_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Depth - temporary water layer' & ,'[ m]','(ipoly)' ) @@ -12242,7 +12258,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_sfcw_energy & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SFCW_ENERGY_PY :11:hist:anal' ) + ,'FMEAN_SFCW_ENERGY_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Internal energy - temporary water layer' & ,'[ J/kg]','(ipoly)' ) @@ -12251,7 +12267,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_sfcw_mass & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SFCW_MASS_PY :11:hist:anal' ) + ,'FMEAN_SFCW_MASS_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Water mass - temporary water layer' & ,'[ kg/m2]','(ipoly)' ) @@ -12260,7 +12276,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_sfcw_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SFCW_TEMP_PY :11:hist:anal' ) + ,'FMEAN_SFCW_TEMP_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Temperature - temporary water layer' & ,'[ K]','(ipoly)' ) @@ -12269,7 +12285,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_sfcw_fliq & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SFCW_FLIQ_PY :11:hist:anal' ) + ,'FMEAN_SFCW_FLIQ_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Liquid fraction - temporary water layer' & ,'[ --]','(ipoly)' ) @@ -12278,7 +12294,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_rshort_gnd & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_RSHORT_GND_PY :11:hist:anal' ) + ,'FMEAN_RSHORT_GND_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Shortwave radiation absorbed by ground' & ,'[ W/m2]','(ipoly)' ) @@ -12287,7 +12303,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_par_gnd & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_PAR_GND_PY :11:hist:anal' ) + ,'FMEAN_PAR_GND_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - PAR absorbed by ground' & ,'[ W/m2]','(ipoly)' ) @@ -12296,7 +12312,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_rlong_gnd & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_RLONG_GND_PY :11:hist:anal' ) + ,'FMEAN_RLONG_GND_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Longwave radiation absorbed by ground' & ,'[ W/m2]','(ipoly)' ) @@ -12305,7 +12321,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_rlongup & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_RLONGUP_PY :11:hist:anal' ) + ,'FMEAN_RLONGUP_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Outgoing longwave radiation' & ,'[ W/m2]','(ipoly)' ) @@ -12314,7 +12330,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_parup & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_PARUP_PY :11:hist:anal' ) + ,'FMEAN_PARUP_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Outgoing PAR' & ,'[ W/m2]','(ipoly)' ) @@ -12323,7 +12339,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_nirup & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_NIRUP_PY :11:hist:anal' ) + ,'FMEAN_NIRUP_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Outgoing near infra-red radiation' & ,'[ W/m2]','(ipoly)' ) @@ -12332,7 +12348,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_rshortup & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_RSHORTUP_PY :11:hist:anal' ) + ,'FMEAN_RSHORTUP_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Outgoing shortwave radiation' & ,'[ W/m2]','(ipoly)' ) @@ -12341,7 +12357,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_rnet & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_RNET_PY :11:hist:anal' ) + ,'FMEAN_RNET_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Net radiation at top of canopy' & ,'[ W/m2]','(ipoly)' ) @@ -12350,7 +12366,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_albedo & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ALBEDO_PY :11:hist:anal' ) + ,'FMEAN_ALBEDO_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Albedo' & ,'[ ----]','(ipoly)' ) @@ -12359,7 +12375,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_albedo_beam & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ALBEDO_BEAM_PY :11:hist:anal' ) + ,'FMEAN_ALBEDO_BEAM_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Albedo - direct radiation' & ,'[ ----]','(ipoly)' ) @@ -12368,7 +12384,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_albedo_diff & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ALBEDO_DIFF_PY :11:hist:anal' ) + ,'FMEAN_ALBEDO_DIFF_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Albedo - diffuse radiation' & ,'[ ----]','(ipoly)' ) @@ -12377,7 +12393,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_rlong_albedo & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_RLONG_ALBEDO_PY :11:hist:anal' ) + ,'FMEAN_RLONG_ALBEDO_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Kind of albedo - longwave radiation' & ,'[ ----]','(ipoly)' ) @@ -12386,7 +12402,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_ustar & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_USTAR_PY :11:hist:anal' ) + ,'FMEAN_USTAR_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Friction velocity' & ,'[ m/s]','(ipoly)' ) @@ -12395,7 +12411,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_tstar & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_TSTAR_PY :11:hist:anal' ) + ,'FMEAN_TSTAR_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Gradient scale for potential temperature' & ,'[ K]','(ipoly)' ) @@ -12404,7 +12420,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_qstar & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_QSTAR_PY :11:hist:anal' ) + ,'FMEAN_QSTAR_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Gradient scale for specific humidity' & ,'[ kg/kg]','(ipoly)' ) @@ -12413,7 +12429,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_cstar & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_CSTAR_PY :11:hist:anal' ) + ,'FMEAN_CSTAR_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Gradient scale for CO2 mixing ratio' & ,'[ umol/mol]','(ipoly)' ) @@ -12422,7 +12438,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_carbon_ac & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_CARBON_AC_PY :11:hist:anal' ) + ,'FMEAN_CARBON_AC_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - CO2 flux: atmosphere -> CAS' & ,'[ umol/m2/s]','(ipoly)' ) @@ -12431,7 +12447,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_carbon_st & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_CARBON_ST_PY :11:hist:anal' ) + ,'FMEAN_CARBON_ST_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - CO2 storage at CAS' & ,'[ umol/m2/s]','(ipoly)' ) @@ -12440,7 +12456,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_vapor_gc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_VAPOR_GC_PY :11:hist:anal' ) + ,'FMEAN_VAPOR_GC_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Water vapour flux: ground -> CAS' & ,'[ kg/m2/s]','(ipoly)' ) @@ -12449,7 +12465,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_vapor_ac & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_VAPOR_AC_PY :11:hist:anal' ) + ,'FMEAN_VAPOR_AC_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Water vapour flux: atmosphere -> CAS' & ,'[ kg/m2/s]','(ipoly)' ) @@ -12458,7 +12474,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_throughfall & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_THROUGHFALL_PY :11:hist:anal' ) + ,'FMEAN_THROUGHFALL_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Throughfall rate' & ,'[ kg/m2/s]','(ipoly)' ) @@ -12467,7 +12483,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_runoff & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_RUNOFF_PY :11:hist:anal' ) + ,'FMEAN_RUNOFF_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Water runoff' & ,'[ kg/m2/s]','(ipoly)' ) @@ -12476,7 +12492,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_drainage & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_DRAINAGE_PY :11:hist:anal' ) + ,'FMEAN_DRAINAGE_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Water drainage' & ,'[ kg/m2/s]','(ipoly)' ) @@ -12485,7 +12501,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_sensible_gc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SENSIBLE_GC_PY :11:hist:anal' ) + ,'FMEAN_SENSIBLE_GC_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Sensible heat flux: ground -> CAS' & ,'[ W/m2]','(ipoly)' ) @@ -12494,7 +12510,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_sensible_ac & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SENSIBLE_AC_PY :11:hist:anal' ) + ,'FMEAN_SENSIBLE_AC_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Sensible heat flux: atmosphere -> CAS' & ,'[ W/m2]','(ipoly)' ) @@ -12503,7 +12519,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_qthroughfall & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_QTHROUGHFALL_PY :11:hist:anal' ) + ,'FMEAN_QTHROUGHFALL_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Throughfall rate' & ,'[ W/m2]','(ipoly)' ) @@ -12512,7 +12528,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_qrunoff & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_QRUNOFF_PY :11:hist:anal' ) + ,'FMEAN_QRUNOFF_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Surface runoff' & ,'[ W/m2]','(ipoly)' ) @@ -12521,7 +12537,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_qdrainage & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_QDRAINAGE_PY :11:hist:anal' ) + ,'FMEAN_QDRAINAGE_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Drainage energy loss' & ,'[ W/m2]','(ipoly)' ) @@ -12530,7 +12546,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_atm_theiv & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_THEIV_PY :11:hist:anal' ) + ,'FMEAN_ATM_THEIV_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Ice-vapour equiv. pot. temp.: Atmosphere' & ,'[ K]','(ipoly)' ) @@ -12539,7 +12555,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_atm_theta & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_THETA_PY :11:hist:anal' ) + ,'FMEAN_ATM_THETA_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Potential temperature: Atmosphere' & ,'[ K]','(ipoly)' ) @@ -12548,7 +12564,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_atm_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_TEMP_PY :11:hist:anal' ) + ,'FMEAN_ATM_TEMP_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Temperature: Atmosphere' & ,'[ K]','(ipoly)' ) @@ -12557,7 +12573,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_atm_vpdef & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_VPDEF_PY :11:hist:anal' ) + ,'FMEAN_ATM_VPDEF_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Vapour pressure deficit: Atmosphere' & ,'[ Pa]','(ipoly)' ) @@ -12566,7 +12582,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_atm_shv & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_SHV_PY :11:hist:anal' ) + ,'FMEAN_ATM_SHV_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Specific humidity: Atmosphere' & ,'[ kg/kg]','(ipoly)' ) @@ -12575,7 +12591,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_atm_rshort & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_RSHORT_PY :11:hist:anal' ) + ,'FMEAN_ATM_RSHORT_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Shortwave radiation: Atmosphere' & ,'[ W/m2]','(ipoly)' ) @@ -12584,7 +12600,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_atm_rshort_diff & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_RSHORT_DIFF_PY :11:hist:anal' ) + ,'FMEAN_ATM_RSHORT_DIFF_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Diffuse SW radiation: Atmosphere' & ,'[ W/m2]','(ipoly)' ) @@ -12593,7 +12609,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_atm_par & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_PAR_PY :11:hist:anal' ) + ,'FMEAN_ATM_PAR_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - PAR: Atmosphere' & ,'[ W/m2]','(ipoly)' ) @@ -12602,7 +12618,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_atm_par_diff & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_PAR_DIFF_PY :11:hist:anal' ) + ,'FMEAN_ATM_PAR_DIFF_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Diffuse PAR: Atmosphere' & ,'[ W/m2]','(ipoly)' ) @@ -12611,7 +12627,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_atm_rlong & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_RLONG_PY :11:hist:anal' ) + ,'FMEAN_ATM_RLONG_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Longwave radiation: Atmosphere' & ,'[ W/m2]','(ipoly)' ) @@ -12620,7 +12636,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_atm_vels & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_VELS_PY :11:hist:anal' ) + ,'FMEAN_ATM_VELS_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Wind speed: atmosphere' & ,'[ m/s]','(ipoly)' ) @@ -12629,7 +12645,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_atm_rhos & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_RHOS_PY :11:hist:anal' ) + ,'FMEAN_ATM_RHOS_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Air density: Atmosphere' & ,'[ kg/m3]','(ipoly)' ) @@ -12638,7 +12654,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_atm_prss & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_PRSS_PY :11:hist:anal' ) + ,'FMEAN_ATM_PRSS_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Air pressure: Atmosphere' & ,'[ Pa]','(ipoly)' ) @@ -12647,7 +12663,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_atm_co2 & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_CO2_PY :11:hist:anal' ) + ,'FMEAN_ATM_CO2_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - CO2 mixing ratio: Atmosphere' & ,'[ umol/mol]','(ipoly)' ) @@ -12656,7 +12672,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_pcpg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_PCPG_PY :11:hist:anal' ) + ,'FMEAN_PCPG_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Precipitation rate' & ,'[ kg/m2/s]','(ipoly)' ) @@ -12665,7 +12681,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_qpcpg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_QPCPG_PY :11:hist:anal' ) + ,'FMEAN_QPCPG_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Energy gain - rain' & ,'[ W/m2]','(ipoly)' ) @@ -12674,7 +12690,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_dpcpg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_DPCPG_PY :11:hist:anal' ) + ,'FMEAN_DPCPG_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Precipitation depth' & ,'[ m]','(ipoly)' ) @@ -12683,7 +12699,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_soil_wetness & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SOIL_WETNESS_PY :11:hist:anal' ) + ,'FMEAN_SOIL_WETNESS_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Soil wetness index' & ,'[ --]','(ipoly)' ) @@ -12692,7 +12708,7 @@ subroutine filltab_edtype_p11fmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_skin_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SKIN_TEMP_PY :11:hist:anal' ) + ,'FMEAN_SKIN_TEMP_PY :11:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Skin temperature' & ,'[ K]','(ipoly)' ) @@ -12721,19 +12737,31 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr implicit none !----- Arguments. -------------------------------------------------------------------! - type(edtype), target :: cgrid - integer , intent(in) :: init - integer , intent(in) :: igr - integer , intent(in) :: var_len - integer , intent(in) :: max_ptrs - integer , intent(in) :: var_len_global - integer , intent(inout) :: nvar + type(edtype) , target :: cgrid + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar !----- Local variables. -------------------------------------------------------------! - integer :: npts + integer :: npts + character(len=str_len) :: dail_keys !------------------------------------------------------------------------------------! - + !------------------------------------------------------------------------------------! + ! Decide whether to save daily mean to history or not. ! + !------------------------------------------------------------------------------------! + if (history_dail) then + dail_keys = 'hist:dail' + else + dail_keys = 'dail' + end if + !------------------------------------------------------------------------------------! + + + !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! ! This is the 1-D block. All variables must have the number of points defined ! @@ -12746,7 +12774,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_nppleaf & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_NPPLEAF_PY :11:hist:dail' ) + ,'DMEAN_NPPLEAF_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Net primary productivity - Leaf' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -12755,7 +12783,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_nppfroot & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_NPPFROOT_PY :11:hist:dail' ) + ,'DMEAN_NPPFROOT_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Net primary productivity - Fine root' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -12764,7 +12792,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_nppsapwood & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_NPPSAPWOOD_PY :11:hist:dail' ) + ,'DMEAN_NPPSAPWOOD_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Net primary productivity - Sap wood' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -12773,7 +12801,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_nppcroot & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_NPPCROOT_PY :11:hist:dail' ) + ,'DMEAN_NPPCROOT_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Net primary productivity - Coarse root' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -12782,7 +12810,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_nppseeds & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_NPPSEEDS_PY :11:hist:dail' ) + ,'DMEAN_NPPSEEDS_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Net primary productivity - seeds' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -12791,7 +12819,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_nppwood & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_NPPWOOD_PY :11:hist:dail' ) + ,'DMEAN_NPPWOOD_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Net primary productivity - heart wood' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -12800,7 +12828,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_nppdaily & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_NPPDAILY_PY :11:hist:dail' ) + ,'DMEAN_NPPDAILY_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Net primary productivity - total' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -12809,7 +12837,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_A_decomp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_A_DECOMP_PY :11:hist:dail' ) + ,'DMEAN_A_DECOMP_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Decomposition scale' & ,'[ --]','(ipoly)' ) @@ -12818,7 +12846,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_Af_decomp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_AF_DECOMP_PY :11:hist:dail' ) + ,'DMEAN_AF_DECOMP_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Decomposition scale with N immobilisation' & ,'[ --]','(ipoly)' ) @@ -12827,7 +12855,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_co2_residual & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CO2_RESIDUAL_PY :11:hist:dail' ) + ,'DMEAN_CO2_RESIDUAL_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Budget check - CO2 residual' & ,'[ umol/m2]','(ipoly)' ) @@ -12836,7 +12864,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_energy_residual & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ENERGY_RESIDUAL_PY :11:hist:dail' ) + ,'DMEAN_ENERGY_RESIDUAL_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Budget check - Enthalpy residual' & ,'[ J/m2]','(ipoly)' ) @@ -12845,7 +12873,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_water_residual & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_WATER_RESIDUAL_PY :11:hist:dail' ) + ,'DMEAN_WATER_RESIDUAL_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Budget check - Water residual' & ,'[ kg/m2]','(ipoly)' ) @@ -12854,7 +12882,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_gpp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_GPP_PY :11:hist:dail' ) + ,'DMEAN_GPP_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Gross primary productivity' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -12863,7 +12891,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_npp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_NPP_PY :11:hist:dail' ) + ,'DMEAN_NPP_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Net primary productivity' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -12872,7 +12900,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_leaf_resp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_LEAF_RESP_PY :11:hist:dail' ) + ,'DMEAN_LEAF_RESP_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Leaf respiration' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -12881,7 +12909,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_root_resp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ROOT_RESP_PY :11:hist:dail' ) + ,'DMEAN_ROOT_RESP_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Root respiration' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -12890,7 +12918,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_growth_resp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_GROWTH_RESP_PY :11:hist:dail' ) + ,'DMEAN_GROWTH_RESP_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Growth respiration' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -12899,7 +12927,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_storage_resp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_STORAGE_RESP_PY :11:hist:dail' ) + ,'DMEAN_STORAGE_RESP_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Storage respiration' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -12908,7 +12936,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_vleaf_resp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_VLEAF_RESP_PY :11:hist:dail' ) + ,'DMEAN_VLEAF_RESP_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Virtual leaf respiration' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -12917,7 +12945,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_plresp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_PLRESP_PY :11:hist:dail' ) + ,'DMEAN_PLRESP_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Plant respiration' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -12926,7 +12954,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_leaf_energy & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_LEAF_ENERGY_PY :11:hist:dail' ) + ,'DMEAN_LEAF_ENERGY_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Leaf internal energy' & ,'[ J/m2]','(ipoly)' ) @@ -12935,7 +12963,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_leaf_water & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_LEAF_WATER_PY :11:hist:dail' ) + ,'DMEAN_LEAF_WATER_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Leaf surface water' & ,'[ kg/m2]','(ipoly)' ) @@ -12944,7 +12972,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_leaf_hcap & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_LEAF_HCAP_PY :11:hist:dail' ) + ,'DMEAN_LEAF_HCAP_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Leaf heat capacity' & ,'[ J/m2/K]','(ipoly)' ) @@ -12953,7 +12981,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_leaf_vpdef & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_LEAF_VPDEF_PY :11:hist:dail' ) + ,'DMEAN_LEAF_VPDEF_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Leaf vapour pressure deficit' & ,'[ Pa]','(ipoly)' ) @@ -12962,7 +12990,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_leaf_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_LEAF_TEMP_PY :11:hist:dail' ) + ,'DMEAN_LEAF_TEMP_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Leaf temperature' & ,'[ K]','(ipoly)' ) @@ -12971,7 +12999,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_leaf_fliq & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_LEAF_FLIQ_PY :11:hist:dail' ) + ,'DMEAN_LEAF_FLIQ_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Liquid fraction' & ,'[ --]','(ipoly)' ) @@ -12980,7 +13008,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_leaf_gsw & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_LEAF_GSW_PY :11:hist:dail' ) + ,'DMEAN_LEAF_GSW_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Stomatal conductance' & ,'[kg/m2leaf/s]','(ipoly)' ) @@ -12989,7 +13017,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_leaf_gbw & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_LEAF_GBW_PY :11:hist:dail' ) + ,'DMEAN_LEAF_GBW_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Leaf boundary layer conductance' & ,'[kg/m2leaf/s]','(ipoly)' ) @@ -12998,7 +13026,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_wood_energy & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_WOOD_ENERGY_PY :11:hist:dail' ) + ,'DMEAN_WOOD_ENERGY_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Wood internal energy' & ,'[ J/m2]','(ipoly)' ) @@ -13007,7 +13035,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_wood_water & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_WOOD_WATER_PY :11:hist:dail' ) + ,'DMEAN_WOOD_WATER_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Wood surface water' & ,'[ kg/m2]','(ipoly)' ) @@ -13016,7 +13044,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_wood_hcap & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_WOOD_HCAP_PY :11:hist:dail' ) + ,'DMEAN_WOOD_HCAP_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Wood heat capacity' & ,'[ J/m2/K]','(ipoly)' ) @@ -13025,7 +13053,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_wood_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_WOOD_TEMP_PY :11:hist:dail' ) + ,'DMEAN_WOOD_TEMP_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Wood temperature' & ,'[ K]','(ipoly)' ) @@ -13034,7 +13062,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_wood_fliq & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_WOOD_FLIQ_PY :11:hist:dail' ) + ,'DMEAN_WOOD_FLIQ_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Liquid fraction' & ,'[ --]','(ipoly)' ) @@ -13043,7 +13071,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_wood_gbw & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_WOOD_GBW_PY :11:hist:dail' ) + ,'DMEAN_WOOD_GBW_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Wood boundary layer conductance' & ,'[kg/m2wood/s]','(ipoly)' ) @@ -13052,7 +13080,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_fs_open & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_FS_OPEN_PY :11:hist:dail' ) + ,'DMEAN_FS_OPEN_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Net stress factor' & ,'[ --]','(ipoly)' ) @@ -13061,7 +13089,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_fsw & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_FSW_PY :11:hist:dail' ) + ,'DMEAN_FSW_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Moisture stress' & ,'[ --]','(ipoly)' ) @@ -13070,7 +13098,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_fsn & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_FSN_PY :11:hist:dail' ) + ,'DMEAN_FSN_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Nitrogen stress' & ,'[ --]','(ipoly)' ) @@ -13079,7 +13107,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_psi_open & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_PSI_OPEN_PY :11:hist:dail' ) + ,'DMEAN_PSI_OPEN_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Transpiration with no stress' & ,'[ kg/m2/s]','(ipoly)' ) @@ -13088,7 +13116,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_psi_closed & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_PSI_CLOSED_PY :11:hist:dail' ) + ,'DMEAN_PSI_CLOSED_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Transpiration at maximum stress' & ,'[ kg/m2/s]','(ipoly)' ) @@ -13097,7 +13125,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_water_supply & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_WATER_SUPPLY_PY :11:hist:dail' ) + ,'DMEAN_WATER_SUPPLY_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Water supply' & ,'[ kg/m2/s]','(ipoly)' ) @@ -13106,7 +13134,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_par_l & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_PAR_L_PY :11:hist:dail' ) + ,'DMEAN_PAR_L_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - PAR absorbed by leaves' & ,'[ W/m2]','(ipoly)' ) @@ -13115,7 +13143,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_par_l_beam & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_PAR_L_BEAM_PY :11:hist:dail' ) + ,'DMEAN_PAR_L_BEAM_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Direct PAR absorbed by leaves' & ,'[ W/m2]','(ipoly)' ) @@ -13124,7 +13152,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_par_l_diff & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_PAR_L_DIFF_PY :11:hist:dail' ) + ,'DMEAN_PAR_L_DIFF_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Diffuse PAR absorbed by leaves' & ,'[ W/m2]','(ipoly)' ) @@ -13133,7 +13161,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_rshort_l & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RSHORT_L_PY :11:hist:dail' ) + ,'DMEAN_RSHORT_L_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Shortwave radiation absorbed by leaves' & ,'[ W/m2]','(ipoly)' ) @@ -13142,7 +13170,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_rlong_l & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RLONG_L_PY :11:hist:dail' ) + ,'DMEAN_RLONG_L_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Longwave radiation absorbed by leaves' & ,'[ W/m2]','(ipoly)' ) @@ -13151,7 +13179,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_sensible_lc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SENSIBLE_LC_PY :11:hist:dail' ) + ,'DMEAN_SENSIBLE_LC_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Sensible heat' & ,'[ W/m2]','(ipoly)' ) @@ -13160,7 +13188,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_vapor_lc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_VAPOR_LC_PY :11:hist:dail' ) + ,'DMEAN_VAPOR_LC_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Leaf evaporation' & ,'[ kg/m2/s]','(ipoly)' ) @@ -13169,7 +13197,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_transp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_TRANSP_PY :11:hist:dail' ) + ,'DMEAN_TRANSP_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Leaf transpiration' & ,'[ kg/m2/s]','(ipoly)' ) @@ -13178,7 +13206,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_intercepted_al & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_INTERCEPTED_AL_PY :11:hist:dail' ) + ,'DMEAN_INTERCEPTED_AL_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Leaf interception' & ,'[ kg/m2/s]','(ipoly)' ) @@ -13187,7 +13215,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_wshed_lg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_WSHED_LG_PY :11:hist:dail' ) + ,'DMEAN_WSHED_LG_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Leaf shedding' & ,'[ kg/m2/s]','(ipoly)' ) @@ -13196,7 +13224,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_rshort_w & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RSHORT_W_PY :11:hist:dail' ) + ,'DMEAN_RSHORT_W_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Shortwave radiation absorbed by wood' & ,'[ W/m2]','(ipoly)' ) @@ -13205,7 +13233,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_rlong_w & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RLONG_W_PY :11:hist:dail' ) + ,'DMEAN_RLONG_W_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Longwave radiation absorbed by wood' & ,'[ W/m2]','(ipoly)' ) @@ -13214,7 +13242,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_sensible_wc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SENSIBLE_WC_PY :11:hist:dail' ) + ,'DMEAN_SENSIBLE_WC_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Sensible heat' & ,'[ W/m2]','(ipoly)' ) @@ -13223,7 +13251,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_vapor_wc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_VAPOR_WC_PY :11:hist:dail' ) + ,'DMEAN_VAPOR_WC_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Wood evaporation' & ,'[ kg/m2/s]','(ipoly)' ) @@ -13232,7 +13260,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_intercepted_aw & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_INTERCEPTED_AW_PY :11:hist:dail' ) + ,'DMEAN_INTERCEPTED_AW_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Wood interception' & ,'[ kg/m2/s]','(ipoly)' ) @@ -13241,7 +13269,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_wshed_wg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_WSHED_WG_PY :11:hist:dail' ) + ,'DMEAN_WSHED_WG_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Wood shedding' & ,'[ kg/m2/s]','(ipoly)' ) @@ -13250,7 +13278,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_rh & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RH_PY :11:hist:dail' ) + ,'DMEAN_RH_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Heterotrophic respiration' & ,'[ kg/m2/yr]','(ipoly)' ) @@ -13259,7 +13287,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_cwd_rh & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CWD_RH_PY :11:hist:dail' ) + ,'DMEAN_CWD_RH_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Coarse woody debris respiration' & ,'[ kg/m2/yr]','(ipoly)' ) @@ -13268,7 +13296,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_nep & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_NEP_PY :11:hist:dail' ) + ,'DMEAN_NEP_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Net Ecosystem productivity' & ,'[ kg/m2/yr]','(ipoly)' ) @@ -13277,7 +13305,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_rk4step & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RK4STEP_PY :11:hist:dail' ) + ,'DMEAN_RK4STEP_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - RK4 time step' & ,'[ s]','(ipoly)' ) @@ -13286,7 +13314,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_available_water & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_AVAILABLE_WATER_PY :11:hist:dail' ) + ,'DMEAN_AVAILABLE_WATER_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Available water' & ,'[ kg/m2]','(ipoly)' ) @@ -13295,7 +13323,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_can_theiv & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CAN_THEIV_PY :11:hist:dail' ) + ,'DMEAN_CAN_THEIV_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Ice-vapour equiv. pot. temperature - CAS' & ,'[ K]','(ipoly)' ) @@ -13304,7 +13332,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_can_theta & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CAN_THETA_PY :11:hist:dail' ) + ,'DMEAN_CAN_THETA_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Potential temperature - CAS' & ,'[ K]','(ipoly)' ) @@ -13313,7 +13341,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_can_vpdef & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CAN_VPDEF_PY :11:hist:dail' ) + ,'DMEAN_CAN_VPDEF_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Vapour pressure deficit - CAS' & ,'[ Pa]','(ipoly)' ) @@ -13322,7 +13350,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_can_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CAN_TEMP_PY :11:hist:dail' ) + ,'DMEAN_CAN_TEMP_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Temperature - CAS' & ,'[ K]','(ipoly)' ) @@ -13331,7 +13359,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_can_shv & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CAN_SHV_PY :11:hist:dail' ) + ,'DMEAN_CAN_SHV_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Specific humidity - CAS' & ,'[ kg/kg]','(ipoly)' ) @@ -13340,7 +13368,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_can_co2 & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CAN_CO2_PY :11:hist:dail' ) + ,'DMEAN_CAN_CO2_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - CO2 mixing ratio - CAS' & ,'[ umol/mol]','(ipoly)' ) @@ -13349,7 +13377,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_can_rhos & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CAN_RHOS_PY :11:hist:dail' ) + ,'DMEAN_CAN_RHOS_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Air density - CAS' & ,'[ kg/m3]','(ipoly)' ) @@ -13358,7 +13386,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_can_prss & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CAN_PRSS_PY :11:hist:dail' ) + ,'DMEAN_CAN_PRSS_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Pressure - CAS' & ,'[ Pa]','(ipoly)' ) @@ -13367,7 +13395,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_gnd_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_GND_TEMP_PY :11:hist:dail' ) + ,'DMEAN_GND_TEMP_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Ground temperature' & ,'[ K]','(ipoly)' ) @@ -13376,7 +13404,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_gnd_shv & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_GND_SHV_PY :11:hist:dail' ) + ,'DMEAN_GND_SHV_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Ground specific humidity' & ,'[ kg/kg]','(ipoly)' ) @@ -13385,7 +13413,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_can_ggnd & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CAN_GGND_PY :11:hist:dail' ) + ,'DMEAN_CAN_GGND_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Net canopy conductance' & ,'[ m/2]','(ipoly)' ) @@ -13394,7 +13422,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_sfcw_depth & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SFCW_DEPTH_PY :11:hist:dail' ) + ,'DMEAN_SFCW_DEPTH_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Depth - temporary water layer' & ,'[ m]','(ipoly)' ) @@ -13403,7 +13431,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_sfcw_energy & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SFCW_ENERGY_PY :11:hist:dail' ) + ,'DMEAN_SFCW_ENERGY_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Internal energy - temporary water layer' & ,'[ J/kg]','(ipoly)' ) @@ -13412,7 +13440,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_sfcw_mass & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SFCW_MASS_PY :11:hist:dail' ) + ,'DMEAN_SFCW_MASS_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Water mass - temporary water layer' & ,'[ kg/m2]','(ipoly)' ) @@ -13421,7 +13449,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_sfcw_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SFCW_TEMP_PY :11:hist:dail' ) + ,'DMEAN_SFCW_TEMP_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Temperature - temporary water layer' & ,'[ K]','(ipoly)' ) @@ -13430,7 +13458,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_sfcw_fliq & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SFCW_FLIQ_PY :11:hist:dail' ) + ,'DMEAN_SFCW_FLIQ_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Liquid fraction - temporary water layer' & ,'[ --]','(ipoly)' ) @@ -13439,7 +13467,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_rshort_gnd & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RSHORT_GND_PY :11:hist:dail' ) + ,'DMEAN_RSHORT_GND_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Shortwave radiation absorbed by ground' & ,'[ W/m2]','(ipoly)' ) @@ -13448,7 +13476,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_par_gnd & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_PAR_GND_PY :11:hist:dail' ) + ,'DMEAN_PAR_GND_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - PAR absorbed by ground' & ,'[ W/m2]','(ipoly)' ) @@ -13457,7 +13485,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_rlong_gnd & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RLONG_GND_PY :11:hist:dail' ) + ,'DMEAN_RLONG_GND_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Longwave radiation absorbed by ground' & ,'[ W/m2]','(ipoly)' ) @@ -13466,7 +13494,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_rlongup & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RLONGUP_PY :11:hist:dail' ) + ,'DMEAN_RLONGUP_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Outgoing longwave radiation' & ,'[ W/m2]','(ipoly)' ) @@ -13475,7 +13503,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_parup & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_PARUP_PY :11:hist:dail' ) + ,'DMEAN_PARUP_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Outgoing PAR' & ,'[ W/m2]','(ipoly)' ) @@ -13484,7 +13512,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_nirup & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_NIRUP_PY :11:hist:dail' ) + ,'DMEAN_NIRUP_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Outgoing near infra-red radiation' & ,'[ W/m2]','(ipoly)' ) @@ -13493,7 +13521,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_rshortup & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RSHORTUP_PY :11:hist:dail' ) + ,'DMEAN_RSHORTUP_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Outgoing shortwave radiation' & ,'[ W/m2]','(ipoly)' ) @@ -13502,7 +13530,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_rnet & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RNET_PY :11:hist:dail' ) + ,'DMEAN_RNET_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Net radiation at top of canopy' & ,'[ W/m2]','(ipoly)' ) @@ -13511,7 +13539,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_albedo & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ALBEDO_PY :11:hist:dail' ) + ,'DMEAN_ALBEDO_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Albedo' & ,'[ ----]','(ipoly)' ) @@ -13520,7 +13548,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_albedo_beam & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ALBEDO_BEAM_PY :11:hist:dail' ) + ,'DMEAN_ALBEDO_BEAM_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Albedo - direct radiation' & ,'[ ----]','(ipoly)' ) @@ -13529,7 +13557,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_albedo_diff & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ALBEDO_DIFF_PY :11:hist:dail' ) + ,'DMEAN_ALBEDO_DIFF_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Albedo - diffuse radiation' & ,'[ ----]','(ipoly)' ) @@ -13538,7 +13566,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_rlong_albedo & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RLONG_ALBEDO_PY :11:hist:dail' ) + ,'DMEAN_RLONG_ALBEDO_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Kind of albedo - longwave radiation' & ,'[ ----]','(ipoly)' ) @@ -13547,7 +13575,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_ustar & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_USTAR_PY :11:hist:dail' ) + ,'DMEAN_USTAR_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Friction velocity' & ,'[ m/s]','(ipoly)' ) @@ -13556,7 +13584,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_tstar & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_TSTAR_PY :11:hist:dail' ) + ,'DMEAN_TSTAR_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Gradient scale for potential temperature' & ,'[ K]','(ipoly)' ) @@ -13565,7 +13593,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_qstar & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_QSTAR_PY :11:hist:dail' ) + ,'DMEAN_QSTAR_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Gradient scale for specific humidity' & ,'[ kg/kg]','(ipoly)' ) @@ -13574,7 +13602,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_cstar & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CSTAR_PY :11:hist:dail' ) + ,'DMEAN_CSTAR_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Gradient scale for CO2 mixing ratio' & ,'[ umol/mol]','(ipoly)' ) @@ -13583,7 +13611,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_carbon_ac & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CARBON_AC_PY :11:hist:dail' ) + ,'DMEAN_CARBON_AC_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - CO2 flux: atmosphere -> CAS' & ,'[ umol/m2/s]','(ipoly)' ) @@ -13592,7 +13620,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_carbon_st & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CARBON_ST_PY :11:hist:dail' ) + ,'DMEAN_CARBON_ST_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - CO2 storage at CAS' & ,'[ umol/m2/s]','(ipoly)' ) @@ -13601,7 +13629,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_vapor_gc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_VAPOR_GC_PY :11:hist:dail' ) + ,'DMEAN_VAPOR_GC_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Water vapour flux: ground -> CAS' & ,'[ kg/m2/s]','(ipoly)' ) @@ -13610,7 +13638,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_vapor_ac & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_VAPOR_AC_PY :11:hist:dail' ) + ,'DMEAN_VAPOR_AC_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Water vapour flux: atmosphere -> CAS' & ,'[ kg/m2/s]','(ipoly)' ) @@ -13619,7 +13647,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_throughfall & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_THROUGHFALL_PY :11:hist:dail' ) + ,'DMEAN_THROUGHFALL_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Throughfall rate' & ,'[ kg/m2/s]','(ipoly)' ) @@ -13628,7 +13656,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_runoff & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RUNOFF_PY :11:hist:dail' ) + ,'DMEAN_RUNOFF_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Water runoff' & ,'[ kg/m2/s]','(ipoly)' ) @@ -13637,7 +13665,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_drainage & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_DRAINAGE_PY :11:hist:dail' ) + ,'DMEAN_DRAINAGE_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Water drainage' & ,'[ kg/m2/s]','(ipoly)' ) @@ -13646,7 +13674,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_sensible_gc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SENSIBLE_GC_PY :11:hist:dail' ) + ,'DMEAN_SENSIBLE_GC_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Sensible heat flux: ground -> CAS' & ,'[ W/m2]','(ipoly)' ) @@ -13655,7 +13683,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_sensible_ac & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SENSIBLE_AC_PY :11:hist:dail' ) + ,'DMEAN_SENSIBLE_AC_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Sensible heat flux: atmosphere -> CAS' & ,'[ W/m2]','(ipoly)' ) @@ -13664,7 +13692,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_qthroughfall & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_QTHROUGHFALL_PY :11:hist:dail' ) + ,'DMEAN_QTHROUGHFALL_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Throughfall rate' & ,'[ W/m2]','(ipoly)' ) @@ -13673,7 +13701,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_qrunoff & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_QRUNOFF_PY :11:hist:dail' ) + ,'DMEAN_QRUNOFF_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Surface runoff' & ,'[ W/m2]','(ipoly)' ) @@ -13682,7 +13710,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_qdrainage & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_QDRAINAGE_PY :11:hist:dail' ) + ,'DMEAN_QDRAINAGE_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Drainage energy loss' & ,'[ W/m2]','(ipoly)' ) @@ -13691,7 +13719,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_atm_theiv & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_THEIV_PY :11:hist:dail' ) + ,'DMEAN_ATM_THEIV_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Ice-vapour equiv. pot. temp.: Atmosphere' & ,'[ K]','(ipoly)' ) @@ -13700,7 +13728,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_atm_theta & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_THETA_PY :11:hist:dail' ) + ,'DMEAN_ATM_THETA_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Potential temperature: Atmosphere' & ,'[ K]','(ipoly)' ) @@ -13709,7 +13737,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_atm_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_TEMP_PY :11:hist:dail' ) + ,'DMEAN_ATM_TEMP_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Temperature: Atmosphere' & ,'[ K]','(ipoly)' ) @@ -13718,7 +13746,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_atm_vpdef & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_VPDEF_PY :11:hist:dail' ) + ,'DMEAN_ATM_VPDEF_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Vapour pressure deficit: Atmosphere' & ,'[ Pa]','(ipoly)' ) @@ -13727,7 +13755,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_atm_shv & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_SHV_PY :11:hist:dail' ) + ,'DMEAN_ATM_SHV_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Specific humidity: Atmosphere' & ,'[ kg/kg]','(ipoly)' ) @@ -13736,7 +13764,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_atm_rshort & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_RSHORT_PY :11:hist:dail' ) + ,'DMEAN_ATM_RSHORT_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Shortwave radiation: Atmosphere' & ,'[ W/m2]','(ipoly)' ) @@ -13745,7 +13773,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_atm_rshort_diff & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_RSHORT_DIFF_PY :11:hist:dail' ) + ,'DMEAN_ATM_RSHORT_DIFF_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Diffuse SW radiation: Atmosphere' & ,'[ W/m2]','(ipoly)' ) @@ -13754,7 +13782,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_atm_par & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_PAR_PY :11:hist:dail' ) + ,'DMEAN_ATM_PAR_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - PAR: Atmosphere' & ,'[ W/m2]','(ipoly)' ) @@ -13763,7 +13791,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_atm_par_diff & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_PAR_DIFF_PY :11:hist:dail' ) + ,'DMEAN_ATM_PAR_DIFF_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Diffuse PAR: Atmosphere' & ,'[ W/m2]','(ipoly)' ) @@ -13772,7 +13800,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_atm_rlong & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_RLONG_PY :11:hist:dail' ) + ,'DMEAN_ATM_RLONG_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Longwave radiation: Atmosphere' & ,'[ W/m2]','(ipoly)' ) @@ -13781,7 +13809,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_atm_vels & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_VELS_PY :11:hist:dail' ) + ,'DMEAN_ATM_VELS_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Wind speed: atmosphere' & ,'[ m/s]','(ipoly)' ) @@ -13790,7 +13818,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_atm_rhos & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_RHOS_PY :11:hist:dail' ) + ,'DMEAN_ATM_RHOS_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Air density: Atmosphere' & ,'[ kg/m3]','(ipoly)' ) @@ -13799,7 +13827,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_atm_prss & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_PRSS_PY :11:hist:dail' ) + ,'DMEAN_ATM_PRSS_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Air pressure: Atmosphere' & ,'[ Pa]','(ipoly)' ) @@ -13808,7 +13836,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_atm_co2 & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_CO2_PY :11:hist:dail' ) + ,'DMEAN_ATM_CO2_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - CO2 mixing ratio: Atmosphere' & ,'[ umol/mol]','(ipoly)' ) @@ -13817,7 +13845,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_pcpg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_PCPG_PY :11:hist:dail' ) + ,'DMEAN_PCPG_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Precipitation rate' & ,'[ kg/m2/s]','(ipoly)' ) @@ -13826,7 +13854,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_qpcpg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_QPCPG_PY :11:hist:dail' ) + ,'DMEAN_QPCPG_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Energy gain - rain' & ,'[ W/m2]','(ipoly)' ) @@ -13835,7 +13863,7 @@ subroutine filltab_edtype_p11dmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_dpcpg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_DPCPG_PY :11:hist:dail' ) + ,'DMEAN_DPCPG_PY :11:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Precipitation depth' & ,'[ m]','(ipoly)' ) @@ -13864,19 +13892,32 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr implicit none !----- Arguments. -------------------------------------------------------------------! - type(edtype), target :: cgrid - integer , intent(in) :: init - integer , intent(in) :: igr - integer , intent(in) :: var_len - integer , intent(in) :: max_ptrs - integer , intent(in) :: var_len_global - integer , intent(inout) :: nvar + type(edtype) , target :: cgrid + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar !----- Local variables. -------------------------------------------------------------! - integer :: npts + integer :: npts + character(len=str_len) :: eorq_keys !------------------------------------------------------------------------------------! - + + !------------------------------------------------------------------------------------! + ! Check whether we need to save monthly means to history or not. ! + !------------------------------------------------------------------------------------! + if (history_eorq) then + eorq_keys = 'hist:mont:dcyc' + else + eorq_keys = 'mont:dcyc' + end if + !------------------------------------------------------------------------------------! + + + !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! ! This is the 1-D block. All variables must have the number of points defined ! @@ -13888,7 +13929,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_gpp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_GPP_PY :11:hist:mont:dcyc') + ,'MMEAN_GPP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Gross primary productivity' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -13897,7 +13938,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_npp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_NPP_PY :11:hist:mont:dcyc') + ,'MMEAN_NPP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Net primary productivity' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -13906,7 +13947,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_leaf_resp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_LEAF_RESP_PY :11:hist:mont:dcyc') + ,'MMEAN_LEAF_RESP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Leaf respiration' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -13915,7 +13956,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_root_resp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ROOT_RESP_PY :11:hist:mont:dcyc') + ,'MMEAN_ROOT_RESP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Root respiration' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -13924,7 +13965,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_growth_resp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_GROWTH_RESP_PY :11:hist:mont:dcyc') + ,'MMEAN_GROWTH_RESP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Growth respiration' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -13933,7 +13974,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_storage_resp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_STORAGE_RESP_PY :11:hist:mont:dcyc') + ,'MMEAN_STORAGE_RESP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Storage respiration' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -13942,7 +13983,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_vleaf_resp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_VLEAF_RESP_PY :11:hist:mont:dcyc') + ,'MMEAN_VLEAF_RESP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Virtual leaf respiration' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -13951,7 +13992,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_plresp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_PLRESP_PY :11:hist:mont:dcyc') + ,'MMEAN_PLRESP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Plant respiration' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -13960,7 +14001,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_leaf_energy & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_LEAF_ENERGY_PY :11:hist:mont:dcyc') + ,'MMEAN_LEAF_ENERGY_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Leaf internal energy' & ,'[ J/m2]','(ipoly)' ) @@ -13969,7 +14010,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_leaf_water & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_LEAF_WATER_PY :11:hist:mont:dcyc') + ,'MMEAN_LEAF_WATER_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Leaf surface water' & ,'[ kg/m2]','(ipoly)' ) @@ -13978,7 +14019,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_leaf_hcap & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_LEAF_HCAP_PY :11:hist:mont:dcyc') + ,'MMEAN_LEAF_HCAP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Leaf heat capacity' & ,'[ J/m2/K]','(ipoly)' ) @@ -13987,7 +14028,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_leaf_vpdef & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_LEAF_VPDEF_PY :11:hist:mont:dcyc') + ,'MMEAN_LEAF_VPDEF_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Leaf vapour pressure deficit' & ,'[ Pa]','(ipoly)' ) @@ -13996,7 +14037,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_leaf_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_LEAF_TEMP_PY :11:hist:mont:dcyc') + ,'MMEAN_LEAF_TEMP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Leaf temperature' & ,'[ K]','(ipoly)' ) @@ -14005,7 +14046,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_leaf_fliq & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_LEAF_FLIQ_PY :11:hist:mont:dcyc') + ,'MMEAN_LEAF_FLIQ_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Liquid fraction' & ,'[ --]','(ipoly)' ) @@ -14014,7 +14055,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_leaf_gsw & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_LEAF_GSW_PY :11:hist:mont:dcyc') + ,'MMEAN_LEAF_GSW_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Stomatal conductance' & ,'[kg/m2leaf/s]','(ipoly)' ) @@ -14023,7 +14064,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_leaf_gbw & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_LEAF_GBW_PY :11:hist:mont:dcyc') + ,'MMEAN_LEAF_GBW_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Leaf boundary layer conductance' & ,'[kg/m2leaf/s]','(ipoly)' ) @@ -14032,7 +14073,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_wood_energy & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_WOOD_ENERGY_PY :11:hist:mont:dcyc') + ,'MMEAN_WOOD_ENERGY_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Wood internal energy' & ,'[ J/m2]','(ipoly)' ) @@ -14041,7 +14082,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_wood_water & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_WOOD_WATER_PY :11:hist:mont:dcyc') + ,'MMEAN_WOOD_WATER_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Wood surface water' & ,'[ kg/m2]','(ipoly)' ) @@ -14050,7 +14091,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_wood_hcap & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_WOOD_HCAP_PY :11:hist:mont:dcyc') + ,'MMEAN_WOOD_HCAP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Wood heat capacity' & ,'[ J/m2/K]','(ipoly)' ) @@ -14059,7 +14100,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_wood_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_WOOD_TEMP_PY :11:hist:mont:dcyc') + ,'MMEAN_WOOD_TEMP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Wood temperature' & ,'[ K]','(ipoly)' ) @@ -14068,7 +14109,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_wood_fliq & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_WOOD_FLIQ_PY :11:hist:mont:dcyc') + ,'MMEAN_WOOD_FLIQ_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Liquid fraction' & ,'[ --]','(ipoly)' ) @@ -14077,7 +14118,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_wood_gbw & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_WOOD_GBW_PY :11:hist:mont:dcyc') + ,'MMEAN_WOOD_GBW_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Wood boundary layer conductance' & ,'[kg/m2wood/s]','(ipoly)' ) @@ -14086,7 +14127,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_fs_open & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_FS_OPEN_PY :11:hist:mont:dcyc') + ,'MMEAN_FS_OPEN_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Net stress factor' & ,'[ --]','(ipoly)' ) @@ -14095,7 +14136,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_fsw & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_FSW_PY :11:hist:mont:dcyc') + ,'MMEAN_FSW_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Moisture stress' & ,'[ --]','(ipoly)' ) @@ -14104,7 +14145,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_fsn & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_FSN_PY :11:hist:mont:dcyc') + ,'MMEAN_FSN_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Nitrogen stress' & ,'[ --]','(ipoly)' ) @@ -14113,7 +14154,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_psi_open & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_PSI_OPEN_PY :11:hist:mont:dcyc') + ,'MMEAN_PSI_OPEN_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Transpiration with no stress' & ,'[ kg/m2/s]','(ipoly)' ) @@ -14122,7 +14163,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_psi_closed & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_PSI_CLOSED_PY :11:hist:mont:dcyc') + ,'MMEAN_PSI_CLOSED_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Transpiration at maximum stress' & ,'[ kg/m2/s]','(ipoly)' ) @@ -14131,7 +14172,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_water_supply & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_WATER_SUPPLY_PY :11:hist:mont:dcyc') + ,'MMEAN_WATER_SUPPLY_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Water supply' & ,'[ kg/m2/s]','(ipoly)' ) @@ -14140,7 +14181,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_par_l & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_PAR_L_PY :11:hist:mont:dcyc') + ,'MMEAN_PAR_L_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - PAR absorbed by leaves' & ,'[ W/m2]','(ipoly)' ) @@ -14149,7 +14190,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_par_l_beam & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_PAR_L_BEAM_PY :11:hist:mont:dcyc') + ,'MMEAN_PAR_L_BEAM_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Direct PAR absorbed by leaves' & ,'[ W/m2]','(ipoly)' ) @@ -14158,7 +14199,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_par_l_diff & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_PAR_L_DIFF_PY :11:hist:mont:dcyc') + ,'MMEAN_PAR_L_DIFF_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Diffuse PAR absorbed by leaves' & ,'[ W/m2]','(ipoly)' ) @@ -14167,7 +14208,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_rshort_l & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RSHORT_L_PY :11:hist:mont:dcyc') + ,'MMEAN_RSHORT_L_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Shortwave radiation absorbed by leaves' & ,'[ W/m2]','(ipoly)' ) @@ -14176,7 +14217,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_rlong_l & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RLONG_L_PY :11:hist:mont:dcyc') + ,'MMEAN_RLONG_L_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Longwave radiation absorbed by leaves' & ,'[ W/m2]','(ipoly)' ) @@ -14185,7 +14226,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_sensible_lc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SENSIBLE_LC_PY :11:hist:mont:dcyc') + ,'MMEAN_SENSIBLE_LC_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Sensible heat' & ,'[ W/m2]','(ipoly)' ) @@ -14194,7 +14235,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_vapor_lc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_VAPOR_LC_PY :11:hist:mont:dcyc') + ,'MMEAN_VAPOR_LC_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Leaf evaporation' & ,'[ kg/m2/s]','(ipoly)' ) @@ -14203,7 +14244,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_transp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_TRANSP_PY :11:hist:mont:dcyc') + ,'MMEAN_TRANSP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Leaf transpiration' & ,'[ kg/m2/s]','(ipoly)' ) @@ -14212,7 +14253,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_intercepted_al & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_INTERCEPTED_AL_PY :11:hist:mont:dcyc') + ,'MMEAN_INTERCEPTED_AL_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Leaf interception' & ,'[ kg/m2/s]','(ipoly)' ) @@ -14221,7 +14262,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_wshed_lg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_WSHED_LG_PY :11:hist:mont:dcyc') + ,'MMEAN_WSHED_LG_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Leaf shedding' & ,'[ kg/m2/s]','(ipoly)' ) @@ -14230,7 +14271,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_rshort_w & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RSHORT_W_PY :11:hist:mont:dcyc') + ,'MMEAN_RSHORT_W_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Shortwave radiation absorbed by wood' & ,'[ W/m2]','(ipoly)' ) @@ -14239,7 +14280,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_rlong_w & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RLONG_W_PY :11:hist:mont:dcyc') + ,'MMEAN_RLONG_W_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Longwave radiation absorbed by wood' & ,'[ W/m2]','(ipoly)' ) @@ -14248,7 +14289,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_sensible_wc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SENSIBLE_WC_PY :11:hist:mont:dcyc') + ,'MMEAN_SENSIBLE_WC_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Sensible heat' & ,'[ W/m2]','(ipoly)' ) @@ -14257,7 +14298,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_vapor_wc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_VAPOR_WC_PY :11:hist:mont:dcyc') + ,'MMEAN_VAPOR_WC_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Wood evaporation' & ,'[ kg/m2/s]','(ipoly)' ) @@ -14266,7 +14307,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_intercepted_aw & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_INTERCEPTED_AW_PY :11:hist:mont:dcyc') + ,'MMEAN_INTERCEPTED_AW_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Wood interception' & ,'[ kg/m2/s]','(ipoly)' ) @@ -14275,7 +14316,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_wshed_wg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_WSHED_WG_PY :11:hist:mont:dcyc') + ,'MMEAN_WSHED_WG_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Wood shedding' & ,'[ kg/m2/s]','(ipoly)' ) @@ -14284,7 +14325,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_rh & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RH_PY :11:hist:mont:dcyc') + ,'MMEAN_RH_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Heterotrophic respiration' & ,'[ kg/m2/yr]','(ipoly)' ) @@ -14293,7 +14334,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_cwd_rh & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CWD_RH_PY :11:hist:mont:dcyc') + ,'MMEAN_CWD_RH_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Coarse woody debris respiration' & ,'[ kg/m2/yr]','(ipoly)' ) @@ -14302,7 +14343,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_nep & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_NEP_PY :11:hist:mont:dcyc') + ,'MMEAN_NEP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Net Ecosystem productivity' & ,'[ kg/m2/yr]','(ipoly)' ) @@ -14311,7 +14352,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_rk4step & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RK4STEP_PY :11:hist:mont:dcyc') + ,'MMEAN_RK4STEP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - RK4 time step' & ,'[ s]','(ipoly)' ) @@ -14320,7 +14361,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_available_water & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_AVAILABLE_WATER_PY :11:hist:mont:dcyc') + ,'MMEAN_AVAILABLE_WATER_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Available water' & ,'[ kg/m2]','(ipoly)' ) @@ -14329,7 +14370,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_can_theiv & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CAN_THEIV_PY :11:hist:mont:dcyc') + ,'MMEAN_CAN_THEIV_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Ice-vapour equiv. pot. temperature - CAS' & ,'[ K]','(ipoly)' ) @@ -14338,7 +14379,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_can_theta & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CAN_THETA_PY :11:hist:mont:dcyc') + ,'MMEAN_CAN_THETA_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Potential temperature - CAS' & ,'[ K]','(ipoly)' ) @@ -14347,7 +14388,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_can_vpdef & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CAN_VPDEF_PY :11:hist:mont:dcyc') + ,'MMEAN_CAN_VPDEF_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Vapour pressure deficit - CAS' & ,'[ Pa]','(ipoly)' ) @@ -14356,7 +14397,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_can_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CAN_TEMP_PY :11:hist:mont:dcyc') + ,'MMEAN_CAN_TEMP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Temperature - CAS' & ,'[ K]','(ipoly)' ) @@ -14365,7 +14406,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_can_shv & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CAN_SHV_PY :11:hist:mont:dcyc') + ,'MMEAN_CAN_SHV_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Specific humidity - CAS' & ,'[ kg/kg]','(ipoly)' ) @@ -14374,7 +14415,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_can_co2 & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CAN_CO2_PY :11:hist:mont:dcyc') + ,'MMEAN_CAN_CO2_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - CO2 mixing ratio - CAS' & ,'[ umol/mol]','(ipoly)' ) @@ -14383,7 +14424,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_can_rhos & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CAN_RHOS_PY :11:hist:mont:dcyc') + ,'MMEAN_CAN_RHOS_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Air density - CAS' & ,'[ kg/m3]','(ipoly)' ) @@ -14392,7 +14433,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_can_prss & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CAN_PRSS_PY :11:hist:mont:dcyc') + ,'MMEAN_CAN_PRSS_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Pressure - CAS' & ,'[ Pa]','(ipoly)' ) @@ -14401,7 +14442,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_gnd_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_GND_TEMP_PY :11:hist:mont:dcyc') + ,'MMEAN_GND_TEMP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Ground temperature' & ,'[ K]','(ipoly)' ) @@ -14410,7 +14451,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_gnd_shv & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_GND_SHV_PY :11:hist:mont:dcyc') + ,'MMEAN_GND_SHV_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Ground specific humidity' & ,'[ kg/kg]','(ipoly)' ) @@ -14419,7 +14460,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_can_ggnd & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CAN_GGND_PY :11:hist:mont:dcyc') + ,'MMEAN_CAN_GGND_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Net canopy conductance' & ,'[ m/2]','(ipoly)' ) @@ -14428,7 +14469,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_sfcw_depth & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SFCW_DEPTH_PY :11:hist:mont:dcyc') + ,'MMEAN_SFCW_DEPTH_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Depth - temporary water layer' & ,'[ m]','(ipoly)' ) @@ -14437,7 +14478,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_sfcw_energy & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SFCW_ENERGY_PY :11:hist:mont:dcyc') + ,'MMEAN_SFCW_ENERGY_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Internal energy - temporary water layer' & ,'[ J/kg]','(ipoly)' ) @@ -14446,7 +14487,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_sfcw_mass & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SFCW_MASS_PY :11:hist:mont:dcyc') + ,'MMEAN_SFCW_MASS_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Water mass - temporary water layer' & ,'[ kg/m2]','(ipoly)' ) @@ -14455,7 +14496,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_sfcw_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SFCW_TEMP_PY :11:hist:mont:dcyc') + ,'MMEAN_SFCW_TEMP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Temperature - temporary water layer' & ,'[ K]','(ipoly)' ) @@ -14464,7 +14505,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_sfcw_fliq & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SFCW_FLIQ_PY :11:hist:mont:dcyc') + ,'MMEAN_SFCW_FLIQ_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Liquid fraction - temporary water layer' & ,'[ --]','(ipoly)' ) @@ -14473,7 +14514,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_rshort_gnd & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RSHORT_GND_PY :11:hist:mont:dcyc') + ,'MMEAN_RSHORT_GND_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Shortwave radiation absorbed by ground' & ,'[ W/m2]','(ipoly)' ) @@ -14482,7 +14523,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_par_gnd & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_PAR_GND_PY :11:hist:mont:dcyc') + ,'MMEAN_PAR_GND_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - PAR absorbed by ground' & ,'[ W/m2]','(ipoly)' ) @@ -14491,7 +14532,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_rlong_gnd & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RLONG_GND_PY :11:hist:mont:dcyc') + ,'MMEAN_RLONG_GND_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Longwave radiation absorbed by ground' & ,'[ W/m2]','(ipoly)' ) @@ -14500,7 +14541,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_rlongup & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RLONGUP_PY :11:hist:mont:dcyc') + ,'MMEAN_RLONGUP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Outgoing longwave radiation' & ,'[ W/m2]','(ipoly)' ) @@ -14509,7 +14550,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_parup & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_PARUP_PY :11:hist:mont:dcyc') + ,'MMEAN_PARUP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Outgoing PAR' & ,'[ W/m2]','(ipoly)' ) @@ -14518,7 +14559,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_nirup & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_NIRUP_PY :11:hist:mont:dcyc') + ,'MMEAN_NIRUP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Outgoing near infra-red radiation' & ,'[ W/m2]','(ipoly)' ) @@ -14527,7 +14568,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_rshortup & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RSHORTUP_PY :11:hist:mont:dcyc') + ,'MMEAN_RSHORTUP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Outgoing shortwave radiation' & ,'[ W/m2]','(ipoly)' ) @@ -14536,7 +14577,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_rnet & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RNET_PY :11:hist:mont:dcyc') + ,'MMEAN_RNET_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Net radiation at top of canopy' & ,'[ W/m2]','(ipoly)' ) @@ -14545,7 +14586,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_albedo & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ALBEDO_PY :11:hist:mont:dcyc') + ,'MMEAN_ALBEDO_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Albedo' & ,'[ ----]','(ipoly)' ) @@ -14554,7 +14595,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_albedo_beam & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ALBEDO_BEAM_PY :11:hist:mont:dcyc') + ,'MMEAN_ALBEDO_BEAM_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Albedo - direct radiation' & ,'[ ----]','(ipoly)' ) @@ -14563,7 +14604,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_albedo_diff & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ALBEDO_DIFF_PY :11:hist:mont:dcyc') + ,'MMEAN_ALBEDO_DIFF_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Albedo - diffuse radiation' & ,'[ ----]','(ipoly)' ) @@ -14572,7 +14613,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_rlong_albedo & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RLONG_ALBEDO_PY :11:hist:mont:dcyc') + ,'MMEAN_RLONG_ALBEDO_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Kind of albedo - longwave radiation' & ,'[ ----]','(ipoly)' ) @@ -14581,7 +14622,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_ustar & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_USTAR_PY :11:hist:mont:dcyc') + ,'MMEAN_USTAR_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Friction velocity' & ,'[ m/s]','(ipoly)' ) @@ -14590,7 +14631,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_tstar & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_TSTAR_PY :11:hist:mont:dcyc') + ,'MMEAN_TSTAR_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Gradient scale for potential temperature' & ,'[ K]','(ipoly)' ) @@ -14599,7 +14640,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_qstar & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_QSTAR_PY :11:hist:mont:dcyc') + ,'MMEAN_QSTAR_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Gradient scale for specific humidity' & ,'[ kg/kg]','(ipoly)' ) @@ -14608,7 +14649,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_cstar & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CSTAR_PY :11:hist:mont:dcyc') + ,'MMEAN_CSTAR_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Gradient scale for CO2 mixing ratio' & ,'[ umol/mol]','(ipoly)' ) @@ -14617,7 +14658,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_carbon_ac & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CARBON_AC_PY :11:hist:mont:dcyc') + ,'MMEAN_CARBON_AC_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - CO2 flux: atmosphere -> CAS' & ,'[ umol/m2/s]','(ipoly)' ) @@ -14626,7 +14667,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_carbon_st & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CARBON_ST_PY :11:hist:mont:dcyc') + ,'MMEAN_CARBON_ST_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - CO2 storage at CAS' & ,'[ umol/m2/s]','(ipoly)' ) @@ -14635,7 +14676,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_vapor_gc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_VAPOR_GC_PY :11:hist:mont:dcyc') + ,'MMEAN_VAPOR_GC_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Water vapour flux: ground -> CAS' & ,'[ kg/m2/s]','(ipoly)' ) @@ -14644,7 +14685,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_vapor_ac & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_VAPOR_AC_PY :11:hist:mont:dcyc') + ,'MMEAN_VAPOR_AC_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Water vapour flux: atmosphere -> CAS' & ,'[ kg/m2/s]','(ipoly)' ) @@ -14653,7 +14694,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_throughfall & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_THROUGHFALL_PY :11:hist:mont:dcyc') + ,'MMEAN_THROUGHFALL_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Throughfall rate' & ,'[ kg/m2/s]','(ipoly)' ) @@ -14662,7 +14703,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_runoff & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RUNOFF_PY :11:hist:mont:dcyc') + ,'MMEAN_RUNOFF_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Water runoff' & ,'[ kg/m2/s]','(ipoly)' ) @@ -14671,7 +14712,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_drainage & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_DRAINAGE_PY :11:hist:mont:dcyc') + ,'MMEAN_DRAINAGE_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Water drainage' & ,'[ kg/m2/s]','(ipoly)' ) @@ -14680,7 +14721,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_sensible_gc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SENSIBLE_GC_PY :11:hist:mont:dcyc') + ,'MMEAN_SENSIBLE_GC_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Sensible heat flux: ground -> CAS' & ,'[ W/m2]','(ipoly)' ) @@ -14689,7 +14730,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_sensible_ac & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SENSIBLE_AC_PY :11:hist:mont:dcyc') + ,'MMEAN_SENSIBLE_AC_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Sensible heat flux: atmosphere -> CAS' & ,'[ W/m2]','(ipoly)' ) @@ -14698,7 +14739,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_qthroughfall & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_QTHROUGHFALL_PY :11:hist:mont:dcyc') + ,'MMEAN_QTHROUGHFALL_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Throughfall rate' & ,'[ W/m2]','(ipoly)' ) @@ -14707,7 +14748,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_qrunoff & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_QRUNOFF_PY :11:hist:mont:dcyc') + ,'MMEAN_QRUNOFF_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Surface runoff' & ,'[ W/m2]','(ipoly)' ) @@ -14716,7 +14757,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_qdrainage & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_QDRAINAGE_PY :11:hist:mont:dcyc') + ,'MMEAN_QDRAINAGE_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Drainage energy loss' & ,'[ W/m2]','(ipoly)' ) @@ -14725,7 +14766,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_nppleaf & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_NPPLEAF_PY :11:hist:mont:dcyc') + ,'MMEAN_NPPLEAF_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Net primary productivity - Leaf' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -14734,7 +14775,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_nppfroot & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_NPPFROOT_PY :11:hist:mont:dcyc') + ,'MMEAN_NPPFROOT_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Net primary productivity - Fine root' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -14743,7 +14784,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_nppsapwood & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_NPPSAPWOOD_PY :11:hist:mont:dcyc') + ,'MMEAN_NPPSAPWOOD_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Net primary productivity - Sap wood' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -14752,7 +14793,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_nppcroot & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_NPPCROOT_PY :11:hist:mont:dcyc') + ,'MMEAN_NPPCROOT_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Net primary productivity - Coarse root' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -14761,7 +14802,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_nppseeds & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_NPPSEEDS_PY :11:hist:mont:dcyc') + ,'MMEAN_NPPSEEDS_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Net primary productivity - seeds' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -14770,7 +14811,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_nppwood & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_NPPWOOD_PY :11:hist:mont:dcyc') + ,'MMEAN_NPPWOOD_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Net primary productivity - heart wood' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -14779,7 +14820,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_nppdaily & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_NPPDAILY_PY :11:hist:mont:dcyc') + ,'MMEAN_NPPDAILY_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Net primary productivity - total' & ,'[ kgC/m2/yr]','(ipoly)' ) @@ -14788,7 +14829,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_A_decomp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_A_DECOMP_PY :11:hist:mont:dcyc') + ,'MMEAN_A_DECOMP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Decomposition scale' & ,'[ --]','(ipoly)' ) @@ -14797,7 +14838,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_Af_decomp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_AF_DECOMP_PY :11:hist:mont:dcyc') + ,'MMEAN_AF_DECOMP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Decomposition scale with N immobilisation' & ,'[ --]','(ipoly)' ) @@ -14806,7 +14847,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_co2_residual & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CO2_RESIDUAL_PY :11:hist:mont:dcyc') + ,'MMEAN_CO2_RESIDUAL_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Budget check - CO2 residual' & ,'[ umol/m2]','(ipoly)' ) @@ -14815,7 +14856,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_energy_residual & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ENERGY_RESIDUAL_PY :11:hist:mont:dcyc') + ,'MMEAN_ENERGY_RESIDUAL_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Budget check - Enthalpy residual' & ,'[ J/m2]','(ipoly)' ) @@ -14824,7 +14865,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_water_residual & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_WATER_RESIDUAL_PY :11:hist:mont:dcyc') + ,'MMEAN_WATER_RESIDUAL_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Budget check - Water residual' & ,'[ kg/m2]','(ipoly)' ) @@ -14833,7 +14874,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_atm_theiv & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_THEIV_PY :11:hist:mont:dcyc') + ,'MMEAN_ATM_THEIV_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Ice-vapour equiv. pot. temp.: Atmosphere' & ,'[ K]','(ipoly)' ) @@ -14842,7 +14883,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_atm_theta & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_THETA_PY :11:hist:mont:dcyc') + ,'MMEAN_ATM_THETA_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Potential temperature: Atmosphere' & ,'[ K]','(ipoly)' ) @@ -14851,7 +14892,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_atm_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_TEMP_PY :11:hist:mont:dcyc') + ,'MMEAN_ATM_TEMP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Temperature: Atmosphere' & ,'[ K]','(ipoly)' ) @@ -14860,7 +14901,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_atm_vpdef & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_VPDEF_PY :11:hist:mont:dcyc') + ,'MMEAN_ATM_VPDEF_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Vapour pressure deficit: Atmosphere' & ,'[ Pa]','(ipoly)' ) @@ -14869,7 +14910,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_atm_shv & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_SHV_PY :11:hist:mont:dcyc') + ,'MMEAN_ATM_SHV_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Specific humidity: Atmosphere' & ,'[ kg/kg]','(ipoly)' ) @@ -14878,7 +14919,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_atm_rshort & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_RSHORT_PY :11:hist:mont:dcyc') + ,'MMEAN_ATM_RSHORT_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Shortwave radiation: Atmosphere' & ,'[ W/m2]','(ipoly)' ) @@ -14887,7 +14928,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_atm_rshort_diff & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_RSHORT_DIFF_PY :11:hist:mont:dcyc') + ,'MMEAN_ATM_RSHORT_DIFF_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Diffuse SW radiation: Atmosphere' & ,'[ W/m2]','(ipoly)' ) @@ -14896,7 +14937,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_atm_par & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_PAR_PY :11:hist:mont:dcyc') + ,'MMEAN_ATM_PAR_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - PAR: Atmosphere' & ,'[ W/m2]','(ipoly)' ) @@ -14905,7 +14946,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_atm_par_diff & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_PAR_DIFF_PY :11:hist:mont:dcyc') + ,'MMEAN_ATM_PAR_DIFF_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Diffuse PAR: Atmosphere' & ,'[ W/m2]','(ipoly)' ) @@ -14914,7 +14955,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_atm_rlong & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_RLONG_PY :11:hist:mont:dcyc') + ,'MMEAN_ATM_RLONG_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Longwave radiation: Atmosphere' & ,'[ W/m2]','(ipoly)' ) @@ -14923,7 +14964,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_atm_vels & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_VELS_PY :11:hist:mont:dcyc') + ,'MMEAN_ATM_VELS_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Wind speed: atmosphere' & ,'[ m/s]','(ipoly)' ) @@ -14932,7 +14973,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_atm_rhos & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_RHOS_PY :11:hist:mont:dcyc') + ,'MMEAN_ATM_RHOS_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Air density: Atmosphere' & ,'[ kg/m3]','(ipoly)' ) @@ -14941,7 +14982,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_atm_prss & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_PRSS_PY :11:hist:mont:dcyc') + ,'MMEAN_ATM_PRSS_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Air pressure: Atmosphere' & ,'[ Pa]','(ipoly)' ) @@ -14950,7 +14991,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_atm_co2 & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_CO2_PY :11:hist:mont:dcyc') + ,'MMEAN_ATM_CO2_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - CO2 mixing ratio: Atmosphere' & ,'[ umol/mol]','(ipoly)' ) @@ -14959,7 +15000,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_pcpg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_PCPG_PY :11:hist:mont:dcyc') + ,'MMEAN_PCPG_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Precipitation rate' & ,'[ kg/m2/s]','(ipoly)' ) @@ -14968,7 +15009,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_qpcpg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_QPCPG_PY :11:hist:mont:dcyc') + ,'MMEAN_QPCPG_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Energy gain - rain' & ,'[ W/m2]','(ipoly)' ) @@ -14977,7 +15018,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_dpcpg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_DPCPG_PY :11:hist:mont:dcyc') + ,'MMEAN_DPCPG_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Precipitation depth' & ,'[ m]','(ipoly)' ) @@ -14986,7 +15027,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar + 1 call vtable_edio_r(npts,cgrid%mmean_fast_soil_c & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_FAST_SOIL_C_PY :11:hist:mont:dcyc') + ,'MMEAN_FAST_SOIL_C_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr,'Monthly mean - Soil Carbon (Fast pool)' & ,'[kgC/m2]','(ipoly)') end if @@ -14994,7 +15035,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar + 1 call vtable_edio_r(npts,cgrid%mmean_slow_soil_c & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SLOW_SOIL_C_PY :11:hist:mont:dcyc') + ,'MMEAN_SLOW_SOIL_C_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr,'Monthly mean - Soil Carbon (Slow pool)' & ,'[kgC/m2]','(ipoly)') end if @@ -15002,7 +15043,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar + 1 call vtable_edio_r(npts,cgrid%mmean_struct_soil_c & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_STRUCT_SOIL_C_PY :11:hist:mont:dcyc') + ,'MMEAN_STRUCT_SOIL_C_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr,'Monthly mean - Soil Carbon (Structural pool)' & ,'[kgC/m2]','(ipoly)') end if @@ -15010,7 +15051,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar + 1 call vtable_edio_r(npts,cgrid%mmean_struct_soil_l & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_STRUCT_SOIL_L_PY :11:hist:mont:dcyc') + ,'MMEAN_STRUCT_SOIL_L_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr,'Monthly mean - Soil Lignin (Structural pool)' & ,'[kgC/m2]','(ipoly)') end if @@ -15018,7 +15059,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar + 1 call vtable_edio_r(npts,cgrid%mmean_cwd_c & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CWD_C_PY :11:hist:mont:dcyc') + ,'MMEAN_CWD_C_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr,'Monthly mean - Coarse woody debris' & ,'[kgC/m2]','(ipoly)') end if @@ -15026,7 +15067,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar + 1 call vtable_edio_r(npts,cgrid%mmean_fast_soil_n & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_FAST_SOIL_N_PY :11:hist:mont:dcyc') + ,'MMEAN_FAST_SOIL_N_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr,'Monthly mean - Soil Nitrogen (Fast pool)' & ,'[kgN/m2]','(ipoly)') end if @@ -15034,7 +15075,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar + 1 call vtable_edio_r(npts,cgrid%mmean_mineral_soil_n & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_MINERAL_SOIL_N_PY :11:hist:mont:dcyc') + ,'MMEAN_MINERAL_SOIL_N_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr,'Monthly mean - Soil Nitrogen (Mineralised pool)' & ,'[kgN/m2]','(ipoly)') end if @@ -15042,7 +15083,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar + 1 call vtable_edio_r(npts,cgrid%mmean_cwd_n & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CWD_N_PY :11:hist:mont:dcyc') + ,'MMEAN_CWD_N_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr,'Monthly mean - Coarse woody debris nitrogen' & ,'[kgN/m2]','(ipoly)') end if @@ -15050,7 +15091,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmsqu_gpp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_GPP_PY :11:hist:mont:dcyc') + ,'MMSQU_GPP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Gross primary productivity' & ,'[kgC2/m4/yr2]','(ipoly)' ) @@ -15059,7 +15100,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmsqu_npp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_NPP_PY :11:hist:mont:dcyc') + ,'MMSQU_NPP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Net primary productivity' & ,'[kgC2/m4/yr2]','(ipoly)' ) @@ -15068,7 +15109,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmsqu_plresp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_PLRESP_PY :11:hist:mont:dcyc') + ,'MMSQU_PLRESP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Plant respiration' & ,'[kgC2/m4/yr2]','(ipoly)' ) @@ -15077,7 +15118,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmsqu_sensible_lc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_SENSIBLE_LC_PY :11:hist:mont:dcyc') + ,'MMSQU_SENSIBLE_LC_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Sensible heat' & ,'[ W2/m4]','(ipoly)' ) @@ -15086,7 +15127,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmsqu_vapor_lc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_VAPOR_LC_PY :11:hist:mont:dcyc') + ,'MMSQU_VAPOR_LC_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Leaf evaporation' & ,'[ kg2/m4/s2]','(ipoly)' ) @@ -15095,7 +15136,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmsqu_transp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_TRANSP_PY :11:hist:mont:dcyc') + ,'MMSQU_TRANSP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Leaf transpiration' & ,'[ kg2/m4/s2]','(ipoly)' ) @@ -15104,7 +15145,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmsqu_sensible_wc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_SENSIBLE_WC_PY :11:hist:mont:dcyc') + ,'MMSQU_SENSIBLE_WC_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Sensible heat' & ,'[ W2/m4]','(ipoly)' ) @@ -15113,7 +15154,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmsqu_vapor_wc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_VAPOR_WC_PY :11:hist:mont:dcyc') + ,'MMSQU_VAPOR_WC_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Wood evaporation' & ,'[ kg2/m4/s2]','(ipoly)' ) @@ -15122,7 +15163,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmsqu_rh & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_RH_PY :11:hist:mont:dcyc') + ,'MMSQU_RH_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Heterotrophic respiration' & ,'[ kg2/m4/yr2]','(ipoly)' ) @@ -15131,7 +15172,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmsqu_cwd_rh & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_CWD_RH_PY :11:hist:mont:dcyc') + ,'MMSQU_CWD_RH_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Coarse woody debris respiration' & ,'[ kg2/m4/yr2]','(ipoly)' ) @@ -15140,7 +15181,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmsqu_nep & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_NEP_PY :11:hist:mont:dcyc') + ,'MMSQU_NEP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Net Ecosystem productivity' & ,'[ kg2/m4/yr2]','(ipoly)' ) @@ -15149,7 +15190,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmsqu_rlongup & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_RLONGUP_PY :11:hist:mont:dcyc') + ,'MMSQU_RLONGUP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Outgoing longwave radiation' & ,'[ W2/m4]','(ipoly)' ) @@ -15158,7 +15199,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmsqu_parup & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_PARUP_PY :11:hist:mont:dcyc') + ,'MMSQU_PARUP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Outgoing PAR' & ,'[ W2/m4]','(ipoly)' ) @@ -15167,7 +15208,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmsqu_nirup & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_NIRUP_PY :11:hist:mont:dcyc') + ,'MMSQU_NIRUP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Outgoing near infra-red radiation' & ,'[ W2/m4]','(ipoly)' ) @@ -15176,7 +15217,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmsqu_rshortup & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_RSHORTUP_PY :11:hist:mont:dcyc') + ,'MMSQU_RSHORTUP_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Outgoing shortwave radiation' & ,'[ W2/m4]','(ipoly)' ) @@ -15185,7 +15226,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmsqu_rnet & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_RNET_PY :11:hist:mont:dcyc') + ,'MMSQU_RNET_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Net radiation at top of canopy' & ,'[ W2/m4]','(ipoly)' ) @@ -15194,7 +15235,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmsqu_albedo & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_ALBEDO_PY :11:hist:mont:dcyc') + ,'MMSQU_ALBEDO_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Albedo' & ,'[ ----]','(ipoly)' ) @@ -15203,7 +15244,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmsqu_ustar & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_USTAR_PY :11:hist:mont:dcyc') + ,'MMSQU_USTAR_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Friction velocity' & ,'[ m2/s2]','(ipoly)' ) @@ -15212,7 +15253,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmsqu_carbon_ac & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_CARBON_AC_PY :11:hist:mont:dcyc') + ,'MMSQU_CARBON_AC_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - CO2 flux: atmosphere -> CAS' & ,'[umol2/m4/s2]','(ipoly)' ) @@ -15221,7 +15262,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmsqu_carbon_st & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_CARBON_ST_PY :11:hist:mont:dcyc') + ,'MMSQU_CARBON_ST_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - CO2 storage at CAS' & ,'[umol2/m4/s2]','(ipoly)' ) @@ -15230,7 +15271,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmsqu_vapor_gc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_VAPOR_GC_PY :11:hist:mont:dcyc') + ,'MMSQU_VAPOR_GC_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Water vapour flux: ground -> CAS' & ,'[ kg2/m4/s2]','(ipoly)' ) @@ -15239,7 +15280,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmsqu_vapor_ac & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_VAPOR_AC_PY :11:hist:mont:dcyc') + ,'MMSQU_VAPOR_AC_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Water vapour flux: atmosphere -> CAS' & ,'[ kg2/m4/s2]','(ipoly)' ) @@ -15248,7 +15289,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmsqu_sensible_gc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_SENSIBLE_GC_PY :11:hist:mont:dcyc') + ,'MMSQU_SENSIBLE_GC_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Sensible heat flux: ground -> CAS' & ,'[ W2/m4]','(ipoly)' ) @@ -15257,7 +15298,7 @@ subroutine filltab_edtype_p11mmean(cgrid,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmsqu_sensible_ac & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_SENSIBLE_AC_PY :11:hist:mont:dcyc') + ,'MMSQU_SENSIBLE_AC_PY :11:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Sensible heat flux: atmosphere -> CAS' & ,'[ W2/m4]','(ipoly)' ) @@ -15286,18 +15327,28 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva implicit none !----- Arguments. -------------------------------------------------------------------! - type(edtype), target :: cgrid - integer , intent(in) :: init - integer , intent(in) :: igr - integer , intent(in) :: var_len - integer , intent(in) :: max_ptrs - integer , intent(in) :: var_len_global - integer , intent(inout) :: nvar + type(edtype) , target :: cgrid + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar !----- Local variables. -------------------------------------------------------------! - integer :: npts + integer :: npts + character(len=str_len) :: eorq_keys !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + ! Decide whether to save the mean diel variables to history or not. ! + !------------------------------------------------------------------------------------! + if (history_eorq) then + eorq_keys = 'hist:dcyc' + else + eorq_keys = 'dcyc' + end if + !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! @@ -15310,7 +15361,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_gpp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_GPP_PY :-11:hist:dcyc' ) + ,'QMEAN_GPP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Gross primary productivity' & ,'[ kgC/m2/yr]','(ndcycle,ipoly)' ) @@ -15319,7 +15370,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_npp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_NPP_PY :-11:hist:dcyc' ) + ,'QMEAN_NPP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Net primary productivity' & ,'[ kgC/m2/yr]','(ndcycle,ipoly)' ) @@ -15328,7 +15379,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_leaf_resp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_LEAF_RESP_PY :-11:hist:dcyc' ) + ,'QMEAN_LEAF_RESP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Leaf respiration' & ,'[ kgC/m2/yr]','(ndcycle,ipoly)' ) @@ -15337,7 +15388,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_root_resp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ROOT_RESP_PY :-11:hist:dcyc' ) + ,'QMEAN_ROOT_RESP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Root respiration' & ,'[ kgC/m2/yr]','(ndcycle,ipoly)' ) @@ -15346,7 +15397,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_growth_resp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_GROWTH_RESP_PY :-11:hist:dcyc' ) + ,'QMEAN_GROWTH_RESP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Growth respiration' & ,'[ kgC/m2/yr]','(ndcycle,ipoly)' ) @@ -15355,7 +15406,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_storage_resp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_STORAGE_RESP_PY :-11:hist:dcyc' ) + ,'QMEAN_STORAGE_RESP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Storage respiration' & ,'[ kgC/m2/yr]','(ndcycle,ipoly)' ) @@ -15364,7 +15415,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_vleaf_resp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_VLEAF_RESP_PY :-11:hist:dcyc' ) + ,'QMEAN_VLEAF_RESP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Virtual leaf respiration' & ,'[ kgC/m2/yr]','(ndcycle,ipoly)' ) @@ -15373,7 +15424,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_plresp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_PLRESP_PY :-11:hist:dcyc' ) + ,'QMEAN_PLRESP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Plant respiration' & ,'[ kgC/m2/yr]','(ndcycle,ipoly)' ) @@ -15382,7 +15433,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_leaf_energy & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_LEAF_ENERGY_PY :-11:hist:dcyc' ) + ,'QMEAN_LEAF_ENERGY_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Leaf internal energy' & ,'[ J/m2]','(ndcycle,ipoly)' ) @@ -15391,7 +15442,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_leaf_water & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_LEAF_WATER_PY :-11:hist:dcyc' ) + ,'QMEAN_LEAF_WATER_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Leaf surface water' & ,'[ kg/m2]','(ndcycle,ipoly)' ) @@ -15400,7 +15451,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_leaf_hcap & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_LEAF_HCAP_PY :-11:hist:dcyc' ) + ,'QMEAN_LEAF_HCAP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Leaf heat capacity' & ,'[ J/m2/K]','(ndcycle,ipoly)' ) @@ -15409,7 +15460,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_leaf_vpdef & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_LEAF_VPDEF_PY :-11:hist:dcyc' ) + ,'QMEAN_LEAF_VPDEF_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Leaf vapour pressure deficit' & ,'[ Pa]','(ndcycle,ipoly)' ) @@ -15418,7 +15469,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_leaf_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_LEAF_TEMP_PY :-11:hist:dcyc' ) + ,'QMEAN_LEAF_TEMP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Leaf temperature' & ,'[ K]','(ndcycle,ipoly)' ) @@ -15427,7 +15478,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_leaf_fliq & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_LEAF_FLIQ_PY :-11:hist:dcyc' ) + ,'QMEAN_LEAF_FLIQ_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Liquid fraction' & ,'[ --]','(ndcycle,ipoly)' ) @@ -15436,7 +15487,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_leaf_gsw & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_LEAF_GSW_PY :-11:hist:dcyc' ) + ,'QMEAN_LEAF_GSW_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Stomatal conductance' & ,'[kg/m2leaf/s]','(ndcycle,ipoly)' ) @@ -15445,7 +15496,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_leaf_gbw & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_LEAF_GBW_PY :-11:hist:dcyc' ) + ,'QMEAN_LEAF_GBW_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Leaf boundary layer conductance' & ,'[kg/m2leaf/s]','(ndcycle,ipoly)' ) @@ -15454,7 +15505,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_wood_energy & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_WOOD_ENERGY_PY :-11:hist:dcyc' ) + ,'QMEAN_WOOD_ENERGY_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Wood internal energy' & ,'[ J/m2]','(ndcycle,ipoly)' ) @@ -15463,7 +15514,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_wood_water & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_WOOD_WATER_PY :-11:hist:dcyc' ) + ,'QMEAN_WOOD_WATER_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Wood surface water' & ,'[ kg/m2]','(ndcycle,ipoly)' ) @@ -15472,7 +15523,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_wood_hcap & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_WOOD_HCAP_PY :-11:hist:dcyc' ) + ,'QMEAN_WOOD_HCAP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Wood heat capacity' & ,'[ J/m2/K]','(ndcycle,ipoly)' ) @@ -15481,7 +15532,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_wood_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_WOOD_TEMP_PY :-11:hist:dcyc' ) + ,'QMEAN_WOOD_TEMP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Wood temperature' & ,'[ K]','(ndcycle,ipoly)' ) @@ -15490,7 +15541,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_wood_fliq & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_WOOD_FLIQ_PY :-11:hist:dcyc' ) + ,'QMEAN_WOOD_FLIQ_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Liquid fraction' & ,'[ --]','(ndcycle,ipoly)' ) @@ -15499,7 +15550,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_wood_gbw & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_WOOD_GBW_PY :-11:hist:dcyc' ) + ,'QMEAN_WOOD_GBW_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Wood boundary layer conductance' & ,'[kg/m2wood/s]','(ndcycle,ipoly)' ) @@ -15508,7 +15559,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_fs_open & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_FS_OPEN_PY :-11:hist:dcyc' ) + ,'QMEAN_FS_OPEN_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Net stress factor' & ,'[ --]','(ndcycle,ipoly)' ) @@ -15517,7 +15568,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_fsw & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_FSW_PY :-11:hist:dcyc' ) + ,'QMEAN_FSW_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Moisture stress' & ,'[ --]','(ndcycle,ipoly)' ) @@ -15526,7 +15577,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_fsn & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_FSN_PY :-11:hist:dcyc' ) + ,'QMEAN_FSN_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Nitrogen stress' & ,'[ --]','(ndcycle,ipoly)' ) @@ -15535,7 +15586,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_psi_open & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_PSI_OPEN_PY :-11:hist:dcyc' ) + ,'QMEAN_PSI_OPEN_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Transpiration with no stress' & ,'[ kg/m2/s]','(ndcycle,ipoly)' ) @@ -15544,7 +15595,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_psi_closed & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_PSI_CLOSED_PY :-11:hist:dcyc' ) + ,'QMEAN_PSI_CLOSED_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Transpiration at maximum stress' & ,'[ kg/m2/s]','(ndcycle,ipoly)' ) @@ -15553,7 +15604,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_water_supply & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_WATER_SUPPLY_PY :-11:hist:dcyc' ) + ,'QMEAN_WATER_SUPPLY_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Water supply' & ,'[ kg/m2/s]','(ndcycle,ipoly)' ) @@ -15562,7 +15613,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_par_l & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_PAR_L_PY :-11:hist:dcyc' ) + ,'QMEAN_PAR_L_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - PAR absorbed by leaves' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -15571,7 +15622,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_par_l_beam & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_PAR_L_BEAM_PY :-11:hist:dcyc' ) + ,'QMEAN_PAR_L_BEAM_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Direct PAR absorbed by leaves' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -15580,7 +15631,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_par_l_diff & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_PAR_L_DIFF_PY :-11:hist:dcyc' ) + ,'QMEAN_PAR_L_DIFF_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Diffuse PAR absorbed by leaves' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -15589,7 +15640,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_rshort_l & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RSHORT_L_PY :-11:hist:dcyc' ) + ,'QMEAN_RSHORT_L_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Shortwave radiation absorbed by leaves' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -15598,7 +15649,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_rlong_l & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RLONG_L_PY :-11:hist:dcyc' ) + ,'QMEAN_RLONG_L_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Longwave radiation absorbed by leaves' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -15607,7 +15658,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_sensible_lc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SENSIBLE_LC_PY :-11:hist:dcyc' ) + ,'QMEAN_SENSIBLE_LC_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Sensible heat' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -15616,7 +15667,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_vapor_lc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_VAPOR_LC_PY :-11:hist:dcyc' ) + ,'QMEAN_VAPOR_LC_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Leaf evaporation' & ,'[ kg/m2/s]','(ndcycle,ipoly)' ) @@ -15625,7 +15676,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_transp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_TRANSP_PY :-11:hist:dcyc' ) + ,'QMEAN_TRANSP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Leaf transpiration' & ,'[ kg/m2/s]','(ndcycle,ipoly)' ) @@ -15634,7 +15685,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_intercepted_al & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_INTERCEPTED_AL_PY :-11:hist:dcyc' ) + ,'QMEAN_INTERCEPTED_AL_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Leaf interception' & ,'[ kg/m2/s]','(ndcycle,ipoly)' ) @@ -15643,7 +15694,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_wshed_lg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_WSHED_LG_PY :-11:hist:dcyc' ) + ,'QMEAN_WSHED_LG_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Leaf shedding' & ,'[ kg/m2/s]','(ndcycle,ipoly)' ) @@ -15652,7 +15703,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_rshort_w & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RSHORT_W_PY :-11:hist:dcyc' ) + ,'QMEAN_RSHORT_W_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Shortwave radiation absorbed by wood' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -15661,7 +15712,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_rlong_w & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RLONG_W_PY :-11:hist:dcyc' ) + ,'QMEAN_RLONG_W_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Longwave radiation absorbed by wood' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -15670,7 +15721,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_sensible_wc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SENSIBLE_WC_PY :-11:hist:dcyc' ) + ,'QMEAN_SENSIBLE_WC_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Sensible heat' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -15679,7 +15730,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_vapor_wc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_VAPOR_WC_PY :-11:hist:dcyc' ) + ,'QMEAN_VAPOR_WC_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Wood evaporation' & ,'[ kg/m2/s]','(ndcycle,ipoly)' ) @@ -15688,7 +15739,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_intercepted_aw & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_INTERCEPTED_AW_PY :-11:hist:dcyc' ) + ,'QMEAN_INTERCEPTED_AW_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Wood interception' & ,'[ kg/m2/s]','(ndcycle,ipoly)' ) @@ -15697,7 +15748,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_wshed_wg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_WSHED_WG_PY :-11:hist:dcyc' ) + ,'QMEAN_WSHED_WG_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Wood shedding' & ,'[ kg/m2/s]','(ndcycle,ipoly)' ) @@ -15706,7 +15757,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_rh & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RH_PY :-11:hist:dcyc' ) + ,'QMEAN_RH_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Heterotrophic respiration' & ,'[ kg/m2/yr]','(ndcycle,ipoly)' ) @@ -15715,7 +15766,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_cwd_rh & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_CWD_RH_PY :-11:hist:dcyc' ) + ,'QMEAN_CWD_RH_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Coarse woody debris respiration' & ,'[ kg/m2/yr]','(ndcycle,ipoly)' ) @@ -15724,7 +15775,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_nep & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_NEP_PY :-11:hist:dcyc' ) + ,'QMEAN_NEP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Net Ecosystem productivity' & ,'[ kg/m2/yr]','(ndcycle,ipoly)' ) @@ -15733,7 +15784,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_rk4step & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RK4STEP_PY :-11:hist:dcyc' ) + ,'QMEAN_RK4STEP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - RK4 time step' & ,'[ s]','(ndcycle,ipoly)' ) @@ -15742,7 +15793,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_available_water & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_AVAILABLE_WATER_PY :-11:hist:dcyc' ) + ,'QMEAN_AVAILABLE_WATER_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Available water' & ,'[ kg/m2]','(ndcycle,ipoly)' ) @@ -15751,7 +15802,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_can_theiv & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_CAN_THEIV_PY :-11:hist:dcyc' ) + ,'QMEAN_CAN_THEIV_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Ice-vapour equiv. pot. temperature - CAS' & ,'[ K]','(ndcycle,ipoly)' ) @@ -15760,7 +15811,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_can_theta & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_CAN_THETA_PY :-11:hist:dcyc' ) + ,'QMEAN_CAN_THETA_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Potential temperature - CAS' & ,'[ K]','(ndcycle,ipoly)' ) @@ -15769,7 +15820,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_can_vpdef & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_CAN_VPDEF_PY :-11:hist:dcyc' ) + ,'QMEAN_CAN_VPDEF_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Vapour pressure deficit - CAS' & ,'[ Pa]','(ndcycle,ipoly)' ) @@ -15778,7 +15829,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_can_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_CAN_TEMP_PY :-11:hist:dcyc' ) + ,'QMEAN_CAN_TEMP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Temperature - CAS' & ,'[ K]','(ndcycle,ipoly)' ) @@ -15787,7 +15838,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_can_shv & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_CAN_SHV_PY :-11:hist:dcyc' ) + ,'QMEAN_CAN_SHV_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Specific humidity - CAS' & ,'[ kg/kg]','(ndcycle,ipoly)' ) @@ -15796,7 +15847,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_can_co2 & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_CAN_CO2_PY :-11:hist:dcyc' ) + ,'QMEAN_CAN_CO2_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - CO2 mixing ratio - CAS' & ,'[ umol/mol]','(ndcycle,ipoly)' ) @@ -15805,7 +15856,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_can_rhos & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_CAN_RHOS_PY :-11:hist:dcyc' ) + ,'QMEAN_CAN_RHOS_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Air density - CAS' & ,'[ kg/m3]','(ndcycle,ipoly)' ) @@ -15814,7 +15865,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_can_prss & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_CAN_PRSS_PY :-11:hist:dcyc' ) + ,'QMEAN_CAN_PRSS_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Pressure - CAS' & ,'[ Pa]','(ndcycle,ipoly)' ) @@ -15823,7 +15874,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_gnd_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_GND_TEMP_PY :-11:hist:dcyc' ) + ,'QMEAN_GND_TEMP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Ground temperature' & ,'[ K]','(ndcycle,ipoly)' ) @@ -15832,7 +15883,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_gnd_shv & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_GND_SHV_PY :-11:hist:dcyc' ) + ,'QMEAN_GND_SHV_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Ground specific humidity' & ,'[ kg/kg]','(ndcycle,ipoly)' ) @@ -15841,7 +15892,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_can_ggnd & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_CAN_GGND_PY :-11:hist:dcyc' ) + ,'QMEAN_CAN_GGND_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Net canopy conductance' & ,'[ m/2]','(ndcycle,ipoly)' ) @@ -15850,7 +15901,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_sfcw_depth & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SFCW_DEPTH_PY :-11:hist:dcyc' ) + ,'QMEAN_SFCW_DEPTH_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Depth - temporary water layer' & ,'[ m]','(ndcycle,ipoly)' ) @@ -15859,7 +15910,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_sfcw_energy & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SFCW_ENERGY_PY :-11:hist:dcyc' ) + ,'QMEAN_SFCW_ENERGY_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Internal energy - temporary water layer' & ,'[ J/kg]','(ndcycle,ipoly)' ) @@ -15868,7 +15919,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_sfcw_mass & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SFCW_MASS_PY :-11:hist:dcyc' ) + ,'QMEAN_SFCW_MASS_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Water mass - temporary water layer' & ,'[ kg/m2]','(ndcycle,ipoly)' ) @@ -15877,7 +15928,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_sfcw_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SFCW_TEMP_PY :-11:hist:dcyc' ) + ,'QMEAN_SFCW_TEMP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Temperature - temporary water layer' & ,'[ K]','(ndcycle,ipoly)' ) @@ -15886,7 +15937,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_sfcw_fliq & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SFCW_FLIQ_PY :-11:hist:dcyc' ) + ,'QMEAN_SFCW_FLIQ_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Liquid fraction - temporary water layer' & ,'[ --]','(ndcycle,ipoly)' ) @@ -15895,7 +15946,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_rshort_gnd & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RSHORT_GND_PY :-11:hist:dcyc' ) + ,'QMEAN_RSHORT_GND_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Shortwave radiation absorbed by ground' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -15904,7 +15955,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_par_gnd & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_PAR_GND_PY :-11:hist:dcyc' ) + ,'QMEAN_PAR_GND_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - PAR absorbed by ground' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -15913,7 +15964,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_rlong_gnd & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RLONG_GND_PY :-11:hist:dcyc' ) + ,'QMEAN_RLONG_GND_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Longwave radiation absorbed by ground' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -15922,7 +15973,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_rlongup & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RLONGUP_PY :-11:hist:dcyc' ) + ,'QMEAN_RLONGUP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Outgoing longwave radiation' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -15931,7 +15982,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_parup & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_PARUP_PY :-11:hist:dcyc' ) + ,'QMEAN_PARUP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Outgoing PAR' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -15940,7 +15991,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_nirup & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_NIRUP_PY :-11:hist:dcyc' ) + ,'QMEAN_NIRUP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Outgoing near infra-red radiation' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -15949,7 +16000,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_rshortup & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RSHORTUP_PY :-11:hist:dcyc' ) + ,'QMEAN_RSHORTUP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Outgoing shortwave radiation' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -15958,7 +16009,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_rnet & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RNET_PY :-11:hist:dcyc' ) + ,'QMEAN_RNET_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Net radiation at top of canopy' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -15967,7 +16018,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_albedo & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ALBEDO_PY :-11:hist:dcyc' ) + ,'QMEAN_ALBEDO_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Albedo' & ,'[ ----]','(ndcycle,ipoly)' ) @@ -15976,7 +16027,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_albedo_beam & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ALBEDO_BEAM_PY :-11:hist:dcyc' ) + ,'QMEAN_ALBEDO_BEAM_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Albedo - direct radiation' & ,'[ ----]','(ndcycle,ipoly)' ) @@ -15985,7 +16036,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_albedo_diff & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ALBEDO_DIFF_PY :-11:hist:dcyc' ) + ,'QMEAN_ALBEDO_DIFF_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Albedo - diffuse radiation' & ,'[ ----]','(ndcycle,ipoly)' ) @@ -15994,7 +16045,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_rlong_albedo & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RLONG_ALBEDO_PY :-11:hist:dcyc' ) + ,'QMEAN_RLONG_ALBEDO_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Kind of albedo - longwave radiation' & ,'[ ----]','(ndcycle,ipoly)' ) @@ -16003,7 +16054,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_ustar & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_USTAR_PY :-11:hist:dcyc' ) + ,'QMEAN_USTAR_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Friction velocity' & ,'[ m/s]','(ndcycle,ipoly)' ) @@ -16012,7 +16063,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_tstar & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_TSTAR_PY :-11:hist:dcyc' ) + ,'QMEAN_TSTAR_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Gradient scale for potential temperature' & ,'[ K]','(ndcycle,ipoly)' ) @@ -16021,7 +16072,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_qstar & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_QSTAR_PY :-11:hist:dcyc' ) + ,'QMEAN_QSTAR_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Gradient scale for specific humidity' & ,'[ kg/kg]','(ndcycle,ipoly)' ) @@ -16030,7 +16081,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_cstar & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_CSTAR_PY :-11:hist:dcyc' ) + ,'QMEAN_CSTAR_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Gradient scale for CO2 mixing ratio' & ,'[ umol/mol]','(ndcycle,ipoly)' ) @@ -16039,7 +16090,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_carbon_ac & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_CARBON_AC_PY :-11:hist:dcyc' ) + ,'QMEAN_CARBON_AC_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - CO2 flux: atmosphere -> CAS' & ,'[ umol/m2/s]','(ndcycle,ipoly)' ) @@ -16048,7 +16099,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_carbon_st & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_CARBON_ST_PY :-11:hist:dcyc' ) + ,'QMEAN_CARBON_ST_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - CO2 storage at CAS' & ,'[ umol/m2/s]','(ndcycle,ipoly)' ) @@ -16057,7 +16108,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_vapor_gc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_VAPOR_GC_PY :-11:hist:dcyc' ) + ,'QMEAN_VAPOR_GC_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Water vapour flux: ground -> CAS' & ,'[ kg/m2/s]','(ndcycle,ipoly)' ) @@ -16066,7 +16117,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_vapor_ac & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_VAPOR_AC_PY :-11:hist:dcyc' ) + ,'QMEAN_VAPOR_AC_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Water vapour flux: atmosphere -> CAS' & ,'[ kg/m2/s]','(ndcycle,ipoly)' ) @@ -16075,7 +16126,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_throughfall & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_THROUGHFALL_PY :-11:hist:dcyc' ) + ,'QMEAN_THROUGHFALL_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Throughfall rate' & ,'[ kg/m2/s]','(ndcycle,ipoly)' ) @@ -16084,7 +16135,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_runoff & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RUNOFF_PY :-11:hist:dcyc' ) + ,'QMEAN_RUNOFF_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Water runoff' & ,'[ kg/m2/s]','(ndcycle,ipoly)' ) @@ -16093,7 +16144,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_drainage & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_DRAINAGE_PY :-11:hist:dcyc' ) + ,'QMEAN_DRAINAGE_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Water drainage' & ,'[ kg/m2/s]','(ndcycle,ipoly)' ) @@ -16102,7 +16153,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_sensible_gc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SENSIBLE_GC_PY :-11:hist:dcyc' ) + ,'QMEAN_SENSIBLE_GC_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Sensible heat flux: ground -> CAS' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -16111,7 +16162,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_sensible_ac & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SENSIBLE_AC_PY :-11:hist:dcyc' ) + ,'QMEAN_SENSIBLE_AC_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Sensible heat flux: atmosphere -> CAS' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -16120,7 +16171,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_qthroughfall & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_QTHROUGHFALL_PY :-11:hist:dcyc' ) + ,'QMEAN_QTHROUGHFALL_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Throughfall rate' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -16129,7 +16180,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_qrunoff & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_QRUNOFF_PY :-11:hist:dcyc' ) + ,'QMEAN_QRUNOFF_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Surface runoff' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -16138,7 +16189,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_qdrainage & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_QDRAINAGE_PY :-11:hist:dcyc' ) + ,'QMEAN_QDRAINAGE_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Drainage energy loss' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -16147,7 +16198,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_atm_theiv & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_THEIV_PY :-11:hist:dcyc' ) + ,'QMEAN_ATM_THEIV_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Ice-vapour equiv. pot. temp.: Atmosphere' & ,'[ K]','(ndcycle,ipoly)' ) @@ -16156,7 +16207,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_atm_theta & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_THETA_PY :-11:hist:dcyc' ) + ,'QMEAN_ATM_THETA_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Potential temperature: Atmosphere' & ,'[ K]','(ndcycle,ipoly)' ) @@ -16165,7 +16216,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_atm_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_TEMP_PY :-11:hist:dcyc' ) + ,'QMEAN_ATM_TEMP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Temperature: Atmosphere' & ,'[ K]','(ndcycle,ipoly)' ) @@ -16174,7 +16225,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_atm_vpdef & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_VPDEF_PY :-11:hist:dcyc' ) + ,'QMEAN_ATM_VPDEF_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Vapour pressure deficit: Atmosphere' & ,'[ Pa]','(ndcycle,ipoly)' ) @@ -16183,7 +16234,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_atm_shv & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_SHV_PY :-11:hist:dcyc' ) + ,'QMEAN_ATM_SHV_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Specific humidity: Atmosphere' & ,'[ kg/kg]','(ndcycle,ipoly)' ) @@ -16192,7 +16243,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_atm_rshort & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_RSHORT_PY :-11:hist:dcyc' ) + ,'QMEAN_ATM_RSHORT_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Shortwave radiation: Atmosphere' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -16201,7 +16252,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_atm_rshort_diff & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_RSHORT_DIFF_PY :-11:hist:dcyc' ) + ,'QMEAN_ATM_RSHORT_DIFF_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Diffuse SW radiation: Atmosphere' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -16210,7 +16261,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_atm_par & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_PAR_PY :-11:hist:dcyc' ) + ,'QMEAN_ATM_PAR_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - PAR: Atmosphere' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -16219,7 +16270,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_atm_par_diff & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_PAR_DIFF_PY :-11:hist:dcyc' ) + ,'QMEAN_ATM_PAR_DIFF_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Diffuse PAR: Atmosphere' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -16228,7 +16279,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_atm_rlong & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_RLONG_PY :-11:hist:dcyc' ) + ,'QMEAN_ATM_RLONG_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Longwave radiation: Atmosphere' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -16237,7 +16288,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_atm_vels & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_VELS_PY :-11:hist:dcyc' ) + ,'QMEAN_ATM_VELS_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Wind speed: atmosphere' & ,'[ m/s]','(ndcycle,ipoly)' ) @@ -16246,7 +16297,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_atm_rhos & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_RHOS_PY :-11:hist:dcyc' ) + ,'QMEAN_ATM_RHOS_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Air density: Atmosphere' & ,'[ kg/m3]','(ndcycle,ipoly)' ) @@ -16255,7 +16306,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_atm_prss & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_PRSS_PY :-11:hist:dcyc' ) + ,'QMEAN_ATM_PRSS_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Air pressure: Atmosphere' & ,'[ Pa]','(ndcycle,ipoly)' ) @@ -16264,7 +16315,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_atm_co2 & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_CO2_PY :-11:hist:dcyc' ) + ,'QMEAN_ATM_CO2_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - CO2 mixing ratio: Atmosphere' & ,'[ umol/mol]','(ndcycle,ipoly)' ) @@ -16273,7 +16324,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_pcpg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_PCPG_PY :-11:hist:dcyc' ) + ,'QMEAN_PCPG_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Precipitation rate' & ,'[ kg/m2/s]','(ndcycle,ipoly)' ) @@ -16282,7 +16333,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_qpcpg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_QPCPG_PY :-11:hist:dcyc' ) + ,'QMEAN_QPCPG_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Energy gain - rain' & ,'[ W/m2]','(ndcycle,ipoly)' ) @@ -16291,7 +16342,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_dpcpg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_DPCPG_PY :-11:hist:dcyc' ) + ,'QMEAN_DPCPG_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Precipitation depth' & ,'[ m]','(ndcycle,ipoly)' ) @@ -16300,7 +16351,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmsqu_gpp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_GPP_PY :-11:hist:dcyc' ) + ,'QMSQU_GPP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Gross primary productivity' & ,'[kgC2/m4/yr2]','(ndcycle,ipoly)' ) @@ -16309,7 +16360,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmsqu_npp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_NPP_PY :-11:hist:dcyc' ) + ,'QMSQU_NPP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Net primary productivity' & ,'[kgC2/m4/yr2]','(ndcycle,ipoly)' ) @@ -16318,7 +16369,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmsqu_plresp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_PLRESP_PY :-11:hist:dcyc' ) + ,'QMSQU_PLRESP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Plant respiration' & ,'[kgC2/m4/yr2]','(ndcycle,ipoly)' ) @@ -16327,7 +16378,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmsqu_sensible_lc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_SENSIBLE_LC_PY :-11:hist:dcyc' ) + ,'QMSQU_SENSIBLE_LC_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Sensible heat' & ,'[ W2/m4]','(ndcycle,ipoly)' ) @@ -16336,7 +16387,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmsqu_vapor_lc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_VAPOR_LC_PY :-11:hist:dcyc' ) + ,'QMSQU_VAPOR_LC_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Leaf evaporation' & ,'[ kg2/m4/s2]','(ndcycle,ipoly)' ) @@ -16345,7 +16396,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmsqu_transp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_TRANSP_PY :-11:hist:dcyc' ) + ,'QMSQU_TRANSP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Leaf transpiration' & ,'[ kg2/m4/s2]','(ndcycle,ipoly)' ) @@ -16354,7 +16405,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmsqu_sensible_wc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_SENSIBLE_WC_PY :-11:hist:dcyc' ) + ,'QMSQU_SENSIBLE_WC_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Sensible heat' & ,'[ W2/m4]','(ndcycle,ipoly)' ) @@ -16363,7 +16414,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmsqu_vapor_wc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_VAPOR_WC_PY :-11:hist:dcyc' ) + ,'QMSQU_VAPOR_WC_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Wood evaporation' & ,'[ kg2/m4/s2]','(ndcycle,ipoly)' ) @@ -16372,7 +16423,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmsqu_rh & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_RH_PY :-11:hist:dcyc' ) + ,'QMSQU_RH_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Heterotrophic respiration' & ,'[ kg2/m4/yr2]','(ndcycle,ipoly)' ) @@ -16381,7 +16432,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmsqu_cwd_rh & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_CWD_RH_PY :-11:hist:dcyc' ) + ,'QMSQU_CWD_RH_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Coarse woody debris respiration' & ,'[ kg2/m4/yr2]','(ndcycle,ipoly)' ) @@ -16390,7 +16441,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmsqu_nep & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_NEP_PY :-11:hist:dcyc' ) + ,'QMSQU_NEP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Net Ecosystem productivity' & ,'[ kg2/m4/yr2]','(ndcycle,ipoly)' ) @@ -16399,7 +16450,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmsqu_rlongup & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_RLONGUP_PY :-11:hist:dcyc' ) + ,'QMSQU_RLONGUP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Outgoing longwave radiation' & ,'[ W2/m4]','(ndcycle,ipoly)' ) @@ -16408,7 +16459,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmsqu_parup & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_PARUP_PY :-11:hist:dcyc' ) + ,'QMSQU_PARUP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Outgoing PAR' & ,'[ W2/m4]','(ndcycle,ipoly)' ) @@ -16417,7 +16468,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmsqu_nirup & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_NIRUP_PY :-11:hist:dcyc' ) + ,'QMSQU_NIRUP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Outgoing near infra-red radiation' & ,'[ W2/m4]','(ndcycle,ipoly)' ) @@ -16426,7 +16477,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmsqu_rshortup & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_RSHORTUP_PY :-11:hist:dcyc' ) + ,'QMSQU_RSHORTUP_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Outgoing shortwave radiation' & ,'[ W2/m4]','(ndcycle,ipoly)' ) @@ -16435,7 +16486,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmsqu_rnet & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_RNET_PY :-11:hist:dcyc' ) + ,'QMSQU_RNET_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Net radiation at top of canopy' & ,'[ W2/m4]','(ndcycle,ipoly)' ) @@ -16444,7 +16495,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmsqu_albedo & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_ALBEDO_PY :-11:hist:dcyc' ) + ,'QMSQU_ALBEDO_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Albedo' & ,'[ ----]','(ndcycle,ipoly)' ) @@ -16453,7 +16504,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmsqu_ustar & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_USTAR_PY :-11:hist:dcyc' ) + ,'QMSQU_USTAR_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Friction velocity' & ,'[ m2/s2]','(ndcycle,ipoly)' ) @@ -16462,7 +16513,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmsqu_carbon_ac & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_CARBON_AC_PY :-11:hist:dcyc' ) + ,'QMSQU_CARBON_AC_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - CO2 flux: atmosphere -> CAS' & ,'[umol2/m4/s2]','(ndcycle,ipoly)' ) @@ -16471,7 +16522,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmsqu_carbon_st & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_CARBON_ST_PY :-11:hist:dcyc' ) + ,'QMSQU_CARBON_ST_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - CO2 storage at CAS' & ,'[umol2/m4/s2]','(ndcycle,ipoly)' ) @@ -16480,7 +16531,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmsqu_vapor_gc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_VAPOR_GC_PY :-11:hist:dcyc' ) + ,'QMSQU_VAPOR_GC_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Water vapour flux: ground -> CAS' & ,'[ kg2/m4/s2]','(ndcycle,ipoly)' ) @@ -16489,7 +16540,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmsqu_vapor_ac & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_VAPOR_AC_PY :-11:hist:dcyc' ) + ,'QMSQU_VAPOR_AC_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Water vapour flux: atmosphere -> CAS' & ,'[ kg2/m4/s2]','(ndcycle,ipoly)' ) @@ -16498,7 +16549,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmsqu_sensible_gc & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_SENSIBLE_GC_PY :-11:hist:dcyc' ) + ,'QMSQU_SENSIBLE_GC_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Sensible heat flux: ground -> CAS' & ,'[ W2/m4]','(ndcycle,ipoly)' ) @@ -16507,7 +16558,7 @@ subroutine filltab_edtype_m11(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmsqu_sensible_ac & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_SENSIBLE_AC_PY :-11:hist:dcyc' ) + ,'QMSQU_SENSIBLE_AC_PY :-11:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Sensible heat flux: atmosphere -> CAS' & ,'[ W2/m4]','(ndcycle,ipoly)' ) @@ -16537,18 +16588,45 @@ subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva implicit none !----- Arguments. -------------------------------------------------------------------! - type(edtype), target :: cgrid - integer , intent(in) :: init - integer , intent(in) :: igr - integer , intent(in) :: var_len - integer , intent(in) :: max_ptrs - integer , intent(in) :: var_len_global - integer , intent(inout) :: nvar + type(edtype) , target :: cgrid + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar !----- Local variables. -------------------------------------------------------------! - integer :: npts + integer :: npts + character(len=str_len) :: fast_keys + character(len=str_len) :: dail_keys + character(len=str_len) :: eorq_keys + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + ! Decide whether to write fast, daily, and monthly mean variables to history. ! + !------------------------------------------------------------------------------------! + if (history_fast) then + fast_keys = 'hist:anal' + else + fast_keys = 'anal' + end if + if (history_dail) then + dail_keys = 'hist:dail' + else + dail_keys = 'dail' + end if + if (history_eorq) then + eorq_keys = 'hist:mont:dcyc' + else + eorq_keys = 'mont:dcyc' + end if !------------------------------------------------------------------------------------! + + !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! ! This is the 2-D block, with soil layers. All variables must have the number ! @@ -16559,7 +16637,7 @@ subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_soil_energy & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SOIL_ENERGY_PY :12:hist:anal' ) + ,'FMEAN_SOIL_ENERGY_PY :12:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Soil internal energy' & ,'[ J/m3]','(nzg,ipoly)' ) @@ -16568,7 +16646,7 @@ subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_soil_mstpot & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SOIL_MSTPOT_PY :12:hist:anal' ) + ,'FMEAN_SOIL_MSTPOT_PY :12:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Soil matric potential' & ,'[ m]','(nzg,ipoly)' ) @@ -16577,7 +16655,7 @@ subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_soil_water & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SOIL_WATER_PY :12:hist:anal' ) + ,'FMEAN_SOIL_WATER_PY :12:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Soil water content' & ,'[ m3/m3]','(nzg,ipoly)' ) @@ -16586,7 +16664,7 @@ subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_soil_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SOIL_TEMP_PY :12:hist:anal' ) + ,'FMEAN_SOIL_TEMP_PY :12:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Soil temperature' & ,'[ K]','(nzg,ipoly)' ) @@ -16595,7 +16673,7 @@ subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_soil_fliq & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SOIL_FLIQ_PY :12:hist:anal' ) + ,'FMEAN_SOIL_FLIQ_PY :12:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Soil liquid fraction' & ,'[ --]','(nzg,ipoly)' ) @@ -16604,7 +16682,7 @@ subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_smoist_gg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SMOIST_GG_PY :12:hist:anal' ) + ,'FMEAN_SMOIST_GG_PY :12:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Soil water flux' & ,'[ kg/m2/s]','(nzg,ipoly)' ) @@ -16613,7 +16691,7 @@ subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_transloss & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_TRANSLOSS_PY :12:hist:anal' ) + ,'FMEAN_TRANSLOSS_PY :12:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Water loss through transpiration' & ,'[ kg/m2/s]','(nzg,ipoly)' ) @@ -16622,7 +16700,7 @@ subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%fmean_sensible_gg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SENSIBLE_GG_PY :12:hist:anal' ) + ,'FMEAN_SENSIBLE_GG_PY :12:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Soil heat flux' & ,'[ W/m2]','(nzg,ipoly)' ) @@ -16631,7 +16709,7 @@ subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_soil_energy & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SOIL_ENERGY_PY :12:hist:dail' ) + ,'DMEAN_SOIL_ENERGY_PY :12:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Soil internal energy' & ,'[ J/m3]','(nzg,ipoly)' ) @@ -16640,7 +16718,7 @@ subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_soil_mstpot & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SOIL_MSTPOT_PY :12:hist:dail' ) + ,'DMEAN_SOIL_MSTPOT_PY :12:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Soil matric potential' & ,'[ m]','(nzg,ipoly)' ) @@ -16649,7 +16727,7 @@ subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_soil_water & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SOIL_WATER_PY :12:hist:dail' ) + ,'DMEAN_SOIL_WATER_PY :12:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Soil water content' & ,'[ m3/m3]','(nzg,ipoly)' ) @@ -16658,7 +16736,7 @@ subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_soil_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SOIL_TEMP_PY :12:hist:dail' ) + ,'DMEAN_SOIL_TEMP_PY :12:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Soil temperature' & ,'[ K]','(nzg,ipoly)' ) @@ -16667,7 +16745,7 @@ subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_soil_fliq & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SOIL_FLIQ_PY :12:hist:dail' ) + ,'DMEAN_SOIL_FLIQ_PY :12:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Soil liquid fraction' & ,'[ --]','(nzg,ipoly)' ) @@ -16676,7 +16754,7 @@ subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_smoist_gg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SMOIST_GG_PY :12:hist:dail' ) + ,'DMEAN_SMOIST_GG_PY :12:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Soil water flux' & ,'[ kg/m2/s]','(nzg,ipoly)' ) @@ -16685,7 +16763,7 @@ subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_transloss & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_TRANSLOSS_PY :12:hist:dail' ) + ,'DMEAN_TRANSLOSS_PY :12:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Water loss through transpiration' & ,'[ kg/m2/s]','(nzg,ipoly)' ) @@ -16694,7 +16772,7 @@ subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%dmean_sensible_gg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SENSIBLE_GG_PY :12:hist:dail' ) + ,'DMEAN_SENSIBLE_GG_PY :12:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Soil heat flux' & ,'[ W/m2]','(nzg,ipoly)' ) @@ -16703,7 +16781,7 @@ subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_soil_energy & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SOIL_ENERGY_PY :12:hist:mont:dcyc') + ,'MMEAN_SOIL_ENERGY_PY :12:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Soil internal energy' & ,'[ J/m3]','(nzg,ipoly)' ) @@ -16712,7 +16790,7 @@ subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_soil_mstpot & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SOIL_MSTPOT_PY :12:hist:mont:dcyc') + ,'MMEAN_SOIL_MSTPOT_PY :12:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Soil matric potential' & ,'[ m]','(nzg,ipoly)' ) @@ -16721,7 +16799,7 @@ subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_soil_water & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SOIL_WATER_PY :12:hist:mont:dcyc') + ,'MMEAN_SOIL_WATER_PY :12:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Soil water content' & ,'[ m3/m3]','(nzg,ipoly)' ) @@ -16730,7 +16808,7 @@ subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_soil_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SOIL_TEMP_PY :12:hist:mont:dcyc') + ,'MMEAN_SOIL_TEMP_PY :12:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Soil temperature' & ,'[ K]','(nzg,ipoly)' ) @@ -16739,7 +16817,7 @@ subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_soil_fliq & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SOIL_FLIQ_PY :12:hist:mont:dcyc') + ,'MMEAN_SOIL_FLIQ_PY :12:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Soil liquid fraction' & ,'[ --]','(nzg,ipoly)' ) @@ -16748,7 +16826,7 @@ subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_smoist_gg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SMOIST_GG_PY :12:hist:mont:dcyc') + ,'MMEAN_SMOIST_GG_PY :12:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Soil water flux' & ,'[ kg/m2/s]','(nzg,ipoly)' ) @@ -16757,7 +16835,7 @@ subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_transloss & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_TRANSLOSS_PY :12:hist:mont:dcyc') + ,'MMEAN_TRANSLOSS_PY :12:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Water loss through transpiration' & ,'[ kg/m2/s]','(nzg,ipoly)' ) @@ -16766,7 +16844,7 @@ subroutine filltab_edtype_p12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%mmean_sensible_gg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SENSIBLE_GG_PY :12:hist:mont:dcyc') + ,'MMEAN_SENSIBLE_GG_PY :12:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Soil heat flux' & ,'[ W/m2]','(nzg,ipoly)' ) @@ -16797,18 +16875,34 @@ subroutine filltab_edtype_m12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva implicit none !----- Arguments. -------------------------------------------------------------------! - type(edtype), target :: cgrid - integer , intent(in) :: init - integer , intent(in) :: igr - integer , intent(in) :: var_len - integer , intent(in) :: max_ptrs - integer , intent(in) :: var_len_global - integer , intent(inout) :: nvar + type(edtype) , target :: cgrid + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar !----- Local variables. -------------------------------------------------------------! - integer :: npts + integer :: npts + character(len=str_len) :: eorq_keys !------------------------------------------------------------------------------------! + + + !------------------------------------------------------------------------------------! + ! Decide whether to write the mean diel variables to the history. ! + !------------------------------------------------------------------------------------! + if (history_eorq) then + eorq_keys = 'hist:dcyc' + else + eorq_keys = 'dcyc' + end if + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! ! This is the 3-D block, with soil depth class and diurnal cycle. All vari- ! @@ -16819,7 +16913,7 @@ subroutine filltab_edtype_m12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_soil_energy & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SOIL_ENERGY_PY :-12:hist:dcyc' ) + ,'QMEAN_SOIL_ENERGY_PY :-12:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Soil internal energy' & ,'[ J/m3]','(nzg,ndcycle,ipoly)') @@ -16828,7 +16922,7 @@ subroutine filltab_edtype_m12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_soil_mstpot & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SOIL_MSTPOT_PY :-12:hist:dcyc' ) + ,'QMEAN_SOIL_MSTPOT_PY :-12:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Soil matric potential' & ,'[ m]','(nzg,ndcycle,ipoly)') @@ -16837,7 +16931,7 @@ subroutine filltab_edtype_m12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_soil_water & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SOIL_WATER_PY :-12:hist:dcyc' ) + ,'QMEAN_SOIL_WATER_PY :-12:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Soil water content' & ,'[ m3/m3]','(nzg,ndcycle,ipoly)') @@ -16846,7 +16940,7 @@ subroutine filltab_edtype_m12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_soil_temp & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SOIL_TEMP_PY :-12:hist:dcyc' ) + ,'QMEAN_SOIL_TEMP_PY :-12:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Soil temperature' & ,'[ K]','(nzg,ndcycle,ipoly)') @@ -16855,7 +16949,7 @@ subroutine filltab_edtype_m12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_soil_fliq & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SOIL_FLIQ_PY :-12:hist:dcyc' ) + ,'QMEAN_SOIL_FLIQ_PY :-12:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Soil liquid fraction' & ,'[ --]','(nzg,ndcycle,ipoly)') @@ -16864,7 +16958,7 @@ subroutine filltab_edtype_m12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_smoist_gg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SMOIST_GG_PY :-12:hist:dcyc' ) + ,'QMEAN_SMOIST_GG_PY :-12:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Soil water flux' & ,'[ kg/m2/s]','(nzg,ndcycle,ipoly)') @@ -16873,7 +16967,7 @@ subroutine filltab_edtype_m12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_transloss & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_TRANSLOSS_PY :-12:hist:dcyc' ) + ,'QMEAN_TRANSLOSS_PY :-12:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Water loss through transpiration' & ,'[ kg/m2/s]','(nzg,ndcycle,ipoly)') @@ -16882,7 +16976,7 @@ subroutine filltab_edtype_m12(cgrid,igr,init,var_len,var_len_global,max_ptrs,nva nvar = nvar+1 call vtable_edio_r(npts,cgrid%qmean_sensible_gg & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SENSIBLE_GG_PY :-12:hist:dcyc' ) + ,'QMEAN_SENSIBLE_GG_PY :-12:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Soil heat flux' & ,'[ W/m2]','(nzg,ndcycle,ipoly)') @@ -16959,15 +17053,28 @@ subroutine filltab_edtype_p146(cgrid,igr,init,var_len,var_len_global,max_ptrs,nv implicit none !----- Arguments. -------------------------------------------------------------------! - type(edtype), target :: cgrid - integer , intent(in) :: init - integer , intent(in) :: igr - integer , intent(in) :: var_len - integer , intent(in) :: max_ptrs - integer , intent(in) :: var_len_global - integer , intent(inout) :: nvar + type(edtype) , target :: cgrid + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar !----- Local variables. -------------------------------------------------------------! - integer :: npts + integer :: npts + character(len=str_len) :: eorq_keys + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + ! Decide whether to write monthly means to history or not. ! + !------------------------------------------------------------------------------------! + if (history_eorq) then + eorq_keys = 'hist:mont:dcyc' + else + eorq_keys = 'mont:dcyc' + end if !------------------------------------------------------------------------------------! @@ -17174,7 +17281,7 @@ subroutine filltab_edtype_p146(cgrid,igr,init,var_len,var_len_global,max_ptrs,nv nvar = nvar + 1 call vtable_edio_r(npts,cgrid%mmean_lai & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_LAI_PY :146:hist:mont:dcyc') + ,'MMEAN_LAI_PY :146:'//trim(eorq_keys)) call metadata_edio(nvar,igr,'Monthly mean - Leaf area index' & ,'[m2leaf/m2]','(n_pft,n_dbh,ipoly)') end if @@ -17182,7 +17289,7 @@ subroutine filltab_edtype_p146(cgrid,igr,init,var_len,var_len_global,max_ptrs,nv nvar = nvar + 1 call vtable_edio_r(npts,cgrid%mmean_bleaf & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_BLEAF_PY :146:hist:mont:dcyc') + ,'MMEAN_BLEAF_PY :146:'//trim(eorq_keys)) call metadata_edio(nvar,igr,'Monthly mean - Leaf biomass' & , '[kgC/m2]','(n_pft,n_dbh,ipoly)') end if @@ -17190,7 +17297,7 @@ subroutine filltab_edtype_p146(cgrid,igr,init,var_len,var_len_global,max_ptrs,nv nvar = nvar + 1 call vtable_edio_r(npts,cgrid%mmean_broot & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_BROOT_PY :146:hist:mont:dcyc') + ,'MMEAN_BROOT_PY :146:'//trim(eorq_keys)) call metadata_edio(nvar,igr,'Monthly mean - Root biomass' & , '[kgC/m2]','(n_pft,n_dbh,ipoly)') end if @@ -17198,7 +17305,7 @@ subroutine filltab_edtype_p146(cgrid,igr,init,var_len,var_len_global,max_ptrs,nv nvar = nvar + 1 call vtable_edio_r(npts,cgrid%mmean_bstorage & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_BSTORAGE_PY :146:hist:mont:dcyc') + ,'MMEAN_BSTORAGE_PY :146:'//trim(eorq_keys)) call metadata_edio(nvar,igr,'Monthly mean - Storage biomass' & , '[kgC/m2]','(n_pft,n_dbh,ipoly)') end if @@ -17206,7 +17313,7 @@ subroutine filltab_edtype_p146(cgrid,igr,init,var_len,var_len_global,max_ptrs,nv nvar = nvar + 1 call vtable_edio_r(npts,cgrid%mmean_bleaf_n & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_BLEAF_N_PY :146:hist:mont:dcyc') + ,'MMEAN_BLEAF_N_PY :146:'//trim(eorq_keys)) call metadata_edio(nvar,igr,'Monthly mean - Leaf nitrogen mass' & , '[kgN/m2]','(n_pft,n_dbh,ipoly)') end if @@ -17214,7 +17321,7 @@ subroutine filltab_edtype_p146(cgrid,igr,init,var_len,var_len_global,max_ptrs,nv nvar = nvar + 1 call vtable_edio_r(npts,cgrid%mmean_broot_n & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_BROOT_N_PY :146:hist:mont:dcyc') + ,'MMEAN_BROOT_N_PY :146:'//trim(eorq_keys)) call metadata_edio(nvar,igr,'Monthly mean - Root nitrogen mass' & , '[kgN/m2]','(n_pft,n_dbh,ipoly)') end if @@ -17222,7 +17329,7 @@ subroutine filltab_edtype_p146(cgrid,igr,init,var_len,var_len_global,max_ptrs,nv nvar = nvar + 1 call vtable_edio_r(npts,cgrid%mmean_bstorage_n & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_BSTORAGE_N_PY :146:hist:mont:dcyc') + ,'MMEAN_BSTORAGE_N_PY :146:'//trim(eorq_keys)) call metadata_edio(nvar,igr,'Monthly mean - Storage nitrogen mass' & , '[kgN/m2]','(n_pft,n_dbh,ipoly)') end if @@ -17230,7 +17337,7 @@ subroutine filltab_edtype_p146(cgrid,igr,init,var_len,var_len_global,max_ptrs,nv nvar = nvar + 1 call vtable_edio_r(npts,cgrid%mmean_leaf_maintenance & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_LEAF_MAINTENANCE_PY :146:hist:mont:dcyc') + ,'MMEAN_LEAF_MAINTENANCE_PY :146:'//trim(eorq_keys)) call metadata_edio(nvar,igr,'Monthly mean - Leaf maintenance rate' & , '[kgC/m2/yr]','(n_pft,n_dbh,ipoly)') end if @@ -17238,7 +17345,7 @@ subroutine filltab_edtype_p146(cgrid,igr,init,var_len,var_len_global,max_ptrs,nv nvar = nvar + 1 call vtable_edio_r(npts,cgrid%mmean_root_maintenance & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ROOT_MAINTENANCE_PY :146:hist:mont:dcyc') + ,'MMEAN_ROOT_MAINTENANCE_PY :146:'//trim(eorq_keys)) call metadata_edio(nvar,igr,'Monthly mean - Root maintenance rate' & , '[kgC/m2/yr]','(n_pft,n_dbh,ipoly)') end if @@ -17246,7 +17353,7 @@ subroutine filltab_edtype_p146(cgrid,igr,init,var_len,var_len_global,max_ptrs,nv nvar = nvar + 1 call vtable_edio_r(npts,cgrid%mmean_leaf_drop & ,nvar,igr,init,cgrid%pyglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_LEAF_DROP_PY :146:hist:mont:dcyc') + ,'MMEAN_LEAF_DROP_PY :146:'//trim(eorq_keys)) call metadata_edio(nvar,igr,'Monthly mean - Leaf drop' & , '[kgC/m2/yr]','(n_pft,n_dbh,ipoly)') end if @@ -17784,15 +17891,28 @@ subroutine filltab_polygontype_p21fmean(cpoly,igr,init,var_len,var_len_global,ma implicit none !----- Arguments. -------------------------------------------------------------------! - type(polygontype), target :: cpoly - integer , intent(in) :: init - integer , intent(in) :: igr - integer , intent(in) :: var_len - integer , intent(in) :: max_ptrs - integer , intent(in) :: var_len_global - integer , intent(inout) :: nvar + type(polygontype) , target :: cpoly + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar !----- Local variables. -------------------------------------------------------------! - integer :: npts + integer :: npts + character(len=str_len) :: fast_keys + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + ! Decide whether to write the sub-daily means to the history file. ! + !------------------------------------------------------------------------------------! + if (history_fast) then + fast_keys = 'hist:anal' + else + fast_keys = 'anal' + end if !------------------------------------------------------------------------------------! @@ -17810,7 +17930,7 @@ subroutine filltab_polygontype_p21fmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%fmean_atm_theiv & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_THEIV_SI :21:hist:anal' ) + ,'FMEAN_ATM_THEIV_SI :21:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Ice-vapour equiv. pot. temp.: Atmosphere' & ,'[ K]','(isite)' ) @@ -17819,7 +17939,7 @@ subroutine filltab_polygontype_p21fmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%fmean_atm_theta & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_THETA_SI :21:hist:anal' ) + ,'FMEAN_ATM_THETA_SI :21:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Potential temperature: Atmosphere' & ,'[ K]','(isite)' ) @@ -17828,7 +17948,7 @@ subroutine filltab_polygontype_p21fmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%fmean_atm_temp & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_TEMP_SI :21:hist:anal' ) + ,'FMEAN_ATM_TEMP_SI :21:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Temperature: Atmosphere' & ,'[ K]','(isite)' ) @@ -17837,7 +17957,7 @@ subroutine filltab_polygontype_p21fmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%fmean_atm_vpdef & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_VPDEF_SI :21:hist:anal' ) + ,'FMEAN_ATM_VPDEF_SI :21:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Vapour pressure deficit: Atmosphere' & ,'[ Pa]','(isite)' ) @@ -17846,7 +17966,7 @@ subroutine filltab_polygontype_p21fmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%fmean_atm_shv & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_SHV_SI :21:hist:anal' ) + ,'FMEAN_ATM_SHV_SI :21:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Specific humidity: Atmosphere' & ,'[ kg/kg]','(isite)' ) @@ -17855,7 +17975,7 @@ subroutine filltab_polygontype_p21fmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%fmean_atm_rshort & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_RSHORT_SI :21:hist:anal' ) + ,'FMEAN_ATM_RSHORT_SI :21:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Shortwave radiation: Atmosphere' & ,'[ W/m2]','(isite)' ) @@ -17864,7 +17984,7 @@ subroutine filltab_polygontype_p21fmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%fmean_atm_rshort_diff & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_RSHORT_DIFF_SI :21:hist:anal' ) + ,'FMEAN_ATM_RSHORT_DIFF_SI :21:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Diffuse SW radiation: Atmosphere' & ,'[ W/m2]','(isite)' ) @@ -17873,7 +17993,7 @@ subroutine filltab_polygontype_p21fmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%fmean_atm_par & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_PAR_SI :21:hist:anal' ) + ,'FMEAN_ATM_PAR_SI :21:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - PAR: Atmosphere' & ,'[ W/m2]','(isite)' ) @@ -17882,7 +18002,7 @@ subroutine filltab_polygontype_p21fmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%fmean_atm_par_diff & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_PAR_DIFF_SI :21:hist:anal' ) + ,'FMEAN_ATM_PAR_DIFF_SI :21:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Diffuse PAR: Atmosphere' & ,'[ W/m2]','(isite)' ) @@ -17891,7 +18011,7 @@ subroutine filltab_polygontype_p21fmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%fmean_atm_rlong & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_RLONG_SI :21:hist:anal' ) + ,'FMEAN_ATM_RLONG_SI :21:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Longwave radiation: Atmosphere' & ,'[ W/m2]','(isite)' ) @@ -17900,7 +18020,7 @@ subroutine filltab_polygontype_p21fmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%fmean_atm_vels & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_VELS_SI :21:hist:anal' ) + ,'FMEAN_ATM_VELS_SI :21:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Wind speed: atmosphere' & ,'[ m/s]','(isite)' ) @@ -17909,7 +18029,7 @@ subroutine filltab_polygontype_p21fmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%fmean_atm_rhos & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_RHOS_SI :21:hist:anal' ) + ,'FMEAN_ATM_RHOS_SI :21:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Air density: Atmosphere' & ,'[ kg/m3]','(isite)' ) @@ -17918,7 +18038,7 @@ subroutine filltab_polygontype_p21fmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%fmean_atm_prss & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_PRSS_SI :21:hist:anal' ) + ,'FMEAN_ATM_PRSS_SI :21:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Air pressure: Atmosphere' & ,'[ Pa]','(isite)' ) @@ -17927,7 +18047,7 @@ subroutine filltab_polygontype_p21fmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%fmean_atm_co2 & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ATM_CO2_SI :21:hist:anal' ) + ,'FMEAN_ATM_CO2_SI :21:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - CO2 mixing ratio: Atmosphere' & ,'[ umol/mol]','(isite)' ) @@ -17936,7 +18056,7 @@ subroutine filltab_polygontype_p21fmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%fmean_pcpg & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_PCPG_SI :21:hist:anal' ) + ,'FMEAN_PCPG_SI :21:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Precipitation rate' & ,'[ kg/m2/s]','(isite)' ) @@ -17945,7 +18065,7 @@ subroutine filltab_polygontype_p21fmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%fmean_qpcpg & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_QPCPG_SI :21:hist:anal' ) + ,'FMEAN_QPCPG_SI :21:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Energy gain - rain' & ,'[ W/m2]','(isite)' ) @@ -17954,7 +18074,7 @@ subroutine filltab_polygontype_p21fmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%fmean_dpcpg & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_DPCPG_SI :21:hist:anal' ) + ,'FMEAN_DPCPG_SI :21:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Precipitation depth' & ,'[ m]','(isite)' ) @@ -17984,19 +18104,31 @@ subroutine filltab_polygontype_p21dmean(cpoly,igr,init,var_len,var_len_global,ma implicit none !----- Arguments. -------------------------------------------------------------------! - type(polygontype), target :: cpoly - integer , intent(in) :: init - integer , intent(in) :: igr - integer , intent(in) :: var_len - integer , intent(in) :: max_ptrs - integer , intent(in) :: var_len_global - integer , intent(inout) :: nvar + type(polygontype) , target :: cpoly + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar !----- Local variables. -------------------------------------------------------------! - integer :: npts + integer :: npts + character(len=str_len) :: dail_keys !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + ! Decide whether to write the daily means to the history file. ! + !------------------------------------------------------------------------------------! + if (history_dail) then + dail_keys = 'hist:dail' + else + dail_keys = 'dail' + end if + !------------------------------------------------------------------------------------! + + !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! ! This part should have only 1-D vectors (nsites). Notice that they all use ! @@ -18009,7 +18141,7 @@ subroutine filltab_polygontype_p21dmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%dmean_atm_theiv & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_THEIV_SI :21:hist:dail' ) + ,'DMEAN_ATM_THEIV_SI :21:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Ice-vapour equiv. pot. temp.: Atmosphere' & ,'[ K]','(isite)' ) @@ -18018,7 +18150,7 @@ subroutine filltab_polygontype_p21dmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%dmean_atm_theta & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_THETA_SI :21:hist:dail' ) + ,'DMEAN_ATM_THETA_SI :21:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Potential temperature: Atmosphere' & ,'[ K]','(isite)' ) @@ -18027,7 +18159,7 @@ subroutine filltab_polygontype_p21dmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%dmean_atm_temp & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_TEMP_SI :21:hist:dail' ) + ,'DMEAN_ATM_TEMP_SI :21:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Temperature: Atmosphere' & ,'[ K]','(isite)' ) @@ -18036,7 +18168,7 @@ subroutine filltab_polygontype_p21dmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%dmean_atm_vpdef & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_VPDEF_SI :21:hist:dail' ) + ,'DMEAN_ATM_VPDEF_SI :21:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Vapour pressure deficit: Atmosphere' & ,'[ Pa]','(isite)' ) @@ -18045,7 +18177,7 @@ subroutine filltab_polygontype_p21dmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%dmean_atm_shv & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_SHV_SI :21:hist:dail' ) + ,'DMEAN_ATM_SHV_SI :21:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Specific humidity: Atmosphere' & ,'[ kg/kg]','(isite)' ) @@ -18054,7 +18186,7 @@ subroutine filltab_polygontype_p21dmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%dmean_atm_rshort & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_RSHORT_SI :21:hist:dail' ) + ,'DMEAN_ATM_RSHORT_SI :21:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Shortwave radiation: Atmosphere' & ,'[ W/m2]','(isite)' ) @@ -18063,7 +18195,7 @@ subroutine filltab_polygontype_p21dmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%dmean_atm_rshort_diff & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_RSHORT_DIFF_SI :21:hist:dail' ) + ,'DMEAN_ATM_RSHORT_DIFF_SI :21:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Diffuse SW radiation: Atmosphere' & ,'[ W/m2]','(isite)' ) @@ -18072,7 +18204,7 @@ subroutine filltab_polygontype_p21dmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%dmean_atm_par & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_PAR_SI :21:hist:dail' ) + ,'DMEAN_ATM_PAR_SI :21:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - PAR: Atmosphere' & ,'[ W/m2]','(isite)' ) @@ -18081,7 +18213,7 @@ subroutine filltab_polygontype_p21dmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%dmean_atm_par_diff & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_PAR_DIFF_SI :21:hist:dail' ) + ,'DMEAN_ATM_PAR_DIFF_SI :21:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Diffuse PAR: Atmosphere' & ,'[ W/m2]','(isite)' ) @@ -18090,7 +18222,7 @@ subroutine filltab_polygontype_p21dmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%dmean_atm_rlong & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_RLONG_SI :21:hist:dail' ) + ,'DMEAN_ATM_RLONG_SI :21:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Longwave radiation: Atmosphere' & ,'[ W/m2]','(isite)' ) @@ -18099,7 +18231,7 @@ subroutine filltab_polygontype_p21dmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%dmean_atm_vels & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_VELS_SI :21:hist:dail' ) + ,'DMEAN_ATM_VELS_SI :21:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Wind speed: atmosphere' & ,'[ m/s]','(isite)' ) @@ -18108,7 +18240,7 @@ subroutine filltab_polygontype_p21dmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%dmean_atm_rhos & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_RHOS_SI :21:hist:dail' ) + ,'DMEAN_ATM_RHOS_SI :21:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Air density: Atmosphere' & ,'[ kg/m3]','(isite)' ) @@ -18117,7 +18249,7 @@ subroutine filltab_polygontype_p21dmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%dmean_atm_prss & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_PRSS_SI :21:hist:dail' ) + ,'DMEAN_ATM_PRSS_SI :21:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Air pressure: Atmosphere' & ,'[ Pa]','(isite)' ) @@ -18126,7 +18258,7 @@ subroutine filltab_polygontype_p21dmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%dmean_atm_co2 & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ATM_CO2_SI :21:hist:dail' ) + ,'DMEAN_ATM_CO2_SI :21:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - CO2 mixing ratio: Atmosphere' & ,'[ umol/mol]','(isite)' ) @@ -18156,15 +18288,28 @@ subroutine filltab_polygontype_p21mmean(cpoly,igr,init,var_len,var_len_global,ma implicit none !----- Arguments. -------------------------------------------------------------------! - type(polygontype), target :: cpoly - integer , intent(in) :: init - integer , intent(in) :: igr - integer , intent(in) :: var_len - integer , intent(in) :: max_ptrs - integer , intent(in) :: var_len_global - integer , intent(inout) :: nvar + type(polygontype) , target :: cpoly + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar !----- Local variables. -------------------------------------------------------------! - integer :: npts + integer :: npts + character(len=str_len) :: eorq_keys + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + ! Decide whether to write the monthly means to the history file. ! + !------------------------------------------------------------------------------------! + if (history_eorq) then + eorq_keys = 'hist:mont:dcyc' + else + eorq_keys = 'mont:dcyc' + end if !------------------------------------------------------------------------------------! @@ -18181,7 +18326,7 @@ subroutine filltab_polygontype_p21mmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%mmean_atm_theiv & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_THEIV_SI :21:hist:mont:dcyc') + ,'MMEAN_ATM_THEIV_SI :21:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Ice-vapour equiv. pot. temp.: Atmosphere' & ,'[ K]','(isite)' ) @@ -18190,7 +18335,7 @@ subroutine filltab_polygontype_p21mmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%mmean_atm_theta & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_THETA_SI :21:hist:mont:dcyc') + ,'MMEAN_ATM_THETA_SI :21:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Potential temperature: Atmosphere' & ,'[ K]','(isite)' ) @@ -18199,7 +18344,7 @@ subroutine filltab_polygontype_p21mmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%mmean_atm_temp & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_TEMP_SI :21:hist:mont:dcyc') + ,'MMEAN_ATM_TEMP_SI :21:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Temperature: Atmosphere' & ,'[ K]','(isite)' ) @@ -18208,7 +18353,7 @@ subroutine filltab_polygontype_p21mmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%mmean_atm_vpdef & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_VPDEF_SI :21:hist:mont:dcyc') + ,'MMEAN_ATM_VPDEF_SI :21:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Vapour pressure deficit: Atmosphere' & ,'[ Pa]','(isite)' ) @@ -18217,7 +18362,7 @@ subroutine filltab_polygontype_p21mmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%mmean_atm_shv & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_SHV_SI :21:hist:mont:dcyc') + ,'MMEAN_ATM_SHV_SI :21:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Specific humidity: Atmosphere' & ,'[ kg/kg]','(isite)' ) @@ -18226,7 +18371,7 @@ subroutine filltab_polygontype_p21mmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%mmean_atm_rshort & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_RSHORT_SI :21:hist:mont:dcyc') + ,'MMEAN_ATM_RSHORT_SI :21:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Shortwave radiation: Atmosphere' & ,'[ W/m2]','(isite)' ) @@ -18235,7 +18380,7 @@ subroutine filltab_polygontype_p21mmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%mmean_atm_rshort_diff & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_RSHORT_DIFF_SI :21:hist:mont:dcyc') + ,'MMEAN_ATM_RSHORT_DIFF_SI :21:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Diffuse SW radiation: Atmosphere' & ,'[ W/m2]','(isite)' ) @@ -18244,7 +18389,7 @@ subroutine filltab_polygontype_p21mmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%mmean_atm_par & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_PAR_SI :21:hist:mont:dcyc') + ,'MMEAN_ATM_PAR_SI :21:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - PAR: Atmosphere' & ,'[ W/m2]','(isite)' ) @@ -18253,7 +18398,7 @@ subroutine filltab_polygontype_p21mmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%mmean_atm_par_diff & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_PAR_DIFF_SI :21:hist:mont:dcyc') + ,'MMEAN_ATM_PAR_DIFF_SI :21:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Diffuse PAR: Atmosphere' & ,'[ W/m2]','(isite)' ) @@ -18262,7 +18407,7 @@ subroutine filltab_polygontype_p21mmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%mmean_atm_rlong & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_RLONG_SI :21:hist:mont:dcyc') + ,'MMEAN_ATM_RLONG_SI :21:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Longwave radiation: Atmosphere' & ,'[ W/m2]','(isite)' ) @@ -18271,7 +18416,7 @@ subroutine filltab_polygontype_p21mmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%mmean_atm_vels & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_VELS_SI :21:hist:mont:dcyc') + ,'MMEAN_ATM_VELS_SI :21:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Wind speed: atmosphere' & ,'[ m/s]','(isite)' ) @@ -18280,7 +18425,7 @@ subroutine filltab_polygontype_p21mmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%mmean_atm_rhos & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_RHOS_SI :21:hist:mont:dcyc') + ,'MMEAN_ATM_RHOS_SI :21:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Air density: Atmosphere' & ,'[ kg/m3]','(isite)' ) @@ -18289,7 +18434,7 @@ subroutine filltab_polygontype_p21mmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%mmean_atm_prss & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_PRSS_SI :21:hist:mont:dcyc') + ,'MMEAN_ATM_PRSS_SI :21:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Air pressure: Atmosphere' & ,'[ Pa]','(isite)' ) @@ -18298,7 +18443,7 @@ subroutine filltab_polygontype_p21mmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%mmean_atm_co2 & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ATM_CO2_SI :21:hist:mont:dcyc') + ,'MMEAN_ATM_CO2_SI :21:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - CO2 mixing ratio: Atmosphere' & ,'[ umol/mol]','(isite)' ) @@ -18307,7 +18452,7 @@ subroutine filltab_polygontype_p21mmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%mmean_pcpg & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_PCPG_SI :21:hist:mont:dcyc') + ,'MMEAN_PCPG_SI :21:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Precipitation rate' & ,'[ kg/m2/s]','(isite)' ) @@ -18316,7 +18461,7 @@ subroutine filltab_polygontype_p21mmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%mmean_qpcpg & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_QPCPG_SI :21:hist:mont:dcyc') + ,'MMEAN_QPCPG_SI :21:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Energy gain - rain' & ,'[ W/m2]','(isite)' ) @@ -18325,7 +18470,7 @@ subroutine filltab_polygontype_p21mmean(cpoly,igr,init,var_len,var_len_global,ma nvar = nvar+1 call vtable_edio_r(npts,cpoly%mmean_dpcpg & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_DPCPG_SI :21:hist:mont:dcyc') + ,'MMEAN_DPCPG_SI :21:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Precipitation depth' & ,'[ m]','(isite)' ) @@ -18470,15 +18615,28 @@ subroutine filltab_polygontype_m21(cpoly,igr,init,var_len,var_len_global,max_ptr implicit none !----- Arguments. -------------------------------------------------------------------! - type(polygontype), target :: cpoly - integer , intent(in) :: init - integer , intent(in) :: igr - integer , intent(in) :: var_len - integer , intent(in) :: max_ptrs - integer , intent(in) :: var_len_global - integer , intent(inout) :: nvar + type(polygontype) , target :: cpoly + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar !----- Local variables. -------------------------------------------------------------! - integer :: npts + integer :: npts + character(len=str_len) :: eorq_keys + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + ! Decide whether to write the mean diel to the history file. ! + !------------------------------------------------------------------------------------! + if (history_eorq) then + eorq_keys = 'hist:dcyc' + else + eorq_keys = 'dcyc' + end if !------------------------------------------------------------------------------------! @@ -18496,7 +18654,7 @@ subroutine filltab_polygontype_m21(cpoly,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cpoly%qmean_atm_theiv & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_THEIV_SI :-21:hist:dcyc' ) + ,'QMEAN_ATM_THEIV_SI :-21:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Ice-vapour equiv. pot. temp.: Atmosphere' & ,'[ K]','(ndcycle,isite)' ) @@ -18505,7 +18663,7 @@ subroutine filltab_polygontype_m21(cpoly,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cpoly%qmean_atm_theta & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_THETA_SI :-21:hist:dcyc' ) + ,'QMEAN_ATM_THETA_SI :-21:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Potential temperature: Atmosphere' & ,'[ K]','(ndcycle,isite)' ) @@ -18514,7 +18672,7 @@ subroutine filltab_polygontype_m21(cpoly,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cpoly%qmean_atm_temp & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_TEMP_SI :-21:hist:dcyc' ) + ,'QMEAN_ATM_TEMP_SI :-21:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Temperature: Atmosphere' & ,'[ K]','(ndcycle,isite)' ) @@ -18523,7 +18681,7 @@ subroutine filltab_polygontype_m21(cpoly,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cpoly%qmean_atm_vpdef & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_VPDEF_SI :-21:hist:dcyc' ) + ,'QMEAN_ATM_VPDEF_SI :-21:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Vapour pressure deficit: Atmosphere' & ,'[ Pa]','(ndcycle,isite)' ) @@ -18532,7 +18690,7 @@ subroutine filltab_polygontype_m21(cpoly,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cpoly%qmean_atm_shv & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_SHV_SI :-21:hist:dcyc' ) + ,'QMEAN_ATM_SHV_SI :-21:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Specific humidity: Atmosphere' & ,'[ kg/kg]','(ndcycle,isite)' ) @@ -18541,7 +18699,7 @@ subroutine filltab_polygontype_m21(cpoly,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cpoly%qmean_atm_rshort & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_RSHORT_SI :-21:hist:dcyc' ) + ,'QMEAN_ATM_RSHORT_SI :-21:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Shortwave radiation: Atmosphere' & ,'[ W/m2]','(ndcycle,isite)' ) @@ -18550,7 +18708,7 @@ subroutine filltab_polygontype_m21(cpoly,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cpoly%qmean_atm_rshort_diff & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_RSHORT_DIFF_SI :-21:hist:dcyc' ) + ,'QMEAN_ATM_RSHORT_DIFF_SI :-21:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Diffuse SW radiation: Atmosphere' & ,'[ W/m2]','(ndcycle,isite)' ) @@ -18559,7 +18717,7 @@ subroutine filltab_polygontype_m21(cpoly,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cpoly%qmean_atm_par & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_PAR_SI :-21:hist:dcyc' ) + ,'QMEAN_ATM_PAR_SI :-21:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - PAR: Atmosphere' & ,'[ W/m2]','(ndcycle,isite)' ) @@ -18568,7 +18726,7 @@ subroutine filltab_polygontype_m21(cpoly,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cpoly%qmean_atm_par_diff & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_PAR_DIFF_SI :-21:hist:dcyc' ) + ,'QMEAN_ATM_PAR_DIFF_SI :-21:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Diffuse PAR: Atmosphere' & ,'[ W/m2]','(ndcycle,isite)' ) @@ -18577,7 +18735,7 @@ subroutine filltab_polygontype_m21(cpoly,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cpoly%qmean_atm_rlong & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_RLONG_SI :-21:hist:dcyc' ) + ,'QMEAN_ATM_RLONG_SI :-21:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Longwave radiation: Atmosphere' & ,'[ W/m2]','(ndcycle,isite)' ) @@ -18586,7 +18744,7 @@ subroutine filltab_polygontype_m21(cpoly,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cpoly%qmean_atm_vels & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_VELS_SI :-21:hist:dcyc' ) + ,'QMEAN_ATM_VELS_SI :-21:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Wind speed: atmosphere' & ,'[ m/s]','(ndcycle,isite)' ) @@ -18595,7 +18753,7 @@ subroutine filltab_polygontype_m21(cpoly,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cpoly%qmean_atm_rhos & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_RHOS_SI :-21:hist:dcyc' ) + ,'QMEAN_ATM_RHOS_SI :-21:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Air density: Atmosphere' & ,'[ kg/m3]','(ndcycle,isite)' ) @@ -18604,7 +18762,7 @@ subroutine filltab_polygontype_m21(cpoly,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cpoly%qmean_atm_prss & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_PRSS_SI :-21:hist:dcyc' ) + ,'QMEAN_ATM_PRSS_SI :-21:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Air pressure: Atmosphere' & ,'[ Pa]','(ndcycle,isite)' ) @@ -18613,7 +18771,7 @@ subroutine filltab_polygontype_m21(cpoly,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cpoly%qmean_atm_co2 & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ATM_CO2_SI :-21:hist:dcyc' ) + ,'QMEAN_ATM_CO2_SI :-21:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - CO2 mixing ratio: Atmosphere' & ,'[ umol/mol]','(ndcycle,isite)' ) @@ -18622,7 +18780,7 @@ subroutine filltab_polygontype_m21(cpoly,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cpoly%qmean_pcpg & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_PCPG_SI :-21:hist:dcyc' ) + ,'QMEAN_PCPG_SI :-21:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Precipitation rate' & ,'[ kg/m2/s]','(ndcycle,isite)' ) @@ -18631,7 +18789,7 @@ subroutine filltab_polygontype_m21(cpoly,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cpoly%qmean_qpcpg & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_QPCPG_SI :-21:hist:dcyc' ) + ,'QMEAN_QPCPG_SI :-21:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Energy gain - rain' & ,'[ W/m2]','(ndcycle,isite)' ) @@ -18640,7 +18798,7 @@ subroutine filltab_polygontype_m21(cpoly,igr,init,var_len,var_len_global,max_ptr nvar = nvar+1 call vtable_edio_r(npts,cpoly%qmean_dpcpg & ,nvar,igr,init,cpoly%siglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_DPCPG_SI :-21:hist:dcyc' ) + ,'QMEAN_DPCPG_SI :-21:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Precipitation depth' & ,'[ m]','(ndcycle,isite)' ) @@ -19925,15 +20083,28 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p implicit none !----- Arguments. -------------------------------------------------------------------! - type(sitetype), target :: csite - integer , intent(in) :: init - integer , intent(in) :: igr - integer , intent(in) :: var_len - integer , intent(in) :: max_ptrs - integer , intent(in) :: var_len_global - integer , intent(inout) :: nvar + type(sitetype) , target :: csite + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar !----- Local variables. -------------------------------------------------------------! - integer :: npts + integer :: npts + character(len=str_len) :: fast_keys + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + ! Decide whether to write the sub-daily means to the history file. ! + !------------------------------------------------------------------------------------! + if (history_fast) then + fast_keys = 'hist:anal' + else + fast_keys = 'anal' + end if !------------------------------------------------------------------------------------! @@ -19951,7 +20122,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_rh & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_RH_PA :31:hist:anal' ) + ,'FMEAN_RH_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Heterotrophic respiration' & ,'[ kg/m2/yr]','(ipatch)' ) @@ -19960,7 +20131,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_cwd_rh & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_CWD_RH_PA :31:hist:anal' ) + ,'FMEAN_CWD_RH_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Coarse woody debris respiration' & ,'[ kg/m2/yr]','(ipatch)' ) @@ -19969,7 +20140,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_nep & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_NEP_PA :31:hist:anal' ) + ,'FMEAN_NEP_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Net Ecosystem productivity' & ,'[ kg/m2/yr]','(ipatch)' ) @@ -19978,7 +20149,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_rk4step & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_RK4STEP_PA :31:hist:anal' ) + ,'FMEAN_RK4STEP_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - RK4 time step' & ,'[ s]','(ipatch)' ) @@ -19987,7 +20158,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_available_water & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_AVAILABLE_WATER_PA :31:hist:anal' ) + ,'FMEAN_AVAILABLE_WATER_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Available water' & ,'[ kg/m2]','(ipatch)' ) @@ -19996,7 +20167,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_can_theiv & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_CAN_THEIV_PA :31:hist:anal' ) + ,'FMEAN_CAN_THEIV_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Ice-vapour equiv. pot. temperature - CAS' & ,'[ K]','(ipatch)' ) @@ -20005,7 +20176,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_can_theta & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_CAN_THETA_PA :31:hist:anal' ) + ,'FMEAN_CAN_THETA_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Potential temperature - CAS' & ,'[ K]','(ipatch)' ) @@ -20014,7 +20185,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_can_vpdef & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_CAN_VPDEF_PA :31:hist:anal' ) + ,'FMEAN_CAN_VPDEF_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Vapour pressure deficit - CAS' & ,'[ Pa]','(ipatch)' ) @@ -20023,7 +20194,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_can_temp & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_CAN_TEMP_PA :31:hist:anal' ) + ,'FMEAN_CAN_TEMP_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Temperature - CAS' & ,'[ K]','(ipatch)' ) @@ -20032,7 +20203,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_can_shv & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_CAN_SHV_PA :31:hist:anal' ) + ,'FMEAN_CAN_SHV_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Specific humidity - CAS' & ,'[ kg/kg]','(ipatch)' ) @@ -20041,7 +20212,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_can_co2 & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_CAN_CO2_PA :31:hist:anal' ) + ,'FMEAN_CAN_CO2_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - CO2 mixing ratio - CAS' & ,'[ umol/mol]','(ipatch)' ) @@ -20050,7 +20221,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_can_rhos & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_CAN_RHOS_PA :31:hist:anal' ) + ,'FMEAN_CAN_RHOS_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Air density - CAS' & ,'[ kg/m3]','(ipatch)' ) @@ -20059,7 +20230,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_can_prss & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_CAN_PRSS_PA :31:hist:anal' ) + ,'FMEAN_CAN_PRSS_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Pressure - CAS' & ,'[ Pa]','(ipatch)' ) @@ -20068,7 +20239,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_gnd_temp & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_GND_TEMP_PA :31:hist:anal' ) + ,'FMEAN_GND_TEMP_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Ground temperature' & ,'[ K]','(ipatch)' ) @@ -20077,7 +20248,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_gnd_shv & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_GND_SHV_PA :31:hist:anal' ) + ,'FMEAN_GND_SHV_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Ground specific humidity' & ,'[ kg/kg]','(ipatch)' ) @@ -20086,7 +20257,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_can_ggnd & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_CAN_GGND_PA :31:hist:anal' ) + ,'FMEAN_CAN_GGND_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Net canopy conductance' & ,'[ m/2]','(ipatch)' ) @@ -20095,7 +20266,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_sfcw_depth & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SFCW_DEPTH_PA :31:hist:anal' ) + ,'FMEAN_SFCW_DEPTH_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Depth - temporary water layer' & ,'[ m]','(ipatch)' ) @@ -20104,7 +20275,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_sfcw_energy & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SFCW_ENERGY_PA :31:hist:anal' ) + ,'FMEAN_SFCW_ENERGY_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Internal energy - temporary water layer' & ,'[ J/kg]','(ipatch)' ) @@ -20113,7 +20284,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_sfcw_mass & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SFCW_MASS_PA :31:hist:anal' ) + ,'FMEAN_SFCW_MASS_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Water mass - temporary water layer' & ,'[ kg/m2]','(ipatch)' ) @@ -20122,7 +20293,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_sfcw_temp & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SFCW_TEMP_PA :31:hist:anal' ) + ,'FMEAN_SFCW_TEMP_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Temperature - temporary water layer' & ,'[ K]','(ipatch)' ) @@ -20131,7 +20302,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_sfcw_fliq & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SFCW_FLIQ_PA :31:hist:anal' ) + ,'FMEAN_SFCW_FLIQ_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Liquid fraction - temporary water layer' & ,'[ --]','(ipatch)' ) @@ -20140,7 +20311,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_rshort_gnd & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_RSHORT_GND_PA :31:hist:anal' ) + ,'FMEAN_RSHORT_GND_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Shortwave radiation absorbed by ground' & ,'[ W/m2]','(ipatch)' ) @@ -20149,7 +20320,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_par_gnd & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_PAR_GND_PA :31:hist:anal' ) + ,'FMEAN_PAR_GND_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - PAR absorbed by ground' & ,'[ W/m2]','(ipatch)' ) @@ -20158,7 +20329,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_rlong_gnd & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_RLONG_GND_PA :31:hist:anal' ) + ,'FMEAN_RLONG_GND_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Longwave radiation absorbed by ground' & ,'[ W/m2]','(ipatch)' ) @@ -20167,7 +20338,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_rlongup & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_RLONGUP_PA :31:hist:anal' ) + ,'FMEAN_RLONGUP_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Outgoing longwave radiation' & ,'[ W/m2]','(ipatch)' ) @@ -20176,7 +20347,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_parup & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_PARUP_PA :31:hist:anal' ) + ,'FMEAN_PARUP_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Outgoing PAR' & ,'[ W/m2]','(ipatch)' ) @@ -20185,7 +20356,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_nirup & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_NIRUP_PA :31:hist:anal' ) + ,'FMEAN_NIRUP_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Outgoing near infra-red radiation' & ,'[ W/m2]','(ipatch)' ) @@ -20194,7 +20365,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_rshortup & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_RSHORTUP_PA :31:hist:anal' ) + ,'FMEAN_RSHORTUP_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Outgoing shortwave radiation' & ,'[ W/m2]','(ipatch)' ) @@ -20203,7 +20374,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_rnet & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_RNET_PA :31:hist:anal' ) + ,'FMEAN_RNET_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Net radiation at top of canopy' & ,'[ W/m2]','(ipatch)' ) @@ -20212,7 +20383,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_albedo & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ALBEDO_PA :31:hist:anal' ) + ,'FMEAN_ALBEDO_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Albedo' & ,'[ ----]','(ipatch)' ) @@ -20221,7 +20392,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_albedo_beam & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ALBEDO_BEAM_PA :31:hist:anal' ) + ,'FMEAN_ALBEDO_BEAM_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Albedo - direct radiation' & ,'[ ----]','(ipatch)' ) @@ -20230,7 +20401,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_albedo_diff & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ALBEDO_DIFF_PA :31:hist:anal' ) + ,'FMEAN_ALBEDO_DIFF_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Albedo - diffuse radiation' & ,'[ ----]','(ipatch)' ) @@ -20239,7 +20410,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_rlong_albedo & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_RLONG_ALBEDO_PA :31:hist:anal' ) + ,'FMEAN_RLONG_ALBEDO_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Kind of albedo - longwave radiation' & ,'[ ----]','(ipatch)' ) @@ -20248,7 +20419,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_ustar & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_USTAR_PA :31:hist:anal' ) + ,'FMEAN_USTAR_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Friction velocity' & ,'[ m/s]','(ipatch)' ) @@ -20257,7 +20428,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_tstar & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_TSTAR_PA :31:hist:anal' ) + ,'FMEAN_TSTAR_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Gradient scale for potential temperature' & ,'[ K]','(ipatch)' ) @@ -20266,7 +20437,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_qstar & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_QSTAR_PA :31:hist:anal' ) + ,'FMEAN_QSTAR_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Gradient scale for specific humidity' & ,'[ kg/kg]','(ipatch)' ) @@ -20275,7 +20446,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_cstar & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_CSTAR_PA :31:hist:anal' ) + ,'FMEAN_CSTAR_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Gradient scale for CO2 mixing ratio' & ,'[ umol/mol]','(ipatch)' ) @@ -20284,7 +20455,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_carbon_ac & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_CARBON_AC_PA :31:hist:anal' ) + ,'FMEAN_CARBON_AC_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - CO2 flux: atmosphere -> CAS' & ,'[ umol/m2/s]','(ipatch)' ) @@ -20293,7 +20464,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_carbon_st & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_CARBON_ST_PA :31:hist:anal' ) + ,'FMEAN_CARBON_ST_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - CO2 storage at CAS' & ,'[ umol/m2/s]','(ipatch)' ) @@ -20302,7 +20473,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_vapor_gc & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_VAPOR_GC_PA :31:hist:anal' ) + ,'FMEAN_VAPOR_GC_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Water vapour flux: ground -> CAS' & ,'[ kg/m2/s]','(ipatch)' ) @@ -20311,7 +20482,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_vapor_ac & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_VAPOR_AC_PA :31:hist:anal' ) + ,'FMEAN_VAPOR_AC_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Water vapour flux: atmosphere -> CAS' & ,'[ kg/m2/s]','(ipatch)' ) @@ -20320,7 +20491,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_throughfall & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_THROUGHFALL_PA :31:hist:anal' ) + ,'FMEAN_THROUGHFALL_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Throughfall rate' & ,'[ kg/m2/s]','(ipatch)' ) @@ -20329,7 +20500,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_runoff & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_RUNOFF_PA :31:hist:anal' ) + ,'FMEAN_RUNOFF_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Water runoff' & ,'[ kg/m2/s]','(ipatch)' ) @@ -20338,7 +20509,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_drainage & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_DRAINAGE_PA :31:hist:anal' ) + ,'FMEAN_DRAINAGE_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Water drainage' & ,'[ kg/m2/s]','(ipatch)' ) @@ -20347,7 +20518,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_sensible_gc & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SENSIBLE_GC_PA :31:hist:anal' ) + ,'FMEAN_SENSIBLE_GC_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Sensible heat flux: ground -> CAS' & ,'[ W/m2]','(ipatch)' ) @@ -20356,7 +20527,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_sensible_ac & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SENSIBLE_AC_PA :31:hist:anal' ) + ,'FMEAN_SENSIBLE_AC_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Sensible heat flux: atmosphere -> CAS' & ,'[ W/m2]','(ipatch)' ) @@ -20365,7 +20536,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_qthroughfall & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_QTHROUGHFALL_PA :31:hist:anal' ) + ,'FMEAN_QTHROUGHFALL_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Throughfall rate' & ,'[ W/m2]','(ipatch)' ) @@ -20374,7 +20545,7 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_qrunoff & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_QRUNOFF_PA :31:hist:anal' ) + ,'FMEAN_QRUNOFF_PA :31:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Surface runoff' & ,'[ W/m2]','(ipatch)' ) @@ -20402,15 +20573,28 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p implicit none !----- Arguments. -------------------------------------------------------------------! - type(sitetype), target :: csite - integer , intent(in) :: init - integer , intent(in) :: igr - integer , intent(in) :: var_len - integer , intent(in) :: max_ptrs - integer , intent(in) :: var_len_global - integer , intent(inout) :: nvar + type(sitetype) , target :: csite + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar !----- Local variables. -------------------------------------------------------------! - integer :: npts + integer :: npts + character(len=str_len) :: dail_keys + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + ! Decide whether to write the daily means to the history file. ! + !------------------------------------------------------------------------------------! + if (history_dail) then + dail_keys = 'hist:dail' + else + dail_keys = 'dail' + end if !------------------------------------------------------------------------------------! @@ -20428,7 +20612,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_A_decomp & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_A_DECOMP_PA :31:hist:dail' ) + ,'DMEAN_A_DECOMP_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Decomposition scale' & ,'[ --]','(ipatch)' ) @@ -20437,7 +20621,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_Af_decomp & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_AF_DECOMP_PA :31:hist:dail' ) + ,'DMEAN_AF_DECOMP_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Decomposition scale with N immobilisation' & ,'[ --]','(ipatch)' ) @@ -20446,7 +20630,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_co2_residual & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CO2_RESIDUAL_PA :31:hist:dail' ) + ,'DMEAN_CO2_RESIDUAL_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Budget check - CO2 residual' & ,'[ umol/m2]','(ipatch)' ) @@ -20455,7 +20639,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_energy_residual & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ENERGY_RESIDUAL_PA :31:hist:dail' ) + ,'DMEAN_ENERGY_RESIDUAL_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Budget check - Enthalpy residual' & ,'[ J/m2]','(ipatch)' ) @@ -20464,7 +20648,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_water_residual & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_WATER_RESIDUAL_PA :31:hist:dail' ) + ,'DMEAN_WATER_RESIDUAL_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Budget check - Water residual' & ,'[ kg/m2]','(ipatch)' ) @@ -20474,7 +20658,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_rh & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RH_PA :31:hist:dail' ) + ,'DMEAN_RH_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Heterotrophic respiration' & ,'[ kg/m2/yr]','(ipatch)' ) @@ -20483,7 +20667,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_cwd_rh & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CWD_RH_PA :31:hist:dail' ) + ,'DMEAN_CWD_RH_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Coarse woody debris respiration' & ,'[ kg/m2/yr]','(ipatch)' ) @@ -20492,7 +20676,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_nep & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_NEP_PA :31:hist:dail' ) + ,'DMEAN_NEP_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Net Ecosystem productivity' & ,'[ kg/m2/yr]','(ipatch)' ) @@ -20501,7 +20685,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_rk4step & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RK4STEP_PA :31:hist:dail' ) + ,'DMEAN_RK4STEP_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - RK4 time step' & ,'[ s]','(ipatch)' ) @@ -20510,7 +20694,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_available_water & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_AVAILABLE_WATER_PA :31:hist:dail' ) + ,'DMEAN_AVAILABLE_WATER_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Available water' & ,'[ kg/m2]','(ipatch)' ) @@ -20519,7 +20703,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_can_theiv & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CAN_THEIV_PA :31:hist:dail' ) + ,'DMEAN_CAN_THEIV_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Ice-vapour equiv. pot. temperature - CAS' & ,'[ K]','(ipatch)' ) @@ -20528,7 +20712,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_can_theta & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CAN_THETA_PA :31:hist:dail' ) + ,'DMEAN_CAN_THETA_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Potential temperature - CAS' & ,'[ K]','(ipatch)' ) @@ -20537,7 +20721,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_can_vpdef & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CAN_VPDEF_PA :31:hist:dail' ) + ,'DMEAN_CAN_VPDEF_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Vapour pressure deficit - CAS' & ,'[ Pa]','(ipatch)' ) @@ -20546,7 +20730,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_can_temp & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CAN_TEMP_PA :31:hist:dail' ) + ,'DMEAN_CAN_TEMP_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Temperature - CAS' & ,'[ K]','(ipatch)' ) @@ -20555,7 +20739,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_can_shv & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CAN_SHV_PA :31:hist:dail' ) + ,'DMEAN_CAN_SHV_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Specific humidity - CAS' & ,'[ kg/kg]','(ipatch)' ) @@ -20564,7 +20748,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_can_co2 & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CAN_CO2_PA :31:hist:dail' ) + ,'DMEAN_CAN_CO2_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - CO2 mixing ratio - CAS' & ,'[ umol/mol]','(ipatch)' ) @@ -20573,7 +20757,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_can_rhos & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CAN_RHOS_PA :31:hist:dail' ) + ,'DMEAN_CAN_RHOS_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Air density - CAS' & ,'[ kg/m3]','(ipatch)' ) @@ -20582,7 +20766,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_can_prss & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CAN_PRSS_PA :31:hist:dail' ) + ,'DMEAN_CAN_PRSS_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Pressure - CAS' & ,'[ Pa]','(ipatch)' ) @@ -20591,7 +20775,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_gnd_temp & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_GND_TEMP_PA :31:hist:dail' ) + ,'DMEAN_GND_TEMP_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Ground temperature' & ,'[ K]','(ipatch)' ) @@ -20600,7 +20784,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_gnd_shv & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_GND_SHV_PA :31:hist:dail' ) + ,'DMEAN_GND_SHV_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Ground specific humidity' & ,'[ kg/kg]','(ipatch)' ) @@ -20609,7 +20793,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_can_ggnd & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CAN_GGND_PA :31:hist:dail' ) + ,'DMEAN_CAN_GGND_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Net canopy conductance' & ,'[ m/2]','(ipatch)' ) @@ -20618,7 +20802,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_sfcw_depth & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SFCW_DEPTH_PA :31:hist:dail' ) + ,'DMEAN_SFCW_DEPTH_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Depth - temporary water layer' & ,'[ m]','(ipatch)' ) @@ -20627,7 +20811,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_sfcw_energy & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SFCW_ENERGY_PA :31:hist:dail' ) + ,'DMEAN_SFCW_ENERGY_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Internal energy - temporary water layer' & ,'[ J/kg]','(ipatch)' ) @@ -20636,7 +20820,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_sfcw_mass & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SFCW_MASS_PA :31:hist:dail' ) + ,'DMEAN_SFCW_MASS_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Water mass - temporary water layer' & ,'[ kg/m2]','(ipatch)' ) @@ -20645,7 +20829,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_sfcw_temp & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SFCW_TEMP_PA :31:hist:dail' ) + ,'DMEAN_SFCW_TEMP_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Temperature - temporary water layer' & ,'[ K]','(ipatch)' ) @@ -20654,7 +20838,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_sfcw_fliq & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SFCW_FLIQ_PA :31:hist:dail' ) + ,'DMEAN_SFCW_FLIQ_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Liquid fraction - temporary water layer' & ,'[ --]','(ipatch)' ) @@ -20663,7 +20847,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_rshort_gnd & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RSHORT_GND_PA :31:hist:dail' ) + ,'DMEAN_RSHORT_GND_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Shortwave radiation absorbed by ground' & ,'[ W/m2]','(ipatch)' ) @@ -20672,7 +20856,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_par_gnd & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_PAR_GND_PA :31:hist:dail' ) + ,'DMEAN_PAR_GND_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - PAR absorbed by ground' & ,'[ W/m2]','(ipatch)' ) @@ -20681,7 +20865,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_rlong_gnd & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RLONG_GND_PA :31:hist:dail' ) + ,'DMEAN_RLONG_GND_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Longwave radiation absorbed by ground' & ,'[ W/m2]','(ipatch)' ) @@ -20690,7 +20874,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_rlongup & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RLONGUP_PA :31:hist:dail' ) + ,'DMEAN_RLONGUP_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Outgoing longwave radiation' & ,'[ W/m2]','(ipatch)' ) @@ -20699,7 +20883,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_parup & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_PARUP_PA :31:hist:dail' ) + ,'DMEAN_PARUP_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Outgoing PAR' & ,'[ W/m2]','(ipatch)' ) @@ -20708,7 +20892,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_nirup & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_NIRUP_PA :31:hist:dail' ) + ,'DMEAN_NIRUP_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Outgoing near infra-red radiation' & ,'[ W/m2]','(ipatch)' ) @@ -20717,7 +20901,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_rshortup & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RSHORTUP_PA :31:hist:dail' ) + ,'DMEAN_RSHORTUP_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Outgoing shortwave radiation' & ,'[ W/m2]','(ipatch)' ) @@ -20726,7 +20910,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_rnet & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RNET_PA :31:hist:dail' ) + ,'DMEAN_RNET_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Net radiation at top of canopy' & ,'[ W/m2]','(ipatch)' ) @@ -20735,7 +20919,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_albedo & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ALBEDO_PA :31:hist:dail' ) + ,'DMEAN_ALBEDO_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Albedo' & ,'[ ----]','(ipatch)' ) @@ -20744,7 +20928,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_albedo_beam & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ALBEDO_BEAM_PA :31:hist:dail' ) + ,'DMEAN_ALBEDO_BEAM_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Albedo - direct radiation' & ,'[ ----]','(ipatch)' ) @@ -20753,7 +20937,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_albedo_diff & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ALBEDO_DIFF_PA :31:hist:dail' ) + ,'DMEAN_ALBEDO_DIFF_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Albedo - diffuse radiation' & ,'[ ----]','(ipatch)' ) @@ -20762,7 +20946,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_rlong_albedo & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RLONG_ALBEDO_PA :31:hist:dail' ) + ,'DMEAN_RLONG_ALBEDO_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Kind of albedo - longwave radiation' & ,'[ ----]','(ipatch)' ) @@ -20771,7 +20955,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_ustar & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_USTAR_PA :31:hist:dail' ) + ,'DMEAN_USTAR_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Friction velocity' & ,'[ m/s]','(ipatch)' ) @@ -20780,7 +20964,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_tstar & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_TSTAR_PA :31:hist:dail' ) + ,'DMEAN_TSTAR_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Gradient scale for potential temperature' & ,'[ K]','(ipatch)' ) @@ -20789,7 +20973,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_qstar & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_QSTAR_PA :31:hist:dail' ) + ,'DMEAN_QSTAR_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Gradient scale for specific humidity' & ,'[ kg/kg]','(ipatch)' ) @@ -20798,7 +20982,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_cstar & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CSTAR_PA :31:hist:dail' ) + ,'DMEAN_CSTAR_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Gradient scale for CO2 mixing ratio' & ,'[ umol/mol]','(ipatch)' ) @@ -20807,7 +20991,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_carbon_ac & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CARBON_AC_PA :31:hist:dail' ) + ,'DMEAN_CARBON_AC_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - CO2 flux: atmosphere -> CAS' & ,'[ umol/m2/s]','(ipatch)' ) @@ -20816,7 +21000,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_carbon_st & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_CARBON_ST_PA :31:hist:dail' ) + ,'DMEAN_CARBON_ST_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - CO2 storage at CAS' & ,'[ umol/m2/s]','(ipatch)' ) @@ -20825,7 +21009,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_vapor_gc & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_VAPOR_GC_PA :31:hist:dail' ) + ,'DMEAN_VAPOR_GC_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Water vapour flux: ground -> CAS' & ,'[ kg/m2/s]','(ipatch)' ) @@ -20834,7 +21018,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_vapor_ac & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_VAPOR_AC_PA :31:hist:dail' ) + ,'DMEAN_VAPOR_AC_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Water vapour flux: atmosphere -> CAS' & ,'[ kg/m2/s]','(ipatch)' ) @@ -20843,7 +21027,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_throughfall & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_THROUGHFALL_PA :31:hist:dail' ) + ,'DMEAN_THROUGHFALL_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Throughfall rate' & ,'[ kg/m2/s]','(ipatch)' ) @@ -20852,7 +21036,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_runoff & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RUNOFF_PA :31:hist:dail' ) + ,'DMEAN_RUNOFF_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Water runoff' & ,'[ kg/m2/s]','(ipatch)' ) @@ -20861,7 +21045,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_drainage & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_DRAINAGE_PA :31:hist:dail' ) + ,'DMEAN_DRAINAGE_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Water drainage' & ,'[ kg/m2/s]','(ipatch)' ) @@ -20870,7 +21054,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_sensible_gc & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SENSIBLE_GC_PA :31:hist:dail' ) + ,'DMEAN_SENSIBLE_GC_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Sensible heat flux: ground -> CAS' & ,'[ W/m2]','(ipatch)' ) @@ -20879,7 +21063,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_sensible_ac & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SENSIBLE_AC_PA :31:hist:dail' ) + ,'DMEAN_SENSIBLE_AC_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Sensible heat flux: atmosphere -> CAS' & ,'[ W/m2]','(ipatch)' ) @@ -20888,7 +21072,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_qthroughfall & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_QTHROUGHFALL_PA :31:hist:dail' ) + ,'DMEAN_QTHROUGHFALL_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Throughfall rate' & ,'[ W/m2]','(ipatch)' ) @@ -20897,7 +21081,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_qrunoff & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_QRUNOFF_PA :31:hist:dail' ) + ,'DMEAN_QRUNOFF_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Surface runoff' & ,'[ W/m2]','(ipatch)' ) @@ -20906,7 +21090,7 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_qdrainage & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_QDRAINAGE_PA :31:hist:dail' ) + ,'DMEAN_QDRAINAGE_PA :31:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Drainage energy loss' & ,'[ W/m2]','(ipatch)' ) @@ -20935,15 +21119,28 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p implicit none !----- Arguments. -------------------------------------------------------------------! - type(sitetype), target :: csite - integer , intent(in) :: init - integer , intent(in) :: igr - integer , intent(in) :: var_len - integer , intent(in) :: max_ptrs - integer , intent(in) :: var_len_global - integer , intent(inout) :: nvar + type(sitetype) , target :: csite + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar !----- Local variables. -------------------------------------------------------------! - integer :: npts + integer :: npts + character(len=str_len) :: eorq_keys + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + ! Decide whether to write the monthly means to the history file. ! + !------------------------------------------------------------------------------------! + if (history_eorq) then + eorq_keys = 'hist:mont:dcyc' + else + eorq_keys = 'mont:dcyc' + end if !------------------------------------------------------------------------------------! @@ -20960,7 +21157,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_rh & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RH_PA :31:hist:mont:dcyc') + ,'MMEAN_RH_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Heterotrophic respiration' & ,'[ kg/m2/yr]','(ipatch)' ) @@ -20969,7 +21166,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_cwd_rh & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CWD_RH_PA :31:hist:mont:dcyc') + ,'MMEAN_CWD_RH_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Coarse woody debris respiration' & ,'[ kg/m2/yr]','(ipatch)' ) @@ -20978,7 +21175,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_nep & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_NEP_PA :31:hist:mont:dcyc') + ,'MMEAN_NEP_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Net Ecosystem productivity' & ,'[ kg/m2/yr]','(ipatch)' ) @@ -20987,7 +21184,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_rk4step & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RK4STEP_PA :31:hist:mont:dcyc') + ,'MMEAN_RK4STEP_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - RK4 time step' & ,'[ s]','(ipatch)' ) @@ -20996,7 +21193,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_available_water & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_AVAILABLE_WATER_PA :31:hist:mont:dcyc') + ,'MMEAN_AVAILABLE_WATER_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Available water' & ,'[ kg/m2]','(ipatch)' ) @@ -21005,7 +21202,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_can_theiv & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CAN_THEIV_PA :31:hist:mont:dcyc') + ,'MMEAN_CAN_THEIV_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Ice-vapour equiv. pot. temperature - CAS' & ,'[ K]','(ipatch)' ) @@ -21014,7 +21211,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_can_theta & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CAN_THETA_PA :31:hist:mont:dcyc') + ,'MMEAN_CAN_THETA_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Potential temperature - CAS' & ,'[ K]','(ipatch)' ) @@ -21023,7 +21220,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_can_vpdef & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CAN_VPDEF_PA :31:hist:mont:dcyc') + ,'MMEAN_CAN_VPDEF_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Vapour pressure deficit - CAS' & ,'[ Pa]','(ipatch)' ) @@ -21032,7 +21229,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_can_temp & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CAN_TEMP_PA :31:hist:mont:dcyc') + ,'MMEAN_CAN_TEMP_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Temperature - CAS' & ,'[ K]','(ipatch)' ) @@ -21041,7 +21238,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_can_shv & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CAN_SHV_PA :31:hist:mont:dcyc') + ,'MMEAN_CAN_SHV_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Specific humidity - CAS' & ,'[ kg/kg]','(ipatch)' ) @@ -21050,7 +21247,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_can_co2 & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CAN_CO2_PA :31:hist:mont:dcyc') + ,'MMEAN_CAN_CO2_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - CO2 mixing ratio - CAS' & ,'[ umol/mol]','(ipatch)' ) @@ -21059,7 +21256,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_can_rhos & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CAN_RHOS_PA :31:hist:mont:dcyc') + ,'MMEAN_CAN_RHOS_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Air density - CAS' & ,'[ kg/m3]','(ipatch)' ) @@ -21068,7 +21265,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_can_prss & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CAN_PRSS_PA :31:hist:mont:dcyc') + ,'MMEAN_CAN_PRSS_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Pressure - CAS' & ,'[ Pa]','(ipatch)' ) @@ -21077,7 +21274,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_gnd_temp & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_GND_TEMP_PA :31:hist:mont:dcyc') + ,'MMEAN_GND_TEMP_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Ground temperature' & ,'[ K]','(ipatch)' ) @@ -21086,7 +21283,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_gnd_shv & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_GND_SHV_PA :31:hist:mont:dcyc') + ,'MMEAN_GND_SHV_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Ground specific humidity' & ,'[ kg/kg]','(ipatch)' ) @@ -21095,7 +21292,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_can_ggnd & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CAN_GGND_PA :31:hist:mont:dcyc') + ,'MMEAN_CAN_GGND_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Net canopy conductance' & ,'[ m/2]','(ipatch)' ) @@ -21104,7 +21301,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_sfcw_depth & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SFCW_DEPTH_PA :31:hist:mont:dcyc') + ,'MMEAN_SFCW_DEPTH_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Depth - temporary water layer' & ,'[ m]','(ipatch)' ) @@ -21113,7 +21310,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_sfcw_energy & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SFCW_ENERGY_PA :31:hist:mont:dcyc') + ,'MMEAN_SFCW_ENERGY_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Internal energy - temporary water layer' & ,'[ J/kg]','(ipatch)' ) @@ -21122,7 +21319,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_sfcw_mass & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SFCW_MASS_PA :31:hist:mont:dcyc') + ,'MMEAN_SFCW_MASS_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Water mass - temporary water layer' & ,'[ kg/m2]','(ipatch)' ) @@ -21131,7 +21328,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_sfcw_temp & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SFCW_TEMP_PA :31:hist:mont:dcyc') + ,'MMEAN_SFCW_TEMP_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Temperature - temporary water layer' & ,'[ K]','(ipatch)' ) @@ -21140,7 +21337,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_sfcw_fliq & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SFCW_FLIQ_PA :31:hist:mont:dcyc') + ,'MMEAN_SFCW_FLIQ_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Liquid fraction - temporary water layer' & ,'[ --]','(ipatch)' ) @@ -21149,7 +21346,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_rshort_gnd & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RSHORT_GND_PA :31:hist:mont:dcyc') + ,'MMEAN_RSHORT_GND_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Shortwave radiation absorbed by ground' & ,'[ W/m2]','(ipatch)' ) @@ -21158,7 +21355,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_par_gnd & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_PAR_GND_PA :31:hist:mont:dcyc') + ,'MMEAN_PAR_GND_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - PAR absorbed by ground' & ,'[ W/m2]','(ipatch)' ) @@ -21167,7 +21364,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_rlong_gnd & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RLONG_GND_PA :31:hist:mont:dcyc') + ,'MMEAN_RLONG_GND_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Longwave radiation absorbed by ground' & ,'[ W/m2]','(ipatch)' ) @@ -21176,7 +21373,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_rlongup & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RLONGUP_PA :31:hist:mont:dcyc') + ,'MMEAN_RLONGUP_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Outgoing longwave radiation' & ,'[ W/m2]','(ipatch)' ) @@ -21185,7 +21382,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_parup & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_PARUP_PA :31:hist:mont:dcyc') + ,'MMEAN_PARUP_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Outgoing PAR' & ,'[ W/m2]','(ipatch)' ) @@ -21194,7 +21391,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_nirup & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_NIRUP_PA :31:hist:mont:dcyc') + ,'MMEAN_NIRUP_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Outgoing near infra-red radiation' & ,'[ W/m2]','(ipatch)' ) @@ -21203,7 +21400,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_rshortup & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RSHORTUP_PA :31:hist:mont:dcyc') + ,'MMEAN_RSHORTUP_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Outgoing shortwave radiation' & ,'[ W/m2]','(ipatch)' ) @@ -21212,7 +21409,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_rnet & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RNET_PA :31:hist:mont:dcyc') + ,'MMEAN_RNET_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Net radiation at top of canopy' & ,'[ W/m2]','(ipatch)' ) @@ -21221,7 +21418,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_albedo & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ALBEDO_PA :31:hist:mont:dcyc') + ,'MMEAN_ALBEDO_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Albedo' & ,'[ ----]','(ipatch)' ) @@ -21230,7 +21427,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_albedo_beam & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ALBEDO_BEAM_PA :31:hist:mont:dcyc') + ,'MMEAN_ALBEDO_BEAM_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Albedo - direct radiation' & ,'[ ----]','(ipatch)' ) @@ -21239,7 +21436,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_albedo_diff & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ALBEDO_DIFF_PA :31:hist:mont:dcyc') + ,'MMEAN_ALBEDO_DIFF_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Albedo - diffuse radiation' & ,'[ ----]','(ipatch)' ) @@ -21248,7 +21445,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_rlong_albedo & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RLONG_ALBEDO_PA :31:hist:mont:dcyc') + ,'MMEAN_RLONG_ALBEDO_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Kind of albedo - longwave radiation' & ,'[ ----]','(ipatch)' ) @@ -21257,7 +21454,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_ustar & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_USTAR_PA :31:hist:mont:dcyc') + ,'MMEAN_USTAR_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Friction velocity' & ,'[ m/s]','(ipatch)' ) @@ -21266,7 +21463,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_tstar & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_TSTAR_PA :31:hist:mont:dcyc') + ,'MMEAN_TSTAR_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Gradient scale for potential temperature' & ,'[ K]','(ipatch)' ) @@ -21275,7 +21472,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_qstar & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_QSTAR_PA :31:hist:mont:dcyc') + ,'MMEAN_QSTAR_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Gradient scale for specific humidity' & ,'[ kg/kg]','(ipatch)' ) @@ -21284,7 +21481,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_cstar & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CSTAR_PA :31:hist:mont:dcyc') + ,'MMEAN_CSTAR_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Gradient scale for CO2 mixing ratio' & ,'[ umol/mol]','(ipatch)' ) @@ -21293,7 +21490,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_carbon_ac & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CARBON_AC_PA :31:hist:mont:dcyc') + ,'MMEAN_CARBON_AC_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - CO2 flux: atmosphere -> CAS' & ,'[ umol/m2/s]','(ipatch)' ) @@ -21302,7 +21499,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_carbon_st & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CARBON_ST_PA :31:hist:mont:dcyc') + ,'MMEAN_CARBON_ST_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - CO2 storage at CAS' & ,'[ umol/m2/s]','(ipatch)' ) @@ -21311,7 +21508,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_vapor_gc & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_VAPOR_GC_PA :31:hist:mont:dcyc') + ,'MMEAN_VAPOR_GC_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Water vapour flux: ground -> CAS' & ,'[ kg/m2/s]','(ipatch)' ) @@ -21320,7 +21517,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_vapor_ac & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_VAPOR_AC_PA :31:hist:mont:dcyc') + ,'MMEAN_VAPOR_AC_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Water vapour flux: atmosphere -> CAS' & ,'[ kg/m2/s]','(ipatch)' ) @@ -21329,7 +21526,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_throughfall & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_THROUGHFALL_PA :31:hist:mont:dcyc') + ,'MMEAN_THROUGHFALL_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Throughfall rate' & ,'[ kg/m2/s]','(ipatch)' ) @@ -21338,7 +21535,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_runoff & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RUNOFF_PA :31:hist:mont:dcyc') + ,'MMEAN_RUNOFF_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Water runoff' & ,'[ kg/m2/s]','(ipatch)' ) @@ -21347,7 +21544,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_drainage & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_DRAINAGE_PA :31:hist:mont:dcyc') + ,'MMEAN_DRAINAGE_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Water drainage' & ,'[ kg/m2/s]','(ipatch)' ) @@ -21356,7 +21553,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_sensible_gc & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SENSIBLE_GC_PA :31:hist:mont:dcyc') + ,'MMEAN_SENSIBLE_GC_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Sensible heat flux: ground -> CAS' & ,'[ W/m2]','(ipatch)' ) @@ -21365,7 +21562,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_sensible_ac & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SENSIBLE_AC_PA :31:hist:mont:dcyc') + ,'MMEAN_SENSIBLE_AC_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Sensible heat flux: atmosphere -> CAS' & ,'[ W/m2]','(ipatch)' ) @@ -21374,7 +21571,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_qthroughfall & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_QTHROUGHFALL_PA :31:hist:mont:dcyc') + ,'MMEAN_QTHROUGHFALL_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Throughfall rate' & ,'[ W/m2]','(ipatch)' ) @@ -21383,7 +21580,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_qrunoff & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_QRUNOFF_PA :31:hist:mont:dcyc') + ,'MMEAN_QRUNOFF_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Surface runoff' & ,'[ W/m2]','(ipatch)' ) @@ -21392,7 +21589,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_qdrainage & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_QDRAINAGE_PA :31:hist:mont:dcyc') + ,'MMEAN_QDRAINAGE_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Drainage energy loss' & ,'[ W/m2]','(ipatch)' ) @@ -21401,7 +21598,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_fast_soil_c & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_FAST_SOIL_C :31:hist:mont:dcyc') + ,'MMEAN_FAST_SOIL_C :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Soil Carbon (Fast pool)' & ,'[ kgC/m2]','(ipatch)' ) @@ -21410,7 +21607,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_slow_soil_c & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SLOW_SOIL_C :31:hist:mont:dcyc') + ,'MMEAN_SLOW_SOIL_C :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Soil Carbon (Slow pool)' & ,'[ kgC/m2]','(ipatch)' ) @@ -21419,7 +21616,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_struct_soil_c & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_STRUCT_SOIL_C :31:hist:mont:dcyc') + ,'MMEAN_STRUCT_SOIL_C :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Soil Carbon (Structural pool)' & ,'[ kgC/m2]','(ipatch)' ) @@ -21428,7 +21625,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_struct_soil_l & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_STRUCT_SOIL_L :31:hist:mont:dcyc') + ,'MMEAN_STRUCT_SOIL_L :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Soil Lignin (Structural pool)' & ,'[ kgL/m2]','(ipatch)' ) @@ -21437,7 +21634,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_fast_soil_n & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_FAST_SOIL_N :31:hist:mont:dcyc') + ,'MMEAN_FAST_SOIL_N :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Soil Nitrogen (Fast pool)' & ,'[ kgN/m2]','(ipatch)' ) @@ -21446,7 +21643,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_mineral_soil_n & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_MINERAL_SOIL_N :31:hist:mont:dcyc') + ,'MMEAN_MINERAL_SOIL_N :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Soil Nitrogen (Mineralised pool)' & ,'[ kgN/m2]','(ipatch)' ) @@ -21455,7 +21652,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_A_decomp & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_A_DECOMP_PA :31:hist:mont:dcyc') + ,'MMEAN_A_DECOMP_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Decomposition scale' & ,'[ --]','(ipatch)' ) @@ -21464,7 +21661,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_Af_decomp & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_AF_DECOMP_PA :31:hist:mont:dcyc') + ,'MMEAN_AF_DECOMP_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Decomposition scale with N immobilisation' & ,'[ --]','(ipatch)' ) @@ -21473,7 +21670,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_co2_residual & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CO2_RESIDUAL_PA :31:hist:mont:dcyc') + ,'MMEAN_CO2_RESIDUAL_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Budget check - CO2 residual' & ,'[ umol/m2]','(ipatch)' ) @@ -21482,7 +21679,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_energy_residual & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ENERGY_RESIDUAL_PA :31:hist:mont:dcyc') + ,'MMEAN_ENERGY_RESIDUAL_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Budget check - Enthalpy residual' & ,'[ J/m2]','(ipatch)' ) @@ -21491,7 +21688,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_water_residual & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_WATER_RESIDUAL_PA :31:hist:mont:dcyc') + ,'MMEAN_WATER_RESIDUAL_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Budget check - Water residual' & ,'[ kg/m2]','(ipatch)' ) @@ -21500,7 +21697,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmsqu_rh & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_RH_PA :31:hist:mont:dcyc') + ,'MMSQU_RH_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Heterotrophic respiration' & ,'[ kg2/m4/yr2]','(ipatch)' ) @@ -21509,7 +21706,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmsqu_cwd_rh & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_CWD_RH_PA :31:hist:mont:dcyc') + ,'MMSQU_CWD_RH_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Coarse woody debris respiration' & ,'[ kg2/m4/yr2]','(ipatch)' ) @@ -21518,7 +21715,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmsqu_nep & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_NEP_PA :31:hist:mont:dcyc') + ,'MMSQU_NEP_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Net Ecosystem productivity' & ,'[ kg2/m4/yr2]','(ipatch)' ) @@ -21527,7 +21724,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmsqu_rlongup & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_RLONGUP_PA :31:hist:mont:dcyc') + ,'MMSQU_RLONGUP_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Outgoing longwave radiation' & ,'[ W2/m4]','(ipatch)' ) @@ -21536,7 +21733,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmsqu_parup & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_PARUP_PA :31:hist:mont:dcyc') + ,'MMSQU_PARUP_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Outgoing PAR' & ,'[ W2/m4]','(ipatch)' ) @@ -21545,7 +21742,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmsqu_nirup & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_NIRUP_PA :31:hist:mont:dcyc') + ,'MMSQU_NIRUP_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Outgoing near infra-red radiation' & ,'[ W2/m4]','(ipatch)' ) @@ -21554,7 +21751,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmsqu_rshortup & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_RSHORTUP_PA :31:hist:mont:dcyc') + ,'MMSQU_RSHORTUP_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Outgoing shortwave radiation' & ,'[ W2/m4]','(ipatch)' ) @@ -21563,7 +21760,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmsqu_rnet & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_RNET_PA :31:hist:mont:dcyc') + ,'MMSQU_RNET_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Net radiation at top of canopy' & ,'[ W2/m4]','(ipatch)' ) @@ -21572,7 +21769,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmsqu_albedo & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_ALBEDO_PA :31:hist:mont:dcyc') + ,'MMSQU_ALBEDO_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Albedo' & ,'[ ----]','(ipatch)' ) @@ -21581,7 +21778,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmsqu_ustar & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_USTAR_PA :31:hist:mont:dcyc') + ,'MMSQU_USTAR_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Friction velocity' & ,'[ m2/s2]','(ipatch)' ) @@ -21590,7 +21787,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmsqu_carbon_ac & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_CARBON_AC_PA :31:hist:mont:dcyc') + ,'MMSQU_CARBON_AC_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - CO2 flux: atmosphere -> CAS' & ,'[umol2/m4/s2]','(ipatch)' ) @@ -21599,7 +21796,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmsqu_carbon_st & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_CARBON_ST_PA :31:hist:mont:dcyc') + ,'MMSQU_CARBON_ST_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - CO2 storage at CAS' & ,'[umol2/m4/s2]','(ipatch)' ) @@ -21608,7 +21805,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmsqu_vapor_gc & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_VAPOR_GC_PA :31:hist:mont:dcyc') + ,'MMSQU_VAPOR_GC_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Water vapour flux: ground -> CAS' & ,'[ kg2/m4/s2]','(ipatch)' ) @@ -21617,7 +21814,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmsqu_vapor_ac & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_VAPOR_AC_PA :31:hist:mont:dcyc') + ,'MMSQU_VAPOR_AC_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Water vapour flux: atmosphere -> CAS' & ,'[ kg2/m4/s2]','(ipatch)' ) @@ -21626,7 +21823,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmsqu_sensible_gc & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_SENSIBLE_GC_PA :31:hist:mont:dcyc') + ,'MMSQU_SENSIBLE_GC_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Sensible heat flux: ground -> CAS' & ,'[ W2/m4]','(ipatch)' ) @@ -21635,7 +21832,7 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p nvar = nvar+1 call vtable_edio_r(npts,csite%mmsqu_sensible_ac & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_SENSIBLE_AC_PA :31:hist:mont:dcyc') + ,'MMSQU_SENSIBLE_AC_PA :31:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Sensible heat flux: atmosphere -> CAS' & ,'[ W2/m4]','(ipatch)' ) @@ -21666,15 +21863,28 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n implicit none !----- Arguments. -------------------------------------------------------------------! - type(sitetype), target :: csite - integer , intent(in) :: init - integer , intent(in) :: igr - integer , intent(in) :: var_len - integer , intent(in) :: max_ptrs - integer , intent(in) :: var_len_global - integer , intent(inout) :: nvar + type(sitetype) , target :: csite + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar !----- Local variables. -------------------------------------------------------------! - integer :: npts + integer :: npts + character(len=str_len) :: eorq_keys + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + ! Decide whether to write the mean diel to the history file. ! + !------------------------------------------------------------------------------------! + if (history_eorq) then + eorq_keys = 'hist:dcyc' + else + eorq_keys = 'dcyc' + end if !------------------------------------------------------------------------------------! @@ -21694,7 +21904,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_rh & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RH_PA :-31:hist:dcyc' ) + ,'QMEAN_RH_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Heterotrophic respiration' & ,'[ kg/m2/yr]','(ndcycle,ipatch)' ) @@ -21703,7 +21913,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_cwd_rh & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_CWD_RH_PA :-31:hist:dcyc' ) + ,'QMEAN_CWD_RH_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Coarse woody debris respiration' & ,'[ kg/m2/yr]','(ndcycle,ipatch)' ) @@ -21712,7 +21922,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_nep & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_NEP_PA :-31:hist:dcyc' ) + ,'QMEAN_NEP_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Net Ecosystem productivity' & ,'[ kg/m2/yr]','(ndcycle,ipatch)' ) @@ -21721,7 +21931,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_rk4step & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RK4STEP_PA :-31:hist:dcyc' ) + ,'QMEAN_RK4STEP_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - RK4 time step' & ,'[ s]','(ndcycle,ipatch)' ) @@ -21730,7 +21940,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_available_water & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_AVAILABLE_WATER_PA :-31:hist:dcyc' ) + ,'QMEAN_AVAILABLE_WATER_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Available water' & ,'[ kg/m2]','(ndcycle,ipatch)' ) @@ -21739,7 +21949,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_can_theiv & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_CAN_THEIV_PA :-31:hist:dcyc' ) + ,'QMEAN_CAN_THEIV_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Ice-vapour equiv. pot. temperature - CAS' & ,'[ K]','(ndcycle,ipatch)' ) @@ -21748,7 +21958,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_can_theta & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_CAN_THETA_PA :-31:hist:dcyc' ) + ,'QMEAN_CAN_THETA_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Potential temperature - CAS' & ,'[ K]','(ndcycle,ipatch)' ) @@ -21757,7 +21967,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_can_vpdef & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_CAN_VPDEF_PA :-31:hist:dcyc' ) + ,'QMEAN_CAN_VPDEF_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Vapour pressure deficit - CAS' & ,'[ Pa]','(ndcycle,ipatch)' ) @@ -21766,7 +21976,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_can_temp & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_CAN_TEMP_PA :-31:hist:dcyc' ) + ,'QMEAN_CAN_TEMP_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Temperature - CAS' & ,'[ K]','(ndcycle,ipatch)' ) @@ -21775,7 +21985,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_can_shv & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_CAN_SHV_PA :-31:hist:dcyc' ) + ,'QMEAN_CAN_SHV_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Specific humidity - CAS' & ,'[ kg/kg]','(ndcycle,ipatch)' ) @@ -21784,7 +21994,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_can_co2 & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_CAN_CO2_PA :-31:hist:dcyc' ) + ,'QMEAN_CAN_CO2_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - CO2 mixing ratio - CAS' & ,'[ umol/mol]','(ndcycle,ipatch)' ) @@ -21793,7 +22003,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_can_rhos & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_CAN_RHOS_PA :-31:hist:dcyc' ) + ,'QMEAN_CAN_RHOS_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Air density - CAS' & ,'[ kg/m3]','(ndcycle,ipatch)' ) @@ -21802,7 +22012,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_can_prss & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_CAN_PRSS_PA :-31:hist:dcyc' ) + ,'QMEAN_CAN_PRSS_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Pressure - CAS' & ,'[ Pa]','(ndcycle,ipatch)' ) @@ -21811,7 +22021,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_gnd_temp & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_GND_TEMP_PA :-31:hist:dcyc' ) + ,'QMEAN_GND_TEMP_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Ground temperature' & ,'[ K]','(ndcycle,ipatch)' ) @@ -21820,7 +22030,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_gnd_shv & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_GND_SHV_PA :-31:hist:dcyc' ) + ,'QMEAN_GND_SHV_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Ground specific humidity' & ,'[ kg/kg]','(ndcycle,ipatch)' ) @@ -21829,7 +22039,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_can_ggnd & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_CAN_GGND_PA :-31:hist:dcyc' ) + ,'QMEAN_CAN_GGND_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Net canopy conductance' & ,'[ m/2]','(ndcycle,ipatch)' ) @@ -21838,7 +22048,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_sfcw_depth & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SFCW_DEPTH_PA :-31:hist:dcyc' ) + ,'QMEAN_SFCW_DEPTH_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Depth - temporary water layer' & ,'[ m]','(ndcycle,ipatch)' ) @@ -21847,7 +22057,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_sfcw_energy & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SFCW_ENERGY_PA :-31:hist:dcyc' ) + ,'QMEAN_SFCW_ENERGY_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Internal energy - temporary water layer' & ,'[ J/kg]','(ndcycle,ipatch)' ) @@ -21856,7 +22066,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_sfcw_mass & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SFCW_MASS_PA :-31:hist:dcyc' ) + ,'QMEAN_SFCW_MASS_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Water mass - temporary water layer' & ,'[ kg/m2]','(ndcycle,ipatch)' ) @@ -21865,7 +22075,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_sfcw_temp & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SFCW_TEMP_PA :-31:hist:dcyc' ) + ,'QMEAN_SFCW_TEMP_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Temperature - temporary water layer' & ,'[ K]','(ndcycle,ipatch)' ) @@ -21874,7 +22084,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_sfcw_fliq & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SFCW_FLIQ_PA :-31:hist:dcyc' ) + ,'QMEAN_SFCW_FLIQ_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Liquid fraction - temporary water layer' & ,'[ --]','(ndcycle,ipatch)' ) @@ -21883,7 +22093,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_rshort_gnd & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RSHORT_GND_PA :-31:hist:dcyc' ) + ,'QMEAN_RSHORT_GND_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Shortwave radiation absorbed by ground' & ,'[ W/m2]','(ndcycle,ipatch)' ) @@ -21892,7 +22102,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_par_gnd & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_PAR_GND_PA :-31:hist:dcyc' ) + ,'QMEAN_PAR_GND_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - PAR absorbed by ground' & ,'[ W/m2]','(ndcycle,ipatch)' ) @@ -21901,7 +22111,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_rlong_gnd & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RLONG_GND_PA :-31:hist:dcyc' ) + ,'QMEAN_RLONG_GND_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Longwave radiation absorbed by ground' & ,'[ W/m2]','(ndcycle,ipatch)' ) @@ -21910,7 +22120,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_rlongup & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RLONGUP_PA :-31:hist:dcyc' ) + ,'QMEAN_RLONGUP_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Outgoing longwave radiation' & ,'[ W/m2]','(ndcycle,ipatch)' ) @@ -21919,7 +22129,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_parup & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_PARUP_PA :-31:hist:dcyc' ) + ,'QMEAN_PARUP_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Outgoing PAR' & ,'[ W/m2]','(ndcycle,ipatch)' ) @@ -21928,7 +22138,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_nirup & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_NIRUP_PA :-31:hist:dcyc' ) + ,'QMEAN_NIRUP_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Outgoing near infra-red radiation' & ,'[ W/m2]','(ndcycle,ipatch)' ) @@ -21937,7 +22147,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_rshortup & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RSHORTUP_PA :-31:hist:dcyc' ) + ,'QMEAN_RSHORTUP_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Outgoing shortwave radiation' & ,'[ W/m2]','(ndcycle,ipatch)' ) @@ -21946,7 +22156,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_rnet & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RNET_PA :-31:hist:dcyc' ) + ,'QMEAN_RNET_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Net radiation at top of canopy' & ,'[ W/m2]','(ndcycle,ipatch)' ) @@ -21955,7 +22165,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_albedo & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ALBEDO_PA :-31:hist:dcyc' ) + ,'QMEAN_ALBEDO_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Albedo' & ,'[ ----]','(ndcycle,ipatch)' ) @@ -21964,7 +22174,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_albedo_beam & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ALBEDO_BEAM_PA :-31:hist:dcyc' ) + ,'QMEAN_ALBEDO_BEAM_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Albedo - direct radiation' & ,'[ ----]','(ndcycle,ipatch)' ) @@ -21973,7 +22183,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_albedo_diff & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ALBEDO_DIFF_PA :-31:hist:dcyc' ) + ,'QMEAN_ALBEDO_DIFF_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Albedo - diffuse radiation' & ,'[ ----]','(ndcycle,ipatch)' ) @@ -21982,7 +22192,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_rlong_albedo & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RLONG_ALBEDO_PA :-31:hist:dcyc' ) + ,'QMEAN_RLONG_ALBEDO_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Kind of albedo - longwave radiation' & ,'[ ----]','(ndcycle,ipatch)' ) @@ -21991,7 +22201,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_ustar & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_USTAR_PA :-31:hist:dcyc' ) + ,'QMEAN_USTAR_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Friction velocity' & ,'[ m/s]','(ndcycle,ipatch)' ) @@ -22000,7 +22210,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_tstar & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_TSTAR_PA :-31:hist:dcyc' ) + ,'QMEAN_TSTAR_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Gradient scale for potential temperature' & ,'[ K]','(ndcycle,ipatch)' ) @@ -22009,7 +22219,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_qstar & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_QSTAR_PA :-31:hist:dcyc' ) + ,'QMEAN_QSTAR_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Gradient scale for specific humidity' & ,'[ kg/kg]','(ndcycle,ipatch)' ) @@ -22018,7 +22228,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_cstar & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_CSTAR_PA :-31:hist:dcyc' ) + ,'QMEAN_CSTAR_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Gradient scale for CO2 mixing ratio' & ,'[ umol/mol]','(ndcycle,ipatch)' ) @@ -22027,7 +22237,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_carbon_ac & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_CARBON_AC_PA :-31:hist:dcyc' ) + ,'QMEAN_CARBON_AC_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - CO2 flux: atmosphere -> CAS' & ,'[ umol/m2/s]','(ndcycle,ipatch)' ) @@ -22036,7 +22246,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_carbon_st & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_CARBON_ST_PA :-31:hist:dcyc' ) + ,'QMEAN_CARBON_ST_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - CO2 storage at CAS' & ,'[ umol/m2/s]','(ndcycle,ipatch)' ) @@ -22045,7 +22255,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_vapor_gc & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_VAPOR_GC_PA :-31:hist:dcyc' ) + ,'QMEAN_VAPOR_GC_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Water vapour flux: ground -> CAS' & ,'[ kg/m2/s]','(ndcycle,ipatch)' ) @@ -22054,7 +22264,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_vapor_ac & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_VAPOR_AC_PA :-31:hist:dcyc' ) + ,'QMEAN_VAPOR_AC_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Water vapour flux: atmosphere -> CAS' & ,'[ kg/m2/s]','(ndcycle,ipatch)' ) @@ -22063,7 +22273,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_throughfall & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_THROUGHFALL_PA :-31:hist:dcyc' ) + ,'QMEAN_THROUGHFALL_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Throughfall rate' & ,'[ kg/m2/s]','(ndcycle,ipatch)' ) @@ -22072,7 +22282,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_runoff & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RUNOFF_PA :-31:hist:dcyc' ) + ,'QMEAN_RUNOFF_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Water runoff' & ,'[ kg/m2/s]','(ndcycle,ipatch)' ) @@ -22081,7 +22291,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_drainage & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_DRAINAGE_PA :-31:hist:dcyc' ) + ,'QMEAN_DRAINAGE_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Water drainage' & ,'[ kg/m2/s]','(ndcycle,ipatch)' ) @@ -22090,7 +22300,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_sensible_gc & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SENSIBLE_GC_PA :-31:hist:dcyc' ) + ,'QMEAN_SENSIBLE_GC_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Sensible heat flux: ground -> CAS' & ,'[ W/m2]','(ndcycle,ipatch)' ) @@ -22099,7 +22309,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_sensible_ac & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SENSIBLE_AC_PA :-31:hist:dcyc' ) + ,'QMEAN_SENSIBLE_AC_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Sensible heat flux: atmosphere -> CAS' & ,'[ W/m2]','(ndcycle,ipatch)' ) @@ -22108,7 +22318,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_qthroughfall & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_QTHROUGHFALL_PA :-31:hist:dcyc' ) + ,'QMEAN_QTHROUGHFALL_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Throughfall rate' & ,'[ W/m2]','(ndcycle,ipatch)' ) @@ -22117,7 +22327,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_qrunoff & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_QRUNOFF_PA :-31:hist:dcyc' ) + ,'QMEAN_QRUNOFF_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Surface runoff' & ,'[ W/m2]','(ndcycle,ipatch)' ) @@ -22126,7 +22336,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_qdrainage & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_QDRAINAGE_PA :-31:hist:dcyc' ) + ,'QMEAN_QDRAINAGE_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Drainage energy loss' & ,'[ W/m2]','(ndcycle,ipatch)' ) @@ -22135,7 +22345,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmsqu_rh & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_RH_PA :-31:hist:dcyc' ) + ,'QMSQU_RH_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Heterotrophic respiration' & ,'[ kg2/m4/yr2]','(ndcycle,ipatch)' ) @@ -22144,7 +22354,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmsqu_cwd_rh & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_CWD_RH_PA :-31:hist:dcyc' ) + ,'QMSQU_CWD_RH_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Coarse woody debris respiration' & ,'[ kg2/m4/yr2]','(ndcycle,ipatch)' ) @@ -22153,7 +22363,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmsqu_nep & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_NEP_PA :-31:hist:dcyc' ) + ,'QMSQU_NEP_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Net Ecosystem productivity' & ,'[ kg2/m4/yr2]','(ndcycle,ipatch)' ) @@ -22162,7 +22372,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmsqu_rlongup & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_RLONGUP_PA :-31:hist:dcyc' ) + ,'QMSQU_RLONGUP_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Outgoing longwave radiation' & ,'[ W2/m4]','(ndcycle,ipatch)' ) @@ -22171,7 +22381,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmsqu_parup & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_PARUP_PA :-31:hist:dcyc' ) + ,'QMSQU_PARUP_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Outgoing PAR' & ,'[ W2/m4]','(ndcycle,ipatch)' ) @@ -22180,7 +22390,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmsqu_nirup & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_NIRUP_PA :-31:hist:dcyc' ) + ,'QMSQU_NIRUP_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Outgoing near infra-red radiation' & ,'[ W2/m4]','(ndcycle,ipatch)' ) @@ -22189,7 +22399,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmsqu_rshortup & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_RSHORTUP_PA :-31:hist:dcyc' ) + ,'QMSQU_RSHORTUP_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Outgoing shortwave radiation' & ,'[ W2/m4]','(ndcycle,ipatch)' ) @@ -22198,7 +22408,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmsqu_rnet & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_RNET_PA :-31:hist:dcyc' ) + ,'QMSQU_RNET_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Net radiation at top of canopy' & ,'[ W2/m4]','(ndcycle,ipatch)' ) @@ -22207,7 +22417,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmsqu_albedo & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_ALBEDO_PA :-31:hist:dcyc' ) + ,'QMSQU_ALBEDO_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Albedo' & ,'[ ----]','(ndcycle,ipatch)' ) @@ -22216,7 +22426,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmsqu_ustar & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_USTAR_PA :-31:hist:dcyc' ) + ,'QMSQU_USTAR_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Friction velocity' & ,'[ m2/s2]','(ndcycle,ipatch)' ) @@ -22225,7 +22435,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmsqu_carbon_ac & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_CARBON_AC_PA :-31:hist:dcyc' ) + ,'QMSQU_CARBON_AC_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - CO2 flux: atmosphere -> CAS' & ,'[umol2/m4/s2]','(ndcycle,ipatch)' ) @@ -22234,7 +22444,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmsqu_carbon_st & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_CARBON_ST_PA :-31:hist:dcyc' ) + ,'QMSQU_CARBON_ST_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - CO2 storage at CAS' & ,'[umol2/m4/s2]','(ndcycle,ipatch)' ) @@ -22243,7 +22453,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmsqu_vapor_gc & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_VAPOR_GC_PA :-31:hist:dcyc' ) + ,'QMSQU_VAPOR_GC_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Water vapour flux: ground -> CAS' & ,'[ kg2/m4/s2]','(ndcycle,ipatch)' ) @@ -22252,7 +22462,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmsqu_vapor_ac & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_VAPOR_AC_PA :-31:hist:dcyc' ) + ,'QMSQU_VAPOR_AC_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Water vapour flux: atmosphere -> CAS' & ,'[ kg2/m4/s2]','(ndcycle,ipatch)' ) @@ -22261,7 +22471,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmsqu_sensible_gc & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_SENSIBLE_GC_PA :-31:hist:dcyc' ) + ,'QMSQU_SENSIBLE_GC_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Sensible heat flux: ground -> CAS' & ,'[ W2/m4]','(ndcycle,ipatch)' ) @@ -22270,7 +22480,7 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmsqu_sensible_ac & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_SENSIBLE_AC_PA :-31:hist:dcyc' ) + ,'QMSQU_SENSIBLE_AC_PA :-31:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Sensible heat flux: atmosphere -> CAS' & ,'[ W2/m4]','(ndcycle,ipatch)' ) @@ -22299,15 +22509,40 @@ subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,n implicit none !----- Arguments. -------------------------------------------------------------------! - type(sitetype), target :: csite - integer , intent(in) :: init - integer , intent(in) :: igr - integer , intent(in) :: var_len - integer , intent(in) :: max_ptrs - integer , intent(in) :: var_len_global - integer , intent(inout) :: nvar + type(sitetype) , target :: csite + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar !----- Local variables. -------------------------------------------------------------! - integer :: npts + integer :: npts + character(len=str_len) :: fast_keys + character(len=str_len) :: dail_keys + character(len=str_len) :: eorq_keys + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + ! Decide whether to write the fast, daily, and monthly means to the history. ! + !------------------------------------------------------------------------------------! + if (history_fast) then + fast_keys = 'hist:anal' + else + fast_keys = 'anal' + end if + if (history_dail) then + dail_keys = 'hist:dail' + else + dail_keys = 'dail' + end if + if (history_eorq) then + eorq_keys = 'hist:mont:dcyc' + else + eorq_keys = 'mont:dcyc' + end if !------------------------------------------------------------------------------------! @@ -22378,7 +22613,7 @@ subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_soil_energy & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SOIL_ENERGY_PA :32:hist:anal' ) + ,'FMEAN_SOIL_ENERGY_PA :32:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Soil internal energy' & ,'[ J/m3]','(nzg,ipatch)' ) @@ -22387,7 +22622,7 @@ subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_soil_mstpot & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SOIL_MSTPOT_PA :32:hist:anal' ) + ,'FMEAN_SOIL_MSTPOT_PA :32:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Soil matric potential' & ,'[ m]','(nzg,ipatch)' ) @@ -22396,7 +22631,7 @@ subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_soil_water & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SOIL_WATER_PA :32:hist:anal' ) + ,'FMEAN_SOIL_WATER_PA :32:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Soil water content' & ,'[ m3/m3]','(nzg,ipatch)' ) @@ -22405,7 +22640,7 @@ subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_soil_temp & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SOIL_TEMP_PA :32:hist:anal' ) + ,'FMEAN_SOIL_TEMP_PA :32:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Soil temperature' & ,'[ K]','(nzg,ipatch)' ) @@ -22414,7 +22649,7 @@ subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_soil_fliq & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SOIL_FLIQ_PA :32:hist:anal' ) + ,'FMEAN_SOIL_FLIQ_PA :32:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Soil liquid fraction' & ,'[ --]','(nzg,ipatch)' ) @@ -22423,7 +22658,7 @@ subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_smoist_gg & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SMOIST_GG_PA :32:hist:anal' ) + ,'FMEAN_SMOIST_GG_PA :32:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Soil water flux' & ,'[ kg/m2/s]','(nzg,ipatch)' ) @@ -22432,7 +22667,7 @@ subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_transloss & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_TRANSLOSS_PA :32:hist:anal' ) + ,'FMEAN_TRANSLOSS_PA :32:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Water loss through transpiration' & ,'[ kg/m2/s]','(nzg,ipatch)' ) @@ -22441,7 +22676,7 @@ subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%fmean_sensible_gg & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SENSIBLE_GG_PA :32:hist:anal' ) + ,'FMEAN_SENSIBLE_GG_PA :32:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Soil heat flux' & ,'[ W/m2]','(nzg,ipatch)' ) @@ -22450,7 +22685,7 @@ subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_soil_energy & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SOIL_ENERGY_PA :32:hist:dail' ) + ,'DMEAN_SOIL_ENERGY_PA :32:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Soil internal energy' & ,'[ J/m3]','(nzg,ipatch)' ) @@ -22459,7 +22694,7 @@ subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_soil_mstpot & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SOIL_MSTPOT_PA :32:hist:dail' ) + ,'DMEAN_SOIL_MSTPOT_PA :32:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Soil matric potential' & ,'[ m]','(nzg,ipatch)' ) @@ -22468,7 +22703,7 @@ subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_soil_water & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SOIL_WATER_PA :32:hist:dail' ) + ,'DMEAN_SOIL_WATER_PA :32:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Soil water content' & ,'[ m3/m3]','(nzg,ipatch)' ) @@ -22477,7 +22712,7 @@ subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_soil_temp & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SOIL_TEMP_PA :32:hist:dail' ) + ,'DMEAN_SOIL_TEMP_PA :32:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Soil temperature' & ,'[ K]','(nzg,ipatch)' ) @@ -22486,7 +22721,7 @@ subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_soil_fliq & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SOIL_FLIQ_PA :32:hist:dail' ) + ,'DMEAN_SOIL_FLIQ_PA :32:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Soil liquid fraction' & ,'[ --]','(nzg,ipatch)' ) @@ -22495,7 +22730,7 @@ subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_smoist_gg & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SMOIST_GG_PA :32:hist:dail' ) + ,'DMEAN_SMOIST_GG_PA :32:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Soil water flux' & ,'[ kg/m2/s]','(nzg,ipatch)' ) @@ -22504,7 +22739,7 @@ subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_transloss & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_TRANSLOSS_PA :32:hist:dail' ) + ,'DMEAN_TRANSLOSS_PA :32:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Water loss through transpiration' & ,'[ kg/m2/s]','(nzg,ipatch)' ) @@ -22513,7 +22748,7 @@ subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%dmean_sensible_gg & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SENSIBLE_GG_PA :32:hist:dail' ) + ,'DMEAN_SENSIBLE_GG_PA :32:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Soil heat flux' & ,'[ W/m2]','(nzg,ipatch)' ) @@ -22522,7 +22757,7 @@ subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_soil_energy & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SOIL_ENERGY_PA :32:hist:mont:dcyc') + ,'MMEAN_SOIL_ENERGY_PA :32:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Soil internal energy' & ,'[ J/m3]','(nzg,ipatch)' ) @@ -22531,7 +22766,7 @@ subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_soil_mstpot & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SOIL_MSTPOT_PA :32:hist:mont:dcyc') + ,'MMEAN_SOIL_MSTPOT_PA :32:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Soil matric potential' & ,'[ m]','(nzg,ipatch)' ) @@ -22540,7 +22775,7 @@ subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_soil_water & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SOIL_WATER_PA :32:hist:mont:dcyc') + ,'MMEAN_SOIL_WATER_PA :32:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Soil water content' & ,'[ m3/m3]','(nzg,ipatch)' ) @@ -22549,7 +22784,7 @@ subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_soil_temp & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SOIL_TEMP_PA :32:hist:mont:dcyc') + ,'MMEAN_SOIL_TEMP_PA :32:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Soil temperature' & ,'[ K]','(nzg,ipatch)' ) @@ -22558,7 +22793,7 @@ subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_soil_fliq & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SOIL_FLIQ_PA :32:hist:mont:dcyc') + ,'MMEAN_SOIL_FLIQ_PA :32:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Soil liquid fraction' & ,'[ --]','(nzg,ipatch)' ) @@ -22567,7 +22802,7 @@ subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_smoist_gg & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SMOIST_GG_PA :32:hist:mont:dcyc') + ,'MMEAN_SMOIST_GG_PA :32:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Soil water flux' & ,'[ kg/m2/s]','(nzg,ipatch)' ) @@ -22576,7 +22811,7 @@ subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_transloss & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_TRANSLOSS_PA :32:hist:mont:dcyc') + ,'MMEAN_TRANSLOSS_PA :32:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Water loss through transpiration' & ,'[ kg/m2/s]','(nzg,ipatch)' ) @@ -22585,7 +22820,7 @@ subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%mmean_sensible_gg & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SENSIBLE_GG_PA :32:hist:mont:dcyc') + ,'MMEAN_SENSIBLE_GG_PA :32:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Soil heat flux' & ,'[ W/m2]','(nzg,ipatch)' ) @@ -22614,15 +22849,28 @@ subroutine filltab_sitetype_m32(csite,igr,init,var_len,var_len_global,max_ptrs,n implicit none !----- Arguments. -------------------------------------------------------------------! - type(sitetype), target :: csite - integer , intent(in) :: init - integer , intent(in) :: igr - integer , intent(in) :: var_len - integer , intent(in) :: max_ptrs - integer , intent(in) :: var_len_global - integer , intent(inout) :: nvar + type(sitetype) , target :: csite + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar !----- Local variables. -------------------------------------------------------------! - integer :: npts + integer :: npts + character(len=str_len) :: eorq_keys + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + ! Decide whether to write the mean diel to the history file. ! + !------------------------------------------------------------------------------------! + if (history_eorq) then + eorq_keys = 'hist:dcyc' + else + eorq_keys = 'dcyc' + end if !------------------------------------------------------------------------------------! @@ -22642,7 +22890,7 @@ subroutine filltab_sitetype_m32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_soil_energy & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SOIL_ENERGY_PA :-32:hist:dcyc' ) + ,'QMEAN_SOIL_ENERGY_PA :-32:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Soil internal energy' & ,'[ J/m3]','(nzg,ndcycle,ipatch)') @@ -22651,7 +22899,7 @@ subroutine filltab_sitetype_m32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_soil_mstpot & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SOIL_MSTPOT_PA :-32:hist:dcyc' ) + ,'QMEAN_SOIL_MSTPOT_PA :-32:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Soil matric potential' & ,'[ m]','(nzg,ndcycle,ipatch)') @@ -22660,7 +22908,7 @@ subroutine filltab_sitetype_m32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_soil_water & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SOIL_WATER_PA :-32:hist:dcyc' ) + ,'QMEAN_SOIL_WATER_PA :-32:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Soil water content' & ,'[ m3/m3]','(nzg,ndcycle,ipatch)') @@ -22669,7 +22917,7 @@ subroutine filltab_sitetype_m32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_soil_temp & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SOIL_TEMP_PA :-32:hist:dcyc' ) + ,'QMEAN_SOIL_TEMP_PA :-32:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Soil temperature' & ,'[ K]','(nzg,ndcycle,ipatch)') @@ -22678,7 +22926,7 @@ subroutine filltab_sitetype_m32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_soil_fliq & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SOIL_FLIQ_PA :-32:hist:dcyc' ) + ,'QMEAN_SOIL_FLIQ_PA :-32:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Soil liquid fraction' & ,'[ --]','(nzg,ndcycle,ipatch)') @@ -22687,7 +22935,7 @@ subroutine filltab_sitetype_m32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_smoist_gg & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SMOIST_GG_PA :-32:hist:dcyc' ) + ,'QMEAN_SMOIST_GG_PA :-32:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Soil water flux' & ,'[ kg/m2/s]','(nzg,ndcycle,ipatch)') @@ -22696,7 +22944,7 @@ subroutine filltab_sitetype_m32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_transloss & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_TRANSLOSS_PA :-32:hist:dcyc' ) + ,'QMEAN_TRANSLOSS_PA :-32:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Water loss through transpiration' & ,'[ kg/m2/s]','(nzg,ndcycle,ipatch)') @@ -22705,7 +22953,7 @@ subroutine filltab_sitetype_m32(csite,igr,init,var_len,var_len_global,max_ptrs,n nvar = nvar+1 call vtable_edio_r(npts,csite%qmean_sensible_gg & ,nvar,igr,init,csite%paglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SENSIBLE_GG_PA :-32:hist:dcyc' ) + ,'QMEAN_SENSIBLE_GG_PA :-32:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Soil heat flux' & ,'[ W/m2]','(nzg,ndcycle,ipatch)') @@ -23997,20 +24245,29 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max implicit none !----- Arguments. -------------------------------------------------------------------! - type(patchtype), target :: cpatch - integer , intent(in) :: init - integer , intent(in) :: igr - integer , intent(in) :: var_len - integer , intent(in) :: max_ptrs - integer , intent(in) :: var_len_global - integer , intent(inout) :: nvar + type(patchtype) , target :: cpatch + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar !----- Local variables. -------------------------------------------------------------! - integer :: npts + integer :: npts + character(len=str_len) :: fast_keys !------------------------------------------------------------------------------------! - + !------------------------------------------------------------------------------------! + ! Decide whether to write the sub-daily means to the history file. ! + !------------------------------------------------------------------------------------! + if (history_fast) then + fast_keys = 'hist:anal' + else + fast_keys = 'anal' + end if + !------------------------------------------------------------------------------------! @@ -24027,7 +24284,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_gpp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_GPP_CO :41:hist:anal' ) + ,'FMEAN_GPP_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Gross primary productivity' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -24036,7 +24293,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_npp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_NPP_CO :41:hist:anal' ) + ,'FMEAN_NPP_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Net primary productivity' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -24045,7 +24302,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_leaf_resp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_LEAF_RESP_CO :41:hist:anal' ) + ,'FMEAN_LEAF_RESP_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Leaf respiration' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -24054,7 +24311,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_root_resp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_ROOT_RESP_CO :41:hist:anal' ) + ,'FMEAN_ROOT_RESP_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Root respiration' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -24063,7 +24320,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_growth_resp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_GROWTH_RESP_CO :41:hist:anal' ) + ,'FMEAN_GROWTH_RESP_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Growth respiration' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -24072,7 +24329,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_storage_resp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_STORAGE_RESP_CO :41:hist:anal' ) + ,'FMEAN_STORAGE_RESP_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Storage respiration' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -24081,7 +24338,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_vleaf_resp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_VLEAF_RESP_CO :41:hist:anal' ) + ,'FMEAN_VLEAF_RESP_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Virtual leaf respiration' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -24090,7 +24347,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_plresp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_PLRESP_CO :41:hist:anal' ) + ,'FMEAN_PLRESP_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Plant respiration' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -24099,7 +24356,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_leaf_energy & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_LEAF_ENERGY_CO :41:hist:anal' ) + ,'FMEAN_LEAF_ENERGY_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Leaf internal energy' & ,'[ J/m2]','(icohort)' ) @@ -24108,7 +24365,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_leaf_water & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_LEAF_WATER_CO :41:hist:anal' ) + ,'FMEAN_LEAF_WATER_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Leaf surface water' & ,'[ kg/m2]','(icohort)' ) @@ -24117,7 +24374,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_leaf_hcap & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_LEAF_HCAP_CO :41:hist:anal' ) + ,'FMEAN_LEAF_HCAP_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Leaf heat capacity' & ,'[ J/m2/K]','(icohort)' ) @@ -24126,7 +24383,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_leaf_vpdef & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_LEAF_VPDEF_CO :41:hist:anal' ) + ,'FMEAN_LEAF_VPDEF_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Leaf vapour pressure deficit' & ,'[ Pa]','(icohort)' ) @@ -24135,7 +24392,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_leaf_temp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_LEAF_TEMP_CO :41:hist:anal' ) + ,'FMEAN_LEAF_TEMP_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Leaf temperature' & ,'[ K]','(icohort)' ) @@ -24144,7 +24401,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_leaf_fliq & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_LEAF_FLIQ_CO :41:hist:anal' ) + ,'FMEAN_LEAF_FLIQ_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Liquid fraction' & ,'[ --]','(icohort)' ) @@ -24153,7 +24410,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_leaf_gsw & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_LEAF_GSW_CO :41:hist:anal' ) + ,'FMEAN_LEAF_GSW_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Stomatal conductance' & ,'[kg/m2leaf/s]','(icohort)' ) @@ -24162,7 +24419,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_leaf_gbw & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_LEAF_GBW_CO :41:hist:anal' ) + ,'FMEAN_LEAF_GBW_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Leaf boundary layer conductance' & ,'[kg/m2leaf/s]','(icohort)' ) @@ -24171,7 +24428,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_wood_energy & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_WOOD_ENERGY_CO :41:hist:anal' ) + ,'FMEAN_WOOD_ENERGY_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Wood internal energy' & ,'[ J/m2]','(icohort)' ) @@ -24180,7 +24437,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_wood_water & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_WOOD_WATER_CO :41:hist:anal' ) + ,'FMEAN_WOOD_WATER_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Wood surface water' & ,'[ kg/m2]','(icohort)' ) @@ -24189,7 +24446,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_wood_hcap & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_WOOD_HCAP_CO :41:hist:anal' ) + ,'FMEAN_WOOD_HCAP_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Wood heat capacity' & ,'[ J/m2/K]','(icohort)' ) @@ -24198,7 +24455,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_wood_temp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_WOOD_TEMP_CO :41:hist:anal' ) + ,'FMEAN_WOOD_TEMP_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Wood temperature' & ,'[ K]','(icohort)' ) @@ -24207,7 +24464,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_wood_fliq & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_WOOD_FLIQ_CO :41:hist:anal' ) + ,'FMEAN_WOOD_FLIQ_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Liquid fraction' & ,'[ --]','(icohort)' ) @@ -24216,7 +24473,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_wood_gbw & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_WOOD_GBW_CO :41:hist:anal' ) + ,'FMEAN_WOOD_GBW_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Wood boundary layer conductance' & ,'[kg/m2wood/s]','(icohort)' ) @@ -24225,7 +24482,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_fs_open & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_FS_OPEN_CO :41:hist:anal' ) + ,'FMEAN_FS_OPEN_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Net stress factor' & ,'[ --]','(icohort)' ) @@ -24234,7 +24491,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_fsw & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_FSW_CO :41:hist:anal' ) + ,'FMEAN_FSW_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Moisture stress' & ,'[ --]','(icohort)' ) @@ -24243,7 +24500,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_fsn & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_FSN_CO :41:hist:anal' ) + ,'FMEAN_FSN_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Nitrogen stress' & ,'[ --]','(icohort)' ) @@ -24252,7 +24509,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_psi_open & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_PSI_OPEN_CO :41:hist:anal' ) + ,'FMEAN_PSI_OPEN_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Transpiration with no stress' & ,'[ kg/m2/s]','(icohort)' ) @@ -24261,7 +24518,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_psi_closed & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_PSI_CLOSED_CO :41:hist:anal' ) + ,'FMEAN_PSI_CLOSED_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Transpiration at maximum stress' & ,'[ kg/m2/s]','(icohort)' ) @@ -24270,7 +24527,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_water_supply & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_WATER_SUPPLY_CO :41:hist:anal' ) + ,'FMEAN_WATER_SUPPLY_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Water supply' & ,'[ kg/m2/s]','(icohort)' ) @@ -24279,7 +24536,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_light_level & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_LIGHT_LEVEL_CO :41:hist:anal' ) + ,'FMEAN_LIGHT_LEVEL_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Light level' & ,'[ --]','(icohort)' ) @@ -24288,7 +24545,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_light_level_beam & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_LIGHT_LEVEL_BEAM_CO :41:hist:anal' ) + ,'FMEAN_LIGHT_LEVEL_BEAM_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Light level (direct radiation)' & ,'[ --]','(icohort)' ) @@ -24297,7 +24554,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_light_level_diff & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_LIGHT_LEVEL_DIFF_CO :41:hist:anal' ) + ,'FMEAN_LIGHT_LEVEL_DIFF_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Light level (diffuse radiation)' & ,'[ --]','(icohort)' ) @@ -24306,7 +24563,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_par_l & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_PAR_L_CO :41:hist:anal' ) + ,'FMEAN_PAR_L_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - PAR absorbed by leaves' & ,'[ W/m2]','(icohort)' ) @@ -24315,7 +24572,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_par_l_beam & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_PAR_L_BEAM_CO :41:hist:anal' ) + ,'FMEAN_PAR_L_BEAM_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Direct PAR absorbed by leaves' & ,'[ W/m2]','(icohort)' ) @@ -24324,7 +24581,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_par_l_diff & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_PAR_L_DIFF_CO :41:hist:anal' ) + ,'FMEAN_PAR_L_DIFF_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Diffuse PAR absorbed by leaves' & ,'[ W/m2]','(icohort)' ) @@ -24333,7 +24590,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_rshort_l & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_RSHORT_L_CO :41:hist:anal' ) + ,'FMEAN_RSHORT_L_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Shortwave radiation absorbed by leaves' & ,'[ W/m2]','(icohort)' ) @@ -24342,7 +24599,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_rlong_l & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_RLONG_L_CO :41:hist:anal' ) + ,'FMEAN_RLONG_L_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Longwave radiation absorbed by leaves' & ,'[ W/m2]','(icohort)' ) @@ -24351,7 +24608,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_sensible_lc & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SENSIBLE_LC_CO :41:hist:anal' ) + ,'FMEAN_SENSIBLE_LC_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Sensible heat' & ,'[ W/m2]','(icohort)' ) @@ -24360,7 +24617,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_vapor_lc & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_VAPOR_LC_CO :41:hist:anal' ) + ,'FMEAN_VAPOR_LC_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Leaf evaporation' & ,'[ kg/m2/s]','(icohort)' ) @@ -24369,7 +24626,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_transp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_TRANSP_CO :41:hist:anal' ) + ,'FMEAN_TRANSP_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Leaf transpiration' & ,'[ kg/m2/s]','(icohort)' ) @@ -24378,7 +24635,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_intercepted_al & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_INTERCEPTED_AL_CO :41:hist:anal' ) + ,'FMEAN_INTERCEPTED_AL_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Leaf interception' & ,'[ kg/m2/s]','(icohort)' ) @@ -24387,7 +24644,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_wshed_lg & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_WSHED_LG_CO :41:hist:anal' ) + ,'FMEAN_WSHED_LG_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Leaf shedding' & ,'[ kg/m2/s]','(icohort)' ) @@ -24396,7 +24653,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_rshort_w & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_RSHORT_W_CO :41:hist:anal' ) + ,'FMEAN_RSHORT_W_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Shortwave radiation absorbed by wood' & ,'[ W/m2]','(icohort)' ) @@ -24405,7 +24662,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_rlong_w & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_RLONG_W_CO :41:hist:anal' ) + ,'FMEAN_RLONG_W_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Longwave radiation absorbed by wood' & ,'[ W/m2]','(icohort)' ) @@ -24414,7 +24671,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_sensible_wc & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_SENSIBLE_WC_CO :41:hist:anal' ) + ,'FMEAN_SENSIBLE_WC_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Sensible heat' & ,'[ W/m2]','(icohort)' ) @@ -24423,7 +24680,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_vapor_wc & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_VAPOR_WC_CO :41:hist:anal' ) + ,'FMEAN_VAPOR_WC_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Wood evaporation' & ,'[ kg/m2/s]','(icohort)' ) @@ -24432,7 +24689,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_intercepted_aw & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_INTERCEPTED_AW_CO :41:hist:anal' ) + ,'FMEAN_INTERCEPTED_AW_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Wood interception' & ,'[ kg/m2/s]','(icohort)' ) @@ -24441,7 +24698,7 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%fmean_wshed_wg & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'FMEAN_WSHED_WG_CO :41:hist:anal' ) + ,'FMEAN_WSHED_WG_CO :41:'//trim(fast_keys) ) call metadata_edio(nvar,igr & ,'Sub-daily mean - Wood shedding' & ,'[ kg/m2/s]','(icohort)' ) @@ -24470,15 +24727,28 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max implicit none !----- Arguments. -------------------------------------------------------------------! - type(patchtype), target :: cpatch - integer , intent(in) :: init - integer , intent(in) :: igr - integer , intent(in) :: var_len - integer , intent(in) :: max_ptrs - integer , intent(in) :: var_len_global - integer , intent(inout) :: nvar + type(patchtype) , target :: cpatch + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar !----- Local variables. -------------------------------------------------------------! - integer :: npts + integer :: npts + character(len=str_len) :: dail_keys + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + ! Decide whether to write the daily means to the history file. ! + !------------------------------------------------------------------------------------! + if (history_dail) then + dail_keys = 'hist:dail' + else + dail_keys = 'dail' + end if !------------------------------------------------------------------------------------! @@ -24501,7 +24771,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_nppleaf & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_NPPLEAF_CO :41:hist:dail' ) + ,'DMEAN_NPPLEAF_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Net primary productivity - Leaf' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -24510,7 +24780,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_nppfroot & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_NPPFROOT_CO :41:hist:dail' ) + ,'DMEAN_NPPFROOT_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Net primary productivity - Fine root' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -24519,7 +24789,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_nppsapwood & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_NPPSAPWOOD_CO :41:hist:dail' ) + ,'DMEAN_NPPSAPWOOD_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Net primary productivity - Sap wood' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -24528,7 +24798,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_nppcroot & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_NPPCROOT_CO :41:hist:dail' ) + ,'DMEAN_NPPCROOT_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Net primary productivity - Coarse root' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -24537,7 +24807,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_nppseeds & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_NPPSEEDS_CO :41:hist:dail' ) + ,'DMEAN_NPPSEEDS_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Net primary productivity - seeds' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -24546,7 +24816,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_nppwood & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_NPPWOOD_CO :41:hist:dail' ) + ,'DMEAN_NPPWOOD_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Net primary productivity - heart wood' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -24555,7 +24825,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_nppdaily & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_NPPDAILY_CO :41:hist:dail' ) + ,'DMEAN_NPPDAILY_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Net primary productivity - total' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -24564,7 +24834,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_gpp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_GPP_CO :41:hist:dail' ) + ,'DMEAN_GPP_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Gross primary productivity' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -24573,7 +24843,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_npp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_NPP_CO :41:hist:dail' ) + ,'DMEAN_NPP_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Net primary productivity' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -24582,7 +24852,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_leaf_resp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_LEAF_RESP_CO :41:hist:dail' ) + ,'DMEAN_LEAF_RESP_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Leaf respiration' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -24591,7 +24861,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_root_resp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_ROOT_RESP_CO :41:hist:dail' ) + ,'DMEAN_ROOT_RESP_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Root respiration' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -24600,7 +24870,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_growth_resp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_GROWTH_RESP_CO :41:hist:dail' ) + ,'DMEAN_GROWTH_RESP_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Growth respiration' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -24609,7 +24879,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_storage_resp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_STORAGE_RESP_CO :41:hist:dail' ) + ,'DMEAN_STORAGE_RESP_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Storage respiration' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -24618,7 +24888,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_vleaf_resp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_VLEAF_RESP_CO :41:hist:dail' ) + ,'DMEAN_VLEAF_RESP_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Virtual leaf respiration' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -24627,7 +24897,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_plresp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_PLRESP_CO :41:hist:dail' ) + ,'DMEAN_PLRESP_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Plant respiration' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -24636,7 +24906,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_leaf_energy & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_LEAF_ENERGY_CO :41:hist:dail' ) + ,'DMEAN_LEAF_ENERGY_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Leaf internal energy' & ,'[ J/m2]','(icohort)' ) @@ -24645,7 +24915,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_leaf_water & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_LEAF_WATER_CO :41:hist:dail' ) + ,'DMEAN_LEAF_WATER_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Leaf surface water' & ,'[ kg/m2]','(icohort)' ) @@ -24654,7 +24924,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_leaf_hcap & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_LEAF_HCAP_CO :41:hist:dail' ) + ,'DMEAN_LEAF_HCAP_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Leaf heat capacity' & ,'[ J/m2/K]','(icohort)' ) @@ -24663,7 +24933,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_leaf_vpdef & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_LEAF_VPDEF_CO :41:hist:dail' ) + ,'DMEAN_LEAF_VPDEF_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Leaf vapour pressure deficit' & ,'[ Pa]','(icohort)' ) @@ -24672,7 +24942,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_leaf_temp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_LEAF_TEMP_CO :41:hist:dail' ) + ,'DMEAN_LEAF_TEMP_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Leaf temperature' & ,'[ K]','(icohort)' ) @@ -24681,7 +24951,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_leaf_fliq & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_LEAF_FLIQ_CO :41:hist:dail' ) + ,'DMEAN_LEAF_FLIQ_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Liquid fraction' & ,'[ --]','(icohort)' ) @@ -24690,7 +24960,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_leaf_gsw & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_LEAF_GSW_CO :41:hist:dail' ) + ,'DMEAN_LEAF_GSW_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Stomatal conductance' & ,'[kg/m2leaf/s]','(icohort)' ) @@ -24699,7 +24969,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_leaf_gbw & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_LEAF_GBW_CO :41:hist:dail' ) + ,'DMEAN_LEAF_GBW_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Leaf boundary layer conductance' & ,'[kg/m2leaf/s]','(icohort)' ) @@ -24708,7 +24978,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_wood_energy & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_WOOD_ENERGY_CO :41:hist:dail' ) + ,'DMEAN_WOOD_ENERGY_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Wood internal energy' & ,'[ J/m2]','(icohort)' ) @@ -24717,7 +24987,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_wood_water & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_WOOD_WATER_CO :41:hist:dail' ) + ,'DMEAN_WOOD_WATER_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Wood surface water' & ,'[ kg/m2]','(icohort)' ) @@ -24726,7 +24996,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_wood_hcap & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_WOOD_HCAP_CO :41:hist:dail' ) + ,'DMEAN_WOOD_HCAP_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Wood heat capacity' & ,'[ J/m2/K]','(icohort)' ) @@ -24735,7 +25005,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_wood_temp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_WOOD_TEMP_CO :41:hist:dail' ) + ,'DMEAN_WOOD_TEMP_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Wood temperature' & ,'[ K]','(icohort)' ) @@ -24744,7 +25014,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_wood_fliq & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_WOOD_FLIQ_CO :41:hist:dail' ) + ,'DMEAN_WOOD_FLIQ_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Liquid fraction' & ,'[ --]','(icohort)' ) @@ -24753,7 +25023,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_wood_gbw & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_WOOD_GBW_CO :41:hist:dail' ) + ,'DMEAN_WOOD_GBW_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Wood boundary layer conductance' & ,'[kg/m2wood/s]','(icohort)' ) @@ -24762,7 +25032,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_fs_open & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_FS_OPEN_CO :41:hist:dail' ) + ,'DMEAN_FS_OPEN_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Net stress factor' & ,'[ --]','(icohort)' ) @@ -24771,7 +25041,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_fsw & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_FSW_CO :41:hist:dail' ) + ,'DMEAN_FSW_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Moisture stress' & ,'[ --]','(icohort)' ) @@ -24780,7 +25050,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_fsn & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_FSN_CO :41:hist:dail' ) + ,'DMEAN_FSN_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Nitrogen stress' & ,'[ --]','(icohort)' ) @@ -24789,7 +25059,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_psi_open & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_PSI_OPEN_CO :41:hist:dail' ) + ,'DMEAN_PSI_OPEN_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Transpiration with no stress' & ,'[ kg/m2/s]','(icohort)' ) @@ -24798,7 +25068,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_psi_closed & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_PSI_CLOSED_CO :41:hist:dail' ) + ,'DMEAN_PSI_CLOSED_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Transpiration at maximum stress' & ,'[ kg/m2/s]','(icohort)' ) @@ -24807,7 +25077,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_water_supply & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_WATER_SUPPLY_CO :41:hist:dail' ) + ,'DMEAN_WATER_SUPPLY_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Water supply' & ,'[ kg/m2/s]','(icohort)' ) @@ -24816,7 +25086,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_light_level & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_LIGHT_LEVEL_CO :41:hist:dail' ) + ,'DMEAN_LIGHT_LEVEL_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Light level' & ,'[ --]','(icohort)' ) @@ -24825,7 +25095,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_light_level_beam & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_LIGHT_LEVEL_BEAM_CO :41:hist:dail' ) + ,'DMEAN_LIGHT_LEVEL_BEAM_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Light level (direct radiation)' & ,'[ --]','(icohort)' ) @@ -24834,7 +25104,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_light_level_diff & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_LIGHT_LEVEL_DIFF_CO :41:hist:dail' ) + ,'DMEAN_LIGHT_LEVEL_DIFF_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Light level (diffuse radiation)' & ,'[ --]','(icohort)' ) @@ -24843,7 +25113,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_par_l & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_PAR_L_CO :41:hist:dail' ) + ,'DMEAN_PAR_L_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - PAR absorbed by leaves' & ,'[ W/m2]','(icohort)' ) @@ -24852,7 +25122,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_par_l_beam & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_PAR_L_BEAM_CO :41:hist:dail' ) + ,'DMEAN_PAR_L_BEAM_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Direct PAR absorbed by leaves' & ,'[ W/m2]','(icohort)' ) @@ -24861,7 +25131,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_par_l_diff & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_PAR_L_DIFF_CO :41:hist:dail' ) + ,'DMEAN_PAR_L_DIFF_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Diffuse PAR absorbed by leaves' & ,'[ W/m2]','(icohort)' ) @@ -24870,7 +25140,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_rshort_l & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RSHORT_L_CO :41:hist:dail' ) + ,'DMEAN_RSHORT_L_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Shortwave radiation absorbed by leaves' & ,'[ W/m2]','(icohort)' ) @@ -24879,7 +25149,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_rlong_l & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RLONG_L_CO :41:hist:dail' ) + ,'DMEAN_RLONG_L_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Longwave radiation absorbed by leaves' & ,'[ W/m2]','(icohort)' ) @@ -24888,7 +25158,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_sensible_lc & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SENSIBLE_LC_CO :41:hist:dail' ) + ,'DMEAN_SENSIBLE_LC_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Sensible heat' & ,'[ W/m2]','(icohort)' ) @@ -24897,7 +25167,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_vapor_lc & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_VAPOR_LC_CO :41:hist:dail' ) + ,'DMEAN_VAPOR_LC_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Leaf evaporation' & ,'[ kg/m2/s]','(icohort)' ) @@ -24906,7 +25176,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_transp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_TRANSP_CO :41:hist:dail' ) + ,'DMEAN_TRANSP_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Leaf transpiration' & ,'[ kg/m2/s]','(icohort)' ) @@ -24915,7 +25185,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_intercepted_al & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_INTERCEPTED_AL_CO :41:hist:dail' ) + ,'DMEAN_INTERCEPTED_AL_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Leaf interception' & ,'[ kg/m2/s]','(icohort)' ) @@ -24924,7 +25194,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_wshed_lg & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_WSHED_LG_CO :41:hist:dail' ) + ,'DMEAN_WSHED_LG_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Leaf shedding' & ,'[ kg/m2/s]','(icohort)' ) @@ -24933,7 +25203,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_rshort_w & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RSHORT_W_CO :41:hist:dail' ) + ,'DMEAN_RSHORT_W_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Shortwave radiation absorbed by wood' & ,'[ W/m2]','(icohort)' ) @@ -24942,7 +25212,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_rlong_w & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_RLONG_W_CO :41:hist:dail' ) + ,'DMEAN_RLONG_W_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Longwave radiation absorbed by wood' & ,'[ W/m2]','(icohort)' ) @@ -24951,7 +25221,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_sensible_wc & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_SENSIBLE_WC_CO :41:hist:dail' ) + ,'DMEAN_SENSIBLE_WC_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Sensible heat' & ,'[ W/m2]','(icohort)' ) @@ -24960,7 +25230,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_vapor_wc & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_VAPOR_WC_CO :41:hist:dail' ) + ,'DMEAN_VAPOR_WC_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Wood evaporation' & ,'[ kg/m2/s]','(icohort)' ) @@ -24969,7 +25239,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_intercepted_aw & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_INTERCEPTED_AW_CO :41:hist:dail' ) + ,'DMEAN_INTERCEPTED_AW_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Wood interception' & ,'[ kg/m2/s]','(icohort)' ) @@ -24978,7 +25248,7 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%dmean_wshed_wg & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'DMEAN_WSHED_WG_CO :41:hist:dail' ) + ,'DMEAN_WSHED_WG_CO :41:'//trim(dail_keys) ) call metadata_edio(nvar,igr & ,'Daily mean - Wood shedding' & ,'[ kg/m2/s]','(icohort)' ) @@ -25007,15 +25277,28 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max implicit none !----- Arguments. -------------------------------------------------------------------! - type(patchtype), target :: cpatch - integer , intent(in) :: init - integer , intent(in) :: igr - integer , intent(in) :: var_len - integer , intent(in) :: max_ptrs - integer , intent(in) :: var_len_global - integer , intent(inout) :: nvar + type(patchtype) , target :: cpatch + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar !----- Local variables. -------------------------------------------------------------! - integer :: npts + integer :: npts + character(len=str_len) :: eorq_keys + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + ! Decide whether to write the monthly means to the history file. ! + !------------------------------------------------------------------------------------! + if (history_eorq) then + eorq_keys = 'hist:mont:dcyc' + else + eorq_keys = 'mont:dcyc' + end if !------------------------------------------------------------------------------------! @@ -25038,7 +25321,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_gpp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_GPP_CO :41:hist:mont:dcyc') + ,'MMEAN_GPP_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Gross primary productivity' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -25047,7 +25330,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_npp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_NPP_CO :41:hist:mont:dcyc') + ,'MMEAN_NPP_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Net primary productivity' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -25056,7 +25339,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_leaf_resp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_LEAF_RESP_CO :41:hist:mont:dcyc') + ,'MMEAN_LEAF_RESP_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Leaf respiration' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -25065,7 +25348,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_root_resp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ROOT_RESP_CO :41:hist:mont:dcyc') + ,'MMEAN_ROOT_RESP_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Root respiration' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -25074,7 +25357,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_growth_resp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_GROWTH_RESP_CO :41:hist:mont:dcyc') + ,'MMEAN_GROWTH_RESP_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Growth respiration' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -25083,7 +25366,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_storage_resp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_STORAGE_RESP_CO :41:hist:mont:dcyc') + ,'MMEAN_STORAGE_RESP_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Storage respiration' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -25092,7 +25375,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_vleaf_resp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_VLEAF_RESP_CO :41:hist:mont:dcyc') + ,'MMEAN_VLEAF_RESP_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Virtual leaf respiration' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -25101,7 +25384,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_plresp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_PLRESP_CO :41:hist:mont:dcyc') + ,'MMEAN_PLRESP_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Plant respiration' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -25110,7 +25393,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_leaf_energy & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_LEAF_ENERGY_CO :41:hist:mont:dcyc') + ,'MMEAN_LEAF_ENERGY_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Leaf internal energy' & ,'[ J/m2]','(icohort)' ) @@ -25119,7 +25402,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_leaf_water & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_LEAF_WATER_CO :41:hist:mont:dcyc') + ,'MMEAN_LEAF_WATER_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Leaf surface water' & ,'[ kg/m2]','(icohort)' ) @@ -25128,7 +25411,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_leaf_hcap & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_LEAF_HCAP_CO :41:hist:mont:dcyc') + ,'MMEAN_LEAF_HCAP_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Leaf heat capacity' & ,'[ J/m2/K]','(icohort)' ) @@ -25137,7 +25420,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_leaf_vpdef & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_LEAF_VPDEF_CO :41:hist:mont:dcyc') + ,'MMEAN_LEAF_VPDEF_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Leaf vapour pressure deficit' & ,'[ Pa]','(icohort)' ) @@ -25146,7 +25429,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_leaf_temp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_LEAF_TEMP_CO :41:hist:mont:dcyc') + ,'MMEAN_LEAF_TEMP_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Leaf temperature' & ,'[ K]','(icohort)' ) @@ -25155,7 +25438,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_leaf_fliq & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_LEAF_FLIQ_CO :41:hist:mont:dcyc') + ,'MMEAN_LEAF_FLIQ_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Liquid fraction' & ,'[ --]','(icohort)' ) @@ -25164,7 +25447,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_leaf_gsw & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_LEAF_GSW_CO :41:hist:mont:dcyc') + ,'MMEAN_LEAF_GSW_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Stomatal conductance' & ,'[kg/m2leaf/s]','(icohort)' ) @@ -25173,7 +25456,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_leaf_gbw & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_LEAF_GBW_CO :41:hist:mont:dcyc') + ,'MMEAN_LEAF_GBW_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Leaf boundary layer conductance' & ,'[kg/m2leaf/s]','(icohort)' ) @@ -25182,7 +25465,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_wood_energy & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_WOOD_ENERGY_CO :41:hist:mont:dcyc') + ,'MMEAN_WOOD_ENERGY_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Wood internal energy' & ,'[ J/m2]','(icohort)' ) @@ -25191,7 +25474,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_wood_water & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_WOOD_WATER_CO :41:hist:mont:dcyc') + ,'MMEAN_WOOD_WATER_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Wood surface water' & ,'[ kg/m2]','(icohort)' ) @@ -25200,7 +25483,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_wood_hcap & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_WOOD_HCAP_CO :41:hist:mont:dcyc') + ,'MMEAN_WOOD_HCAP_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Wood heat capacity' & ,'[ J/m2/K]','(icohort)' ) @@ -25209,7 +25492,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_wood_temp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_WOOD_TEMP_CO :41:hist:mont:dcyc') + ,'MMEAN_WOOD_TEMP_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Wood temperature' & ,'[ K]','(icohort)' ) @@ -25218,7 +25501,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_wood_fliq & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_WOOD_FLIQ_CO :41:hist:mont:dcyc') + ,'MMEAN_WOOD_FLIQ_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Liquid fraction' & ,'[ --]','(icohort)' ) @@ -25227,7 +25510,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_wood_gbw & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_WOOD_GBW_CO :41:hist:mont:dcyc') + ,'MMEAN_WOOD_GBW_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Wood boundary layer conductance' & ,'[kg/m2wood/s]','(icohort)' ) @@ -25236,7 +25519,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_fs_open & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_FS_OPEN_CO :41:hist:mont:dcyc') + ,'MMEAN_FS_OPEN_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Net stress factor' & ,'[ --]','(icohort)' ) @@ -25245,7 +25528,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_fsw & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_FSW_CO :41:hist:mont:dcyc') + ,'MMEAN_FSW_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Moisture stress' & ,'[ --]','(icohort)' ) @@ -25254,7 +25537,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_fsn & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_FSN_CO :41:hist:mont:dcyc') + ,'MMEAN_FSN_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Nitrogen stress' & ,'[ --]','(icohort)' ) @@ -25263,7 +25546,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_psi_open & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_PSI_OPEN_CO :41:hist:mont:dcyc') + ,'MMEAN_PSI_OPEN_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Transpiration with no stress' & ,'[ kg/m2/s]','(icohort)' ) @@ -25272,7 +25555,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_psi_closed & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_PSI_CLOSED_CO :41:hist:mont:dcyc') + ,'MMEAN_PSI_CLOSED_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Transpiration at maximum stress' & ,'[ kg/m2/s]','(icohort)' ) @@ -25281,7 +25564,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_water_supply & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_WATER_SUPPLY_CO :41:hist:mont:dcyc') + ,'MMEAN_WATER_SUPPLY_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Water supply' & ,'[ kg/m2/s]','(icohort)' ) @@ -25290,7 +25573,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_light_level & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_LIGHT_LEVEL_CO :41:hist:mont:dcyc') + ,'MMEAN_LIGHT_LEVEL_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Light level' & ,'[ --]','(icohort)' ) @@ -25299,7 +25582,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_light_level_beam & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_LIGHT_LEVEL_BEAM_CO :41:hist:mont:dcyc') + ,'MMEAN_LIGHT_LEVEL_BEAM_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Light level (direct radiation)' & ,'[ --]','(icohort)' ) @@ -25308,7 +25591,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_light_level_diff & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_LIGHT_LEVEL_DIFF_CO :41:hist:mont:dcyc') + ,'MMEAN_LIGHT_LEVEL_DIFF_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Light level (diffuse radiation)' & ,'[ --]','(icohort)' ) @@ -25317,7 +25600,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_par_l & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_PAR_L_CO :41:hist:mont:dcyc') + ,'MMEAN_PAR_L_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - PAR absorbed by leaves' & ,'[ W/m2]','(icohort)' ) @@ -25326,7 +25609,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_par_l_beam & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_PAR_L_BEAM_CO :41:hist:mont:dcyc') + ,'MMEAN_PAR_L_BEAM_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Direct PAR absorbed by leaves' & ,'[ W/m2]','(icohort)' ) @@ -25335,7 +25618,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_par_l_diff & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_PAR_L_DIFF_CO :41:hist:mont:dcyc') + ,'MMEAN_PAR_L_DIFF_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Diffuse PAR absorbed by leaves' & ,'[ W/m2]','(icohort)' ) @@ -25344,7 +25627,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_rshort_l & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RSHORT_L_CO :41:hist:mont:dcyc') + ,'MMEAN_RSHORT_L_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Shortwave radiation absorbed by leaves' & ,'[ W/m2]','(icohort)' ) @@ -25353,7 +25636,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_rlong_l & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RLONG_L_CO :41:hist:mont:dcyc') + ,'MMEAN_RLONG_L_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Longwave radiation absorbed by leaves' & ,'[ W/m2]','(icohort)' ) @@ -25362,7 +25645,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_sensible_lc & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SENSIBLE_LC_CO :41:hist:mont:dcyc') + ,'MMEAN_SENSIBLE_LC_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Sensible heat' & ,'[ W/m2]','(icohort)' ) @@ -25371,7 +25654,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_vapor_lc & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_VAPOR_LC_CO :41:hist:mont:dcyc') + ,'MMEAN_VAPOR_LC_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Leaf evaporation' & ,'[ kg/m2/s]','(icohort)' ) @@ -25380,7 +25663,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_transp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_TRANSP_CO :41:hist:mont:dcyc') + ,'MMEAN_TRANSP_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Leaf transpiration' & ,'[ kg/m2/s]','(icohort)' ) @@ -25389,7 +25672,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_intercepted_al & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_INTERCEPTED_AL_CO :41:hist:mont:dcyc') + ,'MMEAN_INTERCEPTED_AL_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Leaf interception' & ,'[ kg/m2/s]','(icohort)' ) @@ -25398,7 +25681,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_wshed_lg & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_WSHED_LG_CO :41:hist:mont:dcyc') + ,'MMEAN_WSHED_LG_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Leaf shedding' & ,'[ kg/m2/s]','(icohort)' ) @@ -25407,7 +25690,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_rshort_w & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RSHORT_W_CO :41:hist:mont:dcyc') + ,'MMEAN_RSHORT_W_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Shortwave radiation absorbed by wood' & ,'[ W/m2]','(icohort)' ) @@ -25416,7 +25699,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_rlong_w & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_RLONG_W_CO :41:hist:mont:dcyc') + ,'MMEAN_RLONG_W_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Longwave radiation absorbed by wood' & ,'[ W/m2]','(icohort)' ) @@ -25425,7 +25708,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_sensible_wc & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_SENSIBLE_WC_CO :41:hist:mont:dcyc') + ,'MMEAN_SENSIBLE_WC_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Sensible heat' & ,'[ W/m2]','(icohort)' ) @@ -25434,7 +25717,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_vapor_wc & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_VAPOR_WC_CO :41:hist:mont:dcyc') + ,'MMEAN_VAPOR_WC_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Wood evaporation' & ,'[ kg/m2/s]','(icohort)' ) @@ -25443,7 +25726,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_intercepted_aw & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_INTERCEPTED_AW_CO :41:hist:mont:dcyc') + ,'MMEAN_INTERCEPTED_AW_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Wood interception' & ,'[ kg/m2/s]','(icohort)' ) @@ -25452,7 +25735,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_wshed_wg & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_WSHED_WG_CO :41:hist:mont:dcyc') + ,'MMEAN_WSHED_WG_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Wood shedding' & ,'[ kg/m2/s]','(icohort)' ) @@ -25461,7 +25744,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_lai & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_LAI_CO :41:hist:mont:dcyc') + ,'MMEAN_LAI_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Leaf area index' & ,'[ m2leaf/m2]','(icohort)' ) @@ -25470,7 +25753,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_bleaf & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_BLEAF_CO :41:hist:mont:dcyc') + ,'MMEAN_BLEAF_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Leaf biomass' & ,'[ kgC/pl]','(icohort)' ) @@ -25479,7 +25762,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_broot & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_BROOT_CO :41:hist:mont:dcyc') + ,'MMEAN_BROOT_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Root biomass' & ,'[ kgC/pl]','(icohort)' ) @@ -25488,7 +25771,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_bstorage & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_BSTORAGE_CO :41:hist:mont:dcyc') + ,'MMEAN_BSTORAGE_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Storage biomass' & ,'[ kgC/pl]','(icohort)' ) @@ -25497,7 +25780,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_leaf_maintenance & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_LEAF_MAINTENANCE_CO :41:hist:mont:dcyc') + ,'MMEAN_LEAF_MAINTENANCE_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Leaf maintenance rate' & ,'[ kgC/pl/yr]','(icohort)' ) @@ -25506,7 +25789,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_root_maintenance & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_ROOT_MAINTENANCE_CO :41:hist:mont:dcyc') + ,'MMEAN_ROOT_MAINTENANCE_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Root maintenance rate' & ,'[ kgC/pl/yr]','(icohort)' ) @@ -25515,7 +25798,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_leaf_drop & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_LEAF_DROP_CO :41:hist:mont:dcyc') + ,'MMEAN_LEAF_DROP_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Leaf drop' & ,'[ kgC/pl/yr]','(icohort)' ) @@ -25524,7 +25807,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_cb & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_CB_CO :41:hist:mont:dcyc') + ,'MMEAN_CB_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Carbon balance' & ,'[ kgC/pl/yr]','(icohort)' ) @@ -25533,7 +25816,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_nppleaf & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_NPPLEAF_CO :41:hist:mont:dcyc') + ,'MMEAN_NPPLEAF_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Net primary productivity - Leaf' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -25542,7 +25825,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_nppfroot & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_NPPFROOT_CO :41:hist:mont:dcyc') + ,'MMEAN_NPPFROOT_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Net primary productivity - Fine root' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -25551,7 +25834,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_nppsapwood & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_NPPSAPWOOD_CO :41:hist:mont:dcyc') + ,'MMEAN_NPPSAPWOOD_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Net primary productivity - Sap wood' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -25560,7 +25843,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_nppcroot & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_NPPCROOT_CO :41:hist:mont:dcyc') + ,'MMEAN_NPPCROOT_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Net primary productivity - Coarse root' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -25569,7 +25852,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_nppseeds & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_NPPSEEDS_CO :41:hist:mont:dcyc') + ,'MMEAN_NPPSEEDS_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Net primary productivity - seeds' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -25578,7 +25861,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_nppwood & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_NPPWOOD_CO :41:hist:mont:dcyc') + ,'MMEAN_NPPWOOD_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Net primary productivity - heart wood' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -25587,7 +25870,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmean_nppdaily & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMEAN_NPPDAILY_CO :41:hist:mont:dcyc') + ,'MMEAN_NPPDAILY_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly mean - Net primary productivity - total' & ,'[ kgC/m2/yr]','(icohort)' ) @@ -25596,7 +25879,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmsqu_gpp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_GPP_CO :41:hist:mont:dcyc') + ,'MMSQU_GPP_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Gross primary productivity' & ,'[kgC2/m4/yr2]','(icohort)' ) @@ -25605,7 +25888,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmsqu_npp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_NPP_CO :41:hist:mont:dcyc') + ,'MMSQU_NPP_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Net primary productivity' & ,'[kgC2/m4/yr2]','(icohort)' ) @@ -25614,7 +25897,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmsqu_plresp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_PLRESP_CO :41:hist:mont:dcyc') + ,'MMSQU_PLRESP_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Plant respiration' & ,'[kgC2/m4/yr2]','(icohort)' ) @@ -25623,7 +25906,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmsqu_sensible_lc & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_SENSIBLE_LC_CO :41:hist:mont:dcyc') + ,'MMSQU_SENSIBLE_LC_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Sensible heat' & ,'[ W2/m4]','(icohort)' ) @@ -25632,7 +25915,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmsqu_vapor_lc & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_VAPOR_LC_CO :41:hist:mont:dcyc') + ,'MMSQU_VAPOR_LC_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Leaf evaporation' & ,'[ kg2/m4/s2]','(icohort)' ) @@ -25641,7 +25924,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmsqu_transp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_TRANSP_CO :41:hist:mont:dcyc') + ,'MMSQU_TRANSP_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Leaf transpiration' & ,'[ kg2/m4/s2]','(icohort)' ) @@ -25650,7 +25933,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmsqu_sensible_wc & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_SENSIBLE_WC_CO :41:hist:mont:dcyc') + ,'MMSQU_SENSIBLE_WC_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Sensible heat' & ,'[ W2/m4]','(icohort)' ) @@ -25659,7 +25942,7 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max nvar = nvar+1 call vtable_edio_r(npts,cpatch%mmsqu_vapor_wc & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'MMSQU_VAPOR_WC_CO :41:hist:mont:dcyc') + ,'MMSQU_VAPOR_WC_CO :41:'//trim(eorq_keys)) call metadata_edio(nvar,igr & ,'Monthly MSSq - Wood evaporation' & ,'[ kg2/m4/s2]','(icohort)' ) @@ -25688,15 +25971,28 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs implicit none !----- Arguments. -------------------------------------------------------------------! - type(patchtype), target :: cpatch - integer , intent(in) :: init - integer , intent(in) :: igr - integer , intent(in) :: var_len - integer , intent(in) :: max_ptrs - integer , intent(in) :: var_len_global - integer , intent(inout) :: nvar + type(patchtype) , target :: cpatch + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar !----- Local variables. -------------------------------------------------------------! - integer :: npts + integer :: npts + character(len=str_len) :: eorq_keys + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + ! Decide whether to write the mean diel to the history file. ! + !------------------------------------------------------------------------------------! + if (history_eorq) then + eorq_keys = 'hist:dcyc' + else + eorq_keys = 'dcyc' + end if !------------------------------------------------------------------------------------! @@ -25713,7 +26009,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_gpp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_GPP_CO :-41:hist:dcyc' ) + ,'QMEAN_GPP_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Gross primary productivity' & ,'[ kgC/m2/yr]','(ndcycle,icohort)' ) @@ -25722,7 +26018,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_npp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_NPP_CO :-41:hist:dcyc' ) + ,'QMEAN_NPP_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Net primary productivity' & ,'[ kgC/m2/yr]','(ndcycle,icohort)' ) @@ -25731,7 +26027,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_leaf_resp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_LEAF_RESP_CO :-41:hist:dcyc' ) + ,'QMEAN_LEAF_RESP_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Leaf respiration' & ,'[ kgC/m2/yr]','(ndcycle,icohort)' ) @@ -25740,7 +26036,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_root_resp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_ROOT_RESP_CO :-41:hist:dcyc' ) + ,'QMEAN_ROOT_RESP_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Root respiration' & ,'[ kgC/m2/yr]','(ndcycle,icohort)' ) @@ -25749,7 +26045,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_growth_resp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_GROWTH_RESP_CO :-41:hist:dcyc' ) + ,'QMEAN_GROWTH_RESP_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Growth respiration' & ,'[ kgC/m2/yr]','(ndcycle,icohort)' ) @@ -25758,7 +26054,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_storage_resp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_STORAGE_RESP_CO :-41:hist:dcyc' ) + ,'QMEAN_STORAGE_RESP_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Storage respiration' & ,'[ kgC/m2/yr]','(ndcycle,icohort)' ) @@ -25767,7 +26063,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_vleaf_resp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_VLEAF_RESP_CO :-41:hist:dcyc' ) + ,'QMEAN_VLEAF_RESP_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Virtual leaf respiration' & ,'[ kgC/m2/yr]','(ndcycle,icohort)' ) @@ -25776,7 +26072,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_plresp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_PLRESP_CO :-41:hist:dcyc' ) + ,'QMEAN_PLRESP_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Plant respiration' & ,'[ kgC/m2/yr]','(ndcycle,icohort)' ) @@ -25785,7 +26081,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_leaf_energy & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_LEAF_ENERGY_CO :-41:hist:dcyc' ) + ,'QMEAN_LEAF_ENERGY_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Leaf internal energy' & ,'[ J/m2]','(ndcycle,icohort)' ) @@ -25794,7 +26090,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_leaf_water & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_LEAF_WATER_CO :-41:hist:dcyc' ) + ,'QMEAN_LEAF_WATER_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Leaf surface water' & ,'[ kg/m2]','(ndcycle,icohort)' ) @@ -25803,7 +26099,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_leaf_hcap & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_LEAF_HCAP_CO :-41:hist:dcyc' ) + ,'QMEAN_LEAF_HCAP_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Leaf heat capacity' & ,'[ J/m2/K]','(ndcycle,icohort)' ) @@ -25812,7 +26108,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_leaf_vpdef & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_LEAF_VPDEF_CO :-41:hist:dcyc' ) + ,'QMEAN_LEAF_VPDEF_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Leaf vapour pressure deficit' & ,'[ Pa]','(ndcycle,icohort)' ) @@ -25821,7 +26117,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_leaf_temp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_LEAF_TEMP_CO :-41:hist:dcyc' ) + ,'QMEAN_LEAF_TEMP_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Leaf temperature' & ,'[ K]','(ndcycle,icohort)' ) @@ -25830,7 +26126,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_leaf_fliq & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_LEAF_FLIQ_CO :-41:hist:dcyc' ) + ,'QMEAN_LEAF_FLIQ_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Liquid fraction' & ,'[ --]','(ndcycle,icohort)' ) @@ -25839,7 +26135,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_leaf_gsw & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_LEAF_GSW_CO :-41:hist:dcyc' ) + ,'QMEAN_LEAF_GSW_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Stomatal conductance' & ,'[kg/m2leaf/s]','(ndcycle,icohort)' ) @@ -25848,7 +26144,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_leaf_gbw & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_LEAF_GBW_CO :-41:hist:dcyc' ) + ,'QMEAN_LEAF_GBW_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Leaf boundary layer conductance' & ,'[kg/m2leaf/s]','(ndcycle,icohort)' ) @@ -25857,7 +26153,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_wood_energy & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_WOOD_ENERGY_CO :-41:hist:dcyc' ) + ,'QMEAN_WOOD_ENERGY_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Wood internal energy' & ,'[ J/m2]','(ndcycle,icohort)' ) @@ -25866,7 +26162,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_wood_water & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_WOOD_WATER_CO :-41:hist:dcyc' ) + ,'QMEAN_WOOD_WATER_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Wood surface water' & ,'[ kg/m2]','(ndcycle,icohort)' ) @@ -25875,7 +26171,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_wood_hcap & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_WOOD_HCAP_CO :-41:hist:dcyc' ) + ,'QMEAN_WOOD_HCAP_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Wood heat capacity' & ,'[ J/m2/K]','(ndcycle,icohort)' ) @@ -25884,7 +26180,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_wood_temp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_WOOD_TEMP_CO :-41:hist:dcyc' ) + ,'QMEAN_WOOD_TEMP_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Wood temperature' & ,'[ K]','(ndcycle,icohort)' ) @@ -25893,7 +26189,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_wood_fliq & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_WOOD_FLIQ_CO :-41:hist:dcyc' ) + ,'QMEAN_WOOD_FLIQ_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Liquid fraction' & ,'[ --]','(ndcycle,icohort)' ) @@ -25902,7 +26198,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_wood_gbw & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_WOOD_GBW_CO :-41:hist:dcyc' ) + ,'QMEAN_WOOD_GBW_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Wood boundary layer conductance' & ,'[kg/m2wood/s]','(ndcycle,icohort)' ) @@ -25911,7 +26207,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_fs_open & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_FS_OPEN_CO :-41:hist:dcyc' ) + ,'QMEAN_FS_OPEN_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Net stress factor' & ,'[ --]','(ndcycle,icohort)' ) @@ -25920,7 +26216,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_fsw & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_FSW_CO :-41:hist:dcyc' ) + ,'QMEAN_FSW_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Moisture stress' & ,'[ --]','(ndcycle,icohort)' ) @@ -25929,7 +26225,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_fsn & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_FSN_CO :-41:hist:dcyc' ) + ,'QMEAN_FSN_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Nitrogen stress' & ,'[ --]','(ndcycle,icohort)' ) @@ -25938,7 +26234,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_psi_open & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_PSI_OPEN_CO :-41:hist:dcyc' ) + ,'QMEAN_PSI_OPEN_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Transpiration with no stress' & ,'[ kg/m2/s]','(ndcycle,icohort)' ) @@ -25947,7 +26243,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_psi_closed & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_PSI_CLOSED_CO :-41:hist:dcyc' ) + ,'QMEAN_PSI_CLOSED_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Transpiration at maximum stress' & ,'[ kg/m2/s]','(ndcycle,icohort)' ) @@ -25956,7 +26252,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_water_supply & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_WATER_SUPPLY_CO :-41:hist:dcyc' ) + ,'QMEAN_WATER_SUPPLY_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Water supply' & ,'[ kg/m2/s]','(ndcycle,icohort)' ) @@ -25965,7 +26261,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_light_level & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_LIGHT_LEVEL_CO :-41:hist:dcyc' ) + ,'QMEAN_LIGHT_LEVEL_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Light level' & ,'[ --]','(ndcycle,icohort)' ) @@ -25974,7 +26270,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_light_level_beam & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_LIGHT_LEVEL_BEAM_CO :-41:hist:dcyc' ) + ,'QMEAN_LIGHT_LEVEL_BEAM_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Light level (direct radiation)' & ,'[ --]','(ndcycle,icohort)' ) @@ -25983,7 +26279,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_light_level_diff & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_LIGHT_LEVEL_DIFF_CO :-41:hist:dcyc' ) + ,'QMEAN_LIGHT_LEVEL_DIFF_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Light level (diffuse radiation)' & ,'[ --]','(ndcycle,icohort)' ) @@ -25992,7 +26288,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_par_l & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_PAR_L_CO :-41:hist:dcyc' ) + ,'QMEAN_PAR_L_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - PAR absorbed by leaves' & ,'[ W/m2]','(ndcycle,icohort)' ) @@ -26001,7 +26297,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_par_l_beam & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_PAR_L_BEAM_CO :-41:hist:dcyc' ) + ,'QMEAN_PAR_L_BEAM_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Direct PAR absorbed by leaves' & ,'[ W/m2]','(ndcycle,icohort)' ) @@ -26010,7 +26306,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_par_l_diff & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_PAR_L_DIFF_CO :-41:hist:dcyc' ) + ,'QMEAN_PAR_L_DIFF_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Diffuse PAR absorbed by leaves' & ,'[ W/m2]','(ndcycle,icohort)' ) @@ -26019,7 +26315,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_rshort_l & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RSHORT_L_CO :-41:hist:dcyc' ) + ,'QMEAN_RSHORT_L_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Shortwave radiation absorbed by leaves' & ,'[ W/m2]','(ndcycle,icohort)' ) @@ -26028,7 +26324,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_rlong_l & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RLONG_L_CO :-41:hist:dcyc' ) + ,'QMEAN_RLONG_L_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Longwave radiation absorbed by leaves' & ,'[ W/m2]','(ndcycle,icohort)' ) @@ -26037,7 +26333,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_sensible_lc & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SENSIBLE_LC_CO :-41:hist:dcyc' ) + ,'QMEAN_SENSIBLE_LC_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Sensible heat' & ,'[ W/m2]','(ndcycle,icohort)' ) @@ -26046,7 +26342,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_vapor_lc & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_VAPOR_LC_CO :-41:hist:dcyc' ) + ,'QMEAN_VAPOR_LC_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Leaf evaporation' & ,'[ kg/m2/s]','(ndcycle,icohort)' ) @@ -26055,7 +26351,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_transp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_TRANSP_CO :-41:hist:dcyc' ) + ,'QMEAN_TRANSP_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Leaf transpiration' & ,'[ kg/m2/s]','(ndcycle,icohort)' ) @@ -26064,7 +26360,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_intercepted_al & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_INTERCEPTED_AL_CO :-41:hist:dcyc' ) + ,'QMEAN_INTERCEPTED_AL_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Leaf interception' & ,'[ kg/m2/s]','(ndcycle,icohort)' ) @@ -26073,7 +26369,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_wshed_lg & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_WSHED_LG_CO :-41:hist:dcyc' ) + ,'QMEAN_WSHED_LG_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Leaf shedding' & ,'[ kg/m2/s]','(ndcycle,icohort)' ) @@ -26082,7 +26378,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_rshort_w & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RSHORT_W_CO :-41:hist:dcyc' ) + ,'QMEAN_RSHORT_W_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Shortwave radiation absorbed by wood' & ,'[ W/m2]','(ndcycle,icohort)' ) @@ -26091,7 +26387,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_rlong_w & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_RLONG_W_CO :-41:hist:dcyc' ) + ,'QMEAN_RLONG_W_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Longwave radiation absorbed by wood' & ,'[ W/m2]','(ndcycle,icohort)' ) @@ -26100,7 +26396,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_sensible_wc & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_SENSIBLE_WC_CO :-41:hist:dcyc' ) + ,'QMEAN_SENSIBLE_WC_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Sensible heat' & ,'[ W/m2]','(ndcycle,icohort)' ) @@ -26109,7 +26405,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_vapor_wc & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_VAPOR_WC_CO :-41:hist:dcyc' ) + ,'QMEAN_VAPOR_WC_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Wood evaporation' & ,'[ kg/m2/s]','(ndcycle,icohort)' ) @@ -26118,7 +26414,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_intercepted_aw & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_INTERCEPTED_AW_CO :-41:hist:dcyc' ) + ,'QMEAN_INTERCEPTED_AW_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Wood interception' & ,'[ kg/m2/s]','(ndcycle,icohort)' ) @@ -26127,7 +26423,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmean_wshed_wg & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMEAN_WSHED_WG_CO :-41:hist:dcyc' ) + ,'QMEAN_WSHED_WG_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'Mean diel - Wood shedding' & ,'[ kg/m2/s]','(ndcycle,icohort)' ) @@ -26136,7 +26432,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmsqu_gpp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_GPP_CO :-41:hist:dcyc' ) + ,'QMSQU_GPP_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Gross primary productivity' & ,'[kgC2/m4/yr2]','(ndcycle,icohort)' ) @@ -26145,7 +26441,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmsqu_npp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_NPP_CO :-41:hist:dcyc' ) + ,'QMSQU_NPP_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Net primary productivity' & ,'[kgC2/m4/yr2]','(ndcycle,icohort)' ) @@ -26154,7 +26450,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmsqu_plresp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_PLRESP_CO :-41:hist:dcyc' ) + ,'QMSQU_PLRESP_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Plant respiration' & ,'[kgC2/m4/yr2]','(ndcycle,icohort)' ) @@ -26163,7 +26459,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmsqu_sensible_lc & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_SENSIBLE_LC_CO :-41:hist:dcyc' ) + ,'QMSQU_SENSIBLE_LC_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Sensible heat' & ,'[ W2/m4]','(ndcycle,icohort)' ) @@ -26172,7 +26468,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmsqu_vapor_lc & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_VAPOR_LC_CO :-41:hist:dcyc' ) + ,'QMSQU_VAPOR_LC_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Leaf evaporation' & ,'[ kg2/m4/s2]','(ndcycle,icohort)' ) @@ -26181,7 +26477,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmsqu_transp & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_TRANSP_CO :-41:hist:dcyc' ) + ,'QMSQU_TRANSP_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Leaf transpiration' & ,'[ kg2/m4/s2]','(ndcycle,icohort)' ) @@ -26190,7 +26486,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmsqu_sensible_wc & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_SENSIBLE_WC_CO :-41:hist:dcyc' ) + ,'QMSQU_SENSIBLE_WC_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Sensible heat' & ,'[ W2/m4]','(ndcycle,icohort)' ) @@ -26199,7 +26495,7 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs nvar = nvar+1 call vtable_edio_r(npts,cpatch%qmsqu_vapor_wc & ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & - ,'QMSQU_VAPOR_WC_CO :-41:hist:dcyc' ) + ,'QMSQU_VAPOR_WC_CO :-41:'//trim(eorq_keys) ) call metadata_edio(nvar,igr & ,'MSSq diel - Wood evaporation' & ,'[ kg2/m4/s2]','(ndcycle,icohort)' ) @@ -26229,20 +26525,33 @@ subroutine filltab_patchtype_p48(cpatch,igr,init,var_len,var_len_global,max_ptrs implicit none !----- Arguments. -------------------------------------------------------------------! - type(patchtype), target :: cpatch - integer , intent(in) :: init - integer , intent(in) :: igr - integer , intent(in) :: var_len - integer , intent(in) :: max_ptrs - integer , intent(in) :: var_len_global - integer , intent(inout) :: nvar + type(patchtype) , target :: cpatch + integer , intent(in) :: init + integer , intent(in) :: igr + integer , intent(in) :: var_len + integer , intent(in) :: max_ptrs + integer , intent(in) :: var_len_global + integer , intent(inout) :: nvar !----- Local variables. -------------------------------------------------------------! - integer :: npts + integer :: npts + character(len=str_len) :: eorq_keys !------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! + ! Decide whether to write the monthly means to the history file. ! + !------------------------------------------------------------------------------------! + if (history_eorq) then + eorq_keys = 'hist:mont:dcyc' + else + eorq_keys = 'mont:dcyc' + end if + !------------------------------------------------------------------------------------! + + + !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! @@ -26262,7 +26571,7 @@ subroutine filltab_patchtype_p48(cpatch,igr,init,var_len,var_len_global,max_ptrs if (associated(cpatch%mmean_mort_rate)) then nvar=nvar+1 call vtable_edio_r(npts,cpatch%mmean_mort_rate,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_MORT_RATE_CO :48:hist:mont:dcyc') + var_len,var_len_global,max_ptrs,'MMEAN_MORT_RATE_CO :48:'//trim(eorq_keys)) call metadata_edio(nvar,igr,'Monthly mean mortality rate','[1/yr]','icohort') end if !------------------------------------------------------------------------------------! diff --git a/ED/src/mpi/ed_mpass_init.f90 b/ED/src/mpi/ed_mpass_init.f90 index 946af9f10..64ae67257 100644 --- a/ED/src/mpi/ed_mpass_init.f90 +++ b/ED/src/mpi/ed_mpass_init.f90 @@ -141,7 +141,10 @@ subroutine ed_masterput_nl(par_run) , writing_dcyc & ! intent(in) , writing_year & ! intent(in) , writing_long & ! intent(in) - , writing_eorq ! ! intent(in) + , writing_eorq & ! intent(in) + , history_fast & ! intent(in) + , history_dail & ! intent(in) + , history_eorq ! ! intent(in) use canopy_air_coms , only : icanturb & ! intent(in) , isfclyrm & ! intent(in) , ied_grndvap & ! intent(in) @@ -550,6 +553,9 @@ subroutine ed_masterput_nl(par_run) call MPI_Bcast(writing_year ,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) call MPI_Bcast(writing_long ,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) call MPI_Bcast(writing_eorq ,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) + call MPI_Bcast(history_fast ,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) + call MPI_Bcast(history_dail ,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) + call MPI_Bcast(history_eorq ,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) call MPI_Bcast(fast_diagnostics,1,MPI_LOGICAL,mainnum,MPI_COMM_WORLD,ierr) !---------------------------------------------------------------------------------------! @@ -1270,7 +1276,10 @@ subroutine ed_nodeget_nl , writing_dcyc & ! intent(out) , writing_year & ! intent(out) , writing_long & ! intent(out) - , writing_eorq ! ! intent(out) + , writing_eorq & ! intent(out) + , history_fast & ! intent(out) + , history_dail & ! intent(out) + , history_eorq ! ! intent(out) use canopy_air_coms , only : icanturb & ! intent(out) , isfclyrm & ! intent(out) , ied_grndvap & ! intent(out) @@ -1683,6 +1692,9 @@ subroutine ed_nodeget_nl call MPI_Bcast(writing_year ,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) call MPI_Bcast(writing_long ,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) call MPI_Bcast(writing_eorq ,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) + call MPI_Bcast(history_fast ,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) + call MPI_Bcast(history_dail ,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) + call MPI_Bcast(history_eorq ,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) call MPI_Bcast(fast_diagnostics,1,MPI_LOGICAL,master_num,MPI_COMM_WORLD,ierr) !---------------------------------------------------------------------------------------! From 6ee2c33c56702633201a62b48eb8d1e2cdc9ecc8 Mon Sep 17 00:00:00 2001 From: Marcos Longo Date: Sun, 18 Nov 2012 00:43:35 -0500 Subject: [PATCH 3/6] Minor bug fixes on BRAMS, so it also works with the new variables. --- BRAMS/build/bin/dependency.mk | 805 ---------------------------------- BRAMS/src/ed2/edcp_driver.f90 | 41 +- BRAMS/src/ed2/edcp_met.f90 | 21 +- 3 files changed, 23 insertions(+), 844 deletions(-) diff --git a/BRAMS/build/bin/dependency.mk b/BRAMS/build/bin/dependency.mk index 91cf609a3..e69de29bb 100644 --- a/BRAMS/build/bin/dependency.mk +++ b/BRAMS/build/bin/dependency.mk @@ -1,805 +0,0 @@ -# DO NOT DELETE THIS LINE - used by make depend -cyclic_mod.o: grid_dims.mod -rbnd.o: catt_start.mod mem_basic.mod mem_grid.mod mem_scratch.mod mem_tend.mod -rbnd.o: mem_turb.mod node_mod.mod ref_sounding.mod therm_lib.mod var_tables.mod -rbnd_adap.o: mem_grid.mod ref_sounding.mod -dry_dep.o: extras.mod leaf_coms.mod mem_basic.mod mem_grid.mod mem_leaf.mod -dry_dep.o: mem_micro.mod mem_scalar.mod mem_scratch.mod mem_turb.mod -dry_dep.o: rconstants.mod -emission_source_map.o: extras.mod grid_dims.mod mem_basic.mod mem_grid.mod -emission_source_map.o: mem_grid_dim_defs.mod mem_scalar.mod mem_scratch.mod -extra.o: var_tables.mod -plumerise_vector.o: extras.mod mem_basic.mod mem_grid.mod mem_scalar.mod -plumerise_vector.o: node_mod.mod rconstants.mod therm_lib.mod -coriolis.o: mem_basic.mod mem_grid.mod mem_scratch.mod mem_tend.mod -coriolis.o: rconstants.mod ref_sounding.mod -local_proc.o: io_params.mod mem_grid.mod node_mod.mod rconstants.mod -local_proc.o: ref_sounding.mod rpara.mod therm_lib.mod -mod_GhostBlock.o: mod_ghostblockpartition.mod -mod_advect_kit.o: mem_basic.mod mem_grid.mod mem_tend.mod mod_ghostblock.mod -mod_advect_kit.o: mod_ghostblockpartition.mod node_mod.mod var_tables.mod -model.o: advect_kit.mod catt_start.mod dtset.mod grid_dims.mod io_params.mod -model.o: mem_grid.mod mem_leaf.mod node_mod.mod rpara.mod -modsched.o: mem_basic.mod mem_grid.mod mem_scratch.mod -raco.o: mem_basic.mod mem_grid.mod mem_scratch.mod mem_tend.mod node_mod.mod -raco.o: rconstants.mod therm_lib.mod -raco_adap.o: mem_grid.mod mem_scratch.mod node_mod.mod rconstants.mod -radvc.o: mem_basic.mod mem_grid.mod mem_scratch.mod mem_tend.mod var_tables.mod -rams_master.o: catt_start.mod dtset.mod emission_source_map.mod grid_dims.mod -rams_master.o: io_params.mod mem_cuparm.mod mem_emiss.mod mem_grid.mod -rams_master.o: mem_leaf.mod mem_mass.mod mem_oda.mod mem_radiate.mod -rams_master.o: mem_varinit.mod node_mod.mod rpara.mod teb_spm_start.mod -ref_sounding.o: grid_dims.mod -rnode.o: advect_kit.mod catt_start.mod dtset.mod grid_dims.mod io_params.mod -rnode.o: mem_aerad.mod mem_cuparm.mod mem_grid.mod mem_leaf.mod mem_oda.mod -rnode.o: mem_radiate.mod node_mod.mod var_tables.mod -rthrm.o: mem_basic.mod mem_grid.mod mem_micro.mod mem_scratch.mod micphys.mod -rthrm.o: node_mod.mod rconstants.mod therm_lib.mod -rtimh.o: advect_kit.mod catt_start.mod emission_source_map.mod mem_all.mod -rtimh.o: mem_basic.mod mem_cuparm.mod mem_emiss.mod mem_grid.mod mem_leaf.mod -rtimh.o: mem_mass.mod mem_mnt_advec.mod mem_oda.mod mem_scalar.mod mem_turb.mod -rtimh.o: mem_varinit.mod node_mod.mod teb_spm_start.mod therm_lib.mod -rtimi.o: mem_basic.mod mem_grid.mod mem_scratch.mod mem_tend.mod node_mod.mod -rtimi.o: var_tables.mod -cu_read.o: grid_dims.mod mem_basic.mod mem_cuparm.mod mem_grid.mod -grell_coms.o: grid_dims.mod -grell_cupar_aux.o: grell_coms.mod mem_ensemble.mod mem_scratch_grell.mod -grell_cupar_aux.o: rconstants.mod therm_lib.mod -grell_cupar_downdraft.o: rconstants.mod therm_lib.mod -grell_cupar_driver.o: catt_start.mod extras.mod grell_coms.mod io_params.mod -grell_cupar_driver.o: mem_basic.mod mem_cuparm.mod mem_ensemble.mod mem_grid.mod -grell_cupar_driver.o: mem_mass.mod mem_micro.mod mem_scalar.mod mem_scratch.mod -grell_cupar_driver.o: mem_scratch_grell.mod mem_tend.mod mem_turb.mod -grell_cupar_driver.o: micphys.mod node_mod.mod therm_lib.mod -grell_cupar_dynamic.o: grell_coms.mod grid_dims.mod mem_ensemble.mod -grell_cupar_dynamic.o: mem_scratch_grell.mod rconstants.mod therm_lib.mod -grell_cupar_ensemble.o: rconstants.mod -grell_cupar_environment.o: grell_coms.mod rconstants.mod therm_lib.mod -grell_cupar_feedback.o: mem_ensemble.mod mem_scratch_grell.mod rconstants.mod -grell_cupar_static.o: grid_dims.mod mem_ensemble.mod mem_scratch_grell.mod -grell_cupar_static.o: rconstants.mod therm_lib.mod -grell_cupar_updraft.o: mem_cuparm.mod rconstants.mod therm_lib.mod -grell_extras_catt.o: grell_coms.mod mem_basic.mod mem_ensemble.mod mem_grid.mod -grell_extras_catt.o: mem_scalar.mod mem_scratch.mod mem_scratch_grell.mod -grell_extras_catt.o: mem_tconv.mod rconstants.mod -kuo_cupar_driver.o: conv_coms.mod mem_basic.mod mem_cuparm.mod mem_grid.mod -kuo_cupar_driver.o: mem_scratch.mod mem_tend.mod node_mod.mod rconstants.mod -kuo_cupar_driver.o: therm_lib.mod -mem_cuparm.o: grid_dims.mod var_tables.mod -rconv_driver.o: mem_basic.mod mem_cuparm.mod mem_grid.mod mem_scratch.mod -rconv_driver.o: mem_tend.mod mem_turb.mod node_mod.mod -shcu_vars_const.o: conv_coms.mod grid_dims.mod -souza_cupar_driver.o: conv_coms.mod mem_basic.mod mem_cuparm.mod mem_grid.mod -souza_cupar_driver.o: mem_micro.mod mem_scratch.mod mem_tend.mod mem_turb.mod -souza_cupar_driver.o: node_mod.mod shcu_vars_const.mod therm_lib.mod -edcp_driver.o: consts_coms.mod ed_misc_coms.mod ed_node_coms.mod -edcp_driver.o: ed_state_vars.mod ed_work_vars.mod grid_coms.mod io_params.mod -edcp_driver.o: leaf_coms.mod mem_edcp.mod mem_grid.mod mem_leaf.mod -edcp_driver.o: phenology_aux.mod rk4_coms.mod soil_coms.mod -edcp_init.o: ed_max_dims.mod ed_node_coms.mod ed_para_coms.mod ed_state_vars.mod -edcp_init.o: ed_work_vars.mod grid_coms.mod mem_grid.mod mem_leaf.mod -edcp_init.o: mem_polygons.mod node_mod.mod rpara.mod soil_coms.mod -edcp_lake_driver.o: canopy_air_coms.mod canopy_struct_dynamics.mod -edcp_lake_driver.o: consts_coms.mod io_params.mod lake_coms.mod leaf_coms.mod -edcp_lake_driver.o: mem_basic.mod mem_edcp.mod mem_grid.mod mem_leaf.mod -edcp_lake_driver.o: mem_radiate.mod node_mod.mod rk4_coms.mod therm_lib.mod -edcp_lake_driver.o: therm_lib8.mod -edcp_lake_misc.o: canopy_air_coms.mod canopy_struct_dynamics.mod consts_coms.mod -edcp_lake_misc.o: ed_misc_coms.mod lake_coms.mod leaf_coms.mod mem_leaf.mod -edcp_lake_misc.o: rk4_coms.mod therm_lib8.mod -edcp_lake_stepper.o: ed_misc_coms.mod lake_coms.mod rk4_coms.mod -edcp_load_namelist.o: canopy_air_coms.mod canopy_layer_coms.mod -edcp_load_namelist.o: canopy_radiation_coms.mod consts_coms.mod decomp_coms.mod -edcp_load_namelist.o: detailed_coms.mod disturb_coms.mod ed_max_dims.mod -edcp_load_namelist.o: ed_misc_coms.mod grid_coms.mod grid_dims.mod io_params.mod -edcp_load_namelist.o: leaf_coms.mod mem_edcp.mod mem_grid.mod mem_leaf.mod -edcp_load_namelist.o: mem_polygons.mod mem_radiate.mod met_driver_coms.mod -edcp_load_namelist.o: optimiz_coms.mod pft_coms.mod phenology_coms.mod -edcp_load_namelist.o: physiology_coms.mod rk4_coms.mod soil_coms.mod -edcp_met.o: canopy_radiation_coms.mod ed_max_dims.mod ed_misc_coms.mod -edcp_met.o: ed_node_coms.mod ed_state_vars.mod leaf_coms.mod mem_basic.mod -edcp_met.o: mem_cuparm.mod mem_edcp.mod mem_grid.mod mem_leaf.mod mem_micro.mod -edcp_met.o: mem_radiate.mod mem_turb.mod met_driver_coms.mod micphys.mod -edcp_met.o: node_mod.mod rconstants.mod soil_coms.mod therm_lib.mod -edcp_met_init.o: ed_state_vars.mod ed_therm_lib.mod grid_coms.mod leaf_coms.mod -edcp_met_init.o: mem_grid.mod mem_leaf.mod mem_radiate.mod rconstants.mod -edcp_met_init.o: soil_coms.mod therm_lib.mod -edcp_model.o: consts_coms.mod ed_max_dims.mod ed_misc_coms.mod ed_node_coms.mod -edcp_model.o: ed_state_vars.mod grid_coms.mod grid_dims.mod io_params.mod -edcp_model.o: mem_edcp.mod mem_grid.mod mem_polygons.mod rk4_coms.mod -edcp_model.o: rk4_driver.mod -edcp_mpiutils.o: canopy_air_coms.mod canopy_layer_coms.mod -edcp_mpiutils.o: canopy_radiation_coms.mod decomp_coms.mod detailed_coms.mod -edcp_mpiutils.o: disturb_coms.mod ed_max_dims.mod ed_misc_coms.mod grid_coms.mod -edcp_mpiutils.o: mem_edcp.mod mem_polygons.mod met_driver_coms.mod -edcp_mpiutils.o: optimiz_coms.mod pft_coms.mod phenology_coms.mod -edcp_mpiutils.o: physiology_coms.mod rk4_coms.mod soil_coms.mod -edcp_para_init.o: ed_misc_coms.mod ed_node_coms.mod ed_work_vars.mod -edcp_para_init.o: io_params.mod mem_grid.mod mem_leaf.mod mem_polygons.mod -edcp_para_init.o: node_mod.mod soil_coms.mod -lake_coms.o: consts_coms.mod -mem_edcp.o: var_tables.mod -cond_read.o: grid_dims.mod mem_grid.mod mem_varinit.mod -cond_update.o: an_header.mod grid_dims.mod grid_struct.mod mem_basic.mod -cond_update.o: mem_grid.mod mem_varinit.mod rconstants.mod var_tables.mod -mem_oda.o: grid_dims.mod var_tables.mod -nud_analysis.o: mem_basic.mod mem_grid.mod mem_scratch.mod mem_tend.mod -nud_analysis.o: mem_varinit.mod node_mod.mod -nud_read.o: grid_dims.mod mem_grid.mod mem_varinit.mod -nud_update.o: an_header.mod grid_dims.mod grid_struct.mod mem_aerad.mod -nud_update.o: mem_basic.mod mem_grid.mod mem_varinit.mod rconstants.mod -nud_update.o: var_tables.mod -obs_input.o: grid_dims.mod -oda_krig.o: grid_dims.mod mem_oda.mod -oda_nudge.o: io_params.mod mem_basic.mod mem_grid.mod mem_oda.mod -oda_nudge.o: mem_scratch.mod mem_tend.mod node_mod.mod -oda_proc_obs.o: mem_grid.mod mem_oda.mod rconstants.mod therm_lib.mod -oda_read.o: grid_dims.mod mem_grid.mod mem_oda.mod -oda_sta_count.o: mem_grid.mod mem_oda.mod obs_input.mod -oda_sta_input.o: mem_grid.mod mem_oda.mod obs_input.mod -read_ralph.o: grid_dims.mod obs_input.mod rconstants.mod therm_lib.mod -varf_read.o: grid_dims.mod mem_grid.mod mem_varinit.mod -varf_update.o: grid_dims.mod mem_basic.mod mem_grid.mod mem_leaf.mod -varf_update.o: mem_scratch.mod mem_varinit.mod rconstants.mod ref_sounding.mod -varf_update.o: therm_lib.mod -adap_init.o: mem_leaf.mod -domain_decomp.o: grid_dims.mod -gridset.o: grid_dims.mod mem_grid.mod rconstants.mod -rams_grid.o: mem_grid.mod node_mod.mod rconstants.mod -rdint.o: catt_start.mod domain_decomp.mod emission_source_map.mod grell_coms.mod -rdint.o: grid_dims.mod io_params.mod isan_coms.mod leaf_coms.mod mem_basic.mod -rdint.o: mem_cuparm.mod mem_emiss.mod mem_gaspart.mod mem_grid.mod mem_leaf.mod -rdint.o: mem_mass.mod mem_micro.mod mem_mnt_advec.mod mem_oda.mod -rdint.o: mem_radiate.mod mem_scalar.mod mem_scratch.mod mem_soil_moisture.mod -rdint.o: mem_teb.mod mem_teb_common.mod mem_turb.mod mem_varinit.mod micphys.mod -rdint.o: node_mod.mod plume_utils.mod rconstants.mod ref_sounding.mod -rdint.o: teb_spm_start.mod teb_vars_const.mod therm_lib.mod therm_lib8.mod -rdint.o: turb_coms.mod var_tables.mod -rhhi.o: mem_basic.mod mem_grid.mod mem_scratch.mod rconstants.mod -rhhi.o: ref_sounding.mod therm_lib.mod -rinit.o: io_params.mod mem_basic.mod mem_grid.mod mem_micro.mod mem_scratch.mod -rinit.o: mem_turb.mod micphys.mod node_mod.mod rconstants.mod ref_sounding.mod -error_mess.o: node_mod.mod -inithis.o: an_header.mod grid_dims.mod io_params.mod leaf_coms.mod mem_aerad.mod -inithis.o: mem_basic.mod mem_cuparm.mod mem_grid.mod mem_leaf.mod -inithis.o: mem_scratch.mod rconstants.mod ref_sounding.mod therm_lib.mod -inithis.o: var_tables.mod -io_params.o: grid_dims.mod -opspec.o: catt_start.mod grell_coms.mod io_params.mod leaf_coms.mod -opspec.o: mem_basic.mod mem_cuparm.mod mem_emiss.mod mem_grid.mod mem_leaf.mod -opspec.o: mem_mass.mod mem_mnt_advec.mod mem_radiate.mod mem_turb.mod -opspec.o: mem_varinit.mod micphys.mod teb_spm_start.mod therm_lib.mod -rams_read_header.o: an_header.mod grid_dims.mod -ranlavg.o: io_params.mod mem_basic.mod mem_grid.mod mem_scratch.mod mem_turb.mod -ranlavg.o: node_mod.mod var_tables.mod -rcio.o: grell_coms.mod grid_dims.mod leaf_coms.mod mem_all.mod mem_mass.mod -rcio.o: mem_mnt_advec.mod therm_lib.mod turb_coms.mod -recycle.o: grid_dims.mod io_params.mod mem_aerad.mod mem_cuparm.mod mem_grid.mod -recycle.o: mem_leaf.mod mem_scratch.mod var_tables.mod -rhdf5.o: an_header.mod grid_dims.mod io_params.mod mem_aerad.mod -rhdf5.o: mem_cuparm.mod mem_grid.mod var_tables.mod -rio.o: an_header.mod grid_dims.mod io_params.mod mem_aerad.mod mem_basic.mod -rio.o: mem_cuparm.mod mem_grid.mod mem_scratch.mod mem_turb.mod rconstants.mod -rio.o: ref_sounding.mod therm_lib.mod var_tables.mod -rname.o: catt_start.mod domain_decomp.mod emission_source_map.mod grell_coms.mod -rname.o: leaf_coms.mod mem_all.mod mem_mass.mod mem_mnt_advec.mod -rname.o: mem_soil_moisture.mod plume_utils.mod teb_spm_start.mod therm_lib.mod -rname.o: turb_coms.mod -rprnt.o: io_params.mod leaf_coms.mod mem_all.mod mem_basic.mod mem_grid.mod -rprnt.o: mem_leaf.mod mem_scratch.mod mem_turb.mod rconstants.mod -rprnt.o: ref_sounding.mod therm_lib.mod var_tables.mod -aobj.o: isan_coms.mod rconstants.mod -asgen.o: grid_dims.mod io_params.mod isan_coms.mod mem_grid.mod -asnc.o: isan_coms.mod rconstants.mod -asti.o: isan_coms.mod mem_grid.mod rconstants.mod therm_lib.mod -asti2.o: grid_dims.mod isan_coms.mod rconstants.mod therm_lib.mod -astp.o: isan_coms.mod rconstants.mod therm_lib.mod -avarf.o: isan_coms.mod mem_grid.mod rconstants.mod therm_lib.mod -file_inv.o: grid_dims.mod isan_coms.mod -first_rams.o: an_header.mod grid_dims.mod isan_coms.mod mem_grid.mod -first_rams.o: mem_scratch.mod rconstants.mod therm_lib.mod -isan_coms.o: grid_dims.mod -isan_io.o: isan_coms.mod -refstate.o: rconstants.mod therm_lib.mod -v_interps.o: isan_coms.mod rconstants.mod therm_lib.mod -charutils.o: grid_dims.mod -dateutils.o: rconstants.mod -filelist.o: grid_dims.mod -getvar.o: an_header.mod grid_dims.mod -great_circle.o: rconstants.mod -hdf5_utils.o: hdf5_coms.mod -map_proj.o: rconstants.mod -numutils.o: rconstants.mod therm_lib.mod -polarst.o: rconstants.mod -therm_lib.o: rconstants.mod -therm_lib8.o: rconstants.mod therm_lib.mod -varutils.o: mem_aerad.mod mem_cuparm.mod mem_grid.mod node_mod.mod -vformat.o: grid_dims.mod -mem_mass.o: grid_dims.mod var_tables.mod -rexev.o: mem_basic.mod mem_grid.mod mem_mass.mod mem_scratch.mod mem_tend.mod -rexev.o: rconstants.mod therm_lib.mod -rmass.o: mem_grid.mod mem_mass.mod mem_scratch.mod mem_scratch_grell.mod -rmass.o: mem_turb.mod -dealloc.o: catt_start.mod mem_aerad.mod mem_all.mod mem_ensemble.mod -dealloc.o: mem_gaspart.mod mem_globaer.mod mem_globrad.mod mem_mass.mod -dealloc.o: mem_mnt_advec.mod mem_opt.mod mem_scratch1_grell.mod -dealloc.o: mem_scratch_grell.mod mem_teb.mod mem_teb_common.mod mem_tend.mod -dealloc.o: teb_spm_start.mod -hdf5_coms.o: -mem_all.o: io_params.mod mem_basic.mod mem_cuparm.mod mem_grid.mod mem_leaf.mod -mem_all.o: mem_micro.mod mem_nestb.mod mem_oda.mod mem_radiate.mod -mem_all.o: mem_scalar.mod mem_scratch.mod mem_scratch1.mod mem_tend.mod -mem_all.o: mem_turb.mod mem_varinit.mod micphys.mod ref_sounding.mod -mem_all.o: var_tables.mod -mem_basic.o: grid_dims.mod var_tables.mod -mem_grid.o: grid_dims.mod var_tables.mod -mem_scalar.o: var_tables.mod -mem_scratch.o: catt_start.mod grid_dims.mod mem_aerad.mod mem_radiate.mod -mem_scratch1_brams.o: var_tables.mod -mem_tend.o: mem_basic.mod mem_emiss.mod mem_gaspart.mod mem_micro.mod -mem_tend.o: mem_scalar.mod mem_turb.mod teb_spm_start.mod -mem_varinit.o: grid_dims.mod var_tables.mod -rams_mem_alloc.o: catt_start.mod extras.mod grell_coms.mod io_params.mod -rams_mem_alloc.o: leaf_coms.mod machine_arq.mod mem_aerad.mod mem_all.mod -rams_mem_alloc.o: mem_carma.mod mem_emiss.mod mem_ensemble.mod mem_gaspart.mod -rams_mem_alloc.o: mem_globaer.mod mem_globrad.mod mem_grell_param.mod -rams_mem_alloc.o: mem_grid_dim_defs.mod mem_mass.mod mem_mnt_advec.mod -rams_mem_alloc.o: mem_opt.mod mem_scalar.mod mem_scratch1_grell.mod -rams_mem_alloc.o: mem_scratch2_grell.mod mem_scratch2_grell_sh.mod -rams_mem_alloc.o: mem_scratch3_grell.mod mem_scratch3_grell_sh.mod -rams_mem_alloc.o: mem_scratch_grell.mod mem_teb.mod mem_teb_common.mod -rams_mem_alloc.o: mem_turb_scalar.mod node_mod.mod teb_spm_start.mod -rams_mem_alloc.o: teb_vars_const.mod turb_coms.mod -vtab_fill.o: grid_dims.mod io_params.mod var_tables.mod -mem_micro.o: micphys.mod therm_lib.mod var_tables.mod -mic_coll.o: micphys.mod micro_coms.mod rconstants.mod therm_lib.mod -mic_driv.o: grid_dims.mod mem_basic.mod mem_grid.mod mem_micro.mod micphys.mod -mic_driv.o: micro_coms.mod node_mod.mod therm_lib.mod -mic_gamma.o: rconstants.mod therm_lib.mod -mic_init.o: grid_dims.mod mem_grid.mod mem_radiate.mod micphys.mod -mic_init.o: micro_coms.mod node_mod.mod rconstants.mod therm_lib.mod -mic_misc.o: mem_basic.mod mem_grid.mod mem_micro.mod mem_scratch.mod micphys.mod -mic_misc.o: micro_coms.mod rconstants.mod therm_lib.mod -mic_nuc.o: micphys.mod micro_coms.mod rconstants.mod therm_lib.mod -mic_tabs.o: micphys.mod micro_coms.mod rconstants.mod -mic_vap.o: micphys.mod micro_coms.mod rconstants.mod therm_lib.mod -micphys.o: grid_dims.mod -micro_coms.o: micphys.mod rconstants.mod -geodat.o: grid_dims.mod io_params.mod mem_grid.mod mem_leaf.mod rconstants.mod -geodat.o: teb_spm_start.mod -landuse_input.o: grid_dims.mod hdf5_utils.mod io_params.mod leaf_coms.mod -landuse_input.o: mem_leaf.mod mem_mksfc.mod rconstants.mod -mem_mksfc.o: grid_dims.mod teb_spm_start.mod -mksfc_driver.o: io_params.mod mem_grid.mod mem_mksfc.mod teb_spm_start.mod -mksfc_fuso.o: grid_dims.mod io_params.mod mem_emiss.mod mem_gaspart.mod -mksfc_fuso.o: mem_grid.mod mem_mksfc.mod mem_teb.mod teb_vars_const.mod -mksfc_ndvi.o: grid_dims.mod io_params.mod mem_grid.mod mem_leaf.mod -mksfc_ndvi.o: mem_mksfc.mod -mksfc_sfc.o: grid_dims.mod io_params.mod mem_grid.mod mem_leaf.mod mem_mksfc.mod -mksfc_sst.o: grid_dims.mod io_params.mod mem_grid.mod mem_leaf.mod mem_mksfc.mod -mksfc_top.o: grid_dims.mod io_params.mod mem_grid.mod mem_mksfc.mod -ndvi_read.o: grid_dims.mod io_params.mod mem_grid.mod mem_leaf.mod -nest_geosst.o: io_params.mod leaf_coms.mod mem_basic.mod mem_grid.mod -nest_geosst.o: mem_leaf.mod mem_mksfc.mod mem_radiate.mod mem_scratch.mod -nest_geosst.o: mem_soil_moisture.mod -nest_init_aux.o: mem_basic.mod mem_grid.mod mem_leaf.mod mem_scratch.mod -sst_read.o: grid_dims.mod io_params.mod mem_grid.mod mem_leaf.mod -mem_mnt_advec.o: var_tables.mod -mnt_advec_aux.o: mem_grid.mod rconstants.mod therm_lib.mod -mnt_advec_main.o: grid_dims.mod mem_basic.mod mem_grid.mod mem_mnt_advec.mod -mnt_advec_main.o: mem_scratch.mod therm_lib.mod var_tables.mod -mpass_advec.o: grid_dims.mod mem_aerad.mod mem_cuparm.mod mem_grid.mod -mpass_advec.o: mem_scratch.mod node_mod.mod var_tables.mod -mpass_cyclic.o: cyclic_mod.mod grid_dims.mod mem_aerad.mod mem_basic.mod -mpass_cyclic.o: mem_cuparm.mod mem_grid.mod mem_scratch.mod node_mod.mod -mpass_cyclic.o: var_tables.mod -mpass_dtl.o: mem_grid.mod node_mod.mod rpara.mod -mpass_feed.o: grid_dims.mod mem_basic.mod mem_grid.mod mem_scratch1.mod -mpass_feed.o: node_mod.mod var_tables.mod -mpass_full.o: grid_dims.mod io_params.mod mem_aerad.mod mem_cuparm.mod -mpass_full.o: mem_grid.mod mem_scratch.mod mem_varinit.mod node_mod.mod -mpass_full.o: rpara.mod var_tables.mod -mpass_init.o: catt_start.mod cyclic_mod.mod emission_source_map.mod -mpass_init.o: grell_coms.mod grid_dims.mod leaf_coms.mod mem_all.mod -mpass_init.o: mem_cuparm.mod mem_emiss.mod mem_grid.mod mem_mass.mod -mpass_init.o: mem_mnt_advec.mod micphys.mod node_mod.mod plume_utils.mod -mpass_init.o: ref_sounding.mod rpara.mod teb_spm_start.mod teb_vars_const.mod -mpass_init.o: therm_lib.mod turb_coms.mod -mpass_lbc.o: grid_dims.mod mem_aerad.mod mem_cuparm.mod mem_grid.mod -mpass_lbc.o: mem_scratch.mod node_mod.mod var_tables.mod -mpass_nest.o: grid_dims.mod mem_basic.mod mem_grid.mod mem_nestb.mod -mpass_nest.o: mem_scratch.mod node_mod.mod var_tables.mod -mpass_oda.o: grid_dims.mod mem_oda.mod node_mod.mod rpara.mod -mpass_st.o: grid_dims.mod mem_basic.mod mem_grid.mod mem_scratch.mod -mpass_st.o: node_mod.mod -node_mod.o: grid_dims.mod -par_decomp.o: cyclic_mod.mod domain_decomp.mod grid_dims.mod mem_grid.mod -par_decomp.o: rpara.mod -para_init.o: grid_dims.mod mem_aerad.mod mem_basic.mod mem_cuparm.mod -para_init.o: mem_grid.mod mem_scratch.mod node_mod.mod rpara.mod var_tables.mod -paral.o: grid_dims.mod mem_aerad.mod mem_cuparm.mod mem_grid.mod mem_scratch.mod -paral.o: node_mod.mod rpara.mod var_tables.mod -rnest_par.o: mem_grid.mod -rpara.o: grid_dims.mod -hemi2.o: grid_dims.mod mem_basic.mod mem_grid.mod var_tables.mod -mem_nestb.o: var_tables.mod -nest_drivers.o: mem_basic.mod mem_grid.mod mem_nestb.mod mem_scratch.mod -nest_drivers.o: mem_tend.mod node_mod.mod var_tables.mod -nest_feed.o: mem_grid.mod -nest_intrp.o: grid_dims.mod mem_basic.mod mem_grid.mod mem_nestb.mod -nest_intrp.o: mem_scratch.mod rconstants.mod ref_sounding.mod -nest_move.o: mem_basic.mod mem_grid.mod mem_leaf.mod mem_scratch.mod -nest_move.o: mem_tend.mod mem_turb.mod var_tables.mod -cup_dn.o: rconstants.mod -cup_env.o: rconstants.mod therm_lib.mod -cup_grell2.o: mem_grell_param.mod mem_scratch2_grell.mod mem_scratch3_grell.mod -cup_grell2.o: rconstants.mod -cup_grell2_shcu.o: mem_grell_param.mod mem_scratch2_grell_sh.mod -cup_grell2_shcu.o: mem_scratch3_grell_sh.mod rconstants.mod -cup_up.o: rconstants.mod -mem_grell_param2.o: grell_coms.mod -mem_scratch2_grell.o: mem_grell_param.mod node_mod.mod -mem_scratch2_grell_sh.o: mem_grell_param.mod node_mod.mod -mem_scratch3_grell.o: mem_grell_param.mod -mem_scratch3_grell_sh.o: mem_grell_param.mod -old_grell_cupar_driver.o: grell_coms.mod io_params.mod mem_basic.mod -old_grell_cupar_driver.o: mem_cuparm.mod mem_grell_param.mod mem_grid.mod -old_grell_cupar_driver.o: mem_leaf.mod mem_mass.mod mem_micro.mod mem_scalar.mod -old_grell_cupar_driver.o: mem_scratch.mod mem_scratch1_grell.mod -old_grell_cupar_driver.o: mem_scratch2_grell.mod mem_scratch2_grell_sh.mod -old_grell_cupar_driver.o: mem_scratch3_grell.mod mem_scratch3_grell_sh.mod -old_grell_cupar_driver.o: mem_tend.mod mem_turb.mod node_mod.mod rconstants.mod -old_grell_cupar_driver.o: therm_lib.mod -harr_coms.o: mem_harr.mod -harr_rad.o: harr_coms.mod mem_harr.mod rconstants.mod -harr_raddriv.o: harr_coms.mod mem_grid.mod mem_harr.mod mem_leaf.mod -harr_raddriv.o: mem_radiate.mod micphys.mod rconstants.mod therm_lib.mod -harr_radinit.o: harr_coms.mod mem_cuparm.mod mem_grid.mod mem_harr.mod -harr_radinit.o: mem_radiate.mod micphys.mod -mem_aerad.o: mem_grid_dim_defs.mod -mem_carma.o: grid_dims.mod mem_aerad.mod mem_globrad.mod -mem_globaer.o: grid_dims.mod mem_aerad.mod -mem_globrad.o: mem_aerad.mod rconstants.mod -mem_mclat.o: rconstants.mod -mem_radiate.o: var_tables.mod -rad_carma.o: catt_start.mod grid_dims.mod mem_aerad.mod mem_carma.mod -rad_carma.o: mem_globaer.mod mem_globrad.mod mem_grid.mod mem_radiate.mod -rad_carma.o: node_mod.mod rconstants.mod therm_lib.mod -rad_ccmp.o: rconstants.mod -rad_driv.o: catt_start.mod mem_basic.mod mem_cuparm.mod mem_grid.mod -rad_driv.o: mem_harr.mod mem_leaf.mod mem_mclat.mod mem_micro.mod -rad_driv.o: mem_radiate.mod mem_scalar.mod mem_scratch.mod mem_teb_common.mod -rad_driv.o: mem_tend.mod micphys.mod rad_carma.mod rconstants.mod -rad_driv.o: teb_spm_start.mod therm_lib.mod -rad_mclat.o: harr_coms.mod mem_grid.mod mem_mclat.mod mem_radiate.mod -rad_mclat.o: rconstants.mod -mem_soil_moisture.o: grid_dims.mod leaf_coms.mod -soil_moisture_init.o: grid_dims.mod io_params.mod leaf_coms.mod mem_grid.mod -soil_moisture_init.o: mem_leaf.mod mem_soil_moisture.mod rconstants.mod -soil_moisture_init.o: therm_lib.mod -leaf3.o: io_params.mod leaf_coms.mod mem_basic.mod mem_cuparm.mod mem_grid.mod -leaf3.o: mem_leaf.mod mem_micro.mod mem_radiate.mod mem_scratch.mod mem_teb.mod -leaf3.o: mem_teb_common.mod mem_turb.mod node_mod.mod rconstants.mod -leaf3.o: teb_spm_start.mod therm_lib.mod -leaf3_can.o: catt_start.mod leaf_coms.mod rconstants.mod therm_lib.mod -leaf3_hyd.o: leaf_coms.mod mem_grid.mod mem_leaf.mod rconstants.mod -leaf3_hyd.o: therm_lib.mod -leaf3_init.o: io_params.mod leaf_coms.mod mem_grid.mod mem_leaf.mod -leaf3_init.o: rconstants.mod teb_spm_start.mod therm_lib.mod -leaf3_ocean.o: io_params.mod leaf_coms.mod mem_grid.mod node_mod.mod -leaf3_ocean.o: rconstants.mod therm_lib.mod -leaf3_teb.o: mem_emiss.mod rconstants.mod teb_vars_const.mod therm_lib.mod -leaf3_tw.o: catt_start.mod leaf_coms.mod mem_grid.mod mem_leaf.mod -leaf3_tw.o: mem_radiate.mod mem_scratch.mod rconstants.mod therm_lib.mod -leaf3_utils.o: catt_start.mod consts_coms.mod grid_dims.mod io_params.mod -leaf3_utils.o: leaf_coms.mod mem_grid.mod mem_leaf.mod mem_radiate.mod -leaf3_utils.o: mem_scratch.mod node_mod.mod rconstants.mod teb_spm_start.mod -leaf3_utils.o: therm_lib.mod -leaf_coms.o: grid_dims.mod mem_leaf.mod rconstants.mod therm_lib.mod -mem_leaf.o: grid_dims.mod io_params.mod var_tables.mod -ruser.o: catt_start.mod io_params.mod leaf_coms.mod mem_grid.mod mem_leaf.mod -ruser.o: rconstants.mod therm_lib.mod -urban.o: teb_vars_const.mod therm_lib.mod -urban_canopy.o: grid_dims.mod mem_basic.mod mem_grid.mod mem_scratch.mod -urban_canopy.o: mem_tend.mod mem_turb.mod node_mod.mod -gaspart.o: an_header.mod grid_dims.mod io_params.mod mem_basic.mod mem_emiss.mod -gaspart.o: mem_gaspart.mod mem_grid.mod mem_leaf.mod mem_tend.mod rconstants.mod -gaspart.o: ref_sounding.mod teb_vars_const.mod var_tables.mod -mem_emiss.o: grid_dims.mod -mem_gaspart.o: mem_emiss.mod var_tables.mod -mem_teb.o: var_tables.mod -mem_teb_common.o: var_tables.mod -mem_teb_vars_const.o: grid_dims.mod -ozone.o: mem_basic.mod mem_gaspart.mod mem_grid.mod mem_radiate.mod mem_tend.mod -ozone.o: ozone_const.mod rconstants.mod var_tables.mod -diffsclr.o: mem_grid.mod mem_scratch.mod -diffuse.o: ke_coms.mod mem_basic.mod mem_grid.mod mem_leaf.mod mem_mass.mod -diffuse.o: mem_micro.mod mem_opt.mod mem_scratch.mod mem_tend.mod mem_turb.mod -diffuse.o: node_mod.mod therm_lib.mod var_tables.mod -mem_turb.o: grid_dims.mod rconstants.mod var_tables.mod -mem_turb_scalar.o: grid_dims.mod var_tables.mod -rgrad.o: mem_grid.mod mem_scratch.mod -tkenn.o: leaf_coms.mod mem_grid.mod mem_scratch.mod rconstants.mod therm_lib.mod -tkenn.o: turb_coms.mod -turb_derivs.o: mem_grid.mod mem_scratch.mod mem_turb.mod rconstants.mod -turb_derivs.o: therm_lib.mod -turb_diff.o: catt_start.mod mem_cuparm.mod mem_grid.mod mem_opt.mod -turb_diff.o: mem_scratch.mod mem_turb.mod var_tables.mod -turb_diff_adap.o: mem_grid.mod mem_scratch.mod -turb_k.o: catt_start.mod ke_coms.mod mem_basic.mod mem_grid.mod mem_leaf.mod -turb_k.o: mem_mass.mod mem_micro.mod mem_scratch.mod mem_tend.mod mem_turb.mod -turb_k.o: mem_turb_scalar.mod node_mod.mod therm_lib.mod var_tables.mod -turb_ke.o: ke_coms.mod mem_grid.mod mem_scratch.mod mem_turb.mod rconstants.mod -turb_ke.o: turb_coms.mod -ed_1st.o: ed_misc_coms.mod ed_para_coms.mod ed_state_vars.mod -ed_driver.o: consts_coms.mod detailed_coms.mod ed_misc_coms.mod ed_node_coms.mod -ed_driver.o: ed_state_vars.mod fuse_fiss_utils.mod grid_coms.mod -ed_driver.o: phenology_aux.mod soil_coms.mod -ed_met_driver.o: canopy_air_coms.mod canopy_radiation_coms.mod consts_coms.mod -ed_met_driver.o: ed_max_dims.mod ed_misc_coms.mod ed_node_coms.mod -ed_met_driver.o: ed_state_vars.mod grid_coms.mod hdf5_utils.mod mem_polygons.mod -ed_met_driver.o: met_driver_coms.mod pft_coms.mod therm_lib.mod -ed_model.o: consts_coms.mod ed_misc_coms.mod ed_node_coms.mod ed_state_vars.mod -ed_model.o: grid_coms.mod mem_polygons.mod rk4_coms.mod rk4_driver.mod -bdf2_solver.o: consts_coms.mod ed_misc_coms.mod ed_state_vars.mod -bdf2_solver.o: ed_therm_lib.mod grid_coms.mod rk4_coms.mod soil_coms.mod -bdf2_solver.o: therm_lib8.mod -canopy_struct_dynamics.o: allometry.mod canopy_air_coms.mod -canopy_struct_dynamics.o: canopy_layer_coms.mod consts_coms.mod ed_misc_coms.mod -canopy_struct_dynamics.o: ed_state_vars.mod grid_coms.mod met_driver_coms.mod -canopy_struct_dynamics.o: pft_coms.mod phenology_coms.mod physiology_coms.mod -canopy_struct_dynamics.o: rk4_coms.mod soil_coms.mod therm_lib.mod -disturbance.o: allometry.mod consts_coms.mod decomp_coms.mod disturb_coms.mod -disturbance.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod -disturbance.o: ed_therm_lib.mod fuse_fiss_utils.mod grid_coms.mod -disturbance.o: mem_polygons.mod mortality.mod pft_coms.mod phenology_aux.mod -disturbance.o: phenology_coms.mod -euler_driver.o: canopy_air_coms.mod consts_coms.mod ed_max_dims.mod -euler_driver.o: ed_misc_coms.mod ed_state_vars.mod grid_coms.mod -euler_driver.o: hydrology_coms.mod met_driver_coms.mod rk4_coms.mod -euler_driver.o: rk4_driver.mod rk4_stepper.mod soil_coms.mod therm_lib.mod -euler_driver.o: therm_lib8.mod -events.o: allometry.mod consts_coms.mod decomp_coms.mod disturbance_utils.mod -events.o: ed_misc_coms.mod ed_state_vars.mod ed_therm_lib.mod -events.o: fuse_fiss_utils.mod grid_coms.mod pft_coms.mod therm_lib.mod -farq_leuning.o: c34constants.mod consts_coms.mod pft_coms.mod phenology_coms.mod -farq_leuning.o: physiology_coms.mod rk4_coms.mod therm_lib8.mod -fire.o: consts_coms.mod disturb_coms.mod ed_misc_coms.mod ed_state_vars.mod -fire.o: grid_coms.mod soil_coms.mod -forestry.o: disturb_coms.mod disturbance_utils.mod ed_max_dims.mod -forestry.o: ed_misc_coms.mod ed_state_vars.mod fuse_fiss_utils.mod grid_coms.mod -growth_balive.o: allometry.mod consts_coms.mod decomp_coms.mod ed_max_dims.mod -growth_balive.o: ed_misc_coms.mod ed_state_vars.mod ed_therm_lib.mod -growth_balive.o: fuse_fiss_utils.mod grid_coms.mod mortality.mod pft_coms.mod -growth_balive.o: phenology_coms.mod physiology_coms.mod -heun_driver.o: canopy_air_coms.mod consts_coms.mod ed_max_dims.mod -heun_driver.o: ed_misc_coms.mod ed_state_vars.mod grid_coms.mod -heun_driver.o: hydrology_coms.mod met_driver_coms.mod rk4_coms.mod -heun_driver.o: rk4_driver.mod rk4_stepper.mod soil_coms.mod therm_lib.mod -heun_driver.o: therm_lib8.mod -hybrid_driver.o: consts_coms.mod ed_max_dims.mod ed_misc_coms.mod -hybrid_driver.o: ed_state_vars.mod grid_coms.mod hydrology_coms.mod -hybrid_driver.o: met_driver_coms.mod rk4_coms.mod rk4_driver.mod rk4_stepper.mod -hybrid_driver.o: soil_coms.mod therm_lib8.mod -lsm_hyd.o: consts_coms.mod ed_misc_coms.mod ed_node_coms.mod ed_state_vars.mod -lsm_hyd.o: grid_coms.mod hydrology_coms.mod hydrology_constants.mod pft_coms.mod -lsm_hyd.o: soil_coms.mod therm_lib.mod -mortality.o: consts_coms.mod disturb_coms.mod ed_max_dims.mod ed_misc_coms.mod -mortality.o: ed_state_vars.mod pft_coms.mod -multiple_scatter.o: canopy_radiation_coms.mod consts_coms.mod ed_max_dims.mod -multiple_scatter.o: rk4_coms.mod -phenology_aux.o: allometry.mod consts_coms.mod ed_max_dims.mod ed_state_vars.mod -phenology_aux.o: ed_therm_lib.mod grid_coms.mod pft_coms.mod phenology_coms.mod -phenology_aux.o: soil_coms.mod -phenology_driv.o: allometry.mod consts_coms.mod decomp_coms.mod ed_max_dims.mod -phenology_driv.o: ed_misc_coms.mod ed_state_vars.mod ed_therm_lib.mod -phenology_driv.o: grid_coms.mod pft_coms.mod phenology_aux.mod -phenology_driv.o: phenology_coms.mod soil_coms.mod -photosyn_driv.o: allometry.mod consts_coms.mod ed_max_dims.mod ed_misc_coms.mod -photosyn_driv.o: ed_state_vars.mod farq_leuning.mod met_driver_coms.mod -photosyn_driv.o: pft_coms.mod phenology_coms.mod physiology_coms.mod -photosyn_driv.o: soil_coms.mod therm_lib.mod -radiate_driver.o: allometry.mod canopy_layer_coms.mod canopy_radiation_coms.mod -radiate_driver.o: consts_coms.mod ed_max_dims.mod ed_misc_coms.mod -radiate_driver.o: ed_state_vars.mod grid_coms.mod soil_coms.mod -reproduction.o: allometry.mod consts_coms.mod decomp_coms.mod ed_max_dims.mod -reproduction.o: ed_misc_coms.mod ed_state_vars.mod ed_therm_lib.mod -reproduction.o: fuse_fiss_utils.mod grid_coms.mod mem_polygons.mod pft_coms.mod -reproduction.o: phenology_aux.mod phenology_coms.mod -rk4_derivs.o: canopy_struct_dynamics.mod consts_coms.mod ed_max_dims.mod -rk4_derivs.o: ed_misc_coms.mod ed_state_vars.mod grid_coms.mod pft_coms.mod -rk4_derivs.o: physiology_coms.mod rk4_coms.mod soil_coms.mod therm_lib8.mod -rk4_driver.o: allometry.mod canopy_air_coms.mod consts_coms.mod disturb_coms.mod -rk4_driver.o: ed_misc_coms.mod ed_state_vars.mod grid_coms.mod -rk4_driver.o: met_driver_coms.mod phenology_coms.mod rk4_coms.mod soil_coms.mod -rk4_driver.o: therm_lib.mod -rk4_integ_utils.o: canopy_air_coms.mod consts_coms.mod ed_max_dims.mod -rk4_integ_utils.o: ed_misc_coms.mod ed_state_vars.mod grid_coms.mod -rk4_integ_utils.o: hydrology_coms.mod rk4_coms.mod rk4_stepper.mod soil_coms.mod -rk4_integ_utils.o: therm_lib8.mod -rk4_misc.o: canopy_struct_dynamics.mod consts_coms.mod ed_max_dims.mod -rk4_misc.o: ed_misc_coms.mod ed_state_vars.mod ed_therm_lib.mod grid_coms.mod -rk4_misc.o: rk4_coms.mod soil_coms.mod therm_lib8.mod -rk4_stepper.o: ed_state_vars.mod grid_coms.mod rk4_coms.mod soil_coms.mod -soil_respiration.o: consts_coms.mod decomp_coms.mod ed_state_vars.mod -soil_respiration.o: farq_leuning.mod pft_coms.mod physiology_coms.mod -soil_respiration.o: rk4_coms.mod soil_coms.mod -structural_growth.o: allometry.mod consts_coms.mod decomp_coms.mod -structural_growth.o: detailed_coms.mod ed_max_dims.mod ed_misc_coms.mod -structural_growth.o: ed_state_vars.mod ed_therm_lib.mod pft_coms.mod -structural_growth.o: physiology_coms.mod -twostream_rad.o: canopy_radiation_coms.mod consts_coms.mod ed_max_dims.mod -twostream_rad.o: rk4_coms.mod -vegetation_dynamics.o: consts_coms.mod disturbance_utils.mod ed_misc_coms.mod -vegetation_dynamics.o: ed_state_vars.mod fuse_fiss_utils.mod grid_coms.mod -vegetation_dynamics.o: growth_balive.mod mem_polygons.mod -ed_bigleaf_init.o: allometry.mod consts_coms.mod ed_max_dims.mod -ed_bigleaf_init.o: ed_misc_coms.mod ed_node_coms.mod ed_state_vars.mod -ed_bigleaf_init.o: fuse_fiss_utils.mod pft_coms.mod -ed_init.o: consts_coms.mod ed_max_dims.mod ed_misc_coms.mod ed_node_coms.mod -ed_init.o: ed_state_vars.mod ed_work_vars.mod grid_coms.mod mem_polygons.mod -ed_init.o: phenology_coms.mod phenology_startup.mod rk4_coms.mod soil_coms.mod -ed_init_atm.o: canopy_struct_dynamics.mod consts_coms.mod ed_misc_coms.mod -ed_init_atm.o: ed_node_coms.mod ed_state_vars.mod ed_therm_lib.mod -ed_init_atm.o: fuse_fiss_utils.mod grid_coms.mod met_driver_coms.mod -ed_init_atm.o: pft_coms.mod soil_coms.mod therm_lib.mod -ed_nbg_init.o: allometry.mod consts_coms.mod ed_max_dims.mod ed_misc_coms.mod -ed_nbg_init.o: ed_state_vars.mod fuse_fiss_utils.mod grid_coms.mod pft_coms.mod -ed_nbg_init.o: physiology_coms.mod -ed_params.o: allometry.mod canopy_air_coms.mod canopy_layer_coms.mod -ed_params.o: canopy_radiation_coms.mod consts_coms.mod decomp_coms.mod -ed_params.o: detailed_coms.mod disturb_coms.mod ed_max_dims.mod ed_misc_coms.mod -ed_params.o: ed_therm_lib.mod fusion_fission_coms.mod grid_coms.mod -ed_params.o: hydrology_coms.mod met_driver_coms.mod pft_coms.mod -ed_params.o: phenology_coms.mod physiology_coms.mod rk4_coms.mod soil_coms.mod -ed_type_init.o: allometry.mod canopy_air_coms.mod consts_coms.mod -ed_type_init.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod -ed_type_init.o: ed_therm_lib.mod grid_coms.mod pft_coms.mod phenology_coms.mod -ed_type_init.o: soil_coms.mod therm_lib.mod -init_hydro_sites.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod -init_hydro_sites.o: grid_coms.mod mem_polygons.mod soil_coms.mod -landuse_init.o: consts_coms.mod disturb_coms.mod ed_max_dims.mod -landuse_init.o: ed_misc_coms.mod ed_state_vars.mod grid_coms.mod -phenology_startup.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod -phenology_startup.o: grid_coms.mod phenology_aux.mod phenology_coms.mod -average_utils.o: allometry.mod canopy_radiation_coms.mod consts_coms.mod -average_utils.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod -average_utils.o: grid_coms.mod pft_coms.mod therm_lib.mod -ed_init_full_history.o: allometry.mod ed_max_dims.mod ed_misc_coms.mod -ed_init_full_history.o: ed_node_coms.mod ed_state_vars.mod -ed_init_full_history.o: fusion_fission_coms.mod grid_coms.mod -ed_init_full_history.o: hdf5_coms.mod phenology_startup.mod soil_coms.mod -ed_load_namelist.o: canopy_air_coms.mod canopy_layer_coms.mod -ed_load_namelist.o: canopy_radiation_coms.mod consts_coms.mod decomp_coms.mod -ed_load_namelist.o: detailed_coms.mod disturb_coms.mod ed_max_dims.mod -ed_load_namelist.o: ed_misc_coms.mod ed_para_coms.mod ename_coms.mod -ed_load_namelist.o: grid_coms.mod mem_polygons.mod met_driver_coms.mod -ed_load_namelist.o: optimiz_coms.mod pft_coms.mod phenology_coms.mod -ed_load_namelist.o: physiology_coms.mod rk4_coms.mod soil_coms.mod -ed_opspec.o: canopy_air_coms.mod canopy_layer_coms.mod canopy_radiation_coms.mod -ed_opspec.o: consts_coms.mod decomp_coms.mod detailed_coms.mod disturb_coms.mod -ed_opspec.o: ed_max_dims.mod ed_misc_coms.mod ed_para_coms.mod grid_coms.mod -ed_opspec.o: mem_polygons.mod met_driver_coms.mod pft_coms.mod -ed_opspec.o: phenology_coms.mod physiology_coms.mod rk4_coms.mod soil_coms.mod -ed_print.o: ed_max_dims.mod ed_misc_coms.mod ed_node_coms.mod ed_state_vars.mod -ed_print.o: ed_var_tables.mod -ed_read_ed10_20_history.o: allometry.mod consts_coms.mod ed_max_dims.mod -ed_read_ed10_20_history.o: ed_misc_coms.mod ed_state_vars.mod -ed_read_ed10_20_history.o: fuse_fiss_utils.mod grid_coms.mod mem_polygons.mod -ed_read_ed10_20_history.o: pft_coms.mod -ed_read_ed21_history.o: allometry.mod consts_coms.mod disturb_coms.mod -ed_read_ed21_history.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod -ed_read_ed21_history.o: fuse_fiss_utils.mod grid_coms.mod hdf5_coms.mod -ed_read_ed21_history.o: pft_coms.mod soil_coms.mod -ed_xml_config.o: canopy_radiation_coms.mod decomp_coms.mod disturb_coms.mod -ed_xml_config.o: ed_max_dims.mod ed_misc_coms.mod fusion_fission_coms.mod -ed_xml_config.o: grid_coms.mod hydrology_coms.mod met_driver_coms.mod -ed_xml_config.o: pft_coms.mod phenology_coms.mod physiology_coms.mod -ed_xml_config.o: rk4_coms.mod soil_coms.mod -edio.o: consts_coms.mod ed_max_dims.mod ed_misc_coms.mod ed_node_coms.mod -edio.o: ed_state_vars.mod grid_coms.mod pft_coms.mod soil_coms.mod therm_lib.mod -h5_output.o: an_header.mod ed_max_dims.mod ed_misc_coms.mod ed_node_coms.mod -h5_output.o: ed_state_vars.mod ed_var_tables.mod fusion_fission_coms.mod -h5_output.o: grid_coms.mod hdf5_coms.mod -leaf_database.o: grid_coms.mod hdf5_utils.mod soil_coms.mod -canopy_air_coms.o: consts_coms.mod therm_lib.mod therm_lib8.mod -canopy_radiation_coms.o: ed_max_dims.mod -consts_coms.o: rconstants.mod -decomp_coms.o: ed_max_dims.mod -disturb_coms.o: ed_max_dims.mod -ed_max_dims.o: grid_dims.mod -ed_mem_alloc.o: ed_max_dims.mod ed_mem_grid_dim_defs.mod ed_node_coms.mod -ed_mem_alloc.o: ed_state_vars.mod ed_work_vars.mod grid_coms.mod -ed_mem_alloc.o: mem_polygons.mod -ed_misc_coms.o: ed_max_dims.mod -ed_state_vars.o: disturb_coms.mod ed_max_dims.mod ed_misc_coms.mod -ed_state_vars.o: ed_node_coms.mod ed_var_tables.mod fusion_fission_coms.mod -ed_state_vars.o: grid_coms.mod met_driver_coms.mod phenology_coms.mod -ed_state_vars.o: soil_coms.mod -ed_var_tables.o: ed_max_dims.mod -ed_work_vars.o: ed_max_dims.mod -ename_coms.o: ed_max_dims.mod -fusion_fission_coms.o: ed_max_dims.mod -grid_coms.o: ed_max_dims.mod -hdf5_coms.o: -mem_polygons.o: ed_max_dims.mod -met_driver_coms.o: ed_max_dims.mod -optimiz_coms.o: ed_max_dims.mod -pft_coms.o: ed_max_dims.mod -phenology_coms.o: ed_max_dims.mod -physiology_coms.o: ed_max_dims.mod -rk4_coms.o: consts_coms.mod ed_max_dims.mod ed_misc_coms.mod grid_coms.mod -rk4_coms.o: soil_coms.mod therm_lib8.mod -soil_coms.o: ed_max_dims.mod grid_coms.mod leaf_coms.mod -ed_mpass_init.o: canopy_air_coms.mod canopy_layer_coms.mod -ed_mpass_init.o: canopy_radiation_coms.mod decomp_coms.mod detailed_coms.mod -ed_mpass_init.o: disturb_coms.mod ed_max_dims.mod ed_misc_coms.mod -ed_mpass_init.o: ed_node_coms.mod ed_para_coms.mod ed_state_vars.mod -ed_mpass_init.o: ed_work_vars.mod grid_coms.mod mem_polygons.mod -ed_mpass_init.o: met_driver_coms.mod optimiz_coms.mod pft_coms.mod -ed_mpass_init.o: phenology_coms.mod physiology_coms.mod rk4_coms.mod -ed_mpass_init.o: soil_coms.mod -ed_node_coms.o: ed_max_dims.mod -ed_para_coms.o: ed_max_dims.mod -ed_para_init.o: ed_max_dims.mod ed_misc_coms.mod ed_node_coms.mod -ed_para_init.o: ed_para_coms.mod ed_work_vars.mod grid_coms.mod -ed_para_init.o: hdf5_coms.mod mem_polygons.mod soil_coms.mod -allometry.o: consts_coms.mod ed_misc_coms.mod grid_coms.mod pft_coms.mod -allometry.o: rk4_coms.mod soil_coms.mod -budget_utils.o: consts_coms.mod ed_max_dims.mod ed_misc_coms.mod -budget_utils.o: ed_state_vars.mod grid_coms.mod rk4_coms.mod soil_coms.mod -budget_utils.o: therm_lib.mod -dateutils.o: consts_coms.mod -ed_filelist.o: ed_max_dims.mod -ed_grid.o: consts_coms.mod ed_max_dims.mod ed_node_coms.mod grid_coms.mod -ed_therm_lib.o: canopy_air_coms.mod consts_coms.mod ed_max_dims.mod -ed_therm_lib.o: ed_misc_coms.mod ed_state_vars.mod grid_coms.mod pft_coms.mod -ed_therm_lib.o: rk4_coms.mod soil_coms.mod therm_lib.mod therm_lib8.mod -fatal_error.o: ed_node_coms.mod -fuse_fiss_utils.o: allometry.mod canopy_layer_coms.mod decomp_coms.mod -fuse_fiss_utils.o: disturb_coms.mod ed_max_dims.mod ed_misc_coms.mod -fuse_fiss_utils.o: ed_node_coms.mod ed_state_vars.mod fusion_fission_coms.mod -fuse_fiss_utils.o: grid_coms.mod mem_polygons.mod pft_coms.mod soil_coms.mod -fuse_fiss_utils.o: therm_lib.mod -great_circle.o: consts_coms.mod -hdf5_utils.o: hdf5_coms.mod -invmondays.o: ed_misc_coms.mod -lapse.o: consts_coms.mod ed_misc_coms.mod ed_state_vars.mod met_driver_coms.mod -numutils.o: consts_coms.mod therm_lib.mod -radiate_utils.o: canopy_radiation_coms.mod consts_coms.mod ed_max_dims.mod -radiate_utils.o: ed_misc_coms.mod ed_state_vars.mod met_driver_coms.mod -stable_cohorts.o: ed_max_dims.mod ed_state_vars.mod pft_coms.mod -stable_cohorts.o: phenology_coms.mod -therm_lib.o: consts_coms.mod -therm_lib8.o: consts_coms.mod therm_lib.mod -update_derived_props.o: allometry.mod canopy_air_coms.mod consts_coms.mod -update_derived_props.o: ed_misc_coms.mod ed_state_vars.mod ed_therm_lib.mod -update_derived_props.o: fuse_fiss_utils.mod grid_coms.mod soil_coms.mod -update_derived_props.o: therm_lib.mod -advect_kit.mod: mod_advect_kit.o -allometry.mod: allometry.o -an_header.mod: an_header.o -c34constants.mod: c34constants.o -canopy_air_coms.mod: canopy_air_coms.o -canopy_layer_coms.mod: canopy_layer_coms.o -canopy_radiation_coms.mod: canopy_radiation_coms.o -canopy_struct_dynamics.mod: canopy_struct_dynamics.o -catt_start.mod: catt_start.o -consts_coms.mod: consts_coms.o -conv_coms.mod: conv_coms.o -cyclic_mod.mod: cyclic_mod.o -decomp_coms.mod: decomp_coms.o -detailed_coms.mod: detailed_coms.o -disturb_coms.mod: disturb_coms.o -disturbance_utils.mod: disturbance.o -domain_decomp.mod: domain_decomp.o -dtset.mod: local_proc.o -ed_max_dims.mod: ed_max_dims.o -ed_mem_grid_dim_defs.mod: ed_mem_grid_dim_defs.o -ed_misc_coms.mod: ed_misc_coms.o -ed_node_coms.mod: ed_node_coms.o -ed_para_coms.mod: ed_para_coms.o -ed_state_vars.mod: ed_state_vars.o -ed_therm_lib.mod: ed_therm_lib.o -ed_var_tables.mod: ed_var_tables.o -ed_work_vars.mod: ed_work_vars.o -emission_source_map.mod: emission_source_map.o -ename_coms.mod: ename_coms.o -extras.mod: extra.o -farq_leuning.mod: farq_leuning.o -fuse_fiss_utils.mod: fuse_fiss_utils.o -fusion_fission_coms.mod: fusion_fission_coms.o -grell_coms.mod: grell_coms.o -grid_coms.mod: grid_coms.o -grid_dims.mod: grid_dims.o -grid_struct.mod: grid_struct.o -growth_balive.mod: growth_balive.o -harr_coms.mod: harr_coms.o -hdf5_coms.mod: hdf5_coms.o -hdf5_utils.mod: hdf5_utils.o -hydrology_coms.mod: hydrology_coms.o -hydrology_constants.mod: hydrology_constants.o -io_params.mod: io_params.o -isan_coms.mod: isan_coms.o -ke_coms.mod: ke_coms.o -lake_coms.mod: lake_coms.o -leaf_coms.mod: leaf_coms.o -libxml2f90_interface_module.mod: libxml2f90.f90_pp.o -libxml2f90_module.mod: libxml2f90.f90_pp.o -libxml2f90_strings_module.mod: libxml2f90.f90_pp.o -ll_module.mod: libxml2f90.f90_pp.o -machine_arq.mod: machine_arq.o -mem_aerad.mod: mem_aerad.o -mem_all.mod: mem_all.o -mem_basic.mod: mem_basic.o -mem_carma.mod: mem_carma.o -mem_cuparm.mod: mem_cuparm.o -mem_edcp.mod: mem_edcp.o -mem_emiss.mod: mem_emiss.o -mem_ensemble.mod: mem_ensemble.o -mem_gaspart.mod: mem_gaspart.o -mem_globaer.mod: mem_globaer.o -mem_globrad.mod: mem_globrad.o -mem_grell_param.mod: mem_grell_param2.o -mem_grid.mod: mem_grid.o -mem_grid_dim_defs.mod: mem_grid_dim_defs.o -mem_harr.mod: mem_harr.o -mem_leaf.mod: mem_leaf.o -mem_mass.mod: mem_mass.o -mem_mclat.mod: mem_mclat.o -mem_micro.mod: mem_micro.o -mem_mksfc.mod: mem_mksfc.o -mem_mnt_advec.mod: mem_mnt_advec.o -mem_nestb.mod: mem_nestb.o -mem_oda.mod: mem_oda.o -mem_opt.mod: mem_opt_scratch.o -mem_polygons.mod: mem_polygons.o -mem_radiate.mod: mem_radiate.o -mem_scalar.mod: mem_scalar.o -mem_scratch.mod: mem_scratch.o -mem_scratch1.mod: mem_scratch1_brams.o -mem_scratch1_grell.mod: mem_scratch1_grell.o -mem_scratch2_grell.mod: mem_scratch2_grell.o -mem_scratch2_grell_sh.mod: mem_scratch2_grell_sh.o -mem_scratch3_grell.mod: mem_scratch3_grell.o -mem_scratch3_grell_sh.mod: mem_scratch3_grell_sh.o -mem_scratch_grell.mod: mem_scratch_grell.o -mem_soil_moisture.mod: mem_soil_moisture.o -mem_tconv.mod: mem_tconv.o -mem_teb.mod: mem_teb.o -mem_teb_common.mod: mem_teb_common.o -mem_tend.mod: mem_tend.o -mem_turb.mod: mem_turb.o -mem_turb_scalar.mod: mem_turb_scalar.o -mem_varinit.mod: mem_varinit.o -met_driver_coms.mod: met_driver_coms.o -micphys.mod: micphys.o -micro_coms.mod: micro_coms.o -mod_ghostblock.mod: mod_GhostBlock.o -mod_ghostblockpartition.mod: mod_GhostBlockPartition.o -mortality.mod: mortality.o -node_mod.mod: node_mod.o -obs_input.mod: obs_input.o -optimiz_coms.mod: optimiz_coms.o -ozone_const.mod: mod_ozone.o -pft_coms.mod: pft_coms.o -phenology_aux.mod: phenology_aux.o -phenology_coms.mod: phenology_coms.o -phenology_startup.mod: phenology_startup.o -physiology_coms.mod: physiology_coms.o -plume_utils.mod: plumerise_vector.o -rad_carma.mod: rad_carma.o -rconstants.mod: rconstants.o -ref_sounding.mod: ref_sounding.o -rk4_coms.mod: rk4_coms.o -rk4_driver.mod: rk4_driver.o -rk4_stepper.mod: rk4_stepper.o -rpara.mod: rpara.o -shcu_vars_const.mod: shcu_vars_const.o -soil_coms.mod: soil_coms.o -teb_spm_start.mod: teb_spm_start.o -teb_vars_const.mod: mem_teb_vars_const.o -therm_lib.mod: therm_lib.o -therm_lib8.mod: therm_lib8.o -turb_coms.mod: turb_coms.o -var_tables.mod: var_tables.o diff --git a/BRAMS/src/ed2/edcp_driver.f90 b/BRAMS/src/ed2/edcp_driver.f90 index 726c26a2e..6c0c275e0 100644 --- a/BRAMS/src/ed2/edcp_driver.f90 +++ b/BRAMS/src/ed2/edcp_driver.f90 @@ -21,6 +21,9 @@ subroutine ed_coup_driver() , iqoutput & ! intent(in) , isoutput & ! intent(in) , iyoutput & ! intent(in) + , writing_long & ! intent(in) + , writing_eorq & ! intent(in) + , writing_dcyc & ! intent(in) , runtype ! ! intent(in) use ed_work_vars , only : ed_dealloc_work & ! subroutine , work_e ! ! intent(inout) @@ -228,18 +231,12 @@ subroutine ed_coup_driver() ! case the variables may be partially integrated. ! !---------------------------------------------------------------------------------------! if (trim(runtype) /= 'HISTORY') then - if (imoutput > 0 .or. iqoutput > 0) then - if (mynum == nnodetot) write(unit=*,fmt='(a)') ' [+] Reset monthly means...' - do ifm=1,ngrids - call zero_ed_monthly_output_vars(edgrid_g(ifm)) - call zero_ed_daily_output_vars(edgrid_g(ifm)) - end do - elseif (idoutput > 0) then - if (mynum == nnodetot) write(unit=*,fmt='(a)') ' [+] Reset daily means...' - do ifm=1,ngrids - call zero_ed_daily_output_vars(edgrid_g(ifm)) - end do - end if + if (mynum == nnodetot) write(unit=*,fmt='(a)') ' [+] Reset long-term means...' + do ifm=1,ngrids + if (writing_long) call zero_ed_dmean_vars(edgrid_g(ifm)) + if (writing_eorq) call zero_ed_mmean_vars(edgrid_g(ifm)) + if (writing_dcyc) call zero_ed_qmean_vars(edgrid_g(ifm)) + end do !----- Output Initial State. --------------------------------------------------------! if (mynum == nnodetot) write(unit=*,fmt='(a)') ' [+] Update annual means...' @@ -256,7 +253,7 @@ subroutine ed_coup_driver() if (mynum == nnodetot) write(unit=*,fmt='(a)') ' [+] Reset averaged variables...' do ifm=1,ngrids - call reset_averaged_vars(edgrid_g(ifm)) + call zero_ed_fmean_vars(edgrid_g(ifm)) end do @@ -418,10 +415,8 @@ end subroutine find_frqsum !==========================================================================================! !==========================================================================================! -! This sub-routine will assign the longitude, latitude, and soil class for all ! -! non-empty grid points. The difference between this and the original ED-2 stand alone ! -! sub-routine is that here we will also assign the match between the polygon and the ! -! corresponding grid point in BRAMS. ! +! This sub-routine will assign the longitude, latitude, and the match between the ! +! polygon and the corresponding grid point in BRAMS. ! !------------------------------------------------------------------------------------------! subroutine set_polygon_coordinates_edcp() use grid_coms , only : ngrids & ! intent(in) @@ -455,18 +450,6 @@ subroutine set_polygon_coordinates_edcp() - !----- Soil texture class. -------------------------------------------------------! - cgrid%ntext_soil(1:nzg,ipy) = work_v(ifm)%ntext(1,ipy) - !---------------------------------------------------------------------------------! - - - - !----- Soil colour class. --------------------------------------------------------! - cgrid%ncol_soil(ipy) = work_v(ifm)%nscol(ipy) - !---------------------------------------------------------------------------------! - - - !---------------------------------------------------------------------------------! ! Ilon and ilat are the pointer to make the match between the ED2 polygon ! ! and the corresponding atmospheric grid cell. They are local to the nodes, ! diff --git a/BRAMS/src/ed2/edcp_met.f90 b/BRAMS/src/ed2/edcp_met.f90 index cfd241cf9..be6001b21 100644 --- a/BRAMS/src/ed2/edcp_met.f90 +++ b/BRAMS/src/ed2/edcp_met.f90 @@ -1576,7 +1576,7 @@ subroutine copy_avgvars_to_leaf(ifm) , nzs ! ! intent(in) use rconstants , only : t3ple & ! intent(in) , wdns & ! intent(in) - , kgCyr_2_umols & ! intent(in) + , umols_2_kgCyr ! ! intent(in) use therm_lib , only : alvl & ! intent(in) , alvi & ! intent(in) , uint2tl & ! intent(in) @@ -1608,6 +1608,7 @@ subroutine copy_avgvars_to_leaf(ifm) integer :: idbh integer :: ipft integer :: nsoil + real :: poly_area_i real :: site_area_i real :: patch_wgt real :: ground_temp @@ -1728,11 +1729,11 @@ subroutine copy_avgvars_to_leaf(ifm) !----- Temporary surface water: squeeze everything into one layer. ------------! leaf_g(ifm)%sfcwater_energy(1,ix,iy,ilp) = & leaf_g(ifm)%sfcwater_energy(1,ix,iy,ilp) & - + csite%fmean_sfcw_energy(ipa) * csite%fmean_sfcw_water(ipa) & + + csite%fmean_sfcw_energy(ipa) * csite%fmean_sfcw_mass(ipa) & * patch_wgt leaf_g(ifm)%sfcwater_mass (1,ix,iy,ilp) = & leaf_g(ifm)%sfcwater_mass (1,ix,iy,ilp) & - + csite%fmean_sfcw_water(ipa) * patch_wgt + + csite%fmean_sfcw_mass (ipa) * patch_wgt leaf_g(ifm)%sfcwater_depth (1,ix,iy,ilp) = & leaf_g(ifm)%sfcwater_depth (1,ix,iy,ilp) & + csite%fmean_sfcw_depth (ipa) * patch_wgt @@ -1797,7 +1798,7 @@ subroutine copy_avgvars_to_leaf(ifm) !----- Heterotrophic respiration. Make units umol/m2/s. ----------------------! leaf_g(ifm)%resphet(ix,iy,ilp) = leaf_g(ifm)%resphet(ix,iy,ilp) & + csite%fmean_rh (ico) & - * patch_wgt * kgCyr_2_umols + * patch_wgt / umols_2_kgCyr !------------------------------------------------------------------------------! @@ -1820,7 +1821,7 @@ subroutine copy_avgvars_to_leaf(ifm) veg_hcap = cpatch%fmean_leaf_hcap (ico) + cpatch%fmean_wood_hcap (ico) if (veg_hcap > 0.) then !----- There are plants. Use standard thermodynamics. ------------------! - call uextcm2tcl(veg_energy,veg_water,veg_hcap,veg_temp,veg_fliq) + call uextcm2tl(veg_energy,veg_water,veg_hcap,veg_temp,veg_fliq) else !----- No plant biomass. Use CAS temperature instead. -------------------! veg_temp = can_temp @@ -1846,7 +1847,7 @@ subroutine copy_avgvars_to_leaf(ifm) leaf_g(ifm)%veg_lai (ix,iy,ilp) = leaf_g(ifm)%veg_lai (ix,iy,ilp) & + cpatch%lai(ico) * patch_wgt leaf_g(ifm)%veg_tai (ix,iy,ilp) = leaf_g(ifm)%veg_tai (ix,iy,ilp) & - + ( cpatch%lai(ico) + cgrid%wai(ico) ) & + + ( cpatch%lai(ico) + cpatch%wai(ico) ) & * patch_wgt leaf_g(ifm)%veg_agb (ix,iy,ilp) = leaf_g(ifm)%veg_agb (ix,iy,ilp) & + (cpatch%nplant(ico) * cpatch%agb(ico)) & @@ -1881,11 +1882,11 @@ subroutine copy_avgvars_to_leaf(ifm) leaf_g(ifm)%gpp (ix,iy,ilp) = leaf_g(ifm)%gpp (ix,iy,ilp) & + cpatch%fmean_gpp (ico) & * cpatch%nplant (ico) & - * patch_wgt * kgCyr_2_umols + * patch_wgt / umols_2_kgCyr leaf_g(ifm)%plresp (ix,iy,ilp) = leaf_g(ifm)%plresp (ix,iy,ilp) & + cpatch%fmean_plresp(ico) & * cpatch%nplant (ico) & - * patch_wgt * kgCyr_2_umols + * patch_wgt / umols_2_kgCyr !---------------------------------------------------------------------------! end do cohortloop !------------------------------------------------------------------------------! @@ -1897,11 +1898,11 @@ subroutine copy_avgvars_to_leaf(ifm) ! Check whether there was some mass in the temporary pounding/snow layer. In ! ! case there isn't, force all properties to be zero. ! !---------------------------------------------------------------------------------! - if (leaf_g(ifm)%sfcwater_mass > tiny_sfcwater_mass) then + if (leaf_g(ifm)%sfcwater_mass(1,ix,iy,ilp) > tiny_sfcwater_mass) then leaf_g(ifm)%sfcwater_nlev (ix,iy,ilp) = 1. leaf_g(ifm)%sfcwater_energy(1,ix,iy,ilp) = & leaf_g(ifm)%sfcwater_energy(1,ix,iy,ilp) & - / leaf_g(ifm)%sfcwater_water (1,ix,iy,ilp) + / leaf_g(ifm)%sfcwater_mass (1,ix,iy,ilp) else leaf_g(ifm)%sfcwater_nlev (ix,iy,ilp) = 0. leaf_g(ifm)%sfcwater_energy (1,ix,iy,ilp) = 0. From 8c57b0bae2ebf53070ac1b2aa51712fede96876a Mon Sep 17 00:00:00 2001 From: Marcos Longo Date: Wed, 21 Nov 2012 23:05:58 -0500 Subject: [PATCH 4/6] 1. Updated the script to compare hourly results at high resolution 2. Fixed a big on make_joborder.r, in case soil texture is one of the varying variables, sand and clay fraction are overwritten. Soil texture = 0 means site level, in case it is needed. 3. Added a new flag for MAXPATCH: if it is -1 or 1, it will force the fusion down to one patch for each land use type. --- BRAMS/Template/RAMSIN | 5 + BRAMS/run/RAMSIN | 5 + ED/Template/Template/ED2IN | 5 + ED/Template/compare_results.r | 1385 ++++++++++++++++++++++++++---- ED/Template/make_joborder.r | 50 +- ED/Template/spawn_poly.sh | 4 +- ED/run/ED2IN | 5 + ED/src/utils/fuse_fiss_utils.f90 | 82 +- 8 files changed, 1314 insertions(+), 227 deletions(-) diff --git a/BRAMS/Template/RAMSIN b/BRAMS/Template/RAMSIN index 6328a5dc5..296f2c6af 100644 --- a/BRAMS/Template/RAMSIN +++ b/BRAMS/Template/RAMSIN @@ -2634,6 +2634,11 @@ $ED2_INFO ! the initialization, and fusion will never happen again. Notice ! ! that if the patches are too different, then the actual number of ! ! patches in a site may exceed MAXPATCH. ! + ! ! + ! IMPORTANT: If MAXPATCH = -1 or 1, then the model will force fusion ! + ! until the total number of patches is 1 for each land ! + ! use type. ! + ! ! ! MAXCOHORT -- If number of cohorts in a given patch exceeds MAXCOHORT, force ! ! cohort fusion. If MAXCOHORT is 0, then fusion will never happen. ! ! If MAXCOHORT is negative, then the absolute value is used only ! diff --git a/BRAMS/run/RAMSIN b/BRAMS/run/RAMSIN index d4a8392ac..dbc2c095f 100644 --- a/BRAMS/run/RAMSIN +++ b/BRAMS/run/RAMSIN @@ -2656,6 +2656,11 @@ $ED2_INFO ! the initialization, and fusion will never happen again. Notice ! ! that if the patches are too different, then the actual number of ! ! patches in a site may exceed MAXPATCH. ! + ! ! + ! IMPORTANT: If MAXPATCH = -1 or 1, then the model will force fusion ! + ! until the total number of patches is 1 for each land ! + ! use type. ! + ! ! ! MAXCOHORT -- If number of cohorts in a given patch exceeds MAXCOHORT, force ! ! cohort fusion. If MAXCOHORT is 0, then fusion will never happen. ! ! If MAXCOHORT is negative, then the absolute value is used only ! diff --git a/ED/Template/Template/ED2IN b/ED/Template/Template/ED2IN index f0b666fde..b69a63399 100644 --- a/ED/Template/Template/ED2IN +++ b/ED/Template/Template/ED2IN @@ -1237,6 +1237,11 @@ $ED_NL ! the initialization, and fusion will never happen again. Notice ! ! that if the patches are too different, then the actual number of ! ! patches in a site may exceed MAXPATCH. ! + ! ! + ! IMPORTANT: If MAXPATCH = -1 or 1, then the model will force fusion ! + ! until the total number of patches is 1 for each land ! + ! use type. ! + ! ! ! MAXCOHORT -- If number of cohorts in a given patch exceeds MAXCOHORT, force ! ! cohort fusion. If MAXCOHORT is 0, then fusion will never happen. ! ! If MAXCOHORT is negative, then the absolute value is used only ! diff --git a/ED/Template/compare_results.r b/ED/Template/compare_results.r index 807162ad0..0dbe9c95c 100644 --- a/ED/Template/compare_results.r +++ b/ED/Template/compare_results.r @@ -16,26 +16,29 @@ graphics.off() #------------------------------------------------------------------------------------------# here = getwd() # Current directory srcdir = "/n/moorcroft_data/mlongo/util/Rsc" # Script directory -outroot = paste(here,"twostream_comp",sep="/") # Output directory - -sites = c("gyf","cax","m34","s67","s77","s83","ban","pnz","rja","fns","pdg") -simul = list() -simul[[1]] = list( name = "pft00_canrad00_sas" - , desc = "Medvigy + SAS" - , colour = "chartreuse" - )#end list -simul[[2]] = list( name = "pft00_canrad01_sas" - , desc = "Zhao-Qualls + SAS" - , colour = "chartreuse4" - )#end list -simul[[3]] = list( name = "pft00_canrad00_ble" - , desc = "Medvigy + Big Leaf" - , colour = "darkorange" - )#end list -simul[[4]] = list( name = "pft00_canrad01_ble" - , desc = "Zhao-Qualls + Big Leaf" - , colour = "firebrick" - )#end list +outroot = paste(here,"structure_comp",sep="/") # Output directory + +sites = c("gyf","s67","s83","pdg","pnz","ban","rja","m34") +sites.pch.1st = c( 24, 22, 23, 25, 21, 22, 21, 23) +sites.pch.2nd = c( 0, 0, 3, 0, 4, 4, 0, 0) +sites.pch.leg = c( 24, 22, 9, 25, 13, 7, 21, 23) + +size.struct = list( name = c( "sas", "ble") + , desc = c( "Size St", "1 Size") + , verbose = c( "Size structure", "Single size") + , hue = c( "green", "purple") + )#end list +pft.struct = list( name = c( "pft05", "pft02") + , desc = c( "3T+2G", "1T+1G") + , verbose = c( "Niche structure", "Single PFT") + , sat = c( 1, 2) + )#end list +age.struct = list( name = c( "age00", "age01") + , desc = c( "Age St", "1 Age") + , verbose = c( "Age structure", "Single age") + , bg = c( NA, "white") + , lty = c( "solid", "dashed") + )#end list #------------------------------------------------------------------------------------------# @@ -87,23 +90,17 @@ cex.main = 0.8 # Scale coefficient for the title # Eddy flux comparisons. # #------------------------------------------------------------------------------------------# compvar = list() -compvar[[ 1]] = list( vnam = "hflxca" - , desc = "Sensible heat flux" - , unit = "[W/m2]" - , col.obser = c("grey42","grey21") - , col.model = c("orange1","chocolate4") - , leg.corner = "topleft" - , sunvar = FALSE - )#end list -compvar[[ 2]] = list( vnam = "wflxca" - , desc = "Water vapour flux" - , unit = "[kg/m2/day]" +compvar[[ 1]] = list( vnam = "ustar" + , symbol = expression(u^symbol("\052")) + , desc = "Friction velocity" + , unit = "[m/s]" , col.obser = c("grey42","grey21") - , col.model = c("deepskyblue","royalblue4") + , col.model = c("mediumpurple1","purple4") , leg.corner = "topleft" , sunvar = FALSE )#end list -compvar[[ 3]] = list( vnam = "cflxca" +compvar[[ 2]] = list( vnam = "cflxca" + , symbol = expression(F(CO[2])) , desc = "Carbon dioxide flux" , unit = "[umol/m2/s]" , col.obser = c("grey42","grey21") @@ -111,7 +108,8 @@ compvar[[ 3]] = list( vnam = "cflxca" , leg.corner = "bottomright" , sunvar = FALSE )#end list -compvar[[ 4]] = list( vnam = "cflxst" +compvar[[ 3]] = list( vnam = "cflxst" + , symbol = expression(S(CO[2])) , desc = "Carbon dioxide storage" , unit = "[umol/m2/s]" , col.obser = c("grey42","grey21") @@ -119,15 +117,26 @@ compvar[[ 4]] = list( vnam = "cflxst" , leg.corner = "topleft" , sunvar = FALSE )#end list -compvar[[ 5]] = list( vnam = "gpp" - , desc = "Gross primary productivity" +compvar[[ 4]] = list( vnam = "nee" + , symbol = expression(NEE) + , desc = "Net ecosystem exchange" + , unit = "[umol/m2/s]" + , col.obser = c("grey42","grey21") + , col.model = c("chartreuse","chartreuse4") + , leg.corner = "bottomright" + , sunvar = FALSE + )#end list +compvar[[ 5]] = list( vnam = "nep" + , symbol = expression(NEP) + , desc = "Net ecosystem productivity" , unit = "[kgC/m2/yr]" , col.obser = c("grey42","grey21") - , col.model = c("green3","darkgreen") + , col.model = c("olivedrab2","darkolivegreen4") , leg.corner = "topleft" - , sunvar = TRUE + , sunvar = FALSE )#end list compvar[[ 6]] = list( vnam = "reco" + , symbol = expression(R[Eco]) , desc = "Ecosystem respiration" , unit = "[kgC/m2/yr]" , col.obser = c("grey42","grey21") @@ -135,69 +144,68 @@ compvar[[ 6]] = list( vnam = "reco" , leg.corner = "topleft" , sunvar = FALSE )#end list -compvar[[ 7]] = list( vnam = "nep" - , desc = "Net ecosystem productivity" +compvar[[ 7]] = list( vnam = "gpp" + , symbol = expression(GPP) + , desc = "Gross primary productivity" , unit = "[kgC/m2/yr]" , col.obser = c("grey42","grey21") - , col.model = c("olivedrab2","darkolivegreen4") + , col.model = c("green3","darkgreen") , leg.corner = "topleft" - , sunvar = FALSE + , sunvar = TRUE )#end list -compvar[[ 8]] = list( vnam = "nee" - , desc = "Net ecosystem exchange" +compvar[[ 8]] = list( vnam = "parup" + , symbol = expression(PAR^symbol("\335")) + , desc = "Outgoing PAR" , unit = "[umol/m2/s]" , col.obser = c("grey42","grey21") - , col.model = c("chartreuse","chartreuse4") - , leg.corner = "bottomright" - , sunvar = FALSE + , col.model = c("chartreuse4","darkolivegreen1") + , leg.corner = "topleft" + , sunvar = TRUE )#end list -compvar[[ 9]] = list( vnam = "ustar" - , desc = "Friction velocity" - , unit = "[m/s]" +compvar[[ 9]] = list( vnam = "rshortup" + , symbol = expression(SW^symbol("\335")) + , desc = "Outgoing shortwave radiation" + , unit = "[W/m2]" , col.obser = c("grey42","grey21") - , col.model = c("mediumpurple1","purple4") + , col.model = c("royalblue4","deepskyblue") , leg.corner = "topleft" - , sunvar = FALSE + , sunvar = TRUE )#end list -compvar[[10]] = list( vnam = "rlongup" - , desc = "Outgoing longwave radiation" +compvar[[10]] = list( vnam = "rnet" + , symbol = expression(R[Net]) + , desc = "Net radiation" , unit = "[W/m2]" , col.obser = c("grey42","grey21") , col.model = c("gold","orangered") , leg.corner = "topleft" , sunvar = FALSE )#end list -compvar[[11]] = list( vnam = "rnet" - , desc = "Net radiation" +compvar[[11]] = list( vnam = "rlongup" + , symbol = expression(LW^symbol("\335")) + , desc = "Outgoing longwave radiation" , unit = "[W/m2]" , col.obser = c("grey42","grey21") , col.model = c("gold","orangered") , leg.corner = "topleft" , sunvar = FALSE )#end list -compvar[[12]] = list( vnam = "albedo" - , desc = "Albedo" - , unit = "[--]" +compvar[[12]] = list( vnam = "hflxca" + , symbol = expression(F(theta)) + , desc = "Sensible heat flux" + , unit = "[W/m2]" , col.obser = c("grey42","grey21") , col.model = c("orange1","chocolate4") , leg.corner = "topleft" - , sunvar = TRUE - )#end list -compvar[[13]] = list( vnam = "parup" - , desc = "Outgoing PAR" - , unit = "[umol/m2/s]" - , col.obser = c("grey42","grey21") - , col.model = c("chartreuse4","darkolivegreen1") - , leg.corner = "topleft" - , sunvar = TRUE + , sunvar = FALSE )#end list -compvar[[14]] = list( vnam = "rshortup" - , desc = "Outgoing shortwave radiation" - , unit = "[W/m2]" +compvar[[13]] = list( vnam = "wflxca" + , symbol = expression(F(H[2]*O)) + , desc = "Water vapour flux" + , unit = "[kg/m2/day]" , col.obser = c("grey42","grey21") - , col.model = c("royalblue4","deepskyblue") + , col.model = c("deepskyblue","royalblue4") , leg.corner = "topleft" - , sunvar = TRUE + , sunvar = FALSE )#end list #------------------------------------------------------------------------------------------# @@ -256,32 +264,50 @@ control[[10]] = list( vnam = "global" # Statistics. # #------------------------------------------------------------------------------------------# good = list() -good[[ 1]] = list( vnam = "bias" - , desc = "Mean bias" +good[[ 1]] = list( vnam = "bias" + , desc = "Mean bias" + , spider = TRUE + , normalise = TRUE )#end list -good[[ 2]] = list( vnam = "rmse" - , desc = "Root mean square error" +good[[ 2]] = list( vnam = "rmse" + , desc = "Root mean square error" + , spider = TRUE + , normalise = TRUE )#end list -good[[ 3]] = list( vnam = "r.squared" - , desc = "Coefficient of determination" +good[[ 3]] = list( vnam = "r.squared" + , desc = "Coefficient of determination" + , spider = FALSE + , normalise = FALSE )#end list -good[[ 4]] = list( vnam = "fvue" - , desc = "Fraction of variability unexplained" +good[[ 4]] = list( vnam = "fvue" + , desc = "Fraction of variability unexplained" + , spider = TRUE + , normalise = FALSE )#end list -good[[ 5]] = list( vnam = "sw.stat" - , desc = "Shapiro-Wilk statistic" +good[[ 5]] = list( vnam = "sw.stat" + , desc = "Shapiro-Wilk statistic" + , spider = TRUE + , normalise = FALSE )#end list -good[[ 6]] = list( vnam = "ks.stat" - , desc = "Kolmogorov-Smirnov statistic" +good[[ 6]] = list( vnam = "ks.stat" + , desc = "Kolmogorov-Smirnov statistic" + , spider = TRUE + , normalise = FALSE )#end list -good[[ 7]] = list( vnam = "lsq.lnlike" - , desc = "Scaled support based on least squares" +good[[ 7]] = list( vnam = "lsq.lnlike" + , desc = "Scaled support based on least squares" + , spider = FALSE + , normalise = FALSE )#end list -good[[ 8]] = list( vnam = "sn.lnlike" - , desc = "Scaled support based on skew normal distribution" +good[[ 8]] = list( vnam = "sn.lnlike" + , desc = "Scaled support based on skew normal distribution" + , spider = FALSE + , normalise = FALSE )#end list -good[[ 9]] = list( vnam = "norm.lnlike" - , desc = "Scaled support based on normal distribution" +good[[ 9]] = list( vnam = "norm.lnlike" + , desc = "Scaled support based on normal distribution" + , spider = FALSE + , normalise = FALSE )#end list #------------------------------------------------------------------------------------------# @@ -292,27 +318,107 @@ source(file.path(srcdir,"load.everything.r")) #------------------------------------------------------------------------------------------# -#----- In case there is some graphic still opened. ----------------------------------------# -graphics.off() -#------------------------------------------------------------------------------------------# - - #----- Set how many formats we must output. -----------------------------------------------# outform = tolower(outform) nout = length(outform) #------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +# Combine all structures into a consistent list. # +#------------------------------------------------------------------------------------------# +#----- Simulation keys. The separation is rather cumbersome, mix them. -------------------# +egrid.key = expand.grid( size = size.struct$name + , pft = pft.struct$name + , age = age.struct$name + , stringsAsFactors = FALSE + )#end expand.grid +suffix.key = apply( X = egrid.key[,2:3],MARGIN=1,FUN=paste,collapse="+") +simul.key = apply( X = cbind(egrid.key[,1],suffix.key),MARGIN=1,FUN=paste,collapse="_") +#----- Description. -----------------------------------------------------------------------# +simleg.key = apply( X = expand.grid( size.struct$desc + , pft.struct$desc + , age.struct$desc + )#end expand.grid + , MARGIN = 1 + , FUN = paste + , collapse = " + " + )#end apply +#---- Create the colours and line type for legend. ----------------------------------------# +n.size = length(size.struct$name) +n.pft = length(pft.struct$name ) +n.age = length(age.struct$name ) +my.rainbow = array(data=NA,dim=c(n.size,n.pft,n.age)) +my.background = c(aperm(a=array(age.struct$bg,dim=c(n.age,n.size,n.pft)),perm=c(2,3,1))) +for (n in 1:n.size){ + n.rbow = n.pft*n.age + this.hue = get(paste("hue",size.struct$hue[n],sep=".")) + my.rainbow[n,,] = rev(this.hue(n=n.rbow+1)[-n.rbow+1]) +}#end for +simcol.key = c(unlist(my.rainbow)) +simfg.key = rep(my.rainbow[,,1],times=n.age) +simbg.key = rep(my.rainbow[,,2],times=n.age) +sel = ! is.na(my.background) +simbg.key[sel] = my.background[sel] +simlty.key = c(aperm(a=array(age.struct$lty,dim=c(n.age,n.size,n.pft)),perm=c(2,3,1))) +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Some big leaf simulations are unecessary: big leaf cannot have age structure. # +# Remove these simulations from the list. # +#------------------------------------------------------------------------------------------# +bye = intersect(which(egrid.key$size == "ble"),which(egrid.key$age == "age00")) +egrid.key = egrid.key [-bye,] +suffix.key = suffix.key[-bye ] +simul.key = simul.key [-bye ] +simleg.key = simleg.key[-bye ] +simcol.key = simcol.key[-bye ] +simfg.key = simfg.key [-bye ] +simbg.key = simbg.key [-bye ] +simlty.key = simlty.key[-bye ] +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Dump the information to a list. # +#------------------------------------------------------------------------------------------# +simul = data.frame( name = simul.key + , desc = simleg.key + , colour = simcol.key + , fgcol = simfg.key + , bgcol = simbg.key + , lty = simlty.key + , stringsAsFactors = FALSE + )#end data.frame +#------------------------------------------------------------------------------------------# + + + +#------ Create the legend summary. --------------------------------------------------------# +mid = ceiling (n.pft/2) +col.pft = rev(hue.grey(n=n.pft*2))[rep(c(TRUE,FALSE),times=n.pft)] +col.age = ifelse(is.na(age.struct$bg),"black",age.struct$bg) +summ = list( desc = c(size.struct$verbose,pft.struct$verbose,age.struct$verbose) + , col = c(my.rainbow[,mid,1],col.pft,rep("black",times=n.age)) + , bg = c(my.rainbow[,mid,2],col.pft,col.age) + , pch = rep(22,times=n.size+n.age+n.pft) + , lty = c(rep("solid",times=n.size+n.pft),age.struct$lty) + , cex = 2.0 + )#end summ +#------------------------------------------------------------------------------------------# + #------------------------------------------------------------------------------------------# # List the keys for all dimensions. # #------------------------------------------------------------------------------------------# -simul.key = apply(X = sapply(X=simul,FUN=c),MARGIN=1,FUN=unlist)[, "name"] -simleg.key = apply(X = sapply(X=simul,FUN=c),MARGIN=1,FUN=unlist)[, "desc"] -simcol.key = apply(X = sapply(X=simul,FUN=c),MARGIN=1,FUN=unlist)[,"colour"] sites.key = sites +sites.desc = poilist$longname[match(sites.key,poilist$iata)] control.key = apply(X = sapply(X=control,FUN=c),MARGIN=1,FUN=unlist)[,"vnam"] compvar.key = apply(X = sapply(X=compvar,FUN=c),MARGIN=1,FUN=unlist)$vnam +compvar.sym = apply(X = sapply(X=compvar,FUN=c),MARGIN=1,FUN=unlist)$symbol good.key = apply(X = sapply(X=good ,FUN=c),MARGIN=1,FUN=unlist)[,"vnam"] season.key = season.list diel.key = c("night","rise.set","day","all.hrs") @@ -352,53 +458,570 @@ size = plotsize(proje=FALSE,paper=paper) -#----- Create the output directory in case there isn't one. -------------------------------# -if (! file.exists(outroot)) dir.create(outroot) -#------------------------------------------------------------------------------------------# +#----- Find the best set up for plotting all seasons in the same plot. --------------------# +lo.box = pretty.box(n=nseason-1) +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Create all output directories, separated by format. # +#------------------------------------------------------------------------------------------# +if (! file.exists(outroot)) dir.create(outroot) +out = list() +for (o in 1:nout){ + is.figure = ! outform[o] %in% c("quartz","x11") + this.form = outform[o] + + + #---- Main path for this output format. ------------------------------------------------# + o.form = list() + o.form$main = file.path(outroot,this.form) + if (is.figure && ! file.exists(o.form$main)) dir.create(o.form$main) + #---------------------------------------------------------------------------------------# + + #---------------------------------------------------------------------------------------# + # Create paths for all variables. # + #---------------------------------------------------------------------------------------# + for (v in 1:ncompvar){ + this.vnam = compvar[[v]]$vnam + o.vnam = list() + o.vnam$main = file.path(o.form$main,this.vnam) + if (is.figure && ! file.exists(o.vnam$main)) dir.create(o.vnam$main) + + + #------------------------------------------------------------------------------------# + # Create paths for all variables. # + #------------------------------------------------------------------------------------# + for (d in 1:ndiel){ + this.diel = diel.key [d] + + o.diel = list() + o.diel$main = file.path(o.vnam$main,this.diel) + o.diel$barplot = file.path(o.diel$main,"barplot") + o.diel$skill = file.path(o.diel$main,"skill" ) + o.diel$taylor = file.path(o.diel$main,"taylor" ) + if (is.figure){ + if (! file.exists(o.diel$main )) dir.create(o.diel$main ) + if (! file.exists(o.diel$barplot)) dir.create(o.diel$barplot) + if (! file.exists(o.diel$skill )) dir.create(o.diel$skill ) + if (! file.exists(o.diel$taylor )) dir.create(o.diel$taylor ) + }#end if (is.figure) + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # Quality plot, we must create directories by controlling variable. # + #---------------------------------------------------------------------------------# + o.qual = list() + o.qual$main = file.path(o.diel$main,"quality") + if (is.figure && ! file.exists(o.qual$main)) dir.create(o.qual$main) + for (u in 1:ncontrol){ + this.qual = control[[u]]$vnam + o.qual[[this.qual]] = file.path(o.qual$main,this.qual) + if (is.figure && ! file.exists(o.qual[[this.qual]])){ + dir.create(o.qual[[this.qual]]) + }#end if (is.figure && ! file.exists(o.qual[[this.qual]])) + #------------------------------------------------------------------------------# + }#end for (u in 1:ncontrol) + o.diel$quality = o.qual + #---------------------------------------------------------------------------------# + + + + #----- Copy the diel list to the parent list. ------------------------------------# + o.vnam[[this.diel]] = o.diel + #---------------------------------------------------------------------------------# + }#end for (d in 1:ndiel) + #------------------------------------------------------------------------------------# + + + + o.form[[this.vnam]] = o.vnam + #------------------------------------------------------------------------------------# + }#end for for (v in 1:ncompvar) + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # Create paths for the "spider web" plots. # + #---------------------------------------------------------------------------------------# + o.spider = list() + o.spider$main = file.path(o.form$main,"spider") + if (is.figure && ! file.exists(o.spider$main)) dir.create(o.spider$main) + for (d in 1:ndiel){ + this.diel = diel.key [d] + o.diel = list() + o.diel$main = file.path(o.spider$main,this.diel ) + o.diel$sites = file.path(o.diel$main ,"sites" ) + o.diel$variables = file.path(o.diel$main ,"variables") + if (is.figure){ + if (! file.exists(o.diel$main )) dir.create(o.diel$main ) + if (! file.exists(o.diel$sites )) dir.create(o.diel$sites ) + if (! file.exists(o.diel$variables)) dir.create(o.diel$variables) + }#end if (is.figure) + #------------------------------------------------------------------------------------# + o.spider[[this.diel]] = o.diel + }#end for (d in 1:ndiel) + o.form$spider = o.spider + #---------------------------------------------------------------------------------------# + + + #----- Save the full list to the main path list. ---------------------------------------# + out[[this.form]] = o.form + #---------------------------------------------------------------------------------------# +}#end for (o in 1:nout) +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# Loop through the sites. # +#------------------------------------------------------------------------------------------# +cat (" + Add season and diel keys to seasons and diel...","\n") +for (p in 1:nsites){ + #----- Grab the observation. -----------------------------------------------------------# + obs = get(paste("obs",sites[p],sep=".")) + #---------------------------------------------------------------------------------------# + + + #----- Create some variables to describe season and time of the day. -------------------# + if (! "season" %in% names(obs)) obs$season = season(obs$when,add.year=FALSE) + if (! "diel" %in% names(obs)) obs$diel = (! obs$nighttime) + obs$highsun + #---------------------------------------------------------------------------------------# + + + + #----- Save the variables to the observations. -----------------------------------------# + dummy = assign(paste("obs",sites[p],sep="."),obs) + #---------------------------------------------------------------------------------------# +}#end for (p in 1:nsites) +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Retrieve all data. # +#------------------------------------------------------------------------------------------# +cat (" + Retrieve model results for all sites...","\n") +res = list() +for (p in 1:nsites){ + #----- Get the basic information. ------------------------------------------------------# + iata = sites[p] + im = match(iata,poilist$iata) + this = list() + this$short = poilist$short [im] + this$longname = poilist$longname[im] + this$iata = poilist$iata [im] + this$lon = poilist$lon [im] + this$lat = poilist$lat [im] + this$sim = list() + this$ans = list() + cat(" - Site :",this$longname,"...","\n") + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Get all the statistics and actual values for every simulation. # + #---------------------------------------------------------------------------------------# + for (s in 1:nsimul){ + cat(" * Simulation: ",simul$desc[s],"...","\n") + sim.name = paste("t",iata,"_",simul$name[s],sep="") + sim.path = paste(here,sim.name,sep="/") + sim.file = paste(sim.path,"rdata_hour",paste("comp-",sim.name,".RData",sep="") + ,sep="/") + load(sim.file) + + ans.name = paste("t",iata,"_",simul$name[s],sep="") + ans.path = paste(here,sim.name,sep="/") + ans.file = paste(sim.path,"rdata_hour",paste(sim.name,".RData",sep="") + ,sep="/") + load(ans.file) + this$sim[[simul$name[s]]] = dist.comp + this$ans[[simul$name[s]]] = model + rm(list=c("dist.comp","model","eddy.complete","eddy.tresume")) + }#end for + #---------------------------------------------------------------------------------------# + + + + #----- Copy the data to the results. ---------------------------------------------------# + res[[iata]] = this + rm(this) + #---------------------------------------------------------------------------------------# +}#end for +#------------------------------------------------------------------------------------------# + + + + + +#------------------------------------------------------------------------------------------# +# Plot the spider web for all sites and all variables, for statistics that may can be # +# plotted in a spider web (i.e., positive defined). # +#------------------------------------------------------------------------------------------# +cat(" + Plot the spider web diagrams for all sites and all variables...","\n") +good.loop = which(unlist(sapply(X=good,FUN=c)["spider",])) +for (g in good.loop){ + #---- Copy structured variables to convenient scratch scalars. -------------------------# + this.good = good[[g]]$vnam + desc.good = good[[g]]$desc + norm.good = good[[g]]$normalise + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Load all data to an array. # + #---------------------------------------------------------------------------------------# + cat(" - ",desc.good,"...","\n") + web = array( dim = c (nsimul,nsites,ncompvar,ndiel,nseason) + , dimnames = list(simul.key,sites.key,compvar.key,diel.key,season.key) + )#end array + for (v in 1:ncompvar){ + this.vnam = compvar[[v]]$vnam + this.measured = paste("measured",this.vnam,sep=".") + + #------------------------------------------------------------------------------------# + # Loop over all sites. # + #------------------------------------------------------------------------------------# + for (p in 1:nsites){ + iata = sites.key[p] + sfac = matrix(data=1,nrow=ndiel,ncol=nseason,dimnames=list(diel.key,season.key)) + + #---------------------------------------------------------------------------------# + # Find the scale factors for variables that have units. # + #---------------------------------------------------------------------------------# + if (norm.good){ + obs = get(paste("obs",iata,sep=".")) + + #----- Find out when this output variable is finite and measured. -------------# + p.sel = is.finite(obs[[this.vnam]]) & obs[[this.measured]] + #------------------------------------------------------------------------------# + + dd = sequence(ndiel-1) + ee = sequence(nseason-1) + + #----- Find the components. ---------------------------------------------------# + sfac[ dd, ee] = tapply( X = obs[[this.vnam]][sel] + , INDEX = list(obs$diel[sel],obs$season[sel]) + , FUN = sd + , na.rm = TRUE + )#end tapply + sfac[ dd,nseason] = tapply( X = obs[[this.vnam]][sel] + , INDEX = obs$diel[sel] + , FUN = sd + , na.rm = TRUE + )#end tapply + sfac[ndiel, ee] = tapply( X = obs[[this.vnam]][sel] + , INDEX = obs$season[sel] + , FUN = sd + , na.rm = TRUE + )#end tapply + sfac[ndiel,nseason] = sd ( x = obs[[this.vnam]][sel] + , na.rm = TRUE + )#end sd + #------------------------------------------------------------------------------# + }#end if (norm.good) + sfac = ifelse(sfac == 0.,NA,1/sfac) + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Grab the data for this simulation. # + #---------------------------------------------------------------------------------# + for (s in 1:nsimul){ + this = res[[iata]]$sim[[s]][[this.vnam]][[this.good]] + use.season = paste(sprintf("%2.2i",sequence(nseason)),season.key,sep="-") + web[s,p,v,,] = abs(this[diel.key,use.season]) * sfac + }#end for (s in 1:nsimul) + #---------------------------------------------------------------------------------# + }#end for (p in 1:nsites) + #------------------------------------------------------------------------------------# + }#end for (v in 1:ncompvar) + #---------------------------------------------------------------------------------------# + + + + + + #---------------------------------------------------------------------------------------# + # Plot the spider webs by diel and variable. # + #---------------------------------------------------------------------------------------# + for (d in 1:ndiel){ + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + # Webs by site (all variables). # + #------------------------------------------------------------------------------------# + for (p in 1:nsites){ + iata = sites.key[p] + + letitre = paste(desc.good," - ",sites.desc[p],"\n",diel.desc[d],sep="") + + if (any(is.finite(web[,p,,d,nseason]))){ + v.sel = is.finite(colSums(web[,p,,d,nseason])) + + if (this.good %in% "sw.stat"){ + web.range = c(0,1) + }else{ + web.range = range(c(0,web[,p,v.sel,d,nseason]),na.rm=TRUE) + }#end if + web.lim = pretty(web.range,n=4) + + #------------------------------------------------------------------------------# + # Webs by variable (all sites). # + #------------------------------------------------------------------------------# + for (o in 1:nout){ + #----- Make the file name. -------------------------------------------------# + out.web = out[[outform[o]]]$spider[[diel.key[d]]]$sites + fichier = paste(out.web,"/spider-allyear-",iata,"-",this.good + ,"-",diel.key[d],".",outform[o],sep="") + if (outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth,height=size$height*depth + ,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }#end if + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Split the window into 3, and add site and simulation legends at the # + # bottom. # + #---------------------------------------------------------------------------# + par.orig = par(no.readonly = TRUE) + mar.orig = par.orig$mar + par(oma = c(0.2,3,3.0,0)) + layout(mat = rbind(2,1),height = c(5.0,1.0)) + #---------------------------------------------------------------------------# + + + + + #----- Legend: the simulations. --------------------------------------------# + par(mar=c(0.2,0.1,0.1,0.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + legend ( x = "bottom" + , inset = 0.0 + , legend = summ$desc + , col = summ$col + , lwd = 3.0 + , lty = summ$lty + , bg = "white" + , ncol = 3 + , title = expression(bold("Structure")) + , pt.cex = summ$cex + , cex = 1.0 + )#end legend + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Plot the spider web. # + #---------------------------------------------------------------------------# + radial.flex( lengths = web[,p,v.sel,d,nseason] + , labels = as.expression(compvar.sym[v.sel]) + , radlab = FALSE + , start = 90 + , clockwise = TRUE + , rp.type = "p" + , main = "" + , line.col = simul$fgcol + , lty = simul$lty + , lwd = 3.0 + , show.grid = TRUE + , show.grid.labels = 4 + , show.radial.grid = TRUE + , grid.col = "grey66" + , radial.lim = web.lim + , poly.col = NA + , mar = c(2,1,2,1)+0.1 + , cex.lab = 0.5 + )#end radial.plot + #---------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------# + # Plot the global title. # + #---------------------------------------------------------------------------# + par(las=0) + mtext(text=letitre,side=3,outer=TRUE,cex=1.1,font=2) + #---------------------------------------------------------------------------# + + + #----- Close the device. ---------------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + dummy = clean.tmp() + #---------------------------------------------------------------------------# + + }#end for (o in 1:nout) + #------------------------------------------------------------------------------# + }#end if (any(is.finite(web[,,v,d,nseason]))) + #---------------------------------------------------------------------------------# + }#end for (v in 1:ncompvar) + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + + + + + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + # Webs by variable (all sites). # + #------------------------------------------------------------------------------------# + for (v in 1:ncompvar){ + this.vnam = compvar[[v]]$vnam + this.desc = compvar[[v]]$desc + + letitre = paste(desc.good," - ",this.desc,"\n",diel.desc[d],sep="") + + if (any(is.finite(web[,,v,d,nseason]))){ + p.sel = is.finite(colSums(web[,,v,d,nseason])) + + if (this.good %in% "sw.stat"){ + web.range = c(0,1) + }else{ + web.range = range(c(0,web[,p.sel,v,d,nseason]),na.rm=TRUE) + }#end if + web.lim = pretty(web.range,n=4) + + #------------------------------------------------------------------------------# + # Webs by variable (all sites). # + #------------------------------------------------------------------------------# + for (o in 1:nout){ + #----- Make the file name. -------------------------------------------------# + out.web = out[[outform[o]]]$spider[[diel.key[d]]]$variables + fichier = paste(out.web,"/spider-allyear-",this.vnam,"-",this.good + ,"-",diel.key[d],".",outform[o],sep="") + if (outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth,height=size$height*depth + ,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }#end if + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Split the window into 3, and add site and simulation legends at the # + # bottom. # + #---------------------------------------------------------------------------# + par.orig = par(no.readonly = TRUE) + mar.orig = par.orig$mar + par(oma = c(0.2,3,3.0,0)) + layout(mat = rbind(2,1),height = c(5.0,1.0)) + #---------------------------------------------------------------------------# + + + + + #----- Legend: the simulations. --------------------------------------------# + par(mar=c(0.2,0.1,0.1,0.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + legend ( x = "bottom" + , inset = 0.0 + , legend = summ$desc + , col = summ$col + , lwd = 3.0 + , lty = summ$lty + , bg = "white" + , ncol = 3 + , title = expression(bold("Structure")) + , pt.cex = summ$cex + , cex = 1.0 + )#end legend + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Plot the spider web. # + #---------------------------------------------------------------------------# + radial.flex( lengths = web[,p.sel,v,d,nseason] + , labels = toupper(sites.key[p.sel]) + , radlab = FALSE + , start = 90 + , clockwise = TRUE + , rp.type = "p" + , main = "" + , line.col = simul$fgcol + , lty = simul$lty + , lwd = 3.0 + , show.grid = TRUE + , show.grid.labels = 4 + , show.radial.grid = TRUE + , grid.col = "grey66" + , radial.lim = web.lim + , poly.col = NA + , mar = c(2,1,2,1)+0.1 + , cex.lab = 0.5 + )#end radial.plot + #---------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------# + # Plot the global title. # + #---------------------------------------------------------------------------# + par(las=0) + mtext(text=letitre,side=3,outer=TRUE,cex=1.1,font=2) + #---------------------------------------------------------------------------# + + + #----- Close the device. ---------------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + dummy = clean.tmp() + #---------------------------------------------------------------------------# + + }#end for (o in 1:nout) + #------------------------------------------------------------------------------# + }#end if (any(is.finite(web[,,v,d,nseason]))) + #---------------------------------------------------------------------------------# + }#end for (v in 1:ncompvar) + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# -#----- Find the best set up for plotting all seasons in the same plot. --------------------# -lo.box = pretty.box(n=nseason-1) -#------------------------------------------------------------------------------------------# + }#end for (d in 1:ndiel) + #---------------------------------------------------------------------------------------# +}#end for (g in good.loop) #------------------------------------------------------------------------------------------# -# Retrieve all data. # -#------------------------------------------------------------------------------------------# -cat (" + Retrieve data for all sites...","\n") -res = list() -for (p in 1:nsites){ - #----- Get the basic information. ------------------------------------------------------# - iata = sites[p] - im = match(iata,poilist$iata) - this = list() - this$short = poilist$short [im] - this$longname = poilist$longname[im] - this$iata = poilist$iata [im] - this$lon = poilist$lon [im] - this$lat = poilist$lat [im] - this$sim = list() - cat(" - Site :",this$longname,"...","\n") - for (s in 1:nsimul){ - cat(" * Simulation: ",simul[[s]]$desc,"...","\n") - sim.name = paste("t",iata,"_",simul[[s]]$name,sep="") - sim.path = paste(here,sim.name,sep="/") - sim.file = paste(sim.path,"rdata_hour",paste("comp-",sim.name,".RData",sep="") - ,sep="/") - load(sim.file) - - this$sim[[simul[[s]]$name]] = dist.comp - rm(dist.comp) - }#end for - res[[iata]] = this - rm(this) -}#end for -#------------------------------------------------------------------------------------------# @@ -436,19 +1059,18 @@ for (v in 1:ncompvar){ , dim = c(ndiel,nseason,nsites) , dimnames = list(diel.key,season.key,sites.key) )#end score + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Loop through the sites. # + #---------------------------------------------------------------------------------------# for (p in 1:nsites){ #----- Grab the observation. --------------------------------------------------------# obs = get(paste("obs",sites[p],sep=".")) #------------------------------------------------------------------------------------# - #----- Create some variables to describe season and time of the day. ----------------# - if (! "season" %in% names(obs)) obs$season = season(obs$when,add.year=FALSE) - if (! "diel" %in% names(obs)) obs$diel = (! obs$nighttime) + obs$highsun - #------------------------------------------------------------------------------------# - - - #----- Find out when this output variable is finite and measured. -------------------# p.sel = is.finite(obs[[this.vnam]]) & obs[[this.measured]] #------------------------------------------------------------------------------------# @@ -480,6 +1102,8 @@ for (v in 1:ncompvar){ #------------------------------------------------------------------------------# + + #------------------------------------------------------------------------------# # Loop over all control variables (except the "global" one). # #------------------------------------------------------------------------------# @@ -525,16 +1149,437 @@ for (v in 1:ncompvar){ #---------------------------------------------------------------------------------------# - # Create the output path in case it doesn't exist. # + # Loop over all parts of the day. # #---------------------------------------------------------------------------------------# - outcomp = paste(outroot,this.vnam,sep="/") - if (! file.exists(outcomp)) dir.create(outcomp) - outdiel = paste(outcomp,diel.key ,sep="/") - for (d in 1:ndiel) if (! file.exists(outdiel[d])) dir.create(outdiel[d]) + cat(" * Skill and Taylor plots...","\n") + for (d in 1:ndiel){ + cat(" > ",diel.desc[d],"...","\n") + + + #------------------------------------------------------------------------------------# + # Loop over all sites, normalise the data and create the vector for the model. # + #------------------------------------------------------------------------------------# + obs.diel = list() + mod.diel = list() + bias.range = NULL + sigma.range = NULL + for (p in 1:nsites){ + iata = sites[p] + obs = get(paste("obs",iata,sep=".")) + nwhen = length(obs$when) + + + #----- Select this diel (or everything for all day). -----------------------------# + d.sel = (obs$diel == (d-1) | d == ndiel) & ((! this.sun) | obs$highsun) + sel = d.sel & is.finite(obs[[this.vnam]]) & obs[[this.measured]] + sel = sel & is.finite(sel) + n.sel = sum(sel) + #---------------------------------------------------------------------------------# + + #---------------------------------------------------------------------------------# + # Find the standard deviation of this observation. Skip the site if every- # + # thing is zero. # + #---------------------------------------------------------------------------------# + this.obs = obs[[this.vnam]][sel] + sdev.obs.now = sd(this.obs,na.rm=TRUE) + sel = sel & is.finite(sdev.obs.now) & sdev.obs.now > 0 + #---------------------------------------------------------------------------------# + + + + #----- Copy the observed data. ---------------------------------------------------# + obs.diel[[iata]] = this.obs + #---------------------------------------------------------------------------------# + + + + #----- Copy the modelled data, and update ranges. --------------------------------# + mod.diel[[iata]] = matrix(ncol=nsimul,nrow=n.sel,dimnames=list(NULL,simul.key)) + if (any(sel)){ + for (s in 1:nsimul){ + this.mod = res[[iata]]$ans[[simul.key[s]]][[this.vnam]][sel] + this.res = this.mod - this.obs + mod.diel[[iata]][,s] = this.mod + + #----- Find the normalised bias and model standard deviation. --------------# + bias.now = mean(this.res, na.rm=TRUE) / sdev.obs.now + sigma.now = sd (this.res, na.rm=TRUE) / sdev.obs.now + bias.range = c(bias.range ,bias.now ) + sigma.range = c(sigma.range,sigma.now ) + if (! is.finite(bias.now) || ! is.finite(sigma.now)){ + stop("Something weird with this run...") + }#end if + #---------------------------------------------------------------------------# + }#end for (s in 1:nsimul) + #------------------------------------------------------------------------------# + }#end if (any(sel)) + #---------------------------------------------------------------------------------# + }#end for (p in 1:nsites) + #------------------------------------------------------------------------------------# + + + + + #------------------------------------------------------------------------------------# + # Plot Taylor and skill plots only if there is anything to plot. # + #------------------------------------------------------------------------------------# + if (length(unlist(obs.diel)) > 0){ + #---- Fix ranges. ----------------------------------------------------------------# + bias.range = 1.04 * max(abs(bias.range)) * c(-1,1) + sigma.range = 1.04 * max(abs(sigma.range)) * c( 1,0) + r2.range = range(c(1,1-sigma.range^2)) + #---------------------------------------------------------------------------------# + + + + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + # Skill plot. # + #---------------------------------------------------------------------------------# + + #---------------------------------------------------------------------------------# + # Plot title. # + #---------------------------------------------------------------------------------# + letitre = paste(" Skill diagram - ",this.desc,"\n",diel.desc[d],sep="") + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Loop over all formats. # + #---------------------------------------------------------------------------------# + for (o in 1:nout){ + #----- Make the file name. ----------------------------------------------------# + out.skill = out[[outform[o]]][[this.vnam]][[diel.key[d]]]$skill + fichier = paste(out.skill,"/skill-allyear-",this.vnam,"-",diel.key[d] + ,".",outform[o],sep="") + if (outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth,height=size$height*depth + ,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height,pointsize=ptsz + ,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }#end if + #------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------# + # Split the window into 3, and add site and simulation legends at the # + # bottom. # + #------------------------------------------------------------------------------# + par.orig = par(no.readonly = TRUE) + mar.orig = par.orig$mar + par(oma = c(0.2,3,3.0,0)) + layout(mat = rbind(c(3,3,3),c(1,2,2)),height = c(5.0,1.0)) + #------------------------------------------------------------------------------# + + + + + #----- Legend: the sites. -----------------------------------------------------# + par(mar=c(0.2,0.1,0.1,0.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + legend ( x = "bottom" + , inset = 0.0 + , legend = toupper(sites.key) + , col = "black" + , pch = sites.pch.leg + , bg = "white" + , ncol = min(4,pretty.box(nsites)$ncol) + , title = expression(bold("Sites")) + , pt.cex = 2.0 + , cex = 1.2 + )#end legend + #------------------------------------------------------------------------------# + + + + + #----- Legend: the simulations. -----------------------------------------------# + par(mar=c(0.2,0.1,0.1,0.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + legend ( x = "bottom" + , inset = 0.0 + , legend = summ$desc + , col = summ$col + , pt.bg = summ$bg + , pch = summ$pch + , border = "black" + , bg = "white" + , ncol = 3 + , title = expression(bold("Structure")) + , pt.cex = summ$cex + , cex = 1.2 + )#end legend + #------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------# + # Loop over sites. # + #------------------------------------------------------------------------------# + myskill = NULL + for (p in 1:nsites){ + iata = sites[p] + + + #----- Skip the site if there is no data. ----------------------------------# + if (length(obs.diel[[iata]]) > 0){ + #------------------------------------------------------------------------# + # We call skill twice for each site in case the site has two PCHs. # + #------------------------------------------------------------------------# + myskill = skill.plot( obs = obs.diel[[iata]] + , mod = mod.diel[[iata]] + , mod.options = list( col = simul$fgcol + , bg = simul$bgcol + , pch = sites.pch.1st[p] + , cex = 3.0 + , lty = "solid" + , lwd = 2.0 + )#end list + , main = "" + , bias.lim = bias.range + , r2.lim = r2.range + , rmse.options = list( col = "darkorange1" + , lty = "dotdash" + , lwd = 1.2 + )#end list + , cex.xyzlab = 1.4 + , cex.xyzat = 1.4 + , skill = myskill + , normalise = TRUE + , mar = c(5,4,4,3)+0.1 + )#end skill.plot + if (sites.pch.2nd[p] != 0){ + myskill = skill.plot( obs = obs.diel[[iata]] + , mod = mod.diel[[iata]] + , mod.options = list( col = simul$fgcol + , bg = simul$bgcol + , pch = sites.pch.2nd[p] + , cex = 3.0 + , lty = "solid" + , lwd = 2.0 + )#end list + , main = "" + , bias.lim = bias.range + , r2.lim = r2.range + , rmse.options = list( col = "darkorange1" + , lty = "dotdash" + , lwd = 1.2 + )#end list + , cex.xyzlab = 1.4 + , cex.xyzat = 1.4 + , skill = myskill + , normalise = TRUE + , mar = c(5,4,4,3)+0.1 + )#end skill.plot + }#end if (sites.pch.2nd[p] != 0) + #------------------------------------------------------------------------# + }#end if (length(obs.diel[[iata]] > 0) + #---------------------------------------------------------------------------# + }#end for (p in 1:nsites) + #------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------# + # Plot the global title. # + #------------------------------------------------------------------------------# + par(las=0) + mtext(text=letitre,side=3,outer=TRUE,cex=1.1,font=2) + #------------------------------------------------------------------------------# + + + + #----- Close the device. ------------------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + dummy = clean.tmp() + #------------------------------------------------------------------------------# + }#end for (o in 1:nout) + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + + + + + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + # Taylor plot. # + #---------------------------------------------------------------------------------# + + #---------------------------------------------------------------------------------# + # Plot title. # + #---------------------------------------------------------------------------------# + letitre = paste(" Taylor diagram - ",this.desc,"\n",diel.desc[d],sep="") + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Loop over all formats. # + #---------------------------------------------------------------------------------# + for (o in 1:nout){ + #----- Make the file name. ----------------------------------------------------# + out.taylor = out[[outform[o]]][[this.vnam]][[diel.key[d]]]$taylor + fichier = paste(out.taylor,"/taylor-allyear-",this.vnam,"-",diel.key[d] + ,".",outform[o],sep="") + if (outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth,height=size$height*depth + ,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height,pointsize=ptsz + ,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }#end if + #------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------# + # Split the window into 3, and add site and simulation legends at the # + # bottom. # + #------------------------------------------------------------------------------# + par.orig = par(no.readonly = TRUE) + mar.orig = par.orig$mar + par(oma = c(0.2,3,3.0,0)) + layout(mat = rbind(c(3,3,3),c(1,2,2)),height = c(5.0,1.0)) + #------------------------------------------------------------------------------# + + + + + #----- Legend: the sites. -----------------------------------------------------# + par(mar=c(0.2,0.1,0.1,0.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + legend ( x = "bottom" + , inset = 0.0 + , legend = toupper(sites.key) + , col = "black" + , pch = sites.pch.leg + , bg = "white" + , ncol = min(4,pretty.box(nsites)$ncol) + , title = expression(bold("Sites")) + , pt.cex = 2.0 + , cex = 1.0 + )#end legend + #------------------------------------------------------------------------------# + + + + + #----- Legend: the simulations. -----------------------------------------------# + par(mar=c(0.2,0.1,0.1,0.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + legend ( x = "bottom" + , inset = 0.0 + , legend = summ$desc + , col = summ$col + , pt.bg = summ$bg + , pch = summ$pch + , border = "black" + , bg = "white" + , ncol = 3 + , title = expression(bold("Structure")) + , pt.cex = summ$cex + , cex = 1.0 + )#end legend + #------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------# + # Loop over sites. # + #------------------------------------------------------------------------------# + add = FALSE + for (p in 1:nsites){ + iata = sites[p] + + #----- Skip the site if there is no data. ----------------------------------# + if (length(obs.diel[[iata]]) > 0.){ + #------------------------------------------------------------------------# + # We call skill twice for each site in case the site has two PCHs. # + #------------------------------------------------------------------------# + mytaylor = taylor.plot( obs = obs.diel[[iata]] + , mod = mod.diel[[iata]] + , add = add + , pos.corr = NA + , pt.col = simul$fgcol + , pt.bg = simul$bgcol + , pt.pch = sites.pch.1st[p] + , pt.cex = 2.0 + , main = "" + , normalise = TRUE + )#end taylor.plot + add = TRUE + if (sites.pch.2nd[p] != 0){ + mytaylor = taylor.plot( obs = obs.diel[[iata]] + , mod = mod.diel[[iata]] + , add = add + , pos.corr = NA + , pt.col = simul$fgcol + , pt.pch = sites.pch.2nd[p] + , pt.cex = 2.0 + , main = "" + , normalise = TRUE + )#end taylor.plot + }#end if (sites.pch.2nd[p] != 0) + #------------------------------------------------------------------------# + }#end if (length(obs.diel[[iata]]) > 0.) + #---------------------------------------------------------------------------# + }#end for (p in 1:nsites) + #------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------# + # Plot the global title. # + #------------------------------------------------------------------------------# + par(las=0) + mtext(text=letitre,side=3,outer=TRUE,cex=1.1,font=2) + #------------------------------------------------------------------------------# + + + + #----- Close the device. ------------------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + dummy = clean.tmp() + #------------------------------------------------------------------------------# + }#end for (o in 1:nout) + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + }#end if (length(ref) > 2) + #------------------------------------------------------------------------------------# + }#end for (d in 1:ndiel) #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# # Loop over all sites and simulations, and grab the data. # #---------------------------------------------------------------------------------------# @@ -564,7 +1609,7 @@ for (v in 1:ncompvar){ iata = sites[p] obs = get(paste("obs",sites[p],sep=".")) for (s in 1:nsimul){ - colstat[s,p] = simul[[s]]$colour + colstat[s,p] = simul$colour[s] this = res[[iata]]$sim[[s]][[this.vnam]][[this.good]] use.season = paste(sprintf("%2.2i",sequence(nseason)),season.key,sep="-") @@ -635,12 +1680,11 @@ for (v in 1:ncompvar){ #---------------------------------------------------------------------------------# # Loop over all output formats. # #---------------------------------------------------------------------------------# - out.barplot = paste(outdiel[d],"barplot",sep="/") - if (! file.exists(out.barplot)) dir.create(out.barplot) for (o in 1:nout){ #----- Make the file name. ----------------------------------------------------# - fichier = paste(out.barplot,"/bplot-byseason-",this.vnam,"-",this.good,"-" - ,diel.key[d],".",outform[o],sep="") + out.barplot = out[[outform[o]]][[this.vnam]][[diel.key[d]]]$barplot + fichier = paste(out.barplot,"/bplot-byseason-",this.vnam,"-",this.good,"-" + ,diel.key[d],".",outform[o],sep="") if (outform[o] == "x11"){ X11(width=size$width,height=size$height,pointsize=ptsz) }else if(outform[o] == "png"){ @@ -775,6 +1819,7 @@ for (v in 1:ncompvar){ }else{ dev.off() }#end if + dummy = clean.tmp() #------------------------------------------------------------------------------# }#end for @@ -800,8 +1845,9 @@ for (v in 1:ncompvar){ #----- Loop over all formats. ----------------------------------------------------# for (o in 1:nout){ #----- Make the file name. ----------------------------------------------------# - fichier = paste(out.barplot,"/bplot-allyear-",this.vnam,"-",this.good,"-" - ,diel.key[d],".",outform[o],sep="") + out.barplot = out[[outform[o]]][[this.vnam]][[diel.key[d]]]$barplot + fichier = paste(out.barplot,"/bplot-allyear-",this.vnam,"-",this.good,"-" + ,diel.key[d],".",outform[o],sep="") if (outform[o] == "x11"){ X11(width=size$width,height=size$height,pointsize=ptsz) }else if(outform[o] == "png"){ @@ -886,6 +1932,7 @@ for (v in 1:ncompvar){ }else{ dev.off() }#end if + dummy = clean.tmp() #------------------------------------------------------------------------------# }#end for @@ -896,8 +1943,6 @@ for (v in 1:ncompvar){ #---------------------------------------------------------------------------------# # Plot the statistics as a function of the quality of the data. # #---------------------------------------------------------------------------------# - out.quality = paste(outdiel[d],"quality",sep="/") - if (! file.exists(out.quality)) dir.create(out.quality) for (u in 1:ncontrol){ this.qual = control[[u]] qual.vnam = this.qual$vnam @@ -905,14 +1950,6 @@ for (v in 1:ncompvar){ qual.unit = this.qual$unit - #------------------------------------------------------------------------------# - # Create the path for the quality due to this particular variable. # - #------------------------------------------------------------------------------# - out.qualnow = paste(out.quality,qual.vnam,sep="/") - if (! file.exists(out.qualnow)) dir.create(out.qualnow) - #------------------------------------------------------------------------------# - - #------------------------------------------------------------------------------# # Find the limits for the bar plot. # @@ -946,8 +1983,10 @@ for (v in 1:ncompvar){ #------------------------------------------------------------------------------# for (o in 1:nout){ #----- Make the file name. -------------------------------------------------# - fichier = paste(out.qualnow,"/qual-byseason-",this.vnam,"-",qual.vnam,"-" - ,this.good,"-",diel.key[d],".",outform[o],sep="") + out.diel = out[[outform[o]]][[this.vnam]][[diel.key[d]]] + out.qualnow = out.diel$quality[[qual.vnam]] + fichier = paste(out.qualnow,"/qual-byseason-",this.vnam,"-",qual.vnam + ,"-",this.good,"-",diel.key[d],".",outform[o],sep="") if (outform[o] == "x11"){ X11(width=size$width,height=size$height,pointsize=ptsz) }else if(outform[o] == "png"){ @@ -1033,7 +2072,7 @@ for (v in 1:ncompvar){ #------------------------------------------------------------------------# for (s in 1:nsimul){ points(x=input.score[d,e,u,],y=stat[d,e,s,],pch=15 - ,col=simul[[s]]$colour,cex=1.0) + ,col=simul$colour[s],cex=1.0) }#end for #------------------------------------------------------------------------# }#end for @@ -1073,6 +2112,7 @@ for (v in 1:ncompvar){ }else{ dev.off() }#end if + dummy = clean.tmp() #---------------------------------------------------------------------------# }#end for (o in 1:nout) #------------------------------------------------------------------------------# @@ -1097,8 +2137,10 @@ for (v in 1:ncompvar){ #----- Loop over all output formats. ------------------------------------------# for (o in 1:nout){ #----- Make the file name. -------------------------------------------------# - fichier = paste(out.qualnow,"/qual-allyear-",this.vnam,"-",qual.vnam,"-" - ,this.good,"-",diel.key[d],".",outform[o],sep="") + out.diel = out[[outform[o]]][[this.vnam]][[diel.key[d]]] + out.qualnow = out.diel$quality[[qual.vnam]] + fichier = paste(out.qualnow,"/qual-allyear-",this.vnam,"-",qual.vnam + ,"-",this.good,"-",diel.key[d],".",outform[o],sep="") if (outform[o] == "x11"){ X11(width=size$width,height=size$height,pointsize=ptsz) }else if(outform[o] == "png"){ @@ -1163,7 +2205,7 @@ for (v in 1:ncompvar){ #---- Add the bar plot. ----------------------------------------------------# for (s in 1:nsimul){ points(x=input.score[d,nseason,u,],y=stat[d,nseason,s,],pch=15 - ,col=simul[[s]]$colour,cex=1.0) + ,col=simul$colour[s],cex=1.0) }#end for #---------------------------------------------------------------------------# @@ -1176,6 +2218,7 @@ for (v in 1:ncompvar){ }else{ dev.off() }#end if + dummy = clean.tmp() #---------------------------------------------------------------------------# }#end for (o in 1:nout) #------------------------------------------------------------------------------# diff --git a/ED/Template/make_joborder.r b/ED/Template/make_joborder.r index 4ab1f669a..f9e5a883e 100644 --- a/ED/Template/make_joborder.r +++ b/ED/Template/make_joborder.r @@ -23,30 +23,19 @@ outfile = file.path(here,"newjoborder.txt") # Job order #------------------------------------------------------------------------------------------# # Variables that will vary (check the list below for all possibilities. # #------------------------------------------------------------------------------------------# -rscen = c("r+000","r-020","r-040","r-060","r-080","r-100") -tscen = c("t+000","t+100","t+200","t+300") -escen = paste("real",sprintf("%2.2i",seq(from=0,to=9,by=1)),sep="-") - -scenario = apply( X = expand.grid(list(rscen,tscen,escen), stringsAsFactors = FALSE) - , MARGIN = 1 - , FUN = paste - , collapse = "_" - )#end apply - - -varrun = list( iata = c("gyf","s67","rja") - , iscenario = scenario +varrun = list( iata = c("gyf","s67") , iphen = c(-1,2) - , yeara = 1962 - , yearz = 2012 + , yeara = 1851 + , yearz = 2011 + , queue = "unrestricted_parallel" , isoilflg = 2 - , istext = c(16,6,2,8,11) + , istext = c(0,16,6,2,8,11,17) )#end list varlabel = list( iata = varrun$iata - , iscenario = scenario , iphen = paste("iphen",sprintf("%+2.2i",varrun$iphen) ,sep="") - , yeara = "yr1962" - , yearz = "yr2012" + , yeara = "yr1851" + , yearz = "yr2011" + , queue = "unrestricted_parallel" , isoilflg = "isoil02" , istext = paste("stext",sprintf("%2.2i",varrun$istext),sep="") )#end list @@ -212,7 +201,7 @@ for (n in 1:nvars) joborder[[names(myruns)[n]]] = myruns[[names(myruns)[n]]] #------------------------------------------------------------------------------------------# # Create a table with room for all simulations. # #------------------------------------------------------------------------------------------# -poidata = poilist[match(joborder$iata,poilist$iata),] +poitout = poilist[match(joborder$iata,poilist$iata),] #------------------------------------------------------------------------------------------# @@ -220,7 +209,7 @@ poidata = poilist[match(joborder$iata,poilist$iata),] # Replace met driver when it is supposed to be tower data. # #------------------------------------------------------------------------------------------# is.tower = joborder$met.driver == "tower" -joborder$met.driver[is.tower] = poidata$met.driver[is.tower] +joborder$met.driver[is.tower] = poitout$met.driver[is.tower] #------------------------------------------------------------------------------------------# @@ -228,11 +217,11 @@ joborder$met.driver[is.tower] = poidata$met.driver[is.tower] # Replace other POI-specific variables as long as they are not to be specified by the # # user settings. # #------------------------------------------------------------------------------------------# -keep = ( names(poidata) %in% names(joborder) - & ( ! names(poidata) %in% names(myruns) ) - & ( ! names(poidata) %in% c("iata","met.driver") ) +keep = ( names(poitout) %in% names(joborder) + & ( ! names(poitout) %in% names(myruns) ) + & ( ! names(poitout) %in% c("iata","met.driver") ) )#end keep -poidata = poidata[,keep] +poidata = poitout[,keep] npois = ncol(poidata) if (npois > 0){ for (p in 1:npois) joborder[[names(poidata)[p]]] = poidata[[names(poidata)[p]]] @@ -240,6 +229,17 @@ if (npois > 0){ #------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +# We must overwrite clay and sand in case soil type is one of the variables. # +#------------------------------------------------------------------------------------------# +if ("istext" %in% names(varrun)){ + zero = joborder$istext == 0 + joborder$istext[ zero] = poitout$ntext[zero] + joborder$sand [! zero] = -1 + joborder$clay [! zero] = -1 +}#end if +#------------------------------------------------------------------------------------------# + #------------------------------------------------------------------------------------------# # Build the name of the simulations. # diff --git a/ED/Template/spawn_poly.sh b/ED/Template/spawn_poly.sh index 827ee6268..fa25077ef 100755 --- a/ED/Template/spawn_poly.sh +++ b/ED/Template/spawn_poly.sh @@ -1449,12 +1449,12 @@ do if [ ${runt} == 'HISTORY' -o ${runt} == 'INITIAL' ] then touch ${callunpa} + let unpa=${unpa}+1 + let submit=${unpa}%8 # % is mod operator #----- Add command to the node. --------------------------------------------------# if [ ${copy2scratch} == 'y' -o ${copy2scratch} == 'Y' ] then - let unpa=${unpa}+1 - let submit=${unpa}%8 # % is mod operator let wtime=${submit}*15 let wtime=${wtime}+2 else diff --git a/ED/run/ED2IN b/ED/run/ED2IN index cbb070115..f448f4ee3 100644 --- a/ED/run/ED2IN +++ b/ED/run/ED2IN @@ -1231,6 +1231,11 @@ $ED_NL ! the initialization, and fusion will never happen again. Notice ! ! that if the patches are too different, then the actual number of ! ! patches in a site may exceed MAXPATCH. ! + ! ! + ! IMPORTANT: If MAXPATCH = -1 or 1, then the model will force fusion ! + ! until the total number of patches is 1 for each land ! + ! use type. ! + ! ! ! MAXCOHORT -- If number of cohorts in a given patch exceeds MAXCOHORT, force ! ! cohort fusion. If MAXCOHORT is 0, then fusion will never happen. ! ! If MAXCOHORT is negative, then the absolute value is used only ! diff --git a/ED/src/utils/fuse_fiss_utils.f90 b/ED/src/utils/fuse_fiss_utils.f90 index 8cc77f72d..095f76d8a 100644 --- a/ED/src/utils/fuse_fiss_utils.f90 +++ b/ED/src/utils/fuse_fiss_utils.f90 @@ -2925,31 +2925,38 @@ subroutine fuse_patches(cgrid,ifm) integer :: tot_ncohorts ! Total # of cohorts !----- Locally saved variables. --------------------------------------------------------! logical , save :: first_time = .true. + logical , save :: dont_force_fuse !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! ! First time here. Delete all files. ! !------------------------------------------------------------------------------------! - if (first_time .and. print_fuse_details) then - do jpy = 1, cgrid%npolygons - jpoly => cgrid%polygon(jpy) - do jsi = 1, jpoly%nsites - write (fuse_fout,fmt='(a,2(a,i4.4),a)') & - trim(fuse_prefix),'polygon_',jpy,'_site_',jsi,'.txt' - open (unit=72,file=trim(fuse_fout),status='replace',action='write') - write(unit=72,fmt='(a)') '----------------------------------------' - write(unit=72,fmt='(a)') ' Patch Fusion log for: ' - write(unit=72,fmt='(a,1x,i5)') ' POLYGON: ',jpy - write(unit=72,fmt='(a,1x,i5)') ' SITE: ',jsi - write(unit=72,fmt='(a)') '----------------------------------------' - write(unit=72,fmt='(a)') ' ' - close(unit=72,status='keep') + if (first_time) then + dont_force_fuse = abs(maxpatch) /= 1 + if (print_fuse_details) then + do jpy = 1, cgrid%npolygons + jpoly => cgrid%polygon(jpy) + do jsi = 1, jpoly%nsites + write (fuse_fout,fmt='(a,2(a,i4.4),a)') & + trim(fuse_prefix),'polygon_',jpy,'_site_',jsi,'.txt' + open (unit=72,file=trim(fuse_fout),status='replace',action='write') + write(unit=72,fmt='(a)') '----------------------------------------' + write(unit=72,fmt='(a)') ' Patch Fusion log for: ' + write(unit=72,fmt='(a,1x,i5)') ' POLYGON: ',jpy + write(unit=72,fmt='(a,1x,i5)') ' SITE: ',jsi + write(unit=72,fmt='(a)') '----------------------------------------' + write(unit=72,fmt='(a)') ' ' + close(unit=72,status='keep') + end do + !---------------------------------------------------------------------------! end do - end do + !------------------------------------------------------------------------------! + end if + !---------------------------------------------------------------------------------! first_time = .false. end if - !---------------------------------------------------------------------------------------! + !------------------------------------------------------------------------------------! @@ -3061,7 +3068,11 @@ subroutine fuse_patches(cgrid,ifm) donpatch => csite%patch(donp) !----- If patch is not empty, or has already been fused, move on. ----------! - if ( (.not. fuse_table(donp)) .or. donpatch%ncohorts > 0) cycle donloope + if ( (.not. fuse_table(donp)) .or. & + ( dont_force_fuse .and. donpatch%ncohorts > 0) ) then + cycle donloope + end if + !---------------------------------------------------------------------------! !---------------------------------------------------------------------------! @@ -3082,8 +3093,9 @@ subroutine fuse_patches(cgrid,ifm) ! if the donor and receptor have different disturbance types. ! !------------------------------------------------------------------------! if ( (.not. fuse_table(recp)) .or. & - recpatch%ncohorts > 0 .or. & - csite%dist_type(donp) /= csite%dist_type(recp) ) then + ( dont_force_fuse .and. & + ( recpatch%ncohorts > 0 .or. & + csite%dist_type(donp) /= csite%dist_type(recp) ) ) ) then cycle recloope end if !------------------------------------------------------------------------! @@ -3186,9 +3198,11 @@ subroutine fuse_patches(cgrid,ifm) donpatch => csite%patch(donp) !----- If patch is not empty, or has already been fused, move on. ----! - if ( (.not. fuse_table(donp)) .or. donpatch%ncohorts == 0) then + if ( (.not. fuse_table(donp)) .or. & + ( dont_force_fuse .and. donpatch%ncohorts == 0 ) ) then cycle donloopa end if + !---------------------------------------------------------------------! !---------------------------------------------------------------------! @@ -3210,10 +3224,12 @@ subroutine fuse_patches(cgrid,ifm) ! fused, or if the donor and receptor have different disturbance ! ! types. ! !------------------------------------------------------------------! - if ( (.not. fuse_table(recp)) .or. & - recpatch%ncohorts == 0 .or. & - csite%dist_type(donp) /= csite%dist_type(recp) .or. & - csite%age(donp) /= csite%age(recp) ) then + if ( (.not. fuse_table(recp)) .or. & + ( dont_force_fuse .and. & + ( recpatch%ncohorts == 0 .or. & + csite%dist_type(donp) /= csite%dist_type(recp) .or. & + csite%age(donp) /= csite%age(recp) ) ) ) & + then cycle recloopa end if !------------------------------------------------------------------! @@ -3348,10 +3364,13 @@ subroutine fuse_patches(cgrid,ifm) ! If fuse_flag is false, the patches aren't similar, move ! ! to the next donor patch. ! !---------------------------------------------------------------! - if (.not. fuse_flag) cycle recloopa + if (dont_force_fuse .and. (.not. fuse_flag)) cycle recloopa !---------------------------------------------------------------! end do hgtloopa !------------------------------------------------------------------! + + + !------------------------------------------------------------------! ! Take an average of the patch properties of donpatch and ! ! recpatch, and assign the average recpatch. ! @@ -3360,6 +3379,7 @@ subroutine fuse_patches(cgrid,ifm) ,cpoly%lsl(isi),cpoly%ntext_soil(:,isi) & ,cpoly%green_leaf_factor(:,isi),elim_nplant & ,elim_lai) + !------------------------------------------------------------------! !----- Record the fusion if requested by the user. ----------------! @@ -3541,7 +3561,10 @@ subroutine fuse_patches(cgrid,ifm) ! patches, but, just in case... If both patches are empty they cannot be ! ! fused in this loop. ! !------------------------------------------------------------------------! - if (donpatch%ncohorts == 0 .and. recpatch%ncohorts == 0) cycle donloopp + if ( dont_force_fuse .and. & + donpatch%ncohorts == 0 .and. recpatch%ncohorts == 0) then + cycle donloopp + end if !------------------------------------------------------------------------! @@ -3669,7 +3692,7 @@ subroutine fuse_patches(cgrid,ifm) ! If fuse_flag is false, the patches aren't similar, move to ! ! the next donor patch. ! !---------------------------------------------------------------------! - if (.not. fuse_flag) cycle donloopp + if (dont_force_fuse .and. (.not. fuse_flag)) cycle donloopp !---------------------------------------------------------------------! end do hgtloop !------------------------------------------------------------------------! @@ -3738,7 +3761,9 @@ subroutine fuse_patches(cgrid,ifm) ! less than the target, or if we have reached the maximum tolerance and the ! ! patch fusion still can't find similar patches, we quit the fusion loop. ! !---------------------------------------------------------------------------! - if (npatches_new <= abs(maxpatch)) exit mainfuseloop + if ( (.not. dont_force_fuse) .and. npatches_new <= abs(maxpatch)) then + exit mainfuseloop + end if !---------------------------------------------------------------------------! !----- Increment tolerance -------------------------------------------------! @@ -3747,7 +3772,6 @@ subroutine fuse_patches(cgrid,ifm) light_toler = light_toler * light_toler_mult !---------------------------------------------------------------------------! end do mainfuseloop - !------------------------------------------------------------------------------! From bd3fc3736dc3b59f82614ea7643d1decd67b363f Mon Sep 17 00:00:00 2001 From: Marcos Longo Date: Tue, 11 Dec 2012 19:26:31 -0500 Subject: [PATCH 5/6] 1. Various changes in the post-processing shell and R scripts. I don't remember all of them, most are minor, just to conform to the new variable names, and also to allow transparent background (easier to use in presentations where the background is not white). 2. Added a new function, that creates POV-Ray representations of the plant community. 3. Added the option of turning off the site-, patch- and cohort-level means (which make the output considerably larger). --- .bzrignore | 4728 ++++++++++++++++++++++++++ BRAMS/Template/RAMSIN | 68 +- BRAMS/build/bin/dependency.mk | 812 +++++ BRAMS/i10dbg/bin/dependency.mk | 107 +- BRAMS/run/RAMSIN | 32 + BRAMS/src/ed2/edcp_load_namelist.f90 | 9 +- BRAMS/src/ed2/edcp_met.f90 | 7 +- BRAMS/src/ed2/edcp_mpiutils.f90 | 12 + ED/Template/Template/ED2IN | 32 + ED/Template/Template/patchprops.r | 67 +- ED/Template/Template/plot_budget.r | 61 +- ED/Template/Template/plot_census.r | 1499 ++++++-- ED/Template/Template/plot_daily.r | 68 +- ED/Template/Template/plot_eval_ed.r | 56 +- ED/Template/Template/plot_fast.r | 66 +- ED/Template/Template/plot_monthly.r | 90 +- ED/Template/Template/plot_photo.r | 98 +- ED/Template/Template/plot_povray.r | 476 +++ ED/Template/Template/plot_rk4.r | 62 +- ED/Template/Template/plot_rk4pc.r | 80 +- ED/Template/Template/plot_ycomp.r | 18 +- ED/Template/Template/plot_yearly.r | 55 +- ED/Template/Template/read_monthly.r | 11 +- ED/Template/Template/reject_ed.r | 57 +- ED/Template/Template/whichrun.r | 3 +- ED/Template/check_run.sh | 4 +- ED/Template/compare_scenarios.r | 483 +-- ED/Template/epost.sh | 15 +- ED/Template/joborder.txt | 208 +- ED/Template/read_monthly.sh | 407 +-- ED/Template/run_sitter.sh | 1408 ++++---- ED/Template/spawn_poly.sh | 122 +- ED/run/ED2IN | 31 + ED/src/io/ed_init_full_history.F90 | 1239 ++++++- ED/src/io/ed_load_namelist.f90 | 7 + ED/src/io/ed_opspec.F90 | 24 + ED/src/memory/ed_misc_coms.f90 | 4 + ED/src/memory/ed_state_vars.f90 | 351 +- ED/src/memory/ename_coms.f90 | 7 + ED/src/mpi/ed_mpass_init.f90 | 15 +- 40 files changed, 10519 insertions(+), 2380 deletions(-) create mode 100644 ED/Template/Template/plot_povray.r diff --git a/.bzrignore b/.bzrignore index d930302c5..35f787534 100644 --- a/.bzrignore +++ b/.bzrignore @@ -13301,3 +13301,4731 @@ ED/dbgbuild/bin/zero_ed_mmean_vars_mod.mod ED/dbgbuild/bin/zero_ed_qmean_vars_mod.mod ED/dbgbuild/bin/zero_ed_today_vars_mod.mod ED/dbgbuild/bin/zero_ed_yearly_vars_mod.mod +BRAMS/build/bin/advect_kit.mod +BRAMS/build/bin/allometry.mod +BRAMS/build/bin/an_header.mod +BRAMS/build/bin/budget_utils.mod +BRAMS/build/bin/c34constants.mod +BRAMS/build/bin/canopy_air_coms.mod +BRAMS/build/bin/canopy_layer_coms.mod +BRAMS/build/bin/canopy_radiation_coms.mod +BRAMS/build/bin/canopy_struct_dynamics.mod +BRAMS/build/bin/catt_start.mod +BRAMS/build/bin/consts_coms.mod +BRAMS/build/bin/conv_coms.mod +BRAMS/build/bin/cyclic_mod.mod +BRAMS/build/bin/decomp_coms.mod +BRAMS/build/bin/detailed_coms.mod +BRAMS/build/bin/disturbance_utils.mod +BRAMS/build/bin/disturb_coms.mod +BRAMS/build/bin/domain_decomp.mod +BRAMS/build/bin/dtset.mod +BRAMS/build/bin/ed_max_dims.mod +BRAMS/build/bin/ed_mem_grid_dim_defs.mod +BRAMS/build/bin/ed_misc_coms.mod +BRAMS/build/bin/ed_node_coms.mod +BRAMS/build/bin/ed_para_coms.mod +BRAMS/build/bin/ed_state_vars.mod +BRAMS/build/bin/ed_therm_lib.mod +BRAMS/build/bin/ed_var_tables.mod +BRAMS/build/bin/ed_work_vars.mod +BRAMS/build/bin/emission_source_map.mod +BRAMS/build/bin/ename_coms.mod +BRAMS/build/bin/extras.mod +BRAMS/build/bin/farq_leuning.mod +BRAMS/build/bin/fuse_fiss_utils.mod +BRAMS/build/bin/fusion_fission_coms.mod +BRAMS/build/bin/grell_coms.mod +BRAMS/build/bin/grid_coms.mod +BRAMS/build/bin/grid_dims.mod +BRAMS/build/bin/grid_struct.mod +BRAMS/build/bin/growth_balive.mod +BRAMS/build/bin/harr_coms.mod +BRAMS/build/bin/hdf5_coms.mod +BRAMS/build/bin/hdf5_utils.mod +BRAMS/build/bin/hydrology_coms.mod +BRAMS/build/bin/hydrology_constants.mod +BRAMS/build/bin/io_params.mod +BRAMS/build/bin/isan_coms.mod +BRAMS/build/bin/ke_coms.mod +BRAMS/build/bin/lake_coms.mod +BRAMS/build/bin/leaf_coms.mod +BRAMS/build/bin/libxml2f90_interface_module.mod +BRAMS/build/bin/libxml2f90_module.mod +BRAMS/build/bin/libxml2f90_strings_module.mod +BRAMS/build/bin/ll_module.mod +BRAMS/build/bin/machine_arq.mod +BRAMS/build/bin/mem_aerad.mod +BRAMS/build/bin/mem_all.mod +BRAMS/build/bin/mem_basic.mod +BRAMS/build/bin/mem_carma.mod +BRAMS/build/bin/mem_cuparm.mod +BRAMS/build/bin/mem_edcp.mod +BRAMS/build/bin/mem_emiss.mod +BRAMS/build/bin/mem_ensemble.mod +BRAMS/build/bin/mem_gaspart.mod +BRAMS/build/bin/mem_globaer.mod +BRAMS/build/bin/mem_globrad.mod +BRAMS/build/bin/mem_grell_param.mod +BRAMS/build/bin/mem_grid_dim_defs.mod +BRAMS/build/bin/mem_grid.mod +BRAMS/build/bin/mem_harr.mod +BRAMS/build/bin/mem_leaf.mod +BRAMS/build/bin/mem_mass.mod +BRAMS/build/bin/mem_mclat.mod +BRAMS/build/bin/mem_micro.mod +BRAMS/build/bin/mem_mksfc.mod +BRAMS/build/bin/mem_mnt_advec.mod +BRAMS/build/bin/mem_nestb.mod +BRAMS/build/bin/mem_oda.mod +BRAMS/build/bin/mem_opt.mod +BRAMS/build/bin/mem_polygons.mod +BRAMS/build/bin/mem_radiate.mod +BRAMS/build/bin/mem_scalar.mod +BRAMS/build/bin/mem_scratch1_grell.mod +BRAMS/build/bin/mem_scratch1.mod +BRAMS/build/bin/mem_scratch2_grell.mod +BRAMS/build/bin/mem_scratch2_grell_sh.mod +BRAMS/build/bin/mem_scratch3_grell.mod +BRAMS/build/bin/mem_scratch3_grell_sh.mod +BRAMS/build/bin/mem_scratch_grell.mod +BRAMS/build/bin/mem_scratch.mod +BRAMS/build/bin/mem_soil_moisture.mod +BRAMS/build/bin/mem_tconv.mod +BRAMS/build/bin/mem_teb_common.mod +BRAMS/build/bin/mem_teb.mod +BRAMS/build/bin/mem_tend.mod +BRAMS/build/bin/mem_turb.mod +BRAMS/build/bin/mem_turb_scalar.mod +BRAMS/build/bin/mem_varinit.mod +BRAMS/build/bin/met_driver_coms.mod +BRAMS/build/bin/micphys.mod +BRAMS/build/bin/micro_coms.mod +BRAMS/build/bin/mod_ghostblock.mod +BRAMS/build/bin/mod_ghostblockpartition.mod +BRAMS/build/bin/mortality.mod +BRAMS/build/bin/node_mod.mod +BRAMS/build/bin/obs_input.mod +BRAMS/build/bin/optimiz_coms.mod +BRAMS/build/bin/ozone_const.mod +BRAMS/build/bin/pft_coms.mod +BRAMS/build/bin/phenology_aux.mod +BRAMS/build/bin/phenology_coms.mod +BRAMS/build/bin/phenology_startup.mod +BRAMS/build/bin/physiology_coms.mod +BRAMS/build/bin/plume_utils.mod +BRAMS/build/bin/rad_carma.mod +BRAMS/build/bin/rconstants.mod +BRAMS/build/bin/ref_sounding.mod +BRAMS/build/bin/rk4_coms.mod +BRAMS/build/bin/rk4_driver.mod +BRAMS/build/bin/rk4_stepper.mod +BRAMS/build/bin/rpara.mod +BRAMS/build/bin/shcu_vars_const.mod +BRAMS/build/bin/soil_coms.mod +BRAMS/build/bin/teb_spm_start.mod +BRAMS/build/bin/teb_vars_const.mod +BRAMS/build/bin/therm_lib8.mod +BRAMS/build/bin/therm_lib.mod +BRAMS/build/bin/turb_coms.mod +BRAMS/build/bin/var_tables.mod +BRAMS/i10dbg/bin/a3e0_mod.mod +BRAMS/i10dbg/bin/a3e1_mod.mod +BRAMS/i10dbg/bin/a3e2_mod.mod +BRAMS/i10dbg/bin/abort_run_mod.mod +BRAMS/i10dbg/bin/acctimes_mod.mod +BRAMS/i10dbg/bin/accum_mod.mod +BRAMS/i10dbg/bin/acnst_mod.mod +BRAMS/i10dbg/bin/acoust_adap_mod.mod +BRAMS/i10dbg/bin/acoustic_new_mod.mod +BRAMS/i10dbg/bin/acoust_new_mod.mod +BRAMS/i10dbg/bin/adap_bldg_mod.mod +BRAMS/i10dbg/bin/adivb_mod.mod +BRAMS/i10dbg/bin/adj1_mod.mod +BRAMS/i10dbg/bin/adjust_sfcw_properties_mod.mod +BRAMS/i10dbg/bin/adjust_topsoil_properties_mod.mod +BRAMS/i10dbg/bin/adjust_veg_properties_mod.mod +BRAMS/i10dbg/bin/advectc_mod.mod +BRAMS/i10dbg/bin/advected_mod.mod +BRAMS/i10dbg/bin/advect_kit.mod +BRAMS/i10dbg/bin/advect_sca_mod.mod +BRAMS/i10dbg/bin/advect_theta_mod.mod +BRAMS/i10dbg/bin/advect_vec_mod.mod +BRAMS/i10dbg/bin/advtndc_adap_mod.mod +BRAMS/i10dbg/bin/advtndc_mod.mod +BRAMS/i10dbg/bin/advtndc_plumerise_mod.mod +BRAMS/i10dbg/bin/ae0_mod.mod +BRAMS/i10dbg/bin/ae1m1_mod.mod +BRAMS/i10dbg/bin/ae1_mod.mod +BRAMS/i10dbg/bin/ae1p1_mod.mod +BRAMS/i10dbg/bin/ae1p1p1_mod.mod +BRAMS/i10dbg/bin/ae1t0_mod.mod +BRAMS/i10dbg/bin/ae1t0p1_mod.mod +BRAMS/i10dbg/bin/ae1t1_mod.mod +BRAMS/i10dbg/bin/ae1t1p1_mod.mod +BRAMS/i10dbg/bin/ae1tn1_mod.mod +BRAMS/i10dbg/bin/ae2_mod.mod +BRAMS/i10dbg/bin/ae3m3d0_mod.mod +BRAMS/i10dbg/bin/ae3m3_mod.mod +BRAMS/i10dbg/bin/ae3_mod.mod +BRAMS/i10dbg/bin/ae3p3_mod.mod +BRAMS/i10dbg/bin/ae3t0p3_mod.mod +BRAMS/i10dbg/bin/ae3t3_mod.mod +BRAMS/i10dbg/bin/ae3t3p3_mod.mod +BRAMS/i10dbg/bin/aen1_mod.mod +BRAMS/i10dbg/bin/aen3t0p3_mod.mod +BRAMS/i10dbg/bin/aggregate_polygon_fmean_mod.mod +BRAMS/i10dbg/bin/akscal_init_mod.mod +BRAMS/i10dbg/bin/alebl_mod.mod +BRAMS/i10dbg/bin/alloc_edcp_driver_mod.mod +BRAMS/i10dbg/bin/allometry.mod +BRAMS/i10dbg/bin/alt_dia_mod.mod +BRAMS/i10dbg/bin/aminmax_mod.mod +BRAMS/i10dbg/bin/angle_of_incid_mod.mod +BRAMS/i10dbg/bin/an_header.mod +BRAMS/i10dbg/bin/anlavg_mod.mod +BRAMS/i10dbg/bin/anlhdf_mod.mod +BRAMS/i10dbg/bin/anlwrt_mod.mod +BRAMS/i10dbg/bin/aone_mod.mod +BRAMS/i10dbg/bin/api_prlatlon_mod.mod +BRAMS/i10dbg/bin/apply_cloud_forcing_mod.mod +BRAMS/i10dbg/bin/apply_drydep_mod.mod +BRAMS/i10dbg/bin/apply_forestry_mod.mod +BRAMS/i10dbg/bin/arinam_mod.mod +BRAMS/i10dbg/bin/array2xcol_mod.mod +BRAMS/i10dbg/bin/array2ycol_mod.mod +BRAMS/i10dbg/bin/array2zcol_mod.mod +BRAMS/i10dbg/bin/arrsnd_mod.mod +BRAMS/i10dbg/bin/arscam_mod.mod +BRAMS/i10dbg/bin/assign_prescribed_phen_mod.mod +BRAMS/i10dbg/bin/atimb_mod.mod +BRAMS/i10dbg/bin/atob_log_mod.mod +BRAMS/i10dbg/bin/atob_mod.mod +BRAMS/i10dbg/bin/auto_accret_mod.mod +BRAMS/i10dbg/bin/average_mod.mod +BRAMS/i10dbg/bin/avgvel_mod.mod +BRAMS/i10dbg/bin/avint_mod.mod +BRAMS/i10dbg/bin/awtcmp_mod.mod +BRAMS/i10dbg/bin/azero_mod.mod +BRAMS/i10dbg/bin/banbks_mod.mod +BRAMS/i10dbg/bin/bandec_mod.mod +BRAMS/i10dbg/bin/bdf2_solver_mod.mod +BRAMS/i10dbg/bin/binom_mod.mod +BRAMS/i10dbg/bin/bld_e_budget_mod.mod +BRAMS/i10dbg/bin/bn_parm_mod.mod +BRAMS/i10dbg/bin/bn_pass_mod.mod +BRAMS/i10dbg/bin/bn_qual_mod.mod +BRAMS/i10dbg/bin/botset_adap_mod.mod +BRAMS/i10dbg/bin/botset_mod.mod +BRAMS/i10dbg/bin/boyanc_mod.mod +BRAMS/i10dbg/bin/brams_fail_whale_mod.mod +BRAMS/i10dbg/bin/bruvais_mod.mod +BRAMS/i10dbg/bin/bubble_mod.mod +BRAMS/i10dbg/bin/budget_utils.mod +BRAMS/i10dbg/bin/buoyancy_acc_mod.mod +BRAMS/i10dbg/bin/buoyancy_mod.mod +BRAMS/i10dbg/bin/buoyancy_plumerise_mod.mod +BRAMS/i10dbg/bin/c34constants.mod +BRAMS/i10dbg/bin/calc_flow_routing_mod.mod +BRAMS/i10dbg/bin/calchydrosubsurface_mod.mod +BRAMS/i10dbg/bin/calchydrosurface_mod.mod +BRAMS/i10dbg/bin/calc_met_lapse_mod.mod +BRAMS/i10dbg/bin/calcwatertable_mod.mod +BRAMS/i10dbg/bin/canopy_air_coms.mod +BRAMS/i10dbg/bin/canopy_derivs_two_mod.mod +BRAMS/i10dbg/bin/canopy_layer_coms.mod +BRAMS/i10dbg/bin/canopy_photosynthesis_mod.mod +BRAMS/i10dbg/bin/canopy_radiation_coms.mod +BRAMS/i10dbg/bin/canopy_struct_dynamics.mod +BRAMS/i10dbg/bin/catt_start.mod +BRAMS/i10dbg/bin/cbrt8_mod.mod +BRAMS/i10dbg/bin/cbrt_mod.mod +BRAMS/i10dbg/bin/cdf2normal_mod.mod +BRAMS/i10dbg/bin/cdf_mod.mod +BRAMS/i10dbg/bin/cfact_mod.mod +BRAMS/i10dbg/bin/cfll_mod.mod +BRAMS/i10dbg/bin/cfl_mod.mod +BRAMS/i10dbg/bin/cfux_mod.mod +BRAMS/i10dbg/bin/cfuy_mod.mod +BRAMS/i10dbg/bin/char_strip_var_mod.mod +BRAMS/i10dbg/bin/check_real_mod.mod +BRAMS/i10dbg/bin/check_rescale_mod.mod +BRAMS/i10dbg/bin/chemistry_mod.mod +BRAMS/i10dbg/bin/chkcyc_mod.mod +BRAMS/i10dbg/bin/cio_c_mod.mod +BRAMS/i10dbg/bin/cio_c_sca_mod.mod +BRAMS/i10dbg/bin/cio_f8_mod.mod +BRAMS/i10dbg/bin/cio_f8_sca_mod.mod +BRAMS/i10dbg/bin/cio_f_mod.mod +BRAMS/i10dbg/bin/cio_f_sca_mod.mod +BRAMS/i10dbg/bin/cio_i_mod.mod +BRAMS/i10dbg/bin/cio_i_sca_mod.mod +BRAMS/i10dbg/bin/cio_pos_file_mod.mod +BRAMS/i10dbg/bin/cldnuc_mod.mod +BRAMS/i10dbg/bin/clgen_mod.mod +BRAMS/i10dbg/bin/cloud_opt_mod.mod +BRAMS/i10dbg/bin/cloudprep_rad_mod.mod +BRAMS/i10dbg/bin/cloud_sketch_mod.mod +BRAMS/i10dbg/bin/clsgks_mod.mod +BRAMS/i10dbg/bin/cl_top_mod.mod +BRAMS/i10dbg/bin/coarse2fine_driver_mod.mod +BRAMS/i10dbg/bin/coarse2fine_mod.mod +BRAMS/i10dbg/bin/coefz_adap_mod.mod +BRAMS/i10dbg/bin/coefz_mod.mod +BRAMS/i10dbg/bin/cofnest_mod.mod +BRAMS/i10dbg/bin/col1_mod.mod +BRAMS/i10dbg/bin/col2_mod.mod +BRAMS/i10dbg/bin/col3344_mod.mod +BRAMS/i10dbg/bin/col3443_mod.mod +BRAMS/i10dbg/bin/col3_mod.mod +BRAMS/i10dbg/bin/cols_mod.mod +BRAMS/i10dbg/bin/colxfers_mod.mod +BRAMS/i10dbg/bin/commio_mod.mod +BRAMS/i10dbg/bin/comm_time_mod.mod +BRAMS/i10dbg/bin/comm_time_new_mod.mod +BRAMS/i10dbg/bin/comp_avgu_mod.mod +BRAMS/i10dbg/bin/comp_avgv_mod.mod +BRAMS/i10dbg/bin/comp_press_mod.mod +BRAMS/i10dbg/bin/comp_rhfrac_mod.mod +BRAMS/i10dbg/bin/compute_c_and_n_storage_mod.mod +BRAMS/i10dbg/bin/compute_mass_flux_mod.mod +BRAMS/i10dbg/bin/cond_file_inv_mod.mod +BRAMS/i10dbg/bin/cond_read_mod.mod +BRAMS/i10dbg/bin/cond_update_mod.mod +BRAMS/i10dbg/bin/conpar_mod.mod +BRAMS/i10dbg/bin/conrec_mod.mod +BRAMS/i10dbg/bin/consts_coms.mod +BRAMS/i10dbg/bin/contnuc_mod.mod +BRAMS/i10dbg/bin/conv_coms.mod +BRAMS/i10dbg/bin/convert_mod.mod +BRAMS/i10dbg/bin/convert_to_misture_ratio_teb_mod.mod +BRAMS/i10dbg/bin/conv_ppm_rm_mod.mod +BRAMS/i10dbg/bin/copy_atm2lsm_mod.mod +BRAMS/i10dbg/bin/copy_avgvars_to_leaf_mod.mod +BRAMS/i10dbg/bin/copyback_mod.mod +BRAMS/i10dbg/bin/copy_bdf2_prev_mod.mod +BRAMS/i10dbg/bin/copy_fb_patch_mod.mod +BRAMS/i10dbg/bin/copy_fluxes_future_2_past_mod.mod +BRAMS/i10dbg/bin/copy_fluxes_lsm2atm_mod.mod +BRAMS/i10dbg/bin/copy_in_bramsmpi_mod.mod +BRAMS/i10dbg/bin/copy_in_bramsnl_mod.mod +BRAMS/i10dbg/bin/copy_initp2prev_mod.mod +BRAMS/i10dbg/bin/copy_lake_brams_mod.mod +BRAMS/i10dbg/bin/copy_lake_init_mod.mod +BRAMS/i10dbg/bin/copy_met_2_lake_mod.mod +BRAMS/i10dbg/bin/copy_met_2_rk4site_mod.mod +BRAMS/i10dbg/bin/copy_patch_init_carbon_mod.mod +BRAMS/i10dbg/bin/copy_patch_init_mod.mod +BRAMS/i10dbg/bin/copy_path_from_grid_1_mod.mod +BRAMS/i10dbg/bin/copy_prev2patch_mod.mod +BRAMS/i10dbg/bin/copy_rk4_patch_mod.mod +BRAMS/i10dbg/bin/corlos_mod.mod +BRAMS/i10dbg/bin/corlsu_mod.mod +BRAMS/i10dbg/bin/corlsv_mod.mod +BRAMS/i10dbg/bin/count_pft_xml_config_mod.mod +BRAMS/i10dbg/bin/cp2mod_mod.mod +BRAMS/i10dbg/bin/cpclam_mod.mod +BRAMS/i10dbg/bin/cpcldr_mod.mod +BRAMS/i10dbg/bin/cpcnrc_mod.mod +BRAMS/i10dbg/bin/cpezct_mod.mod +BRAMS/i10dbg/bin/cpgeti_mod.mod +BRAMS/i10dbg/bin/cpgetr_mod.mod +BRAMS/i10dbg/bin/cplbdr_mod.mod +BRAMS/i10dbg/bin/cppkcl_mod.mod +BRAMS/i10dbg/bin/cprect_mod.mod +BRAMS/i10dbg/bin/cpsetc_mod.mod +BRAMS/i10dbg/bin/cpseti_mod.mod +BRAMS/i10dbg/bin/cpsetr_mod.mod +BRAMS/i10dbg/bin/cputime_mod.mod +BRAMS/i10dbg/bin/create_ed10_ed20_fname_mod.mod +BRAMS/i10dbg/bin/csband_mod.mod +BRAMS/i10dbg/bin/cscalei_mod.mod +BRAMS/i10dbg/bin/cscale_mod.mod +BRAMS/i10dbg/bin/ctrlvols_mod.mod +BRAMS/i10dbg/bin/cu_environ_mod.mod +BRAMS/i10dbg/bin/cu_file_inv_mod.mod +BRAMS/i10dbg/bin/cu_inv_tend_mod.mod +BRAMS/i10dbg/bin/cumsum_mod.mod +BRAMS/i10dbg/bin/cumulus_time_mod.mod +BRAMS/i10dbg/bin/cuparth_mod.mod +BRAMS/i10dbg/bin/cuparth_shal_mod.mod +BRAMS/i10dbg/bin/cup_dd_aa0_mod.mod +BRAMS/i10dbg/bin/cup_dd_edt_mod.mod +BRAMS/i10dbg/bin/cup_dd_he_mod.mod +BRAMS/i10dbg/bin/cup_dd_moisture_mod.mod +BRAMS/i10dbg/bin/cup_dd_nms_mod.mod +BRAMS/i10dbg/bin/cup_dellabot_mod.mod +BRAMS/i10dbg/bin/cup_dellas_mod.mod +BRAMS/i10dbg/bin/cup_dellas_shallow_mod.mod +BRAMS/i10dbg/bin/cup_direction2_mod.mod +BRAMS/i10dbg/bin/cup_enss_mod.mod +BRAMS/i10dbg/bin/cup_enss_shal_mod.mod +BRAMS/i10dbg/bin/cup_env_clev_mod.mod +BRAMS/i10dbg/bin/cup_env_mod.mod +BRAMS/i10dbg/bin/cup_forcing_ens_16_mod.mod +BRAMS/i10dbg/bin/cup_forcing_ens_shal_mod.mod +BRAMS/i10dbg/bin/cup_kbcon_cin_mod.mod +BRAMS/i10dbg/bin/cup_kbcon_mod.mod +BRAMS/i10dbg/bin/cup_ktop_mod.mod +BRAMS/i10dbg/bin/cup_output_ens_mod.mod +BRAMS/i10dbg/bin/cup_output_ens_shal_mod.mod +BRAMS/i10dbg/bin/cup_up_aa0_mod.mod +BRAMS/i10dbg/bin/cup_up_he_mod.mod +BRAMS/i10dbg/bin/cup_up_moisture_mod.mod +BRAMS/i10dbg/bin/cup_up_nms_mod.mod +BRAMS/i10dbg/bin/cu_read_mod.mod +BRAMS/i10dbg/bin/curved_mod.mod +BRAMS/i10dbg/bin/curve_mod.mod +BRAMS/i10dbg/bin/cu_update_mod.mod +BRAMS/i10dbg/bin/cvmgm_mod.mod +BRAMS/i10dbg/bin/cvmgn_mod.mod +BRAMS/i10dbg/bin/cvmgp_mod.mod +BRAMS/i10dbg/bin/cvmgz_mod.mod +BRAMS/i10dbg/bin/cyclic_mod.mod +BRAMS/i10dbg/bin/cyclic_set_mod.mod +BRAMS/i10dbg/bin/damp_grav_wave_mod.mod +BRAMS/i10dbg/bin/dashdb_mod.mod +BRAMS/i10dbg/bin/dashdc_mod.mod +BRAMS/i10dbg/bin/datassim_mod.mod +BRAMS/i10dbg/bin/date_2_seconds_mod.mod +BRAMS/i10dbg/bin/date_abs_secs2_mod.mod +BRAMS/i10dbg/bin/date_abs_secs_mod.mod +BRAMS/i10dbg/bin/date_add_to_big_mod.mod +BRAMS/i10dbg/bin/date_add_to_mod.mod +BRAMS/i10dbg/bin/date_make_big_mod.mod +BRAMS/i10dbg/bin/date_secs_ymdt_mod.mod +BRAMS/i10dbg/bin/date_unmake_big_mod.mod +BRAMS/i10dbg/bin/dble2sngl_mod.mod +BRAMS/i10dbg/bin/dcvmgm_mod.mod +BRAMS/i10dbg/bin/dcvmgp_mod.mod +BRAMS/i10dbg/bin/dcw_swap16_mod.mod +BRAMS/i10dbg/bin/dcw_swap32_mod.mod +BRAMS/i10dbg/bin/dcw_swap64_mod.mod +BRAMS/i10dbg/bin/dealloc_all_mod.mod +BRAMS/i10dbg/bin/deblank_mod.mod +BRAMS/i10dbg/bin/decomp_coms.mod +BRAMS/i10dbg/bin/decomp_plot_mod.mod +BRAMS/i10dbg/bin/define_pbl_height_mod.mod +BRAMS/i10dbg/bin/detab_mod.mod +BRAMS/i10dbg/bin/detailed_coms.mod +BRAMS/i10dbg/bin/diagon_mod.mod +BRAMS/i10dbg/bin/diffprep_mod.mod +BRAMS/i10dbg/bin/diffsclr_adap_mod.mod +BRAMS/i10dbg/bin/diffsclr_brams31_mod.mod +BRAMS/i10dbg/bin/diffsclr_mod.mod +BRAMS/i10dbg/bin/diffuse_brams31_mod.mod +BRAMS/i10dbg/bin/diffuse_mod.mod +BRAMS/i10dbg/bin/diffvel_adap_mod.mod +BRAMS/i10dbg/bin/diffvel_mod.mod +BRAMS/i10dbg/bin/dist_gc_mod.mod +BRAMS/i10dbg/bin/disturbance_utils.mod +BRAMS/i10dbg/bin/disturb_coms.mod +BRAMS/i10dbg/bin/divcart_mod.mod +BRAMS/i10dbg/bin/divstar_mod.mod +BRAMS/i10dbg/bin/dmax2_mod.mod +BRAMS/i10dbg/bin/dmin2_mod.mod +BRAMS/i10dbg/bin/dnswt2_mod.mod +BRAMS/i10dbg/bin/domain_decomp.mod +BRAMS/i10dbg/bin/dpstable_mod.mod +BRAMS/i10dbg/bin/drwstr_mod.mod +BRAMS/i10dbg/bin/drydep_driver_mod.mod +BRAMS/i10dbg/bin/dry_dep_gaseous_mod.mod +BRAMS/i10dbg/bin/dry_dep_mod.mod +BRAMS/i10dbg/bin/dry_dep_particles_mod.mod +BRAMS/i10dbg/bin/drythrm_mod.mod +BRAMS/i10dbg/bin/dssum_mod.mod +BRAMS/i10dbg/bin/dtedint_mod.mod +BRAMS/i10dbg/bin/dted_mod.mod +BRAMS/i10dbg/bin/dtset.mod +BRAMS/i10dbg/bin/dum1_zero_mod.mod +BRAMS/i10dbg/bin/dump_domain_decomposition_mod.mod +BRAMS/i10dbg/bin/dump_dtset_mod.mod +BRAMS/i10dbg/bin/dump_modsched_mod.mod +BRAMS/i10dbg/bin/dump_radinfo_mod.mod +BRAMS/i10dbg/bin/dumset_mod.mod +BRAMS/i10dbg/bin/each_call_mod.mod +BRAMS/i10dbg/bin/each_column_mod.mod +BRAMS/i10dbg/bin/ed1_fileinfo_mod.mod +BRAMS/i10dbg/bin/ed21_fileinfo_mod.mod +BRAMS/i10dbg/bin/ed_bigleaf_init_mod.mod +BRAMS/i10dbg/bin/ed_coup_driver_mod.mod +BRAMS/i10dbg/bin/ed_coup_model_mod.mod +BRAMS/i10dbg/bin/edcp_get_work_mod.mod +BRAMS/i10dbg/bin/edcp_nodebounds_self_mod.mod +BRAMS/i10dbg/bin/edcp_parvec_work_mod.mod +BRAMS/i10dbg/bin/ed_datp_datq_mod.mod +BRAMS/i10dbg/bin/ed_datp_datsoil_mod.mod +BRAMS/i10dbg/bin/ed_filelist_mod.mod +BRAMS/i10dbg/bin/ed_gridset_mod.mod +BRAMS/i10dbg/bin/ed_init_atm_mod.mod +BRAMS/i10dbg/bin/ed_init_radiation_mod.mod +BRAMS/i10dbg/bin/ed_ll_xy_mod.mod +BRAMS/i10dbg/bin/ed_max_dims.mod +BRAMS/i10dbg/bin/ed_mem_grid_dim_defs.mod +BRAMS/i10dbg/bin/ed_misc_coms.mod +BRAMS/i10dbg/bin/ed_newgrid_mod.mod +BRAMS/i10dbg/bin/ed_node_coms.mod +BRAMS/i10dbg/bin/ed_opspec_grid_mod.mod +BRAMS/i10dbg/bin/ed_opspec_misc_mod.mod +BRAMS/i10dbg/bin/ed_opspec_par_mod.mod +BRAMS/i10dbg/bin/ed_opspec_times_mod.mod +BRAMS/i10dbg/bin/ed_output_mod.mod +BRAMS/i10dbg/bin/ed_para_coms.mod +BRAMS/i10dbg/bin/ed_polarst_mod.mod +BRAMS/i10dbg/bin/ed_state_vars.mod +BRAMS/i10dbg/bin/ed_therm_lib.mod +BRAMS/i10dbg/bin/ed_timestep_mod.mod +BRAMS/i10dbg/bin/ed_var_tables.mod +BRAMS/i10dbg/bin/ed_work_vars.mod +BRAMS/i10dbg/bin/ed_xy_ll_mod.mod +BRAMS/i10dbg/bin/ed_zen_mod.mod +BRAMS/i10dbg/bin/effxy_mod.mod +BRAMS/i10dbg/bin/eifun8_mod.mod +BRAMS/i10dbg/bin/eintp_mod.mod +BRAMS/i10dbg/bin/elgs_mod.mod +BRAMS/i10dbg/bin/emfactor_mod.mod +BRAMS/i10dbg/bin/emissao_mod.mod +BRAMS/i10dbg/bin/emission_source_map.mod +BRAMS/i10dbg/bin/ename_coms.mod +BRAMS/i10dbg/bin/encd_mod.mod +BRAMS/i10dbg/bin/endian_mod.mod +BRAMS/i10dbg/bin/enemb_mod.mod +BRAMS/i10dbg/bin/eng_params_mod.mod +BRAMS/i10dbg/bin/entrainment_mod.mod +BRAMS/i10dbg/bin/errorfun_mod.mod +BRAMS/i10dbg/bin/esat_l_mod.mod +BRAMS/i10dbg/bin/esat_pr_mod.mod +BRAMS/i10dbg/bin/euler_integ_mod.mod +BRAMS/i10dbg/bin/euler_timestep_mod.mod +BRAMS/i10dbg/bin/evaporate_mod.mod +BRAMS/i10dbg/bin/event_fertilize_mod.mod +BRAMS/i10dbg/bin/event_fire_mod.mod +BRAMS/i10dbg/bin/event_harvest_mod.mod +BRAMS/i10dbg/bin/event_irrigate_mod.mod +BRAMS/i10dbg/bin/event_planting_mod.mod +BRAMS/i10dbg/bin/event_till_mod.mod +BRAMS/i10dbg/bin/ex_adv_buff_mod.mod +BRAMS/i10dbg/bin/exadvlf_mod.mod +BRAMS/i10dbg/bin/excondiv_mod.mod +BRAMS/i10dbg/bin/ex_cyc_buff_mod.mod +BRAMS/i10dbg/bin/exevolve_mod.mod +BRAMS/i10dbg/bin/ex_full_buff_mod.mod +BRAMS/i10dbg/bin/exhtend_ad_mod.mod +BRAMS/i10dbg/bin/exhtend_st_mod.mod +BRAMS/i10dbg/bin/ex_lbc_buff_mod.mod +BRAMS/i10dbg/bin/expected_mod.mod +BRAMS/i10dbg/bin/expmsq_mod.mod +BRAMS/i10dbg/bin/ex_st_buff_mod.mod +BRAMS/i10dbg/bin/exthvadv_mod.mod +BRAMS/i10dbg/bin/extras.mod +BRAMS/i10dbg/bin/ezcntr_mod.mod +BRAMS/i10dbg/bin/fail_whale_mod.mod +BRAMS/i10dbg/bin/fallpart_mod.mod +BRAMS/i10dbg/bin/fa_preptc_adap_mod.mod +BRAMS/i10dbg/bin/fa_preptc_mod.mod +BRAMS/i10dbg/bin/farq_leuning.mod +BRAMS/i10dbg/bin/fatal_error_mod.mod +BRAMS/i10dbg/bin/fa_xc_adap_mod.mod +BRAMS/i10dbg/bin/fa_xc_mod.mod +BRAMS/i10dbg/bin/fa_yc_adap_mod.mod +BRAMS/i10dbg/bin/fa_yc_mod.mod +BRAMS/i10dbg/bin/fa_zc_adap_mod.mod +BRAMS/i10dbg/bin/fa_zc_mod.mod +BRAMS/i10dbg/bin/fa_zc_plumerise_mod.mod +BRAMS/i10dbg/bin/fb_dy_step_trunc_mod.mod +BRAMS/i10dbg/bin/fb_sanity_check_mod.mod +BRAMS/i10dbg/bin/fcorio_mod.mod +BRAMS/i10dbg/bin/fdback_mod.mod +BRAMS/i10dbg/bin/fdbackp_mod.mod +BRAMS/i10dbg/bin/filesize4_mod.mod +BRAMS/i10dbg/bin/fill_cyc_mod.mod +BRAMS/i10dbg/bin/fill_datp_mod.mod +BRAMS/i10dbg/bin/fill_dn0uv_mod.mod +BRAMS/i10dbg/bin/fill_history_grid_m11_mod.mod +BRAMS/i10dbg/bin/fill_history_grid_m12_mod.mod +BRAMS/i10dbg/bin/fill_history_grid_mod.mod +BRAMS/i10dbg/bin/fill_history_grid_p11dmean_mod.mod +BRAMS/i10dbg/bin/fill_history_grid_p11mmean_mod.mod +BRAMS/i10dbg/bin/fill_history_grid_p11_mod.mod +BRAMS/i10dbg/bin/fill_history_grid_p12_mod.mod +BRAMS/i10dbg/bin/fill_history_grid_p146_mod.mod +BRAMS/i10dbg/bin/fill_history_grid_p19_mod.mod +BRAMS/i10dbg/bin/fill_history_patch_mod.mod +BRAMS/i10dbg/bin/fill_history_polygon_mod.mod +BRAMS/i10dbg/bin/fill_history_site_mod.mod +BRAMS/i10dbg/bin/fillscr_mod.mod +BRAMS/i10dbg/bin/fill_site_precip_mod.mod +BRAMS/i10dbg/bin/fill_thermovars_mod.mod +BRAMS/i10dbg/bin/fill_thvlast_mod.mod +BRAMS/i10dbg/bin/fill_toptuvm_mod.mod +BRAMS/i10dbg/bin/fillvar_l_mod.mod +BRAMS/i10dbg/bin/fillvar_mod.mod +BRAMS/i10dbg/bin/find_actual_densities_mod.mod +BRAMS/i10dbg/bin/find_avg_winds_mod.mod +BRAMS/i10dbg/bin/find_closing_comment_mod.mod +BRAMS/i10dbg/bin/find_frqsum_mod.mod +BRAMS/i10dbg/bin/findgood_mod.mod +BRAMS/i10dbg/bin/findgrid_mod.mod +BRAMS/i10dbg/bin/findln_mod.mod +BRAMS/i10dbg/bin/find_rank_mod.mod +BRAMS/i10dbg/bin/findtime_mod.mod +BRAMS/i10dbg/bin/find_walcek_densities_mod.mod +BRAMS/i10dbg/bin/fire_frequency_mod.mod +BRAMS/i10dbg/bin/first_rams_mod.mod +BRAMS/i10dbg/bin/flag_stable_cohorts_mod.mod +BRAMS/i10dbg/bin/fldinit_mod.mod +BRAMS/i10dbg/bin/flds3d_adap_mod.mod +BRAMS/i10dbg/bin/flds3d_mod.mod +BRAMS/i10dbg/bin/flxlw_mod.mod +BRAMS/i10dbg/bin/flxsw_mod.mod +BRAMS/i10dbg/bin/fmdn0_isan_mod.mod +BRAMS/i10dbg/bin/fmdn0_mod.mod +BRAMS/i10dbg/bin/fmint2d_mod.mod +BRAMS/i10dbg/bin/fmint3_mod.mod +BRAMS/i10dbg/bin/fmint4_isan_mod.mod +BRAMS/i10dbg/bin/fmint4_mod.mod +BRAMS/i10dbg/bin/fmint5_mod.mod +BRAMS/i10dbg/bin/fmpmove_mod.mod +BRAMS/i10dbg/bin/fmpmoves_mod.mod +BRAMS/i10dbg/bin/fmrefs1d_isan_mod.mod +BRAMS/i10dbg/bin/fmrefs1d_mod.mod +BRAMS/i10dbg/bin/fmrefs3d_isan_mod.mod +BRAMS/i10dbg/bin/fmrefs3d_mod.mod +BRAMS/i10dbg/bin/frame_mod.mod +BRAMS/i10dbg/bin/frstpt_mod.mod +BRAMS/i10dbg/bin/fuse_fiss_utils.mod +BRAMS/i10dbg/bin/fusion_fission_coms.mod +BRAMS/i10dbg/bin/fuso_check_mod.mod +BRAMS/i10dbg/bin/fusoinit_mod.mod +BRAMS/i10dbg/bin/fusonest_mod.mod +BRAMS/i10dbg/bin/fuso_read_mod.mod +BRAMS/i10dbg/bin/fuso_write_mod.mod +BRAMS/i10dbg/bin/gacwk_mod.mod +BRAMS/i10dbg/bin/gammln_mod.mod +BRAMS/i10dbg/bin/gam_mod.mod +BRAMS/i10dbg/bin/gammp_mod.mod +BRAMS/i10dbg/bin/gammq_mod.mod +BRAMS/i10dbg/bin/gcf_mod.mod +BRAMS/i10dbg/bin/gclks_mod.mod +BRAMS/i10dbg/bin/gclrwk_mod.mod +BRAMS/i10dbg/bin/gclwk_mod.mod +BRAMS/i10dbg/bin/gdawk_mod.mod +BRAMS/i10dbg/bin/gdtost2_mod.mod +BRAMS/i10dbg/bin/gdtost_mod.mod +BRAMS/i10dbg/bin/geodat_mod.mod +BRAMS/i10dbg/bin/geonest_file_mod.mod +BRAMS/i10dbg/bin/geonest_nofile_mod.mod +BRAMS/i10dbg/bin/gessdc_mod.mod +BRAMS/i10dbg/bin/gesspn_mod.mod +BRAMS/i10dbg/bin/getconfigint_mod.mod +BRAMS/i10dbg/bin/getconfigreal_mod.mod +BRAMS/i10dbg/bin/getconfigstring_mod.mod +BRAMS/i10dbg/bin/get_convflx_mod.mod +BRAMS/i10dbg/bin/get_dn01d_mod.mod +BRAMS/i10dbg/bin/getdrag_mod.mod +BRAMS/i10dbg/bin/get_env_condition_mod.mod +BRAMS/i10dbg/bin/get_errmax_mod.mod +BRAMS/i10dbg/bin/get_file_indices_mod.mod +BRAMS/i10dbg/bin/get_fire_properties_mod.mod +BRAMS/i10dbg/bin/geth5dims_mod.mod +BRAMS/i10dbg/bin/getict_mod.mod +BRAMS/i10dbg/bin/get_obs_value_mod.mod +BRAMS/i10dbg/bin/get_press_mod.mod +BRAMS/i10dbg/bin/get_sc_dn_mod.mod +BRAMS/i10dbg/bin/get_sc_up_mod.mod +BRAMS/i10dbg/bin/get_sc_up_wet_mod.mod +BRAMS/i10dbg/bin/get_se_mod.mod +BRAMS/i10dbg/bin/getset_mod.mod +BRAMS/i10dbg/bin/get_stcum_detrain_mod.mod +BRAMS/i10dbg/bin/get_stcum_mod.mod +BRAMS/i10dbg/bin/get_triinds_mod.mod +BRAMS/i10dbg/bin/get_upaobs_value_mod.mod +BRAMS/i10dbg/bin/getusv_mod.mod +BRAMS/i10dbg/bin/get_wet_deposited_mass_mod.mod +BRAMS/i10dbg/bin/get_yscal_mod.mod +BRAMS/i10dbg/bin/get_zi_mod.mod +BRAMS/i10dbg/bin/gfa_mod.mod +BRAMS/i10dbg/bin/gflas1_mod.mod +BRAMS/i10dbg/bin/gflas2_mod.mod +BRAMS/i10dbg/bin/gflas3_mod.mod +BRAMS/i10dbg/bin/glaciate_mod.mod +BRAMS/i10dbg/bin/gopks_mod.mod +BRAMS/i10dbg/bin/gopwk_mod.mod +BRAMS/i10dbg/bin/gpl_mod.mod +BRAMS/i10dbg/bin/gpm_mod.mod +BRAMS/i10dbg/bin/gqasf_mod.mod +BRAMS/i10dbg/bin/gqcntn_mod.mod +BRAMS/i10dbg/bin/gqcr_mod.mod +BRAMS/i10dbg/bin/gqnt_mod.mod +BRAMS/i10dbg/bin/gqplci_mod.mod +BRAMS/i10dbg/bin/gqtxci_mod.mod +BRAMS/i10dbg/bin/grad_mod.mod +BRAMS/i10dbg/bin/gradxt_mod.mod +BRAMS/i10dbg/bin/gradxu_mod.mod +BRAMS/i10dbg/bin/gradyt_mod.mod +BRAMS/i10dbg/bin/gradyv_mod.mod +BRAMS/i10dbg/bin/gradzt_mod.mod +BRAMS/i10dbg/bin/gradzw_mod.mod +BRAMS/i10dbg/bin/grdspc_mod.mod +BRAMS/i10dbg/bin/grell_arakschu_solver_mod.mod +BRAMS/i10dbg/bin/grell_buoy_below_lfc_mod.mod +BRAMS/i10dbg/bin/grell_cldwork_downdraft_mod.mod +BRAMS/i10dbg/bin/grell_cldwork_updraft_mod.mod +BRAMS/i10dbg/bin/grell_coms.mod +BRAMS/i10dbg/bin/grell_cupar_area_scaler_mod.mod +BRAMS/i10dbg/bin/grell_cupar_driver_mod.mod +BRAMS/i10dbg/bin/grell_cupar_dynamic_mod.mod +BRAMS/i10dbg/bin/grell_cupar_feedback_mod.mod +BRAMS/i10dbg/bin/grell_cupar_initial_mod.mod +BRAMS/i10dbg/bin/grell_cupar_output_mod.mod +BRAMS/i10dbg/bin/grell_cupar_static_driver_mod.mod +BRAMS/i10dbg/bin/grell_cupar_static_mod.mod +BRAMS/i10dbg/bin/grell_dellabot_ensemble_mod.mod +BRAMS/i10dbg/bin/grell_dellas_ensemble_mod.mod +BRAMS/i10dbg/bin/grell_draft_area_mod.mod +BRAMS/i10dbg/bin/grell_dyncontrol_ensemble_mod.mod +BRAMS/i10dbg/bin/grell_efficiency_ensemble_mod.mod +BRAMS/i10dbg/bin/grell_feedback_driver_mod.mod +BRAMS/i10dbg/bin/grell_find_cloud_lfc_mod.mod +BRAMS/i10dbg/bin/grell_find_downdraft_origin_mod.mod +BRAMS/i10dbg/bin/grell_find_pbl_height_mod.mod +BRAMS/i10dbg/bin/grell_grell_solver_mod.mod +BRAMS/i10dbg/bin/grell_inre_solver_mod.mod +BRAMS/i10dbg/bin/grell_massflx_stats_mod.mod +BRAMS/i10dbg/bin/grell_most_thermo_downdraft_mod.mod +BRAMS/i10dbg/bin/grell_most_thermo_updraft_mod.mod +BRAMS/i10dbg/bin/grell_nms_downdraft_mod.mod +BRAMS/i10dbg/bin/grell_nms_updraft_mod.mod +BRAMS/i10dbg/bin/grell_sanity_check_mod.mod +BRAMS/i10dbg/bin/grell_sanity_thil2tqall_mod.mod +BRAMS/i10dbg/bin/grell_theiv_downdraft_mod.mod +BRAMS/i10dbg/bin/grell_theiv_updraft_mod.mod +BRAMS/i10dbg/bin/grell_thermo_cldlev_mod.mod +BRAMS/i10dbg/bin/grell_updraft_origin_mod.mod +BRAMS/i10dbg/bin/grid_coms.mod +BRAMS/i10dbg/bin/grid_dims.mod +BRAMS/i10dbg/bin/gridinit_mod.mod +BRAMS/i10dbg/bin/gridloc_prt_mod.mod +BRAMS/i10dbg/bin/gridset_mod.mod +BRAMS/i10dbg/bin/grid_setup_mod.mod +BRAMS/i10dbg/bin/grid_struct.mod +BRAMS/i10dbg/bin/growth_balive.mod +BRAMS/i10dbg/bin/gsasf_mod.mod +BRAMS/i10dbg/bin/gsclip_mod.mod +BRAMS/i10dbg/bin/gscr_mod.mod +BRAMS/i10dbg/bin/gselnt_mod.mod +BRAMS/i10dbg/bin/gser_mod.mod +BRAMS/i10dbg/bin/gsetmarkercolourind_mod.mod +BRAMS/i10dbg/bin/gsfaci_mod.mod +BRAMS/i10dbg/bin/gsfais_mod.mod +BRAMS/i10dbg/bin/gslwsc_mod.mod +BRAMS/i10dbg/bin/gsmk_mod.mod +BRAMS/i10dbg/bin/gsmksc_mod.mod +BRAMS/i10dbg/bin/gsplci_mod.mod +BRAMS/i10dbg/bin/gspmci_mod.mod +BRAMS/i10dbg/bin/gstxci_mod.mod +BRAMS/i10dbg/bin/h5_output_mod.mod +BRAMS/i10dbg/bin/hadvance_mod.mod +BRAMS/i10dbg/bin/hadvance_plumerise_mod.mod +BRAMS/i10dbg/bin/harr_coms.mod +BRAMS/i10dbg/bin/harr_lwrad_mod.mod +BRAMS/i10dbg/bin/harr_raddriv_mod.mod +BRAMS/i10dbg/bin/harr_radinit1_mod.mod +BRAMS/i10dbg/bin/harr_radinit_mod.mod +BRAMS/i10dbg/bin/harr_swrad_mod.mod +BRAMS/i10dbg/bin/harv_immat_patches_mod.mod +BRAMS/i10dbg/bin/harv_mat_patches_mod.mod +BRAMS/i10dbg/bin/haznuc_mod.mod +BRAMS/i10dbg/bin/hdf5_coms.mod +BRAMS/i10dbg/bin/hdf5_utils.mod +BRAMS/i10dbg/bin/hdf_getslab_d_mod.mod +BRAMS/i10dbg/bin/hdf_getslab_i_mod.mod +BRAMS/i10dbg/bin/hdf_getslab_r_mod.mod +BRAMS/i10dbg/bin/heav_mod.mod +BRAMS/i10dbg/bin/hemintrp_cof_mod.mod +BRAMS/i10dbg/bin/hemintrp_mod.mod +BRAMS/i10dbg/bin/hemintrp_table_mod.mod +BRAMS/i10dbg/bin/hemintt_mod.mod +BRAMS/i10dbg/bin/hemintuv_mod.mod +BRAMS/i10dbg/bin/het_resp_weight_mod.mod +BRAMS/i10dbg/bin/heun_integ_mod.mod +BRAMS/i10dbg/bin/heun_stepper_mod.mod +BRAMS/i10dbg/bin/heun_timestep_mod.mod +BRAMS/i10dbg/bin/hg_xy_mod.mod +BRAMS/i10dbg/bin/hg_z_mod.mod +BRAMS/i10dbg/bin/hi_avgu_mod.mod +BRAMS/i10dbg/bin/hi_avgv_mod.mod +BRAMS/i10dbg/bin/hi_avgw_mod.mod +BRAMS/i10dbg/bin/hifromx_mod.mod +BRAMS/i10dbg/bin/hi_interp_mod.mod +BRAMS/i10dbg/bin/hintrp_cc_mod.mod +BRAMS/i10dbg/bin/history_start_mod.mod +BRAMS/i10dbg/bin/hist_pol_read_mod.mod +BRAMS/i10dbg/bin/hist_read_mod.mod +BRAMS/i10dbg/bin/hiswrt_mod.mod +BRAMS/i10dbg/bin/hlsrgb_mod.mod +BRAMS/i10dbg/bin/homfrzcl_mod.mod +BRAMS/i10dbg/bin/how_to_read_a_file_mod.mod +BRAMS/i10dbg/bin/hsvrgb_mod.mod +BRAMS/i10dbg/bin/htint2_mod.mod +BRAMS/i10dbg/bin/htintcp_mod.mod +BRAMS/i10dbg/bin/htint_index_mod.mod +BRAMS/i10dbg/bin/htint_inter_mod.mod +BRAMS/i10dbg/bin/htint_mod.mod +BRAMS/i10dbg/bin/hybrid_integ_mod.mod +BRAMS/i10dbg/bin/hybrid_timestep_mod.mod +BRAMS/i10dbg/bin/hydrol_mod.mod +BRAMS/i10dbg/bin/hydrology_coms.mod +BRAMS/i10dbg/bin/hydrology_constants.mod +BRAMS/i10dbg/bin/hydro_mod.mod +BRAMS/i10dbg/bin/i1mach_mod.mod +BRAMS/i10dbg/bin/ibias_mod.mod +BRAMS/i10dbg/bin/ibindec_mod.mod +BRAMS/i10dbg/bin/icenuc_mod.mod +BRAMS/i10dbg/bin/ifirstchar_mod.mod +BRAMS/i10dbg/bin/inc_fwd_patch_mod.mod +BRAMS/i10dbg/bin/include_shal_effect_mod.mod +BRAMS/i10dbg/bin/inc_rk4_patch_mod.mod +BRAMS/i10dbg/bin/init_can_air_params_mod.mod +BRAMS/i10dbg/bin/init_can_lyr_params_mod.mod +BRAMS/i10dbg/bin/init_can_rad_params_mod.mod +BRAMS/i10dbg/bin/init_cohorts_by_layers_mod.mod +BRAMS/i10dbg/bin/init_conc1_mod.mod +BRAMS/i10dbg/bin/init_conc2_mod.mod +BRAMS/i10dbg/bin/init_conc_prev_mod.mod +BRAMS/i10dbg/bin/init_decomp_params_mod.mod +BRAMS/i10dbg/bin/init_disturb_params_mod.mod +BRAMS/i10dbg/bin/init_ed_cohort_vars_mod.mod +BRAMS/i10dbg/bin/init_ed_misc_coms_mod.mod +BRAMS/i10dbg/bin/init_ed_patch_vars_mod.mod +BRAMS/i10dbg/bin/init_ed_poly_vars_mod.mod +BRAMS/i10dbg/bin/init_ed_site_vars_mod.mod +BRAMS/i10dbg/bin/init_ff_coms_mod.mod +BRAMS/i10dbg/bin/init_fields_mod.mod +BRAMS/i10dbg/bin/init_full_history_restart_mod.mod +BRAMS/i10dbg/bin/initg_mod.mod +BRAMS/i10dbg/bin/ini_tg_profile_mod.mod +BRAMS/i10dbg/bin/init_grid_spacing_mod.mod +BRAMS/i10dbg/bin/inithh_mod.mod +BRAMS/i10dbg/bin/inithis_mod.mod +BRAMS/i10dbg/bin/init_hydro_coms_mod.mod +BRAMS/i10dbg/bin/inithydrology_mod.mod +BRAMS/i10dbg/bin/inithydrosubsurface_mod.mod +BRAMS/i10dbg/bin/initial_grid_grell_mod.mod +BRAMS/i10dbg/bin/initialize_ed2leaf_mod.mod +BRAMS/i10dbg/bin/initialize_rk4patches_mod.mod +BRAMS/i10dbg/bin/initial_mod.mod +BRAMS/i10dbg/bin/initial_tend_grell_mod.mod +BRAMS/i10dbg/bin/initial_thermo_grell_mod.mod +BRAMS/i10dbg/bin/initial_winds_grell_mod.mod +BRAMS/i10dbg/bin/init_lapse_params_mod.mod +BRAMS/i10dbg/bin/initlz_mod.mod +BRAMS/i10dbg/bin/init_master_work_mod.mod +BRAMS/i10dbg/bin/init_met_params_mod.mod +BRAMS/i10dbg/bin/init_nbg_cohorts_mod.mod +BRAMS/i10dbg/bin/init_node_work_mod.mod +BRAMS/i10dbg/bin/init_params_mod.mod +BRAMS/i10dbg/bin/init_pft_alloc_params_mod.mod +BRAMS/i10dbg/bin/init_pft_derived_params_mod.mod +BRAMS/i10dbg/bin/init_pft_leaf_params_mod.mod +BRAMS/i10dbg/bin/init_pft_mort_params_mod.mod +BRAMS/i10dbg/bin/init_pft_nitro_params_mod.mod +BRAMS/i10dbg/bin/init_pft_photo_params_mod.mod +BRAMS/i10dbg/bin/init_pft_repro_params_mod.mod +BRAMS/i10dbg/bin/init_pft_resp_params_mod.mod +BRAMS/i10dbg/bin/init_phen_coms_mod.mod +BRAMS/i10dbg/bin/init_physiology_params_mod.mod +BRAMS/i10dbg/bin/initqin_mod.mod +BRAMS/i10dbg/bin/init_rk4_params_mod.mod +BRAMS/i10dbg/bin/init_soil_coms_mod.mod +BRAMS/i10dbg/bin/input_rawi_mod.mod +BRAMS/i10dbg/bin/input_sfc_mod.mod +BRAMS/i10dbg/bin/integ_liq_ice_mod.mod +BRAMS/i10dbg/bin/integrate_ed_dmean_vars_mod.mod +BRAMS/i10dbg/bin/integrate_ed_fmean_met_vars_mod.mod +BRAMS/i10dbg/bin/integrate_ed_mmean_vars_mod.mod +BRAMS/i10dbg/bin/integrate_ed_qmean_vars_mod.mod +BRAMS/i10dbg/bin/integrate_lake_mod.mod +BRAMS/i10dbg/bin/integrate_patch_euler_mod.mod +BRAMS/i10dbg/bin/integrate_patch_heun_mod.mod +BRAMS/i10dbg/bin/intrp_mod.mod +BRAMS/i10dbg/bin/intrrap_mod.mod +BRAMS/i10dbg/bin/inventory_mat_forests_mod.mod +BRAMS/i10dbg/bin/io_params.mod +BRAMS/i10dbg/bin/ipaths_cyc_alloc_mod.mod +BRAMS/i10dbg/bin/iprim_mod.mod +BRAMS/i10dbg/bin/iran_recsize_mod.mod +BRAMS/i10dbg/bin/isan_comp_dn0_mod.mod +BRAMS/i10dbg/bin/isan_coms.mod +BRAMS/i10dbg/bin/isan_driver_mod.mod +BRAMS/i10dbg/bin/isan_file_inv_mod.mod +BRAMS/i10dbg/bin/isenio_mod.mod +BRAMS/i10dbg/bin/is_finite8_mod.mod +BRAMS/i10dbg/bin/is_finite_mod.mod +BRAMS/i10dbg/bin/ishift_mod.mod +BRAMS/i10dbg/bin/isleap_mod.mod +BRAMS/i10dbg/bin/ismax_mod.mod +BRAMS/i10dbg/bin/ismin_mod.mod +BRAMS/i10dbg/bin/isnsig_mod.mod +BRAMS/i10dbg/bin/isnstage_mod.mod +BRAMS/i10dbg/bin/is_resolvable_mod.mod +BRAMS/i10dbg/bin/ivalugp_mod.mod +BRAMS/i10dbg/bin/izero_mod.mod +BRAMS/i10dbg/bin/jnmbinit_mod.mod +BRAMS/i10dbg/bin/julday1000_mod.mod +BRAMS/i10dbg/bin/julday_mod.mod +BRAMS/i10dbg/bin/ke_coms.mod +BRAMS/i10dbg/bin/klbnd_mod.mod +BRAMS/i10dbg/bin/krig_mod.mod +BRAMS/i10dbg/bin/kuocp_mod.mod +BRAMS/i10dbg/bin/kuo_cupar_driver_mod.mod +BRAMS/i10dbg/bin/lake_coms.mod +BRAMS/i10dbg/bin/lake_derived_thbounds_mod.mod +BRAMS/i10dbg/bin/lake_derivs_mod.mod +BRAMS/i10dbg/bin/lake_diagnostics_mod.mod +BRAMS/i10dbg/bin/lake_heun_mod.mod +BRAMS/i10dbg/bin/lake_rk4_mod.mod +BRAMS/i10dbg/bin/lake_sanity_check_mod.mod +BRAMS/i10dbg/bin/lambcon_ps_mod.mod +BRAMS/i10dbg/bin/landuse_init_mod.mod +BRAMS/i10dbg/bin/landuse_opqr_mod.mod +BRAMS/i10dbg/bin/large_error_mod.mod +BRAMS/i10dbg/bin/lastchar_mod.mod +BRAMS/i10dbg/bin/lastmonthdate_mod.mod +BRAMS/i10dbg/bin/lastslash_mod.mod +BRAMS/i10dbg/bin/latbnd_mod.mod +BRAMS/i10dbg/bin/latlon_ps_mod.mod +BRAMS/i10dbg/bin/latnormv_mod.mod +BRAMS/i10dbg/bin/latset_mod.mod +BRAMS/i10dbg/bin/latset_tracer_mod.mod +BRAMS/i10dbg/bin/lblbar_mod.mod +BRAMS/i10dbg/bin/lbound_mod.mod +BRAMS/i10dbg/bin/lbseti_mod.mod +BRAMS/i10dbg/bin/lc2ll_mod.mod +BRAMS/i10dbg/bin/lc_ll_mod.mod +BRAMS/i10dbg/bin/leaf0_mod.mod +BRAMS/i10dbg/bin/leaf2ed_soil_moist_energy_mod.mod +BRAMS/i10dbg/bin/leaf3_adjust_sfcw_mod.mod +BRAMS/i10dbg/bin/leaf3_aerodynamic_conductances_mod.mod +BRAMS/i10dbg/bin/leaf3_atmo1d_mod.mod +BRAMS/i10dbg/bin/leaf3_bcond_mod.mod +BRAMS/i10dbg/bin/leaf3_can_diag_mod.mod +BRAMS/i10dbg/bin/leaf3_canopy_mod.mod +BRAMS/i10dbg/bin/leaf3_clone_mod.mod +BRAMS/i10dbg/bin/leaf3_grndvap_mod.mod +BRAMS/i10dbg/bin/leaf3init_overwrite_mod.mod +BRAMS/i10dbg/bin/leaf3_ocean_diag_mod.mod +BRAMS/i10dbg/bin/leaf3_ocean_mod.mod +BRAMS/i10dbg/bin/leaf3_prognostic_mod.mod +BRAMS/i10dbg/bin/leaf3_reduced_wind_mod.mod +BRAMS/i10dbg/bin/leaf3_roughness_mod.mod +BRAMS/i10dbg/bin/leaf3_sfclmcv_mod.mod +BRAMS/i10dbg/bin/leaf3_sfcrad_mod.mod +BRAMS/i10dbg/bin/leaf3_sflux_w_mod.mod +BRAMS/i10dbg/bin/leaf3_soilsfcw_diag_mod.mod +BRAMS/i10dbg/bin/leaf3_solve_veg_mod.mod +BRAMS/i10dbg/bin/leaf3_stars_mod.mod +BRAMS/i10dbg/bin/leaf3_step_startup_mod.mod +BRAMS/i10dbg/bin/leaf3_teb_interface_mod.mod +BRAMS/i10dbg/bin/leaf3_timestep_mod.mod +BRAMS/i10dbg/bin/leaf3_tw_mod.mod +BRAMS/i10dbg/bin/leaf3_veg_diag_mod.mod +BRAMS/i10dbg/bin/leaf_coms.mod +BRAMS/i10dbg/bin/leaf_database_mod.mod +BRAMS/i10dbg/bin/leaf_datp_datq_mod.mod +BRAMS/i10dbg/bin/leaf_datp_datsoil_mod.mod +BRAMS/i10dbg/bin/leaf_derivs_mod.mod +BRAMS/i10dbg/bin/leaftw_derivs_mod.mod +BRAMS/i10dbg/bin/le_fontes_mod.mod +BRAMS/i10dbg/bin/libxml2f90__closeall_mod.mod +BRAMS/i10dbg/bin/libxml2f90__closefile_mod.mod +BRAMS/i10dbg/bin/libxml2f90_error_getline_mod.mod +BRAMS/i10dbg/bin/libxml2f90__existid_mod.mod +BRAMS/i10dbg/bin/libxml2f90_existid_mod.mod +BRAMS/i10dbg/bin/libxml2f90__existpid_mod.mod +BRAMS/i10dbg/bin/libxml2f90__findinchara_mod.mod +BRAMS/i10dbg/bin/libxml2f90__flush_mod.mod +BRAMS/i10dbg/bin/libxml2f90__get_fileunit_mod.mod +BRAMS/i10dbg/bin/libxml2f90_getline_mod.mod +BRAMS/i10dbg/bin/libxml2f90_getsafec8_mod.mod +BRAMS/i10dbg/bin/libxml2f90_getsafei4_mod.mod +BRAMS/i10dbg/bin/libxml2f90_getsafel4_mod.mod +BRAMS/i10dbg/bin/libxml2f90_getsafer8_mod.mod +BRAMS/i10dbg/bin/libxml2f90__getunit_mod.mod +BRAMS/i10dbg/bin/libxml2f90_interface_module.mod +BRAMS/i10dbg/bin/libxml2f90__ll_addid_mod.mod +BRAMS/i10dbg/bin/libxml2f90_ll_addid_mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_add_list_mod.mod +BRAMS/i10dbg/bin/libxml2f90_ll_add_list_mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_addpid_mod.mod +BRAMS/i10dbg/bin/libxml2f90_ll_addpid_mod.mod +BRAMS/i10dbg/bin/libxml2f90_ll_addpureid_mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_closetag_mod.mod +BRAMS/i10dbg/bin/libxml2f90_ll_closetag_mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_down_mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_edit_id_mod.mod +BRAMS/i10dbg/bin/libxml2f90_ll_edit_id_mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_edit_pid_mod.mod +BRAMS/i10dbg/bin/libxml2f90_ll_edit_pid_mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_exist_mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_getc8__mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_getc8_mod.mod +BRAMS/i10dbg/bin/libxml2f90_ll_getc8_mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_getch_mod.mod +BRAMS/i10dbg/bin/libxml2f90_ll_getch_mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_getch_scal_mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_geti4__mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_geti4_mod.mod +BRAMS/i10dbg/bin/libxml2f90_ll_geti4_mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_getl4__mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_getl4_mod.mod +BRAMS/i10dbg/bin/libxml2f90_ll_getl4_mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_getpc8__mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_getpc8_mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_getpch_mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_getpi4__mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_getpi4_mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_getpl4__mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_getpl4_mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_getpr8__mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_getpr8_mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_getpsize_mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_getpstring__mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_getpstring_mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_getr8__mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_getr8_mod.mod +BRAMS/i10dbg/bin/libxml2f90_ll_getr8_mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_getsize_mod.mod +BRAMS/i10dbg/bin/libxml2f90_ll_getsize_mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_getstring__mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_getstring_mod.mod +BRAMS/i10dbg/bin/libxml2f90_ll_getstring_mod.mod +BRAMS/i10dbg/bin/libxml2f90_ll_initlist_mod.mod +BRAMS/i10dbg/bin/libxml2f90_ll_inittag_mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_opentag_mod.mod +BRAMS/i10dbg/bin/libxml2f90_ll_opentag_mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_report_mod.mod +BRAMS/i10dbg/bin/libxml2f90_ll_report_rec_mod.mod +BRAMS/i10dbg/bin/libxml2f90_ll_report_rec_wrap_mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_selectlist_mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_selecttag_mod.mod +BRAMS/i10dbg/bin/libxml2f90__ll_up_mod.mod +BRAMS/i10dbg/bin/libxml2f90_module.mod +BRAMS/i10dbg/bin/libxml2f90__openfile_mod.mod +BRAMS/i10dbg/bin/libxml2f90_parse_file_mod.mod +BRAMS/i10dbg/bin/libxml2f90_parse_find_char_mod.mod +BRAMS/i10dbg/bin/libxml2f90__readin_file_mod.mod +BRAMS/i10dbg/bin/libxml2f90_readin_file_mod.mod +BRAMS/i10dbg/bin/libxml2f90__readin_nfil_mod.mod +BRAMS/i10dbg/bin/libxml2f90__set_casesensitive_mod.mod +BRAMS/i10dbg/bin/libxml2f90__set_default_ll_id_mod.mod +BRAMS/i10dbg/bin/libxml2f90__setformat_mod.mod +BRAMS/i10dbg/bin/libxml2f90__set_paw_mod.mod +BRAMS/i10dbg/bin/libxml2f90__set_rmcomma_mod.mod +BRAMS/i10dbg/bin/libxml2f90__set_rmquotes_mod.mod +BRAMS/i10dbg/bin/libxml2f90__settransform_exm_mod.mod +BRAMS/i10dbg/bin/libxml2f90__setwrite_exm_mod.mod +BRAMS/i10dbg/bin/libxml2f90_strings_module.mod +BRAMS/i10dbg/bin/libxml2f90_tostringa_mod.mod +BRAMS/i10dbg/bin/libxml2f90_tostring_mod.mod +BRAMS/i10dbg/bin/libxml2f90_transform_paw_mod.mod +BRAMS/i10dbg/bin/lined_mod.mod +BRAMS/i10dbg/bin/line_mod.mod +BRAMS/i10dbg/bin/lisys_solver8_mod.mod +BRAMS/i10dbg/bin/lisys_solver_mod.mod +BRAMS/i10dbg/bin/lite_varset_mod.mod +BRAMS/i10dbg/bin/ll2lc_mod.mod +BRAMS/i10dbg/bin/ll_lc_mod.mod +BRAMS/i10dbg/bin/ll_module.mod +BRAMS/i10dbg/bin/ll_rotate_lc_mod.mod +BRAMS/i10dbg/bin/ll_xy_mod.mod +BRAMS/i10dbg/bin/load_ecosystem_state_mod.mod +BRAMS/i10dbg/bin/load_ed_ecosystem_params_mod.mod +BRAMS/i10dbg/bin/lpuvw_init_mod.mod +BRAMS/i10dbg/bin/lsl_particles_mod.mod +BRAMS/i10dbg/bin/lubksb_dble_mod.mod +BRAMS/i10dbg/bin/ludcmp_dble_mod.mod +BRAMS/i10dbg/bin/lw_multiple_scatter_mod.mod +BRAMS/i10dbg/bin/lwradc_mod.mod +BRAMS/i10dbg/bin/lwradp_mod.mod +BRAMS/i10dbg/bin/lw_twostream_mod.mod +BRAMS/i10dbg/bin/machine_arq.mod +BRAMS/i10dbg/bin/make_autotab_mod.mod +BRAMS/i10dbg/bin/makefnam_mod.mod +BRAMS/i10dbg/bin/makeplume_mod.mod +BRAMS/i10dbg/bin/make_sfcfiles_mod.mod +BRAMS/i10dbg/bin/makevarf_mod.mod +BRAMS/i10dbg/bin/mapaci_mod.mod +BRAMS/i10dbg/bin/mapbla_mod.mod +BRAMS/i10dbg/bin/mapdrw_mod.mod +BRAMS/i10dbg/bin/mapint_mod.mod +BRAMS/i10dbg/bin/mapiqa_mod.mod +BRAMS/i10dbg/bin/mapiq_mod.mod +BRAMS/i10dbg/bin/mapita_mod.mod +BRAMS/i10dbg/bin/mapit_mod.mod +BRAMS/i10dbg/bin/mappos_mod.mod +BRAMS/i10dbg/bin/maproj_mod.mod +BRAMS/i10dbg/bin/maprs_mod.mod +BRAMS/i10dbg/bin/mapset_mod.mod +BRAMS/i10dbg/bin/mapstc_mod.mod +BRAMS/i10dbg/bin/mapsti_mod.mod +BRAMS/i10dbg/bin/maptra_mod.mod +BRAMS/i10dbg/bin/maptri_mod.mod +BRAMS/i10dbg/bin/maptrn_mod.mod +BRAMS/i10dbg/bin/master_ed_init_mod.mod +BRAMS/i10dbg/bin/master_getall_mod.mod +BRAMS/i10dbg/bin/master_getanl_mod.mod +BRAMS/i10dbg/bin/master_getcflcpu_mod.mod +BRAMS/i10dbg/bin/master_putcflmax_mod.mod +BRAMS/i10dbg/bin/masterput_cofnest_mod.mod +BRAMS/i10dbg/bin/master_putdtsched_mod.mod +BRAMS/i10dbg/bin/master_putdxt_mod.mod +BRAMS/i10dbg/bin/masterput_ednl_mod.mod +BRAMS/i10dbg/bin/masterput_grid_dimens_mod.mod +BRAMS/i10dbg/bin/masterput_gridinit_mod.mod +BRAMS/i10dbg/bin/masterput_gridset_mod.mod +BRAMS/i10dbg/bin/masterput_micphys_mod.mod +BRAMS/i10dbg/bin/masterput_misc_mod.mod +BRAMS/i10dbg/bin/masterput_nl_mod.mod +BRAMS/i10dbg/bin/masterput_oda_mod.mod +BRAMS/i10dbg/bin/masterput_processid_mod.mod +BRAMS/i10dbg/bin/master_sendinit_mod.mod +BRAMS/i10dbg/bin/mat_forest_harv_rates_mod.mod +BRAMS/i10dbg/bin/maximi_mod.mod +BRAMS/i10dbg/bin/mcphys_main_mod.mod +BRAMS/i10dbg/bin/mean_daysecz_mod.mod +BRAMS/i10dbg/bin/melt_mod.mod +BRAMS/i10dbg/bin/mem_aerad.mod +BRAMS/i10dbg/bin/mem_all.mod +BRAMS/i10dbg/bin/mem_basic.mod +BRAMS/i10dbg/bin/mem_carma.mod +BRAMS/i10dbg/bin/mem_cuparm.mod +BRAMS/i10dbg/bin/mem_edcp.mod +BRAMS/i10dbg/bin/mem_emiss.mod +BRAMS/i10dbg/bin/mem_ensemble.mod +BRAMS/i10dbg/bin/mem_gaspart.mod +BRAMS/i10dbg/bin/mem_globaer.mod +BRAMS/i10dbg/bin/mem_globrad.mod +BRAMS/i10dbg/bin/mem_grell_param.mod +BRAMS/i10dbg/bin/mem_grid_dim_defs.mod +BRAMS/i10dbg/bin/mem_grid.mod +BRAMS/i10dbg/bin/mem_harr.mod +BRAMS/i10dbg/bin/mem_leaf.mod +BRAMS/i10dbg/bin/mem_mass.mod +BRAMS/i10dbg/bin/mem_mclat.mod +BRAMS/i10dbg/bin/mem_micro.mod +BRAMS/i10dbg/bin/mem_mksfc.mod +BRAMS/i10dbg/bin/mem_mnt_advec.mod +BRAMS/i10dbg/bin/mem_nestb.mod +BRAMS/i10dbg/bin/mem_oda.mod +BRAMS/i10dbg/bin/mem_opt.mod +BRAMS/i10dbg/bin/mem_polygons.mod +BRAMS/i10dbg/bin/mem_radiate.mod +BRAMS/i10dbg/bin/mem_scalar.mod +BRAMS/i10dbg/bin/mem_scratch1_grell.mod +BRAMS/i10dbg/bin/mem_scratch1.mod +BRAMS/i10dbg/bin/mem_scratch2_grell.mod +BRAMS/i10dbg/bin/mem_scratch2_grell_sh.mod +BRAMS/i10dbg/bin/mem_scratch3_grell.mod +BRAMS/i10dbg/bin/mem_scratch3_grell_sh.mod +BRAMS/i10dbg/bin/mem_scratch_grell.mod +BRAMS/i10dbg/bin/mem_scratch.mod +BRAMS/i10dbg/bin/mem_soil_moisture.mod +BRAMS/i10dbg/bin/mem_tconv.mod +BRAMS/i10dbg/bin/mem_teb_common.mod +BRAMS/i10dbg/bin/mem_teb.mod +BRAMS/i10dbg/bin/mem_tend.mod +BRAMS/i10dbg/bin/mem_turb.mod +BRAMS/i10dbg/bin/mem_turb_scalar.mod +BRAMS/i10dbg/bin/mem_varinit.mod +BRAMS/i10dbg/bin/met_driver_coms.mod +BRAMS/i10dbg/bin/met_sanity_check_mod.mod +BRAMS/i10dbg/bin/micinit_mod.mod +BRAMS/i10dbg/bin/micphys.mod +BRAMS/i10dbg/bin/micro_1st_mod.mod +BRAMS/i10dbg/bin/micro_coms.mod +BRAMS/i10dbg/bin/micro_data_mod.mod +BRAMS/i10dbg/bin/micro_driver_mod.mod +BRAMS/i10dbg/bin/micro_master_mod.mod +BRAMS/i10dbg/bin/migs_mod.mod +BRAMS/i10dbg/bin/minimi_mod.mod +BRAMS/i10dbg/bin/minmax_mod.mod +BRAMS/i10dbg/bin/minvap_1d_adj_mod.mod +BRAMS/i10dbg/bin/mk_adv_buff_mod.mod +BRAMS/i10dbg/bin/mkcoltb_mod.mod +BRAMS/i10dbg/bin/mk_cyc_buff_mod.mod +BRAMS/i10dbg/bin/mk_full_buff_mod.mod +BRAMS/i10dbg/bin/mk_lbc_buff_mod.mod +BRAMS/i10dbg/bin/mknest_buff_mod.mod +BRAMS/i10dbg/bin/mksedim_tab_mod.mod +BRAMS/i10dbg/bin/mk_st_buff_mod.mod +BRAMS/i10dbg/bin/model_mod.mod +BRAMS/i10dbg/bin/mod_ghostblock.mod +BRAMS/i10dbg/bin/mod_ghostblockpartition.mod +BRAMS/i10dbg/bin/modsched_mod.mod +BRAMS/i10dbg/bin/monotonic_advec_mod.mod +BRAMS/i10dbg/bin/mortality.mod +BRAMS/i10dbg/bin/movenest_mod.mod +BRAMS/i10dbg/bin/mpilbc_driver_mod.mod +BRAMS/i10dbg/bin/mprove_mod.mod +BRAMS/i10dbg/bin/mpsetc_mod.mod +BRAMS/i10dbg/bin/mxdefm_mod.mod +BRAMS/i10dbg/bin/mxdefm_tracer_mod.mod +BRAMS/i10dbg/bin/mxtked_mod.mod +BRAMS/i10dbg/bin/nakanishi_mod.mod +BRAMS/i10dbg/bin/nameout_mod.mod +BRAMS/i10dbg/bin/ncarg_dummies_mod.mod +BRAMS/i10dbg/bin/nc_get_press_mod.mod +BRAMS/i10dbg/bin/nc_pressure_stage_mod.mod +BRAMS/i10dbg/bin/nc_prfill_mod.mod +BRAMS/i10dbg/bin/ndvi_check_header_mod.mod +BRAMS/i10dbg/bin/ndvi_file_inv_mod.mod +BRAMS/i10dbg/bin/ndviinit_mod.mod +BRAMS/i10dbg/bin/ndviinit_user_mod.mod +BRAMS/i10dbg/bin/ndvinest_mod.mod +BRAMS/i10dbg/bin/ndvi_read_dataheader_mod.mod +BRAMS/i10dbg/bin/ndvi_read_mod.mod +BRAMS/i10dbg/bin/ndvi_update_mod.mod +BRAMS/i10dbg/bin/ndvi_write_mod.mod +BRAMS/i10dbg/bin/near_bare_ground_big_leaf_init_mod.mod +BRAMS/i10dbg/bin/near_bare_ground_init_mod.mod +BRAMS/i10dbg/bin/nearest_neighbour_sm_mod.mod +BRAMS/i10dbg/bin/negadj1_mod.mod +BRAMS/i10dbg/bin/nest_interpolated_topo_mod.mod +BRAMS/i10dbg/bin/newgrid_mod.mod +BRAMS/i10dbg/bin/new_patch_sfc_props_mod.mod +BRAMS/i10dbg/bin/newtemp_mod.mod +BRAMS/i10dbg/bin/niceinc6_mod.mod +BRAMS/i10dbg/bin/niceinc_mod.mod +BRAMS/i10dbg/bin/node_cycinit_mod.mod +BRAMS/i10dbg/bin/node_decomp_mod.mod +BRAMS/i10dbg/bin/node_ed_init_mod.mod +BRAMS/i10dbg/bin/node_getadv_mod.mod +BRAMS/i10dbg/bin/node_getcflmax_mod.mod +BRAMS/i10dbg/bin/nodeget_cofnest_mod.mod +BRAMS/i10dbg/bin/node_getcyclic_mod.mod +BRAMS/i10dbg/bin/node_getdtsched_mod.mod +BRAMS/i10dbg/bin/node_getdxt_mod.mod +BRAMS/i10dbg/bin/nodeget_ednl_mod.mod +BRAMS/i10dbg/bin/node_getfeed_mod.mod +BRAMS/i10dbg/bin/nodeget_grid_dimens_mod.mod +BRAMS/i10dbg/bin/nodeget_gridinit_mod.mod +BRAMS/i10dbg/bin/nodeget_gridset_mod.mod +BRAMS/i10dbg/bin/node_getinit_mod.mod +BRAMS/i10dbg/bin/node_getlbc_mod.mod +BRAMS/i10dbg/bin/nodeget_micphys_mod.mod +BRAMS/i10dbg/bin/nodeget_misc_mod.mod +BRAMS/i10dbg/bin/node_getnbc_mod.mod +BRAMS/i10dbg/bin/nodeget_nl_mod.mod +BRAMS/i10dbg/bin/nodeget_oda_mod.mod +BRAMS/i10dbg/bin/nodeget_processid_mod.mod +BRAMS/i10dbg/bin/node_getst_mod.mod +BRAMS/i10dbg/bin/node_index_mod.mod +BRAMS/i10dbg/bin/node_mod.mod +BRAMS/i10dbg/bin/node_putcflcpu_mod.mod +BRAMS/i10dbg/bin/node_sendadv_mod.mod +BRAMS/i10dbg/bin/node_sendall_mod.mod +BRAMS/i10dbg/bin/node_sendanl_mod.mod +BRAMS/i10dbg/bin/node_sendcyclic_mod.mod +BRAMS/i10dbg/bin/node_sendfeed_mod.mod +BRAMS/i10dbg/bin/node_sendlbc_mod.mod +BRAMS/i10dbg/bin/node_sendnbc_mod.mod +BRAMS/i10dbg/bin/node_sendst_mod.mod +BRAMS/i10dbg/bin/normal_accfluxes_mod.mod +BRAMS/i10dbg/bin/normalize_ed_dmean_vars_mod.mod +BRAMS/i10dbg/bin/normalize_ed_fmean_vars_mod.mod +BRAMS/i10dbg/bin/normalize_ed_mmean_vars_mod.mod +BRAMS/i10dbg/bin/normalize_ed_qmean_vars_mod.mod +BRAMS/i10dbg/bin/normalize_ed_todaynpp_vars_mod.mod +BRAMS/i10dbg/bin/normalize_ed_today_vars_mod.mod +BRAMS/i10dbg/bin/norm_harv_patch_mod.mod +BRAMS/i10dbg/bin/nstbdriv_mod.mod +BRAMS/i10dbg/bin/nstb_mod.mod +BRAMS/i10dbg/bin/nstbtnd_mod.mod +BRAMS/i10dbg/bin/nstfeed_mod.mod +BRAMS/i10dbg/bin/nud_cond_accum_mod.mod +BRAMS/i10dbg/bin/nud_file_inv_mod.mod +BRAMS/i10dbg/bin/nudge_cond_mod.mod +BRAMS/i10dbg/bin/nudge_mod.mod +BRAMS/i10dbg/bin/nud_read_mod.mod +BRAMS/i10dbg/bin/nud_update_mod.mod +BRAMS/i10dbg/bin/num_days_mod.mod +BRAMS/i10dbg/bin/obanl_mod.mod +BRAMS/i10dbg/bin/obj_anal_mod.mod +BRAMS/i10dbg/bin/obs_input.mod +BRAMS/i10dbg/bin/obs_isen_mod.mod +BRAMS/i10dbg/bin/obs_sigz_mod.mod +BRAMS/i10dbg/bin/oda_file_inv_mod.mod +BRAMS/i10dbg/bin/oda_nudge_init_mod.mod +BRAMS/i10dbg/bin/oda_nudge_mod.mod +BRAMS/i10dbg/bin/oda_obs_alloc_mod.mod +BRAMS/i10dbg/bin/oda_proc_obs_mod.mod +BRAMS/i10dbg/bin/oda_read_mod.mod +BRAMS/i10dbg/bin/oda_sta_count_mod.mod +BRAMS/i10dbg/bin/oda_sta_input_mod.mod +BRAMS/i10dbg/bin/oda_tendency_mod.mod +BRAMS/i10dbg/bin/odeint_mod.mod +BRAMS/i10dbg/bin/old_grell_cupar_driver_mod.mod +BRAMS/i10dbg/bin/old_prep_convflx_to_mass_mod.mod +BRAMS/i10dbg/bin/onenode_mod.mod +BRAMS/i10dbg/bin/operts_mod.mod +BRAMS/i10dbg/bin/opngks_mod.mod +BRAMS/i10dbg/bin/opspec1_mod.mod +BRAMS/i10dbg/bin/opspec2_mod.mod +BRAMS/i10dbg/bin/opspec3_mod.mod +BRAMS/i10dbg/bin/opspec4_mod.mod +BRAMS/i10dbg/bin/opspec_fatal_mod.mod +BRAMS/i10dbg/bin/opspec_mess_mod.mod +BRAMS/i10dbg/bin/optimiz_coms.mod +BRAMS/i10dbg/bin/optlib_mod.mod +BRAMS/i10dbg/bin/overwrite_with_xml_config_mod.mod +BRAMS/i10dbg/bin/ozone_const.mod +BRAMS/i10dbg/bin/ozone_mod.mod +BRAMS/i10dbg/bin/par_bintp_mod.mod +BRAMS/i10dbg/bin/par_decomp_bounds_mod.mod +BRAMS/i10dbg/bin/par_decomp_input_mod.mod +BRAMS/i10dbg/bin/par_decomp_mod.mod +BRAMS/i10dbg/bin/par_est_time_mod.mod +BRAMS/i10dbg/bin/par_model_mod.mod +BRAMS/i10dbg/bin/par_node_paths_mod.mod +BRAMS/i10dbg/bin/parsefnam_mod.mod +BRAMS/i10dbg/bin/parse_mod.mod +BRAMS/i10dbg/bin/patch_array_size_mod.mod +BRAMS/i10dbg/bin/patch_interp_driver_mod.mod +BRAMS/i10dbg/bin/patch_interp_mod.mod +BRAMS/i10dbg/bin/patch_land_average_mod.mod +BRAMS/i10dbg/bin/patch_land_copy2_mod.mod +BRAMS/i10dbg/bin/patch_land_unaverage_mod.mod +BRAMS/i10dbg/bin/patch_latlon_mod.mod +BRAMS/i10dbg/bin/patch_minsize_mod.mod +BRAMS/i10dbg/bin/path_lengths_mod.mod +BRAMS/i10dbg/bin/pc03_mod.mod +BRAMS/i10dbg/bin/pcgeti_mod.mod +BRAMS/i10dbg/bin/pcgetr_mod.mod +BRAMS/i10dbg/bin/pcseti_mod.mod +BRAMS/i10dbg/bin/perim_mod.mod +BRAMS/i10dbg/bin/pft_coms.mod +BRAMS/i10dbg/bin/phenology_aux.mod +BRAMS/i10dbg/bin/phenology_coms.mod +BRAMS/i10dbg/bin/phenology_driver_eq_0_mod.mod +BRAMS/i10dbg/bin/phenology_driver_mod.mod +BRAMS/i10dbg/bin/phenology_startup.mod +BRAMS/i10dbg/bin/phenology_thresholds_mod.mod +BRAMS/i10dbg/bin/physiology_coms.mod +BRAMS/i10dbg/bin/plant_structural_allocation_mod.mod +BRAMS/i10dbg/bin/plchhq_mod.mod +BRAMS/i10dbg/bin/plchlq_mod.mod +BRAMS/i10dbg/bin/plchmq_mod.mod +BRAMS/i10dbg/bin/plin_mod.mod +BRAMS/i10dbg/bin/plkavg_mod.mod +BRAMS/i10dbg/bin/plotif_mod.mod +BRAMS/i10dbg/bin/plotit_mod.mod +BRAMS/i10dbg/bin/plumerise_driver_mod.mod +BRAMS/i10dbg/bin/plumerise_mod.mod +BRAMS/i10dbg/bin/plume_utils.mod +BRAMS/i10dbg/bin/point_mod.mod +BRAMS/i10dbg/bin/points_mod.mod +BRAMS/i10dbg/bin/polarst_mod.mod +BRAMS/i10dbg/bin/posidef_mod.mod +BRAMS/i10dbg/bin/prdctp1_adap_mod.mod +BRAMS/i10dbg/bin/prdctp1_new_mod.mod +BRAMS/i10dbg/bin/prdctp2_adap_mod.mod +BRAMS/i10dbg/bin/prdctp2_mod.mod +BRAMS/i10dbg/bin/prdctu_adap_mod.mod +BRAMS/i10dbg/bin/prdctu_mod.mod +BRAMS/i10dbg/bin/prdctv_adap_mod.mod +BRAMS/i10dbg/bin/prdctv_mod.mod +BRAMS/i10dbg/bin/prdctw1_adap_mod.mod +BRAMS/i10dbg/bin/prdctw1_mod.mod +BRAMS/i10dbg/bin/prdctw2_adap_mod.mod +BRAMS/i10dbg/bin/prdctw2_mod.mod +BRAMS/i10dbg/bin/prdctw3_adap_mod.mod +BRAMS/i10dbg/bin/prdctw3_mod.mod +BRAMS/i10dbg/bin/prebarn_mod.mod +BRAMS/i10dbg/bin/predict_mod.mod +BRAMS/i10dbg/bin/predtr_mod.mod +BRAMS/i10dbg/bin/prep_advflx_to_mass_mod.mod +BRAMS/i10dbg/bin/prepare_timeavg_driver_mod.mod +BRAMS/i10dbg/bin/prepare_timeavg_to_mass_mod.mod +BRAMS/i10dbg/bin/prep_convflx_to_mass_mod.mod +BRAMS/i10dbg/bin/prep_lnthetv_mod.mod +BRAMS/i10dbg/bin/prep_lnthvtend_mod.mod +BRAMS/i10dbg/bin/prep_timeave_mod.mod +BRAMS/i10dbg/bin/prescribed_event_mod.mod +BRAMS/i10dbg/bin/press_miss_mod.mod +BRAMS/i10dbg/bin/pressure_stage_mod.mod +BRAMS/i10dbg/bin/prfill_mod.mod +BRAMS/i10dbg/bin/prgintrp_mod.mod +BRAMS/i10dbg/bin/pr_hystatic_t_mod.mod +BRAMS/i10dbg/bin/pr_hystatic_z_mod.mod +BRAMS/i10dbg/bin/print_c_and_n_budgets_mod.mod +BRAMS/i10dbg/bin/print_csiteipa_mod.mod +BRAMS/i10dbg/bin/pr_interp_mod.mod +BRAMS/i10dbg/bin/print_errmax_mod.mod +BRAMS/i10dbg/bin/print_field_node_mod.mod +BRAMS/i10dbg/bin/print_fields_mod.mod +BRAMS/i10dbg/bin/print_lake_errmax_mod.mod +BRAMS/i10dbg/bin/print_lakesite_mod.mod +BRAMS/i10dbg/bin/print_longwave_mod.mod +BRAMS/i10dbg/bin/print_photo_details_mod.mod +BRAMS/i10dbg/bin/print_rk4patch_mod.mod +BRAMS/i10dbg/bin/print_rk4_state_mod.mod +BRAMS/i10dbg/bin/print_soil_info_mod.mod +BRAMS/i10dbg/bin/pr_miss_fill_mod.mod +BRAMS/i10dbg/bin/prt2d_mod.mod +BRAMS/i10dbg/bin/prtlev_mod.mod +BRAMS/i10dbg/bin/prtopt_mod.mod +BRAMS/i10dbg/bin/prtout_mod.mod +BRAMS/i10dbg/bin/psfill_mod.mod +BRAMS/i10dbg/bin/ps_ps_mod.mod +BRAMS/i10dbg/bin/ps_ps_rot_mod.mod +BRAMS/i10dbg/bin/psxfer_mod.mod +BRAMS/i10dbg/bin/putconfigint_mod.mod +BRAMS/i10dbg/bin/putconfigreal8_mod.mod +BRAMS/i10dbg/bin/putconfigreal_mod.mod +BRAMS/i10dbg/bin/putconfigstring_mod.mod +BRAMS/i10dbg/bin/pwritx_mod.mod +BRAMS/i10dbg/bin/q8qst4_mod.mod +BRAMS/i10dbg/bin/rad_carma.mod +BRAMS/i10dbg/bin/radcomp_mod.mod +BRAMS/i10dbg/bin/rad_copy2scratch_mod.mod +BRAMS/i10dbg/bin/radiate_driver_mod.mod +BRAMS/i10dbg/bin/radiate_mod.mod +BRAMS/i10dbg/bin/rad_mclat_mod.mod +BRAMS/i10dbg/bin/radvc_mnt_driver_mod.mod +BRAMS/i10dbg/bin/ralph_vars_mod.mod +BRAMS/i10dbg/bin/ramran_mod.mod +BRAMS/i10dbg/bin/rams2_mm_mod.mod +BRAMS/i10dbg/bin/rams_aprep_hkh_mod.mod +BRAMS/i10dbg/bin/rams_aprep_p_mod.mod +BRAMS/i10dbg/bin/rams_aprep_vkh_mod.mod +BRAMS/i10dbg/bin/rams_dintsort_mod.mod +BRAMS/i10dbg/bin/rams_filelist_mod.mod +BRAMS/i10dbg/bin/rams_fltsort_mod.mod +BRAMS/i10dbg/bin/rams_f_open_mod.mod +BRAMS/i10dbg/bin/rams_getvar_mod.mod +BRAMS/i10dbg/bin/rams_grad_mod.mod +BRAMS/i10dbg/bin/rams_intsort_mod.mod +BRAMS/i10dbg/bin/rams_master_mod.mod +BRAMS/i10dbg/bin/rams_mem_alloc_mod.mod +BRAMS/i10dbg/bin/rams_mm_mod.mod +BRAMS/i10dbg/bin/rams_node_mod.mod +BRAMS/i10dbg/bin/rams_output_mod.mod +BRAMS/i10dbg/bin/rams_read_header_mod.mod +BRAMS/i10dbg/bin/rams_sort_dint3_mod.mod +BRAMS/i10dbg/bin/rams_unique_dint_mod.mod +BRAMS/i10dbg/bin/rank_down_mod.mod +BRAMS/i10dbg/bin/rank_up_mod.mod +BRAMS/i10dbg/bin/rayf_adap_mod.mod +BRAMS/i10dbg/bin/rayf_mod.mod +BRAMS/i10dbg/bin/rayft_mod.mod +BRAMS/i10dbg/bin/rayleigh_mod.mod +BRAMS/i10dbg/bin/rconstants.mod +BRAMS/i10dbg/bin/rconv_driver_mod.mod +BRAMS/i10dbg/bin/read_ed10_ed20_history_file_mod.mod +BRAMS/i10dbg/bin/read_ed21_history_file_mod.mod +BRAMS/i10dbg/bin/read_ed21_history_unstruct_mod.mod +BRAMS/i10dbg/bin/read_ed21_polyclone_mod.mod +BRAMS/i10dbg/bin/read_ednl_mod.mod +BRAMS/i10dbg/bin/read_ed_xml_config_mod.mod +BRAMS/i10dbg/bin/read_events_xml_mod.mod +BRAMS/i10dbg/bin/read_hdf_mod.mod +BRAMS/i10dbg/bin/read_header_mod.mod +BRAMS/i10dbg/bin/read_nl_mod.mod +BRAMS/i10dbg/bin/read_plantation_fractions_mod.mod +BRAMS/i10dbg/bin/read_site_file_mod.mod +BRAMS/i10dbg/bin/read_soil_depth_mod.mod +BRAMS/i10dbg/bin/read_soil_moist_temp_mod.mod +BRAMS/i10dbg/bin/read_sources_teb_mod.mod +BRAMS/i10dbg/bin/rearrange_mod.mod +BRAMS/i10dbg/bin/recycle_mod.mod +BRAMS/i10dbg/bin/refs1d_mod.mod +BRAMS/i10dbg/bin/refs3d_mod.mod +BRAMS/i10dbg/bin/ref_sounding.mod +BRAMS/i10dbg/bin/relms_mod.mod +BRAMS/i10dbg/bin/reord_mod.mod +BRAMS/i10dbg/bin/reorganize_sources_teb_mod.mod +BRAMS/i10dbg/bin/reproduction_eq_0_mod.mod +BRAMS/i10dbg/bin/reproduction_mod.mod +BRAMS/i10dbg/bin/reset_mod.mod +BRAMS/i10dbg/bin/resp_f_decomp_mod.mod +BRAMS/i10dbg/bin/resp_rh_mod.mod +BRAMS/i10dbg/bin/rgbhls_mod.mod +BRAMS/i10dbg/bin/rk4_coms.mod +BRAMS/i10dbg/bin/rk4_driver.mod +BRAMS/i10dbg/bin/rk4_stepper.mod +BRAMS/i10dbg/bin/road_wall_layer_e_budget_mod.mod +BRAMS/i10dbg/bin/roof_layer_e_budget_mod.mod +BRAMS/i10dbg/bin/root_resp_norm_mod.mod +BRAMS/i10dbg/bin/rotate_winds_mod.mod +BRAMS/i10dbg/bin/rotate_winds_obs_mod.mod +BRAMS/i10dbg/bin/rowcolmn_mod.mod +BRAMS/i10dbg/bin/rpara.mod +BRAMS/i10dbg/bin/rr_sfc_obs_mod.mod +BRAMS/i10dbg/bin/rr_sfc_ver_mod.mod +BRAMS/i10dbg/bin/rr_upa_obs_mod.mod +BRAMS/i10dbg/bin/rr_upa_ver_mod.mod +BRAMS/i10dbg/bin/rtgintrp_isan_mod.mod +BRAMS/i10dbg/bin/rtgintrp_mod.mod +BRAMS/i10dbg/bin/satadjst_mod.mod +BRAMS/i10dbg/bin/scale_ed_radiation_mod.mod +BRAMS/i10dbg/bin/scl_advectc_plumerise_mod.mod +BRAMS/i10dbg/bin/scl_misc_mod.mod +BRAMS/i10dbg/bin/sedim_mod.mod +BRAMS/i10dbg/bin/sedim_particles_mod.mod +BRAMS/i10dbg/bin/seed_dispersal_mod.mod +BRAMS/i10dbg/bin/selective_gaussian_2body_mod.mod +BRAMS/i10dbg/bin/seter_mod.mod +BRAMS/i10dbg/bin/set_flam_vert_mod.mod +BRAMS/i10dbg/bin/set_grid_mod.mod +BRAMS/i10dbg/bin/setgv_mod.mod +BRAMS/i10dbg/bin/setlapseparms_mod.mod +BRAMS/i10dbg/bin/set_mod.mod +BRAMS/i10dbg/bin/set_polygon_coordinates_edcp_mod.mod +BRAMS/i10dbg/bin/set_polygon_coordinates_mod.mod +BRAMS/i10dbg/bin/set_site_defprops_mod.mod +BRAMS/i10dbg/bin/setusv_mod.mod +BRAMS/i10dbg/bin/sfc_check_mod.mod +BRAMS/i10dbg/bin/sfc_data_convert_mod.mod +BRAMS/i10dbg/bin/sfcdata_ed_mod.mod +BRAMS/i10dbg/bin/sfcdata_mod.mod +BRAMS/i10dbg/bin/sfc_fields_adap_mod.mod +BRAMS/i10dbg/bin/sfc_fields_mod.mod +BRAMS/i10dbg/bin/sfcinit_file_mod.mod +BRAMS/i10dbg/bin/sfcinit_file_user_mod.mod +BRAMS/i10dbg/bin/sfcinit_hstart_mod.mod +BRAMS/i10dbg/bin/sfcinit_nofile_mod.mod +BRAMS/i10dbg/bin/sfcinit_nofile_user_mod.mod +BRAMS/i10dbg/bin/sfc_obs_convert_mod.mod +BRAMS/i10dbg/bin/sfcopqr_mod.mod +BRAMS/i10dbg/bin/sfc_pcp_mod.mod +BRAMS/i10dbg/bin/sfcproc_mod.mod +BRAMS/i10dbg/bin/sfcprt_mod.mod +BRAMS/i10dbg/bin/sfcqual_mod.mod +BRAMS/i10dbg/bin/sfcrad_ed_mod.mod +BRAMS/i10dbg/bin/sfc_read_mod.mod +BRAMS/i10dbg/bin/sfc_write_mod.mod +BRAMS/i10dbg/bin/sflush_mod.mod +BRAMS/i10dbg/bin/sfseti_mod.mod +BRAMS/i10dbg/bin/sfsgfa_mod.mod +BRAMS/i10dbg/bin/sh2mod_mod.mod +BRAMS/i10dbg/bin/shcu_env_mod.mod +BRAMS/i10dbg/bin/shcupar_mod.mod +BRAMS/i10dbg/bin/shcu_vars_const.mod +BRAMS/i10dbg/bin/short2diff_sib_mod.mod +BRAMS/i10dbg/bin/short_bdown_weissnorman_mod.mod +BRAMS/i10dbg/bin/shradc_mod.mod +BRAMS/i10dbg/bin/shradp_mod.mod +BRAMS/i10dbg/bin/sh_rates_mod.mod +BRAMS/i10dbg/bin/sigzio_mod.mod +BRAMS/i10dbg/bin/simple_lake_model_mod.mod +BRAMS/i10dbg/bin/sndproc_mod.mod +BRAMS/i10dbg/bin/sngloff_mod.mod +BRAMS/i10dbg/bin/snowinit_mod.mod +BRAMS/i10dbg/bin/soil_coms.mod +BRAMS/i10dbg/bin/soil_default_fill_mod.mod +BRAMS/i10dbg/bin/soil_idx2water_mod.mod +BRAMS/i10dbg/bin/soil_moisture_init_mod.mod +BRAMS/i10dbg/bin/soil_respiration_mod.mod +BRAMS/i10dbg/bin/solar_radiation_breakdown_mod.mod +BRAMS/i10dbg/bin/sort3_mod.mod +BRAMS/i10dbg/bin/sort_down_mod.mod +BRAMS/i10dbg/bin/sort_up_mod.mod +BRAMS/i10dbg/bin/soundtopo_mod.mod +BRAMS/i10dbg/bin/sources_teb_mod.mod +BRAMS/i10dbg/bin/souza_cupar_driver_mod.mod +BRAMS/i10dbg/bin/spline1_mod.mod +BRAMS/i10dbg/bin/spline2_mod.mod +BRAMS/i10dbg/bin/sst_check_header_mod.mod +BRAMS/i10dbg/bin/sst_file_inv_mod.mod +BRAMS/i10dbg/bin/sstinit_mod.mod +BRAMS/i10dbg/bin/sstinit_user_mod.mod +BRAMS/i10dbg/bin/sstnest_mod.mod +BRAMS/i10dbg/bin/sst_read_dataheader_mod.mod +BRAMS/i10dbg/bin/sst_read_mod.mod +BRAMS/i10dbg/bin/sst_read_new_mod.mod +BRAMS/i10dbg/bin/sst_update_mod.mod +BRAMS/i10dbg/bin/sst_write_mod.mod +BRAMS/i10dbg/bin/ssum_mod.mod +BRAMS/i10dbg/bin/stable_mod.mod +BRAMS/i10dbg/bin/stainterp_mod.mod +BRAMS/i10dbg/bin/staprt_mod.mod +BRAMS/i10dbg/bin/stline_mod.mod +BRAMS/i10dbg/bin/storage_theta_mod.mod +BRAMS/i10dbg/bin/strain_adap_mod.mod +BRAMS/i10dbg/bin/strain_mod.mod +BRAMS/i10dbg/bin/strmfun_mod.mod +BRAMS/i10dbg/bin/strmln_mod.mod +BRAMS/i10dbg/bin/structural_growth_eq_0_mod.mod +BRAMS/i10dbg/bin/structural_growth_mod.mod +BRAMS/i10dbg/bin/sublimate_mod.mod +BRAMS/i10dbg/bin/sumn_mod.mod +BRAMS/i10dbg/bin/sunavg_mod.mod +BRAMS/i10dbg/bin/surface_aero_cond_mod.mod +BRAMS/i10dbg/bin/surface_cd_mod.mod +BRAMS/i10dbg/bin/surface_ri_mod.mod +BRAMS/i10dbg/bin/swap32_mod.mod +BRAMS/i10dbg/bin/sw_multiple_scatter_mod.mod +BRAMS/i10dbg/bin/sw_twostream_clump_mod.mod +BRAMS/i10dbg/bin/sxy_mod.mod +BRAMS/i10dbg/bin/tabhab_mod.mod +BRAMS/i10dbg/bin/tabmelt_mod.mod +BRAMS/i10dbg/bin/tebc_init_mod.mod +BRAMS/i10dbg/bin/teb_init_mod.mod +BRAMS/i10dbg/bin/teb_spm_start.mod +BRAMS/i10dbg/bin/teb_vars_const.mod +BRAMS/i10dbg/bin/tend0_mod.mod +BRAMS/i10dbg/bin/tend0_plumerise_mod.mod +BRAMS/i10dbg/bin/tend_accum_mod.mod +BRAMS/i10dbg/bin/tendgas_mod.mod +BRAMS/i10dbg/bin/test_mod.mod +BRAMS/i10dbg/bin/therm_lib8.mod +BRAMS/i10dbg/bin/therm_lib.mod +BRAMS/i10dbg/bin/thermo_boundary_driver_mod.mod +BRAMS/i10dbg/bin/thermo_mod.mod +BRAMS/i10dbg/bin/timestep_mod.mod +BRAMS/i10dbg/bin/timing_mod.mod +BRAMS/i10dbg/bin/tkeeps_mod.mod +BRAMS/i10dbg/bin/tkeinit_mod.mod +BRAMS/i10dbg/bin/tkemy_mod.mod +BRAMS/i10dbg/bin/tkescl_mod.mod +BRAMS/i10dbg/bin/tokenize1_mod.mod +BRAMS/i10dbg/bin/tokenize_mod.mod +BRAMS/i10dbg/bin/tokfind_mod.mod +BRAMS/i10dbg/bin/tolower_mod.mod +BRAMS/i10dbg/bin/top_check_mod.mod +BRAMS/i10dbg/bin/topobnd_mod.mod +BRAMS/i10dbg/bin/topoq_mod.mod +BRAMS/i10dbg/bin/toposmooth_mod.mod +BRAMS/i10dbg/bin/top_read_mod.mod +BRAMS/i10dbg/bin/topset_mod.mod +BRAMS/i10dbg/bin/toptinit_mod.mod +BRAMS/i10dbg/bin/toptinit_user_mod.mod +BRAMS/i10dbg/bin/toptnest_mod.mod +BRAMS/i10dbg/bin/toptsmth_mod.mod +BRAMS/i10dbg/bin/top_write_mod.mod +BRAMS/i10dbg/bin/trans_conv_mflx_mod.mod +BRAMS/i10dbg/bin/transfer_ed2leaf_mod.mod +BRAMS/i10dbg/bin/transfm_mod.mod +BRAMS/i10dbg/bin/tricheck_mod.mod +BRAMS/i10dbg/bin/trid2_mod.mod +BRAMS/i10dbg/bin/tridiff1_adap_mod.mod +BRAMS/i10dbg/bin/tridiff1_mod.mod +BRAMS/i10dbg/bin/tridiff2_mod.mod +BRAMS/i10dbg/bin/tridiff2orig_mod.mod +BRAMS/i10dbg/bin/trid_mod.mod +BRAMS/i10dbg/bin/tri_intp_cofs_mod.mod +BRAMS/i10dbg/bin/trncl1_mod.mod +BRAMS/i10dbg/bin/trncl2_mod.mod +BRAMS/i10dbg/bin/trsets_mod.mod +BRAMS/i10dbg/bin/trtend_mod.mod +BRAMS/i10dbg/bin/trueps60_ps_mod.mod +BRAMS/i10dbg/bin/trueps60_ps_rot_mod.mod +BRAMS/i10dbg/bin/trueps60_uevetouv_mod.mod +BRAMS/i10dbg/bin/trueps60_uvtoueve_mod.mod +BRAMS/i10dbg/bin/truhor_mod.mod +BRAMS/i10dbg/bin/truhor_opt_mod.mod +BRAMS/i10dbg/bin/turb_coms.mod +BRAMS/i10dbg/bin/uevetouv_mod.mod +BRAMS/i10dbg/bin/ugetarg_mod.mod +BRAMS/i10dbg/bin/unarrange_mod.mod +BRAMS/i10dbg/bin/unfdbackp_fixed_mod.mod +BRAMS/i10dbg/bin/unfdbackp_mod.mod +BRAMS/i10dbg/bin/unfpack1_mod.mod +BRAMS/i10dbg/bin/unfpack_mod.mod +BRAMS/i10dbg/bin/unmkbuff_mod.mod +BRAMS/i10dbg/bin/upa_get_profile_mod.mod +BRAMS/i10dbg/bin/upa_interp_mod.mod +BRAMS/i10dbg/bin/update_c_and_n_pools_mod.mod +BRAMS/i10dbg/bin/update_cohort_extensive_props_mod.mod +BRAMS/i10dbg/bin/update_derived_cohort_props_mod.mod +BRAMS/i10dbg/bin/update_derived_props_mod.mod +BRAMS/i10dbg/bin/update_diagnostic_vars_mod.mod +BRAMS/i10dbg/bin/update_ed_yearly_vars_mod.mod +BRAMS/i10dbg/bin/updatehydroparms_mod.mod +BRAMS/i10dbg/bin/update_model_time_dm_mod.mod +BRAMS/i10dbg/bin/update_mod.mod +BRAMS/i10dbg/bin/update_patch_derived_props_mod.mod +BRAMS/i10dbg/bin/update_patch_thermo_fmean_mod.mod +BRAMS/i10dbg/bin/update_patch_thermo_props_mod.mod +BRAMS/i10dbg/bin/update_phenology_eq_0_mod.mod +BRAMS/i10dbg/bin/update_phenology_mod.mod +BRAMS/i10dbg/bin/update_plumerise_mod.mod +BRAMS/i10dbg/bin/update_polygon_derived_props_mod.mod +BRAMS/i10dbg/bin/update_psibar_mod.mod +BRAMS/i10dbg/bin/update_rad_avg_mod.mod +BRAMS/i10dbg/bin/update_site_derived_props_mod.mod +BRAMS/i10dbg/bin/update_thermo_mod.mod +BRAMS/i10dbg/bin/update_vital_rates_mod.mod +BRAMS/i10dbg/bin/updatewatertableadd_mod.mod +BRAMS/i10dbg/bin/updatewatertablebaseflow_mod.mod +BRAMS/i10dbg/bin/updatewatertablesubtract_mod.mod +BRAMS/i10dbg/bin/update_workload_mod.mod +BRAMS/i10dbg/bin/urban_canopy_mod.mod +BRAMS/i10dbg/bin/urban_drag_mod.mod +BRAMS/i10dbg/bin/urban_hydro_mod.mod +BRAMS/i10dbg/bin/urban_lw_coef_mod.mod +BRAMS/i10dbg/bin/urban_mod.mod +BRAMS/i10dbg/bin/urban_solar_abs_mod.mod +BRAMS/i10dbg/bin/urb_drag_init_mod.mod +BRAMS/i10dbg/bin/urb_tend_mod.mod +BRAMS/i10dbg/bin/uvlc_uvll_mod.mod +BRAMS/i10dbg/bin/uvll_uvlc_mod.mod +BRAMS/i10dbg/bin/uvtoueve_mod.mod +BRAMS/i10dbg/bin/uwc_mod.mod +BRAMS/i10dbg/bin/uwcomp_mod.mod +BRAMS/i10dbg/bin/valugp_mod.mod +BRAMS/i10dbg/bin/vapdiff_mod.mod +BRAMS/i10dbg/bin/vapflux_mod.mod +BRAMS/i10dbg/bin/vapthrm_mod.mod +BRAMS/i10dbg/bin/varf_adap_mod.mod +BRAMS/i10dbg/bin/varf_file_inv_mod.mod +BRAMS/i10dbg/bin/varfile_nstfeed_mod.mod +BRAMS/i10dbg/bin/varfile_refstate_mod.mod +BRAMS/i10dbg/bin/varf_read_mod.mod +BRAMS/i10dbg/bin/varf_update_mod.mod +BRAMS/i10dbg/bin/varref_mod.mod +BRAMS/i10dbg/bin/var_tables.mod +BRAMS/i10dbg/bin/varuv_mod.mod +BRAMS/i10dbg/bin/varweight_mod.mod +BRAMS/i10dbg/bin/vcirec_mod.mod +BRAMS/i10dbg/bin/vcorec_mod.mod +BRAMS/i10dbg/bin/vctran_mod.mod +BRAMS/i10dbg/bin/vector_mod.mod +BRAMS/i10dbg/bin/vegetation_dynamics_eq_0_mod.mod +BRAMS/i10dbg/bin/vegetation_dynamics_mod.mod +BRAMS/i10dbg/bin/vegndvi_mod.mod +BRAMS/i10dbg/bin/vel_advectc_adap_mod.mod +BRAMS/i10dbg/bin/vel_advectc_mod.mod +BRAMS/i10dbg/bin/vel_advectc_plumerise_mod.mod +BRAMS/i10dbg/bin/velvct_mod.mod +BRAMS/i10dbg/bin/vertmap2_mod.mod +BRAMS/i10dbg/bin/vfinit_mod.mod +BRAMS/i10dbg/bin/vfintrpf_mod.mod +BRAMS/i10dbg/bin/vfirec_mod.mod +BRAMS/i10dbg/bin/vforec_mod.mod +BRAMS/i10dbg/bin/viirec_mod.mod +BRAMS/i10dbg/bin/viorec_mod.mod +BRAMS/i10dbg/bin/visc_w_mod.mod +BRAMS/i10dbg/bin/visurf_mod.mod +BRAMS/i10dbg/bin/vmissr_mod.mod +BRAMS/i10dbg/bin/vmissw_mod.mod +BRAMS/i10dbg/bin/vpsets_mod.mod +BRAMS/i10dbg/bin/vshyd_mod.mod +BRAMS/i10dbg/bin/vtables2_mod.mod +BRAMS/i10dbg/bin/vtables_scalar_mod.mod +BRAMS/i10dbg/bin/vtables_scalar_new_mod.mod +BRAMS/i10dbg/bin/vterpp_i_mod.mod +BRAMS/i10dbg/bin/vterpp_s_mod.mod +BRAMS/i10dbg/bin/vwrti_mod.mod +BRAMS/i10dbg/bin/vwrt_mod.mod +BRAMS/i10dbg/bin/w3fb06_mod.mod +BRAMS/i10dbg/bin/w3fb07_mod.mod +BRAMS/i10dbg/bin/walltime_mod.mod +BRAMS/i10dbg/bin/warning_mod.mod +BRAMS/i10dbg/bin/waterbal_mod.mod +BRAMS/i10dbg/bin/wetthrm3_mod.mod +BRAMS/i10dbg/bin/winddf_mod.mod +BRAMS/i10dbg/bin/winduv_mod.mod +BRAMS/i10dbg/bin/writebin_mod.mod +BRAMS/i10dbg/bin/write_ed_xml_config_mod.mod +BRAMS/i10dbg/bin/writehydro_mod.mod +BRAMS/i10dbg/bin/w_shallow_mod.mod +BRAMS/i10dbg/bin/wtstr_mod.mod +BRAMS/i10dbg/bin/x02_mod.mod +BRAMS/i10dbg/bin/xcol2array_mod.mod +BRAMS/i10dbg/bin/xj_mod.mod +BRAMS/i10dbg/bin/xy_ij_mod.mod +BRAMS/i10dbg/bin/xy_ll_mod.mod +BRAMS/i10dbg/bin/ycol2array_mod.mod +BRAMS/i10dbg/bin/yesterday_info_mod.mod +BRAMS/i10dbg/bin/yesterday_mod.mod +BRAMS/i10dbg/bin/zcol2array_mod.mod +BRAMS/i10dbg/bin/ze_dims_mod.mod +BRAMS/i10dbg/bin/zen_mod.mod +BRAMS/i10dbg/bin/zeragas_mod.mod +BRAMS/i10dbg/bin/zero_ed_dmean_vars_mod.mod +BRAMS/i10dbg/bin/zero_ed_fmean_vars_mod.mod +BRAMS/i10dbg/bin/zero_ed_mmean_vars_mod.mod +BRAMS/i10dbg/bin/zero_ed_qmean_vars_mod.mod +BRAMS/i10dbg/bin/zero_ed_today_vars_mod.mod +BRAMS/i10dbg/bin/zero_ed_yearly_vars_mod.mod +BRAMS/i10dbg/bin/zeroout_mod.mod +BRAMS/i10dbg/bin/zoq_mod.mod +BRAMS/i10dbg/bin/a3e0_mod.f90 +BRAMS/i10dbg/bin/a3e1_mod.f90 +BRAMS/i10dbg/bin/a3e2_mod.f90 +BRAMS/i10dbg/bin/abort_run_mod.f90 +BRAMS/i10dbg/bin/acctimes_mod.f90 +BRAMS/i10dbg/bin/accum_mod.f90 +BRAMS/i10dbg/bin/acnst_mod.f90 +BRAMS/i10dbg/bin/acoust_adap_mod.f90 +BRAMS/i10dbg/bin/acoustic_new_mod.f90 +BRAMS/i10dbg/bin/acoust_new_mod.f90 +BRAMS/i10dbg/bin/adap_bldg_mod.f90 +BRAMS/i10dbg/bin/adap_init.f90 +BRAMS/i10dbg/bin/adivb_mod.f90 +BRAMS/i10dbg/bin/adj1_mod.f90 +BRAMS/i10dbg/bin/adjust_sfcw_properties_mod.f90 +BRAMS/i10dbg/bin/adjust_topsoil_properties_mod.f90 +BRAMS/i10dbg/bin/adjust_veg_properties_mod.f90 +BRAMS/i10dbg/bin/advectc_mod.f90 +BRAMS/i10dbg/bin/advected_mod.f90 +BRAMS/i10dbg/bin/advect_sca_mod.f90 +BRAMS/i10dbg/bin/advect_theta_mod.f90 +BRAMS/i10dbg/bin/advect_vec_mod.f90 +BRAMS/i10dbg/bin/advtndc_adap_mod.f90 +BRAMS/i10dbg/bin/advtndc_mod.f90 +BRAMS/i10dbg/bin/advtndc_plumerise_mod.f90 +BRAMS/i10dbg/bin/ae0_mod.f90 +BRAMS/i10dbg/bin/ae1m1_mod.f90 +BRAMS/i10dbg/bin/ae1_mod.f90 +BRAMS/i10dbg/bin/ae1p1_mod.f90 +BRAMS/i10dbg/bin/ae1p1p1_mod.f90 +BRAMS/i10dbg/bin/ae1t0_mod.f90 +BRAMS/i10dbg/bin/ae1t0p1_mod.f90 +BRAMS/i10dbg/bin/ae1t1_mod.f90 +BRAMS/i10dbg/bin/ae1t1p1_mod.f90 +BRAMS/i10dbg/bin/ae1tn1_mod.f90 +BRAMS/i10dbg/bin/ae2_mod.f90 +BRAMS/i10dbg/bin/ae3m3d0_mod.f90 +BRAMS/i10dbg/bin/ae3m3_mod.f90 +BRAMS/i10dbg/bin/ae3_mod.f90 +BRAMS/i10dbg/bin/ae3p3_mod.f90 +BRAMS/i10dbg/bin/ae3t0p3_mod.f90 +BRAMS/i10dbg/bin/ae3t3_mod.f90 +BRAMS/i10dbg/bin/ae3t3p3_mod.f90 +BRAMS/i10dbg/bin/aen1_mod.f90 +BRAMS/i10dbg/bin/aen3t0p3_mod.f90 +BRAMS/i10dbg/bin/aggregate_polygon_fmean_mod.f90 +BRAMS/i10dbg/bin/akscal_init_mod.f90 +BRAMS/i10dbg/bin/alebl_mod.f90 +BRAMS/i10dbg/bin/alloc_edcp_driver_mod.f90 +BRAMS/i10dbg/bin/allometry.f90 +BRAMS/i10dbg/bin/alt_dia_mod.f90 +BRAMS/i10dbg/bin/altera_dia.f90 +BRAMS/i10dbg/bin/aminmax_mod.f90 +BRAMS/i10dbg/bin/angle_of_incid_mod.f90 +BRAMS/i10dbg/bin/an_header.f90 +BRAMS/i10dbg/bin/anlavg_mod.f90 +BRAMS/i10dbg/bin/anlhdf_mod.f90 +BRAMS/i10dbg/bin/anlwrt_mod.f90 +BRAMS/i10dbg/bin/aobj.f90 +BRAMS/i10dbg/bin/aone_mod.f90 +BRAMS/i10dbg/bin/api_prlatlon_mod.f90 +BRAMS/i10dbg/bin/apply_cloud_forcing_mod.f90 +BRAMS/i10dbg/bin/apply_drydep_mod.f90 +BRAMS/i10dbg/bin/apply_forestry_mod.f90 +BRAMS/i10dbg/bin/arinam_mod.f90 +BRAMS/i10dbg/bin/array2xcol_mod.f90 +BRAMS/i10dbg/bin/array2ycol_mod.f90 +BRAMS/i10dbg/bin/array2zcol_mod.f90 +BRAMS/i10dbg/bin/arrsnd_mod.f90 +BRAMS/i10dbg/bin/arscam_mod.f90 +BRAMS/i10dbg/bin/asgen.f90 +BRAMS/i10dbg/bin/assign_prescribed_phen_mod.f90 +BRAMS/i10dbg/bin/asti2.f90 +BRAMS/i10dbg/bin/asti.f90 +BRAMS/i10dbg/bin/astp.f90 +BRAMS/i10dbg/bin/atimb_mod.f90 +BRAMS/i10dbg/bin/atob_log_mod.f90 +BRAMS/i10dbg/bin/atob_mod.f90 +BRAMS/i10dbg/bin/auto_accret_mod.f90 +BRAMS/i10dbg/bin/avarf.f90 +BRAMS/i10dbg/bin/average_mod.f90 +BRAMS/i10dbg/bin/average_utils.f90 +BRAMS/i10dbg/bin/avgvel_mod.f90 +BRAMS/i10dbg/bin/avint_mod.f90 +BRAMS/i10dbg/bin/awtcmp_mod.f90 +BRAMS/i10dbg/bin/azero_mod.f90 +BRAMS/i10dbg/bin/banbks_mod.f90 +BRAMS/i10dbg/bin/bandec_mod.f90 +BRAMS/i10dbg/bin/bdf2_solver.f90 +BRAMS/i10dbg/bin/bdf2_solver_mod.f90 +BRAMS/i10dbg/bin/binom_mod.f90 +BRAMS/i10dbg/bin/bld_e_budget_mod.f90 +BRAMS/i10dbg/bin/bn_parm_mod.f90 +BRAMS/i10dbg/bin/bn_pass_mod.f90 +BRAMS/i10dbg/bin/bn_qual_mod.f90 +BRAMS/i10dbg/bin/botset_adap_mod.f90 +BRAMS/i10dbg/bin/botset_mod.f90 +BRAMS/i10dbg/bin/boyanc_mod.f90 +BRAMS/i10dbg/bin/brams_fail_whale_mod.f90 +BRAMS/i10dbg/bin/bruvais_mod.f90 +BRAMS/i10dbg/bin/bubble_mod.f90 +BRAMS/i10dbg/bin/budget_utils.f90 +BRAMS/i10dbg/bin/buoyancy_acc_mod.f90 +BRAMS/i10dbg/bin/buoyancy_mod.f90 +BRAMS/i10dbg/bin/buoyancy_plumerise_mod.f90 +BRAMS/i10dbg/bin/c34constants.f90 +BRAMS/i10dbg/bin/calc_flow_routing_mod.f90 +BRAMS/i10dbg/bin/calchydrosubsurface_mod.f90 +BRAMS/i10dbg/bin/calchydrosurface_mod.f90 +BRAMS/i10dbg/bin/calc_met_lapse_mod.f90 +BRAMS/i10dbg/bin/calcwatertable_mod.f90 +BRAMS/i10dbg/bin/canopy_air_coms.f90 +BRAMS/i10dbg/bin/canopy_derivs_two_mod.f90 +BRAMS/i10dbg/bin/canopy_photosynthesis_mod.f90 +BRAMS/i10dbg/bin/canopy_radiation_coms.f90 +BRAMS/i10dbg/bin/canopy_struct_dynamics.f90 +BRAMS/i10dbg/bin/catt_start.f90 +BRAMS/i10dbg/bin/cbrt8_mod.f90 +BRAMS/i10dbg/bin/cbrt_mod.f90 +BRAMS/i10dbg/bin/cdf2normal_mod.f90 +BRAMS/i10dbg/bin/cdf_mod.f90 +BRAMS/i10dbg/bin/cfact_mod.f90 +BRAMS/i10dbg/bin/cfll_mod.f90 +BRAMS/i10dbg/bin/cfl_mod.f90 +BRAMS/i10dbg/bin/cfux_mod.f90 +BRAMS/i10dbg/bin/cfuy_mod.f90 +BRAMS/i10dbg/bin/char_strip_var_mod.f90 +BRAMS/i10dbg/bin/charutils.f90 +BRAMS/i10dbg/bin/check_real_mod.f90 +BRAMS/i10dbg/bin/check_rescale_mod.f90 +BRAMS/i10dbg/bin/chemistry_mod.f90 +BRAMS/i10dbg/bin/chkcyc_mod.f90 +BRAMS/i10dbg/bin/cio_c_mod.f90 +BRAMS/i10dbg/bin/cio_c_sca_mod.f90 +BRAMS/i10dbg/bin/cio_f8_mod.f90 +BRAMS/i10dbg/bin/cio_f8_sca_mod.f90 +BRAMS/i10dbg/bin/cio_f_mod.f90 +BRAMS/i10dbg/bin/cio_f_sca_mod.f90 +BRAMS/i10dbg/bin/cio_i_mod.f90 +BRAMS/i10dbg/bin/cio_i_sca_mod.f90 +BRAMS/i10dbg/bin/cio_pos_file_mod.f90 +BRAMS/i10dbg/bin/cldnuc_mod.f90 +BRAMS/i10dbg/bin/clgen_mod.f90 +BRAMS/i10dbg/bin/cloud_opt_mod.f90 +BRAMS/i10dbg/bin/cloudprep_rad_mod.f90 +BRAMS/i10dbg/bin/cloud_sketch_mod.f90 +BRAMS/i10dbg/bin/clsgks_mod.f90 +BRAMS/i10dbg/bin/cl_top_mod.f90 +BRAMS/i10dbg/bin/coarse2fine_driver_mod.f90 +BRAMS/i10dbg/bin/coarse2fine_mod.f90 +BRAMS/i10dbg/bin/coefz_adap_mod.f90 +BRAMS/i10dbg/bin/coefz_mod.f90 +BRAMS/i10dbg/bin/cofnest_mod.f90 +BRAMS/i10dbg/bin/col1_mod.f90 +BRAMS/i10dbg/bin/col2_mod.f90 +BRAMS/i10dbg/bin/col3344_mod.f90 +BRAMS/i10dbg/bin/col3443_mod.f90 +BRAMS/i10dbg/bin/col3_mod.f90 +BRAMS/i10dbg/bin/cols_mod.f90 +BRAMS/i10dbg/bin/colxfers_mod.f90 +BRAMS/i10dbg/bin/commio_mod.f90 +BRAMS/i10dbg/bin/comm_time_mod.f90 +BRAMS/i10dbg/bin/comm_time_new_mod.f90 +BRAMS/i10dbg/bin/comp_avgu_mod.f90 +BRAMS/i10dbg/bin/comp_avgv_mod.f90 +BRAMS/i10dbg/bin/comp_press_mod.f90 +BRAMS/i10dbg/bin/comp_rhfrac_mod.f90 +BRAMS/i10dbg/bin/compute_c_and_n_storage_mod.f90 +BRAMS/i10dbg/bin/compute_mass_flux_mod.f90 +BRAMS/i10dbg/bin/cond_file_inv_mod.f90 +BRAMS/i10dbg/bin/cond_read.f90 +BRAMS/i10dbg/bin/cond_read_mod.f90 +BRAMS/i10dbg/bin/cond_update.f90 +BRAMS/i10dbg/bin/cond_update_mod.f90 +BRAMS/i10dbg/bin/conpar_mod.f90 +BRAMS/i10dbg/bin/conrec_mod.f90 +BRAMS/i10dbg/bin/contnuc_mod.f90 +BRAMS/i10dbg/bin/conv_coms.f90 +BRAMS/i10dbg/bin/convert_mod.f90 +BRAMS/i10dbg/bin/convert_to_misture_ratio_teb_mod.f90 +BRAMS/i10dbg/bin/conv_ppm_rm_mod.f90 +BRAMS/i10dbg/bin/copy_atm2lsm_mod.f90 +BRAMS/i10dbg/bin/copy_avgvars_to_leaf_mod.f90 +BRAMS/i10dbg/bin/copyback_mod.f90 +BRAMS/i10dbg/bin/copy_bdf2_prev_mod.f90 +BRAMS/i10dbg/bin/copy_fb_patch_mod.f90 +BRAMS/i10dbg/bin/copy_fluxes_future_2_past_mod.f90 +BRAMS/i10dbg/bin/copy_fluxes_lsm2atm_mod.f90 +BRAMS/i10dbg/bin/copy_in_bramsmpi_mod.f90 +BRAMS/i10dbg/bin/copy_in_bramsnl_mod.f90 +BRAMS/i10dbg/bin/copy_initp2prev_mod.f90 +BRAMS/i10dbg/bin/copy_lake_brams_mod.f90 +BRAMS/i10dbg/bin/copy_lake_init_mod.f90 +BRAMS/i10dbg/bin/copy_met_2_lake_mod.f90 +BRAMS/i10dbg/bin/copy_met_2_rk4site_mod.f90 +BRAMS/i10dbg/bin/copy_patch_init_carbon_mod.f90 +BRAMS/i10dbg/bin/copy_patch_init_mod.f90 +BRAMS/i10dbg/bin/copy_path_from_grid_1_mod.f90 +BRAMS/i10dbg/bin/copy_prev2patch_mod.f90 +BRAMS/i10dbg/bin/copy_rk4_patch_mod.f90 +BRAMS/i10dbg/bin/coriolis.f90 +BRAMS/i10dbg/bin/corlos_mod.f90 +BRAMS/i10dbg/bin/corlsu_mod.f90 +BRAMS/i10dbg/bin/corlsv_mod.f90 +BRAMS/i10dbg/bin/count_pft_xml_config_mod.f90 +BRAMS/i10dbg/bin/cp2mod_mod.f90 +BRAMS/i10dbg/bin/cpclam_mod.f90 +BRAMS/i10dbg/bin/cpcldr_mod.f90 +BRAMS/i10dbg/bin/cpcnrc_mod.f90 +BRAMS/i10dbg/bin/cpezct_mod.f90 +BRAMS/i10dbg/bin/cpgeti_mod.f90 +BRAMS/i10dbg/bin/cpgetr_mod.f90 +BRAMS/i10dbg/bin/cplbdr_mod.f90 +BRAMS/i10dbg/bin/cppkcl_mod.f90 +BRAMS/i10dbg/bin/cprect_mod.f90 +BRAMS/i10dbg/bin/cpsetc_mod.f90 +BRAMS/i10dbg/bin/cpseti_mod.f90 +BRAMS/i10dbg/bin/cpsetr_mod.f90 +BRAMS/i10dbg/bin/cputime_mod.f90 +BRAMS/i10dbg/bin/create_ed10_ed20_fname_mod.f90 +BRAMS/i10dbg/bin/csband_mod.f90 +BRAMS/i10dbg/bin/cscalei_mod.f90 +BRAMS/i10dbg/bin/cscale_mod.f90 +BRAMS/i10dbg/bin/ctrlvols_mod.f90 +BRAMS/i10dbg/bin/cu_environ_mod.f90 +BRAMS/i10dbg/bin/cu_file_inv_mod.f90 +BRAMS/i10dbg/bin/cu_inv_tend_mod.f90 +BRAMS/i10dbg/bin/cumsum_mod.f90 +BRAMS/i10dbg/bin/cumulus_time_mod.f90 +BRAMS/i10dbg/bin/cuparth_mod.f90 +BRAMS/i10dbg/bin/cuparth_shal_mod.f90 +BRAMS/i10dbg/bin/cup_dd_aa0_mod.f90 +BRAMS/i10dbg/bin/cup_dd_edt_mod.f90 +BRAMS/i10dbg/bin/cup_dd_he_mod.f90 +BRAMS/i10dbg/bin/cup_dd_moisture_mod.f90 +BRAMS/i10dbg/bin/cup_dd_nms_mod.f90 +BRAMS/i10dbg/bin/cup_dellabot_mod.f90 +BRAMS/i10dbg/bin/cup_dellas_mod.f90 +BRAMS/i10dbg/bin/cup_dellas_shallow_mod.f90 +BRAMS/i10dbg/bin/cup_direction2_mod.f90 +BRAMS/i10dbg/bin/cup_dn.f90 +BRAMS/i10dbg/bin/cup_enss_mod.f90 +BRAMS/i10dbg/bin/cup_enss_shal_mod.f90 +BRAMS/i10dbg/bin/cup_env_clev_mod.f90 +BRAMS/i10dbg/bin/cup_env.f90 +BRAMS/i10dbg/bin/cup_env_mod.f90 +BRAMS/i10dbg/bin/cup_forcing_ens_16_mod.f90 +BRAMS/i10dbg/bin/cup_forcing_ens_shal_mod.f90 +BRAMS/i10dbg/bin/cup_grell2.f90 +BRAMS/i10dbg/bin/cup_grell2_shcu.f90 +BRAMS/i10dbg/bin/cup_kbcon_cin_mod.f90 +BRAMS/i10dbg/bin/cup_kbcon_mod.f90 +BRAMS/i10dbg/bin/cup_ktop_mod.f90 +BRAMS/i10dbg/bin/cup_output_ens_mod.f90 +BRAMS/i10dbg/bin/cup_output_ens_shal_mod.f90 +BRAMS/i10dbg/bin/cup_up_aa0_mod.f90 +BRAMS/i10dbg/bin/cup_up.f90 +BRAMS/i10dbg/bin/cup_up_he_mod.f90 +BRAMS/i10dbg/bin/cup_up_moisture_mod.f90 +BRAMS/i10dbg/bin/cup_up_nms_mod.f90 +BRAMS/i10dbg/bin/cu_read.f90 +BRAMS/i10dbg/bin/cu_read_mod.f90 +BRAMS/i10dbg/bin/curved_mod.f90 +BRAMS/i10dbg/bin/curve_mod.f90 +BRAMS/i10dbg/bin/cu_update_mod.f90 +BRAMS/i10dbg/bin/cvmgm_mod.f90 +BRAMS/i10dbg/bin/cvmgn_mod.f90 +BRAMS/i10dbg/bin/cvmgp_mod.f90 +BRAMS/i10dbg/bin/cvmgz_mod.f90 +BRAMS/i10dbg/bin/cyclic_mod.f90 +BRAMS/i10dbg/bin/cyclic_set_mod.f90 +BRAMS/i10dbg/bin/damp_grav_wave_mod.f90 +BRAMS/i10dbg/bin/dashdb_mod.f90 +BRAMS/i10dbg/bin/dashdc_mod.f90 +BRAMS/i10dbg/bin/datassim_mod.f90 +BRAMS/i10dbg/bin/date_2_seconds_mod.f90 +BRAMS/i10dbg/bin/date_abs_secs2_mod.f90 +BRAMS/i10dbg/bin/date_abs_secs_mod.f90 +BRAMS/i10dbg/bin/date_add_to_big_mod.f90 +BRAMS/i10dbg/bin/date_add_to_mod.f90 +BRAMS/i10dbg/bin/date_make_big_mod.f90 +BRAMS/i10dbg/bin/date_secs_ymdt_mod.f90 +BRAMS/i10dbg/bin/date_unmake_big_mod.f90 +BRAMS/i10dbg/bin/dateutils.f90 +BRAMS/i10dbg/bin/dble2sngl_mod.f90 +BRAMS/i10dbg/bin/dcvmgm_mod.f90 +BRAMS/i10dbg/bin/dcvmgp_mod.f90 +BRAMS/i10dbg/bin/dcw_swap16_mod.f90 +BRAMS/i10dbg/bin/dcw_swap32_mod.f90 +BRAMS/i10dbg/bin/dcw_swap64_mod.f90 +BRAMS/i10dbg/bin/dealloc_all_mod.f90 +BRAMS/i10dbg/bin/dealloc.f90 +BRAMS/i10dbg/bin/deblank_mod.f90 +BRAMS/i10dbg/bin/decomp_coms.f90 +BRAMS/i10dbg/bin/decomp_plot_mod.f90 +BRAMS/i10dbg/bin/define_pbl_height_mod.f90 +BRAMS/i10dbg/bin/detab_mod.f90 +BRAMS/i10dbg/bin/detailed_coms.f90 +BRAMS/i10dbg/bin/diagon_mod.f90 +BRAMS/i10dbg/bin/diffprep_mod.f90 +BRAMS/i10dbg/bin/diffsclr_adap_mod.f90 +BRAMS/i10dbg/bin/diffsclr_brams31_mod.f90 +BRAMS/i10dbg/bin/diffsclr.f90 +BRAMS/i10dbg/bin/diffsclr_mod.f90 +BRAMS/i10dbg/bin/diffuse_brams31_mod.f90 +BRAMS/i10dbg/bin/diffuse.f90 +BRAMS/i10dbg/bin/diffuse_mod.f90 +BRAMS/i10dbg/bin/diffvel_adap_mod.f90 +BRAMS/i10dbg/bin/diffvel_mod.f90 +BRAMS/i10dbg/bin/dist_gc_mod.f90 +BRAMS/i10dbg/bin/disturbance.f90 +BRAMS/i10dbg/bin/disturb_coms.f90 +BRAMS/i10dbg/bin/divcart_mod.f90 +BRAMS/i10dbg/bin/divstar_mod.f90 +BRAMS/i10dbg/bin/dmax2_mod.f90 +BRAMS/i10dbg/bin/dmin2_mod.f90 +BRAMS/i10dbg/bin/dnswt2_mod.f90 +BRAMS/i10dbg/bin/domain_decomp.f90 +BRAMS/i10dbg/bin/dpstable_mod.f90 +BRAMS/i10dbg/bin/drwstr_mod.f90 +BRAMS/i10dbg/bin/drydep_driver_mod.f90 +BRAMS/i10dbg/bin/dry_dep.f90 +BRAMS/i10dbg/bin/dry_dep_gaseous_mod.f90 +BRAMS/i10dbg/bin/dry_dep_mod.f90 +BRAMS/i10dbg/bin/dry_dep_particles_mod.f90 +BRAMS/i10dbg/bin/drythrm_mod.f90 +BRAMS/i10dbg/bin/dssum_mod.f90 +BRAMS/i10dbg/bin/dtedint_mod.f90 +BRAMS/i10dbg/bin/dted_mod.f90 +BRAMS/i10dbg/bin/dum1_zero_mod.f90 +BRAMS/i10dbg/bin/dump_domain_decomposition_mod.f90 +BRAMS/i10dbg/bin/dump_dtset_mod.f90 +BRAMS/i10dbg/bin/dump_modsched_mod.f90 +BRAMS/i10dbg/bin/dump_radinfo_mod.f90 +BRAMS/i10dbg/bin/dumset_mod.f90 +BRAMS/i10dbg/bin/each_call_mod.f90 +BRAMS/i10dbg/bin/each_column_mod.f90 +BRAMS/i10dbg/bin/ed1_fileinfo_mod.f90 +BRAMS/i10dbg/bin/ed21_fileinfo_mod.f90 +BRAMS/i10dbg/bin/ed_bigleaf_init.f90 +BRAMS/i10dbg/bin/ed_bigleaf_init_mod.f90 +BRAMS/i10dbg/bin/ed_coup_driver_mod.f90 +BRAMS/i10dbg/bin/ed_coup_model_mod.f90 +BRAMS/i10dbg/bin/edcp_driver.f90 +BRAMS/i10dbg/bin/edcp_get_work_mod.f90 +BRAMS/i10dbg/bin/edcp_init.f90 +BRAMS/i10dbg/bin/edcp_lake_driver.f90 +BRAMS/i10dbg/bin/edcp_lake_misc.f90 +BRAMS/i10dbg/bin/edcp_lake_stepper.f90 +BRAMS/i10dbg/bin/edcp_load_namelist.f90 +BRAMS/i10dbg/bin/edcp_met.f90 +BRAMS/i10dbg/bin/edcp_met_init.f90 +BRAMS/i10dbg/bin/edcp_model.f90 +BRAMS/i10dbg/bin/edcp_mpiutils.f90 +BRAMS/i10dbg/bin/edcp_nodebounds_self_mod.f90 +BRAMS/i10dbg/bin/edcp_para_init.f90 +BRAMS/i10dbg/bin/edcp_parvec_work_mod.f90 +BRAMS/i10dbg/bin/ed_datp_datq_mod.f90 +BRAMS/i10dbg/bin/ed_datp_datsoil_mod.f90 +BRAMS/i10dbg/bin/ed_filelist_mod.f90 +BRAMS/i10dbg/bin/ed_grid.f90 +BRAMS/i10dbg/bin/ed_gridset_mod.f90 +BRAMS/i10dbg/bin/ed_init_atm_mod.f90 +BRAMS/i10dbg/bin/ed_init.f90 +BRAMS/i10dbg/bin/ed_init_radiation_mod.f90 +BRAMS/i10dbg/bin/edio.f90 +BRAMS/i10dbg/bin/ed_ll_xy_mod.f90 +BRAMS/i10dbg/bin/ed_mem_grid_dim_defs.f90 +BRAMS/i10dbg/bin/ed_misc_coms.f90 +BRAMS/i10dbg/bin/ed_nbg_init.f90 +BRAMS/i10dbg/bin/ed_newgrid_mod.f90 +BRAMS/i10dbg/bin/ed_node_coms.f90 +BRAMS/i10dbg/bin/ed_opspec_grid_mod.f90 +BRAMS/i10dbg/bin/ed_opspec_misc_mod.f90 +BRAMS/i10dbg/bin/ed_opspec_par_mod.f90 +BRAMS/i10dbg/bin/ed_opspec_times_mod.f90 +BRAMS/i10dbg/bin/ed_output_mod.f90 +BRAMS/i10dbg/bin/ed_para_coms.f90 +BRAMS/i10dbg/bin/ed_params.f90 +BRAMS/i10dbg/bin/ed_polarst_mod.f90 +BRAMS/i10dbg/bin/ed_print.f90 +BRAMS/i10dbg/bin/ed_read_ed10_20_history.f90 +BRAMS/i10dbg/bin/ed_state_vars.f90 +BRAMS/i10dbg/bin/ed_therm_lib.f90 +BRAMS/i10dbg/bin/ed_timestep_mod.f90 +BRAMS/i10dbg/bin/ed_type_init.f90 +BRAMS/i10dbg/bin/ed_var_tables.f90 +BRAMS/i10dbg/bin/ed_work_vars.f90 +BRAMS/i10dbg/bin/ed_xml_config.f90 +BRAMS/i10dbg/bin/ed_xy_ll_mod.f90 +BRAMS/i10dbg/bin/ed_zen_mod.f90 +BRAMS/i10dbg/bin/effxy_mod.f90 +BRAMS/i10dbg/bin/eifun8_mod.f90 +BRAMS/i10dbg/bin/eintp_mod.f90 +BRAMS/i10dbg/bin/elgs_mod.f90 +BRAMS/i10dbg/bin/emfactor_mod.f90 +BRAMS/i10dbg/bin/emissao_mod.f90 +BRAMS/i10dbg/bin/emission_source_map.f90 +BRAMS/i10dbg/bin/ename_coms.f90 +BRAMS/i10dbg/bin/encd_mod.f90 +BRAMS/i10dbg/bin/endian_mod.f90 +BRAMS/i10dbg/bin/enemb_mod.f90 +BRAMS/i10dbg/bin/eng_params_mod.f90 +BRAMS/i10dbg/bin/entrainment_mod.f90 +BRAMS/i10dbg/bin/errorfun_mod.f90 +BRAMS/i10dbg/bin/error_mess.f90 +BRAMS/i10dbg/bin/esat_l_mod.f90 +BRAMS/i10dbg/bin/esat_pr_mod.f90 +BRAMS/i10dbg/bin/euler_driver.f90 +BRAMS/i10dbg/bin/euler_integ_mod.f90 +BRAMS/i10dbg/bin/euler_timestep_mod.f90 +BRAMS/i10dbg/bin/evaporate_mod.f90 +BRAMS/i10dbg/bin/event_fertilize_mod.f90 +BRAMS/i10dbg/bin/event_fire_mod.f90 +BRAMS/i10dbg/bin/event_harvest_mod.f90 +BRAMS/i10dbg/bin/event_irrigate_mod.f90 +BRAMS/i10dbg/bin/event_planting_mod.f90 +BRAMS/i10dbg/bin/events.f90 +BRAMS/i10dbg/bin/event_till_mod.f90 +BRAMS/i10dbg/bin/ex_adv_buff_mod.f90 +BRAMS/i10dbg/bin/exadvlf_mod.f90 +BRAMS/i10dbg/bin/excondiv_mod.f90 +BRAMS/i10dbg/bin/ex_cyc_buff_mod.f90 +BRAMS/i10dbg/bin/exevolve_mod.f90 +BRAMS/i10dbg/bin/ex_full_buff_mod.f90 +BRAMS/i10dbg/bin/exhtend_ad_mod.f90 +BRAMS/i10dbg/bin/exhtend_st_mod.f90 +BRAMS/i10dbg/bin/ex_lbc_buff_mod.f90 +BRAMS/i10dbg/bin/expected_mod.f90 +BRAMS/i10dbg/bin/expmsq_mod.f90 +BRAMS/i10dbg/bin/ex_st_buff_mod.f90 +BRAMS/i10dbg/bin/exthvadv_mod.f90 +BRAMS/i10dbg/bin/extra.f90 +BRAMS/i10dbg/bin/ezcntr_mod.f90 +BRAMS/i10dbg/bin/fail_whale_mod.f90 +BRAMS/i10dbg/bin/fallpart_mod.f90 +BRAMS/i10dbg/bin/fa_preptc_adap_mod.f90 +BRAMS/i10dbg/bin/fa_preptc_mod.f90 +BRAMS/i10dbg/bin/farq_leuning.f90 +BRAMS/i10dbg/bin/fatal_error.f90 +BRAMS/i10dbg/bin/fatal_error_mod.f90 +BRAMS/i10dbg/bin/fa_xc_adap_mod.f90 +BRAMS/i10dbg/bin/fa_xc_mod.f90 +BRAMS/i10dbg/bin/fa_yc_adap_mod.f90 +BRAMS/i10dbg/bin/fa_yc_mod.f90 +BRAMS/i10dbg/bin/fa_zc_adap_mod.f90 +BRAMS/i10dbg/bin/fa_zc_mod.f90 +BRAMS/i10dbg/bin/fa_zc_plumerise_mod.f90 +BRAMS/i10dbg/bin/fb_dy_step_trunc_mod.f90 +BRAMS/i10dbg/bin/fb_sanity_check_mod.f90 +BRAMS/i10dbg/bin/fcorio_mod.f90 +BRAMS/i10dbg/bin/fdback_mod.f90 +BRAMS/i10dbg/bin/fdbackp_mod.f90 +BRAMS/i10dbg/bin/file_inv.f90 +BRAMS/i10dbg/bin/filesize4_mod.f90 +BRAMS/i10dbg/bin/fill_cyc_mod.f90 +BRAMS/i10dbg/bin/fill_datp_mod.f90 +BRAMS/i10dbg/bin/fill_dn0uv_mod.f90 +BRAMS/i10dbg/bin/fill_history_grid_m11_mod.f90 +BRAMS/i10dbg/bin/fill_history_grid_m12_mod.f90 +BRAMS/i10dbg/bin/fill_history_grid_mod.f90 +BRAMS/i10dbg/bin/fill_history_grid_p11dmean_mod.f90 +BRAMS/i10dbg/bin/fill_history_grid_p11mmean_mod.f90 +BRAMS/i10dbg/bin/fill_history_grid_p11_mod.f90 +BRAMS/i10dbg/bin/fill_history_grid_p12_mod.f90 +BRAMS/i10dbg/bin/fill_history_grid_p146_mod.f90 +BRAMS/i10dbg/bin/fill_history_grid_p19_mod.f90 +BRAMS/i10dbg/bin/fill_history_patch_mod.f90 +BRAMS/i10dbg/bin/fill_history_polygon_mod.f90 +BRAMS/i10dbg/bin/fill_history_site_mod.f90 +BRAMS/i10dbg/bin/fillscr_mod.f90 +BRAMS/i10dbg/bin/fill_site_precip_mod.f90 +BRAMS/i10dbg/bin/fill_thermovars_mod.f90 +BRAMS/i10dbg/bin/fill_thvlast_mod.f90 +BRAMS/i10dbg/bin/fill_toptuvm_mod.f90 +BRAMS/i10dbg/bin/fillvar_l_mod.f90 +BRAMS/i10dbg/bin/fillvar_mod.f90 +BRAMS/i10dbg/bin/find_actual_densities_mod.f90 +BRAMS/i10dbg/bin/find_avg_winds_mod.f90 +BRAMS/i10dbg/bin/find_closing_comment_mod.f90 +BRAMS/i10dbg/bin/find_frqsum_mod.f90 +BRAMS/i10dbg/bin/findgood_mod.f90 +BRAMS/i10dbg/bin/findgrid_mod.f90 +BRAMS/i10dbg/bin/findln_mod.f90 +BRAMS/i10dbg/bin/find_rank_mod.f90 +BRAMS/i10dbg/bin/findtime_mod.f90 +BRAMS/i10dbg/bin/find_walcek_densities_mod.f90 +BRAMS/i10dbg/bin/fire.f90 +BRAMS/i10dbg/bin/fire_frequency_mod.f90 +BRAMS/i10dbg/bin/first_rams.f90 +BRAMS/i10dbg/bin/first_rams_mod.f90 +BRAMS/i10dbg/bin/flag_stable_cohorts_mod.f90 +BRAMS/i10dbg/bin/fldinit_mod.f90 +BRAMS/i10dbg/bin/flds3d_adap_mod.f90 +BRAMS/i10dbg/bin/flds3d_mod.f90 +BRAMS/i10dbg/bin/flxlw_mod.f90 +BRAMS/i10dbg/bin/flxsw_mod.f90 +BRAMS/i10dbg/bin/fmdn0_isan_mod.f90 +BRAMS/i10dbg/bin/fmdn0_mod.f90 +BRAMS/i10dbg/bin/fmint2d_mod.f90 +BRAMS/i10dbg/bin/fmint3_mod.f90 +BRAMS/i10dbg/bin/fmint4_isan_mod.f90 +BRAMS/i10dbg/bin/fmint4_mod.f90 +BRAMS/i10dbg/bin/fmint5_mod.f90 +BRAMS/i10dbg/bin/fmpmove_mod.f90 +BRAMS/i10dbg/bin/fmpmoves_mod.f90 +BRAMS/i10dbg/bin/fmrefs1d_isan_mod.f90 +BRAMS/i10dbg/bin/fmrefs1d_mod.f90 +BRAMS/i10dbg/bin/fmrefs3d_isan_mod.f90 +BRAMS/i10dbg/bin/fmrefs3d_mod.f90 +BRAMS/i10dbg/bin/forestry.f90 +BRAMS/i10dbg/bin/frame_mod.f90 +BRAMS/i10dbg/bin/frstpt_mod.f90 +BRAMS/i10dbg/bin/fuse_fiss_utils.f90 +BRAMS/i10dbg/bin/fusion_fission_coms.f90 +BRAMS/i10dbg/bin/fuso_check_mod.f90 +BRAMS/i10dbg/bin/fusoinit_mod.f90 +BRAMS/i10dbg/bin/fusonest_mod.f90 +BRAMS/i10dbg/bin/fuso_read_mod.f90 +BRAMS/i10dbg/bin/fuso_write_mod.f90 +BRAMS/i10dbg/bin/gacwk_mod.f90 +BRAMS/i10dbg/bin/gammln_mod.f90 +BRAMS/i10dbg/bin/gam_mod.f90 +BRAMS/i10dbg/bin/gammp_mod.f90 +BRAMS/i10dbg/bin/gammq_mod.f90 +BRAMS/i10dbg/bin/gaspart.f90 +BRAMS/i10dbg/bin/gcf_mod.f90 +BRAMS/i10dbg/bin/gclks_mod.f90 +BRAMS/i10dbg/bin/gclrwk_mod.f90 +BRAMS/i10dbg/bin/gclwk_mod.f90 +BRAMS/i10dbg/bin/gdawk_mod.f90 +BRAMS/i10dbg/bin/gdtost2_mod.f90 +BRAMS/i10dbg/bin/gdtost_mod.f90 +BRAMS/i10dbg/bin/geodat.f90 +BRAMS/i10dbg/bin/geodat_mod.f90 +BRAMS/i10dbg/bin/geonest_file_mod.f90 +BRAMS/i10dbg/bin/geonest_nofile_mod.f90 +BRAMS/i10dbg/bin/gessdc_mod.f90 +BRAMS/i10dbg/bin/gesspn_mod.f90 +BRAMS/i10dbg/bin/getconfigint_mod.f90 +BRAMS/i10dbg/bin/getconfigreal_mod.f90 +BRAMS/i10dbg/bin/getconfigstring_mod.f90 +BRAMS/i10dbg/bin/get_convflx_mod.f90 +BRAMS/i10dbg/bin/get_dn01d_mod.f90 +BRAMS/i10dbg/bin/getdrag_mod.f90 +BRAMS/i10dbg/bin/get_env_condition_mod.f90 +BRAMS/i10dbg/bin/get_errmax_mod.f90 +BRAMS/i10dbg/bin/get_file_indices_mod.f90 +BRAMS/i10dbg/bin/get_fire_properties_mod.f90 +BRAMS/i10dbg/bin/geth5dims_mod.f90 +BRAMS/i10dbg/bin/getict_mod.f90 +BRAMS/i10dbg/bin/get_obs_value_mod.f90 +BRAMS/i10dbg/bin/get_press_mod.f90 +BRAMS/i10dbg/bin/get_sc_dn_mod.f90 +BRAMS/i10dbg/bin/get_sc_up_mod.f90 +BRAMS/i10dbg/bin/get_sc_up_wet_mod.f90 +BRAMS/i10dbg/bin/get_se_mod.f90 +BRAMS/i10dbg/bin/getset_mod.f90 +BRAMS/i10dbg/bin/get_stcum_detrain_mod.f90 +BRAMS/i10dbg/bin/get_stcum_mod.f90 +BRAMS/i10dbg/bin/get_triinds_mod.f90 +BRAMS/i10dbg/bin/get_upaobs_value_mod.f90 +BRAMS/i10dbg/bin/getusv_mod.f90 +BRAMS/i10dbg/bin/getvar.f90 +BRAMS/i10dbg/bin/get_wet_deposited_mass_mod.f90 +BRAMS/i10dbg/bin/get_yscal_mod.f90 +BRAMS/i10dbg/bin/get_zi_mod.f90 +BRAMS/i10dbg/bin/gfa_mod.f90 +BRAMS/i10dbg/bin/gflas1_mod.f90 +BRAMS/i10dbg/bin/gflas2_mod.f90 +BRAMS/i10dbg/bin/gflas3_mod.f90 +BRAMS/i10dbg/bin/glaciate_mod.f90 +BRAMS/i10dbg/bin/gopks_mod.f90 +BRAMS/i10dbg/bin/gopwk_mod.f90 +BRAMS/i10dbg/bin/gpl_mod.f90 +BRAMS/i10dbg/bin/gpm_mod.f90 +BRAMS/i10dbg/bin/gqasf_mod.f90 +BRAMS/i10dbg/bin/gqcntn_mod.f90 +BRAMS/i10dbg/bin/gqcr_mod.f90 +BRAMS/i10dbg/bin/gqnt_mod.f90 +BRAMS/i10dbg/bin/gqplci_mod.f90 +BRAMS/i10dbg/bin/gqtxci_mod.f90 +BRAMS/i10dbg/bin/grad_mod.f90 +BRAMS/i10dbg/bin/gradxt_mod.f90 +BRAMS/i10dbg/bin/gradxu_mod.f90 +BRAMS/i10dbg/bin/gradyt_mod.f90 +BRAMS/i10dbg/bin/gradyv_mod.f90 +BRAMS/i10dbg/bin/gradzt_mod.f90 +BRAMS/i10dbg/bin/gradzw_mod.f90 +BRAMS/i10dbg/bin/grdspc_mod.f90 +BRAMS/i10dbg/bin/great_circle.f90 +BRAMS/i10dbg/bin/grell_arakschu_solver_mod.f90 +BRAMS/i10dbg/bin/grell_buoy_below_lfc_mod.f90 +BRAMS/i10dbg/bin/grell_cldwork_downdraft_mod.f90 +BRAMS/i10dbg/bin/grell_cldwork_updraft_mod.f90 +BRAMS/i10dbg/bin/grell_coms.f90 +BRAMS/i10dbg/bin/grell_cupar_area_scaler_mod.f90 +BRAMS/i10dbg/bin/grell_cupar_aux.f90 +BRAMS/i10dbg/bin/grell_cupar_downdraft.f90 +BRAMS/i10dbg/bin/grell_cupar_driver.f90 +BRAMS/i10dbg/bin/grell_cupar_driver_mod.f90 +BRAMS/i10dbg/bin/grell_cupar_dynamic.f90 +BRAMS/i10dbg/bin/grell_cupar_dynamic_mod.f90 +BRAMS/i10dbg/bin/grell_cupar_ensemble.f90 +BRAMS/i10dbg/bin/grell_cupar_environment.f90 +BRAMS/i10dbg/bin/grell_cupar_feedback.f90 +BRAMS/i10dbg/bin/grell_cupar_feedback_mod.f90 +BRAMS/i10dbg/bin/grell_cupar_initial_mod.f90 +BRAMS/i10dbg/bin/grell_cupar_output_mod.f90 +BRAMS/i10dbg/bin/grell_cupar_static_driver_mod.f90 +BRAMS/i10dbg/bin/grell_cupar_static.f90 +BRAMS/i10dbg/bin/grell_cupar_static_mod.f90 +BRAMS/i10dbg/bin/grell_cupar_updraft.f90 +BRAMS/i10dbg/bin/grell_dellabot_ensemble_mod.f90 +BRAMS/i10dbg/bin/grell_dellas_ensemble_mod.f90 +BRAMS/i10dbg/bin/grell_draft_area_mod.f90 +BRAMS/i10dbg/bin/grell_dyncontrol_ensemble_mod.f90 +BRAMS/i10dbg/bin/grell_efficiency_ensemble_mod.f90 +BRAMS/i10dbg/bin/grell_extras_catt.f90 +BRAMS/i10dbg/bin/grell_feedback_driver_mod.f90 +BRAMS/i10dbg/bin/grell_find_cloud_lfc_mod.f90 +BRAMS/i10dbg/bin/grell_find_downdraft_origin_mod.f90 +BRAMS/i10dbg/bin/grell_find_pbl_height_mod.f90 +BRAMS/i10dbg/bin/grell_grell_solver_mod.f90 +BRAMS/i10dbg/bin/grell_inre_solver_mod.f90 +BRAMS/i10dbg/bin/grell_massflx_stats_mod.f90 +BRAMS/i10dbg/bin/grell_most_thermo_downdraft_mod.f90 +BRAMS/i10dbg/bin/grell_most_thermo_updraft_mod.f90 +BRAMS/i10dbg/bin/grell_nms_downdraft_mod.f90 +BRAMS/i10dbg/bin/grell_nms_updraft_mod.f90 +BRAMS/i10dbg/bin/grell_sanity_check_mod.f90 +BRAMS/i10dbg/bin/grell_sanity_thil2tqall_mod.f90 +BRAMS/i10dbg/bin/grell_theiv_downdraft_mod.f90 +BRAMS/i10dbg/bin/grell_theiv_updraft_mod.f90 +BRAMS/i10dbg/bin/grell_thermo_cldlev_mod.f90 +BRAMS/i10dbg/bin/grell_updraft_origin_mod.f90 +BRAMS/i10dbg/bin/grid_coms.f90 +BRAMS/i10dbg/bin/grid_dims.f90 +BRAMS/i10dbg/bin/gridinit_mod.f90 +BRAMS/i10dbg/bin/gridloc_prt_mod.f90 +BRAMS/i10dbg/bin/gridset.f90 +BRAMS/i10dbg/bin/gridset_mod.f90 +BRAMS/i10dbg/bin/grid_setup_mod.f90 +BRAMS/i10dbg/bin/grid_struct.f90 +BRAMS/i10dbg/bin/growth_balive.f90 +BRAMS/i10dbg/bin/gsasf_mod.f90 +BRAMS/i10dbg/bin/gsclip_mod.f90 +BRAMS/i10dbg/bin/gscr_mod.f90 +BRAMS/i10dbg/bin/gselnt_mod.f90 +BRAMS/i10dbg/bin/gser_mod.f90 +BRAMS/i10dbg/bin/gsetmarkercolourind_mod.f90 +BRAMS/i10dbg/bin/gsfaci_mod.f90 +BRAMS/i10dbg/bin/gsfais_mod.f90 +BRAMS/i10dbg/bin/gslwsc_mod.f90 +BRAMS/i10dbg/bin/gsmk_mod.f90 +BRAMS/i10dbg/bin/gsmksc_mod.f90 +BRAMS/i10dbg/bin/gsplci_mod.f90 +BRAMS/i10dbg/bin/gspmci_mod.f90 +BRAMS/i10dbg/bin/gstxci_mod.f90 +BRAMS/i10dbg/bin/h5_output_mod.f90 +BRAMS/i10dbg/bin/hadvance_mod.f90 +BRAMS/i10dbg/bin/hadvance_plumerise_mod.f90 +BRAMS/i10dbg/bin/harr_coms.f90 +BRAMS/i10dbg/bin/harr_lwrad_mod.f90 +BRAMS/i10dbg/bin/harr_raddriv.f90 +BRAMS/i10dbg/bin/harr_raddriv_mod.f90 +BRAMS/i10dbg/bin/harr_radinit1_mod.f90 +BRAMS/i10dbg/bin/harr_radinit.f90 +BRAMS/i10dbg/bin/harr_radinit_mod.f90 +BRAMS/i10dbg/bin/harr_swrad_mod.f90 +BRAMS/i10dbg/bin/harv_immat_patches_mod.f90 +BRAMS/i10dbg/bin/harv_mat_patches_mod.f90 +BRAMS/i10dbg/bin/haznuc_mod.f90 +BRAMS/i10dbg/bin/hdf_getslab_d_mod.f90 +BRAMS/i10dbg/bin/hdf_getslab_i_mod.f90 +BRAMS/i10dbg/bin/hdf_getslab_r_mod.f90 +BRAMS/i10dbg/bin/heav_mod.f90 +BRAMS/i10dbg/bin/hemi2.f90 +BRAMS/i10dbg/bin/hemintrp_cof_mod.f90 +BRAMS/i10dbg/bin/hemintrp_mod.f90 +BRAMS/i10dbg/bin/hemintrp_table_mod.f90 +BRAMS/i10dbg/bin/hemintt_mod.f90 +BRAMS/i10dbg/bin/hemintuv_mod.f90 +BRAMS/i10dbg/bin/het_resp_weight_mod.f90 +BRAMS/i10dbg/bin/heun_driver.f90 +BRAMS/i10dbg/bin/heun_integ_mod.f90 +BRAMS/i10dbg/bin/heun_stepper_mod.f90 +BRAMS/i10dbg/bin/heun_timestep_mod.f90 +BRAMS/i10dbg/bin/hg_xy_mod.f90 +BRAMS/i10dbg/bin/hg_z_mod.f90 +BRAMS/i10dbg/bin/hi_avgu_mod.f90 +BRAMS/i10dbg/bin/hi_avgv_mod.f90 +BRAMS/i10dbg/bin/hi_avgw_mod.f90 +BRAMS/i10dbg/bin/hifromx_mod.f90 +BRAMS/i10dbg/bin/hi_interp_mod.f90 +BRAMS/i10dbg/bin/hintrp_cc_mod.f90 +BRAMS/i10dbg/bin/history_start_mod.f90 +BRAMS/i10dbg/bin/hist_pol_read_mod.f90 +BRAMS/i10dbg/bin/hist_read_mod.f90 +BRAMS/i10dbg/bin/hiswrt_mod.f90 +BRAMS/i10dbg/bin/hlsrgb_mod.f90 +BRAMS/i10dbg/bin/homfrzcl_mod.f90 +BRAMS/i10dbg/bin/how_to_read_a_file_mod.f90 +BRAMS/i10dbg/bin/hsvrgb_mod.f90 +BRAMS/i10dbg/bin/htint2_mod.f90 +BRAMS/i10dbg/bin/htintcp_mod.f90 +BRAMS/i10dbg/bin/htint_index_mod.f90 +BRAMS/i10dbg/bin/htint_inter_mod.f90 +BRAMS/i10dbg/bin/htint_mod.f90 +BRAMS/i10dbg/bin/htint-opt.f90 +BRAMS/i10dbg/bin/hybrid_driver.f90 +BRAMS/i10dbg/bin/hybrid_integ_mod.f90 +BRAMS/i10dbg/bin/hybrid_timestep_mod.f90 +BRAMS/i10dbg/bin/hydrol_mod.f90 +BRAMS/i10dbg/bin/hydrology_coms.f90 +BRAMS/i10dbg/bin/hydrology_constants.f90 +BRAMS/i10dbg/bin/hydro_mod.f90 +BRAMS/i10dbg/bin/i1mach_mod.f90 +BRAMS/i10dbg/bin/ibias_mod.f90 +BRAMS/i10dbg/bin/ibindec_mod.f90 +BRAMS/i10dbg/bin/icenuc_mod.f90 +BRAMS/i10dbg/bin/ifirstchar_mod.f90 +BRAMS/i10dbg/bin/inc_fwd_patch_mod.f90 +BRAMS/i10dbg/bin/include_shal_effect_mod.f90 +BRAMS/i10dbg/bin/inc_rk4_patch_mod.f90 +BRAMS/i10dbg/bin/init_can_air_params_mod.f90 +BRAMS/i10dbg/bin/init_can_lyr_params_mod.f90 +BRAMS/i10dbg/bin/init_can_rad_params_mod.f90 +BRAMS/i10dbg/bin/init_cohorts_by_layers_mod.f90 +BRAMS/i10dbg/bin/init_conc1_mod.f90 +BRAMS/i10dbg/bin/init_conc2_mod.f90 +BRAMS/i10dbg/bin/init_conc_prev_mod.f90 +BRAMS/i10dbg/bin/init_decomp_params_mod.f90 +BRAMS/i10dbg/bin/init_disturb_params_mod.f90 +BRAMS/i10dbg/bin/init_ed_cohort_vars_mod.f90 +BRAMS/i10dbg/bin/init_ed_misc_coms_mod.f90 +BRAMS/i10dbg/bin/init_ed_patch_vars_mod.f90 +BRAMS/i10dbg/bin/init_ed_poly_vars_mod.f90 +BRAMS/i10dbg/bin/init_ed_site_vars_mod.f90 +BRAMS/i10dbg/bin/init_ff_coms_mod.f90 +BRAMS/i10dbg/bin/init_fields_mod.f90 +BRAMS/i10dbg/bin/init_full_history_restart_mod.f90 +BRAMS/i10dbg/bin/initg_mod.f90 +BRAMS/i10dbg/bin/ini_tg_profile_mod.f90 +BRAMS/i10dbg/bin/init_grid_spacing_mod.f90 +BRAMS/i10dbg/bin/inithh_mod.f90 +BRAMS/i10dbg/bin/inithis.f90 +BRAMS/i10dbg/bin/inithis_mod.f90 +BRAMS/i10dbg/bin/init_hydro_coms_mod.f90 +BRAMS/i10dbg/bin/inithydrology_mod.f90 +BRAMS/i10dbg/bin/init_hydro_sites.f90 +BRAMS/i10dbg/bin/inithydrosubsurface_mod.f90 +BRAMS/i10dbg/bin/initial_grid_grell_mod.f90 +BRAMS/i10dbg/bin/initialize_ed2leaf_mod.f90 +BRAMS/i10dbg/bin/initialize_rk4patches_mod.f90 +BRAMS/i10dbg/bin/initial_mod.f90 +BRAMS/i10dbg/bin/initial_tend_grell_mod.f90 +BRAMS/i10dbg/bin/initial_thermo_grell_mod.f90 +BRAMS/i10dbg/bin/initial_winds_grell_mod.f90 +BRAMS/i10dbg/bin/init_lapse_params_mod.f90 +BRAMS/i10dbg/bin/initlz_mod.f90 +BRAMS/i10dbg/bin/init_master_work_mod.f90 +BRAMS/i10dbg/bin/init_met_params_mod.f90 +BRAMS/i10dbg/bin/init_nbg_cohorts_mod.f90 +BRAMS/i10dbg/bin/init_node_work_mod.f90 +BRAMS/i10dbg/bin/init_params_mod.f90 +BRAMS/i10dbg/bin/init_pft_alloc_params_mod.f90 +BRAMS/i10dbg/bin/init_pft_derived_params_mod.f90 +BRAMS/i10dbg/bin/init_pft_leaf_params_mod.f90 +BRAMS/i10dbg/bin/init_pft_mort_params_mod.f90 +BRAMS/i10dbg/bin/init_pft_nitro_params_mod.f90 +BRAMS/i10dbg/bin/init_pft_photo_params_mod.f90 +BRAMS/i10dbg/bin/init_pft_repro_params_mod.f90 +BRAMS/i10dbg/bin/init_pft_resp_params_mod.f90 +BRAMS/i10dbg/bin/init_phen_coms_mod.f90 +BRAMS/i10dbg/bin/init_physiology_params_mod.f90 +BRAMS/i10dbg/bin/initqin_mod.f90 +BRAMS/i10dbg/bin/init_rk4_params_mod.f90 +BRAMS/i10dbg/bin/init_soil_coms_mod.f90 +BRAMS/i10dbg/bin/input_rawi_mod.f90 +BRAMS/i10dbg/bin/input_sfc_mod.f90 +BRAMS/i10dbg/bin/integ_liq_ice_mod.f90 +BRAMS/i10dbg/bin/integrate_ed_dmean_vars_mod.f90 +BRAMS/i10dbg/bin/integrate_ed_fmean_met_vars_mod.f90 +BRAMS/i10dbg/bin/integrate_ed_mmean_vars_mod.f90 +BRAMS/i10dbg/bin/integrate_ed_qmean_vars_mod.f90 +BRAMS/i10dbg/bin/integrate_lake_mod.f90 +BRAMS/i10dbg/bin/integrate_patch_euler_mod.f90 +BRAMS/i10dbg/bin/integrate_patch_heun_mod.f90 +BRAMS/i10dbg/bin/interp_lib.f90 +BRAMS/i10dbg/bin/intrp_mod.f90 +BRAMS/i10dbg/bin/intrrap_mod.f90 +BRAMS/i10dbg/bin/inventory_mat_forests_mod.f90 +BRAMS/i10dbg/bin/invmondays.f90 +BRAMS/i10dbg/bin/io_params.f90 +BRAMS/i10dbg/bin/ipaths_cyc_alloc_mod.f90 +BRAMS/i10dbg/bin/iprim_mod.f90 +BRAMS/i10dbg/bin/iran_recsize_mod.f90 +BRAMS/i10dbg/bin/isan_comp_dn0_mod.f90 +BRAMS/i10dbg/bin/isan_coms.f90 +BRAMS/i10dbg/bin/isan_driver_mod.f90 +BRAMS/i10dbg/bin/isan_file_inv_mod.f90 +BRAMS/i10dbg/bin/isan_io.f90 +BRAMS/i10dbg/bin/isenio_mod.f90 +BRAMS/i10dbg/bin/is_finite8_mod.f90 +BRAMS/i10dbg/bin/is_finite_mod.f90 +BRAMS/i10dbg/bin/ishift_mod.f90 +BRAMS/i10dbg/bin/isleap_mod.f90 +BRAMS/i10dbg/bin/ismax_mod.f90 +BRAMS/i10dbg/bin/ismin_mod.f90 +BRAMS/i10dbg/bin/isnsig_mod.f90 +BRAMS/i10dbg/bin/isnstage_mod.f90 +BRAMS/i10dbg/bin/is_resolvable_mod.f90 +BRAMS/i10dbg/bin/ivalugp_mod.f90 +BRAMS/i10dbg/bin/izero_mod.f90 +BRAMS/i10dbg/bin/jnmbinit_mod.f90 +BRAMS/i10dbg/bin/julday1000_mod.f90 +BRAMS/i10dbg/bin/julday_mod.f90 +BRAMS/i10dbg/bin/ke_coms.f90 +BRAMS/i10dbg/bin/klbnd_mod.f90 +BRAMS/i10dbg/bin/krig_mod.f90 +BRAMS/i10dbg/bin/kuocp_mod.f90 +BRAMS/i10dbg/bin/kuo_cupar_driver.f90 +BRAMS/i10dbg/bin/kuo_cupar_driver_mod.f90 +BRAMS/i10dbg/bin/lake_coms.f90 +BRAMS/i10dbg/bin/lake_derived_thbounds_mod.f90 +BRAMS/i10dbg/bin/lake_derivs_mod.f90 +BRAMS/i10dbg/bin/lake_diagnostics_mod.f90 +BRAMS/i10dbg/bin/lake_heun_mod.f90 +BRAMS/i10dbg/bin/lake_rk4_mod.f90 +BRAMS/i10dbg/bin/lake_sanity_check_mod.f90 +BRAMS/i10dbg/bin/lambcon_ps_mod.f90 +BRAMS/i10dbg/bin/landuse_init.f90 +BRAMS/i10dbg/bin/landuse_init_mod.f90 +BRAMS/i10dbg/bin/landuse_opqr_mod.f90 +BRAMS/i10dbg/bin/lapse.f90 +BRAMS/i10dbg/bin/large_error_mod.f90 +BRAMS/i10dbg/bin/lastchar_mod.f90 +BRAMS/i10dbg/bin/lastmonthdate_mod.f90 +BRAMS/i10dbg/bin/lastslash_mod.f90 +BRAMS/i10dbg/bin/latbnd_mod.f90 +BRAMS/i10dbg/bin/latlon_ps_mod.f90 +BRAMS/i10dbg/bin/latnormv_mod.f90 +BRAMS/i10dbg/bin/latset_mod.f90 +BRAMS/i10dbg/bin/latset_tracer_mod.f90 +BRAMS/i10dbg/bin/lblbar_mod.f90 +BRAMS/i10dbg/bin/lbound_mod.f90 +BRAMS/i10dbg/bin/lbseti_mod.f90 +BRAMS/i10dbg/bin/lc2ll_mod.f90 +BRAMS/i10dbg/bin/lc_ll_mod.f90 +BRAMS/i10dbg/bin/leaf0_mod.f90 +BRAMS/i10dbg/bin/leaf2ed_soil_moist_energy_mod.f90 +BRAMS/i10dbg/bin/leaf3_adjust_sfcw_mod.f90 +BRAMS/i10dbg/bin/leaf3_aerodynamic_conductances_mod.f90 +BRAMS/i10dbg/bin/leaf3_atmo1d_mod.f90 +BRAMS/i10dbg/bin/leaf3_bc.f90 +BRAMS/i10dbg/bin/leaf3_bcond_mod.f90 +BRAMS/i10dbg/bin/leaf3_can_diag_mod.f90 +BRAMS/i10dbg/bin/leaf3_can.f90 +BRAMS/i10dbg/bin/leaf3_canopy_mod.f90 +BRAMS/i10dbg/bin/leaf3_clone_mod.f90 +BRAMS/i10dbg/bin/leaf3.f90 +BRAMS/i10dbg/bin/leaf3_grndvap_mod.f90 +BRAMS/i10dbg/bin/leaf3_hyd.f90 +BRAMS/i10dbg/bin/leaf3_init.f90 +BRAMS/i10dbg/bin/leaf3init_overwrite_mod.f90 +BRAMS/i10dbg/bin/leaf3_ocean_diag_mod.f90 +BRAMS/i10dbg/bin/leaf3_ocean.f90 +BRAMS/i10dbg/bin/leaf3_ocean_mod.f90 +BRAMS/i10dbg/bin/leaf3_prognostic_mod.f90 +BRAMS/i10dbg/bin/leaf3_reduced_wind_mod.f90 +BRAMS/i10dbg/bin/leaf3_roughness_mod.f90 +BRAMS/i10dbg/bin/leaf3_sfclmcv_mod.f90 +BRAMS/i10dbg/bin/leaf3_sfcrad_mod.f90 +BRAMS/i10dbg/bin/leaf3_sflux_w_mod.f90 +BRAMS/i10dbg/bin/leaf3_soilsfcw_diag_mod.f90 +BRAMS/i10dbg/bin/leaf3_solve_veg_mod.f90 +BRAMS/i10dbg/bin/leaf3_stars_mod.f90 +BRAMS/i10dbg/bin/leaf3_step_startup_mod.f90 +BRAMS/i10dbg/bin/leaf3_teb.f90 +BRAMS/i10dbg/bin/leaf3_teb_interface_mod.f90 +BRAMS/i10dbg/bin/leaf3_timestep_mod.f90 +BRAMS/i10dbg/bin/leaf3_tw.f90 +BRAMS/i10dbg/bin/leaf3_tw_mod.f90 +BRAMS/i10dbg/bin/leaf3_utils.f90 +BRAMS/i10dbg/bin/leaf3_veg_diag_mod.f90 +BRAMS/i10dbg/bin/leaf_coms.f90 +BRAMS/i10dbg/bin/leaf_database.f90 +BRAMS/i10dbg/bin/leaf_database_mod.f90 +BRAMS/i10dbg/bin/leaf_datp_datq_mod.f90 +BRAMS/i10dbg/bin/leaf_datp_datsoil_mod.f90 +BRAMS/i10dbg/bin/leaf_derivs_mod.f90 +BRAMS/i10dbg/bin/leaftw_derivs_mod.f90 +BRAMS/i10dbg/bin/le_fontes_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__closeall_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__closefile_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_error_getline_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__existid_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_existid_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__existpid_mod.f90 +BRAMS/i10dbg/bin/libxml2f90.f90_pp.f90 +BRAMS/i10dbg/bin/libxml2f90__findinchara_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__flush_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__get_fileunit_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_getline_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_getsafec8_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_getsafei4_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_getsafel4_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_getsafer8_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__getunit_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_addid_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_ll_addid_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_add_list_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_ll_add_list_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_addpid_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_ll_addpid_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_ll_addpureid_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_closetag_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_ll_closetag_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_down_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_edit_id_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_ll_edit_id_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_edit_pid_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_ll_edit_pid_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_exist_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_getc8__mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_getc8_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_ll_getc8_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_getch_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_ll_getch_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_getch_scal_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_geti4__mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_geti4_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_ll_geti4_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_getl4__mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_getl4_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_ll_getl4_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_getpc8__mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_getpc8_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_getpch_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_getpi4__mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_getpi4_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_getpl4__mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_getpl4_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_getpr8__mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_getpr8_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_getpsize_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_getpstring__mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_getpstring_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_getr8__mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_getr8_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_ll_getr8_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_getsize_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_ll_getsize_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_getstring__mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_getstring_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_ll_getstring_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_ll_initlist_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_ll_inittag_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_opentag_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_ll_opentag_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_report_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_ll_report_rec_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_ll_report_rec_wrap_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_selectlist_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_selecttag_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__ll_up_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__openfile_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_parse_file_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_parse_find_char_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__readin_file_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_readin_file_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__readin_nfil_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__set_casesensitive_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__set_default_ll_id_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__setformat_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__set_paw_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__set_rmcomma_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__set_rmquotes_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__settransform_exm_mod.f90 +BRAMS/i10dbg/bin/libxml2f90__setwrite_exm_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_tostringa_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_tostring_mod.f90 +BRAMS/i10dbg/bin/libxml2f90_transform_paw_mod.f90 +BRAMS/i10dbg/bin/lined_mod.f90 +BRAMS/i10dbg/bin/line_mod.f90 +BRAMS/i10dbg/bin/lisys_solver8_mod.f90 +BRAMS/i10dbg/bin/lisys_solver_mod.f90 +BRAMS/i10dbg/bin/lite_varset_mod.f90 +BRAMS/i10dbg/bin/ll2lc_mod.f90 +BRAMS/i10dbg/bin/ll_lc_mod.f90 +BRAMS/i10dbg/bin/ll_rotate_lc_mod.f90 +BRAMS/i10dbg/bin/ll_xy_mod.f90 +BRAMS/i10dbg/bin/load_ecosystem_state_mod.f90 +BRAMS/i10dbg/bin/load_ed_ecosystem_params_mod.f90 +BRAMS/i10dbg/bin/local_proc.f90 +BRAMS/i10dbg/bin/lpuvw_init_mod.f90 +BRAMS/i10dbg/bin/lsl_particles_mod.f90 +BRAMS/i10dbg/bin/lsm_hyd.f90 +BRAMS/i10dbg/bin/lubksb_dble_mod.f90 +BRAMS/i10dbg/bin/ludcmp_dble_mod.f90 +BRAMS/i10dbg/bin/lw_multiple_scatter_mod.f90 +BRAMS/i10dbg/bin/lwradc_mod.f90 +BRAMS/i10dbg/bin/lwradp_mod.f90 +BRAMS/i10dbg/bin/lw_twostream_mod.f90 +BRAMS/i10dbg/bin/make_autotab_mod.f90 +BRAMS/i10dbg/bin/makefnam_mod.f90 +BRAMS/i10dbg/bin/makeplume_mod.f90 +BRAMS/i10dbg/bin/make_sfcfiles_mod.f90 +BRAMS/i10dbg/bin/makevarf_mod.f90 +BRAMS/i10dbg/bin/mapaci_mod.f90 +BRAMS/i10dbg/bin/mapbla_mod.f90 +BRAMS/i10dbg/bin/mapdrw_mod.f90 +BRAMS/i10dbg/bin/mapint_mod.f90 +BRAMS/i10dbg/bin/mapiqa_mod.f90 +BRAMS/i10dbg/bin/mapiq_mod.f90 +BRAMS/i10dbg/bin/mapita_mod.f90 +BRAMS/i10dbg/bin/mapit_mod.f90 +BRAMS/i10dbg/bin/mappos_mod.f90 +BRAMS/i10dbg/bin/map_proj.f90 +BRAMS/i10dbg/bin/maproj_mod.f90 +BRAMS/i10dbg/bin/maprs_mod.f90 +BRAMS/i10dbg/bin/mapset_mod.f90 +BRAMS/i10dbg/bin/mapstc_mod.f90 +BRAMS/i10dbg/bin/mapsti_mod.f90 +BRAMS/i10dbg/bin/maptra_mod.f90 +BRAMS/i10dbg/bin/maptri_mod.f90 +BRAMS/i10dbg/bin/maptrn_mod.f90 +BRAMS/i10dbg/bin/master_ed_init_mod.f90 +BRAMS/i10dbg/bin/master_getall_mod.f90 +BRAMS/i10dbg/bin/master_getanl_mod.f90 +BRAMS/i10dbg/bin/master_getcflcpu_mod.f90 +BRAMS/i10dbg/bin/master_putcflmax_mod.f90 +BRAMS/i10dbg/bin/masterput_cofnest_mod.f90 +BRAMS/i10dbg/bin/master_putdtsched_mod.f90 +BRAMS/i10dbg/bin/master_putdxt_mod.f90 +BRAMS/i10dbg/bin/masterput_ednl_mod.f90 +BRAMS/i10dbg/bin/masterput_grid_dimens_mod.f90 +BRAMS/i10dbg/bin/masterput_gridinit_mod.f90 +BRAMS/i10dbg/bin/masterput_gridset_mod.f90 +BRAMS/i10dbg/bin/masterput_micphys_mod.f90 +BRAMS/i10dbg/bin/masterput_misc_mod.f90 +BRAMS/i10dbg/bin/masterput_nl_mod.f90 +BRAMS/i10dbg/bin/masterput_oda_mod.f90 +BRAMS/i10dbg/bin/masterput_processid_mod.f90 +BRAMS/i10dbg/bin/master_sendinit_mod.f90 +BRAMS/i10dbg/bin/mat_forest_harv_rates_mod.f90 +BRAMS/i10dbg/bin/maximi_mod.f90 +BRAMS/i10dbg/bin/mcphys_main_mod.f90 +BRAMS/i10dbg/bin/mean_daysecz_mod.f90 +BRAMS/i10dbg/bin/melt_mod.f90 +BRAMS/i10dbg/bin/mem_aerad.f90 +BRAMS/i10dbg/bin/mem_all.f90 +BRAMS/i10dbg/bin/mem_basic.f90 +BRAMS/i10dbg/bin/mem_carma.f90 +BRAMS/i10dbg/bin/mem_cuparm.f90 +BRAMS/i10dbg/bin/mem_edcp.f90 +BRAMS/i10dbg/bin/mem_emiss.f90 +BRAMS/i10dbg/bin/mem_ensemble.f90 +BRAMS/i10dbg/bin/mem_gaspart.f90 +BRAMS/i10dbg/bin/mem_globaer.f90 +BRAMS/i10dbg/bin/mem_globrad.f90 +BRAMS/i10dbg/bin/mem_grell_param2.f90 +BRAMS/i10dbg/bin/mem_grid_dim_defs.f90 +BRAMS/i10dbg/bin/mem_grid.f90 +BRAMS/i10dbg/bin/mem_harr.f90 +BRAMS/i10dbg/bin/mem_leaf.f90 +BRAMS/i10dbg/bin/mem_mass.f90 +BRAMS/i10dbg/bin/mem_mclat.f90 +BRAMS/i10dbg/bin/mem_micro.f90 +BRAMS/i10dbg/bin/mem_mksfc.f90 +BRAMS/i10dbg/bin/mem_mnt_advec.f90 +BRAMS/i10dbg/bin/mem_nestb.f90 +BRAMS/i10dbg/bin/mem_oda.f90 +BRAMS/i10dbg/bin/mem_opt_scratch.f90 +BRAMS/i10dbg/bin/mem_polygons.f90 +BRAMS/i10dbg/bin/mem_radiate.f90 +BRAMS/i10dbg/bin/mem_scalar.f90 +BRAMS/i10dbg/bin/mem_scratch1_brams.f90 +BRAMS/i10dbg/bin/mem_scratch1_grell.f90 +BRAMS/i10dbg/bin/mem_scratch2_grell.f90 +BRAMS/i10dbg/bin/mem_scratch2_grell_sh.f90 +BRAMS/i10dbg/bin/mem_scratch3_grell.f90 +BRAMS/i10dbg/bin/mem_scratch3_grell_sh.f90 +BRAMS/i10dbg/bin/mem_scratch.f90 +BRAMS/i10dbg/bin/mem_scratch_grell.f90 +BRAMS/i10dbg/bin/mem_soil_moisture.f90 +BRAMS/i10dbg/bin/mem_tconv.f90 +BRAMS/i10dbg/bin/mem_teb_common.f90 +BRAMS/i10dbg/bin/mem_teb.f90 +BRAMS/i10dbg/bin/mem_teb_vars_const.f90 +BRAMS/i10dbg/bin/mem_tend.f90 +BRAMS/i10dbg/bin/mem_turb.f90 +BRAMS/i10dbg/bin/mem_turb_scalar.f90 +BRAMS/i10dbg/bin/mem_varinit.f90 +BRAMS/i10dbg/bin/met_driver_coms.f90 +BRAMS/i10dbg/bin/met_sanity_check_mod.f90 +BRAMS/i10dbg/bin/mic_coll.f90 +BRAMS/i10dbg/bin/mic_driv.f90 +BRAMS/i10dbg/bin/mic_gamma.f90 +BRAMS/i10dbg/bin/mic_init.f90 +BRAMS/i10dbg/bin/micinit_mod.f90 +BRAMS/i10dbg/bin/mic_misc.f90 +BRAMS/i10dbg/bin/mic_nuc.f90 +BRAMS/i10dbg/bin/micphys.f90 +BRAMS/i10dbg/bin/micro_1st_mod.f90 +BRAMS/i10dbg/bin/micro_coms.f90 +BRAMS/i10dbg/bin/micro_data_mod.f90 +BRAMS/i10dbg/bin/micro_driver_mod.f90 +BRAMS/i10dbg/bin/micro_master_mod.f90 +BRAMS/i10dbg/bin/mic_tabs.f90 +BRAMS/i10dbg/bin/mic_vap.f90 +BRAMS/i10dbg/bin/migs_mod.f90 +BRAMS/i10dbg/bin/minimi_mod.f90 +BRAMS/i10dbg/bin/minmax_mod.f90 +BRAMS/i10dbg/bin/minvap_1d_adj_mod.f90 +BRAMS/i10dbg/bin/mk_adv_buff_mod.f90 +BRAMS/i10dbg/bin/mkcoltb_mod.f90 +BRAMS/i10dbg/bin/mk_cyc_buff_mod.f90 +BRAMS/i10dbg/bin/mk_full_buff_mod.f90 +BRAMS/i10dbg/bin/mk_lbc_buff_mod.f90 +BRAMS/i10dbg/bin/mknest_buff_mod.f90 +BRAMS/i10dbg/bin/mksedim_tab_mod.f90 +BRAMS/i10dbg/bin/mksfc_driver.f90 +BRAMS/i10dbg/bin/mksfc_fuso.f90 +BRAMS/i10dbg/bin/mksfc_ndvi.f90 +BRAMS/i10dbg/bin/mksfc_sfc.f90 +BRAMS/i10dbg/bin/mksfc_sst.f90 +BRAMS/i10dbg/bin/mksfc_top.f90 +BRAMS/i10dbg/bin/mk_st_buff_mod.f90 +BRAMS/i10dbg/bin/mnt_advec_aux.f90 +BRAMS/i10dbg/bin/mnt_advec_main.f90 +BRAMS/i10dbg/bin/mod_advect_kit.f90 +BRAMS/i10dbg/bin/model.f90 +BRAMS/i10dbg/bin/model_mod.f90 +BRAMS/i10dbg/bin/mod_GhostBlock.f90 +BRAMS/i10dbg/bin/mod_GhostBlockPartition.f90 +BRAMS/i10dbg/bin/mod_ozone.f90 +BRAMS/i10dbg/bin/modsched.f90 +BRAMS/i10dbg/bin/modsched_mod.f90 +BRAMS/i10dbg/bin/monotonic_advec_mod.f90 +BRAMS/i10dbg/bin/mortality.f90 +BRAMS/i10dbg/bin/movenest_mod.f90 +BRAMS/i10dbg/bin/mpass_advec.f90 +BRAMS/i10dbg/bin/mpass_cyclic.f90 +BRAMS/i10dbg/bin/mpass_dtl.f90 +BRAMS/i10dbg/bin/mpass_feed.f90 +BRAMS/i10dbg/bin/mpass_full.f90 +BRAMS/i10dbg/bin/mpass_init.f90 +BRAMS/i10dbg/bin/mpass_lbc.f90 +BRAMS/i10dbg/bin/mpass_nest.f90 +BRAMS/i10dbg/bin/mpass_oda.f90 +BRAMS/i10dbg/bin/mpass_st.f90 +BRAMS/i10dbg/bin/mpilbc_driver_mod.f90 +BRAMS/i10dbg/bin/mprove_mod.f90 +BRAMS/i10dbg/bin/mpsetc_mod.f90 +BRAMS/i10dbg/bin/multiple_scatter.f90 +BRAMS/i10dbg/bin/mxdefm_mod.f90 +BRAMS/i10dbg/bin/mxdefm_tracer_mod.f90 +BRAMS/i10dbg/bin/mxtked_mod.f90 +BRAMS/i10dbg/bin/nakanishi_mod.f90 +BRAMS/i10dbg/bin/nameout_mod.f90 +BRAMS/i10dbg/bin/ncarg_dummies_mod.f90 +BRAMS/i10dbg/bin/ncarg_dummy.f90 +BRAMS/i10dbg/bin/nc_get_press_mod.f90 +BRAMS/i10dbg/bin/nc_pressure_stage_mod.f90 +BRAMS/i10dbg/bin/nc_prfill_mod.f90 +BRAMS/i10dbg/bin/ndvi_check_header_mod.f90 +BRAMS/i10dbg/bin/ndvi_file_inv_mod.f90 +BRAMS/i10dbg/bin/ndviinit_mod.f90 +BRAMS/i10dbg/bin/ndviinit_user_mod.f90 +BRAMS/i10dbg/bin/ndvinest_mod.f90 +BRAMS/i10dbg/bin/ndvi_read_dataheader_mod.f90 +BRAMS/i10dbg/bin/ndvi_read.f90 +BRAMS/i10dbg/bin/ndvi_read_mod.f90 +BRAMS/i10dbg/bin/ndvi_update_mod.f90 +BRAMS/i10dbg/bin/ndvi_write_mod.f90 +BRAMS/i10dbg/bin/near_bare_ground_big_leaf_init_mod.f90 +BRAMS/i10dbg/bin/near_bare_ground_init_mod.f90 +BRAMS/i10dbg/bin/nearest_neighbour_sm_mod.f90 +BRAMS/i10dbg/bin/negadj1_mod.f90 +BRAMS/i10dbg/bin/nest_feed.f90 +BRAMS/i10dbg/bin/nest_filldens.f90 +BRAMS/i10dbg/bin/nest_geosst.f90 +BRAMS/i10dbg/bin/nest_init_aux.f90 +BRAMS/i10dbg/bin/nest_interpolated_topo_mod.f90 +BRAMS/i10dbg/bin/nest_intrp.f90 +BRAMS/i10dbg/bin/nest_move.f90 +BRAMS/i10dbg/bin/newgrid_mod.f90 +BRAMS/i10dbg/bin/new_patch_sfc_props_mod.f90 +BRAMS/i10dbg/bin/newtemp_mod.f90 +BRAMS/i10dbg/bin/niceinc6_mod.f90 +BRAMS/i10dbg/bin/niceinc_mod.f90 +BRAMS/i10dbg/bin/node_cycinit_mod.f90 +BRAMS/i10dbg/bin/node_decomp_mod.f90 +BRAMS/i10dbg/bin/node_ed_init_mod.f90 +BRAMS/i10dbg/bin/node_getadv_mod.f90 +BRAMS/i10dbg/bin/node_getcflmax_mod.f90 +BRAMS/i10dbg/bin/nodeget_cofnest_mod.f90 +BRAMS/i10dbg/bin/node_getcyclic_mod.f90 +BRAMS/i10dbg/bin/node_getdtsched_mod.f90 +BRAMS/i10dbg/bin/node_getdxt_mod.f90 +BRAMS/i10dbg/bin/nodeget_ednl_mod.f90 +BRAMS/i10dbg/bin/node_getfeed_mod.f90 +BRAMS/i10dbg/bin/nodeget_grid_dimens_mod.f90 +BRAMS/i10dbg/bin/nodeget_gridinit_mod.f90 +BRAMS/i10dbg/bin/nodeget_gridset_mod.f90 +BRAMS/i10dbg/bin/node_getinit_mod.f90 +BRAMS/i10dbg/bin/node_getlbc_mod.f90 +BRAMS/i10dbg/bin/nodeget_micphys_mod.f90 +BRAMS/i10dbg/bin/nodeget_misc_mod.f90 +BRAMS/i10dbg/bin/node_getnbc_mod.f90 +BRAMS/i10dbg/bin/nodeget_nl_mod.f90 +BRAMS/i10dbg/bin/nodeget_oda_mod.f90 +BRAMS/i10dbg/bin/nodeget_processid_mod.f90 +BRAMS/i10dbg/bin/node_getst_mod.f90 +BRAMS/i10dbg/bin/node_index_mod.f90 +BRAMS/i10dbg/bin/node_mod.f90 +BRAMS/i10dbg/bin/node_putcflcpu_mod.f90 +BRAMS/i10dbg/bin/node_sendadv_mod.f90 +BRAMS/i10dbg/bin/node_sendall_mod.f90 +BRAMS/i10dbg/bin/node_sendanl_mod.f90 +BRAMS/i10dbg/bin/node_sendcyclic_mod.f90 +BRAMS/i10dbg/bin/node_sendfeed_mod.f90 +BRAMS/i10dbg/bin/node_sendlbc_mod.f90 +BRAMS/i10dbg/bin/node_sendnbc_mod.f90 +BRAMS/i10dbg/bin/node_sendst_mod.f90 +BRAMS/i10dbg/bin/normal_accfluxes_mod.f90 +BRAMS/i10dbg/bin/normalize_ed_dmean_vars_mod.f90 +BRAMS/i10dbg/bin/normalize_ed_fmean_vars_mod.f90 +BRAMS/i10dbg/bin/normalize_ed_mmean_vars_mod.f90 +BRAMS/i10dbg/bin/normalize_ed_qmean_vars_mod.f90 +BRAMS/i10dbg/bin/normalize_ed_todaynpp_vars_mod.f90 +BRAMS/i10dbg/bin/normalize_ed_today_vars_mod.f90 +BRAMS/i10dbg/bin/norm_harv_patch_mod.f90 +BRAMS/i10dbg/bin/nstbdriv_mod.f90 +BRAMS/i10dbg/bin/nstb_mod.f90 +BRAMS/i10dbg/bin/nstbtnd_mod.f90 +BRAMS/i10dbg/bin/nstfeed_mod.f90 +BRAMS/i10dbg/bin/nud_analysis.f90 +BRAMS/i10dbg/bin/nud_cond_accum_mod.f90 +BRAMS/i10dbg/bin/nud_file_inv_mod.f90 +BRAMS/i10dbg/bin/nudge_cond_mod.f90 +BRAMS/i10dbg/bin/nudge_mod.f90 +BRAMS/i10dbg/bin/nud_read.f90 +BRAMS/i10dbg/bin/nud_read_mod.f90 +BRAMS/i10dbg/bin/nud_update.f90 +BRAMS/i10dbg/bin/nud_update_mod.f90 +BRAMS/i10dbg/bin/num_days_mod.f90 +BRAMS/i10dbg/bin/numutils.f90 +BRAMS/i10dbg/bin/obanl_mod.f90 +BRAMS/i10dbg/bin/obj_anal_mod.f90 +BRAMS/i10dbg/bin/obs_input.f90 +BRAMS/i10dbg/bin/obs_isen_mod.f90 +BRAMS/i10dbg/bin/obs_sigz_mod.f90 +BRAMS/i10dbg/bin/oda_file_inv_mod.f90 +BRAMS/i10dbg/bin/oda_krig.f90 +BRAMS/i10dbg/bin/oda_nudge.f90 +BRAMS/i10dbg/bin/oda_nudge_init_mod.f90 +BRAMS/i10dbg/bin/oda_nudge_mod.f90 +BRAMS/i10dbg/bin/oda_obs_alloc_mod.f90 +BRAMS/i10dbg/bin/oda_proc_obs.f90 +BRAMS/i10dbg/bin/oda_proc_obs_mod.f90 +BRAMS/i10dbg/bin/oda_read.f90 +BRAMS/i10dbg/bin/oda_read_mod.f90 +BRAMS/i10dbg/bin/oda_sta_count.f90 +BRAMS/i10dbg/bin/oda_sta_count_mod.f90 +BRAMS/i10dbg/bin/oda_sta_input.f90 +BRAMS/i10dbg/bin/oda_sta_input_mod.f90 +BRAMS/i10dbg/bin/oda_tendency_mod.f90 +BRAMS/i10dbg/bin/odeint_mod.f90 +BRAMS/i10dbg/bin/old_grell_cupar_driver.f90 +BRAMS/i10dbg/bin/old_grell_cupar_driver_mod.f90 +BRAMS/i10dbg/bin/old_prep_convflx_to_mass_mod.f90 +BRAMS/i10dbg/bin/onenode_mod.f90 +BRAMS/i10dbg/bin/operts_mod.f90 +BRAMS/i10dbg/bin/opngks_mod.f90 +BRAMS/i10dbg/bin/opspec1_mod.f90 +BRAMS/i10dbg/bin/opspec2_mod.f90 +BRAMS/i10dbg/bin/opspec3_mod.f90 +BRAMS/i10dbg/bin/opspec4_mod.f90 +BRAMS/i10dbg/bin/opspec.f90 +BRAMS/i10dbg/bin/opspec_fatal_mod.f90 +BRAMS/i10dbg/bin/opspec_mess_mod.f90 +BRAMS/i10dbg/bin/optimiz_coms.f90 +BRAMS/i10dbg/bin/optlib_mod.f90 +BRAMS/i10dbg/bin/overwrite_with_xml_config_mod.f90 +BRAMS/i10dbg/bin/ozone.f90 +BRAMS/i10dbg/bin/ozone_mod.f90 +BRAMS/i10dbg/bin/para_init.f90 +BRAMS/i10dbg/bin/paral.f90 +BRAMS/i10dbg/bin/par_bintp_mod.f90 +BRAMS/i10dbg/bin/par_decomp_bounds_mod.f90 +BRAMS/i10dbg/bin/par_decomp.f90 +BRAMS/i10dbg/bin/par_decomp_input_mod.f90 +BRAMS/i10dbg/bin/par_decomp_mod.f90 +BRAMS/i10dbg/bin/par_est_time_mod.f90 +BRAMS/i10dbg/bin/par_model_mod.f90 +BRAMS/i10dbg/bin/par_node_paths_mod.f90 +BRAMS/i10dbg/bin/parsefnam_mod.f90 +BRAMS/i10dbg/bin/parse_mod.f90 +BRAMS/i10dbg/bin/patch_array_size_mod.f90 +BRAMS/i10dbg/bin/patch_interp_driver_mod.f90 +BRAMS/i10dbg/bin/patch_interp_mod.f90 +BRAMS/i10dbg/bin/patch_land_average_mod.f90 +BRAMS/i10dbg/bin/patch_land_copy2_mod.f90 +BRAMS/i10dbg/bin/patch_land_unaverage_mod.f90 +BRAMS/i10dbg/bin/patch_latlon_mod.f90 +BRAMS/i10dbg/bin/patch_minsize_mod.f90 +BRAMS/i10dbg/bin/path_lengths_mod.f90 +BRAMS/i10dbg/bin/pc03_mod.f90 +BRAMS/i10dbg/bin/pcgeti_mod.f90 +BRAMS/i10dbg/bin/pcgetr_mod.f90 +BRAMS/i10dbg/bin/pcseti_mod.f90 +BRAMS/i10dbg/bin/perim_mod.f90 +BRAMS/i10dbg/bin/pft_coms.f90 +BRAMS/i10dbg/bin/phenology_aux.f90 +BRAMS/i10dbg/bin/phenology_coms.f90 +BRAMS/i10dbg/bin/phenology_driver_eq_0_mod.f90 +BRAMS/i10dbg/bin/phenology_driver_mod.f90 +BRAMS/i10dbg/bin/phenology_driv.f90 +BRAMS/i10dbg/bin/phenology_startup.f90 +BRAMS/i10dbg/bin/phenology_thresholds_mod.f90 +BRAMS/i10dbg/bin/photosyn_driv.f90 +BRAMS/i10dbg/bin/physiology_coms.f90 +BRAMS/i10dbg/bin/plant_structural_allocation_mod.f90 +BRAMS/i10dbg/bin/plchhq_mod.f90 +BRAMS/i10dbg/bin/plchlq_mod.f90 +BRAMS/i10dbg/bin/plchmq_mod.f90 +BRAMS/i10dbg/bin/plin_mod.f90 +BRAMS/i10dbg/bin/plkavg_mod.f90 +BRAMS/i10dbg/bin/plotif_mod.f90 +BRAMS/i10dbg/bin/plotit_mod.f90 +BRAMS/i10dbg/bin/plumerise_driver_mod.f90 +BRAMS/i10dbg/bin/plumerise_mod.f90 +BRAMS/i10dbg/bin/plumerise_vector.f90 +BRAMS/i10dbg/bin/point_mod.f90 +BRAMS/i10dbg/bin/points_mod.f90 +BRAMS/i10dbg/bin/polarst.f90 +BRAMS/i10dbg/bin/polarst_mod.f90 +BRAMS/i10dbg/bin/posidef_mod.f90 +BRAMS/i10dbg/bin/prdctp1_adap_mod.f90 +BRAMS/i10dbg/bin/prdctp1_new_mod.f90 +BRAMS/i10dbg/bin/prdctp2_adap_mod.f90 +BRAMS/i10dbg/bin/prdctp2_mod.f90 +BRAMS/i10dbg/bin/prdctu_adap_mod.f90 +BRAMS/i10dbg/bin/prdctu_mod.f90 +BRAMS/i10dbg/bin/prdctv_adap_mod.f90 +BRAMS/i10dbg/bin/prdctv_mod.f90 +BRAMS/i10dbg/bin/prdctw1_adap_mod.f90 +BRAMS/i10dbg/bin/prdctw1_mod.f90 +BRAMS/i10dbg/bin/prdctw2_adap_mod.f90 +BRAMS/i10dbg/bin/prdctw2_mod.f90 +BRAMS/i10dbg/bin/prdctw3_adap_mod.f90 +BRAMS/i10dbg/bin/prdctw3_mod.f90 +BRAMS/i10dbg/bin/prebarn_mod.f90 +BRAMS/i10dbg/bin/predict_mod.f90 +BRAMS/i10dbg/bin/predtr_mod.f90 +BRAMS/i10dbg/bin/prep_advflx_to_mass_mod.f90 +BRAMS/i10dbg/bin/prepare_timeavg_driver_mod.f90 +BRAMS/i10dbg/bin/prepare_timeavg_to_mass_mod.f90 +BRAMS/i10dbg/bin/prep_convflx_to_mass_mod.f90 +BRAMS/i10dbg/bin/prep_lnthetv_mod.f90 +BRAMS/i10dbg/bin/prep_lnthvtend_mod.f90 +BRAMS/i10dbg/bin/prep_timeave_mod.f90 +BRAMS/i10dbg/bin/prescribed_event_mod.f90 +BRAMS/i10dbg/bin/press_miss_mod.f90 +BRAMS/i10dbg/bin/pressure_stage_mod.f90 +BRAMS/i10dbg/bin/prfill_mod.f90 +BRAMS/i10dbg/bin/prgintrp_mod.f90 +BRAMS/i10dbg/bin/pr_hystatic_t_mod.f90 +BRAMS/i10dbg/bin/pr_hystatic_z_mod.f90 +BRAMS/i10dbg/bin/print_c_and_n_budgets_mod.f90 +BRAMS/i10dbg/bin/print_csiteipa_mod.f90 +BRAMS/i10dbg/bin/pr_interp_mod.f90 +BRAMS/i10dbg/bin/print_errmax_mod.f90 +BRAMS/i10dbg/bin/print_field_node_mod.f90 +BRAMS/i10dbg/bin/print_fields_mod.f90 +BRAMS/i10dbg/bin/print_lake_errmax_mod.f90 +BRAMS/i10dbg/bin/print_lakesite_mod.f90 +BRAMS/i10dbg/bin/print_longwave_mod.f90 +BRAMS/i10dbg/bin/print_photo_details_mod.f90 +BRAMS/i10dbg/bin/print_rk4patch_mod.f90 +BRAMS/i10dbg/bin/print_rk4_state_mod.f90 +BRAMS/i10dbg/bin/print_soil_info_mod.f90 +BRAMS/i10dbg/bin/pr_miss_fill_mod.f90 +BRAMS/i10dbg/bin/prt2d_mod.f90 +BRAMS/i10dbg/bin/prtlev_mod.f90 +BRAMS/i10dbg/bin/prtopt_mod.f90 +BRAMS/i10dbg/bin/prtout_mod.f90 +BRAMS/i10dbg/bin/psfill_mod.f90 +BRAMS/i10dbg/bin/ps_ps_mod.f90 +BRAMS/i10dbg/bin/ps_ps_rot_mod.f90 +BRAMS/i10dbg/bin/psxfer_mod.f90 +BRAMS/i10dbg/bin/putconfigint_mod.f90 +BRAMS/i10dbg/bin/putconfigreal8_mod.f90 +BRAMS/i10dbg/bin/putconfigreal_mod.f90 +BRAMS/i10dbg/bin/putconfigstring_mod.f90 +BRAMS/i10dbg/bin/pwritx_mod.f90 +BRAMS/i10dbg/bin/q8qst4_mod.f90 +BRAMS/i10dbg/bin/raco_adap.f90 +BRAMS/i10dbg/bin/raco.f90 +BRAMS/i10dbg/bin/rad_carma.f90 +BRAMS/i10dbg/bin/rad_ccmp.f90 +BRAMS/i10dbg/bin/radcomp_mod.f90 +BRAMS/i10dbg/bin/rad_copy2scratch_mod.f90 +BRAMS/i10dbg/bin/rad_driv.f90 +BRAMS/i10dbg/bin/radiate_driver.f90 +BRAMS/i10dbg/bin/radiate_driver_mod.f90 +BRAMS/i10dbg/bin/radiate_mod.f90 +BRAMS/i10dbg/bin/radiate_utils.f90 +BRAMS/i10dbg/bin/rad_mclat.f90 +BRAMS/i10dbg/bin/rad_mclat_mod.f90 +BRAMS/i10dbg/bin/rad_stable.f90 +BRAMS/i10dbg/bin/radvc_adap.f90 +BRAMS/i10dbg/bin/radvc.f90 +BRAMS/i10dbg/bin/radvc_mnt_driver_mod.f90 +BRAMS/i10dbg/bin/radvc_new.f90 +BRAMS/i10dbg/bin/ralph_vars_mod.f90 +BRAMS/i10dbg/bin/ramran_mod.f90 +BRAMS/i10dbg/bin/rams2_mm_mod.f90 +BRAMS/i10dbg/bin/rams_aprep_hkh_mod.f90 +BRAMS/i10dbg/bin/rams_aprep_p_mod.f90 +BRAMS/i10dbg/bin/rams_aprep_vkh_mod.f90 +BRAMS/i10dbg/bin/rams_dintsort_mod.f90 +BRAMS/i10dbg/bin/rams_filelist_mod.f90 +BRAMS/i10dbg/bin/rams_fltsort_mod.f90 +BRAMS/i10dbg/bin/rams_f_open_mod.f90 +BRAMS/i10dbg/bin/rams_getvar_mod.f90 +BRAMS/i10dbg/bin/rams_grad_mod.f90 +BRAMS/i10dbg/bin/rams_grid.f90 +BRAMS/i10dbg/bin/rams_intsort_mod.f90 +BRAMS/i10dbg/bin/rams_master.f90 +BRAMS/i10dbg/bin/rams_master_mod.f90 +BRAMS/i10dbg/bin/rams_mem_alloc.f90 +BRAMS/i10dbg/bin/rams_mem_alloc_mod.f90 +BRAMS/i10dbg/bin/rams_mm_mod.f90 +BRAMS/i10dbg/bin/rams_node_mod.f90 +BRAMS/i10dbg/bin/rams_output_mod.f90 +BRAMS/i10dbg/bin/rams_read_header.f90 +BRAMS/i10dbg/bin/rams_read_header_mod.f90 +BRAMS/i10dbg/bin/rams_sort_dint3_mod.f90 +BRAMS/i10dbg/bin/rams_unique_dint_mod.f90 +BRAMS/i10dbg/bin/rank_down_mod.f90 +BRAMS/i10dbg/bin/rank_up_mod.f90 +BRAMS/i10dbg/bin/ranlavg.f90 +BRAMS/i10dbg/bin/rayf_adap_mod.f90 +BRAMS/i10dbg/bin/rayf_mod.f90 +BRAMS/i10dbg/bin/rayft_mod.f90 +BRAMS/i10dbg/bin/rayleigh_mod.f90 +BRAMS/i10dbg/bin/rbnd_adap.f90 +BRAMS/i10dbg/bin/rbnd.f90 +BRAMS/i10dbg/bin/rcio.f90 +BRAMS/i10dbg/bin/rconstants.f90 +BRAMS/i10dbg/bin/rconv_driver.f90 +BRAMS/i10dbg/bin/rconv_driver_mod.f90 +BRAMS/i10dbg/bin/rdint.f90 +BRAMS/i10dbg/bin/read_ed10_ed20_history_file_mod.f90 +BRAMS/i10dbg/bin/read_ed21_history_file_mod.f90 +BRAMS/i10dbg/bin/read_ed21_history_unstruct_mod.f90 +BRAMS/i10dbg/bin/read_ed21_polyclone_mod.f90 +BRAMS/i10dbg/bin/read_ednl_mod.f90 +BRAMS/i10dbg/bin/read_ed_xml_config_mod.f90 +BRAMS/i10dbg/bin/read_events_xml_mod.f90 +BRAMS/i10dbg/bin/read_hdf_mod.f90 +BRAMS/i10dbg/bin/read_header_mod.f90 +BRAMS/i10dbg/bin/read_nl_mod.f90 +BRAMS/i10dbg/bin/read_plantation_fractions_mod.f90 +BRAMS/i10dbg/bin/read_ralph.f90 +BRAMS/i10dbg/bin/read_site_file_mod.f90 +BRAMS/i10dbg/bin/read_soil_depth_mod.f90 +BRAMS/i10dbg/bin/read_soil_moist_temp_mod.f90 +BRAMS/i10dbg/bin/read_sources_teb_mod.f90 +BRAMS/i10dbg/bin/rearrange_mod.f90 +BRAMS/i10dbg/bin/recycle.f90 +BRAMS/i10dbg/bin/recycle_mod.f90 +BRAMS/i10dbg/bin/refs1d_mod.f90 +BRAMS/i10dbg/bin/refs3d_mod.f90 +BRAMS/i10dbg/bin/ref_sounding.f90 +BRAMS/i10dbg/bin/refstate.f90 +BRAMS/i10dbg/bin/relms_mod.f90 +BRAMS/i10dbg/bin/reord_mod.f90 +BRAMS/i10dbg/bin/reorganize_sources_teb_mod.f90 +BRAMS/i10dbg/bin/reproduction_eq_0_mod.f90 +BRAMS/i10dbg/bin/reproduction.f90 +BRAMS/i10dbg/bin/reproduction_mod.f90 +BRAMS/i10dbg/bin/reset_mod.f90 +BRAMS/i10dbg/bin/resp_f_decomp_mod.f90 +BRAMS/i10dbg/bin/resp_rh_mod.f90 +BRAMS/i10dbg/bin/rexev.f90 +BRAMS/i10dbg/bin/rgbhls_mod.f90 +BRAMS/i10dbg/bin/rgrad.f90 +BRAMS/i10dbg/bin/rhhi.f90 +BRAMS/i10dbg/bin/rinit.f90 +BRAMS/i10dbg/bin/rio.f90 +BRAMS/i10dbg/bin/rk4_coms.f90 +BRAMS/i10dbg/bin/rk4_integ_utils.f90 +BRAMS/i10dbg/bin/rk4_misc.f90 +BRAMS/i10dbg/bin/rmass.f90 +BRAMS/i10dbg/bin/rname.f90 +BRAMS/i10dbg/bin/rnest_par.f90 +BRAMS/i10dbg/bin/rnode.f90 +BRAMS/i10dbg/bin/road_wall_layer_e_budget_mod.f90 +BRAMS/i10dbg/bin/roof_layer_e_budget_mod.f90 +BRAMS/i10dbg/bin/root_resp_norm_mod.f90 +BRAMS/i10dbg/bin/rotate_winds_mod.f90 +BRAMS/i10dbg/bin/rotate_winds_obs_mod.f90 +BRAMS/i10dbg/bin/rowcolmn_mod.f90 +BRAMS/i10dbg/bin/rpara.f90 +BRAMS/i10dbg/bin/rprnt.f90 +BRAMS/i10dbg/bin/rr_sfc_obs_mod.f90 +BRAMS/i10dbg/bin/rr_sfc_ver_mod.f90 +BRAMS/i10dbg/bin/rr_upa_obs_mod.f90 +BRAMS/i10dbg/bin/rr_upa_ver_mod.f90 +BRAMS/i10dbg/bin/rtgintrp_isan_mod.f90 +BRAMS/i10dbg/bin/rtgintrp_mod.f90 +BRAMS/i10dbg/bin/rthrm.f90 +BRAMS/i10dbg/bin/rtimh.f90 +BRAMS/i10dbg/bin/rtimi.f90 +BRAMS/i10dbg/bin/ruser.f90 +BRAMS/i10dbg/bin/satadjst_mod.f90 +BRAMS/i10dbg/bin/scale_ed_radiation_mod.f90 +BRAMS/i10dbg/bin/scl_advectc_plumerise_mod.f90 +BRAMS/i10dbg/bin/scl_misc_mod.f90 +BRAMS/i10dbg/bin/sedim_mod.f90 +BRAMS/i10dbg/bin/sedim_particles_mod.f90 +BRAMS/i10dbg/bin/seed_dispersal_mod.f90 +BRAMS/i10dbg/bin/selective_gaussian_2body_mod.f90 +BRAMS/i10dbg/bin/seter_mod.f90 +BRAMS/i10dbg/bin/set_flam_vert_mod.f90 +BRAMS/i10dbg/bin/set_grid_mod.f90 +BRAMS/i10dbg/bin/setgv_mod.f90 +BRAMS/i10dbg/bin/setlapseparms_mod.f90 +BRAMS/i10dbg/bin/set_mod.f90 +BRAMS/i10dbg/bin/set_polygon_coordinates_edcp_mod.f90 +BRAMS/i10dbg/bin/set_polygon_coordinates_mod.f90 +BRAMS/i10dbg/bin/set_site_defprops_mod.f90 +BRAMS/i10dbg/bin/setusv_mod.f90 +BRAMS/i10dbg/bin/sfc_check_mod.f90 +BRAMS/i10dbg/bin/sfc_data_convert_mod.f90 +BRAMS/i10dbg/bin/sfcdata_ed_mod.f90 +BRAMS/i10dbg/bin/sfcdata_mod.f90 +BRAMS/i10dbg/bin/sfc_fields_adap_mod.f90 +BRAMS/i10dbg/bin/sfc_fields_mod.f90 +BRAMS/i10dbg/bin/sfcinit_file_mod.f90 +BRAMS/i10dbg/bin/sfcinit_file_user_mod.f90 +BRAMS/i10dbg/bin/sfcinit_hstart_mod.f90 +BRAMS/i10dbg/bin/sfcinit_nofile_mod.f90 +BRAMS/i10dbg/bin/sfcinit_nofile_user_mod.f90 +BRAMS/i10dbg/bin/sfc_obs_convert_mod.f90 +BRAMS/i10dbg/bin/sfcopqr_mod.f90 +BRAMS/i10dbg/bin/sfc_pcp_mod.f90 +BRAMS/i10dbg/bin/sfcproc_mod.f90 +BRAMS/i10dbg/bin/sfcprt_mod.f90 +BRAMS/i10dbg/bin/sfcqual_mod.f90 +BRAMS/i10dbg/bin/sfcrad_ed_mod.f90 +BRAMS/i10dbg/bin/sfc_read_mod.f90 +BRAMS/i10dbg/bin/sfc_write_mod.f90 +BRAMS/i10dbg/bin/sflush_mod.f90 +BRAMS/i10dbg/bin/sfseti_mod.f90 +BRAMS/i10dbg/bin/sfsgfa_mod.f90 +BRAMS/i10dbg/bin/sh2mod_mod.f90 +BRAMS/i10dbg/bin/shcu_env_mod.f90 +BRAMS/i10dbg/bin/shcupar_mod.f90 +BRAMS/i10dbg/bin/shcu_vars_const.f90 +BRAMS/i10dbg/bin/short2diff_sib_mod.f90 +BRAMS/i10dbg/bin/short_bdown_weissnorman_mod.f90 +BRAMS/i10dbg/bin/shradc_mod.f90 +BRAMS/i10dbg/bin/shradp_mod.f90 +BRAMS/i10dbg/bin/sh_rates_mod.f90 +BRAMS/i10dbg/bin/sigzio_mod.f90 +BRAMS/i10dbg/bin/simple_lake_model_mod.f90 +BRAMS/i10dbg/bin/sndproc_mod.f90 +BRAMS/i10dbg/bin/sngloff_mod.f90 +BRAMS/i10dbg/bin/snowinit_mod.f90 +BRAMS/i10dbg/bin/soil_default_fill_mod.f90 +BRAMS/i10dbg/bin/soil_idx2water_mod.f90 +BRAMS/i10dbg/bin/soil_moisture_init.f90 +BRAMS/i10dbg/bin/soil_moisture_init_mod.f90 +BRAMS/i10dbg/bin/soil_respiration.f90 +BRAMS/i10dbg/bin/soil_respiration_mod.f90 +BRAMS/i10dbg/bin/solar_radiation_breakdown_mod.f90 +BRAMS/i10dbg/bin/sort3_mod.f90 +BRAMS/i10dbg/bin/sort_down_mod.f90 +BRAMS/i10dbg/bin/sort_up_mod.f90 +BRAMS/i10dbg/bin/soundtopo_mod.f90 +BRAMS/i10dbg/bin/sources_teb_mod.f90 +BRAMS/i10dbg/bin/souza_cupar_driver.f90 +BRAMS/i10dbg/bin/souza_cupar_driver_mod.f90 +BRAMS/i10dbg/bin/spline1_mod.f90 +BRAMS/i10dbg/bin/spline2_mod.f90 +BRAMS/i10dbg/bin/sst_check_header_mod.f90 +BRAMS/i10dbg/bin/sst_file_inv_mod.f90 +BRAMS/i10dbg/bin/sstinit_mod.f90 +BRAMS/i10dbg/bin/sstinit_user_mod.f90 +BRAMS/i10dbg/bin/sstnest_mod.f90 +BRAMS/i10dbg/bin/sst_read_dataheader_mod.f90 +BRAMS/i10dbg/bin/sst_read.f90 +BRAMS/i10dbg/bin/sst_read_mod.f90 +BRAMS/i10dbg/bin/sst_read_new_mod.f90 +BRAMS/i10dbg/bin/sst_update_mod.f90 +BRAMS/i10dbg/bin/sst_write_mod.f90 +BRAMS/i10dbg/bin/ssum_mod.f90 +BRAMS/i10dbg/bin/stable_cohorts.f90 +BRAMS/i10dbg/bin/stable_mod.f90 +BRAMS/i10dbg/bin/stainterp_mod.f90 +BRAMS/i10dbg/bin/staprt_mod.f90 +BRAMS/i10dbg/bin/stline_mod.f90 +BRAMS/i10dbg/bin/storage_theta_mod.f90 +BRAMS/i10dbg/bin/strain_adap_mod.f90 +BRAMS/i10dbg/bin/strain_mod.f90 +BRAMS/i10dbg/bin/strmfun_mod.f90 +BRAMS/i10dbg/bin/strmln_mod.f90 +BRAMS/i10dbg/bin/structural_growth_eq_0_mod.f90 +BRAMS/i10dbg/bin/structural_growth.f90 +BRAMS/i10dbg/bin/structural_growth_mod.f90 +BRAMS/i10dbg/bin/sublimate_mod.f90 +BRAMS/i10dbg/bin/sumn_mod.f90 +BRAMS/i10dbg/bin/sunavg_mod.f90 +BRAMS/i10dbg/bin/surface_aero_cond_mod.f90 +BRAMS/i10dbg/bin/surface_cd_mod.f90 +BRAMS/i10dbg/bin/surface_ri_mod.f90 +BRAMS/i10dbg/bin/swap32_mod.f90 +BRAMS/i10dbg/bin/sw_multiple_scatter_mod.f90 +BRAMS/i10dbg/bin/sw_twostream_clump_mod.f90 +BRAMS/i10dbg/bin/sxy_mod.f90 +BRAMS/i10dbg/bin/tabhab_mod.f90 +BRAMS/i10dbg/bin/tabmelt_mod.f90 +BRAMS/i10dbg/bin/tebc_init_mod.f90 +BRAMS/i10dbg/bin/teb_init_mod.f90 +BRAMS/i10dbg/bin/teb_spm_start.f90 +BRAMS/i10dbg/bin/tend0_mod.f90 +BRAMS/i10dbg/bin/tend0_plumerise_mod.f90 +BRAMS/i10dbg/bin/tend_accum_mod.f90 +BRAMS/i10dbg/bin/tendgas_mod.f90 +BRAMS/i10dbg/bin/test_mod.f90 +BRAMS/i10dbg/bin/therm_lib8.f90 +BRAMS/i10dbg/bin/therm_lib.f90 +BRAMS/i10dbg/bin/thermo_boundary_driver_mod.f90 +BRAMS/i10dbg/bin/thermo_mod.f90 +BRAMS/i10dbg/bin/timestep_mod.f90 +BRAMS/i10dbg/bin/timing_mod.f90 +BRAMS/i10dbg/bin/tkeeps_mod.f90 +BRAMS/i10dbg/bin/tkeinit_mod.f90 +BRAMS/i10dbg/bin/tkemy_mod.f90 +BRAMS/i10dbg/bin/tkenn.f90 +BRAMS/i10dbg/bin/tkescl_mod.f90 +BRAMS/i10dbg/bin/tokenize1_mod.f90 +BRAMS/i10dbg/bin/tokenize_mod.f90 +BRAMS/i10dbg/bin/tokfind_mod.f90 +BRAMS/i10dbg/bin/tolower_mod.f90 +BRAMS/i10dbg/bin/top_check_mod.f90 +BRAMS/i10dbg/bin/topobnd_mod.f90 +BRAMS/i10dbg/bin/topoq_mod.f90 +BRAMS/i10dbg/bin/toposmooth_mod.f90 +BRAMS/i10dbg/bin/top_read_mod.f90 +BRAMS/i10dbg/bin/topset_mod.f90 +BRAMS/i10dbg/bin/toptinit_mod.f90 +BRAMS/i10dbg/bin/toptinit_user_mod.f90 +BRAMS/i10dbg/bin/toptnest_mod.f90 +BRAMS/i10dbg/bin/toptsmth_mod.f90 +BRAMS/i10dbg/bin/top_write_mod.f90 +BRAMS/i10dbg/bin/trans_conv_mflx_mod.f90 +BRAMS/i10dbg/bin/transfer_ed2leaf_mod.f90 +BRAMS/i10dbg/bin/transfm_mod.f90 +BRAMS/i10dbg/bin/tricheck_mod.f90 +BRAMS/i10dbg/bin/trid2_mod.f90 +BRAMS/i10dbg/bin/tridiff1_adap_mod.f90 +BRAMS/i10dbg/bin/tridiff1_mod.f90 +BRAMS/i10dbg/bin/tridiff2_mod.f90 +BRAMS/i10dbg/bin/tridiff2orig_mod.f90 +BRAMS/i10dbg/bin/trid_mod.f90 +BRAMS/i10dbg/bin/tri_intp_cofs_mod.f90 +BRAMS/i10dbg/bin/trncl1_mod.f90 +BRAMS/i10dbg/bin/trncl2_mod.f90 +BRAMS/i10dbg/bin/trsets_mod.f90 +BRAMS/i10dbg/bin/trtend_mod.f90 +BRAMS/i10dbg/bin/trueps60_ps_mod.f90 +BRAMS/i10dbg/bin/trueps60_ps_rot_mod.f90 +BRAMS/i10dbg/bin/trueps60_uevetouv_mod.f90 +BRAMS/i10dbg/bin/trueps60_uvtoueve_mod.f90 +BRAMS/i10dbg/bin/truhor_mod.f90 +BRAMS/i10dbg/bin/truhor_opt_mod.f90 +BRAMS/i10dbg/bin/turb_coms.f90 +BRAMS/i10dbg/bin/turb_derivs.f90 +BRAMS/i10dbg/bin/turb_diff_adap.f90 +BRAMS/i10dbg/bin/turb_diff.f90 +BRAMS/i10dbg/bin/turb_k_adap.f90 +BRAMS/i10dbg/bin/turb_ke.f90 +BRAMS/i10dbg/bin/turb_k.f90 +BRAMS/i10dbg/bin/twostream_rad.f90 +BRAMS/i10dbg/bin/uevetouv_mod.f90 +BRAMS/i10dbg/bin/ugetarg_mod.f90 +BRAMS/i10dbg/bin/unarrange_mod.f90 +BRAMS/i10dbg/bin/unfdbackp_fixed_mod.f90 +BRAMS/i10dbg/bin/unfdbackp_mod.f90 +BRAMS/i10dbg/bin/unfpack1_mod.f90 +BRAMS/i10dbg/bin/unfpack_mod.f90 +BRAMS/i10dbg/bin/unmkbuff_mod.f90 +BRAMS/i10dbg/bin/upa_get_profile_mod.f90 +BRAMS/i10dbg/bin/upa_interp_mod.f90 +BRAMS/i10dbg/bin/update_c_and_n_pools_mod.f90 +BRAMS/i10dbg/bin/update_cohort_extensive_props_mod.f90 +BRAMS/i10dbg/bin/update_derived_cohort_props_mod.f90 +BRAMS/i10dbg/bin/update_derived_props.f90 +BRAMS/i10dbg/bin/update_derived_props_mod.f90 +BRAMS/i10dbg/bin/update_diagnostic_vars_mod.f90 +BRAMS/i10dbg/bin/update_ed_yearly_vars_mod.f90 +BRAMS/i10dbg/bin/updatehydroparms_mod.f90 +BRAMS/i10dbg/bin/update_model_time_dm_mod.f90 +BRAMS/i10dbg/bin/update_mod.f90 +BRAMS/i10dbg/bin/update_patch_derived_props_mod.f90 +BRAMS/i10dbg/bin/update_patch_thermo_fmean_mod.f90 +BRAMS/i10dbg/bin/update_patch_thermo_props_mod.f90 +BRAMS/i10dbg/bin/update_phenology_eq_0_mod.f90 +BRAMS/i10dbg/bin/update_phenology_mod.f90 +BRAMS/i10dbg/bin/update_plumerise_mod.f90 +BRAMS/i10dbg/bin/update_polygon_derived_props_mod.f90 +BRAMS/i10dbg/bin/update_psibar_mod.f90 +BRAMS/i10dbg/bin/update_rad_avg_mod.f90 +BRAMS/i10dbg/bin/update_site_derived_props_mod.f90 +BRAMS/i10dbg/bin/update_thermo_mod.f90 +BRAMS/i10dbg/bin/update_vital_rates_mod.f90 +BRAMS/i10dbg/bin/updatewatertableadd_mod.f90 +BRAMS/i10dbg/bin/updatewatertablebaseflow_mod.f90 +BRAMS/i10dbg/bin/updatewatertablesubtract_mod.f90 +BRAMS/i10dbg/bin/update_workload_mod.f90 +BRAMS/i10dbg/bin/urban_canopy.f90 +BRAMS/i10dbg/bin/urban_canopy_mod.f90 +BRAMS/i10dbg/bin/urban_drag_mod.f90 +BRAMS/i10dbg/bin/urban.f90 +BRAMS/i10dbg/bin/urban_hydro_mod.f90 +BRAMS/i10dbg/bin/urban_lw_coef_mod.f90 +BRAMS/i10dbg/bin/urban_mod.f90 +BRAMS/i10dbg/bin/urban_solar_abs_mod.f90 +BRAMS/i10dbg/bin/urb_drag_init_mod.f90 +BRAMS/i10dbg/bin/urb_tend_mod.f90 +BRAMS/i10dbg/bin/utils_f.f90 +BRAMS/i10dbg/bin/uvlc_uvll_mod.f90 +BRAMS/i10dbg/bin/uvll_uvlc_mod.f90 +BRAMS/i10dbg/bin/uvtoueve_mod.f90 +BRAMS/i10dbg/bin/uwc_mod.f90 +BRAMS/i10dbg/bin/uwcomp_mod.f90 +BRAMS/i10dbg/bin/valugp_mod.f90 +BRAMS/i10dbg/bin/vapdiff_mod.f90 +BRAMS/i10dbg/bin/vapflux_mod.f90 +BRAMS/i10dbg/bin/vapthrm_mod.f90 +BRAMS/i10dbg/bin/varf_adap_mod.f90 +BRAMS/i10dbg/bin/varf_file_inv_mod.f90 +BRAMS/i10dbg/bin/varfile_nstfeed_mod.f90 +BRAMS/i10dbg/bin/varfile_refstate_mod.f90 +BRAMS/i10dbg/bin/varf_read.f90 +BRAMS/i10dbg/bin/varf_read_mod.f90 +BRAMS/i10dbg/bin/varf_update.f90 +BRAMS/i10dbg/bin/varf_update_mod.f90 +BRAMS/i10dbg/bin/varref_mod.f90 +BRAMS/i10dbg/bin/var_tables.f90 +BRAMS/i10dbg/bin/varutils.f90 +BRAMS/i10dbg/bin/varuv_mod.f90 +BRAMS/i10dbg/bin/varweight_mod.f90 +BRAMS/i10dbg/bin/vcirec_mod.f90 +BRAMS/i10dbg/bin/vcorec_mod.f90 +BRAMS/i10dbg/bin/vctran_mod.f90 +BRAMS/i10dbg/bin/vector_mod.f90 +BRAMS/i10dbg/bin/vegetation_dynamics_eq_0_mod.f90 +BRAMS/i10dbg/bin/vegetation_dynamics.f90 +BRAMS/i10dbg/bin/vegetation_dynamics_mod.f90 +BRAMS/i10dbg/bin/vegndvi_mod.f90 +BRAMS/i10dbg/bin/vel_advectc_adap_mod.f90 +BRAMS/i10dbg/bin/vel_advectc_mod.f90 +BRAMS/i10dbg/bin/vel_advectc_plumerise_mod.f90 +BRAMS/i10dbg/bin/velvct_mod.f90 +BRAMS/i10dbg/bin/vertmap2_mod.f90 +BRAMS/i10dbg/bin/vfinit_mod.f90 +BRAMS/i10dbg/bin/vfintrpf_mod.f90 +BRAMS/i10dbg/bin/vfirec_mod.f90 +BRAMS/i10dbg/bin/vforec_mod.f90 +BRAMS/i10dbg/bin/vformat.f90 +BRAMS/i10dbg/bin/viirec_mod.f90 +BRAMS/i10dbg/bin/v_interps.f90 +BRAMS/i10dbg/bin/viorec_mod.f90 +BRAMS/i10dbg/bin/visc_w_mod.f90 +BRAMS/i10dbg/bin/visurf_mod.f90 +BRAMS/i10dbg/bin/vmissr_mod.f90 +BRAMS/i10dbg/bin/vmissw_mod.f90 +BRAMS/i10dbg/bin/vpsets_mod.f90 +BRAMS/i10dbg/bin/vshyd_mod.f90 +BRAMS/i10dbg/bin/vtab_fill.f90 +BRAMS/i10dbg/bin/vtables2_mod.f90 +BRAMS/i10dbg/bin/vtables_scalar_mod.f90 +BRAMS/i10dbg/bin/vtables_scalar_new_mod.f90 +BRAMS/i10dbg/bin/vterpp_i_mod.f90 +BRAMS/i10dbg/bin/vterpp_s_mod.f90 +BRAMS/i10dbg/bin/vwrti_mod.f90 +BRAMS/i10dbg/bin/vwrt_mod.f90 +BRAMS/i10dbg/bin/w3fb06_mod.f90 +BRAMS/i10dbg/bin/w3fb07_mod.f90 +BRAMS/i10dbg/bin/walltime_mod.f90 +BRAMS/i10dbg/bin/warning_mod.f90 +BRAMS/i10dbg/bin/waterbal_mod.f90 +BRAMS/i10dbg/bin/wetthrm3_mod.f90 +BRAMS/i10dbg/bin/winddf_mod.f90 +BRAMS/i10dbg/bin/winduv_mod.f90 +BRAMS/i10dbg/bin/writebin_mod.f90 +BRAMS/i10dbg/bin/write_ed_xml_config_mod.f90 +BRAMS/i10dbg/bin/writehydro_mod.f90 +BRAMS/i10dbg/bin/w_shallow_mod.f90 +BRAMS/i10dbg/bin/wtstr_mod.f90 +BRAMS/i10dbg/bin/x02_mod.f90 +BRAMS/i10dbg/bin/xcol2array_mod.f90 +BRAMS/i10dbg/bin/xj_mod.f90 +BRAMS/i10dbg/bin/xy_ij_mod.f90 +BRAMS/i10dbg/bin/xy_ll_mod.f90 +BRAMS/i10dbg/bin/ycol2array_mod.f90 +BRAMS/i10dbg/bin/yesterday_info_mod.f90 +BRAMS/i10dbg/bin/yesterday_mod.f90 +BRAMS/i10dbg/bin/zcol2array_mod.f90 +BRAMS/i10dbg/bin/ze_dims_mod.f90 +BRAMS/i10dbg/bin/zen_mod.f90 +BRAMS/i10dbg/bin/zeragas_mod.f90 +BRAMS/i10dbg/bin/zero_ed_dmean_vars_mod.f90 +BRAMS/i10dbg/bin/zero_ed_fmean_vars_mod.f90 +BRAMS/i10dbg/bin/zero_ed_mmean_vars_mod.f90 +BRAMS/i10dbg/bin/zero_ed_qmean_vars_mod.f90 +BRAMS/i10dbg/bin/zero_ed_today_vars_mod.f90 +BRAMS/i10dbg/bin/zero_ed_yearly_vars_mod.f90 +BRAMS/i10dbg/bin/zeroout_mod.f90 +BRAMS/i10dbg/bin/zoq_mod.f90 +ED/dbgbuild/bin/a3e0_mod.f90 +ED/dbgbuild/bin/a3e1_mod.f90 +ED/dbgbuild/bin/a3e2_mod.f90 +ED/dbgbuild/bin/accum_mod.f90 +ED/dbgbuild/bin/acnst_mod.f90 +ED/dbgbuild/bin/adivb_mod.f90 +ED/dbgbuild/bin/adjust_sfcw_properties_mod.f90 +ED/dbgbuild/bin/adjust_topsoil_properties_mod.f90 +ED/dbgbuild/bin/adjust_veg_properties_mod.f90 +ED/dbgbuild/bin/ae0_mod.f90 +ED/dbgbuild/bin/ae1m1_mod.f90 +ED/dbgbuild/bin/ae1_mod.f90 +ED/dbgbuild/bin/ae1p1_mod.f90 +ED/dbgbuild/bin/ae1p1p1_mod.f90 +ED/dbgbuild/bin/ae1t0_mod.f90 +ED/dbgbuild/bin/ae1t0p1_mod.f90 +ED/dbgbuild/bin/ae1t1_mod.f90 +ED/dbgbuild/bin/ae1t1p1_mod.f90 +ED/dbgbuild/bin/ae1tn1_mod.f90 +ED/dbgbuild/bin/ae2_mod.f90 +ED/dbgbuild/bin/ae3m3d0_mod.f90 +ED/dbgbuild/bin/ae3m3_mod.f90 +ED/dbgbuild/bin/ae3_mod.f90 +ED/dbgbuild/bin/ae3p3_mod.f90 +ED/dbgbuild/bin/ae3t0p3_mod.f90 +ED/dbgbuild/bin/ae3t3_mod.f90 +ED/dbgbuild/bin/ae3t3p3_mod.f90 +ED/dbgbuild/bin/aen1_mod.f90 +ED/dbgbuild/bin/aen3t0p3_mod.f90 +ED/dbgbuild/bin/aggregate_polygon_fmean_mod.f90 +ED/dbgbuild/bin/aggregate_polygon_not_fmean_mod.f90 +ED/dbgbuild/bin/alebl_mod.f90 +ED/dbgbuild/bin/allometry.f90 +ED/dbgbuild/bin/angle_of_incid_mod.f90 +ED/dbgbuild/bin/an_header.f90 +ED/dbgbuild/bin/aone_mod.f90 +ED/dbgbuild/bin/apply_forestry_mod.f90 +ED/dbgbuild/bin/array2xcol_mod.f90 +ED/dbgbuild/bin/array2ycol_mod.f90 +ED/dbgbuild/bin/array2zcol_mod.f90 +ED/dbgbuild/bin/assign_prescribed_phen_mod.f90 +ED/dbgbuild/bin/atimb_mod.f90 +ED/dbgbuild/bin/atob_log_mod.f90 +ED/dbgbuild/bin/atob_mod.f90 +ED/dbgbuild/bin/average_utils.f90 +ED/dbgbuild/bin/avg_ed_daily_output_pool_mod.f90 +ED/dbgbuild/bin/azero_mod.f90 +ED/dbgbuild/bin/banbks_mod.f90 +ED/dbgbuild/bin/bandec_mod.f90 +ED/dbgbuild/bin/bdf2_solver.f90 +ED/dbgbuild/bin/bdf2_solver_mod.f90 +ED/dbgbuild/bin/budget_utils.f90 +ED/dbgbuild/bin/c34constants.f90 +ED/dbgbuild/bin/calc_flow_routing_mod.f90 +ED/dbgbuild/bin/calchydrosubsurface_mod.f90 +ED/dbgbuild/bin/calchydrosurface_mod.f90 +ED/dbgbuild/bin/calc_met_lapse_mod.f90 +ED/dbgbuild/bin/calcwatertable_mod.f90 +ED/dbgbuild/bin/canopy_air_coms.f90 +ED/dbgbuild/bin/canopy_derivs_two_mod.f90 +ED/dbgbuild/bin/canopy_layer_coms.f90 +ED/dbgbuild/bin/canopy_photosynthesis_mod.f90 +ED/dbgbuild/bin/canopy_radiation_coms.f90 +ED/dbgbuild/bin/canopy_struct_dynamics.f90 +ED/dbgbuild/bin/cbrt8_mod.f90 +ED/dbgbuild/bin/cbrt_mod.f90 +ED/dbgbuild/bin/cdf2normal_mod.f90 +ED/dbgbuild/bin/cdf_mod.f90 +ED/dbgbuild/bin/char_strip_var_mod.f90 +ED/dbgbuild/bin/charutils.f90 +ED/dbgbuild/bin/check_real_mod.f90 +ED/dbgbuild/bin/check_rescale_mod.f90 +ED/dbgbuild/bin/compute_c_and_n_storage_mod.f90 +ED/dbgbuild/bin/copy_bdf2_prev_mod.f90 +ED/dbgbuild/bin/copy_fb_patch_mod.f90 +ED/dbgbuild/bin/copy_initp2prev_mod.f90 +ED/dbgbuild/bin/copy_met_2_rk4site_mod.f90 +ED/dbgbuild/bin/copy_nl_mod.f90 +ED/dbgbuild/bin/copy_patch_init_carbon_mod.f90 +ED/dbgbuild/bin/copy_patch_init_mod.f90 +ED/dbgbuild/bin/copy_path_from_grid_1_mod.f90 +ED/dbgbuild/bin/copy_prev2patch_mod.f90 +ED/dbgbuild/bin/copy_rk4_patch_mod.f90 +ED/dbgbuild/bin/count_pft_xml_config_mod.f90 +ED/dbgbuild/bin/cputime_mod.f90 +ED/dbgbuild/bin/create_ed10_ed20_fname_mod.f90 +ED/dbgbuild/bin/cumsum_mod.f90 +ED/dbgbuild/bin/cvmgm_mod.f90 +ED/dbgbuild/bin/cvmgn_mod.f90 +ED/dbgbuild/bin/cvmgp_mod.f90 +ED/dbgbuild/bin/cvmgz_mod.f90 +ED/dbgbuild/bin/date_2_seconds_mod.f90 +ED/dbgbuild/bin/date_abs_secs2_mod.f90 +ED/dbgbuild/bin/date_add_to_mod.f90 +ED/dbgbuild/bin/date_secs_ymdt_mod.f90 +ED/dbgbuild/bin/date_unmake_big_mod.f90 +ED/dbgbuild/bin/dateutils.f90 +ED/dbgbuild/bin/dcvmgm_mod.f90 +ED/dbgbuild/bin/dcvmgp_mod.f90 +ED/dbgbuild/bin/dcw_swap16_mod.f90 +ED/dbgbuild/bin/dcw_swap32_mod.f90 +ED/dbgbuild/bin/dcw_swap64_mod.f90 +ED/dbgbuild/bin/deblank_mod.f90 +ED/dbgbuild/bin/decomp_coms.f90 +ED/dbgbuild/bin/detab_mod.f90 +ED/dbgbuild/bin/detailed_coms.f90 +ED/dbgbuild/bin/diagon_mod.f90 +ED/dbgbuild/bin/dist_gc_mod.f90 +ED/dbgbuild/bin/disturbance.f90 +ED/dbgbuild/bin/disturb_coms.f90 +ED/dbgbuild/bin/dmax2_mod.f90 +ED/dbgbuild/bin/dmin2_mod.f90 +ED/dbgbuild/bin/dssum_mod.f90 +ED/dbgbuild/bin/dump_radinfo_mod.f90 +ED/dbgbuild/bin/ed1_fileinfo_mod.f90 +ED/dbgbuild/bin/ed_1st.f90 +ED/dbgbuild/bin/ed_1st_master_mod.f90 +ED/dbgbuild/bin/ed_1st_node_mod.f90 +ED/dbgbuild/bin/ed21_fileinfo_mod.f90 +ED/dbgbuild/bin/ed_bigleaf_init.f90 +ED/dbgbuild/bin/ed_bigleaf_init_mod.f90 +ED/dbgbuild/bin/ed_datp_datq_mod.f90 +ED/dbgbuild/bin/ed_datp_datsoil_mod.f90 +ED/dbgbuild/bin/ed_driver.f90 +ED/dbgbuild/bin/ed_driver_mod.f90 +ED/dbgbuild/bin/ed_filelist_mod.f90 +ED/dbgbuild/bin/ed_grid.f90 +ED/dbgbuild/bin/ed_gridset_mod.f90 +ED/dbgbuild/bin/ed_init_atm_mod.f90 +ED/dbgbuild/bin/ed_init.f90 +ED/dbgbuild/bin/edio.f90 +ED/dbgbuild/bin/ed_ll_xy_mod.f90 +ED/dbgbuild/bin/ed_load_namelist.f90 +ED/dbgbuild/bin/ed_load_work_from_history_mod.f90 +ED/dbgbuild/bin/ed_masterput_met_header_mod.f90 +ED/dbgbuild/bin/ed_masterput_nl_mod.f90 +ED/dbgbuild/bin/ed_masterput_poly_dims_mod.f90 +ED/dbgbuild/bin/ed_masterput_processid_mod.f90 +ED/dbgbuild/bin/ed_masterput_worklist_info_mod.f90 +ED/dbgbuild/bin/ed_mem_alloc.f90 +ED/dbgbuild/bin/ed_mem_alloc_mod.f90 +ED/dbgbuild/bin/ed_mem_grid_dim_defs.f90 +ED/dbgbuild/bin/ed_met_driver.f90 +ED/dbgbuild/bin/ed_misc_coms.f90 +ED/dbgbuild/bin/ed_model.f90 +ED/dbgbuild/bin/ed_model_mod.f90 +ED/dbgbuild/bin/ed_mpass_init.f90 +ED/dbgbuild/bin/ed_nbg_init.f90 +ED/dbgbuild/bin/ed_newgrid_mod.f90 +ED/dbgbuild/bin/ed_node_coms.f90 +ED/dbgbuild/bin/ed_node_decomp_mod.f90 +ED/dbgbuild/bin/ed_nodeget_met_header_mod.f90 +ED/dbgbuild/bin/ed_nodeget_nl_mod.f90 +ED/dbgbuild/bin/ed_nodeget_poly_dims_mod.f90 +ED/dbgbuild/bin/ed_nodeget_processid_mod.f90 +ED/dbgbuild/bin/ed_nodeget_worklist_info_mod.f90 +ED/dbgbuild/bin/ed_opspec_grid_mod.f90 +ED/dbgbuild/bin/ed_opspec_misc_mod.f90 +ED/dbgbuild/bin/ed_opspec_par_mod.f90 +ED/dbgbuild/bin/ed_opspec_times_mod.f90 +ED/dbgbuild/bin/ed_output_mod.f90 +ED/dbgbuild/bin/ed_para_coms.f90 +ED/dbgbuild/bin/ed_params.f90 +ED/dbgbuild/bin/ed_parvec_work_mod.f90 +ED/dbgbuild/bin/ed_polarst_mod.f90 +ED/dbgbuild/bin/ed_print.f90 +ED/dbgbuild/bin/ed_read_ed10_20_history.f90 +ED/dbgbuild/bin/ed_state_vars.f90 +ED/dbgbuild/bin/ed_therm_lib.f90 +ED/dbgbuild/bin/ed_type_init.f90 +ED/dbgbuild/bin/ed_var_tables.f90 +ED/dbgbuild/bin/ed_work_vars.f90 +ED/dbgbuild/bin/ed_xml_config.f90 +ED/dbgbuild/bin/ed_xy_ll_mod.f90 +ED/dbgbuild/bin/ed_zen_mod.f90 +ED/dbgbuild/bin/eifun8_mod.f90 +ED/dbgbuild/bin/elgs_mod.f90 +ED/dbgbuild/bin/ename_coms.f90 +ED/dbgbuild/bin/endian_mod.f90 +ED/dbgbuild/bin/errorfun_mod.f90 +ED/dbgbuild/bin/euler_driver.f90 +ED/dbgbuild/bin/euler_integ_mod.f90 +ED/dbgbuild/bin/euler_timestep_mod.f90 +ED/dbgbuild/bin/event_fertilize_mod.f90 +ED/dbgbuild/bin/event_fire_mod.f90 +ED/dbgbuild/bin/event_harvest_mod.f90 +ED/dbgbuild/bin/event_irrigate_mod.f90 +ED/dbgbuild/bin/event_planting_mod.f90 +ED/dbgbuild/bin/events.f90 +ED/dbgbuild/bin/event_till_mod.f90 +ED/dbgbuild/bin/expected_mod.f90 +ED/dbgbuild/bin/expmsq_mod.f90 +ED/dbgbuild/bin/exterminate_patches_except_mod.f90 +ED/dbgbuild/bin/fail_whale_mod.f90 +ED/dbgbuild/bin/farq_leuning.f90 +ED/dbgbuild/bin/fatal_error.f90 +ED/dbgbuild/bin/fatal_error_mod.f90 +ED/dbgbuild/bin/fb_dy_step_trunc_mod.f90 +ED/dbgbuild/bin/fb_sanity_check_mod.f90 +ED/dbgbuild/bin/fill_history_grid_m11_mod.f90 +ED/dbgbuild/bin/fill_history_grid_m12_mod.f90 +ED/dbgbuild/bin/fill_history_grid_mod.f90 +ED/dbgbuild/bin/fill_history_grid_p11dmean_mod.f90 +ED/dbgbuild/bin/fill_history_grid_p11mmean_mod.f90 +ED/dbgbuild/bin/fill_history_grid_p11_mod.f90 +ED/dbgbuild/bin/fill_history_grid_p12_mod.f90 +ED/dbgbuild/bin/fill_history_grid_p146_mod.f90 +ED/dbgbuild/bin/fill_history_grid_p19_mod.f90 +ED/dbgbuild/bin/fill_history_patch_mod.f90 +ED/dbgbuild/bin/fill_history_polygon_mod.f90 +ED/dbgbuild/bin/fill_history_site_mod.f90 +ED/dbgbuild/bin/fillvar_l_mod.f90 +ED/dbgbuild/bin/find_closing_comment_mod.f90 +ED/dbgbuild/bin/find_frqsum_mod.f90 +ED/dbgbuild/bin/findln_mod.f90 +ED/dbgbuild/bin/find_rank_mod.f90 +ED/dbgbuild/bin/fire.f90 +ED/dbgbuild/bin/fire_frequency_mod.f90 +ED/dbgbuild/bin/flag_stable_cohorts_mod.f90 +ED/dbgbuild/bin/forestry.f90 +ED/dbgbuild/bin/fuse_fiss_utils.f90 +ED/dbgbuild/bin/fusion_fission_coms.f90 +ED/dbgbuild/bin/getconfigint_mod.f90 +ED/dbgbuild/bin/getconfigreal_mod.f90 +ED/dbgbuild/bin/getconfigstring_mod.f90 +ED/dbgbuild/bin/get_errmax_mod.f90 +ED/dbgbuild/bin/get_file_indices_mod.f90 +ED/dbgbuild/bin/get_grid_mod.f90 +ED/dbgbuild/bin/geth5dims_mod.f90 +ED/dbgbuild/bin/getll_mod.f90 +ED/dbgbuild/bin/get_work_mod.f90 +ED/dbgbuild/bin/get_yscal_mod.f90 +ED/dbgbuild/bin/great_circle.f90 +ED/dbgbuild/bin/grid_coms.f90 +ED/dbgbuild/bin/growth_balive.f90 +ED/dbgbuild/bin/h5_output_mod.f90 +ED/dbgbuild/bin/harv_immat_patches_mod.f90 +ED/dbgbuild/bin/harv_mat_patches_mod.f90 +ED/dbgbuild/bin/hdf_getslab_d_mod.f90 +ED/dbgbuild/bin/hdf_getslab_i_mod.f90 +ED/dbgbuild/bin/hdf_getslab_r_mod.f90 +ED/dbgbuild/bin/heav_mod.f90 +ED/dbgbuild/bin/het_resp_weight_mod.f90 +ED/dbgbuild/bin/heun_driver.f90 +ED/dbgbuild/bin/heun_integ_mod.f90 +ED/dbgbuild/bin/heun_stepper_mod.f90 +ED/dbgbuild/bin/heun_timestep_mod.f90 +ED/dbgbuild/bin/how_to_read_a_file_mod.f90 +ED/dbgbuild/bin/hybrid_driver.f90 +ED/dbgbuild/bin/hybrid_integ_mod.f90 +ED/dbgbuild/bin/hybrid_timestep_mod.f90 +ED/dbgbuild/bin/hydrology_coms.f90 +ED/dbgbuild/bin/hydrology_constants.f90 +ED/dbgbuild/bin/ibias_mod.f90 +ED/dbgbuild/bin/ibindec_mod.f90 +ED/dbgbuild/bin/ifirstchar_mod.f90 +ED/dbgbuild/bin/inc_fwd_patch_mod.f90 +ED/dbgbuild/bin/inc_rk4_patch_mod.f90 +ED/dbgbuild/bin/init_can_air_params_mod.f90 +ED/dbgbuild/bin/init_can_lyr_params_mod.f90 +ED/dbgbuild/bin/init_can_rad_params_mod.f90 +ED/dbgbuild/bin/init_cohorts_by_layers_mod.f90 +ED/dbgbuild/bin/init_decomp_params_mod.f90 +ED/dbgbuild/bin/init_disturb_params_mod.f90 +ED/dbgbuild/bin/init_ed_cohort_vars_mod.f90 +ED/dbgbuild/bin/init_ed_misc_coms_mod.f90 +ED/dbgbuild/bin/init_ed_patch_vars_mod.f90 +ED/dbgbuild/bin/init_ed_poly_vars_mod.f90 +ED/dbgbuild/bin/init_ed_site_vars_mod.f90 +ED/dbgbuild/bin/init_ff_coms_mod.f90 +ED/dbgbuild/bin/init_full_history_restart_mod.f90 +ED/dbgbuild/bin/init_hydro_coms_mod.f90 +ED/dbgbuild/bin/inithydrology_mod.f90 +ED/dbgbuild/bin/init_hydro_sites.f90 +ED/dbgbuild/bin/inithydrosubsurface_mod.f90 +ED/dbgbuild/bin/initialize_rk4patches_mod.f90 +ED/dbgbuild/bin/init_lapse_params_mod.f90 +ED/dbgbuild/bin/init_met_drivers_mod.f90 +ED/dbgbuild/bin/init_met_params_mod.f90 +ED/dbgbuild/bin/init_nbg_cohorts_mod.f90 +ED/dbgbuild/bin/init_output_params_mod.f90 +ED/dbgbuild/bin/init_pft_alloc_params_mod.f90 +ED/dbgbuild/bin/init_pft_derived_params_mod.f90 +ED/dbgbuild/bin/init_pft_leaf_params_mod.f90 +ED/dbgbuild/bin/init_pft_mort_params_mod.f90 +ED/dbgbuild/bin/init_pft_nitro_params_mod.f90 +ED/dbgbuild/bin/init_pft_photo_params_mod.f90 +ED/dbgbuild/bin/init_pft_repro_params_mod.f90 +ED/dbgbuild/bin/init_pft_resp_params_mod.f90 +ED/dbgbuild/bin/init_phen_coms_mod.f90 +ED/dbgbuild/bin/init_physiology_params_mod.f90 +ED/dbgbuild/bin/init_rk4_params_mod.f90 +ED/dbgbuild/bin/init_soil_coms_mod.f90 +ED/dbgbuild/bin/integrate_ed_dmean_vars_mod.f90 +ED/dbgbuild/bin/integrate_ed_fmean_met_vars_mod.f90 +ED/dbgbuild/bin/integrate_ed_mmean_vars_mod.f90 +ED/dbgbuild/bin/integrate_ed_qmean_vars_mod.f90 +ED/dbgbuild/bin/integrate_patch_euler_mod.f90 +ED/dbgbuild/bin/integrate_patch_heun_mod.f90 +ED/dbgbuild/bin/int_met_avg_mod.f90 +ED/dbgbuild/bin/inventory_mat_forests_mod.f90 +ED/dbgbuild/bin/invmondays.f90 +ED/dbgbuild/bin/iprim_mod.f90 +ED/dbgbuild/bin/iran_recsize_mod.f90 +ED/dbgbuild/bin/is_finite8_mod.f90 +ED/dbgbuild/bin/is_finite_mod.f90 +ED/dbgbuild/bin/isleap_mod.f90 +ED/dbgbuild/bin/ismax_mod.f90 +ED/dbgbuild/bin/ismin_mod.f90 +ED/dbgbuild/bin/is_resolvable_mod.f90 +ED/dbgbuild/bin/ivalugp_mod.f90 +ED/dbgbuild/bin/izero_mod.f90 +ED/dbgbuild/bin/julday1000_mod.f90 +ED/dbgbuild/bin/julday_mod.f90 +ED/dbgbuild/bin/landuse_init.f90 +ED/dbgbuild/bin/landuse_init_mod.f90 +ED/dbgbuild/bin/lapse.f90 +ED/dbgbuild/bin/large_error_mod.f90 +ED/dbgbuild/bin/lastchar_mod.f90 +ED/dbgbuild/bin/lastmonthdate_mod.f90 +ED/dbgbuild/bin/lastslash_mod.f90 +ED/dbgbuild/bin/leaf_database.f90 +ED/dbgbuild/bin/leaf_database_mod.f90 +ED/dbgbuild/bin/leaf_derivs_mod.f90 +ED/dbgbuild/bin/leaftw_derivs_mod.f90 +ED/dbgbuild/bin/libxml2f90__closeall_mod.f90 +ED/dbgbuild/bin/libxml2f90__closefile_mod.f90 +ED/dbgbuild/bin/libxml2f90_error_getline_mod.f90 +ED/dbgbuild/bin/libxml2f90__existid_mod.f90 +ED/dbgbuild/bin/libxml2f90_existid_mod.f90 +ED/dbgbuild/bin/libxml2f90__existpid_mod.f90 +ED/dbgbuild/bin/libxml2f90.f90_pp.f90 +ED/dbgbuild/bin/libxml2f90__findinchara_mod.f90 +ED/dbgbuild/bin/libxml2f90__flush_mod.f90 +ED/dbgbuild/bin/libxml2f90__get_fileunit_mod.f90 +ED/dbgbuild/bin/libxml2f90_getline_mod.f90 +ED/dbgbuild/bin/libxml2f90_getsafec8_mod.f90 +ED/dbgbuild/bin/libxml2f90_getsafei4_mod.f90 +ED/dbgbuild/bin/libxml2f90_getsafel4_mod.f90 +ED/dbgbuild/bin/libxml2f90_getsafer8_mod.f90 +ED/dbgbuild/bin/libxml2f90__getunit_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_addid_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_addid_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_add_list_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_add_list_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_addpid_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_addpid_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_addpureid_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_closetag_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_closetag_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_down_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_edit_id_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_edit_id_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_edit_pid_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_edit_pid_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_exist_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getc8__mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getc8_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_getc8_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getch_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_getch_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getch_scal_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_geti4__mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_geti4_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_geti4_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getl4__mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getl4_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_getl4_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getpc8__mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getpc8_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getpch_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getpi4__mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getpi4_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getpl4__mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getpl4_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getpr8__mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getpr8_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getpsize_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getpstring__mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getpstring_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getr8__mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getr8_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_getr8_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getsize_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_getsize_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getstring__mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_getstring_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_getstring_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_initlist_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_inittag_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_opentag_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_opentag_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_report_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_report_rec_mod.f90 +ED/dbgbuild/bin/libxml2f90_ll_report_rec_wrap_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_selectlist_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_selecttag_mod.f90 +ED/dbgbuild/bin/libxml2f90__ll_up_mod.f90 +ED/dbgbuild/bin/libxml2f90__openfile_mod.f90 +ED/dbgbuild/bin/libxml2f90_parse_file_mod.f90 +ED/dbgbuild/bin/libxml2f90_parse_find_char_mod.f90 +ED/dbgbuild/bin/libxml2f90__readin_file_mod.f90 +ED/dbgbuild/bin/libxml2f90_readin_file_mod.f90 +ED/dbgbuild/bin/libxml2f90__readin_nfil_mod.f90 +ED/dbgbuild/bin/libxml2f90__set_casesensitive_mod.f90 +ED/dbgbuild/bin/libxml2f90__set_default_ll_id_mod.f90 +ED/dbgbuild/bin/libxml2f90__setformat_mod.f90 +ED/dbgbuild/bin/libxml2f90__set_paw_mod.f90 +ED/dbgbuild/bin/libxml2f90__set_rmcomma_mod.f90 +ED/dbgbuild/bin/libxml2f90__set_rmquotes_mod.f90 +ED/dbgbuild/bin/libxml2f90__settransform_exm_mod.f90 +ED/dbgbuild/bin/libxml2f90__setwrite_exm_mod.f90 +ED/dbgbuild/bin/libxml2f90_tostringa_mod.f90 +ED/dbgbuild/bin/libxml2f90_tostring_mod.f90 +ED/dbgbuild/bin/libxml2f90_transform_paw_mod.f90 +ED/dbgbuild/bin/lisys_solver8_mod.f90 +ED/dbgbuild/bin/lisys_solver_mod.f90 +ED/dbgbuild/bin/load_ecosystem_state_mod.f90 +ED/dbgbuild/bin/load_ed_ecosystem_params_mod.f90 +ED/dbgbuild/bin/lsm_hyd.f90 +ED/dbgbuild/bin/lubksb_dble_mod.f90 +ED/dbgbuild/bin/ludcmp_dble_mod.f90 +ED/dbgbuild/bin/lw_multiple_scatter_mod.f90 +ED/dbgbuild/bin/lw_twostream_mod.f90 +ED/dbgbuild/bin/makefnam_mod.f90 +ED/dbgbuild/bin/match_poly_grid_mod.f90 +ED/dbgbuild/bin/mat_forest_harv_rates_mod.f90 +ED/dbgbuild/bin/mean_daysecz_mod.f90 +ED/dbgbuild/bin/mem_polygons.f90 +ED/dbgbuild/bin/met_driver_coms.f90 +ED/dbgbuild/bin/met_sanity_check_mod.f90 +ED/dbgbuild/bin/migs_mod.f90 +ED/dbgbuild/bin/mk_2_buff_mod.f90 +ED/dbgbuild/bin/mk_2p_buff_mod.f90 +ED/dbgbuild/bin/mk_3_buff_mod.f90 +ED/dbgbuild/bin/mk_4_buff_mod.f90 +ED/dbgbuild/bin/mortality.f90 +ED/dbgbuild/bin/mprove_mod.f90 +ED/dbgbuild/bin/multiple_scatter.f90 +ED/dbgbuild/bin/near_bare_ground_big_leaf_init_mod.f90 +ED/dbgbuild/bin/near_bare_ground_init_mod.f90 +ED/dbgbuild/bin/new_patch_sfc_props_mod.f90 +ED/dbgbuild/bin/normalize_ed_dmean_vars_mod.f90 +ED/dbgbuild/bin/normalize_ed_fmean_vars_mod.f90 +ED/dbgbuild/bin/normalize_ed_mmean_vars_mod.f90 +ED/dbgbuild/bin/normalize_ed_qmean_vars_mod.f90 +ED/dbgbuild/bin/normalize_ed_todaynpp_vars_mod.f90 +ED/dbgbuild/bin/normalize_ed_today_vars_mod.f90 +ED/dbgbuild/bin/normalize_fmean_vars_mod.f90 +ED/dbgbuild/bin/norm_harv_patch_mod.f90 +ED/dbgbuild/bin/num_days_mod.f90 +ED/dbgbuild/bin/numutils.f90 +ED/dbgbuild/bin/odeint_mod.f90 +ED/dbgbuild/bin/opspec_fatal_mod.f90 +ED/dbgbuild/bin/optimiz_coms.f90 +ED/dbgbuild/bin/overwrite_with_xml_config_mod.f90 +ED/dbgbuild/bin/parsefnam_mod.f90 +ED/dbgbuild/bin/parse_mod.f90 +ED/dbgbuild/bin/pft_coms.f90 +ED/dbgbuild/bin/phenology_aux.f90 +ED/dbgbuild/bin/phenology_coms.f90 +ED/dbgbuild/bin/phenology_driver_eq_0_mod.f90 +ED/dbgbuild/bin/phenology_driver_mod.f90 +ED/dbgbuild/bin/phenology_driv.f90 +ED/dbgbuild/bin/phenology_startup.f90 +ED/dbgbuild/bin/phenology_thresholds_mod.f90 +ED/dbgbuild/bin/photosyn_driv.f90 +ED/dbgbuild/bin/physiology_coms.f90 +ED/dbgbuild/bin/plant_structural_allocation_mod.f90 +ED/dbgbuild/bin/prescribed_event_mod.f90 +ED/dbgbuild/bin/print_c_and_n_budgets_mod.f90 +ED/dbgbuild/bin/print_csiteipa_mod.f90 +ED/dbgbuild/bin/print_errmax_mod.f90 +ED/dbgbuild/bin/print_fields_mod.f90 +ED/dbgbuild/bin/print_photo_details_mod.f90 +ED/dbgbuild/bin/print_rk4patch_mod.f90 +ED/dbgbuild/bin/print_rk4_state_mod.f90 +ED/dbgbuild/bin/print_soil_info_mod.f90 +ED/dbgbuild/bin/putconfigint_mod.f90 +ED/dbgbuild/bin/putconfigreal8_mod.f90 +ED/dbgbuild/bin/putconfigreal_mod.f90 +ED/dbgbuild/bin/putconfigstring_mod.f90 +ED/dbgbuild/bin/radiate_driver.f90 +ED/dbgbuild/bin/radiate_driver_mod.f90 +ED/dbgbuild/bin/radiate_utils.f90 +ED/dbgbuild/bin/rams_f_open_mod.f90 +ED/dbgbuild/bin/rank_down_mod.f90 +ED/dbgbuild/bin/rank_up_mod.f90 +ED/dbgbuild/bin/read_ed10_ed20_history_file_mod.f90 +ED/dbgbuild/bin/read_ed21_history_file_mod.f90 +ED/dbgbuild/bin/read_ed21_history_unstruct_mod.f90 +ED/dbgbuild/bin/read_ed21_polyclone_mod.f90 +ED/dbgbuild/bin/read_ed_xml_config_mod.f90 +ED/dbgbuild/bin/read_events_xml_mod.f90 +ED/dbgbuild/bin/read_met_driver_head_mod.f90 +ED/dbgbuild/bin/read_met_drivers_init_mod.f90 +ED/dbgbuild/bin/read_met_drivers_mod.f90 +ED/dbgbuild/bin/read_nl_mod.f90 +ED/dbgbuild/bin/read_ol_file_mod.f90 +ED/dbgbuild/bin/read_plantation_fractions_mod.f90 +ED/dbgbuild/bin/read_site_file_mod.f90 +ED/dbgbuild/bin/read_soil_depth_mod.f90 +ED/dbgbuild/bin/read_soil_moist_temp_mod.f90 +ED/dbgbuild/bin/rearrange_mod.f90 +ED/dbgbuild/bin/reproduction_eq_0_mod.f90 +ED/dbgbuild/bin/reproduction.f90 +ED/dbgbuild/bin/reproduction_mod.f90 +ED/dbgbuild/bin/reset_fmean_vars_mod.f90 +ED/dbgbuild/bin/resp_f_decomp_mod.f90 +ED/dbgbuild/bin/resp_rh_mod.f90 +ED/dbgbuild/bin/rk4_coms.f90 +ED/dbgbuild/bin/rk4_integ_utils.f90 +ED/dbgbuild/bin/rk4_misc.f90 +ED/dbgbuild/bin/root_resp_norm_mod.f90 +ED/dbgbuild/bin/scale_ed_radiation_mod.f90 +ED/dbgbuild/bin/seed_dispersal_mod.f90 +ED/dbgbuild/bin/selective_gaussian_2body_mod.f90 +ED/dbgbuild/bin/setlapseparms_mod.f90 +ED/dbgbuild/bin/set_polygon_coordinates_mod.f90 +ED/dbgbuild/bin/set_site_defprops_mod.f90 +ED/dbgbuild/bin/sfcdata_ed_mod.f90 +ED/dbgbuild/bin/sfcrad_ed_mod.f90 +ED/dbgbuild/bin/short2diff_sib_mod.f90 +ED/dbgbuild/bin/short_bdown_weissnorman_mod.f90 +ED/dbgbuild/bin/sngloff_mod.f90 +ED/dbgbuild/bin/soil_default_fill_mod.f90 +ED/dbgbuild/bin/soil_respiration.f90 +ED/dbgbuild/bin/soil_respiration_mod.f90 +ED/dbgbuild/bin/solar_radiation_breakdown_mod.f90 +ED/dbgbuild/bin/sort3_mod.f90 +ED/dbgbuild/bin/sort_down_mod.f90 +ED/dbgbuild/bin/sort_up_mod.f90 +ED/dbgbuild/bin/ssum_mod.f90 +ED/dbgbuild/bin/stable_cohorts.f90 +ED/dbgbuild/bin/structural_growth_eq_0_mod.f90 +ED/dbgbuild/bin/structural_growth.f90 +ED/dbgbuild/bin/structural_growth_mod.f90 +ED/dbgbuild/bin/sw_multiple_scatter_mod.f90 +ED/dbgbuild/bin/sw_twostream_clump_mod.f90 +ED/dbgbuild/bin/test_mod.f90 +ED/dbgbuild/bin/therm_lib8.f90 +ED/dbgbuild/bin/therm_lib.f90 +ED/dbgbuild/bin/timing_mod.f90 +ED/dbgbuild/bin/tokenize1_mod.f90 +ED/dbgbuild/bin/tolower_mod.f90 +ED/dbgbuild/bin/transfer_ol_month_mod.f90 +ED/dbgbuild/bin/trid2_mod.f90 +ED/dbgbuild/bin/trid_mod.f90 +ED/dbgbuild/bin/twostream_rad.f90 +ED/dbgbuild/bin/ugetarg_mod.f90 +ED/dbgbuild/bin/unarrange_mod.f90 +ED/dbgbuild/bin/update_c_and_n_pools_mod.f90 +ED/dbgbuild/bin/update_cohort_extensive_props_mod.f90 +ED/dbgbuild/bin/update_derived_cohort_props_mod.f90 +ED/dbgbuild/bin/update_derived_props.f90 +ED/dbgbuild/bin/update_derived_props_mod.f90 +ED/dbgbuild/bin/update_diagnostic_vars_mod.f90 +ED/dbgbuild/bin/update_ed_yearly_vars_mod.f90 +ED/dbgbuild/bin/updatehydroparms_mod.f90 +ED/dbgbuild/bin/update_met_drivers_mod.f90 +ED/dbgbuild/bin/update_model_time_dm_mod.f90 +ED/dbgbuild/bin/update_mod.f90 +ED/dbgbuild/bin/update_patch_derived_props_mod.f90 +ED/dbgbuild/bin/update_patch_thermo_fmean_mod.f90 +ED/dbgbuild/bin/update_patch_thermo_props_mod.f90 +ED/dbgbuild/bin/update_phenology_eq_0_mod.f90 +ED/dbgbuild/bin/update_phenology_mod.f90 +ED/dbgbuild/bin/update_polygon_derived_props_mod.f90 +ED/dbgbuild/bin/update_rad_avg_mod.f90 +ED/dbgbuild/bin/update_site_derived_props_mod.f90 +ED/dbgbuild/bin/update_vital_rates_mod.f90 +ED/dbgbuild/bin/updatewatertableadd_mod.f90 +ED/dbgbuild/bin/updatewatertablebaseflow_mod.f90 +ED/dbgbuild/bin/updatewatertablesubtract_mod.f90 +ED/dbgbuild/bin/update_workload_mod.f90 +ED/dbgbuild/bin/utils_f.f90 +ED/dbgbuild/bin/valugp_mod.f90 +ED/dbgbuild/bin/vegetation_dynamics_eq_0_mod.f90 +ED/dbgbuild/bin/vegetation_dynamics.f90 +ED/dbgbuild/bin/vegetation_dynamics_mod.f90 +ED/dbgbuild/bin/walltime_mod.f90 +ED/dbgbuild/bin/warning_mod.f90 +ED/dbgbuild/bin/write_ed_xml_config_mod.f90 +ED/dbgbuild/bin/writehydro_mod.f90 +ED/dbgbuild/bin/xcol2array_mod.f90 +ED/dbgbuild/bin/ycol2array_mod.f90 +ED/dbgbuild/bin/yesterday_info_mod.f90 +ED/dbgbuild/bin/yesterday_mod.f90 +ED/dbgbuild/bin/zcol2array_mod.f90 +ED/dbgbuild/bin/zero_ed_dmean_vars_mod.f90 +ED/dbgbuild/bin/zero_ed_fmean_vars_mod.f90 +ED/dbgbuild/bin/zero_ed_mmean_vars_mod.f90 +ED/dbgbuild/bin/zero_ed_qmean_vars_mod.f90 +ED/dbgbuild/bin/zero_ed_today_vars_mod.f90 +ED/dbgbuild/bin/zero_ed_yearly_vars_mod.f90 +ED/dbgbuild/bin/a3e0_mod.mod +ED/dbgbuild/bin/a3e1_mod.mod +ED/dbgbuild/bin/a3e2_mod.mod +ED/dbgbuild/bin/accum_mod.mod +ED/dbgbuild/bin/acnst_mod.mod +ED/dbgbuild/bin/adivb_mod.mod +ED/dbgbuild/bin/adjust_sfcw_properties_mod.mod +ED/dbgbuild/bin/adjust_topsoil_properties_mod.mod +ED/dbgbuild/bin/adjust_veg_properties_mod.mod +ED/dbgbuild/bin/ae0_mod.mod +ED/dbgbuild/bin/ae1m1_mod.mod +ED/dbgbuild/bin/ae1_mod.mod +ED/dbgbuild/bin/ae1p1_mod.mod +ED/dbgbuild/bin/ae1p1p1_mod.mod +ED/dbgbuild/bin/ae1t0_mod.mod +ED/dbgbuild/bin/ae1t0p1_mod.mod +ED/dbgbuild/bin/ae1t1_mod.mod +ED/dbgbuild/bin/ae1t1p1_mod.mod +ED/dbgbuild/bin/ae1tn1_mod.mod +ED/dbgbuild/bin/ae2_mod.mod +ED/dbgbuild/bin/ae3m3d0_mod.mod +ED/dbgbuild/bin/ae3m3_mod.mod +ED/dbgbuild/bin/ae3_mod.mod +ED/dbgbuild/bin/ae3p3_mod.mod +ED/dbgbuild/bin/ae3t0p3_mod.mod +ED/dbgbuild/bin/ae3t3_mod.mod +ED/dbgbuild/bin/ae3t3p3_mod.mod +ED/dbgbuild/bin/aen1_mod.mod +ED/dbgbuild/bin/aen3t0p3_mod.mod +ED/dbgbuild/bin/aggregate_polygon_fmean_mod.mod +ED/dbgbuild/bin/aggregate_polygon_not_fmean_mod.mod +ED/dbgbuild/bin/alebl_mod.mod +ED/dbgbuild/bin/allometry.mod +ED/dbgbuild/bin/angle_of_incid_mod.mod +ED/dbgbuild/bin/an_header.mod +ED/dbgbuild/bin/aone_mod.mod +ED/dbgbuild/bin/apply_forestry_mod.mod +ED/dbgbuild/bin/array2xcol_mod.mod +ED/dbgbuild/bin/array2ycol_mod.mod +ED/dbgbuild/bin/array2zcol_mod.mod +ED/dbgbuild/bin/assign_prescribed_phen_mod.mod +ED/dbgbuild/bin/atimb_mod.mod +ED/dbgbuild/bin/atob_log_mod.mod +ED/dbgbuild/bin/atob_mod.mod +ED/dbgbuild/bin/avg_ed_daily_output_pool_mod.mod +ED/dbgbuild/bin/azero_mod.mod +ED/dbgbuild/bin/banbks_mod.mod +ED/dbgbuild/bin/bandec_mod.mod +ED/dbgbuild/bin/bdf2_solver_mod.mod +ED/dbgbuild/bin/budget_utils.mod +ED/dbgbuild/bin/c34constants.mod +ED/dbgbuild/bin/calc_flow_routing_mod.mod +ED/dbgbuild/bin/calchydrosubsurface_mod.mod +ED/dbgbuild/bin/calchydrosurface_mod.mod +ED/dbgbuild/bin/calc_met_lapse_mod.mod +ED/dbgbuild/bin/calcwatertable_mod.mod +ED/dbgbuild/bin/canopy_air_coms.mod +ED/dbgbuild/bin/canopy_derivs_two_mod.mod +ED/dbgbuild/bin/canopy_layer_coms.mod +ED/dbgbuild/bin/canopy_photosynthesis_mod.mod +ED/dbgbuild/bin/canopy_radiation_coms.mod +ED/dbgbuild/bin/canopy_struct_dynamics.mod +ED/dbgbuild/bin/cbrt8_mod.mod +ED/dbgbuild/bin/cbrt_mod.mod +ED/dbgbuild/bin/cdf2normal_mod.mod +ED/dbgbuild/bin/cdf_mod.mod +ED/dbgbuild/bin/char_strip_var_mod.mod +ED/dbgbuild/bin/check_real_mod.mod +ED/dbgbuild/bin/check_rescale_mod.mod +ED/dbgbuild/bin/compute_c_and_n_storage_mod.mod +ED/dbgbuild/bin/consts_coms.mod +ED/dbgbuild/bin/copy_bdf2_prev_mod.mod +ED/dbgbuild/bin/copy_fb_patch_mod.mod +ED/dbgbuild/bin/copy_initp2prev_mod.mod +ED/dbgbuild/bin/copy_met_2_rk4site_mod.mod +ED/dbgbuild/bin/copy_nl_mod.mod +ED/dbgbuild/bin/copy_patch_init_carbon_mod.mod +ED/dbgbuild/bin/copy_patch_init_mod.mod +ED/dbgbuild/bin/copy_path_from_grid_1_mod.mod +ED/dbgbuild/bin/copy_prev2patch_mod.mod +ED/dbgbuild/bin/copy_rk4_patch_mod.mod +ED/dbgbuild/bin/count_pft_xml_config_mod.mod +ED/dbgbuild/bin/cputime_mod.mod +ED/dbgbuild/bin/create_ed10_ed20_fname_mod.mod +ED/dbgbuild/bin/cumsum_mod.mod +ED/dbgbuild/bin/cvmgm_mod.mod +ED/dbgbuild/bin/cvmgn_mod.mod +ED/dbgbuild/bin/cvmgp_mod.mod +ED/dbgbuild/bin/cvmgz_mod.mod +ED/dbgbuild/bin/date_2_seconds_mod.mod +ED/dbgbuild/bin/date_abs_secs2_mod.mod +ED/dbgbuild/bin/date_add_to_mod.mod +ED/dbgbuild/bin/date_secs_ymdt_mod.mod +ED/dbgbuild/bin/date_unmake_big_mod.mod +ED/dbgbuild/bin/dcvmgm_mod.mod +ED/dbgbuild/bin/dcvmgp_mod.mod +ED/dbgbuild/bin/dcw_swap16_mod.mod +ED/dbgbuild/bin/dcw_swap32_mod.mod +ED/dbgbuild/bin/dcw_swap64_mod.mod +ED/dbgbuild/bin/deblank_mod.mod +ED/dbgbuild/bin/decomp_coms.mod +ED/dbgbuild/bin/detab_mod.mod +ED/dbgbuild/bin/detailed_coms.mod +ED/dbgbuild/bin/diagon_mod.mod +ED/dbgbuild/bin/dist_gc_mod.mod +ED/dbgbuild/bin/disturbance_utils.mod +ED/dbgbuild/bin/disturb_coms.mod +ED/dbgbuild/bin/dmax2_mod.mod +ED/dbgbuild/bin/dmin2_mod.mod +ED/dbgbuild/bin/dssum_mod.mod +ED/dbgbuild/bin/dump_radinfo_mod.mod +ED/dbgbuild/bin/ed1_fileinfo_mod.mod +ED/dbgbuild/bin/ed_1st_master_mod.mod +ED/dbgbuild/bin/ed_1st_node_mod.mod +ED/dbgbuild/bin/ed21_fileinfo_mod.mod +ED/dbgbuild/bin/ed_bigleaf_init_mod.mod +ED/dbgbuild/bin/ed_datp_datq_mod.mod +ED/dbgbuild/bin/ed_datp_datsoil_mod.mod +ED/dbgbuild/bin/ed_driver_mod.mod +ED/dbgbuild/bin/ed_filelist_mod.mod +ED/dbgbuild/bin/ed_gridset_mod.mod +ED/dbgbuild/bin/ed_init_atm_mod.mod +ED/dbgbuild/bin/ed_ll_xy_mod.mod +ED/dbgbuild/bin/ed_load_work_from_history_mod.mod +ED/dbgbuild/bin/ed_masterput_met_header_mod.mod +ED/dbgbuild/bin/ed_masterput_nl_mod.mod +ED/dbgbuild/bin/ed_masterput_poly_dims_mod.mod +ED/dbgbuild/bin/ed_masterput_processid_mod.mod +ED/dbgbuild/bin/ed_masterput_worklist_info_mod.mod +ED/dbgbuild/bin/ed_max_dims.mod +ED/dbgbuild/bin/ed_mem_alloc_mod.mod +ED/dbgbuild/bin/ed_mem_grid_dim_defs.mod +ED/dbgbuild/bin/ed_misc_coms.mod +ED/dbgbuild/bin/ed_model_mod.mod +ED/dbgbuild/bin/ed_newgrid_mod.mod +ED/dbgbuild/bin/ed_node_coms.mod +ED/dbgbuild/bin/ed_node_decomp_mod.mod +ED/dbgbuild/bin/ed_nodeget_met_header_mod.mod +ED/dbgbuild/bin/ed_nodeget_nl_mod.mod +ED/dbgbuild/bin/ed_nodeget_poly_dims_mod.mod +ED/dbgbuild/bin/ed_nodeget_processid_mod.mod +ED/dbgbuild/bin/ed_nodeget_worklist_info_mod.mod +ED/dbgbuild/bin/ed_opspec_grid_mod.mod +ED/dbgbuild/bin/ed_opspec_misc_mod.mod +ED/dbgbuild/bin/ed_opspec_par_mod.mod +ED/dbgbuild/bin/ed_opspec_times_mod.mod +ED/dbgbuild/bin/ed_output_mod.mod +ED/dbgbuild/bin/ed_para_coms.mod +ED/dbgbuild/bin/ed_parvec_work_mod.mod +ED/dbgbuild/bin/ed_polarst_mod.mod +ED/dbgbuild/bin/ed_state_vars.mod +ED/dbgbuild/bin/ed_therm_lib.mod +ED/dbgbuild/bin/ed_var_tables.mod +ED/dbgbuild/bin/ed_work_vars.mod +ED/dbgbuild/bin/ed_xy_ll_mod.mod +ED/dbgbuild/bin/ed_zen_mod.mod +ED/dbgbuild/bin/eifun8_mod.mod +ED/dbgbuild/bin/elgs_mod.mod +ED/dbgbuild/bin/ename_coms.mod +ED/dbgbuild/bin/endian_mod.mod +ED/dbgbuild/bin/errorfun_mod.mod +ED/dbgbuild/bin/euler_integ_mod.mod +ED/dbgbuild/bin/euler_timestep_mod.mod +ED/dbgbuild/bin/event_fertilize_mod.mod +ED/dbgbuild/bin/event_fire_mod.mod +ED/dbgbuild/bin/event_harvest_mod.mod +ED/dbgbuild/bin/event_irrigate_mod.mod +ED/dbgbuild/bin/event_planting_mod.mod +ED/dbgbuild/bin/event_till_mod.mod +ED/dbgbuild/bin/expected_mod.mod +ED/dbgbuild/bin/expmsq_mod.mod +ED/dbgbuild/bin/exterminate_patches_except_mod.mod +ED/dbgbuild/bin/fail_whale_mod.mod +ED/dbgbuild/bin/farq_leuning.mod +ED/dbgbuild/bin/fatal_error_mod.mod +ED/dbgbuild/bin/fb_dy_step_trunc_mod.mod +ED/dbgbuild/bin/fb_sanity_check_mod.mod +ED/dbgbuild/bin/fill_history_grid_m11_mod.mod +ED/dbgbuild/bin/fill_history_grid_m12_mod.mod +ED/dbgbuild/bin/fill_history_grid_mod.mod +ED/dbgbuild/bin/fill_history_grid_p11dmean_mod.mod +ED/dbgbuild/bin/fill_history_grid_p11mmean_mod.mod +ED/dbgbuild/bin/fill_history_grid_p11_mod.mod +ED/dbgbuild/bin/fill_history_grid_p12_mod.mod +ED/dbgbuild/bin/fill_history_grid_p146_mod.mod +ED/dbgbuild/bin/fill_history_grid_p19_mod.mod +ED/dbgbuild/bin/fill_history_patch_mod.mod +ED/dbgbuild/bin/fill_history_polygon_mod.mod +ED/dbgbuild/bin/fill_history_site_mod.mod +ED/dbgbuild/bin/fillvar_l_mod.mod +ED/dbgbuild/bin/find_closing_comment_mod.mod +ED/dbgbuild/bin/find_frqsum_mod.mod +ED/dbgbuild/bin/findln_mod.mod +ED/dbgbuild/bin/find_rank_mod.mod +ED/dbgbuild/bin/fire_frequency_mod.mod +ED/dbgbuild/bin/flag_stable_cohorts_mod.mod +ED/dbgbuild/bin/fuse_fiss_utils.mod +ED/dbgbuild/bin/fusion_fission_coms.mod +ED/dbgbuild/bin/getconfigint_mod.mod +ED/dbgbuild/bin/getconfigreal_mod.mod +ED/dbgbuild/bin/getconfigstring_mod.mod +ED/dbgbuild/bin/get_errmax_mod.mod +ED/dbgbuild/bin/get_file_indices_mod.mod +ED/dbgbuild/bin/get_grid_mod.mod +ED/dbgbuild/bin/geth5dims_mod.mod +ED/dbgbuild/bin/getll_mod.mod +ED/dbgbuild/bin/get_work_mod.mod +ED/dbgbuild/bin/get_yscal_mod.mod +ED/dbgbuild/bin/grid_coms.mod +ED/dbgbuild/bin/growth_balive.mod +ED/dbgbuild/bin/h5_output_mod.mod +ED/dbgbuild/bin/harv_immat_patches_mod.mod +ED/dbgbuild/bin/harv_mat_patches_mod.mod +ED/dbgbuild/bin/hdf5_coms.mod +ED/dbgbuild/bin/hdf5_utils.mod +ED/dbgbuild/bin/hdf_getslab_d_mod.mod +ED/dbgbuild/bin/hdf_getslab_i_mod.mod +ED/dbgbuild/bin/hdf_getslab_r_mod.mod +ED/dbgbuild/bin/heav_mod.mod +ED/dbgbuild/bin/het_resp_weight_mod.mod +ED/dbgbuild/bin/heun_integ_mod.mod +ED/dbgbuild/bin/heun_stepper_mod.mod +ED/dbgbuild/bin/heun_timestep_mod.mod +ED/dbgbuild/bin/how_to_read_a_file_mod.mod +ED/dbgbuild/bin/hybrid_integ_mod.mod +ED/dbgbuild/bin/hybrid_timestep_mod.mod +ED/dbgbuild/bin/hydrology_coms.mod +ED/dbgbuild/bin/hydrology_constants.mod +ED/dbgbuild/bin/ibias_mod.mod +ED/dbgbuild/bin/ibindec_mod.mod +ED/dbgbuild/bin/ifirstchar_mod.mod +ED/dbgbuild/bin/inc_fwd_patch_mod.mod +ED/dbgbuild/bin/inc_rk4_patch_mod.mod +ED/dbgbuild/bin/init_can_air_params_mod.mod +ED/dbgbuild/bin/init_can_lyr_params_mod.mod +ED/dbgbuild/bin/init_can_rad_params_mod.mod +ED/dbgbuild/bin/init_cohorts_by_layers_mod.mod +ED/dbgbuild/bin/init_decomp_params_mod.mod +ED/dbgbuild/bin/init_disturb_params_mod.mod +ED/dbgbuild/bin/init_ed_cohort_vars_mod.mod +ED/dbgbuild/bin/init_ed_misc_coms_mod.mod +ED/dbgbuild/bin/init_ed_patch_vars_mod.mod +ED/dbgbuild/bin/init_ed_poly_vars_mod.mod +ED/dbgbuild/bin/init_ed_site_vars_mod.mod +ED/dbgbuild/bin/init_ff_coms_mod.mod +ED/dbgbuild/bin/init_full_history_restart_mod.mod +ED/dbgbuild/bin/init_hydro_coms_mod.mod +ED/dbgbuild/bin/inithydrology_mod.mod +ED/dbgbuild/bin/inithydrosubsurface_mod.mod +ED/dbgbuild/bin/initialize_rk4patches_mod.mod +ED/dbgbuild/bin/init_lapse_params_mod.mod +ED/dbgbuild/bin/init_met_drivers_mod.mod +ED/dbgbuild/bin/init_met_params_mod.mod +ED/dbgbuild/bin/init_nbg_cohorts_mod.mod +ED/dbgbuild/bin/init_output_params_mod.mod +ED/dbgbuild/bin/init_pft_alloc_params_mod.mod +ED/dbgbuild/bin/init_pft_derived_params_mod.mod +ED/dbgbuild/bin/init_pft_leaf_params_mod.mod +ED/dbgbuild/bin/init_pft_mort_params_mod.mod +ED/dbgbuild/bin/init_pft_nitro_params_mod.mod +ED/dbgbuild/bin/init_pft_photo_params_mod.mod +ED/dbgbuild/bin/init_pft_repro_params_mod.mod +ED/dbgbuild/bin/init_pft_resp_params_mod.mod +ED/dbgbuild/bin/init_phen_coms_mod.mod +ED/dbgbuild/bin/init_physiology_params_mod.mod +ED/dbgbuild/bin/init_rk4_params_mod.mod +ED/dbgbuild/bin/init_soil_coms_mod.mod +ED/dbgbuild/bin/integrate_ed_dmean_vars_mod.mod +ED/dbgbuild/bin/integrate_ed_fmean_met_vars_mod.mod +ED/dbgbuild/bin/integrate_ed_mmean_vars_mod.mod +ED/dbgbuild/bin/integrate_ed_qmean_vars_mod.mod +ED/dbgbuild/bin/integrate_patch_euler_mod.mod +ED/dbgbuild/bin/integrate_patch_heun_mod.mod +ED/dbgbuild/bin/int_met_avg_mod.mod +ED/dbgbuild/bin/inventory_mat_forests_mod.mod +ED/dbgbuild/bin/iprim_mod.mod +ED/dbgbuild/bin/iran_recsize_mod.mod +ED/dbgbuild/bin/is_finite8_mod.mod +ED/dbgbuild/bin/is_finite_mod.mod +ED/dbgbuild/bin/isleap_mod.mod +ED/dbgbuild/bin/ismax_mod.mod +ED/dbgbuild/bin/ismin_mod.mod +ED/dbgbuild/bin/is_resolvable_mod.mod +ED/dbgbuild/bin/ivalugp_mod.mod +ED/dbgbuild/bin/izero_mod.mod +ED/dbgbuild/bin/julday1000_mod.mod +ED/dbgbuild/bin/julday_mod.mod +ED/dbgbuild/bin/landuse_init_mod.mod +ED/dbgbuild/bin/large_error_mod.mod +ED/dbgbuild/bin/lastchar_mod.mod +ED/dbgbuild/bin/lastmonthdate_mod.mod +ED/dbgbuild/bin/lastslash_mod.mod +ED/dbgbuild/bin/leaf_database_mod.mod +ED/dbgbuild/bin/leaf_derivs_mod.mod +ED/dbgbuild/bin/leaftw_derivs_mod.mod +ED/dbgbuild/bin/libxml2f90__closeall_mod.mod +ED/dbgbuild/bin/libxml2f90__closefile_mod.mod +ED/dbgbuild/bin/libxml2f90_error_getline_mod.mod +ED/dbgbuild/bin/libxml2f90__existid_mod.mod +ED/dbgbuild/bin/libxml2f90_existid_mod.mod +ED/dbgbuild/bin/libxml2f90__existpid_mod.mod +ED/dbgbuild/bin/libxml2f90__findinchara_mod.mod +ED/dbgbuild/bin/libxml2f90__flush_mod.mod +ED/dbgbuild/bin/libxml2f90__get_fileunit_mod.mod +ED/dbgbuild/bin/libxml2f90_getline_mod.mod +ED/dbgbuild/bin/libxml2f90_getsafec8_mod.mod +ED/dbgbuild/bin/libxml2f90_getsafei4_mod.mod +ED/dbgbuild/bin/libxml2f90_getsafel4_mod.mod +ED/dbgbuild/bin/libxml2f90_getsafer8_mod.mod +ED/dbgbuild/bin/libxml2f90__getunit_mod.mod +ED/dbgbuild/bin/libxml2f90_interface_module.mod +ED/dbgbuild/bin/libxml2f90__ll_addid_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_addid_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_add_list_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_add_list_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_addpid_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_addpid_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_addpureid_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_closetag_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_closetag_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_down_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_edit_id_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_edit_id_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_edit_pid_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_edit_pid_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_exist_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getc8__mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getc8_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_getc8_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getch_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_getch_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getch_scal_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_geti4__mod.mod +ED/dbgbuild/bin/libxml2f90__ll_geti4_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_geti4_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getl4__mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getl4_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_getl4_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getpc8__mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getpc8_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getpch_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getpi4__mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getpi4_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getpl4__mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getpl4_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getpr8__mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getpr8_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getpsize_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getpstring__mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getpstring_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getr8__mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getr8_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_getr8_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getsize_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_getsize_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getstring__mod.mod +ED/dbgbuild/bin/libxml2f90__ll_getstring_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_getstring_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_initlist_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_inittag_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_opentag_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_opentag_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_report_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_report_rec_mod.mod +ED/dbgbuild/bin/libxml2f90_ll_report_rec_wrap_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_selectlist_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_selecttag_mod.mod +ED/dbgbuild/bin/libxml2f90__ll_up_mod.mod +ED/dbgbuild/bin/libxml2f90_module.mod +ED/dbgbuild/bin/libxml2f90__openfile_mod.mod +ED/dbgbuild/bin/libxml2f90_parse_file_mod.mod +ED/dbgbuild/bin/libxml2f90_parse_find_char_mod.mod +ED/dbgbuild/bin/libxml2f90__readin_file_mod.mod +ED/dbgbuild/bin/libxml2f90_readin_file_mod.mod +ED/dbgbuild/bin/libxml2f90__readin_nfil_mod.mod +ED/dbgbuild/bin/libxml2f90__set_casesensitive_mod.mod +ED/dbgbuild/bin/libxml2f90__set_default_ll_id_mod.mod +ED/dbgbuild/bin/libxml2f90__setformat_mod.mod +ED/dbgbuild/bin/libxml2f90__set_paw_mod.mod +ED/dbgbuild/bin/libxml2f90__set_rmcomma_mod.mod +ED/dbgbuild/bin/libxml2f90__set_rmquotes_mod.mod +ED/dbgbuild/bin/libxml2f90__settransform_exm_mod.mod +ED/dbgbuild/bin/libxml2f90__setwrite_exm_mod.mod +ED/dbgbuild/bin/libxml2f90_strings_module.mod +ED/dbgbuild/bin/libxml2f90_tostringa_mod.mod +ED/dbgbuild/bin/libxml2f90_tostring_mod.mod +ED/dbgbuild/bin/libxml2f90_transform_paw_mod.mod +ED/dbgbuild/bin/lisys_solver8_mod.mod +ED/dbgbuild/bin/lisys_solver_mod.mod +ED/dbgbuild/bin/ll_module.mod +ED/dbgbuild/bin/load_ecosystem_state_mod.mod +ED/dbgbuild/bin/load_ed_ecosystem_params_mod.mod +ED/dbgbuild/bin/lubksb_dble_mod.mod +ED/dbgbuild/bin/ludcmp_dble_mod.mod +ED/dbgbuild/bin/lw_multiple_scatter_mod.mod +ED/dbgbuild/bin/lw_twostream_mod.mod +ED/dbgbuild/bin/makefnam_mod.mod +ED/dbgbuild/bin/match_poly_grid_mod.mod +ED/dbgbuild/bin/mat_forest_harv_rates_mod.mod +ED/dbgbuild/bin/mean_daysecz_mod.mod +ED/dbgbuild/bin/mem_polygons.mod +ED/dbgbuild/bin/met_driver_coms.mod +ED/dbgbuild/bin/met_sanity_check_mod.mod +ED/dbgbuild/bin/migs_mod.mod +ED/dbgbuild/bin/mk_2_buff_mod.mod +ED/dbgbuild/bin/mk_2p_buff_mod.mod +ED/dbgbuild/bin/mk_3_buff_mod.mod +ED/dbgbuild/bin/mk_4_buff_mod.mod +ED/dbgbuild/bin/mortality.mod +ED/dbgbuild/bin/mprove_mod.mod +ED/dbgbuild/bin/near_bare_ground_big_leaf_init_mod.mod +ED/dbgbuild/bin/near_bare_ground_init_mod.mod +ED/dbgbuild/bin/new_patch_sfc_props_mod.mod +ED/dbgbuild/bin/normalize_ed_dmean_vars_mod.mod +ED/dbgbuild/bin/normalize_ed_fmean_vars_mod.mod +ED/dbgbuild/bin/normalize_ed_mmean_vars_mod.mod +ED/dbgbuild/bin/normalize_ed_qmean_vars_mod.mod +ED/dbgbuild/bin/normalize_ed_todaynpp_vars_mod.mod +ED/dbgbuild/bin/normalize_ed_today_vars_mod.mod +ED/dbgbuild/bin/normalize_fmean_vars_mod.mod +ED/dbgbuild/bin/norm_harv_patch_mod.mod +ED/dbgbuild/bin/num_days_mod.mod +ED/dbgbuild/bin/odeint_mod.mod +ED/dbgbuild/bin/opspec_fatal_mod.mod +ED/dbgbuild/bin/optimiz_coms.mod +ED/dbgbuild/bin/overwrite_with_xml_config_mod.mod +ED/dbgbuild/bin/parsefnam_mod.mod +ED/dbgbuild/bin/parse_mod.mod +ED/dbgbuild/bin/pft_coms.mod +ED/dbgbuild/bin/phenology_aux.mod +ED/dbgbuild/bin/phenology_coms.mod +ED/dbgbuild/bin/phenology_driver_eq_0_mod.mod +ED/dbgbuild/bin/phenology_driver_mod.mod +ED/dbgbuild/bin/phenology_startup.mod +ED/dbgbuild/bin/phenology_thresholds_mod.mod +ED/dbgbuild/bin/physiology_coms.mod +ED/dbgbuild/bin/plant_structural_allocation_mod.mod +ED/dbgbuild/bin/prescribed_event_mod.mod +ED/dbgbuild/bin/print_c_and_n_budgets_mod.mod +ED/dbgbuild/bin/print_csiteipa_mod.mod +ED/dbgbuild/bin/print_errmax_mod.mod +ED/dbgbuild/bin/print_fields_mod.mod +ED/dbgbuild/bin/print_photo_details_mod.mod +ED/dbgbuild/bin/print_rk4patch_mod.mod +ED/dbgbuild/bin/print_rk4_state_mod.mod +ED/dbgbuild/bin/print_soil_info_mod.mod +ED/dbgbuild/bin/putconfigint_mod.mod +ED/dbgbuild/bin/putconfigreal8_mod.mod +ED/dbgbuild/bin/putconfigreal_mod.mod +ED/dbgbuild/bin/putconfigstring_mod.mod +ED/dbgbuild/bin/radiate_driver_mod.mod +ED/dbgbuild/bin/rams_f_open_mod.mod +ED/dbgbuild/bin/rank_down_mod.mod +ED/dbgbuild/bin/rank_up_mod.mod +ED/dbgbuild/bin/read_ed10_ed20_history_file_mod.mod +ED/dbgbuild/bin/read_ed21_history_file_mod.mod +ED/dbgbuild/bin/read_ed21_history_unstruct_mod.mod +ED/dbgbuild/bin/read_ed21_polyclone_mod.mod +ED/dbgbuild/bin/read_ed_xml_config_mod.mod +ED/dbgbuild/bin/read_events_xml_mod.mod +ED/dbgbuild/bin/read_met_driver_head_mod.mod +ED/dbgbuild/bin/read_met_drivers_init_mod.mod +ED/dbgbuild/bin/read_met_drivers_mod.mod +ED/dbgbuild/bin/read_nl_mod.mod +ED/dbgbuild/bin/read_ol_file_mod.mod +ED/dbgbuild/bin/read_plantation_fractions_mod.mod +ED/dbgbuild/bin/read_site_file_mod.mod +ED/dbgbuild/bin/read_soil_depth_mod.mod +ED/dbgbuild/bin/read_soil_moist_temp_mod.mod +ED/dbgbuild/bin/rearrange_mod.mod +ED/dbgbuild/bin/reproduction_eq_0_mod.mod +ED/dbgbuild/bin/reproduction_mod.mod +ED/dbgbuild/bin/reset_fmean_vars_mod.mod +ED/dbgbuild/bin/resp_f_decomp_mod.mod +ED/dbgbuild/bin/resp_rh_mod.mod +ED/dbgbuild/bin/rk4_coms.mod +ED/dbgbuild/bin/rk4_driver.mod +ED/dbgbuild/bin/rk4_stepper.mod +ED/dbgbuild/bin/root_resp_norm_mod.mod +ED/dbgbuild/bin/scale_ed_radiation_mod.mod +ED/dbgbuild/bin/seed_dispersal_mod.mod +ED/dbgbuild/bin/selective_gaussian_2body_mod.mod +ED/dbgbuild/bin/setlapseparms_mod.mod +ED/dbgbuild/bin/set_polygon_coordinates_mod.mod +ED/dbgbuild/bin/set_site_defprops_mod.mod +ED/dbgbuild/bin/sfcdata_ed_mod.mod +ED/dbgbuild/bin/sfcrad_ed_mod.mod +ED/dbgbuild/bin/short2diff_sib_mod.mod +ED/dbgbuild/bin/short_bdown_weissnorman_mod.mod +ED/dbgbuild/bin/sngloff_mod.mod +ED/dbgbuild/bin/soil_coms.mod +ED/dbgbuild/bin/soil_default_fill_mod.mod +ED/dbgbuild/bin/soil_respiration_mod.mod +ED/dbgbuild/bin/solar_radiation_breakdown_mod.mod +ED/dbgbuild/bin/sort3_mod.mod +ED/dbgbuild/bin/sort_down_mod.mod +ED/dbgbuild/bin/sort_up_mod.mod +ED/dbgbuild/bin/ssum_mod.mod +ED/dbgbuild/bin/structural_growth_eq_0_mod.mod +ED/dbgbuild/bin/structural_growth_mod.mod +ED/dbgbuild/bin/sw_multiple_scatter_mod.mod +ED/dbgbuild/bin/sw_twostream_clump_mod.mod +ED/dbgbuild/bin/test_mod.mod +ED/dbgbuild/bin/therm_lib8.mod +ED/dbgbuild/bin/therm_lib.mod +ED/dbgbuild/bin/timing_mod.mod +ED/dbgbuild/bin/tokenize1_mod.mod +ED/dbgbuild/bin/tolower_mod.mod +ED/dbgbuild/bin/transfer_ol_month_mod.mod +ED/dbgbuild/bin/trid2_mod.mod +ED/dbgbuild/bin/trid_mod.mod +ED/dbgbuild/bin/ugetarg_mod.mod +ED/dbgbuild/bin/unarrange_mod.mod +ED/dbgbuild/bin/update_c_and_n_pools_mod.mod +ED/dbgbuild/bin/update_cohort_extensive_props_mod.mod +ED/dbgbuild/bin/update_derived_cohort_props_mod.mod +ED/dbgbuild/bin/update_derived_props_mod.mod +ED/dbgbuild/bin/update_diagnostic_vars_mod.mod +ED/dbgbuild/bin/update_ed_yearly_vars_mod.mod +ED/dbgbuild/bin/updatehydroparms_mod.mod +ED/dbgbuild/bin/update_met_drivers_mod.mod +ED/dbgbuild/bin/update_model_time_dm_mod.mod +ED/dbgbuild/bin/update_mod.mod +ED/dbgbuild/bin/update_patch_derived_props_mod.mod +ED/dbgbuild/bin/update_patch_thermo_fmean_mod.mod +ED/dbgbuild/bin/update_patch_thermo_props_mod.mod +ED/dbgbuild/bin/update_phenology_eq_0_mod.mod +ED/dbgbuild/bin/update_phenology_mod.mod +ED/dbgbuild/bin/update_polygon_derived_props_mod.mod +ED/dbgbuild/bin/update_rad_avg_mod.mod +ED/dbgbuild/bin/update_site_derived_props_mod.mod +ED/dbgbuild/bin/update_vital_rates_mod.mod +ED/dbgbuild/bin/updatewatertableadd_mod.mod +ED/dbgbuild/bin/updatewatertablebaseflow_mod.mod +ED/dbgbuild/bin/updatewatertablesubtract_mod.mod +ED/dbgbuild/bin/update_workload_mod.mod +ED/dbgbuild/bin/valugp_mod.mod +ED/dbgbuild/bin/vegetation_dynamics_eq_0_mod.mod +ED/dbgbuild/bin/vegetation_dynamics_mod.mod +ED/dbgbuild/bin/walltime_mod.mod +ED/dbgbuild/bin/warning_mod.mod +ED/dbgbuild/bin/write_ed_xml_config_mod.mod +ED/dbgbuild/bin/writehydro_mod.mod +ED/dbgbuild/bin/xcol2array_mod.mod +ED/dbgbuild/bin/ycol2array_mod.mod +ED/dbgbuild/bin/yesterday_info_mod.mod +ED/dbgbuild/bin/yesterday_mod.mod +ED/dbgbuild/bin/zcol2array_mod.mod +ED/dbgbuild/bin/zero_ed_dmean_vars_mod.mod +ED/dbgbuild/bin/zero_ed_fmean_vars_mod.mod +ED/dbgbuild/bin/zero_ed_mmean_vars_mod.mod +ED/dbgbuild/bin/zero_ed_qmean_vars_mod.mod +ED/dbgbuild/bin/zero_ed_today_vars_mod.mod +ED/dbgbuild/bin/zero_ed_yearly_vars_mod.mod diff --git a/BRAMS/Template/RAMSIN b/BRAMS/Template/RAMSIN index 296f2c6af..faf5ab8bc 100644 --- a/BRAMS/Template/RAMSIN +++ b/BRAMS/Template/RAMSIN @@ -889,7 +889,7 @@ $CUPARM_OPTIONS ! PS3: If NCLOUDS >= 3, then the middle ones will necessarily use Grell's ! ! parameterization. ! !---------------------------------------------------------------------------------------! - NCLOUDS = 2, + NCLOUDS = 1, !---------------------------------------------------------------------------------------! @@ -917,7 +917,7 @@ $CUPARM_OPTIONS ! CONFRQ: how often should the cumulus parametrisation be updated? ! ! CPTIME: when I should start computing the cumulus parametrisation. ! !---------------------------------------------------------------------------------------! - CONFRQ = 900., + CONFRQ = 1200., CPTIME = 0., !---------------------------------------------------------------------------------------! @@ -1173,9 +1173,9 @@ $MODEL_OPTIONS ! 1 -- yes. That's the standard for most runs. ! !---------------------------------------------------------------------------------------! ISWRTYP = 3, - ILWRTYP = 1, + ILWRTYP = 4, ICUMFDBK = 1, - RADFRQ = 300., + RADFRQ = 900., LONRAD = 1, !---------------------------------------------------------------------------------------! @@ -1422,7 +1422,7 @@ $MODEL_OPTIONS ! Soil type 21 is a special case in which we use the albedo method that used to be ! ! the default in ED-2.1. ! !------------------------------------------------------------------------------------! - ISOILCOL = 2, + ISOILCOL = 14, !------------------------------------------------------------------------------------! @@ -1845,7 +1845,7 @@ $ED2_INFO ! If time is a problem, i.e., the runs are too slow, then try making it ! ! larger, but not much larger so to avoid problems... ! !---------------------------------------------------------------------------------------! - DTLSM = 120.0, + DTLSM = 240.0, !---------------------------------------------------------------------------------------! @@ -1886,6 +1886,38 @@ $ED2_INFO + !---------------------------------------------------------------------------------------! + ! The following variables control whether site-, patch-, and cohort-level time ! + ! means and mean sum of squares should be included in the output files or not. ! + ! ! + ! Reasons to add them: ! + ! a. Sub-polygon variables are more comprehensive. ! + ! b. Explore heterogeneity within a polygon and make interesting analysis. ! + ! c. More chances to create cool 3-D plots. ! + ! ! + ! Reasons to NOT add them: ! + ! a. Output files will become much larger! ! + ! b. In regional/coupled runs, the output files will be ridiculously large. ! + ! c. You may fill up the disk. ! + ! d. Other people's job may crash due to insufficient disk space. ! + ! e. You will gain a bad reputation amongst your colleagues. ! + ! f. And it will be entirely your fault. ! + ! ! + ! Either way, polygon-level averages are always included, and so are the instan- ! + ! taneous site-, patch-, and cohort-level variables needed for resuming the run. ! + ! ! + ! IADD_SITE_MEANS -- Add site-level averages to the output (0 = no; 1 = yes) ! + ! IADD_PATCH_MEANS -- Add patch-level averages to the output (0 = no; 1 = yes) ! + ! IADD_COHORT_MEANS -- Add cohort-level averages to the output (0 = no; 1 = yes) ! + ! ! + !---------------------------------------------------------------------------------------! + IADD_SITE_MEANS = 0, + IADD_PATCH_MEANS = 0, + IADD_COHORT_MEANS = 0, + !---------------------------------------------------------------------------------------! + + + !---------------------------------------------------------------------------------------! ! ATTACH_METADATA -- Flag for attaching metadata to HDF datasets. Attaching metadata ! @@ -2019,7 +2051,7 @@ $ED2_INFO SOIL_DATABASE = '/n/moorcroft_data/data/ed2_data/soil_ed22/Quesada+RADAM+IGBP/Quesada+RADAM+IGBP_', LU_DATABASE = '/n/moorcroft_data/mlongo/scenarios/glu-3.3.1+sb1/one/glu-3.3.1+sb1-', PLANTATION_FILE = '', - LU_RESCALE_FILE = '/n/Moorcroft_Lab/Lab/data/ed2_data/21restart/rescale/SA1relative.lu.area-22km-2038.txt', + LU_RESCALE_FILE = '/n/Moorcroft_Lab/Lab/data/ed2_data/21restart/rescale/SA1relative.lu.area-22km-2008.txt', THSUMS_DATABASE = '/n/Moorcroft_Lab/Lab/data/ed2_data/ed_inputs/', !---------------------------------------------------------------------------------------! @@ -2096,7 +2128,7 @@ $ED2_INFO ! 3. Hybrid Stepping (BDF2 implicit step for the canopy air and ! ! leaf temp, forward Euler for else, under development). ! !---------------------------------------------------------------------------------------! - INTEGRATION_SCHEME = 3, + INTEGRATION_SCHEME = 1, !---------------------------------------------------------------------------------------! @@ -2280,7 +2312,7 @@ $ED2_INFO ! 1. Dietze (2008) model. Cohorts have a finite radius, and cohorts are ! ! stacked on the top of each other. ! !---------------------------------------------------------------------------------------! - CROWN_MOD = 1, + CROWN_MOD = 0, !---------------------------------------------------------------------------------------! @@ -2315,11 +2347,11 @@ $ED2_INFO ! lim -> 0. Black hole (0 itself is unacceptable) ! ! 1. Homogeneously spread over the layer (i.e., no clumping) ! !---------------------------------------------------------------------------------------! - ICANRAD = 0, + ICANRAD = 1, LTRANS_VIS = 0.050, - LTRANS_NIR = 0.270, + LTRANS_NIR = 0.230, LREFLECT_VIS = 0.100, - LREFLECT_NIR = 0.540, + LREFLECT_NIR = 0.460, ORIENT_TREE = 0.100, ORIENT_GRASS = -0.100, CLUMP_TREE = 0.800, @@ -2391,8 +2423,8 @@ $ED2_INFO ! cr = k ------------- + (1 - k) ------------- ! ! CB_lightmax CB_watermax ! !---------------------------------------------------------------------------------------! - IDDMORT_SCHEME = 0, - DDMORT_CONST = 1., + IDDMORT_SCHEME = 1, + DDMORT_CONST = 0.8, !---------------------------------------------------------------------------------------! @@ -2449,8 +2481,8 @@ $ED2_INFO BPHOTO_C4 = 10000., KW_GRASS = 900., KW_TREE = 600., - GAMMA_C3 = 0.015, - GAMMA_C4 = 0.040, + GAMMA_C3 = 0.0145, + GAMMA_C4 = 0.035, D0_GRASS = 0.016, D0_TREE = 0.016, ALPHA_C3 = 0.080, @@ -2545,7 +2577,7 @@ $ED2_INFO ! the minimum water deficit relative to the total rainfall, over the ! ! past 12 months, to trigger fires. ! !---------------------------------------------------------------------------------------! - INCLUDE_FIRE = 2, + INCLUDE_FIRE = 0, FIRE_PARAMETER = 0.5, SM_FIRE = -1.40, !---------------------------------------------------------------------------------------! @@ -2558,7 +2590,7 @@ $ED2_INFO ! 0. no anthropogenic disturbance. ! ! 1. use anthropogenic disturbance dataset. ! !---------------------------------------------------------------------------------------! - IANTH_DISTURB = 0, + IANTH_DISTURB = 1, !---------------------------------------------------------------------------------------! diff --git a/BRAMS/build/bin/dependency.mk b/BRAMS/build/bin/dependency.mk index e69de29bb..47d1c6a3d 100644 --- a/BRAMS/build/bin/dependency.mk +++ b/BRAMS/build/bin/dependency.mk @@ -0,0 +1,812 @@ +# DO NOT DELETE THIS LINE - used by make depend +cyclic_mod.o: grid_dims.mod +rbnd.o: catt_start.mod mem_basic.mod mem_grid.mod mem_scratch.mod mem_tend.mod +rbnd.o: mem_turb.mod node_mod.mod ref_sounding.mod therm_lib.mod var_tables.mod +rbnd_adap.o: mem_grid.mod ref_sounding.mod +dry_dep.o: extras.mod leaf_coms.mod mem_basic.mod mem_grid.mod mem_leaf.mod +dry_dep.o: mem_micro.mod mem_scalar.mod mem_scratch.mod mem_turb.mod +dry_dep.o: rconstants.mod +emission_source_map.o: extras.mod grid_dims.mod mem_basic.mod mem_grid.mod +emission_source_map.o: mem_grid_dim_defs.mod mem_scalar.mod mem_scratch.mod +extra.o: var_tables.mod +plumerise_vector.o: extras.mod mem_basic.mod mem_grid.mod mem_scalar.mod +plumerise_vector.o: node_mod.mod rconstants.mod therm_lib.mod +coriolis.o: mem_basic.mod mem_grid.mod mem_scratch.mod mem_tend.mod +coriolis.o: rconstants.mod ref_sounding.mod +local_proc.o: io_params.mod mem_grid.mod node_mod.mod rconstants.mod +local_proc.o: ref_sounding.mod rpara.mod therm_lib.mod +mod_GhostBlock.o: mod_ghostblockpartition.mod +mod_advect_kit.o: mem_basic.mod mem_grid.mod mem_tend.mod mod_ghostblock.mod +mod_advect_kit.o: mod_ghostblockpartition.mod node_mod.mod var_tables.mod +model.o: advect_kit.mod catt_start.mod dtset.mod grid_dims.mod io_params.mod +model.o: mem_grid.mod mem_leaf.mod node_mod.mod rpara.mod +modsched.o: mem_basic.mod mem_grid.mod mem_scratch.mod +raco.o: mem_basic.mod mem_grid.mod mem_scratch.mod mem_tend.mod node_mod.mod +raco.o: rconstants.mod therm_lib.mod +raco_adap.o: mem_grid.mod mem_scratch.mod node_mod.mod rconstants.mod +radvc.o: mem_basic.mod mem_grid.mod mem_scratch.mod mem_tend.mod var_tables.mod +rams_master.o: catt_start.mod dtset.mod emission_source_map.mod grid_dims.mod +rams_master.o: io_params.mod mem_cuparm.mod mem_emiss.mod mem_grid.mod +rams_master.o: mem_leaf.mod mem_mass.mod mem_oda.mod mem_radiate.mod +rams_master.o: mem_varinit.mod node_mod.mod rpara.mod teb_spm_start.mod +ref_sounding.o: grid_dims.mod +rnode.o: advect_kit.mod catt_start.mod dtset.mod grid_dims.mod io_params.mod +rnode.o: mem_aerad.mod mem_cuparm.mod mem_grid.mod mem_leaf.mod mem_oda.mod +rnode.o: mem_radiate.mod node_mod.mod var_tables.mod +rthrm.o: mem_basic.mod mem_grid.mod mem_micro.mod mem_scratch.mod micphys.mod +rthrm.o: node_mod.mod rconstants.mod therm_lib.mod +rtimh.o: advect_kit.mod catt_start.mod emission_source_map.mod mem_all.mod +rtimh.o: mem_basic.mod mem_cuparm.mod mem_emiss.mod mem_grid.mod mem_leaf.mod +rtimh.o: mem_mass.mod mem_mnt_advec.mod mem_oda.mod mem_scalar.mod mem_turb.mod +rtimh.o: mem_varinit.mod node_mod.mod teb_spm_start.mod therm_lib.mod +rtimi.o: mem_basic.mod mem_grid.mod mem_scratch.mod mem_tend.mod node_mod.mod +rtimi.o: var_tables.mod +cu_read.o: grid_dims.mod mem_basic.mod mem_cuparm.mod mem_grid.mod +grell_coms.o: grid_dims.mod +grell_cupar_aux.o: grell_coms.mod mem_ensemble.mod mem_scratch_grell.mod +grell_cupar_aux.o: rconstants.mod therm_lib.mod +grell_cupar_downdraft.o: rconstants.mod therm_lib.mod +grell_cupar_driver.o: catt_start.mod extras.mod grell_coms.mod io_params.mod +grell_cupar_driver.o: mem_basic.mod mem_cuparm.mod mem_ensemble.mod mem_grid.mod +grell_cupar_driver.o: mem_mass.mod mem_micro.mod mem_scalar.mod mem_scratch.mod +grell_cupar_driver.o: mem_scratch_grell.mod mem_tend.mod mem_turb.mod +grell_cupar_driver.o: micphys.mod node_mod.mod therm_lib.mod +grell_cupar_dynamic.o: grell_coms.mod grid_dims.mod mem_ensemble.mod +grell_cupar_dynamic.o: mem_scratch_grell.mod rconstants.mod therm_lib.mod +grell_cupar_ensemble.o: rconstants.mod +grell_cupar_environment.o: grell_coms.mod rconstants.mod therm_lib.mod +grell_cupar_feedback.o: mem_ensemble.mod mem_scratch_grell.mod rconstants.mod +grell_cupar_static.o: grid_dims.mod mem_ensemble.mod mem_scratch_grell.mod +grell_cupar_static.o: rconstants.mod therm_lib.mod +grell_cupar_updraft.o: mem_cuparm.mod rconstants.mod therm_lib.mod +grell_extras_catt.o: grell_coms.mod mem_basic.mod mem_ensemble.mod mem_grid.mod +grell_extras_catt.o: mem_scalar.mod mem_scratch.mod mem_scratch_grell.mod +grell_extras_catt.o: mem_tconv.mod rconstants.mod +kuo_cupar_driver.o: conv_coms.mod mem_basic.mod mem_cuparm.mod mem_grid.mod +kuo_cupar_driver.o: mem_scratch.mod mem_tend.mod node_mod.mod rconstants.mod +kuo_cupar_driver.o: therm_lib.mod +mem_cuparm.o: grid_dims.mod var_tables.mod +rconv_driver.o: mem_basic.mod mem_cuparm.mod mem_grid.mod mem_scratch.mod +rconv_driver.o: mem_tend.mod mem_turb.mod node_mod.mod +shcu_vars_const.o: conv_coms.mod grid_dims.mod +souza_cupar_driver.o: conv_coms.mod mem_basic.mod mem_cuparm.mod mem_grid.mod +souza_cupar_driver.o: mem_micro.mod mem_scratch.mod mem_tend.mod mem_turb.mod +souza_cupar_driver.o: node_mod.mod shcu_vars_const.mod therm_lib.mod +edcp_driver.o: consts_coms.mod ed_misc_coms.mod ed_node_coms.mod +edcp_driver.o: ed_state_vars.mod ed_work_vars.mod grid_coms.mod io_params.mod +edcp_driver.o: leaf_coms.mod mem_edcp.mod mem_grid.mod mem_leaf.mod +edcp_driver.o: phenology_aux.mod rk4_coms.mod soil_coms.mod +edcp_init.o: ed_max_dims.mod ed_node_coms.mod ed_para_coms.mod ed_state_vars.mod +edcp_init.o: ed_work_vars.mod grid_coms.mod mem_grid.mod mem_leaf.mod +edcp_init.o: mem_polygons.mod node_mod.mod rpara.mod soil_coms.mod +edcp_lake_driver.o: canopy_air_coms.mod canopy_struct_dynamics.mod +edcp_lake_driver.o: consts_coms.mod io_params.mod lake_coms.mod leaf_coms.mod +edcp_lake_driver.o: mem_basic.mod mem_edcp.mod mem_grid.mod mem_leaf.mod +edcp_lake_driver.o: mem_radiate.mod node_mod.mod rk4_coms.mod therm_lib.mod +edcp_lake_driver.o: therm_lib8.mod +edcp_lake_misc.o: canopy_air_coms.mod canopy_struct_dynamics.mod consts_coms.mod +edcp_lake_misc.o: ed_misc_coms.mod lake_coms.mod leaf_coms.mod mem_leaf.mod +edcp_lake_misc.o: rk4_coms.mod therm_lib8.mod +edcp_lake_stepper.o: ed_misc_coms.mod lake_coms.mod rk4_coms.mod +edcp_load_namelist.o: canopy_air_coms.mod canopy_layer_coms.mod +edcp_load_namelist.o: canopy_radiation_coms.mod consts_coms.mod decomp_coms.mod +edcp_load_namelist.o: detailed_coms.mod disturb_coms.mod ed_max_dims.mod +edcp_load_namelist.o: ed_misc_coms.mod grid_coms.mod grid_dims.mod io_params.mod +edcp_load_namelist.o: leaf_coms.mod mem_edcp.mod mem_grid.mod mem_leaf.mod +edcp_load_namelist.o: mem_polygons.mod mem_radiate.mod met_driver_coms.mod +edcp_load_namelist.o: optimiz_coms.mod pft_coms.mod phenology_coms.mod +edcp_load_namelist.o: physiology_coms.mod rk4_coms.mod soil_coms.mod +edcp_met.o: canopy_radiation_coms.mod ed_max_dims.mod ed_misc_coms.mod +edcp_met.o: ed_node_coms.mod ed_state_vars.mod leaf_coms.mod mem_basic.mod +edcp_met.o: mem_cuparm.mod mem_edcp.mod mem_grid.mod mem_leaf.mod mem_micro.mod +edcp_met.o: mem_radiate.mod mem_turb.mod met_driver_coms.mod micphys.mod +edcp_met.o: node_mod.mod rconstants.mod soil_coms.mod therm_lib.mod +edcp_met_init.o: ed_state_vars.mod ed_therm_lib.mod grid_coms.mod leaf_coms.mod +edcp_met_init.o: mem_grid.mod mem_leaf.mod mem_radiate.mod rconstants.mod +edcp_met_init.o: soil_coms.mod therm_lib.mod +edcp_model.o: consts_coms.mod ed_max_dims.mod ed_misc_coms.mod ed_node_coms.mod +edcp_model.o: ed_state_vars.mod grid_coms.mod grid_dims.mod io_params.mod +edcp_model.o: mem_edcp.mod mem_grid.mod mem_polygons.mod rk4_coms.mod +edcp_model.o: rk4_driver.mod +edcp_mpiutils.o: canopy_air_coms.mod canopy_layer_coms.mod +edcp_mpiutils.o: canopy_radiation_coms.mod decomp_coms.mod detailed_coms.mod +edcp_mpiutils.o: disturb_coms.mod ed_max_dims.mod ed_misc_coms.mod grid_coms.mod +edcp_mpiutils.o: mem_edcp.mod mem_polygons.mod met_driver_coms.mod +edcp_mpiutils.o: optimiz_coms.mod pft_coms.mod phenology_coms.mod +edcp_mpiutils.o: physiology_coms.mod rk4_coms.mod soil_coms.mod +edcp_para_init.o: ed_misc_coms.mod ed_node_coms.mod ed_work_vars.mod +edcp_para_init.o: io_params.mod mem_grid.mod mem_leaf.mod mem_polygons.mod +edcp_para_init.o: node_mod.mod soil_coms.mod +lake_coms.o: consts_coms.mod +mem_edcp.o: var_tables.mod +cond_read.o: grid_dims.mod mem_grid.mod mem_varinit.mod +cond_update.o: an_header.mod grid_dims.mod grid_struct.mod mem_basic.mod +cond_update.o: mem_grid.mod mem_varinit.mod rconstants.mod var_tables.mod +mem_oda.o: grid_dims.mod var_tables.mod +nud_analysis.o: mem_basic.mod mem_grid.mod mem_scratch.mod mem_tend.mod +nud_analysis.o: mem_varinit.mod node_mod.mod +nud_read.o: grid_dims.mod mem_grid.mod mem_varinit.mod +nud_update.o: an_header.mod grid_dims.mod grid_struct.mod mem_aerad.mod +nud_update.o: mem_basic.mod mem_grid.mod mem_varinit.mod rconstants.mod +nud_update.o: var_tables.mod +obs_input.o: grid_dims.mod +oda_krig.o: grid_dims.mod mem_oda.mod +oda_nudge.o: io_params.mod mem_basic.mod mem_grid.mod mem_oda.mod +oda_nudge.o: mem_scratch.mod mem_tend.mod node_mod.mod +oda_proc_obs.o: mem_grid.mod mem_oda.mod rconstants.mod therm_lib.mod +oda_read.o: grid_dims.mod mem_grid.mod mem_oda.mod +oda_sta_count.o: mem_grid.mod mem_oda.mod obs_input.mod +oda_sta_input.o: mem_grid.mod mem_oda.mod obs_input.mod +read_ralph.o: grid_dims.mod obs_input.mod rconstants.mod therm_lib.mod +varf_read.o: grid_dims.mod mem_grid.mod mem_varinit.mod +varf_update.o: grid_dims.mod mem_basic.mod mem_grid.mod mem_leaf.mod +varf_update.o: mem_scratch.mod mem_varinit.mod rconstants.mod ref_sounding.mod +varf_update.o: therm_lib.mod +adap_init.o: mem_leaf.mod +domain_decomp.o: grid_dims.mod +gridset.o: grid_dims.mod mem_grid.mod rconstants.mod +rams_grid.o: mem_grid.mod node_mod.mod rconstants.mod +rdint.o: catt_start.mod domain_decomp.mod emission_source_map.mod grell_coms.mod +rdint.o: grid_dims.mod io_params.mod isan_coms.mod leaf_coms.mod mem_basic.mod +rdint.o: mem_cuparm.mod mem_emiss.mod mem_gaspart.mod mem_grid.mod mem_leaf.mod +rdint.o: mem_mass.mod mem_micro.mod mem_mnt_advec.mod mem_oda.mod +rdint.o: mem_radiate.mod mem_scalar.mod mem_scratch.mod mem_soil_moisture.mod +rdint.o: mem_teb.mod mem_teb_common.mod mem_turb.mod mem_varinit.mod micphys.mod +rdint.o: node_mod.mod plume_utils.mod rconstants.mod ref_sounding.mod +rdint.o: teb_spm_start.mod teb_vars_const.mod therm_lib.mod therm_lib8.mod +rdint.o: turb_coms.mod var_tables.mod +rhhi.o: mem_basic.mod mem_grid.mod mem_scratch.mod rconstants.mod +rhhi.o: ref_sounding.mod therm_lib.mod +rinit.o: io_params.mod mem_basic.mod mem_grid.mod mem_micro.mod mem_scratch.mod +rinit.o: mem_turb.mod micphys.mod node_mod.mod rconstants.mod ref_sounding.mod +error_mess.o: node_mod.mod +inithis.o: an_header.mod grid_dims.mod io_params.mod leaf_coms.mod mem_aerad.mod +inithis.o: mem_basic.mod mem_cuparm.mod mem_grid.mod mem_leaf.mod +inithis.o: mem_scratch.mod rconstants.mod ref_sounding.mod therm_lib.mod +inithis.o: var_tables.mod +io_params.o: grid_dims.mod +opspec.o: catt_start.mod grell_coms.mod io_params.mod leaf_coms.mod +opspec.o: mem_basic.mod mem_cuparm.mod mem_emiss.mod mem_grid.mod mem_leaf.mod +opspec.o: mem_mass.mod mem_mnt_advec.mod mem_radiate.mod mem_turb.mod +opspec.o: mem_varinit.mod micphys.mod teb_spm_start.mod therm_lib.mod +rams_read_header.o: an_header.mod grid_dims.mod +ranlavg.o: io_params.mod mem_basic.mod mem_grid.mod mem_scratch.mod mem_turb.mod +ranlavg.o: node_mod.mod var_tables.mod +rcio.o: grell_coms.mod grid_dims.mod leaf_coms.mod mem_all.mod mem_mass.mod +rcio.o: mem_mnt_advec.mod therm_lib.mod turb_coms.mod +recycle.o: grid_dims.mod io_params.mod mem_aerad.mod mem_cuparm.mod mem_grid.mod +recycle.o: mem_leaf.mod mem_scratch.mod var_tables.mod +rhdf5.o: an_header.mod grid_dims.mod io_params.mod mem_aerad.mod +rhdf5.o: mem_cuparm.mod mem_grid.mod var_tables.mod +rio.o: an_header.mod grid_dims.mod io_params.mod mem_aerad.mod mem_basic.mod +rio.o: mem_cuparm.mod mem_grid.mod mem_scratch.mod mem_turb.mod rconstants.mod +rio.o: ref_sounding.mod therm_lib.mod var_tables.mod +rname.o: catt_start.mod domain_decomp.mod emission_source_map.mod grell_coms.mod +rname.o: leaf_coms.mod mem_all.mod mem_mass.mod mem_mnt_advec.mod +rname.o: mem_soil_moisture.mod plume_utils.mod teb_spm_start.mod therm_lib.mod +rname.o: turb_coms.mod +rprnt.o: io_params.mod leaf_coms.mod mem_all.mod mem_basic.mod mem_grid.mod +rprnt.o: mem_leaf.mod mem_scratch.mod mem_turb.mod rconstants.mod +rprnt.o: ref_sounding.mod therm_lib.mod var_tables.mod +aobj.o: isan_coms.mod rconstants.mod +asgen.o: grid_dims.mod io_params.mod isan_coms.mod mem_grid.mod +asnc.o: isan_coms.mod rconstants.mod +asti.o: isan_coms.mod mem_grid.mod rconstants.mod therm_lib.mod +asti2.o: grid_dims.mod isan_coms.mod rconstants.mod therm_lib.mod +astp.o: isan_coms.mod rconstants.mod therm_lib.mod +avarf.o: isan_coms.mod mem_grid.mod rconstants.mod therm_lib.mod +file_inv.o: grid_dims.mod isan_coms.mod +first_rams.o: an_header.mod grid_dims.mod isan_coms.mod mem_grid.mod +first_rams.o: mem_scratch.mod rconstants.mod therm_lib.mod +isan_coms.o: grid_dims.mod +isan_io.o: isan_coms.mod +refstate.o: rconstants.mod therm_lib.mod +v_interps.o: isan_coms.mod rconstants.mod therm_lib.mod +charutils.o: grid_dims.mod +dateutils.o: rconstants.mod +filelist.o: grid_dims.mod +getvar.o: an_header.mod grid_dims.mod +great_circle.o: rconstants.mod +hdf5_utils.o: hdf5_coms.mod +map_proj.o: rconstants.mod +numutils.o: rconstants.mod therm_lib.mod +polarst.o: rconstants.mod +therm_lib.o: rconstants.mod +therm_lib8.o: rconstants.mod therm_lib.mod +varutils.o: mem_aerad.mod mem_cuparm.mod mem_grid.mod node_mod.mod +vformat.o: grid_dims.mod +mem_mass.o: grid_dims.mod var_tables.mod +rexev.o: mem_basic.mod mem_grid.mod mem_mass.mod mem_scratch.mod mem_tend.mod +rexev.o: rconstants.mod therm_lib.mod +rmass.o: mem_grid.mod mem_mass.mod mem_scratch.mod mem_scratch_grell.mod +rmass.o: mem_turb.mod +dealloc.o: catt_start.mod mem_aerad.mod mem_all.mod mem_ensemble.mod +dealloc.o: mem_gaspart.mod mem_globaer.mod mem_globrad.mod mem_mass.mod +dealloc.o: mem_mnt_advec.mod mem_opt.mod mem_scratch1_grell.mod +dealloc.o: mem_scratch_grell.mod mem_teb.mod mem_teb_common.mod mem_tend.mod +dealloc.o: teb_spm_start.mod +hdf5_coms.o: +mem_all.o: io_params.mod mem_basic.mod mem_cuparm.mod mem_grid.mod mem_leaf.mod +mem_all.o: mem_micro.mod mem_nestb.mod mem_oda.mod mem_radiate.mod +mem_all.o: mem_scalar.mod mem_scratch.mod mem_scratch1.mod mem_tend.mod +mem_all.o: mem_turb.mod mem_varinit.mod micphys.mod ref_sounding.mod +mem_all.o: var_tables.mod +mem_basic.o: grid_dims.mod var_tables.mod +mem_grid.o: grid_dims.mod var_tables.mod +mem_scalar.o: var_tables.mod +mem_scratch.o: catt_start.mod grid_dims.mod mem_aerad.mod mem_radiate.mod +mem_scratch1_brams.o: var_tables.mod +mem_tend.o: mem_basic.mod mem_emiss.mod mem_gaspart.mod mem_micro.mod +mem_tend.o: mem_scalar.mod mem_turb.mod teb_spm_start.mod +mem_varinit.o: grid_dims.mod var_tables.mod +rams_mem_alloc.o: catt_start.mod extras.mod grell_coms.mod io_params.mod +rams_mem_alloc.o: leaf_coms.mod machine_arq.mod mem_aerad.mod mem_all.mod +rams_mem_alloc.o: mem_carma.mod mem_emiss.mod mem_ensemble.mod mem_gaspart.mod +rams_mem_alloc.o: mem_globaer.mod mem_globrad.mod mem_grell_param.mod +rams_mem_alloc.o: mem_grid_dim_defs.mod mem_mass.mod mem_mnt_advec.mod +rams_mem_alloc.o: mem_opt.mod mem_scalar.mod mem_scratch1_grell.mod +rams_mem_alloc.o: mem_scratch2_grell.mod mem_scratch2_grell_sh.mod +rams_mem_alloc.o: mem_scratch3_grell.mod mem_scratch3_grell_sh.mod +rams_mem_alloc.o: mem_scratch_grell.mod mem_teb.mod mem_teb_common.mod +rams_mem_alloc.o: mem_turb_scalar.mod node_mod.mod teb_spm_start.mod +rams_mem_alloc.o: teb_vars_const.mod turb_coms.mod +vtab_fill.o: grid_dims.mod io_params.mod var_tables.mod +mem_micro.o: micphys.mod therm_lib.mod var_tables.mod +mic_coll.o: micphys.mod micro_coms.mod rconstants.mod therm_lib.mod +mic_driv.o: grid_dims.mod mem_basic.mod mem_grid.mod mem_micro.mod micphys.mod +mic_driv.o: micro_coms.mod node_mod.mod therm_lib.mod +mic_gamma.o: rconstants.mod therm_lib.mod +mic_init.o: grid_dims.mod mem_grid.mod mem_radiate.mod micphys.mod +mic_init.o: micro_coms.mod node_mod.mod rconstants.mod therm_lib.mod +mic_misc.o: mem_basic.mod mem_grid.mod mem_micro.mod mem_scratch.mod micphys.mod +mic_misc.o: micro_coms.mod rconstants.mod therm_lib.mod +mic_nuc.o: micphys.mod micro_coms.mod rconstants.mod therm_lib.mod +mic_tabs.o: micphys.mod micro_coms.mod rconstants.mod +mic_vap.o: micphys.mod micro_coms.mod rconstants.mod therm_lib.mod +micphys.o: grid_dims.mod +micro_coms.o: micphys.mod rconstants.mod +geodat.o: grid_dims.mod io_params.mod mem_grid.mod mem_leaf.mod rconstants.mod +geodat.o: teb_spm_start.mod +landuse_input.o: grid_dims.mod hdf5_utils.mod io_params.mod leaf_coms.mod +landuse_input.o: mem_leaf.mod mem_mksfc.mod rconstants.mod +mem_mksfc.o: grid_dims.mod teb_spm_start.mod +mksfc_driver.o: io_params.mod mem_grid.mod mem_mksfc.mod teb_spm_start.mod +mksfc_fuso.o: grid_dims.mod io_params.mod mem_emiss.mod mem_gaspart.mod +mksfc_fuso.o: mem_grid.mod mem_mksfc.mod mem_teb.mod teb_vars_const.mod +mksfc_ndvi.o: grid_dims.mod io_params.mod mem_grid.mod mem_leaf.mod +mksfc_ndvi.o: mem_mksfc.mod +mksfc_sfc.o: grid_dims.mod io_params.mod mem_grid.mod mem_leaf.mod mem_mksfc.mod +mksfc_sst.o: grid_dims.mod io_params.mod mem_grid.mod mem_leaf.mod mem_mksfc.mod +mksfc_top.o: grid_dims.mod io_params.mod mem_grid.mod mem_mksfc.mod +ndvi_read.o: grid_dims.mod io_params.mod mem_grid.mod mem_leaf.mod +nest_geosst.o: io_params.mod leaf_coms.mod mem_basic.mod mem_grid.mod +nest_geosst.o: mem_leaf.mod mem_mksfc.mod mem_radiate.mod mem_scratch.mod +nest_geosst.o: mem_soil_moisture.mod +nest_init_aux.o: mem_basic.mod mem_grid.mod mem_leaf.mod mem_scratch.mod +sst_read.o: grid_dims.mod io_params.mod mem_grid.mod mem_leaf.mod +mem_mnt_advec.o: var_tables.mod +mnt_advec_aux.o: mem_grid.mod rconstants.mod therm_lib.mod +mnt_advec_main.o: grid_dims.mod mem_basic.mod mem_grid.mod mem_mnt_advec.mod +mnt_advec_main.o: mem_scratch.mod therm_lib.mod var_tables.mod +mpass_advec.o: grid_dims.mod mem_aerad.mod mem_cuparm.mod mem_grid.mod +mpass_advec.o: mem_scratch.mod node_mod.mod var_tables.mod +mpass_cyclic.o: cyclic_mod.mod grid_dims.mod mem_aerad.mod mem_basic.mod +mpass_cyclic.o: mem_cuparm.mod mem_grid.mod mem_scratch.mod node_mod.mod +mpass_cyclic.o: var_tables.mod +mpass_dtl.o: mem_grid.mod node_mod.mod rpara.mod +mpass_feed.o: grid_dims.mod mem_basic.mod mem_grid.mod mem_scratch1.mod +mpass_feed.o: node_mod.mod var_tables.mod +mpass_full.o: grid_dims.mod io_params.mod mem_aerad.mod mem_cuparm.mod +mpass_full.o: mem_grid.mod mem_scratch.mod mem_varinit.mod node_mod.mod +mpass_full.o: rpara.mod var_tables.mod +mpass_init.o: catt_start.mod cyclic_mod.mod emission_source_map.mod +mpass_init.o: grell_coms.mod grid_dims.mod leaf_coms.mod mem_all.mod +mpass_init.o: mem_cuparm.mod mem_emiss.mod mem_grid.mod mem_mass.mod +mpass_init.o: mem_mnt_advec.mod micphys.mod node_mod.mod plume_utils.mod +mpass_init.o: ref_sounding.mod rpara.mod teb_spm_start.mod teb_vars_const.mod +mpass_init.o: therm_lib.mod turb_coms.mod +mpass_lbc.o: grid_dims.mod mem_aerad.mod mem_cuparm.mod mem_grid.mod +mpass_lbc.o: mem_scratch.mod node_mod.mod var_tables.mod +mpass_nest.o: grid_dims.mod mem_basic.mod mem_grid.mod mem_nestb.mod +mpass_nest.o: mem_scratch.mod node_mod.mod var_tables.mod +mpass_oda.o: grid_dims.mod mem_oda.mod node_mod.mod rpara.mod +mpass_st.o: grid_dims.mod mem_basic.mod mem_grid.mod mem_scratch.mod +mpass_st.o: node_mod.mod +node_mod.o: grid_dims.mod +par_decomp.o: cyclic_mod.mod domain_decomp.mod grid_dims.mod mem_grid.mod +par_decomp.o: rpara.mod +para_init.o: grid_dims.mod mem_aerad.mod mem_basic.mod mem_cuparm.mod +para_init.o: mem_grid.mod mem_scratch.mod node_mod.mod rpara.mod var_tables.mod +paral.o: grid_dims.mod mem_aerad.mod mem_cuparm.mod mem_grid.mod mem_scratch.mod +paral.o: node_mod.mod rpara.mod var_tables.mod +rnest_par.o: mem_grid.mod +rpara.o: grid_dims.mod +hemi2.o: grid_dims.mod mem_basic.mod mem_grid.mod var_tables.mod +mem_nestb.o: var_tables.mod +nest_drivers.o: mem_basic.mod mem_grid.mod mem_nestb.mod mem_scratch.mod +nest_drivers.o: mem_tend.mod node_mod.mod var_tables.mod +nest_feed.o: mem_grid.mod +nest_intrp.o: grid_dims.mod mem_basic.mod mem_grid.mod mem_nestb.mod +nest_intrp.o: mem_scratch.mod rconstants.mod ref_sounding.mod +nest_move.o: mem_basic.mod mem_grid.mod mem_leaf.mod mem_scratch.mod +nest_move.o: mem_tend.mod mem_turb.mod var_tables.mod +cup_dn.o: rconstants.mod +cup_env.o: rconstants.mod therm_lib.mod +cup_grell2.o: mem_grell_param.mod mem_scratch2_grell.mod mem_scratch3_grell.mod +cup_grell2.o: rconstants.mod +cup_grell2_shcu.o: mem_grell_param.mod mem_scratch2_grell_sh.mod +cup_grell2_shcu.o: mem_scratch3_grell_sh.mod rconstants.mod +cup_up.o: rconstants.mod +mem_grell_param2.o: grell_coms.mod +mem_scratch2_grell.o: mem_grell_param.mod node_mod.mod +mem_scratch2_grell_sh.o: mem_grell_param.mod node_mod.mod +mem_scratch3_grell.o: mem_grell_param.mod +mem_scratch3_grell_sh.o: mem_grell_param.mod +old_grell_cupar_driver.o: grell_coms.mod io_params.mod mem_basic.mod +old_grell_cupar_driver.o: mem_cuparm.mod mem_grell_param.mod mem_grid.mod +old_grell_cupar_driver.o: mem_leaf.mod mem_mass.mod mem_micro.mod mem_scalar.mod +old_grell_cupar_driver.o: mem_scratch.mod mem_scratch1_grell.mod +old_grell_cupar_driver.o: mem_scratch2_grell.mod mem_scratch2_grell_sh.mod +old_grell_cupar_driver.o: mem_scratch3_grell.mod mem_scratch3_grell_sh.mod +old_grell_cupar_driver.o: mem_tend.mod mem_turb.mod node_mod.mod rconstants.mod +old_grell_cupar_driver.o: therm_lib.mod +harr_coms.o: mem_harr.mod +harr_rad.o: harr_coms.mod mem_harr.mod rconstants.mod +harr_raddriv.o: harr_coms.mod mem_grid.mod mem_harr.mod mem_leaf.mod +harr_raddriv.o: mem_radiate.mod micphys.mod rconstants.mod therm_lib.mod +harr_radinit.o: harr_coms.mod mem_cuparm.mod mem_grid.mod mem_harr.mod +harr_radinit.o: mem_radiate.mod micphys.mod +mem_aerad.o: mem_grid_dim_defs.mod +mem_carma.o: grid_dims.mod mem_aerad.mod mem_globrad.mod +mem_globaer.o: grid_dims.mod mem_aerad.mod +mem_globrad.o: mem_aerad.mod rconstants.mod +mem_mclat.o: rconstants.mod +mem_radiate.o: var_tables.mod +rad_carma.o: catt_start.mod grid_dims.mod mem_aerad.mod mem_carma.mod +rad_carma.o: mem_globaer.mod mem_globrad.mod mem_grid.mod mem_radiate.mod +rad_carma.o: node_mod.mod rconstants.mod therm_lib.mod +rad_ccmp.o: rconstants.mod +rad_driv.o: catt_start.mod mem_basic.mod mem_cuparm.mod mem_grid.mod +rad_driv.o: mem_harr.mod mem_leaf.mod mem_mclat.mod mem_micro.mod +rad_driv.o: mem_radiate.mod mem_scalar.mod mem_scratch.mod mem_teb_common.mod +rad_driv.o: mem_tend.mod micphys.mod rad_carma.mod rconstants.mod +rad_driv.o: teb_spm_start.mod therm_lib.mod +rad_mclat.o: harr_coms.mod mem_grid.mod mem_mclat.mod mem_radiate.mod +rad_mclat.o: rconstants.mod +mem_soil_moisture.o: grid_dims.mod leaf_coms.mod +soil_moisture_init.o: grid_dims.mod io_params.mod leaf_coms.mod mem_grid.mod +soil_moisture_init.o: mem_leaf.mod mem_soil_moisture.mod rconstants.mod +soil_moisture_init.o: therm_lib.mod +leaf3.o: io_params.mod leaf_coms.mod mem_basic.mod mem_cuparm.mod mem_grid.mod +leaf3.o: mem_leaf.mod mem_micro.mod mem_radiate.mod mem_scratch.mod mem_teb.mod +leaf3.o: mem_teb_common.mod mem_turb.mod node_mod.mod rconstants.mod +leaf3.o: teb_spm_start.mod therm_lib.mod +leaf3_can.o: catt_start.mod leaf_coms.mod rconstants.mod therm_lib.mod +leaf3_hyd.o: leaf_coms.mod mem_grid.mod mem_leaf.mod rconstants.mod +leaf3_hyd.o: therm_lib.mod +leaf3_init.o: io_params.mod leaf_coms.mod mem_grid.mod mem_leaf.mod +leaf3_init.o: rconstants.mod teb_spm_start.mod therm_lib.mod +leaf3_ocean.o: io_params.mod leaf_coms.mod mem_grid.mod node_mod.mod +leaf3_ocean.o: rconstants.mod therm_lib.mod +leaf3_teb.o: mem_emiss.mod rconstants.mod teb_vars_const.mod therm_lib.mod +leaf3_tw.o: catt_start.mod leaf_coms.mod mem_grid.mod mem_leaf.mod +leaf3_tw.o: mem_radiate.mod mem_scratch.mod rconstants.mod therm_lib.mod +leaf3_utils.o: catt_start.mod consts_coms.mod grid_dims.mod io_params.mod +leaf3_utils.o: leaf_coms.mod mem_grid.mod mem_leaf.mod mem_radiate.mod +leaf3_utils.o: mem_scratch.mod node_mod.mod rconstants.mod teb_spm_start.mod +leaf3_utils.o: therm_lib.mod +leaf_coms.o: grid_dims.mod mem_leaf.mod rconstants.mod therm_lib.mod +mem_leaf.o: grid_dims.mod io_params.mod var_tables.mod +ruser.o: catt_start.mod io_params.mod leaf_coms.mod mem_grid.mod mem_leaf.mod +ruser.o: rconstants.mod therm_lib.mod +urban.o: teb_vars_const.mod therm_lib.mod +urban_canopy.o: grid_dims.mod mem_basic.mod mem_grid.mod mem_scratch.mod +urban_canopy.o: mem_tend.mod mem_turb.mod node_mod.mod +gaspart.o: an_header.mod grid_dims.mod io_params.mod mem_basic.mod mem_emiss.mod +gaspart.o: mem_gaspart.mod mem_grid.mod mem_leaf.mod mem_tend.mod rconstants.mod +gaspart.o: ref_sounding.mod teb_vars_const.mod var_tables.mod +mem_emiss.o: grid_dims.mod +mem_gaspart.o: mem_emiss.mod var_tables.mod +mem_teb.o: var_tables.mod +mem_teb_common.o: var_tables.mod +mem_teb_vars_const.o: grid_dims.mod +ozone.o: mem_basic.mod mem_gaspart.mod mem_grid.mod mem_radiate.mod mem_tend.mod +ozone.o: ozone_const.mod rconstants.mod var_tables.mod +diffsclr.o: mem_grid.mod mem_scratch.mod +diffuse.o: ke_coms.mod mem_basic.mod mem_grid.mod mem_leaf.mod mem_mass.mod +diffuse.o: mem_micro.mod mem_opt.mod mem_scratch.mod mem_tend.mod mem_turb.mod +diffuse.o: node_mod.mod therm_lib.mod var_tables.mod +mem_turb.o: grid_dims.mod rconstants.mod var_tables.mod +mem_turb_scalar.o: grid_dims.mod var_tables.mod +rgrad.o: mem_grid.mod mem_scratch.mod +tkenn.o: leaf_coms.mod mem_grid.mod mem_scratch.mod rconstants.mod therm_lib.mod +tkenn.o: turb_coms.mod +turb_derivs.o: mem_grid.mod mem_scratch.mod mem_turb.mod rconstants.mod +turb_derivs.o: therm_lib.mod +turb_diff.o: catt_start.mod mem_cuparm.mod mem_grid.mod mem_opt.mod +turb_diff.o: mem_scratch.mod mem_turb.mod var_tables.mod +turb_diff_adap.o: mem_grid.mod mem_scratch.mod +turb_k.o: catt_start.mod ke_coms.mod mem_basic.mod mem_grid.mod mem_leaf.mod +turb_k.o: mem_mass.mod mem_micro.mod mem_scratch.mod mem_tend.mod mem_turb.mod +turb_k.o: mem_turb_scalar.mod node_mod.mod therm_lib.mod var_tables.mod +turb_ke.o: ke_coms.mod mem_grid.mod mem_scratch.mod mem_turb.mod rconstants.mod +turb_ke.o: turb_coms.mod +ed_1st.o: ed_misc_coms.mod ed_para_coms.mod ed_state_vars.mod +ed_driver.o: consts_coms.mod detailed_coms.mod ed_misc_coms.mod ed_node_coms.mod +ed_driver.o: ed_state_vars.mod fuse_fiss_utils.mod grid_coms.mod +ed_driver.o: phenology_aux.mod soil_coms.mod +ed_met_driver.o: canopy_air_coms.mod canopy_radiation_coms.mod consts_coms.mod +ed_met_driver.o: ed_max_dims.mod ed_misc_coms.mod ed_node_coms.mod +ed_met_driver.o: ed_state_vars.mod grid_coms.mod hdf5_utils.mod mem_polygons.mod +ed_met_driver.o: met_driver_coms.mod pft_coms.mod therm_lib.mod +ed_model.o: consts_coms.mod ed_misc_coms.mod ed_node_coms.mod ed_state_vars.mod +ed_model.o: grid_coms.mod mem_polygons.mod rk4_coms.mod rk4_driver.mod +bdf2_solver.o: consts_coms.mod ed_misc_coms.mod ed_state_vars.mod +bdf2_solver.o: ed_therm_lib.mod grid_coms.mod rk4_coms.mod soil_coms.mod +bdf2_solver.o: therm_lib8.mod +canopy_struct_dynamics.o: allometry.mod canopy_air_coms.mod +canopy_struct_dynamics.o: canopy_layer_coms.mod consts_coms.mod ed_misc_coms.mod +canopy_struct_dynamics.o: ed_state_vars.mod grid_coms.mod met_driver_coms.mod +canopy_struct_dynamics.o: pft_coms.mod phenology_coms.mod physiology_coms.mod +canopy_struct_dynamics.o: rk4_coms.mod soil_coms.mod therm_lib.mod +disturbance.o: allometry.mod budget_utils.mod consts_coms.mod decomp_coms.mod +disturbance.o: disturb_coms.mod ed_max_dims.mod ed_misc_coms.mod +disturbance.o: ed_state_vars.mod ed_therm_lib.mod fuse_fiss_utils.mod +disturbance.o: grid_coms.mod mem_polygons.mod mortality.mod pft_coms.mod +disturbance.o: phenology_aux.mod phenology_coms.mod +euler_driver.o: budget_utils.mod canopy_air_coms.mod consts_coms.mod +euler_driver.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod grid_coms.mod +euler_driver.o: hydrology_coms.mod met_driver_coms.mod rk4_coms.mod +euler_driver.o: rk4_driver.mod rk4_stepper.mod soil_coms.mod therm_lib.mod +euler_driver.o: therm_lib8.mod +events.o: allometry.mod budget_utils.mod consts_coms.mod decomp_coms.mod +events.o: disturbance_utils.mod ed_misc_coms.mod ed_state_vars.mod +events.o: ed_therm_lib.mod fuse_fiss_utils.mod grid_coms.mod pft_coms.mod +events.o: therm_lib.mod +farq_leuning.o: c34constants.mod consts_coms.mod pft_coms.mod phenology_coms.mod +farq_leuning.o: physiology_coms.mod rk4_coms.mod therm_lib8.mod +fire.o: consts_coms.mod disturb_coms.mod ed_misc_coms.mod ed_state_vars.mod +fire.o: grid_coms.mod soil_coms.mod +forestry.o: budget_utils.mod disturb_coms.mod disturbance_utils.mod +forestry.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod +forestry.o: fuse_fiss_utils.mod grid_coms.mod +growth_balive.o: allometry.mod budget_utils.mod consts_coms.mod decomp_coms.mod +growth_balive.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod +growth_balive.o: ed_therm_lib.mod fuse_fiss_utils.mod grid_coms.mod +growth_balive.o: mortality.mod pft_coms.mod phenology_coms.mod +growth_balive.o: physiology_coms.mod +heun_driver.o: budget_utils.mod canopy_air_coms.mod consts_coms.mod +heun_driver.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod grid_coms.mod +heun_driver.o: hydrology_coms.mod met_driver_coms.mod rk4_coms.mod +heun_driver.o: rk4_driver.mod rk4_stepper.mod soil_coms.mod therm_lib.mod +heun_driver.o: therm_lib8.mod +hybrid_driver.o: budget_utils.mod consts_coms.mod ed_max_dims.mod +hybrid_driver.o: ed_misc_coms.mod ed_state_vars.mod grid_coms.mod +hybrid_driver.o: hydrology_coms.mod met_driver_coms.mod rk4_coms.mod +hybrid_driver.o: rk4_driver.mod rk4_stepper.mod soil_coms.mod therm_lib.mod +hybrid_driver.o: therm_lib8.mod +lsm_hyd.o: consts_coms.mod ed_misc_coms.mod ed_node_coms.mod ed_state_vars.mod +lsm_hyd.o: grid_coms.mod hydrology_coms.mod hydrology_constants.mod pft_coms.mod +lsm_hyd.o: soil_coms.mod therm_lib.mod +mortality.o: consts_coms.mod disturb_coms.mod ed_max_dims.mod ed_misc_coms.mod +mortality.o: ed_state_vars.mod pft_coms.mod +multiple_scatter.o: canopy_radiation_coms.mod consts_coms.mod ed_max_dims.mod +multiple_scatter.o: rk4_coms.mod +phenology_aux.o: allometry.mod consts_coms.mod ed_max_dims.mod ed_state_vars.mod +phenology_aux.o: ed_therm_lib.mod grid_coms.mod pft_coms.mod phenology_coms.mod +phenology_aux.o: soil_coms.mod +phenology_driv.o: allometry.mod consts_coms.mod decomp_coms.mod ed_max_dims.mod +phenology_driv.o: ed_misc_coms.mod ed_state_vars.mod ed_therm_lib.mod +phenology_driv.o: grid_coms.mod pft_coms.mod phenology_aux.mod +phenology_driv.o: phenology_coms.mod soil_coms.mod +photosyn_driv.o: allometry.mod consts_coms.mod ed_max_dims.mod ed_misc_coms.mod +photosyn_driv.o: ed_state_vars.mod farq_leuning.mod met_driver_coms.mod +photosyn_driv.o: pft_coms.mod phenology_coms.mod physiology_coms.mod +photosyn_driv.o: soil_coms.mod therm_lib.mod +radiate_driver.o: allometry.mod canopy_layer_coms.mod canopy_radiation_coms.mod +radiate_driver.o: consts_coms.mod ed_max_dims.mod ed_misc_coms.mod +radiate_driver.o: ed_state_vars.mod grid_coms.mod soil_coms.mod +reproduction.o: allometry.mod budget_utils.mod consts_coms.mod decomp_coms.mod +reproduction.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod +reproduction.o: ed_therm_lib.mod fuse_fiss_utils.mod grid_coms.mod +reproduction.o: mem_polygons.mod pft_coms.mod phenology_aux.mod +reproduction.o: phenology_coms.mod +rk4_derivs.o: budget_utils.mod canopy_struct_dynamics.mod consts_coms.mod +rk4_derivs.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod grid_coms.mod +rk4_derivs.o: pft_coms.mod physiology_coms.mod rk4_coms.mod soil_coms.mod +rk4_derivs.o: therm_lib8.mod +rk4_driver.o: allometry.mod budget_utils.mod canopy_air_coms.mod consts_coms.mod +rk4_driver.o: disturb_coms.mod ed_misc_coms.mod ed_state_vars.mod grid_coms.mod +rk4_driver.o: met_driver_coms.mod phenology_coms.mod rk4_coms.mod soil_coms.mod +rk4_driver.o: therm_lib.mod +rk4_integ_utils.o: canopy_air_coms.mod consts_coms.mod ed_max_dims.mod +rk4_integ_utils.o: ed_misc_coms.mod ed_state_vars.mod grid_coms.mod +rk4_integ_utils.o: hydrology_coms.mod rk4_coms.mod rk4_stepper.mod soil_coms.mod +rk4_integ_utils.o: therm_lib8.mod +rk4_misc.o: canopy_struct_dynamics.mod consts_coms.mod ed_max_dims.mod +rk4_misc.o: ed_misc_coms.mod ed_state_vars.mod ed_therm_lib.mod grid_coms.mod +rk4_misc.o: rk4_coms.mod soil_coms.mod therm_lib8.mod +rk4_stepper.o: ed_state_vars.mod grid_coms.mod rk4_coms.mod soil_coms.mod +soil_respiration.o: consts_coms.mod decomp_coms.mod ed_misc_coms.mod +soil_respiration.o: ed_state_vars.mod farq_leuning.mod pft_coms.mod +soil_respiration.o: physiology_coms.mod rk4_coms.mod soil_coms.mod therm_lib.mod +structural_growth.o: allometry.mod consts_coms.mod decomp_coms.mod +structural_growth.o: detailed_coms.mod ed_max_dims.mod ed_misc_coms.mod +structural_growth.o: ed_state_vars.mod ed_therm_lib.mod pft_coms.mod +structural_growth.o: physiology_coms.mod +twostream_rad.o: canopy_radiation_coms.mod consts_coms.mod ed_max_dims.mod +twostream_rad.o: rk4_coms.mod +vegetation_dynamics.o: consts_coms.mod disturbance_utils.mod ed_misc_coms.mod +vegetation_dynamics.o: ed_state_vars.mod fuse_fiss_utils.mod grid_coms.mod +vegetation_dynamics.o: growth_balive.mod mem_polygons.mod +ed_bigleaf_init.o: allometry.mod consts_coms.mod ed_max_dims.mod +ed_bigleaf_init.o: ed_misc_coms.mod ed_node_coms.mod ed_state_vars.mod +ed_bigleaf_init.o: fuse_fiss_utils.mod pft_coms.mod +ed_init.o: consts_coms.mod ed_max_dims.mod ed_misc_coms.mod ed_node_coms.mod +ed_init.o: ed_state_vars.mod ed_work_vars.mod grid_coms.mod mem_polygons.mod +ed_init.o: phenology_coms.mod phenology_startup.mod rk4_coms.mod soil_coms.mod +ed_init_atm.o: budget_utils.mod canopy_struct_dynamics.mod consts_coms.mod +ed_init_atm.o: ed_misc_coms.mod ed_node_coms.mod ed_state_vars.mod +ed_init_atm.o: ed_therm_lib.mod fuse_fiss_utils.mod grid_coms.mod +ed_init_atm.o: met_driver_coms.mod pft_coms.mod soil_coms.mod therm_lib.mod +ed_nbg_init.o: allometry.mod consts_coms.mod ed_max_dims.mod ed_misc_coms.mod +ed_nbg_init.o: ed_state_vars.mod fuse_fiss_utils.mod grid_coms.mod pft_coms.mod +ed_nbg_init.o: physiology_coms.mod +ed_params.o: allometry.mod canopy_air_coms.mod canopy_layer_coms.mod +ed_params.o: canopy_radiation_coms.mod consts_coms.mod decomp_coms.mod +ed_params.o: detailed_coms.mod disturb_coms.mod ed_max_dims.mod ed_misc_coms.mod +ed_params.o: ed_therm_lib.mod fusion_fission_coms.mod grid_coms.mod +ed_params.o: hydrology_coms.mod met_driver_coms.mod pft_coms.mod +ed_params.o: phenology_coms.mod physiology_coms.mod rk4_coms.mod soil_coms.mod +ed_type_init.o: allometry.mod canopy_air_coms.mod consts_coms.mod +ed_type_init.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod +ed_type_init.o: ed_therm_lib.mod grid_coms.mod pft_coms.mod phenology_coms.mod +ed_type_init.o: soil_coms.mod therm_lib.mod +init_hydro_sites.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod +init_hydro_sites.o: grid_coms.mod mem_polygons.mod soil_coms.mod +landuse_init.o: consts_coms.mod disturb_coms.mod ed_max_dims.mod +landuse_init.o: ed_misc_coms.mod ed_state_vars.mod grid_coms.mod +phenology_startup.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod +phenology_startup.o: grid_coms.mod phenology_aux.mod phenology_coms.mod +average_utils.o: consts_coms.mod ed_max_dims.mod ed_misc_coms.mod +average_utils.o: ed_state_vars.mod grid_coms.mod met_driver_coms.mod +average_utils.o: soil_coms.mod therm_lib.mod +ed_init_full_history.o: allometry.mod ed_max_dims.mod ed_misc_coms.mod +ed_init_full_history.o: ed_node_coms.mod ed_state_vars.mod +ed_init_full_history.o: fusion_fission_coms.mod grid_coms.mod +ed_init_full_history.o: hdf5_coms.mod phenology_startup.mod soil_coms.mod +ed_load_namelist.o: canopy_air_coms.mod canopy_layer_coms.mod +ed_load_namelist.o: canopy_radiation_coms.mod consts_coms.mod decomp_coms.mod +ed_load_namelist.o: detailed_coms.mod disturb_coms.mod ed_max_dims.mod +ed_load_namelist.o: ed_misc_coms.mod ed_para_coms.mod ename_coms.mod +ed_load_namelist.o: grid_coms.mod mem_polygons.mod met_driver_coms.mod +ed_load_namelist.o: optimiz_coms.mod pft_coms.mod phenology_coms.mod +ed_load_namelist.o: physiology_coms.mod rk4_coms.mod soil_coms.mod +ed_opspec.o: canopy_air_coms.mod canopy_layer_coms.mod canopy_radiation_coms.mod +ed_opspec.o: consts_coms.mod decomp_coms.mod detailed_coms.mod disturb_coms.mod +ed_opspec.o: ed_max_dims.mod ed_misc_coms.mod ed_para_coms.mod grid_coms.mod +ed_opspec.o: mem_polygons.mod met_driver_coms.mod pft_coms.mod +ed_opspec.o: phenology_coms.mod physiology_coms.mod rk4_coms.mod soil_coms.mod +ed_print.o: ed_max_dims.mod ed_misc_coms.mod ed_node_coms.mod ed_state_vars.mod +ed_print.o: ed_var_tables.mod +ed_read_ed10_20_history.o: allometry.mod consts_coms.mod ed_max_dims.mod +ed_read_ed10_20_history.o: ed_misc_coms.mod ed_state_vars.mod +ed_read_ed10_20_history.o: fuse_fiss_utils.mod grid_coms.mod mem_polygons.mod +ed_read_ed10_20_history.o: pft_coms.mod +ed_read_ed21_history.o: allometry.mod consts_coms.mod disturb_coms.mod +ed_read_ed21_history.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod +ed_read_ed21_history.o: fuse_fiss_utils.mod grid_coms.mod hdf5_coms.mod +ed_read_ed21_history.o: pft_coms.mod soil_coms.mod +ed_xml_config.o: canopy_radiation_coms.mod decomp_coms.mod disturb_coms.mod +ed_xml_config.o: ed_max_dims.mod ed_misc_coms.mod fusion_fission_coms.mod +ed_xml_config.o: grid_coms.mod hydrology_coms.mod met_driver_coms.mod +ed_xml_config.o: pft_coms.mod phenology_coms.mod physiology_coms.mod +ed_xml_config.o: rk4_coms.mod soil_coms.mod +edio.o: consts_coms.mod ed_max_dims.mod ed_misc_coms.mod ed_node_coms.mod +edio.o: ed_state_vars.mod grid_coms.mod soil_coms.mod therm_lib.mod +h5_output.o: an_header.mod ed_max_dims.mod ed_misc_coms.mod ed_node_coms.mod +h5_output.o: ed_state_vars.mod ed_var_tables.mod fusion_fission_coms.mod +h5_output.o: grid_coms.mod hdf5_coms.mod +leaf_database.o: grid_coms.mod hdf5_utils.mod soil_coms.mod +canopy_air_coms.o: consts_coms.mod therm_lib.mod therm_lib8.mod +canopy_radiation_coms.o: ed_max_dims.mod +consts_coms.o: rconstants.mod +decomp_coms.o: ed_max_dims.mod +disturb_coms.o: ed_max_dims.mod +ed_max_dims.o: grid_dims.mod +ed_mem_alloc.o: ed_max_dims.mod ed_mem_grid_dim_defs.mod ed_node_coms.mod +ed_mem_alloc.o: ed_state_vars.mod ed_work_vars.mod grid_coms.mod +ed_mem_alloc.o: mem_polygons.mod +ed_misc_coms.o: ed_max_dims.mod +ed_state_vars.o: disturb_coms.mod ed_max_dims.mod ed_misc_coms.mod +ed_state_vars.o: ed_node_coms.mod ed_var_tables.mod fusion_fission_coms.mod +ed_state_vars.o: grid_coms.mod met_driver_coms.mod phenology_coms.mod +ed_state_vars.o: soil_coms.mod +ed_var_tables.o: ed_max_dims.mod +ed_work_vars.o: ed_max_dims.mod +ename_coms.o: ed_max_dims.mod +fusion_fission_coms.o: ed_max_dims.mod +grid_coms.o: ed_max_dims.mod +hdf5_coms.o: +mem_polygons.o: ed_max_dims.mod +met_driver_coms.o: ed_max_dims.mod +optimiz_coms.o: ed_max_dims.mod +pft_coms.o: ed_max_dims.mod +phenology_coms.o: ed_max_dims.mod +physiology_coms.o: ed_max_dims.mod +rk4_coms.o: consts_coms.mod ed_max_dims.mod ed_misc_coms.mod grid_coms.mod +rk4_coms.o: soil_coms.mod therm_lib8.mod +soil_coms.o: ed_max_dims.mod grid_coms.mod leaf_coms.mod +ed_mpass_init.o: canopy_air_coms.mod canopy_layer_coms.mod +ed_mpass_init.o: canopy_radiation_coms.mod decomp_coms.mod detailed_coms.mod +ed_mpass_init.o: disturb_coms.mod ed_max_dims.mod ed_misc_coms.mod +ed_mpass_init.o: ed_node_coms.mod ed_para_coms.mod ed_state_vars.mod +ed_mpass_init.o: ed_work_vars.mod grid_coms.mod mem_polygons.mod +ed_mpass_init.o: met_driver_coms.mod optimiz_coms.mod pft_coms.mod +ed_mpass_init.o: phenology_coms.mod physiology_coms.mod rk4_coms.mod +ed_mpass_init.o: soil_coms.mod +ed_node_coms.o: ed_max_dims.mod +ed_para_coms.o: ed_max_dims.mod +ed_para_init.o: ed_max_dims.mod ed_misc_coms.mod ed_node_coms.mod +ed_para_init.o: ed_para_coms.mod ed_work_vars.mod grid_coms.mod +ed_para_init.o: hdf5_coms.mod mem_polygons.mod soil_coms.mod +allometry.o: consts_coms.mod ed_misc_coms.mod grid_coms.mod pft_coms.mod +allometry.o: rk4_coms.mod soil_coms.mod +budget_utils.o: consts_coms.mod ed_max_dims.mod ed_misc_coms.mod +budget_utils.o: ed_state_vars.mod grid_coms.mod rk4_coms.mod soil_coms.mod +budget_utils.o: therm_lib.mod +dateutils.o: consts_coms.mod +ed_filelist.o: ed_max_dims.mod +ed_grid.o: consts_coms.mod ed_max_dims.mod ed_node_coms.mod grid_coms.mod +ed_therm_lib.o: canopy_air_coms.mod consts_coms.mod ed_max_dims.mod +ed_therm_lib.o: ed_misc_coms.mod ed_state_vars.mod grid_coms.mod pft_coms.mod +ed_therm_lib.o: rk4_coms.mod soil_coms.mod therm_lib.mod therm_lib8.mod +fatal_error.o: ed_node_coms.mod +fuse_fiss_utils.o: allometry.mod budget_utils.mod canopy_layer_coms.mod +fuse_fiss_utils.o: consts_coms.mod decomp_coms.mod disturb_coms.mod +fuse_fiss_utils.o: ed_max_dims.mod ed_misc_coms.mod ed_node_coms.mod +fuse_fiss_utils.o: ed_state_vars.mod fusion_fission_coms.mod grid_coms.mod +fuse_fiss_utils.o: mem_polygons.mod pft_coms.mod soil_coms.mod therm_lib.mod +great_circle.o: consts_coms.mod +hdf5_utils.o: hdf5_coms.mod +invmondays.o: ed_misc_coms.mod +lapse.o: consts_coms.mod ed_misc_coms.mod ed_state_vars.mod met_driver_coms.mod +numutils.o: consts_coms.mod therm_lib.mod +radiate_utils.o: canopy_radiation_coms.mod consts_coms.mod ed_max_dims.mod +radiate_utils.o: ed_misc_coms.mod ed_state_vars.mod met_driver_coms.mod +stable_cohorts.o: ed_max_dims.mod ed_state_vars.mod pft_coms.mod +stable_cohorts.o: phenology_coms.mod +therm_lib.o: consts_coms.mod +therm_lib8.o: consts_coms.mod therm_lib.mod +update_derived_props.o: allometry.mod canopy_air_coms.mod consts_coms.mod +update_derived_props.o: decomp_coms.mod ed_max_dims.mod ed_misc_coms.mod +update_derived_props.o: ed_state_vars.mod ed_therm_lib.mod fuse_fiss_utils.mod +update_derived_props.o: grid_coms.mod pft_coms.mod soil_coms.mod therm_lib.mod +advect_kit.mod: mod_advect_kit.o +allometry.mod: allometry.o +an_header.mod: an_header.o +budget_utils.mod: budget_utils.o +c34constants.mod: c34constants.o +canopy_air_coms.mod: canopy_air_coms.o +canopy_layer_coms.mod: canopy_layer_coms.o +canopy_radiation_coms.mod: canopy_radiation_coms.o +canopy_struct_dynamics.mod: canopy_struct_dynamics.o +catt_start.mod: catt_start.o +consts_coms.mod: consts_coms.o +conv_coms.mod: conv_coms.o +cyclic_mod.mod: cyclic_mod.o +decomp_coms.mod: decomp_coms.o +detailed_coms.mod: detailed_coms.o +disturb_coms.mod: disturb_coms.o +disturbance_utils.mod: disturbance.o +domain_decomp.mod: domain_decomp.o +dtset.mod: local_proc.o +ed_max_dims.mod: ed_max_dims.o +ed_mem_grid_dim_defs.mod: ed_mem_grid_dim_defs.o +ed_misc_coms.mod: ed_misc_coms.o +ed_node_coms.mod: ed_node_coms.o +ed_para_coms.mod: ed_para_coms.o +ed_state_vars.mod: ed_state_vars.o +ed_therm_lib.mod: ed_therm_lib.o +ed_var_tables.mod: ed_var_tables.o +ed_work_vars.mod: ed_work_vars.o +emission_source_map.mod: emission_source_map.o +ename_coms.mod: ename_coms.o +extras.mod: extra.o +farq_leuning.mod: farq_leuning.o +fuse_fiss_utils.mod: fuse_fiss_utils.o +fusion_fission_coms.mod: fusion_fission_coms.o +grell_coms.mod: grell_coms.o +grid_coms.mod: grid_coms.o +grid_dims.mod: grid_dims.o +grid_struct.mod: grid_struct.o +growth_balive.mod: growth_balive.o +harr_coms.mod: harr_coms.o +hdf5_coms.mod: hdf5_coms.o +hdf5_utils.mod: hdf5_utils.o +hydrology_coms.mod: hydrology_coms.o +hydrology_constants.mod: hydrology_constants.o +io_params.mod: io_params.o +isan_coms.mod: isan_coms.o +ke_coms.mod: ke_coms.o +lake_coms.mod: lake_coms.o +leaf_coms.mod: leaf_coms.o +libxml2f90_interface_module.mod: libxml2f90.f90_pp.o +libxml2f90_module.mod: libxml2f90.f90_pp.o +libxml2f90_strings_module.mod: libxml2f90.f90_pp.o +ll_module.mod: libxml2f90.f90_pp.o +machine_arq.mod: machine_arq.o +mem_aerad.mod: mem_aerad.o +mem_all.mod: mem_all.o +mem_basic.mod: mem_basic.o +mem_carma.mod: mem_carma.o +mem_cuparm.mod: mem_cuparm.o +mem_edcp.mod: mem_edcp.o +mem_emiss.mod: mem_emiss.o +mem_ensemble.mod: mem_ensemble.o +mem_gaspart.mod: mem_gaspart.o +mem_globaer.mod: mem_globaer.o +mem_globrad.mod: mem_globrad.o +mem_grell_param.mod: mem_grell_param2.o +mem_grid.mod: mem_grid.o +mem_grid_dim_defs.mod: mem_grid_dim_defs.o +mem_harr.mod: mem_harr.o +mem_leaf.mod: mem_leaf.o +mem_mass.mod: mem_mass.o +mem_mclat.mod: mem_mclat.o +mem_micro.mod: mem_micro.o +mem_mksfc.mod: mem_mksfc.o +mem_mnt_advec.mod: mem_mnt_advec.o +mem_nestb.mod: mem_nestb.o +mem_oda.mod: mem_oda.o +mem_opt.mod: mem_opt_scratch.o +mem_polygons.mod: mem_polygons.o +mem_radiate.mod: mem_radiate.o +mem_scalar.mod: mem_scalar.o +mem_scratch.mod: mem_scratch.o +mem_scratch1.mod: mem_scratch1_brams.o +mem_scratch1_grell.mod: mem_scratch1_grell.o +mem_scratch2_grell.mod: mem_scratch2_grell.o +mem_scratch2_grell_sh.mod: mem_scratch2_grell_sh.o +mem_scratch3_grell.mod: mem_scratch3_grell.o +mem_scratch3_grell_sh.mod: mem_scratch3_grell_sh.o +mem_scratch_grell.mod: mem_scratch_grell.o +mem_soil_moisture.mod: mem_soil_moisture.o +mem_tconv.mod: mem_tconv.o +mem_teb.mod: mem_teb.o +mem_teb_common.mod: mem_teb_common.o +mem_tend.mod: mem_tend.o +mem_turb.mod: mem_turb.o +mem_turb_scalar.mod: mem_turb_scalar.o +mem_varinit.mod: mem_varinit.o +met_driver_coms.mod: met_driver_coms.o +micphys.mod: micphys.o +micro_coms.mod: micro_coms.o +mod_ghostblock.mod: mod_GhostBlock.o +mod_ghostblockpartition.mod: mod_GhostBlockPartition.o +mortality.mod: mortality.o +node_mod.mod: node_mod.o +obs_input.mod: obs_input.o +optimiz_coms.mod: optimiz_coms.o +ozone_const.mod: mod_ozone.o +pft_coms.mod: pft_coms.o +phenology_aux.mod: phenology_aux.o +phenology_coms.mod: phenology_coms.o +phenology_startup.mod: phenology_startup.o +physiology_coms.mod: physiology_coms.o +plume_utils.mod: plumerise_vector.o +rad_carma.mod: rad_carma.o +rconstants.mod: rconstants.o +ref_sounding.mod: ref_sounding.o +rk4_coms.mod: rk4_coms.o +rk4_driver.mod: rk4_driver.o +rk4_stepper.mod: rk4_stepper.o +rpara.mod: rpara.o +shcu_vars_const.mod: shcu_vars_const.o +soil_coms.mod: soil_coms.o +teb_spm_start.mod: teb_spm_start.o +teb_vars_const.mod: mem_teb_vars_const.o +therm_lib.mod: therm_lib.o +therm_lib8.mod: therm_lib8.o +turb_coms.mod: turb_coms.o +var_tables.mod: var_tables.o diff --git a/BRAMS/i10dbg/bin/dependency.mk b/BRAMS/i10dbg/bin/dependency.mk index 91cf609a3..47d1c6a3d 100644 --- a/BRAMS/i10dbg/bin/dependency.mk +++ b/BRAMS/i10dbg/bin/dependency.mk @@ -449,38 +449,42 @@ canopy_struct_dynamics.o: canopy_layer_coms.mod consts_coms.mod ed_misc_coms.mod canopy_struct_dynamics.o: ed_state_vars.mod grid_coms.mod met_driver_coms.mod canopy_struct_dynamics.o: pft_coms.mod phenology_coms.mod physiology_coms.mod canopy_struct_dynamics.o: rk4_coms.mod soil_coms.mod therm_lib.mod -disturbance.o: allometry.mod consts_coms.mod decomp_coms.mod disturb_coms.mod -disturbance.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod -disturbance.o: ed_therm_lib.mod fuse_fiss_utils.mod grid_coms.mod -disturbance.o: mem_polygons.mod mortality.mod pft_coms.mod phenology_aux.mod -disturbance.o: phenology_coms.mod -euler_driver.o: canopy_air_coms.mod consts_coms.mod ed_max_dims.mod -euler_driver.o: ed_misc_coms.mod ed_state_vars.mod grid_coms.mod +disturbance.o: allometry.mod budget_utils.mod consts_coms.mod decomp_coms.mod +disturbance.o: disturb_coms.mod ed_max_dims.mod ed_misc_coms.mod +disturbance.o: ed_state_vars.mod ed_therm_lib.mod fuse_fiss_utils.mod +disturbance.o: grid_coms.mod mem_polygons.mod mortality.mod pft_coms.mod +disturbance.o: phenology_aux.mod phenology_coms.mod +euler_driver.o: budget_utils.mod canopy_air_coms.mod consts_coms.mod +euler_driver.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod grid_coms.mod euler_driver.o: hydrology_coms.mod met_driver_coms.mod rk4_coms.mod euler_driver.o: rk4_driver.mod rk4_stepper.mod soil_coms.mod therm_lib.mod euler_driver.o: therm_lib8.mod -events.o: allometry.mod consts_coms.mod decomp_coms.mod disturbance_utils.mod -events.o: ed_misc_coms.mod ed_state_vars.mod ed_therm_lib.mod -events.o: fuse_fiss_utils.mod grid_coms.mod pft_coms.mod therm_lib.mod +events.o: allometry.mod budget_utils.mod consts_coms.mod decomp_coms.mod +events.o: disturbance_utils.mod ed_misc_coms.mod ed_state_vars.mod +events.o: ed_therm_lib.mod fuse_fiss_utils.mod grid_coms.mod pft_coms.mod +events.o: therm_lib.mod farq_leuning.o: c34constants.mod consts_coms.mod pft_coms.mod phenology_coms.mod farq_leuning.o: physiology_coms.mod rk4_coms.mod therm_lib8.mod fire.o: consts_coms.mod disturb_coms.mod ed_misc_coms.mod ed_state_vars.mod fire.o: grid_coms.mod soil_coms.mod -forestry.o: disturb_coms.mod disturbance_utils.mod ed_max_dims.mod -forestry.o: ed_misc_coms.mod ed_state_vars.mod fuse_fiss_utils.mod grid_coms.mod -growth_balive.o: allometry.mod consts_coms.mod decomp_coms.mod ed_max_dims.mod -growth_balive.o: ed_misc_coms.mod ed_state_vars.mod ed_therm_lib.mod -growth_balive.o: fuse_fiss_utils.mod grid_coms.mod mortality.mod pft_coms.mod -growth_balive.o: phenology_coms.mod physiology_coms.mod -heun_driver.o: canopy_air_coms.mod consts_coms.mod ed_max_dims.mod -heun_driver.o: ed_misc_coms.mod ed_state_vars.mod grid_coms.mod +forestry.o: budget_utils.mod disturb_coms.mod disturbance_utils.mod +forestry.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod +forestry.o: fuse_fiss_utils.mod grid_coms.mod +growth_balive.o: allometry.mod budget_utils.mod consts_coms.mod decomp_coms.mod +growth_balive.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod +growth_balive.o: ed_therm_lib.mod fuse_fiss_utils.mod grid_coms.mod +growth_balive.o: mortality.mod pft_coms.mod phenology_coms.mod +growth_balive.o: physiology_coms.mod +heun_driver.o: budget_utils.mod canopy_air_coms.mod consts_coms.mod +heun_driver.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod grid_coms.mod heun_driver.o: hydrology_coms.mod met_driver_coms.mod rk4_coms.mod heun_driver.o: rk4_driver.mod rk4_stepper.mod soil_coms.mod therm_lib.mod heun_driver.o: therm_lib8.mod -hybrid_driver.o: consts_coms.mod ed_max_dims.mod ed_misc_coms.mod -hybrid_driver.o: ed_state_vars.mod grid_coms.mod hydrology_coms.mod -hybrid_driver.o: met_driver_coms.mod rk4_coms.mod rk4_driver.mod rk4_stepper.mod -hybrid_driver.o: soil_coms.mod therm_lib8.mod +hybrid_driver.o: budget_utils.mod consts_coms.mod ed_max_dims.mod +hybrid_driver.o: ed_misc_coms.mod ed_state_vars.mod grid_coms.mod +hybrid_driver.o: hydrology_coms.mod met_driver_coms.mod rk4_coms.mod +hybrid_driver.o: rk4_driver.mod rk4_stepper.mod soil_coms.mod therm_lib.mod +hybrid_driver.o: therm_lib8.mod lsm_hyd.o: consts_coms.mod ed_misc_coms.mod ed_node_coms.mod ed_state_vars.mod lsm_hyd.o: grid_coms.mod hydrology_coms.mod hydrology_constants.mod pft_coms.mod lsm_hyd.o: soil_coms.mod therm_lib.mod @@ -502,15 +506,17 @@ photosyn_driv.o: soil_coms.mod therm_lib.mod radiate_driver.o: allometry.mod canopy_layer_coms.mod canopy_radiation_coms.mod radiate_driver.o: consts_coms.mod ed_max_dims.mod ed_misc_coms.mod radiate_driver.o: ed_state_vars.mod grid_coms.mod soil_coms.mod -reproduction.o: allometry.mod consts_coms.mod decomp_coms.mod ed_max_dims.mod -reproduction.o: ed_misc_coms.mod ed_state_vars.mod ed_therm_lib.mod -reproduction.o: fuse_fiss_utils.mod grid_coms.mod mem_polygons.mod pft_coms.mod -reproduction.o: phenology_aux.mod phenology_coms.mod -rk4_derivs.o: canopy_struct_dynamics.mod consts_coms.mod ed_max_dims.mod -rk4_derivs.o: ed_misc_coms.mod ed_state_vars.mod grid_coms.mod pft_coms.mod -rk4_derivs.o: physiology_coms.mod rk4_coms.mod soil_coms.mod therm_lib8.mod -rk4_driver.o: allometry.mod canopy_air_coms.mod consts_coms.mod disturb_coms.mod -rk4_driver.o: ed_misc_coms.mod ed_state_vars.mod grid_coms.mod +reproduction.o: allometry.mod budget_utils.mod consts_coms.mod decomp_coms.mod +reproduction.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod +reproduction.o: ed_therm_lib.mod fuse_fiss_utils.mod grid_coms.mod +reproduction.o: mem_polygons.mod pft_coms.mod phenology_aux.mod +reproduction.o: phenology_coms.mod +rk4_derivs.o: budget_utils.mod canopy_struct_dynamics.mod consts_coms.mod +rk4_derivs.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod grid_coms.mod +rk4_derivs.o: pft_coms.mod physiology_coms.mod rk4_coms.mod soil_coms.mod +rk4_derivs.o: therm_lib8.mod +rk4_driver.o: allometry.mod budget_utils.mod canopy_air_coms.mod consts_coms.mod +rk4_driver.o: disturb_coms.mod ed_misc_coms.mod ed_state_vars.mod grid_coms.mod rk4_driver.o: met_driver_coms.mod phenology_coms.mod rk4_coms.mod soil_coms.mod rk4_driver.o: therm_lib.mod rk4_integ_utils.o: canopy_air_coms.mod consts_coms.mod ed_max_dims.mod @@ -521,9 +527,9 @@ rk4_misc.o: canopy_struct_dynamics.mod consts_coms.mod ed_max_dims.mod rk4_misc.o: ed_misc_coms.mod ed_state_vars.mod ed_therm_lib.mod grid_coms.mod rk4_misc.o: rk4_coms.mod soil_coms.mod therm_lib8.mod rk4_stepper.o: ed_state_vars.mod grid_coms.mod rk4_coms.mod soil_coms.mod -soil_respiration.o: consts_coms.mod decomp_coms.mod ed_state_vars.mod -soil_respiration.o: farq_leuning.mod pft_coms.mod physiology_coms.mod -soil_respiration.o: rk4_coms.mod soil_coms.mod +soil_respiration.o: consts_coms.mod decomp_coms.mod ed_misc_coms.mod +soil_respiration.o: ed_state_vars.mod farq_leuning.mod pft_coms.mod +soil_respiration.o: physiology_coms.mod rk4_coms.mod soil_coms.mod therm_lib.mod structural_growth.o: allometry.mod consts_coms.mod decomp_coms.mod structural_growth.o: detailed_coms.mod ed_max_dims.mod ed_misc_coms.mod structural_growth.o: ed_state_vars.mod ed_therm_lib.mod pft_coms.mod @@ -539,10 +545,10 @@ ed_bigleaf_init.o: fuse_fiss_utils.mod pft_coms.mod ed_init.o: consts_coms.mod ed_max_dims.mod ed_misc_coms.mod ed_node_coms.mod ed_init.o: ed_state_vars.mod ed_work_vars.mod grid_coms.mod mem_polygons.mod ed_init.o: phenology_coms.mod phenology_startup.mod rk4_coms.mod soil_coms.mod -ed_init_atm.o: canopy_struct_dynamics.mod consts_coms.mod ed_misc_coms.mod -ed_init_atm.o: ed_node_coms.mod ed_state_vars.mod ed_therm_lib.mod -ed_init_atm.o: fuse_fiss_utils.mod grid_coms.mod met_driver_coms.mod -ed_init_atm.o: pft_coms.mod soil_coms.mod therm_lib.mod +ed_init_atm.o: budget_utils.mod canopy_struct_dynamics.mod consts_coms.mod +ed_init_atm.o: ed_misc_coms.mod ed_node_coms.mod ed_state_vars.mod +ed_init_atm.o: ed_therm_lib.mod fuse_fiss_utils.mod grid_coms.mod +ed_init_atm.o: met_driver_coms.mod pft_coms.mod soil_coms.mod therm_lib.mod ed_nbg_init.o: allometry.mod consts_coms.mod ed_max_dims.mod ed_misc_coms.mod ed_nbg_init.o: ed_state_vars.mod fuse_fiss_utils.mod grid_coms.mod pft_coms.mod ed_nbg_init.o: physiology_coms.mod @@ -562,9 +568,9 @@ landuse_init.o: consts_coms.mod disturb_coms.mod ed_max_dims.mod landuse_init.o: ed_misc_coms.mod ed_state_vars.mod grid_coms.mod phenology_startup.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod phenology_startup.o: grid_coms.mod phenology_aux.mod phenology_coms.mod -average_utils.o: allometry.mod canopy_radiation_coms.mod consts_coms.mod -average_utils.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod -average_utils.o: grid_coms.mod pft_coms.mod therm_lib.mod +average_utils.o: consts_coms.mod ed_max_dims.mod ed_misc_coms.mod +average_utils.o: ed_state_vars.mod grid_coms.mod met_driver_coms.mod +average_utils.o: soil_coms.mod therm_lib.mod ed_init_full_history.o: allometry.mod ed_max_dims.mod ed_misc_coms.mod ed_init_full_history.o: ed_node_coms.mod ed_state_vars.mod ed_init_full_history.o: fusion_fission_coms.mod grid_coms.mod @@ -597,7 +603,7 @@ ed_xml_config.o: grid_coms.mod hydrology_coms.mod met_driver_coms.mod ed_xml_config.o: pft_coms.mod phenology_coms.mod physiology_coms.mod ed_xml_config.o: rk4_coms.mod soil_coms.mod edio.o: consts_coms.mod ed_max_dims.mod ed_misc_coms.mod ed_node_coms.mod -edio.o: ed_state_vars.mod grid_coms.mod pft_coms.mod soil_coms.mod therm_lib.mod +edio.o: ed_state_vars.mod grid_coms.mod soil_coms.mod therm_lib.mod h5_output.o: an_header.mod ed_max_dims.mod ed_misc_coms.mod ed_node_coms.mod h5_output.o: ed_state_vars.mod ed_var_tables.mod fusion_fission_coms.mod h5_output.o: grid_coms.mod hdf5_coms.mod @@ -656,11 +662,11 @@ ed_therm_lib.o: canopy_air_coms.mod consts_coms.mod ed_max_dims.mod ed_therm_lib.o: ed_misc_coms.mod ed_state_vars.mod grid_coms.mod pft_coms.mod ed_therm_lib.o: rk4_coms.mod soil_coms.mod therm_lib.mod therm_lib8.mod fatal_error.o: ed_node_coms.mod -fuse_fiss_utils.o: allometry.mod canopy_layer_coms.mod decomp_coms.mod -fuse_fiss_utils.o: disturb_coms.mod ed_max_dims.mod ed_misc_coms.mod -fuse_fiss_utils.o: ed_node_coms.mod ed_state_vars.mod fusion_fission_coms.mod -fuse_fiss_utils.o: grid_coms.mod mem_polygons.mod pft_coms.mod soil_coms.mod -fuse_fiss_utils.o: therm_lib.mod +fuse_fiss_utils.o: allometry.mod budget_utils.mod canopy_layer_coms.mod +fuse_fiss_utils.o: consts_coms.mod decomp_coms.mod disturb_coms.mod +fuse_fiss_utils.o: ed_max_dims.mod ed_misc_coms.mod ed_node_coms.mod +fuse_fiss_utils.o: ed_state_vars.mod fusion_fission_coms.mod grid_coms.mod +fuse_fiss_utils.o: mem_polygons.mod pft_coms.mod soil_coms.mod therm_lib.mod great_circle.o: consts_coms.mod hdf5_utils.o: hdf5_coms.mod invmondays.o: ed_misc_coms.mod @@ -673,12 +679,13 @@ stable_cohorts.o: phenology_coms.mod therm_lib.o: consts_coms.mod therm_lib8.o: consts_coms.mod therm_lib.mod update_derived_props.o: allometry.mod canopy_air_coms.mod consts_coms.mod -update_derived_props.o: ed_misc_coms.mod ed_state_vars.mod ed_therm_lib.mod -update_derived_props.o: fuse_fiss_utils.mod grid_coms.mod soil_coms.mod -update_derived_props.o: therm_lib.mod +update_derived_props.o: decomp_coms.mod ed_max_dims.mod ed_misc_coms.mod +update_derived_props.o: ed_state_vars.mod ed_therm_lib.mod fuse_fiss_utils.mod +update_derived_props.o: grid_coms.mod pft_coms.mod soil_coms.mod therm_lib.mod advect_kit.mod: mod_advect_kit.o allometry.mod: allometry.o an_header.mod: an_header.o +budget_utils.mod: budget_utils.o c34constants.mod: c34constants.o canopy_air_coms.mod: canopy_air_coms.o canopy_layer_coms.mod: canopy_layer_coms.o diff --git a/BRAMS/run/RAMSIN b/BRAMS/run/RAMSIN index dbc2c095f..500c5a825 100644 --- a/BRAMS/run/RAMSIN +++ b/BRAMS/run/RAMSIN @@ -1901,6 +1901,38 @@ $ED2_INFO + !---------------------------------------------------------------------------------------! + ! The following variables control whether site-, patch-, and cohort-level time ! + ! means and mean sum of squares should be included in the output files or not. ! + ! ! + ! Reasons to add them: ! + ! a. Sub-polygon variables are more comprehensive. ! + ! b. Explore heterogeneity within a polygon and make interesting analysis. ! + ! c. More chances to create cool 3-D plots. ! + ! ! + ! Reasons to NOT add them: ! + ! a. Output files will become much larger! ! + ! b. In regional/coupled runs, the output files will be ridiculously large. ! + ! c. You may fill up the disk. ! + ! d. Other people's job may crash due to insufficient disk space. ! + ! e. You will gain a bad reputation amongst your colleagues. ! + ! f. And it will be entirely your fault. ! + ! ! + ! Either way, polygon-level averages are always included, and so are the instan- ! + ! taneous site-, patch-, and cohort-level variables needed for resuming the run. ! + ! ! + ! IADD_SITE_MEANS -- Add site-level averages to the output (0 = no; 1 = yes) ! + ! IADD_PATCH_MEANS -- Add patch-level averages to the output (0 = no; 1 = yes) ! + ! IADD_COHORT_MEANS -- Add cohort-level averages to the output (0 = no; 1 = yes) ! + ! ! + !---------------------------------------------------------------------------------------! + IADD_SITE_MEANS = 0, + IADD_PATCH_MEANS = 0, + IADD_COHORT_MEANS = 0, + !---------------------------------------------------------------------------------------! + + + !---------------------------------------------------------------------------------------! ! ATTACH_METADATA -- Flag for attaching metadata to HDF datasets. Attaching metadata ! diff --git a/BRAMS/src/ed2/edcp_load_namelist.f90 b/BRAMS/src/ed2/edcp_load_namelist.f90 index a9abd96a5..7d02a0e65 100644 --- a/BRAMS/src/ed2/edcp_load_namelist.f90 +++ b/BRAMS/src/ed2/edcp_load_namelist.f90 @@ -106,6 +106,9 @@ subroutine read_ednl(iunit,filename) , iyoutput & ! intent(out) , itoutput & ! intent(out) , isoutput & ! intent(out) + , iadd_site_means & ! intent(out) + , iadd_patch_means & ! intent(out) + , iadd_cohort_meansß & ! intent(out) , frqfast & ! intent(out) , frqstate & ! intent(out) , outfast & ! intent(out) @@ -243,7 +246,8 @@ subroutine read_ednl(iunit,filename) logical :: op !----- Namelist. -----------------------------------------------------------------------! namelist /ED2_INFO/ dtlsm,co2_offset,ifoutput,idoutput,imoutput,iqoutput,iyoutput & - ,itoutput,isoutput,attach_metadata,outfast,outstate,ffilout,sfilout & + ,itoutput,isoutput,iadd_site_means,iadd_patch_means & + ,iadd_cohort_means,attach_metadata,outfast,outstate,ffilout,sfilout & ,ied_init_mode,edres,sfilin,veg_database,soil_database,lu_database & ,plantation_file,lu_rescale_file,thsums_database,soilstate_db & ,soildepth_db,isoilstateinit,isoildepthflg,ivegt_dynamics,ibigleaf & @@ -296,6 +300,9 @@ subroutine read_ednl(iunit,filename) write (unit=*,fmt=*) ' iyoutput =',iyoutput write (unit=*,fmt=*) ' itoutput =',itoutput write (unit=*,fmt=*) ' isoutput =',isoutput + write (unit=*,fmt=*) ' iadd_site_means =',iadd_site_means + write (unit=*,fmt=*) ' iadd_patch_means =',iadd_patch_means + write (unit=*,fmt=*) ' iadd_cohort_means =',iadd_cohort_means write (unit=*,fmt=*) ' attach_metadata =',attach_metadata write (unit=*,fmt=*) ' outfast =',outfast write (unit=*,fmt=*) ' outstate =',outstate diff --git a/BRAMS/src/ed2/edcp_met.f90 b/BRAMS/src/ed2/edcp_met.f90 index be6001b21..9fee38d84 100644 --- a/BRAMS/src/ed2/edcp_met.f90 +++ b/BRAMS/src/ed2/edcp_met.f90 @@ -908,10 +908,7 @@ subroutine copy_fluxes_lsm2atm(ifm) !---------------------------------------------------------------------------------! ! Include emission and reflected longwave in rlongup. ! !---------------------------------------------------------------------------------! - fluxp%rlongup(ix,iy,ilp) = sum( csite%area * ( csite%rlongup & - + cpoly%met(isi)%rlong & - * csite%rlong_albedo ) ) & - * site_area_i + fluxp%rlongup(ix,iy,ilp) = sum( csite%area * csite%rlongup ) * site_area_i !---------------------------------------------------------------------------------! @@ -1797,7 +1794,7 @@ subroutine copy_avgvars_to_leaf(ifm) !----- Heterotrophic respiration. Make units umol/m2/s. ----------------------! leaf_g(ifm)%resphet(ix,iy,ilp) = leaf_g(ifm)%resphet(ix,iy,ilp) & - + csite%fmean_rh (ico) & + + csite%fmean_rh (ipa) & * patch_wgt / umols_2_kgCyr !------------------------------------------------------------------------------! diff --git a/BRAMS/src/ed2/edcp_mpiutils.f90 b/BRAMS/src/ed2/edcp_mpiutils.f90 index 02f694b31..e02d63543 100644 --- a/BRAMS/src/ed2/edcp_mpiutils.f90 +++ b/BRAMS/src/ed2/edcp_mpiutils.f90 @@ -57,6 +57,9 @@ subroutine masterput_ednl(mainnum) , outstate & ! intent(in) , unitfast & ! intent(in) , unitstate & ! intent(in) + , iadd_site_means & ! intent(in) + , iadd_patch_means & ! intent(in) + , iadd_cohort_means & ! intent(in) , attach_metadata & ! intent(in) , itimeh & ! intent(in) , iyearh & ! intent(in) @@ -229,6 +232,9 @@ subroutine masterput_ednl(mainnum) call MPI_Bcast(itoutput,1,MPI_INTEGER,mainnum,MPI_COMM_WORLD,ierr) call MPI_Bcast(isoutput,1,MPI_INTEGER,mainnum,MPI_COMM_WORLD,ierr) call MPI_Bcast(ndcycle,1,MPI_INTEGER,mainnum,MPI_COMM_WORLD,ierr) + call MPI_Bcast(iadd_site_means ,1,MPI_INTEGER,mainnum,MPI_COMM_WORLD,ierr) + call MPI_Bcast(iadd_patch_means ,1,MPI_INTEGER,mainnum,MPI_COMM_WORLD,ierr) + call MPI_Bcast(iadd_cohort_means,1,MPI_INTEGER,mainnum,MPI_COMM_WORLD,ierr) call MPI_Bcast(attach_metadata,1,MPI_INTEGER,mainnum,MPI_COMM_WORLD,ierr) call MPI_Bcast(outfast,1,MPI_REAL,mainnum,MPI_COMM_WORLD,ierr) call MPI_Bcast(outstate,1,MPI_REAL,mainnum,MPI_COMM_WORLD,ierr) @@ -500,6 +506,9 @@ subroutine nodeget_ednl(master_num) , outstate & ! intent(out) , unitfast & ! intent(out) , unitstate & ! intent(out) + , iadd_site_means & ! intent(out) + , iadd_patch_means & ! intent(out) + , iadd_cohort_means & ! intent(out) , attach_metadata & ! intent(out) , itimeh & ! intent(out) , iyearh & ! intent(out) @@ -674,6 +683,9 @@ subroutine nodeget_ednl(master_num) call MPI_Bcast(itoutput,1,MPI_INTEGER,master_num,MPI_COMM_WORLD,ierr) call MPI_Bcast(isoutput,1,MPI_INTEGER,master_num,MPI_COMM_WORLD,ierr) call MPI_Bcast(ndcycle,1,MPI_INTEGER,master_num,MPI_COMM_WORLD,ierr) + call MPI_Bcast(iadd_site_means ,1,MPI_INTEGER,master_num,MPI_COMM_WORLD,ierr) + call MPI_Bcast(iadd_patch_means ,1,MPI_INTEGER,master_num,MPI_COMM_WORLD,ierr) + call MPI_Bcast(iadd_cohort_means,1,MPI_INTEGER,master_num,MPI_COMM_WORLD,ierr) call MPI_Bcast(attach_metadata,1,MPI_INTEGER,master_num,MPI_COMM_WORLD,ierr) call MPI_Bcast(outfast,1,MPI_REAL,master_num,MPI_COMM_WORLD,ierr) call MPI_Bcast(outstate,1,MPI_REAL,master_num,MPI_COMM_WORLD,ierr) diff --git a/ED/Template/Template/ED2IN b/ED/Template/Template/ED2IN index b69a63399..228d2bbde 100644 --- a/ED/Template/Template/ED2IN +++ b/ED/Template/Template/ED2IN @@ -208,6 +208,38 @@ $ED_NL + !---------------------------------------------------------------------------------------! + ! The following variables control whether site-, patch-, and cohort-level time ! + ! means and mean sum of squares should be included in the output files or not. ! + ! ! + ! Reasons to add them: ! + ! a. Sub-polygon variables are more comprehensive. ! + ! b. Explore heterogeneity within a polygon and make interesting analysis. ! + ! c. More chances to create cool 3-D plots. ! + ! ! + ! Reasons to NOT add them: ! + ! a. Output files will become much larger! ! + ! b. In regional/coupled runs, the output files will be ridiculously large. ! + ! c. You may fill up the disk. ! + ! d. Other people's job may crash due to insufficient disk space. ! + ! e. You will gain a bad reputation amongst your colleagues. ! + ! f. And it will be entirely your fault. ! + ! ! + ! Either way, polygon-level averages are always included, and so are the instan- ! + ! taneous site-, patch-, and cohort-level variables needed for resuming the run. ! + ! ! + ! IADD_SITE_MEANS -- Add site-level averages to the output (0 = no; 1 = yes) ! + ! IADD_PATCH_MEANS -- Add patch-level averages to the output (0 = no; 1 = yes) ! + ! IADD_COHORT_MEANS -- Add cohort-level averages to the output (0 = no; 1 = yes) ! + ! ! + !---------------------------------------------------------------------------------------! + NL%IADD_SITE_MEANS = 1 + NL%IADD_PATCH_MEANS = 1 + NL%IADD_COHORT_MEANS = 1 + !---------------------------------------------------------------------------------------! + + + !---------------------------------------------------------------------------------------! ! ATTACH_METADATA -- Flag for attaching metadata to HDF datasets. Attaching metadata ! diff --git a/ED/Template/Template/patchprops.r b/ED/Template/Template/patchprops.r index 6ebf54fa1..48bd79af3 100644 --- a/ED/Template/Template/patchprops.r +++ b/ED/Template/Template/patchprops.r @@ -1,3 +1,16 @@ +#==========================================================================================# +#==========================================================================================# +# Leave these commands at the beginning. They will refresh the session. # +#------------------------------------------------------------------------------------------# +rm(list=ls()) +graphics.off() +#==========================================================================================# +#==========================================================================================# + + + + + #----- Here is the user-defined variable section. -----------------------------------------# here = "thispath" # Current directory. there = "thatpath" # Directory where analyses/history are @@ -19,7 +32,7 @@ plotgrid = TRUE # Should I plot the grid in the background? exfac = 0.30 # Expansion factor to plot legend. legwhere = "topleft" # Where to put the PFT legend inset = 0.01 # Inset -legbg = "white" # Colour for legend background +ibackground = mybackground # Background settings (check load_everything.r) #------------------------------------------------------------------------------------------# # List of possible plots. In case you don't want some of them, simply switch plt to F. # #------------------------------------------------------------------------------------------# @@ -74,8 +87,9 @@ cohprop08 = list(vnam="ba" ,desc="Basal area" ,unit="m2" ,plog=T,lwd= #------------------------------------------------------------------------------------------# -#----- In case there is some graphic still opened. ----------------------------------------# -graphics.off() + +#----- Loading some packages and scripts. -------------------------------------------------# +source(file.path(srcdir,"load.everything.r")) #------------------------------------------------------------------------------------------# @@ -93,40 +107,8 @@ pftnames = c("C4 Grass","Early Tropical","Mid Tropical","Late Tropical","Temp. C ,"C3 Grass","Araucaria","Total") pftcols = c("gold","chartreuse","limegreen","darkgreen","purple3" ,"deepskyblue","aquamarine","midnightblue","darkorange3","sienna" - ,"firebrick","orchid","coral","gray45","olivedrab" - ,"goldenrod","steelblue","gray22") -#------------------------------------------------------------------------------------------# - - -#----- Loading some packages. -------------------------------------------------------------# -library(hdf5) -library(chron) -library(scatterplot3d) -library(lattice) -library(maps) -library(mapdata) -library(akima) -library(fields) -#------------------------------------------------------------------------------------------# - - - -#----- Avoiding unecessary and extremely annoying beeps. ----------------------------------# -options(locatorBell=FALSE) -#------------------------------------------------------------------------------------------# - - - -#----- Loading some files with functions. -------------------------------------------------# -source(paste(srcdir,"atlas.r" ,sep="/")) -source(paste(srcdir,"globdims.r" ,sep="/")) -source(paste(srcdir,"locations.r" ,sep="/")) -source(paste(srcdir,"muitas.r" ,sep="/")) -source(paste(srcdir,"plotsize.r" ,sep="/")) -source(paste(srcdir,"rconstants.r",sep="/")) -source(paste(srcdir,"sombreado.r" ,sep="/")) -source(paste(srcdir,"southammap.r",sep="/")) -source(paste(srcdir,"timeutils.r" ,sep="/")) + ,"firebrick","orchid","coral","grey45","olivedrab" + ,"goldenrod","steelblue","grey22") #------------------------------------------------------------------------------------------# @@ -334,9 +316,10 @@ for (ipy in 1:nplaces){ #----- Plot the graph. --------------------------------------------------------# + par(par.user) plot(x=patchidx,y=thisvar,type="n",main=letitre,xlab=lexlab,ylab=leylab) - grid(nx=0,ny=NULL,col="gray59",lty="dotted") - abline(v=patchidx,col="gray59",lty="dotted") + grid(nx=0,ny=NULL,col=grid.colour,lty="dotted") + abline(v=patchidx,col=grid.colour,lty="dotted") points(x=patchidx,y=thisvar,type="h",lwd=plwd,col=pcolour) points(x=patchidx,y=thisvar,type="p",pch=16,cex=1.5,col=pcolour) #------------------------------------------------------------------------------# @@ -444,11 +427,11 @@ for (ipy in 1:nplaces){ #----- Plot the graph. --------------------------------------------------# plot(x=thisidx,y=thisvar,type="n",main=letitre,log=plog ,xlab=lexlab,ylab=leylab,ylim=ylimit) - abline(v=thisidx,h=axTicks(side=2),col="gray59",lty="dotted") + abline(v=thisidx,h=axTicks(side=2),col=grid.colour,lty="dotted") points(x=thisidx,y=thisvar,type="h",lwd=plwd,col=pcolour) points(x=thisidx,y=thisvar,type="p",pch=16,cex=1.5,col=pcolour) - legend(x=legwhere,inset=inset,bg=legbg,pch=16,pt.cex=1.5,legend=legpft - ,cex=0.7,col=colpft,lwd=plwd) + legend(x=legwhere,inset=inset,bg=background,pch=16,pt.cex=1.5 + ,legend=legpft,cex=0.7,col=colpft,lwd=plwd) #------------------------------------------------------------------------# diff --git a/ED/Template/Template/plot_budget.r b/ED/Template/Template/plot_budget.r index 7484c7be2..ccd0abdaa 100644 --- a/ED/Template/Template/plot_budget.r +++ b/ED/Template/Template/plot_budget.r @@ -31,11 +31,11 @@ plotgrid = TRUE # Should I plot the grid in the background? legwhere = "topleft" # Where should I place the legend? inset = 0.05 # inset distance between legend and edge of plot region. -legbg = "white" # Legend background colour. scalleg = 0.32 # Increase in y scale to fit the legend. ncolshov = 200 # Target number of colours for Hovmoller diagrams. hovgrid = TRUE # Should I include a grid on the Hovmoller plots? +ibackground = mybackground # Background settings (check load_everything.r) #------------------------------------------------------------------------------------------# @@ -49,7 +49,7 @@ budget[[ 1]] = list( vnam = c("co2.dstorage","co2.nep","co2.dens.eff" , desc = c("Delta (Storage)","NEP","Density Effect" ,"Eddy flux loss","Residual") , colour = c("forestgreen","chartreuse","purple4" - ,"deepskyblue","black") + ,"deepskyblue","grey30") , lwd = c(2.0,2.0,2.0,2.0,2.0) , range = c(FALSE,TRUE,TRUE,TRUE,TRUE) , type = ptype @@ -67,7 +67,7 @@ budget[[ 2]] = list( vnam = c("ene.dstorage","ene.precip","ene.netrad" ,"Drainage","Runoff","Residual") , colour = c("red3","royalblue","darkorange" ,"purple4","chartreuse","deepskyblue","sienna" - ,"forestgreen","black") + ,"forestgreen","grey30") , lwd = c(2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0) , range = c(FALSE,FALSE,TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,TRUE) , type = ptype @@ -82,7 +82,7 @@ budget[[ 3]] = list( vnam = c("h2o.dstorage","h2o.precip","h2o.dens.eff" , desc = c("Delta (Storage)","Rainfall","Density effect" ,"Eddy flux loss","Drainage","Runoff","Residual") , colour = c("red3","royalblue","purple4" - ,"deepskyblue","sienna","forestgreen","black") + ,"deepskyblue","sienna","forestgreen","grey30") , lwd = c(2.0,2.0,2.0,2.0,2.0,2.0,2.0) , range = c(FALSE,FALSE,TRUE,TRUE,FALSE,FALSE,TRUE) , type = ptype @@ -168,20 +168,24 @@ budget[[ 9]] = list( vnam = c("h2o.relres") -#----- Loading some packages. -------------------------------------------------------------# -library(hdf5) -library(chron) -library(scatterplot3d) -library(lattice) -library(maps) -library(mapdata) -library(akima) -#------------------------------------------------------------------------------------------# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +# NO NEED TO CHANGE ANYTHING BEYOND THIS POINT UNLESS YOU ARE DEVELOPING THE CODE... # +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# -#----- In case there is some graphic still opened. ----------------------------------------# -graphics.off() +#----- Loading some packages and scripts. -------------------------------------------------# +source(file.path(srcdir,"load.everything.r")) #------------------------------------------------------------------------------------------# @@ -193,30 +197,6 @@ nout = length(outform) -#----- Avoiding unecessary and extremely annoying beeps. ----------------------------------# -options(locatorBell=FALSE) -#------------------------------------------------------------------------------------------# - - - -#----- Loading some files with functions. -------------------------------------------------# -source(paste(srcdir,"atlas.r" ,sep="/")) -source(paste(srcdir,"globdims.r" ,sep="/")) -source(paste(srcdir,"locations.r" ,sep="/")) -source(paste(srcdir,"muitas.r" ,sep="/")) -source(paste(srcdir,"pretty.log.r" ,sep="/")) -source(paste(srcdir,"pretty.time.r",sep="/")) -source(paste(srcdir,"plotsize.r" ,sep="/")) -source(paste(srcdir,"qapply.r" ,sep="/")) -source(paste(srcdir,"rconstants.r" ,sep="/")) -source(paste(srcdir,"sombreado.r" ,sep="/")) -source(paste(srcdir,"southammap.r" ,sep="/")) -source(paste(srcdir,"thermlib.r" ,sep="/")) -source(paste(srcdir,"timeutils.r" ,sep="/")) -#------------------------------------------------------------------------------------------# - - - #----- Define plot window size ------------------------------------------------------------# size = plotsize(proje=FALSE,paper=paper) #------------------------------------------------------------------------------------------# @@ -399,12 +379,13 @@ for (place in myplaces){ letitre = paste(theme," - ",thispoi$lieu,"(Patch ",ipa,")", " \n"," Time series: ",theme,sep="") + par(par.user) plot(x=when,y=cpatch[[vnames[1]]],type="n",main=letitre,xlab="Time" ,ylim=ylimit,ylab=paste("[",unit,"]",sep=""),log=plog,xaxt="n" ,cex.main=cex.main) axis(side=1,at=whenout$levels,labels=whenout$labels,padj=whenout$padj) if (hovgrid){ - abline(h=axTicks(side=2),v=whenout$levels,col="gray66",lty="dotted") + abline(h=axTicks(side=2),v=whenout$levels,col=grid.colour,lty="dotted") }#end if for (l in 1:nlayers){ points(x=when,y=cpatch[[vnames[l]]],col=lcolours[l] diff --git a/ED/Template/Template/plot_census.r b/ED/Template/Template/plot_census.r index ddb7e46ce..53902f2a4 100644 --- a/ED/Template/Template/plot_census.r +++ b/ED/Template/Template/plot_census.r @@ -52,7 +52,7 @@ outform = thisoutform # Formats for output file. Supported fo # - "pdf" - for PDF printing depth = 96 # PNG resolution, in pixels per inch paper = "letter" # Paper size, to define the plot shape -ptsz = 14 # Font size. +ptsz = 18 # Font size. lwidth = 2.5 # Line width plotgrid = TRUE # Should I plot the grid in the background? sasfixlimits = FALSE # Use a fixed scale for size and age-structure @@ -64,7 +64,6 @@ ncolshov = 200 # Target number of colours for Hovmoller hovgrid = TRUE # Include a grid on the Hovmoller plots? legwhere = "topleft" # Where should I place the legend? inset = 0.01 # Inset between legend and edge of plot region. -legbg = "white" # Legend background colour. scalleg = 0.40 # Expand y limits by this relative amount to fit # the legend cex.main = 0.8 # Scale coefficient for the title @@ -73,7 +72,6 @@ phi = 30. # Vertical angle for perspective project ltheta = -210. # Azimuth angle for light shade = 0.125 # Shade intensity expz = 0.5 # Expansion factor for Z axis -gcol = c("lightblue","white") # Colours for the fifties style floor cexmin = 0.5 # Minimum "head" size of the lollipop cexmax = 3.0 # Maximum "head" size of the lollipop ylnudge = 0.05 # Nudging factor for ylimit @@ -88,6 +86,7 @@ drought.mark = mydroughtmark # Put a background to highlight droughts drought.yeara = mydroughtyeara # First year that has drought drought.yearz = mydroughtyearz # Last year that has drought months.drought = mymonthsdrought # Months with drought +ibackground = mybackground # Background colour #------------------------------------------------------------------------------------------# @@ -96,6 +95,8 @@ slz.min = -5.0 # The deepest depth that trees access water. idbh.type = myidbhtype # Type of DBH class # 1 -- Every 10 cm until 100cm; > 100cm # 2 -- 0-10; 10-20; 20-35; 35-50; 50-70; > 70 (cm) +ed22.ci = TRUE # Plot confidence interval for ED? +n.boot = 1000 # Number of realisations for bootstrap #------------------------------------------------------------------------------------------# @@ -147,8 +148,8 @@ pratets[[1]] = list( ed2.rate = "recr" , pfttoo = TRUE , desc.rate = "Recruitment rate" , unit.rate = "%/yr" - , col.ed2 = c("chartreuse4","chartreuse") - , col.sta = c("grey21" ,"grey42" ) + , col.ed2 = c(green.fg,green.bg) + , col.sta = c(grey.fg,grey.bg) , indiv = recr.vars , desc.indiv = recr.labels , legpos = "topright" @@ -160,8 +161,8 @@ pratets[[2]] = list( ed2.rate = "mort" , pfttoo = TRUE , desc.rate = "Mortality rate" , unit.rate = "%/yr" - , col.ed2 = c("purple4","mediumpurple1") - , col.sta = c("grey21" ,"grey42" ) + , col.ed2 = c(purple.fg,purple.bg) + , col.sta = c(grey.fg,grey.bg) , indiv = mort.vars , desc.indiv = mort.labels , legpos = "topright" @@ -173,8 +174,8 @@ pratets[[3]] = list( ed2.rate = "ddmort" , pfttoo = TRUE , desc.rate = "Density-dependent mort. rate" , unit.rate = "%/yr" - , col.ed2 = c("slateblue","slateblue1") - , col.sta = c("grey21" ,"grey42" ) + , col.ed2 = c(indigo.fg,indigo.bg) + , col.sta = c(grey.fg,grey.bg) , indiv = mort.vars , desc.indiv = mort.labels , legpos = "topright" @@ -186,8 +187,8 @@ pratets[[4]] = list( ed2.rate = "dimort" , pfttoo = TRUE , desc.rate = "Density-independent mort. rate" , unit.rate = "%/yr" - , col.ed2 = c("royalblue4","steelblue") - , col.sta = c("grey21" ,"grey42" ) + , col.ed2 = c(blue.fg,blue.bg) + , col.sta = c(grey.fg,grey.bg) , indiv = mort.vars , desc.indiv = mort.labels , legpos = "topright" @@ -199,8 +200,8 @@ pratets[[5]] = list( ed2.rate = "growth" , pfttoo = TRUE , desc.rate = "Growth rate" , unit.rate = "%/yr" - , col.ed2 = c("saddlebrown","darkgoldenrod2") - , col.sta = c("grey21" ,"grey42" ) + , col.ed2 = c(yellow.fg,yellow.bg) + , col.sta = c(grey.fg,grey.bg) , indiv = growth.vars , desc.indiv = growth.labels , legpos = "topright" @@ -217,12 +218,12 @@ pratesize[[1]] = list( ed2.rate = "mort" , pfttoo = TRUE , desc.rate = "Mortality rate" , unit.rate = "%/yr" - , col.ed2 = c("purple4","mediumpurple1") - , col.sta = c("grey21" ,"grey42" ) + , col.ed2 = c(purple.fg,purple.bg) + , col.sta = c(grey.fg,grey.bg) , indiv = mort.vars , desc.indiv = mort.labels , legpos = "topright" - , plog = "y" + , plog = "" )#end list pratesize[[2]] = list( ed2.rate = "ddmort" , sta.rate = "mort" @@ -230,12 +231,12 @@ pratesize[[2]] = list( ed2.rate = "ddmort" , pfttoo = TRUE , desc.rate = "Density-dependent mort. rate" , unit.rate = "%/yr" - , col.ed2 = c("slateblue","slateblue1") - , col.sta = c("grey21" ,"grey42" ) + , col.ed2 = c(indigo.fg,indigo.bg) + , col.sta = c(grey.fg,grey.bg) , indiv = mort.vars , desc.indiv = mort.labels , legpos = "topright" - , plog = "y" + , plog = "" )#end list pratesize[[3]] = list( ed2.rate = "dimort" , sta.rate = "mort" @@ -243,12 +244,12 @@ pratesize[[3]] = list( ed2.rate = "dimort" , pfttoo = TRUE , desc.rate = "Density-independent mort. rate" , unit.rate = "%/yr" - , col.ed2 = c("royalblue4","steelblue") - , col.sta = c("grey21" ,"grey42" ) + , col.ed2 = c(blue.fg,blue.bg) + , col.sta = c(grey.fg,grey.bg) , indiv = mort.vars , desc.indiv = mort.labels , legpos = "topright" - , plog = "y" + , plog = "" )#end list pratesize[[4]] = list( ed2.rate = "growth" , sta.rate = "growth" @@ -256,13 +257,34 @@ pratesize[[4]] = list( ed2.rate = "growth" , pfttoo = TRUE , desc.rate = "Growth rate" , unit.rate = "%/yr" - , col.ed2 = c("saddlebrown","darkgoldenrod2") - , col.sta = c("grey21" ,"grey42" ) + , col.ed2 = c(yellow.fg,yellow.bg) + , col.sta = c(grey.fg,grey.bg) , indiv = growth.vars , desc.indiv = growth.labels , legpos = "topright" - , plog = "y" + , plog = "" )#end list +#---- 3. Plot median and confidence intervals for themes. ---------------------------------# +pratetheme = list() +pratetheme[[1]] = list( ed2.rate = c("ddmort","dimort") + , sta.rate = "mort" + , sizetoo = TRUE + , pfttoo = TRUE + , desc.rate = c("ED-2.2 Negative C Balance" + ,"ED-2.2 Other") + , unit.rate = "%/yr" + , col.ed2 = rbind( c(indigo.fg,indigo.bg) + , c(green.fg ,green.bg) + )#end rbind + , col.sta = c(grey.fg,grey.bg) + , angle = c(-45,45) + , density = c(40,40) + , indiv = mort.vars + , desc.indiv = mort.labels + , theme = "mortality" + , theme.desc = "Mortality Rates" + , plog = "" + )#end list #------------------------------------------------------------------------------------------# @@ -416,19 +438,44 @@ xyzvar$zvar = list( list( vname = "rshort" , col.scheme = "muitas" , log = FALSE )#end list + , list( vname = "leaf.gsw" + , desc = "Stomatal conductance" + , unit = "kg/m2/day" + , add = 0. + , mult = 86400. + , col.scheme = "imuitas" + , log = FALSE + )#end list + , list( vname = "leaf.gbw" + , desc = "Leaf Bnd. Lyr. Conductance" + , unit = "kg/m2/day" + , add = 0. + , mult = 86400. + , col.scheme = "imuitas" + , log = FALSE + )#end list + , list( vname = "cba.light" + , desc = "Carbon balance (Max. light)" + , unit = "kgC/m2/yr" + , add = 0. + , mult = 1. + , col.scheme = "clife" + , log = FALSE + )#end list + , list( vname = "cba.moist" + , desc = "Carbon balance (Max. Moisture)" + , unit = "kgC/m2/yr" + , add = 0. + , mult = 1. + , col.scheme = "clife" + , log = FALSE + )#end list )#end if #------------------------------------------------------------------------------------------# -#----- Loading some packages and scripts. -------------------------------------------------# -source(file.path(srcdir,"load.everything.r")) -#------------------------------------------------------------------------------------------# - - - - #----- Set how many formats we must output. -----------------------------------------------# outform = tolower(outform) nout = length(outform) @@ -437,6 +484,7 @@ nout = length(outform) #----- Set how many variables we will compare. --------------------------------------------# npratesize = length(pratesize ) +npratetheme = length(pratetheme) npratets = length(pratets ) #------------------------------------------------------------------------------------------# @@ -548,7 +596,11 @@ for (place in myplaces){ sta = get(census.name) n.census = length(sta$when) n.dbh = length(sta$dbh.breaks)-1 - x.dbh = c(10,sta$dbh.breaks[seq(from=2,to=n.dbh,by=1)]) + + x.edge = c(10, sta$dbh.breaks[-c(1,n.dbh+1)] + , 2. * sta$dbh.breaks[n.dbh] - sta$dbh.breaks[n.dbh-1] ) + x.dbh = 0.5 * ( x.edge[-1] + x.edge[-(n.dbh+1)] ) + xlimit = pretty.xylim(u=x.edge,fracexp=0.0,is.log=FALSE) dbh.names = dimnames(sta$mort.size$n$median)[[2]] year4 = numyears(sta$when) biocyca = year4[2] @@ -652,6 +704,10 @@ for (place in myplaces){ ts.census.idx = array( NA, dim = dim.envr) ts.atm.vpd = array( NA, dim = dim.envr) ts.leaf.vpd = array( NA, dim = dim.envr) + ts.leaf.gbw = array( NA, dim = dim.envr) + ts.leaf.gsw = array( NA, dim = dim.envr) + ts.cba.light = array( NA, dim = dim.envr) + ts.cba.moist = array( NA, dim = dim.envr) #------------------------------------------------------------------------------------# @@ -666,8 +722,8 @@ for (place in myplaces){ now.month = (now.month %% 12) + 1 now.year = now.year + as.integer(now.month == 1) year.use = year.use + as.integer(now.month == 1) - cat("ED-2.1: ",paste(mon2mmm(now.month,cap1=T),now.year,sep="-") - ,"; Census: ",paste(act.census.year[census.idx[m]]),"\n") + cat("Cycle",u,"; ED-2.1: ",paste(mon2mmm(now.month,cap1=T),now.year,sep="-") + ,"; Census: ",paste(act.census.year[census.idx[m]]),"\n") #----- Build the file name. ---------------------------------------------------# cmonth = sprintf("%2.2i",now.month) @@ -753,16 +809,18 @@ for (place in myplaces){ #---------------------------------------------------------------------------# # Read in the soil moisture, and find the equivalent matric potential. # #---------------------------------------------------------------------------# - soil.water = rev(cumsum(rev(mymont$MMEAN.SOIL.WATER * wdns * dslz))) + soil.water = rev(cumsum(rev(mymont$MMEAN.SOIL.WATER.PY * wdns * dslz))) soil.moist.avg = soil.water / (wdns * soil.depth) ts.paw [m,u] = ( ( soil.water[ka] - soil.dry [ka] ) / ( soil.poro [ka] - soil.dry [ka] ) ) - ts.rshort [m,u] = mymont$MMEAN.RSHORT - ts.fs.open [m,u] = mymont$MMEAN.FS.OPEN + ts.rshort [m,u] = mymont$MMEAN.ATM.RSHORT.PY + ts.fs.open [m,u] = mymont$MMEAN.FS.OPEN.PY ts.smpot [m,u] = ( - smoist2mpot(smoist=soil.moist.avg[ka],mysoil=soil) * 0.001 * grav ) - ts.atm.vpd [m,u] = mymont$MMEAN.ATM.VPDEF - ts.leaf.vpd[m,u] = mymont$MMEAN.LEAF.VPDEF + ts.atm.vpd [m,u] = mymont$MMEAN.ATM.VPDEF.PY + ts.leaf.vpd[m,u] = mymont$MMEAN.LEAF.VPDEF.PY + ts.leaf.gbw[m,u] = mymont$MMEAN.LEAF.GBW.PY + ts.leaf.gsw[m,u] = mymont$MMEAN.LEAF.GSW.PY #---------------------------------------------------------------------------# @@ -796,14 +854,16 @@ for (place in myplaces){ agbconow = mymont$AGB.CO baconow = mymont$BA.CO laiconow = mymont$LAI.CO - mortconow = rowSums(mymont$MMEAN.MORT.RATE) - ddmortconow = mymont$MMEAN.MORT.RATE[,2] + mortconow = rowSums(mymont$MMEAN.MORT.RATE.CO) + ddmortconow = mymont$MMEAN.MORT.RATE.CO[,2] dimortconow = mortconow - ddmortconow recruitconow = mymont$RECRUIT.DBH censtatusconow = mymont$CENSUS.STATUS dlndbhdtconow = mymont$DLNDBH.DT dlnagbdtconow = mymont$DLNAGB.DT dlnbadtconow = mymont$DLNBA.DT + cbalightconow = rowMeans(mymont$CB.LIGHTMAX[,1:12]) + cbamoistconow = rowMeans(mymont$CB.MOISTMAX[,1:12]) #------------------------------------------------------------------------# }else{ areaconow = NA @@ -821,6 +881,8 @@ for (place in myplaces){ dlndbhdtconow = NA dlnagbdtconow = NA dlnbadtconow = NA + cbalightconow = NA + cbamoistconow = NA }#end if #---------------------------------------------------------------------------# @@ -836,6 +898,19 @@ for (place in myplaces){ #---------------------------------------------------------------------------# + + #---------------------------------------------------------------------------# + # Find the polygon-level carbon balance. # + #---------------------------------------------------------------------------# + if (all(!is.na(nplantconow))){ + ts.cba.light[m,u] = sum( w.nplant * cbalightconow ) + ts.cba.moist[m,u] = sum( w.nplant * cbamoistconow ) + }else{ + }#end if + #---------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------# # Loop over all PFTs. # #---------------------------------------------------------------------------# @@ -1130,6 +1205,38 @@ for (place in myplaces){ , na.rm = TRUE , lower = FALSE )) + pspace$leaf.gsw = c(qapply( X = ts.leaf.gsw + , INDEX = census.idx + , DIM = 1 + , FUN = qu.mean + , p = 0.80 + , na.rm = TRUE + , lower = FALSE + )) + pspace$leaf.gbw = c(qapply( X = ts.leaf.gbw + , INDEX = census.idx + , DIM = 1 + , FUN = qu.mean + , p = 0.80 + , na.rm = TRUE + , lower = FALSE + )) + pspace$cba.light = c(qapply( X = ts.cba.light + , INDEX = census.idx + , DIM = 1 + , FUN = qu.mean + , p = 0.80 + , na.rm = TRUE + , lower = FALSE + )) + pspace$cba.moist = c(qapply( X = ts.cba.moist + , INDEX = census.idx + , DIM = 1 + , FUN = qu.mean + , p = 0.80 + , na.rm = TRUE + , lower = FALSE + )) #---------------------------------------------------------------------------------# @@ -1296,90 +1403,287 @@ for (place in myplaces){ # Remove the 4th. dimension for the means. # #------------------------------------------------------------------------------------# cat(" - Averaging the census intervals...","\n") - ms.recr.plot = list() - for (v in 1:nrecr.vars){ - v.now = recr.vars[v] - ms.recr.plot[[v.now]] = qapply( X = ts.recr.plot[[v.now]] - , DIM = 2 - , INDEX = census.idx - , FUN = mean - , na.rm = TRUE - )#end apply - - #----- Convert recruitment to the fraction rate. ---------------------------------# - ms.recr.plot [[v.now]] = exp(ms.recr.plot [[v.now]]) - 1. - #---------------------------------------------------------------------------------# - }#end for + + + #----- This function will be used by the bootstrap. ---------------------------------# + mean.fun = function(x,idx) mean(x[idx],na.rm=TRUE) + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Plot-level recruitment. # + #------------------------------------------------------------------------------------# + ms.recr.plot = list() ms.mort.plot = list() - ms.mort.size = list() ms.ddmort.plot = list() - ms.ddmort.size = list() ms.dimort.plot = list() + ms.growth.plot = list() + ms.mort.size = list() + ms.ddmort.size = list() ms.dimort.size = list() + ms.growth.size = list() + #------------------------------------------------------------------------------------# + + + + #----- Plot-level recruitment. ------------------------------------------------------# + cat(" * Recruitment...","\n") + for (v in 1:nrecr.vars){ + v.now = recr.vars[v] + ms.now = list() + + recr.rates = c("recr") + n.rates = length(recr.rates) + + #---------------------------------------------------------------------------------# + # Loop over all rates. # + #---------------------------------------------------------------------------------# + for (r in 1:n.rates){ + ts.this.plot = get(paste("ts",recr.rates[r],"plot",sep=".")) + ms.this.plot = get(paste("ms",recr.rates[r],"plot",sep=".")) + + #------------------------------------------------------------------------------# + # Find the mean for all PFTs. # + #------------------------------------------------------------------------------# + ms.mean.plot = array(NA,dim=c(npft+1,n.census)) + ms.q025.plot = array(NA,dim=c(npft+1,n.census)) + ms.q975.plot = array(NA,dim=c(npft+1,n.census)) + + for (p in 1:(npft+1)){ + for (i in 2:n.census){ + i.sel = census.idx == i + ts.plot.now = c(ts.this.plot[[v.now]][p,i.sel,]) + ms.mean.plot[p,i] = mean(ts.plot.now,na.rm=TRUE) + if (any(is.finite(ts.plot.now))){ + boot.now = boot (data=ts.plot.now,statistic=mean.fun,R=n.boot) + ci.now = boot.ci(boot.out=boot.now,conf=0.95,type="perc") + if (length(ci.now$percent) == 5){ + ms.q025.plot[p,i] = ci.now$percent[4] + ms.q975.plot[p,i] = ci.now$percent[5] + }else{ + warning("Failed using bootstrap...") + }#end if + }#end if + #------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------# + }#end for + #------------------------------------------------------------------------------# + + + + #----- Convert rates fraction rates. ------------------------------------------# + ms.mean.plot = exp(ms.mean.plot) - 1. + ms.q025.plot = exp(ms.q025.plot) - 1. + ms.q975.plot = exp(ms.q975.plot) - 1. + #------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------# + # Save plot and size. # + #------------------------------------------------------------------------------# + ms.this.plot[[v.now]] = list( mean = ms.mean.plot + , q025 = ms.q025.plot + , q975 = ms.q975.plot + )#end list + #------------------------------------------------------------------------------# + dummy = assign(paste("ms",recr.rates[r],"plot",sep="."), ms.this.plot) + }#end for + #---------------------------------------------------------------------------------# + }#end for + #------------------------------------------------------------------------------------# + + + #----- Mortality rates. -------------------------------------------------------------# + cat(" * Mortality...","\n") for (v in 1:nmort.vars){ - v.now = mort.vars[v] - ms.mort.plot [[v.now]] = qapply( X = ts.mort.plot [[v.now]] - , DIM = 2 - , INDEX = census.idx - , FUN = mean - , na.rm = TRUE - )#end apply - ms.mort.size [[v.now]] = qapply( X = ts.mort.size [[v.now]] - , DIM = 3 - , INDEX = census.idx - , FUN = mean - , na.rm = TRUE - )#end apply - ms.ddmort.plot[[v.now]] = qapply( X = ts.ddmort.plot[[v.now]] - , DIM = 2 - , INDEX = census.idx - , FUN = mean - , na.rm = TRUE - )#end apply - ms.ddmort.size[[v.now]] = qapply( X = ts.ddmort.size[[v.now]] - , DIM = 3 - , INDEX = census.idx - , FUN = mean - , na.rm = TRUE - )#end apply - ms.dimort.plot[[v.now]] = qapply( X = ts.dimort.plot[[v.now]] - , DIM = 2 - , INDEX = census.idx - , FUN = mean - , na.rm = TRUE - )#end apply - ms.dimort.size[[v.now]] = qapply( X = ts.dimort.size[[v.now]] - , DIM = 3 - , INDEX = census.idx - , FUN = mean - , na.rm = TRUE - )#end apply - - #----- Convert mortality to the fraction rate. -----------------------------------# - ms.mort.plot [[v.now]] = 1. - exp(-ms.mort.plot [[v.now]]) - ms.mort.size [[v.now]] = 1. - exp(-ms.mort.size [[v.now]]) - ms.ddmort.plot[[v.now]] = 1. - exp(-ms.ddmort.plot[[v.now]]) - ms.ddmort.size[[v.now]] = 1. - exp(-ms.ddmort.size[[v.now]]) - ms.dimort.plot[[v.now]] = 1. - exp(-ms.dimort.plot[[v.now]]) - ms.dimort.size[[v.now]] = 1. - exp(-ms.dimort.size[[v.now]]) + v.now = mort.vars[v] + ms.now = list() + + mort.rates = c("mort","ddmort","dimort") + n.rates = length(mort.rates) + + #---------------------------------------------------------------------------------# + # Loop over all rates. # + #---------------------------------------------------------------------------------# + for (r in 1:n.rates){ + ts.this.plot = get(paste("ts",mort.rates[r],"plot",sep=".")) + ts.this.size = get(paste("ts",mort.rates[r],"size",sep=".")) + ms.this.plot = get(paste("ms",mort.rates[r],"plot",sep=".")) + ms.this.size = get(paste("ms",mort.rates[r],"size",sep=".")) + + + #------------------------------------------------------------------------------# + # Find the mean for all PFTs. # + #------------------------------------------------------------------------------# + ms.mean.plot = array(NA,dim=c(npft+1,n.census)) + ms.q025.plot = array(NA,dim=c(npft+1,n.census)) + ms.q975.plot = array(NA,dim=c(npft+1,n.census)) + ms.mean.size = array(NA,dim=c(npft+1,n.dbh,n.census)) + ms.q025.size = array(NA,dim=c(npft+1,n.dbh,n.census)) + ms.q975.size = array(NA,dim=c(npft+1,n.dbh,n.census)) + + for (p in 1:(npft+1)){ + for (i in 2:n.census){ + i.sel = census.idx == i + ts.plot.now = c(ts.this.plot[[v.now]][p,i.sel,]) + ms.mean.plot[p,i] = mean(ts.plot.now,na.rm=TRUE) + if (any(is.finite(ts.plot.now))){ + boot.now = boot (data=ts.plot.now,statistic=mean.fun,R=n.boot) + ci.now = boot.ci(boot.out=boot.now,conf=0.95,type="perc") + if (length(ci.now$percent) == 5){ + ms.q025.plot[p,i] = ci.now$percent[4] + ms.q975.plot[p,i] = ci.now$percent[5] + }else{ + warning("Failed using bootstrap...") + }#end if + }#end if + #------------------------------------------------------------------------# + + #------------------------------------------------------------------------# + for (d in 1:n.dbh){ + ts.size.now = c(ts.this.size[[v.now]][p,d,i.sel,]) + ms.mean.size[p,d,i] = mean(ts.size.now,na.rm=TRUE) + if (any(is.finite(ts.size.now))){ + boot.now = boot (data=ts.size.now,statistic=mean.fun,R=n.boot) + ci.now = boot.ci(boot.out=boot.now,conf=0.95,type="perc") + if (length(ci.now$percent) == 5){ + ms.q025.size[p,d,i] = ci.now$percent[4] + ms.q975.size[p,d,i] = ci.now$percent[5] + }else{ + warning("Failed using bootstrap...") + }#end if + #------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------# + }#end for + #------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------# + }#end for + #------------------------------------------------------------------------------# + + + + #----- Convert rates fraction rates. ------------------------------------------# + ms.mean.plot = 1. - exp( - ms.mean.plot) + ms.q025.plot = 1. - exp( - ms.q025.plot) + ms.q975.plot = 1. - exp( - ms.q975.plot) + ms.mean.size = 1. - exp( - ms.mean.size) + ms.q025.size = 1. - exp( - ms.q025.size) + ms.q975.size = 1. - exp( - ms.q975.size) + #------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------# + # Save plot and size. # + #------------------------------------------------------------------------------# + ms.this.plot[[v.now]] = list( mean = ms.mean.plot + , q025 = ms.q025.plot + , q975 = ms.q975.plot + )#end list + ms.this.size[[v.now]] = list( mean = ms.mean.size + , q025 = ms.q025.size + , q975 = ms.q975.size + )#end list + #------------------------------------------------------------------------------# + dummy = assign(paste("ms",mort.rates[r],"plot",sep="."), ms.this.plot) + dummy = assign(paste("ms",mort.rates[r],"size",sep="."), ms.this.size) + }#end for #---------------------------------------------------------------------------------# }#end for - ms.growth.plot = list() - ms.growth.size = list() + #------------------------------------------------------------------------------------# + + + #----- Growth rates. ----------------------------------------------------------------# + cat(" * Growth...","\n") for (v in 1:ngrowth.vars){ - v.now = growth.vars[v] - ms.growth.plot[[v.now]] = qapply( X = ts.growth.plot[[v.now]] - , DIM = 2 - , INDEX = census.idx - , FUN = mean - , na.rm = TRUE - )#end apply - ms.growth.size[[v.now]] = qapply( X = ts.growth.size[[v.now]] - , DIM = 3 - , INDEX = census.idx - , FUN = mean - , na.rm = TRUE - )#end apply + v.now = growth.vars[v] + ms.now = list() + + growth.rates = c("growth") + n.rates = length(growth.rates) + + #---------------------------------------------------------------------------------# + # Loop over all rates. # + #---------------------------------------------------------------------------------# + for (r in 1:n.rates){ + ts.this.plot = get(paste("ts",growth.rates[r],"plot",sep=".")) + ts.this.size = get(paste("ts",growth.rates[r],"size",sep=".")) + ms.this.plot = get(paste("ms",growth.rates[r],"plot",sep=".")) + ms.this.size = get(paste("ms",growth.rates[r],"size",sep=".")) + + #------------------------------------------------------------------------------# + # Find the mean for all PFTs. # + #------------------------------------------------------------------------------# + ms.mean.plot = array(NA,dim=c(npft+1,n.census)) + ms.q025.plot = array(NA,dim=c(npft+1,n.census)) + ms.q975.plot = array(NA,dim=c(npft+1,n.census)) + ms.mean.size = array(NA,dim=c(npft+1,n.dbh,n.census)) + ms.q025.size = array(NA,dim=c(npft+1,n.dbh,n.census)) + ms.q975.size = array(NA,dim=c(npft+1,n.dbh,n.census)) + + for (p in 1:(npft+1)){ + for (i in 2:n.census){ + i.sel = census.idx == i + ts.plot.now = c(ts.this.plot[[v.now]][p,i.sel,]) + ms.mean.plot[p,i] = mean(ts.plot.now,na.rm=TRUE) + if (any(is.finite(ts.plot.now))){ + boot.now = boot (data=ts.plot.now,statistic=mean.fun,R=n.boot) + ci.now = boot.ci(boot.out=boot.now,conf=0.95,type="perc") + if (length(ci.now$percent) == 5){ + ms.q025.plot[p,i] = ci.now$percent[4] + ms.q975.plot[p,i] = ci.now$percent[5] + }else{ + warning("Failed using bootstrap...") + }#end if + }#end if + #------------------------------------------------------------------------# + + #------------------------------------------------------------------------# + for (d in 1:n.dbh){ + ts.size.now = c(ts.this.size[[v.now]][p,d,i.sel,]) + ms.mean.size[p,d,i] = mean(ts.size.now,na.rm=TRUE) + if (any(is.finite(ts.size.now))){ + boot.now = boot (data=ts.size.now,statistic=mean.fun,R=n.boot) + ci.now = boot.ci(boot.out=boot.now,conf=0.95,type="perc") + if (length(ci.now$percent) == 5){ + ms.q025.size[p,d,i] = ci.now$percent[4] + ms.q975.size[p,d,i] = ci.now$percent[5] + }else{ + warning("Failed using bootstrap...") + }#end if + #------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------# + }#end for + #------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------# + }#end for + #------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------# + # Save plot and size. # + #------------------------------------------------------------------------------# + ms.this.plot[[v.now]] = list( mean = ms.mean.plot + , q025 = ms.q025.plot + , q975 = ms.q975.plot + )#end list + ms.this.size[[v.now]] = list( mean = ms.mean.size + , q025 = ms.q025.size + , q975 = ms.q975.size + )#end list + #------------------------------------------------------------------------------# + dummy = assign(paste("ms",growth.rates[r],"plot",sep="."), ms.this.plot) + dummy = assign(paste("ms",growth.rates[r],"size",sep="."), ms.this.size) + }#end for + #---------------------------------------------------------------------------------# }#end for #------------------------------------------------------------------------------------# @@ -1462,8 +1766,6 @@ for (place in myplaces){ # Plot-level with all cycles. # #------------------------------------------------------------------------------# ms.plot = get(paste("ms",ed2.rate,"plot",sep="."))[[v.now]] - ms.global = array(ms.plot[npft+1,,],dim=dim(ms.plot)[2:3] ) - ms.use = array(ms.plot[mypfts,,],dim=c(npfts,dim(ms.plot)[2:3])) #------------------------------------------------------------------------------# @@ -1480,41 +1782,13 @@ for (place in myplaces){ ed2[[ed2.plot]][[v.now]]$q025 = NA * sta[[sta.plot]][[v.now]]$q025 ed2[[ed2.plot]][[v.now]]$q975 = NA * sta[[sta.plot]][[v.now]]$q975 #----- Save the global variables. ---------------------------------------------# - ed2[[ed2.plot]][[v.now]]$global[4,yyy] = apply( X = ms.global - , MARGIN = 1 - , FUN = median - , na.rm = TRUE - )#end apply - ed2[[ed2.plot]][[v.now]]$global[5,yyy] = apply( X = ms.global - , MARGIN = 1 - , FUN = quantile - , probs = 0.025 - , na.rm = TRUE - )#end apply - ed2[[ed2.plot]][[v.now]]$global[6,yyy] = apply( X = ms.global - , MARGIN = 1 - , FUN = quantile - , probs = 0.975 - , na.rm = TRUE - )#end apply + ed2[[ed2.plot]][[v.now]]$global[4,yyy] = ms.plot$mean[npft+1,yyy] + ed2[[ed2.plot]][[v.now]]$global[5,yyy] = ms.plot$q025[npft+1,yyy] + ed2[[ed2.plot]][[v.now]]$global[6,yyy] = ms.plot$q975[npft+1,yyy] #----- Save the PFT statistics. -----------------------------------------------# - ed2[[ed2.plot]][[v.now]]$median[ ,yyy] = apply( X = ms.use - , MARGIN = c(1,2) - , FUN = median - , na.rm = TRUE - )#end apply - ed2[[ed2.plot]][[v.now]]$q025 [ ,yyy] = apply( X = ms.use - , MARGIN = c(1,2) - , FUN = quantile - , probs = 0.025 - , na.rm = TRUE - )#end apply - ed2[[ed2.plot]][[v.now]]$q975 [ ,yyy] = apply( X = ms.use - , MARGIN = c(1,2) - , FUN = quantile - , probs = 0.975 - , na.rm = TRUE - )#end apply + ed2[[ed2.plot]][[v.now]]$median[ ,yyy] = ms.plot$mean[mypfts,yyy] + ed2[[ed2.plot]][[v.now]]$q025 [ ,yyy] = ms.plot$q025[mypfts,yyy] + ed2[[ed2.plot]][[v.now]]$q975 [ ,yyy] = ms.plot$q975[mypfts,yyy] #------------------------------------------------------------------------------# @@ -1523,16 +1797,14 @@ for (place in myplaces){ # Now the size-dependent variables, if this is a size-dependent rate. # #------------------------------------------------------------------------------# if (sizetoo){ + #---------------------------------------------------------------------------# # Plot-level with all cycles. # #---------------------------------------------------------------------------# ms.size = get(paste("ms",ed2.rate,"size",sep="."))[[v.now]] - ms.global = array(ms.size[npft+1,,,],dim=dim(ms.size)[2:4] ) - ms.use = array(ms.size[mypfts,,,],dim=c(npfts,dim(ms.size)[2:4])) #---------------------------------------------------------------------------# - #---------------------------------------------------------------------------# # Create the plot-level structure. Here the median and quantiles have # # a somewhat different number, based on the number of cycles we run (median # @@ -1545,41 +1817,13 @@ for (place in myplaces){ ed2[[ed2.size]][[v.now]]$q025 = NA * sta[[sta.size]][[v.now]]$q025 ed2[[ed2.size]][[v.now]]$q975 = NA * sta[[sta.size]][[v.now]]$q975 #----- Save the global variables. ------------------------------------------# - ed2[[ed2.size]][[v.now]]$global[4,,yyy] = apply( X = ms.global - , MARGIN = c(1,2) - , FUN = median - , na.rm = TRUE - )#end apply - ed2[[ed2.size]][[v.now]]$global[5,,yyy] = apply( X = ms.global - , MARGIN = c(1,2) - , FUN = quantile - , probs = 0.025 - , na.rm = TRUE - )#end apply - ed2[[ed2.size]][[v.now]]$global[6,,yyy] = apply( X = ms.global - , MARGIN = c(1,2) - , FUN = quantile - , probs = 0.975 - , na.rm = TRUE - )#end apply + ed2[[ed2.size]][[v.now]]$global[4,,yyy] = ms.size$mean[npft+1,,yyy] + ed2[[ed2.size]][[v.now]]$global[5,,yyy] = ms.size$q025[npft+1,,yyy] + ed2[[ed2.size]][[v.now]]$global[6,,yyy] = ms.size$q975[npft+1,,yyy] #----- Save the PFT statistics. --------------------------------------------# - ed2[[ed2.size]][[v.now]]$median[ ,,yyy] = apply( X = ms.use - , MARGIN = c(1,2,3) - , FUN = median - , na.rm = TRUE - )#end apply - ed2[[ed2.size]][[v.now]]$q025 [ ,,yyy] = apply( X = ms.use - , MARGIN = c(1,2,3) - , FUN = quantile - , probs = 0.025 - , na.rm = TRUE - )#end apply - ed2[[ed2.size]][[v.now]]$q975 [ ,,yyy] = apply( X = ms.use - , MARGIN = c(1,2,3) - , FUN = quantile - , probs = 0.975 - , na.rm = TRUE - )#end apply + ed2[[ed2.size]][[v.now]]$median[ ,,yyy] = ms.size$mean[mypfts,,yyy] + ed2[[ed2.size]][[v.now]]$q025 [ ,,yyy] = ms.size$q025[mypfts,,yyy] + ed2[[ed2.size]][[v.now]]$q975 [ ,,yyy] = ms.size$q975[mypfts,,yyy] #---------------------------------------------------------------------------# }#end if #------------------------------------------------------------------------------# @@ -1668,14 +1912,6 @@ for (place in myplaces){ - #------------------------------------------------------------------------------# - # Find the DBH for x scale. # - #------------------------------------------------------------------------------# - xlimit = range(x.dbh) - #------------------------------------------------------------------------------# - - - #------------------------------------------------------------------------------# # Define a nice configuration for the multiple panels. # #------------------------------------------------------------------------------# @@ -1711,6 +1947,7 @@ for (place in myplaces){ #---------------------------------------------------------------------------# # Split the window into several smaller windows. # #---------------------------------------------------------------------------# + par(par.user) par.orig = par(no.readonly = TRUE) par(oma = c(0.2,3,4,0)) layout(mat = rbind(1+lo.box$mat,rep(1,times=lo.box$ncol)) @@ -1722,31 +1959,59 @@ for (place in myplaces){ #---------------------------------------------------------------------------# # Find the plot limit for the y scale. # #---------------------------------------------------------------------------# - yuse = c(sta.q025,sta.q975,ed2.q025,ed2.q975) - ylimit = pretty.xylim(u=yuse,fracexp=0.0,is.log=ylog) - #---------------------------------------------------------------------------# + if (ed22.ci){ + yuse = c(sta.q025,sta.q975,ed2.q025,ed2.q975) + ylimit = pretty.xylim(u=yuse,fracexp=0.0,is.log=ylog) - #----- Plot legend. --------------------------------------------------------# - par(mar=c(0.1,0.1,0.1,0.1)) - plot.new() - plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") - legend ( x = "bottom" - , inset = 0.01 - , legend = c("Census","ED-2.2") - , fill = c(col.sta[2],col.ed2[2]) - , border = c(col.sta[2],col.ed2[2]) - , col = c(col.sta[1],col.ed2[1]) - , lwd = 2.0 - , pt.cex = 1.0 - , angle = c(-45,45) - , density = c( 40,40) - , bg = "white" - , ncol = 2 - , title = "(Shaded - 95% C.I.)" - , cex = 1.0 - )#end legend + #----- Plot legend. -----------------------------------------------------# + par(mar=c(0.1,0.1,0.1,0.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + legend ( x = "bottom" + , inset = 0.01 + , legend = c("Census","ED-2.2") + , fill = c(col.sta[2],col.ed2[2]) + , border = c(col.sta[2],col.ed2[2]) + , col = c(col.sta[1],col.ed2[1]) + , lwd = 2.0 + , pt.cex = 1.0 + , angle = c(-45,45) + , density = c( 40,40) + , bg = background + , ncol = 2 + , title = "(Shaded - 95% C.I.)" + , cex = 1.0 + )#end legend + #------------------------------------------------------------------------# + }else{ + yuse = c(sta.q025,sta.q975,ed2.median) + ylimit = pretty.xylim(u=yuse,fracexp=0.0,is.log=ylog) + + + + #----- Plot legend. -----------------------------------------------------# + par(mar=c(0.1,0.1,0.1,0.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + legend ( x = "bottom" + , inset = 0.01 + , legend = c("Census","ED-2.2") + , fill = c(col.sta[2], 0) + , border = c(col.sta[2], 0) + , col = c(col.sta[1],col.ed2[1]) + , lwd = 2.0 + , pt.cex = 1.0 + , angle = c(-45,45) + , density = c( 40,40) + , bg = background + , ncol = 2 + , title = "(Shaded - 95% C.I.)" + , cex = 1.0 + )#end legend + #------------------------------------------------------------------------# + }#end if #---------------------------------------------------------------------------# @@ -1766,11 +2031,19 @@ for (place in myplaces){ #------------------------------------------------------------------------# # 95% Confidence Interval. # #------------------------------------------------------------------------# - size.poly = list() - size.poly$x = c(size.poly$x,x.dbh ,rev(x.dbh) ,NA - ,size.poly$x,x.dbh ,rev(x.dbh) ,NA) - size.poly$y = c(size.poly$y,sta.q025[,y],rev(sta.q975[,y]),NA - ,size.poly$y,ed2.q025[,y],rev(ed2.q975[,y]),NA) + if (ed22.ci){ + size.poly = list() + size.poly$x = c(size.poly$x,x.dbh ,rev(x.dbh) ,NA + ,size.poly$x,x.dbh ,rev(x.dbh) ,NA) + size.poly$y = c(size.poly$y,sta.q025[,y],rev(sta.q975[,y]),NA + ,size.poly$y,ed2.q025[,y],rev(ed2.q975[,y]),NA) + size.poly$col = c(col.sta[2],col.ed2[2]) + }else{ + size.poly = list() + size.poly$x = c(size.poly$x,x.dbh ,rev(x.dbh) ,NA) + size.poly$y = c(size.poly$y,sta.q025[,y],rev(sta.q975[,y]),NA) + size.poly$col = col.sta[2] + }#end if #------------------------------------------------------------------------# @@ -1787,13 +2060,13 @@ for (place in myplaces){ par(mar=mar.now) plot.new() plot.window(xlim=xlimit,ylim=ylimit,log=plog) - if (bottom) axis(side=1) + if (bottom) axis(side=1,at=x.dbh,labels=dbh.names) if (left ) axis(side=2) box() title(main=lesub) - if (plotgrid) grid(col="grey83",lty="solid") + if (plotgrid) abline(v=x.edge,h=axTicks(2),col=grid.colour,lty="solid") #----- Plot the taxon rate with confidence interval. --------------------# - epolygon(x=size.poly,col=c(col.sta[2],col.ed2[2]),angle=c(-45,45) + epolygon(x=size.poly$x,y=size.poly$y,col=size.poly$col,angle=c(-45,45) ,density=40,lty="solid",lwd=1.0) lines(x=x.dbh,y=sta.median[,y],type="o",col=col.sta[1],pch=16,lwd=2.0) lines(x=x.dbh,y=ed2.median[,y],type="o",col=col.ed2[1],pch=16,lwd=2.0) @@ -1807,7 +2080,7 @@ for (place in myplaces){ #---------------------------------------------------------------------------# letitre = paste("Size-dependent ",desc.rate,"\n",lieu,sep="") ley = paste(desc.rate," [% ",desc.indiv[i],"/yr]",sep="") - lex = "Minimum DBH for the class [cm]" + lex = "DBH class [cm]" #---------------------------------------------------------------------------# @@ -1848,11 +2121,11 @@ for (place in myplaces){ #====================================================================================# #====================================================================================# - # 7. Plot the time series of the rates (by DBH class if applicable). # + # 7. Plot the theme time series of the rates (by DBH class if applicable). # #====================================================================================# #====================================================================================# - for (n in 1:npratets){ - this.plot = pratets[[n]] + for (n in 1:npratetheme){ + this.plot = pratetheme[[n]] sizetoo = this.plot$sizetoo desc.rate = this.plot$desc.rate unit.rate = this.plot$unit.rate @@ -1860,14 +2133,17 @@ for (place in myplaces){ col.sta = this.plot$col.sta indiv = this.plot$indiv desc.indiv = this.plot$desc.indiv - colnow = this.plot$colour - legpos = this.plot$legpos + angle = this.plot$angle + dens = this.plot$density + theme.now = this.plot$theme + theme.desc = this.plot$theme.desc plog = this.plot$plog ylog = length(grep("y",plog)) > 0 nindiv = length(indiv) + nrate = length(this.plot$ed2.rate) - cat(" + Plotting time series of ",desc.rate,"...","\n") + cat(" + Plotting time series of ",theme.desc,"...","\n") #---------------------------------------------------------------------------------# # Loop over all possible types of population count. # #---------------------------------------------------------------------------------# @@ -1882,13 +2158,13 @@ for (place in myplaces){ #----- Create a directory for this type of plot. ------------------------------# - outrate = paste(outplot,ed2.rate,sep="/") - if (! file.exists(outrate)) dir.create(outrate) + outtheme = paste(outplot,theme.now,sep="/") + if (! file.exists(outtheme)) dir.create(outtheme) #------------------------------------------------------------------------------# #----- Create path for this individual. ---------------------------------------# - outindiv = paste(outrate,indiv[i],sep="/") + outindiv = paste(outtheme,indiv[i],sep="/") if (! file.exists(outindiv)) dir.create(outindiv) #------------------------------------------------------------------------------# @@ -1898,10 +2174,15 @@ for (place in myplaces){ sta.median = 100. * sta.mod[4,2:n.census] sta.q025 = 100. * sta.mod[5,2:n.census] sta.q975 = 100. * sta.mod[6,2:n.census] - ed2.mod = ed2[[ed2.rate]][[indiv[i]]]$global - ed2.median = 100. * ed2.mod[4,2:n.census] - ed2.q025 = 100. * ed2.mod[5,2:n.census] - ed2.q975 = 100. * ed2.mod[6,2:n.census] + ed2.median = list() + ed2.q025 = list() + ed2.q975 = list() + for (r in sequence(nrate)){ + ed2.mod = ed2[[ed2.rate[r]]][[indiv[i]]]$global + ed2.median[[r]] = 100. * ed2.mod[4,2:n.census] + ed2.q025 [[r]] = 100. * ed2.mod[5,2:n.census] + ed2.q975 [[r]] = 100. * ed2.mod[6,2:n.census] + }#end for #------------------------------------------------------------------------------# @@ -1914,24 +2195,538 @@ for (place in myplaces){ #------------------------------------------------------------------------------# - #------------------------------------------------------------------------------# - # Make the polygons. # - #------------------------------------------------------------------------------# - plot.poly = list() - plot.poly$x = c(x.years ,rev(x.years) ,NA,x.years ,rev(x.years) ) - plot.poly$y = c(sta.q025,rev(sta.q975),NA,ed2.q025,rev(ed2.q975)) - #------------------------------------------------------------------------------# + if (ed22.ci){ + #---------------------------------------------------------------------------# + # Make the polygons. # + #---------------------------------------------------------------------------# + plot.poly = list() + plot.poly$x = c(x.years ,rev(x.years) ) + plot.poly$y = c(sta.q025,rev(sta.q975)) + plot.poly$col = c(col.sta[2]) + for (r in sequence(nrate)){ + plot.poly$x = c(plot.poly$x ,NA,x.years ,rev(x.years) ) + plot.poly$y = c(plot.poly$y ,NA,ed2.q025[[r]],rev(ed2.q975[[r]])) + plot.poly$col = c(plot.poly$col,col.ed2[r,2]) + }#end for + #---------------------------------------------------------------------------# + #---------------------------------------------------------------------------# + # Find the plot limit for the y scale. # + #---------------------------------------------------------------------------# + yuse = c(sta.q025,sta.q975,unlist(ed2.q025),unlist(ed2.q975)) + ylimit = pretty.xylim(u=yuse,fracexp=0.,is.log=ylog) + #---------------------------------------------------------------------------# + }else{ + #---------------------------------------------------------------------------# + # Make the polygons. # + #---------------------------------------------------------------------------# + plot.poly = list() + plot.poly$x = c(x.years ,rev(x.years) ) + plot.poly$y = c(sta.q025,rev(sta.q975)) + plot.poly$col = col.sta[2] + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Find the plot limit for the y scale. # + #---------------------------------------------------------------------------# + yuse = c(sta.q025,sta.q975,unlist(ed2.median)) + ylimit = pretty.xylim(u=yuse,fracexp=0.,is.log=ylog) + #---------------------------------------------------------------------------# + }#end if + #------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------# + # Loop over all formats, and make the plots. # + #------------------------------------------------------------------------------# + for (o in 1:nout){ + #----- Open the file or the plot window. -----------------------------------# + fichier = paste(outindiv,"/theme-",theme.now,"-",indiv[i],"." + ,outform[o],sep="") + if(outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth,height=size$height*depth + ,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE + ,width=size$width,height=size$height,pointsize=ptsz,paper=size$paper) + }#end if + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Make the title and axis labels. # + #---------------------------------------------------------------------------# + letitre = paste(theme.desc," - ",lieu,sep="") + ley = paste(theme.desc," [% ",desc.indiv[i],"/yr]",sep="") + lex = "Census year" + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Go on and plot stuff. # + #---------------------------------------------------------------------------# + par(par.user) + layout(mat=rbind(2,1),heights=c(5,1)) + #---------------------------------------------------------------------------# + + + #----- Plot legend. --------------------------------------------------------# + if (ed22.ci){ + par(mar=c(0.1,0.1,0.1,0.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + legend ( x = "bottom" + , inset = 0.01 + , legend = c("Observed",rep("",times=nrate-1),desc.rate) + , fill = c(col.sta[2],rep(0,times=nrate-1),col.ed2[,2]) + , border = c(col.sta[2],rep(0,times=nrate-1),col.ed2[,2]) + , col = c(col.sta[1],rep(0,times=nrate-1),col.ed2[,1]) + , lwd = c(2.0,rep(0,times=nrate-1),rep(2,0,times=nrate)) + , pt.cex = c(1.0,rep(0,times=nrate-1),rep(1.0,times=nrate)) + , angle = c(90,rep(0,times=nrate-1),angle) + , density = c(40,rep(0,times=nrate-1),dens) + , ncol = 2 + , title = "(Shaded - 95% C.I.)" + , cex = 1.0 + )#end legend + }else{ + par(mar=c(0.1,0.1,0.1,0.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + legend ( x = "bottom" + , inset = 0.01 + , legend = c("Observed",rep("",times=nrate-1),desc.rate) + , fill = c(col.sta[2],rep(0,times=nrate+1)) + , border = c(col.sta[2],rep(0,times=nrate+1)) + , col = c(col.sta[1],rep(0,times=nrate-1),col.ed2[,1]) + , lwd = c(2.0,rep(0,times=nrate-1),rep(2,0,times=nrate)) + , pt.cex = c(1.0,rep(0,times=nrate-1),rep(1.0,times=nrate)) + , angle = c(90,rep(0,times=nrate+1)) + , density = c(40,rep(0,times=nrate+1)) + , ncol = 2 + , title = "(Shaded - 95% C.I.)" + , cex = 0.85 + )#end legend + }#end if + #---------------------------------------------------------------------------# + + + #----- Plotting window and grid. -------------------------------------------# + par(mar=c(5,4,4,2)+0.1) + plot(x=x.years,y=sta.median,xlim=xlimit,ylim=ylimit,type="n",main=letitre + ,xlab=lex,ylab=ley,log=plog,cex.main=0.7) + if (plotgrid) grid(col=grid.colour,lty="solid") + #----- Plot the taxon rate with confidence interval. -----------------------# + epolygon(x=plot.poly$x,y=plot.poly$y,col=plot.poly$col,angle=c(90,angle) + ,density=c(40,dens),lty="solid",lwd=1.0) + lines(x=x.years,y=sta.median,type="o",col=col.sta[1],pch=16,lwd=2.0) + for (r in 1:nrate){ + lines(x=x.years,y=ed2.median[[r]],type="o",col=col.ed2[r,1] + ,pch=16,lwd=2.0) + }#end for + #---------------------------------------------------------------------------# + + + #----- Close the device. ---------------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + #---------------------------------------------------------------------------# + }#end for + #------------------------------------------------------------------------------# + + + + + #==============================================================================# + #==============================================================================# + # DBH-LEVEL rates. # + #------------------------------------------------------------------------------# + if (sizetoo){ + cat(" - DBH classes: ",desc.indiv[i],"...","\n") + ed2.rate = paste(this.plot$ed2.rate,"size",sep=".") + sta.rate = paste(this.plot$sta.rate,"size",sep=".") + + + #----- Create a directory for this type of plot. ---------------------------# + outtheme = paste(outsize,theme.now,sep="/") + if (! file.exists(outtheme)) dir.create(outtheme) + #---------------------------------------------------------------------------# + + + #----- Create path for this individual. ------------------------------------# + outindiv = paste(outtheme,indiv[i],sep="/") + if (! file.exists(outindiv)) dir.create(outindiv) + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Find the DBH for x scale. # + #---------------------------------------------------------------------------# + x.years = year4[2:n.census] + xlimit = range(x.years) + #---------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------# + # Define a nice configuration for the multiple panels. # + #---------------------------------------------------------------------------# + lo.box = pretty.box(n=n.dbh,horizontal=TRUE) + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Loop over all formats, and make the plots. # + #---------------------------------------------------------------------------# + for (o in 1:nout){ + #----- Open the file or the plot window. --------------------------------# + fichier = paste(outindiv,"/theme-",theme.now,"-",indiv[i],".",outform[o] + ,sep="") + if(outform[o] == "x11"){ + X11(width=wide.size$width,height=wide.size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=wide.size$width*depth + ,height=wide.size$height*depth,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=wide.size$width,height=wide.size$height + ,pointsize=ptsz,paper=wide.size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE + ,width=wide.size$width,height=wide.size$height,pointsize=ptsz + ,paper=wide.size$paper) + }#end if + #------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------# + # Split the window into several smaller windows. # + #------------------------------------------------------------------------# + par(par.user) + par.orig = par(no.readonly = TRUE) + par(oma = c(0.2,3,4,0)) + layout(mat = rbind(1+lo.box$mat,rep(1,times=lo.box$ncol)) + ,height = c(rep(5/lo.box$nrow,times=lo.box$nrow),1) + )#end layout + #------------------------------------------------------------------------# + + + + #----- Plot legend. -----------------------------------------------------# + par(mar=c(0.1,0.1,0.1,0.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + if (ed22.ci){ + legend ( x = "bottom" + , legend = c("Observed",rep("",times=nrate-1),desc.rate) + , fill = c(col.sta[2],rep(0,times=nrate-1),col.ed2[,2]) + , border = c(col.sta[2],rep(0,times=nrate-1),col.ed2[,2]) + , col = c(col.sta[1],rep(0,times=nrate-1),col.ed2[,1]) + , lwd = c(2.0,rep(0,times=nrate-1),rep(2,0,times=nrate)) + , pt.cex = c(1.0,rep(0,times=nrate-1),rep(1.0,times=nrate)) + , angle = c(90,rep(0,times=nrate-1),angle) + , density = c(40,rep(0,times=nrate-1),dens) + , ncol = 2 + , title = "(Shaded - 95% C.I.)" + , cex = 0.85 + , xpd = TRUE + )#end legend + }else{ + legend ( x = "bottom" + , legend = c("Observed",rep("",times=nrate-1),desc.rate) + , fill = c(col.sta[2],rep(0,times=nrate+1)) + , border = c(col.sta[2],rep(0,times=nrate+1)) + , col = c(col.sta[1],rep(0,times=nrate-1),col.ed2[,1]) + , lwd = c(2.0,rep(0,times=nrate-1),rep(2,0,times=nrate)) + , pt.cex = c(1.0,rep(0,times=nrate-1),rep(1.0,times=nrate)) + , angle = c(90,rep(0,times=nrate+1)) + , density = c(40,rep(0,times=nrate+1)) + , ncol = 2 + , title = "(Shaded - 95% C.I.)" + , cex = 0.85 + , xpd = TRUE + )#end legend + }#end if + #------------------------------------------------------------------------# + + + + + #------------------------------------------------------------------------# + # Loop over all DBH classes. # + #------------------------------------------------------------------------# + for (d in 1:n.dbh){ + left = (d %% lo.box$ncol) == 1 + right = (d %% lo.box$ncol) == 0 + top = d <= lo.box$ncol + bottom = d > (lo.box$nrow - 1) * lo.box$ncol + + + + + #----- Load the modelled rates. --------------------------------------# + sta.mod = sta[[sta.rate]][[indiv[i]]]$global + sta.median = 100. * sta.mod[4,d,2:n.census] + sta.q025 = 100. * sta.mod[5,d,2:n.census] + sta.q975 = 100. * sta.mod[6,d,2:n.census] + ed2.median = list() + ed2.q025 = list() + ed2.q975 = list() + for (r in 1:nrate){ + ed2.mod = ed2[[ed2.rate[r]]][[indiv[i]]]$global + ed2.median[[r]] = 100. * ed2.mod[4,d,2:n.census] + ed2.q025 [[r]] = 100. * ed2.mod[5,d,2:n.census] + ed2.q975 [[r]] = 100. * ed2.mod[6,d,2:n.census] + }#end for + #---------------------------------------------------------------------# + + + + if (ed22.ci){ + #------------------------------------------------------------------# + # Find the plot limit for the y scale. # + #------------------------------------------------------------------# + yuse = c(unlist(ed2.q025),unlist(ed2.q975),sta.q025,sta.q975) + ylimit = pretty.xylim(yuse,fracexp=0.0,is.log=ylog) + #------------------------------------------------------------------# + + + + #------------------------------------------------------------------# + # Make the polygons. # + #------------------------------------------------------------------# + size.poly = list() + size.poly$x = c(x.years ,rev(x.years) ) + size.poly$y = c(sta.q025,rev(sta.q975)) + size.poly$col = c(col.sta[2] ) + for (r in sequence(nrate)){ + plot.poly$x = c(plot.poly$x ,NA + ,x.years ,rev(x.years) ) + plot.poly$y = c(plot.poly$y ,NA + ,ed2.q025[[r]],rev(ed2.q975[[r]])) + plot.poly$col = c(plot.poly$col,col.ed2[r,2]) + }#end for + #------------------------------------------------------------------# + }else{ + #------------------------------------------------------------------# + # Find the plot limit for the y scale. # + #------------------------------------------------------------------# + yuse = c(ed2.median[d,],sta.q025,sta.q975) + ylimit = pretty.xylim(yuse,fracexp=0.0,is.log=ylog) + #------------------------------------------------------------------# + + + + #------------------------------------------------------------------# + # Make the polygons. # + #------------------------------------------------------------------# + size.poly = list() + size.poly$x = c(x.years ,rev(x.years) ) + size.poly$y = c(sta.q025 ,rev(sta.q975) ) + size.poly$col = c(col.sta[2]) + #------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------# + + + #----- Set up the title and axes labels. -----------------------------# + lesub = paste("DBH class:",dbh.names[d],sep="") + #---------------------------------------------------------------------# + + + #----- Plot the box plot. --------------------------------------------# + par(mar=c(2,2,4,1)+0.1) + #----- Plotting window and grid. -------------------------------------# + plot.new() + plot.window(xlim=xlimit,ylim=ylimit,log=plog) + axis(side=1) + axis(side=2) + box() + title(main=lesub,xlab="",ylab="") + if (plotgrid) grid(col=grid.colour,lty="solid") + #----- Plot the taxon rate with confidence interval. -----------------# + epolygon(x=size.poly$x,y=size.poly$y,col=size.poly$col + ,angle=c(90,angle),density=c(40,dens),lty="solid",lwd=1.0) + lines(x=x.years,y=sta.median,type="o",pch=16,lwd=2.0 + ,col=col.sta[1]) + for (r in sequence(nrate)){ + lines(x=x.years,y=ed2.median[[r]],type="o",pch=16,lwd=2.0 + ,col=col.ed2[r,1]) + }#end for + #---------------------------------------------------------------------# + }#end for (d in 1:n.dbh) + #------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------# + # Make the title and axis labels. # + #------------------------------------------------------------------------# + letitre = paste(theme.desc,": ",lieu,sep="") + ley = paste(theme.desc," [% ",desc.indiv[i],"]",sep="") + lex = "Census" + #------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------# + # Split the plotting window. # + #------------------------------------------------------------------------# + par(las=0) + mtext(text=lex ,side=1,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) + mtext(text=ley ,side=2,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) + mtext(text=letitre,side=3,outer=TRUE,cex=cex.main,font=2) + par(par.orig) + #------------------------------------------------------------------------# + + + + #----- Close the device. ------------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + #------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------# + }#end if #------------------------------------------------------------------------------# - # Find the plot limit for the y scale. # + }#end for + #---------------------------------------------------------------------------------# + }#end for + #====================================================================================# + #====================================================================================# + + + + + + #====================================================================================# + #====================================================================================# + # 8. Plot the time series of the rates (by DBH class if applicable). # + #====================================================================================# + #====================================================================================# + for (n in 1:npratets){ + this.plot = pratets[[n]] + sizetoo = this.plot$sizetoo + desc.rate = this.plot$desc.rate + unit.rate = this.plot$unit.rate + col.ed2 = this.plot$col.ed2 + col.sta = this.plot$col.sta + indiv = this.plot$indiv + desc.indiv = this.plot$desc.indiv + colnow = this.plot$colour + legpos = this.plot$legpos + plog = this.plot$plog + ylog = length(grep("y",plog)) > 0 + + nindiv = length(indiv) + + cat(" + Plotting time series of ",desc.rate,"...","\n") + #---------------------------------------------------------------------------------# + # Loop over all possible types of population count. # + #---------------------------------------------------------------------------------# + for (i in 1:nindiv){ + #==============================================================================# + #==============================================================================# + # PLOT-LEVEL rates. # #------------------------------------------------------------------------------# - yuse = c(sta.q025,sta.q975,ed2.q025,ed2.q975) - ylimit = pretty.xylim(u=yuse,fracexp=scalleg,is.log=ylog) + cat(" - Plot level: ",desc.indiv[i],"...","\n") + ed2.rate = paste(this.plot$ed2.rate,"plot",sep=".") + sta.rate = paste(this.plot$sta.rate,"plot",sep=".") + + + #----- Create a directory for this type of plot. ------------------------------# + outrate = paste(outplot,ed2.rate,sep="/") + if (! file.exists(outrate)) dir.create(outrate) #------------------------------------------------------------------------------# + #----- Create path for this individual. ---------------------------------------# + outindiv = paste(outrate,indiv[i],sep="/") + if (! file.exists(outindiv)) dir.create(outindiv) + #------------------------------------------------------------------------------# + + + #----- Load the modelled rates. -----------------------------------------------# + sta.mod = sta[[sta.rate]][[indiv[i]]]$global + sta.median = 100. * sta.mod[4,2:n.census] + sta.q025 = 100. * sta.mod[5,2:n.census] + sta.q975 = 100. * sta.mod[6,2:n.census] + ed2.mod = ed2[[ed2.rate]][[indiv[i]]]$global + ed2.median = 100. * ed2.mod[4,2:n.census] + ed2.q025 = 100. * ed2.mod[5,2:n.census] + ed2.q975 = 100. * ed2.mod[6,2:n.census] + #------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------# + # Find the DBH for x scale. # + #------------------------------------------------------------------------------# + x.years = year4[2:n.census] + xlimit = range(x.years) + #------------------------------------------------------------------------------# + + + if (ed22.ci){ + #---------------------------------------------------------------------------# + # Make the polygons. # + #---------------------------------------------------------------------------# + plot.poly = list() + plot.poly$x = c(x.years ,rev(x.years) ,NA,x.years ,rev(x.years) ) + plot.poly$y = c(sta.q025,rev(sta.q975),NA,ed2.q025,rev(ed2.q975)) + plot.poly$col = c(col.sta[2],col.ed2[2]) + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Find the plot limit for the y scale. # + #---------------------------------------------------------------------------# + yuse = c(sta.q025,sta.q975,ed2.q025,ed2.q975) + ylimit = pretty.xylim(u=yuse,fracexp=scalleg,is.log=ylog) + #---------------------------------------------------------------------------# + }else{ + #---------------------------------------------------------------------------# + # Make the polygons. # + #---------------------------------------------------------------------------# + plot.poly = list() + plot.poly$x = c(x.years ,rev(x.years) ) + plot.poly$y = c(sta.q025,rev(sta.q975)) + plot.poly$col = col.sta[2] + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Find the plot limit for the y scale. # + #---------------------------------------------------------------------------# + yuse = c(sta.q025,sta.q975,ed2.median) + ylimit = pretty.xylim(u=yuse,fracexp=scalleg,is.log=ylog) + #---------------------------------------------------------------------------# + }#end if + #------------------------------------------------------------------------------# + #------------------------------------------------------------------------------# @@ -1954,6 +2749,53 @@ for (place in myplaces){ ,width=size$width,height=size$height,pointsize=ptsz,paper=size$paper) }#end if #---------------------------------------------------------------------------# + + par(par.user) + layout(mat=rbind(2,1),heights=c(5,1)) + + + + #----- Plot legend. --------------------------------------------------------# + if (ed22.ci){ + par(mar=c(0.1,0.1,0.1,0.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + legend ( x = "bottom" + , legend = c("Census","ED-2.2") + , fill = c(col.sta[2],col.ed2[2]) + , border = c(col.sta[2],col.ed2[2]) + , col = c(col.sta[1],col.ed2[1]) + , lwd = 2.0 + , pt.cex = 1.0 + , angle = c(-45,45) + , density = c( 40,40) + , bg = background + , ncol = 2 + , title = "(Shaded - 95% C.I.)" + , cex = 0.85 + , xpd = TRUE + )#end legend + }else{ + par(mar=c(0.1,0.1,0.1,0.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + legend ( x = "bottom" + , legend = c("Census","ED-2.2") + , fill = c(col.sta[2], 0) + , border = c(col.sta[2], 0) + , col = c(col.sta[1],col.ed2[1]) + , lwd = 2.0 + , pt.cex = 1.0 + , angle = c(-45,45) + , density = c( 40,40) + , bg = background + , ncol = 2 + , title = "(Shaded - 95% C.I.)" + , cex = 0.85 + , xpd = TRUE + )#end legend + }#end if + #---------------------------------------------------------------------------# @@ -1970,32 +2812,16 @@ for (place in myplaces){ #---------------------------------------------------------------------------# # Go on and plot stuff. # #---------------------------------------------------------------------------# + par(mar=c(5,4,4,2)+0.1) #----- Plotting window and grid. -------------------------------------------# plot(x=x.years,y=sta.median,xlim=xlimit,ylim=ylimit,type="n",main=letitre ,xlab=lex,ylab=ley,log=plog,cex.main=0.7) - if (plotgrid) grid(col="grey83",lty="solid") + if (plotgrid) grid(col=grid.colour,lty="solid") #----- Plot the taxon rate with confidence interval. -----------------------# - epolygon(x=plot.poly,col=c(col.sta[2],col.ed2[2]),angle=c(-45,45) + epolygon(x=plot.poly$x,y=plot.poly$y,col=plot.poly$col,angle=c(-45,45) ,density=40,lty="solid",lwd=1.0) lines(x=x.years,y=sta.median,type="o",col=col.sta[1],pch=16,lwd=2.0) lines(x=x.years,y=ed2.median,type="o",col=col.ed2[1],pch=16,lwd=2.0) - #----- Plot legend. --------------------------------------------------------# - legend ( x = legpos - , inset = 0.01 - , legend = c("Census","ED-2.2") - , fill = c(col.sta[2],col.ed2[2]) - , border = c(col.sta[2],col.ed2[2]) - , col = c(col.sta[1],col.ed2[1]) - , lwd = 2.0 - , pt.cex = 1.0 - , angle = c(-45,45) - , density = c( 40,40) - , bg = "white" - , ncol = 2 - , title = "(Shaded - 95% C.I.)" - , cex = 1.0 - )#end legend - #---------------------------------------------------------------------------# #----- Close the device. ---------------------------------------------------# @@ -2090,6 +2916,7 @@ for (place in myplaces){ #------------------------------------------------------------------------# # Split the window into several smaller windows. # #------------------------------------------------------------------------# + par(par.user) par.orig = par(no.readonly = TRUE) par(oma = c(0.2,3,4,0)) layout(mat = rbind(1+lo.box$mat,rep(1,times=lo.box$ncol)) @@ -2103,21 +2930,39 @@ for (place in myplaces){ par(mar=c(0.1,0.1,0.1,0.1)) plot.new() plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") - legend ( x = "bottom" - , inset = 0.01 - , legend = c("Census","ED-2.2") - , fill = c(col.sta[2],col.ed2[2]) - , border = c(col.sta[2],col.ed2[2]) - , col = c(col.sta[1],col.ed2[1]) - , lwd = 2.0 - , pt.cex = 1.0 - , angle = c(-45,45) - , density = c( 40,40) - , bg = "white" - , ncol = 2 - , title = "(Shaded - 95% C.I.)" - , cex = 1.0 - )#end legend + if (ed22.ci){ + legend ( x = "bottom" + , inset = 0.01 + , legend = c("Census","ED-2.2") + , fill = c(col.sta[2],col.ed2[2]) + , border = c(col.sta[2],col.ed2[2]) + , col = c(col.sta[1],col.ed2[1]) + , lwd = 2.0 + , pt.cex = 1.0 + , angle = c(-45,45) + , density = c( 40,40) + , bg = background + , ncol = 2 + , title = "(Shaded - 95% C.I.)" + , cex = 0.85 + )#end legend + }else{ + legend ( x = "bottom" + , inset = 0.01 + , legend = c("Census","ED-2.2") + , fill = c(col.sta[2], 0) + , border = c(col.sta[2], 0) + , col = c(col.sta[1],col.ed2[1]) + , lwd = 2.0 + , pt.cex = 1.0 + , angle = c(-45,45) + , density = c( 40,40) + , bg = background + , ncol = 2 + , title = "(Shaded - 95% C.I.)" + , cex = 0.85 + )#end legend + }#end if #------------------------------------------------------------------------# @@ -2132,26 +2977,46 @@ for (place in myplaces){ top = d <= lo.box$ncol bottom = d > (lo.box$nrow - 1) * lo.box$ncol + if (ed22.ci){ + #------------------------------------------------------------------# + # Find the plot limit for the y scale. # + #------------------------------------------------------------------# + yuse = c(ed2.q025[d,],ed2.q975[d,],sta.q025[d,],sta.q975[d,]) + ylimit = pretty.xylim(yuse,fracexp=0.0,is.log=ylog) + #------------------------------------------------------------------# + - #---------------------------------------------------------------------# - # Find the plot limit for the y scale. # - #---------------------------------------------------------------------# - yuse = c(ed2.q025[d,],ed2.q975[d,],sta.q025[d,],sta.q975[d,]) - ylimit = pretty.xylim(yuse,fracexp=0.0,is.log=ylog) - #---------------------------------------------------------------------# + + #------------------------------------------------------------------# + # Make the polygons. # + #------------------------------------------------------------------# + size.poly = list() + size.poly$x = c(x.years ,rev(x.years) ,NA + ,x.years ,rev(x.years) ) + size.poly$y = c(sta.q025[d,],rev(sta.q975[d,]),NA + ,ed2.q025[d,],rev(ed2.q975[d,]) ) + size.poly$col = c(col.sta[2] ,col.ed2[2] ) + #------------------------------------------------------------------# + }else{ + #------------------------------------------------------------------# + # Find the plot limit for the y scale. # + #------------------------------------------------------------------# + yuse = c(ed2.median[d,],sta.q025[d,],sta.q975[d,]) + ylimit = pretty.xylim(yuse,fracexp=0.0,is.log=ylog) + #------------------------------------------------------------------# + #------------------------------------------------------------------# + # Make the polygons. # + #------------------------------------------------------------------# + size.poly = list() + size.poly$x = c(x.years ,rev(x.years) ) + size.poly$y = c(sta.q025[d,],rev(sta.q975[d,]) ) + size.poly$col = c(col.sta[2] ) + #------------------------------------------------------------------# + }#end if #---------------------------------------------------------------------# - # Make the polygons. # - #---------------------------------------------------------------------# - size.poly = list() - size.poly$x = c(x.years ,rev(x.years) ,NA - ,x.years ,rev(x.years) ) - size.poly$y = c(sta.q025[d,],rev(sta.q975[d,]),NA - ,ed2.q025[d,],rev(ed2.q975[d,]) ) - #---------------------------------------------------------------------# - #----- Set up the title and axes labels. -----------------------------# @@ -2168,9 +3033,9 @@ for (place in myplaces){ axis(side=2) box() title(main=lesub,xlab="",ylab="") - if (plotgrid) grid(col="grey83",lty="solid") + if (plotgrid) grid(col=grid.colour,lty="solid") #----- Plot the taxon rate with confidence interval. -----------------# - epolygon(x=size.poly,col=c(col.sta[2],col.ed2[2]),angle=c(-45,45) + epolygon(x=size.poly$x,y=size.poly$y,col=size.poly$col,angle=c(-45,45) ,density=40,lty="solid",lwd=1.0) lines(x=x.years,y=sta.median[d,],type="o",pch=16,lwd=2.0 ,col=col.sta[1]) @@ -2409,6 +3274,7 @@ for (place in myplaces){ #----- Plot the parameter space. -------------------------------------------# + par(par.user) xyz.plot( x = xvar.plot , y = yvar.plot , z = zvar @@ -2426,17 +3292,16 @@ for (place in myplaces){ , xyz.ylab = list(text=ley,adj=mtext.yadj,padj=mtext.yoff) , key.title = list(main=lez,cex.main=0.8) , key.log = zlog - , xyz.more = list(grid=list(col="grey62",lty="solid")) + , xyz.more = list(grid=list(col=grid.colour,lty="solid")) , xyz.legend = list( x = "bottom" , inset = 0.01 , legend = pspace$leg.label - , col = "black" - , bg = "white" + , col = foreground + , bg = background , pch = pspace$leg.pch , title = "Census" - , ncol = 2 - , pt.cex = 1./0.9 - , cex = 0.9 + , ncol = 3 + , cex = 1.0 )#end legend )#end xyz.plot #---------------------------------------------------------------------------# @@ -2493,6 +3358,7 @@ for (place in myplaces){ #----- Plot the parameter space. ----------------------------------------# + par(par.user) xyz.plot( x = xuse.size , y = yuse.size , z = zvar @@ -2508,17 +3374,16 @@ for (place in myplaces){ , xyz.ylab = list(text=ley,adj=mtext.yadj,padj=mtext.yoff) , key.title = list(main=lez,cex.main=0.8) , key.log = zlog - , xyz.more = list(grid=list(col="grey62",lty="solid")) + , xyz.more = list(grid=list(col=grid.colour,lty="solid")) , xyz.legend = list( x = "bottom" , inset = 0.01 , legend = pspace$leg.label - , col = "black" - , bg = "white" + , col = foreground + , bg = background , pch = pspace$leg.pch , title = "Census" - , ncol = 2 - , pt.cex = 1./0.9 - , cex = 0.9 + , ncol = 3 + , cex = 1.0 )#end legend )#end xyz.plot #------------------------------------------------------------------------# @@ -2546,5 +3411,3 @@ for (place in myplaces){ #---------------------------------------------------------------------------------------# }#end for places #------------------------------------------------------------------------------------------# - -#q("no") diff --git a/ED/Template/Template/plot_daily.r b/ED/Template/Template/plot_daily.r index c1b0da3da..eb65751dc 100644 --- a/ED/Template/Template/plot_daily.r +++ b/ED/Template/Template/plot_daily.r @@ -34,17 +34,16 @@ hovgrid = TRUE # Should I include a grid on the Hovmoller plots legwhere = "topleft" # Where should I place the legend? inset = 0.05 # inset distance between legend and edge of plot region. -legbg = "white" # Legend background colour. theta = 315. phi = 30. ltheta = -210. shade = 0.125 expz = 0.5 -gcol = c("lightblue","white") cexmin = 0.5 cexmax = 3.0 fullonly = FALSE +ibackground = mybackground # Background settings (check load_everything.r) #------------------------------------------------------------------------------------------# #------------------------------------------------------------------------------------------# @@ -89,7 +88,7 @@ hovdi02 = list(vnam = c("sens","evap","transp") ,plt = TRUE) hovdi03 = list(vnam = c("atm.temp","can.temp","leaf.temp","wood.temp","soil.temp") ,desc = c("Atmosphere","Canopy air","Leaf","Wood","Soil (Top)") - ,colour = c("deepskyblue","gray21","chartreuse","goldenrod","sienna") + ,colour = c("deepskyblue","grey45","chartreuse","goldenrod","sienna") ,prefix = "temperature" ,theme = "Temperature" ,unit = "degC" @@ -97,7 +96,7 @@ hovdi03 = list(vnam = c("atm.temp","can.temp","leaf.temp","wood.temp","soil.te ,plt = TRUE) hovdi04 = list(vnam = c("atm.shv","can.shv") ,desc = c("Atmosphere","Canopy air") - ,colour = c("deepskyblue","gray21") + ,colour = c("deepskyblue","grey45") ,prefix = "h2ovapour" ,theme = "Water vapour mixing ratio" ,unit = "g/kg" @@ -105,41 +104,33 @@ hovdi04 = list(vnam = c("atm.shv","can.shv") ,plt = TRUE) -#----- Loading some packages. -------------------------------------------------------------# -library(hdf5) -library(chron) -library(scatterplot3d) -library(lattice) -library(maps) -library(mapdata) -library(akima) -library(fields) -#----- Close all graphics devices. --------------------------------------------------------# -graphics.off() + +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +# NO NEED TO CHANGE ANYTHING BEYOND THIS POINT UNLESS YOU ARE DEVELOPING THE CODE... # +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# + + +#----- Loading some packages and scripts. -------------------------------------------------# +source(file.path(srcdir,"load.everything.r")) +#------------------------------------------------------------------------------------------# + #----- Setting how many formats we must output. -------------------------------------------# outform = tolower(outform) nout = length(outform) nplaces = length(myplaces) -#----- Avoiding unecessary and extremely annoying beeps. ----------------------------------# -options(locatorBell=FALSE) - -#----- Loading some files with functions. -------------------------------------------------# -source(paste(srcdir,"atlas.r" ,sep="/")) -source(paste(srcdir,"globdims.r" ,sep="/")) -source(paste(srcdir,"locations.r" ,sep="/")) -source(paste(srcdir,"muitas.r" ,sep="/")) -source(paste(srcdir,"plotsize.r" ,sep="/")) -source(paste(srcdir,"pretty.log.r" ,sep="/")) -source(paste(srcdir,"pretty.time.r",sep="/")) -source(paste(srcdir,"rconstants.r" ,sep="/")) -source(paste(srcdir,"sombreado.r" ,sep="/")) -source(paste(srcdir,"southammap.r" ,sep="/")) -source(paste(srcdir,"thermlib.r" ,sep="/")) -source(paste(srcdir,"timeutils.r" ,sep="/")) - #----- Define some default legend colours and names. --------------------------------------# pftnames = c("C4 Grass","Early Tropical","Mid Tropical","Late Tropical","Temp. C3 Grass" ,"North Pine","South Pine","Late Conifer","Early Temperate","Mid Temperate" @@ -147,11 +138,11 @@ pftnames = c("C4 Grass","Early Tropical","Mid Tropical","Late Tropical","Temp. C ,"C3 Grass","Araucaria","Total") pftcols = c("gold","chartreuse","limegreen","darkgreen","purple3" ,"deepskyblue","aquamarine","midnightblue","darkorange3","sienna" - ,"firebrick","orchid","coral","gray45","olivedrab" - ,"goldenrod","steelblue","gray22") + ,"firebrick","orchid","coral","grey45","olivedrab" + ,"goldenrod","steelblue","grey22") lunames = c("Agricultural","Secondary","Primary","Total") -lucols = c("goldenrod","chartreuse","darkgreen","gray22") +lucols = c("goldenrod","chartreuse","darkgreen","grey22") distnames = c("Agr->Agr" ,"2nd->Agr" ,"Prim->Agr" ,"Agr->2nd" ,"2nd->2nd" ,"Prim->2nd" @@ -646,6 +637,7 @@ for (l in 1:nplaces){ letitre = paste(description,p$lieu,sep=" - ") cols = pftcols[selpft] legs = pftnames[selpft] + par(par.user) plot(thisday,thisvar[,1],type="n",main=letitre,ylim=ylimit ,xlab="Time",xaxt="n",ylab=unit) axis(side=1,at=whenplot$levels,labels=whenplot$labels,padj=whenplot$padj) @@ -792,6 +784,7 @@ for (l in 1:nplaces){ lezlab = paste(description," [",unit,"]",sep="") #----- First plot: the box. ------------------------------------------------# + par(par.user) pout = persp(x=ageaxis,y=dbhaxis,z=flooraxis,xlim=xlimit,ylim=ylimit ,zlim=zlimit,theta=theta,phi=phi,col=gcol,expand=expz ,ticktype="detailed",border=NA,xlab="Gap age[yr]" @@ -799,11 +792,11 @@ for (l in 1:nplaces){ ,main=letitre) #----- Second plot, the actual data (aka my lollipop trees). ---------------# lines (trans3d(x=agem2y4,y=dbhm2y4,z=varm2y4,pmat=pout),type="l" - ,col="gray29",lwd=2) + ,col=grey.fg,lwd=2) points(trans3d(x=agem2y4,y=dbhm2y4,z=varm2y4,pmat=pout),type="p" ,pch=pchm2y4,col=colm2y4,cex=cexm2y4) legend(x="bottomright",inset=0.01,legend=pftleg,fill=colleg - ,ncol=1,bg="white",cex=0.9) + ,ncol=1,bg=background,cex=0.9) if (outform[o] == "x11"){ locator(n=1) dev.off() @@ -870,6 +863,7 @@ for (l in 1:nplaces){ letitre = paste(theme," - ",p$lieu, " \n"," Time series of daily averages: ",theme,sep="") + par(par.user) plot(x=thisday,y=p[[vnames[1]]],type="n",main=letitre,xlab="Day", ylim=ylimit,ylab=paste("[",unit,"]",sep="")) if (hovgrid) grid(col="lightgray",lty="dotted") diff --git a/ED/Template/Template/plot_eval_ed.r b/ED/Template/Template/plot_eval_ed.r index a46ce8d0b..9040d9e31 100644 --- a/ED/Template/Template/plot_eval_ed.r +++ b/ED/Template/Template/plot_eval_ed.r @@ -56,9 +56,9 @@ plotgrid = TRUE # Should I plot the grid in the background? legwhere = "topleft" # Where should I place the legend? inset = 0.01 # inset distance between legend and edge of plot region. -legbg = "white" # Legend background colour. scalleg = 0.20 cex.main = 0.8 # Scale coefficient for the title +ibackground = mybackground # Background settings (check load_everything.r) #------------------------------------------------------------------------------------------# @@ -126,7 +126,7 @@ compvar = list() compvar[[ 1]] = list( vnam = "hflxca" , desc = "Sensible heat flux" , unit = "[W/m2]" - , col.obser = c("grey42","grey21") + , col.obser = c(grey.bg,grey.fg) , col.model = c("orange1","chocolate4") , leg.corner = "topleft" , sunvar = FALSE @@ -134,7 +134,7 @@ compvar[[ 1]] = list( vnam = "hflxca" compvar[[ 2]] = list( vnam = "wflxca" , desc = "Water vapour flux" , unit = "[kg/m2/day]" - , col.obser = c("grey42","grey21") + , col.obser = c(grey.bg,grey.fg) , col.model = c("deepskyblue","royalblue4") , leg.corner = "topleft" , sunvar = FALSE @@ -142,7 +142,7 @@ compvar[[ 2]] = list( vnam = "wflxca" compvar[[ 3]] = list( vnam = "cflxca" , desc = "Carbon dioxide flux" , unit = "[umol/m2/s]" - , col.obser = c("grey42","grey21") + , col.obser = c(grey.bg,grey.fg) , col.model = c("chartreuse2","darkgreen") , leg.corner = "bottomright" , sunvar = FALSE @@ -150,7 +150,7 @@ compvar[[ 3]] = list( vnam = "cflxca" compvar[[ 4]] = list( vnam = "cflxst" , desc = "Carbon dioxide storage" , unit = "[umol/m2/s]" - , col.obser = c("grey42","grey21") + , col.obser = c(grey.bg,grey.fg) , col.model = c("lightgoldenrod3","darkorange1") , leg.corner = "topleft" , sunvar = FALSE @@ -158,7 +158,7 @@ compvar[[ 4]] = list( vnam = "cflxst" compvar[[ 5]] = list( vnam = "gpp" , desc = "Gross primary productivity" , unit = "[kgC/m2/yr]" - , col.obser = c("grey42","grey21") + , col.obser = c(grey.bg,grey.fg) , col.model = c("green3","darkgreen") , leg.corner = "topleft" , sunvar = TRUE @@ -166,7 +166,7 @@ compvar[[ 5]] = list( vnam = "gpp" compvar[[ 6]] = list( vnam = "reco" , desc = "Ecosystem respiration" , unit = "[kgC/m2/yr]" - , col.obser = c("grey42","grey21") + , col.obser = c(grey.bg,grey.fg) , col.model = c("yellow3","peru") , leg.corner = "topleft" , sunvar = FALSE @@ -174,7 +174,7 @@ compvar[[ 6]] = list( vnam = "reco" compvar[[ 7]] = list( vnam = "nep" , desc = "Net ecosystem productivity" , unit = "[kgC/m2/yr]" - , col.obser = c("grey42","grey21") + , col.obser = c(grey.bg,grey.fg) , col.model = c("olivedrab2","darkolivegreen4") , leg.corner = "topleft" , sunvar = FALSE @@ -182,7 +182,7 @@ compvar[[ 7]] = list( vnam = "nep" compvar[[ 8]] = list( vnam = "nee" , desc = "Net ecosystem exchange" , unit = "[umol/m2/s]" - , col.obser = c("grey42","grey21") + , col.obser = c(grey.bg,grey.fg) , col.model = c("chartreuse","chartreuse4") , leg.corner = "bottomright" , sunvar = FALSE @@ -190,7 +190,7 @@ compvar[[ 8]] = list( vnam = "nee" compvar[[ 9]] = list( vnam = "ustar" , desc = "Friction velocity" , unit = "[m/s]" - , col.obser = c("grey42","grey21") + , col.obser = c(grey.bg,grey.fg) , col.model = c("mediumpurple1","purple4") , leg.corner = "topleft" , sunvar = FALSE @@ -198,7 +198,7 @@ compvar[[ 9]] = list( vnam = "ustar" compvar[[10]] = list( vnam = "rlongup" , desc = "Outgoing longwave radiation" , unit = "[W/m2]" - , col.obser = c("grey42","grey21") + , col.obser = c(grey.bg,grey.fg) , col.model = c("gold","orangered") , leg.corner = "topleft" , sunvar = FALSE @@ -206,7 +206,7 @@ compvar[[10]] = list( vnam = "rlongup" compvar[[11]] = list( vnam = "rnet" , desc = "Net radiation" , unit = "[W/m2]" - , col.obser = c("grey42","grey21") + , col.obser = c(grey.bg,grey.fg) , col.model = c("gold","orangered") , leg.corner = "topleft" , sunvar = FALSE @@ -214,7 +214,7 @@ compvar[[11]] = list( vnam = "rnet" compvar[[12]] = list( vnam = "albedo" , desc = "Albedo" , unit = "[--]" - , col.obser = c("grey42","grey21") + , col.obser = c(grey.bg,grey.fg) , col.model = c("orange1","chocolate4") , leg.corner = "topleft" , sunvar = TRUE @@ -222,7 +222,7 @@ compvar[[12]] = list( vnam = "albedo" compvar[[13]] = list( vnam = "parup" , desc = "Outgoing PAR" , unit = "[W/m2]" - , col.obser = c("grey42","grey21") + , col.obser = c(grey.bg,grey.fg) , col.model = c("chartreuse","chartreuse4") , leg.corner = "topleft" , sunvar = TRUE @@ -230,7 +230,7 @@ compvar[[13]] = list( vnam = "parup" compvar[[14]] = list( vnam = "rshortup" , desc = "Outgoing SW" , unit = "[W/m2]" - , col.obser = c("grey42","grey21") + , col.obser = c(grey.bg,grey.fg) , col.model = c("deepskyblue","royalblue3") , leg.corner = "topleft" , sunvar = TRUE @@ -628,23 +628,24 @@ for (place in myplaces){ #---------------------------------------------------------------------------# # Open an empty plotting area. # #---------------------------------------------------------------------------# + par(par.user) plot(x=obser.data$par,y=obser.data$gpp,type="n",main=letitre ,xlab=lex,ylab=ley,cex.main=cex.main,ylim=ylimit) - grid(col="grey76",lty="solid") + grid(col=grid.colour,lty="solid") #----- Add the observations. -----------------------------------------------# - points(x=obser.data$par,y=obser.data$gpp,pch=16,col="grey50") + points(x=obser.data$par,y=obser.data$gpp,pch=16,col=grey.bg) points(x=model.data$par,y=model.data$gpp,pch=16,col="chartreuse") #----- Add the density functions. ------------------------------------------# - lines(x=obser.data$par,y=obser.pred,lwd=3.0,col="grey21") + lines(x=obser.data$par,y=obser.pred,lwd=3.0,col=grey.fg) lines(x=model.data$par,y=model.pred,lwd=3.0,col="chartreuse4") #----- Add the legend. -----------------------------------------------------# legend( x = "topleft" + , bg = background , inset = 0.01 , legend = c("Observation","Fit - Observation","Model","Fit - Model") , pch = c(16,NA,16,NA) , lwd = c(NA, 3,NA, 3) - , col = c("grey50","grey21","chartreuse","chartreuse4") - , bg = "white" + , col = c(grey.bg,grey.fg,"chartreuse","chartreuse4") , cex = 1.0) #---------------------------------------------------------------------------# @@ -1036,9 +1037,10 @@ for (place in myplaces){ #------------------------------------------------------------------# # Open an empty plotting area. # #------------------------------------------------------------------# + par(par.user) plot(x=quant,y=dfunc.obser,type="n",main=letitre,xlab=lex,ylab=ley ,cex.main=cex.main,ylim=ylimit) - grid(col="grey76",lty="solid") + grid(col=grid.colour,lty="solid") #------------------------------------------------------------------# @@ -1060,7 +1062,7 @@ for (place in myplaces){ ,fill =c(col.obser[2],col.model[2]) ,border=c(col.obser[2],col.model[2]) ,angle =c(-45,45),density=30 - ,lwd=2.0,col=c(col.obser[2],col.model[2]),bg="white" + ,lwd=2.0,col=c(col.obser[2],col.model[2]),bg=background ,cex=1.0) #------------------------------------------------------------------# @@ -1130,9 +1132,10 @@ for (place in myplaces){ #------------------------------------------------------------------# # Open an empty plotting area. # #------------------------------------------------------------------# + par(par.user) plot(x=xlimit,y=ylimit,type="n",main=letitre,xlab=lex,ylab=ley ,cex.main=cex.main) - grid(col="grey76",lty="solid") + grid(col=grid.colour,lty="solid") lines(x=qq$y,y=qq$y,type="l",col=col.obser[2],lwd=3.0) points(x=qq$x,y=qq$y,type="p",pch=16,cex=0.8,col=col.model[1]) #------------------------------------------------------------------# @@ -1208,13 +1211,14 @@ for (place in myplaces){ #----- Plot the box plot. -----------------------------------------------# + par(par.user) plot(x=xlimit,y=ylimit,type="n",main=letitre,xlab=lex,ylab=ley ,cex.main=cex.main,xaxt="n") axis(side=1,at=xat,labels=dl.name) - abline(h=axTicks(side=2),v=xgrid,col="grey66",lty="solid") + abline(h=axTicks(side=2),v=xgrid,col=grid.colour,lty="solid") boxplot(x=bp.list,col=bpcolour,notch=TRUE,add=TRUE,show.names=FALSE) - legend(x=leg.corner,inset=0.01,legend=c("Observation","Model"),bg="white" - ,fill=c(col.obser[1],col.model[1])) + legend(x=leg.corner,inset=0.01,legend=c("Observation","Model") + ,bg=background,fill=c(col.obser[1],col.model[1])) #------------------------------------------------------------------------# #------------------------------------------------------------------------# diff --git a/ED/Template/Template/plot_fast.r b/ED/Template/Template/plot_fast.r index 97c0f7411..0871cb651 100644 --- a/ED/Template/Template/plot_fast.r +++ b/ED/Template/Template/plot_fast.r @@ -47,7 +47,6 @@ plotgrid = TRUE # Should I include a grid on the plots? legwhere = "topleft" # Where should I place the legend? inset = 0.05 # inset distance between legend and edge of plot region. -legbg = "white" # Legend background colour. scalleg = 0.32 # Increase in y scale to fit the legend. theta = 315. @@ -55,10 +54,10 @@ phi = 30. ltheta = -210. shade = 0.125 expz = 0.5 -gcol = c("lightblue","white") cexmin = 0.5 cexmax = 3.0 fullonly = FALSE +ibackground = mybackground # Background settings (check load_everything.r) #------------------------------------------------------------------------------------------# #------------------------------------------------------------------------------------------# @@ -78,7 +77,7 @@ hovdi01 = list(vnam = c("gpp","plresp","hetresp") ,plt = TRUE) hovdi02 = list(vnam = c("rsnet","rlong","rlongup","qwflxca","hflxca") ,desc = c("Net SW","LW down","LW up","Latent","Sensible") - ,colour = c("deepskyblue","gray33","goldenrod","midnightblue","firebrick") + ,colour = c("deepskyblue","grey45","goldenrod","midnightblue","firebrick") ,lwd = c(1.5,1.5,1.5,1.5,1.5) ,type = ptype ,prefix = "eneflux" @@ -110,7 +109,7 @@ hovdi04 = list(vnam = c("hflxgc","hflxac","hflxlc","hflxwc") ,plt = TRUE) hovdi05 = list(vnam = c("atm.temp","can.temp","leaf.temp","wood.temp","soil.temp") ,desc = c("Atmosphere","Canopy air","Leaf","Wood","Soil (Top)") - ,colour = c("deepskyblue","gray21","chartreuse","goldenrod","sienna") + ,colour = c("deepskyblue","grey45","chartreuse","goldenrod","sienna") ,lwd = c(1.5,1.5,1.5,1.5) ,type = ptype ,prefix = "temperature" @@ -120,7 +119,7 @@ hovdi05 = list(vnam = c("atm.temp","can.temp","leaf.temp","wood.temp","soil.te ,plt = TRUE) hovdi06 = list(vnam = c("atm.shv","can.shv") ,desc = c("Atmosphere","Canopy air") - ,colour = c("deepskyblue","gray21") + ,colour = c("deepskyblue","grey45") ,lwd = c(1.5,1.5) ,type = ptype ,prefix = "h2ovapour" @@ -161,41 +160,32 @@ hovdi09 = list(vnam = c("prec","intercept","throughfall","wshed") ,plt = TRUE) -#----- Loading some packages. -------------------------------------------------------------# -library(hdf5) -library(chron) -library(scatterplot3d) -library(lattice) -library(maps) -library(mapdata) -library(akima) -library(fields) -#----- In case there is more than one point to be plotted. --------------------------------# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +# NO NEED TO CHANGE ANYTHING BEYOND THIS POINT UNLESS YOU ARE DEVELOPING THE CODE... # +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# + + + +#----- Loading some packages and scripts. -------------------------------------------------# +source(file.path(srcdir,"load.everything.r")) +#------------------------------------------------------------------------------------------# #----- Setting how many formats we must output. -------------------------------------------# outform = tolower(outform) nout = length(outform) nplaces = length(myplaces) -#----- Avoiding unecessary and extremely annoying beeps. ----------------------------------# -options(locatorBell=FALSE) - -#----- Loading some files with functions. -------------------------------------------------# -source(paste(srcdir,"atlas.r" ,sep="/")) -source(paste(srcdir,"globdims.r" ,sep="/")) -source(paste(srcdir,"locations.r" ,sep="/")) -source(paste(srcdir,"muitas.r" ,sep="/")) -source(paste(srcdir,"plotsize.r" ,sep="/")) -source(paste(srcdir,"pretty.log.r" ,sep="/")) -source(paste(srcdir,"pretty.time.r",sep="/")) -source(paste(srcdir,"rconstants.r" ,sep="/")) -source(paste(srcdir,"soil_coms.r" ,sep="/")) -source(paste(srcdir,"sombreado.r" ,sep="/")) -source(paste(srcdir,"southammap.r" ,sep="/")) -source(paste(srcdir,"thermlib.r" ,sep="/")) -source(paste(srcdir,"timeutils.r" ,sep="/")) - #----- Convert frqsum to days, which is the standard unit for time in chron. --------------# frqsum = frqsum / day.sec @@ -208,11 +198,11 @@ pftnames = c("C4 Grass","Early Tropical","Mid Tropical","Late Tropical","Temp. C ,"C3 Grass","Araucaria","Total") pftcols = c("gold","chartreuse","limegreen","darkgreen","purple3" ,"deepskyblue","aquamarine","midnightblue","darkorange3","sienna" - ,"firebrick","orchid","coral","gray45","olivedrab" - ,"goldenrod","steelblue","gray22") + ,"firebrick","orchid","coral","grey45","olivedrab" + ,"goldenrod","steelblue","grey22") lunames = c("Agricultural","Secondary","Primary","Total") -lucols = c("goldenrod","chartreuse","darkgreen","gray22") +lucols = c("goldenrod","chartreuse","darkgreen","grey22") distnames = c("Agr->Agr" ,"2nd->Agr" ,"Prim->Agr" ,"Agr->2nd" ,"2nd->2nd" ,"Prim->2nd" @@ -553,6 +543,7 @@ for (l in 1:nplaces){ letitre = paste(theme," - ",p$lieu, " \n"," Time series of hourly averages: ",theme,sep="") + par(par.user) plot(x=thistime,y=p[[vnames[1]]],type="n",main=letitre,xlab="Day", ylim=ylimit,ylab=paste("[",unit,"]",sep=""),xaxt="n") axis(side=1,at=whenplot$levels,labels=whenplot$labels,padj=whenplot$padj) @@ -563,7 +554,8 @@ for (l in 1:nplaces){ points(x=thistime,y=p[[vnames[l]]],pch=16,col=lcolours[l],cex=1.2 ,type=ptype,lwd=llwd[l]) }#end for - legend(x=legpos,inset=0.05,legend=description,col=lcolours,pch=16,lwd=2) + legend(x=legpos,bg=background,inset=0.05,legend=description,col=lcolours + ,pch=16,lwd=2) if (outform[o] == "x11"){ locator(n=1) dev.off() diff --git a/ED/Template/Template/plot_monthly.r b/ED/Template/Template/plot_monthly.r index 45eb3052d..b8810335f 100644 --- a/ED/Template/Template/plot_monthly.r +++ b/ED/Template/Template/plot_monthly.r @@ -60,7 +60,6 @@ ncolsfc = 80 # Target number of colours for filled co hovgrid = TRUE # Include a grid on the Hovmoller plots? legwhere = "topleft" # Where should I place the legend? inset = 0.01 # Inset between legend and edge of plot region. -legbg = "white" # Legend background colour. scalleg = 0.40 # Expand y limits by this relative amount to fit # the legend cex.main = 0.8 # Scale coefficient for the title @@ -69,7 +68,6 @@ phi = 30. # Vertical angle for perspective project ltheta = -210. # Azimuth angle for light shade = 0.125 # Shade intensity expz = 0.5 # Expansion factor for Z axis -gcol = c("lightblue","white") # Colours for the fifties style floor cexmin = 0.5 # Minimum "head" size of the lollipop cexmax = 3.0 # Maximum "head" size of the lollipop ylnudge = 0.05 # Nudging factor for ylimit @@ -80,6 +78,7 @@ drought.mark = mydroughtmark # Put a background to highlight droughts drought.yeara = mydroughtyeara # First year that has drought drought.yearz = mydroughtyearz # Last year that has drought months.drought = mymonthsdrought # Months with drought +ibackground = mybackground # Background settings (check load_everything.r) #------------------------------------------------------------------------------------------# @@ -1006,6 +1005,7 @@ for (place in myplaces){ letitre = paste(description,lieu,sep=" - ") cols = pft$colour[selpft] legs = pft$name [selpft] + par(par.user) plot(x=datum$tomonth,y=thisvar[,1],type="n",main=letitre,ylim=ylimit ,xlab="Time",xaxt="n",ylab=unit,cex.main=0.7,log=xylog) axis(side=1,at=whenplot8$levels,labels=whenplot8$labels,padj=whenplot8$padj) @@ -1014,12 +1014,12 @@ for (place in myplaces){ for (n in 1:ndrought){ rect(xleft = drought[[n]][1],ybottom = ydrought[1] ,xright = drought[[n]][2],ytop = ydrought[2] - ,col = "grey84",border=NA) + ,col = grid.colour,border=NA) }#end for }#end if if (plotgrid){ - abline(v=whenplot8$levels,h=axTicks(side=2),col="grey52",lty="solid") + abline(v=whenplot8$levels,h=axTicks(side=2),col=grid.colour,lty="solid") }#end if for (n in 1:(npft+1)){ if (selpft[n]){ @@ -1028,7 +1028,7 @@ for (place in myplaces){ }#end for legend( x = legwhere , inset = inset - , bg = legbg + , bg = background , legend = legs , col = cols , lwd = lwidth @@ -1129,6 +1129,7 @@ for (place in myplaces){ }#end if letitre = paste(description,pft$name[p],lieu,sep=" - ") + par(par.user) plot(x=datum$tomonth,y=thisvar[,1,p],type="n",main=letitre,ylim=ylimit ,xlab="Time",xaxt="n",ylab=unit,cex.main=0.7,log=xylog) axis(side=1,at=whenplot8$levels,labels=whenplot8$labels,padj=whenplot8$padj) @@ -1136,18 +1137,18 @@ for (place in myplaces){ for (n in 1:ndrought){ rect(xleft = drought[[n]][1],ybottom = ydrought[1] ,xright = drought[[n]][2],ytop = ydrought[2] - ,col = "grey84",border=NA) + ,col = grid.colour,border=NA) }#end for }#end if if (plotgrid){ - abline(v=whenplot8$levels,h=axTicks(side=2),col="grey52",lty="solid") + abline(v=whenplot8$levels,h=axTicks(side=2),col=grid.colour,lty="solid") }#end if for (d in seq(from=1,to=ndbh+1,by=1)){ lines(datum$tomonth,thisvar[,d,p],type="l",col=dbhcols[d],lwd=lwidth) }#end for legend( x = legwhere , inset = inset - , bg = legbg + , bg = background , legend = dbhnames , col = dbhcols , ncol = min(pretty.box(ndbh+1)$ncol,3) @@ -1288,12 +1289,13 @@ for (place in myplaces){ #----- Load variable ----------------------------------------------------------# letitre = paste(description," - ",lieu,"\n","Monthly mean",sep="") + par(par.user) plot(x=thiswhen,y=thismean,type="n",main=letitre,xlab="Time" ,ylim=ylimit,ylab=paste("[",unit,"]",sep=""),log=plog,xaxt="n" ,cex.main=cex.main) axis(side=1,at=whenplote$levels,labels=whenplote$labels,padj=whenplote$padj) if (plotgrid){ - abline(v=whenplote$levels,h=axTicks(side=2),col="grey52",lty="solid") + abline(v=whenplote$levels,h=axTicks(side=2),col=grid.colour,lty="solid") }#end if points(x=thiswhen,y=thismean,col=lcolours[1],lwd=llwd[1],type=ltype ,pch=16,cex=1.0) @@ -1457,12 +1459,13 @@ for (place in myplaces){ #----- Load variable ----------------------------------------------------------# letitre = paste(description," - ",lieu,"\n","Monthly mean",sep="") + par(par.user) plot(x=montmont,y=thismean,type="n",main=letitre,xlab="Time" ,ylim=ylimit,ylab=paste("[",unit,"]",sep=""),log=plog,xaxt="n" ,cex.main=cex.main) axis(side=1,at=mplot$levels,labels=mplot$labels,padj=mplot$padj) if (plotgrid){ - abline(v=mplot$levels,h=axTicks(side=2),col="grey52",lty="solid") + abline(v=mplot$levels,h=axTicks(side=2),col=grid.colour,lty="solid") }#end if if (plotsd){ if (is.null(obs.x)){ @@ -1494,7 +1497,7 @@ for (place in myplaces){ if (plotsd){ legend(x=legpos,inset=inset,legend=c("Model","Observation") ,fill=errcolours,angle=angle,density=dens,lwd=llwd,col=lcolours - ,bg="white",title="Shaded areas = 1 SD",cex=1.0,pch=16) + ,bg=background,title="Shaded areas = 1 SD",cex=1.0,pch=16) }else{ legend(x=legpos,inset=inset,legend=c("Model","Observation") ,col=lcolours,lwd=llwd,cex=1.0,pch=16) @@ -1656,12 +1659,13 @@ for (place in myplaces){ #----- Load variable -------------------------------------------------------# letitre = paste(description," - ",lieu,"\n" ,"Mean diurnal cycle - ",namemon,sep="") + par(par.user) plot(x=thisday,y=thismean[pmon,],type="n",main=letitre,xlab="Time" ,ylim=ylimit,ylab=paste("[",unit,"]",sep=""),log=plog,xaxt="n" ,cex.main=cex.main) axis(side=1,at=uplot$levels,labels=uplot$labels,padj=uplot$padj) if (plotgrid){ - abline(v=uplot$levels,h=axTicks(side=2),col="grey52",lty="solid") + abline(v=uplot$levels,h=axTicks(side=2),col=grid.colour,lty="solid") }#end if if (plotsd){ mod.x.now = thisday @@ -1708,7 +1712,7 @@ for (place in myplaces){ if (plotsd){ legend(x=legpos,inset=inset,legend=c("Model","Observation") ,fill=errcolours,angle=angle,density=dens,lwd=llwd,col=lcolours - ,bg="white",title="Shaded areas = 1 SD",cex=1.0,pch=16) + ,bg=background,title="Shaded areas = 1 SD",cex=1.0,pch=16) }else{ legend(x=legpos,inset=inset,legend=c("Model","Observation") ,col=lcolours,lwd=llwd,cex=1.0,pch=16) @@ -1796,6 +1800,7 @@ for (place in myplaces){ letitre = paste(description,lieu,sep=" - ") cols = lucols[sellu] legs = lunames[sellu] + par(par.user) plot(datum$tomonth,thisvar[,1],type="n",main=letitre,ylim=ylimit ,xlab="Time",ylab=unit,xaxt="n",cex.main=0.7) axis(side=1,at=whenplot8$levels,labels=whenplot8$labels,padj=whenplot8$padj) @@ -1804,11 +1809,11 @@ for (place in myplaces){ for (n in 1:ndrought){ rect(xleft = drought[[n]][1],ybottom = ydrought[1] ,xright = drought[[n]][2],ytop = ydrought[2] - ,col = "grey84",border=NA) + ,col = grid.colour,border=NA) }#end for }#end if if (plotgrid){ - abline(v=whenplot8$levels,h=axTicks(side=2),col="grey52",lty="solid") + abline(v=whenplot8$levels,h=axTicks(side=2),col=grid.colour,lty="solid") }#end if for (n in 1:(nlu+1)){ if (sellu[n]){ @@ -1817,7 +1822,7 @@ for (place in myplaces){ }#end for legend( x = legwhere , inset = inset - , bg = legbg + , bg = background , legend = legs , col = cols , lwd = lwidth @@ -1880,6 +1885,7 @@ for (place in myplaces){ letitre = paste("Disturbance rates",lieu,sep=" - ") cols = NULL legs = NULL + par(par.user) plot(datum$tomonth,lu$dist[,1,1],type="n",main=letitre,ylim=ylimit ,xlab="Time",ylab="[1/yr]",xaxt="n",cex.main=0.7) axis(side=1,at=whenplot8$levels,labels=whenplot8$labels,padj=whenplot8$padj) @@ -1887,11 +1893,11 @@ for (place in myplaces){ for (n in 1:ndrought){ rect(xleft = drought[[n]][1],ybottom = ydrought[1] ,xright = drought[[n]][2],ytop = ydrought[2] - ,col = "grey84",border=NA) + ,col = grid.colour,border=NA) }#end for }#end if if (plotgrid){ - abline(v=whenplot8$levels,h=axTicks(side=2),col="grey52",lty="solid") + abline(v=whenplot8$levels,h=axTicks(side=2),col=grid.colour,lty="solid") }#end if n = 0 for (jlu in 1:nlu){ @@ -1907,7 +1913,7 @@ for (place in myplaces){ }#end for legend(x = legwhere ,inset = inset - ,bg = legbg + ,bg = background ,legend = legs ,col = cols ,lwd = lwidth @@ -2014,6 +2020,7 @@ for (place in myplaces){ letitre = paste(" Time series: ",group," \n",lieu,sep="") + par(par.user) plot(x=datum$tomonth,y=thisvar,type="n",main=letitre,xlab="Time" ,ylim=ylimit,ylab=paste("[",unit,"]",sep=""),log=xylog,xaxt="n" ,cex.main=cex.main) @@ -2022,11 +2029,11 @@ for (place in myplaces){ for (n in 1:ndrought){ rect(xleft = drought[[n]][1],ybottom = ydrought[1] ,xright = drought[[n]][2],ytop = ydrought[2] - ,col = "grey84",border=NA) + ,col = grid.colour,border=NA) }#end for }#end if if (plotgrid){ - abline(v=whenplot8$levels,h=axTicks(side=2),col="grey52",lty="solid") + abline(v=whenplot8$levels,h=axTicks(side=2),col=grid.colour,lty="solid") }#end if for (l in 1:nlayers){ thisvar = emean[[vnames[l]]] @@ -2136,6 +2143,7 @@ for (place in myplaces){ letitre = paste(" Time series: ",group," \n",lieu,sep="") + par(par.user) plot(x=montmont,y=thisvar,type="n",main=letitre,xlab="Month" ,ylim=ylimit,ylab=paste("[",unit,"]",sep=""),log=xylog,xaxt="n" ,cex.main=cex.main) @@ -2144,11 +2152,11 @@ for (place in myplaces){ for (n in 1:ndrought){ rect(xleft = drought[[n]][1],ybottom = ydrought[1] ,xright = drought[[n]][2],ytop = ydrought[2] - ,col = "grey84",border=NA) + ,col = grid.colour,border=NA) }#end for }#end if if (plotgrid){ - abline(v=mplot$levels,h=axTicks(side=2),col="grey52",lty="solid") + abline(v=mplot$levels,h=axTicks(side=2),col=grid.colour,lty="solid") }#end if for (l in 1:nlayers){ thisvar = mmean[[vnames[l]]] @@ -2257,12 +2265,13 @@ for (place in myplaces){ letitre = paste(group," - ",lieu,"\n" ,"Mean diurnal cycle - ",namemon,sep="") + par(par.user) plot(x=thisday,y=thisvar[pmon,],type="n",main=letitre,xlab="Time" ,ylim=ylimit,ylab=paste("[",unit,"]",sep=""),log=xylog,xaxt="n" ,cex.main=cex.main) axis(side=1,at=uplot$levels,labels=uplot$labels,padj=uplot$padj) if (plotgrid){ - abline(v=uplot$levels,h=axTicks(side=2),col="grey52",lty="solid") + abline(v=uplot$levels,h=axTicks(side=2),col=grid.colour,lty="solid") }#end if for (l in 1:nlayers){ thisvar = umean[[vnames[l]]] @@ -2375,6 +2384,7 @@ for (place in myplaces){ }#end if letitre = paste(description," - ",lieu,sep="") + par(par.user) sombreado(x=monaxis,y=soilaxis,z=varbuff,levels=vlevels,nlevels=vnlev ,colour.palette=get(vcscheme) ,plot.title=title(main=letitre,xlab="Month",ylab="Soil depth [m]" @@ -2384,7 +2394,7 @@ for (place in myplaces){ ,plot.axes={axis(side=1,at=monat,labels=monlab) axis(side=2,at=zat,labels=znice) if (fcgrid){ - abline(h=zat,v=monat,col="grey52",lty="dotted") + abline(h=zat,v=monat,col=grid.colour,lty="dotted") }#end if fcgrid }#end plot.axes ) @@ -2487,6 +2497,7 @@ for (place in myplaces){ }#end if letitre = paste(description," - ",lieu,sep="") + par(par.user) sombreado(x=whenaxis,y=soilaxis,z=varbuff,levels=vlevels,nlevels=vnlev ,colour.palette=get(vcscheme) ,plot.title=title(main=letitre,xlab="Month",ylab="Soil depth [m]" @@ -2497,7 +2508,7 @@ for (place in myplaces){ ,labels=whenplot6$labels,padj=whenplot6$padj) axis(side=2,at=zat,labels=znice) if (fcgrid){ - abline(h=zat,v=whenplot6$levels,col="grey52" + abline(h=zat,v=whenplot6$levels,col=grid.colour ,lty="dotted") }#end if fcgrid }#end plot.axes @@ -2612,6 +2623,7 @@ for (place in myplaces){ }#end if letitre = paste(description," - ",lieu,sep="") + par(par.user) sombreado(x=monaxis,y=yraxis,z=varbuff,levels=vlevels,nlevels=vnlev ,colour.palette=get(vcscheme) ,plot.title=title(main=letitre,xlab="Month",ylab="Year",cex.main=0.7) @@ -2620,10 +2632,10 @@ for (place in myplaces){ axis(side=2,at=yrat) if (fcgrid){ for (yl in yrat){ - abline(h=yl,col="grey52",lty="dotted") + abline(h=yl,col=grid.colour,lty="dotted") } #end for yl for (ml in monat){ - abline(v=ml,col="grey52",lty="dotted") + abline(v=ml,col=grid.colour,lty="dotted") } #end for ml }#end if fcgrid }#end plot.axes @@ -2709,6 +2721,7 @@ for (place in myplaces){ }#end if letitre = paste("Mean diurnal cycle \n ",description," - ",lieu,sep="") + par(par.user) sombreado(x=whenaxis,y=hraxis,z=varbuff,levels=vlevels,nlevels=vnlev ,colour.palette=get(vcscheme) ,plot.title=title(main=letitre,ylab="Time of day (GMT)" @@ -2718,7 +2731,7 @@ for (place in myplaces){ axis(side=2,at=uplot$levels,labels=uplot$labels) if (fcgrid){ abline(v=huplot$levels,h=uplot$levels - ,col="grey52",lty="dotted") + ,col=grid.colour,lty="dotted") }#end if fcgrid }#end plot.axes ) @@ -2779,6 +2792,7 @@ for (place in myplaces){ ylimit = pretty.xylim(u=thisvar,fracexp=0.0,is.log=FALSE) letitre = paste(description,lieu,sep=" - ") + par(par.user) plot(mmonth,thisvar,main=letitre,ylim=ylimit,cex.main=0.7 ,xlab="Time",ylab=paste("[",unit,"]",sep="")) @@ -2849,6 +2863,7 @@ for (place in myplaces){ #------------------------------------------------------------------------------# # Plot the PDF distribution. # #------------------------------------------------------------------------------# + par(par.user) sombreado( x = this$x , y = this$y , z = this$z @@ -2869,7 +2884,7 @@ for (place in myplaces){ if (fcgrid){ abline( v = whenplot8$levels , h = pretty(this$y) - , col = "grey52" + , col = grid.colour , lty = "dotted" )#end abline }#end if fcgrid @@ -2958,6 +2973,7 @@ for (place in myplaces){ #------------------------------------------------------------------------------# # Plot the PDF distribution. # #------------------------------------------------------------------------------# + par(par.user) sombreado( x = this$x , y = this$y , z = this$z @@ -2977,7 +2993,7 @@ for (place in myplaces){ if (fcgrid){ abline( v = monat , h = pretty(this$y) - , col = "grey52" + , col = grid.colour , lty = "dotted" )#end abline }#end if fcgrid @@ -3125,13 +3141,14 @@ for (place in myplaces){ #----- Plot all monthly means together. ------------------------------------# + par(par.user) barplot(height=t(thisvnam[m,,]),names.arg=dbhnames[1:ndbh],width=1.0 ,main=letitre,xlab=lexlab,ylab=leylab,ylim=ylimit,legend.text=FALSE ,beside=(! stacked),col=pftcol.use,log=xylog - ,border="grey23",xpd=FALSE,cex.main=cex.main) + ,border=grey.fg,xpd=FALSE,cex.main=cex.main) if (plotgrid & (! stacked)){ xgrid=0.5+(1:ndbh)*(1+npftuse) - abline(v=xgrid,col="grey46",lty="solid") + abline(v=xgrid,col=grid.colour,lty="solid") }#end if box() legend( x = "topleft" @@ -3141,7 +3158,7 @@ for (place in myplaces){ , ncol = min(3,pretty.box(n.selpft)$ncol) , title = expression(bold("Plant functional type")) , cex = 1.0 - , bg = "white" + , bg = background )#end legend #---------------------------------------------------------------------------# @@ -3303,6 +3320,7 @@ for (place in myplaces){ lezlab = paste(description," [",unit,"]",sep="") #----- First plot: the box. ---------------------------------------------# + par(par.user) pout = persp(x=ageaxis,y=dbhaxis,z=flooraxis,xlim=xlimit,ylim=ylimit ,zlim=zlimit,theta=theta,phi=phi,col=gcol,expand=expz ,ticktype="detailed",border=NA,xlab="Gap age [yr]" @@ -3310,7 +3328,7 @@ for (place in myplaces){ ,main=letitre,cex.main=0.7) #----- Second plot, the actual data (aka my lollipop trees). ------------# lines (trans3d(x=ageww,y=dbhww,z=varww,pmat=pout),type="l" - ,col="grey29",lwd=2) + ,col=grey.fg,lwd=2) points(trans3d(x=ageww,y=dbhww,z=varww,pmat=pout),type="p" ,pch=pchww,col=colww,cex=cexww) legend( x = "bottomright" @@ -3319,7 +3337,7 @@ for (place in myplaces){ , fill = colleg , ncol = 1 , title = expression(bold("PFT")) - , bg = "white" + , bg = background , cex = 0.9 )#end legend diff --git a/ED/Template/Template/plot_photo.r b/ED/Template/Template/plot_photo.r index 478605d6c..741588b37 100644 --- a/ED/Template/Template/plot_photo.r +++ b/ED/Template/Template/plot_photo.r @@ -33,7 +33,6 @@ plotgrid = TRUE # Should I plot the grid in the background? legwhere = "topleft" # Where should I place the legend? inset = 0.05 # inset distance between legend and edge of plot region. -legbg = "white" # Legend background colour. scalleg = 0.32 # Increase in y scale to fit the legend. ncolshov = 200 # Target number of colours for Hovmoller diagrams. @@ -41,6 +40,28 @@ hovgrid = TRUE # Should I include a grid on the Hovmoller plots lai.min = 1.e-5 # Minimum leaf area index nplant.min = 4.e-8 # Minimum nplant. +ibackground = mybackground # Background settings (check load_everything.r) + + + +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +# NO NEED TO CHANGE ANYTHING BEYOND THIS POINT UNLESS YOU ARE DEVELOPING THE CODE... # +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# + + +#----- Loading some packages and scripts. -------------------------------------------------# +source(file.path(srcdir,"load.everything.r")) +#------------------------------------------------------------------------------------------# #------------------------------------------------------------------------------------------# #------------------------------------------------------------------------------------------# @@ -70,7 +91,7 @@ hovdi02 = list(vnam = c("parv","util.parv","parv.min","nirv") ,plt = TRUE) hovdi03 = list(vnam = c("atm.temp","can.temp","leaf.temp","wood.temp","ground.temp") ,desc = c("Atmosphere","Canopy air","Leaf","Wood","Surface") - ,colour = c("deepskyblue","gray21","chartreuse","goldenrod","sienna") + ,colour = c("deepskyblue","grey45","chartreuse","goldenrod","sienna") ,lwd = c(2.0,2.0,2.0,2.0,2.0) ,type = ptype ,prefix = "temperature" @@ -80,7 +101,7 @@ hovdi03 = list(vnam = c("atm.temp","can.temp","leaf.temp","wood.temp","ground. ,plt = TRUE) hovdi04 = list(vnam = c("atm.shv","can.shv","ground.shv","lsfc.shv.clos","lint.shv") ,desc = c("Atmosphere","Canopy air","Ground","Leaf Surface","Intercellular") - ,colour = c("deepskyblue","gray21","sienna","chartreuse","forestgreen") + ,colour = c("deepskyblue","grey45","sienna","chartreuse","forestgreen") ,lwd = c(2.0,2.0,2.0,2.0,2.0) ,type = ptype ,prefix = "h2oclosed" @@ -90,7 +111,7 @@ hovdi04 = list(vnam = c("atm.shv","can.shv","ground.shv","lsfc.shv.clos","lint ,plt = TRUE) hovdi05 = list(vnam = c("atm.shv","can.shv","ground.shv","lsfc.shv.open","lint.shv") ,desc = c("Atmosphere","Canopy air","Ground","Leaf Surface","Intercellular") - ,colour = c("deepskyblue","gray21","sienna","chartreuse","forestgreen") + ,colour = c("deepskyblue","grey45","sienna","chartreuse","forestgreen") ,lwd = c(2.0,2.0,2.0,2.0,2.0) ,type = ptype ,prefix = "h2oopen" @@ -101,7 +122,7 @@ hovdi05 = list(vnam = c("atm.shv","can.shv","ground.shv","lsfc.shv.open","lint hovdi06 = list(vnam = c("atm.co2","can.co2","lsfc.co2.clos","lint.co2.clos","compp") ,desc = c("Atmosphere","Canopy air","Leaf surface","Intercellular" ,"GPP comp. point") - ,colour = c("deepskyblue","gray21","chartreuse","forestgreen","yellowgreen") + ,colour = c("deepskyblue","grey45","chartreuse","forestgreen","yellowgreen") ,lwd = c(2.0,2.0,2.0,2.0,2.0) ,type = ptype ,prefix = "co2closed" @@ -112,7 +133,7 @@ hovdi06 = list(vnam = c("atm.co2","can.co2","lsfc.co2.clos","lint.co2.clos","c hovdi07 = list(vnam = c("atm.co2","can.co2","lsfc.co2.open","lint.co2.open","compp") ,desc = c("Atmosphere","Canopy air","Leaf surface","Intercellular" ,"GPP comp. point") - ,colour = c("deepskyblue","gray21","chartreuse","forestgreen","yellowgreen") + ,colour = c("deepskyblue","grey45","chartreuse","forestgreen","yellowgreen") ,lwd = c(2.0,2.0,2.0,2.0) ,type = ptype ,prefix = "co2open" @@ -234,23 +255,30 @@ hovdi18 = list(vnam = c("par.area","nir.area") ,plt = TRUE) -#----- Loading some packages. -------------------------------------------------------------# -library(hdf5) -library(chron) -library(scatterplot3d) -library(lattice) -library(maps) -library(mapdata) -library(akima) -#------------------------------------------------------------------------------------------# -#----- In case there is some graphic still opened. ----------------------------------------# -graphics.off() -#------------------------------------------------------------------------------------------# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +# NO NEED TO CHANGE ANYTHING BEYOND THIS POINT UNLESS YOU ARE DEVELOPING THE CODE... # +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +jallom = c(0,0,1,1,2) +iallom = jallom[iallom] + +#----- Loading some packages and scripts. -------------------------------------------------# +source(file.path(srcdir,"load.everything.r")) +#------------------------------------------------------------------------------------------# #----- Setting how many formats we must output. -------------------------------------------# outform = tolower(outform) @@ -259,37 +287,6 @@ nout = length(outform) -#----- Avoiding unecessary and extremely annoying beeps. ----------------------------------# -options(locatorBell=FALSE) -#------------------------------------------------------------------------------------------# - - -jallom = c(0,0,1,1,2) -iallom = jallom[iallom] - - -#----- Load some files with global constants. ---------------------------------------------# -source(paste(srcdir,"allometry.r",sep="/")) -source(paste(srcdir,"rconstants.r",sep="/")) -#----- Load some files with useful functions. ---------------------------------------------# -source(paste(srcdir,"arrhenius.r",sep="/")) -source(paste(srcdir,"atlas.r",sep="/")) -source(paste(srcdir,"collatz.r",sep="/")) -source(paste(srcdir,"globdims.r",sep="/")) -source(paste(srcdir,"locations.r",sep="/")) -source(paste(srcdir,"muitas.r",sep="/")) -source(paste(srcdir,"pft.coms.r",sep="/")) -source(paste(srcdir,"pretty.log.r",sep="/")) -source(paste(srcdir,"pretty.time.r",sep="/")) -source(paste(srcdir,"plotsize.r",sep="/")) -source(paste(srcdir,"qapply.r",sep="/")) -source(paste(srcdir,"sombreado.r",sep="/")) -source(paste(srcdir,"southammap.r",sep="/")) -source(paste(srcdir,"timeutils.r",sep="/")) -#------------------------------------------------------------------------------------------# - - - #----- Defining plot window size ----------------------------------------------------------# size = plotsize(proje=FALSE,paper=paper) #------------------------------------------------------------------------------------------# @@ -604,12 +601,13 @@ for (place in myplaces){ " \n"," PFT: ",pftnames[ipft], " - Height: ",height,"m", sep="") + par(par.user) plot(x=when,y=ccohort[[vnames[1]]],type="n",main=letitre,xlab="Time" ,ylim=ylimit,ylab=paste("[",unit,"]",sep=""),xaxt="n" ,cex.main=cex.main) axis(side=1,at=whenout$levels,labels=whenout$labels,padj=whenout$padj) if (hovgrid){ - abline(h=axTicks(side=2),v=whenout$levels,col="gray66" + abline(h=axTicks(side=2),v=whenout$levels,col=grid.colour ,lty="dotted") }#end if for (l in 1:nlayers){ diff --git a/ED/Template/Template/plot_povray.r b/ED/Template/Template/plot_povray.r new file mode 100644 index 000000000..54595c63d --- /dev/null +++ b/ED/Template/Template/plot_povray.r @@ -0,0 +1,476 @@ +#==========================================================================================# +#==========================================================================================# +# Leave these commands at the beginning. They will refresh the session. # +#------------------------------------------------------------------------------------------# +rm(list=ls()) +graphics.off() +#==========================================================================================# +#==========================================================================================# + + + +#==========================================================================================# +#==========================================================================================# +# Here is the user defined variable section. # +#------------------------------------------------------------------------------------------# + +#----- Paths. -----------------------------------------------------------------------------# +here = "thispath" # Current directory. +there = "thatpath" # Directory where analyses/history are +srcdir = "/n/moorcroft_data/mlongo/util/Rsc" # Source directory. +outroot = "thisoutroot" # Directory for figures +#------------------------------------------------------------------------------------------# + + +#----- Time options. ----------------------------------------------------------------------# +monthbeg = thismontha # First month to use +yearbeg = thisyeara # First year to consider +yearend = thisyearz # Maximum year to consider +reload.data = TRUE # Should I reload partially loaded data? +pov.month = 5 # Months for POV-Ray plots +pop.scale = 1.0 # Scaling factor to REDUCE displayed population. +#------------------------------------------------------------------------------------------# + + + +#----- Name of the simulations. -----------------------------------------------------------# +myplaces = c("thispoly") +#------------------------------------------------------------------------------------------# + + + +#----- Plot options. ----------------------------------------------------------------------# +depth = 96 # PNG resolution, in pixels per inch +paper = "letter" # Paper size, to define the plot shape +ptsz = 14 # Font size. +ibackground = mybackground # Background settings (check load_everything.r) +#------------------------------------------------------------------------------------------# + + +#------ Miscellaneous settings. -----------------------------------------------------------# +slz.min = -5.0 # The deepest depth that trees access water. +idbh.type = myidbhtype # Type of DBH class + # 1 -- Every 10 cm until 100cm; > 100cm + # 2 -- 0-10; 10-20; 20-35; 35-50; 50-70; > 70 (cm) +#------------------------------------------------------------------------------------------# + + + +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +# NO NEED TO CHANGE ANYTHING BEYOND THIS POINT UNLESS YOU ARE DEVELOPING THE CODE... # +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# + + + +#----- Loading some packages and scripts. -------------------------------------------------# +source(file.path(srcdir,"load.everything.r")) +#------------------------------------------------------------------------------------------# + + +#----- Avoid unecessary and extremely annoying beeps. -------------------------------------# +options(locatorBell=FALSE) +#------------------------------------------------------------------------------------------# + + + +#----- Load observations. -----------------------------------------------------------------# +obsrfile = paste(srcdir,"LBA_MIP.v8.RData",sep="/") +load(file=obsrfile) +#------------------------------------------------------------------------------------------# + + + +#----- Define plot window size ------------------------------------------------------------# +size = plotsize(proje=FALSE,paper=paper) +#------------------------------------------------------------------------------------------# + + + +#---- Create the main output directory in case there is none. -----------------------------# +if (! file.exists(outroot)) dir.create(outroot) +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Big place loop starts here... # +#------------------------------------------------------------------------------------------# +for (place in myplaces){ + + #----- Retrieve default information about this place and set up some variables. --------# + thispoi = locations(where=place,here=there,yearbeg=yearbeg,yearend=yearend + ,monthbeg=monthbeg) + inpref = thispoi$pathin + bnpref = basename(inpref) + outmain = paste(outroot,place,sep="/") + outpref = paste(outmain,"povray",sep="/") + lieu = thispoi$lieu + iata = thispoi$iata + suffix = thispoi$iata + yeara = thispoi$yeara + yearz = thispoi$yearz + meszz = thispoi$monz + #---------------------------------------------------------------------------------------# + + + + #----- Create the directories in case they don't exist. --------------------------------# + if (! file.exists(outmain)) dir.create(outmain) + if (! file.exists(outpref)) dir.create(outpref) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the total number of months that can be loaded this time. # + #---------------------------------------------------------------------------------------# + ntimes = (yearz-yeara-1)*12+meszz+(12-monthbeg+1) + #---------------------------------------------------------------------------------------# + + + + #----- Print a banner to entretain the user. -------------------------------------------# + cat(" + Post-processing output from ",lieu,"...","\n") + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Make the RData file name, then we check whether we must read the files again # + # or use the stored RData. # + #---------------------------------------------------------------------------------------# + path.data = paste(here,place,"rdata_month",sep="/") + if (! file.exists(path.data)) dir.create(path.data) + ed22.rdata = paste(path.data,paste(place,"RData",sep="."),sep="/") + if (reload.data && file.exists(ed22.rdata)){ + #----- Load the modelled dataset. ---------------------------------------------------# + cat(" - Loading previous session...","\n") + load(ed22.rdata) + tresume = datum$ntimes + 1 + datum = update.monthly( new.ntimes = ntimes + , old.datum = datum + , montha = monthbeg + , yeara = yeara + , inpref = inpref + , slz.min = slz.min + )#end update.monthly + }else{ + cat(" - Starting new session...","\n") + tresume = 1 + datum = create.monthly( ntimes = ntimes + , montha = monthbeg + , yeara = yeara + , inpref = inpref + , slz.min = slz.min + )#end create.monthly + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Check whether we have anything to update. # + #---------------------------------------------------------------------------------------# + complete = tresume > ntimes + #---------------------------------------------------------------------------------------# + + + + #----- Copy some dimensions to scalars. ------------------------------------------------# + nzg = datum$nzg + nzs = datum$nzs + ndcycle = datum$ndcycle + isoilflg = datum$isoilflg + slz = datum$slz + slxsand = datum$slxsand + slxclay = datum$slxclay + ntext = datum$ntext + soil.prop = datum$soil.prop + dslz = datum$dslz + soil.depth = datum$soil.depth + soil.dry = datum$soil.dry + soil.poro = datum$soil.poro + ka = datum$ka + kz = datum$kz + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # Loop over all times in case there is anything new to be read. # + #---------------------------------------------------------------------------------------# + if (! complete){ + + #------------------------------------------------------------------------------------# + # This function will read the files. # + #------------------------------------------------------------------------------------# + datum = read.q.files(datum=datum,ntimes=ntimes,tresume=tresume,sasmonth=sasmonth) + #------------------------------------------------------------------------------------# + + #------ Save the data to the R object. ----------------------------------------------# + cat(" + Saving data to ",basename(ed22.rdata),"...","\n") + save(datum,file=ed22.rdata) + #------------------------------------------------------------------------------------# + }#end if (! complete) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Copy some data to local variables. # + #---------------------------------------------------------------------------------------# + patch = datum$patch + cohort = datum$cohort + #---------------------------------------------------------------------------------------# + + + years = sort(unique(datum$year)) + pclabs = paste("y",sprintf("%4.4i",years),"m",sprintf("%2.2i",pov.month),sep="") + pcwhens = paste(mon2mmm(pov.month,cap1=TRUE),years,sep="-") + pcouts = paste(sprintf("%4.4i",years),sprintf("%2.2i",pov.month),sep="-") + pcloop = sequence(length(pclabs)) + + for (w in pcloop){ + #----- Grab this time. --------------------------------------------------------------# + pclab = pclabs [w] + pcwhen = pcwhens[w] + pcout = pcouts [w] + #------------------------------------------------------------------------------------# + cat (" + Creating POV-Ray image for ",pcwhen,"...","\n") + + + + #----- Copy some patch variables to local variables. --------------------------------# + ipa = patch$ipa [[pclab]] + areapa = patch$area[[pclab]] + #------------------------------------------------------------------------------------# + + + + #----- Copy some cohort variables to local variables. -------------------------------# + ipaco = cohort$ipa[[pclab]] + icoco = cohort$ico[[pclab]] + nplantco = round(cohort$nplant[[pclab]] * pov.total.area * pop.scale) + dbhco = cohort$dbh [[pclab]] + pftco = cohort$pft [[pclab]] + #------------------------------------------------------------------------------------# + + + #----- Remove small plants to reduce the clutter. -----------------------------------# + keep = is.finite(dbhco) & dbhco >= pov.dbh.min + ipaco = ipaco [keep] + icoco = icoco [keep] + nplantco = nplantco[keep] + dbhco = dbhco [keep] + pftco = pftco [keep] + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Find the tree coordinates. # + #------------------------------------------------------------------------------------# + if (sum(keep) > 0){ + #----- Determine the quadricules where trees of each patch can go. ---------------# + npatches = length(areapa) + nquadpa.1st = round( pov.nxy.patch * areapa ) + totquad = sum(nquadpa.1st) + off = pov.nxy.patch - totquad + nfix = sample( c( rep( x = 0 , times = npatches-abs(off)) + , rep( x = sign(off), times = abs(off) ) + )#end c + )#end sample + nquadpa = nquadpa.1st + nfix + if (sum(nquadpa) != pov.nxy.patch){ + cat (" - NQUADPA.1ST: ",sum(nquadpa.1st),"\n") + cat (" - NQUADPA : ",sum(nquadpa) ,"\n") + cat (" - NXY.POV : ",pov.nxy.patch ,"\n") + stop(" Not the correct number of patches") + }#end if + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Create a list with the quadricules for each patch. We double each count # + # to make sure each patch gets at least 2 numbers (so we can safely use 'sample'. # + #---------------------------------------------------------------------------------# + ipa.quad = unlist(mapply(FUN=rep,x=ipa,each=2*nquadpa)) + quad = split(x=rep(sample(pov.nxy.patch),each=2),f=ipa.quad) + names(quad) = paste("patch",sprintf("%3.3i",sort(unique(ipa))),sep="_") + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # Expand population variables. # + #---------------------------------------------------------------------------------# + ipaco = unlist(mapply(FUN=rep,x=ipaco,each=nplantco)) + dbhco = unlist(mapply(FUN=rep,x=dbhco,each=nplantco)) + pftco = unlist(mapply(FUN=rep,x=pftco,each=nplantco)) + nco = sum(nplantco) + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # Randomly assign the cohorts to the patches where they belong. # + #---------------------------------------------------------------------------------# + nco.pa.pop = table(ipaco) + lab = paste("patch",sprintf("%3.3i",as.integer(names(nco.pa.pop))),sep="_") + idx = match(lab,names(quad)) + nco.pa = rep(0,times=length(quad)) + nco.pa[idx] = nco.pa.pop + quadco = unlist( mapply( FUN = sample + , x = quad + , size = nco.pa + , MoreArgs = list(replace=TRUE) + )#end mapply + )#end unlist + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Assign coordinates for all cohorts. # + #---------------------------------------------------------------------------------# + xco = ( sample(x=0.1*(sequence(10*pov.patch.xmax)-0.5),size=nco,replace=TRUE) + + pov.x0[quadco] ) + yco = ( sample(x=0.1*(sequence(10*pov.patch.ymax)-0.5),size=nco,replace=TRUE) + + pov.y0[quadco] ) + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # Make the labels. # + #---------------------------------------------------------------------------------# + povplant = rbind( "//----- The plants. ---------------------------------//" + , rbind( paste("plant(", unlist( mapply( FUN = paste + , sprintf("%7.2f",dbhco) + , sprintf("%2i" ,pftco) + , sprintf("%7.2f",xco ) + , sprintf("%7.2f",yco ) + , MoreArgs = list(sep=",") + )#end mapply + )#end unlist + ,")" + ,sep="" + )#end paste + )#rbind + , "//---------------------------------------------------//" + )#end rbind + #---------------------------------------------------------------------------------# + }else{ + povplant = rbind( "//----- No plants. ----------------------------------//" + , "//---------------------------------------------------//" + )#end rbind + #---------------------------------------------------------------------------------# + }#end if + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Copy the POV-ray template file to the working directory and append the set- # + # tings for this time. # + #------------------------------------------------------------------------------------# + povscript = file.path(here,place,"polygon.pov") + dummy = file.copy(from=file.path(srcdir,"povray_template.pov"),to=povscript) + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Decide the colour of the text depending on the background. # + #------------------------------------------------------------------------------------# + if (ibackground == 0){ + pigment = " pigment { color rgb <0. ,0. ,0. >} " + }else if (ibackground == 1){ + pigment = " pigment { color rgb <1. ,1. ,1. >} " + }else if (ibackground == 2){ + pigment = " pigment { color rgb <0.9,0.9,0.9>} " + }#end if + #------------------------------------------------------------------------------------# + + + + + #------------------------------------------------------------------------------------# + # Append the title and time stamp. # + #------------------------------------------------------------------------------------# + lesim = unlist(strsplit(lieu,split="\n")) + povtitle = NULL + for (n in sequence(length(lesim))){ + yt = sprintf("%7.1f",200 - 20 * (n-1)) + povtitle = rbind( povtitle + , "//----- The header. --------------------------------//" + , paste("text { ttf \"cyrvetic.ttf\" \"",lesim[n],"\" 5,0",sep="") + , pigment + , " scale < 12.0, 12.0, 0.1>" + , " rotate < 28.8, 0.0, 0.0>" + , " rotate < 0.0, 45.0, 0.0>" + , paste(" translate < -150.0,", yt,", 200.0>",sep="") + , " }// end text" + , "//--------------------------------------------------//" + , " " + , " " + )#end rbind + }#end for (n in 1:lesim) + povstamp = rbind( "//----- The time stamp. ----------------------------//" + , paste("text { ttf \"cyrvetic.ttf\" \"",pcwhen,"\" 5,0",sep="") + , pigment + , " scale < 12.0, 12.0, 0.1>" + , " rotate < 28.8, 0.0, 0.0>" + , " rotate < 0.0, 45.0, 0.0>" + , " translate < 100.0, 180.0, -150.0>" + , " }// end text" + , "//--------------------------------------------------//" + , " " + , " " + )#end rbind + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Append the title, stamp, and plants... # + #------------------------------------------------------------------------------------# + write(x = povtitle, file = povscript, ncolumns = 1, append = TRUE) + write(x = povstamp, file = povscript, ncolumns = 1, append = TRUE) + write(x = povplant, file = povscript, ncolumns = 1, append = TRUE) + #------------------------------------------------------------------------------------# + + #------------------------------------------------------------------------------------# + # Call POV-Ray (must use system, though...) # + #------------------------------------------------------------------------------------# + povray = Sys.which("povray") + outtemp = file.path(tempdir(),paste(place,".png",sep="")) + outfile = file.path(outpref,paste(bnpref,"-",pcout,".png",sep="")) + + povopts = paste("-D" + ,"-V" + ,"+UA" + ,paste("+W",round(size$width*depth ),sep="") + ,paste("+H",round(size$height*depth),sep="") + ,paste("+O",outtemp,sep="") + ,sep = " " + )#end paste + dummy = system( command = paste(povray,povopts,povscript,sep=" ") + , intern = TRUE + , ignore.stdout = TRUE + , ignore.stderr = TRUE + )#end system + dummy = file.copy(from=outtemp,to=outfile,overwrite=TRUE) + dummy = file.remove(outtemp,povscript) + #------------------------------------------------------------------------------------# + }#end for (w in 1:pclabs) + #---------------------------------------------------------------------------------------# +}#end for (place in myplaces) +#==========================================================================================# +#==========================================================================================# diff --git a/ED/Template/Template/plot_rk4.r b/ED/Template/Template/plot_rk4.r index 691e1947d..e54782937 100644 --- a/ED/Template/Template/plot_rk4.r +++ b/ED/Template/Template/plot_rk4.r @@ -31,11 +31,11 @@ plotgrid = TRUE # Should I plot the grid in the background? legwhere = "topleft" # Where should I place the legend? inset = 0.05 # inset distance between legend and edge of plot region. -legbg = "white" # Legend background colour. scalleg = 0.32 # Increase in y scale to fit the legend. ncolshov = 200 # Target number of colours for Hovmoller diagrams. hovgrid = TRUE # Should I include a grid on the Hovmoller plots? +ibackground = mybackground # Background settings (check load_everything.r) #------------------------------------------------------------------------------------------# #------------------------------------------------------------------------------------------# @@ -93,7 +93,7 @@ phovdi04 = list(vnam = c("hflxgc","hflxca","hflxlc","hflxwc") ,plt = TRUE) phovdi05 = list(vnam = c("atm.temp","can.temp","leaf.temp","wood.temp","sfc.temp") ,desc = c("Atmosphere","Canopy air","Leaf","Wood","Surface") - ,colour = c("deepskyblue","gray21","chartreuse","goldenrod","sienna") + ,colour = c("deepskyblue","grey21","chartreuse","goldenrod","sienna") ,lwd = c(2.0,2.0,2.0,2.0,2.0) ,type = ptype ,plog = "" @@ -104,7 +104,7 @@ phovdi05 = list(vnam = c("atm.temp","can.temp","leaf.temp","wood.temp","sfc.te ,plt = TRUE) phovdi06 = list(vnam = c("atm.shv","can.shv","sfc.shv") ,desc = c("Atmosphere","Canopy air","Surface") - ,colour = c("deepskyblue","gray21","sienna") + ,colour = c("deepskyblue","grey21","sienna") ,lwd = c(2.0,2.0,2.0) ,type = ptype ,plog = "" @@ -380,20 +380,24 @@ pftnames = c("C4 Grass","Early Tropical","Mid Tropical","Late Tropical","Temp. C -#----- Loading some packages. -------------------------------------------------------------# -library(hdf5) -library(chron) -library(scatterplot3d) -library(lattice) -library(maps) -library(mapdata) -library(akima) -#------------------------------------------------------------------------------------------# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +# NO NEED TO CHANGE ANYTHING BEYOND THIS POINT UNLESS YOU ARE DEVELOPING THE CODE... # +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# -#----- In case there is some graphic still opened. ----------------------------------------# -graphics.off() +#----- Loading some packages and scripts. -------------------------------------------------# +source(file.path(srcdir,"load.everything.r")) #------------------------------------------------------------------------------------------# @@ -405,30 +409,6 @@ nout = length(outform) -#----- Avoiding unecessary and extremely annoying beeps. ----------------------------------# -options(locatorBell=FALSE) -#------------------------------------------------------------------------------------------# - - - -#----- Loading some files with functions. -------------------------------------------------# -source(paste(srcdir,"atlas.r" ,sep="/")) -source(paste(srcdir,"globdims.r" ,sep="/")) -source(paste(srcdir,"locations.r" ,sep="/")) -source(paste(srcdir,"muitas.r" ,sep="/")) -source(paste(srcdir,"pretty.log.r" ,sep="/")) -source(paste(srcdir,"pretty.time.r",sep="/")) -source(paste(srcdir,"plotsize.r" ,sep="/")) -source(paste(srcdir,"qapply.r" ,sep="/")) -source(paste(srcdir,"rconstants.r" ,sep="/")) -source(paste(srcdir,"sombreado.r" ,sep="/")) -source(paste(srcdir,"southammap.r" ,sep="/")) -source(paste(srcdir,"thermlib.r" ,sep="/")) -source(paste(srcdir,"timeutils.r" ,sep="/")) -#------------------------------------------------------------------------------------------# - - - #----- Defining plot window size ----------------------------------------------------------# size = plotsize(proje=FALSE,paper=paper) #------------------------------------------------------------------------------------------# @@ -710,18 +690,20 @@ for (place in myplaces){ letitre = paste(theme," - ",thispoi$lieu,"(Patch ",ipa,")", " \n"," Time series: ",theme,sep="") + par(par.user) plot(x=when,y=cpatch[[vnames[1]]],type="n",main=letitre,xlab="Time" ,ylim=ylimit,ylab=paste("[",unit,"]",sep=""),log=plog,xaxt="n" ,cex.main=cex.main) axis(side=1,at=whenout$levels,labels=whenout$labels,padj=whenout$padj) if (hovgrid){ - abline(h=axTicks(side=2),v=whenout$levels,col="gray66",lty="dotted") + abline(h=axTicks(side=2),v=whenout$levels,col="grey66",lty="dotted") }#end if for (l in 1:nlayers){ points(x=when,y=cpatch[[vnames[l]]],col=lcolours[l] ,lwd=llwd[l],type=ltype,pch=16,cex=0.8) }#end for - legend(x=legpos,inset=0.05,legend=description,col=lcolours,lwd=llwd) + legend(x=legpos,bg=background,inset=0.05,legend=description,col=lcolours + ,lwd=llwd) if (outform[o] == "x11"){ locator(n=1) dev.off() diff --git a/ED/Template/Template/plot_rk4pc.r b/ED/Template/Template/plot_rk4pc.r index e6c826bb5..cf0ea0f14 100644 --- a/ED/Template/Template/plot_rk4pc.r +++ b/ED/Template/Template/plot_rk4pc.r @@ -29,11 +29,11 @@ plotgrid = TRUE # Should I plot the grid in the background? legwhere = "topleft" # Where should I place the legend? inset = 0.05 # inset distance between legend and edge of plot region. -legbg = "white" # Legend background colour. scalleg = 0.32 # Increase in y scale to fit the legend. ncolshov = 200 # Target number of colours for Hovmoller diagrams. hovgrid = TRUE # Should I include a grid on the Hovmoller plots? +ibackground = mybackground # Background settings (check load_everything.r) #------------------------------------------------------------------------------------------# #------------------------------------------------------------------------------------------# @@ -91,7 +91,7 @@ phovdi04 = list(vnam = c("hflxgc","hflxca","hflxlc","hflxwc") ,plt = TRUE) phovdi05 = list(vnam = c("atm.temp","can.temp","leaf.temp","wood.temp","sfc.temp") ,desc = c("Atmosphere","Canopy air","Leaf","Wood","Surface") - ,colour = c("deepskyblue","gray21","chartreuse","goldenrod","sienna") + ,colour = c("deepskyblue","grey45","chartreuse","goldenrod","sienna") ,lwd = c(2.0,2.0,2.0,2.0,2.0) ,type = ptype ,plog = "" @@ -102,7 +102,7 @@ phovdi05 = list(vnam = c("atm.temp","can.temp","leaf.temp","wood.temp","sfc.te ,plt = TRUE) phovdi06 = list(vnam = c("atm.shv","can.shv","sfc.shv") ,desc = c("Atmosphere","Canopy air","Surface") - ,colour = c("deepskyblue","gray21","sienna") + ,colour = c("deepskyblue","grey45","sienna") ,lwd = c(2.0,2.0,2.0) ,type = ptype ,plog = "" @@ -389,7 +389,7 @@ chovdi01 = list(vnam = c("gpp","leaf.resp","root.resp","growth.resp","storage. ,plt = TRUE) chovdi02 = list(vnam = c("atm.temp","can.temp","leaf.temp","wood.temp","sfc.temp") ,desc = c("Atmosphere","Canopy air","Leaf","Wood","Surface") - ,colour = c("deepskyblue","gray21","chartreuse","goldenrod","sienna") + ,colour = c("deepskyblue","grey45","chartreuse","goldenrod","sienna") ,cohlev = c(FALSE,FALSE,TRUE,TRUE,FALSE) ,lwd = c(2.0,2.0,2.0,2.0,2.0) ,type = ptype @@ -400,7 +400,7 @@ chovdi02 = list(vnam = c("atm.temp","can.temp","leaf.temp","wood.temp","sfc.te ,plt = TRUE) chovdi03 = list(vnam = c("atm.shv","can.shv","sfc.shv","lint.shv") ,desc = c("Atmosphere","Canopy air","Ground","Intercellular") - ,colour = c("deepskyblue","gray21","sienna","chartreuse","forestgreen") + ,colour = c("deepskyblue","grey45","sienna","chartreuse","forestgreen") ,cohlev = c(FALSE,FALSE,FALSE,TRUE) ,lwd = c(2.0,2.0,2.0,2.0) ,type = ptype @@ -531,31 +531,36 @@ chovdi13 = list(vnam = c("rshort.w","rlong.w","hflxwc","qwflxwc","qwshed","qtr +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +# NO NEED TO CHANGE ANYTHING BEYOND THIS POINT UNLESS YOU ARE DEVELOPING THE CODE... # +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# -#----- Define the PFT names. --------------------------------------------------------------# -pftnames = c("C4 Grass","Early Tropical","Mid Tropical","Late Tropical","Temp. C3 Grass" - ,"North Pine","South Pine","Late Conifer","Early Temperate","Mid Temperate" - ,"Late Temperate","C3 Pasture","C3 Crop","C4 Pasture","C4 Crop" - ,"C3 Grass","Araucaria") + +#----- Loading some packages and scripts. -------------------------------------------------# +source(file.path(srcdir,"load.everything.r")) #------------------------------------------------------------------------------------------# -#----- Loading some packages. -------------------------------------------------------------# -library(hdf5) -library(chron) -library(scatterplot3d) -library(lattice) -library(maps) -library(mapdata) -library(akima) -#------------------------------------------------------------------------------------------# -#----- In case there is some graphic still opened. ----------------------------------------# -graphics.off() +#----- Define the PFT names. --------------------------------------------------------------# +pftnames = c("C4 Grass","Early Tropical","Mid Tropical","Late Tropical","Temp. C3 Grass" + ,"North Pine","South Pine","Late Conifer","Early Temperate","Mid Temperate" + ,"Late Temperate","C3 Pasture","C3 Crop","C4 Pasture","C4 Crop" + ,"C3 Grass","Araucaria") #------------------------------------------------------------------------------------------# @@ -567,30 +572,6 @@ nout = length(outform) -#----- Avoiding unecessary and extremely annoying beeps. ----------------------------------# -options(locatorBell=FALSE) -#------------------------------------------------------------------------------------------# - - - -#----- Loading some files with functions. -------------------------------------------------# -source(paste(srcdir,"atlas.r" ,sep="/")) -source(paste(srcdir,"globdims.r" ,sep="/")) -source(paste(srcdir,"locations.r" ,sep="/")) -source(paste(srcdir,"muitas.r" ,sep="/")) -source(paste(srcdir,"pretty.log.r" ,sep="/")) -source(paste(srcdir,"pretty.time.r",sep="/")) -source(paste(srcdir,"plotsize.r" ,sep="/")) -source(paste(srcdir,"qapply.r" ,sep="/")) -source(paste(srcdir,"rconstants.r" ,sep="/")) -source(paste(srcdir,"sombreado.r" ,sep="/")) -source(paste(srcdir,"southammap.r" ,sep="/")) -source(paste(srcdir,"thermlib.r" ,sep="/")) -source(paste(srcdir,"timeutils.r" ,sep="/")) -#------------------------------------------------------------------------------------------# - - - #----- Defining plot window size ----------------------------------------------------------# size = plotsize(proje=FALSE,paper=paper) #------------------------------------------------------------------------------------------# @@ -885,17 +866,19 @@ for (place in myplaces){ letitre = paste(theme," - ",thispoi$lieu,"(Patch ",ipa,")", " \n"," Time series: ",theme,sep="") + par(par.user) plot(x=when,y=cpatch[[vnames[1]]],type="n",main=letitre,xlab="Time", ylim=ylimit,ylab=paste("[",unit,"]",sep=""),log=plog,xaxt="n") axis(side=1,at=whenout$levels,labels=whenout$labels,padj=whenout$padj) if (hovgrid){ - abline(h=axTicks(side=2),v=whenout$levels,col="gray66",lty="dotted") + abline(h=axTicks(side=2),v=whenout$levels,col=grid.colour,lty="dotted") }#end if for (l in 1:nlayers){ points(x=when,y=cpatch[[vnames[l]]],col=lcolours[l] ,lwd=llwd[l],type=ltype,pch=16,cex=0.8) }#end for - legend(x=legpos,inset=0.05,legend=description,col=lcolours,lwd=llwd) + legend(x=legpos,bg=background,inset=0.05,legend=description + ,col=lcolours,lwd=llwd) if (outform[o] == "x11"){ locator(n=1) dev.off() @@ -1127,11 +1110,12 @@ for (place in myplaces){ thisvar = cpatch[[vnames[1]]] }#end if + par(par.user) plot(x=when,y=thisvar,type="n",main=letitre,xlab="Time", ylim=ylimit,ylab=paste("[",unit,"]",sep=""),xaxt="n",cex.main=0.8) axis(side=1,at=whenout$levels,labels=whenout$labels,padj=whenout$padj) if (hovgrid){ - abline(h=axTicks(side=2),v=whenout$levels,col="gray66" + abline(h=axTicks(side=2),v=whenout$levels,col=grid.colour ,lty="dotted") }#end if for (l in 1:nlayers){ diff --git a/ED/Template/Template/plot_ycomp.r b/ED/Template/Template/plot_ycomp.r index 98546ff4e..967b981fa 100644 --- a/ED/Template/Template/plot_ycomp.r +++ b/ED/Template/Template/plot_ycomp.r @@ -61,7 +61,6 @@ ncolshov = 200 # Target number of colours for Hovmoller hovgrid = TRUE # Include a grid on the Hovmoller plots? legwhere = "topleft" # Where should I place the legend? inset = 0.01 # Inset between legend and edge of plot region. -legbg = "white" # Legend background colour. scalleg = 0.40 # Expand y limits by this relative amount to fit # the legend cex.main = 0.8 # Scale coefficient for the title @@ -70,10 +69,10 @@ phi = 30. # Vertical angle for perspective project ltheta = -210. # Azimuth angle for light shade = 0.125 # Shade intensity expz = 0.5 # Expansion factor for Z axis -gcol = c("lightblue","white") # Colours for the fifties style floor cexmin = 0.5 # Minimum "head" size of the lollipop cexmax = 3.0 # Maximum "head" size of the lollipop -ylnudge = 0.05 # Nudging factor for ylimit +ylnudge = 0.05 # Nudging factor for ylimit +ibackground = mybackground # Background settings (check load_everything.r) #------------------------------------------------------------------------------------------# @@ -417,11 +416,12 @@ for (place in myplaces){ ley = paste(desc," [",unit,"]") + par(par.user) plot(x=outplot[[2]]$x,y=outplot[[2]]$y,type="n",main=letitre,xlab=lex,ylab=ley ,ylim=ylimit,cex.main=cex.main,xaxt="n") axis(side=1,at=whenplot$levels,labels=whenplot$labels,padj=whenplot$padj) if (plotgrid){ - abline(v=whenplot$levels,h=axTicks(side=2),col="gray62",lty="solid") + abline(v=whenplot$levels,h=axTicks(side=2),col=grid.colour,lty="solid") }#end if for (y in 2:nyears){ lines(x=outplot[[y]]$x,y=outplot[[y]]$y,type=plttype,pch=16,cex=1.0 @@ -526,9 +526,10 @@ for (place in myplaces){ ley = paste(desc," [",unit,"]") + par(par.user) barplot(season.mat,col=yr3mon.col,main=letitre,xlab=lex,ylab=ley ,cex.main=cex.main,ylim=ylimit,legend.text=FALSE,beside=TRUE - ,border="gray23",xpd=FALSE) + ,border=grey.fg,xpd=FALSE) box() legend(x=leg.pos,inset=0.01,legend=yr3mon.desc,fill=yr3mon.col ,title="Period",cex=0.9,ncol=2) @@ -623,12 +624,12 @@ for (place in myplaces){ paxes = list() paxes[[1]] = list( x.axis = list(side=1) , y.axis = list(side=2) - , grid = list(col="gray62",lty="solid") + , grid = list(col=grey.fg,lty="solid") , legend = list( x = leg.pos , inset = 0.01 , legend = yr3mon.desc - , col = "black" - , bg = "white" + , col = foreground + , bg = background , pch = yr3mon.pch , title = "Period" , ncol = 2 @@ -661,6 +662,7 @@ for (place in myplaces){ #----- Plot the parameter space. -------------------------------------------# + par(par.user) colourmap(x=xvar,y=yvar,z=zvar,xlim=xlimit,ylim=ylimit ,colour.palette=muitas,cex=1.6,pch=this.pch,lwd=2 ,plot.title=ptitle diff --git a/ED/Template/Template/plot_yearly.r b/ED/Template/Template/plot_yearly.r index 7ec93ba6e..aaa47a349 100644 --- a/ED/Template/Template/plot_yearly.r +++ b/ED/Template/Template/plot_yearly.r @@ -48,7 +48,7 @@ outform = thisoutform # Formats for output file. Supported fo # - "pdf" - for PDF printing depth = 96 # PNG resolution, in pixels per inch paper = "letter" # Paper size, to define the plot shape -ptsz = 14 # Font size. +ptsz = 18 # Font size. lwidth = 2.5 # Line width plotgrid = TRUE # Should I plot the grid in the background? fcgrid = TRUE # Include a grid on the filled contour plots? @@ -56,7 +56,6 @@ ncolshov = 200 # Target number of colours for Hovmoller hovgrid = TRUE # Include a grid on the Hovmoller plots? legwhere = "topleft" # Where should I place the legend? inset = 0.01 # Inset between legend and edge of plot region. -legbg = "white" # Legend background colour. scalleg = 0.40 # Expand y limits by this relative amount to fit # the legend cex.main = 0.8 # Scale coefficient for the title @@ -68,6 +67,7 @@ drought.mark = mydroughtmark # Put a background to highlight droughts drought.yeara = mydroughtyeara # First year that has drought drought.yearz = mydroughtyearz # Last year that has drought months.drought = mymonthsdrought # Months with drought +ibackground = mybackground # Background settings (check load_everything.r) #------------------------------------------------------------------------------------------# @@ -584,6 +584,7 @@ for (place in myplaces){ letitre = paste(description,lieu,sep=" - ") cols = pft$colour[selpft] legs = pft$name [selpft] + par(par.user) plot(x=datum$toyear,y=thisvar[,1],type="n",main=letitre,ylim=ylimit ,xlab="Year",ylab=unit,cex.main=0.7,log=xylog) @@ -591,12 +592,12 @@ for (place in myplaces){ for (n in 1:ndrought){ rect(xleft = drought[[n]][1],ybottom = ydrought[1] ,xright = drought[[n]][2],ytop = ydrought[2] - ,col = "grey84",border=NA) + ,col = grid.colour,border=NA) }#end for }#end if if (plotgrid){ - abline(v=axTicks(side=1),h=axTicks(side=2),col="grey52",lty="solid") + abline(v=axTicks(side=1),h=axTicks(side=2),col=grid.colour,lty="solid") }#end if for (n in 1:(npft+1)){ if (selpft[n]){ @@ -605,7 +606,7 @@ for (place in myplaces){ }#end for legend( x = legwhere , inset = inset - , bg = legbg + , bg = background , legend = legs , col = cols , lwd = lwidth @@ -710,24 +711,25 @@ for (place in myplaces){ }#end if letitre = paste(description,pft$name[p],lieu,sep=" - ") + par(par.user) plot(x=datum$toyear,y=thisvar[,1,p],type="n",main=letitre,ylim=ylimit ,xlab="Time",ylab=unit,cex.main=0.7,log=xylog) if (drought.mark){ for (n in 1:ndrought){ rect(xleft = drought[[n]][1],ybottom = ydrought[1] ,xright = drought[[n]][2],ytop = ydrought[2] - ,col = "grey84",border=NA) + ,col = grid.colour,border=NA) }#end for }#end if if (plotgrid){ - abline(v=axTicks(side=1),h=axTicks(side=2),col="grey52",lty="solid") + abline(v=axTicks(side=1),h=axTicks(side=2),col=grid.colour,lty="solid") }#end if for (d in seq(from=1,to=ndbh+1,by=1)){ lines(datum$toyear,thisvar[,d,p],type="l",col=dbhcols[d],lwd=lwidth) }#end for legend( x = legwhere , inset = inset - , bg = legbg + , bg = background , legend = dbhnames , col = dbhcols , ncol = min(pretty.box(ndbh+1)$ncol,3) @@ -854,12 +856,13 @@ for (place in myplaces){ #----- Load variable -------------------------------------------------------# letitre = paste(description," - ",lieu,"\n","Monthly mean - ",cyear,sep="") + par(par.user) plot(x=montmont,y=var.year,type="n",main=letitre,xlab="Time" ,ylim=ylimit,ylab=paste("[",unit,"]",sep=""),log=plog,xaxt="n" ,cex.main=cex.main) axis(side=1,at=mplot$levels,labels=mplot$labels,padj=mplot$padj) if (plotgrid){ - abline(v=mplot$levels,h=axTicks(side=2),col="grey52",lty="solid") + abline(v=mplot$levels,h=axTicks(side=2),col=grid.colour,lty="solid") }#end if if (plotsd){ polygon(x=mod.x.poly,y=mod.y.poly,col=errcolours[2],angle=angle[2] @@ -878,7 +881,7 @@ for (place in myplaces){ , density = dens , lwd = llwd , col = lcolours - , bg = "white" + , bg = background , title = expression(bold("Shaded areas = 1 SD")) , cex = 1.0 , pch = 16 @@ -980,6 +983,7 @@ for (place in myplaces){ letitre = paste(description,lieu,sep=" - ") cols = lucols[sellu] legs = lunames[sellu] + par(par.user) plot(datum$toyear,thisvar[,1],type="n",main=letitre,ylim=ylimit ,xlab="Year",ylab=unit,cex.main=0.7) @@ -987,11 +991,11 @@ for (place in myplaces){ for (n in 1:ndrought){ rect(xleft = drought[[n]][1],ybottom = ydrought[1] ,xright = drought[[n]][2],ytop = ydrought[2] - ,col = "grey84",border=NA) + ,col = grid.colour,border=NA) }#end for }#end if if (plotgrid){ - abline(v=axTicks(side=1),h=axTicks(side=2),col="grey52",lty="solid") + abline(v=axTicks(side=1),h=axTicks(side=2),col=grid.colour,lty="solid") }#end if for (n in 1:(nlu+1)){ if (sellu[n]){ @@ -1000,7 +1004,7 @@ for (place in myplaces){ }#end for legend( x = legwhere , inset = inset - , bg = legbg + , bg = background , legend = legs , col = cols , lwd = lwidth @@ -1063,17 +1067,18 @@ for (place in myplaces){ letitre = paste("Disturbance rates",lieu,sep=" - ") cols = NULL legs = NULL + par(par.user) plot(datum$toyear,datum$dist[,1,1],type="n",main=letitre,ylim=ylimit ,xlab="Year",ylab="[1/yr]",cex.main=0.7) if (drought.mark){ for (n in 1:ndrought){ rect(xleft = drought[[n]][1],ybottom = ydrought[1] ,xright = drought[[n]][2],ytop = ydrought[2] - ,col = "grey84",border=NA) + ,col = grid.colour,border=NA) }#end for }#end if if (plotgrid){ - abline(v=axTicks(side=1),h=axTicks(side=2),col="grey52",lty="solid") + abline(v=axTicks(side=1),h=axTicks(side=2),col=grid.colour,lty="solid") }#end if n = 0 for (jlu in 1:nlu){ @@ -1089,7 +1094,7 @@ for (place in myplaces){ }#end for legend(x = legwhere ,inset = inset - ,bg = legbg + ,bg = background ,legend = legs ,col = cols ,lwd = lwidth @@ -1196,17 +1201,18 @@ for (place in myplaces){ letitre = paste(" Time series: ",group,"\n",lieu,sep="") + par(par.user) plot(x=datum$toyear,y=thisvar,type="n",main=letitre,xlab="Year" ,ylim=ylimit,ylab=paste("[",unit,"]",sep=""),log=xylog,cex.main=cex.main) if (drought.mark){ for (n in 1:ndrought){ rect(xleft = drought[[n]][1],ybottom = ydrought[1] ,xright = drought[[n]][2],ytop = ydrought[2] - ,col = "grey84",border=NA) + ,col = grid.colour,border=NA) }#end for }#end if if (plotgrid){ - abline(v=axTicks(side=1),h=axTicks(side=2),col="grey52",lty="solid") + abline(v=axTicks(side=1),h=axTicks(side=2),col=grid.colour,lty="solid") }#end if for (l in 1:nlayers){ thisvar = ymean[[vnames[l]]] @@ -1320,12 +1326,13 @@ for (place in myplaces){ letitre = paste(group," - Mean diurnal cycle - ",cyear,"\n",lieu,sep="") + par(par.user) plot(x=thisday,y=thisvar[yy,],type="n",main=letitre,xlab="Time" ,ylim=ylimit,ylab=paste("[",unit,"]",sep=""),log=xylog,xaxt="n" ,cex.main=cex.main) axis(side=1,at=uplot$levels,labels=uplot$labels,padj=uplot$padj) if (plotgrid){ - abline(v=uplot$levels,h=axTicks(side=2),col="grey52",lty="solid") + abline(v=uplot$levels,h=axTicks(side=2),col=grid.colour,lty="solid") }#end if for (l in 1:nlayers){ thisvar = umean[[vnames[l]]] @@ -1444,6 +1451,7 @@ for (place in myplaces){ }#end if letitre = paste(description,"\n",lieu,sep="") + par(par.user) sombreado(x=yearaxis,y=soilaxis,z=varbuff,levels=vlevels,nlevels=vnlev ,color.palette=get(vcscheme) ,plot.title=title(main=letitre,xlab="Month",ylab="Soil depth [m]" @@ -1453,7 +1461,7 @@ for (place in myplaces){ ,plot.axes={axis(side=1) axis(side=2,at=zat,labels=znice) if (hovgrid){ - abline(h=zat,v=axTicks(1),col="grey52",lty="dotted") + abline(h=zat,v=axTicks(1),col=grid.colour,lty="dotted") }#end if hovgrid }#end plot.axes ) @@ -1583,13 +1591,14 @@ for (place in myplaces){ #----- Plot all monthly means together. ------------------------------------# + par(par.user) barplot(height=t(thisvnam[y,,]),names.arg=dbhnames[1:ndbh],width=1.0 ,main=letitre,xlab=lexlab,ylab=leylab,ylim=ylimit,legend.text=FALSE ,beside=(! stacked),col=pftcol.use,log=xylog - ,border="grey23",xpd=FALSE,cex.main=cex.main) + ,border=grid.colour,xpd=FALSE,cex.main=cex.main) if (plotgrid & (! stacked)){ xgrid=0.5+(1:ndbh)*(1+npftuse) - abline(v=xgrid,col="grey46",lty="solid") + abline(v=xgrid,col=grid.colour,lty="solid") }#end if box() legend( x = "topleft" @@ -1599,7 +1608,7 @@ for (place in myplaces){ , ncol = min(3,pretty.box(n.selpft)$ncol) , title = expression(bold("Plant functional type")) , cex = 1.0 - , bg = "white" + , bg = background )#end legend #---------------------------------------------------------------------------# diff --git a/ED/Template/Template/read_monthly.r b/ED/Template/Template/read_monthly.r index 9927c0c6e..2348267ad 100644 --- a/ED/Template/Template/read_monthly.r +++ b/ED/Template/Template/read_monthly.r @@ -123,9 +123,10 @@ for (place in myplaces){ # Make the RData file name, then we check whether we must read the files again # # or use the stored RData. # #---------------------------------------------------------------------------------------# - path.data = paste(here,place,"rdata_month",sep="/") + path.data = file.path(here,place,"rdata_month") if (! file.exists(path.data)) dir.create(path.data) - ed22.rdata = paste(path.data,paste(place,"RData",sep="."),sep="/") + ed22.rdata = file.path(path.data,paste(place,"RData",sep=".")) + ed22.status = file.path(path.data,paste("status_",place,".txt",sep="")) if (reload.data && file.exists(ed22.rdata)){ #----- Load the modelled dataset. ---------------------------------------------------# cat(" - Loading previous session...","\n") @@ -198,6 +199,8 @@ for (place in myplaces){ #------------------------------------------------------------------------------------# }#end if (! complete) #---------------------------------------------------------------------------------------# + + latest = paste(datum$year[ntimes],datum$month[ntimes],sep=" ") + dummy = write(x=latest,file=ed22.status,append=FALSE) }#end for places - -#q("no") +#------------------------------------------------------------------------------------------# diff --git a/ED/Template/Template/reject_ed.r b/ED/Template/Template/reject_ed.r index 369bf0c95..81a1db45c 100644 --- a/ED/Template/Template/reject_ed.r +++ b/ED/Template/Template/reject_ed.r @@ -22,6 +22,7 @@ scalleg = 0.25 # Increase in y scale to fit the legend. ncolshov = 200 # Target number of colours for Hovmoller diagrams. hovgrid = TRUE # Should I include a grid on the Hovmoller plots? offegrid = TRUE # Should I include a grid on the top offender plots? +ibackground = mybackground # Background settings (check load_everything.r) #----- Comparative plot of monthly means of errors. ---------------------------------------# nbox = 14 @@ -140,20 +141,24 @@ vades61 = list(vnam="sfcw.mass.04" ,desc="Sfc. water mass (z= 4)" ) -#----- Loading some packages. -------------------------------------------------------------# -library(hdf5) -library(chron) -library(scatterplot3d) -library(lattice) -library(maps) -library(mapdata) -library(akima) -#------------------------------------------------------------------------------------------# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +# NO NEED TO CHANGE ANYTHING BEYOND THIS POINT UNLESS YOU ARE DEVELOPING THE CODE... # +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# +#==========================================================================================# -#----- In case there is some graphic still opened. ----------------------------------------# -graphics.off() +#----- Loading some packages and scripts. -------------------------------------------------# +source(file.path(srcdir,"load.everything.r")) #------------------------------------------------------------------------------------------# @@ -173,29 +178,6 @@ nerror = length(errvar) -#----- Avoiding unecessary and extremely annoying beeps. ----------------------------------# -options(locatorBell=FALSE) -#------------------------------------------------------------------------------------------# - - - -#----- Loading some files with functions. -------------------------------------------------# -source(paste(srcdir,"atlas.r",sep="/")) -source(paste(srcdir,"globdims.r",sep="/")) -source(paste(srcdir,"locations.r",sep="/")) -source(paste(srcdir,"muitas.r",sep="/")) -source(paste(srcdir,"pretty.log.r",sep="/")) -source(paste(srcdir,"pretty.time.r",sep="/")) -source(paste(srcdir,"plotsize.r",sep="/")) -source(paste(srcdir,"qapply.r",sep="/")) -source(paste(srcdir,"rconstants.r",sep="/")) -source(paste(srcdir,"sombreado.r",sep="/")) -source(paste(srcdir,"southammap.r",sep="/")) -source(paste(srcdir,"timeutils.r",sep="/")) -#------------------------------------------------------------------------------------------# - - - #----- Defining plot window size ----------------------------------------------------------# size = plotsize(proje=FALSE,paper=paper) #------------------------------------------------------------------------------------------# @@ -420,6 +402,7 @@ for (place in myplaces){ ylimit = range(thisvar, na.rm=TRUE) letitre = paste(thiseds,description,lieu,sep=" - ") + par(par.user) plot(thism3,thisvar,main=letitre,ylim=ylimit ,xlab="Time",ylab=paste("Error counts [Error/month]",sep="")) @@ -535,6 +518,7 @@ for (place in myplaces){ }#end if letitre = paste(description," - ",lieu,sep="") + par(par.user) sombreado(x=monaxis,y=yraxis,z=varbuff,levels=vlevels,nlevels=vnlev ,color.palette=get(vcscheme) ,plot.title=title(main=letitre,xlab="Month",ylab="Year") @@ -631,11 +615,12 @@ for (place in myplaces){ }#end if letitre = paste("Mean annual cycle - ",lieu,sep="") + par(par.user) plot(x=thiserr$mon,y=thiserr$mon,type="n",log="y",ylim=ylimit,xlab="Month" ,ylab="Error count [error/month]",main=letitre,xaxt="n",yaxt="n") axis(side=1,at=monat,labels=monlab) axis(side=2,at=errat,labels=TRUE) - if (offegrid) abline(v=monat,h=errat,lty="dashed",col="gray66") + if (offegrid) abline(v=monat,h=errat,lty="dashed",col=grid.colour) for (v in 1:ntopoffe){ @@ -648,7 +633,7 @@ for (place in myplaces){ points(x=thiserr$mon,y=t(thisvar),type="o",pch=16,col=coloffe[v],lwd=2,cex=1.2) }#end for legend(x="top",inset=0.02,legend=lege,col=colleg,pch=16,lty="solid",lwd=2 - ,pt.cex=1.2,cex=0.8,bg="white",ncol=3 + ,pt.cex=1.2,cex=0.8,bg=background,ncol=3 ,title=paste(ntopoffe,"commonest causes for rejection")) if (outform[o] == "x11"){ diff --git a/ED/Template/Template/whichrun.r b/ED/Template/Template/whichrun.r index eef0d8c0d..5e411e557 100644 --- a/ED/Template/Template/whichrun.r +++ b/ED/Template/Template/whichrun.r @@ -35,8 +35,7 @@ output = paste(main,polyg,sep="/") # Current directory. #----- Load some useful scripts and packages. ---------------------------------------------# -isok = require(hdf5) -source(paste(srcdir,"globdims.r",sep="/")) +source(paste(srcdir,"load.everything.r",sep="/")) #------------------------------------------------------------------------------------------# diff --git a/ED/Template/check_run.sh b/ED/Template/check_run.sh index f56a8dd75..6aee994e2 100755 --- a/ED/Template/check_run.sh +++ b/ED/Template/check_run.sh @@ -146,7 +146,7 @@ do stdout="${here}/${polyname}/serial_out.out" stderr="${here}/${polyname}/serial_out.err" lsfout="${here}/${polyname}/serial_lsf.out" - stopped= + skipper="${here}/${polyname}/skipper.txt" #---------------------------------------------------------------------------------------# @@ -195,7 +195,7 @@ do #------------------------------------------------------------------------------------# # Plot a message so the user knows what is going on. # #------------------------------------------------------------------------------------# - if [ ${running} -gt 0 ] && [ ${sigsegv} -eq 0 ] + if [ ${running} -gt 0 ] || [ -s ${skipper} ] && [ ${sigsegv} -eq 0 ] then echo -e ${opt} "${off} :-) ${polyname} is running (${runtime})..." elif [ ${sigsegv} -gt 0 ] diff --git a/ED/Template/compare_scenarios.r b/ED/Template/compare_scenarios.r index e83486a6f..9782886c1 100644 --- a/ED/Template/compare_scenarios.r +++ b/ED/Template/compare_scenarios.r @@ -16,7 +16,7 @@ graphics.off() #------------------------------------------------------------------------------------------# here = getwd() # Current directory srcdir = "/n/moorcroft_data/mlongo/util/Rsc" # Script directory -outroot = file.path(here,"scenario_comp") +outroot = file.path(here,"4dbh_comp") #------------------------------------------------------------------------------------------# @@ -39,12 +39,12 @@ rdata.path = file.path(here,"RData_scomp") # Path for the scenario compari # NA -- plot only the first (debugging only). # # FALSE -- skip them altogether # #------------------------------------------------------------------------------------------# -plot.panel = TRUE -plot.tseries = TRUE -plot.szpft = TRUE -plot.barplot = TRUE -plot.xyzvars = TRUE -plot.scencomp = TRUE +plot.panel = TRUE # TRUE +plot.tseries = FALSE # TRUE +plot.szpft = FALSE # TRUE +plot.barplot = FALSE # TRUE +plot.xyzvars = TRUE # TRUE +plot.scencomp = FALSE # TRUE #------------------------------------------------------------------------------------------# @@ -98,7 +98,7 @@ plot.scencomp = TRUE # (only key, desc, and pattern are defined). # #------------------------------------------------------------------------------------------# name.template = "tPPP_rRRRR_tTTTT_real-ZZ_iphenDDD_stextSS" -use.global = c(4,2) # Which global to use (TRUE means all of them) +use.global = c(4) # Which global to use (TRUE means all of them) #----- Global variables. ------------------------------------------------------------------# global = list() global$stext = list( key = c("stext02","stext06","stext08","stext16","stext17") @@ -145,18 +145,18 @@ scenario$drain = list( key = c("r+000","r-020","r-040","r-060","r-080","r-10 , pattern = "rRRRR" , value = c( 0.0, 0.2, 0.4, 0.6, 0.8, 1.0) , label = c( 0.0, -0.2, -0.4, -0.6, -0.8, -1.0) - , colour = c("royalblue4","deepskyblue","yellow3","darkorange2" - ,"firebrick","#520000") + , colour = c("royalblue","deepskyblue","yellow3","gold" + ,"darkorange2","red3") , pch = c(15L,17L,12L,13L,6L,8L) , default = "r+000" - , alabel = c("Mean rainfall change [units of scale parameter]") + , alabel = paste(c("Mean rainfall change [Scale]",sep="")) )#end list scenario$dtemp = list( key = c("t+000","t+100","t+200","t+300") , desc = c("dT = +0.0 K","dT = +1.0 K","dT = +2.0 K","dT = +3.0 K") , pattern = "tTTTT" , value = c(0.0,1.0,2.0,3.0) , label = c(0.0,1.0,2.0,3.0) - , colour = c("dodgerblue","yellow3","darkorange2","firebrick") + , colour = c("dodgerblue","yellow3","darkorange2","red3") , pch = c(18L,17L,13L,6L) , default = "t+000" , alabel = c("Mean temperature change [K]") @@ -177,9 +177,10 @@ yeara = 1972 # First year we will include yeare = 2001 # First year to use in the averaged output yearz = 2011 # Last year we will include slz.min = -5.0 # The deepest depth that trees access water. -idbh.type = 2 # Type of DBH class +idbh.type = 3 # Type of DBH class # 1 -- Every 10 cm until 100cm; > 100cm # 2 -- 0-10; 10-20; 20-35; 35-50; 50-70; > 70 (cm) + # 3 -- 0-10; 10-35; 35-70; > 70 (cm) #------------------------------------------------------------------------------------------# @@ -198,24 +199,28 @@ byeold = TRUE # Remove old files of the given format? depth = 96 # PNG resolution, in pixels per inch paper = "letter" # Paper size, to define the plot shape -ptsz = 14 # Font size. +ptsz = 16 # Font size. lwidth = 2.5 # Line width plotgrid = TRUE # Should I plot the grid in the background? legwhere = "topleft" # Where should I place the legend? inset = 0.01 # Inset between legend and edge of plot region. -legbg = "white" # Legend background colour. fracexp = 0.40 # Expansion factor for y axis (to fit legend) -cex.main = 0.8 # Scale coefficient for the title +cex.main = 1.0 # Scale coefficient for the title n.colourbar = 32 # Number of colours for the colour bars n.whitebar = 1 # Number of levels around zero to be set to white notch = FALSE # Add notches to the box plots. -mtext.xoff.im = -8.50 # Offset for the x label +mtext.xoff.im = -7.00 # Offset for the x label mtext.xoff = -7.00 # Offset for the x label mtext.yoff = -1.00 # Offset for the y label mtext.xadj = 0.50 # Offset for the x label mtext.yadj = 0.65 # Offset for the y label barplot.lwd = 1.50 # Line width for the bar plots +ibackground = 2 # Background colour where the figure will be used: + # (the actual background will be transparent) + # 0 -- White + # 1 -- Pitch black + # 2 -- Dark grey #------------------------------------------------------------------------------------------# @@ -305,8 +310,8 @@ if (! file.exists(rdata.path)) dir.create(rdata.path) #------------------------------------------------------------------------------------------# # Define some dimensions. # #------------------------------------------------------------------------------------------# -pft.use = c( 1, 2, 3, 4,16, 18) # PFT classes to include (add PFT=18, the total) -pft.mp = c( F, T, T, T, F, T) # Include the PFT on multi-panel plots? +pft.use = c( 2, 3, 4, 18) # PFT classes to include (add PFT=18, the total) +pft.mp = c( T, T, T, T) # Include the PFT on multi-panel plots? pft.key = pft$key [pft.use ] # PFT keys (for dimnames) pft.desc = pft$name [pft.use ] # PFT names (for titles) pft.colour = pft$colour [pft.use ] # PFT colours @@ -346,6 +351,8 @@ n.season = length(season.use) # Number of seasons n.season.mp = n.season-1 # Number of seasons for multiple panels n.year = length(year.use) # Number of years y.sel = year.use %in% year.avg # This will select the years for the output +a.pft = npft+1 # Index for all PFTs +a.dbh = ndbh+1 # Index for all DBH classes #------------------------------------------------------------------------------------------# #------------------------------------------------------------------------------------------# @@ -361,7 +368,7 @@ dbh.suffix = paste("dbh",tolower(dbh.key),sep="-") #------------------------------------------------------------------------------------------# # This is the R object that has the simulation information. # #------------------------------------------------------------------------------------------# -rdata.siminfo = file.path(rdata.path,"SimInfo.RData") +rdata.siminfo = file.path(rdata.path,"4dbh_SimInfo.RData") #------------------------------------------------------------------------------------------# @@ -631,7 +638,7 @@ if (retrieve.siminfo && file.exists(rdata.siminfo)){ #------ Save the header. ---------------------------------------------------------------# - cat (" + Loading simulation information from ",basename(rdata.siminfo),"...","\n") + cat (" + Saving simulation information from ",basename(rdata.siminfo),"...","\n") save(simul,file=rdata.siminfo) #---------------------------------------------------------------------------------------# }#end if @@ -1003,7 +1010,9 @@ for (g in loop.global){ #----- File name for this global scenario. ---------------------------------------------# - rdata.global = file.path(rdata.path,paste("sim_",simul$global$level[g],".RData",sep="")) + rdata.global = file.path( rdata.path + , paste("4dbh_sim_",simul$global$level[g],".RData",sep="") + )#end file.path #---------------------------------------------------------------------------------------# @@ -1121,10 +1130,10 @@ for (g in loop.global){ cat (" - Reading the output from each simulation...","\n") jr = 0 n.total = n.gsel * n.real - for (j in 1:n.gsel){ + for (j in sequence(n.gsel)){ #;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;# #;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;# - for (r in 1:n.real){ + for (r in sequence(n.real)){ jr = jr + 1 #------------------------------------------------------------------------------# @@ -1135,7 +1144,9 @@ for (g in loop.global){ cat (" * Load data from file ",paste("(",jr,"/",n.total,")",sep="") ,basename(rdata.simul),"...","\n") - load (rdata.simul) + dummy = load (rdata.simul) + emean = datum$emean + szpft = datum$szpft #------------------------------------------------------------------------------# @@ -1174,8 +1185,6 @@ for (g in loop.global){ is.dbh = scen.ts$dbh [v] is.mort = scen.ts$mort [v] is.recr = scen.ts$recr [v] - var.pft = paste(var.vname,"pft" ,sep="") - var.pftdbh = paste(var.vname,"pftdbh",sep="") cat (" > Processing ",var.desc,"...","\n") #---------------------------------------------------------------------------# @@ -1186,38 +1195,24 @@ for (g in loop.global){ #---------------------------------------------------------------------------# # Grab the time series. # #---------------------------------------------------------------------------# - var.now = empty + var.now = empty if (is.pft){ - var.now[w.sel] = datum[[var.pft]][idx,pft.use[n.pft]] - }else{ - var.now[w.sel] = datum[[var.vname]][idx] - }#end if (is.pft) - #------ Find the means/sum by year and by season. --------------------------# - if (var.vname %in% c("rain","water.deficit")){ - eft[[var.vname]]$ts[j,r,,ee] = tapply( X = var.now - , INDEX = list(eft$ss.year - ,eft$ss.season) - , FUN = var.f.aggr - , na.rm = TRUE - )#end tapply - eft[[var.vname]]$ts[j,r,,e5] = tapply( X = var.now - , INDEX = eft$ss.year - , FUN = var.f.aggr - , na.rm = TRUE - )#end tapply + var.now[w.sel] = szpft[[var.vname]][idx,a.dbh,a.pft] }else{ - eft[[var.vname]]$ts[j,r,,ee] = tapply( X = var.now - , INDEX = list(eft$ss.year - ,eft$ss.season) - , FUN = var.f.aggr - , na.rm = TRUE - )#end tapply - eft[[var.vname]]$ts[j,r,,e5] = tapply( X = var.now - , INDEX = eft$ss.year - , FUN = var.f.aggr - , na.rm = TRUE - )#end tapply + var.now[w.sel] = emean[[var.vname]][idx] }#end if + #------ Find the means/sum by year and by season. --------------------------# + eft[[var.vname]]$ts[j,r,,ee] = tapply( X = var.now + , INDEX = list(eft$ss.year + ,eft$ss.season) + , FUN = var.f.aggr + , na.rm = TRUE + )#end tapply + eft[[var.vname]]$ts[j,r,,e5] = tapply( X = var.now + , INDEX = eft$ss.year + , FUN = var.f.aggr + , na.rm = TRUE + )#end tapply #---------------------------------------------------------------------------# @@ -1228,7 +1223,7 @@ for (g in loop.global){ #---------------------------------------------------------------------------# if (is.pft){ var.now = empty.pft - var.now[w.sel,] = datum[[var.pft]][idx,pft.use] + var.now[w.sel,] = szpft[[var.vname]][idx,a.dbh,pft.use] #----- Find the means/sum by year and by season. ------------------------# @@ -1258,7 +1253,7 @@ for (g in loop.global){ #---------------------------------------------------------------------------# if (is.dbh){ var.now = empty.pftdbh - var.now[w.sel,,] = datum[[var.pftdbh]][idx,dbh.use,pft.use] + var.now[w.sel,,] = szpft[[var.vname]][idx,dbh.use,pft.use] #----- Find the means/sum by year and by season. ------------------------# eft[[var.vname]]$tspftdbh[j,r,,ee,,] = qapply( X = var.now @@ -1281,10 +1276,17 @@ for (g in loop.global){ }#end for (v in 1:nscen.ts) #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# - }#end for + + #------------------------------------------------------------------------------# + # Remove the temporary variables. # + #------------------------------------------------------------------------------# + rm(datum,emean,szpft) + #------------------------------------------------------------------------------# + + }#end for (r in 1:n.real) #;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;# #;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;# - }#end for + }#end for (j in 1:n.gsel) #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# @@ -1482,6 +1484,7 @@ for (g in loop.global){ now = scenario[-simul$scenario$idxcol[s]][[1]] }#end if n.now = length(now$key) + n.lax = n.now + 2 #---------------------------------------------------------------------------------# @@ -1566,7 +1569,6 @@ for (g in loop.global){ #---------------------------------------------------------------------------# - #----- Set the title. ------------------------------------------------------# letitre = paste(var.desc," (Seasonal means)","\n",out.desc,sep="") lex = paste("Year") @@ -1619,6 +1621,7 @@ for (g in loop.global){ #----- Plot legend. -----------------------------------------------------# + par(par.user) par(mar=c(0.2,0.1,0.1,0.1)) plot.new() plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") @@ -1628,10 +1631,11 @@ for (g in loop.global){ , col = now$colour , lwd = 2.0 , pch = 16 - , bg = "white" + , bg = background , ncol = min(3,pretty.box(n.now)$ncol) , title = expression(bold("Simulation")) , cex = 1.0 + , xpd = TRUE )#end legend #------------------------------------------------------------------------# @@ -1664,7 +1668,7 @@ for (g in loop.global){ if (left ) axis(side=2) box() title(main=lesub) - if (plotgrid) grid(col="grey83",lty="solid") + if (plotgrid) grid(col=grid.colour,lty="solid") #----- Plot the lines. -----------------------------------------------# for (n in 1:n.now){ @@ -1753,43 +1757,61 @@ for (g in loop.global){ - #----- Plot window and grid. --------------------------------------------# - plot.new() - plot.window(xlim=xlimit,ylim=ylimit) - axis(side=1) - axis(side=2) - box() - title(main=letitre,xlab=lex,ylab=ley) - if (plotgrid) grid(col="grey83",lty="solid") #------------------------------------------------------------------------# - - - - #----- Plot the lines. --------------------------------------------------# - for (n in 1:n.now){ - points(x=year.use,y=this[n,,n.season],type="o",pch=16 - ,col=now$colour[n],lwd=2.0) - }#end for + # Split the window into several smaller windows. Add a bottom row # + # to fit the legend. # + #------------------------------------------------------------------------# + par.orig = par(no.readonly = TRUE) + mar.orig = par.orig$mar + layout(mat=rbind(2,1),heights=c(5,1)) #------------------------------------------------------------------------# #---- Add the legend. ---------------------------------------------------# + par.now = modifyList(x=par.user,val=list(mar=c(0.2,4.0,0.1,2.0))) + par(par.now) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") legend ( x = "topright" , inset = inset , legend = now$desc , col = now$colour , lwd = 2.0 , pch = 16 - , bg = "white" + , bg = background , ncol = min(3,pretty.box(n.now)$ncol) , title = expression(bold("Simulation")) , cex = 1.0 + , xpd = TRUE )#end legend #------------------------------------------------------------------------# + #----- Plot window and grid. --------------------------------------------# + par(par.user) + par(mar=c(5,4,4,2)+0.1) + plot.new() + plot.window(xlim=xlimit,ylim=ylimit) + axis(side=1) + axis(side=2) + box() + title(main=letitre,xlab=lex,ylab=ley,cex.main=cex.main) + if (plotgrid) grid(col=grid.colour,lty="solid") + #------------------------------------------------------------------------# + + + + #----- Plot the lines. --------------------------------------------------# + for (n in 1:n.now){ + points(x=year.use,y=this[n,,n.season],type="o",pch=16 + ,col=now$colour[n],lwd=2.0) + }#end for + #------------------------------------------------------------------------# + + + #----- Close the device. ------------------------------------------------# if (outform[o] == "x11"){ locator(n=1) @@ -1875,6 +1897,7 @@ for (g in loop.global){ # Split the window into several smaller windows. Add a bottom # # row to fit the legend. # #---------------------------------------------------------------------# + par(par.user) par.orig = par(no.readonly = TRUE) mar.orig = par.orig$mar par(oma = c(0.2,3,4.5,0)) @@ -1895,10 +1918,11 @@ for (g in loop.global){ , col = now$colour , lwd = 2.0 , pch = 16 - , bg = "white" + , bg = background , ncol = min(3,pretty.box(n.now)$ncol) , title = expression(bold("Simulation")) , cex = 1.0 + , xpd = TRUE )#end legend #---------------------------------------------------------------------# @@ -1933,8 +1957,8 @@ for (g in loop.global){ if (bottom) axis(side=1) if (left ) axis(side=2) box() - title(main=lesub) - if (plotgrid) grid(col="grey83",lty="solid") + title(main=lesub,cex.main=cex.main) + if (plotgrid) grid(col=grid.colour,lty="solid") #----- Plot the lines. --------------------------------------------# for (n in 1:n.now){ @@ -2027,7 +2051,8 @@ for (g in loop.global){ #------------------------------------------------------------------------# par.orig = par(no.readonly = TRUE) mar.orig = par.orig$mar - par(oma = c(0.2,3,4.5,0)) + par.now = modifyList(x=par.user,val=list(oma = c(0.2,3,4.5,0))) + par(par.now) layout(mat = rbind(1+lo.pft$mat,rep(1,times=lo.pft$ncol)) ,height = c(rep(5/lo.pft$nrow,times=lo.pft$nrow),1) )#end layout @@ -2045,10 +2070,11 @@ for (g in loop.global){ , col = now$colour , lwd = 2.0 , pch = 16 - , bg = "white" + , bg = background , ncol = min(3,pretty.box(n.now)$ncol) , title = expression(bold("Simulation")) , cex = 1.0 + , xpd = TRUE )#end legend #------------------------------------------------------------------------# @@ -2083,8 +2109,8 @@ for (g in loop.global){ if (bottom) axis(side=1) if (left ) axis(side=2) box() - title(main=lesub) - if (plotgrid) grid(col="grey83",lty="solid") + title(main=lesub,cex.main=cex.main) + if (plotgrid) grid(col=grid.colour,lty="solid") #----- Plot the lines. -----------------------------------------------# for (n in 1:n.now){ @@ -2192,7 +2218,7 @@ for (g in loop.global){ #---------------------------------------------------------------------------# # Set up the box plot colour. # #---------------------------------------------------------------------------# - bp.colour = rep(now$colour) + bp.colour = now$colour #---------------------------------------------------------------------------# @@ -2231,6 +2257,7 @@ for (g in loop.global){ #------------------------------------------------------------------------# par.orig = par(no.readonly = TRUE) mar.orig = par.orig$mar + par(par.user) par(oma = c(0.2,3,4.5,0)) layout(mat = lo.season$mat) #------------------------------------------------------------------------# @@ -2276,8 +2303,10 @@ for (g in loop.global){ if (bottom) axis(side=1,at=xat,labels=now$label) if (left ) axis(side=2) box() - title(main=lesub) - if (plotgrid) abline(v=xgrid,h=axTicks(2),col="grey40",lty="solid") + title(main=lesub,cex.main=cex.main) + if (plotgrid){ + abline(v=xgrid,h=axTicks(2),col=grid.colour,lty="solid") + }#end if #----- Add the box plot, without the x axis. -------------------------# boxplot(x=bp.plot,col=bp.colour,notch=notch,add=TRUE,show.names=FALSE @@ -2292,7 +2321,7 @@ for (g in loop.global){ # Plot the global title. # #------------------------------------------------------------------------# par(las=0) - mtext(text=lex ,side=1,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff/3) + mtext(text=lex,side=1,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff/3) mtext(text=ley ,side=2,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) mtext(text=letitre,side=3,outer=TRUE,cex=1.1,font=2) #------------------------------------------------------------------------# @@ -2316,7 +2345,7 @@ for (g in loop.global){ #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# - # Plot the box plot by PFT (annual means). # + # Plot the box plot (annual means). # #---------------------------------------------------------------------------# xlimit = c(0,n.now) + 0.5 xat = sequence(n.now) @@ -2391,13 +2420,14 @@ for (g in loop.global){ #----- Plot window and grid. --------------------------------------------# + par(par.user) plot.new() plot.window(xlim=xlimit,ylim=ylimit,xaxt="n",yaxt="n") axis(side=1,at=xat,labels=now$label) axis(side=2) box() - title(main=letitre,xlab=lex,ylab=ley) - if (plotgrid) abline(v=xgrid,h=axTicks(2),col="grey40",lty="solid") + title(main=letitre,xlab=lex,ylab=ley,cex.main=cex.main) + if (plotgrid) abline(v=xgrid,h=axTicks(2),col=grid.colour,lty="solid") #----- Add the box plot, without the x axis. ----------------------------# boxplot(x=bp.plot,col=bp.colour,notch=notch,add=TRUE,show.names=FALSE ,yaxt="n") @@ -2431,9 +2461,9 @@ for (g in loop.global){ #---------------------------------------------------------------------------# # Plot the box plot by PFT and by season. # #---------------------------------------------------------------------------# - xlimit = c(0,n.pft.bp*n.now) + 0.5 - xat = seq(from=1 + 0.5*(n.now-1), to=n.pft.bp*n.now, by=n.now) - xgrid = seq(from=0.5, to=(n.pft.bp+1)*n.now - 0.5*(n.now-1),by=n.now) + xlimit = c(0,n.pft.bp*n.lax) + 0.5 + xat = seq(from=1 + 0.5*(n.lax-1), to=n.pft.bp*n.lax, by=n.lax) + xgrid = seq(from=0.5, to=(n.pft.bp+1)*n.lax - 0.5*(n.lax-1),by=n.lax) #---------------------------------------------------------------------------# @@ -2463,7 +2493,9 @@ for (g in loop.global){ #---------------------------------------------------------------------------# # Set up the box plot colour. # #---------------------------------------------------------------------------# - bp.colour = rep(now$colour,times=n.pft.bp) + bp.colour = rep( x = c("transparent",now$colour,"transparent") + , times = n.pft.bp + )#end rep #---------------------------------------------------------------------------# @@ -2500,6 +2532,7 @@ for (g in loop.global){ # Split the window into several smaller windows. Add a bottom row # # to fit the legend. # #------------------------------------------------------------------------# + par(par.user) par.orig = par(no.readonly = TRUE) mar.orig = par.orig$mar par(oma = c(0.2,3,4.5,0)) @@ -2518,11 +2551,12 @@ for (g in loop.global){ , inset = 0.0 , legend = now$desc , fill = now$colour - , border = "black" - , bg = "white" + , border = foreground + , bg = background , ncol = min(3,pretty.box(n.now)$ncol) , title = expression(bold("Simulation")) , cex = 1.0 + , xpd = TRUE )#end legend #------------------------------------------------------------------------# @@ -2553,6 +2587,11 @@ for (g in loop.global){ #----- Create the temporary box plot list. ---------------------------# ss.this = this[,,e,] + empty = array( data = NA + , dim = dim(ss.this)[-1] + , dimnames = dimnames(ss.this)[-1] + )#end array + ss.this = abind(aaa=empty,ss.this,zzz=empty,along=1) ai = arrayInd(sequence(length(ss.this)),.dim=dim(ss.this)) bp.plot = split(x=ss.this,f=list(ai[,1],ai[,3])) #---------------------------------------------------------------------# @@ -2567,8 +2606,8 @@ for (g in loop.global){ if (bottom) axis(side=1,at=xat,labels=pft.key[pft.bp]) if (left ) axis(side=2) box() - title(main=lesub) - if (plotgrid) abline(v=xgrid,h=axTicks(2),col="grey40",lty="solid") + title(main=lesub,cex.main=cex.main) + if (plotgrid) abline(v=xgrid,h=axTicks(2),col=grid.colour,lty="solid") #----- Add the box plot, without the x axis. -------------------------# boxplot(x=bp.plot,col=bp.colour,notch=notch,add=TRUE,show.names=FALSE @@ -2609,9 +2648,9 @@ for (g in loop.global){ #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# # Plot the box plot by PFT (annual means). # #---------------------------------------------------------------------------# - xlimit = c(0,n.pft.bp*n.now) + 0.5 - xat = seq(from=1 + 0.5*(n.now-1), to=n.pft.bp*n.now, by=n.now) - xgrid = seq(from=0.5, to=(n.pft.bp+1)*n.now - 0.5*(n.now-1),by=n.now) + xlimit = c(0,n.pft.bp*n.lax) + 0.5 + xat = seq(from=1 + 0.5*(n.lax-1), to=n.pft.bp*n.lax, by=n.lax) + xgrid = seq(from=0.5, to=(n.pft.bp+1)*n.lax - 0.5*(n.lax-1),by=n.lax) #---------------------------------------------------------------------------# @@ -2642,7 +2681,7 @@ for (g in loop.global){ #---------------------------------------------------------------------------# # Set up the box plot colour. # #---------------------------------------------------------------------------# - bp.colour = rep(now$colour,times=n.pft.bp) + bp.colour = rep(c("transparent",now$colour,"transparent"),times=n.pft.bp) #---------------------------------------------------------------------------# @@ -2675,12 +2714,18 @@ for (g in loop.global){ #----- Create the temporary box plot list. ------------------------------# - ai = arrayInd(sequence(length(this)),.dim=dim(this)) - bp.plot = split(x=this,f=list(ai[,1],ai[,3])) + empty = array( data = NA + , dim = dim(this)[-1] + , dimnames = dimnames(this)[-1] + )#end array + ss.this = abind(aaa=empty,this,zzz=empty,along=1) + ai = arrayInd(sequence(length(ss.this)),.dim=dim(ss.this)) + bp.plot = split(x=ss.this,f=list(ai[,1],ai[,3])) #------------------------------------------------------------------------# #----- Split into two plots. --------------------------------------------# + par(par.user) layout(mat=matrix(c(2,1),nrow=2),heights=c(5,1)) #------------------------------------------------------------------------# @@ -2694,11 +2739,12 @@ for (g in loop.global){ , inset = inset , legend = now$desc , fill = now$colour - , border = "black" - , bg = "white" + , border = foreground + , bg = background , ncol = min(3,pretty.box(n.now)$ncol) , title = expression(bold("Simulation")) , cex = 1.0 + , xpd = TRUE )#end legend #------------------------------------------------------------------------# @@ -2711,8 +2757,8 @@ for (g in loop.global){ axis(side=1,at=xat,labels=pft.key[pft.bp]) axis(side=2) box() - title(main=letitre,xlab=lex,ylab=ley) - if (plotgrid) abline(v=xgrid,h=axTicks(2),col="grey40",lty="solid") + title(main=letitre,xlab=lex,ylab=ley,cex.main=cex.main) + if (plotgrid) abline(v=xgrid,h=axTicks(2),col=grid.colour,lty="solid") #----- Add the box plot, without the x axis. ----------------------------# boxplot(x=bp.plot,col=bp.colour,notch=notch,add=TRUE,show.names=FALSE ,yaxt="n") @@ -2746,9 +2792,9 @@ for (g in loop.global){ #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# # Plot the box plot by PFT and by season. # #---------------------------------------------------------------------------# - xlimit = c(0,n.dbh*n.now) + 0.5 - xat = seq(from=1 + 0.5*(n.now-1), to=n.dbh*n.now, by=n.now) - xgrid = seq(from=0.5, to=(n.dbh+1)*n.now - 0.5*(n.now-1), by=n.now) + xlimit = c(0,n.dbh*n.lax) + 0.5 + xat = seq(from=1 + 0.5*(n.lax-1), to=n.dbh*n.lax, by=n.lax) + xgrid = seq(from=0.5, to=(n.dbh+1)*n.lax - 0.5*(n.lax-1), by=n.lax) #---------------------------------------------------------------------------# @@ -2779,7 +2825,7 @@ for (g in loop.global){ #---------------------------------------------------------------------------# # Set up the box plot colour. # #---------------------------------------------------------------------------# - bp.colour = rep(now$colour,times=n.dbh) + bp.colour = rep(c("transparent",now$colour,"transparent"),times=n.dbh) #---------------------------------------------------------------------------# @@ -2818,6 +2864,7 @@ for (g in loop.global){ #------------------------------------------------------------------------# par.orig = par(no.readonly = TRUE) mar.orig = par.orig$mar + par(par.user) par(oma = c(0.2,3,4.5,0)) layout(mat = rbind(1+lo.season$mat,rep(1,times=lo.season$ncol)) ,height = c(rep(5/lo.season$nrow,times=lo.season$nrow),1) @@ -2834,11 +2881,12 @@ for (g in loop.global){ , inset = 0.0 , legend = now$desc , fill = now$colour - , border = "black" - , bg = "white" + , border = foreground + , bg = background , ncol = min(3,pretty.box(n.now)$ncol) , title = expression(bold("Simulation")) , cex = 1.0 + , xpd = TRUE )#end legend #------------------------------------------------------------------------# @@ -2869,6 +2917,11 @@ for (g in loop.global){ #----- Create the temporary box plot list. ---------------------------# ss.this = this[,,e,] + empty = array( data = NA + , dim = dim(ss.this)[-1] + , dimnames = dimnames(ss.this)[-1] + )#end array + ss.this = abind(aaa=empty,ss.this,zzz=empty,along=1) ai = arrayInd(sequence(length(ss.this)),.dim=dim(ss.this)) bp.plot = split(x=ss.this,f=list(ai[,1],ai[,3])) #---------------------------------------------------------------------# @@ -2882,8 +2935,8 @@ for (g in loop.global){ if (bottom) axis(side=1,at=xat,labels=dbh.key) if (left ) axis(side=2) box() - title(main=lesub) - if (plotgrid) abline(v=xgrid,h=axTicks(2),col="grey40",lty="solid") + title(main=lesub,cex.main=cex.main) + if (plotgrid) abline(v=xgrid,h=axTicks(2),col=grid.colour,lty="solid") #----- Add the box plot, without the x axis. -------------------------# boxplot(x=bp.plot,col=bp.colour,notch=notch,add=TRUE,show.names=FALSE @@ -2925,9 +2978,9 @@ for (g in loop.global){ #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# # Plot the box plot by DBH (annual means). # #---------------------------------------------------------------------------# - xlimit = c(0,n.dbh*n.now) + 0.5 - xat = seq(from=1 + 0.5*(n.now-1), to=n.dbh*n.now, by=n.now) - xgrid = seq(from=0.5, to=(n.dbh+1)*n.now - 0.5*(n.now-1), by=n.now) + xlimit = c(0,n.dbh*n.lax) + 0.5 + xat = seq(from=1 + 0.5*(n.lax-1), to=n.dbh*n.lax, by=n.lax) + xgrid = seq(from=0.5, to=(n.dbh+1)*n.lax - 0.5*(n.lax-1), by=n.lax) #---------------------------------------------------------------------------# @@ -2958,7 +3011,7 @@ for (g in loop.global){ #---------------------------------------------------------------------------# # Set up the box plot colour. # #---------------------------------------------------------------------------# - bp.colour = rep(now$colour,times=n.dbh) + bp.colour = rep(c("transparent",now$colour,"transparent"),times=n.dbh) #---------------------------------------------------------------------------# @@ -2992,12 +3045,18 @@ for (g in loop.global){ #----- Create the temporary box plot list. ------------------------------# - ai = arrayInd(sequence(length(this)),.dim=dim(this)) - bp.plot = split(x=this,f=list(ai[,1],ai[,3])) + empty = array( data = NA + , dim = dim(this)[-1] + , dimnames = dimnames(this)[-1] + )#end array + ss.this = abind(aaa=empty,this,zzz=empty,along=1) + ai = arrayInd(sequence(length(ss.this)),.dim=dim(ss.this)) + bp.plot = split(x=ss.this,f=list(ai[,1],ai[,3])) #------------------------------------------------------------------------# #----- Split into two plots. --------------------------------------------# + par(par.user) layout(mat=matrix(c(2,1),nrow=2),heights=c(5,1)) #------------------------------------------------------------------------# @@ -3011,11 +3070,12 @@ for (g in loop.global){ , inset = inset , legend = now$desc , fill = now$colour - , border = "black" - , bg = "white" + , border = foreground + , bg = background , ncol = min(3,pretty.box(n.now)$ncol) , title = expression(bold("Simulation")) , cex = 1.0 + , xpd = TRUE )#end legend #------------------------------------------------------------------------# @@ -3028,8 +3088,8 @@ for (g in loop.global){ axis(side=1,at=xat,labels=dbh.key) axis(side=2) box() - title(main=letitre,xlab=lex,ylab=ley) - if (plotgrid) abline(v=xgrid,h=axTicks(2),col="grey40",lty="solid") + title(main=letitre,xlab=lex,ylab=ley,cex.main=cex.main) + if (plotgrid) abline(v=xgrid,h=axTicks(2),col=grid.colour,lty="solid") #----- Add the box plot, without the x axis. ----------------------------# boxplot(x=bp.plot,col=bp.colour,notch=notch,add=TRUE,show.names=FALSE @@ -3071,9 +3131,9 @@ for (g in loop.global){ #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# # Plot the box plot by PFT and by season. # #------------------------------------------------------------------------# - xlimit = c(0,n.pft.bp*n.now) + 0.5 - xat = seq(from=1 + 0.5*(n.now-1), to=n.pft.bp*n.now, by=n.now) - xgrid = seq(from=0.5,to=(n.pft.bp+1)*n.now-0.5*(n.now-1),by=n.now) + xlimit = c(0,n.dbh*n.lax) + 0.5 + xat = seq(from=1 + 0.5*(n.lax-1), to=n.dbh*n.lax, by=n.lax) + xgrid = seq(from=0.5,to=(n.dbh+1)*n.lax-0.5*(n.lax-1),by=n.lax) #------------------------------------------------------------------------# @@ -3106,7 +3166,7 @@ for (g in loop.global){ #------------------------------------------------------------------------# # Set up the box plot colour. # #------------------------------------------------------------------------# - bp.colour = rep(now$colour,times=n.dbh) + bp.colour = rep(c("transparent",now$colour,"transparent"),times=n.dbh) #------------------------------------------------------------------------# @@ -3145,6 +3205,7 @@ for (g in loop.global){ #---------------------------------------------------------------------# par.orig = par(no.readonly = TRUE) mar.orig = par.orig$mar + par(par.user) par(oma = c(0.2,3,4.5,0)) layout(mat = rbind(1+lo.pft$mat,rep(1,times=lo.pft$ncol)) ,height = c(rep(5/lo.pft$nrow,times=lo.pft$nrow),1) @@ -3161,11 +3222,12 @@ for (g in loop.global){ , inset = 0.0 , legend = now$desc , fill = now$colour - , border = "black" - , bg = "white" + , border = foreground + , bg = background , ncol = min(3,pretty.box(n.now)$ncol) , title = expression(bold("Simulation")) , cex = 1.0 + , xpd = TRUE )#end legend #---------------------------------------------------------------------# @@ -3196,6 +3258,11 @@ for (g in loop.global){ #----- Create the temporary box plot list. ------------------------# ss.this = this[,,,f] + empty = array( data = NA + , dim = dim(ss.this)[-1] + , dimnames = dimnames(ss.this)[-1] + )#end array + ss.this = abind(aaa=empty,ss.this,zzz=empty,along=1) ai = arrayInd(sequence(length(ss.this)),.dim=dim(ss.this)) bp.plot = split(x=ss.this,f=list(ai[,1],ai[,3])) #------------------------------------------------------------------# @@ -3209,8 +3276,10 @@ for (g in loop.global){ if (bottom) axis(side=1,at=xat,labels=dbh.key) if (left ) axis(side=2) box() - title(main=lesub) - if (plotgrid) abline(v=xgrid,h=axTicks(2),col="grey40",lty="solid") + title(main=lesub,cex.main=cex.main) + if (plotgrid){ + abline(v=xgrid,h=axTicks(2),col=grid.colour,lty="solid") + }#end if #----- Add the box plot, without the x axis. ----------------------# boxplot(x=bp.plot,col=bp.colour,notch=notch,add=TRUE @@ -3374,8 +3443,8 @@ for (g in loop.global){ #----- Find the limits for the plot. ---------------------------------------# xlimit = range(c(xat,xgrid)) - yrange = pretty.xylim(u=this,fracexp= 0.00,is.log=var.plog) - ylimit = pretty.xylim(u=this,fracexp=-0.06,is.log=var.plog) + yrange = pretty.xylim(u=c(ybottom,ytop),fracexp= 0.00,is.log=var.plog) + ylimit = pretty.xylim(u=yrange,fracexp=-0.06,is.log=var.plog) #---------------------------------------------------------------------------# @@ -3421,6 +3490,7 @@ for (g in loop.global){ #------------------------------------------------------------------------# par.orig = par(no.readonly = TRUE) mar.orig = par.orig$mar + par(par.user) par(oma = c(0.2,3,4.5,0)) emat = matrix( data = c( rep(2+t(lo.season$mat),each=2) @@ -3447,10 +3517,11 @@ for (g in loop.global){ , inset = 0.0 , legend = now$desc , fill = now$colour - , bg = "white" + , bg = background , ncol = min(3,pretty.box(n.now)$ncol) , title = expression(bold("Simulation")) - , cex = 1.0 + , cex = 0.8 + , xpd = TRUE )#end legend #------------------------------------------------------------------------# @@ -3464,11 +3535,12 @@ for (g in loop.global){ , inset = 0.0 , legend = pft.desc [pft.bp] , fill = pft.colour[pft.bp] - , border = "black" - , bg = "white" + , border = foreground + , bg = background , ncol = min(2,pretty.box(n.pft.bp)$ncol) , title = expression(bold("Plant Functional Type")) - , cex = 1.0 + , cex = 0.8 + , xpd = TRUE )#end legend #------------------------------------------------------------------------# @@ -3504,8 +3576,8 @@ for (g in loop.global){ if (bottom) axis(side=1,at=xat,labels=dbh.key) if (left ) axis(side=2) box() - title(main=lesub) - if (plotgrid) abline(v=xgrid,h=axTicks(2),col="grey40",lty="solid") + title(main=lesub,cex.main=cex.main) + if (plotgrid) abline(v=xgrid,h=axTicks(2),col=grid.colour,lty="solid") #---------------------------------------------------------------------# @@ -3517,7 +3589,7 @@ for (g in loop.global){ , ytop = ytop [,,e] , density = -1 , col = fill.col - , border = "black" + , border = foreground , lwd = barplot.lwd )#end rect #---------------------------------------------------------------------# @@ -3659,8 +3731,8 @@ for (g in loop.global){ #----- Find the limits for the plot. ---------------------------------------# xlimit = range(c(xat,xgrid)) - yrange = pretty.xylim(u=this,fracexp= 0.00,is.log=var.plog) - ylimit = pretty.xylim(u=this,fracexp=-0.06,is.log=var.plog) + yrange = pretty.xylim(u=c(ybottom,ytop),fracexp= 0.00,is.log=var.plog) + ylimit = pretty.xylim(u=yrange,fracexp=-0.06,is.log=var.plog) #---------------------------------------------------------------------------# @@ -3706,6 +3778,7 @@ for (g in loop.global){ #------------------------------------------------------------------------# par.orig = par(no.readonly = TRUE) emat = matrix(c(3,3,1,2),ncol=2,nrow=2,byrow=T) + par(par.user) layout(mat=emat,heights=c(5,1)) #------------------------------------------------------------------------# @@ -3719,10 +3792,11 @@ for (g in loop.global){ , inset = 0.0 , legend = now$desc , fill = now$colour - , bg = "white" + , bg = background , ncol = min(3,pretty.box(n.now)$ncol) , title = expression(bold("Simulation")) - , cex = 1.0 + , cex = 0.8 + , xpd = TRUE )#end legend #------------------------------------------------------------------------# @@ -3736,11 +3810,12 @@ for (g in loop.global){ , inset = 0.0 , legend = pft.desc [pft.bp] , fill = pft.colour[pft.bp] - , border = "black" - , bg = "white" + , border = foreground + , bg = background , ncol = min(3,pretty.box(n.pft.bp)$ncol) , title = expression(bold("Plant Functional Type")) - , cex = 1.0 + , cex = 0.8 + , xpd = TRUE )#end legend #------------------------------------------------------------------------# @@ -3754,8 +3829,8 @@ for (g in loop.global){ axis(side=1,at=xat,labels=dbh.key) axis(side=2) box() - title(main=letitre,xlab=lex,ylab=ley) - if (plotgrid) abline(v=xgrid,h=axTicks(2),col="grey40",lty="solid") + title(main=letitre,xlab=lex,ylab=ley,cex.main=cex.main) + if (plotgrid) abline(v=xgrid,h=axTicks(2),col=grid.colour,lty="solid") #------------------------------------------------------------------------# @@ -3767,7 +3842,7 @@ for (g in loop.global){ , ytop = ytop , density = -1 , col = fill.col - , border = "black" + , border = foreground , lwd = barplot.lwd )#end rect #------------------------------------------------------------------------# @@ -3964,6 +4039,7 @@ for (g in loop.global){ #------------------------------------------------------------------# leg.ncol = min(3,pretty.box(n.now)$ncol) leg.letitre = expression(bold("Simulation")) + par(par.user) xyz.plot( x = x.list , y = y.list , z = z.list @@ -3984,19 +4060,21 @@ for (g in loop.global){ , adj = mtext.yadj , padj = mtext.yoff )#end list - , xyz.more = list(grid=list(col="grey83",lty="solid")) + , xyz.more = list(grid=list(col=grid.colour + ,lty="solid")) , key.log = z.plog - , key.title = list(main=lacle,cex.main=0.8) + , key.title = list(main=lacle,cex.main=0.8*cex.main) , xyz.legend = list( x = "bottom" , inset = 0.0 , legend = now$desc , pch = now$pch - , col = "grey16" - , border = "black" - , bg = "white" + , col = grey.fg + , border = foreground + , bg = background , ncol = leg.ncol , title = leg.letitre - , cex = 1.2 + , cex = 1.0 + , xpd = TRUE )#end legend )#end xyz.plot #------------------------------------------------------------------# @@ -4074,6 +4152,7 @@ for (g in loop.global){ #------------------------------------------------------------------# # Plot the boxes. # #------------------------------------------------------------------# + par(par.user) leg.ncol = min(3,pretty.box(n.now)$ncol) leg.title = expression(bold("Simulation")) xyz.plot( x = x.list @@ -4096,19 +4175,21 @@ for (g in loop.global){ , adj = mtext.yadj , padj = mtext.yoff )#end list - , xyz.more = list(grid=list(col="grey83",lty="solid")) + , xyz.more = list(grid=list(col=grid.colour + ,lty="solid")) , key.log = z.plog - , key.title = list(main=lacle,cex.main=0.8) + , key.title = list(main=lacle,cex.main=0.8*cex.main) , xyz.legend = list( x = "bottom" , inset = 0.0 , legend = now$desc , pch = now$pch - , col = "grey16" - , border = "black" - , bg = "white" + , col = grey.fg + , border = foreground + , bg = background , ncol = leg.ncol , title = leg.title , cex = 1.0 + , xpd = TRUE )#end legend )#end xyz.plot #------------------------------------------------------------------# @@ -4289,6 +4370,7 @@ for (g in loop.global){ # Plot the data by season. # #---------------------------------------------------------------------------------# for (e in 1:n.season){ + #------------------------------------------------------------------------------# # Keep the current season only. # #------------------------------------------------------------------------------# @@ -4405,14 +4487,14 @@ for (g in loop.global){ #---------------------------------------------------------------------------# # Split the plotting window. # #---------------------------------------------------------------------------# + par(par.user) par(oma = c(0.2,3,4.5,0)) layout( mat = rbind(lo.panel$mat+1,rep(1,times=lo.panel$ncol)) - , heights = c(rep(5/lo.panel$nrow,lo.panel$nrow),1) + , heights = c(rep(4/lo.panel$nrow,lo.panel$nrow),1) )#end layout #---------------------------------------------------------------------------# - #---------------------------------------------------------------------------# # Plot the legend. What goes into the legend depends on the number of # # scenarios. # @@ -4429,6 +4511,7 @@ for (g in loop.global){ , lwd = 2.5 , title = expression(bold(now$alabel)) , cex = 1.0 + , xpd = TRUE )#end legend }else{ par(mar=c(3,3,2,3)+0.1) @@ -4439,7 +4522,7 @@ for (g in loop.global){ box() axis(side=1,at=legat) title(main=paste(var.desc," change [",var.unit,"]",sep="") - ,xlab="",ylab="") + ,xlab="",ylab="",cex.main=cex.main) }#end if #---------------------------------------------------------------------------# @@ -4478,9 +4561,9 @@ for (g in loop.global){ if (bottom) axis(side=1,at=x.value,labels=x.label) if (left) axis(side=2) box() - grid(col="grey60",lty="solid") - title(main=lesub) - abline(h=0,v=0,col="black",lty="dotdash",lwd=2.0) + grid(col=grid.colour,lty="solid") + title(main=lesub,cex.main=cex.main) + abline(h=0,v=0,col=foreground,lty="dotdash",lwd=2.0) for (n in 1:n.now){ points(x = now$value,y=this.var[p,],type="o",col=now$colour[n] ,pch=16,lwd=2.5) @@ -4488,8 +4571,8 @@ for (g in loop.global){ }else{ image(x=x.value,y=y.value,z=this.var[p,,],col=var.colours ,breaks=var.brks - ,xaxt="n",yaxt="n",main=lesub,xlab="",ylab="") - text (x=0,y=0,labels="0",col="black",font=2,cex=2) + ,xaxt="n",yaxt="n",main=lesub,cex.main=cex.main,xlab="",ylab="") + text (x=0,y=0,labels="0",col=foreground,font=2,cex=2) if (bottom) axis(side=1,at=x.value,labels=x.label) if (left) axis(side=2,at=y.value,labels=y.label) }#end if @@ -4504,9 +4587,9 @@ for (g in loop.global){ #---------------------------------------------------------------------------# par(las=0) if (n.scenario == 1){ - mtext(side=1,text=lex ,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) + mtext(side=1,text=lex,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) }else{ - mtext(side=1,text=lex ,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff.im) + mtext(side=1,text=lex,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff.im) }#end if mtext(side=2,text=ley ,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) mtext(side=3,text=letitre,outer=TRUE,cex=1.10,font=2) @@ -4761,9 +4844,10 @@ for (g in loop.global){ #------------------------------------------------------------------------# # Split the plotting window. # #------------------------------------------------------------------------# + par(par.user) par(oma = c(0.2,3,4.5,0)) layout( mat = rbind(lo.panel$mat+1,rep(1,times=lo.panel$ncol)) - , heights = c(rep(5/lo.panel$nrow,lo.panel$nrow),1) + , heights = c(rep(4/lo.panel$nrow,lo.panel$nrow),1) )#end layout #------------------------------------------------------------------------# @@ -4785,6 +4869,7 @@ for (g in loop.global){ , lwd = 2.5 , title = expression(bold(now$alabel)) , cex = 1.0 + , xpd = TRUE )#end legend }else{ par(mar=c(3,3,2,3)+0.1) @@ -4796,7 +4881,7 @@ for (g in loop.global){ box() axis(side=1,at=legat) title(main=paste(var.desc," change [",var.unit,"]",sep="") - ,xlab="",ylab="") + ,xlab="",ylab="",cex.main=cex.main) }#end if #------------------------------------------------------------------------# @@ -4835,9 +4920,9 @@ for (g in loop.global){ if (bottom) axis(side=1,at=x.value,labels=x.label) if (left) axis(side=2) box() - grid(col="grey60",lty="solid") - title(main=lesub) - abline(h=0,v=0,col="black",lty="dotdash",lwd=2.0) + grid(col=grid.colour,lty="solid") + title(main=lesub,cex.main=cex.main) + abline(h=0,v=0,col=foreground,lty="dotdash",lwd=2.0) for (n in 1:n.now){ points(x = now$value,y=this.var[p,],type="o",col=now$colour[n] ,pch=16,lwd=2.5) @@ -4845,8 +4930,9 @@ for (g in loop.global){ }else{ image(x=scenario[[1]]$value,y=scenario[[2]]$value ,z=this.var[p,,],col=var.colours,breaks=var.brks - ,xaxt="n",yaxt="n",main=lesub,xlab="",ylab="") - text (x=0,y=0,labels="0",col="black",font=2,cex=2) + ,xaxt="n",yaxt="n",main=lesub,xlab="",ylab="" + ,cex.main=cex.main) + text (x=0,y=0,labels="0",col=foreground,font=2,cex=2) if (bottom) axis(side=1,at=x.value,labels=x.label) if (left) axis(side=2,at=y.value,labels=y.label) }#end if @@ -4861,9 +4947,9 @@ for (g in loop.global){ #------------------------------------------------------------------------# par(las=0) if (n.scenario == 1){ - mtext(side=1,text=lex ,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) + mtext(side=1,text=lex,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) }else{ - mtext(side=1,text=lex ,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff.im) + mtext(side=1,text=lex,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff.im) }#end if mtext(side=2,text=ley ,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) mtext(side=3,text=letitre,outer=TRUE,cex=1.0,font=2) @@ -5120,9 +5206,10 @@ for (g in loop.global){ #------------------------------------------------------------------------# # Split the plotting window. # #------------------------------------------------------------------------# + par(par.user) par(oma = c(0.2,3,4.5,0)) layout( mat = rbind(lo.panel$mat+1,rep(1,times=lo.panel$ncol)) - , heights = c(rep(5/lo.panel$nrow,lo.panel$nrow),1) + , heights = c(rep(4/lo.panel$nrow,lo.panel$nrow),1) )#end layout #------------------------------------------------------------------------# @@ -5144,6 +5231,7 @@ for (g in loop.global){ , lwd = 2.5 , title = expression(bold(now$alabel)) , cex = 1.0 + , xpd = TRUE )#end legend }else{ par(mar=c(3,3,2,3)+0.1) @@ -5155,7 +5243,7 @@ for (g in loop.global){ box() axis(side=1,at=legat) title(main=paste(var.desc," change [",var.unit,"]",sep="") - ,xlab="",ylab="") + ,xlab="",ylab="",cex.main=cex.main) }#end if #------------------------------------------------------------------------# @@ -5194,9 +5282,9 @@ for (g in loop.global){ if (bottom) axis(side=1,at=x.value,labels=x.label) if (left) axis(side=2) box() - grid(col="grey60",lty="solid") - title(main=lesub) - abline(h=0,v=0,col="black",lty="dotdash",lwd=2.0) + grid(col=grid.colour,lty="solid") + title(main=lesub,cex.main=cex.main) + abline(h=0,v=0,col=foreground,lty="dotdash",lwd=2.0) for (n in 1:n.now){ points(x = now$value,y=this.var[p,],type="o",col=now$colour[n] ,pch=16,lwd=2.5) @@ -5204,8 +5292,9 @@ for (g in loop.global){ }else{ image(x=scenario[[1]]$value,y=scenario[[2]]$value ,z=this.var[p,,],col=var.colours,breaks=var.brks - ,xaxt="n",yaxt="n",main=lesub,xlab="",ylab="") - text (x=0,y=0,labels="0",col="black",font=2,cex=2) + ,xaxt="n",yaxt="n",main=lesub,xlab="",ylab="" + ,cex.main=cex.main) + text (x=0,y=0,labels="0",col=foreground,font=2,cex=2) if (bottom) axis(side=1,at=x.value,labels=x.label) if (left) axis(side=2,at=y.value,labels=y.label) }#end if @@ -5220,9 +5309,9 @@ for (g in loop.global){ #------------------------------------------------------------------------# par(las=0) if (n.scenario == 1){ - mtext(side=1,text=lex ,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) + mtext(side=1,text=lex,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) }else{ - mtext(side=1,text=lex ,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff.im) + mtext(side=1,text=lex,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff.im) }#end if mtext(side=2,text=ley ,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) mtext(side=3,text=letitre,outer=TRUE,cex=1.0,font=2) diff --git a/ED/Template/epost.sh b/ED/Template/epost.sh index e7b5cc553..d9e01b336 100755 --- a/ED/Template/epost.sh +++ b/ED/Template/epost.sh @@ -34,6 +34,11 @@ outform='c("eps","png","pdf")' # x11 - On screen (deprecated on shell scripts) idbhtype=2 # Type of DBH class # 1 -- Every 10 cm until 100cm; > 100cm # 2 -- 0-10; 10-20; 20-35; 35-50; 50-70; > 70 (cm) + # 3 -- 0-10; 10-35; 35-70; > 70 (cm) +#----- Default background colour. ---------------------------------------------------------# +background=2 # 0 -- White + # 1 -- Pitch black + # 2 -- Dark grey #------------------------------------------------------------------------------------------# @@ -46,6 +51,7 @@ idbhtype=2 # Type of DBH class # - plot_monthly.r - This creates several plots based on the monthly mean output. # # - plot_yearly.r - This creates plots with year time series. # # - plot_ycomp.r - This creates yearly comparisons based on the monthly mean output. # +# - plot_povray.r - This creates yearly plots of the polygon using POV-Ray. # # - plot_rk4.r - This creates plots from the detailed output for Runge-Kutta. # # (patch-level only). # # - plot_photo.r - This creates plots from the detailed output for Farquhar-Leuning. # @@ -341,7 +347,7 @@ do # Set up the time and output variables according to the script. # #------------------------------------------------------------------------------------# case ${script} in - read_monthly.r|plot_monthly.r|plot_yearly.r|plot_ycomp.r|plot_census.r) + read_monthly.r|plot_monthly.r|plot_yearly.r|plot_ycomp.r|plot_census.r|plot_povray.r) #---------------------------------------------------------------------------------# # Scripts that are based on monthly means. The set up is the same, the only # # difference is in the output names. # @@ -428,6 +434,12 @@ do epostlsf='pcen_epost.lsf' epostjob='eb-pcen-'${polyname} ;; + plot_povray.r) + epostout='ppov_epost.out' + epostsh='ppov_epost.sh' + epostlsf='ppov_epost.lsf' + epostjob='eb-ppov-'${polyname} + ;; esac #---------------------------------------------------------------------------------# ;; @@ -712,6 +724,7 @@ do sed -i s@mybiocyca@${biocyca}@g ${here}/${polyname}/${script} sed -i s@mybiocycz@${biocycz}@g ${here}/${polyname}/${script} sed -i s@myidbhtype@${idbhtype}@g ${here}/${polyname}/${script} + sed -i s@mybackground@${background}@g ${here}/${polyname}/${script} #------------------------------------------------------------------------------------# diff --git a/ED/Template/joborder.txt b/ED/Template/joborder.txt index f2d40d794..6b5759816 100644 --- a/ED/Template/joborder.txt +++ b/ED/Template/joborder.txt @@ -1,107 +1,107 @@ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- POLYGON_NAME IATA LONGITUDE LATITUDE YEARA MONTHA DAYA TIMEA YEARZ MONTHZ DAYZ TIMEZ INIT_MODE ISCENARIO ISIZEPFT ISOIL NTEXT SAND CLAY DEPTH ISOILBC SLDRAIN COLOUR SLZRES QUEUE MET_DRIVER DTLSM VMFACT_C3 VMFACT_C4 MPHOTO_TRC3 MPHOTO_TEC3 MPHOTO_C4 BPHOTO_BLC3 BPHOTO_NLC3 BPHOTO_C4 KW_GRASS KW_TREE GAMMA_C3 GAMMA_C4 D0_GRASS D0_TREE ALPHA_C3 ALPHA_C4 KLOWCO2 DECOMP_SCHEME RRFFACT GROWTHRESP LWIDTH_GRASS LWIDTH_BLTREE LWIDTH_NLTREE Q10_C3 Q10_C4 H2O_LIMIT IMORT_SCHEME DDMORT_CONST ISFCLYRM ICANTURB UBMIN UGBMIN USTMIN GAMM GAMH TPRANDTL RIBMAX ATMCO2 THCRIT SM_FIRE IFIRE FIRE_PARM IPERCOL RUNOFF_TIME IMETRAD IBRANCH ICANRAD CROWN_MOD LTRANS_VIS LREFLECT_VIS LTRANS_NIR LREFLECT_NIR ORIENT_TREE ORIENT_GRASS CLUMP_TREE CLUMP_GRASS IVEGTDYN IGNDVAP IPHEN IALLOM IBIGLEAF IREPRO TREEFALL ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -harvard hvd -72.170 42.540 1199 05 01 0000 1700 01 01 0000 6 0 0 2 2 -1.000 -1.000 E 1 90 14 0 moorcroft_6100b Harvard 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -tonzi tzi -120.894 38.427 1199 05 01 0000 1700 01 01 0000 6 0 0 2 5 0.447 0.191 D 1 90 14 0 moorcroft_6100b Tonzi 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -manaus_km34 m34 -60.209 -2.609 1200 01 01 0000 1700 01 01 0000 6 0 0 2 11 0.200 0.680 H 1 90 14 0 moorcroft_6100b Manaus_Km34 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -caxiuana cax -51.458 -1.720 1200 01 01 0000 1700 01 01 0000 6 0 0 2 16 0.380 0.440 D 2 6 14 0 moorcroft_6100b Caxiuana 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -santarem_km67 s67 -54.959 -2.857 1200 01 01 0000 1700 01 01 0000 6 0 0 2 17 -1.000 -1.000 H 1 90 14 0 moorcroft_6100b Santarem_Km67 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -santarem_km83 s83 -54.971 -3.018 1200 01 01 0000 1700 01 01 0000 6 0 0 2 16 0.390 0.590 H 1 90 14 0 moorcroft_6100b Santarem_Km83 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -rebio_jaru rja -61.931 -10.083 1200 01 01 0000 1700 01 01 0000 6 0 0 2 2 0.800 0.100 C 2 6 14 0 moorcroft_6100b Rebio_Jaru 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -pedegigante pdg -47.650 -21.619 1200 01 01 0000 1700 01 01 0000 6 0 0 2 2 0.850 0.030 F 1 90 14 0 moorcroft_6100b Pe-de-Gigante 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -paracou gyf -52.912 5.282 1200 01 01 0000 1700 01 01 0000 6 0 0 2 6 0.562 0.345 C 2 6 14 0 moorcroft_6100b Paracou 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -bananal ban -50.159 -9.824 1200 01 01 0000 1700 01 01 0000 6 0 0 2 8 0.240 0.370 C 1 90 14 0 moorcroft_6100b Bananal 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -petrolina pnz -40.370 -9.165 1200 01 01 0000 1700 01 01 0000 6 0 0 2 2 0.821 0.052 C 2 15 14 0 moorcroft_6100b Petrolina 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -fazendans fns -62.357 -10.762 1200 01 01 0000 1700 01 01 0000 6 0 0 2 2 0.800 0.100 G 1 90 14 0 moorcroft_6100b Fazenda_Nossa_Senhora 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -santarem_km77 s77 -54.537 -3.012 1200 01 01 0000 1700 01 01 0000 6 0 0 2 17 -1.000 -1.000 H 1 90 14 0 moorcroft_6100b Santarem_Km77 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -la_lorena lor -69.991 -3.056 1200 01 01 0000 1700 01 01 0000 6 0 0 2 9 0.380 0.310 A 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -el_zafire zar -69.902 -4.007 1200 01 01 0000 1700 01 01 0000 6 0 0 2 2 0.748 0.006 B 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -allpahuayo alp -73.437 -3.953 1200 01 01 0000 1700 01 01 0000 6 0 0 2 1 0.937 0.026 D 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -tambopata tam -69.271 -12.830 1200 01 01 0000 1700 01 01 0000 6 0 0 2 11 0.400 0.430 B 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -kenia qea -62.730 -16.010 1200 01 01 0000 1700 01 01 0000 6 0 0 2 3 0.760 0.160 D 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -barro_colorado bci -79.850 9.160 1200 01 01 0000 1700 01 01 0000 6 0 0 2 17 0.200 0.420 D 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -cardoso czi -48.010 -25.096 1200 01 01 0000 1700 01 01 0000 6 0 0 2 1 0.950 0.010 C 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -la_selva lzv -84.010 10.430 1200 01 01 0000 1700 01 01 0000 6 0 0 2 6 0.570 0.290 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -la_planada lpn -77.994 1.116 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 H 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -sinop ops -55.325 -11.412 1200 01 01 0000 1700 01 01 0000 6 0 0 2 2 0.840 0.120 E 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -yasuni ysn -76.396 -0.686 1200 01 01 0000 1700 01 01 0000 6 0 0 2 4 0.259 0.255 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -alta_floresta afl -56.100 -9.867 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -angra_dos_reis aei -44.300 -22.970 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -araguaiana ayx -51.810 -15.710 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -araracuara arc -72.398 -0.601 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -asuncion asu -57.560 -25.300 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -belo_horizonte cnf -43.950 -19.850 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -belem bel -48.480 -1.380 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -blumenau bnu -49.060 -26.920 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -boa_vista bvb -60.610 2.920 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -bogota bog -74.100 4.650 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -brasilia bsb -47.910 -15.860 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -cabo_frio cfb -42.070 -22.490 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -cajazeiras cjz -38.570 -6.900 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -calabozo clz -67.420 8.920 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -canarana qnr -52.250 -13.560 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -carajas cks -50.722 -5.786 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -chaiten wch -72.500 -42.500 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -ciudad_guayana cgu -62.762 8.289 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -cochabamba cbb -66.170 -17.420 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -cuiaba cgb -56.100 -15.600 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -curitiba cwb -49.230 -25.410 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -diamantino dmt -56.620 -14.370 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -dourados dou -54.810 -22.220 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -el_triunfo etf -67.000 -13.500 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -erechim erm -52.240 -27.610 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -eunapolis enp -39.580 -16.330 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -fortaleza for -38.530 -3.780 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -iguape igp -47.590 -24.630 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -imperatriz imp -47.460 -5.530 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -iquique iqq -69.970 -20.240 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -itabaiana ibn -37.420 -10.680 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -itapeva ipv -48.880 -23.980 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -jacareacanga jcr -57.777 -6.233 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -jiparana jpr -61.980 -10.860 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -joao_pessoa jpa -34.910 -7.100 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -la_esmeralda lfe -65.540 3.170 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -labrea lbr -64.770 -7.280 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -lencois lec -41.350 -12.480 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -linden lyd -58.302 6.015 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -llochegua llo -73.908 -12.410 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -macapa mcp -51.090 0.330 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -malalcahuello zmh -71.580 -38.470 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -manaus mao -60.020 -3.110 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -manicore mnx -61.280 -5.820 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -maracarume zme -45.954 -2.041 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -maringa mgf -52.010 -23.470 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -mariscal_estagarribia esg -60.624 -22.043 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -montes_claros moc -43.820 -16.710 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -neuquen nqn -68.000 -39.000 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -oeiras oei -42.160 -7.020 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -palmas pmw -48.360 -10.290 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -paramaribo pbm -55.150 5.830 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -piura piu -80.617 -5.207 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -porto_de_moz ptq -52.236 -1.741 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -pucallpa pcl -74.570 -8.380 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -puerto_suarez psz -58.090 -18.580 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -quibdo uib -76.640 5.690 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -recife rec -34.910 -8.070 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -redencao rdc -49.980 -8.030 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -ribeirao_preto rao -47.780 -21.140 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -rio_branco rbr -67.890 -9.870 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -riohacha rch -72.926 11.240 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -salta sla -65.483 -24.850 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -san_pedro zpe -54.110 -26.630 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -sao_felix_araguaia sxo -50.690 -11.630 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -sao_felix_xingu sxx -51.950 -6.640 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -sao_luis slz -44.236 -2.586 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -sao_gabriel sjl -66.980 -0.140 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -santa_fe sfn -60.809 -31.712 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -santarem stm -54.959 -2.857 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -sobral qbx -39.990 -4.010 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -tarauaca trq -70.781 -8.157 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -tefe tff -64.720 -3.380 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -teresina the -42.800 -5.090 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -tirios obi -55.940 2.220 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -tolhuin tqh -67.222 -54.502 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -vina_del_mar kna -71.480 -32.950 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -vilhena bvh -60.100 -12.730 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -vitoria vix -40.390 -20.310 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 -xingu xgu -52.636 -9.692 1200 01 01 0000 1700 01 01 0000 6 0 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +harvard hvd -72.170 42.540 1199 05 01 0000 1700 01 01 0000 6 default 0 2 2 -1.000 -1.000 E 1 90 14 0 moorcroft_6100b Harvard 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +tonzi tzi -120.894 38.427 1199 05 01 0000 1700 01 01 0000 6 default 0 2 5 0.447 0.191 D 1 90 14 0 moorcroft_6100b Tonzi 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +manaus_km34 m34 -60.209 -2.609 1200 01 01 0000 1700 01 01 0000 6 default 0 2 11 0.200 0.680 H 1 90 14 0 moorcroft_6100b Manaus_Km34 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +caxiuana cax -51.458 -1.720 1200 01 01 0000 1700 01 01 0000 6 default 0 2 16 0.380 0.440 D 2 6 14 0 moorcroft_6100b Caxiuana 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +santarem_km67 s67 -54.959 -2.857 1200 01 01 0000 1700 01 01 0000 6 default 0 2 17 -1.000 -1.000 H 1 90 14 0 moorcroft_6100b Santarem_Km67 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +santarem_km83 s83 -54.971 -3.018 1200 01 01 0000 1700 01 01 0000 6 default 0 2 16 0.390 0.590 H 1 90 14 0 moorcroft_6100b Santarem_Km83 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +rebio_jaru rja -61.931 -10.083 1200 01 01 0000 1700 01 01 0000 6 default 0 2 2 0.800 0.100 C 2 6 14 0 moorcroft_6100b Rebio_Jaru 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +pedegigante pdg -47.650 -21.619 1200 01 01 0000 1700 01 01 0000 6 default 0 2 2 0.850 0.030 F 1 90 14 0 moorcroft_6100b Pe-de-Gigante 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +paracou gyf -52.912 5.282 1200 01 01 0000 1700 01 01 0000 6 default 0 2 6 0.562 0.345 C 2 6 14 0 moorcroft_6100b Paracou 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +bananal ban -50.159 -9.824 1200 01 01 0000 1700 01 01 0000 6 default 0 2 8 0.240 0.370 C 1 90 14 0 moorcroft_6100b Bananal 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +petrolina pnz -40.370 -9.165 1200 01 01 0000 1700 01 01 0000 6 default 0 2 2 0.821 0.052 C 2 15 14 0 moorcroft_6100b Petrolina 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +fazendans fns -62.357 -10.762 1200 01 01 0000 1700 01 01 0000 6 default 0 2 2 0.800 0.100 G 1 90 14 0 moorcroft_6100b Fazenda_Nossa_Senhora 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +santarem_km77 s77 -54.537 -3.012 1200 01 01 0000 1700 01 01 0000 6 default 0 2 17 -1.000 -1.000 H 1 90 14 0 moorcroft_6100b Santarem_Km77 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +la_lorena lor -69.991 -3.056 1200 01 01 0000 1700 01 01 0000 6 default 0 2 9 0.380 0.310 A 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +el_zafire zar -69.902 -4.007 1200 01 01 0000 1700 01 01 0000 6 default 0 2 2 0.748 0.006 B 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +allpahuayo alp -73.437 -3.953 1200 01 01 0000 1700 01 01 0000 6 default 0 2 1 0.937 0.026 D 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +tambopata tam -69.271 -12.830 1200 01 01 0000 1700 01 01 0000 6 default 0 2 11 0.400 0.430 B 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +kenia qea -62.730 -16.010 1200 01 01 0000 1700 01 01 0000 6 default 0 2 3 0.760 0.160 D 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +barro_colorado bci -79.850 9.160 1200 01 01 0000 1700 01 01 0000 6 default 0 2 17 0.200 0.420 D 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +cardoso czi -48.010 -25.096 1200 01 01 0000 1700 01 01 0000 6 default 0 2 1 0.950 0.010 C 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +la_selva lzv -84.010 10.430 1200 01 01 0000 1700 01 01 0000 6 default 0 2 6 0.570 0.290 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +la_planada lpn -77.994 1.116 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 H 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +sinop ops -55.325 -11.412 1200 01 01 0000 1700 01 01 0000 6 default 0 2 2 0.840 0.120 E 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +yasuni ysn -76.396 -0.686 1200 01 01 0000 1700 01 01 0000 6 default 0 2 4 0.259 0.255 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +alta_floresta afl -56.100 -9.867 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +angra_dos_reis aei -44.300 -22.970 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +araguaiana ayx -51.810 -15.710 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +araracuara arc -72.398 -0.601 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +asuncion asu -57.560 -25.300 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +belo_horizonte cnf -43.950 -19.850 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +belem bel -48.480 -1.380 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +blumenau bnu -49.060 -26.920 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +boa_vista bvb -60.610 2.920 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +bogota bog -74.100 4.650 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +brasilia bsb -47.910 -15.860 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +cabo_frio cfb -42.070 -22.490 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +cajazeiras cjz -38.570 -6.900 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +calabozo clz -67.420 8.920 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +canarana qnr -52.250 -13.560 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +carajas cks -50.722 -5.786 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +chaiten wch -72.500 -42.500 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +ciudad_guayana cgu -62.762 8.289 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +cochabamba cbb -66.170 -17.420 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +cuiaba cgb -56.100 -15.600 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +curitiba cwb -49.230 -25.410 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +diamantino dmt -56.620 -14.370 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +dourados dou -54.810 -22.220 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +el_triunfo etf -67.000 -13.500 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +erechim erm -52.240 -27.610 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +eunapolis enp -39.580 -16.330 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +fortaleza for -38.530 -3.780 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +iguape igp -47.590 -24.630 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +imperatriz imp -47.460 -5.530 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +iquique iqq -69.970 -20.240 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +itabaiana ibn -37.420 -10.680 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +itapeva ipv -48.880 -23.980 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +jacareacanga jcr -57.777 -6.233 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +jiparana jpr -61.980 -10.860 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +joao_pessoa jpa -34.910 -7.100 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +la_esmeralda lfe -65.540 3.170 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +labrea lbr -64.770 -7.280 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +lencois lec -41.350 -12.480 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +linden lyd -58.302 6.015 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +llochegua llo -73.908 -12.410 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +macapa mcp -51.090 0.330 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +malalcahuello zmh -71.580 -38.470 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +manaus mao -60.020 -3.110 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +manicore mnx -61.280 -5.820 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +maracarume zme -45.954 -2.041 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +maringa mgf -52.010 -23.470 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +mariscal_estagarribia esg -60.624 -22.043 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +montes_claros moc -43.820 -16.710 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +neuquen nqn -68.000 -39.000 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +oeiras oei -42.160 -7.020 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +palmas pmw -48.360 -10.290 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +paramaribo pbm -55.150 5.830 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +piura piu -80.617 -5.207 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +porto_de_moz ptq -52.236 -1.741 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +pucallpa pcl -74.570 -8.380 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +puerto_suarez psz -58.090 -18.580 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +quibdo uib -76.640 5.690 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +recife rec -34.910 -8.070 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +redencao rdc -49.980 -8.030 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +ribeirao_preto rao -47.780 -21.140 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +rio_branco rbr -67.890 -9.870 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +riohacha rch -72.926 11.240 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +salta sla -65.483 -24.850 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +san_pedro zpe -54.110 -26.630 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +sao_felix_araguaia sxo -50.690 -11.630 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +sao_felix_xingu sxx -51.950 -6.640 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +sao_luis slz -44.236 -2.586 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +sao_gabriel sjl -66.980 -0.140 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +santa_fe sfn -60.809 -31.712 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +santarem stm -54.959 -2.857 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +sobral qbx -39.990 -4.010 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +tarauaca trq -70.781 -8.157 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +tefe tff -64.720 -3.380 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +teresina the -42.800 -5.090 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +tirios obi -55.940 2.220 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +tolhuin tqh -67.222 -54.502 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +vina_del_mar kna -71.480 -32.950 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +vilhena bvh -60.100 -12.730 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +vitoria vix -40.390 -20.310 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 +xingu xgu -52.636 -9.692 1200 01 01 0000 1700 01 01 0000 6 default 0 1 1 -1.000 -1.000 F 1 90 14 0 moorcroft_6100b Sheffield 600. 1.00 1.00 9.0 7.2 5.2 10000. 1000. 10000. 900. 600. 0.0145 0.035 0.016 0.016 0.080 0.055 4000. 2 1.000 0.333 0.05 0.10 0.05 2.4 2.4 2 1 0.8 3 2 0.65 0.25 0.05 13.0 13.0 0.74 0.50 378. -1.20 0.5 3 0.5 0 3600. 2 1 1 0 0.050 0.100 0.230 0.460 0.100 0.000 0.800 1.000 1 0 -1 2 0 2 0.0111 diff --git a/ED/Template/read_monthly.sh b/ED/Template/read_monthly.sh index 8f65edd10..2d5997269 100755 --- a/ED/Template/read_monthly.sh +++ b/ED/Template/read_monthly.sh @@ -2,7 +2,7 @@ . ${HOME}/.bashrc here='/xxxxxxxx/xxxxxxxx/xxx_XXX/XXXXXXXXXXX' # ! Main path diskthere='/n/moorcroftfs2' # ! Disk where the output files are -thisqueue='moorcroft2c' # ! Queue where jobs should be submitted +thisqueue='moorcroft' # ! Queue where jobs should be submitted lonlat=${here}'/joborder.txt' # ! File with the job instructions #----- Outroot is the main output directory. ----------------------------------------------# outroot='/xxxxxxxx/xxxxxxxx/xxx_XXX/XXXXXXXXXXX/figures' @@ -251,264 +251,265 @@ do #---------------------------------------------------------------------------------------# - #----- Retrieve some information from ED2IN. -------------------------------------------# - iphysiol=`grep -i NL%IPHYSIOL ${here}/${polyname}/ED2IN | awk '{print $3}'` - iallom=`grep -i NL%IALLOM ${here}/${polyname}/ED2IN | awk '{print $3}'` - metcyca=`grep -i NL%METCYC1 ${here}/${polyname}/ED2IN | awk '{print $3}'` - metcycz=`grep -i NL%METCYCF ${here}/${polyname}/ED2IN | awk '{print $3}'` - #---------------------------------------------------------------------------------------# + if [ -s ${here}/${polyname} ] + then - #---- Find the forest inventory cycle. -------------------------------------------------# - case ${polyiata} in - gyf|s67) - biocyca=2004 - biocycz=2009 - subcens=1 - ;; - s67) - biocyca=2001 - biocycz=2011 - subcens=1 - ;; - *) - biocyca=${metcyca} - biocycz=${metcycz} - subcens=0 - ;; - esac - #---------------------------------------------------------------------------------------# + #----- Retrieve some information from ED2IN. ----------------------------------------# + iphysiol=`grep -i NL%IPHYSIOL ${here}/${polyname}/ED2IN | awk '{print $3}'` + iallom=`grep -i NL%IALLOM ${here}/${polyname}/ED2IN | awk '{print $3}'` + metcyca=`grep -i NL%METCYC1 ${here}/${polyname}/ED2IN | awk '{print $3}'` + metcycz=`grep -i NL%METCYCF ${here}/${polyname}/ED2IN | awk '{print $3}'` + #------------------------------------------------------------------------------------# - #---------------------------------------------------------------------------------------# - # Switch years in case this is a specific drought run. # - #---------------------------------------------------------------------------------------# - if [ ${droughtmark} == "TRUE" ] - then - let yeara=${droughtyeara}-1 - let yearz=${droughtyearz}+1 - fi - #---------------------------------------------------------------------------------------# + #---- Find the forest inventory cycle. ----------------------------------------------# + case ${polyiata} in + gyf|s67) + biocyca=2004 + biocycz=2009 + subcens=1 + ;; + s67) + biocyca=2001 + biocycz=2011 + subcens=1 + ;; + *) + biocyca=${metcyca} + biocycz=${metcycz} + subcens=0 + ;; + esac + #------------------------------------------------------------------------------------# - #------ Check which period to use. -----------------------------------------------------# - if [ ${useperiod} == 't' ] - then - #------ One meteorological cycle. Check the type of meteorological driver. ---------# - if [ ${metdriver} != 'Sheffield' ] - then - thisyeara=${metcyca} - thisyearz=${metcycz} - for i in ${shiftiata} - do - if [ 'x'${i} == 'x'${polyiata} ] - then - echo ' -> Shifting met cycle' - let metcycle=${metcycz}-${metcyca}+1 - let deltayr=${shiftcycle}*${metcycle} - let thisyeara=${metcyca}+${deltayr} - let thisyearz=${metcycz}+${deltayr} - fi # end [ ${i} == ${iata} ] - done #end for i in ${shiftiata} - else - thisyeara=${metcyca} - thisyearz=${metcycz} - fi # end [ ${metdriver} != 'Sheffield' ] - #------------------------------------------------------------------------------------# - elif [ ${useperiod} == 'u' ] - then - #----- The user said which period to use. -------------------------------------------# - thisyeara=${yusera} - thisyearz=${yuserz} #------------------------------------------------------------------------------------# - else - #----- Grab all years that the simulation is supposed to run. -----------------------# - thisyeara=${yeara} - thisyearz=${yearz} + # Switch years in case this is a specific drought run. # + #------------------------------------------------------------------------------------# + if [ ${droughtmark} == "TRUE" ] + then + let yeara=${droughtyeara}-1 + let yearz=${droughtyearz}+1 + fi #------------------------------------------------------------------------------------# - fi # end [ ${useperiod} == 't' ] - #---------------------------------------------------------------------------------------# - - - - #----- Set up months and days. ---------------------------------------------------------# - thismontha=${montha} - thismonthz=${monthz} - thisdatea=${datea} - #---------------------------------------------------------------------------------------# - #---------------------------------------------------------------------------------------# - # Define the job name, and the names of the output files. # - #---------------------------------------------------------------------------------------# - epostout='rmon_epost.out' - epostsh='rmon_epost.sh' - epostlsf='rmon_epost.lsf' - epostjob='eb-rmon-'${polyname} - #---------------------------------------------------------------------------------------# + #------ Check which period to use. --------------------------------------------------# + if [ ${useperiod} == 't' ] + then + #------ One meteorological cycle. Check the type of meteorological driver. ------# + if [ ${metdriver} != 'Sheffield' ] + then + thisyeara=${metcyca} + thisyearz=${metcycz} + for i in ${shiftiata} + do + if [ 'x'${i} == 'x'${polyiata} ] + then + echo ' -> Shifting met cycle' + let metcycle=${metcycz}-${metcyca}+1 + let deltayr=${shiftcycle}*${metcycle} + let thisyeara=${metcyca}+${deltayr} + let thisyearz=${metcycz}+${deltayr} + fi # end [ ${i} == ${iata} ] + done #end for i in ${shiftiata} + else + thisyeara=${metcyca} + thisyearz=${metcycz} + fi # end [ ${metdriver} != 'Sheffield' ] + #---------------------------------------------------------------------------------# + elif [ ${useperiod} == 'u' ] + then + #----- The user said which period to use. ----------------------------------------# + thisyeara=${yusera} + thisyearz=${yuserz} + #---------------------------------------------------------------------------------# + else + #----- Grab all years that the simulation is supposed to run. --------------------# + thisyeara=${yeara} + thisyearz=${yearz} + #---------------------------------------------------------------------------------# + fi # end [ ${useperiod} == 't' ] + #------------------------------------------------------------------------------------# - #---------------------------------------------------------------------------------------# - # Check the status of the run. # - #---------------------------------------------------------------------------------------# - statrun=${here}/${polyname}/statusrun.txt - if [ -s ${statrun} ] - then - runt=`cat ${statrun} | awk '{print $6}'` - else - runt='INITIAL' - fi - #---------------------------------------------------------------------------------------# + #----- Set up months and days. ------------------------------------------------------# + thismontha=${montha} + thismonthz=${monthz} + thisdatea=${datea} + #------------------------------------------------------------------------------------# - #---------------------------------------------------------------------------------------# - # We submit only the jobs that haven't finished. If the job has just finished, we # - # submit once again, but save a file to remember that this polygon is loaded. # - #---------------------------------------------------------------------------------------# - fullload="${here}/${polyname}/qfiles_loaded.txt" - if [ ${runt} == "INITIAL" ] - then - submitnow="n" - echo "${ff} - ${polyname} : polygon hasn't started yet" - elif [ ${runt} == "THE_END" ] && [ -s ${fullload} ] - then - #----- Job has ended and all files have been processed. -----------------------------# - submitnow="n" + #------------------------------------------------------------------------------------# + # Define the job name, and the names of the output files. # + #------------------------------------------------------------------------------------# + epostout='rmon_epost.out' + epostsh='rmon_epost.sh' + epostlsf='rmon_epost.lsf' + epostjob='eb-rmon-'${polyname} #------------------------------------------------------------------------------------# - echo "${ff} - ${polyname} : polygon is already loaded or queued for the last time" - elif [ ${runt} == "THE_END" ] - then #------------------------------------------------------------------------------------# - # Job has ended but loading is not complete. Run for one last time. # + # Check the status of the run. # #------------------------------------------------------------------------------------# - #----- Check that the script is not in the queue. -----------------------------------# - inqueue=`bjobs -w -q ${thisqueue} -J ${epostjob} 2> /dev/null | wc -l` - if [ ${inqueue} -eq 0 ] + statrun=${here}/${polyname}/statusrun.txt + if [ -s ${statrun} ] then - #----- Save the time to the file that will block future submissions. -------------# - when=`date +'%d %B %Y - %R %Z'` - echo "Last submission on ${when}" > ${fullload} - #---------------------------------------------------------------------------------# - - submitnow="y" - echo "${ff} - ${polyname}: run has finished! Submit script for the last time." + runt=`cat ${statrun} | awk '{print $6}'` else - submitnow="n" - echo "${ff} - ${polyname}: post-processor job has already been queued." + runt='INITIAL' fi #------------------------------------------------------------------------------------# - else + + + #------------------------------------------------------------------------------------# - # Job is still running or it has started again... Remove the blocker and # - # re-submit if the post-processor is not queued. # + # We submit only the jobs that haven't finished. If the job has just finished, # + # we submit once again, but save a file to remember that this polygon is loaded. # #------------------------------------------------------------------------------------# - #----- Delete the blocker. ----------------------------------------------------------# - /bin/rm -f ${fullload} - #----- Check that the script is not in the queue. -----------------------------------# - inqueue=`bjobs -w -q ${thisqueue} -J ${epostjob} 2> /dev/null | wc -l` - if [ ${inqueue} -eq 0 ] + status="${here}/${polyname}/rdata_month/status_${polyname}.txt" + if [ -s ${status} ] then - submitnow="y" - echo "${ff} - ${polyname}: submit post-processor script." + yearl=`cat ${status} | awk '{print $1}'` + monthl=`cat ${status} | awk '{print $2}'` + if [ ${yearl} -eq ${yearz} ] && [ ${monthl} -eq ${monthz} ] + then + cestfini="y" + else + cestfini="n" + fi else - submitnow="n" - echo "${ff} - ${polyname}: post-processor job has already been queued." + cestfini="n" fi #------------------------------------------------------------------------------------# - fi - #---------------------------------------------------------------------------------------# + if [ ${runt} == "INITIAL" ] + then + submitnow="n" + echo "${ff} - ${polyname} : polygon hasn't started yet" - #---------------------------------------------------------------------------------------# - # Find out whether the job is on the queue. In case it is not, re-submit. # - #---------------------------------------------------------------------------------------# - if [ "x${submitnow}" == "xy" ] - then + elif [ ${runt} == "THE_END" ] && [ ${cestfini} == "y" ] + then + #----- Job has ended and all files have been processed. --------------------------# + submitnow="n" + #---------------------------------------------------------------------------------# - #----- Copy the R script from the Template folder to the local path. ----------------# - cp -f ${here}/Template/read_monthly.r ${here}/${polyname} - scriptnow=${here}/${polyname}/read_monthly.r + echo "${ff} - ${polyname} : polygon is already loaded or queued for the last time" + else + #---------------------------------------------------------------------------------# + # Job is still running or it has started again... Remove the blocker and # + # re-submit if the post-processor is not queued. # + #---------------------------------------------------------------------------------# + #----- Check that the script is not in the queue. --------------------------------# + inqueue=`bjobs -w -q ${thisqueue} -J ${epostjob} 2> /dev/null | wc -l` + if [ ${inqueue} -eq 0 ] + then + submitnow="y" + echo "${ff} - ${polyname}: submit post-processor script." + else + submitnow="n" + echo "${ff} - ${polyname}: post-processor job has already been queued." + fi + #---------------------------------------------------------------------------------# + fi #------------------------------------------------------------------------------------# - #----- Switch the keywords by the current settings. ---------------------------------# - sed -i s@thispoly@${polyname}@g ${scriptnow} - sed -i s@thisoutroot@${outroot}@g ${scriptnow} - sed -i s@thispath@${here}@g ${scriptnow} - sed -i s@thatpath@${there}@g ${scriptnow} - sed -i s@thisyeara@${thisyeara}@g ${scriptnow} - sed -i s@thismontha@${thismontha}@g ${scriptnow} - sed -i s@thisdatea@${thisdatea}@g ${scriptnow} - sed -i s@thishoura@${houra}@g ${scriptnow} - sed -i s@thisminua@${minua}@g ${scriptnow} - sed -i s@thisyearz@${thisyearz}@g ${scriptnow} - sed -i s@thismonthz@${thismonthz}@g ${scriptnow} - sed -i s@thisdatez@${datez}@g ${scriptnow} - sed -i s@thishourz@${hourz}@g ${scriptnow} - sed -i s@thisminuz@${minuz}@g ${scriptnow} - sed -i s@thisseasonmona@${seasonmona}@g ${scriptnow} - sed -i s@myphysiol@${iphysiol}@g ${scriptnow} - sed -i s@myallom@${iallom}@g ${scriptnow} - sed -i s@mydroughtmark@${droughtmark}@g ${scriptnow} - sed -i s@mydroughtyeara@${droughtyeara}@g ${scriptnow} - sed -i s@mydroughtyearz@${droughtyearz}@g ${scriptnow} - sed -i s@mymonthsdrought@${monthsdrought}@g ${scriptnow} - sed -i s@myvarcycle@${varcycle}@g ${scriptnow} - sed -i s@thisoutform@${outform}@g ${scriptnow} - sed -i s@mydistrib@${usedistrib}@g ${scriptnow} - sed -i s@mymetcyca@${metcyca}@g ${scriptnow} - sed -i s@mymetcycz@${metcycz}@g ${scriptnow} - sed -i s@mybiocyca@${biocyca}@g ${scriptnow} - sed -i s@mybiocycz@${biocycz}@g ${scriptnow} - sed -i s@myidbhtype@${idbhtype}@g ${scriptnow} #------------------------------------------------------------------------------------# + # Find out whether the job is on the queue. In case it is not, re-submit. # + #------------------------------------------------------------------------------------# + if [ "x${submitnow}" == "xy" ] + then + #----- Copy the R script from the Template folder to the local path. -------------# + cp -f ${here}/Template/read_monthly.r ${here}/${polyname} + scriptnow=${here}/${polyname}/read_monthly.r + #---------------------------------------------------------------------------------# - #----- Run R to get the plots. ------------------------------------------------------# - rbin="R CMD BATCH --no-save --no-restore" - comm="${rbin} ${scriptnow} ${here}/${polyname}/${epostout}" - #------------------------------------------------------------------------------------# + #----- Switch the keywords by the current settings. ------------------------------# + sed -i s@thispoly@${polyname}@g ${scriptnow} + sed -i s@thisoutroot@${outroot}@g ${scriptnow} + sed -i s@thispath@${here}@g ${scriptnow} + sed -i s@thatpath@${there}@g ${scriptnow} + sed -i s@thisyeara@${thisyeara}@g ${scriptnow} + sed -i s@thismontha@${thismontha}@g ${scriptnow} + sed -i s@thisdatea@${thisdatea}@g ${scriptnow} + sed -i s@thishoura@${houra}@g ${scriptnow} + sed -i s@thisminua@${minua}@g ${scriptnow} + sed -i s@thisyearz@${thisyearz}@g ${scriptnow} + sed -i s@thismonthz@${thismonthz}@g ${scriptnow} + sed -i s@thisdatez@${datez}@g ${scriptnow} + sed -i s@thishourz@${hourz}@g ${scriptnow} + sed -i s@thisminuz@${minuz}@g ${scriptnow} + sed -i s@thisseasonmona@${seasonmona}@g ${scriptnow} + sed -i s@myphysiol@${iphysiol}@g ${scriptnow} + sed -i s@myallom@${iallom}@g ${scriptnow} + sed -i s@mydroughtmark@${droughtmark}@g ${scriptnow} + sed -i s@mydroughtyeara@${droughtyeara}@g ${scriptnow} + sed -i s@mydroughtyearz@${droughtyearz}@g ${scriptnow} + sed -i s@mymonthsdrought@${monthsdrought}@g ${scriptnow} + sed -i s@myvarcycle@${varcycle}@g ${scriptnow} + sed -i s@thisoutform@${outform}@g ${scriptnow} + sed -i s@mydistrib@${usedistrib}@g ${scriptnow} + sed -i s@mymetcyca@${metcyca}@g ${scriptnow} + sed -i s@mymetcycz@${metcycz}@g ${scriptnow} + sed -i s@mybiocyca@${biocyca}@g ${scriptnow} + sed -i s@mybiocycz@${biocycz}@g ${scriptnow} + sed -i s@myidbhtype@${idbhtype}@g ${scriptnow} + #---------------------------------------------------------------------------------# - #------------------------------------------------------------------------------------# - # plot_eval_ed won't run all at once due to the sheer number of HDF5 files. # - # Run it several times until it is complete. # - #------------------------------------------------------------------------------------# - echo '#!/bin/bash' > ${here}/${polyname}/${epostsh} - echo ${comm} >> ${here}/${polyname}/${epostsh} - chmod +x ${here}/${polyname}/${epostsh} - #------------------------------------------------------------------------------------# + #----- Run R to get the plots. ---------------------------------------------------# + rbin="R CMD BATCH --no-save --no-restore" + comm="${rbin} ${scriptnow} ${here}/${polyname}/${epostout}" + #---------------------------------------------------------------------------------# - #------------------------------------------------------------------------------------# - # Submit the job according to the style (LSF or openlava). # - #------------------------------------------------------------------------------------# - if [ 'x'${submit} == 'xy' ] || [ 'x'${submit} == 'xY' ] - then - #------ Check whether to use openlava or LSF. ------------------------------------# - if [ 'x'${openlava} == 'xy' ] || [ 'x'${openlava} == 'xY' ] + + #---------------------------------------------------------------------------------# + # plot_eval_ed won't run all at once due to the sheer number of HDF5 files. # + # Run it several times until it is complete. # + #---------------------------------------------------------------------------------# + echo '#!/bin/bash' > ${here}/${polyname}/${epostsh} + echo ${comm} >> ${here}/${polyname}/${epostsh} + chmod +x ${here}/${polyname}/${epostsh} + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Submit the job according to the style (LSF or openlava). # + #---------------------------------------------------------------------------------# + if [ 'x'${submit} == 'xy' ] || [ 'x'${submit} == 'xY' ] then - bsub="iobsub -J ${epostjob} -o ${here}/${polyname}/${epostlsf}" - bsub="${bsub} ${here}/${polyname}/${epostsh} 1> /dev/null 2> /dev/null" - else - bsub="bsub -q ${thisqueue} -J ${epostjob} -o ${here}/${polyname}/${epostlsf}" - bsub="${bsub} ${here}/${polyname}/${epostsh} 1> /dev/null 2> /dev/null" + #------ Check whether to use openlava or LSF. ---------------------------------# + if [ 'x'${openlava} == 'xy' ] || [ 'x'${openlava} == 'xY' ] + then + bsub="iobsub -J ${epostjob} -o ${here}/${polyname}/${epostlsf}" + bsub="${bsub} ${here}/${polyname}/${epostsh} 1> /dev/null 2> /dev/null" + else + bsub="bsub -q ${thisqueue} -J ${epostjob} -o ${here}/${polyname}/${epostlsf}" + bsub="${bsub} ${here}/${polyname}/${epostsh} 1> /dev/null 2> /dev/null" + fi + #------------------------------------------------------------------------------# + ${bsub} fi #---------------------------------------------------------------------------------# - ${bsub} fi #------------------------------------------------------------------------------------# + else + echo "${ff} - ${polyname}: directory not found." fi #---------------------------------------------------------------------------------------# done diff --git a/ED/Template/run_sitter.sh b/ED/Template/run_sitter.sh index 5ff07ddb0..c706f2433 100755 --- a/ED/Template/run_sitter.sh +++ b/ED/Template/run_sitter.sh @@ -127,25 +127,25 @@ ccc='/n/Moorcroft_Lab/Users/mlongo/util/calc.sh' # Calculator #------------------------------------------------------------------------------------------# #------ Queue: moorcroft2a. ---------------------------------------------------------------# m2afull=96 -m2aumax=48 +m2aumax=0 #------ Queue: moorcroft2b. ---------------------------------------------------------------# m2bfull=88 -m2bumax=88 +m2bumax=0 #------ Queue: moorcroft2c. ---------------------------------------------------------------# -m2cfull=0 -m2cumax=64 +m2cfull=64 +m2cumax=0 #------ Queue: moorcroft_6100a. -----------------------------------------------------------# a61full=48 -a61umax=18 +a61umax=0 #------ Queue: moorcroft_6100b. -----------------------------------------------------------# b61full=480 -b61umax=320 +b61umax=0 #------ Queue: wofsy. ---------------------------------------------------------------------# wsyfull=96 -wsyumax=48 +wsyumax=0 #------ Queue: unrestricted_serial. -------------------------------------------------------# usefull=80 -useumax=80 +useumax=0 #------ Queue: unrestricted_parallel. -----------------------------------------------------# upapmax=0 #------------------------------------------------------------------------------------------# @@ -186,6 +186,7 @@ tailfile="${situtils}/tail.txt" recefile="${situtils}/rece.txt" statfile="${situtils}/stat.txt" queuefile="${situtils}/queue.txt" +tablefile="${situtils}/table_queue.txt" pendfile=${here}'/pending.txt' emailday=${here}'/emailday.txt' if [ ${recipient} == "xxxxxx@xxxx.com" ] @@ -1048,42 +1049,20 @@ then #------------------------------------------------------------------------------------# - #----- Define the job name. ---------------------------------------------------------# - jobname="${desc}-${polyname}" - #------------------------------------------------------------------------------------# - #----- Update the R script that controls the run. -----------------------------------# - /bin/rm -f ${here}/${polyname}/whichrun.r - /bin/cp -f ${here}/Template/whichrun.r ${here}/${polyname}/whichrun.r - sed -i s@thispoly@${polyname}@g ${here}/${polyname}/whichrun.r - sed -i s@thisqueue@${queue}@g ${here}/${polyname}/whichrun.r - sed -i s@pathhere@${here}@g ${here}/${polyname}/whichrun.r - sed -i s@paththere@${here}@g ${here}/${polyname}/whichrun.r - sed -i s@thisyeara@${yeara}@g ${here}/${polyname}/whichrun.r - sed -i s@thismontha@${montha}@g ${here}/${polyname}/whichrun.r - sed -i s@thisdatea@${datea}@g ${here}/${polyname}/whichrun.r - sed -i s@thistimea@${timea}@g ${here}/${polyname}/whichrun.r + #----- Define the job name. ---------------------------------------------------------# + jobname="${desc}-${polyname}" #------------------------------------------------------------------------------------# #------------------------------------------------------------------------------------# - # Retrie ve the information on statusrun.txt because it may tell whether the run # - # was in steady state or all PFTs went extinct. These will never start again. # + # Here we check whether the directory exists. If not, we cannot do anything, # + # we must wait for the next time. # #------------------------------------------------------------------------------------# - statrun=${here}/${polyname}/statusrun.txt - if [ -s ${statrun} ] + if [ ! -s ${here}/${polyname} ] then - yearh=`cat ${statrun} | awk '{print $2}'` - monthh=`cat ${statrun} | awk '{print $3}'` - dateh=`cat ${statrun} | awk '{print $4}'` - timeh=`cat ${statrun} | awk '{print $5}'` - runt=`cat ${statrun} | awk '{print $6}'` - agb=`cat ${statrun} | awk '{print $7}'` - bsa=`cat ${statrun} | awk '{print $8}'` - lai=`cat ${statrun} | awk '{print $9}'` - else yearh=${yeara} monthh=${montha} dateh=${datea} @@ -1092,622 +1071,672 @@ then agb='NA' bsa='NA' lai='NA' - fi - #------------------------------------------------------------------------------------# + echo "${ff} H:-\ ${polyname} doesn't have a home directory..." + else + #----- Update the R script that controls the run. --------------------------------# + /bin/rm -f ${here}/${polyname}/whichrun.r + /bin/cp -f ${here}/Template/whichrun.r ${here}/${polyname}/whichrun.r + sed -i s@thispoly@${polyname}@g ${here}/${polyname}/whichrun.r + sed -i s@thisqueue@${queue}@g ${here}/${polyname}/whichrun.r + sed -i s@pathhere@${here}@g ${here}/${polyname}/whichrun.r + sed -i s@paththere@${here}@g ${here}/${polyname}/whichrun.r + sed -i s@thisyeara@${yeara}@g ${here}/${polyname}/whichrun.r + sed -i s@thismontha@${montha}@g ${here}/${polyname}/whichrun.r + sed -i s@thisdatea@${datea}@g ${here}/${polyname}/whichrun.r + sed -i s@thistimea@${timea}@g ${here}/${polyname}/whichrun.r + #---------------------------------------------------------------------------------# - #------------------------------------------------------------------------------------# - # We only check those polygons that may be running, so the check doesn't take too # - # long. Once a polygon has reached a steady state / gone extinct / crashed (oh # - # well, that happens unfortunately), then its status should remain the same. # - #------------------------------------------------------------------------------------# - #if [ ${runt} != 'EXTINCT' ] && [ ${runt} != 'STSTATE' ] && [ ${runt} != 'THE_END' ] - #then - #----- Call R to check status. ---------------------------------------------------# - whichrun=${here}/${polyname}/whichrun.r - outwhich=${here}/${polyname}/outwhich.txt - R CMD BATCH --no-save --no-restore ${whichrun} ${outwhich} - year=`cat ${statrun} | awk '{print $2}'` - month=`cat ${statrun} | awk '{print $3}'` - day=`cat ${statrun} | awk '{print $4}'` - hhmm=`cat ${statrun} | awk '{print $5}'` - runt=`cat ${statrun} | awk '{print $6}'` - agb=`cat ${statrun} | awk '{print $7}'` - bsa=`cat ${statrun} | awk '{print $8}'` - lai=`cat ${statrun} | awk '{print $9}'` - #fi - #------------------------------------------------------------------------------------# + #---------------------------------------------------------------------------------# + # Retrie ve the information on statusrun.txt because it may tell whether the # + # run was in steady state or all PFTs went extinct. These will never start # + # again. # + #---------------------------------------------------------------------------------# + statrun=${here}/${polyname}/statusrun.txt + if [ -s ${statrun} ] + then + yearh=`cat ${statrun} | awk '{print $2}'` + monthh=`cat ${statrun} | awk '{print $3}'` + dateh=`cat ${statrun} | awk '{print $4}'` + timeh=`cat ${statrun} | awk '{print $5}'` + runt=`cat ${statrun} | awk '{print $6}'` + agb=`cat ${statrun} | awk '{print $7}'` + bsa=`cat ${statrun} | awk '{print $8}'` + lai=`cat ${statrun} | awk '{print $9}'` + else + yearh=${yeara} + monthh=${montha} + dateh=${datea} + timeh=${timea} + runt='INITIAL' + agb='NA' + bsa='NA' + lai='NA' + fi + #---------------------------------------------------------------------------------# - #------------------------------------------------------------------------------------# - # In case the polygon has crashed, we must do some stuff... # - #------------------------------------------------------------------------------------# - if [ ${runt} == 'CRASHED' ] || [ ${runt} == 'STOPPED' ] || - [ ${runt} == 'METMISS' ] || [ ${runt} == 'SIGSEGV' ] - then #---------------------------------------------------------------------------------# - # Find out the tolerance used in the unfortunate run, then submit the job # - # with a tolerance 10 times more strict. # + # We only check those polygons that may be running, so the check doesn't take # + # too long. Once a polygon has reached a steady state / gone extinct / finished, # + # then its status should remain the same. # #---------------------------------------------------------------------------------# - ED2IN=${here}'/'${polyname}'/ED2IN' - #----- Save the tolerance before we delete the file. -----------------------------# - toler=`grep NL%RK4_TOLERANCE ${ED2IN} | awk '{print $3}'` - if [ 'x'${toler} == 'xmytoler' -o 'x'${toler} == 'x' ] - then - toler=0.01 - fi # [ 'x'${oldtol} == 'xmytoler' -o 'x'${oldtol} == 'x' ] + # if [ ${runt} != 'EXTINCT' ] && [ ${runt} != 'STSTATE' ] && + # [ ${runt} != 'THE_END' ] + # then + #----- Call R to check status. ------------------------------------------------# + whichrun=${here}/${polyname}/whichrun.r + outwhich=${here}/${polyname}/outwhich.txt + R CMD BATCH --no-save --no-restore ${whichrun} ${outwhich} + year=`cat ${statrun} | awk '{print $2}'` + month=`cat ${statrun} | awk '{print $3}'` + day=`cat ${statrun} | awk '{print $4}'` + hhmm=`cat ${statrun} | awk '{print $5}'` + runt=`cat ${statrun} | awk '{print $6}'` + agb=`cat ${statrun} | awk '{print $7}'` + bsa=`cat ${statrun} | awk '{print $8}'` + lai=`cat ${statrun} | awk '{print $9}'` + # fi #---------------------------------------------------------------------------------# - if [ ${runt} == 'CRASHED' ] - then - echo "${ff} :-( ${polyname} HAS CRASHED (RK4 PROBLEM)..." - let ncrashed=${ncrashed}+1 - #----- Make the tolerance 10 times smaller. -----------------------------------# - toler=`${ccc} ${toler}/10` - echo " - New tolerance = ${toler}" - /bin/mv ${here}/${polyname}/serial_out.out ${here}/${polyname}/crashed_out.out - /bin/mv ${here}/${polyname}/serial_out.err ${here}/${polyname}/crashed_out.err - elif [ ${runt} == 'SIGSEGV' ] - then - let nsigsegv=${nsigsegv}+1 - echo "${ff} >:-# ${polyname} HAD SEGMENTATION VIOLATION... <===========" - /bin/mv ${here}/${polyname}/serial_out.out ${here}/${polyname}/sigsegv_out.out - /bin/mv ${here}/${polyname}/serial_out.err ${here}/${polyname}/sigsegv_out.err - elif [ ${runt} == 'METMISS' ] - then - let nmetmiss=${nmetmiss}+1 - echo "${ff} :-/ ${polyname} DID NOT FIND MET DRIVERS... <===========" - /bin/mv ${here}/${polyname}/serial_out.out ${here}/${polyname}/metmiss_out.out - /bin/mv ${here}/${polyname}/serial_out.err ${here}/${polyname}/metmiss_out.err - elif [ ${runt} == 'STOPPED' ] - then - let nstopped=${nstopped}+1 - echo "${ff} :-S ${polyname} STOPPED (UNKNOWN REASON)... <===========" - /bin/mv ${here}/${polyname}/serial_out.out ${here}/${polyname}/stopped_out.out - /bin/mv ${here}/${polyname}/serial_out.err ${here}/${polyname}/stopped_out.err - fi - #---------------------------------------------------------------------------------# - if [ ${toler} != '0.0000010' -a ${toler} != '0.0000001' -a ${toler} != '00' ] - then - - #----- Re-generate ED2IN. -----------------------------------------------------# - rm -f ${ED2IN} - rm -f ${here}/${polyname}/serial_lsf.out - #----- Copy the Template to the right directory. ------------------------------# - cp ${here}/Template/ED2IN ${ED2IN} + #---------------------------------------------------------------------------------# + # In case the polygon has crashed, we must do some stuff... # + #---------------------------------------------------------------------------------# + if [ ${runt} == 'CRASHED' ] || [ ${runt} == 'STOPPED' ] || + [ ${runt} == 'METMISS' ] || [ ${runt} == 'SIGSEGV' ] + then + #------------------------------------------------------------------------------# + # Find out the tolerance used in the unfortunate run, then submit the job # + # with a tolerance 10 times more strict. # + #------------------------------------------------------------------------------# + ED2IN=${here}'/'${polyname}'/ED2IN' + #----- Save the tolerance before we delete the file. --------------------------# + toler=`grep NL%RK4_TOLERANCE ${ED2IN} | awk '{print $3}'` + if [ 'x'${toler} == 'xmytoler' -o 'x'${toler} == 'x' ] + then + toler=0.01 + fi # [ 'x'${oldtol} == 'xmytoler' -o 'x'${oldtol} == 'x' ] + #------------------------------------------------------------------------------# + serial_out="${here}/${polyname}/serial_out.out" + serial_err="${here}/${polyname}/serial_out.err" - #----- Check whether to use SFILIN as restart or history. ---------------------# - if [ ${runt} == 'INITIAL' ] && [ ${initmode} -eq 6 ] + if [ ${runt} == 'CRASHED' ] then - thissfilin=${thisbiomin} - else - thissfilin=${there}/${polyname}/histo/${polyname} + echo "${ff} :-( ${polyname} HAS CRASHED (RK4 PROBLEM)..." + let ncrashed=${ncrashed}+1 + #----- Make the tolerance 10 times smaller. --------------------------------# + toler=`${ccc} ${toler}/10` + echo " - New tolerance = ${toler}" + /bin/mv ${serial_out} ${here}/${polyname}/crashed_out.out + /bin/mv ${serial_err} ${here}/${polyname}/crashed_out.err + elif [ ${runt} == 'SIGSEGV' ] + then + let nsigsegv=${nsigsegv}+1 + echo "${ff} >:-# ${polyname} HAD SEGMENTATION VIOLATION... <===========" + /bin/mv ${serial_out} ${here}/${polyname}/sigsegv_out.out + /bin/mv ${serial_err} ${here}/${polyname}/sigsegv_out.err + elif [ ${runt} == 'METMISS' ] + then + let nmetmiss=${nmetmiss}+1 + echo "${ff} :-/ ${polyname} DID NOT FIND MET DRIVERS... <===========" + /bin/mv ${serial_out} ${here}/${polyname}/metmiss_out.out + /bin/mv ${serial_err} ${here}/${polyname}/metmiss_out.err + elif [ ${runt} == 'STOPPED' ] + then + let nstopped=${nstopped}+1 + echo "${ff} :-S ${polyname} STOPPED (UNKNOWN REASON)... <===========" + /bin/mv ${serial_out} ${here}/${polyname}/stopped_out.out + /bin/mv ${serial_err} ${here}/${polyname}/stopped_out.err fi - #---------------------------------------------------------------------------------------# - - - #----- Update the polygon information on ED2IN. -------------------------------# - sed -i s@paththere@${there}@g ${ED2IN} - sed -i s@myyeara@${thisyeara}@g ${ED2IN} - sed -i s@mymontha@${montha}@g ${ED2IN} - sed -i s@mydatea@${datea}@g ${ED2IN} - sed -i s@mytimea@${timea}@g ${ED2IN} - sed -i s@myyearz@${thisyearz}@g ${ED2IN} - sed -i s@mymonthz@${monthz}@g ${ED2IN} - sed -i s@mydatez@${datez}@g ${ED2IN} - sed -i s@mytimez@${timez}@g ${ED2IN} - sed -i s@mydtlsm@${dtlsm}@g ${ED2IN} - sed -i s@thispoly@${polyname}@g ${ED2IN} - sed -i s@plonflag@${polylon}@g ${ED2IN} - sed -i s@platflag@${polylat}@g ${ED2IN} - sed -i s@timehhhh@${timeh}@g ${ED2IN} - sed -i s@datehhhh@${dateh}@g ${ED2IN} - sed -i s@monthhhh@${monthh}@g ${ED2IN} - sed -i s@yearhhhh@${yearh}@g ${ED2IN} - sed -i s@myinitmode@${initmode}@g ${ED2IN} - sed -i s@mysfilin@${thissfilin}@g ${ED2IN} - sed -i s@mytrees@${pfts}@g ${ED2IN} - sed -i s@mycrop@${crop}@g ${ED2IN} - sed -i s@myplantation@${plantation}@g ${ED2IN} - sed -i s@myiphen@${iphen}@g ${ED2IN} - sed -i s@myallom@${iallom}@g ${ED2IN} - sed -i s@myisoilflg@${polyisoil}@g ${ED2IN} - sed -i s@mynslcon@${polyntext}@g ${ED2IN} - sed -i s@myslxsand@${polysand}@g ${ED2IN} - sed -i s@myslxclay@${polyclay}@g ${ED2IN} - sed -i s@mysoilbc@${polysoilbc}@g ${ED2IN} - sed -i s@mysldrain@${polysldrain}@g ${ED2IN} - sed -i s@mysoilcol@${polycol}@g ${ED2IN} - sed -i s@mynzg@${polynzg}@g ${ED2IN} - sed -i s@mymetdriverdb@${metdriverdb}@g ${ED2IN} - sed -i s@mymetcyc1@${metcyc1}@g ${ED2IN} - sed -i s@mymetcycf@${metcycf}@g ${ED2IN} - sed -i s@mytoler@${toler}@g ${ED2IN} - sed -i s@RUNFLAG@HISTORY@g ${ED2IN} - sed -i s@myvmfactc3@${vmfactc3}@g ${ED2IN} - sed -i s@myvmfactc4@${vmfactc4}@g ${ED2IN} - sed -i s@mymphototrc3@${mphototrc3}@g ${ED2IN} - sed -i s@mymphototec3@${mphototec3}@g ${ED2IN} - sed -i s@mymphotoc4@${mphotoc4}@g ${ED2IN} - sed -i s@mybphotoblc3@${bphotoblc3}@g ${ED2IN} - sed -i s@mybphotonlc3@${bphotonlc3}@g ${ED2IN} - sed -i s@mybphotoc4@${bphotoc4}@g ${ED2IN} - sed -i s@mykwgrass@${kwgrass}@g ${ED2IN} - sed -i s@mykwtree@${kwtree}@g ${ED2IN} - sed -i s@mygammac3@${gammac3}@g ${ED2IN} - sed -i s@mygammac4@${gammac4}@g ${ED2IN} - sed -i s@myd0grass@${d0grass}@g ${ED2IN} - sed -i s@myd0tree@${d0tree}@g ${ED2IN} - sed -i s@myalphac3@${alphac3}@g ${ED2IN} - sed -i s@myalphac4@${alphac4}@g ${ED2IN} - sed -i s@myklowco2@${klowco2}@g ${ED2IN} - sed -i s@mydecomp@${decomp}@g ${ED2IN} - sed -i s@myrrffact@${rrffact}@g ${ED2IN} - sed -i s@mygrowthresp@${growthresp}@g ${ED2IN} - sed -i s@mylwidthgrass@${lwidthgrass}@g ${ED2IN} - sed -i s@mylwidthbltree@${lwidthbltree}@g ${ED2IN} - sed -i s@mylwidthnltree@${lwidthnltree}@g ${ED2IN} - sed -i s@myq10c3@${q10c3}@g ${ED2IN} - sed -i s@myq10c4@${q10c4}@g ${ED2IN} - sed -i s@myh2olimit@${h2olimit}@g ${ED2IN} - sed -i s@mymortscheme@${imortscheme}@g ${ED2IN} - sed -i s@myddmortconst@${ddmortconst}@g ${ED2IN} - sed -i s@mysfclyrm@${isfclyrm}@g ${ED2IN} - sed -i s@myicanturb@${icanturb}@g ${ED2IN} - sed -i s@myatmco2@${atmco2}@g ${ED2IN} - sed -i s@mythcrit@${thcrit}@g ${ED2IN} - sed -i s@mysmfire@${smfire}@g ${ED2IN} - sed -i s@myfire@${ifire}@g ${ED2IN} - sed -i s@myfuel@${fireparm}@g ${ED2IN} - sed -i s@mymetavg@${imetavg}@g ${ED2IN} - sed -i s@mypercol@${ipercol}@g ${ED2IN} - sed -i s@myrunoff@${runoff}@g ${ED2IN} - sed -i s@mymetrad@${imetrad}@g ${ED2IN} - sed -i s@mybranch@${ibranch}@g ${ED2IN} - sed -i s@mycanrad@${icanrad}@g ${ED2IN} - sed -i s@mycrown@${crown}@g ${ED2IN} - sed -i s@myltransvis@${ltransvis}@g ${ED2IN} - sed -i s@myltransnir@${ltransnir}@g ${ED2IN} - sed -i s@mylreflectvis@${lreflectvis}@g ${ED2IN} - sed -i s@mylreflectnir@${lreflectnir}@g ${ED2IN} - sed -i s@myorienttree@${orienttree}@g ${ED2IN} - sed -i s@myorientgrass@${orientgrass}@g ${ED2IN} - sed -i s@myclumptree@${clumptree}@g ${ED2IN} - sed -i s@myclumpgrass@${clumpgrass}@g ${ED2IN} - sed -i s@myvegtdyn@${ivegtdyn}@g ${ED2IN} - sed -i s@mybigleaf@${ibigleaf}@g ${ED2IN} - sed -i s@myrepro@${irepro}@g ${ED2IN} - sed -i s@myubmin@${ubmin}@g ${ED2IN} - sed -i s@myugbmin@${ugbmin}@g ${ED2IN} - sed -i s@myustmin@${ustmin}@g ${ED2IN} - sed -i s@mygamm@${gamm}@g ${ED2IN} - sed -i s@mygamh@${gamh}@g ${ED2IN} - sed -i s@mytprandtl@${tprandtl}@g ${ED2IN} - sed -i s@myribmax@${ribmax}@g ${ED2IN} - sed -i s@mygndvap@${igndvap}@g ${ED2IN} - sed -i s@mydtcensus@${dtcensus}@g ${ED2IN} - sed -i s@myyr1stcensus@${yr1stcensus}@g ${ED2IN} - sed -i s@mymon1stcensus@${mon1stcensus}@g ${ED2IN} - sed -i s@myminrecruitdbh@${minrecruitdbh}@g ${ED2IN} - sed -i s@mytreefall@${treefall}@g ${ED2IN} - #------ Soil variables. -------------------------------------------------------# - sed -i s@myslz1@"${polyslz1}"@g ${ED2IN} - sed -i s@myslz2@"${polyslz2}"@g ${ED2IN} - sed -i s@myslz3@"${polyslz3}"@g ${ED2IN} - sed -i s@myslz4@"${polyslz4}"@g ${ED2IN} - sed -i s@myslz5@"${polyslz5}"@g ${ED2IN} - sed -i s@myslz6@"${polyslz6}"@g ${ED2IN} - sed -i s@myslz7@"${polyslz7}"@g ${ED2IN} - sed -i s@myslmstr1@"${polyslm1}"@g ${ED2IN} - sed -i s@myslmstr2@"${polyslm2}"@g ${ED2IN} - sed -i s@myslmstr3@"${polyslm3}"@g ${ED2IN} - sed -i s@myslmstr4@"${polyslm4}"@g ${ED2IN} - sed -i s@myslmstr5@"${polyslm5}"@g ${ED2IN} - sed -i s@myslmstr6@"${polyslm6}"@g ${ED2IN} - sed -i s@myslmstr7@"${polyslm7}"@g ${ED2IN} - sed -i s@mystgoff1@"${polyslt1}"@g ${ED2IN} - sed -i s@mystgoff2@"${polyslt2}"@g ${ED2IN} - sed -i s@mystgoff3@"${polyslt3}"@g ${ED2IN} - sed -i s@mystgoff4@"${polyslt4}"@g ${ED2IN} - sed -i s@mystgoff5@"${polyslt5}"@g ${ED2IN} - sed -i s@mystgoff6@"${polyslt6}"@g ${ED2IN} - sed -i s@mystgoff7@"${polyslt7}"@g ${ED2IN} #------------------------------------------------------------------------------# + if [ ${toler} != '0.0000010' -a ${toler} != '0.0000001' -a ${toler} != '00' ] + then + #----- Re-generate ED2IN. --------------------------------------------------# + rm -f ${ED2IN} + rm -f ${here}/${polyname}/serial_lsf.out + #----- Copy the Template to the right directory. ---------------------------# + cp ${here}/Template/ED2IN ${ED2IN} + #----- Check whether to use SFILIN as restart or history. ------------------# + if [ ${runt} == 'INITIAL' ] && [ ${initmode} -eq 6 ] + then + thissfilin=${thisbiomin} + else + thissfilin=${there}/${polyname}/histo/${polyname} + fi + #---------------------------------------------------------------------------# - #------------------------------------------------------------------------------# - # A crashed polygon will inevitably go to the long_serial queue. Check # - # whether this is a head of a unrestricted parallel run. If it is, then call # - # this something else, otherwise use the polygon name. In any case, re-write # - # the srun.sh file. # - #------------------------------------------------------------------------------# - srun=${here}'/'${polyname}'/srun.sh' - unpahead=`bjobs -w -J ${jobname} 2> /dev/null | wc -l` - if [ ${unpahead} -eq 0 ] - then - thisname=${jobname} - else - polyIATA=`echo ${polyiata} | tr '[:lower:]' '[:upper:]'` - thisname=`echo ${jobname} | sed s@${polyiata}@${polyIATA}@g` - fi - #------------------------------------------------------------------------------# + #----- Update the polygon information on ED2IN. ----------------------------# + sed -i s@paththere@${there}@g ${ED2IN} + sed -i s@myyeara@${thisyeara}@g ${ED2IN} + sed -i s@mymontha@${montha}@g ${ED2IN} + sed -i s@mydatea@${datea}@g ${ED2IN} + sed -i s@mytimea@${timea}@g ${ED2IN} + sed -i s@myyearz@${thisyearz}@g ${ED2IN} + sed -i s@mymonthz@${monthz}@g ${ED2IN} + sed -i s@mydatez@${datez}@g ${ED2IN} + sed -i s@mytimez@${timez}@g ${ED2IN} + sed -i s@mydtlsm@${dtlsm}@g ${ED2IN} + sed -i s@thispoly@${polyname}@g ${ED2IN} + sed -i s@plonflag@${polylon}@g ${ED2IN} + sed -i s@platflag@${polylat}@g ${ED2IN} + sed -i s@timehhhh@${timeh}@g ${ED2IN} + sed -i s@datehhhh@${dateh}@g ${ED2IN} + sed -i s@monthhhh@${monthh}@g ${ED2IN} + sed -i s@yearhhhh@${yearh}@g ${ED2IN} + sed -i s@myinitmode@${initmode}@g ${ED2IN} + sed -i s@mysfilin@${thissfilin}@g ${ED2IN} + sed -i s@mytrees@${pfts}@g ${ED2IN} + sed -i s@mycrop@${crop}@g ${ED2IN} + sed -i s@myplantation@${plantation}@g ${ED2IN} + sed -i s@myiphen@${iphen}@g ${ED2IN} + sed -i s@myallom@${iallom}@g ${ED2IN} + sed -i s@myisoilflg@${polyisoil}@g ${ED2IN} + sed -i s@mynslcon@${polyntext}@g ${ED2IN} + sed -i s@myslxsand@${polysand}@g ${ED2IN} + sed -i s@myslxclay@${polyclay}@g ${ED2IN} + sed -i s@mysoilbc@${polysoilbc}@g ${ED2IN} + sed -i s@mysldrain@${polysldrain}@g ${ED2IN} + sed -i s@mysoilcol@${polycol}@g ${ED2IN} + sed -i s@mynzg@${polynzg}@g ${ED2IN} + sed -i s@mymetdriverdb@${metdriverdb}@g ${ED2IN} + sed -i s@mymetcyc1@${metcyc1}@g ${ED2IN} + sed -i s@mymetcycf@${metcycf}@g ${ED2IN} + sed -i s@mytoler@${toler}@g ${ED2IN} + sed -i s@RUNFLAG@HISTORY@g ${ED2IN} + sed -i s@myvmfactc3@${vmfactc3}@g ${ED2IN} + sed -i s@myvmfactc4@${vmfactc4}@g ${ED2IN} + sed -i s@mymphototrc3@${mphototrc3}@g ${ED2IN} + sed -i s@mymphototec3@${mphototec3}@g ${ED2IN} + sed -i s@mymphotoc4@${mphotoc4}@g ${ED2IN} + sed -i s@mybphotoblc3@${bphotoblc3}@g ${ED2IN} + sed -i s@mybphotonlc3@${bphotonlc3}@g ${ED2IN} + sed -i s@mybphotoc4@${bphotoc4}@g ${ED2IN} + sed -i s@mykwgrass@${kwgrass}@g ${ED2IN} + sed -i s@mykwtree@${kwtree}@g ${ED2IN} + sed -i s@mygammac3@${gammac3}@g ${ED2IN} + sed -i s@mygammac4@${gammac4}@g ${ED2IN} + sed -i s@myd0grass@${d0grass}@g ${ED2IN} + sed -i s@myd0tree@${d0tree}@g ${ED2IN} + sed -i s@myalphac3@${alphac3}@g ${ED2IN} + sed -i s@myalphac4@${alphac4}@g ${ED2IN} + sed -i s@myklowco2@${klowco2}@g ${ED2IN} + sed -i s@mydecomp@${decomp}@g ${ED2IN} + sed -i s@myrrffact@${rrffact}@g ${ED2IN} + sed -i s@mygrowthresp@${growthresp}@g ${ED2IN} + sed -i s@mylwidthgrass@${lwidthgrass}@g ${ED2IN} + sed -i s@mylwidthbltree@${lwidthbltree}@g ${ED2IN} + sed -i s@mylwidthnltree@${lwidthnltree}@g ${ED2IN} + sed -i s@myq10c3@${q10c3}@g ${ED2IN} + sed -i s@myq10c4@${q10c4}@g ${ED2IN} + sed -i s@myh2olimit@${h2olimit}@g ${ED2IN} + sed -i s@mymortscheme@${imortscheme}@g ${ED2IN} + sed -i s@myddmortconst@${ddmortconst}@g ${ED2IN} + sed -i s@mysfclyrm@${isfclyrm}@g ${ED2IN} + sed -i s@myicanturb@${icanturb}@g ${ED2IN} + sed -i s@myatmco2@${atmco2}@g ${ED2IN} + sed -i s@mythcrit@${thcrit}@g ${ED2IN} + sed -i s@mysmfire@${smfire}@g ${ED2IN} + sed -i s@myfire@${ifire}@g ${ED2IN} + sed -i s@myfuel@${fireparm}@g ${ED2IN} + sed -i s@mymetavg@${imetavg}@g ${ED2IN} + sed -i s@mypercol@${ipercol}@g ${ED2IN} + sed -i s@myrunoff@${runoff}@g ${ED2IN} + sed -i s@mymetrad@${imetrad}@g ${ED2IN} + sed -i s@mybranch@${ibranch}@g ${ED2IN} + sed -i s@mycanrad@${icanrad}@g ${ED2IN} + sed -i s@mycrown@${crown}@g ${ED2IN} + sed -i s@myltransvis@${ltransvis}@g ${ED2IN} + sed -i s@myltransnir@${ltransnir}@g ${ED2IN} + sed -i s@mylreflectvis@${lreflectvis}@g ${ED2IN} + sed -i s@mylreflectnir@${lreflectnir}@g ${ED2IN} + sed -i s@myorienttree@${orienttree}@g ${ED2IN} + sed -i s@myorientgrass@${orientgrass}@g ${ED2IN} + sed -i s@myclumptree@${clumptree}@g ${ED2IN} + sed -i s@myclumpgrass@${clumpgrass}@g ${ED2IN} + sed -i s@myvegtdyn@${ivegtdyn}@g ${ED2IN} + sed -i s@mybigleaf@${ibigleaf}@g ${ED2IN} + sed -i s@myrepro@${irepro}@g ${ED2IN} + sed -i s@myubmin@${ubmin}@g ${ED2IN} + sed -i s@myugbmin@${ugbmin}@g ${ED2IN} + sed -i s@myustmin@${ustmin}@g ${ED2IN} + sed -i s@mygamm@${gamm}@g ${ED2IN} + sed -i s@mygamh@${gamh}@g ${ED2IN} + sed -i s@mytprandtl@${tprandtl}@g ${ED2IN} + sed -i s@myribmax@${ribmax}@g ${ED2IN} + sed -i s@mygndvap@${igndvap}@g ${ED2IN} + sed -i s@mydtcensus@${dtcensus}@g ${ED2IN} + sed -i s@myyr1stcensus@${yr1stcensus}@g ${ED2IN} + sed -i s@mymon1stcensus@${mon1stcensus}@g ${ED2IN} + sed -i s@myminrecruitdbh@${minrecruitdbh}@g ${ED2IN} + sed -i s@mytreefall@${treefall}@g ${ED2IN} + #------ Soil variables. ----------------------------------------------------# + sed -i s@myslz1@"${polyslz1}"@g ${ED2IN} + sed -i s@myslz2@"${polyslz2}"@g ${ED2IN} + sed -i s@myslz3@"${polyslz3}"@g ${ED2IN} + sed -i s@myslz4@"${polyslz4}"@g ${ED2IN} + sed -i s@myslz5@"${polyslz5}"@g ${ED2IN} + sed -i s@myslz6@"${polyslz6}"@g ${ED2IN} + sed -i s@myslz7@"${polyslz7}"@g ${ED2IN} + sed -i s@myslmstr1@"${polyslm1}"@g ${ED2IN} + sed -i s@myslmstr2@"${polyslm2}"@g ${ED2IN} + sed -i s@myslmstr3@"${polyslm3}"@g ${ED2IN} + sed -i s@myslmstr4@"${polyslm4}"@g ${ED2IN} + sed -i s@myslmstr5@"${polyslm5}"@g ${ED2IN} + sed -i s@myslmstr6@"${polyslm6}"@g ${ED2IN} + sed -i s@myslmstr7@"${polyslm7}"@g ${ED2IN} + sed -i s@mystgoff1@"${polyslt1}"@g ${ED2IN} + sed -i s@mystgoff2@"${polyslt2}"@g ${ED2IN} + sed -i s@mystgoff3@"${polyslt3}"@g ${ED2IN} + sed -i s@mystgoff4@"${polyslt4}"@g ${ED2IN} + sed -i s@mystgoff5@"${polyslt5}"@g ${ED2IN} + sed -i s@mystgoff6@"${polyslt6}"@g ${ED2IN} + sed -i s@mystgoff7@"${polyslt7}"@g ${ED2IN} + #---------------------------------------------------------------------------# - #----- Get the waiting time used before. --------------------------------------# - thiswait=`grep "Sleep time is" ${polyname}/srun.sh | awk '{print $5}'` - #------------------------------------------------------------------------------# - #----- Copy the data set again. -----------------------------------------------# - /bin/rm -f ${srun} - /bin/rm -f ${here}/${polyname}/skipper.txt - /bin/cp ${here}/Template/srun.sh ${here}/${polyname}/srun.sh - #------------------------------------------------------------------------------# + #---------------------------------------------------------------------------# + # A crashed polygon will inevitably go to the long_serial queue. # + # Check whether this is a head of a unrestricted parallel run. If it is, # + # then call this something else, otherwise use the polygon name. In any # + # case, re-write the srun.sh file. # + #---------------------------------------------------------------------------# + srun=${here}'/'${polyname}'/srun.sh' - #----- The new queue is by default the long_serial. ---------------------------# - newqueue='long_serial' - #------------------------------------------------------------------------------# + unpahead=`bjobs -w -J ${jobname} 2> /dev/null | wc -l` + if [ ${unpahead} -eq 0 ] + then + thisname=${jobname} + else + polyIATA=`echo ${polyiata} | tr '[:lower:]' '[:upper:]'` + thisname=`echo ${jobname} | sed s@${polyiata}@${polyIATA}@g` + fi + #---------------------------------------------------------------------------# - #----- Change some settings in srun.sh. ---------------------------------------# - sed -i s@"jobname='thisjob'"@"jobname='${thisname}'"@g ${srun} - sed -i s@pathhere@${here}@g ${srun} - sed -i s@paththere@${here}@g ${srun} - sed -i s@thispoly@${polyname}@g ${srun} - sed -i s@thisdesc@${desc}@g ${srun} - sed -i s@thisqueue@${newqueue}@g ${srun} - sed -i s@zzzzzzzz@${wtime}@g ${srun} - sed -i s@myorder@${ff}@g ${srun} - #------------------------------------------------------------------------------# + #----- Get the waiting time used before. -----------------------------------# + thiswait=`grep "Sleep time is" ${polyname}/srun.sh | awk '{print $5}'` + #---------------------------------------------------------------------------# - else - #----- Give up on this node. --------------------------------------------------# - echo '${ff} :-{ Tolerance is tiny and it still does not work. Giving up...' - runt='THE_END' + + #----- Copy the data set again. --------------------------------------------# + /bin/rm -f ${srun} + /bin/rm -f ${here}/${polyname}/skipper.txt + /bin/cp ${here}/Template/srun.sh ${here}/${polyname}/srun.sh + #---------------------------------------------------------------------------# + + + #----- The new queue is by default the long_serial. ------------------------# + newqueue='long_serial' + #---------------------------------------------------------------------------# + + + + #----- Change some settings in srun.sh. ------------------------------------# + sed -i s@"jobname='thisjob'"@"jobname='${thisname}'"@g ${srun} + sed -i s@pathhere@${here}@g ${srun} + sed -i s@paththere@${here}@g ${srun} + sed -i s@thispoly@${polyname}@g ${srun} + sed -i s@thisdesc@${desc}@g ${srun} + sed -i s@thisqueue@${newqueue}@g ${srun} + sed -i s@zzzzzzzz@${wtime}@g ${srun} + sed -i s@myorder@${ff}@g ${srun} + #---------------------------------------------------------------------------# + + else + #----- Give up on this node. -----------------------------------------------# + echo "${ff} :-{ Tolerance is tiny and it still doesn't work. Giving up..." + runt='THE_END' + #---------------------------------------------------------------------------# + fi # [ ${toler} != '0.0000010' -a ${toler} != '0.0000001' -a ${toler} != '00' ] #------------------------------------------------------------------------------# - fi # [ ${toler} != '0.0000010' -a ${toler} != '0.0000001' -a ${toler} != '00' ] - #---------------------------------------------------------------------------------# - elif [ ${runt} == 'THE_END' ] - then - echo "${ff} o/\o ${polyname} has finished..." + elif [ ${runt} == 'THE_END' ] + then + echo "${ff} o/\o ${polyname} has finished..." - elif [ ${runt} == 'EXTINCT' -o ${runt} == 'STSTATE' ] && - [ ${queue} != 'unrestricted_parallel' ] - then - running=`bjobs -w -J ${jobname} 2> /dev/null | grep RUN | wc -l` - if [ ${running} -gt 0 ] + elif [ ${runt} == 'EXTINCT' -o ${runt} == 'STSTATE' ] && + [ ${queue} != 'unrestricted_parallel' ] then - deathrow="${deathrow} ${jobname}" - if [ ${runt} == 'EXTINCT' ] + running=`bjobs -w -J ${jobname} 2> /dev/null | grep RUN | wc -l` + if [ ${running} -gt 0 ] then - let newextinct=${newextinct}+1 - echo "${ff} B-) ${polyname} has become a desert..." - elif [ ${runt} == 'STSTATE' ] - then - let newststate=${newststate}+1 - echo "${ff} :-D ${polyname} has reached steady state..." + deathrow="${deathrow} ${jobname}" + if [ ${runt} == 'EXTINCT' ] + then + let newextinct=${newextinct}+1 + echo "${ff} B-) ${polyname} has become a desert..." + elif [ ${runt} == 'STSTATE' ] + then + let newststate=${newststate}+1 + echo "${ff} :-D ${polyname} has reached steady state..." + fi fi - fi - elif [ ${runt} == 'HISTORY' ] - then - #----- Check whether the simulation is running, and when in model time it is. ----# - stdout="${here}/${polyname}/serial_out.out" - simline=`grep "Simulating: " ${stdout} | tail -1` - runtime=`echo ${simline} | awk '{print $3}'` - simline=`grep "Simulating: " ${stdout} | tail -1` - runtime=`echo ${simline} | awk '{print $3}'` - echo "${ff} :-) ${polyname} is running (${runtime})..." + elif [ ${runt} == 'HISTORY' ] + then + #----- Check whether the simulation is running, and when in model time it is. -# + stdout="${here}/${polyname}/serial_out.out" + simline=`grep "Simulating: " ${stdout} | tail -1` + runtime=`echo ${simline} | awk '{print $3}'` + simline=`grep "Simulating: " ${stdout} | tail -1` + runtime=`echo ${simline} | awk '{print $3}'` + echo "${ff} :-) ${polyname} is running (${runtime})..." + #------------------------------------------------------------------------------# + elif [ ${runt} == 'INITIAL' ] + then + echo "${ff} :-| ${polyname} is pending ..." + else + echo "${ff} <:-| ${polyname} status is unknown..." + fi # [ ${runt} == 'CRASHED' ]... #---------------------------------------------------------------------------------# - elif [ ${runt} == 'INITIAL' ] - then - echo "${ff} :-| ${polyname} is pending ..." - else - echo "${ff} <:-| ${polyname} status is unknown..." - fi # [ ${runt} == 'CRASHED' ]... - #------------------------------------------------------------------------------------# - #------------------------------------------------------------------------------------# - # Last, we check whether the job is still running or not. In case it is not but # - # it should, update the ED2IN with the latest history and re-submit the job. # - #------------------------------------------------------------------------------------# - if [ ${runt} != 'THE_END' ] && [ ${runt} != 'STSTATE' ] && [ ${runt} != 'EXTINCT' ] - then - if [ ${queue} == 'unrestricted_parallel' ] + #---------------------------------------------------------------------------------# + # Last, we check whether the job is still running or not. In case it is not # + # but it should, update the ED2IN with the latest history and re-submit the job. # + #---------------------------------------------------------------------------------# + if [ ${runt} != 'THE_END' ] && [ ${runt} != 'STSTATE' ] && + [ ${runt} != 'EXTINCT' ] then - nlist=`grep ${polyname} ${here}/*/callunpa.sh | wc -l` - if [ ${nlist} -eq 0 ] + if [ ${queue} == 'unrestricted_parallel' ] then - running=0 + nlist=`grep ${polyname} ${here}/*/callunpa.sh | wc -l` + if [ ${nlist} -eq 0 ] + then + running=0 + else + j=0 + running=0 + while [ ${j} -lt ${nlist} ] && [ ${running} -eq 0 ] + do + let j=${j}+1 + thisline=`grep ${polyname} ${here}/*/callunpa.sh | head -${j} \ + | tail -1` + parent=`echo ${thisline} | awk '{print substr($1,1,8)}'` + parjob="${desc}-${parent}" + running=`bjobs -w -q ${queue} -J ${parjob} 2> /dev/null | tail -1 \ + | wc -l` + done + fi else - j=0 - running=0 - while [ ${j} -lt ${nlist} ] && [ ${running} -eq 0 ] - do - let j=${j}+1 - thisline=`grep ${polyname} ${here}/*/callunpa.sh | head -${j} | tail -1` - parent=`echo ${thisline} | awk '{print substr($1,1,8)}'` - parjob="${desc}-${parent}" - running=`bjobs -w -q ${queue} -J ${parjob} 2> /dev/null | tail -1 | wc -l` - done + running=`bjobs -w -J ${jobname} 2> /dev/null | tail -1 | wc -l` fi - else - running=`bjobs -w -J ${jobname} 2> /dev/null | tail -1 | wc -l` - fi - - if [ ${running} -eq 0 ] - then - echo "${polyname} is missing. Re-submitting..." >> ${situation} - - let nresubmit=${nresubmit}+1 - #------------------------------------------------------------------------------# - # Job was kicked out, submit it again. # - #------------------------------------------------------------------------------# - ED2IN=${here}'/'${polyname}'/ED2IN' - #----- Save the tolerance before we delete the file. --------------------------# - toler=`grep NL%RK4_TOLERANCE ${ED2IN} | awk '{print $3}'` - #------------------------------------------------------------------------------# - # This should never happen, but... # - #------------------------------------------------------------------------------# - if [ 'x'${oldtol} == 'xmytoler' -o 'x'${oldtol} == 'x' ] + if [ ${running} -eq 0 ] then - toler=0.01 - else - toler=${oldtol} - fi # [ 'x'${oldtol} == 'xmytoler' -o 'x'${oldtol} == 'x' ] - #------------------------------------------------------------------------------# - + echo "${polyname} is missing. Re-submitting..." >> ${situation} - #----- Re-generate ED2IN. -----------------------------------------------------# - rm -f ${ED2IN} - rm -f ${here}/${polyname}/serial_out.out - rm -f ${here}/${polyname}/serial_lsf.out - rm -f ${here}/${polyname}/serial_out.err + let nresubmit=${nresubmit}+1 - #----- Copy the Template to the right directory. ------------------------------# - cp ${here}/Template/ED2IN ${ED2IN} - - #------------------------------------------------------------------------------# - # Determine which PFTs to use. # - #------------------------------------------------------------------------------# - lonint=${polylon/.*} - latint=${polylat/.*} - pfts='1,2,3,4,16' - #------------------------------------------------------------------------------# + #---------------------------------------------------------------------------# + # Job was kicked out, submit it again. # + #---------------------------------------------------------------------------# + ED2IN=${here}'/'${polyname}'/ED2IN' + #----- Save the tolerance before we delete the file. -----------------------# + toler=`grep NL%RK4_TOLERANCE ${ED2IN} | awk '{print $3}'` + #---------------------------------------------------------------------------# + # This should never happen, but... # + #---------------------------------------------------------------------------# + if [ 'x'${oldtol} == 'xmytoler' -o 'x'${oldtol} == 'x' ] + then + toler=0.01 + else + toler=${oldtol} + fi # [ 'x'${oldtol} == 'xmytoler' -o 'x'${oldtol} == 'x' ] + #---------------------------------------------------------------------------# + #----- Re-generate ED2IN. --------------------------------------------------# + rm -f ${ED2IN} + rm -f ${here}/${polyname}/serial_out.out + rm -f ${here}/${polyname}/serial_lsf.out + rm -f ${here}/${polyname}/serial_out.err + #----- Copy the Template to the right directory. ---------------------------# + cp ${here}/Template/ED2IN ${ED2IN} - #----- Check whether to use SFILIN as restart or history. ---------------------# - if [ ${runt} == 'INITIAL' ] && [ ${initmode} -eq 6 ] - then - thissfilin=${thisbiomin} - else - thissfilin=${there}/${polyname}/histo/${polyname} - fi - #---------------------------------------------------------------------------------------# - - #----- Update the polygon information on ED2IN. -------------------------------# - sed -i s@paththere@${there}@g ${ED2IN} - sed -i s@myyeara@${thisyeara}@g ${ED2IN} - sed -i s@mymontha@${montha}@g ${ED2IN} - sed -i s@mydatea@${datea}@g ${ED2IN} - sed -i s@mytimea@${timea}@g ${ED2IN} - sed -i s@myyearz@${thisyearz}@g ${ED2IN} - sed -i s@mymonthz@${monthz}@g ${ED2IN} - sed -i s@mydatez@${datez}@g ${ED2IN} - sed -i s@mytimez@${timez}@g ${ED2IN} - sed -i s@mydtlsm@${dtlsm}@g ${ED2IN} - sed -i s@thispoly@${polyname}@g ${ED2IN} - sed -i s@plonflag@${polylon}@g ${ED2IN} - sed -i s@platflag@${polylat}@g ${ED2IN} - sed -i s@timehhhh@${timeh}@g ${ED2IN} - sed -i s@datehhhh@${dateh}@g ${ED2IN} - sed -i s@monthhhh@${monthh}@g ${ED2IN} - sed -i s@yearhhhh@${yearh}@g ${ED2IN} - sed -i s@myinitmode@${initmode}@g ${ED2IN} - sed -i s@mysfilin@${thissfilin}@g ${ED2IN} - sed -i s@mytrees@${pfts}@g ${ED2IN} - sed -i s@mycrop@${crop}@g ${ED2IN} - sed -i s@myplantation@${plantation}@g ${ED2IN} - sed -i s@myiphen@${iphen}@g ${ED2IN} - sed -i s@myallom@${iallom}@g ${ED2IN} - sed -i s@myisoilflg@${polyisoil}@g ${ED2IN} - sed -i s@mynslcon@${polyntext}@g ${ED2IN} - sed -i s@myslxsand@${polysand}@g ${ED2IN} - sed -i s@myslxclay@${polyclay}@g ${ED2IN} - sed -i s@mysoilbc@${polysoilbc}@g ${ED2IN} - sed -i s@mysldrain@${polysldrain}@g ${ED2IN} - sed -i s@mysoilcol@${polycol}@g ${ED2IN} - sed -i s@mynzg@${polynzg}@g ${ED2IN} - sed -i s@mymetdriverdb@${metdriverdb}@g ${ED2IN} - sed -i s@mymetcyc1@${metcyc1}@g ${ED2IN} - sed -i s@mymetcycf@${metcycf}@g ${ED2IN} - sed -i s@mytoler@${toler}@g ${ED2IN} - sed -i s@myvmfactc3@${vmfactc3}@g ${ED2IN} - sed -i s@myvmfactc4@${vmfactc4}@g ${ED2IN} - sed -i s@mymphototrc3@${mphototrc3}@g ${ED2IN} - sed -i s@mymphototec3@${mphototec3}@g ${ED2IN} - sed -i s@mymphotoc4@${mphotoc4}@g ${ED2IN} - sed -i s@mybphotoblc3@${bphotoblc3}@g ${ED2IN} - sed -i s@mybphotonlc3@${bphotonlc3}@g ${ED2IN} - sed -i s@mybphotoc4@${bphotoc4}@g ${ED2IN} - sed -i s@mykwgrass@${kwgrass}@g ${ED2IN} - sed -i s@mykwtree@${kwtree}@g ${ED2IN} - sed -i s@mygammac3@${gammac3}@g ${ED2IN} - sed -i s@mygammac4@${gammac4}@g ${ED2IN} - sed -i s@myd0grass@${d0grass}@g ${ED2IN} - sed -i s@myd0tree@${d0tree}@g ${ED2IN} - sed -i s@myalphac3@${alphac3}@g ${ED2IN} - sed -i s@myalphac4@${alphac4}@g ${ED2IN} - sed -i s@myklowco2@${klowco2}@g ${ED2IN} - sed -i s@mydecomp@${decomp}@g ${ED2IN} - sed -i s@myrrffact@${rrffact}@g ${ED2IN} - sed -i s@mygrowthresp@${growthresp}@g ${ED2IN} - sed -i s@mylwidthgrass@${lwidthgrass}@g ${ED2IN} - sed -i s@mylwidthbltree@${lwidthbltree}@g ${ED2IN} - sed -i s@mylwidthnltree@${lwidthnltree}@g ${ED2IN} - sed -i s@myq10c3@${q10c3}@g ${ED2IN} - sed -i s@myq10c4@${q10c4}@g ${ED2IN} - sed -i s@myh2olimit@${h2olimit}@g ${ED2IN} - sed -i s@mymortscheme@${imortscheme}@g ${ED2IN} - sed -i s@myddmortconst@${ddmortconst}@g ${ED2IN} - sed -i s@mysfclyrm@${isfclyrm}@g ${ED2IN} - sed -i s@myicanturb@${icanturb}@g ${ED2IN} - sed -i s@myatmco2@${atmco2}@g ${ED2IN} - sed -i s@mythcrit@${thcrit}@g ${ED2IN} - sed -i s@mysmfire@${smfire}@g ${ED2IN} - sed -i s@myfire@${ifire}@g ${ED2IN} - sed -i s@myfuel@${fireparm}@g ${ED2IN} - sed -i s@mymetavg@${imetavg}@g ${ED2IN} - sed -i s@mypercol@${ipercol}@g ${ED2IN} - sed -i s@myrunoff@${runoff}@g ${ED2IN} - sed -i s@mymetrad@${imetrad}@g ${ED2IN} - sed -i s@mybranch@${ibranch}@g ${ED2IN} - sed -i s@mycanrad@${icanrad}@g ${ED2IN} - sed -i s@mycrown@${crown}@g ${ED2IN} - sed -i s@myltransvis@${ltransvis}@g ${ED2IN} - sed -i s@myltransnir@${ltransnir}@g ${ED2IN} - sed -i s@mylreflectvis@${lreflectvis}@g ${ED2IN} - sed -i s@mylreflectnir@${lreflectnir}@g ${ED2IN} - sed -i s@myorienttree@${orienttree}@g ${ED2IN} - sed -i s@myorientgrass@${orientgrass}@g ${ED2IN} - sed -i s@myclumptree@${clumptree}@g ${ED2IN} - sed -i s@myclumpgrass@${clumpgrass}@g ${ED2IN} - sed -i s@myvegtdyn@${ivegtdyn}@g ${ED2IN} - sed -i s@mybigleaf@${ibigleaf}@g ${ED2IN} - sed -i s@myrepro@${irepro}@g ${ED2IN} - sed -i s@myubmin@${ubmin}@g ${ED2IN} - sed -i s@myugbmin@${ugbmin}@g ${ED2IN} - sed -i s@myustmin@${ustmin}@g ${ED2IN} - sed -i s@mygamm@${gamm}@g ${ED2IN} - sed -i s@mygamh@${gamh}@g ${ED2IN} - sed -i s@mytprandtl@${tprandtl}@g ${ED2IN} - sed -i s@myribmax@${ribmax}@g ${ED2IN} - sed -i s@mygndvap@${igndvap}@g ${ED2IN} - sed -i s@mydtcensus@${dtcensus}@g ${ED2IN} - sed -i s@myyr1stcensus@${yr1stcensus}@g ${ED2IN} - sed -i s@mymon1stcensus@${mon1stcensus}@g ${ED2IN} - sed -i s@myminrecruitdbh@${minrecruitdbh}@g ${ED2IN} - sed -i s@mytreefall@${treefall}@g ${ED2IN} - #------ Soil variables. -------------------------------------------------------# - sed -i s@myslz1@"${polyslz1}"@g ${ED2IN} - sed -i s@myslz2@"${polyslz2}"@g ${ED2IN} - sed -i s@myslz3@"${polyslz3}"@g ${ED2IN} - sed -i s@myslz4@"${polyslz4}"@g ${ED2IN} - sed -i s@myslz5@"${polyslz5}"@g ${ED2IN} - sed -i s@myslz6@"${polyslz6}"@g ${ED2IN} - sed -i s@myslz7@"${polyslz7}"@g ${ED2IN} - sed -i s@myslmstr1@"${polyslm1}"@g ${ED2IN} - sed -i s@myslmstr2@"${polyslm2}"@g ${ED2IN} - sed -i s@myslmstr3@"${polyslm3}"@g ${ED2IN} - sed -i s@myslmstr4@"${polyslm4}"@g ${ED2IN} - sed -i s@myslmstr5@"${polyslm5}"@g ${ED2IN} - sed -i s@myslmstr6@"${polyslm6}"@g ${ED2IN} - sed -i s@myslmstr7@"${polyslm7}"@g ${ED2IN} - sed -i s@mystgoff1@"${polyslt1}"@g ${ED2IN} - sed -i s@mystgoff2@"${polyslt2}"@g ${ED2IN} - sed -i s@mystgoff3@"${polyslt3}"@g ${ED2IN} - sed -i s@mystgoff4@"${polyslt4}"@g ${ED2IN} - sed -i s@mystgoff5@"${polyslt5}"@g ${ED2IN} - sed -i s@mystgoff6@"${polyslt6}"@g ${ED2IN} - sed -i s@mystgoff7@"${polyslt7}"@g ${ED2IN} - #----- Change run type. -------------------------------------------------------# - if [ ${runt} == 'INITIAL' ] - then - sed -i s@RUNFLAG@${runt}@g ${ED2IN} - else - sed -i s@RUNFLAG@HISTORY@g ${ED2IN} - fi - #------------------------------------------------------------------------------# + #---------------------------------------------------------------------------# + # Determine which PFTs to use. # + #---------------------------------------------------------------------------# + lonint=${polylon/.*} + latint=${polylat/.*} + pfts='1,2,3,4,16' + #---------------------------------------------------------------------------# - #------------------------------------------------------------------------------# - # A halted polygon will inevitably go to the long_serial queue. Re-write # - # the srun.sh file. # - #------------------------------------------------------------------------------# - srun=${here}'/'${polyname}'/srun.sh' - #----- Get the waiting time used before. --------------------------------------# - thiswait=`grep 'Sleep time is' ${polyname}/srun.sh | awk '{print $5}'` - if [ 'x'${thiswait} == 'x' ] - then - let wtime=${ff}%8 - let wtime=${wtime}*20 - nudge=`date +%S` - if [ ${nudge} -lt 10 ] - then - nudge=`echo ${nudge} | awk '{print substr($1,2,1)}'` + #----- Check whether to use SFILIN as restart or history. ------------------# + if [ ${runt} == 'INITIAL' ] && [ ${initmode} -eq 6 ] + then + thissfilin=${thisbiomin} + else + thissfilin=${there}/${polyname}/histo/${polyname} fi - let nudge=${nudge}%15 - let wtime=${wtime}+${nudge} - let wtime=${wtime}+2 - fi - /bin/rm -f ${srun} - /bin/rm -f ${here}/${polyname}/skipper.txt + #---------------------------------------------------------------------------# - cp ${here}/Template/srun.sh ${here}/${polyname}/srun.sh + #----- Update the polygon information on ED2IN. ----------------------------# + sed -i s@paththere@${there}@g ${ED2IN} + sed -i s@myyeara@${thisyeara}@g ${ED2IN} + sed -i s@mymontha@${montha}@g ${ED2IN} + sed -i s@mydatea@${datea}@g ${ED2IN} + sed -i s@mytimea@${timea}@g ${ED2IN} + sed -i s@myyearz@${thisyearz}@g ${ED2IN} + sed -i s@mymonthz@${monthz}@g ${ED2IN} + sed -i s@mydatez@${datez}@g ${ED2IN} + sed -i s@mytimez@${timez}@g ${ED2IN} + sed -i s@mydtlsm@${dtlsm}@g ${ED2IN} + sed -i s@thispoly@${polyname}@g ${ED2IN} + sed -i s@plonflag@${polylon}@g ${ED2IN} + sed -i s@platflag@${polylat}@g ${ED2IN} + sed -i s@timehhhh@${timeh}@g ${ED2IN} + sed -i s@datehhhh@${dateh}@g ${ED2IN} + sed -i s@monthhhh@${monthh}@g ${ED2IN} + sed -i s@yearhhhh@${yearh}@g ${ED2IN} + sed -i s@myinitmode@${initmode}@g ${ED2IN} + sed -i s@mysfilin@${thissfilin}@g ${ED2IN} + sed -i s@mytrees@${pfts}@g ${ED2IN} + sed -i s@mycrop@${crop}@g ${ED2IN} + sed -i s@myplantation@${plantation}@g ${ED2IN} + sed -i s@myiphen@${iphen}@g ${ED2IN} + sed -i s@myallom@${iallom}@g ${ED2IN} + sed -i s@myisoilflg@${polyisoil}@g ${ED2IN} + sed -i s@mynslcon@${polyntext}@g ${ED2IN} + sed -i s@myslxsand@${polysand}@g ${ED2IN} + sed -i s@myslxclay@${polyclay}@g ${ED2IN} + sed -i s@mysoilbc@${polysoilbc}@g ${ED2IN} + sed -i s@mysldrain@${polysldrain}@g ${ED2IN} + sed -i s@mysoilcol@${polycol}@g ${ED2IN} + sed -i s@mynzg@${polynzg}@g ${ED2IN} + sed -i s@mymetdriverdb@${metdriverdb}@g ${ED2IN} + sed -i s@mymetcyc1@${metcyc1}@g ${ED2IN} + sed -i s@mymetcycf@${metcycf}@g ${ED2IN} + sed -i s@mytoler@${toler}@g ${ED2IN} + sed -i s@myvmfactc3@${vmfactc3}@g ${ED2IN} + sed -i s@myvmfactc4@${vmfactc4}@g ${ED2IN} + sed -i s@mymphototrc3@${mphototrc3}@g ${ED2IN} + sed -i s@mymphototec3@${mphototec3}@g ${ED2IN} + sed -i s@mymphotoc4@${mphotoc4}@g ${ED2IN} + sed -i s@mybphotoblc3@${bphotoblc3}@g ${ED2IN} + sed -i s@mybphotonlc3@${bphotonlc3}@g ${ED2IN} + sed -i s@mybphotoc4@${bphotoc4}@g ${ED2IN} + sed -i s@mykwgrass@${kwgrass}@g ${ED2IN} + sed -i s@mykwtree@${kwtree}@g ${ED2IN} + sed -i s@mygammac3@${gammac3}@g ${ED2IN} + sed -i s@mygammac4@${gammac4}@g ${ED2IN} + sed -i s@myd0grass@${d0grass}@g ${ED2IN} + sed -i s@myd0tree@${d0tree}@g ${ED2IN} + sed -i s@myalphac3@${alphac3}@g ${ED2IN} + sed -i s@myalphac4@${alphac4}@g ${ED2IN} + sed -i s@myklowco2@${klowco2}@g ${ED2IN} + sed -i s@mydecomp@${decomp}@g ${ED2IN} + sed -i s@myrrffact@${rrffact}@g ${ED2IN} + sed -i s@mygrowthresp@${growthresp}@g ${ED2IN} + sed -i s@mylwidthgrass@${lwidthgrass}@g ${ED2IN} + sed -i s@mylwidthbltree@${lwidthbltree}@g ${ED2IN} + sed -i s@mylwidthnltree@${lwidthnltree}@g ${ED2IN} + sed -i s@myq10c3@${q10c3}@g ${ED2IN} + sed -i s@myq10c4@${q10c4}@g ${ED2IN} + sed -i s@myh2olimit@${h2olimit}@g ${ED2IN} + sed -i s@mymortscheme@${imortscheme}@g ${ED2IN} + sed -i s@myddmortconst@${ddmortconst}@g ${ED2IN} + sed -i s@mysfclyrm@${isfclyrm}@g ${ED2IN} + sed -i s@myicanturb@${icanturb}@g ${ED2IN} + sed -i s@myatmco2@${atmco2}@g ${ED2IN} + sed -i s@mythcrit@${thcrit}@g ${ED2IN} + sed -i s@mysmfire@${smfire}@g ${ED2IN} + sed -i s@myfire@${ifire}@g ${ED2IN} + sed -i s@myfuel@${fireparm}@g ${ED2IN} + sed -i s@mymetavg@${imetavg}@g ${ED2IN} + sed -i s@mypercol@${ipercol}@g ${ED2IN} + sed -i s@myrunoff@${runoff}@g ${ED2IN} + sed -i s@mymetrad@${imetrad}@g ${ED2IN} + sed -i s@mybranch@${ibranch}@g ${ED2IN} + sed -i s@mycanrad@${icanrad}@g ${ED2IN} + sed -i s@mycrown@${crown}@g ${ED2IN} + sed -i s@myltransvis@${ltransvis}@g ${ED2IN} + sed -i s@myltransnir@${ltransnir}@g ${ED2IN} + sed -i s@mylreflectvis@${lreflectvis}@g ${ED2IN} + sed -i s@mylreflectnir@${lreflectnir}@g ${ED2IN} + sed -i s@myorienttree@${orienttree}@g ${ED2IN} + sed -i s@myorientgrass@${orientgrass}@g ${ED2IN} + sed -i s@myclumptree@${clumptree}@g ${ED2IN} + sed -i s@myclumpgrass@${clumpgrass}@g ${ED2IN} + sed -i s@myvegtdyn@${ivegtdyn}@g ${ED2IN} + sed -i s@mybigleaf@${ibigleaf}@g ${ED2IN} + sed -i s@myrepro@${irepro}@g ${ED2IN} + sed -i s@myubmin@${ubmin}@g ${ED2IN} + sed -i s@myugbmin@${ugbmin}@g ${ED2IN} + sed -i s@myustmin@${ustmin}@g ${ED2IN} + sed -i s@mygamm@${gamm}@g ${ED2IN} + sed -i s@mygamh@${gamh}@g ${ED2IN} + sed -i s@mytprandtl@${tprandtl}@g ${ED2IN} + sed -i s@myribmax@${ribmax}@g ${ED2IN} + sed -i s@mygndvap@${igndvap}@g ${ED2IN} + sed -i s@mydtcensus@${dtcensus}@g ${ED2IN} + sed -i s@myyr1stcensus@${yr1stcensus}@g ${ED2IN} + sed -i s@mymon1stcensus@${mon1stcensus}@g ${ED2IN} + sed -i s@myminrecruitdbh@${minrecruitdbh}@g ${ED2IN} + sed -i s@mytreefall@${treefall}@g ${ED2IN} + #------ Soil variables. ----------------------------------------------------# + sed -i s@myslz1@"${polyslz1}"@g ${ED2IN} + sed -i s@myslz2@"${polyslz2}"@g ${ED2IN} + sed -i s@myslz3@"${polyslz3}"@g ${ED2IN} + sed -i s@myslz4@"${polyslz4}"@g ${ED2IN} + sed -i s@myslz5@"${polyslz5}"@g ${ED2IN} + sed -i s@myslz6@"${polyslz6}"@g ${ED2IN} + sed -i s@myslz7@"${polyslz7}"@g ${ED2IN} + sed -i s@myslmstr1@"${polyslm1}"@g ${ED2IN} + sed -i s@myslmstr2@"${polyslm2}"@g ${ED2IN} + sed -i s@myslmstr3@"${polyslm3}"@g ${ED2IN} + sed -i s@myslmstr4@"${polyslm4}"@g ${ED2IN} + sed -i s@myslmstr5@"${polyslm5}"@g ${ED2IN} + sed -i s@myslmstr6@"${polyslm6}"@g ${ED2IN} + sed -i s@myslmstr7@"${polyslm7}"@g ${ED2IN} + sed -i s@mystgoff1@"${polyslt1}"@g ${ED2IN} + sed -i s@mystgoff2@"${polyslt2}"@g ${ED2IN} + sed -i s@mystgoff3@"${polyslt3}"@g ${ED2IN} + sed -i s@mystgoff4@"${polyslt4}"@g ${ED2IN} + sed -i s@mystgoff5@"${polyslt5}"@g ${ED2IN} + sed -i s@mystgoff6@"${polyslt6}"@g ${ED2IN} + sed -i s@mystgoff7@"${polyslt7}"@g ${ED2IN} + #----- Change run type. ----------------------------------------------------# + if [ ${runt} == 'INITIAL' ] + then + sed -i s@RUNFLAG@${runt}@g ${ED2IN} + else + sed -i s@RUNFLAG@HISTORY@g ${ED2IN} + fi + #---------------------------------------------------------------------------# - #----- The new queue is by default the long_serial. ---------------------------# - newqueue='long_serial' - #----- Change some settings in srun.sh. ---------------------------------------# - sed -i s@pathhere@${here}@g ${srun} - sed -i s@paththere@${here}@g ${srun} - sed -i s@thispoly@${polyname}@g ${srun} - sed -i s@thisqueue@${newqueue}@g ${srun} - sed -i s@thisdesc@${desc}@g ${srun} - sed -i s@zzzzzzzz@${wtime}@g ${srun} - sed -i s@myorder@${ff}@g ${srun} - #----- Re-submit the job to long_serial queue. --------------------------------# - ${here}'/'${polyname}'/srun.sh' + #---------------------------------------------------------------------------# + # A halted polygon will inevitably go to the long_serial queue. # + # Re-write the srun.sh file. # + #---------------------------------------------------------------------------# + srun=${here}'/'${polyname}'/srun.sh' - #----- Switch the status to pending. ------------------------------------------# - year=${yeara} - month=${montha} - day=${datea} - hhmm=${timea} - runt='INITIAL' - agb='NA' - bsa='NA' - lai='NA' + #----- Get the waiting time used before. -----------------------------------# + thiswait=`grep 'Sleep time is' ${polyname}/srun.sh | awk '{print $5}'` + if [ 'x'${thiswait} == 'x' ] + then + let wtime=${ff}%8 + let wtime=${wtime}*20 + nudge=`date +%S` + if [ ${nudge} -lt 10 ] + then + nudge=`echo ${nudge} | awk '{print substr($1,2,1)}'` + fi + let nudge=${nudge}%15 + let wtime=${wtime}+${nudge} + let wtime=${wtime}+2 + fi + /bin/rm -f ${srun} + /bin/rm -f ${here}/${polyname}/skipper.txt + + cp ${here}/Template/srun.sh ${here}/${polyname}/srun.sh + + #----- The new queue is by default the long_serial. ------------------------# + newqueue='long_serial' + + #----- Change some settings in srun.sh. ------------------------------------# + sed -i s@pathhere@${here}@g ${srun} + sed -i s@paththere@${here}@g ${srun} + sed -i s@thispoly@${polyname}@g ${srun} + sed -i s@thisqueue@${newqueue}@g ${srun} + sed -i s@thisdesc@${desc}@g ${srun} + sed -i s@zzzzzzzz@${wtime}@g ${srun} + sed -i s@myorder@${ff}@g ${srun} + + #----- Re-submit the job to long_serial queue. -----------------------------# + ${here}'/'${polyname}'/srun.sh' + + #----- Switch the status to pending. ---------------------------------------# + year=${yeara} + month=${montha} + day=${datea} + hhmm=${timea} + runt='INITIAL' + agb='NA' + bsa='NA' + lai='NA' + else + echo "${polyname} is running/pending..." >> ${situation} + fi # [ ${running} -eq 0 ] else - echo "${polyname} is running/pending..." >> ${situation} - fi # [ ${running} -eq 0 ] - else - echo "${polyname} status is ${runt}. No need to resubmit." >> ${situation} - fi # [ ${runt} == 'HISTORY' -a ${queue} == 'long_serial' ] + echo "${polyname} status is ${runt}. No need to resubmit." >> ${situation} + fi # [ ${runt} == 'HISTORY' -a ${queue} == 'long_serial' ] + #---------------------------------------------------------------------------------# + fi #------------------------------------------------------------------------------------# - #------------------------------------------------------------------------------------# # Test whether the job can be submitted. # #------------------------------------------------------------------------------------# - if [ ${runt} == 'INITIAL' ] + if [ ${runt} == 'INITIAL' ] && [ -s ${here}/${polyname} ] then if [ ${queue} == 'unrestricted_parallel' ] then @@ -1757,39 +1786,13 @@ then fi #---------------------------------------------------------------------------------# fi - #------------------------------------------------------------------------------------# - - - - #----- Add the speed test for the polygons that ran at least two cycles. ------------# - let dyear=${year}-${yeara}+1 - if [ ${dyear} -gt 2 ] - then - premier=${here}/${polyname}/histo/${polyname}-S-${yeara}-01-01-000000-g01.h5 - dernier=${here}/${polyname}/histo/${polyname}-S-${year}-01-01-000000-g01.h5 - - #----- Find time it took so far. -------------------------------------------------# - whenh1st=`stat -c %Z ${premier} | awk '{print $1}'` - whenhlast=`stat -c %Z ${dernier} | awk '{print $1}'` - let dwhen=${whenhlast}-${whenh1st} - dwhen=`${ccc} ${dwhen}/86400.` - - #----- Find the number of years. -------------------------------------------------# - let yearfull=${yearz}-${yeara} - let yearsofar=${year}-${yeara} - - #----- Estimate the number of years until the last year. -------------------------# - whenend=`${ccc} ${dwhen}*${yearfull}/${yearsofar}` - else - whenend='NA' - fi #---------------------------------------------------------------------------------------# #----- Write polygon check into a single table. -------------------------------------# output="${polyname} ${polylon} ${polylat} ${year} ${month} ${day} ${hhmm}" - output="${output} ${runt} ${agb} ${bsa} ${lai} ${whenend}" + output="${output} ${runt} ${agb} ${bsa} ${lai} NA" echo ${output} >> ${outcheck} #------------------------------------------------------------------------------------# @@ -1834,13 +1837,20 @@ then newline=`echo ${oldline} | sed s@${queue}@${newqueue}@g` sed -i s@"${oldline}"@"${newline}"@g ${joborder} fi + elif [ ! -s ${here}/${polyname} ] + then + newqueue="long_serial" + oldline=${oi} + newline=`echo ${oldline} | sed s@${queue}@${newqueue}@g` + sed -i s@"${oldline}"@"${newline}"@g ${joborder} fi #------------------------------------------------------------------------------------# # Check whether the steady-state restart file is copied to the destination # # directory. # #------------------------------------------------------------------------------------# - if [ "x${copyrestart}" == "xy" ] || [ "x${copyrestart}" == "xY" ] + if [ "x${copyrestart}" == "xy" ] || [ "x${copyrestart}" == "xY" ] && + [ -s ${here}/${polyname} ] then if [ ${runt} == 'STSTATE' -o ${runt} == 'THE_END' -o ${runt} == 'EXTINCT' ] then @@ -2102,174 +2112,176 @@ echo 'Looking for empty cores on the queues...' # Check the amount of room left for each queue. Make sure that we don't exceed the # # maximum availability or the maximum use allowed. # #------------------------------------------------------------------------------------------# +/bin/rm -f ${tablefile} +touch ${tablefile} #------ Moorcroft2a. ----------------------------------------------------------------------# let m2atot=${m2arun}+${m2apen} let m2aroom=${m2afull}-${m2atot} let m2apot=${m2aumax}-${m2amoi} -if [ ${m2apot} -lt 0 ] +if [ ${m2apot} -lt 0 ] || [ ${m2aroom} -lt 0 ] then m2aroom=0 elif [ ${m2apot} -lt ${m2aroom} ] then m2aroom=${m2apot} fi -echo " -----------------------------------------------------------" -echo " Moorcroft2a" -echo " " -echo " TOTAL = ${m2atot} " -echo " RUN = ${m2arun} " -echo " PEND = ${m2apen} " -echo " User max = ${m2aumax}" -echo " My runs = ${m2amoi} " -echo " Room = ${m2aroom}" -echo " Potential = ${m2apot} " -echo " User max = ${m2aumax}" -echo " -----------------------------------------------------------" -echo " " +echo " -----------------------------------------------------------" >> ${tablefile} +echo " Moorcroft2a" >> ${tablefile} +echo " " >> ${tablefile} +echo " TOTAL = ${m2atot} " >> ${tablefile} +echo " RUN = ${m2arun} " >> ${tablefile} +echo " PEND = ${m2apen} " >> ${tablefile} +echo " User max = ${m2aumax}" >> ${tablefile} +echo " My runs = ${m2amoi} " >> ${tablefile} +echo " Room = ${m2aroom}" >> ${tablefile} +echo " Potential = ${m2apot} " >> ${tablefile} +echo " User max = ${m2aumax}" >> ${tablefile} +echo " -----------------------------------------------------------" >> ${tablefile} +echo " " >> ${tablefile} #------ Moorcroft2b. ----------------------------------------------------------------------# let m2btot=${m2brun}+${m2bpen} let m2broom=${m2bfull}-${m2btot} let m2bpot=${m2bumax}-${m2bmoi} -if [ ${m2bpot} -lt 0 ] +if [ ${m2bpot} -lt 0 ] || [ ${m2broom} -lt 0 ] then m2broom=0 elif [ ${m2bpot} -lt ${m2broom} ] then m2broom=${m2bpot} fi -echo " -----------------------------------------------------------" -echo " Moorcroft2b" -echo " " -echo " TOTAL = ${m2btot} " -echo " RUN = ${m2brun} " -echo " PEND = ${m2bpen} " -echo " User max = ${m2bumax}" -echo " My runs = ${m2bmoi} " -echo " Room = ${m2broom}" -echo " Potential = ${m2bpot} " -echo " User max = ${m2bumax}" -echo " -----------------------------------------------------------" -echo " " +echo " -----------------------------------------------------------" >> ${tablefile} +echo " Moorcroft2b" >> ${tablefile} +echo " " >> ${tablefile} +echo " TOTAL = ${m2btot} " >> ${tablefile} +echo " RUN = ${m2brun} " >> ${tablefile} +echo " PEND = ${m2bpen} " >> ${tablefile} +echo " User max = ${m2bumax}" >> ${tablefile} +echo " My runs = ${m2bmoi} " >> ${tablefile} +echo " Room = ${m2broom}" >> ${tablefile} +echo " Potential = ${m2bpot} " >> ${tablefile} +echo " User max = ${m2bumax}" >> ${tablefile} +echo " -----------------------------------------------------------" >> ${tablefile} +echo " " >> ${tablefile} #------ Moorcroft2c. ----------------------------------------------------------------------# let m2ctot=${m2crun}+${m2cpen} let m2croom=${m2cfull}-${m2ctot} let m2cpot=${m2cumax}-${m2cmoi} -if [ ${m2cpot} -lt 0 ] +if [ ${m2cpot} -lt 0 ] || [ ${m2croom} -lt 0 ] then m2croom=0 elif [ ${m2cpot} -lt ${m2croom} ] then m2croom=${m2cpot} fi -echo " -----------------------------------------------------------" -echo " Moorcroft2c" -echo " " -echo " TOTAL = ${m2ctot} " -echo " RUN = ${m2crun} " -echo " PEND = ${m2cpen} " -echo " User max = ${m2cumax}" -echo " My runs = ${m2cmoi} " -echo " Room = ${m2croom}" -echo " Potential = ${m2cpot} " -echo " User max = ${m2cumax}" -echo " -----------------------------------------------------------" -echo " " +echo " -----------------------------------------------------------" >> ${tablefile} +echo " Moorcroft2c" >> ${tablefile} +echo " " >> ${tablefile} +echo " TOTAL = ${m2ctot} " >> ${tablefile} +echo " RUN = ${m2crun} " >> ${tablefile} +echo " PEND = ${m2cpen} " >> ${tablefile} +echo " User max = ${m2cumax}" >> ${tablefile} +echo " My runs = ${m2cmoi} " >> ${tablefile} +echo " Room = ${m2croom}" >> ${tablefile} +echo " Potential = ${m2cpot} " >> ${tablefile} +echo " User max = ${m2cumax}" >> ${tablefile} +echo " -----------------------------------------------------------" >> ${tablefile} +echo " " >> ${tablefile} #------ Moorcroft_6100a. ------------------------------------------------------------------# let a61tot=${a61run}+${a61pen} let a61room=${a61full}-${a61tot} let a61pot=${a61umax}-${a61moi} -if [ ${a61pot} -lt 0 ] +if [ ${a61pot} -lt 0 ] || [ ${a61room} -lt 0 ] then a61room=0 elif [ ${a61pot} -lt ${a61room} ] then a61room=${a61pot} fi -echo " -----------------------------------------------------------" -echo " Moorcroft_6100a" -echo " " -echo " TOTAL = ${a61tot} " -echo " RUN = ${a61run} " -echo " PEND = ${a61pen} " -echo " User max = ${a61umax}" -echo " My runs = ${a61moi} " -echo " Room = ${a61room}" -echo " Potential = ${a61pot} " -echo " User max = ${a61umax}" -echo " -----------------------------------------------------------" -echo " " +echo " -----------------------------------------------------------" >> ${tablefile} +echo " Moorcroft_6100a" >> ${tablefile} +echo " " >> ${tablefile} +echo " TOTAL = ${a61tot} " >> ${tablefile} +echo " RUN = ${a61run} " >> ${tablefile} +echo " PEND = ${a61pen} " >> ${tablefile} +echo " User max = ${a61umax}" >> ${tablefile} +echo " My runs = ${a61moi} " >> ${tablefile} +echo " Room = ${a61room}" >> ${tablefile} +echo " Potential = ${a61pot} " >> ${tablefile} +echo " User max = ${a61umax}" >> ${tablefile} +echo " -----------------------------------------------------------" >> ${tablefile} +echo " " >> ${tablefile} #------ Moorcroft_6100b. ------------------------------------------------------------------# let b61tot=${b61run}+${b61pen} let b61room=${b61full}-${b61tot} let b61pot=${b61umax}-${b61moi} -if [ ${b61pot} -lt 0 ] +if [ ${b61pot} -lt 0 ] || [ ${b61room} -lt 0 ] then b61room=0 elif [ ${b61pot} -lt ${b61room} ] then b61room=${b61pot} fi -echo " -----------------------------------------------------------" -echo " Moorcroft_6100b" -echo " " -echo " TOTAL = ${b61tot} " -echo " RUN = ${b61run} " -echo " PEND = ${b61pen} " -echo " User max = ${b61umax}" -echo " My runs = ${b61moi} " -echo " Room = ${b61room}" -echo " Potential = ${b61pot} " -echo " User max = ${b61umax}" -echo " -----------------------------------------------------------" -echo " " +echo " -----------------------------------------------------------" >> ${tablefile} +echo " Moorcroft_6100b" >> ${tablefile} +echo " " >> ${tablefile} +echo " TOTAL = ${b61tot} " >> ${tablefile} +echo " RUN = ${b61run} " >> ${tablefile} +echo " PEND = ${b61pen} " >> ${tablefile} +echo " User max = ${b61umax}" >> ${tablefile} +echo " My runs = ${b61moi} " >> ${tablefile} +echo " Room = ${b61room}" >> ${tablefile} +echo " Potential = ${b61pot} " >> ${tablefile} +echo " User max = ${b61umax}" >> ${tablefile} +echo " -----------------------------------------------------------" >> ${tablefile} +echo " " >> ${tablefile} #------ Wofsy. ----------------------------------------------------------------------------# let wsytot=${wsyrun}+${wsypen} let wsyroom=${wsyfull}-${wsytot} let wsypot=${wsyumax}-${wsymoi} -if [ ${wsypot} -lt 0 ] +if [ ${wsypot} -lt 0 ] || [ ${wsyroom} -lt 0 ] then wsyroom=0 elif [ ${wsypot} -lt ${wsyroom} ] then wsyroom=${wsypot} fi -echo " -----------------------------------------------------------" -echo " Wofsy" -echo " " -echo " TOTAL = ${wsytot} " -echo " RUN = ${wsyrun} " -echo " PEND = ${wsypen} " -echo " User max = ${wsyumax}" -echo " My runs = ${wsymoi} " -echo " Room = ${wsyroom}" -echo " Potential = ${wsypot} " -echo " User max = ${wsyumax}" -echo " -----------------------------------------------------------" -echo " " +echo " -----------------------------------------------------------" >> ${tablefile} +echo " Wofsy" >> ${tablefile} +echo " " >> ${tablefile} +echo " TOTAL = ${wsytot} " >> ${tablefile} +echo " RUN = ${wsyrun} " >> ${tablefile} +echo " PEND = ${wsypen} " >> ${tablefile} +echo " User max = ${wsyumax}" >> ${tablefile} +echo " My runs = ${wsymoi} " >> ${tablefile} +echo " Room = ${wsyroom}" >> ${tablefile} +echo " Potential = ${wsypot} " >> ${tablefile} +echo " User max = ${wsyumax}" >> ${tablefile} +echo " -----------------------------------------------------------" >> ${tablefile} +echo " " >> ${tablefile} #------ Unrestricted_serial. --------------------------------------------------------------# let usetot=${userun}+${usepen} let useroom=${usefull}-${usetot} let usepot=${useumax}-${usemoi} -if [ ${usepot} -lt 0 ] +if [ ${usepot} -lt 0 ] || [ ${useroom} -lt 0 ] then useroom=0 elif [ ${usepot} -lt ${useroom} ] then useroom=${usepot} fi -echo " -----------------------------------------------------------" -echo " Unrestricted_serial" -echo " " -echo " TOTAL = ${usetot} " -echo " RUN = ${userun} " -echo " PEND = ${usepen} " -echo " User max = ${useumax}" -echo " My runs = ${usemoi} " -echo " Room = ${useroom}" -echo " Potential = ${usepot} " -echo " User max = ${useumax}" -echo " -----------------------------------------------------------" -echo " " +echo " -----------------------------------------------------------" >> ${tablefile} +echo " Unrestricted_serial" >> ${tablefile} +echo " " >> ${tablefile} +echo " TOTAL = ${usetot} " >> ${tablefile} +echo " RUN = ${userun} " >> ${tablefile} +echo " PEND = ${usepen} " >> ${tablefile} +echo " User max = ${useumax}" >> ${tablefile} +echo " My runs = ${usemoi} " >> ${tablefile} +echo " Room = ${useroom}" >> ${tablefile} +echo " Potential = ${usepot} " >> ${tablefile} +echo " User max = ${useumax}" >> ${tablefile} +echo " -----------------------------------------------------------" >> ${tablefile} +echo " " >> ${tablefile} #------------------------------------------------------------------------------------------# diff --git a/ED/Template/spawn_poly.sh b/ED/Template/spawn_poly.sh index fa25077ef..5c5149344 100755 --- a/ED/Template/spawn_poly.sh +++ b/ED/Template/spawn_poly.sh @@ -368,7 +368,10 @@ do # we simply copy the template, and assume initial run. Otherwise, we must find out # # where the simulation was when it stopped. # #---------------------------------------------------------------------------------------# - if [ -s ${there}/${polyname} ] + if [ ! -s ${there}/${polyname} ] && [ ${here} != ${there} ] + then + cp -r ${here}/Template ${there}/${polyname} + elif [ -s ${there}/${polyname} ] then #------------------------------------------------------------------------------------# @@ -400,99 +403,42 @@ do /bin/rm -f ${here}/badfile.txt done #---------------------------------------------------------------------------------# - - - - #---------------------------------------------------------------------------------# - # Run the small R script to check whether the simulation was running or not, # - # and whether there was any cohort left by the time the runs were stopped. # - #---------------------------------------------------------------------------------# - /bin/rm -f ${here}/${polyname}/statusrun.txt - /bin/rm -f ${here}/${polyname}/whichrun.r - /bin/cp -f ${here}/Template/whichrun.r ${here}/${polyname}/whichrun.r - whichrun="${here}/${polyname}/whichrun.r" - outwhich="${here}/${polyname}/outwhichrun.txt" - sed -i s@thispoly@${polyname}@g ${whichrun} - sed -i s@thisqueue@${queue}@g ${whichrun} - sed -i s@pathhere@${here}@g ${whichrun} - sed -i s@paththere@${there}@g ${whichrun} - sed -i s@thisyeara@${yeara}@g ${whichrun} - sed -i s@thismontha@${montha}@g ${whichrun} - sed -i s@thisdatea@${datea}@g ${whichrun} - sed -i s@thistimea@${timea}@g ${whichrun} - R CMD BATCH --no-save --no-restore ${whichrun} ${outwhich} - while [ ! -s ${here}/${polyname}/statusrun.txt ] - do - sleep 0.5 - done - year=`cat ${here}/${polyname}/statusrun.txt | awk '{print $2}'` - month=`cat ${here}/${polyname}/statusrun.txt | awk '{print $3}'` - date=`cat ${here}/${polyname}/statusrun.txt | awk '{print $4}'` - time=`cat ${here}/${polyname}/statusrun.txt | awk '{print $5}'` - runt=`cat ${here}/${polyname}/statusrun.txt | awk '{print $6}'` - #---------------------------------------------------------------------------------# - else - - #---------------------------------------------------------------------------------# - # Make a copy of the directory "there" in case here and there aren't the # - # same. # - #---------------------------------------------------------------------------------# - if [ ${here} != ${there} ] - then - cp -r ${here}/Template ${there}/${polyname} - fi - - /bin/rm -f ${here}/${polyname}/statusrun.txt - /bin/rm -f ${here}/${polyname}/whichrun.r - /bin/cp -f ${here}/Template/whichrun.r ${here}/${polyname}/whichrun.r - whichrun="${here}/${polyname}/whichrun.r" - outwhich="${here}/${polyname}/outwhichrun.txt" - sed -i s@thispoly@${polyname}@g ${whichrun} - sed -i s@thisqueue@${queue}@g ${whichrun} - sed -i s@pathhere@${here}@g ${whichrun} - sed -i s@paththere@${there}@g ${whichrun} - sed -i s@thisyeara@${yeara}@g ${whichrun} - sed -i s@thismontha@${montha}@g ${whichrun} - sed -i s@thisdatea@${datea}@g ${whichrun} - sed -i s@thistimea@${timea}@g ${whichrun} - year=${yeara} - month=${montha} - date=${datea} - time=${timea} - runt='INITIAL' - #---------------------------------------------------------------------------------# fi #------------------------------------------------------------------------------------# - else - - #----- Make a copy of the directory "there" in case here and there aren't the same. -# - if [ ${here} != ${there} ] - then - cp -r ${here}/Template ${there}/${polyname} - fi - /bin/rm -f ${here}/${polyname}/statusrun.txt - /bin/rm -f ${here}/${polyname}/whichrun.r - /bin/cp -f ${here}/Template/whichrun.r ${here}/${polyname}/whichrun.r - whichrun="${here}/${polyname}/whichrun.r" - outwhich="${here}/${polyname}/outwhichrun.txt" - sed -i s@thispoly@${polyname}@g ${whichrun} - sed -i s@thisqueue@${queue}@g ${whichrun} - sed -i s@pathhere@${here}@g ${whichrun} - sed -i s@paththere@${there}@g ${whichrun} - sed -i s@thisyeara@${yeara}@g ${whichrun} - sed -i s@thismontha@${montha}@g ${whichrun} - sed -i s@thisdatea@${datea}@g ${whichrun} - sed -i s@thistimea@${timea}@g ${whichrun} - R CMD BATCH --no-save --no-restore ${whichrun} ${outwhich} - year=${yeara} - month=${montha} - date=${datea} - time=${timea} - runt='INITIAL' fi #---------------------------------------------------------------------------------------# + #---------------------------------------------------------------------------------------# + # Run the small R script to check whether the simulation was running or not, and # + # whether there was any cohort left by the time the runs were stopped. # + #---------------------------------------------------------------------------------------# + /bin/rm -f ${here}/${polyname}/statusrun.txt + /bin/rm -f ${here}/${polyname}/whichrun.r + /bin/cp -f ${here}/Template/whichrun.r ${here}/${polyname}/whichrun.r + whichrun="${here}/${polyname}/whichrun.r" + outwhich="${here}/${polyname}/outwhichrun.txt" + sed -i s@thispoly@${polyname}@g ${whichrun} + sed -i s@thisqueue@${queue}@g ${whichrun} + sed -i s@pathhere@${here}@g ${whichrun} + sed -i s@paththere@${there}@g ${whichrun} + sed -i s@thisyeara@${yeara}@g ${whichrun} + sed -i s@thismontha@${montha}@g ${whichrun} + sed -i s@thisdatea@${datea}@g ${whichrun} + sed -i s@thistimea@${timea}@g ${whichrun} + R CMD BATCH --no-save --no-restore ${whichrun} ${outwhich} + while [ ! -s ${here}/${polyname}/statusrun.txt ] + do + sleep 0.5 + done + year=`cat ${here}/${polyname}/statusrun.txt | awk '{print $2}'` + month=`cat ${here}/${polyname}/statusrun.txt | awk '{print $3}'` + date=`cat ${here}/${polyname}/statusrun.txt | awk '{print $4}'` + time=`cat ${here}/${polyname}/statusrun.txt | awk '{print $5}'` + runt=`cat ${here}/${polyname}/statusrun.txt | awk '{print $6}'` + #---------------------------------------------------------------------------------------# + + diff --git a/ED/run/ED2IN b/ED/run/ED2IN index f448f4ee3..d7605203d 100644 --- a/ED/run/ED2IN +++ b/ED/run/ED2IN @@ -208,6 +208,37 @@ $ED_NL + !---------------------------------------------------------------------------------------! + ! The following variables control whether site-, patch-, and cohort-level time ! + ! means and mean sum of squares should be included in the output files or not. ! + ! ! + ! Reasons to add them: ! + ! a. Sub-polygon variables are more comprehensive. ! + ! b. Explore heterogeneity within a polygon and make interesting analysis. ! + ! c. More chances to create cool 3-D plots. ! + ! ! + ! Reasons to NOT add them: ! + ! a. Output files will become much larger! ! + ! b. In regional/coupled runs, the output files will be ridiculously large. ! + ! c. You may fill up the disk. ! + ! d. Other people's job may crash due to insufficient disk space. ! + ! e. You will gain a bad reputation amongst your colleagues. ! + ! f. And it will be entirely your fault. ! + ! ! + ! Either way, polygon-level averages are always included, and so are the instan- ! + ! taneous site-, patch-, and cohort-level variables needed for resuming the run. ! + ! ! + ! IADD_SITE_MEANS -- Add site-level averages to the output (0 = no; 1 = yes) ! + ! IADD_PATCH_MEANS -- Add patch-level averages to the output (0 = no; 1 = yes) ! + ! IADD_COHORT_MEANS -- Add cohort-level averages to the output (0 = no; 1 = yes) ! + ! ! + !---------------------------------------------------------------------------------------! + NL%IADD_SITE_MEANS = 1 + NL%IADD_PATCH_MEANS = 1 + NL%IADD_COHORT_MEANS = 1 + !---------------------------------------------------------------------------------------! + + !---------------------------------------------------------------------------------------! ! ATTACH_METADATA -- Flag for attaching metadata to HDF datasets. Attaching metadata ! diff --git a/ED/src/io/ed_init_full_history.F90 b/ED/src/io/ed_init_full_history.F90 index ad44b9009..b0f387d22 100644 --- a/ED/src/io/ed_init_full_history.F90 +++ b/ED/src/io/ed_init_full_history.F90 @@ -431,6 +431,77 @@ end subroutine init_full_history_restart !==========================================================================================! !==========================================================================================! subroutine fill_history_grid(cgrid,ipy,py_index) + use ed_state_vars, only : edtype & ! structure + , polygontype ! ! structure + use grid_coms , only : nzg ! ! intent(in) + use ed_max_dims , only : n_pft & ! intent(in) + , n_dbh & ! intent(in) + , n_age & ! intent(in) + , max_site & ! intent(in) + , n_dist_types ! ! intent(in) + use hdf5 + use hdf5_coms , only : file_id & ! intent(inout) + , dset_id & ! intent(inout) + , dspace_id & ! intent(inout) + , plist_id & ! intent(inout) + , globdims & ! intent(inout) + , chnkdims & ! intent(inout) + , chnkoffs & ! intent(inout) + , cnt & ! intent(inout) + , stride & ! intent(inout) + , memdims & ! intent(inout) + , memoffs & ! intent(inout) + , memsize & ! intent(inout) + , datatype_id ! ! intent(inout) + use ed_misc_coms , only : ndcycle & ! intent(in) + , writing_long & ! intent(in) + , writing_eorq & ! intent(in) + , writing_dcyc ! ! intent(in) + implicit none + !---------------------------------------------------------------------------------------! + + + !----- Arguments. ----------------------------------------------------------------------! + type(edtype) , target :: cgrid + integer , intent(in) :: ipy + integer , intent(in) :: py_index + !----- Local variables. ----------------------------------------------------------------! + integer :: iparallel + integer :: dsetrank + integer(SIZE_T) :: sz + integer :: hdferr + logical :: foundvar + !---------------------------------------------------------------------------------------! + + if (cgrid%npolygons == 0) return + + + !---------------------------------------------------------------------------------------! + ! Split the routine into smaller routines to avoid segmentation violation. ! + !---------------------------------------------------------------------------------------! + call fill_history_grid_p11 (cgrid,ipy,py_index) + call fill_history_grid_p11dmean(cgrid,ipy,py_index) + call fill_history_grid_p11mmean(cgrid,ipy,py_index) + call fill_history_grid_p12 (cgrid,ipy,py_index) + call fill_history_grid_m11 (cgrid,ipy,py_index) + call fill_history_grid_p19 (cgrid,ipy,py_index) + call fill_history_grid_m12 (cgrid,ipy,py_index) + call fill_history_grid_p146 (cgrid,ipy,py_index) + !---------------------------------------------------------------------------------------! + + return +end subroutine fill_history_grid +!==========================================================================================! +!==========================================================================================! + + + + + + +!==========================================================================================! +!==========================================================================================! +subroutine fill_history_grid_p11(cgrid,ipy,py_index) use ed_state_vars, only : edtype & ! structure , polygontype ! ! structure use grid_coms , only : nzg ! ! intent(in) @@ -659,6 +730,155 @@ end subroutine hdf_getslab_i ,'MINERAL_SOIL_N_PY ' ,dsetrank,iparallel,.false.,foundvar) call hdf_getslab_r(cgrid%cwd_n (ipy:ipy) & ,'CWD_N_PY ' ,dsetrank,iparallel,.false.,foundvar) + !---------------------------------------------------------------------------------------! + return +end subroutine fill_history_grid_p11 +!==========================================================================================! +!==========================================================================================! + + + + + + +!==========================================================================================! +!==========================================================================================! +subroutine fill_history_grid_p11dmean(cgrid,ipy,py_index) + use ed_state_vars, only : edtype & ! structure + , polygontype ! ! structure + use grid_coms , only : nzg ! ! intent(in) + use ed_max_dims , only : n_pft & ! intent(in) + , n_dbh & ! intent(in) + , n_age & ! intent(in) + , max_site & ! intent(in) + , n_dist_types ! ! intent(in) + use hdf5 + use hdf5_coms , only : file_id & ! intent(inout) + , dset_id & ! intent(inout) + , dspace_id & ! intent(inout) + , plist_id & ! intent(inout) + , globdims & ! intent(inout) + , chnkdims & ! intent(inout) + , chnkoffs & ! intent(inout) + , cnt & ! intent(inout) + , stride & ! intent(inout) + , memdims & ! intent(inout) + , memoffs & ! intent(inout) + , memsize & ! intent(inout) + , datatype_id ! ! intent(inout) + use ed_misc_coms , only : ndcycle & ! intent(in) + , writing_long & ! intent(in) + , writing_eorq & ! intent(in) + , writing_dcyc ! ! intent(in) + implicit none + !----- Interfaces. ---------------------------------------------------------------------! +#if USE_INTERF + interface + subroutine hdf_getslab_r(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + real(kind=4) , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_r + !------------------------------------------------------------------------------------! + subroutine hdf_getslab_d(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + real(kind=8) , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_d + !------------------------------------------------------------------------------------! + subroutine hdf_getslab_i(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + integer , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_i + !------------------------------------------------------------------------------------! + end interface +#endif + !---------------------------------------------------------------------------------------! + + + !----- Arguments. ----------------------------------------------------------------------! + type(edtype) , target :: cgrid + integer , intent(in) :: ipy + integer , intent(in) :: py_index + !----- Local variables. ----------------------------------------------------------------! + integer :: iparallel + integer :: dsetrank + integer(SIZE_T) :: sz + integer :: hdferr + logical :: foundvar + !---------------------------------------------------------------------------------------! + + + + !----- Turn off parallel for this sub-routine. -----------------------------------------! + iparallel = 0 + !---------------------------------------------------------------------------------------! + + + !---------------------------------------------------------------------------------------! + ! Reset the dimension arrays. ! + !---------------------------------------------------------------------------------------! + globdims(:) = 0_8 + chnkdims(:) = 0_8 + chnkoffs(:) = 0_8 + memoffs (:) = 0_8 + memdims (:) = 0_8 + memsize (:) = 1_8 + !---------------------------------------------------------------------------------------! + + + !---------------------------------------------------------------------------------------! + ! For the remainder of this sub-routine, we must load the polygon variables ! + ! according to the dimensionality. If you are adding a new variable, make sure that it ! + ! is placed together with variables of the same dimensions. ! + ! ! + ! DSETRANK -- the rank of the variable. ! + ! GLOBDIMS -- the size of each dimension ! + ! CHNKDIMS -- the size of the chunk to be read this time ! + ! CHNKOFFS -- the offset (number of indices to be skipped) ! + ! MEMDIMS -- the dimensions of the buffer to be filled. ! + ! MEMOFFS -- the offset of the memory ! + ! MEMSIZE -- the size of variable that will house the information read. ! + !---------------------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! Single dimension variables. ! + !---------------------------------------------------------------------------------------! + dsetrank = 1 + globdims(1) = int(cgrid%npolygons_global,8) + chnkdims(1) = 1_8 + chnkoffs(1) = int(py_index - 1,8) + memdims (1) = 1_8 + memoffs (1) = 0_8 + memsize (1) = 1_8 + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! ! Try to load daily and monthly means if the user is going to write them. ! @@ -910,55 +1130,205 @@ end subroutine hdf_getslab_i call hdf_getslab_r(cgrid%dmean_dpcpg (ipy:ipy) & ,'DMEAN_DPCPG_PY ',dsetrank,iparallel,.false.,foundvar) end if - !------ Monthly means. -----------------------------------------------------------------! - if (writing_eorq) then - call hdf_getslab_r(cgrid%mmean_fast_soil_c (ipy:ipy) & - ,'MMEAN_FAST_SOIL_C_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_slow_soil_c (ipy:ipy) & - ,'MMEAN_SLOW_SOIL_C_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_struct_soil_c (ipy:ipy) & - ,'MMEAN_STRUCT_SOIL_C_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_struct_soil_l (ipy:ipy) & - ,'MMEAN_STRUCT_SOIL_L_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_fast_soil_n (ipy:ipy) & - ,'MMEAN_FAST_SOIL_N_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_cwd_c (ipy:ipy) & - ,'MMEAN_CWD_C_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_mineral_soil_n (ipy:ipy) & - ,'MMEAN_MINERAL_SOIL_N_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_cwd_n (ipy:ipy) & - ,'MMEAN_CWD_N_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_gpp (ipy:ipy) & - ,'MMEAN_GPP_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_npp (ipy:ipy) & - ,'MMEAN_NPP_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_leaf_resp (ipy:ipy) & - ,'MMEAN_LEAF_RESP_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_root_resp (ipy:ipy) & - ,'MMEAN_ROOT_RESP_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_growth_resp (ipy:ipy) & - ,'MMEAN_GROWTH_RESP_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_storage_resp (ipy:ipy) & - ,'MMEAN_STORAGE_RESP_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_vleaf_resp (ipy:ipy) & - ,'MMEAN_VLEAF_RESP_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_plresp (ipy:ipy) & - ,'MMEAN_PLRESP_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_leaf_energy (ipy:ipy) & - ,'MMEAN_LEAF_ENERGY_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_leaf_water (ipy:ipy) & - ,'MMEAN_LEAF_WATER_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_leaf_hcap (ipy:ipy) & - ,'MMEAN_LEAF_HCAP_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_leaf_vpdef (ipy:ipy) & - ,'MMEAN_LEAF_VPDEF_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_leaf_temp (ipy:ipy) & - ,'MMEAN_LEAF_TEMP_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_leaf_fliq (ipy:ipy) & - ,'MMEAN_LEAF_FLIQ_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_leaf_gsw (ipy:ipy) & - ,'MMEAN_LEAF_GSW_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_leaf_gbw (ipy:ipy) & + return +end subroutine fill_history_grid_p11dmean +!==========================================================================================! +!==========================================================================================! + + + + + + +!==========================================================================================! +!==========================================================================================! +subroutine fill_history_grid_p11mmean(cgrid,ipy,py_index) + use ed_state_vars, only : edtype & ! structure + , polygontype ! ! structure + use grid_coms , only : nzg ! ! intent(in) + use ed_max_dims , only : n_pft & ! intent(in) + , n_dbh & ! intent(in) + , n_age & ! intent(in) + , max_site & ! intent(in) + , n_dist_types ! ! intent(in) + use hdf5 + use hdf5_coms , only : file_id & ! intent(inout) + , dset_id & ! intent(inout) + , dspace_id & ! intent(inout) + , plist_id & ! intent(inout) + , globdims & ! intent(inout) + , chnkdims & ! intent(inout) + , chnkoffs & ! intent(inout) + , cnt & ! intent(inout) + , stride & ! intent(inout) + , memdims & ! intent(inout) + , memoffs & ! intent(inout) + , memsize & ! intent(inout) + , datatype_id ! ! intent(inout) + use ed_misc_coms , only : ndcycle & ! intent(in) + , writing_long & ! intent(in) + , writing_eorq & ! intent(in) + , writing_dcyc ! ! intent(in) + implicit none + !----- Interfaces. ---------------------------------------------------------------------! +#if USE_INTERF + interface + subroutine hdf_getslab_r(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + real(kind=4) , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_r + !------------------------------------------------------------------------------------! + subroutine hdf_getslab_d(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + real(kind=8) , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_d + !------------------------------------------------------------------------------------! + subroutine hdf_getslab_i(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + integer , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_i + !------------------------------------------------------------------------------------! + end interface +#endif + !---------------------------------------------------------------------------------------! + + + !----- Arguments. ----------------------------------------------------------------------! + type(edtype) , target :: cgrid + integer , intent(in) :: ipy + integer , intent(in) :: py_index + !----- Local variables. ----------------------------------------------------------------! + integer :: iparallel + integer :: dsetrank + integer(SIZE_T) :: sz + integer :: hdferr + logical :: foundvar + !---------------------------------------------------------------------------------------! + + + + !----- Turn off parallel for this sub-routine. -----------------------------------------! + iparallel = 0 + !---------------------------------------------------------------------------------------! + + + !---------------------------------------------------------------------------------------! + ! Reset the dimension arrays. ! + !---------------------------------------------------------------------------------------! + globdims(:) = 0_8 + chnkdims(:) = 0_8 + chnkoffs(:) = 0_8 + memoffs (:) = 0_8 + memdims (:) = 0_8 + memsize (:) = 1_8 + !---------------------------------------------------------------------------------------! + + + !---------------------------------------------------------------------------------------! + ! For the remainder of this sub-routine, we must load the polygon variables ! + ! according to the dimensionality. If you are adding a new variable, make sure that it ! + ! is placed together with variables of the same dimensions. ! + ! ! + ! DSETRANK -- the rank of the variable. ! + ! GLOBDIMS -- the size of each dimension ! + ! CHNKDIMS -- the size of the chunk to be read this time ! + ! CHNKOFFS -- the offset (number of indices to be skipped) ! + ! MEMDIMS -- the dimensions of the buffer to be filled. ! + ! MEMOFFS -- the offset of the memory ! + ! MEMSIZE -- the size of variable that will house the information read. ! + !---------------------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! Single dimension variables. ! + !---------------------------------------------------------------------------------------! + dsetrank = 1 + globdims(1) = int(cgrid%npolygons_global,8) + chnkdims(1) = 1_8 + chnkoffs(1) = int(py_index - 1,8) + memdims (1) = 1_8 + memoffs (1) = 0_8 + memsize (1) = 1_8 + !---------------------------------------------------------------------------------------! + + + + !------ Monthly means. -----------------------------------------------------------------! + if (writing_eorq) then + call hdf_getslab_r(cgrid%mmean_fast_soil_c (ipy:ipy) & + ,'MMEAN_FAST_SOIL_C_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_slow_soil_c (ipy:ipy) & + ,'MMEAN_SLOW_SOIL_C_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_struct_soil_c (ipy:ipy) & + ,'MMEAN_STRUCT_SOIL_C_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_struct_soil_l (ipy:ipy) & + ,'MMEAN_STRUCT_SOIL_L_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_fast_soil_n (ipy:ipy) & + ,'MMEAN_FAST_SOIL_N_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_cwd_c (ipy:ipy) & + ,'MMEAN_CWD_C_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_mineral_soil_n (ipy:ipy) & + ,'MMEAN_MINERAL_SOIL_N_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_cwd_n (ipy:ipy) & + ,'MMEAN_CWD_N_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_gpp (ipy:ipy) & + ,'MMEAN_GPP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_npp (ipy:ipy) & + ,'MMEAN_NPP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_leaf_resp (ipy:ipy) & + ,'MMEAN_LEAF_RESP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_root_resp (ipy:ipy) & + ,'MMEAN_ROOT_RESP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_growth_resp (ipy:ipy) & + ,'MMEAN_GROWTH_RESP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_storage_resp (ipy:ipy) & + ,'MMEAN_STORAGE_RESP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_vleaf_resp (ipy:ipy) & + ,'MMEAN_VLEAF_RESP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_plresp (ipy:ipy) & + ,'MMEAN_PLRESP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_leaf_energy (ipy:ipy) & + ,'MMEAN_LEAF_ENERGY_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_leaf_water (ipy:ipy) & + ,'MMEAN_LEAF_WATER_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_leaf_hcap (ipy:ipy) & + ,'MMEAN_LEAF_HCAP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_leaf_vpdef (ipy:ipy) & + ,'MMEAN_LEAF_VPDEF_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_leaf_temp (ipy:ipy) & + ,'MMEAN_LEAF_TEMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_leaf_fliq (ipy:ipy) & + ,'MMEAN_LEAF_FLIQ_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_leaf_gsw (ipy:ipy) & + ,'MMEAN_LEAF_GSW_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_leaf_gbw (ipy:ipy) & ,'MMEAN_LEAF_GBW_PY ',dsetrank,iparallel,.false.,foundvar) call hdf_getslab_r(cgrid%mmean_wood_energy (ipy:ipy) & ,'MMEAN_WOOD_ENERGY_PY ',dsetrank,iparallel,.false.,foundvar) @@ -1238,78 +1608,335 @@ end subroutine hdf_getslab_i !---------------------------------------------------------------------------------------! !---------------------------------------------------------------------------------------! !---------------------------------------------------------------------------------------! + return +end subroutine fill_history_grid_p11mmean +!==========================================================================================! +!==========================================================================================! - - !---------------------------------------------------------------------------------------! - !---------------------------------------------------------------------------------------! - !---------------------------------------------------------------------------------------! - ! 2-D variables, dimensions: (nzg; npolygons). ! - !---------------------------------------------------------------------------------------! - dsetrank = 2 - globdims(1) = int(nzg,8) - chnkdims(1) = int(nzg,8) - memdims (1) = int(nzg,8) - memsize (1) = int(nzg,8) - chnkoffs(1) = 0_8 - memoffs (1) = 0_8 - - globdims(2) = int(cgrid%npolygons_global,8) - chnkdims(2) = 1_8 - chnkoffs(2) = int(py_index - 1,8) - memdims (2) = 1_8 - memsize (2) = 1_8 - memoffs (2) = 0_8 - - if (writing_long) then - call hdf_getslab_r(cgrid%dmean_soil_energy(:,ipy) & - ,'DMEAN_SOIL_ENERGY_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%dmean_soil_mstpot(:,ipy) & - ,'DMEAN_SOIL_MSTPOT_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%dmean_soil_water (:,ipy) & - ,'DMEAN_SOIL_WATER_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%dmean_soil_temp (:,ipy) & - ,'DMEAN_SOIL_TEMP_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%dmean_soil_fliq (:,ipy) & - ,'DMEAN_SOIL_FLIQ_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%dmean_smoist_gg (:,ipy) & - ,'DMEAN_SMOIST_GG_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%dmean_transloss (:,ipy) & - ,'DMEAN_TRANSLOSS_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%dmean_sensible_gg(:,ipy) & - ,'DMEAN_SENSIBLE_GG_PY ',dsetrank,iparallel,.false.,foundvar) - end if - if (writing_eorq) then - call hdf_getslab_r(cgrid%mmean_soil_energy(:,ipy) & - ,'MMEAN_SOIL_ENERGY_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_soil_mstpot(:,ipy) & - ,'MMEAN_SOIL_MSTPOT_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_soil_water (:,ipy) & - ,'MMEAN_SOIL_WATER_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_soil_temp (:,ipy) & - ,'MMEAN_SOIL_TEMP_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_soil_fliq (:,ipy) & - ,'MMEAN_SOIL_FLIQ_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_smoist_gg (:,ipy) & - ,'MMEAN_SMOIST_GG_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_transloss (:,ipy) & - ,'MMEAN_TRANSLOSS_PY ',dsetrank,iparallel,.false.,foundvar) - call hdf_getslab_r(cgrid%mmean_sensible_gg(:,ipy) & - ,'MMEAN_SENSIBLE_GG_PY ',dsetrank,iparallel,.false.,foundvar) +!==========================================================================================! +!==========================================================================================! +subroutine fill_history_grid_p12(cgrid,ipy,py_index) + use ed_state_vars, only : edtype & ! structure + , polygontype ! ! structure + use grid_coms , only : nzg ! ! intent(in) + use ed_max_dims , only : n_pft & ! intent(in) + , n_dbh & ! intent(in) + , n_age & ! intent(in) + , max_site & ! intent(in) + , n_dist_types ! ! intent(in) + use hdf5 + use hdf5_coms , only : file_id & ! intent(inout) + , dset_id & ! intent(inout) + , dspace_id & ! intent(inout) + , plist_id & ! intent(inout) + , globdims & ! intent(inout) + , chnkdims & ! intent(inout) + , chnkoffs & ! intent(inout) + , cnt & ! intent(inout) + , stride & ! intent(inout) + , memdims & ! intent(inout) + , memoffs & ! intent(inout) + , memsize & ! intent(inout) + , datatype_id ! ! intent(inout) + use ed_misc_coms , only : ndcycle & ! intent(in) + , writing_long & ! intent(in) + , writing_eorq & ! intent(in) + , writing_dcyc ! ! intent(in) + implicit none + !----- Interfaces. ---------------------------------------------------------------------! +#if USE_INTERF + interface + subroutine hdf_getslab_r(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + real(kind=4) , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_r + !------------------------------------------------------------------------------------! + subroutine hdf_getslab_d(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + real(kind=8) , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_d + !------------------------------------------------------------------------------------! + subroutine hdf_getslab_i(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + integer , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_i + !------------------------------------------------------------------------------------! + end interface +#endif + !---------------------------------------------------------------------------------------! + + + !----- Arguments. ----------------------------------------------------------------------! + type(edtype) , target :: cgrid + integer , intent(in) :: ipy + integer , intent(in) :: py_index + !----- Local variables. ----------------------------------------------------------------! + integer :: iparallel + integer :: dsetrank + integer(SIZE_T) :: sz + integer :: hdferr + logical :: foundvar + !---------------------------------------------------------------------------------------! + + + + !----- Turn off parallel for this sub-routine. -----------------------------------------! + iparallel = 0 + !---------------------------------------------------------------------------------------! + + + !---------------------------------------------------------------------------------------! + ! Reset the dimension arrays. ! + !---------------------------------------------------------------------------------------! + globdims(:) = 0_8 + chnkdims(:) = 0_8 + chnkoffs(:) = 0_8 + memoffs (:) = 0_8 + memdims (:) = 0_8 + memsize (:) = 1_8 + !---------------------------------------------------------------------------------------! + + + !---------------------------------------------------------------------------------------! + ! For the remainder of this sub-routine, we must load the polygon variables ! + ! according to the dimensionality. If you are adding a new variable, make sure that it ! + ! is placed together with variables of the same dimensions. ! + ! ! + ! DSETRANK -- the rank of the variable. ! + ! GLOBDIMS -- the size of each dimension ! + ! CHNKDIMS -- the size of the chunk to be read this time ! + ! CHNKOFFS -- the offset (number of indices to be skipped) ! + ! MEMDIMS -- the dimensions of the buffer to be filled. ! + ! MEMOFFS -- the offset of the memory ! + ! MEMSIZE -- the size of variable that will house the information read. ! + !---------------------------------------------------------------------------------------! + + + + + + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! 2-D variables, dimensions: (nzg; npolygons). ! + !---------------------------------------------------------------------------------------! + dsetrank = 2 + globdims(1) = int(nzg,8) + chnkdims(1) = int(nzg,8) + memdims (1) = int(nzg,8) + memsize (1) = int(nzg,8) + chnkoffs(1) = 0_8 + memoffs (1) = 0_8 + + globdims(2) = int(cgrid%npolygons_global,8) + chnkdims(2) = 1_8 + chnkoffs(2) = int(py_index - 1,8) + memdims (2) = 1_8 + memsize (2) = 1_8 + memoffs (2) = 0_8 + + if (writing_long) then + call hdf_getslab_r(cgrid%dmean_soil_energy(:,ipy) & + ,'DMEAN_SOIL_ENERGY_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_soil_mstpot(:,ipy) & + ,'DMEAN_SOIL_MSTPOT_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_soil_water (:,ipy) & + ,'DMEAN_SOIL_WATER_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_soil_temp (:,ipy) & + ,'DMEAN_SOIL_TEMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_soil_fliq (:,ipy) & + ,'DMEAN_SOIL_FLIQ_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_smoist_gg (:,ipy) & + ,'DMEAN_SMOIST_GG_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_transloss (:,ipy) & + ,'DMEAN_TRANSLOSS_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%dmean_sensible_gg(:,ipy) & + ,'DMEAN_SENSIBLE_GG_PY ',dsetrank,iparallel,.false.,foundvar) + end if + if (writing_eorq) then + call hdf_getslab_r(cgrid%mmean_soil_energy(:,ipy) & + ,'MMEAN_SOIL_ENERGY_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_soil_mstpot(:,ipy) & + ,'MMEAN_SOIL_MSTPOT_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_soil_water (:,ipy) & + ,'MMEAN_SOIL_WATER_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_soil_temp (:,ipy) & + ,'MMEAN_SOIL_TEMP_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_soil_fliq (:,ipy) & + ,'MMEAN_SOIL_FLIQ_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_smoist_gg (:,ipy) & + ,'MMEAN_SMOIST_GG_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_transloss (:,ipy) & + ,'MMEAN_TRANSLOSS_PY ',dsetrank,iparallel,.false.,foundvar) + call hdf_getslab_r(cgrid%mmean_sensible_gg(:,ipy) & + ,'MMEAN_SENSIBLE_GG_PY ',dsetrank,iparallel,.false.,foundvar) end if !---------------------------------------------------------------------------------------! !---------------------------------------------------------------------------------------! !---------------------------------------------------------------------------------------! + return +end subroutine fill_history_grid_p12 +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! +!==========================================================================================! +subroutine fill_history_grid_m11(cgrid,ipy,py_index) + use ed_state_vars, only : edtype & ! structure + , polygontype ! ! structure + use grid_coms , only : nzg ! ! intent(in) + use ed_max_dims , only : n_pft & ! intent(in) + , n_dbh & ! intent(in) + , n_age & ! intent(in) + , max_site & ! intent(in) + , n_dist_types ! ! intent(in) + use hdf5 + use hdf5_coms , only : file_id & ! intent(inout) + , dset_id & ! intent(inout) + , dspace_id & ! intent(inout) + , plist_id & ! intent(inout) + , globdims & ! intent(inout) + , chnkdims & ! intent(inout) + , chnkoffs & ! intent(inout) + , cnt & ! intent(inout) + , stride & ! intent(inout) + , memdims & ! intent(inout) + , memoffs & ! intent(inout) + , memsize & ! intent(inout) + , datatype_id ! ! intent(inout) + use ed_misc_coms , only : ndcycle & ! intent(in) + , writing_long & ! intent(in) + , writing_eorq & ! intent(in) + , writing_dcyc ! ! intent(in) + implicit none + !----- Interfaces. ---------------------------------------------------------------------! +#if USE_INTERF + interface + subroutine hdf_getslab_r(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + real(kind=4) , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_r + !------------------------------------------------------------------------------------! + subroutine hdf_getslab_d(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + real(kind=8) , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_d + !------------------------------------------------------------------------------------! + subroutine hdf_getslab_i(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + integer , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_i + !------------------------------------------------------------------------------------! + end interface +#endif + !---------------------------------------------------------------------------------------! + + + !----- Arguments. ----------------------------------------------------------------------! + type(edtype) , target :: cgrid + integer , intent(in) :: ipy + integer , intent(in) :: py_index + !----- Local variables. ----------------------------------------------------------------! + integer :: iparallel + integer :: dsetrank + integer(SIZE_T) :: sz + integer :: hdferr + logical :: foundvar + !---------------------------------------------------------------------------------------! + + + + !----- Turn off parallel for this sub-routine. -----------------------------------------! + iparallel = 0 + !---------------------------------------------------------------------------------------! + + + !---------------------------------------------------------------------------------------! + ! Reset the dimension arrays. ! + !---------------------------------------------------------------------------------------! + globdims(:) = 0_8 + chnkdims(:) = 0_8 + chnkoffs(:) = 0_8 + memoffs (:) = 0_8 + memdims (:) = 0_8 + memsize (:) = 1_8 + !---------------------------------------------------------------------------------------! + + + !---------------------------------------------------------------------------------------! + ! For the remainder of this sub-routine, we must load the polygon variables ! + ! according to the dimensionality. If you are adding a new variable, make sure that it ! + ! is placed together with variables of the same dimensions. ! + ! ! + ! DSETRANK -- the rank of the variable. ! + ! GLOBDIMS -- the size of each dimension ! + ! CHNKDIMS -- the size of the chunk to be read this time ! + ! CHNKOFFS -- the offset (number of indices to be skipped) ! + ! MEMDIMS -- the dimensions of the buffer to be filled. ! + ! MEMOFFS -- the offset of the memory ! + ! MEMSIZE -- the size of variable that will house the information read. ! + !---------------------------------------------------------------------------------------! + + + !---------------------------------------------------------------------------------------! !---------------------------------------------------------------------------------------! @@ -1604,6 +2231,137 @@ end subroutine hdf_getslab_i !---------------------------------------------------------------------------------------! !---------------------------------------------------------------------------------------! !---------------------------------------------------------------------------------------! + return +end subroutine fill_history_grid_m11 +!==========================================================================================! +!==========================================================================================! + + + + + + +!==========================================================================================! +!==========================================================================================! +subroutine fill_history_grid_p19(cgrid,ipy,py_index) + use ed_state_vars, only : edtype & ! structure + , polygontype ! ! structure + use grid_coms , only : nzg ! ! intent(in) + use ed_max_dims , only : n_pft & ! intent(in) + , n_dbh & ! intent(in) + , n_age & ! intent(in) + , max_site & ! intent(in) + , n_dist_types ! ! intent(in) + use hdf5 + use hdf5_coms , only : file_id & ! intent(inout) + , dset_id & ! intent(inout) + , dspace_id & ! intent(inout) + , plist_id & ! intent(inout) + , globdims & ! intent(inout) + , chnkdims & ! intent(inout) + , chnkoffs & ! intent(inout) + , cnt & ! intent(inout) + , stride & ! intent(inout) + , memdims & ! intent(inout) + , memoffs & ! intent(inout) + , memsize & ! intent(inout) + , datatype_id ! ! intent(inout) + use ed_misc_coms , only : ndcycle & ! intent(in) + , writing_long & ! intent(in) + , writing_eorq & ! intent(in) + , writing_dcyc ! ! intent(in) + implicit none + !----- Interfaces. ---------------------------------------------------------------------! +#if USE_INTERF + interface + subroutine hdf_getslab_r(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + real(kind=4) , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_r + !------------------------------------------------------------------------------------! + subroutine hdf_getslab_d(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + real(kind=8) , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_d + !------------------------------------------------------------------------------------! + subroutine hdf_getslab_i(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + integer , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_i + !------------------------------------------------------------------------------------! + end interface +#endif + !---------------------------------------------------------------------------------------! + + + !----- Arguments. ----------------------------------------------------------------------! + type(edtype) , target :: cgrid + integer , intent(in) :: ipy + integer , intent(in) :: py_index + !----- Local variables. ----------------------------------------------------------------! + integer :: iparallel + integer :: dsetrank + integer(SIZE_T) :: sz + integer :: hdferr + logical :: foundvar + !---------------------------------------------------------------------------------------! + + + + !----- Turn off parallel for this sub-routine. -----------------------------------------! + iparallel = 0 + !---------------------------------------------------------------------------------------! + + + !---------------------------------------------------------------------------------------! + ! Reset the dimension arrays. ! + !---------------------------------------------------------------------------------------! + globdims(:) = 0_8 + chnkdims(:) = 0_8 + chnkoffs(:) = 0_8 + memoffs (:) = 0_8 + memdims (:) = 0_8 + memsize (:) = 1_8 + !---------------------------------------------------------------------------------------! + + + !---------------------------------------------------------------------------------------! + ! For the remainder of this sub-routine, we must load the polygon variables ! + ! according to the dimensionality. If you are adding a new variable, make sure that it ! + ! is placed together with variables of the same dimensions. ! + ! ! + ! DSETRANK -- the rank of the variable. ! + ! GLOBDIMS -- the size of each dimension ! + ! CHNKDIMS -- the size of the chunk to be read this time ! + ! CHNKOFFS -- the offset (number of indices to be skipped) ! + ! MEMDIMS -- the dimensions of the buffer to be filled. ! + ! MEMOFFS -- the offset of the memory ! + ! MEMSIZE -- the size of variable that will house the information read. ! + !---------------------------------------------------------------------------------------! @@ -1635,51 +2393,137 @@ end subroutine hdf_getslab_i !---------------------------------------------------------------------------------------! !---------------------------------------------------------------------------------------! !---------------------------------------------------------------------------------------! + return +end subroutine fill_history_grid_p19 +!==========================================================================================! +!==========================================================================================! - - !---------------------------------------------------------------------------------------! - !---------------------------------------------------------------------------------------! - !---------------------------------------------------------------------------------------! - ! 3-D variables, dimensions: (max_site;max_site+1;npolygons). ! +!==========================================================================================! +!==========================================================================================! +subroutine fill_history_grid_m12(cgrid,ipy,py_index) + use ed_state_vars, only : edtype & ! structure + , polygontype ! ! structure + use grid_coms , only : nzg ! ! intent(in) + use ed_max_dims , only : n_pft & ! intent(in) + , n_dbh & ! intent(in) + , n_age & ! intent(in) + , max_site & ! intent(in) + , n_dist_types ! ! intent(in) + use hdf5 + use hdf5_coms , only : file_id & ! intent(inout) + , dset_id & ! intent(inout) + , dspace_id & ! intent(inout) + , plist_id & ! intent(inout) + , globdims & ! intent(inout) + , chnkdims & ! intent(inout) + , chnkoffs & ! intent(inout) + , cnt & ! intent(inout) + , stride & ! intent(inout) + , memdims & ! intent(inout) + , memoffs & ! intent(inout) + , memsize & ! intent(inout) + , datatype_id ! ! intent(inout) + use ed_misc_coms , only : ndcycle & ! intent(in) + , writing_long & ! intent(in) + , writing_eorq & ! intent(in) + , writing_dcyc ! ! intent(in) + implicit none + !----- Interfaces. ---------------------------------------------------------------------! +#if USE_INTERF + interface + subroutine hdf_getslab_r(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + real(kind=4) , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_r + !------------------------------------------------------------------------------------! + subroutine hdf_getslab_d(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + real(kind=8) , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_d + !------------------------------------------------------------------------------------! + subroutine hdf_getslab_i(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + integer , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_i + !------------------------------------------------------------------------------------! + end interface +#endif !---------------------------------------------------------------------------------------! - ! dsetrank = 3 - ! globdims(1) = int(max_site,8) - ! chnkdims(1) = int(max_site,8) - ! memdims (1) = int(max_site,8) - ! memsize (1) = int(max_site,8) - ! chnkoffs(1) = 0_8 - ! memoffs (1) = 0_8 - ! globdims(2) = int(max_site+1,8) - ! chnkdims(2) = int(max_site+1,8) - ! memdims (2) = int(max_site+1,8) - ! memsize (2) = int(max_site+1,8) - ! chnkoffs(2) = 0_8 - ! memoffs (2) = 0_8 - ! globdims(3) = int(cgrid%npolygons_global,8) - ! chnkdims(3) = 1_8 - ! chnkoffs(3) = int(py_index - 1,8) - ! memdims (3) = 1_8 - ! memsize (3) = 1_8 - ! memoffs (3) = 0_8 + !----- Arguments. ----------------------------------------------------------------------! + type(edtype) , target :: cgrid + integer , intent(in) :: ipy + integer , intent(in) :: py_index + !----- Local variables. ----------------------------------------------------------------! + integer :: iparallel + integer :: dsetrank + integer(SIZE_T) :: sz + integer :: hdferr + logical :: foundvar + !---------------------------------------------------------------------------------------! + - ! call hdf_getslab_r(cgrid%site_adjacency(:,:,ipy) & - ! ,'SITE_ADJACENCY ',dsetrank,iparallel,.true.,foundvar) + !----- Turn off parallel for this sub-routine. -----------------------------------------! + iparallel = 0 + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! Reset the dimension arrays. ! !---------------------------------------------------------------------------------------! + globdims(:) = 0_8 + chnkdims(:) = 0_8 + chnkoffs(:) = 0_8 + memoffs (:) = 0_8 + memdims (:) = 0_8 + memsize (:) = 1_8 !---------------------------------------------------------------------------------------! - - + !---------------------------------------------------------------------------------------! + ! For the remainder of this sub-routine, we must load the polygon variables ! + ! according to the dimensionality. If you are adding a new variable, make sure that it ! + ! is placed together with variables of the same dimensions. ! + ! ! + ! DSETRANK -- the rank of the variable. ! + ! GLOBDIMS -- the size of each dimension ! + ! CHNKDIMS -- the size of the chunk to be read this time ! + ! CHNKOFFS -- the offset (number of indices to be skipped) ! + ! MEMDIMS -- the dimensions of the buffer to be filled. ! + ! MEMOFFS -- the offset of the memory ! + ! MEMSIZE -- the size of variable that will house the information read. ! + !---------------------------------------------------------------------------------------! @@ -1731,10 +2575,137 @@ end subroutine hdf_getslab_i !---------------------------------------------------------------------------------------! !---------------------------------------------------------------------------------------! !---------------------------------------------------------------------------------------! + return +end subroutine fill_history_grid_m12 +!==========================================================================================! +!==========================================================================================! + + + + + + +!==========================================================================================! +!==========================================================================================! +subroutine fill_history_grid_p146(cgrid,ipy,py_index) + use ed_state_vars, only : edtype & ! structure + , polygontype ! ! structure + use grid_coms , only : nzg ! ! intent(in) + use ed_max_dims , only : n_pft & ! intent(in) + , n_dbh & ! intent(in) + , n_age & ! intent(in) + , max_site & ! intent(in) + , n_dist_types ! ! intent(in) + use hdf5 + use hdf5_coms , only : file_id & ! intent(inout) + , dset_id & ! intent(inout) + , dspace_id & ! intent(inout) + , plist_id & ! intent(inout) + , globdims & ! intent(inout) + , chnkdims & ! intent(inout) + , chnkoffs & ! intent(inout) + , cnt & ! intent(inout) + , stride & ! intent(inout) + , memdims & ! intent(inout) + , memoffs & ! intent(inout) + , memsize & ! intent(inout) + , datatype_id ! ! intent(inout) + use ed_misc_coms , only : ndcycle & ! intent(in) + , writing_long & ! intent(in) + , writing_eorq & ! intent(in) + , writing_dcyc ! ! intent(in) + implicit none + !----- Interfaces. ---------------------------------------------------------------------! +#if USE_INTERF + interface + subroutine hdf_getslab_r(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + real(kind=4) , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_r + !------------------------------------------------------------------------------------! + subroutine hdf_getslab_d(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + real(kind=8) , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_d + !------------------------------------------------------------------------------------! + subroutine hdf_getslab_i(buff,varn,dsetrank,iparallel,required,foundvar) + use hdf5_coms, only : memsize ! ! intent(in) + !----- Arguments. ----------------------------------------------------------------! + integer , dimension(memsize(1),memsize(2),memsize(3),memsize(4)) & + , intent(inout) :: buff + character(len=*) , intent(in) :: varn + integer , intent(in) :: dsetrank + integer , intent(in) :: iparallel + logical , intent(in) :: required + logical , intent(out) :: foundvar + !---------------------------------------------------------------------------------! + end subroutine hdf_getslab_i + !------------------------------------------------------------------------------------! + end interface +#endif + !---------------------------------------------------------------------------------------! + + + !----- Arguments. ----------------------------------------------------------------------! + type(edtype) , target :: cgrid + integer , intent(in) :: ipy + integer , intent(in) :: py_index + !----- Local variables. ----------------------------------------------------------------! + integer :: iparallel + integer :: dsetrank + integer(SIZE_T) :: sz + integer :: hdferr + logical :: foundvar + !---------------------------------------------------------------------------------------! + + + !----- Turn off parallel for this sub-routine. -----------------------------------------! + iparallel = 0 + !---------------------------------------------------------------------------------------! + + !---------------------------------------------------------------------------------------! + ! Reset the dimension arrays. ! + !---------------------------------------------------------------------------------------! + globdims(:) = 0_8 + chnkdims(:) = 0_8 + chnkoffs(:) = 0_8 + memoffs (:) = 0_8 + memdims (:) = 0_8 + memsize (:) = 1_8 + !---------------------------------------------------------------------------------------! + !---------------------------------------------------------------------------------------! + ! For the remainder of this sub-routine, we must load the polygon variables ! + ! according to the dimensionality. If you are adding a new variable, make sure that it ! + ! is placed together with variables of the same dimensions. ! + ! ! + ! DSETRANK -- the rank of the variable. ! + ! GLOBDIMS -- the size of each dimension ! + ! CHNKDIMS -- the size of the chunk to be read this time ! + ! CHNKOFFS -- the offset (number of indices to be skipped) ! + ! MEMDIMS -- the dimensions of the buffer to be filled. ! + ! MEMOFFS -- the offset of the memory ! + ! MEMSIZE -- the size of variable that will house the information read. ! + !---------------------------------------------------------------------------------------! @@ -1839,7 +2810,7 @@ end subroutine hdf_getslab_i !---------------------------------------------------------------------------------------! !---------------------------------------------------------------------------------------! return -end subroutine fill_history_grid +end subroutine fill_history_grid_p146 !==========================================================================================! !==========================================================================================! diff --git a/ED/src/io/ed_load_namelist.f90 b/ED/src/io/ed_load_namelist.f90 index c5c653c48..186b06cc4 100644 --- a/ED/src/io/ed_load_namelist.f90 +++ b/ED/src/io/ed_load_namelist.f90 @@ -183,6 +183,9 @@ subroutine copy_nl(copy_type) , frqstate & ! intent(out) , sfilout & ! intent(out) , isoutput & ! intent(out) + , iadd_site_means & ! intent(out) + , iadd_patch_means & ! intent(out) + , iadd_cohort_means & ! intent(out) , iprintpolys & ! intent(out) , printvars & ! intent(out) , npvars & ! intent(out) @@ -298,6 +301,10 @@ subroutine copy_nl(copy_type) itoutput = nl%itoutput isoutput = nl%isoutput + iadd_site_means = nl%iadd_site_means + iadd_patch_means = nl%iadd_patch_means + iadd_cohort_means = nl%iadd_cohort_means + attach_metadata = nl%attach_metadata iclobber = nl%iclobber diff --git a/ED/src/io/ed_opspec.F90 b/ED/src/io/ed_opspec.F90 index 162c587fc..0ed67306a 100644 --- a/ED/src/io/ed_opspec.F90 +++ b/ED/src/io/ed_opspec.F90 @@ -1143,6 +1143,9 @@ subroutine ed_opspec_misc , iyoutput & ! intent(in) , itoutput & ! intent(in) , isoutput & ! intent(in) + , iadd_site_means & ! intent(in) + , iadd_patch_means & ! intent(in) + , iadd_cohort_means & ! intent(in) , iclobber & ! intent(in) , runtype & ! intent(in) , ied_init_mode & ! intent(in) @@ -1332,6 +1335,27 @@ subroutine ed_opspec_misc call opspec_fatal(reason,'opspec_misc') ifaterr = ifaterr +1 end if + if (iadd_site_means < 0 .or. iadd_site_means > 1) then + write (reason,fmt='(a,1x,i4,a)') & + 'Invalid IADD_SITE_MEANS, it must be 0 (no) or 1 (yes). Yours is set to' & + ,iadd_site_means,'...' + call opspec_fatal(reason,'opspec_misc') + ifaterr = ifaterr +1 + end if + if (iadd_patch_means < 0 .or. iadd_patch_means > 1) then + write (reason,fmt='(a,1x,i4,a)') & + 'Invalid IADD_PATCH_MEANS, it must be 0 (no) or 1 (yes). Yours is set to' & + ,iadd_patch_means,'...' + call opspec_fatal(reason,'opspec_misc') + ifaterr = ifaterr +1 + end if + if (iadd_cohort_means < 0 .or. iadd_cohort_means > 1) then + write (reason,fmt='(a,1x,i4,a)') & + 'Invalid IADD_COHORT_MEANS, it must be 0 (no) or 1 (yes). Yours is set to' & + ,iadd_cohort_means,'...' + call opspec_fatal(reason,'opspec_misc') + ifaterr = ifaterr +1 + end if if (iclobber < 0 .or. iclobber > 1) then write (reason,fmt='(a,1x,i4,a)') & 'Invalid ICLOBBER, it must be 0 or 1. Yours is set to',iclobber,'...' diff --git a/ED/src/memory/ed_misc_coms.f90 b/ED/src/memory/ed_misc_coms.f90 index 21a771544..739dd077b 100644 --- a/ED/src/memory/ed_misc_coms.f90 +++ b/ED/src/memory/ed_misc_coms.f90 @@ -47,6 +47,10 @@ Module ed_misc_coms integer :: isoutput integer :: iclobber + integer :: iadd_site_means + integer :: iadd_patch_means + integer :: iadd_cohort_means + integer :: unitfast integer :: unitstate real :: frqstate diff --git a/ED/src/memory/ed_state_vars.f90 b/ED/src/memory/ed_state_vars.f90 index 4774b4901..ab470bae2 100644 --- a/ED/src/memory/ed_state_vars.f90 +++ b/ED/src/memory/ed_state_vars.f90 @@ -5,32 +5,35 @@ !------------------------------------------------------------------------------------------! module ed_state_vars - use grid_coms , only : nzg & ! intent(in) - , nzs & ! intent(in) - , ngrids ! ! intent(in) - use ed_max_dims , only : max_site & ! intent(in) - , n_pft & ! intent(in) - , n_dbh & ! intent(in) - , n_mort & ! intent(in) - , n_dist_types & ! intent(in) - , maxmach & ! intent(in) - , maxgrds & ! intent(in) - , str_len ! ! intent(in) - use disturb_coms , only : lutime & ! intent(in) - , num_lu_trans & ! intent(in) - , max_lu_years ! ! intent(in) - use met_driver_coms , only : met_driv_data & ! intent(in) - , met_driv_state ! ! intent(in) - use fusion_fission_coms, only : ff_nhgt & ! intent(in) - , hgt_class ! ! intent(in) - use phenology_coms , only : prescribed_phen ! ! intent(in) - use ed_misc_coms , only : writing_long & ! intent(in) - , writing_eorq & ! intent(in) - , writing_dcyc & ! intent(in) - , history_fast & ! intent(in) - , history_dail & ! intent(in) - , history_eorq & ! intent(in) - , ndcycle ! ! intent(in) + use grid_coms , only : nzg & ! intent(in) + , nzs & ! intent(in) + , ngrids ! ! intent(in) + use ed_max_dims , only : max_site & ! intent(in) + , n_pft & ! intent(in) + , n_dbh & ! intent(in) + , n_mort & ! intent(in) + , n_dist_types & ! intent(in) + , maxmach & ! intent(in) + , maxgrds & ! intent(in) + , str_len ! ! intent(in) + use disturb_coms , only : lutime & ! intent(in) + , num_lu_trans & ! intent(in) + , max_lu_years ! ! intent(in) + use met_driver_coms , only : met_driv_data & ! intent(in) + , met_driv_state ! ! intent(in) + use fusion_fission_coms, only : ff_nhgt & ! intent(in) + , hgt_class ! ! intent(in) + use phenology_coms , only : prescribed_phen ! ! intent(in) + use ed_misc_coms , only : writing_long & ! intent(in) + , writing_eorq & ! intent(in) + , writing_dcyc & ! intent(in) + , iadd_site_means & ! intent(in) + , iadd_patch_means & ! intent(in) + , iadd_cohort_means & ! intent(in) + , history_fast & ! intent(in) + , history_dail & ! intent(in) + , history_eorq & ! intent(in) + , ndcycle ! ! intent(in) implicit none !=======================================================================================! @@ -17908,11 +17911,16 @@ subroutine filltab_polygontype_p21fmean(cpoly,igr,init,var_len,var_len_global,ma !------------------------------------------------------------------------------------! ! Decide whether to write the sub-daily means to the history file. ! !------------------------------------------------------------------------------------! - if (history_fast) then - fast_keys = 'hist:anal' - else - fast_keys = 'anal' - end if + select case (iadd_site_means) + case (0) + return + case (1) + if (history_fast) then + fast_keys = 'hist:anal' + else + fast_keys = 'anal' + end if + end select !------------------------------------------------------------------------------------! @@ -18121,11 +18129,16 @@ subroutine filltab_polygontype_p21dmean(cpoly,igr,init,var_len,var_len_global,ma !------------------------------------------------------------------------------------! ! Decide whether to write the daily means to the history file. ! !------------------------------------------------------------------------------------! - if (history_dail) then - dail_keys = 'hist:dail' - else - dail_keys = 'dail' - end if + select case (iadd_site_means) + case (0) + return + case (1) + if (history_dail) then + dail_keys = 'hist:dail' + else + dail_keys = 'dail' + end if + end select !------------------------------------------------------------------------------------! @@ -18305,11 +18318,16 @@ subroutine filltab_polygontype_p21mmean(cpoly,igr,init,var_len,var_len_global,ma !------------------------------------------------------------------------------------! ! Decide whether to write the monthly means to the history file. ! !------------------------------------------------------------------------------------! - if (history_eorq) then - eorq_keys = 'hist:mont:dcyc' - else - eorq_keys = 'mont:dcyc' - end if + select case (iadd_site_means) + case (0) + return + case (1) + if (history_eorq) then + eorq_keys = 'hist:mont:dcyc' + else + eorq_keys = 'mont:dcyc' + end if + end select !------------------------------------------------------------------------------------! @@ -18632,11 +18650,16 @@ subroutine filltab_polygontype_m21(cpoly,igr,init,var_len,var_len_global,max_ptr !------------------------------------------------------------------------------------! ! Decide whether to write the mean diel to the history file. ! !------------------------------------------------------------------------------------! - if (history_eorq) then - eorq_keys = 'hist:dcyc' - else - eorq_keys = 'dcyc' - end if + select case (iadd_site_means) + case (0) + return + case (1) + if (history_eorq) then + eorq_keys = 'hist:dcyc' + else + eorq_keys = 'dcyc' + end if + end select !------------------------------------------------------------------------------------! @@ -20100,11 +20123,16 @@ subroutine filltab_sitetype_p31fmean(csite,igr,init,var_len,var_len_global,max_p !------------------------------------------------------------------------------------! ! Decide whether to write the sub-daily means to the history file. ! !------------------------------------------------------------------------------------! - if (history_fast) then - fast_keys = 'hist:anal' - else - fast_keys = 'anal' - end if + select case (iadd_patch_means) + case (0) + return + case (1) + if (history_fast) then + fast_keys = 'hist:anal' + else + fast_keys = 'anal' + end if + end select !------------------------------------------------------------------------------------! @@ -20590,11 +20618,16 @@ subroutine filltab_sitetype_p31dmean(csite,igr,init,var_len,var_len_global,max_p !------------------------------------------------------------------------------------! ! Decide whether to write the daily means to the history file. ! !------------------------------------------------------------------------------------! - if (history_dail) then - dail_keys = 'hist:dail' - else - dail_keys = 'dail' - end if + select case (iadd_patch_means) + case (0) + return + case (1) + if (history_dail) then + dail_keys = 'hist:dail' + else + dail_keys = 'dail' + end if + end select !------------------------------------------------------------------------------------! @@ -21136,11 +21169,16 @@ subroutine filltab_sitetype_p31mmean(csite,igr,init,var_len,var_len_global,max_p !------------------------------------------------------------------------------------! ! Decide whether to write the monthly means to the history file. ! !------------------------------------------------------------------------------------! - if (history_eorq) then - eorq_keys = 'hist:mont:dcyc' - else - eorq_keys = 'mont:dcyc' - end if + select case (iadd_patch_means) + case (0) + return + case (1) + if (history_eorq) then + eorq_keys = 'hist:mont:dcyc' + else + eorq_keys = 'mont:dcyc' + end if + end select !------------------------------------------------------------------------------------! @@ -21880,11 +21918,16 @@ subroutine filltab_sitetype_m31(csite,igr,init,var_len,var_len_global,max_ptrs,n !------------------------------------------------------------------------------------! ! Decide whether to write the mean diel to the history file. ! !------------------------------------------------------------------------------------! - if (history_eorq) then - eorq_keys = 'hist:dcyc' - else - eorq_keys = 'dcyc' - end if + select case (iadd_patch_means) + case (0) + return + case (1) + if (history_eorq) then + eorq_keys = 'hist:dcyc' + else + eorq_keys = 'dcyc' + end if + end select !------------------------------------------------------------------------------------! @@ -22525,28 +22568,6 @@ subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,n - !------------------------------------------------------------------------------------! - ! Decide whether to write the fast, daily, and monthly means to the history. ! - !------------------------------------------------------------------------------------! - if (history_fast) then - fast_keys = 'hist:anal' - else - fast_keys = 'anal' - end if - if (history_dail) then - dail_keys = 'hist:dail' - else - dail_keys = 'dail' - end if - if (history_eorq) then - eorq_keys = 'hist:mont:dcyc' - else - eorq_keys = 'mont:dcyc' - end if - !------------------------------------------------------------------------------------! - - - !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! @@ -22608,6 +22629,39 @@ subroutine filltab_sitetype_p32(csite,igr,init,var_len,var_len_global,max_ptrs,n call metadata_edio(nvar,igr,'Patch level root density with depth' & ,'[kg/m3]','(nzg,ipatch)') end if + !------------------------------------------------------------------------------------! + + + + + + + !------------------------------------------------------------------------------------! + ! Decide whether to write the fast, daily, and monthly means to the history. ! + !------------------------------------------------------------------------------------! + select case (iadd_patch_means) + case (0) + return + case (1) + if (history_fast) then + fast_keys = 'hist:anal' + else + fast_keys = 'anal' + end if + if (history_dail) then + dail_keys = 'hist:dail' + else + dail_keys = 'dail' + end if + if (history_eorq) then + eorq_keys = 'hist:mont:dcyc' + else + eorq_keys = 'mont:dcyc' + end if + end select + !------------------------------------------------------------------------------------! + + if (associated(csite%fmean_soil_energy )) then nvar = nvar+1 @@ -22866,11 +22920,16 @@ subroutine filltab_sitetype_m32(csite,igr,init,var_len,var_len_global,max_ptrs,n !------------------------------------------------------------------------------------! ! Decide whether to write the mean diel to the history file. ! !------------------------------------------------------------------------------------! - if (history_eorq) then - eorq_keys = 'hist:dcyc' - else - eorq_keys = 'dcyc' - end if + select case (iadd_patch_means) + case (0) + return + case (1) + if (history_eorq) then + eorq_keys = 'hist:dcyc' + else + eorq_keys = 'dcyc' + end if + end select !------------------------------------------------------------------------------------! @@ -24262,11 +24321,16 @@ subroutine filltab_patchtype_p41fmean(cpatch,igr,init,var_len,var_len_global,max !------------------------------------------------------------------------------------! ! Decide whether to write the sub-daily means to the history file. ! !------------------------------------------------------------------------------------! - if (history_fast) then - fast_keys = 'hist:anal' - else - fast_keys = 'anal' - end if + select case (iadd_cohort_means) + case (0) + return + case (1) + if (history_fast) then + fast_keys = 'hist:anal' + else + fast_keys = 'anal' + end if + end select !------------------------------------------------------------------------------------! @@ -24744,11 +24808,16 @@ subroutine filltab_patchtype_p41dmean(cpatch,igr,init,var_len,var_len_global,max !------------------------------------------------------------------------------------! ! Decide whether to write the daily means to the history file. ! !------------------------------------------------------------------------------------! - if (history_dail) then - dail_keys = 'hist:dail' - else - dail_keys = 'dail' - end if + select case (iadd_cohort_means) + case (0) + return + case (1) + if (history_dail) then + dail_keys = 'hist:dail' + else + dail_keys = 'dail' + end if + end select !------------------------------------------------------------------------------------! @@ -25294,11 +25363,16 @@ subroutine filltab_patchtype_p41mmean(cpatch,igr,init,var_len,var_len_global,max !------------------------------------------------------------------------------------! ! Decide whether to write the monthly means to the history file. ! !------------------------------------------------------------------------------------! - if (history_eorq) then - eorq_keys = 'hist:mont:dcyc' - else - eorq_keys = 'mont:dcyc' - end if + select case (iadd_cohort_means) + case (0) + return + case (1) + if (history_eorq) then + eorq_keys = 'hist:mont:dcyc' + else + eorq_keys = 'mont:dcyc' + end if + end select !------------------------------------------------------------------------------------! @@ -25988,11 +26062,16 @@ subroutine filltab_patchtype_m41(cpatch,igr,init,var_len,var_len_global,max_ptrs !------------------------------------------------------------------------------------! ! Decide whether to write the mean diel to the history file. ! !------------------------------------------------------------------------------------! - if (history_eorq) then - eorq_keys = 'hist:dcyc' - else - eorq_keys = 'dcyc' - end if + select case (iadd_cohort_means) + case (0) + return + case (1) + if (history_eorq) then + eorq_keys = 'hist:dcyc' + else + eorq_keys = 'dcyc' + end if + end select !------------------------------------------------------------------------------------! @@ -26540,19 +26619,6 @@ subroutine filltab_patchtype_p48(cpatch,igr,init,var_len,var_len_global,max_ptrs - !------------------------------------------------------------------------------------! - ! Decide whether to write the monthly means to the history file. ! - !------------------------------------------------------------------------------------! - if (history_eorq) then - eorq_keys = 'hist:mont:dcyc' - else - eorq_keys = 'mont:dcyc' - end if - !------------------------------------------------------------------------------------! - - - - !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! ! This part should have only 2-D vectors, with dimension ncohorts and mortal- ! @@ -26563,16 +26629,39 @@ subroutine filltab_patchtype_p48(cpatch,igr,init,var_len,var_len_global,max_ptrs if (associated(cpatch%mort_rate)) then nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mort_rate,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MORT_RATE_CO :48:hist:dail') + call vtable_edio_r(npts,cpatch%mort_rate & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MORT_RATE_CO :48:hist:dail') call metadata_edio(nvar,igr,'Mortality rates','[1/yr]','icohort') end if + !------------------------------------------------------------------------------------! + + + + !------------------------------------------------------------------------------------! + ! Decide whether to write the monthly means to the history file. ! + !------------------------------------------------------------------------------------! + select case (iadd_cohort_means) + case (0) + return + case (1) + if (history_eorq) then + eorq_keys = 'hist:mont:dcyc' + else + eorq_keys = 'mont:dcyc' + end if + end select + !------------------------------------------------------------------------------------! + + + !------------------------------------------------------------------------------------! if (associated(cpatch%mmean_mort_rate)) then nvar=nvar+1 - call vtable_edio_r(npts,cpatch%mmean_mort_rate,nvar,igr,init,cpatch%coglob_id, & - var_len,var_len_global,max_ptrs,'MMEAN_MORT_RATE_CO :48:'//trim(eorq_keys)) - call metadata_edio(nvar,igr,'Monthly mean mortality rate','[1/yr]','icohort') + call vtable_edio_r(npts,cpatch%mmean_mort_rate & + ,nvar,igr,init,cpatch%coglob_id,var_len,var_len_global,max_ptrs & + ,'MMEAN_MORT_RATE_CO :48:'//trim(eorq_keys)) + call metadata_edio(nvar,igr,'Monthly mean mortality rate','[1/yr]','icohort') end if !------------------------------------------------------------------------------------! !------------------------------------------------------------------------------------! diff --git a/ED/src/memory/ename_coms.f90 b/ED/src/memory/ename_coms.f90 index 642aaa076..957dc09e3 100644 --- a/ED/src/memory/ename_coms.f90 +++ b/ED/src/memory/ename_coms.f90 @@ -53,6 +53,9 @@ module ename_coms integer :: iyoutput integer :: itoutput integer :: isoutput + integer :: iadd_site_means + integer :: iadd_patch_means + integer :: iadd_cohort_means integer :: attach_metadata integer :: iclobber integer :: unitfast @@ -317,6 +320,10 @@ subroutine init_ename_vars(enl) enl%itoutput = undef_integer enl%isoutput = undef_integer + enl%iadd_site_means = undef_integer + enl%iadd_patch_means = undef_integer + enl%iadd_cohort_means = undef_integer + enl%attach_metadata = undef_integer enl%iclobber = undef_integer diff --git a/ED/src/mpi/ed_mpass_init.f90 b/ED/src/mpi/ed_mpass_init.f90 index 64ae67257..5f8914f2f 100644 --- a/ED/src/mpi/ed_mpass_init.f90 +++ b/ED/src/mpi/ed_mpass_init.f90 @@ -134,6 +134,9 @@ subroutine ed_masterput_nl(par_run) , iallom & ! intent(in) , igrass & ! intent(in) , min_site_area & ! intent(in) + , iadd_site_means & ! intent(in) + , iadd_patch_means & ! intent(in) + , iadd_cohort_means & ! intent(in) , attach_metadata & ! intent(in) , fast_diagnostics & ! intent(in) , writing_dail & ! intent(in) @@ -533,8 +536,11 @@ subroutine ed_masterput_nl(par_run) call MPI_Bcast(zrough,1,MPI_REAL,mainnum,MPI_COMM_WORLD,ierr) call MPI_Bcast(edres,1,MPI_REAL,mainnum,MPI_COMM_WORLD,ierr) - call MPI_Bcast(attach_metadata,1,MPI_INTEGER,mainnum,MPI_COMM_WORLD,ierr) + call MPI_Bcast(iadd_site_means ,1,MPI_INTEGER,mainnum,MPI_COMM_WORLD,ierr) + call MPI_Bcast(iadd_patch_means ,1,MPI_INTEGER,mainnum,MPI_COMM_WORLD,ierr) + call MPI_Bcast(iadd_cohort_means,1,MPI_INTEGER,mainnum,MPI_COMM_WORLD,ierr) + call MPI_Bcast(attach_metadata,1,MPI_INTEGER,mainnum,MPI_COMM_WORLD,ierr) call MPI_Bcast(dt_census,1,MPI_INTEGER,mainnum,MPI_COMM_WORLD,ierr) call MPI_Bcast(yr1st_census,1,MPI_INTEGER,mainnum,MPI_COMM_WORLD,ierr) @@ -1269,6 +1275,9 @@ subroutine ed_nodeget_nl , iallom & ! intent(out) , igrass & ! intent(out) , min_site_area & ! intent(out) + , iadd_site_means & ! intent(out) + , iadd_patch_means & ! intent(out) + , iadd_cohort_means & ! intent(out) , attach_metadata & ! intent(out) , fast_diagnostics & ! intent(out) , writing_dail & ! intent(out) @@ -1674,6 +1683,10 @@ subroutine ed_nodeget_nl call MPI_Bcast(zrough,1,MPI_REAL,master_num,MPI_COMM_WORLD,ierr) call MPI_Bcast(edres,1,MPI_REAL,master_num,MPI_COMM_WORLD,ierr) + call MPI_Bcast(iadd_site_means ,1,MPI_INTEGER,master_num,MPI_COMM_WORLD,ierr) + call MPI_Bcast(iadd_patch_means ,1,MPI_INTEGER,master_num,MPI_COMM_WORLD,ierr) + call MPI_Bcast(iadd_cohort_means,1,MPI_INTEGER,master_num,MPI_COMM_WORLD,ierr) + call MPI_Bcast(attach_metadata,1,MPI_INTEGER,master_num,MPI_COMM_WORLD,ierr) call MPI_Bcast(dt_census,1,MPI_INTEGER,master_num,MPI_COMM_WORLD,ierr) From 012421980bceb513b727554954e05f09e92edcc9 Mon Sep 17 00:00:00 2001 From: Marcos Longo Date: Fri, 25 Jan 2013 12:14:49 -0500 Subject: [PATCH 6/6] 1. Minor bug fixes in the heat capacity of soils and vegetation 2. Minor bug fix: mmean_broot wasn't being updated. 3. Updates of many R scripts 4. Included many utility R scripts --- ED/Template/Template/patchprops.r | 6 +- ED/Template/Template/plot_budget.r | 6 +- ED/Template/Template/plot_census.r | 342 +- ED/Template/Template/plot_daily.r | 2 +- ED/Template/Template/plot_eval_ed.r | 8 +- ED/Template/Template/plot_fast.r | 4 +- ED/Template/Template/plot_monthly.r | 480 +- ED/Template/Template/plot_photo.r | 4 +- ED/Template/Template/plot_povray.r | 16 +- ED/Template/Template/plot_rk4.r | 4 +- ED/Template/Template/plot_rk4pc.r | 4 +- ED/Template/Template/plot_ycomp.r | 86 +- ED/Template/Template/plot_yearly.r | 53 +- ED/Template/Template/read_monthly.r | 8 +- ED/Template/Template/reject_ed.r | 4 +- ED/Template/Template/whichrun.r | 4 +- ED/Template/bringlast.sh | 151 +- ED/Template/check_run.sh | 151 +- ED/Template/compare_results.r | 396 +- ED/Template/compare_scenarios.r | 1089 +- ED/Template/delall.sh | 151 +- ED/Template/epost.sh | 336 +- ED/Template/make_joborder.r | 61 +- ED/Template/nc_check_run.sh | 151 +- ED/Template/nc_spawn.sh | 151 +- ED/Template/nc_submitter.sh | 151 +- ED/Template/read_monthly.sh | 151 +- ED/Template/reset.sh | 302 +- ED/Template/run_sitter.sh | 1023 +- ED/Template/spawn_poly.sh | 604 +- ED/Template/stopalljobs.sh | 151 +- ED/Template/submitter.sh | 151 +- ED/src/dynamics/canopy_struct_dynamics.f90 | 67 +- ED/src/init/ed_params.f90 | 93 +- ED/src/io/average_utils.f90 | 4 + ED/src/utils/ed_therm_lib.f90 | 2 +- R-utils/FitGibbsSampler.r | 589 + R-utils/allometry.r | 382 + R-utils/amazonmap.r | 64 + R-utils/amzmap/amazon.forest.txt | 6517 ++++++++ R-utils/arrhenius.r | 31 + R-utils/atlas.r | 44 + R-utils/axis.rt.r | 130 + R-utils/barnes.r | 354 + R-utils/bintemp.r | 60 + R-utils/boot.utils.r | 159 + R-utils/bramsvsaws.r | 61 + R-utils/bramsvsradio.r | 89 + R-utils/bramsvsrg.r | 62 + R-utils/bramsvstrmm.r | 78 + R-utils/census.r | 35 + R-utils/census.tagger.r | 360 + R-utils/charutils.r | 87 + R-utils/clean.tmp.r | 9 + R-utils/clife.r | 28 + R-utils/cloudy.r | 46 + R-utils/collatz.r | 18 + R-utils/colourmap.r | 260 + R-utils/colsuccess.r | 46 + R-utils/commonest.r | 11 + R-utils/cut2d.r | 73 + R-utils/cut3d.r | 78 + R-utils/del.bad.rshort.r | 129 + R-utils/del.outliers.r | 191 + R-utils/demography.rates.r | 418 + R-utils/density.safe.r | 23 + R-utils/disturbance.r | 161 + R-utils/dry.season.length.r | 184 + R-utils/dynamics.proofer.r | 914 + R-utils/eifun.r | 86 + R-utils/epolygon.r | 207 + R-utils/eps.r | 11 + R-utils/error.bar.r | 145 + R-utils/file.really.exists.r | 23 + R-utils/fuse.fiss.utils.r | 701 + R-utils/globdims.r | 197 + R-utils/gridp.r | 23 + R-utils/gridt.r | 52 + R-utils/harmfill.r | 597 + R-utils/igbp.map.r | 122 + R-utils/image.map.r | 351 + R-utils/index.poly.r | 101 + R-utils/infoloc.r | 60 + R-utils/interpol.r | 74 + R-utils/is.prime.r | 22 + R-utils/lai.compp.r | 94 + R-utils/leafcol.r | 20 + R-utils/licorfun.r | 363 + R-utils/list.utils.r | 10 + R-utils/lnlikeaws.r | 56 + R-utils/lnlikeradio.r | 62 + R-utils/lnlikerg.r | 82 + R-utils/lnliketrmm.r | 83 + R-utils/load.everything.r | 232 + R-utils/locations.r | 4182 +++++ R-utils/marthews.rlong.r | 521 + R-utils/mcd12q1.map.r | 126 + R-utils/monthly.template.r | 1171 ++ R-utils/muitas.r | 46 + R-utils/nearest.neighbour.r | 26 + R-utils/numutils.r | 461 + R-utils/optim.gpp.par.fit.r | 43 + R-utils/optim.rshort.fit.r | 255 + R-utils/optim.size.pft.bio.r | 47 + R-utils/par.split.r | 91 + R-utils/pcomp_varlist.r | 1321 ++ R-utils/peb.r | 46 + R-utils/pft.coms.r | 1309 ++ R-utils/plot.rgb.r | 342 + R-utils/plotsize.r | 139 + R-utils/pmonthly_varlist.r | 2748 +++ R-utils/pretty.box.r | 119 + R-utils/pretty.log.r | 18 + R-utils/pretty.sqrt.r | 21 + R-utils/pretty.time.r | 310 + R-utils/pretty.xylim.r | 55 + R-utils/primefac.r | 41 + R-utils/primes.r | 1009 ++ R-utils/qapply.r | 100 + R-utils/quadrature.r | 75 + R-utils/radial.flex.r | 402 + R-utils/rconstants.r | 327 + R-utils/read.q.files.r | 1289 ++ R-utils/read.soil.r | 113 + R-utils/readctl.r | 138 + R-utils/readgrads.r | 234 + R-utils/rlong.fit.r | 217 + R-utils/roadmap.r | 43 + R-utils/roads/br010.csv | 1768 ++ R-utils/roads/br135.csv | 479 + R-utils/roads/br153.csv | 2294 +++ R-utils/roads/br156.csv | 1055 ++ R-utils/roads/br158.csv | 850 + R-utils/roads/br163.csv | 1652 ++ R-utils/roads/br174.csv | 1135 ++ R-utils/roads/br230.csv | 10423 ++++++++++++ R-utils/roads/br316.csv | 479 + R-utils/roads/br317.csv | 1347 ++ R-utils/roads/br319.csv | 1207 ++ R-utils/roads/br364.csv | 2297 +++ R-utils/roads/ve010.csv | 3483 ++++ R-utils/rshort.bdown.r | 222 + R-utils/samap/americadosul | 16695 +++++++++++++++++++ R-utils/sample.by.quant.r | 240 + R-utils/simbrazil.r | 123 + R-utils/skewnorm.stats.r | 401 + R-utils/skill.plot.r | 537 + R-utils/soilutils.r | 359 + R-utils/solid.angle.r | 69 + R-utils/sombreado.r | 137 + R-utils/southammap.r | 64 + R-utils/sw.test.r | 155 + R-utils/taxonutils.r | 2219 +++ R-utils/taylor.plot.r | 449 + R-utils/test.goodness.r | 152 + R-utils/thermlib.r | 896 + R-utils/timeutils.r | 460 + R-utils/two.palettes.r | 166 + R-utils/ustar.filter.r | 494 + R-utils/which.quant.r | 15 + R-utils/whiskers.r | 102 + R-utils/xyz.plot.r | 342 + R-utils/zen.r | 158 + R-utils/zprofile.r | 138 + 164 files changed, 89350 insertions(+), 2929 deletions(-) create mode 100644 R-utils/FitGibbsSampler.r create mode 100644 R-utils/allometry.r create mode 100644 R-utils/amazonmap.r create mode 100644 R-utils/amzmap/amazon.forest.txt create mode 100644 R-utils/arrhenius.r create mode 100644 R-utils/atlas.r create mode 100644 R-utils/axis.rt.r create mode 100644 R-utils/barnes.r create mode 100644 R-utils/bintemp.r create mode 100644 R-utils/boot.utils.r create mode 100644 R-utils/bramsvsaws.r create mode 100644 R-utils/bramsvsradio.r create mode 100644 R-utils/bramsvsrg.r create mode 100644 R-utils/bramsvstrmm.r create mode 100644 R-utils/census.r create mode 100644 R-utils/census.tagger.r create mode 100644 R-utils/charutils.r create mode 100644 R-utils/clean.tmp.r create mode 100644 R-utils/clife.r create mode 100644 R-utils/cloudy.r create mode 100644 R-utils/collatz.r create mode 100644 R-utils/colourmap.r create mode 100644 R-utils/colsuccess.r create mode 100644 R-utils/commonest.r create mode 100644 R-utils/cut2d.r create mode 100644 R-utils/cut3d.r create mode 100644 R-utils/del.bad.rshort.r create mode 100644 R-utils/del.outliers.r create mode 100644 R-utils/demography.rates.r create mode 100644 R-utils/density.safe.r create mode 100644 R-utils/disturbance.r create mode 100644 R-utils/dry.season.length.r create mode 100644 R-utils/dynamics.proofer.r create mode 100644 R-utils/eifun.r create mode 100644 R-utils/epolygon.r create mode 100644 R-utils/eps.r create mode 100644 R-utils/error.bar.r create mode 100644 R-utils/file.really.exists.r create mode 100644 R-utils/fuse.fiss.utils.r create mode 100644 R-utils/globdims.r create mode 100644 R-utils/gridp.r create mode 100644 R-utils/gridt.r create mode 100644 R-utils/harmfill.r create mode 100644 R-utils/igbp.map.r create mode 100644 R-utils/image.map.r create mode 100644 R-utils/index.poly.r create mode 100644 R-utils/infoloc.r create mode 100644 R-utils/interpol.r create mode 100644 R-utils/is.prime.r create mode 100644 R-utils/lai.compp.r create mode 100644 R-utils/leafcol.r create mode 100644 R-utils/licorfun.r create mode 100644 R-utils/list.utils.r create mode 100644 R-utils/lnlikeaws.r create mode 100644 R-utils/lnlikeradio.r create mode 100644 R-utils/lnlikerg.r create mode 100644 R-utils/lnliketrmm.r create mode 100644 R-utils/load.everything.r create mode 100644 R-utils/locations.r create mode 100644 R-utils/marthews.rlong.r create mode 100644 R-utils/mcd12q1.map.r create mode 100644 R-utils/monthly.template.r create mode 100644 R-utils/muitas.r create mode 100644 R-utils/nearest.neighbour.r create mode 100644 R-utils/numutils.r create mode 100644 R-utils/optim.gpp.par.fit.r create mode 100644 R-utils/optim.rshort.fit.r create mode 100644 R-utils/optim.size.pft.bio.r create mode 100644 R-utils/par.split.r create mode 100644 R-utils/pcomp_varlist.r create mode 100644 R-utils/peb.r create mode 100644 R-utils/pft.coms.r create mode 100644 R-utils/plot.rgb.r create mode 100644 R-utils/plotsize.r create mode 100644 R-utils/pmonthly_varlist.r create mode 100644 R-utils/pretty.box.r create mode 100644 R-utils/pretty.log.r create mode 100644 R-utils/pretty.sqrt.r create mode 100644 R-utils/pretty.time.r create mode 100644 R-utils/pretty.xylim.r create mode 100644 R-utils/primefac.r create mode 100644 R-utils/primes.r create mode 100644 R-utils/qapply.r create mode 100644 R-utils/quadrature.r create mode 100644 R-utils/radial.flex.r create mode 100644 R-utils/rconstants.r create mode 100644 R-utils/read.q.files.r create mode 100644 R-utils/read.soil.r create mode 100644 R-utils/readctl.r create mode 100644 R-utils/readgrads.r create mode 100644 R-utils/rlong.fit.r create mode 100644 R-utils/roadmap.r create mode 100644 R-utils/roads/br010.csv create mode 100644 R-utils/roads/br135.csv create mode 100644 R-utils/roads/br153.csv create mode 100644 R-utils/roads/br156.csv create mode 100644 R-utils/roads/br158.csv create mode 100644 R-utils/roads/br163.csv create mode 100644 R-utils/roads/br174.csv create mode 100644 R-utils/roads/br230.csv create mode 100644 R-utils/roads/br316.csv create mode 100644 R-utils/roads/br317.csv create mode 100644 R-utils/roads/br319.csv create mode 100644 R-utils/roads/br364.csv create mode 100644 R-utils/roads/ve010.csv create mode 100644 R-utils/rshort.bdown.r create mode 100755 R-utils/samap/americadosul create mode 100644 R-utils/sample.by.quant.r create mode 100644 R-utils/simbrazil.r create mode 100644 R-utils/skewnorm.stats.r create mode 100644 R-utils/skill.plot.r create mode 100644 R-utils/soilutils.r create mode 100644 R-utils/solid.angle.r create mode 100644 R-utils/sombreado.r create mode 100644 R-utils/southammap.r create mode 100644 R-utils/sw.test.r create mode 100644 R-utils/taxonutils.r create mode 100644 R-utils/taylor.plot.r create mode 100644 R-utils/test.goodness.r create mode 100644 R-utils/thermlib.r create mode 100644 R-utils/timeutils.r create mode 100644 R-utils/two.palettes.r create mode 100644 R-utils/ustar.filter.r create mode 100644 R-utils/which.quant.r create mode 100644 R-utils/whiskers.r create mode 100644 R-utils/xyz.plot.r create mode 100644 R-utils/zen.r create mode 100644 R-utils/zprofile.r diff --git a/ED/Template/Template/patchprops.r b/ED/Template/Template/patchprops.r index 48bd79af3..1ae619445 100644 --- a/ED/Template/Template/patchprops.r +++ b/ED/Template/Template/patchprops.r @@ -12,9 +12,9 @@ graphics.off() #----- Here is the user-defined variable section. -----------------------------------------# -here = "thispath" # Current directory. -there = "thatpath" # Directory where analyses/history are -srcdir = "/n/moorcroft_data/mlongo/util/Rsc" # Property directory. +here = "thispath" # Current directory. +there = "thatpath" # Directory where analyses/history are +srcdir = "thisrscpath" # Script directory. when = c("thismontha/thisdatea/thisyeara","thishoura:thisminua:00") # Time to grab the history outroot = "thisoutroot" myplaces = c("thispoly") # Places to find patch properties diff --git a/ED/Template/Template/plot_budget.r b/ED/Template/Template/plot_budget.r index ccd0abdaa..1468ae17b 100644 --- a/ED/Template/Template/plot_budget.r +++ b/ED/Template/Template/plot_budget.r @@ -1,7 +1,7 @@ #----- Here is the user-defined variable section. -----------------------------------------# -here = "thispath" # Current directory. -srcdir = "/n/moorcroft_data/mlongo/util/Rsc" # Source directory. -outroot = "thisoutroot" # Source directory. +here = "thispath" # Current directory. +srcdir = "thisrscpath" # Source directory. +outroot = "thisoutroot" # Output directory. myplaces = c("thispoly") #------------------------------------------------------------------------------------------# # Initial and final times, they must be character vectors of size 2, the first one # diff --git a/ED/Template/Template/plot_census.r b/ED/Template/Template/plot_census.r index 53902f2a4..a84aca018 100644 --- a/ED/Template/Template/plot_census.r +++ b/ED/Template/Template/plot_census.r @@ -15,10 +15,10 @@ graphics.off() #------------------------------------------------------------------------------------------# #----- Paths. -----------------------------------------------------------------------------# -here = "thispath" # Current directory. -there = "thatpath" # Directory where analyses/history are -srcdir = "/n/moorcroft_data/mlongo/util/Rsc" # Source directory. -outroot = "thisoutroot" # Directory for figures +here = "thispath" # Current directory. +there = "thatpath" # Directory where analyses/history are +srcdir = "thisrscpath" # Source directory. +outroot = "thisoutroot" # Directory for figures #------------------------------------------------------------------------------------------# @@ -140,7 +140,7 @@ growth.labels = c("DBH","Above Ground Biomass","Basal Area") #------------------------------------------------------------------------------------------# # Comparisons. # #------------------------------------------------------------------------------------------# -#---- 1. Plot time series of median and confidence intervals. -----------------------------# +#---- 1. Plot time series of expected values and confidence intervals. --------------------# pratets = list() pratets[[1]] = list( ed2.rate = "recr" , sta.rate = "recr" @@ -210,7 +210,7 @@ pratets[[5]] = list( ed2.rate = "growth" -#---- 2. Plot median and confidence intervals for all size classes and censuses. ----------# +#---- 2. Plot expected values and confidence intervals for all size classes and censuses. -# pratesize = list() pratesize[[1]] = list( ed2.rate = "mort" , sta.rate = "mort" @@ -264,7 +264,7 @@ pratesize[[4]] = list( ed2.rate = "growth" , legpos = "topright" , plog = "" )#end list -#---- 3. Plot median and confidence intervals for themes. ---------------------------------# +#---- 3. Plot expected values and confidence intervals for themes. ------------------------# pratetheme = list() pratetheme[[1]] = list( ed2.rate = c("ddmort","dimort") , sta.rate = "mort" @@ -601,7 +601,7 @@ for (place in myplaces){ , 2. * sta$dbh.breaks[n.dbh] - sta$dbh.breaks[n.dbh-1] ) x.dbh = 0.5 * ( x.edge[-1] + x.edge[-(n.dbh+1)] ) xlimit = pretty.xylim(u=x.edge,fracexp=0.0,is.log=FALSE) - dbh.names = dimnames(sta$mort.size$n$median)[[2]] + dbh.names = dimnames(sta$mort.size$n$expected)[[2]] year4 = numyears(sta$when) biocyca = year4[2] biocycz = year4[length(year4)] @@ -726,9 +726,10 @@ for (place in myplaces){ ,"; Census: ",paste(act.census.year[census.idx[m]]),"\n") #----- Build the file name. ---------------------------------------------------# - cmonth = sprintf("%2.2i",now.month) - cyear = sprintf("%2.2i",now.year ) - myfile = paste(inpref,"-Q-",cyear,"-",cmonth,"-00-000000-g01.h5",sep="") + cmonth = sprintf("%2.2i",now.month) + cyear = sprintf("%2.2i",now.year ) + myfile = paste(inpref,"-Q-",cyear,"-",cmonth,"-00-000000-g01.h5",sep="") + myfile.bz2 = paste(myfile,"bz2",sep=".") #------------------------------------------------------------------------------# @@ -750,11 +751,27 @@ for (place in myplaces){ #------------------------------------------------------------------------------# # Read data if the file exists. # #------------------------------------------------------------------------------# - if (file.exists(myfile)){ + if (file.exists(myfile) | file.exists(myfile.bz2)){ + + + #----- Read data and close connection immediately after. -------------------# - #cat(" * Reading ",basename(myfile),"...","\n") - mymont = hdf5load(file=myfile,load=FALSE,verbosity=0,tidy=TRUE) + if (file.exists(myfile)){ + mymont = hdf5load(file=myfile,load=FALSE,verbosity=0,tidy=TRUE) + + }else if(file.exists(myfile.bz2)){ + temp.file = file.path(tempdir(),basename(myfile)) + dummy = bunzip2(filename=myfile.bz2,destname=temp.file,remove=FALSE) + mymont = hdf5load(file=temp.file,load=FALSE,verbosity=0,tidy=TRUE) + dummy = file.remove(temp.file) + + }else{ + cat (" - File : ",basename(myfile) ,"\n") + cat (" - File (bz2): ",basename(myfile.bz2),"\n") + stop(" Neither the expanded nor the compressed files were found!") + + }#end if #---------------------------------------------------------------------------# @@ -994,31 +1011,30 @@ for (place in myplaces){ # Growth rates are found only for established cohorts. # #------------------------------------------------------------------------# if (any(s.cs2)){ - #----- Estimate the median of this population. -----------------------# - dlndbhdt = dlndbhdtconow [s.cs2] - dlnagbdt = dlnagbdtconow [s.cs2] - dlnbadt = dlnbadtconow [s.cs2] - wgt = w.nplant [s.cs2] - median.dlndbhdt = weighted.quantile( x = dlndbhdtconow [s.cs2] - , w = w.nplant [s.cs2] - , qu = 0.50 - )#end - median.dlnagbdt = weighted.quantile( x = dlnagbdtconow [s.cs2] - , w = w.nplant [s.cs2] - , qu = 0.50 - )#end - median.dlnbadt = weighted.quantile( x = dlnbadtconow [s.cs2] - , w = w.nplant [s.cs2] - , qu = 0.50 - )#end + #----- Estimate the mean of this population. -------------------------# + dlndbhdt = dlndbhdtconow [s.cs2] + dlnagbdt = dlnagbdtconow [s.cs2] + dlnbadt = dlnbadtconow [s.cs2] + wgt = w.nplant [s.cs2] + mean.dlndbhdt = weighted.mean( x = dlndbhdtconow [s.cs2] + , w = w.nplant [s.cs2] + )#end + mean.dlnagbdt = weighted.mean( x = dlnagbdtconow [s.cs2] + , w = w.nplant [s.cs2] + )#end + mean.dlnbadt = weighted.mean( x = dlnbadtconow [s.cs2] + , w = w.nplant [s.cs2] + )#end #---------------------------------------------------------------------# + + #---------------------------------------------------------------------# # Copy the results to the arrays. # #---------------------------------------------------------------------# - ts.growth.plot$dbh[p,m,u] = median.dlndbhdt$q - ts.growth.plot$agb[p,m,u] = median.dlnagbdt$q - ts.growth.plot$ba [p,m,u] = median.dlnbadt$q + ts.growth.plot$dbh[p,m,u] = mean.dlndbhdt + ts.growth.plot$agb[p,m,u] = mean.dlnagbdt + ts.growth.plot$ba [p,m,u] = mean.dlnbadt #---------------------------------------------------------------------# }#end if #------------------------------------------------------------------------# @@ -1095,31 +1111,28 @@ for (place in myplaces){ # Growth rates are found only for established cohorts. # #---------------------------------------------------------------------# if (any(s.cs2)){ - #----- Estimate the median of this population. --------------------# - dlndbhdt = dlndbhdtconow [s.cs2] - dlnagbdt = dlnagbdtconow [s.cs2] - dlnbadt = dlnbadtconow [s.cs2] - wgt = w.nplant [s.cs2] - median.dlndbhdt = weighted.quantile( x = dlndbhdtconow [s.cs2] - , w = w.nplant [s.cs2] - , qu = 0.50 - )#end - median.dlnagbdt = weighted.quantile( x = dlnagbdtconow [s.cs2] - , w = w.nplant [s.cs2] - , qu = 0.50 - )#end - median.dlnbadt = weighted.quantile( x = dlnbadtconow [s.cs2] - , w = w.nplant [s.cs2] - , qu = 0.50 - )#end + #----- Estimate the mean of this population. ----------------------# + dlndbhdt = dlndbhdtconow [s.cs2] + dlnagbdt = dlnagbdtconow [s.cs2] + dlnbadt = dlnbadtconow [s.cs2] + wgt = w.nplant [s.cs2] + mean.dlndbhdt = weighted.mean( x = dlndbhdtconow [s.cs2] + , w = w.nplant [s.cs2] + )#end + mean.dlnagbdt = weighted.mean( x = dlnagbdtconow [s.cs2] + , w = w.nplant [s.cs2] + )#end + mean.dlnbadt = weighted.mean( x = dlnbadtconow [s.cs2] + , w = w.nplant [s.cs2] + )#end #------------------------------------------------------------------# #------------------------------------------------------------------# # Copy the results to the arrays. # #------------------------------------------------------------------# - ts.growth.size$dbh[p,d,m,u] = median.dlndbhdt$q - ts.growth.size$agb[p,d,m,u] = median.dlnagbdt$q - ts.growth.size$ba [p,d,m,u] = median.dlnbadt$q + ts.growth.size$dbh[p,d,m,u] = mean.dlndbhdt + ts.growth.size$agb[p,d,m,u] = mean.dlnagbdt + ts.growth.size$ba [p,d,m,u] = mean.dlnbadt #------------------------------------------------------------------# }#end if #---------------------------------------------------------------------# @@ -1457,8 +1470,11 @@ for (place in myplaces){ ms.mean.plot[p,i] = mean(ts.plot.now,na.rm=TRUE) if (any(is.finite(ts.plot.now))){ boot.now = boot (data=ts.plot.now,statistic=mean.fun,R=n.boot) - ci.now = boot.ci(boot.out=boot.now,conf=0.95,type="perc") - if (length(ci.now$percent) == 5){ + ci.now = try(boot.ci(boot.out=boot.now,conf=0.95,type="perc") + ,silent=TRUE) + if ("try-error" %in% is(ci.now)){ + warning("Failed using bootstrap...") + }else if (length(ci.now$percent) == 5){ ms.q025.plot[p,i] = ci.now$percent[4] ms.q975.plot[p,i] = ci.now$percent[5] }else{ @@ -1484,9 +1500,9 @@ for (place in myplaces){ #------------------------------------------------------------------------------# # Save plot and size. # #------------------------------------------------------------------------------# - ms.this.plot[[v.now]] = list( mean = ms.mean.plot - , q025 = ms.q025.plot - , q975 = ms.q975.plot + ms.this.plot[[v.now]] = list( expected = ms.mean.plot + , q025 = ms.q025.plot + , q975 = ms.q975.plot )#end list #------------------------------------------------------------------------------# dummy = assign(paste("ms",recr.rates[r],"plot",sep="."), ms.this.plot) @@ -1532,8 +1548,11 @@ for (place in myplaces){ ms.mean.plot[p,i] = mean(ts.plot.now,na.rm=TRUE) if (any(is.finite(ts.plot.now))){ boot.now = boot (data=ts.plot.now,statistic=mean.fun,R=n.boot) - ci.now = boot.ci(boot.out=boot.now,conf=0.95,type="perc") - if (length(ci.now$percent) == 5){ + ci.now = try(boot.ci(boot.out=boot.now,conf=0.95,type="perc") + ,silent=TRUE) + if ("try-error" %in% is(ci.now)){ + warning("Failed using bootstrap...") + }else if (length(ci.now$percent) == 5){ ms.q025.plot[p,i] = ci.now$percent[4] ms.q975.plot[p,i] = ci.now$percent[5] }else{ @@ -1548,8 +1567,11 @@ for (place in myplaces){ ms.mean.size[p,d,i] = mean(ts.size.now,na.rm=TRUE) if (any(is.finite(ts.size.now))){ boot.now = boot (data=ts.size.now,statistic=mean.fun,R=n.boot) - ci.now = boot.ci(boot.out=boot.now,conf=0.95,type="perc") - if (length(ci.now$percent) == 5){ + ci.now = try(boot.ci(boot.out=boot.now,conf=0.95,type="perc") + ,silent=TRUE) + if ("try-error" %in% is(ci.now)){ + warning("Failed using bootstrap...") + }else if (length(ci.now$percent) == 5){ ms.q025.size[p,d,i] = ci.now$percent[4] ms.q975.size[p,d,i] = ci.now$percent[5] }else{ @@ -1581,13 +1603,13 @@ for (place in myplaces){ #------------------------------------------------------------------------------# # Save plot and size. # #------------------------------------------------------------------------------# - ms.this.plot[[v.now]] = list( mean = ms.mean.plot - , q025 = ms.q025.plot - , q975 = ms.q975.plot + ms.this.plot[[v.now]] = list( expected = ms.mean.plot + , q025 = ms.q025.plot + , q975 = ms.q975.plot )#end list - ms.this.size[[v.now]] = list( mean = ms.mean.size - , q025 = ms.q025.size - , q975 = ms.q975.size + ms.this.size[[v.now]] = list( expected = ms.mean.size + , q025 = ms.q025.size + , q975 = ms.q975.size )#end list #------------------------------------------------------------------------------# dummy = assign(paste("ms",mort.rates[r],"plot",sep="."), ms.this.plot) @@ -1633,8 +1655,11 @@ for (place in myplaces){ ms.mean.plot[p,i] = mean(ts.plot.now,na.rm=TRUE) if (any(is.finite(ts.plot.now))){ boot.now = boot (data=ts.plot.now,statistic=mean.fun,R=n.boot) - ci.now = boot.ci(boot.out=boot.now,conf=0.95,type="perc") - if (length(ci.now$percent) == 5){ + ci.now = try(boot.ci(boot.out=boot.now,conf=0.95,type="perc") + ,silent=TRUE) + if ("try-error" %in% is(ci.now)){ + warning("Failed using bootstrap...") + }else if (length(ci.now$percent) == 5){ ms.q025.plot[p,i] = ci.now$percent[4] ms.q975.plot[p,i] = ci.now$percent[5] }else{ @@ -1649,8 +1674,11 @@ for (place in myplaces){ ms.mean.size[p,d,i] = mean(ts.size.now,na.rm=TRUE) if (any(is.finite(ts.size.now))){ boot.now = boot (data=ts.size.now,statistic=mean.fun,R=n.boot) - ci.now = boot.ci(boot.out=boot.now,conf=0.95,type="perc") - if (length(ci.now$percent) == 5){ + ci.now = try(boot.ci(boot.out=boot.now,conf=0.95,type="perc") + ,silent=TRUE) + if ("try-error" %in% is(ci.now)){ + warning("Failed using bootstrap...") + }else if (length(ci.now$percent) == 5){ ms.q025.size[p,d,i] = ci.now$percent[4] ms.q975.size[p,d,i] = ci.now$percent[5] }else{ @@ -1671,13 +1699,13 @@ for (place in myplaces){ #------------------------------------------------------------------------------# # Save plot and size. # #------------------------------------------------------------------------------# - ms.this.plot[[v.now]] = list( mean = ms.mean.plot - , q025 = ms.q025.plot - , q975 = ms.q975.plot + ms.this.plot[[v.now]] = list( expected = ms.mean.plot + , q025 = ms.q025.plot + , q975 = ms.q975.plot )#end list - ms.this.size[[v.now]] = list( mean = ms.mean.size - , q025 = ms.q025.size - , q975 = ms.q975.size + ms.this.size[[v.now]] = list( expected = ms.mean.size + , q025 = ms.q025.size + , q975 = ms.q975.size )#end list #------------------------------------------------------------------------------# dummy = assign(paste("ms",growth.rates[r],"plot",sep="."), ms.this.plot) @@ -1771,24 +1799,22 @@ for (place in myplaces){ #------------------------------------------------------------------------------# - # Create the plot-level structure. Here the median and quantiles have a # - # somewhat different number, based on the number of cycles we run (median # - # amongst each cycle). # + # Create the plot-level structure. # #------------------------------------------------------------------------------# ed2[[ed2.plot]][[v.now]] = list() - #----- "Borrow" the structure from the sta counterpart. ------------------------# + #----- "Borrow" the structure from the sta counterpart. -----------------------# ed2[[ed2.plot]][[v.now]]$global = NA * sta[[sta.plot]][[v.now]]$global - ed2[[ed2.plot]][[v.now]]$median = NA * sta[[sta.plot]][[v.now]]$median + ed2[[ed2.plot]][[v.now]]$expected = NA * sta[[sta.plot]][[v.now]]$expected ed2[[ed2.plot]][[v.now]]$q025 = NA * sta[[sta.plot]][[v.now]]$q025 ed2[[ed2.plot]][[v.now]]$q975 = NA * sta[[sta.plot]][[v.now]]$q975 #----- Save the global variables. ---------------------------------------------# - ed2[[ed2.plot]][[v.now]]$global[4,yyy] = ms.plot$mean[npft+1,yyy] - ed2[[ed2.plot]][[v.now]]$global[5,yyy] = ms.plot$q025[npft+1,yyy] - ed2[[ed2.plot]][[v.now]]$global[6,yyy] = ms.plot$q975[npft+1,yyy] + ed2[[ed2.plot]][[v.now]]$global [1,yyy] = ms.plot$expected[npft+1,yyy] + ed2[[ed2.plot]][[v.now]]$global [2,yyy] = ms.plot$q025 [npft+1,yyy] + ed2[[ed2.plot]][[v.now]]$global [3,yyy] = ms.plot$q975 [npft+1,yyy] #----- Save the PFT statistics. -----------------------------------------------# - ed2[[ed2.plot]][[v.now]]$median[ ,yyy] = ms.plot$mean[mypfts,yyy] - ed2[[ed2.plot]][[v.now]]$q025 [ ,yyy] = ms.plot$q025[mypfts,yyy] - ed2[[ed2.plot]][[v.now]]$q975 [ ,yyy] = ms.plot$q975[mypfts,yyy] + ed2[[ed2.plot]][[v.now]]$expected[ ,yyy] = ms.plot$expected[mypfts,yyy] + ed2[[ed2.plot]][[v.now]]$q025 [ ,yyy] = ms.plot$q025 [mypfts,yyy] + ed2[[ed2.plot]][[v.now]]$q975 [ ,yyy] = ms.plot$q975 [mypfts,yyy] #------------------------------------------------------------------------------# @@ -1806,24 +1832,22 @@ for (place in myplaces){ #---------------------------------------------------------------------------# - # Create the plot-level structure. Here the median and quantiles have # - # a somewhat different number, based on the number of cycles we run (median # - # amongst each cycle). # + # Create the plot-level structure. # #---------------------------------------------------------------------------# ed2[[ed2.size]][[v.now]] = list() #----- "Borrow" the structure from the sta counterpart. --------------------# - ed2[[ed2.size]][[v.now]]$global = NA * sta[[sta.size]][[v.now]]$global - ed2[[ed2.size]][[v.now]]$median = NA * sta[[sta.size]][[v.now]]$median - ed2[[ed2.size]][[v.now]]$q025 = NA * sta[[sta.size]][[v.now]]$q025 - ed2[[ed2.size]][[v.now]]$q975 = NA * sta[[sta.size]][[v.now]]$q975 + ed2[[ed2.size]][[v.now]]$global = NA * sta[[sta.size]][[v.now]]$global + ed2[[ed2.size]][[v.now]]$expected = NA * sta[[sta.size]][[v.now]]$expected + ed2[[ed2.size]][[v.now]]$q025 = NA * sta[[sta.size]][[v.now]]$q025 + ed2[[ed2.size]][[v.now]]$q975 = NA * sta[[sta.size]][[v.now]]$q975 #----- Save the global variables. ------------------------------------------# - ed2[[ed2.size]][[v.now]]$global[4,,yyy] = ms.size$mean[npft+1,,yyy] - ed2[[ed2.size]][[v.now]]$global[5,,yyy] = ms.size$q025[npft+1,,yyy] - ed2[[ed2.size]][[v.now]]$global[6,,yyy] = ms.size$q975[npft+1,,yyy] + ed2[[ed2.size]][[v.now]]$global[1,,yyy] = ms.size$expected[npft+1,,yyy] + ed2[[ed2.size]][[v.now]]$global[2,,yyy] = ms.size$q025 [npft+1,,yyy] + ed2[[ed2.size]][[v.now]]$global[3,,yyy] = ms.size$q975 [npft+1,,yyy] #----- Save the PFT statistics. --------------------------------------------# - ed2[[ed2.size]][[v.now]]$median[ ,,yyy] = ms.size$mean[mypfts,,yyy] - ed2[[ed2.size]][[v.now]]$q025 [ ,,yyy] = ms.size$q025[mypfts,,yyy] - ed2[[ed2.size]][[v.now]]$q975 [ ,,yyy] = ms.size$q975[mypfts,,yyy] + ed2[[ed2.size]][[v.now]]$expected[ ,,yyy] = ms.size$expected[mypfts,,yyy] + ed2[[ed2.size]][[v.now]]$q025 [ ,,yyy] = ms.size$q025 [mypfts,,yyy] + ed2[[ed2.size]][[v.now]]$q975 [ ,,yyy] = ms.size$q975 [mypfts,,yyy] #---------------------------------------------------------------------------# }#end if #------------------------------------------------------------------------------# @@ -1847,6 +1871,18 @@ for (place in myplaces){ + #------------------------------------------------------------------------------------# + # Make the RData file name, then we check whether we must read the files again # + # or use the stored RData. # + #------------------------------------------------------------------------------------# + path.data = paste(here,place,"rdata_census",sep="/") + if (! file.exists(path.data)) dir.create(path.data) + ed22.rdata = paste(path.data,paste("census_",place,".RData",sep=""),sep="/") + save(list=c("ed2"),file=ed22.rdata) + #------------------------------------------------------------------------------------# + + + @@ -1901,13 +1937,13 @@ for (place in myplaces){ #----- Load the modelled rates. -----------------------------------------------# sta.mod = sta[[sta.rate]][[indiv[i]]]$global - sta.median = 100. * sta.mod[4,,] - sta.q025 = 100. * sta.mod[5,,] - sta.q975 = 100. * sta.mod[6,,] + sta.expected = 100. * sta.mod[1,,] + sta.q025 = 100. * sta.mod[2,,] + sta.q975 = 100. * sta.mod[3,,] ed2.mod = ed2[[ed2.rate]][[indiv[i]]]$global - ed2.median = 100. * ed2.mod[4,,] - ed2.q025 = 100. * ed2.mod[5,,] - ed2.q975 = 100. * ed2.mod[6,,] + ed2.expected = 100. * ed2.mod[1,,] + ed2.q025 = 100. * ed2.mod[2,,] + ed2.q975 = 100. * ed2.mod[3,,] #------------------------------------------------------------------------------# @@ -1986,7 +2022,7 @@ for (place in myplaces){ )#end legend #------------------------------------------------------------------------# }else{ - yuse = c(sta.q025,sta.q975,ed2.median) + yuse = c(sta.q025,sta.q975,ed2.expected) ylimit = pretty.xylim(u=yuse,fracexp=0.0,is.log=ylog) @@ -2068,8 +2104,8 @@ for (place in myplaces){ #----- Plot the taxon rate with confidence interval. --------------------# epolygon(x=size.poly$x,y=size.poly$y,col=size.poly$col,angle=c(-45,45) ,density=40,lty="solid",lwd=1.0) - lines(x=x.dbh,y=sta.median[,y],type="o",col=col.sta[1],pch=16,lwd=2.0) - lines(x=x.dbh,y=ed2.median[,y],type="o",col=col.ed2[1],pch=16,lwd=2.0) + lines(x=x.dbh,y=sta.expected[,y],type="o",col=col.sta[1],pch=16,lwd=2.0) + lines(x=x.dbh,y=ed2.expected[,y],type="o",col=col.ed2[1],pch=16,lwd=2.0) }#end for #---------------------------------------------------------------------------# @@ -2171,17 +2207,17 @@ for (place in myplaces){ #----- Load the modelled rates. -----------------------------------------------# sta.mod = sta[[sta.rate]][[indiv[i]]]$global - sta.median = 100. * sta.mod[4,2:n.census] - sta.q025 = 100. * sta.mod[5,2:n.census] - sta.q975 = 100. * sta.mod[6,2:n.census] - ed2.median = list() + sta.expected = 100. * sta.mod[1,-1] + sta.q025 = 100. * sta.mod[2,-1] + sta.q975 = 100. * sta.mod[3,-1] + ed2.expected = list() ed2.q025 = list() ed2.q975 = list() for (r in sequence(nrate)){ ed2.mod = ed2[[ed2.rate[r]]][[indiv[i]]]$global - ed2.median[[r]] = 100. * ed2.mod[4,2:n.census] - ed2.q025 [[r]] = 100. * ed2.mod[5,2:n.census] - ed2.q975 [[r]] = 100. * ed2.mod[6,2:n.census] + ed2.expected[[r]] = 100. * ed2.mod[1,-1] + ed2.q025 [[r]] = 100. * ed2.mod[2,-1] + ed2.q975 [[r]] = 100. * ed2.mod[3,-1] }#end for #------------------------------------------------------------------------------# @@ -2233,7 +2269,7 @@ for (place in myplaces){ #---------------------------------------------------------------------------# # Find the plot limit for the y scale. # #---------------------------------------------------------------------------# - yuse = c(sta.q025,sta.q975,unlist(ed2.median)) + yuse = c(sta.q025,sta.q975,unlist(ed2.expected)) ylimit = pretty.xylim(u=yuse,fracexp=0.,is.log=ylog) #---------------------------------------------------------------------------# }#end if @@ -2325,15 +2361,15 @@ for (place in myplaces){ #----- Plotting window and grid. -------------------------------------------# par(mar=c(5,4,4,2)+0.1) - plot(x=x.years,y=sta.median,xlim=xlimit,ylim=ylimit,type="n",main=letitre + plot(x=x.years,y=sta.expected,xlim=xlimit,ylim=ylimit,type="n",main=letitre ,xlab=lex,ylab=ley,log=plog,cex.main=0.7) if (plotgrid) grid(col=grid.colour,lty="solid") #----- Plot the taxon rate with confidence interval. -----------------------# epolygon(x=plot.poly$x,y=plot.poly$y,col=plot.poly$col,angle=c(90,angle) ,density=c(40,dens),lty="solid",lwd=1.0) - lines(x=x.years,y=sta.median,type="o",col=col.sta[1],pch=16,lwd=2.0) + lines(x=x.years,y=sta.expected,type="o",col=col.sta[1],pch=16,lwd=2.0) for (r in 1:nrate){ - lines(x=x.years,y=ed2.median[[r]],type="o",col=col.ed2[r,1] + lines(x=x.years,y=ed2.expected[[r]],type="o",col=col.ed2[r,1] ,pch=16,lwd=2.0) }#end for #---------------------------------------------------------------------------# @@ -2483,17 +2519,17 @@ for (place in myplaces){ #----- Load the modelled rates. --------------------------------------# sta.mod = sta[[sta.rate]][[indiv[i]]]$global - sta.median = 100. * sta.mod[4,d,2:n.census] - sta.q025 = 100. * sta.mod[5,d,2:n.census] - sta.q975 = 100. * sta.mod[6,d,2:n.census] - ed2.median = list() + sta.expected = 100. * sta.mod[1,d,-1] + sta.q025 = 100. * sta.mod[2,d,-1] + sta.q975 = 100. * sta.mod[3,d,-1] + ed2.expected = list() ed2.q025 = list() ed2.q975 = list() for (r in 1:nrate){ - ed2.mod = ed2[[ed2.rate[r]]][[indiv[i]]]$global - ed2.median[[r]] = 100. * ed2.mod[4,d,2:n.census] - ed2.q025 [[r]] = 100. * ed2.mod[5,d,2:n.census] - ed2.q975 [[r]] = 100. * ed2.mod[6,d,2:n.census] + ed2.mod = ed2[[ed2.rate[r]]][[indiv[i]]]$global + ed2.expected[[r]] = 100. * ed2.mod[1,d,-1] + ed2.q025 [[r]] = 100. * ed2.mod[2,d,-1] + ed2.q975 [[r]] = 100. * ed2.mod[3,d,-1] }#end for #---------------------------------------------------------------------# @@ -2528,7 +2564,7 @@ for (place in myplaces){ #------------------------------------------------------------------# # Find the plot limit for the y scale. # #------------------------------------------------------------------# - yuse = c(ed2.median[d,],sta.q025,sta.q975) + yuse = c(ed2.expected[d,],sta.q025,sta.q975) ylimit = pretty.xylim(yuse,fracexp=0.0,is.log=ylog) #------------------------------------------------------------------# @@ -2564,10 +2600,10 @@ for (place in myplaces){ #----- Plot the taxon rate with confidence interval. -----------------# epolygon(x=size.poly$x,y=size.poly$y,col=size.poly$col ,angle=c(90,angle),density=c(40,dens),lty="solid",lwd=1.0) - lines(x=x.years,y=sta.median,type="o",pch=16,lwd=2.0 + lines(x=x.years,y=sta.expected,type="o",pch=16,lwd=2.0 ,col=col.sta[1]) for (r in sequence(nrate)){ - lines(x=x.years,y=ed2.median[[r]],type="o",pch=16,lwd=2.0 + lines(x=x.years,y=ed2.expected[[r]],type="o",pch=16,lwd=2.0 ,col=col.ed2[r,1]) }#end for #---------------------------------------------------------------------# @@ -2669,13 +2705,13 @@ for (place in myplaces){ #----- Load the modelled rates. -----------------------------------------------# sta.mod = sta[[sta.rate]][[indiv[i]]]$global - sta.median = 100. * sta.mod[4,2:n.census] - sta.q025 = 100. * sta.mod[5,2:n.census] - sta.q975 = 100. * sta.mod[6,2:n.census] + sta.expected = 100. * sta.mod[1,-1] + sta.q025 = 100. * sta.mod[2,-1] + sta.q975 = 100. * sta.mod[3,-1] ed2.mod = ed2[[ed2.rate]][[indiv[i]]]$global - ed2.median = 100. * ed2.mod[4,2:n.census] - ed2.q025 = 100. * ed2.mod[5,2:n.census] - ed2.q975 = 100. * ed2.mod[6,2:n.census] + ed2.expected = 100. * ed2.mod[1,-1] + ed2.q025 = 100. * ed2.mod[2,-1] + ed2.q975 = 100. * ed2.mod[3,-1] #------------------------------------------------------------------------------# @@ -2721,7 +2757,7 @@ for (place in myplaces){ #---------------------------------------------------------------------------# # Find the plot limit for the y scale. # #---------------------------------------------------------------------------# - yuse = c(sta.q025,sta.q975,ed2.median) + yuse = c(sta.q025,sta.q975,ed2.expected) ylimit = pretty.xylim(u=yuse,fracexp=scalleg,is.log=ylog) #---------------------------------------------------------------------------# }#end if @@ -2814,14 +2850,14 @@ for (place in myplaces){ #---------------------------------------------------------------------------# par(mar=c(5,4,4,2)+0.1) #----- Plotting window and grid. -------------------------------------------# - plot(x=x.years,y=sta.median,xlim=xlimit,ylim=ylimit,type="n",main=letitre + plot(x=x.years,y=sta.expected,xlim=xlimit,ylim=ylimit,type="n",main=letitre ,xlab=lex,ylab=ley,log=plog,cex.main=0.7) if (plotgrid) grid(col=grid.colour,lty="solid") #----- Plot the taxon rate with confidence interval. -----------------------# epolygon(x=plot.poly$x,y=plot.poly$y,col=plot.poly$col,angle=c(-45,45) ,density=40,lty="solid",lwd=1.0) - lines(x=x.years,y=sta.median,type="o",col=col.sta[1],pch=16,lwd=2.0) - lines(x=x.years,y=ed2.median,type="o",col=col.ed2[1],pch=16,lwd=2.0) + lines(x=x.years,y=sta.expected,type="o",col=col.sta[1],pch=16,lwd=2.0) + lines(x=x.years,y=ed2.expected,type="o",col=col.ed2[1],pch=16,lwd=2.0) #----- Close the device. ---------------------------------------------------# @@ -2862,13 +2898,13 @@ for (place in myplaces){ #----- Load the modelled rates. --------------------------------------------# sta.mod = sta[[sta.rate]][[indiv[i]]]$global - sta.median = 100. * sta.mod[4,,2:n.census] - sta.q025 = 100. * sta.mod[5,,2:n.census] - sta.q975 = 100. * sta.mod[6,,2:n.census] + sta.expected = 100. * sta.mod[1,,-1] + sta.q025 = 100. * sta.mod[2,,-1] + sta.q975 = 100. * sta.mod[3,,-1] ed2.mod = ed2[[ed2.rate]][[indiv[i]]]$global - ed2.median = 100. * ed2.mod[4,,2:n.census] - ed2.q025 = 100. * ed2.mod[5,,2:n.census] - ed2.q975 = 100. * ed2.mod[6,,2:n.census] + ed2.expected = 100. * ed2.mod[1,,-1] + ed2.q025 = 100. * ed2.mod[2,,-1] + ed2.q975 = 100. * ed2.mod[3,,-1] #---------------------------------------------------------------------------# @@ -3001,7 +3037,7 @@ for (place in myplaces){ #------------------------------------------------------------------# # Find the plot limit for the y scale. # #------------------------------------------------------------------# - yuse = c(ed2.median[d,],sta.q025[d,],sta.q975[d,]) + yuse = c(ed2.expected[d,],sta.q025[d,],sta.q975[d,]) ylimit = pretty.xylim(yuse,fracexp=0.0,is.log=ylog) #------------------------------------------------------------------# @@ -3037,9 +3073,9 @@ for (place in myplaces){ #----- Plot the taxon rate with confidence interval. -----------------# epolygon(x=size.poly$x,y=size.poly$y,col=size.poly$col,angle=c(-45,45) ,density=40,lty="solid",lwd=1.0) - lines(x=x.years,y=sta.median[d,],type="o",pch=16,lwd=2.0 + lines(x=x.years,y=sta.expected[d,],type="o",pch=16,lwd=2.0 ,col=col.sta[1]) - lines(x=x.years,y=ed2.median[d,],type="o",pch=16,lwd=2.0 + lines(x=x.years,y=ed2.expected[d,],type="o",pch=16,lwd=2.0 ,col=col.ed2[1]) #---------------------------------------------------------------------# }#end for (d in 1:n.dbh) diff --git a/ED/Template/Template/plot_daily.r b/ED/Template/Template/plot_daily.r index eb65751dc..175e5a667 100644 --- a/ED/Template/Template/plot_daily.r +++ b/ED/Template/Template/plot_daily.r @@ -1,6 +1,6 @@ #----- Here is the user-defined variable section. -----------------------------------------# here = "thispath" # Current directory. -srcdir = "/n/moorcroft_data/mlongo/util/Rsc" +srcdir = "thisrscpath" outroot = "thisoutroot" daybeg = thisdatea monthbeg = thismontha diff --git a/ED/Template/Template/plot_eval_ed.r b/ED/Template/Template/plot_eval_ed.r index 9040d9e31..c1d44f9cb 100644 --- a/ED/Template/Template/plot_eval_ed.r +++ b/ED/Template/Template/plot_eval_ed.r @@ -16,10 +16,10 @@ graphics.off() #----- Paths. -----------------------------------------------------------------------------# -here = "thispath" # Current directory. -there = "thatpath" # Directory where analyses/history are -srcdir = "/n/moorcroft_data/mlongo/util/Rsc" # Source directory. -outroot = "thisoutroot" # Directory for figures +here = "thispath" # Current directory. +there = "thatpath" # Directory where analyses/history are +srcdir = "thisrscpath" # Source directory. +outroot = "thisoutroot" # Directory for figures #------------------------------------------------------------------------------------------# diff --git a/ED/Template/Template/plot_fast.r b/ED/Template/Template/plot_fast.r index 0871cb651..f51959e29 100644 --- a/ED/Template/Template/plot_fast.r +++ b/ED/Template/Template/plot_fast.r @@ -1,6 +1,6 @@ #----- Here is the user-defined variable section. -----------------------------------------# -here = "thispath" # Current directory. -srcdir = "/n/moorcroft_data/mlongo/util/Rsc" +here = "thispath" # Current directory. +srcdir = "thisrscpath" outroot = "thisoutroot" frqsum = 3600. diff --git a/ED/Template/Template/plot_monthly.r b/ED/Template/Template/plot_monthly.r index b8810335f..ce29cda5d 100644 --- a/ED/Template/Template/plot_monthly.r +++ b/ED/Template/Template/plot_monthly.r @@ -15,10 +15,10 @@ graphics.off() #------------------------------------------------------------------------------------------# #----- Paths. -----------------------------------------------------------------------------# -here = "thispath" # Current directory. -there = "thatpath" # Directory where analyses/history are -srcdir = "/n/moorcroft_data/mlongo/util/Rsc" # Source directory. -outroot = "thisoutroot" # Directory for figures +here = "thispath" # Current directory. +there = "thatpath" # Directory where analyses/history are +srcdir = "thisrscpath" # Source directory. +outroot = "thisoutroot" # Directory for figures #------------------------------------------------------------------------------------------# @@ -87,6 +87,7 @@ slz.min = -5.0 # The deepest depth that trees access water. idbh.type = myidbhtype # Type of DBH class # 1 -- Every 10 cm until 100cm; > 100cm # 2 -- 0-10; 10-20; 20-35; 35-50; 50-70; > 70 (cm) +klight = myklight # Weighting factor for maximum carbon balance #------------------------------------------------------------------------------------------# @@ -372,145 +373,9 @@ for (place in myplaces){ #---------------------------------------------------------------------------------------# - # Here we find the monthly means for month, then compute the standard deviation. # - #---------------------------------------------------------------------------------------# - cat (" - Finding the monthly mean...","\n") - cat (" * Aggregating the monthly mean...","\n") - mmean = list() - mmean$fast.soil.c = tapply(X=emean$fast.soil.c ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$slow.soil.c = tapply(X=emean$slow.soil.c ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$struct.soil.c = tapply(X=emean$struct.soil.c,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$het.resp = tapply(X=emean$het.resp ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$cwd.resp = tapply(X=emean$cwd.resp ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$gpp = tapply(X=emean$gpp ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$npp = tapply(X=emean$npp ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$plant.resp = tapply(X=emean$plant.resp ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$leaf.resp = tapply(X=emean$leaf.resp ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$root.resp = tapply(X=emean$root.resp ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$growth.resp = tapply(X=emean$growth.resp ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$reco = tapply(X=emean$reco ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$mco = tapply(X=emean$mco ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$cba = tapply(X=emean$cba ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$cbalight = tapply(X=emean$cbalight ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$cbamoist = tapply(X=emean$cbamoist ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$cbarel = tapply(X=emean$cbarel ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$ldrop = tapply(X=emean$ldrop ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$nep = tapply(X=emean$nep ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$nee = tapply(X=emean$nee ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$cflxca = tapply(X=emean$cflxca ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$cflxst = tapply(X=emean$cflxst ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$ustar = tapply(X=emean$ustar ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$atm.vels = tapply(X=emean$atm.vels ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$atm.prss = tapply(X=emean$atm.prss ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$atm.temp = tapply(X=emean$atm.temp ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$atm.shv = tapply(X=emean$atm.shv ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$atm.vpd = tapply(X=emean$atm.vpd ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$atm.co2 = tapply(X=emean$atm.co2 ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$can.prss = tapply(X=emean$can.prss ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$can.temp = tapply(X=emean$can.temp ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$can.co2 = tapply(X=emean$can.co2 ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$can.shv = tapply(X=emean$can.shv ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$can.vpd = tapply(X=emean$can.vpd ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$gnd.temp = tapply(X=emean$gnd.temp ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$gnd.shv = tapply(X=emean$gnd.shv ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$leaf.temp = tapply(X=emean$leaf.temp ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$leaf.vpd = tapply(X=emean$leaf.vpd ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$wood.temp = tapply(X=emean$wood.temp ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$hflxca = tapply(X=emean$hflxca ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$qwflxca = tapply(X=emean$qwflxca ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$hflxgc = tapply(X=emean$hflxgc ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$hflxlc = tapply(X=emean$hflxlc ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$hflxwc = tapply(X=emean$hflxwc ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$wflxca = tapply(X=emean$wflxca ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$wflxgc = tapply(X=emean$wflxgc ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$wflxlc = tapply(X=emean$wflxlc ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$wflxwc = tapply(X=emean$wflxwc ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$evap = tapply(X=emean$evap ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$transp = tapply(X=emean$transp ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$et = tapply(X=emean$et ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$wue = tapply(X=emean$wue ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$rain = tapply(X=emean$rain ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$fs.open = tapply(X=emean$fs.open ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$rshort = tapply(X=emean$rshort ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$rshort.beam = tapply(X=emean$rshort.beam ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$rshort.diff = tapply(X=emean$rshort.diff ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$rshortup = tapply(X=emean$rshortup ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$rshort.gnd = tapply(X=emean$rshort.gnd ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$rlong = tapply(X=emean$rlong ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$rlong.gnd = tapply(X=emean$rlong.gnd ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$rlongup = tapply(X=emean$rlongup ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$par.tot = tapply(X=emean$par.tot ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$par.beam = tapply(X=emean$par.beam ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$par.diff = tapply(X=emean$par.diff ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$par.gnd = tapply(X=emean$par.gnd ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$parup = tapply(X=emean$parup ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$rnet = tapply(X=emean$rnet ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$albedo = tapply(X=emean$albedo ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$albedo.beam = tapply(X=emean$albedo.beam ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$albedo.diff = tapply(X=emean$albedo.diff ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$rlong.albedo = tapply(X=emean$rlong.albedo ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$nplant = tapply(X=emean$nplant ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$agb = tapply(X=emean$agb ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$lai = tapply(X=emean$lai ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$wai = tapply(X=emean$wai ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$tai = tapply(X=emean$tai ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$area = tapply(X=emean$area ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$workload = tapply(X=emean$workload ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$specwork = tapply(X=emean$specwork ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$demand = tapply(X=emean$demand ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$supply = tapply(X=emean$supply ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$paw = tapply(X=emean$paw ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$smpot = tapply(X=emean$smpot ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$leaf.gsw = tapply(X=emean$leaf.gsw ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$leaf.gbw = tapply(X=emean$leaf.gbw ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$wood.gbw = tapply(X=emean$wood.gbw ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$npat.global = tapply(X=emean$npat.global ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$ncoh.global = tapply(X=emean$ncoh.global ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$water.deficit = tapply(X=emean$water.deficit,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$i.gpp = tapply(X=emean$i.gpp ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$i.npp = tapply(X=emean$i.npp ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$i.plant.resp = tapply(X=emean$i.plant.resp ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$i.mco = tapply(X=emean$i.mco ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$i.cba = tapply(X=emean$i.cba ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$i.cbalight = tapply(X=emean$i.cbalight ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$i.cbamoist = tapply(X=emean$i.cbamoist ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$i.transp = tapply(X=emean$i.transp ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$i.wflxlc = tapply(X=emean$i.wflxlc ,INDEX=mfac,FUN=mean,na.rm=TRUE) - mmean$i.hflxlc = tapply(X=emean$i.hflxlc ,INDEX=mfac,FUN=mean,na.rm=TRUE) - #----- Soil variables. -----------------------------------------------------------------# - mmean$soil.temp = qapply(X=emean$soil.temp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - mmean$soil.water = qapply(X=emean$soil.water ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - mmean$soil.mstpot = qapply(X=emean$soil.mstpot ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - #----- Find the mean sum of squares. ---------------------------------------------------# - cat (" * Aggregating the monthly mean sum of squares...","\n") - mmsqu = list() - mmsqu$gpp = tapply(X=emsqu$gpp , INDEX=mfac,FUN=mean,na.rm=TRUE) - mmsqu$plant.resp = tapply(X=emsqu$plant.resp , INDEX=mfac,FUN=mean,na.rm=TRUE) - mmsqu$het.resp = tapply(X=emsqu$het.resp , INDEX=mfac,FUN=mean,na.rm=TRUE) - mmsqu$cwd.resp = tapply(X=emsqu$cwd.resp , INDEX=mfac,FUN=mean,na.rm=TRUE) - mmsqu$cflxca = tapply(X=emsqu$cflxca , INDEX=mfac,FUN=mean,na.rm=TRUE) - mmsqu$cflxst = tapply(X=emsqu$cflxst , INDEX=mfac,FUN=mean,na.rm=TRUE) - mmsqu$hflxca = tapply(X=emsqu$hflxca , INDEX=mfac,FUN=mean,na.rm=TRUE) - mmsqu$hflxlc = tapply(X=emsqu$hflxlc , INDEX=mfac,FUN=mean,na.rm=TRUE) - mmsqu$hflxwc = tapply(X=emsqu$hflxwc , INDEX=mfac,FUN=mean,na.rm=TRUE) - mmsqu$hflxgc = tapply(X=emsqu$hflxgc , INDEX=mfac,FUN=mean,na.rm=TRUE) - mmsqu$wflxca = tapply(X=emsqu$wflxca , INDEX=mfac,FUN=mean,na.rm=TRUE) - mmsqu$qwflxca = tapply(X=emsqu$qwflxca , INDEX=mfac,FUN=mean,na.rm=TRUE) - mmsqu$wflxlc = tapply(X=emsqu$wflxlc , INDEX=mfac,FUN=mean,na.rm=TRUE) - mmsqu$wflxwc = tapply(X=emsqu$wflxwc , INDEX=mfac,FUN=mean,na.rm=TRUE) - mmsqu$wflxgc = tapply(X=emsqu$wflxgc , INDEX=mfac,FUN=mean,na.rm=TRUE) - mmsqu$evap = tapply(X=emsqu$evap , INDEX=mfac,FUN=mean,na.rm=TRUE) - mmsqu$transp = tapply(X=emsqu$transp , INDEX=mfac,FUN=mean,na.rm=TRUE) - mmsqu$ustar = tapply(X=emsqu$ustar , INDEX=mfac,FUN=mean,na.rm=TRUE) - mmsqu$albedo = tapply(X=emsqu$albedo , INDEX=mfac,FUN=mean,na.rm=TRUE) - mmsqu$rshortup = tapply(X=emsqu$rshortup , INDEX=mfac,FUN=mean,na.rm=TRUE) - mmsqu$rlongup = tapply(X=emsqu$rlongup , INDEX=mfac,FUN=mean,na.rm=TRUE) - mmsqu$parup = tapply(X=emsqu$parup , INDEX=mfac,FUN=mean,na.rm=TRUE) - mmsqu$rnet = tapply(X=emsqu$rnet , INDEX=mfac,FUN=mean,na.rm=TRUE) - #---------------------------------------------------------------------------------------# - # Here we convert the sum of squares into standard deviation. The standard devi- # - # ation can be written in two different ways, and we will use the latter because it # - # doesn't require previous knowledge of the mean. # + # Find the mean and standard deviation. For variables for which we did not track # + # the mean sum of squares, the standard deviation is just the standard deviation of the # + # means, otherwise we convert the mean sum of squares: # # ____________________ _____________________________________ # # / SUM_i[X_i - Xm]^2 / / SUM_i[X_i^2] \ 1 # # sigma = \ / ------------------ = \ / | ------------ - Xm^2 | --------- # @@ -519,65 +384,45 @@ for (place in myplaces){ # srnonm1 is the square root of 1 / (1 - 1/N) # # Find the standard deviation. # #---------------------------------------------------------------------------------------# - cat (" * Finding the standard deviation...","\n") + cat (" - Finding the monthly means...","\n") + srnorm1 = sqrt(1./(1. - 1. / datum$montable)) srnorm1[!is.finite(srnorm1)] = 0. + mmean = list() msdev = list() - msdev$gpp = sqrt( mmsqu$gpp - mmean$gpp ^ 2 ) * srnorm1 - msdev$plant.resp = sqrt( mmsqu$plant.resp - mmean$plant.resp ^ 2 ) * srnorm1 - msdev$het.resp = sqrt( mmsqu$het.resp - mmean$het.resp ^ 2 ) * srnorm1 - msdev$cwd.resp = sqrt( mmsqu$cwd.resp - mmean$cwd.resp ^ 2 ) * srnorm1 - msdev$cflxca = sqrt( mmsqu$cflxca - mmean$cflxca ^ 2 ) * srnorm1 - msdev$cflxst = sqrt( mmsqu$cflxst - mmean$cflxst ^ 2 ) * srnorm1 - msdev$hflxca = sqrt( mmsqu$hflxca - mmean$hflxca ^ 2 ) * srnorm1 - msdev$hflxlc = sqrt( mmsqu$hflxlc - mmean$hflxlc ^ 2 ) * srnorm1 - msdev$hflxwc = sqrt( mmsqu$hflxwc - mmean$hflxwc ^ 2 ) * srnorm1 - msdev$hflxgc = sqrt( mmsqu$hflxgc - mmean$hflxgc ^ 2 ) * srnorm1 - msdev$wflxca = sqrt( mmsqu$wflxca - mmean$wflxca ^ 2 ) * srnorm1 - msdev$qwflxca = sqrt( mmsqu$qwflxca - mmean$qwflxca ^ 2 ) * srnorm1 - msdev$wflxlc = sqrt( mmsqu$wflxlc - mmean$wflxlc ^ 2 ) * srnorm1 - msdev$wflxwc = sqrt( mmsqu$wflxwc - mmean$wflxwc ^ 2 ) * srnorm1 - msdev$wflxgc = sqrt( mmsqu$wflxgc - mmean$wflxgc ^ 2 ) * srnorm1 - msdev$evap = sqrt( mmsqu$evap - mmean$evap ^ 2 ) * srnorm1 - msdev$transp = sqrt( mmsqu$transp - mmean$transp ^ 2 ) * srnorm1 - msdev$ustar = sqrt( mmsqu$ustar - mmean$ustar ^ 2 ) * srnorm1 - msdev$albedo = sqrt( mmsqu$albedo - mmean$albedo ^ 2 ) * srnorm1 - msdev$rshortup = sqrt( mmsqu$rshortup - mmean$rshortup ^ 2 ) * srnorm1 - msdev$rlongup = sqrt( mmsqu$rlongup - mmean$rlongup ^ 2 ) * srnorm1 - msdev$parup = sqrt( mmsqu$parup - mmean$parup ^ 2 ) * srnorm1 - msdev$rnet = sqrt( mmsqu$rnet - mmean$rnet ^ 2 ) * srnorm1 - #---------------------------------------------------------------------------------------# - # Set standard deviations that became NaN to 0. This usually happens when we run # - # the post-processing script when the simulation hasn't run for more than 2 years. We # - # can't find the standard deviation because the number of degrees of freedom becomes 0. # - #---------------------------------------------------------------------------------------# - msdev$gpp [! is.finite(msdev$gpp )] = 0. - msdev$plant.resp [! is.finite(msdev$plant.resp)] = 0. - msdev$leaf.resp [! is.finite(msdev$leaf.resp )] = 0. - msdev$root.resp [! is.finite(msdev$root.resp )] = 0. - msdev$het.resp [! is.finite(msdev$het.resp )] = 0. - msdev$cwd.resp [! is.finite(msdev$cwd.resp )] = 0. - msdev$cflxca [! is.finite(msdev$cflxca )] = 0. - msdev$cflxst [! is.finite(msdev$cflxst )] = 0. - msdev$hflxca [! is.finite(msdev$hflxca )] = 0. - msdev$hflxlc [! is.finite(msdev$hflxlc )] = 0. - msdev$hflxwc [! is.finite(msdev$hflxwc )] = 0. - msdev$hflxgc [! is.finite(msdev$hflxgc )] = 0. - msdev$wflxca [! is.finite(msdev$wflxca )] = 0. - msdev$qwflxca [! is.finite(msdev$qwflxca )] = 0. - msdev$wflxlc [! is.finite(msdev$wflxlc )] = 0. - msdev$wflxwc [! is.finite(msdev$wflxwc )] = 0. - msdev$wflxgc [! is.finite(msdev$wflxgc )] = 0. - msdev$transp [! is.finite(msdev$transp )] = 0. - msdev$ustar [! is.finite(msdev$ustar )] = 0. - msdev$albedo [! is.finite(msdev$albedo )] = 0. - msdev$rshortup [! is.finite(msdev$rshortup )] = 0. - msdev$rlongup [! is.finite(msdev$rlongup )] = 0. - msdev$parup [! is.finite(msdev$parup )] = 0. - msdev$rnet [! is.finite(msdev$rnet )] = 0. - #---------------------------------------------------------------------------------------# - # Estimate the standard deviation of NEE, REco, and evaporation. # + for (vname in names(emean)){ + + #------------------------------------------------------------------------------------# + # Soil variables are multi-dimensional. Use qapply. Otherwise, check whether # + # the mean sum of squares is available or not. # + #------------------------------------------------------------------------------------# + if (vname %in% c("soil.temp","soil.water","soil.mstpot")){ + mmean[[vname]] = qapply(X=emean[[vname]], INDEX=mfac, DIM=1, FUN=mean, na.rm=TRUE) + msdev[[vname]] = qapply(X=emean[[vname]], INDEX=mfac, DIM=1, FUN=sd , na.rm=TRUE) + }else if (vname %in% names(emsqu)){ + mmean[[vname]] = tapply(X=emean[[vname]], INDEX=mfac, FUN=mean, na.rm=TRUE) + mmsqu = tapply(X=emsqu[[vname]], INDEX=mfac, FUN=mean, na.rm=TRUE) + msdev[[vname]] = sqrt ( mmsqu - mmean[[vname]]^ 2 ) * srnorm1 + }else{ + mmean[[vname]] = tapply(X=emean[[vname]], INDEX=mfac, FUN=mean, na.rm=TRUE) + msdev[[vname]] = tapply(X=emean[[vname]], INDEX=mfac, FUN=sd , na.rm=TRUE) + }#end if + #------------------------------------------------------------------------------------# + + + #----- Fix the bad data. ------------------------------------------------------------# + bad.mmean = ! is.finite(mmean[[vname]]) + bad.msdev = ! is.finite(msdev[[vname]]) + mmean[[vname]][bad.mmean] = NA + msdev[[vname]][bad.msdev] = 0. + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Overwrite the standard deviation of NEE, REco, and evaporation. # #---------------------------------------------------------------------------------------# msdev$nee = sqrt(msdev$cflxca^2 + msdev$cflxst^2 ) msdev$reco = sqrt(msdev$plant.resp^2 + msdev$het.resp^2 ) @@ -585,172 +430,45 @@ for (place in myplaces){ #---------------------------------------------------------------------------------------# + + #---------------------------------------------------------------------------------------# # Here we find the Mean diurnal cycle for each month, then compute the standard # - # deviation. # + # deviation, similar to the monthly mean. # #---------------------------------------------------------------------------------------# cat (" - Aggregating the monthly mean of the diurnal cycle...","\n") umean = list() - umean$gpp = qapply(X=qmean$gpp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$npp = qapply(X=qmean$npp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$plant.resp = qapply(X=qmean$plant.resp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$leaf.resp = qapply(X=qmean$leaf.resp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$root.resp = qapply(X=qmean$root.resp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$growth.resp = qapply(X=qmean$growth.resp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$het.resp = qapply(X=qmean$het.resp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$cwd.resp = qapply(X=qmean$cwd.resp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$nep = qapply(X=qmean$nep ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$nee = qapply(X=qmean$nee ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$reco = qapply(X=qmean$reco ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$cflxca = qapply(X=qmean$cflxca ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$cflxst = qapply(X=qmean$cflxst ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$hflxca = qapply(X=qmean$hflxca ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$hflxlc = qapply(X=qmean$hflxlc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$hflxwc = qapply(X=qmean$hflxwc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$hflxgc = qapply(X=qmean$hflxgc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$qwflxca = qapply(X=qmean$qwflxca ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$wflxca = qapply(X=qmean$wflxca ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$wflxlc = qapply(X=qmean$wflxlc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$wflxwc = qapply(X=qmean$wflxwc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$wflxgc = qapply(X=qmean$wflxgc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$evap = qapply(X=qmean$evap ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$transp = qapply(X=qmean$transp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$atm.temp = qapply(X=qmean$atm.temp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$can.temp = qapply(X=qmean$can.temp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$leaf.temp = qapply(X=qmean$leaf.temp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$wood.temp = qapply(X=qmean$wood.temp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$gnd.temp = qapply(X=qmean$gnd.temp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$atm.shv = qapply(X=qmean$atm.shv ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$can.shv = qapply(X=qmean$can.shv ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$gnd.shv = qapply(X=qmean$gnd.shv ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$atm.vpd = qapply(X=qmean$atm.vpd ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$can.vpd = qapply(X=qmean$can.vpd ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$leaf.vpd = qapply(X=qmean$leaf.vpd ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$atm.co2 = qapply(X=qmean$atm.co2 ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$can.co2 = qapply(X=qmean$can.co2 ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$atm.prss = qapply(X=qmean$atm.prss ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$can.prss = qapply(X=qmean$can.prss ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$atm.vels = qapply(X=qmean$atm.vels ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$ustar = qapply(X=qmean$ustar ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$fs.open = qapply(X=qmean$fs.open ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$rain = qapply(X=qmean$rain ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$rshort = qapply(X=qmean$rshort ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$rshort.beam = qapply(X=qmean$rshort.beam ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$rshort.diff = qapply(X=qmean$rshort.diff ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$rshort.gnd = qapply(X=qmean$rshort.gnd ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$rshortup = qapply(X=qmean$rshortup ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$rlong = qapply(X=qmean$rlong ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$rlong.gnd = qapply(X=qmean$rlong.gnd ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$rlongup = qapply(X=qmean$rlongup ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$par.tot = qapply(X=qmean$par.tot ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$par.beam = qapply(X=qmean$par.beam ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$par.diff = qapply(X=qmean$par.diff ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$par.gnd = qapply(X=qmean$par.gnd ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$parup = qapply(X=qmean$parup ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$rnet = qapply(X=qmean$rnet ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$albedo = qapply(X=qmean$albedo ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$albedo.beam = qapply(X=qmean$albedo.beam ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$albedo.diff = qapply(X=qmean$albedo.diff ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$rlong.albedo = qapply(X=qmean$rlong.albedo ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$leaf.gsw = qapply(X=qmean$leaf.gsw ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$leaf.gbw = qapply(X=qmean$leaf.gbw ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umean$wood.gbw = qapply(X=qmean$wood.gbw ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - #----- Find the mean sum of squares. ---------------------------------------------------# - cat (" - Aggregating the monthly mean sum of squares...","\n") - umsqu = list() - umsqu$gpp = qapply(X=qmsqu$gpp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umsqu$npp = qapply(X=qmsqu$npp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umsqu$plant.resp = qapply(X=qmsqu$plant.resp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umsqu$het.resp = qapply(X=qmsqu$het.resp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umsqu$cwd.resp = qapply(X=qmsqu$cwd.resp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umsqu$nep = qapply(X=qmsqu$nep ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umsqu$cflxca = qapply(X=qmsqu$cflxca ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umsqu$cflxst = qapply(X=qmsqu$cflxst ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umsqu$hflxca = qapply(X=qmsqu$hflxca ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umsqu$hflxlc = qapply(X=qmsqu$hflxlc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umsqu$hflxwc = qapply(X=qmsqu$hflxwc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umsqu$hflxgc = qapply(X=qmsqu$hflxgc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umsqu$qwflxca = qapply(X=qmsqu$qwflxca ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umsqu$wflxca = qapply(X=qmsqu$wflxca ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umsqu$wflxlc = qapply(X=qmsqu$wflxlc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umsqu$wflxwc = qapply(X=qmsqu$wflxwc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umsqu$wflxgc = qapply(X=qmsqu$wflxgc ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umsqu$transp = qapply(X=qmsqu$transp ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umsqu$ustar = qapply(X=qmsqu$ustar ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umsqu$albedo = qapply(X=qmsqu$albedo ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umsqu$rshortup = qapply(X=qmsqu$rshortup ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umsqu$rlongup = qapply(X=qmsqu$rlongup ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umsqu$parup = qapply(X=qmsqu$parup ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - umsqu$rnet = qapply(X=qmsqu$rnet ,INDEX=mfac,DIM=1,FUN=mean,na.rm=TRUE) - #---------------------------------------------------------------------------------------# - # Here we convert the sum of squares into standard deviation. The standard devi- # - # ation can be written in two different ways, and we will use the latter because it # - # doesn't require previous knowledge of the mean. # - # ____________________ _____________________________________ # - # / SUM_i[X_i - Xm]^2 / / SUM_i[X_i^2] \ 1 # - # sigma = \ / ------------------ = \ / | ------------ - Xm^2 | --------- # - # \/ N - 1 \/ \ N / 1 - 1/N # - # # - # srnonm1 is the square root of 1 / (1 - 1/N) # - # Find the standard deviation. # - #---------------------------------------------------------------------------------------# - cat (" - Finding the standard deviation...","\n") - srnorm1 = sqrt(1./(1. - 1. / datum$moncnt)) - srnorm1[!is.finite(srnorm1)] = 0. usdev = list() - usdev$gpp = sqrt(umsqu$gpp - umean$gpp ^ 2) * srnorm1 - usdev$npp = sqrt(umsqu$npp - umean$npp ^ 2) * srnorm1 - usdev$plant.resp = sqrt(umsqu$plant.resp - umean$plant.resp ^ 2) * srnorm1 - usdev$het.resp = sqrt(umsqu$het.resp - umean$het.resp ^ 2) * srnorm1 - usdev$cwd.resp = sqrt(umsqu$cwd.resp - umean$cwd.resp ^ 2) * srnorm1 - usdev$nep = sqrt(umsqu$nep - umean$nep ^ 2) * srnorm1 - usdev$cflxca = sqrt(umsqu$cflxca - umean$cflxca ^ 2) * srnorm1 - usdev$cflxst = sqrt(umsqu$cflxst - umean$cflxst ^ 2) * srnorm1 - usdev$hflxca = sqrt(umsqu$hflxca - umean$hflxca ^ 2) * srnorm1 - usdev$hflxlc = sqrt(umsqu$hflxlc - umean$hflxlc ^ 2) * srnorm1 - usdev$hflxwc = sqrt(umsqu$hflxwc - umean$hflxwc ^ 2) * srnorm1 - usdev$hflxgc = sqrt(umsqu$hflxgc - umean$hflxgc ^ 2) * srnorm1 - usdev$qwflxca = sqrt(umsqu$qwflxca - umean$qwflxca ^ 2) * srnorm1 - usdev$wflxca = sqrt(umsqu$wflxca - umean$wflxca ^ 2) * srnorm1 - usdev$wflxlc = sqrt(umsqu$wflxlc - umean$wflxlc ^ 2) * srnorm1 - usdev$wflxwc = sqrt(umsqu$wflxwc - umean$wflxwc ^ 2) * srnorm1 - usdev$wflxgc = sqrt(umsqu$wflxgc - umean$wflxgc ^ 2) * srnorm1 - usdev$transp = sqrt(umsqu$transp - umean$transp ^ 2) * srnorm1 - usdev$ustar = sqrt(umsqu$ustar - umean$ustar ^ 2) * srnorm1 - usdev$albedo = sqrt(umsqu$albedo - umean$albedo ^ 2) * srnorm1 - usdev$rshortup = sqrt(umsqu$rshortup - umean$rshortup ^ 2) * srnorm1 - usdev$rlongup = sqrt(umsqu$rlongup - umean$rlongup ^ 2) * srnorm1 - usdev$parup = sqrt(umsqu$parup - umean$parup ^ 2) * srnorm1 - usdev$rnet = sqrt(umsqu$rnet - umean$rnet ^ 2) * srnorm1 - #---------------------------------------------------------------------------------------# - # Set standard deviations that became NaN to 0. This usually happens when we run # - # the post-processing script when the simulation hasn't run for more than 2 years. We # - # can't find the standard deviation because the number of degrees of freedom becomes 0. # - #---------------------------------------------------------------------------------------# - usdev$gpp [! is.finite(usdev$gpp )] = 0.0 - usdev$npp [! is.finite(usdev$npp )] = 0.0 - usdev$plant.resp [! is.finite(usdev$plant.resp )] = 0.0 - usdev$het.resp [! is.finite(usdev$het.resp )] = 0.0 - usdev$cwd.resp [! is.finite(usdev$cwd.resp )] = 0.0 - usdev$nep [! is.finite(usdev$nep )] = 0.0 - usdev$cflxca [! is.finite(usdev$cflxca )] = 0.0 - usdev$cflxst [! is.finite(usdev$cflxst )] = 0.0 - usdev$hflxca [! is.finite(usdev$hflxca )] = 0.0 - usdev$hflxlc [! is.finite(usdev$hflxlc )] = 0.0 - usdev$hflxwc [! is.finite(usdev$hflxwc )] = 0.0 - usdev$hflxgc [! is.finite(usdev$hflxgc )] = 0.0 - usdev$qwflxca [! is.finite(usdev$qwflxca )] = 0.0 - usdev$wflxca [! is.finite(usdev$wflxca )] = 0.0 - usdev$wflxlc [! is.finite(usdev$wflxlc )] = 0.0 - usdev$wflxwc [! is.finite(usdev$wflxwc )] = 0.0 - usdev$wflxgc [! is.finite(usdev$wflxgc )] = 0.0 - usdev$transp [! is.finite(usdev$transp )] = 0.0 - usdev$ustar [! is.finite(usdev$ustar )] = 0.0 - usdev$albedo [! is.finite(usdev$albedo )] = 0.0 - usdev$rshortup [! is.finite(usdev$rshortup )] = 0.0 - usdev$rlongup [! is.finite(usdev$rlongup )] = 0.0 - usdev$parup [! is.finite(usdev$parup )] = 0.0 - usdev$rnet [! is.finite(usdev$rnet )] = 0.0 + for (vname in names(qmean)){ + + #------------------------------------------------------------------------------------# + # Soil variables are multi-dimensional. Use qapply. Otherwise, check whether # + # the mean sum of squares is available or not. # + #------------------------------------------------------------------------------------# + if (vname %in% names(qmsqu)){ + umean[[vname]] = qapply(X=qmean[[vname]], INDEX=mfac, DIM=1,FUN=mean, na.rm=TRUE) + umsqu = qapply(X=qmsqu[[vname]], INDEX=mfac, DIM=1,FUN=mean, na.rm=TRUE) + usdev[[vname]] = sqrt ( umsqu - umean[[vname]]^ 2 ) * srnorm1 + }else{ + umean[[vname]] = qapply(X=qmean[[vname]], INDEX=mfac, DIM=1,FUN=mean, na.rm=TRUE) + usdev[[vname]] = qapply(X=qmean[[vname]], INDEX=mfac, DIM=1,FUN=sd , na.rm=TRUE) + }#end if + #------------------------------------------------------------------------------------# + + + #----- Fix the bad data. ------------------------------------------------------------# + bad.umean = ! is.finite(umean[[vname]]) + bad.usdev = ! is.finite(usdev[[vname]]) + umean[[vname]][bad.umean] = NA + usdev[[vname]][bad.usdev] = 0. + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# # Estimate NPP and NEE standard deviation. # #---------------------------------------------------------------------------------------# @@ -766,51 +484,7 @@ for (place in myplaces){ # at any given time. # #---------------------------------------------------------------------------------------# empty = szpft$nplant == 0 - szpft$agb [empty] = NA - szpft$lai [empty] = NA - szpft$wai [empty] = NA - szpft$tai [empty] = NA - szpft$ba [empty] = NA - szpft$gpp [empty] = NA - szpft$npp [empty] = NA - szpft$plant.resp [empty] = NA - szpft$mco [empty] = NA - szpft$cba [empty] = NA - szpft$cbalight [empty] = NA - szpft$cbamoist [empty] = NA - szpft$cbarel [empty] = NA - szpft$ldrop [empty] = NA - szpft$fs.open [empty] = NA - szpft$leaf.gbw [empty] = NA - szpft$leaf.gsw [empty] = NA - szpft$wood.gbw [empty] = NA - szpft$demand [empty] = NA - szpft$supply [empty] = NA - szpft$nplant [empty] = NA - szpft$mort [empty] = NA - szpft$dimort [empty] = NA - szpft$ncbmort [empty] = NA - szpft$growth [empty] = NA - szpft$bdead [empty] = NA - szpft$bleaf [empty] = NA - szpft$broot [empty] = NA - szpft$bsapwood [empty] = NA - szpft$bstorage [empty] = NA - szpft$bseeds [empty] = NA - szpft$hflxlc [empty] = NA - szpft$wflxlc [empty] = NA - szpft$transp [empty] = NA - szpft$wue [empty] = NA - szpft$i.gpp [empty] = NA - szpft$i.npp [empty] = NA - szpft$i.plant.resp [empty] = NA - szpft$i.mco [empty] = NA - szpft$i.cba [empty] = NA - szpft$i.cbalight [empty] = NA - szpft$i.cbamoist [empty] = NA - szpft$i.transp [empty] = NA - szpft$i.wflxlc [empty] = NA - szpft$i.hflxlc [empty] = NA + for (vname in names(szpft)) szpft[[vname]][empty] = NA #---------------------------------------------------------------------------------------# diff --git a/ED/Template/Template/plot_photo.r b/ED/Template/Template/plot_photo.r index 741588b37..2d3aead5f 100644 --- a/ED/Template/Template/plot_photo.r +++ b/ED/Template/Template/plot_photo.r @@ -1,6 +1,6 @@ #----- Here is the user-defined variable section. -----------------------------------------# -here = "thispath" # Current directory. -srcdir = "/n/moorcroft_data/mlongo/util/Rsc" # Source directory. +here = "thispath" # Current directory. +srcdir = "thisrscpath" # Source directory. outroot = "thisoutroot" # Source directory. myplaces = c("thispoly") iphoto = myphysiol diff --git a/ED/Template/Template/plot_povray.r b/ED/Template/Template/plot_povray.r index 54595c63d..58ec7d53a 100644 --- a/ED/Template/Template/plot_povray.r +++ b/ED/Template/Template/plot_povray.r @@ -15,10 +15,10 @@ graphics.off() #------------------------------------------------------------------------------------------# #----- Paths. -----------------------------------------------------------------------------# -here = "thispath" # Current directory. -there = "thatpath" # Directory where analyses/history are -srcdir = "/n/moorcroft_data/mlongo/util/Rsc" # Source directory. -outroot = "thisoutroot" # Directory for figures +here = "thispath" # Current directory. +there = "thatpath" # Directory where analyses/history are +srcdir = "thisrscpath" # Source directory. +outroot = "thisoutroot" # Directory for figures #------------------------------------------------------------------------------------------# @@ -52,6 +52,8 @@ slz.min = -5.0 # The deepest depth that trees access water. idbh.type = myidbhtype # Type of DBH class # 1 -- Every 10 cm until 100cm; > 100cm # 2 -- 0-10; 10-20; 20-35; 35-50; 50-70; > 70 (cm) + # 3 -- 0-10; 10-35; 35-70; > 70 (cm) +klight = myklight # Weighting factor for maximum carbon balance #------------------------------------------------------------------------------------------# @@ -394,7 +396,7 @@ for (place in myplaces){ }else if (ibackground == 1){ pigment = " pigment { color rgb <1. ,1. ,1. >} " }else if (ibackground == 2){ - pigment = " pigment { color rgb <0.9,0.9,0.9>} " + pigment = " pigment { color rgb <1. ,1. ,1. >} " }#end if #------------------------------------------------------------------------------------# @@ -411,7 +413,8 @@ for (place in myplaces){ povtitle = rbind( povtitle , "//----- The header. --------------------------------//" , paste("text { ttf \"cyrvetic.ttf\" \"",lesim[n],"\" 5,0",sep="") - , pigment + , pigment + , " finish{ ambient 1.0 diffuse 0.0}" , " scale < 12.0, 12.0, 0.1>" , " rotate < 28.8, 0.0, 0.0>" , " rotate < 0.0, 45.0, 0.0>" @@ -425,6 +428,7 @@ for (place in myplaces){ povstamp = rbind( "//----- The time stamp. ----------------------------//" , paste("text { ttf \"cyrvetic.ttf\" \"",pcwhen,"\" 5,0",sep="") , pigment + , " finish{ ambient 1.0 diffuse 0.0}" , " scale < 12.0, 12.0, 0.1>" , " rotate < 28.8, 0.0, 0.0>" , " rotate < 0.0, 45.0, 0.0>" diff --git a/ED/Template/Template/plot_rk4.r b/ED/Template/Template/plot_rk4.r index e54782937..20bfa4731 100644 --- a/ED/Template/Template/plot_rk4.r +++ b/ED/Template/Template/plot_rk4.r @@ -1,6 +1,6 @@ #----- Here is the user-defined variable section. -----------------------------------------# -here = "thispath" # Current directory. -srcdir = "/n/moorcroft_data/mlongo/util/Rsc" # Source directory. +here = "thispath" # Current directory. +srcdir = "thisrscpath" # Source directory. outroot = "thisoutroot" # Source directory. myplaces = c("thispoly") #------------------------------------------------------------------------------------------# diff --git a/ED/Template/Template/plot_rk4pc.r b/ED/Template/Template/plot_rk4pc.r index cf0ea0f14..780fb2c34 100644 --- a/ED/Template/Template/plot_rk4pc.r +++ b/ED/Template/Template/plot_rk4pc.r @@ -1,6 +1,6 @@ #----- Here is the user-defined variable section. -----------------------------------------# -here = "thispath" # Current directory. -srcdir = "/n/moorcroft_data/mlongo/util/Rsc" # Source directory. +here = "thispath" # Current directory. +srcdir = "thisrscpath" # Source directory. outroot = "thisoutroot" # Source directory. myplaces = c("thispoly") #------------------------------------------------------------------------------------------# diff --git a/ED/Template/Template/plot_ycomp.r b/ED/Template/Template/plot_ycomp.r index 967b981fa..a5e1f9116 100644 --- a/ED/Template/Template/plot_ycomp.r +++ b/ED/Template/Template/plot_ycomp.r @@ -17,7 +17,7 @@ graphics.off() #----- Paths. -----------------------------------------------------------------------------# here = "thispath" # Current directory. there = "thatpath" # Directory where analyses/history are -srcdir = "/n/moorcroft_data/mlongo/util/Rsc" # Source directory. +srcdir = "thisrscpath" # Source directory. outroot = "thisoutroot" #------------------------------------------------------------------------------------------# @@ -26,6 +26,9 @@ outroot = "thisoutroot" monthbeg = thismontha yearbeg = thisyeara # First year to consider yearend = thisyearz # Maximum year to consider +use.trim = myefttrim # Use only a sub-set of years (TRUE/FALSE) +year.trima = myeftyeara # First year of the sub-set +year.trimz = myeftyearz # Last year of the sub-set season.mona = thisseasonmona # First month for year by year comparison reload.data = TRUE # Should I reload partially loaded data? sasmonth.short = c(2,5,8,11) # Months for SAS plots (short runs) @@ -81,6 +84,7 @@ slz.min = -5.0 # The deepest depth that trees access water. idbh.type = myidbhtype # Type of DBH class # 1 -- Every 10 cm until 100cm; > 100cm # 2 -- 0-10; 10-20; 20-35; 35-50; 50-70; > 70 (cm) +klight = myklight # Weighting factor for maximum carbon balance #------------------------------------------------------------------------------------------# @@ -190,7 +194,7 @@ for (place in myplaces){ # Make the RData file name, then we check whether we must read the files again # # or use the stored RData. # #---------------------------------------------------------------------------------------# - path.data = paste(here,place,"rdata_ycomp",sep="/") + path.data = paste(here,place,"rdata_month",sep="/") if (! file.exists(path.data)) dir.create(path.data) ed22.rdata = paste(path.data,paste(place,"RData",sep="."),sep="/") if (reload.data && file.exists(ed22.rdata)){ @@ -286,18 +290,25 @@ for (place in myplaces){ # Create a list with unique years. # #---------------------------------------------------------------------------------------# print (paste(" - Finding the years and seasons...",sep="")) + if (use.trim){ + sel.trim = datum$toyear %in% seq(from=year.trima,to=year.trimz,by=1) + }else{ + sel.trim = datum$toyear > -Inf + }#end if + year.use = datum$toyear[sel.trim] + if (season.mona == 1){ - nyears = length(datum$toyear) + 1 - year4 = c(datum$toyear,2*datum$toyear[nyears-1] - datum$toyear[nyears-2]) + nyears = length(year.use) + 1 + year4 = c(year.use,2*year.use[nyears-1] - year.use[nyears-2]) }else{ - nyears = length(datum$toyear) - year4 = datum$toyear + nyears = length(year.use) + year4 = year.use }#end if year.desc = paste(year4-c(diff(year4)[1],diff(year4)),year4,sep="-") year.col = eft.col[match(year4,eft.year)] #----- Year for seasonal means. --------------------------------------------------------# - yr3mon = datum$toyear - nyr3mon = length(yr3mon) + yr3mon = year.use + nyr3mon = length(yr3mon) yr3mon.desc = paste("Dec",sprintf("%2.2i" ,(yr3mon-c(diff(yr3mon)[1],diff(yr3mon))) %% 100 ) ,"-Nov",sprintf("%2.2i",yr3mon %% 100),sep="") @@ -377,11 +388,7 @@ for (place in myplaces){ #------------------------------------------------------------------------------# }#end for #----- Make a dummy limit in case everything is empty. ---------------------------# - if (is.null(ylimit)){ - ylimit = c(-1,1) - }else{ - ylimit[2] = ylimit[2] + scalleg * (ylimit[2] - ylimit[1]) - }#end if + if (is.null(ylimit)) ylimit = c(-1,1) #---------------------------------------------------------------------------------# #---------------------------------------------------------------------------------# @@ -417,9 +424,22 @@ for (place in myplaces){ par(par.user) - plot(x=outplot[[2]]$x,y=outplot[[2]]$y,type="n",main=letitre,xlab=lex,ylab=ley - ,ylim=ylimit,cex.main=cex.main,xaxt="n") + par(oma=c(0,0,0,0)) + layout (mat=rbind(2,1),heights=c(5,1)) + + par(mar=c(0.1,4.1,0.1,2.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + legend(x="bottom",legend=year.desc[-1] + ,lwd=2.5,col=year.col[-1],title="Period",cex=0.9,ncol=4) + + par(mar=c(3.1,4.1,4.1,2.1)) + plot.new() + plot.window(xlim=range(outplot[[2]]$x),ylim=ylimit) + title(main=letitre,xlab=lex,ylab=ley,cex.main=0.8) axis(side=1,at=whenplot$levels,labels=whenplot$labels,padj=whenplot$padj) + axis(side=2) + box() if (plotgrid){ abline(v=whenplot$levels,h=axTicks(side=2),col=grid.colour,lty="solid") }#end if @@ -427,8 +447,6 @@ for (place in myplaces){ lines(x=outplot[[y]]$x,y=outplot[[y]]$y,type=plttype,pch=16,cex=1.0 ,lwd=2.5,col=year.col[y]) }#end for - legend(x="topleft",inset=0.01,legend=year.desc[2:nyears] - ,lwd=2.5,col=year.col[2:nyears],title="Period",cex=0.9,ncol=3) #----- Close the device. ------------------------------------------------------# @@ -477,28 +495,9 @@ for (place in myplaces){ , byrow = TRUE )#end matrix if (vname == "rain"){ - ylimit = c(0,1.25 * max(season.vec,na.rm=TRUE)) + ylimit = c(0,max(season.vec,na.rm=TRUE)) }else{ - yl.try = range(season.vec,na.rm=TRUE) - if (any(! is.finite(yl.try)) || ( yl.try[1] == yl.try[2] && yl.try[1] == 0)){ - ylimit = c(-1,1) - leg.pos = "topright" - }else if (yl.try[1] == yl.try[2]){ - ylimit = yl.try - ylimit[1] = yl.try[1] - 0.30 * abs(yl.try[1]) - ylimit[2] = yl.try[2] + 0.30 * abs(yl.try[2]) - leg.pos = "topright" - }else if(yl.try[2] > 0){ - ylimit = yl.try - ylimit[1] = yl.try[1] - 0.05 * (yl.try[2] - yl.try[1]) - ylimit[2] = yl.try[2] + 0.40 * (yl.try[2] - yl.try[1]) - leg.pos = "topright" - }else{ - ylimit = yl.try - ylimit[1] = yl.try[1] - 0.40 * (yl.try[2] - yl.try[1]) - ylimit[2] = yl.try[2] + 0.05 * (yl.try[2] - yl.try[1]) - leg.pos = "bottomright" - }#end if + ylimit = pretty.xylim(u=season.vec,fracexp=0.0,is.log=FALSE) }#end if #---------------------------------------------------------------------------------# @@ -527,12 +526,19 @@ for (place in myplaces){ par(par.user) + layout (mat=rbind(2,1),heights=c(5,1)) + par(mar=c(0.1,4.1,0.1,2.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + legend(x="bottom",inset=0.0,legend=yr3mon.desc,fill=yr3mon.col + ,title="Period",cex=0.9,ncol=2) + + + par(mar=c(3.1,4.1,4.1,2.1)) barplot(season.mat,col=yr3mon.col,main=letitre,xlab=lex,ylab=ley ,cex.main=cex.main,ylim=ylimit,legend.text=FALSE,beside=TRUE ,border=grey.fg,xpd=FALSE) box() - legend(x=leg.pos,inset=0.01,legend=yr3mon.desc,fill=yr3mon.col - ,title="Period",cex=0.9,ncol=2) #----- Close the device. ------------------------------------------------------# diff --git a/ED/Template/Template/plot_yearly.r b/ED/Template/Template/plot_yearly.r index aaa47a349..6992211f0 100644 --- a/ED/Template/Template/plot_yearly.r +++ b/ED/Template/Template/plot_yearly.r @@ -15,10 +15,10 @@ graphics.off() #------------------------------------------------------------------------------------------# #----- Paths. -----------------------------------------------------------------------------# -here = "thispath" # Current directory. -there = "thatpath" # Directory where analyses/history are -srcdir = "/n/moorcroft_data/mlongo/util/Rsc" # Source directory. -outroot = "thisoutroot" # Directory for figures +here = "thispath" # Current directory. +there = "thatpath" # Directory where analyses/history are +srcdir = "thisrscpath" # Source directory. +outroot = "thisoutroot" # Directory for figures #------------------------------------------------------------------------------------------# @@ -77,6 +77,7 @@ slz.min = -5.0 # The deepest depth that trees access water. idbh.type = myidbhtype # Type of DBH class # 1 -- Every 10 cm until 100cm; > 100cm # 2 -- 0-10; 10-20; 20-35; 35-50; 50-70; > 70 (cm) +klight = myklight # Weighting factor for maximum carbon balance #------------------------------------------------------------------------------------------# @@ -380,49 +381,7 @@ for (place in myplaces){ # at any given time. # #---------------------------------------------------------------------------------------# empty = szpft$nplant == 0 - szpft$agb [empty] = NA - szpft$basarea [empty] = NA - szpft$lai [empty] = NA - szpft$wai [empty] = NA - szpft$tai [empty] = NA - szpft$gpp [empty] = NA - szpft$npp [empty] = NA - szpft$mco [empty] = NA - szpft$cba [empty] = NA - szpft$cbalight [empty] = NA - szpft$cbamoist [empty] = NA - szpft$cbal12light [empty] = NA - szpft$cbal12moist [empty] = NA - szpft$cbarel [empty] = NA - szpft$ldrop [empty] = NA - szpft$fso [empty] = NA - szpft$demand [empty] = NA - szpft$supply [empty] = NA - szpft$mort [empty] = NA - szpft$agemort [empty] = NA - szpft$ncbmort [empty] = NA - szpft$tfallmort [empty] = NA - szpft$coldmort [empty] = NA - szpft$distmort [empty] = NA - szpft$growth [empty] = NA - szpft$plresp [empty] = NA - szpft$bstore [empty] = NA - szpft$hflxlc [empty] = NA - szpft$wflxlc [empty] = NA - szpft$transp [empty] = NA - szpft$i.gpp [empty] = NA - szpft$i.npp [empty] = NA - szpft$i.plresp [empty] = NA - szpft$i.mco [empty] = NA - szpft$i.cba [empty] = NA - szpft$i.cbalight [empty] = NA - szpft$i.cbamoist [empty] = NA - szpft$i.cbal12light[empty] = NA - szpft$i.cbal12moist[empty] = NA - szpft$i.transp [empty] = NA - szpft$i.wflxlc [empty] = NA - szpft$i.hflxlc [empty] = NA - szpft$nplant [empty] = NA + for (vname in names(szpft)) szpft[[vname]][empty] = NA #---------------------------------------------------------------------------------------# diff --git a/ED/Template/Template/read_monthly.r b/ED/Template/Template/read_monthly.r index 2348267ad..8959ad75d 100644 --- a/ED/Template/Template/read_monthly.r +++ b/ED/Template/Template/read_monthly.r @@ -15,9 +15,9 @@ graphics.off() #------------------------------------------------------------------------------------------# #----- Paths. -----------------------------------------------------------------------------# -here = "thispath" # Current directory. -there = "thatpath" # Directory where analyses/history are -srcdir = "/n/moorcroft_data/mlongo/util/Rsc" # Source directory. +here = "thispath" # Current directory. +there = "thatpath" # Directory where analyses/history are +srcdir = "thisrscpath" # Source directory. #------------------------------------------------------------------------------------------# @@ -43,6 +43,8 @@ slz.min = -5.0 # The deepest depth that trees access water. idbh.type = myidbhtype # Type of DBH class # 1 -- Every 10 cm until 100cm; > 100cm # 2 -- 0-10; 10-20; 20-35; 35-50; 50-70; > 70 (cm) + # 3 -- 0-10; 10-35; 35-55; > 55 (cm) +klight = myklight # Weighting factor for maximum carbon balance #------------------------------------------------------------------------------------------# diff --git a/ED/Template/Template/reject_ed.r b/ED/Template/Template/reject_ed.r index 81a1db45c..e66d7ae81 100644 --- a/ED/Template/Template/reject_ed.r +++ b/ED/Template/Template/reject_ed.r @@ -1,6 +1,6 @@ #----- Here is the user-defined variable section. -----------------------------------------# -here = "thispath" # Current directory. -srcdir = "/n/moorcroft_data/mlongo/util/Rsc" # Source directory. +here = "thispath" # Current directory. +srcdir = "thisrscpath" # Source directory. outroot = "thisoutroot" myplaces = c("thispoly") outform = "thisoutform" # Formats for output file. Supported formats are: diff --git a/ED/Template/Template/whichrun.r b/ED/Template/Template/whichrun.r index 5e411e557..b43341341 100644 --- a/ED/Template/Template/whichrun.r +++ b/ED/Template/Template/whichrun.r @@ -7,7 +7,7 @@ graphics.off() #----- The user-defined variable section. -------------------------------------------------# main = "pathhere" histomain = "pathhere" -srcdir = "/n/moorcroft_data/mlongo/util/Rsc" +srcdir = "thisrscpath" polyg = "thispoly" queue = "thisqueue" yeara = thisyeara @@ -35,7 +35,7 @@ output = paste(main,polyg,sep="/") # Current directory. #----- Load some useful scripts and packages. ---------------------------------------------# -source(paste(srcdir,"load.everything.r",sep="/")) +isok = require(hdf5) #------------------------------------------------------------------------------------------# diff --git a/ED/Template/bringlast.sh b/ED/Template/bringlast.sh index 36409dd6b..741e104d1 100755 --- a/ED/Template/bringlast.sh +++ b/ED/Template/bringlast.sh @@ -58,81 +58,82 @@ do initmode=`echo ${oi} | awk '{print $13}'` iscenario=`echo ${oi} | awk '{print $14}'` isizepft=`echo ${oi} | awk '{print $15}'` - polyisoil=`echo ${oi} | awk '{print $16}'` - polyntext=`echo ${oi} | awk '{print $17}'` - polysand=`echo ${oi} | awk '{print $18}'` - polyclay=`echo ${oi} | awk '{print $19}'` - polydepth=`echo ${oi} | awk '{print $20}'` - polysoilbc=`echo ${oi} | awk '{print $21}'` - polysldrain=`echo ${oi} | awk '{print $22}'` - polycol=`echo ${oi} | awk '{print $23}'` - slzres=`echo ${oi} | awk '{print $24}'` - queue=`echo ${oi} | awk '{print $25}'` - metdriver=`echo ${oi} | awk '{print $26}'` - dtlsm=`echo ${oi} | awk '{print $27}'` - vmfactc3=`echo ${oi} | awk '{print $28}'` - vmfactc4=`echo ${oi} | awk '{print $29}'` - mphototrc3=`echo ${oi} | awk '{print $30}'` - mphototec3=`echo ${oi} | awk '{print $31}'` - mphotoc4=`echo ${oi} | awk '{print $32}'` - bphotoblc3=`echo ${oi} | awk '{print $33}'` - bphotonlc3=`echo ${oi} | awk '{print $34}'` - bphotoc4=`echo ${oi} | awk '{print $35}'` - kwgrass=`echo ${oi} | awk '{print $36}'` - kwtree=`echo ${oi} | awk '{print $37}'` - gammac3=`echo ${oi} | awk '{print $38}'` - gammac4=`echo ${oi} | awk '{print $39}'` - d0grass=`echo ${oi} | awk '{print $40}'` - d0tree=`echo ${oi} | awk '{print $41}'` - alphac3=`echo ${oi} | awk '{print $42}'` - alphac4=`echo ${oi} | awk '{print $43}'` - klowco2=`echo ${oi} | awk '{print $44}'` - decomp=`echo ${oi} | awk '{print $45}'` - rrffact=`echo ${oi} | awk '{print $46}'` - growthresp=`echo ${oi} | awk '{print $47}'` - lwidthgrass=`echo ${oi} | awk '{print $48}'` - lwidthbltree=`echo ${oi} | awk '{print $49}'` - lwidthnltree=`echo ${oi} | awk '{print $50}'` - q10c3=`echo ${oi} | awk '{print $51}'` - q10c4=`echo ${oi} | awk '{print $52}'` - h2olimit=`echo ${oi} | awk '{print $53}'` - imortscheme=`echo ${oi} | awk '{print $54}'` - ddmortconst=`echo ${oi} | awk '{print $55}'` - isfclyrm=`echo ${oi} | awk '{print $56}'` - icanturb=`echo ${oi} | awk '{print $57}'` - ubmin=`echo ${oi} | awk '{print $58}'` - ugbmin=`echo ${oi} | awk '{print $59}'` - ustmin=`echo ${oi} | awk '{print $60}'` - gamm=`echo ${oi} | awk '{print $61}'` - gamh=`echo ${oi} | awk '{print $62}'` - tprandtl=`echo ${oi} | awk '{print $63}'` - ribmax=`echo ${oi} | awk '{print $64}'` - atmco2=`echo ${oi} | awk '{print $65}'` - thcrit=`echo ${oi} | awk '{print $66}'` - smfire=`echo ${oi} | awk '{print $67}'` - ifire=`echo ${oi} | awk '{print $68}'` - fireparm=`echo ${oi} | awk '{print $69}'` - ipercol=`echo ${oi} | awk '{print $70}'` - runoff=`echo ${oi} | awk '{print $71}'` - imetrad=`echo ${oi} | awk '{print $72}'` - ibranch=`echo ${oi} | awk '{print $73}'` - icanrad=`echo ${oi} | awk '{print $74}'` - crown=`echo ${oi} | awk '{print $75}'` - ltransvis=`echo ${oi} | awk '{print $76}'` - lreflectvis=`echo ${oi} | awk '{print $77}'` - ltransnir=`echo ${oi} | awk '{print $78}'` - lreflectnir=`echo ${oi} | awk '{print $79}'` - orienttree=`echo ${oi} | awk '{print $80}'` - orientgrass=`echo ${oi} | awk '{print $81}'` - clumptree=`echo ${oi} | awk '{print $82}'` - clumpgrass=`echo ${oi} | awk '{print $83}'` - ivegtdyn=`echo ${oi} | awk '{print $84}'` - igndvap=`echo ${oi} | awk '{print $85}'` - iphen=`echo ${oi} | awk '{print $86}'` - iallom=`echo ${oi} | awk '{print $87}'` - ibigleaf=`echo ${oi} | awk '{print $88}'` - irepro=`echo ${oi} | awk '{print $89}'` - treefall=`echo ${oi} | awk '{print $90}'` + iage=`echo ${oi} | awk '{print $16}'` + polyisoil=`echo ${oi} | awk '{print $17}'` + polyntext=`echo ${oi} | awk '{print $18}'` + polysand=`echo ${oi} | awk '{print $19}'` + polyclay=`echo ${oi} | awk '{print $20}'` + polydepth=`echo ${oi} | awk '{print $21}'` + polysoilbc=`echo ${oi} | awk '{print $22}'` + polysldrain=`echo ${oi} | awk '{print $23}'` + polycol=`echo ${oi} | awk '{print $24}'` + slzres=`echo ${oi} | awk '{print $25}'` + queue=`echo ${oi} | awk '{print $26}'` + metdriver=`echo ${oi} | awk '{print $27}'` + dtlsm=`echo ${oi} | awk '{print $28}'` + vmfactc3=`echo ${oi} | awk '{print $29}'` + vmfactc4=`echo ${oi} | awk '{print $30}'` + mphototrc3=`echo ${oi} | awk '{print $31}'` + mphototec3=`echo ${oi} | awk '{print $32}'` + mphotoc4=`echo ${oi} | awk '{print $33}'` + bphotoblc3=`echo ${oi} | awk '{print $34}'` + bphotonlc3=`echo ${oi} | awk '{print $35}'` + bphotoc4=`echo ${oi} | awk '{print $36}'` + kwgrass=`echo ${oi} | awk '{print $37}'` + kwtree=`echo ${oi} | awk '{print $38}'` + gammac3=`echo ${oi} | awk '{print $39}'` + gammac4=`echo ${oi} | awk '{print $40}'` + d0grass=`echo ${oi} | awk '{print $41}'` + d0tree=`echo ${oi} | awk '{print $42}'` + alphac3=`echo ${oi} | awk '{print $43}'` + alphac4=`echo ${oi} | awk '{print $44}'` + klowco2=`echo ${oi} | awk '{print $45}'` + decomp=`echo ${oi} | awk '{print $46}'` + rrffact=`echo ${oi} | awk '{print $47}'` + growthresp=`echo ${oi} | awk '{print $48}'` + lwidthgrass=`echo ${oi} | awk '{print $49}'` + lwidthbltree=`echo ${oi} | awk '{print $50}'` + lwidthnltree=`echo ${oi} | awk '{print $51}'` + q10c3=`echo ${oi} | awk '{print $52}'` + q10c4=`echo ${oi} | awk '{print $53}'` + h2olimit=`echo ${oi} | awk '{print $54}'` + imortscheme=`echo ${oi} | awk '{print $55}'` + ddmortconst=`echo ${oi} | awk '{print $56}'` + isfclyrm=`echo ${oi} | awk '{print $57}'` + icanturb=`echo ${oi} | awk '{print $58}'` + ubmin=`echo ${oi} | awk '{print $59}'` + ugbmin=`echo ${oi} | awk '{print $60}'` + ustmin=`echo ${oi} | awk '{print $61}'` + gamm=`echo ${oi} | awk '{print $62}'` + gamh=`echo ${oi} | awk '{print $63}'` + tprandtl=`echo ${oi} | awk '{print $64}'` + ribmax=`echo ${oi} | awk '{print $65}'` + atmco2=`echo ${oi} | awk '{print $66}'` + thcrit=`echo ${oi} | awk '{print $67}'` + smfire=`echo ${oi} | awk '{print $68}'` + ifire=`echo ${oi} | awk '{print $69}'` + fireparm=`echo ${oi} | awk '{print $70}'` + ipercol=`echo ${oi} | awk '{print $71}'` + runoff=`echo ${oi} | awk '{print $72}'` + imetrad=`echo ${oi} | awk '{print $73}'` + ibranch=`echo ${oi} | awk '{print $74}'` + icanrad=`echo ${oi} | awk '{print $75}'` + crown=`echo ${oi} | awk '{print $76}'` + ltransvis=`echo ${oi} | awk '{print $77}'` + lreflectvis=`echo ${oi} | awk '{print $78}'` + ltransnir=`echo ${oi} | awk '{print $79}'` + lreflectnir=`echo ${oi} | awk '{print $80}'` + orienttree=`echo ${oi} | awk '{print $81}'` + orientgrass=`echo ${oi} | awk '{print $82}'` + clumptree=`echo ${oi} | awk '{print $83}'` + clumpgrass=`echo ${oi} | awk '{print $84}'` + ivegtdyn=`echo ${oi} | awk '{print $85}'` + igndvap=`echo ${oi} | awk '{print $86}'` + iphen=`echo ${oi} | awk '{print $87}'` + iallom=`echo ${oi} | awk '{print $88}'` + ibigleaf=`echo ${oi} | awk '{print $89}'` + irepro=`echo ${oi} | awk '{print $90}'` + treefall=`echo ${oi} | awk '{print $91}'` #---------------------------------------------------------------------------------------# diff --git a/ED/Template/check_run.sh b/ED/Template/check_run.sh index 6aee994e2..09066469a 100755 --- a/ED/Template/check_run.sh +++ b/ED/Template/check_run.sh @@ -62,81 +62,82 @@ do initmode=`echo ${oi} | awk '{print $13}'` iscenario=`echo ${oi} | awk '{print $14}'` isizepft=`echo ${oi} | awk '{print $15}'` - polyisoil=`echo ${oi} | awk '{print $16}'` - polyntext=`echo ${oi} | awk '{print $17}'` - polysand=`echo ${oi} | awk '{print $18}'` - polyclay=`echo ${oi} | awk '{print $19}'` - polydepth=`echo ${oi} | awk '{print $20}'` - polysoilbc=`echo ${oi} | awk '{print $21}'` - polysldrain=`echo ${oi} | awk '{print $22}'` - polycol=`echo ${oi} | awk '{print $23}'` - slzres=`echo ${oi} | awk '{print $24}'` - queue=`echo ${oi} | awk '{print $25}'` - metdriver=`echo ${oi} | awk '{print $26}'` - dtlsm=`echo ${oi} | awk '{print $27}'` - vmfactc3=`echo ${oi} | awk '{print $28}'` - vmfactc4=`echo ${oi} | awk '{print $29}'` - mphototrc3=`echo ${oi} | awk '{print $30}'` - mphototec3=`echo ${oi} | awk '{print $31}'` - mphotoc4=`echo ${oi} | awk '{print $32}'` - bphotoblc3=`echo ${oi} | awk '{print $33}'` - bphotonlc3=`echo ${oi} | awk '{print $34}'` - bphotoc4=`echo ${oi} | awk '{print $35}'` - kwgrass=`echo ${oi} | awk '{print $36}'` - kwtree=`echo ${oi} | awk '{print $37}'` - gammac3=`echo ${oi} | awk '{print $38}'` - gammac4=`echo ${oi} | awk '{print $39}'` - d0grass=`echo ${oi} | awk '{print $40}'` - d0tree=`echo ${oi} | awk '{print $41}'` - alphac3=`echo ${oi} | awk '{print $42}'` - alphac4=`echo ${oi} | awk '{print $43}'` - klowco2=`echo ${oi} | awk '{print $44}'` - decomp=`echo ${oi} | awk '{print $45}'` - rrffact=`echo ${oi} | awk '{print $46}'` - growthresp=`echo ${oi} | awk '{print $47}'` - lwidthgrass=`echo ${oi} | awk '{print $48}'` - lwidthbltree=`echo ${oi} | awk '{print $49}'` - lwidthnltree=`echo ${oi} | awk '{print $50}'` - q10c3=`echo ${oi} | awk '{print $51}'` - q10c4=`echo ${oi} | awk '{print $52}'` - h2olimit=`echo ${oi} | awk '{print $53}'` - imortscheme=`echo ${oi} | awk '{print $54}'` - ddmortconst=`echo ${oi} | awk '{print $55}'` - isfclyrm=`echo ${oi} | awk '{print $56}'` - icanturb=`echo ${oi} | awk '{print $57}'` - ubmin=`echo ${oi} | awk '{print $58}'` - ugbmin=`echo ${oi} | awk '{print $59}'` - ustmin=`echo ${oi} | awk '{print $60}'` - gamm=`echo ${oi} | awk '{print $61}'` - gamh=`echo ${oi} | awk '{print $62}'` - tprandtl=`echo ${oi} | awk '{print $63}'` - ribmax=`echo ${oi} | awk '{print $64}'` - atmco2=`echo ${oi} | awk '{print $65}'` - thcrit=`echo ${oi} | awk '{print $66}'` - smfire=`echo ${oi} | awk '{print $67}'` - ifire=`echo ${oi} | awk '{print $68}'` - fireparm=`echo ${oi} | awk '{print $69}'` - ipercol=`echo ${oi} | awk '{print $70}'` - runoff=`echo ${oi} | awk '{print $71}'` - imetrad=`echo ${oi} | awk '{print $72}'` - ibranch=`echo ${oi} | awk '{print $73}'` - icanrad=`echo ${oi} | awk '{print $74}'` - crown=`echo ${oi} | awk '{print $75}'` - ltransvis=`echo ${oi} | awk '{print $76}'` - lreflectvis=`echo ${oi} | awk '{print $77}'` - ltransnir=`echo ${oi} | awk '{print $78}'` - lreflectnir=`echo ${oi} | awk '{print $79}'` - orienttree=`echo ${oi} | awk '{print $80}'` - orientgrass=`echo ${oi} | awk '{print $81}'` - clumptree=`echo ${oi} | awk '{print $82}'` - clumpgrass=`echo ${oi} | awk '{print $83}'` - ivegtdyn=`echo ${oi} | awk '{print $84}'` - igndvap=`echo ${oi} | awk '{print $85}'` - iphen=`echo ${oi} | awk '{print $86}'` - iallom=`echo ${oi} | awk '{print $87}'` - ibigleaf=`echo ${oi} | awk '{print $88}'` - irepro=`echo ${oi} | awk '{print $89}'` - treefall=`echo ${oi} | awk '{print $90}'` + iage=`echo ${oi} | awk '{print $16}'` + polyisoil=`echo ${oi} | awk '{print $17}'` + polyntext=`echo ${oi} | awk '{print $18}'` + polysand=`echo ${oi} | awk '{print $19}'` + polyclay=`echo ${oi} | awk '{print $20}'` + polydepth=`echo ${oi} | awk '{print $21}'` + polysoilbc=`echo ${oi} | awk '{print $22}'` + polysldrain=`echo ${oi} | awk '{print $23}'` + polycol=`echo ${oi} | awk '{print $24}'` + slzres=`echo ${oi} | awk '{print $25}'` + queue=`echo ${oi} | awk '{print $26}'` + metdriver=`echo ${oi} | awk '{print $27}'` + dtlsm=`echo ${oi} | awk '{print $28}'` + vmfactc3=`echo ${oi} | awk '{print $29}'` + vmfactc4=`echo ${oi} | awk '{print $30}'` + mphototrc3=`echo ${oi} | awk '{print $31}'` + mphototec3=`echo ${oi} | awk '{print $32}'` + mphotoc4=`echo ${oi} | awk '{print $33}'` + bphotoblc3=`echo ${oi} | awk '{print $34}'` + bphotonlc3=`echo ${oi} | awk '{print $35}'` + bphotoc4=`echo ${oi} | awk '{print $36}'` + kwgrass=`echo ${oi} | awk '{print $37}'` + kwtree=`echo ${oi} | awk '{print $38}'` + gammac3=`echo ${oi} | awk '{print $39}'` + gammac4=`echo ${oi} | awk '{print $40}'` + d0grass=`echo ${oi} | awk '{print $41}'` + d0tree=`echo ${oi} | awk '{print $42}'` + alphac3=`echo ${oi} | awk '{print $43}'` + alphac4=`echo ${oi} | awk '{print $44}'` + klowco2=`echo ${oi} | awk '{print $45}'` + decomp=`echo ${oi} | awk '{print $46}'` + rrffact=`echo ${oi} | awk '{print $47}'` + growthresp=`echo ${oi} | awk '{print $48}'` + lwidthgrass=`echo ${oi} | awk '{print $49}'` + lwidthbltree=`echo ${oi} | awk '{print $50}'` + lwidthnltree=`echo ${oi} | awk '{print $51}'` + q10c3=`echo ${oi} | awk '{print $52}'` + q10c4=`echo ${oi} | awk '{print $53}'` + h2olimit=`echo ${oi} | awk '{print $54}'` + imortscheme=`echo ${oi} | awk '{print $55}'` + ddmortconst=`echo ${oi} | awk '{print $56}'` + isfclyrm=`echo ${oi} | awk '{print $57}'` + icanturb=`echo ${oi} | awk '{print $58}'` + ubmin=`echo ${oi} | awk '{print $59}'` + ugbmin=`echo ${oi} | awk '{print $60}'` + ustmin=`echo ${oi} | awk '{print $61}'` + gamm=`echo ${oi} | awk '{print $62}'` + gamh=`echo ${oi} | awk '{print $63}'` + tprandtl=`echo ${oi} | awk '{print $64}'` + ribmax=`echo ${oi} | awk '{print $65}'` + atmco2=`echo ${oi} | awk '{print $66}'` + thcrit=`echo ${oi} | awk '{print $67}'` + smfire=`echo ${oi} | awk '{print $68}'` + ifire=`echo ${oi} | awk '{print $69}'` + fireparm=`echo ${oi} | awk '{print $70}'` + ipercol=`echo ${oi} | awk '{print $71}'` + runoff=`echo ${oi} | awk '{print $72}'` + imetrad=`echo ${oi} | awk '{print $73}'` + ibranch=`echo ${oi} | awk '{print $74}'` + icanrad=`echo ${oi} | awk '{print $75}'` + crown=`echo ${oi} | awk '{print $76}'` + ltransvis=`echo ${oi} | awk '{print $77}'` + lreflectvis=`echo ${oi} | awk '{print $78}'` + ltransnir=`echo ${oi} | awk '{print $79}'` + lreflectnir=`echo ${oi} | awk '{print $80}'` + orienttree=`echo ${oi} | awk '{print $81}'` + orientgrass=`echo ${oi} | awk '{print $82}'` + clumptree=`echo ${oi} | awk '{print $83}'` + clumpgrass=`echo ${oi} | awk '{print $84}'` + ivegtdyn=`echo ${oi} | awk '{print $85}'` + igndvap=`echo ${oi} | awk '{print $86}'` + iphen=`echo ${oi} | awk '{print $87}'` + iallom=`echo ${oi} | awk '{print $88}'` + ibigleaf=`echo ${oi} | awk '{print $89}'` + irepro=`echo ${oi} | awk '{print $90}'` + treefall=`echo ${oi} | awk '{print $91}'` #---------------------------------------------------------------------------------------# #---------------------------------------------------------------------------------------# diff --git a/ED/Template/compare_results.r b/ED/Template/compare_results.r index 0dbe9c95c..ad698e03c 100644 --- a/ED/Template/compare_results.r +++ b/ED/Template/compare_results.r @@ -18,26 +18,29 @@ here = getwd() # Current directory srcdir = "/n/moorcroft_data/mlongo/util/Rsc" # Script directory outroot = paste(here,"structure_comp",sep="/") # Output directory -sites = c("gyf","s67","s83","pdg","pnz","ban","rja","m34") -sites.pch.1st = c( 24, 22, 23, 25, 21, 22, 21, 23) -sites.pch.2nd = c( 0, 0, 3, 0, 4, 4, 0, 0) -sites.pch.leg = c( 24, 22, 9, 25, 13, 7, 21, 23) - -size.struct = list( name = c( "sas", "ble") - , desc = c( "Size St", "1 Size") - , verbose = c( "Size structure", "Single size") - , hue = c( "green", "purple") +sites = c("gyf","s67","s83","pdg","pnz","ban","rja","m34","cax") +sites.pch = c( 2, 5, 9, 13, 4, 8, 1, 6, 0) + +size.struct = list( name = c( "sas", "ble") + , desc = c( "Size St", "1 Size") + , verbose = c( "Size structure", "Single size") + , hue = list( green = c("#55AC00" ,"chartreuse" ) + , olive = c("olivedrab3" ,"#DCFFA0" ) + , purple = c("purple3" ,"mediumpurple1" ) + , indigo = c("slateblue2" ,"#CDC5FF" ) + )#end list )#end list -pft.struct = list( name = c( "pft05", "pft02") - , desc = c( "3T+2G", "1T+1G") - , verbose = c( "Niche structure", "Single PFT") - , sat = c( 1, 2) +pft.struct = list( name = c( "pft05", "pft02") + , desc = c( "3T+2G", "1T+1G") + , verbose = c( "Succesion struct.", "Single succesion") + , sat = c( 1, 2) )#end list -age.struct = list( name = c( "age00", "age01") - , desc = c( "Age St", "1 Age") - , verbose = c( "Age structure", "Single age") - , bg = c( NA, "white") - , lty = c( "solid", "dashed") +age.struct = list( name = c( "iage25", "iage01") + , desc = c( "Age St", "1 Age") + , verbose = c( "Age structure", "Single age") + , cex = c( 2.0, 1.3) + , lwd = c( 2.5, 2.0) + , lty = c( "solid", "dashed") )#end list #------------------------------------------------------------------------------------------# @@ -57,15 +60,18 @@ byeold = TRUE # Remove old files of the given format? depth = 96 # PNG resolution, in pixels per inch paper = "letter" # Paper size, to define the plot shape -ptsz = 14 # Font size. +ptsz = 18 # Font size. lwidth = 2.5 # Line width plotgrid = TRUE # Should I plot the grid in the background? legwhere = "topleft" # Where should I place the legend? inset = 0.01 # Inset between legend and edge of plot region. -legbg = "white" # Legend background colour. fracexp = 0.40 # Expansion factor for y axis (to fit legend) cex.main = 0.8 # Scale coefficient for the title +ibackground = 2 # Make figures compatible to which background? + # 0 -- white + # 1 -- black + # 2 -- dark grey #------------------------------------------------------------------------------------------# @@ -86,6 +92,12 @@ cex.main = 0.8 # Scale coefficient for the title +#----- Load some packages. ----------------------------------------------------------------# +source(file.path(srcdir,"load.everything.r")) +#------------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------------# # Eddy flux comparisons. # #------------------------------------------------------------------------------------------# @@ -94,8 +106,8 @@ compvar[[ 1]] = list( vnam = "ustar" , symbol = expression(u^symbol("\052")) , desc = "Friction velocity" , unit = "[m/s]" - , col.obser = c("grey42","grey21") - , col.model = c("mediumpurple1","purple4") + , col.obser = c(grey.bg,grey.fg) + , col.model = c(purple.bg,purple.fg) , leg.corner = "topleft" , sunvar = FALSE )#end list @@ -103,8 +115,8 @@ compvar[[ 2]] = list( vnam = "cflxca" , symbol = expression(F(CO[2])) , desc = "Carbon dioxide flux" , unit = "[umol/m2/s]" - , col.obser = c("grey42","grey21") - , col.model = c("chartreuse2","darkgreen") + , col.obser = c(grey.bg,grey.fg) + , col.model = c(green.bg,green.fg) , leg.corner = "bottomright" , sunvar = FALSE )#end list @@ -112,8 +124,8 @@ compvar[[ 3]] = list( vnam = "cflxst" , symbol = expression(S(CO[2])) , desc = "Carbon dioxide storage" , unit = "[umol/m2/s]" - , col.obser = c("grey42","grey21") - , col.model = c("lightgoldenrod3","darkorange1") + , col.obser = c(grey.bg,grey.fg) + , col.model = c(orange.bg,orange.fg) , leg.corner = "topleft" , sunvar = FALSE )#end list @@ -121,8 +133,8 @@ compvar[[ 4]] = list( vnam = "nee" , symbol = expression(NEE) , desc = "Net ecosystem exchange" , unit = "[umol/m2/s]" - , col.obser = c("grey42","grey21") - , col.model = c("chartreuse","chartreuse4") + , col.obser = c(grey.bg,grey.fg) + , col.model = c(green.bg,green.fg) , leg.corner = "bottomright" , sunvar = FALSE )#end list @@ -130,8 +142,8 @@ compvar[[ 5]] = list( vnam = "nep" , symbol = expression(NEP) , desc = "Net ecosystem productivity" , unit = "[kgC/m2/yr]" - , col.obser = c("grey42","grey21") - , col.model = c("olivedrab2","darkolivegreen4") + , col.obser = c(grey.bg,grey.fg) + , col.model = c(olive.bg,olive.fg) , leg.corner = "topleft" , sunvar = FALSE )#end list @@ -139,8 +151,8 @@ compvar[[ 6]] = list( vnam = "reco" , symbol = expression(R[Eco]) , desc = "Ecosystem respiration" , unit = "[kgC/m2/yr]" - , col.obser = c("grey42","grey21") - , col.model = c("yellow3","peru") + , col.obser = c(grey.bg,grey.fg) + , col.model = c(yellow.bg,yellow.fg) , leg.corner = "topleft" , sunvar = FALSE )#end list @@ -148,8 +160,8 @@ compvar[[ 7]] = list( vnam = "gpp" , symbol = expression(GPP) , desc = "Gross primary productivity" , unit = "[kgC/m2/yr]" - , col.obser = c("grey42","grey21") - , col.model = c("green3","darkgreen") + , col.obser = c(grey.bg,grey.fg) + , col.model = c(green.bg,green.fg) , leg.corner = "topleft" , sunvar = TRUE )#end list @@ -157,8 +169,8 @@ compvar[[ 8]] = list( vnam = "parup" , symbol = expression(PAR^symbol("\335")) , desc = "Outgoing PAR" , unit = "[umol/m2/s]" - , col.obser = c("grey42","grey21") - , col.model = c("chartreuse4","darkolivegreen1") + , col.obser = c(grey.bg,grey.fg) + , col.model = c(olive.bg,olive.fg) , leg.corner = "topleft" , sunvar = TRUE )#end list @@ -166,8 +178,8 @@ compvar[[ 9]] = list( vnam = "rshortup" , symbol = expression(SW^symbol("\335")) , desc = "Outgoing shortwave radiation" , unit = "[W/m2]" - , col.obser = c("grey42","grey21") - , col.model = c("royalblue4","deepskyblue") + , col.obser = c(grey.bg,grey.fg) + , col.model = c(indigo.bg,indigo.fg) , leg.corner = "topleft" , sunvar = TRUE )#end list @@ -175,8 +187,8 @@ compvar[[10]] = list( vnam = "rnet" , symbol = expression(R[Net]) , desc = "Net radiation" , unit = "[W/m2]" - , col.obser = c("grey42","grey21") - , col.model = c("gold","orangered") + , col.obser = c(grey.bg,grey.fg) + , col.model = c(sky.bg,sky.fg) , leg.corner = "topleft" , sunvar = FALSE )#end list @@ -184,8 +196,8 @@ compvar[[11]] = list( vnam = "rlongup" , symbol = expression(LW^symbol("\335")) , desc = "Outgoing longwave radiation" , unit = "[W/m2]" - , col.obser = c("grey42","grey21") - , col.model = c("gold","orangered") + , col.obser = c(grey.bg,grey.fg) + , col.model = c(red.bg,red.fg) , leg.corner = "topleft" , sunvar = FALSE )#end list @@ -193,8 +205,8 @@ compvar[[12]] = list( vnam = "hflxca" , symbol = expression(F(theta)) , desc = "Sensible heat flux" , unit = "[W/m2]" - , col.obser = c("grey42","grey21") - , col.model = c("orange1","chocolate4") + , col.obser = c(grey.bg,grey.fg) + , col.model = c(orange.bg,orange.fg) , leg.corner = "topleft" , sunvar = FALSE )#end list @@ -202,8 +214,8 @@ compvar[[13]] = list( vnam = "wflxca" , symbol = expression(F(H[2]*O)) , desc = "Water vapour flux" , unit = "[kg/m2/day]" - , col.obser = c("grey42","grey21") - , col.model = c("deepskyblue","royalblue4") + , col.obser = c(grey.bg,grey.fg) + , col.model = c(blue.bg,blue.fg) , leg.corner = "topleft" , sunvar = FALSE )#end list @@ -312,12 +324,6 @@ good[[ 9]] = list( vnam = "norm.lnlike" #------------------------------------------------------------------------------------------# - -#----- Load some packages. ----------------------------------------------------------------# -source(file.path(srcdir,"load.everything.r")) -#------------------------------------------------------------------------------------------# - - #----- Set how many formats we must output. -----------------------------------------------# outform = tolower(outform) nout = length(outform) @@ -333,8 +339,7 @@ egrid.key = expand.grid( size = size.struct$name , age = age.struct$name , stringsAsFactors = FALSE )#end expand.grid -suffix.key = apply( X = egrid.key[,2:3],MARGIN=1,FUN=paste,collapse="+") -simul.key = apply( X = cbind(egrid.key[,1],suffix.key),MARGIN=1,FUN=paste,collapse="_") +simul.key = apply( X = egrid.key[,c(1,3,2)],MARGIN=1,FUN=paste,collapse="_") #----- Description. -----------------------------------------------------------------------# simleg.key = apply( X = expand.grid( size.struct$desc , pft.struct$desc @@ -349,18 +354,20 @@ n.size = length(size.struct$name) n.pft = length(pft.struct$name ) n.age = length(age.struct$name ) my.rainbow = array(data=NA,dim=c(n.size,n.pft,n.age)) -my.background = c(aperm(a=array(age.struct$bg,dim=c(n.age,n.size,n.pft)),perm=c(2,3,1))) for (n in 1:n.size){ - n.rbow = n.pft*n.age - this.hue = get(paste("hue",size.struct$hue[n],sep=".")) - my.rainbow[n,,] = rev(this.hue(n=n.rbow+1)[-n.rbow+1]) + my.rainbow[n,,1] = size.struct$hue[[2*n-1]] + my.rainbow[n,,2] = size.struct$hue[[2*n ]] }#end for simcol.key = c(unlist(my.rainbow)) simfg.key = rep(my.rainbow[,,1],times=n.age) -simbg.key = rep(my.rainbow[,,2],times=n.age) -sel = ! is.na(my.background) -simbg.key[sel] = my.background[sel] simlty.key = c(aperm(a=array(age.struct$lty,dim=c(n.age,n.size,n.pft)),perm=c(2,3,1))) +simcex.key = c(aperm(a=array(age.struct$cex,dim=c(n.age,n.size,n.pft)),perm=c(2,3,1))) +simlwd.key = c(aperm(a=array(age.struct$lwd,dim=c(n.age,n.size,n.pft)),perm=c(2,3,1))) +#----- Force big leaf to be without size structure. ---------------------------------------# +ble = egrid.key$size == "ble" +simlty.key[ble] = age.struct$lty[2] +simcex.key[ble] = age.struct$cex[2] +simlwd.key[ble] = age.struct$lwd[2] #------------------------------------------------------------------------------------------# @@ -369,15 +376,15 @@ simlty.key = c(aperm(a=array(age.struct$lty,dim=c(n.age,n.size,n.pft)),perm= # Some big leaf simulations are unecessary: big leaf cannot have age structure. # # Remove these simulations from the list. # #------------------------------------------------------------------------------------------# -bye = intersect(which(egrid.key$size == "ble"),which(egrid.key$age == "age00")) +bye = intersect(which(egrid.key$size == "ble"),which(egrid.key$age == "iage01")) egrid.key = egrid.key [-bye,] -suffix.key = suffix.key[-bye ] simul.key = simul.key [-bye ] simleg.key = simleg.key[-bye ] simcol.key = simcol.key[-bye ] simfg.key = simfg.key [-bye ] -simbg.key = simbg.key [-bye ] simlty.key = simlty.key[-bye ] +simcex.key = simcex.key[-bye ] +simlwd.key = simlwd.key[-bye ] #------------------------------------------------------------------------------------------# @@ -389,8 +396,9 @@ simul = data.frame( name = simul.key , desc = simleg.key , colour = simcol.key , fgcol = simfg.key - , bgcol = simbg.key , lty = simlty.key + , cex = simcex.key + , lwd = simlwd.key , stringsAsFactors = FALSE )#end data.frame #------------------------------------------------------------------------------------------# @@ -398,15 +406,19 @@ simul = data.frame( name = simul.key #------ Create the legend summary. --------------------------------------------------------# -mid = ceiling (n.pft/2) -col.pft = rev(hue.grey(n=n.pft*2))[rep(c(TRUE,FALSE),times=n.pft)] -col.age = ifelse(is.na(age.struct$bg),"black",age.struct$bg) +col.in.rgb = apply( X = my.rainbow[,,1], MARGIN = c(1,2), FUN = col2rgb) +col.size = apply( X = col.in.rgb , MARGIN = c(1,2), FUN = mean ) +col.pft = colMeans(apply( X = col.in.rgb , MARGIN = c(1,3), FUN = mean )) +col.age = mean (apply( X = col.in.rgb , MARGIN = c(1) , FUN = mean )) +col.size = rgb(red=col.size[1,],green=col.size[2,],blue=col.size[3,],maxColorValue=255) +col.pft = rgb(red=col.pft ,green=col.pft ,blue=col.pft ,maxColorValue=255) +col.age = rgb(red=col.age ,green=col.age ,blue=col.age ,maxColorValue=255) summ = list( desc = c(size.struct$verbose,pft.struct$verbose,age.struct$verbose) - , col = c(my.rainbow[,mid,1],col.pft,rep("black",times=n.age)) - , bg = c(my.rainbow[,mid,2],col.pft,col.age) + , col = c(col.size,col.pft,rep(col.age,times=n.age)) , pch = rep(22,times=n.size+n.age+n.pft) , lty = c(rep("solid",times=n.size+n.pft),age.struct$lty) - , cex = 2.0 + , cex = c(rep(mean(age.struct$cex),times=n.size+n.pft),age.struct$cex) + , lwd = c(rep(mean(age.struct$lwd),times=n.size+n.pft),age.struct$lwd) )#end summ #------------------------------------------------------------------------------------------# @@ -628,7 +640,7 @@ for (p in 1:nsites){ #---------------------------------------------------------------------------------------# for (s in 1:nsimul){ cat(" * Simulation: ",simul$desc[s],"...","\n") - sim.name = paste("t",iata,"_",simul$name[s],sep="") + sim.name = paste("e",iata,"_",simul$name[s],sep="") sim.path = paste(here,sim.name,sep="/") sim.file = paste(sim.path,"rdata_hour",paste("comp-",sim.name,".RData",sep="") ,sep="/") @@ -705,24 +717,14 @@ for (g in good.loop){ ee = sequence(nseason-1) #----- Find the components. ---------------------------------------------------# - sfac[ dd, ee] = tapply( X = obs[[this.vnam]][sel] - , INDEX = list(obs$diel[sel],obs$season[sel]) - , FUN = sd - , na.rm = TRUE - )#end tapply - sfac[ dd,nseason] = tapply( X = obs[[this.vnam]][sel] - , INDEX = obs$diel[sel] - , FUN = sd - , na.rm = TRUE - )#end tapply - sfac[ndiel, ee] = tapply( X = obs[[this.vnam]][sel] - , INDEX = obs$season[sel] - , FUN = sd - , na.rm = TRUE - )#end tapply - sfac[ndiel,nseason] = sd ( x = obs[[this.vnam]][sel] - , na.rm = TRUE - )#end sd + for (dd in sequence(ndiel)){ + d.sel = obs$diel == dd | dd == ndiel + for (ee in sequence(nseason)){ + e.sel = obs$season == ee | ee == nseason + sel = p.sel & d.sel & e.sel + if (any(sel)) sfac[dd,ee] = sd(obs[[this.vnam]][sel],na.rm=TRUE) + }#end for + }#end for #------------------------------------------------------------------------------# }#end if (norm.good) sfac = ifelse(sfac == 0.,NA,1/sfac) @@ -769,7 +771,13 @@ for (g in good.loop){ }else{ web.range = range(c(0,web[,p,v.sel,d,nseason]),na.rm=TRUE) }#end if - web.lim = pretty(web.range,n=4) + if (ptsz <= 11){ + web.lim = pretty(web.range,n=5) + }else if (ptsz <= 14){ + web.lim = pretty(web.range,n=4) + }else{ + web.lim = pretty(web.range,n=3) + }#end if #------------------------------------------------------------------------------# # Webs by variable (all sites). # @@ -799,10 +807,11 @@ for (g in good.loop){ # Split the window into 3, and add site and simulation legends at the # # bottom. # #---------------------------------------------------------------------------# + par(par.user) par.orig = par(no.readonly = TRUE) mar.orig = par.orig$mar par(oma = c(0.2,3,3.0,0)) - layout(mat = rbind(2,1),height = c(5.0,1.0)) + layout(mat = rbind(2,1),height = c(18,4)) #---------------------------------------------------------------------------# @@ -816,13 +825,12 @@ for (g in good.loop){ , inset = 0.0 , legend = summ$desc , col = summ$col - , lwd = 3.0 + , lwd = max(summ$lwd) , lty = summ$lty - , bg = "white" , ncol = 3 , title = expression(bold("Structure")) - , pt.cex = summ$cex - , cex = 1.0 + , cex = if (ptsz <= 14){1.0}else{0.8} + , xpd = TRUE )#end legend #---------------------------------------------------------------------------# @@ -833,10 +841,13 @@ for (g in good.loop){ #---------------------------------------------------------------------------# radial.flex( lengths = web[,p,v.sel,d,nseason] , labels = as.expression(compvar.sym[v.sel]) + , lab.col = foreground + , lab.bg = background , radlab = FALSE , start = 90 , clockwise = TRUE , rp.type = "p" + , label.prop = 1.15 * max(1,sqrt(ptsz / 14)) , main = "" , line.col = simul$fgcol , lty = simul$lty @@ -844,8 +855,10 @@ for (g in good.loop){ , show.grid = TRUE , show.grid.labels = 4 , show.radial.grid = TRUE - , grid.col = "grey66" + , grid.col = grid.colour , radial.lim = web.lim + , radial.col = foreground + , radial.bg = background , poly.col = NA , mar = c(2,1,2,1)+0.1 , cex.lab = 0.5 @@ -930,6 +943,7 @@ for (g in good.loop){ # Split the window into 3, and add site and simulation legends at the # # bottom. # #---------------------------------------------------------------------------# + par(par.user) par.orig = par(no.readonly = TRUE) mar.orig = par.orig$mar par(oma = c(0.2,3,3.0,0)) @@ -947,9 +961,8 @@ for (g in good.loop){ , inset = 0.0 , legend = summ$desc , col = summ$col - , lwd = 3.0 + , lwd = max(summ$lwd) , lty = summ$lty - , bg = "white" , ncol = 3 , title = expression(bold("Structure")) , pt.cex = summ$cex @@ -975,7 +988,7 @@ for (g in good.loop){ , show.grid = TRUE , show.grid.labels = 4 , show.radial.grid = TRUE - , grid.col = "grey66" + , grid.col = grid.colour , radial.lim = web.lim , poly.col = NA , mar = c(2,1,2,1)+0.1 @@ -1225,9 +1238,10 @@ for (v in 1:ncompvar){ #------------------------------------------------------------------------------------# if (length(unlist(obs.diel)) > 0){ #---- Fix ranges. ----------------------------------------------------------------# - bias.range = 1.04 * max(abs(bias.range)) * c(-1,1) - sigma.range = 1.04 * max(abs(sigma.range)) * c( 1,0) - r2.range = range(c(1,1-sigma.range^2)) + xy.range = 1.04 * max(c(abs(bias.range),abs(sigma.range))) + bias.range = 1.04 * xy.range * c(-1,1) + sigma.range = 1.04 * xy.range * c( 1,0) + r2.range = range(1-xy.range^2,1) #---------------------------------------------------------------------------------# @@ -1273,6 +1287,7 @@ for (v in 1:ncompvar){ # Split the window into 3, and add site and simulation legends at the # # bottom. # #------------------------------------------------------------------------------# + par(par.user) par.orig = par(no.readonly = TRUE) mar.orig = par.orig$mar par(oma = c(0.2,3,3.0,0)) @@ -1289,13 +1304,14 @@ for (v in 1:ncompvar){ legend ( x = "bottom" , inset = 0.0 , legend = toupper(sites.key) - , col = "black" - , pch = sites.pch.leg - , bg = "white" + , col = foreground + , pt.bg = foreground + , pch = sites.pch , ncol = min(4,pretty.box(nsites)$ncol) , title = expression(bold("Sites")) - , pt.cex = 2.0 - , cex = 1.2 + , pt.cex = mean(unique(summ$cex)) + , cex = 1.0 + , xpd = TRUE )#end legend #------------------------------------------------------------------------------# @@ -1310,14 +1326,15 @@ for (v in 1:ncompvar){ , inset = 0.0 , legend = summ$desc , col = summ$col - , pt.bg = summ$bg + , pt.bg = summ$col + , pt.cex = summ$cex + , pt.lwd = summ$lwd , pch = summ$pch - , border = "black" - , bg = "white" + , border = foreground , ncol = 3 , title = expression(bold("Structure")) - , pt.cex = summ$cex - , cex = 1.2 + , cex = 1.0 + , xpd = TRUE )#end legend #------------------------------------------------------------------------------# @@ -1335,52 +1352,34 @@ for (v in 1:ncompvar){ #------------------------------------------------------------------------# # We call skill twice for each site in case the site has two PCHs. # #------------------------------------------------------------------------# - myskill = skill.plot( obs = obs.diel[[iata]] - , mod = mod.diel[[iata]] - , mod.options = list( col = simul$fgcol - , bg = simul$bgcol - , pch = sites.pch.1st[p] - , cex = 3.0 - , lty = "solid" - , lwd = 2.0 - )#end list - , main = "" - , bias.lim = bias.range - , r2.lim = r2.range - , rmse.options = list( col = "darkorange1" - , lty = "dotdash" - , lwd = 1.2 - )#end list - , cex.xyzlab = 1.4 - , cex.xyzat = 1.4 - , skill = myskill - , normalise = TRUE - , mar = c(5,4,4,3)+0.1 + myskill = skill.plot( obs = obs.diel[[iata]] + , obs.options = list( col = foreground + , cex = 2.0 + )#end list + , mod = mod.diel[[iata]] + , mod.options = list( col = simul$fgcol + , bg = simul$fgcol + , pch = sites.pch[p] + , cex = simul$cex + , lty = "solid" + , lwd = simul$lwd + )#end list + , main = "" + , bias.lim = bias.range + , r2.lim = r2.range + , r2.options = list( col = grid.colour) + , nobias.options = list( col = khaki.mg ) + , rmse.options = list( col = orange.mg + , lty = "dotdash" + , lwd = 1.2 + , bg = background + )#end list + , cex.xyzlab = 1.4 + , cex.xyzat = 1.4 + , skill = myskill + , normalise = TRUE + , mar = c(5,4,4,3)+0.1 )#end skill.plot - if (sites.pch.2nd[p] != 0){ - myskill = skill.plot( obs = obs.diel[[iata]] - , mod = mod.diel[[iata]] - , mod.options = list( col = simul$fgcol - , bg = simul$bgcol - , pch = sites.pch.2nd[p] - , cex = 3.0 - , lty = "solid" - , lwd = 2.0 - )#end list - , main = "" - , bias.lim = bias.range - , r2.lim = r2.range - , rmse.options = list( col = "darkorange1" - , lty = "dotdash" - , lwd = 1.2 - )#end list - , cex.xyzlab = 1.4 - , cex.xyzat = 1.4 - , skill = myskill - , normalise = TRUE - , mar = c(5,4,4,3)+0.1 - )#end skill.plot - }#end if (sites.pch.2nd[p] != 0) #------------------------------------------------------------------------# }#end if (length(obs.diel[[iata]] > 0) #---------------------------------------------------------------------------# @@ -1455,6 +1454,7 @@ for (v in 1:ncompvar){ # Split the window into 3, and add site and simulation legends at the # # bottom. # #------------------------------------------------------------------------------# + par(par.user) par.orig = par(no.readonly = TRUE) mar.orig = par.orig$mar par(oma = c(0.2,3,3.0,0)) @@ -1471,13 +1471,14 @@ for (v in 1:ncompvar){ legend ( x = "bottom" , inset = 0.0 , legend = toupper(sites.key) - , col = "black" - , pch = sites.pch.leg - , bg = "white" + , col = foreground + , pt.bg = foreground + , pch = sites.pch , ncol = min(4,pretty.box(nsites)$ncol) , title = expression(bold("Sites")) , pt.cex = 2.0 , cex = 1.0 + , xpd = TRUE )#end legend #------------------------------------------------------------------------------# @@ -1492,14 +1493,15 @@ for (v in 1:ncompvar){ , inset = 0.0 , legend = summ$desc , col = summ$col - , pt.bg = summ$bg + , pt.bg = summ$col + , pt.cex = summ$cex + , pt.lwd = summ$lwd , pch = summ$pch - , border = "black" - , bg = "white" + , border = foreground , ncol = 3 , title = expression(bold("Structure")) - , pt.cex = summ$cex , cex = 1.0 + , xpd = TRUE )#end legend #------------------------------------------------------------------------------# @@ -1521,26 +1523,20 @@ for (v in 1:ncompvar){ , add = add , pos.corr = NA , pt.col = simul$fgcol - , pt.bg = simul$bgcol - , pt.pch = sites.pch.1st[p] - , pt.cex = 2.0 + , pt.bg = simul$fgcol + , pt.pch = sites.pch[p] + , pt.cex = simul$cex + , pt.lwd = simul$lwd + , obs.col = foreground + , gamma.col = sky.mg + , gamma.bg = background + , sd.col = grey.fg + , sd.obs.col = yellow.mg + , corr.col = foreground , main = "" , normalise = TRUE )#end taylor.plot add = TRUE - if (sites.pch.2nd[p] != 0){ - mytaylor = taylor.plot( obs = obs.diel[[iata]] - , mod = mod.diel[[iata]] - , add = add - , pos.corr = NA - , pt.col = simul$fgcol - , pt.pch = sites.pch.2nd[p] - , pt.cex = 2.0 - , main = "" - , normalise = TRUE - )#end taylor.plot - }#end if (sites.pch.2nd[p] != 0) - #------------------------------------------------------------------------# }#end if (length(obs.diel[[iata]]) > 0.) #---------------------------------------------------------------------------# }#end for (p in 1:nsites) @@ -1705,6 +1701,7 @@ for (v in 1:ncompvar){ # Split the window into several smaller windows. Add a bottom row to fit # # the legend. # #------------------------------------------------------------------------------# + par(par.user) par.orig = par(no.readonly = TRUE) mar.orig = par.orig$mar par(oma = c(0.2,3,4,0)) @@ -1723,11 +1720,11 @@ for (v in 1:ncompvar){ , inset = 0.0 , legend = simleg.key , fill = simcol.key - , border = "black" - , bg = "white" + , border = foreground , ncol = min(3,pretty.box(nsimul)$ncol) , title = expression(bold("Simulation")) , cex = 1.0 + , xpd = TRUE )#end legend #------------------------------------------------------------------------------# @@ -1767,7 +1764,7 @@ for (v in 1:ncompvar){ if (left ) axis(side=2) box() title(main=lesub) - if (plotgrid) abline(h=axTicks(2),v=xlines,col="grey83",lty="solid") + if (plotgrid) abline(h=axTicks(2),v=xlines,col=grid.colour,lty="solid") #---------------------------------------------------------------------------# @@ -1775,13 +1772,13 @@ for (v in 1:ncompvar){ #---------------------------------------------------------------------------# # Add the bar plot. # #---------------------------------------------------------------------------# - xbp = barplot(height=stat[d,e,,op],col=colstat,beside=TRUE,border="grey22" + xbp = barplot(height=stat[d,e,,op],col=colstat,beside=TRUE,border=grey.fg ,add=TRUE,axes=FALSE,axisnames=FALSE,xpd=FALSE) text (x=xat,y=y.nobs,labels=nobs.good[d,e,op],cex=0.7) if (this.good %in% c("r.squared")){ ybp = y.r2 - 100 * ( orig.stat[d,e,,op] >= -1.0) text(x=xbp,y=ybp,labels=rep("*",times=length(ybp)) - ,font=2,col="saddlebrown") + ,font=2,col="sandybrown") }#end if #---------------------------------------------------------------------------# }#end for @@ -1868,6 +1865,7 @@ for (v in 1:ncompvar){ # Split the window into several smaller windows. Add a bottom row to fit # # the legend. # #------------------------------------------------------------------------------# + par(par.user) par.orig = par(no.readonly = TRUE) mar.orig = par.orig$mar layout(mat = rbind(2,1), height = c(5,1)) @@ -1883,11 +1881,11 @@ for (v in 1:ncompvar){ , inset = 0.0 , legend = simleg.key , fill = simcol.key - , border = "black" - , bg = "white" + , border = foreground , ncol = min(3,pretty.box(nsimul)$ncol) , title = expression(bold("Simulation")) , cex = 0.7 + , xpd = TRUE )#end legend #------------------------------------------------------------------------------# @@ -1906,7 +1904,7 @@ for (v in 1:ncompvar){ axis(side=1,at=xat,labels=toupper(sites.key[op])) axis(side=2) box() - if (plotgrid) abline(h=axTicks(2),v=xlines,col="grey83",lty="solid") + if (plotgrid) abline(h=axTicks(2),v=xlines,col=grid.colour,lty="solid") #------------------------------------------------------------------------------# @@ -1914,12 +1912,12 @@ for (v in 1:ncompvar){ #------------------------------------------------------------------------------# # Add the bar plot. # #------------------------------------------------------------------------------# - barplot(height=stat[d,nseason,,op],col=colstat,beside=TRUE,border="grey22" + barplot(height=stat[d,nseason,,op],col=colstat,beside=TRUE,border=grey.fg ,add=TRUE,axes=FALSE,axisnames=FALSE,xpd=FALSE) - text(x=xat,y=y.nobs,labels=nobs.good[d,nseason,op],cex=0.9,col="grey22") + text(x=xat,y=y.nobs,labels=nobs.good[d,nseason,op],cex=0.9,col=grey.fg) if (this.good %in% c("r.squared")){ ybp = y.r2 - 100 * ( orig.stat[d,nseason,,op] >= -1.0) - text(x=xbp,y=ybp,labels=rep("*",times=length(ybp)),font=2,col="saddlebrown") + text(x=xbp,y=ybp,labels=rep("*",times=length(ybp)),font=2,col="sandybrown") }#end if #------------------------------------------------------------------------------# @@ -2007,6 +2005,7 @@ for (v in 1:ncompvar){ # Split the window into several smaller windows. Add a bottom row to # # fit the legend. # #---------------------------------------------------------------------------# + par(par.user) par.orig = par(no.readonly = TRUE) mar.orig = par.orig$mar par(oma = c(0.2,3,4,0)) @@ -2025,11 +2024,11 @@ for (v in 1:ncompvar){ , inset = 0.0 , legend = simleg.key , fill = simcol.key - , border = "black" - , bg = "white" + , border = foreground , ncol = min(3,pretty.box(nsimul)$ncol) , title = expression(bold("Simulation")) , cex = 1.0 + , xpd = TRUE )#end legend #---------------------------------------------------------------------------# @@ -2062,7 +2061,7 @@ for (v in 1:ncompvar){ if (left ) axis(side=2) box() title(main=lesub) - if (plotgrid) grid(col="grey83",lty="solid") + if (plotgrid) grid(col=grid.colour,lty="solid") #------------------------------------------------------------------------# @@ -2161,6 +2160,7 @@ for (v in 1:ncompvar){ # Split the window into several smaller windows. Add a bottom row to # # fit the legend. # #---------------------------------------------------------------------------# + par(par.user) par.orig = par(no.readonly = TRUE) mar.orig = par.orig$mar layout(mat=rbind(2,1),height=c(5,1)) @@ -2176,11 +2176,11 @@ for (v in 1:ncompvar){ , inset = 0.0 , legend = simleg.key , fill = simcol.key - , border = "black" - , bg = "white" + , border = foreground , ncol = min(3,pretty.box(nsimul)$ncol) , title = expression(bold("Simulation")) , cex = 1.0 + , xpd = TRUE )#end legend #---------------------------------------------------------------------------# @@ -2197,7 +2197,7 @@ for (v in 1:ncompvar){ axis(side=1) axis(side=2) box() - if (plotgrid) grid(col="grey83",lty="solid") + if (plotgrid) grid(col=grid.colour,lty="solid") #---------------------------------------------------------------------------# diff --git a/ED/Template/compare_scenarios.r b/ED/Template/compare_scenarios.r index 9782886c1..a35a47f82 100644 --- a/ED/Template/compare_scenarios.r +++ b/ED/Template/compare_scenarios.r @@ -16,7 +16,8 @@ graphics.off() #------------------------------------------------------------------------------------------# here = getwd() # Current directory srcdir = "/n/moorcroft_data/mlongo/util/Rsc" # Script directory -outroot = file.path(here,"4dbh_comp") +outroot = file.path(here,"stext_comp") +comp.prefix = "stext" #------------------------------------------------------------------------------------------# @@ -39,12 +40,13 @@ rdata.path = file.path(here,"RData_scomp") # Path for the scenario compari # NA -- plot only the first (debugging only). # # FALSE -- skip them altogether # #------------------------------------------------------------------------------------------# -plot.panel = TRUE # TRUE -plot.tseries = FALSE # TRUE -plot.szpft = FALSE # TRUE -plot.barplot = FALSE # TRUE -plot.xyzvars = TRUE # TRUE -plot.scencomp = FALSE # TRUE +plot.panel = c(FALSE,TRUE,NA)[1] +plot.tseries = c(FALSE,TRUE,NA)[2] +plot.szpft = c(FALSE,TRUE,NA)[2] +plot.barplot = c(FALSE,TRUE,NA)[2] +plot.xyzvars = c(FALSE,TRUE,NA)[1] +plot.scencomp = c(FALSE,TRUE,NA)[2] +plot.panelbox = c(FALSE,TRUE,NA)[2] #------------------------------------------------------------------------------------------# @@ -98,31 +100,42 @@ plot.scencomp = FALSE # TRUE # (only key, desc, and pattern are defined). # #------------------------------------------------------------------------------------------# name.template = "tPPP_rRRRR_tTTTT_real-ZZ_iphenDDD_stextSS" -use.global = c(4) # Which global to use (TRUE means all of them) +use.global = c(1) # Which global to use (TRUE means all of them) #----- Global variables. ------------------------------------------------------------------# global = list() -global$stext = list( key = c("stext02","stext06","stext08","stext16","stext17") - , desc = paste( "Soil type:" - , c("Loamy sand","Sandy clay loam","Clayey loam" - ,"Clayey sand","Clayey silt") - ,sep = " " - )#end paste - , pattern = "stextSS" +#global$stext = list( key = c("stext02","stext06","stext08","stext16","stext11") +# , desc = paste( "Soil type:" +# , c("Loamy sand","Sandy clay loam","Clayey loam" +# ,"Clayey sand","Clay") +# ,sep = " " +# )#end paste +# , pattern = "stextSS" +# , value = NA_real_ +# , label = NA_real_ +# , default = NA_character_ +# , colour = NA_character_ +# , pch = NA_integer_ +# , alabel = NA_character_ +# )#end list +global$dtemp = list( key = c("t+000","t+100","t+200","t+300") + , desc = c("dT = +0.0 K","dT = +1.0 K","dT = +2.0 K","dT = +3.0 K") + , pattern = "tTTTT" + , default = NA_integer_ , value = NA_real_ , label = NA_real_ - , default = NA_character_ , colour = NA_character_ , pch = NA_integer_ , alabel = NA_character_ )#end list #----- Panel variables. -------------------------------------------------------------------# +iata.use = c(1,2) panel = list() -panel$iata = list( key = c("gyf","s67") - , desc = c("Paracou, GUF","Santarem km 67") +panel$iata = list( key = c("gyf","s67","rja")[iata.use] + , desc = c("Paracou","Santarem","Rebio Jaru")[iata.use] , pattern = "PPP" + , default = NA_character_ , value = NA_real_ , label = NA_real_ - , default = NA_character_ , colour = NA_character_ , pch = NA_integer_ , alabel = NA_character_ @@ -130,36 +143,38 @@ panel$iata = list( key = c("gyf","s67") panel$iphen = list( key = c("iphen-01","iphen+02") , desc = paste("Phenology:",c("Evergreen","Drought Deciduous")) , pattern = "iphenDDD" + , default = NA_character_ , value = NA_real_ , label = NA_real_ - , default = NA_character_ , colour = NA_character_ , pch = NA_integer_ , alabel = NA_character_ )#end list #----- Scenario variables. ----------------------------------------------------------------# +st.use = c(1,2,3,4,5) scenario = list() scenario$drain = list( key = c("r+000","r-020","r-040","r-060","r-080","r-100") , desc = c("dR = 0.00 S","dR = -0.20 S","dR = -0.40 S" ,"dR = -0.60 S","dR = -0.80 S","dR = -1.00 S") , pattern = "rRRRR" + , default = "r+000" , value = c( 0.0, 0.2, 0.4, 0.6, 0.8, 1.0) , label = c( 0.0, -0.2, -0.4, -0.6, -0.8, -1.0) , colour = c("royalblue","deepskyblue","yellow3","gold" ,"darkorange2","red3") , pch = c(15L,17L,12L,13L,6L,8L) - , default = "r+000" , alabel = paste(c("Mean rainfall change [Scale]",sep="")) )#end list -scenario$dtemp = list( key = c("t+000","t+100","t+200","t+300") - , desc = c("dT = +0.0 K","dT = +1.0 K","dT = +2.0 K","dT = +3.0 K") - , pattern = "tTTTT" - , value = c(0.0,1.0,2.0,3.0) - , label = c(0.0,1.0,2.0,3.0) - , colour = c("dodgerblue","yellow3","darkorange2","red3") - , pch = c(18L,17L,13L,6L) - , default = "t+000" - , alabel = c("Mean temperature change [K]") +scenario$stext = list( key = c("stext02","stext06","stext08","stext16","stext11")[st.use] + , desc = c("Loamy sand","Sandy clay loam","Clayey loam" + ,"Clayey sand","Clay")[st.use] + , pattern = "stextSS" + , default = "stext16" + , value = c(1,2,3,4,5)[sequence(length(st.use))] + , label = c("LSa","SaCL","CL","CSa","C")[st.use] + , colour = c("yellow3","sandybrown","darkorange2","firebrick2","red4")[st.use] + , pch = c(18L,17L,13L,15L,6L)[st.use] + , alabel = c("Soil texture") )#end list #----- Realisation variables. -------------------------------------------------------------# realisation = list( key = paste("real",sprintf("%2.2i",0:9),sep="-") @@ -199,7 +214,7 @@ byeold = TRUE # Remove old files of the given format? depth = 96 # PNG resolution, in pixels per inch paper = "letter" # Paper size, to define the plot shape -ptsz = 16 # Font size. +ptsz = 18 # Font size. lwidth = 2.5 # Line width plotgrid = TRUE # Should I plot the grid in the background? @@ -213,6 +228,7 @@ notch = FALSE # Add notches to the box plots. mtext.xoff.im = -7.00 # Offset for the x label mtext.xoff = -7.00 # Offset for the x label mtext.yoff = -1.00 # Offset for the y label +mtext.yoff.im = -3.00 # Offset for the y label mtext.xadj = 0.50 # Offset for the x label mtext.yadj = 0.65 # Offset for the y label barplot.lwd = 1.50 # Line width for the bar plots @@ -368,7 +384,7 @@ dbh.suffix = paste("dbh",tolower(dbh.key),sep="-") #------------------------------------------------------------------------------------------# # This is the R object that has the simulation information. # #------------------------------------------------------------------------------------------# -rdata.siminfo = file.path(rdata.path,"4dbh_SimInfo.RData") +rdata.siminfo = file.path(rdata.path,paste(comp.prefix,"SimInfo.RData",sep="_")) #------------------------------------------------------------------------------------------# @@ -649,8 +665,6 @@ if (retrieve.siminfo && file.exists(rdata.siminfo)){ - - #==========================================================================================# #==========================================================================================# # Find the best set up for plotting all seasons and all PFTs in the same plot. # @@ -837,6 +851,140 @@ for (o in 1:nout){ #---------------------------------------------------------------------------# }#end for #------------------------------------------------------------------------------# + + + + + + + + #------------------------------------------------------------------------------# + # Create the directory where the multiple box plot will be placed. # + #------------------------------------------------------------------------------# + root.panelbox.season = file.path(gnow$main,"panelbox_season") + gnow$panelbox.year = file.path(gnow$main,"panelbox_year" ) + root.panelboxpft.season = file.path(gnow$main,"panelboxpft_season") + root.panelboxpft.year = file.path(gnow$main,"panelboxpft_year" ) + root.panelboxdbh.season = file.path(gnow$main,"panelboxdbh_season") + root.panelboxdbh.year = file.path(gnow$main,"panelboxdbh_year" ) + if (! file.exists(root.panelbox.season )){ + dir.create(root.panelbox.season ) + }#end if + if (! file.exists(root.panelboxpft.season)){ + dir.create(root.panelboxpft.season) + }#end if + if (! file.exists(root.panelboxpft.year )){ + dir.create(root.panelboxpft.year ) + }#end if + if (! file.exists(root.panelboxdbh.season)){ + dir.create(root.panelboxdbh.season) + }#end if + if (! file.exists(root.panelboxdbh.year )){ + dir.create(root.panelboxdbh.year ) + }#end if + if (! file.exists(gnow$panelbox.year )){ + dir.create(gnow$panelbox.year ) + }#end if + #------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------# + # Create one directory by season. # + #------------------------------------------------------------------------------# + gnow$panelbox.season = file.path(root.panelbox.season,season.suffix) + for (e in season.mp){ + #----- Create one directory for each season. -------------------------------# + if (! file.exists(gnow$panelbox.season[e])){ + dir.create(gnow$panelbox.season[e]) + }#end if + #---------------------------------------------------------------------------# + + }#end for + #------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------# + # Create one directory by PFT or DBH. # + #------------------------------------------------------------------------------# + gnow$panelboxpft.year = file.path(root.panelboxpft.year,pft.suffix) + gnow$panelboxdbh.year = file.path(root.panelboxdbh.year,dbh.suffix) + for (f in 1:(n.pft-1)){ + #----- Create one directory for each season. -------------------------------# + if (! file.exists(gnow$panelboxpft.year[f])){ + dir.create(gnow$panelboxpft.year[f]) + }#end if + #---------------------------------------------------------------------------# + }#end for + for (d in 1:n.dbh){ + #----- Create one directory for each season. -------------------------------# + if (! file.exists(gnow$panelboxdbh.year[d])){ + dir.create(gnow$panelboxdbh.year[d]) + }#end if + #---------------------------------------------------------------------------# + }#end for + #------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------# + # Create one directory by season, then by PFT or DBH. # + #------------------------------------------------------------------------------# + #----- Combine all PFT/DBHs. and seasons. -------------------------------------# + pft.season.suffix = expand.grid(pft.suffix,season.suffix) + dbh.season.suffix = expand.grid(dbh.suffix,season.suffix) + #----- Create the "branches". -------------------------------------------------# + branch.panelboxpft.season = apply( X = pft.season.suffix + , MARGIN = 1 + , FUN = paste + , collapse ="/" + )#end apply + branch.panelboxdbh.season = apply( X = dbh.season.suffix + , MARGIN = 1 + , FUN = paste + , collapse ="/" + )#end apply + gnow$panelboxpft.season = matrix( data = file.path(root.panelboxpft.season + ,branch.panelboxpft.season) + , nrow = n.pft + , ncol = n.season + )#end matrix + gnow$panelboxdbh.season = matrix( data = file.path(root.panelboxdbh.season + ,branch.panelboxdbh.season) + , nrow = n.dbh + , ncol = n.season + )#end matrix + for (e in season.mp){ + for (f in 1:(n.pft-1)){ + #----- Create one directory for each PFT. -------------------------------# + if (! file.exists(dirname(gnow$panelboxpft.season[f,e]))){ + dir.create(dirname(gnow$panelboxpft.season[f,e])) + }#end if + #------------------------------------------------------------------------# + + + #----- Create one directory for each season. ----------------------------# + if (! file.exists(gnow$panelboxpft.season[f,e])){ + dir.create(gnow$panelboxpft.season[f,e]) + }#end if + #------------------------------------------------------------------------# + }#end for + for (d in 1:n.dbh){ + #----- Create one directory for each DBH. -------------------------------# + if (! file.exists(dirname(gnow$panelboxdbh.season[d,e]))){ + dir.create(dirname(gnow$panelboxdbh.season[d,e])) + }#end if + #------------------------------------------------------------------------# + + + #----- Create one directory for each season. ----------------------------# + if (! file.exists(gnow$panelboxdbh.season[d,e])){ + dir.create(gnow$panelboxdbh.season[d,e]) + }#end if + #------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------# + }#end for + #------------------------------------------------------------------------------# }#end if #---------------------------------------------------------------------------------# @@ -1011,7 +1159,8 @@ for (g in loop.global){ #----- File name for this global scenario. ---------------------------------------------# rdata.global = file.path( rdata.path - , paste("4dbh_sim_",simul$global$level[g],".RData",sep="") + , paste(comp.prefix,"_sim_",simul$global$level[g],".RData" + ,sep="") )#end file.path #---------------------------------------------------------------------------------------# @@ -1558,14 +1707,31 @@ for (g in loop.global){ #---------------------------------------------------------------------------# + + #---------------------------------------------------------------------------# + # Find the X and Y limits for all data (same scale for all). # + #---------------------------------------------------------------------------# + var.now = eft[[var.vname]]$ts + every = apply(X=var.now,MARGIN=c(1,3,4),FUN=mean,na.rm=TRUE) + xlimit = pretty.xylim( u = year.use + , fracexp = 0.0 + , is.log = FALSE + )#end pretty.xylim + ylimit.season = pretty.xylim( u = every[,,1:n.season.mp] + , fracexp = 0.0 + , is.log = var.plog + )#end pretty.xylim + ylimit.year = pretty.xylim( u = every[,,n.season] + , fracexp = 0.0 + , is.log = var.plog + )#end pretty.xylim + #---------------------------------------------------------------------------# + + + #----- Load variable. ------------------------------------------------------# - this = apply( X = eft[[var.vname]]$ts[sel,,,] - , MARGIN = c(1,3,4) - , FUN = mean - , na.rm = TRUE - )#end apply - xlimit = pretty.xylim(year.use ,fracexp=0.0,is.log=FALSE ) - ylimit = pretty.xylim(this[,,1:n.season.mp],fracexp=0.0,is.log=var.plog) + this = every[sel,,] + ylimit = ylimit.season #---------------------------------------------------------------------------# @@ -1715,8 +1881,7 @@ for (g in loop.global){ #----- Update limits. ------------------------------------------------------# - xlimit = pretty.xylim(year.use ,fracexp=0.0 ,is.log=FALSE ) - ylimit = pretty.xylim(this[,,n.season],fracexp=fracexp,is.log=var.plog) + ylimit = ylimit.year #---------------------------------------------------------------------------# @@ -1773,7 +1938,7 @@ for (g in loop.global){ par(par.now) plot.new() plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") - legend ( x = "topright" + legend ( x = "bottom" , inset = inset , legend = now$desc , col = now$colour @@ -1837,21 +2002,39 @@ for (g in loop.global){ # If this is a PFT variable, plot the time series by PFT and season. # #------------------------------------------------------------------------------# if (var.plt && is.pft){ + + + + #---------------------------------------------------------------------------# + # Grab all data (to build the same scale for all). # + #---------------------------------------------------------------------------# + var.now = eft[[var.vname]]$tspft + every = apply(X=var.now,MARGIN=c(1,3,4,5),FUN=mean,na.rm=TRUE) + xlimit = pretty.xylim( u = year.use + , fracexp = 0.0 + , is.log = FALSE + )#end pretty.xylim + #---------------------------------------------------------------------------# + + + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# # Plot the seasonal time series for each PFT. # #---------------------------------------------------------------------------# for (f in 1:(n.pft-1)){ + + #----- Load variable. ---------------------------------------------------# - this = apply( X = eft[[var.vname]]$tspft[sel,,,,] - , MARGIN = c(1,3,4,5) - , FUN = mean - , na.rm = TRUE - )#end apply - xlimit = pretty.xylim(year.use - ,fracexp=0.0,is.log=FALSE ) - ylimit = pretty.xylim(this[,,1:n.season.mp,f] - ,fracexp=0.0,is.log=var.plog) + this = every[sel,,,] + #------------------------------------------------------------------------# + + + #----- Y limits for this PFT. -------------------------------------------# + ylimit = pretty.xylim( u = every[,,-n.season,f] + , fracexp = 0.0 + , is.log = var.plog + )#end pretty.xylim #------------------------------------------------------------------------# @@ -2001,11 +2184,11 @@ for (g in loop.global){ #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# # Plot the time series by PFT (annual, one panel for each PFT). # #---------------------------------------------------------------------------# - - - #----- Reset limits. -------------------------------------------------------# - xlimit = pretty.xylim(year.use,fracexp=0.0,is.log=FALSE ) - ylimit = pretty.xylim(this[,,n.season,pft.mp],fracexp=0.0,is.log=var.plog) + #----- Set limits. ---------------------------------------------------------# + ylimit = pretty.xylim( u = every[,, n.season,pft.mp] + , fracexp = 0.0 + , is.log = var.plog + )#end pretty.xylim #---------------------------------------------------------------------------# @@ -2154,6 +2337,8 @@ for (g in loop.global){ + + #.................................................................................# #.................................................................................# # Plot the box plots. # @@ -2192,17 +2377,41 @@ for (g in loop.global){ #---------------------------------------------------------------------------# - #----- Load variable and set y axis. ---------------------------------------# + + #---------------------------------------------------------------------------# + # Load all simulations for y axis. # + #---------------------------------------------------------------------------# if (n.real == 1){ - this = eft[[var.vname]]$ts[sel,1,,1:n.season.mp] + every = eft[[var.vname]]$ts[,1,y.sel,] }else{ - this = apply( X = eft[[var.vname]]$ts[sel,,y.sel,1:n.season.mp] - , MARGIN = c(1,2,4) - , FUN = mean - , na.rm = TRUE - )#end apply + every = apply( X = eft[[var.vname]]$ts[,,y.sel,] + , MARGIN = c(1,2,4) + , FUN = mean + , na.rm = TRUE + )#end apply }#end if - ylimit = pretty.xylim(u=this,fracexp=0.0,is.log=var.plog) + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Get the range for all simulations (fixed y coordinates. # + #---------------------------------------------------------------------------# + ylimit.season = pretty.xylim( u = every[,,-n.season] + , fracexp = 0.0 + , is.log = var.plog + )#end pretty.xylimit + ylimit.year = pretty.xylim( u = every[,, n.season] + , fracexp = 0.0 + , is.log = var.plog + )#end pretty.xylimit + #---------------------------------------------------------------------------# + + + + #----- Load variable. ------------------------------------------------------# + this = every[sel,,-n.season] + ylimit = ylimit.season #---------------------------------------------------------------------------# @@ -2354,16 +2563,8 @@ for (g in loop.global){ #----- Load variable and set y axis. ---------------------------------------# - if (n.real == 1){ - this = eft[[var.vname]]$ts[sel,1,,n.season] - }else{ - this = apply( X = eft[[var.vname]]$ts[sel,,y.sel,n.season] - , MARGIN = c(1,2) - , FUN = mean - , na.rm = TRUE - )#end apply - }#end if - ylimit = pretty.xylim(u=this,fracexp=0.0,is.log=var.plog) + this = every[sel,,n.season] + ylimit = ylimit.year #---------------------------------------------------------------------------# @@ -2467,17 +2668,34 @@ for (g in loop.global){ #---------------------------------------------------------------------------# - #----- Load variable and set y axis. ---------------------------------------# + + #---------------------------------------------------------------------------# + # Load all simulations for y axis. # + #---------------------------------------------------------------------------# if (n.real == 1){ - this = eft[[var.vname]]$tspft[sel,1,,1:n.season.mp,pft.bp] + every = eft[[var.vname]]$tspft[,1,y.sel,,pft.bp] }else{ - this = apply( X = eft[[var.vname]]$tspft[sel,,y.sel,1:n.season.mp,pft.bp] - , MARGIN = c(1,2,4,5) - , FUN = mean - , na.rm = TRUE - )#end apply + every = apply( X = eft[[var.vname]]$tspft[,,y.sel,,pft.bp] + , MARGIN = c(1,2,4,5) + , FUN = mean + , na.rm = TRUE + )#end apply }#end if - ylimit = pretty.xylim(u=this,fracexp=0.0,is.log=var.plog) + ylimit.season = pretty.xylim( u = every[,,-n.season,] + , fracexp = 0.0 + , is.log = var.plog + )#end pretty.xylim + ylimit.year = pretty.xylim( u = every[,, n.season,] + , fracexp = 0.0 + , is.log = var.plog + )#end pretty.xylim + #---------------------------------------------------------------------------# + + + + #----- Load variable and set y axis. ---------------------------------------# + this = every[sel,,-n.season,] + ylimit = ylimit.season #---------------------------------------------------------------------------# @@ -2655,16 +2873,8 @@ for (g in loop.global){ #----- Load variable and set y axis. ---------------------------------------# - if (n.real == 1){ - this = eft[[var.vname]]$tspft[sel,1,,n.season,pft.bp] - }else{ - this = apply( X = eft[[var.vname]]$tspft[sel,,y.sel,n.season,pft.bp] - , MARGIN = c(1,2,4) - , FUN = mean - , na.rm = TRUE - )#end apply - }#end if - ylimit = pretty.xylim(u=this,fracexp=0.0,is.log=var.plog) + this = every[sel,, n.season,] + ylimit = ylimit.year #---------------------------------------------------------------------------# @@ -2798,18 +3008,34 @@ for (g in loop.global){ #---------------------------------------------------------------------------# - #----- Load variable and set y axis. ---------------------------------------# + + #---------------------------------------------------------------------------# + # Load all simulations for y axis. # + #---------------------------------------------------------------------------# if (n.real == 1){ - this = eft[[var.vname]]$tspftdbh[sel,1,,1:n.season.mp,,n.pft] + every = eft[[var.vname]]$tspftdbh[,1,y.sel,,,n.pft] }else{ - this = eft[[var.vname]]$tspftdbh[sel,,y.sel,1:n.season.mp,,n.pft] - this = apply( X = this - , MARGIN = c(1,2,4,5) - , FUN = mean - , na.rm = TRUE - )#end apply + every = apply( X = eft[[var.vname]]$tspftdbh[,,y.sel,,,n.pft] + , MARGIN = c(1,2,4,5) + , FUN = mean + , na.rm = TRUE + )#end apply }#end if - ylimit = pretty.xylim(u=this,fracexp=0.0,is.log=var.plog) + ylimit.season = pretty.xylim( u = every[,,-n.season,] + , fracexp = 0.0 + , is.log = var.plog + )#end pretty.xylim + ylimit.year = pretty.xylim( u = every[,, n.season,] + , fracexp = 0.0 + , is.log = var.plog + )#end pretty.xylim + #---------------------------------------------------------------------------# + + + + #----- Load variable and set y axis. ---------------------------------------# + this = every[sel,,-n.season,] + ylimit = ylimit.season #---------------------------------------------------------------------------# @@ -2984,18 +3210,10 @@ for (g in loop.global){ #---------------------------------------------------------------------------# + #----- Load variable and set y axis. ---------------------------------------# - if (n.real == 1){ - this = eft[[var.vname]]$tspftdbh[sel,1,,n.season,,n.pft] - }else{ - this = eft[[var.vname]]$tspftdbh[sel,,y.sel,n.season,,n.pft] - this = apply( X = this - , MARGIN = c(1,2,4) - , FUN = mean - , na.rm = TRUE - )#end apply - }#end if - ylimit = pretty.xylim(u=this,fracexp=0.0,is.log=var.plog) + this = every[sel,, n.season,] + ylimit = ylimit.year #---------------------------------------------------------------------------# @@ -3123,6 +3341,30 @@ for (g in loop.global){ # Boxplots by PFT, DBH, and season... # #------------------------------------------------------------------------------# if (var.plt & is.dbh){ + #---------------------------------------------------------------------------# + # Load all simulations for y axis. # + #---------------------------------------------------------------------------# + if (n.real == 1){ + every = eft[[var.vname]]$tspftdbh[,1,y.sel,,,pft.mp] + }else{ + every = apply( X = eft[[var.vname]]$tspftdbh[,,y.sel,,,pft.mp] + , MARGIN = c(1,2,4,5,6) + , FUN = mean + , na.rm = TRUE + )#end apply + }#end if + ylimit.season = pretty.xylim( u = every[,,-n.season,,] + , fracexp = 0.0 + , is.log = var.plog + )#end pretty.xylim + ylimit.year = pretty.xylim( u = every[,, n.season,,] + , fracexp = 0.0 + , is.log = var.plog + )#end pretty.xylim + #---------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------# # Loop over each season. # #---------------------------------------------------------------------------# @@ -3138,18 +3380,14 @@ for (g in loop.global){ + #----- Load variable and set y axis. ------------------------------------# - if (n.real == 1){ - this = eft[[var.vname]]$tspftdbh[sel,1,,e,,pft.mp] + this = every[sel,,e,,] + if (e == n.season){ + ylimit = ylimit.year }else{ - this = eft[[var.vname]]$tspftdbh[sel,,y.sel,e,,pft.mp] - this = apply( X = this - , MARGIN = c(1,2,4,5) - , FUN = mean - , na.rm = TRUE - )#end apply + ylimit = ylimit.season }#end if - ylimit = pretty.xylim(u=this,fracexp=0.0,is.log=var.plog) #------------------------------------------------------------------------# @@ -3353,18 +3591,38 @@ for (g in loop.global){ #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# # Plot the bar plot by PFT, DBH class, and season. # #---------------------------------------------------------------------------# + every = eft[[var.vname]]$tspftdbh[,,y.sel,,,pft.bp,drop=FALSE] + every = apply( X = every + , MARGIN = c(1,4,5,6) + , FUN = mean + , na.rm = TRUE + )#end apply + every = apply( X = every, MARGIN = c(1,2,3) , FUN = cumsum) + every = aperm( a = every, perm = c(2,4,1,3) ) + #---------------------------------------------------------------------------# - #----- Load variable and set y axis. ---------------------------------------# - if (n.real == 1){ - this.5d = eft[[var.vname]]$tspftdbh[sel,1,,1:n.season.mp,,pft.bp] - dimnames(this.5d)[[1]] = now$key - this = apply(X=this.5d,MARGIN=c(1,3,4,5),FUN=mean,na.rm=TRUE) - }else{ - this.6d = eft[[var.vname]]$tspftdbh[sel,,y.sel,1:n.season.mp,,pft.bp] - dimnames(this.6d)[[1]] = now$key - this = apply(X=this.6d,MARGIN=c(1,4,5,6),FUN=mean,na.rm=TRUE) - }#end if + + + #---------------------------------------------------------------------------# + # Find the y limits: # + #---------------------------------------------------------------------------# + yrange.season = pretty.xylim( u = c(0,every[,,,-n.season]) + , fracexp = 0.0 + , is.log = FALSE + )#end pretty.xylim + ylimit.season = pretty.xylim( u = c(0,every[,,,-n.season]) + , fracexp = -0.06 + , is.log = FALSE + )#end pretty.xylim + yrange.year = pretty.xylim( u = c(0,every[,,, n.season]) + , fracexp = 0.0 + , is.log = FALSE + )#end pretty.xylim + ylimit.year = pretty.xylim( u = c(0,every[,,, n.season]) + , fracexp = -0.06 + , is.log = FALSE + )#end pretty.xylim #---------------------------------------------------------------------------# @@ -3372,12 +3630,13 @@ for (g in loop.global){ #---------------------------------------------------------------------------# # Stack the PFT data. # #---------------------------------------------------------------------------# - this = apply(X=this,MARGIN=c(1,2,3),FUN=cumsum) - this = aperm(a=this,perm=c(2,4,1,3)) + this = every[sel,,,] + dimnames(this)[[1]] = now$key #---------------------------------------------------------------------------# + #---------------------------------------------------------------------------# # Combine simulation and size into one dimension. # #---------------------------------------------------------------------------# @@ -3419,7 +3678,7 @@ for (g in loop.global){ , dim = dim(this)[1:2] , dimnames = dimnames(this)[1:2] )#end array - refer.col = array( data = rep(now$colour,times=dim(this)[2]) + refer.col = array( data = rep(now$colour,times=dim(this)[2]) , dim = dim(this)[1:2] , dimnames = dimnames(this)[1:2] )#end array @@ -3443,8 +3702,8 @@ for (g in loop.global){ #----- Find the limits for the plot. ---------------------------------------# xlimit = range(c(xat,xgrid)) - yrange = pretty.xylim(u=c(ybottom,ytop),fracexp= 0.00,is.log=var.plog) - ylimit = pretty.xylim(u=yrange,fracexp=-0.06,is.log=var.plog) + yrange = yrange.season + ylimit = ylimit.season #---------------------------------------------------------------------------# @@ -3644,113 +3903,37 @@ for (g in loop.global){ #---------------------------------------------------------------------------# - #----- Load variable and set y axis. ---------------------------------------# - if (n.real == 1){ - this.4d = eft[[var.vname]]$tspftdbh[sel,1,,n.season,,pft.bp] - dimnames(this.4d)[[1]] = now$key - this = apply(X=this.4d,MARGIN=c(1,3,4),FUN=mean,na.rm=TRUE) - }else{ - this.5d = eft[[var.vname]]$tspftdbh[sel,,y.sel,n.season,,pft.bp] - dimnames(this.5d)[[1]] = now$key - this = apply(X=this.5d,MARGIN=c(1,4,5),FUN=mean,na.rm=TRUE) - }#end if + #----- Set the title. ------------------------------------------------------# + letitre = paste(var.desc," (Annual means)","\n",out.desc,sep="") + lex = paste("DBH class [cm]") + ley = paste(var.desc," [",var.unit,"]",sep=" ") #---------------------------------------------------------------------------# - #---------------------------------------------------------------------------# - # Stack the PFT data. # - #---------------------------------------------------------------------------# - this = apply(X=this,MARGIN=c(1,2),FUN=cumsum) - this = aperm(a=this,perm=c(2,3,1)) - #---------------------------------------------------------------------------# - - - #---------------------------------------------------------------------------# - # Combine simulation and size into one dimension. # - #---------------------------------------------------------------------------# - dth = dim(this) - dnth = list( paste(rep(dimnames(this)[[1]],times=dth[2]) - ,rep(dimnames(this)[[2]],each =dth[1]) - ,sep=".") - , dimnames(this)[[3]] - )#end list - this = array(data= this,dim=c(dth[1]*dth[2],dth[3]),dimnames=dnth) + #----- Find the limits for the plot. ---------------------------------------# + xlimit = range(c(xat,xgrid)) + yrange = yrange.year + ylimit = ylimit.year #---------------------------------------------------------------------------# - #----- Set the title. ------------------------------------------------------# - letitre = paste(var.desc," (Annual means)","\n",out.desc,sep="") - lex = paste("DBH class [cm]") - ley = paste(var.desc," [",var.unit,"]",sep=" ") + + #------- Fix the y for stacked. --------------------------------------------# + lbottom = yrange[1] - 0.06 * diff(yrange) + 0 * ybottom + ltop = yrange[1] - 0.02 * diff(yrange) + 0 * ybottom #---------------------------------------------------------------------------# #---------------------------------------------------------------------------# - # Find the x dimensions. # - #---------------------------------------------------------------------------# - xleft = ( rep(sequence(n.now),times=n.dbh) - + rep((n.now+1)*(sequence(n.dbh)-1),each=n.now) ) - 0.9 - xright = xleft + 0.8 - xat = seq(from=0.5*n.now,by=n.now+1,length.out=n.dbh) - xgrid = seq(from=0,by=n.now+1,length.out=n.dbh+1)-0.5 + # Loop over all formats. # #---------------------------------------------------------------------------# - - - - #---------------------------------------------------------------------------# - # Find out the colour filling. # - #---------------------------------------------------------------------------# - fill.col = array( data = rep(pft.colour[pft.bp],each=dim(this)[1]) - , dim = dim(this)[1:2] - , dimnames = dimnames(this)[1:2] - )#end array - refer.col = array( data = rep(now$colour,times=dim(this)[2]) - , dim = dim(this)[1:2] - , dimnames = dimnames(this)[1:2] - )#end array - xleft = array( data = xleft - , dim = dim(this)[1:2] - , dimnames = dimnames(this)[1:2] - )#end array - xright = array( data = xright - , dim = dim(this)[1:2] - , dimnames = dimnames(this)[1:2] - )#end array - #----- Vertical. Force the bottom to be zero. ------------------------------# - ybottom = this - ybottom[,-1] = ybottom[,-dim(ybottom)[2]] - ybottom[, 1] = 0 - ytop = this - #---------------------------------------------------------------------------# - - - - - #----- Find the limits for the plot. ---------------------------------------# - xlimit = range(c(xat,xgrid)) - yrange = pretty.xylim(u=c(ybottom,ytop),fracexp= 0.00,is.log=var.plog) - ylimit = pretty.xylim(u=yrange,fracexp=-0.06,is.log=var.plog) - #---------------------------------------------------------------------------# - - - - #------- Fix the y for stacked. --------------------------------------------# - lbottom = yrange[1] - 0.06 * diff(yrange) + 0 * ybottom - ltop = yrange[1] - 0.02 * diff(yrange) + 0 * ybottom - #---------------------------------------------------------------------------# - - - - #---------------------------------------------------------------------------# - # Loop over all formats. # - #---------------------------------------------------------------------------# - for (o in 1:nout){ - #----- Get the path. ----------------------------------------------------# - now.outpath = outpath[[o]]$global[[g]]$scenario[[s]]$barplot.year - #------------------------------------------------------------------------# + for (o in 1:nout){ + #----- Get the path. ----------------------------------------------------# + now.outpath = outpath[[o]]$global[[g]]$scenario[[s]]$barplot.year + #------------------------------------------------------------------------# #----- Open file or display. --------------------------------------------# @@ -3777,7 +3960,7 @@ for (g in loop.global){ # to fit the legend. # #------------------------------------------------------------------------# par.orig = par(no.readonly = TRUE) - emat = matrix(c(3,3,1,2),ncol=2,nrow=2,byrow=T) + emat = matrix(c(3,3,1,2),ncol=2,nrow=2,byrow=TRUE) par(par.user) layout(mat=emat,heights=c(5,1)) #------------------------------------------------------------------------# @@ -3837,9 +4020,9 @@ for (g in loop.global){ #----- Add the bar plot using rect, so we can change the line width. ----# rect( xleft = xleft - , ybottom = ybottom + , ybottom = ybottom[,,n.season] , xright = xright - , ytop = ytop + , ytop = ytop [,,n.season] , density = -1 , col = fill.col , border = foreground @@ -3851,9 +4034,9 @@ for (g in loop.global){ #----- Add the simulation colour beneath the bars. ----------------------# rect( xleft = xleft - , ybottom = lbottom + , ybottom = lbottom[,,n.season] , xright = xright - , ytop = ltop + , ytop = ltop [,,n.season] , density = -1 , col = refer.col , border = refer.col @@ -3885,7 +4068,6 @@ for (g in loop.global){ - #.................................................................................# #.................................................................................# # Plot the parameter space. # @@ -4275,7 +4457,7 @@ for (g in loop.global){ #----- Retrieve all simulations from this panel. ---------------------------------# - this = eft[[var.vname]]$ts[,,y.sel,] + this = eft[[var.vname]]$ts[,,y.sel,,drop=FALSE] this = apply(X = this, FUN = mean, MARGIN = c(1,4),na.rm=TRUE) o.dim = dim(this)[-1] ; names(o.dim ) = "season" o.dname = dimnames(this)[-1] ; names(o.dname) = "season" @@ -4335,6 +4517,8 @@ for (g in loop.global){ )#end apply a.dim = sapply(X=c(p.dim,s.dim ,o.dim ),FUN=c) a.dnames = c(p.level,s.level,o.dname) + x.zero = scenario[[1]]$value[match(s.default[[1]],scenario[[1]]$key)] + y.zero = scenario[[2]]$value[match(s.default[[2]],scenario[[2]]$key)] }#end if #---------------------------------------------------------------------------------# @@ -4395,12 +4579,12 @@ for (g in loop.global){ #---------------------------------------------------------------------------# # Find the axis limits and labels. # #---------------------------------------------------------------------------# - xlimit = pretty.xylim(u=now$value,fracexp=0.,is.log=FALSE) - ylimit = pretty.xylim(u=this.var ,fracexp=0.,is.log=FALSE) + xlimit = pretty.xylim(u=now$value,fracexp=0.,is.log=FALSE) + ylimit = pretty.xylim(u=this.var ,fracexp=0.,is.log=FALSE) x.value = now$value x.label = now$label - lex = now$alabel - ley = paste(var.desc," [",var.unit,"]",sep="") + lex = now$alabel + ley = paste(var.desc," [",var.unit,"]",sep="") #---------------------------------------------------------------------------# }else{ @@ -4435,7 +4619,8 @@ for (g in loop.global){ xright = var.brks[ -1] ybottom = rep(0,times=n.brks) ytop = rep(1,times=n.brks) - legat = var.brks + legat = pretty(var.brks,n=10) + legat = legat[legat >= min(var.brks) & legat <= max(var.brks)] #---------------------------------------------------------------------------# }#end if #------------------------------------------------------------------------------# @@ -4488,7 +4673,7 @@ for (g in loop.global){ # Split the plotting window. # #---------------------------------------------------------------------------# par(par.user) - par(oma = c(0.2,3,4.5,0)) + par(oma = c(0.2,5.1,4.5,0)) layout( mat = rbind(lo.panel$mat+1,rep(1,times=lo.panel$ncol)) , heights = c(rep(4/lo.panel$nrow,lo.panel$nrow),1) )#end layout @@ -4514,13 +4699,13 @@ for (g in loop.global){ , xpd = TRUE )#end legend }else{ - par(mar=c(3,3,2,3)+0.1) + par(mar=c(2,3,2,3)+0.1) plot.new() plot.window(xlim=range(xleft,xright),ylim=range(ybottom,ytop) ,xaxs="i",yaxs="i") rect(xleft=xleft,ybottom=ybottom,xright=xright,ytop=ytop,col=var.colours) box() - axis(side=1,at=legat) + axis.rt(side=1,at=legat,las=5,off=0.5) title(main=paste(var.desc," change [",var.unit,"]",sep="") ,xlab="",ylab="",cex.main=cex.main) }#end if @@ -4572,9 +4757,9 @@ for (g in loop.global){ image(x=x.value,y=y.value,z=this.var[p,,],col=var.colours ,breaks=var.brks ,xaxt="n",yaxt="n",main=lesub,cex.main=cex.main,xlab="",ylab="") - text (x=0,y=0,labels="0",col=foreground,font=2,cex=2) - if (bottom) axis(side=1,at=x.value,labels=x.label) - if (left) axis(side=2,at=y.value,labels=y.label) + text (x=x.zero,y=y.zero,labels="0",col=foreground,font=2,cex=2) + if (bottom) axis(side=1,at=x.value,labels=x.label,cex.axis=1.1,las=1) + if (left) axis(side=2,at=y.value,labels=y.label,cex.axis=1.1,las=1) }#end if #------------------------------------------------------------------------# }#end for @@ -4588,10 +4773,11 @@ for (g in loop.global){ par(las=0) if (n.scenario == 1){ mtext(side=1,text=lex,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) + mtext(side=2,text=ley,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) }else{ mtext(side=1,text=lex,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff.im) + mtext(side=2,text=ley,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff.im) }#end if - mtext(side=2,text=ley ,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) mtext(side=3,text=letitre,outer=TRUE,cex=1.10,font=2) #---------------------------------------------------------------------------# @@ -4689,6 +4875,8 @@ for (g in loop.global){ )#end apply a.dim = sapply(X=c(p.dim,s.dim ,o.dim ),FUN=c) a.dnames = c(p.level,s.level,o.dname) + x.zero = scenario[[1]]$value[match(s.default[[1]],scenario[[1]]$key)] + y.zero = scenario[[2]]$value[match(s.default[[2]],scenario[[2]]$key)] }#end if #---------------------------------------------------------------------------------# @@ -4872,14 +5060,14 @@ for (g in loop.global){ , xpd = TRUE )#end legend }else{ - par(mar=c(3,3,2,3)+0.1) + par(mar=c(2,3,2,3)+0.1) plot.new() plot.window(xlim=range(xleft,xright),ylim=range(ybottom,ytop) ,xaxs="i",yaxs="i") rect(xleft=xleft,ybottom=ybottom,xright=xright,ytop=ytop ,col=var.colours) box() - axis(side=1,at=legat) + axis.rt(side=1,at=legat,las=5,off=0.5) title(main=paste(var.desc," change [",var.unit,"]",sep="") ,xlab="",ylab="",cex.main=cex.main) }#end if @@ -4932,9 +5120,9 @@ for (g in loop.global){ ,z=this.var[p,,],col=var.colours,breaks=var.brks ,xaxt="n",yaxt="n",main=lesub,xlab="",ylab="" ,cex.main=cex.main) - text (x=0,y=0,labels="0",col=foreground,font=2,cex=2) - if (bottom) axis(side=1,at=x.value,labels=x.label) - if (left) axis(side=2,at=y.value,labels=y.label) + text (x=x.zero,y=y.zero,labels="0",col=foreground,font=2,cex=2) + if (bottom) axis(side=1,at=x.value,labels=x.label,las=1) + if (left) axis(side=2,at=y.value,labels=y.label,las=1) }#end if #---------------------------------------------------------------------# }#end for @@ -4948,10 +5136,11 @@ for (g in loop.global){ par(las=0) if (n.scenario == 1){ mtext(side=1,text=lex,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) + mtext(side=2,text=ley,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) }else{ mtext(side=1,text=lex,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff.im) + mtext(side=2,text=ley,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff.im) }#end if - mtext(side=2,text=ley ,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) mtext(side=3,text=letitre,outer=TRUE,cex=1.0,font=2) #------------------------------------------------------------------------# @@ -5051,6 +5240,8 @@ for (g in loop.global){ )#end apply a.dim = sapply(X=c(p.dim,s.dim ,o.dim ),FUN=c) a.dnames = c(p.level,s.level,o.dname) + x.zero = scenario[[1]]$value[match(s.default[[1]],scenario[[1]]$key)] + y.zero = scenario[[2]]$value[match(s.default[[2]],scenario[[2]]$key)] }#end if #---------------------------------------------------------------------------------# @@ -5234,14 +5425,14 @@ for (g in loop.global){ , xpd = TRUE )#end legend }else{ - par(mar=c(3,3,2,3)+0.1) + par(mar=c(2,3,2,3)+0.1) plot.new() plot.window(xlim=range(xleft,xright),ylim=range(ybottom,ytop) ,xaxs="i",yaxs="i") rect(xleft=xleft,ybottom=ybottom,xright=xright,ytop=ytop ,col=var.colours) box() - axis(side=1,at=legat) + axis.rt(side=1,at=legat,las=5,off=0.5) title(main=paste(var.desc," change [",var.unit,"]",sep="") ,xlab="",ylab="",cex.main=cex.main) }#end if @@ -5294,9 +5485,9 @@ for (g in loop.global){ ,z=this.var[p,,],col=var.colours,breaks=var.brks ,xaxt="n",yaxt="n",main=lesub,xlab="",ylab="" ,cex.main=cex.main) - text (x=0,y=0,labels="0",col=foreground,font=2,cex=2) - if (bottom) axis(side=1,at=x.value,labels=x.label) - if (left) axis(side=2,at=y.value,labels=y.label) + text (x=x.zero,y=y.zero,labels="0",col=foreground,font=2,cex=2) + if (bottom) axis(side=1,at=x.value,labels=x.label,las=1) + if (left) axis(side=2,at=y.value,labels=y.label,las=1) }#end if #---------------------------------------------------------------------# }#end for @@ -5310,10 +5501,11 @@ for (g in loop.global){ par(las=0) if (n.scenario == 1){ mtext(side=1,text=lex,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) + mtext(side=2,text=ley,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) }else{ mtext(side=1,text=lex,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff.im) + mtext(side=2,text=ley,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff.im) }#end if - mtext(side=2,text=ley ,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) mtext(side=3,text=letitre,outer=TRUE,cex=1.0,font=2) #------------------------------------------------------------------------# @@ -5341,6 +5533,377 @@ for (g in loop.global){ #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + + + #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + # Now we plot bo plots comparing the different scenarios. We use the same list # + # of variables as the time series. # + #---------------------------------------------------------------------------------------# + if (n.scenario == 2){ + if (is.na(plot.panelbox)){ + loop.panelbox = sequence(npanel.box)[1] + }else if (plot.panelbox){ + loop.panelbox = sequence(npanel.box) + }else{ + loop.panelbox = integer(0) + }#end if + }else{ + loop.panelbox = integer(0) + }#end if + cat(" * Plot the multiple box plot...","\n") + for (v in loop.panelbox){ + #----- Copy variable info. ----------------------------------------------------------# + var.vname = panel.box$vname [v] + var.desc = panel.box$desc [v] + var.quant = panel.box$quant [v] + var.low = panel.box$low [v] + var.high = panel.box$high [v] + var.unit = panel.box$unit [v] + var.plog = panel.box$plog [v] + is.pft = panel.box$pft [v] + is.dbh = panel.box$dbh [v] + var.plt = panel.box$plt [v] + var.pft = paste(var.vname,"pft" ,sep="") + var.pftdbh = paste(var.vname,"pftdbh",sep="") + if (var.plog){ + var.xylog = "y" + }else{ + var.xylog = "" + }#end if + #------------------------------------------------------------------------------------# + + + + #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# + # Decide whether to plot or not. # + #------------------------------------------------------------------------------------# + if (var.plt){ + cat (" . ",var.desc,"...","\n") + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# + # Plot the box plot by panel. # + #---------------------------------------------------------------------------------# + + + + #----- Retrieve all simulations from this panel. ---------------------------------# + every = eft[[var.vname]]$ts[,,y.sel,,drop=FALSE] + every = apply(X = every, FUN = mean, MARGIN = c(1,2,4),na.rm=TRUE) + r.dim = dim(every)[-1] ; names(o.dim ) = c("real","season") + r.dname = dimnames(every)[-1] ; names(o.dname) = c("real","season") + r.seq = mapply( FUN = sequence, nvec = o.dim, SIMPLIFY = FALSE) + o.dim = dim(every)[-1] ; names(o.dim ) = c("real","season") + o.dname = dimnames(every)[-1] ; names(o.dname) = c("real","season") + o.seq = mapply( FUN = sequence, nvec = o.dim, SIMPLIFY = FALSE) + #---------------------------------------------------------------------------------# + + + + #----- Find the panel information. -----------------------------------------------# + p.type = simul$dim.type == "panel" + p.name = "panel" + p.ind = simul$panel$index [g.sel] + p.key = simul$key[g.sel,p.type] + p.level = list(simul$panel$level) + p.dim = simul$panel$n.level + p.seq = sequence(p.dim) + names(p.level) = "panel" + #---------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------# + # Retrieve the scenarios and the default for each scenario. # + #---------------------------------------------------------------------------------# + s.type = simul$dim.type == "scenario" + s.name = names(simul$dim[s.type]) + s.dim = simul$dim[s.type] + s.dnames = simul$panel$level + s.value = simul$value[g.sel,s.type] + s.key = simul$key[g.sel,s.type] + s.level = split(x=simul$scenario$level,f=simul$scenario$idxcol) + names(s.level) = names(simul$dim)[s.type] + #---------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------# + # Find the array names. # + #---------------------------------------------------------------------------------# + s.default = split(simul$default[s.type],index(simul$default[s.type])) + s.ind = data.frame( apply(X=simul$scenario$index,MARGIN=2,FUN="[",g.sel) + , stringsAsFactors = FALSE + )#end data.frame + a.dim = sapply(X=c(p.dim,s.dim ,o.dim ),FUN=c) + a.dnames = c(p.level,s.level,o.dname) + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Build the lists to split the array by simulation and panel. # + #---------------------------------------------------------------------------------# + if (! is.list(p.ind)) p.ind = list(p.ind) + if (! is.list(s.ind)) s.ind = list(s.ind) + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # Split the stuff into panels, and create the scenario maps. # + #---------------------------------------------------------------------------------# + this = array(data=every,dim=a.dim,dimnames=a.dnames) + n.a.dim = length(a.dim) + #---------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------# + # Find the dimensions of each scenario. # + #---------------------------------------------------------------------------------# + sc1 = scenario[[1]] + n.sc1 = length(sc1$key) + sc2 = scenario[[2]] + n.sc2 = length(sc2$key) + n.lax = n.sc2 + 2 + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Set up the box plot colour. # + #---------------------------------------------------------------------------------# + bp.colour = rep( x = c("transparent",sc2$colour,"transparent") + , times = n.sc1 + )#end rep + #---------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------# + # Find the x based on the 1st scenario (n.sc1) and the 2nd scenario # + # (n.lax). # + #---------------------------------------------------------------------------------# + xlimit = c(0,n.sc1*n.lax) + 0.5 + xat = seq(from=1 + 0.5*(n.lax-1), to=n.sc1*n.lax, by=n.lax) + xgrid = seq(from=0.5, to=(n.sc1+1)*n.lax - 0.5*(n.lax-1),by=n.lax) + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Find the y limits. # + #---------------------------------------------------------------------------------# + ylimit.season = pretty.xylim( u = every[,,-n.season] + , fracexp = 0.0 + , is.log = var.plog + )#end pretty.xylim + ylimit.year = pretty.xylim( u = every[,, n.season] + , fracexp = 0.0 + , is.log = var.plog + )#end pretty.xylim + #---------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------# + # Plot the data by season. # + #---------------------------------------------------------------------------------# + for (e in 1:n.season){ + #------------------------------------------------------------------------------# + # Keep the current season only. # + #------------------------------------------------------------------------------# + bye = n.a.dim + inds = as.matrix(expand.grid(mapply(FUN=sequence,a.dim[-bye]))) + inds = cbind(inds,e) + this.var = array(this[inds],dim=a.dim[-bye],dimnames=a.dnames[-bye]) + #------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------# + # Set the annotation and some auxiliary variables. # + #------------------------------------------------------------------------------# + letitre = paste("Scenario comparision - ",var.desc,"\n",season.desc[e] + ," - ",global.desc,sep="") + #------------------------------------------------------------------------------# + + + + #----- Axis labels. -----------------------------------------------------------# + lex = scenario[[1]]$alabel + ley = paste(var.desc," [",var.unit,"]",sep="") + #------------------------------------------------------------------------------# + + + #----- Y limit. ---------------------------------------------------------------# + ylimit = if(e == n.season){ylimit.year}else{ylimit.season} + #------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------# + # Loop over all output formats. # + #------------------------------------------------------------------------------# + for (o in 1:nout){ + #----- Get the path and create file name. ----------------------------------# + if ( e == n.season){ + now.outpath = outpath[[o]]$global[[g]]$panelbox.year + fichier = paste(now.outpath,"/panelbox-year-" + ,var.vname,"-",global.suffix,".",outform[o],sep="") + }else{ + now.outpath = outpath[[o]]$global[[g]]$panelbox.season[e] + fichier = paste(now.outpath,"/panelbox-",season.suffix[e],"-" + ,var.vname,"-",global.suffix,".",outform[o],sep="") + }#end if + #---------------------------------------------------------------------------# + + + #----- Open the file. ------------------------------------------------------# + if (outform[o] == "x11"){ + X11(width=size$width,height=size$height,pointsize=ptsz) + }else if(outform[o] == "png"){ + png(filename=fichier,width=size$width*depth + ,height=size$height*depth,pointsize=ptsz,res=depth) + }else if(outform[o] == "eps"){ + postscript(file=fichier,width=size$width,height=size$height + ,pointsize=ptsz,paper=size$paper) + }else if(outform[o] == "pdf"){ + pdf(file=fichier,onefile=FALSE,width=size$width + ,height=size$height,pointsize=ptsz,paper=size$paper) + }#end if + #---------------------------------------------------------------------------# + + + + #----- Save the margins to avoid losing the data. --------------------------# + par.orig = par(no.readonly = TRUE) + mar.orig = par.orig$mar + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Split the plotting window. # + #---------------------------------------------------------------------------# + par(par.user) + par(oma = c(0.2,3,4.5,0)) + layout( mat = rbind(lo.panel$mat+1,rep(1,times=lo.panel$ncol)) + , heights = c(rep(5/lo.panel$nrow,lo.panel$nrow),1) + )#end layout + #---------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------# + # Plot the legend. # + #---------------------------------------------------------------------------# + par(mar=c(0.2,4.1,0.1,2.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1)) + legend( x = "bottom" + , inset = 0.0 + , legend = sc2$desc + , fill = sc2$colour + , border = foreground + , ncol = min(n.sc2,max(3,pretty.box(n=n.sc2)$ncol)) + , title = eval(substitute(expression(bold(a)),list(a=sc2$alabel))) + , cex = 0.9 + , xpd = TRUE + )#end legend + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Loop over all panels, and plot the data for this season. # + #---------------------------------------------------------------------------# + loop.panel = sequence(max(1,simul$panel$n.level )) + for (p in loop.panel){ + + #------------------------------------------------------------------------# + # Find out where is this box going, and set up axes and margins. # + #------------------------------------------------------------------------# + left = TRUE # (p %% lo.panel$ncol) == 1 + right = (p %% lo.panel$ncol) == 0 + top = p <= lo.panel$ncol + bottom = p > (lo.panel$nrow - 1) * lo.panel$ncol + mar.now = c(1 + 3*bottom,1 + 1*left,1 + 2*top,1 + 1*right) + 0.1 + #------------------------------------------------------------------------# + + + + #----- Make the sub-title. ----------------------------------------------# + lesub=simul$panel$title[p] + #------------------------------------------------------------------------# + + + + #----- Create the temporary box plot list. ------------------------------# + pp.this = this.var[p,,,] + empty = array( data = NA + , dim = dim(pp.this)[-2] + , dimnames = dimnames(pp.this)[-2] + )#end array + pp.this = abind(aaa=empty,pp.this,zzz=empty,along=2) + ai = arrayInd(sequence(length(pp.this)),.dim=dim(pp.this)) + bp.plot = split(x=pp.this,f=list(ai[,2],ai[,1])) + #------------------------------------------------------------------------# + + + #----- Set the window. --------------------------------------------------# + par(mar = mar.now) + plot.new() + plot.window(xlim=xlimit,ylim=ylimit,xaxt="n",yaxt="n") + if (bottom) axis(side=1,at=xat,labels=sc1$label) + if (left) axis(side=2) + box() + title(main=lesub,cex.main=cex.main) + if (plotgrid) abline(h=axTicks(2),col=grid.colour,lty="solid") + if (plotgrid) abline(v=xgrid,col=grey.fg,lty="solid") + + #----- Add the box plot, without the x axis. ----------------------------# + boxplot(x=bp.plot,col=bp.colour,notch=notch,add=TRUE,show.names=FALSE + ,yaxt="n") + #------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------# + # Plot the global title. # + #---------------------------------------------------------------------------# + par(las=0) + mtext(side=1,text=lex,outer=TRUE,adj=mtext.xadj,padj=mtext.xoff) + mtext(side=2,text=ley,outer=TRUE,adj=mtext.yadj,padj=mtext.yoff) + mtext(side=3,text=letitre,outer=TRUE,cex=1.10,font=2) + #---------------------------------------------------------------------------# + + + + #----- Close the device. ---------------------------------------------------# + if (outform[o] == "x11"){ + locator(n=1) + dev.off() + }else{ + dev.off() + }#end if + clean.tmp() + #---------------------------------------------------------------------------# + }#end for (o in 1:nout) + #------------------------------------------------------------------------------# + }#end for (e in 1:n.season) + #---------------------------------------------------------------------------------# + }#end if + #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# + }#end for (v in 1:npanel.box) + #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# + + rm(eft) }#end for (g in loop.global) #==========================================================================================# diff --git a/ED/Template/delall.sh b/ED/Template/delall.sh index 5f5be2200..b4746aa06 100755 --- a/ED/Template/delall.sh +++ b/ED/Template/delall.sh @@ -118,81 +118,82 @@ do initmode=`echo ${oi} | awk '{print $13}'` iscenario=`echo ${oi} | awk '{print $14}'` isizepft=`echo ${oi} | awk '{print $15}'` - polyisoil=`echo ${oi} | awk '{print $16}'` - polyntext=`echo ${oi} | awk '{print $17}'` - polysand=`echo ${oi} | awk '{print $18}'` - polyclay=`echo ${oi} | awk '{print $19}'` - polydepth=`echo ${oi} | awk '{print $20}'` - polysoilbc=`echo ${oi} | awk '{print $21}'` - polysldrain=`echo ${oi} | awk '{print $22}'` - polycol=`echo ${oi} | awk '{print $23}'` - slzres=`echo ${oi} | awk '{print $24}'` - queue=`echo ${oi} | awk '{print $25}'` - metdriver=`echo ${oi} | awk '{print $26}'` - dtlsm=`echo ${oi} | awk '{print $27}'` - vmfactc3=`echo ${oi} | awk '{print $28}'` - vmfactc4=`echo ${oi} | awk '{print $29}'` - mphototrc3=`echo ${oi} | awk '{print $30}'` - mphototec3=`echo ${oi} | awk '{print $31}'` - mphotoc4=`echo ${oi} | awk '{print $32}'` - bphotoblc3=`echo ${oi} | awk '{print $33}'` - bphotonlc3=`echo ${oi} | awk '{print $34}'` - bphotoc4=`echo ${oi} | awk '{print $35}'` - kwgrass=`echo ${oi} | awk '{print $36}'` - kwtree=`echo ${oi} | awk '{print $37}'` - gammac3=`echo ${oi} | awk '{print $38}'` - gammac4=`echo ${oi} | awk '{print $39}'` - d0grass=`echo ${oi} | awk '{print $40}'` - d0tree=`echo ${oi} | awk '{print $41}'` - alphac3=`echo ${oi} | awk '{print $42}'` - alphac4=`echo ${oi} | awk '{print $43}'` - klowco2=`echo ${oi} | awk '{print $44}'` - decomp=`echo ${oi} | awk '{print $45}'` - rrffact=`echo ${oi} | awk '{print $46}'` - growthresp=`echo ${oi} | awk '{print $47}'` - lwidthgrass=`echo ${oi} | awk '{print $48}'` - lwidthbltree=`echo ${oi} | awk '{print $49}'` - lwidthnltree=`echo ${oi} | awk '{print $50}'` - q10c3=`echo ${oi} | awk '{print $51}'` - q10c4=`echo ${oi} | awk '{print $52}'` - h2olimit=`echo ${oi} | awk '{print $53}'` - imortscheme=`echo ${oi} | awk '{print $54}'` - ddmortconst=`echo ${oi} | awk '{print $55}'` - isfclyrm=`echo ${oi} | awk '{print $56}'` - icanturb=`echo ${oi} | awk '{print $57}'` - ubmin=`echo ${oi} | awk '{print $58}'` - ugbmin=`echo ${oi} | awk '{print $59}'` - ustmin=`echo ${oi} | awk '{print $60}'` - gamm=`echo ${oi} | awk '{print $61}'` - gamh=`echo ${oi} | awk '{print $62}'` - tprandtl=`echo ${oi} | awk '{print $63}'` - ribmax=`echo ${oi} | awk '{print $64}'` - atmco2=`echo ${oi} | awk '{print $65}'` - thcrit=`echo ${oi} | awk '{print $66}'` - smfire=`echo ${oi} | awk '{print $67}'` - ifire=`echo ${oi} | awk '{print $68}'` - fireparm=`echo ${oi} | awk '{print $69}'` - ipercol=`echo ${oi} | awk '{print $70}'` - runoff=`echo ${oi} | awk '{print $71}'` - imetrad=`echo ${oi} | awk '{print $72}'` - ibranch=`echo ${oi} | awk '{print $73}'` - icanrad=`echo ${oi} | awk '{print $74}'` - crown=`echo ${oi} | awk '{print $75}'` - ltransvis=`echo ${oi} | awk '{print $76}'` - lreflectvis=`echo ${oi} | awk '{print $77}'` - ltransnir=`echo ${oi} | awk '{print $78}'` - lreflectnir=`echo ${oi} | awk '{print $79}'` - orienttree=`echo ${oi} | awk '{print $80}'` - orientgrass=`echo ${oi} | awk '{print $81}'` - clumptree=`echo ${oi} | awk '{print $82}'` - clumpgrass=`echo ${oi} | awk '{print $83}'` - ivegtdyn=`echo ${oi} | awk '{print $84}'` - igndvap=`echo ${oi} | awk '{print $85}'` - iphen=`echo ${oi} | awk '{print $86}'` - iallom=`echo ${oi} | awk '{print $87}'` - ibigleaf=`echo ${oi} | awk '{print $88}'` - irepro=`echo ${oi} | awk '{print $89}'` - treefall=`echo ${oi} | awk '{print $90}'` + iage=`echo ${oi} | awk '{print $16}'` + polyisoil=`echo ${oi} | awk '{print $17}'` + polyntext=`echo ${oi} | awk '{print $18}'` + polysand=`echo ${oi} | awk '{print $19}'` + polyclay=`echo ${oi} | awk '{print $20}'` + polydepth=`echo ${oi} | awk '{print $21}'` + polysoilbc=`echo ${oi} | awk '{print $22}'` + polysldrain=`echo ${oi} | awk '{print $23}'` + polycol=`echo ${oi} | awk '{print $24}'` + slzres=`echo ${oi} | awk '{print $25}'` + queue=`echo ${oi} | awk '{print $26}'` + metdriver=`echo ${oi} | awk '{print $27}'` + dtlsm=`echo ${oi} | awk '{print $28}'` + vmfactc3=`echo ${oi} | awk '{print $29}'` + vmfactc4=`echo ${oi} | awk '{print $30}'` + mphototrc3=`echo ${oi} | awk '{print $31}'` + mphototec3=`echo ${oi} | awk '{print $32}'` + mphotoc4=`echo ${oi} | awk '{print $33}'` + bphotoblc3=`echo ${oi} | awk '{print $34}'` + bphotonlc3=`echo ${oi} | awk '{print $35}'` + bphotoc4=`echo ${oi} | awk '{print $36}'` + kwgrass=`echo ${oi} | awk '{print $37}'` + kwtree=`echo ${oi} | awk '{print $38}'` + gammac3=`echo ${oi} | awk '{print $39}'` + gammac4=`echo ${oi} | awk '{print $40}'` + d0grass=`echo ${oi} | awk '{print $41}'` + d0tree=`echo ${oi} | awk '{print $42}'` + alphac3=`echo ${oi} | awk '{print $43}'` + alphac4=`echo ${oi} | awk '{print $44}'` + klowco2=`echo ${oi} | awk '{print $45}'` + decomp=`echo ${oi} | awk '{print $46}'` + rrffact=`echo ${oi} | awk '{print $47}'` + growthresp=`echo ${oi} | awk '{print $48}'` + lwidthgrass=`echo ${oi} | awk '{print $49}'` + lwidthbltree=`echo ${oi} | awk '{print $50}'` + lwidthnltree=`echo ${oi} | awk '{print $51}'` + q10c3=`echo ${oi} | awk '{print $52}'` + q10c4=`echo ${oi} | awk '{print $53}'` + h2olimit=`echo ${oi} | awk '{print $54}'` + imortscheme=`echo ${oi} | awk '{print $55}'` + ddmortconst=`echo ${oi} | awk '{print $56}'` + isfclyrm=`echo ${oi} | awk '{print $57}'` + icanturb=`echo ${oi} | awk '{print $58}'` + ubmin=`echo ${oi} | awk '{print $59}'` + ugbmin=`echo ${oi} | awk '{print $60}'` + ustmin=`echo ${oi} | awk '{print $61}'` + gamm=`echo ${oi} | awk '{print $62}'` + gamh=`echo ${oi} | awk '{print $63}'` + tprandtl=`echo ${oi} | awk '{print $64}'` + ribmax=`echo ${oi} | awk '{print $65}'` + atmco2=`echo ${oi} | awk '{print $66}'` + thcrit=`echo ${oi} | awk '{print $67}'` + smfire=`echo ${oi} | awk '{print $68}'` + ifire=`echo ${oi} | awk '{print $69}'` + fireparm=`echo ${oi} | awk '{print $70}'` + ipercol=`echo ${oi} | awk '{print $71}'` + runoff=`echo ${oi} | awk '{print $72}'` + imetrad=`echo ${oi} | awk '{print $73}'` + ibranch=`echo ${oi} | awk '{print $74}'` + icanrad=`echo ${oi} | awk '{print $75}'` + crown=`echo ${oi} | awk '{print $76}'` + ltransvis=`echo ${oi} | awk '{print $77}'` + lreflectvis=`echo ${oi} | awk '{print $78}'` + ltransnir=`echo ${oi} | awk '{print $79}'` + lreflectnir=`echo ${oi} | awk '{print $80}'` + orienttree=`echo ${oi} | awk '{print $81}'` + orientgrass=`echo ${oi} | awk '{print $82}'` + clumptree=`echo ${oi} | awk '{print $83}'` + clumpgrass=`echo ${oi} | awk '{print $84}'` + ivegtdyn=`echo ${oi} | awk '{print $85}'` + igndvap=`echo ${oi} | awk '{print $86}'` + iphen=`echo ${oi} | awk '{print $87}'` + iallom=`echo ${oi} | awk '{print $88}'` + ibigleaf=`echo ${oi} | awk '{print $89}'` + irepro=`echo ${oi} | awk '{print $90}'` + treefall=`echo ${oi} | awk '{print $91}'` #---------------------------------------------------------------------------------------# diff --git a/ED/Template/epost.sh b/ED/Template/epost.sh index d9e01b336..91e7d14c4 100755 --- a/ED/Template/epost.sh +++ b/ED/Template/epost.sh @@ -1,6 +1,7 @@ #!/bin/bash . ${HOME}/.bashrc here=`pwd` # ! Main path +myself=`whoami` # ! You diskthere='/n/moorcroftfs2' # ! Disk where the output files are thisqueue='moorcroft_6100b' # ! Queue where jobs should be submitted lonlat=${here}'/joborder.txt' # ! File with the job instructions @@ -12,6 +13,7 @@ useperiod='t' # Which bounds should I use? (Ignored by plot_eval_ed.r) # 'a' -- All period # 't' -- One eddy flux tower met cycle # 'u' -- User defined period, defined by the variables below. + # 'f' -- Force the tower cycle. You may need to edit the script, though yusera=1972 # First year to use yuserz=2011 # Last year to use #----- Check whether to use openlava or typical job submission. ---------------------------# @@ -31,14 +33,18 @@ outform='c("eps","png","pdf")' # x11 - On screen (deprecated on shell scripts) # eps - Encapsulated Post Script # pdf - Portable Document Format #----- DBH classes. -----------------------------------------------------------------------# -idbhtype=2 # Type of DBH class +idbhtype=3 # Type of DBH class # 1 -- Every 10 cm until 100cm; > 100cm # 2 -- 0-10; 10-20; 20-35; 35-50; 50-70; > 70 (cm) - # 3 -- 0-10; 10-35; 35-70; > 70 (cm) + # 3 -- 0-10; 10-35; 35-55; > 55 (cm) #----- Default background colour. ---------------------------------------------------------# -background=2 # 0 -- White +background=0 # 0 -- White # 1 -- Pitch black # 2 -- Dark grey +#----- Trim the year comparison for tower years only? -------------------------------------# +efttrim="TRUE" +#----- Path with R scripts that are useful. -----------------------------------------------# +rscpath="/n/Moorcroft_Lab/Users/mlongo/EDBRAMS/R-utils" #------------------------------------------------------------------------------------------# @@ -94,6 +100,18 @@ monthsdrought="c(12,1,2,3)" # List of months that get drought, if it starts late #------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# Use the general path. # +#------------------------------------------------------------------------------------------# +if [ ${myself} == "mlongo" ] +then + rscpath="/n/moorcroft_data/mlongo/util/Rsc" +fi +#------------------------------------------------------------------------------------------# + + #------------------------------------------------------------------------------------------# # If this is an openlava run, load the openlava stuff. # #------------------------------------------------------------------------------------------# @@ -197,81 +215,82 @@ do initmode=`echo ${oi} | awk '{print $13}'` iscenario=`echo ${oi} | awk '{print $14}'` isizepft=`echo ${oi} | awk '{print $15}'` - polyisoil=`echo ${oi} | awk '{print $16}'` - polyntext=`echo ${oi} | awk '{print $17}'` - polysand=`echo ${oi} | awk '{print $18}'` - polyclay=`echo ${oi} | awk '{print $19}'` - polydepth=`echo ${oi} | awk '{print $20}'` - polysoilbc=`echo ${oi} | awk '{print $21}'` - polysldrain=`echo ${oi} | awk '{print $22}'` - polycol=`echo ${oi} | awk '{print $23}'` - slzres=`echo ${oi} | awk '{print $24}'` - queue=`echo ${oi} | awk '{print $25}'` - metdriver=`echo ${oi} | awk '{print $26}'` - dtlsm=`echo ${oi} | awk '{print $27}'` - vmfactc3=`echo ${oi} | awk '{print $28}'` - vmfactc4=`echo ${oi} | awk '{print $29}'` - mphototrc3=`echo ${oi} | awk '{print $30}'` - mphototec3=`echo ${oi} | awk '{print $31}'` - mphotoc4=`echo ${oi} | awk '{print $32}'` - bphotoblc3=`echo ${oi} | awk '{print $33}'` - bphotonlc3=`echo ${oi} | awk '{print $34}'` - bphotoc4=`echo ${oi} | awk '{print $35}'` - kwgrass=`echo ${oi} | awk '{print $36}'` - kwtree=`echo ${oi} | awk '{print $37}'` - gammac3=`echo ${oi} | awk '{print $38}'` - gammac4=`echo ${oi} | awk '{print $39}'` - d0grass=`echo ${oi} | awk '{print $40}'` - d0tree=`echo ${oi} | awk '{print $41}'` - alphac3=`echo ${oi} | awk '{print $42}'` - alphac4=`echo ${oi} | awk '{print $43}'` - klowco2=`echo ${oi} | awk '{print $44}'` - decomp=`echo ${oi} | awk '{print $45}'` - rrffact=`echo ${oi} | awk '{print $46}'` - growthresp=`echo ${oi} | awk '{print $47}'` - lwidthgrass=`echo ${oi} | awk '{print $48}'` - lwidthbltree=`echo ${oi} | awk '{print $49}'` - lwidthnltree=`echo ${oi} | awk '{print $50}'` - q10c3=`echo ${oi} | awk '{print $51}'` - q10c4=`echo ${oi} | awk '{print $52}'` - h2olimit=`echo ${oi} | awk '{print $53}'` - imortscheme=`echo ${oi} | awk '{print $54}'` - ddmortconst=`echo ${oi} | awk '{print $55}'` - isfclyrm=`echo ${oi} | awk '{print $56}'` - icanturb=`echo ${oi} | awk '{print $57}'` - ubmin=`echo ${oi} | awk '{print $58}'` - ugbmin=`echo ${oi} | awk '{print $59}'` - ustmin=`echo ${oi} | awk '{print $60}'` - gamm=`echo ${oi} | awk '{print $61}'` - gamh=`echo ${oi} | awk '{print $62}'` - tprandtl=`echo ${oi} | awk '{print $63}'` - ribmax=`echo ${oi} | awk '{print $64}'` - atmco2=`echo ${oi} | awk '{print $65}'` - thcrit=`echo ${oi} | awk '{print $66}'` - smfire=`echo ${oi} | awk '{print $67}'` - ifire=`echo ${oi} | awk '{print $68}'` - fireparm=`echo ${oi} | awk '{print $69}'` - ipercol=`echo ${oi} | awk '{print $70}'` - runoff=`echo ${oi} | awk '{print $71}'` - imetrad=`echo ${oi} | awk '{print $72}'` - ibranch=`echo ${oi} | awk '{print $73}'` - icanrad=`echo ${oi} | awk '{print $74}'` - crown=`echo ${oi} | awk '{print $75}'` - ltransvis=`echo ${oi} | awk '{print $76}'` - lreflectvis=`echo ${oi} | awk '{print $77}'` - ltransnir=`echo ${oi} | awk '{print $78}'` - lreflectnir=`echo ${oi} | awk '{print $79}'` - orienttree=`echo ${oi} | awk '{print $80}'` - orientgrass=`echo ${oi} | awk '{print $81}'` - clumptree=`echo ${oi} | awk '{print $82}'` - clumpgrass=`echo ${oi} | awk '{print $83}'` - ivegtdyn=`echo ${oi} | awk '{print $84}'` - igndvap=`echo ${oi} | awk '{print $85}'` - iphen=`echo ${oi} | awk '{print $86}'` - iallom=`echo ${oi} | awk '{print $87}'` - ibigleaf=`echo ${oi} | awk '{print $88}'` - irepro=`echo ${oi} | awk '{print $89}'` - treefall=`echo ${oi} | awk '{print $90}'` + iage=`echo ${oi} | awk '{print $16}'` + polyisoil=`echo ${oi} | awk '{print $17}'` + polyntext=`echo ${oi} | awk '{print $18}'` + polysand=`echo ${oi} | awk '{print $19}'` + polyclay=`echo ${oi} | awk '{print $20}'` + polydepth=`echo ${oi} | awk '{print $21}'` + polysoilbc=`echo ${oi} | awk '{print $22}'` + polysldrain=`echo ${oi} | awk '{print $23}'` + polycol=`echo ${oi} | awk '{print $24}'` + slzres=`echo ${oi} | awk '{print $25}'` + queue=`echo ${oi} | awk '{print $26}'` + metdriver=`echo ${oi} | awk '{print $27}'` + dtlsm=`echo ${oi} | awk '{print $28}'` + vmfactc3=`echo ${oi} | awk '{print $29}'` + vmfactc4=`echo ${oi} | awk '{print $30}'` + mphototrc3=`echo ${oi} | awk '{print $31}'` + mphototec3=`echo ${oi} | awk '{print $32}'` + mphotoc4=`echo ${oi} | awk '{print $33}'` + bphotoblc3=`echo ${oi} | awk '{print $34}'` + bphotonlc3=`echo ${oi} | awk '{print $35}'` + bphotoc4=`echo ${oi} | awk '{print $36}'` + kwgrass=`echo ${oi} | awk '{print $37}'` + kwtree=`echo ${oi} | awk '{print $38}'` + gammac3=`echo ${oi} | awk '{print $39}'` + gammac4=`echo ${oi} | awk '{print $40}'` + d0grass=`echo ${oi} | awk '{print $41}'` + d0tree=`echo ${oi} | awk '{print $42}'` + alphac3=`echo ${oi} | awk '{print $43}'` + alphac4=`echo ${oi} | awk '{print $44}'` + klowco2=`echo ${oi} | awk '{print $45}'` + decomp=`echo ${oi} | awk '{print $46}'` + rrffact=`echo ${oi} | awk '{print $47}'` + growthresp=`echo ${oi} | awk '{print $48}'` + lwidthgrass=`echo ${oi} | awk '{print $49}'` + lwidthbltree=`echo ${oi} | awk '{print $50}'` + lwidthnltree=`echo ${oi} | awk '{print $51}'` + q10c3=`echo ${oi} | awk '{print $52}'` + q10c4=`echo ${oi} | awk '{print $53}'` + h2olimit=`echo ${oi} | awk '{print $54}'` + imortscheme=`echo ${oi} | awk '{print $55}'` + ddmortconst=`echo ${oi} | awk '{print $56}'` + isfclyrm=`echo ${oi} | awk '{print $57}'` + icanturb=`echo ${oi} | awk '{print $58}'` + ubmin=`echo ${oi} | awk '{print $59}'` + ugbmin=`echo ${oi} | awk '{print $60}'` + ustmin=`echo ${oi} | awk '{print $61}'` + gamm=`echo ${oi} | awk '{print $62}'` + gamh=`echo ${oi} | awk '{print $63}'` + tprandtl=`echo ${oi} | awk '{print $64}'` + ribmax=`echo ${oi} | awk '{print $65}'` + atmco2=`echo ${oi} | awk '{print $66}'` + thcrit=`echo ${oi} | awk '{print $67}'` + smfire=`echo ${oi} | awk '{print $68}'` + ifire=`echo ${oi} | awk '{print $69}'` + fireparm=`echo ${oi} | awk '{print $70}'` + ipercol=`echo ${oi} | awk '{print $71}'` + runoff=`echo ${oi} | awk '{print $72}'` + imetrad=`echo ${oi} | awk '{print $73}'` + ibranch=`echo ${oi} | awk '{print $74}'` + icanrad=`echo ${oi} | awk '{print $75}'` + crown=`echo ${oi} | awk '{print $76}'` + ltransvis=`echo ${oi} | awk '{print $77}'` + lreflectvis=`echo ${oi} | awk '{print $78}'` + ltransnir=`echo ${oi} | awk '{print $79}'` + lreflectnir=`echo ${oi} | awk '{print $80}'` + orienttree=`echo ${oi} | awk '{print $81}'` + orientgrass=`echo ${oi} | awk '{print $82}'` + clumptree=`echo ${oi} | awk '{print $83}'` + clumpgrass=`echo ${oi} | awk '{print $84}'` + ivegtdyn=`echo ${oi} | awk '{print $85}'` + igndvap=`echo ${oi} | awk '{print $86}'` + iphen=`echo ${oi} | awk '{print $87}'` + iallom=`echo ${oi} | awk '{print $88}'` + ibigleaf=`echo ${oi} | awk '{print $89}'` + irepro=`echo ${oi} | awk '{print $90}'` + treefall=`echo ${oi} | awk '{print $91}'` #---------------------------------------------------------------------------------------# @@ -284,10 +303,11 @@ do #----- Retrieve some information from ED2IN. -------------------------------------------# - iphysiol=`grep -i NL%IPHYSIOL ${here}/${polyname}/ED2IN | awk '{print $3}'` - iallom=`grep -i NL%IALLOM ${here}/${polyname}/ED2IN | awk '{print $3}'` - metcyca=`grep -i NL%METCYC1 ${here}/${polyname}/ED2IN | awk '{print $3}'` - metcycz=`grep -i NL%METCYCF ${here}/${polyname}/ED2IN | awk '{print $3}'` + iphysiol=`grep -i NL%IPHYSIOL ${here}/${polyname}/ED2IN | awk '{print $3}'` + iallom=`grep -i NL%IALLOM ${here}/${polyname}/ED2IN | awk '{print $3}'` + metcyca=`grep -i NL%METCYC1 ${here}/${polyname}/ED2IN | awk '{print $3}'` + metcycz=`grep -i NL%METCYCF ${here}/${polyname}/ED2IN | awk '{print $3}'` + klight=`grep -i NL%DDMORT_CONST ${here}/${polyname}/ED2IN | awk '{print $3}'` #---------------------------------------------------------------------------------------# @@ -313,6 +333,75 @@ do + #---- The eddy flux tower cycles. ------------------------------------------------------# + case ${polyiata} in + gyf) + eftyeara=2004 + eftyearz=2009 + ;; + cax) + eftyeara=1999 + eftyearz=2003 + ;; + m34) + eftyeara=1999 + eftyearz=2005 + ;; + s67) + eftyeara=2001 + eftyearz=2010 + ;; + s77) + eftyeara=2001 + eftyearz=2005 + ;; + s83) + eftyeara=2000 + eftyearz=2003 + ;; + pnz) + eftyeara=2004 + eftyearz=2004 + ;; + ban) + eftyeara=2004 + eftyearz=2006 + ;; + rja) + eftyeara=1999 + eftyearz=2002 + ;; + fns) + eftyeara=1999 + eftyearz=2002 + ;; + pdg) + eftyeara=2001 + eftyearz=2003 + ;; + hvd) + eftyeara=1992 + eftyearz=2003 + ;; + *) + eftyeara=${metcyca} + eftyearz=${metcycz} + ;; + esac + #---------------------------------------------------------------------------------------# + + + + #---- Cheat and force the met cycle to be the tower cycle. -----------------------------# + if [ ${useperiod} == "f" ] + then + metcyca=${eftyeara} + metcycz=${eftyearz} + fi + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# # Switch years in case this is a specific drought run. # #---------------------------------------------------------------------------------------# @@ -347,7 +436,7 @@ do # Set up the time and output variables according to the script. # #------------------------------------------------------------------------------------# case ${script} in - read_monthly.r|plot_monthly.r|plot_yearly.r|plot_ycomp.r|plot_census.r|plot_povray.r) + read_monthly.r|plot_monthly.r|plot_yearly.r|plot_ycomp.r|plot_census.r|plot_povray.r|r10_monthly.r) #---------------------------------------------------------------------------------# # Scripts that are based on monthly means. The set up is the same, the only # # difference is in the output names. # @@ -383,6 +472,13 @@ do thisyeara=${yusera} thisyearz=${yuserz} #------------------------------------------------------------------------------# + + elif [ ${useperiod} == 'f' ] + then + #----- The user said to use the eddy flux period. -----------------------------# + thisyeara=${eftyeara} + thisyearz=${eftyearz} + #------------------------------------------------------------------------------# else #----- Grab all years that the simulation is supposed to run. -----------------# thisyeara=${yeara} @@ -410,6 +506,12 @@ do epostlsf='rmon_epost.lsf' epostjob='eb-rmon-'${polyname} ;; + r10_monthly.r) + epostout='rm10_epost.out' + epostsh='rm10_epost.sh' + epostlsf='rm10_epost.lsf' + epostjob='eb-rm10-'${polyname} + ;; plot_monthly.r) epostout='pmon_epost.out' epostsh='pmon_epost.sh' @@ -690,48 +792,54 @@ do #----- Copy the R script from the Template folder to the local path. ----------------# cp -f ${here}/Template/${script} ${here}/${polyname} + scriptnow="${here}/${polyname}/${script}" #------------------------------------------------------------------------------------# #----- Switch the keywords by the current settings. ---------------------------------# - sed -i s@thispoly@${polyname}@g ${here}/${polyname}/${script} - sed -i s@thisoutroot@${outroot}@g ${here}/${polyname}/${script} - sed -i s@thispath@${here}@g ${here}/${polyname}/${script} - sed -i s@thatpath@${there}@g ${here}/${polyname}/${script} - sed -i s@thisyeara@${thisyeara}@g ${here}/${polyname}/${script} - sed -i s@thismontha@${thismontha}@g ${here}/${polyname}/${script} - sed -i s@thisdatea@${thisdatea}@g ${here}/${polyname}/${script} - sed -i s@thishoura@${houra}@g ${here}/${polyname}/${script} - sed -i s@thisminua@${minua}@g ${here}/${polyname}/${script} - sed -i s@thisyearz@${thisyearz}@g ${here}/${polyname}/${script} - sed -i s@thismonthz@${thismonthz}@g ${here}/${polyname}/${script} - sed -i s@thisdatez@${datez}@g ${here}/${polyname}/${script} - sed -i s@thishourz@${hourz}@g ${here}/${polyname}/${script} - sed -i s@thisminuz@${minuz}@g ${here}/${polyname}/${script} - sed -i s@thisseasonmona@${seasonmona}@g ${here}/${polyname}/${script} - sed -i s@myphysiol@${iphysiol}@g ${here}/${polyname}/${script} - sed -i s@myallom@${iallom}@g ${here}/${polyname}/${script} - sed -i s@mydroughtmark@${droughtmark}@g ${here}/${polyname}/${script} - sed -i s@mydroughtyeara@${droughtyeara}@g ${here}/${polyname}/${script} - sed -i s@mydroughtyearz@${droughtyearz}@g ${here}/${polyname}/${script} - sed -i s@mymonthsdrought@${monthsdrought}@g ${here}/${polyname}/${script} - sed -i s@myvarcycle@${varcycle}@g ${here}/${polyname}/${script} - sed -i s@thisoutform@${outform}@g ${here}/${polyname}/${script} - sed -i s@mydistrib@${usedistrib}@g ${here}/${polyname}/${script} - sed -i s@mymetcyca@${metcyca}@g ${here}/${polyname}/${script} - sed -i s@mymetcycz@${metcycz}@g ${here}/${polyname}/${script} - sed -i s@mybiocyca@${biocyca}@g ${here}/${polyname}/${script} - sed -i s@mybiocycz@${biocycz}@g ${here}/${polyname}/${script} - sed -i s@myidbhtype@${idbhtype}@g ${here}/${polyname}/${script} - sed -i s@mybackground@${background}@g ${here}/${polyname}/${script} + sed -i s@thispoly@${polyname}@g ${scriptnow} + sed -i s@thisoutroot@${outroot}@g ${scriptnow} + sed -i s@thispath@${here}@g ${scriptnow} + sed -i s@thatpath@${there}@g ${scriptnow} + sed -i s@thisrscpath@${rscpath}@g ${scriptnow} + sed -i s@thisyeara@${thisyeara}@g ${scriptnow} + sed -i s@thismontha@${thismontha}@g ${scriptnow} + sed -i s@thisdatea@${thisdatea}@g ${scriptnow} + sed -i s@thishoura@${houra}@g ${scriptnow} + sed -i s@thisminua@${minua}@g ${scriptnow} + sed -i s@thisyearz@${thisyearz}@g ${scriptnow} + sed -i s@thismonthz@${thismonthz}@g ${scriptnow} + sed -i s@thisdatez@${datez}@g ${scriptnow} + sed -i s@thishourz@${hourz}@g ${scriptnow} + sed -i s@thisminuz@${minuz}@g ${scriptnow} + sed -i s@thisseasonmona@${seasonmona}@g ${scriptnow} + sed -i s@myphysiol@${iphysiol}@g ${scriptnow} + sed -i s@myallom@${iallom}@g ${scriptnow} + sed -i s@mydroughtmark@${droughtmark}@g ${scriptnow} + sed -i s@mydroughtyeara@${droughtyeara}@g ${scriptnow} + sed -i s@mydroughtyearz@${droughtyearz}@g ${scriptnow} + sed -i s@mymonthsdrought@${monthsdrought}@g ${scriptnow} + sed -i s@myvarcycle@${varcycle}@g ${scriptnow} + sed -i s@thisoutform@${outform}@g ${scriptnow} + sed -i s@mydistrib@${usedistrib}@g ${scriptnow} + sed -i s@mymetcyca@${metcyca}@g ${scriptnow} + sed -i s@mymetcycz@${metcycz}@g ${scriptnow} + sed -i s@mybiocyca@${biocyca}@g ${scriptnow} + sed -i s@mybiocycz@${biocycz}@g ${scriptnow} + sed -i s@myidbhtype@${idbhtype}@g ${scriptnow} + sed -i s@mybackground@${background}@g ${scriptnow} + sed -i s@myklight@${klight}@g ${scriptnow} + sed -i s@myefttrim@${efttrim}@g ${scriptnow} + sed -i s@myeftyeara@${eftyeara}@g ${scriptnow} + sed -i s@myeftyearz@${eftyearz}@g ${scriptnow} #------------------------------------------------------------------------------------# #----- Run R to get the plots. ------------------------------------------------------# rbin="R CMD BATCH --no-save --no-restore" - comm="${rbin} ${here}/${polyname}/${script} ${here}/${polyname}/${epostout}" + comm="${rbin} ${scriptnow} ${here}/${polyname}/${epostout}" #------------------------------------------------------------------------------------# diff --git a/ED/Template/make_joborder.r b/ED/Template/make_joborder.r index f9e5a883e..fceed9eb1 100644 --- a/ED/Template/make_joborder.r +++ b/ED/Template/make_joborder.r @@ -23,19 +23,30 @@ outfile = file.path(here,"newjoborder.txt") # Job order #------------------------------------------------------------------------------------------# # Variables that will vary (check the list below for all possibilities. # #------------------------------------------------------------------------------------------# -varrun = list( iata = c("gyf","s67") +# rscen = c("r+000","r-020","r-040","r-060","r-080","r-100") +# tscen = c("t+000","t+100","t+200","t+300") +# escen = paste("real",sprintf("%2.2i",seq(from=0,to=9,by=1)),sep="-") +# +# scenario = apply( X = expand.grid(list(rscen,tscen,escen), stringsAsFactors = FALSE) +# , MARGIN = 1 +# , FUN = paste +# , collapse = "_" +# )#end apply + + +varrun = list( iata = c("gyf","s67","rja") + , iscenario = scenario , iphen = c(-1,2) - , yeara = 1851 - , yearz = 2011 - , queue = "unrestricted_parallel" + , yeara = 1962 + , yearz = 2012 , isoilflg = 2 - , istext = c(0,16,6,2,8,11,17) + , istext = c(16,6,2,8,11) )#end list varlabel = list( iata = varrun$iata + , iscenario = scenario , iphen = paste("iphen",sprintf("%+2.2i",varrun$iphen) ,sep="") - , yeara = "yr1851" - , yearz = "yr2011" - , queue = "unrestricted_parallel" + , yeara = "yr1962" + , yearz = "yr2012" , isoilflg = "isoil02" , istext = paste("stext",sprintf("%2.2i",varrun$istext),sep="") )#end list @@ -100,6 +111,7 @@ default = list( run = "unnamed" , init.mode = 6 , iscenario = "default" , isizepft = 0 + , iage = 20 , isoilflg = 1 , istext = 1 , sand = -1.0 @@ -201,7 +213,7 @@ for (n in 1:nvars) joborder[[names(myruns)[n]]] = myruns[[names(myruns)[n]]] #------------------------------------------------------------------------------------------# # Create a table with room for all simulations. # #------------------------------------------------------------------------------------------# -poitout = poilist[match(joborder$iata,poilist$iata),] +poidata = poilist[match(joborder$iata,poilist$iata),] #------------------------------------------------------------------------------------------# @@ -209,7 +221,7 @@ poitout = poilist[match(joborder$iata,poilist$iata),] # Replace met driver when it is supposed to be tower data. # #------------------------------------------------------------------------------------------# is.tower = joborder$met.driver == "tower" -joborder$met.driver[is.tower] = poitout$met.driver[is.tower] +joborder$met.driver[is.tower] = poidata$met.driver[is.tower] #------------------------------------------------------------------------------------------# @@ -217,11 +229,11 @@ joborder$met.driver[is.tower] = poitout$met.driver[is.tower] # Replace other POI-specific variables as long as they are not to be specified by the # # user settings. # #------------------------------------------------------------------------------------------# -keep = ( names(poitout) %in% names(joborder) - & ( ! names(poitout) %in% names(myruns) ) - & ( ! names(poitout) %in% c("iata","met.driver") ) +keep = ( names(poidata) %in% names(joborder) + & ( ! names(poidata) %in% names(myruns) ) + & ( ! names(poidata) %in% c("iata","met.driver") ) )#end keep -poidata = poitout[,keep] +poidata = poidata[,keep] npois = ncol(poidata) if (npois > 0){ for (p in 1:npois) joborder[[names(poidata)[p]]] = poidata[[names(poidata)[p]]] @@ -229,22 +241,28 @@ if (npois > 0){ #------------------------------------------------------------------------------------------# + #------------------------------------------------------------------------------------------# -# We must overwrite clay and sand in case soil type is one of the variables. # +# Make sure that soil texture is standard when the user provides soil texture and the # +# value is not zero. # #------------------------------------------------------------------------------------------# if ("istext" %in% names(varrun)){ - zero = joborder$istext == 0 - joborder$istext[ zero] = poitout$ntext[zero] - joborder$sand [! zero] = -1 - joborder$clay [! zero] = -1 + sel = joborder$istext != 0 + joborder$sand [ sel] = -1.0 + joborder$clay [ sel] = -1.0 + joborder$istext[! sel] = poidata$istext[! sel] }#end if #------------------------------------------------------------------------------------------# + #------------------------------------------------------------------------------------------# -# Build the name of the simulations. # +# Build the name of the simulations. The polygon name always stays, even if the run is # +# for one site only. # #------------------------------------------------------------------------------------------# -bye = which(sapply(X=varlabel,FUN=length) == 1) +stay = which(names(varlabel) %in% c("iata")) +bye = which(sapply(X=varlabel,FUN=length) == 1) +bye = bye[! bye %in% stay] if (length(bye) > 0) for (b in sort(bye,decreasing=TRUE)) varlabel[[b]] = NULL runname = apply( X = expand.grid(varlabel, stringsAsFactors = FALSE) , MARGIN = 1 @@ -258,6 +276,7 @@ joborder$run = paste(metname,runname,sep="") + #------------------------------------------------------------------------------------------# # Write the joborder table. # #------------------------------------------------------------------------------------------# diff --git a/ED/Template/nc_check_run.sh b/ED/Template/nc_check_run.sh index 623501ee8..5a6c50a13 100755 --- a/ED/Template/nc_check_run.sh +++ b/ED/Template/nc_check_run.sh @@ -38,81 +38,82 @@ do initmode=`echo ${oi} | awk '{print $13}'` iscenario=`echo ${oi} | awk '{print $14}'` isizepft=`echo ${oi} | awk '{print $15}'` - polyisoil=`echo ${oi} | awk '{print $16}'` - polyntext=`echo ${oi} | awk '{print $17}'` - polysand=`echo ${oi} | awk '{print $18}'` - polyclay=`echo ${oi} | awk '{print $19}'` - polydepth=`echo ${oi} | awk '{print $20}'` - polysoilbc=`echo ${oi} | awk '{print $21}'` - polysldrain=`echo ${oi} | awk '{print $22}'` - polycol=`echo ${oi} | awk '{print $23}'` - slzres=`echo ${oi} | awk '{print $24}'` - queue=`echo ${oi} | awk '{print $25}'` - metdriver=`echo ${oi} | awk '{print $26}'` - dtlsm=`echo ${oi} | awk '{print $27}'` - vmfactc3=`echo ${oi} | awk '{print $28}'` - vmfactc4=`echo ${oi} | awk '{print $29}'` - mphototrc3=`echo ${oi} | awk '{print $30}'` - mphototec3=`echo ${oi} | awk '{print $31}'` - mphotoc4=`echo ${oi} | awk '{print $32}'` - bphotoblc3=`echo ${oi} | awk '{print $33}'` - bphotonlc3=`echo ${oi} | awk '{print $34}'` - bphotoc4=`echo ${oi} | awk '{print $35}'` - kwgrass=`echo ${oi} | awk '{print $36}'` - kwtree=`echo ${oi} | awk '{print $37}'` - gammac3=`echo ${oi} | awk '{print $38}'` - gammac4=`echo ${oi} | awk '{print $39}'` - d0grass=`echo ${oi} | awk '{print $40}'` - d0tree=`echo ${oi} | awk '{print $41}'` - alphac3=`echo ${oi} | awk '{print $42}'` - alphac4=`echo ${oi} | awk '{print $43}'` - klowco2=`echo ${oi} | awk '{print $44}'` - decomp=`echo ${oi} | awk '{print $45}'` - rrffact=`echo ${oi} | awk '{print $46}'` - growthresp=`echo ${oi} | awk '{print $47}'` - lwidthgrass=`echo ${oi} | awk '{print $48}'` - lwidthbltree=`echo ${oi} | awk '{print $49}'` - lwidthnltree=`echo ${oi} | awk '{print $50}'` - q10c3=`echo ${oi} | awk '{print $51}'` - q10c4=`echo ${oi} | awk '{print $52}'` - h2olimit=`echo ${oi} | awk '{print $53}'` - imortscheme=`echo ${oi} | awk '{print $54}'` - ddmortconst=`echo ${oi} | awk '{print $55}'` - isfclyrm=`echo ${oi} | awk '{print $56}'` - icanturb=`echo ${oi} | awk '{print $57}'` - ubmin=`echo ${oi} | awk '{print $58}'` - ugbmin=`echo ${oi} | awk '{print $59}'` - ustmin=`echo ${oi} | awk '{print $60}'` - gamm=`echo ${oi} | awk '{print $61}'` - gamh=`echo ${oi} | awk '{print $62}'` - tprandtl=`echo ${oi} | awk '{print $63}'` - ribmax=`echo ${oi} | awk '{print $64}'` - atmco2=`echo ${oi} | awk '{print $65}'` - thcrit=`echo ${oi} | awk '{print $66}'` - smfire=`echo ${oi} | awk '{print $67}'` - ifire=`echo ${oi} | awk '{print $68}'` - fireparm=`echo ${oi} | awk '{print $69}'` - ipercol=`echo ${oi} | awk '{print $70}'` - runoff=`echo ${oi} | awk '{print $71}'` - imetrad=`echo ${oi} | awk '{print $72}'` - ibranch=`echo ${oi} | awk '{print $73}'` - icanrad=`echo ${oi} | awk '{print $74}'` - crown=`echo ${oi} | awk '{print $75}'` - ltransvis=`echo ${oi} | awk '{print $76}'` - lreflectvis=`echo ${oi} | awk '{print $77}'` - ltransnir=`echo ${oi} | awk '{print $78}'` - lreflectnir=`echo ${oi} | awk '{print $79}'` - orienttree=`echo ${oi} | awk '{print $80}'` - orientgrass=`echo ${oi} | awk '{print $81}'` - clumptree=`echo ${oi} | awk '{print $82}'` - clumpgrass=`echo ${oi} | awk '{print $83}'` - ivegtdyn=`echo ${oi} | awk '{print $84}'` - igndvap=`echo ${oi} | awk '{print $85}'` - iphen=`echo ${oi} | awk '{print $86}'` - iallom=`echo ${oi} | awk '{print $87}'` - ibigleaf=`echo ${oi} | awk '{print $88}'` - irepro=`echo ${oi} | awk '{print $89}'` - treefall=`echo ${oi} | awk '{print $90}'` + iage=`echo ${oi} | awk '{print $16}'` + polyisoil=`echo ${oi} | awk '{print $17}'` + polyntext=`echo ${oi} | awk '{print $18}'` + polysand=`echo ${oi} | awk '{print $19}'` + polyclay=`echo ${oi} | awk '{print $20}'` + polydepth=`echo ${oi} | awk '{print $21}'` + polysoilbc=`echo ${oi} | awk '{print $22}'` + polysldrain=`echo ${oi} | awk '{print $23}'` + polycol=`echo ${oi} | awk '{print $24}'` + slzres=`echo ${oi} | awk '{print $25}'` + queue=`echo ${oi} | awk '{print $26}'` + metdriver=`echo ${oi} | awk '{print $27}'` + dtlsm=`echo ${oi} | awk '{print $28}'` + vmfactc3=`echo ${oi} | awk '{print $29}'` + vmfactc4=`echo ${oi} | awk '{print $30}'` + mphototrc3=`echo ${oi} | awk '{print $31}'` + mphototec3=`echo ${oi} | awk '{print $32}'` + mphotoc4=`echo ${oi} | awk '{print $33}'` + bphotoblc3=`echo ${oi} | awk '{print $34}'` + bphotonlc3=`echo ${oi} | awk '{print $35}'` + bphotoc4=`echo ${oi} | awk '{print $36}'` + kwgrass=`echo ${oi} | awk '{print $37}'` + kwtree=`echo ${oi} | awk '{print $38}'` + gammac3=`echo ${oi} | awk '{print $39}'` + gammac4=`echo ${oi} | awk '{print $40}'` + d0grass=`echo ${oi} | awk '{print $41}'` + d0tree=`echo ${oi} | awk '{print $42}'` + alphac3=`echo ${oi} | awk '{print $43}'` + alphac4=`echo ${oi} | awk '{print $44}'` + klowco2=`echo ${oi} | awk '{print $45}'` + decomp=`echo ${oi} | awk '{print $46}'` + rrffact=`echo ${oi} | awk '{print $47}'` + growthresp=`echo ${oi} | awk '{print $48}'` + lwidthgrass=`echo ${oi} | awk '{print $49}'` + lwidthbltree=`echo ${oi} | awk '{print $50}'` + lwidthnltree=`echo ${oi} | awk '{print $51}'` + q10c3=`echo ${oi} | awk '{print $52}'` + q10c4=`echo ${oi} | awk '{print $53}'` + h2olimit=`echo ${oi} | awk '{print $54}'` + imortscheme=`echo ${oi} | awk '{print $55}'` + ddmortconst=`echo ${oi} | awk '{print $56}'` + isfclyrm=`echo ${oi} | awk '{print $57}'` + icanturb=`echo ${oi} | awk '{print $58}'` + ubmin=`echo ${oi} | awk '{print $59}'` + ugbmin=`echo ${oi} | awk '{print $60}'` + ustmin=`echo ${oi} | awk '{print $61}'` + gamm=`echo ${oi} | awk '{print $62}'` + gamh=`echo ${oi} | awk '{print $63}'` + tprandtl=`echo ${oi} | awk '{print $64}'` + ribmax=`echo ${oi} | awk '{print $65}'` + atmco2=`echo ${oi} | awk '{print $66}'` + thcrit=`echo ${oi} | awk '{print $67}'` + smfire=`echo ${oi} | awk '{print $68}'` + ifire=`echo ${oi} | awk '{print $69}'` + fireparm=`echo ${oi} | awk '{print $70}'` + ipercol=`echo ${oi} | awk '{print $71}'` + runoff=`echo ${oi} | awk '{print $72}'` + imetrad=`echo ${oi} | awk '{print $73}'` + ibranch=`echo ${oi} | awk '{print $74}'` + icanrad=`echo ${oi} | awk '{print $75}'` + crown=`echo ${oi} | awk '{print $76}'` + ltransvis=`echo ${oi} | awk '{print $77}'` + lreflectvis=`echo ${oi} | awk '{print $78}'` + ltransnir=`echo ${oi} | awk '{print $79}'` + lreflectnir=`echo ${oi} | awk '{print $80}'` + orienttree=`echo ${oi} | awk '{print $81}'` + orientgrass=`echo ${oi} | awk '{print $82}'` + clumptree=`echo ${oi} | awk '{print $83}'` + clumpgrass=`echo ${oi} | awk '{print $84}'` + ivegtdyn=`echo ${oi} | awk '{print $85}'` + igndvap=`echo ${oi} | awk '{print $86}'` + iphen=`echo ${oi} | awk '{print $87}'` + iallom=`echo ${oi} | awk '{print $88}'` + ibigleaf=`echo ${oi} | awk '{print $89}'` + irepro=`echo ${oi} | awk '{print $90}'` + treefall=`echo ${oi} | awk '{print $91}'` #---------------------------------------------------------------------------------------# diff --git a/ED/Template/nc_spawn.sh b/ED/Template/nc_spawn.sh index c9f827c15..29b47e2dc 100755 --- a/ED/Template/nc_spawn.sh +++ b/ED/Template/nc_spawn.sh @@ -53,81 +53,82 @@ do initmode=`echo ${oi} | awk '{print $13}'` iscenario=`echo ${oi} | awk '{print $14}'` isizepft=`echo ${oi} | awk '{print $15}'` - polyisoil=`echo ${oi} | awk '{print $16}'` - polyntext=`echo ${oi} | awk '{print $17}'` - polysand=`echo ${oi} | awk '{print $18}'` - polyclay=`echo ${oi} | awk '{print $19}'` - polydepth=`echo ${oi} | awk '{print $20}'` - polysoilbc=`echo ${oi} | awk '{print $21}'` - polysldrain=`echo ${oi} | awk '{print $22}'` - polycol=`echo ${oi} | awk '{print $23}'` - slzres=`echo ${oi} | awk '{print $24}'` - queue=`echo ${oi} | awk '{print $25}'` - metdriver=`echo ${oi} | awk '{print $26}'` - dtlsm=`echo ${oi} | awk '{print $27}'` - vmfactc3=`echo ${oi} | awk '{print $28}'` - vmfactc4=`echo ${oi} | awk '{print $29}'` - mphototrc3=`echo ${oi} | awk '{print $30}'` - mphototec3=`echo ${oi} | awk '{print $31}'` - mphotoc4=`echo ${oi} | awk '{print $32}'` - bphotoblc3=`echo ${oi} | awk '{print $33}'` - bphotonlc3=`echo ${oi} | awk '{print $34}'` - bphotoc4=`echo ${oi} | awk '{print $35}'` - kwgrass=`echo ${oi} | awk '{print $36}'` - kwtree=`echo ${oi} | awk '{print $37}'` - gammac3=`echo ${oi} | awk '{print $38}'` - gammac4=`echo ${oi} | awk '{print $39}'` - d0grass=`echo ${oi} | awk '{print $40}'` - d0tree=`echo ${oi} | awk '{print $41}'` - alphac3=`echo ${oi} | awk '{print $42}'` - alphac4=`echo ${oi} | awk '{print $43}'` - klowco2=`echo ${oi} | awk '{print $44}'` - decomp=`echo ${oi} | awk '{print $45}'` - rrffact=`echo ${oi} | awk '{print $46}'` - growthresp=`echo ${oi} | awk '{print $47}'` - lwidthgrass=`echo ${oi} | awk '{print $48}'` - lwidthbltree=`echo ${oi} | awk '{print $49}'` - lwidthnltree=`echo ${oi} | awk '{print $50}'` - q10c3=`echo ${oi} | awk '{print $51}'` - q10c4=`echo ${oi} | awk '{print $52}'` - h2olimit=`echo ${oi} | awk '{print $53}'` - imortscheme=`echo ${oi} | awk '{print $54}'` - ddmortconst=`echo ${oi} | awk '{print $55}'` - isfclyrm=`echo ${oi} | awk '{print $56}'` - icanturb=`echo ${oi} | awk '{print $57}'` - ubmin=`echo ${oi} | awk '{print $58}'` - ugbmin=`echo ${oi} | awk '{print $59}'` - ustmin=`echo ${oi} | awk '{print $60}'` - gamm=`echo ${oi} | awk '{print $61}'` - gamh=`echo ${oi} | awk '{print $62}'` - tprandtl=`echo ${oi} | awk '{print $63}'` - ribmax=`echo ${oi} | awk '{print $64}'` - atmco2=`echo ${oi} | awk '{print $65}'` - thcrit=`echo ${oi} | awk '{print $66}'` - smfire=`echo ${oi} | awk '{print $67}'` - ifire=`echo ${oi} | awk '{print $68}'` - fireparm=`echo ${oi} | awk '{print $69}'` - ipercol=`echo ${oi} | awk '{print $70}'` - runoff=`echo ${oi} | awk '{print $71}'` - imetrad=`echo ${oi} | awk '{print $72}'` - ibranch=`echo ${oi} | awk '{print $73}'` - icanrad=`echo ${oi} | awk '{print $74}'` - crown=`echo ${oi} | awk '{print $75}'` - ltransvis=`echo ${oi} | awk '{print $76}'` - lreflectvis=`echo ${oi} | awk '{print $77}'` - ltransnir=`echo ${oi} | awk '{print $78}'` - lreflectnir=`echo ${oi} | awk '{print $79}'` - orienttree=`echo ${oi} | awk '{print $80}'` - orientgrass=`echo ${oi} | awk '{print $81}'` - clumptree=`echo ${oi} | awk '{print $82}'` - clumpgrass=`echo ${oi} | awk '{print $83}'` - ivegtdyn=`echo ${oi} | awk '{print $84}'` - igndvap=`echo ${oi} | awk '{print $85}'` - iphen=`echo ${oi} | awk '{print $86}'` - iallom=`echo ${oi} | awk '{print $87}'` - ibigleaf=`echo ${oi} | awk '{print $88}'` - irepro=`echo ${oi} | awk '{print $89}'` - treefall=`echo ${oi} | awk '{print $90}'` + iage=`echo ${oi} | awk '{print $16}'` + polyisoil=`echo ${oi} | awk '{print $17}'` + polyntext=`echo ${oi} | awk '{print $18}'` + polysand=`echo ${oi} | awk '{print $19}'` + polyclay=`echo ${oi} | awk '{print $20}'` + polydepth=`echo ${oi} | awk '{print $21}'` + polysoilbc=`echo ${oi} | awk '{print $22}'` + polysldrain=`echo ${oi} | awk '{print $23}'` + polycol=`echo ${oi} | awk '{print $24}'` + slzres=`echo ${oi} | awk '{print $25}'` + queue=`echo ${oi} | awk '{print $26}'` + metdriver=`echo ${oi} | awk '{print $27}'` + dtlsm=`echo ${oi} | awk '{print $28}'` + vmfactc3=`echo ${oi} | awk '{print $29}'` + vmfactc4=`echo ${oi} | awk '{print $30}'` + mphototrc3=`echo ${oi} | awk '{print $31}'` + mphototec3=`echo ${oi} | awk '{print $32}'` + mphotoc4=`echo ${oi} | awk '{print $33}'` + bphotoblc3=`echo ${oi} | awk '{print $34}'` + bphotonlc3=`echo ${oi} | awk '{print $35}'` + bphotoc4=`echo ${oi} | awk '{print $36}'` + kwgrass=`echo ${oi} | awk '{print $37}'` + kwtree=`echo ${oi} | awk '{print $38}'` + gammac3=`echo ${oi} | awk '{print $39}'` + gammac4=`echo ${oi} | awk '{print $40}'` + d0grass=`echo ${oi} | awk '{print $41}'` + d0tree=`echo ${oi} | awk '{print $42}'` + alphac3=`echo ${oi} | awk '{print $43}'` + alphac4=`echo ${oi} | awk '{print $44}'` + klowco2=`echo ${oi} | awk '{print $45}'` + decomp=`echo ${oi} | awk '{print $46}'` + rrffact=`echo ${oi} | awk '{print $47}'` + growthresp=`echo ${oi} | awk '{print $48}'` + lwidthgrass=`echo ${oi} | awk '{print $49}'` + lwidthbltree=`echo ${oi} | awk '{print $50}'` + lwidthnltree=`echo ${oi} | awk '{print $51}'` + q10c3=`echo ${oi} | awk '{print $52}'` + q10c4=`echo ${oi} | awk '{print $53}'` + h2olimit=`echo ${oi} | awk '{print $54}'` + imortscheme=`echo ${oi} | awk '{print $55}'` + ddmortconst=`echo ${oi} | awk '{print $56}'` + isfclyrm=`echo ${oi} | awk '{print $57}'` + icanturb=`echo ${oi} | awk '{print $58}'` + ubmin=`echo ${oi} | awk '{print $59}'` + ugbmin=`echo ${oi} | awk '{print $60}'` + ustmin=`echo ${oi} | awk '{print $61}'` + gamm=`echo ${oi} | awk '{print $62}'` + gamh=`echo ${oi} | awk '{print $63}'` + tprandtl=`echo ${oi} | awk '{print $64}'` + ribmax=`echo ${oi} | awk '{print $65}'` + atmco2=`echo ${oi} | awk '{print $66}'` + thcrit=`echo ${oi} | awk '{print $67}'` + smfire=`echo ${oi} | awk '{print $68}'` + ifire=`echo ${oi} | awk '{print $69}'` + fireparm=`echo ${oi} | awk '{print $70}'` + ipercol=`echo ${oi} | awk '{print $71}'` + runoff=`echo ${oi} | awk '{print $72}'` + imetrad=`echo ${oi} | awk '{print $73}'` + ibranch=`echo ${oi} | awk '{print $74}'` + icanrad=`echo ${oi} | awk '{print $75}'` + crown=`echo ${oi} | awk '{print $76}'` + ltransvis=`echo ${oi} | awk '{print $77}'` + lreflectvis=`echo ${oi} | awk '{print $78}'` + ltransnir=`echo ${oi} | awk '{print $79}'` + lreflectnir=`echo ${oi} | awk '{print $80}'` + orienttree=`echo ${oi} | awk '{print $81}'` + orientgrass=`echo ${oi} | awk '{print $82}'` + clumptree=`echo ${oi} | awk '{print $83}'` + clumpgrass=`echo ${oi} | awk '{print $84}'` + ivegtdyn=`echo ${oi} | awk '{print $85}'` + igndvap=`echo ${oi} | awk '{print $86}'` + iphen=`echo ${oi} | awk '{print $87}'` + iallom=`echo ${oi} | awk '{print $88}'` + ibigleaf=`echo ${oi} | awk '{print $89}'` + irepro=`echo ${oi} | awk '{print $90}'` + treefall=`echo ${oi} | awk '{print $91}'` #---------------------------------------------------------------------------------------# diff --git a/ED/Template/nc_submitter.sh b/ED/Template/nc_submitter.sh index e403977e9..193a518f1 100755 --- a/ED/Template/nc_submitter.sh +++ b/ED/Template/nc_submitter.sh @@ -37,81 +37,82 @@ do initmode=`echo ${oi} | awk '{print $13}'` iscenario=`echo ${oi} | awk '{print $14}'` isizepft=`echo ${oi} | awk '{print $15}'` - polyisoil=`echo ${oi} | awk '{print $16}'` - polyntext=`echo ${oi} | awk '{print $17}'` - polysand=`echo ${oi} | awk '{print $18}'` - polyclay=`echo ${oi} | awk '{print $19}'` - polydepth=`echo ${oi} | awk '{print $20}'` - polysoilbc=`echo ${oi} | awk '{print $21}'` - polysldrain=`echo ${oi} | awk '{print $22}'` - polycol=`echo ${oi} | awk '{print $23}'` - slzres=`echo ${oi} | awk '{print $24}'` - queue=`echo ${oi} | awk '{print $25}'` - metdriver=`echo ${oi} | awk '{print $26}'` - dtlsm=`echo ${oi} | awk '{print $27}'` - vmfactc3=`echo ${oi} | awk '{print $28}'` - vmfactc4=`echo ${oi} | awk '{print $29}'` - mphototrc3=`echo ${oi} | awk '{print $30}'` - mphototec3=`echo ${oi} | awk '{print $31}'` - mphotoc4=`echo ${oi} | awk '{print $32}'` - bphotoblc3=`echo ${oi} | awk '{print $33}'` - bphotonlc3=`echo ${oi} | awk '{print $34}'` - bphotoc4=`echo ${oi} | awk '{print $35}'` - kwgrass=`echo ${oi} | awk '{print $36}'` - kwtree=`echo ${oi} | awk '{print $37}'` - gammac3=`echo ${oi} | awk '{print $38}'` - gammac4=`echo ${oi} | awk '{print $39}'` - d0grass=`echo ${oi} | awk '{print $40}'` - d0tree=`echo ${oi} | awk '{print $41}'` - alphac3=`echo ${oi} | awk '{print $42}'` - alphac4=`echo ${oi} | awk '{print $43}'` - klowco2=`echo ${oi} | awk '{print $44}'` - decomp=`echo ${oi} | awk '{print $45}'` - rrffact=`echo ${oi} | awk '{print $46}'` - growthresp=`echo ${oi} | awk '{print $47}'` - lwidthgrass=`echo ${oi} | awk '{print $48}'` - lwidthbltree=`echo ${oi} | awk '{print $49}'` - lwidthnltree=`echo ${oi} | awk '{print $50}'` - q10c3=`echo ${oi} | awk '{print $51}'` - q10c4=`echo ${oi} | awk '{print $52}'` - h2olimit=`echo ${oi} | awk '{print $53}'` - imortscheme=`echo ${oi} | awk '{print $54}'` - ddmortconst=`echo ${oi} | awk '{print $55}'` - isfclyrm=`echo ${oi} | awk '{print $56}'` - icanturb=`echo ${oi} | awk '{print $57}'` - ubmin=`echo ${oi} | awk '{print $58}'` - ugbmin=`echo ${oi} | awk '{print $59}'` - ustmin=`echo ${oi} | awk '{print $60}'` - gamm=`echo ${oi} | awk '{print $61}'` - gamh=`echo ${oi} | awk '{print $62}'` - tprandtl=`echo ${oi} | awk '{print $63}'` - ribmax=`echo ${oi} | awk '{print $64}'` - atmco2=`echo ${oi} | awk '{print $65}'` - thcrit=`echo ${oi} | awk '{print $66}'` - smfire=`echo ${oi} | awk '{print $67}'` - ifire=`echo ${oi} | awk '{print $68}'` - fireparm=`echo ${oi} | awk '{print $69}'` - ipercol=`echo ${oi} | awk '{print $70}'` - runoff=`echo ${oi} | awk '{print $71}'` - imetrad=`echo ${oi} | awk '{print $72}'` - ibranch=`echo ${oi} | awk '{print $73}'` - icanrad=`echo ${oi} | awk '{print $74}'` - crown=`echo ${oi} | awk '{print $75}'` - ltransvis=`echo ${oi} | awk '{print $76}'` - lreflectvis=`echo ${oi} | awk '{print $77}'` - ltransnir=`echo ${oi} | awk '{print $78}'` - lreflectnir=`echo ${oi} | awk '{print $79}'` - orienttree=`echo ${oi} | awk '{print $80}'` - orientgrass=`echo ${oi} | awk '{print $81}'` - clumptree=`echo ${oi} | awk '{print $82}'` - clumpgrass=`echo ${oi} | awk '{print $83}'` - ivegtdyn=`echo ${oi} | awk '{print $84}'` - igndvap=`echo ${oi} | awk '{print $85}'` - iphen=`echo ${oi} | awk '{print $86}'` - iallom=`echo ${oi} | awk '{print $87}'` - ibigleaf=`echo ${oi} | awk '{print $88}'` - irepro=`echo ${oi} | awk '{print $89}'` - treefall=`echo ${oi} | awk '{print $90}'` + iage=`echo ${oi} | awk '{print $16}'` + polyisoil=`echo ${oi} | awk '{print $17}'` + polyntext=`echo ${oi} | awk '{print $18}'` + polysand=`echo ${oi} | awk '{print $19}'` + polyclay=`echo ${oi} | awk '{print $20}'` + polydepth=`echo ${oi} | awk '{print $21}'` + polysoilbc=`echo ${oi} | awk '{print $22}'` + polysldrain=`echo ${oi} | awk '{print $23}'` + polycol=`echo ${oi} | awk '{print $24}'` + slzres=`echo ${oi} | awk '{print $25}'` + queue=`echo ${oi} | awk '{print $26}'` + metdriver=`echo ${oi} | awk '{print $27}'` + dtlsm=`echo ${oi} | awk '{print $28}'` + vmfactc3=`echo ${oi} | awk '{print $29}'` + vmfactc4=`echo ${oi} | awk '{print $30}'` + mphototrc3=`echo ${oi} | awk '{print $31}'` + mphototec3=`echo ${oi} | awk '{print $32}'` + mphotoc4=`echo ${oi} | awk '{print $33}'` + bphotoblc3=`echo ${oi} | awk '{print $34}'` + bphotonlc3=`echo ${oi} | awk '{print $35}'` + bphotoc4=`echo ${oi} | awk '{print $36}'` + kwgrass=`echo ${oi} | awk '{print $37}'` + kwtree=`echo ${oi} | awk '{print $38}'` + gammac3=`echo ${oi} | awk '{print $39}'` + gammac4=`echo ${oi} | awk '{print $40}'` + d0grass=`echo ${oi} | awk '{print $41}'` + d0tree=`echo ${oi} | awk '{print $42}'` + alphac3=`echo ${oi} | awk '{print $43}'` + alphac4=`echo ${oi} | awk '{print $44}'` + klowco2=`echo ${oi} | awk '{print $45}'` + decomp=`echo ${oi} | awk '{print $46}'` + rrffact=`echo ${oi} | awk '{print $47}'` + growthresp=`echo ${oi} | awk '{print $48}'` + lwidthgrass=`echo ${oi} | awk '{print $49}'` + lwidthbltree=`echo ${oi} | awk '{print $50}'` + lwidthnltree=`echo ${oi} | awk '{print $51}'` + q10c3=`echo ${oi} | awk '{print $52}'` + q10c4=`echo ${oi} | awk '{print $53}'` + h2olimit=`echo ${oi} | awk '{print $54}'` + imortscheme=`echo ${oi} | awk '{print $55}'` + ddmortconst=`echo ${oi} | awk '{print $56}'` + isfclyrm=`echo ${oi} | awk '{print $57}'` + icanturb=`echo ${oi} | awk '{print $58}'` + ubmin=`echo ${oi} | awk '{print $59}'` + ugbmin=`echo ${oi} | awk '{print $60}'` + ustmin=`echo ${oi} | awk '{print $61}'` + gamm=`echo ${oi} | awk '{print $62}'` + gamh=`echo ${oi} | awk '{print $63}'` + tprandtl=`echo ${oi} | awk '{print $64}'` + ribmax=`echo ${oi} | awk '{print $65}'` + atmco2=`echo ${oi} | awk '{print $66}'` + thcrit=`echo ${oi} | awk '{print $67}'` + smfire=`echo ${oi} | awk '{print $68}'` + ifire=`echo ${oi} | awk '{print $69}'` + fireparm=`echo ${oi} | awk '{print $70}'` + ipercol=`echo ${oi} | awk '{print $71}'` + runoff=`echo ${oi} | awk '{print $72}'` + imetrad=`echo ${oi} | awk '{print $73}'` + ibranch=`echo ${oi} | awk '{print $74}'` + icanrad=`echo ${oi} | awk '{print $75}'` + crown=`echo ${oi} | awk '{print $76}'` + ltransvis=`echo ${oi} | awk '{print $77}'` + lreflectvis=`echo ${oi} | awk '{print $78}'` + ltransnir=`echo ${oi} | awk '{print $79}'` + lreflectnir=`echo ${oi} | awk '{print $80}'` + orienttree=`echo ${oi} | awk '{print $81}'` + orientgrass=`echo ${oi} | awk '{print $82}'` + clumptree=`echo ${oi} | awk '{print $83}'` + clumpgrass=`echo ${oi} | awk '{print $84}'` + ivegtdyn=`echo ${oi} | awk '{print $85}'` + igndvap=`echo ${oi} | awk '{print $86}'` + iphen=`echo ${oi} | awk '{print $87}'` + iallom=`echo ${oi} | awk '{print $88}'` + ibigleaf=`echo ${oi} | awk '{print $89}'` + irepro=`echo ${oi} | awk '{print $90}'` + treefall=`echo ${oi} | awk '{print $91}'` #---------------------------------------------------------------------------------------# diff --git a/ED/Template/read_monthly.sh b/ED/Template/read_monthly.sh index 2d5997269..1d4476b4b 100755 --- a/ED/Template/read_monthly.sh +++ b/ED/Template/read_monthly.sh @@ -165,81 +165,82 @@ do initmode=`echo ${oi} | awk '{print $13}'` iscenario=`echo ${oi} | awk '{print $14}'` isizepft=`echo ${oi} | awk '{print $15}'` - polyisoil=`echo ${oi} | awk '{print $16}'` - polyntext=`echo ${oi} | awk '{print $17}'` - polysand=`echo ${oi} | awk '{print $18}'` - polyclay=`echo ${oi} | awk '{print $19}'` - polydepth=`echo ${oi} | awk '{print $20}'` - polysoilbc=`echo ${oi} | awk '{print $21}'` - polysldrain=`echo ${oi} | awk '{print $22}'` - polycol=`echo ${oi} | awk '{print $23}'` - slzres=`echo ${oi} | awk '{print $24}'` - queue=`echo ${oi} | awk '{print $25}'` - metdriver=`echo ${oi} | awk '{print $26}'` - dtlsm=`echo ${oi} | awk '{print $27}'` - vmfactc3=`echo ${oi} | awk '{print $28}'` - vmfactc4=`echo ${oi} | awk '{print $29}'` - mphototrc3=`echo ${oi} | awk '{print $30}'` - mphototec3=`echo ${oi} | awk '{print $31}'` - mphotoc4=`echo ${oi} | awk '{print $32}'` - bphotoblc3=`echo ${oi} | awk '{print $33}'` - bphotonlc3=`echo ${oi} | awk '{print $34}'` - bphotoc4=`echo ${oi} | awk '{print $35}'` - kwgrass=`echo ${oi} | awk '{print $36}'` - kwtree=`echo ${oi} | awk '{print $37}'` - gammac3=`echo ${oi} | awk '{print $38}'` - gammac4=`echo ${oi} | awk '{print $39}'` - d0grass=`echo ${oi} | awk '{print $40}'` - d0tree=`echo ${oi} | awk '{print $41}'` - alphac3=`echo ${oi} | awk '{print $42}'` - alphac4=`echo ${oi} | awk '{print $43}'` - klowco2=`echo ${oi} | awk '{print $44}'` - decomp=`echo ${oi} | awk '{print $45}'` - rrffact=`echo ${oi} | awk '{print $46}'` - growthresp=`echo ${oi} | awk '{print $47}'` - lwidthgrass=`echo ${oi} | awk '{print $48}'` - lwidthbltree=`echo ${oi} | awk '{print $49}'` - lwidthnltree=`echo ${oi} | awk '{print $50}'` - q10c3=`echo ${oi} | awk '{print $51}'` - q10c4=`echo ${oi} | awk '{print $52}'` - h2olimit=`echo ${oi} | awk '{print $53}'` - imortscheme=`echo ${oi} | awk '{print $54}'` - ddmortconst=`echo ${oi} | awk '{print $55}'` - isfclyrm=`echo ${oi} | awk '{print $56}'` - icanturb=`echo ${oi} | awk '{print $57}'` - ubmin=`echo ${oi} | awk '{print $58}'` - ugbmin=`echo ${oi} | awk '{print $59}'` - ustmin=`echo ${oi} | awk '{print $60}'` - gamm=`echo ${oi} | awk '{print $61}'` - gamh=`echo ${oi} | awk '{print $62}'` - tprandtl=`echo ${oi} | awk '{print $63}'` - ribmax=`echo ${oi} | awk '{print $64}'` - atmco2=`echo ${oi} | awk '{print $65}'` - thcrit=`echo ${oi} | awk '{print $66}'` - smfire=`echo ${oi} | awk '{print $67}'` - ifire=`echo ${oi} | awk '{print $68}'` - fireparm=`echo ${oi} | awk '{print $69}'` - ipercol=`echo ${oi} | awk '{print $70}'` - runoff=`echo ${oi} | awk '{print $71}'` - imetrad=`echo ${oi} | awk '{print $72}'` - ibranch=`echo ${oi} | awk '{print $73}'` - icanrad=`echo ${oi} | awk '{print $74}'` - crown=`echo ${oi} | awk '{print $75}'` - ltransvis=`echo ${oi} | awk '{print $76}'` - lreflectvis=`echo ${oi} | awk '{print $77}'` - ltransnir=`echo ${oi} | awk '{print $78}'` - lreflectnir=`echo ${oi} | awk '{print $79}'` - orienttree=`echo ${oi} | awk '{print $80}'` - orientgrass=`echo ${oi} | awk '{print $81}'` - clumptree=`echo ${oi} | awk '{print $82}'` - clumpgrass=`echo ${oi} | awk '{print $83}'` - ivegtdyn=`echo ${oi} | awk '{print $84}'` - igndvap=`echo ${oi} | awk '{print $85}'` - iphen=`echo ${oi} | awk '{print $86}'` - iallom=`echo ${oi} | awk '{print $87}'` - ibigleaf=`echo ${oi} | awk '{print $88}'` - irepro=`echo ${oi} | awk '{print $89}'` - treefall=`echo ${oi} | awk '{print $90}'` + iage=`echo ${oi} | awk '{print $16}'` + polyisoil=`echo ${oi} | awk '{print $17}'` + polyntext=`echo ${oi} | awk '{print $18}'` + polysand=`echo ${oi} | awk '{print $19}'` + polyclay=`echo ${oi} | awk '{print $20}'` + polydepth=`echo ${oi} | awk '{print $21}'` + polysoilbc=`echo ${oi} | awk '{print $22}'` + polysldrain=`echo ${oi} | awk '{print $23}'` + polycol=`echo ${oi} | awk '{print $24}'` + slzres=`echo ${oi} | awk '{print $25}'` + queue=`echo ${oi} | awk '{print $26}'` + metdriver=`echo ${oi} | awk '{print $27}'` + dtlsm=`echo ${oi} | awk '{print $28}'` + vmfactc3=`echo ${oi} | awk '{print $29}'` + vmfactc4=`echo ${oi} | awk '{print $30}'` + mphototrc3=`echo ${oi} | awk '{print $31}'` + mphototec3=`echo ${oi} | awk '{print $32}'` + mphotoc4=`echo ${oi} | awk '{print $33}'` + bphotoblc3=`echo ${oi} | awk '{print $34}'` + bphotonlc3=`echo ${oi} | awk '{print $35}'` + bphotoc4=`echo ${oi} | awk '{print $36}'` + kwgrass=`echo ${oi} | awk '{print $37}'` + kwtree=`echo ${oi} | awk '{print $38}'` + gammac3=`echo ${oi} | awk '{print $39}'` + gammac4=`echo ${oi} | awk '{print $40}'` + d0grass=`echo ${oi} | awk '{print $41}'` + d0tree=`echo ${oi} | awk '{print $42}'` + alphac3=`echo ${oi} | awk '{print $43}'` + alphac4=`echo ${oi} | awk '{print $44}'` + klowco2=`echo ${oi} | awk '{print $45}'` + decomp=`echo ${oi} | awk '{print $46}'` + rrffact=`echo ${oi} | awk '{print $47}'` + growthresp=`echo ${oi} | awk '{print $48}'` + lwidthgrass=`echo ${oi} | awk '{print $49}'` + lwidthbltree=`echo ${oi} | awk '{print $50}'` + lwidthnltree=`echo ${oi} | awk '{print $51}'` + q10c3=`echo ${oi} | awk '{print $52}'` + q10c4=`echo ${oi} | awk '{print $53}'` + h2olimit=`echo ${oi} | awk '{print $54}'` + imortscheme=`echo ${oi} | awk '{print $55}'` + ddmortconst=`echo ${oi} | awk '{print $56}'` + isfclyrm=`echo ${oi} | awk '{print $57}'` + icanturb=`echo ${oi} | awk '{print $58}'` + ubmin=`echo ${oi} | awk '{print $59}'` + ugbmin=`echo ${oi} | awk '{print $60}'` + ustmin=`echo ${oi} | awk '{print $61}'` + gamm=`echo ${oi} | awk '{print $62}'` + gamh=`echo ${oi} | awk '{print $63}'` + tprandtl=`echo ${oi} | awk '{print $64}'` + ribmax=`echo ${oi} | awk '{print $65}'` + atmco2=`echo ${oi} | awk '{print $66}'` + thcrit=`echo ${oi} | awk '{print $67}'` + smfire=`echo ${oi} | awk '{print $68}'` + ifire=`echo ${oi} | awk '{print $69}'` + fireparm=`echo ${oi} | awk '{print $70}'` + ipercol=`echo ${oi} | awk '{print $71}'` + runoff=`echo ${oi} | awk '{print $72}'` + imetrad=`echo ${oi} | awk '{print $73}'` + ibranch=`echo ${oi} | awk '{print $74}'` + icanrad=`echo ${oi} | awk '{print $75}'` + crown=`echo ${oi} | awk '{print $76}'` + ltransvis=`echo ${oi} | awk '{print $77}'` + lreflectvis=`echo ${oi} | awk '{print $78}'` + ltransnir=`echo ${oi} | awk '{print $79}'` + lreflectnir=`echo ${oi} | awk '{print $80}'` + orienttree=`echo ${oi} | awk '{print $81}'` + orientgrass=`echo ${oi} | awk '{print $82}'` + clumptree=`echo ${oi} | awk '{print $83}'` + clumpgrass=`echo ${oi} | awk '{print $84}'` + ivegtdyn=`echo ${oi} | awk '{print $85}'` + igndvap=`echo ${oi} | awk '{print $86}'` + iphen=`echo ${oi} | awk '{print $87}'` + iallom=`echo ${oi} | awk '{print $88}'` + ibigleaf=`echo ${oi} | awk '{print $89}'` + irepro=`echo ${oi} | awk '{print $90}'` + treefall=`echo ${oi} | awk '{print $91}'` #---------------------------------------------------------------------------------------# diff --git a/ED/Template/reset.sh b/ED/Template/reset.sh index a4471cac0..515802523 100755 --- a/ED/Template/reset.sh +++ b/ED/Template/reset.sh @@ -105,81 +105,82 @@ do initmode=`echo ${oi} | awk '{print $13}'` iscenario=`echo ${oi} | awk '{print $14}'` isizepft=`echo ${oi} | awk '{print $15}'` - polyisoil=`echo ${oi} | awk '{print $16}'` - polyntext=`echo ${oi} | awk '{print $17}'` - polysand=`echo ${oi} | awk '{print $18}'` - polyclay=`echo ${oi} | awk '{print $19}'` - polydepth=`echo ${oi} | awk '{print $20}'` - polysoilbc=`echo ${oi} | awk '{print $21}'` - polysldrain=`echo ${oi} | awk '{print $22}'` - polycol=`echo ${oi} | awk '{print $23}'` - slzres=`echo ${oi} | awk '{print $24}'` - queue=`echo ${oi} | awk '{print $25}'` - metdriver=`echo ${oi} | awk '{print $26}'` - dtlsm=`echo ${oi} | awk '{print $27}'` - vmfactc3=`echo ${oi} | awk '{print $28}'` - vmfactc4=`echo ${oi} | awk '{print $29}'` - mphototrc3=`echo ${oi} | awk '{print $30}'` - mphototec3=`echo ${oi} | awk '{print $31}'` - mphotoc4=`echo ${oi} | awk '{print $32}'` - bphotoblc3=`echo ${oi} | awk '{print $33}'` - bphotonlc3=`echo ${oi} | awk '{print $34}'` - bphotoc4=`echo ${oi} | awk '{print $35}'` - kwgrass=`echo ${oi} | awk '{print $36}'` - kwtree=`echo ${oi} | awk '{print $37}'` - gammac3=`echo ${oi} | awk '{print $38}'` - gammac4=`echo ${oi} | awk '{print $39}'` - d0grass=`echo ${oi} | awk '{print $40}'` - d0tree=`echo ${oi} | awk '{print $41}'` - alphac3=`echo ${oi} | awk '{print $42}'` - alphac4=`echo ${oi} | awk '{print $43}'` - klowco2=`echo ${oi} | awk '{print $44}'` - decomp=`echo ${oi} | awk '{print $45}'` - rrffact=`echo ${oi} | awk '{print $46}'` - growthresp=`echo ${oi} | awk '{print $47}'` - lwidthgrass=`echo ${oi} | awk '{print $48}'` - lwidthbltree=`echo ${oi} | awk '{print $49}'` - lwidthnltree=`echo ${oi} | awk '{print $50}'` - q10c3=`echo ${oi} | awk '{print $51}'` - q10c4=`echo ${oi} | awk '{print $52}'` - h2olimit=`echo ${oi} | awk '{print $53}'` - imortscheme=`echo ${oi} | awk '{print $54}'` - ddmortconst=`echo ${oi} | awk '{print $55}'` - isfclyrm=`echo ${oi} | awk '{print $56}'` - icanturb=`echo ${oi} | awk '{print $57}'` - ubmin=`echo ${oi} | awk '{print $58}'` - ugbmin=`echo ${oi} | awk '{print $59}'` - ustmin=`echo ${oi} | awk '{print $60}'` - gamm=`echo ${oi} | awk '{print $61}'` - gamh=`echo ${oi} | awk '{print $62}'` - tprandtl=`echo ${oi} | awk '{print $63}'` - ribmax=`echo ${oi} | awk '{print $64}'` - atmco2=`echo ${oi} | awk '{print $65}'` - thcrit=`echo ${oi} | awk '{print $66}'` - smfire=`echo ${oi} | awk '{print $67}'` - ifire=`echo ${oi} | awk '{print $68}'` - fireparm=`echo ${oi} | awk '{print $69}'` - ipercol=`echo ${oi} | awk '{print $70}'` - runoff=`echo ${oi} | awk '{print $71}'` - imetrad=`echo ${oi} | awk '{print $72}'` - ibranch=`echo ${oi} | awk '{print $73}'` - icanrad=`echo ${oi} | awk '{print $74}'` - crown=`echo ${oi} | awk '{print $75}'` - ltransvis=`echo ${oi} | awk '{print $76}'` - lreflectvis=`echo ${oi} | awk '{print $77}'` - ltransnir=`echo ${oi} | awk '{print $78}'` - lreflectnir=`echo ${oi} | awk '{print $79}'` - orienttree=`echo ${oi} | awk '{print $80}'` - orientgrass=`echo ${oi} | awk '{print $81}'` - clumptree=`echo ${oi} | awk '{print $82}'` - clumpgrass=`echo ${oi} | awk '{print $83}'` - ivegtdyn=`echo ${oi} | awk '{print $84}'` - igndvap=`echo ${oi} | awk '{print $85}'` - iphen=`echo ${oi} | awk '{print $86}'` - iallom=`echo ${oi} | awk '{print $87}'` - ibigleaf=`echo ${oi} | awk '{print $88}'` - irepro=`echo ${oi} | awk '{print $89}'` - treefall=`echo ${oi} | awk '{print $90}'` + iage=`echo ${oi} | awk '{print $16}'` + polyisoil=`echo ${oi} | awk '{print $17}'` + polyntext=`echo ${oi} | awk '{print $18}'` + polysand=`echo ${oi} | awk '{print $19}'` + polyclay=`echo ${oi} | awk '{print $20}'` + polydepth=`echo ${oi} | awk '{print $21}'` + polysoilbc=`echo ${oi} | awk '{print $22}'` + polysldrain=`echo ${oi} | awk '{print $23}'` + polycol=`echo ${oi} | awk '{print $24}'` + slzres=`echo ${oi} | awk '{print $25}'` + queue=`echo ${oi} | awk '{print $26}'` + metdriver=`echo ${oi} | awk '{print $27}'` + dtlsm=`echo ${oi} | awk '{print $28}'` + vmfactc3=`echo ${oi} | awk '{print $29}'` + vmfactc4=`echo ${oi} | awk '{print $30}'` + mphototrc3=`echo ${oi} | awk '{print $31}'` + mphototec3=`echo ${oi} | awk '{print $32}'` + mphotoc4=`echo ${oi} | awk '{print $33}'` + bphotoblc3=`echo ${oi} | awk '{print $34}'` + bphotonlc3=`echo ${oi} | awk '{print $35}'` + bphotoc4=`echo ${oi} | awk '{print $36}'` + kwgrass=`echo ${oi} | awk '{print $37}'` + kwtree=`echo ${oi} | awk '{print $38}'` + gammac3=`echo ${oi} | awk '{print $39}'` + gammac4=`echo ${oi} | awk '{print $40}'` + d0grass=`echo ${oi} | awk '{print $41}'` + d0tree=`echo ${oi} | awk '{print $42}'` + alphac3=`echo ${oi} | awk '{print $43}'` + alphac4=`echo ${oi} | awk '{print $44}'` + klowco2=`echo ${oi} | awk '{print $45}'` + decomp=`echo ${oi} | awk '{print $46}'` + rrffact=`echo ${oi} | awk '{print $47}'` + growthresp=`echo ${oi} | awk '{print $48}'` + lwidthgrass=`echo ${oi} | awk '{print $49}'` + lwidthbltree=`echo ${oi} | awk '{print $50}'` + lwidthnltree=`echo ${oi} | awk '{print $51}'` + q10c3=`echo ${oi} | awk '{print $52}'` + q10c4=`echo ${oi} | awk '{print $53}'` + h2olimit=`echo ${oi} | awk '{print $54}'` + imortscheme=`echo ${oi} | awk '{print $55}'` + ddmortconst=`echo ${oi} | awk '{print $56}'` + isfclyrm=`echo ${oi} | awk '{print $57}'` + icanturb=`echo ${oi} | awk '{print $58}'` + ubmin=`echo ${oi} | awk '{print $59}'` + ugbmin=`echo ${oi} | awk '{print $60}'` + ustmin=`echo ${oi} | awk '{print $61}'` + gamm=`echo ${oi} | awk '{print $62}'` + gamh=`echo ${oi} | awk '{print $63}'` + tprandtl=`echo ${oi} | awk '{print $64}'` + ribmax=`echo ${oi} | awk '{print $65}'` + atmco2=`echo ${oi} | awk '{print $66}'` + thcrit=`echo ${oi} | awk '{print $67}'` + smfire=`echo ${oi} | awk '{print $68}'` + ifire=`echo ${oi} | awk '{print $69}'` + fireparm=`echo ${oi} | awk '{print $70}'` + ipercol=`echo ${oi} | awk '{print $71}'` + runoff=`echo ${oi} | awk '{print $72}'` + imetrad=`echo ${oi} | awk '{print $73}'` + ibranch=`echo ${oi} | awk '{print $74}'` + icanrad=`echo ${oi} | awk '{print $75}'` + crown=`echo ${oi} | awk '{print $76}'` + ltransvis=`echo ${oi} | awk '{print $77}'` + lreflectvis=`echo ${oi} | awk '{print $78}'` + ltransnir=`echo ${oi} | awk '{print $79}'` + lreflectnir=`echo ${oi} | awk '{print $80}'` + orienttree=`echo ${oi} | awk '{print $81}'` + orientgrass=`echo ${oi} | awk '{print $82}'` + clumptree=`echo ${oi} | awk '{print $83}'` + clumpgrass=`echo ${oi} | awk '{print $84}'` + ivegtdyn=`echo ${oi} | awk '{print $85}'` + igndvap=`echo ${oi} | awk '{print $86}'` + iphen=`echo ${oi} | awk '{print $87}'` + iallom=`echo ${oi} | awk '{print $88}'` + ibigleaf=`echo ${oi} | awk '{print $89}'` + irepro=`echo ${oi} | awk '{print $90}'` + treefall=`echo ${oi} | awk '{print $91}'` #---------------------------------------------------------------------------------------# bkill -J ${desc}-${polyname} -q ${queue} @@ -225,81 +226,82 @@ do initmode=`echo ${oi} | awk '{print $13}'` iscenario=`echo ${oi} | awk '{print $14}'` isizepft=`echo ${oi} | awk '{print $15}'` - polyisoil=`echo ${oi} | awk '{print $16}'` - polyntext=`echo ${oi} | awk '{print $17}'` - polysand=`echo ${oi} | awk '{print $18}'` - polyclay=`echo ${oi} | awk '{print $19}'` - polydepth=`echo ${oi} | awk '{print $20}'` - polysoilbc=`echo ${oi} | awk '{print $21}'` - polysldrain=`echo ${oi} | awk '{print $22}'` - polycol=`echo ${oi} | awk '{print $23}'` - slzres=`echo ${oi} | awk '{print $24}'` - queue=`echo ${oi} | awk '{print $25}'` - metdriver=`echo ${oi} | awk '{print $26}'` - dtlsm=`echo ${oi} | awk '{print $27}'` - vmfactc3=`echo ${oi} | awk '{print $28}'` - vmfactc4=`echo ${oi} | awk '{print $29}'` - mphototrc3=`echo ${oi} | awk '{print $30}'` - mphototec3=`echo ${oi} | awk '{print $31}'` - mphotoc4=`echo ${oi} | awk '{print $32}'` - bphotoblc3=`echo ${oi} | awk '{print $33}'` - bphotonlc3=`echo ${oi} | awk '{print $34}'` - bphotoc4=`echo ${oi} | awk '{print $35}'` - kwgrass=`echo ${oi} | awk '{print $36}'` - kwtree=`echo ${oi} | awk '{print $37}'` - gammac3=`echo ${oi} | awk '{print $38}'` - gammac4=`echo ${oi} | awk '{print $39}'` - d0grass=`echo ${oi} | awk '{print $40}'` - d0tree=`echo ${oi} | awk '{print $41}'` - alphac3=`echo ${oi} | awk '{print $42}'` - alphac4=`echo ${oi} | awk '{print $43}'` - klowco2=`echo ${oi} | awk '{print $44}'` - decomp=`echo ${oi} | awk '{print $45}'` - rrffact=`echo ${oi} | awk '{print $46}'` - growthresp=`echo ${oi} | awk '{print $47}'` - lwidthgrass=`echo ${oi} | awk '{print $48}'` - lwidthbltree=`echo ${oi} | awk '{print $49}'` - lwidthnltree=`echo ${oi} | awk '{print $50}'` - q10c3=`echo ${oi} | awk '{print $51}'` - q10c4=`echo ${oi} | awk '{print $52}'` - h2olimit=`echo ${oi} | awk '{print $53}'` - imortscheme=`echo ${oi} | awk '{print $54}'` - ddmortconst=`echo ${oi} | awk '{print $55}'` - isfclyrm=`echo ${oi} | awk '{print $56}'` - icanturb=`echo ${oi} | awk '{print $57}'` - ubmin=`echo ${oi} | awk '{print $58}'` - ugbmin=`echo ${oi} | awk '{print $59}'` - ustmin=`echo ${oi} | awk '{print $60}'` - gamm=`echo ${oi} | awk '{print $61}'` - gamh=`echo ${oi} | awk '{print $62}'` - tprandtl=`echo ${oi} | awk '{print $63}'` - ribmax=`echo ${oi} | awk '{print $64}'` - atmco2=`echo ${oi} | awk '{print $65}'` - thcrit=`echo ${oi} | awk '{print $66}'` - smfire=`echo ${oi} | awk '{print $67}'` - ifire=`echo ${oi} | awk '{print $68}'` - fireparm=`echo ${oi} | awk '{print $69}'` - ipercol=`echo ${oi} | awk '{print $70}'` - runoff=`echo ${oi} | awk '{print $71}'` - imetrad=`echo ${oi} | awk '{print $72}'` - ibranch=`echo ${oi} | awk '{print $73}'` - icanrad=`echo ${oi} | awk '{print $74}'` - crown=`echo ${oi} | awk '{print $75}'` - ltransvis=`echo ${oi} | awk '{print $76}'` - lreflectvis=`echo ${oi} | awk '{print $77}'` - ltransnir=`echo ${oi} | awk '{print $78}'` - lreflectnir=`echo ${oi} | awk '{print $79}'` - orienttree=`echo ${oi} | awk '{print $80}'` - orientgrass=`echo ${oi} | awk '{print $81}'` - clumptree=`echo ${oi} | awk '{print $82}'` - clumpgrass=`echo ${oi} | awk '{print $83}'` - ivegtdyn=`echo ${oi} | awk '{print $84}'` - igndvap=`echo ${oi} | awk '{print $85}'` - iphen=`echo ${oi} | awk '{print $86}'` - iallom=`echo ${oi} | awk '{print $87}'` - ibigleaf=`echo ${oi} | awk '{print $88}'` - irepro=`echo ${oi} | awk '{print $89}'` - treefall=`echo ${oi} | awk '{print $90}'` + iage=`echo ${oi} | awk '{print $16}'` + polyisoil=`echo ${oi} | awk '{print $17}'` + polyntext=`echo ${oi} | awk '{print $18}'` + polysand=`echo ${oi} | awk '{print $19}'` + polyclay=`echo ${oi} | awk '{print $20}'` + polydepth=`echo ${oi} | awk '{print $21}'` + polysoilbc=`echo ${oi} | awk '{print $22}'` + polysldrain=`echo ${oi} | awk '{print $23}'` + polycol=`echo ${oi} | awk '{print $24}'` + slzres=`echo ${oi} | awk '{print $25}'` + queue=`echo ${oi} | awk '{print $26}'` + metdriver=`echo ${oi} | awk '{print $27}'` + dtlsm=`echo ${oi} | awk '{print $28}'` + vmfactc3=`echo ${oi} | awk '{print $29}'` + vmfactc4=`echo ${oi} | awk '{print $30}'` + mphototrc3=`echo ${oi} | awk '{print $31}'` + mphototec3=`echo ${oi} | awk '{print $32}'` + mphotoc4=`echo ${oi} | awk '{print $33}'` + bphotoblc3=`echo ${oi} | awk '{print $34}'` + bphotonlc3=`echo ${oi} | awk '{print $35}'` + bphotoc4=`echo ${oi} | awk '{print $36}'` + kwgrass=`echo ${oi} | awk '{print $37}'` + kwtree=`echo ${oi} | awk '{print $38}'` + gammac3=`echo ${oi} | awk '{print $39}'` + gammac4=`echo ${oi} | awk '{print $40}'` + d0grass=`echo ${oi} | awk '{print $41}'` + d0tree=`echo ${oi} | awk '{print $42}'` + alphac3=`echo ${oi} | awk '{print $43}'` + alphac4=`echo ${oi} | awk '{print $44}'` + klowco2=`echo ${oi} | awk '{print $45}'` + decomp=`echo ${oi} | awk '{print $46}'` + rrffact=`echo ${oi} | awk '{print $47}'` + growthresp=`echo ${oi} | awk '{print $48}'` + lwidthgrass=`echo ${oi} | awk '{print $49}'` + lwidthbltree=`echo ${oi} | awk '{print $50}'` + lwidthnltree=`echo ${oi} | awk '{print $51}'` + q10c3=`echo ${oi} | awk '{print $52}'` + q10c4=`echo ${oi} | awk '{print $53}'` + h2olimit=`echo ${oi} | awk '{print $54}'` + imortscheme=`echo ${oi} | awk '{print $55}'` + ddmortconst=`echo ${oi} | awk '{print $56}'` + isfclyrm=`echo ${oi} | awk '{print $57}'` + icanturb=`echo ${oi} | awk '{print $58}'` + ubmin=`echo ${oi} | awk '{print $59}'` + ugbmin=`echo ${oi} | awk '{print $60}'` + ustmin=`echo ${oi} | awk '{print $61}'` + gamm=`echo ${oi} | awk '{print $62}'` + gamh=`echo ${oi} | awk '{print $63}'` + tprandtl=`echo ${oi} | awk '{print $64}'` + ribmax=`echo ${oi} | awk '{print $65}'` + atmco2=`echo ${oi} | awk '{print $66}'` + thcrit=`echo ${oi} | awk '{print $67}'` + smfire=`echo ${oi} | awk '{print $68}'` + ifire=`echo ${oi} | awk '{print $69}'` + fireparm=`echo ${oi} | awk '{print $70}'` + ipercol=`echo ${oi} | awk '{print $71}'` + runoff=`echo ${oi} | awk '{print $72}'` + imetrad=`echo ${oi} | awk '{print $73}'` + ibranch=`echo ${oi} | awk '{print $74}'` + icanrad=`echo ${oi} | awk '{print $75}'` + crown=`echo ${oi} | awk '{print $76}'` + ltransvis=`echo ${oi} | awk '{print $77}'` + lreflectvis=`echo ${oi} | awk '{print $78}'` + ltransnir=`echo ${oi} | awk '{print $79}'` + lreflectnir=`echo ${oi} | awk '{print $80}'` + orienttree=`echo ${oi} | awk '{print $81}'` + orientgrass=`echo ${oi} | awk '{print $82}'` + clumptree=`echo ${oi} | awk '{print $83}'` + clumpgrass=`echo ${oi} | awk '{print $84}'` + ivegtdyn=`echo ${oi} | awk '{print $85}'` + igndvap=`echo ${oi} | awk '{print $86}'` + iphen=`echo ${oi} | awk '{print $87}'` + iallom=`echo ${oi} | awk '{print $88}'` + ibigleaf=`echo ${oi} | awk '{print $89}'` + irepro=`echo ${oi} | awk '{print $90}'` + treefall=`echo ${oi} | awk '{print $91}'` #---------------------------------------------------------------------------------------# diff --git a/ED/Template/run_sitter.sh b/ED/Template/run_sitter.sh index c706f2433..a10b0828a 100755 --- a/ED/Template/run_sitter.sh +++ b/ED/Template/run_sitter.sh @@ -17,7 +17,7 @@ source $HOME/.bashrc #----- Main path, you must actually type the path in case you add to chron. ---------------# -here='xxxxxxxxxxxxxxxxxxxxx' +here='/n/moorcroftfs1/mlongo/EDBRAMS/final_ed/biophysics/long_term/met+size+age+pft+fire' if [ ${here} == 'xxxxxxxxxxxxxxxxxxxxx' ] then echo ' You must set up variable here before using run_sitter.sh!!!' @@ -63,7 +63,7 @@ moi=`whoami` # packdatasrc -- Source path from where to copy to scratch. # #------------------------------------------------------------------------------------------# copy2scratch='y' -packdatasrc='/n/moorcroft_data/mlongo/data/tower_scratch' +packdatasrc='/n/nss2b/moorcroft_lab/mlongo/data/2scratch' #------------------------------------------------------------------------------------------# @@ -127,25 +127,25 @@ ccc='/n/Moorcroft_Lab/Users/mlongo/util/calc.sh' # Calculator #------------------------------------------------------------------------------------------# #------ Queue: moorcroft2a. ---------------------------------------------------------------# m2afull=96 -m2aumax=0 +m2aumax=96 #------ Queue: moorcroft2b. ---------------------------------------------------------------# m2bfull=88 m2bumax=0 #------ Queue: moorcroft2c. ---------------------------------------------------------------# m2cfull=64 -m2cumax=0 +m2cumax=64 #------ Queue: moorcroft_6100a. -----------------------------------------------------------# a61full=48 -a61umax=0 +a61umax=48 #------ Queue: moorcroft_6100b. -----------------------------------------------------------# b61full=480 -b61umax=0 +b61umax=204 #------ Queue: wofsy. ---------------------------------------------------------------------# wsyfull=96 -wsyumax=0 +wsyumax=96 #------ Queue: unrestricted_serial. -------------------------------------------------------# usefull=80 -useumax=0 +useumax=80 #------ Queue: unrestricted_parallel. -----------------------------------------------------# upapmax=0 #------------------------------------------------------------------------------------------# @@ -169,7 +169,7 @@ upapmax=0 # email1day -- Reminder so the script knows whether an e-mail has been sent or not. # #------------------------------------------------------------------------------------------# email1day=1 -recipient='xxxxxx@xxxx.com' +recipient='mdplongo@gmail.com' plotstatus=1 Rscript_plot="${situtils}/plot.status.r" R_figlist="${situtils}/stt_stext16.png @@ -252,9 +252,9 @@ fi #----- Set the main path for the site, pseudo past and Sheffield met drivers. -------------# if [ ${copy2scratch} == 'y' -o ${copy2scratch} == 'Y' ] then - sitemet='/scratch/mlongo/met_driver/site_met_driver' - scenariopath='/scratch/mlongo/met_driver/realisation_scen_driver' - shefpath='/scratch/mlongo/met_driver/sheffield' + sitemet='/scratch/mlongo/site_met_driver' + scenariopath='/scratch/mlongo/wmo+eft_driver' + shefpath='/scratch/mlongo/sheff_met_driver' else sitemet=${sitemetdef} scenariopath=${scenariopathdef} @@ -312,7 +312,6 @@ then let line=${ff}+3 - #------------------------------------------------------------------------------------# # Read the polyth line of the polygon list. There must be smarter ways of do- # # ing this, but this works. Here we obtain the polygon name, and its longitude and # @@ -334,86 +333,86 @@ then initmode=`echo ${oi} | awk '{print $13}'` iscenario=`echo ${oi} | awk '{print $14}'` isizepft=`echo ${oi} | awk '{print $15}'` - polyisoil=`echo ${oi} | awk '{print $16}'` - polyntext=`echo ${oi} | awk '{print $17}'` - polysand=`echo ${oi} | awk '{print $18}'` - polyclay=`echo ${oi} | awk '{print $19}'` - polydepth=`echo ${oi} | awk '{print $20}'` - polysoilbc=`echo ${oi} | awk '{print $21}'` - polysldrain=`echo ${oi} | awk '{print $22}'` - polycol=`echo ${oi} | awk '{print $23}'` - slzres=`echo ${oi} | awk '{print $24}'` - queue=`echo ${oi} | awk '{print $25}'` - metdriver=`echo ${oi} | awk '{print $26}'` - dtlsm=`echo ${oi} | awk '{print $27}'` - vmfactc3=`echo ${oi} | awk '{print $28}'` - vmfactc4=`echo ${oi} | awk '{print $29}'` - mphototrc3=`echo ${oi} | awk '{print $30}'` - mphototec3=`echo ${oi} | awk '{print $31}'` - mphotoc4=`echo ${oi} | awk '{print $32}'` - bphotoblc3=`echo ${oi} | awk '{print $33}'` - bphotonlc3=`echo ${oi} | awk '{print $34}'` - bphotoc4=`echo ${oi} | awk '{print $35}'` - kwgrass=`echo ${oi} | awk '{print $36}'` - kwtree=`echo ${oi} | awk '{print $37}'` - gammac3=`echo ${oi} | awk '{print $38}'` - gammac4=`echo ${oi} | awk '{print $39}'` - d0grass=`echo ${oi} | awk '{print $40}'` - d0tree=`echo ${oi} | awk '{print $41}'` - alphac3=`echo ${oi} | awk '{print $42}'` - alphac4=`echo ${oi} | awk '{print $43}'` - klowco2=`echo ${oi} | awk '{print $44}'` - decomp=`echo ${oi} | awk '{print $45}'` - rrffact=`echo ${oi} | awk '{print $46}'` - growthresp=`echo ${oi} | awk '{print $47}'` - lwidthgrass=`echo ${oi} | awk '{print $48}'` - lwidthbltree=`echo ${oi} | awk '{print $49}'` - lwidthnltree=`echo ${oi} | awk '{print $50}'` - q10c3=`echo ${oi} | awk '{print $51}'` - q10c4=`echo ${oi} | awk '{print $52}'` - h2olimit=`echo ${oi} | awk '{print $53}'` - imortscheme=`echo ${oi} | awk '{print $54}'` - ddmortconst=`echo ${oi} | awk '{print $55}'` - isfclyrm=`echo ${oi} | awk '{print $56}'` - icanturb=`echo ${oi} | awk '{print $57}'` - ubmin=`echo ${oi} | awk '{print $58}'` - ugbmin=`echo ${oi} | awk '{print $59}'` - ustmin=`echo ${oi} | awk '{print $60}'` - gamm=`echo ${oi} | awk '{print $61}'` - gamh=`echo ${oi} | awk '{print $62}'` - tprandtl=`echo ${oi} | awk '{print $63}'` - ribmax=`echo ${oi} | awk '{print $64}'` - atmco2=`echo ${oi} | awk '{print $65}'` - thcrit=`echo ${oi} | awk '{print $66}'` - smfire=`echo ${oi} | awk '{print $67}'` - ifire=`echo ${oi} | awk '{print $68}'` - fireparm=`echo ${oi} | awk '{print $69}'` - ipercol=`echo ${oi} | awk '{print $70}'` - runoff=`echo ${oi} | awk '{print $71}'` - imetrad=`echo ${oi} | awk '{print $72}'` - ibranch=`echo ${oi} | awk '{print $73}'` - icanrad=`echo ${oi} | awk '{print $74}'` - crown=`echo ${oi} | awk '{print $75}'` - ltransvis=`echo ${oi} | awk '{print $76}'` - lreflectvis=`echo ${oi} | awk '{print $77}'` - ltransnir=`echo ${oi} | awk '{print $78}'` - lreflectnir=`echo ${oi} | awk '{print $79}'` - orienttree=`echo ${oi} | awk '{print $80}'` - orientgrass=`echo ${oi} | awk '{print $81}'` - clumptree=`echo ${oi} | awk '{print $82}'` - clumpgrass=`echo ${oi} | awk '{print $83}'` - ivegtdyn=`echo ${oi} | awk '{print $84}'` - igndvap=`echo ${oi} | awk '{print $85}'` - iphen=`echo ${oi} | awk '{print $86}'` - iallom=`echo ${oi} | awk '{print $87}'` - ibigleaf=`echo ${oi} | awk '{print $88}'` - irepro=`echo ${oi} | awk '{print $89}'` - treefall=`echo ${oi} | awk '{print $90}'` + iage=`echo ${oi} | awk '{print $16}'` + polyisoil=`echo ${oi} | awk '{print $17}'` + polyntext=`echo ${oi} | awk '{print $18}'` + polysand=`echo ${oi} | awk '{print $19}'` + polyclay=`echo ${oi} | awk '{print $20}'` + polydepth=`echo ${oi} | awk '{print $21}'` + polysoilbc=`echo ${oi} | awk '{print $22}'` + polysldrain=`echo ${oi} | awk '{print $23}'` + polycol=`echo ${oi} | awk '{print $24}'` + slzres=`echo ${oi} | awk '{print $25}'` + queue=`echo ${oi} | awk '{print $26}'` + metdriver=`echo ${oi} | awk '{print $27}'` + dtlsm=`echo ${oi} | awk '{print $28}'` + vmfactc3=`echo ${oi} | awk '{print $29}'` + vmfactc4=`echo ${oi} | awk '{print $30}'` + mphototrc3=`echo ${oi} | awk '{print $31}'` + mphototec3=`echo ${oi} | awk '{print $32}'` + mphotoc4=`echo ${oi} | awk '{print $33}'` + bphotoblc3=`echo ${oi} | awk '{print $34}'` + bphotonlc3=`echo ${oi} | awk '{print $35}'` + bphotoc4=`echo ${oi} | awk '{print $36}'` + kwgrass=`echo ${oi} | awk '{print $37}'` + kwtree=`echo ${oi} | awk '{print $38}'` + gammac3=`echo ${oi} | awk '{print $39}'` + gammac4=`echo ${oi} | awk '{print $40}'` + d0grass=`echo ${oi} | awk '{print $41}'` + d0tree=`echo ${oi} | awk '{print $42}'` + alphac3=`echo ${oi} | awk '{print $43}'` + alphac4=`echo ${oi} | awk '{print $44}'` + klowco2=`echo ${oi} | awk '{print $45}'` + decomp=`echo ${oi} | awk '{print $46}'` + rrffact=`echo ${oi} | awk '{print $47}'` + growthresp=`echo ${oi} | awk '{print $48}'` + lwidthgrass=`echo ${oi} | awk '{print $49}'` + lwidthbltree=`echo ${oi} | awk '{print $50}'` + lwidthnltree=`echo ${oi} | awk '{print $51}'` + q10c3=`echo ${oi} | awk '{print $52}'` + q10c4=`echo ${oi} | awk '{print $53}'` + h2olimit=`echo ${oi} | awk '{print $54}'` + imortscheme=`echo ${oi} | awk '{print $55}'` + ddmortconst=`echo ${oi} | awk '{print $56}'` + isfclyrm=`echo ${oi} | awk '{print $57}'` + icanturb=`echo ${oi} | awk '{print $58}'` + ubmin=`echo ${oi} | awk '{print $59}'` + ugbmin=`echo ${oi} | awk '{print $60}'` + ustmin=`echo ${oi} | awk '{print $61}'` + gamm=`echo ${oi} | awk '{print $62}'` + gamh=`echo ${oi} | awk '{print $63}'` + tprandtl=`echo ${oi} | awk '{print $64}'` + ribmax=`echo ${oi} | awk '{print $65}'` + atmco2=`echo ${oi} | awk '{print $66}'` + thcrit=`echo ${oi} | awk '{print $67}'` + smfire=`echo ${oi} | awk '{print $68}'` + ifire=`echo ${oi} | awk '{print $69}'` + fireparm=`echo ${oi} | awk '{print $70}'` + ipercol=`echo ${oi} | awk '{print $71}'` + runoff=`echo ${oi} | awk '{print $72}'` + imetrad=`echo ${oi} | awk '{print $73}'` + ibranch=`echo ${oi} | awk '{print $74}'` + icanrad=`echo ${oi} | awk '{print $75}'` + crown=`echo ${oi} | awk '{print $76}'` + ltransvis=`echo ${oi} | awk '{print $77}'` + lreflectvis=`echo ${oi} | awk '{print $78}'` + ltransnir=`echo ${oi} | awk '{print $79}'` + lreflectnir=`echo ${oi} | awk '{print $80}'` + orienttree=`echo ${oi} | awk '{print $81}'` + orientgrass=`echo ${oi} | awk '{print $82}'` + clumptree=`echo ${oi} | awk '{print $83}'` + clumpgrass=`echo ${oi} | awk '{print $84}'` + ivegtdyn=`echo ${oi} | awk '{print $85}'` + igndvap=`echo ${oi} | awk '{print $86}'` + iphen=`echo ${oi} | awk '{print $87}'` + iallom=`echo ${oi} | awk '{print $88}'` + ibigleaf=`echo ${oi} | awk '{print $89}'` + irepro=`echo ${oi} | awk '{print $90}'` + treefall=`echo ${oi} | awk '{print $91}'` #------------------------------------------------------------------------------------# - #------------------------------------------------------------------------------------# # Define whether we use the met cycle to define the first and last year, or the # # default year. # @@ -716,7 +715,7 @@ then # Determine which PFTs to use based on the "iata" code and isizepft. # #------------------------------------------------------------------------------------# case ${isizepft} in - 0|1) + 0|1|5) case ${polyiata} in tzi|zmh|nqn) pfts='6,7,9,10,11,16,17' @@ -830,7 +829,6 @@ then - #------------------------------------------------------------------------------------# # Choose the scenario to use. Iscenario follows the following convention: # # "default" -- No scenario. Use the tower/Sheffield data. # @@ -966,91 +964,174 @@ then - #---------------------------------------------------------------------------------# - # Determine which meteorological data set to use. Default is the # - # Sheffield/NCEP dataset, otherwise the site-level tower data is used. # + # Check whether this is a true scenario or just the tower. # #---------------------------------------------------------------------------------# - case ${metdriver} in - Bananal) - metdriverdb="${fullscen}/Bananal/Bananal_HEADER" - metcyc1=1972 - metcycf=2011 - imetavg=1 - ;; - Caxiuana) - metdriverdb="${fullscen}/Caxiuana/Caxiuana_HEADER" - metcyc1=1972 - metcycf=2011 - imetavg=1 - ;; - Fazenda_Nossa_Senhora) - metdriverdb="${fullscen}/Fazenda_Nossa_Senhora/Fazenda_Nossa_Senhora_HEADER" - metcyc1=1977 - metcycf=2002 - imetavg=1 - ;; - Manaus_Km34) - metdriverdb="${fullscen}/Manaus_Km34/Manaus_Km34_HEADER" - metcyc1=1972 - metcycf=2011 - imetavg=1 - ;; - Paracou) - metdriverdb="${fullscen}/Paracou/Paracou_HEADER" - metcyc1=1972 - metcycf=2011 - imetavg=1 - ;; - Pe-de-Gigante) - metdriverdb="${fullscen}/Pe-de-Gigante/Pe-de-Gigante_HEADER" - metcyc1=1972 - metcycf=2011 - imetavg=1 - ;; - Petrolina) - metdriverdb="${fullscen}/Petrolina/Petrolina_HEADER" - metcyc1=1972 - metcycf=2011 - imetavg=1 - ;; - Rebio_Jaru) - metdriverdb="${fullscen}/Rebio_Jaru/Rebio_Jaru_HEADER" - metcyc1=1977 - metcycf=2002 - imetavg=1 - ;; - Santarem_Km67) - metdriverdb="${fullscen}/Santarem_Km67/Santarem_Km67_HEADER" - metcyc1=1972 - metcycf=2011 - imetavg=1 - ;; - Santarem_Km77) - metdriverdb="${fullscen}/Santarem_Km77/Santarem_Km77_HEADER" - metcyc1=1972 - metcycf=2011 - imetavg=1 - ;; - Santarem_Km83) - metdriverdb="${fullscen}/Santarem_Km83/Santarem_Km83_HEADER" - metcyc1=1972 - metcycf=2011 - imetavg=1 - ;; - *) - echo 'Met driver: '${metdriver} - echo 'Sorry, this met driver is not valid for scenario runs' - exit 85 - ;; - esac + if [ ${iscenario} == "eft" ] + then + #------------------------------------------------------------------------------# + # EFT. This is actually the same thing as "default", for convenience # + # placed as a scenario. # + #------------------------------------------------------------------------------# + case ${metdriver} in + Bananal) + metdriverdb="${fullscen}/Bananal/Bananal_HEADER" + metcyc1=2004 + metcycf=2006 + imetavg=1 + ;; + Caxiuana) + metdriverdb="${fullscen}/Caxiuana/Caxiuana_HEADER" + metcyc1=1999 + metcycf=2003 + imetavg=1 + ;; + Fazenda_Nossa_Senhora) + metdriverdb="${fullscen}/Fazenda_Nossa_Senhora/Fazenda_Nossa_Senhora_HEADER" + metcyc1=1999 + metcycf=2002 + imetavg=1 + ;; + Manaus_Km34) + metdriverdb="${fullscen}/Manaus_Km34/Manaus_Km34_HEADER" + metcyc1=1999 + metcycf=2005 + imetavg=1 + ;; + Paracou) + metdriverdb="${fullscen}/Paracou/Paracou_HEADER" + metcyc1=2004 + metcycf=2009 + imetavg=1 + ;; + Pe-de-Gigante) + metdriverdb="${fullscen}/Pe-de-Gigante/Pe-de-Gigante_HEADER" + metcyc1=2001 + metcycf=2003 + imetavg=1 + ;; + Petrolina) + metdriverdb="${fullscen}/Petrolina/Petrolina_HEADER" + metcyc1=2004 + metcycf=2011 + imetavg=1 + ;; + Rebio_Jaru) + metdriverdb="${fullscen}/Rebio_Jaru/Rebio_Jaru_HEADER" + metcyc1=1999 + metcycf=2002 + imetavg=1 + ;; + Santarem_Km67) + metdriverdb="${fullscen}/Santarem_Km67/Santarem_Km67_HEADER" + metcyc1=2001 + metcycf=2010 + imetavg=1 + ;; + Santarem_Km77) + metdriverdb="${fullscen}/Santarem_Km77/Santarem_Km77_HEADER" + metcyc1=2001 + metcycf=2005 + imetavg=1 + ;; + Santarem_Km83) + metdriverdb="${fullscen}/Santarem_Km83/Santarem_Km83_HEADER" + metcyc1=2000 + metcycf=2003 + imetavg=1 + ;; + *) + echo 'Met driver: '${metdriver} + echo 'Sorry, this met driver is not valid for scenario runs' + exit 85 + ;; + esac + #------------------------------------------------------------------------------# + else + #------------------------------------------------------------------------------# + # INMET data, or any other scenario based on INMET. Years are fixed. # + #------------------------------------------------------------------------------# + case ${metdriver} in + Bananal) + metdriverdb="${fullscen}/Bananal/Bananal_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Caxiuana) + metdriverdb="${fullscen}/Caxiuana/Caxiuana_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Fazenda_Nossa_Senhora) + metdriverdb="${fullscen}/Fazenda_Nossa_Senhora/Fazenda_Nossa_Senhora_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Manaus_Km34) + metdriverdb="${fullscen}/Manaus_Km34/Manaus_Km34_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Paracou) + metdriverdb="${fullscen}/Paracou/Paracou_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Pe-de-Gigante) + metdriverdb="${fullscen}/Pe-de-Gigante/Pe-de-Gigante_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Petrolina) + metdriverdb="${fullscen}/Petrolina/Petrolina_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Rebio_Jaru) + metdriverdb="${fullscen}/Rebio_Jaru/Rebio_Jaru_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Santarem_Km67) + metdriverdb="${fullscen}/Santarem_Km67/Santarem_Km67_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Santarem_Km77) + metdriverdb="${fullscen}/Santarem_Km77/Santarem_Km77_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Santarem_Km83) + metdriverdb="${fullscen}/Santarem_Km83/Santarem_Km83_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + *) + echo 'Met driver: '${metdriver} + echo 'Sorry, this met driver is not valid for scenario runs' + exit 85 + ;; + esac + #------------------------------------------------------------------------------# + fi #---------------------------------------------------------------------------------# fi #------------------------------------------------------------------------------------# - #----- Define the job name. ---------------------------------------------------------# jobname="${desc}-${polyname}" #------------------------------------------------------------------------------------# @@ -1323,6 +1404,7 @@ then sed -i s@mymon1stcensus@${mon1stcensus}@g ${ED2IN} sed -i s@myminrecruitdbh@${minrecruitdbh}@g ${ED2IN} sed -i s@mytreefall@${treefall}@g ${ED2IN} + sed -i s@mymaxpatch@${iage}@g ${ED2IN} #------ Soil variables. ----------------------------------------------------# sed -i s@myslz1@"${polyslz1}"@g ${ED2IN} sed -i s@myslz2@"${polyslz2}"@g ${ED2IN} @@ -1638,6 +1720,7 @@ then sed -i s@mymon1stcensus@${mon1stcensus}@g ${ED2IN} sed -i s@myminrecruitdbh@${minrecruitdbh}@g ${ED2IN} sed -i s@mytreefall@${treefall}@g ${ED2IN} + sed -i s@mymaxpatch@${iage}@g ${ED2IN} #------ Soil variables. ----------------------------------------------------# sed -i s@myslz1@"${polyslz1}"@g ${ED2IN} sed -i s@myslz2@"${polyslz2}"@g ${ED2IN} @@ -1914,81 +1997,82 @@ then initmode=`echo ${oi} | awk '{print $13}'` iscenario=`echo ${oi} | awk '{print $14}'` isizepft=`echo ${oi} | awk '{print $15}'` - polyisoil=`echo ${oi} | awk '{print $16}'` - polyntext=`echo ${oi} | awk '{print $17}'` - polysand=`echo ${oi} | awk '{print $18}'` - polyclay=`echo ${oi} | awk '{print $19}'` - polydepth=`echo ${oi} | awk '{print $20}'` - polysoilbc=`echo ${oi} | awk '{print $21}'` - polysldrain=`echo ${oi} | awk '{print $22}'` - polycol=`echo ${oi} | awk '{print $23}'` - slzres=`echo ${oi} | awk '{print $24}'` - queue=`echo ${oi} | awk '{print $25}'` - metdriver=`echo ${oi} | awk '{print $26}'` - dtlsm=`echo ${oi} | awk '{print $27}'` - vmfactc3=`echo ${oi} | awk '{print $28}'` - vmfactc4=`echo ${oi} | awk '{print $29}'` - mphototrc3=`echo ${oi} | awk '{print $30}'` - mphototec3=`echo ${oi} | awk '{print $31}'` - mphotoc4=`echo ${oi} | awk '{print $32}'` - bphotoblc3=`echo ${oi} | awk '{print $33}'` - bphotonlc3=`echo ${oi} | awk '{print $34}'` - bphotoc4=`echo ${oi} | awk '{print $35}'` - kwgrass=`echo ${oi} | awk '{print $36}'` - kwtree=`echo ${oi} | awk '{print $37}'` - gammac3=`echo ${oi} | awk '{print $38}'` - gammac4=`echo ${oi} | awk '{print $39}'` - d0grass=`echo ${oi} | awk '{print $40}'` - d0tree=`echo ${oi} | awk '{print $41}'` - alphac3=`echo ${oi} | awk '{print $42}'` - alphac4=`echo ${oi} | awk '{print $43}'` - klowco2=`echo ${oi} | awk '{print $44}'` - decomp=`echo ${oi} | awk '{print $45}'` - rrffact=`echo ${oi} | awk '{print $46}'` - growthresp=`echo ${oi} | awk '{print $47}'` - lwidthgrass=`echo ${oi} | awk '{print $48}'` - lwidthbltree=`echo ${oi} | awk '{print $49}'` - lwidthnltree=`echo ${oi} | awk '{print $50}'` - q10c3=`echo ${oi} | awk '{print $51}'` - q10c4=`echo ${oi} | awk '{print $52}'` - h2olimit=`echo ${oi} | awk '{print $53}'` - imortscheme=`echo ${oi} | awk '{print $54}'` - ddmortconst=`echo ${oi} | awk '{print $55}'` - isfclyrm=`echo ${oi} | awk '{print $56}'` - icanturb=`echo ${oi} | awk '{print $57}'` - ubmin=`echo ${oi} | awk '{print $58}'` - ugbmin=`echo ${oi} | awk '{print $59}'` - ustmin=`echo ${oi} | awk '{print $60}'` - gamm=`echo ${oi} | awk '{print $61}'` - gamh=`echo ${oi} | awk '{print $62}'` - tprandtl=`echo ${oi} | awk '{print $63}'` - ribmax=`echo ${oi} | awk '{print $64}'` - atmco2=`echo ${oi} | awk '{print $65}'` - thcrit=`echo ${oi} | awk '{print $66}'` - smfire=`echo ${oi} | awk '{print $67}'` - ifire=`echo ${oi} | awk '{print $68}'` - fireparm=`echo ${oi} | awk '{print $69}'` - ipercol=`echo ${oi} | awk '{print $70}'` - runoff=`echo ${oi} | awk '{print $71}'` - imetrad=`echo ${oi} | awk '{print $72}'` - ibranch=`echo ${oi} | awk '{print $73}'` - icanrad=`echo ${oi} | awk '{print $74}'` - crown=`echo ${oi} | awk '{print $75}'` - ltransvis=`echo ${oi} | awk '{print $76}'` - lreflectvis=`echo ${oi} | awk '{print $77}'` - ltransnir=`echo ${oi} | awk '{print $78}'` - lreflectnir=`echo ${oi} | awk '{print $79}'` - orienttree=`echo ${oi} | awk '{print $80}'` - orientgrass=`echo ${oi} | awk '{print $81}'` - clumptree=`echo ${oi} | awk '{print $82}'` - clumpgrass=`echo ${oi} | awk '{print $83}'` - ivegtdyn=`echo ${oi} | awk '{print $84}'` - igndvap=`echo ${oi} | awk '{print $85}'` - iphen=`echo ${oi} | awk '{print $86}'` - iallom=`echo ${oi} | awk '{print $87}'` - ibigleaf=`echo ${oi} | awk '{print $88}'` - irepro=`echo ${oi} | awk '{print $89}'` - treefall=`echo ${oi} | awk '{print $90}'` + iage=`echo ${oi} | awk '{print $16}'` + polyisoil=`echo ${oi} | awk '{print $17}'` + polyntext=`echo ${oi} | awk '{print $18}'` + polysand=`echo ${oi} | awk '{print $19}'` + polyclay=`echo ${oi} | awk '{print $20}'` + polydepth=`echo ${oi} | awk '{print $21}'` + polysoilbc=`echo ${oi} | awk '{print $22}'` + polysldrain=`echo ${oi} | awk '{print $23}'` + polycol=`echo ${oi} | awk '{print $24}'` + slzres=`echo ${oi} | awk '{print $25}'` + queue=`echo ${oi} | awk '{print $26}'` + metdriver=`echo ${oi} | awk '{print $27}'` + dtlsm=`echo ${oi} | awk '{print $28}'` + vmfactc3=`echo ${oi} | awk '{print $29}'` + vmfactc4=`echo ${oi} | awk '{print $30}'` + mphototrc3=`echo ${oi} | awk '{print $31}'` + mphototec3=`echo ${oi} | awk '{print $32}'` + mphotoc4=`echo ${oi} | awk '{print $33}'` + bphotoblc3=`echo ${oi} | awk '{print $34}'` + bphotonlc3=`echo ${oi} | awk '{print $35}'` + bphotoc4=`echo ${oi} | awk '{print $36}'` + kwgrass=`echo ${oi} | awk '{print $37}'` + kwtree=`echo ${oi} | awk '{print $38}'` + gammac3=`echo ${oi} | awk '{print $39}'` + gammac4=`echo ${oi} | awk '{print $40}'` + d0grass=`echo ${oi} | awk '{print $41}'` + d0tree=`echo ${oi} | awk '{print $42}'` + alphac3=`echo ${oi} | awk '{print $43}'` + alphac4=`echo ${oi} | awk '{print $44}'` + klowco2=`echo ${oi} | awk '{print $45}'` + decomp=`echo ${oi} | awk '{print $46}'` + rrffact=`echo ${oi} | awk '{print $47}'` + growthresp=`echo ${oi} | awk '{print $48}'` + lwidthgrass=`echo ${oi} | awk '{print $49}'` + lwidthbltree=`echo ${oi} | awk '{print $50}'` + lwidthnltree=`echo ${oi} | awk '{print $51}'` + q10c3=`echo ${oi} | awk '{print $52}'` + q10c4=`echo ${oi} | awk '{print $53}'` + h2olimit=`echo ${oi} | awk '{print $54}'` + imortscheme=`echo ${oi} | awk '{print $55}'` + ddmortconst=`echo ${oi} | awk '{print $56}'` + isfclyrm=`echo ${oi} | awk '{print $57}'` + icanturb=`echo ${oi} | awk '{print $58}'` + ubmin=`echo ${oi} | awk '{print $59}'` + ugbmin=`echo ${oi} | awk '{print $60}'` + ustmin=`echo ${oi} | awk '{print $61}'` + gamm=`echo ${oi} | awk '{print $62}'` + gamh=`echo ${oi} | awk '{print $63}'` + tprandtl=`echo ${oi} | awk '{print $64}'` + ribmax=`echo ${oi} | awk '{print $65}'` + atmco2=`echo ${oi} | awk '{print $66}'` + thcrit=`echo ${oi} | awk '{print $67}'` + smfire=`echo ${oi} | awk '{print $68}'` + ifire=`echo ${oi} | awk '{print $69}'` + fireparm=`echo ${oi} | awk '{print $70}'` + ipercol=`echo ${oi} | awk '{print $71}'` + runoff=`echo ${oi} | awk '{print $72}'` + imetrad=`echo ${oi} | awk '{print $73}'` + ibranch=`echo ${oi} | awk '{print $74}'` + icanrad=`echo ${oi} | awk '{print $75}'` + crown=`echo ${oi} | awk '{print $76}'` + ltransvis=`echo ${oi} | awk '{print $77}'` + lreflectvis=`echo ${oi} | awk '{print $78}'` + ltransnir=`echo ${oi} | awk '{print $79}'` + lreflectnir=`echo ${oi} | awk '{print $80}'` + orienttree=`echo ${oi} | awk '{print $81}'` + orientgrass=`echo ${oi} | awk '{print $82}'` + clumptree=`echo ${oi} | awk '{print $83}'` + clumpgrass=`echo ${oi} | awk '{print $84}'` + ivegtdyn=`echo ${oi} | awk '{print $85}'` + igndvap=`echo ${oi} | awk '{print $86}'` + iphen=`echo ${oi} | awk '{print $87}'` + iallom=`echo ${oi} | awk '{print $88}'` + ibigleaf=`echo ${oi} | awk '{print $89}'` + irepro=`echo ${oi} | awk '{print $90}'` + treefall=`echo ${oi} | awk '{print $91}'` #------------------------------------------------------------------------------------# @@ -2333,81 +2417,82 @@ do initmode=`echo ${oi} | awk '{print $13}'` iscenario=`echo ${oi} | awk '{print $14}'` isizepft=`echo ${oi} | awk '{print $15}'` - polyisoil=`echo ${oi} | awk '{print $16}'` - polyntext=`echo ${oi} | awk '{print $17}'` - polysand=`echo ${oi} | awk '{print $18}'` - polyclay=`echo ${oi} | awk '{print $19}'` - polydepth=`echo ${oi} | awk '{print $20}'` - polysoilbc=`echo ${oi} | awk '{print $21}'` - polysldrain=`echo ${oi} | awk '{print $22}'` - polycol=`echo ${oi} | awk '{print $23}'` - slzres=`echo ${oi} | awk '{print $24}'` - queue=`echo ${oi} | awk '{print $25}'` - metdriver=`echo ${oi} | awk '{print $26}'` - dtlsm=`echo ${oi} | awk '{print $27}'` - vmfactc3=`echo ${oi} | awk '{print $28}'` - vmfactc4=`echo ${oi} | awk '{print $29}'` - mphototrc3=`echo ${oi} | awk '{print $30}'` - mphototec3=`echo ${oi} | awk '{print $31}'` - mphotoc4=`echo ${oi} | awk '{print $32}'` - bphotoblc3=`echo ${oi} | awk '{print $33}'` - bphotonlc3=`echo ${oi} | awk '{print $34}'` - bphotoc4=`echo ${oi} | awk '{print $35}'` - kwgrass=`echo ${oi} | awk '{print $36}'` - kwtree=`echo ${oi} | awk '{print $37}'` - gammac3=`echo ${oi} | awk '{print $38}'` - gammac4=`echo ${oi} | awk '{print $39}'` - d0grass=`echo ${oi} | awk '{print $40}'` - d0tree=`echo ${oi} | awk '{print $41}'` - alphac3=`echo ${oi} | awk '{print $42}'` - alphac4=`echo ${oi} | awk '{print $43}'` - klowco2=`echo ${oi} | awk '{print $44}'` - decomp=`echo ${oi} | awk '{print $45}'` - rrffact=`echo ${oi} | awk '{print $46}'` - growthresp=`echo ${oi} | awk '{print $47}'` - lwidthgrass=`echo ${oi} | awk '{print $48}'` - lwidthbltree=`echo ${oi} | awk '{print $49}'` - lwidthnltree=`echo ${oi} | awk '{print $50}'` - q10c3=`echo ${oi} | awk '{print $51}'` - q10c4=`echo ${oi} | awk '{print $52}'` - h2olimit=`echo ${oi} | awk '{print $53}'` - imortscheme=`echo ${oi} | awk '{print $54}'` - ddmortconst=`echo ${oi} | awk '{print $55}'` - isfclyrm=`echo ${oi} | awk '{print $56}'` - icanturb=`echo ${oi} | awk '{print $57}'` - ubmin=`echo ${oi} | awk '{print $58}'` - ugbmin=`echo ${oi} | awk '{print $59}'` - ustmin=`echo ${oi} | awk '{print $60}'` - gamm=`echo ${oi} | awk '{print $61}'` - gamh=`echo ${oi} | awk '{print $62}'` - tprandtl=`echo ${oi} | awk '{print $63}'` - ribmax=`echo ${oi} | awk '{print $64}'` - atmco2=`echo ${oi} | awk '{print $65}'` - thcrit=`echo ${oi} | awk '{print $66}'` - smfire=`echo ${oi} | awk '{print $67}'` - ifire=`echo ${oi} | awk '{print $68}'` - fireparm=`echo ${oi} | awk '{print $69}'` - ipercol=`echo ${oi} | awk '{print $70}'` - runoff=`echo ${oi} | awk '{print $71}'` - imetrad=`echo ${oi} | awk '{print $72}'` - ibranch=`echo ${oi} | awk '{print $73}'` - icanrad=`echo ${oi} | awk '{print $74}'` - crown=`echo ${oi} | awk '{print $75}'` - ltransvis=`echo ${oi} | awk '{print $76}'` - lreflectvis=`echo ${oi} | awk '{print $77}'` - ltransnir=`echo ${oi} | awk '{print $78}'` - lreflectnir=`echo ${oi} | awk '{print $79}'` - orienttree=`echo ${oi} | awk '{print $80}'` - orientgrass=`echo ${oi} | awk '{print $81}'` - clumptree=`echo ${oi} | awk '{print $82}'` - clumpgrass=`echo ${oi} | awk '{print $83}'` - ivegtdyn=`echo ${oi} | awk '{print $84}'` - igndvap=`echo ${oi} | awk '{print $85}'` - iphen=`echo ${oi} | awk '{print $86}'` - iallom=`echo ${oi} | awk '{print $87}'` - ibigleaf=`echo ${oi} | awk '{print $88}'` - irepro=`echo ${oi} | awk '{print $89}'` - treefall=`echo ${oi} | awk '{print $90}'` + iage=`echo ${oi} | awk '{print $16}'` + polyisoil=`echo ${oi} | awk '{print $17}'` + polyntext=`echo ${oi} | awk '{print $18}'` + polysand=`echo ${oi} | awk '{print $19}'` + polyclay=`echo ${oi} | awk '{print $20}'` + polydepth=`echo ${oi} | awk '{print $21}'` + polysoilbc=`echo ${oi} | awk '{print $22}'` + polysldrain=`echo ${oi} | awk '{print $23}'` + polycol=`echo ${oi} | awk '{print $24}'` + slzres=`echo ${oi} | awk '{print $25}'` + queue=`echo ${oi} | awk '{print $26}'` + metdriver=`echo ${oi} | awk '{print $27}'` + dtlsm=`echo ${oi} | awk '{print $28}'` + vmfactc3=`echo ${oi} | awk '{print $29}'` + vmfactc4=`echo ${oi} | awk '{print $30}'` + mphototrc3=`echo ${oi} | awk '{print $31}'` + mphototec3=`echo ${oi} | awk '{print $32}'` + mphotoc4=`echo ${oi} | awk '{print $33}'` + bphotoblc3=`echo ${oi} | awk '{print $34}'` + bphotonlc3=`echo ${oi} | awk '{print $35}'` + bphotoc4=`echo ${oi} | awk '{print $36}'` + kwgrass=`echo ${oi} | awk '{print $37}'` + kwtree=`echo ${oi} | awk '{print $38}'` + gammac3=`echo ${oi} | awk '{print $39}'` + gammac4=`echo ${oi} | awk '{print $40}'` + d0grass=`echo ${oi} | awk '{print $41}'` + d0tree=`echo ${oi} | awk '{print $42}'` + alphac3=`echo ${oi} | awk '{print $43}'` + alphac4=`echo ${oi} | awk '{print $44}'` + klowco2=`echo ${oi} | awk '{print $45}'` + decomp=`echo ${oi} | awk '{print $46}'` + rrffact=`echo ${oi} | awk '{print $47}'` + growthresp=`echo ${oi} | awk '{print $48}'` + lwidthgrass=`echo ${oi} | awk '{print $49}'` + lwidthbltree=`echo ${oi} | awk '{print $50}'` + lwidthnltree=`echo ${oi} | awk '{print $51}'` + q10c3=`echo ${oi} | awk '{print $52}'` + q10c4=`echo ${oi} | awk '{print $53}'` + h2olimit=`echo ${oi} | awk '{print $54}'` + imortscheme=`echo ${oi} | awk '{print $55}'` + ddmortconst=`echo ${oi} | awk '{print $56}'` + isfclyrm=`echo ${oi} | awk '{print $57}'` + icanturb=`echo ${oi} | awk '{print $58}'` + ubmin=`echo ${oi} | awk '{print $59}'` + ugbmin=`echo ${oi} | awk '{print $60}'` + ustmin=`echo ${oi} | awk '{print $61}'` + gamm=`echo ${oi} | awk '{print $62}'` + gamh=`echo ${oi} | awk '{print $63}'` + tprandtl=`echo ${oi} | awk '{print $64}'` + ribmax=`echo ${oi} | awk '{print $65}'` + atmco2=`echo ${oi} | awk '{print $66}'` + thcrit=`echo ${oi} | awk '{print $67}'` + smfire=`echo ${oi} | awk '{print $68}'` + ifire=`echo ${oi} | awk '{print $69}'` + fireparm=`echo ${oi} | awk '{print $70}'` + ipercol=`echo ${oi} | awk '{print $71}'` + runoff=`echo ${oi} | awk '{print $72}'` + imetrad=`echo ${oi} | awk '{print $73}'` + ibranch=`echo ${oi} | awk '{print $74}'` + icanrad=`echo ${oi} | awk '{print $75}'` + crown=`echo ${oi} | awk '{print $76}'` + ltransvis=`echo ${oi} | awk '{print $77}'` + lreflectvis=`echo ${oi} | awk '{print $78}'` + ltransnir=`echo ${oi} | awk '{print $79}'` + lreflectnir=`echo ${oi} | awk '{print $80}'` + orienttree=`echo ${oi} | awk '{print $81}'` + orientgrass=`echo ${oi} | awk '{print $82}'` + clumptree=`echo ${oi} | awk '{print $83}'` + clumpgrass=`echo ${oi} | awk '{print $84}'` + ivegtdyn=`echo ${oi} | awk '{print $85}'` + igndvap=`echo ${oi} | awk '{print $86}'` + iphen=`echo ${oi} | awk '{print $87}'` + iallom=`echo ${oi} | awk '{print $88}'` + ibigleaf=`echo ${oi} | awk '{print $89}'` + irepro=`echo ${oi} | awk '{print $90}'` + treefall=`echo ${oi} | awk '{print $91}'` #---------------------------------------------------------------------------------------# @@ -2531,81 +2616,82 @@ do initmode=`echo ${oi} | awk '{print $13}'` iscenario=`echo ${oi} | awk '{print $14}'` isizepft=`echo ${oi} | awk '{print $15}'` - polyisoil=`echo ${oi} | awk '{print $16}'` - polyntext=`echo ${oi} | awk '{print $17}'` - polysand=`echo ${oi} | awk '{print $18}'` - polyclay=`echo ${oi} | awk '{print $19}'` - polydepth=`echo ${oi} | awk '{print $20}'` - polysoilbc=`echo ${oi} | awk '{print $21}'` - polysldrain=`echo ${oi} | awk '{print $22}'` - polycol=`echo ${oi} | awk '{print $23}'` - slzres=`echo ${oi} | awk '{print $24}'` - queue=`echo ${oi} | awk '{print $25}'` - metdriver=`echo ${oi} | awk '{print $26}'` - dtlsm=`echo ${oi} | awk '{print $27}'` - vmfactc3=`echo ${oi} | awk '{print $28}'` - vmfactc4=`echo ${oi} | awk '{print $29}'` - mphototrc3=`echo ${oi} | awk '{print $30}'` - mphototec3=`echo ${oi} | awk '{print $31}'` - mphotoc4=`echo ${oi} | awk '{print $32}'` - bphotoblc3=`echo ${oi} | awk '{print $33}'` - bphotonlc3=`echo ${oi} | awk '{print $34}'` - bphotoc4=`echo ${oi} | awk '{print $35}'` - kwgrass=`echo ${oi} | awk '{print $36}'` - kwtree=`echo ${oi} | awk '{print $37}'` - gammac3=`echo ${oi} | awk '{print $38}'` - gammac4=`echo ${oi} | awk '{print $39}'` - d0grass=`echo ${oi} | awk '{print $40}'` - d0tree=`echo ${oi} | awk '{print $41}'` - alphac3=`echo ${oi} | awk '{print $42}'` - alphac4=`echo ${oi} | awk '{print $43}'` - klowco2=`echo ${oi} | awk '{print $44}'` - decomp=`echo ${oi} | awk '{print $45}'` - rrffact=`echo ${oi} | awk '{print $46}'` - growthresp=`echo ${oi} | awk '{print $47}'` - lwidthgrass=`echo ${oi} | awk '{print $48}'` - lwidthbltree=`echo ${oi} | awk '{print $49}'` - lwidthnltree=`echo ${oi} | awk '{print $50}'` - q10c3=`echo ${oi} | awk '{print $51}'` - q10c4=`echo ${oi} | awk '{print $52}'` - h2olimit=`echo ${oi} | awk '{print $53}'` - imortscheme=`echo ${oi} | awk '{print $54}'` - ddmortconst=`echo ${oi} | awk '{print $55}'` - isfclyrm=`echo ${oi} | awk '{print $56}'` - icanturb=`echo ${oi} | awk '{print $57}'` - ubmin=`echo ${oi} | awk '{print $58}'` - ugbmin=`echo ${oi} | awk '{print $59}'` - ustmin=`echo ${oi} | awk '{print $60}'` - gamm=`echo ${oi} | awk '{print $61}'` - gamh=`echo ${oi} | awk '{print $62}'` - tprandtl=`echo ${oi} | awk '{print $63}'` - ribmax=`echo ${oi} | awk '{print $64}'` - atmco2=`echo ${oi} | awk '{print $65}'` - thcrit=`echo ${oi} | awk '{print $66}'` - smfire=`echo ${oi} | awk '{print $67}'` - ifire=`echo ${oi} | awk '{print $68}'` - fireparm=`echo ${oi} | awk '{print $69}'` - ipercol=`echo ${oi} | awk '{print $70}'` - runoff=`echo ${oi} | awk '{print $71}'` - imetrad=`echo ${oi} | awk '{print $72}'` - ibranch=`echo ${oi} | awk '{print $73}'` - icanrad=`echo ${oi} | awk '{print $74}'` - crown=`echo ${oi} | awk '{print $75}'` - ltransvis=`echo ${oi} | awk '{print $76}'` - lreflectvis=`echo ${oi} | awk '{print $77}'` - ltransnir=`echo ${oi} | awk '{print $78}'` - lreflectnir=`echo ${oi} | awk '{print $79}'` - orienttree=`echo ${oi} | awk '{print $80}'` - orientgrass=`echo ${oi} | awk '{print $81}'` - clumptree=`echo ${oi} | awk '{print $82}'` - clumpgrass=`echo ${oi} | awk '{print $83}'` - ivegtdyn=`echo ${oi} | awk '{print $84}'` - igndvap=`echo ${oi} | awk '{print $85}'` - iphen=`echo ${oi} | awk '{print $86}'` - iallom=`echo ${oi} | awk '{print $87}'` - ibigleaf=`echo ${oi} | awk '{print $88}'` - irepro=`echo ${oi} | awk '{print $89}'` - treefall=`echo ${oi} | awk '{print $90}'` + iage=`echo ${oi} | awk '{print $16}'` + polyisoil=`echo ${oi} | awk '{print $17}'` + polyntext=`echo ${oi} | awk '{print $18}'` + polysand=`echo ${oi} | awk '{print $19}'` + polyclay=`echo ${oi} | awk '{print $20}'` + polydepth=`echo ${oi} | awk '{print $21}'` + polysoilbc=`echo ${oi} | awk '{print $22}'` + polysldrain=`echo ${oi} | awk '{print $23}'` + polycol=`echo ${oi} | awk '{print $24}'` + slzres=`echo ${oi} | awk '{print $25}'` + queue=`echo ${oi} | awk '{print $26}'` + metdriver=`echo ${oi} | awk '{print $27}'` + dtlsm=`echo ${oi} | awk '{print $28}'` + vmfactc3=`echo ${oi} | awk '{print $29}'` + vmfactc4=`echo ${oi} | awk '{print $30}'` + mphototrc3=`echo ${oi} | awk '{print $31}'` + mphototec3=`echo ${oi} | awk '{print $32}'` + mphotoc4=`echo ${oi} | awk '{print $33}'` + bphotoblc3=`echo ${oi} | awk '{print $34}'` + bphotonlc3=`echo ${oi} | awk '{print $35}'` + bphotoc4=`echo ${oi} | awk '{print $36}'` + kwgrass=`echo ${oi} | awk '{print $37}'` + kwtree=`echo ${oi} | awk '{print $38}'` + gammac3=`echo ${oi} | awk '{print $39}'` + gammac4=`echo ${oi} | awk '{print $40}'` + d0grass=`echo ${oi} | awk '{print $41}'` + d0tree=`echo ${oi} | awk '{print $42}'` + alphac3=`echo ${oi} | awk '{print $43}'` + alphac4=`echo ${oi} | awk '{print $44}'` + klowco2=`echo ${oi} | awk '{print $45}'` + decomp=`echo ${oi} | awk '{print $46}'` + rrffact=`echo ${oi} | awk '{print $47}'` + growthresp=`echo ${oi} | awk '{print $48}'` + lwidthgrass=`echo ${oi} | awk '{print $49}'` + lwidthbltree=`echo ${oi} | awk '{print $50}'` + lwidthnltree=`echo ${oi} | awk '{print $51}'` + q10c3=`echo ${oi} | awk '{print $52}'` + q10c4=`echo ${oi} | awk '{print $53}'` + h2olimit=`echo ${oi} | awk '{print $54}'` + imortscheme=`echo ${oi} | awk '{print $55}'` + ddmortconst=`echo ${oi} | awk '{print $56}'` + isfclyrm=`echo ${oi} | awk '{print $57}'` + icanturb=`echo ${oi} | awk '{print $58}'` + ubmin=`echo ${oi} | awk '{print $59}'` + ugbmin=`echo ${oi} | awk '{print $60}'` + ustmin=`echo ${oi} | awk '{print $61}'` + gamm=`echo ${oi} | awk '{print $62}'` + gamh=`echo ${oi} | awk '{print $63}'` + tprandtl=`echo ${oi} | awk '{print $64}'` + ribmax=`echo ${oi} | awk '{print $65}'` + atmco2=`echo ${oi} | awk '{print $66}'` + thcrit=`echo ${oi} | awk '{print $67}'` + smfire=`echo ${oi} | awk '{print $68}'` + ifire=`echo ${oi} | awk '{print $69}'` + fireparm=`echo ${oi} | awk '{print $70}'` + ipercol=`echo ${oi} | awk '{print $71}'` + runoff=`echo ${oi} | awk '{print $72}'` + imetrad=`echo ${oi} | awk '{print $73}'` + ibranch=`echo ${oi} | awk '{print $74}'` + icanrad=`echo ${oi} | awk '{print $75}'` + crown=`echo ${oi} | awk '{print $76}'` + ltransvis=`echo ${oi} | awk '{print $77}'` + lreflectvis=`echo ${oi} | awk '{print $78}'` + ltransnir=`echo ${oi} | awk '{print $79}'` + lreflectnir=`echo ${oi} | awk '{print $80}'` + orienttree=`echo ${oi} | awk '{print $81}'` + orientgrass=`echo ${oi} | awk '{print $82}'` + clumptree=`echo ${oi} | awk '{print $83}'` + clumpgrass=`echo ${oi} | awk '{print $84}'` + ivegtdyn=`echo ${oi} | awk '{print $85}'` + igndvap=`echo ${oi} | awk '{print $86}'` + iphen=`echo ${oi} | awk '{print $87}'` + iallom=`echo ${oi} | awk '{print $88}'` + ibigleaf=`echo ${oi} | awk '{print $89}'` + irepro=`echo ${oi} | awk '{print $90}'` + treefall=`echo ${oi} | awk '{print $91}'` #---------------------------------------------------------------------------------------# @@ -2689,81 +2775,82 @@ do initmode=`echo ${oi} | awk '{print $13}'` iscenario=`echo ${oi} | awk '{print $14}'` isizepft=`echo ${oi} | awk '{print $15}'` - polyisoil=`echo ${oi} | awk '{print $16}'` - polyntext=`echo ${oi} | awk '{print $17}'` - polysand=`echo ${oi} | awk '{print $18}'` - polyclay=`echo ${oi} | awk '{print $19}'` - polydepth=`echo ${oi} | awk '{print $20}'` - polysoilbc=`echo ${oi} | awk '{print $21}'` - polysldrain=`echo ${oi} | awk '{print $22}'` - polycol=`echo ${oi} | awk '{print $23}'` - slzres=`echo ${oi} | awk '{print $24}'` - queue=`echo ${oi} | awk '{print $25}'` - metdriver=`echo ${oi} | awk '{print $26}'` - dtlsm=`echo ${oi} | awk '{print $27}'` - vmfactc3=`echo ${oi} | awk '{print $28}'` - vmfactc4=`echo ${oi} | awk '{print $29}'` - mphototrc3=`echo ${oi} | awk '{print $30}'` - mphototec3=`echo ${oi} | awk '{print $31}'` - mphotoc4=`echo ${oi} | awk '{print $32}'` - bphotoblc3=`echo ${oi} | awk '{print $33}'` - bphotonlc3=`echo ${oi} | awk '{print $34}'` - bphotoc4=`echo ${oi} | awk '{print $35}'` - kwgrass=`echo ${oi} | awk '{print $36}'` - kwtree=`echo ${oi} | awk '{print $37}'` - gammac3=`echo ${oi} | awk '{print $38}'` - gammac4=`echo ${oi} | awk '{print $39}'` - d0grass=`echo ${oi} | awk '{print $40}'` - d0tree=`echo ${oi} | awk '{print $41}'` - alphac3=`echo ${oi} | awk '{print $42}'` - alphac4=`echo ${oi} | awk '{print $43}'` - klowco2=`echo ${oi} | awk '{print $44}'` - decomp=`echo ${oi} | awk '{print $45}'` - rrffact=`echo ${oi} | awk '{print $46}'` - growthresp=`echo ${oi} | awk '{print $47}'` - lwidthgrass=`echo ${oi} | awk '{print $48}'` - lwidthbltree=`echo ${oi} | awk '{print $49}'` - lwidthnltree=`echo ${oi} | awk '{print $50}'` - q10c3=`echo ${oi} | awk '{print $51}'` - q10c4=`echo ${oi} | awk '{print $52}'` - h2olimit=`echo ${oi} | awk '{print $53}'` - imortscheme=`echo ${oi} | awk '{print $54}'` - ddmortconst=`echo ${oi} | awk '{print $55}'` - isfclyrm=`echo ${oi} | awk '{print $56}'` - icanturb=`echo ${oi} | awk '{print $57}'` - ubmin=`echo ${oi} | awk '{print $58}'` - ugbmin=`echo ${oi} | awk '{print $59}'` - ustmin=`echo ${oi} | awk '{print $60}'` - gamm=`echo ${oi} | awk '{print $61}'` - gamh=`echo ${oi} | awk '{print $62}'` - tprandtl=`echo ${oi} | awk '{print $63}'` - ribmax=`echo ${oi} | awk '{print $64}'` - atmco2=`echo ${oi} | awk '{print $65}'` - thcrit=`echo ${oi} | awk '{print $66}'` - smfire=`echo ${oi} | awk '{print $67}'` - ifire=`echo ${oi} | awk '{print $68}'` - fireparm=`echo ${oi} | awk '{print $69}'` - ipercol=`echo ${oi} | awk '{print $70}'` - runoff=`echo ${oi} | awk '{print $71}'` - imetrad=`echo ${oi} | awk '{print $72}'` - ibranch=`echo ${oi} | awk '{print $73}'` - icanrad=`echo ${oi} | awk '{print $74}'` - crown=`echo ${oi} | awk '{print $75}'` - ltransvis=`echo ${oi} | awk '{print $76}'` - lreflectvis=`echo ${oi} | awk '{print $77}'` - ltransnir=`echo ${oi} | awk '{print $78}'` - lreflectnir=`echo ${oi} | awk '{print $79}'` - orienttree=`echo ${oi} | awk '{print $80}'` - orientgrass=`echo ${oi} | awk '{print $81}'` - clumptree=`echo ${oi} | awk '{print $82}'` - clumpgrass=`echo ${oi} | awk '{print $83}'` - ivegtdyn=`echo ${oi} | awk '{print $84}'` - igndvap=`echo ${oi} | awk '{print $85}'` - iphen=`echo ${oi} | awk '{print $86}'` - iallom=`echo ${oi} | awk '{print $87}'` - ibigleaf=`echo ${oi} | awk '{print $88}'` - irepro=`echo ${oi} | awk '{print $89}'` - treefall=`echo ${oi} | awk '{print $90}'` + iage=`echo ${oi} | awk '{print $16}'` + polyisoil=`echo ${oi} | awk '{print $17}'` + polyntext=`echo ${oi} | awk '{print $18}'` + polysand=`echo ${oi} | awk '{print $19}'` + polyclay=`echo ${oi} | awk '{print $20}'` + polydepth=`echo ${oi} | awk '{print $21}'` + polysoilbc=`echo ${oi} | awk '{print $22}'` + polysldrain=`echo ${oi} | awk '{print $23}'` + polycol=`echo ${oi} | awk '{print $24}'` + slzres=`echo ${oi} | awk '{print $25}'` + queue=`echo ${oi} | awk '{print $26}'` + metdriver=`echo ${oi} | awk '{print $27}'` + dtlsm=`echo ${oi} | awk '{print $28}'` + vmfactc3=`echo ${oi} | awk '{print $29}'` + vmfactc4=`echo ${oi} | awk '{print $30}'` + mphototrc3=`echo ${oi} | awk '{print $31}'` + mphototec3=`echo ${oi} | awk '{print $32}'` + mphotoc4=`echo ${oi} | awk '{print $33}'` + bphotoblc3=`echo ${oi} | awk '{print $34}'` + bphotonlc3=`echo ${oi} | awk '{print $35}'` + bphotoc4=`echo ${oi} | awk '{print $36}'` + kwgrass=`echo ${oi} | awk '{print $37}'` + kwtree=`echo ${oi} | awk '{print $38}'` + gammac3=`echo ${oi} | awk '{print $39}'` + gammac4=`echo ${oi} | awk '{print $40}'` + d0grass=`echo ${oi} | awk '{print $41}'` + d0tree=`echo ${oi} | awk '{print $42}'` + alphac3=`echo ${oi} | awk '{print $43}'` + alphac4=`echo ${oi} | awk '{print $44}'` + klowco2=`echo ${oi} | awk '{print $45}'` + decomp=`echo ${oi} | awk '{print $46}'` + rrffact=`echo ${oi} | awk '{print $47}'` + growthresp=`echo ${oi} | awk '{print $48}'` + lwidthgrass=`echo ${oi} | awk '{print $49}'` + lwidthbltree=`echo ${oi} | awk '{print $50}'` + lwidthnltree=`echo ${oi} | awk '{print $51}'` + q10c3=`echo ${oi} | awk '{print $52}'` + q10c4=`echo ${oi} | awk '{print $53}'` + h2olimit=`echo ${oi} | awk '{print $54}'` + imortscheme=`echo ${oi} | awk '{print $55}'` + ddmortconst=`echo ${oi} | awk '{print $56}'` + isfclyrm=`echo ${oi} | awk '{print $57}'` + icanturb=`echo ${oi} | awk '{print $58}'` + ubmin=`echo ${oi} | awk '{print $59}'` + ugbmin=`echo ${oi} | awk '{print $60}'` + ustmin=`echo ${oi} | awk '{print $61}'` + gamm=`echo ${oi} | awk '{print $62}'` + gamh=`echo ${oi} | awk '{print $63}'` + tprandtl=`echo ${oi} | awk '{print $64}'` + ribmax=`echo ${oi} | awk '{print $65}'` + atmco2=`echo ${oi} | awk '{print $66}'` + thcrit=`echo ${oi} | awk '{print $67}'` + smfire=`echo ${oi} | awk '{print $68}'` + ifire=`echo ${oi} | awk '{print $69}'` + fireparm=`echo ${oi} | awk '{print $70}'` + ipercol=`echo ${oi} | awk '{print $71}'` + runoff=`echo ${oi} | awk '{print $72}'` + imetrad=`echo ${oi} | awk '{print $73}'` + ibranch=`echo ${oi} | awk '{print $74}'` + icanrad=`echo ${oi} | awk '{print $75}'` + crown=`echo ${oi} | awk '{print $76}'` + ltransvis=`echo ${oi} | awk '{print $77}'` + lreflectvis=`echo ${oi} | awk '{print $78}'` + ltransnir=`echo ${oi} | awk '{print $79}'` + lreflectnir=`echo ${oi} | awk '{print $80}'` + orienttree=`echo ${oi} | awk '{print $81}'` + orientgrass=`echo ${oi} | awk '{print $82}'` + clumptree=`echo ${oi} | awk '{print $83}'` + clumpgrass=`echo ${oi} | awk '{print $84}'` + ivegtdyn=`echo ${oi} | awk '{print $85}'` + igndvap=`echo ${oi} | awk '{print $86}'` + iphen=`echo ${oi} | awk '{print $87}'` + iallom=`echo ${oi} | awk '{print $88}'` + ibigleaf=`echo ${oi} | awk '{print $89}'` + irepro=`echo ${oi} | awk '{print $90}'` + treefall=`echo ${oi} | awk '{print $91}'` #---------------------------------------------------------------------------# diff --git a/ED/Template/spawn_poly.sh b/ED/Template/spawn_poly.sh index 5c5149344..ca55adc7d 100755 --- a/ED/Template/spawn_poly.sh +++ b/ED/Template/spawn_poly.sh @@ -25,12 +25,12 @@ shefhead='SHEF_NCEP_DRIVER_DS314' #----- Path with default pseudo past drivers. ---------------------------------------------# scenariopathdef='/n/moorcroft_data/mlongo/data/ed2_data/realisation_scen_driver' #----- Should the met driver be copied to local scratch disks? ----------------------------# -copy2scratch='n' +copy2scratch='y' #------------------------------------------------------------------------------------------# # In case we should copy, this is the source where the data is organised to go. This # # will override sitemetdef and scenariopath. # #------------------------------------------------------------------------------------------# -packdatasrc='/n/moorcroft_data/mlongo/data/tower_scratch' +packdatasrc='/n/nss2b/moorcroft_lab/mlongo/data/2scratch' #------------------------------------------------------------------------------------------# #------------------------------------------------------------------------------------------# @@ -47,7 +47,6 @@ dateh='01' # Day timeh='0000' # Hour #----- Default tolerance. -----------------------------------------------------------------# toldef='0.01' - #------------------------------------------------------------------------------------------# # Name of the unrestricted_parallel scripts: # # callunpa: script that calls callserial.sh for unrestricted_parallel runs. # @@ -81,9 +80,9 @@ execname='ed_2.1-opt' #----- Set the main path for the site, pseudo past and Sheffield met drivers. -------------# if [ ${copy2scratch} == 'y' -o ${copy2scratch} == 'Y' ] then - sitemet='/scratch/mlongo/met_driver/site_met_driver' - scenariopath='/scratch/mlongo/met_driver/realisation_scen_driver' - shefpath='/scratch/mlongo/met_driver/sheffield' + sitemet='/scratch/mlongo/site_met_driver' + scenariopath='/scratch/mlongo/wmo+eft_driver' + shefpath='/scratch/mlongo/sheff_met_driver' else sitemet=${sitemetdef} scenariopath=${scenariopathdef} @@ -242,81 +241,82 @@ do initmode=`echo ${oi} | awk '{print $13}'` iscenario=`echo ${oi} | awk '{print $14}'` isizepft=`echo ${oi} | awk '{print $15}'` - polyisoil=`echo ${oi} | awk '{print $16}'` - polyntext=`echo ${oi} | awk '{print $17}'` - polysand=`echo ${oi} | awk '{print $18}'` - polyclay=`echo ${oi} | awk '{print $19}'` - polydepth=`echo ${oi} | awk '{print $20}'` - polysoilbc=`echo ${oi} | awk '{print $21}'` - polysldrain=`echo ${oi} | awk '{print $22}'` - polycol=`echo ${oi} | awk '{print $23}'` - slzres=`echo ${oi} | awk '{print $24}'` - queue=`echo ${oi} | awk '{print $25}'` - metdriver=`echo ${oi} | awk '{print $26}'` - dtlsm=`echo ${oi} | awk '{print $27}'` - vmfactc3=`echo ${oi} | awk '{print $28}'` - vmfactc4=`echo ${oi} | awk '{print $29}'` - mphototrc3=`echo ${oi} | awk '{print $30}'` - mphototec3=`echo ${oi} | awk '{print $31}'` - mphotoc4=`echo ${oi} | awk '{print $32}'` - bphotoblc3=`echo ${oi} | awk '{print $33}'` - bphotonlc3=`echo ${oi} | awk '{print $34}'` - bphotoc4=`echo ${oi} | awk '{print $35}'` - kwgrass=`echo ${oi} | awk '{print $36}'` - kwtree=`echo ${oi} | awk '{print $37}'` - gammac3=`echo ${oi} | awk '{print $38}'` - gammac4=`echo ${oi} | awk '{print $39}'` - d0grass=`echo ${oi} | awk '{print $40}'` - d0tree=`echo ${oi} | awk '{print $41}'` - alphac3=`echo ${oi} | awk '{print $42}'` - alphac4=`echo ${oi} | awk '{print $43}'` - klowco2=`echo ${oi} | awk '{print $44}'` - decomp=`echo ${oi} | awk '{print $45}'` - rrffact=`echo ${oi} | awk '{print $46}'` - growthresp=`echo ${oi} | awk '{print $47}'` - lwidthgrass=`echo ${oi} | awk '{print $48}'` - lwidthbltree=`echo ${oi} | awk '{print $49}'` - lwidthnltree=`echo ${oi} | awk '{print $50}'` - q10c3=`echo ${oi} | awk '{print $51}'` - q10c4=`echo ${oi} | awk '{print $52}'` - h2olimit=`echo ${oi} | awk '{print $53}'` - imortscheme=`echo ${oi} | awk '{print $54}'` - ddmortconst=`echo ${oi} | awk '{print $55}'` - isfclyrm=`echo ${oi} | awk '{print $56}'` - icanturb=`echo ${oi} | awk '{print $57}'` - ubmin=`echo ${oi} | awk '{print $58}'` - ugbmin=`echo ${oi} | awk '{print $59}'` - ustmin=`echo ${oi} | awk '{print $60}'` - gamm=`echo ${oi} | awk '{print $61}'` - gamh=`echo ${oi} | awk '{print $62}'` - tprandtl=`echo ${oi} | awk '{print $63}'` - ribmax=`echo ${oi} | awk '{print $64}'` - atmco2=`echo ${oi} | awk '{print $65}'` - thcrit=`echo ${oi} | awk '{print $66}'` - smfire=`echo ${oi} | awk '{print $67}'` - ifire=`echo ${oi} | awk '{print $68}'` - fireparm=`echo ${oi} | awk '{print $69}'` - ipercol=`echo ${oi} | awk '{print $70}'` - runoff=`echo ${oi} | awk '{print $71}'` - imetrad=`echo ${oi} | awk '{print $72}'` - ibranch=`echo ${oi} | awk '{print $73}'` - icanrad=`echo ${oi} | awk '{print $74}'` - crown=`echo ${oi} | awk '{print $75}'` - ltransvis=`echo ${oi} | awk '{print $76}'` - lreflectvis=`echo ${oi} | awk '{print $77}'` - ltransnir=`echo ${oi} | awk '{print $78}'` - lreflectnir=`echo ${oi} | awk '{print $79}'` - orienttree=`echo ${oi} | awk '{print $80}'` - orientgrass=`echo ${oi} | awk '{print $81}'` - clumptree=`echo ${oi} | awk '{print $82}'` - clumpgrass=`echo ${oi} | awk '{print $83}'` - ivegtdyn=`echo ${oi} | awk '{print $84}'` - igndvap=`echo ${oi} | awk '{print $85}'` - iphen=`echo ${oi} | awk '{print $86}'` - iallom=`echo ${oi} | awk '{print $87}'` - ibigleaf=`echo ${oi} | awk '{print $88}'` - irepro=`echo ${oi} | awk '{print $89}'` - treefall=`echo ${oi} | awk '{print $90}'` + iage=`echo ${oi} | awk '{print $16}'` + polyisoil=`echo ${oi} | awk '{print $17}'` + polyntext=`echo ${oi} | awk '{print $18}'` + polysand=`echo ${oi} | awk '{print $19}'` + polyclay=`echo ${oi} | awk '{print $20}'` + polydepth=`echo ${oi} | awk '{print $21}'` + polysoilbc=`echo ${oi} | awk '{print $22}'` + polysldrain=`echo ${oi} | awk '{print $23}'` + polycol=`echo ${oi} | awk '{print $24}'` + slzres=`echo ${oi} | awk '{print $25}'` + queue=`echo ${oi} | awk '{print $26}'` + metdriver=`echo ${oi} | awk '{print $27}'` + dtlsm=`echo ${oi} | awk '{print $28}'` + vmfactc3=`echo ${oi} | awk '{print $29}'` + vmfactc4=`echo ${oi} | awk '{print $30}'` + mphototrc3=`echo ${oi} | awk '{print $31}'` + mphototec3=`echo ${oi} | awk '{print $32}'` + mphotoc4=`echo ${oi} | awk '{print $33}'` + bphotoblc3=`echo ${oi} | awk '{print $34}'` + bphotonlc3=`echo ${oi} | awk '{print $35}'` + bphotoc4=`echo ${oi} | awk '{print $36}'` + kwgrass=`echo ${oi} | awk '{print $37}'` + kwtree=`echo ${oi} | awk '{print $38}'` + gammac3=`echo ${oi} | awk '{print $39}'` + gammac4=`echo ${oi} | awk '{print $40}'` + d0grass=`echo ${oi} | awk '{print $41}'` + d0tree=`echo ${oi} | awk '{print $42}'` + alphac3=`echo ${oi} | awk '{print $43}'` + alphac4=`echo ${oi} | awk '{print $44}'` + klowco2=`echo ${oi} | awk '{print $45}'` + decomp=`echo ${oi} | awk '{print $46}'` + rrffact=`echo ${oi} | awk '{print $47}'` + growthresp=`echo ${oi} | awk '{print $48}'` + lwidthgrass=`echo ${oi} | awk '{print $49}'` + lwidthbltree=`echo ${oi} | awk '{print $50}'` + lwidthnltree=`echo ${oi} | awk '{print $51}'` + q10c3=`echo ${oi} | awk '{print $52}'` + q10c4=`echo ${oi} | awk '{print $53}'` + h2olimit=`echo ${oi} | awk '{print $54}'` + imortscheme=`echo ${oi} | awk '{print $55}'` + ddmortconst=`echo ${oi} | awk '{print $56}'` + isfclyrm=`echo ${oi} | awk '{print $57}'` + icanturb=`echo ${oi} | awk '{print $58}'` + ubmin=`echo ${oi} | awk '{print $59}'` + ugbmin=`echo ${oi} | awk '{print $60}'` + ustmin=`echo ${oi} | awk '{print $61}'` + gamm=`echo ${oi} | awk '{print $62}'` + gamh=`echo ${oi} | awk '{print $63}'` + tprandtl=`echo ${oi} | awk '{print $64}'` + ribmax=`echo ${oi} | awk '{print $65}'` + atmco2=`echo ${oi} | awk '{print $66}'` + thcrit=`echo ${oi} | awk '{print $67}'` + smfire=`echo ${oi} | awk '{print $68}'` + ifire=`echo ${oi} | awk '{print $69}'` + fireparm=`echo ${oi} | awk '{print $70}'` + ipercol=`echo ${oi} | awk '{print $71}'` + runoff=`echo ${oi} | awk '{print $72}'` + imetrad=`echo ${oi} | awk '{print $73}'` + ibranch=`echo ${oi} | awk '{print $74}'` + icanrad=`echo ${oi} | awk '{print $75}'` + crown=`echo ${oi} | awk '{print $76}'` + ltransvis=`echo ${oi} | awk '{print $77}'` + lreflectvis=`echo ${oi} | awk '{print $78}'` + ltransnir=`echo ${oi} | awk '{print $79}'` + lreflectnir=`echo ${oi} | awk '{print $80}'` + orienttree=`echo ${oi} | awk '{print $81}'` + orientgrass=`echo ${oi} | awk '{print $82}'` + clumptree=`echo ${oi} | awk '{print $83}'` + clumpgrass=`echo ${oi} | awk '{print $84}'` + ivegtdyn=`echo ${oi} | awk '{print $85}'` + igndvap=`echo ${oi} | awk '{print $86}'` + iphen=`echo ${oi} | awk '{print $87}'` + iallom=`echo ${oi} | awk '{print $88}'` + ibigleaf=`echo ${oi} | awk '{print $89}'` + irepro=`echo ${oi} | awk '{print $90}'` + treefall=`echo ${oi} | awk '{print $91}'` #---------------------------------------------------------------------------------------# @@ -436,6 +436,10 @@ do date=`cat ${here}/${polyname}/statusrun.txt | awk '{print $4}'` time=`cat ${here}/${polyname}/statusrun.txt | awk '{print $5}'` runt=`cat ${here}/${polyname}/statusrun.txt | awk '{print $6}'` + if [ ${runt} != 'INITIAL' ] + then + runt='HISTORY' + fi #---------------------------------------------------------------------------------------# @@ -446,7 +450,7 @@ do # Determine which PFTs to use based on the "iata" code and isizepft. # #---------------------------------------------------------------------------------------# case ${isizepft} in - 0|1) + 0|1|5) case ${polyiata} in tzi|zmh|nqn) pfts='6,7,9,10,11,16,17' @@ -538,6 +542,7 @@ do #---------------------------------------------------------------------------------------# # Choose the scenario to use. Iscenario follows the following convention: # # "default" -- No scenario. Use the tower/Sheffield data. # + # "inmet" -- No scenario. Use the INMET-based data. # # "rRRR_tTTT -- Use scenarios, with rRRRR controlling the rainfall, and tTTTT # # controlling temperature. # # # @@ -669,84 +674,168 @@ do - #------------------------------------------------------------------------------------# - # Determine which meteorological data set to use. Default is the Sheffield/NCEP # - # dataset, otherwise the site-level tower data is used. # + # Check whether this is a true scenario or just the tower. # #------------------------------------------------------------------------------------# - case ${metdriver} in - Bananal) - metdriverdb="${fullscen}/Bananal/Bananal_HEADER" - metcyc1=1972 - metcycf=2011 - imetavg=1 - ;; - Caxiuana) - metdriverdb="${fullscen}/Caxiuana/Caxiuana_HEADER" - metcyc1=1972 - metcycf=2011 - imetavg=1 - ;; - Fazenda_Nossa_Senhora) - metdriverdb="${fullscen}/Fazenda_Nossa_Senhora/Fazenda_Nossa_Senhora_HEADER" - metcyc1=1977 - metcycf=2002 - imetavg=1 - ;; - Manaus_Km34) - metdriverdb="${fullscen}/Manaus_Km34/Manaus_Km34_HEADER" - metcyc1=1972 - metcycf=2011 - imetavg=1 - ;; - Paracou) - metdriverdb="${fullscen}/Paracou/Paracou_HEADER" - metcyc1=1972 - metcycf=2011 - imetavg=1 - ;; - Pe-de-Gigante) - metdriverdb="${fullscen}/Pe-de-Gigante/Pe-de-Gigante_HEADER" - metcyc1=1972 - metcycf=2011 - imetavg=1 - ;; - Petrolina) - metdriverdb="${fullscen}/Petrolina/Petrolina_HEADER" - metcyc1=1972 - metcycf=2011 - imetavg=1 - ;; - Rebio_Jaru) - metdriverdb="${fullscen}/Rebio_Jaru/Rebio_Jaru_HEADER" - metcyc1=1977 - metcycf=2002 - imetavg=1 - ;; - Santarem_Km67) - metdriverdb="${fullscen}/Santarem_Km67/Santarem_Km67_HEADER" - metcyc1=1972 - metcycf=2011 - imetavg=1 - ;; - Santarem_Km77) - metdriverdb="${fullscen}/Santarem_Km77/Santarem_Km77_HEADER" - metcyc1=1972 - metcycf=2011 - imetavg=1 - ;; - Santarem_Km83) - metdriverdb="${fullscen}/Santarem_Km83/Santarem_Km83_HEADER" - metcyc1=1972 - metcycf=2011 - imetavg=1 - ;; - *) - echo 'Met driver: '${metdriver} - echo 'Sorry, this met driver is not valid for scenario runs' - exit 85 - ;; - esac + if [ ${iscenario} == "eft" ] + then + #---------------------------------------------------------------------------------# + # EFT. This is actually the same thing as "default", for convenience placed # + # as a scenario. # + #---------------------------------------------------------------------------------# + case ${metdriver} in + Bananal) + metdriverdb="${fullscen}/Bananal/Bananal_HEADER" + metcyc1=2004 + metcycf=2006 + imetavg=1 + ;; + Caxiuana) + metdriverdb="${fullscen}/Caxiuana/Caxiuana_HEADER" + metcyc1=1999 + metcycf=2003 + imetavg=1 + ;; + Fazenda_Nossa_Senhora) + metdriverdb="${fullscen}/Fazenda_Nossa_Senhora/Fazenda_Nossa_Senhora_HEADER" + metcyc1=1999 + metcycf=2002 + imetavg=1 + ;; + Manaus_Km34) + metdriverdb="${fullscen}/Manaus_Km34/Manaus_Km34_HEADER" + metcyc1=1999 + metcycf=2005 + imetavg=1 + ;; + Paracou) + metdriverdb="${fullscen}/Paracou/Paracou_HEADER" + metcyc1=2004 + metcycf=2009 + imetavg=1 + ;; + Pe-de-Gigante) + metdriverdb="${fullscen}/Pe-de-Gigante/Pe-de-Gigante_HEADER" + metcyc1=2001 + metcycf=2003 + imetavg=1 + ;; + Petrolina) + metdriverdb="${fullscen}/Petrolina/Petrolina_HEADER" + metcyc1=2004 + metcycf=2011 + imetavg=1 + ;; + Rebio_Jaru) + metdriverdb="${fullscen}/Rebio_Jaru/Rebio_Jaru_HEADER" + metcyc1=1999 + metcycf=2002 + imetavg=1 + ;; + Santarem_Km67) + metdriverdb="${fullscen}/Santarem_Km67/Santarem_Km67_HEADER" + metcyc1=2001 + metcycf=2010 + imetavg=1 + ;; + Santarem_Km77) + metdriverdb="${fullscen}/Santarem_Km77/Santarem_Km77_HEADER" + metcyc1=2001 + metcycf=2005 + imetavg=1 + ;; + Santarem_Km83) + metdriverdb="${fullscen}/Santarem_Km83/Santarem_Km83_HEADER" + metcyc1=2000 + metcycf=2003 + imetavg=1 + ;; + *) + echo 'Met driver: '${metdriver} + echo 'Sorry, this met driver is not valid for scenario runs' + exit 85 + ;; + esac + #---------------------------------------------------------------------------------# + else + #---------------------------------------------------------------------------------# + # INMET data, or any other scenario based on INMET. Years are fixed. # + #---------------------------------------------------------------------------------# + case ${metdriver} in + Bananal) + metdriverdb="${fullscen}/Bananal/Bananal_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Caxiuana) + metdriverdb="${fullscen}/Caxiuana/Caxiuana_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Fazenda_Nossa_Senhora) + metdriverdb="${fullscen}/Fazenda_Nossa_Senhora/Fazenda_Nossa_Senhora_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Manaus_Km34) + metdriverdb="${fullscen}/Manaus_Km34/Manaus_Km34_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Paracou) + metdriverdb="${fullscen}/Paracou/Paracou_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Pe-de-Gigante) + metdriverdb="${fullscen}/Pe-de-Gigante/Pe-de-Gigante_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Petrolina) + metdriverdb="${fullscen}/Petrolina/Petrolina_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Rebio_Jaru) + metdriverdb="${fullscen}/Rebio_Jaru/Rebio_Jaru_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Santarem_Km67) + metdriverdb="${fullscen}/Santarem_Km67/Santarem_Km67_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Santarem_Km77) + metdriverdb="${fullscen}/Santarem_Km77/Santarem_Km77_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + Santarem_Km83) + metdriverdb="${fullscen}/Santarem_Km83/Santarem_Km83_HEADER" + metcyc1=1972 + metcycf=2011 + imetavg=1 + ;; + *) + echo 'Met driver: '${metdriver} + echo 'Sorry, this met driver is not valid for scenario runs' + exit 85 + ;; + esac + #---------------------------------------------------------------------------------# + fi #------------------------------------------------------------------------------------# fi #---------------------------------------------------------------------------------------# @@ -1072,168 +1161,66 @@ do elif [ ${runt} == 'INITIAL' ] && [ ${initmode} -eq 6 ] then thissfilin=${fullygrown} - case ${isizepft} in - 0) - #----- Frankeinstein's understorey for those that have one. ----------------------# - case ${polyiata} in - hvd) - thissfilin=${bioinit}'/hvd_default.' - ;; - cax) - thissfilin=${bioinit}'/cax_default.' - ;; - s67) - thissfilin=${bioinit}'/s67_default.' - ;; - s83) - thissfilin=${bioinit}'/s83_default.' - ;; - m34) - thissfilin=${bioinit}'/m34_default.' - ;; - gyf) - thissfilin=${bioinit}'/gyf_default.' - ;; - pdg) - thissfilin=${bioinit}'/pdg_default.' - ;; - rja) - thissfilin=${bioinit}'/rja_default.' - ;; - fns) - thissfilin=${bioinit}'/fns_default.' - ;; - s77) - thissfilin=${bioinit}'/s77_default.' - ;; - pnz) - thissfilin=${bioinit}'/pnz_default.' - ;; - ban) - thissfilin=${bioinit}'/ban_default.' - ;; - *) - echo ' Polygon: '${polyname} - echo ' IATA: '${polyiata} - echo ' ISIZEPFT: '${isizepft} - echo 'This IATA cannot be used by biomass initialisation with this ISIZEPFT!' - exit 59 - ;; - esac + + #------------------------------------------------------------------------------------# + # Check how many PFTs to use. # + #------------------------------------------------------------------------------------# + case ${isizepft} in + 0|5) + pftname="pft05" ;; + 2) + pftname="pft02" + ;; + esac + #------------------------------------------------------------------------------------# + + #------------------------------------------------------------------------------------# + # Check how many patches to use. # + #------------------------------------------------------------------------------------# + case ${iage} in 1) - #----- New Frankeinstein's under-storey for those that have one. -----------------# - case ${polyiata} in - hvd) - thissfilin=${bioinit}'/hvd_nounder.' - ;; - cax) - thissfilin=${bioinit}'/cax_nounder.' - ;; - s67) - thissfilin=${bioinit}'/s67_nounder.' - ;; - s83) - thissfilin=${bioinit}'/s83_nounder.' - ;; - m34) - thissfilin=${bioinit}'/m34_nounder.' - ;; - gyf) - thissfilin=${bioinit}'/gyf_nounder.' - ;; - pdg) - thissfilin=${bioinit}'/pdg_nounder.' - ;; - rja) - thissfilin=${bioinit}'/rja_nounder.' - ;; - fns) - thissfilin=${bioinit}'/fns_nounder.' - ;; - s77) - thissfilin=${bioinit}'/s77_nounder.' - ;; - pnz) - thissfilin=${bioinit}'/pnz_nounder.' - ;; - ban) - thissfilin=${bioinit}'/ban_nounder.' - ;; - *) - echo ' Polygon: '${polyname} - echo ' IATA: '${polyiata} - echo ' ISIZEPFT: '${isizepft} - echo 'This IATA cannot be used by biomass initialisation with this ISIZEPFT!' - exit 59 - ;; - esac + agename="age01" ;; - 2) - #----- Same as default, but with only one grass and one tree. --------------------# - case ${polyiata} in - hvd) - thissfilin=${bioinit}'/hvd_twopft.' - ;; - ban) - thissfilin=${bioinit}'/ban_twopft.' - ;; - cax) - thissfilin=${bioinit}'/cax_twopft.' - ;; - s67) - thissfilin=${bioinit}'/s67_twopft.' - ;; - s83) - thissfilin=${bioinit}'/s83_twopft.' - ;; - m34) - thissfilin=${bioinit}'/m34_twopft.' - ;; - gyf) - thissfilin=${bioinit}'/gyf_twopft.' - ;; - pdg) - thissfilin=${bioinit}'/pdg_twopft.' - ;; - pnz) - thissfilin=${bioinit}'/pnz_twopft.' - ;; - rja) - thissfilin=${bioinit}'/rja_twopft.' - ;; - fns) - thissfilin=${bioinit}'/fns_twopft.' - ;; - s77) - thissfilin=${bioinit}'/s77_twopft.' - ;; - pnz) - thissfilin=${bioinit}'/pnz_twopft.' - ;; - ban) - thissfilin=${bioinit}'/ban_twopft.' - ;; - *) - echo ' Polygon: '${polyname} - echo ' IATA: '${polyiata} - echo ' ISIZEPFT: '${isizepft} - echo 'This IATA cannot be used by biomass initialisation with this ISIZEPFT!' - exit 59 - ;; - esac + *) + agename="age00" + ;; + esac + #------------------------------------------------------------------------------------# + + + + + #------------------------------------------------------------------------------------# + # Check whether the site has the PFT and age structure. # + #------------------------------------------------------------------------------------# + case ${polyiata} in + hvd|s77|fns) + thissfilin="${bioinit}/${polyiata}_default." + ;; + cax|s67|s83|m34|gyf|pdg|rja|pnz|ban) + thissfilin="${bioinit}/${polyiata}_${pftname}+${agename}." ;; *) - #----- Bad settings. -------------------------------------------------------------# - echo ' ISIZEPFT should be 0, 1, or 2 and yours is set to '${isizepft}'...' - exit 66 + echo ' Polygon: '${polyname} + echo ' IATA: '${polyiata} + echo ' IAGE: '${iage} + echo ' ISIZEPFT: '${isizepft} + echo 'This IATA cannot be used by biomass initialisation with this ISIZEPFT!' + exit 59 ;; esac + #------------------------------------------------------------------------------------# else thissfilin=${there}/${polyname}/histo/${polyname} fi #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Replace the flags in ED2IN. # + #---------------------------------------------------------------------------------------# ED2IN=${here}'/'${polyname}'/ED2IN' sed -i s@paththere@${there}@g ${ED2IN} sed -i s@myyeara@${thisyeara}@g ${ED2IN} @@ -1338,6 +1325,7 @@ do sed -i s@mymon1stcensus@${mon1stcensus}@g ${ED2IN} sed -i s@myminrecruitdbh@${minrecruitdbh}@g ${ED2IN} sed -i s@mytreefall@${treefall}@g ${ED2IN} + sed -i s@mymaxpatch@${iage}@g ${ED2IN} #------ Soil variables. ----------------------------------------------------------------# sed -i s@myslz1@"${polyslz1}"@g ${ED2IN} diff --git a/ED/Template/stopalljobs.sh b/ED/Template/stopalljobs.sh index 41dc8c2b9..20fe28756 100755 --- a/ED/Template/stopalljobs.sh +++ b/ED/Template/stopalljobs.sh @@ -69,81 +69,82 @@ do initmode=`echo ${oi} | awk '{print $13}'` iscenario=`echo ${oi} | awk '{print $14}'` isizepft=`echo ${oi} | awk '{print $15}'` - polyisoil=`echo ${oi} | awk '{print $16}'` - polyntext=`echo ${oi} | awk '{print $17}'` - polysand=`echo ${oi} | awk '{print $18}'` - polyclay=`echo ${oi} | awk '{print $19}'` - polydepth=`echo ${oi} | awk '{print $20}'` - polysoilbc=`echo ${oi} | awk '{print $21}'` - polysldrain=`echo ${oi} | awk '{print $22}'` - polycol=`echo ${oi} | awk '{print $23}'` - slzres=`echo ${oi} | awk '{print $24}'` - queue=`echo ${oi} | awk '{print $25}'` - metdriver=`echo ${oi} | awk '{print $26}'` - dtlsm=`echo ${oi} | awk '{print $27}'` - vmfactc3=`echo ${oi} | awk '{print $28}'` - vmfactc4=`echo ${oi} | awk '{print $29}'` - mphototrc3=`echo ${oi} | awk '{print $30}'` - mphototec3=`echo ${oi} | awk '{print $31}'` - mphotoc4=`echo ${oi} | awk '{print $32}'` - bphotoblc3=`echo ${oi} | awk '{print $33}'` - bphotonlc3=`echo ${oi} | awk '{print $34}'` - bphotoc4=`echo ${oi} | awk '{print $35}'` - kwgrass=`echo ${oi} | awk '{print $36}'` - kwtree=`echo ${oi} | awk '{print $37}'` - gammac3=`echo ${oi} | awk '{print $38}'` - gammac4=`echo ${oi} | awk '{print $39}'` - d0grass=`echo ${oi} | awk '{print $40}'` - d0tree=`echo ${oi} | awk '{print $41}'` - alphac3=`echo ${oi} | awk '{print $42}'` - alphac4=`echo ${oi} | awk '{print $43}'` - klowco2=`echo ${oi} | awk '{print $44}'` - decomp=`echo ${oi} | awk '{print $45}'` - rrffact=`echo ${oi} | awk '{print $46}'` - growthresp=`echo ${oi} | awk '{print $47}'` - lwidthgrass=`echo ${oi} | awk '{print $48}'` - lwidthbltree=`echo ${oi} | awk '{print $49}'` - lwidthnltree=`echo ${oi} | awk '{print $50}'` - q10c3=`echo ${oi} | awk '{print $51}'` - q10c4=`echo ${oi} | awk '{print $52}'` - h2olimit=`echo ${oi} | awk '{print $53}'` - imortscheme=`echo ${oi} | awk '{print $54}'` - ddmortconst=`echo ${oi} | awk '{print $55}'` - isfclyrm=`echo ${oi} | awk '{print $56}'` - icanturb=`echo ${oi} | awk '{print $57}'` - ubmin=`echo ${oi} | awk '{print $58}'` - ugbmin=`echo ${oi} | awk '{print $59}'` - ustmin=`echo ${oi} | awk '{print $60}'` - gamm=`echo ${oi} | awk '{print $61}'` - gamh=`echo ${oi} | awk '{print $62}'` - tprandtl=`echo ${oi} | awk '{print $63}'` - ribmax=`echo ${oi} | awk '{print $64}'` - atmco2=`echo ${oi} | awk '{print $65}'` - thcrit=`echo ${oi} | awk '{print $66}'` - smfire=`echo ${oi} | awk '{print $67}'` - ifire=`echo ${oi} | awk '{print $68}'` - fireparm=`echo ${oi} | awk '{print $69}'` - ipercol=`echo ${oi} | awk '{print $70}'` - runoff=`echo ${oi} | awk '{print $71}'` - imetrad=`echo ${oi} | awk '{print $72}'` - ibranch=`echo ${oi} | awk '{print $73}'` - icanrad=`echo ${oi} | awk '{print $74}'` - crown=`echo ${oi} | awk '{print $75}'` - ltransvis=`echo ${oi} | awk '{print $76}'` - lreflectvis=`echo ${oi} | awk '{print $77}'` - ltransnir=`echo ${oi} | awk '{print $78}'` - lreflectnir=`echo ${oi} | awk '{print $79}'` - orienttree=`echo ${oi} | awk '{print $80}'` - orientgrass=`echo ${oi} | awk '{print $81}'` - clumptree=`echo ${oi} | awk '{print $82}'` - clumpgrass=`echo ${oi} | awk '{print $83}'` - ivegtdyn=`echo ${oi} | awk '{print $84}'` - igndvap=`echo ${oi} | awk '{print $85}'` - iphen=`echo ${oi} | awk '{print $86}'` - iallom=`echo ${oi} | awk '{print $87}'` - ibigleaf=`echo ${oi} | awk '{print $88}'` - irepro=`echo ${oi} | awk '{print $89}'` - treefall=`echo ${oi} | awk '{print $90}'` + iage=`echo ${oi} | awk '{print $16}'` + polyisoil=`echo ${oi} | awk '{print $17}'` + polyntext=`echo ${oi} | awk '{print $18}'` + polysand=`echo ${oi} | awk '{print $19}'` + polyclay=`echo ${oi} | awk '{print $20}'` + polydepth=`echo ${oi} | awk '{print $21}'` + polysoilbc=`echo ${oi} | awk '{print $22}'` + polysldrain=`echo ${oi} | awk '{print $23}'` + polycol=`echo ${oi} | awk '{print $24}'` + slzres=`echo ${oi} | awk '{print $25}'` + queue=`echo ${oi} | awk '{print $26}'` + metdriver=`echo ${oi} | awk '{print $27}'` + dtlsm=`echo ${oi} | awk '{print $28}'` + vmfactc3=`echo ${oi} | awk '{print $29}'` + vmfactc4=`echo ${oi} | awk '{print $30}'` + mphototrc3=`echo ${oi} | awk '{print $31}'` + mphototec3=`echo ${oi} | awk '{print $32}'` + mphotoc4=`echo ${oi} | awk '{print $33}'` + bphotoblc3=`echo ${oi} | awk '{print $34}'` + bphotonlc3=`echo ${oi} | awk '{print $35}'` + bphotoc4=`echo ${oi} | awk '{print $36}'` + kwgrass=`echo ${oi} | awk '{print $37}'` + kwtree=`echo ${oi} | awk '{print $38}'` + gammac3=`echo ${oi} | awk '{print $39}'` + gammac4=`echo ${oi} | awk '{print $40}'` + d0grass=`echo ${oi} | awk '{print $41}'` + d0tree=`echo ${oi} | awk '{print $42}'` + alphac3=`echo ${oi} | awk '{print $43}'` + alphac4=`echo ${oi} | awk '{print $44}'` + klowco2=`echo ${oi} | awk '{print $45}'` + decomp=`echo ${oi} | awk '{print $46}'` + rrffact=`echo ${oi} | awk '{print $47}'` + growthresp=`echo ${oi} | awk '{print $48}'` + lwidthgrass=`echo ${oi} | awk '{print $49}'` + lwidthbltree=`echo ${oi} | awk '{print $50}'` + lwidthnltree=`echo ${oi} | awk '{print $51}'` + q10c3=`echo ${oi} | awk '{print $52}'` + q10c4=`echo ${oi} | awk '{print $53}'` + h2olimit=`echo ${oi} | awk '{print $54}'` + imortscheme=`echo ${oi} | awk '{print $55}'` + ddmortconst=`echo ${oi} | awk '{print $56}'` + isfclyrm=`echo ${oi} | awk '{print $57}'` + icanturb=`echo ${oi} | awk '{print $58}'` + ubmin=`echo ${oi} | awk '{print $59}'` + ugbmin=`echo ${oi} | awk '{print $60}'` + ustmin=`echo ${oi} | awk '{print $61}'` + gamm=`echo ${oi} | awk '{print $62}'` + gamh=`echo ${oi} | awk '{print $63}'` + tprandtl=`echo ${oi} | awk '{print $64}'` + ribmax=`echo ${oi} | awk '{print $65}'` + atmco2=`echo ${oi} | awk '{print $66}'` + thcrit=`echo ${oi} | awk '{print $67}'` + smfire=`echo ${oi} | awk '{print $68}'` + ifire=`echo ${oi} | awk '{print $69}'` + fireparm=`echo ${oi} | awk '{print $70}'` + ipercol=`echo ${oi} | awk '{print $71}'` + runoff=`echo ${oi} | awk '{print $72}'` + imetrad=`echo ${oi} | awk '{print $73}'` + ibranch=`echo ${oi} | awk '{print $74}'` + icanrad=`echo ${oi} | awk '{print $75}'` + crown=`echo ${oi} | awk '{print $76}'` + ltransvis=`echo ${oi} | awk '{print $77}'` + lreflectvis=`echo ${oi} | awk '{print $78}'` + ltransnir=`echo ${oi} | awk '{print $79}'` + lreflectnir=`echo ${oi} | awk '{print $80}'` + orienttree=`echo ${oi} | awk '{print $81}'` + orientgrass=`echo ${oi} | awk '{print $82}'` + clumptree=`echo ${oi} | awk '{print $83}'` + clumpgrass=`echo ${oi} | awk '{print $84}'` + ivegtdyn=`echo ${oi} | awk '{print $85}'` + igndvap=`echo ${oi} | awk '{print $86}'` + iphen=`echo ${oi} | awk '{print $87}'` + iallom=`echo ${oi} | awk '{print $88}'` + ibigleaf=`echo ${oi} | awk '{print $89}'` + irepro=`echo ${oi} | awk '{print $90}'` + treefall=`echo ${oi} | awk '{print $91}'` #---------------------------------------------------------------------------------------# bkill -J ${desc}-${polyname} -q ${queue} diff --git a/ED/Template/submitter.sh b/ED/Template/submitter.sh index 91ed6f677..2768ec8af 100755 --- a/ED/Template/submitter.sh +++ b/ED/Template/submitter.sh @@ -42,81 +42,82 @@ do initmode=`echo ${oi} | awk '{print $13}'` iscenario=`echo ${oi} | awk '{print $14}'` isizepft=`echo ${oi} | awk '{print $15}'` - polyisoil=`echo ${oi} | awk '{print $16}'` - polyntext=`echo ${oi} | awk '{print $17}'` - polysand=`echo ${oi} | awk '{print $18}'` - polyclay=`echo ${oi} | awk '{print $19}'` - polydepth=`echo ${oi} | awk '{print $20}'` - polysoilbc=`echo ${oi} | awk '{print $21}'` - polysldrain=`echo ${oi} | awk '{print $22}'` - polycol=`echo ${oi} | awk '{print $23}'` - slzres=`echo ${oi} | awk '{print $24}'` - queue=`echo ${oi} | awk '{print $25}'` - metdriver=`echo ${oi} | awk '{print $26}'` - dtlsm=`echo ${oi} | awk '{print $27}'` - vmfactc3=`echo ${oi} | awk '{print $28}'` - vmfactc4=`echo ${oi} | awk '{print $29}'` - mphototrc3=`echo ${oi} | awk '{print $30}'` - mphototec3=`echo ${oi} | awk '{print $31}'` - mphotoc4=`echo ${oi} | awk '{print $32}'` - bphotoblc3=`echo ${oi} | awk '{print $33}'` - bphotonlc3=`echo ${oi} | awk '{print $34}'` - bphotoc4=`echo ${oi} | awk '{print $35}'` - kwgrass=`echo ${oi} | awk '{print $36}'` - kwtree=`echo ${oi} | awk '{print $37}'` - gammac3=`echo ${oi} | awk '{print $38}'` - gammac4=`echo ${oi} | awk '{print $39}'` - d0grass=`echo ${oi} | awk '{print $40}'` - d0tree=`echo ${oi} | awk '{print $41}'` - alphac3=`echo ${oi} | awk '{print $42}'` - alphac4=`echo ${oi} | awk '{print $43}'` - klowco2=`echo ${oi} | awk '{print $44}'` - decomp=`echo ${oi} | awk '{print $45}'` - rrffact=`echo ${oi} | awk '{print $46}'` - growthresp=`echo ${oi} | awk '{print $47}'` - lwidthgrass=`echo ${oi} | awk '{print $48}'` - lwidthbltree=`echo ${oi} | awk '{print $49}'` - lwidthnltree=`echo ${oi} | awk '{print $50}'` - q10c3=`echo ${oi} | awk '{print $51}'` - q10c4=`echo ${oi} | awk '{print $52}'` - h2olimit=`echo ${oi} | awk '{print $53}'` - imortscheme=`echo ${oi} | awk '{print $54}'` - ddmortconst=`echo ${oi} | awk '{print $55}'` - isfclyrm=`echo ${oi} | awk '{print $56}'` - icanturb=`echo ${oi} | awk '{print $57}'` - ubmin=`echo ${oi} | awk '{print $58}'` - ugbmin=`echo ${oi} | awk '{print $59}'` - ustmin=`echo ${oi} | awk '{print $60}'` - gamm=`echo ${oi} | awk '{print $61}'` - gamh=`echo ${oi} | awk '{print $62}'` - tprandtl=`echo ${oi} | awk '{print $63}'` - ribmax=`echo ${oi} | awk '{print $64}'` - atmco2=`echo ${oi} | awk '{print $65}'` - thcrit=`echo ${oi} | awk '{print $66}'` - smfire=`echo ${oi} | awk '{print $67}'` - ifire=`echo ${oi} | awk '{print $68}'` - fireparm=`echo ${oi} | awk '{print $69}'` - ipercol=`echo ${oi} | awk '{print $70}'` - runoff=`echo ${oi} | awk '{print $71}'` - imetrad=`echo ${oi} | awk '{print $72}'` - ibranch=`echo ${oi} | awk '{print $73}'` - icanrad=`echo ${oi} | awk '{print $74}'` - crown=`echo ${oi} | awk '{print $75}'` - ltransvis=`echo ${oi} | awk '{print $76}'` - lreflectvis=`echo ${oi} | awk '{print $77}'` - ltransnir=`echo ${oi} | awk '{print $78}'` - lreflectnir=`echo ${oi} | awk '{print $79}'` - orienttree=`echo ${oi} | awk '{print $80}'` - orientgrass=`echo ${oi} | awk '{print $81}'` - clumptree=`echo ${oi} | awk '{print $82}'` - clumpgrass=`echo ${oi} | awk '{print $83}'` - ivegtdyn=`echo ${oi} | awk '{print $84}'` - igndvap=`echo ${oi} | awk '{print $85}'` - iphen=`echo ${oi} | awk '{print $86}'` - iallom=`echo ${oi} | awk '{print $87}'` - ibigleaf=`echo ${oi} | awk '{print $88}'` - irepro=`echo ${oi} | awk '{print $89}'` - treefall=`echo ${oi} | awk '{print $90}'` + iage=`echo ${oi} | awk '{print $16}'` + polyisoil=`echo ${oi} | awk '{print $17}'` + polyntext=`echo ${oi} | awk '{print $18}'` + polysand=`echo ${oi} | awk '{print $19}'` + polyclay=`echo ${oi} | awk '{print $20}'` + polydepth=`echo ${oi} | awk '{print $21}'` + polysoilbc=`echo ${oi} | awk '{print $22}'` + polysldrain=`echo ${oi} | awk '{print $23}'` + polycol=`echo ${oi} | awk '{print $24}'` + slzres=`echo ${oi} | awk '{print $25}'` + queue=`echo ${oi} | awk '{print $26}'` + metdriver=`echo ${oi} | awk '{print $27}'` + dtlsm=`echo ${oi} | awk '{print $28}'` + vmfactc3=`echo ${oi} | awk '{print $29}'` + vmfactc4=`echo ${oi} | awk '{print $30}'` + mphototrc3=`echo ${oi} | awk '{print $31}'` + mphototec3=`echo ${oi} | awk '{print $32}'` + mphotoc4=`echo ${oi} | awk '{print $33}'` + bphotoblc3=`echo ${oi} | awk '{print $34}'` + bphotonlc3=`echo ${oi} | awk '{print $35}'` + bphotoc4=`echo ${oi} | awk '{print $36}'` + kwgrass=`echo ${oi} | awk '{print $37}'` + kwtree=`echo ${oi} | awk '{print $38}'` + gammac3=`echo ${oi} | awk '{print $39}'` + gammac4=`echo ${oi} | awk '{print $40}'` + d0grass=`echo ${oi} | awk '{print $41}'` + d0tree=`echo ${oi} | awk '{print $42}'` + alphac3=`echo ${oi} | awk '{print $43}'` + alphac4=`echo ${oi} | awk '{print $44}'` + klowco2=`echo ${oi} | awk '{print $45}'` + decomp=`echo ${oi} | awk '{print $46}'` + rrffact=`echo ${oi} | awk '{print $47}'` + growthresp=`echo ${oi} | awk '{print $48}'` + lwidthgrass=`echo ${oi} | awk '{print $49}'` + lwidthbltree=`echo ${oi} | awk '{print $50}'` + lwidthnltree=`echo ${oi} | awk '{print $51}'` + q10c3=`echo ${oi} | awk '{print $52}'` + q10c4=`echo ${oi} | awk '{print $53}'` + h2olimit=`echo ${oi} | awk '{print $54}'` + imortscheme=`echo ${oi} | awk '{print $55}'` + ddmortconst=`echo ${oi} | awk '{print $56}'` + isfclyrm=`echo ${oi} | awk '{print $57}'` + icanturb=`echo ${oi} | awk '{print $58}'` + ubmin=`echo ${oi} | awk '{print $59}'` + ugbmin=`echo ${oi} | awk '{print $60}'` + ustmin=`echo ${oi} | awk '{print $61}'` + gamm=`echo ${oi} | awk '{print $62}'` + gamh=`echo ${oi} | awk '{print $63}'` + tprandtl=`echo ${oi} | awk '{print $64}'` + ribmax=`echo ${oi} | awk '{print $65}'` + atmco2=`echo ${oi} | awk '{print $66}'` + thcrit=`echo ${oi} | awk '{print $67}'` + smfire=`echo ${oi} | awk '{print $68}'` + ifire=`echo ${oi} | awk '{print $69}'` + fireparm=`echo ${oi} | awk '{print $70}'` + ipercol=`echo ${oi} | awk '{print $71}'` + runoff=`echo ${oi} | awk '{print $72}'` + imetrad=`echo ${oi} | awk '{print $73}'` + ibranch=`echo ${oi} | awk '{print $74}'` + icanrad=`echo ${oi} | awk '{print $75}'` + crown=`echo ${oi} | awk '{print $76}'` + ltransvis=`echo ${oi} | awk '{print $77}'` + lreflectvis=`echo ${oi} | awk '{print $78}'` + ltransnir=`echo ${oi} | awk '{print $79}'` + lreflectnir=`echo ${oi} | awk '{print $80}'` + orienttree=`echo ${oi} | awk '{print $81}'` + orientgrass=`echo ${oi} | awk '{print $82}'` + clumptree=`echo ${oi} | awk '{print $83}'` + clumpgrass=`echo ${oi} | awk '{print $84}'` + ivegtdyn=`echo ${oi} | awk '{print $85}'` + igndvap=`echo ${oi} | awk '{print $86}'` + iphen=`echo ${oi} | awk '{print $87}'` + iallom=`echo ${oi} | awk '{print $88}'` + ibigleaf=`echo ${oi} | awk '{print $89}'` + irepro=`echo ${oi} | awk '{print $90}'` + treefall=`echo ${oi} | awk '{print $91}'` #---------------------------------------------------------------------------------------# diff --git a/ED/src/dynamics/canopy_struct_dynamics.f90 b/ED/src/dynamics/canopy_struct_dynamics.f90 index 171b81c2d..3c254dcea 100644 --- a/ED/src/dynamics/canopy_struct_dynamics.f90 +++ b/ED/src/dynamics/canopy_struct_dynamics.f90 @@ -2534,6 +2534,7 @@ subroutine ed_stars(theta_atm,enthalpy_atm,shv_atm,co2_atm,theta_can,enthalpy_ca real(kind=4) :: ch ! c times |Rib|^1/2 for heat. real(kind=4) :: ee ! (z/z0)^1/3 -1. for eqn. 20 !----- Local variables, used by other schemes. --------------------------------------! + real(kind=4) :: zstar ! height above displacement real(kind=4) :: zeta0m ! roughness(momentum)/(Obukhov length). real(kind=4) :: zeta0h ! roughness(heat)/(Obukhov length). real(kind=4) :: utotal ! Total wind (actual + convective) @@ -2553,7 +2554,8 @@ subroutine ed_stars(theta_atm,enthalpy_atm,shv_atm,co2_atm,theta_can,enthalpy_ca !----- Find the variables common to both methods. -----------------------------------! thetav_atm = theta_atm * (1. + epim1 * shv_atm) thetav_can = theta_can * (1. + epim1 * shv_can) - zoz0m = (zref-dheight)/rough + zstar = zref-dheight + zoz0m = zstar / rough lnzoz0m = log(zoz0m) zoz0h = z0moz0h * zoz0m lnzoz0h = log(zoz0h) @@ -2566,7 +2568,7 @@ subroutine ed_stars(theta_atm,enthalpy_atm,shv_atm,co2_atm,theta_can,enthalpy_ca ! this will be the definitive RiB, whilst this is the first guess, which will be ! ! corrected by the convective velocity in the other unstable cases. ! !------------------------------------------------------------------------------------! - rib = 2.0 * grav * (zref-dheight-rough) * (thetav_atm-thetav_can) & + rib = 2.0 * grav * (zstar-rough) * (thetav_atm-thetav_can) & / ( (thetav_atm+thetav_can) * uref * uref) stable = thetav_atm >= thetav_can !------------------------------------------------------------------------------------! @@ -2655,14 +2657,16 @@ subroutine ed_stars(theta_atm,enthalpy_atm,shv_atm,co2_atm,theta_can,enthalpy_ca ! Stable case, we don't need to find convective velocity, so we don't need ! ! the iterative case. ! !------------------------------------------------------------------------------! - !----- We now compute the stability correction functions. ---------------------! - zeta = zoobukhov(rib,zref-dheight,rough,zoz0m,lnzoz0m,zoz0h,lnzoz0h,stable) - zeta0m = rough * zeta / (zref-dheight) - zeta0h = z0hoz0m * zeta0m + !----- Find the dimensionless height. -----------------------------------------! + zeta = zoobukhov(rib,zstar,rough,zoz0m,lnzoz0m,zoz0h,lnzoz0h,stable) + !------------------------------------------------------------------------------! - !----- Find the coefficient to scale the other stars. -------------------------! - zeta0m = rough * zeta / (zref-dheight) + + !----- Find the dimensionless roughness. --------------------------------------! + zeta0m = rough * zeta / zstar zeta0h = z0hoz0m * zeta0m + !------------------------------------------------------------------------------! + !----- Find ustar, making sure it is not too small. ---------------------------! ustar = max (ustmin, vonk * uuse & @@ -2688,18 +2692,18 @@ subroutine ed_stars(theta_atm,enthalpy_atm,shv_atm,co2_atm,theta_can,enthalpy_ca !----- Update the Bulk Richardson number. ----------------------------------! - rib = 2.0 * grav * (zref-dheight-rough) * (thetav_atm-thetav_can) & + rib = 2.0 * grav * (zstar-rough) * (thetav_atm-thetav_can) & / ( (thetav_atm+thetav_can) * utotal) !---------------------------------------------------------------------------! - !----- We now compute the stability correction functions. ------------------! - zeta = zoobukhov(rib,zref-dheight,rough,zoz0m,lnzoz0m,zoz0h,lnzoz0h,stable) + !----- Find the dimensionless height. --------------------------------------! + zeta = zoobukhov(rib,zstar,rough,zoz0m,lnzoz0m,zoz0h,lnzoz0h,stable) !---------------------------------------------------------------------------! - !----- Find the coefficient to scale the other stars. ----------------------! - zeta0m = rough * zeta / (zref-dheight) + !----- Find the dimensionless roughness. -----------------------------------! + zeta0m = rough * zeta / zstar zeta0h = z0hoz0m * zeta0m !---------------------------------------------------------------------------! @@ -2865,6 +2869,7 @@ subroutine ed_stars8(theta_atm,enthalpy_atm,shv_atm,co2_atm real(kind=8) :: ch ! c times |Rib|^1/2 for heat. real(kind=8) :: ee ! (z/z0)^1/3 -1. for eqn. 20 !----- Local variables, used by others. ---------------------------------------------! + real(kind=8) :: zstar ! Reference height above displacement real(kind=8) :: zeta0m ! roughness(momentum)/(Obukhov length). real(kind=8) :: zeta0h ! roughness(heat)/(Obukhov length). real(kind=8) :: utotal ! Total wind (actual + convective) @@ -2883,7 +2888,8 @@ subroutine ed_stars8(theta_atm,enthalpy_atm,shv_atm,co2_atm !----- Find the variables common to both methods. -----------------------------------! thetav_atm = theta_atm * (1.d0 + epim18 * shv_atm) thetav_can = theta_can * (1.d0 + epim18 * shv_can) - zoz0m = (zref-dheight)/rough + zstar = zref - dheight + zoz0m = zstar / rough lnzoz0m = log(zoz0m) zoz0h = z0moz0h8 * zoz0m lnzoz0h = log(zoz0h) @@ -2896,7 +2902,7 @@ subroutine ed_stars8(theta_atm,enthalpy_atm,shv_atm,co2_atm ! this will be the definitive RiB, whilst this is the first guess, which will be ! ! corrected by the convective velocity in the other unstable cases. ! !------------------------------------------------------------------------------------! - rib = 2.d0 * grav8 * (zref-dheight-rough) * (thetav_atm-thetav_can) & + rib = 2.d0 * grav8 * (zstar-rough) * (thetav_atm-thetav_can) & / ( (thetav_atm+thetav_can) * uref * uref) stable = thetav_atm >= thetav_can !------------------------------------------------------------------------------------! @@ -2986,16 +2992,26 @@ subroutine ed_stars8(theta_atm,enthalpy_atm,shv_atm,co2_atm ! Stable case, we don't need to find convective velocity, so we don't need ! ! the iterative case. ! !------------------------------------------------------------------------------! - !----- We now compute the stability correction functions. ---------------------! - zeta = zoobukhov8(rib,zref-dheight,rough,zoz0m,lnzoz0m,zoz0h,lnzoz0h,stable) - zeta0m = rough * zeta / (zref - dheight) + !----- Find the dimensionless height. -----------------------------------------! + zeta = zoobukhov8(rib,zstar,rough,zoz0m,lnzoz0m,zoz0h,lnzoz0h,stable) + !------------------------------------------------------------------------------! + + + !----- Find the dimensionless roughness. --------------------------------------! + zeta0m = rough * zeta / zstar zeta0h = z0hoz0m8 * zeta0m + !------------------------------------------------------------------------------! + - !----- Finding ustar, making sure it is not too small. ------------------------! + + !----- Find ustar, make sure it is not too small. -----------------------------! ustar = max (ustmin8, vonk8 * uuse & / (lnzoz0m - psim8(zeta,stable) + psim8(zeta0m,stable))) + !------------------------------------------------------------------------------! - !----- Finding the coefficient to scale the other stars. ----------------------! + + + !----- Find the coefficient to scale the other stars. -------------------------! c3 = vonk8 & / (tprandtl8 * (lnzoz0h - psih8(zeta,stable) + psih8(zeta0h,stable))) !------------------------------------------------------------------------------! @@ -3014,19 +3030,18 @@ subroutine ed_stars8(theta_atm,enthalpy_atm,shv_atm,co2_atm !----- Update the Bulk Richardson number. ----------------------------------! - rib = 2.d0 * grav8 * (zref-dheight-rough) * (thetav_atm-thetav_can) & + rib = 2.d0 * grav8 * (zstar-rough) * (thetav_atm-thetav_can) & / ( (thetav_atm+thetav_can) * utotal * utotal) !---------------------------------------------------------------------------! - !----- We now compute the stability correction functions. ------------------! - zeta = zoobukhov8(rib,zref-dheight,rough,zoz0m,lnzoz0m,zoz0h,lnzoz0h & - ,stable) + !----- Find the dimensionless height. --------------------------------------! + zeta = zoobukhov8(rib,zstar,rough,zoz0m,lnzoz0m,zoz0h,lnzoz0h,stable) !---------------------------------------------------------------------------! - !----- Find the coefficient to scale the other stars. ----------------------! - zeta0m = rough * zeta / (zref - dheight) + !----- Find the dimensionless roughness. -----------------------------------! + zeta0m = rough * zeta / zstar zeta0h = z0hoz0m8 * zeta0m !---------------------------------------------------------------------------! diff --git a/ED/src/init/ed_params.f90 b/ED/src/init/ed_params.f90 index f5f10477b..54c4e5f6b 100644 --- a/ED/src/init/ed_params.f90 +++ b/ED/src/init/ed_params.f90 @@ -3218,6 +3218,7 @@ end subroutine init_pft_nitro_params ! This subroutine sets up some PFT and leaf dependent properties. ! !------------------------------------------------------------------------------------------! subroutine init_pft_leaf_params() + use phenology_coms , only : iphen_scheme ! ! intent(in) use ed_misc_coms , only : igrass ! ! intent(in) use rk4_coms , only : ibranch_thermo ! ! intent(in) use pft_coms , only : phenology & ! intent(out) @@ -3228,11 +3229,15 @@ subroutine init_pft_leaf_params() , wat_dry_ratio_grn & ! intent(out) , wat_dry_ratio_ngrn & ! intent(out) , delta_c ! ! intent(out) - use consts_coms , only : t3ple ! ! intent(out) - use phenology_coms , only :iphen_scheme + use consts_coms , only : t00 ! ! intent(out) implicit none + !----- Reference temperature for heat capacity. ----------------------------------------! + real, parameter :: tref = t00 + 15. + !---------------------------------------------------------------------------------------! + + !---------------------------------------------------------------------------------------! ! Tree phenology is the same for both cases, but in the new grass allometry they ! ! must be evergreens. ! @@ -3318,19 +3323,43 @@ subroutine init_pft_leaf_params() !---------------------------------------------------------------------------------------! ! The following parameters are second sources found in Gu et al. (2007) ! !---------------------------------------------------------------------------------------! - c_grn_leaf_dry(1:17) = 3218.0 ! Jones 1992 J/(kg K) - c_ngrn_biom_dry(1:17) = 1256.0 ! Forest Products Laboratory - wat_dry_ratio_grn(1:17) = 2.5 ! - !wat_dry_ratio_grn(1:17) = 1.5 ! Ceccato et al. 2001 - wat_dry_ratio_ngrn(1:17) = 0.7 ! Forest Products Laboratory + c_grn_leaf_dry (1:17) = 3218.0 ! Jones 1992 J/(kg K) + wat_dry_ratio_ngrn (1:17) = 0.7 ! Forest Products Laboratory (2010) + !---------------------------------------------------------------------------------------! + + + !---------------------------------------------------------------------------------------! + ! Water dry ratio for leaves. Source depends on whether the plants are tropical ! + ! or temperate. ! + ! Tropical -- average well-watered values of wd from: ! + ! Kursar et al., 2009: Functional Ecology, 23, 93-102. ! + ! Temperate -- check with MCD. Original value was 1.5, from Gu et. al (2007) but it ! + ! has been replaced by 2.5. Perhaps to account for the C:B ratio, but if ! + ! this is the case, it is accounting for it twice. ! + !---------------------------------------------------------------------------------------! + wat_dry_ratio_grn( 1:4) = 1.85 + wat_dry_ratio_grn( 5:13) = 2.50 + wat_dry_ratio_grn(14:17) = 1.85 + !---------------------------------------------------------------------------------------! + + + + !---------------------------------------------------------------------------------------! + ! The oven-dry wood heat capacity and the specific heat correction for water-wood ! + ! bonding come both from: ! + ! Forest Products Laboratory (2010), previous version cited by Gu et al. (2007). ! + ! ! + ! Instead of using the temperature-dependence, we use the values at 15C, and assume ! + ! that the values are constant. ! !---------------------------------------------------------------------------------------! - ! Delta-c is found using the second term of the RHS of equation 5, assuming ! - ! T=T3ple. This is a simplification, but the specific heat usually varies by 3J/kg/K ! - ! between 173K and 341K, so removing the dependence on temperature is not that bad ! - ! assumption. ! + c_ngrn_biom_dry(1:17) = 103.1 + 3.867 * tref + delta_c (1:17) = 1.e5 * wat_dry_ratio_ngrn(1:17) & + * ( - 0.06191 + 2.36e-4 * tref & + - 1.33e-2 * wat_dry_ratio_ngrn(1:17) ) !---------------------------------------------------------------------------------------! - delta_c(1:17) = 100. * wat_dry_ratio_ngrn(1:17) & - * (-0.06191 + 2.36e-4 * t3ple - 1.33e-2 * wat_dry_ratio_ngrn(1:17)) + + + !---------------------------------------------------------------------------------------! ! These are used to compute the crown length, which will then be used to find the ! @@ -4190,13 +4219,17 @@ subroutine init_soil_coms real , parameter :: sand_hcapv = 2.128e6 ! Sand vol. heat capacity [J/m3/K] real , parameter :: clay_hcapv = 2.385e6 ! Clay vol. heat capacity [J/m3/K] real , parameter :: silt_hcapv = 2.286e6 ! Silt vol. heat capacity (*) [J/m3/K] - real , parameter :: air_hcapv = 1.212e6 ! Air vol. heat capacity [J/m3/K] + real , parameter :: air_hcapv = 1.212e3 ! Air vol. heat capacity [J/m3/K] !---------------------------------------------------------------------------------------! ! (*) If anyone has the heat capacity for silt, please feel free to add it in here, I ! ! didn't find any. Apparently no one knows, and I've seen in other models that ! ! people just assume either the same as sand or the average. Here I'm just using ! ! halfway. I think the most important thing is to take into account the soil and ! ! the air, which are the most different. ! + ! ! + ! Sand (quartz), clay, and air heat capacities are derived from: ! + ! Monteith and Unsworth, 2008: Environmental Physics. ! + ! Academic Press, Third Edition. Table 15.1, p. 292 ! !---------------------------------------------------------------------------------------! @@ -4232,67 +4265,67 @@ subroutine init_soil_coms !---------------------------------------------------------------------------------------! soil = (/ & !----- 1. Sand. ---------------------------------------------------------------------! - soil_class( -0.049831046, 0.373250, 3.295000, 1584640., 0.026183447 & + soil_class( -0.049831046, 0.373250, 3.295000, 1342809., 0.026183447 & , 0.032636854, 2.446421e-5, 0.000500000, 0.3000, 4.8000 & , -2.7000, 0.132130936, 0.229, 0.352, 0.920 & , 0.030, 0.050, 1200., 1600., 0.000 & , 0.000, 0.000, 0.000, 0.000, 0.000) & !----- 2. Loamy sand. ---------------------------------------------------------------! - ,soil_class( -0.067406224, 0.385630, 3.794500, 1584809., 0.041560499 & + ,soil_class( -0.067406224, 0.385630, 3.794500, 1326165., 0.041560499 & , 0.050323046, 1.776770e-5, 0.000600000, 0.3000, 4.6600 & , -2.6000, 0.155181959, 0.212, 0.335, 0.825 & , 0.060, 0.115, 1250., 1600., 0.000 & , 0.000, 0.000, 0.000, 0.000, 0.000) & !----- 3. Sandy loam. ---------------------------------------------------------------! - ,soil_class( -0.114261521, 0.407210, 4.629000, 1587042., 0.073495043 & + ,soil_class( -0.114261521, 0.407210, 4.629000, 1295982., 0.073495043 & , 0.085973722, 1.022660e-5, 0.000769000, 0.2900, 4.2700 & , -2.3100, 0.194037750, 0.183, 0.307, 0.660 & , 0.110, 0.230, 1300., 1600., 0.000 & , 0.000, 0.000, 0.000, 0.000, 0.000) & !----- 4. Silt loam. ----------------------------------------------------------------! - ,soil_class( -0.566500112, 0.470680, 5.552000, 1568225., 0.150665475 & + ,soil_class( -0.566500112, 0.470680, 5.552000, 1191975., 0.150665475 & , 0.171711257, 2.501101e-6, 0.000010600, 0.2700, 3.4700 & , -1.7400, 0.273082063, 0.107, 0.250, 0.200 & , 0.160, 0.640, 1400., 1600., 0.000 & , 0.000, 0.000, 0.000, 0.000, 0.000) & !----- 5. Loam. ---------------------------------------------------------------------! - ,soil_class( -0.260075834, 0.440490, 5.646000, 1588082., 0.125192234 & + ,soil_class( -0.260075834, 0.440490, 5.646000, 1245546., 0.125192234 & , 0.142369513, 4.532431e-6, 0.002200000, 0.2800, 3.6300 & , -1.8500, 0.246915025, 0.140, 0.268, 0.410 & , 0.170, 0.420, 1350., 1600., 0.000 & , 0.000, 0.000, 0.000, 0.000, 0.000) & !----- 6. Sandy clay loam. ----------------------------------------------------------! - ,soil_class( -0.116869181, 0.411230, 7.162000, 1636224., 0.136417267 & + ,soil_class( -0.116869181, 0.411230, 7.162000, 1304598., 0.136417267 & , 0.150969505, 6.593731e-6, 0.001500000, 0.2800, 3.7800 & , -1.9600, 0.249629687, 0.163, 0.260, 0.590 & , 0.270, 0.140, 1350., 1600., 0.000 & , 0.000, 0.000, 0.000, 0.000, 0.000) & !----- 7. Silty clay loam. ----------------------------------------------------------! - ,soil_class( -0.627769194, 0.478220, 8.408000, 1621562., 0.228171947 & + ,soil_class( -0.627769194, 0.478220, 8.408000, 1193778., 0.228171947 & , 0.248747504, 1.435262e-6, 0.000107000, 0.2600, 2.7300 & , -1.2000, 0.333825332, 0.081, 0.195, 0.100 & , 0.340, 0.560, 1500., 1600., 0.000 & , 0.000, 0.000, 0.000, 0.000, 0.000) & !----- 8. Clayey loam. --------------------------------------------------------------! - ,soil_class( -0.281968114, 0.446980, 8.342000, 1636911., 0.192624431 & + ,soil_class( -0.281968114, 0.446980, 8.342000, 1249582., 0.192624431 & , 0.210137962, 2.717260e-6, 0.002200000, 0.2700, 3.2300 & , -1.5600, 0.301335491, 0.116, 0.216, 0.320 & , 0.340, 0.340, 1450., 1600., 0.000 & , 0.000, 0.000, 0.000, 0.000, 0.000) & !----- 9. Sandy clay. ---------------------------------------------------------------! - ,soil_class( -0.121283019, 0.415620, 9.538000, 1673422., 0.182198910 & + ,soil_class( -0.121283019, 0.415620, 9.538000, 1311396., 0.182198910 & , 0.196607427, 4.314507e-6, 0.000002167, 0.2700, 3.3200 & , -1.6300, 0.286363001, 0.144, 0.216, 0.520 & , 0.420, 0.060, 1450., 1600., 0.000 & , 0.000, 0.000, 0.000, 0.000, 0.000) & !----- 10. Silty clay. --------------------------------------------------------------! - ,soil_class( -0.601312179, 0.479090, 10.461000, 1652723., 0.263228486 & + ,soil_class( -0.601312179, 0.479090, 10.461000, 1203168., 0.263228486 & , 0.282143846, 1.055191e-6, 0.000001033, 0.2500, 2.5800 & , -1.0900, 0.360319788, 0.068, 0.159, 0.060 & , 0.470, 0.470, 1650., 1600., 0.000 & , 0.000, 0.000, 0.000, 0.000, 0.000) & !----- 11. Clay. --------------------------------------------------------------------! - ,soil_class( -0.299226464, 0.454400, 12.460000, 1692037., 0.259868987 & + ,soil_class( -0.299226464, 0.454400, 12.460000, 1259466., 0.259868987 & , 0.275459057, 1.307770e-6, 0.000001283, 0.2500, 2.4000 & , -0.9600, 0.353255209, 0.083, 0.140, 0.200 & , 0.600, 0.200, 1700., 1600., 0.000 & @@ -4310,25 +4343,25 @@ subroutine init_soil_coms , 0.0000, 0.0000, 0., 0., 0.000 & , 0.000, 0.000, 0.000, 0.000, 0.000) & !----- 14. Silt. --------------------------------------------------------------------! - ,soil_class( -1.047128548, 0.492500, 3.862500, 1510052., 0.112299080 & + ,soil_class( -1.047128548, 0.492500, 3.862500, 1143842., 0.112299080 & , 0.135518820, 2.046592e-6, 0.000010600, 0.2700, 3.4700 & , -1.7400, 0.245247642, 0.092, 0.265, 0.075 & , 0.050, 0.875, 1400., 1600., 0.000 & , 0.000, 0.000, 0.000, 0.000, 0.000) & !----- 15. Heavy clay. --------------------------------------------------------------! - ,soil_class( -0.322106879, 0.461200, 15.630000, 1723619., 0.296806035 & + ,soil_class( -0.322106879, 0.461200, 15.630000, 1264547., 0.296806035 & , 0.310916364, 7.286705e-7, 0.000001283, 0.2500, 2.4000 & , -0.9600, 0.382110712, 0.056, 0.080, 0.100 & , 0.800, 0.100, 1700., 1600., 0.000 & , 0.000, 0.000, 0.000, 0.000, 0.000) & !----- 16. Clayey sand. -------------------------------------------------------------! - ,soil_class( -0.176502150, 0.432325, 11.230000, 1688353., 0.221886929 & + ,soil_class( -0.176502150, 0.432325, 11.230000, 1292163., 0.221886929 & , 0.236704039, 2.426785e-6, 0.000001283, 0.2500, 2.4000 & , -0.9600, 0.320146708, 0.115, 0.175, 0.375 & , 0.525, 0.100, 1700., 1600., 0.000 & , 0.000, 0.000, 0.000, 0.000, 0.000) & !----- 17. Clayey silt. -------------------------------------------------------------! - ,soil_class( -0.438278332, 0.467825, 11.305000, 1670103., 0.261376708 & + ,soil_class( -0.438278332, 0.467825, 11.305000, 1228490., 0.261376708 & , 0.278711303, 1.174982e-6, 0.000001283, 0.2500, 2.4000 & , -0.9600, 0.357014719, 0.075, 0.151, 0.125 & , 0.525, 0.350, 1700., 1600., 0.000 & @@ -4389,7 +4422,7 @@ subroutine init_soil_coms * ( soil(nslcon)%xsand * sand_hcapv & + soil(nslcon)%xsilt * silt_hcapv & + soil(nslcon)%xclay * clay_hcapv ) & - + 0.5 * (soil(nslcon)%soilcp + soil(nslcon)%slmsts) & + + 0.5 * (soil(nslcon)%slmsts - soil(nslcon)%soilcp) & * air_hcapv !---------------------------------------------------------------------------------! diff --git a/ED/src/io/average_utils.f90 b/ED/src/io/average_utils.f90 index a5414e8ce..6c08fd904 100644 --- a/ED/src/io/average_utils.f90 +++ b/ED/src/io/average_utils.f90 @@ -3595,6 +3595,9 @@ subroutine integrate_ed_mmean_vars(cgrid) cpatch%mmean_bleaf (ico) = cpatch%mmean_bleaf (ico) & + cpatch%bleaf (ico) & * ndaysi + cpatch%mmean_broot (ico) = cpatch%mmean_broot (ico) & + + cpatch%broot (ico) & + * ndaysi cpatch%mmean_bstorage (ico) = cpatch%mmean_bstorage (ico) & + cpatch%bstorage (ico) & * ndaysi @@ -4506,6 +4509,7 @@ subroutine zero_ed_mmean_vars(cgrid) cohortloop: do ico=1,cpatch%ncohorts cpatch%mmean_lai (ico) = 0.0 cpatch%mmean_bleaf (ico) = 0.0 + cpatch%mmean_broot (ico) = 0.0 cpatch%mmean_bstorage (ico) = 0.0 cpatch%mmean_mort_rate (:,ico) = 0.0 cpatch%mmean_leaf_maintenance (ico) = 0.0 diff --git a/ED/src/utils/ed_therm_lib.f90 b/ED/src/utils/ed_therm_lib.f90 index b22720b97..bc50d6852 100644 --- a/ED/src/utils/ed_therm_lib.f90 +++ b/ED/src/utils/ed_therm_lib.f90 @@ -83,7 +83,7 @@ subroutine calc_veg_hcap(bleaf,bdead,bsapwooda,nplant,pft,leaf_hcap,wood_hcap) !----- Find branch/twig specific heat and biomass. -------------------------------! spheat_wood = (c_ngrn_biom_dry(pft) + wat_dry_ratio_ngrn(pft) * cliq) & / (1. + wat_dry_ratio_ngrn(pft)) + delta_c(pft) - bwood = brf_wd(pft) * (bsapwooda + bdead*agf_bs(pft)) + bwood = brf_wd(pft) * (bsapwooda + bdead*agf_bs(pft)) end select !----- Find the leaf specific heat. -------------------------------------------------! diff --git a/R-utils/FitGibbsSampler.r b/R-utils/FitGibbsSampler.r new file mode 100644 index 000000000..3e646c881 --- /dev/null +++ b/R-utils/FitGibbsSampler.r @@ -0,0 +1,589 @@ +#==========================================================================================# +#==========================================================================================# +# The following functions are small adaptations of the supporting online material # +# available at: # +# # +# Condit, R., et al., 2006: The importance of demographic niches to tree diversity. # +# Science, 313, 98-101. # +# # +# The main modification is to allow mortality and growth to be based on either number # +# of individuals or biomass. # +# # +# (Below is the original text from Condit et al. (2006). # +# Functions for fitting a hyperdistribution of mortality or growth rates with a log-normal # +# distribution using the Gibbs sampler. These functions will (should) source in R2.1.0 as # +# is (no add-on packages necessary), and given a table of data in the correct format, # +# will produce the posterior distribution of all parameters. # +# # +# Included functions # +# # +# (1) metrop.lnormMort.Gibbs # +# (2) mu.mortGibbs # +# (3) sd.mortGibbs # +# (4) spmean.mortGibbs # +# (5) metrop1step # +# (6) lnorm.growth.Gibbs # +# (7) GibbsCommVar # +# (8) GibbsSppVar # +# (9) GibbsCommMean # +# (10) GibbsTheta # +# # +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# FUNCTION 1 -- The main function for mortality, accepting data and producing the Gibbs # +# sampler. Functions 2-5 are its subroutines. Run this function alone for # +# mortality data. # +# # +# The table of data has one row per species, and must have the following columns: # +# -> species names (or codes) as rownames; # +# -> a column N with the number of individuals in the initial census; # +# -> a column S with the number of survivors in the later census; # +# -> a column time with a time interval for each species; # +# -> a column rate with a calculated mortality rate, (log(N)-log(S))/time. # +# -> There should be no missing values, with all N > 0. # +# # +# The two hyperparameters are the mean (logMu) and SD (logSD) of log(rate). The # +# argument start.param sets their starting values. # +# # +# Argument unity sets a typical value for one individual. This should be one when # +# using mortality rate based on individual count, but it should be the biomass in case # +# mortality rate is found as biomass loss. # +# # +# The argument div sets the step size used by the Metropolis algorithm for choosing new # +# values of each parameter. The default values worked for the Barro Colorado plot, but # +# will have to be adjusted for other datasets. # +# # +# The number of cycles run by the Gibbs sampler is the argument steps, and the current # +# state will be printed to the screen every showstep steps unless verbose is set to FALSE. # +# The argument burn.in.phase is used to discard the first steps (burn-in-phase); estimates # +# based on the Gibbs sampler are drawn from the steps after this. The acceptance rate is # +# printed as well, allowing easy adjustment of the step size (argument div). # +# # +# Data are output as a list, including all post-burn-in values of every parameter plus # +# their means, medians, and quantiles. # +#------------------------------------------------------------------------------------------# +metrop.lnormMort.Gibbs <<- function( data + , outrate + , start.param = c(-3,.8) + , div = c(.35,.35,.15) + , steps = 1000 + , burn.in.phase = 100 + , verbose = TRUE + , showstep = 100 + ){ + + #---- Find the number of elements for PDF and CDF. -------------------------------------# + nrate = length(outrate) + + #---- Find the indices of the post burn-in phase. --------------------------------------# + whichuse = seq(from=1,to=steps,by=1) + burn.in.phase + steps = steps + burn.in.phase + nuse = length(whichuse) + + #---- Set matrices. --------------------------------------------------------------------# + logMu=logSD = matrix(nrow=steps,ncol=2) + logMu[1,1] = start.param[1] + logSD[1,1] = start.param[2] + + nospp = dim(data)[1] + spmean = matrix(ncol=steps,nrow=nospp) + draws = matrix(ncol=steps,nrow=nospp) + rownames(spmean) = rownames(draws) = rownames(data) + spmean[,1] = data$rate + + #----- Tweak mortality for the cases where there are no survivors or no deaths. --------# + nomort = which(data$S == 0. | data$N == data$S) + spmean[nomort,1] = ( ( log(data$N[nomort]+ 2) + - log(data$S[nomort]+ 1) ) + / data$time[nomort] ) + raresp = which(data$N < 5)[1] + maxsp = which.max(data$N) + + + for (i in 2:steps){ + logMu[i,] = metrop1step( func = mu.mortGibbs + ,start.param = logMu[i-1,1] + ,scale.param = div[1] + ,spmean = spmean[,i-1] + ,logSD = logSD[i-1,1] + )#end function metrop1step + logSD[i,] = metrop1step( func = sd.mortGibbs + , start.param = logSD[i-1,1] + , scale.param = div[2] + , spmean = spmean[,i-1] + , logMu = logMu[i,1] + )#end function metrop1step + + for (j in 1:nospp){ + nextmean = metrop1step( func = spmean.mort.Gibbs + , start.param = spmean[j,i-1] + , scale.param = div[3]/data$N[j]^(.33) + , N = data$N[j] + , S = data$S[j] + , time = data$time[j] + , logMu = logMu[i,1] + , logSD = logSD[i,1] + )#end function metrop1step + + spmean[j,i] = nextmean[1] + draws[j,i] = nextmean[2] + }#end for + + if (verbose && (i == 2 | i %% showstep == 0)){ + cat(" -> Step ", i, ": ", round(logMu[i,1],2) + , round(logSD[i,1],2) + , round(spmean[raresp,i],4) + , round(spmean[maxsp,i],4) ) + cat( " .. Accept: " , round(1-sum(logMu[,2],na.rm=T)/i,2) + , round(1-sum(logSD[,2],na.rm=T)/i,2) + , round(1-sum(draws[raresp,],na.rm=T)/i,2) + , round(1-sum(draws[maxsp,],na.rm=T)/i,2) + , "\n") + }#end if + }#end for + + spmean = spmean[,whichuse] + logMu = logMu[whichuse,1] + logSD = logSD[whichuse,1] + + + + mediantheta = apply(spmean,1,median) + uppertheta = apply(spmean,1,quantile,probs=.975) + lowertheta = apply(spmean,1,quantile,probs=.025) + + meanMu = mean(logMu) + meanRt = exp(meanMu) + meanSD = mean(logSD) + upperMu = quantile(logMu,probs=.975) + upperRt = exp(upperMu) + lowerMu = quantile(logMu,probs=.025) + lowerRt = exp(lowerMu) + upperSD = quantile(logSD,probs=.975) + lowerSD = quantile(logSD,probs=.025) + + #----- Find mean CDF and PDF using the expected statistics. ------------------------------# + cdf.mean = plnorm(q=outrate,meanlog=meanMu,sdlog=meanSD) + pdf.mean = diff(cdf.mean) + pdf.mean = c(pdf.mean,pdf.mean[nrate-1]) + + #----- Find the cumulative distribution function for each member. ------------------------# + logMu.mat = matrix(logMu,nrow=nrate,ncol=nuse,byrow=TRUE) + logSD.mat = matrix(logSD,nrow=nrate,ncol=nuse,byrow=TRUE) + rate.mat = matrix(outrate,nrow=nrate,ncol=nuse,byrow=FALSE) + cdf.mat = matrix(plnorm(q=rate.mat,meanlog=logMu.mat,sdlog=logSD.mat) + ,nrow=nrate,ncol=nuse) + pdf.mat = apply(cdf.mat,MARGIN=2,FUN=diff) + pdf.mat = rbind(pdf.mat,pdf.mat[nrate-1,]) + + cdf.q025 = tapply(X=cdf.mat,INDEX=row(cdf.mat),FUN=quantile,probs=0.025) + cdf.q975 = tapply(X=cdf.mat,INDEX=row(cdf.mat),FUN=quantile,probs=0.975) + pdf.q025 = tapply(X=pdf.mat,INDEX=row(pdf.mat),FUN=quantile,probs=0.025) + pdf.q975 = tapply(X=pdf.mat,INDEX=row(pdf.mat),FUN=quantile,probs=0.975) + + distrib = cbind(pdf.mean,pdf.q025,pdf.q975,cdf.mean,cdf.q025,cdf.q975) + pcdf.names = paste("pcr",sprintf("%.3f",100*outrate),sep=".") + dimnames(distrib) = list (pcdf.names,c("pdf.median","pdf.lower","pdf.upper" + ,"cdf.median","cdf.lower","cdf.upper") ) + + ans = list( fullMu = logMu + , fullSD = logSD + , draws = draws + , fulltheta = spmean + , means = c( Mu = meanMu + , lowerMu = lowerMu + , upperMu = upperMu + , Rate = meanRt + , lowerRt = lowerRt + , upperRt = upperRt + , SD = meanSD + , lowerSD = lowerSD + , upperSD = upperSD + )#end c + , table = data.frame( N = data$N + , S = data$S + , time = data$time + , obsmean = data$rate + , fitmort = mediantheta + , lowermean = lowertheta + , uppermean = uppertheta + )#end data.frame + , distrib = distrib + )#end list + return(ans) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# FUNCTION 2 -- This is the conditional likelihood function for the probability of # +# observing the parameter logMu given the data, species means, and logSD. # +# It is called each step of the Gibbs sampler. # +#------------------------------------------------------------------------------------------# +mu.mortGibbs <<- function(logMu,spmean,logSD){ + if (logSD <= 0) return(-Inf) + + llike = dlnorm(spmean,meanlog=logMu,sdlog=logSD,log=TRUE) + return(sum(llike)) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# FUNCTION 3 -- This is the conditional likelihood function for the probability of # +# observing the parameter logSD given the data, species means, and logMu. # +# It is used each step of the Gibbs sampler. # +#------------------------------------------------------------------------------------------# +sd.mortGibbs <<- function(logSD,spmean,logMu){ + if(logSD <= 0) return(-Inf) + + llike = dlnorm(spmean,meanlog=logMu,sdlog=logSD,log=TRUE) + return(sum(llike)) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# FUNCTION 4 -- This is the conditional likelihood function for the probability of # +# observing the parameters spmean mortality parameter of each species) # +# given the data, logMu, and logSD. It is used each step of the Gibbs # +# sampler, once per each species. # +#------------------------------------------------------------------------------------------# +spmean.mort.Gibbs <<- function(spmean,N,S,time,logMu,logSD){ + if(is.na(spmean)) browser() + if(spmean <= 0) return(-Inf) + + theta = exp(-spmean*time) + + llike = ( dlnorm(x=spmean,meanlog=logMu,sdlog=logSD,log=TRUE) + + dbinom(x=S,size=N,prob=theta,log=TRUE) ) + return(llike) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# FUNCTION 5 -- A generic routine for taking a single Metropolis step given any # +# probability function, func, an initial parameter, start.param, and a # +# scaling parameter for the step size, scale.param. It returns the next # +# parameter value as well as an acceptance indicator (0 if the value was # +# accepted, 1 if rejected). # +#------------------------------------------------------------------------------------------# +metrop1step <<- function(func,start.param,scale.param,...){ + origlike = func(start.param,...) + newval = rnorm(1,mean=start.param,sd=scale.param) + newlike = func(newval,...) + + if (newlike >= origlike){ + return(c(newval,0)) + }else{ + likeratio=exp(newlike-origlike) + }#end if + + if (runif(1) < likeratio){ + return(c(newval,0)) + }else{ + return(c(start.param,1)) + }#end if +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# FUNCTION 6 -- The main function for growth, accepting data and producing the Gibbs # +# sampler. Functions 7-10 are its subroutines. Run this function alone for # +# growth data. # +# # +# The table of data has one row per individual, and must have the following columns: # +# -> a column sp with species names (or codes); # +# -> a column growth with the growth rate to be used. If log-transformed data are # +# needed, this column should be the log-tranformation; it will not be transformed in # +# this program. There should be no missing values in either column. # +# # +# The two hyperparameters are the mean (mu) and variance (comm.var) of the distribution # +# of mean growth rates across the community (the hyperdistribution). The third parameter # +# is the within-species variance (spp.var). The argument start.param sets the 3 starting # +# values, or it can be NULL and the starting values are set automatically. # +# # +# The argument prior sets the parameters defining the prior distributions. # +# # +# The number of cycles run by the Gibbs sampler is the argument steps, and the current # +# state will be printed to the screen every showstep steps, unless verbose is FALSE. The # +# argument burn.in.phase defines the number of initial time steps (burn-in-phase) that # +# will be discarded for the final analysis, so the Gibbs sampler are drawn from those # +# steps after burn.in.phase. The acceptance rate is printed as well, allowing easy # +# adjustment of the step size (argument div). # +# # +# Data are output as a list, including all post-burn-in values of every parameter plus # +# their means, medians, and quantiles. A table of mean growth rates per species, plus the # +# estimated mean from the Gibbs sampler, is also returned. # +#------------------------------------------------------------------------------------------# +lnorm.growth.Gibbs <<- function( growth + , outrate + , start.param = c(0,1,1) + , prior = c(0,0,0,0,1e5,1e5) + , steps = 1000 + , burn.in.phase = 100 + , verbose = TRUE + , showstep = 100 + ){ + + #---- Find the number of elements for PDF and CDF. -------------------------------------# + nrate = length(outrate) + + #----- Define the post-burn-in phase. --------------------------------------------------# + whichuse = burn.in.phase + seq(from=1,to=steps,by=1) + steps = steps + burn.in.phase + nuse = length(whichuse) + + gcol = which(colnames(growth)=="growth") + mu = comm.var = spp.var = numeric() + abund = table(growth$sp) + nospp = length(abund) + spmean = matrix(nrow=nospp,ncol=steps) + rownames(spmean) = names(abund) + + spmean[,1] = obsmean = tapply(growth[,gcol],growth$sp,mean,na.rm=TRUE) + obssd = tapply(growth[,gcol],growth$sp,sd,na.rm=TRUE) + m = match(growth$sp,names(obsmean)) + growth$spmean = obsmean[m] + + if (is.null(start.param)){ + mu [1] = 0 + comm.var[1] = var(spmean[,1]) + spp.var [1] = 1 + }else{ + mu [1] = start.param[1] + comm.var [1] = start.param[2] + spp.var [1] = start.param[3] + }#end if + + a1 = prior[1] + b1 = prior[2] + a2 = prior[3] + b2 = prior[4] + sigma0 = prior[5] + + raresp = which(abund < 5)[1] + maxsp = which.max(abund) + + for (i in 2:steps){ + comm.var [i] = GibbsCommVar(a1,b1,spmean[,i-1],mu[i-1],abund) + spp.var [i] = GibbsSppVar(a2,b2,growth,spmean[,i-1]) + mu [i] = GibbsCommMean(comm.var[i],sigma0,mu[1],spmean[,i-1],abund) + spmean [,i] = GibbsTheta(comm.var[i],spp.var[i],spmean[,1],mu[i],abund) + + if (verbose && (i == 2 | i %% showstep == 0)){ + cat(" -> Step ", i, ": ", round(mu[i],2) + , round(comm.var[i]^.5,2) + , round(spp.var[i]^.5,2) + , round(spmean[raresp,i],4) + , round(spmean[maxsp,i],4) + , "\n" + )#end cat + }#end if + }#end for + + spmean = spmean[,whichuse] + comm.sd = comm.var[whichuse]^.5 + spp.sd = spp.var[whichuse]^.5 + mu = mu[whichuse] + + mediantheta = apply(spmean,1,median) + uppertheta = apply(spmean,1,quantile,prob=.975) + lowertheta = apply(spmean,1,quantile,prob=.025) + + meanCommSD = mean(comm.sd) + meanSppSD = mean(spp.sd) + + meanMu = mean(mu) + upperMu = quantile(mu,prob=.975) + lowerMu = quantile(mu,prob=.025) + + meanRt = mean(mu) + upperRt = quantile(mu,prob=.975) + lowerRt = quantile(mu,prob=.025) + + upperCommSD = quantile(comm.sd,prob=.975) + lowerCommSD = quantile(comm.sd,prob=.025) + upperSppSD = quantile(spp.sd,prob=.975) + lowerSppSD = quantile(spp.sd,prob=.025) + + + #----- Find mean CDF and PDF using the expected statistics. ----------------------------# + cdf.mean = pnorm(q=outrate,mean=meanMu,sd=meanCommSD) + pdf.mean = diff(cdf.mean) + pdf.mean = c(pdf.mean,pdf.mean[nrate-1]) + + #----- Find the cumulative distribution function for each member. ----------------------# + Mu.mat = matrix(mu ,nrow=nrate,ncol=nuse,byrow=TRUE) + SD.mat = matrix(comm.sd,nrow=nrate,ncol=nuse,byrow=TRUE) + rate.mat = matrix(outrate,nrow=nrate,ncol=nuse,byrow=FALSE) + cdf.mat = matrix(pnorm(q=rate.mat,mean=Mu.mat,sd=SD.mat) + ,nrow=nrate,ncol=nuse) + pdf.mat = apply(cdf.mat,MARGIN=2,FUN=diff) + pdf.mat = rbind(pdf.mat,pdf.mat[nrate-1,]) + + cdf.q025 = tapply(X=cdf.mat,INDEX=row(cdf.mat),FUN=quantile,probs=0.025) + cdf.q975 = tapply(X=cdf.mat,INDEX=row(cdf.mat),FUN=quantile,probs=0.975) + pdf.q025 = tapply(X=pdf.mat,INDEX=row(pdf.mat),FUN=quantile,probs=0.025) + pdf.q975 = tapply(X=pdf.mat,INDEX=row(pdf.mat),FUN=quantile,probs=0.975) + + distrib = cbind(pdf.mean,pdf.q025,pdf.q975,cdf.mean,cdf.q025,cdf.q975) + pcdf.names = paste("pcr",sprintf("%.3f",100*outrate),sep=".") + dimnames(distrib) = list (pcdf.names,c("pdf.median","pdf.lower","pdf.upper" + ,"cdf.median","cdf.lower","cdf.upper") ) + + + result.table = data.frame( N = abund + , obsmean = obsmean + , obssd = obssd + , fitgrow = mediantheta + , lowermean = lowertheta + , uppermean = uppertheta + )#end data.frame + colnames(result.table)[1:2] = c("sp","N") + rownames(result.table) = NULL + + ans = list( fullCommSD = comm.sd + , fullSppSD = spp.sd + , fullMu = mu + , fulltheta = spmean + , means = c( Mu = meanMu + , lowerMu = lowerMu + , upperMu = upperMu + , Rt = meanRt + , lowerRt = lowerRt + , upperRt = upperRt + , commSD = meanCommSD + , lowerCommSD = lowerCommSD + , upperCommSD = upperCommSD + , sppSD = meanSppSD + , lowerSppSD = lowerSppSD + , upperSppSD = upperSppSD + )#end c + , table = result.table + , distrib = distrib + )#end list + return(ans) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# FUNCTION 7 --- Function that draws the next comm.var parameter in the Gibbs sampler. # +#------------------------------------------------------------------------------------------# +GibbsCommVar <<- function(a,b,theta,mu,ab){ + shape = a + 0.5 * length(theta) + scale = b + 0.5 * sum((theta - mu)^2) + + result = rinvgamma(1,shape,scale) + if (is.na(result) | result < 1e-34) result = 1e-34 + + return(result) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# FUNCTION 8 -- Function that draws the next spp.var parameter in the Gibbs sampler. # +#------------------------------------------------------------------------------------------# +GibbsSppVar <<- function(a,b,growth,theta,J,measure="rgr"){ + shape = a + 0.5*dim(growth)[1] + gcol = which(colnames(growth)=="growth") + + devsq = (growth[,gcol]-growth$spmean)^2 + scale = b + 0.5*sum(devsq) + return(rinvgamma(1,shape,scale)) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# FUNCTION 9 -- Function that draws the next comm.mean parameter in the Gibbs sampler. # +#------------------------------------------------------------------------------------------# +GibbsCommMean <<- function(cvar,sigma0,mu,theta,ab){ + Nmean = ( cvar * mu + sigma0 * sum(theta)) / ( cvar + sigma0 * length(theta)) + Nvar = cvar * sigma0 / ( cvar + sigma0 * length(theta)) + + return(rnorm(1,mean=Nmean,sd=Nvar^.5)) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# FUNCTION 10 -- Function that draws the next species mean in the Gibbs sampler, for a # +# single species. # +#------------------------------------------------------------------------------------------# +GibbsTheta <<- function(cvar,svar,yhat,mu,ab){ + Nmean = ab * cvar * yhat / (ab * cvar + svar) + svar * mu / ( ab * cvar + svar ) + Nvar = cvar * svar / ( ab * cvar + svar ) + + return(rnorm(length(yhat),mean=Nmean,sd=Nvar^.5)) +}#end function +#==========================================================================================# +#==========================================================================================# + + diff --git a/R-utils/allometry.r b/R-utils/allometry.r new file mode 100644 index 000000000..5045d56a8 --- /dev/null +++ b/R-utils/allometry.r @@ -0,0 +1,382 @@ +#==========================================================================================# +#==========================================================================================# +h2dbh = function(h,ipft){ + + if (length(ipft) == 1){ + zpft = rep(ipft,times=length(h)) + }else{ + zpft = ipft + }#end if + + tropo = pft$tropical[zpft] & (iallom == 0 | iallom == 1) + tropn = pft$tropical[zpft] & iallom == 2 + tempe = ! pft$tropical[zpft] + + dbh = NA * h + dbh[tropo] = exp((log(h[tropo])-pft$b1Ht[zpft[tropo]])/pft$b2Ht[zpft[tropo]]) + dbh[tropn] = ( log( pft$hgt.ref[zpft[tropn]] / ( pft$hgt.ref[zpft[tropn]] - h[tropn] ) ) + / pft$b1Ht[zpft[tropn]] ) ^ ( 1. / pft$b2Ht[zpft[tropn]]) + dbh[tempe] = log( 1.0 - ( h[tempe] - pft$hgt.ref[zpft[tempe]]) + / pft$b1Ht[zpft[tempe]] ) / pft$b2Ht[zpft[tempe]] + + return(dbh) +}#end function h2dbh +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================! +#==========================================================================================! +dbh2h = function(ipft,dbh){ + + if (length(ipft) == 1){ + zpft = rep(ipft,times=length(dbh)) + }else{ + zpft = ipft + }#end if + + dbhuse = dbh + large = is.finite(dbh) & dbh > pft$dbh.crit[zpft] + dbhuse[large] = pft$dbh.crit[zpft[large]] + + tropo = pft$tropical[zpft] & (iallom == 0 | iallom == 1) + tropn = pft$tropical[zpft] & iallom == 2 + tempe = ! pft$tropical[zpft] + + h = NA * dbh + h[tropo] = exp(pft$b1Ht[zpft[tropo]] + pft$b2Ht[zpft[tropo]] * log(dbhuse[tropo]) ) + h[tropn] = ( pft$hgt.ref[zpft[tropn]] + * (1.0 - exp( -pft$b1Ht[zpft[tropn]] * dbhuse^pft$b2Ht[zpft[tropn]] ) ) ) + h[tempe] = ( pft$hgt.ref[zpft[tempe]] + pft$b1Ht[zpft[tempe]] + * (1.0 - exp(pft$b2Ht[zpft[tempe]] * dbhuse[tempe] ) ) ) + + return(h) +}#end function dbh2h +#==========================================================================================! +#==========================================================================================! + + + + + + +#==========================================================================================# +#==========================================================================================# +dbh2bl = function(dbh,ipft){ + + if (length(ipft) == 1){ + zpft = rep(ipft,times=length(dbh)) + }else{ + zpft = ipft + }#end if + + dbhuse = dbh + huge = is.finite(dbh) & dbh > pft$dbh.crit[zpft] + dbhuse[huge] = pft$dbh.crit[zpft[huge]] + + bleaf = pft$b1Bl [zpft] /C2B * dbhuse ^ pft$b2Bl [zpft] + + return(bleaf) +}# end function dbh2bl +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +dbh2bd = function(dbh,ipft){ + if (length(ipft) == 1){ + zpft = rep(ipft,times=length(dbh)) + }else{ + zpft = ipft + }#end if + + small = is.finite(dbh) & dbh <= pft$dbh.crit[zpft] + large = is.finite(dbh) & dbh > pft$dbh.crit[zpft] + + bdead = NA * dbh + bdead[small] = ( pft$b1Bs.small[zpft[small]] / C2B * dbh[small] + ^ pft$b2Bs.small[zpft[small]] ) + bdead[large] = ( pft$b1Bs.large[zpft[large]] / C2B * dbh[large] + ^ pft$b2Bs.large[zpft[large]] ) + return(bdead) +}# end function dbh2bl +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# Canopy Area allometry from Dietze and Clark (2008). # +#------------------------------------------------------------------------------------------# +dbh2ca = function(dbh,ipft){ + if (length(ipft) == 1){ + zpft = rep(ipft,times=length(dbh)) + }else{ + zpft = ipft + }#end if + + #----- Find local LAI, the minimum size for a crown area. ------------------------------# + bleaf = dbh2bl(dbh,ipft) + loclai = pft$SLA[zpft] * bleaf + + dbhuse = dbh + large = is.finite(dbh) & dbh > pft$dbh.crit[zpft] + dbhuse[large] = pft$dbh.crit[zpft[large]] + crown = pft$b1Ca[zpft] * dbhuse ^ pft$b2Ca[zpft] + + #----- Local LAI / Crown area should never be less than one. ---------------------------# + small = crown < loclai + crown[small] = loclai[small] + + return(crown) +}#end function dbh2ca +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# Wood area index from Ahrends et al. (2010). # +#------------------------------------------------------------------------------------------# +dbh2wai = function(dbh,ipft){ + if (length(ipft) == 1){ + zpft = rep(ipft,times=length(dbh)) + }else{ + zpft = ipft + }#end if + + dbhuse = dbh + large = is.finite(dbh) & dbh > pft$dbh.crit[zpft] + dbhuse[large] = pft$dbh.crit[zpft[large]] + wai = pft$b1WAI[zpft] * dbhuse ^ pft$b2WAI[zpft] + + return(wai) +}#end function dbh2ca +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# Standing volume of a tree. # +#------------------------------------------------------------------------------------------# +dbh2vol = function(hgt,dbh,ipft){ + vol = pft$b1Vol[ipft] * hgt * dbh ^ pft$b2Vol[ipft] + return(vol) +}#end function dbh2ca +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# Rooting depth. # +#------------------------------------------------------------------------------------------# +dbh2rd = function(hgt,dbh,ipft){ + if (iallom == 0){ + #------------------------------------------------------------------------------------# + # Original ED-2.1 (I don't know the source for this equation, though). # + #------------------------------------------------------------------------------------# + vol = dbh2vol(hgt,dbh,ipft) + rd = pft$b1Rd[ipft] * vol ^ pft$b2Rd[ipft] + }else if (iallom == 1 || iallom == 2){ + #-----------------------------------------------------------------------------------# + # This is just a test allometry, that imposes root depth to be 0.5 m for # + # plants that are 0.15-m tall, and 5.0 m for plants that are 35-m tall. # + #-----------------------------------------------------------------------------------# + rd = pft$b1Rd[ipft] * hgt ^ pft$b2Rd[ipft] + #-----------------------------------------------------------------------------------# + }#end if + return(rd) +}#end function dbh2rd +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function finds the trunk height. Currently this is based on the following # +# reference, which is for a site in Bolivia: # +# # +# Poorter L., L. Bongers, F. Bongers, 2006: Architecture of 54 moist-forest tree # +# species: traits, trade-offs, and functional groups. Ecology, 87, 1289-1301. # +#------------------------------------------------------------------------------------------# +h2crownbh = function (height,ipft){ + crown_length = pft$b1Cl[ipft] * height ^ pft$b2Cl[ipft] + h2crownbh = height - crown_length + + h2crownbh[is.finite(h2crowndbh) & h2crownbh < 0.05] = 0.05 + + return(h2crownbh) +}#end function h2crownbh +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function finds the leaf biomass for different plants. This is based on the # +# following papers: # +# # +# Cole, T. J., J. J. Ewel, 2006: Allometric equations for four valuable tropical tree # +# species. Forest Ecol. Management, 229, 351-360. # +# # +# Calvo-Alvarado, J. C., N. G. McDowell, R. H. Waring, 2008: Allometric relationships # +# predicting foliar biomass and leaf area:sapwood area ratio from tree height in five # +# Costa Rican rain forest species. Tree Physiol. 28, 1601-1608. # +#------------------------------------------------------------------------------------------# +dbh2bl.alt = function (dbh,genus){ + #----- Make genus case insensitive. ----------------------------------------------------# + genushere = tolower(genus) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Decide which equation to use based on the genus, or if it is to call ED-2.1, just # + # call the good old dbh2bl... # + #---------------------------------------------------------------------------------------# + if (genushere == "cedrela"){ + h = dbh2h(3,dbh) + x = dbh^2 * h + + small = is.finite(dbh) & dbh <= 10. + large = is.finite(dbh) & dbh > 10. + + bleaf = NA * dbh + bleaf[small] = 0.1265 / C2B * x[small] ^ 0.2787 + bleaf[large] = 0.0013 / C2B * x[large] ^ 0.9218 + + }else if(genushere == "cordia"){ + h = dbh2h(2,dbh) + x = dbh^2 * h + + small = is.finite(dbh) & dbh <= 5. + large = is.finite(dbh) & dbh > 5. + + bleaf = NA * dbh + bleaf[small] = 0.3041 / C2B * x[small] ^ 0.1082 + bleaf[large] = 0.0391 / C2B * x[large] ^ 0.5151 + + + }else if(genushere == "hyeronima"){ + h = dbh2h(4,dbh) + x = dbh^2 * h + + small = is.finite(dbh) & dbh <= 10. + large = is.finite(dbh) & dbh > 10. + + bleaf = NA * dbh + bleaf[small] = 0.2144 / C2B * x[small] ^ 0.2852 + bleaf[large] = 0.0094 / C2B * x[large] ^ 0.6910 + + }else if(genushere == "tetragastris"){ + bleaf = 0.040 / C2B * dbh ^ 1.737 + + }else if(genushere == "virola"){ + bleaf = 0.002 / C2B * dbh ^ 2.468 + + }else if(genushere == "carapa"){ + bleaf = 0.012 / C2B * dbh ^ 2.089 + + }else if(genushere == "vochysia"){ + bleaf = 0.673 / C2B * dbh ^ 1.058 + + }else if(genushere == "pentaclethra"){ + bleaf = 0.958 / C2B * dbh ^ 0.757 + + }else if(genushere == "grass"){ + bleaf = dbh2bl(dbh,1) + + }else if(genushere == "early"){ + bleaf = dbh2bl(dbh,2) + + }else if(genushere == "mid"){ + bleaf = dbh2bl(dbh,3) + + }else if(genushere == "late"){ + bleaf = dbh2bl(dbh,4) + + }else{ + stop (paste("Genus ",genus," wasn't found. ", + ,"Sorry, I can't find bleaf for this one...",sep="")) + }#end if + return(bleaf) +}#end function h2crownbh +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# We find the above-ground biomass based on dbh and wood density, following the # +# allometry proposed by: # +# # +# Baker, T. R., and co-authors, 2004: Variation in wood density determines spatial # +# patterns in Amazonian forest biomass. Global Change Biol., 10, 545-562. # +# # +# Chave, J., B. Riera, M.A. Dubois, 2001: Estimation of biomass in a neotropical forest of # +# French Guiana: spatial and temporal variability. J. Trop. Ecol., 17, 79-96. # +#------------------------------------------------------------------------------------------# +dbh2agb.baker <<- function(dbh,wdens,allom="baker.chave"){ + + + ln.dbh = log(dbh) + + + if (allom == "baker.chave"){ + #------ Use Chave's based function (equation 2, Baker et al., 2004). ----------------# + agb = wdens / 0.58 / C2B * exp(2.42 * ln.dbh - 2.00) + #------------------------------------------------------------------------------------# + }else if (allom == "baker.chambers"){ + #------ Use Chambers' function. -----------------------------------------------------# + agb = ( wdens / 0.67 / C2B + * exp(0.33 * ln.dbh + 0.933 * ln.dbh^2 - 0.122 * ln.dbh^3 - 0.37) ) + #------------------------------------------------------------------------------------# + }else if (allom == "chave.2006"){ + #------ Use Chambers' function. -----------------------------------------------------# + agb = ( wdens / C2B + * exp( -1.499 + 2.1481 * ln.dbh + 0.207 * ln.dbh^2 - 0.0281 * ln.dbh^3 ) ) + #------------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------------# + return(agb) +}#end if +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/amazonmap.r b/R-utils/amazonmap.r new file mode 100644 index 000000000..0d3216c02 --- /dev/null +++ b/R-utils/amazonmap.r @@ -0,0 +1,64 @@ +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +# This function plots the map for the Amazon forest. # +#------------------------------------------------------------------------------------------# +amazonmap = function(mapdir=NULL,...){ + if (is.null(mapdir)){ + fichier = file.path(srcdir,"amzmap","amazon.forest.txt") + }else{ + fichier = file.path(mapdir,"amazon.forest.txt") + }#end if + the.amazon = read.table(fichier,na.string="NA") + names(the.amazon) = c("x","y") + lines(x=the.amazon,...) +} #end function +#------------------------------------------------------------------------------------------# + + + + + +#------------------------------------------------------------------------------------------# +# This function plots the map for the Amazon forest. This is useful for when running # +# lattice package. # +#------------------------------------------------------------------------------------------# +panel.amazonmap = function(mapdir=NULL,...){ + if (is.null(mapdir)){ + fichier = file.path(srcdir,"amzmap","amazon.forest.txt") + }else{ + fichier = file.path(mapdir,"amazon.forest.txt") + }#end if + the.amazon = read.table(fichier,na.string="NA") + names(the.amazon) = c("x","y") + panel.points(x=the.amazon,type="l",...) +} #end function +#------------------------------------------------------------------------------------------# + + + + + +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +# This function plots the map for the Amazon forest in 3D maps. # +#------------------------------------------------------------------------------------------# +amazonmap3d = function(height=0,pmat,xlim=NULL,ylim=NULL,mapdir=NULL,...){ + + if (is.null(mapdir)){ + fichier = file.path(srcdir,"amzmap","amazon.forest.txt") + }else{ + fichier = file.path(mapdir,"amazon.forest.txt") + }#end if + the.amazon = read.table(fichier,na.string="NA") + names(the.amazon) = c("x","y") + if (! is.null(xlim)){ + sel = the.amazon$x >= xlim[1] & the.amazon$x <= xlim[2] + the.amazon = the.amazon[sel,] + }#end if + if (! is.null(ylim)){ + sel = the.amazon$y >= ylim[1] & the.amazon$y <= ylim[2] + the.amazon = the.amazon[sel,] + }#end if + lines(trans3d(x=the.amazon$x,y=the.amazon$y,z=height,pmat),...) +} #end function +#------------------------------------------------------------------------------------------# diff --git a/R-utils/amzmap/amazon.forest.txt b/R-utils/amzmap/amazon.forest.txt new file mode 100644 index 000000000..1f82b1645 --- /dev/null +++ b/R-utils/amzmap/amazon.forest.txt @@ -0,0 +1,6517 @@ + -46.0895233 -1.0954802 + -46.0811691 -1.1107852 + -46.0790825 -1.1160530 + -46.0731964 -1.1212068 + -46.0644264 -1.1246488 + -46.0622482 -1.1325692 + -46.0640182 -1.1405407 + -46.0676689 -1.1474912 + -46.0898170 -1.1705784 + -46.0955086 -1.1806928 + -46.0974846 -1.1886681 + -46.0960960 -1.1997371 + -46.0976868 -1.2054055 + -46.1032600 -1.2086152 + -46.1068764 -1.2091533 + -46.1248283 -1.2118225 + -46.1374207 -1.2184699 + -46.1429596 -1.2241890 + -46.1504822 -1.2374647 + -46.1516609 -1.2427098 + -46.1494560 -1.2529324 + -46.1500168 -1.2579604 + -46.1448250 -1.2574753 + -46.1457977 -1.2514344 + -46.1436501 -1.2462778 + -46.1386147 -1.2559608 + -46.1381454 -1.2435822 + -46.1363411 -1.2383293 + -46.1248627 -1.2294308 + -46.1207619 -1.2292105 + -46.1054993 -1.2285175 + -46.0968399 -1.2231755 + -46.0875893 -1.2151074 + -46.0817795 -1.2144047 + -46.0790215 -1.2189705 + -46.0729408 -1.2067587 + -46.0688400 -1.2025218 + -46.0699692 -1.1954237 + -46.0683517 -1.1918472 + -46.0619698 -1.1871619 + -46.0535583 -1.1623696 + -46.0500679 -1.1591858 + -46.0454712 -1.1610090 + -46.0426140 -1.1567883 + -46.0453873 -1.1511767 + -46.0400047 -1.1496421 + -46.0395508 -1.1362492 + -46.0360565 -1.1334842 + -46.0326347 -1.1409700 + -46.0268669 -1.1371300 + -46.0261116 -1.1310536 + -46.0183868 -1.1177753 + -46.0175095 -1.1052134 + -46.0199547 -1.0926951 + -46.0179443 -1.0874400 + -46.0135918 -1.0863372 + -46.0052948 -1.1017077 + -46.0039749 -1.1073382 + -46.0070305 -1.1121886 + -46.0000000 -1.1178335 + -45.9964714 -1.1148094 + -45.9927292 -1.0989804 + -45.9956093 -1.0842611 + -45.9902420 -1.0760446 + -45.9822960 -1.0705588 + -45.9768524 -1.0761054 + -45.9640884 -1.0784799 + -45.9597778 -1.0828708 + -45.9629974 -1.0869858 + -45.9673347 -1.0876487 + -45.9662399 -1.0956957 + -45.9592361 -1.1074542 + -45.9603958 -1.1111230 + -45.9652214 -1.1166070 + -45.9758186 -1.1160536 + -45.9734573 -1.1202334 + -45.9750710 -1.1236691 + -45.9794235 -1.1263999 + -45.9778519 -1.1305442 + -45.9824638 -1.1392460 + -45.9829483 -1.1440672 + -45.9783783 -1.1427169 + -45.9664536 -1.1324515 + -45.9616547 -1.1315613 + -45.9530716 -1.1467761 + -45.9626656 -1.1487857 + -45.9693336 -1.1574750 + -45.9864883 -1.1642625 + -45.9905968 -1.1644675 + -45.9928284 -1.1612784 + -46.0000000 -1.1510472 + -46.0000000 -1.1733812 + -45.9936218 -1.1750174 + -45.9922752 -1.1789310 + -45.9900169 -1.1826209 + -45.9982567 -1.1869352 + -46.0000000 -1.1987405 + -46.0000000 -1.2087785 + -45.9896965 -1.2065156 + -45.9794464 -1.2093354 + -45.9710045 -1.2098459 + -45.9625854 -1.2142628 + -45.9573746 -1.2209568 + -45.9571762 -1.2260122 + -45.9588127 -1.2326654 + -45.9579506 -1.2418609 + -45.9641685 -1.2517022 + -45.9561882 -1.2526700 + -45.9500122 -1.2501801 + -45.9472580 -1.2472100 + -45.9455795 -1.2332050 + -45.9435005 -1.2288518 + -45.9389305 -1.2281908 + -45.9348030 -1.2247686 + -45.9425240 -1.2178303 + -45.9443245 -1.2134542 + -45.9322701 -1.1802138 + -45.9274521 -1.1758773 + -45.9176216 -1.1574647 + -45.9050789 -1.1339699 + -45.8924370 -1.1577086 + -45.8947487 -1.1634377 + -45.9128799 -1.1817088 + -45.9195671 -1.1940747 + -45.9106903 -1.1980336 + -45.9188881 -1.2089558 + -45.9228783 -1.2142725 + -45.9201584 -1.2175056 + -45.9165115 -1.2184459 + -45.9094086 -1.2132045 + -45.9059219 -1.2017381 + -45.9067841 -1.1932327 + -45.9044762 -1.1881921 + -45.8879242 -1.1671548 + -45.8822174 -1.1664994 + -45.8758278 -1.1665374 + -45.8790932 -1.1791536 + -45.8857460 -1.1855470 + -45.8869171 -1.1908240 + -45.8931770 -1.1987926 + -45.8855858 -1.1977237 + -45.8791924 -1.1963835 + -45.8726540 -1.2108967 + -45.8756561 -1.2168521 + -45.8839264 -1.2271414 + -45.8972092 -1.2353336 + -45.9038658 -1.2417270 + -45.9101143 -1.2573130 + -45.9062538 -1.2607818 + -45.9018974 -1.2569025 + -45.8981323 -1.2508245 + -45.8883629 -1.2443466 + -45.8794098 -1.2349801 + -45.8705025 -1.2343440 + -45.8629494 -1.2297943 + -45.8586197 -1.2314276 + -45.8630028 -1.2394433 + -45.8726463 -1.2497245 + -45.8694725 -1.2541089 + -45.8619003 -1.2463421 + -45.8617249 -1.2555339 + -45.8816795 -1.2737958 + -45.8918152 -1.2900481 + -45.8805809 -1.2813839 + -45.8773766 -1.2797952 + -45.8707581 -1.2793751 + -45.8652916 -1.2814753 + -45.8523827 -1.2585763 + -45.8462677 -1.2369921 + -45.8423729 -1.2232529 + -45.8421097 -1.2170517 + -45.8447952 -1.2076157 + -45.8422661 -1.2041850 + -45.8379555 -1.2090349 + -45.8291092 -1.2180471 + -45.8291740 -1.2302231 + -45.8248596 -1.2336956 + -45.8241997 -1.2382944 + -45.8279305 -1.2525172 + -45.8217430 -1.2481877 + -45.8196487 -1.2403888 + -45.8202705 -1.2295866 + -45.8216591 -1.2227033 + -45.8255997 -1.2031339 + -45.8294258 -1.1930027 + -45.8271141 -1.1879619 + -45.8202553 -1.1854755 + -45.8106232 -1.1770314 + -45.8065109 -1.1759074 + -45.8058815 -1.1860192 + -45.8105011 -1.1963304 + -45.7974968 -1.1966367 + -45.8048515 -1.2057832 + -45.8069534 -1.2145013 + -45.8074036 -1.2216315 + -45.8082008 -1.2342530 + -45.8121452 -1.2454873 + -45.8158226 -1.2505205 + -45.8170128 -1.2587843 + -45.8250351 -1.2656299 + -45.8273468 -1.2704414 + -45.8257790 -1.2761948 + -45.8290062 -1.2819200 + -45.8351898 -1.2855598 + -45.8379707 -1.2931250 + -45.8425407 -1.2942467 + -45.8428040 -1.3006787 + -45.8382645 -1.3048414 + -45.8351326 -1.3165783 + -45.8294373 -1.3184500 + -45.8249092 -1.3249096 + -45.8160286 -1.3286389 + -45.8096275 -1.3266081 + -45.8241806 -1.3171021 + -45.8273468 -1.3131728 + -45.8314362 -1.3080984 + -45.8325500 -1.3034968 + -45.8311501 -1.2977605 + -45.8256264 -1.2892919 + -45.8118629 -1.2769661 + -45.8099747 -1.2659488 + -45.8008499 -1.2666916 + -45.7946739 -1.2637411 + -45.7889671 -1.2633147 + -45.7862396 -1.2658578 + -45.7842560 -1.2780466 + -45.7796440 -1.2700323 + -45.7811928 -1.2610620 + -45.7861710 -1.2529918 + -45.7793236 -1.2532617 + -45.7774811 -1.2498263 + -45.7799263 -1.2383243 + -45.7722969 -1.2199887 + -45.7731743 -1.2135503 + -45.7704124 -1.2098901 + -45.7649803 -1.2177336 + -45.7586098 -1.2214465 + -45.7565422 -1.2184715 + -45.7610359 -1.2055801 + -45.7504425 -1.1886401 + -45.7483597 -1.1833686 + -45.7496948 -1.1769280 + -45.7451859 -1.1756991 + -45.7376137 -1.1792948 + -45.7354469 -1.1584015 + -45.7378883 -1.1462108 + -45.7360420 -1.1420870 + -45.7308006 -1.1434953 + -45.7307701 -1.1379821 + -45.7264175 -1.1347909 + -45.7023125 -1.1496326 + -45.6993675 -1.1540145 + -45.7026672 -1.1797818 + -45.7261658 -1.2138226 + -45.7271652 -1.2298995 + -45.7322311 -1.2381412 + -45.7393379 -1.2445338 + -45.7425652 -1.2497991 + -45.7384796 -1.2539586 + -45.7308846 -1.2427442 + -45.7267761 -1.2420789 + -45.7168312 -1.2573280 + -45.7041092 -1.2709290 + -45.7025490 -1.2773712 + -45.7084160 -1.3074366 + -45.7120895 -1.3115511 + -45.7200966 -1.3147218 + -45.7221680 -1.3181562 + -45.7201385 -1.3229928 + -45.7123528 -1.3179833 + -45.7059784 -1.3210064 + -45.6984367 -1.3189822 + -45.6933098 -1.3417590 + -45.6878738 -1.3496019 + -45.6938248 -1.3523248 + -45.7004623 -1.3559637 + -45.7027817 -1.3626137 + -45.7040176 -1.3800701 + -45.7040749 -1.3906395 + -45.6997871 -1.3996252 + -45.6922951 -1.4070213 + -45.6898155 -1.4127805 + -45.6893768 -1.4164594 + -45.6935081 -1.4208016 + -45.6942215 -1.4256229 + -45.6940689 -1.4396409 + -45.6934319 -1.4488363 + -45.6902542 -1.4518421 + -45.6859016 -1.4493387 + -45.6837997 -1.4406188 + -45.6858253 -1.4334041 + -45.6871605 -1.4286505 + -45.6811180 -1.4086933 + -45.6838417 -1.4054614 + -45.6888542 -1.4042839 + -45.6940765 -1.3991989 + -45.6972351 -1.3925170 + -45.6969376 -1.3796506 + -45.6944084 -1.3757589 + -45.6759033 -1.3728778 + -45.6564980 -1.3718395 + -45.6517296 -1.3764616 + -45.6478539 -1.3776326 + -45.6383438 -1.3756379 + -45.6318436 -1.3712904 + -45.6210022 -1.3502117 + -45.6182022 -1.3387386 + -45.6190643 -1.3286244 + -45.6242371 -1.3145794 + -45.6248856 -1.3076826 + -45.6217957 -1.2849535 + -45.6176567 -1.2785432 + -45.6018791 -1.2728876 + -45.5959663 -1.2772870 + -45.5859222 -1.2768840 + -45.5845871 -1.2828645 + -45.5910378 -1.2943169 + -45.5976715 -1.2974962 + -45.6036072 -1.2979219 + -45.6002197 -1.3046043 + -45.5931511 -1.3055634 + -45.5912056 -1.3260232 + -45.5870399 -1.3157074 + -45.5858536 -1.3065238 + -45.5796890 -1.2961333 + -45.5752602 -1.2886606 + -45.5674477 -1.2790544 + -45.5614891 -1.2738034 + -45.5560150 -1.2749821 + -45.5562706 -1.2795765 + -45.5512390 -1.2777659 + -45.5434418 -1.2709163 + -45.5366058 -1.2727923 + -45.5355034 -1.2799214 + -45.5311928 -1.2847700 + -45.5346413 -1.2895762 + -45.5392075 -1.2902403 + -45.5428467 -1.2876925 + -45.5480919 -1.2869741 + -45.5540543 -1.2926853 + -45.5561409 -1.2986476 + -45.5539360 -1.3131351 + -45.5546875 -1.3259975 + -45.5496559 -1.3241876 + -45.5457230 -1.3143289 + -45.5415916 -1.3097568 + -45.5377121 -1.3093189 + -45.5352249 -1.3143876 + -45.5359383 -1.3194381 + -45.5403252 -1.3295234 + -45.5433083 -1.3322644 + -45.5577049 -1.3360904 + -45.5607071 -1.3427372 + -45.5563889 -1.3457484 + -45.5527916 -1.3563379 + -45.5489311 -1.3602653 + -45.5486641 -1.3524553 + -45.5474586 -1.3457227 + -45.5433578 -1.3421446 + -45.5342255 -1.3412763 + -45.5289497 -1.3364798 + -45.5263824 -1.3252350 + -45.5233917 -1.3208867 + -45.5197449 -1.3215957 + -45.5177155 -1.3264316 + -45.5127106 -1.3294469 + -45.5148125 -1.3386257 + -45.5226250 -1.3486929 + -45.5134850 -1.3466756 + -45.5096283 -1.3515220 + -45.5101089 -1.3561147 + -45.5133400 -1.3629897 + -45.5108604 -1.3692075 + -45.5170364 -1.3824016 + -45.5244789 -1.3983147 + -45.5318146 -1.4042479 + -45.5436630 -1.4002767 + -45.5502777 -1.3993208 + -45.5651207 -1.4006170 + -45.5669746 -1.4056616 + -45.5582886 -1.4036415 + -45.5350571 -1.4134219 + -45.5435143 -1.4152128 + -45.5497017 -1.4197745 + -45.5467606 -1.4280504 + -45.5433121 -1.4202701 + -45.5401077 -1.4186789 + -45.5316772 -1.4214830 + -45.5264130 -1.4189842 + -45.5101166 -1.4016106 + -45.5080185 -1.3931202 + -45.5025139 -1.3880956 + -45.5006638 -1.3830501 + -45.4926567 -1.3798770 + -45.4880638 -1.3746177 + -45.4756508 -1.3512824 + -45.4812508 -1.3365126 + -45.4814568 -1.3321453 + -45.4578743 -1.3180290 + -45.4246788 -1.2979892 + -45.4383850 -1.3002131 + -45.4431725 -1.2990382 + -45.4532394 -1.3042681 + -45.4538918 -1.2978307 + -45.4465637 -1.2932758 + -45.4307938 -1.2885362 + -45.4237289 -1.2904122 + -45.4173355 -1.2897578 + -45.4125748 -1.2959864 + -45.4091949 -1.3049656 + -45.4164772 -1.3458254 + -45.4197083 -1.3531606 + -45.4270401 -1.3586355 + -45.4356880 -1.3550287 + -45.4460335 -1.3681831 + -45.4549179 -1.3649178 + -45.4599419 -1.3653507 + -45.4652061 -1.3678490 + -45.4691086 -1.3724238 + -45.4755821 -1.3882432 + -45.4807396 -1.4148692 + -45.4839478 -1.4171494 + -45.4860344 -1.4233431 + -45.4879456 -1.4398770 + -45.4875603 -1.4494051 + -45.4869347 -1.4649297 + -45.4890327 -1.4734206 + -45.4927025 -1.4768478 + -45.4988480 -1.4735965 + -45.5069885 -1.4586154 + -45.5110931 -1.4576737 + -45.5239334 -1.4690920 + -45.5407219 -1.4924390 + -45.5519333 -1.4976622 + -45.5540161 -1.5029356 + -45.5460129 -1.5006824 + -45.5366478 -1.4995854 + -45.5155106 -1.4735054 + -45.5107002 -1.4703144 + -45.5065994 -1.4712560 + -45.5018616 -1.4820822 + -45.4914322 -1.4961578 + -45.4939613 -1.4998198 + -45.5067596 -1.5027372 + -45.5120316 -1.5066149 + -45.5175591 -1.5162363 + -45.4937782 -1.5085534 + -45.4806976 -1.4952972 + -45.4775124 -1.4971529 + -45.4736748 -1.5056767 + -45.4661560 -1.5087048 + -45.4625511 -1.5181460 + -45.4624138 -1.5353826 + -45.4722404 -1.5376273 + -45.4768257 -1.5415087 + -45.4629326 -1.5475595 + -45.4555779 -1.5379472 + -45.4529800 -1.5209558 + -45.4549904 -1.5124425 + -45.4635735 -1.4949305 + -45.4651222 -1.4850407 + -45.4588852 -1.4705977 + -45.4588356 -1.4611766 + -45.4567604 -1.4570521 + -45.4528732 -1.4556943 + -45.4422760 -1.4364489 + -45.4393272 -1.4337227 + -45.4258041 -1.4291850 + -45.4219437 -1.4335723 + -45.4277534 -1.4539920 + -45.4358292 -1.4707229 + -45.4314957 -1.4709765 + -45.4280548 -1.4682378 + -45.4105835 -1.4437441 + -45.4093857 -1.4327203 + -45.4073067 -1.4276763 + -45.4043274 -1.4253948 + -45.3988762 -1.4293510 + -45.3943329 -1.4348693 + -45.3876762 -1.4277817 + -45.3945084 -1.4247577 + -45.3889465 -1.4084729 + -45.3834648 -1.4078130 + -45.3804855 -1.4048417 + -45.3795280 -1.3965743 + -45.3826675 -1.3852985 + -45.3817368 -1.3816270 + -45.3764763 -1.3791274 + -45.3695908 -1.3718112 + -45.3594742 -1.3569300 + -45.3535233 -1.3537445 + -45.3557587 -1.3463120 + -45.3643646 -1.3307103 + -45.3629646 -1.3252025 + -45.3592834 -1.3192487 + -45.3537903 -1.3156011 + -45.3391762 -1.3140705 + -45.3307381 -1.3154939 + -45.3234520 -1.3192087 + -45.3191376 -1.3233675 + -45.3157806 -1.3367118 + -45.3094025 -1.3399614 + -45.3062401 -1.3459529 + -45.3052025 -1.3697476 + -45.3050079 -1.3742217 + -45.3001213 -1.4013613 + -45.3020554 -1.4236395 + -45.3045845 -1.4268438 + -45.3073082 -1.4240714 + -45.3088799 -1.4183193 + -45.3141556 -1.4240360 + -45.3169861 -1.4421746 + -45.3252335 -1.4485649 + -45.3425331 -1.4583759 + -45.3561401 -1.4660949 + -45.3803864 -1.4763070 + -45.3916168 -1.4849786 + -45.3992233 -1.4996448 + -45.3953552 -1.5021940 + -45.3912048 -1.4937130 + -45.3756180 -1.4811577 + -45.3678665 -1.4828079 + -45.3596344 -1.4803240 + -45.3564758 -1.4874645 + -45.3620377 -1.5044396 + -45.3800545 -1.5463977 + -45.3828125 -1.5498306 + -45.3921623 -1.5479420 + -45.3978806 -1.5497491 + -45.4057884 -1.5788933 + -45.4045830 -1.5837567 + -45.4012756 -1.5897188 + -45.3994179 -1.5830638 + -45.3949280 -1.5534426 + -45.3878708 -1.5569272 + -45.3798981 -1.5601871 + -45.3684502 -1.5540438 + -45.3402061 -1.5668335 + -45.3377190 -1.5721322 + -45.3437233 -1.5854292 + -45.3392029 -1.5944164 + -45.3421936 -1.5996855 + -45.3479233 -1.6040218 + -45.3497734 -1.6083788 + -45.3457489 -1.6256368 + -45.3466835 -1.6299980 + -45.3519478 -1.6324984 + -45.3527222 -1.6499609 + -45.3557434 -1.6605171 + -45.3681870 -1.6834329 + -45.3650017 -1.6859784 + -45.3643570 -1.6935658 + -45.3711205 -1.7222593 + -45.3659210 -1.7323999 + -45.3541183 -1.7467128 + -45.3481979 -1.7501915 + -45.3377113 -1.7534657 + -45.3246918 -1.7530744 + -45.3173866 -1.7535723 + -45.2947502 -1.7472562 + -45.2844658 -1.7459307 + -45.2805901 -1.7471001 + -45.2723312 -1.7388687 + -45.2752838 -1.7356355 + -45.2731552 -1.7211673 + -45.2758331 -1.7080531 + -45.2748985 -1.7036908 + -45.2600250 -1.6971031 + -45.2522392 -1.6925471 + -45.2412796 -1.6928335 + -45.2337303 -1.6901146 + -45.2239075 -1.6894752 + -45.2104607 -1.6946009 + -45.2058907 -1.6937051 + -45.1974182 -1.6882327 + -45.2222862 -1.6846577 + -45.2261467 -1.6798112 + -45.2336082 -1.6648337 + -45.2440643 -1.6555870 + -45.2481232 -1.6445345 + -45.2537842 -1.6348526 + -45.2606125 -1.6311395 + -45.2600899 -1.6173532 + -45.2607117 -1.6053072 + -45.2558784 -1.5966913 + -45.2523613 -1.5771755 + -45.2479706 -1.5661674 + -45.2383232 -1.5542675 + -45.2309914 -1.5487895 + -45.2266464 -1.5478927 + -45.2030144 -1.5227360 + -45.1993675 -1.5245926 + -45.1873283 -1.5366040 + -45.1835709 -1.5152519 + -45.1789627 -1.5058532 + -45.1732178 -1.4982992 + -45.1713448 -1.4881979 + -45.1603241 -1.4751557 + -45.1553040 -1.4754108 + -45.1507721 -1.4827868 + -45.1433907 -1.5147662 + -45.1404457 -1.5191476 + -45.1358910 -1.5214691 + -45.1338005 -1.5141261 + -45.1341934 -1.5010250 + -45.1320839 -1.4893161 + -45.1300163 -1.4863389 + -45.1192665 -1.4820265 + -45.1096458 -1.4747220 + -45.0986214 -1.4605300 + -45.0913391 -1.4649322 + -45.0833778 -1.4711761 + -45.0859299 -1.4798958 + -45.1055527 -1.4824712 + -45.1145020 -1.4880255 + -45.1170387 -1.4937574 + -45.1120338 -1.4974593 + -45.1056061 -1.4899088 + -45.0914536 -1.4897496 + -45.0845909 -1.4867960 + -45.0816040 -1.4824448 + -45.0788269 -1.4741861 + -45.0794716 -1.4656807 + -45.0844193 -1.4502598 + -45.0839386 -1.4447472 + -45.0820808 -1.4380932 + -45.0786400 -1.4339736 + -45.0747528 -1.4330742 + -45.0715675 -1.4349283 + -45.0714188 -1.4410682 + -45.0709915 -1.4588293 + -45.0694427 -1.4694071 + -45.0717773 -1.4801962 + -45.0702057 -1.4854891 + -45.0661087 -1.4887267 + -45.0581245 -1.4894556 + -45.0542717 -1.4954497 + -45.0438004 -1.5019352 + -45.0351257 -1.5019779 + -45.0202560 -1.4951571 + -45.0143166 -1.4942670 + -45.0065689 -1.4975221 + -45.0000000 -1.5037634 + -44.9964218 -1.5251480 + -45.0000000 -1.5288035 + -45.0048904 -1.5294726 + -45.0267639 -1.5206335 + -45.0283852 -1.5254511 + -45.0213318 -1.5303119 + -45.0211220 -1.5349084 + -45.0170326 -1.5386062 + -45.0191078 -1.5436515 + -45.0175285 -1.5473360 + -45.0090675 -1.5448495 + -45.0033722 -1.5474048 + -44.9859276 -1.5358723 + -44.9807167 -1.5353360 + -44.9720726 -1.5422719 + -44.9686813 -1.5489528 + -44.9675713 -1.5565420 + -44.9692039 -1.5638877 + -44.9728737 -1.5673174 + -44.9811096 -1.5709543 + -44.9879570 -1.5709205 + -45.0012398 -1.5800490 + -45.0051231 -1.5804896 + -45.0135574 -1.5776905 + -45.0172119 -1.5779023 + -45.0224876 -1.5833919 + -45.0293350 -1.5833579 + -45.0270767 -1.5884252 + -45.0257301 -1.5934876 + -45.0279579 -1.6001171 + -45.0207367 -1.6001766 + -45.0175018 -1.5912299 + -45.0138283 -1.5868819 + -45.0101776 -1.5875887 + -45.0040436 -1.5938238 + -44.9985504 -1.5906332 + -44.9794464 -1.6070428 + -44.9773788 -1.6040658 + -44.9787254 -1.5992329 + -44.9852829 -1.5898180 + -44.9850540 -1.5856429 + -44.9768219 -1.5826949 + -44.9662781 -1.5728642 + -44.9554558 -1.5524634 + -44.9545135 -1.5464936 + -44.9624214 -1.5278412 + -44.9605141 -1.5103854 + -44.9532166 -1.5122585 + -44.9486275 -1.5063059 + -44.9536362 -1.5035244 + -44.9536247 -1.4984003 + -44.9444962 -1.5017300 + -44.9403877 -1.5022095 + -44.9330750 -1.5001762 + -44.9316788 -1.4939779 + -44.9378433 -1.4944086 + -44.9332123 -1.4799532 + -44.9171753 -1.4667021 + -44.9181213 -1.4745103 + -44.9142418 -1.4749888 + -44.9121323 -1.4625900 + -44.8938141 -1.4495792 + -44.8916817 -1.4456819 + -44.8855286 -1.4344525 + -44.8779640 -1.4271348 + -44.8726997 -1.4241724 + -44.8660774 -1.4230552 + -44.8624382 -1.4258296 + -44.8645096 -1.4299556 + -44.8554306 -1.4414883 + -44.8538666 -1.4495378 + -44.8575897 -1.4653757 + -44.8540230 -1.4849257 + -44.8584213 -1.4989225 + -44.8633194 -1.4947079 + -44.8654633 -1.4910760 + -44.8712006 -1.4981729 + -44.8771133 -1.4928595 + -44.8837242 -1.4903008 + -44.8898849 -1.4898114 + -44.8919525 -1.4932486 + -44.8876305 -1.4962566 + -44.8791924 -1.4979050 + -44.8803596 -1.5038745 + -44.8856049 -1.5029305 + -44.8883743 -1.5098113 + -44.9041672 -1.5191578 + -44.9135399 -1.5221008 + -44.9019051 -1.5237651 + -44.9006004 -1.5283569 + -44.9035530 -1.5345581 + -44.9136429 -1.5448515 + -44.9230270 -1.5503212 + -44.9246445 -1.5546799 + -44.9226456 -1.5673295 + -44.9252129 -1.5792673 + -44.9178009 -1.6071097 + -44.9198799 -1.6123861 + -44.9314995 -1.6072739 + -44.9367676 -1.6109262 + -44.9415398 -1.6058471 + -44.9447784 -1.6039462 + -44.9518013 -1.6028098 + -44.9529610 -1.6071713 + -44.9486275 -1.6081111 + -44.9440765 -1.6111207 + -44.9377251 -1.6201140 + -44.9268150 -1.6316575 + -44.9254646 -1.6360310 + -44.9197884 -1.6427222 + -44.9182167 -1.6487052 + -44.9205170 -1.6530614 + -44.9257812 -1.6557941 + -44.9383507 -1.6582614 + -44.9440460 -1.6554768 + -44.9547729 -1.6547351 + -44.9648323 -1.6569852 + -44.9682770 -1.6615652 + -44.9653206 -1.6638776 + -44.9609833 -1.6643583 + -44.9527435 -1.6602607 + -44.9409065 -1.6676726 + -44.9315224 -1.6624312 + -44.9175797 -1.6597399 + -44.9125443 -1.6570060 + -44.9111519 -1.6519570 + -44.9156685 -1.6406738 + -44.9229279 -1.6305267 + -44.9265366 -1.6201676 + -44.9167137 -1.6192958 + -44.9061966 -1.6161284 + -44.8958931 -1.6092830 + -44.8856201 -1.6093313 + -44.8815193 -1.6116496 + -44.8776169 -1.6164552 + -44.8740273 -1.6208776 + -44.8692818 -1.6321607 + -44.8644981 -1.6344817 + -44.8608742 -1.6409338 + -44.8558693 -1.6450939 + -44.8447037 -1.6499729 + -44.8358040 -1.6513939 + -44.8330879 -1.6573813 + -44.8353958 -1.6621970 + -44.8420410 -1.6681411 + -44.8411598 -1.6750410 + -44.8375053 -1.6750581 + -44.8333778 -1.6711700 + -44.8224220 -1.6719102 + -44.8242264 -1.6670756 + -44.8303909 -1.6668172 + -44.8268967 -1.6505157 + -44.8291588 -1.6456795 + -44.8362312 -1.6447266 + -44.8410110 -1.6417167 + -44.8462601 -1.6407728 + -44.8528404 -1.6315486 + -44.8555450 -1.6239522 + -44.8548355 -1.6177504 + -44.8458672 -1.6033139 + -44.8426247 -1.5927581 + -44.8407364 -1.5785180 + -44.8216133 -1.5907875 + -44.8130531 -1.6174864 + -44.8142242 -1.6243751 + -44.8222389 -1.6303129 + -44.8256950 -1.6371921 + -44.8176842 -1.6328627 + -44.8087692 -1.6303757 + -44.8066902 -1.6246396 + -44.8109741 -1.6119800 + -44.8075294 -1.6078596 + -44.8037415 -1.6116598 + -44.7941628 -1.6313632 + -44.7951088 -1.6389426 + -44.7980995 -1.6444447 + -44.8102570 -1.6572585 + -44.8118706 -1.6604681 + -44.8118896 -1.6652948 + -44.8080406 -1.6731266 + -44.8018799 -1.6733847 + -44.7986870 -1.6750085 + -44.7918739 -1.6830842 + -44.7864037 -1.6854075 + -44.7830009 -1.6902500 + -44.7850685 -1.6934575 + -44.7912407 -1.6950383 + -44.7999382 -1.7002844 + -44.8008728 -1.7048761 + -44.7979736 -1.7205185 + -44.7952499 -1.7244381 + -44.7886391 -1.7272271 + -44.7772636 -1.7369329 + -44.7777519 -1.7438259 + -44.7823257 -1.7456429 + -44.7948875 -1.7460444 + -44.8010597 -1.7476245 + -44.8063698 -1.7616205 + -44.8161774 -1.7583576 + -44.8189430 -1.7643204 + -44.8253365 -1.7645204 + -44.8326530 -1.7667848 + -44.8255997 -1.7725637 + -44.8201180 -1.7721294 + -44.8130150 -1.7666466 + -44.8073196 -1.7694305 + -44.8029785 -1.7687612 + -44.7944984 -1.7616758 + -44.7901268 -1.7545710 + -44.7860069 -1.7525216 + -44.7782402 -1.7518672 + -44.7741203 -1.7495881 + -44.7697563 -1.7436324 + -44.7685928 -1.7381220 + -44.7710762 -1.7316751 + -44.7781258 -1.7249775 + -44.7838364 -1.7254102 + -44.7870140 -1.7205693 + -44.7787743 -1.7164698 + -44.7726250 -1.7162691 + -44.7621498 -1.7268891 + -44.7436829 -1.7336386 + -44.7281494 -1.7325604 + -44.7187424 -1.7218006 + -44.7144051 -1.7220503 + -44.7119064 -1.7245898 + -44.7112350 -1.7285005 + -44.7151642 -1.7392848 + -44.7229919 -1.7544184 + -44.7264328 -1.7583107 + -44.7321510 -1.7605830 + -44.7351608 -1.7692661 + -44.7392845 -1.7731919 + -44.7495651 -1.7745234 + -44.7568855 -1.7777082 + -44.7706451 -1.7907462 + -44.7768211 -1.7932462 + -44.7962456 -1.7968340 + -44.7994499 -1.7984276 + -44.8049583 -1.8046085 + -44.8109016 -1.8054994 + -44.8205185 -1.8118913 + -44.8196373 -1.8194799 + -44.8093529 -1.8174593 + -44.8013229 -1.8087624 + -44.7949104 -1.8046548 + -44.7642899 -1.7995096 + -44.7533340 -1.8009388 + -44.7430191 -1.7917919 + -44.7382164 -1.7908942 + -44.7284050 -1.7927781 + -44.7355309 -1.8030887 + -44.7261620 -1.8024416 + -44.7059097 -1.8188525 + -44.7013359 -1.8177240 + -44.6912613 -1.8113334 + -44.6764030 -1.8077232 + -44.6568222 -1.7671278 + -44.6561165 -1.7625340 + -44.6576881 -1.7558620 + -44.6566963 -1.7370195 + -44.6612244 -1.7271158 + -44.6502762 -1.7301531 + -44.6361580 -1.7400986 + -44.6231461 -1.7408456 + -44.6037712 -1.7492049 + -44.6012764 -1.7533536 + -44.6170731 -1.7633963 + -44.6248550 -1.7710147 + -44.6292267 -1.7752949 + -44.6423187 -1.7936242 + -44.6441650 -1.7989026 + -44.6389923 -1.8177732 + -44.6403999 -1.8265007 + -44.6438484 -1.8329221 + -44.6472893 -1.8361241 + -44.6653671 -1.8452382 + -44.6674385 -1.8491361 + -44.6642532 -1.8514485 + -44.6573906 -1.8487214 + -44.6347809 -1.8350471 + -44.6241913 -1.8286414 + -44.6164246 -1.8282160 + -44.6098251 -1.8333024 + -44.6053085 -1.8459636 + -44.6067047 -1.8523937 + -44.6060410 -1.8574529 + -44.6007881 -1.8577063 + -44.5973282 -1.8492168 + -44.5966148 -1.8423240 + -44.6024971 -1.8289669 + -44.5937958 -1.8225691 + -44.5864601 -1.8163950 + -44.5825806 -1.8168721 + -44.5789413 -1.8205658 + -44.5769920 -1.8258088 + -44.5732956 -1.8357604 + -44.5717278 -1.8440422 + -44.5738258 -1.8536869 + -44.5786476 -1.8601018 + -44.5882607 -1.8655760 + -44.5862350 -1.8729409 + -44.5791359 -1.8686042 + -44.5669785 -1.8553259 + -44.5589638 -1.8498441 + -44.5557213 -1.8390547 + -44.5522728 -1.8330933 + -44.5472374 -1.8305866 + -44.5429115 -1.8333638 + -44.5396500 -1.8378272 + -44.5338402 -1.8494927 + -44.5331955 -1.8593791 + -44.5366554 -1.8676393 + -44.5465012 -1.8744923 + -44.5611420 -1.8799452 + -44.5705338 -1.8874904 + -44.5785255 -1.8869958 + -44.5840149 -1.8883506 + -44.5867729 -1.8929362 + -44.5963974 -1.9009389 + -44.6007729 -1.9091949 + -44.5994148 -1.9128786 + -44.5906792 -1.9103677 + -44.5875053 -1.9048853 + -44.5838509 -1.9046715 + -44.5765610 -1.9095305 + -44.5692596 -1.9104813 + -44.5626259 -1.9084415 + -44.5500336 -1.9011408 + -44.5415916 -1.9025567 + -44.5363197 -1.8979824 + -44.5173988 -1.9074873 + -44.5128860 -1.9206090 + -44.5115700 -1.9344068 + -44.5072975 -1.9468613 + -44.5018616 -1.9627222 + -44.5041656 -1.9677695 + -44.5110207 -1.9686596 + -44.5210419 -1.9612607 + -44.5260811 -1.9649172 + -44.5231247 -1.9686075 + -44.5121803 -1.9734821 + -44.5089989 -1.9767139 + -44.5058556 -1.9905194 + -44.4973869 -1.9866478 + -44.4930573 -1.9891944 + -44.4937630 -1.9944791 + -44.4910393 -1.9990884 + -44.4844284 -2.0016446 + -44.4908714 -2.0038731 + -44.5198822 -2.0139070 + -44.5354271 -2.0172882 + -44.5619202 -2.0160239 + -44.5715179 -2.0173614 + -44.5786324 -2.0251467 + -44.5921478 -2.0345125 + -44.5964928 -2.0356426 + -44.6076736 -2.0330648 + -44.6129417 -2.0367203 + -44.5933113 -2.0402548 + -44.5699539 -2.0256441 + -44.5640068 -2.0240610 + -44.5573921 -2.0263884 + -44.5448341 -2.0275919 + -44.5320663 -2.0333941 + -44.5169678 -2.0284014 + -44.4947357 -2.0091872 + -44.4903984 -2.0098953 + -44.4885941 -2.0158796 + -44.4803886 -2.0205119 + -44.4742241 -2.0212278 + -44.4673576 -2.0171187 + -44.4705925 -2.0267601 + -44.4699249 -2.0318198 + -44.4717674 -2.0354908 + -44.4820747 -2.0428030 + -44.4943695 -2.0493977 + -44.4999313 -2.0523822 + -44.5171394 -2.0711586 + -44.5366058 -2.0834889 + -44.5365868 -2.0786612 + -44.5526009 -2.0841100 + -44.5570030 -2.0994930 + -44.5657310 -2.1109500 + -44.5650787 -2.1194587 + -44.5703468 -2.1228838 + -44.5799408 -2.1221526 + -44.5868340 -2.1324673 + -44.5971260 -2.1349514 + -44.6079140 -2.1473186 + -44.6109200 -2.1558113 + -44.6164055 -2.1571660 + -44.6255226 -2.1513784 + -44.6248779 -2.1614971 + -44.6171188 -2.1633708 + -44.5997238 -2.1558604 + -44.5924110 -2.1552024 + -44.5885429 -2.1591282 + -44.5947876 -2.1779521 + -44.6260376 -2.2145309 + -44.6411629 -2.2322340 + -44.6482620 -2.2365711 + -44.6537514 -2.2379265 + -44.6621933 -2.2348993 + -44.6594810 -2.2415793 + -44.6615524 -2.2457078 + -44.6761971 -2.2504706 + -44.6839867 -2.2554941 + -44.6915092 -2.2510915 + -44.7008705 -2.2499003 + -44.6981010 -2.2434752 + -44.6980858 -2.2391074 + -44.7046509 -2.2335227 + -44.7058792 -2.2457387 + -44.7052193 -2.2514894 + -44.7018089 -2.2558730 + -44.6974754 -2.2575021 + -44.6872253 -2.2653651 + -44.6833725 -2.2725098 + -44.6881790 -2.2740974 + -44.6895676 -2.2786894 + -44.7003098 -2.2795608 + -44.7144356 -2.2698407 + -44.7221947 -2.2670467 + -44.7569122 -2.2638996 + -44.7482147 -2.2602606 + -44.7557335 -2.2556279 + -44.7605476 -2.2597444 + -44.7642250 -2.2645559 + -44.7599030 -2.2689440 + -44.7389069 -2.2745578 + -44.7240562 -2.2753150 + -44.7167702 -2.2815554 + -44.7094994 -2.2912447 + -44.7047539 -2.3036814 + -44.7026405 -2.2905858 + -44.6861916 -2.2906599 + -44.6765862 -2.2886341 + -44.6542130 -2.2935622 + -44.6576653 -2.2995243 + -44.6702881 -2.3128033 + -44.6813622 -2.3382742 + -44.6800270 -2.3463273 + -44.6814308 -2.3541386 + -44.6720810 -2.3587787 + -44.6543045 -2.3703542 + -44.6486015 -2.3731382 + -44.6659660 -2.3317950 + -44.6616325 -2.3197391 + -44.6338654 -2.2911234 + -44.6299782 -2.2904508 + -44.6255417 -2.2667897 + -44.6191139 -2.2596908 + -44.6106377 -2.2542102 + -44.6026268 -2.2510266 + -44.5984917 -2.2452972 + -44.5914040 -2.2448690 + -44.5897446 -2.2294722 + -44.5812798 -2.2269802 + -44.5742035 -2.2288501 + -44.5623207 -2.2282119 + -44.5476646 -2.2202289 + -44.5430908 -2.2193291 + -44.5369186 -2.2186663 + -44.5414734 -2.2149680 + -44.5478706 -2.2147107 + -44.5570221 -2.2176600 + -44.5647850 -2.2160168 + -44.5663681 -2.2118721 + -44.5603790 -2.2004020 + -44.5551262 -2.2008848 + -44.5475655 -2.1958597 + -44.5438881 -2.1903582 + -44.5429497 -2.1836953 + -44.5349083 -2.1731544 + -44.5344086 -2.1616621 + -44.5325623 -2.1577613 + -44.5240860 -2.1520510 + -44.5128784 -2.1488800 + -44.4920425 -2.1372442 + -44.4785652 -2.1373014 + -44.4646492 -2.1426485 + -44.4550819 -2.1491251 + -44.4434700 -2.1595197 + -44.4298172 -2.1740601 + -44.4307518 -2.1791136 + -44.4366989 -2.1806986 + -44.4205132 -2.1904223 + -44.4089165 -2.2047238 + -44.3986702 -2.2137322 + -44.4094963 -2.2198601 + -44.4108276 -2.2258673 + -44.4158440 -2.2233174 + -44.4172401 -2.2299788 + -44.4122238 -2.2325287 + -44.4030724 -2.2298074 + -44.4007759 -2.2265990 + -44.4000664 -2.2203937 + -44.3936844 -2.2238688 + -44.3858376 -2.2632153 + -44.3813019 -2.2726603 + -44.3838997 -2.2753596 + -44.3909111 -2.2751501 + -44.3932114 -2.2790489 + -44.3907089 -2.2827377 + -44.3881836 -2.2788398 + -44.3779030 -2.2798016 + -44.3747177 -2.2832637 + -44.3595695 -2.3256297 + -44.3577766 -2.3346038 + -44.3591728 -2.3412657 + -44.3619232 -2.3435535 + -44.3642311 -2.3497519 + -44.3710938 -2.3520229 + -44.3738785 -2.3625879 + -44.3725624 -2.3768482 + -44.3746643 -2.3890257 + -44.3838692 -2.4055421 + -44.4012794 -2.4162769 + -44.4078865 -2.4111910 + -44.4149818 -2.4143803 + -44.4275360 -2.4106493 + -44.4371414 -2.4122186 + -44.4417381 -2.4184072 + -44.4543037 -2.4178948 + -44.4647942 -2.4123323 + -44.4721146 -2.4141407 + -44.4762268 -2.4134331 + -44.4810104 -2.4099646 + -44.4912415 -2.3958957 + -44.5024071 -2.3882606 + -44.5138168 -2.3843031 + -44.5183868 -2.3842833 + -44.5263901 -2.3851688 + -44.5399551 -2.3984818 + -44.5245781 -2.3895452 + -44.5108681 -2.3898339 + -44.4994850 -2.4006889 + -44.4910851 -2.4147499 + -44.4929428 -2.4216399 + -44.5112953 -2.4394960 + -44.5138435 -2.4477625 + -44.5104446 -2.4558244 + -44.5047760 -2.4664254 + -44.5041122 -2.4721768 + -44.5054970 -2.4760797 + -44.5103226 -2.4818077 + -44.5162735 -2.4847713 + -44.5204124 -2.4905014 + -44.5310173 -2.5134494 + -44.5356102 -2.5191784 + -44.5408783 -2.5219145 + -44.5488853 -2.5230300 + -44.5603104 -2.5222905 + -44.5660133 -2.5197365 + -44.5733337 -2.5210841 + -44.5788307 -2.5240495 + -44.5827370 -2.5288610 + -44.5866623 -2.5394213 + -44.5903969 -2.5584896 + -44.5929337 -2.5633075 + -44.6064568 -2.5726757 + -44.6199646 -2.5779719 + -44.6238556 -2.5794976 + -44.6307449 -2.5865948 + -44.6419678 -2.5927541 + -44.6552391 -2.5954542 + -44.6614304 -2.6007152 + -44.6653481 -2.6082861 + -44.6660843 -2.6200101 + -44.6603622 -2.6181958 + -44.6589508 -2.6083145 + -44.6529808 -2.6025925 + -44.6456490 -2.5982559 + -44.6335335 -2.5980802 + -44.6246033 -2.5944407 + -44.6165695 -2.5859685 + -44.6094742 -2.5834696 + -44.5957413 -2.5798509 + -44.5911522 -2.5755026 + -44.5743599 -2.5493619 + -44.5647278 -2.5408964 + -44.5562592 -2.5381737 + -44.5505486 -2.5388885 + -44.5482750 -2.5416577 + -44.5435448 -2.5598433 + -44.5463142 -2.5658100 + -44.5564194 -2.5774930 + -44.5651741 -2.5947008 + -44.5711365 -2.5992739 + -44.5777969 -2.6072929 + -44.5808296 -2.6219962 + -44.5849838 -2.6316359 + -44.6026726 -2.6534035 + -44.6123505 -2.6724465 + -44.6177483 -2.6883538 + -44.6202202 -2.6956372 + -44.6232071 -2.6990733 + -44.6291695 -2.7041059 + -44.6298904 -2.7123814 + -44.6290245 -2.7243426 + -44.6324921 -2.7332954 + -44.6313782 -2.7404292 + -44.6435814 -2.7608414 + -44.6529922 -2.7704577 + -44.6582947 -2.7805521 + -44.6592674 -2.7948058 + -44.6489563 -2.8445239 + -44.6494560 -2.8548698 + -44.6520233 -2.8668168 + -44.6591759 -2.8826525 + -44.6660843 -2.8936603 + -44.6796303 -2.9069381 + -44.6858406 -2.9161091 + -44.6877060 -2.9243798 + -44.6820450 -2.9379733 + -44.6850929 -2.9556675 + -44.6863480 -2.9825690 + -44.6850395 -2.9975231 + -44.6813431 -3.0092106 + -44.6766663 -3.0187190 + -44.6727905 -3.0217261 + -44.6622772 -3.0236123 + -44.6547318 -3.0234160 + -44.6489983 -3.0195320 + -44.6334343 -3.0163815 + -44.6281776 -3.0175543 + -44.6201935 -3.0224192 + -44.6156387 -3.0270393 + -44.6088142 -3.0362680 + -44.6083755 -3.0406396 + -44.6109238 -3.0484478 + -44.6240463 -3.0690880 + -44.6665459 -3.1144359 + -44.6771278 -3.1286478 + -44.6902122 -3.1396279 + -44.7154274 -3.1528537 + -44.7179680 -3.1590514 + -44.7164268 -3.1723981 + -44.7175903 -3.1779122 + -44.7203484 -3.1804299 + -44.7443733 -3.1821601 + -44.7597122 -3.1855402 + -44.7757301 -3.1866164 + -44.7933960 -3.1982646 + -44.7980003 -3.2056029 + -44.7978172 -3.2161829 + -44.7919540 -3.2355294 + -44.7833214 -3.2489088 + -44.7783623 -3.2668705 + -44.7624016 -3.2789037 + -44.7587852 -3.2890401 + -44.7606430 -3.2957013 + -44.7650070 -3.2998209 + -44.7823715 -3.2946813 + -44.7872276 -3.3066187 + -44.7790184 -3.3124063 + -44.7618752 -3.3159347 + -44.7534027 -3.3145938 + -44.7453804 -3.3111808 + -44.7396431 -3.3068366 + -44.7359619 -3.3015635 + -44.7336082 -3.2859349 + -44.7353935 -3.2758067 + -44.7385635 -3.2679729 + -44.7531357 -3.2522671 + -44.7580452 -3.2434762 + -44.7617645 -3.2368183 + -44.7640114 -3.2278383 + -44.7534523 -3.2193768 + -44.7454071 -3.2099843 + -44.7135506 -3.1956394 + -44.7057648 -3.1936049 + -44.6963882 -3.1945672 + -44.6746788 -3.1997244 + -44.6670341 -3.1987340 + -44.6575127 -3.1975009 + -44.6529312 -3.1956813 + -44.6487999 -3.1920202 + -44.6317711 -3.1674867 + -44.6266861 -3.1550903 + -44.6185646 -3.1268380 + -44.6137161 -3.1158202 + -44.6082001 -3.1098645 + -44.5962181 -3.1039042 + -44.5804558 -3.0929670 + -44.5625381 -3.0739570 + -44.5577240 -3.0707581 + -44.5531578 -3.0726173 + -44.5494728 -3.0664244 + -44.5421448 -3.0646160 + -44.5389519 -3.0664697 + -44.5281219 -3.0465076 + -44.5232964 -3.0403197 + -44.5125084 -3.0309365 + -44.5065498 -3.0282021 + -44.4953423 -3.0275598 + -44.4794998 -3.0124488 + -44.4696236 -3.0007617 + -44.4603958 -2.9812522 + -44.4572983 -2.9776161 + -44.4355850 -2.9521503 + -44.4328194 -2.9475551 + -44.4173508 -2.9087615 + -44.4158821 -2.8241398 + -44.4155960 -2.8094234 + -44.4128342 -2.8043754 + -44.4039116 -2.8034928 + -44.3972740 -2.8014507 + -44.3960991 -2.7934070 + -44.4036446 -2.7938356 + -44.4082336 -2.7974958 + -44.4107361 -2.7944963 + -44.4120865 -2.7887416 + -44.4063034 -2.7710583 + -44.3904533 -2.7518075 + -44.3883553 -2.7419279 + -44.3890305 -2.7376783 + -44.3901443 -2.7306530 + -44.3942223 -2.7214377 + -44.3882370 -2.7106545 + -44.3819695 -2.6856158 + -44.3810043 -2.6722822 + -44.3741150 -2.6642623 + -44.3697395 -2.6564620 + -44.3671761 -2.6433654 + -44.3631058 -2.6551096 + -44.3640442 -2.6669419 + -44.3610344 -2.6739392 + -44.3568039 -2.6519144 + -44.3555260 -2.6452527 + -44.3589134 -2.6346612 + -44.3600044 -2.6206303 + -44.3553734 -2.6052425 + -44.3626175 -2.5865874 + -44.3662567 -2.5815141 + -44.3701553 -2.5847170 + -44.3717384 -2.5805717 + -44.3714828 -2.5736742 + -44.3776360 -2.5692801 + -44.3657188 -2.5608215 + -44.3574142 -2.5525067 + -44.3555679 -2.5357995 + -44.3484573 -2.5293901 + -44.3447952 -2.5280259 + -44.3390999 -2.5333374 + -44.3384323 -2.5374792 + -44.3251457 -2.5299451 + -44.3210869 -2.5449073 + -44.3160477 -2.5414784 + -44.3119316 -2.5408056 + -44.3110466 -2.5490868 + -44.3012428 -2.5560246 + -44.2994308 -2.5599408 + -44.2930527 -2.5661747 + -44.2920914 -2.5530720 + -44.3012161 -2.5488966 + -44.3023415 -2.5436034 + -44.3075714 -2.5366843 + -44.3054886 -2.5295644 + -44.2970200 -2.5268397 + -44.2846756 -2.5257390 + -44.2890015 -2.5211232 + -44.2990532 -2.5201631 + -44.3047752 -2.5222092 + -44.3088646 -2.5157545 + -44.3136368 -2.5083776 + -44.3220901 -2.5076535 + -44.3197899 -2.5030642 + -44.3055458 -2.4872608 + -44.2712784 -2.4880826 + -44.2634964 -2.4851246 + -44.2367439 -2.4815516 + -44.1843948 -2.4610834 + -44.1703720 -2.4555986 + -44.1417122 -2.4301867 + -44.1357574 -2.4267607 + -44.1167717 -2.4210849 + -44.1046257 -2.4114740 + -44.0998306 -2.4126415 + -44.0886574 -2.4200413 + -44.0836296 -2.4207499 + -44.0808678 -2.4150121 + -44.0840607 -2.4131608 + -44.0927505 -2.4099724 + -44.0627785 -2.4042735 + -44.0287323 -2.4055493 + -44.0252838 -2.3993540 + -44.0211678 -2.3986793 + -44.0195808 -2.4025936 + -44.0205040 -2.4060392 + -44.0289841 -2.4131358 + -44.0280914 -2.4191170 + -44.0290298 -2.4262416 + -44.0265427 -2.4338384 + -44.0247574 -2.4469509 + -44.0256920 -2.4529252 + -44.0300484 -2.4565883 + -44.0339127 -2.4503658 + -44.0428238 -2.4501028 + -44.0473824 -2.4466369 + -44.0604134 -2.4475086 + -44.0665741 -2.4447262 + -44.0679703 -2.4516194 + -44.0812263 -2.4517992 + -44.0862617 -2.4547696 + -44.0958672 -2.4565728 + -44.1002197 -2.4588554 + -44.1016083 -2.4636791 + -44.1075668 -2.4684846 + -44.1023140 -2.4698844 + -44.0929146 -2.4616425 + -44.0661774 -2.4626625 + -44.0623055 -2.4658957 + -44.0650597 -2.4691048 + -44.0712357 -2.4716105 + -44.0676117 -2.4808216 + -44.0640297 -2.5029087 + -44.0577545 -2.4725807 + -44.0529671 -2.4758177 + -44.0413666 -2.4919558 + -44.0352325 -2.5030155 + -44.0340157 -2.5126860 + -44.0345993 -2.5181932 + -44.0378075 -2.5204806 + -44.0378304 -2.5269189 + -44.0445023 -2.5397706 + -44.0496025 -2.5609064 + -44.0564423 -2.5562825 + -44.0647049 -2.5656791 + -44.0683594 -2.5654352 + -44.0756569 -2.5601194 + -44.0852585 -2.5605431 + -44.0905228 -2.5628228 + -44.0985527 -2.5708406 + -44.1008606 -2.5770404 + -44.1016693 -2.5835037 + -44.1025047 -2.5901411 + -44.1185112 -2.5916896 + -44.1262894 -2.5934999 + -44.1310997 -2.5964706 + -44.1338577 -2.6008294 + -44.1288376 -2.6031475 + -44.1185455 -2.6015773 + -44.1144562 -2.6089509 + -44.1151962 -2.6243548 + -44.1182137 -2.6376798 + -44.1234894 -2.6429489 + -44.1280975 -2.6528192 + -44.1379395 -2.6564608 + -44.1377449 -2.6654291 + -44.1473999 -2.6814892 + -44.1588440 -2.6844347 + -44.1710091 -2.6986446 + -44.1813164 -2.7038937 + -44.1874924 -2.7047899 + -44.1979942 -2.7015293 + -44.2025528 -2.6973727 + -44.2107048 -2.6759551 + -44.2193718 -2.6697125 + -44.2221336 -2.6752205 + -44.2201004 -2.6823571 + -44.2130470 -2.6911230 + -44.2069283 -2.7058640 + -44.2060356 -2.7118459 + -44.2085648 -2.7157454 + -44.2213783 -2.7235250 + -44.2399292 -2.7282698 + -44.2516136 -2.7351222 + -44.2612267 -2.7378438 + -44.2678719 -2.7417262 + -44.2891998 -2.7593482 + -44.3050117 -2.7689428 + -44.3324852 -2.7794099 + -44.3411903 -2.7839737 + -44.3451042 -2.7913165 + -44.3478966 -2.8039529 + -44.3471107 -2.8384507 + -44.3434486 -2.8368561 + -44.3413696 -2.8318052 + -44.3401489 -2.8108838 + -44.3368950 -2.7968690 + -44.3336678 -2.7897532 + -44.3299980 -2.7867789 + -44.3231468 -2.7891066 + -44.3149147 -2.7882197 + -44.3053436 -2.7967663 + -44.3014832 -2.8036809 + -44.3021812 -2.8078177 + -44.3092995 -2.8151476 + -44.3109207 -2.8211203 + -44.3097916 -2.8250341 + -44.3013573 -2.8319669 + -44.2997971 -2.8430116 + -44.2945061 -2.8336043 + -44.3020134 -2.8236859 + -44.2974052 -2.8145058 + -44.2944221 -2.8112984 + -44.2855263 -2.8168530 + -44.2818718 -2.8182473 + -44.2825012 -2.8026075 + -44.2808800 -2.7968647 + -44.2751236 -2.7867694 + -44.2659416 -2.7766876 + -44.2602310 -2.7776303 + -44.2613983 -2.7847543 + -44.2504234 -2.7845681 + -44.2470016 -2.7868812 + -44.2429123 -2.7935660 + -44.2374268 -2.7942777 + -44.2248955 -2.8055952 + -44.2314758 -2.7924612 + -44.2376366 -2.7885280 + -44.2373619 -2.7768011 + -44.2311783 -2.7733760 + -44.2245445 -2.7722523 + -44.2188225 -2.7736039 + -44.2126465 -2.7697694 + -44.1826859 -2.7668967 + -44.1846085 -2.7937942 + -44.1835060 -2.8041468 + -44.1780510 -2.8140562 + -44.1799049 -2.8202581 + -44.1861038 -2.8280530 + -44.1904602 -2.8312557 + -44.2028236 -2.8353467 + -44.2046661 -2.8387890 + -44.2106514 -2.8500340 + -44.2099762 -2.8537161 + -44.1925545 -2.8504207 + -44.1760941 -2.8416593 + -44.1696701 -2.8357050 + -44.1556396 -2.8123033 + -44.1428032 -2.8031538 + -44.1405029 -2.7994833 + -44.1330910 -2.7719162 + -44.1268845 -2.7627416 + -44.1180687 -2.7549593 + -44.1110611 -2.7487741 + -44.1069412 -2.7481000 + -44.1026077 -2.7506459 + -44.1014786 -2.7545595 + -44.0980644 -2.7589414 + -44.1015091 -2.7639873 + -44.0953636 -2.7713692 + -44.0948753 -2.7621727 + -44.0909653 -2.7562084 + -44.0855446 -2.7746258 + -44.0752869 -2.7836325 + -44.0787659 -2.7983370 + -44.0787849 -2.8036263 + -44.0751457 -2.8091588 + -44.0737572 -2.8043346 + -44.0679855 -2.7877996 + -44.0761185 -2.7604034 + -44.0733490 -2.7521360 + -44.0742340 -2.7438536 + -44.0721207 -2.7279947 + -44.0599518 -2.7128632 + -44.0527267 -2.6930878 + -44.0497971 -2.6850765 + -44.0463524 -2.6800303 + -44.0360489 -2.6750097 + -44.0314560 -2.6692777 + -44.0240898 -2.6538982 + -44.0183487 -2.6467912 + -43.9958496 -2.6326544 + -43.9885101 -6.9807901 + -44.1989632 -7.2814980 + -44.3146133 -7.3166208 + -44.3821297 -7.3256078 + -44.4612083 -7.3676510 + -44.5128021 -7.4006238 + -44.5403328 -7.4222407 + -44.5783463 -7.4928846 + -44.8049164 -7.5220771 + -44.9060211 -7.6416411 + -45.0537224 -7.6835418 + -45.2071266 -7.7220101 + -45.3067589 -7.7548852 + -45.3617554 -7.7810078 + -45.4112663 -7.8664570 + -45.4446564 -7.9245629 + -45.5124092 -7.9962869 + -45.5503311 -8.0429773 + -45.5744629 -8.0725851 + -45.5894661 -8.1079159 + -45.5953217 -8.1432648 + -45.5965195 -8.1569510 + -45.6103592 -8.1877203 + -45.6505737 -8.2355471 + -45.6724663 -8.2777071 + -45.6852112 -8.3198862 + -45.7060966 -8.3985500 + -45.7107506 -8.4190731 + -45.7203026 -8.4361629 + -45.7203026 -8.4594221 + -45.7372627 -8.4726315 + -45.7408333 -8.5091248 + -45.7444000 -8.5444794 + -45.7741661 -8.5524015 + -45.7822304 -8.5672150 + -45.7835197 -8.6048546 + -45.7710037 -8.6219912 + -45.7870750 -8.6379271 + -45.8238182 -8.6754942 + -45.8446770 -8.7461739 + -45.8630371 -8.7621059 + -45.8998184 -8.8087978 + -45.9250374 -8.8235750 + -45.9664497 -8.8862276 + -45.9733696 -8.9010420 + -45.9882774 -8.9112778 + -45.9901047 -8.9432087 + -45.9854546 -8.9618168 + -45.9808006 -8.9850740 + -45.9668465 -8.9897261 + -45.9646683 -9.0185499 + -45.9545517 -9.0641966 + -45.9477844 -9.0893078 + -45.9422455 -9.1360855 + -45.9229431 -9.1726284 + -45.9150391 -9.1988802 + -45.9073639 -9.2855883 + -45.9532394 -9.3185749 + -45.9944839 -9.3367395 + -46.0427017 -9.3845491 + -46.0739365 -9.4768801 + -46.0980988 -9.5144730 + -46.1165237 -9.5463743 + -46.1201553 -9.5988388 + -46.1504326 -9.6140194 + -46.1739960 -9.6215420 + -46.2014580 -9.6249065 + -46.2188644 -9.6400070 + -46.2267876 -9.6682014 + -46.2419167 -9.7366104 + -46.2477112 -9.7559900 + -46.2832870 -9.7878571 + -46.3040047 -9.8220348 + -46.3122673 -9.8881760 + -46.3331490 -9.9657021 + -46.3768692 -10.0329113 + -46.3758774 -10.0728378 + -46.3600731 -10.1264820 + -46.3499489 -10.1709890 + -46.3352547 -10.2166471 + -46.3285255 -10.2508821 + -46.3263817 -10.2885284 + -45.9184380 -10.3829031 + -45.9693489 -10.5367908 + -46.2397652 -10.6662722 + -46.3153839 -10.7014780 + -46.3533821 -10.7675600 + -46.3799896 -10.8462124 + -46.3893394 -10.8986645 + -46.3952675 -10.9534054 + -46.4362984 -10.9915800 + -46.4859734 -11.0138226 + -46.5088997 -11.0581150 + -46.5399818 -11.1105213 + -46.5618629 -11.1504002 + -46.6043243 -11.1879568 + -46.6203842 -11.2004700 + -46.6687126 -11.2767963 + -46.6711960 -11.3269815 + -46.6737823 -11.4056845 + -46.6591187 -11.4581852 + -46.6307297 -11.5118551 + -46.6136932 -11.5426893 + -46.5737686 -11.5701485 + -46.5155334 -11.5953627 + -46.4742432 -11.5646486 + -46.4273415 -11.5624638 + -46.3839989 -11.5933514 + -46.3234138 -11.6014605 + -46.2731247 -11.6106892 + -46.2297554 -11.6347322 + -46.2115021 -11.6473179 + -46.2356415 -11.6780672 + -46.3043518 -11.7007399 + -46.3616295 -11.7245760 + -46.4109917 -11.7723837 + -46.3998528 -11.8499727 + -46.2307892 -11.9039326 + -46.2378540 -11.9575300 + -46.3100662 -11.9984465 + -46.3560829 -12.0679331 + -46.3926926 -12.0712795 + -46.4683456 -12.1144695 + -46.4823227 -12.1806011 + -46.5011063 -12.3060379 + -46.3269310 -12.5185633 + -46.3260193 -12.5790224 + -46.3582268 -12.6268625 + -46.4088898 -12.7157326 + -46.4261551 -12.7442131 + -46.4321098 -12.8057985 + -46.3367157 -12.9828014 + -50.4767036 -12.9092712 + -50.5286140 -13.0243721 + -50.5663795 -13.0311384 + -50.5883751 -13.0995350 + -50.5655670 -13.1166916 + -50.5669365 -13.1760044 + -50.5796623 -13.2136211 + -50.6189232 -13.3116388 + -50.6603851 -13.3868399 + -50.6709137 -13.4472733 + -50.7931213 -13.7013941 + -50.8229218 -13.7184439 + -50.8595581 -13.7274933 + -50.8545265 -13.9065914 + -50.8582764 -13.9898539 + -50.8770828 -14.1221342 + -50.9449577 -14.2246561 + -50.9844208 -14.3751450 + -51.0116882 -14.6260405 + -51.0479355 -14.8324289 + -51.0859871 -14.9133387 + -51.1732292 -14.9964294 + -51.2168541 -15.0385447 + -51.2649040 -15.0430088 + -51.3093605 -15.0041342 + -51.4697685 -15.0790901 + -51.5729256 -15.1370525 + -51.6109657 -15.2145395 + -51.6895180 -15.4174204 + -51.7217026 -15.4595594 + -51.7850761 -15.5814829 + -51.8139763 -15.6612711 + -52.0160942 -15.8764458 + -52.2093925 -15.8783283 + -52.2714882 -15.9660339 + -52.3048668 -16.0207176 + -52.3689384 -16.0262890 + -52.5179825 -16.1206589 + -52.5687523 -16.2369061 + -52.6039963 -16.4797974 + -52.6271896 -16.5630207 + -52.6881790 -16.6598530 + -52.8040962 -16.7645569 + -52.9305725 -16.9388218 + -53.0052681 -17.0310631 + -53.2240105 -17.7036171 + -53.1298828 -17.9125557 + -53.1508102 -18.0014858 + -53.4047279 -18.0043869 + -53.6797485 -17.8429852 + -53.4617882 -17.6734715 + -53.4601593 -17.2479992 + -53.8092537 -17.6145821 + -53.9578819 -17.5994473 + -54.2474174 -17.6456203 + -54.4118729 -17.5825443 + -54.6804161 -17.5226765 + -54.8477211 -17.6067429 + -55.1440010 -17.6209621 + -55.2935181 -17.5396671 + -55.7580757 -17.2957458 + -55.8653984 -17.2476158 + -56.2725830 -17.2524834 + -56.5712509 -17.2929344 + -56.8324547 -17.4064655 + -56.9716530 -17.6172047 + -57.0279427 -17.6821079 + -57.1209030 -17.7651863 + -57.2594109 -17.7957001 + -57.3991737 -17.8558693 + -57.7039337 -17.6955471 + -57.8139496 -17.4546375 + -58.1742668 -17.4664440 + -58.3254738 -17.2300110 + -58.4083138 -17.0598793 + -58.4112549 -16.9321156 + -58.3938904 -16.5796814 + -58.3370094 -16.3607864 + -58.3263435 -16.2638512 + -58.3881378 -16.2728481 + -58.4409981 -16.3377590 + -60.1760445 -16.3433170 + -60.2210884 -16.4572926 + -60.3695259 -16.6919689 + -60.4650803 -16.8548908 + -59.9967804 -17.3155479 + -60.2057800 -17.5352707 + -60.1474190 -17.8251247 + -60.2607994 -17.8648148 + -60.3049011 -18.0324039 + -60.4009094 -18.0150967 + -60.4881668 -18.1027508 + -60.4852180 -18.1205139 + -60.7532654 -18.3371868 + -60.8908424 -18.4235954 + -61.5204201 -18.5614643 + -63.0555267 -19.2187634 + -63.3775711 -19.3903446 + -63.5881386 -19.4229908 + -63.8605804 -19.4840279 + -64.0287857 -19.5053558 + -64.3407898 -19.4453983 + -64.5738831 -19.3856030 + -64.8548050 -19.2720985 + -65.2707367 -18.8742847 + -65.3784866 -18.6390820 + -65.5500641 -18.6444340 + -65.7395096 -18.8345375 + -65.9238052 -18.8752232 + -65.9994736 -18.9229774 + -66.1367950 -18.9420834 + -66.5039368 -18.6470356 + -66.5747604 -18.3263569 + -66.6167297 -17.9361572 + -66.6685257 -17.7250252 + -66.6671371 -17.6600075 + -66.9565048 -17.3651161 + -67.0714951 -17.2268581 + -67.1261597 -17.1662884 + -67.2574692 -17.1089859 + -67.3607330 -17.1954651 + -67.4760666 -17.1484604 + -67.6935196 -17.1856556 + -67.8759232 -17.0312881 + -67.9337692 -16.9056931 + -67.9973373 -16.7800884 + -68.0450745 -16.7024231 + -68.0893555 -16.6179218 + -68.0671463 -16.4936333 + -68.1696701 -16.0884800 + -68.3602219 -15.9705982 + -68.4857864 -15.9064608 + -68.6432114 -15.8000536 + -68.9364166 -15.6100969 + -69.0501251 -15.4364796 + -69.0567627 -15.3771496 + -68.9537430 -15.0579710 + -69.0723877 -14.9790192 + -69.1015854 -14.8375149 + -69.2929916 -14.6454859 + -69.4997330 -14.5743389 + -69.5443954 -14.5890760 + -69.6813965 -14.5260572 + -69.8136444 -14.4151382 + -69.9209061 -14.3498993 + -70.4682083 -14.2096100 + -70.6897049 -14.1099157 + -70.7985840 -14.1690063 + -70.8378754 -14.2738705 + -71.1068802 -14.6326313 + -70.9657974 -14.8245564 + -71.0073929 -14.9351168 + -71.0148239 -15.0833912 + -71.1299744 -15.2861958 + -71.3123779 -15.1318283 + -71.4838638 -15.1132250 + -71.5463181 -15.2933245 + -71.7016449 -15.5336885 + -71.7437057 -15.4674435 + -71.8220062 -15.3075867 + -71.9281311 -15.2446308 + -71.8806763 -15.0975800 + -71.9434967 -15.0757790 + -72.0566864 -15.0652790 + -72.1556396 -14.9213495 + -72.2574463 -14.9268436 + -72.2583160 -14.8538380 + -72.3941498 -14.7839785 + -72.4990387 -14.6982107 + -72.5836029 -14.6797857 + -72.7094040 -14.6761045 + -72.7818604 -14.7808990 + -72.8684311 -14.6906071 + -73.1303558 -14.6934900 + -73.3244400 -14.6029768 + -73.4843140 -14.5376291 + -73.8025208 -14.6031361 + -73.9360275 -14.5241518 + -74.0100861 -14.4487162 + -74.3603516 -14.2267027 + -75.1130981 -13.3776274 + -75.0991058 -13.3080750 + -75.1152191 -13.0365591 + -75.1341248 -12.8973570 + -75.2211075 -12.9120064 + -75.2619400 -12.8229494 + -75.2983246 -12.7669811 + -75.4417191 -12.5818968 + -75.5268784 -12.4186029 + -75.5617599 -12.2691011 + -76.1038208 -11.6565809 + -76.2269821 -11.5627918 + -76.4627914 -11.0204821 + -76.7885818 -10.3787479 + -76.8258820 -10.2634621 + -76.8847656 -10.1093493 + -77.3745880 -9.2973156 + -77.5680847 -9.0528116 + -77.6384735 -8.9157848 + -77.5945206 -8.7881193 + -77.7325134 -8.3874550 + -77.7354965 -8.2699575 + -77.8298111 -8.1100693 + -77.9702148 -8.0379171 + -78.0487747 -7.9453607 + -78.2814865 -7.7863264 + -78.4148178 -7.3628588 + -78.6734924 -7.1147990 + -78.5860367 -6.9769559 + -78.6678848 -6.8467498 + -78.6581726 -6.6984811 + -78.8132782 -6.5840940 + -79.0416336 -6.4832439 + -79.1970444 -6.4475641 + -79.2914810 -6.3184719 + -79.3539886 -6.2156820 + -79.4465714 -6.2006626 + -79.5131531 -5.9666858 + -79.6301117 -5.7462940 + -79.5656586 -5.6414824 + -79.5274506 -5.5195088 + -79.5624542 -5.1030869 + -79.3052826 -4.5515251 + -79.1618729 -4.4354711 + -79.1134567 -4.3351898 + -79.1083755 -4.2028809 + -79.0929871 -4.0683122 + -79.0625305 -3.5813029 + -78.9836807 -3.3008571 + -78.7521286 -3.1655910 + -78.5594101 -2.7176991 + -78.5462494 -2.5671561 + -78.4807281 -2.4817400 + -78.4552383 -2.3951001 + -78.5177689 -2.2980130 + -78.5105438 -2.2033510 + -78.5024109 -2.1714289 + -78.4506531 -2.0939691 + -78.4019852 -1.9309510 + -78.3771362 -1.7142720 + -78.3514099 -1.5671771 + -78.2756271 -1.4886260 + -78.2279205 -1.2776970 + -78.3248825 -1.2101980 + -78.3599319 -1.1040419 + -78.3592987 -0.9386439 + -78.3528137 -0.7401790 + -78.3088760 -0.6159350 + -78.1483307 -0.5044780 + -78.1410751 -0.4018310 + -78.2088547 -0.1815400 + -78.0726242 -0.1498810 + -77.9712753 0.0335610 + -77.8348846 0.4074250 + -77.5811386 0.6635570 + -77.5308609 0.6509060 + -77.4863510 0.6257190 + -77.4763565 0.5492730 + -77.4436646 0.4237300 + -77.3661499 0.3574110 + -77.2632751 0.3412300 + -77.1419907 0.3546690 + -77.0847321 0.6716610 + -76.9631119 0.7729320 + -76.9754257 0.8425390 + -77.0004425 0.8790930 + -77.0298920 0.9555790 + -77.0428772 0.9739430 + -76.9521866 1.2360270 + -76.8079224 1.2756550 + -76.7060013 1.3096650 + -76.5848389 1.2900250 + -76.5826569 1.2727261 + -76.5267029 1.2408561 + -76.5074692 1.1849231 + -76.5178452 1.1632710 + -76.4668427 1.0422540 + -76.3147659 1.0328161 + -76.1201019 1.0940120 + -76.2104034 1.1078860 + -76.2295837 1.1763670 + -76.2875900 1.2597560 + -76.2425232 1.3794349 + -76.2079773 1.4421009 + -76.0886765 1.5342520 + -75.8215103 1.7116489 + -75.7305527 1.8677360 + -75.5468140 2.0612741 + -75.2314072 2.5899031 + -75.0095062 2.5962901 + -75.0341949 2.7195351 + -74.8145065 3.0418971 + -74.6259766 3.2913189 + -74.6313705 3.3768806 + -74.5748978 3.4885521 + -74.4793320 3.6537540 + -74.4722290 3.7164781 + -74.4915695 3.7438941 + -74.5223007 3.7838807 + -74.5323868 3.8375139 + -74.5195847 3.8945210 + -74.5068359 3.9378409 + -74.1380157 3.7819500 + -74.1130829 3.7214420 + -73.9251175 3.8248580 + -73.7676392 3.7321391 + -73.7428131 3.6453960 + -73.7327576 3.5837791 + -73.7033844 3.4879010 + -73.5335083 3.3483880 + -73.3827362 3.2956069 + -73.1571045 3.0806940 + -73.1986084 2.9952281 + -73.1658020 2.9004841 + -72.7843475 2.7582550 + -72.7732773 2.6612737 + -72.7666779 2.5939610 + -72.6580734 2.5811901 + -72.6109848 2.6324241 + -72.5502396 2.6642380 + -72.3840179 2.7642758 + -72.3152390 2.8063397 + -72.2168427 2.8141220 + -72.1767654 2.8265877 + -72.1079407 2.8800581 + -72.0350266 2.8057640 + -71.9880524 2.8262000 + -71.9308701 2.8260820 + -71.8782578 2.8259742 + -71.8382263 2.8270321 + -71.8243256 2.8726308 + -71.7774582 2.8656898 + -71.7557602 2.8565197 + -71.6859436 2.8712060 + -71.6677170 2.8517771 + -71.5784683 2.8607192 + -71.5624390 2.8663890 + -71.5143280 2.8856821 + -71.4616470 2.9038250 + -71.4308929 2.8706820 + -71.3839340 2.8876951 + -71.3548660 2.9007289 + -71.3284607 2.8997140 + -71.3081436 2.9047921 + -71.2912750 2.8920670 + -71.2192307 2.8907790 + -71.1666641 2.8781230 + -71.1437302 2.8929050 + -71.0808258 2.8939159 + -71.0271072 2.8846800 + -71.0009079 2.8561089 + -70.9827042 2.8321171 + -70.9265976 2.8479719 + -70.8444366 2.7998941 + -70.7907486 2.7826729 + -70.7208862 2.8076251 + -70.6981735 2.7642317 + -70.6109695 2.8381972 + -70.4704514 2.7968440 + -70.4141846 2.8560443 + -70.3144073 2.9265611 + -70.2441635 3.0507510 + -70.2152176 3.1430869 + -70.1497955 3.2022679 + -70.1598358 3.2684481 + -70.1334534 3.2889259 + -70.1308441 3.3733311 + -70.0759888 3.3606710 + -70.0576172 3.3811662 + -70.0727463 3.3127561 + -69.9647980 3.4266019 + -69.9620743 3.5395241 + -69.9323502 3.5360410 + -69.8418503 3.5757790 + -69.8086777 3.5768511 + -69.6931000 3.5925829 + -69.6232910 3.6038461 + -69.5729675 3.6037431 + -69.4861908 3.5647810 + -69.3738632 3.6284289 + -69.3338242 3.6306279 + -69.3007202 3.6145899 + -69.2034988 3.6155312 + -69.1497726 3.6074359 + -69.0387039 3.6414280 + -68.6640930 3.8014939 + -68.4804764 3.9630940 + -68.3030472 4.0037928 + -68.0904083 3.9782610 + -67.9144516 3.9322720 + -67.6654587 4.1427870 + -67.7289886 4.2786579 + -67.7841339 4.5114708 + -67.8556137 4.6610470 + -67.8158188 4.8993683 + -67.7923660 5.0498915 + -67.8497696 5.2906928 + -67.7760849 5.4182978 + -67.6682205 5.5093312 + -67.6355896 5.6678190 + -67.5341034 5.8877621 + -67.4295273 6.0164442 + -67.4346771 6.1647429 + -67.2598190 6.1301641 + -67.1610031 5.9508729 + -67.1079330 5.7739587 + -67.0190735 5.6825209 + -66.5111847 5.7020092 + -66.3801346 5.8751235 + -66.2692413 5.8634882 + -66.1343460 5.8472409 + -66.0634689 5.8368301 + -65.9279785 5.9768548 + -65.8120193 6.0906849 + -65.7273483 6.1007771 + -65.5778961 6.0023708 + -65.5918884 5.9328179 + -65.6220856 5.8131080 + -65.5835266 5.7286191 + -65.3979645 5.8000998 + -65.3614120 5.7886181 + -65.2089005 5.5932469 + -65.1762161 5.4677043 + -65.1365662 5.3683839 + -65.2156982 5.3126540 + -65.0928955 5.1241879 + -65.1468582 5.0706868 + -65.1003418 4.9724932 + -65.0366898 4.8697000 + -64.9402466 4.6676011 + -64.9140778 4.6321859 + -64.7952423 4.6034250 + -64.7105103 4.6283450 + -64.6751709 4.5974741 + -64.5815201 4.2653432 + -64.4341049 4.2330999 + -64.2775421 4.1996989 + -64.0842209 4.2084270 + -64.0078735 4.1352658 + -63.8518181 3.9695461 + -63.7397079 3.9761600 + -63.5877151 3.9439080 + -63.4266167 3.9002309 + -63.2811737 3.9501221 + -63.1714859 3.9213791 + -63.1136627 3.7900820 + -63.0726852 3.7386668 + -62.9403000 3.6642499 + -62.8363266 3.6366601 + -62.7443695 3.7562430 + -62.7678108 3.9068611 + -62.7010956 4.0059628 + -62.5694695 4.0307879 + -62.4996376 4.0477548 + -62.4513550 4.1126742 + -62.3826904 4.1227989 + -62.2981224 4.1055150 + -62.1916924 4.1224060 + -62.0785217 4.1073451 + -61.9239044 4.1629200 + -61.7291756 4.2400870 + -61.5253220 4.3115311 + -61.4701042 4.3946872 + -61.3945122 4.4219079 + -61.3656425 4.4948530 + -61.1596489 4.5263681 + -60.8650436 4.7014270 + -60.6539192 4.9049611 + -60.6303558 4.9088869 + -60.6244698 4.9128084 + -60.6087646 4.9206524 + -60.5891380 4.9343762 + -60.5852165 4.9461379 + -60.5871925 4.9637775 + -60.6048851 4.9872942 + -60.6166878 5.0147324 + -60.6343880 5.0500097 + -60.6442299 5.0794091 + -60.6442528 5.1107717 + -60.6501617 5.1303716 + -60.6678543 5.1538892 + -60.6875191 5.1793661 + -60.6914482 5.1793652 + -60.7317696 5.1961398 + -60.7468681 5.2116117 + -60.7544174 5.2206140 + -60.7679100 5.2360802 + -60.7862129 5.2557044 + -60.7958183 5.2672448 + -60.8017654 5.2730179 + -60.8040543 5.2762489 + -60.8120575 5.2852511 + -60.8445435 5.3224125 + -60.8548393 5.3339534 + -60.8708534 5.3519568 + -60.8834343 5.3664966 + -60.9154663 5.4034228 + -60.9413261 5.4320421 + -60.9507027 5.4445000 + -60.9589462 5.4525800 + -60.9671783 5.4631920 + -60.9719810 5.4696503 + -60.9761047 5.4728856 + -60.9875526 5.4851179 + -60.9916763 5.4883523 + -60.9957924 5.4934278 + -60.9987717 5.4961987 + -61.0026588 5.5021944 + -61.0088348 5.5093474 + -61.0401955 5.5441928 + -61.0440826 5.5497274 + -61.0498085 5.5552678 + -61.0607948 5.5681877 + -61.0699463 5.5801821 + -61.0919304 5.6030293 + -61.0951309 5.6078711 + -61.1006279 5.6134105 + -61.1276436 5.6434050 + -61.1615295 5.6819315 + -61.1642799 5.6847014 + -61.1729736 5.6960015 + -61.1835136 5.7061563 + -61.1924400 5.7172275 + -61.1979408 5.7227654 + -61.2164879 5.7435260 + -61.2494698 5.7797451 + -61.2524414 5.7850456 + -61.2673340 5.8005028 + -61.2707634 5.8060346 + -61.2748909 5.8092675 + -61.2851982 5.8203402 + -61.2927551 5.8302546 + -61.3010025 5.8387895 + -61.3362808 5.8784595 + -61.3415489 5.8849163 + -61.3619385 5.9075179 + -61.3649139 5.9116678 + -61.3756866 5.9229698 + -61.3800392 5.9282727 + -61.3871346 5.9391046 + -61.3894196 5.9432530 + -61.3937645 5.9515471 + -61.3962708 5.9614468 + -61.3941803 5.9699550 + -61.3902626 5.9754672 + -61.3826675 5.9814301 + -61.3750839 5.9823318 + -61.3672752 5.9818516 + -61.3606071 5.9834452 + -61.3514061 5.9875636 + -61.3435783 5.9944453 + -61.3403549 5.9981184 + -61.3369064 5.9992604 + -61.3348160 6.0079980 + -61.3348045 6.0128298 + -61.3299522 6.0240912 + -61.3303986 6.0298448 + -61.3290062 6.0351324 + -61.3250885 6.0404143 + -61.3195534 6.0489125 + -61.3114853 6.0594754 + -61.2995110 6.0707173 + -61.2900810 6.0736837 + -61.2811089 6.0782619 + -61.2771912 6.0823927 + -61.2711868 6.0941095 + -61.2681694 6.1072159 + -61.2633133 6.1184764 + -61.2575531 6.1255922 + -61.2529488 6.1281109 + -61.2407684 6.1287684 + -61.2331848 6.1296687 + -61.2272034 6.1321826 + -61.2232819 6.1376939 + -61.2196007 6.1402144 + -61.2140846 6.1401992 + -61.2051277 6.1394844 + -61.1975365 6.1413045 + -61.1878662 6.1495595 + -61.1816406 6.1569047 + -61.1786385 6.1633377 + -61.1723824 6.1828761 + -61.1691513 6.1883883 + -61.1647758 6.1915965 + -61.1578751 6.1936483 + -61.1452332 6.1945319 + -61.1309814 6.1963325 + -61.1146584 6.1995068 + -61.1134949 6.2045641 + -61.1146317 6.2087092 + -61.1215019 6.2174706 + -61.1235542 6.2241473 + -61.1246758 6.2338128 + -61.1218834 6.2469172 + -61.1195526 6.2591033 + -61.1211395 6.2666988 + -61.1245766 6.2713099 + -61.1348991 6.2784705 + -61.1548462 6.2953196 + -61.1582756 6.3022294 + -61.1658325 6.3126020 + -61.1703949 6.3261871 + -61.1689758 6.3418255 + -61.1654968 6.3523970 + -61.1594696 6.3728528 + -61.1596794 6.3797541 + -61.1587296 6.3912520 + -61.1547813 6.4061928 + -61.1464615 6.4238806 + -61.1429863 6.4337611 + -61.1429749 6.4383616 + -61.1470871 6.4471135 + -61.1562538 6.4581800 + -61.1626701 6.4650979 + -61.1647263 6.4706240 + -61.1656227 6.4798265 + -61.1649017 6.4908643 + -61.1651039 6.5014453 + -61.1689835 6.5118065 + -61.1742592 6.5168810 + -61.1825447 6.5136843 + -61.1878357 6.5113988 + -61.1949615 6.5121088 + -61.2013931 6.5151162 + -61.2078133 6.5204239 + -61.2146301 6.5512609 + -61.2159767 6.5646038 + -61.2159500 6.5749540 + -61.2136192 6.5875964 + -61.2027740 6.6020565 + -61.1988602 6.6045752 + -61.1954041 6.6073256 + -61.1898613 6.6165094 + -61.1863747 6.6314478 + -61.1861267 6.6369667 + -61.1865654 6.6463976 + -61.1858521 6.6546741 + -61.1782265 6.6689110 + -61.1738319 6.6792474 + -61.1669006 6.6909571 + -61.1583748 6.6980619 + -61.1514511 6.7074709 + -61.1433754 6.7177968 + -61.1330070 6.7260461 + -61.1233330 6.7310772 + -61.1118279 6.7342639 + -61.1035500 6.7344699 + -61.0962029 6.7298503 + -61.0888519 6.7272987 + -61.0849419 6.7284374 + -61.0773239 6.7387638 + -61.0720177 6.7442675 + -61.0660286 6.7479296 + -61.0575256 6.7467551 + -61.0444336 6.7409678 + -61.0278893 6.7365499 + -61.0168457 6.7381268 + -61.0076408 6.7406292 + -61.0021133 6.7442918 + -60.9954376 6.7458816 + -60.9867020 6.7447052 + -60.9809608 6.7423887 + -60.9763641 6.7419152 + -60.9706230 6.7389078 + -60.9625854 6.7361250 + -60.9478683 6.7360797 + -60.9356499 6.7466202 + -60.9324226 6.7482200 + -60.9287338 6.7516584 + -60.9199867 6.7548509 + -60.9080124 6.7607923 + -60.9068489 6.7642374 + -60.9075279 6.7681494 + -60.9192276 6.7783031 + -60.9235687 6.7875142 + -60.9267693 6.7939625 + -60.9262695 6.8072977 + -60.9216461 6.8160214 + -60.9156456 6.8233609 + -60.9078102 6.8290844 + -60.8979111 6.8325033 + -60.8903198 6.8322496 + -60.8854980 6.8303952 + -60.8781509 6.8262334 + -60.8712654 6.8209224 + -60.8595619 6.8130684 + -60.8494530 6.8093567 + -60.8372917 6.8008108 + -60.8326950 6.7998757 + -60.8262444 6.8030744 + -60.8184128 6.8074188 + -60.8101158 6.8126802 + -60.8013649 6.8167911 + -60.7946968 6.8163095 + -60.7724228 6.8054309 + -60.7616348 6.7989559 + -60.7501564 6.7929401 + -60.7393913 6.7795687 + -60.7336540 6.7754097 + -60.7297478 6.7742472 + -60.7175636 6.7730570 + -60.7113571 6.7730365 + -60.7069817 6.7741709 + -60.6975250 6.7831073 + -60.6922188 6.7886081 + -60.6892090 6.7941175 + -60.6741905 6.8156810 + -60.6690941 6.8276205 + -60.6630898 6.8358779 + -60.6591644 6.8400030 + -60.6416588 6.8486810 + -60.6239357 6.8525295 + -60.5841141 6.8631978 + -60.5746727 6.8661537 + -60.5643120 6.8691068 + -60.5465889 6.8734126 + -60.5368996 6.8816562 + -60.5297508 6.8876085 + -60.5166321 6.8905501 + -60.5007477 6.8944025 + -60.4906120 6.8994246 + -60.4735336 6.9159164 + -60.4615173 6.9319673 + -60.4513588 6.9420466 + -60.4425926 6.9496017 + -60.4345360 6.9516411 + -60.4250908 6.9559751 + -60.4177170 6.9596262 + -60.4085045 6.9630408 + -60.4011383 6.9646225 + -60.3974571 6.9646096 + -60.3910294 6.9611359 + -60.3809357 6.9539709 + -60.3710556 6.9507160 + -60.3691902 6.9580660 + -60.3707352 6.9757748 + -60.3695564 6.9838171 + -60.3628426 6.9948273 + -60.3556747 7.0053754 + -60.3452797 7.0177507 + -60.3399544 7.0266972 + -60.3320961 7.0370126 + -60.3265572 7.0418191 + -60.3191795 7.0461588 + -60.3120346 7.0504990 + -60.3039627 7.0552959 + -60.2928886 7.0644493 + -60.2854881 7.0749955 + -60.2796707 7.0926738 + -60.2782516 7.1032429 + -60.2756844 7.1124282 + -60.2756691 7.1167951 + -60.2781868 7.1200237 + -60.2834625 7.1239524 + -60.2882881 7.1258097 + -60.2931023 7.1304250 + -60.3066406 7.1401320 + -60.3174324 7.1456900 + -60.3248024 7.1441088 + -60.3337936 7.1383967 + -60.3390884 7.1374974 + -60.3448296 7.1405067 + -60.3468819 7.1458015 + -60.3452339 7.1556797 + -60.3465843 7.1644201 + -60.3511353 7.1777697 + -60.3577881 7.1835408 + -60.3646851 7.1849461 + -60.3727417 7.1840568 + -60.3824158 7.1813350 + -60.3939247 7.1790791 + -60.4040604 7.1758981 + -60.4095802 7.1763792 + -60.4166946 7.1823816 + -60.4224167 7.1897583 + -60.4258575 7.1934481 + -60.4361839 7.2006116 + -60.4412422 7.2022400 + -60.4476814 7.2029524 + -60.4566689 7.1988478 + -60.4725800 7.1883330 + -60.4868584 7.1844764 + -60.4956169 7.1806002 + -60.5048561 7.1702900 + -60.5148010 7.1549249 + -60.5212898 7.1409264 + -60.5261459 7.1340466 + -60.5303001 7.1306143 + -60.5365143 7.1299458 + -60.5413284 7.1341014 + -60.5497932 7.1488428 + -60.5552940 7.1543789 + -60.5642509 7.1599269 + -60.5858231 7.1758633 + -60.5949860 7.1876183 + -60.6018600 7.1963763 + -60.6080589 7.2005353 + -60.6160927 7.2065392 + -60.6231956 7.2152977 + -60.6316490 7.2327957 + -60.6327782 7.2394657 + -60.6338959 7.2493529 + -60.6313133 7.2647433 + -60.6289902 7.2716298 + -60.6151390 7.2858324 + -60.5994415 7.3004875 + -60.5892792 7.3121734 + -60.5858040 7.3183665 + -60.5850983 7.3229613 + -60.5864487 7.3319287 + -60.5889626 7.3374538 + -60.5949135 7.3468971 + -60.5994949 7.3528881 + -60.6058846 7.3692279 + -60.6150131 7.3924699 + -60.6248817 7.4012370 + -60.6340714 7.4060946 + -60.6375084 7.4104724 + -60.6370201 7.4180536 + -60.6372070 7.4316125 + -60.6413193 7.4410491 + -60.6477394 7.4481945 + -60.6537170 7.4507422 + -60.6633759 7.4528437 + -60.6684380 7.4526305 + -60.6734924 7.4563251 + -60.6785431 7.4595594 + -60.6854248 7.4669356 + -60.6948471 7.4715633 + -60.6982765 7.4784684 + -60.6987000 7.4899588 + -60.6995964 7.4975448 + -60.7032509 7.5067482 + -60.7110138 7.5260754 + -60.7125969 7.5348125 + -60.7121201 7.5391765 + -60.7081795 7.5485840 + -60.7042503 7.5531654 + -60.6968765 7.5554395 + -60.6917992 7.5597878 + -60.6913223 7.5643821 + -60.6896973 7.5696607 + -60.6864586 7.5735555 + -60.6807060 7.5728469 + -60.6738129 7.5696073 + -60.6650772 7.5665908 + -60.6574783 7.5667944 + -60.6501083 7.5686073 + -60.6459541 7.5715799 + -60.6413231 7.5793762 + -60.6387672 7.5862603 + -60.6359825 7.5940623 + -60.6329651 7.6009450 + -60.6253319 7.6124072 + -60.6248207 7.6273389 + -60.6222534 7.6376691 + -60.6185608 7.6408730 + -60.6134949 7.6410851 + -60.6063728 7.6376143 + -60.5987816 7.6350608 + -60.5930252 7.6359587 + -60.5884018 7.6419172 + -60.5947800 7.6614671 + -60.5931473 7.6685839 + -60.5855064 7.6807327 + -60.5760269 7.6933351 + -60.5723190 7.7006736 + -60.5699806 7.7110028 + -60.5706520 7.7167487 + -60.5747681 7.7250338 + -60.5763626 7.7303224 + -60.5788841 7.7337775 + -60.5767975 7.7369857 + -60.5707970 7.7422490 + -60.5675278 7.7555604 + -60.5633545 7.7638164 + -60.5564232 7.7704535 + -60.5520401 7.7731943 + -60.5469437 7.7823648 + -60.5392685 7.8050780 + -60.5355644 7.8110375 + -60.5309296 7.8197498 + -60.5290756 7.8229575 + -60.5228386 7.8286791 + -60.5182266 7.8309593 + -60.5108452 7.8341484 + -60.4912567 7.8389025 + -60.4767456 7.8406873 + -60.4638519 7.8401809 + -60.4472885 7.8359866 + -60.4187546 7.8303690 + -60.4116173 7.8303432 + -60.3993988 7.8339720 + -60.3934059 7.8364763 + -60.3862610 7.8378282 + -60.3795891 7.8364253 + -60.3722420 7.8301959 + -60.3655624 7.8315496 + -60.3547096 7.8390884 + -60.3394547 7.8548799 + -60.3278999 7.8665495 + -60.3047981 7.8859849 + -60.2752380 7.9092984 + -60.2724609 7.9125028 + -60.2546806 7.9252958 + -60.2442818 7.9349008 + -60.2403412 7.9415464 + -60.2359200 7.9543896 + -60.2319794 7.9605746 + -60.2243576 7.9667459 + -60.2181282 7.9692473 + -60.2054443 7.9735613 + -60.1904488 7.9806218 + -60.1833076 7.9808226 + -60.1763954 7.9821734 + -60.1701660 7.9849043 + -60.1664810 7.9848890 + -60.1530838 7.9951696 + -60.1498489 7.9976830 + -60.1438446 8.0002851 + -60.1252518 8.0197268 + -60.1123657 8.0305214 + -60.0986748 8.0303907 + -60.0831909 8.0266047 + -60.0668221 8.0200806 + -60.0476074 8.0244436 + -60.0310516 8.0370178 + -60.0144882 8.0495911 + -60.0000000 8.0660973 + -59.9967842 8.0848942 + -59.9929848 8.0994120 + -59.9836693 8.1175146 + -59.9780006 8.1356535 + -59.9796982 8.1484070 + -59.9841537 8.1593685 + -59.9812927 8.1711674 + -59.9693184 8.1810560 + -59.9509926 8.1863317 + -59.9360580 8.2171154 + -59.8948784 8.2239761 + -59.8609886 8.2318153 + -59.8427010 8.2334452 + -59.8343887 8.2415476 + -59.8306084 8.2533360 + -59.8186340 8.2623091 + -59.8084641 8.2731209 + -59.8037796 8.2839909 + -59.8063011 8.3040352 + -59.8126106 8.3122911 + -59.8226128 8.3169460 + -59.8721848 8.3820696 + -59.9958611 8.5352993 + -59.9978714 8.5575666 + -59.9912300 8.5535555 + -59.9850769 8.5475082 + -59.9501839 8.4967871 + -59.9237480 8.4667940 + -59.9039612 8.4498205 + -59.8989639 8.4437866 + -59.8823051 8.4116611 + -59.8555450 8.3768787 + -59.8456268 8.3693733 + -59.8336296 8.3602943 + -59.8147659 8.3577499 + -59.7795029 8.3400660 + -59.8015442 8.3828268 + -59.8051682 8.3876963 + -59.8057861 8.3934431 + -59.8034210 8.3982325 + -59.7978592 8.4006844 + -59.7575188 8.4012947 + -59.7497025 8.3995838 + -59.7377396 8.3954782 + -59.7302017 8.3928928 + -59.6871262 8.3737144 + -59.6418648 8.3460045 + -59.6269989 8.3351164 + -59.6067238 8.3202658 + -59.5852013 8.3100948 + -59.5582237 8.2947950 + -59.5344810 8.2788496 + -59.5187988 8.2699699 + -59.4953957 8.2567148 + -59.4114876 8.2118883 + -59.4076538 8.2094517 + -59.3357162 8.1637154 + -59.3254051 8.1601191 + -59.2995987 8.1452723 + -59.2791023 8.1295862 + -59.2289124 8.0982981 + -59.1944542 8.0740871 + -59.1851692 8.0675611 + -59.1399574 8.0432205 + -59.1262894 8.0335970 + -59.1126671 8.0214500 + -59.0959930 8.0000000 + -59.0911446 7.9904518 + -59.0740509 7.9662380 + -59.0655518 7.9543076 + -59.0509033 7.9392915 + -59.0417366 7.9314260 + -59.0339317 7.9270139 + -59.0094223 7.9050450 + -58.9922523 7.8886318 + -58.9761848 7.8798041 + -58.9533272 7.8557267 + -58.9404564 7.8474255 + -58.9147987 7.8254442 + -58.8957634 7.8129196 + -58.8545418 7.7770734 + -58.8513298 7.7742777 + -58.8444786 7.7650456 + -58.8261795 7.7458639 + -58.8076286 7.7298942 + -58.7961922 7.7178750 + -58.7744865 7.6910872 + -58.7703934 7.6834798 + -58.7658195 7.6783967 + -58.7615280 7.6655045 + -58.7440224 7.6304717 + -58.7309799 7.6182108 + -58.7261963 7.6101384 + -58.7143898 7.5841002 + -58.7111549 7.5863757 + -58.7215424 7.6176887 + -58.7233200 7.6278086 + -58.7219009 7.6335421 + -58.7126770 7.6355491 + -58.7019157 7.6265182 + -58.6835556 7.6176667 + -58.6720924 7.6102390 + -58.6624832 7.6007557 + -58.6597443 7.5956511 + -58.6470146 7.5719347 + -58.6346664 7.5592165 + -58.6189117 7.5395818 + -58.6102982 7.5188460 + -58.6061974 7.5121551 + -58.5906487 7.4964271 + -58.5880699 7.4931312 + -58.5723877 7.4730964 + -58.5402679 7.4223275 + -58.5309143 7.4100857 + -58.5125237 7.3924122 + -58.4854012 7.3663430 + -58.4765282 7.3513441 + -58.4727173 7.3359218 + -58.4681282 7.2998104 + -58.4681892 7.2906184 + -58.4692688 7.2669554 + -58.4765816 7.2408061 + -58.4785805 7.2169175 + -58.4798050 7.2063541 + -58.4793091 7.1973467 + -58.4789810 7.1914101 + -58.4702415 7.1568727 + -58.4660873 7.1244359 + -58.4668350 7.1159363 + -58.4722557 7.0968957 + -58.4747162 7.0732374 + -58.4767532 7.0440588 + -58.4761467 7.0311813 + -58.4799042 7.0201731 + -58.4794960 7.0121250 + -58.4837074 7.0018096 + -58.4883575 6.9947152 + -58.5117149 6.9764853 + -58.5345650 6.9649181 + -58.5422134 6.9562349 + -58.5501671 6.9362888 + -58.5549431 6.9171638 + -58.5690727 6.8605504 + -58.5810356 6.8249950 + -58.5861320 6.8195119 + -58.5871239 6.8089423 + -58.5920296 6.7974801 + -58.5917740 6.7662082 + -58.5929031 6.7380610 + -58.5908699 6.7287230 + -58.5915985 6.7229795 + -58.5962791 6.7103648 + -58.6018448 6.7037339 + -58.6039619 6.6963902 + -58.6013641 6.6717687 + -58.6059074 6.6451254 + -58.6129951 6.6164289 + -58.6062775 6.5885582 + -58.6082191 6.5731635 + -58.6123695 6.5556951 + -58.6127548 6.5474381 + -58.5999832 6.5314832 + -58.5979996 6.5185919 + -58.6017342 6.5098782 + -58.6075363 6.5020981 + -58.6135330 6.4989185 + -58.6151657 6.4954810 + -58.6136017 6.4883399 + -58.6143303 6.4825959 + -58.6217918 6.4665475 + -58.6241837 6.4523039 + -58.6281357 6.4458904 + -58.6220131 6.4327402 + -58.6173744 6.4391484 + -58.6129990 6.4400392 + -58.6142044 6.4315372 + -58.6202011 6.4283586 + -58.6156502 6.4211974 + -58.6094627 6.4181662 + -58.6048622 6.4185953 + -58.5905380 6.4293079 + -58.5850067 6.4315696 + -58.5859032 6.4350257 + -58.5777054 6.4581990 + -58.5757942 6.4687653 + -58.5745964 6.4761162 + -58.5760727 6.4968252 + -58.5718575 6.5082951 + -58.5702286 6.5183878 + -58.5735321 6.5333743 + -58.5722122 6.5588908 + -58.5696220 6.5683031 + -58.5674095 6.5899043 + -58.5705223 6.6060228 + -58.5638580 6.6404715 + -58.5536118 6.6597171 + -58.5472679 6.6796789 + -58.5365753 6.6973119 + -58.5217094 6.7190537 + -58.4962120 6.7490001 + -58.4887886 6.7748232 + -58.4858513 6.7850270 + -58.4807014 6.7987871 + -58.4732552 6.8111506 + -58.4642258 6.8202853 + -58.4556732 6.8262038 + -58.4486847 6.8392606 + -58.4123535 6.8716540 + -58.4033470 6.8771091 + -58.3860703 6.8804364 + -58.3713036 6.8872294 + -58.3570557 6.8855200 + -58.3466911 6.8870559 + -58.3379288 6.8904424 + -58.3330650 6.8950062 + -58.3077965 6.8902278 + -58.2928467 6.8896623 + -58.2710648 6.8796201 + -58.2579536 6.8795261 + -58.2448921 6.8727651 + -58.2355614 6.8582139 + -58.2270889 6.8528638 + -58.2153664 6.8518605 + -58.2087708 6.8410068 + -58.1903343 6.8264599 + -58.1717186 6.8117681 + -58.1708221 6.8078532 + -58.1613808 6.8098536 + -58.1561890 6.8284388 + -58.1487732 6.8359718 + -58.1341209 6.8264375 + -58.1230965 6.8240576 + -58.1031113 6.8204618 + -58.0709190 6.8195343 + -58.0398750 6.8186140 + -58.0300140 6.8144016 + -58.0188255 6.8032813 + -58.0062256 6.7965198 + -58.0000000 6.7808685 + -57.9879456 6.7726030 + -57.9766846 6.7613149 + -57.9408760 6.7318115 + -57.9231339 6.7112637 + -57.9176712 6.7003441 + -57.9123001 6.7012134 + -57.9075317 6.6998024 + -57.8998451 6.6955180 + -57.8836098 6.6821985 + -57.8579979 6.6600561 + -57.8473549 6.6477270 + -57.8406715 6.6390901 + -57.8290100 6.6290436 + -57.8146591 6.6181903 + -57.8029900 6.6066947 + -57.7971344 6.5986719 + -57.7947807 6.5885530 + -57.7894173 6.5898361 + -57.7813110 6.5847249 + -57.7692337 6.5736465 + -57.7442017 6.5452881 + -57.7398338 6.5420108 + -57.7157364 6.5275049 + -57.6924095 6.5055437 + -57.6801567 6.4981885 + -57.6469231 6.4781618 + -57.6398506 6.4728360 + -57.6327133 6.4584069 + -57.6297722 6.4524288 + -57.6164207 6.4363894 + -57.6126213 6.4260726 + -57.6090355 6.4169960 + -57.6017342 6.4081540 + -57.5911026 6.3964391 + -57.5684624 6.3548121 + -57.5653000 6.3463516 + -57.5624962 6.3310614 + -57.5568275 6.3195157 + -57.5484924 6.3104730 + -57.5390892 6.2966785 + -57.5306778 6.2779102 + -57.5154915 6.2922988 + -57.5159492 6.2985024 + -57.5131531 6.3115592 + -57.5051689 6.3219633 + -57.4936180 6.3251514 + -57.4537201 6.3250265 + -57.4446030 6.3221960 + -57.4199142 6.3091559 + -57.4136848 6.3058658 + -57.4054070 6.3044767 + -57.3977470 6.3028760 + -57.3898621 6.2987947 + -57.3684502 6.2819805 + -57.3587074 6.2781172 + -57.3495598 6.2709408 + -57.3365059 6.2666883 + -57.3277702 6.2593007 + -57.3155212 6.2517314 + -57.3078079 6.2426805 + -57.2953377 6.2328367 + -57.2917938 6.2285156 + -57.2772446 6.2172370 + -57.2564583 6.2010360 + -57.2448235 6.1924262 + -57.2362938 6.1846218 + -57.2258568 6.1700025 + -57.2161026 6.1597714 + -57.2125320 6.1560230 + -57.1820412 6.1113281 + -57.1734276 6.0911069 + -57.1645622 6.0644712 + -57.1611366 6.0477319 + -57.1565819 6.0169268 + -57.1488647 6.0064254 + -57.1462402 5.9990096 + -57.1456985 5.9942708 + -57.1421585 5.9634233 + -57.1396904 5.9359140 + -57.1340561 5.8982849 + -57.1347771 5.8827553 + -57.1369591 5.8701158 + -57.1426201 5.8522773 + -57.1389923 5.8355360 + -57.1255989 5.8410101 + -57.1169777 5.8489337 + -57.1137505 5.8601327 + -57.1080513 5.8725896 + -57.1027260 5.8790426 + -57.0988197 5.8817592 + -57.0936623 5.8826227 + -57.0895157 5.8807888 + -57.0806885 5.8887129 + -57.0793839 5.9096260 + -57.0757141 5.9162741 + -57.0757828 5.9262085 + -57.0688744 5.9434333 + -57.0641632 5.9494672 + -57.0334206 5.9556766 + -57.0223045 5.9615455 + -57.0175667 5.9638548 + -57.0152664 5.9599376 + -57.0141907 5.9537354 + -57.0081787 5.9506717 + -57.0013542 5.9496827 + -57.0088501 5.9581180 + -57.0107574 5.9649348 + -57.0105934 5.9715586 + -57.0071297 5.9786177 + -56.9995308 5.9850855 + -56.9681816 5.9939866 + -56.9568520 5.9990292 + -56.9438400 6.0001502 + -56.9078255 5.9910741 + -56.8865280 5.9883165 + -56.8390121 5.9896612 + -56.8307381 5.9886794 + -56.8197174 5.9849553 + -56.8060951 5.9803538 + -56.7719727 5.9760199 + -56.7318115 5.9642725 + -56.6961327 5.9626436 + -56.6848984 5.9627061 + -56.6764450 5.9652424 + -56.6714859 5.9650679 + -56.6623459 5.9576745 + -56.6399994 5.9528475 + -56.6124649 5.9443259 + -56.5897102 5.9397068 + -56.5461006 5.9376993 + -56.5397034 5.9385657 + -56.5314636 5.9427557 + -56.5246544 5.9442468 + -56.5070496 5.9373164 + -56.4967194 5.9377937 + -56.4892349 5.9370131 + -56.4782066 5.9358630 + -56.4741783 5.9339972 + -56.4522705 5.9328880 + -56.4135818 5.9248409 + -56.3984833 5.9220333 + -56.3826561 5.9177232 + -56.3548088 5.9084253 + -56.3428154 5.9068394 + -56.3297729 5.9023633 + -56.3233643 5.9019871 + -56.3134651 5.9049435 + -56.3107643 5.9024744 + -56.2692146 5.8963776 + -56.2551384 5.8943119 + -56.2483063 5.8916607 + -56.2296333 5.8783154 + -56.2217751 5.8771191 + -56.1517029 5.8537226 + -56.1340103 5.8478127 + -56.1273880 5.8461947 + -56.1102409 5.8460841 + -56.0922050 5.8354220 + -56.0760651 5.8305440 + -56.0663414 5.8279080 + -56.0309334 5.8225365 + -56.0268478 5.8219166 + -55.9949837 5.8129835 + -55.9502296 5.7890096 + -55.9299736 5.7868423 + -55.9148712 5.7823696 + -55.8994026 5.7867994 + -55.9092369 5.8099284 + -55.9090500 5.8136549 + -55.9000130 5.8228106 + -55.8947716 5.8466415 + -55.9038773 5.8496971 + -55.9100990 5.8540111 + -55.9093132 5.8616729 + -55.9161682 5.8682590 + -55.9258118 5.8934579 + -55.8836060 5.9210038 + -55.8722649 5.9247899 + -55.8683548 5.9277081 + -55.8636284 5.9324927 + -55.8624115 5.9366388 + -55.8558350 5.9432969 + -55.8462563 5.9479051 + -55.8271751 5.9537954 + -55.7844276 5.9583659 + -55.7720299 5.9584303 + -55.7534523 5.9614234 + -55.7410812 5.9664536 + -55.7226181 5.9699154 + -55.7183762 5.9707103 + -55.6973114 5.9726806 + -55.6828423 5.9721336 + -55.6768608 5.9736123 + -55.6673813 5.9790416 + -55.6258507 5.9788365 + -55.5971413 5.9808416 + -55.5900917 5.9761176 + -55.5870094 5.9792371 + -55.5830879 5.9807048 + -55.5764809 5.9811511 + -55.5669556 5.9774742 + -55.5008202 5.9738660 + -55.4757957 5.9708557 + -55.4627800 5.9692893 + -55.4425278 5.9687653 + -55.4028282 5.9627461 + -55.3877449 5.9628167 + -55.3620987 5.9581776 + -55.3509178 5.9548597 + -55.3277550 5.9479895 + -55.3111916 5.9412365 + -55.2341499 5.9024720 + -55.2122269 5.8973980 + -55.2035484 5.8972301 + -55.1866226 5.9006171 + -55.1761131 5.9062519 + -55.1693039 5.9079385 + -55.1612434 5.9077673 + -55.1527672 5.9061499 + -55.1415825 5.8999891 + -55.1191940 5.8839445 + -55.1094551 5.8773637 + -55.0948868 5.8991599 + -55.1041985 5.9030509 + -55.1201859 5.9203663 + -55.1295166 5.9273624 + -55.1525192 5.9425755 + -55.1579170 5.9485540 + -55.1637497 5.9588761 + -55.1627655 5.9696431 + -55.1586533 5.9735937 + -55.1512299 5.9771447 + -55.1336784 5.9790845 + -55.0977974 5.9856591 + -55.0897026 5.9871421 + -55.0527763 6.0009618 + -55.0372963 6.0045462 + -55.0319252 6.0043621 + -55.0155754 5.9986367 + -54.9984169 5.9964337 + -54.9756126 5.9960799 + -54.9459267 5.9956198 + -54.9258728 5.9928060 + -54.9155464 5.9938836 + -54.9021187 5.9943528 + -54.8756523 5.9901156 + -54.8594017 5.9897423 + -54.8459129 5.9935479 + -54.8384628 5.9938402 + -54.8341370 5.9940100 + -54.8148994 5.9884992 + -54.7677460 5.9783401 + -54.7375603 5.9736986 + -54.7144127 5.9719272 + -54.7026253 5.9699035 + -54.6794472 5.9606791 + -54.6610641 5.9619913 + -54.6447182 5.9560528 + -54.6203232 5.9528332 + -54.5988083 5.9456711 + -54.5926743 5.9441190 + -54.5520668 5.9338417 + -54.4981079 5.9249330 + -54.4683609 5.9250398 + -54.4586487 5.9250751 + -54.4115181 5.9184141 + -54.4005661 5.9184513 + -54.3927116 5.9172373 + -54.3842278 5.9133344 + -54.3438950 5.9073381 + -54.3162155 5.9032216 + -54.2736168 5.8911543 + -54.2210007 5.8787222 + -54.2144852 5.8785195 + -54.2070541 5.8810277 + -54.1985817 5.8804340 + -54.1112671 5.8399415 + -54.1045685 5.8383527 + -54.0854225 5.8338127 + -54.0581436 5.8310003 + -54.0449104 5.8269014 + -54.0316849 5.8261142 + -54.0242424 5.8238606 + -54.0211334 5.8207660 + -54.0180130 5.8137374 + -54.0162926 5.7924237 + -54.0106850 5.7830544 + -54.0000916 5.7653580 + -53.9917946 5.7546201 + -53.9870110 5.7442851 + NA NA + -51.6435242 4.2149944 + -51.6356888 4.2015347 + -51.6340370 4.1967716 + -51.6343422 4.1915851 + -51.6214561 4.1845555 + -51.6179504 4.1866269 + -51.6150589 4.1909246 + -51.6072350 4.1988459 + -51.6031113 4.2054739 + -51.5967216 4.2158284 + -51.5895081 4.2257695 + -51.5874481 4.2294974 + -51.5870399 4.2365384 + -51.5851822 4.2413015 + -51.5756989 4.2429590 + -51.5717812 4.2404742 + -51.5649757 4.2274280 + -51.5602303 4.2125182 + -51.5538368 4.2054772 + -51.5443497 4.1820765 + -51.5400162 4.1760707 + -51.5350685 4.1713080 + -51.5292969 4.1711011 + -51.5305672 4.1969280 + -51.5307426 4.2005076 + -51.5352821 4.2203884 + -51.5466309 4.2543502 + -51.5631332 4.2889338 + -51.5662270 4.2982521 + -51.5664368 4.3125415 + -51.5659027 4.3167834 + -51.5643768 4.3289013 + -51.5645866 4.3568578 + -51.5606728 4.3653483 + -51.5567589 4.3866787 + -51.5532532 4.3933053 + -51.5480995 4.3970332 + -51.5309792 4.3858514 + -51.5184250 4.3696685 + -51.5142746 4.3643146 + -51.5014877 4.3518891 + -51.4684906 4.3295226 + -51.4423027 4.3057051 + -51.4338455 4.3009415 + -51.4183884 4.2947292 + -51.4121971 4.2922416 + -51.3973503 4.2825060 + -51.3693085 4.2518525 + -51.3625031 4.2479162 + -51.3536377 4.2464647 + -51.3437424 4.2410784 + -51.3373489 4.2356930 + -51.3313713 4.2247162 + -51.3234863 4.2166038 + -51.3056030 4.1982021 + -51.2847824 4.1824574 + -51.2384033 4.1290140 + -51.2354088 4.1267323 + -51.2324257 4.1244555 + -51.2126389 4.0958695 + -51.2015114 4.0838542 + -51.1897736 4.0399466 + -51.1813469 4.0152655 + -51.1732903 4.0028701 + -51.1724739 3.9788468 + -51.1745377 3.9680791 + -51.1704178 3.9616573 + -51.1718063 3.8926957 + -51.1720886 3.8786144 + -51.1675644 3.8429923 + -51.1679840 3.8189697 + -51.1737633 3.7868731 + -51.1727371 3.7669916 + -51.1651115 3.7659531 + -51.1581078 3.7634649 + -51.1558380 3.7696764 + -51.1545906 3.8102663 + -51.1525230 3.8315957 + -51.1432381 3.8670044 + -51.1364250 3.8871546 + -51.1318932 3.9005480 + -51.1269455 3.9106927 + -51.1189041 3.9185586 + -51.1127167 3.9210405 + -51.1040649 3.9183443 + -51.0933495 3.9086053 + -51.0853157 3.8953474 + -51.0795517 3.8771200 + -51.0774956 3.8673854 + -51.0779762 3.8524742 + -51.0762711 3.8402560 + -51.0791588 3.8280389 + -51.0791626 3.8178914 + -51.0766945 3.8042221 + -51.0796013 3.7553501 + -51.0743408 3.7271895 + -51.0717850 3.7135131 + -51.0715828 3.7066791 + -51.0800476 3.6642301 + -51.0806694 3.6553261 + -51.0769691 3.6350291 + -51.0785561 3.6021676 + -51.0763664 3.5896759 + -51.0792580 3.5726964 + -51.0786438 3.5658622 + -51.0693817 3.5434914 + -51.0683517 3.5362430 + -51.0694046 3.4871638 + -51.0681992 3.4781156 + -51.0644760 3.4500928 + -51.0659218 3.4380825 + -51.0573196 3.3523483 + -51.0544319 3.3235593 + -51.0534134 3.2985022 + -51.0505371 3.2825551 + -51.0421028 3.2589431 + -51.0289383 3.2278740 + -51.0155602 3.2119212 + -51.0095940 3.2009423 + -51.0087738 3.1907952 + -51.0162010 3.1589100 + -51.0168266 3.1450367 + -51.0123100 3.1181142 + -51.0067520 3.1077571 + -50.9987297 3.0986412 + -50.9919395 3.0872481 + -50.9896774 3.0806205 + -50.9878273 3.0721290 + -50.9907188 3.0534947 + -50.9888725 3.0452111 + -50.9824944 3.0302978 + -50.9773560 3.0213904 + -50.9627457 3.0035732 + -50.9592476 2.9967377 + -50.9571953 2.9874184 + -50.9553490 2.9787202 + -50.9458885 2.9590430 + -50.9438324 2.9546928 + -50.9403458 2.9290147 + -50.9335594 2.9147232 + -50.9208069 2.8971133 + -50.9127922 2.8751595 + -50.9123840 2.8681195 + -50.9126015 2.8476210 + -50.9152870 2.8351998 + -50.9152908 2.8258820 + -50.9192085 2.8167746 + -50.9270325 2.8107760 + -50.9266243 2.8068414 + -50.9233322 2.8035262 + -50.9192162 2.8026950 + -50.9140701 2.8045547 + -50.8922539 2.8035030 + -50.8873138 2.8003933 + -50.8790932 2.7842369 + -50.8737526 2.7629063 + -50.8684006 2.7639380 + -50.8585320 2.7506788 + -50.8552475 2.7388744 + -50.8547630 2.7329979 + -50.8540230 2.7239661 + -50.8577461 2.6902208 + -50.8484917 2.6831737 + -50.8390236 2.6827514 + -50.8320312 2.6783977 + -50.8238068 2.6694880 + -50.8217506 2.6643107 + -50.8223763 2.6547871 + -50.8160057 2.6436012 + -50.8151855 2.6380105 + -50.8195267 2.6104782 + -50.8193245 2.6013682 + -50.8172722 2.5934989 + -50.8152199 2.5893567 + -50.8139915 2.5808671 + -50.8146400 2.5767498 + -50.8230858 2.5233200 + -50.8251457 2.5169034 + -50.8335915 2.5051100 + -50.8432655 2.4974582 + -50.8525352 2.4800754 + -50.8560257 2.4920859 + -50.8595200 2.4947801 + -50.8613777 2.4860868 + -50.8599434 2.4773903 + -50.8564491 2.4717977 + -50.8500710 2.4742768 + -50.8449249 2.4794481 + -50.8410072 2.4908314 + -50.8379173 2.4935203 + -50.8235130 2.4953713 + -50.8060188 2.5075710 + -50.8023148 2.5077748 + -50.7936783 2.5013494 + -50.7870979 2.4926484 + -50.7753906 2.4704859 + -50.7696266 2.4628503 + -50.7459984 2.4315379 + -50.7361374 2.4137251 + -50.7349243 2.3870182 + -50.7363701 2.3797741 + -50.7396660 2.3741879 + -50.7431641 2.3725355 + -50.7483063 2.3727469 + -50.7539978 2.3696141 + -50.7462540 2.3667417 + -50.7382393 2.3557622 + -50.7331161 2.3319509 + -50.7117424 2.3081238 + -50.7022934 2.2944520 + -50.6936684 2.2758124 + -50.6901817 2.2625606 + -50.6908073 2.2551093 + -50.6945114 2.2528358 + -50.7070541 2.2586446 + -50.7119904 2.2594776 + -50.7187805 2.2570002 + -50.7247467 2.2522449 + -50.7115822 2.2524388 + -50.6991386 2.2484236 + -50.6946793 2.2469850 + -50.6880493 2.2479782 + -50.6801147 2.2524073 + -50.6770287 2.2505410 + -50.6753883 2.2470202 + -50.6741562 2.2412231 + -50.6756134 2.2254922 + -50.6705017 2.1884346 + -50.6762886 2.1575980 + -50.6793785 2.1503568 + -50.6816521 2.1373184 + -50.6608887 2.1300523 + -50.6545143 2.1263194 + -50.6384773 2.1254745 + -50.6296349 2.1219463 + -50.6251144 2.1163526 + -50.6062050 2.1082592 + -50.5844193 2.0914688 + -50.5821648 2.0873263 + -50.5807304 2.0794592 + -50.5875359 2.0593896 + -50.5885735 2.0494556 + -50.5886002 2.0237904 + -50.5859375 2.0144734 + -50.5641747 1.9813323 + -50.5572128 1.9740341 + -50.5485611 1.9649631 + -50.5362358 1.9554278 + -50.5200005 1.9473363 + -50.5171280 1.9419516 + -50.5140724 1.9169052 + -50.5167542 1.9073880 + -50.5161476 1.8984879 + -50.5130730 1.8868943 + -50.5050735 1.8709486 + -50.4958382 1.8560361 + -50.4884529 1.8396773 + -50.4769592 1.8247622 + -50.4707947 1.8199946 + -50.4483986 1.8118942 + -50.4331932 1.8042170 + -50.4257927 1.8033794 + -50.4103851 1.7950808 + -50.3941422 1.7967139 + -50.3877678 1.7973262 + -50.3748093 1.8037236 + -50.3456154 1.8055446 + -50.3384209 1.8117841 + -50.3320312 1.8173212 + -50.3242149 1.8218627 + -50.3067398 1.8220439 + -50.2989311 1.8185141 + -50.2866020 1.8166329 + -50.2559891 1.8020995 + -50.2436676 1.7925608 + -50.2315407 1.7917140 + -50.2231102 1.7933563 + -50.1984367 1.7947654 + -50.1937103 1.7939301 + -50.1781006 1.7845918 + -50.1657753 1.7802256 + -50.1540680 1.7717212 + -50.1446152 1.7708776 + -50.1298180 1.7669207 + -50.1131821 1.7573729 + -50.1074677 1.7551157 + -50.0747681 1.7421991 + -50.0548325 1.7384385 + -50.0462112 1.7313871 + -50.0266991 1.7224534 + -50.0000000 1.7067548 + -49.9941406 1.7033097 + -49.9663277 1.6869545 + -49.9536018 1.6763768 + -49.9527855 1.6726505 + -49.9558754 1.6687247 + -49.9661598 1.6643988 + -49.9791069 1.6646303 + -49.9877472 1.6605079 + -49.9926872 1.6557578 + -49.9980507 1.6458352 + -50.0000000 1.6390094 + -49.9972534 1.6296933 + -49.9898186 1.6509930 + -49.9848747 1.6573986 + -49.9803505 1.6594595 + -49.9704819 1.6598544 + -49.9661674 1.6583978 + -49.9616470 1.6588032 + -49.9581490 1.6608657 + -49.9521866 1.6608542 + -49.9482880 1.6591915 + -49.9411049 1.6521420 + -49.9372253 1.6370287 + -49.9342117 1.6055380 + -49.9327850 1.5906695 + -49.9270897 1.5571378 + -49.9156227 1.5345619 + -49.9027138 1.5144663 + -49.8964157 1.4869995 + -49.8937416 1.4753435 + -49.8851433 1.4564984 + -49.8822899 1.4449065 + -49.8802795 1.4190404 + -49.8825645 1.4076661 + -49.8941307 1.3735524 + -49.8997345 1.3433588 + -49.9035835 1.3339502 + -49.9067802 1.3106860 + -49.9092560 1.3032435 + -49.9177055 1.2893996 + -49.9349976 1.2706082 + -49.9450798 1.2617323 + -49.9685173 1.2512271 + -49.9820900 1.2427714 + -50.0000000 1.2384976 + -50.0053139 1.2372295 + -50.0332565 1.2350053 + -50.0396347 1.2306727 + -50.0472488 1.2222053 + -50.0661621 1.2147924 + -50.0723381 1.2061150 + -50.0719376 1.1990814 + -50.0668144 1.1920391 + -50.0514069 1.1907704 + -50.0419579 1.1905464 + -50.0067978 1.2097198 + -50.0000000 1.2093902 + -49.9846153 1.2086442 + -49.9650879 1.2152265 + -49.9539833 1.2228594 + -49.9355698 1.2305187 + -49.9272537 1.2339778 + -49.9182205 1.2316849 + -49.9030457 1.2157269 + -49.8999825 1.2068256 + -49.8994026 1.1861390 + -49.9010582 1.1793160 + -49.9148750 1.1501776 + -49.9204750 1.1347135 + -49.9225121 1.1290941 + -49.9389915 1.1026509 + -49.9449539 1.0985253 + -49.9548187 1.0952350 + -49.9879303 1.0721322 + -50.0000000 1.0671930 + -50.0072441 1.0667905 + -50.0125771 1.0709370 + -50.0219994 1.0879147 + -50.0305901 1.1092349 + -50.0334816 1.0986915 + -50.0253029 1.0761311 + -50.0251122 1.0684781 + -50.0269699 1.0620698 + -50.0300560 1.0587659 + -50.0349884 1.0569135 + -50.0424004 1.0465854 + -50.0582314 1.0371000 + -50.0705376 1.0227370 + -50.0759277 1.0164490 + -50.0880585 1.0067497 + -50.1306610 0.9489146 + -50.1548882 0.9305881 + -50.1723976 0.9173431 + -50.2443237 0.8808547 + -50.2572708 0.8723963 + -50.2617912 0.8713692 + -50.2741203 0.8655979 + -50.2749481 0.8604294 + -50.2815437 0.8407942 + -50.2934875 0.8174452 + -50.2971878 0.8139353 + -50.3037605 0.8129113 + -50.3052063 0.8040217 + -50.3082924 0.8007178 + -50.3144569 0.7955574 + -50.3251648 0.7717937 + -50.3309479 0.7471961 + -50.3309555 0.7418200 + -50.3319893 0.7352048 + -50.3383598 0.7290112 + -50.3549995 0.7215914 + -50.3656120 0.7119540 + -50.3743210 0.7040439 + -50.4170494 0.6846672 + -50.4215622 0.6873612 + -50.4266777 0.7008073 + -50.4313927 0.7061895 + -50.4348717 0.7173594 + -50.4402008 0.7256371 + -50.4471703 0.7324696 + -50.4506607 0.7341283 + -50.4553833 0.7318599 + -50.4414444 0.7144733 + -50.4375572 0.7018557 + -50.4289474 0.6900590 + -50.4269028 0.6834398 + -50.4283447 0.6793067 + -50.4486885 0.6621729 + -50.4579391 0.6506069 + -50.4678230 0.6295432 + -50.4764557 0.6158972 + -50.4809914 0.5987433 + -50.5128632 0.5491669 + -50.5227394 0.5262324 + -50.5248566 0.5181436 + -50.5260353 0.5136263 + -50.5391922 0.4960708 + -50.5451546 0.4853288 + -50.5585251 0.4570251 + -50.5661430 0.4328492 + -50.5708733 0.4241733 + -50.5852509 0.4099275 + -50.5924454 0.3983606 + -50.5986176 0.3824521 + -50.6251144 0.3582989 + -50.6836510 0.3011103 + -50.6910400 0.3002912 + -50.6961670 0.3031897 + -50.7043686 0.3114651 + -50.7066193 0.3189077 + -50.7001953 0.3279738 + -50.6893654 0.3352180 + -50.6803284 0.3463698 + -50.6753960 0.3554588 + -50.6774368 0.3653818 + -50.6801147 0.3564970 + -50.6893578 0.3443121 + -50.7082558 0.3253163 + -50.7105179 0.3209784 + -50.7109299 0.3164318 + -50.7072449 0.3073342 + -50.6986351 0.2959585 + -50.7006950 0.2864538 + -50.7201500 0.2623003 + -50.7313004 0.2484573 + -50.7358208 0.2395752 + -50.7460899 0.2267721 + -50.7596436 0.2127323 + -50.7678413 0.2249327 + -50.7739944 0.2290715 + -50.7867203 0.2247430 + -50.7992706 0.2230695 + -50.7898026 0.2170995 + -50.7719498 0.2201833 + -50.7680588 0.2106736 + -50.7704391 0.2009663 + -50.7748413 0.1935278 + -50.7849045 0.1834112 + -50.7908554 0.1819700 + -50.8107529 0.1850871 + -50.8470688 0.1840847 + -50.8610229 0.1820296 + -50.8710785 0.1822443 + -50.8858528 0.1765223 + -50.8998070 0.1750340 + -50.9084244 0.1707008 + -50.9268990 0.1572828 + -50.9597359 0.1395351 + -50.9855995 0.1143431 + -50.9889641 0.1096480 + -50.9983253 0.0965814 + -51.0067444 0.0817097 + -51.0180321 0.0693195 + -51.0270691 0.0511428 + -51.0340462 0.0428825 + -51.0379486 0.0344137 + -51.0404167 0.0209856 + -51.0461617 0.0116917 + -51.0552139 0.0000000 + -51.0622482 -0.0119855 + -51.0775032 -0.0273411 + -51.0800972 -0.0328399 + -51.0836411 -0.0403365 + -51.0871468 -0.0432859 + -51.0929527 -0.0443697 + -51.1041794 -0.0411026 + -51.1149559 -0.0426388 + -51.1236763 -0.0418615 + -51.1299210 -0.0389792 + -51.1353111 -0.0396425 + -51.1504021 -0.0483104 + -51.1555824 -0.0495982 + -51.1611900 -0.0488001 + -51.1697197 -0.0450967 + -51.1765709 -0.0447247 + -51.1852684 -0.0477079 + -51.1945992 -0.0483972 + -51.2026482 -0.0553458 + -51.2026062 -0.0618221 + -51.2054825 -0.0662290 + -51.2098351 -0.0668854 + -51.2127266 -0.0689937 + -51.2203255 -0.0809536 + -51.2205009 -0.0861779 + -51.2335091 -0.0960845 + -51.2411003 -0.1097165 + -51.2483025 -0.1191670 + -51.2542458 -0.1304893 + -51.2577286 -0.1378257 + -51.2735901 -0.1561093 + -51.2789192 -0.1663838 + -51.2915115 -0.1771230 + -51.2908287 -0.1863129 + -51.3302689 -0.2505162 + -51.3417587 -0.2714893 + -51.3497429 -0.2890961 + -51.3536110 -0.3010342 + -51.3523216 -0.3081309 + -51.3562126 -0.3165163 + -51.3594894 -0.3236433 + -51.3607063 -0.3282493 + -51.3658447 -0.3360154 + -51.3719215 -0.3602989 + -51.3920708 -0.3907358 + -51.3959541 -0.4005841 + -51.4004974 -0.4041665 + -51.4193420 -0.4120209 + -51.4131203 -0.4267800 + -51.4113350 -0.4309906 + -51.4094086 -0.4399665 + -51.3914566 -0.4229204 + -51.3619003 -0.4018279 + -51.3573837 -0.3942743 + -51.3435478 -0.3826888 + -51.3249855 -0.3639660 + -51.3190765 -0.3540081 + -51.3167686 -0.3501179 + -51.3061600 -0.3209978 + -51.3029213 -0.3080184 + -51.3015060 -0.3019490 + -51.2853127 -0.2700758 + -51.2810593 -0.2537471 + -51.2767448 -0.2468224 + -51.2724800 -0.2319571 + -51.2675552 -0.2231481 + -51.2603455 -0.2151595 + -51.2512550 -0.2086214 + -51.2437973 -0.1999441 + -51.2374878 -0.1872159 + -51.2247086 -0.1737571 + -51.2212143 -0.1680923 + -51.2078400 -0.1502414 + -51.2022667 -0.1458164 + -51.1884003 -0.1402910 + -51.1763344 -0.1448072 + -51.1694946 -0.1432989 + -51.1516800 -0.1383732 + -51.1456642 -0.1381235 + -51.1246834 -0.1409072 + -51.1215439 -0.1450649 + -51.1177788 -0.1498454 + -51.1121712 -0.1504350 + -51.1111069 -0.1541891 + -51.1159248 -0.1788792 + -51.1146507 -0.1836765 + -51.1177368 -0.1872496 + -51.1247406 -0.1952379 + -51.1441002 -0.2179371 + -51.1516685 -0.2349152 + -51.1534729 -0.2447490 + -51.1525955 -0.2518484 + -51.1500587 -0.2589374 + -51.1487846 -0.2688448 + -51.1540489 -0.2838334 + -51.1754150 -0.3169978 + -51.1820107 -0.3245657 + -51.1952209 -0.3359400 + -51.2187920 -0.3501000 + -51.2337151 -0.3535426 + -51.2307854 -0.3572853 + -51.2317924 -0.3618904 + -51.2462616 -0.3716005 + -51.2693596 -0.3951622 + -51.2915535 -0.4098218 + -51.3144226 -0.4249291 + -51.3589020 -0.4498830 + -51.3727264 -0.4631416 + -51.3892860 -0.4707733 + -51.3990326 -0.4725079 + -51.3960953 -0.4775057 + -51.3959999 -0.4927651 + -51.3767204 -0.4880421 + -51.3731880 -0.4888555 + -51.3651047 -0.4869213 + -51.3599205 -0.4854249 + -51.3524666 -0.4824505 + -51.3444290 -0.4727828 + -51.3320122 -0.4670581 + -51.3069267 -0.4616687 + -51.2599030 -0.4454740 + -51.2430992 -0.4434815 + -51.2458000 -0.4475176 + -51.2528152 -0.4502346 + -51.2619095 -0.4563567 + -51.2664452 -0.4611941 + -51.2719803 -0.4718911 + -51.2794189 -0.4775835 + -51.2750092 -0.4854978 + -51.2841034 -0.4916199 + -51.2786789 -0.4959743 + -51.2597580 -0.5000302 + -51.2436523 -0.4865458 + -51.2126312 -0.4677362 + -51.1810150 -0.4451590 + -51.1647072 -0.4314633 + -51.1588249 -0.4255474 + -51.1501923 -0.4168639 + -51.1453247 -0.4112670 + -51.1414261 -0.4039253 + -51.1363449 -0.3877967 + -51.1295509 -0.3789718 + -51.1217079 -0.3720221 + -51.1088905 -0.3644104 + -51.0870667 -0.3368830 + -51.0822983 -0.3364323 + -51.0781708 -0.3326426 + -51.0750847 -0.3286503 + -51.0708046 -0.3169171 + -51.0690002 -0.3070823 + -51.0464554 -0.2642935 + -51.0425377 -0.2600876 + -51.0329056 -0.2420484 + -51.0308495 -0.2386907 + -51.0296974 -0.2248905 + -51.0339088 -0.2161424 + -51.0316849 -0.2073504 + -51.0323563 -0.2000409 + -51.0282784 -0.1891465 + -51.0279350 -0.1784873 + -51.0258865 -0.1742938 + -51.0195503 -0.1598317 + -51.0175209 -0.1531311 + -51.0097008 -0.1434650 + -51.0048141 -0.1290135 + -50.9889603 -0.1105169 + -50.9595909 -0.0658082 + -50.9531937 -0.0605398 + -50.9483147 -0.0589722 + -50.9405632 -0.0564823 + -50.9345245 -0.0595739 + -50.9251251 -0.0684924 + -50.9197350 -0.0680368 + -50.9112549 -0.0640078 + -50.9071274 -0.0604268 + -50.8921890 -0.0601121 + -50.8853493 -0.0592283 + -50.8760567 -0.0524775 + -50.8613548 -0.0479858 + -50.8339577 -0.0492538 + -50.8240051 -0.0477202 + -50.8035393 -0.0369182 + -50.7745743 -0.0255227 + -50.7604790 -0.0228200 + -50.7461967 -0.0179117 + -50.7183418 0.0000000 + -50.7122269 0.0000000 + -50.7000008 0.0000000 + -50.6683998 0.0000000 + -50.6627808 0.0000000 + -50.6606712 -0.0040732 + -50.6587067 -0.0078735 + -50.6505508 -0.0167969 + -50.6456985 -0.0278351 + -50.6447639 -0.0424525 + -50.6378517 -0.0513865 + -50.6359406 -0.0572222 + -50.6377602 -0.0641307 + -50.6325417 -0.0684801 + -50.6248474 -0.0709303 + -50.6146011 -0.0817198 + -50.6133080 -0.0879785 + -50.6140976 -0.0936257 + -50.6188049 -0.1026451 + -50.6229401 -0.1073902 + -50.6321831 -0.1179968 + -50.6400681 -0.1184732 + -50.6461906 -0.1327269 + -50.6575546 -0.1394962 + -50.6661987 -0.1495899 + -50.6740456 -0.1552895 + -50.6994019 -0.1792957 + -50.7100983 -0.1927478 + -50.7336998 -0.2301154 + -50.7363510 -0.2368223 + -50.7439766 -0.2444010 + -50.7451515 -0.2546492 + -50.7434464 -0.2606972 + -50.7440224 -0.2675978 + -50.7513618 -0.2864599 + -50.7547226 -0.3098913 + -50.7565536 -0.3151293 + -50.7658043 -0.3279450 + -50.7671738 -0.3400771 + -50.7708588 -0.3474187 + -50.7745781 -0.3499534 + -50.7665901 -0.3933703 + -50.7571373 -0.4093961 + -50.7505684 -0.4285784 + -50.7655563 -0.4523067 + -50.7707253 -0.4550616 + -50.7845612 -0.4656121 + -50.7836838 -0.4725036 + -50.7863503 -0.4769125 + -50.8451767 -0.5262483 + -50.8478966 -0.5233403 + -50.8508682 -0.5141635 + -50.8568802 -0.5154602 + -50.8566399 -0.5198489 + -50.8584862 -0.5232068 + -50.8650894 -0.5291070 + -50.8751297 -0.5322376 + -50.9048691 -0.5415123 + -50.9178886 -0.5503832 + -50.9487190 -0.5658597 + -50.9677963 -0.5695461 + -50.9884682 -0.5832788 + -50.9971275 -0.5923281 + -50.9991531 -0.5996590 + -51.0100822 -0.6110240 + -51.0184822 -0.6280159 + -51.0242462 -0.6355823 + -51.0320930 -0.6419077 + -51.0380440 -0.6526119 + -51.0413513 -0.6549341 + -51.0479927 -0.6553980 + -51.0508118 -0.6685882 + -51.0509300 -0.6819705 + -51.0242081 -0.6719603 + -51.0130310 -0.6664470 + -50.9992180 -0.6517168 + -50.9846725 -0.6225559 + -50.9784241 -0.6250213 + -50.9724617 -0.6168262 + -50.9677010 -0.6144935 + -50.9623032 -0.6142464 + -50.9600410 -0.6108858 + -50.9461899 -0.6018002 + -50.9347687 -0.6019295 + -50.9217834 -0.5882493 + -50.8975677 -0.5765812 + -50.8816147 -0.5716605 + -50.8668823 -0.5700932 + -50.8596001 -0.5725497 + -50.8498535 -0.5705993 + -50.8355713 -0.5642261 + -50.8277206 -0.5587356 + -50.8262939 -0.5547534 + -50.8177795 -0.5549013 + -50.8086700 -0.5514911 + -50.8034706 -0.5522909 + -50.8003387 -0.5551951 + -50.7979851 -0.5652128 + -50.8019905 -0.5859376 + -50.8019218 -0.5959718 + -50.8057213 -0.6169052 + -50.8032074 -0.6198146 + -50.8016968 -0.6279572 + -50.7970848 -0.6640932 + -50.7939529 -0.6663706 + -50.7848282 -0.6646326 + -50.7736168 -0.6350731 + -50.7633476 -0.6152973 + -50.7480049 -0.5857590 + -50.7427216 -0.5698318 + -50.7388229 -0.5629056 + -50.7328491 -0.5565905 + -50.7291107 -0.5567726 + -50.7247238 -0.5600858 + -50.7165108 -0.5767504 + -50.7126656 -0.5919833 + -50.7063866 -0.5988369 + -50.7007561 -0.6021407 + -50.6924553 -0.6018711 + -50.6843414 -0.6041120 + -50.6862411 -0.5995258 + -50.6937866 -0.5604876 + -50.6911201 -0.5558695 + -50.6938744 -0.5477363 + -50.6995049 -0.5446420 + -50.7085075 -0.5340458 + -50.7110481 -0.5271654 + -50.7088089 -0.5208776 + -50.7104950 -0.5173369 + -50.7192726 -0.5090383 + -50.7230644 -0.5015404 + -50.7243652 -0.4933976 + -50.7229538 -0.4877436 + -50.7188339 -0.4829059 + -50.7006264 -0.4449391 + -50.7004929 -0.4346958 + -50.6935272 -0.3922139 + -50.6917076 -0.3857214 + -50.6921730 -0.3784094 + -50.6846161 -0.3610066 + -50.6811256 -0.3559643 + -50.6762505 -0.3406712 + -50.6655235 -0.3316058 + -50.6620941 -0.3173693 + -50.6578026 -0.3079323 + -50.6547279 -0.3024764 + -50.6541939 -0.2905595 + -50.6546516 -0.2842936 + -50.6522217 -0.2757069 + -50.6415367 -0.2605815 + -50.6234055 -0.2420574 + -50.6110115 -0.2342335 + -50.6064758 -0.2296029 + -50.5849075 -0.1987235 + -50.5713158 -0.1842042 + -50.5665588 -0.1820794 + -50.5549927 -0.1742609 + -50.5516853 -0.1723555 + -50.5450478 -0.1718886 + -50.5382271 -0.1682846 + -50.5317879 -0.1686551 + -50.5280685 -0.1667466 + -50.5201836 -0.1666875 + -50.5106354 -0.1666156 + -50.5032120 -0.1602905 + -50.4976120 -0.1596214 + -50.4796295 -0.1500828 + -50.4790916 -0.1385863 + -50.4733429 -0.1301843 + -50.4471207 -0.1122256 + -50.4348755 -0.1125503 + -50.4315720 -0.1102269 + -50.4278984 -0.1018406 + -50.4235649 -0.0984647 + -50.4158897 -0.0981968 + -50.4088631 -0.0943821 + -50.4018021 -0.0949554 + -50.3968010 -0.0978423 + -50.3901863 -0.0944488 + -50.3704643 -0.0951326 + -50.3358841 -0.0854640 + -50.3294525 -0.0852053 + -50.3211288 -0.0882749 + -50.3175354 -0.0970225 + -50.3079414 -0.1032166 + -50.3040237 -0.0998431 + -50.2973938 -0.0987466 + -50.2919807 -0.1007947 + -50.2800827 -0.1103129 + -50.2659378 -0.1143818 + -50.2615547 -0.1176909 + -50.2457771 -0.1186126 + -50.2376366 -0.1246075 + -50.2283173 -0.1222361 + -50.1988564 -0.1213771 + -50.1871910 -0.1271360 + -50.1751404 -0.1291303 + -50.1699486 -0.1292980 + -50.1614113 -0.1331997 + -50.1539993 -0.1254098 + -50.1399002 -0.1240440 + -50.1236763 -0.1289291 + -50.1095581 -0.1294431 + -50.1006165 -0.1316699 + -50.0889244 -0.1407706 + -50.0500565 -0.1483982 + -50.0450478 -0.1519098 + -50.0303230 -0.1509550 + -50.0128860 -0.1516493 + -50.0020676 -0.1549042 + -49.9970474 -0.1596700 + -49.9901695 -0.1633753 + -49.9731483 -0.1636536 + -49.9650459 -0.1652595 + -49.9458885 -0.1728343 + -49.9221077 -0.1774901 + -49.9172058 -0.1784496 + -49.8570824 -0.1963406 + -49.8418961 -0.2003935 + -49.8377190 -0.2007817 + -49.8109512 -0.2032698 + -49.7968750 -0.1985547 + -49.7927208 -0.1989376 + -49.7452354 -0.2192265 + -49.7185974 -0.2277774 + -49.6903534 -0.2300450 + -49.6851196 -0.2352252 + -49.6668053 -0.2415471 + -49.6558075 -0.2410350 + -49.6387444 -0.2463228 + -49.6308479 -0.2472995 + -49.6184349 -0.2423863 + -49.6096764 -0.2475355 + -49.6044998 -0.2460284 + -49.5766068 -0.2311582 + -49.5672302 -0.2354657 + -49.5593719 -0.2318446 + -49.5526962 -0.2359667 + -49.5462570 -0.2365378 + -49.5372009 -0.2344946 + -49.5148735 -0.2419061 + -49.5078621 -0.2366210 + -49.4799232 -0.2267630 + -49.4583549 -0.2251103 + -49.4460640 -0.2302264 + -49.4425735 -0.2258073 + -49.4417839 -0.2209941 + -49.4364548 -0.2136327 + -49.4296150 -0.2125273 + -49.4251862 -0.2204293 + -49.4177399 -0.2176464 + -49.4117203 -0.2175932 + -49.4099121 -0.2106807 + -49.4055901 -0.2064629 + -49.4015121 -0.1982767 + -49.3920670 -0.1864909 + -49.3800545 -0.1834583 + -49.3734016 -0.1850706 + -49.3608208 -0.1759729 + -49.3575592 -0.1692575 + -49.3457527 -0.1664355 + -49.3397942 -0.1594862 + -49.3350258 -0.1588162 + -49.3262825 -0.1620815 + -49.3261414 -0.1543483 + -49.3195190 -0.1524087 + -49.3122177 -0.1565223 + -49.3078651 -0.1560649 + -49.2886620 -0.1450266 + -49.2803535 -0.1457871 + -49.2728539 -0.1490633 + -49.2589874 -0.1447586 + -49.2423820 -0.1452353 + -49.2390442 -0.1468769 + -49.2358971 -0.1510273 + -49.2301178 -0.1474222 + -49.2355614 -0.1420389 + -49.2314415 -0.1384490 + -49.2254257 -0.1383944 + -49.2204742 -0.1347973 + -49.2092781 -0.1336507 + -49.2015915 -0.1348341 + -49.1958046 -0.1320648 + -49.1868973 -0.1303119 + -49.1795654 -0.1377672 + -49.1741180 -0.1435685 + -49.1672325 -0.1476844 + -49.1620293 -0.1491246 + -49.1517220 -0.1414822 + -49.1500969 -0.1377062 + -49.1470032 -0.1357969 + -49.1411629 -0.1390865 + -49.1352921 -0.1455107 + -49.1253128 -0.1477178 + -49.1071739 -0.1569529 + -49.0997238 -0.1543766 + -49.0907936 -0.1551305 + -49.0779457 -0.1531306 + -49.0684471 -0.1478185 + -49.0647163 -0.1475745 + -49.0586777 -0.1496081 + -49.0470886 -0.1461569 + -49.0423088 -0.1467395 + -49.0320854 -0.1524950 + -49.0260658 -0.1526481 + -49.0177002 -0.1598837 + -49.0142021 -0.1565074 + -49.0115623 -0.1500047 + -49.0031433 -0.1405230 + -48.9937286 -0.1487933 + -48.9864235 -0.1533215 + -48.9815521 -0.1637248 + -48.9648552 -0.1740160 + -48.9470787 -0.1886853 + -48.9400291 -0.1882007 + -48.9366875 -0.1904679 + -48.9347687 -0.1958831 + -48.9314156 -0.1991947 + -48.9237137 -0.2018384 + -48.9082375 -0.2146483 + -48.9013596 -0.2177178 + -48.8946571 -0.2243418 + -48.8904991 -0.2249292 + -48.8851509 -0.2196539 + -48.8691750 -0.2192927 + -48.8532524 -0.2128722 + -48.8459969 -0.2119665 + -48.8393440 -0.2133662 + -48.8263245 -0.2073901 + -48.8153076 -0.2089564 + -48.8099403 -0.2061879 + -48.7883110 -0.2107864 + -48.7809753 -0.2182388 + -48.7753677 -0.2186031 + -48.7699928 -0.2162520 + -48.7629318 -0.2170204 + -48.7542381 -0.2144284 + -48.7485962 -0.2185534 + -48.7406197 -0.2280894 + -48.7235527 -0.2329395 + -48.7170792 -0.2370559 + -48.7115250 -0.2319866 + -48.7010803 -0.2389903 + -48.6769829 -0.2412630 + -48.6636467 -0.2467754 + -48.6577377 -0.2352234 + -48.6517448 -0.2322397 + -48.6392822 -0.2331623 + -48.6418381 -0.2264998 + -48.6233749 -0.2256919 + -48.6184731 -0.2262952 + -48.6123619 -0.2270462 + -48.6025543 -0.2323831 + -48.5934448 -0.2302031 + -48.5736923 -0.2337701 + -48.5454483 -0.2353712 + -48.5392380 -0.2336374 + -48.5262375 -0.2473011 + -48.5210342 -0.2489212 + -48.5013237 -0.2480979 + -48.4973869 -0.2474317 + -48.4915771 -0.2471652 + -48.4780006 -0.2558068 + -48.4665794 -0.2565283 + -48.4615784 -0.2585678 + -48.4476852 -0.2569653 + -48.4383087 -0.2608424 + -48.4246025 -0.2613313 + -48.4184151 -0.2575068 + -48.4099236 -0.2555407 + -48.3966141 -0.2583321 + -48.3932648 -0.2610149 + -48.3833389 -0.2784697 + -48.3705826 -0.2879548 + -48.3649979 -0.2997154 + -48.3633728 -0.3031378 + -48.3621025 -0.3265333 + -48.3664131 -0.3731861 + -48.3696594 -0.3809533 + -48.3801384 -0.3919283 + -48.3968010 -0.4071463 + -48.4019661 -0.4099161 + -48.4110336 -0.4164874 + -48.4175797 -0.4263770 + -48.4247856 -0.4323024 + -48.4286308 -0.4425837 + -48.4303818 -0.4543076 + -48.4420395 -0.4937232 + -48.4531403 -0.5049148 + -48.4590797 -0.5131272 + -48.4626656 -0.5284234 + -48.4604149 -0.5463791 + -48.4640770 -0.5539420 + -48.4642334 -0.5593790 + -48.4591217 -0.5722891 + -48.4645309 -0.6135291 + -48.4710197 -0.6294836 + -48.4753494 -0.6334290 + -48.4819260 -0.6394193 + -48.4743767 -0.6470796 + -48.4722404 -0.6531216 + -48.4746704 -0.6596266 + -48.4835777 -0.6618071 + -48.4868813 -0.6637210 + -48.4893341 -0.6677186 + -48.4857635 -0.6718645 + -48.4795074 -0.6745202 + -48.4744759 -0.6792784 + -48.4735870 -0.6853333 + -48.4756165 -0.6901626 + -48.4746857 -0.7001888 + -48.4762611 -0.7091958 + -48.4791145 -0.7144509 + -48.4830284 -0.7180448 + -48.4772072 -0.7397322 + -48.4786148 -0.7445559 + -48.4957352 -0.7564361 + -48.5110207 -0.7649522 + -48.5167618 -0.7725373 + -48.5208321 -0.7813600 + -48.5307198 -0.7896135 + -48.5250473 -0.7962482 + -48.5239143 -0.8058566 + -48.5209541 -0.8112635 + -48.5173454 -0.8405034 + -48.5180931 -0.8492933 + -48.5222855 -0.8664829 + -48.5215569 -0.8773504 + -48.5280800 -0.8901715 + -48.5296974 -0.8943406 + -48.5376053 -0.9147343 + -48.5446091 -0.9204502 + -48.5619698 -0.9296145 + -48.5706825 -0.9311653 + -48.5868111 -0.9386441 + -48.5942726 -0.9401821 + -48.6114502 -0.9470429 + -48.6191483 -0.9458641 + -48.6268005 -0.9494950 + -48.6330299 -0.9495560 + -48.6354942 -0.9525083 + -48.6310997 -0.9560199 + -48.6166115 -0.9504402 + -48.6218376 -0.9684774 + -48.6273804 -0.9752244 + -48.6322212 -0.9903300 + -48.6390457 -0.9935343 + -48.6423340 -0.9973311 + -48.6570129 -1.0047953 + -48.6674309 -1.0015506 + -48.6655006 -1.0078056 + -48.6550827 -1.0112596 + -48.6459999 -1.0051050 + -48.6385117 -1.0060776 + -48.6244240 -1.0021751 + -48.6210670 -1.0054883 + -48.6232796 -1.0128299 + -48.6278191 -1.0162214 + -48.6281471 -1.0252173 + -48.6301880 -1.0292119 + -48.6334839 -1.0319629 + -48.6405449 -1.0322409 + -48.6477470 -1.0394235 + -48.6503677 -1.0478154 + -48.6488533 -1.0540743 + -48.6437988 -1.0615549 + -48.6373940 -1.0577270 + -48.6337662 -1.0459791 + -48.6265030 -1.0452801 + -48.6217537 -1.0418866 + -48.6177940 -1.0433118 + -48.6158905 -1.0470583 + -48.6172829 -1.0531378 + -48.6215057 -1.0625449 + -48.6277275 -1.0691357 + -48.6538773 -1.0936553 + -48.6625481 -1.0993876 + -48.6837769 -1.1175830 + -48.7156296 -1.1325344 + -48.7214050 -1.1371921 + -48.7414665 -1.1870902 + -48.7465439 -1.2252908 + -48.7535172 -1.2349806 + -48.7576675 -1.2354395 + -48.7664871 -1.2478667 + -48.7702065 -1.2499946 + -48.7756081 -1.2502555 + -48.7807732 -1.2534434 + -48.7887497 -1.2671176 + -48.7898369 -1.2840732 + -48.7848091 -1.2882085 + -48.7826843 -1.2929997 + -48.7900810 -1.3022755 + -48.7953835 -1.3349617 + -48.7998276 -1.3483940 + -48.8073692 -1.3641566 + -48.8035431 -1.3733256 + -48.8128128 -1.3822017 + -48.8245087 -1.3982137 + -48.8227615 -1.4074020 + -48.8233490 -1.4113833 + -48.8284798 -1.4181277 + -48.8271713 -1.4248097 + -48.8336678 -1.4411910 + -48.8327980 -1.4455762 + -48.8373070 -1.4521055 + -48.8426895 -1.4546677 + -48.8555756 -1.4547902 + -48.8717461 -1.4593384 + -48.8822975 -1.4644604 + -48.8887482 -1.4636843 + -48.8899193 -1.4720652 + -48.8979416 -1.4809288 + -48.9001656 -1.4878546 + -48.8969612 -1.4972390 + -48.9045753 -1.5052620 + -48.9108086 -1.5057399 + -48.9175301 -1.4980613 + -48.9252357 -1.4966704 + -48.9300003 -1.4983885 + -48.9335136 -1.5005143 + -48.9373817 -1.5095481 + -48.9481239 -1.5169722 + -48.9572945 -1.5143387 + -48.9649506 -1.5179681 + -48.9709969 -1.5161412 + -48.9788437 -1.5218643 + -48.9825821 -1.5221092 + -48.9886131 -1.5219562 + -48.9977760 -1.5199500 + -49.0037766 -1.5231444 + -49.0116730 -1.5232184 + -49.0168724 -1.5230577 + -49.0220299 -1.5274997 + -49.0272217 -1.5279666 + -49.0314941 -1.5382590 + -49.0453873 -1.5419457 + -49.0478516 -1.5453160 + -49.0536537 -1.5474626 + -49.0576210 -1.5456165 + -49.0714989 -1.5511848 + -49.0772972 -1.5533311 + -49.0858078 -1.5548744 + -49.0926323 -1.5589137 + -49.1013412 -1.5610862 + -49.1065369 -1.5613439 + -49.1102905 -1.5599140 + -49.1175232 -1.5647928 + -49.1295433 -1.5688789 + -49.1351585 -1.5689306 + -49.1412010 -1.5671033 + -49.1606712 -1.5752330 + -49.1655960 -1.5821829 + -49.1684151 -1.5926709 + -49.1681175 -1.6025034 + -49.1742363 -1.6159511 + -49.1781425 -1.6207995 + -49.1824913 -1.6227221 + -49.2026634 -1.6220689 + -49.2116165 -1.6204765 + -49.2230530 -1.6203712 + -49.2303467 -1.6183451 + -49.2612801 -1.6232291 + -49.2665024 -1.6205565 + -49.2789726 -1.6208783 + -49.2812195 -1.6255019 + -49.2918167 -1.6262246 + -49.3016624 -1.6175250 + -49.3066483 -1.6181978 + -49.3101959 -1.6165555 + -49.3137398 -1.6155406 + -49.3187294 -1.6155859 + -49.3245850 -1.6116629 + -49.3354263 -1.6082022 + -49.3443871 -1.6055626 + -49.3624878 -1.6040497 + -49.3605690 -1.6094730 + -49.3565826 -1.6134139 + -49.3521957 -1.6158856 + -49.3451271 -1.6160315 + -49.3407211 -1.6208043 + -49.3448029 -1.6294206 + -49.3547363 -1.6347404 + -49.3636093 -1.6421436 + -49.3731804 -1.6413919 + -49.3947563 -1.6466054 + -49.4012566 -1.6405945 + -49.4036446 -1.6288983 + -49.4131699 -1.6331679 + -49.4189911 -1.6330100 + -49.4221573 -1.6275969 + -49.4364166 -1.6377674 + -49.4478531 -1.6374495 + -49.4511223 -1.6441747 + -49.4424744 -1.6585366 + -49.4430656 -1.6623086 + -49.4476051 -1.6661154 + -49.4510956 -1.6711680 + -49.4556885 -1.6693250 + -49.4669151 -1.6692146 + -49.4730797 -1.6778479 + -49.4703331 -1.6826371 + -49.4660339 -1.6991303 + -49.4622345 -1.7057940 + -49.4663239 -1.7135720 + -49.4807777 -1.7254177 + -49.4995918 -1.7379290 + -49.5033340 -1.7379618 + -49.5306740 -1.7213187 + -49.5492401 -1.7189006 + -49.5587654 -1.7237964 + -49.5689583 -1.7230476 + -49.5954208 -1.7163712 + -49.6097527 -1.7183777 + -49.6298141 -1.7308969 + -49.6514587 -1.7536829 + -49.6562767 -1.7598052 + -49.6636620 -1.7613208 + -49.6714439 -1.7754081 + -49.6755600 -1.7804661 + -49.6797028 -1.7823846 + -49.6869888 -1.7816098 + -49.6917458 -1.7596769 + -49.6959229 -1.7574111 + -49.7019577 -1.7568347 + -49.7135735 -1.7602818 + -49.7232933 -1.7666417 + -49.7346420 -1.7772011 + -49.7362709 -1.7816101 + -49.7428741 -1.7877345 + -49.7704048 -1.8030347 + -49.7799149 -1.8098115 + -49.7934189 -1.8113892 + -49.8028984 -1.8217236 + -49.8333054 -1.8161180 + -49.8387032 -1.8071339 + -49.8446884 -1.7971691 + -49.8526611 -1.7884451 + -49.8649597 -1.7845720 + -49.8839111 -1.7811708 + -49.8922310 -1.7810308 + -49.8972740 -1.7741668 + -49.9219322 -1.7590927 + -49.9285851 -1.7595662 + -49.9401932 -1.7640568 + -49.9424095 -1.7590929 + -49.9419594 -1.7513053 + -49.9542694 -1.7457565 + -49.9592285 -1.7456583 + -49.9673538 -1.7475376 + -49.9937553 -1.7483804 + -50.0000000 -1.7506348 + -50.0068436 -1.7501609 + -50.0114365 -1.7476872 + -50.0141716 -1.7437340 + -50.0171776 -1.7316207 + -50.0347595 -1.7166963 + -50.0474434 -1.7167994 + -50.0526352 -1.7174685 + -50.0633736 -1.7269721 + -50.0654182 -1.7313827 + -50.0684929 -1.7370574 + -50.0730515 -1.7391874 + -50.0759315 -1.7429767 + -50.0941887 -1.7483554 + -50.1233521 -1.7678411 + -50.1373100 -1.7646042 + -50.1420860 -1.7652706 + -50.1581879 -1.7804651 + -50.1648293 -1.7821920 + -50.1723175 -1.7816240 + -50.1785164 -1.7869043 + -50.1864319 -1.7850839 + -50.1918335 -1.7855450 + -50.1997490 -1.7839339 + -50.2024727 -1.7810249 + -50.2078705 -1.7825328 + -50.2229042 -1.7742804 + -50.2484779 -1.7744811 + -50.2542801 -1.7774559 + -50.2681770 -1.7819595 + -50.2735214 -1.7899536 + -50.2821999 -1.7973453 + -50.2852821 -1.8019735 + -50.2911186 -1.8057632 + -50.2957916 -1.8148206 + -50.3088799 -1.8161781 + -50.3188171 -1.8223242 + -50.3252449 -1.8244665 + -50.3476753 -1.8284068 + -50.3563728 -1.8330774 + -50.3690567 -1.8331755 + -50.3767242 -1.8370011 + -50.3969116 -1.8346446 + -50.4004135 -1.8394850 + -50.3939323 -1.8438301 + -50.4026680 -1.8436879 + -50.4080734 -1.8439382 + -50.4130936 -1.8397911 + -50.4167976 -1.8452599 + -50.4124031 -1.8489941 + -50.4186172 -1.8523897 + -50.4163055 -1.8555111 + -50.4068184 -1.8728094 + -50.4044876 -1.8786511 + -50.4011345 -1.8821834 + -50.3994217 -1.8886578 + -50.4008446 -1.8930641 + -50.4057884 -1.8991708 + -50.4051132 -1.9062812 + -50.4070778 -1.9213651 + -50.4042969 -1.9318082 + -50.4011574 -1.9345055 + -50.3924179 -1.9350659 + -50.3813667 -1.9387486 + -50.3655663 -1.9382089 + -50.3576698 -1.9373109 + -50.3529167 -1.9330887 + -50.3491745 -1.9328501 + -50.3402672 -1.9281777 + -50.3250046 -1.9113166 + -50.3212967 -1.9066837 + -50.3032990 -1.8944057 + -50.2964592 -1.8912132 + -50.2856560 -1.8894548 + -50.2742691 -1.8828785 + -50.2609825 -1.8716934 + -50.2598267 -1.8679060 + -50.2567291 -1.8647425 + -50.2363625 -1.8631181 + -50.2305260 -1.8649564 + -50.2200928 -1.8696873 + -50.2125969 -1.8706750 + -50.2026062 -1.8718518 + -50.1872597 -1.8664987 + -50.1579704 -1.8620814 + -50.1450768 -1.8619784 + -50.1063156 -1.8459735 + -50.0976448 -1.8379509 + -50.0905304 -1.8387882 + -50.0776634 -1.8403026 + -50.0689507 -1.8375113 + -50.0571022 -1.8367882 + -50.0508080 -1.8436438 + -50.0454292 -1.8400421 + -50.0253525 -1.8281608 + -50.0029564 -1.8206538 + -49.9938164 -1.8191149 + -49.9825745 -1.8206975 + -49.9783630 -1.8273600 + -49.9693756 -1.8331456 + -49.9496346 -1.8313103 + -49.9444199 -1.8331513 + -49.9377060 -1.8404204 + -49.9310379 -1.8424586 + -49.9245262 -1.8505672 + -49.9145012 -1.8557167 + -49.9009514 -1.8599999 + -49.8973923 -1.8626910 + -49.8933525 -1.8735404 + -49.8860435 -1.8774559 + -49.8792152 -1.8734235 + -49.8754616 -1.8746479 + -49.8705902 -1.8854899 + -49.8661880 -1.8894298 + -49.8442268 -1.9047344 + -49.8353271 -1.8998469 + -49.8305397 -1.9000161 + -49.8230591 -1.8993257 + -49.8188858 -1.9011750 + -49.8085175 -1.8973209 + -49.7979202 -1.8961855 + -49.7767105 -1.8957986 + -49.7650452 -1.8982114 + -49.7580185 -1.8927112 + -49.7405853 -1.8883779 + -49.7341805 -1.8833007 + -49.7260857 -1.8815584 + -49.7213440 -1.8764954 + -49.7159653 -1.8733106 + -49.7028961 -1.8692230 + -49.6889763 -1.8676394 + -49.6852760 -1.8623760 + -49.6871719 -1.8592533 + -49.6801453 -1.8543794 + -49.6764450 -1.8491160 + -49.6756783 -1.8413661 + -49.6707420 -1.8346275 + -49.6649551 -1.8306018 + -49.6605873 -1.8260354 + -49.6554718 -1.8206838 + -49.6534653 -1.8118773 + -49.6448021 -1.8034321 + -49.6379814 -1.7983510 + -49.6158066 -1.7895807 + -49.5911369 -1.7807877 + -49.5832291 -1.7811385 + -49.5594788 -1.7865825 + -49.5549088 -1.7863334 + -49.5462036 -1.7829100 + -49.5314560 -1.7759401 + -49.5010223 -1.7651465 + -49.4846497 -1.7587253 + -49.4808846 -1.7616221 + -49.4674110 -1.7564807 + -49.4603691 -1.7532797 + -49.4554176 -1.7488415 + -49.4456635 -1.7466636 + -49.4224663 -1.7362044 + -49.4129181 -1.7344460 + -49.3965378 -1.7288601 + -49.3865585 -1.7287716 + -49.3728752 -1.7242547 + -49.3583412 -1.7218232 + -49.3481941 -1.7169195 + -49.3453178 -1.7133366 + -49.3322487 -1.7098720 + -49.3181229 -1.7080710 + -49.3099861 -1.7113461 + -49.3064575 -1.7106866 + -49.2859268 -1.7046422 + -49.2763481 -1.7064395 + -49.2715302 -1.7101629 + -49.2668839 -1.7184911 + -49.2701530 -1.7250078 + -49.2662811 -1.7396219 + -49.2730484 -1.7503550 + -49.2700653 -1.7584900 + -49.2685585 -1.7643354 + -49.2701836 -1.7683263 + -49.2693138 -1.7727131 + -49.2671928 -1.7777168 + -49.2688217 -1.7814982 + -49.2760468 -1.7874229 + -49.2900505 -1.8030354 + -49.3118172 -1.8342038 + -49.3268394 -1.8523368 + -49.3348389 -1.8651751 + -49.3420525 -1.8714918 + -49.3589859 -1.8863193 + -49.3655319 -1.8950073 + -49.3679848 -1.9035609 + -49.3648376 -1.9068810 + -49.3662262 -1.9144282 + -49.3632698 -1.9196342 + -49.3650856 -1.9261382 + -49.3629303 -1.9344910 + -49.3637276 -1.9386837 + -49.3734207 -1.9481884 + -49.3762398 -1.9586781 + -49.3824081 -1.9668953 + -49.3871002 -1.9774021 + -49.3836937 -1.9865804 + -49.3805542 -1.9888546 + -49.3807220 -1.9930422 + -49.3764763 -2.0030508 + -49.3727074 -2.0059478 + -49.3773422 -2.0157590 + -49.3822021 -2.0384743 + -49.3802605 -2.0462017 + -49.3834190 -2.0659041 + -49.3826904 -2.0778282 + -49.3857574 -2.0841346 + -49.3898277 -2.0944271 + -49.3996887 -2.1087480 + -49.4086876 -2.1262009 + -49.4121933 -2.1299994 + -49.4124908 -2.1433988 + -49.4103661 -2.1488223 + -49.4027863 -2.1592205 + -49.3988113 -2.1616976 + -49.3936081 -2.1620696 + -49.3921814 -2.1584988 + -49.3880501 -2.1553218 + -49.3826103 -2.1588318 + -49.3634491 -2.1361413 + -49.3589554 -2.1278520 + -49.3477516 -2.1246123 + -49.3434753 -2.1138992 + -49.3393517 -2.1098847 + -49.3334007 -2.1006222 + -49.3284187 -2.0991127 + -49.3240585 -2.0984449 + -49.3106308 -2.0878592 + -49.2941360 -2.0711753 + -49.2914505 -2.0688488 + -49.2804070 -2.0474000 + -49.2755470 -2.0322862 + -49.2635765 -2.0219221 + -49.2641029 -2.0093689 + -49.2615280 -2.0052514 + -49.2416687 -1.9827945 + -49.2266769 -1.9611005 + -49.2164803 -1.9381952 + -49.2053871 -1.9318881 + -49.2016373 -1.9236190 + -49.1980362 -1.9074711 + -49.1925201 -1.8963279 + -49.1836624 -1.8870382 + -49.1791496 -1.8798819 + -49.1781578 -1.8748492 + -49.1740379 -1.8704170 + -49.1703033 -1.8691272 + -49.1618004 -1.8665375 + -49.1576843 -1.8618958 + -49.1528053 -1.8492941 + -49.1419258 -1.8337080 + -49.1332664 -1.8250477 + -49.1310272 -1.8200041 + -49.1387482 -1.8167269 + -49.1350975 -1.8064386 + -49.1327438 -1.7909309 + -49.1346436 -1.7876000 + -49.1305580 -1.7796105 + -49.1312370 -1.7733380 + -49.1296234 -1.7678819 + -49.1145744 -1.7533039 + -49.1077232 -1.7521943 + -49.0998878 -1.7476925 + -49.0920258 -1.7407490 + -49.0876808 -1.7384067 + -49.0818634 -1.7377250 + -49.0796127 -1.7339379 + -49.0739632 -1.7374432 + -49.0706558 -1.7353194 + -49.0707016 -1.7302979 + -49.0600052 -1.7178513 + -49.0519485 -1.7119174 + -49.0492935 -1.7066609 + -49.0361481 -1.6887517 + -49.0324440 -1.6847410 + -49.0280914 -1.6830263 + -49.0210609 -1.6789854 + -49.0124168 -1.6692789 + -49.0103874 -1.6640279 + -49.0114899 -1.6569235 + -49.0103188 -1.6485426 + -49.0145378 -1.6420953 + -49.0131187 -1.6378968 + -49.0028381 -1.6254547 + -48.9861221 -1.6119068 + -48.9731865 -1.5942082 + -48.9650650 -1.5958062 + -48.9556847 -1.5984380 + -48.9496651 -1.5975442 + -48.9442902 -1.5943547 + -48.9362564 -1.5863279 + -48.9285774 -1.5847905 + -48.9012527 -1.5723954 + -48.8968773 -1.5731914 + -48.8953819 -1.5777802 + -48.8964462 -1.5974597 + -48.8907318 -1.6082861 + -48.8933525 -1.6168897 + -48.9011765 -1.6253343 + -48.9040184 -1.6326853 + -48.9095650 -1.6398522 + -48.9045029 -1.6475465 + -48.9100571 -1.6540859 + -48.9093208 -1.6662160 + -48.9113655 -1.6700016 + -48.9121323 -1.6767055 + -48.9239120 -1.6845590 + -48.9265518 -1.6912807 + -48.9311714 -1.6867207 + -48.9357491 -1.6863456 + -48.9548454 -1.7120554 + -48.9514809 -1.7166209 + -48.9463615 -1.7303903 + -48.9364738 -1.7428534 + -48.9339294 -1.7480611 + -48.9202042 -1.7481408 + -48.9123383 -1.7445086 + -48.9077682 -1.7438370 + -48.8984146 -1.7433298 + -48.8954353 -1.7286537 + -48.8853912 -1.7130719 + -48.8835869 -1.7057309 + -48.8838577 -1.6990370 + -48.8870583 -1.6900693 + -48.8856659 -1.6833596 + -48.8778381 -1.6757525 + -48.8689461 -1.6706449 + -48.8602638 -1.6651218 + -48.8546791 -1.6619298 + -48.8551750 -1.6533554 + -48.8556290 -1.6491741 + -48.8533897 -1.6441313 + -48.8486366 -1.6411563 + -48.8390884 -1.6393906 + -48.8295784 -1.6336502 + -48.8254662 -1.6287980 + -48.8185158 -1.6161764 + -48.8123322 -1.6104673 + -48.8034210 -1.6076618 + -48.7995033 -1.6038573 + -48.7962418 -1.5973393 + -48.7969246 -1.5908593 + -48.7802773 -1.5704029 + -48.7715797 -1.5671802 + -48.7672462 -1.5633718 + -48.7641754 -1.5585297 + -48.7611809 -1.5453190 + -48.7411880 -1.5271307 + -48.7374992 -1.5218644 + -48.7363930 -1.5067891 + -48.7341690 -1.5000722 + -48.7267647 -1.4918402 + -48.7114334 -1.4866701 + -48.7069168 -1.4805589 + -48.7057228 -1.4751070 + -48.7070656 -1.4648681 + -48.7062836 -1.4596295 + -48.7059326 -1.4529312 + -48.7090759 -1.4502412 + -48.7087097 -1.4450076 + -48.7000504 -1.4378096 + -48.6936760 -1.4302156 + -48.6890030 -1.4190814 + -48.6856995 -1.4167482 + -48.6823959 -1.4146234 + -48.6737938 -1.4011500 + -48.6653786 -1.3901887 + -48.6648407 -1.3809779 + -48.6580086 -1.3784001 + -48.6560020 -1.3706403 + -48.6524849 -1.3691410 + -48.6489410 -1.3701527 + -48.6451530 -1.3751360 + -48.6426201 -1.3792958 + -48.6357346 -1.3819476 + -48.6238251 -1.4100754 + -48.6111908 -1.4271069 + -48.6059608 -1.4306121 + -48.5976334 -1.4317853 + -48.5916328 -1.4290063 + -48.5872002 -1.4145263 + -48.5880775 -1.4097234 + -48.5900421 -1.4001186 + -48.5938263 -1.3957621 + -48.5934525 -1.3913655 + -48.5982780 -1.3868102 + -48.6045074 -1.3870810 + -48.6093903 -1.3747866 + -48.6130295 -1.3656160 + -48.6135101 -1.3589257 + -48.6023178 -1.3341293 + -48.6011467 -1.3263773 + -48.6029625 -1.3102860 + -48.6011353 -1.3058752 + -48.5976219 -1.3037483 + -48.5873871 -1.3092961 + -48.5805626 -1.3058811 + -48.5739250 -1.3045608 + -48.5666885 -1.3005142 + -48.5589905 -1.3014845 + -48.5539513 -1.3066638 + -48.5416451 -1.3113536 + -48.5372696 -1.3123560 + -48.5347443 -1.3154688 + -48.5330315 -1.3208910 + -48.5338287 -1.3244561 + -48.5256348 -1.3333700 + -48.5235138 -1.3377427 + -48.5242920 -1.3431895 + -48.5227966 -1.3473586 + -48.5248032 -1.3547007 + -48.5232811 -1.3615894 + -48.5251236 -1.3647465 + -48.5334969 -1.3796836 + -48.5336342 -1.3872167 + -48.5397758 -1.4393729 + -48.5381508 -1.4571408 + -48.5374298 -1.4669672 + -48.5333252 -1.4828274 + -48.5223083 -1.5044785 + -48.5181923 -1.5215942 + -48.5153580 -1.5349573 + -48.5117798 -1.5393159 + -48.5077896 -1.5436697 + -48.5017128 -1.5484217 + -48.4958534 -1.5525482 + -48.4856949 -1.5497267 + -48.4790840 -1.5452665 + -48.4877167 -1.5342634 + -48.4923401 -1.5290786 + -48.4900284 -1.5104331 + -48.4909134 -1.5050025 + -48.4882355 -1.5022550 + -48.4818993 -1.5126541 + -48.4751816 -1.5194912 + -48.4691315 -1.5215231 + -48.4641075 -1.5252390 + -48.4619789 -1.5302399 + -48.4540863 -1.5295330 + -48.4488907 -1.5294806 + -48.4459991 -1.5273595 + -48.4350090 -1.5245286 + -48.4242668 -1.5177253 + -48.4163857 -1.5159717 + -48.4097290 -1.5163231 + -48.3974495 -1.5178727 + -48.3827515 -1.5118661 + -48.3740273 -1.5109409 + -48.3641319 -1.5028892 + -48.3370399 -1.4888048 + -48.3302536 -1.4816219 + -48.3187332 -1.4781948 + -48.3171425 -1.4622394 + -48.3195610 -1.4488736 + -48.3243446 -1.4485040 + -48.3363495 -1.4536479 + -48.3492088 -1.4567077 + -48.3693504 -1.4587948 + -48.3731117 -1.4567407 + -48.3787308 -1.4561701 + -48.3868065 -1.4591812 + -48.3957481 -1.4588530 + -48.4040451 -1.4606100 + -48.4317589 -1.4749084 + -48.4581490 -1.4755912 + -48.4748192 -1.4715739 + -48.4955559 -1.4765931 + -48.5011826 -1.4749752 + -48.5053825 -1.4706235 + -48.5079346 -1.4434494 + -48.5071640 -1.4371651 + -48.5004578 -1.4208064 + -48.4996262 -1.4002678 + -48.4948807 -1.3755330 + -48.4907265 -1.3328130 + -48.4919205 -1.3169254 + -48.4854736 -1.2961498 + -48.4802322 -1.2795709 + -48.4819412 -1.2747766 + -48.4703217 -1.2516490 + -48.4670372 -1.2474327 + -48.4484711 -1.2336494 + -48.4454575 -1.2231598 + -48.4359360 -1.2192981 + -48.4281120 -1.2121074 + -48.4284477 -1.1991411 + -48.4305534 -1.1947576 + -48.4310684 -1.1857164 + -48.4347763 -1.1895829 + -48.4593925 -1.1795800 + -48.4669304 -1.1737989 + -48.4738960 -1.1627815 + -48.4773788 -1.1525921 + -48.4785995 -1.1490233 + -48.4751244 -1.1435498 + -48.4641724 -1.1371652 + -48.4577522 -1.1352186 + -48.4515762 -1.1290909 + -48.4462013 -1.1265270 + -48.4359283 -1.1145006 + -48.4319916 -1.1136242 + -48.4293137 -1.1112963 + -48.4195328 -1.0917457 + -48.4212875 -1.0821418 + -48.4194832 -1.0758494 + -48.4157791 -1.0718380 + -48.4070511 -1.0721684 + -48.4024200 -1.0684664 + -48.3996315 -1.0662370 + -48.3914986 -1.0692919 + -48.3819733 -1.0660584 + -48.3597450 -1.0658333 + -48.3527031 -1.0634602 + -48.3464394 -1.0667433 + -48.3325310 -1.0655563 + -48.3262672 -1.0686297 + -48.3231087 -1.0727805 + -48.3209381 -1.0821706 + -48.3204765 -1.0865591 + -48.3264351 -1.0935214 + -48.3288689 -1.0991937 + -48.3275909 -1.1025279 + -48.3210144 -1.1049106 + -48.3131371 -1.1140934 + -48.3031769 -1.1127368 + -48.3002510 -1.1147981 + -48.2976990 -1.1204202 + -48.2867279 -1.1163335 + -48.2782631 -1.1110179 + -48.2747993 -1.1040797 + -48.2790184 -1.0978476 + -48.2875252 -1.0782739 + -48.2840881 -1.0690358 + -48.2903595 -1.0649166 + -48.2864761 -1.0588112 + -48.2967377 -1.0505503 + -48.2989273 -1.0394871 + -48.2996101 -1.0332199 + -48.2984123 -1.0283966 + -48.3021736 -1.0261343 + -48.3031464 -1.0121318 + -48.3084641 -0.9998456 + -48.3068428 -0.9956467 + -48.3133545 -0.9883930 + -48.3161201 -0.9819378 + -48.3096886 -0.9603302 + -48.3035851 -0.9475105 + -48.2957993 -0.9367653 + -48.2901115 -0.9239499 + -48.2631302 -0.9008781 + -48.2566261 -0.8868003 + -48.2503548 -0.8907093 + -48.2496948 -0.8737628 + -48.2460938 -0.8599242 + -48.2397957 -0.8458480 + -48.2359009 -0.8409989 + -48.2311287 -0.8403220 + -48.2253838 -0.8333616 + -48.2133865 -0.8284281 + -48.1930313 -0.8284272 + -48.1851158 -0.8308543 + -48.1792984 -0.8310033 + -48.1681442 -0.8248230 + -48.1599083 -0.8178366 + -48.1624260 -0.8151450 + -48.1592369 -0.8019381 + -48.1612778 -0.7850216 + -48.1586151 -0.7814393 + -48.1484642 -0.7788238 + -48.1439285 -0.7756398 + -48.1396980 -0.7628407 + -48.1364021 -0.7600887 + -48.1316643 -0.7564838 + -48.1327477 -0.7518956 + -48.1303139 -0.7462244 + -48.1169777 -0.7304026 + -48.1050186 -0.7219145 + -48.1021538 -0.7174935 + -48.1009789 -0.7107901 + -48.0865517 -0.7001842 + -48.0805550 -0.6974033 + -48.0686188 -0.6868241 + -48.0622978 -0.6756762 + -48.0546913 -0.6680689 + -48.0513763 -0.6666927 + -48.0453873 -0.6642075 + -48.0349846 -0.6661890 + -48.0291023 -0.6726080 + -48.0252380 -0.6846939 + -48.0246658 -0.7001604 + -48.0195732 -0.7103517 + -48.0223083 -0.7271083 + -48.0199852 -0.7308471 + -48.0112381 -0.7330554 + -48.0008736 -0.7314821 + -47.9990807 -0.7239355 + -47.9943008 -0.7243031 + -47.9881287 -0.7185920 + -47.9793434 -0.7046988 + -47.9756889 -0.6967148 + -47.9780197 -0.6921396 + -47.9733276 -0.6841442 + -47.9720306 -0.6690768 + -47.9662895 -0.6619065 + -47.9677048 -0.6458229 + -47.9478760 -0.6357849 + -47.9210701 -0.6173101 + -47.9161682 -0.6097314 + -47.9071732 -0.5960453 + -47.9064827 -0.5826575 + -47.9004478 -0.5842657 + -47.8976479 -0.5737826 + -47.9008789 -0.5627370 + -47.8994675 -0.5589589 + -47.8932953 -0.5534574 + -47.8907738 -0.5561484 + -47.8847542 -0.5558745 + -47.8785057 -0.5578982 + -47.8642998 -0.5658981 + -47.8619843 -0.5692182 + -47.8639297 -0.5813646 + -47.8613472 -0.5901178 + -47.8471642 -0.6156804 + -47.8432198 -0.6156380 + -47.8334732 -0.6144876 + -47.8254280 -0.6095922 + -47.8288040 -0.6041923 + -47.8227844 -0.6041272 + -47.8220177 -0.5980563 + -47.8185272 -0.5942556 + -47.8175812 -0.5856735 + -47.8133087 -0.5774739 + -47.8106804 -0.5705466 + -47.8129120 -0.5561453 + -47.8123360 -0.5515402 + -47.8069878 -0.5468829 + -47.7999344 -0.5463884 + -47.7961578 -0.5499015 + -47.7919044 -0.5594715 + -47.7994461 -0.5619809 + -47.7853508 -0.5704811 + -47.7757645 -0.5737218 + -47.7664185 -0.5738292 + -47.7608376 -0.5716776 + -47.7563019 -0.5684929 + -47.7576141 -0.5624439 + -47.7539139 -0.5586408 + -47.7497597 -0.5590134 + -47.7422028 -0.5666664 + -47.7366219 -0.5640969 + -47.7321167 -0.5581938 + -47.7288666 -0.5514682 + -47.7278709 -0.5476943 + -47.7189636 -0.5457160 + -47.7129936 -0.5410516 + -47.7082329 -0.5395355 + -47.7024155 -0.5398903 + -47.6980171 -0.5433956 + -47.6960945 -0.5483922 + -47.6985016 -0.5563623 + -47.6988220 -0.5649378 + -47.7041512 -0.5716863 + -47.7074814 -0.5901199 + -47.6978912 -0.5937783 + -47.6902885 -0.5869977 + -47.6855507 -0.5827717 + -47.6809921 -0.5818855 + -47.6741829 -0.5780474 + -47.6668053 -0.5689761 + -47.6622009 -0.5720614 + -47.6590157 -0.5787167 + -47.6350822 -0.6029137 + -47.6325340 -0.6083207 + -47.6318398 -0.6150035 + -47.6412239 -0.6496046 + -47.6361961 -0.6535220 + -47.6344910 -0.6576839 + -47.6352730 -0.6620833 + -47.6393661 -0.6677739 + -47.6450272 -0.6820542 + -47.6489334 -0.6856519 + -47.6511574 -0.6911126 + -47.6449165 -0.6922984 + -47.6373291 -0.6832235 + -47.6314354 -0.6906856 + -47.6253242 -0.6989820 + -47.6198692 -0.7008585 + -47.6084557 -0.6841592 + -47.6033554 -0.6757396 + -47.5930176 -0.6522075 + -47.5872726 -0.6458712 + -47.5819931 -0.6349411 + -47.5818291 -0.6309670 + -47.5814705 -0.6257356 + -47.5817719 -0.6171672 + -47.5781517 -0.6062551 + -47.5780258 -0.5987272 + -47.5820580 -0.5906183 + -47.5807495 -0.5774329 + -47.5766449 -0.5729975 + -47.5672531 -0.5774921 + -47.5576172 -0.5851204 + -47.5519371 -0.5917470 + -47.5494003 -0.5959005 + -47.5359955 -0.6066224 + -47.5308456 -0.6216179 + -47.5322495 -0.6262333 + -47.5365677 -0.6302536 + -47.5344543 -0.6333659 + -47.5296555 -0.6356128 + -47.5222588 -0.6474470 + -47.5196953 -0.6541089 + -47.5235405 -0.6629335 + -47.5191841 -0.6626755 + -47.5166512 -0.6664106 + -47.5105782 -0.6709432 + -47.5054131 -0.6874030 + -47.5053673 -0.6917928 + -47.5096817 -0.6960229 + -47.4980087 -0.6998647 + -47.4928360 -0.7171614 + -47.4833260 -0.7273031 + -47.4811401 -0.7419122 + -47.4762001 -0.7569125 + -47.4566727 -0.7571107 + -47.4477196 -0.7593098 + -47.4427528 -0.7575811 + -47.4342422 -0.7572760 + -47.4284058 -0.7593011 + -47.4088516 -0.7620077 + -47.3976593 -0.7597904 + -47.3992500 -0.7474715 + -47.3989029 -0.7416123 + -47.4138870 -0.7386454 + -47.4203796 -0.7339101 + -47.4270020 -0.7172573 + -47.4309998 -0.7122838 + -47.4342346 -0.7016572 + -47.4331436 -0.6945539 + -47.4565544 -0.6927082 + -47.4609413 -0.6904579 + -47.4636803 -0.6867253 + -47.4635735 -0.6777332 + -47.4654808 -0.6701620 + -47.4668312 -0.6648068 + -47.4631157 -0.6624647 + -47.4654198 -0.6420013 + -47.4626160 -0.6325610 + -47.4639015 -0.6288128 + -47.4706230 -0.6219884 + -47.4695663 -0.6048329 + -47.4572754 -0.6082483 + -47.4531212 -0.6086203 + -47.4498482 -0.6041931 + -47.4567871 -0.5963264 + -47.4642448 -0.5976649 + -47.4655342 -0.5937067 + -47.4622383 -0.5913700 + -47.4529076 -0.5902198 + -47.4465141 -0.5861759 + -47.4359322 -0.5856381 + -47.4243622 -0.5802810 + -47.4189644 -0.5804290 + -47.4043617 -0.5863261 + -47.4007988 -0.5892128 + -47.3988762 -0.5942090 + -47.4047470 -0.6078650 + -47.4105263 -0.6108568 + -47.4066658 -0.6221036 + -47.4062042 -0.6262794 + -47.4094696 -0.6313348 + -47.4022827 -0.6425430 + -47.3786201 -0.6409851 + -47.3774300 -0.6366162 + -47.3724861 -0.6330060 + -47.3715439 -0.6244230 + -47.3623543 -0.6293364 + -47.3534546 -0.6267260 + -47.3489075 -0.6247930 + -47.3456421 -0.6197382 + -47.3515854 -0.6080977 + -47.3499603 -0.6047339 + -47.3252182 -0.6075879 + -47.3246536 -0.6023543 + -47.3224030 -0.5994015 + -47.3104019 -0.5955016 + -47.3009224 -0.5891206 + -47.2898674 -0.5938032 + -47.2805099 -0.5949498 + -47.2769470 -0.5978360 + -47.2677650 -0.6201009 + -47.2683487 -0.6238711 + -47.2674751 -0.6274159 + -47.2709160 -0.6354002 + -47.2783165 -0.6421750 + -47.2722816 -0.6431516 + -47.2697220 -0.6491857 + -47.2642784 -0.6349056 + -47.2601357 -0.6340216 + -47.2551346 -0.6354273 + -47.2492867 -0.6382874 + -47.2442474 -0.6432471 + -47.2469597 -0.6604229 + -47.2491951 -0.6648396 + -47.2526855 -0.6684338 + -47.2441711 -0.6685453 + -47.2394257 -0.6657721 + -47.2364235 -0.6559106 + -47.2365150 -0.6477575 + -47.2278900 -0.6574855 + -47.2303963 -0.6469709 + -47.2467575 -0.6232048 + -47.2315941 -0.6236569 + -47.2276382 -0.6246571 + -47.2213364 -0.6310654 + -47.2148819 -0.6326633 + -47.2094955 -0.6313472 + -47.2055283 -0.6331829 + -47.1926727 -0.6497605 + -47.1867104 -0.6630724 + -47.1885109 -0.6689473 + -47.1956787 -0.6778123 + -47.2056313 -0.6791818 + -47.2098083 -0.6769298 + -47.2190971 -0.6636561 + -47.2252579 -0.6700000 + -47.2253876 -0.6766920 + -47.2305069 -0.6830233 + -47.2358437 -0.6887308 + -47.2509155 -0.6966406 + -47.2361679 -0.6968889 + -47.2305107 -0.7012140 + -47.2262535 -0.7095802 + -47.2244682 -0.7028174 + -47.2212296 -0.6954618 + -47.2161140 -0.6889209 + -47.2077789 -0.6913335 + -47.2098198 -0.6944931 + -47.2151947 -0.6966464 + -47.2088890 -0.7032645 + -47.1987114 -0.7035647 + -47.1919899 -0.7101781 + -47.1864853 -0.7011238 + -47.1835327 -0.7048533 + -47.1812897 -0.7014811 + -47.1805344 -0.6951498 + -47.1752396 -0.7039207 + -47.1703224 -0.6977996 + -47.1712151 -0.6923740 + -47.1750336 -0.6855183 + -47.1734238 -0.6808998 + -47.1639557 -0.6732625 + -47.1578827 -0.6777916 + -47.1554794 -0.7066178 + -47.1516228 -0.7168186 + -47.1526070 -0.7218482 + -47.1621704 -0.7209145 + -47.1660423 -0.7274411 + -47.1663933 -0.7330908 + -47.1636086 -0.7403771 + -47.1697769 -0.7458853 + -47.1818275 -0.7453978 + -47.1882248 -0.7492352 + -47.1914902 -0.7542921 + -47.1856232 -0.7586147 + -47.1802940 -0.7708899 + -47.1797562 -0.7631468 + -47.1783638 -0.7579030 + -47.1746674 -0.7540966 + -47.1698952 -0.7538321 + -47.1611443 -0.7560305 + -47.1458931 -0.7642173 + -47.1445503 -0.7725658 + -47.1367874 -0.7927984 + -47.1329193 -0.7908317 + -47.1260529 -0.7920066 + -47.1228027 -0.7854865 + -47.1329918 -0.7843506 + -47.1322594 -0.7757685 + -47.1317863 -0.7625892 + -47.1339149 -0.7580138 + -47.1387482 -0.7530519 + -47.1398544 -0.7472097 + -47.1382179 -0.7269081 + -47.1328392 -0.7249635 + -47.1275024 -0.7378659 + -47.1172638 -0.7429739 + -47.1126404 -0.7477287 + -47.1144028 -0.7389672 + -47.1222115 -0.7281853 + -47.1145210 -0.7287226 + -47.1172714 -0.7243639 + -47.1179543 -0.7191444 + -47.1217690 -0.7124981 + -47.1199455 -0.7082947 + -47.1162224 -0.7072061 + -47.1091042 -0.7121412 + -47.1047516 -0.7112539 + -47.1127892 -0.6985934 + -47.1126595 -0.6919011 + -47.1074753 -0.6910037 + -47.1030350 -0.6798709 + -47.1079330 -0.6692647 + -47.1023598 -0.6664812 + -47.0904999 -0.6684334 + -47.0853882 -0.6612648 + -47.0808220 -0.6612115 + -47.0770607 -0.6632582 + -47.0696487 -0.6755072 + -47.0691910 -0.6794745 + -47.0774422 -0.6807838 + -47.0772209 -0.6854228 + -47.0702553 -0.6951683 + -47.0737572 -0.6975090 + -47.0824623 -0.6992839 + -47.0876236 -0.7018536 + -47.0856857 -0.7076851 + -47.0808907 -0.7093024 + -47.0761909 -0.7207469 + -47.0767479 -0.7266084 + -47.0785789 -0.7299754 + -47.0882912 -0.7340620 + -47.0903244 -0.7378492 + -47.0892334 -0.7424369 + -47.0845070 -0.7381997 + -47.0802498 -0.7471406 + -47.0760422 -0.7519008 + -47.0721130 -0.7501824 + -47.0726242 -0.7420332 + -47.0691414 -0.7380194 + -47.0608444 -0.7730511 + -47.0646896 -0.7818788 + -47.0600853 -0.7849613 + -47.0537186 -0.7786133 + -47.0453568 -0.7833247 + -47.0440712 -0.7868643 + -47.0463066 -0.7910728 + -47.0503197 -0.7934762 + -47.0541458 -0.7957652 + -47.0629768 -0.8042333 + -47.0778885 -0.8081723 + -47.0778236 -0.8136086 + -47.0725822 -0.8181480 + -47.0770912 -0.8250577 + -47.0695839 -0.8258500 + -47.0651970 -0.8280985 + -47.0551834 -0.8679229 + -47.0513458 -0.8582579 + -47.0572701 -0.8311419 + -47.0558777 -0.8256890 + -47.0511703 -0.8195689 + -47.0462112 -0.8172104 + -47.0421104 -0.8127713 + -47.0357742 -0.8037047 + -47.0272751 -0.7843664 + -47.0233421 -0.7832740 + -47.0183945 -0.7980627 + -47.0152092 -0.8040891 + -47.0114365 -0.8071816 + -47.0108795 -0.8011112 + -47.0151711 -0.7892419 + -47.0119057 -0.7843943 + -46.9976768 -0.7936361 + -46.9864731 -0.8027613 + -46.9876823 -0.7956092 + -46.9944038 -0.7892063 + -47.0073738 -0.7809945 + -47.0161324 -0.7599786 + -47.0156021 -0.7522354 + -47.0127525 -0.7469741 + -47.0077629 -0.7475427 + -47.0014572 -0.7539502 + -46.9931679 -0.7525980 + -46.9869728 -0.7493886 + -46.9804649 -0.7553748 + -46.9799080 -0.7497224 + -46.9843903 -0.7393208 + -46.9815636 -0.7323872 + -46.9797897 -0.7242113 + -46.9731865 -0.7203692 + -46.9723969 -0.7168054 + -46.9739037 -0.7122235 + -46.9670563 -0.6937417 + -46.9616852 -0.6913783 + -46.9502182 -0.6954238 + -46.9470711 -0.6981044 + -46.9463806 -0.7037422 + -46.9516754 -0.7127957 + -46.9493294 -0.7182045 + -46.9569321 -0.7251952 + -46.9577980 -0.7398416 + -46.9564934 -0.7450539 + -46.9582901 -0.7511392 + -46.9640083 -0.7595716 + -46.9656105 -0.7646087 + -46.9687576 -0.7797014 + -46.9622345 -0.7869428 + -46.9621277 -0.7785770 + -46.9570923 -0.7649258 + -46.9527550 -0.7627833 + -46.9458275 -0.7691833 + -46.9467506 -0.7792317 + -46.9409943 -0.7739349 + -46.9365768 -0.7786921 + -46.9426613 -0.7913113 + -46.9452744 -0.7988702 + -46.9452209 -0.8034699 + -46.9420395 -0.8090780 + -46.9389877 -0.8036044 + -46.9365807 -0.7962572 + -46.9307632 -0.7963973 + -46.9269791 -0.8003252 + -46.9286690 -0.8156103 + -46.9375267 -0.8219898 + -46.9376831 -0.8263826 + -46.9277344 -0.8245918 + -46.9207611 -0.8171894 + -46.9173317 -0.8261405 + -46.9186745 -0.8355670 + -46.9215202 -0.8410377 + -46.9250259 -0.8431709 + -46.9167633 -0.8568740 + -46.9056702 -0.8642708 + -46.8977928 -0.8627127 + -46.8938217 -0.8649651 + -46.8908615 -0.8693213 + -46.8894691 -0.8640765 + -46.8899422 -0.8590636 + -46.8954239 -0.8522281 + -46.8971443 -0.8472295 + -46.8947144 -0.8419729 + -46.8898849 -0.8465160 + -46.8854713 -0.8470463 + -46.8803825 -0.8418016 + -46.8835449 -0.8378659 + -46.8921051 -0.8339948 + -46.8941422 -0.8022336 + -46.8897247 -0.7892161 + -46.8785820 -0.7828099 + -46.8725281 -0.7854559 + -46.8682594 -0.7954420 + -46.8640518 -0.7999919 + -46.8699341 -0.8119815 + -46.8667717 -0.8159172 + -46.8582001 -0.8028496 + -46.8499031 -0.8019136 + -46.8459892 -0.7991481 + -46.8440018 -0.7918046 + -46.8459396 -0.7857638 + -46.8536568 -0.7831380 + -46.8625793 -0.7836634 + -46.8676720 -0.7745236 + -46.8635406 -0.7725924 + -46.8562393 -0.7752230 + -46.8551788 -0.7597371 + -46.8535576 -0.7529317 + -46.8502235 -0.7492561 + -46.8407822 -0.7507842 + -46.8267059 -0.7435032 + -46.8315125 -0.7412611 + -46.8359795 -0.7321137 + -46.8343620 -0.7285401 + -46.8267136 -0.7253119 + -46.8183937 -0.7262570 + -46.8145065 -0.7216102 + -46.8258133 -0.7135910 + -46.8362007 -0.7132978 + -46.8312645 -0.7092662 + -46.8260841 -0.7083670 + -46.8204575 -0.7097630 + -46.8139572 -0.7151214 + -46.8024788 -0.7200015 + -46.7991066 -0.7241426 + -46.7952042 -0.7378963 + -46.7899132 -0.7461964 + -46.7942543 -0.7481303 + -46.7999535 -0.7404621 + -46.8035049 -0.7386234 + -46.8117523 -0.7437415 + -46.8125000 -0.7506507 + -46.8021736 -0.7459254 + -46.7989731 -0.7529964 + -46.8003807 -0.7569864 + -46.7961922 -0.7598637 + -46.7965584 -0.7638409 + -46.8070984 -0.7683594 + -46.8131218 -0.7684318 + -46.8220940 -0.7649853 + -46.8278618 -0.7688184 + -46.8245049 -0.7717054 + -46.8180809 -0.7705823 + -46.8145218 -0.7728398 + -46.8132133 -0.7782605 + -46.8098946 -0.7825083 + -46.8062553 -0.7871690 + -46.8097420 -0.7907655 + -46.8153381 -0.7918782 + -46.8214836 -0.7988529 + -46.8317108 -0.7945850 + -46.8295593 -0.8010412 + -46.8296776 -0.8085707 + -46.8281670 -0.8133621 + -46.8180428 -0.8088494 + -46.8136520 -0.8113058 + -46.8148384 -0.8165480 + -46.8203812 -0.8220520 + -46.8243179 -0.8229352 + -46.8276062 -0.8259029 + -46.8290215 -0.8292651 + -46.8289299 -0.8367925 + -46.8270187 -0.8405341 + -46.8189163 -0.8404367 + -46.8166656 -0.8376902 + -46.8183823 -0.8329012 + -46.8105278 -0.8298795 + -46.8000298 -0.8218060 + -46.7978096 -0.8163424 + -46.7971344 -0.8031600 + -46.7910652 -0.8070598 + -46.7874985 -0.8450760 + -46.7884674 -0.8509433 + -46.7909126 -0.8549467 + -46.7956505 -0.8581401 + -46.7978745 -0.8633955 + -46.7963486 -0.8694414 + -46.8010559 -0.8755625 + -46.7982597 -0.8834758 + -46.7956009 -0.8800979 + -46.7844086 -0.8954380 + -46.7770271 -0.9049696 + -46.7769852 -0.8909568 + -46.7755928 -0.8857117 + -46.7795296 -0.8863866 + -46.7893066 -0.8678929 + -46.7738152 -0.8605948 + -46.7709351 -0.8580512 + -46.7671547 -0.8439936 + -46.7617645 -0.8606585 + -46.7647667 -0.8703143 + -46.7609520 -0.8767514 + -46.7571106 -0.8703825 + -46.7525787 -0.8645210 + -46.7537766 -0.8511513 + -46.7500572 -0.8496422 + -46.7566605 -0.8357110 + -46.7558861 -0.8308922 + -46.7501259 -0.8264304 + -46.7463989 -0.8251305 + -46.7404671 -0.8348876 + -46.7388878 -0.8457425 + -46.7412910 -0.8530914 + -46.7370834 -0.8574316 + -46.7332878 -0.8448384 + -46.7232437 -0.8603995 + -46.7187271 -0.8641091 + -46.7141342 -0.8659354 + -46.7085991 -0.8598042 + -46.7061310 -0.8752486 + -46.7014961 -0.8806298 + -46.7121391 -0.8939347 + -46.7242889 -0.9202245 + -46.7308846 -0.9246957 + -46.7397881 -0.9271043 + -46.7428474 -0.9319521 + -46.7339478 -0.9435374 + -46.7336540 -0.9362325 + -46.7289391 -0.9309465 + -46.7241745 -0.9300521 + -46.7202568 -0.9272858 + -46.7117653 -0.9077324 + -46.7041969 -0.8980207 + -46.6960793 -0.8820276 + -46.6919594 -0.8895984 + -46.6875420 -0.8838056 + -46.6917915 -0.8757014 + -46.6924973 -0.8690186 + -46.6967239 -0.8627961 + -46.6969986 -0.8571526 + -46.6933250 -0.8461215 + -46.6893806 -0.8342657 + -46.6867218 -0.8306784 + -46.6813316 -0.8299850 + -46.6810493 -0.8362554 + -46.6764755 -0.8364084 + -46.6745415 -0.8244654 + -46.6678200 -0.8308658 + -46.6509094 -0.8551258 + -46.6506348 -0.8609784 + -46.6520386 -0.8649684 + -46.6507263 -0.8705987 + -46.6492043 -0.8762265 + -46.6528778 -0.8817090 + -46.6464615 -0.8797486 + -46.6442108 -0.8767931 + -46.6457405 -0.8705381 + -46.6432877 -0.8671622 + -46.6335716 -0.8634877 + -46.6302795 -0.8607284 + -46.6282730 -0.8548486 + -46.6299973 -0.8498505 + -46.6335716 -0.8459214 + -46.6441994 -0.8431243 + -46.6467247 -0.8404363 + -46.6467934 -0.8347907 + -46.6485367 -0.8279111 + -46.6435852 -0.8251323 + -46.6467552 -0.8205702 + -46.6461906 -0.8157538 + -46.6281319 -0.8149052 + -46.6214485 -0.8177505 + -46.6186523 -0.8256627 + -46.6133881 -0.8318715 + -46.6166000 -0.8409036 + -46.6140594 -0.8450543 + -46.6052361 -0.8533105 + -46.5969124 -0.8546723 + -46.5959854 -0.8623984 + -46.5942116 -0.8717870 + -46.5949821 -0.8766071 + -46.5987053 -0.8781161 + -46.6025047 -0.8731445 + -46.6068535 -0.8742430 + -46.5994148 -0.8881634 + -46.6016655 -0.8909098 + -46.6127930 -0.8810080 + -46.6169205 -0.8833594 + -46.6122704 -0.8899947 + -46.6117935 -0.8952169 + -46.6161613 -0.8946432 + -46.6245499 -0.8880539 + -46.6232147 -0.8953576 + -46.6231575 -0.9003755 + -46.6265755 -0.9096192 + -46.6164627 -0.9042670 + -46.6090393 -0.8995748 + -46.6054497 -0.9043406 + -46.6011658 -0.9151631 + -46.6098938 -0.9320017 + -46.6278419 -0.9424692 + -46.6419907 -0.9405520 + -46.6540375 -0.9406995 + -46.6617508 -0.9387025 + -46.6708488 -0.9419509 + -46.6742859 -0.9499402 + -46.6763954 -0.9646055 + -46.6701622 -0.9645295 + -46.6641045 -0.9675924 + -46.6607056 -0.9738252 + -46.6544189 -0.9781409 + -46.6301689 -0.9736608 + -46.6300316 -0.9849529 + -46.6219025 -0.9871533 + -46.6203766 -0.9758406 + -46.6181564 -0.9705850 + -46.6134377 -0.9657169 + -46.5956726 -0.9571322 + -46.5879517 -0.9520492 + -46.5843391 -0.9496725 + -46.5811729 -0.9536077 + -46.5821495 -0.9590570 + -46.5890732 -0.9704362 + -46.5806389 -0.9634306 + -46.5767365 -0.9598268 + -46.5750122 -0.9478846 + -46.5702400 -0.9474072 + -46.5674591 -0.9540656 + -46.5682030 -0.9611859 + -46.5668907 -0.9668165 + -46.5624466 -0.9734544 + -46.5625992 -0.9778478 + -46.5764465 -0.9838756 + -46.5803947 -0.9960236 + -46.5824547 -1.0023543 + -46.5805168 -1.0079776 + -46.5713234 -1.0124660 + -46.5680389 -1.0090786 + -46.5731125 -1.0018207 + -46.5733948 -0.9957587 + -46.5726471 -0.9888476 + -46.5617981 -0.9924784 + -46.5568390 -0.9905353 + -46.5516205 -0.9923527 + -46.5462265 -0.9916584 + -46.5411873 -0.9986956 + -46.5402145 -1.0078979 + -46.5372276 -1.0143447 + -46.5250244 -1.0269520 + -46.5192757 -1.0214424 + -46.5157661 -1.0195165 + -46.4997673 -1.0195273 + -46.4910240 -1.0210917 + -46.4833488 -1.0199506 + -46.4734535 -1.0137619 + -46.4650192 -1.0069633 + -46.4574814 -1.0286222 + -46.4706612 -1.0384074 + -46.4710236 -1.0425951 + -46.4516678 -1.0452819 + -46.4444923 -1.0374534 + -46.4409866 -1.0355272 + -46.4399986 -1.0287439 + -46.4371605 -1.0256486 + -46.4223671 -1.0290196 + -46.4159508 -1.0268478 + -46.4111633 -1.0278336 + -46.4096375 -1.0336702 + -46.4064751 -1.0373957 + -46.4018784 -1.0394299 + -46.4007225 -1.0320946 + -46.3950577 -1.0366247 + -46.3926735 -1.0445429 + -46.3931122 -1.0593994 + -46.4030914 -1.0591058 + -46.4072304 -1.0602039 + -46.4099007 -1.0627468 + -46.4136620 -1.0780635 + -46.4133797 -1.0841259 + -46.4066200 -1.0760925 + -46.4026222 -1.0634929 + -46.3890953 -1.0652052 + -46.3862762 -1.0578487 + -46.3869514 -1.0367323 + -46.3948212 -1.0219811 + -46.3953018 -1.0167583 + -46.3764496 -0.9956056 + -46.3611641 -0.9855537 + -46.3498650 -0.9781206 + -46.3475266 -0.9822744 + -46.3591919 -0.9966437 + -46.3624344 -1.0031683 + -46.3647957 -1.0138645 + -46.3656273 -1.0308162 + -46.3614922 -1.0458239 + -46.3626785 -1.0506500 + -46.3569221 -1.0627087 + -46.3530273 -1.0752090 + -46.3507042 -1.0783179 + -46.3457870 -1.0726076 + -46.3532410 -1.0580608 + -46.3553543 -1.0382167 + -46.3529015 -1.0348395 + -46.3460960 -1.0475127 + -46.3419228 -1.0489235 + -46.3448067 -1.0343186 + -46.3435097 -1.0215443 + -46.3390160 -1.0154214 + -46.3345718 -1.0218489 + -46.3318138 -1.0098929 + -46.3193245 -1.0285593 + -46.3215370 -1.0344433 + -46.3134804 -1.0473095 + -46.3132286 -1.0508623 + -46.2991180 -1.0496373 + -46.2992630 -1.0379258 + -46.2972755 -1.0305804 + -46.2920837 -1.0305150 + -46.2893448 -1.0336176 + -46.2843971 -1.0304173 + -46.2880287 -1.0223064 + -46.2870789 -1.0153916 + -46.2797279 -1.0217823 + -46.2763176 -1.0119089 + -46.2689285 -1.0212266 + -46.2650909 -1.0126027 + -46.2605133 -1.0131721 + -46.2571487 -1.0098664 + -46.2571678 -1.0029356 + -46.2644386 -0.9981629 + -46.2671928 -0.9940143 + -46.2662086 -0.9896097 + -46.2590370 -0.9815715 + -46.2538033 -0.9848509 + -46.2490311 -0.9841631 + -46.2465744 -0.9646807 + -46.2445641 -0.9594267 + -46.2405701 -0.9629306 + -46.2371292 -0.9557760 + -46.2337761 -0.9582433 + -46.2294731 -0.9701096 + -46.2254219 -0.9616916 + -46.2284775 -0.9500188 + -46.2281113 -0.9460406 + -46.2246208 -0.9428591 + -46.2127914 -0.9428831 + -46.2203522 -0.9352756 + -46.2296715 -0.9374854 + -46.2428284 -0.9487383 + -46.2450943 -0.9334993 + -46.2424469 -0.9292830 + -46.2433395 -0.9242751 + -46.2417221 -0.9206988 + -46.2379990 -0.9193965 + -46.2257500 -0.9190318 + -46.2195396 -0.9170697 + -46.2116432 -0.9173876 + -46.2077103 -0.9162911 + -46.2017670 -0.9099408 + -46.1978264 -0.9094724 + -46.1894073 -0.9132221 + -46.1788673 -0.9138308 + -46.1748199 -0.9217259 + -46.1683731 -0.9222707 + -46.1637192 -0.9289035 + -46.1642799 -0.9339294 + -46.1725578 -0.9530683 + -46.1766586 -0.9570946 + -46.1837692 -0.9536304 + -46.1875229 -0.9524229 + -46.1945572 -0.9546050 + -46.1973000 -0.9678164 + -46.2020264 -0.9718502 + -46.1996803 -0.9768402 + -46.2010880 -0.9806228 + -46.1979103 -0.9853923 + -46.1982231 -0.9899624 + -46.1967278 -0.9968801 + -46.1945724 -1.0031273 + -46.1973991 -1.0094380 + -46.2047729 -1.0156883 + -46.2136765 -1.0203136 + -46.2099190 -1.0382527 + -46.2109070 -1.0424491 + -46.2060890 -1.0455250 + -46.2047768 -1.0507367 + -46.2074699 -1.0844470 + -46.2084579 -1.0884333 + -46.2131996 -1.0916318 + -46.2060280 -1.1001161 + -46.1985016 -1.1037853 + -46.1886177 -1.0967559 + -46.1771660 -1.0819672 + -46.1718292 -1.0603547 + -46.1680260 -1.0322779 + -46.1608887 -1.0217285 + -46.1576653 -1.0137391 + -46.1537170 -1.0136883 + -46.1474342 -1.0177909 + -46.1404991 -1.0241855 + -46.1376953 -1.0320977 + -46.1395073 -1.0369318 + -46.1385803 -1.0444492 + -46.1405678 -1.0515859 + -46.1410027 -1.0664427 + -46.1510582 -1.0764024 + -46.1550407 -1.0902590 + -46.1605568 -1.0974414 + -46.1702576 -1.1025866 + -46.1729088 -1.1065944 + -46.1706276 -1.1114357 + -46.1748619 -1.1166598 + -46.1852837 -1.1138653 + -46.1877441 -1.1166159 + -46.1818810 -1.1203064 + -46.1739655 -1.1216682 + -46.1751480 -1.1269130 + -46.1801071 -1.1290689 + -46.1928139 -1.1432459 + -46.1886215 -1.1459117 + -46.1844673 -1.1458586 + -46.1739006 -1.1434220 + -46.1684113 -1.1502544 + -46.1657410 -1.1479191 + -46.1666260 -1.1437472 + -46.1588631 -1.1329795 + -46.1536903 -1.1149241 + -46.1465263 -1.1062558 + -46.1419678 -1.1053605 + -46.1355667 -1.1021402 + -46.1309395 -1.0901575 + -46.1178436 -1.0740921 + -46.1127014 -1.0698428 + -46.1042252 -1.0668050 + -46.1000595 -1.0673788 + -46.0966873 -1.0713089 + -46.0938492 -1.0821495 + -46.0889511 -1.0914990 + -46.0895233 -1.0954802 + NA NA + -46.5824547 -1.0023543 + -46.5996704 -1.0046581 + -46.6062431 -1.0110135 + -46.6103439 -1.0154566 + -46.6122856 -1.0265651 + -46.6093407 -1.0298758 + -46.6049385 -1.0158077 + -46.5995941 -1.0111405 + -46.5965996 -1.0182149 + -46.5824547 -1.0023543 + NA NA + -46.1395073 -1.0369318 + -46.1496544 -1.0395719 + -46.1516685 -1.0446179 + -46.1462746 -1.0439210 + -46.1395073 -1.0369318 + NA NA + -46.2109070 -1.0424491 + -46.2220421 -1.0490754 + -46.2240715 -1.0530752 + -46.2217369 -1.0568101 + -46.2176018 -1.0552931 + -46.2109070 -1.0424491 + NA NA + -45.9673347 -1.0876487 + -45.9768906 -1.0827670 + -45.9805450 -1.0836630 + -45.9823952 -1.0875574 + -45.9815025 -1.0912389 + -45.9721375 -1.0892283 + -45.9673347 -1.0876487 + NA NA + -46.0895233 -1.0954802 + -46.0955124 -1.0982769 + -46.0977516 -1.1020713 + -46.0935593 -1.1049449 + -46.0895233 -1.0954802 + NA NA + -44.3651123 -2.7209635 + -44.3701630 -2.7072794 + -44.3713341 -2.7148633 + -44.3651123 -2.7209635 + NA NA + -44.3691216 -2.7337289 + -44.3753166 -2.7394524 + -44.3771629 -2.7442737 + -44.3717079 -2.7521145 + -44.3714447 -2.7433774 + -44.3691216 -2.7337289 + NA NA + -44.3620033 -2.7257094 + -44.3651123 -2.7209635 + -44.3691216 -2.7337289 + -44.3620033 -2.7257094 + NA NA + -50.7539978 2.3696141 + -50.7631226 2.3645897 + -50.7651863 2.3586857 + -50.7596283 2.3624067 + -50.7539978 2.3696141 + NA NA + -47.1524811 -0.8056970 + -47.1617928 -0.8087334 + -47.1604805 -0.8145728 + -47.1524811 -0.8056970 + NA NA + -48.4313545 -1.1806927 + -48.4216843 -1.1683235 + -48.4281425 -1.1667155 + -48.4313545 -1.1806927 + NA NA + -57.1426201 5.8522773 + -57.1169777 5.8489337 + -57.1255989 5.8410101 + -57.1389923 5.8355360 + -57.1426201 5.8522773 + NA NA + -50.7539978 2.3696141 + -50.7596283 2.3624067 + -50.7651863 2.3586857 + -50.7631226 2.3645897 + -50.7539978 2.3696141 + NA NA + -46.8535576 -0.7529317 + -46.8593864 -0.7549779 + -46.8588562 -0.7470254 + -46.8508415 -0.7398203 + -46.8453941 -0.7439368 + -46.8502235 -0.7492561 + -46.8535576 -0.7529317 + NA NA + -47.1524811 -0.8056970 + -47.1604805 -0.8145728 + -47.1617928 -0.8087334 + -47.1524811 -0.8056970 + NA NA + -46.5824547 -1.0023543 + -46.5965996 -1.0182149 + -46.5995941 -1.0111405 + -46.6049385 -1.0158077 + -46.6093407 -1.0298758 + -46.6122856 -1.0265651 + -46.6103439 -1.0154566 + -46.6062431 -1.0110135 + -46.5996704 -1.0046581 + -46.5824547 -1.0023543 + NA NA + -46.1395073 -1.0369318 + -46.1462746 -1.0439210 + -46.1516685 -1.0446179 + -46.1496544 -1.0395719 + -46.1395073 -1.0369318 + NA NA + -46.2109070 -1.0424491 + -46.2176018 -1.0552931 + -46.2217369 -1.0568101 + -46.2240715 -1.0530752 + -46.2220421 -1.0490754 + -46.2109070 -1.0424491 + NA NA + -45.9673347 -1.0876487 + -45.9721375 -1.0892283 + -45.9815025 -1.0912389 + -45.9823952 -1.0875574 + -45.9805450 -1.0836630 + -45.9768906 -1.0827670 + -45.9673347 -1.0876487 + NA NA + -46.0895233 -1.0954802 + -46.0935593 -1.1049449 + -46.0977516 -1.1020713 + -46.0955124 -1.0982769 + -46.0895233 -1.0954802 + NA NA + -46.0000000 -1.1987405 + -45.9900169 -1.1826209 + -45.9794426 -1.1693602 + -45.9741745 -1.1659462 + -45.9687080 -1.1678166 + -45.9620857 -1.1669382 + -45.9558945 -1.1614621 + -45.9497147 -1.1585131 + -45.9469986 -1.1622052 + -45.9516487 -1.1775695 + -45.9489670 -1.1874647 + -45.9508400 -1.1957244 + -45.9495392 -1.2072195 + -45.9520760 -1.2117988 + -45.9586563 -1.2057854 + -45.9679832 -1.2006750 + -45.9745979 -1.1997151 + -45.9848900 -1.2035586 + -45.9928627 -1.2012128 + -46.0000000 -1.1987405 + NA NA + -48.4313545 -1.1806927 + -48.4281425 -1.1667155 + -48.4216843 -1.1683235 + -48.4313545 -1.1806927 + NA NA + -46.0000000 -1.1987405 + -45.9982567 -1.1869352 + -45.9900169 -1.1826209 + -46.0000000 -1.1987405 + NA NA + -44.5346184 -2.2297411 + -44.5282974 -2.2336469 + -44.5159569 -2.2332401 + -44.5123100 -2.2353253 + -44.5016174 -2.2468657 + -44.5014153 -2.2535346 + -44.5146103 -2.2394536 + -44.5189438 -2.2373660 + -44.5296860 -2.2380097 + -44.5333328 -2.2359245 + -44.5346184 -2.2297411 + NA NA + -44.3651123 -2.7209635 + -44.3713341 -2.7148633 + -44.3701630 -2.7072794 + -44.3651123 -2.7209635 + NA NA + -44.3691216 -2.7337289 + -44.3651123 -2.7209635 + -44.3620033 -2.7257094 + -44.3691216 -2.7337289 + NA NA + -44.3691216 -2.7337289 + -44.3714447 -2.7433774 + -44.3717079 -2.7521145 + -44.3771629 -2.7442737 + -44.3753166 -2.7394524 + -44.3691216 -2.7337289 + NA NA + -53.9816742 5.6905546 + -53.9758377 5.6961107 + -53.9591675 5.7169437 + -53.9497223 5.7316666 + -53.9397278 5.7447214 + -53.9113922 5.7502775 + -53.8858337 5.7452774 + -53.8802795 5.7511110 + -53.8738937 5.7538881 + -53.8619461 5.7555552 + -53.8552780 5.7552776 + -53.8341675 5.7497215 + -53.8066711 5.7383327 + -53.7955627 5.7347221 + -53.7697296 5.7333326 + -53.7569504 5.7338886 + -53.7447281 5.7288885 + -53.7388916 5.7247219 + -53.7258377 5.7183332 + -53.7122269 5.7091665 + -53.6852798 5.6930552 + -53.6791687 5.6880550 + -53.6691742 5.6780548 + -53.6619492 5.6744442 + -53.6561127 5.6738882 + -53.6436157 5.6752777 + -53.6366730 5.6730547 + -53.6202850 5.6519442 + -53.6136169 5.6466665 + -53.6072235 5.6444435 + -53.5941696 5.6416664 + -53.5877838 5.6388884 + -53.5280609 5.6083326 + -53.5166702 5.6011105 + -53.4991684 5.5802774 + -53.4943390 5.5723419 + -53.4836121 5.5680552 + -53.4513931 5.5602770 + -53.4300003 5.5538883 + -53.4083405 5.5488882 + -53.3800049 5.5411110 + -53.3450012 5.5338888 + -53.3377838 5.5311108 + -53.3027802 5.5230551 + -53.2880630 5.5188885 + -53.2466736 5.5041666 + -53.2255630 5.4983330 + -53.2108383 5.4974995 + -53.2050018 5.4977770 + -53.1991730 5.4991665 + -53.1863937 5.4991665 + -53.1541672 5.4961109 + -53.1380768 5.4931536 + -53.1250000 5.4930553 + -53.1186142 5.4916658 + -53.1050034 5.4855547 + -53.0986176 5.4841661 + -53.0844498 5.4833326 + -53.0644455 5.4783325 + -53.0583344 5.4752769 + -53.0519485 5.4705553 + -53.0461121 5.4655552 + -53.0411148 5.4597216 + -53.0341721 5.4541664 + -53.0277786 5.4511108 + -53.0205612 5.4488888 + -53.0016708 5.4499998 + -52.9950027 5.4524994 + -52.9886169 5.4588881 + -52.9838943 5.4655552 + -52.9822235 5.4724998 + -52.9761124 5.4741659 + -52.9702835 5.4719439 + -52.9505615 5.4613886 + -52.9377823 5.4583330 + -52.9319458 5.4538879 + -52.9191742 5.4419441 + -52.8930588 5.4252777 + -52.8800049 5.4152775 + -52.8600006 5.3969440 + -52.8413925 5.3774996 + -52.8355560 5.3749990 + -52.8166733 5.3719444 + -52.8108368 5.3663883 + -52.8075027 5.3605547 + -52.8030624 5.3483324 + -52.7997284 5.3419437 + -52.7875061 5.3219442 + -52.7702789 5.3019438 + -52.7569504 5.2919436 + -52.7455597 5.2791662 + -52.7363892 5.2605553 + -52.7038956 5.2327776 + -52.6902847 5.2236109 + -52.6763916 5.2158327 + -52.6702805 5.2116661 + -52.6633377 5.2055550 + -52.6541672 5.1927776 + -52.6252823 5.1458330 + -52.6161118 5.1338882 + -52.6061172 5.1249990 + -52.5961151 5.1216660 + -52.5891724 5.1163883 + -52.5755615 5.1025000 + -52.5594482 5.0908327 + -52.5416718 5.0811110 + -52.5344467 5.0752773 + -52.5275040 5.0683327 + -52.5266724 5.0616665 + -52.5280609 5.0561104 + -52.5225067 5.0480547 + -52.4961166 5.0483332 + -52.4897232 5.0480547 + -52.4841690 5.0466661 + -52.4769516 5.0402775 + -52.4688950 5.0274992 + -52.4677811 5.0219440 + -52.4563904 5.0061102 + -52.4480591 5.0005550 + -52.4416733 5.0002775 + -52.4252853 5.0044441 + -52.4197235 5.0030546 + -52.4197235 4.9974995 + -52.4222260 4.9924994 + -52.4180603 4.9830551 + -52.4041672 4.9691658 + -52.3855591 4.9469442 + -52.3761139 4.9319439 + -52.3738937 4.9269438 + -52.3727798 4.9213886 + -52.3738937 4.9161110 + -52.3808365 4.9091663 + -52.3866730 4.9019442 + -52.3877792 4.8955555 + -52.3855591 4.8911104 + -52.3808365 4.8927774 + -52.3650055 4.9047222 + -52.3536148 4.9211111 + -52.3458405 4.9405546 + -52.3383408 4.9469442 + -52.3336182 4.9488888 + -52.3277817 4.9488888 + -52.3113937 4.9447222 + -52.3005600 4.9433327 + -52.2950058 4.9416666 + -52.2905579 4.9391661 + -52.2852783 4.9374990 + -52.2780609 4.9311104 + -52.2738953 4.9227772 + -52.2691727 4.9074993 + -52.2594452 4.8897219 + -52.2580566 4.8841658 + -52.2580566 4.8772221 + -52.2594452 4.8719444 + -52.2650070 4.8636103 + -52.2727814 4.8572216 + -52.2822266 4.8527775 + -52.2905579 4.8472214 + -52.2977829 4.8408327 + -52.3033371 4.8327770 + -52.3113937 4.8136110 + -52.3177795 4.7924995 + -52.3319473 4.7652769 + -52.3438950 4.7494440 + -52.3452835 4.7438889 + -52.3458405 4.7311106 + -52.3402786 4.7230549 + -52.3336182 4.7244444 + -52.3336182 4.7297220 + -52.3302841 4.7397213 + -52.3247223 4.7480555 + -52.3111115 4.7616663 + -52.3069458 4.7713881 + -52.2991714 4.8049994 + -52.2975006 4.8094444 + -52.2916718 4.8177776 + -52.2875061 4.8272219 + -52.2813950 4.8349991 + -52.2744446 4.8419437 + -52.2650070 4.8458328 + -52.2591705 4.8463888 + -52.2480621 4.8491659 + -52.2397232 4.8547220 + -52.2333374 4.8622217 + -52.2277832 4.8705549 + -52.2166672 4.8677769 + -52.2072296 4.8636103 + -52.2005615 4.8569441 + -52.1800003 4.8227777 + -52.1683350 4.8066664 + -52.1636124 4.7980547 + -52.1566696 4.7902775 + -52.1483383 4.7849998 + -52.1388931 4.7808332 + -52.1238937 4.7766666 + -52.1097260 4.7708330 + -52.1019516 4.7644444 + -52.0894470 4.7494440 + -52.0813904 4.7438889 + -52.0716705 4.7397213 + -52.0644455 4.7338886 + -52.0588913 4.7258329 + -52.0466690 4.7108326 + -52.0400009 4.7030554 + -52.0263901 4.6894436 + -52.0205612 4.6819439 + -51.9988937 4.6477776 + -51.9950027 4.6383333 + -51.9916687 4.6277771 + -51.9852829 4.6136103 + -51.9780579 4.5869436 + -51.9769516 4.5808325 + -51.9738922 4.5430555 + -51.9716721 4.5386105 + -51.9702835 4.5330553 + -51.9633408 4.5194435 + -51.9575043 4.4980555 + -51.9550018 4.4866657 + -51.9547272 4.4802771 + -51.9508362 4.4566660 + -51.9508362 4.4238882 + -51.9525070 4.4127769 + -51.9566727 4.4033327 + -51.9627838 4.3955555 + -51.9697266 4.3888884 + -51.9944458 4.3722219 + -52.0080566 4.3655548 + -52.0163956 4.3599997 + -52.0211182 4.3583326 + -52.0369492 4.3463888 + -52.0413895 4.3377771 + -52.0400009 4.3313885 + -52.0122223 4.3444443 + -52.0069504 4.3458328 + -51.9944458 4.3472214 + -51.9894485 4.3491659 + -51.9766693 4.3569441 + -51.9586182 4.3663883 + -51.9508362 4.3722219 + -51.9366684 4.3855553 + -51.9291687 4.3983326 + -51.9272232 4.4033327 + -51.9236145 4.4202776 + -51.9236145 4.4338884 + -51.9263916 4.4652777 + -51.9286118 4.4772215 + -51.9300003 4.4963884 + -51.9300003 4.5099993 + -51.9313965 4.5291662 + -51.9313965 4.5699997 + -51.9263916 4.6127777 + -51.9225006 4.6291666 + -51.9188919 4.6397219 + -51.9122238 4.6533327 + -51.9052811 4.6602774 + -51.8947296 4.6633329 + -51.8752823 4.6630554 + -51.8627853 4.6616659 + -51.8577805 4.6591663 + -51.8505630 4.6533327 + -51.8313904 4.6305552 + -51.8161163 4.6183329 + -51.8025055 4.6113882 + -51.7944489 4.6055555 + -51.7983398 4.5961103 + -51.8055573 4.5897217 + -51.8038940 4.5849991 + -51.7961121 4.5786104 + -51.7877808 4.5733328 + -51.7811127 4.5658331 + -51.7752838 4.5580549 + -51.7688904 4.5441666 + -51.7672272 4.5386105 + -51.7655563 4.5280552 + -51.7630615 4.5236111 + -51.7630615 4.5172215 + -51.7591705 4.5002775 + -51.7563934 4.4772215 + -51.7536163 4.4674997 + -51.7525024 4.4552774 + -51.7511139 4.4497213 + -51.7450027 4.4488888 + -51.7394485 4.4502773 + -51.7288895 4.4483328 + -51.7272263 4.4433327 + -51.7316742 4.4361105 + -51.7372284 4.4347219 + -51.7441711 4.4277773 + -51.7441711 4.4211111 + -51.7372284 4.4074993 + -51.7316742 4.3991661 + -51.7244492 4.3927774 + -51.7194519 4.3902769 + -51.7138901 4.3888884 + -51.7002792 4.3888884 + -51.6955566 4.3869438 + -51.6891708 4.3791666 + -51.6886139 4.3733330 + -51.6944504 4.3649998 + -51.7066727 4.3649998 + -51.7163925 4.3608332 + -51.7180557 4.3558331 + -51.7202835 4.3444443 + -51.7194519 4.3313885 + -51.7166672 4.3205547 + -51.7111130 4.3052769 + -51.7052841 4.2911110 + -51.6997223 4.2830553 + -51.6744461 4.2533331 + -51.6577835 4.2288885 + -51.6536179 4.2219439 + -51.6491699 4.2063885 + NA NA diff --git a/R-utils/arrhenius.r b/R-utils/arrhenius.r new file mode 100644 index 000000000..228120775 --- /dev/null +++ b/R-utils/arrhenius.r @@ -0,0 +1,31 @@ +#==========================================================================================# +#==========================================================================================# +# This is the Arrhenius function, written as a function of a reference temperature, # +# given by tarrh8. The output variable will have the same unit as the pre-factor # +# coefficient. # +#------------------------------------------------------------------------------------------# +arrhenius = function(temp,prefactor,expcoeff){ + + #---------------------------------------------------------------------------------------# + # Find the term that goes to the exponential term, and check its size. This is to # + # avoid floating point exceptions due to overflow or underflow. # + #---------------------------------------------------------------------------------------# + lnexp = expcoeff * (tarrhi - 1.0/temp) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # If the exponential factor is tiny, make it zero, otherwise compute the actual # + # function. # + #---------------------------------------------------------------------------------------# + sel = lnexp >= lnexp.min + arr = lnexp + arr[ sel] = prefactor * exp(lnexp[sel]) + arr[!sel] = 0.0 + #---------------------------------------------------------------------------------------# + + return(arr) +}#end function arrhenius +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/atlas.r b/R-utils/atlas.r new file mode 100644 index 000000000..ee5309849 --- /dev/null +++ b/R-utils/atlas.r @@ -0,0 +1,44 @@ +#------------------------------------------------------------------------------------------# +# Function that creates a nice colour scheme. # +#------------------------------------------------------------------------------------------# +atlas <<- function(n){ + rrr <- c( 18, 42, 149, 237, 160, 102, 55) #---- Red pivots. ------------------------# + ggg <- c( 63, 158, 202, 186, 121, 80, 40) #---- Green pivots. ----------------------# + bbb <- c( 20, 33, 56, 33, 5, 17, 28) #---- Blue pivots. -----------------------# + pivot <- round(seq(from=1,to=n,by=(n-1)/(length(rrr)-1)),digits=0) + + red <- as.integer(spline(x=pivot,y=rrr,n=n)$y) + green <- as.integer(spline(x=pivot,y=ggg,n=n)$y) + blue <- as.integer(spline(x=pivot,y=bbb,n=n)$y) + + red [red > 255] <- 255; red [red < 0] <- 0 + green[green > 255] <- 255; green[green < 0] <- 0 + blue [blue > 255] <- 255; blue [blue < 0] <- 0 + mycolsch <- rgb(r=red,g=green,b=blue,maxColorValue=255) + return(mycolsch) +} +#------------------------------------------------------------------------------------------# + + + + +#------------------------------------------------------------------------------------------# +# Function that creates a nice colour scheme. # +#------------------------------------------------------------------------------------------# +iatlas <<- function(n){ + rrr <- c( 55, 102, 160, 237, 149, 42, 18) #---- Red pivots. ------------------------# + ggg <- c( 40, 80, 121, 186, 202, 158, 63) #---- Green pivots. ----------------------# + bbb <- c( 28, 17, 5, 33, 56, 33, 20) #---- Blue pivots. -----------------------# + pivot <- round(seq(from=1,to=n,by=(n-1)/(length(rrr)-1)),digits=0) + + red <- as.integer(spline(x=pivot,y=rrr,n=n)$y) + green <- as.integer(spline(x=pivot,y=ggg,n=n)$y) + blue <- as.integer(spline(x=pivot,y=bbb,n=n)$y) + + red [red > 255] <- 255; red [red < 0] <- 0 + green[green > 255] <- 255; green[green < 0] <- 0 + blue [blue > 255] <- 255; blue [blue < 0] <- 0 + mycolsch <- rgb(r=red,g=green,b=blue,maxColorValue=255) + return(mycolsch) +} +#------------------------------------------------------------------------------------------# diff --git a/R-utils/axis.rt.r b/R-utils/axis.rt.r new file mode 100644 index 000000000..4f9db8d55 --- /dev/null +++ b/R-utils/axis.rt.r @@ -0,0 +1,130 @@ +#==========================================================================================# +#==========================================================================================# +# This function works similarly to axis, but it allows rotating the labels. If las # +# is not provided, or it is between 1 and 4, then it will plot the axis with the # +# default settings. Otherwise, if las = 5, it will rotate the labels 45 degrees, and if # +# las is 6, it will rotate the labels -45 degrees. # +#------------------------------------------------------------------------------------------# +axis.rt <<- function(side,at=NULL,labels=TRUE,las=NULL,off=0.15,...){ + + #----- Make sure side is correct. ------------------------------------------------------# + stopifnot(side %in% c(1,2,3,4,5,6)) + #---------------------------------------------------------------------------------------# + + + #----- Save the "dots" argument to a list. ---------------------------------------------# + dots = list(...) + #---------------------------------------------------------------------------------------# + + + #----- Get the original "par". ---------------------------------------------------------# + par.orig = par(no.readonly=FALSE) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Grab las from par.orig in case it hasn't been passed. # + #---------------------------------------------------------------------------------------# + if (is.null(las) || (is.logical(labels) && ! labels)) las = par.orig$las + #---------------------------------------------------------------------------------------# + + + #----- Check whether art has been given and that labels need to be written. ------------# + if ( las %in% c(1,2,3,4) || (is.logical(labels) && ! labels)){ + #------------------------------------------------------------------------------------# + # Normal las, or labels aren't to be displayed. Keep it simple and use # + # the default axis function. # + #------------------------------------------------------------------------------------# + arguments = modifyList(x=dots,val=list(side=side,at=at,labels=labels,las=las)) + do.call(what="axis",args=arguments) + #------------------------------------------------------------------------------------# + + }else{ + #------------------------------------------------------------------------------------# + # las is either 5 or 6, and labels is not FALSE. We first plot the axis ticks, using the default axis # + # function, then add the labels using rotation. # + #------------------------------------------------------------------------------------# + + + + #------ In case "at" is NULL, find where to place the tick marks. -------------------# + if (is.null(at)){ + if (side %in% c(1,3)){ + usr = par.orig$usr[1:2] + axp = par.orig$xaxp + is.log = par.orig$xlog + nint = par.orig$lab[1] + }else if (side %in% c(2,4)){ + usr = par.orig$usr[3:4] + axp = par.orig$yaxp + is.log = par.orig$ylog + nint = par.orig$lab[2] + }#end if + at = axisTicks(usr=usr,log=is.log,axp=axp,nint=nint) + }#end if + #------------------------------------------------------------------------------------# + + + #------ In case "labels" is TRUE, set it to "at". -----------------------------------# + if (is.logical(labels) && labels) labels = at + #------------------------------------------------------------------------------------# + + + #------ Plot the tick marks. --------------------------------------------------------# + arguments = modifyList(x=dots,val=list(side=side,at=at,labels=FALSE)) + do.call(what="axis",args=arguments) + #------------------------------------------------------------------------------------# + + + + #------ Use text to print the labels. -----------------------------------------------# + if (side == 1){ + x = at + y = rep(par.orig$usr[3]-off*diff(par.orig$usr[3:4]),times=length(x)) + adj = if(las == 5){ c(1.0,1.0) }else{ c(0.0,1.0)} + }else if (side == 2){ + y = at + x = rep(par.orig$usr[1]-off*diff(par.orig$usr[1:2]),times=length(y)) + adj = if(las == 5){ c(1.0,1.0) }else{ c(1.0,0.0)} + }else if (side == 3){ + x = at + y = rep(par.orig$usr[4]+off*diff(par.orig$usr[3:4]),times=length(x)) + adj = if(las == 5){ c(0.0,0.0) }else{ c(1.0,0.0)} + }else if (side == 4){ + y = at + x = rep(par.orig$usr[2]+off*diff(par.orig$usr[1:2]),times=length(y)) + adj = if(las == 5){ c(0.0,0.0) }else{ c(0.0,1.0)} + }#end if + srt = if(las == 5 ){45 }else{-45 } + col = if(is.null(dots$col )){par.orig$col.axis }else{dots$col } + cex = if(is.null(dots$cex )){par.orig$cex.axis }else{dots$cex } + font = if(is.null(dots$font)){par.orig$font.axis}else{dots$font} + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Change "dots" to have the right configuration. # + #------------------------------------------------------------------------------------# + arguments = modifyList( x = dots + , val = list( x = x + , y = y + , labels = labels + , adj = adj + , pos = NULL + , cex = cex + , col = col + , font = font + , srt = srt + , xpd = TRUE + )#end list + )#end modifyList + do.call(what="text",args=arguments) + #------------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------------# + + invisible() +}#end function +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/barnes.r b/R-utils/barnes.r new file mode 100644 index 000000000..d19f146c0 --- /dev/null +++ b/R-utils/barnes.r @@ -0,0 +1,354 @@ +#==========================================================================================# +#==========================================================================================# +# Define some global constants. # +#------------------------------------------------------------------------------------------# +gamma0 <<- 0.20 +min.weight <<- 1.e-6 +#==========================================================================================# +#==========================================================================================# + + + + + +#==========================================================================================# +#==========================================================================================# +# This is the main function that controls the Barnes' objective analysis based on the # +# following paper: # +# # +# Koch, S. E.; M. desJardins, P. J. Kocin, 1983: An interactive Barnes objective map # +# analysis scheme for use with satellite and conventional data. J. Climate and Appl. # +# Meteorol., 22, 1487-1503. (hereafter KJK83). # +# # +# Inputs variables: # +# ref.lola - A vector containing the longitude and the latitude of the sought point. # +# rem.lola - A two-column matrix, each row containing the longitude and the latitude of # +# every column site. # +# rem.dat - A multiple column matrix, each column containing the dataset to be # +# analysed. The columns of rem.dat MUST correspond to the rows of rem.lola. # +# (rows are times, columns are sites). # +# dist - A vector containing the distances between the sites and the sought point. # +# gam - The gamma parameter as in Koch et al. (1983). If not given, we will use # +# the default value. # +# verbose - A logical flag. If TRUE then we will print more output to screen. # +# # +# Output: # +# gamma0 - The decaying term gamma as in KJK83. # +# delta.n - Typical distance between sites. # +# dist.mat - Matrix with distance between sites # +# first - Result from the first step # +# second - Result from the second step # +# nvalid - Number of valid points for each time of the objective analysis. # +# fitted.values - Actual answer from the objective analysis. # +#------------------------------------------------------------------------------------------# +obj.analysis <<- function(ref.lola,rem.lola,rem.dat,gam=NULL,verbose=FALSE){ + + #--------------------------------------------------------------------------------------# + # Fill in gamma and the typical dn with defaults in case nothing has been # + # provided. # + #--------------------------------------------------------------------------------------# + if (is.null(gam)) gam = gamma0 + #--------------------------------------------------------------------------------------# + + + + #--------------------------------------------------------------------------------------# + # Check whether the dimensions of the dataset match with the vector of distances. # + #--------------------------------------------------------------------------------------# + if (verbose) print(paste(" * Checking dimensions...",sep="")) + nrdat = nrow(rem.dat ) + ncdat = ncol(rem.dat ) + nrlola = nrow(rem.lola) + nclola = ncol(rem.lola) + if (ncdat != nrlola | nclola != 2){ + print(paste("------------------------------------------")) + print(paste(" In function obj.analysis:" )) + print(paste(" ---> # of rows of rem.dat: ",nrdat ,sep="")) + print(paste(" ---> # of columns of rem.dat: ",ncdat ,sep="")) + print(paste(" ---> # of rows of rem.lola: ",nrlola,sep="")) + print(paste(" ---> # of columns of rem.lola: ",nrlola,sep="")) + print(paste("------------------------------------------")) + print(paste(" 1. Number of columns of rem.dat must match the number" + ," of rows of rem.lola!",sep="")) + print(paste(" 1. Number of columns of rem.lola must be two!",sep="")) + stop("Invalid input") + }else if (length(ref.lola) != 2){ + stop(" Ref.lola must have two elements (longitude and latitude, in this order)!") + }#end if + #--------------------------------------------------------------------------------------# + + + + #----- Initialise the answer with NA. -------------------------------------------------# + first.all = rep(NA,times=nrdat) + second.all = rep(NA,times=nrdat) + ans = rep(NA,times=nrdat) + #--------------------------------------------------------------------------------------# + + + + #--------------------------------------------------------------------------------------# + # Make sure that the reference coordinates are a matrix with two columns and one # + # row. # + #--------------------------------------------------------------------------------------# + ref.lola = matrix(ref.lola,ncol=2,nrow=1) + #--------------------------------------------------------------------------------------# + + + + #--------------------------------------------------------------------------------------# + # Find the vector of distances between the remote sites and the reference. # + #--------------------------------------------------------------------------------------# + if (verbose){ + print(paste(" * Finding distance between remote sites" + ,"and the reference site...",sep="")) + }#end if + rem.dist = rdist.earth(x1=rem.lola,x2=ref.lola,miles=FALSE) * 1000. + rem.dist = c(rem.dist) + #--------------------------------------------------------------------------------------# + + + + #--------------------------------------------------------------------------------------# + # Find the vector of distances amongst the remote sites, and find the mean minimum # + # distance between the sites: that will be our proxy for delta.n. # + #--------------------------------------------------------------------------------------# + if (verbose) print(paste(" * Finding typical distance between sites...",sep="")) + mat.dist = rdist.earth(x1=rem.lola,miles=FALSE) * 1000. + #----- Make the diagonals NA because so the site itself cannot be its closest site. ---# + diag(mat.dist) = NA + delta.n = mean(apply(X=mat.dist,MARGIN=2,FUN=min,na.rm=TRUE)) + #--------------------------------------------------------------------------------------# + + + + #----- Map the data that has at least one valid data point. ---------------------------# + if (verbose){ + print(paste(" * Flag times when at least one point was valid...",sep="")) + }#end if + valid.dat = rowSums(is.finite(rem.dat)) + ok = valid.dat != 0 + nok = sum(ok) + #--------------------------------------------------------------------------------------# + + + + #--------------------------------------------------------------------------------------# + # Delete the lines without enough data. # + #--------------------------------------------------------------------------------------# + if (verbose) print(paste(" * Select lines with at least one valid datum...",sep="")) + use.dat = rem.dat [ok,] + #--------------------------------------------------------------------------------------# + + + + #--------------------------------------------------------------------------------------# + # Convert the distance vector into a matrix of the same size as the data # + #--------------------------------------------------------------------------------------# + if ( (ncdat*nok) %% length(rem.dist) != 0) browser(text="rem.dist") + use.dist = matrix(rem.dist,ncol=ncdat,nrow=nok,byrow=TRUE) + dimnames(use.dist) = dimnames(use.dat) + #--------------------------------------------------------------------------------------# + + + + #--------------------------------------------------------------------------------------# + # Find the default kappa0 and kappa1 based on equations 11 of KJK83. # + #--------------------------------------------------------------------------------------# + if (verbose) print(paste(" * Find the decay coefficients...",sep="")) + kappa0 = kappa.barnes(gam=gam,dn=delta.n) + kappa1 = gamma0 * kappa0 + #--------------------------------------------------------------------------------------# + + + #--------------------------------------------------------------------------------------# + # Find the first guess, which is a simple weighted average, with weights defined # + # as functions of the distance to the point. # + #--------------------------------------------------------------------------------------# + if (verbose){ + print(paste(" * Finding the first guess of the objective analysis...",sep="")) + }#end if + first = oa.weighted.mean(dat=use.dat,dist=use.dist,kap=kappa0) + #--------------------------------------------------------------------------------------# + + + + #--------------------------------------------------------------------------------------# + # Now we must estimate the error that a first guess would cause to the other grid # + # points by estimating the first guess for each of the points that we have, and # + # replacing its measurement by our first guess. # + #--------------------------------------------------------------------------------------# + if (verbose) print(paste(" * Finding the nudging term...",sep="")) + #----- Initialise the nudge factor with NA. -------------------------------------------# + use.nudge = NA * use.dat + #----- Loop over the sites. -----------------------------------------------------------# + for (p in 1:nrlola){ + p.iata = dimnames(rem.lola)[[1]][p] + if (verbose) print(paste(" # Replacing column ",p," (",p.iata,")...",sep="")) + + #-----------------------------------------------------------------------------------# + # Pretend that the reference site is site [p] and site [p] is the reference # + # site. # + #-----------------------------------------------------------------------------------# + p.ref.lola = matrix(rem.lola[p,],ncol=2,nrow=1) + p.rem.lola = rem.lola + p.rem.lola[p,] = ref.lola + dimnames(p.rem.lola)[[1]][p] = "1st" + #-----------------------------------------------------------------------------------# + + + + #-----------------------------------------------------------------------------------# + # Delete the lines without enough data. # + #-----------------------------------------------------------------------------------# + p.use.dat = use.dat + p.use.dat[,p] = first + dimnames(p.use.dat)[[2]][p] = "1st" + #-----------------------------------------------------------------------------------# + + + #-----------------------------------------------------------------------------------# + # Find the vector of distances between the remote sites and the reference, and # + # the corresponding matrix. # + #-----------------------------------------------------------------------------------# + p.rem.dist = rdist.earth(x1=p.rem.lola,x2=p.ref.lola,miles=FALSE) * 1000. + p.rem.dist = c(p.rem.dist) + if ( (ncdat*nok) %% length(p.rem.dist) != 0) browser(text="p.rem.dist") + p.use.dist = matrix(p.rem.dist,ncol=ncdat,nrow=nok,byrow=TRUE) + dimnames(p.use.dist) = dimnames(p.use.dat) + #-----------------------------------------------------------------------------------# + + + #-----------------------------------------------------------------------------------# + # Find the first guess for the reference sites, which is a simple weighted # + # average, with weights defined as functions of the distance to the point. # + #-----------------------------------------------------------------------------------# + p.first = oa.weighted.mean(dat=p.use.dat,dist=p.use.dist,kap=kappa0) + #-----------------------------------------------------------------------------------# + + + + #-----------------------------------------------------------------------------------# + # Replace the column of the nudging factor with the difference between the # + # actual observation and the result from the first guess. # + #-----------------------------------------------------------------------------------# + use.nudge[,p] = use.dat[,p] - p.first + #-----------------------------------------------------------------------------------# + }#end for + + #--------------------------------------------------------------------------------------# + # The second step is just a weighted average of the nudging factor, with weights # + # proportional to the distance but with a lower kappa. # + #--------------------------------------------------------------------------------------# + if (verbose){ + print(paste(" * Finding the second guess of the objective analysis...",sep="")) + }#end if + second = oa.weighted.mean(dat=use.nudge,dist=use.dist,kap=kappa1) + #--------------------------------------------------------------------------------------# + + + + #--------------------------------------------------------------------------------------# + # The result from the objective analysis is the sum of the first and second # + # iterations. Here we put the answers on the points that we could run, leaving the # + # other variables NA. # + #--------------------------------------------------------------------------------------# + first.all [ok] = first + second.all [ok] = second + ans [ok] = first + second + #--------------------------------------------------------------------------------------# + + + + + #--------------------------------------------------------------------------------------# + # The result will be a list with some of the intermediate variables and the final # + # answer for the objective analysis. # + #--------------------------------------------------------------------------------------# + res = list(gamma=gamma0,kappa=kappa0,delta.n=delta.n,dist=mat.dist + ,first=first.all,second=second.all,nvalid=valid.dat,fitted.values=ans) + return(res) + #--------------------------------------------------------------------------------------# +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + +#==========================================================================================# +#==========================================================================================# +# This function will define the best kappa0 based on D0(2 Delta_n) for the Barnes # +# objective analysis as in Koch et al. (1983). The value of D0 is chosen to give # +# D1*=exp(-1) for a given gamma. # +# # +# D1* = D0 * (1 + D0^(gamma-1) - D0^gamma) (Koch et al, 1983, equation 11.) # +#------------------------------------------------------------------------------------------# +kappa.barnes = function(gam,dn){ + + + #----- Define the function for which we will seek the root. ----------------------------# + zerofun = function(x,gam) x * (1 + x^(gam-1) - x^gam) - exp(-1.) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find a good combination of first guesses that have opposite signal. D0 must be # + # between 0 and 1, so we define the interval as being between 1.e-10 and 1. # + #---------------------------------------------------------------------------------------# + d0.barnes = uniroot(f=zerofun,interval=c(1.e-10,1.),gam=gam)$root + lnd02dtn = log(d0.barnes) + #---------------------------------------------------------------------------------------# + + + #----- Define kappa_0. -----------------------------------------------------------------# + kappa.zero = - (2. * dn / pi) * (2. * dn / pi) * lnd02dtn + #---------------------------------------------------------------------------------------# + + + #----- Define kappa_0. -----------------------------------------------------------------# + return(kappa.zero) + #---------------------------------------------------------------------------------------# +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This subroutine will perform the first pass of the objective analysis. # +#------------------------------------------------------------------------------------------# +oa.weighted.mean = function(dat,dist,kap){ + + #----- Find the weights. ---------------------------------------------------------------# + weight = exp(- dist * dist / kap) + #---------------------------------------------------------------------------------------# + + + + #----- Set the weight to zero for those data that are too far or missing. --------------# + toofar = weight < min.weight + nodata = is.na(dat) + if (length(dist) != length(toofar) | length(dist) != length(nodata)) browser() + weight[toofar] = 0. + weight[nodata] = 0. + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # The first step is simply a weighted average of the values. # + #---------------------------------------------------------------------------------------# + ans = rowSums(dat * weight,na.rm=TRUE) / rowSums(weight,na.rm=TRUE) + #---------------------------------------------------------------------------------------# + + return(ans) +}#end function oa.weighted.mean +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/bintemp.r b/R-utils/bintemp.r new file mode 100644 index 000000000..0553305af --- /dev/null +++ b/R-utils/bintemp.r @@ -0,0 +1,60 @@ +#------------------------------------------------------------------------------------------# +# Function bintemp # +# Developed by Marcos Longo - EPS/Harvard University # +# # +# This function writes a vector containing the binary files to be read in case of temp- # +# late ctl file. # +#------------------------------------------------------------------------------------------# + +bintemp = function(binary,gtime){ + mnames = c("jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec") +#----- Adding a tiny perturbation to avoid rounding to the wrong time ---------------------# + if (length(gtime) > 1){ + dtime = rep(mean(diff(gtime))*eps(),times=length(gtime)) + }else{ + dtime = 1/86400 # 1 second. Since GrADS finest resolution is 1 minute... + } #end if (length(gtime) > 1) + +#----- Extracting all the information that I might need -----------------------------------# + gdtime = gtime+dtime + levyears = as.integer(levels(years(gdtime))) + y4 = levyears[as.integer(years(gdtime))] + y2 = substring(100 + (as.numeric(y4) %% 100),2,3) + mc = tolower(as.character(months(gtime+dtime))) + m1 = match(mc,table=mnames) + m2 = substring(100+as.numeric(m1),2,3) + d1 = days(gtime+dtime) + d2 = substring(100+as.numeric(d1),2,3) + h1 = hours(gtime+dtime) + h2 = substring(100+as.numeric(h1),2,3) + n1 = minutes(gtime+dtime) + n2 = substring(100+as.numeric(n1),2,3) + bintemp = rep(binary,times=length(y4)) + +#----- Looping until I remove all "%" from the binary name --------------------------------# + timestr = gregexpr("%",bintemp[1]) + pos = timestr[[1]][1] + count = 0 + while (pos > 0){ + count = count+1 + now = tolower(substr(bintemp[1],pos,pos+2)) + bef = pos-1 + aft = pos+3 +#---- Checking which part of the template I'm dealing with --------------------------------# + if(now=="%y4") bintemp = paste(substr(bintemp,1,bef),y4,substring(bintemp,aft),sep="") + if(now=="%y2") bintemp = paste(substr(bintemp,1,bef),y2,substring(bintemp,aft),sep="") + if(now=="%mc") bintemp = paste(substr(bintemp,1,bef),mc,substring(bintemp,aft),sep="") + if(now=="%m1") bintemp = paste(substr(bintemp,1,bef),m1,substring(bintemp,aft),sep="") + if(now=="%m2") bintemp = paste(substr(bintemp,1,bef),m2,substring(bintemp,aft),sep="") + if(now=="%d1") bintemp = paste(substr(bintemp,1,bef),d1,substring(bintemp,aft),sep="") + if(now=="%d2") bintemp = paste(substr(bintemp,1,bef),d2,substring(bintemp,aft),sep="") + if(now=="%h1") bintemp = paste(substr(bintemp,1,bef),h1,substring(bintemp,aft),sep="") + if(now=="%h2") bintemp = paste(substr(bintemp,1,bef),h2,substring(bintemp,aft),sep="") + if(now=="%n2") bintemp = paste(substr(bintemp,1,bef),n2,substring(bintemp,aft),sep="") +#----- Looking for more "%"... ------------------------------------------------------------# + timestr = gregexpr("%",bintemp[1]) + pos = timestr[[1]][1] + } #end while (pos > 0) + return(bintemp) +} #end function bintemp +#------------------------------------------------------------------------------------------# diff --git a/R-utils/boot.utils.r b/R-utils/boot.utils.r new file mode 100644 index 000000000..fb6141ceb --- /dev/null +++ b/R-utils/boot.utils.r @@ -0,0 +1,159 @@ +#==========================================================================================# +#==========================================================================================# +# This is just a wrapper for boot.ci, in which we retrieve the lower bound of the # +# confidence interval only. # +#------------------------------------------------------------------------------------------# +boot.ci.lower <<- function(boot.out,...){ + ci.now = boot.ci(boot.out,...)$percent + if (length(ci.now) == 5){ + ans = ci.now[4] + }else{ + ans = NA + warning(" Failed using bootstrap...") + }#end if + return(ans) +}#end boot.ci.lower +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This is just a wrapper for boot.ci, in which we retrieve the upper bound of the # +# confidence interval only. # +#------------------------------------------------------------------------------------------# +boot.ci.upper <<- function(boot.out,...){ + ci.now = boot.ci(boot.out,...)$percent + if (length(ci.now) == 5){ + ans = ci.now[5] + }else{ + ans = NA + warning(" Failed using bootstrap...") + }#end if + return(ans) +}#end boot.ci.upper +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# Auxiliary functions that carry the index, useful for bootstrap. # +#------------------------------------------------------------------------------------------# +boot.mean <<- function(x,idx) mean ( x = x[idx] , na.rm = TRUE) +boot.median <<- function(x,idx) median ( x = x[idx] , na.rm = TRUE) +boot.sd <<- function(x,idx) sd ( x = x[idx] , na.rm = TRUE) +boot.var <<- function(x,idx) var ( x = x[idx] , na.rm = TRUE) +boot.sum <<- function(x,idx) sum ( x = x[idx] , na.rm = TRUE) +boot.q025 <<- function(x,idx) quantile( x = x[idx], probs = 0.025, na.rm = TRUE) +boot.q975 <<- function(x,idx) quantile( x = x[idx], probs = 0.975, na.rm = TRUE) +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# Demography-related functions. # +#------------------------------------------------------------------------------------------# +#----- Recruitment. -----------------------------------------------------------------------# +boot.recruit <<- function(dat,idx,dtime){ + n.idx = length(idx) + p.use = rbinom(n=n.idx,size=1,prob=dat$p.use [idx]) + p.established = rbinom(n=n.idx,size=1,prob=dat$p.established[idx]) + N = sum( dat$property [idx] * p.use ,na.rm=TRUE) + E = sum( dat$property [idx] * p.use * p.established,na.rm=TRUE) + ans = exp(log(N/E)/dtime) - 1.0 + + return(ans) +}#end boot.recruit +#----- Mortality. -------------------------------------------------------------------------# +boot.mortality <<- function(dat,idx,dtime){ + n.idx = length(idx) + p.use = rbinom(n=n.idx,size=1,prob=dat$p.use [idx]) + p.survivor = rbinom(n=n.idx,size=1,prob=dat$p.survivor [idx]) + N = sum( dat$property [idx] * p.use ,na.rm=TRUE) + S = sum( dat$property [idx] * p.use * p.survivor ,na.rm=TRUE) + ans = 1.0 - exp(- log(N/S)/dtime) + return(ans) +}#end boot.mortality +#----- Growth. ----------------------------------------------------------------------------# +boot.growth <<- function(dat,idx){ + n.idx = length(idx) + x = dat$growth[idx] + w = dat$count [idx] + ans = weighted.mean(x=x,w=w,na.rm=TRUE) + return(ans) +}#end boot.growth +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# Binomial distribution function. You can return either the expected value, or the # +# lower or upper bounds of the confidence interval. # +#------------------------------------------------------------------------------------------# +boot.binom <<- function(dat,idx,out="expected",conf=0.95){ + #---------------------------------------------------------------------------------------# + # Success is estimated using the probability. # + #---------------------------------------------------------------------------------------# + N = sum(dat$count[idx],na.rm=TRUE) + S = sum(rbinom(n=length(idx),size=1,prob=dat$probability[idx]),na.rm=TRUE) + prob = success / count + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Check which output to use. # + #---------------------------------------------------------------------------------------# + out.int = tolower(substring(out,1,1)) + if (out.int == "e"){ + #----- Expected value. --------------------------------------------------------------# + ans = prob + #------------------------------------------------------------------------------------# + }else if (out.int %in% c("l","u","h")){ + #------------------------------------------------------------------------------------# + # Confidence interval. Use the "exact" binomial confidence interval. # + #------------------------------------------------------------------------------------# + pci95 = c( qbeta(p = (1. - conf)/2., shape1 = S , shape2 = N-S+1 ) + , qbeta(p = (1. + conf)/2., shape1 = S+1, shape2 = N-S ) ) + #------------------------------------------------------------------------------------# + if(out.int %in% c("l")){ + #------ Lower bound. -------------------------------------------------------------# + ans = min(pci95) + #---------------------------------------------------------------------------------# + }else{ + #------ Upper bound. -------------------------------------------------------------# + ans = max(pci95) + #---------------------------------------------------------------------------------# + }#end if + #------------------------------------------------------------------------------------# + }else{ + #----- Invalid option, quit. --------------------------------------------------------# + cat(" - Requested output: ",out,"\n") + cat(" - Accepted options: 'expected', 'lower', or 'upper' (or 'higher')","\n") + stop(" Invalid output") + #------------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------------# + + return(ans) +}#end boot.binom +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/bramsvsaws.r b/R-utils/bramsvsaws.r new file mode 100644 index 000000000..13e241568 --- /dev/null +++ b/R-utils/bramsvsaws.r @@ -0,0 +1,61 @@ +#------------------------------------------------------------------------------------------# +# This function will build the statistics for the BRAMS dataset, based on the auto- # +# matic weather station network. # +#------------------------------------------------------------------------------------------# +bramsvsaws = function(bramsgrid,bramsraw,obs){ + statout = list() + + for (vari in obs$aws$vars){ + + print (paste(" - Finding the statistics for",vari,"...")) + + + #----- Convert the current variable to a matrix. ------------------------------------# + this = matrix(bramsraw[[vari]],nrow=bramsraw$tmax,ncol=bramsraw$xmax*bramsraw$ymax) + this = this[,bramsgrid$nnaws] + isvalid = is.finite(this) + + dathour = hours(bramsraw$gtime) + hday = sort(unique(dathour)) + xhday = paste("X",hday,sep="") + nday = length(hday) + + + #----- Compute the diurnal cycle of some statistics. --------------------------------# + print (" * Computing the average diurnal cycle...") + dmean = qapply(mat=this ,bycol=TRUE,index=dathour,func=mean,na.rm=TRUE) + print (" * Computing the standard deviation of the diurnal cycle...") + dsdev = qapply(mat=this ,bycol=TRUE,index=dathour,func=sd ,na.rm=TRUE) + print (" * Counting how many data we used for the diunal cycle...") + dccnt = qapply(mat=isvalid,bycol=TRUE,index=dathour,func=sum ,na.rm=TRUE) + + #----- Discard hours that we can't compare. -----------------------------------------# + print (" - Discarding hours that are not available in TRMM...") + usehr = match(obs$rg$xhday,xhday) + xhday = xhday[usehr] + dmean = dmean[usehr,] + dsdev = dsdev[usehr,] + dccnt = dccnt[usehr,] + + #----- Standardise all -Inf to NA. --------------------------------------------------# + if (any(dccnt == 0) || any(! is.finite(dmean))){ + dmean[! is.finite(dmean) | dccnt == 0] = NA + } + if (any(dccnt == 0) || any(! is.finite(dsdev))){ + dsdev[! is.finite(dsdev) | dccnt == 0] = NA + } + + #----- Transpose the matrices. ------------------------------------------------------# + statout[[vari]]$dmean = t(dmean) + statout[[vari]]$dsdev = t(dsdev) + statout[[vari]]$dccnt = t(dccnt) + + dimnames(statout[[vari]]$dmean) = list(obs$aws$places,xhday) + dimnames(statout[[vari]]$dsdev) = list(obs$aws$places,xhday) + dimnames(statout[[vari]]$dccnt) = list(obs$aws$places,xhday) + + }#end for (vari in obs$aws$vars) + return(statout) +}#end function +#------------------------------------------------------------------------------------------# + diff --git a/R-utils/bramsvsradio.r b/R-utils/bramsvsradio.r new file mode 100644 index 000000000..cf4340487 --- /dev/null +++ b/R-utils/bramsvsradio.r @@ -0,0 +1,89 @@ +#------------------------------------------------------------------------------------------# +# This function will build the statistics for the BRAMS dataset, based on the # +# radiosonde network. # +#------------------------------------------------------------------------------------------# +bramsvsradio = function(bramsgrid,bramsraw,obs){ + statout = list() + + for (vari in obs$radio$vars){ + + print (paste(" - Finding the statistics for",vari,"...")) + vardim=dim(bramsraw[[vari]]) + + #----- Save dimensions in scalar variables. -----------------------------------------# + tmax = vardim[1] + zmax = vardim[2] + xymax = vardim[3]*vardim[4] + ilmax = obs$radio$nplevs + places = obs$radio$places + nplaces = length(places) + + #----- Convert the current variable to a matrix. ------------------------------------# + this = array(bramsraw[[vari]],dim=c(tmax,zmax,xymax)) + this = this[,,bramsgrid$nnradio] + presin = array(bramsraw$pres,dim=c(tmax,zmax,xymax)) + presin = presin[,,bramsgrid$nnradio] + + #----- Switch the order of the indices so the pressure is the leftmost one. ---------# + this = aperm(a=this,perm=c(2,1,3)) + presin = aperm(a=presin,perm=c(2,1,3)) + presout = obs$radio$plevs + + #----- Find the interpolated array. -------------------------------------------------# + inter = interpol(varin=this,presin=presin,presout=presout) + + #------------------------------------------------------------------------------------# + # Swap the pressure and time again, and collapse it to a matrix, so the # + # computation of the diurnal cycle statistics can be done using qapply. # + #------------------------------------------------------------------------------------# + inter = aperm(a=inter,perm=c(2,1,3)) + inter = matrix(inter,nrow=tmax,ncol=ilmax*nplaces) + isvalid = is.finite(inter) + + dathour = hours(bramsraw$gtime) + hday = sort(unique(dathour)) + xhday = paste("X",hday,sep="") + nday = length(hday) + + #----- Compute the diurnal cycle of some statistics. --------------------------------# + print (" * Computing the average diurnal cycle...") + dmean = qapply(mat=inter ,bycol=TRUE,index=dathour,func=mean,na.rm=TRUE) + print (" * Computing the standard deviation of the diurnal cycle...") + dsdev = qapply(mat=inter ,bycol=TRUE,index=dathour,func=sd ,na.rm=TRUE) + print (" * Counting how many data we used for the diunal cycle...") + dccnt = qapply(mat=isvalid,bycol=TRUE,index=dathour,func=sum ,na.rm=TRUE) + + #----- Discard hours that we can't compare. -----------------------------------------# + print (" - Discarding hours that are not available in the radiosonde data...") + usehr = match(obs$radio$xhday,xhday) + nxday = length(usehr) + + + + xhday = xhday[usehr] + dmean = dmean[usehr,] + dsdev = dsdev[usehr,] + dccnt = dccnt[usehr,] + + #----- Standardise all -Inf to NA. --------------------------------------------------# + if (any(dccnt == 0) || any(! is.finite(dmean))){ + dmean[! is.finite(dmean) | dccnt == 0] = NA + } + if (any(dccnt == 0) || any(! is.finite(dsdev))){ + dsdev[! is.finite(dsdev) | dccnt == 0] = NA + } + + #----- Expand the matrices back to arrays. ------------------------------------------# + statout[[vari]]$dmean = array(dmean,dim=c(nxday,ilmax,nplaces)) + statout[[vari]]$dsdev = array(dsdev,dim=c(nxday,ilmax,nplaces)) + statout[[vari]]$dccnt = array(dccnt,dim=c(nxday,ilmax,nplaces)) + + dimnames(statout[[vari]]$dmean) = list(xhday,presout,places) + dimnames(statout[[vari]]$dsdev) = list(xhday,presout,places) + dimnames(statout[[vari]]$dccnt) = list(xhday,presout,places) + + }#end for (vari in obs$radio$vars) + return(statout) +}#end function +#------------------------------------------------------------------------------------------# + diff --git a/R-utils/bramsvsrg.r b/R-utils/bramsvsrg.r new file mode 100644 index 000000000..eec080360 --- /dev/null +++ b/R-utils/bramsvsrg.r @@ -0,0 +1,62 @@ +#------------------------------------------------------------------------------------------# +# This function will build the statistics for the BRAMS dataset, based on the rain # +# gauge network. # +#------------------------------------------------------------------------------------------# +bramsvsrg = function(bramsgrid,bramsraw,obs){ + statout = list() + + #----- Convert precipitation dataset to a matrix. --------------------------------------# + prate = matrix(bramsraw$prate,nrow=bramsraw$tmax,ncol=bramsraw$xmax*bramsraw$ymax) + prate = prate[,bramsgrid$nnrg] + + print (" - Finding the precipitation rates...") + dathour = hours(bramsraw$gtime) + hday = sort(unique(dathour)) + xhday = paste("X",hday,sep="") + nday = length(hday) + + rainlog = log(prate) + itrains = is.finite(rainlog) + rainlog[! itrains ] = NA + raindata = is.finite(prate) + #----- Compute the diurnal cycle of some statistics. -----------------------------------# + print (" - Computing the average diurnal cycle...") + dmean = qapply(mat=rainlog ,bycol=TRUE,index=dathour,func=mean,na.rm=TRUE) + print (" - Computing the standard deviation of the diurnal cycle...") + dsdev = qapply(mat=rainlog ,bycol=TRUE,index=dathour,func=sd ,na.rm=TRUE) + print (" - Counting how many data we used for the diunal cycle...") + dccnt = qapply(mat=raindata,bycol=TRUE,index=dathour,func=sum ,na.rm=TRUE) + print (" - Computing the diurnal cycle of probability of precipitation...") + dprob = qapply(mat=itrains ,bycol=TRUE,index=dathour,func=sum ,na.rm=TRUE) / dccnt + + #----- Discard hours that we can't compare. --------------------------------------------# + print (" - Discarding hours that are not available in TRMM...") + usehr = match(obs$rg$xhday,xhday) + xhday = xhday[usehr] + dmean = dmean[usehr,] + dsdev = dsdev[usehr,] + dccnt = dccnt[usehr,] + dprob = dprob[usehr,] + + #----- Standardise all -Inf to NA. -----------------------------------------------------# + dmean[! is.finite(dmean) | dccnt == 0] = NA + dsdev[! is.finite(dsdev) | dccnt == 0] = NA + dprob[! is.finite(dprob) | dccnt == 0] = NA + dmean = exp(dmean) + dsdev = exp(dsdev) + + #----- Transpose the matrices. ---------------------------------------------------------# + statout$dmean = t(dmean) + statout$dsdev = t(dsdev) + statout$dprob = t(dprob) + statout$dccnt = t(dccnt) + + dimnames(statout$dmean) = list(NULL,xhday) + dimnames(statout$dsdev) = list(NULL,xhday) + dimnames(statout$dprob) = list(NULL,xhday) + dimnames(statout$dccnt) = list(NULL,xhday) + + return(statout) +}#end function +#------------------------------------------------------------------------------------------# + diff --git a/R-utils/bramsvstrmm.r b/R-utils/bramsvstrmm.r new file mode 100644 index 000000000..d883c8bbb --- /dev/null +++ b/R-utils/bramsvstrmm.r @@ -0,0 +1,78 @@ +#------------------------------------------------------------------------------------------# +# This function will build the statistics for the BRAMS dataset, based on TRMM grid. # +#------------------------------------------------------------------------------------------# +bramsvstrmm = function(bramsgrid,bramsraw,obs){ + statout = list() + + #----- Convert precipitation dataset to a matrix. --------------------------------------# + prate = matrix(bramsraw$prate,nrow=bramsraw$tmax,ncol=bramsraw$xmax*bramsraw$ymax) + + print (" - Finding the precipitation rate statistics in each TRMM grid area...") + aux = qapply(mat=prate,index=bramsgrid$maptrmm,func=mean,bycol=FALSE,na.rm=TRUE) + dathour = hours(bramsraw$gtime) + hday = sort(unique(dathour)) + xhday = paste("X",hday,sep="") + nday = length(hday) + + rainlog = log(aux) + itrains = is.finite(rainlog) + rainlog[! itrains ] = NA + raindata = is.finite(aux ) + #----- Compute the diurnal cycle of some statistics. -----------------------------------# + print (" - Computing the average diurnal cycle...") + dmean = qapply(mat=rainlog ,bycol=TRUE,index=dathour,func=mean,na.rm=TRUE) + print (" - Computing the standard deviation of the diurnal cycle...") + dsdev = qapply(mat=rainlog ,bycol=TRUE,index=dathour,func=sd ,na.rm=TRUE) + print (" - Counting how many data we used for the diunal cycle...") + dccnt = qapply(mat=raindata,bycol=TRUE,index=dathour,func=sum ,na.rm=TRUE) + print (" - Computing the diurnal cycle of probability of precipitation...") + dprob = qapply(mat=itrains ,bycol=TRUE,index=dathour,func=sum ,na.rm=TRUE) / dccnt + + #----- Discard hours that we can't compare. --------------------------------------------# + print (" - Discarding hours that are not available in TRMM...") + usehr = match(obs$trmm$xhday,xhday) + xhday = xhday[usehr] + dmean = dmean[usehr,] + dsdev = dsdev[usehr,] + dccnt = dccnt[usehr,] + dprob = dprob[usehr,] + + #----- Standardise all -Inf to NA. -----------------------------------------------------# + dmean[! is.finite(dmean) | dccnt == 0] = NA + dsdev[! is.finite(dsdev) | dccnt == 0] = NA + dprob[! is.finite(dprob) | dccnt == 0] = NA + dmean = exp(dmean) + dsdev = exp(dsdev) + + #----- Transpose the matrices. ---------------------------------------------------------# + dmean = t(dmean) + dsdev = t(dsdev) + dprob = t(dprob) + dccnt = t(dccnt) + + br2tr = sort(unique(bramsgrid$maptrmm[is.finite(bramsgrid$maptrmm)])) + + #---------------------------------------------------------------------------------------# + # Make the matrices with the same size as TRMM, initialise them with NA, and fill # + # only those with valid BRAMS grid points in it. # + #---------------------------------------------------------------------------------------# + statout$dmean = matrix(NA,nrow=dim(obs$trmm$dmean)[1],ncol=dim(obs$trmm$dmean)[2]) + statout$dsdev = matrix(NA,nrow=dim(obs$trmm$dsdev)[1],ncol=dim(obs$trmm$dsdev)[2]) + statout$dprob = matrix(NA,nrow=dim(obs$trmm$dprob)[1],ncol=dim(obs$trmm$dprob)[2]) + statout$dccnt = matrix(NA,nrow=dim(obs$trmm$dccnt)[1],ncol=dim(obs$trmm$dccnt)[2]) + + dimnames(statout$dmean) = list(NULL,xhday) + dimnames(statout$dsdev) = list(NULL,xhday) + dimnames(statout$dprob) = list(NULL,xhday) + dimnames(statout$dccnt) = list(NULL,xhday) + + statout$dmean[br2tr,] = dmean + statout$dsdev[br2tr,] = dsdev + statout$dprob[br2tr,] = dprob + statout$dccnt[br2tr,] = dccnt + + + return(statout) +}#end function +#------------------------------------------------------------------------------------------# + diff --git a/R-utils/census.r b/R-utils/census.r new file mode 100644 index 000000000..1a9254f3c --- /dev/null +++ b/R-utils/census.r @@ -0,0 +1,35 @@ +#------------------------------------------------------------------------------------------# +# This function finds the "census" from the population pop for each element of the # +# list of possible values categ. # +#------------------------------------------------------------------------------------------# +census = function(pop,categ){ + #---------------------------------------------------------------------------------------# + # First check whether the categ vector contains duplicates. In case it does, crash. # + #---------------------------------------------------------------------------------------# + if (length(categ) != length(unique(categ))){ + stop("Vector categ shall not contain duplicates...") + }#end if + #---------------------------------------------------------------------------------------# + + #----- Find the number of categories. --------------------------------------------------# + categ = as.vector(categ) + ncat = length(categ) + + #----- Make the population a vector and find its length. -------------------------------# + popv = as.vector(pop) + npop = length(popv) + + #----- Make a matrix with the population repeated ncat times. --------------------------# + popmat = matrix(data=rep(x=popv,times=ncat),ncol=ncat) + + #----- Make a matrix of categories with each category repeated npop times. -------------# + catmat = matrix(data=rep(x=categ,each=npop),nrow=npop) + + + #----- The count is going to be the column sum. ----------------------------------------# + mycount = colSums(popmat == catmat,na.rm=TRUE) + + #----- The answer is a vector with the count for each category. ------------------------# + return(mycount) +}#end if +#------------------------------------------------------------------------------------------# diff --git a/R-utils/census.tagger.r b/R-utils/census.tagger.r new file mode 100644 index 000000000..461c87f17 --- /dev/null +++ b/R-utils/census.tagger.r @@ -0,0 +1,360 @@ +#==========================================================================================# +#==========================================================================================# +# This function is supposed to work for Santarem census only, feel free to adapt it # +# elsewhere. It creates a collection of unique tags based on various variables such as # +# tags, coordinates, common name, and the older values that these variables once had. # +#------------------------------------------------------------------------------------------# +census.tagger.s67 = function(merged,this,survey.years){ + #=======================================================================================# + #=======================================================================================# + # Create all possible tags. We must declare them as global variables because they # + # must be accessed from sapply. # + #---------------------------------------------------------------------------------------# + + + #----- Transects. ----------------------------------------------------------------------# + n.trans.merged <<- merged$trans + n.trans.this <<- this$trans + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Scientific name flag, so it never fuses 2 trees with non-NA scientific names # + # unless they are the same. # + #---------------------------------------------------------------------------------------# + n.scientific.merged <<- rep("M" ,times=nrow(merged)) + n.scientific.this <<- rep("T" ,times=nrow(this) ) + n.scientific.merged[is.na(merged$scientific)] <<- "T" + n.scientific.this [is.na(this$scientific) ] <<- "M" + o.scientific.merged <<- rep("M" ,times=nrow(merged)) + o.scientific.this <<- rep("T" ,times=nrow(this) ) + o.scientific.merged[is.na(merged$scientific)] <<- "O" + o.scientific.this [is.na(this$scientific) ] <<- "O" + #---------------------------------------------------------------------------------------# + + + #----- Coordinates. --------------------------------------------------------------------# + n.x.merged = as.integer(10 * merged$x) + o.x.merged = as.integer(10 * merged$old.x) + f.x.merged = as.integer(10 * merged$x.1st) + n.x.this = as.integer(10 * this$x) + s.x.this = as.integer(10 * (1000 - this$x)) + n.y.merged = as.integer(10 * merged$y) + o.y.merged = as.integer(10 * merged$old.y) + f.y.merged = as.integer(10 * merged$y.1st) + n.y.this = as.integer(10 * this$y) + s.y.this = as.integer(10 * (- this$y)) + f.x.merged [is.na(f.x.merged)] = n.x.merged[is.na(f.x.merged) ] + f.y.merged [is.na(f.y.merged)] = n.y.merged[is.na(f.y.merged) ] + o.x.merged [is.na(o.x.merged)] = f.x.merged[is.na(o.x.merged) ] + o.y.merged [is.na(o.y.merged)] = f.y.merged[is.na(o.y.merged) ] + n.xy.merged <<- paste("x",n.x.merged,"+y",n.y.merged,sep="") + o.xy.merged <<- paste("x",o.x.merged,"+y",o.y.merged,sep="") + f.xy.merged <<- paste("x",f.x.merged,"+y",f.y.merged,sep="") + n.xy.this <<- paste("x",n.x.this ,"+y",n.y.this ,sep="") + s.xy.this <<- paste("x",s.x.this ,"+y",n.y.this ,sep="") + c.xy.this <<- paste("x",n.x.this ,"+y",s.y.this ,sep="") + z.xy.this <<- paste("x",s.x.this ,"+y",s.y.this ,sep="") + #---------------------------------------------------------------------------------------# + + + + + #------ Tags. --------------------------------------------------------------------------# + n.tag.merged <<- merged$tag + o.tag.merged <<- merged$tag.1st + f.tag.merged <<- merged$tag.1st + n.tag.this <<- this$tag + o.tag.this <<- this$old.tag + f.tag.merged[is.na(f.tag.merged)] <<- n.tag.merged [is.na(f.tag.merged)] + o.tag.merged[is.na(o.tag.merged)] <<- f.tag.merged [is.na(o.tag.merged)] + o.tag.this [is.na(o.tag.this) ] <<- n.tag.this [is.na(o.tag.this) ] + #---------------------------------------------------------------------------------------# + + + + + #------ Common name. -------------------------------------------------------------------# + n.common.merged <<- merged$common + n.common.this <<- this$common + f.common.merged <<- merged$common.1st + o.common.merged <<- merged$old.common + f.common.merged[is.na(f.common.merged)] <<- n.common.merged[is.na(f.common.merged)] + o.common.merged[is.na(o.common.merged)] <<- f.common.merged[is.na(o.common.merged)] + #---------------------------------------------------------------------------------------# + + + + #------- DBH. --------------------------------------------------------------------------# + f.dbh.merged <<- as.integer(10 * round(merged$dbh.1999,1)) + f.dbh.this <<- as.integer(10 * round(this$dbh.1999 ,1)) + #----- The DBH tag changes according to the census. ------------------------------------# + if (survey.years[1] < 2001){ + o.dbh.merged <<- as.integer(10 * round(merged$dbh.1999,1)) + o.dbh.this <<- as.integer(10 * round(this$dbh.1999 ,1)) + n.dbh.merged <<- as.integer(10 * round(merged$dbh.1999,1)) + n.dbh.this <<- as.integer(10 * round(this$dbh.1999 ,1)) + }else if (survey.years[1] < 2005){ + o.dbh.merged <<- as.integer(10 * round(merged$dbh.1999,1)) + o.dbh.this <<- as.integer(10 * round(this$dbh.1999 ,1)) + n.dbh.merged <<- as.integer(10 * round(merged$dbh.2001,1)) + n.dbh.this <<- as.integer(10 * round(this$dbh.2001 ,1)) + }else if (survey.years[1] < 2007){ + o.dbh.merged <<- as.integer(10 * round(merged$dbh.2001,1)) + o.dbh.this <<- as.integer(10 * round(this$dbh.2001 ,1)) + n.dbh.merged <<- as.integer(10 * round(merged$dbh.2005,1)) + n.dbh.this <<- as.integer(10 * round(this$dbh.2005 ,1)) + }else{ + o.dbh.merged <<- as.integer(10 * round(merged$dbh.2005,1)) + o.dbh.this <<- as.integer(10 * round(this$dbh.2005 ,1)) + n.dbh.merged <<- as.integer(10 * round(merged$dbh.2007,1)) + n.dbh.this <<- as.integer(10 * round(this$dbh.2007 ,1)) + }#end if + f.dbh.merged[is.na(f.dbh.merged)] <<- "MM" + o.dbh.merged[is.na(o.dbh.merged)] <<- "MM" + n.dbh.merged[is.na(n.dbh.merged)] <<- "MM" + f.dbh.this [is.na(f.dbh.this )] <<- "TT" + o.dbh.this [is.na(o.dbh.this )] <<- "TT" + n.dbh.this [is.na(n.dbh.this )] <<- "TT" + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # List of flags. Here the order matters, the first is the preferred method and the # + # last is the desperate method. # + #---------------------------------------------------------------------------------------# + cat(" * Create tags for matching...","\n") + a.trans.merged = c("n.trans.merged" ) + a.trans.this = c("n.trans.this" ) + a.scientific.merged = c("n.scientific.merged","o.scientific.merged") + a.scientific.this = c("n.scientific.this" ,"o.scientific.this" ) + #---- Check whether there is any tag change. -------------------------------------------# + if ( any(o.tag.merged != f.tag.merged,na.rm=TRUE) + & any(o.tag.merged != n.tag.merged,na.rm=TRUE)){ + a.tag.merged = c("n.tag.merged" , "f.tag.merged" , "o.tag.merged" ) + }else if ( any(f.tag.merged != n.tag.merged,na.rm=TRUE)){ + a.tag.merged = c("n.tag.merged" , "f.tag.merged" ) + }else{ + a.tag.merged = c("n.tag.merged" ) + }#end if + if ( any(o.tag.this != n.tag.this,na.rm=TRUE)){ + a.tag.this = c("n.tag.this", "o.tag.this") + }else{ + a.tag.this = c("n.tag.this" ) + }#end if + #---- Check whether there is any coordinate change. ------------------------------------# + if ( any(o.xy.merged != f.xy.merged,na.rm=TRUE) + & any(o.xy.merged != n.xy.merged,na.rm=TRUE)){ + a.xy.merged = c("n.xy.merged" , "f.xy.merged" , "o.xy.merged" ) + }else if ( any(f.xy.merged != n.xy.merged,na.rm=TRUE)){ + a.xy.merged = c("n.xy.merged" , "f.xy.merged" ) + }else{ + a.xy.merged = c("n.xy.merged" ) + }#end if + a.xy.this = c("n.xy.this" ) + b.xy.this = c("s.xy.this" , "c.xy.this" , "z.xy.this" ) + #---- Check whether there is any common name change. -----------------------------------# + if ( any(o.common.merged != f.common.merged,na.rm=TRUE) + & any(o.common.merged != n.common.merged,na.rm=TRUE)){ + a.common.merged = c("n.common.merged", "f.common.merged", "o.common.merged") + }else if ( any(f.common.merged != n.common.merged,na.rm=TRUE)){ + a.common.merged = c("n.common.merged", "f.common.merged") + }else{ + a.common.merged = c("n.common.merged" ) + }#end if + a.common.this = c("n.common.this" ) + #---- Check whether there are various DBH to compare. ----------------------------------# + if (survey.years[1] < 2001){ + a.dbh.merged = c("f.dbh.merged" ) + a.dbh.this = c("f.dbh.this" ) + }else if (survey.years[1] < 2005){ + a.dbh.merged = c("n.dbh.merged" , "f.dbh.merged" ) + a.dbh.this = c("n.dbh.this" , "f.dbh.this" ) + }else{ + a.dbh.merged = c("n.dbh.merged" , "o.dbh.merged" , "f.dbh.merged" ) + a.dbh.this = c("n.dbh.this" , "o.dbh.this" , "f.dbh.this" ) + }#end if + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # Initialise the tag. # + #---------------------------------------------------------------------------------------# + uni.tag = list() + u = 0 + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # First we create the long tags that explore all variables. # + #---------------------------------------------------------------------------------------# + cat(" * Full tags...","\n") + eg.merged = expand.grid( trans = a.trans.merged + , scientific = a.scientific.merged + , tag = a.tag.merged + , xy = a.xy.merged + , common = a.common.merged + , dbh = a.dbh.merged + )#end expand.grid + eg.this = expand.grid( trans = a.trans.this + , scientific = a.scientific.this + , tag = a.tag.this + , xy = a.xy.this + , common = a.common.this + , dbh = a.dbh.this + )#end expand.grid + eg.merged = sapply(eg.merged,as.character) + eg.this = sapply(eg.this ,as.character) + if (is.null(dim(eg.merged))) eg.merged = matrix(eg.merged,nrow=1) + if (is.null(dim(eg.this ))) eg.this = matrix(eg.this ,nrow=1) + + combo = expand.grid( merged = sequence(nrow(eg.merged)) + , this = sequence(nrow(eg.this )) + )#end expand.grid + #----- Loop over all combinations. -----------------------------------------------------# + for (co in 1:nrow(combo)){ + u = u + 1 + em = combo[co,1] + et = combo[co,2] + retrieved.merged = t(t(sapply(X=eg.merged[em,],FUN=get))) + retrieved.this = t(t(sapply(X=eg.this [et,],FUN=get))) + t.merged = apply(X=retrieved.merged,MARGIN=1,FUN=paste,collapse="+") + t.this = apply(X=retrieved.this ,MARGIN=1,FUN=paste,collapse="+") + #----- Save the tags to the output list. --------------------------------------------# + uni.tag[[u]] = list(t.merged = t.merged, t.this = t.this) + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Now we only check the transect, the tag, and the coordinates. # + #---------------------------------------------------------------------------------------# + cat(" * Transect, tags, xy...","\n") + eg.merged = expand.grid( trans = a.trans.merged + , scientific = a.scientific.merged + , tag = a.tag.merged + , xy = a.xy.merged + )#end expand.grid + eg.this = expand.grid( trans = a.trans.this + , scientific = a.scientific.this + , tag = a.tag.this + , xy = a.xy.this + )#end expand.grid + eg.merged = sapply(eg.merged,as.character) + eg.this = sapply(eg.this ,as.character) + if (is.null(dim(eg.merged))) eg.merged = matrix(eg.merged,nrow=1) + if (is.null(dim(eg.this ))) eg.this = matrix(eg.this ,nrow=1) + combo = expand.grid( merged = sequence(nrow(eg.merged)) + , this = sequence(nrow(eg.this )) + )#end expand.grid + #----- Loop over all combinations. -----------------------------------------------------# + for (co in 1:nrow(combo)){ + u = u + 1 + em = combo[co,1] + et = combo[co,2] + retrieved.merged = t(t(sapply(X=eg.merged[em,],FUN=get))) + retrieved.this = t(t(sapply(X=eg.this [et,],FUN=get))) + t.merged = apply(X=retrieved.merged,MARGIN=1,FUN=paste,collapse="+") + t.this = apply(X=retrieved.this ,MARGIN=1,FUN=paste,collapse="+") + #----- Save the tags to the output list. --------------------------------------------# + uni.tag[[u]] = list(t.merged = t.merged, t.this = t.this) + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # Now we check only transect, tag, common name, and DBH (no XY). # + #---------------------------------------------------------------------------------------# + cat(" * Transect, tags, common, dbh...","\n") + eg.merged = expand.grid( trans = a.trans.merged + , scientific = a.scientific.merged + , tag = a.tag.merged + , common = a.common.merged + , dbh = a.dbh.merged + )#end expand.grid + eg.this = expand.grid( trans = a.trans.this + , scientific = a.scientific.this + , tag = a.tag.this + , common = a.common.this + , dbh = a.dbh.this + )#end expand.grid + eg.merged = sapply(eg.merged,as.character) + eg.this = sapply(eg.this ,as.character) + if (is.null(dim(eg.merged))) eg.merged = matrix(eg.merged,nrow=1) + if (is.null(dim(eg.this ))) eg.this = matrix(eg.this ,nrow=1) + combo = expand.grid( merged = sequence(nrow(eg.merged)) + , this = sequence(nrow(eg.this )) + )#end expand.grid + #----- Loop over all combinations. -----------------------------------------------------# + for (co in 1:nrow(combo)){ + u = u + 1 + em = combo[co,1] + et = combo[co,2] + retrieved.merged = t(t(sapply(X=eg.merged[em,],FUN=get))) + retrieved.this = t(t(sapply(X=eg.this [et,],FUN=get))) + t.merged = apply(X=retrieved.merged,MARGIN=1,FUN=paste,collapse="+") + t.this = apply(X=retrieved.this ,MARGIN=1,FUN=paste,collapse="+") + #----- Save the tags to the output list. --------------------------------------------# + uni.tag[[u]] = list(t.merged = t.merged, t.this = t.this) + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Last we check for individuals with swapped coordinates but otherwise same tag and # + # same dbh. # + #---------------------------------------------------------------------------------------# + cat(" * Transect, tags, swapped coordinates, common...","\n") + eg.merged = expand.grid( trans = a.trans.merged + , scientific = a.scientific.merged + , tag = a.tag.merged + , xy = a.xy.merged + , common = a.common.merged + )#end expand.grid + eg.this = expand.grid( trans = a.trans.this + , scientific = a.scientific.this + , tag = a.tag.this + , xy = b.xy.this + , common = a.common.this + )#end expand.grid + eg.merged = sapply(eg.merged,as.character) + eg.this = sapply(eg.this ,as.character) + if (is.null(dim(eg.merged))) eg.merged = matrix(eg.merged,nrow=1) + if (is.null(dim(eg.this ))) eg.this = matrix(eg.this ,nrow=1) + combo = expand.grid( merged = sequence(nrow(eg.merged)) + , this = sequence(nrow(eg.this )) + )#end expand.grid + #----- Loop over all combinations. -----------------------------------------------------# + for (co in 1:nrow(combo)){ + u = u + 1 + em = combo[co,1] + et = combo[co,2] + retrieved.merged = t(t(sapply(X=eg.merged[em,],FUN=get))) + retrieved.this = t(t(sapply(X=eg.this [et,],FUN=get))) + t.merged = apply(X=retrieved.merged,MARGIN=1,FUN=paste,collapse="+") + t.this = apply(X=retrieved.this ,MARGIN=1,FUN=paste,collapse="+") + #----- Save the tags to the output list. --------------------------------------------# + uni.tag[[u]] = list(t.merged = t.merged, t.this = t.this) + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Return the tags. # + #---------------------------------------------------------------------------------------# + return (uni.tag) + #---------------------------------------------------------------------------------------# +}#end function +#------------------------------------------------------------------------------------------# diff --git a/R-utils/charutils.r b/R-utils/charutils.r new file mode 100644 index 000000000..1e2bbd827 --- /dev/null +++ b/R-utils/charutils.r @@ -0,0 +1,87 @@ +#==========================================================================================# +#==========================================================================================# +# This sub-routine makes the first letter of every entry capitalised, whilst leaving # +# the other letters lower case. # +# Original subroutine comes from the help on toupper. Here I modified it just to deal # +# with NAs. # +#------------------------------------------------------------------------------------------# +capwords <<- function(s, strict = FALSE) { + + #----- Function to be applied for each element of s. ----------------------------------# + cap = function(x,strict=FALSE){ + + #----- First letter is always upper case. -----------------------------------------# + first = toupper(substring(x,1,1)) + + #----- Check whether to force the remainder to be lower case or not. --------------# + if (strict){ + remainder = tolower(substring(x,2)) + }else{ + remainder = substring(x,2) + }#end if + #----------------------------------------------------------------------------------# + ans = paste(first,remainder,sep="",collapse=" ") + return(ans) + }#end function + #--------------------------------------------------------------------------------------# + + + #----- Remember which elements were NA, then we reset them to NA. ---------------------# + sel = is.na(s) + #--------------------------------------------------------------------------------------# + + #----- Fix case for all dataset. ------------------------------------------------------# + ans = sapply( X=strsplit(s, split = " "),FUN=cap,strict=strict + , USE.NAMES = !is.null(names(s))) + #--------------------------------------------------------------------------------------# + + #---- Force NAs to remain NAs. --------------------------------------------------------# + ans[sel] = NA + return(ans) + #--------------------------------------------------------------------------------------# +}#end if +#==========================================================================================# +#==========================================================================================# + + + + + +#==========================================================================================# +#==========================================================================================# +# This function deletes spaces from strings, trimming. Default is to trim both # +# sides, but you can also trim the left or the right only. # +#------------------------------------------------------------------------------------------# +trim <<- function(x,side="both"){ + if (side %in% c("both","left") ) x = sub(pattern="^\\s+",replacement="",x=x) + if (side %in% c("both","right")) x = sub(pattern="\\s+$",replacement="",x=x) + return(x) +}#end function trim +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function concatenates two strings, but skips the NAs. # +#------------------------------------------------------------------------------------------# +concatenate.message <<- function(x1,x2,sep="; "){ + if (length(x1) != length(x2)) stop(" Message vectors must have the same length!") + + only.x1 = ( ! is.na(x1) ) & is.na(x2) + only.x2 = is.na(x1) & ( ! is.na(x2) ) + both = ( ! is.na(x1) ) & ( ! is.na(x2) ) + + full = rep(NA_character_,times=length(x1)) + full[only.x1] = x1[only.x1] + full[only.x2] = x2[only.x2] + full[both ] = paste(x1[both],x2[both],sep=sep) + + return(full) +}#end function +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/clean.tmp.r b/R-utils/clean.tmp.r new file mode 100644 index 000000000..4e40217fa --- /dev/null +++ b/R-utils/clean.tmp.r @@ -0,0 +1,9 @@ +#==========================================================================================# +#==========================================================================================# +# This function is a simple workaround for R version 2.15.0. It deletes the # +# temporary PDF files from the temp directory. # +#------------------------------------------------------------------------------------------# +clean.tmp <<- function(){ + unlink(list.files(path=tempdir(), pattern="^pdf.", full.names=TRUE)) +}#end function clean.tmp +#------------------------------------------------------------------------------------------# diff --git a/R-utils/clife.r b/R-utils/clife.r new file mode 100644 index 000000000..a0a5fcf28 --- /dev/null +++ b/R-utils/clife.r @@ -0,0 +1,28 @@ +#------------------------------------------------------------------------------------------# +# Function that creates a purple to green colour scheme. # +#------------------------------------------------------------------------------------------# +clife <<- function(n){ + nodes = c("#3F1368","purple2","slateblue","lightslateblue","#C0ACCF" + ,"darkolivegreen1","olivedrab3","chartreuse2","forestgreen","#004000") + nodes = data.frame(t(col2rgb(nodes))) + pivot = round(seq(from=1,to=n,length.out=nrow(nodes)),digits=0) + rgb.out = data.frame(t(mapply(FUN=spline,y=nodes,MoreArgs=list(x=pivot,n=n))))$y + rgb.out = lapply(X=rgb.out,FUN=as.integer) + rgb.out = lapply(X=rgb.out,FUN=pmax, 0) + rgb.out = lapply(X=rgb.out,FUN=pmin,255) + rgb.out = rgb(r=rgb.out$red,g=rgb.out$green,b=rgb.out$blue,maxColorValue=255) + return(rgb.out) +}#end function clife +#------------------------------------------------------------------------------------------# + + + + +#------------------------------------------------------------------------------------------# +# Function that creates a nice colour scheme. # +#------------------------------------------------------------------------------------------# +iclife <<- function(n){ + rgb.out = rev(clife(n=n)) + return(rgb.out) +}#end function iclife +#------------------------------------------------------------------------------------------# diff --git a/R-utils/cloudy.r b/R-utils/cloudy.r new file mode 100644 index 000000000..3519ae18e --- /dev/null +++ b/R-utils/cloudy.r @@ -0,0 +1,46 @@ +#------------------------------------------------------------------------------------------# +# Function that creates a nice colour scheme. # +#------------------------------------------------------------------------------------------# +cloudy = function(n){ + rrr = c( 0, 69, 148, 213, 172, 115, 66) #---- Red pivots. -------------------------# + ggg = c( 144, 166, 192, 213, 172, 115, 66) #---- Green pivots. -----------------------# + bbb = c( 254, 241, 226, 213, 172, 115, 66) #---- Blue pivots. ------------------------# + pivot = round(seq(from=1,to=n,by=(n-1)/(length(rrr)-1)),digits=0) + + red = as.integer(spline(x=pivot,y=rrr,n=n)$y) + green = as.integer(spline(x=pivot,y=ggg,n=n)$y) + blue = as.integer(spline(x=pivot,y=bbb,n=n)$y) + + red [red > 255] = 255; red [red < 0] = 0 + green[green > 255] = 255; green[green < 0] = 0 + blue [blue > 255] = 255; blue [blue < 0] = 0 + mycolsch = rgb(r=red,g=green,b=blue,maxColorValue=255) + return(mycolsch) +} +#------------------------------------------------------------------------------------------# + + + + + + +#------------------------------------------------------------------------------------------# +# Function that creates a nice colour scheme. # +#------------------------------------------------------------------------------------------# +icloudy = function(n){ + rrr = c( 66, 115, 172, 213, 148, 69, 0) #---- Red pivots. -------------------------# + ggg = c( 66, 115, 172, 213, 192, 166, 144) #---- Green pivots. -----------------------# + bbb = c( 66, 115, 172, 213, 226, 241, 254) #---- Blue pivots. ------------------------# + pivot = round(seq(from=1,to=n,by=(n-1)/(length(rrr)-1)),digits=0) + + red = as.integer(spline(x=pivot,y=rrr,n=n)$y) + green = as.integer(spline(x=pivot,y=ggg,n=n)$y) + blue = as.integer(spline(x=pivot,y=bbb,n=n)$y) + + red [red > 255] = 255; red [red < 0] = 0 + green[green > 255] = 255; green[green < 0] = 0 + blue [blue > 255] = 255; blue [blue < 0] = 0 + mycolsch = rgb(r=red,g=green,b=blue,maxColorValue=255) + return(mycolsch) +} +#------------------------------------------------------------------------------------------# diff --git a/R-utils/collatz.r b/R-utils/collatz.r new file mode 100644 index 000000000..cb1b75d9d --- /dev/null +++ b/R-utils/collatz.r @@ -0,0 +1,18 @@ +#==========================================================================================# +#==========================================================================================# +# This is the generic function used for a handful of parameters in Collatz et al. # +# (1991), written as a function of a reference temperature, given by tcollatz. The output # +# variable will have the same unit as the pre-factor coefficient. # +#------------------------------------------------------------------------------------------# +collatz = function(temp,prefactor,base){ + #---------------------------------------------------------------------------------------# + # If the exponential factor is tiny, make it zero, otherwise compute the actual # + # function. # + #---------------------------------------------------------------------------------------# + coll = prefactor * base ^ (fcollatz * (temp - tcollatz)) + #---------------------------------------------------------------------------------------# + + return(coll) +}#end function collatz +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/colourmap.r b/R-utils/colourmap.r new file mode 100644 index 000000000..f239c466c --- /dev/null +++ b/R-utils/colourmap.r @@ -0,0 +1,260 @@ +#==========================================================================================# +#==========================================================================================# +# Function colourmap # +# # +# Given the x and y coordinates, this function will plot the z values with a colour # +# scheme but no interpolation... # +#------------------------------------------------------------------------------------------# +colourmap = function( x + , y + , z + , xlim = range(x,finite=TRUE) + , ylim = range(y,finite=TRUE) + , zlim = range(z,finite=TRUE) + , levels = if (key.log){ + pretty.log(x=zlim,n=nlevels) + }else{ + pretty(x=zlim,n=nlevels) + }#end if + , nlevels = 20 + , colour.palette = cm.colors + , col = colour.palette(length(levels)-1) + , na.col = "grey94" + , plot.title + , plot.axes + , key.title + , key.axes + , key.log = FALSE + , axes = TRUE + , frame.plot = axes + , pch = 15 + , cex = 1.0 + , ... + ){ + + #---------------------------------------------------------------------------------------# + # All three coordinates must be given. # + #---------------------------------------------------------------------------------------# + if (missing(x) || missing(y) || missing(z)){ + print(paste(" X is missing: ",missing(x))) + print(paste(" Y is missing: ",missing(y))) + print(paste(" Z is missing: ",missing(z))) + stop ("At least one of the data points is missing...") + }#end if + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Check whether x, y, and z are the same type of data. # + #---------------------------------------------------------------------------------------# + same.kind = (is.list(x) == is.list(y) && is.list(x) == is.list(y)) + if (! same.kind){ + print(paste(" X is list: ",is.list(x))) + print(paste(" Y is list: ",is.list(y))) + print(paste(" Z is list: ",is.list(z))) + stop ("X, Y, and Z must be of the same kind...") + }else if (!is.list(x)){ + #----- Convert x, y, and z to lists. ------------------------------------------------# + x = list(x) + y = list(y) + z = list(z) + pch = list(pch) + cex = list(cex) + npanels = 1 + }else{ + npanels = length(x) + if (! is.list(pch)){ + orig.pch = pch + pch = list() + for (p in 1:npanels) pch[[p]] = orig.pch + }#end if + if (! is.list(cex)){ + orig.cex = cex + cex = list() + for (p in 1:npanels) cex[[p]] = orig.cex + }#end if + }#end if + #---------------------------------------------------------------------------------------# + + + #----- Save the margins to avoid losing the data. --------------------------------------# + mar.orig = (par.orig = par(c("mar", "las", "mfrow")))$mar + on.exit(par(par.orig)) + #---------------------------------------------------------------------------------------# + + + + #----- Split the screen into 3, the two panels and the scale. --------------------------# + if (npanels == 1){ + w = (3 + mar.orig[2]) * par("csi") * 2.54 + layout(matrix(c(2, 1), nc = 2), widths = c(1, lcm(w))) + mar = mar.orig + mar[4] = mar[2] + mar[2] = 1 + key.vertical = TRUE + }else{ + h = (1 + mar.orig[3]) * par("csi") * 2.54 + layout( mat =rbind(seq(from=2,to=npanels+1),rep(1,times=npanels)) + , heights = c(1, lcm(h)) + )#end layout + mar = mar.orig + mar[1] = 2.6 + mar[3] = 2.1 + key.vertical = FALSE + }#end if + #---------------------------------------------------------------------------------------# + #=======================================================================================# + #=======================================================================================# + + + + + + #=======================================================================================# + #=======================================================================================# + # First plot: the key scale. # + #---------------------------------------------------------------------------------------# + par(mar = mar) + plot.new() + #------------------------------------------------------------------------------------# + # Plot in the horizontal or vertical depending on where the scale is going to # + # be plotted. # + #------------------------------------------------------------------------------------# + if (key.vertical){ + #----- Decide whether the scale is logarithmic or not. ---------------------------# + if (key.log){ + plot.window(xlim=c(0,1),ylim=range(levels),xaxs="i",yaxs="i",log="y") + }else{ + plot.window(xlim=c(0,1),ylim=range(levels),xaxs="i",yaxs="i") + }#end if + #---------------------------------------------------------------------------------# + + #----- Draw the colour bar. ------------------------------------------------------# + rect(xleft=0,ybottom=levels[-length(levels)],xright=1,ytop=levels[-1],col=col + ,border=col) + #---------------------------------------------------------------------------------# + + #----- Check whether there are specific instructions for plotting the key axis. --# + if (missing(key.axes)) { + if (axes) axis(side=4,las=1,...) + }else{ + key.axes + }#end if + #---------------------------------------------------------------------------------# + }else{ + #----- Decide whether the scale is logarithmic or not. ---------------------------# + if (key.log){ + plot.window(xlim=range(levels),ylim=c(0,1),xaxs="i",yaxs="i",las=1,log="y") + }else{ + plot.window(xlim=range(levels),ylim=c(0,1),xaxs="i",yaxs="i",las=1) + }#end if + #---------------------------------------------------------------------------------# + + + #----- Draw the colour bar. ------------------------------------------------------# + rect(xleft=levels[-length(levels)],ybottom=0,xright=levels[-1],ytop=1 + ,col=col,border=col) + #---------------------------------------------------------------------------------# + + + #----- Check whether there are specific instructions for plotting the key axis. --# + if (missing(key.axes)) { + if (axes) axis(side=1,...) + }else{ + key.axes + }#end if + #---------------------------------------------------------------------------------# + }#end if + #------------------------------------------------------------------------------------# + + + #----- Draw box. --------------------------------------------------------------------# + box() + #------------------------------------------------------------------------------------# + + + #----- Plot the title. --------------------------------------------------------------# + if (!missing(key.title)) key.title + #------------------------------------------------------------------------------------# + #=======================================================================================# + #=======================================================================================# + + + + + + #=======================================================================================# + #=======================================================================================# + # Now we plot the other panels. # + #---------------------------------------------------------------------------------------# + for (p in 1:npanels){ + #----- Set the window. --------------------------------------------------------------# + mar = mar.orig + if (! key.vertical) mar[1] = 4.1 + par(mar = mar) + plot.new() + plot.window(xlim=xlim,ylim=ylim,...) + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Split zleft into the breaks defined by the colour palette. # + #------------------------------------------------------------------------------------# + zcut = cut(z[[p]],breaks=levels) + zlev = levels(zcut) + zcol = col[match(zcut,zlev)] + zcol[is.na(zcol)] = na.col + #------------------------------------------------------------------------------------# + + + + #----- Call the function that actually plots the data. ------------------------------# + points(x=x[[p]],y=y[[p]],pch=pch[[p]],cex=cex[[p]],col=zcol,...) + #------------------------------------------------------------------------------------# + + + + #----- Check whether there are especial instructions for plotting the axes. ---------# + if (missing(plot.axes)) { + if (axes) { + axis(1) + axis(2) + } + }else{ + if (is.list(plot.axes)){ + if (! is.null(plot.axes[[p]]$x.axis)) do.call("axis",plot.axes[[p]]$x.axis) + if (! is.null(plot.axes[[p]]$y.axis)) do.call("axis",plot.axes[[p]]$y.axis) + other = which( ! names(plot.axes[[p]]) %in% c("x.axis","y.axis")) + if (length(other) > 0){ + for (o in other){ + do.call(names(plot.axes[[p]])[o],plot.axes[[p]][[o]]) + }#end for + }#end if + }else{ + plot.axes + }#end if + }#end if + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Plot the frame and the tiles. # + #------------------------------------------------------------------------------------# + if (frame.plot) box() + #----- Check whether there are especial instructions for plotting the title. --------# + if (missing(plot.title)){ + if (axes) title(main = "", xlab = "", ylab = "",...) + }else if (is.list(plot.title)){ + do.call("title",plot.title[[p]]) + }else{ + plot.title + }#end if + #------------------------------------------------------------------------------------# + }#end for + #=======================================================================================# + #=======================================================================================# + + invisible() +}#end function colourmap +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/colsuccess.r b/R-utils/colsuccess.r new file mode 100644 index 000000000..dcd89da5e --- /dev/null +++ b/R-utils/colsuccess.r @@ -0,0 +1,46 @@ +#------------------------------------------------------------------------------------------# +# Function that creates a nice colour scheme. # +#------------------------------------------------------------------------------------------# +colsuccess = function(n){ + rrr = c( 212, 177, 141, 106, 70, 35, 0) #---- Red pivots. -------------------------# + ggg = c( 255, 221, 186, 152, 117, 83, 48) #---- Green pivots. -----------------------# + bbb = c( 0, 32, 64, 48, 32, 16, 0) #---- Blue pivots. ------------------------# + pivot = round(seq(from=1,to=n,by=(n-1)/(length(rrr)-1)),digits=0) + + red = as.integer(spline(x=pivot,y=rrr,n=n)$y) + green = as.integer(spline(x=pivot,y=ggg,n=n)$y) + blue = as.integer(spline(x=pivot,y=bbb,n=n)$y) + + red [red > 255] = 255; red [red < 0] = 0 + green[green > 255] = 255; green[green < 0] = 0 + blue [blue > 255] = 255; blue [blue < 0] = 0 + mycolsch = rgb(r=red,g=green,b=blue,maxColorValue=255) + return(mycolsch) +} +#------------------------------------------------------------------------------------------# + + + + + + +#------------------------------------------------------------------------------------------# +# Function that creates a nice colour scheme. # +#------------------------------------------------------------------------------------------# +icolsuccess = function(n){ + rrr = c( 0, 35, 70, 106, 141, 177, 212) #---- Red pivots. -------------------------# + ggg = c( 48, 83, 117, 152, 186, 221, 255) #---- Green pivots. -----------------------# + bbb = c( 0, 16, 32, 48, 64, 32, 0) #---- Blue pivots. ------------------------# + pivot = round(seq(from=1,to=n,by=(n-1)/(length(rrr)-1)),digits=0) + + red = as.integer(spline(x=pivot,y=rrr,n=n)$y) + green = as.integer(spline(x=pivot,y=ggg,n=n)$y) + blue = as.integer(spline(x=pivot,y=bbb,n=n)$y) + + red [red > 255] = 255; red [red < 0] = 0 + green[green > 255] = 255; green[green < 0] = 0 + blue [blue > 255] = 255; blue [blue < 0] = 0 + mycolsch = rgb(r=red,g=green,b=blue,maxColorValue=255) + return(mycolsch) +} +#------------------------------------------------------------------------------------------# diff --git a/R-utils/commonest.r b/R-utils/commonest.r new file mode 100644 index 000000000..2b3f9b1ad --- /dev/null +++ b/R-utils/commonest.r @@ -0,0 +1,11 @@ +#==========================================================================================# +#==========================================================================================# +# This function finds the commonest value for a given vector. # +#------------------------------------------------------------------------------------------# +commonest = function(x,na.rm=FALSE) { + if (na.rm) x = x[! is.na(x)] + + unique.x = unique(x) + often = unique.x[which.max(tabulate(match(x, unique.x)))] +}#end function +#------------------------------------------------------------------------------------------# diff --git a/R-utils/cut2d.r b/R-utils/cut2d.r new file mode 100644 index 000000000..939d61927 --- /dev/null +++ b/R-utils/cut2d.r @@ -0,0 +1,73 @@ +#------------------------------------------------------------------------------------------# +# Create factors for a two-dimension surface. This works exactly the same way as the # +# cut function, except that the levels consider 2 variables. # +#------------------------------------------------------------------------------------------# +cut2d = function(x,y=NULL,xbreaks=10,ybreaks=10){ + + #---------------------------------------------------------------------------------------# + # First thing, we check whether the input variables make sense. # + #---------------------------------------------------------------------------------------# + if (is.null(y)){ + #----- Point. -----------------------------------------------------------------------# + if (is.data.frame(x)){ + if (("x" %in% names(x) & "y" %in% names(x))){ + xy = data.frame(x=x$x,y=x$y) + }else if(dim(x)[2] == 2){ + xy = data.frame(x=x[,1],y=x[,2]) + }else{ + dum=bad.input.syntax("x") + } + }else if (is.matrix(x)){ + numcol = dim(x)[2] + if (numcol != 2) dum=bad.input.syntax("x") + xy = data.frame(x=x[,1],y=x[,2]) + }else if (is.vector(x)){ + numcol = length(x) + if (numcol != 2) dum=bad.input.syntax("x") + + #----- Make point a matrix. ------------------------------------------------------# + xy = data.frame(x=x[1],y=x[2]) + }else{ + dum = bad.input.syntax("x") + }#end if + }else{ + xy=as.data.frame(cbind(x,y)) + }#end if + + #---------------------------------------------------------------------------------------# + # Split both X and Y. # + #---------------------------------------------------------------------------------------# + #----- X. ------------------------------------------------------------------------------# + xcut = cut(xy$x,breaks=xbreaks) + xlevs = levels(xcut) + nxlev = length(xlevs) + #----- Y. ------------------------------------------------------------------------------# + ycut = cut(xy$y,breaks=ybreaks) + ylevs = levels(ycut) + nylev = length(ylevs) + #----- Combine X and Y. ----------------------------------------------------------------# + xycut = paste(xcut,ycut,sep=",") + xylevs = paste(rep(xlevs,times=nylev),rep(ylevs,each=nxlev),sep=",") + + #----- Convert xylevs back to levels. --------------------------------------------------# + xycut = factor(x=xycut,levels=xylevs) + return(xycut) +}#end function cut2d +#------------------------------------------------------------------------------------------# + + + + + + +#------------------------------------------------------------------------------------------# +# This function is called to tell that cut2d had an invalid argument for point... # +#------------------------------------------------------------------------------------------# +bad.input.syntax = function(varname){ + print(paste("In function in.poly:",varname,"is not a valid variable.",sep=" ")) + print("It must be:") + print(" a. A two-element vector (longitude and latitude)") + print(" b. A two-column matrix or data frame (1st. column lon and 2nd. column lat") + stop (paste("Incorrect variable type for ",varname,"...",sep="")) +}#end function +#------------------------------------------------------------------------------------------# diff --git a/R-utils/cut3d.r b/R-utils/cut3d.r new file mode 100644 index 000000000..b8300a87c --- /dev/null +++ b/R-utils/cut3d.r @@ -0,0 +1,78 @@ +#------------------------------------------------------------------------------------------# +# Create factors for a three-dimension volime. This works exactly the same way as the # +# cut function, except that the levels consider 3 variables. # +#------------------------------------------------------------------------------------------# +cut3d = function(x,y=NULL,z=NULL,xbreaks=10,ybreaks=10,zbreaks=10,...){ + + #---------------------------------------------------------------------------------------# + # First thing, we check whether the input variables make sense. # + #---------------------------------------------------------------------------------------# + if (is.null(y) && is.null(z)){ + #----- Point. -----------------------------------------------------------------------# + if (is.data.frame(x)){ + if ("x" %in% names(x) & "y" %in% names(x) & "z" %in% names(x) ){ + xyz = data.frame(x=x$x,y=x$y,z=x$z) + }else if(dim(x)[2] == 3){ + xyz = data.frame(x=x[,1],y=x[,2],z=x[,3]) + }else{ + dum=bad.configuration("x") + } + }else if (is.matrix(x)){ + numcol = dim(x)[2] + if (numcol != 3) dum=bad.configuration("x") + xyz = data.frame(x=x[,1],y=x[,2],z=x[,3]) + }else if (is.vector(x)){ + numcol = length(x) + if (numcol != 3) dum=bad.configuration("x") + + #----- Make point a matrix. ------------------------------------------------------# + xyz = data.frame(x=x[1],y=x[2],z=x[3]) + }else{ + dum = bad.configuration("x") + }#end if + }else{ + xyz=as.data.frame(cbind(x,y,z)) + }#end if + + #---------------------------------------------------------------------------------------# + # Split X, Y, and Z. # + #---------------------------------------------------------------------------------------# + #----- X. ------------------------------------------------------------------------------# + xcut = cut(xyz$x,breaks=xbreaks,...) + xlevs = levels(xcut) + nxlev = length(xlevs) + #----- Y. ------------------------------------------------------------------------------# + ycut = cut(xyz$y,breaks=ybreaks,...) + ylevs = levels(ycut) + nylev = length(ylevs) + #----- Z. ------------------------------------------------------------------------------# + zcut = cut(xyz$z,breaks=zbreaks,...) + zlevs = levels(zcut) + nzlev = length(zlevs) + #----- Combine X and Y. ----------------------------------------------------------------# + xyzcut = paste(xcut,ycut,zcut,sep=",") + xyzlevs = paste(rep(xlevs,times=nylev*nzlev),rep(ylevs,each=nxlev,times=nzlev), + rep(zlevs,each =nxlev*nylev),sep=",") + + #----- Convert xylevs back to levels. --------------------------------------------------# + xyzcut = factor(x=xyzcut,levels=xyzlevs) + return(xyzcut) +}#end function cut3d +#------------------------------------------------------------------------------------------# + + + + + + +#------------------------------------------------------------------------------------------# +# This function is called to tell that cut2d had an invalid argument for point... # +#------------------------------------------------------------------------------------------# +bad.configuration = function(varname){ + print(paste("In function in.poly:",varname,"is not a valid variable.",sep=" ")) + print("It must be:") + print(" a. A two-element vector (longitude and latitude)") + print(" b. A two-column matrix or data frame (1st. column lon and 2nd. column lat") + stop (paste("Incorrect variable type for ",varname,"...",sep="")) +}#end function bad.configuration +#------------------------------------------------------------------------------------------# diff --git a/R-utils/del.bad.rshort.r b/R-utils/del.bad.rshort.r new file mode 100644 index 000000000..e85a3248e --- /dev/null +++ b/R-utils/del.bad.rshort.r @@ -0,0 +1,129 @@ +#==========================================================================================# +#==========================================================================================# +# This function deletes some bad radiation data. The input must be a data.frame or # +# list with all the radiation components already with standard name. The output will be # +# the same structure, but with a nicer and cleaner radiation. # +#------------------------------------------------------------------------------------------# +del.bad.rshort <<- function(dat,rshort.day.min=0.,par.frac.min=0.80,alb.max=0.30){ + #----- Remove suspicious incoming shortwave radiation. ---------------------------------# + cat(" - Remove negative daytime shortwave radiation...","\n") + suspect = as.integer(dat$daytime & dat$rshort.in < rshort.day.min) + testdays = dates(sort(unique(dat$today))) + weird = testdays[tapply(X=suspect,INDEX=dat$today,FUN=sum,na.rm=TRUE) > 0] + del = dat$today %in% weird + dat$rshort.in [del] = NA + #---------------------------------------------------------------------------------------# + + + + #----- Remove suspicious outgoing shortwave radiation. ---------------------------------# + cat(" - Remove suspicious outgoing shortwave radiation...","\n") + suspect = as.integer(dat$daytime & dat$rshort.out < rshort.day.min) + testdays = dates(sort(unique(dat$today))) + weird = testdays[tapply(X=suspect,INDEX=dat$today,FUN=sum,na.rm=TRUE) > 0] + del = dat$today %in% weird + dat$rshort.out[del] = NA + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Remove nocturnal data so we can check the diurnal cycle statistics. # + #---------------------------------------------------------------------------------------# + dat$rshort.in [dat$nighttime] = NA + dat$rshort.out[dat$nighttime] = NA + dat$par.in [dat$nighttime] = NA + dat$par.out [dat$nighttime] = NA + #---------------------------------------------------------------------------------------# + + + + #----- Find the mean diurnal cycle and the mean variability of the diel. ---------------# + cat(" - Find probability of each measurement...","\n") + for (this in c("rshort.in","rshort.out","par.in","par.out")){ + cat(" > ",this,"...","\n") + hhmm = paste(sprintf("%2.2i",dat$hour),sprintf("%2.2i",dat$minu)) + #----- Find the mean diurnal cycle. -------------------------------------------------# + location.this = tapply(X=dat[[this]] ,INDEX=hhmm,FUN=sn.location ,na.rm=TRUE) + scale.this = tapply(X=dat[[this]] ,INDEX=hhmm,FUN=sn.scale ,na.rm=TRUE) + shape.this = tapply(X=dat[[this]] ,INDEX=hhmm,FUN=sn.shape ,na.rm=TRUE) + #------------------------------------------------------------------------------------# + + + #----- Match the full time series with the average hour. ----------------------------# + unique.hhmm = names(location.this) + idx = match(hhmm,unique.hhmm) + #------------------------------------------------------------------------------------# + + + #----- Normalise the data. ----------------------------------------------------------# + norm.this = skew2normal( x = dat[[this]] + , location = location.this + , scale = scale.this + , shape = shape.this + , idx = idx + )#skew2normal + prob.this = dnorm(norm.this) + assign(paste("prob",this,sep="."),prob.this) + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # PAR should be always close to 45-55% of the total radiation. Here check whether # + # the fraction goes outside the range by a large amount (33.3-66.7%). For these times, # + # we discard the value with the least probability that we found using a skewed normal # + # distribution for the hour of the day. # + #---------------------------------------------------------------------------------------# + cat(" - Discard data that has weird PAR/SW ratio...","\n") + weird.in = ( dat$par.in < onethird * dat$rshort.in + | dat$par.in > twothirds * dat$rshort.in ) + weird.out = ( dat$par.out < onethird * dat$rshort.out + | dat$par.out > twothirds * dat$rshort.out ) + #----- Delete suspicious incoming shortwave radiation. ---------------------------------# + del = weird.in & prob.rshort.in < prob.par.in + del[is.na(del)] = FALSE + dat$rshort.in[del] = NA + #----- Delete suspicious incoming photosynthetically active radiation. -----------------# + del = weird.in & prob.par.in < prob.rshort.in + del[is.na(del)] = FALSE + dat$par.in[del] = NA + #----- Delete suspicious outgoing shortwave radiation. ---------------------------------# + del = weird.out & prob.rshort.out < prob.par.out + del[is.na(del)] = FALSE + dat$rshort.out[del] = NA + #----- Delete suspicious outgoing photosynthetically active radiation. -----------------# + del = weird.out & prob.par.out < prob.rshort.out + del[is.na(del)] = FALSE + dat$par.out[del] = NA + #---------------------------------------------------------------------------------------# + + + + #----- Nighttime radiation should be zero. ---------------------------------------------# + cat(" - Discard shortwave emitted by fireflies...","\n") + dat$rshort.in [dat$nighttime] = 0. + dat$rshort.out[dat$nighttime] = 0. + dat$par.in [dat$nighttime] = 0. + dat$par.out [dat$nighttime] = 0. + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # We don't let radiation exceed maximum. # + #---------------------------------------------------------------------------------------# + cat (" - Bounding radiation...","\n") + dat$rshort.in[dat$daytime] = pmin(dat$rshort.in[dat$daytime],dat$rshort.pot[dat$daytime]) + dat$par.in [dat$daytime] = pmin(dat$par.in [dat$daytime],dat$par.pot [dat$daytime]) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + return(dat) + #---------------------------------------------------------------------------------------# +}#end function +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/del.outliers.r b/R-utils/del.outliers.r new file mode 100644 index 000000000..05374e958 --- /dev/null +++ b/R-utils/del.outliers.r @@ -0,0 +1,191 @@ +#==========================================================================================# +#==========================================================================================# +# This function deletes outliers from a time series. It uses the time to find # +# statistics as a function of the time of the day. # +#------------------------------------------------------------------------------------------# +del.outliers <<- function(x,when,out.hour=TRUE,out.all=TRUE){ + + thisvar = x + nx = length(x) + + #---------------------------------------------------------------------------------------# + # Check whether there is any valid dataset in the input data. If not, there is # + # nothing to be done. # + #---------------------------------------------------------------------------------------# + if (! any(is.finite(thisvar))) return(thisvar) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Decide whether to discard outliers based on the hour of the day. # + #---------------------------------------------------------------------------------------# + if (out.hour){ + cat(" * Hourly data...","\n") + #------------------------------------------------------------------------------------# + # First check: we discard the instantaneous data that are considered weird (i.e. # + # normalised variable that is unacceptably far from 0 or a spike that is far from 0 # + # and surrounded by reasonable values. We keep iterating it until we have no more # + # points removed. # + #------------------------------------------------------------------------------------# + hh = hours (when) + mm = minutes(when) + hhmm = paste(sprintf("%2.2i",hh),sprintf("%2.2i",mm),sep="") + n = 0 + iterate = TRUE + while (iterate){ + n = n + 1 + + #---------------------------------------------------------------------------------# + # Find the normalised values that correspond to the extreme values (minimum # + # and maximum) that would be normal if it happenned only once and the variable # + # had a normal distribution. # + #---------------------------------------------------------------------------------# + valid = length(is.finite(thisvar)) + pfine = (valid - 2) / valid + max.fine = max(3.0,qnorm(pfine, mean = 0., sd = 1.0)) + #---------------------------------------------------------------------------------# + + + #----- Find the mean diurnal cycle and the mean variability of the diel. ---------# + location.dcycle = tapply(X=thisvar,INDEX=hhmm,FUN=sn.location ,na.rm=TRUE) + scale.dcycle = tapply(X=thisvar,INDEX=hhmm,FUN=sn.scale ,na.rm=TRUE) + shape.dcycle = tapply(X=thisvar,INDEX=hhmm,FUN=sn.shape ,na.rm=TRUE) + #---------------------------------------------------------------------------------# + + + + #----- Match the full time series with the average hour. -------------------------# + unique.hhmm = names(location.dcycle) + idx = match(hhmm,unique.hhmm) + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Find the normalised variable. # + #---------------------------------------------------------------------------------# + thisnorm = skew2normal( x = thisvar + , location = location.dcycle + , scale = scale.dcycle + , shape = shape.dcycle + , idx = idx + ) + thisnormprev = c(thisnorm[nx],thisnorm[seq(from=1,to=nx-1,by=1)]) + thisnormnext = c(thisnorm[seq(from=2,to=nx,by=1)],thisnorm[1]) + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Discard suspicious data. # + #---------------------------------------------------------------------------------# + unacceptable = abs(thisnorm) > max.fine + weird = unacceptable + weird[is.na(weird)] = FALSE + + thisvar[weird] = NA + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Decide whether we should continue filtering. # + #---------------------------------------------------------------------------------# + iterate = sum(weird) > 0 + cat(" > Iteration :",n,"# of weird hours:",sum(weird) + ,"; max.fine=",sprintf("%.2f",max.fine),"...","\n") + #---------------------------------------------------------------------------------# + + }#end while + #------------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Decide whether to discard outliers based on the full time series (to detect weird # + # measurements that weren't spikes). # + #---------------------------------------------------------------------------------------# + if (out.all){ + #------------------------------------------------------------------------------------# + # Second check: we discard the instantaneous data that are considered weird (i.e. # + # normalised variable that is unacceptably far from 0 or a spike that is far from 0 # + # and surrounded by reasonable values. We keep iterating it until we have no points # + # considered outliers. # + #------------------------------------------------------------------------------------# + cat(" * Daily data...","\n") + today = dates (when) + n = 0 + iterate = TRUE + while (iterate){ + n = n + 1 + + #---------------------------------------------------------------------------------# + # Find the normalised values that correspond to the extreme values # + # (minimum and maximum) that would be normal if it happenned only once and the # + # variable had a normal distribution. # + #---------------------------------------------------------------------------------# + valid = length(is.finite(thisvar)) + pfine = (valid - 2) / valid + max.fine = max(3.0,qnorm(pfine, mean = 0., sd = 1.0)) + #---------------------------------------------------------------------------------# + + + #----- Find the mean diurnal cycle and the mean variability of the diel. ---------# + location.all = sn.location (x=thisvar,na.rm=TRUE) + scale.all = sn.scale (x=thisvar,na.rm=TRUE) + shape.all = sn.shape (x=thisvar,na.rm=TRUE) + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Find the normalised variable. # + #---------------------------------------------------------------------------------# + thisnorm = skew2normal( x = thisvar + , location = location.all + , scale = scale.all + , shape = shape.all + ) + thisnormprev = c(thisnorm[nx],thisnorm[seq(from=1,to=nx-1,by=1)]) + thisnormnext = c(thisnorm[seq(from=2,to=nx,by=1)],thisnorm[1]) + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Discard suspicious data. # + #---------------------------------------------------------------------------------# + unacceptable = abs(thisnorm) > max.fine + weird = unacceptable + weird[is.na(weird)] = FALSE + + thisvar[weird] = NA + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Decide whether we should continue filtering. # + #---------------------------------------------------------------------------------# + iterate = sum(weird) > 0 + #---------------------------------------------------------------------------------# + + cat(" > Iteration :",n,"# of weird days:",sum(weird) + ,"; max.fine=",sprintf("%.2f",max.fine),"...","\n") + }#end while + #------------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Return the clean time series. # + #---------------------------------------------------------------------------------------# + return(thisvar) + #---------------------------------------------------------------------------------------# +}#end function +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/demography.rates.r b/R-utils/demography.rates.r new file mode 100644 index 000000000..1e4ea08e8 --- /dev/null +++ b/R-utils/demography.rates.r @@ -0,0 +1,418 @@ +#==========================================================================================# +#==========================================================================================# +# This function computes the recruitment rates of each group, the confidence # +# interval, and the community-wide rate along with the confidence interval using the # +# binomial distribution or bootstrap. Recruitment rates are given in the interest rate # +# format that accounts for varying time scales as in: # +# # +# Nakagawa, M.; Tanaka, K.; Nakashizuka, T.; Ohkubo, T.; Kato, T.; Maeda, T.; Sato, K.; # +# Miguchi, H.; Nagamasu, H.; Ogino, K.; Teo, S.; Hamid, A. A.; Seng, L. H., 2000: # +# Impact of severe drought associated with the 1997-1998 El Nino in a tropical forest # +# in Sarawak. J. Trop. Ecol., 16, 355-367. # +# # +#------------------------------------------------------------------------------------------# +recruitment.rate <<- function(property,count,p.use,p.established,taxon,dtime,R=1000){ + + + #---------------------------------------------------------------------------------------# + # Check whether the mandatory variables are given. # + #---------------------------------------------------------------------------------------# + if ( missing(p.use) || missing(p.established) || missing(count) || missing(taxon) + || missing(dtime) || missing(property) ){ + cat(" At least one required variable is missing: " ,"\n") + cat(" - Missing property: ",missing(property) ,"\n") + cat(" - Missing count: ",missing(count) ,"\n") + cat(" - Missing p.use: ",missing(p.use) ,"\n") + cat(" - Missing p.established: ",missing(p.established) ,"\n") + cat(" - Missing taxon: ",missing(taxon) ,"\n") + cat(" - Missing dtime: ",missing(dtime) ,"\n") + stop(" Required variables not provided...") + }#end if + #---------------------------------------------------------------------------------------# + + + + #---- Find the inverse of the time step (and check whether it is an scalar). -----------# + if (length(dtime) != 1){ + stop ("dtime must be a scalar...") + }else{ + dtimei = 1. / dtime + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the total rates for community and taxon. # + #---------------------------------------------------------------------------------------# + N.tx = tapply(X = count * p.use , INDEX = taxon, FUN = sum, na.rm = TRUE ) + E.tx = tapply(X = count * p.use * p.established, INDEX = taxon, FUN = sum, na.rm = TRUE ) + N.gb = sum (x = count * p.use , na.rm = TRUE ) + E.gb = sum (x = count * p.use * p.established , na.rm = TRUE ) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Convert N.tx and E.tx to lists, and find the median. In case none of the # + # trees were established or all of them were established, we add two trees with # + # median size and assume that one was recruited and the other was not, so bootstrap # + # can do something. # + #---------------------------------------------------------------------------------------# + property.tx = split (x = property , f = taxon) + p.use.tx = split (x = p.use , f = taxon) + p.established.tx = split (x = p.established, f = taxon) + median.tx = sapply(X = property.tx, FUN = median, na.rm = TRUE) + zero.append = N.tx == 0 + median.tx[zero.append] = 1. + dont.append = N.tx > 0 & ( N.tx != E.tx & E.tx != 0 ) + median.tx[dont.append] = NA + property.tx = lapply( X = mapply( FUN = c + , mapply(FUN=c,property.tx,median.tx) + , median.tx + )#end mapply + , FUN = na.omit + )#end lapply + p.established.tx = lapply( X = mapply( FUN = c + , mapply( FUN = c + , p.established.tx + , 1. + 0. * median.tx + )#end mapply + , 0. * median.tx + )#end mapply + , FUN = na.omit + )#end lapply + p.use.tx = lapply( X = mapply( FUN = c + , mapply( FUN = c + , p.use.tx + , 1. + 0. * median.tx + )#end mapply + , 1. + 0. * median.tx + )#end mapply + , FUN = na.omit + )#end lapply + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # Collapse the data into lists, and run bootstrap for each of the groups. # + #---------------------------------------------------------------------------------------# + datum.tx = lapply( X = mapply( FUN = list + , property = property.tx + , p.established = p.established.tx + , p.use = p.use.tx + , SIMPLIFY = FALSE + )#end mapply + , FUN = data.frame + )#end lapply + boot.tx = lapply(X= datum.tx,FUN=boot,statistic=boot.recruit,R=R,dtime=dtime) + expected.tx = unlist(sapply(X=boot.tx,FUN=c)["t0",]) + q025.tx = sapply(X= boot.tx ,FUN=boot.ci.lower,conf=0.95,type="perc") + q975.tx = sapply(X= boot.tx ,FUN=boot.ci.upper,conf=0.95,type="perc") + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the statistics for the global properties. In case of extreme # + # probability (no recruits or all trees are recruits), add two trees, one that # + # recruited and another that did not, both with the median value of the property. # + #---------------------------------------------------------------------------------------# + property.gb = property + p.established.gb = p.established + p.use.gb = p.use + if ( N.gb > 0 && ( N.gb == E.gb || E.gb == 0 ) ){ + median.gb = median(x = property, na.rm = TRUE) + property.gb = c(property.gb ,median.gb,median.gb) + p.established.gb = c(p.established.gb, 1., 0.) + p.use.gb = c(p.use.gb , 1., 1.) + }else if (N.gb == 0){ + property.gb = c(1.,1.) + established.gb = c(1.,0.) + p.use.gb = c(1.,1.) + }#end if + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # Collapse the census to a data frame and run bootstrap. # + #---------------------------------------------------------------------------------------# + datum.gb = data.frame ( property = property.gb + , p.established = p.established.gb + , p.use = p.use.gb + )#end data.frame + boot.gb = boot (data=datum.gb,statistic=boot.recruit,R=R,dtime=dtime) + expected.gb = boot.gb$t0 + q025.gb = boot.ci.lower(boot.out=boot.gb,conf=0.95,type="perc") + q975.gb = boot.ci.upper(boot.out=boot.gb,conf=0.95,type="perc") + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Make a list with the answers. # + #---------------------------------------------------------------------------------------# + ans = list( taxon = data.frame( expected = expected.tx, q025 = q025.tx, q975 = q975.tx ) + , comm = data.frame( expected = expected.gb, q025 = q025.gb, q975 = q975.gb ) + )#end list + #---------------------------------------------------------------------------------------# + return(ans) +}#end function recruitment.rate +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function computes the mortality rates of each group, the confidence interval, # +# and the community-wide rate along with the confidence interval using the binomial # +# distribution or bootstrap. The mortality rates are given in the interest rate format, # +# which accounts for varying time scales as in: # +# # +# Sheil, D.; May, R. M., 1996: Motality and recruitment rate evaluations in heterogeneous # +# tropical forests. J. Ecology, 84, 91-100. # +#------------------------------------------------------------------------------------------# +mortality.rate <<- function(property,count,p.use,p.survivor,taxon,dtime,binom=TRUE,R=1000){ + + + #---------------------------------------------------------------------------------------# + # Check whether the mandatory variables are given. # + #---------------------------------------------------------------------------------------# + if ( missing(p.use) || missing(p.survivor) || missing(count) || missing(taxon) + || missing(dtime) || missing(property) ){ + cat (" At least one required variable is missing: ","\n") + cat (" - Missing property: ",missing(property) ,"\n") + cat (" - Missing count: ",missing(count) ,"\n") + cat (" - Missing p.use: ",missing(p.use) ,"\n") + cat (" - Missing p.survivor: ",missing(p.survivor) ,"\n") + cat (" - Missing taxon: ",missing(taxon) ,"\n") + cat (" - Missing dtime: ",missing(dtime) ,"\n") + stop(" Required variables not provided...") + }#end if + #---------------------------------------------------------------------------------------# + + + + #---- Find the inverse of the time step (and check whether it is an scalar). -----------# + if (length(dtime) != 1){ + stop ("dtime must be a scalar...") + }else{ + dtimei = 1. / dtime + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the total rates for community and taxon. # + #---------------------------------------------------------------------------------------# + N.tx = tapply(X = count * p.use , INDEX = taxon, FUN = sum, na.rm = TRUE ) + S.tx = tapply(X = count * p.use * p.survivor, INDEX = taxon, FUN = sum, na.rm = TRUE ) + N.gb = sum (x = count * p.use , na.rm = TRUE ) + S.gb = sum (x = count * p.use * p.survivor , na.rm = TRUE ) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # For the mean mortality rates and 95% confidence interval, we must check whether # + # this distribution is at the edge (i.e., none of the trees died, or all trees died). # + # In case we are at the limit, we add two trees with median size, and assume that one # + # is still alive whereas the other died, so bootstrap can still be of some use. The # + # extreme cases are likely to happen when the sample size is very small, so this should # + # make the error bars large. # + #---------------------------------------------------------------------------------------# + property.tx = split (x = property , f = taxon) + p.survivor.tx = split (x = p.survivor, f = taxon) + p.use.tx = split (x = p.use , f = taxon) + median.tx = sapply(X = property.tx, FUN = median, na.rm = TRUE) + zero.append = N.tx == 0 + median.tx[zero.append] = 1. + dont.append = N.tx > 0 & ( N.tx != S.tx & S.tx != 0) + median.tx[dont.append] = NA + property.tx = lapply( X = mapply( FUN = c + , mapply( FUN = c + , property.tx + , median.tx + , SIMPLIFY = FALSE + )#end mapply + , median.tx + , SIMPLIFY = FALSE + )#end mapply + , FUN = na.omit + )#end lapply + p.survivor.tx = lapply( X = mapply( FUN = c + , mapply( FUN = c + , p.survivor.tx + , 1. + 0. * median.tx + , SIMPLIFY = FALSE + )#end mapply + , 0. * median.tx + , SIMPLIFY = FALSE + )#end mapply + , FUN = na.omit + )#end lapply + p.use.tx = lapply( X = mapply( FUN = c + , mapply( FUN = c + , p.use.tx + , 1. + 0. * median.tx + , SIMPLIFY = FALSE + )#end mapply + , 1. + 0. * median.tx + , SIMPLIFY = FALSE + )#end mapply + , FUN = na.omit + )#end lapply + #---------------------------------------------------------------------------------------# + + + + + + + + #---------------------------------------------------------------------------------------# + # Collapse the data into lists, and run bootstrap for each of the groups. # + #---------------------------------------------------------------------------------------# + datum.tx = lapply( X = mapply( FUN = list + , property = property.tx + , p.survivor = p.survivor.tx + , p.use = p.use.tx + , SIMPLIFY = FALSE + )#end mapply + , FUN = data.frame + )#end lapply + boot.tx = lapply(X= datum.tx,FUN=boot,statistic=boot.mortality,R=R,dtime=dtime) + expected.tx = unlist(sapply(X=boot.tx,FUN=c)["t0",]) + q025.tx = sapply(X= boot.tx ,FUN=boot.ci.lower,conf=0.95,type="perc") + q975.tx = sapply(X= boot.tx ,FUN=boot.ci.upper,conf=0.95,type="perc") + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the statistics for the global properties. In case of extreme probability # + # (no survivors or all trees survived), add two trees, one that survived and another # + # that did not, both with the median value of the property. # + #---------------------------------------------------------------------------------------# + property.gb = property + p.survivor.gb = p.survivor + p.use.gb = p.use + if ( N.gb > 0 && ( N.gb == S.gb || S.gb == 0 ) ){ + median.gb = median(x = property, na.rm = TRUE) + property.gb = c(property.gb ,median.gb,median.gb) + p.survivor.gb = c(p.survivor.gb, 1., 0.) + p.use.gb = c(p.use.gb , 1., 1.) + }else if (N.gb == 0){ + property.gb = c(1.,1.) + p.survivor.gb = c(1.,0.) + p.use.gb = c(1.,1.) + }#end if + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # Collapse the census to a data frame and run bootstrap. # + #---------------------------------------------------------------------------------------# + datum.gb = data.frame ( property = property.gb + , p.survivor = p.survivor.gb + , p.use = p.use.gb + )#end data.frame + boot.gb = boot (data=datum.gb,statistic=boot.mortality,R=R,dtime=dtime) + expected.gb = boot.gb$t0 + q025.gb = boot.ci.lower(boot.out=boot.gb,conf=0.95,type="perc") + q975.gb = boot.ci.upper(boot.out=boot.gb,conf=0.95,type="perc") + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Make a list with the answers. # + #---------------------------------------------------------------------------------------# + ans = list( taxon = data.frame( expected = expected.tx, q025 = q025.tx, q975 = q975.tx ) + , comm = data.frame( expected = expected.gb, q025 = q025.gb, q975 = q975.gb ) + )#end list + #---------------------------------------------------------------------------------------# + + return(ans) +}#end function mortality.rate +#==========================================================================================# +#==========================================================================================# + + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function computes the expected growth rates and the confidence interval, using # +# bootstrap so we do not need to assume any distribution. # +#------------------------------------------------------------------------------------------# +growth.rate = function(growth,count,taxon,R=1000){ + + #------ Split the data according to the class. -----------------------------------------# + growth.tx = split(x = growth, f = taxon) + count.tx = split(x = count , f = taxon) + #---------------------------------------------------------------------------------------# + + + + #------ Pair the growth and the weights of each taxon into data frames. ----------------# + datum.tx = lapply( X = mapply(FUN=list,growth=growth.tx,count=count.tx,SIMPLIFY=FALSE) + , FUN = data.frame + )#end lapply + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Find the statistics. # + #---------------------------------------------------------------------------------------# + boot.tx = lapply(X= datum.tx,FUN=boot,statistic=boot.growth,R=R) + expected.tx = unlist(sapply(X=boot.tx,FUN=c)["t0",]) + q025.tx = sapply(X= boot.tx ,FUN=boot.ci.lower,conf=0.95,type="perc") + q975.tx = sapply(X= boot.tx ,FUN=boot.ci.upper,conf=0.95,type="perc") + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Global data frame. # + #---------------------------------------------------------------------------------------# + datum.gb = data.frame( growth = growth, count = count ) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the global rates. # + #---------------------------------------------------------------------------------------# + boot.gb = boot(data=datum.gb,statistic=boot.growth,R=R) + expected.gb = boot.gb$t0 + q025.gb = boot.ci.lower(boot.out=boot.gb,conf=0.95,type="perc") + q975.gb = boot.ci.upper(boot.out=boot.gb,conf=0.95,type="perc") + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Make a list with the answers. # + #---------------------------------------------------------------------------------------# + ans = list( taxon = data.frame( expected = expected.tx, q025 = q025.tx, q975 = q975.tx ) + , comm = data.frame( expected = expected.gb, q025 = q025.gb, q975 = q975.gb ) + )#end list + #---------------------------------------------------------------------------------------# + + return(ans) +}#end function growth.rate +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/density.safe.r b/R-utils/density.safe.r new file mode 100644 index 000000000..8ef86ad60 --- /dev/null +++ b/R-utils/density.safe.r @@ -0,0 +1,23 @@ +#==========================================================================================# +#==========================================================================================# +# Function DENSITY.SAFE -- this is just a wrapper for "density" function. In case of # +# a single element, we assign NAs. We don't fix the values # +# of anything other than $y, this is just a quick and cheap # +# fix. # +#------------------------------------------------------------------------------------------# +density.safe <<- function(x,weights=NULL,...){ + nx = length(x) + + if (! is.null(weights)) weights = weights / sum(weights) + + if (nx == 1){ + x = rep(x,times=2) + if (! is.null(weights)) weights=rep(weights,times=2) + }#end if + + ans = density(x=x,weights=weights,...) + if (nx == 1) ans$y = ans$y + NA + return(ans) +}#end function +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/disturbance.r b/R-utils/disturbance.r new file mode 100644 index 000000000..c262a887a --- /dev/null +++ b/R-utils/disturbance.r @@ -0,0 +1,161 @@ +#==========================================================================================# +#==========================================================================================# +# This function finds the normalised area given the disturbance rates. # +#------------------------------------------------------------------------------------------# +find.lu.areas <<- function(dlist,minarea){ + + #----- Initialise table. ---------------------------------------------------------------# + lu.names = c("Pasture","Secondary","Primary","Cropland") + dist.area = matrix(NA,ncol=4,nrow=dlist$nyears+1 + ,dimnames=list(c(dlist$years,dlist$years[dlist$nyears]+dtyear) + ,lu.names)) + #---------------------------------------------------------------------------------------# + + + #----- First year, everything is primary vegetation. -----------------------------------# + dist.area[1,] = c(0,0,1,0) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Integrate area over years. # + #---------------------------------------------------------------------------------------# + for (y in 1:dlist$nyears){ + #----- dA contains the areas that went from type r to type c. -----------------------# + dA = matrix(0,nrow=4,ncol=4,dimnames=list(lu.names,lu.names)) + #------------------------------------------------------------------------------------# + + + #----- Go through all types. --------------------------------------------------------# + dA[4,1] = dist.area[y,4] * (1. - exp(-dlist$disturb[y, 1])) + dA[1,4] = dist.area[y,1] * (1. - exp(-dlist$disturb[y, 2])) + dA[1,3] = dist.area[y,1] * (1. - exp(-dlist$disturb[y, 3])) + dA[3,1] = dist.area[y,3] * (1. - exp(-dlist$disturb[y, 4])) + dA[3,4] = dist.area[y,3] * (1. - exp(-dlist$disturb[y, 5])) + dA[4,3] = dist.area[y,4] * (1. - exp(-dlist$disturb[y, 6])) + dA[2,4] = dist.area[y,2] * (1. - exp(-dlist$disturb[y, 7])) + dA[4,2] = dist.area[y,4] * (1. - exp(-dlist$disturb[y, 8])) + dA[2,1] = dist.area[y,2] * (1. - exp(-dlist$disturb[y, 9])) + dA[1,2] = dist.area[y,1] * (1. - exp(-dlist$disturb[y,10])) + dA[3,2] = dist.area[y,3] * (1. - exp(-dlist$disturb[y,11])) + #------------------------------------------------------------------------------------# + + + + #----- Update area. -----------------------------------------------------------------# + dist.area[y+1,1] = max(minarea,dist.area[y,1]-sum(dA[1,])+sum(dA[,1])) + dist.area[y+1,2] = max(minarea,dist.area[y,2]-sum(dA[2,])+sum(dA[,2])) + dist.area[y+1,3] = max(minarea,dist.area[y,3]-sum(dA[3,])+sum(dA[,3])) + dist.area[y+1,4] = max(minarea,dist.area[y,4]-sum(dA[4,])+sum(dA[,4])) + dist.area[y+1, ] = dist.area[y+1,] / sum(dist.area[y+1,]) + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# + + return(dist.area) +}#end function find.lu.areas +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function assess the error introduced by the lambda correction. # +#------------------------------------------------------------------------------------------# +lambda.err <<- function(x,past,futu,int.yeara,int.yearz,minarea,err.log=FALSE){ + + histo = past + + + #---- Select the years to apply the additional disturbance rate. -----------------------# + sel = histo$years >= int.yeara & histo$years <= int.yearz + #---------------------------------------------------------------------------------------# + + + #----- Select the year to test. --------------------------------------------------------# + yrtest = which(histo$years == int.yearz + 1) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Apply lambda to the years. # + #---------------------------------------------------------------------------------------# + histo$disturb[sel, 1] = histo$disturb[sel, 1] + inv.logit(x[ 1]) + histo$disturb[sel, 2] = histo$disturb[sel, 2] + inv.logit(x[ 2]) + histo$disturb[sel, 4] = histo$disturb[sel, 4] + inv.logit(x[ 4]) + histo$disturb[sel, 5] = histo$disturb[sel, 5] + inv.logit(x[ 5]) + histo$disturb[sel, 7] = histo$disturb[sel, 7] + inv.logit(x[ 7]) + histo$disturb[sel, 8] = histo$disturb[sel, 8] + inv.logit(x[ 8]) + histo$disturb[sel, 9] = histo$disturb[sel, 9] + inv.logit(x[ 9]) + histo$disturb[sel,10] = histo$disturb[sel,10] + inv.logit(x[10]) + histo$disturb[sel,11] = histo$disturb[sel,11] + inv.logit(x[11]) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Find the final area. # + #---------------------------------------------------------------------------------------# + lu.names = c("Pasture","Secondary","Primary","Cropland") + for (yr in int.yeara:int.yearz){ + y = which(histo$years == yr) + yp1 = y+1 + #----- dA contains the areas that went from type r to type c. -----------------------# + dA = matrix(0,nrow=4,ncol=4,dimnames=list(lu.names,lu.names)) + #------------------------------------------------------------------------------------# + + + #----- Go through all types. --------------------------------------------------------# + dA[4,1] = histo$norm.area[y,4] * (1. - exp(-histo$disturb[y, 1])) + dA[1,4] = histo$norm.area[y,1] * (1. - exp(-histo$disturb[y, 2])) + dA[1,3] = histo$norm.area[y,1] * (1. - exp(-histo$disturb[y, 3])) + dA[3,1] = histo$norm.area[y,3] * (1. - exp(-histo$disturb[y, 4])) + dA[3,4] = histo$norm.area[y,3] * (1. - exp(-histo$disturb[y, 5])) + dA[4,3] = histo$norm.area[y,4] * (1. - exp(-histo$disturb[y, 6])) + dA[2,4] = histo$norm.area[y,2] * (1. - exp(-histo$disturb[y, 7])) + dA[4,2] = histo$norm.area[y,4] * (1. - exp(-histo$disturb[y, 8])) + dA[2,1] = histo$norm.area[y,2] * (1. - exp(-histo$disturb[y, 9])) + dA[1,2] = histo$norm.area[y,1] * (1. - exp(-histo$disturb[y,10])) + dA[3,2] = histo$norm.area[y,3] * (1. - exp(-histo$disturb[y,11])) + #------------------------------------------------------------------------------------# + + + + #----- Update area. -----------------------------------------------------------------# + histo$norm.area[y+1,1] = max(minarea,histo$norm.area[y,1]-sum(dA[1,])+sum(dA[,1])) + histo$norm.area[y+1,2] = max(minarea,histo$norm.area[y,2]-sum(dA[2,])+sum(dA[,2])) + histo$norm.area[y+1,3] = max(minarea,histo$norm.area[y,3]-sum(dA[3,])+sum(dA[,3])) + histo$norm.area[y+1,4] = max(minarea,histo$norm.area[y,4]-sum(dA[4,])+sum(dA[,4])) + histo$norm.area[y+1, ] = histo$norm.area[y+1,] / sum(histo$norm.area[y+1,]) + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# + + #---------------------------------------------------------------------------------------# + # Determine the relative error. # + #---------------------------------------------------------------------------------------# + if (err.log){ + expected = log(futu$norm.area) + estimated = log(histo$norm.area[yrtest,]) + }else{ + expected = futu$norm.area + estimated = histo$norm.area[yrtest,] + }#end if + bias = (estimated-expected) + mse = bias^2 + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Return the root mean squared error. # + #---------------------------------------------------------------------------------------# + answer = sqrt(sum(mse)) + return(answer) + #---------------------------------------------------------------------------------------# + +}#end function lambda.err +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/dry.season.length.r b/R-utils/dry.season.length.r new file mode 100644 index 000000000..f0e9c91c2 --- /dev/null +++ b/R-utils/dry.season.length.r @@ -0,0 +1,184 @@ +#==========================================================================================# +#==========================================================================================# +# dry.season.length -- This function finds the length of the dry season, using a very # +# simple threshold on a previously smoothed time series. # +# # +# Input variables: # +# zmean.rain -- Filtered and gap-filled rainfall rate. Daily values, although the # +# units must be mm/month # +# today -- The dates. It can go for over a year, but only the first year # +# will be analysed. The first year must be complete # +# dry.thresh -- Minimum rainfall below which dry season starts. In mm/month # +# wet.thresh -- Minimum rainfall above which wet season starts. In mm/month # +# min.dsl -- Minimum dry season length to be considered an additional dry # +# season. In days. # +#------------------------------------------------------------------------------------------# +dry.season.length <<- function(zmean.rain,today,dry.thresh=90,wet.thresh=110,min.dsl=15){ + + #---------------------------------------------------------------------------------------# + # Find a suitable zero. # + #---------------------------------------------------------------------------------------# + yeara = min(numyears(today)) + zero = chron(paste(12,31,yeara-1,sep="/")) + doy = as.numeric(today-zero) + maxbeg = as.numeric(chron(paste(12,31,yeara,sep="/"))-zero) + first = numyears(today) == yeara + rain.first = zmean.rain + rain.first[! first] = NA + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # The dry season must start in the current year. Otherwise the year has no dry # + # season. Also, there must be at least one "wet" day, otherwise, the year has a # + # 12-month long dry season. # + #---------------------------------------------------------------------------------------# + wet = which(zmean.rain > wet.thresh) + dry = which(zmean.rain < dry.thresh) + memory = 0 + if (length(wet) > 0){ + if (any(dry <= wet[1]) && wet[1] <= maxbeg) memory = wet[1] - 1 + dry = dry[dry > wet[1]] + }#end if + sel.1st = dry <= maxbeg + if (length(wet) == 0 || wet[1] > maxbeg){ + #------------------------------------------------------------------------------------# + # Not a single day qualify as wet season. The entire year is dry season. # + #------------------------------------------------------------------------------------# + doy.beg = min(doy[first]) + doy.end = max(doy[first]) + #------------------------------------------------------------------------------------# + }else if (length(dry[sel.1st]) == 0){ + #------------------------------------------------------------------------------------# + # Not a single day qualify as dry season. Set the beginning of the dry season # + # as the driest day of the year, but make the length zero. # + #------------------------------------------------------------------------------------# + doy.beg = doy[which.min(rain.first)] + doy.end = doy[which.min(rain.first)] + }else if (all(dry[sel.1st] < min(wet[1])) ){ + #------------------------------------------------------------------------------------# + # There is a trailing dry season from previous year, but no dry season starts # + # in this year. # + #------------------------------------------------------------------------------------# + sel = doy < min(wet[1]) + rain.use = rain.first + rain.use[sel] = NA + doy.beg = doy[which.min(rain.use)] + doy.end = doy[which.min(rain.use)] + }else{ + #------------------------------------------------------------------------------------# + # There is a dry season that is not 12-month long that starts in the first # + # year. Now we check whether there is any trailing dry season from previous year. # + # If there is, then we remove the trailing dry season and start looking for days # + # past the wet season. In case more than one dry season occurs in the same year, we # + # pick all of them. # + #------------------------------------------------------------------------------------# + doy.beg = NULL + doy.end = NULL + tt = 0 + iterate = TRUE + while ((dry[1] <= maxbeg) && (length(dry) > 0)){ + tt = tt + 1 + ndry = length(dry) + + #----- Crop the trailing wet season. ---------------------------------------------# + wet = wet[wet > dry[1]] + #---------------------------------------------------------------------------------# + + + if (length(wet) == 0){ + #----- There isn't any wet season in site, make everything dry season. --------# + doy.beg.now = dry[1] + doy.end.now = max(dry) + #------------------------------------------------------------------------------# + }else{ + #----- Dry season is the period before the next wet season begins. ------------# + doy.beg.now = dry[1] + doy.end.now = wet[1]-1 + #------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Append the dry season to the list of dry seasons. # + #---------------------------------------------------------------------------------# + doy.beg = c(doy.beg,doy.beg.now) + doy.end = c(doy.end,doy.end.now) + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # Delete the dry season points that were already used. # + #---------------------------------------------------------------------------------# + dry = dry[dry > doy.end.now] + #---------------------------------------------------------------------------------# + }#end while + #------------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # If the last day of the dry season is the last day of all, then the next year is a # + # completely dry year. We trim the day so it doesn't go all the way to the other year, # + # because we don't want to double count. # + #---------------------------------------------------------------------------------------# + if (doy.end[length(doy.end)] == max(doy)) doy.end[length(doy.end)] = maxbeg + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the dry season length in days, and remove those that are too short. If all # + # of them are short, then we keep only one, the longest one. # + #---------------------------------------------------------------------------------------# + dsl = pmin(doy.end,maxbeg+1) - doy.beg + keep = which(dsl > min.dsl) + if (any(keep)){ + doy.beg = doy.beg[keep] + doy.end = doy.end[keep] + dsl = dsl [keep] + dry.beg = chron(zero + doy.beg) + dry.end = chron(zero + doy.end) + imx = which.max(dsl) + long.doy.beg = doy.beg[imx] + long.doy.end = doy.end[imx] + long.dsl = dsl [imx] + long.dry.beg = dry.beg[imx] + long.dry.end = dry.end[imx] + dsl.total = sum(dsl) + memory + }else{ + doy.beg = NA + doy.end = NA + dsl = 0 + dry.beg = NA + dry.end = NA + long.doy.beg = NA + long.doy.end = NA + long.dsl = 0 + long.dry.beg = NA + long.dry.end = NA + dsl.total = memory + }#end if + #---------------------------------------------------------------------------------------# + + + ans = list( doy.beg = doy.beg + , doy.end = doy.end + , dry.beg = dry.beg + , dry.end = dry.end + , dsl = dsl + , long.doy.beg = long.doy.beg + , long.doy.end = long.doy.end + , long.dry.beg = long.dry.beg + , long.dry.end = long.dry.end + , long.dsl = long.dsl + , dsl.total = dsl.total + )#end list + return(ans) +}#end function dry.season.length +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/dynamics.proofer.r b/R-utils/dynamics.proofer.r new file mode 100644 index 000000000..e5b7a5696 --- /dev/null +++ b/R-utils/dynamics.proofer.r @@ -0,0 +1,914 @@ +#==========================================================================================# +#==========================================================================================# +# Common constants to control the proofs. # +#------------------------------------------------------------------------------------------# +low.wrong <<- -1.0 # Growth rates below this threshold [cm/yr] are considered wrong +high.wrong <<- +5.0 # Growth rates above this threshold [cm/yr] are considered wrong +low.weird <<- 0.025 # Bottom threshold for non-suspicious quantiles +high.weird <<- 0.975 # Top threshold for non-suspicious quantiles +low.kink <<- 0.10 # Threshold for considering a suspicious kink (trough) +high.kink <<- 0.90 # Threshold for considering a suspicious kink (ridge) +lngrowth.min <<- 0.002 # Minimum growth rate (relative) +dbh.min.sub <<- 10. # Minimum dbh to be included in the subplot +dbh.min.trans <<- 35. # Minimum dbh to be included anywhere +dbh.min.toler <<- 0.5 # Tolerance for minimum DBH (so we are not too strict) +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function goes through the notes and spot death comments, and make sure the # +# death flag is consistent with the notes and with the DBH. This must be done in 4 steps: # +# 1. There are lots of false alarms (e.g. not dead, 1/2 dead, previously dead now alive, # +# etc.) that must be replaced by something else so we don't flag them as death. The # +# current list is good for census up to 2011; you may need to add more cases if you # +# are going to run for post 2011. # +# 2. Flag trees that have notes that suggest they died. We set the flags to 1 for the # +# first survey they are flagged. # +# 3. Look for trees that turned out not to be dead, or underwent fusion, junction, or # +# blending. Remove the death flags for these trees. # +# 4. Once the flags are consistent, move DBH for the death year and subsequent years to # +# the notes. # +# # +# We never flag missing trees as dead; death must be certified in order to be flagged. # +# The last time a recruited stop reporting data is saved as 'year.goodbye', and that can # +# be also used as death year if you want to assume permanently missing trees are also dead # +#------------------------------------------------------------------------------------------# +death.proofer <<- function(datum,year4,use.flags=FALSE,use.notes = TRUE){ + n.years = length(year4) + n.datum = nrow(datum) + + + #---------------------------------------------------------------------------------------# + # Initialise the death year. # + #---------------------------------------------------------------------------------------# + datum$year.death = rep(Inf,times=n.datum) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # If the user wants to use the flags, loop over them and check for dead trees. # + #---------------------------------------------------------------------------------------# + if (use.flags){ + for (y in 1:n.years){ + this.dead = paste("dead",year4[y],sep=".") + this.dbh = paste("dbh" ,year4[y],sep=".") + if (this.dead %in% names(datum)){ + sel = datum[[this.dead]] == 1 + datum$year.death[sel] = pmin(datum$year.death[sel],year4[y]) + }#end if + alive = is.finite(datum[[this.dbh]]) + datum$year.death[alive] = Inf + }#end for + }#end if + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # If the user wants to use notes, then we first look for misleading messages # + # throughout the years; and replace words so dead means dead and alive means alive. # + # Then we assign the death year. # + #---------------------------------------------------------------------------------------# + if (use.notes){ + for (y in 1:n.years){ + this.notes = paste("notes",year4[y],sep=".") + x = datum[[this.notes]] + + #----- Standardise life and death comments. --------------------------------------# + x = sub( pattern = "not dead" + , replacement = "alive" + , x = x ) + x = sub( pattern = "looks almost dead" + , replacement = "dying" + , x = x ) + x = sub( pattern = "almost dead" + , replacement = "dying" + , x = x ) + x = sub( pattern = "nearly dead" + , replacement = "dying" + , x = x ) + x = sub( pattern = "thought to be dead" + , replacement = "thought to have perished" + , x = x ) + x = sub( pattern = "thought as dead" + , replacement = "thought to have perished" + , x = x ) + x = sub( pattern = "half-dead" + , replacement = "dying" + , x = x ) + x = sub( pattern = "not all dead" + , replacement = "still alive" + , x = x ) + x = sub( pattern = "looks dead" + , replacement = "dying" + , x = x ) + x = sub( pattern = "1/2 dead" + , replacement = "dying" + , x = x ) + x = sub( pattern = "half dead" + , replacement = "dying" + , x = x ) + x = sub( pattern = "dead in 2003 but actually alive" + , replacement = "alive" + , x = x ) + x = sub( pattern = "not found -- assume dead" + , replacement = "missing" + , x = x ) + x = sub( pattern = "not -- assume dead" + , replacement = "missing" + , x = x ) + x = sub( pattern = "not found.assume dead" + , replacement = "missing" + , x = x ) + x = sub( pattern = "couldn.t find??? dead??" + , replacement = "missing" + , x = x ) + x = sub( pattern = "couldn.t find; probably dead; in a large tree fall." + , replacement = "missing; area has tree fall." + , x = x ) + x = sub( pattern = "partially dead" + , replacement = "dying" + , x = x ) + x = sub( pattern = "99% dead" + , replacement = "dying" + , x = x ) + x = sub( pattern = "dead; it.s alive now" + , replacement = "alive" + , x = x ) + x = sub( pattern = "dead; alive now" + , replacement = "alive" + , x = x ) + x = sub( pattern = "half of tree it.s dead" + , replacement = "dying" + , x = x ) + x = sub( pattern = "not found. assume dead" + , replacement = "missing" + , x = x ) + x = sub( pattern = "half of the tree is dead" + , replacement = "dying" + , x = x ) + x = sub( pattern = "dead; on the ground in a large tree fall; alive; broken" + , replacement = "on the ground in a large tree fall; alive; broken" + , x = x ) + x = sub( pattern = "dead; broken; alive" + , replacement = "broken; alive" + , x = x ) + x = sub( pattern = "deading" + , replacement = "dying" + , x = x ) + x = sub( pattern = "probably it is dead" + , replacement = "likely dead" + , x = x ) + x = sub( pattern = "one of the bifurcations is dead" + , replacement = "one of the bifurcations perished" + , x = x ) + x = sub( pattern = "not found; presumed dead" + , replacement = "missing" + , x = x ) + x = sub( pattern = "not found; probably dead" + , replacement = "missing" + , x = x ) + x = sub( pattern = "dead? or not measured?" + , replacement = "missing" + , x = x ) + x = sub( pattern = "alive. previously reported as dead" + , replacement = "alive" + , x = x ) + x = sub( pattern = "grew inside of other dead tree" + , replacement = "grew inside of tree that had perished" + , x = x ) + x = sub( pattern = "meia morto" + , replacement = "dying" + , x = x ) + x = sub( pattern = "nao foi encontrado... perdido ou morto?" + , replacement = "missing" + , x = x ) + x = sub( pattern = "nao morto" + , replacement = "alive" + , x = x ) + x = sub( pattern = "parece como um arvore caido e morto mais nao sei com certeza" + , replacement = "it may be a fallen and dead tree but I am not sure" + , x = x ) + x = sub( pattern = "decom 1 - morta?" + , replacement = "decomp 1 - dead?" + , x = x ) + x = sub( pattern = "nao foi encontrada; provavalmente caiu; tem caida grande aqui" + , replacement = "missing; likely fallen; there was a large treefall there" + , x = x ) + x = sub( pattern = "morta 2010" + , replacement = "dead in 2010" + , x = x ) + x = sub( pattern = "quase morta" + , replacement = "dying" + , x = x ) + x = sub( pattern = "morta? desaparecida" + , replacement = "missing" + , x = x ) + x = sub( pattern = "morta?" + , replacement = "dead?" + , x = x ) + x = sub( pattern = "living" + , replacement = "alive" + , x = x ) + x = sub( pattern = "vivo" + , replacement = "alive" + , x = x ) + x = sub( pattern = "viva" + , replacement = "alive" + , x = x ) + x = sub( pattern = "morto" + , replacement = "dead" + , x = x ) + x = sub( pattern = "morta" + , replacement = "dead" + , x = x ) + #---------------------------------------------------------------------------------# + + datum[[this.notes]] = x + }#end for + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Now we loop through all years and find out which year is the most appropriate # + # for death. Because of the possible misidentifications, we keep updating it every # + # year. # + #------------------------------------------------------------------------------------# + for (y in 1:n.years){ + this.notes = paste("notes",year4[y],sep=".") + x = datum[[this.notes]] + + #----- Look for trees that were alive but died this year. ------------------------# + dead = grep("dead",x) + prev.alive = which(datum$year.death > year4[y]) + new.dead = intersect(dead,prev.alive) + if (length(new.dead) > 0) datum$year.death[new.dead] = year4[y] + #---------------------------------------------------------------------------------# + + + + #----- Look for trees that were flagged as dead but are actually alive. ----------# + prev.dead = which(datum$year.death <= year4[y]) + alive = grep("alive",x) + new.alive = intersect(alive,prev.dead) + if (length(new.alive) > 0) datum$year.death[new.alive] = Inf + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Look for trees that were flagged as dead but have undergone fusion at this # + # year. # + #---------------------------------------------------------------------------------# + action = unique(c(grep("Fusion" ,datum$notes.qaqc) + ,grep("Junction",datum$notes.qaqc) + ,grep("Blend" ,datum$notes.qaqc))) + post.death = which(datum$year.last > year4[y] & datum$year.death <= year4[y]) + concatenated = intersect(action,post.death) + if (length(concatenated) > 0) datum$year.death[concatenated] = Inf + #---------------------------------------------------------------------------------# + }#end for + #------------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Now we loop over all trees, correct the death flags, and move the DBH of dead # + # trees to the notes. # + #---------------------------------------------------------------------------------------# + for (y in 2:n.years){ + #------------------------------------------------------------------------------------# + # Retrieve information from + #------------------------------------------------------------------------------------# + this.dbh = paste("dbh" ,year4[y],sep=".") + this.notes = paste("notes",year4[y],sep=".") + message = paste("dbh.",year4[y],"=",datum[[this.dbh]] + ,sep="") + message[is.na(datum[[this.dbh]])] = NA_character_ + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Find the trees we must modify stuff. # + #------------------------------------------------------------------------------------# + dead.new = which( datum$year.death == year4[y] ) + dead.old = which( datum$year.death < year4[y] ) + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Update the death flag and notes for trees that have recently died. # + #------------------------------------------------------------------------------------# + if (length(dead.new) > 0){ + datum[[this.notes]][dead.new] = concatenate.message(datum[[this.notes]][dead.new] + ,message [dead.new] + )#end concatenate.message + datum[[this.dbh ]][dead.new] = NA + }#end if + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Update the death flag and notes for trees that have died before but may still # + # have DBH data. # + #------------------------------------------------------------------------------------# + if (length(dead.old) > 0){ + datum[[this.notes]][dead.old] = concatenate.message(datum[[this.notes]][dead.old] + ,message [dead.old] + )#end concatenate.message + datum[[this.dbh ]][dead.old] = NA + }#end if + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # Update the first and last year information. # + #---------------------------------------------------------------------------------------# + datum$year.1st = rep(NA,times=n.datum) + datum$year.last = rep(NA,times=n.datum) + + for (y in 1:n.years){ + yr = year4[y] + dbh.now = datum[[paste("dbh",yr,sep=".")]] + sel.dbh = is.finite(dbh.now) + sel.1st = sel.dbh & is.na(datum$year.1st) + datum$year.1st [sel.1st] = yr + datum$year.last[sel.dbh] = yr + }#end for + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # Set up the "goodbye" year (first year in which plant DBH is never reported # + # again. # + #---------------------------------------------------------------------------------------# + datum$year.goodbye = rep(Inf,times=n.datum) + for (y in 1:n.years){ + yr = year4[y] + dbh.now = datum[[paste("dbh",yr,sep=".")]] + sel.dbh = is.finite(dbh.now) + sel.bye = datum$year.1st < yr & is.na(dbh.now) + datum$year.goodbye[sel.dbh] = Inf + if (any(sel.bye)){ + datum$year.goodbye[sel.bye] = pmin(datum$year.goodbye[sel.bye],yr) + }#end if + }#end for + #---------------------------------------------------------------------------------------# + return(datum) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function goes through the DBH data and spot data that are too strange to be # +# true. We create a growth matrix and compare with the growth distribution for that year, # +# and the growth history for that tree. If both are weird, we move the datum to the notes # +# and temporarily replace by the negative number (to make it easier for recruitment). # +#------------------------------------------------------------------------------------------# +growth.proofer <<- function(datum,month2,year4){ + + + #----- Define some auxiliary variables. ------------------------------------------------# + n.years = length(year4) + n.datum = nrow(datum) + when = year4 + (month2-0.5)/12 + #---------------------------------------------------------------------------------------# + + + + #----- Create a table with dbh, so it is easier to find growth rates. ------------------# + mat.names = list(datum$full.tag,year4) + dbh.table = matrix(NA ,ncol=n.years,nrow=n.datum,dimnames=mat.names) + growth.bef = matrix(NA ,ncol=n.years,nrow=n.datum,dimnames=mat.names) + growth.aft = matrix(NA ,ncol=n.years,nrow=n.datum,dimnames=mat.names) + lngrowth.bef = matrix(NA ,ncol=n.years,nrow=n.datum,dimnames=mat.names) + lngrowth.aft = matrix(NA ,ncol=n.years,nrow=n.datum,dimnames=mat.names) + dtime.bef = matrix(NA ,ncol=n.years,nrow=n.datum,dimnames=mat.names) + dtime.aft = matrix(NA ,ncol=n.years,nrow=n.datum,dimnames=mat.names) + quantile.bef = matrix(NA ,ncol=n.years,nrow=n.datum,dimnames=mat.names) + quantile.aft = matrix(NA ,ncol=n.years,nrow=n.datum,dimnames=mat.names) + remove.data = matrix(FALSE,ncol=n.years,nrow=n.datum,dimnames=mat.names) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Loop over years and fill in the DBH table. # + #---------------------------------------------------------------------------------------# + for (y in 1:n.years){ + this.dbh = paste("dbh" ,year4[y],sep=".") + this.missing = paste("missing",year4[y],sep=".") + this.notes = paste("notes" ,year4[y],sep=".") + dbh.table [,y] = datum[[this.dbh]] + if (this.missing %in% names(datum)){ + del = datum[[this.missing]] == 1 + dbh.table[del,y] = NA + message = paste("dbh.",year4[y],"=",datum[[this.dbh]] + ," was gap filled thus removed",sep="") + datum[[this.notes]][del] = concatenate.message(datum[[this.notes]][del] + ,message[del]) + datum[[this.dbh ]][del] = NA + }#end if + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the growth rates between surveys and previous one with valid data, and # + # organise them by quantiles. # + #---------------------------------------------------------------------------------------# + for (y in 2:n.years){ + dbh.bef = rep(NA,times=n.datum) + when.bef = rep(NA,times=n.datum) + for (b in seq(from=1,y-1,+1)){ + sel = is.finite(dbh.table[,b]) + dbh.bef [sel] = dbh.table [sel,b] + when.bef[sel] = when [b] + }#end for + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Define the growth rates between the previous measurement and the current. # + #------------------------------------------------------------------------------------# + dtime.bef [,y] = when[y]-when.bef + lngrowth.bef[,y] = log(dbh.table[,y]/dbh.bef)/dtime.bef[,y] + growth.bef [,y] = (dbh.table[,y]-dbh.bef)/dtime.bef[,y] + efun = ecdf(lngrowth.bef[,y]) + quantile.bef[,y] = efun(lngrowth.bef[,y]) + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the growth rates between surveys and following one with valid data, and # + # organise them by quantiles. # + #---------------------------------------------------------------------------------------# + for (y in 1:(n.years-1)){ + dbh.aft = rep(NA,times=n.datum) + when.aft = rep(NA,times=n.datum) + for (b in seq(from=n.years,y+1,-1)){ + sel = is.finite(dbh.table[,b]) + dbh.aft [sel] = dbh.table [sel,b] + when.aft[sel] = when [b] + }#end for + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Define the growth rates between the previous measurement and the current. # + #------------------------------------------------------------------------------------# + dtime.aft [,y] = when.aft-when[y] + lngrowth.aft[,y] = log(dbh.aft/dbh.table[,y])/dtime.aft[,y] + growth.aft [,y] = (dbh.aft-dbh.table[,y])/dtime.aft[,y] + efun = ecdf(lngrowth.aft[,y]) + quantile.aft[,y] = efun(lngrowth.aft[,y]) + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Find the "leapfrog" growth rates at any given year. # + #---------------------------------------------------------------------------------------# + lngrowth.leap = ( (lngrowth.bef/dtime.bef + lngrowth.aft/dtime.aft ) + * (dtime.bef + dtime.aft) ) + growth.leap = ( (growth.bef/dtime.bef + growth.aft/dtime.aft ) + * (dtime.bef + dtime.aft) ) + quantile.leap = NA * lngrowth.leap + for (y in 2:(n.years-1)){ + efun = ecdf(lngrowth.leap[,y]) + quantile.leap[,y] = efun(lngrowth.leap[,y]) + }#end for + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Look for data that is unnaceptable in absolute numbers. The threshold is some- # + # what arbitrary, but they can be easily adjusted. We first look at the middle ones, # + # then we search at the edges. # + #---------------------------------------------------------------------------------------# + for (y in seq(from=2,to=n.years,by=1)){ + + #------------------------------------------------------------------------------------# + # Detect data that "shrunk" too much. Then we decide which data point was bad, # + # the current dbh or the previous one. # + #------------------------------------------------------------------------------------# + shrink = ( ! remove.data[,max(1,y-1)] & ! remove.data[,min(n.years,y+1)] + & is.finite(quantile.bef [,y]) & quantile.bef [,y] < low.weird + & is.finite(growth.bef [,y]) & growth.bef [,y] < low.wrong ) + #----- Find out whether this is a kink. ---------------------------------------------# + kink = ( shrink + & is.finite(quantile.aft [,y]) & quantile.aft [,y] > high.kink ) + #----- Find out whether the previous one is a bad data. -----------------------------# + plateau = ( shrink & ! kink + & is.finite(quantile.leap[,y]) & quantile.leap[,y] < low.weird + & is.finite(growth.leap [,y]) & growth.leap [,y] < low.wrong ) + #------------------------------------------------------------------------------------# + + + #----- Flag data that is suspicious and should be removed. --------------------------# + remove.data [kink , y] = TRUE + remove.data [plateau,y-1] = TRUE + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Detect trees that grew too much. Then we decide which data point was bad, # + # the current dbh or the previous one. # + #------------------------------------------------------------------------------------# + boom = ( ! remove.data[,max(1,y-1)] & ! remove.data[,min(n.years,y+1)] + & is.finite(quantile.bef [,y]) & quantile.bef [,y] > high.weird + & is.finite(growth.bef [,y]) & growth.bef [,y] > high.wrong ) + #----- Find out whether this is a kink. ---------------------------------------------# + kink = ( boom + & is.finite(quantile.aft [,y]) & quantile.aft [,y] < low.kink ) + #----- Find out whether the previous one is a bad data. -----------------------------# + plateau = ( boom & ! kink + & is.finite(quantile.leap[,y]) & quantile.leap[,y] > high.weird + & is.finite(growth.leap [,y]) & growth.leap [,y] > high.wrong ) + #------------------------------------------------------------------------------------# + + + #----- Flag data that is suspicious and should be removed. --------------------------# + remove.data [kink , y] = TRUE + remove.data [plateau,y-1] = TRUE + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # Similar to the first loop, but we look at the after derivatives so we can flag # + # the last census in case it is strange. # + #---------------------------------------------------------------------------------------# + for (y in seq(from=n.years-1,to=1,by=-1)){ + + #------------------------------------------------------------------------------------# + # Detect data that "shrunk" too much. Then we decide which data point was bad, # + # the current dbh or the previous one. # + #------------------------------------------------------------------------------------# + shrink = ( ! remove.data[,max(1,y-1)] & ! remove.data[,min(n.years,y+1)] + & is.finite(quantile.aft [,y]) & quantile.aft [,y] < low.weird + & is.finite(growth.aft [,y]) & growth.aft [,y] < low.wrong ) + #----- Find out whether this is a kink. ---------------------------------------------# + kink = ( shrink + & is.finite(quantile.bef [,y]) & quantile.bef [,y] > high.kink ) + #----- Find out whether the previous one is a bad data. -----------------------------# + plateau = ( shrink & ! kink + & is.finite(quantile.leap[,y]) & quantile.leap[,y] < low.weird + & is.finite(growth.leap [,y]) & growth.leap [,y] < low.wrong ) + #------------------------------------------------------------------------------------# + + + #----- Flag data that is suspicious and should be removed. --------------------------# + remove.data [kink , y] = TRUE + remove.data [plateau,y+1] = TRUE + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Detect trees that grew too much. Then we decide which data point was bad, # + # the current dbh or the previous one. # + #------------------------------------------------------------------------------------# + boom = ( ! remove.data[,max(1,y-1)] & ! remove.data[,min(n.years,y+1)] + & is.finite(quantile.aft [,y]) & quantile.aft [,y] > high.weird + & is.finite(growth.aft [,y]) & growth.aft [,y] > high.wrong ) + #----- Find out whether this is a kink. ---------------------------------------------# + kink = ( boom + & is.finite(quantile.bef [,y]) & quantile.bef [,y] < low.kink ) + #----- Find out whether the previous one is a bad data. -----------------------------# + plateau = ( boom & ! kink + & is.finite(quantile.leap[,y]) & quantile.leap[,y] > high.weird + & is.finite(growth.leap [,y]) & growth.leap [,y] > high.wrong ) + #------------------------------------------------------------------------------------# + + + #----- Flag data that is suspicious and should be removed. --------------------------# + remove.data [kink , y] = TRUE + remove.data [plateau,y+1] = TRUE + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Loop over all years, discard the flagged data, and send the measurement to the # + # notes. # + #---------------------------------------------------------------------------------------# + for (y in 1:n.years){ + this.dbh = paste("dbh" ,year4[y],sep=".") + this.notes = paste("notes",year4[y],sep=".") + message = paste("dbh.",year4[y],"=",datum[[this.dbh]] + ," looks suspicious thus removed",sep="") + + sel = remove.data[,y] + datum[[this.notes]][sel] = concatenate.message(datum[[this.notes]][sel],message[sel]) + + #------------------------------------------------------------------------------------# + # Make the data to be removed temporarily negative, so they are finite but we # + # know that they are bad data that shall be purged. # + #------------------------------------------------------------------------------------# + datum[[this.dbh]][sel] = -datum[[this.dbh]][sel] + dbh.table[sel,y] = -dbh.table[sel,y] + }#end for + #---------------------------------------------------------------------------------------# + + return(datum) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function finds missing DBH data and fill them. DBH is filled in 3 cases: # +# 1. Spurious DBH had been discarded (wrong tree, bad point of measurements, tight vines, # +# measurement on buttress. # +# 2. Tumbleweed effect: tree had bad coordinates and was not found in some surveys, but # +# it was reported before and after # +# 3. Saint Exupery's baobah effect: recruit appeared out of nowhere with a DBH that is # +# too big to be a true recruit. We extrapolate the data. # +#------------------------------------------------------------------------------------------# +dbh.gap.filler <<- function(datum,month2,year4,abs.y.sub=5){ + + #----- Define some auxiliary variables. ------------------------------------------------# + n.years = length(year4) + n.datum = nrow(datum) + when = year4 + (month2-0.5)/12 + #---------------------------------------------------------------------------------------# + + + + #----- Create a table with dbh, so it is easier to find growth rates. ------------------# + mat.names = list(datum$full.tag,year4) + dbh.table = matrix(NA ,ncol=n.years,nrow=n.datum,dimnames=mat.names) + lngrowth = matrix(NA ,ncol=n.years,nrow=n.datum,dimnames=mat.names) + dtime = matrix(NA ,ncol=n.years,nrow=n.datum,dimnames=mat.names) + dbh.min = ( dbh.min.sub * (abs(datum$y) <= abs.y.sub) + + dbh.min.trans * (abs(datum$y) > abs.y.sub) ) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Loop over years and fill in the DBH table. # + #---------------------------------------------------------------------------------------# + y.1st = rep(NA,times=n.datum) + dbh.1st = rep(NA,times=n.datum) + for (y in 1:n.years){ + this.dbh = paste("dbh",year4[y],sep=".") + dbh.ok = is.finite(datum[[this.dbh]]) + + #------------------------------------------------------------------------------------# + # Some trees don't have coordinates, fill in the minimum DBH based on the first # + # instance. # + #------------------------------------------------------------------------------------# + fill.min = is.na(dbh.min) & dbh.ok & datum[[this.dbh]] > dbh.min.sub + dbh.min[fill.min] = dbh.min.sub + fill.min = is.na(dbh.min) & dbh.ok & datum[[this.dbh]] > dbh.min.trans + dbh.min[fill.min] = dbh.min.trans + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Check whether this is a valid data set for the neat table. # + #------------------------------------------------------------------------------------# + sel = ( dbh.ok + & datum[[this.dbh]] > 0 + & ( datum[[this.dbh]] >= dbh.min + | ( ! is.na(y.1st) & y.1st <= y) ) + ) + dbh.table[sel,y] = datum[[this.dbh]][sel] + #------------------------------------------------------------------------------------# + + + #----- Check whether this is the first time this tree has good data. ----------------# + sel = sel & is.na(y.1st) + y.1st [sel ] = y + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Save the subplot flag. # + #---------------------------------------------------------------------------------------# + datum$subplot = as.numeric(dbh.min == dbh.min.sub) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Find the growth rates between surveys and previous one with valid data, and # + # organise them by quantiles. # + #---------------------------------------------------------------------------------------# + for (y in 2:n.years){ + dbh.bef = rep(NA,times=n.datum) + when.bef = rep(NA,times=n.datum) + for (b in seq(from=1,y-1,+1)){ + sel = is.finite(dbh.table[,b]) & dbh.table[,b] > 0 + dbh.bef [sel] = dbh.table [sel,b] + when.bef[sel] = when [b] + }#end for + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Define the growth rates between the previous measurement and the current. # + #------------------------------------------------------------------------------------# + dtime [,y] = when[y]-when.bef + lngrowth [,y] = log(dbh.table[,y] / dbh.bef) / dtime[,y] + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the mean growth rates for each tree. Instead of trying to find growth rates # + # for each individual, we find median rates for each size and species class. # + #---------------------------------------------------------------------------------------# + mean.tree.lngrowth = apply(X=lngrowth,MARGIN=1,FUN=mean,na.rm=TRUE) + mean.genus = tapply( X = mean.tree.lngrowth + , INDEX = datum$genus + , FUN = mean + , na.rm = TRUE + )#end tapply + nok = ! is.finite(mean.genus) + mean.genus [nok] = mean(mean.genus,na.rm=TRUE) + mean.genus = pmax(mean.genus,lngrowth.min) + idx = match(datum$genus,names(mean.genus)) + typical.tree.lngrowth = mean.genus[idx] + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # We loop again and detect the years that shall be filled due to bad measurements # + # or tumbleweed effect. # + #---------------------------------------------------------------------------------------# + datum$year.recruit = rep(Inf, times=n.datum) + removed = rep(FALSE,times=n.datum) + for (y in 1:n.years){ + dbh.label = paste("dbh" ,year4[y],sep=".") + gf.dbh.label = paste("gf.dbh",year4[y],sep=".") + notes.label = paste("notes" ,year4[y],sep=".") + + + + #----- Find out whether to fill the data. -------------------------------------------# + measured = ( ! is.na(dbh.table[,y])) + datum$year.recruit[measured] = pmin(year4[y],datum$year.recruit[measured]) + #------------------------------------------------------------------------------------# + + + + #----- Find out whether to fill the data. -------------------------------------------# + dbh.miss = is.na(datum[[dbh.label]]) | datum[[dbh.label]] < 0 + if (any(is.na(dbh.miss))){ + cat(" dbh.miss has NA!","\n") + }#end if + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Trash information from years before the recruitment that had data. This had # + # been taken care of before, but after discarding some bad measurements a few other # + # pre-recruitment points may appear. # + #------------------------------------------------------------------------------------# + bye = ( is.finite(datum[[dbh.label]]) + & datum[[dbh.label]] > 0 + & is.na(dbh.table[,y]) + )#end sel + message = paste("dbh.",year4[y],"=",abs(datum[[dbh.label]]) + ," is pre-recruitment thus removed",sep="") + datum[[notes.label]][bye] = concatenate.message(datum[[notes.label]][bye] + ,message[bye]) + datum[[dbh.label ]][bye] = NA + datum$year.recruit [bye] = Inf + removed = removed | bye + #---------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Find the previous DBH. # + #------------------------------------------------------------------------------------# + dbh.bef = rep(NA,times=n.datum) + when.bef = rep(NA,times=n.datum) + if (y != 1){ + for (b in seq(from=1,y-1,+1)){ + sel = is.finite(dbh.table[,b]) + dbh.bef [sel] = dbh.table [sel,b] + when.bef[sel] = when [b] + }#end for + }#end if + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Find the next DBH. # + #------------------------------------------------------------------------------------# + dbh.aft = rep(NA,times=n.datum) + when.aft = rep(NA,times=n.datum) + if (y != n.years){ + for (b in seq(from=n.years,y+1,-1)){ + sel = is.finite(dbh.table[,b]) + dbh.aft [sel] = dbh.table [sel,b] + when.aft[sel] = when [b] + }#end for + }#end if + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Estimate the DBH by using the median growth rate starting from before and # + # after. If both are available, then use the mean value, otherwise, take the one # + # that is available. # + #------------------------------------------------------------------------------------# + dbh.guess = data.frame( before = dbh.bef + * exp(typical.tree.lngrowth * (when[y] - when.bef)) + , after = dbh.aft + * exp(typical.tree.lngrowth * (when[y] - when.aft)) + )#end data.frame + gfflg = 1. + rowSums(is.na(dbh.guess),na.rm=TRUE) + dbh.guess = round(rowMeans(dbh.guess,na.rm=TRUE),1) + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Choose the years to update. It has to be NA and it has to be post- # + # recruitment to be accepted. # + #------------------------------------------------------------------------------------# + good.guess = is.finite(dbh.guess) + is.recruited = ( dbh.guess > ( dbh.min + dbh.min.toler ) + | ( is.finite(datum[[dbh.label]]) & datum[[dbh.label]] >= dbh.min ) + | datum$year.recruit <= year4[y] ) + is.alive = datum$year.goodbye > year4[y] + update.year = dbh.miss & good.guess & is.recruited & is.alive + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Fill in the dbh and gap filling flag. # + #------------------------------------------------------------------------------------# + if (any(update.year,na.rm=TRUE)){ + datum[[dbh.label ]][update.year] = dbh.guess[update.year] + datum[[gf.dbh.label]][update.year] = gfflg [update.year] + datum$year.recruit [update.year] = pmin(datum$year.recruit[update.year] + ,year4[y] + )#end pmin + }#end if + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# + + datum$year.recruit[datum$year.recruit == year4[1]] = -Inf + return(datum) +}#end function +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/eifun.r b/R-utils/eifun.r new file mode 100644 index 000000000..859c98093 --- /dev/null +++ b/R-utils/eifun.r @@ -0,0 +1,86 @@ +#------------------------------------------------------------------------------------------# +# EIFUN -- This function computes the exponential integral function, defined by # +# # +# _ # +# x / \ exp(t) # +# Ei(x) = | -------- dt # +# 0 \_/ t # +#------------------------------------------------------------------------------------------# +eifun = function(x){ + + euler = 0.57721566490153286060651209008240243104215933593992 + tiny.off = 1.0e-30 + eps = 1.0e-7 + + #---------------------------------------------------------------------------------------# + # Initialise ei with the part that does not vary. Notice that this will set the # + # result for any x value to infinity, but that's fine because the result should be # + # infinity anyway. # + #---------------------------------------------------------------------------------------# + ei = euler + log(abs(x)) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Iterate until convergence. # + #---------------------------------------------------------------------------------------# + powermeth = abs(x) <= 15 + #----- We only solve the numbers that are enough large. --------------------------------# + large = abs(x) > tiny.off & powermeth + #----- Initialise iteration aux vars, keeping the tiny guys out of the process. --------# + iter = 0 + fact = x + term = x + fact[large] = 1 + fact[!large] = 0 + while (any(large)){ + iter = iter + 1 + fact[large] = fact[large] * x[large] / iter + large = abs(fact) >= tiny.off + term[large] = fact[large] / iter + large = large & abs(term) >= eps * abs(ei) + ei[large] = ei[large] + term[large] + }#end while + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Use asymptotic expansion for large numbers. This may diverge so we must check. # + #---------------------------------------------------------------------------------------# + asymptot = ! powermeth + large = asymptot + #----- Initialise the sum for the terms that will play. --------------------------------# + term = x + term[large] = 1 + ei[large] = 1 + iter = 0 + while (any(large)){ + iter = iter + 1 + prev = term + term[large] = term[large] * iter / x[large] + + #----- Check convergence. -----------------------------------------------------------# + large = large & abs(term) >= eps + diverge = large & abs(term) > abs(prev) + converge = large & abs(term) <= abs(prev) + #------------------------------------------------------------------------------------# + # Remove the previous iteration for the diverging points, and add for the good # + # ones. # + #------------------------------------------------------------------------------------# + ei[diverge] = ei[diverge] - prev[diverge] + ei[converge] = ei[converge] + term[converge] + + large = converge + + nlarge = sum(large) + if (nlarge > 0){ + maxterm = max(abs(term[large])) + }else{ + maxterm = 0. + }#end if + }#end while + ei[asymptot] = ei[asymptot] * exp(x[asymptot]) / x[asymptot] + + return(ei) +}#end function diff --git a/R-utils/epolygon.r b/R-utils/epolygon.r new file mode 100644 index 000000000..9dbdc2747 --- /dev/null +++ b/R-utils/epolygon.r @@ -0,0 +1,207 @@ +#==========================================================================================# +#==========================================================================================# +# This function is the same as the standard polygon function in R, with the exception # +# that it also allows hatch on log scale. # +#------------------------------------------------------------------------------------------# +epolygon <<- function(x, y = NULL, density = NULL, angle = 45, border = NULL + ,col = NA, lty = par("lty"), ..., fillOddEven = FALSE){ + + + #----- Check whether x or y are in log scale. -----------------------------------------# + plog = "" + xlog = par("xlog") + ylog = par("ylog") + if (xlog) plog = paste(plog,"x",sep="") + if (ylog) plog = paste(plog,"y",sep="") + #--------------------------------------------------------------------------------------# + xy = xy.coords(x, y,log=plog) + + #----- Delete density if the input value doesn't make sense... ------------------------# + if (is.numeric(density) && all(is.na(density) | density < 0)) density = NULL + #--------------------------------------------------------------------------------------# + + + + #--------------------------------------------------------------------------------------# + # Plot the hatch in case both angle and density are given. # + #--------------------------------------------------------------------------------------# + if (!is.null(angle) && !is.null(density)) { + if (missing(col) || is.null(col) || is.na(col)) col = par("fg") + if (is.null(border)) border = col + if (is.logical(border)){ + if (! is.na(border) && border){ + border = col + }else{ + border = NA + }#end if + }#end if + start = 1 + ends = c(seq_along(xy$x)[is.na(xy$x) | is.na(xy$y)],length(xy$x) + 1) + num.polygons = length(ends) + col = rep(col, length.out = num.polygons) + border = rep(border, length.out = num.polygons) + lty = rep(lty, length.out = num.polygons) + density = rep(density, length.out = num.polygons) + angle = rep(angle, length.out = num.polygons) + i = 1 + for (end in ends) { + if (end > start) { + den = density[i] + if (is.na(den) || den < 0){ + .Internal(polygon( xy$x[start:(end - 1)] + , xy$y[start:(end - 1)], col[i], NA, lty[i], ...)) + }else if (den > 0) { + epolygon.fullhatch( x = xy$x[start:(end - 1)] + , y = xy$y[start:(end - 1)] + , xlog = xlog + , ylog = ylog + , col = col[i] + , lty = lty[i] + , density = density[i] + , angle = angle[i] + , fillOddEven = fillOddEven + , ... + )#end polygon.fullhatch + }#end if + i = i + 1 + }#end if + start = end + 1 + }#end for + .Internal(polygon(xy$x, xy$y, NA, border, lty, ...)) + }else{ + if (is.logical(border)) { + if (!is.na(border) && border){ + border = par("fg") + }else{ + border = NA + }#end if + }#end if + .Internal(polygon(xy$x, xy$y, col, border, lty, ...)) + }#end if +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# Function the draws on line. # +#------------------------------------------------------------------------------------------# +epolygon.onehatch <<- function(x, y, x0, y0, xd, yd, xlog,ylog, fillOddEven = FALSE, ...){ + + halfplane = as.integer(xd * (y - y0) - yd * (x - x0) <= 0) + cross = halfplane[-1L] - halfplane[-length(halfplane)] + does.cross = cross != 0 + if (! any(does.cross)) return() + + + x1 = x[-length(x)][does.cross] + y1 = y[-length(y)][does.cross] + x2 = x[-1L][does.cross] + y2 = y[-1L][does.cross] + + tt = ( ( (x1 - x0) * (y2 - y1) - (y1 - y0) * (x2 - x1) ) + / (xd * (y2 - y1) - yd * (x2 - x1)) ) + oo = order(tt) + tsort = tt[oo] + crossings = cumsum(cross[does.cross][oo]) + + if (fillOddEven) crossings = crossings%%2 + + drawline = crossings != 0 + lx = x0 + xd * tsort + ly = y0 + yd * tsort + + lx1 = lx[-length(lx)][drawline] + ly1 = ly[-length(ly)][drawline] + lx2 = lx[-1L][drawline] + ly2 = ly[-1L][drawline] + + + if (xlog){ + lx1 = 10^(lx1) + lx2 = 10^(lx2) + }#end if + + if (ylog){ + ly1 = 10^(ly1) + ly2 = 10^(ly2) + }#end if + + segments(lx1, ly1, lx2, ly2, ...) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +epolygon.fullhatch <<- function(x, y, xlog,ylog, density, angle, fillOddEven = FALSE,...) { + + #----- Convert x and y to log scale if needed be. --------------------------------------# + x = c(x, x[1L]) + if (xlog) x = log10(x) + y = c(y, y[1L]) + if (ylog) y = log10(y) + #---------------------------------------------------------------------------------------# + + angle = angle%%180 + + usr = par("usr") + pin = par("pin") + + upix = ( usr[2L] - usr[1L] ) / pin + upiy = ( usr[4L] - usr[3L] ) / pin + upi = c(upix,upiy) + + if (upi[1L] < 0) angle = 180 - angle + if (upi[2L] < 0) angle = 180 - angle + + upi = abs(upi) + xd = cos(angle/180 * pi) * upi[1L] + yd = sin(angle/180 * pi) * upi[2L] + + if (angle < 45 || angle > 135) { + if (angle < 45) { + first.x = max(x) + last.x = min(x) + }else{ + first.x = min(x) + last.x = max(x) + }#end if + y.shift = upi[2L]/density/abs(cos(angle/180 * pi)) + x0 = 0 + y0 = floor((min(y) - first.x * yd/xd)/y.shift) * y.shift + y.end = max(y) - last.x * yd/xd + while (y0 < y.end) { + epolygon.onehatch(x, y, x0, y0, xd, yd , xlog, ylog,fillOddEven,...) + y0 = y0 + y.shift + }#end while + }else{ + if (angle < 90){ + first.y = max(y) + last.y = min(y) + }else{ + first.y = min(y) + last.y = max(y) + }#end if + x.shift = upi[1L]/density/abs(sin(angle/180 * pi)) + x0 = floor((min(x) - first.y * xd/yd)/x.shift) * x.shift + y0 = 0 + x.end = max(x) - last.y * xd/yd + while (x0 < x.end) { + epolygon.onehatch(x, y, x0, y0, xd, yd,xlog,ylog,fillOddEven,...) + x0 = x0 + x.shift + }#end while + }#end if +}#end function +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/eps.r b/R-utils/eps.r new file mode 100644 index 000000000..83d02dc51 --- /dev/null +++ b/R-utils/eps.r @@ -0,0 +1,11 @@ +#------------------------------------------------------------------------------------------# +# Function eps # +# Developed by Marcos Longo - EPS/Harvard University # +# # +# This function simply gives the machine epsilon for single precision # +#------------------------------------------------------------------------------------------# + eps <- function(){ + eps <- 2^(-24) + return(eps) + } +#------------------------------------------------------------------------------------------# diff --git a/R-utils/error.bar.r b/R-utils/error.bar.r new file mode 100644 index 000000000..038053ec0 --- /dev/null +++ b/R-utils/error.bar.r @@ -0,0 +1,145 @@ +#------------------------------------------------------------------------------------------# +# This function plots a scatter plot adding error bars. # +#------------------------------------------------------------------------------------------# +error.bar = function(x, y,xerr=NULL,yerr=NULL,xlow=NULL,xhigh=NULL,ylow=NULL,yhigh=NULL + ,xlim=NULL,ylim=NULL,cap=0.015,main=NULL,sub=NULL + ,xlab = as.character(substitute(x)) + ,ylab = if (is.factor(x) || is.character(x)){ + "" + }else{ + as.character(substitute(y)) + }#end if + ,add = FALSE, lty = 1, type = "p", lwd = 1 + ,pch = 16,col="black",err.col=col + ,...){ + + #--------------------------------------------------------------------------------------# + # Decide whether to start a new plot window or put over an existing plot. # + #--------------------------------------------------------------------------------------# + if (add){ + #---- Points. ----------------------------------------------------------------------# + points(x, y, pch = pch, type = type, col=col,lwd=lwd,lty=lty,...) + #-----------------------------------------------------------------------------------# + }else{ + #----- Find range for x and y in case none has been provided. ----------------------# + if (is.null(xlim)){ + if ((! is.null(xlow)) & (! is.null(xhigh))){ + xlim = c(x,xlow,xhigh) + }else{ + xlim = range(c(x,x+xerr,x-xerr),na.rm=TRUE) + }#end if + }#end if + if (is.null(ylim)){ + if ((! is.null(ylow)) & (! is.null(yhigh))){ + ylim = c(y,ylow,yhigh) + }else{ + ylim = range(c(y,y+yerr,y-yerr),na.rm=TRUE) + }#end if + }#end if + #-----------------------------------------------------------------------------------# + + + #----- New plot --------------------------------------------------------------------# + plot(x=x,y=y,xlim=xlim,ylim=ylim,xlab=xlab,ylab=ylab,type=type + ,col=col,lwd=lwd,lty=lty,...) + #-----------------------------------------------------------------------------------# + }#end if + #--------------------------------------------------------------------------------------# + + + + #--------------------------------------------------------------------------------------# + # Decide the bounds for X and Y when low and high aren't provided. # + #--------------------------------------------------------------------------------------# + if ( (! is.null(xerr)) && (is.null(xlow) | is.null(xhigh))){ + xlow = x - xerr + xhigh = x + xerr + }else if (is.null(xerr) && (! is.null(xlow)) && (! is.null(xhigh))){ + xerr = TRUE + }#end if + if ( (! is.null(yerr)) && (is.null(ylow) | is.null(yhigh))){ + ylow = y - yerr + yhigh = y + yerr + }else if (is.null(yerr) && (! is.null(ylow)) && (! is.null(yhigh))){ + yerr = TRUE + }#end if + #--------------------------------------------------------------------------------------# + + + + #--------------------------------------------------------------------------------------# + # Plot the X error bars. # + #--------------------------------------------------------------------------------------# + if (! is.null(xerr)){ + #----- Scale the cap with the total scale. -----------------------------------------# + ycoord = par()$usr[3:4] + smidge = 0.5 * cap * (ycoord[2] - ycoord[1]) + #-----------------------------------------------------------------------------------# + + + + #----- Decide the scale depending on whether the y scale is linear or log. ---------# + if (par()$ylog){ + ycapa = y * 10^(-smidge) + ycapz = y * 10^( smidge) + }else{ + ycapa = y - smidge + ycapz = y + smidge + }#end if + #-----------------------------------------------------------------------------------# + + + #---- Plot the main stem. ----------------------------------------------------------# + segments(xlow, y, xhigh, y, lty = lty, lwd = lwd,col=err.col) + #-----------------------------------------------------------------------------------# + + + + #---- Plot the caps. ---------------------------------------------------------------# + segments(xlow ,ycapa,xlow ,ycapa,lty=lty,lwd=lwd,col=err.col) + segments(xhigh,ycapz,xhigh,ycapz,lty=lty,lwd=lwd,col=err.col) + #-----------------------------------------------------------------------------------# + }#end if + #--------------------------------------------------------------------------------------# + + + + #--------------------------------------------------------------------------------------# + # Plot the Y error bars. # + #--------------------------------------------------------------------------------------# + if (! is.null(yerr)){ + #----- Scale the cap with the total scale. -----------------------------------------# + xcoord = par()$usr[1:2] + smidge = cap * (xcoord[2] - xcoord[1])/2 + #-----------------------------------------------------------------------------------# + + + + #----- Decide the scale depending on whether the x scale is linear or log. ---------# + if (par()$xlog) { + xcapa = x * 10^(-smidge) + xcapz = x * 10^( smidge) + }else{ + xcapa = x - smidge + xcapz = x + smidge + }#end if + #-----------------------------------------------------------------------------------# + + + #---- Plot the main stem. ----------------------------------------------------------# + segments(x,ylow,x,yhigh,lty = lty,lwd=lwd,col=err.col) + #-----------------------------------------------------------------------------------# + + + + #---- Plot the caps. ---------------------------------------------------------------# + segments(xcapa,ylow ,xcapz,ylow ,lwd=lwd,lty=lty,col=err.col) + segments(xcapa,yhigh,xcapz,yhigh,lwd=lwd,lty=lty,col=err.col) + #-----------------------------------------------------------------------------------# + }#end if + #--------------------------------------------------------------------------------------# + + + return(invisible()) +}#end function +#------------------------------------------------------------------------------------------# diff --git a/R-utils/file.really.exists.r b/R-utils/file.really.exists.r new file mode 100644 index 000000000..df610b7c8 --- /dev/null +++ b/R-utils/file.really.exists.r @@ -0,0 +1,23 @@ +############################################################################################ +# Fuction file.really.exists # +# # +# Marcos Longo - EPS/Harvard University. # +# Cambridge, October 4, 2006. # +# # +# This function tests whether a file exists or not (as file.exists does), but it also # +# consider the possibility that the file can be large. The original R function usually # +# fails in this case. # +############################################################################################ +file.really.exists <- function(filename){ + +###### Keeping it simple: if file.exists returns TRUE, then it's TRUE ###################### + foundit <- file.exists(filename) + +###### In case foundit is FALSE, but I am in a Linux environment, I double check. ########## + if (! foundit && Sys.info()["sysname"] == "Linux"){ + foundit <- as.numeric(system(command=paste("ls -1",filename,"2> /dev/null | wc -l"), + intern=TRUE)) > 0 + } #end if (! foundit) + return (foundit) +} #end function file.really.exists +############################################################################################ diff --git a/R-utils/fuse.fiss.utils.r b/R-utils/fuse.fiss.utils.r new file mode 100644 index 000000000..4a6f85d82 --- /dev/null +++ b/R-utils/fuse.fiss.utils.r @@ -0,0 +1,701 @@ +#==========================================================================================# +#==========================================================================================# +# Function fuse.trees # +# # +# This function fuse one group of trees to the other, once the fusion indices have # +# been already set. # +# # +# receptor -- The data frame that will receive the data # +# donor -- The data frame that will send the data # +# don.2.rec -- The indices of the receptor that will receive the data. # +# update.yr.notes -- Should we use notes.orig to make year notes? (TRUE/FALSE). # +#------------------------------------------------------------------------------------------# +fuse.trees = function(receptor,donor,don.2.rec,survey.years){ + + #---------------------------------------------------------------------------------------# + # Get the list of all variables. # + #---------------------------------------------------------------------------------------# + variables = names(receptor) + n.variables = length(variables) + n.receptor = nrow(receptor) + empty = rep(NA,n.receptor) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Copy the scientific name and family. # + #---------------------------------------------------------------------------------------# + this.1st = empty; this.1st[don.2.rec] = donor$common.1st + this.sci = empty; this.sci[don.2.rec] = donor$scientific + this.fam = empty; this.fam[don.2.rec] = donor$family + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Copy new data to the receptor dataset, one variable at a time as they have # + # different rules. # + #---------------------------------------------------------------------------------------# + for (nv in 1:n.variables){ + #------------------------------------------------------------------------------------# + # Grab the variable name, and make some auxiliary names. # + #------------------------------------------------------------------------------------# + vname = variables[nv] + old = paste("old",vname,sep=".") + first = paste(vname,"1st",sep=".") + new.input = paste(substring(vname,1,nchar(vname)-5),survey.years,sep=".") + #------------------------------------------------------------------------------------# + + #----- Save variable to the template. -----------------------------------------------# + this.val = empty + this.val[don.2.rec] = donor[[vname]] + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Decide what to do based on the variable. # + #------------------------------------------------------------------------------------# + if ( length(grep(pattern="trans" ,x=vname)) > 0 || + length(grep(pattern="full.tag" ,x=vname)) > 0 || + length(grep(pattern="old." ,x=vname)) > 0 || + length(grep(pattern=".1st" ,x=vname)) > 0 || + length(grep(pattern="scientific",x=vname)) > 0 || + length(grep(pattern="family" ,x=vname)) > 0 || + length(grep(pattern="conflict." ,x=vname)) > 0){ + #---- We never copy these variables. ---------------------------------------------# + this.val = this.val + #---------------------------------------------------------------------------------# + + + + + }else if (vname %in% c("year.last")){ + #---- We always copy these variables. --------------------------------------------# + receptor[[vname]][don.2.rec] = this.val[don.2.rec] + #---------------------------------------------------------------------------------# + + + + + }else if (vname %in% c("year.added","year.recruit")){ + #---- We always keep the lowest value. -------------------------------------------# + receptor[[vname]][don.2.rec] = pmin( this.val[don.2.rec] + , receptor[[vname]][don.2.rec] + , na.rm = TRUE ) + #---------------------------------------------------------------------------------# + + + + + }else if (vname %in% c("year.death")){ + #---- We always keep the highest value. ------------------------------------------# + receptor[[vname]][don.2.rec] = pmax( this.val[don.2.rec] + , receptor[[vname]][don.2.rec] + , na.rm = TRUE ) + #---------------------------------------------------------------------------------# + + + }else if (vname %in% c("tag","x","y")){ + #---- Variables that may change and we update using later censuses. --------------# + sel.1st = ( ( ! is.na(this.val)) + & is.na(receptor[[first]]) ) + old.sel = ( (! is.na(this.val)) + & (! is.na(receptor[[vname]])) ) + receptor[[first]][sel.1st] = this.val[sel.1st] + receptor[[old ]][old.sel] = receptor[[vname]][old.sel] + receptor[[vname]][don.2.rec] = this.val[don.2.rec] + #---------------------------------------------------------------------------------# + + + }else if (vname %in% c("common")){ + #---------------------------------------------------------------------------------# + # We must check whether the donor or receptor have scientific name and # + # family. We always keep the one that has scientific name. If both have # + # scientific name and they don't match, we stop. # + #---------------------------------------------------------------------------------# + + #---------------------------------------------------------------------------------# + # 1. Receptor has scientific name, donor doesn't; we copy the info from donor to # + # old.common but don't update common and scientific. # + #---------------------------------------------------------------------------------# + rec.sci = ( ! is.na(receptor$scientific)) & is.na(this.sci) + old.sel = ( rec.sci & (! is.na(this.val)) + & receptor$common != this.val ) + receptor$old.common[old.sel] = this.val[old.sel] + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # 2. Donor has scientific name, receptor doesn't; we copy common name (current # + # and first), scientific name, and family info from donor to receptor, and # + # move receptor common name to old.common. # + #---------------------------------------------------------------------------------# + don.sci = is.na(receptor$scientific) & (! is.na(this.sci)) + old.sel = don.sci & (! is.na(receptor$common)) + receptor$old.common[old.sel] = receptor$common[old.sel] + receptor$common [don.sci] = this.val [don.sci] + receptor$common.1st[don.sci] = this.1st [don.sci] + receptor$scientific[don.sci] = this.sci [don.sci] + receptor$family [don.sci] = this.fam [don.sci] + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # 3. Neither donor nor receptor have scientific name. Replace those that are NA # + # by the donor info. # + #---------------------------------------------------------------------------------# + no.sci = is.na(receptor$scientific) & is.na(this.sci) + sel.1st = no.sci & ( ! is.na(this.val)) & is.na(receptor[[first]]) + old.sel = no.sci & ( ! is.na(this.val)) & (! is.na(receptor[[vname]])) + new.sel = no.sci & ( ! is.na(this.val)) + receptor[[first]][sel.1st] = this.val[sel.1st] + receptor[[old ]][old.sel] = receptor[[vname]][old.sel] + receptor[[vname]][new.sel] = this.val[new.sel] + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # 4. Both receptor and donor have scientific name; and they are the same. Do # + # nothing, they are consistent already. # + #---------------------------------------------------------------------------------# + same.sci = ( (! is.na(receptor$scientific)) & (! is.na(this.sci)) + & receptor$scientific == this.sci ) + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # 5. Receptor and donor have scientific name; and they are not the same. This # + # should not happen; crash! # + #---------------------------------------------------------------------------------# + diff.sci = ( (! is.na(receptor$scientific)) & (! is.na(this.sci)) + & receptor$scientific != this.sci ) + if (any(diff.sci)) stop ("Mismatch between scientific names!") + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Make sure common.1st is initialised. # + #---------------------------------------------------------------------------------# + sel = (! is.na(receptor$common) ) & is.na(receptor$common.1st) + receptor$common.1st[sel] = receptor$common[sel] + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Flag conflicts. # + #---------------------------------------------------------------------------------# + mismatch = ( (! is.na(receptor[[vname]])) + & (! is.na(receptor[[old ]])) + & receptor[[vname]] != receptor[[old]] ) + receptor$conflict.common[mismatch] = TRUE + #---------------------------------------------------------------------------------# + + + }else if ( length(grep(pattern="dbh." ,x=vname)) > 0 || + ( length(grep(pattern="notes.",x=vname)) > 0 && + ! vname %in% c("notes.orig","notes.qaqc") ) ){ + #---------------------------------------------------------------------------------# + # Variables that we never update unless this is the actual year. # + #---------------------------------------------------------------------------------# + if (vname %in% new.input){ + #----- Copy only the cells that had no info before. ---------------------------# + sel = (! is.na(this.val)) & (is.na(receptor[[vname]])) + receptor[[vname]][sel] = this.val[sel] + #------------------------------------------------------------------------------# + + }else if (length(grep(pattern="dbh.",x=vname)) > 0){ + #------------------------------------------------------------------------------# + # If this is DBH from previous surveys, we check whether they # + # match, and flag any mismatch in any given year. # + #------------------------------------------------------------------------------# + mismatch.na = is.na(receptor[[vname]]) != is.na(this.val) + mismatch.val = receptor[[vname]] != this.val + receptor$conflict.dbh = ( receptor$conflict.dbh + | mismatch.na | mismatch.val ) + #------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------# + + + }else if ( length(grep(pattern="dead." ,x=vname)) > 0 + || length(grep(pattern="canopy." ,x=vname)) > 0 + || length(grep(pattern="height." ,x=vname)) > 0 + || length(grep(pattern="band." ,x=vname)) > 0 + || length(grep(pattern="pom." ,x=vname)) > 0 + || length(grep(pattern="ladder" ,x=vname)) > 0 + || length(grep(pattern="cnpj" ,x=vname)) > 0 + ){ + #---- Variables that we update only if they have NA. -----------------------------# + sel = ( is.na(receptor[[vname]]) + & ( ! is.na(this.val)) ) + receptor[[vname]][sel] = this.val[sel] + #---------------------------------------------------------------------------------# + + + }else if ( vname == "notes.orig"){ + for (yr in survey.years){ + notes.year = paste("notes",yr,sep=".") + #------------------------------------------------------------------------------# + # If original notes were NA, then the comments are purely for # + # this year. # + #------------------------------------------------------------------------------# + goto.yr = is.na(receptor[[notes.year]]) + goto.yr[is.na(goto.yr)] = FALSE + receptor[[notes.year]][goto.yr] = this.val[goto.yr] + #----- Find lines where comments were added. ----------------------------------# + idx = which( (! is.na(receptor$notes.orig)) + & (! is.na(this.val )) ) + added = rep(FALSE,times=n.receptor) + added[idx] = ( mapply( FUN = regexpr + , pattern = receptor$notes.orig[idx] + , text = this.val [idx] + , MoreArgs = list(ignore.case=TRUE) + , SIMPLIFY = TRUE) > 0 + & receptor$notes.orig[idx] != this.val[idx] ) + added = which(added) + #----- Find lines where comments were different. ------------------------------# + other = rep(FALSE,times=n.receptor) + other[idx] = mapply( FUN = regexpr + , pattern = receptor$notes.orig[idx] + , text = this.val [idx] + , MoreArgs = list(ignore.case=TRUE) + , SIMPLIFY = TRUE) == -1 + other = which(other) + #----- 3. Remove old comments from the new notes before we copy. --------------# + bye.old = mapply( FUN = sub + , pattern = receptor$notes.orig + , x = this.val + , MoreArgs = list(replacement="") + )#end mapply + bye.old = paste("AAAA",bye.old,"EEEE",sep="") + bye.old = sub(pattern="AAAA " ,replacement="" ,x=bye.old) + bye.old = sub(pattern="AAAA" ,replacement="" ,x=bye.old) + bye.old = sub(pattern="AAAA; ",replacement="" ,x=bye.old) + bye.old = sub(pattern="AAAA;" ,replacement="" ,x=bye.old) + bye.old = sub(pattern="AAAA. ",replacement="" ,x=bye.old) + bye.old = sub(pattern="AAAA." ,replacement="" ,x=bye.old) + bye.old = sub(pattern=";EEEE" ,replacement="" ,x=bye.old) + bye.old = sub(pattern="; EEEE",replacement="" ,x=bye.old) + bye.old = sub(pattern="EEEE" ,replacement="" ,x=bye.old) + receptor[[notes.year]] [added] = bye.old [added] + receptor[[notes.year]] [other] = this.val[other] + receptor$conflict.notes[added] = TRUE + receptor$conflict.notes[other] = TRUE + #----- 4. Replace original notes. ---------------------------------------------# + receptor$notes.orig[don.2.rec] = this.val[don.2.rec] + }#end for + #---------------------------------------------------------------------------------# + + }else if ( vname == "notes.qaqc"){ + + #------------------------------------------------------------------------------# + # This variable is likely to go away, for the time being we just # + # concatenate the information. # + #------------------------------------------------------------------------------# + receptor[[vname]] = concatenate.message(receptor[[vname]],this.val) + #------------------------------------------------------------------------------# + + }else{ + #----- Missing instructions, quit... ---------------------------------------------# + cat (" * VARIABLE: ",vname," has no instrucion!","\n") + stop("Could not process the variable, sorry!") + #---------------------------------------------------------------------------------# + }#end if + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# + return(receptor) +}#end fuse.trees +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# Function blend.trees # +# # +# This function blends one tree to the other. This is slightly different from the # +# fusion routine above because blending adds information but compares the periods for # +# which information is to be added. The other difference is that IT CANNOT BE USED IN # +# VECTOR MODE: it works between one donor and one receptor only. # +# # +# receptor -- The data frame that will receive the data # +# donor -- The data frame that will send the data # +# don.2.rec -- The indices of the receptor that will receive the data. # +# update.yr.notes -- Should we use notes.orig to make year notes? (TRUE/FALSE). # +#------------------------------------------------------------------------------------------# +blend.trees = function(receptor,donor,years.blend){ + + #---------------------------------------------------------------------------------------# + # Get the list of all variables. # + #---------------------------------------------------------------------------------------# + variables = names(receptor) + n.variables = length(variables) + n.receptor = nrow(receptor) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # We will create a vector of DBH variables. # + #---------------------------------------------------------------------------------------# + dbh.vars = NULL + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Copy new data to the receptor dataset, one variable at a time as they have # + # different rules. # + #---------------------------------------------------------------------------------------# + for (nv in 1:n.variables){ + #------------------------------------------------------------------------------------# + # Grab the variable name, and make some auxiliary names. # + #------------------------------------------------------------------------------------# + vname = variables[nv] + old = paste("old",vname,sep=".") + first = paste(vname,"1st",sep=".") + blend.input = paste(substring(vname,1,nchar(vname)-5),years.blend,sep=".") + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Decide what to do based on the variable. # + #------------------------------------------------------------------------------------# + if ( length(grep(pattern="trans" ,x=vname)) > 0 || + length(grep(pattern="full.tag" ,x=vname)) > 0 || + length(grep(pattern="old." ,x=vname)) > 0 || + length(grep(pattern=".1st" ,x=vname)) > 0 || + length(grep(pattern="scientific",x=vname)) > 0 || + length(grep(pattern="family" ,x=vname)) > 0 || + length(grep(pattern="year.last" ,x=vname)) > 0 || + length(grep(pattern="cnpj" ,x=vname)) > 0 || + length(grep(pattern="conflict." ,x=vname)) > 0){ + #---------------------------------------------------------------------------------# + # We skip these variables. # + #---------------------------------------------------------------------------------# + dummy = NA + #---------------------------------------------------------------------------------# + + + + }else if (vname %in% c("year.added")){ + #---- We always keep the lowest value. -------------------------------------------# + receptor$year.added = min(receptor$year.added,min(years.blend)) + #---------------------------------------------------------------------------------# + + + + }else if (vname %in% c("year.recruit")){ + #---- We always keep the lowest value. -------------------------------------------# + receptor$year.recruit = min(receptor$year.recruit,donor$year.recruit) + #---------------------------------------------------------------------------------# + + + + }else if (vname %in% c("year.death")){ + #---- We always keep the highest value. ------------------------------------------# + receptor$year.death = max(receptor$year.death,donor$year.death) + #---------------------------------------------------------------------------------# + + + }else if (vname %in% c("tag","x","y")){ + #---------------------------------------------------------------------------------# + # We will consider changing the values only if the donor has information. # + #---------------------------------------------------------------------------------# + if (! is.na(donor[[vname]])){ + #------------------------------------------------------------------------------# + # We update coordinates only if the last year of the original dataset was # + # less than the years we are blending. # + #------------------------------------------------------------------------------# + if ( ( ( max(years.blend) > receptor$year.last ) + && ( receptor[[vname]] != donor[[vname]] ) ) + || is.na(receptor[[vname]]) ){ + receptor[[old ]] = receptor[[vname]] + receptor[[vname]] = donor [[vname]] + }#end if + #------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------# + # We don't change the "1st" variables unless the data we are blending is # + # older than the first year the receptor has data. # + #------------------------------------------------------------------------------# + if ( ( ( min(years.blend) < receptor$year.1st ) + && ( receptor[[vname]] != donor[[vname]] ) ) + || is.na(receptor[[vname]]) ){ + receptor[[first]] = donor[[first]] + }#end if + #------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------# + + + }else if (vname %in% c("common")){ + #---------------------------------------------------------------------------------# + # We must check whether the donor or receptor have scientific name and # + # family. We always keep the one that has scientific name. If both have # + # scientific name and they don't match, we stop. # + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # 1. Receptor has scientific name, donor doesn't; we copy the info from donor to # + # old.common but don't update common and scientific. # + #---------------------------------------------------------------------------------# + if ( ( ! is.na(receptor$scientific)) && is.na(donor$scientific) + && ( ! is.na(donor$common )) && ( receptor$common != donor$common) ){ + receptor$old.common = donor$common + }#end if + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # 2. Donor has scientific name, receptor doesn't; we copy common name (current # + # and first), scientific name, and family info from donor to receptor, and # + # move receptor common name to old.common. # + #---------------------------------------------------------------------------------# + if ( is.na(receptor$scientific) & (! is.na(donor$scientific) )){ + + if ( ( ! is.na(receptor$common)) & receptor$common != donor$common ){ + receptor$old.common = receptor$common + }#end if + + receptor$common = donor$common + receptor$common.1st = donor$common.1st + receptor$scientific = donor$scientific + receptor$family = donor$family + }#end if + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # 3. Neither donor nor receptor have scientific name. Check the years and # + # decide which common name has preference (the most recent one). # + #---------------------------------------------------------------------------------# + if ( is.na(receptor$scientific) && is.na(donor$scientific) ){ + #------------------------------------------------------------------------------# + # Check whether we update the common name. # + #------------------------------------------------------------------------------# + if ( receptor$year.last < max(years.blend) ){ + copy.common = ! is.na(donor$common) + update.old = ( copy.common && (! is.na(receptor$common)) + && receptor$common != donor$common ) + if (update.old ) receptor$old.common = receptor$common + if (copy.common) receptor$common = donor$common + }#end if + #------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------# + # Check whether the donor first name is older than the receptor one. # + #------------------------------------------------------------------------------# + if ( receptor$year.1st > min(years.blend) ){ + if ( ! is.na(donor$common.1st) ){ + receptor$common.1st = donor$common.1st + }#end if + }#end if + #------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # 4. Both receptor and donor have scientific name; and they are the same. Do # + # nothing, they are consistent already. # + #---------------------------------------------------------------------------------# + same.sci = ( (! is.na(receptor$scientific)) && (! is.na(donor$scientific)) + & receptor$scientific == donor$scientific ) + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # 5. Receptor and donor have scientific name; and they are not the same. This # + # should not happen; crash! # + #---------------------------------------------------------------------------------# + diff.sci = ( (! is.na(receptor$scientific)) & (! is.na(donor$scientific)) + & receptor$scientific != donor$scientific ) + if (diff.sci){ + cat ("Mismatch between scientific names!","\n") + browser() + }#end if + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Make sure common.1st is initialised. # + #---------------------------------------------------------------------------------# + sel = (! is.na(receptor$common) ) & is.na(receptor$common.1st) + receptor$common.1st[sel] = receptor$common[sel] + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Flag conflicts. # + #---------------------------------------------------------------------------------# + if( (! is.na(receptor[[vname]])) & (! is.na(receptor[[old ]])) + & receptor[[vname]] != receptor[[old]] ){ + receptor$conflict.common = TRUE + }#end if + #---------------------------------------------------------------------------------# + + + }else if ( length(grep(pattern="dbh." ,x=vname)) > 0 + || length(grep(pattern="dead." ,x=vname)) > 0 + || ( length(grep(pattern="notes.",x=vname)) > 0 + && ! vname %in% c("notes.orig","notes.qaqc") ) ){ + #---------------------------------------------------------------------------------# + # Variables that we update only if this is the blending year. # + #---------------------------------------------------------------------------------# + if (vname %in% blend.input && (! is.na(donor[[vname]]))){ + #----- Copy only the cells that had no info before. ---------------------------# + receptor[[vname]] = donor[[vname]] + #------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # For DBH, we also check whether they match in case of overlap, and flag any # + # mismatch for blending years. # + #---------------------------------------------------------------------------------# + if ( length(grep(pattern="dbh." ,x=vname)) > 0){ + dbh.vars = c(dbh.vars,vname) + mismatch.na = is.na(receptor[[vname]]) != is.na(donor[[vname]]) + mismatch.val = receptor[[vname]] != donor[[vname]] + receptor$conflict.dbh = receptor$conflict.dbh | mismatch.na | mismatch.val + #------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------# + + + }else if ( length(grep(pattern="canopy." ,x=vname)) > 0 + || length(grep(pattern="height." ,x=vname)) > 0 + || length(grep(pattern="band." ,x=vname)) > 0 + || length(grep(pattern="pom." ,x=vname)) > 0 + || length(grep(pattern="ladder" ,x=vname)) > 0 + ){ + #---- Variables that we update only if they have NA. -----------------------------# + sel = ( is.na(receptor[[vname]]) + & ( ! is.na(donor[[vname]])) ) + receptor[[vname]][sel] = donor[[vname]][sel] + #---------------------------------------------------------------------------------# + + }else if ( vname %in% c("notes.qaqc","notes.orig")){ + #------------------------------------------------------------------------------# + # We concatenate the information. # + #------------------------------------------------------------------------------# + receptor[[vname]] = concatenate.message(receptor[[vname]],donor[[vname]]) + #------------------------------------------------------------------------------# + + }else{ + #----- Missing instructions, quit... ---------------------------------------------# + cat (" * VARIABLE: ",vname," has no instrucion!","\n") + stop("Could not process the variable, sorry!") + #---------------------------------------------------------------------------------# + }#end if + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Update year.1st and year.last with the updated info. # + #---------------------------------------------------------------------------------------# + dbh.years = sort(as.numeric(substring(dbh.vars,5))) + n.years = length(dbh.years) + receptor$year.1st = NA + receptor$year.last = NA + for (y in 1:n.years){ + yr = dbh.years[y] + dbh.now = receptor[[paste("dbh",yr,sep=".")]] + #------------------------------------------------------------------------------------# + # Check whether to update the first and last year with valid DBH. # + #------------------------------------------------------------------------------------# + if (is.finite(dbh.now)){ + receptor$year.last = yr + if (is.na(receptor$year.1st)) receptor$year.1st = yr + }#end if + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# + + return(receptor) +}#end fuse.trees +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function partially removes information from the line. # +#------------------------------------------------------------------------------------------# +delete.tree.period <<- function(tree,period){ + #---- Find the names of the variables we will clean. -----------------------------------# + dbh.names = paste("dbh" ,period,sep=".") + notes.names = paste("notes" ,period,sep=".") + canopy.names = paste("canopy",period,sep=".") + dead.names = paste("dead" ,period,sep=".") + height.names = paste("height",period,sep=".") + band.names = paste("band" ,period,sep=".") + reset.names = c(dbh.names,notes.names,canopy.names,dead.names,height.names,band.names) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the columns we will discard. # + #---------------------------------------------------------------------------------------# + reset = which(names(tree) %in% reset.names) + tree[reset] = NA + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Update year.1st and year.last with the updated info. # + #---------------------------------------------------------------------------------------# + dbh.vars = names(tree)[grep("dbh.",names(tree))] + dbh.years = sort(as.numeric(substring(dbh.vars,5))) + n.years = length(dbh.years) + tree$year.1st = NA + tree$year.last = NA + for (y in 1:n.years){ + yr = dbh.years[y] + dbh.now = tree[[paste("dbh",yr,sep=".")]] + #------------------------------------------------------------------------------------# + # Check whether to update the first and last year with valid DBH. # + #------------------------------------------------------------------------------------# + if (is.finite(dbh.now)){ + tree$year.last = yr + if (is.na(tree$year.1st)) tree$year.1st = yr + }#end if + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# + + return(tree) +}#end if +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/globdims.r b/R-utils/globdims.r new file mode 100644 index 000000000..0f720cf34 --- /dev/null +++ b/R-utils/globdims.r @@ -0,0 +1,197 @@ +#----- Some dimensions based on ED-2.2 default. -------------------------------------------# +npft <<- 17 # Number of plant functional types +nlu <<- 3 # Number of land use types. +nstyp <<- 17 # Number of default soil types +#------------------------------------------------------------------------------------------# + + + +#----- Radiation thresholds. --------------------------------------------------------------# +cosz.min <<- 0.03 # cos(89*pi/180) # Minimum cosine of zenith angle +cosz.highsun <<- cos(84*pi/180) # Zenith angle to not be called sunrise or sunset +cosz.twilight <<- cos(96*pi/180) # Cosine of the end of civil twilight +fvis.beam.def <<- 0.43 +fnir.beam.def <<- 1.0 - fvis.beam.def +fvis.diff.def <<- 0.52 +fnir.diff.def <<- 1.0 - fvis.diff.def +#------------------------------------------------------------------------------------------# + + +#----- Minimum R2 that we consider meaningful. --------------------------------------------# +r2.min <<- 0.36 +#----- Typical p-value below which we reject the NULL hypothesis. -------------------------# +pval.max <<- 0.05 +#----- p-value below which we reject the NULL hypothesis for u* filters. ------------------# +pval.ustar <<- 0.05 +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Tolerance for root-finding methods. # +#------------------------------------------------------------------------------------------# +toler <<- 1.e-6 # Tolerance for the root-finder algorithms +maxfpo <<- 60 # Maximum number of Regula-Falsi iterations +maxit <<- 150 # Maximum number of iterations in general +#------------------------------------------------------------------------------------------# + + + + +#----- Define some default legend colours and names. --------------------------------------# +lunames <<- c("Agricultural","Secondary","Primary","Total") +lucols <<- c("goldenrod","chartreuse","darkgreen",all.colour) + +distnames <<- c("Agr->Agr" ,"2nd->Agr" ,"Prim->Agr" + ,"Agr->2nd" ,"2nd->2nd" ,"Prim->2nd" + ,"Agr->Prim","2nd->Prim","Prim->Prim") +distcols <<- c("gold","darkorange2","firebrick" + ,"lightskyblue","turquoise","steelblue" + ,"palegreen","chartreuse","forestgreen") +#------------------------------------------------------------------------------------------# + + +#----- Growth respiration factor (to estimate when the actual variable is not there). -----# +growth.resp.fac <<- c(rep(0.333,times=5),rep(0.4503,times=3),rep(0,times=3) + ,rep(0.333,times=4)) +#------------------------------------------------------------------------------------------# + + + +#----- fswh is the FSW that plants experience and they are happy (wilting point = 0). -----# +fswh <<- 0.99 +#------------------------------------------------------------------------------------------# + + +#----- Years for which we have eddy flux tower. -------------------------------------------# +eft.year <<- c(1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012) +eft.pch <<- c( 0, 1, 6, 3, 4, 5, 13, 15, 16, 17, 18, 9, 8, 7, 14) +eft.col <<- c("purple4","purple1","mediumpurple1","royalblue4","steelblue","deepskyblue" + ,"#004000","chartreuse4","lawngreen","red3","#FF6000","#FFA000" + ,"chocolate4","lightgoldenrod3","yellow2") +#------------------------------------------------------------------------------------------# + + + +#----- Standard colours and names for soil classes. ---------------------------------------# +stext.cols <<- c("gold","chartreuse","limegreen","darkgreen","purple3" + ,"deepskyblue","aquamarine","midnightblue","darkorange3","sienna" + ,"firebrick","grey61","grey29","orchid","olivedrab","goldenrod" + ,"steelblue") +stext.names <<- c("Sand","Loamy Sand","Sandy loam","Silt loam","Loam","Sandy clay loam" + ,"Silty clay loam","Clayey loam","Sandy clay","Silty clay","Clay","Peat" + ,"Bedrock","Silt","Heavy clay","Clayey sand","Clayey silt") +stext.acron <<- c("Sa","LoSa","SaLo","SiLo","Lo","SaClLo","SiClLo","ClLo" + ,"SaCl","SiCl","Cl","Pe","Br","Si","HCl","ClSa","ClSi") +#------------------------------------------------------------------------------------------# + + + + +#==========================================================================================# +#==========================================================================================# +# Patch information for POV-Ray. # +#------------------------------------------------------------------------------------------# +pov.dbh.min <<- 5 # Minimum DBH to be plotted +pov.patch.xmax <<- 16 # Size of each sub-plot in the x direction [m] +pov.patch.ymax <<- 16 # Size of each sub-plot in the y direction [m] +pov.nx.patch <<- 25 # Number of sub-plots in each x transect +pov.ny.patch <<- 25 # Number of sub-plots in each y transect +pov.nxy.patch <<- pov.nx.patch * pov.ny.patch +pov.total.area <<- pov.nxy.patch * pov.patch.xmax * pov.patch.ymax +pov.x0 <<- rep( x = -200 + seq(from=0,to=pov.nx.patch-1) * pov.patch.xmax + , times = pov.ny.patch + )#end rep +pov.y0 <<- rep( x = -200 + seq(from=0,to=pov.ny.patch-1) * pov.patch.ymax + , each = pov.nx.patch + )#end rep +#------------------------------------------------------------------------------------------# + + + + +#==========================================================================================# +#==========================================================================================# +# Census-related thresholds. If the script has different values, ignore these and # +# use whatever the main script says. # +#------------------------------------------------------------------------------------------# +#----- Minimum height to be considered for "ground-based observations". -------------------# +if ( "census.height.min" %in% ls()){ + census.height.min <<- census.height.min +}else{ + census.height.min <<- 1.5 +}#end if +#----- Minimum DBH to be considered for "ground-based observations". ----------------------# +if ( "census.dbh.min" %in% ls()){ + census.dbh.min <<- census.dbh.min +}else{ + census.dbh.min <<- 10. +}#end if +#------------------------------------------------------------------------------------------# + + +#==========================================================================================# +#==========================================================================================# +# Define which DBH classes to use based on the DBH flag. # +#------------------------------------------------------------------------------------------# +if ("idbh.type" %in% ls()){ + idbh.type <<- idbh.type +}else{ + idbh.type <<- 1 +}#end if +if (idbh.type == 1){ + ndbh <<- 11 + ddbh <<- 10 + classdbh <<- seq(from=0,to=(ndbh-1)*ddbh,by=ddbh) + breakdbh <<- c(-Inf,classdbh[-1],Inf) + dbhkeys <<- paste(classdbh,"-",c(classdbh[-1],Inf),sep="") + dbhnames <<- c(paste("> ",sprintf("%.1f",classdbh),"cm",sep=""),"Total") + dbhcols <<- c( "purple3", "mediumpurple1", "royalblue4" + , "steelblue3", "deepskyblue", "#004E00" + , "chartreuse3", "olivedrab3", "lightgoldenrod3" + , "yellow3", "darkorange1", "firebrick" + , all.colour + )#end c + +}else if (idbh.type == 2){ + ndbh <<- 6 + classdbh <<- c(0,10,20,35,50,70) + breakdbh <<- c(-Inf,classdbh[-1],Inf) + dbhkeys <<- paste(classdbh,"-",c(classdbh[-1],Inf),sep="") + dbhnames <<- c(paste("> ",sprintf("%.1f",classdbh),"cm",sep=""),"Total") + dbhcols <<- c( "purple3", "royalblue3", "chartreuse3" + , "yellow3", "darkorange1", "firebrick" + , all.colour + )#end c +}else if (idbh.type == 3){ + ndbh <<- 4 + classdbh <<- c(0,10,35,55) + breakdbh <<- c(-Inf,classdbh[-1],Inf) + dbhkeys <<- paste(classdbh,"-",c(classdbh[-1],Inf),sep="") + dbhnames <<- c(paste("> ",sprintf("%.1f",classdbh),"cm",sep=""),"Total") + dbhcols <<- c( "royalblue3", "chartreuse3" + , "yellow3", "darkorange1", all.colour + )#end c +}else{ + cat(" In globdims.r:","\n") + cat(" IDBH.TYPE = ",idbh.type,"\n") + stop(" Invalid IDBH.TYPE, it must be either 1, 2, or 3 (feel free to add more options.") +}#end if +#==========================================================================================# +#==========================================================================================# + + + + + +#==========================================================================================# +#==========================================================================================# +# Define default weighting factor for carbon balance. # +#------------------------------------------------------------------------------------------# +if ("klight" %in% ls()){ + klight <<- klight +}else{ + klight <<- 0.8 +}#end if +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/gridp.r b/R-utils/gridp.r new file mode 100644 index 000000000..5e9e01ae6 --- /dev/null +++ b/R-utils/gridp.r @@ -0,0 +1,23 @@ +#------------------------------------------------------------------------------------------# +# Function gridp # +# Developed by Marcos Longo - EPS/Harvard University # +# March 28, 2007 +# # +# This function determine the grid levels of each coordinate. # +#------------------------------------------------------------------------------------------# +gridp <- function(ctla,ctlb){ + ngrid <- as.numeric(ctla[2]) + how <- tolower(ctla[3]) + nstr <- length(ctla) + if(how == "linear"){ + grid0 <- as.numeric(ctla[4]) + dgrid <- as.numeric(ctla[5]) + gridp <- grid0+(1:ngrid-1)*dgrid + }else if(nstr == ngrid+3){ + gridp <- as.numeric(ctla[1:ngrid+3]) + }else{ + gridp <- as.numeric(c(ctla[4:nstr],ctlb[1:(ngrid-nstr+3)])) + } #end if(how == "linear") + return(gridp) +} #end function gridp +#------------------------------------------------------------------------------------------# diff --git a/R-utils/gridt.r b/R-utils/gridt.r new file mode 100644 index 000000000..a85575bb4 --- /dev/null +++ b/R-utils/gridt.r @@ -0,0 +1,52 @@ +#------------------------------------------------------------------------------------------# +# Function gridt # +# Developed by Marcos Longo - EPS/Harvard University # +# # +# This function determine the times available. # +#------------------------------------------------------------------------------------------# +gridt = function(ntimes,time0,dtime,century=2000){ +#----- Finding position of each part ------------------------------------------------------# + time0 = tolower(time0) + colon = regexpr(":",time0)[1] + zed = max(regexpr("z",time0)[1]) + mmms = c("jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec") + utc = regexpr("z",time0)[1] + size = nchar(time0) + + mloc = max(apply(as.matrix(mmms),1,'regexpr',text=time0)) + if (colon > 0){nn = as.numeric(substr(time0,colon+1,colon+2))}else{nn=0} + if (zed > 0) {hh = as.numeric(substr(time0,1,2)) }else{hh=0} + dd = as.numeric(substr(time0,utc+1,mloc-1)) + mm = match(substr(time0,mloc,mloc+2),mmms) + yy = as.numeric(substr(time0,mloc+3,size)) + if (yy < 100) {yyyy = yy+century}else{yyyy = yy} + t0 = chron(paste(mm,dd,yyyy,sep="/"),paste(hh,nn,0,sep=":")) + + dtime = tolower(dtime) + size = nchar(dtime) + units = substr(dtime,size-1,size) + amount = as.numeric(substr(dtime,1,size-2)) + if (units == "mn"){ + dtime = as.double(amount)/as.double(1440) + gridt= t0+(1:ntimes-1)*dtime + }else if(units == "hr"){ + dtime = as.double(amount)/as.double(24) + gridt= t0+(1:ntimes-1)*dtime + }else if (units == "dy"){ + dtime = as.double(amount) + gridt= t0+(1:ntimes-1)*dtime + }else if (units == "mo"){ + mms = mm + amount * seq(from=0,to=ntimes-1,by=1) + dy = floor((mms-1)/12) + yrs = yy + dy + mms = 1 + ((mms-1) %% 12) + gridt = chron(paste(mms,dd,yrs,sep="/"),paste(hh,nn,00,sep=":")) + }else if (units == "yr"){ + yrs = yy + amount * seq(from=0,to=ntimes-1,by=1) + gridt = chron(paste(mm,dd,yrs,sep="/"),paste(hh,nn,00,sep=":")) + }else{ + stop(paste("CTL doesn't have valid time units! (Found ",units,")",sep="")) + }#end if + return(gridt) +} #end function gridt +#------------------------------------------------------------------------------------------# diff --git a/R-utils/harmfill.r b/R-utils/harmfill.r new file mode 100644 index 000000000..f962a875e --- /dev/null +++ b/R-utils/harmfill.r @@ -0,0 +1,597 @@ +#==========================================================================================# +#==========================================================================================# +# This function fills all gaps in a time series, by using an iterative Fourier # +# analysis of the time series. Keep in mind that geophysical time series have random # +# noise that are captured by the Fourier transform as weak waves, and those waves can make # +# very bad things in the middle of the gap if the gap is long. # +# # +# Input Variables # +# --------------- # +# # +# x: # +# The time series to be filled. # +# # +# detrend.method: # +# Which technique to use to detrend the time series before applying the Fourier trans- # +# form. Valid values are (case insensitive and the first few letters will do): # +# - "mean" : don't detrend the time series, just subtract the mean # +# - "linear" : (default) use a simple linear detrending # +# - "loess" : use a polynomial surface using local fitting # +# # +# trend.back (optional): # +# Should the routine add back the trend? (TRUE or FALSE). Default is TRUE. # +# # +# min.signal (optional): # +# The minimum accumulated spectrum to retain (the count goes from most powerful to # +# least powerful). It must be between 0 and signal.retain (see below). # +# # +# signal.retain (optional): # +# The total accumulated spectrum to retain (the count goes from most powerful to least # +# powerful). It must be between 0 and 1, and at least one mode will always be used. # +# # +# conv.threshold: # +# Tolerance for change in the response for each sub-step, beyond which we move to the # +# next mode. # +# # +# minmod: # +# The minimum number of modes to use. This avoids using too few modes when the strong- # +# est modes are too powerful. # +# # +# maxmod: # +# The maximum number of modes to use. This allows using all sought modes when the # +# spectrum is well-defined, and lower power in case the time series is too noisy. # +# # +# maxin: # +# Maximum number of inner iterations before giving up convergence and moving on. # +# # +# verbose: # +# Prints more information, which may be useful if you want to debug or just curious. # +# # +# rmse: # +# Flag that tells whether to estimate the root mean square error (TRUE | FALSE). If # +# true, a jackknife method will be run, otherwise a NA will be returned for error. # +# # +# del.frac: # +# In case jackknife is to be run, this tells the fraction of valid data to be removed # +# each realisation. # +# # +# n.jack: # +# Maximum number of iterations for the jackknife method. # +# # +# Output Variables # +# ----------------- # +# # +# The output is a list containing the following variables: # +# # +# xfill: # +# vector with the same length as y with the original time series where data were # +# available, and the gap filled value for the time series. # +# # +# error: # +# Estimate of the root mean square error. If input rmse is FALSE, this will be a NA. # +# # +#------------------------------------------------------------------------------------------# +harmfill <<- function(x,detrend.method="linear",trend.back=TRUE,min.signal=0.00 + ,signal.retain=0.80,conv.threshold=0.0001,minmod=1,maxmod=Inf + ,verbose=0,maxin=50,rmse=FALSE,del.frac=1/3,n.jack=100 + ,jack.toler=0.01){ + + #---------------------------------------------------------------------------------------# + # Harmfill requires two packages now: RSEIS and zoo. Make sure that you have both # + # of them installed and loaded. # + #---------------------------------------------------------------------------------------# + zoo.check = "package:zoo" %in% search() + RSEIS.check = "package:RSEIS" %in% search() | detrend.method != "linear" + if ( (! zoo.check) | (! RSEIS.check) ){ + cat (" ---> ZOO: ",zoo.check ,"\n") + cat (" ---> RSEIS: ",RSEIS.check,"\n") + stop(" Harmfill requires ZOO and RSEIS!!!") + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Copy the time series to a safe place, and never point to x again unless there is # + # no need for gap filling. # + #---------------------------------------------------------------------------------------# + x.act = x + nx.act = length(x.act) + miss.act = is.na(x.act) + nx.inf = sum(is.infinite(x.act),na.rm=TRUE) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Stop if there is any infinity... # + #---------------------------------------------------------------------------------------# + if (nx.inf != 0){ + cat (" ---> Matt, there are infinite numbers in your time series, fix it!!!","\n") + cat (" ---> Number of points: ",nx.act,"\n") + cat (" ---> Number of points that are infinity: ",nx.inf,"\n") + stop(" Time series must contain only finite numbers and NAs") + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Double the size of the time series by adding the second half before and the first # + # half after the time series. Harmonic filling doesn't work very well at the beginning # + # and end of the time series, so we buffer the period. # + #---------------------------------------------------------------------------------------# + n.brk = floor(nx.act / 2) + before = sequence(n.brk) + after = seq(from=n.brk+1,to=nx.act,by=1) + rxa = length(after) + 1 + rxz = rxa + nx.act - 1 + x.ext = c(x.act[after],x.act,x.act[before]) + miss.ext = is.na(x.ext) + nx.ext = length(x.ext) + #---------------------------------------------------------------------------------------# + + + #----- Find the time series size and the Nyquist frequency. ----------------------------# + nnyq = 1 + ceiling((nx.ext-1)/2) + #---------------------------------------------------------------------------------------# + + + #----- Find the indices to use in the FFT. ---------------------------------------------# + fuse = sequence(nnyq) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Check and count the number of missing data. If the time series is full, we don't # + # need to do anything. # + #---------------------------------------------------------------------------------------# + okdata = is.finite(x.ext) + nodata = ! is.finite(x.ext) + nok = sum(okdata) + nmiss = sum(nodata) + if (nmiss == 0){ + if (verbose > 0) cat (" * Time series is complete, no need to gap fill... \n") + ans = list(xfit=x.act,error=rep(0,times=nx.act)) + return(ans) + }#end if + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Fill in the gaps with something so it doesn't go completely off during the # + # de-trending. To avoid spurious trends, we keep only the true period. # + #---------------------------------------------------------------------------------------# + x.trend = na.fill(na.approx(x.ext,na.rm=FALSE),fill="extend") + x.trend = x.trend[rxa:rxz] + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # De-trend the time series. Notice that even though we # + #---------------------------------------------------------------------------------------# + if (verbose > 0) cat (" * Detrending time series... \n") + + detmet = substring(tolower(detrend.method),1,2) + if (detmet == "li"){ + #----- Linear trend. ----------------------------------------------------------------# + x0 = detrend2(x.trend)$y0 + #------------------------------------------------------------------------------------# + + #----- Make x0 the same size as x.ext -----------------------------------------------# + x0 = c(x0[after],x0,x0[before]) + #------------------------------------------------------------------------------------# + }else if(detmet == "lo"){ + #----- When is just a dimensionless time. -------------------------------------------# + when = sequence(nx.act) + #------------------------------------------------------------------------------------# + + #----- Local fitting. ---------------------------------------------------------------# + guess = loess(formula= x ~ when, data=data.frame(when=when,x=x.trend) + ,na.action="na.omit") + x0 = predict(object=guess,when) + #------------------------------------------------------------------------------------# + + #----- Make x0 the same size as x.ext -----------------------------------------------# + x0 = c(x0[after],x0,x0[before]) + #------------------------------------------------------------------------------------# + }else if (detmet == "me"){ + #----- No trend, subtract the mean and that's enough. -------------------------------# + x0 = rep(mean(x.act,na.rm=TRUE),times=nx.ext) + #------------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------------# + + + + #----- Find the deviation from the detrended time series. ------------------------------# + xprime = x.ext - x0 + xpbar = mean(xprime,na.rm=TRUE) + #---------------------------------------------------------------------------------------# + + + #----- Initial conditions. Assume no wave present in missing data. --------------------# + xnext = xprime + xnext[nodata] = 0. + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Find the first Fourier transform, and determine which modes to use. # + #---------------------------------------------------------------------------------------# + xfftall = fft(xnext) + xfft = xfftall[fuse] + pow = abs(xfft)^2 + npow = order(pow,decreasing=TRUE) + cumpow = cumsum(pow[npow])/sum(pow) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Noutit is the number of "outer" iteractions needed to capture the meaningful # + # power. # + #---------------------------------------------------------------------------------------# + noutit = max(minmod,max(sum(cumpow <= min.signal) + ,min(nok-minmod,sum(cumpow <= signal.retain),maxmod))) + powuse = npow[1:noutit] + if (verbose > 0){ + cat(" * Using ",noutit," modes out of ",nnyq,"... \n") + cat(" ( Retained signal = ",sprintf("%.2f",cumpow[noutit]*100),"%...) \n") + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the list of iterations to print. # + #---------------------------------------------------------------------------------------# + print.iter = unique(sort(c(1,pretty(sequence(noutit),n=10),noutit))) + print.iter = print.iter[print.iter %in% sequence(noutit)] + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Loop over the outer iterations. # + #---------------------------------------------------------------------------------------# + if (verbose > 0) cat (" * Starting the outer loop... \n") + for (outit in 1:noutit){ + + if (verbose > 0 & outit %in% print.iter){ + cat(" # Outer iteration: ",outit + ,". Signal = ",sprintf("%.3f",cumpow[outit]*100),"... \n") + }#end if + #----- Reset the values for the inner iterations. -----------------------------------# + initerate = TRUE + #errest1st = NULL + #errestbest = NULL + r2best = 0 + r2prev = 0 + init = 0 + + + #------------------------------------------------------------------------------------# + # Conditional loop over the outer iterations. # + #------------------------------------------------------------------------------------# + while(initerate){ + init = init + 1 + + #----- Update guess. -------------------------------------------------------------# + xnow = xnext + #---------------------------------------------------------------------------------# + + + + #----- Find the Fast Fourier analysis for this guess. ----------------------------# + xfftall = fft(xnow) + xfft = xfftall[fuse] + #---------------------------------------------------------------------------------# + + + #----- Keep only the powers that we should use. ----------------------------------# + del = - powuse[1:outit] + xfft[del] = 0+0i + #---------------------------------------------------------------------------------# + + + #----- Reconstruct the Fourier transform without the weaker powers. --------------# + if (nx.ext %% 2 == 0){ + dseq = seq(from=2,to=nnyq-1,by=1) + xfft = c(xfft[1] + ,xfft[dseq] + ,xfft[nnyq] + ,rev(Re(xfft[dseq])) + (0-1i)*rev(Im(xfft[dseq])) ) + }else{ + dseq = seq(from=2,to=nnyq,by=1) + xfft = c(xfft[1] + ,xfft[dseq] + ,rev(Re(xfft[dseq])) + (0-1i)*rev(Im(xfft[dseq])) ) + }#end if + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # Find the guess by finding the inverse FFT without the trailing components. # + #---------------------------------------------------------------------------------# + xfill = Re(fft(xfft,inverse=TRUE)/nx.ext) + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # Find the potential next guess, which is the actual time series, with the # + # missing values replaced by the guess. # + #---------------------------------------------------------------------------------# + xtry = xprime + xtry[nodata] = xfill[nodata] + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Simple error guess, this will tell whether the model is approaching a # + # place. Although this may mean slow convergence, we assume that this is because # + # the result is close to the best guess. # + #---------------------------------------------------------------------------------# + r2 = ( 1. - ((nok - 1 ) * sum((xprime[okdata] - xfill[okdata])^2)) + / ((nok - outit - 1) * sum((xprime[okdata] - xpbar )^2)) ) + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Decide whether to accept or reject the step. We iterate in the inner loop # + # only if guesses are getting better by a significant amount. # + #---------------------------------------------------------------------------------# + gain = 2.0 * (r2 - r2prev) / (r2 + r2prev) + r2prev = r2 + initerate = init < maxin && gain > conv.threshold + xnext = xtry + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # Print information if needed. # + #---------------------------------------------------------------------------------# + if (verbose > 1){ + cat(" > Inner iteration: ",init + ,"; R2 = ",signif(r2,5),"; Gain = ",signif(gain,5),"...","\n") + }#end if + #---------------------------------------------------------------------------------# + }#end while (initerate) + #------------------------------------------------------------------------------------# + }#end for outit in 1:noutit + #---------------------------------------------------------------------------------------# + + + #----- Add back the trend, and chop the time series back to the original size. ---------# + if (trend.back){ + xfit = x0[rxa:rxz] + xnext[rxa:rxz] + }else{ + xfit = xnext[rxa:rxz] + }#end if + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # This part is the error estimate. # + #---------------------------------------------------------------------------------------# + if (rmse){ + if (verbose > 0) cat(" * Estimating RMSE...","\n") + #------------------------------------------------------------------------------------# + # Because this doesn't use any other data (either from other stations or other # + # variables), we must estimate the error using a Jackknife approach. Each iteration # + # will delete a fraction of valid data and run the harmonic analysis, and the root # + # mean square error between the predicted value and the actual value will be the # + # error of this realisation. We run this n.jack times so the error estimate is more # + # robust. # + #------------------------------------------------------------------------------------# + nj = 0 + err.jack = 0 + #----- List indices with available data. --------------------------------------------# + idx.avail = which(! miss.act) + navail = length(idx.avail) + iterate = TRUE + while (iterate){ + nj = nj + 1 + + #----- Copy the time series to a scratch vector. ---------------------------------# + ndel = floor(del.frac * navail) + del = sample(x=idx.avail,size=ndel,replace=FALSE) + jackknife = x.act + jackknife[del] = NA + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # Find the gap-filled time series. This call is slightly modified so we # + # preserve some of the properties of the original fitting. We impose the number # + # of outer iterations to be exactly the same as the result with the full time # + # series. Also, we must call the function forcing the error estimate to be # + # FALSE, otherwise we will enter in an infinite loop. For the error we must also # + # add the trend back because we compare the results with the original dataset. # + #---------------------------------------------------------------------------------# + realisation = harmfill( x = jackknife + , detrend.method = detrend.method + , trend.back = TRUE + , signal.retain = 1.00 + , minmod = noutit + , maxmod = noutit + , verbose = 0 + , rmse = FALSE + , del.frac = del.frac + , n.jack = n.jack ) + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Find the mean square error of this realisation. # + #---------------------------------------------------------------------------------# + err.jack.now = sqrt( sum((x.act[del] - realisation$xfit[del])^2) + / (ndel - 2*noutit) ) + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Find the new estimate of the error. # + #---------------------------------------------------------------------------------# + err.jack.next = (err.jack * (nj-1) + err.jack.now) / nj + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Find the new estimate of the error. # + #---------------------------------------------------------------------------------# + gain = 2.0 * abs(err.jack.next - err.jack) / abs(err.jack.next + err.jack) + iterate = gain > jack.toler + err.jack = err.jack.next + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # Print a banner with the information on how the method is going. # + #---------------------------------------------------------------------------------# + if (verbose > 0){ + cat (" # Iteration: ",nj,"; RMSE = ",signif(err.jack,4) + ,"; GAIN = ",sprintf("%4.4f",gain),"; CONVERGE = ",! iterate,"\n") + }#end if + #---------------------------------------------------------------------------------# + }#end for + #------------------------------------------------------------------------------------# + }else{ + #------------------------------------------------------------------------------------# + # Skip the error estimate and leave it missing. # + #------------------------------------------------------------------------------------# + err.jack = NA + #------------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Make the vector with the error estimate. The error is 0 for full points, and the # + # estimate for the gap-filled points. # + #---------------------------------------------------------------------------------------# + error = rep(0,times=nx.act) + error[miss.act] = err.jack + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Make the list with the output then quit. # + #---------------------------------------------------------------------------------------# + ans = list(xfit=xfit,error=error) + return(ans) + #---------------------------------------------------------------------------------------# + +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + +#==========================================================================================# +#==========================================================================================# +# This function detrends a time series by applying a linear regression. In case there # +# are missing data, it fills in with a linear interpolation before detrending, to make # +# sure the data is detrended properly (i.e., the gaps contains some linear interpolation). # +#------------------------------------------------------------------------------------------# +detrend2 <<- function(y){ + #----- Fill gap with linear interpolation. ---------------------------------------------# + yfill = gaplin(y) + yprime = detrend(yfill) + y0 = yfill - yprime + sel = !is.finite(y) + yprime[sel] = NA + ans = list(y0=y0,yprime=yprime,yfill=yfill) + return(ans) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + +#==========================================================================================# +#==========================================================================================# +# This function completes the gaps with a linear interpolation between the previous # +# and the next available points. # +#------------------------------------------------------------------------------------------# +gaplin <<- function(x){ + gap = ! is.finite(x) + nx = length(x) + if (sum(gap) > 0){ + ind = which(gap) + ans = sapply(X=ind,FUN=lin.filler,dat=x) + xout = x + xout[gap] = ans + }else{ + xout = x + }#end if + return(xout) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# Auxiliary function that will fill in the gap by looking at the previous and future # +# available data by applying a linear interpolation between the previous and next avail- # +# able data. # +#------------------------------------------------------------------------------------------# +lin.filler <<- function(gapind,dat){ + if (is.finite(dat[gapind])){ + #----- No need to fill gaps, data is available. -------------------------------------# + interp = dat[gapind] + }else{ + #------------------------------------------------------------------------------------# + # Interpolate. # + #------------------------------------------------------------------------------------# + ndat = length(dat) + + #----- Split the time series into before and after gapind. --------------------------# + prevdat = dat[1:gapind] + prevok = which(is.finite(prevdat)) + nextdat = dat[gapind:ndat] + nextok = (gapind - 1) + which(is.finite(nextdat)) + + #----- Size of the split time series. -----------------------------------------------# + nprev = length(prevok) + nnext = length(nextok) + + #------------------------------------------------------------------------------------# + # Check whether we have points on both sides (interpolation) or only on one side # + # (extrapolation). # + #------------------------------------------------------------------------------------# + if (nprev + nnext <= 1){ + stop("Time series has either 0 or 1 valid point! No interpolation possible!") + }else if(nprev == 0){ + inda = nextok[1] + indz = nextok[2] + }else if(nnext == 0){ + inda = prevok[nprev-1] + indz = prevok[nprev] + }else{ + inda = prevok[nprev] + indz = nextok[1] + }#end if + + interp = dat[inda] + (gapind - inda) * (dat[indz]-dat[inda]) / (indz - inda) + }#end if + + return(interp) +}#end function +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/igbp.map.r b/R-utils/igbp.map.r new file mode 100644 index 000000000..f70f96bd5 --- /dev/null +++ b/R-utils/igbp.map.r @@ -0,0 +1,122 @@ +#==========================================================================================# +#==========================================================================================# +# Function colourmap # +# # +# Given the x and y coordinates, this function will plot the vegetation values (IGBP) # +# with a colour scheme but no interpolation... # +#------------------------------------------------------------------------------------------# +igbp.map = function(x = seq(from=0,to=1,len=length(v)) + ,y = seq(from=0,to=1,len=length(v)) + ,z + ,xlim = range(x,finite=TRUE) + ,ylim = range(y,finite=TRUE) + ,zlim = range(v,finite=TRUE) + ,na.col="gray94",plot.title,plot.axes + ,asp=NA,xaxs="i",yaxs="i",las=1,axes=TRUE,frame.plot=axes,pch=15 + ,cex=1.0,...){ + + + igbp.col = c("midnightblue","steelblue4","#004E00","slategray3","green3" + ,"forestgreen","lightgoldenrod4","goldenrod","chartreuse3","yellowgreen" + ,"gold","turquoise4","mediumpurple1","gray29","yellow3","powderblue" + ,"firebrick","gray46") + igbp.leg = c("H2O","ENF","EBF","DNF","DBF","MXF","CSH","OSH","WSV","SAV","GSL","PWL" + ,"CRL","URB","CVM","ICE","DES","MSS") + igbp.val = c(0:17) + + z[z %in% c(254,255)] = 17 + z[is.na(z)] = 17 + + + #----- Check which kind of input was given. --------------------------------------------# + if (missing(z)) { + #----- No z was given x must be a list or the user didn't provide any axis... -------# + if (!missing(x)) { + if (is.list(x)) { + #----- X is a list, copy the elements to variables. ---------------------------# + z = x$z + y = x$y + x = x$x + }else{ + #----- x is an array, make up some x axis. ------------------------------------# + z = x + x = seq(0, 1, len = length(z)) + }#end if + }else{ + #----- Bad setting. -------------------------------------------------------------# + stop("no `z' variable specified") + }#end if + }else if (is.list(x)) { + #----- Z is there, just need to check whether x and y were given as a list... ------# + y = x$y + x = x$x + }#end if + + #----- Save the margins to avoid losing the data. --------------------------------------# + mar.orig = (par.orig = par(c("mar", "las", "mfrow")))$mar + on.exit(par(par.orig)) + + #----- Split the screen into 2. --------------------------------------------------------# + w = (3 + mar.orig[2]) * par("csi") * 2.54 + layout(matrix(c(2, 1), nc = 2), widths = c(1, lcm(w))) + par(las = las) + mar = mar.orig + mar[4] = mar[2] + mar[2] = 1 + + #----- First plot: the key scale. ------------------------------------------------------# + par(mar = mar) + plot.new() + #----- Decide whether the scale is logarithmic or not. ---------------------------------# + plot.window(xlim=c(0,1),ylim=c(-0.5,17.5),xaxs="i",yaxs="i") + + #----- Draw the colour bar. ------------------------------------------------------------# + rect(xleft=0,ybottom=seq(-0.5,16.5,1),xright=1,ytop=seq(0.5,17.5,1),col=igbp.col + ,border="black") + + #----- Check whether there are specific instructions for plotting the key axis. --------# + if (axes){ + axis(side=4,at=igbp.val,labels=igbp.leg) + }#end if + + #----- Draw box. -----------------------------------------------------------------------# + box() + + #----- Now we plot the filled contour. -------------------------------------------------# + mar = mar.orig + mar[4] = 1 + par(mar = mar) + plot.new() + plot.window(xlim=xlim,ylim=ylim,log="", xaxs = xaxs, yaxs = yaxs, asp = asp) + + #---------------------------------------------------------------------------------------# + # Split z into the breaks defined by the colour palette. # + #---------------------------------------------------------------------------------------# + zcol = igbp.col[match(z,igbp.val)] + zcol[is.na(zcol)] = na.col + + #----- Call the function that actually plots the data. ---------------------------------# + points(x=x,y=y,pch=pch,cex=cex,col=zcol,...) + + #----- Check whether there are especial instructions for plotting the axes. ------------# + if (missing(plot.axes)) { + if (axes) { + axis(1) + axis(2) + } + }else{ + plot.axes + }#end if + + if (frame.plot) box() + #----- Check whether there are especial instructions for plotting the title. -----------# + if (missing(plot.title)){ + if (axes) title(main = "", xlab = "", ylab = "",...) + }else{ + plot.title + }#end if + + invisible() +}#end function igbp.map +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/image.map.r b/R-utils/image.map.r new file mode 100644 index 000000000..d8553eea3 --- /dev/null +++ b/R-utils/image.map.r @@ -0,0 +1,351 @@ +#==========================================================================================# +#==========================================================================================# +# This function plots a graph as a function of 3 parameters, with the colour scheme # +# given. # +#------------------------------------------------------------------------------------------# +image.map <<- function( x + , y + , z + , dx = ifelse( is.list(x) + , lapply(lapply(x,diff),median,na.rm=TRUE) + , median(diff(x),na.rm=TRUE) + )#end ifelse + , dy = ifelse( is.list(y) + , lapply(lapply(y,diff),median,na.rm=TRUE) + , median(diff(y),na.rm=TRUE) + )#end ifelse + , xlim = range(unlist(x),finite=TRUE) + , ylim = range(unlist(y),finite=TRUE) + , zlim = range(unlist(z),finite=TRUE) + , levels = if (key.log){ + pretty.log(x=zlim,n=nlevels) + }else{ + pretty(x=zlim,n=nlevels) + }#end if + , nlevels = 20 + , colour.palette = cm.colors + , col = colour.palette(length(levels)-1) + , na.col = "grey94" + , key.log = FALSE + , key.vertical = TRUE + , x.axis.options = NULL + , y.axis.options = NULL + , key.axis.options = NULL + , key.options = NULL + , sub.options = NULL + , main.title = NULL + , main.xlab = NULL + , main.ylab = NULL + , key.title = NULL + , plot.after = NULL + , ... + ){ + + #---------------------------------------------------------------------------------------# + # Find out whether x, y, r, g, and b are single values or lists. # + #---------------------------------------------------------------------------------------# + if (missing(x) || missing(y) || missing(z)){ + cat(" - x is missing: ",missing(x),"\n") + cat(" - y is missing: ",missing(y),"\n") + cat(" - z is missing: ",missing(z),"\n") + stop(" x, y, and z must be given") + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Check whether x, y, and z are the same type of data. # + #---------------------------------------------------------------------------------------# + same.kind = (is.list(x) == is.list(y) && is.list(x) == is.list(y)) + if (! same.kind){ + cat(" X is list: ",is.list(x),"\n") + cat(" Y is list: ",is.list(y),"\n") + cat(" Z is list: ",is.list(z),"\n") + stop ("X, Y, and Z must be of the same kind...") + }else if (!is.list(x)){ + #----- Convert x, y, and z to lists. ------------------------------------------------# + x = list(x ) + y = list(y ) + z = list(z ) + dx = list(dx) + dy = list(dy) + if (! missing(x.axis.options)) x.axis.options = list(x.axis.options) + if (! missing(y.axis.options)) y.axis.options = list(y.axis.options) + if (! missing(sub.options )) sub.options = list(sub.options ) + npanels = 1 + }else{ + npanels = length(x) + }#end if + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # x and y should be axes for r, g, and b. Check whether they are or not. # + #---------------------------------------------------------------------------------------# + nx = sapply(X = x, FUN = length) + ny = sapply(X = y, FUN = length) + nz = sapply(X = z, FUN = length) + if ( any(nz != nx) || any(nz != ny)){ + cat(" - length(x): ",paste(nx,sep=" "),"\n") + cat(" - length(y): ",paste(ny,sep=" "),"\n") + cat(" - length(z): ",paste(nz,sep=" "),"\n") + stop(" x, y, and z must have the same length") + }#end if + #---------------------------------------------------------------------------------------# + + + #----- Save the margins to avoid losing the data. --------------------------------------# + par.orig = par(no.readonly=TRUE) + mar.orig = par.orig$mar + on.exit(par(par.orig)) + #---------------------------------------------------------------------------------------# + + + + #----- Split the screen into 3, the two panels and the scale. --------------------------# + if (npanels == 1){ + w = (3 + mar.orig[2]) * par("csi") * 2.54 + layout(matrix(c(2, 1), nc = 2), widths = c(1, lcm(w))) + mar = mar.orig + mar[4] = mar[2] + mar[2] = 1 + key.vertical = TRUE + }else{ + h = (1 + mar.orig[3]) * par("csi") * 2.54 + layout( mat =rbind(seq(from=2,to=npanels+1),rep(1,times=npanels)) + , heights = c(1, lcm(h)) + )#end layout + mar = mar.orig + mar[1] = 2.6 + mar[3] = 2.1 + key.vertical = FALSE + }#end if + #---------------------------------------------------------------------------------------# + #=======================================================================================# + #=======================================================================================# + + + + + + #=======================================================================================# + #=======================================================================================# + # First plot: the key scale. # + #---------------------------------------------------------------------------------------# + par(mar = mar) + plot.new() + #------------------------------------------------------------------------------------# + # Plot in the horizontal or vertical depending on where the scale is going to # + # be plotted. # + #------------------------------------------------------------------------------------# + if (key.vertical){ + #----- Decide whether the scale is logarithmic or not. ---------------------------# + if (key.log){ + plot.window(xlim=c(0,1),ylim=range(levels),xaxs="i",yaxs="i",log="y") + }else{ + plot.window(xlim=c(0,1),ylim=range(levels),xaxs="i",yaxs="i") + }#end if + #---------------------------------------------------------------------------------# + + #----- Draw the colour bar. ------------------------------------------------------# + rect(xleft=0,ybottom=levels[-length(levels)],xright=1,ytop=levels[-1],col=col + ,border=col) + #---------------------------------------------------------------------------------# + + #----- Check whether there are specific instructions for plotting the key axis. --# + if (missing(key.axis.options)) { + key.now = list(side=4,las=1,...) + }else{ + key.now = modifyList(x=key.axis.options,val=list(side=4,las=1)) + }#end if + do.call (what="axis",args=key.now) + #---------------------------------------------------------------------------------# + }else{ + #----- Decide whether the scale is logarithmic or not. ---------------------------# + if (key.log){ + plot.window(xlim=range(levels),ylim=c(0,1),xaxs="i",yaxs="i",las=1,log="y") + }else{ + plot.window(xlim=range(levels),ylim=c(0,1),xaxs="i",yaxs="i",las=1) + }#end if + #---------------------------------------------------------------------------------# + + + #----- Draw the colour bar. ------------------------------------------------------# + rect(xleft=levels[-length(levels)],ybottom=0,xright=levels[-1],ytop=1 + ,col=col,border=col) + #---------------------------------------------------------------------------------# + + + #----- Check whether there are specific instructions for plotting the key axis. --# + if (missing(key.axis.options)) { + key.now = list(side=1,las=1,...) + }else{ + key.now = modifyList(x=key.axis.options,val=list(side=1,las=1)) + }#end if + do.call (what="axis",args=key.now) + #---------------------------------------------------------------------------------# + }#end if + #------------------------------------------------------------------------------------# + + + #----- Draw box. --------------------------------------------------------------------# + box() + #------------------------------------------------------------------------------------# + + + #----- Plot the title. --------------------------------------------------------------# + if (!missing(key.title)) key.title + #------------------------------------------------------------------------------------# + #=======================================================================================# + #=======================================================================================# + + + + + + #=======================================================================================# + #=======================================================================================# + # Now we plot the other panels. # + #---------------------------------------------------------------------------------------# + for (p in 1:npanels){ + #----- Set the window. --------------------------------------------------------------# + mar = mar.orig + if (! key.vertical) mar[1] = 4.1 + par(mar = mar) + plot.new() + plot.window(xlim=xlim,ylim=ylim,...) + box() + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Split zleft into the breaks defined by the colour palette. # + #------------------------------------------------------------------------------------# + zcut = cut(z[[p]],breaks=levels) + zlev = levels(zcut) + zcol = col[match(zcut,zlev)] + zcol[is.na(zcol)] = na.col + #------------------------------------------------------------------------------------# + + + + #----- Find the corners for the rectangles. -----------------------------------------# + nx = length(x[[p]]) + ny = length(y[[p]]) + xleft = x[[p]] - 0.5 * dx[[p]] + xright = x[[p]] + 0.5 * dx[[p]] + ybottom = y[[p]] - 0.5 * dy[[p]] + ytop = y[[p]] + 0.5 * dy[[p]] + rect(xleft=xleft,ybottom=ybottom,xright=xright,ytop=ytop,col=zcol,border=zcol) + #------------------------------------------------------------------------------------# + + + + + #---- Plot the X axis. --------------------------------------------------------------# + if (! is.null(x.axis.options)){ + x.axis.now = modifyList(x=x.axis.options[[p]],val=list(side=1)) + }else{ + x.axis.now = list(side=1,las=1) + }#end if + do.call(what="axis",args=x.axis.now) + #------------------------------------------------------------------------------------# + + + + + #---- Plot the Y axis. --------------------------------------------------------------# + if (! is.null(y.axis.options)){ + y.axis.now = modifyList(x=y.axis.options[[p]],val=list(side=2)) + }else{ + y.axis.now = list(side=2,las=1) + }#end if + do.call(what="axis",args=y.axis.now) + #------------------------------------------------------------------------------------# + + + + #---- Plot the title. ---------------------------------------------------------------# + if (! is.null(sub.options)){ + do.call(what="title",args=sub.options[[p]]) + }#end if + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Plot other options. # + #------------------------------------------------------------------------------------# + n.after = length(plot.after) + for (a in sequence(n.after)){ + do.call(what=names(plot.after)[a],args=plot.after[[a]]) + }#end for + #------------------------------------------------------------------------------------# + }#end for + #=======================================================================================# + #=======================================================================================# + + + + + + #=======================================================================================# + #=======================================================================================# + # Plot the global title. # + #---------------------------------------------------------------------------------------# + par(las=0) + if (! is.null(main.xlab)){ + #----- Make sure we get the main text. ----------------------------------------------# + if (! is.list(main.xlab)){ + main.xlab=list(text=main.xlab) + }else if (! "text" %in% names(main.xlab)){ + names(main.xlab)[[1]] = "text" + }#end if + #----- Outer must be set to TRUE, overwrite if needed be. ---------------------------# + main.xlab$outer = TRUE + if (! "side" %in% names(main.xlab)) main.xlab$side = 1 + if (! "padj" %in% names(main.xlab)) main.xlab$padj = -4.75 + do.call("mtext",main.xlab) + }#end if + #---------------------------------------------------------------------------------------# + + + + if (! is.null(main.ylab)){ + #----- Make sure we get the main text. ----------------------------------------------# + if (! is.list(main.ylab)){ + main.ylab = list(text = main.ylab) + }else if (! "text" %in% names(main.ylab)){ + names(main.ylab)[[1]] = "text" + }#end if + #----- Outer must be set to TRUE, overwrite if needed be. ---------------------------# + main.ylab$outer = TRUE + if (! "side" %in% names(main.ylab)) main.ylab$side = 2 + if (! "padj" %in% names(main.ylab)) main.ylab$padj = -0.75 + do.call("mtext",main.ylab) + }#end if + if (! is.null(main.title)){ + #----- Make sure we get the main text. ----------------------------------------------# + if (! is.list(main.title)){ + main.title=list(text=main.title) + }else if (! "text" %in% names(main.title)){ + names(main.title)[[1]] = "text" + }#end if + #----- Outer must be set to TRUE, overwrite if needed be. ---------------------------# + main.title$outer = TRUE + if (! "side" %in% names(main.title)) main.xlab$side = 3 + if (! "padj" %in% names(main.title)) main.xlab$padj = 0 + if (! "cex" %in% names(main.title)) main.xlab$cex = 1.1 + if (! "font" %in% names(main.title)) main.xlab$font = 2 + do.call("mtext",main.title) + }#end if + #---------------------------------------------------------------------------------------# + + + + + invisible() +}#end function image.map +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/index.poly.r b/R-utils/index.poly.r new file mode 100644 index 000000000..444e215b4 --- /dev/null +++ b/R-utils/index.poly.r @@ -0,0 +1,101 @@ +#------------------------------------------------------------------------------------------# +# Check whether a number is in a given interval. Input data must contain three # +# 2-column structures, one with the point coordinates (or a matrix with many points), and # +# the other two with the southwestern and north-eastern edges. The result will depend on # +# the input data. If the point is actually a matrix, then the result will be a matrix of # +# Boolean results, with each row corresponding to the point, and each column corresponding # +# to the edge. If the point is just a single point, the result will be a vector with the # +# check. # +#------------------------------------------------------------------------------------------# +index.poly = function(point,swedge,needge){ + + #---------------------------------------------------------------------------------------# + # First thing, we check whether the variables make sense. # + #---------------------------------------------------------------------------------------# + #----- Point. --------------------------------------------------------------------------# + if (is.matrix(point) | is.data.frame(point)){ + numcol = dim(point)[2] + if (numcol != 2) dum=invalid.variable("point") + ptrow = dim(point)[1] + }else if (is.vector(point)){ + numcol = length(point) + if (numcol != 2) dum=invalid.variable("point") + + #----- Make point a matrix. ---------------------------------------------------------# + point = matrix(point,ncol=2,nrow=1) + ptrow = dim(point)[1] + }else{ + dum = invalid.variable("point") + }#end if + #----- SW edge. ------------------------------------------------------------------------# + if (is.matrix(swedge) | is.data.frame(swedge)){ + numcol = dim(swedge)[2] + if (numcol != 2) dum=invalid.variable("swedge") + swrow = dim(swedge)[1] + }else if (is.vector(swedge)){ + numcol = length(swedge) + if (numcol != 2) dum=invalid.variable("swedge") + swedge = matrix(swedge,nrow=1,ncol=2) + swrow = dim(swedge)[1] + }else{ + dum = invalid.variable("swedge") + }#end if + #----- NE edge. ------------------------------------------------------------------------# + if (is.matrix(needge) | is.data.frame(needge)){ + numcol = dim(needge)[2] + if (numcol != 2) dum=invalid.variable("needge") + nerow = dim(needge)[1] + }else if (is.vector(needge)){ + numcol = length(needge) + if (numcol != 2) dum=invalid.variable("needge") + needge = matrix(needge,nrow=1,ncol=2) + nerow = dim(needge)[1] + }else{ + dum = invalid.variable("needge") + }#end if + #----- Now we check whether the SW and NE edges have the same size. --------------------# + if (swrow != nerow) stop ("swedge and needge must have the same number of points.") + + + #---------------------------------------------------------------------------------------# + # If we reached this point, we have valid data. # + #---------------------------------------------------------------------------------------# + matmat = matrix(NA,nrow=ptrow,ncol=nerow) + polyindex = matrix(rep(1:nerow,each=ptrow),nrow=ptrow,ncol=nerow) + + #---- Errr... Here I will need a for loop... I promise this will be the only one :) .---# + for (pp in 1:ptrow){ + matmat[pp,] = point[pp,1] > swedge[,1] & point[pp,1] <= needge[,1] & + point[pp,2] > swedge[,2] & point[pp,2] <= needge[,2] + }#end (for pp in 1:ptrow) + + #---------------------------------------------------------------------------------------# + # Check to how many polygons each point belongs. No point can belong to two points # + # are inside each polygon. Currently no point can belong to more than one polygon, al- # + # though it is fine that each polygon has many points inside it. # + #---------------------------------------------------------------------------------------# + ninsi = apply(X=matmat,MARGIN=1,FUN=sum) + if (any(ninsi) > 1) stop("Your polygons overlap and index.poly doesn't accept that!") + polyindex[! matmat] = NA + isinside = rowSums(polyindex,na.rm=TRUE) + isinside[isinside == 0] = NA + return(isinside) +}#end function index.poly +#------------------------------------------------------------------------------------------# + + + + + + +#------------------------------------------------------------------------------------------# +# This function is called to tell that index.poly had an invalid argument for point... # +#------------------------------------------------------------------------------------------# +invalid.variable = function(varname){ + print(paste("In function index.poly:",varname,"is not a valid variable.",sep=" ")) + print("It must be:") + print(" a. A two-element vector (longitude and latitude)") + print(" b. A two-column matrix or data frame (1st. column lon and 2nd. column lat") + stop (paste("Incorrect variable type for ",varname,"...",sep="")) +}#end function +#------------------------------------------------------------------------------------------# diff --git a/R-utils/infoloc.r b/R-utils/infoloc.r new file mode 100644 index 000000000..866d9a3a9 --- /dev/null +++ b/R-utils/infoloc.r @@ -0,0 +1,60 @@ +infoloc <- function(loctag,here=getwd()){ + loctag = tolower(loctag) + + if (loctag == "rolim"){ + fullname = "Rolim de Moura, RO" + iata = "rmo" + pathin = paste(here,loctag,"input",sep="/") + pathout = paste(here,loctag,"output",sep="/") + plotout = paste(here,loctag,"plots",sep="/") + prefix = paste(pathin,iata,sep="/") + suffix = ".txt" + }else if (loctag == "ourop"){ + fullname = "Ouro Preto d'Oeste, RO" + iata = "fns" + pathin = paste(here,loctag,"input",sep="/") + pathout = paste(here,loctag,"output",sep="/") + plotout = paste(here,loctag,"plots",sep="/") + prefix = paste(pathin,iata,sep="/") + suffix = ".txt" + }else if (loctag == "rebio"){ + fullname = "Rebio Jaru, RO" + iata = "rbj" + pathin = paste(here,loctag,"input",sep="/") + pathout = paste(here,loctag,"output",sep="/") + plotout = paste(here,loctag,"plots",sep="/") + prefix = paste(pathin,iata,sep="/") + suffix = ".txt" + }else if (loctag == "pvelho"){ + fullname = "Porto Velho, RO" + iata = "pvh" + pathin = paste(here,loctag,"input",sep="/") + pathout = paste(here,loctag,"output",sep="/") + plotout = paste(here,loctag,"plots",sep="/") + prefix = paste(pathin,iata,sep="/") + suffix = ".txt" + }else if (loctag == "vilhena"){ + fullname = "Vilhena, RO" + iata = "bvh" + pathin = paste(here,loctag,"input",sep="/") + pathout = paste(here,loctag,"output",sep="/") + plotout = paste(here,loctag,"plots",sep="/") + prefix = paste(pathin,iata,sep="/") + suffix = ".txt" + }else{ + fullname = NA + iata = NA + pathin = NA + pathout = NA + plotout = NA + prefix = NA + suffix = NA + warning(paste("The place",loctag,"is not recognised by infoloc.r, NAs added...")) + }#end if + + + + thisplace = list(fullname=fullname,iata=iata,pathin=pathin,pathout=pathout, + plotout=plotout,prefix=prefix,suffix=suffix) + return(thisplace) +} #end function diff --git a/R-utils/interpol.r b/R-utils/interpol.r new file mode 100644 index 000000000..3ca9a7d6d --- /dev/null +++ b/R-utils/interpol.r @@ -0,0 +1,74 @@ +#------------------------------------------------------------------------------------------# +# This function will perform the vertical interpolation of multi-dimensional arrays # +# that contain the pressure as their "leftmost" dimension. It will use the logarithm of # +# pressure as the linear variable. The result will be an array with the same size for # +# dimensions other than the first, which will become the same size as the number of # +# pressure levels. # +#------------------------------------------------------------------------------------------# +interpol = function(varin,presin,presout,na.out=TRUE,frqval=0.5){ + + if (! (is.array(varin) && is.array(presin))){ + stop("Both varin and presin must be arrays in order to use 'interpol'.") + }#end if + + #----- Find the input variable dimensions and save them. -------------------------------# + dimvarin = dim(varin) # The original variable array/matrix dimensions + dimpresin = dim(presin) # The original pressure array/matrix dimensions + ndims = length(dimvarin) # The original number of dimensions + + npressin = dimvarin[1] # The input number of pressure levels + nother = prod(dimvarin[2:ndims]) # The product of the other dimensions of the output + + npressout = length(presout) # The number of pressure levels of the output + + + #------ Check whether the dimensions match. --------------------------------------------# + if (any (dimvarin != dimpresin)){ + stop ("The dimensions of varin must be the same as the input pressure presin!!!") + }#end if npressin + + #---------------------------------------------------------------------------------------# + # "Collapse" all dimensions into two: pressure and everything else. # + #---------------------------------------------------------------------------------------# + varmat = matrix(varin ,nrow=npressin ,ncol=nother) + presmat = matrix(presin,nrow=npressin ,ncol=nother) + matout = matrix(NA ,nrow=npressout,ncol=nother) + + #---------------------------------------------------------------------------------------# + # Not my favourite method, but I couldn't figure out a way without using a for # + # loop... # + #---------------------------------------------------------------------------------------# + for (o in 1:nother){ + + #----- Find the number of valid levels. ---------------------------------------------# + use = is.finite(presmat[,o]) + + + #------------------------------------------------------------------------------------# + # Here we determine if we have enough levels to interpolate, or if we should # + # simply forget about the interpolation this time and assign NA to the entire # + # column. # + #------------------------------------------------------------------------------------# + if (sum(use) > frqval * npressout){ + out = presout > max(presmat[use,o],na.rm=TRUE) | + presout < min(presmat[use,o],na.rm=TRUE) + answer = aspline(x=log(presmat[,o]),y=varmat[,o],xout=log(presout)) + answer$y[out] = NA + matout[,o] = answer$y + }else{ + matout[,o] = rep(x=NA,times=npressout) + }# end if + }#end for (o in 1:nother) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Now we expand it back to the original size, except for the first dimension, and # + # that's it... # + #---------------------------------------------------------------------------------------# + varout = array(matout,dim=c(npressout,dimvarin[2:ndims])) + + + return(varout) +}# end function +#------------------------------------------------------------------------------------------# diff --git a/R-utils/is.prime.r b/R-utils/is.prime.r new file mode 100644 index 000000000..9f304c497 --- /dev/null +++ b/R-utils/is.prime.r @@ -0,0 +1,22 @@ +#------------------------------------------------------------------------------------------# +# Function is.prime # +# Developed by Marcos Longo - EPS/Harvard # +# # +# This function is among the most stupid I've ever done. It checks whether a number is # +# prime or not. The way it does it? It just checks from a list I found using google. It # +# checks only up to 104729, larger numbers will generate NA # +#------------------------------------------------------------------------------------------# +is.prime <- function(n){ + +if ((n %% 1) > 1.e-6){ + warning("The function is.prime works only for integer numbers.",immediate.=TRUE) + numpri <- NA +}else if (abs(n) > 104729){ + warning("The function is.prime works only for numbers up to 104,729.",immediate.=TRUE) + numpri <- NA +}else{ + numpri <- abs(n) %in% primes() +} #end if (!is.integer(n)) + return(numpri) +} #end function(is.prime) +#------------------------------------------------------------------------------------------# diff --git a/R-utils/lai.compp.r b/R-utils/lai.compp.r new file mode 100644 index 000000000..4536fe7f8 --- /dev/null +++ b/R-utils/lai.compp.r @@ -0,0 +1,94 @@ +#==========================================================================================# +#==========================================================================================# +# This function finds the LAI compensation point for any given PFT and PAR. # +#------------------------------------------------------------------------------------------# +lai.compp = function(partop,parmin,prss,mu,ipft){ + orient = pft$orient.factor [ipft] + clump = pft$clumping.factor[ipft] + + lailow = 1.e-5 + laihigh = 30. + testlow = mylightroot(x=lailow,orient,clump,partop,parmin,prss,mu) + testhigh = mylightroot(x=laihigh,orient,clump,partop,parmin,prss,mu) + while (testlow*testhigh >= 0.){ + lailow = lailow / 5. + testlow = mylightroot(x=lailow,orient,clump,partop,parmin,prss,mu) + }#end while + + lai = uniroot(f=mylightroot,interval=c(lailow,laihigh),orient=orient,clump=clump + ,partop=partop,parmin=parmin,prss=prss,mu=mu,tol=1.e-7)$root + return(lai) +}#end for +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function finds the layer transmittance coefficient of diffuse radiation for a # +# given LAI, clumping factor, and orientation factor. # +#------------------------------------------------------------------------------------------# +comp.tau.diff = function(lai,orient,clump){ + + phi1 = 0.5 - orient * (0.633 + 0.33 * orient) + phi2 = 0.877 - (1 - 2 * phi1) + elai = clump * lai + ediff1 = phi1 * elai + ediff2 = phi2 * elai + ediff12 = ediff1 + ediff2 + + + tau = - exp(-ediff12) * (ediff1^2 * exp(ediff1) * eifun(-ediff1) + (ediff1 - 1)) + return(tau) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function finds the layer transmittance coefficient of diffuse radiation for a # +# given LAI, clumping factor, and orientation factor. # +#------------------------------------------------------------------------------------------# +comp.tau.beam = function(lai,orient,clump,mu){ + + phi1 = 0.5 - orient * (0.633 + 0.33 * orient) + phi2 = 0.877 - (1 - 2 * phi1) + elai = clump * lai + + + tau = exp(- (phi1 + phi2 * mu) * lai / mu) + return(tau) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function is zero when LAI makes the light available after extinction to be # +# exactly the light compensation point. # +#------------------------------------------------------------------------------------------# +mylightroot = function(x,orient,clump,partop,parmin,prss,mu){ + + tau.diff = comp.tau.diff(lai=x,orient=orient,clump=clump) + tau.beam = comp.tau.beam(lai=x,orient=orient,clump=clump,mu=mu) + mypar = par.split(cosz=mu,partop=partop,atm.prss=prss) + + myfun = tau.diff * mypar$diff + tau.beam * mypar$beam - parmin + return(myfun) +}#end if +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/leafcol.r b/R-utils/leafcol.r new file mode 100644 index 000000000..f6a886382 --- /dev/null +++ b/R-utils/leafcol.r @@ -0,0 +1,20 @@ +#------------------------------------------------------------------------------------------# +# Function that creates a nice colour scheme. # +#------------------------------------------------------------------------------------------# +leafcol <- function(n){ + rrr <- c( 55, 237, 194, 60, 42, 18) #---- Red pivots. ------------------------# + ggg <- c( 40, 186, 247, 222, 158, 63) #---- Green pivots. ----------------------# + bbb <- c( 28, 33, 10, 60, 33, 20) #---- Blue pivots. -----------------------# + pivot <- round(seq(from=1,to=n,by=(n-1)/(length(rrr)-1)),digits=0) + + red <- as.integer(spline(x=pivot,y=rrr,n=n)$y) + green <- as.integer(spline(x=pivot,y=ggg,n=n)$y) + blue <- as.integer(spline(x=pivot,y=bbb,n=n)$y) + + red [red > 255] <- 255; red [red < 0] <- 0 + green[green > 255] <- 255; green[green < 0] <- 0 + blue [blue > 255] <- 255; blue [blue < 0] <- 0 + mycolsch <- rgb(r=red,g=green,b=blue,maxColorValue=255) + return(mycolsch) +} +#------------------------------------------------------------------------------------------# diff --git a/R-utils/licorfun.r b/R-utils/licorfun.r new file mode 100644 index 000000000..ac25b7cf9 --- /dev/null +++ b/R-utils/licorfun.r @@ -0,0 +1,363 @@ +#------------------------------------------------------------------------------------------# +# This function finds the assimilation rate parameters for a given plant functional # +# type, meteorological conditions, and limitation. # +#------------------------------------------------------------------------------------------# +assim.params = function(ipft,met,limit){ + aparms=list() + if (limit == "CLOSED"){ + #----- Closed stomata case, or night time. These are the same for C3 and C4. -------# + aparms$rho = 0.0 + aparms$sigma = 0.0 + aparms$xi = 0.0 + aparms$tau = 1.0 + aparms$nu = - met$leaf.resp + #---------------------------------------------------------------------------------------# + # Open stomata case, so now we distinguish between C3 and C4 as their functional # + # forms are different. # + #---------------------------------------------------------------------------------------# + }else if (pft$pathway[ipft] == 3){ + #------------------------------------------------------------------------------------# + # C3 case. Decide whether this is the light- or Rubisco-limited case. # + #------------------------------------------------------------------------------------# + if (limit == "LIGHT"){ + #---- Light-limited case. --------------------------------------------------------# + aparms$rho = met$alpha * met$par + aparms$sigma = -met$alpha * met$par * met$compp + aparms$xi = 1.0 + aparms$tau = 2.0 * met$compp + aparms$nu = - met$leaf.resp + + }else if (limit == "RUBISCO"){ + #----- Rubisco-limited rate of photosynthesis case. -----------------------------# + aparms$rho = met$vm + aparms$sigma = -met$vm * met$compp + aparms$xi = 1.0 + aparms$tau = met$kco2 * (1.0 + met$o2 / met$ko2) + aparms$nu = - met$leaf.resp + + }else if (limit == "CO2"){ + #----- CO2-limited for low CO2 concentration case. -------------------------------# + aparms$rho = 0.0 + aparms$sigma = 0.5 * met$vm + aparms$xi = 0.0 + aparms$tau = 1.0 + aparms$nu = - met$leaf.resp + }#end if limit + #------------------------------------------------------------------------------------# + }else if (pft$pathway[ipft] == 4){ + #------------------------------------------------------------------------------------# + # C4 case. There are three possibilities, the light-limited, the Rubisco- # + # limited, and the CO2-limited cases. # + #------------------------------------------------------------------------------------# + if (limit == "LIGHT"){ + #----- Light-limited case. -------------------------------------------------------# + aparms$rho = 0.0 + aparms$sigma = met$alpha * met$par + aparms$xi = 0.0 + aparms$tau = 1.0 + aparms$nu = - met$leaf.resp + + }else if (limit == "RUBISCO"){ + #----- Rubisco-limited rate of photosynthesis case. ------------------------------# + aparms$rho = 0.0 + aparms$sigma = met$vm + aparms$xi = 0.0 + aparms$tau = 1.0 + aparms$nu = - met$leaf.resp + + }else if (limit == "CO2"){ + #----- CO2-limited for low CO2 concentration case. -------------------------------# + aparms$rho = klowco2 * met$vm + aparms$sigma = 0.0 + aparms$xi = 0.0 + aparms$tau = 1.0 + aparms$nu = - met$leaf.resp + + }#end if limit + #------------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------------# + + + #----- Find the minimum radiation that makes Ao = 0. (light compensation point) --------# + aparms$par.min = ( pft$gamma[ipft] * met$vm * (met$co2 + 2. * met$compp) + / (met$co2 - met$compp) ) / met$alpha + #---------------------------------------------------------------------------------------# + + #------ Find the minimum and the maximum possible Ci. ----------------------------------# + if ( limit == "CLOSED"){ + aparms$cimin = 0. + aparms$cimax = met$co2 + aparms$ok = TRUE + }else{ + aparms$cimin = 0. + aparms$cimax = met$co2 + aparms$ok = met$par > aparms$par.min + }#end if + #---------------------------------------------------------------------------------------# + + return(aparms) +}#end function +#------------------------------------------------------------------------------------------# + + + + +#------------------------------------------------------------------------------------------# +# This function finds the assimilation rate parameters given the parameters and the # +# intercellular CO2. # +#------------------------------------------------------------------------------------------# +assim.rate = function(ci,aparms){ + #------ Find the assimilation rate. ----------------------------------------------------# + ao = (aparms$rho * ci + aparms$sigma) / (aparms$xi * ci + aparms$tau) + aparms$nu + return(ao) + #---------------------------------------------------------------------------------------# +}#end function +#------------------------------------------------------------------------------------------# + + + + +#------------------------------------------------------------------------------------------# +# This function finds the assimilation rate parameters given the parameters and the # +# intercellular CO2. # +#------------------------------------------------------------------------------------------# +stom.cond = function(ao,ci,met){ + #------ Find the assimilation rate. ----------------------------------------------------# + if (ao < 0.){ + gsw = pft$b[ipft] + }else{ + gsw = pft$m[ipft] * ao / ( (met$co2 - met$compp) * met$rterm) + pft$b[ipft] + }#end if + return(gsw) + #---------------------------------------------------------------------------------------# +}#end function +#------------------------------------------------------------------------------------------# + + + + + +#------------------------------------------------------------------------------------------# +# Function whose root gives Ci. # +#------------------------------------------------------------------------------------------# +cifun = function(ci,met,ipft,aparms){ + ao = assim.rate(ci,aparms) + gsw = stom.cond(ao,ci,met) + fun = met$co2 - ao / (gsw.2.gsc * gsw) - ci + return(fun) +}#end function +#------------------------------------------------------------------------------------------# + + + + + +#------------------------------------------------------------------------------------------# +# Function whose root gives Ci. # +#------------------------------------------------------------------------------------------# +cisolver = function(met,ipft,aparms){ + #----- Find some auxiliary variables. --------------------------------------------------# + bbb = gsw.2.gsc * pft$b[ipft] + mu = gsw.2.gsc * pft$m[ipft] / ( (met$co2 - met$compp) * met$rterm) + rho = aparms$rho + sigma = aparms$sigma + xi = aparms$xi + tau = aparms$tau + nu = aparms$nu + cs = met$co2 + + #----- Find the quadratic terms. -------------------------------------------------------# + aquad = mu * rho + mu * nu * xi + bbb * xi + bquad = ( mu * sigma + mu * nu * tau + bbb * tau - mu * rho * cs - mu * nu * xi * cs + - bbb * xi * cs + rho + nu * xi ) + cquad = nu * tau + sigma - mu * sigma * cs - mu * nu * tau * cs - tau * cs * bbb + + + #----- Check whether this is really quadratic or not. ----------------------------------# + if (aquad == 0){ + ci = - cquad / bquad + }else{ + delta = bquad * bquad - 4. * aquad * cquad + if (delta > 0.){ + ci1 = - 0.5 * ( bquad + sqrt(delta)) / aquad + ci2 = - 0.5 * ( bquad - sqrt(delta)) / aquad + ci = max(ci1,ci2) + }else if(delta == 0.){ + ci = - 0.5 * bquad / aquad + }else{ + #----- Delta is negative, crash! -------------------------------------------------# + print(paste("MU =",mu )) + print(paste("BETA =",bbb )) + print(paste("RHO =",rho )) + print(paste("SIGMA =",sigma )) + print(paste("XI =",xi )) + print(paste("TAU =",tau )) + print(paste("NU =",nu )) + print(paste("CS =",cs )) + print(paste("AQUAD =",aquad )) + print(paste("BQUAD =",bquad )) + print(paste("CQUAD =",cquad )) + print(paste("DELTA =",delta )) + stop("Failed finding a reasonable solution") + }#end if + }#end if + return(ci) +}#end function +#------------------------------------------------------------------------------------------# + + + + +#------------------------------------------------------------------------------------------# +# This function finds five parameters, namely: # +# - Vm : the photosynthetic capacity. # +# - leaf.resp : the leaf respiration rate. # +# - compp : the CO2 compensation point excluding respiration # +# - kco2 : Michaelis-Mentel constant for CO2 # +# - ko2 : Michaelis-Mentel constant for O2 # +#------------------------------------------------------------------------------------------# +photo.params = function(met,ipft,iphoto){ + + #---------------------------------------------------------------------------------------# + # Decide which method to apply. Currently we only solve differently if we are # + # using Collatz, otherwise we use the same Vm. # + #---------------------------------------------------------------------------------------# + if (iphoto %in% 0:1){ + #------------------------------------------------------------------------------------# + # Use ED approach. First we copy the parameters that will be used for scratch # + # local variables, then apply the same functional form. # + #------------------------------------------------------------------------------------# + if (iphoto == 0){ + #----- Foley et al. (1996) as is. ------------------------------------------------# + kco2.ref = kco2.ref.ibis + kco2.hor = kco2.hor.ibis + ko2.ref = ko2.ref.ibis + ko2.hor = ko2.hor.ibis + compp.ref = compp.ref.ibis + compp.hor = compp.hor.ibis + + }else if (iphoto == 1){ + #----- Foley et al. (1996) for KCO2 and KO2, find Gamma* like in CLM. ------------# + kco2.ref = kco2.ref.ibis + kco2.hor = kco2.hor.ibis + ko2.ref = ko2.ref.ibis + ko2.hor = ko2.hor.ibis + + compp.ref = kookc * met$o2 * kco2.ref / ko2.ref + compp.hor = kco2.hor - ko2.hor + + }#end if + + lnexplow = pft$vm.decay.e[ipft] * (pft$vm.low.temp[ipft] - met$temp) + tlow.fun = 1.0 + exp(lnexplow) + lnexphigh = pft$vm.decay.e[ipft] * (met$temp - pft$vm.high.temp[ipft]) + thigh.fun = 1.0 + exp(lnexphigh) + vm = ( arrhenius(met$temp,pft$vm0[ipft],pft$vm.hor[ipft]) + / (tlow.fun * thigh.fun) ) + + lnexplow = pft$lr.decay.e[ipft] * (pft$lr.low.temp[ipft] - met$temp) + tlow.fun = 1.0 + exp(lnexplow) + lnexphigh = pft$lr.decay.e[ipft] * (met$temp - pft$lr.high.temp[ipft]) + thigh.fun = 1.0 + exp(lnexphigh) + leaf.resp = ( arrhenius(met$temp,pft$gamma[ipft]*pft$vm0[ipft],pft$lr.hor[ipft]) + / (tlow.fun * thigh.fun) ) + + compp = arrhenius(met$temp,compp.ref,compp.hor) + kco2 = arrhenius(met$temp,kco2.ref,kco2.hor) + ko2 = arrhenius(met$temp,ko2.ref,ko2.hor) + + }else if(iphoto %in% 2:3){ + #------------------------------------------------------------------------------------# + # Use the Collatz et al. scheme. Here the only difference is that in option 5 # + # we use the compensation point as defined in one of the Collatz papers, whereas in # + # option 6 we use the CLM approach, which is derived from Farquhar et al. (1980) # + # assuming that the ratio between the tunover for oxylase and carboxylase is # + # constant with temperature. # + #------------------------------------------------------------------------------------# + if (iphoto == 2){ + kco2.ref = kco2.ref.coll + kco2.base = kco2.base.coll + ko2.ref = ko2.ref.coll + ko2.base = ko2.base.coll + vm.ref = pft$vm0[ipft] + vm.base = pft$vm.base[ipft] + compp.ref = compp.ref.coll + compp.base = compp.base.coll + lr.ref = pft$gamma[ipft] * pft$vm0[ipft] + lr.base = pft$lr.base[ipft] + }else if (iphoto == 3){ + kco2.ref = kco2.ref.coll + kco2.base = kco2.base.coll + ko2.ref = ko2.ref.coll + ko2.base = ko2.base.coll + compp.ref = kookc * met$o2 * kco2.ref / (2.0 * ko2.ref) + compp.base = kco2.base / ko2.base + vm.ref = pft$vm0[ipft] + vm.base = pft$vm.base[ipft] + lr.ref = pft$gamma[ipft] * pft$vm0[ipft] + lr.base = pft$lr.base[ipft] + }#end if + + vm.nocorr = collatz(met$temp,vm.ref,vm.base) + lr.nocorr = collatz(met$temp,lr.ref,lr.base) + + #------------------------------------------------------------------------------------# + # Apply the low/high temperature corrections for both Vm and Leaf respiration. # + # Here we must check whether we are solving C3 or C4, because the correction has a # + # different functional form for Vm. # + #------------------------------------------------------------------------------------# + if (c91vmcorr){ + lnexplow = pft$vm.decay.e[ipft] * (pft$vm.low.temp[ipft] - met$temp) + tlow.fun = 1.0 + exp(lnexplow) + thigh.fun = 1. + exp( (-pft$vm.decay.a[ipft] + pft$vm.decay.b[ipft] * met$temp) + / (rmol * met$temp) ) + vm = vm.nocorr / (tlow.fun * thigh.fun) + + }else{ + lnexplow = pft$vm.decay.e[ipft] * (pft$vm.low.temp[ipft] - met$temp) + tlow.fun = 1.0 + exp(lnexplow) + lnexphigh = pft$vm.decay.e[ipft] * (met$temp - pft$vm.high.temp[ipft]) + thigh.fun = 1.0 + exp(lnexphigh) + vm = vm.nocorr / (tlow.fun * thigh.fun) + }#end if + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Leaf respiration. The correction is the same for both C3 and C4. # + #------------------------------------------------------------------------------------# + lnexplow = pft$lr.decay.e[ipft] * (pft$lr.low.temp[ipft] - met$temp) + tlow.fun = 1.0 + exp(lnexplow) + lnexphigh = pft$lr.decay.e[ipft] * (met$temp - pft$lr.high.temp[ipft]) + thigh.fun = 1.0 + exp(lnexphigh) + leaf.resp = lr.nocorr / (tlow.fun * thigh.fun) + #------------------------------------------------------------------------------------# + + + #----- Find the compensation point and the Michaelis-Mentel constants. --------------# + compp = collatz(met$temp,compp.ref,compp.base) + kco2 = collatz(met$temp,kco2.ref,kco2.base) + ko2 = collatz(met$temp,ko2.ref,ko2.base) + + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Before we leave, just make sure to set the CO2 compensation point and the # + # Michaelis-Mentel constants to zero in case this is a C4 plant. # + #---------------------------------------------------------------------------------------# + if (pft$pathway[ipft] == 4){ + compp = 0. * compp + kco2 = 0. * kco2 + ko2 = 0. * ko2 + }#end if + #---------------------------------------------------------------------------------------# + + + photo = list (vm = vm, leaf.resp=leaf.resp,compp=compp,kco2=kco2,ko2=ko2) + return(photo) +}#end function +#------------------------------------------------------------------------------------------# diff --git a/R-utils/list.utils.r b/R-utils/list.utils.r new file mode 100644 index 000000000..6628d4655 --- /dev/null +++ b/R-utils/list.utils.r @@ -0,0 +1,10 @@ +#==========================================================================================# +#==========================================================================================# +# This function assigns a new element in the list with the given name. # +#------------------------------------------------------------------------------------------# +list.assign <<- function(l,x,value){ + l[[x]] = value + return(l) +}#end list.assign +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/lnlikeaws.r b/R-utils/lnlikeaws.r new file mode 100644 index 000000000..43e7d1fe4 --- /dev/null +++ b/R-utils/lnlikeaws.r @@ -0,0 +1,56 @@ +#------------------------------------------------------------------------------------------# +# This function will build the support, or log of the likelihood, based on automatic # +# weather station statistics. For each variable: # +# # +# Support is computed as: # +# # +# S = k + n * { - ln(SS) - [s^2+(m-MM)^2]/[2*SS^2]} # +# # +# where: # +# # +# k - arbitrary constant (it will be assigned later, here it will be 0. # +# n - number of observations. # +# m - mean log of non-zero precipitation, based on observations. # +# s - standard deviation of the log of non-zero precipitation, based on observations. # +# NN - number of points used by the model statistics. # +# MM - model mean of log of non-zero precipitation. # +# SS - model standard deviation of log of non-zero precipitation. # +#------------------------------------------------------------------------------------------# +lnlikeaws = function(brams,obs){ + + lnlike = list() + + for (v in 1:obs$aws$nvars){ + vari = obs$aws$vars[v] + + if (vari == "psfc"){ + mfac = 100.0 + afac = 0.000 + }else if (vari == "rvsfc"){ + mfac = 0.001 + afac = 0.000 + }else{ + mfac = 1.000 + afac = 0.000 + }#end if + + #----- For the likelihood, we are assuming normal distribution. ---------------------# + n = t(obs$aws[[vari]]$dccnt) + m = t(obs$aws[[vari]]$dmean) + s = t(obs$aws[[vari]]$dsdev) + NN = brams$aws[[vari]]$dccnt + MM = mfac * brams$aws[[vari]]$dmean + afac + SS = mfac * brams$aws[[vari]]$dsdev + afac + + + #---------------------------------------------------------------------------------------# + # Now find the likelihood for each point independently. # + #---------------------------------------------------------------------------------------# + lnlike[[vari]] = n * (- log(SS) - (s^2 + (m - MM)^2)/(2*SS^2)) + lnlike[[vari]] = lnlike[[vari]] - max(lnlike[[vari]],na.rm=TRUE) + }#end if + + return(lnlike) +}#end function +#------------------------------------------------------------------------------------------# + diff --git a/R-utils/lnlikeradio.r b/R-utils/lnlikeradio.r new file mode 100644 index 000000000..e6c34d53e --- /dev/null +++ b/R-utils/lnlikeradio.r @@ -0,0 +1,62 @@ +#------------------------------------------------------------------------------------------# +# This function will build the support, or log of the likelihood, based on radiosonde # +# statistics. For each variable: # +# # +# Support is computed as: # +# # +# S = k + n * { - ln(SS) - [s^2+(m-MM)^2]/[2*SS^2]} # +# # +# where: # +# # +# k - arbitrary constant (it will be assigned later, here it will be 0. # +# n - number of observations. # +# m - mean log of non-zero precipitation, based on observations. # +# s - standard deviation of the log of non-zero precipitation, based on observations. # +# NN - number of points used by the model statistics. # +# MM - model mean of log of non-zero precipitation. # +# SS - model standard deviation of log of non-zero precipitation. # +#------------------------------------------------------------------------------------------# +lnlikeradio = function(brams,obs){ + + lnlike = list() + + for (v in 1:obs$radio$nvars){ + vari = obs$radio$vars[v] + + if (vari == "rvap"){ + mfac = 0.001 + afac = 0.000 + }else{ + mfac = 1.000 + afac = 0.000 + }#end if + + #----- For the likelihood, we are assuming normal distribution. ---------------------# + n = obs$radio[[vari]]$dccnt + m = obs$radio[[vari]]$dmean + s = obs$radio[[vari]]$dsdev + NN = brams$radio[[vari]]$dccnt + MM = mfac * brams$radio[[vari]]$dmean + afac + SS = mfac * brams$radio[[vari]]$dsdev + afac + + #----- Make the values above 300 hPa NA, since the observations are not good. -------# + if (vari == "rvap"){ + sel = obs$radio$plevs < 300. + n [,sel,] = 0 + m [,sel,] = NA + s [,sel,] = NA + NN[,sel,] = 0 + MM[,sel,] = NA + SS[,sel,] = NA + } + #------------------------------------------------------------------------------------# + # Now find the likelihood for each point independently. # + #------------------------------------------------------------------------------------# + lnlike[[vari]] = n * (- log(SS) - (s^2 + (m - MM)^2)/(2*SS^2)) + lnlike[[vari]] = lnlike[[vari]] - max(lnlike[[vari]],na.rm=TRUE) + }#end if + + return(lnlike) +}#end function +#------------------------------------------------------------------------------------------# + diff --git a/R-utils/lnlikerg.r b/R-utils/lnlikerg.r new file mode 100644 index 000000000..a657b712c --- /dev/null +++ b/R-utils/lnlikerg.r @@ -0,0 +1,82 @@ +#------------------------------------------------------------------------------------------# +# This function will build the support, or log of the likelihood, based on rain gauge # +# precipitation statistics. # +# # +# Support is computed as: # +# # +# S = k + n * p * {ln(PP) - ln(SS) - [s^2+(m-MM)^2]/[2*SS^2]} + n * (1-p) * ln(1-PP) # +# # +# where: # +# # +# k - arbitrary constant (it will be assigned later, here it will be 0. # +# n - number of observations. # +# p - fraction of observations with precipitation greater than 0. # +# m - mean log of non-zero precipitation, based on observations. # +# s - standard deviation of the log of non-zero precipitation, based on observations. # +# NN - number of points used by the model statistics. # +# PP - model probability of precipitation # +# MM - model mean of log of non-zero precipitation. # +# SS - model standard deviation of log of non-zero precipitation. # +#------------------------------------------------------------------------------------------# +lnlikerg = function(brams,obs){ + + #----- For the likelihood, the mean and standard deviation must be in log scale. -------# + n = obs$rg$dccnt + p = obs$rg$dprob + m = log(obs$rg$dmean) + s = log(obs$rg$dsdev) + NN = brams$rg$dccnt + PP = brams$rg$dprob + MM = log(brams$rg$dmean) + SS = log(brams$rg$dsdev) + + #---------------------------------------------------------------------------------------# + # Precipitation mean and standard deviation are both NA when it never rains at a # + # given point at a particular time. In order to avoid not accounting for the obser- # + # vation, we impose both m and s to be zero when p is 0. The "rainfall" term should be # + # zero anyway because everything is multiplied by p. # + #---------------------------------------------------------------------------------------# + sel = p == 0. + m[sel] = 0 + s[sel] = 0 + + #---------------------------------------------------------------------------------------# + # EXTREMELY CONTROVERSIAL POINT. I DON'T THINK THIS IS REALLY RIGHT, BUT THAT WAS # + # THE BEST I COULD THINK... # + # There is nothing that prevents PP to be zero or one. However, when PP is 0, the # + # support would be 0 if p is also 0, and -Infinity otherwise. Likewise, when PP is 1, # + # support would be 0 if p is also 1, and -Infinity otherwise. This is bad... My # + # argument is that if PP is 0, it doesn't necessarily mean that PP is really 0, because # + # this was computed based on discrete data, and therefore it could be anything between # + # 0 and 0.5/NN. Therefore I just make it 0.25/NN, and assume that the mean and # + # standard deviation are the average value for the entire domain. Likewise, if PP is # + # 1, I assume that the PP is actually (NN-0.25)/NN, but keep the same distribution that # + # was found. The advantage of doing this is that it penalises the model by a lot if # + # NN is large and by a little when NN is small. # + #---------------------------------------------------------------------------------------# + MMmean = matrix(rep(apply(X=MM,MARGIN=2,FUN=mean,na.rm=TRUE),each=nrow(MM)) + ,nrow=nrow(MM),ncol=ncol(MM)) + SSmean = matrix(rep(apply(X=SS,MARGIN=2,FUN=mean,na.rm=TRUE),each=nrow(SS)) + ,nrow=nrow(SS),ncol=ncol(SS)) + sel = PP == 0 + MM[sel] = MMmean[sel] + SS[sel] = SSmean[sel] + PP[sel] = 0.25 / NN[sel] + + sel = PP == 1 / NN + SS[sel] = SSmean[sel] + + sel = PP == 1 + PP[sel] = (NN[sel]-0.25)/NN[sel] + + #---------------------------------------------------------------------------------------# + # Now find the likelihood for each point independently. # + #---------------------------------------------------------------------------------------# + lnlike = n * ( p * (log(PP) - log(SS) - (s^2 + (m - MM)^2)/(2*SS^2)) + + (1.0 - p) * log(1.0 - PP) ) + lnlike = lnlike - max(lnlike,na.rm=TRUE) + + return(lnlike) +}#end function +#------------------------------------------------------------------------------------------# + diff --git a/R-utils/lnliketrmm.r b/R-utils/lnliketrmm.r new file mode 100644 index 000000000..9edd47a74 --- /dev/null +++ b/R-utils/lnliketrmm.r @@ -0,0 +1,83 @@ +#------------------------------------------------------------------------------------------# +# This function will build the support, or log of the likelihood, based on TRMM # +# precipitation statistics. # +# # +# Support is computed as: # +# # +# S = k + n * p * {ln(PP) - ln(SS) - [s^2+(m-MM)^2]/[2*SS^2]} + n * (1-p) * ln(1-PP) # +# # +# where: # +# # +# k - arbitrary constant (it will be assigned later, here it will be 0. # +# n - number of observations. # +# p - fraction of observations with precipitation greater than 0. # +# m - mean log of non-zero precipitation, based on observations. # +# s - standard deviation of the log of non-zero precipitation, based on observations. # +# NN - number of points used by the model statistics. # +# PP - model probability of precipitation # +# MM - model mean of log of non-zero precipitation. # +# SS - model standard deviation of log of non-zero precipitation. # +#------------------------------------------------------------------------------------------# +lnliketrmm = function(brams,obs){ + + #----- For the likelihood, the mean and standard deviation must be in log scale. -------# + n = obs$trmm$dccnt + p = obs$trmm$dprob + m = log(obs$trmm$dmean) + s = log(obs$trmm$dsdev) + NN = brams$trmm$dccnt + PP = brams$trmm$dprob + MM = log(brams$trmm$dmean) + SS = log(brams$trmm$dsdev) + + #---------------------------------------------------------------------------------------# + # Precipitation mean and standard deviation are both NA when it never rains at a # + # given point at a particular time. In order to avoid not accounting for the obser- # + # vation, we impose both m and s to be zero when p is 0. The "rainfall" term should be # + # zero anyway because everything is multiplied by p. # + #---------------------------------------------------------------------------------------# + sel = p == 0. + m[sel] = 0 + s[sel] = 0 + + #---------------------------------------------------------------------------------------# + # EXTREMELY CONTROVERSIAL POINT. I DON'T THINK THIS IS REALLY RIGHT, BUT THAT WAS # + # THE BEST I COULD THINK... # + # There is nothing that prevents PP to be zero or one. However, when PP is 0, the # + # support would be 0 if p is also 0, and -Infinity otherwise. Likewise, when PP is 1, # + # support would be 0 if p is also 1, and -Infinity otherwise. This is bad... My # + # argument is that if PP is 0, it doesn't necessarily mean that PP is really 0, because # + # this was computed based on discrete data, and therefore it could be anything between # + # 0 and 0.5/NN. Therefore I just make it 0.25/NN, and assume that the mean and # + # standard deviation are the average value for the entire domain. Likewise, if PP is # + # 1, I assume that the PP is actually (NN-0.25)/NN, but keep the same distribution that # + # was found. The advantage of doing this is that it penalises the model by a lot if # + # NN is large and by a little when NN is small. # + #---------------------------------------------------------------------------------------# + MMmean = matrix(rep(apply(X=MM,MARGIN=2,FUN=mean,na.rm=TRUE),each=nrow(MM)) + ,nrow=nrow(MM),ncol=ncol(MM)) + SSmean = matrix(rep(apply(X=SS,MARGIN=2,FUN=mean,na.rm=TRUE),each=nrow(SS)) + ,nrow=nrow(SS),ncol=ncol(SS)) + sel = PP == 0 + MM[sel] = MMmean[sel] + SS[sel] = SSmean[sel] + PP[sel] = 0.25 / NN[sel] + + sel = PP == 1 / NN + SS[sel] = SSmean[sel] + + sel = PP == 1 + PP[sel] = (NN[sel]-0.25)/NN[sel] + + #---------------------------------------------------------------------------------------# + # Now find the likelihood for each point independently. # + #---------------------------------------------------------------------------------------# + lnlike = n * ( p * (log(PP) - log(SS) - (s^2 + (m - MM)^2)/(2*SS^2)) + + (1.0 - p) * log(1.0 - PP) ) + + lnlike = lnlike - max(lnlike,na.rm=TRUE) + + return(lnlike) +}#end function +#------------------------------------------------------------------------------------------# + diff --git a/R-utils/load.everything.r b/R-utils/load.everything.r new file mode 100644 index 000000000..a4362c182 --- /dev/null +++ b/R-utils/load.everything.r @@ -0,0 +1,232 @@ +#==========================================================================================# +#==========================================================================================# +# This script loads all other scripts in this path, and also loads all the necessary # +# packages. # +#------------------------------------------------------------------------------------------# +if ("srcdir" %in% ls()){ + srcdir <<- srcdir +}else{ + srcdir <<- getwd() +}#end if +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# Define the background and foreground colour. # +#------------------------------------------------------------------------------------------# +if (! "ibackground" %in% ls()) ibackground = 0 +if (ibackground == 0){ + foreground <<- "black" + background <<- "white" + grid.colour <<- "grey66" + map.colour <<- "black" + miss.colour <<- "grey94" + all.colour <<- "grey22" +}else if (ibackground == 1){ + foreground <<- "white" + background <<- "black" + grid.colour <<- "grey33" + map.colour <<- "white" + miss.colour <<- "grey10" + all.colour <<- "grey78" + gcol <<- c("lightblue","white") +}else if (ibackground == 2){ + foreground <<- "white" + background <<- "#282828" + grid.colour <<- "grey38" + map.colour <<- "white" + miss.colour <<- "grey20" + all.colour <<- "grey73" + gcol <<- c("lightblue","#282828") +}else{ + stop(paste(" Invalid ibackground value (",ibackground,")",sep="")) +}#end if +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# Define the size of the titles and axes. # +#------------------------------------------------------------------------------------------# +if (! "ptsz" %in% ls()) ptsz = 16 +if (ptsz <= 14){ + cex.main <<- 1.2 + cex.lab <<- 1.0 +}else if (ptsz <= 16){ + cex.main <<- 1.1 + cex.lab <<- 1.0 +}else{ + cex.main <<- 1.0 + cex.lab <<- 0.9 +}#end if +#------------------------------------------------------------------------------------------# + + + + +#------------------------------------------------------------------------------------------# +# Define the colours for different hues. # +#------------------------------------------------------------------------------------------# +if (ibackground == 0){ + grey.fg <<- "grey25" ;grey.mg <<- "grey50" ;grey.bg <<- "grey75" + purple.fg <<- "purple4" ;purple.mg <<- "purple1" ;purple.bg <<- "mediumpurple1" + indigo.fg <<- "slateblue4" ;indigo.mg <<- "slateblue" ;indigo.bg <<- "slateblue1" + blue.fg <<- "royalblue4" ;blue.mg <<- "royalblue" ;blue.bg <<- "steelblue2" + sky.fg <<- "dodgerblue3" ;sky.mg <<- "deepskyblue";sky.bg <<- "lightskyblue1" + pink.fg <<- "deeppink3" ;pink.mg <<- "hotpink" ;pink.bg <<- "orchid1" + green.fg <<- "darkgreen" ;green.mg <<- "chartreuse4";green.bg <<- "chartreuse" + olive.fg <<- "darkolivegreen";olive.mg <<- "olivedrab4" ;olive.bg <<- "olivedrab2" + khaki.fg <<- "burlywood4" ;khaki.mg <<- "burlywood1" ;khaki.bg <<- "bisque3" + yellow.fg <<- "saddlebrown" ;yellow.mg <<- "yellow3" ;yellow.bg <<- "yellow" + orange.fg <<- "orangered" ;orange.mg <<- "orange3" ;orange.bg <<- "gold" + red.fg <<- "red3" ;red.mg <<- "firebrick1" ;red.bg <<- "indianred1" +}else{ + grey.bg <<- "grey75" ;grey.mg <<- "grey50" ;grey.fg <<- "grey25" + purple.bg <<- "purple4" ;purple.mg <<- "purple1" ;purple.fg <<- "mediumpurple1" + indigo.bg <<- "slateblue4" ;indigo.mg <<- "slateblue" ;indigo.fg <<- "slateblue1" + blue.bg <<- "royalblue4" ;blue.mg <<- "royalblue" ;blue.fg <<- "steelblue2" + sky.bg <<- "dodgerblue3" ;sky.mg <<- "deepskyblue";sky.fg <<- "lightskyblue1" + pink.bg <<- "deeppink3" ;pink.mg <<- "hotpink" ;pink.fg <<- "orchid1" + green.bg <<- "darkgreen" ;green.mg <<- "chartreuse4";green.fg <<- "chartreuse" + olive.bg <<- "darkolivegreen";olive.mg <<- "olivedrab4" ;olive.fg <<- "olivedrab2" + khaki.bg <<- "burlywood4" ;khaki.mg <<- "burlywood1" ;khaki.fg <<- "bisque3" + yellow.bg <<- "saddlebrown" ;yellow.mg <<- "yellow3" ;yellow.fg <<- "yellow" + orange.bg <<- "orangered" ;orange.mg <<- "orange3" ;orange.fg <<- "gold" + red.bg <<- "red3" ;red.mg <<- "firebrick1" ;red.fg <<- "indianred1" +}#end if +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# Make some rainbows with 7 colours, always from darker to lighter. # +#------------------------------------------------------------------------------------------# +grey.rbow <<- c("grey25","grey33","grey41","grey49","grey57","grey65","grey73") +purple.rbow <<- c("purple4","purple2","mediumpurple3","mediumpurple1" + ,"slateblue3","slateblue1","#B0B0FF") +blue.rbow <<- c("midnightblue","royalblue4","royalblue2","dodgerblue" + ,"deepskyblue","cadetblue3","darkslategray1") +green.rbow <<- c("#004000","chartreuse4","chartreuse","olivedrab3","olivedrab1" + ,"darkseagreen3","darkseagreen1") +orange.rbow <<- c("#502800","sienna","darkorange1","orange","gold" + ,"lightgoldenrod2","khaki1") +red.rbow <<- c("red4","firebrick3","tomato","lightcoral","palevioletred" + ,"lightpink3","lightpink") +#------------------------------------------------------------------------------------------# + + +#----- Create the default plotting settings for R. ----------------------------------------# +par.user <<- list( bg = "transparent" + , col = foreground + , col.axis = foreground + , col.lab = foreground + , col.main = foreground + , col.sub = foreground + , fg = foreground + , cex.main = cex.main + , cex.lab = cex.lab + )#end list +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# Load all packages needed. # +#------------------------------------------------------------------------------------------# +isok = list() +isok[["abind" ]] = require(abind ) +isok[["akima" ]] = require(akima ) +isok[["boot" ]] = require(boot ) +isok[["chron" ]] = require(chron ) +isok[["fields" ]] = require(fields ) +isok[["hdf5" ]] = require(hdf5 ) +isok[["klaR" ]] = require(klaR ) +isok[["maps" ]] = require(maps ) +isok[["mapdata "]] = require(mapdata ) +isok[["MASS" ]] = require(MASS ) +isok[["MCMCpack"]] = require(MCMCpack) +isok[["ncdf" ]] = require(ncdf ) +isok[["numDeriv"]] = require(numDeriv) +isok[["plotrix" ]] = require(plotrix ) +isok[["R.utils" ]] = require(R.utils ) +isok[["RSEIS" ]] = require(RSEIS ) +isok[["sn" ]] = require(sn ) +isok[["zoo" ]] = require(zoo ) +isok = unlist(isok) +if (! all(isok)){ + miss = which(! isok) + cat(" You must install the following packages before using the scripts:","\n") + for (m in miss) cat(" -> ",names(isok)[m],"\n") + stop("Missing packages!!!") +}#end if +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# SHADY BUSINESS... We must unlock grav from package boot and replace by our good # +# old value from rconstants.r. # +#------------------------------------------------------------------------------------------# +envir = as.environment("package:boot") +unlockBinding("grav",envir) +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# SHADY BUSINESS... We must unlock trim from package R.utils and replace by our function # +# that has more options than the package one. # +#------------------------------------------------------------------------------------------# +envir = as.environment("package:R.oo") +unlockBinding("trim",envir) +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Organise the files so we load them in the right order. # +#------------------------------------------------------------------------------------------# +at.first = c("rconstants.r","globdims.r") +at.end = c("pft.coms.r","pmonthly_varlist.r") +myself = c("load.everything.r") +all.scripts = sort(list.files(path=srcdir,pattern="\\.[RrSsQq]$")) +back.up = sort(list.files(path=srcdir,pattern="^[~]")) +keep = ! ( all.scripts %in% at.first + | all.scripts %in% at.end + | all.scripts %in% myself + | all.scripts %in% back.up + )#end +middle = all.scripts[keep] +order.scripts = c(at.first,middle,at.end) +nscripts = length(order.scripts) +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Load all files, in order. Here we replace the warnings by errors, just to make sure # +# that all the functions are clean. # +#------------------------------------------------------------------------------------------# +warn.orig = getOption("warn") +options(warn=2) +cat(" + Loading scripts from ",srcdir,"...","\n") +for (n in 1:nscripts){ + full = file.path(srcdir,order.scripts[n]) + isok = try(source(full),silent=TRUE) + if ("try-error" %in% is(isok)){ + options(warn=warn.orig) + cat(" - Script ",order.scripts[n]," has bugs! Check the errors/warnings: ","\n") + source(full) + stop("Source code problem") + }#end if +}#end for +options(warn=warn.orig) +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Get rid of the extremely annoying and unnecessary bell. # +#------------------------------------------------------------------------------------------# +options(locatorBell=FALSE) +#------------------------------------------------------------------------------------------# + +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/locations.r b/R-utils/locations.r new file mode 100644 index 000000000..8caba67c0 --- /dev/null +++ b/R-utils/locations.r @@ -0,0 +1,4182 @@ +#==========================================================================================# +#==========================================================================================# +# This function retrieves the information of a given site using its name to determine # +# the properties. To add more sites, go to the end of this file and adjust the lists # +# accordingly. # +#------------------------------------------------------------------------------------------# +locations <<- function(where,here=getwd(),yearbeg=1500,yearend=2008,monthbeg=1,daybeg=1 + ,filetype="Q",fullonly=FALSE){ + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # This is the name of the place, made case-insensitive. Output directories will be # + # always in lower case. # + #---------------------------------------------------------------------------------------# + ici = tolower(where) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Now we check which place or simulation we are running. # + #---------------------------------------------------------------------------------------# + if (ici %in% poilist$short){ + #----- Regular POI. -----------------------------------------------------------------# + pp = match(ici,poilist$short) + lieu = poilist$longname[pp] + iata = poilist$iata[pp] + wmo = poilist$wmo [pp] + pathroot = paste(here,ici,sep="/") + pathin = paste(here,ici,"analy",ici,sep="/") + pathrst = paste(here,ici,"histo",ici,sep="/") + pathout = paste(here,ici,"epost",sep="/") + lon = poilist$lon[pp] + lat = poilist$lat[pp] + }else if(nchar(ici) == 5 & substring(ici,1,2) == "kz") { + #----- Ke's list of polygons. -------------------------------------------------------# + testpoi = as.numeric(substring(ici,3,5)) + + lieu = paste("KZ test - polygon ",testpoi,sep="") + iata = ici + wmo = NA + pathroot = paste(here,ici,sep="/") + pathin = paste(pathroot,"analy",ici,sep="/") + pathrst = paste(here,ici,"histo",ici,sep="/") + pathout = paste(pathroot,"epost",sep="/") + lon = kzlist[[testpoi]]$lon + lat = kzlist[[testpoi]]$lat + + }else if( substring(ici,1,1) %in% c("t","s","e","z") & substring(ici,5,5) == "_"){ + #---- IATA-based name with model configuration. -------------------------------------# + metflag = substring(ici,1,1) + if (tolower(metflag) == "s"){ + thismet = " (Sheffield)" + }else if (tolower(metflag) == "t"){ + thismet = " (Tower)" + }else if (tolower(metflag) %in% c("e","z")){ + thismet = "" + }#end if + + #----- Grab the IATA code. ----------------------------------------------------------# + iata = substring(ici,2,4) + pp = which(poilist$iata == iata) + + #----- Put the name of the place and the meteorological forcing. --------------------# + testpoi = paste(poilist$longname[pp],thismet,sep="") + lon = poilist$lon[pp] + lat = poilist$lat[pp] + wmo = poilist$wmo[pp] + + lieu = simul.description(ici,testpoi) + pathroot = paste(here,ici,sep="/") + pathin = paste(pathroot,"analy",ici,sep="/") + pathrst = paste(here,ici,"histo",ici,sep="/") + pathout = paste(pathroot,"epost",sep="/") + + }else if(ici == "rondonia") { + lieu = "Rondonia" + iata = "RO" + wmo = NA + pathroot = paste(here,ici,sep="/") + pathin = paste(here,"analy",ici,sep="/") + pathrst = paste(here,"histo",ici,sep="/") + pathout = paste(here,"epost",sep="/") + lon = NA + lat = NA + + }else if(ici == "potveg") { + lieu = "South America" + iata = "potveg" + wmo = NA + pathroot = paste(here,ici,sep="/") + pathin = paste(here,"analy",ici,sep="/") + pathrst = paste(here,"histo",ici,sep="/") + pathout = paste(here,"epost",sep="/") + lon = NA + lat = NA + + }else if(ici == "coupled") { + lieu = "Coupled model" + iata = "coupled" + wmo = NA + pathroot = here + pathin = paste(here,"ecoss","coupled",sep="/") + pathrst = paste(here,"ecort","coupled",sep="/") + pathout = paste(here,"epost",sep="/") + lon = NA + lat = NA + + }else{ + lieu = NA + iata = NA + wmo = NA + pathroot = NA + pathin = NA + pathrst = NA + pathout = NA + lon = NA + lat = NA + } #end if + #---------------------------------------------------------------------------------------# + + + + + + #---------------------------------------------------------------------------------------# + # Obtain information on how far this simulation has run. # + #---------------------------------------------------------------------------------------# + if (filetype == "Q"){ + #------- Now we loop over years and months to determine what is the last file... ----# + yeara = yearbeg + yearz = yearbeg - 1 + yr = yearend + 1 + while (yr > yeara){ + yr = yr - 1 + if (yr == yeara){ + mona=monthbeg + }else{ + mona=1 + }#end if + cmon=substring(100+mona,2) + filename = paste(pathin,"-Q-",yr,"-",cmon,"-00-000000-g01.h5" ,sep="") + filename.bz2 = paste(pathin,"-Q-",yr,"-",cmon,"-00-000000-g01.h5.bz2",sep="") + if (file.exists(filename) || file.exists(filename.bz2)){ + yearz = yr + yr = yeara #----- This will make it leave the loop. ------------------------# + } #end if + } #end while + monz = mona + mo = 13 + while (mo > mona){ + mo = mo -1 + cmon = substring(100+mo,2) + filename = paste(pathin,"-Q-",yearz,"-",cmon,"-00-000000-g01.h5" ,sep="") + filename.bz2 = paste(pathin,"-Q-",yearz,"-",cmon,"-00-000000-g01.h5.bz2",sep="") + if (file.exists(filename) || file.exists(filename.bz2)){ + monz = mo + mo = 1 + }#end if + }#end while + dayz = daymax(monz,yearz) + }else if (filetype == "E"){ + #------- Now we loop over years and months to determine what is the last file... ----# + yeara = yearbeg + yearz = yearbeg - 1 + yr = yearend + 1 + while (yr > yeara){ + yr = yr - 1 + if (yr == yeara){ + mona=monthbeg + }else{ + mona=1 + }#end if + cmon = substring(100+mona,2) + filename = paste(pathin,"-E-",yr,"-",cmon,"-00-000000-g01.h5" ,sep="") + filename.bz2 = paste(pathin,"-E-",yr,"-",cmon,"-00-000000-g01.h5.bz2",sep="") + if (file.exists(filename) || file.exists(filename.bz2)){ + yearz = yr + yr = yeara #----- This will make it leave the loop. ------------------------# + } #end if + } #end while + monz = mona + mo = 13 + while (mo > mona){ + mo = mo -1 + cmon = substring(100+mo,2) + filename = paste(pathin,"-E-",yearz,"-",cmon,"-00-000000-g01.h5" ,sep="") + filename.bz2 = paste(pathin,"-E-",yearz,"-",cmon,"-00-000000-g01.h5.bz2",sep="") + if (file.exists(filename) || file.exists(filename.bz2)){ + monz = mo + mo = 1 + }#end if + }#end while + dayz = daymax(monz,yearz) + }else if (filetype == "S"){ + #------- Now we loop over years and months to determine what is the last file... ----# + yeara = yearbeg + yearz = yearbeg - 1 + yr = yearend + 1 + while (yr > yeara){ + yr = yr - 1 + if (yr == yeara){ + mona=monthbeg + }else{ + mona=1 + }#end if + cmon=substring(100+mona,2) + filename = paste(pathrst,"-S-",yr,"-",cmon,"-01-000000-g01.h5" ,sep="") + filename.bz2 = paste(pathrst,"-S-",yr,"-",cmon,"-01-000000-g01.h5.bz2",sep="") + if (file.exists(filename) || file.exists(filename.bz2)){ + yearz = yr + yr = yeara #----- This will make it leave the loop. ------------------------# + } #end if + } #end while + monz = mona + mo = 13 + while (mo > mona){ + mo = mo -1 + cmon = substring(100+mo,2) + filename = paste(pathrst,"-S-",yearz,"-",cmon,"-01-000000-g01.h5" ,sep="") + filename.bz2 = paste(pathrst,"-S-",yearz,"-",cmon,"-01-000000-g01.h5.bz2",sep="") + if (file.exists(filename) || file.exists(filename.bz2)){ + monz = mo + mo = 1 + }#end if + }#end while + dayz = daymax(monz,yearz) + }else if (filetype == "D"){ + #------- Now we loop over years and months to determine what is the last file... ----# + yeara = yearbeg + yearz = yearbeg - 1 + yr = yearend + 1 + while (yr > yeara){ + yr = yr - 1 + if (yr == yeara){ + mona=monthbeg + daya=daybeg + }else{ + mona=1 + daya=1 + }#end if + cmon = substring(100+mona,2) + cday = substring(100+daya,2) + filename = paste(pathin,"-D-",yr,"-",cmon,"-",cday,"-000000-g01.h5" ,sep="") + filename.bz2 = paste(pathin,"-D-",yr,"-",cmon,"-",cday,"-000000-g01.h5.bz2",sep="") + if (file.exists(filename) || file.exists(filename.bz2)){ + yearz = yr + yr = yeara #----- This will make it leave the loop. ------------------------# + } #end if + } #end while + + monz = mona + mo = 13 + while (mo > mona){ + mo = mo -1 + if (yearz == yeara && mo == mona){ + daya = daybeg + }else{ + daya = 1 + }#end if + cmon = substring(100+mo,2) + cday = substring(100+daya,2) + filename = paste(pathin,"-D-",yearz,"-",cmon,"-",cday,"-000000-g01.h5",sep="") + filename.bz2 = paste(pathin,"-D-",yearz,"-",cmon,"-",cday,"-000000-g01.h5.bz2" + ,sep="") + if (file.exists(filename) || file.exists(filename.bz2)){ + monz = mo + mo = 1 + }#end if + }#end while + + dayz = daya + dy = daymax(monz,yearz) + cmon = substring(100+monz,2) + while (dy > daya){ + dy = dy - 1 + cday = substring(100+dy,2) + filename = paste(pathin,"-D-",yearz,"-",cmon,"-",cday,"-000000-g01.h5",sep="") + filename.bz2 = paste(pathin,"-D-",yearz,"-",cmon,"-",cday,"-000000-g01.h5.bz2" + ,sep="") + if (file.exists(filename) || file.exists(filename.bz2)){ + dayz = dy + dy = daya #----- This will make it leave the loop. -------------------------# + } #end if + }#end while + + if (fullonly && dayz < daymax(monz,yearz)){ + monz = monz -1 + if (monz == 0){ + monz = 12 + yearz = yearz - 1 + }#end if + dayz = daymax(monz,yearz) + }#end if + + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Return the information about this place in a neatly organised list. # + #---------------------------------------------------------------------------------------# + thisplace = list(lieu=lieu,iata=iata,lon=lon,lat=lat, + pathroot=pathroot,pathin=pathin,pathrst=pathrst,pathout=pathout, + yeara=yeara,yearz=yearz,mona=monthbeg,monz=monz,daya=daybeg,dayz=dayz) + return(thisplace) + #---------------------------------------------------------------------------------------# +} #end function +#==========================================================================================# +#==========================================================================================# + + + + + +#==========================================================================================# +#==========================================================================================# +# This function finds a good name to describe the simulation. # +#------------------------------------------------------------------------------------------# +simul.description <<- function(ici,testpoi,max.char=66){ + + #---------------------------------------------------------------------------------------# + # This block contains names for the commonest settings for variables that are # + # controlled by flags. # + #---------------------------------------------------------------------------------------# + flagvar = list() + #----- imetrad is the radiation splitting method. --------------------------------------# + flagvar[["imetrad"]] = list( descr = "SW Radiation splitting" + , numeric = TRUE + , values = seq(from=0,to=4,by=1) + , names = c("Input files","SiB" + ,"Weissman-Norman" + ,"Cloudy" + ,"Sesame Street") + )#end list + #----- icanrad is the canopy radiation model. ------------------------------------------# + flagvar[["icanrad"]] = list( descr = "Canopy radiation method" + , numeric = TRUE + , values = seq(from=0,to=1,by=1) + , names = c("Medvigy","Zhao and Qualls") + )#end list + #----- imetavg is the averaging method for met driver. ---------------------------------# + flagvar[["imetavg"]] = list( descr = "Met driver average" + , numeric = TRUE + , values = seq(from=-1,to=3,by=1) + , names = c("Linear" + ,"Cos(Zen) - Instantaneous" + ,"Cos(Zen) - Forward" + ,"Cos(Zen) - Backward" + ,"Cos(Zen) - Centred") + )#end list + #----- iallom is the allometry method. -------------------------------------------------# + flagvar[["iallom"]] = list( descr = "Allometry" + , numeric = TRUE + , values = seq(from=0,to=2,by=1) + , names = c("Original ED-2.1" + ,"AGB-Chave, BL-Original" + ,"AGB-Chave, BL-ColeEwel") + )#end list + #----- h2o.plant.limit is the water limitation method. ---------------------------------# + flagvar[["h2o.plant.limit"]] = list( descr = "Water limitation" + , numeric = TRUE + , values = seq(from=0,to=2,by=1) + , names = c("No limitation" + ,"Demand/Supply" + ,"Matric potential") + )#end list + #----- h2o.plant.limit is the water limitation method. ---------------------------------# + flagvar[["dd.mort.control"]] = list( descr = "Dens.-dep. mortality" + , numeric = TRUE + , values = seq(from=2,to=4,by=1) + , names = c("Light" + ,"Light+soil water" + ,"Light+water(air/soil)") + )#end list + #----- ibranch.thermo is the branch thermodynamics. ------------------------------------# + flagvar[["ibranch.thermo"]] = list( descr = "Branch thermodynamics" + , numeric = TRUE + , values = seq(from=0,to=2,by=1) + , names = c("No branches" + ,"Wood+Leaf together" + ,"Wood and leaf (separate)") + )#end list + + #----- isfclyrm is the Surface layer model. --------------------------------------------# + flagvar[["isfclyrm"]] = list( descr = "Sfc. Lyr. Model" + , numeric = TRUE + , values = seq(from=1,to=4,by=1) + , names = c("Louis (1979)" + ,"Oncley and Dudhia (1995)" + ,"Beljaars and Holtslag (1991)" + ,"CLM (2004)") + )#end list + #----- icanturb is the roughness model. ------------------------------------------------# + flagvar[["icanturb"]] = list( descr = "Roughness Model" + , numeric = TRUE + , values = seq(from=0,to=4,by=1) + , names = c("Leuning (1995)" + ,"ED-2.1 default" + ,"Massman (1997)" + ,"Massman and Weil (1999)" + ,"Leuning (1995) + CLM") + )#end list + #----- igrndvap is the ground vapour model. --------------------------------------------# + flagvar[["igrndvap"]] = list( descr = "Gnd. Vapour Model" + , numeric = TRUE + , values = seq(from=0,to=4,by=1) + , names = c("Lee and Pielke (1991)" + ,"Mahfouf and Noilhan (1991) - T1" + ,"Mahfouf and Noilhan (1991) - T2" + ,"Mahfouf and Noilhan (1991) - T3" + ,"Mahfouf and Noilhan (1991) - T4") + )#end list + #----- isoil.text is the soil texture class. -------------------------------------------# + flagvar[["isoil.text"]] = list( descr = "Soil texture type" + , numeric = TRUE + , values = seq(from=0,to=17,by=1) + , names = c("Site default" + ,"Sand" + ,"Loamy sand" + ,"Sandy loam" + ,"Silty loam" + ,"Loam" + ,"Sandy clay loam" + ,"Silty clay loam" + ,"Clayey loam" + ,"Sandy clay" + ,"Silty clay" + ,"Clay" + ,"Peat" + ,"Bedrock" + ,"Silt" + ,"Heavy clay" + ,"Clayey sand" + ,"Clayey silt") + )#end list + #----- crown.mod is the crown model for radiation. -------------------------------------# + flagvar[["crown.mod"]] = list( descr = "Crown model" + , numeric = TRUE + , values = seq(from=0,to=1,by=1) + , names = c("ED-2.1 original","Finite crown") + )#end list + #----- ivegt.dynamics is the flag for vegetation dynamics. -----------------------------# + flagvar[["ivegt.dynamics"]] = list( descr = "Vegetation dynamics" + , numeric = TRUE + , values = seq(from=0,to=1,by=1) + , names = c("OFF","ON") + )#end list + #----- iphen.scheme is the phenology scheme for tropical broadleaf trees. --------------# + flagvar[["iphen.scheme"]] = list( descr = "Phenology scheme" + , numeric = TRUE + , values = seq(from=-1,to=3,by=1) + , names = c("Evergreen" + ,"Drought - ED-2.0" + ,"Prescribed" + ,"Drought - ED-2.1" + ,"Light + drought") + )#end list + #----- idiversity is an outside flag to tell how many PFTs were allowed. ---------------# + flagvar[["idiversity"]] = list( descr = "PFTs used" + , numeric = TRUE + , values = c(2,5) + , names = c("1 Grass + 1 Tree" + ,"2 Grasses + 3 Trees" + )#end names + )#end list + #----- ipatch is an outside flag to tell how many patches existed. ---------------------# + flagvar[["ipatch"]] = list( descr = "Patch structure" + , numeric = TRUE + , values = c(0,1,25,40) + , names = c("Multiple patches" + ,"Single patch" + ,"Multiple patches" + ,"Multiple patches" + )#end names + )#end list + #----- idrought is the pseudo-drought flag. --------------------------------------------# + flagvar[["idrought"]] = list( descr = "Met forcing" + , numeric = TRUE + , values = seq(from=0,to=1,by=1) + , names = c("Tower (2004)","Pseudo Drought") + )#end list + #----- itemp.drought is the temperature response. --------------------------------------# + flagvar[["imet.drought"]] = list( descr = "Tower" + , numeric = TRUE + , values = c(66,67,77,83) + , names = c("Km 66","Km 67","Km 77","Km 83") + )#end list + #----- itemp.drought is the temperature response. --------------------------------------# + flagvar[["itemp.drought"]] = list( descr = "Temperature" + , numeric = TRUE + , values = seq(from=0,to=1,by=1) + , names = c("Normal","2C warmer") + )#end list + #----- irad.drought is the radiation response. -----------------------------------------# + flagvar[["irad.drought"]] = list( descr = "Radiation" + , numeric = TRUE + , values = seq(from=0,to=1,by=1) + , names = c("Normal","15% Brighter") + )#end list + #----- ihum.drought is the humidity response. ------------------------------------------# + flagvar[["ihum.drought"]] = list( descr = "Humidity" + , numeric = TRUE + , values = seq(from=0,to=1,by=1) + , names = c("Same Specific humidity" + ,"Same Relative humidity") + )#end list + #----- irad.drought is the rainfall response. ------------------------------------------# + flagvar[["irain.drought"]] = list( descr = "Rainfall" + , numeric = TRUE + , values = seq(from=0,to=1,by=1) + , names = c("Normal","2010 drought") + )#end list + #----- Photosynthesis parameters. ------------------------------------------------------# + flagvar[["iphoto"]] = list( descr = "Photosynthesis parameters" + , numeric = TRUE + , values = seq(from=0,to=1,by=1) + , names = c("Old","New") + )#end list + #----- Grass type. ---------------------------------------------------------------------# + flagvar[["igrass"]] = list( descr = "Grass type" + , numeric = TRUE + , values = c(3,4,34) + , names = c("C3","C4","C3 and C4") + )#end list + #----- Grass type. ---------------------------------------------------------------------# + flagvar[["isoilbc"]] = list( descr = "Soil Bnd. Cond." + , numeric = TRUE + , values = c(0,1,2,3,4) + , names = c( "Bedrock" + , "Free drainage" + , "Sinkhole" + , "Field capacity" + , "Aquifer" + , "Lateral drainage") + )#end list + #----- Grass type. ---------------------------------------------------------------------# + flagvar[["ipercol"]] = list( descr = "Percolation" + , numeric = TRUE + , values = c(0,1,2) + , names = c( "Walko et al. (2000)" + , "Anderson (1976)" + , "Anderson + CLM") + )#end list + #----- Grass type. ---------------------------------------------------------------------# + flagvar[["cgrass"]] = list( descr = "Grass type" + , numeric = FALSE + , values = c("c3","c4","cb") + , names = c("C3","C4","C3 and C4") + )#end list + #----- Fire model. ---------------------------------------------------------------------# + flagvar[["include.fire"]] = list( descr = "Fire model" + , numeric = TRUE + , values = c(0,1,2,3) + , names = c( "Off" + , "ED-1.0 type" + , "Default ED-2.1" + , "Water-deficit based" + )#end c + )#end list + #----- Energy budget type. -------------------------------------------------------------# + flagvar[["iloss"]] = list( descr = "Soil internal energy lost for transp." + , numeric = TRUE + , values = c(0,1) + , names = c("Disappears","Goes to leaves") + )#end list + #----- Revision. -----------------------------------------------------------------------# + flagvar[["revision"]] = list( descr = "Revision" + , numeric = TRUE + , values = c(78,280) + , names = c("Mainline - 78" + ,"Marcos - 280") + )#end list + #----- isoil.text is the soil texture class. -------------------------------------------# + flagvar[["pft"]] = list( descr = "PFT used" + , numeric = TRUE + , values = seq(from=1,to=17,by=1) + , names = c("C4 grass" + ,"Early tropical" + ,"Mid tropical" + ,"Late tropical" + ,"Temp. C3 grass" + ,"North pine" + ,"South pine" + ,"Late conifer" + ,"Early hardwood" + ,"Mid hardwood" + ,"Late hardwood" + ,"C3 pasture" + ,"C3 crop" + ,"C4 pasture" + ,"C4 crop" + ,"C3 grass" + ,"Araucaria") + )#end list + #----- Vegetation structure. -----------------------------------------------------------# + flagvar[["isas"]] = list( descr = "Structure" + , numeric = FALSE + , values = c("sas","ble") + , names = c("Size structure" + ,"Single size") + )#end list + #----- Density-dependent mortality. ----------------------------------------------------# + flagvar[["iddmort.scheme"]] = list( descr = "Carbon balance method" + , numeric = TRUE + , values = c(0,1) + , names = c("Rates" + ,"Rates and storage" + )#end names + )#end list + #----- Density-dependent mortality. ----------------------------------------------------# + flagvar[["resp.scheme"]] = list( descr = "Respiration method" + , numeric = TRUE + , values = c(0,1) + , names = c("ED-2.1" + ,"Based on ED-1.0" + )#end names + )#end list + #----- Integration scheme. -------------------------------------------------------------# + flagvar[["integ.scheme"]] = list( descr = "Integration scheme" + , numeric = TRUE + , values = c(0,1,2,3) + , names = c("Forward Euler" + ,"4th order Runge-Kutta" + ,"Heun" + ,"Hybrid" + )#end names + )#end list + #----- Drought scenario. ---------------------------------------------------------------# + flagvar[["drought.ext"]] = list( descr = "Drought extent" + , numeric = TRUE + , values = c(0,1,2,3) + , names = c("Same as default" + ,"+1 month" + ,"+2 months" + ,"+3 months" + )#end names + )#end list + flagvar[["drought.seq"]] = list( descr = "Drought sequence" + , numeric = TRUE + , values = c(0,1,2) + , names = c("Same as default" + ,"Consecutive" + ,"Random" + )#end names + )#end list + flagvar[["isoilcol"]] = list( descr = "Soil colour" + , numeric = TRUE + , values = seq(1,21,1) + , names = c("01" + ,"02 - Bright" + ,"03" + ,"04" + ,"05" + ,"06 - Medium bright" + ,"07" + ,"08" + ,"09" + ,"10 - Medium" + ,"11" + ,"12" + ,"13" + ,"14 - Medium dark" + ,"15" + ,"16" + ,"17" + ,"18 - Dark" + ,"19" + ,"20 - Very dark" + ,"21 - ED-2.1" + )#end names + )#end list + flagvar[["iscenario"]] = list( descr = "Scenario" + , numeric = TRUE + , values = c(-150,-125,-100, -75, -50, -25 + , -10, 0, 10 + , 25, 50, 75, 100, 125, 150 + )#end c + , names = c("Drier: A = 3/2" + ,"Drier: A = 5/4" + ,"Drier: A = 1" + ,"Drier: A = 3/4" + ,"Drier: A = 1/2" + ,"Drier: A = 1/4" + ,"INMET period" + ,"EFT period only" + ,"Uniform sampling" + ,"Wetter: A = 1/4" + ,"Wetter: A = 1/2" + ,"Wetter: A = 3/4" + ,"Wetter: A = 1" + ,"Wetter: A = 5/4" + ,"Wetter: A = 3/2" + )#end names + )#end list + flagvar[["met.forcing"]] = list( descr = "Meteorological forcing" + , numeric = FALSE + , values = c("eft","wmo") + , names = c("Eddy flux tower" + ,"WMO-based" + )#end names + )#end list + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # The following variables are numeric variables that may need conversion from # + # integer to numeric. # + #---------------------------------------------------------------------------------------# + numvar = list() + numvar[["kw.grass" ]] = list( descr = "Kw[grass]" + , unit = "m2/yr/kgC_rt" + , fmt = "%.0f" + , off = 0.0 + , mult = 1.0 ) + numvar[["kw.tree" ]] = list( descr = "Kw[tree]" + , unit = "m2/yr/kgC_rt" + , fmt = "%.0f" + , off = 0.0 + , mult = 1.0 ) + numvar[["kw" ]] = list( descr = "Kw" + , unit = "m2/yr/kgC_rt" + , fmt = "%.0f" + , off = 0.0 + , mult = 1.0 ) + numvar[["soil.depth" ]] = list( descr = "Soil depth" + , unit = "m" + , fmt = "%.1f" + , off = 0.0 + , mult = 0.1 ) + numvar[["atm.co2" ]] = list( descr = "Air CO2" + , unit = "umol/mol" + , fmt = "%.0f" + , off = 0.0 + , mult = 1.0 ) + numvar[["gamma.c3" ]] = list( descr = "gamma[C3]" + , unit = "" + , fmt = "%.3f" + , off = 0.0 + , mult = 0.001) + numvar[["gamma.c4" ]] = list( descr = "gamma[C4]" + , unit = "" + , fmt = "%.3f" + , off = 0.0 + , mult = 0.001) + numvar[["vm0.c3" ]] = list( descr = "Vm0fac[C3]" + , unit = "" + , fmt = "%.2f" + , off = 0.0 + , mult = 0.01 ) + numvar[["vm0.c4" ]] = list( descr = "Vm0fac[C4]" + , unit = "" + , fmt = "%.2f" + , off = 0.0 + , mult = 0.01 ) + numvar[["vm0" ]] = list( descr = "Vm0fac" + , unit = "" + , fmt = "%.2f" + , off = 0.0 + , mult = 0.01 ) + numvar[["lw.grass" ]] = list( descr = "Leaf width [grass]" + , unit = "cm" + , fmt = "%.1f" + , off = 0.0 + , mult = 1.0 ) + numvar[["lw.tree" ]] = list( descr = "Leaf width [tree]" + , unit = "cm" + , fmt = "%.1f" + , off = 0.0 + , mult = 1.0 ) + numvar[["orient.tree" ]] = list( descr = "Orient fact.[tree]" + , unit = "" + , fmt = "%.2f" + , off = 0.0 + , mult = 0.01 ) + numvar[["orient.grass" ]] = list( descr = "Orient fact.[grass]" + , unit = "" + , fmt = "%.2f" + , off = 0.0 + , mult = 0.01 ) + numvar[["klowco2" ]] = list( descr = "Klow" + , unit = "mol/umol" + , fmt = "%.0f" + , off = 0.0 + , mult = 1000. ) + numvar[["d0.c3" ]] = list( descr = "D0[c3]" + , unit = "" + , fmt = "%.3f" + , off = 0.0 + , mult = 0.001) + numvar[["d0" ]] = list( descr = "D0" + , unit = "mol/mol" + , fmt = "%.3f" + , off = 0.0 + , mult = 0.001) + numvar[["ltover" ]] = list( descr = "Leaf turnover" + , unit = "1/yr" + , fmt = "%.1f" + , off = 0.0 + , mult = 0.1) + numvar[["runoff" ]] = list( descr = "Runoff time" + , unit = "h" + , fmt = "%.0f" + , off = 0.0 + , mult = 3600.0) + numvar[["leaf.drop" ]] = list( descr = "Leaf drop threshold" + , unit = "m" + , fmt = "%.0f" + , off = 0.0 + , mult = 1.0) + numvar[["sm.fire" ]] = list( descr = "Fire threshold" + , unit = "m" + , fmt = "%.0f" + , off = 0.0 + , mult = 1.0) + numvar[["fire.parameter" ]] = list( descr = "Fire parameter" + , unit = "--" + , fmt = "%.2f" + , off = 0.0 + , mult = 0.1) + numvar[["mslope" ]] = list( descr = "Stomatal slope" + , unit = "--" + , fmt = "%.1f" + , off = 0.0 + , mult = 1.0) + numvar[["ubmin" ]] = list( descr = "Min. Wind" + , unit = "m/s" + , fmt = "%.2f" + , off = 0.0 + , mult = 0.01) + numvar[["ddmort.fac" ]] = list( descr = "DD mortality factor" + , unit = "--" + , fmt = "%.2f" + , off = 0.0 + , mult = 1.00) + numvar[["sand" ]] = list( descr = "Sand" + , unit = "%" + , fmt = "%.1f" + , off = 0.0 + , mult = 0.1) + numvar[["clay" ]] = list( descr = "Clay" + , unit = "%" + , fmt = "%.1f" + , off = 0.0 + , mult = 0.1) + numvar[["treefall" ]] = list( descr = "TF Disturbance" + , unit = "%/yr" + , fmt = "%.2f" + , off = 0.0 + , mult = 0.01) + numvar[["leaf.absorb.nir"]] = list( descr = "Leaf NIR absorptance" + , unit = "%/yr" + , fmt = "%.2f" + , off = 0.0 + , mult = 0.01) + numvar[["leaf.absorb.vis"]] = list( descr = "Leaf PAR absorptance" + , unit = "%/yr" + , fmt = "%.2f" + , off = 0.0 + , mult = 0.01) + numvar[["idrain.scen"]] = list( descr = "Change in rainfall" + , unit = "s.d." + , fmt = "%.2f" + , off = 0.0 + , mult = 0.01) + numvar[["idtemp.scen"]] = list( descr = "Change in temperature" + , unit = "K" + , fmt = "%.2f" + , off = 0.0 + , mult = 0.01) + numvar[["realisation"]] = list( descr = "Realisation" + , unit = "" + , fmt = "%2.2i" + , off = 0.0 + , mult = 1.0) + numvar[["iage"]] = list( descr = "Target # of patches" + , unit = "" + , fmt = "%3i" + , off = 0.0 + , mult = 1.0) + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # The following list is currently hardcoded, it could be better designed in the # + # future so the script would recognise the terms automatically. # + #---------------------------------------------------------------------------------------# + lenici = nchar(ici) + if (lenici == 8){ + nparms = 1 + param = c("isas") + na = c( 6) + nz = c( 8) + }else if (lenici == 11){ + nparms = 1 + param = c("revision") + na = c( 9) + nz = c( 11) + }else if (lenici == 15){ + nparms = 1 + param = c("revision") + na = c( 13) + nz = c( 15) + }else if (lenici == 16){ + nparms = 2 + param = c("igrass","icanturb") + na = c( 7, 15) + nz = c( 8, 16) + }else if (lenici == 17){ + nparms = 2 + param = c("iphen.scheme","isas") + na = c( 11, 15) + nz = c( 13, 17) + }else if (lenici == 18){ + nparms = 2 + param = c("icanturb","isas") + na = c( 13, 16) + nz = c( 14, 18) + }else if (lenici == 19){ + nparms = 2 + param = c("isoilcol","leaf.absorb.nir") + na = c( 10, 17) + nz = c( 11, 19) + }else if (lenici == 21){ + nparms = 3 + param = c("isas","ipatch","idiversity") + na = c( 6, 14, 20) + nz = c( 8, 15, 21) + }else if (lenici == 22){ + nparms = 2 + param = c("iscenario","iphen.scheme") + na = c( 11, 20) + nz = c( 14, 22) + }else if (lenici == 23){ + nparms = 3 + param = c("idiversity","icanrad","isas") + na = c( 9, 18, 21) + nz = c( 10, 19, 23) + }else if (lenici == 24){ + nparms = 3 + param = c("soil.depth","kw.tree","atm.co2") + na = c( 10, 15, 22) + nz = c( 11, 17, 24) + }else if (lenici == 25){ + nparms = 3 + param = c("iphen.scheme","d0","include.fire") + na = c( 10, 16, 24) + nz = c( 12, 18, 25) + }else if (lenici == 26){ + nparms = 3 + param = c("soil.depth","dd.mort.control", "iphen.scheme") + na = c( 10, 17, 24) + nz = c( 11, 18, 26) + }else if (lenici == 27){ + nparms = 3 + param = c("soil.depth","sand", "clay") + na = c( 10, 17, 25) + nz = c( 11, 19, 27) + }else if (lenici == 28){ + nparms = 3 + param = c("iphen.scheme", "isoil.text","treefall") + na = c( 11, 20, 25) + nz = c( 13, 21, 28) + }else if (lenici == 30){ + nparms = 3 + param = c("iscenario","iphen.scheme","isoil.text") + na = c( 11, 20, 29) + nz = c( 14, 22, 30) + }else if (lenici == 31){ + nparms = 3 + param = c("iphen.scheme","iddmort.scheme","treefall") + na = c( 11, 20, 28) + nz = c( 13, 21, 31) + }else if (lenici == 32){ + nparms = 4 + param = c("isoil.text","include.fire","fire.parameter","sm.fire") + na = c( 10, 17, 24, 29) + nz = c( 11, 18, 25, 32) + }else if (lenici == 33){ + nparms = 5 + param = c("met.forcing","isas","iage","idiversity","include.fire") + na = c( 6, 10, 18, 24, 32) + nz = c( 8, 12, 19, 25, 33) + }else if (lenici == 36){ + nparms = 4 + param = c("imet.drought","isoil.text","iphen.scheme","idrought") + na = c( 9, 17, 24, 35) + nz = c( 10, 18, 26, 36) + }else if (lenici == 39){ + nparms = 6 + param = c("met.forcing","isas","iage","idiversity","iphen.scheme","include.fire") + na = c( 6, 10, 17, 23, 30, 38) + nz = c( 8, 12, 18, 24, 32, 39) + }else if (lenici == 40){ + nparms = 5 + param = c("iphen.scheme","iddmort.scheme","treefall","include.fire","isas") + na = c( 10, 18, 26, 35, 38) + nz = c( 12, 19, 29, 36, 40) + }else if (lenici == 41){ + nparms = 5 + param = c("idrain.scen","idtemp.scen","realisation","iphen.scheme","isoil.text") + na = c( 7, 13, 23, 31, 40) + nz = c( 10, 16, 24, 33, 41) + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Loop over all parameters and concatenate the description. # + #---------------------------------------------------------------------------------------# + description = testpoi + nchar.line = nchar(description) + for (p in 1:nparms){ + #----- Retrieve the parameter value or flag. ----------------------------------------# + mycharval = substring(ici,na[p],nz[p]) + myval = as.numeric(mycharval) + #----- Check whether the parameter is a value or a flag. ----------------------------# + mytest = param[p] + if (mytest %in% names(flagvar)){ + #----- Flag variable, find the number that corresponds to the setting. -----------# + if (flagvar[[mytest]]$numeric){ + n = match(myval,flagvar[[mytest]]$values) + }else{ + n = match(mycharval,flagvar[[mytest]]$values) + }#end if + if (is.na(n)){ + stop(paste(" Option ",myval," doesn't exist for",flagvar[[mytest]]$descr,"..." + ,sep="")) + }else{ + thisdesc = paste(flagvar[[mytest]]$descr,": ",flagvar[[mytest]]$names[n]) + } + }else if (mytest %in% names(numvar)){ + #----- Numeric variable, put the value in a nicer format. ------------------------# + val.pretty = sprintf(numvar[[mytest]]$fmt + ,numvar[[mytest]]$off + myval*numvar[[mytest]]$mult) + + thisdesc = paste(numvar[[mytest]]$descr," = ",val.pretty,numvar[[mytest]]$unit + ,sep="") + }else{ + stop(paste(" Invalid parameter test: ",mytest,"...",sep="")) + }#end if + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Check whether to break the line or continue in the same one. # + #------------------------------------------------------------------------------------# + if (nchar.line + nchar(thisdesc) > max.char){ + description = paste(description,thisdesc,sep="\n") + nchar.line = nchar(thisdesc) + }else{ + description = paste(description,thisdesc,sep=" - ") + nchar.line = nchar.line + nchar(thisdesc) + }#end if + }#end for + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Return the description of this simulation. # + #---------------------------------------------------------------------------------------# + return(description) + #---------------------------------------------------------------------------------------# +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This list has the commonest locations, feel free to add new places. # +#------------------------------------------------------------------------------------------# +u = 0 +poitmp = list() +u = u + 1 +poitmp[[u]] = list( short = "allpahuayo" + , longname = "Allpahuayo, PER" + , iata = "alp" + , lon = -73.437 + , lat = -3.953 + , alt = 143. + , wmo = NA + , isoilflg = 2 + , ntext = 1 + , sand = 0.937 + , clay = 0.026 + , depth = "D" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "alta_floresta" + , longname = "Alta Floresta, MT" + , iata = "afl" + , lon = -56.100 + , lat = -9.867 + , alt = 269. + , wmo = 82965 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "angra_dos_reis" + , longname = "Angra dos Reis, RJ" + , iata = "aei" + , lon = -44.300 + , lat = -22.970 + , alt = 4. + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "araguaiana" + , longname = "Araguaiana, MT" + , iata = "ayx" + , lon = -51.810 + , lat = -15.710 + , alt = 284. + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "araracuara" + , longname = "Araracuara, COL" + , iata = "arc" + , lon = -72.398 + , lat = -0.601 + , alt = 243 + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "asuncion" + , longname = "Asuncion, PRY" + , iata = "asu" + , lon = -57.560 + , lat = -25.300 + , alt = 127 + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "bananal" + , longname = "Bananal Island, TO" + , iata = "ban" + , lon = -50.159 + , lat = -9.824 + , alt = 173 + , wmo = NA + , isoilflg = 2 + , ntext = 8 + , sand = 0.240 + , clay = 0.370 + , depth = "C" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Bananal" + , yeara = 1999 + , yearz = 2007 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "barro_colorado" + , longname = "Barro Colorado, PAN" + , iata = "bci" + , lon = -79.850 + , lat = 9.160 + , alt = 145 + , wmo = NA + , isoilflg = 2 + , ntext = 17 + , sand = 0.200 + , clay = 0.420 + , depth = "D" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "belem" + , longname = "Belem, PA" + , iata = "bel" + , lon = -48.480 + , lat = -1.380 + , alt = 15 + , wmo = 82193 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "belo_horizonte" + , longname = "Belo Horizonte, MG" + , iata = "cnf" + , lon = -43.950 + , lat = -19.850 + , alt = NA + , wmo = 83566 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "belterra" + , longname = "Belterra, PA" + , iata = "bte" + , lon = -54.944 + , lat = -2.646 + , alt = 171 + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "blumenau" + , longname = "Blumenau, SC" + , iata = "bnu" + , lon = -49.060 + , lat = -26.920 + , alt = 15 + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "boa_vista" + , longname = "Boa Vista, RR" + , iata = "bvb" + , lon = -60.610 + , lat = 2.920 + , alt = 82 + , wmo = 82022 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "bogota" + , longname = "Bogota, COL" + , iata = "bog" + , lon = -74.100 + , lat = 4.650 + , alt = 2556 + , wmo = 80222 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "bom_jesus" + , longname = "Bom Jesus da Lapa, BA" + , iata = "laz" + , lon = -43.417 + , lat = -13.267 + , alt = 440 + , wmo = 83288 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "brasilia" + , longname = "Brasilia, DF" + , iata = "bsb" + , lon = -47.910 + , lat = -15.860 + , alt = 1054 + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "bridgetown" + , longname = "Bridgetown, BRB" + , iata = "bgi" + , lon = -59.500 + , lat = 13.067 + , alt = 56 + , wmo = 78954 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "cabo_frio" + , longname = "Cabo Frio, RJ" + , iata = "cfb" + , lon = -42.070 + , lat = -22.920 + , alt = 6 + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "cacoal_grande" + , longname = "Cacoal Grande (Embrapa), PA" + , iata = "ecc" + , lon = -54.329 + , lat = -2.389 + , alt = 11 + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "cajazeiras" + , longname = "Cajazeiras, PB" + , iata = "cjz" + , lon = -38.570 + , lat = -6.900 + , alt = 306 + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "calabozo" + , longname = "Calabozo, VEN" + , iata = "clz" + , lon = -67.420 + , lat = 8.920 + , alt = 109 + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "canarana" + , longname = "Canarana, MT" + , iata = "qnr" + , lon = -52.250 + , lat = -13.560 + , alt = 395 + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "carajas" + , longname = "Parauapebas (Carajas), PA" + , iata = "cks" + , lon = -50.722 + , lat = -5.786 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "cardoso" + , longname = "Cardoso Island, SP" + , iata = "czi" + , lon = -48.010 + , lat = -25.096 + , alt = NA + , wmo = NA + , isoilflg = 2 + , ntext = 1 + , sand = 0.950 + , clay = 0.010 + , depth = "C" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "carolina" + , longname = "Carolina, MA" + , iata = "cln" + , lon = -47.467 + , lat = -7.333 + , alt = 193. + , wmo = 82765 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "caxiuana" + , longname = "Caxiuana, PA" + , iata = "cax" + , lon = -51.458 + , lat = -1.720 + , alt = NA + , wmo = NA + , isoilflg = 2 + , ntext = 16 + , sand = 0.380 + , clay = 0.440 + , depth = "D" + , isoilbc = 2 + , sldrain = 6. + , scolour = 14 + , met.driver = "Caxiuana" + , yeara = 1994 + , yearz = 2004 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "cayenne" + , longname = "Cayenne, GUF" + , iata = "cay" + , lon = -52.367 + , lat = 4.833 + , alt = 105. + , wmo = 81405 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "chaiten" + , longname = "Chaiten, CHL" + , iata = "wch" + , lon = -72.500 + , lat = -42.500 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "ciudad_bolivar" + , longname = "Ciudad Bolivar, VEN" + , iata = "cbl" + , lon = -63.550 + , lat = 8.150 + , alt = 48 + , wmo = 80444 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "ciudad_guayana" + , longname = "Ciudad Guayana, VEN" + , iata = "cgu" + , lon = -62.762 + , lat = 8.289 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "cochabamba" + , longname = "Cochabamba, BOL" + , iata = "cbb" + , lon = -66.170 + , lat = -17.420 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "cuiaba" + , longname = "Cuiaba, MT" + , iata = "cgb" + , lon = -56.100 + , lat = -15.600 + , alt = 187 + , wmo = 83362 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "curacao" + , longname = "Curacao, ANT" + , iata = "cur" + , lon = -68.967 + , lat = 12.200 + , alt = 9 + , wmo = 78988 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "curitiba" + , longname = "Curitiba, PR" + , iata = "cwb" + , lon = -49.230 + , lat = -25.410 + , alt = 908 + , wmo = 83840 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "curua_una" + , longname = "Curua-Una (Sudam), PA" + , iata = "scr" + , lon = -54.091 + , lat = -2.544 + , alt = 19 + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "cruzeiro_do_sul" + , longname = "Cruzeiro do Sul, AC" + , iata = "czs" + , lon = -72.667 + , lat = -7.663 + , alt = 170 + , wmo = 82705 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "diamantino" + , longname = "Diamantino, MT" + , iata = "dmt" + , lon = -56.620 + , lat = -14.370 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "dourados" + , longname = "Dourados, MS" + , iata = "dou" + , lon = -54.810 + , lat = -22.220 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "el_triunfo" + , longname = "El Triunfo, BOL" + , iata = "etf" + , lon = -67.000 + , lat = -13.500 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "el_zafire" + , longname = "El Zafire, COL" + , iata = "zar" + , lon = -69.902 + , lat = -4.007 + , alt = NA + , wmo = NA + , isoilflg = 2 + , ntext = 2 + , sand = 0.748 + , clay = 0.006 + , depth = "B" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "emas" + , longname = "Parque das Emas, GO" + , iata = "jti" + , lon = -52.19 + , lat = -18.12 + , alt = 848 + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "erechim" + , longname = "Erechim, RS" + , iata = "erm" + , lon = -52.240 + , lat = -27.610 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "eunapolis" + , longname = "Eunapolis, BA" + , iata = "enp" + , lon = -39.580 + , lat = -16.330 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "fazendans" + , longname = "Fazenda Nsa. Sra., RO" + , iata = "fns" + , lon = -62.357 + , lat = -10.762 + , alt = NA + , wmo = NA + , isoilflg = 2 + , ntext = 2 + , sand = 0.800 + , clay = 0.100 + , depth = "G" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Fazenda_Nossa_Senhora" + , yeara = 1994 + , yearz = 2003 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "floriano" + , longname = "Floriano, PI" + , iata = "flb" + , lon = -43.020 + , lat = -6.770 + , alt = 123 + , wmo = 82678 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "fortaleza" + , longname = "Fortaleza, CE" + , iata = "for" + , lon = -38.530 + , lat = -3.780 + , alt = 26 + , wmo = 82397 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "guarana" + , longname = "Guarana, PA" + , iata = "gun" + , lon = -54.325 + , lat = -2.677 + , alt = 138 + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "harvard" + , longname = "Harvard Forest, MA" + , iata = "hvd" + , lon = -72.170 + , lat = 42.540 + , alt = NA + , wmo = NA + , isoilflg = 2 + , ntext = 2 + , sand = -1.000 + , clay = -1.000 + , depth = "E" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Harvard" + , yeara = 1964 + , yearz = 2009 + , iphen = 1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "iguape" + , longname = "Iguape, SP" + , iata = "igp" + , lon = -47.590 + , lat = -24.630 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "imperatriz" + , longname = "Imperatriz, MA" + , iata = "imp" + , lon = -47.460 + , lat = -5.530 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "iquique" + , longname = "Iquique, CHL" + , iata = "iqq" + , lon = -69.970 + , lat = -20.240 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "iquitos" + , longname = "Iquitos, PER" + , iata = "iqt" + , lon = -73.250 + , lat = -3.750 + , alt = 125 + , wmo = 84378 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "itabaiana" + , longname = "Itabaiana, SE" + , iata = "ibn" + , lon = -37.420 + , lat = -10.680 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "itapeva" + , longname = "Itapeva, SP" + , iata = "ipv" + , lon = -48.880 + , lat = -23.980 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "itirapina" + , longname = "Itirapina, SP" + , iata = "ity" + , lon = -47.85 + , lat = -22.22 + , alt = 810 + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "jacareacanga" + , longname = "Jacareacanga, PA" + , iata = "jcr" + , lon = -57.777 + , lat = -6.233 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "jamaraqua" + , longname = "Jamaraqua, PA" + , iata = "jmq" + , lon = -55.036 + , lat = -2.806 + , alt = 15 + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "jiparana" + , longname = "Ji-Parana, RO" + , iata = "jpr" + , lon = -61.980 + , lat = -10.860 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "joao_pessoa" + , longname = "Joao Pessoa, PB" + , iata = "jpa" + , lon = -34.910 + , lat = -7.100 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "kenia" + , longname = "Kenia, BOL" + , iata = "qea" + , lon = -62.730 + , lat = -16.010 + , alt = NA + , wmo = NA + , isoilflg = 2 + , ntext = 3 + , sand = 0.760 + , clay = 0.160 + , depth = "D" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "las_gaviotas" + , longname = "Las Gaviotas, COL" + , iata = "lgt" + , lon = -70.970 + , lat = 4.550 + , alt = 167 + , wmo = 80241 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "la_esmeralda" + , longname = "La Esmeralda, VEN" + , iata = "lfe" + , lon = -65.540 + , lat = 3.170 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "la_lorena" + , longname = "La Lorena, COL" + , iata = "lor" + , lon = -69.991 + , lat = -3.056 + , alt = NA + , wmo = NA + , isoilflg = 2 + , ntext = 9 + , sand = 0.380 + , clay = 0.310 + , depth = "A" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "la_planada" + , longname = "La Planada, COL" + , iata = "lpn" + , lon = -77.994 + , lat = 1.116 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "H" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "la_selva" + , longname = "La Selva, CRI" + , iata = "lzv" + , lon = -84.010 + , lat = 10.430 + , alt = NA + , wmo = NA + , isoilflg = 2 + , ntext = 6 + , sand = 0.570 + , clay = 0.290 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "labrea" + , longname = "Labrea, AM" + , iata = "lbr" + , lon = -64.770 + , lat = -7.280 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "lencois" + , longname = "Lencois, BA" + , iata = "lec" + , lon = -41.350 + , lat = -12.480 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "leticia" + , longname = "Leticia, COL" + , iata = "let" + , lon = -69.950 + , lat = -4.167 + , alt = 84 + , wmo = 80398 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "lima" + , longname = "Lima, PER" + , iata = "lim" + , lon = -77.117 + , lat = -12.000 + , alt = 12 + , wmo = 84629 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "linden" + , longname = "Linden, GUY" + , iata = "lyd" + , lon = -58.302 + , lat = 6.015 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "llochegua" + , longname = "Llochegua, PER" + , iata = "llo" + , lon = -73.908 + , lat = -12.410 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "macapa" + , longname = "Macapa, AP" + , iata = "mcp" + , lon = -51.090 + , lat = 0.330 + , alt = 16 + , wmo = 82099 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "malalcahuello" + , longname = "Malalcahuello, CHL" + , iata = "zmh" + , lon = -71.580 + , lat = -38.470 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "manaus" + , longname = "Manaus, AM" + , iata = "mao" + , lon = -60.020 + , lat = -3.110 + , alt = 84 + , wmo = 82332 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "manaus_km34" + , longname = "Manaus - Km34, AM" + , iata = "m34" + , lon = -60.209 + , lat = -2.609 + , alt = NA + , wmo = NA + , isoilflg = 2 + , ntext = 11 + , sand = 0.200 + , clay = 0.680 + , depth = "H" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Manaus_Km34" + , yeara = 1994 + , yearz = 2006 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "manaus_bdffp" + , longname = "Manaus - BDFFP, AM" + , iata = "bdf" + , lon = -60.209 + , lat = -2.609 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "manicore" + , longname = "Manicore, AM" + , iata = "mnx" + , lon = -61.280 + , lat = -5.820 + , alt = 49 + , wmo = 82532 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "maracay" + , longname = "Maracay, VEN" + , iata = "myc" + , lon = -67.650 + , lat = 10.250 + , alt = 437 + , wmo = 80413 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "maringa" + , longname = "Maringa, PR" + , iata = "mgf" + , lon = -52.010 + , lat = -23.470 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "mariscal_estigarribia" + , longname = "Mariscal Estigarribia, PRY" + , iata = "esg" + , lon = -60.624 + , lat = -22.043 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "maracarume" + , longname = "Maracarume, MA" + , iata = "zme" + , lon = -45.954 + , lat = -2.041 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "montes_claros" + , longname = "Montes Claros, MG" + , iata = "moc" + , lon = -43.820 + , lat = -16.710 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "mojui_dos_campos" + , longname = "Mojui dos Campos, PA" + , iata = "mjs" + , lon = -54.579 + , lat = -2.767 + , alt = 128 + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "natal" + , longname = "Natal, RN" + , iata = "nat" + , lon = -35.250 + , lat = -5.920 + , alt = 49 + , wmo = 82599 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "neuquen" + , longname = "Neuquen, ARG" + , iata = "nqn" + , lon = -68.133 + , lat = -38.950 + , alt = 270 + , wmo = 87715 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "oeiras" + , longname = "Oeiras, PI" + , iata = "oei" + , lon = -42.160 + , lat = -7.020 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "palmas" + , longname = "Palmas, TO" + , iata = "pmw" + , lon = -48.360 + , lat = -10.290 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "panama" + , longname = "Panama, PAN" + , iata = "how" + , lon = -79.600 + , lat = 8.917 + , alt = 16 + , wmo = 78807 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "paramaribo" + , longname = "Paramaribo, SUR" + , iata = "pbm" + , lon = -55.150 + , lat = 5.830 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "paracou" + , longname = "Paracou, GUF" + , iata = "gyf" + , lon = -52.912 + , lat = 5.282 + , alt = NA + , wmo = NA + , isoilflg = 2 + , ntext = 6 + , sand = 0.562 + , clay = 0.345 + , depth = "C" + , isoilbc = 2 + , sldrain = 6. + , scolour = 14 + , met.driver = "Paracou" + , yeara = 1999 + , yearz = 2010 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "pedegigante" + , longname = "Pe-de-Gigante, SP" + , iata = "pdg" + , lon = -47.650 + , lat = -21.619 + , alt = NA + , wmo = NA + , isoilflg = 2 + , ntext = 2 + , sand = 0.850 + , clay = 0.030 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Pe-de-Gigante" + , yeara = 1996 + , yearz = 2004 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "petrolina" + , longname = "Petrolina, PE" + , iata = "pnz" + , lon = -40.370 + , lat = -9.165 + , alt = 383 + , wmo = 82983 + , isoilflg = 2 + , ntext = 2 + , sand = 0.821 + , clay = 0.052 + , depth = "C" + , isoilbc = 2 + , sldrain = 15. + , scolour = 14 + , met.driver = "Petrolina" + , yeara = 1999 + , yearz = 2012 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "piura" + , longname = "Piura, PER" + , iata = "piu" + , lon = -80.617 + , lat = -5.207 + , alt = 49 + , wmo = 84416 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "port_of_spain" + , longname = "Port-of-Spain, TTO" + , iata = "pos" + , lon = -61.350 + , lat = 10.583 + , alt = 15 + , wmo = 78970 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "porto_de_moz" + , longname = "Porto de Moz, PA" + , iata = "ptq" + , lon = -52.236 + , lat = -1.741 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "porto_velho" + , longname = "Porto Velho, RO" + , iata = "pvh" + , lon = -63.917 + , lat = -8.767 + , alt = 102 + , wmo = 82824 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "pucallpa" + , longname = "Pucallpa, PER" + , iata = "pcl" + , lon = -74.570 + , lat = -8.380 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "puerto_suarez" + , longname = "Puerto Suarez, BOL" + , iata = "psz" + , lon = -58.090 + , lat = -18.580 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "quibdo" + , longname = "Quibdo, COL" + , iata = "uib" + , lon = -76.640 + , lat = 5.690 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "rebio_jaru" + , longname = "Rebio Jaru, RO" + , iata = "rja" + , lon = -61.931 + , lat = -10.083 + , alt = NA + , wmo = NA + , isoilflg = 2 + , ntext = 2 + , sand = 0.800 + , clay = 0.100 + , depth = "C" + , isoilbc = 2 + , sldrain = 6 + , scolour = 14 + , met.driver = "Rebio_Jaru" + , yeara = 1994 + , yearz = 2003 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "recife" + , longname = "Recife, PE" + , iata = "rec" + , lon = -34.910 + , lat = -8.070 + , alt = 7 + , wmo = 82900 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "redencao" + , longname = "Redencao, PA" + , iata = "rdc" + , lon = -49.980 + , lat = -8.030 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "ribeirao_preto" + , longname = "Ribeirao Preto, SP" + , iata = "rao" + , lon = -47.780 + , lat = -21.140 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "rio_branco" + , longname = "Rio Branco, AC" + , iata = "rbr" + , lon = -67.890 + , lat = -9.870 + , alt = 142 + , wmo = 82917 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "riohacha" + , longname = "Riohacha, COL" + , iata = "rch" + , lon = -72.930 + , lat = 11.530 + , alt = 4 + , wmo = 80035 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "salta" + , longname = "Salta, ARG" + , iata = "sla" + , lon = -65.483 + , lat = -24.850 + , alt = 1238 + , wmo = 87047 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "salvador" + , longname = "Salvador, BA" + , iata = "ssa" + , lon = -38.517 + , lat = -13.017 + , alt = 91 + , wmo = 83229 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "san_andres" + , longname = "San Andres, COL" + , iata = "adz" + , lon = -81.717 + , lat = 12.583 + , alt = 1 + , wmo = 80001 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "san_antonio_del_tachira" + , longname = "San Antonio del Tachira, VEN" + , iata = "svz" + , lon = -72.450 + , lat = 7.850 + , alt = 378 + , wmo = 80447 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "san_jose" + , longname = "San Jose, CRI" + , iata = "sjo" + , lon = -84.217 + , lat = 9.983 + , alt = 939 + , wmo = 78762 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "san_fernando_de_apure" + , longname = "San Fernando de Apure, VEN" + , iata = "sfd" + , lon = -67.417 + , lat = 7.867 + , alt = 48 + , wmo = 80450 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "san_pedro" + , longname = "San Pedro, ARG" + , iata = "zpe" + , lon = -54.110 + , lat = -26.630 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "sao_carlos" + , longname = "Sao Carlos, SP" + , iata = "qsc" + , lon = -47.83 + , lat = -21.97 + , alt = 904 + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "sao_felix_araguaia" + , longname = "Sao Felix do Araguaia, MT" + , iata = "sxo" + , lon = -50.690 + , lat = -11.630 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "sao_felix_xingu" + , longname = "Sao Felix do Xingu, PA" + , iata = "sxx" + , lon = -51.950 + , lat = -6.640 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "sao_gabriel" + , longname = "Sao Gabriel da Cachoeira, AM" + , iata = "sjl" + , lon = -66.980 + , lat = -0.140 + , alt = 90 + , wmo = 82107 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "sao_luis" + , longname = "Sao Luis, MA" + , iata = "slz" + , lon = -44.236 + , lat = -2.586 + , alt = 53 + , wmo = 82281 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "santa_fe" + , longname = "Santa Fe, ARG" + , iata = "sfn" + , lon = -60.809 + , lat = -31.712 + , alt = 198. + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "santarem" + , longname = "Santarem, PA" + , iata = "stm" + , lon = -54.740 + , lat = -2.419 + , alt = 198. + , wmo = 82244 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "santarem_km67" + , longname = "Santarem - Km67, PA" + , iata = "s67" + , lon = -54.959 + , lat = -2.857 + , alt = 198. + , wmo = NA + , isoilflg = 2 + , ntext = 16 + , sand = 0.390 + , clay = 0.590 + , depth = "H" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Santarem_Km67" + , yeara = 1996 + , yearz = 2011 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "santarem_km77" + , longname = "Santarem - Km 77, PA" + , iata = "s77" + , lon = -54.537 + , lat = -3.012 + , alt = 33. + , wmo = NA + , isoilflg = 2 + , ntext = 16 + , sand = 0.390 + , clay = 0.590 + , depth = "H" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Santarem_Km77" + , yeara = 1996 + , yearz = 2006 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "santarem_km83" + , longname = "Santarem - Km 83, PA" + , iata = "s83" + , lon = -54.971 + , lat = -3.018 + , alt = 191 + , wmo = NA + , isoilflg = 2 + , ntext = 16 + , sand = 0.390 + , clay = 0.590 + , depth = "H" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Santarem_Km83" + , yeara = 1995 + , yearz = 2004 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "santarem_km117" + , longname = "Santarem - Km 117, PA" + , iata = "117" + , lon = -54.936 + , lat = -3.350 + , alt = 186 + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "serra_do_navio" + , longname = "Serra do Navio, AP" + , iata = "svi" + , lon = -52.000 + , lat = 0.906 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "sinop" + , longname = "Sinop, MT" + , iata = "ops" + , lon = -55.325 + , lat = -11.412 + , alt = NA + , wmo = NA + , isoilflg = 2 + , ntext = 2 + , sand = 0.840 + , clay = 0.120 + , depth = "E" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "sobral" + , longname = "Sobral, CE" + , iata = "qbx" + , lon = -40.337 + , lat = -3.679 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "tabatinga" + , longname = "Tabatinga, AM" + , iata = "tbt" + , lon = -69.667 + , lat = -3.667 + , alt = 85 + , wmo = 82411 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "tambopata" + , longname = "Tambopata, PER" + , iata = "tam" + , lon = -69.271 + , lat = -12.830 + , alt = NA + , wmo = NA + , isoilflg = 2 + , ntext = 11 + , sand = 0.400 + , clay = 0.430 + , depth = "B" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "tarauaca" + , longname = "Tarauaca, AC" + , iata = "trq" + , lon = -70.781 + , lat = -8.157 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "tefe" + , longname = "Tefe, AM" + , iata = "tff" + , lon = -64.720 + , lat = -3.380 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "teresina" + , longname = "Teresina, PI" + , iata = "the" + , lon = -42.800 + , lat = -5.090 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "tirios" + , longname = "Tirios, PA" + , iata = "obi" + , lon = -55.940 + , lat = 2.220 + , alt = 325 + , wmo = 82026 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "tolhuin" + , longname = "Tolhuin, ARG" + , iata = "tqh" + , lon = -67.222 + , lat = -54.502 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "tonzi" + , longname = "Tonzi, CA" + , iata = "tzi" + , lon = -120.894 + , lat = 38.427 + , alt = NA + , wmo = NA + , isoilflg = 2 + , ntext = 5 + , sand = 0.447 + , clay = 0.191 + , depth = "D" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Tonzi" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "vina_del_mar" + , longname = "Vina del Mar, CHL" + , iata = "kna" + , lon = -71.480 + , lat = -32.950 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "vila_franca" + , longname = "Vila Franca, PA" + , iata = "vfr" + , lon = -55.029 + , lat = -2.349 + , alt = 13 + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "vilhena" + , longname = "Vilhena, RO" + , iata = "bvh" + , lon = -60.100 + , lat = -12.730 + , alt = 612 + , wmo = 83208 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "vitoria" + , longname = "Vitoria, ES" + , iata = "vix" + , lon = -40.390 + , lat = -20.310 + , alt = 3 + , wmo = 83649 + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "xingu" + , longname = "Xingu National Park, MT" + , iata = "xgu" + , lon = -52.636 + , lat = -9.692 + , alt = NA + , wmo = NA + , isoilflg = 1 + , ntext = 1 + , sand = -1.000 + , clay = -1.000 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = 2 + )#end list +u = u + 1 +poitmp[[u]] = list( short = "yasuni" + , longname = "Yasuni, ECU" + , iata = "ysn" + , lon = -76.396 + , lat = -0.686 + , alt = NA + , wmo = NA + , isoilflg = 2 + , ntext = 4 + , sand = 0.259 + , clay = 0.255 + , depth = "F" + , isoilbc = 1 + , sldrain = 90. + , scolour = 14 + , met.driver = "Sheffield" + , yeara = 1964 + , yearz = 2009 + , iphen = -1 + )#end list +#----- Make the table global. -------------------------------------------------------------# +npoi <<- length(poitmp) +poilist = list() +for (pp in 1:npoi){ + for (n in union(names(poilist),names(poitmp[[pp]]))){ + poilist[[n]] = c(poilist[[n]],poitmp[[pp]][[n]]) + }#end for +}#end for +poilist <<- data.frame(poilist,stringsAsFactors=FALSE) +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This list has the longitude and latitude of Ke's test polygons. # +#------------------------------------------------------------------------------------------# +kztmp = list() +kztmp[[ 1]] = list(lon= -60.5,lat= 5.5) +kztmp[[ 2]] = list(lon= -61.5,lat= 4.5) +kztmp[[ 3]] = list(lon= -59.5,lat= 4.5) +kztmp[[ 4]] = list(lon= -60.5,lat= 3.5) +kztmp[[ 5]] = list(lon= -58.5,lat= 3.5) +kztmp[[ 6]] = list(lon= -56.5,lat= 3.5) +kztmp[[ 7]] = list(lon= -59.5,lat= 2.5) +kztmp[[ 8]] = list(lon= -57.5,lat= 2.5) +kztmp[[ 9]] = list(lon= -55.5,lat= 2.5) +kztmp[[ 10]] = list(lon= -58.5,lat= 1.5) +kztmp[[ 11]] = list(lon= -56.5,lat= 1.5) +kztmp[[ 12]] = list(lon= -54.5,lat= 1.5) +kztmp[[ 13]] = list(lon= -57.5,lat= 0.5) +kztmp[[ 14]] = list(lon= -55.5,lat= 0.5) +kztmp[[ 15]] = list(lon= -53.5,lat= 0.5) +kztmp[[ 16]] = list(lon= -54.5,lat= -0.5) +kztmp[[ 17]] = list(lon= -52.5,lat= -0.5) +kztmp[[ 18]] = list(lon= -53.5,lat= -1.5) +kztmp[[ 19]] = list(lon= -51.5,lat= -1.5) +kztmp[[ 20]] = list(lon= -52.5,lat= -2.5) +kztmp[[ 21]] = list(lon= -50.5,lat= -2.5) +kztmp[[ 22]] = list(lon= -72.5,lat= -10.5) +kztmp[[ 23]] = list(lon= -71.5,lat= -10.5) +kztmp[[ 24]] = list(lon= -70.5,lat= -10.5) +kztmp[[ 25]] = list(lon= -69.5,lat= -10.5) +kztmp[[ 26]] = list(lon= -68.5,lat= -10.5) +kztmp[[ 27]] = list(lon= -67.5,lat= -10.5) +kztmp[[ 28]] = list(lon= -66.5,lat= -10.5) +kztmp[[ 29]] = list(lon= -65.5,lat= -10.5) +kztmp[[ 30]] = list(lon= -64.5,lat= -10.5) +kztmp[[ 31]] = list(lon= -63.5,lat= -10.5) +kztmp[[ 32]] = list(lon= -62.5,lat= -10.5) +kztmp[[ 33]] = list(lon= -61.5,lat= -10.5) +kztmp[[ 34]] = list(lon= -60.5,lat= -10.5) +kztmp[[ 35]] = list(lon= -59.5,lat= -10.5) +kztmp[[ 36]] = list(lon= -58.5,lat= -10.5) +kztmp[[ 37]] = list(lon= -57.5,lat= -10.5) +kztmp[[ 38]] = list(lon= -56.5,lat= -10.5) +kztmp[[ 39]] = list(lon= -55.5,lat= -10.5) +kztmp[[ 40]] = list(lon= -54.5,lat= -10.5) +kztmp[[ 41]] = list(lon= -53.5,lat= -10.5) +kztmp[[ 42]] = list(lon= -52.5,lat= -10.5) +kztmp[[ 43]] = list(lon= -51.5,lat= -10.5) +kztmp[[ 44]] = list(lon= -50.5,lat= -10.5) +kztmp[[ 45]] = list(lon= -49.5,lat= -10.5) +kztmp[[ 46]] = list(lon= -72.5,lat= -11.5) +kztmp[[ 47]] = list(lon= -71.5,lat= -11.5) +kztmp[[ 48]] = list(lon= -70.5,lat= -11.5) +kztmp[[ 49]] = list(lon= -69.5,lat= -11.5) +kztmp[[ 50]] = list(lon= -68.5,lat= -11.5) +kztmp[[ 51]] = list(lon= -67.5,lat= -11.5) +kztmp[[ 52]] = list(lon= -66.5,lat= -11.5) +kztmp[[ 53]] = list(lon= -65.5,lat= -11.5) +kztmp[[ 54]] = list(lon= -64.5,lat= -11.5) +kztmp[[ 55]] = list(lon= -63.5,lat= -11.5) +kztmp[[ 56]] = list(lon= -62.5,lat= -11.5) +kztmp[[ 57]] = list(lon= -61.5,lat= -11.5) +kztmp[[ 58]] = list(lon= -60.5,lat= -11.5) +kztmp[[ 59]] = list(lon= -59.5,lat= -11.5) +kztmp[[ 60]] = list(lon= -58.5,lat= -11.5) +kztmp[[ 61]] = list(lon= -57.5,lat= -11.5) +kztmp[[ 62]] = list(lon= -56.5,lat= -11.5) +kztmp[[ 63]] = list(lon= -55.5,lat= -11.5) +kztmp[[ 64]] = list(lon= -54.5,lat= -11.5) +kztmp[[ 65]] = list(lon= -53.5,lat= -11.5) +kztmp[[ 66]] = list(lon= -52.5,lat= -11.5) +kztmp[[ 67]] = list(lon= -51.5,lat= -11.5) +kztmp[[ 68]] = list(lon= -50.5,lat= -11.5) +kztmp[[ 69]] = list(lon= -49.5,lat= -11.5) +kztmp[[ 70]] = list(lon= -72.5,lat= -12.5) +kztmp[[ 71]] = list(lon= -71.5,lat= -12.5) +kztmp[[ 72]] = list(lon= -70.5,lat= -12.5) +kztmp[[ 73]] = list(lon= -69.5,lat= -12.5) +kztmp[[ 74]] = list(lon= -68.5,lat= -12.5) +kztmp[[ 75]] = list(lon= -67.5,lat= -12.5) +kztmp[[ 76]] = list(lon= -66.5,lat= -12.5) +kztmp[[ 77]] = list(lon= -65.5,lat= -12.5) +kztmp[[ 78]] = list(lon= -64.5,lat= -12.5) +kztmp[[ 79]] = list(lon= -63.5,lat= -12.5) +kztmp[[ 80]] = list(lon= -62.5,lat= -12.5) +kztmp[[ 81]] = list(lon= -61.5,lat= -12.5) +kztmp[[ 82]] = list(lon= -60.5,lat= -12.5) +kztmp[[ 83]] = list(lon= -59.5,lat= -12.5) +kztmp[[ 84]] = list(lon= -58.5,lat= -12.5) +kztmp[[ 85]] = list(lon= -57.5,lat= -12.5) +kztmp[[ 86]] = list(lon= -56.5,lat= -12.5) +kztmp[[ 87]] = list(lon= -55.5,lat= -12.5) +kztmp[[ 88]] = list(lon= -54.5,lat= -12.5) +kztmp[[ 89]] = list(lon= -53.5,lat= -12.5) +kztmp[[ 90]] = list(lon= -52.5,lat= -12.5) +kztmp[[ 91]] = list(lon= -51.5,lat= -12.5) +kztmp[[ 92]] = list(lon= -50.5,lat= -12.5) +kztmp[[ 93]] = list(lon= -49.5,lat= -12.5) +kztmp[[ 94]] = list(lon= -72.5,lat= -13.5) +kztmp[[ 95]] = list(lon= -71.5,lat= -13.5) +kztmp[[ 96]] = list(lon= -70.5,lat= -13.5) +kztmp[[ 97]] = list(lon= -69.5,lat= -13.5) +kztmp[[ 98]] = list(lon= -68.5,lat= -13.5) +kztmp[[ 99]] = list(lon= -67.5,lat= -13.5) +kztmp[[100]] = list(lon= -66.5,lat= -13.5) +kztmp[[101]] = list(lon= -65.5,lat= -13.5) +kztmp[[102]] = list(lon= -64.5,lat= -13.5) +kztmp[[103]] = list(lon= -63.5,lat= -13.5) +kztmp[[104]] = list(lon= -62.5,lat= -13.5) +kztmp[[105]] = list(lon= -61.5,lat= -13.5) +kztmp[[106]] = list(lon= -60.5,lat= -13.5) +kztmp[[107]] = list(lon= -59.5,lat= -13.5) +kztmp[[108]] = list(lon= -58.5,lat= -13.5) +kztmp[[109]] = list(lon= -57.5,lat= -13.5) +kztmp[[110]] = list(lon= -56.5,lat= -13.5) +kztmp[[111]] = list(lon= -55.5,lat= -13.5) +kztmp[[112]] = list(lon= -54.5,lat= -13.5) +kztmp[[113]] = list(lon= -53.5,lat= -13.5) +kztmp[[114]] = list(lon= -52.5,lat= -13.5) +kztmp[[115]] = list(lon= -51.5,lat= -13.5) +kztmp[[116]] = list(lon= -50.5,lat= -13.5) +kztmp[[117]] = list(lon= -49.5,lat= -13.5) +kztmp[[118]] = list(lon= -62.5,lat= -16.5) +kztmp[[119]] = list(lon= -60.5,lat= -2.5 ) +kztmp[[120]] = list(lon= -54.5,lat= -2.5 ) +kztmp[[121]] = list(lon= -54.5,lat= -3.5 ) +kztmp[[122]] = list(lon= -50.5,lat= -9.5 ) +kztmp[[123]] = list(lon= -69.5,lat= -3.5 ) +kztmp[[124]] = list(lon= -69.5,lat= -4.5 ) +kztmp[[125]] = list(lon= -52.5,lat= -5.5 ) +kztmp[[126]] = list(lon= -73.5,lat= -5.5 ) +#----- Make the table global. -------------------------------------------------------------# +nkzpoly <<- length(kztmp) +kzlist = list() +for (kz in 1:nkzpoly){ + for (n in union(names(kzlist),names(kztmp[[kz]]))){ + kzlist[[n]] = c(kzlist[[n]],kztmp[[kz]][[n]]) + }#end for +}#end for +kzlist <<- kzlist +#------------------------------------------------------------------------------------------# diff --git a/R-utils/marthews.rlong.r b/R-utils/marthews.rlong.r new file mode 100644 index 000000000..400a1e412 --- /dev/null +++ b/R-utils/marthews.rlong.r @@ -0,0 +1,521 @@ +#==========================================================================================# +#==========================================================================================# +# This function predicts the longwave radiation using the "CDO" scheme as presented # +# at: # +# # +# Marthews, T. R., Y. Malhi, H. Iwata, 2012: Calculating downward longwave radiation under # +# clear and cloudy conditions over a tropical lowland forest site: an evaluation of # +# model schemes for hourly data. Theor. Appl. Climatol., 107, 461-477. # +# # +# x is the set of parameters that are optimised for the dataset. # +#------------------------------------------------------------------------------------------# +rlong.in.mmi.predict <<- function(x,scheme,datum){ + + #---------------------------------------------------------------------------------------# + # Estimate emissivity, based on the chosen scheme. # + #---------------------------------------------------------------------------------------# + if (scheme == "cij"){ + + #----- Idso and Jackson (1969). -----------------------------------------------------# + emiss.csky = NA * datum$atm.ph2o + f.cloud = NA * datum$tau + emiss.eff = 1.0 + x[1] * exp(x[2] * (273 - datum$atm.tmp)^2) + cld.tmp = datum$atm.tlcl + #------------------------------------------------------------------------------------# + + }else if (scheme == "cid"){ + + #----- Idso (1981). -----------------------------------------------------------------# + emiss.csky = NA * datum$atm.ph2o + f.cloud = NA * datum$tau + emiss.eff = x[1] + x[2] * datum$atm.pvap * exp (x[3] / datum$atm.tmp) + cld.tmp = datum$atm.tlcl + #------------------------------------------------------------------------------------# + + }else if (scheme == "cdo"){ + + #----- Dilley and O'Brien (1998), model B. ------------------------------------------# + emiss.csky = NA * datum$atm.ph2o + f.cloud = NA * datum$tau + emiss.eff = ( (x[1] + x[2] * (datum$atm.tmp/t3ple)^6 + + x[3] * sqrt(datum$atm.ph2o/25) ) + / (stefan * datum$atm.tlcl^4 ) ) + cld.tmp = datum$atm.tlcl + #------------------------------------------------------------------------------------# + + }else if (scheme == "cmu"){ + + #----- Monteith and Unsworth (2008). ------------------------------------------------# + emiss.csky = NA * datum$atm.ph2o + f.cloud = NA * datum$tau + emiss.eff = ( x[1] + x[2] * stefan * datum$atm.tmp^4) / (stefan * datum$atm.tlcl^4) + cld.tmp = datum$atm.tlcl + #------------------------------------------------------------------------------------# + + + }else if (scheme == "amu"){ + + #----- Clear sky, from Monteith and Unsworth (2008). --------------------------------# + emiss.csky = ( x[1] + x[2] * stefan * datum$atm.tmp^4) / (stefan * datum$atm.tlcl^4) + #------------------------------------------------------------------------------------# + + #----- Cloud cover from Black (1956). -----------------------------------------------# + k.crit = x[5] - x[4]^2 / (4. * x[3]) + use.kappa = pmin(k.crit,datum$kappa) + f.cloud = ( x[4] - sqrt(x[4]^2 - 4. * x[3] * ( x[5] - use.kappa)) ) / (2. * x[3]) + f.cloud = pmax(0.,pmin(1,f.cloud)) + #------------------------------------------------------------------------------------# + + + #----- Correction for overcast emissivity (Monteith and Unsworth 2008). -------------# + oc.fac = 1.0 - 4.0 * (datum$atm.tmp - datum$atm.tlcl) / datum$atm.tmp + emiss.eff = (1.0 - oc.fac * f.cloud) * emiss.csky + oc.fac * f.cloud + #------------------------------------------------------------------------------------# + + + #----- Cloud temperature, assumed to be the LCL. ------------------------------------# + cld.tmp = datum$atm.tlcl + #------------------------------------------------------------------------------------# + }else if (scheme == "alm"){ + + #----- Idso (1981). -----------------------------------------------------------------# + emiss.csky = x[1] + x[2] * datum$atm.pvap * exp (x[3] / datum$atm.tmp) + #------------------------------------------------------------------------------------# + + + #----- Stockli et al. (2007), the LBA-MIP. ------------------------------------------# + f.cloud = (1.0 - datum$tau)^2 + emiss.eff = emiss.csky * (1.0 + x[4] * f.cloud) + #------------------------------------------------------------------------------------# + + + #----- Cloud temperature, assumed to be the LCL. ------------------------------------# + cld.tmp = datum$atm.tlcl + #------------------------------------------------------------------------------------# + + }else if (scheme == "adk"){ + + #----- Dilley and O'Brien (1998), model B. ------------------------------------------# + emiss.csky = ( (x[1] + x[2] * (datum$atm.tmp/t3ple)^6 + + x[3] * sqrt(datum$atm.ph2o/25) ) / (stefan * datum$atm.tlcl^4 ) ) + #------------------------------------------------------------------------------------# + + #----- Cloud cover by Kasten and Czeplak (1980). ------------------------------------# + f.cloud = (x[4] * (1.0 - datum$tau))^x[5] + f.cloud = pmax(0.0,pmin(1.0,f.cloud)) + #------------------------------------------------------------------------------------# + + #----- Dilley-Kimball scheme from Flerchinger et al. (2009). ------------------------# + emiss.8z = x[6] + x[7] * datum$atm.pvap^2 * exp (x[8]/datum$atm.tmp) + f.8i = x[9] + x[10] * datum$atm.tlcl + x[11] * datum$atm.tlcl^2 + emiss.eff = ( emiss.csky + + (1.0 - emiss.8z * (1 + x[12]*(1 - emiss.8z))) * f.cloud * f.8i ) + #------------------------------------------------------------------------------------# + + + #----- Cloud temperature, assumed to be the LCL. ------------------------------------# + cld.tmp = datum$atm.tlcl + #------------------------------------------------------------------------------------# + }else if (scheme == "aml"){ + #------------------------------------------------------------------------------------# + # Not yet published method by Longo et al., based on Monteith and Unsworth (2008) # + # and Marthews et al. (2012), but applying a relative humidity correction to the # + # cloud temperature, and using the inverse of logistic function to predict the clear # + # sky emissivity and cloud cover (so the functions are always bounded). # + #------------------------------------------------------------------------------------# + + + #---- Estimate clear-sky emissivity. ------------------------------------------------# + emiss.csky = x[1] + (1. - x[1]) * inv.logit(x[2] * (datum$atm.ph2o+x[3])) + #------------------------------------------------------------------------------------# + + + + #---- Estimate the cloud cover. -----------------------------------------------------# + f.cloud = 1. - inv.logit(x[4] * (datum$kappa+x[5])) + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Estimate cloud temperature. This is really a really simple way of doing it, # + # we simply penalise the drier days by making the TLCL cooler. # + #------------------------------------------------------------------------------------# + cld.tmp = (x[6] + (1. - x[6]) * datum$atm.rhv) * datum$atm.tlcl + #------------------------------------------------------------------------------------# + + + + #---- Estimate the effective emissivity. --------------------------------------------# + emiss.eff = emiss.csky * (datum$atm.tmp/cld.tmp)^4 + f.cloud * (1.0 - emiss.csky) + #------------------------------------------------------------------------------------# + + + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Estimate longwave radiation. # + #---------------------------------------------------------------------------------------# + rlong.in = emiss.eff * stefan * cld.tmp ^ 4 + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Update effective emissivity so it is based on air temperature. # + #---------------------------------------------------------------------------------------# + emiss.eff = emiss.eff * ( cld.tmp / datum$atm.tmp ) ^ 4 + #---------------------------------------------------------------------------------------# + + ans = list( rlong.in = rlong.in + , emiss.csky = emiss.csky + , emiss.eff = emiss.eff + , f.cloud = f.cloud + , cld.tmp = cld.tmp + )#end list + return(ans) +}#end predict +#==========================================================================================# +#==========================================================================================# + + + + + +#==========================================================================================# +#==========================================================================================# +# This function finds the support assuming that the residuals are independent and # +# normally distributed, which is quite a big assumption... # +#------------------------------------------------------------------------------------------# +rlong.in.mmi.support <<- function(x,scheme,sigma,datum){ + + #----- Solve long wave for this set of parameters. -------------------------------------# + rlong.in.try = rlong.in.mmi.predict(x,scheme,datum)$rlong.in + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Determine the residuals and find the standard deviation. We do not find the mean # + # residual (bias), because we want to find the parameters that are the closest to # + # unbiased distributions. # + #---------------------------------------------------------------------------------------# + residual = rlong.in.try - datum$rlong.in + sdev.residual = sd(residual,na.rm=TRUE) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Since we don't know the distribution of the residual a priori, we must include # + # the variance in the support, but force the mean to be 0. # + #---------------------------------------------------------------------------------------# + support = sum(dnorm(residual,mean=0,sd=sdev.residual,log=TRUE),na.rm=TRUE) + #---------------------------------------------------------------------------------------# + + return(support) +}#end function rlong.in.mmi.support +#==========================================================================================# +#==========================================================================================# + + + + + +#==========================================================================================# +#==========================================================================================# +# This function models the incoming longwave radiation using some of the approaches # +# by: # +# # +# Marthews, T. R., Y. Malhi, H. Iwata, 2012: Calculating downward longwave radiation under # +# clear and cloudy conditions over a tropical lowland forest site: an evaluation of # +# model schemes for hourly data. Theor. Appl. Climatol., 107, 461-477. # +# # +#------------------------------------------------------------------------------------------# +rlong.in.mmi.optim <<- function(datum,run.optim=FALSE,keep.day=TRUE,keep.ngt=TRUE + ,scheme=NULL,verbose=FALSE){ + + + + + #----- List with all schemes available. ------------------------------------------------# + avail.schemes = list() + avail.schemes[[ 1]] = list( name = "cij" + , desc = "Idso and Jackson (1969)" + , n.par = 2 + , x.def = c(-0.261, -7.77e-4) + )#end list + avail.schemes[[ 2]] = list( name = "cid" + , desc = "Idso (1981)" + , n.par = 3 + , x.def = c(0.7, 5.95e-7,1500.) + )#end list + avail.schemes[[ 3]] = list( name = "cdo" + , desc = "Dilley and O'Brien (1998), model B" + , n.par = 3 + , x.def = c(59.38, 113.7,96.96) + )#end.list + avail.schemes[[ 4]] = list( name = "cmu" + , desc = "Clear sky - Monteith and Unsworth (2008)" + , n.par = 2 + , x.def = c(-119.0,1.06) + )#end.list + avail.schemes[[ 5]] = list( name = "amu" + , desc = "All skies - Monteith and Unsworth (2008)" + , n.par = 5 + , x.def = c(-119.0,1.06,-0.458,0.34,0.803) + )#end.list + avail.schemes[[ 6]] = list( name = "alm" + , desc = "All skies - Stockli et al. (2007), LBA-MIP" + , n.par = 4 + , x.def = c(0.7,5.95e-7,1500.,0.3) + )#end.list + avail.schemes[[ 7]] = list( name = "adk" + , desc = "All skies - Flerchinger et al. (2009), DK scheme" + , n.par = 12 + , x.def = c(59.38,113.7,96.96,4./3.,1/3.4,0.24,2.98e-12,3000. + ,-0.6732,6.24e-3,-9.14e-6,0.4) + )#end.list + avail.schemes[[ 8]] = list( name = "aml" + , desc = "All skies - Longo et al. (2012)" + , n.par = 6 + , x.def = c(0.7161,0.02572,-46.63,9.205,-0.500,0.324) + )#end.list + n.avail.schemes = length(avail.schemes) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Find out which schemes to use. # + #---------------------------------------------------------------------------------------# + name.schemes = unlist(sapply(X=avail.schemes,FUN=sapply,c,simplify=TRUE)[1,]) + if (is.null(scheme)){ + sel.schemes = sequence(n.avail.schemes) + }else{ + sel.schemes = match(scheme,name.schemes) + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Estimate some auxiliary thermodynamic and radiation properties. # + #---------------------------------------------------------------------------------------# + #----- Precipitable water. -------------------------------------------------------------# + cat (" - Precipitable water...","\n") + datum$atm.ph2o = 4.65 * datum$atm.pvap / datum$atm.tmp + #----- LCL (assumed to be the cloud base). ---------------------------------------------# + cat (" - LCL temperature (cloud base)...","\n") + atm.theta = datum$atm.tmp * (p00 / datum$atm.prss)^rocp + lcl = lcl.il(thil=atm.theta,pres=datum$atm.prss,temp=datum$atm.tmp + ,hum=datum$atm.pvap,type.hum="pvap") + datum$atm.tlcl = lcl$temp + #----- Tau, defined here as the ratio between actual and clear sky. --------------------# + cat (" - Tau, rshort/rshort(clear)...","\n") + datum$tau = datum$rshort.in / pmax(datum$rshort.in,datum$rshort.pot) + datum$tau[! datum$highsun] = NA + datum$tau = na.fill(na.approx(datum$tau,na.rm=FALSE),"extend") + datum$tau = pmin(1.,pmax(0.,datum$tau)) + #----- Kappa, defined here as the ratio between actual radiation and TOA shortwave. ----# + cat (" - Kappa, rshort/rshort(TOA)...","\n") + datum$kappa = ( datum$rshort.in + / pmax(datum$rshort.in,solar * datum$cosz) ) + datum$kappa[! datum$highsun] = NA + datum$kappa = na.fill(na.approx(datum$kappa,na.rm=FALSE),"extend") + datum$kappa = pmin(1.,pmax(0.,datum$kappa)) + #----- Split the time series into diel and season indices. -----------------------------# + cat (" - Splitting time series into hours and seasons...","\n") + diel = datum$hour + un.diel = unique(diel) + idx.diel = match(diel,un.diel) + mon2season = c( 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 1) + season = mon2season[datum$month] + un.season = sort(unique(season)) + idx.season = match(season,un.season) + #----- Find the standard deviation for weighted least squares. -------------------------# + cat (" - S.D. of incoming longwave, by hour and season ...","\n") + sigma.hrse = tapply(X=datum$rlong.in,INDEX=list(diel,season),FUN=sd,na.rm=TRUE) + idx = cbind(idx.diel,idx.season) + sigma = sigma.hrse[idx] + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Test only with the actual data. We only try to estimate the goodness of the fit # + # in case longwave radiation has some actual data. # + #---------------------------------------------------------------------------------------# + if (any(datum$gfflg.rlong.in == 0 & is.finite(datum$rlong.in),na.rm=TRUE)){ + fit.use = ( datum$gfflg.rlong.in == 0 & is.finite(datum$rlong.in) + & is.finite(datum$atm.prss) & is.finite(datum$atm.tmp) + & is.finite(datum$atm.pvap) & is.finite(datum$rshort.in) ) + }else{ + if (run.optim){ + warning(" No longwave radiation, skip fitting and use defaults...") + }#end if + fit.use = ( is.finite(datum$atm.prss) & is.finite(datum$atm.tmp) + & is.finite(datum$atm.pvap) & is.finite(datum$rshort.in) ) + run.optim = FALSE + }#end if + if (keep.day & keep.ngt){ + pred.use = rep(TRUE,times=length(datum$rlong.in)) + }else if (keep.day){ + fit.use = fit.use & datum$highsun + pred.use = datum$highsun + }else if (keep.ngt){ + fit.use = fit.use & (! datum$highsun) + pred.use = ! datum$highsun + }else{ + stop(" At least one between keep.day and keep.ngt must be TRUE...") + }#end if + n.fit.use = sum(fit.use) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Loop over all schemes that we should solve. # + #---------------------------------------------------------------------------------------# + ans = list() + attributes(ans) = list( run.optim = run.optim + , keep.day = keep.day + , keep.ngt = keep.ngt + , scheme = name.schemes[sel.schemes] + )#end list + for (s in sel.schemes){ + this = avail.schemes[[s]] + + #------------------------------------------------------------------------------------# + # Check whether to optimise the scheme or not. # + #------------------------------------------------------------------------------------# + if (run.optim){ + cat (" - Run the optimiser for ",this$desc,"...","\n") + datum.fit = datum[fit.use,] + opt = optim( par = this$x.def + , fn = rlong.in.mmi.support + , datum = datum[fit.use,] + , sigma = sigma + , scheme = this$name + , control = list( trace = verbose + , fnscale = -1 + , maxit = 30000 + , rel.tol = 1.e-9 + , REPORT = 1 + )#end list + , hessian = TRUE + )#end optim + fine = opt$convergence == 0 + if (! fine) cat (" > Optimiser didn't converge, use default instead...","\n") + }else{ + cat (" - Check goodness of fit for ",this$desc,"...","\n") + fine = FALSE + }#end if + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Check whether the optimiser worked or not. If it didn't, or if the user # + # preferred to use the default values, then use the default coefficients. # + #------------------------------------------------------------------------------------# + if (! fine){ + this$convergence = FALSE + this$coefficients = this$x.def + this$support = rlong.in.mmi.support( x = this$coefficients + , scheme = this$name + , sigma = sigma + , datum = datum[fit.use,] + )#end rlong.in.mmi.support + }else{ + this$convergence = TRUE + this$coefficients = opt$par + this$support = opt$value + }#end if + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # The remaining values are common for the convergence and non convergence. # + #------------------------------------------------------------------------------------# + this$hessian = hessian( func = rlong.in.mmi.support + , x = this$coefficients + , scheme = this$name + , sigma = sigma + , datum = datum[fit.use,] + , method.args = list( eps = 1.e-4 + , d = 0.0001 + , r = 14 + , v = 2 + , zero.tol=sqrt(.Machine$double.eps) + ) + )#end hessian + this$df = n.fit.use - this$n.par + attempt = try(solve(- this$hessian),silent=TRUE) + if ("try-error" %in% is(attempt)){ + warning(" > Cannot solve the Information matrix...") + this$std.err = NA * this$coefficients + }else{ + this$std.err = sqrt(this$coefficients^2 * diag(solve(- this$hessian))) + }#end if + #------------------------------------------------------------------------------------# + + this$t.value = this$coefficients / this$std.err + this$p.value = 2.0 * pt(-abs(this$t.value),df=this$df) + myfit = rlong.in.mmi.predict( x = this$coefficients + , scheme = this$name + , datum = datum + )#end rlong.in.mmi.predict + this$fitted.values = myfit$rlong.in + this$emiss.csky = myfit$emiss.csky + this$emiss.eff = myfit$emiss.eff + this$f.cloud = myfit$f.cloud + this$cld.tmp = myfit$cld.tmp + this$atm.ph2o = datum$atm.ph2o + this$atm.tlcl = datum$atm.tlcl + this$tau = datum$tau + this$kappa = datum$kappa + this$lsq.weights = 1. / sigma^2 + this$residuals = this$fitted.values - datum$rlong.in + this$fit.sel = fit.use + this$predict.sel = pred.use + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Eliminate residual values that were not used for fitting and fitted values for # + # points in which this fitting should not be applied. # + #------------------------------------------------------------------------------------# + this$fitted.values [ ! pred.use] = NA + this$residuals [ ! fit.use ] = NA + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Estimate the global standard error and R2. # + #------------------------------------------------------------------------------------# + ss.err = sum(this$residuals[fit.use]^2) + df.err = this$df + mean.y = mean(datum$rlong.in[fit.use]) + ss.tot = sum((datum$rlong.in[fit.use]-mean.y)^2) + df.tot = n.fit.use - 1 + this$r.square = 1.0 - ss.err * df.tot / ( ss.tot * df.err ) + this$sigma = sqrt(ss.err / this$df) + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Save this result to the global list. # + #------------------------------------------------------------------------------------# + ans[[this$name]] = this + #------------------------------------------------------------------------------------# + }#end for (s in 1:n.schemes) + #---------------------------------------------------------------------------------------# + + return(ans) +}#end function rlong.in.mmi.lnlike +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/mcd12q1.map.r b/R-utils/mcd12q1.map.r new file mode 100644 index 000000000..25d1f52e2 --- /dev/null +++ b/R-utils/mcd12q1.map.r @@ -0,0 +1,126 @@ +#==========================================================================================# +#==========================================================================================# +# Function colourmap # +# # +# Given the x and y coordinates, this function will plot the vegetation values (modis) # +# with a colour scheme but no interpolation... # +#------------------------------------------------------------------------------------------# +mcd12q1.map = function( x = seq(from=0,to=1,len=nrow(z)) + , y = seq(from=0,to=1,len=ncol(z)) + , z + , xlim = range(x,finite=TRUE) + , ylim = range(y,finite=TRUE) + , zlim = range(v,finite=TRUE) + , highlight = matrix(data=rep(FALSE,times=length(z)) + ,nrow=nrow(z),ncol=ncol(z)) + , na.col="gray94",plot.title,plot.axes + , col.highlight="red3" + , asp=NA,xaxs="i",yaxs="i",las=1,axes=TRUE,frame.plot=axes,pch=15 + , cex=1.0,...){ + + + modis.col = c("midnightblue","steelblue3","#004E00","deepskyblue","chartreuse4" + ,"orange1","lawngreen","lightgoldenrod4","darkseagreen3","gray30" + ,"lightskyblue3","saddlebrown",col.highlight,"gray80") + modis.leg = c("H2O","ENT","EBT","DNT","DBT","SHR","GRS","CER","BLC","URB","ICE","DES" + ,"USE","UND") + n.modis = length(modis.leg) + modis.val = c(0,1,2,3,4,5,6,7,8,9,10,11,12,13) + modis.bks = c(modis.val[1]-0.5,modis.val+0.5) + modis.at = sequence(n.modis) + z[! z %in% modis.val] = 13 + z[highlight] = 12 + + + #----- Check which kind of input was given. --------------------------------------------# + if (missing(z)) { + #----- No z was given x must be a list or the user didn't provide any axis... -------# + if (!missing(x)) { + if (is.list(x)) { + #----- X is a list, copy the elements to variables. ---------------------------# + z = x$z + y = x$y + x = x$x + }else{ + #----- x is an array, make up some x axis. ------------------------------------# + z = x + x = seq(0, 1, len = length(z)) + }#end if + }else{ + #----- Bad setting. -------------------------------------------------------------# + stop("no `z' variable specified") + }#end if + }else if (is.list(x)) { + #----- Z is there, just need to check whether x and y were given as a list... ------# + y = x$y + x = x$x + }#end if + + #----- Save the margins to avoid losing the data. --------------------------------------# + mar.orig = (par.orig = par(c("mar", "las", "mfrow")))$mar + on.exit(par(par.orig)) + + #----- Split the screen into 2. --------------------------------------------------------# + w = (3 + mar.orig[2]) * par("csi") * 2.54 + layout(matrix(c(2, 1), nc = 2), widths = c(1, lcm(w))) + par(las = las) + mar = mar.orig + mar[4] = mar[2] + mar[2] = 1 + + #----- First plot: the key scale. ------------------------------------------------------# + par(mar = mar) + plot.new() + #----- Decide whether the scale is logarithmic or not. ---------------------------------# + plot.window(xlim=c(0,1),ylim=c(0.5,n.modis+0.5),xaxs="i",yaxs="i") + + #----- Draw the colour bar. ------------------------------------------------------------# + rect(xleft=0,ybottom=seq(0.5,n.modis-0.5,1),xright=1,ytop=seq(1.5,n.modis+0.5,1) + ,col=modis.col,border="black") + + #----- Check whether there are specific instructions for plotting the key axis. --------# + if (axes){ + axis(side=4,at=modis.at,labels=modis.leg) + }#end if + + #----- Draw box. -----------------------------------------------------------------------# + box() + + #----- Now we plot the filled contour. -------------------------------------------------# + mar = mar.orig + mar[4] = 1 + par(mar = mar) + plot.new() + plot.window(xlim=xlim,ylim=ylim,log="", xaxs = xaxs, yaxs = yaxs, asp = asp) + + #---------------------------------------------------------------------------------------# + # Split z into the breaks defined by the colour palette. # + #---------------------------------------------------------------------------------------# + zcol = modis.col[match(z,modis.val)] + zcol[is.na(zcol)] = na.col + + #----- Call the function that actually plots the data. ---------------------------------# + image(x=x,y=y,z=z,add=TRUE,col=modis.col,breaks=modis.bks,...) + + #----- Check whether there are especial instructions for plotting the axes. ------------# + if (missing(plot.axes)) { + if (axes) { + axis(1) + axis(2) + } + }else{ + plot.axes + }#end if + + if (frame.plot) box() + #----- Check whether there are especial instructions for plotting the title. -----------# + if (missing(plot.title)){ + if (axes) title(main = "", xlab = "", ylab = "",...) + }else{ + plot.title + }#end if + + invisible() +}#end function simbrazil +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/monthly.template.r b/R-utils/monthly.template.r new file mode 100644 index 000000000..91a9b5277 --- /dev/null +++ b/R-utils/monthly.template.r @@ -0,0 +1,1171 @@ +#==========================================================================================# +#==========================================================================================# +# Create the monthly mean structure to be filled by plot_monthly.r # +#------------------------------------------------------------------------------------------# +create.monthly <<- function(ntimes,montha,yeara,inpref,slz.min){ + + #----- Read the first HDF5 to grab some simulation-dependent dimensions. ---------------# + cyear = sprintf("%4.4i",yeara ) + cmonth = sprintf("%2.2i",montha) + h5first = paste(inpref,"-Q-",cyear,"-",cmonth,"-00-000000-g01.h5" ,sep="") + h5first.bz2 = paste(inpref,"-Q-",cyear,"-",cmonth,"-00-000000-g01.h5.bz2",sep="") + if ( file.exists(h5first) ){ + mymont = hdf5load(file=h5first,load=FALSE,verbosity=0,tidy=TRUE) + + }else if ( file.exists(h5first.bz2) ){ + temp.file = file.path(tempdir(),basename(h5first)) + dummy = bunzip2(filename=h5first.bz2,destname=temp.file,remove=FALSE) + mymont = hdf5load(file=temp.file,load=FALSE,verbosity=0,tidy=TRUE) + dummy = file.remove(temp.file) + + }else{ + cat (" Path: ",dirname (h5first),"\n") + cat (" File: ",basename(h5first),"\n") + stop(" File not found...") + + }#end if + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Start up the list. # + #---------------------------------------------------------------------------------------# + ed = list() + #---------------------------------------------------------------------------------------# + + + #----- Define the number of soil layers. -----------------------------------------------# + ed$nzg = mymont$NZG + ed$nzs = mymont$NZS + ed$ndcycle = mymont$NDCYCLE + ed$ntimes = ntimes + #---------------------------------------------------------------------------------------# + + + + #----- Find which soil are we solving, and save properties into soil.prop. -------------# + ed$isoilflg = mymont$ISOILFLG + ed$slz = mymont$SLZ + ed$slxsand = mymont$SLXSAND + ed$slxclay = mymont$SLXCLAY + ed$ntext = mymont$NTEXT.SOIL[ed$nzg] + #---------------------------------------------------------------------------------------# + + + + #----- Derive the soil properties. -----------------------------------------------------# + ed$soil.prop = soil.params(ed$ntext,ed$isoilflg,ed$slxsand,ed$slxclay) + ed$dslz = diff(c(ed$slz,0)) + ed$soil.depth = rev(cumsum(rev(ed$dslz))) + ed$soil.dry = rev(cumsum(rev(ed$soil.prop$soilcp * wdns * ed$dslz))) + ed$soil.poro = rev(cumsum(rev(ed$soil.prop$slmsts * wdns * ed$dslz))) + #---------------------------------------------------------------------------------------# + + + #----- Find the layers we care about. --------------------------------------------------# + sel = ed$slz < slz.min + if (any(sel)){ + ed$ka = which.max(ed$slz[sel]) + }else{ + ed$ka = 1 + }#end if + ed$kz = ed$nzg + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Find all time information. # + #---------------------------------------------------------------------------------------# + runmonths = montha + sequence(ntimes) - 1 + ed$month = 1 + (runmonths-1) %% 12 + ed$year = yeara - 1 + ceiling(runmonths/12) + ed$when = chron(paste(ed$month,1,ed$year,sep="/")) + ed$tomonth = chron(ed$when,out.format=c(dates="day-mon-yr",times=NULL)) + ed$toyear = sort(unique(ed$year)) + #----- Count the number of months for each month. --------------------------------------# + ed$montable = rep(0,times=12) + montable = table(ed$month) + idx = as.numeric(names(montable)) + ed$montable[idx] = montable + ed$moncnt = matrix( data = rep(ed$montable,times=ed$ndcycle) + , ncol = ed$ndcycle + , nrow = 12 + )#end matrix + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find all the file names. # + #---------------------------------------------------------------------------------------# + cmonth = sprintf("%2.2i",ed$month) + cyear = sprintf("%4.4i",ed$year ) + ed$input = paste(inpref,"-Q-",cyear,"-",cmonth,"-00-000000-g01.h5",sep="") + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Make a copy of the dimensions to avoid clutter. # + #---------------------------------------------------------------------------------------# + ndcycle = ed$ndcycle + nzg = ed$nzg + nzs = ed$nzs + #---------------------------------------------------------------------------------------# + + + + #=======================================================================================# + #=======================================================================================# + # Flush all variables that will hold the data. For convenience they are split into # + # multiple lists. # + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # emean -- variables that we can either compare directly with observations, or are # + # or that may be used to draw time series. They don't need to be really # + # monthly means, but you should put only the variables that make sense to be # + # plotted in simple time series (with no PFT or DBH information). # + #---------------------------------------------------------------------------------------# + emean = list() + emean$fast.soil.c = rep(NA,times=ntimes) + emean$slow.soil.c = rep(NA,times=ntimes) + emean$struct.soil.c = rep(NA,times=ntimes) + emean$het.resp = rep(NA,times=ntimes) + emean$cwd.resp = rep(NA,times=ntimes) + emean$gpp = rep(NA,times=ntimes) + emean$npp = rep(NA,times=ntimes) + emean$plant.resp = rep(NA,times=ntimes) + emean$leaf.resp = rep(NA,times=ntimes) + emean$root.resp = rep(NA,times=ntimes) + emean$growth.resp = rep(NA,times=ntimes) + emean$reco = rep(NA,times=ntimes) + emean$mco = rep(NA,times=ntimes) + emean$cba = rep(NA,times=ntimes) + emean$cbamax = rep(NA,times=ntimes) + emean$cbalight = rep(NA,times=ntimes) + emean$cbamoist = rep(NA,times=ntimes) + emean$cbarel = rep(NA,times=ntimes) + emean$ldrop = rep(NA,times=ntimes) + emean$nep = rep(NA,times=ntimes) + emean$nee = rep(NA,times=ntimes) + emean$cflxca = rep(NA,times=ntimes) + emean$cflxst = rep(NA,times=ntimes) + emean$ustar = rep(NA,times=ntimes) + emean$atm.vels = rep(NA,times=ntimes) + emean$atm.prss = rep(NA,times=ntimes) + emean$atm.temp = rep(NA,times=ntimes) + emean$atm.shv = rep(NA,times=ntimes) + emean$atm.vpd = rep(NA,times=ntimes) + emean$atm.co2 = rep(NA,times=ntimes) + emean$can.prss = rep(NA,times=ntimes) + emean$can.temp = rep(NA,times=ntimes) + emean$can.co2 = rep(NA,times=ntimes) + emean$can.shv = rep(NA,times=ntimes) + emean$can.vpd = rep(NA,times=ntimes) + emean$gnd.temp = rep(NA,times=ntimes) + emean$gnd.shv = rep(NA,times=ntimes) + emean$leaf.temp = rep(NA,times=ntimes) + emean$leaf.vpd = rep(NA,times=ntimes) + emean$wood.temp = rep(NA,times=ntimes) + emean$hflxca = rep(NA,times=ntimes) + emean$qwflxca = rep(NA,times=ntimes) + emean$hflxgc = rep(NA,times=ntimes) + emean$hflxlc = rep(NA,times=ntimes) + emean$hflxwc = rep(NA,times=ntimes) + emean$wflxca = rep(NA,times=ntimes) + emean$wflxgc = rep(NA,times=ntimes) + emean$wflxlc = rep(NA,times=ntimes) + emean$wflxwc = rep(NA,times=ntimes) + emean$evap = rep(NA,times=ntimes) + emean$transp = rep(NA,times=ntimes) + emean$et = rep(NA,times=ntimes) + emean$wue = rep(NA,times=ntimes) + emean$rain = rep(NA,times=ntimes) + emean$fs.open = rep(NA,times=ntimes) + emean$rshort = rep(NA,times=ntimes) + emean$rshort.beam = rep(NA,times=ntimes) + emean$rshort.diff = rep(NA,times=ntimes) + emean$rshortup = rep(NA,times=ntimes) + emean$rshort.gnd = rep(NA,times=ntimes) + emean$rlong = rep(NA,times=ntimes) + emean$rlong.gnd = rep(NA,times=ntimes) + emean$rlongup = rep(NA,times=ntimes) + emean$par.tot = rep(NA,times=ntimes) + emean$par.beam = rep(NA,times=ntimes) + emean$par.diff = rep(NA,times=ntimes) + emean$par.gnd = rep(NA,times=ntimes) + emean$parup = rep(NA,times=ntimes) + emean$rnet = rep(NA,times=ntimes) + emean$albedo = rep(NA,times=ntimes) + emean$albedo.beam = rep(NA,times=ntimes) + emean$albedo.diff = rep(NA,times=ntimes) + emean$rlong.albedo = rep(NA,times=ntimes) + emean$nplant = rep(NA,times=ntimes) + emean$agb = rep(NA,times=ntimes) + emean$bgb = rep(NA,times=ntimes) + emean$biomass = rep(NA,times=ntimes) + emean$lai = rep(NA,times=ntimes) + emean$wai = rep(NA,times=ntimes) + emean$tai = rep(NA,times=ntimes) + emean$area = rep(NA,times=ntimes) + emean$workload = rep(NA,times=ntimes) + emean$specwork = rep(NA,times=ntimes) + emean$demand = rep(NA,times=ntimes) + emean$supply = rep(NA,times=ntimes) + emean$paw = rep(NA,times=ntimes) + emean$smpot = rep(NA,times=ntimes) + emean$npat.global = rep(NA,times=ntimes) + emean$ncoh.global = rep(NA,times=ntimes) + emean$water.deficit = rep(NA,times=ntimes) + emean$malhi.deficit = rep(NA,times=ntimes) + emean$leaf.gsw = rep(NA,times=ntimes) + emean$leaf.gbw = rep(NA,times=ntimes) + emean$wood.gbw = rep(NA,times=ntimes) + emean$i.gpp = rep(NA,times=ntimes) + emean$i.npp = rep(NA,times=ntimes) + emean$i.plant.resp = rep(NA,times=ntimes) + emean$i.mco = rep(NA,times=ntimes) + emean$i.cba = rep(NA,times=ntimes) + emean$i.cbamax = rep(NA,times=ntimes) + emean$i.cbalight = rep(NA,times=ntimes) + emean$i.cbamoist = rep(NA,times=ntimes) + emean$i.transp = rep(NA,times=ntimes) + emean$i.wflxlc = rep(NA,times=ntimes) + emean$i.hflxlc = rep(NA,times=ntimes) + emean$f.gpp = rep(NA,times=ntimes) + emean$f.plant.resp = rep(NA,times=ntimes) + emean$f.npp = rep(NA,times=ntimes) + emean$f.cba = rep(NA,times=ntimes) + emean$f.bstorage = rep(NA,times=ntimes) + emean$f.bleaf = rep(NA,times=ntimes) + emean$f.broot = rep(NA,times=ntimes) + emean$f.bseeds = rep(NA,times=ntimes) + emean$leaf.par = rep(NA,times=ntimes) + emean$leaf.rshort = rep(NA,times=ntimes) + emean$leaf.rlong = rep(NA,times=ntimes) + #----- Soil variables. -----------------------------------------------------------------# + emean$soil.water = matrix(data=0,nrow=ntimes,ncol=nzg) + emean$soil.temp = matrix(data=0,nrow=ntimes,ncol=nzg) + emean$soil.mstpot = matrix(data=0,nrow=ntimes,ncol=nzg) + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # emsqu -- mean sum of squares of polygon-level variable. # + #---------------------------------------------------------------------------------------# + emsqu = list() + emsqu$gpp = rep(NA,times=ntimes) + emsqu$plant.resp = rep(NA,times=ntimes) + emsqu$leaf.resp = rep(NA,times=ntimes) + emsqu$root.resp = rep(NA,times=ntimes) + emsqu$het.resp = rep(NA,times=ntimes) + emsqu$cwd.resp = rep(NA,times=ntimes) + emsqu$reco = rep(NA,times=ntimes) + emsqu$cflxca = rep(NA,times=ntimes) + emsqu$cflxst = rep(NA,times=ntimes) + emsqu$hflxca = rep(NA,times=ntimes) + emsqu$hflxlc = rep(NA,times=ntimes) + emsqu$hflxwc = rep(NA,times=ntimes) + emsqu$hflxgc = rep(NA,times=ntimes) + emsqu$wflxca = rep(NA,times=ntimes) + emsqu$qwflxca = rep(NA,times=ntimes) + emsqu$wflxlc = rep(NA,times=ntimes) + emsqu$wflxwc = rep(NA,times=ntimes) + emsqu$wflxgc = rep(NA,times=ntimes) + emsqu$evap = rep(NA,times=ntimes) + emsqu$transp = rep(NA,times=ntimes) + emsqu$ustar = rep(NA,times=ntimes) + emsqu$albedo = rep(NA,times=ntimes) + emsqu$rshortup = rep(NA,times=ntimes) + emsqu$rlongup = rep(NA,times=ntimes) + emsqu$parup = rep(NA,times=ntimes) + emsqu$rnet = rep(NA,times=ntimes) + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # SZPFT -- Size (DBH) and plant functional type (PFT) array. An extra level is # + # appended to the end, which will hold the sum of all categories. # + #---------------------------------------------------------------------------------------# + szpft = list() + szpft$agb = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$bgb = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$biomass = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$lai = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$wai = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$tai = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$ba = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$gpp = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$npp = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$leaf.resp = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$root.resp = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$growth.resp = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$plant.resp = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$mco = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$cba = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$cbamax = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$cbalight = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$cbamoist = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$cbarel = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$ldrop = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$fs.open = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$leaf.gbw = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$leaf.gsw = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$wood.gbw = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$demand = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$supply = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$nplant = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$mort = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$dimort = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$ncbmort = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$growth = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$recr = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$bdead = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$bleaf = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$broot = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$bsapwood = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$bstorage = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$bseeds = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$hflxlc = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$wflxlc = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$transp = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$wue = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$census.lai = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$census.wai = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$census.tai = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$census.agb = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$census.ba = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$i.gpp = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$i.npp = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$i.plant.resp = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$i.mco = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$i.cba = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$i.cbamax = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$i.cbalight = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$i.cbamoist = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$i.transp = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$i.wflxlc = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$i.hflxlc = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$f.gpp = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$f.plant.resp = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$f.npp = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$f.cba = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$f.bstorage = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$f.bleaf = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$f.broot = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$f.bseeds = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$leaf.par = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$leaf.rshort = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + szpft$leaf.rlong = array(data=0.,dim=c(ntimes,ndbh+1,npft+1)) + #---------------------------------------------------------------------------------------# + + + + + + #---------------------------------------------------------------------------------------# + # LU -- Polygon-level variables, split by land use type. One extra dimension is # + # appended to the end, which will hold the sum of all land use types. # + #---------------------------------------------------------------------------------------# + lu = list() + lu$agb = matrix(data=0,nrow=ntimes,ncol=nlu+1) + lu$bgb = matrix(data=0,nrow=ntimes,ncol=nlu+1) + lu$biomass = matrix(data=0,nrow=ntimes,ncol=nlu+1) + lu$lai = matrix(data=0,nrow=ntimes,ncol=nlu+1) + lu$gpp = matrix(data=0,nrow=ntimes,ncol=nlu+1) + lu$npp = matrix(data=0,nrow=ntimes,ncol=nlu+1) + lu$area = matrix(data=0,nrow=ntimes,ncol=nlu+1) + lu$basarea = matrix(data=0,nrow=ntimes,ncol=nlu+1) + lu$dist = array (data=NA,dim=c(ntimes,nlu,nlu)) + #---------------------------------------------------------------------------------------# + + + + + + + + + + #---------------------------------------------------------------------------------------# + # QMEAN -- Polygon-level variables, containing the mean diel (diurnal cycle). # + #---------------------------------------------------------------------------------------# + qmean = list() + qmean$gpp = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$npp = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$plant.resp = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$leaf.resp = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$root.resp = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$growth.resp = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$het.resp = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$cwd.resp = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$nep = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$nee = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$reco = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$cflxca = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$cflxst = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$hflxca = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$hflxlc = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$hflxwc = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$hflxgc = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$qwflxca = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$wflxca = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$wflxlc = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$wflxwc = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$wflxgc = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$evap = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$transp = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$atm.temp = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$can.temp = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$leaf.temp = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$wood.temp = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$gnd.temp = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$atm.shv = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$can.shv = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$gnd.shv = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$atm.vpd = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$can.vpd = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$leaf.vpd = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$atm.co2 = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$can.co2 = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$atm.prss = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$can.prss = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$atm.vels = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$ustar = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$fs.open = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$rain = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$rshort = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$rshort.beam = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$rshort.diff = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$rshort.gnd = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$rshortup = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$rlong = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$rlong.gnd = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$rlongup = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$par.tot = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$par.beam = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$par.diff = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$par.gnd = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$parup = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$rnet = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$albedo = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$albedo.beam = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$albedo.diff = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$rlong.albedo = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$leaf.gsw = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$leaf.gbw = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmean$wood.gbw = matrix(data=0,nrow=ntimes,ncol=ndcycle) + #---------------------------------------------------------------------------------------# + + + + + + + + + + #---------------------------------------------------------------------------------------# + # QMSQU -- Polygon-level variables, containing the mean sum of squares for the diel # + # (diurnal cycle). # + #---------------------------------------------------------------------------------------# + qmsqu = list() + qmsqu$gpp = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmsqu$npp = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmsqu$plant.resp = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmsqu$leaf.resp = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmsqu$root.resp = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmsqu$het.resp = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmsqu$cwd.resp = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmsqu$nep = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmsqu$reco = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmsqu$cflxca = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmsqu$cflxst = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmsqu$hflxca = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmsqu$hflxlc = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmsqu$hflxwc = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmsqu$hflxgc = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmsqu$qwflxca = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmsqu$wflxca = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmsqu$wflxlc = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmsqu$wflxwc = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmsqu$wflxgc = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmsqu$transp = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmsqu$ustar = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmsqu$albedo = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmsqu$rshortup = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmsqu$rlongup = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmsqu$parup = matrix(data=0,nrow=ntimes,ncol=ndcycle) + qmsqu$rnet = matrix(data=0,nrow=ntimes,ncol=ndcycle) + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # PATCH -- patch level variables, we save as lists because the dimensions vary. # + #---------------------------------------------------------------------------------------# + patch = list() + patch$ipa = list() + patch$age = list() + patch$area = list() + patch$lu = list() + patch$nep = list() + patch$het.resp = list() + patch$can.temp = list() + patch$gnd.temp = list() + patch$can.shv = list() + patch$gnd.shv = list() + patch$can.vpd = list() + patch$can.co2 = list() + patch$can.prss = list() + patch$cflxca = list() + patch$cflxst = list() + patch$nee = list() + patch$hflxca = list() + patch$hflxgc = list() + patch$qwflxca = list() + patch$wflxca = list() + patch$wflxgc = list() + patch$ustar = list() + patch$albedo = list() + patch$rshortup = list() + patch$rlongup = list() + patch$parup = list() + patch$rnet = list() + patch$lai = list() + patch$wai = list() + patch$tai = list() + patch$leaf.temp = list() + patch$leaf.vpd = list() + patch$wood.temp = list() + patch$gpp = list() + patch$npp = list() + patch$plant.resp = list() + patch$reco = list() + patch$hflxlc = list() + patch$hflxwc = list() + patch$wflxlc = list() + patch$wflxwc = list() + patch$transp = list() + #---------------------------------------------------------------------------------------# + + + + + #----- Cohort level, we save as lists because the dimensions vary. ---------------------# + cohort = list() + cohort$ipa = list() + cohort$ico = list() + cohort$area = list() + cohort$lu = list() + cohort$dbh = list() + cohort$age = list() + cohort$pft = list() + cohort$nplant = list() + cohort$height = list() + cohort$ba = list() + cohort$agb = list() + cohort$bgb = list() + cohort$biomass = list() + cohort$lai = list() + cohort$wai = list() + cohort$tai = list() + cohort$gpp = list() + cohort$leaf.resp = list() + cohort$root.resp = list() + cohort$growth.resp = list() + cohort$plant.resp = list() + cohort$npp = list() + cohort$cba = list() + cohort$cbamax = list() + cohort$cbalight = list() + cohort$cbamoist = list() + cohort$cbarel = list() + cohort$mcost = list() + cohort$ldrop = list() + cohort$fs.open = list() + cohort$light = list() + cohort$light.beam = list() + cohort$light.diff = list() + cohort$balive = list() + cohort$bdead = list() + cohort$bleaf = list() + cohort$broot = list() + cohort$bsapwood = list() + cohort$bstorage = list() + cohort$bseeds = list() + cohort$hflxlc = list() + cohort$wflxlc = list() + cohort$transp = list() + cohort$wue = list() + cohort$demand = list() + cohort$supply = list() + cohort$mort = list() + cohort$dimort = list() + cohort$ncbmort = list() + cohort$recruit = list() + cohort$growth = list() + cohort$f.gpp = list() + cohort$f.plant.resp = list() + cohort$f.npp = list() + cohort$f.cba = list() + cohort$f.bstorage = list() + cohort$f.bleaf = list() + cohort$f.broot = list() + cohort$f.bseeds = list() + cohort$leaf.par = list() + cohort$leaf.rshort = list() + cohort$leaf.rlong = list() + #---------------------------------------------------------------------------------------# + + + + + + #----- Copy the polygon-level variable to the main structure. --------------------------# + ed$emean = emean + ed$emsqu = emsqu + ed$qmean = qmean + ed$qmsqu = qmsqu + ed$lu = lu + ed$szpft = szpft + ed$patch = patch + ed$cohort = cohort + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + return(ed) + #---------------------------------------------------------------------------------------# + +}#end create.monthly +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# Expand the monthly array so it fits the new times. # +#------------------------------------------------------------------------------------------# +update.monthly <<- function(new.ntimes,old.datum,montha,yeara,inpref,slz.min){ + + #----- Create the new data set. --------------------------------------------------------# + new.datum = create.monthly(new.ntimes,montha,yeara,inpref,slz.min) + #---------------------------------------------------------------------------------------# + + + #----- Find out which times to copy. ---------------------------------------------------# + idx = match(old.datum$when,new.datum$when) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # emean -- variables that we can either compare directly with observations, or are # + # or that may be used to draw time series. They don't need to be really # + # monthly means, but you should put only the variables that make sense to be # + # plotted in simple time series (with no PFT or DBH information). # + #---------------------------------------------------------------------------------------# + new.datum$emean$fast.soil.c [idx ] = old.datum$emean$fast.soil.c + new.datum$emean$slow.soil.c [idx ] = old.datum$emean$slow.soil.c + new.datum$emean$struct.soil.c [idx ] = old.datum$emean$struct.soil.c + new.datum$emean$het.resp [idx ] = old.datum$emean$het.resp + new.datum$emean$cwd.resp [idx ] = old.datum$emean$cwd.resp + new.datum$emean$gpp [idx ] = old.datum$emean$gpp + new.datum$emean$npp [idx ] = old.datum$emean$npp + new.datum$emean$plant.resp [idx ] = old.datum$emean$plant.resp + new.datum$emean$leaf.resp [idx ] = old.datum$emean$leaf.resp + new.datum$emean$root.resp [idx ] = old.datum$emean$root.resp + new.datum$emean$growth.resp [idx ] = old.datum$emean$growth.resp + new.datum$emean$reco [idx ] = old.datum$emean$reco + new.datum$emean$mco [idx ] = old.datum$emean$mco + new.datum$emean$cba [idx ] = old.datum$emean$cba + new.datum$emean$cbamax [idx ] = old.datum$emean$cbamax + new.datum$emean$cbalight [idx ] = old.datum$emean$cbalight + new.datum$emean$cbamoist [idx ] = old.datum$emean$cbamoist + new.datum$emean$cbarel [idx ] = old.datum$emean$cbarel + new.datum$emean$ldrop [idx ] = old.datum$emean$ldrop + new.datum$emean$nep [idx ] = old.datum$emean$nep + new.datum$emean$nee [idx ] = old.datum$emean$nee + new.datum$emean$cflxca [idx ] = old.datum$emean$cflxca + new.datum$emean$cflxst [idx ] = old.datum$emean$cflxst + new.datum$emean$evap [idx ] = old.datum$emean$evap + new.datum$emean$transp [idx ] = old.datum$emean$transp + new.datum$emean$wue [idx ] = old.datum$emean$wue + new.datum$emean$ustar [idx ] = old.datum$emean$ustar + new.datum$emean$atm.vels [idx ] = old.datum$emean$atm.vels + new.datum$emean$atm.prss [idx ] = old.datum$emean$atm.prss + new.datum$emean$atm.temp [idx ] = old.datum$emean$atm.temp + new.datum$emean$can.prss [idx ] = old.datum$emean$can.prss + new.datum$emean$can.temp [idx ] = old.datum$emean$can.temp + new.datum$emean$atm.co2 [idx ] = old.datum$emean$atm.co2 + new.datum$emean$can.co2 [idx ] = old.datum$emean$can.co2 + new.datum$emean$leaf.temp [idx ] = old.datum$emean$leaf.temp + new.datum$emean$wood.temp [idx ] = old.datum$emean$wood.temp + new.datum$emean$atm.shv [idx ] = old.datum$emean$atm.shv + new.datum$emean$can.shv [idx ] = old.datum$emean$can.shv + new.datum$emean$atm.vpd [idx ] = old.datum$emean$atm.vpd + new.datum$emean$can.vpd [idx ] = old.datum$emean$can.vpd + new.datum$emean$leaf.vpd [idx ] = old.datum$emean$leaf.vpd + new.datum$emean$can.co2 [idx ] = old.datum$emean$can.co2 + new.datum$emean$hflxca [idx ] = old.datum$emean$hflxca + new.datum$emean$qwflxca [idx ] = old.datum$emean$qwflxca + new.datum$emean$wflxca [idx ] = old.datum$emean$wflxca + new.datum$emean$agb [idx ] = old.datum$emean$agb + new.datum$emean$bgb [idx ] = old.datum$emean$bgb + new.datum$emean$biomass [idx ] = old.datum$emean$biomass + new.datum$emean$nplant [idx ] = old.datum$emean$nplant + new.datum$emean$lai [idx ] = old.datum$emean$lai + new.datum$emean$wai [idx ] = old.datum$emean$wai + new.datum$emean$tai [idx ] = old.datum$emean$tai + new.datum$emean$area [idx ] = old.datum$emean$area + new.datum$emean$rain [idx ] = old.datum$emean$rain + new.datum$emean$gnd.temp [idx ] = old.datum$emean$gnd.temp + new.datum$emean$gnd.shv [idx ] = old.datum$emean$gnd.shv + new.datum$emean$workload [idx ] = old.datum$emean$workload + new.datum$emean$specwork [idx ] = old.datum$emean$specwork + new.datum$emean$fs.open [idx ] = old.datum$emean$fs.open + new.datum$emean$demand [idx ] = old.datum$emean$demand + new.datum$emean$supply [idx ] = old.datum$emean$supply + new.datum$emean$hflxgc [idx ] = old.datum$emean$hflxgc + new.datum$emean$hflxlc [idx ] = old.datum$emean$hflxlc + new.datum$emean$hflxwc [idx ] = old.datum$emean$hflxwc + new.datum$emean$wflxgc [idx ] = old.datum$emean$wflxgc + new.datum$emean$wflxlc [idx ] = old.datum$emean$wflxlc + new.datum$emean$wflxwc [idx ] = old.datum$emean$wflxwc + new.datum$emean$et [idx ] = old.datum$emean$et + new.datum$emean$rshort [idx ] = old.datum$emean$rshort + new.datum$emean$rshort.beam [idx ] = old.datum$emean$rshort.beam + new.datum$emean$rshort.diff [idx ] = old.datum$emean$rshort.diff + new.datum$emean$rshortup [idx ] = old.datum$emean$rshortup + new.datum$emean$rshort.gnd [idx ] = old.datum$emean$rshort.gnd + new.datum$emean$rlong [idx ] = old.datum$emean$rlong + new.datum$emean$rlong.gnd [idx ] = old.datum$emean$rlong.gnd + new.datum$emean$rlongup [idx ] = old.datum$emean$rlongup + new.datum$emean$par.tot [idx ] = old.datum$emean$par.tot + new.datum$emean$par.beam [idx ] = old.datum$emean$par.beam + new.datum$emean$par.diff [idx ] = old.datum$emean$par.diff + new.datum$emean$par.gnd [idx ] = old.datum$emean$par.gnd + new.datum$emean$parup [idx ] = old.datum$emean$parup + new.datum$emean$rnet [idx ] = old.datum$emean$rnet + new.datum$emean$albedo [idx ] = old.datum$emean$albedo + new.datum$emean$albedo.beam [idx ] = old.datum$emean$albedo.beam + new.datum$emean$albedo.diff [idx ] = old.datum$emean$albedo.diff + new.datum$emean$rlong.albedo [idx ] = old.datum$emean$rlong.albedo + new.datum$emean$paw [idx ] = old.datum$emean$paw + new.datum$emean$smpot [idx ] = old.datum$emean$smpot + new.datum$emean$npat.global [idx ] = old.datum$emean$npat.global + new.datum$emean$ncoh.global [idx ] = old.datum$emean$ncoh.global + new.datum$emean$water.deficit [idx ] = old.datum$emean$water.deficit + new.datum$emean$malhi.deficit [idx ] = old.datum$emean$malhi.deficit + new.datum$emean$i.gpp [idx ] = old.datum$emean$i.gpp + new.datum$emean$i.npp [idx ] = old.datum$emean$i.npp + new.datum$emean$i.plant.resp [idx ] = old.datum$emean$i.plant.resp + new.datum$emean$i.mco [idx ] = old.datum$emean$i.mco + new.datum$emean$i.cba [idx ] = old.datum$emean$i.cba + new.datum$emean$i.cbamax [idx ] = old.datum$emean$i.cbamax + new.datum$emean$i.cbalight [idx ] = old.datum$emean$i.cbalight + new.datum$emean$i.cbamoist [idx ] = old.datum$emean$i.cbamoist + new.datum$emean$i.transp [idx ] = old.datum$emean$i.transp + new.datum$emean$i.wflxlc [idx ] = old.datum$emean$i.wflxlc + new.datum$emean$i.hflxlc [idx ] = old.datum$emean$i.hflxlc + new.datum$emean$f.gpp [idx ] = old.datum$emean$f.gpp + new.datum$emean$f.plant.resp [idx ] = old.datum$emean$f.plant.resp + new.datum$emean$f.npp [idx ] = old.datum$emean$f.npp + new.datum$emean$f.cba [idx ] = old.datum$emean$f.cba + new.datum$emean$f.bstorage [idx ] = old.datum$emean$f.bstorage + new.datum$emean$f.bleaf [idx ] = old.datum$emean$f.bleaf + new.datum$emean$f.broot [idx ] = old.datum$emean$f.broot + new.datum$emean$f.bseeds [idx ] = old.datum$emean$f.bseeds + new.datum$emean$leaf.gsw [idx ] = old.datum$emean$leaf.gsw + new.datum$emean$leaf.gbw [idx ] = old.datum$emean$leaf.gbw + new.datum$emean$wood.gbw [idx ] = old.datum$emean$wood.gbw + new.datum$emean$leaf.par [idx ] = old.datum$emean$leaf.par + new.datum$emean$leaf.rshort [idx ] = old.datum$emean$leaf.rshort + new.datum$emean$leaf.rlong [idx ] = old.datum$emean$leaf.rlong + new.datum$emean$soil.water [idx,] = old.datum$emean$soil.water + new.datum$emean$soil.temp [idx,] = old.datum$emean$soil.temp + new.datum$emean$soil.mstpot [idx,] = old.datum$emean$soil.mstpot + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # emsqu -- mean sum of squares of polygon-level variable. # + #---------------------------------------------------------------------------------------# + new.datum$emsqu$gpp [idx] = old.datum$emsqu$gpp + new.datum$emsqu$plant.resp [idx] = old.datum$emsqu$plant.resp + new.datum$emsqu$het.resp [idx] = old.datum$emsqu$het.resp + new.datum$emsqu$cwd.resp [idx] = old.datum$emsqu$cwd.resp + new.datum$emsqu$cflxca [idx] = old.datum$emsqu$cflxca + new.datum$emsqu$cflxst [idx] = old.datum$emsqu$cflxst + new.datum$emsqu$hflxca [idx] = old.datum$emsqu$hflxca + new.datum$emsqu$hflxlc [idx] = old.datum$emsqu$hflxlc + new.datum$emsqu$hflxwc [idx] = old.datum$emsqu$hflxwc + new.datum$emsqu$hflxgc [idx] = old.datum$emsqu$hflxgc + new.datum$emsqu$wflxca [idx] = old.datum$emsqu$wflxca + new.datum$emsqu$qwflxca [idx] = old.datum$emsqu$qwflxca + new.datum$emsqu$wflxlc [idx] = old.datum$emsqu$wflxlc + new.datum$emsqu$wflxwc [idx] = old.datum$emsqu$wflxwc + new.datum$emsqu$wflxgc [idx] = old.datum$emsqu$wflxgc + new.datum$emsqu$transp [idx] = old.datum$emsqu$transp + new.datum$emsqu$ustar [idx] = old.datum$emsqu$ustar + new.datum$emsqu$albedo [idx] = old.datum$emsqu$albedo + new.datum$emsqu$rshortup [idx] = old.datum$emsqu$rshortup + new.datum$emsqu$rlongup [idx] = old.datum$emsqu$rlongup + new.datum$emsqu$parup [idx] = old.datum$emsqu$parup + new.datum$emsqu$rnet [idx] = old.datum$emsqu$rnet + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # SZPFT -- Size (DBH) and plant functional type (PFT) array. An extra level is # + # appended to the end, which will hold the sum of all categories. # + #---------------------------------------------------------------------------------------# + new.datum$szpft$agb [idx,,] = old.datum$szpft$agb + new.datum$szpft$bgb [idx,,] = old.datum$szpft$bgb + new.datum$szpft$biomass [idx,,] = old.datum$szpft$biomass + new.datum$szpft$lai [idx,,] = old.datum$szpft$lai + new.datum$szpft$wai [idx,,] = old.datum$szpft$wai + new.datum$szpft$tai [idx,,] = old.datum$szpft$tai + new.datum$szpft$ba [idx,,] = old.datum$szpft$ba + new.datum$szpft$gpp [idx,,] = old.datum$szpft$gpp + new.datum$szpft$npp [idx,,] = old.datum$szpft$npp + new.datum$szpft$leaf.resp [idx,,] = old.datum$szpft$leaf.resp + new.datum$szpft$root.resp [idx,,] = old.datum$szpft$root.resp + new.datum$szpft$growth.resp [idx,,] = old.datum$szpft$growth.resp + new.datum$szpft$plant.resp [idx,,] = old.datum$szpft$plant.resp + new.datum$szpft$mco [idx,,] = old.datum$szpft$mco + new.datum$szpft$cba [idx,,] = old.datum$szpft$cba + new.datum$szpft$cbamax [idx,,] = old.datum$szpft$cbamax + new.datum$szpft$cbalight [idx,,] = old.datum$szpft$cbalight + new.datum$szpft$cbamoist [idx,,] = old.datum$szpft$cbamoist + new.datum$szpft$cbarel [idx,,] = old.datum$szpft$cbarel + new.datum$szpft$ldrop [idx,,] = old.datum$szpft$ldrop + new.datum$szpft$fs.open [idx,,] = old.datum$szpft$fs.open + new.datum$szpft$leaf.gbw [idx,,] = old.datum$szpft$leaf.gbw + new.datum$szpft$leaf.gsw [idx,,] = old.datum$szpft$leaf.gsw + new.datum$szpft$wood.gbw [idx,,] = old.datum$szpft$wood.gbw + new.datum$szpft$demand [idx,,] = old.datum$szpft$demand + new.datum$szpft$supply [idx,,] = old.datum$szpft$supply + new.datum$szpft$nplant [idx,,] = old.datum$szpft$nplant + new.datum$szpft$mort [idx,,] = old.datum$szpft$mort + new.datum$szpft$dimort [idx,,] = old.datum$szpft$dimort + new.datum$szpft$ncbmort [idx,,] = old.datum$szpft$ncbmort + new.datum$szpft$growth [idx,,] = old.datum$szpft$growth + new.datum$szpft$recr [idx,,] = old.datum$szpft$recr + new.datum$szpft$bdead [idx,,] = old.datum$szpft$bdead + new.datum$szpft$bleaf [idx,,] = old.datum$szpft$bleaf + new.datum$szpft$broot [idx,,] = old.datum$szpft$broot + new.datum$szpft$bsapwood [idx,,] = old.datum$szpft$bsapwood + new.datum$szpft$bstorage [idx,,] = old.datum$szpft$bstorage + new.datum$szpft$bseeds [idx,,] = old.datum$szpft$bseeds + new.datum$szpft$hflxlc [idx,,] = old.datum$szpft$hflxlc + new.datum$szpft$wflxlc [idx,,] = old.datum$szpft$wflxlc + new.datum$szpft$transp [idx,,] = old.datum$szpft$transp + new.datum$szpft$wue [idx,,] = old.datum$szpft$wue + new.datum$szpft$census.lai [idx,,] = old.datum$szpft$census.lai + new.datum$szpft$census.wai [idx,,] = old.datum$szpft$census.wai + new.datum$szpft$census.tai [idx,,] = old.datum$szpft$census.tai + new.datum$szpft$census.agb [idx,,] = old.datum$szpft$census.agb + new.datum$szpft$census.ba [idx,,] = old.datum$szpft$census.ba + new.datum$szpft$i.gpp [idx,,] = old.datum$szpft$i.gpp + new.datum$szpft$i.npp [idx,,] = old.datum$szpft$i.npp + new.datum$szpft$i.plant.resp [idx,,] = old.datum$szpft$i.plant.resp + new.datum$szpft$i.mco [idx,,] = old.datum$szpft$i.mco + new.datum$szpft$i.cba [idx,,] = old.datum$szpft$i.cba + new.datum$szpft$i.cbamax [idx,,] = old.datum$szpft$i.cbamax + new.datum$szpft$i.cbalight [idx,,] = old.datum$szpft$i.cbalight + new.datum$szpft$i.cbamoist [idx,,] = old.datum$szpft$i.cbamoist + new.datum$szpft$i.transp [idx,,] = old.datum$szpft$i.transp + new.datum$szpft$i.wflxlc [idx,,] = old.datum$szpft$i.wflxlc + new.datum$szpft$i.hflxlc [idx,,] = old.datum$szpft$i.hflxlc + new.datum$szpft$f.gpp [idx,,] = old.datum$szpft$f.gpp + new.datum$szpft$f.plant.resp [idx,,] = old.datum$szpft$f.plant.resp + new.datum$szpft$f.npp [idx,,] = old.datum$szpft$f.npp + new.datum$szpft$f.cba [idx,,] = old.datum$szpft$f.cba + new.datum$szpft$f.bstorage [idx,,] = old.datum$szpft$f.bstorage + new.datum$szpft$f.bleaf [idx,,] = old.datum$szpft$f.bleaf + new.datum$szpft$f.broot [idx,,] = old.datum$szpft$f.broot + new.datum$szpft$f.bseeds [idx,,] = old.datum$szpft$f.bseeds + new.datum$szpft$leaf.par [idx,,] = old.datum$szpft$leaf.par + new.datum$szpft$leaf.rshort [idx,,] = old.datum$szpft$leaf.rshort + new.datum$szpft$leaf.rlong [idx,,] = old.datum$szpft$leaf.rlong + #---------------------------------------------------------------------------------------# + + + + + + #---------------------------------------------------------------------------------------# + # LU -- Polygon-level variables, split by land use type. One extra dimension is # + # appended to the end, which will hold the sum of all land use types. # + #---------------------------------------------------------------------------------------# + new.datum$lu$agb [idx, ] = old.datum$lu$agb + new.datum$lu$bgb [idx, ] = old.datum$lu$bgb + new.datum$lu$biomass [idx, ] = old.datum$lu$biomass + new.datum$lu$lai [idx, ] = old.datum$lu$lai + new.datum$lu$gpp [idx, ] = old.datum$lu$gpp + new.datum$lu$npp [idx, ] = old.datum$lu$npp + new.datum$lu$area [idx, ] = old.datum$lu$area + new.datum$lu$basarea [idx, ] = old.datum$lu$basarea + new.datum$lu$dist [idx,,] = old.datum$lu$dist + #---------------------------------------------------------------------------------------# + + + + + + + + + + #---------------------------------------------------------------------------------------# + # QMEAN -- Polygon-level variables, containing the mean diel (diurnal cycle). # + #---------------------------------------------------------------------------------------# + new.datum$qmean$gpp [idx,] = old.datum$qmean$gpp + new.datum$qmean$npp [idx,] = old.datum$qmean$npp + new.datum$qmean$plant.resp [idx,] = old.datum$qmean$plant.resp + new.datum$qmean$leaf.resp [idx,] = old.datum$qmean$leaf.resp + new.datum$qmean$root.resp [idx,] = old.datum$qmean$root.resp + new.datum$qmean$growth.resp [idx,] = old.datum$qmean$growth.resp + new.datum$qmean$het.resp [idx,] = old.datum$qmean$het.resp + new.datum$qmean$cwd.resp [idx,] = old.datum$qmean$cwd.resp + new.datum$qmean$nep [idx,] = old.datum$qmean$nep + new.datum$qmean$nee [idx,] = old.datum$qmean$nee + new.datum$qmean$reco [idx,] = old.datum$qmean$reco + new.datum$qmean$cflxca [idx,] = old.datum$qmean$cflxca + new.datum$qmean$cflxst [idx,] = old.datum$qmean$cflxst + new.datum$qmean$hflxca [idx,] = old.datum$qmean$hflxca + new.datum$qmean$hflxlc [idx,] = old.datum$qmean$hflxlc + new.datum$qmean$hflxwc [idx,] = old.datum$qmean$hflxwc + new.datum$qmean$hflxgc [idx,] = old.datum$qmean$hflxgc + new.datum$qmean$qwflxca [idx,] = old.datum$qmean$qwflxca + new.datum$qmean$wflxca [idx,] = old.datum$qmean$wflxca + new.datum$qmean$wflxlc [idx,] = old.datum$qmean$wflxlc + new.datum$qmean$wflxwc [idx,] = old.datum$qmean$wflxwc + new.datum$qmean$wflxgc [idx,] = old.datum$qmean$wflxgc + new.datum$qmean$evap [idx,] = old.datum$qmean$evap + new.datum$qmean$transp [idx,] = old.datum$qmean$transp + new.datum$qmean$atm.temp [idx,] = old.datum$qmean$atm.temp + new.datum$qmean$can.temp [idx,] = old.datum$qmean$can.temp + new.datum$qmean$leaf.temp [idx,] = old.datum$qmean$leaf.temp + new.datum$qmean$wood.temp [idx,] = old.datum$qmean$wood.temp + new.datum$qmean$gnd.temp [idx,] = old.datum$qmean$gnd.temp + new.datum$qmean$atm.shv [idx,] = old.datum$qmean$atm.shv + new.datum$qmean$can.shv [idx,] = old.datum$qmean$can.shv + new.datum$qmean$gnd.shv [idx,] = old.datum$qmean$gnd.shv + new.datum$qmean$atm.vpd [idx,] = old.datum$qmean$atm.vpd + new.datum$qmean$can.vpd [idx,] = old.datum$qmean$can.vpd + new.datum$qmean$leaf.vpd [idx,] = old.datum$qmean$leaf.vpd + new.datum$qmean$atm.co2 [idx,] = old.datum$qmean$atm.co2 + new.datum$qmean$can.co2 [idx,] = old.datum$qmean$can.co2 + new.datum$qmean$atm.prss [idx,] = old.datum$qmean$atm.prss + new.datum$qmean$can.prss [idx,] = old.datum$qmean$can.prss + new.datum$qmean$atm.vels [idx,] = old.datum$qmean$atm.vels + new.datum$qmean$ustar [idx,] = old.datum$qmean$ustar + new.datum$qmean$fs.open [idx,] = old.datum$qmean$fs.open + new.datum$qmean$rain [idx,] = old.datum$qmean$rain + new.datum$qmean$rshort [idx,] = old.datum$qmean$rshort + new.datum$qmean$rshort.beam [idx,] = old.datum$qmean$rshort.beam + new.datum$qmean$rshort.diff [idx,] = old.datum$qmean$rshort.diff + new.datum$qmean$rshort.gnd [idx,] = old.datum$qmean$rshort.gnd + new.datum$qmean$rshortup [idx,] = old.datum$qmean$rshortup + new.datum$qmean$rlong [idx,] = old.datum$qmean$rlong + new.datum$qmean$rlong.gnd [idx,] = old.datum$qmean$rlong.gnd + new.datum$qmean$rlongup [idx,] = old.datum$qmean$rlongup + new.datum$qmean$par.tot [idx,] = old.datum$qmean$par.tot + new.datum$qmean$par.beam [idx,] = old.datum$qmean$par.beam + new.datum$qmean$par.diff [idx,] = old.datum$qmean$par.diff + new.datum$qmean$par.gnd [idx,] = old.datum$qmean$par.gnd + new.datum$qmean$parup [idx,] = old.datum$qmean$parup + new.datum$qmean$rnet [idx,] = old.datum$qmean$rnet + new.datum$qmean$albedo [idx,] = old.datum$qmean$albedo + new.datum$qmean$albedo.beam [idx,] = old.datum$qmean$albedo.beam + new.datum$qmean$albedo.diff [idx,] = old.datum$qmean$albedo.diff + new.datum$qmean$rlong.albedo [idx,] = old.datum$qmean$rlong.albedo + new.datum$qmean$leaf.gsw [idx,] = old.datum$qmean$leaf.gsw + new.datum$qmean$leaf.gbw [idx,] = old.datum$qmean$leaf.gbw + new.datum$qmean$wood.gbw [idx,] = old.datum$qmean$wood.gbw + #---------------------------------------------------------------------------------------# + + + + + + + + + + #---------------------------------------------------------------------------------------# + # QMSQU -- Polygon-level variables, containing the mean sum of squares for the diel # + # (diurnal cycle). # + #---------------------------------------------------------------------------------------# + new.datum$qmsqu$gpp [idx,] = old.datum$qmsqu$gpp + new.datum$qmsqu$npp [idx,] = old.datum$qmsqu$npp + new.datum$qmsqu$plant.resp [idx,] = old.datum$qmsqu$plant.resp + new.datum$qmsqu$het.resp [idx,] = old.datum$qmsqu$het.resp + new.datum$qmsqu$cwd.resp [idx,] = old.datum$qmsqu$cwd.resp + new.datum$qmsqu$nep [idx,] = old.datum$qmsqu$nep + new.datum$qmsqu$cflxca [idx,] = old.datum$qmsqu$cflxca + new.datum$qmsqu$cflxst [idx,] = old.datum$qmsqu$cflxst + new.datum$qmsqu$hflxca [idx,] = old.datum$qmsqu$hflxca + new.datum$qmsqu$hflxlc [idx,] = old.datum$qmsqu$hflxlc + new.datum$qmsqu$hflxwc [idx,] = old.datum$qmsqu$hflxwc + new.datum$qmsqu$hflxgc [idx,] = old.datum$qmsqu$hflxgc + new.datum$qmsqu$qwflxca [idx,] = old.datum$qmsqu$qwflxca + new.datum$qmsqu$wflxca [idx,] = old.datum$qmsqu$wflxca + new.datum$qmsqu$wflxlc [idx,] = old.datum$qmsqu$wflxlc + new.datum$qmsqu$wflxwc [idx,] = old.datum$qmsqu$wflxwc + new.datum$qmsqu$wflxgc [idx,] = old.datum$qmsqu$wflxgc + new.datum$qmsqu$transp [idx,] = old.datum$qmsqu$transp + new.datum$qmsqu$ustar [idx,] = old.datum$qmsqu$ustar + new.datum$qmsqu$albedo [idx,] = old.datum$qmsqu$albedo + new.datum$qmsqu$rshortup [idx,] = old.datum$qmsqu$rshortup + new.datum$qmsqu$rlongup [idx,] = old.datum$qmsqu$rlongup + new.datum$qmsqu$parup [idx,] = old.datum$qmsqu$parup + new.datum$qmsqu$rnet [idx,] = old.datum$qmsqu$rnet + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # PATCH -- patch level variables, we save as lists because the dimensions vary. # + #---------------------------------------------------------------------------------------# + new.datum$patch$ipa = old.datum$patch$ipa + new.datum$patch$age = old.datum$patch$age + new.datum$patch$area = old.datum$patch$area + new.datum$patch$lu = old.datum$patch$lu + new.datum$patch$nep = old.datum$patch$nep + new.datum$patch$het.resp = old.datum$patch$het.resp + new.datum$patch$can.temp = old.datum$patch$can.temp + new.datum$patch$gnd.temp = old.datum$patch$gnd.temp + new.datum$patch$can.shv = old.datum$patch$can.shv + new.datum$patch$gnd.shv = old.datum$patch$gnd.shv + new.datum$patch$can.vpd = old.datum$patch$can.vpd + new.datum$patch$can.co2 = old.datum$patch$can.co2 + new.datum$patch$can.prss = old.datum$patch$can.prss + new.datum$patch$cflxca = old.datum$patch$cflxca + new.datum$patch$cflxst = old.datum$patch$cflxst + new.datum$patch$nee = old.datum$patch$nee + new.datum$patch$hflxca = old.datum$patch$hflxca + new.datum$patch$hflxgc = old.datum$patch$hflxgc + new.datum$patch$qwflxca = old.datum$patch$qwflxca + new.datum$patch$wflxca = old.datum$patch$wflxca + new.datum$patch$wflxgc = old.datum$patch$wflxgc + new.datum$patch$ustar = old.datum$patch$ustar + new.datum$patch$albedo = old.datum$patch$albedo + new.datum$patch$rshortup = old.datum$patch$rshortup + new.datum$patch$rlongup = old.datum$patch$rlongup + new.datum$patch$parup = old.datum$patch$parup + new.datum$patch$rnet = old.datum$patch$rnet + new.datum$patch$lai = old.datum$patch$lai + new.datum$patch$wai = old.datum$patch$wai + new.datum$patch$tai = old.datum$patch$tai + new.datum$patch$leaf.temp = old.datum$patch$leaf.temp + new.datum$patch$leaf.vpd = old.datum$patch$leaf.vpd + new.datum$patch$wood.temp = old.datum$patch$wood.temp + new.datum$patch$gpp = old.datum$patch$gpp + new.datum$patch$npp = old.datum$patch$npp + new.datum$patch$plant.resp = old.datum$patch$plant.resp + new.datum$patch$reco = old.datum$patch$reco + new.datum$patch$hflxlc = old.datum$patch$hflxlc + new.datum$patch$hflxwc = old.datum$patch$hflxwc + new.datum$patch$wflxlc = old.datum$patch$wflxlc + new.datum$patch$wflxwc = old.datum$patch$wflxwc + new.datum$patch$transp = old.datum$patch$transp + #---------------------------------------------------------------------------------------# + + + + + #----- Cohort level, we save as lists because the dimensions vary. ---------------------# + new.datum$cohort$ipa = old.datum$cohort$ipa + new.datum$cohort$ico = old.datum$cohort$ico + new.datum$cohort$area = old.datum$cohort$area + new.datum$cohort$lu = old.datum$cohort$lu + new.datum$cohort$dbh = old.datum$cohort$dbh + new.datum$cohort$age = old.datum$cohort$age + new.datum$cohort$pft = old.datum$cohort$pft + new.datum$cohort$nplant = old.datum$cohort$nplant + new.datum$cohort$height = old.datum$cohort$height + new.datum$cohort$ba = old.datum$cohort$ba + new.datum$cohort$agb = old.datum$cohort$agb + new.datum$cohort$bgb = old.datum$cohort$bgb + new.datum$cohort$biomass = old.datum$cohort$biomass + new.datum$cohort$lai = old.datum$cohort$lai + new.datum$cohort$wai = old.datum$cohort$wai + new.datum$cohort$tai = old.datum$cohort$tai + new.datum$cohort$gpp = old.datum$cohort$gpp + new.datum$cohort$leaf.resp = old.datum$cohort$leaf.resp + new.datum$cohort$root.resp = old.datum$cohort$root.resp + new.datum$cohort$growth.resp = old.datum$cohort$growth.resp + new.datum$cohort$plant.resp = old.datum$cohort$plant.resp + new.datum$cohort$npp = old.datum$cohort$npp + new.datum$cohort$cba = old.datum$cohort$cba + new.datum$cohort$cbamax = old.datum$cohort$cbamax + new.datum$cohort$cbalight = old.datum$cohort$cbalight + new.datum$cohort$cbamoist = old.datum$cohort$cbamoist + new.datum$cohort$cbarel = old.datum$cohort$cbarel + new.datum$cohort$mcost = old.datum$cohort$mcost + new.datum$cohort$ldrop = old.datum$cohort$ldrop + new.datum$cohort$fs.open = old.datum$cohort$fs.open + new.datum$cohort$light = old.datum$cohort$light + new.datum$cohort$lightbeam = old.datum$cohort$lightbeam + new.datum$cohort$lightdiff = old.datum$cohort$lightdiff + new.datum$cohort$balive = old.datum$cohort$balive + new.datum$cohort$bdead = old.datum$cohort$bdead + new.datum$cohort$bleaf = old.datum$cohort$bleaf + new.datum$cohort$broot = old.datum$cohort$broot + new.datum$cohort$bsapwood = old.datum$cohort$bsapwood + new.datum$cohort$bstorage = old.datum$cohort$bstorage + new.datum$cohort$bseeds = old.datum$cohort$bseeds + new.datum$cohort$hflxlc = old.datum$cohort$hflxlc + new.datum$cohort$wflxlc = old.datum$cohort$wflxlc + new.datum$cohort$transp = old.datum$cohort$transp + new.datum$cohort$wue = old.datum$cohort$wue + new.datum$cohort$demand = old.datum$cohort$demand + new.datum$cohort$supply = old.datum$cohort$supply + new.datum$cohort$mort = old.datum$cohort$mort + new.datum$cohort$dimort = old.datum$cohort$dimort + new.datum$cohort$ncbmort = old.datum$cohort$ncbmort + new.datum$cohort$recruit = old.datum$cohort$recruit + new.datum$cohort$growth = old.datum$cohort$growth + new.datum$cohort$f.gpp = old.datum$cohort$f.gpp + new.datum$cohort$f.plant.resp = old.datum$cohort$f.plant.resp + new.datum$cohort$f.npp = old.datum$cohort$f.npp + new.datum$cohort$f.cba = old.datum$cohort$f.cba + new.datum$cohort$f.bstorage = old.datum$cohort$f.bstorage + new.datum$cohort$f.bleaf = old.datum$cohort$f.bleaf + new.datum$cohort$f.broot = old.datum$cohort$f.broot + new.datum$cohort$f.bseeds = old.datum$cohort$f.bseeds + new.datum$cohort$leaf.par = old.datum$cohort$leaf.par + new.datum$cohort$leaf.rshort = old.datum$cohort$leaf.rshort + new.datum$cohort$leaf.rlong = old.datum$cohort$leaf.rlong + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Send the data back. # + #---------------------------------------------------------------------------------------# + return(new.datum) + #---------------------------------------------------------------------------------------# +}#end update +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/muitas.r b/R-utils/muitas.r new file mode 100644 index 000000000..402d2113d --- /dev/null +++ b/R-utils/muitas.r @@ -0,0 +1,46 @@ +#------------------------------------------------------------------------------------------# +# Function that creates a nice colour scheme. # +#------------------------------------------------------------------------------------------# +muitas <- function(n){ + rrr <- c( 0, 0, 0, 212, 255, 192, 64) #---- Red pivots. ------------------------# + ggg <- c( 0, 64, 192, 212, 128, 32, 0) #---- Green pivots. ----------------------# + bbb <- c( 64, 255, 64, 0, 0, 0, 0) #---- Blue pivots. -----------------------# + pivot <- round(seq(from=1,to=n,by=(n-1)/(length(rrr)-1)),digits=0) + + red <- as.integer(spline(x=pivot,y=rrr,n=n)$y) + green <- as.integer(spline(x=pivot,y=ggg,n=n)$y) + blue <- as.integer(spline(x=pivot,y=bbb,n=n)$y) + + red [red > 255] <- 255; red [red < 0] <- 0 + green[green > 255] <- 255; green[green < 0] <- 0 + blue [blue > 255] <- 255; blue [blue < 0] <- 0 + mycolsch <- rgb(r=red,g=green,b=blue,maxColorValue=255) + return(mycolsch) +} +#------------------------------------------------------------------------------------------# + + + + + + +#------------------------------------------------------------------------------------------# +# Function that creates a nice colour scheme. # +#------------------------------------------------------------------------------------------# +imuitas <- function(n){ + rrr <- c( 64, 192, 255, 212, 0, 0, 0) #---- Red pivots. ------------------------# + ggg <- c( 0, 32, 128, 212, 192, 64, 0) #---- Green pivots. ----------------------# + bbb <- c( 0, 0, 0, 0, 64, 255, 64) #---- Blue pivots. -----------------------# + pivot <- round(seq(from=1,to=n,by=(n-1)/(length(rrr)-1)),digits=0) + + red <- as.integer(spline(x=pivot,y=rrr,n=n)$y) + green <- as.integer(spline(x=pivot,y=ggg,n=n)$y) + blue <- as.integer(spline(x=pivot,y=bbb,n=n)$y) + + red [red > 255] <- 255; red [red < 0] <- 0 + green[green > 255] <- 255; green[green < 0] <- 0 + blue [blue > 255] <- 255; blue [blue < 0] <- 0 + mycolsch <- rgb(r=red,g=green,b=blue,maxColorValue=255) + return(mycolsch) +} +#------------------------------------------------------------------------------------------# diff --git a/R-utils/nearest.neighbour.r b/R-utils/nearest.neighbour.r new file mode 100644 index 000000000..cdf044dd6 --- /dev/null +++ b/R-utils/nearest.neighbour.r @@ -0,0 +1,26 @@ +#------------------------------------------------------------------------------------------# +# This function determines the gridded nearest neighbour for each point of the # +# network. # +#------------------------------------------------------------------------------------------# +nearest.neighbour = function(netwcoord,gridcoord,g2n=TRUE){ + isok = require(fields) + if (!isok) stop("The nearest.neighbour function requires the package fields...") + + #--------------------------------------------------------------------------------------# + # "Distmat" is the matrix with the distances between the each network point # + # (unstructured) and each grid point (structured). # + #--------------------------------------------------------------------------------------# + distmat = rdist.earth(x1=netwcoord,x2=gridcoord,miles=FALSE) + + #--------------------------------------------------------------------------------------# + # "Nearest" is the index of the closest BRAMS grid point for each point of the # + # network. # + #--------------------------------------------------------------------------------------# + if (g2n){ + nearest = apply(X=distmat,MARGIN=1,FUN=which.min) + }else{ + nearest = apply(X=distmax,MARGIN=2,FUN=which.min) + }#end if + + return(nearest) +}#end function diff --git a/R-utils/numutils.r b/R-utils/numutils.r new file mode 100644 index 000000000..1d33eb57b --- /dev/null +++ b/R-utils/numutils.r @@ -0,0 +1,461 @@ +#==========================================================================================# +#==========================================================================================# +# Function that finds the cubic root, for both positive and negative numbers. # +#------------------------------------------------------------------------------------------# +cbrt <<- function(x){ + x333 = NA * x + + pos = is.finite(x) & x >= 0. + neg = is.finite(x) & x < 0. + + x333[pos] = ( x[pos])^(1./3.) + x333[neg] = -(-x[neg])^(1./3.) + + return(x333) +}#end function cbrt +#==========================================================================================# +#==========================================================================================# + + + + + +#==========================================================================================# +#==========================================================================================# +# Functions that finds round of the log of the number. # +#------------------------------------------------------------------------------------------# +round.log <<- function(x,base=exp(1),...) base^(round(log(x,base=base),...)) +round.log10 <<- function(x,...) 10^(round(log10(x),...)) +round.log2 <<- function(x,...) 2^(round(log2(x),...)) +#==========================================================================================# +#==========================================================================================# + + + + + +#==========================================================================================# +#==========================================================================================# +# This function finds the binary notation of an integer. # +#------------------------------------------------------------------------------------------# +tobin <<- function(x,reverse=TRUE){ + + if (! is.integer(x)){ + stop ("x must be integer") + }#end if + + int2bin = function(x,reverse){ + if (reverse){ + ans = paste(sapply(strsplit(paste(rev(intToBits(x))),""),`[[`,2),collapse="") + }else{ + ans = paste(sapply(strsplit(paste(intToBits(x)),""),`[[`,2),collapse="") + }#end if + return(ans) + }#end if + + if (is.list(x)){ + ans = sapply(X=x,FUN=int2bin,reverse=reverse) + }else if (is.null(dim(x))){ + ans = sapply(X=x,FUN=int2bin,reverse=reverse,simplify=TRUE) + }else{ + margin = length(dim(x)) + ans = apply(X=x,MARGIN=sequence(margin),FUN=int2bin,reverse=reverse) + }#end if + return(ans) +}#end function tobin +#==========================================================================================# +#==========================================================================================# + + + + + +#==========================================================================================# +#==========================================================================================# +# This function computes the mean of the elements below (above) a given quantile. # +#------------------------------------------------------------------------------------------# +qu.mean = function(x,p,na.rm=FALSE,lower=TRUE){ + if (na.rm) x = x[! is.na(x)] + + #----- Do the calculation only if there is anything left. ------------------------------# + if (any(is.finite(x))){ + qu = quantile(x,probs=p,na.rm=na.rm) + if (lower){ + ans = mean(x[x <= qu],na.rm=na.rm) + }else{ + ans = mean(x[x >= qu],na.rm=na.rm) + }#end if + }else{ + ans = NA + }#end if + + return(ans) +}#end function qu.mean +#==========================================================================================# +#==========================================================================================# + + + + + +#==========================================================================================# +#==========================================================================================# +# This function estimates the quantile for a table of observations x, each of which # +# having a weight w. This is done by finding the median of a pseudo dataset built using # +# sample. If the size of the resampling is not provided, then the number of samples is # +# dependent on the range of probabilities. By default we find the 0.50 quantile (median). # +#------------------------------------------------------------------------------------------# +weighted.quantile = function(x,w,qu=0.50,size.minp=10,na.rm=FALSE){ + + #----- Delete the missing values if the user asked to do it. ---------------------------# + if (any(w <= 0, na.rm = TRUE) || any(is.infinite(w)) || any(is.na(w))){ + stop(" Weights (w) must be positive and finite, and entirely defined!") + }else if(qu < 0. || qu > 1.){ + stop(" Quantile (qu) must be between 0 and 1. ") + }else if(na.rm){ + keep = ! is.na(x) + x = x[keep] + w = w[keep] + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Define the probabilities by normalising the weights. # + #---------------------------------------------------------------------------------------# + prob = w / sum(w) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Sort the values by the probability. # + #---------------------------------------------------------------------------------------# + o = order(x,decreasing=FALSE) + x = x[o] + w = w[o] + prob = prob[o] + cum = cumsum(prob) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Sort the values by the probability. # + #---------------------------------------------------------------------------------------# + if (qu <= cum[1]){ + qout = x[1] + case = "minimum" + }else if (qu >= cum[length(cum)]){ + qout = x[length(cum)] + case = "maximum" + }else if (any(cum == qu)){ + qout = x[which(cum == qu)] + case = "exact" + }else{ + below = qu - cum ; below[below < 0] = Inf + above = cum - qu ; above[above < 0] = Inf + i.below = which.min(below) + i.above = which.min(above) + w.below = 1. / (below[i.below]^2) + w.above = 1. / (above[i.above]^2) + qout = ( x[i.below] * w.below + x[i.above] * w.above ) / (w.below + w.above) + case = "interpolated" + }#end if + #---------------------------------------------------------------------------------------# + + + ans = list(q = qout, case = case) + return(ans) +}#end function weighted.quantile +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# For each element of vector x, this function finds the value in the "onto" vector # +# that corresponds to the same quantile of the distribution defined by x. # +#------------------------------------------------------------------------------------------# +qqproject <<- function(x,onto){ + #----- Find out which elements are finite and save the position. -----------------------# + ok = which(! is.na(x)) + project = NA * x + #---------------------------------------------------------------------------------------# + + #----- Keep only the non-NA elements. --------------------------------------------------# + xf = x[!is.na(x)] + #---------------------------------------------------------------------------------------# + + + #----- Find the corresponding cdf to which of the elements. ----------------------------# + of = order(xf) + qxf = seq(from=0,to=1,length.out=length(xf)) + qxf[of] = qxf + #---------------------------------------------------------------------------------------# + + #---------------------------------------------------------------------------------------# + project[ok] = quantile(x=onto,probs=qxf,na.rm=TRUE) + return(project) + #---------------------------------------------------------------------------------------# +}#end +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# Pick the element in array A that has the closest value to x. # +#------------------------------------------------------------------------------------------# +which.closest <<- function(x,A,mask=rep(TRUE,length(A)) ){ + + #----- Create indices before applying the mask, so we retrieve the actual index. -------# + A.idx = sequence(length(A)) + A = A [mask] + A.idx = A.idx[mask] + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Check whether there is any data that + #---------------------------------------------------------------------------------------# + if (! is.finite(x) || ! any(mask,na.rm=TRUE)){ + #----- x is invalid, return NA. -----------------------------------------------------# + idx = NA + }else if(sum(x == A,na.rm=TRUE) > 1){ + #------------------------------------------------------------------------------------# + # If there are multiple values of x that are the same as x, we randomly sample # + # one value. # + #------------------------------------------------------------------------------------# + idx = sample(A.idx[x == A],size=1) + #------------------------------------------------------------------------------------# + }else{ + #------------------------------------------------------------------------------------# + # Either there is a single value that matches, or none of them match. Either # + # way, we select the closest match. # + #------------------------------------------------------------------------------------# + idx = A.idx[which.min((A-x)^2)] + #------------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------------# + + return(idx) +}#end which.closest +#==========================================================================================# +#==========================================================================================# + + + + + +#==========================================================================================# +#==========================================================================================# +# This function computes the skewness, or the third moment of a distribution. # +#------------------------------------------------------------------------------------------# +skew <<- function (x, na.rm = FALSE){ + + #---- We follow the same convention as the standard deviation. -------------------------# + if (is.matrix(x)) { + msg = "skew() is deprecated.\n Use apply(*, 2, skew) instead." + warning(paste(msg, collapse = ""), call. = FALSE, domain = NA) + ans = apply(X = x, MARGIN = 2, FUN = skew, na.rm = na.rm) + }else if (is.list(x)){ + msg = "skew() is deprecated.\n Use lapply(*, skew) instead." + warning(paste(msg, collapse = ""), call. = FALSE, domain = NA) + ans = lapply(X = x, FUN = skew, na.rm = na.rm) + }else if (is.data.frame(x)){ + msg = "skew() is deprecated.\n Use sapply(*, skew) instead." + warning(paste(msg, collapse = ""), call. = FALSE, domain = NA) + ans = sapply(X = x, skew, na.rm = na.rm) + }else{ + #----- Coerce x to a vector. --------------------------------------------------------# + if (is.vector(x)){ + xx = x + }else{ + xx = as.vector(x) + }#end if + #------------------------------------------------------------------------------------# + + + + #----- Decide whether to delete NA or not. ------------------------------------------# + if (na.rm) xx = xx[! is.na(xx)] + #------------------------------------------------------------------------------------# + + + + #----- Find the skewness. -----------------------------------------------------------# + nx = length(xx) + xx.mean = mean(xx) + xx.sdev = sd(xx) + ans = sum((xx-xx.mean)^3) / (nx * xx.sdev^3) + #------------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------------# + + return(ans) +}#end function skew +#==========================================================================================# +#==========================================================================================# + + + + + +#==========================================================================================# +#==========================================================================================# +# This function computes the kurtosis, or the fourth moment of a distribution. # +#------------------------------------------------------------------------------------------# +kurt <<- function (x, na.rm = FALSE){ + + #---- We follow the same convention as the standard deviation. -------------------------# + if (is.matrix(x)) { + msg = "kurt() is deprecated.\n Use apply(*, 2, kurt) instead." + warning(paste(msg, collapse = ""), call. = FALSE, domain = NA) + ans = apply(X = x, MARGIN = 2, FUN = kurt, na.rm = na.rm) + }else if (is.list(x)){ + msg = "kurt() is deprecated.\n Use lapply(*, kurt) instead." + warning(paste(msg, collapse = ""), call. = FALSE, domain = NA) + ans = lapply(X = x, FUN = kurt, na.rm = na.rm) + }else if (is.data.frame(x)){ + msg = "kurt() is deprecated.\n Use sapply(*, kurt) instead." + warning(paste(msg, collapse = ""), call. = FALSE, domain = NA) + ans = sapply(X = x, kurt, na.rm = na.rm) + }else{ + #----- Coerce x to a vector. --------------------------------------------------------# + if (is.vector(x)){ + xx = x + }else{ + xx = as.vector(x) + }#end if + #------------------------------------------------------------------------------------# + + + + #----- Decide whether to delete NA or not. ------------------------------------------# + if (na.rm) xx = xx[! is.na(xx)] + #------------------------------------------------------------------------------------# + + + + #----- Find the skewness. -----------------------------------------------------------# + nx = length(xx) + xx.mean = mean(xx) + xx.sdev = sd(xx) + ans = sum((xx-xx.mean)^4) / (nx * xx.sdev^4) - 3 + #------------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------------# + + return(ans) +}#end function kurt +#==========================================================================================# +#==========================================================================================# + + + + + +#==========================================================================================# +#==========================================================================================# +# This function finds the element index given the array index and the dimensions of # +# the array. This is the inverse of function arrayInd in R. # +# # +# Original author: Feng Li, Department of Statistics, Stockholm University, Sweden. # +# Based on last version as of Wed Mar 14 18:03:09 CET 2012. # +# # +# Modified by: Marcos Longo. Department of Earth and Planetary Sciences, # +# Harvard University, Cambridge, MA, USA # +# Last modified on 25 Oct 2012 - 10:56 EST # +# # +# The script now recognises whether the arr.ind is a vector, matrix, or # +# list and call it self recursively to return the full list. +#------------------------------------------------------------------------------------------# +whichInd <<- function(ai, dims){ + + #----- Save the number of dimensions. --------------------------------------------------# + n.dims = length(dims) + #---------------------------------------------------------------------------------------# + + + + #---- Check the variable type. ---------------------------------------------------------# + if (is.matrix(ai) || is.data.frame(ai)) { + #----- Check that the dimensions match. ---------------------------------------------# + if ( ncol(ai) != n.dims){ + cat(" - Number of columns of ai: ",ncol(ai),"\n") + cat(" - Length of dims: ",n.dims ,"\n") + stop(" Dimensions between ai and dims don't match!") + }#end if + #------------------------------------------------------------------------------------# + + ans = apply (X = ai, FUN = whichInd, MARGIN = 1, dims=dims) + + }else if (is.list(ai)){ + #----- Check that the dimensions match. ---------------------------------------------# + if ( any(sapply(X=ai,FUN=length) != n.dims)){ + fail = sum(sapply(X=ai,FUN=length) != n.dims) + cat (" - ",fail," elements of ai don't have correct dimensions","\n") + cat (" - Length of dims: ",n.dims,"\n") + stop(" Dimensions between some ai elements and dims don't match!") + }#end if + #------------------------------------------------------------------------------------# + + ans = lapply(X = ai, FUN = whichInd, dims=dims) + }else{ + + #----- Coerce the data to be a vector. ----------------------------------------------# + if (length(ai) != length(dims)){ + cat (" - Length of ai : ",length(ai),"\n") + cat (" - Length of dims: ",n.dims ,"\n") + stop(" ai must have the same length as dims") + }#end if + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Variable cumdim is the number of elements we jump every time the index increases # + # by 1. Variable shif is just the array # + # + #------------------------------------------------------------------------------------# + cumdim = c(1,cumprod(dims[-n.dims])) + ans = 1 + sum(cumdim*(ai-1)) + #------------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------------# + + return(ans) +}#end whichInd +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function is a safe wrapper for function sample, to ensure that we always sample # +# the object given, even when it it an object of size 1. # +#------------------------------------------------------------------------------------------# +lit.sample <<- function(x,size,replace=FALSE,prob=NULL){ + if (length(x) == 1){ + ans = rep(x=x,times=size) + }else{ + ans = sample(x,size,replace,prob) + }#end if + return(ans) +}#end function lit.sample +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/optim.gpp.par.fit.r b/R-utils/optim.gpp.par.fit.r new file mode 100644 index 000000000..4260866b5 --- /dev/null +++ b/R-utils/optim.gpp.par.fit.r @@ -0,0 +1,43 @@ +#==========================================================================================# +#==========================================================================================# +# This function predicts GPP for a given light profile. # +#------------------------------------------------------------------------------------------# +predict.gpp.from.par <<- function(x,par.in){ + gpp = x[1] + x[2] * par / (x[3] + par) + return(gpp) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + +#==========================================================================================# +#==========================================================================================# +# This function finds the sum of the squares, which is the log likelihood if we # +# asume the errors to be independent and normally distributed (a big assumption). # +#==========================================================================================# +#==========================================================================================# +rshort.in.wn.support <<- function(x,datum){ + + rsbdown.try = predict.rshort.bdown( x = x + , rad.in = rshort.in + , atm.prss = atm.prss + , cosz = cosz + , rad.type = "rshort" + )#end predict.rshort.bdown + + residual.par.full = rsbdown.try$par.full - par.in + residual.nir.full = rsbdown.try$nir.full - nir.in + residual.par.diff = rsbdown.try$par.diff - par.diff + + residual = c(residual.par.full,residual.nir.full,residual.par.diff) + sigma = c(sigma.par.full ,sigma.nir.full ,sigma.par.diff ) + chi.square = sum((residual/sigma)^2,na.rm=TRUE) + + support = - chi.square + return(support) +}#end function rlong.in.mmi.lnlike +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/optim.rshort.fit.r b/R-utils/optim.rshort.fit.r new file mode 100644 index 000000000..da6bf335f --- /dev/null +++ b/R-utils/optim.rshort.fit.r @@ -0,0 +1,255 @@ +#==========================================================================================# +#==========================================================================================# +# This subroutine computes the split between direct and diffuse radiation, and # +# between visible and near-infrared radiation using the method suggested by: # +# # +# Weiss, A., J. M. Norman, 1985: Partitioning solar radiation into direct and diffuse, # +# visible and near-infrared components. Agric. For. Meteorol., 34, 205-213. (WN85) # +# # +# Input variables: # +# # +# * rad.in - The incoming radiation at surface, in W/m2. This can be either PAR, # +# NIR, or the total shortwave radiation, but it must be in W/m2 in any of # +# the cases. # +# * atm.prss - The atmospheric pressure at the surface, in Pa. An actual measurement # +# is better, but if you don't have one just use some typical value given # +# the place altitude (higher elevation sites get more radiation). # +# * cosz - The cosine of zenith angle. This can be estimated using function ed.zen # +# in file zen.r +# * rad.type - The type of radiation provided in rad.in. Default is total shortwave # +# radiation, but the function also accepts PAR or NIR. The value is case # +# insensitive and only the first letter is checked. "p" means PAR, "n" # +# means NIR, and any other letter will be assumed shortwave. # +#------------------------------------------------------------------------------------------# +predict.rshort.bdown = function(x,rad.in,atm.prss,cosz,rad.type="rshort"){ + #---------------------------------------------------------------------------------------# + # Local constants. # + #---------------------------------------------------------------------------------------# + #----- Extinction coefficient. (equations 1 and 4 of WN85) -----------------------------# + par.beam.expext = -exp(x[ 1]) + nir.beam.expext = -exp(x[ 2]) + #----- This is the typical conversion of diffuse radiation in sunny days. --------------# + par2diff.sun = inv.logit(x[ 3]) + nir2diff.sun = inv.logit(x[ 4]) + #----- Coefficients for various equations in WN85. -------------------------------------# + wn85.06 = c( x[ 5], x[ 6], x[ 7] ) + req = c( x[ 8], x[ 9] ) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Make rad type case insensitive, and retain only the first letter. # + #---------------------------------------------------------------------------------------# + rty = substring(tolower(rad.type),1,1) + #---------------------------------------------------------------------------------------# + + + #------ Initialise the radiation with NAs. ---------------------------------------------# + par.beam = NA * rad.in + nir.beam = NA * rad.in + par.diff = NA * rad.in + nir.diff = NA * rad.in + par.full = NA * rad.in + nir.full = NA * rad.in + rshort.beam = NA * rad.in + rshort.diff = NA * rad.in + rshort.full = NA * rad.in + par.max = NA * rad.in + nir.max = NA * rad.in + rshort.max = NA * rad.in + + + #------ Make day and night flags. ------------------------------------------------------# + ntimes = length(cosz) + night = cosz <= cosz.min + day = ! night + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # First thing to check is whether this is daytime or "night-time". If the zenith # + # angle is too close to horizon, we assume it's dawn/dusk and all radiation goes to # + # diffuse. # + #---------------------------------------------------------------------------------------# + par.beam [night] = 0.0 + nir.beam [night] = 0.0 + if (rty == "p"){ + par.diff [night] = rad.in[night] + nir.diff [night] = fnir.diff.def * rad.in[night] / fvis.diff.def + }else if(rty == "n"){ + par.diff [night] = fvis.diff.def * rad.in[night] / fnir.diff.def + nir.diff [night] = rad.in[night] + }else{ + par.diff [night] = fvis.diff.def * rad.in[night] + nir.diff [night] = fnir.diff.def * rad.in[night] + }#end if + par.full [night] = par.beam [night] + par.diff [night] + nir.full [night] = nir.beam [night] + nir.diff [night] + rshort.beam [night] = par.beam [night] + nir.beam [night] + rshort.diff [night] = par.diff [night] + nir.diff [night] + rshort.full [night] = rshort.beam[night] + rshort.diff[night] + par.max [night] = 0.0 + nir.max [night] = 0.0 + rshort.max [night] = 0.0 + #---------------------------------------------------------------------------------------# + + + + #----- Save 1/cos(zen), which is the secant. We will use this several times. ----------# + secz = 1. / cosz[day] + log10secz = log10(secz) + #---------------------------------------------------------------------------------------# + + + #----- Total radiation at the top [ W/m2], using ED defaults. -------------------------# + par.beam.top = fvis.beam.def * solar + nir.beam.top = fnir.beam.def * solar + #---------------------------------------------------------------------------------------# + + #---------------------------------------------------------------------------------------# + # Find the potential PAR components (beam, diffuse, total), using equations 1, 3, # + # and 9 of WN85. # + #---------------------------------------------------------------------------------------# + par.beam.pot = ( par.beam.top + * exp ( par.beam.expext * (atm.prss[day] / prefsea) * secz) * cosz[day]) + par.diff.pot = par2diff.sun * (par.beam.top - par.beam.pot) * cosz[day] + par.full.pot = par.beam.pot + par.diff.pot + #------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the NIR absorption of 10 mm of precipitable water, using WN85 equation 6. # + #---------------------------------------------------------------------------------------# + w10 = solar * 10 ** ((wn85.06[1]) + log10secz * (wn85.06[2] + wn85.06[3] * log10secz)) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the potential direct and diffuse near-infrared radiation, using equations # + # 4, 5, and 10 of WN85. # + #---------------------------------------------------------------------------------------# + nir.beam.pot = ( ( nir.beam.top + * exp ( nir.beam.expext * (atm.prss[day] / prefsea) * secz) - w10 ) + * cosz[day] ) + nir.diff.pot = nir2diff.sun * ( nir.beam.top - nir.beam.pot - w10 ) * cosz[day] + nir.full.pot = nir.beam.pot + nir.diff.pot + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Total maximum radiation. # + #---------------------------------------------------------------------------------------# + par.max [day] = par.full.pot + nir.max [day] = nir.full.pot + rshort.max[day] = par.full.pot + nir.full.pot + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the actual total for PAR and NIR, using equations 7 and 8. # + #---------------------------------------------------------------------------------------# + if (rty == "p"){ + ratio = rad.in[day] / par.full.pot + }else if (rty == "n"){ + ratio = rad.in[day] / nir.full.pot + }else{ + ratio = rad.in[day] / (par.full.pot + nir.full.pot) + }#end if + par.full[day] = ratio * par.full.pot + nir.full[day] = ratio * nir.full.pot + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the fraction of PAR and NIR that stays as beam, using equations 11 and 12 # + # of WN85. # + #---------------------------------------------------------------------------------------# + #----- Make sure that the ratio is bounded. --------------------------------------------# + ratio.correct = inv.logit(req[1] * (ratio + req[2])) + fvis.beam.act = par.beam.pot / par.full.pot * ratio.correct + fnir.beam.act = nir.beam.pot / nir.full.pot * ratio.correct + fvis.diff.act = 1. - fvis.beam.act + fnir.diff.act = 1. - fnir.beam.act + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the radiation components. # + #---------------------------------------------------------------------------------------# + par.beam [day] = fvis.beam.act * par.full[day] + par.diff [day] = fvis.diff.act * par.full[day] + nir.beam [day] = fnir.beam.act * nir.full[day] + nir.diff [day] = fnir.diff.act * nir.full[day] + rshort.beam [day] = par.beam [day] + nir.beam [day] + rshort.diff [day] = par.diff [day] + nir.diff [day] + rshort.full [day] = rshort.beam[day] + rshort.diff[day] + #---------------------------------------------------------------------------------------# + rshort.bdown = list( par.beam = par.beam + , par.diff = par.diff + , par.full = par.full + , nir.beam = nir.beam + , nir.diff = nir.diff + , nir.full = nir.full + , rshort.beam = rshort.beam + , rshort.diff = rshort.diff + , rshort.full = rshort.full + , par.max = par.max + , nir.max = nir.max + , rshort.max = rshort.max + )#end list + return(rshort.bdown) +}#end function optim.rshort.bdown +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# +#------------------------------------------------------------------------------------------# + + + + + +#==========================================================================================# +#==========================================================================================# +# This function finds the sum of the squares, which is the log likelihood if we # +# asume the errors to be independent and normally distributed (a big assumption). # +#==========================================================================================# +#==========================================================================================# +rshort.in.wn.support <<- function(x,rshort.in,atm.prss,cosz,par.in,nir.in,par.diff + ,sigma.par.full,sigma.nir.full,sigma.par.diff){ + + rsbdown.try = predict.rshort.bdown( x = x + , rad.in = rshort.in + , atm.prss = atm.prss + , cosz = cosz + , rad.type = "rshort" + )#end predict.rshort.bdown + + residual.par.full = rsbdown.try$par.full - par.in + residual.nir.full = rsbdown.try$nir.full - nir.in + residual.par.diff = rsbdown.try$par.diff - par.diff + + residual = c(residual.par.full,residual.nir.full,residual.par.diff) + sigma = c(sigma.par.full ,sigma.nir.full ,sigma.par.diff ) + chi.square = sum((residual/sigma)^2,na.rm=TRUE) + + support = - chi.square + return(support) +}#end function rlong.in.mmi.lnlike +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/optim.size.pft.bio.r b/R-utils/optim.size.pft.bio.r new file mode 100644 index 000000000..5d36773ef --- /dev/null +++ b/R-utils/optim.size.pft.bio.r @@ -0,0 +1,47 @@ +#==========================================================================================# +#==========================================================================================# +# This function finds the relative error of both the size structure and the basal # +# area by species. # +#------------------------------------------------------------------------------------------# +optim.size.pft.bio <<- function( logdbh.minus.min # Log of DBH above minimum + , obs.dbh.cnt # Frequency of each DBH class (dbh.bks) + , dbh.bks # DBH breaks for size evaluation + , census # Table with the full census + , datum # Table with the sought properties + , pft.var = "pft" # Variable to determine the PFT + , dbh.min = 10. # Minimum DBH + , tiny.off = 1.e-20 # Tiny offset + ){ + + #----- Revert back to DBH. -------------------------------------------------------------# + dbh.now = dbh.min + exp(logdbh.minus.min) + #---------------------------------------------------------------------------------------# + + + + #----- Find the error due to size distribution. ----------------------------------------# + dbh.cut = cut(dbh.now,dbh.bks) + dbh.cnt = tiny.off + table(dbh.cut) + if (tiny.off == 0){ + rmse.size = ( sum((dbh.cnt/sum(dbh.cnt)-obs.dbh.cnt/sum(obs.dbh.cnt))^2) + / length(obs.dbh.cnt) ) + }else{ + rmse.size = sum((log(dbh.cnt)-log(obs.dbh.cnt))^2) / length(obs.dbh.cnt) + }#end if + #---------------------------------------------------------------------------------------# + + + + #----- Find the error due to basal area by PFT. ----------------------------------------# + bsa.now = 0.25 * pi * dbh.now^2 + bsa.pft = tapply(X=bsa.now,INDEX=census[[pft.var]],FUN=sum,na.rm=TRUE) + idx = match(datum[[pft.var]],names(bsa.pft)) + rmse.bsa = sum((log(datum$bsa) - log(bsa.pft[idx]))^2) / length(datum$bsa) + #---------------------------------------------------------------------------------------# + + rmse = sqrt(rmse.size^2+rmse.bsa^2) + + return(rmse) +}#end function +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/par.split.r b/R-utils/par.split.r new file mode 100644 index 000000000..933ff4ad7 --- /dev/null +++ b/R-utils/par.split.r @@ -0,0 +1,91 @@ +#==========================================================================================# +#==========================================================================================# +# This function splits the photosynthetically active radiation into direct and # +# diffuse. # +# # +# Weiss, A., J. M. Norman, 1985: Partitioning solar radiation into direct and diffuse, # +# visible and near-infrared components. Agric. For. Meteorol., 34, 205-213. (WN85) # +#------------------------------------------------------------------------------------------# +par.split = function(cosz,partop,atm.prss){ + #---------------------------------------------------------------------------------------# + # Local constants. # + #---------------------------------------------------------------------------------------# + #----- Extinction coefficient. (equations 1 and 4 of WN85) -----------------------------# + par.beam.expext = -0.185 + nir.beam.expext = -0.060 + #----- This is the typical conversion of diffuse radiation in sunny days. --------------# + par2diff.sun = 0.400 + nir2diff.sun = 0.600 + #----- Coefficients for various equations in WN85. -------------------------------------# + wn85.06 = c( -1.1950, 0.4459, -0.0345 ) + wn85.11 = c( 0.90, 0.70 ) + wn85.12 = c( 0.88, 0.68 ) + + #----- Initialise terms. ---------------------------------------------------------------# + par.diff = cosz * NA + par.beam = cosz * NA + + if (cosz < cosz.min){ + par.diff = partop + par.beam = 0. + par.out = list(beam=par.beam,diff=par.diff) + return(par.out) + }#end if + + #----- Save 1/cos(zen), which is the secant. We will use this several times. ----------# + secz = 1. / cosz + log10secz = log10(secz) + #---------------------------------------------------------------------------------------# + + #----- Total radiation at the top [ W/m2], using ED defaults. -------------------------# + par.beam.top = fvis.beam.def * solar + + #---------------------------------------------------------------------------------------# + # Find the potential PAR components (beam, diffuse, total), using equations 1, 3, # + # and 9 of WN85. # + #---------------------------------------------------------------------------------------# + par.beam.pot = ( par.beam.top * exp ( par.beam.expext * (atm.prss / prefsea) * secz) + * cosz ) + par.diff.pot = par2diff.sun * (par.beam.top - par.beam.pot) * cosz + par.full.pot = par.beam.pot + par.diff.pot + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the actual total for PAR and NIR, using equations 7 and 8. # + #---------------------------------------------------------------------------------------# + ratio = partop / par.full.pot + par.full = ratio * par.full.pot + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the fraction of PAR and NIR that stays as beam, using equations 11 and 12 # + # of WN85. # + #---------------------------------------------------------------------------------------# + #----- Make sure that the ratio is bounded. --------------------------------------------# + aux.par = min(wn85.11[1], max(0., ratio)) + fvis.beam.act = min(1., max(0., par.beam.pot + * (1. - ((wn85.11[1] - aux.par)/wn85.11[2]) ^ twothirds) + / par.full.pot ) ) + fvis.diff.act = 1. - fvis.beam.act + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the radiation components. # + #---------------------------------------------------------------------------------------# + par.beam = fvis.beam.act * par.full + par.diff = fvis.diff.act * par.full + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + par.out = list(beam=par.beam,diff=par.diff) + return(par.out) +}#end function + diff --git a/R-utils/pcomp_varlist.r b/R-utils/pcomp_varlist.r new file mode 100644 index 000000000..b0674cd18 --- /dev/null +++ b/R-utils/pcomp_varlist.r @@ -0,0 +1,1321 @@ +#==========================================================================================# +#==========================================================================================# +# List of possible time series plots. Pay attention to this list because all the other # +# plots will depend on this list. # +# # +# Variable is.sum tells whether to sum the total (TRUE), or to average (FALSE). # +#------------------------------------------------------------------------------------------# + n = 0 + scen.ts = list() + n = n + 1 + scen.ts[[n]] = list( vname = "agb" + , desc = "Above ground biomass" + , unit = "kgC/m2" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end lis + n = n + 1 + scen.ts[[n]] = list( vname = "bgb" + , desc = "Below ground biomass" + , unit = "kgC/m2" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end lis + n = n + 1 + scen.ts[[n]] = list( vname = "biomass" + , desc = "Total biomass" + , unit = "kgC/m2" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end lis + n = n + 1 + scen.ts[[n]] = list( vname = "lai" + , desc = "Leaf area index" + , unit = "m2/m2" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "nplant" + , desc = "Plant density" + , unit = "plant/m2" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end lis + n = n + 1 + scen.ts[[n]] = list( vname = "gpp" + , desc = "Gross primary productivity" + , unit = "kgC/m2/yr" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "npp" + , desc = "Net primary productivity" + , unit = "kgC/m2/yr" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "mco" + , desc = "Maintenance costs" + , unit = "kgC/m2/yr" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "cba" + , desc = "Carbon balance" + , unit = "kgC/m2/yr" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "ldrop" + , desc = "Leaf drop" + , unit = "kgC/m2/yr" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "bstorage" + , desc = "Storage biomass" + , unit = "kgC/m2" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = FALSE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "ba" + , desc = "Basal area" + , unit = "cm2/m2" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "fs.open" + , desc = "Soil moisture stress factor" + , unit = "--" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "mort" + , desc = "Mortality rate" + , unit = "%pop/yr" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = TRUE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "recr" + , desc = "Recruitment rate" + , unit = "%pop/yr" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = TRUE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "growth" + , desc = "Growth rate (DBH)" + , unit = "%DBH/yr" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "ncbmort" + , desc = "Mortality rate - Neg. C balance" + , unit = "%pop/yr" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = TRUE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "dimort" + , desc = "Mortality rate - Density-independent" + , unit = "%pop/yr" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = TRUE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "cbamax" + , desc = "Maximum carbon balance" + , unit = "kgC/m2/yr" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "cbarel" + , desc = "Relative carbon balance" + , unit = "--" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "demand" + , desc = "Water demand" + , unit = "kg/m2/day" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "supply" + , desc = "Water supply" + , unit = "kg/m2/day" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "rain" + , desc = "Precipitation" + , unit = "mm" + , f.aggr = "sum" + , pftvar = FALSE + , dbhvar = FALSE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "water.deficit" + , desc = "Water deficit (ED-2.2)" + , unit = "mm" + , f.aggr = "max" + , pftvar = FALSE + , dbhvar = FALSE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "malhi.deficit" + , desc = "Water deficit (Malhi 2009)" + , unit = "mm" + , f.aggr = "max" + , pftvar = FALSE + , dbhvar = FALSE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "atm.temp" + , desc = "Air temperature" + , unit = "degC" + , f.aggr = "mean" + , pftvar = FALSE + , dbhvar = FALSE + , plog = FALSE + , mort = FALSE + , recr = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "leaf.temp" + , desc = "Leaf temperature" + , unit = "degC" + , f.aggr = "mean" + , pftvar = FALSE + , dbhvar = FALSE + , plog = FALSE + , mort = FALSE + , recr = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "rshort" + , desc = "Incoming shortwave radiation" + , unit = "W/m2" + , f.aggr = "mean" + , pftvar = FALSE + , dbhvar = FALSE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "rlong" + , desc = "Incoming longwave radiation" + , unit = "W/m2" + , f.aggr = "mean" + , pftvar = FALSE + , dbhvar = FALSE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "atm.vpd" + , desc = "Air vapour pressure deficit" + , unit = "Pa" + , f.aggr = "mean" + , pftvar = FALSE + , dbhvar = FALSE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "leaf.vpd" + , desc = "Leaf vapour pressure deficit" + , unit = "Pa" + , f.aggr = "mean" + , pftvar = FALSE + , dbhvar = FALSE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "paw" + , desc = "Potential Available Water" + , unit = "%" + , f.aggr = "mean" + , pftvar = FALSE + , dbhvar = FALSE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "smpot" + , desc = "Soil Matric Potential" + , unit = "MPa" + , f.aggr = "mean" + , pftvar = FALSE + , dbhvar = FALSE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "nep" + , desc = "Net Ecosystem Productivity" + , unit = "kgC/m2/yr" + , f.aggr = "mean" + , pftvar = FALSE + , dbhvar = FALSE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "reco" + , desc = "Ecosystem Respiration" + , unit = "kgC/m2/yr" + , f.aggr = "mean" + , pftvar = FALSE + , dbhvar = FALSE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "fast.soil.c" + , desc = "Fast soil carbon" + , unit = "kgC/m2" + , f.aggr = "mean" + , pftvar = FALSE + , dbhvar = FALSE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "struct.soil.c" + , desc = "Structural soil carbon" + , unit = "kgC/m2" + , f.aggr = "mean" + , pftvar = FALSE + , dbhvar = FALSE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "slow.soil.c" + , desc = "Slow soil carbon" + , unit = "kgC/m2" + , f.aggr = "mean" + , pftvar = FALSE + , dbhvar = FALSE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "het.resp" + , desc = "Heterotrophic Respiration" + , unit = "kgC/m2/yr" + , f.aggr = "mean" + , pftvar = FALSE + , dbhvar = FALSE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "plant.resp" + , desc = "Plant Respiration" + , unit = "kgC/m2/yr" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "hflxlc" + , desc = "Leaf sensible heat" + , unit = "W/m2" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "wflxlc" + , desc = "Leaf Evaporation" + , unit = "kg/m2/day" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "transp" + , desc = "Leaf Transpiration" + , unit = "kg/m2/day" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "i.gpp" + , desc = "Mean Gross Primary Production" + , unit = "kgC/plant/yr" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "i.npp" + , desc = "Mean Net Primary Production" + , unit = "kgC/plant/yr" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "i.plant.resp" + , desc = "Mean Plant Respiration" + , unit = "kgC/plant/yr" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "i.cba" + , desc = "Mean Carbon balance" + , unit = "kgC/plant/yr" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "i.cbamax" + , desc = "Mean Maximum C balance" + , unit = "kgC/plant/yr" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "i.hflxlc" + , desc = "Mean Leaf sensible heat flux" + , unit = "W/plant" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "i.wflxlc" + , desc = "Mean Leaf evaporation" + , unit = "kg/plant/day" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "i.transp" + , desc = "Mean Transpiration" + , unit = "kg/plant/day" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "hflxgc" + , desc = "Sensible heat - Gnd->CAS" + , unit = "W/m2" + , f.aggr = "mean" + , pftvar = FALSE + , dbhvar = FALSE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "hflxca" + , desc = "Sensible heat - CAS->ATM" + , unit = "W/m2" + , f.aggr = "mean" + , pftvar = FALSE + , dbhvar = FALSE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "wflxgc" + , desc = "Water flux - Gnd->CAS" + , unit = "kg/m2/day" + , f.aggr = "mean" + , pftvar = FALSE + , dbhvar = FALSE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "wflxca" + , desc = "Water flux - CAS->ATM" + , unit = "kg/m2/day" + , f.aggr = "mean" + , pftvar = FALSE + , dbhvar = FALSE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "wue" + , desc = "Water use efficiency" + , unit = "gC/kgH2O" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "leaf.gbw" + , desc = "Leaf Bnd. Lyr. Conductance" + , unit = "kg/m2/day" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "leaf.gsw" + , desc = "Leaf stomatal Conductance" + , unit = "kg/m2/day" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "f.gpp" + , desc = "Gross Primary Productivity" + , unit = "%biomass/yr" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "f.plant.resp" + , desc = "Plant respiration" + , unit = "%biomass/yr" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "f.npp" + , desc = "Net Primary Productivity" + , unit = "%biomass/yr" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "f.cba" + , desc = "Carbon balance" + , unit = "%biomass/yr" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "f.bstorage" + , desc = "Relative storage biomass" + , unit = "gC_st/kgC_bio" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "f.bleaf" + , desc = "Relative leaf biomass" + , unit = "gC_leaf/kgC_bio" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "f.broot" + , desc = "Relative root biomass" + , unit = "gC_root/kgC_bio" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "f.bseeds" + , desc = "Relative seed biomass" + , unit = "gC_seed/kgC_bio" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "leaf.par" + , desc = "Absorbed PAR - Leaf" + , unit = "umol/m2leaf/s" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "leaf.rshort" + , desc = "Absorbed SW - Leaf" + , unit = "W/m2leaf" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + n = n + 1 + scen.ts[[n]] = list( vname = "leaf.rlong" + , desc = "Absorbed LW - Leaf" + , unit = "W/m2leaf" + , f.aggr = "mean" + , pftvar = TRUE + , dbhvar = TRUE + , mort = FALSE + , recr = FALSE + , plog = FALSE + , plt = TRUE + )#end list + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Replace the list by a data frame. # + #---------------------------------------------------------------------------------------# + scen.ts = data.frame( apply( X = sapply(X=scen.ts,FUN=c), MARGIN = 1, FUN = unlist ) + , stringsAsFactors = FALSE + )#end data.frame + for (nl in c("pftvar","dbhvar","mort","recr","plog","plt")){ + scen.ts[[nl]] = as.logical(scen.ts[[nl]]) + }#end for + #---------------------------------------------------------------------------------------# +#==========================================================================================# +#==========================================================================================# + + + + +#==========================================================================================# +#==========================================================================================# +# This list tells which variables to do the plot of size and PFT-dependent box plot. # +# Units, description, and log scale will be copied from scen.ts. # +# # +# IMPORTANT: All variables here MUST come from one of the variables defined in scen.ts, # +# and they must be PFT-dependent or PFT- and DBH- dependent (in which case two # +# plots will be generated). # +#------------------------------------------------------------------------------------------# + #----- All that we need here is the variable name. -------------------------------------# + scen.szpft = data.frame( vname = c( "agb", "lai", "ba" + , "recr", "mort", "ncbmort" + , "dimort", "growth", "gpp" + , "npp", "plant.resp", "cba" + , "mco", "bstorage", "fs.open" + , "supply", "demand", "hflxlc" + , "wflxlc", "transp", "i.gpp" + , "i.plant.resp", "i.npp", "i.cba" + , "i.transp", "cbamax", "i.hflxlc" + , "i.wflxlc", "wue", "i.cbamax" + , "leaf.gsw", "leaf.gbw", "f.gpp" + , "f.npp", "f.cba", "f.bstorage" + , "f.bleaf", "f.bseeds", "rain" + ,"water.deficit","malhi.deficit", "atm.vpd" + , "leaf.vpd", "leaf.temp", "atm.temp" + , "leaf.par" + )#end c + , stringsAsFactors = FALSE + )#end vname + #---------------------------------------------------------------------------------------# + + + + + + + #---------------------------------------------------------------------------------------# + # Fill in the box plot list with information brought from scen.ts. # + #---------------------------------------------------------------------------------------# + #----- Find the variable names to be added. --------------------------------------------# + which.names = names(scen.ts) + keep = ! ( which.names %in% names(scen.szpft)) + which.names = which.names[keep] + #----- Match the lists based on vname. -------------------------------------------------# + sz.idx = match(scen.szpft$vname,scen.ts$vname) + #----- Look for variables that weren't defined in scen.ts. -----------------------------# + sz.miss = is.na(sz.idx) + if (any(sz.miss)){ + cat(" - The following variables in scen.szpft are missing from scen.ts:","\n") + cat(paste(" * ",scen.szpft$vname[sz.miss],sep=""),sep="\n") + stop(" - All variables defined in scen.szpft must be defined in scen.ts!!!") + }#end if(any(sz.miss)) + #---------------------------------------------------------------------------------------# + + + + #----- Append the information to the data frame. ---------------------------------------# + for (wn in which.names) scen.szpft[[wn]] = scen.ts[[wn]][sz.idx] + #---------------------------------------------------------------------------------------# +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This list tells which variables to do the bar plot of size and PFT-dependent, long- # +# term means for each season. # +# Units, description, and log scale will be copied from scen.ts. # +# # +# IMPORTANT: All variables here MUST come from one of the variables defined in scen.ts, # +# and they must be PFT- and DBH- dependent. Avoid variables that can be # +# negative (e.g. npp), or that cannot be stacked (e.g. fs.open) # +#------------------------------------------------------------------------------------------# + #----- All that we need here is the variable name. -------------------------------------# + scen.barplot = data.frame( vname = c( "agb", "lai", "ba" + , "gpp", "ldrop", "mco" + , "supply", "demand", "transp" + , "plant.resp", "i.gpp","i.plant.resp" + , "i.transp" + )#end c + , stringsAsFactors = FALSE + )#end vname + #---------------------------------------------------------------------------------------# + + + + + + + #---------------------------------------------------------------------------------------# + # Fill in the box plot list with information brought from scen.ts. # + #---------------------------------------------------------------------------------------# + #----- Find the variable names to be added. --------------------------------------------# + which.names = names(scen.ts) + keep = ! ( which.names %in% names(scen.barplot)) + which.names = which.names[keep] + #----- Match the lists based on vname. -------------------------------------------------# + bar.idx = match(scen.barplot$vname,scen.ts$vname) + #----- Look for variables that weren't defined in scen.ts. -----------------------------# + bar.miss = is.na(bar.idx) + if (any(bar.miss)){ + cat(" - The following variables in scen.barplot are missing from scen.ts:","\n") + cat(paste(" * ",scen.barplot$vname[bar.miss],sep=""),sep="\n") + stop(" - All variables defined in scen.barplot must be defined in scen.ts!!!") + }#end if(any(bar.miss)) + #---------------------------------------------------------------------------------------# + + + + #----- Append the information to the data frame. ---------------------------------------# + for (wn in which.names) scen.barplot[[wn]] = scen.ts[[wn]][bar.idx] + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # All variables here must be PFT- and DBH- dependent, so we make sure that they are # + # indeed. # + #---------------------------------------------------------------------------------------# + if (! all(scen.barplot$pftvar & scen.barplot$dbhvar)){ + not.pftdbh = ! ( scen.barplot$pftvar & scen.barplot$dbhvar) + cat (" - The following variables in scen.barplot are not PFT+DBH variables:","\n") + cat (paste(" * ",scen.barplot$vname[not.pftdbh],sep=""),sep="\n") + stop(" - All variables defined in scen.barplot must be PFT+DBH variables!!!") + }#end if + #---------------------------------------------------------------------------------------# +#==========================================================================================# +#==========================================================================================# + + + + + +#==========================================================================================# +#==========================================================================================# +# XYZ plots, to explore the parameter space. Units, description, and log scale will # +# be copied from scen.ts. # +# # +# IMPORTANT: All variables here MUST come from one of the variables defined in scen.ts!! # +#------------------------------------------------------------------------------------------# + #----- All that we need here is the variable name, legend position or colour scheme. ---# + scen.xyz = list() + scen.xyz$xvar = list( list( vname = "rshort" , leg = "right" ) + , list( vname = "atm.temp" , leg = "right" ) + , list( vname = "leaf.temp" , leg = "right" ) + , list( vname = "leaf.par" , leg = "right" ) + , list( vname = "leaf.vpd" , leg = "right" ) + , list( vname = "rain" , leg = "right" ) + , list( vname = "smpot" , leg = "right" ) + , list( vname = "water.deficit", leg = "right" ) + , list( vname = "malhi.deficit", leg = "right" ) + , list( vname = "i.cbamax" , leg = "right" ) + , list( vname = "cbarel" , leg = "right" ) + , list( vname = "bstorage" , leg = "right" ) + , list( vname = "f.bstorage" , leg = "right" ) + , list( vname = "leaf.gsw" , leg = "right" ) + )#end list + scen.xyz$yvar = list( list( vname = "recr" , leg = "top" ) + , list( vname = "mort" , leg = "top" ) + , list( vname = "ncbmort" , leg = "top" ) + , list( vname = "dimort" , leg = "top" ) + , list( vname = "growth" , leg = "top" ) + , list( vname = "gpp" , leg = "top" ) + , list( vname = "npp" , leg = "top" ) + , list( vname = "i.gpp" , leg = "top" ) + , list( vname = "i.npp" , leg = "top" ) + , list( vname = "cba" , leg = "top" ) + , list( vname = "mco" , leg = "top" ) + , list( vname = "wue" , leg = "top" ) + , list( vname = "i.transp" , leg = "top" ) + , list( vname = "i.hflxlc" , leg = "top" ) + , list( vname = "leaf.gsw" , leg = "top" ) + )#end list + scen.xyz$zvar = list( list( vname = "lai" , col.scheme = "clife" ) + , list( vname = "ba" , col.scheme = "clife" ) + , list( vname = "agb" , col.scheme = "clife" ) + , list( vname = "nplant" , col.scheme = "clife" ) + )#end list + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Replace the list by a data frame. # + #---------------------------------------------------------------------------------------# + scen.xyz$xvar = data.frame( apply(X=sapply(X=scen.xyz$xvar,FUN=c),MARGIN=1,FUN=unlist) + , stringsAsFactors = FALSE + )#end data.frame + scen.xyz$yvar = data.frame( apply(X=sapply(X=scen.xyz$yvar,FUN=c),MARGIN=1,FUN=unlist) + , stringsAsFactors = FALSE + )#end data.frame + scen.xyz$zvar = data.frame( apply(X=sapply(X=scen.xyz$zvar,FUN=c),MARGIN=1,FUN=unlist) + , stringsAsFactors = FALSE + )#end data.frame + #---------------------------------------------------------------------------------------# + + + + + + + #---------------------------------------------------------------------------------------# + # Fill in the XYZ list with information brought from scen.ts. # + #---------------------------------------------------------------------------------------# + #----- Get all the names that shall be added. ------------------------------------------# + which.names = names(scen.ts) + keep = ( ! which.names %in% union( union( names(scen.xyz$xvar) + , names(scen.xyz$yvar) + )#end union + , names(scen.xyz$zvar) + )#end union + )#end keep + which.names = which.names[keep] + #----- Match the lists based on vname. -------------------------------------------------# + x.idx = match(scen.xyz$xvar$vname,scen.ts$vname) + y.idx = match(scen.xyz$yvar$vname,scen.ts$vname) + z.idx = match(scen.xyz$zvar$vname,scen.ts$vname) + #----- Look for variables that weren't defined in scen.ts. -----------------------------# + x.sel = is.na(x.idx) + y.sel = is.na(y.idx) + z.sel = is.na(z.idx) + if (any(x.sel) | any(y.sel) | any(z.sel)){ + if (any(x.sel)){ + cat(" - The following variables in scen.xyz$xvar are missing from scen.ts:","\n") + cat(paste(" * ",scen.xyz$xvar$vname[x.sel],sep=""),sep="\n") + }#end if(any(x.sel)) + if (any(y.sel)){ + cat(" - The following variables in scen.xyz$yvar are missing from scen.ts:","\n") + cat(paste(" * ",scen.xyz$yvar$vname[y.sel],sep=""),sep="\n") + }#end if(any(y.sel)) + if (any(z.sel)){ + cat(" - The following variables in scen.xyz$zvar are missing from scen.ts:","\n") + cat(paste(" * ",scen.xyz$zvar$vname[z.sel],sep=""),sep="\n") + }#end if(any(z.sel)) + stop(" - All variables defined in scen.xyz must be defined in scen.ts!!!") + }#end if + #---------------------------------------------------------------------------------------# + + + + #----- Append the information to the data frame. ---------------------------------------# + for (wn in which.names){ + scen.xyz$xvar[[wn]] = scen.ts[[wn]][x.idx] + scen.xyz$yvar[[wn]] = scen.ts[[wn]][y.idx] + scen.xyz$zvar[[wn]] = scen.ts[[wn]][z.idx] + }#end for + #---------------------------------------------------------------------------------------# +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This list tells which variables to do the scenario comparison panel, with each panel # +# representing a collection of scenarios. Only mean differences will be plotted. Because # +# this works with differences, log variables will not be plotted as log variables. # +# # +# IMPORTANT: All variables here MUST come from one of the variables defined in scen.ts. # +#------------------------------------------------------------------------------------------# + #----- All that we need here is the variable name. -------------------------------------# + scen.comp = list( list( vname = "agb", low = "purple" , high = "green" ) + , list( vname = "lai", low = "purple" , high = "green" ) + , list( vname = "ba", low = "purple" , high = "green" ) + , list( vname = "gpp", low = "purple" , high = "green" ) + , list( vname = "npp", low = "purple" , high = "green" ) + , list( vname = "mco", low = "purple" , high = "green" ) + , list( vname = "cba", low = "purple" , high = "green" ) + , list( vname = "ldrop", low = "green" , high = "purple" ) + , list( vname = "bstorage", low = "purple" , high = "green" ) + , list( vname = "fs.open", low = "orangered", high = "blue" ) + , list( vname = "mort", low = "green" , high = "purple" ) + , list( vname = "recr", low = "purple" , high = "green" ) + , list( vname = "growth", low = "purple" , high = "green" ) + , list( vname = "ncbmort", low = "green" , high = "purple" ) + , list( vname = "dimort", low = "green" , high = "purple" ) + , list( vname = "cbarel", low = "purple" , high = "green" ) + , list( vname = "demand", low = "blue" , high = "orangered") + , list( vname = "supply", low = "orangered", high = "blue" ) + , list( vname = "rain", low = "orangered", high = "blue" ) + , list( vname = "water.deficit", low = "blue" , high = "orangered") + , list( vname = "atm.temp", low = "blue" , high = "orangered") + , list( vname = "leaf.temp", low = "blue" , high = "orangered") + , list( vname = "rshort", low = "grey" , high = "blue" ) + , list( vname = "rlong", low = "blue" , high = "grey" ) + , list( vname = "atm.vpd", low = "blue" , high = "orangered") + , list( vname = "leaf.vpd", low = "blue" , high = "orangered") + , list( vname = "paw", low = "orangered", high = "blue" ) + , list( vname = "smpot", low = "blue" , high = "orangered") + , list( vname = "nep", low = "purple" , high = "green" ) + , list( vname = "reco", low = "blue" , high = "orangered") + , list( vname = "fast.soil.c", low = "blue" , high = "orangered") + , list( vname = "struct.soil.c", low = "blue" , high = "orangered") + , list( vname = "slow.soil.c", low = "blue" , high = "orangered") + , list( vname = "het.resp", low = "blue" , high = "orangered") + , list( vname = "plant.resp", low = "blue" , high = "orangered") + , list( vname = "hflxlc", low = "blue" , high = "orangered") + , list( vname = "wflxlc", low = "orangered", high = "blue" ) + , list( vname = "transp", low = "orangered", high = "blue" ) + , list( vname = "hflxgc", low = "blue" , high = "orangered") + , list( vname = "hflxca", low = "blue" , high = "orangered") + , list( vname = "wflxgc", low = "orangered", high = "blue" ) + , list( vname = "wflxca", low = "orangered", high = "blue" ) + , list( vname = "i.hflxlc", low = "blue" , high = "orangered") + , list( vname = "i.wflxlc", low = "orangered", high = "blue" ) + , list( vname = "i.transp", low = "orangered", high = "blue" ) + , list( vname = "i.gpp", low = "purple" , high = "green" ) + , list( vname = "i.npp", low = "purple" , high = "green" ) + , list( vname = "i.plant.resp", low = "green" , high = "purple" ) + , list( vname = "i.cba", low = "purple" , high = "green" ) + , list( vname = "i.cbamax", low = "purple" , high = "green" ) + , list( vname = "wue", low = "purple" , high = "green" ) + , list( vname = "leaf.gbw", low = "orangered", high = "blue" ) + , list( vname = "leaf.gsw", low = "orangered", high = "blue" ) + , list( vname = "leaf.par", low = "blue" , high = "orangered") + , list( vname = "leaf.rshort", low = "blue" , high = "orangered") + , list( vname = "leaf.rlong", low = "blue" , high = "orangered") + , list( vname = "f.bstorage", low = "purple" , high = "green" ) + , list( vname = "f.bseeds", low = "purple" , high = "green" ) + )#end list + + + + #------------------------------------------------------------------------------------# + # Replace the list by a data frame. # + #------------------------------------------------------------------------------------# + scen.comp = data.frame( apply(X=sapply(X=scen.comp,FUN=c),MARGIN=1,FUN=unlist) + , stringsAsFactors = FALSE + )#end data.frame + #------------------------------------------------------------------------------------# + #---------------------------------------------------------------------------------------# + + + + + + + #---------------------------------------------------------------------------------------# + # Fill in the box plot list with information brought from scen.ts. # + #---------------------------------------------------------------------------------------# + #----- Find the variable names to be added. --------------------------------------------# + which.names = names(scen.ts) + keep = ! ( which.names %in% names(scen.comp)) + which.names = which.names[keep] + #----- Match the lists based on vname. -------------------------------------------------# + comp.idx = match(scen.comp$vname,scen.ts$vname) + #----- Look for variables that weren't defined in scen.ts. -----------------------------# + comp.miss = is.na(comp.idx) + if (any(comp.miss)){ + cat(" - The following variables in scen.comp are missing from scen.ts:","\n") + cat(paste(" * ",scen.comp$vname[comp.miss],sep=""),sep="\n") + stop(" - All variables defined in scen.comp must be defined in scen.ts!!!") + }#end if(any(x.sel)) + #---------------------------------------------------------------------------------------# + + + + #----- Append the information to the data frame. ---------------------------------------# + for (wn in which.names) scen.comp[[wn]] = scen.ts[[wn]][comp.idx] + #---------------------------------------------------------------------------------------# +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This list tells which variables to do the box plot comparing the scenarios, each # +# plot having the scenario[[1]] in the X scale, and scenario 2 in the group of box plots # +# Panels are panels. # +# # +# IMPORTANT: All variables here MUST come from one of the variables defined in scen.ts. # +#------------------------------------------------------------------------------------------# + #----- All that we need here is the variable name. -------------------------------------# + panel.box = data.frame( vname = c( "agb", "lai", "ba" + , "gpp", "npp", "mco" + , "cba", "ldrop", "bstorage" + , "fs.open", "mort", "recr" + , "growth", "ncbmort", "dimort" + , "cbarel", "demand", "supply" + , "rain","water.deficit","malhi.deficit" + , "atm.temp", "leaf.temp", "rshort" + , "rlong", "atm.vpd", "leaf.vpd" + , "paw", "smpot", "nep" + , "reco", "fast.soil.c","struct.soil.c" + , "slow.soil.c", "het.resp", "plant.resp" + , "hflxlc", "wflxlc", "transp" + , "hflxgc", "hflxca", "wflxgc" + , "wflxca", "i.hflxlc", "i.wflxlc" + , "i.transp", "i.gpp", "i.npp" + , "i.plant.resp", "i.cba", "i.cbamax" + , "wue", "leaf.gbw", "leaf.gsw" + , "leaf.par", "leaf.rshort", "f.gpp" + , "f.npp", "f.cba", "f.bstorage" + , "f.bseeds", "f.bleaf" + )#end vname + , stringsAsFactors = FALSE + )#end data.frame + #---------------------------------------------------------------------------------------# + + + + + + + #---------------------------------------------------------------------------------------# + # Fill in the box plot list with information brought from scen.ts. # + #---------------------------------------------------------------------------------------# + #----- Find the variable names to be added. --------------------------------------------# + which.names = names(scen.ts) + keep = ! ( which.names %in% names(panel.box)) + which.names = which.names[keep] + #----- Match the lists based on vname. -------------------------------------------------# + comp.idx = match(panel.box$vname,scen.ts$vname) + #----- Look for variables that weren't defined in scen.ts. -----------------------------# + comp.miss = is.na(comp.idx) + if (any(comp.miss)){ + cat(" - The following variables in panel.box are missing from scen.ts:","\n") + cat(paste(" * ",panel.box$vname[comp.miss],sep=""),sep="\n") + stop(" - All variables defined in panel.box must be defined in scen.ts!!!") + }#end if(any(x.sel)) + #---------------------------------------------------------------------------------------# + + + + #----- Append the information to the data frame. ---------------------------------------# + for (wn in which.names) panel.box[[wn]] = scen.ts[[wn]][comp.idx] + #---------------------------------------------------------------------------------------# +#==========================================================================================# +#==========================================================================================# + + + + +#==========================================================================================# +#==========================================================================================# +# Turn the variables that matter global. # +#------------------------------------------------------------------------------------------# +scen.ts <<- scen.ts +scen.szpft <<- scen.szpft +scen.barplot <<- scen.barplot +scen.xyz <<- scen.xyz +scen.comp <<- scen.comp +panel.box <<- panel.box +nscen.ts <<- nrow(scen.ts) +nscen.szpft <<- nrow(scen.szpft ) +nscen.barplot <<- nrow(scen.barplot ) +nscen.xvar <<- nrow(scen.xyz$xvar) +nscen.yvar <<- nrow(scen.xyz$yvar) +nscen.zvar <<- nrow(scen.xyz$zvar) +nscen.comp <<- nrow(scen.comp ) +npanel.box <<- nrow(panel.box ) +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/peb.r b/R-utils/peb.r new file mode 100644 index 000000000..df3466ac2 --- /dev/null +++ b/R-utils/peb.r @@ -0,0 +1,46 @@ +#------------------------------------------------------------------------------------------# +# Function that creates a nice grayscale colour scheme. # +#------------------------------------------------------------------------------------------# +peb <- function(n){ + rrr <- c( 32, 64, 96, 128, 159, 191, 223) #---- Red pivots. ------------------------# + ggg <- c( 32, 64, 96, 128, 159, 191, 223) #---- Green pivots. ----------------------# + bbb <- c( 32, 64, 96, 128, 159, 191, 223) #---- Blue pivots. -----------------------# + pivot <- round(seq(from=1,to=n,by=(n-1)/(length(rrr)-1)),digits=0) + + red <- as.integer(spline(x=pivot,y=rrr,n=n)$y) + green <- as.integer(spline(x=pivot,y=ggg,n=n)$y) + blue <- as.integer(spline(x=pivot,y=bbb,n=n)$y) + + red [red > 255] <- 255; red [red < 0] <- 0 + green[green > 255] <- 255; green[green < 0] <- 0 + blue [blue > 255] <- 255; blue [blue < 0] <- 0 + mycolsch <- rgb(r=red,g=green,b=blue,maxColorValue=255) + return(mycolsch) +} +#------------------------------------------------------------------------------------------# + + + + + + +#------------------------------------------------------------------------------------------# +# Function that creates a nice grayscale colour scheme. # +#------------------------------------------------------------------------------------------# +bep <- function(n){ + rrr <- rev(c( 32, 64, 96, 128, 159, 191, 223)) #---- Red pivots. -------------------# + ggg <- rev(c( 32, 64, 96, 128, 159, 191, 223)) #---- Green pivots. -----------------# + bbb <- rev(c( 32, 64, 96, 128, 159, 191, 223)) #---- Blue pivots. ------------------# + pivot <- round(seq(from=1,to=n,by=(n-1)/(length(rrr)-1)),digits=0) + + red <- as.integer(spline(x=pivot,y=rrr,n=n)$y) + green <- as.integer(spline(x=pivot,y=ggg,n=n)$y) + blue <- as.integer(spline(x=pivot,y=bbb,n=n)$y) + + red [red > 255] <- 255; red [red < 0] <- 0 + green[green > 255] <- 255; green[green < 0] <- 0 + blue [blue > 255] <- 255; blue [blue < 0] <- 0 + mycolsch <- rgb(r=red,g=green,b=blue,maxColorValue=255) + return(mycolsch) +} +#------------------------------------------------------------------------------------------# diff --git a/R-utils/pft.coms.r b/R-utils/pft.coms.r new file mode 100644 index 000000000..ecdfbad41 --- /dev/null +++ b/R-utils/pft.coms.r @@ -0,0 +1,1309 @@ +#==========================================================================================# +#==========================================================================================# +# This module contains several parameters used in the Farquar Leuning photosynthesis # +# solver. The following references are used as a departing point: # +# - M09 - Medvigy, D.M., S. C. Wofsy, J. W. Munger, D. Y. Hollinger, P. R. Moorcroft, # +# 2009: Mechanistic scaling of ecosystem function and dynamics in space and time: # +# Ecosystem Demography model version 2. J. Geophys. Res., 114, G01002, # +# doi:10.1029/2008JG000812. # +# - M06 - Medvigy, D.M., 2006: The State of the Regional Carbon Cycle: results from a # +# constrained coupled ecosystem-atmosphere model, 2006. Ph.D. dissertation, # +# Harvard University, Cambridge, MA, 322pp. # +# - M01 - Moorcroft, P. R., G. C. Hurtt, S. W. Pacala, 2001: A method for scaling # +# vegetation dynamics: the ecosystem demography model, Ecological Monographs, 71, # +# 557-586. # +# - F96 - Foley, J. A., I. Colin Prentice, N. Ramankutty, S. Levis, D. Pollard, S. Sitch, # +# A. Haxeltime, 1996: An integrated biosphere model of land surface processes, # +# terrestrial carbon balance, and vegetation dynamics. Glob. Biogeochem. Cycles, # +# 10, 603-602. # +# - L95 - Leuning, R., F. M. Kelliher, D. G. G. de Pury, E. D. Schulze, 1995: Leaf # +# nitrogen, photosynthesis, conductance, and transpiration: scaling from leaves to # +# canopies. Plant, Cell, and Environ., 18, 1183-1200. # +# - C91 - Collatz, G. J., J. T. Ball, C. Grivet, J. A. Berry, 1991: Physiological and # +# environmental regulation of stomatal conductance, photosynthesis and # +# transpiration: A model that includes a laminar boundary layer. Agric. For. # +# Meteor., 53, 107-136. # +# - B01 - Bernacchi, C. J., E. L. Singsaas, C. Pimentel, A. R. Portis Jr., S. P. Long, # +# 2001: Improved temperature response functions for models of Rubisco-limited # +# photosynthesis. Plant, Cell and Environ., 24, 253-259. # +# - B02 - Bernacchi, C. J., A. R. Portis, H. Nakano, S. von Caemmerer, S. P. Long, # +# 2002: Temperature response of mesophyll conductance. Implications for the # +# determination of Rubisco enzyme kinetics and for limitations to photosynthesis # +# in vivo. Plant physiol., 130, 1992-1998. # +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# Bounds for internal carbon and water stomatal conductance. # +#------------------------------------------------------------------------------------------# +c34smin.lint.co2 <<- 10. * umol.2.mol # Minimum carbon dioxide concentration [ mol/mol] +c34smax.lint.co2 <<- 1200. * umol.2.mol # Maximum carbon dioxide concentration [ mol/mol] +c34smax.gsw <<- 1.e+2 # Max. stomatal conductance (water) [ mol/m2/s] +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Many parameters in the model are temperature-dependent and utilise a modified # +# Arrhenius function to determine this dependence. For that to work, reference values at # +# a given temperature (tarrh, in Kelvin). # +#------------------------------------------------------------------------------------------# +tarrh <<- 15.0+t00 +tarrhi <<- 1./tarrh +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# This is an alternative way to express the temperature dependence, which is used by # +# C91. (tcollatz, in Kelvin). fcollatz is the factor that multiply the temperature # +# departure from reference. # +#------------------------------------------------------------------------------------------# +tcollatz <<- 25.0+t00 +fcollatz <<- 0.1 +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# The next two variables are the parameters for the compensation point as in IBIS. # +#------------------------------------------------------------------------------------------# +compp.ref.ibis <<- o2.ref / (2 * 4500.) # Gamma* reference [ mol/mol] +compp.hor.ibis <<- 5000. # Gamma* "Activation energy" [ K] +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# The next two variables are the parameters for the compensation point. Notice that # +# we give the compensation point rather than tau. # +#------------------------------------------------------------------------------------------# +compp.ref.coll <<- o2.ref * 0.57 / (2 * 2600.) # Ref. value at 15C (not 25C) [ mol/mol] +compp.base.coll <<- 1/0.57 # Comp. point base parameter [ ----] +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# The next three variables are the parameters for the compensation point using # +# Bernacchi data. Their equation is the Arrhenius formula, just expressed in a different # +# way, so here we give the converted values. They have 2 papers, in which the results are # +# quite different, so I will add both here. # +#------------------------------------------------------------------------------------------# +compp.ref.b01 <<- 25.28064 * umol.2.mol # Reference compensation point at 25 C [ mol/mol] +compp.hor.b01 <<- 4549.877 # Compensation point "c" parameter [ ----] +compp.ref.b02 <<- 26.59113 * umol.2.mol # Reference compensation point at 25 C [ mol/mol] +compp.hor.b02 <<- 2941.845 # Compensation point "c" parameter [ ----] +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# The following terms are used to find the Michaelis-Menten coefficient for CO2. # +#------------------------------------------------------------------------------------------# +kco2.ref.ibis <<- 150. * umol.2.mol # Reference CO2 concentration [ mol/mol] +kco2.hor.ibis <<- 6000. # Reference exponential coefficient [ K] +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# The next two variables are the parameters for the Michaelis-Menten coefficients when # +# using Collatz equation. Collatz equation uses partial pressure, so we must convert them # +# to mixing ratio. Also, we use the reference at 15 C rather than 25 C, so Vm is the # +# same. # +#------------------------------------------------------------------------------------------# +kco2.ref.coll <<- 30. * mmco2 * mmdryi / prefsea / 2.1 # Ref. CO2 conc. [ mol/mol] +kco2.base.coll <<- 2.1 # Power base [ ----] +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# The next two variables are the parameters for the Michaelis-Menten coefficients when # +# using Bernacchi equations. # +#------------------------------------------------------------------------------------------# +kco2.ref.b01 <<- 133.38 * umol.2.mol # Reference CO2 concentration [ mol/mol] +kco2.hor.b01 <<- 9553.179 # "Activation energy [ K] +kco2.ref.b02 <<- 87.828 * umol.2.mol # Reference CO2 concentration [ mol/mol] +kco2.hor.b02 <<- 9740.803 # "Activation energy [ K] +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# These terms are used to find the Michaelis-Menten coefficient for O2. # +#------------------------------------------------------------------------------------------# +ko2.ref.ibis <<- 0.250 # Reference O2 concentration. [ mol/mol] +ko2.hor.ibis <<- 1400. # Reference exponential coefficient [ K] +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# These terms are used to find the Michaelis-Menten coefficient for O2. Notice that # +# the reference must be given at 15 C, not 25 C as usual. # +#------------------------------------------------------------------------------------------# +ko2.ref.coll <<- 3.e4 * mmo2 * mmdryi / prefsea / 1.2 # Ref. O2 concentration. [ mol/mol] +ko2.base.coll <<- 1.2 # Power base [ ----] +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# These terms are used to find the Michaelis-Menten coefficient for O2 using the # +# Bernacchi et al. (2002) method. # +#------------------------------------------------------------------------------------------# +ko2.ref.b01 <<- 0.1665438 # Reference O2 concentration [ mol/mol] +ko2.hor.b01 <<- 4376.483 # "Activation energy [ K] +ko2.ref.b02 <<- 0.1190386 # Reference O2 concentration [ mol/mol] +ko2.hor.b02 <<- 2852.844 # "Activation energy [ K] +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# These are constants obtained in Leuning et al. (1995) and Collatz et al. (1991) to # +# convert different conductivities. # +#------------------------------------------------------------------------------------------# +gbh.2.gbw <<- 1.075 # heat to water - leaf boundary layer +gbw.2.gbc <<- 1.0 / 1.4 # water to carbon - leaf boundary layer +gsw.2.gsc <<- 1.0 / 1.6 # water to carbon - stomata +gsc.2.gsw <<- 1./gsw.2.gsc # carbon to water - stomata +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# This is the minimum threshold for the photosynthetically active radiation, in # +# umol/m2/s to consider non-night time conditions (day time or twilight). # +#------------------------------------------------------------------------------------------# +par.twilight.min <<- 0.5 * Watts.2.Ein # Minimum non-nocturnal PAR. [mol/m2/s] +#------------------------------------------------------------------------------------------# + +#----- This is a flag for the maximum representable number in R. --------------------------# +discard <<- 2^1023 +#------------------------------------------------------------------------------------------# + + + +#----- Fudging parameters to try to tune photosynthesis. ----------------------------------# +if (! "alpha.c3" %in% ls()){ + alpha.c3 <<- 0.08 +}else{ + alpha.c3 <<- alpha.c3 +}#end if +if (! "alpha.c4" %in% ls()){ + alpha.c4 <<- 0.053 +}else{ + alpha.c4 <<- alpha.c4 +}#end if +if (! "vmfact.c3" %in% ls()){ + vmfact.c3 <<- 1.0 +}else{ + vmfact.c3 <<- vmfact.c3 +}#end if +if (! "vmfact.c4" %in% ls()){ + vmfact.c4 <<- 1.0 +}else{ + vmfact.c4 <<- vmfact.c4 +}#end if +if (! "mphoto.c3" %in% ls()){ + mphoto.c3 <<- 8.0 +}else{ + mphoto.c3 <<- mphoto.c3 +}#end if +if (! "mphoto.aa" %in% ls()){ + mphoto.aa <<- 6.4 +}else{ + mphoto.aa <<- mphoto.aa +}#end if +if (! "mphoto.c4" %in% ls()){ + mphoto.c4 <<- 4.0 +}else{ + mphoto.c4 <<- mphoto.c4 +}#end if +if (! "gamma.c3" %in% ls()){ + gamma.c3 <<- 0.020 +}else{ + gamma.c3 <<- gamma.c3 +}#end if +if (! "gamma.aa" %in% ls()){ + gamma.aa <<- 0.028 +}else{ + gamma.aa <<- gamma.aa +}#end if +if (! "gamma.c4" %in% ls()){ + gamma.c4 <<- 0.040 +}else{ + gamma.c4 <<- gamma.c4 +}#end if +if (! "d0.grass" %in% ls()){ + d0.grass <<- 0.01 +}else{ + d0.grass <<- d0.grass +}#end if +if (! "d0.tree" %in% ls()){ + d0.tree <<- 0.01 +}else{ + d0.tree <<- d0.tree +}#end if + + +if (! "klowin" %in% ls()){ + klowin <<- 18000. +}else{ + klowin <<- klowin +}#end if +if (! "base.c3" %in% ls()){ + base.c3 <<- 2.4 +}else{ + base.c3 <<- base.c3 +}#end if +if (! "base.c4" %in% ls()){ + base.c4 <<- 2.0 +}else{ + base.c4 <<- base.c4 +}#end if +if (! "b.c3" %in% ls()){ + b.c3 <<- 10000. +}else{ + b.c3 <<- b.c3 +}#end if +if (! "b.aa" %in% ls()){ + b.aa <<- 1000. +}else{ + b.aa <<- b.aa +}#end if +if (! "b.c4" %in% ls()){ + b.c4 <<- 8000. +}else{ + b.c4 <<- b.c4 +}#end if +if (! "orient.tree" %in% ls()){ + orient.tree <<- 0.00 +}else{ + orient.tree <<- orient.tree +}#end if +if (! "orient.aa" %in% ls()){ + orient.aa <<- 0.00 +}else{ + orient.aa <<- orient.aa +}#end if +if (! "orient.grass" %in% ls()){ + orient.grass <<- 0.00 +}else{ + orient.grass <<- orient.grass +}#end if +if (! "clumping.tree" %in% ls()){ + clumping.tree <<- 0.735 +}else{ + clumping.tree <<- clumping.tree +}#end if +if (! "clumping.aa" %in% ls()){ + clumping.aa <<- 0.735 +}else{ + clumping.aa <<- clumping.aa +}#end if +if (! "clumping.grass" %in% ls()){ + clumping.grass <<- 1.0 +}else{ + clumping.grass <<- clumping.grass +}#end if +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# The following parameter is the k coefficient in Foley et al. (1996) that is used to # +# determine the CO2-limited photosynthesis for C4 grasses. # +#------------------------------------------------------------------------------------------# +klowco2 <<- klowin * mmco2 /mmdry # Coefficient for low CO2 [ mol/mol] +#------------------------------------------------------------------------------------------# + + + + +#------------------------------------------------------------------------------------------# +# These parameters will be assigned to the PFT structure. Notice that depending on the # +# physiology method (Foley or Collatz), some of them will be used, and some of them will # +# not. # +#------------------------------------------------------------------------------------------# +vm.hor <<- 3000. # Ref. exp. coeff. for carboxylase fctn. [ K] +vm.base.c3 <<- base.c3 # Base Vm for C3 - Collatz et al. (1991) [mol/m2/s] +vm.base.c4 <<- base.c4 # Base Vm for C4 - Collatz et al. (1992) [mol/m2/s] +vm.decay.a <<- 220000. # Decay function for warm temperatures -- A [ J/mol] +vm.decay.b <<- 695. # Decay function for warm temperatures -- B [ J/mol/K] + +vm.tcold.c3temp <<- 4.7137 +vm.tcold.c3trop <<- 8.0 +vm.tcold.aa <<- 4.7137 +vm.tcold.c4 <<- 8.0 + +vm.thot.c3 <<- 45.0 +vm.thot.aa <<- 45.0 +vm.thot.c4 <<- 45.0 + +vm.decay.e.c3 <<- 0.4 +vm.decay.e.aa <<- 0.4 +vm.decay.e.c4 <<- 0.4 + +lr.hor <<- 3000. # Ref. exp. coeff. for carboxylase fctn. [ K] +lr.base.c3 <<- base.c3 +lr.base.c4 <<- base.c4 + +lr.tcold.c3temp <<- vm.tcold.c3temp +lr.tcold.c3trop <<- vm.tcold.c3trop +lr.tcold.aa <<- vm.tcold.aa +lr.tcold.c4 <<- vm.tcold.c4 + +lr.thot.c3 <<- vm.thot.c3 +lr.thot.aa <<- vm.thot.aa +lr.thot.c4 <<- vm.thot.c3 + +lr.decay.e.c3 <<- 0.4 +lr.decay.e.aa <<- 0.4 +lr.decay.e.c4 <<- 0.4 + +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Define some common values to make it easier to change the list below... # +#------------------------------------------------------------------------------------------# +C2B <<- 2.0 +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# These variables define the allometry to use # +# 0 - ED-2.1 # +# 1 - a. AGB is based on Baker et al. (2004), Chave formula, keeping the same Bleaf as # +# ED-2.1 and Bdead to make up the difference. # +# b. Use the crown area as in Poorter et al. (2006) for tropical PFTs # +# c. Use a simple rooting depth ranging from 0.5 to 5.0 # +# 2 - Same as 1, but using the height as in Poorter et al. (2006) for tropical PFTs, and # +# finding a fit similar to Baker et al. (2004) that doesn't depend on height, using # +# Saldarriaga et al. (1988) as a starting point. # +#------------------------------------------------------------------------------------------# +if ("iallom" %in% ls()){ + iallom <<- iallom +}else{ + iallom <<- 2 +}#end if +#------------------------------------------------------------------------------------------# + + + + +#------------------------------------------------------------------------------------------# +# These constants will help defining the allometric parameters for IALLOM 1 and 2. # +#------------------------------------------------------------------------------------------# +odead.small = c( -1.11382700, 2.44048300, 2.18063200) +odead.large = c( 0.13625460, 2.42173900, 6.94835320) +ndead.small = c( -1.26395300, 2.43236100, 1.80180100) +ndead.large = c( -0.83468050, 2.42557360, 2.68228050) +nleaf = c( 0.01925119, 0.97494935, 2.58585087) +ncrown.area = c( 0.11842950, 1.05211970) +#------------------------------------------------------------------------------------------# + + + +#----- Define reference height and coefficients for tropical allometry. -------------------# +if (iallom == 0 | iallom == 1){ + hgt.ref.trop = NA + b1Ht.trop = 0.37 * log(10) + b2Ht.trop = 0.64 +}else if (iallom == 2){ + hgt.ref.trop = 61.7 + b1Ht.trop = 0.0352 + b2Ht.trop = 0.694 +}#end if +#------------------------------------------------------------------------------------------# + + + + +#------------------------------------------------------------------------------------------# +# The following variables will define the PFT characteristics regarding the # +# photosynthesis. # +#------------------------------------------------------------------------------------------# +pft01 = list( name = "C4 grass" + , key = "C4G" + , colour = "gold" + , tropical = TRUE + , pathway = 4 + , d0 = d0.grass + , vm.hor = vm.hor + , vm.base = vm.base.c4 + , vm.decay.a = vm.decay.a + , vm.decay.b = vm.decay.b + , vm.low.temp = vm.tcold.c4 + t00 + , vm.high.temp = vm.thot.c4 + t00 + , vm.decay.e = vm.decay.e.c4 + , lr.hor = lr.hor + , lr.base = lr.base.c4 + , lr.low.temp = lr.tcold.c4 + t00 + , lr.high.temp = lr.thot.c4 + t00 + , lr.decay.e = lr.decay.e.c4 + , vm0 = 12.5 * vmfact.c4 * umol.2.mol + , m = mphoto.c4 + , alpha = alpha.c4 + , b = b.c4 * umol.2.mol + , gamma.resp = gamma.c4 + , effarea.transp = 1.0 + , rho = 0.20 + , leaf.turnover.rate = 2.0 + , root.turnover.rate = 2.0 + , SLA = 22.7 + , hgt.ref = hgt.ref.trop + , b1Ht = b1Ht.trop + , b2Ht = b2Ht.trop + , b1Bl = NA + , b2Bl = NA + , b1Bs.small = NA + , b2Bs.small = NA + , b1Bs.large = NA + , b2Bs.large = NA + , b1Ca = 2.490154 + , b2Ca = 0.8068806 + , b1Cl = 0.99 + , b2Cl = 1.00 + , b1WAI = 0.00 + , b2WAI = 1.00 + , b1Vol = 0.65 * pi * 0.11 * 0.11 + , b2Vol = 0.65 * pi * 0.11 * 0.11 + , hgt.min = 0.5 + , hgt.max = 1.5 + , qroot = 1.0 + , qsw = 22.0 / 3900. + , agf.bs = 0.7 + , orient.factor = orient.grass + , clumping.factor = clumping.grass + ) + +pft02 = list( name = "Early tropical" + , key = "ETR" + , colour = "chartreuse" + , tropical = TRUE + , pathway = 3 + , d0 = d0.tree + , vm.hor = vm.hor + , vm.base = vm.base.c3 + , vm.decay.a = vm.decay.a + , vm.decay.b = vm.decay.b + , vm.low.temp = vm.tcold.c3trop + t00 + , vm.high.temp = vm.thot.c3 + t00 + , vm.decay.e = vm.decay.e.c3 + , lr.hor = lr.hor + , lr.base = lr.base.c3 + , lr.low.temp = lr.tcold.c3trop + t00 + , lr.high.temp = lr.thot.c3 + t00 + , lr.decay.e = lr.decay.e.c3 + , vm0 = 18.75 * vmfact.c3 * umol.2.mol + , m = mphoto.c3 + , alpha = alpha.c3 + , b = b.c3 * umol.2.mol + , gamma.resp = gamma.c3 + , effarea.transp = 1.0 + , rho = 0.53 + , leaf.turnover.rate = 1.0 + , root.turnover.rate = 1.0 + , SLA = NA + , hgt.ref = hgt.ref.trop + , b1Ht = b1Ht.trop + , b2Ht = b2Ht.trop + , b1Bl = NA + , b2Bl = NA + , b1Bs.small = NA + , b2Bs.small = NA + , b1Bs.large = NA + , b2Bs.large = NA + , b1Ca = 2.490154 + , b2Ca = 0.8068806 + , b1Cl = 0.3106775 + , b2Cl = 1.098 + , b1WAI = 0.0192 * 0.5 + , b2WAI = 2.0947 + , b1Vol = 0.65 * pi * 0.11 * 0.11 + , b2Vol = 0.65 * pi * 0.11 * 0.11 + , hgt.min = 0.5 + , hgt.max = 35.0 + , qroot = 1.0 + , qsw = 16.0 / 3900. + , agf.bs = 0.7 + , orient.factor = orient.tree + , clumping.factor = clumping.tree + ) + +pft03 = list( name = "Mid tropical" + , key = "MTR" + , colour = "chartreuse4" + , tropical = TRUE + , pathway = 3 + , d0 = d0.tree + , vm.hor = vm.hor + , vm.base = vm.base.c3 + , vm.decay.a = vm.decay.a + , vm.decay.b = vm.decay.b + , vm.low.temp = vm.tcold.c3trop + t00 + , vm.high.temp = vm.thot.c3 + t00 + , vm.decay.e = vm.decay.e.c3 + , lr.hor = lr.hor + , lr.base = lr.base.c3 + , lr.low.temp = lr.tcold.c3trop + t00 + , lr.high.temp = lr.thot.c3 + t00 + , lr.decay.e = lr.decay.e.c3 + , vm0 = 12.5 * vmfact.c3 * umol.2.mol + , m = mphoto.c3 + , alpha = alpha.c3 + , b = b.c3 * umol.2.mol + , gamma.resp = gamma.c3 + , effarea.transp = 1.0 + , rho = 0.71 + , leaf.turnover.rate = 0.50 + , root.turnover.rate = 0.50 + , SLA = NA + , hgt.ref = hgt.ref.trop + , b1Ht = b1Ht.trop + , b2Ht = b2Ht.trop + , b1Bl = NA + , b2Bl = NA + , b1Bs.small = NA + , b2Bs.small = NA + , b1Bs.large = NA + , b2Bs.large = NA + , b1Ca = 2.490154 + , b2Ca = 0.8068806 + , b1Cl = 0.3106775 + , b2Cl = 1.098 + , b1WAI = 0.0192 * 0.5 + , b2WAI = 2.0947 + , b1Vol = 0.65 * pi * 0.11 * 0.11 + , b2Vol = 0.65 * pi * 0.11 * 0.11 + , hgt.min = 0.5 + , hgt.max = 35.0 + , qroot = 1.0 + , qsw = 11.6 / 3900. + , agf.bs = 0.7 + , orient.factor = orient.tree + , clumping.factor = clumping.tree + ) + +pft04 = list( name = "Late tropical" + , key = "LTR" + , colour = "#004E00" + , tropical = TRUE + , pathway = 3 + , d0 = d0.tree + , vm.hor = vm.hor + , vm.base = vm.base.c3 + , vm.decay.a = vm.decay.a + , vm.decay.b = vm.decay.b + , vm.low.temp = vm.tcold.c3trop + t00 + , vm.high.temp = vm.thot.c3 + t00 + , vm.decay.e = vm.decay.e.c3 + , lr.hor = lr.hor + , lr.base = lr.base.c3 + , lr.low.temp = lr.tcold.c3trop + t00 + , lr.high.temp = lr.thot.c3 + t00 + , lr.decay.e = lr.decay.e.c3 + , vm0 = 6.25 * vmfact.c3 * umol.2.mol + , m = mphoto.c3 + , alpha = alpha.c3 + , b = b.c3 * umol.2.mol + , gamma.resp = gamma.c3 + , effarea.transp = 1.0 + , rho = 0.90 + , leaf.turnover.rate = 1./3. + , root.turnover.rate = 1./3. + , SLA = NA + , hgt.ref = hgt.ref.trop + , b1Ht = b1Ht.trop + , b2Ht = b2Ht.trop + , b1Bl = NA + , b2Bl = NA + , b1Bs.small = NA + , b2Bs.small = NA + , b1Bs.large = NA + , b2Bs.large = NA + , b1Ca = 2.490154 + , b2Ca = 0.8068806 + , b1Cl = 0.3106775 + , b2Cl = 1.098 + , b1WAI = 0.0192 * 0.5 + , b2WAI = 2.0947 + , b1Vol = 0.65 * pi * 0.11 * 0.11 + , b2Vol = 0.65 * pi * 0.11 * 0.11 + , hgt.min = 0.5 + , hgt.max = 35.0 + , qroot = 1.0 + , qsw = 9.67 / 3900. + , agf.bs = 0.7 + , orient.factor = orient.tree + , clumping.factor = clumping.tree + ) + +pft05 = list( name = "Temperate C3 Grass" + , key = "TTG" + , colour = "mediumpurple1" + , tropical = FALSE + , pathway = 3 + , d0 = d0.tree + , vm.hor = vm.hor + , vm.base = vm.base.c3 + , vm.decay.a = vm.decay.a + , vm.decay.b = vm.decay.b + , vm.low.temp = vm.tcold.c3temp + t00 + , vm.high.temp = vm.thot.c3 + t00 + , vm.decay.e = vm.decay.e.c3 + , lr.hor = lr.hor + , lr.base = lr.base.c3 + , lr.low.temp = lr.tcold.c3temp + t00 + , lr.high.temp = lr.thot.c3 + t00 + , lr.decay.e = lr.decay.e.c3 + , vm0 = 18.3 * umol.2.mol + , m = mphoto.c3 + , alpha = alpha.c3 + , b = b.c3 * umol.2.mol + , gamma.resp = gamma.c3 + , effarea.transp = 1.0 + , rho = 0.32 + , leaf.turnover.rate = 2.0 + , root.turnover.rate = 2.0 + , SLA = 22.0 + , hgt.ref = 0.0 + , b1Ht = 0.4778 + , b2Ht = -0.750 + , b1Bl = 0.08 + , b2Bl = 1.00 + , b1Bs.small = 1.e-5 + , b2Bs.small = 1.0 + , b1Bs.large = 1.e-5 + , b2Bs.large = 1.0 + , b1Ca = 2.490154 + , b2Ca = 0.8068806 + , b1Cl = 0.99 + , b2Cl = 1.0 + , b1WAI = 0.0 + , b2WAI = 1.0 + , b1Vol = 0.65 * pi * 0.11 * 0.11 + , b2Vol = 0.65 * pi * 0.11 * 0.11 + , hgt.min = 0.15 + , hgt.max = 0.95 * 0.4778 + , qroot = 1.0 + , qsw = 22.0 / 3900. + , agf.bs = 0.7 + , orient.factor = -0.30 + , clumping.factor = 1.00 + ) + +pft06 = list( name = "North Pine" + , key = "NPN" + , colour = "deepskyblue" + , tropical = FALSE + , pathway = 3 + , d0 = d0.tree + , vm.hor = vm.hor + , vm.base = vm.base.c3 + , vm.decay.a = vm.decay.a + , vm.decay.b = vm.decay.b + , vm.low.temp = vm.tcold.c3temp + t00 + , vm.high.temp = vm.thot.c3 + t00 + , vm.decay.e = vm.decay.e.c3 + , lr.hor = lr.hor + , lr.base = lr.base.c3 + , lr.low.temp = lr.tcold.c3temp + t00 + , lr.high.temp = lr.thot.c3 + t00 + , lr.decay.e = lr.decay.e.c3 + , vm0 = 15.625 * 0.7264 * umol.2.mol + , m = mphoto.c3 * 6.3949 / 8.0 + , alpha = alpha.c3 + , b = 1000. * umol.2.mol + , gamma.resp = gamma.c3 + , effarea.transp = 2.0 + , rho = NA + , leaf.turnover.rate = 1./3. + , root.turnover.rate = 3.927218 + , SLA = 6.0 + , hgt.ref = 1.3 + , b1Ht = 27.14 + , b2Ht = -0.03884 + , b1Bl = 0.024 + , b2Bl = 1.899 + , b1Bs.small = 0.147 + , b2Bs.small = 2.238 + , b1Bs.large = 0.147 + , b2Bs.large = 2.238 + , b1Ca = 2.490154 + , b2Ca = 0.8068806 + , b1Cl = 0.3106775 + , b2Cl = 1.098 + , b1WAI = 0.0553 * 0.5 + , b2WAI = 1.9769 + , b1Vol = 0.65 * pi * 0.11 * 0.11 + , b2Vol = 0.65 * pi * 0.11 * 0.11 + , hgt.min = 1.5 + , hgt.max = 0.999 * 27.14 + , qroot = 0.3463 + , qsw = 6.0 / 3900. + , agf.bs = 0.7 + , orient.factor = 0.01 + , clumping.factor = 0.735 + ) + +pft07 = list( name = "South Pine" + , key = "SPN" + , colour = "mediumturquoise" + , tropical = FALSE + , pathway = 3 + , d0 = d0.tree + , vm.hor = vm.hor + , vm.base = vm.base.c3 + , vm.decay.a = vm.decay.a + , vm.decay.b = vm.decay.b + , vm.low.temp = vm.tcold.c3temp + t00 + , vm.high.temp = vm.thot.c3 + t00 + , vm.decay.e = vm.decay.e.c3 + , lr.hor = lr.hor + , lr.base = lr.base.c3 + , lr.low.temp = lr.tcold.c3temp + t00 + , lr.high.temp = lr.thot.c3 + t00 + , lr.decay.e = lr.decay.e.c3 + , vm0 = 15.625 * 0.7264 * umol.2.mol + , m = mphoto.c3 * 6.3949 / 8.0 + , alpha = alpha.c3 + , b = 1000. * umol.2.mol + , gamma.resp = gamma.c3 + , effarea.transp = 2.0 + , rho = NA + , leaf.turnover.rate = 1./3. + , root.turnover.rate = 4.117847 + , SLA = 9.0 + , hgt.ref = 1.3 + , b1Ht = 27.14 + , b2Ht = -0.03884 + , b1Bl = 0.024 + , b2Bl = 1.899 + , b1Bs.small = 0.147 + , b2Bs.small = 2.238 + , b1Bs.large = 0.147 + , b2Bs.large = 2.238 + , b1Ca = 2.490154 + , b2Ca = 0.8068806 + , b1Cl = 0.3106775 + , b2Cl = 1.098 + , b1WAI = 0.0553 * 0.5 + , b2WAI = 1.9769 + , b1Vol = 0.65 * pi * 0.11 * 0.11 + , b2Vol = 0.65 * pi * 0.11 * 0.11 + , hgt.min = 1.5 + , hgt.max = 0.999 * 27.14 + , qroot = 0.3463 + , qsw = 9.0 / 3900. + , agf.bs = 0.7 + , orient.factor = 0.01 + , clumping.factor = 0.735 + ) + +pft08 = list( name = "Late conifer" + , key = "LCN" + , colour = "royalblue4" + , tropical = FALSE + , pathway = 3 + , d0 = d0.tree + , vm.hor = vm.hor + , vm.base = vm.base.c3 + , vm.decay.a = vm.decay.a + , vm.decay.b = vm.decay.b + , vm.low.temp = vm.tcold.c3temp + t00 + , vm.high.temp = vm.thot.c3 + t00 + , vm.decay.e = vm.decay.e.c3 + , lr.hor = lr.hor + , lr.base = lr.base.c3 + , lr.low.temp = lr.tcold.c3temp + t00 + , lr.high.temp = lr.thot.c3 + t00 + , lr.decay.e = lr.decay.e.c3 + , vm0 = 6.25 * 0.7264 * umol.2.mol + , m = mphoto.c3 * 6.3949 / 8.0 + , alpha = alpha.c3 + , b = 1000. * umol.2.mol + , gamma.resp = gamma.c3 + , effarea.transp = 2.0 + , rho = NA + , leaf.turnover.rate = 1./3. + , root.turnover.rate = 3.800132 + , SLA = 10.0 + , hgt.ref = 1.3 + , b1Ht = 22.79 + , b2Ht = -0.04445 + , b1Bl = 0.0454 + , b2Bl = 1.6829 + , b1Bs.small = 0.1617 + , b2Bs.small = 2.1536 + , b1Bs.large = 0.1617 + , b2Bs.large = 2.1536 + , b1Ca = 2.490154 + , b2Ca = 0.8068806 + , b1Cl = 0.3106775 + , b2Cl = 1.098 + , b1WAI = 0.0553 * 0.5 + , b2WAI = 1.9769 + , b1Vol = 0.65 * pi * 0.11 * 0.11 + , b2Vol = 0.65 * pi * 0.11 * 0.11 + , hgt.min = 1.5 + , hgt.max = 0.999 * 22.79 + , qroot = 0.3463 + , qsw = 10.0 / 3900. + , agf.bs = 0.7 + , orient.factor = 0.01 + , clumping.factor = 0.735 + ) + +pft09 = list( name = "Early hardwood" + , key = "EHW" + , colour = "darkorange" + , tropical = FALSE + , pathway = 3 + , d0 = d0.tree + , vm.hor = vm.hor + , vm.base = vm.base.c3 + , vm.decay.a = vm.decay.a + , vm.decay.b = vm.decay.b + , vm.low.temp = vm.tcold.c3temp + t00 + , vm.high.temp = vm.thot.c3 + t00 + , vm.decay.e = vm.decay.e.c3 + , lr.hor = lr.hor + , lr.base = lr.base.c3 + , lr.low.temp = lr.tcold.c3temp + t00 + , lr.high.temp = lr.thot.c3 + t00 + , lr.decay.e = lr.decay.e.c3 + , vm0 = 18.25 * 1.1171 * umol.2.mol + , m = mphoto.c3 * 6.3949 / 8.0 + , alpha = alpha.c3 + , b = 20000. * umol.2.mol + , gamma.resp = gamma.c3 + , effarea.transp = 1.0 + , rho = NA + , leaf.turnover.rate = NA + , root.turnover.rate = 5.772506 + , SLA = 30.0 + , hgt.ref = 1.3 + , b1Ht = 22.6799 + , b2Ht = -0.06534 + , b1Bl = 0.0129 + , b2Bl = 1.7477 + , b1Bs.small = 0.02648 + , b2Bs.small = 2.95954 + , b1Bs.large = 0.02648 + , b2Bs.large = 2.95954 + , b1Ca = 2.490154 + , b2Ca = 0.8068806 + , b1Cl = 0.3106775 + , b2Cl = 1.098 + , b1WAI = 0.0192 * 0.5 + , b2WAI = 2.0947 + , b1Vol = 0.65 * pi * 0.11 * 0.11 + , b2Vol = 0.65 * pi * 0.11 * 0.11 + , hgt.min = 1.5 + , hgt.max = 0.999 * 22.6799 + , qroot = 1.1274 + , qsw = 30.0 / 3900. + , agf.bs = 0.7 + , orient.factor = 0.25 + , clumping.factor = 0.84 + ) + +pft10 = list( name = "Mid hardwood" + , key = "MHW" + , colour = "orangered" + , tropical = FALSE + , pathway = 3 + , d0 = d0.tree + , vm.hor = vm.hor + , vm.base = vm.base.c3 + , vm.decay.a = vm.decay.a + , vm.decay.b = vm.decay.b + , vm.low.temp = vm.tcold.c3temp + t00 + , vm.high.temp = vm.thot.c3 + t00 + , vm.decay.e = vm.decay.e.c3 + , lr.hor = lr.hor + , lr.base = lr.base.c3 + , lr.low.temp = lr.tcold.c3temp + t00 + , lr.high.temp = lr.thot.c3 + t00 + , lr.decay.e = lr.decay.e.c3 + , vm0 = 15.625 * 1.1171 * umol.2.mol + , m = mphoto.c3 * 6.3949 / 8.0 + , alpha = alpha.c3 + , b = 20000. * umol.2.mol + , gamma.resp = gamma.c3 + , effarea.transp = 1.0 + , rho = NA + , leaf.turnover.rate = NA + , root.turnover.rate = 5.083700 + , SLA = 24.2 + , hgt.ref = 1.3 + , b1Ht = 25.18 + , b2Ht = -0.04964 + , b1Bl = 0.048 + , b2Bl = 1.455 + , b1Bs.small = 0.1617 + , b2Bs.small = 2.4572 + , b1Bs.large = 0.1617 + , b2Bs.large = 2.4572 + , b1Ca = 2.490154 + , b2Ca = 0.8068806 + , b1Cl = 0.3106775 + , b2Cl = 1.098 + , b1WAI = 0.0192 * 0.5 + , b2WAI = 2.0947 + , b1Vol = 0.65 * pi * 0.11 * 0.11 + , b2Vol = 0.65 * pi * 0.11 * 0.11 + , hgt.min = 1.5 + , hgt.max = 0.999 * 25.18 + , qroot = 1.1274 + , qsw = 24.2 / 3900. + , agf.bs = 0.7 + , orient.factor = 0.25 + , clumping.factor = 0.84 + ) + +pft11 = list( name = "Late hardwood" + , key = "LHW" + , colour = "firebrick" + , tropical = FALSE + , pathway = 3 + , d0 = d0.tree + , vm.hor = vm.hor + , vm.base = vm.base.c3 + , vm.decay.a = vm.decay.a + , vm.decay.b = vm.decay.b + , vm.low.temp = vm.tcold.c3temp + t00 + , vm.high.temp = vm.thot.c3 + t00 + , vm.decay.e = vm.decay.e.c3 + , lr.hor = lr.hor + , lr.base = lr.base.c3 + , lr.low.temp = lr.tcold.c3temp + t00 + , lr.high.temp = lr.thot.c3 + t00 + , lr.decay.e = lr.decay.e.c3 + , vm0 = 6.25 * 1.1171 * umol.2.mol + , m = mphoto.c3 * 6.3949 / 8.0 + , alpha = alpha.c3 + , b = 20000. * umol.2.mol + , gamma.resp = gamma.c3 + , effarea.transp = 1.0 + , rho = NA + , leaf.turnover.rate = NA + , root.turnover.rate = 5.070992 + , SLA = 60.0 + , hgt.ref = 1.3 + , b1Ht = 23.3874 + , b2Ht = -0.05404 + , b1Bl = 0.017 + , b2Bl = 1.731 + , b1Bs.small = 0.235 + , b2Bs.small = 2.2518 + , b1Bs.large = 0.235 + , b2Bs.large = 2.2518 + , b1Ca = 2.490154 + , b2Ca = 0.8068806 + , b1Cl = 0.3106775 + , b2Cl = 1.098 + , b1WAI = 0.0192 * 0.5 + , b2WAI = 2.0947 + , b1Vol = 0.65 * pi * 0.11 * 0.11 + , b2Vol = 0.65 * pi * 0.11 * 0.11 + , hgt.min = 1.5 + , hgt.max = 0.999 * 23.3874 + , qroot = 1.1274 + , qsw = 60.0 / 3900. + , agf.bs = 0.7 + , orient.factor = 0.25 + , clumping.factor = 0.84 + ) + +pft12 = pft05; pft12$name = "C3 crop" ; pft12$key = "CC3"; pft12$colour="purple4" +pft13 = pft05; pft13$name = "C3 pasture"; pft13$key = "PC3"; pft13$colour="darkorchid1" +pft14 = pft01; pft14$name = "C4 crop" ; pft14$key = "CC4"; pft14$colour="darkgoldenrod" +pft15 = pft01; pft15$name = "C4 pasture"; pft15$key = "PC4"; pft15$colour="khaki" + +pft16 = list( name = "C3 grass" + , key = "C3G" + , colour = "lightgoldenrod3" + , tropical = TRUE + , pathway = 3 + , d0 = d0.grass + , vm.hor = vm.hor + , vm.base = vm.base.c3 + , vm.decay.a = vm.decay.a + , vm.decay.b = vm.decay.b + , vm.low.temp = vm.tcold.c3trop + t00 + , vm.high.temp = vm.thot.c3 + t00 + , vm.decay.e = vm.decay.e.c3 + , lr.hor = lr.hor + , lr.base = lr.base.c3 + , lr.low.temp = lr.tcold.c3trop + t00 + , lr.high.temp = lr.thot.c3 + t00 + , lr.decay.e = lr.decay.e.c3 + , vm0 = 20.833333333 * vmfact.c3 * umol.2.mol + , m = mphoto.c3 + , alpha = alpha.c3 + , b = b.c3 * umol.2.mol + , gamma.resp = gamma.c3 + , effarea.transp = 1.0 + , rho = 0.20 + , leaf.turnover.rate = 2.0 + , root.turnover.rate = 2.0 + , SLA = 22.7 + , hgt.ref = hgt.ref.trop + , b1Ht = b1Ht.trop + , b2Ht = b2Ht.trop + , b1Bl = NA + , b2Bl = NA + , b1Bs.small = NA + , b2Bs.small = NA + , b1Bs.large = NA + , b2Bs.large = NA + , b1Ca = 2.490154 + , b2Ca = 0.8068806 + , b1Cl = 0.99 + , b2Cl = 1.00 + , b1WAI = 0.0 + , b2WAI = 1.0 + , b1Vol = 0.65 * pi * 0.11 * 0.11 + , b2Vol = 0.65 * pi * 0.11 * 0.11 + , hgt.min = 0.5 + , hgt.max = 1.5 + , qroot = 1.0 + , qsw = 22.0 / 3900. + , agf.bs = 0.7 + , orient.factor = orient.grass + , clumping.factor = clumping.grass + ) + +pft17 = list( name = "Araucaria" + , key = "ARC" + , colour = "steelblue3" + , tropical = TRUE + , pathway = 3 + , d0 = d0.tree + , vm.hor = vm.hor + , vm.base = vm.base.c3 + , vm.decay.a = vm.decay.a + , vm.decay.b = vm.decay.b + , vm.low.temp = vm.tcold.aa + t00 + , vm.high.temp = vm.thot.aa + t00 + , vm.decay.e = vm.decay.e.aa + , lr.hor = lr.hor + , lr.base = lr.base.c3 + , lr.low.temp = lr.tcold.aa + t00 + , lr.high.temp = lr.thot.aa + t00 + , lr.decay.e = lr.decay.e.aa + , vm0 = 15.625 * vmfact.c3 * umol.2.mol + , m = mphoto.aa + , alpha = alpha.c3 + , b = b.aa * umol.2.mol + , gamma.resp = gamma.aa + , effarea.transp = 2.0 + , rho = 0.59 + , leaf.turnover.rate = 1./6. + , root.turnover.rate = 1./6. + , SLA = 10.0 + , hgt.ref = hgt.ref.trop + , b1Ht = b1Ht.trop + , b2Ht = b2Ht.trop + , b1Bl = NA + , b2Bl = NA + , b1Bs.small = NA + , b2Bs.small = NA + , b1Bs.large = NA + , b2Bs.large = NA + , b1Ca = 2.490154 + , b2Ca = 0.8068806 + , b1Cl = 0.3106775 + , b2Cl = 1.098 + , b1WAI = 0.0553 * 0.5 + , b2WAI = 1.9769 + , b1Vol = 0.65 * pi * 0.11 * 0.11 + , b2Vol = 0.65 * pi * 0.11 * 0.11 + , hgt.min = 0.5 + , hgt.max = 35.0 + , qroot = 1.0 + , qsw = 10.0 / 3900. + , agf.bs = 0.7 + , orient.factor = orient.aa + , clumping.factor = clumping.aa + ) +pft18 = pft07; pft18$name = "Total" ; pft18$key = "ALL"; pft18$colour=all.colour +#------------------------------------------------------------------------------------------# + + + +#----- Build the structure of photosynthesis parameters by PFT. ---------------------------# +pft = list() +for (p in 1:(npft+1)){ + ppp = substring(100+p,2,3) + phph = paste("pft",ppp,sep="") + if (p == 1){ + pft = get(phph) + }else{ + phmerge = get(phph) + for (n in union(names(pft),names(phmerge))){ + pft[[n]] = c(pft[[n]],phmerge[[n]]) + } #end for + }# end if +} #end for + + +#----- Minimum and Maximum DBH. -----------------------------------------------------------# +for (ipft in 1:npft){ + if (pft$tropical[ipft]){ + if (iallom == 0 | iallom == 1){ + pft$dbh.min [ipft] = exp((log(pft$hgt.min[ipft])-pft$b1Ht[ipft])/pft$b2Ht[ipft]) + pft$dbh.crit[ipft] = exp((log(pft$hgt.max[ipft])-pft$b1Ht[ipft])/pft$b2Ht[ipft]) + }else if (iallom == 2){ + pft$dbh.min [ipft] = ( log( pft$hgt.ref[ipft] + / ( pft$hgt.ref[ipft] - pft$hgt.min[ipft]) ) + / pft$b1Ht[ipft] ) ^ (1.0 / pft$b2Ht[ipft]) + pft$dbh.crit[ipft] = ( log( pft$hgt.ref[ipft] + / ( pft$hgt.ref[ipft] - pft$hgt.max[ipft]) ) + / pft$b1Ht[ipft] ) ^ (1.0 / pft$b2Ht[ipft]) + }#end if + }else{ + pft$dbh.min [ipft] = ( log(1.0 - (pft$hgt.min[ipft]-pft$hgt.ref[ipft]) + / pft$b1Ht[ipft] ) / pft$b2Ht[ipft] ) + pft$dbh.crit[ipft] = ( log(1.0 - (pft$hgt.max[ipft]-pft$hgt.ref[ipft]) + / pft$b1Ht[ipft]) / pft$b2Ht[ipft] ) + }#end if +}#end for + + +#------------------------------------------------------------------------------------------# +# Specific leaf area for those PFTs whose specific leaf area depends on the leaf turn- # +# over rate. # +#------------------------------------------------------------------------------------------# +for (ipft in 1:npft){ + if (is.na(pft$SLA[ipft])){ + pft$SLA[ipft] = ( 10^( (2.4 - 0.46 * log10(12./pft$leaf.turnover.rate[ipft]))) + * C2B * 0.1 ) + }#end if +}#end for +#------------------------------------------------------------------------------------------# + +#----- Constants shared by both bdead and bleaf -------------------------------------------# +a1 = -1.981 +b1 = 1.047 +dcrit = 100.0 +#----- Constants used by bdead only -------------------------------------------------------# +c1d = 0.572 +d1d = 0.931 +a2d = -1.086 +b2d = 0.876 +c2d = 0.604 +d2d = 0.871 +#----- Constants used by bleaf only -------------------------------------------------------# +c1l = -0.584 +d1l = 0.550 +a2l = -4.111 +b2l = 0.605 +c2l = 0.848 +d2l = 0.438 +#------------------------------------------------------------------------------------------# + +for (ipft in 1:npft){ + if (pft$tropical[ipft]){ + #------------------------------------------------------------------------------------# + # Fill in the leaf biomass parameters. # + #------------------------------------------------------------------------------------# + if (iallom == 0 || iallom == 1){ + #---- ED-2.1 allometry. ----------------------------------------------------------# + pft$b1Bl [ipft] = exp(a1 + c1l * pft$b1Ht[ipft] + d1l * log(pft$rho[ipft])) + aux = ( (a2l - a1) + pft$b1Ht[ipft] * (c2l - c1l) + + log(pft$rho[ipft]) * (d2l - d1l)) * (1.0/log(dcrit)) + pft$b2Bl [ipft] = C2B * b2l + c2l * pft$b2Ht[ipft] + aux + }else if(iallom == 2){ + pft$b1Bl [ipft] = C2B * exp(nleaf[1]) * pft$rho[ipft] / nleaf[3] + pft$b2Bl [ipft] = nleaf[2] + }#end if + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Fill in the structural biomass parameters. # + #------------------------------------------------------------------------------------# + if (iallom == 0){ + #---- ED-2.1 allometry. ----------------------------------------------------------# + pft$b1Bs.small[ipft] = exp(a1 + c1d * pft$b1Ht[ipft] + d1d * log(pft$rho[ipft])) + pft$b1Bs.large[ipft] = exp(a1 + c1d * log(pft$hgt.max[ipft]) + + d1d * log(pft$rho[ipft])) + aux = ( (a2d - a1) + pft$b1Ht[ipft] * (c2d - c1d) + + log(pft$rho[ipft]) * (d2d - d1d) ) * (1.0/log(dcrit)) + pft$b2Bs.small[ipft] = C2B * b2d + c2d * pft$b2Ht[ipft] + aux + + aux = ( (a2d - a1) + log(pft$hgt.max[ipft]) * (c2d - c1d) + + log(pft$rho[ipft]) * (d2d - d1d)) * (1.0/log(dcrit)) + pft$b2Bs.large[ipft] = C2B * b2d + aux + + }else if (iallom == 1){ + #---- Based on modified Chave et al. (2001) allometry. ---------------------------# + pft$b1Bs.small[ipft] = C2B * exp(odead.small[1]) * pft$rho[ipft] / odead.small[3] + pft$b2Bs.small[ipft] = odead.small[2] + pft$b1Bs.large[ipft] = C2B * exp(odead.large[1]) * pft$rho[ipft] / odead.large[3] + pft$b2Bs.large[ipft] = odead.large[2] + }else if (iallom == 2){ + #---- Based an alternative modification of Chave et al. (2001) allometry. --------# + pft$b1Bs.small[ipft] = C2B * exp(ndead.small[1]) * pft$rho[ipft] / ndead.small[3] + pft$b2Bs.small[ipft] = ndead.small[2] + pft$b1Bs.large[ipft] = C2B * exp(ndead.large[1]) * pft$rho[ipft] / ndead.large[3] + pft$b2Bs.large[ipft] = ndead.large[2] + }#end if + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Replace the coefficients if we are going to use Poorter et al. (2006) # + # parameters for crown area. # + #------------------------------------------------------------------------------------# + if (iallom == 1){ + pft$b1Ca[ipft] = exp(-1.853) * exp(pft$b1Ht[ipft]) ^ 1.888 + pft$b2Ca[ipft] = pft$b2Ht[ipft] * 1.888 + }else if (iallom == 2){ + pft$b1Ca[ipft] = exp(ncrown.area[1]) + pft$b2Ca[ipft] = ncrown.area[2] + }#end if + }#end if +}#end do + + + +#------------------------------------------------------------------------------------------# +# Rooting depth coefficients. # +#------------------------------------------------------------------------------------------# +if (iallom == 0){ + #----- Original ED-2.1 scheme, based on standing volume. -------------------------------# + pft$b1Rd[ 1:17] = NA + pft$b1Rd[ 1] = -0.700 + pft$b1Rd[ 2:4] = -exp(0.545 * log(10.)) + pft$b1Rd[ 5] = -0.700 + pft$b1Rd[ 6:11] = -exp(0.545 * log(10.)) + pft$b1Rd[12:16] = -0.700 + pft$b1Rd[ 17] = -exp(0.545 * log(10.)) + pft$b2Rd[ 1:17] = NA + pft$b2Rd[ 1] = 0.000 + pft$b2Rd[ 2:4] = 0.277 + pft$b2Rd[ 5] = 0.000 + pft$b2Rd[ 6:11] = 0.277 + pft$b2Rd[12:16] = 0.000 + pft$b2Rd[ 17] = 0.277 + +}else if (iallom == 1 || iallom == 2){ + #----- Simple allometry (0.5 m for seedlings, 5.0m for 35-m trees. ---------------------# + pft$b1Rd[1:17] = -1.1140580 + pft$b2Rd[1:17] = 0.4223014 + +}#end if +#------------------------------------------------------------------------------------------# + +#----- Make it global. --------------------------------------------------------------------# +pft <<- pft +#------------------------------------------------------------------------------------------# diff --git a/R-utils/plot.rgb.r b/R-utils/plot.rgb.r new file mode 100644 index 000000000..050e87049 --- /dev/null +++ b/R-utils/plot.rgb.r @@ -0,0 +1,342 @@ +#==========================================================================================# +#==========================================================================================# +# This function plots a graph as a function of 3 parameters that add to a constant, # +# using a RGB scale. # +#------------------------------------------------------------------------------------------# +plot.rgb <<- function( x + , y + , r + , g + , b + , dx = ifelse( is.list(x) + , lapply(lapply(x,diff),median,na.rm=TRUE) + , median(diff(x),na.rm=TRUE) + )#end ifelse + , dy = ifelse( is.list(y) + , lapply(lapply(y,diff),median,na.rm=TRUE) + , median(diff(y),na.rm=TRUE) + )#end ifelse + , xlim = range(unlist(x),finite=TRUE) + , ylim = range(unlist(y),finite=TRUE) + , zlim = range(unlist(z),finite=TRUE) + , rgb.at = c(0.1,0.9) + , rgb.axis.labels = c("Green","Red","Blue") + , x.axis.options = NULL + , y.axis.options = NULL + , sub.options = NULL + , main.title = NULL + , main.xlab = NULL + , main.ylab = NULL + , key.title = NULL + , plot.after = NULL + , ... + ){ + + #---------------------------------------------------------------------------------------# + # Find out whether x, y, r, g, and b are single values or lists. # + #---------------------------------------------------------------------------------------# + if (missing(x) | missing(y) | missing(r) | missing(g) | missing (b)){ + cat(" - x is missing: ",missing(x),"\n") + cat(" - y is missing: ",missing(y),"\n") + cat(" - r is missing: ",missing(r),"\n") + cat(" - g is missing: ",missing(g),"\n") + cat(" - b is missing: ",missing(b),"\n") + stop(" x, y, r, g, and b must be given") + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Check whether x, y, and z are the same type of data. # + #---------------------------------------------------------------------------------------# + same.kind = (is.list(x) == is.list(y) && is.list(x) == is.list(y) && + is.list(x) == is.list(r) && is.list(x) == is.list(g) && + is.list(x) == is.list(b)) + if (! same.kind){ + cat(" X is list: ",is.list(x),"\n") + cat(" Y is list: ",is.list(y),"\n") + cat(" R is list: ",is.list(r),"\n") + cat(" G is list: ",is.list(g),"\n") + cat(" B is list: ",is.list(b),"\n") + stop ("X, Y, R, G, and B must be of the same kind...") + }else if (!is.list(x)){ + #----- Convert x, y, and z to lists. ------------------------------------------------# + x = list(x ) + y = list(y ) + r = list(r ) + g = list(g ) + b = list(b ) + dx = list(dx) + dy = list(dy) + if (! missing(x.axis.options)) x.axis.options = list(x.axis.options) + if (! missing(y.axis.options)) y.axis.options = list(y.axis.options) + if (! missing(sub.options )) sub.options = list(sub.options ) + npanels = 1 + }else{ + npanels = length(x) + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # x and y should be axes for r, g, and b. Check whether they are or not. # + #---------------------------------------------------------------------------------------# + nx = sapply(X = x, FUN = length) + ny = sapply(X = y, FUN = length) + nr = sapply(X = r, FUN = length) + ng = sapply(X = g, FUN = length) + nb = sapply(X = b, FUN = length) + if ( any(nx != ny) || any(nx != nr) || any(nx != ng) || any(nx != nb)){ + cat(" - length(x): ",paste(nx,sep=" "),"\n") + cat(" - length(y): ",paste(ny,sep=" "),"\n") + cat(" - length(r): ",paste(nr,sep=" "),"\n") + cat(" - length(g): ",paste(ng,sep=" "),"\n") + cat(" - length(b): ",paste(nb,sep=" "),"\n") + stop(" x, y, r, g, and b must have all the same length") + }#end if + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Find the colours. # + #---------------------------------------------------------------------------------------# + rgb.max = max(unlist(r)+unlist(g)+unlist(b),na.rm=TRUE) + pcol = mapply( FUN = rgb + , red = r + , green = g + , blue = b + , MoreArgs = list(maxColorValue=rgb.max) + , SIMPLIFY = FALSE + )#end mapply + #---------------------------------------------------------------------------------------# + + + #----- Save the margins to avoid losing the data. --------------------------------------# + par.orig = par(no.readonly=TRUE) + par.here = par(las=1,xpd=FALSE,pty="s",mar=par.orig$mar) + par(par.here) + par(oma=c(0,0,0,0)) + on.exit(par(par.orig)) + #---------------------------------------------------------------------------------------# + + + + + + #---- Split the window into two. -------------------------------------------------------# + lo.box = pretty.box(n=npanels) + layout( mat = cbind(1+lo.box$mat,rep(1,times=lo.box$nrow)) + , width = c(rep(7/lo.box$ncol,times=lo.box$ncol),2) + )#end layout + #---------------------------------------------------------------------------------------# + + + + + #---- Find the triangle list. ----------------------------------------------------------# + red.span = seq(from=1,to=0,by=-0.1) + nrl=length(red.span) + tri.val = list() + tri.col = list() + for (n in 1:nrl){ + green.l = seq(from=0,to=1-red.span[n],by=0.05) + blue.l = seq(from=0,to=1-red.span[n],by=0.05) + rgb.l = expand.grid(red=red.span[n],green=green.l,blue=blue.l) + keep = ( rowSums(rgb.l) >= 1-sqrt(.Machine$double.eps) + & rowSums(rgb.l) <= 1+sqrt(.Machine$double.eps) ) + rgb.l = rgb.l[keep,] / rowSums(rgb.l[keep,]) + tri.val[[n]] = list(red=rgb.l$red,green=rgb.l$green,blue=rgb.l$blue) + tri.col[[n]] = rgb(red=rgb.l$red,green=rgb.l$green,blue=rgb.l$blue,maxColorValue=1) + }#end for + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Plot the colour legend. # + #---------------------------------------------------------------------------------------# + triax.leg( at = rgb.at + , axis.labels = rgb.axis.labels + , mar = c(0,0.5,0,0.5) + , cex.axis = 0.8 + , cex.ticks = 0.5 + , show.grid = TRUE + )#end triax.leg + triax.fill(col=tri.col) + #---------------------------------------------------------------------------------------# + + + + + + #=======================================================================================# + #=======================================================================================# + # Now we plot the other panels. # + #---------------------------------------------------------------------------------------# + for (p in 1:npanels){ + #----- Set the window. --------------------------------------------------------------# + + plot.new() + mar.orig = par.here$mar + mar.orig[4] = 1.1 + par(par.here) + plot.window(xlim=xlim,ylim=ylim,...) + box() + #------------------------------------------------------------------------------------# + + + + #----- Find the corners for the rectangles. -----------------------------------------# + nx = length(x[[p]]) + ny = length(y[[p]]) + xleft = x[[p]] - 0.5 * dx[[p]] + xright = x[[p]] + 0.5 * dx[[p]] + ybottom = y[[p]] - 0.5 * dy[[p]] + ytop = y[[p]] + 0.5 * dy[[p]] + rect(xleft=xleft,ybottom=ybottom,xright=xright,ytop=ytop + ,col=pcol[[p]],border=pcol[[p]]) + #------------------------------------------------------------------------------------# + + + + + #---- Plot the X axis. --------------------------------------------------------------# + if (! is.null(x.axis.options)){ + x.axis.now = modifyList(x=x.axis.options[[p]],val=list(side=1)) + }else{ + x.axis.now = list(side=1,las=1) + }#end if + do.call(what="axis",args=x.axis.now) + #------------------------------------------------------------------------------------# + + + + + #---- Plot the Y axis. --------------------------------------------------------------# + if (! is.null(y.axis.options)){ + y.axis.now = modifyList(x=y.axis.options[[p]],val=list(side=2)) + }else{ + y.axis.now = list(side=2,las=1) + }#end if + do.call(what="axis",args=y.axis.now) + #------------------------------------------------------------------------------------# + + + + #---- Plot the title. ---------------------------------------------------------------# + if (! is.null(sub.options)){ + do.call(what="title",args=sub.options[[p]]) + }#end if + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Plot other options. # + #------------------------------------------------------------------------------------# + n.after = length(plot.after) + for (a in sequence(n.after)){ + do.call(what=names(plot.after)[a],args=plot.after[[a]]) + }#end for + #------------------------------------------------------------------------------------# + }#end for + #=======================================================================================# + #=======================================================================================# + + + + + + #=======================================================================================# + #=======================================================================================# + # Plot the global title. # + #---------------------------------------------------------------------------------------# + par(las=0) + if (! is.null(main.xlab)){ + #----- Make sure we get the main text. ----------------------------------------------# + if (! is.list(main.xlab)){ + main.xlab=list(text=main.xlab) + }else if (! "text" %in% names(main.xlab)){ + names(main.xlab)[[1]] = "text" + }#end if + #----- Outer must be set to TRUE, overwrite if needed be. ---------------------------# + main.xlab$outer = TRUE + if (! "side" %in% names(main.xlab)) main.xlab$side = 1 + if (! "padj" %in% names(main.xlab)) main.xlab$padj = -4.75 + do.call("mtext",main.xlab) + }#end if + #---------------------------------------------------------------------------------------# + + + + if (! is.null(main.ylab)){ + #----- Make sure we get the main text. ----------------------------------------------# + if (! is.list(main.ylab)){ + main.ylab = list(text = main.ylab) + }else if (! "text" %in% names(main.ylab)){ + names(main.ylab)[[1]] = "text" + }#end if + #----- Outer must be set to TRUE, overwrite if needed be. ---------------------------# + main.ylab$outer = TRUE + if (! "side" %in% names(main.ylab)) main.ylab$side = 2 + if (! "padj" %in% names(main.ylab)) main.ylab$padj = -0.75 + do.call("mtext",main.ylab) + }#end if + if (! is.null(main.title)){ + #----- Make sure we get the main text. ----------------------------------------------# + if (! is.list(main.title)){ + main.title=list(text=main.title) + }else if (! "text" %in% names(main.title)){ + names(main.title)[[1]] = "text" + }#end if + #----- Outer must be set to TRUE, overwrite if needed be. ---------------------------# + main.title$outer = TRUE + if (! "side" %in% names(main.title)) main.xlab$side = 3 + if (! "padj" %in% names(main.title)) main.xlab$padj = 0 + if (! "cex" %in% names(main.title)) main.xlab$cex = 1.1 + if (! "font" %in% names(main.title)) main.xlab$font = 2 + do.call("mtext",main.title) + }#end if + #---------------------------------------------------------------------------------------# + + invisible() +}#end function plot.rgb +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +triax.leg <<- function (x = NULL, main = "", at = seq(0.1, 0.9, by = 0.1), + axis.labels = NULL, tick.labels = NULL, col.axis = "black", + cex.axis = 1, cex.ticks = 1, align.labels = TRUE, show.grid = FALSE, + col.grid = "gray", lty.grid = par("lty"), cc.axes = FALSE, + show.legend = FALSE, label.points = FALSE, point.labels = NULL, + col.symbols = "black", pch = par("pch"), mar = c(5, 2, 4, + 2), no.add = TRUE, ...) +{ + oldpar <- par(new=FALSE,no.readonly=TRUE) + on.exit(par(oldpar)) + if (is.null(axis.labels)) axis.labels <- colnames(x)[1:3] + par.send=par(pty="s",xpd = TRUE, mar = mar) + plot(0.5, type = "n", axes = FALSE, xlim = c(0, 1), ylim = c(0, + 1), main = main, xlab = "", ylab = "") + triax.frame(at = at, axis.labels = axis.labels, tick.labels = tick.labels, + col.axis = col.axis, cex.axis = cex.axis, cex.ticks = cex.ticks, + align.labels = align.labels, show.grid = show.grid, col.grid = col.grid, + lty.grid = lty.grid, cc.axes = cc.axes) + if (is.null(x)) + xypos <- NULL + else xypos <- triax.points(x, show.legend = show.legend, + label.points = label.points, point.labels = point.labels, + col.symbols = col.symbols, pch = pch, cc.axes = cc.axes,par.send,...) + invisible(list(xypos = xypos, oldpar = oldpar)) +} +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/plotsize.r b/R-utils/plotsize.r new file mode 100644 index 000000000..d229a34cb --- /dev/null +++ b/R-utils/plotsize.r @@ -0,0 +1,139 @@ +#==========================================================================================# +#==========================================================================================# +# This function that defines the size of the figure to be plotted in case of maps. # +# In case the plot is a map, it correct sizes so the map doesn't look distorted. # +#------------------------------------------------------------------------------------------# +plotsize = function( proje # Map projection? [T|F] + , limlon = NULL # Longitude range, if proje = TRUE + , limlat = NULL # Latitude range, if proje = TRUE + , deg = TRUE # Are longitude and latitude in degrees? + , stdheight = NULL # Standard height + , stdwidth = NULL # Standard + , extendfc = FALSE # Extend width for filled.contour [T|F] + , paper = "letter" # Paper size (ignored if stdXXX aren't NULL) + ){ + + + #---------------------------------------------------------------------------------------# + # Check whether projection is TRUE or false. In case it is TRUE, limlon and limlat # + # must be given and must be a vector with dimension 2 (longitude and latitude ranges). # + #---------------------------------------------------------------------------------------# + if (proje){ + if (is.null(limlon) && is.null(limlat)){ + stop("Variables limlon and limlat must be defined if proje is TRUE!") + }else if(length(limlon) != 2 && length(limlat) !=2){ + stop("Variables limlon and limlat must be vectors of length 2 if proje is TRUE!") + }#end if (is.null(limlon) && is.null(limlat)) + #------------------------------------------------------------------------------------# + }#end if (proje) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Check whether stdheight and stdwidth are both available or both missing. It is # + # not allowed to provide only one of them. In case they are fine and they are # + # provided, override paper and make it "special". In case they are both NULL, make the # + # paper name lower case (so it becomes case insentitive). # + #---------------------------------------------------------------------------------------# + if (is.null(stdheight) != is.null(stdwidth)){ + cat(" Stdheight is NULL: ",is.null(stdheight),"\n") + cat(" Stdwidth is NULL: ",is.null(stdwidth ),"\n") + stop(" Either set both stdheight and stdwidth to NULL or provide both...") + }else if (! is.null(stdheight)){ + paper = "special" + }else if (!is.null(paper)){ + paper = tolower(paper) + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the standard width and height depending on the paper. # + #---------------------------------------------------------------------------------------# + if (paper == "special") { + stdratio = max(c(stdwidth,stdheight))/min(c(stdwidth,stdheight)) + }else if (paper == "letter"){ + stdwidth = 0.8 * 11.0 + stdheight = 0.8 * 8.5 + stdratio = 11.0 / 8.5 + }else if (paper == "a4"){ + stdwidth = 0.8 * 29.7 / 2.54 + stdheight = 0.8 * 21.0 / 2.54 + stdratio = 29.7 / 21.0 + }else if (paper == "legal"){ + stdwidth = 0.8 * 14.0 + stdheight = 0.8 * 8.5 + stdratio = 14.0 / 8.5 + }else if (paper == "executive"){ + stdwidth = 0.8 * 10.25 + stdheight = 0.8 * 7.25 + stdratio = 10.25 / 7.25 + }else{ + warning(paste("Unknown paper size (",paper,"). Using letter instead.",sep="")) + stdwidth = 0.8 * 11.0 + stdheight = 0.8 * 8.5 + stdratio = 11.0 / 8.5 + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Correct the width and height in case this is a map. # + #---------------------------------------------------------------------------------------# + if (proje){ + #----- Extend the width in case this will be used for filled.contour. ---------------# + if (extendfc){ + width.fac = 1.0 + 1/6 + }else{ + width.fac = 1.0 + }#end if extendfc + #------------------------------------------------------------------------------------# + + + #----- Find the actual ratio using the longitude and latitude. ----------------------# + interx = max(limlon) - min(limlon) + intery = max(limlat) - min(limlat) + if (deg){ + ratio = interx * cos(mean(limlat) * pi / 180.) / intery + }else{ + ratio = interx * cos(mean(limlat)) / intery + }#end if (deg) + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Fix the width or height to account for the sought ratio. # + #------------------------------------------------------------------------------------# + if (ratio >= stdratio){ + height = stdwidth / ratio + width = width.fac * stdwidth + }else{ + height = stdheight + width = height * ratio * width.fac + }#end if(actualratio >= stdratio) + #------------------------------------------------------------------------------------# + + }else{ + + #----- Not a map projection. Use the standard size. --------------------------------# + height = stdheight + width = stdwidth + ratio = stdratio + #------------------------------------------------------------------------------------# + + }#end if (proje) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Append everything to a list. # + #---------------------------------------------------------------------------------------# + ans = list(height=height,width=width,ratio=ratio,paper="special") + return(ans) + #---------------------------------------------------------------------------------------# +}#end function +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/pmonthly_varlist.r b/R-utils/pmonthly_varlist.r new file mode 100644 index 000000000..3afaadfcc --- /dev/null +++ b/R-utils/pmonthly_varlist.r @@ -0,0 +1,2748 @@ +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +# List of possible plots. In case you don't want some of them, simply switch plt to F. # +#------------------------------------------------------------------------------------------# +#----- Time series per PFT. ---------------------------------------------------------------# +n = 0 +tspftdbh = list() +n = n + 1 +tspftdbh[[n]] = list( vnam = "agb" + , desc = "Above ground biomass" + , e.unit = "kgC/m2" + , i.unit = "kgC/plant" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = TRUE + , bar.plot = TRUE + , stack = TRUE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "bgb" + , desc = "Below ground biomass" + , e.unit = "kgC/m2" + , i.unit = "kgC/plant" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = TRUE + , bar.plot = TRUE + , stack = TRUE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "biomass" + , desc = "Total biomass" + , e.unit = "kgC/m2" + , i.unit = "kgC/plant" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = TRUE + , bar.plot = TRUE + , stack = TRUE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "ba" + , desc = "Basal area" + , e.unit = "cm2/m2" + , i.unit = "cm2/plant" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = TRUE + , bar.plot = TRUE + , stack = TRUE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "lai" + , desc = "Leaf area index" + , e.unit = "m2/m2" + , i.unit = "m2/m2" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = TRUE + , bar.plot = TRUE + , stack = TRUE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "wai" + , desc = "Wood area index" + , e.unit = "m2/m2" + , i.unit = "m2/m2" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = TRUE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "tai" + , desc = "Total area index" + , e.unit = "m2/m2" + , i.unit = "m2/m2" + , plog = FALSE + , pft = FALSE + , pftdbh = FALSE + , sas = FALSE + , bar.plot = FALSE + , stack = TRUE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "gpp" + , desc = "Gross primary productivity" + , e.unit = "kgC/m2/yr" + , i.unit = "kgC/plant/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = TRUE + , bar.plot = TRUE + , stack = TRUE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "npp" + , desc = "Net primary productivity" + , e.unit = "kgC/m2/yr" + , i.unit = "kgC/plant/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "mco" + , desc = "Maintenance costs" + , e.unit = "kgC/m2/yr" + , i.unit = "kgC/plant/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "cba" + , desc = "Carbon balance" + , e.unit = "kgC/m2/yr" + , i.unit = "kgC/plant/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "ldrop" + , desc = "Leaf drop" + , e.unit = "kgC/m2/yr" + , i.unit = "kgC/plant/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "balive" + , desc = "Biomass of active tissues" + , e.unit = "kgC/m2" + , i.unit = "kgC/plant" + , plog = FALSE + , pft = FALSE + , pftdbh = FALSE + , sas = FALSE + , bar.plot = FALSE + , stack = TRUE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "bdead" + , desc = "Structural biomass" + , e.unit = "kgC/m2" + , i.unit = "kgC/plant" + , plog = FALSE + , pft = FALSE + , pftdbh = FALSE + , sas = FALSE + , bar.plot = FALSE + , stack = TRUE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "bleaf" + , desc = "Leaf biomass" + , e.unit = "kgC/m2" + , i.unit = "kgC/plant" + , plog = FALSE + , pft = FALSE + , pftdbh = FALSE + , sas = FALSE + , bar.plot = FALSE + , stack = TRUE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "broot" + , desc = "Root biomass" + , e.unit = "kgC/m2" + , i.unit = "kgC/plant" + , plog = FALSE + , pft = FALSE + , pftdbh = FALSE + , sas = FALSE + , bar.plot = FALSE + , stack = TRUE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "bsapwood" + , desc = "Sapwood biomass" + , e.unit = "kgC/m2" + , i.unit = "kgC/plant" + , plog = FALSE + , pft = FALSE + , pftdbh = FALSE + , sas = FALSE + , bar.plot = FALSE + , stack = TRUE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "bstorage" + , desc = "Storage biomass" + , e.unit = "kgC/m2" + , i.unit = "kgC/plant" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = TRUE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "bseeds" + , desc = "Seed biomass" + , e.unit = "kgC/m2" + , i.unit = "kgC/plant" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = TRUE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "leaf.resp" + , desc = "Leaf respiration" + , e.unit = "kgC/m2/yr" + , i.unit = "kgC/plant/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = TRUE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "root.resp" + , desc = "Root respiration" + , e.unit = "kgC/m2/yr" + , i.unit = "kgC/plant/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = TRUE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "growth.resp" + , desc = "Growth respiration" + , e.unit = "kgC/m2/yr" + , i.unit = "kgC/plant/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = TRUE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "nplant" + , desc = "Plant density" + , e.unit = "plant/m2" + , i.unit = "plant/m2" + , plog = TRUE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = TRUE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "fs.open" + , desc = "Soil moisture stress factor" + , e.unit = "--" + , i.unit = "--" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "leaf.gsw" + , desc = "Stomatal conductance" + , e.unit = "kg/m2leaf/day" + , i.unit = "kg/m2leaf/day" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = TRUE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "leaf.gbw" + , desc = "Leaf boundary layer conductance" + , e.unit = "kg/m2leaf/day" + , i.unit = "kg/m2leaf/day" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = TRUE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "mort" + , desc = "Mortality rate" + , e.unit = "%pop/yr" + , i.unit = "%pop/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = TRUE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "recr" + , desc = "Recruitment rate" + , e.unit = "%pop/yr" + , i.unit = "%pop/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = TRUE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "growth" + , desc = "Growth rate" + , e.unit = "%dbh/yr" + , i.unit = "%dbh/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = TRUE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "census.lai" + , desc = "Leaf area index (H > 1.5m)" + , e.unit = "m2/m2" + , i.unit = "m2/m2" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = TRUE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "census.agb" + , desc = "Above-ground biomass (DBH > 10cm)" + , sas = FALSE + , e.unit = "m2/m2" + , i.unit = "m2/m2" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = TRUE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "census.ba" + , desc = "Basal area (DBH > 10cm)" + , sas = FALSE + , e.unit = "cm2/m2" + , i.unit = "cm2/m2" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = TRUE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "ncbmort" + , desc = "Mortality rate - Neg. C balance" + , e.unit = "%pop/yr" + , i.unit = "%pop/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = TRUE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "dimort" + , desc = "Mortality rate - Density independent" + , e.unit = "%pop/yr" + , i.unit = "%pop/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = TRUE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "cbamax" + , desc = "Maximum Carbon balance" + , e.unit = "kgC/m2/yr" + , i.unit = "kgC/plant/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "cbalight" + , desc = "Carbon balance - Maximum light" + , e.unit = "kgC/m2/yr" + , i.unit = "kgC/plant/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "cbamoist" + , desc = "Carbon balance - Maximum moisture" + , e.unit = "kgC/m2/yr" + , i.unit = "kgC/plant/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "cbarel" + , desc = "Relative carbon balance" + , e.unit = "--" + , i.unit = "--" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = TRUE + , bar.plot = TRUE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "hflxlc" + , desc = "Leaf sensible heat flux" + , e.unit = "W/m2" + , i.unit = "W/plant" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "wflxlc" + , desc = "Leaf evaporation" + , e.unit = "kg/m2/day" + , i.unit = "kg/plant/day" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "transp" + , desc = "Leaf transpiration" + , e.unit = "kg/m2/day" + , i.unit = "kg/plant/day" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = TRUE + , stack = TRUE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "wue" + , desc = "Water use efficiency" + , e.unit = "gC/kgH2O" + , i.unit = "gC/kgH2O" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = TRUE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "i.gpp" + , desc = "Mean gross primary production" + , e.unit = "kgC/plant/yr" + , i.unit = "kgC/plant/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "i.npp" + , desc = "Mean net primary production" + , e.unit = "kgC/plant/yr" + , i.unit = "kgC/plant/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "i.plant.resp" + , desc = "Mean plant respiration" + , e.unit = "kgC/plant/yr" + , i.unit = "kgC/plant/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "i.mco" + , desc = "Mean maintenance costs" + , e.unit = "kgC/plant/yr" + , i.unit = "kgC/plant/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "i.cba" + , desc = "Mean carbon balance" + , e.unit = "kgC/plant/yr" + , i.unit = "kgC/plant/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "i.cbamax" + , desc = "Maximum carbon balance" + , e.unit = "kgC/plant/yr" + , i.unit = "kgC/plant/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "i.cbalight" + , desc = "Mean carbon balance - maximum light" + , e.unit = "kgC/plant/yr" + , i.unit = "kgC/plant/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "i.cbamoist" + , desc = "Mean carbon balance - maximum moisture" + , e.unit = "kgC/plant/yr" + , i.unit = "kgC/plant/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "i.hflxlc" + , desc = "Mean leaf sensible heat flux" + , e.unit = "W/plant" + , i.unit = "W/plant" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "i.wflxlc" + , desc = "Mean leaf evaporation" + , e.unit = "kg/plant/day" + , i.unit = "kg/plant/day" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "i.transp" + , desc = "Mean leaf evaporation" + , e.unit = "kg/plant/day" + , i.unit = "kg/plant/day" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "height" + , desc = "Height" + , e.unit = "m" + , i.unit = "m" + , plog = FALSE + , pft = FALSE + , pftdbh = FALSE + , sas = TRUE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "f.gpp" + , desc = "Gross Primary Productivity" + , e.unit = "%biomass/yr" + , i.unit = "%biomass/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "f.plant.resp" + , desc = "Plant respiration" + , e.unit = "%biomass/yr" + , i.unit = "%biomass/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "f.npp" + , desc = "Net Primary Productivity" + , e.unit = "%biomass/yr" + , i.unit = "%biomass/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "f.cba" + , desc = "Carbon balance" + , e.unit = "%biomass/yr" + , i.unit = "%biomass/yr" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "f.bstorage" + , desc = "Relative storage biomass" + , e.unit = "gC_st/kgC_bio" + , i.unit = "gC_st/kgC_bio" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "f.bleaf" + , desc = "Relative leaf biomass" + , e.unit = "gC_leaf/kgC_bio" + , i.unit = "gC_leaf/kgC_bio" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "f.broot" + , desc = "Relative root biomass" + , e.unit = "gC_root/kgC_bio" + , i.unit = "gC_root/kgC_bio" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "f.bseeds" + , desc = "Relative seed biomass" + , e.unit = "gC_seed/kgC_bio" + , i.unit = "gC_seed/kgC_bio" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "leaf.par" + , desc = "Absorbed PAR - Leaf" + , e.unit = "umol/m2leaf/s" + , i.unit = "umol/m2leaf/s" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "leaf.rshort" + , desc = "Absorbed SW - Leaf" + , e.unit = "W/m2leaf" + , i.unit = "W/m2leaf" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +n = n + 1 +tspftdbh[[n]] = list( vnam = "leaf.rlong" + , desc = "Absorbed LW - Leaf" + , e.unit = "W/m2leaf" + , i.unit = "W/m2leaf" + , plog = FALSE + , pft = TRUE + , pftdbh = TRUE + , sas = FALSE + , bar.plot = FALSE + , stack = FALSE + )#end list +#------------------------------------------------------------------------------------------# + + + + + + +#----- Time series per Land use. ----------------------------------------------------------# +n = 0 +tslu = list() +n = n + 1 +tslu[[n]] = list( vnam = "agb" + , desc = "Above ground biomass" + , unit = "kgC/m2" + , plog = FALSE + , plt = FALSE) +n = n + 1 +tslu[[n]] = list( vnam = "bgb" + , desc = "Below ground biomass" + , unit = "kgC/m2" + , plog = FALSE + , plt = FALSE) +n = n + 1 +tslu[[n]] = list( vnam = "biomass" + , desc = "Total biomass" + , unit = "kgC/m2" + , plog = FALSE + , plt = FALSE) +n = n + 1 +tslu[[n]] = list( vnam = "lai" + , desc = "Leaf area index" + , unit = "m2/m2" + , plog = FALSE + , plt = FALSE) +n = n + 1 +tslu[[n]] = list( vnam = "gpp" + , desc = "Gross primary productivity" + , unit = "kgC/m2/yr" + , plog = FALSE + , plt = FALSE) +n = n + 1 +tslu[[n]] = list( vnam = "npp" + , desc = "Net primary productivity" + , unit = "kgC/m2/yr" + , plog = FALSE + , plt = FALSE) +n = n + 1 +tslu[[n]] = list( vnam = "area" + , desc = "Fraction of area" + , unit = "" + , plog = FALSE + , plt = FALSE) +n = n + 1 +tslu[[n]] = list( vnam = "basarea" + , desc = "Basal area" + , unit = "cm2/m2" + , plog = FALSE + , plt = FALSE) +#------------------------------------------------------------------------------------------# + + + + +#------------------------------------------------------------------------------------------# +# This plots distributions of the properties over time, in three different ways. # +# -- fco.mmean: filled contour, with month in the X axis and year in the y axis # +# -- fco.qmean: filled contour, with month/year in the X axis and hour in the y axis # +# -- box.plot: box plot with fixed months and year spread. # +# # +# Soil variables should not be placed here, because they have two dimensions... # +# Integrated soil properties can come here, though. # +#------------------------------------------------------------------------------------------# +n = 0 +squeeze = list() +n = n + 1 +squeeze[[n]] = list( vnam = "gpp" + , desc = "Gross Primary productivity" + , unit = "kgC/m2/yr" + , col.scheme = "atlas" + , fco.mmean = TRUE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "npp" + , desc = "Net Primary productivity" + , unit = "kgC/m2/yr" + , col.scheme = "atlas" + , fco.mmean = TRUE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "plant.resp" + , desc = "Plant respiration" + , unit = "kgC/m2/yr" + , col.scheme = "muitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "het.resp" + , desc = "Heterotrophic respiration" + , unit = "kgC/m2/yr" + , col.scheme = "muitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "nep" + , desc = "Net ecosystem production" + , unit = "kgC/m2/yr" + , col.scheme = "muitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "reco" + , desc = "Ecosystem respiration" + , unit = "kgC/m2/yr" + , col.scheme = "muitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "hflxca" + , desc = "Sensible heat flux" + , unit = "W/m2" + , col.scheme = "muitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "wflxca" + , desc = "Water flux" + , unit = "kg/m2/day" + , col.scheme = "imuitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "wflxgc" + , desc = "Ground evaporation" + , unit = "kg/m2/day" + , col.scheme = "imuitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "wflxlc" + , desc = "Leaf evaporation" + , unit = "kg/m2/day" + , col.scheme = "imuitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "wflxwc" + , desc = "Wood evaporation" + , unit = "kg/m2/day" + , col.scheme = "imuitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "evap" + , desc = "Evaporation" + , unit = "kg/m2/day" + , col.scheme = "imuitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "transp" + , desc = "Transpiration" + , unit = "kg/m2/day" + , col.scheme = "imuitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "nee" + , desc = "Net ecosystem exchange" + , unit = "umol/m2/s" + , col.scheme = "imuitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "cflxca" + , desc = "CO2 flux" + , unit = "umol/m2/s" + , col.scheme = "imuitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "cflxst" + , desc = "CO2 flux" + , unit = "umol/m2/s" + , col.scheme = "imuitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "can.temp" + , desc = "Canopy air temperature" + , unit = "degC" + , col.scheme = "muitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "atm.temp" + , desc = "Atmospheric temperature" + , unit = "degC" + , col.scheme = "muitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "leaf.temp" + , desc = "Leaf temperature" + , unit = "degC" + , col.scheme = "muitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "wood.temp" + , desc = "Wood temperature" + , unit = "degC" + , col.scheme = "muitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "gnd.temp" + , desc = "Ground temperature" + , unit = "degC" + , col.scheme = "muitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "atm.shv" + , desc = "Atmospheric specific humidity" + , unit = "g/kg" + , col.scheme = "imuitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "can.shv" + , desc = "Canopy air specific humidity" + , unit = "g/kg" + , col.scheme = "imuitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "gnd.shv" + , desc = "Ground specific humidity" + , unit = "g/kg" + , col.scheme = "imuitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "atm.co2" + , desc = "Atmospheric CO2 mixing ratio" + , unit = "umol/mol" + , col.scheme = "muitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "can.co2" + , desc = "Canopy air CO2 mixing ratio" + , unit = "umol/mol" + , col.scheme = "muitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "rain" + , desc = "Total monthly precipitation" + , unit = "mm" + , col.scheme = "imuitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "fs.open" + , desc = "Fraction of open stomata" + , unit = "---" + , col.scheme = "imuitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "leaf.gbw" + , desc = "Leaf boundary layer conductance" + , unit = "kg/m2l/day" + , col.scheme = "imuitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "leaf.gsw" + , desc = "Stomatal conductance" + , unit = "kg/m2l/day" + , col.scheme = "imuitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "rshort" + , desc = "Downward shortwave radiation" + , unit = "W/m2" + , col.scheme = "icloudy" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "rshort.gnd" + , desc = "Abs. gnd. shortwave radiation" + , unit = "W/m2" + , col.scheme = "icloudy" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "rshortup" + , desc = "Outgoing shortwave radiation" + , unit = "W/m2" + , col.scheme = "icloudy" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "rlong" + , desc = "Downward longwave radiation" + , unit = "W/m2" + , col.scheme = "cloudy" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "rlong.gnd" + , desc = "Abs. gnd. longwave radiation" + , unit = "W/m2" + , col.scheme = "cloudy" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "rlongup" + , desc = "Outgoing longwave radiation" + , unit = "W/m2" + , col.scheme = "cloudy" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "albedo" + , desc = "Shortwave albedo" + , unit = "---" + , col.scheme = "muitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "ustar" + , desc = "Friction velocity" + , unit = "m/s" + , col.scheme = "muitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "paw" + , desc = "Potential available water" + , unit = "%" + , col.scheme = "imuitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +n = n + 1 +squeeze[[n]] = list( vnam = "smpot" + , desc = "Integrated matric potential" + , unit = "MPa" + , col.scheme = "muitas" + , fco.mmean = FALSE + , fco.qmean = FALSE + , box.plot = FALSE + )#end list +#------------------------------------------------------------------------------------------# + + + + +#------------------------------------------------------------------------------------------# +# Theme plots (multiple variables in the same plot). # +#------------------------------------------------------------------------------------------# +n = 0 +theme = list() +n = n + 1 +theme[[n]] = list( vnam = c( "gpp", "plant.resp", "het.resp", "reco" + , "npp", "nep") + , desc = c( "GPP","Plant resp.","Het. resp.","Ecos. Resp." + , "NPP", "NEP") + , colour = c( "darkgreen", "gold", "purple3", "orangered" + ,"chartreuse3","dodgerblue3") + , lwd = c( 2.5, 2.5, 2.5, 2.5 + , 2.5, 2.5) + , type = "o" + , plog = FALSE + , prefix = "ecoflux" + , title = "Ecosystem fluxes" + , unit = "kgC/m2/yr" + , legpos = "topleft" + , emean = TRUE + , mmean = TRUE + , qmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +theme[[n]] = list( vnam = c( "rshort", "rlong","rshort.gnd", "qwflxca" + , "hflxca") + , desc = c( "Down SW", "Down LW", "Abs. Grnd", "'Latent'" + , "Sensible") + , colour = c("goldenrod","chartreuse4", "purple4","dodgerblue3" + ,"firebrick") + , lwd = c( 2.5, 2.5, 2.5, 2.5 + ,2.5) + , type = "o" + , plog = FALSE + , prefix = "eneflux" + , title = "Energy fluxes" + , unit = "W/m2" + , legpos = "topleft" + , emean = TRUE + , mmean = TRUE + , qmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +theme[[n]] = list( vnam = c( "wflxgc", "wflxca", "wflxlc" + , "wflxwc", "transp") + , desc = c("Ground->Canopy", "Canopy->Atm","Leaf->Canopy" + , "Wood->Canopy", "Transpiration") + , colour = c( "firebrick", "royalblue4", "chartreuse4" + , "darkgoldenrod","darkolivegreen2") + , lwd = c( 2.5, 2.5, 2.5 + , 2.5, 2.5) + , type = "o" + , plog = FALSE + , prefix = "h2oflux" + , title = "Water fluxes" + , unit = "kg/m2/day" + , legpos = "topleft" + , emean = TRUE + , mmean = TRUE + , qmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +theme[[n]] = list( vnam = c( "atm.temp", "can.temp", "leaf.temp" + , "wood.temp", "gnd.temp") + , desc = c( "Atmosphere","Canopy air", "Leaf" + , "Wood", "Ground") + , colour = c( "deepskyblue", "grey45","chartreuse4" + ,"darkgoldenrod", "orangered") + , lwd = c( 2.5, 2.5, 2.5 + , 2.5, 2.5) + , type = "o" + , plog = FALSE + , prefix = "temperature" + , title = "Temperature" + , unit = "degC" + , legpos = "topleft" + , emean = TRUE + , mmean = TRUE + , qmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +theme[[n]] = list( vnam = c( "atm.shv", "can.shv", "gnd.shv") + , desc = c( "Atmosphere","Canopy air", "Ground") + , colour = c("deepskyblue", "slateblue","darkgoldenrod") + , lwd = c( 2.5, 2.5, 2.5) + , type = "o" + , plog = FALSE + , prefix = "h2ovapour" + , title = "Water vapour mixing ratio" + , unit = "g/kg" + , legpos = "topleft" + , emean = TRUE + , mmean = TRUE + , qmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +theme[[n]] = list( vnam = c( "atm.co2", "can.co2") + , desc = c( "Atmosphere", "Canopy air") + , colour = c("deepskyblue", "slateblue") + , lwd = c(2.5,2.5) + , type = "o" + , plog = FALSE + , prefix = "co2" + , title = "CO2 mixing ratio" + , unit = "umol/mol" + , legpos = "topleft" + , emean = TRUE + , mmean = TRUE + , qmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +theme[[n]] = list( vnam = c( "rain") + , desc = c("Precipitation") + , colour = c( "royalblue4") + , lwd = c( 2.5) + , type = "o" + , plog = FALSE + , prefix = "prec" + , title = "Precipitation" + , unit = "mm" + , legpos = "topleft" + , emean = TRUE + , mmean = TRUE + , qmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +theme[[n]] = list( vnam = c("npat.global") + , desc = c("Patch count") + , colour = c( "orangered") + , lwd = c( 2.5) + , type = "o" + , plog = FALSE + , prefix = "npatch" + , title = "Total number of patches" + , unit = "---" + , legpos = "topleft" + , emean = TRUE + , mmean = TRUE + , qmean = FALSE + , ymean = TRUE + )#end list +n = n + 1 +theme[[n]] = list( vnam = c( "ncoh.global") + , desc = c("Cohort count") + , colour = c( "chartreuse4") + , lwd = c( 2.5) + , type = "o" + , plog = FALSE + , prefix = "ncohort" + , title = "Total number of cohorts" + , unit = "---" + , legpos = "topleft" + , emean = TRUE + , mmean = TRUE + , qmean = FALSE + , ymean = TRUE + )#end list +n = n + 1 +theme[[n]] = list( vnam = c( "plant.resp", "het.resp", "cwd.resp", "leaf.resp" + , "root.resp", "growth.resp", "reco") + , desc = c("Plant resp.", "Het. resp.", "CWD resp.","Leaf resp." + , "Root resp.", "Growth resp.","Ecos. resp.") + , colour = c("chartreuse3", "purple3","saddlebrown", "darkgreen" + ,"orangered" ,"darkgoldenrod","dodgerblue3") + , lwd = c( 2.5, 2.5, 2.5, 2.5 + , 2.5, 2.5, 2.5) + , type = "o" + , plog = FALSE + , prefix = "respiration" + , title = "Respiration fluxes" + , unit = "kgC/m2/yr" + , legpos = "topleft" + , emean = TRUE + , mmean = TRUE + , qmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +theme[[n]] = list( vnam = c( "atm.vels", "ustar") + , desc = c("Wind speed","Friction velocity") + , colour = c("deepskyblue", "slateblue") + , lwd = c( 2.5, 2.5) + , type = "o" + , plog = FALSE + , prefix = "wind" + , title = "Winds" + , unit = "m/s" + , legpos = "topleft" + , emean = TRUE + , mmean = TRUE + , qmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +theme[[n]] = list( vnam = c("fast.soil.c","slow.soil.c","struct.soil.c") + , desc = c( "Fast", "Slow", "Structural") + , colour = c("chartreuse3","dodgerblue3", "orangered") + , lwd = c( 2.5, 2.5, 2.5) + , type = "o" + , plog = FALSE + , prefix = "soil_carbon" + , title = "Soil Carbon" + , unit = "kgC/m2" + , legpos = "topleft" + , emean = TRUE + , mmean = TRUE + , qmean = FALSE + , ymean = TRUE + )#end list +n = n + 1 +theme[[n]] = list( vnam = c( "atm.vpd", "can.vpd", "leaf.vpd") + , desc = c( "Atmosphere", "Canopy air", "Leaf") + , colour = c("deepskyblue","dodgerblue4","chartreuse3") + , lwd = c( 2.5, 2.5, 2.5) + , type = "o" + , plog = FALSE + , prefix = "vpdef" + , title = "Vapour pressure deficit" + , unit = "hPa" + , legpos = "topleft" + , emean = TRUE + , mmean = TRUE + , qmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +theme[[n]] = list( vnam = c( "paw") + , desc = c("Pot.Av.Water") + , colour = c( "steelblue") + , lwd = c( 2.5) + , type = "o" + , plog = FALSE + , prefix = "paw" + , title = "Average potential available water" + , unit = "%" + , legpos = "topleft" + , emean = TRUE + , mmean = TRUE + , qmean = FALSE + , ymean = TRUE + )#end list +n = n + 1 +theme[[n]] = list( vnam = c( "smpot") + , desc = c("Neg. Potential") + , colour = c( "royalblue4") + , lwd = c( 2.5) + , type = "o" + , plog = FALSE + , prefix = "smpot" + , title = "Average soil matric potential" + , unit = "MPa" + , legpos = "topleft" + , emean = TRUE + , mmean = TRUE + , qmean = FALSE + , ymean = TRUE + )#end list +n = n + 1 +theme[[n]] = list( vnam = c("water.deficit", "malhi.deficit") + , desc = c( "ED-2.2","Malhi et al. (2009)") + , colour = c( "orangered", "gold") + , lwd = c( 2.5, 2.5) + , type = "o" + , plog = FALSE + , prefix = "water_deficit" + , title = "Monthly Water deficit" + , unit = "kg/m2/month" + , legpos = "topleft" + , emean = TRUE + , mmean = TRUE + , qmean = FALSE + , ymean = TRUE + )#end list +n = n + 1 +theme[[n]] = list( vnam = c( "nee", "cflxca", "cflxst") + , desc = c( "NEE", "CO2 Flux","CO2 Storage") + , colour = c("chartreuse4","steelblue", "orangered") + , lwd = c( 2.5, 2.5, 2.5) + , type = "o" + , plog = FALSE + , prefix = "carbflux" + , title = "CO2 fluxes" + , unit = "umol/m2/s" + , legpos = "topleft" + , emean = TRUE + , mmean = TRUE + , qmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +theme[[n]] = list( vnam = c( "rshort", "rshort.beam","rshort.diff" + , "rshort.gnd", "rshortup") + , desc = c("Down Top canopy", "Beam", "Diffuse" + , "Abs. Ground","Up Top canopy") + , colour = c( "deepskyblue","darkgoldenrod", "grey45" + , "firebrick", "royalblue3") + , lwd = c( 2.5, 2.5, 2.5 + , 2.5, 2.5) + , type = "o" + , plog = FALSE + , prefix = "rshort" + , title = "Short wave radiation" + , unit = "W/m2" + , legpos = "topleft" + , emean = TRUE + , mmean = TRUE + , qmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +theme[[n]] = list( vnam = c( "rlong", "rlongup", "rlong.gnd") + , desc = c("Down Top canopy","Upward LW", "Abs. Ground") + , colour = c( "deepskyblue","orangered","darkgoldenrod") + , lwd = c( 2.5, 2.5, 2.5) + , type = "o" + , plog = FALSE + , prefix = "rlong" + , title = "Long wave radiation" + , unit = "W/m2" + , legpos = "topleft" + , emean = TRUE + , mmean = TRUE + , qmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +theme[[n]] = list( vnam = c( "albedo", "albedo.beam", "albedo.diff") + , desc = c("SW Albedo (Net)","SW Albedo (Beam)","SW Albedo (Diff)") + , colour = c( "deepskyblue", "orangered", "slateblue") + , lwd = c( 2.5, 2.5, 2.5) + , type = "o" + , plog = FALSE + , prefix = "albedo" + , title = "Albedo" + , unit = "---" + , legpos = "topleft" + , emean = TRUE + , mmean = TRUE + , qmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +theme[[n]] = list( vnam = c( "par.tot", "par.beam", "par.diff" + , "par.gnd", "parup") + , desc = c("Down Top canopy", "Beam", "Diffuse" + , "Abs. Ground","Up Top canopy") + , colour = c( "deepskyblue", "darkorange3","slateblue" + , "darkgoldenrod", "chartreuse3") + , lwd = c( 2.5, 2.5, 2.5 + , 2.5, 2.5) + , type = "o" + , plog = FALSE + , prefix = "par" + , title = "Photosynthetically Active Radiation" + , unit = "umol/m2/s" + , legpos = "topleft" + , emean = TRUE + , mmean = TRUE + , qmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +theme[[n]] = list( vnam = c( "leaf.gsw", "leaf.gbw", "wood.gbw") + , desc = c( "Leaf (Stomata)","Leaf (Bnd. Lyr.)","Wood (Bnd. Lyr.)") + , colour = c( "chartreuse4", "steelblue", "sienna") + , lwd = c( 2.5, 2.5, 2.5) + , type = "o" + , plog = FALSE + , prefix = "conduct" + , title = "Conductance" + , unit = "kg/m2/day" + , legpos = "topleft" + , emean = TRUE + , mmean = TRUE + , qmean = TRUE + , ymean = TRUE + )#end list +#------------------------------------------------------------------------------------------# + + + + +#----- Comparison between observations and model averages. --------------------------------# +n = 0 +compmodel = list() +n = n + 1 +compmodel[[n]] = list( vnam = "nep" + , desc = "Net Ecosystem Productivity" + , unit = "kgC/m2/yr" + , plotsd = TRUE + , colour = c(green.fg,grey.fg) + , errcol = c(green.bg,grey.bg) + , angle = c( 45, -45) + , dens = c( 40, 40) + , lwd = c( 2.5, 2.5) + , shwd = c( 1.0, 1.0) + , type = "o" + , plog = "" + , legpos = "topleft" + , mmean = TRUE + , qmean = TRUE + , emean = TRUE + )#end list +n = n + 1 +compmodel[[n]] = list( vnam = "gpp" + , desc = "Gross Primary Productivity" + , unit = "kgC/m2/yr" + , plotsd = TRUE + , colour = c(green.fg,grey.fg) + , errcol = c(green.bg,grey.bg) + , angle = c( 45, -45) + , dens = c( 40, 40) + , lwd = c( 2.5, 2.5) + , shwd = c( 1.0, 1.0) + , type = "o" + , plog = "" + , legpos = "topleft" + , mmean = TRUE + , qmean = TRUE + , emean = TRUE + )#end list +n = n + 1 +compmodel[[n]] = list( vnam = "atm.co2" + , desc = "Air CO2 mixing ratio" + , unit = "g/kg" + , plotsd = TRUE + , colour = c(green.fg,grey.fg) + , errcol = c(green.bg,grey.bg) + , angle = c( 45, -45) + , dens = c( 40, 40) + , lwd = c( 2.5, 2.5) + , shwd = c( 1.0, 1.0) + , type = "o" + , plog = "" + , legpos = "topleft" + , mmean = TRUE + , qmean = TRUE + , emean = TRUE + )#end list +n = n + 1 +compmodel[[n]] = list( vnam = "hflxca" + , desc = "Sensible heat flux" + , unit = "W/m2" + , plotsd = TRUE + , colour = c(orange.fg,grey.fg) + , errcol = c(orange.bg,grey.bg) + , angle = c( 45, -45) + , dens = c( 40, 40) + , lwd = c( 2.5, 2.5) + , shwd = c( 1.0, 1.0) + , type = "o" + , plog = "" + , legpos = "topleft" + , mmean = TRUE + , qmean = TRUE + , emean = TRUE + )#end list +n = n + 1 +compmodel[[n]] = list( vnam = "wflxca" + , desc = "Water flux" + , unit = "kgH2O/m2/day" + , plotsd = TRUE + , colour = c(blue.fg,grey.fg) + , errcol = c(blue.bg,grey.bg) + , angle = c( 45, -45) + , dens = c( 40, 40) + , lwd = c( 2.5, 2.5) + , shwd = c( 1.0, 1.0) + , type = "o" + , plog = "" + , legpos = "topleft" + , mmean = TRUE + , qmean = TRUE + , emean = TRUE + )#end list +n = n + 1 +compmodel[[n]] = list( vnam = "rshort" + , desc = "Shortwave radiation" + , unit = "W/m2" + , plotsd = TRUE + , colour = c(orange.fg,grey.fg) + , errcol = c(orange.bg,grey.bg) + , angle = c( 45, -45) + , dens = c( 40, 40) + , lwd = c( 2.5, 2.5) + , shwd = c( 1.0, 1.0) + , type = "o" + , plog = "" + , legpos = "topleft" + , mmean = TRUE + , qmean = TRUE + , emean = TRUE + )#end list +n = n + 1 +compmodel[[n]] = list( vnam = "rlong" + , desc = "Longwave radiation" + , unit = "W/m2" + , plotsd = TRUE + , colour = c(blue.fg,grey.fg) + , errcol = c(blue.bg,grey.bg) + , angle = c( 45, -45) + , dens = c( 40, 40) + , lwd = c( 2.5, 2.5) + , shwd = c( 1.0, 1.0) + , type = "o" + , plog = "" + , legpos = "topleft" + , mmean = TRUE + , qmean = TRUE + , emean = TRUE + )#end list +n = n + 1 +compmodel[[n]] = list( vnam = "atm.temp" + , desc = "Air temperature" + , unit = "C" + , plotsd = TRUE + , colour = c(orange.fg,grey.fg) + , errcol = c(orange.bg,grey.bg) + , angle = c( 45, -45) + , dens = c( 40, 40) + , lwd = c( 2.5, 2.5) + , shwd = c( 1.0, 1.0) + , type = "o" + , plog = "" + , legpos = "topleft" + , mmean = TRUE + , qmean = TRUE + , emean = TRUE + )#end list +n = n + 1 +compmodel[[n]] = list( vnam = "atm.shv" + , desc = "Air specific humidity" + , unit = "g/kg" + , plotsd = TRUE + , colour = c(blue.fg,grey.fg) + , errcol = c(blue.bg,grey.bg) + , angle = c( 45, -45) + , dens = c( 40, 40) + , lwd = c( 2.5, 2.5) + , shwd = c( 1.0, 1.0) + , type = "o" + , plog = "" + , legpos = "topleft" + , mmean = TRUE + , qmean = TRUE + , emean = TRUE + )#end list +n = n + 1 +compmodel[[n]] = list( vnam = "rain" + , desc = "Precipitation rate" + , unit = "kg/m2/day" + , plotsd = FALSE + , colour = c(blue.fg,grey.fg) + , errcol = c(blue.bg,grey.bg) + , angle = c( 45, -45) + , dens = c( 40, 40) + , lwd = c( 2.5, 2.5) + , shwd = c( 1.0, 1.0) + , type = "o" + , plog = "" + , legpos = "topleft" + , mmean = TRUE + , qmean = TRUE + , emean = TRUE + )#end list +n = n + 1 +compmodel[[n]] = list( vnam = "atm.vels" + , desc = "Wind speed" + , unit = "m/s" + , plotsd = TRUE + , colour = c(indigo.fg,grey.fg) + , errcol = c(indigo.bg,grey.bg) + , angle = c( 45, -45) + , dens = c( 40, 40) + , lwd = c( 2.5, 2.5) + , shwd = c( 1.0, 1.0) + , type = "o" + , plog = "" + , legpos = "topleft" + , mmean = TRUE + , qmean = TRUE + , emean = TRUE + )#end list +n = n + 1 +compmodel[[n]] = list( vnam = "atm.prss" + , desc = "Air pressure" + , unit = "hPa" + , plotsd = TRUE + , colour = c(purple.fg,grey.fg) + , errcol = c(purple.bg,grey.bg) + , angle = c( 45, -45) + , dens = c( 40, 40) + , lwd = c( 2.5, 2.5) + , shwd = c( 1.0, 1.0) + , type = "o" + , plog = "" + , legpos = "topleft" + , mmean = TRUE + , qmean = TRUE + , emean = TRUE + )#end list +n = n + 1 +compmodel[[n]] = list( vnam = "cflxca" + , desc = "CO2 flux" + , unit = "umol/m2/s" + , plotsd = TRUE + , colour = c(green.fg,grey.fg) + , errcol = c(green.bg,grey.bg) + , angle = c( 45, -45) + , dens = c( 40, 40) + , lwd = c( 2.5, 2.5) + , shwd = c( 1.0, 1.0) + , type = "o" + , plog = "" + , legpos = "topleft" + , mmean = TRUE + , qmean = TRUE + , emean = TRUE + )#end list +n = n + 1 +compmodel[[n]] = list( vnam = "cflxst" + , desc = "CO2 storage" + , unit = "umol/m2/s" + , plotsd = TRUE + , colour = c(orange.fg,grey.fg) + , errcol = c(orange.bg,grey.bg) + , angle = c(45,-45) + , dens = c(40, 40) + , lwd = c(2.5,2.5) + , shwd = c(1.0,1.0) + , type = "o" + , plog = "" + , legpos = "topleft" + , mmean = TRUE + , qmean = TRUE + , emean = TRUE + )#end list +n = n + 1 +compmodel[[n]] = list( vnam = "nee" + , desc = "Net Ecosystem Exchange" + , unit = "umol/m2/s" + , plotsd = TRUE + , colour = c(green.fg,grey.fg) + , errcol = c(green.bg,grey.bg) + , angle = c( 45, -45) + , dens = c( 40, 40) + , lwd = c( 2.5, 2.5) + , shwd = c( 1.0, 1.0) + , type = "o" + , plog = "" + , legpos = "topleft" + , mmean = TRUE + , qmean = TRUE + , emean = TRUE + )#end list +n = n + 1 +compmodel[[n]] = list( vnam = "ustar" + , desc = "Friction velocity" + , unit = "m/s" + , plotsd = TRUE + , colour = c(purple.fg,grey.fg) + , errcol = c(purple.bg,grey.bg) + , angle = c( 45, -45) + , dens = c( 40, 40) + , lwd = c( 2.5, 2.5) + , shwd = c( 1.0, 1.0) + , type = "o" + , plog = "" + , legpos = "topleft" + , mmean = TRUE + , qmean = TRUE + , emean = TRUE + )#end list +n = n + 1 +compmodel[[n]] = list( vnam = "reco" + , desc = "Ecosystem respiration" + , unit = "kgC/m2/yr" + , plotsd = TRUE + , colour = c(yellow.bg,grey.fg) + , errcol = c(yellow.bg,grey.bg) + , angle = c( 45, -45) + , dens = c( 40, 40) + , lwd = c( 2.5, 2.5) + , shwd = c( 1.0, 1.0) + , type = "o" + , plog = "" + , legpos = "topleft" + , mmean = TRUE + , qmean = TRUE + , emean = TRUE + )#end list +n = n + 1 +compmodel[[n]] = list( vnam = "albedo" + , desc = "Albedo" + , unit = "--" + , plotsd = TRUE + , colour = c(orange.fg,grey.fg) + , errcol = c(orange.bg,grey.bg) + , angle = c( 45, -45) + , dens = c( 40, 40) + , lwd = c( 2.5, 2.5) + , shwd = c( 1.0, 1.0) + , type = "o" + , plog = "" + , legpos = "topleft" + , mmean = TRUE + , qmean = TRUE + , emean = TRUE + )#end list +n = n + 1 +compmodel[[n]] = list( vnam = "rshortup" + , desc = "Upward SW Radiation" + , unit = "W/m2" + , plotsd = TRUE + , colour = c(blue.fg,grey.fg) + , errcol = c(blue.bg,grey.bg) + , angle = c( 45, -45) + , dens = c( 40, 40) + , lwd = c( 2.5, 2.5) + , shwd = c( 1.0, 1.0) + , type = "o" + , plog = "" + , legpos = "topleft" + , mmean = TRUE + , qmean = TRUE + , emean = TRUE + )#end list +n = n + 1 +compmodel[[n]] = list( vnam = "rlongup" + , desc = "Upward LW Radiation" + , unit = "W/m2" + , plotsd = TRUE + , colour = c(red.fg,grey.fg) + , errcol = c(red.bg,grey.bg) + , angle = c( 45, -45) + , dens = c( 40, 40) + , lwd = c( 2.5, 2.5) + , shwd = c( 1.0, 1.0) + , type = "o" + , plog = "" + , legpos = "topleft" + , mmean = TRUE + , qmean = TRUE + , emean = TRUE + )#end list +n = n + 1 +compmodel[[n]] = list( vnam = "parup" + , desc = "Upward PAR" + , unit = "umol/m2/s" + , plotsd = TRUE + , colour = c(green.fg,grey.fg) + , errcol = c(green.bg,grey.bg) + , angle = c( 45, -45) + , dens = c( 40, 40) + , lwd = c( 2.5, 2.5) + , shwd = c( 1.0, 1.0) + , type = "o" + , plog = "" + , legpos = "topleft" + , mmean = TRUE + , qmean = TRUE + , emean = TRUE + )#end list +n = n + 1 +compmodel[[n]] = list( vnam = "rnet" + , desc = "Net radiation" + , unit = "W/m2" + , plotsd = TRUE + , colour = c(yellow.bg,grey.fg) + , errcol = c(yellow.bg,grey.bg) + , angle = c( 45, -45) + , dens = c( 40, 40) + , lwd = c( 2.5, 2.5) + , shwd = c( 1.0, 1.0) + , type = "o" + , plog = "" + , legpos = "topleft" + , mmean = TRUE + , qmean = TRUE + , emean = TRUE + )#end list +#------------------------------------------------------------------------------------------# + + + +#----- Annual mean. -----------------------------------------------------------------------# +n = 0 +soilplot = list() +n = n + 1 +soilplot[[n]] = list( vnam = "soil.water" + , desc = "Soil moisture" + , unit = "m3/m3" + , csch = "imuitas" + , pnlog = FALSE + , mmean = TRUE + , emean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +soilplot[[n]] = list( vnam = "soil.temp" + , desc = "Soil temperature" + , unit = "C" + , csch = "muitas" + , pnlog = FALSE + , mmean = TRUE + , emean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +soilplot[[n]] = list( vnam = "soil.mstpot" + , desc = "(Negative) Soil moisture potential" + , unit = "m" + , csch = "muitas" + , pnlog = TRUE + , mmean = TRUE + , emean = TRUE + , ymean = TRUE + )#end list +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# List of variables to be displayed by patch. # +#------------------------------------------------------------------------------------------# +n = 0 +plotpatch = list() +n = n + 1 +plotpatch[[n]] = list( vnam = "nep" + , desc = "Net ecosystem production" + , unit = "kgC/m2/yr" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "het.resp" + , desc = "Heterotrophic respiration" + , unit = "kgC/m2/yr" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "can.temp" + , desc = "CAS temperature" + , unit = "degC" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "gnd.temp" + , desc = "Ground temperature" + , unit = "degC" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "can.shv" + , desc = "CAS specific humidity" + , unit = "g/kg" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "gnd.shv" + , desc = "Ground specific humidity" + , unit = "g/kg" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "can.vpd" + , desc = "CAS vapour pressure deficit" + , unit = "hPa" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "can.co2" + , desc = "CAS CO2 mixing ratio" + , unit = "umol/mol" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "can.prss" + , desc = "CAS pressure" + , unit = "hPa" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "cflxca" + , desc = "CO2 flux (CAS->Atm)" + , unit = "umol/m2/s" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "cflxst" + , desc = "CO2 storage at CAS" + , unit = "umol/m2/s" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "nee" + , desc = "Net ecosystem exchange" + , unit = "umol/m2/s" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "qwflxca" + , desc = "'Latent' heat flux (CAS->Atm)" + , unit = "W/m2" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "hflxca" + , desc = "Sensible heat flux (CAS->Atm)" + , unit = "W/m2" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "hflxgc" + , desc = "Sensible heat flux (Grnd->CAS)" + , unit = "W/m2" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "hflxlc" + , desc = "Sensible heat flux (Leaf->CAS)" + , unit = "W/m2" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "hflxwc" + , desc = "Sensible heat flux (Wood->CAS)" + , unit = "W/m2" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "wflxca" + , desc = "Water flux (CAS->Atm)" + , unit = "kg/m2/day" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "wflxgc" + , desc = "Water flux (Grnd->CAS)" + , unit = "kg/m2/day" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "wflxlc" + , desc = "Water flux (Leaf->CAS)" + , unit = "kg/m2/day" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "wflxwc" + , desc = "Water flux (Wood->CAS)" + , unit = "kg/m2/day" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "transp" + , desc = "Leaf transpiration" + , unit = "kg/m2/day" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "ustar" + , desc = "Friction velocity" + , unit = "m/s" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "rshortup" + , desc = "Outgoing SW radiation" + , unit = "W/m2" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "rlongup" + , desc = "Outgoing LW radiation" + , unit = "W/m2" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "parup" + , desc = "Outgoing PAR" + , unit = "umol/m2/s" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "rnet" + , desc = "Net radiation at ToC" + , unit = "W/m2" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "lai" + , desc = "Leaf area index" + , unit = "m2/m2" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "leaf.temp" + , desc = "Leaf temperature" + , unit = "degC" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "leaf.vpd" + , desc = "Leaf vapour pressure deficit" + , unit = "hPa" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "wood.temp" + , desc = "Wood temperature" + , unit = "degC" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "gpp" + , desc = "Gross primary productivity" + , unit = "kgC/m2/yr" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "npp" + , desc = "Net primary productivity" + , unit = "kgC/m2/yr" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "plant.resp" + , desc = "Plant respiration" + , unit = "kgC/m2/yr" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +n = n + 1 +plotpatch[[n]] = list( vnam = "reco" + , desc = "Ecosystem respiration" + , unit = "kgC/m2/yr" + , col.scheme = "muitas" + , plog = TRUE + , emean = TRUE + , mmean = TRUE + , ymean = TRUE + )#end list +#------------------------------------------------------------------------------------------# + + + + +#------------------------------------------------------------------------------------------# +# List for variables to be compared by year. # +#------------------------------------------------------------------------------------------# +n = 0 +yc.tvar = list() +n = n + 1 +yc.tvar[[n]] = list( vnam = "rshort" + , desc = "Incident SW" + , unit = "W/m2" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "fast.soil.c" + , desc = "Fast soil carbon" + , unit = "kgC/m2" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "struct.soil.c" + , desc = "Structural soil carbon" + , unit = "kgC/m2" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "nep" + , desc = "Net Ecosystem Production" + , unit = "kgC/m2" + , plt = TRUE + , cumul = TRUE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "nee" + , desc = "Net Ecosystem Exchange" + , unit = "umol/m2" + , plt = TRUE + , cumul = TRUE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "mco" + , desc = "Maintenance Costs" + , unit = "kgC/m2/yr" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "npp" + , desc = "Net primary productivity" + , unit = "kgC/m2/yr" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "cba" + , desc = "Carbon balance" + , unit = "kgC/m2" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "ldrop" + , desc = "Leaf drop" + , unit = "kgC/m2/yr" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "cflxca" + , desc = "Carbon flux" + , unit = "umol/m2/s" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "cflxst" + , desc = "Carbon storage" + , unit = "umol/m2/s" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "evap" + , desc = "Evaporation" + , unit = "kg/m2/day" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "transp" + , desc = "Transpiration" + , unit = "kg/m2/day" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "ustar" + , desc = "Friction velocity" + , unit = "m/s" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "hflxca" + , desc = "Sensible heat flux" + , unit = "W/m2" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "wflxca" + , desc = "Water vapour flux" + , unit = "kg/m2/day" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "fs.open" + , desc = "Water Stress index" + , unit = "--" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "gpp" + , desc = "Gross Primary Productivity" + , unit = "kgC/m2/yr" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "reco" + , desc = "Ecosystem respiration" + , unit = "kgC/m2/yr" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "rshortup" + , desc = "Upward SW radiation" + , unit = "W/m2" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "parup" + , desc = "Upward PAR" + , unit = "umol/m2/s" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "rnet" + , desc = "Net radiation at the top of the canopy" + , unit = "W/m2" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "rlong" + , desc = "Incoming longwave radiation" + , unit = "W/m2" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "rlongup" + , desc = "Outgoing longwave radiation" + , unit = "W/m2" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "cbamax" + , desc = "Maximum carbon balance" + , unit = "kgC/m2" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "cbarel" + , desc = "Relative carbon balance" + , unit = "--" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "f.gpp" + , desc = "Gross Primary Productivity" + , unit = "%biomass/yr" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "f.npp" + , desc = "Net Primary Productivity" + , unit = "%biomass/yr" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "f.cba" + , desc = "Carbon balance" + , unit = "%biomass/yr" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "f.bstorage" + , desc = "Relative storage biomass" + , unit = "gC_stor/kgC_bio" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "f.bseeds" + , desc = "Relative seed biomass" + , unit = "gC_seed/kgC_bio" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "f.bleaf" + , desc = "Relative leaf biomass" + , unit = "gC_leaf/kgC_bio" + , plt = TRUE + , cumul = FALSE + )#end list +n = n + 1 +yc.tvar[[n]] = list( vnam = "agb" + , desc = "Above-ground biomass" + , unit = "kgC/m2" + , plt = TRUE + , cumul = FALSE + )#end list +#------------------------------------------------------------------------------------------# + + + + +#----- XYZ plots, to explore the parameter space. -----------------------------------------# +yc.xyzvar = list() +yc.xyzvar$zvar = list( list ( vname = "gpp" + , desc = "Gross Primary Productivity" + , key = "GPP" + , unit = "kgC/m2/yr" + )#end list + , list ( vname = "reco" + , desc = "Ecosystem respiration" + , key = "RE" + , unit = "kgC/m2/yr" + )#end list + , list ( vname = "plant.resp" + , desc = "Plant respiration" + , key = "PR" + , unit = "kgC/m2/yr" + )#end list + , list ( vname = "het.resp" + , desc = "Heterotrophic respiration" + , key = "RH" + , unit = "kgC/m2/yr" + )#end list + , list ( vname = "nep" + , desc = "Net Ecosystem Productivity" + , key = "NEP" + , unit = "kgC/m2/yr" + )#end list + , list ( vname = "cba" + , desc = "Carbon balance" + , key = "CBA" + , unit = "kgC/m2/yr" + )#end list + )#end list +yc.xyzvar$xvar = list( list ( vname = "rain" + , desc = "Rainfall" + , unit = "mm/month" + , leg = "right" + )#end list + , list ( vname = "demand" + , desc = "Water demand" + , unit = "kg/m2/day" + , leg = "left" + )#end list + , list ( vname = "fs.open" + , desc = "Soil water stress" + , unit = "--" + , leg = "left" + )#end list + )#end list +yc.xyzvar$yvar = list( list ( vname = "rshort" + , desc = "Shortwave radiation" + , unit = "W/m2" + , leg = "top" + )#end list + , list ( vname = "leaf.temp" + , desc = "Leaf temperature" + , unit = "degC" + , leg = "top" + )#end list + )#end list +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Define the number of plots of each kind, and make the lists global. # +#------------------------------------------------------------------------------------------# +tspftdbh <<- tspftdbh +tserdist <<- TRUE # Time series of disturbance rates +tslu <<- tslu +squeeze <<- squeeze +theme <<- theme +compmodel <<- compmodel +soilplot <<- soilplot +plotpatch <<- plotpatch +yc.tvar <<- yc.tvar +yc.xyzvar <<- yc.xyzvar +ntspftdbh <<- length(tspftdbh ) +ntslu <<- length(tslu ) +nsqueeze <<- length(squeeze ) +ntheme <<- length(theme ) +ncompmodel <<- length(compmodel ) +nsoilplot <<- length(soilplot ) +nplotpatch <<- length(plotpatch ) +nyc.tvar <<- length(yc.tvar ) +nyc.xvar <<- length(yc.xyzvar$xvar) +nyc.yvar <<- length(yc.xyzvar$yvar) +nyc.zvar <<- length(yc.xyzvar$zvar) +#------------------------------------------------------------------------------------------# diff --git a/R-utils/pretty.box.r b/R-utils/pretty.box.r new file mode 100644 index 000000000..b58919338 --- /dev/null +++ b/R-utils/pretty.box.r @@ -0,0 +1,119 @@ +#------------------------------------------------------------------------------------------# +# This function splits the number into number of rows and columns that will make the # +# prettiest (prettiest here means the closest to a golden ratio rectangle). # +#------------------------------------------------------------------------------------------# +pretty.box = function(n,horizontal=TRUE,angle.crit=atan2((1.+sqrt(5))/2.,1)*180./pi){ + + + #---------------------------------------------------------------------------------------# + # Check the size of n. If it has a single value, then we must find the number of # + # rows and columns. If it has lenght 2, then the first value becomes the number of # + # columns and the second becomes the number of rows. # + #---------------------------------------------------------------------------------------# + n.n = length(n) + if (n.n == 0){ + #------------------------------------------------------------------------------------# + # Empty! Make a single box. # + #------------------------------------------------------------------------------------# + nbrow = 1 + nbcol = 1 + nbox = 1 + mat = matrix(1,ncol=1,nrow=1) + xangle = 45 + yangle = 45 + #------------------------------------------------------------------------------------# + + }else if (n.n == 1){ + #------------------------------------------------------------------------------------# + # Single site. We must test whether we can split in nows and columns that # + # looks nice by the closest to square root. If the number is prime, we must add one # + # so it can be split. We keep adding empty boxes until we get a number that has a # + # good ratio. # + #------------------------------------------------------------------------------------# + iterate = TRUE + n = max(n,1) + nbox = n + while (iterate){ + + nbrow.pot = seq(from=1,to=floor(nbox),by = 1) + nbcol.pot = nbox / nbrow.pot + + #----- Select only the cases that make a 2-D grid with the right orientation. ----# + if (horizontal){ + ok = nbcol.pot == as.integer(nbcol.pot) & nbcol.pot >= nbrow.pot + }else{ + ok = nbcol.pot == as.integer(nbcol.pot) & nbcol.pot <= nbrow.pot + }#end if + #---------------------------------------------------------------------------------# + + + #----- Discard bad options. ------------------------------------------------------# + nbrow.pot = nbrow.pot[ok] + nbcol.pot = as.integer(nbcol.pot[ok]) + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # Choose the one that is the closest to the square. # + #---------------------------------------------------------------------------------# + nuse = which.min(abs(nbrow.pot-nbcol.pot)) + nbrow = nbrow.pot[nuse] + nbcol = nbcol.pot[nuse] + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # Make a matrix for the layout. # + #---------------------------------------------------------------------------------# + mat = matrix(sequence(nbrow*nbcol),ncol=nbcol,nrow=nbrow,byrow=TRUE) + mat[mat > n] = 0 + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # Check whether the angle is acceptable... # + #---------------------------------------------------------------------------------# + xangle = atan2(nbrow,nbcol) * 180. / pi + yangle = atan2(nbcol,nbrow) * 180. / pi + iterate = nbox > 2 && (xangle > angle.crit | yangle > angle.crit) + if (iterate) nbox = nbox + 1 + }#end while + #------------------------------------------------------------------------------------# + + }else if (n.n == 2){ + #------------------------------------------------------------------------------------# + # Two values were given. No iteration needed. # + #------------------------------------------------------------------------------------# + nbcol = max(n[1],1) + nbrow = max(n[2],1) + nbox = nbcol*nbrow + mat = matrix(sequence(nbrow*nbcol),ncol=nbcol,nrow=nbrow,byrow=TRUE) + xangle = atan2(nbrow,nbcol) * 180. / pi + yangle = atan2(nbcol,nbrow) * 180. / pi + #------------------------------------------------------------------------------------# + + }else{ + #------------------------------------------------------------------------------------# + # 3-D boxes are not available... # + #------------------------------------------------------------------------------------# + cat (" n = (",paste(n,sep="; "),")","\n") + cat (" length of n = ",length(n) ,"\n") + stop(" Invalid n! It must have length between 0 and 2") + #------------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # Return a list with the information. # + #---------------------------------------------------------------------------------------# + if (horizontal){ + ans = list(nrow=nbrow,ncol=nbcol,nbox=nbox,angle=yangle,mat=mat) + }else{ + ans = list(nrow=nbrow,ncol=nbcol,nbox=nbox,angle=xangle,mat=mat) + }#end if + return(ans) +}#end function +#------------------------------------------------------------------------------------------# diff --git a/R-utils/pretty.log.r b/R-utils/pretty.log.r new file mode 100644 index 000000000..ff7ba7597 --- /dev/null +++ b/R-utils/pretty.log.r @@ -0,0 +1,18 @@ +#==========================================================================================# +#==========================================================================================# +# Function that creates a pretty scale in log co-ordinates. # +#------------------------------------------------------------------------------------------# +pretty.log = function(x,base=10,n=10){ + vlevels = pretty(x=log(x,base=base),n=n) + nact = length(vlevels) + vlevels = base^vlevels + + power.base = base^(floor(log(x=vlevels,base=base))) + npow = length(unique(power.base)) + ndigits = ceiling(log(nact/npow,base=base)) + vlevels = round(vlevels / power.base,digits=ndigits) * power.base + return(vlevels) +}#end function +#==========================================================================================# +#==========================================================================================# + diff --git a/R-utils/pretty.sqrt.r b/R-utils/pretty.sqrt.r new file mode 100644 index 000000000..50e0114f5 --- /dev/null +++ b/R-utils/pretty.sqrt.r @@ -0,0 +1,21 @@ +#==========================================================================================# +#==========================================================================================# +# Function that creates a pretty scale in square root. # +#------------------------------------------------------------------------------------------# +pretty.sqrt = function(x,n=10){ + vlevels = pretty(x=sign(x)*sqrt(abs(x)),n=n) + nact = length(vlevels) + vlevels = abs(vlevels)*vlevels + + power.base = 10^(floor(log10(x=abs(vlevels)))) + npow = length(unique(power.base)) + ndigits = ceiling(log10(nact/npow)) + vlevels = ifelse( vlevels==0 + , 0. + , round(vlevels / power.base,digits=ndigits) * power.base + )#end ifelse + return(vlevels) +}#end function +#==========================================================================================# +#==========================================================================================# + diff --git a/R-utils/pretty.time.r b/R-utils/pretty.time.r new file mode 100644 index 000000000..533e46f52 --- /dev/null +++ b/R-utils/pretty.time.r @@ -0,0 +1,310 @@ +#==========================================================================================# +#==========================================================================================# +# This function creates a pretty time scale. It is loosely based on pretty, but here # +# we make extensive use of the chron functions, and define the suitable scales in a # +# different way as time has a non-decimal scale. # +# The result is a list containing the levels, and nice labels for the plots. # +#------------------------------------------------------------------------------------------# +pretty.time = function(when,n=10,...){ + + #----- Find the 1st and last time. -----------------------------------------------------# + whena = min(when,na.rm=TRUE) + whenz = max(when,na.rm=TRUE) + + #----- Table for accepted bases for months, hours, minutes, and seconds. ---------------# + base.months = c(1,2,3,4,6) + base.days = c(1,2,4,7,15) + base.hours = c(1,2,3,4,6,12) + base.minsec = c(1,2,5,10,15,20,30) + + #----- Convert time to seconds. --------------------------------------------------------# + when.sec = as.numeric(when) * day.sec + + #---------------------------------------------------------------------------------------# + # Find a first guess of the step size, so we decide whether to use years, months, # + # days, hours, minutes, or seconds. # + #---------------------------------------------------------------------------------------# + wstep.1st = mean(diff(pretty(when.sec,n))) + + if (wstep.1st == 0){ + myunit=NA + #---- Whatever, use just what comes out from the regular pretty. --------------------# + vlevels = chron(pretty(when,n)) + vlabels = as.character(vlevels) + padj = rep(0,times=length(vlabels)) + }else if(wstep.1st / yr.sec > 0.8){ + myunit="years" + #------------------------------------------------------------------------------------# + # Years are the best scale for the plots. # + #------------------------------------------------------------------------------------# + yrrange = numyears(when) + vlevels = pretty(yrrange,n) + vlevels = dates(x=paste(1,1,vlevels,sep="/")) + + vlabels = paste(months(vlevels),years(vlevels),sep="-") + padj = rep(0,times=length(vlabels)) + }else if(wstep.1st / (30. * day.sec) > 0.8){ + myunit="months" + #------------------------------------------------------------------------------------# + # Months are the best scale for the plots. # + #------------------------------------------------------------------------------------# + #----- Find the time step that is the closest to the base. --------------------------# + wstep = wstep.1st / (30. * day.sec) + whichbase = base.months[which.min(abs(wstep-base.months))] + + #----- Find the list of years to plot. ----------------------------------------------# + allyears = numyears(when) + yeara = min(allyears,na.rm=TRUE) + yearz = max(allyears,na.rm=TRUE)+1 + vlevels = seq.dates(from = paste(1,1,yeara,sep="/") + ,to = paste(1,1,yearz,sep="/") + ,by = "months") + mon1st = nummonths(vlevels) + monlevs = seq(from=1,to=12,by=whichbase) + + #----- Find the limits that will keep the labels not too far from the data. ---------# + wlaba = dates(paste(nummonths(whena),1,numyears(whena),sep="/")) + monz = nummonths(whenz) %% 12 + 1 + yearz = numyears(whenz) + as.integer(monz == 1) + wlabz = dates(paste(monz,1,yearz,sep="/")) + sel = ( mon1st %in% monlevs + & vlevels >= min(wlaba,na.rm=TRUE) + & vlevels <= max(wlabz,na.rm=TRUE) ) + vlevels = dates(vlevels[sel],out.format="m/d/year") + vlabels = paste(months(vlevels),years(vlevels),sep="-") + padj = rep(0,times=length(vlabels)) + + }else if(wstep.1st / day.sec > 0.8){ + myunit="days" + #------------------------------------------------------------------------------------# + # Days are the best scale for the plots, but we keep them tethered to months, # + # even if the grid becomes slightly irregular. # + #------------------------------------------------------------------------------------# + #----- Find the time step that is the closest to the base. --------------------------# + wstep = wstep.1st / day.sec + whichbase = base.days[which.min(abs(wstep-base.days))] + #----- Find the list of years to plot. ----------------------------------------------# + allyears = numyears(when) + yeara = min(allyears,na.rm=TRUE) + yearz = max(allyears,na.rm=TRUE)+1 + #------------------------------------------------------------------------------------# + # Impose the list of months to be from January to December, we will trim the # + # numbers later. # + #------------------------------------------------------------------------------------# + montha = 1 + monthz = 12 + #------------------------------------------------------------------------------------# + # Impose the list of months to be from January to December, we will trim the # + # numbers later. # + #------------------------------------------------------------------------------------# + daylevs=seq(from=1,to=31-whichbase+1,by=whichbase) + #----- First guess for the levels. --------------------------------------------------# + vlevels = seq.dates(from = paste(1,1,yeara,sep="/") + ,to = paste(1,1,yearz,sep="/") + ,by = "days") + day1st = numdays(vlevels) + + #----- Find the limits that will keep the labels not too far from the data. ---------# + wlaba = dates(whena) + dayz = numdays(whenz) %% daymax(nummonths(whenz),numyears(whenz)) + 1 + monz = 1 + (nummonths(whenz) - 1 + as.integer(dayz==1)) %% 12 + yearz = numyears(whenz) + as.integer(monz == 1) + wlabz = dates(paste(monz,dayz,yearz,sep="/")) + sel = ( day1st %in% daylevs + & vlevels >= min(wlaba,na.rm=TRUE) + & vlevels <= max(wlabz,na.rm=TRUE) ) + vlevels = dates(vlevels[sel],out.format="m/d/y") + vlabels = paste(months(vlevels),days(vlevels),sep="/") + + padj = rep(0,times=length(vlabels)) + + #----- First day of the year. -------------------------------------------------------# + sel = numdays(vlevels) == 1 & nummonths(vlevels) == 1 + vlabels[sel] = paste(months(vlevels[sel]),"/",days(vlevels[sel]),"\n" + ,years(vlevels[sel]),sep="") + padj [sel] = 0.5 + #------------------------------------------------------------------------------------# + + + #----- First label. Always include year in it. -------------------------------------# + vlabels[1] = paste(months(vlevels[1]),"/",days(vlevels[1]),"\n",years(vlevels[1]) + ,sep="") + padj [1] = 0.5 + #------------------------------------------------------------------------------------# + + }else if(wstep.1st / hr.sec > 0.8){ + myunit="hours" + #------------------------------------------------------------------------------------# + # Hours are the best scale for the plots. # + #------------------------------------------------------------------------------------# + #----- Find the time step that is the closest to the base. --------------------------# + wstep = wstep.1st / hr.sec + whichbase = base.hours[which.min(abs(wstep-base.hours))] + #----- Find the list of days to plot. -----------------------------------------------# + when1st = dates(min(when ,na.rm=TRUE)) + whenlast = dates(max(when+1,na.rm=TRUE)) + mydates = seq.dates(from=when1st,to=whenlast,by="days") + mytimes = times(seq(from=0,to=day.sec-1,by=whichbase*hr.sec)) / day.sec + ndates = length(mydates) + ntimes = length(mytimes) + #----- First guess for the levels. --------------------------------------------------# + vlevels = chron(dates=rep(x=mydates,each=ntimes),times=rep(x=mytimes,times=ndates)) + wlaba = chron(dates=paste(nummonths(whena),numdays(whena),numyears(whena),sep="/"), + times=paste(hours(whena),0,0,sep=":")) + hourz = (hours(whenz) + 1) %% 24 + d2831 = daymax(nummonths(whenz),numyears(whenz)) + dayz = (numdays(whenz) - 1 + as.integer(hourz == 0)) %% d2831 + 1 + monz = (nummonths(whenz) - 1 + as.integer(dayz == 1)) %% 12 + 1 + yearz = numyears(whenz) + as.integer(monz == 1) + wlabz = chron(dates=paste(monz,dayz,yearz,sep="/"),times=paste(hourz,0,0,sep=":")) + sel = ( vlevels >= min(wlaba,na.rm=TRUE) + & vlevels <= max(wlabz,na.rm=TRUE) ) + + #------------------------------------------------------------------------------------# + # Make the labels, and put day and month information only on the first time of # + # the day, and all information in the second time, and the first time of the year. # + #------------------------------------------------------------------------------------# + vlabels = paste(substring(100+hours(vlevels),2,3) + ,substring(100+minutes(vlevels),2,3),sep=":") + padj = rep(0,times=length(vlabels)) + #----- First time of the day. -------------------------------------------------------# + sel = hours(vlevels) == 0 + vlabels[sel] = paste(substring(100+hours(vlevels[sel]),2,3),":" + ,substring(100+minutes(vlevels[sel]),2,3),"\n" + ,months(vlevels[sel]),"-",days(vlevels[sel]),sep="") + padj[sel] = 0.5 + #----- First time or first time of the year. ----------------------------------------# + sel = ( vlevels == vlevels[1] + | ( nummonths(vlevels) == 1 & numdays(vlevels) == 1 + & hours(vlevels) == 0 )) + vlabels[sel] = paste(substring(100+hours(vlevels[sel]),2,3),":" + ,substring(100+minutes(vlevels[sel]),2,3),"\n" + ,months(vlevels[sel]),"-",days(vlevels[sel]),"\n" + ,years(vlevels[sel]),sep="") + padj[sel] = 0.5 + #------------------------------------------------------------------------------------# + + + }else if(wstep.1st / min.sec > 0.8){ + myunit="minutes" + #------------------------------------------------------------------------------------# + # Minutes are the best scale for the plots. # + #------------------------------------------------------------------------------------# + #----- Find the time step that is the closest to the base. --------------------------# + wstep = wstep.1st / min.sec + whichbase = base.minsec[which.min(abs(wstep-base.minsec))] + #----- Find the list of days to plot. -----------------------------------------------# + when1st = dates(min(when ,na.rm=TRUE)) + whenlast = dates(max(when+1,na.rm=TRUE)) + mydates = seq.dates(from=when1st,to=whenlast,by="days") + mytimes = times(seq(from=0,to=day.sec-1,by=whichbase*min.sec)) / day.sec + ndates = length(mydates) + ntimes = length(mytimes) + #----- First guess for the levels. --------------------------------------------------# + vlevels = chron(dates=rep(x=mydates,each=ntimes),times=rep(x=mytimes,times=ndates)) + + wlaba = chron(dates=paste(nummonths(whena),numdays(whena),numyears(whena),sep="/"), + times=paste(hours(whena),minutes(whena),0,sep=":")) + minz = (minutes(whenz) + 1) %% 60 + hourz = (hours(whenz) + as.integer(minz == 0)) %% 24 + d2831 = daymax(nummonths(whenz),numyears(whenz)) + dayz = (numdays(whenz) - 1 + as.integer(hourz == 0)) %% d2831 + 1 + monz = (nummonths(whenz) - 1 + as.integer(dayz == 1)) %% 12 + 1 + yearz = numyears(whenz) + as.integer(monz == 1) + wlabz = chron(dates=paste(monz,dayz,yearz,sep="/") + ,times=paste(hourz,minz,0,sep=":")) + sel = ( vlevels >= min(wlaba,na.rm=TRUE) + & vlevels <= max(wlabz,na.rm=TRUE) ) + + #------------------------------------------------------------------------------------# + # Make the labels, and put day and month information only on the first time of # + # the day, and all information in the second time, and the first time of the year. # + #------------------------------------------------------------------------------------# + vlabels = paste(substring(100+hours(vlevels),2,3) + ,substring(100+minutes(vlevels),2,3),sep=":") + padj = rep(0,times=length(vlabels)) + #----- First time of the day. -------------------------------------------------------# + sel = hours(vlevels) == 0 & minutes(vlevels) == 0 + vlabels[sel] = paste(substring(100+hours(vlevels[sel]),2,3),":" + ,substring(100+minutes(vlevels[sel]),2,3),"\n" + ,months(vlevels[sel]),"-",days(vlevels[sel]),sep="") + padj[sel] = 0.5 + #----- First time of the year. ------------------------------------------------------# + sel = ( vlevels == vlevels[1] + | ( nummonths(vlevels) == 1 & numdays(vlevels) == 1 + & hours(vlevels) == 0 & minutes(vlevels) == 0)) + vlabels[sel] = paste(substring(100+hours(vlevels[sel]),2,3),":" + ,substring(100+minutes(vlevels[sel]),2,3),"\n" + ,months(vlevels[sel]),"-",days(vlevels[sel]),"\n" + ,years(vlevels[sel]),sep="") + padj[sel] = 0.5 + #------------------------------------------------------------------------------------# + + + + }else{ + myunit="seconds" + #------------------------------------------------------------------------------------# + # Minutes are the best scale for the plots. # + #------------------------------------------------------------------------------------# + #----- Find the time step that is the closest to the base. --------------------------# + wstep = wstep.1st + whichbase = base.minsec[which.min(abs(wstep-base.minsec))] + #----- Find the list of days to plot. -----------------------------------------------# + when1st = dates(min(when ,na.rm=TRUE)) + whenlast = dates(max(when+1,na.rm=TRUE)) + mydates = seq.dates(from=when1st,to=whenlast,by="days") + mytimes = times(seq(from=0,to=day.sec-1,by=whichbase)) / day.sec + ndates = length(mydates) + ntimes = length(mytimes) + #----- First guess for the levels. --------------------------------------------------# + vlevels = chron(dates=rep(x=mydates,each=ntimes),times=rep(x=mytimes,times=ndates)) + + wlaba = chron(dates=paste(nummonths(whena),numdays(whena),numyears(whena),sep="/"), + times=paste(hours(whena),minutes(whena),seconds(whena),sep=":")) + secz = (seconds(whenz) + 1) %% 60 + minz = (minutes(whenz) + as.integer(secz == 0)) %% 60 + hourz = (hours(whenz) + as.integer(minz == 0)) %% 24 + d2831 = daymax(nummonths(whenz),numyears(whenz)) + dayz = (numdays(whenz) - 1 + as.integer(hourz == 0)) %% d2831 + 1 + monz = (nummonths(whenz) - 1 + as.integer(dayz == 1)) %% 12 + 1 + yearz = numyears(whenz) + as.integer(monz == 1) + wlabz = chron(dates=paste(monz,dayz,yearz,sep="/") + ,times=paste(hourz,minz,secz,sep=":")) + sel = ( vlevels >= min(wlaba,na.rm=TRUE) + & vlevels <= max(wlabz,na.rm=TRUE) ) + + #------------------------------------------------------------------------------------# + # Make the labels, and put day and month information only on the first time of # + # the day, and all information in the second time, and the first time of the year. # + #------------------------------------------------------------------------------------# + vlabels = paste(substring(100+hours(vlevels),2,3) + ,substring(100+minutes(vlevels),2,3) + ,substring(100+seconds(vlevels),2,3),sep=":") + padj = rep(0,times=length(vlabels)) + #----- First time of the day. -------------------------------------------------------# + sel = hours(vlevels) == 0 & minutes(vlevels) == 0 & seconds(vlevels) == 0 + vlabels[sel] = paste(substring(100+hours(vlevels[sel]),2,3),":" + ,substring(100+minutes(vlevels[sel]),2,3),":" + ,substring(100+seconds(vlevels[sel]),2,3),"\n" + ,months(vlevels[sel]),"-",days(vlevels[sel]),sep="") + padj[sel] = 0.5 + #----- First time of the year. ------------------------------------------------------# + sel = ( vlevels == vlevels[1] + | ( nummonths(vlevels) == 1 & numdays(vlevels) == 1 + & hours(vlevels) == 0 & minutes(vlevels) == 0 + & seconds(vlevels) == 0)) + vlabels[sel] = paste(substring(100+hours(vlevels[sel]),2,3),":" + ,substring(100+minutes(vlevels[sel]),2,3),":" + ,substring(100+seconds(vlevels[sel]),2,3),"\n" + ,months(vlevels[sel]),"-",days(vlevels[sel]),"\n" + ,years(vlevels[sel]),sep="") + padj[sel] = 0.5 + #------------------------------------------------------------------------------------# + }#end if + + vresult=list(levels=vlevels,labels=vlabels,n=length(vlevels),scale=myunit,padj=padj) + return(vresult) +}#end function + + diff --git a/R-utils/pretty.xylim.r b/R-utils/pretty.xylim.r new file mode 100644 index 000000000..79e4a534f --- /dev/null +++ b/R-utils/pretty.xylim.r @@ -0,0 +1,55 @@ +#==========================================================================================# +#==========================================================================================# +# This function creates a expanded range for a variable, expanding the limits by a # +# certain factor so it fits a legend. # +#------------------------------------------------------------------------------------------# +pretty.xylim <<- function(u,fracexp=0.40,is.log=FALSE){ + + #----- Set lnudge, which is used to create limits when variable "u" is constant. -------# + if (fracexp != 0.0){ + lnudge = 0.5 * abs(fracexp) + }else{ + lnudge = 0.20 + }#end if + #---------------------------------------------------------------------------------------# + + + #----- Save the original warning, so it won't issue warnings during the selection. -----# + warn.orig = getOption("warn") + options(warn=-1) + #---------------------------------------------------------------------------------------# + + + #----- Select the data that we consider for the range. ---------------------------------# + vec.u = c(u) + if (is.log) vec.u[! is.finite(vec.u) | vec.u <= 0] = NA + ulimit = range(vec.u,finite=TRUE) + #---------------------------------------------------------------------------------------# + + + #----- Revert the warning option back to the original. ---------------------------------# + options(warn=warn.orig) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Expand the axis. # + #---------------------------------------------------------------------------------------# + if (is.log) ulimit = log(ulimit) + if (any(! is.finite(ulimit)) || (ulimit[1] == ulimit[2] && ulimit[1] == 0)){ + ulimit = c(-1,1) + }else if (ulimit[1] == ulimit[2] ){ + ulimit[1] = ulimit[1] * ( 1. - sign(ulimit[1]) * lnudge) + ulimit[2] = ulimit[2] * ( 1. + sign(ulimit[2]) * lnudge) + }else if(fracexp >= 0){ + ulimit[2] = ulimit[2] + fracexp * diff(ulimit) + }else{ + ulimit[1] = ulimit[1] + fracexp * diff(ulimit) + }#end if + if (is.log) ulimit = exp(ulimit) + #---------------------------------------------------------------------------------------# + + return(ulimit) +}#end pretty.xylim +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/primefac.r b/R-utils/primefac.r new file mode 100644 index 000000000..cbbe16694 --- /dev/null +++ b/R-utils/primefac.r @@ -0,0 +1,41 @@ +#==========================================================================================# +#==========================================================================================# +# Function decompose # +# Developed by Marcos Longo # +# # +# This function decomposes a number in prime factors, and check the power of each one... # +#------------------------------------------------------------------------------------------# +primefac <<- function(n,tol=1.e-6){ + #----- Check whether the number is "integer" --------------------------------------------# + if ((n %% 1) > tol){ + warning("Function decompose works only for integer numbers.",immediate.=TRUE) + }else if (is.prime(n)){ + #----- If the number is prime, skip all steps and return the prime definition... ------# + factors = n + powers = 1 + allnumb = c(1,n) + }else{ + #----- Select prime number candidates. ------------------------------------------------# + factors = primes()[primes() <= n/2] + #----- Determine how many factors are needed ------------------------------------------# + cmax = length(factors) + fmax = floor(logb(n,factors)) + powers = rep(NA,times=cmax) + #----- Find the maximum power which is still a divisor. -------------------------------# + for (cc in 1:cmax) powers[cc] = max(which(n %% factors[cc]^(seq(0,fmax[cc])) < tol))-1 + #----- Eliminate those which maximum power is 0 (non-divisors) ------------------------# + factors = factors[powers > 0] + powers = powers[powers > 0] + allpowers = c(1,n) + for (cc in 1:length(factors)) allpowers = c(allpowers,factors[cc]^seq(1:powers[cc])) + allpowers = sort(unique(allpowers)) + #----- Do the matrix of permutations --------------------------------------------------# + aux = matrixperm(allpowers[allpowers != n]) + candidates = unique(apply(X=aux,MARGIN=1,FUN=prod)) + #----- Select the outcomes that indeed produce a divisor of n -------------------------# + alldiv = sort(candidates[n %% candidates < tol]) + } #end if + result = list(factors=factors,powers=powers,alldiv=alldiv) + return(result) +}#end function primefac +#------------------------------------------------------------------------------------------# diff --git a/R-utils/primes.r b/R-utils/primes.r new file mode 100644 index 000000000..b73bfd5de --- /dev/null +++ b/R-utils/primes.r @@ -0,0 +1,1009 @@ +#-------------------------------------------------------------------------------------------# +# Function primes # +# # +# This function just contain a vector with the first 10,000 primes... # +#-------------------------------------------------------------------------------------------# +primes <- function(){ + firsts <- c( 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, + 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, + 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, + 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, + 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, + 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, + 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, + 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, + 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, + 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, + 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, + 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, + 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, + 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, + 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, + 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, + 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, + 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, + 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, + 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, + 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, + 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, + 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, + 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, + 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, + 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, + 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, + 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, + 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, + 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, + 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, + 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, + 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, + 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, + 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, + 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, + 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, + 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, + 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, + 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, + 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, + 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, + 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, + 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, + 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, + 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, + 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, + 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, + 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, + 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, + 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, + 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, + 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, + 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, + 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, + 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, + 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, + 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, + 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, + 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, + 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, + 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, + 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, + 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, + 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, + 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, + 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, + 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, + 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, + 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, + 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, + 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, + 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, + 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, + 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, + 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, + 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, + 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, + 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, + 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, + 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, + 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, + 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, + 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, + 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, + 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, + 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, + 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, + 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, + 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, + 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, + 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, + 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, + 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, + 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, + 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, + 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, + 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, + 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, + 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, + 7927, 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, + 8039, 8053, 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, + 8117, 8123, 8147, 8161, 8167, 8171, 8179, 8191, 8209, 8219, + 8221, 8231, 8233, 8237, 8243, 8263, 8269, 8273, 8287, 8291, + 8293, 8297, 8311, 8317, 8329, 8353, 8363, 8369, 8377, 8387, + 8389, 8419, 8423, 8429, 8431, 8443, 8447, 8461, 8467, 8501, + 8513, 8521, 8527, 8537, 8539, 8543, 8563, 8573, 8581, 8597, + 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, 8669, 8677, + 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, 8741, + 8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, + 8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, + 8933, 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, + 9013, 9029, 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, + 9127, 9133, 9137, 9151, 9157, 9161, 9173, 9181, 9187, 9199, + 9203, 9209, 9221, 9227, 9239, 9241, 9257, 9277, 9281, 9283, + 9293, 9311, 9319, 9323, 9337, 9341, 9343, 9349, 9371, 9377, + 9391, 9397, 9403, 9413, 9419, 9421, 9431, 9433, 9437, 9439, + 9461, 9463, 9467, 9473, 9479, 9491, 9497, 9511, 9521, 9533, + 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, 9629, 9631, + 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, 9733, + 9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, + 9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, + 9901, 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973, 10007, + 10009, 10037, 10039, 10061, 10067, 10069, 10079, 10091, 10093, 10099, + 10103, 10111, 10133, 10139, 10141, 10151, 10159, 10163, 10169, 10177, + 10181, 10193, 10211, 10223, 10243, 10247, 10253, 10259, 10267, 10271, + 10273, 10289, 10301, 10303, 10313, 10321, 10331, 10333, 10337, 10343, + 10357, 10369, 10391, 10399, 10427, 10429, 10433, 10453, 10457, 10459, + 10463, 10477, 10487, 10499, 10501, 10513, 10529, 10531, 10559, 10567, + 10589, 10597, 10601, 10607, 10613, 10627, 10631, 10639, 10651, 10657, + 10663, 10667, 10687, 10691, 10709, 10711, 10723, 10729, 10733, 10739, + 10753, 10771, 10781, 10789, 10799, 10831, 10837, 10847, 10853, 10859, + 10861, 10867, 10883, 10889, 10891, 10903, 10909, 10937, 10939, 10949, + 10957, 10973, 10979, 10987, 10993, 11003, 11027, 11047, 11057, 11059, + 11069, 11071, 11083, 11087, 11093, 11113, 11117, 11119, 11131, 11149, + 11159, 11161, 11171, 11173, 11177, 11197, 11213, 11239, 11243, 11251, + 11257, 11261, 11273, 11279, 11287, 11299, 11311, 11317, 11321, 11329, + 11351, 11353, 11369, 11383, 11393, 11399, 11411, 11423, 11437, 11443, + 11447, 11467, 11471, 11483, 11489, 11491, 11497, 11503, 11519, 11527, + 11549, 11551, 11579, 11587, 11593, 11597, 11617, 11621, 11633, 11657, + 11677, 11681, 11689, 11699, 11701, 11717, 11719, 11731, 11743, 11777, + 11779, 11783, 11789, 11801, 11807, 11813, 11821, 11827, 11831, 11833, + 11839, 11863, 11867, 11887, 11897, 11903, 11909, 11923, 11927, 11933, + 11939, 11941, 11953, 11959, 11969, 11971, 11981, 11987, 12007, 12011, + 12037, 12041, 12043, 12049, 12071, 12073, 12097, 12101, 12107, 12109, + 12113, 12119, 12143, 12149, 12157, 12161, 12163, 12197, 12203, 12211, + 12227, 12239, 12241, 12251, 12253, 12263, 12269, 12277, 12281, 12289, + 12301, 12323, 12329, 12343, 12347, 12373, 12377, 12379, 12391, 12401, + 12409, 12413, 12421, 12433, 12437, 12451, 12457, 12473, 12479, 12487, + 12491, 12497, 12503, 12511, 12517, 12527, 12539, 12541, 12547, 12553, + 12569, 12577, 12583, 12589, 12601, 12611, 12613, 12619, 12637, 12641, + 12647, 12653, 12659, 12671, 12689, 12697, 12703, 12713, 12721, 12739, + 12743, 12757, 12763, 12781, 12791, 12799, 12809, 12821, 12823, 12829, + 12841, 12853, 12889, 12893, 12899, 12907, 12911, 12917, 12919, 12923, + 12941, 12953, 12959, 12967, 12973, 12979, 12983, 13001, 13003, 13007, + 13009, 13033, 13037, 13043, 13049, 13063, 13093, 13099, 13103, 13109, + 13121, 13127, 13147, 13151, 13159, 13163, 13171, 13177, 13183, 13187, + 13217, 13219, 13229, 13241, 13249, 13259, 13267, 13291, 13297, 13309, + 13313, 13327, 13331, 13337, 13339, 13367, 13381, 13397, 13399, 13411, + 13417, 13421, 13441, 13451, 13457, 13463, 13469, 13477, 13487, 13499, + 13513, 13523, 13537, 13553, 13567, 13577, 13591, 13597, 13613, 13619, + 13627, 13633, 13649, 13669, 13679, 13681, 13687, 13691, 13693, 13697, + 13709, 13711, 13721, 13723, 13729, 13751, 13757, 13759, 13763, 13781, + 13789, 13799, 13807, 13829, 13831, 13841, 13859, 13873, 13877, 13879, + 13883, 13901, 13903, 13907, 13913, 13921, 13931, 13933, 13963, 13967, + 13997, 13999, 14009, 14011, 14029, 14033, 14051, 14057, 14071, 14081, + 14083, 14087, 14107, 14143, 14149, 14153, 14159, 14173, 14177, 14197, + 14207, 14221, 14243, 14249, 14251, 14281, 14293, 14303, 14321, 14323, + 14327, 14341, 14347, 14369, 14387, 14389, 14401, 14407, 14411, 14419, + 14423, 14431, 14437, 14447, 14449, 14461, 14479, 14489, 14503, 14519, + 14533, 14537, 14543, 14549, 14551, 14557, 14561, 14563, 14591, 14593, + 14621, 14627, 14629, 14633, 14639, 14653, 14657, 14669, 14683, 14699, + 14713, 14717, 14723, 14731, 14737, 14741, 14747, 14753, 14759, 14767, + 14771, 14779, 14783, 14797, 14813, 14821, 14827, 14831, 14843, 14851, + 14867, 14869, 14879, 14887, 14891, 14897, 14923, 14929, 14939, 14947, + 14951, 14957, 14969, 14983, 15013, 15017, 15031, 15053, 15061, 15073, + 15077, 15083, 15091, 15101, 15107, 15121, 15131, 15137, 15139, 15149, + 15161, 15173, 15187, 15193, 15199, 15217, 15227, 15233, 15241, 15259, + 15263, 15269, 15271, 15277, 15287, 15289, 15299, 15307, 15313, 15319, + 15329, 15331, 15349, 15359, 15361, 15373, 15377, 15383, 15391, 15401, + 15413, 15427, 15439, 15443, 15451, 15461, 15467, 15473, 15493, 15497, + 15511, 15527, 15541, 15551, 15559, 15569, 15581, 15583, 15601, 15607, + 15619, 15629, 15641, 15643, 15647, 15649, 15661, 15667, 15671, 15679, + 15683, 15727, 15731, 15733, 15737, 15739, 15749, 15761, 15767, 15773, + 15787, 15791, 15797, 15803, 15809, 15817, 15823, 15859, 15877, 15881, + 15887, 15889, 15901, 15907, 15913, 15919, 15923, 15937, 15959, 15971, + 15973, 15991, 16001, 16007, 16033, 16057, 16061, 16063, 16067, 16069, + 16073, 16087, 16091, 16097, 16103, 16111, 16127, 16139, 16141, 16183, + 16187, 16189, 16193, 16217, 16223, 16229, 16231, 16249, 16253, 16267, + 16273, 16301, 16319, 16333, 16339, 16349, 16361, 16363, 16369, 16381, + 16411, 16417, 16421, 16427, 16433, 16447, 16451, 16453, 16477, 16481, + 16487, 16493, 16519, 16529, 16547, 16553, 16561, 16567, 16573, 16603, + 16607, 16619, 16631, 16633, 16649, 16651, 16657, 16661, 16673, 16691, + 16693, 16699, 16703, 16729, 16741, 16747, 16759, 16763, 16787, 16811, + 16823, 16829, 16831, 16843, 16871, 16879, 16883, 16889, 16901, 16903, + 16921, 16927, 16931, 16937, 16943, 16963, 16979, 16981, 16987, 16993, + 17011, 17021, 17027, 17029, 17033, 17041, 17047, 17053, 17077, 17093, + 17099, 17107, 17117, 17123, 17137, 17159, 17167, 17183, 17189, 17191, + 17203, 17207, 17209, 17231, 17239, 17257, 17291, 17293, 17299, 17317, + 17321, 17327, 17333, 17341, 17351, 17359, 17377, 17383, 17387, 17389, + 17393, 17401, 17417, 17419, 17431, 17443, 17449, 17467, 17471, 17477, + 17483, 17489, 17491, 17497, 17509, 17519, 17539, 17551, 17569, 17573, + 17579, 17581, 17597, 17599, 17609, 17623, 17627, 17657, 17659, 17669, + 17681, 17683, 17707, 17713, 17729, 17737, 17747, 17749, 17761, 17783, + 17789, 17791, 17807, 17827, 17837, 17839, 17851, 17863, 17881, 17891, + 17903, 17909, 17911, 17921, 17923, 17929, 17939, 17957, 17959, 17971, + 17977, 17981, 17987, 17989, 18013, 18041, 18043, 18047, 18049, 18059, + 18061, 18077, 18089, 18097, 18119, 18121, 18127, 18131, 18133, 18143, + 18149, 18169, 18181, 18191, 18199, 18211, 18217, 18223, 18229, 18233, + 18251, 18253, 18257, 18269, 18287, 18289, 18301, 18307, 18311, 18313, + 18329, 18341, 18353, 18367, 18371, 18379, 18397, 18401, 18413, 18427, + 18433, 18439, 18443, 18451, 18457, 18461, 18481, 18493, 18503, 18517, + 18521, 18523, 18539, 18541, 18553, 18583, 18587, 18593, 18617, 18637, + 18661, 18671, 18679, 18691, 18701, 18713, 18719, 18731, 18743, 18749, + 18757, 18773, 18787, 18793, 18797, 18803, 18839, 18859, 18869, 18899, + 18911, 18913, 18917, 18919, 18947, 18959, 18973, 18979, 19001, 19009, + 19013, 19031, 19037, 19051, 19069, 19073, 19079, 19081, 19087, 19121, + 19139, 19141, 19157, 19163, 19181, 19183, 19207, 19211, 19213, 19219, + 19231, 19237, 19249, 19259, 19267, 19273, 19289, 19301, 19309, 19319, + 19333, 19373, 19379, 19381, 19387, 19391, 19403, 19417, 19421, 19423, + 19427, 19429, 19433, 19441, 19447, 19457, 19463, 19469, 19471, 19477, + 19483, 19489, 19501, 19507, 19531, 19541, 19543, 19553, 19559, 19571, + 19577, 19583, 19597, 19603, 19609, 19661, 19681, 19687, 19697, 19699, + 19709, 19717, 19727, 19739, 19751, 19753, 19759, 19763, 19777, 19793, + 19801, 19813, 19819, 19841, 19843, 19853, 19861, 19867, 19889, 19891, + 19913, 19919, 19927, 19937, 19949, 19961, 19963, 19973, 19979, 19991, + 19993, 19997, 20011, 20021, 20023, 20029, 20047, 20051, 20063, 20071, + 20089, 20101, 20107, 20113, 20117, 20123, 20129, 20143, 20147, 20149, + 20161, 20173, 20177, 20183, 20201, 20219, 20231, 20233, 20249, 20261, + 20269, 20287, 20297, 20323, 20327, 20333, 20341, 20347, 20353, 20357, + 20359, 20369, 20389, 20393, 20399, 20407, 20411, 20431, 20441, 20443, + 20477, 20479, 20483, 20507, 20509, 20521, 20533, 20543, 20549, 20551, + 20563, 20593, 20599, 20611, 20627, 20639, 20641, 20663, 20681, 20693, + 20707, 20717, 20719, 20731, 20743, 20747, 20749, 20753, 20759, 20771, + 20773, 20789, 20807, 20809, 20849, 20857, 20873, 20879, 20887, 20897, + 20899, 20903, 20921, 20929, 20939, 20947, 20959, 20963, 20981, 20983, + 21001, 21011, 21013, 21017, 21019, 21023, 21031, 21059, 21061, 21067, + 21089, 21101, 21107, 21121, 21139, 21143, 21149, 21157, 21163, 21169, + 21179, 21187, 21191, 21193, 21211, 21221, 21227, 21247, 21269, 21277, + 21283, 21313, 21317, 21319, 21323, 21341, 21347, 21377, 21379, 21383, + 21391, 21397, 21401, 21407, 21419, 21433, 21467, 21481, 21487, 21491, + 21493, 21499, 21503, 21517, 21521, 21523, 21529, 21557, 21559, 21563, + 21569, 21577, 21587, 21589, 21599, 21601, 21611, 21613, 21617, 21647, + 21649, 21661, 21673, 21683, 21701, 21713, 21727, 21737, 21739, 21751, + 21757, 21767, 21773, 21787, 21799, 21803, 21817, 21821, 21839, 21841, + 21851, 21859, 21863, 21871, 21881, 21893, 21911, 21929, 21937, 21943, + 21961, 21977, 21991, 21997, 22003, 22013, 22027, 22031, 22037, 22039, + 22051, 22063, 22067, 22073, 22079, 22091, 22093, 22109, 22111, 22123, + 22129, 22133, 22147, 22153, 22157, 22159, 22171, 22189, 22193, 22229, + 22247, 22259, 22271, 22273, 22277, 22279, 22283, 22291, 22303, 22307, + 22343, 22349, 22367, 22369, 22381, 22391, 22397, 22409, 22433, 22441, + 22447, 22453, 22469, 22481, 22483, 22501, 22511, 22531, 22541, 22543, + 22549, 22567, 22571, 22573, 22613, 22619, 22621, 22637, 22639, 22643, + 22651, 22669, 22679, 22691, 22697, 22699, 22709, 22717, 22721, 22727, + 22739, 22741, 22751, 22769, 22777, 22783, 22787, 22807, 22811, 22817, + 22853, 22859, 22861, 22871, 22877, 22901, 22907, 22921, 22937, 22943, + 22961, 22963, 22973, 22993, 23003, 23011, 23017, 23021, 23027, 23029, + 23039, 23041, 23053, 23057, 23059, 23063, 23071, 23081, 23087, 23099, + 23117, 23131, 23143, 23159, 23167, 23173, 23189, 23197, 23201, 23203, + 23209, 23227, 23251, 23269, 23279, 23291, 23293, 23297, 23311, 23321, + 23327, 23333, 23339, 23357, 23369, 23371, 23399, 23417, 23431, 23447, + 23459, 23473, 23497, 23509, 23531, 23537, 23539, 23549, 23557, 23561, + 23563, 23567, 23581, 23593, 23599, 23603, 23609, 23623, 23627, 23629, + 23633, 23663, 23669, 23671, 23677, 23687, 23689, 23719, 23741, 23743, + 23747, 23753, 23761, 23767, 23773, 23789, 23801, 23813, 23819, 23827, + 23831, 23833, 23857, 23869, 23873, 23879, 23887, 23893, 23899, 23909, + 23911, 23917, 23929, 23957, 23971, 23977, 23981, 23993, 24001, 24007, + 24019, 24023, 24029, 24043, 24049, 24061, 24071, 24077, 24083, 24091, + 24097, 24103, 24107, 24109, 24113, 24121, 24133, 24137, 24151, 24169, + 24179, 24181, 24197, 24203, 24223, 24229, 24239, 24247, 24251, 24281, + 24317, 24329, 24337, 24359, 24371, 24373, 24379, 24391, 24407, 24413, + 24419, 24421, 24439, 24443, 24469, 24473, 24481, 24499, 24509, 24517, + 24527, 24533, 24547, 24551, 24571, 24593, 24611, 24623, 24631, 24659, + 24671, 24677, 24683, 24691, 24697, 24709, 24733, 24749, 24763, 24767, + 24781, 24793, 24799, 24809, 24821, 24841, 24847, 24851, 24859, 24877, + 24889, 24907, 24917, 24919, 24923, 24943, 24953, 24967, 24971, 24977, + 24979, 24989, 25013, 25031, 25033, 25037, 25057, 25073, 25087, 25097, + 25111, 25117, 25121, 25127, 25147, 25153, 25163, 25169, 25171, 25183, + 25189, 25219, 25229, 25237, 25243, 25247, 25253, 25261, 25301, 25303, + 25307, 25309, 25321, 25339, 25343, 25349, 25357, 25367, 25373, 25391, + 25409, 25411, 25423, 25439, 25447, 25453, 25457, 25463, 25469, 25471, + 25523, 25537, 25541, 25561, 25577, 25579, 25583, 25589, 25601, 25603, + 25609, 25621, 25633, 25639, 25643, 25657, 25667, 25673, 25679, 25693, + 25703, 25717, 25733, 25741, 25747, 25759, 25763, 25771, 25793, 25799, + 25801, 25819, 25841, 25847, 25849, 25867, 25873, 25889, 25903, 25913, + 25919, 25931, 25933, 25939, 25943, 25951, 25969, 25981, 25997, 25999, + 26003, 26017, 26021, 26029, 26041, 26053, 26083, 26099, 26107, 26111, + 26113, 26119, 26141, 26153, 26161, 26171, 26177, 26183, 26189, 26203, + 26209, 26227, 26237, 26249, 26251, 26261, 26263, 26267, 26293, 26297, + 26309, 26317, 26321, 26339, 26347, 26357, 26371, 26387, 26393, 26399, + 26407, 26417, 26423, 26431, 26437, 26449, 26459, 26479, 26489, 26497, + 26501, 26513, 26539, 26557, 26561, 26573, 26591, 26597, 26627, 26633, + 26641, 26647, 26669, 26681, 26683, 26687, 26693, 26699, 26701, 26711, + 26713, 26717, 26723, 26729, 26731, 26737, 26759, 26777, 26783, 26801, + 26813, 26821, 26833, 26839, 26849, 26861, 26863, 26879, 26881, 26891, + 26893, 26903, 26921, 26927, 26947, 26951, 26953, 26959, 26981, 26987, + 26993, 27011, 27017, 27031, 27043, 27059, 27061, 27067, 27073, 27077, + 27091, 27103, 27107, 27109, 27127, 27143, 27179, 27191, 27197, 27211, + 27239, 27241, 27253, 27259, 27271, 27277, 27281, 27283, 27299, 27329, + 27337, 27361, 27367, 27397, 27407, 27409, 27427, 27431, 27437, 27449, + 27457, 27479, 27481, 27487, 27509, 27527, 27529, 27539, 27541, 27551, + 27581, 27583, 27611, 27617, 27631, 27647, 27653, 27673, 27689, 27691, + 27697, 27701, 27733, 27737, 27739, 27743, 27749, 27751, 27763, 27767, + 27773, 27779, 27791, 27793, 27799, 27803, 27809, 27817, 27823, 27827, + 27847, 27851, 27883, 27893, 27901, 27917, 27919, 27941, 27943, 27947, + 27953, 27961, 27967, 27983, 27997, 28001, 28019, 28027, 28031, 28051, + 28057, 28069, 28081, 28087, 28097, 28099, 28109, 28111, 28123, 28151, + 28163, 28181, 28183, 28201, 28211, 28219, 28229, 28277, 28279, 28283, + 28289, 28297, 28307, 28309, 28319, 28349, 28351, 28387, 28393, 28403, + 28409, 28411, 28429, 28433, 28439, 28447, 28463, 28477, 28493, 28499, + 28513, 28517, 28537, 28541, 28547, 28549, 28559, 28571, 28573, 28579, + 28591, 28597, 28603, 28607, 28619, 28621, 28627, 28631, 28643, 28649, + 28657, 28661, 28663, 28669, 28687, 28697, 28703, 28711, 28723, 28729, + 28751, 28753, 28759, 28771, 28789, 28793, 28807, 28813, 28817, 28837, + 28843, 28859, 28867, 28871, 28879, 28901, 28909, 28921, 28927, 28933, + 28949, 28961, 28979, 29009, 29017, 29021, 29023, 29027, 29033, 29059, + 29063, 29077, 29101, 29123, 29129, 29131, 29137, 29147, 29153, 29167, + 29173, 29179, 29191, 29201, 29207, 29209, 29221, 29231, 29243, 29251, + 29269, 29287, 29297, 29303, 29311, 29327, 29333, 29339, 29347, 29363, + 29383, 29387, 29389, 29399, 29401, 29411, 29423, 29429, 29437, 29443, + 29453, 29473, 29483, 29501, 29527, 29531, 29537, 29567, 29569, 29573, + 29581, 29587, 29599, 29611, 29629, 29633, 29641, 29663, 29669, 29671, + 29683, 29717, 29723, 29741, 29753, 29759, 29761, 29789, 29803, 29819, + 29833, 29837, 29851, 29863, 29867, 29873, 29879, 29881, 29917, 29921, + 29927, 29947, 29959, 29983, 29989, 30011, 30013, 30029, 30047, 30059, + 30071, 30089, 30091, 30097, 30103, 30109, 30113, 30119, 30133, 30137, + 30139, 30161, 30169, 30181, 30187, 30197, 30203, 30211, 30223, 30241, + 30253, 30259, 30269, 30271, 30293, 30307, 30313, 30319, 30323, 30341, + 30347, 30367, 30389, 30391, 30403, 30427, 30431, 30449, 30467, 30469, + 30491, 30493, 30497, 30509, 30517, 30529, 30539, 30553, 30557, 30559, + 30577, 30593, 30631, 30637, 30643, 30649, 30661, 30671, 30677, 30689, + 30697, 30703, 30707, 30713, 30727, 30757, 30763, 30773, 30781, 30803, + 30809, 30817, 30829, 30839, 30841, 30851, 30853, 30859, 30869, 30871, + 30881, 30893, 30911, 30931, 30937, 30941, 30949, 30971, 30977, 30983, + 31013, 31019, 31033, 31039, 31051, 31063, 31069, 31079, 31081, 31091, + 31121, 31123, 31139, 31147, 31151, 31153, 31159, 31177, 31181, 31183, + 31189, 31193, 31219, 31223, 31231, 31237, 31247, 31249, 31253, 31259, + 31267, 31271, 31277, 31307, 31319, 31321, 31327, 31333, 31337, 31357, + 31379, 31387, 31391, 31393, 31397, 31469, 31477, 31481, 31489, 31511, + 31513, 31517, 31531, 31541, 31543, 31547, 31567, 31573, 31583, 31601, + 31607, 31627, 31643, 31649, 31657, 31663, 31667, 31687, 31699, 31721, + 31723, 31727, 31729, 31741, 31751, 31769, 31771, 31793, 31799, 31817, + 31847, 31849, 31859, 31873, 31883, 31891, 31907, 31957, 31963, 31973, + 31981, 31991, 32003, 32009, 32027, 32029, 32051, 32057, 32059, 32063, + 32069, 32077, 32083, 32089, 32099, 32117, 32119, 32141, 32143, 32159, + 32173, 32183, 32189, 32191, 32203, 32213, 32233, 32237, 32251, 32257, + 32261, 32297, 32299, 32303, 32309, 32321, 32323, 32327, 32341, 32353, + 32359, 32363, 32369, 32371, 32377, 32381, 32401, 32411, 32413, 32423, + 32429, 32441, 32443, 32467, 32479, 32491, 32497, 32503, 32507, 32531, + 32533, 32537, 32561, 32563, 32569, 32573, 32579, 32587, 32603, 32609, + 32611, 32621, 32633, 32647, 32653, 32687, 32693, 32707, 32713, 32717, + 32719, 32749, 32771, 32779, 32783, 32789, 32797, 32801, 32803, 32831, + 32833, 32839, 32843, 32869, 32887, 32909, 32911, 32917, 32933, 32939, + 32941, 32957, 32969, 32971, 32983, 32987, 32993, 32999, 33013, 33023, + 33029, 33037, 33049, 33053, 33071, 33073, 33083, 33091, 33107, 33113, + 33119, 33149, 33151, 33161, 33179, 33181, 33191, 33199, 33203, 33211, + 33223, 33247, 33287, 33289, 33301, 33311, 33317, 33329, 33331, 33343, + 33347, 33349, 33353, 33359, 33377, 33391, 33403, 33409, 33413, 33427, + 33457, 33461, 33469, 33479, 33487, 33493, 33503, 33521, 33529, 33533, + 33547, 33563, 33569, 33577, 33581, 33587, 33589, 33599, 33601, 33613, + 33617, 33619, 33623, 33629, 33637, 33641, 33647, 33679, 33703, 33713, + 33721, 33739, 33749, 33751, 33757, 33767, 33769, 33773, 33791, 33797, + 33809, 33811, 33827, 33829, 33851, 33857, 33863, 33871, 33889, 33893, + 33911, 33923, 33931, 33937, 33941, 33961, 33967, 33997, 34019, 34031, + 34033, 34039, 34057, 34061, 34123, 34127, 34129, 34141, 34147, 34157, + 34159, 34171, 34183, 34211, 34213, 34217, 34231, 34253, 34259, 34261, + 34267, 34273, 34283, 34297, 34301, 34303, 34313, 34319, 34327, 34337, + 34351, 34361, 34367, 34369, 34381, 34403, 34421, 34429, 34439, 34457, + 34469, 34471, 34483, 34487, 34499, 34501, 34511, 34513, 34519, 34537, + 34543, 34549, 34583, 34589, 34591, 34603, 34607, 34613, 34631, 34649, + 34651, 34667, 34673, 34679, 34687, 34693, 34703, 34721, 34729, 34739, + 34747, 34757, 34759, 34763, 34781, 34807, 34819, 34841, 34843, 34847, + 34849, 34871, 34877, 34883, 34897, 34913, 34919, 34939, 34949, 34961, + 34963, 34981, 35023, 35027, 35051, 35053, 35059, 35069, 35081, 35083, + 35089, 35099, 35107, 35111, 35117, 35129, 35141, 35149, 35153, 35159, + 35171, 35201, 35221, 35227, 35251, 35257, 35267, 35279, 35281, 35291, + 35311, 35317, 35323, 35327, 35339, 35353, 35363, 35381, 35393, 35401, + 35407, 35419, 35423, 35437, 35447, 35449, 35461, 35491, 35507, 35509, + 35521, 35527, 35531, 35533, 35537, 35543, 35569, 35573, 35591, 35593, + 35597, 35603, 35617, 35671, 35677, 35729, 35731, 35747, 35753, 35759, + 35771, 35797, 35801, 35803, 35809, 35831, 35837, 35839, 35851, 35863, + 35869, 35879, 35897, 35899, 35911, 35923, 35933, 35951, 35963, 35969, + 35977, 35983, 35993, 35999, 36007, 36011, 36013, 36017, 36037, 36061, + 36067, 36073, 36083, 36097, 36107, 36109, 36131, 36137, 36151, 36161, + 36187, 36191, 36209, 36217, 36229, 36241, 36251, 36263, 36269, 36277, + 36293, 36299, 36307, 36313, 36319, 36341, 36343, 36353, 36373, 36383, + 36389, 36433, 36451, 36457, 36467, 36469, 36473, 36479, 36493, 36497, + 36523, 36527, 36529, 36541, 36551, 36559, 36563, 36571, 36583, 36587, + 36599, 36607, 36629, 36637, 36643, 36653, 36671, 36677, 36683, 36691, + 36697, 36709, 36713, 36721, 36739, 36749, 36761, 36767, 36779, 36781, + 36787, 36791, 36793, 36809, 36821, 36833, 36847, 36857, 36871, 36877, + 36887, 36899, 36901, 36913, 36919, 36923, 36929, 36931, 36943, 36947, + 36973, 36979, 36997, 37003, 37013, 37019, 37021, 37039, 37049, 37057, + 37061, 37087, 37097, 37117, 37123, 37139, 37159, 37171, 37181, 37189, + 37199, 37201, 37217, 37223, 37243, 37253, 37273, 37277, 37307, 37309, + 37313, 37321, 37337, 37339, 37357, 37361, 37363, 37369, 37379, 37397, + 37409, 37423, 37441, 37447, 37463, 37483, 37489, 37493, 37501, 37507, + 37511, 37517, 37529, 37537, 37547, 37549, 37561, 37567, 37571, 37573, + 37579, 37589, 37591, 37607, 37619, 37633, 37643, 37649, 37657, 37663, + 37691, 37693, 37699, 37717, 37747, 37781, 37783, 37799, 37811, 37813, + 37831, 37847, 37853, 37861, 37871, 37879, 37889, 37897, 37907, 37951, + 37957, 37963, 37967, 37987, 37991, 37993, 37997, 38011, 38039, 38047, + 38053, 38069, 38083, 38113, 38119, 38149, 38153, 38167, 38177, 38183, + 38189, 38197, 38201, 38219, 38231, 38237, 38239, 38261, 38273, 38281, + 38287, 38299, 38303, 38317, 38321, 38327, 38329, 38333, 38351, 38371, + 38377, 38393, 38431, 38447, 38449, 38453, 38459, 38461, 38501, 38543, + 38557, 38561, 38567, 38569, 38593, 38603, 38609, 38611, 38629, 38639, + 38651, 38653, 38669, 38671, 38677, 38693, 38699, 38707, 38711, 38713, + 38723, 38729, 38737, 38747, 38749, 38767, 38783, 38791, 38803, 38821, + 38833, 38839, 38851, 38861, 38867, 38873, 38891, 38903, 38917, 38921, + 38923, 38933, 38953, 38959, 38971, 38977, 38993, 39019, 39023, 39041, + 39043, 39047, 39079, 39089, 39097, 39103, 39107, 39113, 39119, 39133, + 39139, 39157, 39161, 39163, 39181, 39191, 39199, 39209, 39217, 39227, + 39229, 39233, 39239, 39241, 39251, 39293, 39301, 39313, 39317, 39323, + 39341, 39343, 39359, 39367, 39371, 39373, 39383, 39397, 39409, 39419, + 39439, 39443, 39451, 39461, 39499, 39503, 39509, 39511, 39521, 39541, + 39551, 39563, 39569, 39581, 39607, 39619, 39623, 39631, 39659, 39667, + 39671, 39679, 39703, 39709, 39719, 39727, 39733, 39749, 39761, 39769, + 39779, 39791, 39799, 39821, 39827, 39829, 39839, 39841, 39847, 39857, + 39863, 39869, 39877, 39883, 39887, 39901, 39929, 39937, 39953, 39971, + 39979, 39983, 39989, 40009, 40013, 40031, 40037, 40039, 40063, 40087, + 40093, 40099, 40111, 40123, 40127, 40129, 40151, 40153, 40163, 40169, + 40177, 40189, 40193, 40213, 40231, 40237, 40241, 40253, 40277, 40283, + 40289, 40343, 40351, 40357, 40361, 40387, 40423, 40427, 40429, 40433, + 40459, 40471, 40483, 40487, 40493, 40499, 40507, 40519, 40529, 40531, + 40543, 40559, 40577, 40583, 40591, 40597, 40609, 40627, 40637, 40639, + 40693, 40697, 40699, 40709, 40739, 40751, 40759, 40763, 40771, 40787, + 40801, 40813, 40819, 40823, 40829, 40841, 40847, 40849, 40853, 40867, + 40879, 40883, 40897, 40903, 40927, 40933, 40939, 40949, 40961, 40973, + 40993, 41011, 41017, 41023, 41039, 41047, 41051, 41057, 41077, 41081, + 41113, 41117, 41131, 41141, 41143, 41149, 41161, 41177, 41179, 41183, + 41189, 41201, 41203, 41213, 41221, 41227, 41231, 41233, 41243, 41257, + 41263, 41269, 41281, 41299, 41333, 41341, 41351, 41357, 41381, 41387, + 41389, 41399, 41411, 41413, 41443, 41453, 41467, 41479, 41491, 41507, + 41513, 41519, 41521, 41539, 41543, 41549, 41579, 41593, 41597, 41603, + 41609, 41611, 41617, 41621, 41627, 41641, 41647, 41651, 41659, 41669, + 41681, 41687, 41719, 41729, 41737, 41759, 41761, 41771, 41777, 41801, + 41809, 41813, 41843, 41849, 41851, 41863, 41879, 41887, 41893, 41897, + 41903, 41911, 41927, 41941, 41947, 41953, 41957, 41959, 41969, 41981, + 41983, 41999, 42013, 42017, 42019, 42023, 42043, 42061, 42071, 42073, + 42083, 42089, 42101, 42131, 42139, 42157, 42169, 42179, 42181, 42187, + 42193, 42197, 42209, 42221, 42223, 42227, 42239, 42257, 42281, 42283, + 42293, 42299, 42307, 42323, 42331, 42337, 42349, 42359, 42373, 42379, + 42391, 42397, 42403, 42407, 42409, 42433, 42437, 42443, 42451, 42457, + 42461, 42463, 42467, 42473, 42487, 42491, 42499, 42509, 42533, 42557, + 42569, 42571, 42577, 42589, 42611, 42641, 42643, 42649, 42667, 42677, + 42683, 42689, 42697, 42701, 42703, 42709, 42719, 42727, 42737, 42743, + 42751, 42767, 42773, 42787, 42793, 42797, 42821, 42829, 42839, 42841, + 42853, 42859, 42863, 42899, 42901, 42923, 42929, 42937, 42943, 42953, + 42961, 42967, 42979, 42989, 43003, 43013, 43019, 43037, 43049, 43051, + 43063, 43067, 43093, 43103, 43117, 43133, 43151, 43159, 43177, 43189, + 43201, 43207, 43223, 43237, 43261, 43271, 43283, 43291, 43313, 43319, + 43321, 43331, 43391, 43397, 43399, 43403, 43411, 43427, 43441, 43451, + 43457, 43481, 43487, 43499, 43517, 43541, 43543, 43573, 43577, 43579, + 43591, 43597, 43607, 43609, 43613, 43627, 43633, 43649, 43651, 43661, + 43669, 43691, 43711, 43717, 43721, 43753, 43759, 43777, 43781, 43783, + 43787, 43789, 43793, 43801, 43853, 43867, 43889, 43891, 43913, 43933, + 43943, 43951, 43961, 43963, 43969, 43973, 43987, 43991, 43997, 44017, + 44021, 44027, 44029, 44041, 44053, 44059, 44071, 44087, 44089, 44101, + 44111, 44119, 44123, 44129, 44131, 44159, 44171, 44179, 44189, 44201, + 44203, 44207, 44221, 44249, 44257, 44263, 44267, 44269, 44273, 44279, + 44281, 44293, 44351, 44357, 44371, 44381, 44383, 44389, 44417, 44449, + 44453, 44483, 44491, 44497, 44501, 44507, 44519, 44531, 44533, 44537, + 44543, 44549, 44563, 44579, 44587, 44617, 44621, 44623, 44633, 44641, + 44647, 44651, 44657, 44683, 44687, 44699, 44701, 44711, 44729, 44741, + 44753, 44771, 44773, 44777, 44789, 44797, 44809, 44819, 44839, 44843, + 44851, 44867, 44879, 44887, 44893, 44909, 44917, 44927, 44939, 44953, + 44959, 44963, 44971, 44983, 44987, 45007, 45013, 45053, 45061, 45077, + 45083, 45119, 45121, 45127, 45131, 45137, 45139, 45161, 45179, 45181, + 45191, 45197, 45233, 45247, 45259, 45263, 45281, 45289, 45293, 45307, + 45317, 45319, 45329, 45337, 45341, 45343, 45361, 45377, 45389, 45403, + 45413, 45427, 45433, 45439, 45481, 45491, 45497, 45503, 45523, 45533, + 45541, 45553, 45557, 45569, 45587, 45589, 45599, 45613, 45631, 45641, + 45659, 45667, 45673, 45677, 45691, 45697, 45707, 45737, 45751, 45757, + 45763, 45767, 45779, 45817, 45821, 45823, 45827, 45833, 45841, 45853, + 45863, 45869, 45887, 45893, 45943, 45949, 45953, 45959, 45971, 45979, + 45989, 46021, 46027, 46049, 46051, 46061, 46073, 46091, 46093, 46099, + 46103, 46133, 46141, 46147, 46153, 46171, 46181, 46183, 46187, 46199, + 46219, 46229, 46237, 46261, 46271, 46273, 46279, 46301, 46307, 46309, + 46327, 46337, 46349, 46351, 46381, 46399, 46411, 46439, 46441, 46447, + 46451, 46457, 46471, 46477, 46489, 46499, 46507, 46511, 46523, 46549, + 46559, 46567, 46573, 46589, 46591, 46601, 46619, 46633, 46639, 46643, + 46649, 46663, 46679, 46681, 46687, 46691, 46703, 46723, 46727, 46747, + 46751, 46757, 46769, 46771, 46807, 46811, 46817, 46819, 46829, 46831, + 46853, 46861, 46867, 46877, 46889, 46901, 46919, 46933, 46957, 46993, + 46997, 47017, 47041, 47051, 47057, 47059, 47087, 47093, 47111, 47119, + 47123, 47129, 47137, 47143, 47147, 47149, 47161, 47189, 47207, 47221, + 47237, 47251, 47269, 47279, 47287, 47293, 47297, 47303, 47309, 47317, + 47339, 47351, 47353, 47363, 47381, 47387, 47389, 47407, 47417, 47419, + 47431, 47441, 47459, 47491, 47497, 47501, 47507, 47513, 47521, 47527, + 47533, 47543, 47563, 47569, 47581, 47591, 47599, 47609, 47623, 47629, + 47639, 47653, 47657, 47659, 47681, 47699, 47701, 47711, 47713, 47717, + 47737, 47741, 47743, 47777, 47779, 47791, 47797, 47807, 47809, 47819, + 47837, 47843, 47857, 47869, 47881, 47903, 47911, 47917, 47933, 47939, + 47947, 47951, 47963, 47969, 47977, 47981, 48017, 48023, 48029, 48049, + 48073, 48079, 48091, 48109, 48119, 48121, 48131, 48157, 48163, 48179, + 48187, 48193, 48197, 48221, 48239, 48247, 48259, 48271, 48281, 48299, + 48311, 48313, 48337, 48341, 48353, 48371, 48383, 48397, 48407, 48409, + 48413, 48437, 48449, 48463, 48473, 48479, 48481, 48487, 48491, 48497, + 48523, 48527, 48533, 48539, 48541, 48563, 48571, 48589, 48593, 48611, + 48619, 48623, 48647, 48649, 48661, 48673, 48677, 48679, 48731, 48733, + 48751, 48757, 48761, 48767, 48779, 48781, 48787, 48799, 48809, 48817, + 48821, 48823, 48847, 48857, 48859, 48869, 48871, 48883, 48889, 48907, + 48947, 48953, 48973, 48989, 48991, 49003, 49009, 49019, 49031, 49033, + 49037, 49043, 49057, 49069, 49081, 49103, 49109, 49117, 49121, 49123, + 49139, 49157, 49169, 49171, 49177, 49193, 49199, 49201, 49207, 49211, + 49223, 49253, 49261, 49277, 49279, 49297, 49307, 49331, 49333, 49339, + 49363, 49367, 49369, 49391, 49393, 49409, 49411, 49417, 49429, 49433, + 49451, 49459, 49463, 49477, 49481, 49499, 49523, 49529, 49531, 49537, + 49547, 49549, 49559, 49597, 49603, 49613, 49627, 49633, 49639, 49663, + 49667, 49669, 49681, 49697, 49711, 49727, 49739, 49741, 49747, 49757, + 49783, 49787, 49789, 49801, 49807, 49811, 49823, 49831, 49843, 49853, + 49871, 49877, 49891, 49919, 49921, 49927, 49937, 49939, 49943, 49957, + 49991, 49993, 49999, 50021, 50023, 50033, 50047, 50051, 50053, 50069, + 50077, 50087, 50093, 50101, 50111, 50119, 50123, 50129, 50131, 50147, + 50153, 50159, 50177, 50207, 50221, 50227, 50231, 50261, 50263, 50273, + 50287, 50291, 50311, 50321, 50329, 50333, 50341, 50359, 50363, 50377, + 50383, 50387, 50411, 50417, 50423, 50441, 50459, 50461, 50497, 50503, + 50513, 50527, 50539, 50543, 50549, 50551, 50581, 50587, 50591, 50593, + 50599, 50627, 50647, 50651, 50671, 50683, 50707, 50723, 50741, 50753, + 50767, 50773, 50777, 50789, 50821, 50833, 50839, 50849, 50857, 50867, + 50873, 50891, 50893, 50909, 50923, 50929, 50951, 50957, 50969, 50971, + 50989, 50993, 51001, 51031, 51043, 51047, 51059, 51061, 51071, 51109, + 51131, 51133, 51137, 51151, 51157, 51169, 51193, 51197, 51199, 51203, + 51217, 51229, 51239, 51241, 51257, 51263, 51283, 51287, 51307, 51329, + 51341, 51343, 51347, 51349, 51361, 51383, 51407, 51413, 51419, 51421, + 51427, 51431, 51437, 51439, 51449, 51461, 51473, 51479, 51481, 51487, + 51503, 51511, 51517, 51521, 51539, 51551, 51563, 51577, 51581, 51593, + 51599, 51607, 51613, 51631, 51637, 51647, 51659, 51673, 51679, 51683, + 51691, 51713, 51719, 51721, 51749, 51767, 51769, 51787, 51797, 51803, + 51817, 51827, 51829, 51839, 51853, 51859, 51869, 51871, 51893, 51899, + 51907, 51913, 51929, 51941, 51949, 51971, 51973, 51977, 51991, 52009, + 52021, 52027, 52051, 52057, 52067, 52069, 52081, 52103, 52121, 52127, + 52147, 52153, 52163, 52177, 52181, 52183, 52189, 52201, 52223, 52237, + 52249, 52253, 52259, 52267, 52289, 52291, 52301, 52313, 52321, 52361, + 52363, 52369, 52379, 52387, 52391, 52433, 52453, 52457, 52489, 52501, + 52511, 52517, 52529, 52541, 52543, 52553, 52561, 52567, 52571, 52579, + 52583, 52609, 52627, 52631, 52639, 52667, 52673, 52691, 52697, 52709, + 52711, 52721, 52727, 52733, 52747, 52757, 52769, 52783, 52807, 52813, + 52817, 52837, 52859, 52861, 52879, 52883, 52889, 52901, 52903, 52919, + 52937, 52951, 52957, 52963, 52967, 52973, 52981, 52999, 53003, 53017, + 53047, 53051, 53069, 53077, 53087, 53089, 53093, 53101, 53113, 53117, + 53129, 53147, 53149, 53161, 53171, 53173, 53189, 53197, 53201, 53231, + 53233, 53239, 53267, 53269, 53279, 53281, 53299, 53309, 53323, 53327, + 53353, 53359, 53377, 53381, 53401, 53407, 53411, 53419, 53437, 53441, + 53453, 53479, 53503, 53507, 53527, 53549, 53551, 53569, 53591, 53593, + 53597, 53609, 53611, 53617, 53623, 53629, 53633, 53639, 53653, 53657, + 53681, 53693, 53699, 53717, 53719, 53731, 53759, 53773, 53777, 53783, + 53791, 53813, 53819, 53831, 53849, 53857, 53861, 53881, 53887, 53891, + 53897, 53899, 53917, 53923, 53927, 53939, 53951, 53959, 53987, 53993, + 54001, 54011, 54013, 54037, 54049, 54059, 54083, 54091, 54101, 54121, + 54133, 54139, 54151, 54163, 54167, 54181, 54193, 54217, 54251, 54269, + 54277, 54287, 54293, 54311, 54319, 54323, 54331, 54347, 54361, 54367, + 54371, 54377, 54401, 54403, 54409, 54413, 54419, 54421, 54437, 54443, + 54449, 54469, 54493, 54497, 54499, 54503, 54517, 54521, 54539, 54541, + 54547, 54559, 54563, 54577, 54581, 54583, 54601, 54617, 54623, 54629, + 54631, 54647, 54667, 54673, 54679, 54709, 54713, 54721, 54727, 54751, + 54767, 54773, 54779, 54787, 54799, 54829, 54833, 54851, 54869, 54877, + 54881, 54907, 54917, 54919, 54941, 54949, 54959, 54973, 54979, 54983, + 55001, 55009, 55021, 55049, 55051, 55057, 55061, 55073, 55079, 55103, + 55109, 55117, 55127, 55147, 55163, 55171, 55201, 55207, 55213, 55217, + 55219, 55229, 55243, 55249, 55259, 55291, 55313, 55331, 55333, 55337, + 55339, 55343, 55351, 55373, 55381, 55399, 55411, 55439, 55441, 55457, + 55469, 55487, 55501, 55511, 55529, 55541, 55547, 55579, 55589, 55603, + 55609, 55619, 55621, 55631, 55633, 55639, 55661, 55663, 55667, 55673, + 55681, 55691, 55697, 55711, 55717, 55721, 55733, 55763, 55787, 55793, + 55799, 55807, 55813, 55817, 55819, 55823, 55829, 55837, 55843, 55849, + 55871, 55889, 55897, 55901, 55903, 55921, 55927, 55931, 55933, 55949, + 55967, 55987, 55997, 56003, 56009, 56039, 56041, 56053, 56081, 56087, + 56093, 56099, 56101, 56113, 56123, 56131, 56149, 56167, 56171, 56179, + 56197, 56207, 56209, 56237, 56239, 56249, 56263, 56267, 56269, 56299, + 56311, 56333, 56359, 56369, 56377, 56383, 56393, 56401, 56417, 56431, + 56437, 56443, 56453, 56467, 56473, 56477, 56479, 56489, 56501, 56503, + 56509, 56519, 56527, 56531, 56533, 56543, 56569, 56591, 56597, 56599, + 56611, 56629, 56633, 56659, 56663, 56671, 56681, 56687, 56701, 56711, + 56713, 56731, 56737, 56747, 56767, 56773, 56779, 56783, 56807, 56809, + 56813, 56821, 56827, 56843, 56857, 56873, 56891, 56893, 56897, 56909, + 56911, 56921, 56923, 56929, 56941, 56951, 56957, 56963, 56983, 56989, + 56993, 56999, 57037, 57041, 57047, 57059, 57073, 57077, 57089, 57097, + 57107, 57119, 57131, 57139, 57143, 57149, 57163, 57173, 57179, 57191, + 57193, 57203, 57221, 57223, 57241, 57251, 57259, 57269, 57271, 57283, + 57287, 57301, 57329, 57331, 57347, 57349, 57367, 57373, 57383, 57389, + 57397, 57413, 57427, 57457, 57467, 57487, 57493, 57503, 57527, 57529, + 57557, 57559, 57571, 57587, 57593, 57601, 57637, 57641, 57649, 57653, + 57667, 57679, 57689, 57697, 57709, 57713, 57719, 57727, 57731, 57737, + 57751, 57773, 57781, 57787, 57791, 57793, 57803, 57809, 57829, 57839, + 57847, 57853, 57859, 57881, 57899, 57901, 57917, 57923, 57943, 57947, + 57973, 57977, 57991, 58013, 58027, 58031, 58043, 58049, 58057, 58061, + 58067, 58073, 58099, 58109, 58111, 58129, 58147, 58151, 58153, 58169, + 58171, 58189, 58193, 58199, 58207, 58211, 58217, 58229, 58231, 58237, + 58243, 58271, 58309, 58313, 58321, 58337, 58363, 58367, 58369, 58379, + 58391, 58393, 58403, 58411, 58417, 58427, 58439, 58441, 58451, 58453, + 58477, 58481, 58511, 58537, 58543, 58549, 58567, 58573, 58579, 58601, + 58603, 58613, 58631, 58657, 58661, 58679, 58687, 58693, 58699, 58711, + 58727, 58733, 58741, 58757, 58763, 58771, 58787, 58789, 58831, 58889, + 58897, 58901, 58907, 58909, 58913, 58921, 58937, 58943, 58963, 58967, + 58979, 58991, 58997, 59009, 59011, 59021, 59023, 59029, 59051, 59053, + 59063, 59069, 59077, 59083, 59093, 59107, 59113, 59119, 59123, 59141, + 59149, 59159, 59167, 59183, 59197, 59207, 59209, 59219, 59221, 59233, + 59239, 59243, 59263, 59273, 59281, 59333, 59341, 59351, 59357, 59359, + 59369, 59377, 59387, 59393, 59399, 59407, 59417, 59419, 59441, 59443, + 59447, 59453, 59467, 59471, 59473, 59497, 59509, 59513, 59539, 59557, + 59561, 59567, 59581, 59611, 59617, 59621, 59627, 59629, 59651, 59659, + 59663, 59669, 59671, 59693, 59699, 59707, 59723, 59729, 59743, 59747, + 59753, 59771, 59779, 59791, 59797, 59809, 59833, 59863, 59879, 59887, + 59921, 59929, 59951, 59957, 59971, 59981, 59999, 60013, 60017, 60029, + 60037, 60041, 60077, 60083, 60089, 60091, 60101, 60103, 60107, 60127, + 60133, 60139, 60149, 60161, 60167, 60169, 60209, 60217, 60223, 60251, + 60257, 60259, 60271, 60289, 60293, 60317, 60331, 60337, 60343, 60353, + 60373, 60383, 60397, 60413, 60427, 60443, 60449, 60457, 60493, 60497, + 60509, 60521, 60527, 60539, 60589, 60601, 60607, 60611, 60617, 60623, + 60631, 60637, 60647, 60649, 60659, 60661, 60679, 60689, 60703, 60719, + 60727, 60733, 60737, 60757, 60761, 60763, 60773, 60779, 60793, 60811, + 60821, 60859, 60869, 60887, 60889, 60899, 60901, 60913, 60917, 60919, + 60923, 60937, 60943, 60953, 60961, 61001, 61007, 61027, 61031, 61043, + 61051, 61057, 61091, 61099, 61121, 61129, 61141, 61151, 61153, 61169, + 61211, 61223, 61231, 61253, 61261, 61283, 61291, 61297, 61331, 61333, + 61339, 61343, 61357, 61363, 61379, 61381, 61403, 61409, 61417, 61441, + 61463, 61469, 61471, 61483, 61487, 61493, 61507, 61511, 61519, 61543, + 61547, 61553, 61559, 61561, 61583, 61603, 61609, 61613, 61627, 61631, + 61637, 61643, 61651, 61657, 61667, 61673, 61681, 61687, 61703, 61717, + 61723, 61729, 61751, 61757, 61781, 61813, 61819, 61837, 61843, 61861, + 61871, 61879, 61909, 61927, 61933, 61949, 61961, 61967, 61979, 61981, + 61987, 61991, 62003, 62011, 62017, 62039, 62047, 62053, 62057, 62071, + 62081, 62099, 62119, 62129, 62131, 62137, 62141, 62143, 62171, 62189, + 62191, 62201, 62207, 62213, 62219, 62233, 62273, 62297, 62299, 62303, + 62311, 62323, 62327, 62347, 62351, 62383, 62401, 62417, 62423, 62459, + 62467, 62473, 62477, 62483, 62497, 62501, 62507, 62533, 62539, 62549, + 62563, 62581, 62591, 62597, 62603, 62617, 62627, 62633, 62639, 62653, + 62659, 62683, 62687, 62701, 62723, 62731, 62743, 62753, 62761, 62773, + 62791, 62801, 62819, 62827, 62851, 62861, 62869, 62873, 62897, 62903, + 62921, 62927, 62929, 62939, 62969, 62971, 62981, 62983, 62987, 62989, + 63029, 63031, 63059, 63067, 63073, 63079, 63097, 63103, 63113, 63127, + 63131, 63149, 63179, 63197, 63199, 63211, 63241, 63247, 63277, 63281, + 63299, 63311, 63313, 63317, 63331, 63337, 63347, 63353, 63361, 63367, + 63377, 63389, 63391, 63397, 63409, 63419, 63421, 63439, 63443, 63463, + 63467, 63473, 63487, 63493, 63499, 63521, 63527, 63533, 63541, 63559, + 63577, 63587, 63589, 63599, 63601, 63607, 63611, 63617, 63629, 63647, + 63649, 63659, 63667, 63671, 63689, 63691, 63697, 63703, 63709, 63719, + 63727, 63737, 63743, 63761, 63773, 63781, 63793, 63799, 63803, 63809, + 63823, 63839, 63841, 63853, 63857, 63863, 63901, 63907, 63913, 63929, + 63949, 63977, 63997, 64007, 64013, 64019, 64033, 64037, 64063, 64067, + 64081, 64091, 64109, 64123, 64151, 64153, 64157, 64171, 64187, 64189, + 64217, 64223, 64231, 64237, 64271, 64279, 64283, 64301, 64303, 64319, + 64327, 64333, 64373, 64381, 64399, 64403, 64433, 64439, 64451, 64453, + 64483, 64489, 64499, 64513, 64553, 64567, 64577, 64579, 64591, 64601, + 64609, 64613, 64621, 64627, 64633, 64661, 64663, 64667, 64679, 64693, + 64709, 64717, 64747, 64763, 64781, 64783, 64793, 64811, 64817, 64849, + 64853, 64871, 64877, 64879, 64891, 64901, 64919, 64921, 64927, 64937, + 64951, 64969, 64997, 65003, 65011, 65027, 65029, 65033, 65053, 65063, + 65071, 65089, 65099, 65101, 65111, 65119, 65123, 65129, 65141, 65147, + 65167, 65171, 65173, 65179, 65183, 65203, 65213, 65239, 65257, 65267, + 65269, 65287, 65293, 65309, 65323, 65327, 65353, 65357, 65371, 65381, + 65393, 65407, 65413, 65419, 65423, 65437, 65447, 65449, 65479, 65497, + 65519, 65521, 65537, 65539, 65543, 65551, 65557, 65563, 65579, 65581, + 65587, 65599, 65609, 65617, 65629, 65633, 65647, 65651, 65657, 65677, + 65687, 65699, 65701, 65707, 65713, 65717, 65719, 65729, 65731, 65761, + 65777, 65789, 65809, 65827, 65831, 65837, 65839, 65843, 65851, 65867, + 65881, 65899, 65921, 65927, 65929, 65951, 65957, 65963, 65981, 65983, + 65993, 66029, 66037, 66041, 66047, 66067, 66071, 66083, 66089, 66103, + 66107, 66109, 66137, 66161, 66169, 66173, 66179, 66191, 66221, 66239, + 66271, 66293, 66301, 66337, 66343, 66347, 66359, 66361, 66373, 66377, + 66383, 66403, 66413, 66431, 66449, 66457, 66463, 66467, 66491, 66499, + 66509, 66523, 66529, 66533, 66541, 66553, 66569, 66571, 66587, 66593, + 66601, 66617, 66629, 66643, 66653, 66683, 66697, 66701, 66713, 66721, + 66733, 66739, 66749, 66751, 66763, 66791, 66797, 66809, 66821, 66841, + 66851, 66853, 66863, 66877, 66883, 66889, 66919, 66923, 66931, 66943, + 66947, 66949, 66959, 66973, 66977, 67003, 67021, 67033, 67043, 67049, + 67057, 67061, 67073, 67079, 67103, 67121, 67129, 67139, 67141, 67153, + 67157, 67169, 67181, 67187, 67189, 67211, 67213, 67217, 67219, 67231, + 67247, 67261, 67271, 67273, 67289, 67307, 67339, 67343, 67349, 67369, + 67391, 67399, 67409, 67411, 67421, 67427, 67429, 67433, 67447, 67453, + 67477, 67481, 67489, 67493, 67499, 67511, 67523, 67531, 67537, 67547, + 67559, 67567, 67577, 67579, 67589, 67601, 67607, 67619, 67631, 67651, + 67679, 67699, 67709, 67723, 67733, 67741, 67751, 67757, 67759, 67763, + 67777, 67783, 67789, 67801, 67807, 67819, 67829, 67843, 67853, 67867, + 67883, 67891, 67901, 67927, 67931, 67933, 67939, 67943, 67957, 67961, + 67967, 67979, 67987, 67993, 68023, 68041, 68053, 68059, 68071, 68087, + 68099, 68111, 68113, 68141, 68147, 68161, 68171, 68207, 68209, 68213, + 68219, 68227, 68239, 68261, 68279, 68281, 68311, 68329, 68351, 68371, + 68389, 68399, 68437, 68443, 68447, 68449, 68473, 68477, 68483, 68489, + 68491, 68501, 68507, 68521, 68531, 68539, 68543, 68567, 68581, 68597, + 68611, 68633, 68639, 68659, 68669, 68683, 68687, 68699, 68711, 68713, + 68729, 68737, 68743, 68749, 68767, 68771, 68777, 68791, 68813, 68819, + 68821, 68863, 68879, 68881, 68891, 68897, 68899, 68903, 68909, 68917, + 68927, 68947, 68963, 68993, 69001, 69011, 69019, 69029, 69031, 69061, + 69067, 69073, 69109, 69119, 69127, 69143, 69149, 69151, 69163, 69191, + 69193, 69197, 69203, 69221, 69233, 69239, 69247, 69257, 69259, 69263, + 69313, 69317, 69337, 69341, 69371, 69379, 69383, 69389, 69401, 69403, + 69427, 69431, 69439, 69457, 69463, 69467, 69473, 69481, 69491, 69493, + 69497, 69499, 69539, 69557, 69593, 69623, 69653, 69661, 69677, 69691, + 69697, 69709, 69737, 69739, 69761, 69763, 69767, 69779, 69809, 69821, + 69827, 69829, 69833, 69847, 69857, 69859, 69877, 69899, 69911, 69929, + 69931, 69941, 69959, 69991, 69997, 70001, 70003, 70009, 70019, 70039, + 70051, 70061, 70067, 70079, 70099, 70111, 70117, 70121, 70123, 70139, + 70141, 70157, 70163, 70177, 70181, 70183, 70199, 70201, 70207, 70223, + 70229, 70237, 70241, 70249, 70271, 70289, 70297, 70309, 70313, 70321, + 70327, 70351, 70373, 70379, 70381, 70393, 70423, 70429, 70439, 70451, + 70457, 70459, 70481, 70487, 70489, 70501, 70507, 70529, 70537, 70549, + 70571, 70573, 70583, 70589, 70607, 70619, 70621, 70627, 70639, 70657, + 70663, 70667, 70687, 70709, 70717, 70729, 70753, 70769, 70783, 70793, + 70823, 70841, 70843, 70849, 70853, 70867, 70877, 70879, 70891, 70901, + 70913, 70919, 70921, 70937, 70949, 70951, 70957, 70969, 70979, 70981, + 70991, 70997, 70999, 71011, 71023, 71039, 71059, 71069, 71081, 71089, + 71119, 71129, 71143, 71147, 71153, 71161, 71167, 71171, 71191, 71209, + 71233, 71237, 71249, 71257, 71261, 71263, 71287, 71293, 71317, 71327, + 71329, 71333, 71339, 71341, 71347, 71353, 71359, 71363, 71387, 71389, + 71399, 71411, 71413, 71419, 71429, 71437, 71443, 71453, 71471, 71473, + 71479, 71483, 71503, 71527, 71537, 71549, 71551, 71563, 71569, 71593, + 71597, 71633, 71647, 71663, 71671, 71693, 71699, 71707, 71711, 71713, + 71719, 71741, 71761, 71777, 71789, 71807, 71809, 71821, 71837, 71843, + 71849, 71861, 71867, 71879, 71881, 71887, 71899, 71909, 71917, 71933, + 71941, 71947, 71963, 71971, 71983, 71987, 71993, 71999, 72019, 72031, + 72043, 72047, 72053, 72073, 72077, 72089, 72091, 72101, 72103, 72109, + 72139, 72161, 72167, 72169, 72173, 72211, 72221, 72223, 72227, 72229, + 72251, 72253, 72269, 72271, 72277, 72287, 72307, 72313, 72337, 72341, + 72353, 72367, 72379, 72383, 72421, 72431, 72461, 72467, 72469, 72481, + 72493, 72497, 72503, 72533, 72547, 72551, 72559, 72577, 72613, 72617, + 72623, 72643, 72647, 72649, 72661, 72671, 72673, 72679, 72689, 72701, + 72707, 72719, 72727, 72733, 72739, 72763, 72767, 72797, 72817, 72823, + 72859, 72869, 72871, 72883, 72889, 72893, 72901, 72907, 72911, 72923, + 72931, 72937, 72949, 72953, 72959, 72973, 72977, 72997, 73009, 73013, + 73019, 73037, 73039, 73043, 73061, 73063, 73079, 73091, 73121, 73127, + 73133, 73141, 73181, 73189, 73237, 73243, 73259, 73277, 73291, 73303, + 73309, 73327, 73331, 73351, 73361, 73363, 73369, 73379, 73387, 73417, + 73421, 73433, 73453, 73459, 73471, 73477, 73483, 73517, 73523, 73529, + 73547, 73553, 73561, 73571, 73583, 73589, 73597, 73607, 73609, 73613, + 73637, 73643, 73651, 73673, 73679, 73681, 73693, 73699, 73709, 73721, + 73727, 73751, 73757, 73771, 73783, 73819, 73823, 73847, 73849, 73859, + 73867, 73877, 73883, 73897, 73907, 73939, 73943, 73951, 73961, 73973, + 73999, 74017, 74021, 74027, 74047, 74051, 74071, 74077, 74093, 74099, + 74101, 74131, 74143, 74149, 74159, 74161, 74167, 74177, 74189, 74197, + 74201, 74203, 74209, 74219, 74231, 74257, 74279, 74287, 74293, 74297, + 74311, 74317, 74323, 74353, 74357, 74363, 74377, 74381, 74383, 74411, + 74413, 74419, 74441, 74449, 74453, 74471, 74489, 74507, 74509, 74521, + 74527, 74531, 74551, 74561, 74567, 74573, 74587, 74597, 74609, 74611, + 74623, 74653, 74687, 74699, 74707, 74713, 74717, 74719, 74729, 74731, + 74747, 74759, 74761, 74771, 74779, 74797, 74821, 74827, 74831, 74843, + 74857, 74861, 74869, 74873, 74887, 74891, 74897, 74903, 74923, 74929, + 74933, 74941, 74959, 75011, 75013, 75017, 75029, 75037, 75041, 75079, + 75083, 75109, 75133, 75149, 75161, 75167, 75169, 75181, 75193, 75209, + 75211, 75217, 75223, 75227, 75239, 75253, 75269, 75277, 75289, 75307, + 75323, 75329, 75337, 75347, 75353, 75367, 75377, 75389, 75391, 75401, + 75403, 75407, 75431, 75437, 75479, 75503, 75511, 75521, 75527, 75533, + 75539, 75541, 75553, 75557, 75571, 75577, 75583, 75611, 75617, 75619, + 75629, 75641, 75653, 75659, 75679, 75683, 75689, 75703, 75707, 75709, + 75721, 75731, 75743, 75767, 75773, 75781, 75787, 75793, 75797, 75821, + 75833, 75853, 75869, 75883, 75913, 75931, 75937, 75941, 75967, 75979, + 75983, 75989, 75991, 75997, 76001, 76003, 76031, 76039, 76079, 76081, + 76091, 76099, 76103, 76123, 76129, 76147, 76157, 76159, 76163, 76207, + 76213, 76231, 76243, 76249, 76253, 76259, 76261, 76283, 76289, 76303, + 76333, 76343, 76367, 76369, 76379, 76387, 76403, 76421, 76423, 76441, + 76463, 76471, 76481, 76487, 76493, 76507, 76511, 76519, 76537, 76541, + 76543, 76561, 76579, 76597, 76603, 76607, 76631, 76649, 76651, 76667, + 76673, 76679, 76697, 76717, 76733, 76753, 76757, 76771, 76777, 76781, + 76801, 76819, 76829, 76831, 76837, 76847, 76871, 76873, 76883, 76907, + 76913, 76919, 76943, 76949, 76961, 76963, 76991, 77003, 77017, 77023, + 77029, 77041, 77047, 77069, 77081, 77093, 77101, 77137, 77141, 77153, + 77167, 77171, 77191, 77201, 77213, 77237, 77239, 77243, 77249, 77261, + 77263, 77267, 77269, 77279, 77291, 77317, 77323, 77339, 77347, 77351, + 77359, 77369, 77377, 77383, 77417, 77419, 77431, 77447, 77471, 77477, + 77479, 77489, 77491, 77509, 77513, 77521, 77527, 77543, 77549, 77551, + 77557, 77563, 77569, 77573, 77587, 77591, 77611, 77617, 77621, 77641, + 77647, 77659, 77681, 77687, 77689, 77699, 77711, 77713, 77719, 77723, + 77731, 77743, 77747, 77761, 77773, 77783, 77797, 77801, 77813, 77839, + 77849, 77863, 77867, 77893, 77899, 77929, 77933, 77951, 77969, 77977, + 77983, 77999, 78007, 78017, 78031, 78041, 78049, 78059, 78079, 78101, + 78121, 78137, 78139, 78157, 78163, 78167, 78173, 78179, 78191, 78193, + 78203, 78229, 78233, 78241, 78259, 78277, 78283, 78301, 78307, 78311, + 78317, 78341, 78347, 78367, 78401, 78427, 78437, 78439, 78467, 78479, + 78487, 78497, 78509, 78511, 78517, 78539, 78541, 78553, 78569, 78571, + 78577, 78583, 78593, 78607, 78623, 78643, 78649, 78653, 78691, 78697, + 78707, 78713, 78721, 78737, 78779, 78781, 78787, 78791, 78797, 78803, + 78809, 78823, 78839, 78853, 78857, 78877, 78887, 78889, 78893, 78901, + 78919, 78929, 78941, 78977, 78979, 78989, 79031, 79039, 79043, 79063, + 79087, 79103, 79111, 79133, 79139, 79147, 79151, 79153, 79159, 79181, + 79187, 79193, 79201, 79229, 79231, 79241, 79259, 79273, 79279, 79283, + 79301, 79309, 79319, 79333, 79337, 79349, 79357, 79367, 79379, 79393, + 79397, 79399, 79411, 79423, 79427, 79433, 79451, 79481, 79493, 79531, + 79537, 79549, 79559, 79561, 79579, 79589, 79601, 79609, 79613, 79621, + 79627, 79631, 79633, 79657, 79669, 79687, 79691, 79693, 79697, 79699, + 79757, 79769, 79777, 79801, 79811, 79813, 79817, 79823, 79829, 79841, + 79843, 79847, 79861, 79867, 79873, 79889, 79901, 79903, 79907, 79939, + 79943, 79967, 79973, 79979, 79987, 79997, 79999, 80021, 80039, 80051, + 80071, 80077, 80107, 80111, 80141, 80147, 80149, 80153, 80167, 80173, + 80177, 80191, 80207, 80209, 80221, 80231, 80233, 80239, 80251, 80263, + 80273, 80279, 80287, 80309, 80317, 80329, 80341, 80347, 80363, 80369, + 80387, 80407, 80429, 80447, 80449, 80471, 80473, 80489, 80491, 80513, + 80527, 80537, 80557, 80567, 80599, 80603, 80611, 80621, 80627, 80629, + 80651, 80657, 80669, 80671, 80677, 80681, 80683, 80687, 80701, 80713, + 80737, 80747, 80749, 80761, 80777, 80779, 80783, 80789, 80803, 80809, + 80819, 80831, 80833, 80849, 80863, 80897, 80909, 80911, 80917, 80923, + 80929, 80933, 80953, 80963, 80989, 81001, 81013, 81017, 81019, 81023, + 81031, 81041, 81043, 81047, 81049, 81071, 81077, 81083, 81097, 81101, + 81119, 81131, 81157, 81163, 81173, 81181, 81197, 81199, 81203, 81223, + 81233, 81239, 81281, 81283, 81293, 81299, 81307, 81331, 81343, 81349, + 81353, 81359, 81371, 81373, 81401, 81409, 81421, 81439, 81457, 81463, + 81509, 81517, 81527, 81533, 81547, 81551, 81553, 81559, 81563, 81569, + 81611, 81619, 81629, 81637, 81647, 81649, 81667, 81671, 81677, 81689, + 81701, 81703, 81707, 81727, 81737, 81749, 81761, 81769, 81773, 81799, + 81817, 81839, 81847, 81853, 81869, 81883, 81899, 81901, 81919, 81929, + 81931, 81937, 81943, 81953, 81967, 81971, 81973, 82003, 82007, 82009, + 82013, 82021, 82031, 82037, 82039, 82051, 82067, 82073, 82129, 82139, + 82141, 82153, 82163, 82171, 82183, 82189, 82193, 82207, 82217, 82219, + 82223, 82231, 82237, 82241, 82261, 82267, 82279, 82301, 82307, 82339, + 82349, 82351, 82361, 82373, 82387, 82393, 82421, 82457, 82463, 82469, + 82471, 82483, 82487, 82493, 82499, 82507, 82529, 82531, 82549, 82559, + 82561, 82567, 82571, 82591, 82601, 82609, 82613, 82619, 82633, 82651, + 82657, 82699, 82721, 82723, 82727, 82729, 82757, 82759, 82763, 82781, + 82787, 82793, 82799, 82811, 82813, 82837, 82847, 82883, 82889, 82891, + 82903, 82913, 82939, 82963, 82981, 82997, 83003, 83009, 83023, 83047, + 83059, 83063, 83071, 83077, 83089, 83093, 83101, 83117, 83137, 83177, + 83203, 83207, 83219, 83221, 83227, 83231, 83233, 83243, 83257, 83267, + 83269, 83273, 83299, 83311, 83339, 83341, 83357, 83383, 83389, 83399, + 83401, 83407, 83417, 83423, 83431, 83437, 83443, 83449, 83459, 83471, + 83477, 83497, 83537, 83557, 83561, 83563, 83579, 83591, 83597, 83609, + 83617, 83621, 83639, 83641, 83653, 83663, 83689, 83701, 83717, 83719, + 83737, 83761, 83773, 83777, 83791, 83813, 83833, 83843, 83857, 83869, + 83873, 83891, 83903, 83911, 83921, 83933, 83939, 83969, 83983, 83987, + 84011, 84017, 84047, 84053, 84059, 84061, 84067, 84089, 84121, 84127, + 84131, 84137, 84143, 84163, 84179, 84181, 84191, 84199, 84211, 84221, + 84223, 84229, 84239, 84247, 84263, 84299, 84307, 84313, 84317, 84319, + 84347, 84349, 84377, 84389, 84391, 84401, 84407, 84421, 84431, 84437, + 84443, 84449, 84457, 84463, 84467, 84481, 84499, 84503, 84509, 84521, + 84523, 84533, 84551, 84559, 84589, 84629, 84631, 84649, 84653, 84659, + 84673, 84691, 84697, 84701, 84713, 84719, 84731, 84737, 84751, 84761, + 84787, 84793, 84809, 84811, 84827, 84857, 84859, 84869, 84871, 84913, + 84919, 84947, 84961, 84967, 84977, 84979, 84991, 85009, 85021, 85027, + 85037, 85049, 85061, 85081, 85087, 85091, 85093, 85103, 85109, 85121, + 85133, 85147, 85159, 85193, 85199, 85201, 85213, 85223, 85229, 85237, + 85243, 85247, 85259, 85297, 85303, 85313, 85331, 85333, 85361, 85363, + 85369, 85381, 85411, 85427, 85429, 85439, 85447, 85451, 85453, 85469, + 85487, 85513, 85517, 85523, 85531, 85549, 85571, 85577, 85597, 85601, + 85607, 85619, 85621, 85627, 85639, 85643, 85661, 85667, 85669, 85691, + 85703, 85711, 85717, 85733, 85751, 85781, 85793, 85817, 85819, 85829, + 85831, 85837, 85843, 85847, 85853, 85889, 85903, 85909, 85931, 85933, + 85991, 85999, 86011, 86017, 86027, 86029, 86069, 86077, 86083, 86111, + 86113, 86117, 86131, 86137, 86143, 86161, 86171, 86179, 86183, 86197, + 86201, 86209, 86239, 86243, 86249, 86257, 86263, 86269, 86287, 86291, + 86293, 86297, 86311, 86323, 86341, 86351, 86353, 86357, 86369, 86371, + 86381, 86389, 86399, 86413, 86423, 86441, 86453, 86461, 86467, 86477, + 86491, 86501, 86509, 86531, 86533, 86539, 86561, 86573, 86579, 86587, + 86599, 86627, 86629, 86677, 86689, 86693, 86711, 86719, 86729, 86743, + 86753, 86767, 86771, 86783, 86813, 86837, 86843, 86851, 86857, 86861, + 86869, 86923, 86927, 86929, 86939, 86951, 86959, 86969, 86981, 86993, + 87011, 87013, 87037, 87041, 87049, 87071, 87083, 87103, 87107, 87119, + 87121, 87133, 87149, 87151, 87179, 87181, 87187, 87211, 87221, 87223, + 87251, 87253, 87257, 87277, 87281, 87293, 87299, 87313, 87317, 87323, + 87337, 87359, 87383, 87403, 87407, 87421, 87427, 87433, 87443, 87473, + 87481, 87491, 87509, 87511, 87517, 87523, 87539, 87541, 87547, 87553, + 87557, 87559, 87583, 87587, 87589, 87613, 87623, 87629, 87631, 87641, + 87643, 87649, 87671, 87679, 87683, 87691, 87697, 87701, 87719, 87721, + 87739, 87743, 87751, 87767, 87793, 87797, 87803, 87811, 87833, 87853, + 87869, 87877, 87881, 87887, 87911, 87917, 87931, 87943, 87959, 87961, + 87973, 87977, 87991, 88001, 88003, 88007, 88019, 88037, 88069, 88079, + 88093, 88117, 88129, 88169, 88177, 88211, 88223, 88237, 88241, 88259, + 88261, 88289, 88301, 88321, 88327, 88337, 88339, 88379, 88397, 88411, + 88423, 88427, 88463, 88469, 88471, 88493, 88499, 88513, 88523, 88547, + 88589, 88591, 88607, 88609, 88643, 88651, 88657, 88661, 88663, 88667, + 88681, 88721, 88729, 88741, 88747, 88771, 88789, 88793, 88799, 88801, + 88807, 88811, 88813, 88817, 88819, 88843, 88853, 88861, 88867, 88873, + 88883, 88897, 88903, 88919, 88937, 88951, 88969, 88993, 88997, 89003, + 89009, 89017, 89021, 89041, 89051, 89057, 89069, 89071, 89083, 89087, + 89101, 89107, 89113, 89119, 89123, 89137, 89153, 89189, 89203, 89209, + 89213, 89227, 89231, 89237, 89261, 89269, 89273, 89293, 89303, 89317, + 89329, 89363, 89371, 89381, 89387, 89393, 89399, 89413, 89417, 89431, + 89443, 89449, 89459, 89477, 89491, 89501, 89513, 89519, 89521, 89527, + 89533, 89561, 89563, 89567, 89591, 89597, 89599, 89603, 89611, 89627, + 89633, 89653, 89657, 89659, 89669, 89671, 89681, 89689, 89753, 89759, + 89767, 89779, 89783, 89797, 89809, 89819, 89821, 89833, 89839, 89849, + 89867, 89891, 89897, 89899, 89909, 89917, 89923, 89939, 89959, 89963, + 89977, 89983, 89989, 90001, 90007, 90011, 90017, 90019, 90023, 90031, + 90053, 90059, 90067, 90071, 90073, 90089, 90107, 90121, 90127, 90149, + 90163, 90173, 90187, 90191, 90197, 90199, 90203, 90217, 90227, 90239, + 90247, 90263, 90271, 90281, 90289, 90313, 90353, 90359, 90371, 90373, + 90379, 90397, 90401, 90403, 90407, 90437, 90439, 90469, 90473, 90481, + 90499, 90511, 90523, 90527, 90529, 90533, 90547, 90583, 90599, 90617, + 90619, 90631, 90641, 90647, 90659, 90677, 90679, 90697, 90703, 90709, + 90731, 90749, 90787, 90793, 90803, 90821, 90823, 90833, 90841, 90847, + 90863, 90887, 90901, 90907, 90911, 90917, 90931, 90947, 90971, 90977, + 90989, 90997, 91009, 91019, 91033, 91079, 91081, 91097, 91099, 91121, + 91127, 91129, 91139, 91141, 91151, 91153, 91159, 91163, 91183, 91193, + 91199, 91229, 91237, 91243, 91249, 91253, 91283, 91291, 91297, 91303, + 91309, 91331, 91367, 91369, 91373, 91381, 91387, 91393, 91397, 91411, + 91423, 91433, 91453, 91457, 91459, 91463, 91493, 91499, 91513, 91529, + 91541, 91571, 91573, 91577, 91583, 91591, 91621, 91631, 91639, 91673, + 91691, 91703, 91711, 91733, 91753, 91757, 91771, 91781, 91801, 91807, + 91811, 91813, 91823, 91837, 91841, 91867, 91873, 91909, 91921, 91939, + 91943, 91951, 91957, 91961, 91967, 91969, 91997, 92003, 92009, 92033, + 92041, 92051, 92077, 92083, 92107, 92111, 92119, 92143, 92153, 92173, + 92177, 92179, 92189, 92203, 92219, 92221, 92227, 92233, 92237, 92243, + 92251, 92269, 92297, 92311, 92317, 92333, 92347, 92353, 92357, 92363, + 92369, 92377, 92381, 92383, 92387, 92399, 92401, 92413, 92419, 92431, + 92459, 92461, 92467, 92479, 92489, 92503, 92507, 92551, 92557, 92567, + 92569, 92581, 92593, 92623, 92627, 92639, 92641, 92647, 92657, 92669, + 92671, 92681, 92683, 92693, 92699, 92707, 92717, 92723, 92737, 92753, + 92761, 92767, 92779, 92789, 92791, 92801, 92809, 92821, 92831, 92849, + 92857, 92861, 92863, 92867, 92893, 92899, 92921, 92927, 92941, 92951, + 92957, 92959, 92987, 92993, 93001, 93047, 93053, 93059, 93077, 93083, + 93089, 93097, 93103, 93113, 93131, 93133, 93139, 93151, 93169, 93179, + 93187, 93199, 93229, 93239, 93241, 93251, 93253, 93257, 93263, 93281, + 93283, 93287, 93307, 93319, 93323, 93329, 93337, 93371, 93377, 93383, + 93407, 93419, 93427, 93463, 93479, 93481, 93487, 93491, 93493, 93497, + 93503, 93523, 93529, 93553, 93557, 93559, 93563, 93581, 93601, 93607, + 93629, 93637, 93683, 93701, 93703, 93719, 93739, 93761, 93763, 93787, + 93809, 93811, 93827, 93851, 93871, 93887, 93889, 93893, 93901, 93911, + 93913, 93923, 93937, 93941, 93949, 93967, 93971, 93979, 93983, 93997, + 94007, 94009, 94033, 94049, 94057, 94063, 94079, 94099, 94109, 94111, + 94117, 94121, 94151, 94153, 94169, 94201, 94207, 94219, 94229, 94253, + 94261, 94273, 94291, 94307, 94309, 94321, 94327, 94331, 94343, 94349, + 94351, 94379, 94397, 94399, 94421, 94427, 94433, 94439, 94441, 94447, + 94463, 94477, 94483, 94513, 94529, 94531, 94541, 94543, 94547, 94559, + 94561, 94573, 94583, 94597, 94603, 94613, 94621, 94649, 94651, 94687, + 94693, 94709, 94723, 94727, 94747, 94771, 94777, 94781, 94789, 94793, + 94811, 94819, 94823, 94837, 94841, 94847, 94849, 94873, 94889, 94903, + 94907, 94933, 94949, 94951, 94961, 94993, 94999, 95003, 95009, 95021, + 95027, 95063, 95071, 95083, 95087, 95089, 95093, 95101, 95107, 95111, + 95131, 95143, 95153, 95177, 95189, 95191, 95203, 95213, 95219, 95231, + 95233, 95239, 95257, 95261, 95267, 95273, 95279, 95287, 95311, 95317, + 95327, 95339, 95369, 95383, 95393, 95401, 95413, 95419, 95429, 95441, + 95443, 95461, 95467, 95471, 95479, 95483, 95507, 95527, 95531, 95539, + 95549, 95561, 95569, 95581, 95597, 95603, 95617, 95621, 95629, 95633, + 95651, 95701, 95707, 95713, 95717, 95723, 95731, 95737, 95747, 95773, + 95783, 95789, 95791, 95801, 95803, 95813, 95819, 95857, 95869, 95873, + 95881, 95891, 95911, 95917, 95923, 95929, 95947, 95957, 95959, 95971, + 95987, 95989, 96001, 96013, 96017, 96043, 96053, 96059, 96079, 96097, + 96137, 96149, 96157, 96167, 96179, 96181, 96199, 96211, 96221, 96223, + 96233, 96259, 96263, 96269, 96281, 96289, 96293, 96323, 96329, 96331, + 96337, 96353, 96377, 96401, 96419, 96431, 96443, 96451, 96457, 96461, + 96469, 96479, 96487, 96493, 96497, 96517, 96527, 96553, 96557, 96581, + 96587, 96589, 96601, 96643, 96661, 96667, 96671, 96697, 96703, 96731, + 96737, 96739, 96749, 96757, 96763, 96769, 96779, 96787, 96797, 96799, + 96821, 96823, 96827, 96847, 96851, 96857, 96893, 96907, 96911, 96931, + 96953, 96959, 96973, 96979, 96989, 96997, 97001, 97003, 97007, 97021, + 97039, 97073, 97081, 97103, 97117, 97127, 97151, 97157, 97159, 97169, + 97171, 97177, 97187, 97213, 97231, 97241, 97259, 97283, 97301, 97303, + 97327, 97367, 97369, 97373, 97379, 97381, 97387, 97397, 97423, 97429, + 97441, 97453, 97459, 97463, 97499, 97501, 97511, 97523, 97547, 97549, + 97553, 97561, 97571, 97577, 97579, 97583, 97607, 97609, 97613, 97649, + 97651, 97673, 97687, 97711, 97729, 97771, 97777, 97787, 97789, 97813, + 97829, 97841, 97843, 97847, 97849, 97859, 97861, 97871, 97879, 97883, + 97919, 97927, 97931, 97943, 97961, 97967, 97973, 97987, 98009, 98011, + 98017, 98041, 98047, 98057, 98081, 98101, 98123, 98129, 98143, 98179, + 98207, 98213, 98221, 98227, 98251, 98257, 98269, 98297, 98299, 98317, + 98321, 98323, 98327, 98347, 98369, 98377, 98387, 98389, 98407, 98411, + 98419, 98429, 98443, 98453, 98459, 98467, 98473, 98479, 98491, 98507, + 98519, 98533, 98543, 98561, 98563, 98573, 98597, 98621, 98627, 98639, + 98641, 98663, 98669, 98689, 98711, 98713, 98717, 98729, 98731, 98737, + 98773, 98779, 98801, 98807, 98809, 98837, 98849, 98867, 98869, 98873, + 98887, 98893, 98897, 98899, 98909, 98911, 98927, 98929, 98939, 98947, + 98953, 98963, 98981, 98993, 98999, 99013, 99017, 99023, 99041, 99053, + 99079, 99083, 99089, 99103, 99109, 99119, 99131, 99133, 99137, 99139, + 99149, 99173, 99181, 99191, 99223, 99233, 99241, 99251, 99257, 99259, + 99277, 99289, 99317, 99347, 99349, 99367, 99371, 99377, 99391, 99397, + 99401, 99409, 99431, 99439, 99469, 99487, 99497, 99523, 99527, 99529, + 99551, 99559, 99563, 99571, 99577, 99581, 99607, 99611, 99623, 99643, + 99661, 99667, 99679, 99689, 99707, 99709, 99713, 99719, 99721, 99733, + 99761, 99767, 99787, 99793, 99809, 99817, 99823, 99829, 99833, 99839, + 99859, 99871, 99877, 99881, 99901, 99907, 99923, 99929, 99961, 99971, + 99989, 99991, 100003, 100019, 100043, 100049, 100057, 100069, 100103, 100109, + 100129, 100151, 100153, 100169, 100183, 100189, 100193, 100207, 100213, 100237, + 100267, 100271, 100279, 100291, 100297, 100313, 100333, 100343, 100357, 100361, + 100363, 100379, 100391, 100393, 100403, 100411, 100417, 100447, 100459, 100469, + 100483, 100493, 100501, 100511, 100517, 100519, 100523, 100537, 100547, 100549, + 100559, 100591, 100609, 100613, 100621, 100649, 100669, 100673, 100693, 100699, + 100703, 100733, 100741, 100747, 100769, 100787, 100799, 100801, 100811, 100823, + 100829, 100847, 100853, 100907, 100913, 100927, 100931, 100937, 100943, 100957, + 100981, 100987, 100999, 101009, 101021, 101027, 101051, 101063, 101081, 101089, + 101107, 101111, 101113, 101117, 101119, 101141, 101149, 101159, 101161, 101173, + 101183, 101197, 101203, 101207, 101209, 101221, 101267, 101273, 101279, 101281, + 101287, 101293, 101323, 101333, 101341, 101347, 101359, 101363, 101377, 101383, + 101399, 101411, 101419, 101429, 101449, 101467, 101477, 101483, 101489, 101501, + 101503, 101513, 101527, 101531, 101533, 101537, 101561, 101573, 101581, 101599, + 101603, 101611, 101627, 101641, 101653, 101663, 101681, 101693, 101701, 101719, + 101723, 101737, 101741, 101747, 101749, 101771, 101789, 101797, 101807, 101833, + 101837, 101839, 101863, 101869, 101873, 101879, 101891, 101917, 101921, 101929, + 101939, 101957, 101963, 101977, 101987, 101999, 102001, 102013, 102019, 102023, + 102031, 102043, 102059, 102061, 102071, 102077, 102079, 102101, 102103, 102107, + 102121, 102139, 102149, 102161, 102181, 102191, 102197, 102199, 102203, 102217, + 102229, 102233, 102241, 102251, 102253, 102259, 102293, 102299, 102301, 102317, + 102329, 102337, 102359, 102367, 102397, 102407, 102409, 102433, 102437, 102451, + 102461, 102481, 102497, 102499, 102503, 102523, 102533, 102539, 102547, 102551, + 102559, 102563, 102587, 102593, 102607, 102611, 102643, 102647, 102653, 102667, + 102673, 102677, 102679, 102701, 102761, 102763, 102769, 102793, 102797, 102811, + 102829, 102841, 102859, 102871, 102877, 102881, 102911, 102913, 102929, 102931, + 102953, 102967, 102983, 103001, 103007, 103043, 103049, 103067, 103069, 103079, + 103087, 103091, 103093, 103099, 103123, 103141, 103171, 103177, 103183, 103217, + 103231, 103237, 103289, 103291, 103307, 103319, 103333, 103349, 103357, 103387, + 103391, 103393, 103399, 103409, 103421, 103423, 103451, 103457, 103471, 103483, + 103511, 103529, 103549, 103553, 103561, 103567, 103573, 103577, 103583, 103591, + 103613, 103619, 103643, 103651, 103657, 103669, 103681, 103687, 103699, 103703, + 103723, 103769, 103787, 103801, 103811, 103813, 103837, 103841, 103843, 103867, + 103889, 103903, 103913, 103919, 103951, 103963, 103967, 103969, 103979, 103981, + 103991, 103993, 103997, 104003, 104009, 104021, 104033, 104047, 104053, 104059, + 104087, 104089, 104107, 104113, 104119, 104123, 104147, 104149, 104161, 104173, + 104179, 104183, 104207, 104231, 104233, 104239, 104243, 104281, 104287, 104297, + 104309, 104311, 104323, 104327, 104347, 104369, 104381, 104383, 104393, 104399, + 104417, 104459, 104471, 104473, 104479, 104491, 104513, 104527, 104537, 104543, + 104549, 104551, 104561, 104579, 104593, 104597, 104623, 104639, 104651, 104659, + 104677, 104681, 104683, 104693, 104701, 104707, 104711, 104717, 104723, 104729) + return(firsts) +} #end function primes +#-------------------------------------------------------------------------------------------# diff --git a/R-utils/qapply.r b/R-utils/qapply.r new file mode 100644 index 000000000..c188749c3 --- /dev/null +++ b/R-utils/qapply.r @@ -0,0 +1,100 @@ +#==========================================================================================# +#==========================================================================================# +# Function qapply. # +# Developed by Marcos Longo - EPS/Harvard University # +# # +# This function is a combination of apply and tapply, so you can use tapply-like # +# commands in matrices and arrays. # +#------------------------------------------------------------------------------------------# +qapply <<- function(X,INDEX,DIM,FUN,...){ + + #---------------------------------------------------------------------------------------# + # Find the number of dimensions. # + #---------------------------------------------------------------------------------------# + dimexp = dim(X) + ndims = length(dimexp) + if (is.null(dimexp)){ + dimexp = length(X) + ndims = 1 + }#end if + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Make sure that DIM <= ndims. # + #---------------------------------------------------------------------------------------# + if (length(DIM) != 1){ + stop(paste(" DIM must be a scalar! Yours has length ",length(DIM),"...",sep="")) + }else if (DIM > ndims){ + cat (" - # of dimensions of X: ",ndims,"...","\n") + cat (" - DIM: ",DIM,"...","\n") + stop(" DIM must be less than or equal to the # of dimensions of X") + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Determine whether X is a matrix or an array of dimension 2. If ndims=1, then # + # use tapply and return. # + #---------------------------------------------------------------------------------------# + if (ndims == 1){ + eout = tapply(X=X,INDEX=INDEX,FUN=FUN,...) + }else{ + #------------------------------------------------------------------------------------# + # We apply "apply" to all margins but DIM. # + #------------------------------------------------------------------------------------# + margin = sequence(ndims) + margin = margin[-DIM] + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Define the "zapply" function, which is the tapply with different arguments. # + #------------------------------------------------------------------------------------# + zapply = function(zx,zindex,zfunc,...){ + zout = tapply(X=zx,INDEX=zindex,FUN=zfunc,...) + return(zout) + } #end function zapply + #------------------------------------------------------------------------------------# + + + #----- Call zapply by the apply function. -------------------------------------------# + eout = apply(X=X,MARGIN=margin,FUN=zapply,zindex=INDEX,zfunc=FUN,...) + if (is.list(INDEX) && length(INDEX) > 1){ + uniqlist = sapply(X=lapply(X=INDEX,FUN=sort),FUN=unique) + dimuniq = sapply(X=uniqlist,FUN=length,simplify=TRUE) + eout = array (data=eout,dim=c(dimuniq,dim(X)[margin])) + dimnames(eout) = uniqlist + off = length(dimuniq) - 1 + }else{ + off = 0 + }#end if + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Check whether the original data was an array or a data frame. # + #------------------------------------------------------------------------------------# + if (DIM > 1){ + if(DIM < ndims){ + perm = c(seq(from = 2+off,to = DIM+off,by=1) + ,seq(from = 1,to = 1+off,by=1) + ,seq(from = DIM+off+1,to = ndims,by=1) + )#end c + eout = aperm(a=eout,perm=perm) + }else{ + perm = c(seq(from=2+off,to=DIM+off,by=1) + ,seq(from= 1,to= 1+off,by=1) + )#end c + eout = aperm(a=eout,perm=perm) + }#end if (DIM < ndims) + }#end if (DIM > 1) + #------------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------------# + + return(eout) +}#end function qapply +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/quadrature.r b/R-utils/quadrature.r new file mode 100644 index 000000000..d800f5009 --- /dev/null +++ b/R-utils/quadrature.r @@ -0,0 +1,75 @@ +#==========================================================================================# +#==========================================================================================# +# This function evaluates the integral of a function using simple quadrature methods. # +# Instead of finding the full integral, it finds the integral along all from the first to # +# the last point. # +# # +# Input: # +# ~ y -- function evaluations at each x point # +# ~ x -- the x points # +# ~ method -- how to estimate the integral (case insensitive and partial match). # +# Possible values are: # +# "trapezoid" - linear interpolation. # +# "spline" - use spline then integrate. # +#------------------------------------------------------------------------------------------# +quadrature <<- function(y,x,method="trapezoid",subdivisions=10000,cum=FALSE){ + + #----- Decide which method to use. ----------------------------------------------------# + if (length(y) != length(x)){ + cat (" Length of y: ",length(y),"\n") + cat (" Length of x: ",length(x),"\n") + stop(" X and Y must have the same size...") + }else if (any(is.na(x) | is.na(y))){ + cat (" NA found in y: ",any(is.na(y)),"\n") + cat (" NA found in x: ",any(is.na(x)),"\n") + stop(" X and Y cannot contain NA...") + }#end if + #--------------------------------------------------------------------------------------# + + + #--------------------------------------------------------------------------------------# + # Find the vector length. # + #--------------------------------------------------------------------------------------# + nxy = length(x) + #--------------------------------------------------------------------------------------# + + + #----- Decide which method to use. ----------------------------------------------------# + if (substr(tolower(method),1,1) == "t"){ + #----- Trapezoid method. -----------------------------------------------------------# + ybar = c(0,0.5*(y[-nxy]+y[-1])) + dx = c(0,diff(x)) + if (cum){ + cumint = cumsum(ybar*dx) + }else{ + cumint = sum(ybar*dx) + }#end if + #-----------------------------------------------------------------------------------# + }else if (substr(tolower(method),1,1) == "s"){ + smoothy = splinefun(x,y,method="monoH.FC") + if (cum){ + xuse = x + }else{ + xuse = x[nxy] + }#end if + intans = mapply( FUN = integrate + , upper = xuse + , MoreArgs = list( f = smoothy + , lower = x[1] + , subdivisions = subdivisions + , stop.on.error = FALSE + )#end list + )#end mapply + if ( all(unlist(intans["message",]) == "OK") ){ + cumint = unlist(intans["value",] ) + }else{ + warning("Spline method failed, using trapezoid instead") + cumint = quadrature(y,m,method="trapezoid",subdivisions=subdivisions,cum=cum) + }#end if + }else{ + stop(paste("Cannot recognise the method : ",method,"...",sep=" ")) + }#end if + #--------------------------------------------------------------------------------------# +}#end function quadrature +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/radial.flex.r b/R-utils/radial.flex.r new file mode 100644 index 000000000..57843553f --- /dev/null +++ b/R-utils/radial.flex.r @@ -0,0 +1,402 @@ +#==========================================================================================# +#==========================================================================================# +# Function radial.flex # +# # +# This function is almost the same as radial.plot (package plotrix), but it also allows # +# the axes to be expressions. It also has the option to set the background colour for # +# boxed labels. # +#------------------------------------------------------------------------------------------# +radial.flex <<- function ( lengths + , radial.pos = NULL + , labels = NA + , label.pos = NULL + , radlab = FALSE + , lab.col = par("fg") + , lab.bg = par("bg") + , start = 0 + , clockwise = FALSE + , rp.type = "r" + , label.prop = 1.15 + , main = "" + , xlab = "" + , ylab = "" + , line.col = par("fg") + , lty = par("lty") + , lwd = par("lwd") + , mar = c(2, 2, 3, 2) + , show.grid = TRUE + , show.grid.labels = 4 + , show.radial.grid = TRUE + , grid.col = "grey" + , grid.bg = "transparent" + , grid.left = FALSE + , grid.unit = NULL + , point.symbols = NULL + , point.col = NULL + , show.centroid = FALSE + , radial.lim = NULL + , radial.labels = NULL + , radial.col = lab.col + , radial.bg = lab.bg + , boxed.radial = TRUE + , poly.col = NULL + , add = FALSE + , ... + ){ + + + + #---------------------------------------------------------------------------------------# + # Save the current par, we will revert back upon exit. # + #---------------------------------------------------------------------------------------# + oldpar = par("xpd", "mar", "pty") + on.exit(par(oldpar)) + #---------------------------------------------------------------------------------------# + + + + #----- Define default radial limit in case none has been given. ------------------------# + if (is.null(radial.lim)) radial.lim = range(lengths,na.rm=TRUE) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Find out whether the data are a vector or a matrix. We will plot each column as # + # a separate vector in case it is a matrix. # + #---------------------------------------------------------------------------------------# + length.dim = dim(lengths) + if (is.null(length.dim)) { + npoints = length(lengths) + nsets = 1 + lengths = matrix(lengths, nrow = 1) + }else{ + npoints = length.dim[2] + nsets = length.dim[1] + lengths = as.matrix(lengths) + }#end if + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Make sure that none of the lengths are negative. # + #---------------------------------------------------------------------------------------# + lengths = lengths - radial.lim[1] + lengths[lengths < 0] = NA + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # If the azimuths have not been given, assume equal spread around the circle. # + #---------------------------------------------------------------------------------------# + if (is.null(radial.pos[1])){ + radial.pos = seq(from = 0, to = pi * (2 - 2/npoints), length.out = npoints) + }#end if + #---- Make sure that the radial position is also a matrix. -----------------------------# + radial.pos.dim = dim(radial.pos) + if (is.null(radial.pos.dim)){ + radial.pos = matrix(rep(radial.pos, nsets), nrow = nsets, byrow = TRUE) + }else{ + radial.pos = as.matrix(radial.pos) + }#end if + #---- Revert direction in case the radial plot is to go clockwise. ---------------------# + if (clockwise) radial.pos = -radial.pos + #---- Offset the first position in case it is not supposed to start at angle 0. --------# + if (start) radial.pos = radial.pos + start + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Set up grid properties. # + #---------------------------------------------------------------------------------------# + if (show.grid){ + #---- If radial.lim is just the limit, find the nice places to add grid. -----------# + if (length(radial.lim) < 3){ + grid.pos = pretty(radial.lim) + }else{ + grid.pos = radial.lim + }#end if + if (grid.pos[1] < radial.lim[1]) grid.pos = grid.pos[-1] + maxlength = max(grid.pos - radial.lim[1]) + angles = seq(from=0,to=360,by=0.5) * pio180 + }else{ + grid.pos = NA + maxlength = diff(radial.lim) + }#end if + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Open the plotting window in case we aren't simply adding more points. # + #---------------------------------------------------------------------------------------# + if (! add) { + par(mar = mar, pty = "s") + plot.new() + plot.window( xlim = c(-maxlength, maxlength), ylim = c(-maxlength, maxlength),...) + title(main = main, xlab = xlab, ylab = ylab) + #---- Add the grid in case it is sought. -------------------------------------------# + if (show.grid){ + for (i in seq(length(grid.pos), 1, by = -1)){ + xpos = cos(angles) * (grid.pos[i] - radial.lim[1]) + ypos = sin(angles) * (grid.pos[i] - radial.lim[1]) + polygon(xpos, ypos, border = grid.col, col = grid.bg) + }#end for + }#end if + }#end if (! add) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Make sure the spider settings all have the same length. # + #---------------------------------------------------------------------------------------# + par(xpd = TRUE) + if (length(line.col ) < nsets) line.col = sequence(nsets) + if (length(rp.type ) < nsets) rp.type = rep(rp.type ,length.out=nsets) + if (length(point.symbols) < nsets) point.symbols = rep(point.symbols,length.out=nsets) + if (length(point.col ) < nsets) point.col = rep(point.col ,length.out=nsets) + if (length(poly.col ) < nsets) poly.col = rep(poly.col ,length.out=nsets) + if (length(lty ) < nsets) lty = rep(lty ,length.out=nsets) + if (length(lwd ) < nsets) lwd = rep(lwd ,length.out=nsets) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Loop over all elements. # + #---------------------------------------------------------------------------------------# + for (i in 1:nsets){ + if (nsets > 1){ + linecol = line.col [i] + polycol = poly.col [i] + pointcol = point.col [i] + pointsymbols = point.symbols[i] + ltype = lty [i] + lwidth = lwd [i] + }else{ + linecol = line.col + polycol = poly.col + pointcol = point.col + pointsymbols = point.symbols + ltype = lty + lwidth = lwd + }#end if + + #----- Decide which type of radial plot, and set up the point symbols and colour. ---# + rptype = unlist(strsplit(rp.type[i], "")) + if (match("s", rptype, 0)) { + if (is.null(pointsymbols)) pointsymbols = i + if (is.null(pointcol)) pointcol = i + }#end if + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Translate radius and angle into X and Y. # + #------------------------------------------------------------------------------------# + xpos = cos(radial.pos[i, ]) * lengths[i, ] + ypos = sin(radial.pos[i, ]) * lengths[i, ] + if (match("r", rptype, 0)){ + segments(0,0,xpos,ypos,col=linecol,lty=ltype,lwd=lwidth,...) + }#end if + if (match("p", rptype, 0)){ + polygon(xpos,ypos,border=linecol,col=polycol,lty=ltype,lwd=lwidth,...) + }#end if + if (match("s", rptype, 0)){ + points(xpos,ypos,pch=pointsymbols,col=pointcol,...) + }#end if + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Plot the centre of mass (roughly). # + #------------------------------------------------------------------------------------# + if (show.centroid){ + #---------------------------------------------------------------------------------# + # Check whether this is a point centroid or not. # + #---------------------------------------------------------------------------------# + if (match("p", rptype, 0)) { + nvertices = length(xpos) + polygonarea = xpos[nvertices] * ypos[1] - xpos[1] * ypos[nvertices] + for (vertex in 1:(nvertices - 1)){ + polygonarea = ( polygonarea + + xpos[vertex ] * ypos[vertex+1] + - xpos[vertex+1] * ypos[vertex ] + ) + }#end for + + polygonarea = polygonarea/2 + centroidx = ( (xpos[nvertices] + xpos[1]) + * (xpos[nvertices] * ypos[1] - xpos[1] * ypos[nvertices]) ) + centroidy = ( (ypos[nvertices] + ypos[1]) + * (xpos[nvertices] * ypos[1] - xpos[1] * ypos[nvertices]) ) + for (vertex in 1:(nvertices - 1)){ + centroidx = ( centroidx + + ( xpos[vertex ] + xpos[vertex+1] ) + * ( xpos[vertex ] * ypos[vertex+1] + - xpos[vertex+1] * ypos[vertex ] ) ) + centroidy = ( centroidy + + ( ypos[vertex ] + ypos[vertex+1] ) + * ( xpos[vertex ] * ypos[vertex+1] + - xpos[vertex+1] * ypos[vertex ] ) ) + }#end for + + points( x = centroidx/(6 * polygonarea) + , y = centroidy/(6 * polygonarea) + , col = point.col[i] + , pch = point.symbols[i] + , cex = 2 + , ... + )#end points + }else{ + points(x=mean(xpos),y=mean(ypos),col=pointcol,pch=pointsymbols,cex=2,...) + }#end if + #---------------------------------------------------------------------------------# + }#end if + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # Check whether this is a new plot, and add labels. # + #---------------------------------------------------------------------------------------# + if (! add){ + #---- Find out whether labels are expressions or regular text. ----------------------# + if (is.expression(labels[1])){ + is.exp = TRUE + }else{ + is.exp = FALSE + #----- Create default angles (in degrees) for labels. ----------------------------# + if (is.na(labels[1])){ + label.deg = seq(from = 0, to = 330, by = 30) + label.pos = label.deg * pio180 + labels = as.character(round(label.deg, 0)) + }#end if + #---------------------------------------------------------------------------------# + }#end if + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Find where to place the labels. + #------------------------------------------------------------------------------------# + if (is.null(label.pos[1])) { + lablen = length(labels) + label.pos = seq(0, pi * (2 - 2/lablen), length.out = lablen) + }#end if + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Adjust the labels in case the start is not 0 or the plot is clockwise, then # + # find the (x;y) coordinates associated with the labels and plot the lines. # + #------------------------------------------------------------------------------------# + if (clockwise) label.pos = - label.pos + if (start ) label.pos = label.pos + start + xpos = cos(label.pos) * maxlength + ypos = sin(label.pos) * maxlength + if (show.radial.grid) segments(0, 0, xpos, ypos, col = grid.col) + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Plot the angle labels. # + #------------------------------------------------------------------------------------# + xpos = cos(label.pos) * maxlength * label.prop + ypos = sin(label.pos) * maxlength * label.prop + if (radlab) { + for (label in sequence(length(labels))){ + lab.srt = ( (180 * label.pos[label]/pi) + + 180 * (label.pos[label] > pi/2 && label.pos[label] < 3 * pi/2) ) + text( x = xpos[label] + , y = ypos[label] + , labels = if (is.exp){as.expression(labels[label])}else{labels[label]} + , cex = par("cex.axis") + , srt = lab.srt + , col = lab.col + , bg = lab.bg + )#end text + }#end for (label in sequence(length(labels))) + }else{ + boxed.labels( x = xpos + , y = ypos + , labels = if (is.exp){as.expression(labels)}else{labels} + , ypad = 0.7 + , border = FALSE + , col = lab.col + , bg = lab.bg + , cex = par("cex.axis") + )#end boxed.labels + }#end if (radlab) + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Plot the radius labels. # + #------------------------------------------------------------------------------------# + if (show.grid.labels) { + #---- Get the X and Y coordinates to add the labels. -----------------------------# + if ( show.grid.labels %% 2){ + ypos = grid.pos - radial.lim[1] + xpos = rep(0, length(grid.pos)) + if (show.grid.labels == 1) ypos = -ypos + }else{ + xpos = grid.pos - radial.lim[1] + ypos = rep(0, length(grid.pos)) + if (show.grid.labels == 2) xpos = -xpos + }#end if + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Make the labels, and append the units to the last element if the user # + # provided it. # + #---------------------------------------------------------------------------------# + if (is.null(radial.labels)) radial.labels = as.character(grid.pos) + if (! is.null(grid.unit)){ + n.pos = length(grid.pos) + radial.labels[n.pos] = paste(radial.labels[n.pos],grid.unit) + }#end if (! is.null(grid.unit)) + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # Plot the labels using either boxed or regular labels. # + #---------------------------------------------------------------------------------# + if (boxed.radial){ + boxed.labels( x = xpos + , y = ypos + , labels = radial.labels + , border = FALSE + , cex = par("cex.lab") + , col = radial.col + , bg = radial.bg + )#end boxed.labels + }else{ + text( x = xpos + , y = ypos + , labels = radial.labels + , col = radial.col + , bg = radial.bg + , cex = par("cex.lab") + )#end text + }#end if (boxed.radial) + #---------------------------------------------------------------------------------# + }#end if (show.grid.labels) + #------------------------------------------------------------------------------------# + }#end if (! add) + #---------------------------------------------------------------------------------------# + + + invisible() +}#end function radial.flex +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/rconstants.r b/R-utils/rconstants.r new file mode 100644 index 000000000..2b4099f69 --- /dev/null +++ b/R-utils/rconstants.r @@ -0,0 +1,327 @@ +#------------------------------------------------------------------------------------------# +# Trigonometric constants # +#------------------------------------------------------------------------------------------# +pii <<- 1./pi # 1/Pi [ ---] +halfpi <<- pi/2 # Pi/2 [ ---] +sqrtpii <<- 0.564189583547756 # 1/(pi**0.5) [ ---] +twopi <<- pi* 2. # 2 Pi [ ---] +pio180 <<- pi/ 180. # Pi/180 (deg -> rad) [ ---] +onerad <<- 180. / pi # 180/pi (rad -> deg) [ ---] +pi4 <<- pi * 4. # 4 Pi [ ---] +pio4 <<- pi / 4. # Pi/4 [ ---] +pio6 <<- pi / 6. # Pi/6 [ ---] +pio6i <<- 6. / pi # 6/Pi [ ---] +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Algebraic shortcuts # +#------------------------------------------------------------------------------------------# +srtwo <<- sqrt(2.) # Square root of 2. [ ---] +srthree <<- sqrt(3.) # Square root of 3. [ ---] +sqrt2o2 <<- 0.5 * srtwo # Half of srtwo [ ---] +srtwoi <<- 1./srtwo # 1./ Square root of 2. [ ---] +srthreei <<- 1./srthree # 1./ Square root of 3. [ ---] +onethird <<- 1./3. # 1/3 [ ---] +twothirds <<- 2./3. # 2/3 [ ---] +onesixth <<- 1./6. # 1/6 [ ---] +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Universal constants # +#------------------------------------------------------------------------------------------# +stefan <<- 5.6696e-8 # Stefan-Boltzmann constant [ W/m2/K4] +boltzmann <<- 1.3806503e-23 # Boltzmann constant [m2 kg/s2/K] +t00 <<- 273.15 # 0 degC [ degC] +rmol <<- 8.314510 # Molar gas constant [ J/mol/K] +volmol <<- 0.022710980 # Molar volume at STP [ m3] +volmoll <<- volmol*1.e3 # Molar volume at STP [ L] +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# Molar masses and derived variables # +#------------------------------------------------------------------------------------------# +mmdry <<- 0.02897 # Mean dry air molar mass [ kg/mol] +mmo2 <<- 0.03199880 # Mean water molar mass [ kg/mol] +mmh2o <<- 0.01801505 # Mean water molar mass [ kg/mol] +mmco2 <<- 0.0440095 # Mean CO2 molar mass [ kg/mol] +mmdoc <<- mmdry/mmco2 # mmdry/mmco2 [ ----] +mmcod <<- mmco2/mmdry # mmco2/mmdry [ ----] +mmdry1000 <<- 1000.*mmdry # Mean dry air molar mass [ kg/mol] +mmcod1em6 <<- mmcod * 1.e-6 # Convert ppm to kgCO2/kgair [ ----] +mmdryi <<- 1./mmdry # 1./mmdry [ mol/kg] +mmco2i <<- 1./mmco2 # 1./mmco2 [ mol/kg] +mmh2oi <<- 1./mmh2o # 1./mmh2o [ mol/kg] +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# Time conversion units # +#------------------------------------------------------------------------------------------# +yr.day <<- 365.2425 # # of days in a year [ day/yr] +yr.mon <<- 12 # # of months in a year [ mon/yr] +day.sec <<- 86400. # # of seconds in a day [ s/day] +day.sec2 <<- day.sec^2 # # Square of day.sec [ s2/day2] +day.mon <<- yr.day/yr.mon # # of days in a month [ day/mon] +day.min <<- 1440. # # of minutes in a day [ min/day] +day.hr <<- 24. # # of hours in a day [ hr/day] +hr.sec <<- 3600. # # of seconds in an hour [ s/hr] +hr.min <<- 60. # # of minutes in an hour [ min/hr] +min.sec <<- 60. # # of seconds in a minute [ s/min] +yr.sec <<- yr.day * day.sec # # of seconds in a year [ s/yr] +kg2g <<- 1000. # # of grams in a kilogram [ g/kg] +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# General Earth properties # +#------------------------------------------------------------------------------------------# +vonk <<- 0.40 # Von Karman constant [ ---] +grav <<- 9.80665 # Gravity acceleration [ m/s2] +gg <<- .5 * grav # Half of grav [ m/s2] +erad <<- 6370997. # Earth radius [ m] +spcon <<- pio180*erad # One degree of latitude [ m] +spconkm <<- spcon*0.001 # One degree of latitude [ km] +eradi <<- 1./erad # Inverse of Earth radius [ 1/m] +erad2 <<- erad*2 # Earth diameter [ m] +ss60 <<- 1.8663 # Polar stereo conversion to 60 deg [ ] +omega <<- 7.292e-5 # Earth's rotation speed [ rad/s] +viscos <<- .15e-4 # Viscosity coefficient [ ] +solar <<- 1.3533e3 # Solar constant [ W/m2] +p00 <<- 1.e5 # Reference pressure [ Pa] +prefsea <<- 101325. # Reference sea level pressure [ Pa] +p00i <<- 1. / p00 # 1/p00 [ 1/Pa] +o2.ref <<- 0.209 # Nominal O2 concentration [ mol/mol] +capri <<- -23.44 * pio180 # Tropic of Capricornium latitude [ rad] +shsummer <<- -10 # Day of year of S.Hemisphere summer solstice [ day] +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Reference for this block: # +# MU08 - Monteith, J. L., M. H. Unsworth, 2008. Principles of Environmental Physics, # +# third edition, Academic Press, Amsterdam, 418pp. (Chapters 3 and 10). # +# # +# Air diffusion properties. These properties are temperature-dependent in reality, # +# but for simplicity we assume them constants, using the value at 20 degC. # +# # +# Thermal diffusivity - Straight from Table 15.1 of MU08 # +# Kinematic viscosity - Computed from equation on page 32 of MU08; # +# Thermal expansion coefficient - determined by inverting the coefficient at equation # +# 10.11 (MU08). # +# These terms could be easily made function of temperature in the future if needed be. # +#------------------------------------------------------------------------------------------# +th.diff <<- 2.060e-5 # Air thermal diffusivity [ m2/s] +kin.visc <<- 1.516e-5 # Kinematic viscosity [ m2/s] +th.expan <<- 3.43e-3 # Air thermal expansion coeff. [ 1/K] +#------------------------------------------------------------------------------------------# +# Grashof coefficient [1/(K m3)]. This is the coefficient a*g/(nu2) in MU08's # +# equation 10.8, in the equation that defines the Grashof number. # +#------------------------------------------------------------------------------------------# +gr.coeff <<- th.expan * grav / (th.diff * th.diff) +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Dry air properties # +#------------------------------------------------------------------------------------------# +rdry <<- rmol/mmdry # Gas constant for dry air (Ra) [ J/kg/K] +rdryi <<- mmdry/rmol # 1./Gas constant for dry air (Ra) [ kg K/J] +cpdry <<- 1004. # Specific heat at constant pressure [ J/kg/K] +cvdry <<- 717. # Specific heat at constant volume [ J/kg/K] +cpog <<- cpdry /grav # cp/g [ m/K] +rocp <<- rdry / cpdry # Ra/cp [ ----] +cpor <<- cpdry / rdry # Cp/Ra [ ----] +rocv <<- rdry / cvdry # Ra/Cv [ ----] +gocp <<- grav / cpdry # g/Cp, dry adiabatic lapse rate [ K/m] +gordry <<- grav / rdry # g/Ra [ K/m] +cpdryi <<- 1. / cpdry # 1/Cp [ kg K/J] +cpdryi4 <<- 4. * cpdryi # 4/Cp [ kg K/J] +p00k <<- p00^(rdry/cpdry) # p0 ** (Ra/Cp) [ Pa^0.286] +p00ki <<- 1. / p00k # p0 ** (-Ra/Cp) [Pa^-0.286] +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Typical lapse rates for tropics and temperate zone. # +# The value for tropics came from: # +# Gaffen, D. J.; B. D. Santer, J. S. Boyle, J. R. Christy, N. E. Graham, R. J. Ross, # +# 2000: Multidecadal changes in the vertical temperature structure of the # +# tropical troposphere. Science, 287, 1242-1245. # +#------------------------------------------------------------------------------------------# +lapse.trop <<- 5.5e-3 # g/Cp, dry adiabatic lapse rate [ K/m] +lapse.temp <<- 6.5e-3 # g/Cp, dry adiabatic lapse rate [ K/m] +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Water vapour properties # +#------------------------------------------------------------------------------------------# +rh2o <<- rmol/mmh2o # Gas const. for water vapour (Rv) [ J/kg/K] +cph2o <<- 1859. # Heat capacity at const. pres. [ J/kg/K] +cph2oi <<- 1. / cph2o # Inverse of heat capacity [ kg K/J] +cvh2o <<- cph2o-rh2o # Heat capacity at const. volume [ J/kg/K] +gorh2o <<- grav / rh2o # g/Rv [ K/m] +ep <<- mmh2o/mmdry # or Ra/Rv, epsilon [ kg/kg] +epi <<- mmdry/mmh2o # or Rv/Ra, 1/epsilon [ kg/kg] +epim1 <<- epi-1. # that 0.61 term of virtual temp. [ kg/kg] +rh2oocp <<- rh2o / cpdry # Rv/cp [ ----] +toodry <<- 1.e-8 # Minimum acceptable mixing ratio. [ kg/kg] +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Liquid water properties # +#------------------------------------------------------------------------------------------# +wdns <<- 1.000e3 # Liquid water density [ kg/m3] +wdnsi <<- 1./wdns # Inverse of liquid water density [ m3/kg] +cliq <<- 4.186e3 # Liquid water specific heat (Cl) [ J/kg/K] +cliqi <<- 1./cliq # Inverse of water heat capacity [ kg K/J] +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Ice properties # +#------------------------------------------------------------------------------------------# +idns <<- 9.167e2 # "Hard" ice density [ kg/m3] +idnsi <<- 1./idns # Inverse of ice density [ m3/kg] +cice <<- 2.093e3 # Ice specific heat (Ci) [ J/kg/K] +cicei <<- 1. / cice # Inverse of ice heat capacity [ kg K/J] +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Phase change properties # +#------------------------------------------------------------------------------------------# +t3ple <<- 273.16 # Water triple point temp. (T3) [ K] +t3plei <<- 1./t3ple # 1./T3 [ 1/K] +es3ple <<- 611.65685464 # Vapour pressure at T3 (es3) [ Pa] +es3plei <<- 1./es3ple # 1./es3 [ 1/Pa] +epes3ple <<- ep * es3ple # epsilon * es3 [ Pa kg/kg] +rh2ot3ple <<- rh2o * t3ple # Rv * T3 [ J/kg] +alli <<- 3.34e5 # Lat. heat - fusion (Lf) [ J/kg] +alvl3 <<- 2.50e6 # Lat. heat - vaporisation (Lv) at T = T3 [ J/kg] +alvi3 <<- alli + alvl3 # Lat. heat - sublimation (Ls) at T = T3 [ J/kg] +allii <<- 1. / alli # 1./Lf [ kg/J] +aklv <<- alvl3 / cpdry # Lv/Cp [ K] +akiv <<- alvi3 / cpdry # Ls/Cp [ K] +lvordry <<- alvl3 / rdry # Lv/Ra [ K] +lvorvap <<- alvl3 / rh2o # Lv/Rv [ K] +lsorvap <<- alvi3 / rh2o # Ls/Rv [ K] +lvt3ple <<- alvl3 * t3ple # Lv * T3 [ K J/kg] +lst3ple <<- alvi3 * t3ple # Ls * T3 [ K J/kg] +uiicet3 <<- cice * t3ple # internal energy at triple point, only ice [ J/kg] +uiliqt3 <<- uiicet3 + alli # internal energy at triple point, only liq. [ J/kg] +dcpvl <<- cph2o - cliq # Difference of sp. heat [ J/kg/K] +dcpvi <<- cph2o - cice # Difference of sp. heat [ J/kg/K] +#------------------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------------------# +# The following variables are useful when defining the derivatives of theta_il. They # +# correspond to L?(T) - L?' T. # +#------------------------------------------------------------------------------------------# +del.alvl3 <<- alvl3 - dcpvl * t3ple +del.alvi3 <<- alvi3 - dcpvi * t3ple +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Tsupercool are defined as temperatures of supercooled liquid water (water vapour) # +# that will cause the internal energy (enthalpy) to be the same as ice at 0K. It can be # +# used as an offset for temperature when defining internal energy (enthalpy). The next # +# two methods of defining the internal energy for the liquid part: # +# # +# Uliq = Mliq [ Cice T3 + Cliq (T - T3) + Lf] # +# Uliq = Mliq Cliq (T - Tsupercool_liq) # +# # +# H = Mliq [ Cice T3 + Cliq (Ts - T3) + Lv3 + (Cpv - Cliq) (Ts-T3) + Cpv (T-T3) ] # +# H = Mliq Cpv (T - Tsupercool_vap) ] # +# # +# You may be asking yourself why would we have the ice term in the internal energy # +# definition. The reason is that we can think that internal energy is the amount of energy # +# a parcel received to leave the 0K state to reach the current state (or if you prefer the # +# inverse way, Uliq is the amount of energy the parcel would need to lose to become solid # +# at 0K.) # +#------------------------------------------------------------------------------------------# +tsupercool.liq <<- t3ple - (uiicet3+alli) * cliqi +tsupercool.vap <<- cph2oi * ( (cph2o - cice) * t3ple - alvi3 ) +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Minimum temperature for computing the condensation effect of temperature on # +# theta_il, thetae_iv, and associates. Below this temperature, assuming the latent # +# heats as constants becomes a really bad assumption. See : # +# # +# Tripoli, J. T.; and Cotton, W.R., 1981: The use of ice-liquid water potential temper- # +# ature as a thermodynamic variable in deep atmospheric models. Mon. Wea. Rev., # +# v. 109, 1094-1102. # +#------------------------------------------------------------------------------------------# +ttripoli <<- 253. # "Tripoli-Cotton" temp. (Ttr) [ K] +htripoli <<- cpdry*ttripoli # Sensible enthalpy at T=Ttr [ J/kg] +htripolii <<- 1./htripoli # 1./htripoli [ kg/J] +#------------------------------------------------------------------------------------------# + +#------------------------------------------------------------------------------------------# +# Unit conversion, it must be defined locally even for coupled runs. # +#------------------------------------------------------------------------------------------# +mol.2.umol <<- 1.e6 # mol => umol +umol.2.mol <<- 1.e-6 # umol => mol +umol.2.kgC <<- 1.20107e-8 # umol(CO2) => kg(C) +Watts.2.Ein <<- 4.6e-6 # W/m2 => mol/m2/s +Ein.2.Watts <<- 1./Watts.2.Ein # mol/m2/s => W/m2 +kgC.2.umol <<- 1. / umol.2.kgC # kg(C) => umol(CO2) +kgom2.2.tonoha <<- 10. # kg(C)/m2 => ton(C)/ha +tonoha.2.kgom2 <<- 0.1 # ton(C)/ha => kg(C)/m2 +umols.2.kgCyr <<- umol.2.kgC * yr.sec # umol(CO2)/s => kg(C)/yr +kgCyr.2.umols <<- 1. / umols.2.kgCyr # kg(C)/yr => umol(CO2)/s +kgCday.2.umols <<- kgC.2.umol / day.sec # kg(C)/day => umol(CO2)/s +Torr.2.Pa <<- prefsea / 760. # Torr => Pa +Pa.2.Torr <<- 1. / Torr.2.Pa # Pa => Torr +kt.2.mos <<- 1852 / hr.sec # knots => m/s +mos.2.kt <<- 1. / kt.2.mos # m/s => knots +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# Guess for ET from : # +# Malhi, Y., et al. 2009: Exploring the likelihood and mechanism of a climate-change- # +# -induced dieback of the Amazon rainforest. Proc. Natl. Ac. Sci., 106, 20610--20615. # +#------------------------------------------------------------------------------------------# +et.malhi <<- 100 # [mm/month] +#------------------------------------------------------------------------------------------# + +#------------------------------------------------------------------------------------------# +# These are the lower and upper bounds in which we compute exponentials. This is to # +# avoid overflows and/or underflows when we compute exponentials. # +#------------------------------------------------------------------------------------------# +lnexp.min <<- -38. +lnexp.max <<- 38. +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +# These are the just default huge and tiny numbers that are not the actual huge or # +# tiny values from Fortran intrinsic functions, so if you do any numerical operations you # +# will still be fine. # +#------------------------------------------------------------------------------------------# +huge.num <<- 1.e+19 +tiny.num <<- 1.e-19 +#------------------------------------------------------------------------------------------# diff --git a/R-utils/read.q.files.r b/R-utils/read.q.files.r new file mode 100644 index 000000000..c1d680332 --- /dev/null +++ b/R-utils/read.q.files.r @@ -0,0 +1,1289 @@ +#==========================================================================================# +#==========================================================================================# +# This function reads the ED2 monthly mean files that contain mean diurnal cycle. # +# Inputs: # +# - datum -- The monthly structure that will contain the data. It must be initialised # +# by create.monthly, otherwise it won't work. # +# - ntimes -- Total number of times (including previously loaded times). # +# - tresume -- The first time to read (in case data have been partially loaded. # +#------------------------------------------------------------------------------------------# +read.q.files <<- function(datum,ntimes,tresume=1,sasmonth=5){ + + + #----- Copy some dimensions to scalars. ------------------------------------------------# + nzg = datum$nzg + nzs = datum$nzs + ndcycle = datum$ndcycle + isoilflg = datum$isoilflg + slz = datum$slz + slxsand = datum$slxsand + slxclay = datum$slxclay + ntext = datum$ntext + soil.prop = datum$soil.prop + dslz = datum$dslz + soil.depth = datum$soil.depth + soil.dry = datum$soil.dry + soil.poro = datum$soil.poro + ka = datum$ka + kz = datum$kz + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # Copy the variables to scratch lists, we will copy them back once we are done. # + #---------------------------------------------------------------------------------------# + emean = datum$emean + emsqu = datum$emsqu + szpft = datum$szpft + lu = datum$lu + qmean = datum$qmean + qmsqu = datum$qmsqu + patch = datum$patch + cohort = datum$cohort + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # Loop over all times that haven't been read yet. # + #---------------------------------------------------------------------------------------# + for (m in tresume:ntimes){ + + #----- Print a banner to entertain the bored user staring at the screen. ------------# + if (m == tresume | datum$month[m] == 1){ + cat(" - Reading data from year ",datum$year[m],"...","\n") + }#end if + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Number of days in a month. # + #------------------------------------------------------------------------------------# + mondays = daymax(datum$when[m]) + thismonth = datum$month[m] + lastmonth = 1 + (thismonth - 2) %% 12 + thisyear = datum$year [m] + #------------------------------------------------------------------------------------# + + + + + #----- Read data and close connection immediately after. ----------------------------# + h5file = datum$input[m] + h5file.bz2 = paste(datum$input[m],"bz2",sep=".") + if (file.exists(h5file)){ + mymont = hdf5load(file=h5file,load=FALSE,verbosity=0,tidy=TRUE) + + }else if(file.exists(h5file.bz2)){ + temp.file = file.path(tempdir(),basename(h5file)) + dummy = bunzip2(filename=h5file.bz2,destname=temp.file,remove=FALSE) + mymont = hdf5load(file=temp.file,load=FALSE,verbosity=0,tidy=TRUE) + dummy = file.remove(temp.file) + + }else{ + cat (" - File : ",basename(h5file) ,"\n") + cat (" - File (bz2): ",basename(h5file.bz2),"\n") + stop(" Neither the expanded nor the compressed files were found!") + + }#end if + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Find the mean latent heat of vaporisation. Because we assume it to be a # + # linear function of temperature, the mean can be found a posteriori. The mean # + # fluxes won't be exact though, because the covariance part is missing. # + #------------------------------------------------------------------------------------# + mmean.can.alvli.py = alvli(mymont$MMEAN.CAN.TEMP.PY) + qmean.can.alvli.py = alvli(mymont$QMEAN.CAN.TEMP.PY) + mmean.can.alvli.pa = alvli(mymont$MMEAN.CAN.TEMP.PA) + qmean.can.alvli.pa = alvli(mymont$QMEAN.CAN.TEMP.PA) + mmean.can.alvli.py2 = mmean.can.alvli.py * mmean.can.alvli.py + qmean.can.alvli.py2 = qmean.can.alvli.py * qmean.can.alvli.py + mmean.can.alvli.pa2 = mmean.can.alvli.pa * mmean.can.alvli.pa + qmean.can.alvli.pa2 = qmean.can.alvli.pa * qmean.can.alvli.pa + #------------------------------------------------------------------------------------# + + + + #----- Load the total number of patches and cohorts. --------------------------------# + emean$npat.global[m] = mymont$NPATCHES.GLOBAL + emean$ncoh.global[m] = mymont$NCOHORTS.GLOBAL + #------------------------------------------------------------------------------------# + + + #----- Load the simple variables. ---------------------------------------------------# + emean$fast.soil.c [m] = mymont$MMEAN.FAST.SOIL.C.PY + emean$slow.soil.c [m] = mymont$MMEAN.SLOW.SOIL.C.PY + emean$struct.soil.c [m] = mymont$MMEAN.STRUCT.SOIL.C.PY + emean$het.resp [m] = mymont$MMEAN.RH.PY + emean$cwd.resp [m] = mymont$MMEAN.CWD.RH.PY + emean$gpp [m] = mymont$MMEAN.GPP.PY + emean$npp [m] = mymont$MMEAN.NPP.PY + emean$plant.resp [m] = mymont$MMEAN.PLRESP.PY + emean$leaf.resp [m] = mymont$MMEAN.LEAF.RESP.PY + emean$root.resp [m] = mymont$MMEAN.ROOT.RESP.PY + emean$growth.resp [m] = mymont$MMEAN.GROWTH.RESP.PY + emean$reco [m] = mymont$MMEAN.PLRESP.PY + mymont$MMEAN.RH.PY + emean$nep [m] = mymont$MMEAN.NEP.PY + emean$nee [m] = mymont$MMEAN.CARBON.ST.PY - mymont$MMEAN.CARBON.AC.PY + emean$ustar [m] = mymont$MMEAN.USTAR.PY + emean$cflxca [m] = - mymont$MMEAN.CARBON.AC.PY + emean$cflxst [m] = mymont$MMEAN.CARBON.ST.PY + emean$ustar [m] = mymont$MMEAN.USTAR.PY + emean$atm.vels [m] = mymont$MMEAN.ATM.VELS.PY + emean$atm.prss [m] = mymont$MMEAN.ATM.PRSS.PY * 0.01 + emean$atm.temp [m] = mymont$MMEAN.ATM.TEMP.PY - t00 + emean$atm.shv [m] = mymont$MMEAN.ATM.SHV.PY * kg2g + emean$atm.co2 [m] = mymont$MMEAN.ATM.CO2.PY + emean$atm.vpd [m] = mymont$MMEAN.ATM.VPDEF.PY * 0.01 + emean$can.prss [m] = mymont$MMEAN.CAN.PRSS.PY * 0.01 + emean$can.temp [m] = mymont$MMEAN.CAN.TEMP.PY - t00 + emean$can.shv [m] = mymont$MMEAN.CAN.SHV.PY * kg2g + emean$can.co2 [m] = mymont$MMEAN.CAN.CO2.PY + emean$can.vpd [m] = mymont$MMEAN.CAN.VPDEF.PY * 0.01 + emean$gnd.temp [m] = mymont$MMEAN.GND.TEMP.PY - t00 + emean$gnd.shv [m] = mymont$MMEAN.GND.SHV.PY * kg2g + emean$leaf.temp [m] = mymont$MMEAN.LEAF.TEMP.PY - t00 + emean$leaf.vpd [m] = mymont$MMEAN.LEAF.VPDEF.PY * 0.01 + emean$wood.temp [m] = mymont$MMEAN.WOOD.TEMP.PY - t00 + emean$hflxca [m] = - mymont$MMEAN.SENSIBLE.AC.PY + emean$qwflxca [m] = - mymont$MMEAN.VAPOR.AC.PY * mmean.can.alvli.py + emean$hflxgc [m] = mymont$MMEAN.SENSIBLE.GC.PY + emean$hflxlc [m] = mymont$MMEAN.SENSIBLE.LC.PY + emean$hflxwc [m] = mymont$MMEAN.SENSIBLE.WC.PY + emean$wflxca [m] = - mymont$MMEAN.VAPOR.AC.PY * day.sec + emean$wflxgc [m] = mymont$MMEAN.VAPOR.GC.PY * day.sec + emean$wflxlc [m] = mymont$MMEAN.VAPOR.LC.PY * day.sec + emean$wflxwc [m] = mymont$MMEAN.VAPOR.WC.PY * day.sec + emean$evap [m] = ( mymont$MMEAN.VAPOR.GC.PY + + mymont$MMEAN.VAPOR.LC.PY + + mymont$MMEAN.VAPOR.WC.PY ) * day.sec + emean$transp [m] = mymont$MMEAN.TRANSP.PY * day.sec + emean$wue [m] = ( mymont$MMEAN.NPP.PY + / mymont$MMEAN.TRANSP.PY ) * 1000. / yr.day + emean$rain [m] = mymont$MMEAN.PCPG.PY * mondays * day.sec + emean$fs.open [m] = mymont$MMEAN.FS.OPEN.PY + emean$rshort [m] = mymont$MMEAN.ATM.RSHORT.PY + emean$rshort.beam [m] = ( mymont$MMEAN.ATM.RSHORT.PY + - mymont$MMEAN.ATM.RSHORT.DIFF.PY ) + emean$rshort.diff [m] = mymont$MMEAN.ATM.RSHORT.DIFF.PY + emean$rshortup [m] = mymont$MMEAN.RSHORTUP.PY + emean$rlong [m] = mymont$MMEAN.ATM.RLONG.PY + emean$rshort.gnd [m] = mymont$MMEAN.RSHORT.GND.PY + emean$rlong.gnd [m] = mymont$MMEAN.RLONG.GND.PY + emean$rlongup [m] = mymont$MMEAN.RLONGUP.PY + emean$par.tot [m] = mymont$MMEAN.ATM.PAR.PY * Watts.2.Ein * 1.e6 + emean$par.beam [m] = ( mymont$MMEAN.ATM.PAR.PY + - mymont$MMEAN.ATM.PAR.DIFF.PY ) * Watts.2.Ein * 1.e6 + emean$par.diff [m] = mymont$MMEAN.ATM.PAR.DIFF.PY * Watts.2.Ein * 1.e6 + emean$par.gnd [m] = mymont$MMEAN.PAR.GND.PY * Watts.2.Ein * 1.e6 + emean$parup [m] = mymont$MMEAN.PARUP.PY * Watts.2.Ein * 1.e6 + emean$rnet [m] = mymont$MMEAN.RNET.PY + emean$albedo [m] = mymont$MMEAN.ALBEDO.PY + emean$albedo.beam [m] = mymont$MMEAN.ALBEDO.BEAM.PY + emean$albedo.diff [m] = mymont$MMEAN.ALBEDO.DIFF.PY + emean$rlong.albedo [m] = mymont$MMEAN.RLONG.ALBEDO.PY + emean$leaf.gbw [m] = mymont$MMEAN.LEAF.GBW.PY * day.sec + emean$leaf.gsw [m] = mymont$MMEAN.LEAF.GSW.PY * day.sec + emean$wood.gbw [m] = mymont$MMEAN.WOOD.GBW.PY * day.sec + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # The following variables must be aggregated because the polygon-level is split # + # by PFT and DBH class. # + #------------------------------------------------------------------------------------# + emean$mco [m] = apply( X = ( mymont$MMEAN.LEAF.MAINTENANCE.PY + + mymont$MMEAN.ROOT.MAINTENANCE.PY ) + , MARGIN = 1 + , FUN = sum + )#end if + emean$ldrop [m] = apply( X = mymont$MMEAN.LEAF.DROP.PY + , MARGIN = 1 + , FUN = sum + )#end if + #------------------------------------------------------------------------------------# + + + + + #------ Read in soil properties. ----------------------------------------------------# + emean$soil.temp [m,] = mymont$MMEAN.SOIL.TEMP.PY - t00 + emean$soil.water [m,] = mymont$MMEAN.SOIL.WATER.PY + emean$soil.mstpot[m,] = - mymont$MMEAN.SOIL.MSTPOT.PY + #------------------------------------------------------------------------------------# + + + + #----- Find averaged soil properties. -----------------------------------------------# + swater.now = rev(cumsum(rev(mymont$MMEAN.SOIL.WATER.PY * wdns * dslz))) + smoist.avg = swater.now / (wdns * soil.depth) + emean$paw [m] = 100. * ( ( swater.now[ka] - soil.dry [ka] ) + / ( soil.poro [ka] - soil.dry [ka] ) ) + emean$smpot[m] = ( - smoist2mpot(smoist=smoist.avg[ka],mysoil=soil.prop) + * 0.001 * grav ) + #------------------------------------------------------------------------------------# + + + + #----- Read workload, and retrieve only the current month. --------------------------# + emean$workload [m] = mymont$WORKLOAD[thismonth] + emean$specwork [m] = mymont$WORKLOAD[thismonth] / sum(mymont$SIPA.N,na.rm=TRUE) + #------------------------------------------------------------------------------------# + + + + + + #------------------------------------------------------------------------------------# + # Retrieve the sum of squares (that will be used to find standard deviation. # + #------------------------------------------------------------------------------------# + emsqu$gpp [m] = mymont$MMSQU.GPP.PY + emsqu$plant.resp[m] = mymont$MMSQU.PLRESP.PY + emsqu$het.resp [m] = mymont$MMSQU.RH.PY + emsqu$cwd.resp [m] = mymont$MMSQU.CWD.RH.PY + emsqu$cflxca [m] = mymont$MMSQU.CARBON.AC.PY + emsqu$cflxst [m] = mymont$MMSQU.CARBON.ST.PY + emsqu$hflxca [m] = mymont$MMSQU.SENSIBLE.AC.PY + emsqu$hflxlc [m] = mymont$MMSQU.SENSIBLE.LC.PY + emsqu$hflxwc [m] = mymont$MMSQU.SENSIBLE.WC.PY + emsqu$hflxgc [m] = mymont$MMSQU.SENSIBLE.GC.PY + emsqu$wflxca [m] = mymont$MMSQU.VAPOR.AC.PY * day.sec2 + emsqu$qwflxca [m] = mymont$MMSQU.VAPOR.AC.PY * mmean.can.alvli.py2 + emsqu$wflxlc [m] = mymont$MMSQU.VAPOR.LC.PY * day.sec2 + emsqu$wflxwc [m] = mymont$MMSQU.VAPOR.WC.PY * day.sec2 + emsqu$wflxgc [m] = mymont$MMSQU.VAPOR.GC.PY * day.sec2 + emsqu$evap [m] = ( mymont$MMSQU.VAPOR.LC.PY + + mymont$MMSQU.VAPOR.WC.PY + + mymont$MMSQU.VAPOR.GC.PY + + 2. * ( mymont$MMEAN.VAPOR.LC.PY + * mymont$MMEAN.VAPOR.WC.PY + + mymont$MMEAN.VAPOR.LC.PY + * mymont$MMEAN.VAPOR.GC.PY + + mymont$MMEAN.VAPOR.WC.PY + * mymont$MMEAN.VAPOR.GC.PY ) ) * day.sec2 + emsqu$transp [m] = mymont$MMSQU.TRANSP.PY * day.sec2 + emsqu$ustar [m] = mymont$MMSQU.USTAR.PY + emsqu$albedo [m] = mymont$MMSQU.ALBEDO.PY + emsqu$rshortup [m] = mymont$MMSQU.RSHORTUP.PY + emsqu$rlongup [m] = mymont$MMSQU.RLONGUP.PY + emsqu$parup [m] = mymont$MMSQU.PARUP.PY * Watts.2.Ein^2 * 1.e12 + emsqu$rnet [m] = mymont$MMSQU.RNET.PY + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Read the mean diurnal cycle and the mean sum of the squares. # + #------------------------------------------------------------------------------------# + qmean$gpp [m,] = mymont$QMEAN.GPP.PY + qmean$plant.resp [m,] = mymont$QMEAN.PLRESP.PY + qmean$npp [m,] = mymont$QMEAN.NPP.PY + qmean$leaf.resp [m,] = mymont$QMEAN.LEAF.RESP.PY + qmean$root.resp [m,] = mymont$QMEAN.ROOT.RESP.PY + qmean$het.resp [m,] = mymont$QMEAN.RH.PY + qmean$cwd.resp [m,] = mymont$QMEAN.CWD.RH.PY + qmean$nep [m,] = mymont$QMEAN.NEP.PY + qmean$nee [m,] = ( mymont$QMEAN.CARBON.ST.PY + - mymont$QMEAN.CARBON.AC.PY ) + qmean$reco [m,] = mymont$QMEAN.PLRESP.PY + mymont$QMEAN.RH.PY + qmean$cflxca [m,] = - mymont$QMEAN.CARBON.AC.PY + qmean$cflxst [m,] = - mymont$QMEAN.CARBON.ST.PY + qmean$hflxca [m,] = - mymont$QMEAN.SENSIBLE.AC.PY + qmean$hflxlc [m,] = mymont$QMEAN.SENSIBLE.LC.PY + qmean$hflxwc [m,] = mymont$QMEAN.SENSIBLE.WC.PY + qmean$hflxgc [m,] = mymont$QMEAN.SENSIBLE.GC.PY + qmean$wflxca [m,] = - mymont$QMEAN.VAPOR.AC.PY * day.sec + qmean$qwflxca [m,] = - mymont$QMEAN.VAPOR.AC.PY * qmean.can.alvli.py + qmean$wflxlc [m,] = mymont$QMEAN.VAPOR.LC.PY * day.sec + qmean$wflxwc [m,] = mymont$QMEAN.VAPOR.WC.PY * day.sec + qmean$wflxgc [m,] = mymont$QMEAN.VAPOR.GC.PY * day.sec + qmean$evap [m,] = ( mymont$QMEAN.VAPOR.GC.PY + + mymont$QMEAN.VAPOR.WC.PY + + mymont$QMEAN.VAPOR.LC.PY ) * day.sec + qmean$transp [m,] = mymont$QMEAN.TRANSP.PY * day.sec + qmean$atm.temp [m,] = mymont$QMEAN.ATM.TEMP.PY - t00 + qmean$can.temp [m,] = mymont$QMEAN.CAN.TEMP.PY - t00 + qmean$leaf.temp [m,] = mymont$QMEAN.LEAF.TEMP.PY - t00 + qmean$wood.temp [m,] = mymont$QMEAN.WOOD.TEMP.PY - t00 + qmean$gnd.temp [m,] = mymont$QMEAN.GND.TEMP.PY - t00 + qmean$atm.shv [m,] = mymont$QMEAN.ATM.SHV.PY * kg2g + qmean$can.shv [m,] = mymont$QMEAN.CAN.SHV.PY * kg2g + qmean$gnd.shv [m,] = mymont$QMEAN.GND.SHV.PY * kg2g + qmean$atm.vpd [m,] = mymont$QMEAN.ATM.VPDEF.PY * 0.01 + qmean$can.vpd [m,] = mymont$QMEAN.CAN.VPDEF.PY * 0.01 + qmean$leaf.vpd [m,] = mymont$QMEAN.LEAF.VPDEF.PY * 0.01 + qmean$atm.co2 [m,] = mymont$QMEAN.ATM.CO2.PY + qmean$can.co2 [m,] = mymont$QMEAN.CAN.CO2.PY + qmean$atm.vels [m,] = mymont$QMEAN.ATM.VELS.PY + qmean$ustar [m,] = mymont$QMEAN.USTAR.PY + qmean$atm.prss [m,] = mymont$QMEAN.ATM.PRSS.PY * 0.01 + qmean$can.prss [m,] = mymont$QMEAN.CAN.PRSS.PY * 0.01 + qmean$fs.open [m,] = mymont$QMEAN.FS.OPEN.PY + qmean$rain [m,] = mymont$QMEAN.PCPG.PY * day.sec + qmean$rshort [m,] = mymont$QMEAN.ATM.RSHORT.PY + qmean$rshort.beam [m,] = ( mymont$QMEAN.ATM.RSHORT.PY + - mymont$QMEAN.ATM.RSHORT.DIFF.PY ) + qmean$rshort.diff [m,] = mymont$QMEAN.ATM.RSHORT.DIFF.PY + qmean$rshort.gnd [m,] = mymont$QMEAN.RSHORT.GND.PY + qmean$rshortup [m,] = mymont$QMEAN.RSHORTUP.PY + qmean$rlong [m,] = mymont$QMEAN.ATM.RLONG.PY + qmean$rlong.gnd [m,] = mymont$QMEAN.RLONG.GND.PY + qmean$rlongup [m,] = mymont$QMEAN.RLONGUP.PY + qmean$par.tot [m,] = mymont$QMEAN.ATM.PAR.PY * Watts.2.Ein * 1.e6 + qmean$par.beam [m,] = ( mymont$QMEAN.ATM.PAR.PY + - mymont$QMEAN.ATM.PAR.DIFF.PY ) * Watts.2.Ein * 1.e6 + qmean$par.diff [m,] = mymont$QMEAN.ATM.PAR.DIFF.PY * Watts.2.Ein * 1.e6 + qmean$par.gnd [m,] = mymont$QMEAN.PAR.GND.PY * Watts.2.Ein * 1.e6 + qmean$parup [m,] = mymont$QMEAN.PARUP.PY * Watts.2.Ein * 1.e6 + qmean$rnet [m,] = mymont$QMEAN.RNET.PY + qmean$albedo [m,] = mymont$QMEAN.ALBEDO.PY + qmean$albedo.beam [m,] = mymont$QMEAN.ALBEDO.BEAM.PY + qmean$albedo.diff [m,] = mymont$QMEAN.ALBEDO.DIFF.PY + qmean$rlong.albedo[m,] = mymont$QMEAN.RLONG.ALBEDO.PY + qmean$leaf.gbw [m,] = mymont$QMEAN.LEAF.GBW.PY * day.sec + qmean$leaf.gsw [m,] = mymont$QMEAN.LEAF.GSW.PY * day.sec + qmean$wood.gbw [m,] = mymont$QMEAN.WOOD.GBW.PY * day.sec + #------------------------------------------------------------------------------------# + + + + #------ Read the mean sum of squares for diel. --------------------------------------# + qmsqu$gpp [m,] = mymont$QMSQU.GPP.PY + qmsqu$npp [m,] = mymont$QMSQU.NPP.PY + qmsqu$plant.resp [m,] = mymont$QMSQU.PLRESP.PY + qmsqu$het.resp [m,] = mymont$QMSQU.RH.PY + qmsqu$cwd.resp [m,] = mymont$QMSQU.CWD.RH.PY + qmsqu$nep [m,] = mymont$QMSQU.NEP.PY + qmsqu$cflxca [m,] = mymont$QMSQU.CARBON.AC.PY + qmsqu$cflxst [m,] = mymont$QMSQU.CARBON.ST.PY + qmsqu$hflxca [m,] = mymont$QMSQU.SENSIBLE.AC.PY + qmsqu$hflxlc [m,] = mymont$QMSQU.SENSIBLE.LC.PY + qmsqu$hflxwc [m,] = mymont$QMSQU.SENSIBLE.WC.PY + qmsqu$hflxgc [m,] = mymont$QMSQU.SENSIBLE.GC.PY + qmsqu$wflxca [m,] = mymont$QMSQU.VAPOR.AC.PY * day.sec2 + qmsqu$qwflxca [m,] = mymont$QMSQU.VAPOR.AC.PY * qmean.can.alvli.py2 + qmsqu$wflxlc [m,] = mymont$QMSQU.VAPOR.WC.PY * day.sec2 + qmsqu$wflxwc [m,] = mymont$QMSQU.VAPOR.LC.PY * day.sec2 + qmsqu$wflxgc [m,] = mymont$QMSQU.VAPOR.GC.PY * day.sec2 + qmsqu$transp [m,] = mymont$QMSQU.TRANSP.PY * day.sec2 + qmsqu$ustar [m,] = mymont$QMSQU.USTAR.PY + qmsqu$albedo [m,] = mymont$QMSQU.ALBEDO.PY + qmsqu$rshortup [m,] = mymont$QMSQU.RSHORTUP.PY + qmsqu$rlongup [m,] = mymont$QMSQU.RLONGUP.PY + qmsqu$parup [m,] = mymont$QMSQU.PARUP.PY * Watts.2.Ein^2 * 1e12 + #------------------------------------------------------------------------------------# + + + #---- Read in the site-level area. --------------------------------------------------# + areasi = mymont$AREA.SI + npatches = mymont$SIPA.N + #------------------------------------------------------------------------------------# + + + #----- Read a few patch-level variables. --------------------------------------------# + areapa = mymont$AREA * rep(areasi,times=npatches) + ipa = sequence(mymont$NPATCHES.GLOBAL) + lupa = mymont$DIST.TYPE + agepa = mymont$AGE + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Get the water deficit, and the estimate using Malhi's ET (100mm/month). # + #------------------------------------------------------------------------------------# + emean$water.deficit [m] = sum(mymont$AVG.MONTHLY.WATERDEF * areapa) + if (m == 1){ + emean$malhi.deficit[m] = max( 0., et.malhi - emean$rain [m]) + }else{ + emean$malhi.deficit[m] = max( 0., emean$malhi.deficit [m-1] + + et.malhi - emean$rain [m] ) + }#end if + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # If this is a biomass initialisation, or a run with anthropogenic # + # disturbance, we must jitter the age so we can distinguish the patches. # + #------------------------------------------------------------------------------------# + sameage = duplicated(agepa) + agepa[sameage] = jitter(x=agepa[sameage],amount=0.4) + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Get the total number of cohorts. # + #------------------------------------------------------------------------------------# + ncohorts = mymont$PACO.N + ipaconow = rep(sequence(mymont$NPATCHES.GLOBAL),times=mymont$PACO.N) + icoconow = unlist(sapply(X = mymont$PACO.N, FUN = sequence)) + idx = match(unique(ipaconow),sequence(mymont$NPATCHES.GLOBAL)) + #------------------------------------------------------------------------------------# + + + + #----- Disturbance rates. -----------------------------------------------------------# + lu$dist [m,,] = apply ( X = mymont$DISTURBANCE.RATES + , MARGIN = c(2,3) + , FUN = weighted.mean + , w = areasi + )#end apply + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Build the cohort-level lists if this is the right month. # + #------------------------------------------------------------------------------------# + plab = paste( "y",sprintf("%4.4i",thisyear ) + , "m",sprintf("%2.2i",thismonth),sep="") + #----- Bind the current patches. ----------------------------------------------------# + patch$ipa [[plab]] = ipa + patch$age [[plab]] = agepa + patch$area [[plab]] = areapa + patch$lu [[plab]] = lupa + patch$nep [[plab]] = mymont$MMEAN.NEP.PA + patch$het.resp [[plab]] = mymont$MMEAN.RH.PA + patch$can.temp [[plab]] = mymont$MMEAN.CAN.TEMP.PA - t00 + patch$gnd.temp [[plab]] = mymont$MMEAN.GND.TEMP.PA - t00 + patch$can.shv [[plab]] = mymont$MMEAN.CAN.SHV.PA * 1000. + patch$gnd.shv [[plab]] = mymont$MMEAN.GND.SHV.PA * 1000. + patch$can.vpd [[plab]] = mymont$MMEAN.CAN.VPDEF.PA * 0.01 + patch$can.co2 [[plab]] = mymont$MMEAN.CAN.CO2.PA + patch$can.prss [[plab]] = mymont$MMEAN.CAN.PRSS.PA * 0.01 + patch$cflxca [[plab]] = - mymont$MMEAN.CARBON.AC.PA + patch$cflxst [[plab]] = mymont$MMEAN.CARBON.ST.PA + patch$nee [[plab]] = ( mymont$MMEAN.CARBON.ST.PA + - mymont$MMEAN.CARBON.AC.PA ) + patch$hflxca [[plab]] = - mymont$MMEAN.SENSIBLE.AC.PA + patch$hflxgc [[plab]] = mymont$MMEAN.SENSIBLE.GC.PA + patch$qwflxca [[plab]] = - mymont$MMEAN.VAPOR.AC.PA * mmean.can.alvli.pa + patch$wflxca [[plab]] = - mymont$MMEAN.VAPOR.AC.PA + patch$wflxgc [[plab]] = mymont$MMEAN.VAPOR.GC.PA + patch$ustar [[plab]] = mymont$MMEAN.USTAR.PA + patch$albedo [[plab]] = mymont$MMEAN.ALBEDO.PA + patch$rshortup [[plab]] = mymont$MMEAN.RSHORTUP.PA + patch$rlongup [[plab]] = mymont$MMEAN.RLONGUP.PA + patch$parup [[plab]] = mymont$MMEAN.PARUP.PA * Watts.2.Ein * 1e6 + patch$rnet [[plab]] = mymont$MMEAN.RNET.PA + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Find the patch-level properties that are derived from cohort-level. # + #------------------------------------------------------------------------------------# + patch$lai [[plab]] = rep(0.,times=mymont$NPATCHES.GLOBAL) + patch$wai [[plab]] = rep(0.,times=mymont$NPATCHES.GLOBAL) + patch$leaf.temp [[plab]] = mymont$MMEAN.CAN.TEMP.PA - t00 + patch$leaf.vpd [[plab]] = mymont$MMEAN.CAN.VPDEF.PA * 0.01 + patch$wood.temp [[plab]] = mymont$MMEAN.CAN.TEMP.PA - t00 + patch$gpp [[plab]] = rep(0.,times=mymont$NPATCHES.GLOBAL) + patch$npp [[plab]] = rep(0.,times=mymont$NPATCHES.GLOBAL) + patch$plant.resp[[plab]] = rep(0.,times=mymont$NPATCHES.GLOBAL) + patch$leaf.temp [[plab]] = mymont$MMEAN.CAN.TEMP.PA - t00 + patch$hflxlc [[plab]] = rep(0.,times=mymont$NPATCHES.GLOBAL) + patch$hflxwc [[plab]] = rep(0.,times=mymont$NPATCHES.GLOBAL) + patch$wflxlc [[plab]] = rep(0.,times=mymont$NPATCHES.GLOBAL) + patch$wflxwc [[plab]] = rep(0.,times=mymont$NPATCHES.GLOBAL) + patch$transp [[plab]] = rep(0.,times=mymont$NPATCHES.GLOBAL) + + + if (any(ncohorts >0)){ + #----- Find some auxiliary patch-level properties. -------------------------------# + lai.pa = tapply( X = mymont$MMEAN.LAI.CO + , INDEX = ipaconow + , FUN = sum + )#end tapply + wai.pa = tapply( X = mymont$WAI.CO + , INDEX = ipaconow + , FUN = sum + )#end tapply + leaf.energy.pa = tapply( X = mymont$MMEAN.LEAF.ENERGY.CO + , INDEX = ipaconow + , FUN = sum + )#end tapply + leaf.water.pa = tapply( X = mymont$MMEAN.LEAF.WATER.CO + , INDEX = ipaconow + , FUN = sum + )#end tapply + leaf.hcap.pa = tapply( X = mymont$MMEAN.LEAF.HCAP.CO + , INDEX = ipaconow + , FUN = sum + )#end tapply + wood.energy.pa = tapply( X = mymont$MMEAN.WOOD.ENERGY.CO + , INDEX = ipaconow + , FUN = sum + )#end tapply + wood.water.pa = tapply( X = mymont$MMEAN.WOOD.WATER.CO + , INDEX = ipaconow + , FUN = sum + )#end tapply + wood.hcap.pa = tapply( X = mymont$MMEAN.WOOD.HCAP.CO + , INDEX = ipaconow + , FUN = sum + )#end tapply + #---------------------------------------------------------------------------------# + + + #----- Find the temperature and liquid fraction of leaf and wood. ----------------# + leaf.empty = leaf.hcap.pa == 0 + wood.empty = wood.hcap.pa == 0 + leaf.temp.pa = uextcm2tl( uext = leaf.energy.pa + , wmass = leaf.water.pa + , dryhcap = leaf.hcap.pa )$temp - t00 + wood.temp.pa = uextcm2tl( uext = wood.energy.pa + , wmass = wood.water.pa + , dryhcap = wood.hcap.pa )$temp - t00 + leaf.temp.pa[leaf.empty] = NA + wood.temp.pa[wood.empty] = NA + #---------------------------------------------------------------------------------# + + + + + + #----- Find the variables that must be rendered extensive. -----------------------# + gpp.pa = tapply( X = mymont$MMEAN.GPP.CO * mymont$NPLANT + , INDEX = ipaconow + , FUN = sum + )#end tapply + npp.pa = tapply( X = mymont$MMEAN.NPP.CO * mymont$NPLANT + , INDEX = ipaconow + , FUN = sum + )#end tapply + plant.resp.pa = tapply( X = mymont$MMEAN.PLRESP.CO * mymont$NPLANT + , INDEX = ipaconow + , FUN = sum + )#end tapply + #---------------------------------------------------------------------------------# + + + + + + #----- Add the variables that are already extensive. -----------------------------# + hflxlc.pa = tapply( X = mymont$MMEAN.SENSIBLE.LC.CO + , INDEX = ipaconow + , FUN = sum + )#end tapply + hflxwc.pa = tapply( X = mymont$MMEAN.SENSIBLE.WC.CO + , INDEX = ipaconow + , FUN = sum + )#end tapply + wflxlc.pa = tapply( X = mymont$MMEAN.VAPOR.LC.CO * day.sec + , INDEX = ipaconow + , FUN = sum + )#end tapply + wflxwc.pa = tapply( X = mymont$MMEAN.VAPOR.WC.CO * day.sec + , INDEX = ipaconow + , FUN = sum + )#end tapply + transp.pa = tapply( X = mymont$MMEAN.TRANSP.CO * day.sec + , INDEX = ipaconow + , FUN = sum + )#end tapply + #---------------------------------------------------------------------------------# + + + + + + #---------------------------------------------------------------------------------# + # Vapour pressure deficit is found using weighted averages. # + #---------------------------------------------------------------------------------# + leaf.vpd.pa = mapply( FUN = weighted.mean + , x = split(mymont$MMEAN.LEAF.VPDEF.CO,ipaconow) + , w = split(mymont$MMEAN.LAI.CO ,ipaconow) + , SIMPLIFY = TRUE + )#end mapply + leaf.vpd.pa[leaf.empty] = NA + leaf.vpd.pa = leaf.vpd.pa * 0.01 + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # Copy the data back to the patch. # + #---------------------------------------------------------------------------------# + patch$lai [[plab]][idx ] = lai.pa + patch$wai [[plab]][idx ] = wai.pa + patch$leaf.temp [[plab]][idx[! leaf.empty]] = leaf.temp.pa[! leaf.empty] + patch$leaf.vpd [[plab]][idx[! leaf.empty]] = leaf.vpd.pa [! leaf.empty] + patch$wood.temp [[plab]][idx[! wood.empty]] = wood.temp.pa[! wood.empty] + patch$gpp [[plab]][idx ] = gpp.pa + patch$npp [[plab]][idx ] = npp.pa + patch$plant.resp[[plab]][idx ] = npp.pa + patch$hflxlc [[plab]][idx ] = hflxlc.pa + patch$hflxwc [[plab]][idx ] = hflxwc.pa + patch$wflxlc [[plab]][idx ] = wflxlc.pa + patch$wflxwc [[plab]][idx ] = wflxwc.pa + patch$transp [[plab]][idx ] = transp.pa + #---------------------------------------------------------------------------------# + }#end if + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Ecosystem respiration, which is a combination of plant respiration (cohort- # + # -based) and heterotrophic respiration (patch-based). # + #------------------------------------------------------------------------------------# + patch$reco[[plab]] = patch$plant.resp[[plab]] + patch$het.resp[[plab]] + #------------------------------------------------------------------------------------# + + + + + #------------------------------------------------------------------------------------# + # Read the cohort-level variables. Because empty patchs do exist (deserts), # + # we must check whether there is any cohort to be read. If not, assign NA to # + # all variables. # + #------------------------------------------------------------------------------------# + if (any (ncohorts > 0)){ + + + + + areaconow = rep(areapa,times=ncohorts) + + #----- Define the land use classes. ----------------------------------------------# + luconow = rep(lupa,times=ncohorts) + + #----- Define the DBH classes. ---------------------------------------------------# + dbhconow = mymont$DBH + dbhcut = cut(dbhconow,breaks=breakdbh) + dbhlevs = levels(dbhcut) + dbhfac = match(dbhcut,dbhlevs) + #---------------------------------------------------------------------------------# + + + + #----- Define the previous DBH class (for recruitment). --------------------------# + dbhconow.1ago = mymont$DBH * exp(-pmax(0,mymont$DLNDBH.DT)) + dbhcut.1ago = cut(dbhconow.1ago,breaks=breakdbh) + dbhlevs.1ago = levels(dbhcut.1ago) + dbhfac.1ago = match(dbhcut.1ago,dbhlevs.1ago) + #---------------------------------------------------------------------------------# + + + #----- Define the age classes. ---------------------------------------------------# + ageconow = rep(x=agepa,times=ncohorts) + #---------------------------------------------------------------------------------# + + + + #----- Read the cohort level variables. ------------------------------------------# + pftconow = mymont$PFT + nplantconow = mymont$NPLANT + heightconow = mymont$HITE + baconow = mymont$BA.CO + agbconow = mymont$AGB.CO + laiconow = mymont$MMEAN.LAI.CO + waiconow = mymont$WAI.CO + taiconow = laiconow + waiconow + gppconow = mymont$MMEAN.GPP.CO + leaf.respconow = mymont$MMEAN.LEAF.RESP.CO + root.respconow = mymont$MMEAN.ROOT.RESP.CO + growth.respconow = mymont$MMEAN.GROWTH.RESP.CO + plant.respconow = ( mymont$MMEAN.LEAF.RESP.CO + mymont$MMEAN.ROOT.RESP.CO + + mymont$MMEAN.GROWTH.RESP.CO + mymont$MMEAN.STORAGE.RESP.CO + + mymont$MMEAN.VLEAF.RESP.CO ) + nppconow = gppconow-plant.respconow + cbaconow = mymont$MMEAN.CB + cbalightconow = rowMeans(mymont$CB.LIGHTMAX[,1:12]) + cbamoistconow = rowMeans(mymont$CB.MOISTMAX[,1:12]) + cbamaxconow = rowMeans( klight * mymont$CB.LIGHTMAX[,1:12] + + (1. - klight) * mymont$CB.MOISTMAX[,1:12] ) + cbarelconow = mymont$CBR.BAR + mcostconow = ( mymont$MMEAN.LEAF.MAINTENANCE.CO + + mymont$MMEAN.ROOT.MAINTENANCE.CO ) + ldropconow = mymont$MMEAN.LEAF.DROP.CO + fs.openconow = mymont$MMEAN.FS.OPEN.CO + lightconow = mymont$MMEAN.LIGHT.LEVEL.CO + light.beamconow = mymont$MMEAN.LIGHT.LEVEL.BEAM.CO + light.diffconow = mymont$MMEAN.LIGHT.LEVEL.DIFF.CO + + bdeadconow = mymont$BDEAD + bleafconow = mymont$MMEAN.BLEAF.CO + if (all(mymont$MMEAN.BROOT.CO == 0,na.rm=TRUE)){ + brootconow = pft$qroot[pftconow] * dbh2bl(dbh=dbhconow,ipft=pftconow) + }else{ + brootconow = mymont$MMEAN.BROOT.CO + }#end if + bsapwoodconow = mymont$BSAPWOODA+mymont$BSAPWOODB + baliveconow = bleafconow + brootconow + bsapwoodconow + bstorageconow = mymont$MMEAN.BSTORAGE.CO + bseedsconow = mymont$BSEEDS.CO + bgbconow = ( brootconow + mymont$BSAPWOODB + + (1. - pft$agf.bs[pftconow]) * bdeadconow ) + biomassconow = baliveconow + bstorageconow + bseedsconow + bdeadconow + #---------------------------------------------------------------------------------# + + + + #----- Allocation and productivity relative to the total biomass. ----------------# + f.gppconow = 100. * gppconow / biomassconow + f.plant.respconow = 100. * plant.respconow / biomassconow + f.nppconow = 100. * nppconow / biomassconow + f.cbaconow = 100. * cbaconow / biomassconow + f.bstorageconow = 1000. * bstorageconow / biomassconow + f.bleafconow = 1000. * bleafconow / biomassconow + f.brootconow = 1000. * brootconow / biomassconow + f.bseedsconow = 1000. * bseedsconow / biomassconow + #---------------------------------------------------------------------------------# + + + + #----- Energy and water fluxes: convert them to plant area. ----------------------# + hflxlcconow = mymont$MMEAN.SENSIBLE.LC.CO / nplantconow + wflxlcconow = mymont$MMEAN.VAPOR.LC.CO * day.sec / nplantconow + transpconow = mymont$MMEAN.TRANSP.CO * day.sec / nplantconow + #---------------------------------------------------------------------------------# + + + #----- Find the water use efficiency. --------------------------------------------# + wueconow = ifelse(transpconow > 1.e-10, 1000. * nppconow/transpconow/yr.day, 0.) + #---------------------------------------------------------------------------------# + + + #----- Find the conductances. ----------------------------------------------------# + leaf.gbwconow = mymont$MMEAN.LEAF.GBW.CO * day.sec + leaf.gswconow = mymont$MMEAN.LEAF.GSW.CO * day.sec + wood.gbwconow = mymont$MMEAN.WOOD.GBW.CO * day.sec + #---------------------------------------------------------------------------------# + + + #----- Find the net radiation for leaves (in m2/leaf!). --------------------------# + leaf.parconow = ifelse( laiconow > 1.e-10 + , mymont$MMEAN.PAR.L.CO / laiconow * Watts.2.Ein + , 0. + )#end ifelse + leaf.rshortconow = ifelse( laiconow > 1.e-10 + , mymont$MMEAN.RSHORT.L.CO / laiconow + , 0. + )#end ifelse + leaf.rlongconow = ifelse( laiconow > 1.e-10 + , mymont$MMEAN.RLONG.L.CO / laiconow + , 0. + )#end ifelse + #---------------------------------------------------------------------------------# + + + + #------ Find the demand and supply by m2gnd. -------------------------------------# + demandconow = mymont$MMEAN.PSI.OPEN.CO * laiconow * day.sec + supplyconow = mymont$MMEAN.WATER.SUPPLY.CO * day.sec + #---------------------------------------------------------------------------------# + + + #------ Find the demographic rates. ----------------------------------------------# + mortconow = rowSums(mymont$MMEAN.MORT.RATE.CO) + ncbmortconow = mymont$MMEAN.MORT.RATE.CO[,2] + dimortconow = mortconow - ncbmortconow + recruitconow = mymont$RECRUIT.DBH + growthconow = 100. * pmax(0,mymont$DLNDBH.DT) + #---------------------------------------------------------------------------------# + }else{ + #----- Make everything NA. -------------------------------------------------------# + ipaconow = NA + icoconow = NA + areaconow = NA + luconow = NA + dbhconow = NA + dbhcut = NA + dbhlevs = NA + dbhfac = NA + dbhconow.1ago = NA + dbhcut.1ago = NA + dbhlevs.1ago = NA + dbhfac.1ago = NA + ageconow = NA + pftconow = NA + nplantconow = NA + heightconow = NA + baconow = NA + agbconow = NA + bgbconow = NA + biomassconow = NA + laiconow = NA + waiconow = NA + taiconow = NA + gppconow = NA + leaf.respconow = NA + root.respconow = NA + growth.respconow = NA + plant.respconow = NA + nppconow = NA + cbaconow = NA + cbamaxconow = NA + cbalightconow = NA + cbamoistconow = NA + cbarelconow = NA + mcostconow = NA + ldropconow = NA + fs.openconow = NA + lightconow = NA + light.beamconow = NA + light.diffconow = NA + baliveconow = NA + bdeadconow = NA + bleafconow = NA + brootconow = NA + bsapwoodconow = NA + bstorageconow = NA + bseedsconow = NA + hflxlcconow = NA + wflxlcconow = NA + transpconow = NA + wueconow = NA + demandconow = NA + supplyconow = NA + mortconow = NA + ncbmortconow = NA + dimortconow = NA + recruitconow = NA + growthconow = NA + leaf.gbwconow = NA + leaf.gswconow = NA + wood.gbwconow = NA + f.gppconow = NA + f.plant.respconow = NA + f.nppconow = NA + f.cbaconow = NA + f.bstorageconow = NA + f.bleafconow = NA + f.brootconow = NA + f.bseedsconow = NA + leaf.parconow = NA + leaf.rshortconow = NA + leaf.rlongconow = NA + }#end if + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # The following two variables are used to scale "intensive" properties # + # (whatever/plant) to "extensive" (whatever/m2). Sometimes they may be used to # + # build weighted averages. # + #------------------------------------------------------------------------------------# + w.nplant = nplantconow * areaconow + w.lai = laiconow * areaconow + w.wai = waiconow * areaconow + w.tai = taiconow * areaconow + w.biomass = biomassconow * nplantconow + #------------------------------------------------------------------------------------# + + + + + #------------------------------------------------------------------------------------# + # Build the LU arrays. # + #------------------------------------------------------------------------------------# + for (l in sequence(nlu+1)){ + selpa = lupa == l | l == (nlu+1) + if (all(is.na(luconow))){ + sel = rep(FALSE,times=length(luconow)) + }else{ + sel = luconow == l | l == (nlu+1) + }#end if + + if (any(sel)){ + lu$lai [m,l] = sum( laiconow[sel] * areaconow [sel] ) + lu$ba [m,l] = sum( w.nplant[sel] * baconow [sel] ) + lu$agb [m,l] = sum( w.nplant[sel] * agbconow [sel] ) + lu$bgb [m,l] = sum( w.nplant[sel] * bgbconow [sel] ) + lu$biomass[m,l] = sum( w.nplant[sel] * biomassconow [sel] ) + lu$gpp [m,l] = sum( w.nplant[sel] * gppconow [sel] ) + lu$npp [m,l] = sum( w.nplant[sel] * nppconow [sel] ) + }#end if + lu$area [m,l] = lu$area [m,l] + sum(areapa[selpa]) + }#end for + #------------------------------------------------------------------------------------# + + + + + #------------------------------------------------------------------------------------# + # Build the size (DBH) structure arrays. # + #------------------------------------------------------------------------------------# + for (d in sequence(ndbh+1)){ + if (all(is.na(dbhfac))){ + sel.dbh = rep(FALSE,times=length(dbhfac )) + sel.dbh.1ago = rep(FALSE,times=length(dbhfac.1ago)) + }else{ + sel.dbh = dbhfac == d | d == (ndbh+1) + sel.dbh.1ago = dbhfac.1ago == d | d == (ndbh+1) + }#end if + for (p in sequence(npft+1)){ + sel.pft = pftconow == p | p == (npft+1) + sel = sel.pft & sel.dbh + if (any(sel)){ + #----- Extensive properties. -----------------------------------------------# + szpft$lai [m,d,p] = sum( laiconow [sel] + * areaconow [sel] ) + szpft$wai [m,d,p] = sum( waiconow [sel] + * areaconow [sel] ) + szpft$tai [m,d,p] = sum( taiconow [sel] + * areaconow [sel] ) + szpft$nplant [m,d,p] = sum( nplantconow [sel] + * areaconow [sel] ) + szpft$demand [m,d,p] = sum( demandconow [sel] + * areaconow [sel] ) + szpft$supply [m,d,p] = sum( supplyconow [sel] + * areaconow [sel] ) + #----- Intensive properties, use nplant to make them extensive. ------------# + szpft$agb [m,d,p] = sum( w.nplant [sel] + * agbconow [sel] ) + szpft$bgb [m,d,p] = sum( w.nplant [sel] + * bgbconow [sel] ) + szpft$biomass [m,d,p] = sum( w.nplant [sel] + * biomassconow [sel] ) + szpft$ba [m,d,p] = sum( w.nplant [sel] + * baconow [sel] ) + szpft$gpp [m,d,p] = sum( w.nplant [sel] + * gppconow [sel] ) + szpft$npp [m,d,p] = sum( w.nplant [sel] + * nppconow [sel] ) + szpft$mco [m,d,p] = sum( w.nplant [sel] + * mcostconow [sel] ) + szpft$cba [m,d,p] = sum( w.nplant [sel] + * cbaconow [sel] ) + szpft$cbamax [m,d,p] = sum( w.nplant [sel] + * cbamaxconow [sel] ) + szpft$cbalight [m,d,p] = sum( w.nplant [sel] + * cbalightconow [sel] ) + szpft$cbamoist [m,d,p] = sum( w.nplant [sel] + * cbamoistconow [sel] ) + szpft$ldrop [m,d,p] = sum( w.nplant [sel] + * ldropconow [sel] ) + szpft$leaf.resp [m,d,p] = sum( w.nplant [sel] + * leaf.respconow [sel] ) + szpft$root.resp [m,d,p] = sum( w.nplant [sel] + * root.respconow [sel] ) + szpft$growth.resp[m,d,p] = sum( w.nplant [sel] + * growth.respconow [sel] ) + szpft$plant.resp [m,d,p] = sum( w.nplant [sel] + * plant.respconow [sel] ) + szpft$bdead [m,d,p] = sum( w.nplant [sel] + * bdeadconow [sel] ) + szpft$bleaf [m,d,p] = sum( w.nplant [sel] + * bleafconow [sel] ) + szpft$broot [m,d,p] = sum( w.nplant [sel] + * brootconow [sel] ) + szpft$bsapwood [m,d,p] = sum( w.nplant [sel] + * bsapwoodconow [sel] ) + szpft$bstorage [m,d,p] = sum( w.nplant [sel] + * bstorageconow [sel] ) + szpft$bseeds [m,d,p] = sum( w.nplant [sel] + * bseedsconow [sel] ) + szpft$hflxlc [m,d,p] = sum( w.nplant [sel] + * hflxlcconow [sel] ) + szpft$wflxlc [m,d,p] = sum( w.nplant [sel] + * wflxlcconow [sel] ) + szpft$transp [m,d,p] = sum( w.nplant [sel] + * transpconow [sel] ) + #---------------------------------------------------------------------------# + + + + #----- FSO and radiation, weighted means, use LAI as weights. --------------# + szpft$fs.open [m,d,p] = weighted.mean( x = fs.openconow [sel] + , w = laiconow [sel] + )#end weighted.mean + szpft$leaf.par [m,d,p] = weighted.mean( x = leaf.parconow [sel] + , w = laiconow [sel] + )#end weighted.mean + szpft$leaf.rshort[m,d,p] = weighted.mean( x = leaf.rshortconow[sel] + , w = laiconow [sel] + )#end weighted.mean + szpft$leaf.rlong [m,d,p] = weighted.mean( x = leaf.rlongconow [sel] + , w = laiconow [sel] + )#end weighted.mean + #---------------------------------------------------------------------------# + + + #----- Individual-based properties, use weighted mean by Nplant. -----------# + szpft$cbarel [m,d,p] = weighted.mean( x = cbarelconow [sel] + , w = w.nplant [sel]) + szpft$i.gpp [m,d,p] = weighted.mean( x = gppconow [sel] + , w = w.nplant [sel]) + szpft$i.npp [m,d,p] = weighted.mean( x = nppconow [sel] + , w = w.nplant [sel]) + szpft$i.plant.resp [m,d,p] = weighted.mean( x = plant.respconow [sel] + , w = w.nplant [sel]) + szpft$i.mco [m,d,p] = weighted.mean( x = mcostconow [sel] + , w = w.nplant [sel]) + szpft$i.cba [m,d,p] = weighted.mean( x = cbaconow [sel] + , w = w.nplant [sel]) + szpft$i.cbamax [m,d,p] = weighted.mean( x = cbamaxconow [sel] + , w = w.nplant [sel]) + szpft$i.cbalight [m,d,p] = weighted.mean( x = cbalightconow [sel] + , w = w.nplant [sel]) + szpft$i.cbamoist [m,d,p] = weighted.mean( x = cbamoistconow [sel] + , w = w.nplant [sel]) + szpft$i.transp [m,d,p] = weighted.mean( x = transpconow [sel] + , w = w.nplant [sel]) + szpft$i.wflxlc [m,d,p] = weighted.mean( x = wflxlcconow [sel] + , w = w.nplant [sel]) + szpft$i.hflxlc [m,d,p] = weighted.mean( x = hflxlcconow [sel] + , w = w.nplant [sel]) + szpft$wue [m,d,p] = weighted.mean( x = wueconow [sel] + , w = w.nplant [sel]) + szpft$leaf.gbw [m,d,p] = weighted.mean( x = leaf.gbwconow [sel] + , w = w.lai [sel]) + szpft$leaf.gsw [m,d,p] = weighted.mean( x = leaf.gswconow [sel] + , w = w.lai [sel]) + szpft$wood.gbw [m,d,p] = weighted.mean( x = wood.gbwconow [sel] + , w = w.wai [sel]) + #---------------------------------------------------------------------------# + + + #----- Fractional biomass, use biomass as the weighting. -------------------# + szpft$f.gpp [m,d,p] = weighted.mean( x = f.gppconow [sel] + , w = w.biomass [sel]) + szpft$f.plant.resp [m,d,p] = weighted.mean( x = f.plant.respconow [sel] + , w = w.biomass [sel]) + szpft$f.npp [m,d,p] = weighted.mean( x = f.nppconow [sel] + , w = w.biomass [sel]) + szpft$f.cba [m,d,p] = weighted.mean( x = f.cbaconow [sel] + , w = w.biomass [sel]) + szpft$f.bstorage [m,d,p] = weighted.mean( x = f.bstorageconow [sel] + , w = w.biomass [sel]) + szpft$f.bleaf [m,d,p] = weighted.mean( x = f.bleafconow [sel] + , w = w.biomass [sel]) + szpft$f.broot [m,d,p] = weighted.mean( x = f.brootconow [sel] + , w = w.biomass [sel]) + szpft$f.bseeds [m,d,p] = weighted.mean( x = f.bseedsconow [sel] + , w = w.biomass [sel]) + #---------------------------------------------------------------------------# + }#end if + #------------------------------------------------------------------------------# + + + + + #------------------------------------------------------------------------------# + # For mortality and growth, we keep deleting the tiny guys because they # + # skew the rates quite significantly. # + #------------------------------------------------------------------------------# + sel = sel.pft & sel.dbh & dbhconow >= census.dbh.min + if (any(sel)){ + #----- Growth rates are weighted by population. ----------------------------# + szpft$growth [m,d,p] = weighted.mean( x = growthconow[sel] + , w = w.nplant [sel] + )#end weighted.mean + #---------------------------------------------------------------------------# + + + + #---- This is the number of survivors and living before. -------------------# + survivor = sum( w.nplant [sel] ) + previous = sum( w.nplant [sel] + * exp(mortconow [sel] ) ) + szpft$mort [m,d,p] = log( previous / survivor ) + + survivor = sum( w.nplant [sel] ) + previous = sum( w.nplant [sel] + * exp(ncbmortconow [sel] ) ) + szpft$ncbmort[m,d,p] = log( previous / survivor ) + + survivor = sum( w.nplant [sel] ) + previous = sum( w.nplant [sel] + * exp(dimortconow [sel] ) ) + szpft$dimort [m,d,p] = log( previous / survivor ) + }#end if + #------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------# + # Recruitment: we must determine whether the plant grew into the new # + # category or not. # + #------------------------------------------------------------------------------# + sel.pop = sel.pft & sel.dbh & dbhconow >= census.dbh.min + sel.est = sel.pop & sel.dbh.1ago & dbhconow.1ago >= census.dbh.min + if (any(sel.pop) & any(sel.est)){ + population = sum(w.nplant[sel.pop]) + established = sum(w.nplant[sel.est]) + szpft$recr [m,d,p] = log(population / established) + }#end if + #------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------# + # Census variables. They have additional restrictions. # + #------------------------------------------------------------------------------# + sel.tall = heightconow >= census.height.min + sel.fat = dbhconow >= census.dbh.min + #----- "Census" LAI, WAI, and TAI discard small trees. ------------------------# + sel = sel.pft & sel.dbh & sel.tall + if (any(sel)){ + szpft$census.lai[m,d,p] = sum(laiconow[sel] * areaconow[sel]) + szpft$census.wai[m,d,p] = sum(waiconow[sel] * areaconow[sel]) + szpft$census.tai[m,d,p] = sum(taiconow[sel] * areaconow[sel]) + }#end if + #----- "Census" AGB and BA discard skinny trees. ------------------------------# + sel = sel.pft & sel.dbh & sel.fat + if (any(sel)){ + szpft$census.agb[m,d,p] = sum(agbconow[sel] * w.nplant[sel]) + szpft$census.ba [m,d,p] = sum(baconow [sel] * w.nplant[sel]) + }#end if + #------------------------------------------------------------------------------# + }#end for PFT + #---------------------------------------------------------------------------------# + }#end for DBH + #------------------------------------------------------------------------------------# + + + + + #------------------------------------------------------------------------------------# + # Build the derived variables. # + #------------------------------------------------------------------------------------# + emean$npp [m] = szpft$npp [m,ndbh+1,npft+1] + emean$mco [m] = szpft$mco [m,ndbh+1,npft+1] + emean$cba [m] = szpft$cba [m,ndbh+1,npft+1] + emean$cbamax [m] = szpft$cbamax [m,ndbh+1,npft+1] + emean$cbalight [m] = szpft$cbalight [m,ndbh+1,npft+1] + emean$cbamoist [m] = szpft$cbamoist [m,ndbh+1,npft+1] + emean$cbarel [m] = szpft$cbarel [m,ndbh+1,npft+1] + emean$nplant [m] = szpft$nplant [m,ndbh+1,npft+1] + emean$lai [m] = szpft$lai [m,ndbh+1,npft+1] + emean$wai [m] = szpft$wai [m,ndbh+1,npft+1] + emean$tai [m] = szpft$tai [m,ndbh+1,npft+1] + emean$agb [m] = szpft$agb [m,ndbh+1,npft+1] + emean$bgb [m] = szpft$bgb [m,ndbh+1,npft+1] + emean$biomass [m] = szpft$biomass [m,ndbh+1,npft+1] + emean$ldrop [m] = szpft$ldrop [m,ndbh+1,npft+1] + emean$demand [m] = szpft$demand [m,ndbh+1,npft+1] + emean$supply [m] = szpft$supply [m,ndbh+1,npft+1] + emean$i.gpp [m] = szpft$i.gpp [m,ndbh+1,npft+1] + emean$i.npp [m] = szpft$i.npp [m,ndbh+1,npft+1] + emean$i.plresp [m] = szpft$i.plresp [m,ndbh+1,npft+1] + emean$i.mco [m] = szpft$i.mco [m,ndbh+1,npft+1] + emean$i.cba [m] = szpft$i.cba [m,ndbh+1,npft+1] + emean$i.cbamax [m] = szpft$i.cbamax [m,ndbh+1,npft+1] + emean$i.cbalight [m] = szpft$i.cbalight [m,ndbh+1,npft+1] + emean$i.cbamoist [m] = szpft$i.cbamoist [m,ndbh+1,npft+1] + emean$i.transp [m] = szpft$i.transp [m,ndbh+1,npft+1] + emean$i.wflxlc [m] = szpft$i.wflxlc [m,ndbh+1,npft+1] + emean$i.hflxlc [m] = szpft$i.hflxlc [m,ndbh+1,npft+1] + emean$wue [m] = szpft$wue [m,ndbh+1,npft+1] + emean$f.gpp [m] = szpft$f.gpp [m,ndbh+1,npft+1] + emean$f.plant.resp [m] = szpft$f.plant.resp [m,ndbh+1,npft+1] + emean$f.npp [m] = szpft$f.npp [m,ndbh+1,npft+1] + emean$f.cba [m] = szpft$f.cba [m,ndbh+1,npft+1] + emean$f.bstorage [m] = szpft$f.bstorage [m,ndbh+1,npft+1] + emean$f.bleaf [m] = szpft$f.bleaf [m,ndbh+1,npft+1] + emean$f.broot [m] = szpft$f.broot [m,ndbh+1,npft+1] + emean$f.bseeds [m] = szpft$f.bseeds [m,ndbh+1,npft+1] + emean$leaf.par [m] = szpft$leaf.par [m,ndbh+1,npft+1] + emean$leaf.rshort [m] = szpft$leaf.rshort [m,ndbh+1,npft+1] + emean$leaf.rlong [m] = szpft$leaf.rlong [m,ndbh+1,npft+1] + #------------------------------------------------------------------------------------# + + + + + #------------------------------------------------------------------------------------# + # Build the cohort-level lists if this is the right month. # + #------------------------------------------------------------------------------------# + if (thismonth %in% sasmonth){ + clab = paste( "y",sprintf("%4.4i",thisyear ) + , "m",sprintf("%2.2i",thismonth),sep="") + #----- Binding the current cohorts. ----------------------------------------------# + cohort$ipa [[clab]] = ipaconow + cohort$ico [[clab]] = icoconow + cohort$area [[clab]] = areaconow + cohort$lu [[clab]] = luconow + cohort$dbh [[clab]] = dbhconow + cohort$age [[clab]] = ageconow + cohort$pft [[clab]] = pftconow + cohort$nplant [[clab]] = nplantconow * areaconow + cohort$height [[clab]] = heightconow + cohort$ba [[clab]] = nplantconow * baconow * areaconow + cohort$agb [[clab]] = agbconow + cohort$bgb [[clab]] = bgbconow + cohort$biomass [[clab]] = biomassconow + cohort$lai [[clab]] = laiconow + cohort$wai [[clab]] = waiconow + cohort$tai [[clab]] = taiconow + cohort$gpp [[clab]] = gppconow + cohort$leaf.resp [[clab]] = leaf.respconow + cohort$root.resp [[clab]] = root.respconow + cohort$plant.resp [[clab]] = plant.respconow + cohort$npp [[clab]] = nppconow + cohort$cba [[clab]] = cbaconow + cohort$cbamax [[clab]] = cbamaxconow + cohort$cbalight [[clab]] = cbalightconow + cohort$cbamoist [[clab]] = cbamoistconow + cohort$cbarel [[clab]] = cbarelconow + cohort$mcost [[clab]] = mcostconow + cohort$ldrop [[clab]] = ldropconow + cohort$fs.open [[clab]] = fs.openconow + cohort$light [[clab]] = lightconow + cohort$light.beam [[clab]] = light.beamconow + cohort$light.diff [[clab]] = light.diffconow + cohort$balive [[clab]] = baliveconow + cohort$bdead [[clab]] = bdeadconow + cohort$bleaf [[clab]] = bleafconow + cohort$broot [[clab]] = brootconow + cohort$bsapwood [[clab]] = bsapwoodconow + cohort$bstorage [[clab]] = bstorageconow + cohort$bseeds [[clab]] = bseedsconow + cohort$hflxlc [[clab]] = hflxlcconow + cohort$wflxlc [[clab]] = wflxlcconow + cohort$transp [[clab]] = transpconow + cohort$wue [[clab]] = wueconow + cohort$demand [[clab]] = demandconow + cohort$supply [[clab]] = supplyconow + cohort$mort [[clab]] = 100. * (1.0 - exp(-mortconow )) + cohort$ncbmort [[clab]] = 100. * (1.0 - exp(-ncbmortconow )) + cohort$dimort [[clab]] = 100. * (1.0 - exp(-dimortconow )) + cohort$recruit [[clab]] = 100. * (exp(recruitconow) - 1.0) + cohort$growth [[clab]] = growthconow + cohort$f.gpp [[clab]] = f.gppconow + cohort$f.plant.resp [[clab]] = f.plant.respconow + cohort$f.npp [[clab]] = f.nppconow + cohort$f.cba [[clab]] = f.cbaconow + cohort$f.bstorage [[clab]] = f.bstorageconow + cohort$f.bleaf [[clab]] = f.bleafconow + cohort$f.broot [[clab]] = f.brootconow + cohort$f.bseeds [[clab]] = f.bseedsconow + cohort$leaf.par [[clab]] = leaf.parconow + cohort$leaf.rshort [[clab]] = leaf.rshortconow + cohort$leaf.rlong [[clab]] = leaf.rlongconow + } #end if month=sasmonth + #------------------------------------------------------------------------------------# + }# end for (m in tresume,ntimes) + #---------------------------------------------------------------------------------------# + + + + + + + + #---------------------------------------------------------------------------------------# + # Copy the variables back to datum. # + #---------------------------------------------------------------------------------------# + datum$emean = emean + datum$emsqu = emsqu + datum$szpft = szpft + datum$lu = lu + datum$qmean = qmean + datum$qmsqu = qmsqu + datum$patch = patch + datum$cohort = cohort + #---------------------------------------------------------------------------------------# + + return(datum) + #---------------------------------------------------------------------------------------# +}#end function read.q.files +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/read.soil.r b/R-utils/read.soil.r new file mode 100644 index 000000000..9a7a19a05 --- /dev/null +++ b/R-utils/read.soil.r @@ -0,0 +1,113 @@ +#==========================================================================================# +#==========================================================================================# +# This function reads in the soil texture maps. # +#------------------------------------------------------------------------------------------# +read.soil <<- function(stext.type,mapdir=getwd(),fracexp=0.40){ + #------ Define some settings depending on the data set. --------------------------------# + if (stext.type == "quesada"){ + na.strings = "-9999" + byrow = TRUE + yrev = TRUE + reclass = NULL + desc = "Quesada" + sfile = file.path(mapdir,"soilmap","quesada.txt") + }else if (stext.type == "radam"){ + na.strings = "99" + byrow = FALSE + yrev = TRUE + reclass = c( 7, 9, 5, 2, 8, 9, 8, 9,16, 2 + , 6, 1, 2, 2, 8, 7, 5, 3, 3 + )#end c + desc = "RADAM (INPE)" + sfile = file.path(mapdir,"soilmap","radam.txt") + }else if (stext.type == "igbp"){ + na.strings = "-9999" + byrow = TRUE + yrev = TRUE + reclass = NULL + desc = "IGBP" + sfile = file.path(mapdir,"soilmap","igbp.txt") + }else if (stext.type == "fao"){ + na.strings = "NA" + byrow = FALSE + yrev = FALSE + reclass = c( 6, 8, 4, 7, 7, 8,16, 4, 4, 4 + , 7, 4, 4, 4, 8, 4, 8, 4, 4, 8 + , 4, 2, 4, 4, 4, 4, 6, 8, 8, 8 + , 4, 8, 8, 2, 6, 4, 7, 4, 4, 3 + , 4, 6, 7, 4, 4, 4, 4, 4, 4, 4 + , 4, 4, 4, 4, 4, 4, 2, 4, 4, 2 + , 4, 3, 4, 2, 7, 6, 4, 4, 6, 8 + , 8, 7, 2, 5, 4, 5, 6, 6, 4, 2 + , 2, 2, 4, 6, 2, 2, 2, 2, 2, 4 + , 2, 2, 2, 4, 2, 4, 3, 6, 2, 7 + , 4, 4, 4, 8, 8, 8, 3, 7, 4, 4 + , 4, 3, 6, 4, 2, 4, 4, 4, 2, 2 + , 2, 4, 6, 4, 4, 7, 7, 6, 3, 2 + , 2, 6, 6, 6) + desc = "Zobler (FAO)" + sfile = file.path(mapdir,"soilmap","fao.txt") + }else{ + stop(paste(" - Invalid class: ",which.class,"!!!"),sep="") + }#end if + #---------------------------------------------------------------------------------------# + + + + #----- Read the file. ------------------------------------------------------------------# + myall = scan(file=sfile,na.strings=na.strings,quiet=TRUE) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Retrieve the coordinate information. # + #---------------------------------------------------------------------------------------# + nlon = myall[1] + lon0 = myall[2] + dlon = myall[3] + nlat = myall[4] + lat0 = myall[5] + dlat = myall[6] + #---------------------------------------------------------------------------------------# + + + + #------ Save the rest of the data. -----------------------------------------------------# + mydat = myall[7:length(myall)] + sel = is.finite(mydat) + if (! is.null(reclass)){ + mydat[sel] = reclass[mydat[sel]] + }#end if + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # Create a list that contains all the soil texture information. # + #---------------------------------------------------------------------------------------# + myres = list() + myres$name = stext.type + myres$desc = desc + myres$source = sfile + myres$lon = lon0 + seq(from=0,to=nlon-1,by=1) * dlon + myres$lat = lat0 + seq(from=0,to=nlat-1,by=1) * dlat + myres$nlon = nlon + myres$nlat = nlat + myres$dlon = dlon + myres$dlat = dlat + myres$stext = matrix(mydat,ncol=nlat,nrow=nlon,byrow=byrow) + if (yrev) myres$stext[,1:nlat] = myres$stext[,rev(1:nlat)] + + limlon = pretty.xylim(u=myres$lon,fracexp=0.0 ,is.log=FALSE) + limlat = pretty.xylim(u=myres$lat,fracexp=fracexp,is.log=FALSE) + myres$size = plotsize(proje=TRUE,limlon=limlon,limlat=limlat,paper="letter") + #---------------------------------------------------------------------------------------# + + + #----- Return the list. ----------------------------------------------------------------# + return(myres) + #---------------------------------------------------------------------------------------# +}#end function +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/readctl.r b/R-utils/readctl.r new file mode 100644 index 000000000..47b81fbdc --- /dev/null +++ b/R-utils/readctl.r @@ -0,0 +1,138 @@ +#------------------------------------------------------------------------------------------# +# Function readctl # +# Developed by Marcos Longo - EPS/Harvard University # +# # +# This function reads the ctl file, and writes all needed information into a variable of # +# kind list (info). # +#------------------------------------------------------------------------------------------# +readctl = function(ctlfile,size=4){ + library(chron) + ctl0 = scan(file=ctlfile,what="character",sep=(c("\n")),multi.line=TRUE) + ctl = strsplit(x=ctl0,split=" ") + lmax = length(ctl) + for (l in 1:lmax) ctl[[l]] = ctl[[l]][ctl[[l]] != ""] + + template = FALSE + endian = .Platform$endian + for (l in 1:lmax){ + what = tolower(ctl[[l]][1]) + + #----- Reading the binary file name --------------------------------------------------# + if (what == "dset") binary = ctl[[l]][2] + + #----- Reading the undefined value ---------------------------------------------------# + if (what == "undef") undef = as.numeric(ctl[[l]][2]) + + #----- Reading the options line ------------------------------------------------------# + if (what == "options"){ + if (any(tolower(ctl[[l]]) == "template")) template = TRUE + if (any(tolower(ctl[[l]]) == "little_endian")) endian = "little" + if (any(tolower(ctl[[l]]) == "big_endian")) endian = "big" + }#end if (what == "options") + + #----- Reading the xdef line ---------------------------------------------------------# + if (what == "xdef") { + glon = gridp(ctl[[l]],ctl[[l+1]]) + xmax = length(glon) + } #end if (what == "xdef") + + #----- Reading the ydef line ---------------------------------------------------------# + if (what == "ydef") { + glat = gridp(ctl[[l]],ctl[[l+1]]) + ymax = length(glat) + } #end if (what == "ydef") + + #----- Reading the zdef line ---------------------------------------------------------# + if (what == "zdef") { + glev = gridp(ctl[[l]],ctl[[l+1]]) + lmax = length(glev) + } #end if (what == "zdef") + + #----- Reading the tdef line ---------------------------------------------------------# + if (what == "tdef") { + gtime = gridt(as.numeric(ctl[[l]][2]),ctl[[l]][4],ctl[[l]][5]) + tmax = length(gtime) + } #end if (what == "tdef") + + #----- Finding the variable names and their sizes ------------------------------------# + if (what == "vars"){ + nvars = as.numeric(ctl[[l]][2]) + varname = NULL + zmax = NULL + description = NULL + #----- Extracting the variable name and size --------------------------------------# + for (v in 1:nvars){ + #----- Switching underscores by dots, so R won't mess up -----------------------# + aux = ctl[[l+v]][1] + saux = strsplit(x=aux,split="")[[1]] + uscore = which(saux == "_") + saux[uscore] = "." + aux = paste(saux,collapse="") + + varname = c(varname,aux) + zmax = c(zmax,as.numeric(ctl[[l+v]][2])) + #------ Retrieve the original line, since it has the description ---------------# + aux = ctl0[[l+v]][1] + saux = strsplit(aux,split="")[[1]] + uscore = which(saux == "_") + saux[uscore] = "." + aux = paste(saux,collapse="") + description = c(description,aux) + } #end for (v in 1:nvars) + zmax[zmax == 0] = 1 + vmax = length(varname) + } #end if (what == "vars") + } #end for (l in 1:lmax) + + #----- Defining the binary name (or names if it is a template) --------------------------# + path = paste(dirname(ctlfile),"/",sep="") + psplit = strsplit(x=binary,split="")[[1]] + ishat = "^" %in% psplit + hatp = which(psplit == "^")[1] + fullpath = all(substring(binary,1,1) == "/") + if (ishat){ + binary = paste(path,substring(binary,hatp+1),sep="/") + }else if (! fullpath){ + binary = paste(path,binary,sep="/") + }#end fi + + if (template) binary = bintemp(binary,gtime) + +#----- Reading the variables --------------------------------------------------------------# + pos = xmax*ymax*zmax + if (template){ + posicz = cumsum(pos) + posica = 1; for (p in 2:vmax) posica = c(posica,posicz[p-1]+1) + }else{ + posicz = matrix(NA,ncol=vmax,nrow=tmax,dimnames=list(gtime,varname)) + posica = matrix(NA,ncol=vmax,nrow=tmax,dimnames=list(gtime,varname)) + for (tt in 1:tmax) { + posicz[tt,] = (tt-1)*sum(pos)+cumsum(pos) + posica[tt,1] = max(0,posicz[tt-1,vmax],na.rm=TRUE)+1 + if (vmax > 1) posica[tt,2:vmax] = posicz[tt,1:(vmax-1)]+1 + } #end for (tt in 1:tmax) + } #end if (template) + + info = NULL + info$ctl = ctlfile + info$binary = binary + info$size = size + info$template = template + info$undef = undef + info$endian = endian + info$glon = glon + info$glat = glat + info$glev = glev + info$gtime = gtime + info$xmax = xmax + info$ymax = ymax + info$lmax = lmax + info$tmax = tmax + info$varname = varname + info$zmax = zmax + info$description = description + info$posica = posica + info$posicz = posicz + return(info) +} #end function readctl +#------------------------------------------------------------------------------------------# diff --git a/R-utils/readgrads.r b/R-utils/readgrads.r new file mode 100644 index 000000000..27173d237 --- /dev/null +++ b/R-utils/readgrads.r @@ -0,0 +1,234 @@ +#------------------------------------------------------------------------------------------# +# Function readgrads # +# Developed by Marcos Longo - EPS/Harvard University # +# This function extracts the variablem, within the asked interval, using the processed ctl # +# information. # +#------------------------------------------------------------------------------------------# +readgrads = function(vari,info,coord="grid",xlim=NA,ylim=NA,zlim=NA,tlim=NA){ + + #----- Assign the number of variables. -------------------------------------------------# + nvars = length(vari) + + #----- Check whether all requested variables are present. ------------------------------# + isthere = tolower(vari) %in% info$varname + if (! all(isthere)){ + print (paste("Variable ",vari[! isthere]," was not found in the ctl file ", + info$ctl,"...",sep="")) + stop("The variable list has invalid variables...") + }else{ + varid = match(tolower(vari),info$varname) + } #end if (! tolower(vari) in info$varname) + + + #----- Find the boundaries of the subset to be retrieved. ------------------------------# + xlim = sort(xlim) + ylim = sort(ylim) + zlim = sort(zlim) + tlim = sort(tlim) + if (tolower(coord) == "grid"){ + options(warn=-1) + ta = max(tlim[1],1 ,na.rm=TRUE) + tz = min(tlim[2],info$tmax,na.rm=TRUE) + xa = max(xlim[1],1 ,na.rm=TRUE) + xz = min(xlim[2],info$xmax,na.rm=TRUE) + ya = max(ylim[1],1 ,na.rm=TRUE) + yz = min(ylim[2],info$ymax,na.rm=TRUE) + za = max(zlim[1],1 ,na.rm=TRUE) + + #-------------------------------------------------------------------------------------# + # The number of levels may vary for each variable. Ensure that it never exceeds # + # the maximum number of levels for each variable. # + #-------------------------------------------------------------------------------------# + zz = info$zmax[varid] + zz[zz > zlim[2]] = zlim[2] + options(warn=0) + }else if (tolower(coord) == "coord"){ + options(warn=-1) + ta = max(1,which.min(abs(info$gtime-tlim[1]),na.rm=TRUE)) + tz = min(tmax,which.min(abs(info$gtime-tlim[2]),na.rm=TRUE)) + + xa = max(1,which.min(abs(info$glon-xlim[1]),na.rm=TRUE)) + xz = min(xmax,which.min(abs(info$glon-xlim[2]),na.rm=TRUE)) + ya = max(1,which.min(abs(info$glat-ylim[1]),na.rm=TRUE)) + yz = min(ymax,which.min(abs(info$glat-ylim[2]),na.rm=TRUE)) + za = max(1,which.min(abs(info$glev-zlim[1]),na.rm=TRUE)) + + #-------------------------------------------------------------------------------------# + # The number of levels may vary for each variable. Ensure that it never exceeds # + # the maximum number of levels for each variable. # + #-------------------------------------------------------------------------------------# + ze = which.min(abs(info$glev-zlim[2]),na.rm=TRUE) + zz = info$zmax[varid] + zz[zz > ze] = ze + + options(warn=0) + }else{ + stop(paste("Error in coord! The value",coord,"is invalid!", + "Choose 'grid' for grid points or 'coord' for grid coordinates")) + } #end if (tolower(coord) == "grid") + + #---------------------------------------------------------------------------------------# + # Initialise the output, which will contain the data and information about the # + # boundaries of the subset. # + #---------------------------------------------------------------------------------------# + outd = list() + outd$tmax = (tz-ta)+1 + outd$zmax = (zz-za)+1 + outd$xmax = (xz-xa)+1 + outd$ymax = (yz-ya)+1 + outd$gtime = info$gtime[ta:tz] + outd$glev = info$glev[za:max(zz)] + outd$glon = info$glon[xa:xz] + outd$glat = info$glat[ya:yz] + + + #---------------------------------------------------------------------------------------# + # Here we must consider the template and non-template cases slightly differently. # + #---------------------------------------------------------------------------------------# + if (info$template){ + #------------------------------------------------------------------------------------# + # Template case. Because we have a single variable per time, we can assign the # + # variables with the right size. We first assign a template variable, and assign it # + # to each variable. # + #------------------------------------------------------------------------------------# + for (v in 1:nvars){ + data = array(NA,c(length(ta:tz),length(za:zz[v]),length(xa:xz),length(ya:yz))) + assign(x=vari[v],value=data) + rm(data) + } #end for (v in 1:nvars) + + + #------------------------------------------------------------------------------------# + # Now we loop over the times, and for each time we retrieve the variable. Some # + # files may be missing, and if this is the case, we skip the time, so the matrix # + # will remain with NA at that time. # + #------------------------------------------------------------------------------------# + tt = 0 + for (tabs in ta:tz){ + tt = tt + 1 + if (file.exists(info$binary[tabs])){ + print(paste("[+] Reading data from ",info$binary[tabs],"...",sep="")) + mybin = file(description=info$binary[tabs],open="rb") + + #----- Find the range of the full domain for this time and variable. ----------# + xmx = info$xmax + ymx = info$ymax + xr = 1:info$xmax + yr = 1:info$ymax + nzall = sum(info$zmax) + npts = xmx*ymx*nzall + aux = readBin(mybin,n=npts,what="numeric",size=info$size, + endian=info$endian) + + for (v in 1:nvars){ + zmx = info$zmax[varid[v]] + zr = 1:info$zmax[varid[v]] + pr = info$posica[varid[v]]:info$posicz[varid[v]] + + #---------------------------------------------------------------------------# + # Initialise the scratch data array that will temporarily hold the # + # dataset for this time and this variable. # + #---------------------------------------------------------------------------# + thisdata = array(NA,c(xmx,ymx,zmx)) + thisdata[xr,yr,zr] = aux[pr] + + #----- Permute the dimensions so x and y go to the right. ------------------# + thisdata = aperm(a=thisdata,perm=c(3,1,2)) + + #----- Assign NA to missing data. ------------------------------------------# + thisdata[abs((thisdata-(info$undef))/info$undef) < eps()] = NA + + dmin = min(thisdata,na.rm=TRUE) + dmax = max(thisdata,na.rm=TRUE) + print(paste(" [-] Reading variable ",vari[v],"...",sep="")) + + #---------------------------------------------------------------------------# + # Copy the variable to the scratch, copy the subset to this scratch, # + # and copy the scratch back to the variable. # + #---------------------------------------------------------------------------# + data = get(vari[v]) + data[tt,,,] = thisdata[za:zz[v],xa:xz,ya:yz] + assign(x=vari[v],value=data) + + #----- Free the memory used to store the scratch variables. ----------------# + rm(thisdata,data) + }#end for (v in 1:nvars) + rm(aux) + close(mybin) + }else{ + warning(paste("Skipping the non-existent file",info$binary[tabs], + "and adding NA...")) + } #end if + }#end for (tt in ta:tz) + }else{ + #------------------------------------------------------------------------------------# + # Non-template case. We will now assign scratch variables with the entire # + # domain first, and crop it to the subset afterwards. Here because we only need to # + # open one file, we loop the variable outside the time loop. # + #------------------------------------------------------------------------------------# + mybin = file(description=info$binary[1],open="rb") + + #----- Find the range of the full domain for this variable. -------------------------# + xmx = info$xmax + ymx = info$ymax + nzall = sum(info$zmax) + tmx = info$tmax + + #----- Read all variables. ----------------------------------------------------------# + aux = readBin(mybin,n=xmx*ymx*nzall*tmx,what="numeric",size=info$size, + endian=info$endian) + + #----- Close connection only after all variables have been read. --------------------# + close(mybin) + + for (v in 1:nvars){ + print(paste("[+] Reading variable ",vari[v],"...",sep="")) + zmx = info$zmax[varid[v]] + xr = 1:info$xmax + yr = 1:info$ymax + zr = 1:info$zmax[varid[v]] + + #----- Find the full dimensions of the output array of this variable. ------------# + nxsub = xz - xa + 1 + nysub = yz - ya + 1 + nzsub = zz[v] - za + 1 + ntsub = tz - ta + 1 + + #----- Assign a temporary aray with the full dimension. --------------------------# + datascr = array(NA,c(ntsub,xmx,ymx,zmx)) + + #----- Now we loop over the time of interest and extract the data. ---------------# + tt = 0 + for (tabs in ta:tz){ + pr = info$posica[tabs,varid[v]]:info$posicz[tabs,varid[v]] + tt = tt + 1 + thisdata = aux[pr] + thisdata[abs((thisdata-info$undef)/info$undef) < eps()] = NA + datascr[tt,,,] = thisdata + }#end for (tt in ta:tz) + + #----- Define the output data, then copy the sub-set of the scratch there... -----# + data = array(NA,c(ntsub,nxsub,nysub,nzsub)) + data[1:ntsub,1:nxsub,1:nysub,1:nzsub] = datascr[1:ntsub,xa:xz,ya:yz,za:zz[v]] + rm(thisdata,datascr) + #----- Rearrange the dimensions so t is to the left, and x and y to the right. ---# + data = aperm(a=data,perm=c(1,4,2,3)) + #----- We now copy data to the array with the variable name. ---------------------# + assign(x=vari[v],value=data) + }#end for (v in 1:nvars) + rm (aux) + }#end if(info$template) + + + #----- Include the variables to the output list. ----------------------------------------# + namesoutd = names(outd) + for (v in 1:nvars){ + data = get(x=vari[v]) + outd$data = data + rm(data) + namesoutd = c(namesoutd,vari[v]) + names(outd) = namesoutd + }#end for (v in 1:nvars) + + return(outd) +} #end function readgrads diff --git a/R-utils/rlong.fit.r b/R-utils/rlong.fit.r new file mode 100644 index 000000000..14c62df2b --- /dev/null +++ b/R-utils/rlong.fit.r @@ -0,0 +1,217 @@ +#==========================================================================================# +#==========================================================================================# +# This function predicts the longwave radiation using the "CDO" scheme as presented # +# at: # +# # +# Marthews, T. R., Y. Malhi, H. Iwata, 2012: Calculating downward longwave radiation under # +# clear and cloudy conditions over a tropical lowland forest site: an evaluation of # +# model schemes for hourly data. Theor. Appl. Climatol., 107, 461-477. # +# # +# x is the set of parameters that are optimised for the dataset. # +#------------------------------------------------------------------------------------------# +rlong.in.alogit <<- function(x,datum){ + a = x + #---------------------------------------------------------------------------------------# + # Estimate clear-sky emissivity. # + #---------------------------------------------------------------------------------------# + emiss.csky = a[1] + (1. - a[1]) * inv.logit(a[2] * (datum$atm.ph2o+a[3])) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Estimate the cloud cover. # + #---------------------------------------------------------------------------------------# + f.cloud = 1. - inv.logit(a[4] * (datum$tau+a[5])) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Estimate the effective emissivity. # + #---------------------------------------------------------------------------------------# + emiss.eff = emiss.csky * f.cloud + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Estimate cloud temperature. This is really a really simple way of doing it, we # + # simply penalise the drier days by making the TLCL cooler. # + #---------------------------------------------------------------------------------------# + cld.tmp = (a[6] + (1. - a[6]) * datum$atm.rhv) * datum$atm.tlcl + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Estimate longwave radiation. # + #---------------------------------------------------------------------------------------# + rlong = ( emiss.csky * stefan * datum$atm.tmp ^ 4 + + f.cloud * (1. - emiss.csky) * stefan * cld.tmp ^ 4 ) + #---------------------------------------------------------------------------------------# + + ans = list(rlong.in=rlong,emiss.csky=emiss.csky,f.cloud=f.cloud,cld.tmp=cld.tmp) + return(ans) +}#end predict +#==========================================================================================# +#==========================================================================================# + + + + + +#==========================================================================================# +#==========================================================================================# +# This function finds the sum of the squares, which is the log likelihood if we # +# asume the errors to be independent and normally distributed (a big assumption). # +#==========================================================================================# +#==========================================================================================# +rlong.in.alogit.support <<- function(x,sigma,datum){ + + rlong.in.try = rlong.in.alogit(x,datum)$rlong.in + residual = rlong.in.try - datum$rlong.in + chi.square = sum((residual/sigma)^2,na.rm=TRUE) + + support = - chi.square + return(support) +}#end function rlong.in.mmi.lnlike +#==========================================================================================# +#==========================================================================================# + + + + + +#==========================================================================================# +#==========================================================================================# +# This function optimises the longwave radiation. To make it simple, we use only # +# the parametrisations that work day and night as shown in Table 2 of: # +# # +# Marthews, T. R., Y. Malhi, H. Iwata, 2012: Calculating downward longwave radiation under # +# clear and cloudy conditions over a tropical lowland forest site: an evaluation of # +# model schemes for hourly data. Theor. Appl. Climatol., 107, 461-477. # +# # +#==========================================================================================# +#==========================================================================================# +rlong.in.alogit.optim <<- function(datum,keep.day=TRUE,keep.ngt=TRUE,verbose=FALSE){ + + + #---------------------------------------------------------------------------------------# + # Estimate some auxiliary thermodynamic and radiation properties. # + #---------------------------------------------------------------------------------------# + #----- Precipitable water. -------------------------------------------------------------# + cat (" - Precipitable water...","\n") + datum$atm.ph2o = 4.65 * datum$atm.pvap / datum$atm.tmp + #----- LCL (assumed to be the cloud base). ---------------------------------------------# + cat (" - LCL temperature (cloud base)...","\n") + atm.theta = datum$atm.tmp * (p00 / datum$atm.prss)^rocp + lcl = lcl.il(thil=atm.theta,pres=datum$atm.prss,temp=datum$atm.tmp + ,hum=datum$atm.pvap,type.hum="pvap") + datum$atm.tlcl = lcl$temp + #----- Tau, defined in terms of potential radiation at canopy. -------------------------# + cat (" - Fraction of shortwave (TOA) that reaches the ground ...","\n") + datum$tau = datum$rshort.in / datum$rshort.pot + cat (" * Gap-fill night time tau using linear interpolation...","\n") + datum$tau[ ! datum$highsun ] = NA + datum$tau = na.fill(na.approx(datum$tau,na.rm=FALSE),"extend") + #----- Split the time series into diel and season indices. -----------------------------# + cat (" - Splitting time series into hours and seasons...","\n") + diel = datum$hour + un.diel = unique(diel) + idx.diel = match(diel,un.diel) + mon2season = c( 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 1) + season = mon2season[datum$month] + un.season = sort(unique(season)) + idx.season = match(season,un.season) + #----- Find the standard deviation for weighted least squares. -------------------------# + cat (" - S.D. of incoming longwave, by hour and season ...","\n") + sigma.hrse = tapply(X=datum$rlong.in,INDEX=list(diel,season),FUN=sd,na.rm=TRUE) + idx = cbind(idx.diel,idx.season) + sigma = sigma.hrse[idx] + #---------------------------------------------------------------------------------------# + + + + + + #---------------------------------------------------------------------------------------# + # Data selection and total number of parameters. Here we must decide whether we # + # are optimising daytime or nighttime. # + #---------------------------------------------------------------------------------------# + use = ( is.finite(datum$rlong.in) & is.finite(datum$atm.ph2o ) + & is.finite(datum$atm.tlcl) & is.finite(datum$rshort.in) + & is.finite(datum$atm.rhv) ) + if (keep.day & keep.ngt){ + pre = rep(TRUE,times=length(datum$rlong.in)) + }else if (keep.day){ + use = use & datum$highsun + pre = datum$highsun + }else if (keep.ngt){ + use = use & (! datum$highsun) + pre = ! datum$highsun + }else{ + stop(" At least one between keep.day and keep.ngt must be TRUE...") + }#end if + n.use = sum(use) + x.1st = c(0.7,0.1,-40.0,6.0,-0.6,0.6) + n.par = 6 + #---------------------------------------------------------------------------------------# + + + + + #----- 1st. guess, use Marthews et al. (2012) numbers for CDO. -------------------------# + cat (" - Run the optimiser...","\n") + opt = optim( par = x.1st + , fn = rlong.in.alogit.support + , sigma = sigma[use] + , datum = datum[use,] + , control = list( trace = verbose + , fnscale = -1 + , maxit = 20000 + , REPORT = 1 + )#end list + , hessian = TRUE + )#end optim + if (opt$convergence != 0) stop (" Solution of rlong.in.mmi.optim didn't converge...") + #---------------------------------------------------------------------------------------# + + ans = list() + ans$hessian = opt$hessian + ans$df = n.use - n.par + ans$coefficients = opt$par + ans$std.err = sqrt(diag(solve(-ans$hessian))) + ans$t.value = ans$coefficients / ans$std.err + ans$p.value = 2.0 * pt(-abs(ans$t.value),df=ans$df) + ans$first.guess = x.1st + ans$support = opt$value + #----- Save the fitted values and the residuals. ---------------------------------------# + myfit = rlong.in.alogit(x=ans$coefficients,datum=datum) + ans$fitted.values = myfit$rlong.in[pre] + ans$emiss.csky = myfit$emiss.csky ; ans$emiss.csky [! use] = NA + ans$f.cloud = myfit$f.cloud ; ans$f.cloud [! use] = NA + ans$cld.tmp = myfit$cld.tmp ; ans$cld.tmp [! use] = NA + ans$atm.ph2o = datum$atm.ph2o ; ans$atm.ph2o [! use] = NA + ans$atm.tlcl = datum$atm.tlcl ; ans$atm.tlcl [! use] = NA + ans$atm.tquant = datum$atm.tquant ; ans$atm.tquant [! use] = NA + ans$tau = datum$tau ; ans$tau [! use] = NA + ans$lsq.weights = 1. / sigma^2 ; ans$lsq.weights [! use] = 0 + ans$residuals = ans$fitted.values[use] - datum$rlong.in[use] + + #---------------------------------------------------------------------------------------# + # Estimate the global standard error and R2. # + #---------------------------------------------------------------------------------------# + ss.err = sum(ans$residuals^2) + df.err = ans$df + mean.y = mean(datum$rlong.in[use]) + ss.tot = sum((datum$rlong.in[use]-mean.y)^2) + df.tot = n.use - 1 + ans$r.square = 1.0 - ss.err * df.tot / ( ss.tot * df.err ) + ans$sigma = sqrt(ss.err / ans$df) + #---------------------------------------------------------------------------------------# + + return(ans) +}#end function rlong.in.mmi.lnlike +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/roadmap.r b/R-utils/roadmap.r new file mode 100644 index 000000000..3cfe9b907 --- /dev/null +++ b/R-utils/roadmap.r @@ -0,0 +1,43 @@ +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +# This function plots roads, given the road name and the path. Additional options for # +# the "lines" command are welcome! # +#------------------------------------------------------------------------------------------# +roadmap <<- function(rpath=NULL,roads,...){ + + if (is.null(rpath)) rpath = file.path(srcdir,"roads") + if (missing(roads)) roads = sub(pattern=".csv",replacement="",x=basename(dir(rpath))) + + roadfiles = paste(rpath,"/",roads,".csv",sep="") + nroads = length(roads) + + for (r in 1:nroads){ + datum=read.csv(file=roadfiles[r],header=TRUE,na.strings="NA") + names(datum) = c("lon","lat","hgt") + lines(x=datum$lon,y=datum$lat,...) + }#end for +} #end function +#------------------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +# This function plots roads, given the road name and the path, when using the lattice # +# plots. Additional options for the "llines" command are welcome! # +#------------------------------------------------------------------------------------------# +panel.roadmap <<- function(rpath=NULL,roads,...){ + + if (is.null(rpath)) rpath = file.path(srcdir,"roads") + if (missing(roads)) roads = sub(pattern=".csv",replacement="",x=basename(dir(rpath))) + + roadfiles = paste(rpath,"/",roads,".csv",sep="") + nroads = length(roads) + + for (r in 1:nroads){ + datum=read.csv(file=roadfiles[r],header=TRUE,na.strings="NA") + names(datum) = c("lon","lat","hgt") + panel.lines(x=datum$lon,y=datum$lat,...) + }#end for +} #end function +#------------------------------------------------------------------------------------------# diff --git a/R-utils/roads/br010.csv b/R-utils/roads/br010.csv new file mode 100644 index 000000000..31434a68b --- /dev/null +++ b/R-utils/roads/br010.csv @@ -0,0 +1,1768 @@ +-47.45010451605616,-6.557809611179596,0 +-47.44567532483965,-6.556312657521578,0 +-47.4439364191282,-6.555402734896062,0 +-47.44220671321324,-6.554735588002053,0 +-47.44109469905685,-6.554289602699086,0 +-47.43997053943981,-6.5534803983839,0 +-47.4383549905417,-6.552565928123053,0 +-47.43747642930023,-6.551866389714448,0 +-47.43634508588811,-6.550931909080491,0 +-47.43496860175002,-6.549888045758039,0 +-47.43361066915514,-6.549214283764087,0 +-47.43250408811071,-6.548773003765493,0 +-47.43114263046564,-6.54809406211865,0 +-47.43002288618879,-6.547522215803118,0 +-47.42890610775687,-6.546953392846892,0 +-47.42743644750512,-6.546407791701358,0 +-47.42608862668298,-6.54585740267831,0 +-47.4255969736253,-6.545634407235561,0 +-47.42349847546897,-6.544620395864824,0 +-47.42226595986703,-6.543942366507308,0 +-47.42127105400985,-6.543134416917028,0 +-47.42015181190869,-6.542210825438073,0 +-47.41892467416671,-6.541771652247813,0 +-47.41780466936491,-6.540964621514274,0 +-47.41681233281323,-6.540275985472158,0 +-47.41668745576912,-6.540159907139336,0 +-47.40270036218391,-6.531625164347439,0 +-47.40015085075654,-6.530350009992032,0 +-47.39781736914896,-6.528839831389909,0 +-47.39569002421884,-6.52686724697267,0 +-47.39471193583447,-6.525086807705407,0 +-47.39260120833208,-6.523125826222915,0 +-47.39161588312366,-6.520899967514961,0 +-47.38996636607143,-6.519149049646929,0 +-47.38830111185095,-6.516946671015184,0 +-47.38710487171183,-6.515180020270348,0 +-47.38520512339868,-6.512759729505186,0 +-47.38354778599065,-6.510783077759601,0 +-47.38255440649823,-6.508331109691095,0 +-47.38202209575188,-6.506088965908628,0 +-47.38170843180038,-6.503612935183061,0 +-47.38162967732983,-6.501354937384376,0 +-47.38155830382551,-6.499104036909125,0 +-47.38171642270056,-6.496848524201414,0 +-47.38170950069869,-6.496623721051813,0 +-47.38388229782095,-6.491315223905556,0 +-47.38518273541109,-6.489009465654532,0 +-47.38625538046546,-6.486712323435398,0 +-47.38755661697714,-6.484863701463611,0 +-47.38929250400384,-6.48277848814688,0 +-47.39079176988295,-6.480247925182952,0 +-47.39253497925971,-6.478387423768158,0 +-47.39428782666859,-6.476751400564783,0 +-47.39650324319634,-6.475552646173009,0 +-47.39735153584701,-6.473718029602383,0 +-47.39795589671406,-6.471213360144352,0 +-47.39833534628799,-6.46871642097221,0 +-47.39872107342005,-6.466445762110589,0 +-47.39865170002869,-6.463964735901168,0 +-47.39746703174419,-6.461747121587524,0 +-47.39716880549424,-6.459501764467358,0 +-47.39708192563693,-6.457249228832517,0 +-47.39701240861302,-6.455446687322365,0 +-47.39691649723827,-6.452967472212091,0 +-47.39725840009359,-6.450246067238455,0 +-47.39716915869752,-6.44799010868516,0 +-47.39731342845064,-6.445951073495154,0 +-47.39706609338295,-6.439559573166284,0 +-47.39697716790364,-6.43684807671167,0 +-47.39686844607818,-6.433693245457361,0 +-47.3968033288364,-6.43165785493167,0 +-47.39646351940131,-6.42828010448179,0 +-47.3963801385761,-6.425798610677889,0 +-47.39675116000551,-6.423301506526105,0 +-47.3969025427641,-6.421037974472073,0 +-47.39637235604677,-6.418797954649162,0 +-47.39515297012027,-6.416355722342485,0 +-47.3946108169242,-6.413893196293418,0 +-47.394303441571,-6.411647723357284,0 +-47.39376801617581,-6.409409655210998,0 +-47.39346838057824,-6.407388315217637,0 +-47.39157947451123,-6.405419215559565,0 +-47.3897348890541,-6.404119963719683,0 +-47.38879190469525,-6.40279395679856,0 +-47.38802436659829,-6.399882965423672,0 +-47.38749636006364,-6.397417462018828,0 +-47.38630228476347,-6.39565233657671,0 +-47.38463824612738,-6.393677019563521,0 +-47.38385565155468,-6.39121901747719,0 +-47.38327838374566,-6.388299073703132,0 +-47.38298504080236,-6.386276182231883,0 +-47.38267876360992,-6.383802835091752,0 +-47.38260664115708,-6.381547907930649,0 +-47.38208806362172,-6.379534095178701,0 +-47.38200159793496,-6.376829291451948,0 +-47.38168375199174,-6.374352525861247,0 +-47.38091526788961,-6.371891796776455,0 +-47.38090746039065,-6.371666101634101,0 +-47.37911787780603,-6.365754244984972,0 +-47.37882926779604,-6.363727805742696,0 +-47.37761377751482,-6.361054116437749,0 +-47.37592538012117,-6.357719456616749,0 +-47.37563070083639,-6.35547015781906,0 +-47.37507571743975,-6.352101478575509,0 +-47.37457537493546,-6.350538057333133,0 +-47.37402787637512,-6.347849912328876,0 +-47.37374665510195,-6.346280367907806,0 +-47.37342586410756,-6.343584156706683,0 +-47.37331293378632,-6.340654472964994,0 +-47.37320043367573,-6.338172854243803,0 +-47.37265352885402,-6.335930504536268,0 +-47.37168087334609,-6.333482184801276,0 +-47.37115394620531,-6.330794947975962,0 +-47.37017822695267,-6.328572673092337,0 +-47.36991127991983,-6.326337021593733,0 +-47.36938514711905,-6.324100601622974,0 +-47.36907375237683,-6.321852290354301,0 +-47.36898727968765,-6.319594998310454,0 +-47.36870903606565,-6.318247913947954,0 +-47.36715461595614,-6.312058465031609,0 +-47.3661135494708,-6.309398659794073,0 +-47.3651104715286,-6.306951876537336,0 +-47.36435001028953,-6.304493059314548,0 +-47.36404784829647,-6.302472289422631,0 +-47.36327514429914,-6.300015202307782,0 +-47.36250220699188,-6.297557376539765,0 +-47.36218289516626,-6.295083700847113,0 +-47.36209044722877,-6.29260170726273,0 +-47.36199897629695,-6.289893716108882,0 +-47.36170269778546,-6.28764524556308,0 +-47.36094892640295,-6.285187352191958,0 +-47.36041842996463,-6.282722158106409,0 +-47.35966484474758,-6.280489794421519,0 +-47.35890849030988,-6.278256999149253,0 +-47.35836162393768,-6.275564932804613,0 +-47.35805617562775,-6.273316068993785,0 +-47.35797619413465,-6.271058939714308,0 +-47.35788818955116,-6.268575757835974,0 +-47.35825919604107,-6.266301616246714,0 +-47.35482146930682,-6.259794253637406,0 +-47.35385069409204,-6.254964984287662,0 +-47.35250041534732,-6.250958916933075,0 +-47.35156976750125,-6.247344763068658,0 +-47.35059998843003,-6.242517913450786,0 +-47.35046775540168,-6.238474502484703,0 +-47.3507401307473,-6.234418707002269,0 +-47.35223093774827,-6.230322879731082,0 +-47.35290936278929,-6.226254056289952,0 +-47.3531816221647,-6.222198887797259,0 +-47.35345235901525,-6.218144131015411,0 +-47.35411427204438,-6.213671833877696,0 +-47.35560161552637,-6.209576358490865,0 +-47.35708907516386,-6.205480541485686,0 +-47.35736611663388,-6.20142657415865,0 +-47.35768777262727,-6.198586583074159,0 +-47.35939889984566,-6.188822640350055,0 +-47.3600506555012,-6.183945185538368,0 +-47.36154142810577,-6.179849764988417,0 +-47.36181365586454,-6.175794756868415,0 +-47.36167972642258,-6.171753476948229,0 +-47.36441536318502,-6.168426818336975,0 +-47.36676998076096,-6.165923030832107,0 +-47.36783808783034,-6.161439671702575,0 +-47.36810845194575,-6.157386486860041,0 +-47.36879798488552,-6.153724116240612,0 +-47.3694566095207,-6.149255284745345,0 +-47.36973600467304,-6.145607290972958,0 +-47.36998738626693,-6.141150660830524,0 +-47.37229608692813,-6.137433836426792,0 +-47.37295373303074,-6.132961419014964,0 +-47.37326205844288,-6.130118490298111,0 +-47.37392134626592,-6.125644420071206,0 +-47.37453865811789,-6.119956264823457,0 +-47.37521221038794,-6.115884739288039,0 +-47.37754171387554,-6.112567899731153,0 +-47.37821559521125,-6.1084952235659,0 +-47.37889583973902,-6.104426582514223,0 +-47.37998294348414,-6.100345496083897,0 +-47.38022944898106,-6.095483880512805,0 +-47.38051597709046,-6.091835033560423,0 +-47.38035559557759,-6.086988457270799,0 +-47.38020863921778,-6.082546611959861,0 +-47.38087502442866,-6.078079266084836,0 +-47.38071466519715,-6.073235477242918,0 +-47.38099830176524,-6.069585131010382,0 +-47.38083339052118,-6.064733512329616,0 +-47.38111497421936,-6.061078656343725,0 +-47.38094857982114,-6.056222877572157,0 +-47.38080878711747,-6.052173090889321,0 +-47.38065497913534,-6.047717362686023,0 +-47.38048713969705,-6.042855378170236,0 +-47.38073982485837,-6.038383835353059,0 +-47.38100653416855,-6.034316618616271,0 +-47.38288589829843,-6.029788270214295,0 +-47.3835456153305,-6.025299951782862,0 +-47.3845846144149,-6.019986826079994,0 +-47.38566801682913,-6.015899121965075,0 +-47.3855448918514,-6.012257041882989,0 +-47.384161156141,-6.00744462091876,0 +-47.38413407433936,-6.006636452681509,0 +-47.38262490822169,-5.997782446059762,0 +-47.38207070960003,-5.993340284789985,0 +-47.38227565066485,-5.987253072475187,0 +-47.38256108321524,-5.983596188597127,0 +-47.38360533471061,-5.978294379981985,0 +-47.38384832984801,-5.973429756978411,0 +-47.38487540769693,-5.967733074383149,0 +-47.3851447349775,-5.963678815971234,0 +-47.38577924092023,-5.958398695795815,0 +-47.38568330685715,-5.95556969387478,0 +-47.38551886677278,-5.95071971215104,0 +-47.38536811878869,-5.946273569151139,0 +-47.38482469899554,-5.942244802522199,0 +-47.38464651666251,-5.936989617750477,0 +-47.38411675611572,-5.93336464934475,0 +-47.38268462429589,-5.926933573010205,0 +-47.38222534092154,-5.925329578021524,0 +-47.37994316350562,-5.917717026398992,0 +-47.37814652246331,-5.912519026155776,0 +-47.37598068105631,-5.908547139129351,0 +-47.37343693537174,-5.905397276911435,0 +-47.3708618340048,-5.901438043827063,0 +-47.36827182850513,-5.897073806549839,0 +-47.36614312044262,-5.894312013229264,0 +-47.3647579461812,-5.88950208245145,0 +-47.36382338252949,-5.88589281320368,0 +-47.36165687067951,-5.881920389409765,0 +-47.36163007527178,-5.881112585683267,0 +-47.35806343985772,-5.871997700481933,0 +-47.35744410051063,-5.865963312649769,0 +-47.35609900979219,-5.86237129413742,0 +-47.35514502530579,-5.858362901341152,0 +-47.35498749379938,-5.853504550481456,0 +-47.35481915596107,-5.848240233837132,0 +-47.35472852274525,-5.845406391900514,0 +-47.35493477187266,-5.839744024048724,0 +-47.35476162768568,-5.83490173897589,0 +-47.35461118303845,-5.830455251547742,0 +-47.35604362565869,-5.824742710874134,0 +-47.3559342204984,-5.821508597406865,0 +-47.35657077744231,-5.816225254884148,0 +-47.35683257753301,-5.811762686656989,0 +-47.35668805704143,-5.807314679768528,0 +-47.35739541504462,-5.804053328849244,0 +-47.35803518509458,-5.798771801638048,0 +-47.3578732164321,-5.793922328996252,0 +-47.35775175935061,-5.790285420328866,0 +-47.35841610155038,-5.785813564808404,0 +-47.35869409207869,-5.781761716156354,0 +-47.35895908044159,-5.777307702869892,0 +-47.35883028656419,-5.773272134325047,0 +-47.36070729990324,-5.768365055556808,0 +-47.3617872223083,-5.764285603754574,0 +-47.36163525333062,-5.759841905559653,0 +-47.3610919342407,-5.755815991279969,0 +-47.36095746543317,-5.751779470080851,0 +-47.36082299883495,-5.747743266784487,0 +-47.36070001720889,-5.744108437422542,0 +-47.36054180836219,-5.739655125633822,0 +-47.36042668200407,-5.736415230635644,0 +-47.36025397560725,-5.731553534223722,0 +-47.36018196896371,-5.729527197938706,0 +-47.36075329213096,-5.722346273920095,0 +-47.36059221450736,-5.717497309664772,0 +-47.36006565194657,-5.71387449499467,0 +-47.35950752760027,-5.7086391652904,0 +-47.35936879076147,-5.704600835947565,0 +-47.35924179042535,-5.700965164145802,0 +-47.35989788560197,-5.696493164172968,0 +-47.36219463713193,-5.69237135130196,0 +-47.3641275260456,-5.689475051743034,0 +-47.36681722804828,-5.684934815014754,0 +-47.37033307314634,-5.680771078396364,0 +-47.3722251910713,-5.676661001046751,0 +-47.3765512313586,-5.672464529268483,0 +-47.37927322214366,-5.668737273798959,0 +-47.38118043520295,-5.665032030486707,0 +-47.38391361539786,-5.66170408953299,0 +-47.38624070759784,-5.658389476851293,0 +-47.38854049183625,-5.654266151939745,0 +-47.39082666075986,-5.649738316570915,0 +-47.39318121239916,-5.647232039253424,0 +-47.396333928635,-5.644288416526009,0 +-47.39989338808584,-5.641326846045401,0 +-47.40220790186587,-5.637596157470673,0 +-47.40371048886531,-5.63389253398222,0 +-47.40643258778056,-5.630145528532445,0 +-47.40877610503775,-5.627222509851594,0 +-47.41255352530396,-5.618658540334518,0 +-47.41402818798402,-5.614155816034051,0 +-47.41638411593561,-5.611648088418668,0 +-47.41830628158399,-5.608345180374058,0 +-47.4205661243806,-5.603006917237922,0 +-47.42246072096692,-5.598895444282849,0 +-47.42518184694578,-5.59516107374221,0 +-47.42830968964263,-5.591412890300672,0 +-47.43143971162876,-5.587663615161852,0 +-47.43538358365252,-5.583886176096041,0 +-47.43894874509453,-5.580930750946029,0 +-47.44250215390112,-5.57756952371176,0 +-47.44525598155736,-5.574639944677569,0 +-47.44716940620195,-5.570928207232908,0 +-47.44949013008695,-5.567201895425796,0 +-47.45222914704344,-5.563867634249645,0 +-47.45496456613148,-5.560535842063405,0 +-47.45765851799632,-5.555990443626779,0 +-47.45997341364427,-5.552267897715359,0 +-47.46269556301325,-5.548531125086698,0 +-47.46502527116624,-5.545212235483367,0 +-47.46694884369359,-5.541906554583387,0 +-47.47236095109474,-5.533624490587755,0 +-47.47384816347211,-5.529524273576316,0 +-47.47372185699803,-5.525883628492716,0 +-47.47360957244941,-5.52264773064202,0 +-47.47338505005835,-5.516176576762865,0 +-47.47321667302936,-5.511323785058164,0 +-47.47266960586455,-5.507293970454607,0 +-47.47248908853628,-5.502036843572155,0 +-47.47236528458386,-5.498396863765432,0 +-47.4721589720622,-5.492330287787955,0 +-47.47162849030104,-5.488704323643073,0 +-47.4714775606849,-5.484255399471776,0 +-47.47216813333238,-5.48058703377801,0 +-47.4740523985821,-5.476067003134345,0 +-47.47508146582897,-5.470361686086184,0 +-47.47494423331838,-5.466316963223037,0 +-47.47439971886637,-5.462286849751989,0 +-47.47385342115461,-5.458258749251897,0 +-47.47329322200967,-5.453826778116082,0 +-47.47312555642413,-5.448977223288516,0 +-47.47295199017228,-5.444135423796177,0 +-47.47240075600371,-5.440115626979714,0 +-47.47232847468992,-5.43809893619087,0 +-47.4710854112267,-5.426503347409763,0 +-47.47095785058301,-5.422866000418055,0 +-47.47159949334566,-5.417989580678046,0 +-47.47145772509001,-5.413949150492693,0 +-47.47211340708027,-5.409478012027179,0 +-47.47236406535151,-5.405020923844124,0 +-47.47262893570131,-5.400560653306342,0 +-47.47366729876818,-5.394858936892087,0 +-47.47516308019522,-5.390759948428382,0 +-47.47629148756378,-5.387887417675715,0 +-47.47771103654276,-5.381359039932965,0 +-47.47833918990291,-5.375668090167864,0 +-47.47942559158169,-5.371581375262306,0 +-47.48131064384656,-5.367062601813226,0 +-47.48323152422625,-5.363759835628946,0 +-47.48344493421461,-5.358913139602581,0 +-47.48410715201171,-5.354438871110015,0 +-47.4851756820053,-5.349950647423903,0 +-47.4866369119962,-5.345044157487331,0 +-47.48776017154315,-5.342172665930619,0 +-47.49391699629523,-5.326720149384192,0 +-47.49539017932912,-5.322220633499771,0 +-47.49684959688117,-5.317316937879901,0 +-47.49831387644863,-5.312815740827808,0 +-47.49814843762044,-5.308369452960415,0 +-47.49798146679163,-5.303521644263383,0 +-47.49904882422163,-5.29903718505013,0 +-47.49893747730118,-5.295805591094462,0 +-47.4992051449083,-5.291752585319375,0 +-47.50107218078391,-5.286836520305694,0 +-47.5033044732566,-5.280694381004783,0 +-47.50355809239453,-5.276237399262252,0 +-47.50381365232242,-5.271779846022298,0 +-47.50448673059262,-5.267713394118609,0 +-47.50473976248267,-5.263257065455319,0 +-47.50538475053671,-5.258383374219406,0 +-47.50685543483976,-5.253886161008207,0 +-47.50793402355485,-5.249806694504052,0 +-47.50901259361169,-5.245727418515773,0 +-47.5096851685935,-5.241662086781594,0 +-47.51159089399971,-5.23795790418809,0 +-47.51345601923526,-5.233041557323673,0 +-47.51453534545693,-5.228961814276778,0 +-47.51601331041559,-5.224874332208306,0 +-47.51789713102819,-5.220773403531743,0 +-47.51979534740587,-5.217076032021024,0 +-47.52088111658261,-5.213407517459157,0 +-47.5223137864972,-5.208114308482972,0 +-47.52336962294122,-5.20364189242447,0 +-47.52362811105206,-5.199601513138742,0 +-47.52425880889103,-5.194747196004455,0 +-47.52491969473149,-5.190698106641957,0 +-47.5259868578764,-5.186634938821498,0 +-47.52581922183822,-5.182636540695586,0 +-47.53048794998917,-5.172330140365135,0 +-47.53311474166762,-5.168115484869233,0 +-47.53586509624714,-5.164847558862655,0 +-47.53733711725918,-5.160375634203048,0 +-47.53960729105541,-5.155476170862379,0 +-47.54028218606059,-5.151427900837415,0 +-47.542567192339,-5.146927814784334,0 +-47.5444743233661,-5.14324342703144,0 +-47.54637274959608,-5.139552312379114,0 +-47.54657705454107,-5.13429409785697,0 +-47.5464374118481,-5.130665038461064,0 +-47.54709383968549,-5.12660938027818,0 +-47.54814002731577,-5.122140123771176,0 +-47.54923478491234,-5.11888093099561,0 +-47.551823561605,-5.111549404880624,0 +-47.55249876080567,-5.107501127481756,0 +-47.55391586249376,-5.101414048026788,0 +-47.55417759968799,-5.09737927223149,0 +-47.55443368246419,-5.092941452495694,0 +-47.55515297942256,-5.090097271820547,0 +-47.55661288761839,-5.085620014146214,0 +-47.55766333413513,-5.081565998438496,0 +-47.55784759172299,-5.075936162654836,0 +-47.55772337733966,-5.072728447661617,0 +-47.55753711455092,-5.067919502940617,0 +-47.5569806866203,-5.063926952320911,0 +-47.55690321152414,-5.061925206534132,0 +-47.55412104584445,-5.050941437078586,0 +-47.5519938791083,-5.047401924057174,0 +-47.55144441306833,-5.04299942687947,0 +-47.55008225285323,-5.039015628416166,0 +-47.54952258738496,-5.034609267672503,0 +-47.54894927243869,-5.029802215241101,0 +-47.54756032512349,-5.024225116796254,0 +-47.54701257736546,-5.019822643387515,0 +-47.54686404952032,-5.015405340934897,0 +-47.54510435906627,-5.010641271982863,0 +-47.54254603864956,-5.006303656966567,0 +-47.5387691894946,-5.001602481250119,0 +-47.53503408691922,-4.998103820460651,0 +-47.53249853011323,-4.994564234790874,0 +-47.53035135517944,-4.990607783189001,0 +-47.52901398286075,-4.986621339138404,0 +-47.52807440955899,-4.982212241279329,0 +-47.52594788292947,-4.978233330430568,0 +-47.52183929847458,-4.976353018207568,0 +-47.51891555827552,-4.973209142448759,0 +-47.51558973108413,-4.970489135985776,0 +-47.51182958303983,-4.966977004479464,0 +-47.51007342556918,-4.963001525558403,0 +-47.50833023717523,-4.959431144518245,0 +-47.50656428392384,-4.955044231598918,0 +-47.50324042130512,-4.952301758759804,0 +-47.50105270788458,-4.947526217642208,0 +-47.49883771200942,-4.941942422447857,0 +-47.49948721020894,-4.937055516996828,0 +-47.50056948739432,-4.932959670459906,0 +-47.50128251187673,-4.930114958441321,0 +-47.5030954728396,-4.924029170788759,0 +-47.5049342491611,-4.918754873933384,0 +-47.50560640790901,-4.914698505192181,0 +-47.50664180630449,-4.909421337131803,0 +-47.5068825154673,-4.904569544476631,0 +-47.50914336179265,-4.89966506748316,0 +-47.5122519582111,-4.89595109619718,0 +-47.51374456332555,-4.892279992719249,0 +-47.51441490569169,-4.887771062314478,0 +-47.51508454315876,-4.883263135728033,0 +-47.51504472075916,-4.882048019109377,0 +-47.51551845870592,-4.862293507086996,0 +-47.51405824351369,-4.850675382245394,0 +-47.50933916346041,-4.837049148109978,0 +-47.50675532917968,-4.823369119332208,0 +-47.50647439089702,-4.814905239787676,0 +-47.50395313278035,-4.803324292547656,0 +-47.50051278949164,-4.796016578645235,0 +-47.49575736572275,-4.78133013089519,0 +-47.4922112996282,-4.770846031524231,0 +-47.49178170249922,-4.758135355084706,0 +-47.49340593727111,-4.743233949895585,0 +-47.49928096205885,-4.728190536086388,0 +-47.50097677582069,-4.715407066925581,0 +-47.49955618446823,-4.704847480692908,0 +-47.4981713067557,-4.695346667697748,0 +-47.49986670425949,-4.682563230243921,0 +-47.50258887560442,-4.668685658933481,0 +-47.50226644670732,-4.659150047202902,0 +-47.49850899795859,-4.642276246409232,0 +-47.49709006250836,-4.631695041223913,0 +-47.49450065912173,-4.617958760369713,0 +-47.49318776176838,-4.610557429875741,0 +-47.49052554282522,-4.594687398635735,0 +-47.48789742895898,-4.579885918213763,0 +-47.48736018057139,-4.563958130211012,0 +-47.4870384143323,-4.554385349694838,0 +-47.48976554540778,-4.540460797252344,0 +-47.49160762200696,-4.531886710779858,0 +-47.49844966766909,-4.513563835414192,0 +-47.5034144039328,-4.502751330466313,0 +-47.50525764162951,-4.494172299969068,0 +-47.51338155496062,-4.482184772581594,0 +-47.52157567727954,-4.472337690677627,0 +-47.52753335909138,-4.459373764545313,0 +-47.5314006662115,-4.447527094972381,0 +-47.53352684700215,-4.417982721577618,0 +-47.53195514787231,-4.403166027315268,0 +-47.53155950516843,-4.391502288930443,0 +-47.53113795863557,-4.378789526281986,0 +-47.5306634332046,-4.364997299974831,0 +-47.53143151534324,-4.356472920576273,0 +-47.53315095784965,-4.344732254141308,0 +-47.53691891034226,-4.330802485110036,0 +-47.5396975764368,-4.319034676305362,0 +-47.54671805464357,-4.307127730852892,0 +-47.55278250408156,-4.297378686439166,0 +-47.55875288693207,-4.284445504849225,0 +-47.56050641620725,-4.272709738699763,0 +-47.56010715386443,-4.261051526518928,0 +-47.55961788697945,-4.247284797556962,0 +-47.5551105159562,-4.24001385437787,0 +-47.55276334994169,-4.233732653877291,0 +-47.54569674011467,-4.213826103314454,0 +-47.54432301057557,-4.204312961199791,0 +-47.54503894232323,-4.193664778110278,0 +-47.54883879280518,-4.179721692086459,0 +-47.55051688626295,-4.165840488037725,0 +-47.5522303158468,-4.153015806426042,0 +-47.55075044393369,-4.140300125329891,0 +-47.55032772283953,-4.127555978293873,0 +-47.55010939653253,-4.121197382615146,0 +-47.55016648526803,-4.093132983742431,0 +-47.54979785671603,-4.082533545521811,0 +-47.54836653780657,-4.071972089776822,0 +-47.54686154894878,-4.059294142698027,0 +-47.54638281942673,-4.045524281233164,0 +-47.54496790223542,-4.034961134885519,0 +-47.54348926435127,-4.022270795571214,0 +-47.54307351783445,-4.009539860375095,0 +-47.54269229429848,-3.997866024759931,0 +-47.54210295381494,-3.979817517674168,0 +-47.54168681405616,-3.967072111246694,0 +-47.53907437073772,-3.952268984512179,0 +-47.53652429224377,-3.939597647596692,0 +-47.53389762124425,-3.924811381926356,0 +-47.53027916103999,-3.912181818862952,0 +-47.52566892683479,-3.901709269544267,0 +-47.52314910683386,-3.890104270322844,0 +-47.51850277156693,-3.878568789901367,0 +-47.51708185416043,-3.867988830505271,0 +-47.51701098272895,-3.865863455566899,0 +-47.51524238672779,-3.844625704786648,0 +-47.51173409805161,-3.835155100060798,0 +-47.50822520344863,-3.825682521906068,0 +-47.50172556214451,-3.792039043469944,0 +-47.50044539645259,-3.785706596837044,0 +-47.49232155955524,-3.765800287805412,0 +-47.49207146469662,-3.758375970695091,0 +-47.48830943443566,-3.741511335077798,0 +-47.48692407172916,-3.731999910449391,0 +-47.48546705810872,-3.720366821739143,0 +-47.48294686793633,-3.708769222669514,0 +-47.48046249207716,-3.698232357100238,0 +-47.48006681207455,-3.686562887836104,0 +-47.47963201045095,-3.673834231292677,0 +-47.48238593351588,-3.6610013461908,0 +-47.48411265544507,-3.649267346439483,0 +-47.48382252127456,-3.640787296963889,0 +-47.48547604768678,-3.626938419262284,0 +-47.48610251604273,-3.614189343290132,0 +-47.48563377833009,-3.600414472936037,0 +-47.4852118470546,-3.587678276700812,0 +-47.48691487365671,-3.574865543807054,0 +-47.48865362941334,-3.563110444296527,0 +-47.48826713860696,-3.551423736804305,0 +-47.48681662354183,-3.539772534368991,0 +-47.48539700989613,-3.52919453932359,0 +-47.48284335778207,-3.51652730152551,0 +-47.47820537512704,-3.504961242620061,0 +-47.47359592368822,-3.494484854184688,0 +-47.47238845029977,-3.490281687898499,0 +-47.46184556542783,-3.462196349611902,0 +-47.45503699537571,-3.449665232371134,0 +-47.45145348071991,-3.438093412690271,0 +-47.44889758684518,-3.425430461045038,0 +-47.44754965191281,-3.416985721872974,0 +-47.44397039827813,-3.405431973611822,0 +-47.44350582526311,-3.391650665377548,0 +-47.44311268935103,-3.379989281533538,0 +-47.44268383244848,-3.367267456895595,0 +-47.44335299987907,-3.355570176735911,0 +-47.44515637644528,-3.34595766262369,0 +-47.4468514114625,-3.333162693069727,0 +-47.44858204496759,-3.321428136392838,0 +-47.45127023210772,-3.306473933944018,0 +-47.45406577558621,-3.294698469941502,0 +-47.45502148631189,-3.291480079794852,0 +-47.46678939522609,-3.261100806832185,0 +-47.4696207397451,-3.25038102321023,0 +-47.47131294093147,-3.237556386210993,0 +-47.47403151896524,-3.223635797150854,0 +-47.47572295338502,-3.210815444685814,0 +-47.47627890782517,-3.195908332844394,0 +-47.47690710980896,-3.183128048682932,0 +-47.47963164163511,-3.16923415433833,0 +-47.48132996594549,-3.15643679903277,0 +-47.48097274409592,-3.145828350274055,0 +-47.47962364324702,-3.137375859155028,0 +-47.47150225953701,-3.117461988645917,0 +-47.46894738205031,-3.104801417304408,0 +-47.46635682758831,-3.091080125083296,0 +-47.46493660374128,-3.080506515738538,0 +-47.46333683540801,-3.064627525082125,0 +-47.46071269905604,-3.049846476797697,0 +-47.45702558879967,-3.035099931707949,0 +-47.4556775439251,-3.026647359280796,0 +-47.45415115076583,-3.012888883189687,0 +-47.44929394935284,-2.994991978439297,0 +-47.44659681961613,-2.978084775594295,0 +-47.44503314281666,-2.963265641613318,0 +-47.44364841805379,-2.953752264673013,0 +-47.44208478176876,-2.938934340892956,0 +-47.441547862686,-2.923020338947588,0 +-47.44210918878901,-2.908132151324646,0 +-47.44160951359182,-2.893271869342367,0 +-47.44220935364736,-2.879426805673731,0 +-47.4449701488462,-2.866569946980113,0 +-47.4456415148854,-2.854845063737257,0 +-47.4463486262493,-2.844181071772539,0 +-47.4473046844681,-2.840956486405505,0 +-47.4432511744987,-2.815358849709053,0 +-47.44788346259241,-2.795002308983071,0 +-47.45078541272774,-2.786403173097908,0 +-47.45758040096127,-2.767046379247608,0 +-47.45736496890505,-2.760675609988613,0 +-47.46107837120898,-2.744609375339639,0 +-47.46475515802611,-2.727480954852876,0 +-47.46967432146364,-2.715626093285061,0 +-47.47147670713482,-2.706000833737703,0 +-47.47511712811419,-2.68781247261761,0 +-47.47688339635578,-2.677126370097415,0 +-47.48059535712276,-2.661062058492098,0 +-47.4844140006381,-2.648182214391992,0 +-47.48922542042676,-2.63314487644944,0 +-47.49096411709882,-2.621398716660264,0 +-47.49291393039842,-2.616019834770881,0 +-47.49440174062022,-2.596839827873071,0 +-47.49510479380457,-2.586189073199719,0 +-47.49683553626714,-2.574440899604572,0 +-47.50069368465281,-2.562619883608667,0 +-47.50121625138538,-2.546663018368793,0 +-47.50220807608434,-2.544503527131541,0 +-47.50345838584315,-2.518830019040379,0 +-47.50426761538827,-2.511363584476688,0 +-47.50574801940312,-2.492187102079651,0 +-47.50524860976088,-2.477327602016648,0 +-47.50591926095046,-2.4656160776708,0 +-47.50655710074858,-2.452841885289655,0 +-47.5093937670216,-2.442117204167912,0 +-47.51545595912385,-2.432344625866972,0 +-47.52357565032893,-2.420374009974676,0 +-47.53261968610996,-2.404115625225525,0 +-47.5397843844442,-2.395362739760031,0 +-47.55003704369819,-2.383311177313681,0 +-47.55613652674339,-2.374593957085684,0 +-47.55815615165854,-2.371334986228876,0 +-47.56503657006503,-2.354079561560937,0 +-47.56471982077581,-2.344514305874317,0 +-47.56621324569886,-2.325309385237311,0 +-47.56465689904956,-2.310462523956877,0 +-47.56327653450224,-2.300930165737933,0 +-47.5627561327383,-2.284971602561293,0 +-47.56229199423099,-2.271154949772096,0 +-47.56186362427334,-2.258400815289829,0 +-47.56249950417026,-2.245609242815521,0 +-47.56345671324421,-2.242383459520757,0 +-47.5581072638784,-2.213409784292898,0 +-47.55795950199987,-2.209160533166267,0 +-47.55624427666817,-2.190080397214639,0 +-47.55574999222044,-2.175215707914346,0 +-47.55639028728499,-2.162437747350399,0 +-47.56008150351726,-2.145303121349851,0 +-47.56065146384667,-2.130397925573273,0 +-47.56026205444999,-2.11871400186735,0 +-47.55976296869729,-2.103843598989468,0 +-47.55937358235813,-2.092158473911577,0 +-47.55802674206542,-2.083695889587461,0 +-47.55426928963806,-2.066806051163389,0 +-47.54859700953504,-2.056362672715324,0 +-47.54047827911137,-2.036429485241129,0 +-47.53909565402329,-2.02690292398772,0 +-47.5312274609941,-2.014404545736948,0 +-47.52559342429662,-2.005019915741173,0 +-47.52307841459118,-1.993400396387003,0 +-47.51938945708327,-1.978633348146235,0 +-47.51545040621084,-1.956428348026306,0 +-47.51828231948467,-1.945695545435403,0 +-47.52324023382582,-1.934890859880429,0 +-47.5248761601715,-1.919926718192859,0 +-47.52658308361893,-1.907086635317575,0 +-47.52825534441443,-1.893180248056609,0 +-47.52787090940274,-1.88147233346558,0 +-47.52535971158323,-1.869834580966885,0 +-47.52291886306557,-1.860323097224322,0 +-47.51799688984485,-1.843835059182768,0 +-47.50998345316659,-1.827091506676932,0 +-47.50625644323061,-1.811267601590092,0 +-47.50391572740172,-1.804966790370089,0 +-47.50011765091668,-1.787019852273361,0 +-47.49965105974042,-1.773214133827067,0 +-47.49815786100476,-1.76050647315818,0 +-47.49883069776136,-1.748789188101793,0 +-47.49851310893536,-1.739230870150982,0 +-47.49908164205768,-1.724325210177387,0 +-47.49869340873961,-1.712640577616028,0 +-47.49812957551423,-1.695642426106552,0 +-47.49671458480853,-1.685053092798257,0 +-47.49416603788681,-1.672373336264647,0 +-47.48828582729209,-1.655550118647107,0 +-47.48577027311716,-1.643932113523521,0 +-47.4842062888825,-1.629094789819268,0 +-47.48703853225723,-1.61836169800238,0 +-47.49189016308195,-1.604368109179425,0 +-47.49259585287795,-1.59370720580825,0 +-47.49425830325151,-1.579821453846658,0 +-47.49922079022437,-1.569008889398939,0 +-47.51124468692537,-1.548237530663229,0 +-47.51407072534155,-1.537507878670791,0 +-47.51685972089943,-1.525716562069981,0 +-47.5197212574577,-1.516050228906671,0 +-47.5203475859037,-1.503269888620757,0 +-47.52097797555758,-1.490490222336166,0 +-47.52470174388681,-1.474414888164907,0 +-47.52749884577466,-1.462623826506677,0 +-47.53238331589285,-1.449699294204386,0 +-47.53733915213051,-1.438898795869312,0 +-47.54310780287224,-1.420627091422698,0 +-47.54774988385351,-1.400261978569383,0 +-47.55059599730159,-1.389522261653823,0 +-47.55447341192217,-1.377679618039125,0 +-47.55934709028706,-1.363670305139866,0 +NA,NA,NA +-47.45099249375367,-7.342668460656181,0 +-47.45506436966842,-7.341197035868679,0 +-47.46093714220798,-7.338769896464551,0 +-47.46548821338686,-7.338190161818078,0 +-47.47143623626379,-7.338478525413941,0 +-47.47695218922045,-7.339684314988445,0 +-47.48244250910116,-7.339984739557197,0 +-47.48837705734286,-7.339820063511071,0 +-47.49204124939949,-7.340171034725718,0 +-47.497568241409,-7.341828346330388,0 +-47.50126944635002,-7.343536385697572,0 +-47.50635758655943,-7.345661488632432,0 +-47.51327518395365,-7.347292666438879,0 +-47.51880988570329,-7.348954666516815,0 +-47.52431679011313,-7.349710948948655,0 +-47.52935271310179,-7.350026858120647,0 +-47.53712631106243,-7.350268029269076,0 +-47.54260284895476,-7.350118763095549,0 +-47.54442811352286,-7.350068997570521,0 +-47.55134361996499,-7.352589266033593,0 +-47.5573292740188,-7.353370990847542,0 +-47.5605826152529,-7.355108917912063,0 +-47.56564901055755,-7.35678995409745,0 +-47.57483998327843,-7.359705306729929,0 +-47.57856576426897,-7.362749114227601,0 +-47.58321828515123,-7.366213360948594,0 +-47.5846232577757,-7.367524595518081,0 +-47.58791728547152,-7.371038394285825,0 +-47.59354971683967,-7.376297642395341,0 +-47.59740255761937,-7.383431777958212,0 +-47.60080102986399,-7.390577021554132,0 +-47.60371760566064,-7.396830525266365,0 +-47.60702392526589,-7.400809284781634,0 +-47.6121125183257,-7.403378608905444,0 +-47.62005477099908,-7.409940465756592,0 +-47.62289430962969,-7.413480369360342,0 +-47.6266851080869,-7.418351257494908,0 +-47.6318281503113,-7.422729712459608,0 +-47.63965785552772,-7.426554288571177,0 +-47.64147240033337,-7.426940649911288,0 +-47.64828362354957,-7.428951956406705,0 +-47.65557486037179,-7.43185668425248,0 +-47.65782159130997,-7.431777636533886,0 +-47.66279433214365,-7.432509292153424,0 +-47.6696466604033,-7.433226205183322,0 +-47.67674634851837,-7.434509953865169,0 +-47.6836637526891,-7.432127988504989,0 +-47.68960697427522,-7.432413596008494,0 +-47.69418172619877,-7.432737528049188,0 +-47.70064350806913,-7.435269503838962,0 +-47.70848659444947,-7.43821483514605,0 +-47.71038554219082,-7.44087454034606,0 +-47.72117201816715,-7.456584846860816,0 +-47.73995405091757,-7.46523905478682,0 +-47.754696379507,-7.471384308366929,0 +-47.77205386402784,-7.476146046167249,0 +-47.77874879005732,-7.478583027192843,0 +-47.79887640374041,-7.487206478682024,0 +-47.8133559018831,-7.484170240452203,0 +-47.82651596108111,-7.481172312200047,0 +-47.83986500832207,-7.484730561024293,0 +-47.85074257351128,-7.493618921967896,0 +-47.85258116052277,-7.509346795104537,0 +-47.85290694748786,-7.51985211151412,0 +-47.85604270979064,-7.535536824379989,0 +-47.85375438816916,-7.547430988469383,0 +-47.85275131643022,-7.557976158370318,0 +-47.85330821610253,-7.576363404322078,0 +-47.84723381692061,-7.594934893703503,0 +-47.85804317327182,-7.60121288352306,0 +-47.86628140829787,-7.610192187481783,0 +-47.88380985248881,-7.618919353699353,0 +-47.89462714966688,-7.625200703718717,0 +-47.89736202609194,-7.627756947491715,0 +-47.92977372527743,-7.646243988739124,0 +-47.94448477055374,-7.651072513676009,0 +-47.95137544538947,-7.660068625150781,0 +-47.9649233914288,-7.670186567344382,0 +-47.97839444325904,-7.677679506806743,0 +-47.99182634861924,-7.683858355344666,0 +-48.00497692759042,-7.680842784386329,0 +-48.01696309922323,-7.683117362544877,0 +-48.02918989750588,-7.693268955221588,0 +-48.03612858134473,-7.703580010287999,0 +-48.04190720721834,-7.719185538878208,0 +-48.04616110878073,-7.728264128964104,0 +-48.05329071139248,-7.74513068659911,0 +-48.0400935897319,-7.746833223359568,0 +-48.0283739929675,-7.753743304353518,0 +-48.01937849847496,-7.763198667177953,0 +-48.0090199409558,-7.771381352397961,0 +-48.00006192253769,-7.782148374567019,0 +-47.98580620985742,-7.793069080495279,0 +-47.97684303205649,-7.803826444151336,0 +-47.96508522179047,-7.809437001013492,0 +-47.94710569365271,-7.828423933688403,0 +-47.94079350671873,-7.839127710666039,0 +-47.93319429970539,-7.851184510658819,0 +-47.92832040345588,-7.865785140451605,0 +-47.91643202968123,-7.867432080963288,0 +-47.90469865754056,-7.874333040349059,0 +-47.90099332781009,-7.883639237984099,0 +-47.88738668078616,-7.917374125743839,0 +-47.87706524586621,-7.926853261007588,0 +-47.86394171877011,-7.931165005027787,0 +-47.84937902033937,-7.931581648939579,0 +-47.83337787900435,-7.928102892227797,0 +-47.82021480805709,-7.931102609084987,0 +-47.80856846736407,-7.940623017782099,0 +-47.79407753480884,-7.943657684844995,0 +-47.77950899493856,-7.944069596448349,0 +-47.76380404721866,-7.951075147070418,0 +-47.75604550635356,-7.957856449852924,0 +-47.73908773410106,-7.96752281140733,0 +-47.72462622963966,-7.971868628899801,0 +-47.71152596519623,-7.977488694820927,0 +-47.69831569384682,-7.97917448273624,0 +-47.68359322818125,-7.974339194737999,0 +-47.67658646899243,-7.961407831749034,0 +-47.66696933535064,-7.949862187604354,0 +-47.65739069671414,-7.939627734405489,0 +-47.64641069284808,-7.926805671145464,0 +-47.63554465030408,-7.917918518634219,0 +-47.62462778804792,-7.907713575459778,0 +-47.61132652508243,-7.90676697979931,0 +-47.5980236128331,-7.905819806077489,0 +-47.58241113791073,-7.916757822692963,0 +-47.58154716878408,-7.932544430943515,0 +-47.58193281176901,-7.945668469170709,0 +-47.5756460163259,-7.957663086185123,0 +-47.56939742637361,-7.970969825907379,0 +-47.57368658485282,-7.981356858744945,0 +-47.57547628010104,-7.997065027572044,0 +-47.57578483660949,-8.007560962227327,0 +-47.5828814689847,-8.023117836309151,0 +-47.59114990313797,-8.033388347585138,0 +-47.59555348419451,-8.047704099169104,0 +-47.60257086137639,-8.060631819611165,0 +-47.61224080720923,-8.07348251223204,0 +-47.62607536861093,-8.092774942267194,0 +-47.63425181225919,-8.100418510856825,0 +-47.64788171278136,-8.113155934203688,0 +-47.66007757670468,-8.121993833740058,0 +-47.67503605757462,-8.134688648560427,0 +-47.68325211230811,-8.14363932798652,0 +-47.68896410974832,-8.157913395895719,0 +-47.69335040021804,-8.172226392194037,0 +-47.69382649046436,-8.189285882581204,0 +-47.69684502970723,-8.20233312527545,0 +-47.69182878502055,-8.21299368089652,0 +-47.68175673221545,-8.233007057104865,0 +-47.68745693039274,-8.247306868436606,0 +-47.69444921235008,-8.260255914083793,0 +-47.70284406952081,-8.275793884927742,0 +-47.70858726824888,-8.291411563709497,0 +-47.71565883322232,-8.306992669964639,0 +-47.7265290243767,-8.315886665862568,0 +-47.73334215272604,-8.322276190933255,0 +-47.74751818938557,-8.350922647062021,0 +-47.75726592717084,-8.36641275021055,0 +-47.76416675815666,-8.375412684324342,0 +-47.76872801313331,-8.394986462522651,0 +-47.76907235700512,-8.406790520926647,0 +-47.76941675122234,-8.418594318162775,0 +-47.76987591613082,-8.434332175612923,0 +-47.770300653023,-8.448760276414454,0 +-47.77989349892547,-8.458991931454957,0 +-47.77891544245689,-8.470832372785901,0 +-47.7726329213335,-8.48282175567204,0 +-47.76927434543383,-8.503913905636814,0 +-47.76970073464334,-8.518335514404855,0 +-47.77008356788541,-8.531444557570284,0 +-47.76788344644034,-8.547251065504096,0 +-47.76159028469483,-8.559238984897934,0 +-47.75795315016276,-8.571151274471404,0 +-47.75431687829602,-8.583063589915026,0 +-47.74677725642697,-8.597711257039359,0 +-47.74446658313365,-8.609586093916164,0 +-47.74484459020878,-8.622697725333889,0 +-47.74510856165892,-8.631876432835314,0 +-47.74700091203146,-8.651507971915501,0 +-47.74881811961998,-8.668517601950718,0 +-47.74790869820188,-8.68297882379543,0 +-47.74302090062841,-8.697551894532094,0 +-47.74070149249028,-8.70943668909613,0 +-47.74110908664817,-8.723872473870099,0 +-47.74125848859501,-8.729120896599463,0 +-47.74853013010682,-8.75123715743306,0 +-47.74495919361066,-8.765787895400644,0 +-47.75064326103882,-8.778759031396561,0 +-47.76547072927053,-8.786211403694631,0 +-47.77634826264313,-8.795102501176693,0 +-47.78460990965565,-8.805383868450757,0 +-47.79807255275098,-8.811567275444876,0 +-47.80902980803354,-8.823086359060902,0 +-47.82651372910357,-8.830473972840977,0 +-47.84392330579336,-8.835233294073378,0 +-47.85738902778986,-8.841422398621839,0 +-47.87214552484078,-8.846258275358878,0 +-47.8854985339502,-8.848503691717056,0 +-47.89744713861139,-8.848157530539275,0 +-47.91337827543511,-8.847695396124369,0 +-47.92825379765653,-8.856474962433508,0 +-47.93520421648136,-8.866801827692122,0 +-47.94485080379012,-8.878367837524671,0 +-47.95699830269024,-8.884596093540305,0 +-47.96930500850932,-8.896086606661463,0 +-47.97196107499481,-8.896008983146206,0 +-48.00150734752517,-8.905718113504097,0 +-48.01746115696746,-8.905297549613476,0 +-48.02963023044057,-8.911563191638956,0 +-48.03233051339382,-8.912809428520204,0 +-48.05383267255687,-8.93544595404218,0 +-48.06476474561362,-8.945626623382203,0 +-48.07557905070612,-8.951872405281618,0 +-48.09033619488479,-8.956689421599327,0 +-48.10228172084275,-8.956337954467608,0 +-48.11559480260661,-8.957258564334596,0 +-48.13703162039785,-8.963190241491438,0 +-48.14792900210806,-8.972058880551035,0 +-48.16120510205189,-8.971666655118282,0 +-48.1681598087978,-8.981964012487737,0 +-48.16597903996021,-8.997782065693739,0 +-48.16629541190662,-9.008273945745778,0 +-48.16540287910991,-9.022738169485114,0 +-48.15779336603563,-9.034773596362307,0 +-48.14752928744586,-9.04688529843045,0 +-48.14124816116865,-9.058878417381186,0 +-48.13894957464301,-9.07075351153096,0 +-48.13680929072407,-9.087869755936355,0 +-48.13060803020814,-9.10247896955631,0 +-48.12549602474219,-9.109186974501245,0 +-48.11623776959468,-9.129379681922629,0 +-48.12257991263532,-9.140104559461321,0 +-48.1298284924214,-9.147842457296395,0 +-48.13618825684989,-9.159573875662126,0 +-48.13956920504894,-9.172377945860962,0 +-48.14581141989279,-9.180137759737002,0 +-48.1550578570544,-9.187810322445872,0 +-48.16032440589899,-9.196585392620561,0 +-48.16461850242702,-9.206376292488585,0 +-48.16803203124188,-9.220149458594488,0 +-48.16826009886887,-9.228072201773234,0 +-48.16866767409093,-9.241928775848558,0 +-48.17194066314966,-9.250744961098592,0 +-48.17618951121825,-9.258540577333585,0 +-48.17550172209151,-9.269457025585423,0 +-48.17177192307084,-9.27947245739472,0 +-48.16904718126846,-9.289455081046947,0 +-48.16629410222567,-9.298446284108508,0 +-48.16466092207761,-9.311360818481022,0 +-48.16495664924459,-9.321247412126276,0 +-48.16538148207264,-9.335088981140538,0 +-48.16580633593478,-9.348932249732492,0 +-48.15997766553605,-9.355042394771941,0 +-48.14811802471188,-9.360344304035998,0 +-48.14132097044831,-9.36747684549197,0 +-48.1325481708139,-9.375659245330649,0 +-48.13585040016467,-9.385461383393434,0 +-48.13912292754242,-9.39427382155867,0 +-48.14045113374069,-9.40512374447246,0 +-48.14269222100818,-9.412976239161292,0 +-48.14502235117028,-9.423795460036436,0 +-48.14643972854132,-9.437611237635039,0 +-48.14066569892346,-9.445704129484463,0 +-48.12969571044009,-9.448004974037142,0 +-48.12173359542499,-9.450217492060904,0 +-48.10855438116573,-9.445659332975337,0 +-48.1033643798188,-9.439873237082292,0 +-48.09407546839017,-9.431237952551916,0 +-48.08487504618564,-9.425569431175427,0 +-48.07473028770782,-9.421907481852028,0 +-48.0646129892765,-9.419229102681543,0 +-48.05555803865533,-9.41850015370156,0 +-48.04535343511002,-9.4128536953049,0 +-48.0370959486843,-9.405170976178045,0 +-48.03096219827212,-9.401387677765637,0 +-48.01769266460843,-9.393849950940201,0 +-48.0085518545077,-9.390153087907658,0 +-47.99130344881539,-9.383719236627664,0 +-47.98121587401914,-9.382033401669897,0 +-47.97215771539267,-9.381308787429184,0 +-47.95704401687687,-9.379773229683856,0 +-47.94395819226965,-9.379169672469068,0 +-47.93586314596661,-9.377426982124137,0 +-47.92371696855884,-9.374811831970955,0 +-47.90760086962014,-9.374294322596045,0 +-47.89243449954613,-9.371762151220439,0 +-47.88134913477446,-9.371091383105792,0 +-47.86627259138651,-9.371525685288587,0 +-47.85625679669511,-9.371805197786021,0 +-47.84236684279441,-9.37615379285333,0 +-47.83461547019366,-9.384289804418184,0 +-47.82586705142901,-9.392449444643129,0 +-47.82102628146971,-9.397529904768856,0 +-47.81647932872524,-9.412501784167958,0 +-47.81270997177874,-9.421527921183191,0 +-47.81099671026223,-9.432481127084161,0 +-47.80438289860764,-9.448542049756545,0 +-47.80353857623085,-9.454517188877178,0 +-47.80086929789326,-9.467491289711246,0 +-47.79099488876103,-9.474729214508406,0 +-47.77799487310736,-9.477082349022103,0 +-47.76611893651421,-9.483364192621345,0 +-47.7560715243216,-9.483651597842657,0 +-47.74593329651726,-9.480970219212105,0 +-47.73283990346799,-9.480353424148081,0 +-47.72290551055876,-9.484601016257834,0 +-47.7180754659962,-9.491679586042881,0 +-47.72043063714528,-9.504512522242008,0 +-47.7186456257845,-9.513503281984123,0 +-47.70785536553179,-9.525751922424726,0 +-47.69791497404157,-9.532018116409413,0 +-47.68380318955319,-9.533445284220598,0 +-47.67371293351933,-9.533748750490073,0 +-47.66268269958625,-9.536056898268956,0 +-47.65582067366413,-9.543206840532767,0 +-47.646043266006,-9.554414347035948,0 +-47.64528315674937,-9.563372672072139,0 +-47.63092948781907,-9.583776450108576,0 +-47.62088817997902,-9.58406037252092,0 +-47.61687117388768,-9.58417387839164,0 +-47.59996372994275,-9.59059412437618,0 +-47.59100548487644,-9.593818848726718,0 +-47.58827018961887,-9.603802585007573,0 +-47.58358168459495,-9.615823267992399,0 +-47.57994686542163,-9.628789768043521,0 +-47.57935209645388,-9.642659652853645,0 +-47.57167542254589,-9.654741885811694,0 +-47.56996104321747,-9.664680377596765,0 +-47.56923917001421,-9.674601117940028,0 +-47.56455317464005,-9.686617282225752,0 +-47.55875290036143,-9.694701493558352,0 +-47.55504175066352,-9.705701306597966,0 +-47.5533372502744,-9.716647147324188,0 +-47.546500578055,-9.723773934968129,0 +-47.53873230060026,-9.733910255645517,0 +-47.53400657028102,-9.744950555987032,0 +-47.53727052009822,-9.75377576954121,0 +-47.54568253589357,-9.767430530874716,0 +-47.55091178903567,-9.775235950850998,0 +-47.55616888674946,-9.784035324495926,0 +-47.5625363681863,-9.796783622615525,0 +-47.57184426423462,-9.806467519914357,0 +-47.57697575621128,-9.810301611410079,0 +-47.5867288508385,-9.831838517823929,0 +-47.58904271331154,-9.84266533570951,0 +-47.59831186231034,-9.850335441935121,0 +-47.60858641204893,-9.857977871360964,0 +-47.6137518936698,-9.86278846474165,0 +-47.61714684908634,-9.875580015523184,0 +-47.62042774981301,-9.88441073913954,0 +-47.62692911737911,-9.900086392612092,0 +-47.63127186187709,-9.910862750402062,0 +-47.63877002752581,-9.926497701923171,0 +-47.64696663015889,-9.932206188177171,0 +-47.65219283727967,-9.939973138245112,0 +-47.65942960495644,-9.947687884189531,0 +-47.66373809463099,-9.958459755434479,0 +-47.66910373613719,-9.970196433328564,0 +-47.67441899532429,-9.979951148692523,0 +-47.67671810903096,-9.989788274098816,0 +-47.68206285029608,-10.00052604382223,0 +-47.68646593710215,-10.0132578981588,0 +-47.69300939223469,-10.03088375925013,0 +-47.69521658387571,-10.03775190697822,0 +-47.69762293324612,-10.05154472830667,0 +-47.70103406462527,-10.06531076425637,0 +-47.70433192344036,-10.07512052258783,0 +-47.70470192183153,-10.08798267072626,0 +-47.69582857481922,-10.09418014441732,0 +-47.68597683830759,-10.10139716939226,0 +-47.68128914894034,-10.11342408576073,0 +-47.67981330872217,-10.13230040557889,0 +-47.68026354485011,-10.14815183376999,0 +-47.67541743110122,-10.15419546188963,0 +-47.6635554825685,-10.16038031477615,0 +-47.66090168911627,-10.17227242387711,0 +-47.66618603903792,-10.18209590024069,0 +-47.66840655526779,-10.19001335603111,0 +-47.67267021977494,-10.19885836296148,0 +-47.67920548848543,-10.21654959422858,0 +-47.68551899736951,-10.22630960371673,0 +-47.69373310970794,-10.23204916497059,0 +-47.70379078344387,-10.23178194925412,0 +-47.71686716732986,-10.23143401762556,0 +-47.73414178775175,-10.23692934608503,0 +-47.74337033372449,-10.24263991746167,0 +-47.75162318367077,-10.2493712379755,0 +-47.75984738635045,-10.25509497509678,0 +-47.76096885375554,-10.25902821815491,0 +-47.77472101531665,-10.28280448180454,0 +-47.78408327307701,-10.29344758211715,0 +-47.78635065276233,-10.30230295478806,0 +-47.77661222832077,-10.31347137911524,0 +-47.76770743284506,-10.31867168128403,0 +-47.75385757180688,-10.3270292788426,0 +-47.74805617499209,-10.33513962726752,0 +-47.7473666600637,-10.34604630076658,0 +-47.74472511660916,-10.35898099248278,0 +-47.73892529884692,-10.36704863962299,0 +-47.73002112923947,-10.37222912424514,0 +-47.72008620380718,-10.3764688165906,0 +-47.70730246817452,-10.38576418475351,0 +-47.70049436786532,-10.39385965226325,0 +-47.6946586177734,-10.40093905954773,0 +-47.68594309165909,-10.41304444036969,0 +-47.68013635485796,-10.42111924465172,0 +-47.6753989943966,-10.43114484626667,0 +-47.67574537484462,-10.4430061570058,0 +-47.68126123264491,-10.45966680534541,0 +-47.67433963044864,-10.46381600570225,0 +-47.66758888127437,-10.47389472137665,0 +-47.66276253678553,-10.48095251541973,0 +-47.65710183062523,-10.49396760884123,0 +-47.65451349403266,-10.50887482933328,0 +-47.64971495089212,-10.51692035330914,0 +-47.63894120332168,-10.52710997691664,0 +-47.63525949376032,-10.53908140953291,0 +-47.627349450183,-10.54425433267577,0 +-47.61753409702139,-10.55344262736959,0 +-47.61783971883541,-10.56432154819587,0 +-47.6200658238821,-10.57218658990286,0 +-47.62756149272354,-10.58883155453833,0 +-47.63000230031042,-10.60463290447866,0 +-47.62513019573203,-10.61072204173289,0 +-47.61734332869957,-10.62086344463046,0 +-47.6094213449627,-10.62604773013625,0 +-47.5976314204033,-10.63729259801181,0 +-47.59192259460035,-10.64934239339707,0 +-47.58699797800764,-10.65344335576899,0 +-47.57516105815579,-10.66269180460849,0 +-47.56528177611683,-10.66990394156652,0 +-47.55747130355249,-10.67904102992375,0 +-47.5536621216083,-10.68707626481436,0 +-47.54691545706972,-10.69816341637705,0 +-47.54612930821715,-10.70611387707735,0 +-47.54278195844608,-10.72635403715925,0 +-47.53391194271496,-10.73352364337651,0 +-47.52791841715679,-10.73566213477907,0 +-47.51910687745834,-10.74481277759921,0 +-47.5195264467845,-10.7586770697073,0 +-47.51988596943203,-10.77055818948921,0 +-47.51816805747566,-10.78051058673333,0 +-47.51235959427336,-10.78859072681963,0 +-47.51165464203692,-10.79851533692978,0 +-47.50988062339675,-10.80648606071594,0 +-47.50751238870424,-10.82931337069839,0 +-47.50277922889889,-10.84032623655294,0 +-47.5030892190522,-10.85120357536726,0 +-47.50744487350163,-10.8619722120513,0 +-47.51271890208221,-10.86974551365145,0 +-47.52442288400368,-10.89020325408917,0 +-47.52474371461165,-10.90107529200595,0 +-47.5239707031264,-10.91000099219447,0 +-47.52128807058457,-10.92293876586411,0 +-47.51850116814822,-10.93192261835194,0 +-47.51777893822391,-10.94283171182913,0 +-47.52012905403524,-10.95563981778277,0 +-47.5144434757613,-10.96966154245031,0 +-47.5127092191919,-10.98060691609349,0 +-47.50490979421121,-10.99072577664459,0 +-47.49616470819464,-11.00284808399672,0 +-47.48829133248589,-11.00999499743529,0 +-47.48147880023794,-11.01909430305756,0 +-47.48275564873008,-11.02896530285659,0 +-47.48999973440336,-11.03570307021063,0 +-47.50115121309807,-11.03737573296154,0 +-47.5102475960856,-11.03711318904404,0 +-47.51836165050947,-11.03786750861812,0 +-47.52665344702452,-11.04454773916868,0 +-47.5402908953491,-11.06095210873254,0 +-47.54367770562425,-11.07270904308094,0 +-47.54823249203487,-11.09037318088476,0 +-47.55760757724494,-11.10099829493991,0 +-47.56821680968048,-11.11950218343259,0 +-47.57879867342093,-11.13701751266657,0 +-47.57499910415154,-11.14502868302495,0 +-47.57224137344716,-11.15296116086512,0 +-47.57144026715994,-11.1588624179683,0 +-47.56183924174707,-11.17324193695278,0 +-47.55634844262552,-11.19122426647862,0 +-47.55653623547618,-11.1971653938092,0 +-47.56100877819782,-11.21092067232152,0 +-47.56752729648047,-11.22560619530183,0 +-47.56994842638879,-11.23841030103781,0 +-47.5683553707284,-11.25035599944307,0 +-47.57274621354831,-11.26306940211677,0 +-47.57500895124623,-11.27189000818184,0 +-47.57934639808912,-11.28263148662066,0 +-47.58575822303111,-11.29529246588317,0 +-47.59686872928753,-11.29793115304067,0 +-47.60097673076188,-11.30370325735286,0 +-47.60429436387259,-11.31447168530349,0 +-47.61099316459885,-11.33700770986242,0 +-47.60727028680974,-11.34797286827418,0 +-47.60962177331437,-11.35976050398797,0 +-47.61183341954304,-11.36661362922676,0 +-47.61723683727815,-11.37930500650764,0 +-47.61855303629628,-11.3901333685637,0 +-47.62182909399731,-11.39893225681539,0 +-47.63602222633568,-11.4015019731182,0 +-47.64514827368109,-11.40322354446604,0 +-47.65239906571702,-11.40993438171363,0 +-47.67193641555865,-11.42321217538561,0 +-47.6854458636336,-11.43865605697461,0 +-47.69066846602983,-11.4454342228292,0 +-47.69490707030032,-11.4532364040557,0 +-47.70543008794597,-11.46979011367997,0 +-47.71168865440418,-11.47755396322661,0 +-47.72197907859233,-11.48522351743927,0 +-47.72914655196427,-11.48900192996016,0 +-47.74055251460393,-11.49959855282476,0 +-47.75390298505936,-11.5071385423933,0 +-47.76220726644362,-11.51482024691478,0 +-47.76849317854531,-11.52256168937816,0 +-47.77368355251366,-11.52736436379702,0 +-47.78720844975767,-11.54084145977306,0 +-47.79643810272794,-11.54554106298939,0 +-47.78954660527619,-11.55167572699651,0 +-47.78473148595576,-11.55973528538398,0 +-47.78505051340401,-11.57062760316306,0 +-47.7782439313961,-11.57973420952158,0 +-47.77140762966055,-11.5878507596025,0 +-47.76650346359495,-11.59294099641395,0 +-47.75686584047867,-11.60919406624922,0 +-47.74803824854192,-11.61837569706176,0 +-47.74125812509963,-11.62847712905712,0 +-47.73964259305711,-11.64239037219733,0 +-47.73583343667061,-11.65042024208744,0 +-47.73320764683939,-11.66436010664268,0 +-47.73144742848105,-11.67332298527332,0 +-47.72677230966765,-11.68632773683406,0 +-47.72714468632935,-11.69918288891513,0 +-47.72936515863558,-11.70604758478349,0 +-47.73669415934666,-11.71474904226703,0 +-47.7478928460374,-11.71740491573661,0 +-47.75805300099102,-11.71910057628482,0 +-47.77332265564441,-11.72263367874157,0 +-47.78354116308214,-11.72630674559293,0 +-47.79280777047175,-11.73198501979711,0 +-47.80198774972611,-11.73469707851953,0 +-47.8141697171916,-11.73633484104296,0 +-47.82239874361453,-11.741049718358,0 +-47.83273724893922,-11.7486735914333,0 +-47.84051544199981,-11.77220601335316,0 +-47.84080665855555,-11.78210061318467,0 +-47.84600434757721,-11.7869069768018,0 +-47.84918062184411,-11.79177030478672,0 +-47.85980587856116,-11.80929874251228,0 +-47.85711950180786,-11.82125931796016,0 +-47.85576434056684,-11.84406948321646,0 +-47.85599609273809,-11.85198259666915,0 +-47.85732567016276,-11.86283371701222,0 +-47.8566629321822,-11.87473019916522,0 +-47.85799290143522,-11.88557976926057,0 +-47.8654752383781,-11.89922393599089,0 +-47.87382388963915,-11.90789497369499,0 +-47.87512515337247,-11.91775424582333,0 +-47.87339386305348,-11.92769862511415,0 +-47.87270489071982,-11.9386042654262,0 +-47.87096089787019,-11.94853675053035,0 +-47.87021117894177,-11.95842052369047,0 +-47.86953740157775,-11.97029179753238,0 +-47.86773985728549,-11.97823938325453,0 +-47.86914540394717,-11.99202261622786,0 +-47.87428643435212,-11.99484845199719,0 +-47.88664969485981,-12.00242025042095,0 +-47.88296725492539,-12.01534428516631,0 +-47.87611673229546,-12.02341996031543,0 +-47.87143770669098,-12.03638008590048,0 +-47.86884352260878,-12.05034313705717,0 +-47.85877725358186,-12.0516266571663,0 +-47.84884926694372,-12.0578300397879,0 +-47.84399733785229,-12.06486635167747,0 +-47.83729581845262,-12.07786083039253,0 +-47.82676267455393,-12.09860436909333,0 +-47.82693197585384,-12.10453737434165,0 +-47.8274154507552,-12.12132808593304,0 +-47.82781530775624,-12.1351438816448,0 +-47.83025831500942,-12.14988470988388,0 +-47.83757204058943,-12.15855887411255,0 +-47.84497007138119,-12.17018724372803,0 +-47.84942866161552,-12.18485256447916,0 +-47.84974187662959,-12.19568713657565,0 +-47.84809700636929,-12.20854488295294,0 +-47.84343513286969,-12.22052515264519,0 +-47.83697152650856,-12.23950137353748,0 +-47.83732862142126,-12.25135041134065,0 +-47.840712302174,-12.26311310850964,0 +-47.84599477168006,-12.27086508514439,0 +-47.8532484528038,-12.2766021295653,0 +-47.86561854143194,-12.28417804318627,0 +-47.8709555874789,-12.29295151717309,0 +-47.87127508627037,-12.30286746333674,0 +-47.87145995236628,-12.30880894761553,0 +-47.87200545814751,-12.32662445380439,0 +-47.87436172368104,-12.33745766422286,0 +-47.879722921744,-12.3472157611221,0 +-47.88309300995164,-12.35802528002437,0 +-47.88355092275692,-12.37289014416713,0 +-47.88387893994543,-12.38377674094874,0 +-47.88525000538706,-12.39562756546844,0 +-47.886630864329,-12.40750336090692,0 +-47.88699870559375,-12.41940995357352,0 +-47.88927159248065,-12.4272966360952,0 +-47.89366563098366,-12.4381108903306,0 +-47.89037987180232,-12.46526432285926,0 +-47.89178356102208,-12.47808309065416,0 +-47.89118114785852,-12.49196099229758,0 +-47.88846200908775,-12.50293099201169,0 +-47.88490462715908,-12.51986419522705,0 +-47.88305295999604,-12.52585712129057,0 +-47.87758602248169,-12.54680074348536,0 +-47.87603267155269,-12.5626796444825,0 +-47.87346564337106,-12.57858853628591,0 +-47.87283610935145,-12.5914741921469,0 +-47.87313068200289,-12.6013644244614,0 +-47.86847575575693,-12.61535472862493,0 +-47.8551846364077,-12.61177186708944,0 +-47.84484433435528,-12.6051341545925,0 +-47.83664867493506,-12.60239541559144,0 +-47.82037437995147,-12.60087368083973,0 +-47.81336726625062,-12.6040405842754,0 +-47.79929380925589,-12.60839528907143,0 +-47.78727573221629,-12.61368191870042,0 +-47.77731314161213,-12.61990073344903,0 +-47.76726413602845,-12.62315064625936,0 +-47.74916471043237,-12.62860330605982,0 +-47.73807370786358,-12.63089063379012,0 +-47.73726213430025,-12.63784251330182,0 +-47.73057102879201,-12.65188629825455,0 +-47.72361974456348,-12.65702805719712,0 +-47.71573754766902,-12.6651678605058,0 +-47.70304075915359,-12.68235323969353,0 +-47.69084420880264,-12.68170095982426,0 +-47.67760520548988,-12.68008667127603,0 +-47.66845061557367,-12.67934925031753,0 +-47.65822557806577,-12.67666054589243,0 +-47.65293038182379,-12.66888476621855,0 +-47.64853726484539,-12.65712379077025,0 +-47.64425402577971,-12.64932186826894,0 +-47.62786179736761,-12.64383188166064,0 +-47.61772288571699,-12.64410967923682,0 +-47.60555260380778,-12.64444352055388,0 +-47.59324266011479,-12.63983002199185,0 +-47.57487485474718,-12.63637127245918,0 +-47.56560785293249,-12.63167321317036,0 +-47.54926830752177,-12.62815712666875,0 +-47.53189111401127,-12.62467066650645,0 +-47.52173184552437,-12.62494735336977,0 +-47.51071887217816,-12.63118917252293,0 +-47.49761605693425,-12.63550743758026,0 +-47.49253380742546,-12.63564560692379,0 +-47.47903589354024,-12.62610715723812,0 +-47.46558185583148,-12.6185468297107,0 +-47.4554130572332,-12.61981356392361,0 +-47.44029290502453,-12.62517491649833,0 +-47.42720794422023,-12.63048130940353,0 +-47.41508460633453,-12.63377972785226,0 +-47.41206069761353,-12.63485185991535,0 +-47.39021858613721,-12.65445696984055,0 +-47.37930690926988,-12.66366458647883,0 +-47.37029443358458,-12.66786496240899,0 +-47.35835615640455,-12.67609390165464,0 +-47.3565208192615,-12.68306623192158,0 +-47.3487976895334,-12.69711735524203,0 +-47.3409107246175,-12.70523768541182,0 +-47.33301914583767,-12.71336267578247,0 +-47.31822064535329,-12.72859801544803,0 +-47.31230307302142,-12.73468952616573,0 +-47.30523929707093,-12.73586608849964,0 +-47.29023694382549,-12.74318441372841,0 +-47.27518548610511,-12.74851647638621,0 +-47.26713903268259,-12.75070028597097,0 +-47.24813772271173,-12.7600844325507,0 +-47.2351814180833,-12.76832588166808,0 +-47.22827579430538,-12.77542404723839,0 +-47.21525047158883,-12.77873037001546,0 +-47.20529760516259,-12.78590108931093,0 +-47.19227203010843,-12.7921664442506,0 +-47.17929624652677,-12.79941669646179,0 +-47.16628969140645,-12.80567947807947,0 +-47.1522033765121,-12.80999565628565,0 +-47.13712609300535,-12.81532579195878,0 +-47.12604845552641,-12.81857644157973,0 +-47.10704677757483,-12.82894888184774,0 +-47.09387494410631,-12.83027787795424,0 +-47.08684896381335,-12.83342478511709,0 +-47.06564420551979,-12.83692705649558,0 +-47.03883503851654,-12.84741579055289,0 +-47.03314005934952,-12.85541185348661,0 +-47.01856156639492,-12.86753228621666,0 +-47.01257731569648,-12.87163320721195,0 +-46.99886387023926,-12.88276948309505,0 +-46.99295108121095,-12.88485491526174,0 +-46.9732163391109,-12.89214590055017,0 +-46.96114628788423,-12.9003781859769,0 +-46.95217960825027,-12.91149322306053,0 +-46.93724666111921,-12.9306922235355,0 +-46.92122409764989,-12.94498044176543,0 +-46.91419088297022,-12.95012153017024,0 +-46.90611468209562,-12.95430427646284,0 +-46.88796930062171,-12.96570003775684,0 +-46.87584116358002,-12.97198021975079,0 +-46.85788528389769,-12.98196486322978,0 +-46.85289304251663,-12.98502793130353,0 +-46.84098375989037,-12.99515279977439,0 +-46.83189553059954,-12.99635644069657,0 +-46.82283273959303,-12.9985473667486,0 +-46.80579267868634,-13.00586158037864,0 +-46.79991434140297,-13.01294454947758,0 +-46.78595929012818,-13.0212012796668,0 +-46.77006486268672,-13.03438713327865,0 +-46.76324917990811,-13.04348485818365,0 +-46.75241901284429,-13.05462971013658,0 +-46.74452151266755,-13.06367683814243,0 +-46.74073427829745,-13.0755777464361,0 +-46.74088596489297,-13.08246405031981,0 +-46.7443550781671,-13.10013387101182,0 +-46.74880523347174,-13.11291094162109,0 +-46.7551527952242,-13.12167126244438,0 +-46.75955235372182,-13.13440601085849,0 +-46.76178082939572,-13.14321771495033,0 +-46.76418715747778,-13.15990807669084,0 +-46.76542418708631,-13.1697334021249,0 +-46.76874099305433,-13.18148666177499,0 +-46.77000752877012,-13.19230485847698,0 +-46.77940337672195,-13.20293670812347,0 +-46.78152719806062,-13.20683284389539,0 +-46.79330255224531,-13.22435410307315,0 +-46.80228315160054,-13.22508887077689,0 +-46.81656972433519,-13.22770969126397,0 +-46.82681565067575,-13.23141140046281,0 +-46.83908927739937,-13.2350633656065,0 +-46.85131658822507,-13.23772472203995,0 +-46.86145324389216,-13.23846058433622,0 +-46.87971756129348,-13.23998282412788,0 +-46.89804727849792,-13.24347881266886,0 +-46.91934887841511,-13.24393938787475,0 +-46.92748049806999,-13.24472482350179,0 +-46.93769384080151,-13.24743442679312,0 +-46.95516423857732,-13.25589157625059,0 +-46.96137839122814,-13.26067675467639,0 +-46.97175425774005,-13.26931077237553,0 +-46.99131492375203,-13.27969356581736,0 +-47.00890343638235,-13.2921020967986,0 +-47.01122093357228,-13.30291497787624,0 +-47.0166646875086,-13.3166187199862,0 +-47.02713256348895,-13.3282223250478,0 +-47.03346261821031,-13.33696412201078,0 +-47.04182470492449,-13.34565631115911,0 +-47.0552927242422,-13.35521117450862,0 +-47.06639412802843,-13.36254667811525,0 +-47.08514414704741,-13.37603170357109,0 +-47.09444052122145,-13.37884591811733,0 +-47.10491658695279,-13.3865944635346,0 +-47.11238315636961,-13.39734467108527,0 +-47.12509345432673,-13.41486536976964,0 +-47.13266712564794,-13.43053741004274,0 +-47.1401878997171,-13.44423353153806,0 +-47.14342608522867,-13.45491868079132,0 +-47.14669293009042,-13.47232459815752,0 +-47.14794036835534,-13.48880120042532,0 +-47.15337582690415,-13.49961054056404,0 +-47.16493033171149,-13.51157436034622,0 +-47.16949682938557,-13.52520064230957,0 +-47.17827090063683,-13.54468098050713,0 +-47.18365617792033,-13.5554124142577,0 +-47.19130976342601,-13.57498582566748,0 +-47.19618637307807,-13.60650177096388,0 +-47.19949219958454,-13.61729214569113,0 +-47.20792312976752,-13.62893448551369,0 +-47.21325681347331,-13.63966590563741,0 +-47.21953182636825,-13.64740622227846,0 +-47.22072549146361,-13.65626076690018,0 +-47.22395778057158,-13.66505894909399,0 +-47.22526494751718,-13.67981599684845,0 +-47.22545652957056,-13.68966362928749,0 +-47.22564800729339,-13.69950515102805,0 +-47.22797392191713,-13.71518423517062,0 +-47.2312398494319,-13.72884597531001,0 +-47.23540075706196,-13.73462919220095,0 +-47.24171230513587,-13.74819511128319,0 +-47.24592251433443,-13.75496416727952,0 +-47.25032086841745,-13.76764450245072,0 +-47.25683999022197,-13.78322938556492,0 +-47.25403300020906,-13.79506162500249,0 +-47.24684418391308,-13.80389423873603,0 +-47.24366881262801,-13.81064421713238,0 +-47.24238585111969,-13.82563367227412,0 +-47.24498378938479,-13.84236165352291,0 +-47.25047580711685,-13.8560273783518,0 +-47.26285057096443,-13.85877012345846,0 +-47.26980792780817,-13.85367311837701,0 +-47.29161164487753,-13.84639703904212,0 +-47.30281305962765,-13.85000171255356,0 +-47.32492737265502,-13.86938494787872,0 +-47.33237439470396,-13.87909802010987,0 +-47.33764752861805,-13.88490004337156,0 +-47.35282954170372,-13.88455088168213,0 +-47.35863039486261,-13.87652457439877,0 +-47.36571155019985,-13.87636276296418,0 +-47.37194322201633,-13.88115208806375,0 +-47.38843296984058,-13.89062961658209,0 +-47.39570298177878,-13.89732626977748,0 +-47.40405981251251,-13.90692562495944,0 +-47.41537898223591,-13.91449408423703,0 +-47.42567795995284,-13.92207478537465,0 +-47.44312162705324,-13.93338700581142,0 +-47.44725366414038,-13.93719029676197,0 +-47.45955965478444,-13.94567372018489,0 +-47.49522313386872,-13.96323401176713,0 +-47.50357041131328,-13.97372863935463,0 +-47.51099814026789,-13.98718128286754,0 +-47.51627643766543,-13.99581815376233,0 +-47.52465545538274,-14.00730007586191,0 +-47.53422481454535,-14.0246130014089,0 +-47.53457830915382,-14.03632573440752,0 +-47.52460737771683,-14.03952434810852,0 +-47.51567079325317,-14.04367228801808,0 +-47.50598675263934,-14.05663993374878,0 +-47.5092921774764,-14.06633056376927,0 +-47.51757552788477,-14.07393711487801,0 +-47.52491421266358,-14.08352946060088,0 +-47.53119099222909,-14.09119583669082,0 +-47.53139627168066,-14.0980463284142,0 +-47.53076981174802,-14.11080035229595,0 +-47.52726010066158,-14.12852919043254,0 +-47.52766657732856,-14.14224447098361,0 +-47.52109304599179,-14.15907192625627,0 +-47.51835435090117,-14.16894984349937,0 +-47.50961661989233,-14.18093736338826,0 +-47.50575166474368,-14.18691943549797,0 +-47.49690040824311,-14.1950040180251,0 +-47.48710383153878,-14.20518438497029,0 +-47.48643940584837,-14.21707480243639,0 +-47.48447718369395,-14.21911499828729,0 +-47.48938963064133,-14.24900046803075,0 +-47.49770379605457,-14.25665827528926,0 +-47.50699934573493,-14.26331208335223,0 +-47.51334548596653,-14.27296946959366,0 +-47.5155641296526,-14.27977889841895,0 +-47.52120517918119,-14.30025695268512,0 +-47.51968561731077,-14.31796905278234,0 +-47.51323841953263,-14.33963184740128,0 +-47.51449952818879,-14.34844657906186,0 +-47.51815566271598,-14.36991455526155,0 +-47.51864443315179,-14.38653431221653,0 +-47.51493911137709,-14.39838443603781,0 +-47.50718071577347,-14.41035093000425,0 +-47.50228659465466,-14.41636862696778,0 +-47.50256702293973,-14.42617883457073,0 +-47.50326822656088,-14.45070252648875,0 +-47.50461844615694,-14.46244299020756,0 +-47.50504153764347,-14.47715055155071,0 +-47.50529546549569,-14.48597617096403,0 +-47.50363594292789,-14.49878004265545,0 +-47.50293279669505,-14.50959685000938,0 +-47.49719043959863,-14.52153153315863,0 +-47.49169982575028,-14.54229698229454,0 +-47.48899597203584,-14.55415246831791,0 +-47.48933277604813,-14.56592740396398,0 +-47.48767004029622,-14.57873853039602,0 +-47.48794978043854,-14.58853964381565,0 +-47.48940927694889,-14.60416704907217,0 +-47.495144403651,-14.6275221242719,0 +-47.50389858520609,-14.64987467917915,0 +-47.51026258773042,-14.65953023076949,0 +-47.51457265398688,-14.66825861136777,0 +-47.51806898656019,-14.68388693158212,0 +-47.5213389545495,-14.69166396589391,0 +-47.52489502396627,-14.70926379548918,0 +-47.52952460424869,-14.72880837424251,0 +-47.53891637254848,-14.73742071328802,0 +-47.54630985300207,-14.74706939005104,0 +-47.55085439760644,-14.7636543405663,0 +-47.55198430042855,-14.76755783540982,0 +-47.5538967830707,-14.79946542344348,0 +-47.55634156426925,-14.81415593181229,0 +-47.56081565275007,-14.82878360776786,0 +-47.56441184126376,-14.84834691202278,0 +-47.56452206991091,-14.8522756798154,0 +-47.57355126202692,-14.88444130595696,0 +-47.57605070206748,-14.90106183617872,0 +-47.57616130497226,-14.90498499911216,0 +-47.57849448185367,-14.91571600845672,0 +-47.58608957730465,-14.9331693186565,0 +-47.59042275589336,-14.94285905890302,0 +-47.59498262985629,-14.95840559334487,0 +-47.59544514101828,-14.97309976327525,0 +-47.5956838424168,-14.98094159080349,0 +-47.59604186490618,-14.9927073133463,0 +-47.59759280240875,-15.0103346553575,0 +-47.59607325389247,-15.02707289524103,0 +-47.59541974975369,-15.03984946187862,0 +-47.59358285432467,-15.04676820154626,0 +-47.59495149056986,-15.05947908833242,0 +-47.59711532154157,-15.06431979919386,0 +-47.59959277574523,-15.08089980998064,0 +-47.5970488350617,-15.09956180875717,0 +-47.59536231827101,-15.11231973657734,0 +-47.59559560851842,-15.12110412330921,0 +-47.59799244305892,-15.13471356386112,0 +-47.60138319149088,-15.14732269982991,0 +-47.6006218238759,-15.15521871778073,0 +-47.59296595721825,-15.17018071973577,0 +-47.58711813659416,-15.17820547289761,0 +-47.57455459851596,-15.19921567937614,0 +-47.57076123497837,-15.2081788376785,0 +-47.57228434849404,-15.22529642037016,0 +-47.57087748020983,-15.24803583686348,0 +-47.56503484586311,-15.25704946639696,0 +-47.55019506820305,-15.27122486979964,0 +-47.53529480584722,-15.28224914258221,0 +-47.53344826287047,-15.2893020971641,0 +-47.530944129057,-15.3079473484463,0 +-47.52936961141851,-15.32363111811816,0 +-47.52948356127659,-15.32754245932258,0 +-47.52390058090406,-15.34528781413232,0 +-47.52412786588607,-15.35311549622109,0 +-47.52444056973756,-15.36388063533681,0 +-47.52593551310128,-15.38056130279849,0 +-47.52516961510865,-15.38943534447663,0 +-47.52533792448774,-15.39532735623209,0 +-47.52485487160391,-15.41400448724302,0 +-47.5277497008079,-15.44356409871217,0 +-47.53227386791539,-15.45907587394707,0 +-47.53470576456688,-15.47273060330728,0 +-47.53490120850192,-15.47961845374029,0 +-47.53625399667796,-15.49138544156589,0 +-47.53879120424642,-15.50900888955294,0 +-47.54223385382952,-15.52265951725242,0 +-47.54960808362011,-15.53126988123949,0 +-47.55894754243744,-15.53790171164835,0 +-47.56948714447526,-15.55034772806308,0 +-47.57174450637419,-15.55813353249738,0 +-47.57316769009893,-15.57180603457923,0 +-47.57334162093152,-15.57767908102715,0 +-47.57565280264188,-15.58662878151568,0 +-47.58437804970556,-15.58899520494181,0 +-47.58763538566551,-15.59110232957843,0 +-47.59272800634534,-15.5935919667832,0 +-47.60149946549982,-15.59685638711394,0 +-47.60974233022517,-15.59790933916757,0 +-47.61615479715751,-15.59858161017244,0 +-47.62575664005968,-15.59870665733567,0 +-47.63724051948248,-15.60009989687298,0 +-47.64270887039153,-15.59905449572066,0 +-47.64912108417691,-15.59886681764053,0 +-47.65507690793401,-15.59869235009994,0 +-47.66106012163324,-15.59940287444019,0 +-47.66610209231912,-15.59925498497093,0 +-47.67348875005302,-15.60081025455543,0 +-47.67858687154546,-15.6024246224543,0 +-47.6855293137445,-15.60491101353899,0 +-47.69246087875975,-15.6074070440165,0 +-47.7017280399417,-15.6115998255498,0 +-47.70776110720315,-15.61499103425421,0 +-47.71379819006675,-15.61882425252304,0 +-47.71704800314321,-15.62095514520276,0 +-47.72213604809164,-15.62347608492779,0 +-47.73046062872421,-15.62767631457421,0 +-47.73852526553748,-15.63148820793152,0 +-47.75012900090384,-15.63562398056852,0 +-47.7622189083162,-15.64021463144111,0 +-47.77975574398981,-15.64757553159906,0 +-47.78577053302516,-15.65130446741507,0 +-47.79223673303706,-15.65458387096022,0 +-47.80428424952122,-15.66035828114086,0 +-47.80987214556914,-15.66329335040231,0 +-47.81450460579406,-15.66493250335845,0 +-47.82332911306675,-15.66867785396034,0 +-47.83774948696092,-15.67544565861407,0 +-47.84658236038696,-15.68011703449599,0 +-47.85492681354069,-15.68434646920003,0 +-47.86185552117577,-15.68724167234419,0 +-47.8664585731502,-15.68840441705608,0 +-47.87387867882686,-15.69165892427493,0 +-47.88181503932696,-15.6962139620967,0 +-47.88695765216688,-15.69911485774358,0 +-47.89260728094953,-15.70241307062354,0 +-47.8997007344438,-15.70971107527413,0 +-47.90539703674749,-15.71706172219934,0 +-47.90967350951929,-15.72178390777632,0 +-47.91354552042238,-15.72783844637708,0 +-47.91974850990538,-15.73648486146967,0 +-47.9230879863924,-15.74212416240472,0 +-47.92884812973093,-15.75121194103783,0 +-47.93259733588642,-15.75418803706743,0 +-47.93737631916348,-15.76109752755776,0 +-47.93981662969891,-15.7663110353315,0 +-47.94238300796255,-15.77592029161598,0 +-47.94339571122902,-15.77897449288746,0 +-47.94400990060194,-15.78380333963801,0 +-47.94505330176839,-15.78773941847723,0 +-47.94716903458535,-15.79649380145018,0 +-47.94789777377301,-15.80484890742603,0 +-47.94791199270006,-15.80528941355568,0 +NA,NA,NA +-47.45807753364181,-6.560683498667419,0 +-47.44391768209105,-6.565386517172557,0 +-47.44025709571756,-6.577440084920386,0 +-47.43534646677875,-6.599561555039783,0 +-47.42092476440504,-6.643640187349795,0 +-47.43908380301006,-6.658900183699859,0 +-47.45688256619251,-6.699566288887882,0 +-47.46056497973547,-6.717866176301776,0 +-47.44691168296738,-6.755485136871441,0 +-47.43473979133677,-6.780748069896644,0 +-47.43116372074919,-6.801573453387314,0 +-47.42826143285124,-6.821109325078558,0 +-47.438436233812,-6.844725498225404,0 +-47.45202048401532,-6.859929437800851,0 +-47.46362320389584,-6.875745574178028,0 +-47.46377125252157,-6.909900331083151,0 +-47.45823709072531,-6.928756553156927,0 +-47.44663184032908,-6.958609613338676,0 +-47.43976775653548,-6.979364731842617,0 +-47.43882779098481,-7.001475341170551,0 +-47.44239702724347,-7.027593511192044,0 +-47.44003907295667,-7.048938340148975,0 +-47.43325657202448,-7.066965742748049,0 +-47.42978356919032,-7.079505155868343,0 +-47.42394776902901,-7.104975036170284,0 +-47.41923692724782,-7.127850580259502,0 +-47.41408306314904,-7.144576106636592,0 +-47.41429625532724,-7.168325943398255,0 +-47.4190647503091,-7.179766565302931,0 +-47.41601072188053,-7.202508903373585,0 +-47.4207026935676,-7.219991250615034,0 +-47.42760280480575,-7.236420323074612,0 +-47.4317429644015,-7.253896022982,0 +-47.43857060913191,-7.276330150680246,0 +-47.44176337947304,-7.284012437680866,0 +-47.44161084157863,-7.295470104053462,0 +-47.43871018138287,-7.306326032069284,0 +-47.43687761832364,-7.319378175300518,0 +-47.43941749596721,-7.334132364077811,0 +-47.44478994803088,-7.342935524161236,0 diff --git a/R-utils/roads/br135.csv b/R-utils/roads/br135.csv new file mode 100644 index 000000000..d97ff7a5e --- /dev/null +++ b/R-utils/roads/br135.csv @@ -0,0 +1,479 @@ +-44.29247865892732,-2.530737286333835,0 +-44.28729464423999,-2.531544404563002,0 +-44.28376620167748,-2.533277700924414,0 +-44.27766522722045,-2.53606474208116,0 +-44.27220475171686,-2.538507115810835,0 +-44.26485164941765,-2.542958862277811,0 +-44.26167788475741,-2.545657226926692,0 +-44.2594306724136,-2.546700499261205,0 +-44.25527098285669,-2.549103158076953,0 +-44.25366426038627,-2.549802090476085,0 +-44.24825244608397,-2.553869332810028,0 +-44.24574887441092,-2.557211875807189,0 +-44.24387691286817,-2.559873922972149,0 +-44.24081398187154,-2.566151229394649,0 +-44.2402512247394,-2.569087465742741,0 +-44.24006659920907,-2.573653114500186,0 +-44.24015452062058,-2.576572696614469,0 +-44.24128821677132,-2.581740324463446,0 +-44.24206709970498,-2.585943309551517,0 +-44.24347665716193,-2.589477165119262,0 +-44.24456112097081,-2.593020641102425,0 +-44.24563507738804,-2.596238107908675,0 +-44.24669925475065,-2.599131135356163,0 +-44.24715328716146,-2.603346255957061,0 +-44.24823814122347,-2.606892729759939,0 +-44.24994315239763,-2.609440941535116,0 +-44.25272895422205,-2.615522450817791,0 +-44.25448560629637,-2.619702729430009,0 +-44.25685256391079,-2.622561705614748,0 +-44.25954208797176,-2.62540378695813,0 +-44.26090139197111,-2.627311578576946,0 +-44.2639544049111,-2.631441083913156,0 +-44.26561875766104,-2.632689137197276,0 +-44.27035952277892,-2.638109277721528,0 +-44.27338362960415,-2.641264831982794,0 +-44.27543008059141,-2.64444762865252,0 +-44.27649906747882,-2.647657312768874,0 +-44.27692946918376,-2.651214409532212,0 +-44.27868645794979,-2.655392287574699,0 +-44.28040565938092,-2.658273954968701,0 +-44.28246874339271,-2.661793389778746,0 +-44.28385001706098,-2.664355224129422,0 +-44.28561492322659,-2.668547992418443,0 +-44.28734728142145,-2.671760688939108,0 +-44.29007821386914,-2.675598151302561,0 +-44.29042490485622,-2.676241054095401,0 +-44.29349723806461,-2.681632546438875,0 +-44.30126136944709,-2.692024360328165,0 +-44.30553334417275,-2.69660505844428,0 +-44.30985881615701,-2.702954660551079,0 +-44.31475614450904,-2.708697449726654,0 +-44.31956301364129,-2.711497683760376,0 +-44.32502957022941,-2.716639243998353,0 +-44.32926387503579,-2.720048132231807,0 +-44.33294297410067,-2.724655371591323,0 +-44.33789967257742,-2.732157596110012,0 +-44.341695397028,-2.740286437185077,0 +-44.34482932456382,-2.746079390357334,0 +-44.34742800299951,-2.753658073615151,0 +-44.35118684510114,-2.760614444467776,0 +-44.35373901372896,-2.767026833817187,0 +-44.35992298896888,-2.77627309143599,0 +-44.3618899567403,-2.782698841919594,0 +-44.3625516145011,-2.785037099250222,0 +-44.36643145189247,-2.79612140288812,0 +-44.36846966299036,-2.804903614285596,0 +-44.36891189021733,-2.819632100413882,0 +-44.36938130529305,-2.834945834236558,0 +-44.3695257428334,-2.839657831089708,0 +-44.36738211363348,-2.846797914256813,0 +-44.36048200864037,-2.852903782867306,0 +-44.3495605178036,-2.862668721256016,0 +-44.34505174625296,-2.869878959590627,0 +-44.34172259897478,-2.877052090367537,0 +-44.33785691591363,-2.886008011217831,0 +-44.33451114530135,-2.892589926800577,0 +-44.33121953744154,-2.900936893649193,0 +-44.32957804112106,-2.905112500101279,0 +-44.3279730929501,-2.91046624506196,0 +-44.3252431001882,-2.91762251308612,0 +-44.32251289939928,-2.92477914347783,0 +-44.32092592798553,-2.930722932096239,0 +-44.31874883603421,-2.936684484649422,0 +-44.31719819662528,-2.943807439001038,0 +-44.31398691903407,-2.954518855141369,0 +-44.31184581797856,-2.961660398816496,0 +-44.31204662752403,-2.968144148249734,0 +-44.31053141999248,-2.976447719697509,0 +-44.31010436180345,-2.981768232634176,0 +-44.30926520944355,-2.992617376382483,0 +-44.30944372553552,-2.998512280162592,0 +-44.30972865674544,-3.007945640568296,0 +-44.31049664043698,-3.013822668258353,0 +-44.31071011714691,-3.020896999944473,0 +-44.31212139820941,-3.02852288927653,0 +-44.3123525512311,-3.036185300837458,0 +-44.31376366367502,-3.043809873868306,0 +-44.31515695285351,-3.0508445755645,0 +-44.31655010444342,-3.057878765501291,0 +-44.317459821297,-3.068465921414588,0 +-44.31888835410796,-3.076676953527791,0 +-44.31967381524943,-3.08313813358077,0 +-44.31985159456556,-3.089028228591429,0 +-44.32001158783653,-3.094328946211748,0 +-44.31936876588478,-3.112029005748761,0 +-44.31953014918136,-3.117327564656306,0 +-44.31956808978579,-3.137950452760569,0 +-44.31960396191575,-3.139127841147586,0 +-44.31994464116925,-3.150312894354852,0 +-44.32010605488492,-3.1556109711228,0 +-44.32089300091302,-3.162068367680116,0 +-44.32464647401603,-3.169024776446465,0 +-44.3290975750146,-3.179495377135086,0 +-44.33224370695073,-3.185881235752361,0 +-44.33669507678655,-3.196352083696185,0 +-44.34050297682037,-3.205074929812607,0 +-44.34302373877274,-3.210301607110596,0 +-44.34797682065662,-3.217812503721367,0 +-44.35412756891935,-3.225876604859536,0 +-44.35849181940483,-3.233406347847035,0 +-44.36162236580396,-3.239205676993676,0 +-44.36478968187873,-3.246183292225621,0 +-44.37234412654126,-3.261284722846679,0 +-44.37802191250469,-3.272908829956009,0 +-44.3811560352765,-3.278712530614084,0 +-44.38548920088052,-3.285070611933893,0 +-44.38860843546887,-3.290288918151852,0 +-44.39355529606684,-3.297224287728416,0 +-44.39726605109664,-3.302426554563664,0 +-44.40273011619502,-3.306987113760986,0 +-44.40872930630496,-3.309761140998747,0 +-44.41421377883965,-3.314912623119576,0 +-44.41792697162469,-3.320117335437797,0 +-44.42165951740026,-3.325912715079572,0 +-44.42226909325608,-3.326485308848919,0 +-44.43289544893769,-3.337208044000297,0 +-44.43893616053235,-3.34173698802179,0 +-44.44436914651469,-3.345695263154282,0 +-44.45401965884442,-3.352470343770631,0 +-44.4576837073616,-3.35648246450363,0 +-44.46199152601388,-3.362242329469466,0 +-44.4650839879919,-3.366860964631522,0 +-44.47066122880738,-3.37552751152598,0 +-44.47622187892195,-3.383606600539271,0 +-44.47872593837783,-3.38824425148364,0 +-44.4812842818852,-3.394647950513423,0 +-44.48441469452762,-3.400445515631869,0 +-44.48577525255585,-3.406296512307109,0 +-44.48774398299881,-3.412718576224816,0 +-44.4890866359952,-3.41798114477385,0 +-44.49286176272989,-3.42552795072888,0 +-44.49656477199529,-3.430720286600975,0 +-44.50266468027849,-3.437019862237588,0 +-44.50636827330028,-3.442212783431329,0 +-44.51069844861112,-3.44856588215128,0 +-44.51266789256562,-3.4549893166599,0 +-44.51640827552148,-3.461360516903935,0 +-44.51898628704586,-3.468355659428856,0 +-44.52156442647197,-3.475350979416654,0 +-44.52528755115041,-3.481134618043872,0 +-44.52843933103187,-3.487525817632672,0 +-44.53153658787232,-3.492150216073806,0 +-44.53946154910735,-3.501364536040748,0 +-44.54199914733674,-3.507180399308294,0 +-44.54571680519248,-3.512959381590811,0 +-44.55068862284757,-3.521055402901146,0 +-44.55319347828181,-3.525691727491515,0 +-44.55519857564357,-3.533289639152714,0 +-44.55775772897869,-3.539692059087801,0 +-44.56031691434554,-3.546094559110931,0 +-44.56520466308284,-3.551246572742468,0 +-44.56887551042416,-3.555258068012763,0 +-44.57199203247949,-3.56046549682558,0 +-44.57512685355732,-3.566261971945935,0 +-44.5764893496963,-3.572113073523405,0 +-44.57547036196117,-3.577447840794391,0 +-44.56996015221461,-3.590579286295585,0 +-44.56552354717682,-3.600141082086476,0 +-44.56278917996659,-3.607294407330379,0 +-44.55946604217998,-3.61446580310325,0 +-44.55564756257057,-3.624599841300137,0 +-44.55112924298377,-3.631219900813515,0 +-44.54714592336331,-3.636055825452686,0 +-44.54380726021679,-3.642639981233076,0 +-44.53562221456163,-3.663628000107228,0 +-44.5345661133934,-3.667790574927021,0 +-44.53297292104581,-3.67373980576078,0 +-44.53086072312428,-3.682064006141816,0 +-44.52871331086001,-3.689208531481309,0 +-44.52771241556422,-3.695134644185592,0 +-44.524352683826,-3.701131920537921,0 +-44.52042107806106,-3.707735925225098,0 +-44.51486394800929,-3.719103979744879,0 +-44.51320223749174,-3.722690825475178,0 +-44.51002343448948,-3.734573397739893,0 +-44.50843424847944,-3.740514183765811,0 +-44.5073988559401,-3.745259471777238,0 +-44.50704363496527,-3.75292961929438,0 +-44.50670649612612,-3.761188195604868,0 +-44.50681480404641,-3.76471976278305,0 +-44.50769351669678,-3.774119008108251,0 +-44.50919991974119,-3.784676335153556,0 +-44.51052565606689,-3.789348223604574,0 +-44.5139132618362,-3.803383048600191,0 +-44.51522098143037,-3.807467053596503,0 +-44.51790966701543,-3.817990071407273,0 +-44.52075962860653,-3.833811361793373,0 +-44.5197585392031,-3.839733107073175,0 +-44.51687877724283,-3.842176889859397,0 +-44.51051158314039,-3.846493311088582,0 +-44.50765036950233,-3.849525024732739,0 +-44.50085622770397,-3.859153751413496,0 +-44.49692348612104,-3.865750195710925,0 +-44.49360189347772,-3.872920027096783,0 +-44.48913734923237,-3.881303745027379,0 +-44.48638769645495,-3.887867970249407,0 +-44.48138691171068,-3.898034934496786,0 +-44.47924515936209,-3.905170561898564,0 +-44.47942710001626,-3.911058930498735,0 +-44.47973643144299,-3.921070119192863,0 +-44.47988200207948,-3.925781689769106,0 +-44.48028241171517,-3.938739879753568,0 +-44.47994704804484,-3.947004302756427,0 +-44.47937503290186,-3.947610656673696,0 +-44.47455510966655,-3.963785269517239,0 +-44.47235727480514,-3.96915920389895,0 +-44.46962403396562,-3.976314443459292,0 +-44.4692326541233,-3.982808915802101,0 +-44.46876908981013,-3.986948158858367,0 +-44.467288104331,-3.99642163677367,0 +-44.4674144924958,-4.000542556786168,0 +-44.4671675488016,-4.011745257204232,0 +-44.46725781759397,-4.014688472466242,0 +-44.46643907401221,-4.026496657074443,0 +-44.4666196177748,-4.032382451574335,0 +-44.46678201334838,-4.037679431396565,0 +-44.46698054011018,-4.044153546511749,0 +-44.46776906096202,-4.050608762631352,0 +-44.46929187840524,-4.061753226382527,0 +-44.47006229176714,-4.067619438054396,0 +-44.47026088101807,-4.074091889780003,0 +-44.47047754642485,-4.081152488108017,0 +-44.47065807403192,-4.087036151633038,0 +-44.47087474190952,-4.094096285287936,0 +-44.4699297630628,-4.101780562281567,0 +-44.46970100654351,-4.113564451794207,0 +-44.46929172505459,-4.119465178243492,0 +-44.46886440262807,-4.124777448630685,0 +-44.46675814870731,-4.133085616946393,0 +-44.46581351632298,-4.140770055560525,0 +-44.46427903957105,-4.14847279345839,0 +-44.46445981449422,-4.154356327067209,0 +-44.46351508921041,-4.162041291073085,0 +-44.46251609766659,-4.167961295368991,0 +-44.46212505235856,-4.174451700507999,0 +-44.46103565048412,-4.177429960702595,0 +-44.45785389019226,-4.189193053479649,0 +-44.45685483684264,-4.195119105386574,0 +-44.45526584694517,-4.201062490623224,0 +-44.45544692620928,-4.206952225391398,0 +-44.45146212146747,-4.211789027491109,0 +-44.44987352034911,-4.217731511283707,0 +-44.4499097401139,-4.218909069401684,0 +-44.45220149209924,-4.216956237947703,0 +-44.44116908408955,-4.231021938358021,0 +-44.43461001708653,-4.241515985547793,0 +-44.42582798190392,-4.25436547630655,0 +-44.42149563110087,-4.262507661081253,0 +-44.41616770445142,-4.275259688222107,0 +-44.40862070239603,-4.290367183843824,0 +-44.40196268988921,-4.297436559725336,0 +-44.3929748915921,-4.30343284336852,0 +-44.38179476683912,-4.312925379600113,0 +-44.37300205552015,-4.325772979728957,0 +-44.36313154271249,-4.340942300611148,0 +-44.35534036454264,-4.34918601009404,0 +-44.34862516125103,-4.355109718153985,0 +-44.32971163353091,-4.364689664071497,0 +-44.34414995655236,-4.393321918744729,0 +-44.3512148646281,-4.402800982420297,0 +-44.35727925457152,-4.411340381181102,0 +-44.36239792726113,-4.420876218652072,0 +-44.3674896551808,-4.429442275919756,0 +-44.37260684126906,-4.438974872914222,0 +-44.37284210043989,-4.447685134690113,0 +-44.3721586295584,-4.458358108528558,0 +-44.37039991924877,-4.46518872051711,0 +-44.36498196549507,-4.478901258534584,0 +-44.36344442870672,-4.491527676785622,0 +-44.36188596035648,-4.503188773638162,0 +-44.35935856159237,-4.514881519763541,0 +-44.354955927882,-4.528570159133416,0 +-44.35044621302856,-4.539358273280127,0 +-44.34686773593437,-4.550112849444403,0 +-44.34234573256103,-4.561861758102328,0 +-44.34071542558164,-4.572556436551968,0 +-44.33909717050486,-4.583253526842777,0 +-44.33845091630364,-4.593922054407114,0 +-44.33774538693113,-4.602656135111973,0 +-44.33715652245223,-4.615258820941862,0 +-44.33762466511184,-4.630733442219688,0 +-44.33815137216205,-4.648142338942005,0 +-44.33738366988506,-4.654940447031522,0 +-44.33576251980769,-4.665636093625242,0 +-44.33426017110845,-4.680201266563606,0 +-44.33263972865959,-4.690897110557983,0 +-44.33293550111414,-4.700570724702257,0 +-44.33326130757342,-4.711212333577815,0 +-44.33358706667663,-4.721854215715239,0 +-44.33591719638374,-4.734376488175855,0 +-44.33603570644878,-4.738246547513218,0 +-44.33212222340484,-4.766768746044237,0 +-44.32946568045636,-4.778869593907088,0 +-44.32776418032235,-4.788922046629854,0 +-44.32712595834285,-4.800943455628812,0 +-44.32749052299234,-4.812935247702581,0 +-44.32682189721861,-4.823957821813328,0 +-44.33213975534235,-4.833801723868604,0 +-44.34040060265383,-4.84156147376433,0 +-44.34568259897614,-4.850410432855675,0 +-44.34901842183079,-4.861318236353998,0 +-44.35341244072747,-4.874197133493102,0 +-44.35470785820022,-4.884166266956076,0 +-44.35903868226073,-4.895044320468733,0 +-44.36725980350604,-4.901802839536556,0 +-44.37247415915412,-4.908649913027323,0 +-44.37983753280248,-4.920432738878922,0 +-44.38512223711211,-4.929271790895442,0 +-44.39356028598336,-4.942010235357804,0 +-44.40096478613399,-4.953782977138365,0 +-44.40526319710288,-4.962652166894197,0 +-44.40962435462819,-4.973520775196264,0 +-44.41395751953984,-4.983391597507407,0 +-44.41635244297289,-4.995323548163761,0 +-44.41769504821513,-5.00628704316161,0 +-44.41800540706481,-5.019266512450972,0 +-44.42033422358175,-5.030193022602816,0 +-44.427706516644,-5.04196560499852,0 +-44.43499300962858,-5.050741803368534,0 +-44.44443405912397,-5.064450137559177,0 +-44.45187038842233,-5.078218299945125,0 +-44.45514660369444,-5.087114172498418,0 +-44.45860376863428,-5.098058113078584,0 +-44.46099392719974,-5.109011160661074,0 +-44.46138004225535,-5.121014129661996,0 +-44.46281702753397,-5.133997311691554,0 +-44.46514465801974,-5.142959599418702,0 +-44.46655053011229,-5.154948554075787,0 +-44.47009284616306,-5.169904174079628,0 +-44.47245550320704,-5.179878964579272,0 +-44.4726496175233,-5.185888723723712,0 +-44.4756595318965,-5.218047138607778,0 +-44.48213708961723,-5.232877516447649,0 +-44.48663326496125,-5.248770018279748,0 +-44.49101077366863,-5.260657474431556,0 +-44.49133670251045,-5.27166733411721,0 +-44.4916898609402,-5.283678464613811,0 +-44.49005867056586,-5.296752403769179,0 +-44.48741814331073,-5.309857207655739,0 +-44.48676032263349,-5.321897058724836,0 +-44.48311478206139,-5.335028444295459,0 +-44.48038820733394,-5.345125476812928,0 +-44.4738144653889,-5.361345418988169,0 +-44.47022326051324,-5.376470365792107,0 +-44.46847014598751,-5.385531420810249,0 +-44.46686341221647,-5.399589219292327,0 +-44.46721443571567,-5.411583711368732,0 +-44.4664697140602,-5.420609289760243,0 +-44.4648634281854,-5.434660350129787,0 +-44.46515801238625,-5.44465195006489,0 +-44.46250672265334,-5.456732487471346,0 +-44.45875452752158,-5.465844776195931,0 +-44.45399184787198,-5.474985430399201,0 +-44.44524101454956,-5.485243922490611,0 +-44.43542930658715,-5.493533541088646,0 +-44.42768554059167,-5.503757943820835,0 +-44.42487641982551,-5.510835723974778,0 +-44.41822575710545,-5.52402081064392,0 +-44.40529058384819,-5.528401938813158,0 +-44.39938394966871,-5.532572832806455,0 +-44.3866356469163,-5.542943604910149,0 +-44.37782092414572,-5.550204575350191,0 +-44.3768790564199,-5.552231881800505,0 +-44.36485626051346,-5.584851207942844,0 +-44.36320134124158,-5.596912272516605,0 +-44.36048849918497,-5.60699683778956,0 +-44.35486158255851,-5.620161016553001,0 +-44.35121324036883,-5.632263039456441,0 +-44.34859987084226,-5.645331603885937,0 +-44.34701941106346,-5.659369549998557,0 +-44.34638091784959,-5.671381204907844,0 +-44.34474984301909,-5.684438095541366,0 +-44.34107669212761,-5.696557949646233,0 +-44.33545437151699,-5.710733046692707,0 +-44.33373803383714,-5.720781273264616,0 +-44.3303666860542,-5.742865761708149,0 +-44.32676736172924,-5.756956770820952,0 +-44.32216694433221,-5.771074370185762,0 +-44.31945444483871,-5.78113914579217,0 +-44.31482571355075,-5.795250601074684,0 +-44.3120517085906,-5.804307828587307,0 +-44.30939063674773,-5.814371815324838,0 +-44.30683114879879,-5.827441832636635,0 +-44.30613905461107,-5.837450604215799,0 +-44.30248978745152,-5.849540782375414,0 +-44.30081560221048,-5.860572733529913,0 +-44.29707660929212,-5.86967059300284,0 +-44.29144827796493,-5.882813028306868,0 +-44.28585582712918,-5.896959029709553,0 +-44.28123817159384,-5.910082390583625,0 +-44.28035738357753,-5.914104744492922,0 +-44.27692551766766,-5.933190913922548,0 +-44.27324840781741,-5.944291708732988,0 +-44.26443686379189,-5.9515612415783,0 +-44.25769602180951,-5.960791041349215,0 +-44.25295842512271,-5.969961791714549,0 +-44.25214036240693,-5.976003851780661,0 +-44.24952560571766,-5.989096980789077,0 +-44.2489175084003,-6.002128188642486,0 +-44.24614929181044,-6.010224860597894,0 +-44.23259580836927,-6.027455585040871,0 +-44.22769735191286,-6.031596657965951,0 +-44.21488663506277,-6.039968716754337,0 +-44.20603109994527,-6.046229238446752,0 +-44.19717995725715,-6.052493553957327,0 +-44.18638225503181,-6.060810926299085,0 +-44.17350592176451,-6.066195602297397,0 +-44.16367973423425,-6.07347833373867,0 +-44.15176729843184,-6.077827683081387,0 +-44.13980424908603,-6.08018043424114,0 +-44.13082174164202,-6.081445476835055,0 +-44.11680772054373,-6.081861255706883,0 +-44.10884350893524,-6.084093482817725,0 +-44.09887524136185,-6.086384999132104,0 +-44.09100909698217,-6.092607860960036,0 +-44.08034701581635,-6.100891640587038,0 +-44.06962583688114,-6.109176148370755,0 +-44.05976767103795,-6.116455889562832,0 +-44.05395078371139,-6.124615546556866,0 +-44.04514033190626,-6.133868874577164,0 +-44.03330521011885,-6.143220212433048,0 +-44.0254014992847,-6.149461202536567,0 +-44.01758186731684,-6.157690045374965,0 +-44.01378358415911,-6.165798980464484,0 +-44.00710588756517,-6.178995159939696,0 +-44.00140436561427,-6.191165960351432,0 +-43.99765913255529,-6.201279712684292,0 +-43.99694337066492,-6.211296645403797,0 +-43.99421769718985,-6.221374444913761,0 +-43.99152103683897,-6.232451696315556,0 +-43.9877888268832,-6.242561933460341,0 +-43.97822633913653,-6.259847801265757,0 +-43.97345808565392,-6.268991993662445,0 +-43.9717500979898,-6.280055480456521,0 +-43.97200384299389,-6.289054646899587,0 +-43.9763510362674,-6.299921014918413,0 +-43.97968924893912,-6.310820928208527,0 +-43.98204678776739,-6.322755124423456,0 +-43.98240878755259,-6.335764639174905,0 +-43.98178501732876,-6.34981699374447,0 +-43.98105094418285,-6.359866751073404,0 +-43.98036342084872,-6.37089736968404,0 +-43.98042334071358,-6.37289511320811,0 +-43.98656852790747,-6.392730209021148,0 +-43.98683360008892,-6.401705274658334,0 +-43.98621297617467,-6.414696443980268,0 +-43.97842349757428,-6.422909581341152,0 +-43.97361428458295,-6.430037578327036,0 +-43.96771221278536,-6.434203575913701,0 +-43.95204621544922,-6.447595322969168,0 +-43.94329595067292,-6.456793476334073,0 +-43.93661078950652,-6.467935461386456,0 +-43.93095893417513,-6.481130698401695,0 +-43.92416042207272,-6.489349048696426,0 +-43.91229274766495,-6.495693435049615,0 +-43.90240088088797,-6.500981272772596,0 +-43.89244998276021,-6.504272233383799,0 +-43.88040478592644,-6.504626330566042,0 +-43.87243213640808,-6.506858128834454,0 diff --git a/R-utils/roads/br153.csv b/R-utils/roads/br153.csv new file mode 100644 index 000000000..96b1e8f44 --- /dev/null +++ b/R-utils/roads/br153.csv @@ -0,0 +1,2294 @@ +-48.73451385324737,-5.501949937285697,0 +-48.73467748349419,-5.510994305588677,0 +-48.73482623569053,-5.519215609949545,0 +-48.73494523752414,-5.525792040353225,0 +-48.73513856132978,-5.536477605669186,0 +-48.73446217978432,-5.544710997910204,0 +-48.73297534171171,-5.553780472175553,0 +-48.72979289769947,-5.560414402665364,0 +-48.72743609941346,-5.567032666048091,0 +-48.72269289725811,-5.5786246628526,0 +-48.71718479617931,-5.593515484693065,0 +-48.71482866028448,-5.600131043521618,0 +-48.71092617942853,-5.612524113489527,0 +-48.70699442491557,-5.623272562622661,0 +-48.70544970311949,-5.629050344026333,0 +-48.70153577753758,-5.640622210263948,0 +-48.69844625533455,-5.652178442998368,0 +-48.69534151200872,-5.662913633872356,0 +-48.69052592550443,-5.670393946332186,0 +-48.68988140438944,-5.680263096452923,0 +-48.69006211591896,-5.690117436930128,0 +-48.68856223638809,-5.698359122861917,0 +-48.6837462372619,-5.705838811587992,0 +-48.68142097610262,-5.714095270799664,0 +-48.67995092238665,-5.72397956536703,0 +-48.67926098010027,-5.731385453080073,0 +-48.67528495972999,-5.739671559812944,0 +-48.6721491581453,-5.748764158612374,0 +-48.66494678646944,-5.761215113895265,0 +-48.66095535868672,-5.768679707147584,0 +-48.65866098689182,-5.778569188603047,0 +-48.65383124261671,-5.785215813806036,0 +-48.64738232353465,-5.793529697087695,0 +-48.64006397301026,-5.799395174535348,0 +-48.63189083237507,-5.803635957726261,0 +-48.62536754582742,-5.807850130173553,0 +-48.61888952598066,-5.814526599669688,0 +-48.61744243991998,-5.826068176352568,0 +-48.61915067349938,-5.829328150016446,0 +-48.61756031334077,-5.847733984205747,0 +-48.61770950618865,-5.855882388152629,0 +-48.61785871266254,-5.864030575061243,0 +-48.61805271674822,-5.87462296857725,0 +-48.61733811348142,-5.880341072942597,0 +-48.61750247894719,-5.889303742698942,0 +-48.61694210581829,-5.90317336232875,0 +-48.61703073951052,-5.908060594439663,0 +-48.61725239334468,-5.920278882879438,0 +-48.6182196776082,-5.928410138606315,0 +-48.62000659210198,-5.936526882668018,0 +-48.62350652422508,-5.948687169487528,0 +-48.62529349049682,-5.956803541448792,0 +-48.62706566389839,-5.964105208729555,0 +-48.62980325806794,-5.979537899805271,0 +-48.63248963819159,-5.992530135308574,0 +-48.63271755390553,-6.005571213529098,0 +-48.63279077694832,-6.00964611692066,0 +-48.63464965097636,-6.021841878121977,0 +-48.6339622719274,-6.029192492802758,0 +-48.6308602100249,-6.039033537262771,0 +-48.62613326173729,-6.04972026933542,0 +-48.62060063909182,-6.061238099986709,0 +-48.6149945271641,-6.068679756552444,0 +-48.60938814428187,-6.076121585792205,0 +-48.60214514580459,-6.083589065764241,0 +-48.59904896306574,-6.093422619315572,0 +-48.59593850278921,-6.102439661406932,0 +-48.59529505080412,-6.112236496491976,0 +-48.59218476093298,-6.121252168222318,0 +-48.58911807600089,-6.132713108239075,0 +-48.58685432987797,-6.143346768687881,0 +-48.58618170693939,-6.151512179348787,0 +-48.5847014976887,-6.160512040146941,0 +-48.58485537111785,-6.16949283672215,0 +-48.58668615420293,-6.180905004429698,0 +-48.58682623255329,-6.189072730039178,0 +-48.5902513740097,-6.198020155705101,0 +-48.59448185140232,-6.206143800305614,0 +-48.59459449619231,-6.212682176584125,0 +-48.59346796289374,-6.239514873438995,0 +-48.59280756192942,-6.247697935887377,0 +-48.59292429599559,-6.255014299169198,0 +-48.59310933083987,-6.26480702103054,0 +-48.59489000761955,-6.272122961130577,0 +-48.59755300048629,-6.282687172555482,0 +-48.59851239712578,-6.290014757381437,0 +-48.60032324995238,-6.298958568463263,0 +-48.60041557510237,-6.303851789061007,0 +-48.59898962288257,-6.315296380954731,0 +-48.59835368287874,-6.325094673498311,0 +-48.59688477189051,-6.334899574785381,0 +-48.59456145487417,-6.343088418206086,0 +-48.59063702772451,-6.353752430849393,0 +-48.58746338088265,-6.360329874453707,0 +-48.58186637861971,-6.369397775205913,0 +-48.57625382241793,-6.377652880165483,0 +-48.57061327655234,-6.384279184688585,0 +-48.56580326964119,-6.390892107826638,0 +-48.56172744384584,-6.392596789901554,0 +-48.55207690785481,-6.404192446373244,0 +-48.54727976314084,-6.4116222173902,0 +-48.54082850905188,-6.418265485520684,0 +-48.53520378319566,-6.424892927845327,0 +-48.5295945495854,-6.43233554622042,0 +-48.52638713091889,-6.436471778844717,0 +-48.51839181774038,-6.448034889030384,0 +-48.51199107148005,-6.457122157901892,0 +-48.50639501589698,-6.465379304913273,0 +-48.50073719458435,-6.470375044662726,0 +-48.49182398502015,-6.477060666486483,0 +-48.486985620643,-6.481220257400204,0 +-48.47891176251221,-6.487060612564569,0 +-48.471606932997,-6.490443023581649,0 +-48.46348428655801,-6.493838587528051,0 +-48.4562704889787,-6.50128835316896,0 +-48.45067431003253,-6.508718621170266,0 +-48.44828674879479,-6.512837187342469,0 +-48.44021804116034,-6.520315712743585,0 +-48.43248896370958,-6.527618281852607,0 +-48.42954474762968,-6.532430096504739,0 +-48.42645694824089,-6.536493008371671,0 +-48.41980924961329,-6.544874518393677,0 +-48.40897882335911,-6.557498119888585,0 +-48.40061532292228,-6.56102742243938,0 +-48.39735357919028,-6.567663889423551,0 +-48.39080128157661,-6.572715096622212,0 +-48.3866845457802,-6.574442112253171,0 +-48.37781034482522,-6.59449110960182,0 +-48.37296090291225,-6.598652128032501,0 +-48.36246818394132,-6.608619857122036,0 +-48.3576569603664,-6.615228864611356,0 +-48.35120738682434,-6.621864877250243,0 +-48.34474465173945,-6.627685013326627,0 +-48.3375516043367,-6.639230062998596,0 +-48.32965281460234,-6.658128641801463,0 +-48.32568431100532,-6.66635283040057,0 +-48.3225625388954,-6.676192091785839,0 +-48.31937682269399,-6.681954304441583,0 +-48.31048155524192,-6.689445219498817,0 +-48.30483830254209,-6.695249346331041,0 +-48.29516382147675,-6.705199139928317,0 +-48.28871400628774,-6.711832227125488,0 +-48.28387649655762,-6.716806987319651,0 +-48.2741455856055,-6.723497013817237,0 +-48.26770905923565,-6.730944721141217,0 +-48.25643434778222,-6.743366760687759,0 +-48.25322287108258,-6.747497815635963,0 +-48.24358480569121,-6.759887394059622,0 +-48.23798390924441,-6.768135947836749,0 +-48.23398159121487,-6.77391225683786,0 +-48.22508428062572,-6.781404567762378,0 +-48.21857666445604,-6.784779060999252,0 +-48.207173055718,-6.789869488551528,0 +-48.20067850353448,-6.794059283218479,0 +-48.19165044434506,-6.794216241018479,0 +-48.18586232671386,-6.791867073317293,0 +-48.17182562023501,-6.787205914077426,0 +-48.16359216710468,-6.785709532657548,0 +-48.15374632618639,-6.785873376050721,0 +-48.147168542463,-6.785168616791039,0 +-48.13565445498966,-6.783731669984159,0 +-48.12168054390837,-6.782335382833454,0 +-48.11523667303189,-6.788954114509173,0 +-48.11374374963809,-6.797117018644506,0 +-48.11308387121488,-6.806080904401119,0 +-48.11241386544845,-6.815060274115117,0 +-48.10509181321351,-6.819272679125435,0 +-48.09524878721054,-6.82027103787488,0 +-48.08864890550268,-6.818762584031426,0 +-48.08200726527791,-6.81480780233497,0 +-48.07207218887912,-6.810088730017067,0 +-48.06137025315311,-6.807816383053211,0 +-48.05234994407421,-6.807963176688707,0 +-48.04251059253318,-6.808123076980923,0 +-48.03513180730052,-6.808242869707301,0 +-48.02447267746002,-6.808417021258435,0 +-48.01382450390435,-6.809408044021847,0 +-48.00564954217903,-6.811173667026216,0 +-47.99752517887152,-6.81620064559061,0 +-47.9934880042947,-6.820345023722354,0 +-47.98953850838641,-6.830198203499775,0 +-47.98139196737344,-6.833591595328302,0 +-47.97493519326485,-6.840220569826185,0 +-47.96850283586055,-6.848481039430061,0 +-47.96198363222851,-6.851031659733851,0 +-47.96801068324994,-6.864324184242306,0 +-47.97256359650513,-6.872148937794933,0 +-47.97799333734702,-6.879950930582313,0 +-47.98258507177338,-6.890403844346464,0 +-47.99061308822199,-6.894653776376157,0 +-47.99950861691037,-6.89714593841434,0 +-48.01468684641139,-6.904805159040444,0 +-48.02184011902443,-6.909080075627584,0 +-48.03251699394679,-6.912419516370923,0 +-48.04323738647876,-6.91839130886073,0 +-48.05217269180357,-6.923513308780099,0 +-48.06026781268821,-6.93128195477054,0 +-48.0710606629246,-6.941638959641045,0 +-48.07738643732343,-6.949435374702216,0 +-48.08284220858663,-6.958121374380575,0 +-48.08569119828284,-6.969486328059897,0 +-48.08585740430492,-6.97914124045398,0 +-48.08605389769384,-6.990551335547456,0 +-48.08622012378607,-7.000205827377297,0 +-48.08905420838585,-7.010692909994577,0 +-48.09275765219938,-7.020287469285818,0 +-48.09554667456827,-7.028141728321744,0 +-48.10106434736903,-7.040337780088368,0 +-48.10478281447547,-7.050806899026075,0 +-48.10935523284943,-7.059505619300345,0 +-48.11563599482594,-7.064665492905326,0 +-48.119233661796,-7.068115151464762,0 +-48.12822779873746,-7.076739022806144,0 +-48.13626280016426,-7.080991895558204,0 +-48.14429809729492,-7.085244761424733,0 +-48.15233373149346,-7.089497514896412,0 +-48.16212424714389,-7.092843859069148,0 +-48.17191787568812,-7.096193221025564,0 +-48.17910239819059,-7.102217960519437,0 +-48.18723159789784,-7.111736708059125,0 +-48.1935619038275,-7.11953080206395,0 +-48.2008418472167,-7.129965347113393,0 +-48.20274447065913,-7.136970915705714,0 +-48.20471340036782,-7.14749586322267,0 +-48.20491105425856,-7.158051647810649,0 +-48.20867185995772,-7.169437660703548,0 +-48.21046044512062,-7.170289463632297,0 +-48.22223338882142,-7.183314188385665,0 +-48.22853988658408,-7.188500199792854,0 +-48.23842869610348,-7.195392747072004,0 +-48.24475655687431,-7.201462864146785,0 +-48.24671323278053,-7.211121206223057,0 +-48.24864329987792,-7.219885796454417,0 +-48.24970215070308,-7.229544208171246,0 +-48.25345141238923,-7.240916485150454,0 +-48.25531691584823,-7.246160871539439,0 +-48.2619835611324,-7.263902978094986,0 +-48.26742818739484,-7.270858732953352,0 +-48.27381930743717,-7.281310711669471,0 +-48.2801754385649,-7.289995843863605,0 +-48.2855823985351,-7.295179185723301,0 +-48.29192014207225,-7.302977828653416,0 +-48.29738798257281,-7.311669126934448,0 +-48.3037411832372,-7.320344955460436,0 +-48.30739155809463,-7.326431311385316,0 +-48.31194286252344,-7.333380409893645,0 +-48.32006651681772,-7.342024726319548,0 +-48.32819004159273,-7.350668368063419,0 +-48.3327412096038,-7.357616318923179,0 +-48.33993239161257,-7.363640116640475,0 +-48.34716987779542,-7.372299226702245,0 +-48.35260581257515,-7.379230503774605,0 +-48.35979633250738,-7.3852531189494,0 +-48.36437793980447,-7.393955611344266,0 +-48.36541927017419,-7.402719002819254,0 +-48.36559046331698,-7.412376013065585,0 +-48.36576053018903,-7.422033038558144,0 +-48.3694247503753,-7.428993218009351,0 +-48.37044885764644,-7.436877088978691,0 +-48.37507491447425,-7.448208084087432,0 +-48.37876922310998,-7.456920624428597,0 +-48.38153205449187,-7.463015656662848,0 +-48.38706047461755,-7.475205877839301,0 +-48.39269069887561,-7.49266575358838,0 +-48.39912739726412,-7.505723848573242,0 +-48.404664097268,-7.517921386918256,0 +-48.40564599682899,-7.523173871651075,0 +-48.40941317006893,-7.535404807201942,0 +-48.41310025312842,-7.543246125568176,0 +-48.41675560918698,-7.549331689299241,0 +-48.42590394793699,-7.56498700620578,0 +-48.43135812039625,-7.572791665932765,0 +-48.43160299300758,-7.585970356278872,0 +-48.43083309733726,-7.592139093723192,0 +-48.43016111864443,-7.603581464799373,0 +-48.42945628152173,-7.613267663412915,0 +-48.42875136289089,-7.62295529601269,0 +-48.42878396711686,-7.624713446492025,0 +-48.42842098648695,-7.652215699518659,0 +-48.43130303936753,-7.665380258037194,0 +-48.43320875979472,-7.673274850042915,0 +-48.44320530923383,-7.688979563116171,0 +-48.4460231778427,-7.698614560465417,0 +-48.44885557984498,-7.709125728331281,0 +-48.44899232351457,-7.71703418146986,0 +-48.45005776129203,-7.727565211995622,0 +-48.45468982700407,-7.739795181630416,0 +-48.45659863406368,-7.74766630245009,0 +-48.46211768091656,-7.759871529989359,0 +-48.46580704246696,-7.768591269373553,0 +-48.46771524746323,-7.776459058494837,0 +-48.46886886261311,-7.790467104954353,0 +-48.46280170886352,-7.79670381705147,0 +-48.46209146832922,-7.805482424065815,0 +-48.4596465633361,-7.816046856331847,0 +-48.45976826837016,-7.822184754812988,0 +-48.46000581033664,-7.835350816635609,0 +-48.46294516148602,-7.85110372874537,0 +-48.46765285563477,-7.866824461685939,0 +-48.47142694841605,-7.879926087285722,0 +-48.47158332913227,-7.888701624570514,0 +-48.46911648998268,-7.899279402747774,0 +-48.46930413837543,-7.909809294444976,0 +-48.46774637861375,-7.920377120855678,0 +-48.46795918512014,-7.930916701797686,0 +-48.46587258205455,-7.957129696125969,0 +-48.46603078226985,-7.965916499572791,0 +-48.46617319717035,-7.973824491511972,0 +-48.46636309777166,-7.984368276047662,0 +-48.46664594856846,-8.000185971478944,0 +-48.46691622661802,-8.016016707121493,0 +-48.46717144413396,-8.030964084785086,0 +-48.46632948162142,-8.03361731091946,0 +-48.46656060327815,-8.046797312753666,0 +-48.46775757551665,-8.064350768480583,0 +-48.46794385716009,-8.074890938446419,0 +-48.46809909174932,-8.083673776567785,0 +-48.46830387558649,-8.095089161639045,0 +-48.46844618557626,-8.102991667337893,0 +-48.46683145820461,-8.111803336215232,0 +-48.46694215701397,-8.117949564504158,0 +-48.46459896138332,-8.135556867193754,0 +-48.46389177209962,-8.145230089908473,0 +-48.46228175610376,-8.154041792239695,0 +-48.46164101497219,-8.167229132147746,0 +-48.46088440170591,-8.174270266746019,0 +-48.46097416474294,-8.179537728944199,0 +-48.4620408187166,-8.190055378550015,0 +-48.4659331579835,-8.210175773324908,0 +-48.46775216805183,-8.212776480352652,0 +-48.46202553937625,-8.237526815037238,0 +-48.46491219639537,-8.250670213600364,0 +-48.46500297075026,-8.255944487551343,0 +-48.46790152835352,-8.269965701055998,0 +-48.47262856797976,-8.2874700806187,0 +-48.47540489085485,-8.294454563518714,0 +-48.48092704605098,-8.305772651338421,0 +-48.48471882028856,-8.318868313741287,0 +-48.48581623373484,-8.330258585499424,0 +-48.48951183592082,-8.338090925839094,0 +-48.49241737650765,-8.351204781209693,0 +-48.49348449829903,-8.360840965027569,0 +-48.49542318498737,-8.3695840977499,0 +-48.49472843195765,-8.380131520759075,0 +-48.49046743273968,-8.389864949354436,0 +-48.48962805756177,-8.392513700048378,0 +-48.48986874693398,-8.405678094706282,0 +-48.49014152151417,-8.420597919034153,0 +-48.49036620856977,-8.432884925500524,0 +-48.49055982061473,-8.443416920184871,0 +-48.48728452542281,-8.458400863327043,0 +-48.48573617612752,-8.470720779641168,0 +-48.48585032972359,-8.476865528997585,0 +-48.48885669200123,-8.495254339211671,0 +-48.48997324711409,-8.507530206607415,0 +-48.49196170135746,-8.518913417138233,0 +-48.49308374044998,-8.53119515233225,0 +-48.49332338440684,-8.543499169457689,0 +-48.49358019509565,-8.556684932697978,0 +-48.4937514893373,-8.565477101321214,0 +-48.49400842663486,-8.578667848861073,0 +-48.49153060797322,-8.588388570870213,0 +-48.48923213600889,-8.607777421119023,0 +-48.48936708111096,-8.61481393458231,0 +-48.48966043561156,-8.629779158688409,0 +-48.4942586546061,-8.637623744611194,0 +-48.50155380561833,-8.64802905622444,0 +-48.50096667721962,-8.668713796512487,0 +-48.50198405071045,-8.67661885346482,0 +-48.50396061282289,-8.688905470174841,0 +-48.50504940290157,-8.701203280540083,0 +-48.50811034738427,-8.722211854434232,0 +-48.51005163286024,-8.730954787738149,0 +-48.5121262400142,-8.746718069667285,0 +-48.51321370224355,-8.757233121401409,0 +-48.51530564058739,-8.77387711058512,0 +-48.51555580550049,-8.787043302324324,0 +-48.51493476807191,-8.801987012938916,0 +-48.51158009009322,-8.813466310891851,0 +-48.50830391863747,-8.829333527238706,0 +-48.50669733929022,-8.839021840684333,0 +-48.50513772279471,-8.851342510468324,0 +-48.50534142473945,-8.86275273731682,0 +-48.50557014950962,-8.875041544832262,0 +-48.50576600021517,-8.886448595714981,0 +-48.50774892935165,-8.898697526126652,0 +-48.50792565659743,-8.909221339791213,0 +-48.50805806316945,-8.917112718900611,0 +-48.50910809785665,-8.92674013747186,0 +-48.50481472369079,-8.935584247135958,0 +-48.50409111647416,-8.945241220864801,0 +-48.50236570190296,-8.947906043750683,0 +-48.49663985166194,-8.964670812039502,0 +-48.49683057203671,-8.975214575605426,0 +-48.49967219106453,-8.984833261812986,0 +-48.50075049893476,-8.995363024149555,0 +-48.50182879981631,-9.005892188333439,0 +-48.50192319921585,-9.01116471454441,0 +-48.50484352682127,-9.025175109324039,0 +-48.50771662975583,-9.036548608241244,0 +-48.50966873954085,-9.046180637632787,0 +-48.5125862198898,-9.060190992238901,0 +-48.51453236682124,-9.069826777621785,0 +-48.52003505920662,-9.079397460057621,0 +-48.52553746443897,-9.088966884314061,0 +-48.52751332174633,-9.10035585816396,0 +-48.52758931490182,-9.104748049733711,0 +-48.5304844187211,-9.11787521975865,0 +-48.53250546442163,-9.131894228405958,0 +-48.53636653595048,-9.14938982389709,0 +-48.53745475224324,-9.160785312533806,0 +-48.53758693133067,-9.167805297567307,0 +-48.53971669332415,-9.186201359550523,0 +-48.53990281021983,-9.195855114630762,0 +-48.5400550803451,-9.20375426673942,0 +-48.5402750816482,-9.21516521186701,0 +-48.54056465138945,-9.230089362650078,0 +-48.54170377345353,-9.242368279972938,0 +-48.54461907726028,-9.254617336754396,0 +-48.54657170949375,-9.263369494955013,0 +-48.54763317958296,-9.272138028187998,0 +-48.54958371299289,-9.280891055905844,0 +-48.54970481305279,-9.287041681372934,0 +-48.55003344019815,-9.303738734837191,0 +-48.54670164053298,-9.315231480300083,0 +-48.54514623353109,-9.327559180111457,0 +-48.54525672550618,-9.333705527472508,0 +-48.54908215622733,-9.348564587308756,0 +-48.55012966275925,-9.357327383488988,0 +-48.55473375621839,-9.366022211668819,0 +-48.55844858590175,-9.374733119288637,0 +-48.55941687809845,-9.379105264622435,0 +-48.56675098373802,-9.391257886958785,0 +-48.56959228666897,-9.400861238366021,0 +-48.57244902427298,-9.410479377973902,0 +-48.57529679956124,-9.419227214842824,0 +-48.57533295755085,-9.420987280493897,0 +-48.57570920439727,-9.440420517059014,0 +-48.57767307035592,-9.450037421238415,0 +-48.57797547733164,-9.465827359771435,0 +-48.58175294953108,-9.477169363534166,0 +-48.58642083647613,-9.488496400387776,0 +-48.58845771187551,-9.502515227212514,0 +-48.59131672629233,-9.513007445842494,0 +-48.59414400153708,-9.521742063562677,0 +-48.59792399809959,-9.533972352583298,0 +-48.6007825924829,-9.54446103820195,0 +-48.60367255042841,-9.556704387243487,0 +-48.60834134639956,-9.568914113161792,0 +-48.61297835787245,-9.579366719584723,0 +-48.61953388462469,-9.595044526763461,0 +-48.62143393787741,-9.601155408492335,0 +-48.62797017258764,-9.616840627295277,0 +-48.6298840247451,-9.623830242607765,0 +-48.63822314427443,-9.640363036624118,0 +-48.64291251964005,-9.652572370337412,0 +-48.64573610436315,-9.660425001011808,0 +-48.65317683663793,-9.67610170039114,0 +-48.65787907750195,-9.688317262932333,0 +-48.66066028392324,-9.693539850737558,0 +-48.6688631574256,-9.70392461800475,0 +-48.67525401750751,-9.71345717878307,0 +-48.68435754690029,-9.725568046113304,0 +-48.68800400996264,-9.730761900323365,0 +-48.69259649953182,-9.739444010089439,0 +-48.69720117687249,-9.748999756899307,0 +-48.701928303748,-9.764698745633261,0 +-48.70753177761989,-9.777768614077416,0 +-48.71032679374193,-9.783865960722174,0 +-48.71684308100124,-9.797801212291404,0 +-48.71709180738391,-9.80923157802691,0 +-48.71664441875864,-9.829480168697456,0 +-48.71602456294335,-9.841817290762823,0 +-48.71626288397703,-9.854112494924676,0 +-48.72121923354032,-9.876680929577931,0 +-48.72310878194084,-9.882800622123101,0 +-48.7296160703109,-9.898503630753957,0 +-48.73239244475842,-9.904603608119695,0 +-48.73529510973808,-9.917720645504284,0 +-48.73545363776091,-9.926492133294682,0 +-48.73744078757839,-9.93785553089303,0 +-48.74304978602972,-9.952653894081344,0 +-48.74490821986338,-9.957002002355029,0 +-48.75412836259704,-9.972581455220752,0 +-48.7560053878168,-9.97692003753053,0 +-48.76696749049225,-9.988965825198308,0 +-48.77340353084732,-9.997603637508702,0 +-48.7807518786039,-10.00710734146217,0 +-48.78810726712642,-10.01749589777133,0 +-48.79625430778792,-10.02436363826349,0 +-48.80261311964896,-10.03126393268242,0 +-48.81167201903187,-10.03986644269375,0 +-48.81717297774139,-10.04853438430412,0 +-48.82446802944249,-10.05804356187284,0 +-48.8326209515391,-10.06665398558354,0 +-48.83891327039657,-10.0709139161169,0 +-48.84967184335738,-10.07683706575191,0 +-48.85417009210237,-10.08025296817972,0 +-48.86496873870619,-10.08879819956406,0 +-48.86958183164665,-10.09921232729866,0 +-48.87332817876462,-10.10704002770903,0 +-48.87437547133342,-10.11838389239909,0 +-48.87544197349987,-10.13146497984888,0 +-48.88188293633073,-10.14099011885902,0 +-48.88746209133729,-10.14968144510253,0 +-48.88680708420195,-10.15935818110662,0 +-48.88437616367122,-10.16907543225262,0 +-48.87941818461507,-10.18499983024275,0 +-48.87698383684688,-10.19472811273773,0 +-48.87715523533025,-10.2034943405682,0 +-48.87553550254331,-10.2105616938551,0 +-48.87579431921579,-10.22112937633604,0 +-48.87783687430488,-10.23166916705217,0 +-48.87716123063796,-10.24050033780636,0 +-48.87648538635062,-10.24933507375924,0 +-48.87953518669121,-10.27240109177933,0 +-48.8806668552762,-10.28376869569969,0 +-48.88263372647387,-10.2933990025744,0 +-48.88384437841653,-10.31006853290357,0 +-48.88413664625194,-10.32498864583675,0 +-48.8844289396602,-10.33990857074144,0 +-48.88376109508989,-10.35133404161022,0 +-48.88400175624545,-10.36362096659279,0 +-48.88432558081845,-10.38029847043659,0 +-48.8863959594379,-10.39518847720688,0 +-48.89124206254061,-10.41529371435294,0 +-48.89501444870182,-10.42575724400353,0 +-48.89888834380243,-10.44060162744771,0 +-48.89915626840884,-10.45376174741536,0 +-48.8992633899897,-10.45902619833229,0 +-48.90047919503136,-10.47568416081629,0 +-48.90154201301446,-10.48444300840632,0 +-48.90452664336072,-10.50018790942614,0 +-48.90583242736753,-10.52123128393411,0 +-48.90598842198857,-10.52912894638534,0 +-48.90624850396121,-10.54229181853337,0 +-48.90824127404306,-10.55278797786013,0 +-48.90944142374019,-10.5685647395331,0 +-48.90973110964011,-10.5834800201388,0 +-48.90999519608629,-10.59664445389009,0 +-48.91013992581601,-10.60366799981919,0 +-48.90951879859996,-10.61685569798999,0 +-48.90977204410486,-10.62914973185127,0 +-48.9099305761967,-10.6370505112396,0 +-48.90413665391382,-10.66031247604435,0 +-48.9025487426001,-10.67178626130014,0 +-48.90274634544948,-10.6832227874322,0 +-48.90296325800486,-10.69553053979349,0 +-48.90230503537736,-10.70872831302483,0 +-48.89721745447358,-10.72376192760714,0 +-48.8938579010002,-10.7343506197003,0 +-48.89071178602932,-10.75545920002701,0 +-48.89081887912253,-10.76071916897382,0 +-48.89190779859359,-10.77034621013733,0 +-48.89312199001157,-10.78611205351639,0 +-48.89519348718949,-10.80010913702118,0 +-48.89799724051921,-10.8061973940002,0 +-48.90094413901846,-10.81930280715889,0 +-48.90494560200423,-10.84028786650138,0 +-48.90691095289608,-10.84902694209489,0 +-48.91073814016585,-10.86124239426745,0 +-48.91196399462564,-10.87702177560475,0 +-48.91306099959757,-10.88665995155567,0 +-48.91324569506852,-10.89543859789492,0 +-48.91352471243466,-10.90860933788752,0 +-48.91356201436675,-10.91036568108384,0 +-48.91037609513615,-10.92887814101552,0 +-48.9105622486932,-10.93766331862121,0 +-48.91061809058107,-10.94029915171678,0 +-48.9074643560937,-10.95958111505333,0 +-48.90765409578098,-10.96924246281846,0 +-48.90791281113557,-10.98241678465435,0 +-48.90815176779218,-10.99471452553695,0 +-48.90923384110605,-11.00435976291444,0 +-48.90943772012341,-11.01490035864789,0 +-48.90965857187538,-11.02631868484781,0 +-48.90987695786133,-11.03773743749346,0 +-48.91093995713399,-11.04650321649405,0 +-48.91112417187628,-11.05616401703409,0 +-48.91401153281925,-11.0666501072017,0 +-48.91512794136547,-11.07804736129651,0 +-48.91716402304451,-11.09030361724307,0 +-48.91821713825002,-11.09818780289825,0 +-48.91840980298471,-11.10784520919576,0 +-48.91596805692166,-11.12018784381648,0 +-48.91619390979891,-11.13160119518385,0 +-48.91728040717057,-11.14124161510975,0 +-48.92112417599311,-11.15434321984329,0 +-48.92308894299058,-11.16308891525507,0 +-48.92508231226404,-11.17358862917196,0 +-48.92895158561527,-11.18844253948131,0 +-48.93180192785064,-11.19716648929543,0 +-48.93388709778583,-11.21292430336811,0 +-48.93403400536064,-11.2208186881595,0 +-48.93343225438525,-11.23662152546503,0 +-48.93351388381156,-11.24100595444703,0 +-48.93205737959651,-11.25771567836302,0 +-48.9322865386118,-11.26826296515532,0 +-48.93335078709552,-11.27615550438055,0 +-48.93808447160938,-11.28837076506878,0 +-48.94105273440593,-11.30987682898696,0 +-48.94122331374791,-11.31866042188764,0 +-48.94240814093232,-11.33357419385815,0 +-48.94615825342314,-11.34228820663209,0 +-48.9527463957498,-11.35885269403663,0 +-48.9556026079871,-11.36758028901035,0 +-48.95846349762571,-11.37630292686542,0 +-48.96506542304974,-11.39285179043904,0 +-48.9679953849987,-11.4050857773403,0 +-48.97168560990175,-11.41027902391016,0 +-48.97720450473708,-11.41719153809804,0 +-48.98371107113373,-11.4284734851591,0 +-48.98937240917605,-11.44152453388148,0 +-48.99225022879793,-11.4502452783213,0 +-48.99615643102967,-11.46509345672319,0 +-49.00000969192631,-11.47819210105685,0 +-49.00383266398816,-11.49041423088649,0 +-49.00670842146366,-11.5000189664418,0 +-49.01056524622989,-11.51399449303124,0 +-49.01340301303763,-11.52184161174329,0 +-49.0153278362113,-11.52882768986223,0 +-49.02013958721066,-11.54629004175403,0 +-49.02208057498786,-11.55415107902538,0 +-49.02741986840405,-11.5730822036113,0 +-49.02936046574405,-11.58096719029077,0 +-49.03503237347394,-11.59669631679778,0 +-49.03704913814472,-11.60807434322764,0 +-49.03894799917772,-11.61330109824289,0 +-49.04270982490382,-11.62200094413105,0 +-49.05021974849697,-11.63852054448757,0 +-49.05314269155162,-11.64986830990744,0 +-49.05615653627579,-11.66560221546778,0 +-49.05814790857239,-11.67521495451832,0 +-49.06098144838321,-11.6821789131577,0 +-49.06567944286664,-11.69261700713857,0 +-49.06946140057073,-11.70219719168896,0 +-49.07333316434636,-11.71616437625501,0 +-49.07532499296991,-11.72577941361969,0 +-49.08009904298409,-11.73972803330809,0 +-49.0864819776427,-11.74486893375979,0 +-49.09204300770001,-11.75353689233419,0 +-49.09678249366983,-11.76573256169248,0 +-49.10680744308439,-11.77343548612521,0 +-49.11589816546812,-11.77940094893723,0 +-49.12231527792909,-11.78629668260281,0 +-49.1324293314733,-11.79838616942748,0 +-49.14073400680284,-11.80875894810997,0 +-49.14095030581638,-11.81928927558536,0 +-49.13776925704189,-11.83954006608113,0 +-49.14253415086825,-11.85261696875576,0 +-49.14631057342482,-11.86132425367513,0 +-49.15110048284688,-11.87528305324116,0 +-49.16027951730744,-11.88389445889878,0 +-49.16310808576453,-11.88998995680925,0 +-49.17155946799038,-11.90652359709703,0 +-49.17622970637459,-11.91434618801762,0 +-49.18105705387851,-11.92920007965153,0 +-49.18943339046417,-11.94175344859999,0 +-49.19241638890377,-11.95573864443196,0 +-49.1945010514455,-11.96974243845285,0 +-49.19464599245703,-11.97676234411057,0 +-49.19585146615721,-11.99166066942554,0 +-49.19779135684567,-11.99864356794953,0 +-49.19901508628415,-12.01441799630661,0 +-49.20022584757918,-12.02931365765431,0 +-49.20048899424952,-12.04159600843137,0 +-49.20088369448221,-12.06002151591432,0 +-49.20204400052615,-12.0722884559474,0 +-49.1971492316705,-12.09521440873467,0 +-49.19182160488396,-12.09795564792118,0 +-49.18207956456816,-12.10429659244602,0 +-49.16700617437981,-12.11337696628508,0 +-49.16273959931216,-12.12399829703507,0 +-49.1603601646445,-12.13897311085535,0 +-49.15869381273234,-12.14515310893822,0 +-49.15809098569402,-12.15921579301839,0 +-49.15735907031618,-12.16713416398746,0 +-49.15488659358181,-12.17772202167719,0 +-49.15344061141678,-12.19443808910076,0 +-49.15188278821193,-12.20588488082229,0 +-49.1520475403935,-12.2137848301051,0 +-49.15413717324753,-12.22779504026953,0 +-49.15712531126942,-12.24178811739453,0 +-49.16004028802893,-12.25226972654655,0 +-49.16202057818627,-12.26101357314418,0 +-49.16583651551497,-12.27148288563574,0 +-49.15622653715522,-12.2851217904684,0 +-49.15463110115591,-12.29481190505607,0 +-49.15303553876512,-12.30450205721158,0 +-49.15147318369858,-12.31595606182457,0 +-49.15071914520244,-12.32299972752691,0 +-49.14644154243143,-12.33363347661751,0 +-49.14398017703605,-12.34510416874106,0 +-49.13986600199399,-12.36363399723682,0 +-49.1391119907165,-12.37067458619106,0 +-49.13765801234646,-12.38738813995663,0 +-49.13339968665406,-12.39889022965759,0 +-49.12470608725679,-12.4131089060617,0 +-49.12147489246777,-12.43072725677817,0 +-49.12064896937275,-12.43425425727448,0 +-49.11993140149249,-12.44304519061342,0 +-49.12022028379902,-12.45708171650295,0 +-49.12050922986906,-12.47111682735061,0 +-49.11567086205931,-12.49753359406815,0 +-49.11220633563376,-12.50374487953539,0 +-49.10259744284471,-12.51710109459743,0 +-49.09397337413575,-12.53483223799037,0 +-49.08980273124027,-12.5507146322449,0 +-49.08748449155659,-12.56919225612905,0 +-49.08223447762732,-12.57631566161749,0 +-49.07173469153131,-12.59056066010618,0 +-49.07096178366594,-12.59671963272925,0 +-49.07036890278589,-12.61165351453247,0 +-49.0679056899542,-12.62311155930168,0 +-49.06549627937463,-12.63720171425049,0 +-49.06394987386693,-12.64951990451236,0 +-49.06873362420691,-12.66347712034511,0 +-49.06999973796287,-12.68164812122496,0 +-49.07032547130729,-12.69746362715092,0 +-49.07142406136773,-12.70710871001044,0 +-49.07250467844695,-12.71587496111357,0 +-49.07540307999748,-12.72548426922599,0 +-49.07831960941009,-12.73597121316729,0 +-49.08039047099832,-12.74911005757948,0 +-49.08057129964564,-12.75789261903423,0 +-49.08361457451253,-12.77452564209234,0 +-49.08568555705484,-12.78766240754551,0 +-49.08680254318671,-12.79818780639048,0 +-49.08779284047982,-12.8025622445038,0 +-49.09067303728281,-12.81129209677822,0 +-49.10014044074989,-12.8339438582492,0 +-49.10481988510696,-12.84263114615506,0 +-49.10582800145192,-12.84787924161444,0 +-49.11068787344318,-12.86534079044109,0 +-49.11090440354904,-12.87587002366512,0 +-49.11290238599975,-12.88548485779624,0 +-49.11589024282999,-12.89946663126534,0 +-49.1186976972831,-12.90467577243157,0 +-49.12532163690188,-12.92033675974241,0 +-49.12912030866903,-12.92991162887219,0 +-49.13205642076991,-12.94125776104807,0 +-49.135857400707,-12.95083263148921,0 +-49.13875868030937,-12.96042561837448,0 +-49.14538947628544,-12.97608729479029,0 +-49.15205829604506,-12.99350422735018,0 +-49.15395091234446,-12.99785435082604,0 +-49.1568722142424,-13.00832600912058,0 +-49.16258129853399,-13.02312391362482,0 +-49.17010999649773,-13.03876239199841,0 +-49.17486485965865,-13.05094546698528,0 +-49.17874730928946,-13.06403518265031,0 +-49.18257480172431,-13.07449457092083,0 +-49.18730296341698,-13.08493637570463,0 +-49.18841281501293,-13.09457601255282,0 +-49.18499815469978,-13.10342412668115,0 +-49.17902939616241,-13.11934578986578,0 +-49.17655011889727,-13.12992952418723,0 +-49.17418365278069,-13.14578338060786,0 +-49.16984881987247,-13.15377815838119,0 +-49.16902313827156,-13.15730969361579,0 +-49.16048111501812,-13.1801004236032,0 +-49.15001425907825,-13.19699554242912,0 +-49.14568941974711,-13.20586845257673,0 +-49.13970560742651,-13.22180749604626,0 +-49.13718254629497,-13.2306438638044,0 +-49.13204713111962,-13.24392311956627,0 +-49.1287141299483,-13.25716209544962,0 +-49.12716537226406,-13.26948280124286,0 +-49.12383457045921,-13.28270933577156,0 +-49.12050407383541,-13.2959335218641,0 +-49.11978476317539,-13.30471919492008,0 +-49.12003852414772,-13.31699304049862,0 +-49.12115670514638,-13.32749459796887,0 +-49.12232918914295,-13.34062460578964,0 +-49.12442039481114,-13.35461166140864,0 +-49.12750340056301,-13.37296011152309,0 +-49.12882167756999,-13.39309387910592,0 +-49.12995834971288,-13.40446489411381,0 +-49.13012181204424,-13.41234892270278,0 +-49.1312585539172,-13.42371850508391,0 +-49.13232260488062,-13.43158373507507,0 +-49.1327647006785,-13.45221821059701,0 +-49.13388628573273,-13.46270959461137,0 +-49.13506323022732,-13.47582939476675,0 +-49.13357339638965,-13.49075545218808,0 +-49.13011544108505,-13.49783264749583,0 +-49.11681667264304,-13.50859082467312,0 +-49.1114986750872,-13.51307416672967,0 +-49.10628863086892,-13.52282495585307,0 +-49.09384630876369,-13.53183916679119,0 +-49.07763206883768,-13.53302858794571,0 +-49.06955164076071,-13.53493863012762,0 +-49.05894470988186,-13.54566708583798,0 +-49.05452578546127,-13.55013935341997,0 +-49.04306111917358,-13.56265106906408,0 +-49.03967321179221,-13.57324419959433,0 +-49.03654217569075,-13.59611071379419,0 +-49.03714705385825,-13.62503530437819,0 +-49.0374008197221,-13.637303169093,0 +-49.032333319664,-13.65405587215155,0 +-49.03155824384404,-13.66020643067274,0 +-49.02654469673493,-13.67958561588232,0 +-49.02667149509087,-13.68571776619943,0 +-49.02598738202259,-13.69624675696007,0 +-49.0261884525306,-13.70587999989613,0 +-49.02482647090307,-13.72891720135938,0 +-49.02589527111712,-13.73680025681773,0 +-49.02795888463995,-13.74905294309023,0 +-49.03274733817783,-13.76212908935584,0 +-49.03475488174075,-13.77174474051595,0 +-49.0387326469,-13.78921719274809,0 +-49.03976384778726,-13.79533812615387,0 +-49.03914153070424,-13.80851092417648,0 +-49.03583347795143,-13.8226096357999,0 +-49.03701616460046,-13.83574095562927,0 +-49.04079144293613,-13.84355897522295,0 +-49.04831876691608,-13.85831081413885,0 +-49.05222086410156,-13.87225229534287,0 +-49.05431521720401,-13.88622130849824,0 +-49.0599586316519,-13.89749242785229,0 +-49.06563921043504,-13.91051299486003,0 +-49.06865451312505,-13.92533472044379,0 +-49.07187180603252,-13.94977311475314,0 +-49.075014984771,-13.97070494414655,0 +-49.07609647920065,-13.97943338522297,0 +-49.08085127029346,-13.99160046456169,0 +-49.08486841289695,-14.01166658476541,0 +-49.08585952216256,-14.01602777002192,0 +-49.08605793265547,-14.02565575161312,0 +-49.08640150720237,-14.04228337469823,0 +-49.08748568484128,-14.05100947886629,0 +-49.0923998397962,-14.07012089960671,0 +-49.09265403458073,-14.08236343276622,0 +-49.09361021188423,-14.08496928943141,0 +-49.09559533337854,-14.09367864074957,0 +-49.10320938971864,-14.11277876718093,0 +-49.10690766346374,-14.11708180586628,0 +-49.11248270655459,-14.12484814311909,0 +-49.12011751770532,-14.14482298764301,0 +-49.12311724714732,-14.15879083039729,0 +-49.12422237142486,-14.16842735264417,0 +-49.12628416765565,-14.18090901463538,0 +-49.12746072440318,-14.19400417490061,0 +-49.13057007770612,-14.21318458911255,0 +-49.13248394501058,-14.21839943427261,0 +-49.13734178326534,-14.23493489193328,0 +-49.13855373248563,-14.24979126894383,0 +-49.13877238420011,-14.26028963421546,0 +-49.14072157470981,-14.26725533184683,0 +-49.14377254037372,-14.28382351928895,0 +-49.1449315215589,-14.29604434268299,0 +-49.14804660607865,-14.31521866817528,0 +-49.15020057610949,-14.33179517905732,0 +-49.154225154174,-14.35183187165829,0 +-49.15538659105385,-14.36405284623605,0 +-49.15735761739879,-14.37188519281809,0 +-49.16043531263271,-14.38931762609842,0 +-49.16465175313066,-14.41809241662875,0 +-49.16501493936556,-14.43472648599582,0 +-49.16525261818388,-14.44525428222399,0 +-49.16540684355371,-14.45226701907431,0 +-49.16471031175629,-14.4619179829901,0 +-49.16519944582247,-14.48469296655453,0 +-49.15904184513253,-14.49270503324632,0 +-49.15196019812139,-14.49985981700132,0 +-49.15029964568885,-14.50689805378071,0 +-49.15682931388241,-14.51639441012988,0 +-49.15872899730594,-14.52073199041836,0 +-49.16087595248261,-14.53749929334403,0 +-49.16019110858349,-14.54802123460829,0 +-49.15950624150464,-14.55854177732485,0 +-49.15885788326043,-14.57081103251186,0 +-49.15911312787532,-14.5830607748822,0 +-49.1592934807381,-14.5918119947161,0 +-49.16130806687768,-14.6022839069863,0 +-49.16525547846025,-14.61794608392543,0 +-49.16820898844342,-14.62925625450085,0 +-49.17194879050347,-14.63530479491794,0 +-49.17848796497784,-14.64566882790529,0 +-49.18793142753985,-14.66558591203694,0 +-49.19264301701928,-14.67510367251367,0 +-49.20096291365005,-14.68368207349807,0 +-49.20740516969902,-14.68880315000679,0 +-49.21296510862843,-14.6948175577152,0 +-49.21760275279289,-14.69997617511839,0 +-49.22686779661675,-14.71028669138819,0 +-49.23059757410435,-14.71546052184007,0 +-49.24259021478424,-14.72658791360859,0 +-49.24632112281514,-14.7317620322351,0 +-49.25286129761746,-14.74125492523748,0 +-49.25665467303624,-14.74905613227973,0 +-49.2632382291479,-14.76030210148997,0 +-49.27267721788614,-14.77762308984753,0 +-49.2847863678271,-14.79313549053641,0 +-49.29311951706205,-14.8017180609955,0 +-49.30057258000345,-14.81119783301693,0 +-49.31272820426751,-14.82760757743352,0 +-49.31934585168093,-14.83888519796508,0 +-49.32316298850377,-14.84671047644875,0 +-49.3251047282862,-14.85194051581424,0 +-49.33178444926831,-14.86670460593161,0 +-49.33936811833378,-14.88144838227231,0 +-49.34502238700698,-14.89097436645185,0 +-49.35247431018604,-14.90182263698069,0 +-49.35917366330403,-14.91831256446082,0 +-49.36204199929966,-14.92525384379592,0 +-49.3667387491828,-14.93303352365129,0 +-49.37418728268682,-14.94250660332787,0 +-49.385292057934,-14.953648566612,0 +-49.39641629252126,-14.96566107755747,0 +-49.40663818132915,-14.977686736355,0 +-49.41037344805072,-14.9828537570578,0 +-49.41798244116066,-14.99930295594905,0 +-49.42177777051793,-15.00709113384071,0 +-49.42645821780714,-15.01398707055455,0 +-49.4312182877874,-15.02437803974652,0 +-49.43967787658085,-15.0381891304478,0 +-49.448944134649,-15.04761234412916,0 +-49.45907576633354,-15.05526852378454,0 +-49.46380060574749,-15.06391291204128,0 +-49.4769119245201,-15.0828743393613,0 +-49.48431008062555,-15.08971274332287,0 +-49.49631969898756,-15.10081890014449,0 +-49.50190299917033,-15.10769182316447,0 +-49.50748340735637,-15.11369811857254,0 +-49.51957270137029,-15.12656795515399,0 +-49.52976848159535,-15.1368420459051,0 +-49.53550203045047,-15.14983646145451,0 +-49.53558347328438,-15.15333329143788,0 +-49.53673338634245,-15.16380479839183,0 +-49.53983660235911,-15.1803576001813,0 +-49.54473024339566,-15.19599721516141,0 +-49.54685743498177,-15.20908272019912,0 +-49.54995796270215,-15.22392544318646,0 +-49.55274235279057,-15.22649578246889,0 +-49.56141738606941,-15.24648951262918,0 +-49.55170297180639,-15.25636584893919,0 +-49.54551856844367,-15.26265263261268,0 +-49.54475885639211,-15.2713522376114,0 +-49.55220006092845,-15.2782283060297,0 +-49.56149719984816,-15.28511605507063,0 +-49.5662283420099,-15.29546013527431,0 +-49.56849946789888,-15.31741499147718,0 +-49.56867470490122,-15.3252924586011,0 +-49.56262324275214,-15.34478441128441,0 +-49.55306580550182,-15.36424617647037,0 +-49.54881174224659,-15.37480485488618,0 +-49.54911510347216,-15.38702716142229,0 +-49.54114120287122,-15.39683585276655,0 +-49.53222296596978,-15.40491232365011,0 +-49.52701917848512,-15.41639799532452,0 +-49.52455425631319,-15.42781368720557,0 +-49.52107765802807,-15.43400203468033,0 +-49.50965341963389,-15.44909686422605,0 +-49.50528891957006,-15.456179956002,0 +-49.50020206166959,-15.47114588806372,0 +-49.49683035740222,-15.48258141713091,0 +-49.49426280380542,-15.48962827651424,0 +-49.48557610394212,-15.50728909278652,0 +-49.47666262108379,-15.51446608063873,0 +-49.46418288665149,-15.52433789712438,0 +-49.45166530641752,-15.53246139802053,0 +-49.4400548663869,-15.54056421244009,0 +-49.43201277065499,-15.54597145244032,0 +-49.41870488379056,-15.55934194531581,0 +-49.41086952763309,-15.57432105511782,0 +-49.40469824967726,-15.58228829910055,0 +-49.39854805471872,-15.59112241899189,0 +-49.38972142438557,-15.60174210834796,0 +-49.38452144210773,-15.61232828035627,0 +-49.36493190848815,-15.62751960197736,0 +-49.36048364797148,-15.63109014718421,0 +-49.34726222716201,-15.64822183815498,0 +-49.3438067971547,-15.6561202248898,0 +-49.33419831995118,-15.6728676777667,0 +-49.32736545090001,-15.69301234068115,0 +-49.32127705045593,-15.70533500260939,0 +-49.30531006035815,-15.72223720413509,0 +-49.29935953705863,-15.74069479463857,0 +-49.29692152800144,-15.75299126326984,0 +-49.29645685464357,-15.7722350949062,0 +-49.29125353654175,-15.7819675692909,0 +-49.28415520603122,-15.78823610476033,0 +-49.27885299143249,-15.79617427979491,0 +-49.26843102367053,-15.817189680664,0 +-49.26589714573316,-15.82596879063565,0 +-49.26328108289385,-15.83125894945657,0 +-49.25445062247496,-15.8436604216216,0 +-49.25101345619964,-15.85333642390018,0 +-49.24668014513855,-15.86302901189076,0 +-49.2405680722087,-15.8745043021293,0 +-49.23452853080663,-15.8894723747336,0 +-49.22581941572843,-15.90711529734599,0 +-49.2232352826811,-15.91327565007683,0 +-49.21799251073807,-15.9221032010202,0 +-49.2117515818553,-15.92658187339876,0 +-49.19921221161976,-15.9329210402674,0 +-49.18852813171539,-15.94096634525868,0 +-49.18140711631066,-15.94632793049785,0 +-49.16987414500372,-15.95965473806756,0 +-49.15536147229896,-15.96347086253475,0 +-49.14641398283359,-15.97329340925058,0 +-49.13934370702621,-15.98658313277547,0 +-49.133974465184,-15.99283384821257,0 +-49.12770801347467,-15.99909497433387,0 +-49.1143338383478,-16.01336053144053,0 +-49.1125293746645,-16.01427283633111,0 +-49.10443580236522,-16.0196888350248,0 +-49.09272976026908,-16.02693050256882,0 +-49.08643765428898,-16.0314352183689,0 +-49.07421760735175,-16.04692420960506,0 +-49.06627830885675,-16.05845294878054,0 +-49.06010373801752,-16.06737918508841,0 +-49.04945279155556,-16.07903729712559,0 +-49.03973221834275,-16.09075013960565,0 +-49.03539046410902,-16.09883843875985,0 +-49.03376018454084,-16.10680345131939,0 +-49.03675852316966,-16.11987066011169,0 +-49.04419016031637,-16.12927474872408,0 +-49.04795528080927,-16.13617564856759,0 +-49.04551282717087,-16.14928669444495,0 +-49.04381212883683,-16.15454321817342,0 +-49.03857438204606,-16.16338115586952,0 +-49.03083594709137,-16.18102050229349,0 +-49.03010434900527,-16.18969922225418,0 +-49.02409755548302,-16.20543379191717,0 +-49.01081763182842,-16.21956558430665,0 +-48.98853412692072,-16.23647030295606,0 +-48.98512847015245,-16.24695543420763,0 +-48.98344350461635,-16.25306623200656,0 +-48.98078090043082,-16.25572091341835,0 +-48.96551915930582,-16.26468596661093,0 +-48.94862231199001,-16.2780334278158,0 +-48.94062090998045,-16.28513157754816,0 +-48.93072009709364,-16.28792082392323,0 +-48.9263200010492,-16.29408296044069,0 +-48.91508090396302,-16.31947721865284,0 +-48.91183374165349,-16.33689875880053,0 +-48.91659433859611,-16.34809567015681,0 +-48.92308266427371,-16.35579245183785,0 +-48.92586608607302,-16.35921501428661,0 +-48.93875641112072,-16.37026858959285,0 +-48.94801312527821,-16.38051948617504,0 +-48.95168419102885,-16.38305755135565,0 +-48.96455547047182,-16.39413835451673,0 +-48.9746999102622,-16.40440696883462,0 +-48.98299001666975,-16.41210143302071,0 +-48.98485051938568,-16.41468036285809,0 +-48.99825601743852,-16.41532468085023,0 +-49.01075486035799,-16.41706046287327,0 +-49.01936392081421,-16.43088771301599,0 +-49.02368721846316,-16.43880007229126,0 +-49.03648486566108,-16.45453764627506,0 +-49.04915332287382,-16.46328528638212,0 +-49.06810259560582,-16.47291446017865,0 +-49.07870721213919,-16.48171201721145,0 +-49.08087441718124,-16.4856730857674,0 +-49.09473722926458,-16.50041711831305,0 +-49.10113978037297,-16.50730090238248,0 +-49.11284377333988,-16.51808879811167,0 +-49.11818745535171,-16.52399457288334,0 +-49.13090167479805,-16.53276438095781,0 +-49.14368790059645,-16.5445387658101,0 +-49.14594678610128,-16.55250914730925,0 +-49.15031617115329,-16.56144072743409,0 +-49.16097568288305,-16.57125410954158,0 +-49.17782255015464,-16.57694305259621,0 +-49.18631200355838,-16.58279193511998,0 +-49.19388563493783,-16.59466978834592,0 +-49.19836666286108,-16.60861017520364,0 +-49.19845208198617,-16.61261553450791,0 +-49.20400017476449,-16.62753536790436,0 +-49.20850319062748,-16.64247402803488,0 +-49.22064712776423,-16.67228653298082,0 +-49.22806984368106,-16.67713963288763,0 +-49.23146265290985,-16.68908665488761,0 +-49.23178994246449,-16.7041155566073,0 +-49.23085249408837,-16.70914343545499,0 +-49.23109445084099,-16.72017187269786,0 +-49.23140372160205,-16.73421416463399,0 +-49.23077765609571,-16.75329767838181,0 +-49.23311275617683,-16.76429220090854,0 +-49.23429157915885,-16.77029180950999,0 +-49.23994390806529,-16.78897139319549,0 +-49.24116480531462,-16.79696522047308,0 +-49.24572190815155,-16.81391575324173,0 +-49.24807730819118,-16.82589712067771,0 +-49.25483228547539,-16.84783583031813,0 +-49.25734794943465,-16.86787291072653,0 +-49.25755940582448,-16.877908871925,0 +-49.25799818206014,-16.89898830513136,0 +-49.2562607087289,-16.91608557671794,0 +-49.25433251576602,-16.92415625328239,0 +-49.24621158965537,-16.93635731479414,0 +-49.24022506344993,-16.95052064920939,0 +-49.23426446314517,-16.96567335949039,0 +-49.23032337956849,-16.97675321196404,0 +-49.21814245298484,-16.99399733661986,0 +-49.21419819580009,-17.00508084421576,0 +-49.21053524461134,-17.02918093042962,0 +-49.20983552822512,-17.04522127414494,0 +-49.20902688159492,-17.05625763681547,0 +-49.20944327258915,-17.07528757502147,0 +-49.20968439309055,-17.0863088010987,0 +-49.21418402747918,-17.10025646362899,0 +-49.21799049469259,-17.13027429185266,0 +-49.21191606767459,-17.14042776437135,0 +-49.20902483645291,-17.1525090916146,0 +-49.20915268231809,-17.15851751323828,0 +-49.20932312372917,-17.16652761713564,0 +-49.21385903299991,-17.1824606595381,0 +-49.22036682665327,-17.19235176631117,0 +-49.22703376499531,-17.20927614150565,0 +-49.22716135380261,-17.21528042429582,0 +-49.22844629728972,-17.22627280029169,0 +-49.2332655302761,-17.25429563350273,0 +-49.23888420922349,-17.27030598832081,0 +-49.24018970626348,-17.28136973148679,0 +-49.2405381771774,-17.29649365849264,0 +-49.24084040039797,-17.3096097753434,0 +-49.23716942645229,-17.33556138078396,0 +-49.23738060126576,-17.34561094829689,0 +-49.237591687726,-17.3556576537953,0 +-49.23154296815672,-17.36783298995755,0 +-49.22354669455783,-17.38599763177356,0 +-49.22385081308797,-17.40004046160697,0 +-49.22528713548829,-17.41808573883312,0 +-49.22548053591128,-17.42711501246889,0 +-49.21541008360195,-17.44736910873862,0 +-49.2123844678601,-17.45345144145354,0 +-49.21262147106813,-17.46448559542813,0 +-49.21403945301046,-17.48151511827184,0 +-49.21442912206923,-17.49956615942747,0 +-49.21054770375002,-17.51469083626471,0 +-49.208704348217,-17.52676577719888,0 +-49.20379191588169,-17.5429125721461,0 +-49.18746004596811,-17.56630183528896,0 +-49.1742159448135,-17.58662484672576,0 +-49.17063424495878,-17.61662674436923,0 +-49.16675076502488,-17.63180601578361,0 +-49.16488566565852,-17.64291349760721,0 +-49.15999536608704,-17.66011716210354,0 +-49.15907412950799,-17.6661701111585,0 +-49.15938542914134,-17.68026757242937,0 +-49.15969659701576,-17.69435644282834,0 +-49.16105426748585,-17.70839398390848,0 +-49.16344143979374,-17.72140192912942,0 +-49.16795332557037,-17.73536817123467,0 +-49.17469767823895,-17.75530448522334,0 +-49.1801060071161,-17.76221338903646,0 +-49.1940786273001,-17.77596859327483,0 +-49.214884708081,-17.8147018188622,0 +-49.21860817572428,-17.84166518077448,0 +-49.22221959018132,-17.86259167318421,0 +-49.22578966683199,-17.88152737807706,0 +-49.23253777934658,-17.90140983792946,0 +-49.23703085725052,-17.91433551505157,0 +-49.2406495367533,-17.9352896502318,0 +-49.24437015019852,-17.96027658260756,0 +-49.24697411841667,-17.98229579696306,0 +-49.25038122476204,-17.99326557226679,0 +-49.25811277173079,-18.00916441565458,0 +-49.26568777908913,-18.01804225871548,0 +-49.27873476813492,-18.03584007485839,0 +-49.27693403976505,-18.04894833451423,0 +-49.27719319342965,-18.06000865132773,0 +-49.27155048013071,-18.08841516242273,0 +-49.27518938288259,-18.10938219796622,0 +-49.27768504848654,-18.12636591539218,0 +-49.28357557019313,-18.1533130047161,0 +-49.28394050129422,-18.16934314339565,0 +-49.27718319186154,-18.19755196246827,0 +-49.27225115689752,-18.21372520913282,0 +-49.26841820515795,-18.23188681408543,0 +-49.26244287050568,-18.249098089075,0 +-49.26151386080678,-18.25515047854493,0 +-49.25750289679237,-18.26527900022668,0 +-49.25155426527615,-18.28347533456537,0 +-49.24776441332418,-18.30259098462597,0 +-49.2471107473275,-18.32067131646975,0 +-49.24534951347823,-18.33677532952994,0 +-49.24224288078666,-18.33984956495526,0 +-49.23613900948853,-18.35101858170184,0 +-49.22170099759759,-18.36838014509988,0 +-49.21976021778605,-18.37645600005058,0 +-49.20527057282288,-18.39181502128835,0 +-49.19904907853503,-18.39796794675934,0 +-49.1897790226172,-18.41021368842135,0 +-49.18560771931178,-18.41331172324433,0 +-49.18775889944737,-18.46445946594601,0 +-49.1881937325176,-18.48456989674996,0 +-49.18841286148901,-18.49463573091564,0 +-49.1886984676213,-18.50772476593561,0 +-49.18913787921093,-18.52785512281097,0 +-49.1883197948034,-18.53894399506392,0 +-49.1887355052283,-18.55804906470933,0 +-49.18681270021016,-18.56713678432687,0 +-49.18504271647534,-18.58325865371167,0 +-49.18023611301734,-18.60549211018746,0 +-49.17735976446937,-18.61863830160221,0 +-49.17045355655146,-18.64088400024695,0 +-49.17176897013542,-18.65289584740467,0 +-49.16769178623054,-18.659999489487,0 +-49.15826842949989,-18.66419769470382,0 +-49.15300907360677,-18.66530384661775,0 +-49.14180224210568,-18.68456827978097,0 +-49.1388918384328,-18.69665092211218,0 +-49.13064418662756,-18.70683121023955,0 +-49.11729337159437,-18.72511850058056,0 +-49.10697910822346,-18.7373350805278,0 +-49.09758890070022,-18.74352392753346,0 +-49.09031131663578,-18.74967352299937,0 +-49.08510714939824,-18.75377950956753,0 +-49.06964743083162,-18.77411805516326,0 +-49.06980177379126,-18.78214106849008,0 +-49.07639857675193,-18.79608572576872,0 +-49.07867226017095,-18.80509521233834,0 +-49.08422592003893,-18.8180413967883,0 +-49.0865749778424,-18.82902966394175,0 +-49.08892327885017,-18.84104935829833,0 +-49.08695249484713,-18.84913799523351,0 +-49.07646238177501,-18.85435014004496,0 +-49.06921440883089,-18.86250957986843,0 +-49.05265359527485,-18.87533781477902,0 +-49.04445468084192,-18.88853665604839,0 +-49.03951020556056,-18.90566420070753,0 +-49.03883854779232,-18.92470934950845,0 +-49.03694345562307,-18.93576706994501,0 +-49.03290720958179,-18.9458646860597,0 +-49.02886956397433,-18.95596449433165,0 +-49.02163003133536,-18.96512318042824,0 +-49.00826091656126,-18.98543371938477,0 +-49.00010430853272,-19.00163372541194,0 +-48.99610551477983,-19.01374557432887,0 +-48.99318602977854,-19.02684221107767,0 +-48.98614824312899,-19.04603362359299,0 +-48.98313101812415,-19.05411388223819,0 +-48.980363365381,-19.0742248096507,0 +-48.97527011044205,-19.08434306188719,0 +-48.97248915177138,-19.10343885315025,0 +-48.96968609793715,-19.12152879294135,0 +-48.96669275800311,-19.13060140298444,0 +-48.96274404717966,-19.14469918548211,0 +-48.95769168987815,-19.15681155691409,0 +-48.95268793999902,-19.17297740965329,0 +-48.95076610216451,-19.18407643547693,0 +-48.94664337898786,-19.19119915697088,0 +-48.9374573207786,-19.21251509565132,0 +-48.93760317916219,-19.22056656244269,0 +-48.9347124841131,-19.23672200073809,0 +-48.92854606447015,-19.24789469338297,0 +-48.92442504196281,-19.25501330948264,0 +-48.91213367970797,-19.28030656752095,0 +-48.90706408916895,-19.29245793610524,0 +-48.90416078589563,-19.30657724072491,0 +-48.89828975967443,-19.33179716532203,0 +-48.89545527922625,-19.34991750300847,0 +-48.89352398465892,-19.35998917645253,0 +-48.89265041247468,-19.37003670106542,0 +-48.88776117976523,-19.3931961595467,0 +-48.88684716985489,-19.40123960761763,0 +-48.88523807532569,-19.42837369278479,0 +-48.88436629903811,-19.43743697663936,0 +-48.88245078318715,-19.44752232815956,0 +-48.87216309620734,-19.46478598464675,0 +-48.86268945437556,-19.46997711033207,0 +-48.84905627185197,-19.47926287221725,0 +-48.84072055562358,-19.48744714663144,0 +-48.83364287692891,-19.50464541920768,0 +-48.83381425301366,-19.51267512696373,0 +-48.83301795844029,-19.52573874194104,0 +-48.83238691647542,-19.54682723120942,0 +-48.83167505364764,-19.56189196202255,0 +-48.8320296791029,-19.57693110122902,0 +-48.83449284626893,-19.59092362809334,0 +-48.83777610821421,-19.60292781524335,0 +-48.84446063817163,-19.6208891223758,0 +-48.86628440179996,-19.64559025514963,0 +-48.88309919818994,-19.6342589949048,0 +-48.8958124630923,-19.63102720522537,0 +-48.91069537475291,-19.62976392800928,0 +-48.92029668188944,-19.63059971015221,0 +-48.92455532353527,-19.63052493149075,0 +-48.94486777727661,-19.63418234059024,0 +-48.95352951930734,-19.6410566828449,0 +-48.96865493630794,-19.64776010160502,0 +-48.97530025684581,-19.65864903993847,0 +-48.97554675564254,-19.67068133303773,0 +-48.97577273512158,-19.68171086353137,0 +-48.97709118973903,-19.69371462573817,0 +-48.97740472838206,-19.70874611540637,0 +-48.97232638876591,-19.72190568407248,0 +-48.97037372545147,-19.73097908124969,0 +-48.9695970228485,-19.74607133117655,0 +-48.96888408190204,-19.76521301434332,0 +-48.96809927127398,-19.78033156973433,0 +-48.96425501701665,-19.80254455292907,0 +-48.96441230444609,-19.81058823785357,0 +-48.96449097020609,-19.81461029809458,0 +-48.96299587157498,-19.84450452041039,0 +-48.96548218023508,-19.86153416459624,0 +-48.9666821086205,-19.86852388186095,0 +-48.96584622591865,-19.88056614671978,0 +-48.95657657216362,-19.89681133067795,0 +-48.95672699761673,-19.90482567847292,0 +-48.96343128059418,-19.92172059905973,0 +-48.96255622357322,-19.9317693469019,0 +-48.96920097286237,-19.94369415094164,0 +-48.97678223091785,-19.94858023387504,0 +-48.99094501052203,-19.96138928431875,0 +-49.00288749843198,-19.97021673134309,0 +-49.01587744836228,-19.97801813230066,0 +-49.05040826729874,-19.99345919608391,0 +-49.05493920852755,-20.00543592568464,0 +-49.05431976815574,-20.02654788102278,0 +-49.05450972429444,-20.03558361775762,0 +-49.05396127526826,-20.0606998481555,0 +-49.05307733315439,-20.06975621335793,0 +-49.0523165265643,-20.08484115830472,0 +-49.0547026810208,-20.09685718156055,0 +-49.07315857092133,-20.10958201095087,0 +-49.08079480497057,-20.1164774473639,0 +-49.10041679202158,-20.13320160720104,0 +-49.11683369058814,-20.14997949580715,0 +-49.12124370495619,-20.15592708266052,0 +-49.12467023060366,-20.16591443685383,0 +-49.12822687547045,-20.18193126115491,0 +-49.13951985785676,-20.20886935206162,0 +-49.14625616981166,-20.22284002122654,0 +-49.15735416539988,-20.23977127725179,0 +-49.16836987808306,-20.25267983686679,0 +-49.18153837669885,-20.2655556973947,0 +-49.19263907838442,-20.28150166549321,0 +-49.20360746058353,-20.29140066151558,0 +-49.21744773628287,-20.33765544910144,0 +-49.22316086625344,-20.35468249438687,0 +-49.22893300989688,-20.37472339254776,0 +-49.23670692687092,-20.38766332788571,0 +-49.24570200244712,-20.40659628057529,0 +-49.2721832091047,-20.43925423548249,0 +-49.28973317474345,-20.45599905231997,0 +-49.29427228920144,-20.46696911034565,0 +-49.30103038067929,-20.48091106106854,0 +-49.30888252051389,-20.49684186240987,0 +-49.31686660696339,-20.51779436888658,0 +-49.32132348634497,-20.52474346002572,0 +-49.32267689999355,-20.5377822746794,0 +-49.32291071377234,-20.54883076288385,0 +-49.32318703319923,-20.56188568077802,0 +-49.32365752045189,-20.58198313884281,0 +-49.32615111342308,-20.59601767843581,0 +-49.34230410459793,-20.64098677884868,0 +-49.34590657460154,-20.65701200269396,0 +-49.34092421923214,-20.67321871545938,0 +-49.33415729687094,-20.70627134124426,0 +-49.33653932350602,-20.71627990647046,0 +-49.33904860470737,-20.73232812041984,0 +-49.33931408016274,-20.74439837035236,0 +-49.34060601596033,-20.75443673215211,0 +-49.34310383022184,-20.77048645477979,0 +-49.350097283949,-20.78715366848235,0 +-49.355882799329,-20.8031695546963,0 +-49.35833883116368,-20.81521421287099,0 +-49.37393718646199,-20.83705088900616,0 +-49.38183344175979,-20.85297087477541,0 +-49.39617390107473,-20.86776758982148,0 +-49.42017547080899,-20.87940196231375,0 +-49.44399322883109,-20.88595141224362,0 +-49.45376582914612,-20.89074805045018,0 +-49.46039172859273,-20.89862983535155,0 +-49.47026624253043,-20.90744553167218,0 +-49.48875222703207,-20.91608277478118,0 +-49.51163788322707,-20.92766943803499,0 +-49.53354797685622,-20.94329564434404,0 +-49.54345272503988,-20.95213505768667,0 +-49.56206595552935,-20.96481028927565,0 +-49.57835548780497,-20.97049543069808,0 +-49.60007435838525,-20.97807288452819,0 +-49.61208460647866,-20.98485128194682,0 +-49.62639792579603,-20.99761018462996,0 +-49.64179210504794,-21.01034383583139,0 +-49.64745864612686,-21.02127987933313,0 +-49.65351973762719,-21.04729661711682,0 +-49.65603986308518,-21.06132654274047,0 +-49.6627147341889,-21.0692315001934,0 +-49.66855373208065,-21.08621664662662,0 +-49.67769620310851,-21.10614568284378,0 +-49.68008189570892,-21.11514857076086,0 +-49.68496666245294,-21.1371868444624,0 +-49.69495785301643,-21.14804068878631,0 +-49.70492509131725,-21.15788856415698,0 +-49.71497370492231,-21.17075596346183,0 +-49.72389344095633,-21.18163509183219,0 +-49.72403191509121,-21.18667380639371,0 +-49.73108827592642,-21.20769766213966,0 +-49.73897749221494,-21.21962903151224,0 +-49.74130418488005,-21.22563202555692,0 +-49.74916954972285,-21.24135072207394,0 +-49.75700216332387,-21.25223419040032,0 +-49.7768889320632,-21.26988499048889,0 +-49.79353062303915,-21.28662347968245,0 +-49.79595679752459,-21.29664025801891,0 +-49.79625129007647,-21.30771241982006,0 +-49.80244379193631,-21.33776806213257,0 +-49.80296846251522,-21.3578809405716,0 +-49.80036079114755,-21.38209328862765,0 +-49.79891185782954,-21.40929848107806,0 +-49.79693664486039,-21.41638760349306,0 +-49.78668842861148,-21.4377510112228,0 +-49.78700535537904,-21.44981808653021,0 +-49.78626589250679,-21.46291675876464,0 +-49.7856050292105,-21.47903269097048,0 +-49.78670824925722,-21.52127200221325,0 +-49.80106795717928,-21.57431569720482,0 +-49.7937827368035,-21.58556201511843,0 +-49.7866015800239,-21.60083109322075,0 +-49.78673392007116,-21.60585838062613,0 +-49.79032647944726,-21.61884784073412,0 +-49.78837060024922,-21.62695205832692,0 +-49.78427344159597,-21.63612089128697,0 +-49.77832302436369,-21.65742072654775,0 +-49.78181053880546,-21.66639000463385,0 +-49.78784003756419,-21.68808807628622,0 +-49.80334890568587,-21.70086417816065,0 +-49.81887441168166,-21.7146209940791,0 +-49.82436355379716,-21.71751440543459,0 +-49.83531744806741,-21.72230386151956,0 +-49.84212745575091,-21.73421057210598,0 +-49.84888559285971,-21.74410751393975,0 +-49.8621911361026,-21.75586144316184,0 +-49.87774590746831,-21.77057995145764,0 +-49.88821692743613,-21.79749041462806,0 +-49.89067667820743,-21.80850809119143,0 +-49.89329668292627,-21.82555743291341,0 +-49.89583604391987,-21.83958376049412,0 +-49.89864229648008,-21.86365346524341,0 +-49.90830347987783,-21.90061350986677,0 +-49.91546206050307,-21.92457411660151,0 +-49.9159325080692,-21.94166021809624,0 +-49.91948733429189,-21.95264317238046,0 +-49.91676221161865,-21.97182399012871,0 +-49.91055822112397,-21.98302848634452,0 +-49.90768737013013,-21.99717366016451,0 +-49.90384052207681,-22.01536360214651,0 +-49.89806934868023,-22.04265173367061,0 +-49.8976399676906,-22.06682097170066,0 +-49.8977493588462,-22.07084678285748,0 +-49.90583659544347,-22.08879193542748,0 +-49.91473756191334,-22.09664743997547,0 +-49.93381318096836,-22.12115176082859,0 +-49.94273149731478,-22.13089307868144,0 +-49.95090140545808,-22.15245672815661,0 +-49.95553517755272,-22.1634153597651,0 +-49.96025446316036,-22.17737366246173,0 +-49.96158648707875,-22.18638311474585,0 +-49.9619443110314,-22.19943486285793,0 +-49.96017711648582,-22.21457768061984,0 +-49.95186586052137,-22.22890139678534,0 +-49.93110009468572,-22.22340258972391,0 +-49.91822806505069,-22.22875120857026,0 +-49.91725192830959,-22.2327985872301,0 +-49.91544538470129,-22.2458518647331,0 +-49.91597777522036,-22.26483637129655,0 +-49.91639859126442,-22.27983645467847,0 +-49.91570679367993,-22.29386946959003,0 +-49.91295543185306,-22.31196664034238,0 +-49.90583829418151,-22.3302498317449,0 +-49.90282410371233,-22.33937158096732,0 +-49.88818820212888,-22.36083938449868,0 +-49.87768338848214,-22.37415619325884,0 +-49.8637120304031,-22.3795154604066,0 +-49.86384630979293,-22.38453297686659,0 +-49.86585475603957,-22.37845962388528,0 +-49.86300352763259,-22.39359032612187,0 +-49.85899043508084,-22.40573719826034,0 +-49.85923970229313,-22.41477011047682,0 +-49.85836763025007,-22.42281872419399,0 +-49.86332361756035,-22.44579331113347,0 +-49.87110900520086,-22.45264532783749,0 +-49.87789300368062,-22.46253180074477,0 +-49.88475995803221,-22.47542786859393,0 +-49.88497643662853,-22.48344978843366,0 +-49.88605043614308,-22.52325300293307,0 +-49.89221937489506,-22.55025748301534,0 +-49.89387724165261,-22.57128750993148,0 +-49.89006992330049,-22.59144002885137,0 +-49.885229169668,-22.61369768552871,0 +-49.88498445932386,-22.64488738754943,0 +-49.88231928001081,-22.66707021228082,0 +-49.87875375496574,-22.69628136965666,0 +-49.87836807117706,-22.72239616871915,0 +-49.88326369388703,-22.74237215370718,0 +-49.88797091587132,-22.75532179227437,0 +-49.88824243581901,-22.76536055614805,0 +-49.89090871351736,-22.78337956154832,0 +-49.88908295199688,-22.79648577276461,0 +-49.88635599602353,-22.81665638484615,0 +-49.88150026947731,-22.83889717223649,0 +-49.87980563265136,-22.85704815373819,0 +-49.87606517789153,-22.8802735544694,0 +-49.87846377949861,-22.88827044613469,0 +-49.88438087104517,-22.90525086347132,0 +-49.88773682213463,-22.90819585293387,0 +-49.89911782857809,-22.92506312033215,0 +-49.90373277196439,-22.93402784685861,0 +-49.90627299828685,-22.94705350286896,0 +-49.90116707775703,-22.96023864351797,0 +-49.9014127930522,-22.96927830146077,0 +-49.90408875139357,-22.98730381520943,0 +-49.90752913464885,-22.99325250384459,0 +-49.91381895074591,-23.02313689172385,0 +-49.92199582127579,-23.04205196223569,0 +-49.9234454146022,-23.05513245119051,0 +-49.92721818618872,-23.07320080479776,0 +-49.93068927626909,-23.08018253815646,0 +-49.93342311257429,-23.10027847689085,0 +-49.93596503034901,-23.11331994025949,0 +-49.93844464662511,-23.12437494488601,0 +-49.94321152392087,-23.1394144989162,0 +-49.95234018782826,-23.15433972972238,0 +-49.95358852560516,-23.16035859432711,0 +-49.96286681951239,-23.18024537287531,0 +-49.97286540179191,-23.18499564114708,0 +-49.99819761713822,-23.19142228199077,0 +-50.01827212069156,-23.20602564421673,0 +-50.02284092492338,-23.21294984363469,0 +-50.02861151109855,-23.22386559013163,0 +-50.03759543051172,-23.23168637026107,0 +-50.05210065304346,-23.24541265313047,0 +-50.06768761962265,-23.25708711421809,0 +-50.07103949050661,-23.2600176392241,0 +-50.08034691670895,-23.27986929125212,0 +-50.08052818476185,-23.28489093412459,0 +-50.07792770392045,-23.30506550567413,0 +-50.07606464143296,-23.31517015178348,0 +-50.07434750821813,-23.33030230401709,0 +-50.07031243782036,-23.34146864667538,0 +-50.06195538983613,-23.35475288259073,0 +-50.05587919875836,-23.37101028581094,0 +-50.05620306198445,-23.38207238850874,0 +-50.05774498523618,-23.39909367374396,0 +-50.06491147922907,-23.41807982642713,0 +-50.06947898932975,-23.42401934553009,0 +-50.0968106524711,-23.45664587332921,0 +-50.10371559922056,-23.46658265503469,0 +-50.09969659919199,-23.4797529099274,0 +-50.0988249149208,-23.48781693571182,0 +-50.10576792807144,-23.50071501150613,0 +-50.11257089059502,-23.50858905806059,0 +-50.13231298613366,-23.54536492747078,0 +-50.13847875044697,-23.56321232202882,0 +-50.14339300741553,-23.58118245546937,0 +-50.14478332307117,-23.59120008738348,0 +-50.14611116467039,-23.59921269045795,0 +-50.15092380139363,-23.61418304327819,0 +-50.15348713422501,-23.62719346127865,0 +-50.15711788755964,-23.63916945529409,0 +-50.15980310834361,-23.65618908048525,0 +-50.16044423673307,-23.67828011614249,0 +-50.16985632647032,-23.70015236534148,0 +-50.17793986653194,-23.71401737571706,0 +-50.18736726215676,-23.7368813796212,0 +-50.18877854908925,-23.74888127980087,0 +-50.18626605450908,-23.77899060352493,0 +-50.18668315800959,-23.79498734806427,0 +-50.18849764811773,-23.82193971964885,0 +-50.1900694419182,-23.83794003771471,0 +-50.19380769708958,-23.85289143188654,0 +-50.19757697043593,-23.86884616724168,0 +-50.20235687281789,-23.88177395563818,0 +-50.20963425957216,-23.90467564794674,0 +-50.2164659486519,-23.91351191807615,0 +-50.22973499958773,-23.91622552486512,0 +-50.23202384912837,-23.91918509970278,0 +-50.24130264532438,-23.93310694301288,0 +-50.24524819662216,-23.95122104249208,0 +-50.24546635588398,-23.95729065517483,0 +-50.23822642216849,-23.97060569741898,0 +-50.23554081931997,-23.98886129571697,0 +-50.23797472232343,-23.99587517886625,0 +-50.24931064840319,-24.01130684929569,0 +-50.25524568536886,-24.0272650746581,0 +-50.24992970581524,-24.03446221603281,0 +-50.24907126563535,-24.04354786838189,0 +-50.2494480609688,-24.05762819277576,0 +-50.25210413208619,-24.0746580926839,0 +-50.25156918501651,-24.09680344591235,0 +-50.24512135174105,-24.10300900221854,0 +-50.23885402560564,-24.11623921921307,0 +-50.23392402946588,-24.13743561991565,0 +-50.22780456939005,-24.15260339199938,0 +-50.22466995781084,-24.15768611360405,0 +-50.21315574743126,-24.17599343687041,0 +-50.20923211583494,-24.19211556978177,0 +-50.20934235527564,-24.19611949768466,0 +-50.22442774385792,-24.2267757983798,0 +-50.23247379383227,-24.24057595466972,0 +-50.24236394449313,-24.2413280870049,0 +-50.24489981500443,-24.25425751839206,0 +-50.23647454932551,-24.2664625034764,0 +-50.25103830272506,-24.27709110038379,0 +-50.26783896106589,-24.28569754981102,0 +-50.27231246034816,-24.2875945006703,0 +-50.28136151356059,-24.2953803265808,0 +-50.29723079661239,-24.31000810389564,0 +-50.30320179032832,-24.32389256775041,0 +-50.30471704551917,-24.33589110495683,0 +-50.30945675711556,-24.34580451328813,0 +-50.32075584417625,-24.35455036607547,0 +-50.32664076564011,-24.36544763271572,0 +-50.33406154937333,-24.3883736021171,0 +-50.33530525215783,-24.39236398129735,0 +-50.34317416740973,-24.40487548582638,0 +-50.36336295946904,-24.41737745199247,0 +-50.37892709162717,-24.42298055277758,0 +-50.3866514799009,-24.42378102807301,0 +-50.39449552886042,-24.42858310986059,0 +-50.41572802220585,-24.43904804942435,0 +-50.4260104559989,-24.45080309450307,0 +-50.42723891421877,-24.45477868408937,0 +-50.43434045768373,-24.47162555152742,0 +-50.43903823329807,-24.48152974391154,0 +-50.44656773330485,-24.50938387621886,0 +-50.44676702387994,-24.51538517906239,0 +-50.44614807302157,-24.53042771924719,0 +-50.44884973180005,-24.54639992991335,0 +-50.45272419747523,-24.56433897872897,0 +-50.45543484828373,-24.58030678816108,0 +-50.45045304530614,-24.59751718599739,0 +-50.44765224087996,-24.61364675349527,0 +-50.45066636670589,-24.63859755635753,0 +-50.45092581869957,-24.64659791246225,0 +-50.44532072973383,-24.67775966378671,0 +-50.4467142681093,-24.68672523409875,0 +-50.44644654694691,-24.71159339832371,0 +-50.45394947986902,-24.73943433869773,0 +-50.45680430466172,-24.75938968963452,0 +-50.46186372477521,-24.7782763275634,0 +-50.46815072003206,-24.80211234525493,0 +-50.47397364047538,-24.81196127359228,0 +-50.47989397559038,-24.82480971783005,0 +-50.46783280466623,-24.86113938072834,0 +-50.44418440148409,-24.87735921768159,0 +-50.43482325752935,-24.89547909535349,0 +-50.42848042934443,-24.90458526506148,0 +-50.42775777783604,-24.91662460099849,0 +-50.42801318941851,-24.92463993167224,0 +-50.42177362594831,-24.93683866484437,0 +-50.40607913300423,-24.96432233379475,0 +-50.39645907996238,-24.97458683279183,0 +-50.38469178720248,-24.98690918762439,0 +-50.36979824147666,-25.00532188642465,0 +-50.36001516207288,-25.01058025279861,0 +-50.3446716589979,-25.01399610972277,0 +-50.32832671753423,-25.02044023312144,0 +-50.31628103742538,-25.02375208909015,0 +-50.29891034282652,-25.03419591207201,0 +-50.28571981509729,-25.03652970403076,0 +-50.27584072277502,-25.03877923832107,0 +-50.27167896381773,-25.04788907541855,0 +-50.28511565551932,-25.05355959160337,0 +-50.2906369699805,-25.05342041579646,0 +-50.30637819214233,-25.06203550592418,0 +-50.33212407464978,-25.07239705578897,0 +-50.33985538494959,-25.07219989391874,0 +-50.35654886485382,-25.07577842703631,0 +-50.37210691244857,-25.07838282402404,0 +-50.38094342015209,-25.07815508309961,0 +-50.39868189265615,-25.07969974622844,0 +-50.41336096958196,-25.0893327421736,0 +-50.42242190232403,-25.09610628471608,0 +-50.44193823193916,-25.11862659538638,0 +-50.45024915994422,-25.13643145231066,0 +-50.45366056997431,-25.13934584018875,0 +-50.46916118432549,-25.13992960547029,0 +-50.48816530032597,-25.14642695104323,0 +-50.51144616938577,-25.14879507811539,0 +-50.52930178355486,-25.15431260381725,0 +-50.55520049778086,-25.16862964192903,0 +-50.56424105264664,-25.17439428179092,0 +-50.58392907227313,-25.19991847001355,0 +-50.60346463240229,-25.20849874822977,0 +-50.61163768590769,-25.22127878291638,0 +-50.61639462325304,-25.23115479631661,0 +-50.62222343225409,-25.2400036703059,0 +-50.63261536032535,-25.2527268026497,0 +-50.64086891145615,-25.26751207193902,0 +-50.64781540030094,-25.27632987607368,0 +-50.64926317221456,-25.2863024096581,0 +-50.6464075364874,-25.30040009643701,0 +-50.63691808167533,-25.31467799759447,0 +-50.62854045135255,-25.32892844511463,0 +-50.61911470599486,-25.34520811772464,0 +-50.61535537242443,-25.36533755577538,0 +-50.61444883404928,-25.37137036692981,0 +-50.61310361358937,-25.39744259541182,0 +-50.61619375901606,-25.42341146318692,0 +-50.61888192186189,-25.43737135658411,0 +-50.63420417657992,-25.4651413325488,0 +-50.64026529453844,-25.47904878803113,0 +-50.64393268538684,-25.48799817678671,0 +-50.64658169128452,-25.50092832478689,0 +-50.65241619095156,-25.50976719313122,0 +-50.6609387048678,-25.53254196675458,0 +-50.66151211293784,-25.54953928685887,0 +-50.66292333747906,-25.55850774576651,0 +-50.67353483044123,-25.57723380202556,0 +-50.68420837445356,-25.59797975900356,0 +-50.69453305495399,-25.60771551842801,0 +-50.7045219337664,-25.60743695515268,0 +-50.72012841764726,-25.60899721566336,0 +-50.72688880625805,-25.61180606604941,0 +-50.74747281249266,-25.62922878268499,0 +-50.76132930018535,-25.644835157798,0 +-50.76264665527786,-25.6508025890996,0 +-50.76753275574058,-25.66366966691492,0 +-50.77123739410609,-25.67363719799937,0 +-50.77952542584638,-25.68841183797748,0 +-50.78934319744598,-25.71515242845155,0 +-50.80339049467185,-25.73575324109227,0 +-50.80918396490441,-25.74258833724912,0 +-50.82525368845784,-25.75714013254164,0 +-50.82984001703061,-25.76101983200329,0 +-50.83809247208988,-25.7738321783766,0 +-50.83309962262069,-25.7890540248496,0 +-50.83109553658316,-25.79513263662196,0 +-50.82081512558748,-25.81851318612431,0 +-50.82082796529891,-25.85214672120275,0 +-50.82600322556837,-25.8730213769891,0 +-50.83376654057859,-25.90481994796338,0 +-50.8324661538529,-25.9318552232091,0 +-50.82518574938811,-25.9460676314821,0 +-50.82591270936136,-25.96509898522491,0 +-50.82098541960943,-25.98132698864305,0 +-50.82022866634259,-25.99136775219718,0 +-50.81745576177958,-26.00747449322476,0 +-50.81001524600603,-26.01770290488272,0 +-50.79700830901764,-26.02809474901062,0 +-50.79047096983829,-26.03229644539099,0 +-50.78073310853473,-26.04060280785772,0 +-50.76786095196454,-26.05501967950964,0 +-50.7626765534222,-26.0662053439991,0 +-50.75874482659467,-26.08136950307582,0 +-50.77354344545475,-26.09043951809891,0 +-50.80537042592636,-26.09669838263024,0 +-50.82372058971408,-26.10628768808953,0 +-50.82618639326362,-26.11228275385414,0 +-50.83554276191538,-26.12212382403363,0 +-50.85157313043975,-26.12975042037399,0 +-50.87464383591104,-26.14525804272508,0 +-50.89536997728458,-26.15780698516131,0 +-50.91829296751938,-26.16828778328455,0 +-50.92763063049005,-26.17712069519526,0 +-50.95287076107375,-26.1895433208045,0 +-50.96415864190084,-26.19023371911233,0 +-50.97991485618699,-26.18979932972861,0 +-51.0001308561886,-26.18917714050046,0 +-51.01718673244082,-26.19465395953976,0 +-51.03086276570831,-26.19752434783397,0 +-51.04894170139551,-26.20079518799559,0 +-51.08061636550098,-26.20488185079117,0 +-51.08507672459645,-26.20373470151428,0 +-51.10194693290083,-26.20321498902413,0 +-51.11094506546872,-26.20293696958149,0 +-51.12730278702854,-26.21860256542886,0 +-51.13544333403755,-26.22648815643808,0 +-51.17530790699219,-26.24458849969716,0 +-51.19343859191383,-26.27727332870936,0 +-51.19809078943538,-26.28115806631382,0 +-51.21861525621764,-26.28756480435179,0 +-51.23952860211041,-26.30404558674251,0 +-51.23967872217753,-26.30807439233428,0 +-51.2590395862158,-26.31553163381923,0 +-51.26027230004743,-26.31851656724124,0 +-51.26602227620442,-26.3525887855096,0 +-51.26056771402332,-26.35679125568904,0 +-51.26086585634042,-26.36483740194953,0 +-51.26264713628188,-26.37891894041464,0 +-51.28126762865014,-26.3934665935578,0 +-51.2919874143882,-26.40825190100709,0 +-51.30518934571583,-26.42900300285045,0 +-51.31343092350321,-26.43781952305684,0 +-51.32086835130232,-26.45571315533414,0 +-51.3240355420026,-26.48075992780304,0 +-51.3440464332058,-26.50131618411288,0 +-51.3499076150127,-26.50717236524622,0 +-51.36275132590908,-26.51884394106456,0 +-51.3743886726222,-26.52853542092275,0 +-51.38033940253582,-26.53640660272864,0 +-51.40901273126909,-26.54714275336677,0 +-51.42698434169392,-26.54656241065237,0 +-51.43489357141436,-26.54729544454383,0 +-51.46194728661101,-26.57663486127117,0 +-51.4857501788441,-26.61223352331704,0 +-51.50393657002749,-26.61975469093838,0 +-51.52262591163538,-26.63617793565008,0 +-51.54377776970963,-26.65754981009188,0 +-51.55793397084791,-26.67415903259472,0 +-51.57901359098103,-26.69251854892758,0 +-51.59417689789655,-26.70405646862397,0 +-51.60107071941297,-26.70683565710435,0 +-51.61042651166001,-26.71455755046219,0 +-51.63031106458855,-26.73197500668828,0 +-51.64177877078715,-26.73661098677723,0 +-51.65437588752624,-26.7412082092628,0 +-51.67807190782658,-26.76654655829896,0 +-51.68163308654329,-26.77044857089306,0 +-51.68666499983322,-26.78234587141434,0 +-51.70549102508901,-26.79861234989723,0 +-51.71712962623875,-26.80725848464933,0 +-51.73825715039747,-26.82762129644705,0 +-51.73669430250951,-26.84376157245801,0 +-51.74862752223228,-26.85943044864885,0 +-51.76069705223662,-26.87811569683923,0 +-51.77025682433049,-26.89085646472733,0 +-51.79147854541904,-26.91124492900808,0 +-51.79733560571101,-26.91607002496057,0 +-51.81130447705023,-26.92563960512773,0 +-51.8231102824615,-26.93729566631164,0 +-51.82923781455613,-26.94814512956345,0 +-51.83766520204537,-26.95991819631445,0 +-51.85411880689788,-26.97442212659672,0 +-51.8616688359655,-26.99228531480852,0 +-51.87339110674046,-27.02819267849731,0 +-51.88354555362594,-27.05418578570814,0 +-51.89486185223527,-27.08143498768741,0 +-51.90248432795327,-27.09936341260786,0 +-51.90775392051825,-27.11531937900868,0 +-51.92091529287443,-27.12995135739697,0 +-51.91457028172161,-27.14028287555901,0 +-51.91044921040539,-27.14948579816599,0 +-51.90690223408222,-27.1713055138537,0 +-51.91206505732912,-27.18522167377262,0 +-51.92944286060283,-27.19266779313831,0 +-51.93893057138867,-27.20140252351404,0 +-51.95296295830583,-27.20998268332891,0 +-51.9554645806941,-27.21493769843977,0 +-51.95307889098036,-27.2372280432069,0 +-51.95335714030137,-27.24327895122801,0 +-51.95950415443994,-27.25316396487515,0 +-51.97522192532,-27.27282383358198,0 +-51.98266269840363,-27.28571228787788,0 +-51.99025568138681,-27.30164340284512,0 +-51.98419226360438,-27.31808787706949,0 +-51.96187671371061,-27.32905016917864,0 +-51.95910917568442,-27.34336349260204,0 +-51.97102600196941,-27.35409469984969,0 +-51.99102171717999,-27.36655844371805,0 +-51.98807021970157,-27.37681986741958,0 +-51.9790854596449,-27.38019683517868,0 +-52.00239560360812,-27.39141411059712,0 +-52.02225527985939,-27.40179730428675,0 +-52.02772521074544,-27.42087749299548,0 +-52.03627293745507,-27.43556275645449,0 +-52.06471892754654,-27.43546388082387,0 +-52.07510517428717,-27.4390806853874,0 +-52.08596369591103,-27.45183043825736,0 +-52.0933295394377,-27.46270095465443,0 +-52.11160563008135,-27.48541056867231,0 +-52.12117638349541,-27.49323730922166,0 +-52.13999197445187,-27.50469542509737,0 +-52.15643262621214,-27.5170975095142,0 +-52.18927817883001,-27.53608777222386,0 +-52.20337166001739,-27.55543751668426,0 +-52.22370405720026,-27.57489585390001,0 +-52.22726961269838,-27.57779755434086,0 +-52.23722155271159,-27.59557222912533,0 +-52.2355888516565,-27.60878192952502,0 +-52.23994656242244,-27.62784463467979,0 +-52.24825828091866,-27.63459795810189,0 +-52.2787245643171,-27.65158642974483,0 +-52.28750384682064,-27.6674440463315,0 +-52.28869657679522,-27.6914409323681,0 +-52.28473352929302,-27.7037182925969,0 +-52.28121314090431,-27.72507873022811,0 +-52.27630511418135,-27.74143717473697,0 +-52.26916534105301,-27.75889025500826,0 +-52.26286530014973,-27.77025234555134,0 +-52.26338849605327,-27.78137726744971,0 +-52.26179217442469,-27.7955932842052,0 +-52.2616897436946,-27.8161494044282,0 +-52.25919156409789,-27.81917423105003,0 +-52.25672231687845,-27.82278358018324,0 +-52.24718738536041,-27.83076272879967,0 +-52.23819574587092,-27.8363763546583,0 +-52.23471723921215,-27.84646370261221,0 +-52.23161290901901,-27.85068055859227,0 +-52.22945564744424,-27.86071674723861,0 +-52.22594744701176,-27.87021799486214,0 +-52.22022881277334,-27.8792125477064,0 +-52.21584490117523,-27.8870008961408,0 +-52.21607336394269,-27.89168424687908,0 +-52.21792602207645,-27.90216933658487,0 +-52.22103120050669,-27.91084369107032,0 +-52.22335253842152,-27.91720115884894,0 +-52.22470751420659,-27.93121700221447,0 +-52.21835856691089,-27.93851256174629,0 +-52.22015464962071,-27.94782145184537,0 +-52.22383892446445,-27.95470588767785,0 +-52.22788607829893,-27.96919718966786,0 +-52.22710940991733,-27.98096197049224,0 +-52.22764300626105,-27.99208482283882,0 +-52.22991716253182,-27.99907280748621,0 +-52.2417544188299,-28.01279946948446,0 +-52.24184142330699,-28.01455571992911,0 +-52.23614597563724,-28.02064787483821,0 +-52.23123044896562,-28.02905561028407,0 +-52.24094861477058,-28.0368785596389,0 +-52.24574500096845,-28.03962260634149,0 +-52.24860193299273,-28.04361939113844,0 +-52.25868674133972,-28.05791026513305,0 +-52.26467358870068,-28.07118257867658,0 +-52.26785671845858,-28.08162303693586,0 +-52.26887089769191,-28.08862357410081,0 +-52.27456714204509,-28.09603430541173,0 +-52.2819124893334,-28.10983012216357,0 +-52.2850953319971,-28.12026177845372,0 +-52.2873797842369,-28.12603653645106,0 +-52.29203010586029,-28.1393389072012,0 +-52.29846092219475,-28.14846964388596,0 +-52.30479780357555,-28.15584691536471,0 +-52.3048843239864,-28.15760193592811,0 +-52.3093794648336,-28.16798117007836,0 +-52.31352930672666,-28.17134053686562,0 +-52.32180220872118,-28.17747493332851,0 +-52.33007759390402,-28.18361042352494,0 +-52.34202084526577,-28.19664568015138,0 +-52.34929610659859,-28.2092739531513,0 +-52.35654187663145,-28.22132520659957,0 +-52.36760198352717,-28.22971749054982,0 +-52.38439547779892,-28.24612144404785,0 +-52.39466339956918,-28.25160135797196,0 +-52.40363322540479,-28.25771939543483,0 +-52.41333007433183,-28.26498548073459,0 +-52.41602089845563,-28.26546926181884,0 +-52.43023295121947,-28.26963310990178,0 +-52.43961144921416,-28.27045238268202,0 +-52.4403070748788,-28.27101427171419,0 +-52.44868686155586,-28.27834517373467,0 +-52.45089537149402,-28.2823813527576,0 +-52.46209694698852,-28.29255242044457,0 +-52.46285410124317,-28.29429030997078,0 +-52.4710244115805,-28.30483062717384,0 +-52.48552905015774,-28.3148253679197,0 +-52.4959616150596,-28.33673736942097,0 +-52.49700749209079,-28.34433733322324,0 +-52.50272054974068,-28.35175375458407,0 +-52.50977418948485,-28.35911837732645,0 +-52.52037647281873,-28.37045942669588,0 +-52.52197931788628,-28.37568974935023,0 +-52.5255844208958,-28.38084051148027,0 +-52.53009735971542,-28.3906622112251,0 +-52.53379577347733,-28.39757431084173,0 +-52.53807186253697,-28.40269830687646,0 +-52.542985761327,-28.40720828636869,0 +-52.54808163814278,-28.41524148949998,0 +-52.55190386818548,-28.42450322284734,0 +-52.55169044520353,-28.43333960699059,0 +-52.5511741127084,-28.43630318379481,0 +-52.55153753042472,-28.44335153378057,0 +-52.55229490899369,-28.45803710571261,0 +-52.55882225752902,-28.46778172534613,0 +-52.56604711152966,-28.47809909604151,0 +-52.56650067363386,-28.48692796648836,0 +-52.56853221049781,-28.50042435478329,0 +-52.56862293529933,-28.50219225189237,0 +-52.57046477631574,-28.51144708995281,0 +-52.57126856133588,-28.51662903064525,0 +-52.57478732621538,-28.52265485695126,0 +-52.59056563900872,-28.54524268447035,0 +-52.59500840812179,-28.55785656011952,0 +-52.5958715308463,-28.56397962880759,0 +-52.59672793859914,-28.57011085442515,0 +-52.59828618270137,-28.58006217691351,0 +-52.60194785360062,-28.58849013481997,0 +-52.60660684889572,-28.60541494035152,0 +-52.6068292517939,-28.60968136665029,0 +-52.60824246662456,-28.61576138173342,0 +-52.61306125536875,-28.62503515349309,0 +-52.61394845568274,-28.63164276997769,0 +-52.61436973885488,-28.6396978998111,0 +-52.61449364548256,-28.64206716648124,0 +-52.61059472434538,-28.65594934482022,0 +-52.61099154511501,-28.66352014339422,0 +-52.61116838315154,-28.66685178982839,0 +-52.60882325338638,-28.67360602637462,0 +-52.60802213655857,-28.6788740002496,0 +-52.60176422187774,-28.682963397604,0 +-52.59336103874588,-28.68755717266152,0 +-52.58712320253814,-28.69165934614322,0 +-52.58414923162277,-28.69653090431842,0 +-52.5812468875279,-28.70281131659826,0 +-52.57464539912107,-28.71020577568267,0 +-52.57101456611783,-28.71272921168979,0 +-52.56287882574052,-28.7247802300666,0 +-52.56037938588991,-28.72867144784853,0 +-52.55796148168136,-28.7339847955573,0 +-52.55503503496497,-28.73886644851049,0 +-52.55183262343655,-28.74848460120063,0 +-52.54568108174151,-28.75393962922065,0 +-52.52739921489633,-28.7636542625785,0 +-52.52340412565908,-28.78882784631543,0 +-52.52101451091026,-28.79458402159153,0 +-52.51573858740018,-28.79620341449561,0 +-52.50790414844468,-28.80075779669986,0 +-52.50104259515432,-28.80386547864871,0 +-52.49320303030438,-28.80937780444195,0 +-52.48535731451409,-28.81489343674077,0 +-52.47548463667876,-28.82020049383742,0 +-52.4955700300106,-28.83503423616074,0 +-52.50952330789497,-28.84620731143418,0 +-52.51889334528801,-28.85495559476393,0 +-52.52199472526792,-28.85743787468099,0 +-52.53803703988432,-28.88025135378551,0 +-52.54457537576494,-28.89171546631647,0 +-52.56177706374402,-28.90795744648479,0 +-52.57400226437394,-28.91396954283396,0 +-52.58521397598448,-28.92914321620842,0 +-52.6025814344863,-28.94797389671955,0 +-52.60906570927763,-28.95813210053712,0 +-52.62891974967486,-28.96774990915802,0 +-52.63539417618968,-28.97790830104394,0 +-52.62246827419158,-29.01618754003529,0 +-52.61368673007889,-29.01914419845528,0 +-52.60330922182359,-29.04819838423609,0 +-52.6041481226803,-29.063792135457,0 +-52.60343167403279,-29.07814991261083,0 +-52.59995100301208,-29.09653181323292,0 +-52.59207555813538,-29.11639948458899,0 +-52.57260457994199,-29.17065301077945,0 +-52.55230966234242,-29.18190359684152,0 +-52.539179281116,-29.18764604325095,0 +-52.5190046189002,-29.20149355028707,0 +-52.50884630243624,-29.20711563939452,0 +-52.49210984333001,-29.22995518846738,0 +-52.46358823221592,-29.22717444300877,0 +-52.45232898858347,-29.24066478794713,0 +-52.44126599469268,-29.25802703825593,0 +-52.43298472524993,-29.27135956626438,0 +-52.43080018232089,-29.28706480438932,0 +-52.4467784468947,-29.30729592569041,0 +-52.47443217369758,-29.32188081143009,0 +-52.49532353799304,-29.32109494879791,0 +-52.52029138415483,-29.31232781996064,0 +-52.5283620565099,-29.32374842702285,0 +-52.53860054590414,-29.34810265899281,0 +-52.53687250120088,-29.37179709530176,0 +-52.53715702086453,-29.37706006484547,0 +-52.54892732413571,-29.40094403146802,0 +-52.55880421976309,-29.4174150926031,0 +-52.55528800604768,-29.4357450542541,0 +-52.55619172629978,-29.45260336548318,0 +-52.55723537033711,-29.47206628791471,0 +-52.55971007875475,-29.49017838999419,0 +-52.540846871223,-29.50266318327959,0 +-52.52769934187582,-29.50970123393174,0 +-52.51059580137465,-29.52730668972598,0 +-52.51045457691715,-29.55342879120508,0 +-52.50785336614734,-29.59012230610799,0 +-52.4991171202334,-29.59569692307276,0 +-52.48027516320967,-29.60951259790761,0 +-52.47207406609547,-29.62552610076949,0 +-52.46864715494841,-29.64659620108593,0 +-52.4591447319143,-29.66659747864309,0 +-52.46048908919983,-29.68089787823133,0 +-52.45848741577885,-29.68217746933621,0 +-52.44686568845666,-29.68382225789433,0 +-52.44919945892755,-29.68914698233031,0 +-52.45747731971414,-29.68943573386948,0 +-52.4657600122184,-29.68972410958317,0 +-52.47060650663981,-29.69014251882354,0 +-52.48893410425188,-29.69298965212925,0 +-52.50572286148488,-29.69654004396167,0 +-52.5161899973778,-29.69854046279452,0 +-52.52732696182684,-29.69990981032183,0 +-52.54189622121746,-29.70053696259658,0 +-52.54949916583746,-29.70023280088666,0 +-52.55441959340384,-29.70184907783183,0 +-52.56132971230925,-29.70157317461516,0 +-52.56961907801342,-29.70124412115944,0 +-52.58637758760916,-29.70420612731133,0 +-52.59397939458766,-29.70390292998958,0 +-52.60902436153776,-29.70027732930638,0 +-52.62343283117218,-29.69788626464203,0 +-52.63434096477956,-29.69447498987355,0 +-52.63987451426583,-29.69425901580236,0 +-52.65568242610714,-29.69182180143376,0 +-52.66736681989772,-29.69014330453884,0 +-52.67500057303738,-29.69043454406591,0 +-52.69151843600967,-29.6885571952385,0 +-52.70790269880413,-29.68427643698457,0 +-52.72059950879865,-29.67593343689324,0 +-52.73774034868475,-29.67401420504373,0 +-52.74969429703452,-29.67105705173486,0 +-52.76408504724493,-29.67282823181264,0 +-52.76793431200824,-29.67749193917733,0 +-52.77780238949524,-29.68796132649704,0 +-52.78906876164021,-29.68560957007333,0 +-52.79592973303061,-29.68472763670367,0 +-52.79994842976772,-29.68216653839859,0 +-52.8133870149338,-29.6804441389542,0 +-52.83402227981394,-29.67960893387567,0 +-52.84033675251676,-29.68114232388348,0 +-52.84595960167975,-29.68270435551563,0 +-52.8519233477969,-29.68961207074703,0 +-52.85773321108054,-29.69348601035878,0 +-52.86406719129072,-29.69690174409201,0 +-52.87114266285337,-29.70090407505344,0 +-52.88547491379992,-29.70994568895853,0 +-52.90679804407641,-29.71990211983768,0 +-52.92219905614467,-29.72285774757083,0 +-52.93351953332397,-29.72717922491057,0 +-52.93910831008453,-29.72813231549863,0 +-52.95255934026582,-29.73355166674818,0 +-52.96487444283182,-29.74324193056384,0 +-52.96315875839616,-29.74935582050878,0 +-52.96340529443366,-29.75357030880131,0 +-52.96872674283989,-29.76177744439486,0 +-52.97038923317405,-29.76653270775812,0 +-52.96935392156552,-29.77260574524396,0 +-52.96928444359403,-29.78345701486445,0 +-52.96918037374584,-29.7937098873475,0 +-52.96942116041625,-29.7979176216304,0 +-52.96756498826876,-29.81423828872958,0 +-52.96810720712502,-29.82384711995622,0 +-52.96960633470177,-29.8382420977468,0 +-52.97070119986439,-29.84542385802643,0 +-52.98111583925156,-29.85823896467992,0 +-52.98411473596727,-29.86232765135245,0 +-52.99083582993973,-29.87107390223111,0 +-52.99851838797217,-29.88458406316801,0 +-53.00163491581757,-29.89045468711355,0 +-53.00416306236525,-29.89815526257709,0 +-52.99464468395513,-29.90157200779387,0 +-52.98652592819282,-29.90491892015475,0 +-52.97550243945223,-29.90598388167725,0 +-52.96108511422938,-29.90839315962699,0 +-52.9445500321054,-29.91028889987941,0 +-52.9247104079754,-29.91533553466819,0 +-52.91439065862038,-29.91697349567024,0 +-52.90618093619268,-29.91912336312593,0 +-52.90114532315943,-29.92836102470354,0 +-52.90726044539176,-29.93833330616448,0 +-52.90977708354144,-29.94604831963866,0 +-52.91575686265747,-29.95361595628755,0 +-52.91955752161926,-29.95947003795368,0 +-52.92715888869817,-29.97117611983793,0 +-52.92420419618649,-29.98032851495586,0 +-52.92395123853172,-29.98816079508267,0 +-52.92258153388639,-30.00084274478784,0 +-52.91991115240284,-30.00275548699231,0 +-52.91533688056308,-30.02019384378039,0 +-52.91231432440064,-30.02816491630769,0 +-52.91150348712312,-30.03842839603393,0 +-52.9044046883736,-30.0482740234485,0 +-52.90397285783553,-30.0530722002203,0 +-52.90099993098805,-30.0621917078163,0 +-52.88808299598731,-30.06755069560059,0 +-52.87926202073638,-30.07153294779591,0 +-52.87120207732412,-30.07668753690078,0 +-52.86994873733256,-30.07914898005792,0 +-52.86715273128494,-30.09131068071185,0 +-52.85934126309944,-30.11331289471826,0 +-52.85485142080194,-30.12012223032643,0 +-52.85178346740734,-30.12747381146296,0 +-52.85125729585894,-30.13050550996014,0 +-52.85192989044404,-30.14251587560022,0 +-52.85517967644674,-30.15080666417136,0 +-52.85787159620138,-30.16152665776357,0 +-52.85880273342517,-30.16569985197861,0 +-52.85329658072747,-30.17916541375282,0 +-52.85016128444135,-30.18531193692689,0 +-52.84594016825279,-30.19691667617933,0 +-52.84415988827007,-30.20240394408545,0 +-52.84268305739054,-30.2132905959152,0 +-52.84163098231172,-30.21934775864862,0 +-52.84023221696776,-30.24405870115148,0 +-52.84271939115364,-30.25117052051879,0 +-52.84374999042017,-30.25714022619824,0 +-52.84464630999831,-30.26071032645495,0 +-52.85704621119488,-30.26600004090735,0 +-52.87359765620193,-30.26533075392912,0 +-52.90873577920969,-30.27104203734017,0 +-52.9286436068484,-30.27164333184822,0 +-52.95176707057049,-30.27067424896541,0 +-52.97488292631416,-30.26969787208295,0 +-52.9908029374663,-30.2590049078192,0 +-53.01184255808698,-30.25095368399938,0 +-53.03000104424459,-30.25017877360667,0 +-53.04659256349127,-30.25090003412558,0 +-53.08358239973597,-30.26075885968229,0 +-53.10240804832273,-30.27138305925552,0 +-53.11949996867483,-30.28064754579247,0 +-53.13477392071196,-30.28712820143239,0 +-53.15881262641962,-30.30180627249943,0 +-53.16558532593124,-30.30437035326817,0 +-53.20440065002203,-30.31696640418837,0 +-53.23445055113383,-30.32136111705927,0 +-53.25120963413531,-30.32490759669739,0 +-53.28150747188064,-30.3335795311467,0 +-53.31187773796078,-30.34367212912998,0 +-53.32055049442907,-30.35042849353692,0 +-53.34110418917211,-30.36236548558798,0 +-53.36139416265758,-30.37002441888355,0 +-53.36988993199179,-30.37392528322847,0 +-53.37500162553965,-30.4036567146529,0 +-53.35548665180158,-30.43592251166929,0 +-53.35496518240296,-30.45449253570148,0 +-53.35878327005759,-30.46287868034393,0 +-53.36086632568662,-30.49702070125364,0 +-53.37032936995747,-30.5165558601984,0 +-53.37311018376468,-30.53497030730533,0 +-53.3751951885882,-30.54200546720107,0 +-53.39048482611511,-30.57552217528399,0 +-53.39804077643683,-30.59085064071681,0 +-53.40046816804782,-30.60355987847041,0 +-53.39586472189721,-30.60947613811667,0 +-53.38873779902046,-30.62833319559189,0 +-53.38961785581093,-30.64255956492304,0 +-53.40289525099152,-30.66911117718826,0 +-53.42584984349128,-30.69095331935465,0 +-53.44782754776791,-30.69711524583725,0 +-53.47174680146075,-30.70748098657411,0 +-53.49393097859016,-30.71649450690618,0 +-53.51465508401652,-30.7284370974206,0 +-53.52903874415663,-30.74496570836649,0 +-53.54869093841441,-30.7655561460077,0 +-53.56096187546378,-30.77502154653221,0 +-53.5788766359902,-30.79425819558709,0 +-53.58821622171301,-30.80959280155652,0 +-53.59838828088606,-30.8454002320818,0 +-53.60234871988533,-30.85522512163139,0 +-53.60888717300555,-30.87922489491356,0 +-53.61976280875478,-30.8930127368995,0 +-53.62593738340964,-30.91130475976143,0 +-53.62740996949621,-30.93410048416152,0 +-53.63119200917075,-30.94107121335466,0 +-53.63709943475973,-30.95509388709469,0 +-53.65011117401529,-30.97592627809253,0 +-53.65786529929505,-30.99271087119303,0 +-53.66571285586132,-31.01091442482523,0 +-53.68344209435197,-31.05291813177554,0 +-53.69064057968257,-31.06114192864359,0 +-53.7145487192792,-31.09567990149568,0 +-53.73004783338259,-31.10349851145007,0 +-53.75531879856181,-31.10799233517922,0 +-53.76546386306577,-31.11035695211918,0 +-53.79157667825704,-31.12763039770932,0 +-53.80560760870279,-31.13835404704343,0 +-53.82205579915457,-31.1603615906737,0 +-53.83130141427628,-31.17416519825096,0 +-53.83898331031544,-31.18946943155675,0 +-53.8545434382315,-31.22291602912002,0 +-53.86186409490799,-31.23254186155172,0 +-53.89305403321801,-31.24956835704492,0 +-53.91213392878427,-31.26005334796078,0 +-53.918198159579,-31.27545561682758,0 +-53.91907504653423,-31.28825872069463,0 +-53.93200751719561,-31.30619311411221,0 +-53.95779040054992,-31.3163655817608,0 +-53.9798534744638,-31.32100131686024,0 +-53.98898496055521,-31.33198570668859,0 +-54.01156293251236,-31.34374096368732,0 +-54.02925033675135,-31.35716854492911,0 +-54.04426288654708,-31.35642471154866,0 +-54.06468862680634,-31.36113120408532,0 +-54.08355502392907,-31.36734476249141,0 +-54.11661116067729,-31.38429796791781,0 +-54.12432925703195,-31.39822898196861,0 +-54.13246897004749,-31.41787230203731,0 +-54.13528762381608,-31.43349057252733,0 +-54.134346877416,-31.44356869072504,0 +-54.13931727833307,-31.46767943844502,0 +-54.14591455948565,-31.49021802170127,0 +-54.14729492729806,-31.51016759503294,0 +-54.13853127958076,-31.5292131464888,0 +-54.1334129642409,-31.55235226886634,0 +-54.13449545023996,-31.56802093467212,0 +-54.14138868633556,-31.59482369665701,0 +-54.1425721462457,-31.61191278095147,0 +-54.1486849663457,-31.62731785193958,0 +-54.15175225342169,-31.64716445486893,0 +-54.15535172583424,-31.67412421235136,0 +-54.15636652028277,-31.68835985777124,0 +-54.15758473012563,-31.70544388791636,0 +-54.15829567822589,-31.7154102119651,0 +-54.15931149124384,-31.72964848857315,0 +-54.15285460438503,-31.75712917380213,0 +-54.15229369702745,-31.77287865291467,0 +-54.1512248407357,-31.78150816864424,0 +-54.15366237774519,-31.81569021432627,0 +-54.16390411916464,-31.84091283856301,0 +-54.17257726984239,-31.86765137668379,0 +-54.16321483913237,-31.87813410160174,0 diff --git a/R-utils/roads/br156.csv b/R-utils/roads/br156.csv new file mode 100644 index 000000000..e434ee383 --- /dev/null +++ b/R-utils/roads/br156.csv @@ -0,0 +1,1055 @@ +-51.07975599848885,0.03819639222563976,0 +-51.08867149998988,0.0369640890181545,0 +-51.09427474199221,0.03557207231735022,0 +-51.09938060736533,0.03304789290710179,0 +-51.10608922950833,0.03170880409889883,0 +-51.11105950458683,0.03194851757093016,0 +-51.11716154962724,0.0316891886871758,0 +-51.1237610342268,0.03256284464497528,0 +-51.12817868370115,0.0327772062134269,0 +-51.13406085319752,0.03694200653650192,0 +-51.1349181065531,0.04197094494048109,0 +-51.13519944923884,0.04752075410357408,0 +-51.13550979144972,0.05251593090771179,0 +-51.13516046613852,0.05969256754239436,0 +-51.13541708247804,0.06579192123290251,0 +-51.13509338314128,0.07241790425483598,0 +-51.13476582247844,0.07904709878649165,0 +-51.13222824254711,0.08556968253444958,0 +-51.13066270564828,0.09490334632415237,0 +-51.13039248320337,0.1004241680081649,0 +-51.12843787955123,0.1064171668954894,0 +-51.13211484897046,0.1104684121120738,0 +-51.13686641281035,0.1151268819585822,0 +-51.14156325637118,0.1208895544018653,0 +-51.1429467511557,0.1264911949272131,0 +-51.14430370743585,0.1326442639221276,0 +-51.14511405095459,0.1387686928165803,0 +-51.14531875156226,0.1459703879547185,0 +-51.1400278329538,0.1523518588819913,0 +-51.13305191871783,0.1592047142811956,0 +-51.12844228923587,0.1628533726891884,0 +-51.1254633620146,0.1671341215832403,0 +-51.12406055010812,0.173150753326044,0 +-51.12262937039932,0.179718553000452,0 +-51.12072695519903,0.1846033128353669,0 +-51.11659095800797,0.1899317507774684,0 +-51.11193173471485,0.1946814064239428,0 +-51.10666818799073,0.200507568729225,0 +-51.1029809718218,0.2080701127153893,0 +-51.10102884724419,0.2140575213974418,0 +-51.10073004518466,0.2201238021451829,0 +-51.09883387740889,0.2250090971360603,0 +-51.09693767060594,0.2298945307696932,0 +-51.09432887373835,0.2380640182892825,0 +-51.09180028850386,0.2445782545239878,0 +-51.08761627107975,0.2510118151268732,0 +-51.0839303113749,0.2585762793494684,0 +-51.08305715415651,0.2651728708250263,0 +-51.08276376756249,0.2712473957916239,0 +-51.08360078580242,0.2768242476857802,0 +-51.08330733680754,0.2828998553988706,0 +-51.08359188334589,0.2884492360579294,0 +-51.0849002585241,0.2957102241390198,0 +-51.08626222317498,0.3018672396898835,0 +-51.08599486971511,0.3073907266013676,0 +-51.08680700248429,0.3135273140862895,0 +-51.08704057779701,0.3201908710080862,0 +-51.08790605418793,0.3252234238970692,0 +-51.08813527861271,0.3318750424383954,0 +-51.08799968730735,0.3346317390959731,0 +-51.09022357828056,0.3561592052363873,0 +-51.08714161328153,0.362645761677404,0 +-51.08077612750463,0.3684201362056512,0 +-51.07562522972594,0.3720372577678259,0 +-51.06989552103242,0.3761792559684632,0 +-51.06642485115279,0.3793270624181633,0 +-51.06226600498633,0.3852090515282681,0 +-51.05926402861336,0.3900416868868399,0 +-51.05618119943964,0.3965291592079466,0 +-51.0525487107757,0.4029871889888171,0 +-51.0505976407044,0.4089743322933104,0 +-51.05035655293191,0.4139374581221783,0 +-51.05163693851313,0.4217387223476928,0 +-51.05189427480138,0.4278326072063199,0 +-51.04997128970321,0.4332680115576221,0 +-51.04915174393977,0.4387574665801756,0 +-51.05285348113347,0.442255749807779,0 +-51.05821098602917,0.4458350474536928,0 +-51.06193626607303,0.4487811376064368,0 +-51.06894405869904,0.4524397524655641,0 +-51.07537302938526,0.456622823684244,0 +-51.08017391490875,0.4601734489007256,0 +-51.08652029439848,0.4660100545807062,0 +-51.09134800051057,0.469008780773349,0 +-51.09667242832965,0.4731368618431409,0 +-51.10028745851395,0.4782866050809716,0 +-51.10450816016785,0.4823602303673611,0 +-51.10928465542457,0.4864629517395389,0 +-51.11133226436777,0.4898809370897038,0 +-51.11492920139607,0.4955870781108629,0 +-51.11797471622382,0.501266796472062,0 +-51.12325453146461,0.5065035033457281,0 +-51.127454945685,0.5111329737561391,0 +-51.13054715889183,0.5157052041468492,0 +-51.1313799589192,0.5212734873978087,0 +-51.13163440158816,0.5273664640298887,0 +-51.13469956407739,0.5324896790310959,0 +-51.13781853323994,0.5365097536745904,0 +-51.14251300066357,0.5422661272982636,0 +-51.14624059072626,0.5452128176076989,0 +-51.15328608173412,0.555331826388977,0 +-51.15976734537283,0.5584106347561827,0 +-51.16454184394425,0.562512006121645,0 +-51.16923639598689,0.5682676994488377,0 +-51.1729080536973,0.5723153283389861,0 +-51.1770762211616,0.5774923726238198,0 +-51.1813250756329,0.5810153675036909,0 +-51.18552097675308,0.5856413360699801,0 +-51.19137177735445,0.5903479779154741,0 +-51.19352369531983,0.591558210279765,0 +-51.19990044496443,0.5968430569190676,0 +-51.20577992712681,0.6009979858019505,0 +-51.21118991257815,0.6034714475494229,0 +-51.21712707932927,0.6065218749044688,0 +-51.22088277694087,0.6089135434417426,0 +-51.22681737285932,0.6119625836107782,0 +-51.23327439064767,0.6155889418963947,0 +-51.23922758936132,0.6180899140143271,0 +-51.24677506780407,0.6217829961622678,0 +-51.25275759188514,0.623736260813109,0 +-51.26034307538109,0.6268703198767587,0 +-51.26682605388282,0.6299467648472528,0 +-51.27118330605677,0.6312624622062082,0 +-51.281546875085,0.6339645909041448,0 +-51.28923764853467,0.6348931352393227,0 +-51.29751197520274,0.635303852067186,0 +-51.30192194703445,0.6355179006737077,0 +-51.30795835724873,0.6363632618530731,0 +-51.3150696520902,0.6378130555058462,0 +-51.31997303128644,0.6391533566324056,0 +-51.32974957110918,0.6423836867425141,0 +-51.34451792172438,0.645878156608256,0 +-51.35099974578739,0.6489568310240947,0 +-51.35577188325636,0.6530560812537893,0 +-51.35828249199103,0.6581485055930993,0 +-51.36245943214648,0.6633302371310495,0 +-51.36718482446611,0.6685369344885509,0 +-51.37027953434061,0.6731094067804679,0 +-51.37279697970931,0.6782071515066037,0 +-51.37641871238467,0.6833598979018539,0 +-51.37951563758674,0.6879344323649431,0 +-51.38424106150305,0.6931418788623208,0 +-51.38789009304865,0.6977440209106107,0 +-51.3926692429855,0.7018488307038028,0 +-51.39525739849386,0.7052845404213287,0 +-51.36937813884603,0.7138543610910106,0 +-51.35972565029769,0.7162501963736911,0 +-51.34807841632759,0.7204565500507968,0 +-51.33738776308883,0.7247027882241311,0 +-51.32955031283468,0.7290865240991707,0 +-51.32247957084131,0.737317215114856,0 +-51.31455122039753,0.7435994690658915,0 +-51.30282036561827,0.7496956100047556,0 +-51.29489120513318,0.7559783767445919,0 +-51.28601113053392,0.7622148052837869,0 +-51.2781276529242,0.7675472077100516,0 +-51.27019756410469,0.7738306226826979,0 +-51.25941466302213,0.7799747618989392,0 +-51.25071820718924,0.7824088422611474,0 +-51.24102389868773,0.7857473681665175,0 +-51.23037831661392,0.7890400509105467,0 +-51.21882727441312,0.7913352818624093,0 +-51.20908457139903,0.795624820028777,0 +-51.19920172184549,0.8027671693971933,0 +-51.19493236622549,0.8120903281857543,0 +-51.19446767964043,0.8215995727317944,0 +-51.19395651060724,0.8320602450480586,0 +-51.19349247102659,0.8415703468935944,0 +-51.19298308580452,0.8520314487925054,0 +-51.19252000017472,0.8615414566851056,0 +-51.1920106145947,0.8720023562979281,0 +-51.19159399317788,0.880561092432063,0 +-51.19094688396864,0.8938735643190991,0 +-51.19053089787201,0.9024312291887228,0 +-51.19002252214689,0.9128902000109842,0 +-51.18956034447302,0.9223980113820581,0 +-51.18724163005367,0.9308631220005545,0 +-51.17907551653863,0.9419059171594131,0 +-51.16842367403314,0.9452059417926815,0 +-51.15695749973079,0.9456080803198492,0 +-51.14458253980254,0.9450151461486138,0 +-51.13601320316741,0.944605217496149,0 +-51.12702748895504,0.9527547218706995,0 +-51.11817920025382,0.9580517763215759,0 +-51.10733247421786,0.9651608388715694,0 +-51.09733959577532,0.974223082151213,0 +-51.08906216729348,0.987186251445814,0 +-51.08959416069354,0.9957985836269942,0 +-51.09007968633568,1.005362735876167,0 +-51.08965911472876,1.013930057220935,0 +-51.08909832225734,1.025353614631464,0 +-51.08386626334082,1.034648480227186,0 +-51.07949315929972,1.04589356194781,0 +-51.07416523904433,1.057096302230598,0 +-51.06802090474991,1.065402243744516,0 +-51.06073402463573,1.077475384620413,0 +-51.054494588064,1.087688468949138,0 +-51.05020812431617,1.097039971746828,0 +-51.04473084946333,1.111114493023438,0 +-51.04244486098982,1.118651909146436,0 +-51.0320323602528,1.140615153052909,0 +-51.02681219596455,1.149893419466497,0 +-51.02154557475631,1.160121135028266,0 +-51.01732287174801,1.168493652429625,0 +-51.01205599276689,1.178721720442943,0 +-51.00859864541239,1.19094512780521,0 +-51.00808826190022,1.201407174183782,0 +-51.00762498857871,1.210920237416738,0 +-51.00516650409397,1.222241496873089,0 +-50.99904153806634,1.230521697130971,0 +-50.99196442624868,1.238754336920703,0 +-50.98593107221964,1.245131883792264,0 +-50.97708902905609,1.250418666866369,0 +-50.96620368068837,1.258465975072633,0 +-50.95722086708454,1.266607176427552,0 +-50.95285771813473,1.277835003932672,0 +-50.95053718838079,1.286302391349777,0 +-50.94612764550784,1.298481412933927,0 +-50.94408492948474,1.301242031896541,0 +-50.9304633682858,1.323570571203809,0 +-50.92628626592931,1.330994487791472,0 +-50.92097204147128,1.342176902944731,0 +-50.92036892275915,1.354543611696992,0 +-50.92180787507232,1.364149161833055,0 +-50.9240127197132,1.377605398450947,0 +-50.92454671127322,1.386211978573487,0 +-50.92408299205399,1.395722392633537,0 +-50.92239076445746,1.410891319514163,0 +-50.92188301182375,1.421349760342453,0 +-50.9157596992393,1.429627296406945,0 +-50.9088658848732,1.434058220998378,0 +-50.89435409641108,1.438121577712251,0 +-50.88907986740431,1.448354618868306,0 +-50.89056458380023,1.457007844458988,0 +-50.89386059228141,1.467654931262811,0 +-50.89810858993263,1.478346926755036,0 +-50.90240289904244,1.488086737770782,0 +-50.90850003882046,1.499835542354859,0 +-50.91460343921375,1.511572945296386,0 +-50.9189894897058,1.519412922872351,0 +-50.92409455254322,1.53205506546638,0 +-50.92444158787475,1.544468218213216,0 +-50.918313079478,1.552756403608623,0 +-50.90833030490467,1.561814092746821,0 +-50.90686614390254,1.57223629608306,0 +-50.90640042184125,1.581753138865026,0 +-50.90602651450969,1.589372124765198,0 +-50.90922671160055,1.601937462233453,0 +-50.91080360480807,1.608697072142407,0 +-50.91405120621472,1.620312084995403,0 +-50.91634707889987,1.631882866187384,0 +-50.91673886491547,1.643365193845864,0 +-50.91617768318489,1.654810287369634,0 +-50.91566321635727,1.665303709669119,0 +-50.9163817416787,1.67012012434738,0 +-50.90108221760064,1.690673901059641,0 +-50.89495423369029,1.698955578461833,0 +-50.88778156008635,1.709093166619128,0 +-50.88174588966489,1.715472133196986,0 +-50.87348121426844,1.728416701969995,0 +-50.8701147853571,1.738740470792123,0 +-50.86851265731692,1.75201081448821,0 +-50.86786120337618,1.765327623164126,0 +-50.86983283301322,1.783539774835228,0 +-50.87217822965014,1.794140869561278,0 +-50.87433780765916,1.808545520548395,0 +-50.8746398402592,1.821905950488331,0 +-50.87498827072025,1.834314749189217,0 +-50.87447768923038,1.844775191140996,0 +-50.87405803225791,1.853336992433015,0 +-50.87145339436456,1.867518236591782,0 +-50.87012694013721,1.875086731691873,0 +-50.86761413950291,1.887369816138773,0 +-50.86514781673997,1.89870258688393,0 +-50.86463220058409,1.909176750109987,0 +-50.86425716326724,1.916795097446778,0 +-50.86074403286124,1.929990919057586,0 +-50.86027477404536,1.939516762897239,0 +-50.86270939444464,1.948229037818697,0 +-50.8680014257008,1.957079745093894,0 +-50.87819623320911,1.96330169649675,0 +-50.88843798554949,1.968570668448162,0 +-50.89791390504883,1.96998435668591,0 +-50.90866825076128,1.964774100604979,0 +-50.91842269534742,1.960471016383259,0 +-50.92680544619609,1.96469678456952,0 +-50.93409692899154,1.971734943706936,0 +-50.94025058476164,1.982529825610647,0 +-50.94450003410132,1.993231127440396,0 +-50.94607906641536,1.999987686755826,0 +-50.94171315906808,2.011235273687257,0 +-50.93976234237478,2.012097340520033,0 +-50.92030289534806,2.019637225090453,0 +-50.9113163756145,2.02777589584812,0 +-50.90908674129252,2.034340490259885,0 +-50.89954113061693,2.053908215952631,0 +-50.89907627512804,2.063428233589044,0 +-50.895894687683,2.069951904878727,0 +-50.89143592622963,2.083091809973552,0 +-50.88902080659436,2.093468551955384,0 +-50.88850977139452,2.103937781558581,0 +-50.89547496553357,2.117634085880918,0 +-50.89786590603471,2.127288527481634,0 +-50.90111567714777,2.138892016596142,0 +-50.90255454657813,2.148498778187911,0 +-50.90580409712828,2.160101148902692,0 +-50.90838072569433,2.165948741164518,0 +-50.91511180474625,2.184394931809833,0 +-50.91836089848144,2.195995220979296,0 +-50.9205190916774,2.210401018722174,0 +-50.92472025537044,2.222046527449131,0 +-50.92706450584293,2.232647940182561,0 +-50.93240329809731,2.240535288347551,0 +-50.93665070077424,2.251229197367032,0 +-50.94308052941136,2.256309273589583,0 +-50.9462364902594,2.26980921236209,0 +-50.94667667733023,2.280316558621903,0 +-50.94593417124811,2.295534604313811,0 +-50.94637593568591,2.306044706473816,0 +-50.96037640213164,2.31244980632389,0 +-50.96376718992185,2.321197403794588,0 +-50.96348934546862,2.32690570718317,0 +-50.96274831467591,2.342128947597884,0 +-50.96128708804443,2.352549457882676,0 +-50.96087014111307,2.361113631964208,0 +-50.96121987652111,2.373530655856288,0 +-50.96551621562499,2.38327702640914,0 +-50.96696000464345,2.39289398660512,0 +-50.96649955365101,2.402419623829964,0 +-50.96975667963874,2.414039024768315,0 +-50.97510349065173,2.421942160116684,0 +-50.97949799202222,2.429798288105702,0 +-50.98185000753497,2.440421530491909,0 +-50.98225131362111,2.451907158830913,0 +-50.97798121687758,2.461256254997205,0 +-50.97185027091587,2.469557674372785,0 +-50.96372027477308,2.479673574421894,0 +-50.96126069325241,2.491024041644089,0 +-50.96665561946062,2.497979942111411,0 +-50.97427983258986,2.49835271045106,0 +-50.98085865746911,2.500585369453929,0 +-51.00073314094483,2.504419761225728,0 +-51.00740388455497,2.50474397674716,0 +-51.01697924307927,2.504253168217064,0 +-51.02097379639099,2.500622634181989,0 +-51.03576833869437,2.490824029142438,0 +-51.04475299958626,2.482656875375426,0 +-51.05854487191573,2.473768288884664,0 +-51.07002450184037,2.473373711407057,0 +-51.08532036474415,2.473171596607775,0 +-51.08727195245653,2.472312055692927,0 +-51.1008878655168,2.467248483458935,0 +-51.11636496826196,2.463232077979393,0 +-51.13660939707211,2.459450787808575,0 +-51.14392175405326,2.466499253873313,0 +-51.14759989708633,2.469546277024947,0 +-51.17158831384386,2.464900808981623,0 +-51.18301066698282,2.465456395628656,0 +-51.19166988523014,2.463971222743789,0 +-51.20227890573001,2.461627710881277,0 +-51.21569712728483,2.460373885097781,0 +-51.22526159257342,2.45988577006014,0 +-51.23573110686639,2.460394593519614,0 +-51.24715358857839,2.460950305404631,0 +-51.25639507881386,2.46711839279663,0 +-51.26359355287703,2.476045613878891,0 +-51.26960863863793,2.489679530076662,0 +-51.27585463144804,2.498559066255861,0 +-51.28599963273377,2.505721031864266,0 +-51.29862891856447,2.520621037707751,0 +-51.30568517000278,2.532390426492048,0 +-51.31332138569309,2.551804168130845,0 +-51.31557496678196,2.564299885513698,0 +-51.31896443541117,2.573039033356069,0 +-51.32240024415451,2.580827731506163,0 +-51.32674126014069,2.589613001711034,0 +-51.33370792084526,2.603298158744584,0 +-51.34053884099995,2.619842279739624,0 +-51.34374747836859,2.632394826232122,0 +-51.34500587619893,2.645802971575324,0 +-51.34717055765812,2.660211793250597,0 +-51.34766311279719,2.669777088045743,0 +-51.35005941884395,2.679435295156003,0 +-51.35250198447382,2.688142550954145,0 +-51.35594257931725,2.695944204874384,0 +-51.35915437479061,2.708508949498501,0 +-51.3623208667189,2.722028351080054,0 +-51.36277123794051,2.732563527371971,0 +-51.36335901782861,2.740241661230597,0 +-51.36453497180832,2.755601985125329,0 +-51.36684475806638,2.767188297094892,0 +-51.36761410853113,2.771048019426298,0 +-51.37916132374285,2.783371954792315,0 +-51.38703886655775,2.798048970042111,0 +-51.39224439108872,2.808783802736722,0 +-51.39549672179548,2.820376917206821,0 +-51.3979813219832,2.828121366418223,0 +-51.4019526347509,2.84451596781738,0 +-51.40515787204231,2.857062116820385,0 +-51.40736486413727,2.870514006380253,0 +-51.40817786202008,2.873413139431888,0 +-51.40720425333257,2.893385738963301,0 +-51.40873764173149,2.901087056192397,0 +-51.40794927512475,2.917257892970997,0 +-51.40734718285522,2.92962359846267,0 +-51.40588520094454,2.940041564514655,0 +-51.40728058182152,2.95059742304427,0 +-51.410627341293,2.960293763793252,0 +-51.41878298160233,2.969267497622376,0 +-51.42308186887151,2.979011555852919,0 +-51.425800500986,2.98200269748943,0 +-51.43463141865003,2.996730644390149,0 +-51.43820942848552,3.001673353126356,0 +-51.44622576605973,3.013509176843228,0 +-51.45247663389482,3.022397947977864,0 +-51.45691539577578,3.029291629881131,0 +-51.46207512545955,3.041001127077436,0 +-51.46360986282581,3.048719508807069,0 +-51.46505229539604,3.058345992925113,0 +-51.47279505307868,3.075925950193692,0 +-51.47646816266985,3.078969493638134,0 +-51.48811858216602,3.094820278432763,0 +-51.49156207190794,3.102632724250206,0 +-51.49791141037952,3.109630178768869,0 +-51.50549445355892,3.134346907185223,0 +-51.50980812831706,3.144097108097178,0 +-51.51689068469888,3.155888879551169,0 +-51.52129283928781,3.163732443918571,0 +-51.52851058536819,3.17266692028196,0 +-51.53472815437111,3.182504162301199,0 +-51.54180672978328,3.19428782564187,0 +-51.54802216368482,3.204121077139077,0 +-51.55862317636735,3.221784827490768,0 +-51.56845387584973,3.235598485836868,0 +-51.57198670726677,3.241485495231665,0 +-51.57900532440433,3.254209581623524,0 +-51.58411505974543,3.266842164568954,0 +-51.59140842910639,3.273863732131332,0 +-51.60055964442343,3.281928122209883,0 +-51.6097114140399,3.289992846129504,0 +-51.61800404082904,3.296110376341128,0 +-51.62611226388627,3.306031396778769,0 +-51.63141259147825,3.314861091347669,0 +-51.64029210335513,3.328625471465118,0 +-51.64912473738795,3.343340722896445,0 +-51.65814072350601,3.354256209470192,0 +-51.66743276525764,3.359464805026313,0 +-51.6785367872436,3.366665737354523,0 +-51.68701433322691,3.368980194720122,0 +-51.69649012674545,3.370390175665817,0 +-51.70678111469451,3.374699507631693,0 +-51.71512260621189,3.379868452246724,0 +-51.72432472512651,3.386983669588942,0 +-51.73424643840512,3.398889687584714,0 +-51.73940820943736,3.41056914341097,0 +-51.73419033190824,3.419851071424068,0 +-51.72797507203468,3.430042246561614,0 +-51.72470963243495,3.438475857506829,0 +-51.72407298040557,3.451807747767742,0 +-51.72738220265247,3.462464846102942,0 +-51.72824367890219,3.464414902925671,0 +-51.74371103505273,3.480429586866639,0 +-51.74983665920577,3.49218342187873,0 +-51.75596349527772,3.503939345124434,0 +-51.76218166353407,3.513790103293435,0 +-51.76858147513851,3.519829120467677,0 +-51.77485080042057,3.52873962211276,0 +-51.78375814063525,3.542562255049336,0 +-51.78330892505829,3.5521027469602,0 +-51.78481246278876,3.560784573477586,0 +-51.78941679213388,3.581301163617755,0 +-51.78768202902036,3.59741616862543,0 +-51.7830945949322,3.613395483685789,0 +-51.77860093221575,3.627475419524122,0 +-51.77501412625896,3.642553207121697,0 +-51.76965789432368,3.654687264018902,0 +-51.76802152094753,3.668907835488968,0 +-51.76752020145997,3.679370591288045,0 +-51.76897030166035,3.688974607096837,0 +-51.77228573368777,3.699628178983846,0 +-51.77469428002424,3.709286172656852,0 +-51.77424298483646,3.71880676688439,0 +-51.77392704582573,3.725471884317724,0 +-51.77597525239448,3.742752498944868,0 +-51.77960929825404,3.746747670053724,0 +-51.79042210000794,3.7606385171158,0 +-51.79369315515893,3.77225065289917,0 +-51.78933702677308,3.783499296613453,0 +-51.78407435230103,3.793755301894338,0 +-51.78262612803697,3.804197098910094,0 +-51.78217654443073,3.813732985429083,0 +-51.78567788201228,3.820593227877326,0 +-51.79394999600326,3.827684595679209,0 +-51.8107745042796,3.836160715903078,0 +-51.81950130029094,3.833720990632377,0 +-51.82922715993706,3.830373219839918,0 +-51.84012683748854,3.822297075160173,0 +-51.850026705001,3.815129256279221,0 +-51.85693060914952,3.810685694323529,0 +-51.86474853741364,3.807247379213158,0 +-51.87699898350346,3.814847789913212,0 +-51.87940970889124,3.824495668489325,0 +-51.87110422755084,3.838396685726566,0 +-51.86424786805966,3.84188049248166,0 +-51.85621207947805,3.850074647756612,0 +-51.84908557959677,3.85926714141657,0 +-51.84204906312033,3.866557377732196,0 +-51.83496565883186,3.874798583968175,0 +-51.82606579047944,3.881045099670201,0 +-51.81898153433053,3.889286618330868,0 +-51.81475742669969,3.897666479354997,0 +-51.81516384412069,3.909131675876389,0 +-51.82356189578213,3.913349338078583,0 +-51.83309628101622,3.913807029003654,0 +-51.84235693072621,3.919973340357761,0 +-51.84471538826326,3.930577013328614,0 +-51.85165927910582,3.945216200957398,0 +-51.85615328035004,3.951154265761192,0 +-51.86151292181849,3.959045795322807,0 +-51.87264302226426,3.966263785672353,0 +-51.87805205337033,3.973208260367642,0 +-51.88432634440828,3.982105368549217,0 +-51.8907801937,3.987190996165806,0 +-51.90213784064935,3.989645795769236,0 +-51.91162949705397,3.991052199368219,0 +-51.9217090740587,4.000117057758055,0 +-51.92915417719164,4.00428498113011,0 +-51.94435952504353,4.00595490982635,0 +-51.95231038160614,3.999659683205707,0 +-51.959722883232,4.00479243259013,0 +-51.96400300029264,4.015501268536091,0 +-51.96928338332086,4.025305304971962,0 +-51.9737440648395,4.032205992856566,0 +-51.98606890381866,4.034715527197623,0 +-51.99757408701429,4.034320365547488,0 +-52.00612551752046,4.035691262401562,0 +-52.01363317899663,4.038921427239999,0 +-52.03703897090203,4.045400458449644,0 +-52.04434516151338,4.052414989456624,0 +-52.04407381935502,4.058116304587267,0 +-52.04629970281926,4.07155734590649,0 +-52.04861641067419,4.083099572457785,0 +-52.05002550392686,4.093647343155928,0 +-52.05325112306188,4.106189093605131,0 +-52.05774485560918,4.112121441098292,0 +-52.06895479430352,4.117420730601872,0 +-52.07721495651803,4.124485267299495,0 +-52.08623896834799,4.134430404470655,0 +-52.09547133899663,4.141544782793337,0 +-52.10639339633338,4.153509299796757,0 +-52.114524051454,4.163428489609299,0 +-52.12270200978811,4.172398069561623,0 +-52.12992857691707,4.181323778487438,0 +-52.13420378650589,4.192015817889319,0 +-52.12807378427129,4.200302723149745,0 +-52.12567001649785,4.210675657856039,0 +-52.12521530374343,4.220186041142307,0 +-52.12472758608261,4.230659050243984,0 +-52.1271448326785,4.240317198811206,0 +-52.12761095331358,4.25083904909815,0 +-52.12821005719603,4.258504825068806,0 +-52.12767813850858,4.269937644821574,0 +-52.12905403378972,4.281463096488565,0 +-52.13637573096587,4.288495635508319,0 +-52.14479398769647,4.292724918003835,0 +-52.15703401606579,4.297139777017972,0 +-52.1722279803989,4.29978466155888,0 +-52.18275284311632,4.299312204475497,0 +-52.19239870130581,4.29787267602777,0 +-52.20409061313953,4.293667868321452,0 +-52.21332192036876,4.292868031055163,0 +-52.22243847423175,4.301869097784309,0 +-52.22335395291712,4.302871276380311,0 +-52.24576599111549,4.308323581312675,0 +-52.25100529451788,4.311227918146392,0 +-52.2605907835728,4.318900308841869,0 +-52.26111616264287,4.327052633200767,0 +-52.26504165818422,4.339876940195202,0 +-52.270979766275,4.348280069837732,0 +-52.27871949578499,4.356765487702488,0 +-52.28821460067339,4.366230233114419,0 +-52.29413725705287,4.374618599839587,0 +-52.30001821843241,4.383908503352267,0 +-52.30358441575828,4.384978752050543,0 +-52.31642686093976,4.400008548984394,0 +-52.31801718166641,4.40459370804756,0 +-52.32463810143044,4.417539375889404,0 +-52.32855577638526,4.430366714002241,0 +-52.33354466593283,4.439625701389361,0 +-52.33956535990392,4.446227249312296,0 +-52.34739230820915,4.452914760851127,0 +-52.34877037239645,4.462003426299493,0 +-52.35010568103238,4.471992752943294,0 +-52.35419312866573,4.481210782034323,0 +-52.35492504429583,4.484855188694572,0 +-52.35471579157251,4.508308770852605,0 +-52.36061027329703,4.517614174655585,0 +-52.36844004471721,4.524304454534795,0 +-52.37265717661111,4.530823074888042,0 +-52.37945635259961,4.540172607933958,0 +-52.38178187520737,4.548406936629432,0 +-52.38673177424162,4.558570680216696,0 +-52.39094415110462,4.565076281360944,0 +-52.39949362617877,4.575379865526059,0 +-52.4037213393452,4.581920427929176,0 +-52.41045649946953,4.593114821193412,0 +-52.4065179844075,4.600190078520775,0 +-52.39710252530446,4.607887122526627,0 +-52.38978783337743,4.609349640719928,0 +-52.37687387429974,4.614140024920057,0 +-52.37024443365804,4.620130017493431,0 +-52.36525514611338,4.629824976057075,0 +-52.36285218872511,4.642371639602268,0 +-52.35790469039264,4.651164347961985,0 +-52.35687271165662,4.653826039075993,0 +-52.36041704728122,4.673563556529675,0 +-52.36554283584582,4.68011624953943,0 +-52.37334093590319,4.687696954836357,0 +-52.37928880498231,4.696095935957334,0 +-52.38523418004234,4.704497536547113,0 +-52.39276743034262,4.717488497258593,0 +-52.39685762846553,4.72670685538787,0 +-52.40364867980263,4.735143809630883,0 +-52.40957009134846,4.742629531770213,0 +-52.41540917003843,4.753732994177212,0 +-52.42142193905821,4.761242045881443,0 +-52.42751937515703,4.766952880390452,0 +-52.43243000932579,4.778933616272148,0 +-52.43382700090389,4.788033929274522,0 +-52.42921972047863,4.789621021364036,0 +-52.41460149666344,4.791623140468129,0 +-52.40373191921267,4.791093539137184,0 +-52.3928307003171,4.791468522932318,0 +-52.38276630179468,4.794639093909375,0 +-52.37170952756599,4.798632298683833,0 +-52.35944897513202,4.808888527479113,0 +-52.35191972076714,4.814853943286819,0 +-52.34701574472016,4.822748956329691,0 +-52.34301522511795,4.83068685127333,0 +-52.33974821911323,4.84227516588868,0 +-52.33566263242083,4.852020936879428,0 +-52.33342730136133,4.860951316012401,0 +-52.33472260820935,4.871856006507587,0 +-52.33782576493522,4.882843598717119,0 +-52.33666446143367,4.888208254782301,0 +-52.32883012507177,4.900482651236562,0 +-52.32198531620676,4.910997711733362,0 +-52.32142799786427,4.922717544491814,0 +-52.32306621997254,4.926418396476139,0 +-52.33227169153982,4.917818320342203,0 +-52.33726864094435,4.911795515907145,0 +-52.34241377088647,4.902649688573081,0 +-52.34748441325456,4.895065618014153,0 +-52.35386217007306,4.8930211675352,0 +-52.36225596276135,4.898112854598823,0 +-52.36729616003694,4.907744996853487,0 +-52.37255803401797,4.912690489416057,0 +-52.38095329456897,4.917783239015728,0 +-52.38468637592148,4.92187509427579,0 +-52.39368937000253,4.930928040794694,0 +-52.40198315436978,4.938380352739422,0 +-52.40960320924205,4.94344836924421,0 +-52.41797255434191,4.949335344277682,0 +-52.42630150318214,4.955998863809622,0 +-52.4316428771286,4.959387627266318,0 +-52.44147777159164,4.967707148179876,0 +-52.44222618628026,4.968527941447572,0 +-52.44572576231844,4.983367083523294,0 +-52.44714339550241,4.986561111947116,0 +-52.45833448238157,4.998815676659372,0 +-52.46721329724286,5.010179250469264,0 +-52.47549521617979,5.017605151825972,0 +-52.48000927116314,5.021726330800231,0 +-52.4868358385497,5.02673771607076,0 +-52.49500628456666,5.036502752393434,0 +-52.50030289647437,5.040660515697674,0 +-52.50634552745538,5.045635095307536,0 +-52.51679096341265,5.057071196897484,0 +-52.52137867007103,5.059632096565352,0 +-52.52980791686824,5.063936618702382,0 +-52.54368243266807,5.069280861450355,0 +-52.55531908056503,5.072173854151137,0 +-52.56322428330921,5.070981367515714,0 +-52.57586587777516,5.06923006425292,0 +-52.58661167448722,5.074428104072531,0 +-52.59653663023833,5.080367841895473,0 +-52.60657190972003,5.083966389447307,0 +-52.61653444731227,5.089125753916073,0 +-52.62959398806247,5.095212253862134,0 +-52.63646099875518,5.099444519185762,0 +-52.64777657378525,5.109363363765412,0 +-52.65386101334263,5.113559131155161,0 +-52.66058464121876,5.120914942947048,0 +-52.66712879495834,5.13217614088571,0 +-52.66975760578761,5.143256758008685,0 +-52.67092829150012,5.151922453838176,0 +-52.67441672416826,5.161483175680646,0 +-52.67894538755418,5.165616496990872,0 +-52.70661585173431,5.179390044833987,0 +-52.7158706279449,5.182949116495951,0 +-52.7210599226113,5.189446484050762,0 +-52.7269969389145,5.196760024106327,0 +-52.73670350585011,5.207377279976171,0 +-52.74189450779174,5.213873433482037,0 +-52.74868986644053,5.219661276845537,0 +-52.75481188803685,5.223071560706369,0 +-52.7623534778461,5.229675037064314,0 +-52.76765446088383,5.23382897597102,0 +-52.77512088638792,5.241995207058013,0 +-52.78721486477887,5.251938727750219,0 +-52.79460855786891,5.261665898128715,0 +-52.80673973008868,5.27082825900845,0 +-52.81745053579907,5.276796141032488,0 +-52.82741525553691,5.281954812652058,0 +-52.84033356048796,5.291168934164307,0 +-52.84951746381417,5.296292407577675,0 +-52.86172794609264,5.303906092865848,0 +-52.8693828809943,5.30817617210444,0 +-52.87935299598023,5.313336485573461,0 +-52.89473710982128,5.320312968362628,0 +-52.90620540945558,5.327110229713672,0 +-52.91151481443804,5.331276823247948,0 +-52.92279121644093,5.342800331482358,0 +-52.9288911456249,5.347011321863774,0 +-52.93569992892039,5.35281511699637,0 +-52.94247386646822,5.359401516168819,0 +-52.95545470373234,5.367847973692576,0 +-52.95994922569827,5.372762244787442,0 +-52.9690462204988,5.380245065262853,0 +-52.98289224895715,5.387171173225609,0 +-52.98906804714048,5.389816077359907,0 +-53.00056922389098,5.396641610960629,0 +-53.00982325145354,5.401008389044181,0 +-53.01218066323025,5.401121158665516,0 +-53.02829206049179,5.414536067790898,0 +-53.03505479838993,5.421102419878745,0 +-53.03964814395739,5.423659783340916,0 +-53.04816020934511,5.426397938058344,0 +-53.05745630968411,5.429172199835017,0 +-53.07469743789076,5.429967325182071,0 +-53.08559585247968,5.432033357450478,0 +-53.09721464149548,5.435695798267597,0 +-53.10409257629254,5.439922099316736,0 +-53.11186314172951,5.441843868086731,0 +-53.1335021863392,5.449878526599144,0 +-53.14120302807699,5.453361479143664,0 +-53.14890452753798,5.456844609050546,0 +-53.16273990273166,5.463739074534064,0 +-53.17429162073527,5.468963906488245,0 +-53.23305929906346,5.489634268334689,0 +-53.24168760671141,5.490027564386181,0 +-53.2503515693847,5.489640412933738,0 +-53.25684431843705,5.485244623771957,0 +-53.26800120872642,5.481844891258381,0 +-53.27826339815485,5.480750297422324,0 +-53.28453736874843,5.481035487776885,0 +-53.29469463324862,5.482278940530915,0 +-53.30399282390619,5.485046992089132,0 +-53.31948789455853,5.489659525719103,0 +-53.32479290434664,5.493808935762468,0 +-53.33469142420832,5.500511561653777,0 +-53.34305848399405,5.506362606304799,0 +-53.35388323673644,5.509981384194973,0 +-53.36705781446954,5.513711169082301,0 +-53.37923498816774,5.522085311692467,0 +-53.3882794369445,5.530316516543955,0 +-53.39739643102067,5.536987684925931,0 +-53.4065884137275,5.542105014318196,0 +-53.42041249142479,5.548995305236061,0 +-53.43288313844294,5.551129705049055,0 +-53.44228799676692,5.551556550623656,0 +-53.45639877470352,5.552200902491065,0 +-53.46192131359785,5.551670216349804,0 +-53.48094489339786,5.547841707324318,0 +-53.48172882614291,5.547877449467039,0 +-53.49277363541852,5.546815587997949,0 +-53.50003607683988,5.542450696485818,0 +-53.51281949371328,5.537555026437732,0 +-53.52175802623984,5.530923662807319,0 +-53.52848977778006,5.521066656090899,0 +-53.53358418699804,5.512699507828964,0 +-53.54106734453519,5.503659540502409,0 +-53.55022502781022,5.492350215126249,0 +-53.55688830205521,5.484054065648482,0 +-53.56194707289594,5.476466537597485,0 +-53.56287197929748,5.473381652604735,0 +-53.57056493041964,5.459660056565913,0 +-53.57736837071222,5.448243167170067,0 +-53.58171754955416,5.439059732835532,0 +-53.58367710398807,5.430549941361549,0 +-53.58938313598253,5.426116995704639,0 +-53.59669218040879,5.420974491773881,0 +-53.61809779686872,5.412598980170792,0 +-53.62998514864798,5.410011369164081,0 +-53.6335438042199,5.400799299005869,0 +-53.63610597786514,5.396228670514748,0 +-53.64809945952354,5.391302370412599,0 +-53.66080478487093,5.387969941495284,0 +-53.67575279003341,5.387081331566708,0 +-53.6803802251932,5.388851446208415,0 +-53.6959002088446,5.392673358418331,0 +-53.70316599021563,5.405496867129034,0 +-53.71139240642059,5.414459025049227,0 +-53.722717291775,5.424342141104394,0 +-53.73507348672427,5.428803644046716,0 +-53.74814351971474,5.434859645460346,0 +-53.75409374168717,5.442158345295904,0 +-53.76267597270619,5.443325260151881,0 +-53.76659305115977,5.443501218468745,0 +-53.78853311134731,5.444485799523305,0 +-53.79946839041752,5.44575763695718,0 +-53.80637969278549,5.449193203823355,0 +-53.81257991472742,5.45103384515228,0 +-53.82647913498312,5.456345226563679,0 +-53.83677491832766,5.454462063915612,0 +-53.84632215795833,5.451763649024432,0 +-53.85842549427675,5.456221943795071,0 +-53.86853890943919,5.458237968436125,0 +-53.87711889621286,5.459403587370709,0 +-53.89117556527265,5.460813129326376,0 +-53.89815138204422,5.462687045745016,0 +-53.90576963213893,5.467714157345652,0 +-53.916380176077,5.476000102977693,0 +-53.92407081800598,5.479468795113835,0 +-53.93639136495436,5.484707170629012,0 +-53.94711181713026,5.490655724736635,0 +-53.95957608393665,5.49277564267436,0 +-53.9704753117438,5.494825877417063,0 +-53.9790257017633,5.496771487155576,0 +-53.99541642173237,5.499067906905053,0 +-54.00012028888904,5.499278318472336,0 +-54.01187970911955,5.499803588095547,0 +-54.02285609117754,5.500293562841808,0 +-54.0330846038644,5.49996821537138,0 +-54.04406335746762,5.500457867000447,0 +-54.05265542172786,5.501622746330169,0 +-54.06519420652863,5.50217978436421,0 +-54.08471488714401,5.504609951205662,0 +-54.08777967389003,5.506309534015583,0 +-54.10303376088488,5.516367374324208,0 +-54.10987719854662,5.521361280226879,0 +-54.11896693271276,5.528799804606255,0 +-54.12574084551472,5.535353782558454,0 +-54.13486584289231,5.542011699943793,0 +-54.14810074228109,5.544947639170122,0 +-54.16035422182969,5.552534041393417,0 +-54.17302043619664,5.560120306984183,0 +-54.18457845633797,5.56531850973062,0 +-54.19367479757685,5.572754469307795,0 +-54.20440335212916,5.5787016023148,0 +-54.21288683053749,5.582203277890941,0 +-54.22457847415814,5.584281187399827,0 +-54.23394953142856,5.585477107370275,0 +-54.24805633575938,5.586102154967423,0 +-54.26608259945515,5.586900405806432,0 +-54.2896388525859,5.5871518727619,0 +-54.29983067418956,5.587598611830289,0 +-54.31080592281622,5.588079494407001,0 +-54.32334717166974,5.588631291108875,0 +-54.34219285483069,5.588681091514154,0 +-54.35078015386803,5.589841790740607,0 +-54.35783465684222,5.59015372879619,0 +-54.37190984063277,5.591558167015306,0 +-54.38053305123878,5.591939319850165,0 +-54.39150871545797,5.59242425716437,0 +-54.4007791379171,5.59596229405913,0 +-54.40687967520866,5.600142742877782,0 +-54.41311845753518,5.601200806489699,0 +-54.4240284463815,5.603247552224333,0 +-54.4482730049139,5.605883249430318,0 +-54.46610966367385,5.611365037776459,0 +-54.47317015252252,5.611676685890091,0 +-54.4835746893099,5.607442294347637,0 +-54.49067101250402,5.606973787500095,0 +-54.50244101984397,5.607493027423265,0 +-54.50793395541062,5.607735216192105,0 +-54.5180324394888,5.610526801671555,0 +-54.5297352534508,5.612606375825599,0 +-54.53990335511379,5.61383591135077,0 +-54.55089093297597,5.61431890183755,0 +-54.56092468940471,5.618672182871613,0 +-54.58117185158587,5.64681187399492,0 +-54.59399109562225,5.662752098387224,0 +-54.61242737555538,5.682782686114627,0 +-54.63715552479955,5.691546565213084,0 +-54.65786000451314,5.703981733028656,0 +-54.66716473335122,5.712077154609563,0 +-54.69148070698266,5.730450772570722,0 +-54.70229998238585,5.748236616588789,0 +-54.7194096861587,5.754756302984027,0 +-54.73291357962711,5.755347342190583,0 +-54.76378210852062,5.756697237694209,0 +-54.80019476273158,5.764060321731456,0 +-54.82125707054281,5.768828140466408,0 +-54.85785391702726,5.772357152648976,0 +-54.88867879843377,5.775644188295262,0 +-54.90985054714248,5.778504043570312,0 +-54.93859430042304,5.785548252296285,0 +-54.97524342400727,5.78908957211144,0 +-54.9945802286142,5.789941212339555,0 +-55.02181963370879,5.787287724876417,0 +-55.04892501711343,5.78849252833243,0 +-55.05860695680158,5.788922039656482,0 +-55.07991110687077,5.78986653876002,0 +-55.12415248067982,5.799534168326465,0 +-55.1292592639893,5.817115472101094,0 +-55.14608086643245,5.833293259880748,0 +-55.1628301268596,5.851401114404367,0 +-55.17229392490625,5.857610912978104,0 +-55.20039988604309,5.860102772041333,0 +-55.2300888736343,5.84403896778468,0 +-55.25147872088978,5.841100041006178,0 +-55.27303244270296,5.834316427011587,0 +-55.28526542957709,5.819434562310891,0 +-55.30328396567592,5.80480025123877,0 +-55.3248319549682,5.798017674214983,0 +-55.33714219839777,5.78122547536331,0 +-55.35121633432632,5.768355547721367,0 +-55.37066855325138,5.765331087072237,0 +-55.39382406513097,5.766323510424755,0 +-55.4285600060477,5.767806626874393,0 +-55.44962724337443,5.772551489251168,0 +-55.46868585792765,5.779134308486539,0 +-55.47358771537691,5.800506865195799,0 +-55.47471930073669,5.819808732238708,0 +-55.49354910505656,5.832165689472337,0 +-55.51648382511326,5.838920943075027,0 +-55.54143299080922,5.843835699063908,0 +-55.57212370014656,5.850940720536593,0 +-55.60314370540979,5.85035738539292,0 +-55.65007970089115,5.846552113211771,0 +-55.69640914900938,5.850350617471634,0 +-55.71960800121089,5.851287364202464,0 +-55.73707680801966,5.85007697011289,0 +-55.77401990412201,5.845814541874992,0 +-55.8128882165259,5.841626885289283,0 +-55.83260644254406,5.832805420609561,0 +-55.85264818511215,5.816298166197996,0 +-55.87050912103963,5.805479144108944,0 +-55.9061317952559,5.785777014123871,0 +-55.92976207304306,5.775213448088187,0 +-55.95491723635751,5.774328050058591,0 +-55.96825851751051,5.778724349657337,0 +-55.97943095711096,5.788800707804604,0 +-56.00957377345155,5.807353735162834,0 +-56.04799428369812,5.812781011783261,0 +-56.09035742333312,5.816452098534745,0 +-56.12091341053835,5.825415585291537,0 +-56.16080981816163,5.842460517534536,0 +-56.18751671504874,5.851260640281552,0 +-56.21647341485124,5.852458027813836,0 +-56.2492213973106,5.855741638321614,0 +-56.26451786403351,5.860228069642364,0 +-56.29326739419891,5.867205276102958,0 +-56.31444807976683,5.870015211812804,0 +-56.3656209931638,5.88508422342515,0 +-56.38588070158964,5.888983157909761,0 +-56.39679080014115,5.890964121984079,0 +-56.41233589075703,5.894683968138819,0 +-56.45286482571026,5.900938104210211,0 +-56.48091350274997,5.905151935694183,0 +-56.50289914585928,5.90444435644707,0 +-56.53289916071679,5.89937210156496,0 +-56.56751592152378,5.896037668621732,0 +-56.6052369018141,5.892836711638251,0 +-56.62157471258384,5.876342226948815,0 +-56.63484806742624,5.858171955998045,0 +-56.65528433237068,5.855865146394819,0 +-56.67884202562879,5.853681334554385,0 +-56.7133283000453,5.851928339414721,0 +-56.73675256132418,5.852850305653979,0 +-56.75536298711317,5.856698668467645,0 +-56.76766445107476,5.86185505726599,0 +-56.78789695703595,5.864215692177686,0 +-56.81755815054216,5.865401226556274,0 +-56.83304471092413,5.869134343266545,0 +-56.86114667316286,5.870255090303179,0 +-56.87832055081704,5.870939348515082,0 +-56.89705607285028,5.871685182022615,0 +-56.9079852759584,5.872119905312811,0 +-56.94227360018009,5.875040064530591,0 +-56.95614306507416,5.88026511432197,0 +-56.96821007087156,5.891655330843473,0 +-56.98346500381835,5.901617607060466,0 +-57.02066032928704,5.910906866276542,0 +-57.0454242914572,5.918138638090341,0 +-57.05323963819653,5.918453441096868,0 +-57.08606584169649,5.919769830470252,0 +-57.10175839503487,5.918842123520478,0 +-57.12853095226679,5.915253274891875,0 +-57.14568654722491,5.917513256562938,0 +-57.14972678321051,5.934827816916816,0 +-57.15684353376658,5.953834368851887,0 +-57.1585229475481,5.974381975136464,0 +-57.16546354577215,5.996423852234695,0 +-57.17059774074414,6.024613438025899,0 +-57.17579771123295,6.051248659558001,0 +-57.18519128343738,6.090487281642498,0 +-57.19064041534224,6.110913513677326,0 +-57.2009630393507,6.126867351724054,0 +-57.2280450887055,6.154364942448101,0 +-57.25045007307526,6.181683355467735,0 +-57.26541491968415,6.199382508605199,0 +-57.27617812163533,6.204472828905423,0 +-57.30210302330872,6.222610242616142,0 +-57.32745766741045,6.239133480955387,0 +-57.36297952014317,6.251389496698552,0 +-57.39987873506794,6.268358804237946,0 +-57.41332916290628,6.284431526590947,0 +-57.43658525608432,6.289989044705989,0 +-57.46327069724419,6.287897370353228,0 +-57.48544738723843,6.28096828499633,0 +-57.48875394468512,6.276429314681695,0 +-57.50396633436594,6.247463705259697,0 +-57.51088144159064,6.230622860018313,0 +-57.51941774608011,6.212290709803826,0 +-57.53166708014544,6.218982595645958,0 +-57.53899018139703,6.231705273776894,0 +-57.55081755223431,6.249267621066612,0 +-57.5520769241335,6.257092553774585,0 +-57.55248946262839,6.286661654136845,0 +-57.55614734866034,6.313248072276079,0 +-57.56779861447041,6.335477603424889,0 +-57.58119630025787,6.353111305511947,0 +-57.60125711001263,6.396473356149271,0 +-57.6133439888953,6.407821055630131,0 +-57.63288114093514,6.428783885366913,0 +-57.65542398072352,6.452968607571898,0 +-57.68722024617058,6.480614871476684,0 +-57.70393042258101,6.493690064396868,0 +-57.71919830138181,6.50359965096109,0 +-57.75099601598048,6.53124130029324,0 +-57.76620313788109,6.542704608571153,0 +-57.78129106336992,6.557274853683451,0 +-57.79505685168452,6.565574322109986,0 +-57.81333231992734,6.578713914171535,0 +-57.83311346406924,6.593471253669231,0 +-57.84454580034386,6.621918799774708,0 +-57.8547157817128,6.64254064981839,0 +-57.87866511498299,6.671473659418767,0 +-57.90483655300816,6.683368955071127,0 +-57.92487845727279,6.691920143163466,0 +-57.95262326061286,6.703882405602479,0 +-57.95534408629577,6.714892947745374,0 +-57.96240911068441,6.735425417255818,0 +-57.98055188222944,6.753272387806057,0 +-58.00183403846204,6.771250614564378,0 +-58.01407521557813,6.779525810952604,0 +-58.02620449274806,6.790920568853235,0 +-58.05226704723162,6.807539681715512,0 +-58.06620120277486,6.812762793385334,0 +-58.08803474418614,6.816744341082137,0 +-58.11149576934905,6.819218107573303,0 +-58.14639382146348,6.809654573308691,0 +-58.14796243144082,6.809716149845555,0 diff --git a/R-utils/roads/br158.csv b/R-utils/roads/br158.csv new file mode 100644 index 000000000..a6f239029 --- /dev/null +++ b/R-utils/roads/br158.csv @@ -0,0 +1,850 @@ +-52.26252255283885,-15.88823472384597,0 +-52.27960252396259,-15.88558350976033,0 +-52.29802220059693,-15.87623763999131,0 +-52.3149380806101,-15.87028972727049,0 +-52.31409103958033,-15.85706938248849,0 +-52.30452269795902,-15.84269678345192,0 +-52.29840346345119,-15.8281281338522,0 +-52.29343510827336,-15.80355287351065,0 +-52.29081498002606,-15.78878238504027,0 +-52.28971773332936,-15.77059736179718,0 +-52.28172696532248,-15.75281102921247,0 +-52.26714404150733,-15.74039295116854,0 +-52.25104233931915,-15.73138646938942,0 +-52.24162977255878,-15.71866022841896,0 +-52.23373727224358,-15.70251769511713,0 +-52.2241223674806,-15.6864738065051,0 +-52.22129124313248,-15.66835327973718,0 +-52.21501184519865,-15.65043700796804,0 +-52.21033315543545,-15.63077737072781,0 +-52.20414595075538,-15.61452316254945,0 +-52.20129125787467,-15.59641010127838,0 +-52.2001543206839,-15.57819420849687,0 +-52.19912085890694,-15.56163201140836,0 +-52.19819077139883,-15.54672421689471,0 +-52.19887503679325,-15.5300576599452,0 +-52.1975315726109,-15.50851827865286,0 +-52.19608482818445,-15.48531787798432,0 +-52.1967689694075,-15.46864359493675,0 +-52.20068048004784,-15.44845430190216,0 +-52.19974958595864,-15.43353612408366,0 +-52.19699794043777,-15.41705892972015,0 +-52.19434974568934,-15.40223781183687,0 +-52.19331557002676,-15.38565683429352,0 +-52.19197137243805,-15.3640987574136,0 +-52.18770963944819,-15.35103102576129,0 +-52.18454499529359,-15.3279092523781,0 +-52.18179599548061,-15.3114100662404,0 +-52.17905056931679,-15.29488955157955,0 +-52.17984479477954,-15.27981415006465,0 +-52.1779139660124,-15.22496428392129,0 +-52.17880259631253,-15.21163278703797,0 +-52.18088916513471,-15.18992978960665,0 +-52.18437972092325,-15.16316166855209,0 +-52.18989248269452,-15.14125391783261,0 +-52.20085437222777,-15.12400798198028,0 +-52.21172046763484,-15.10509997487885,0 +-52.22108508890122,-15.08959449214489,0 +-52.2281198668807,-15.06425088436362,0 +-52.23223837173381,-15.0473846186596,0 +-52.24150194593725,-15.03020983279102,0 +-52.25258389913014,-15.01458563514237,0 +-52.25872626962948,-15.00257802275928,0 +-52.26746863861186,-14.97711500015974,0 +-52.2764132752833,-14.95496474618855,0 +-52.27870454288247,-14.93653382583554,0 +-52.28119954330558,-14.92141957922703,0 +-52.28338306696968,-14.90133355557,0 +-52.2857739128373,-14.8845599762917,0 +-52.28634669366289,-14.86623012820256,0 +-52.29398577420298,-14.85080128810979,0 +-52.29970943409848,-14.83214819847586,0 +-52.3072483179569,-14.81505112458975,0 +-52.31297177286574,-14.79639202416581,0 +-52.31718729573831,-14.78115054368703,0 +-52.32654127803469,-14.76560567246947,0 +-52.33268663882161,-14.75356103154539,0 +-52.34507956064851,-14.73112868717202,0 +-52.34226717047198,-14.71290630460119,0 +-52.33441193587845,-14.69664967731726,0 +-52.33704469896742,-14.6831031006938,0 +-52.34651465078134,-14.63152588894191,0 +-52.34717993727262,-14.61487434087912,0 +-52.3512664584233,-14.59802035775219,0 +-52.3519278200901,-14.58136650768594,0 +-52.35076995891182,-14.5631572491281,0 +-52.35303268956277,-14.54474650295493,0 +-52.35882011720411,-14.52778922815557,0 +-52.34461454196754,-14.52032314532312,0 +-52.32409620146127,-14.52153638828052,0 +-52.305287880131,-14.52264690486447,0 +-52.28787596101298,-14.51868984004538,0 +-52.2833050198324,-14.50068540008005,0 +-52.27894362670034,-14.48599178106511,0 +-52.27266451514439,-14.46809016479309,0 +-52.26670039136445,-14.45515396739896,0 +-52.25871521448686,-14.43735524918032,0 +-52.25083625923625,-14.42121226724018,0 +-52.23985631115258,-14.41023418479164,0 +-52.22375545383296,-14.39955626217147,0 +-52.20454952931559,-14.39404175764049,0 +-52.18705498121393,-14.38842471681177,0 +-52.17277118769815,-14.37929693029871,0 +-52.1634065675358,-14.36655875914268,0 +-52.16066861831821,-14.3501104392615,0 +-52.1597418294048,-14.33521637592159,0 +-52.15840326695358,-14.31370183381807,0 +-52.15727081538858,-14.29549622077545,0 +-52.15593432811053,-14.27397335134537,0 +-52.15832208944242,-14.25721429349786,0 +-52.16231417907853,-14.23869783292347,0 +-52.16470106745184,-14.22193773136475,0 +-52.17050175968361,-14.20497799744279,0 +-52.18162192605078,-14.19105377897364,0 +-52.1805891047042,-14.17450591898285,0 +-52.18126239039196,-14.15786135601735,0 +-52.18193565234888,-14.14121747463272,0 +-52.18260870654366,-14.12457431300266,0 +-52.18147296446369,-14.10637376740906,0 +-52.17361863832809,-14.09021364895433,0 +-52.16064812324251,-14.0743405536711,0 +-52.15129576483957,-14.06158102195016,0 +-52.14696112386829,-14.04684896376591,0 +-52.14764150902962,-14.03016834625844,0 +-52.14651342439073,-14.01192222363827,0 +-52.14630837072425,-14.00860450137007,0 +-52.13761185611027,-13.97998080793149,0 +-52.12093892382845,-13.95937730837155,0 +-52.11139279631722,-13.94333652904469,0 +-52.1018479111268,-13.92729521778095,0 +-52.09250897732571,-13.91456106713815,0 +-52.08286410303336,-13.89686492506217,0 +-52.07853597470651,-13.88217679345709,0 +-52.07710316678388,-13.85901600105609,0 +-52.06606521813532,-13.84637775653862,0 +-52.05332642304296,-13.83383930362294,0 +-52.0472998526085,-13.8192516127277,0 +-52.03926655641239,-13.79980344464087,0 +-52.03664802521484,-13.78502101299954,0 +-52.03362329615512,-13.76362722700535,0 +-52.03260638515322,-13.74709635729501,0 +-52.02968463228437,-13.72736027731868,0 +-52.0251626210894,-13.70937550791068,0 +-52.02234174571254,-13.69128956379466,0 +-52.01472122567787,-13.67845623645123,0 +-52.00339254529693,-13.66085756868864,0 +-51.99076981417632,-13.64997008475443,0 +-51.97443908974155,-13.63431560327914,0 +-51.96181666413855,-13.62342453040619,0 +-51.95079454109852,-13.61077984159902,0 +-51.93807097662525,-13.59823147423632,0 +-51.93215421183375,-13.5852904909424,0 +-51.9243331670599,-13.56913723697126,0 +-51.91620835174015,-13.54801862173901,0 +-51.906379196752,-13.52698924848715,0 +-51.90205758224673,-13.51227918783674,0 +-51.89763372291358,-13.4959104241001,0 +-51.89831453890454,-13.47924690620328,0 +-51.90740126269721,-13.46043705439292,0 +-51.91849543582084,-13.4464984434599,0 +-51.93289004892833,-13.43070492974498,0 +-51.9407840105213,-13.42026985508073,0 +-51.94677241409321,-13.40661564493578,0 +-51.95425803064389,-13.38954538045532,0 +-51.95963407801982,-13.36593593239388,0 +-51.96201254441718,-13.34913870660422,0 +-51.96098671462053,-13.33252445958953,0 +-51.9599605613641,-13.31590569344838,0 +-51.96053353701194,-13.29752185539249,0 +-51.96631465775968,-13.28050308282866,0 +-51.96930819548715,-13.27365563568827,0 +-51.95670182859403,-13.2332937093368,0 +-51.9423051099678,-13.22084913900455,0 +-51.92631232010018,-13.21015674482671,0 +-51.91371849287062,-13.19926690899812,0 +-51.90092554841988,-13.18506879689746,0 +-51.8999165213694,-13.16853557655875,0 +-51.90230347790928,-13.15180591116175,0 +-51.90638833336738,-13.1349773225584,0 +-51.90538068775417,-13.11844136350255,0 +-51.8959855171466,-13.10404892246286,0 +-51.88489391706513,-13.08975411292843,0 +-51.88039262896373,-13.07176018549596,0 +-51.87948783261005,-13.05687762350062,0 +-51.87848260237794,-13.04034142250887,0 +-51.87737699219473,-13.02215159283854,0 +-51.87637143929001,-13.00561510609818,0 +-51.87505883616885,-12.98411439725975,0 +-51.86725355619284,-12.96796086715528,0 +-51.85785176189514,-12.95355665477816,0 +-51.84874703488522,-12.94410955754664,0 +-51.83413174213252,-12.92832422317875,0 +-51.82161998570131,-12.91906008503411,0 +-51.80839340605954,-12.89819879635639,0 +-51.81087953203257,-12.88310018086745,0 +-51.81496936457633,-12.86625325265761,0 +-51.8206622865508,-12.84765967585597,0 +-51.81126284999568,-12.83323979757117,0 +-51.79546396595973,-12.82581962685915,0 +-51.77946006331549,-12.81508277641714,0 +-51.77504949643353,-12.79870406011967,0 +-51.77243980355468,-12.78388509109789,0 +-51.76972903019308,-12.76740709961021,0 +-51.76861694223865,-12.74917455202982,0 +-51.77310534059118,-12.73893874032623,0 +-51.78017699620622,-12.71523984741704,0 +-51.78245664113339,-12.69680086148939,0 +-51.78144008765355,-12.68020965944372,0 +-51.77764980580702,-12.64190289848074,0 +-51.77636296128994,-12.62038953202537,0 +-51.77567018509448,-12.60880628364959,0 +-51.77608010446,-12.58719867604337,0 +-51.77498985506058,-12.56899974958497,0 +-51.77389701502611,-12.55080201733071,0 +-51.7728044117929,-12.53260496567413,0 +-51.77340700288186,-12.51431140694604,0 +-51.77291048603011,-12.50604060519653,0 +-51.76803136045852,-12.48142332755537,0 +-51.76343697467608,-12.46176319794595,0 +-51.75904311824804,-12.44541026010501,0 +-51.75644451976265,-12.43061380193378,0 +-51.76042357473847,-12.41211860091758,0 +-51.76091282125496,-12.39216074920128,0 +-51.75492418707073,-12.37755329515186,0 +-51.75022063612366,-12.356219215752,0 +-51.74571951158357,-12.33819415373266,0 +-51.74131967354018,-12.32182296095262,0 +-51.73522606273869,-12.30554706419001,0 +-51.72734016207865,-12.28771175372151,0 +-51.72294253735484,-12.27133605695625,0 +-51.7149406596554,-12.25182208691257,0 +-51.71052495213709,-12.23542004700998,0 +-51.70580083016062,-12.21403355608151,0 +-51.69968849616097,-12.19771773732606,0 +-51.69855923985678,-12.17944916720432,0 +-51.69573423023795,-12.16127148779299,0 +-51.69301155910556,-12.14475076716074,0 +-51.69887033243089,-12.1294099384563,0 +-51.70791292891596,-12.11054404727773,0 +-51.71367932076041,-12.08804453870186,0 +-51.69932736447979,-12.07557024929497,0 +-51.68358284491048,-12.06815834073275,0 +-51.66771497607133,-12.05907656905892,0 +-51.65502953253559,-12.04648509902352,0 +-51.64723292289153,-12.03029287688568,0 +-51.64602428616008,-12.0104066865607,0 +-51.65689849464565,-11.993176998622,0 +-51.66777037153967,-11.97594838452905,0 +-51.66480286106206,-11.9241901836969,0 +-51.66231766920085,-11.91104578257985,0 +-51.65435439561455,-11.89157144976901,0 +-51.64449984905437,-11.86888164140591,0 +-51.638330897674,-11.85096253955754,0 +-51.63066536339273,-11.836449688053,0 +-51.6276888523067,-11.81502494550307,0 +-51.62152135084781,-11.79710285026367,0 +-51.61366003767641,-11.77927546615786,0 +-51.60746526301881,-11.7613430666599,0 +-51.60475688512676,-11.74487141180156,0 +-51.60902881538793,-11.73132945114297,0 +-51.61648650844235,-11.71428124357011,0 +-51.62745365599937,-11.6987087065397,0 +-51.64041393932673,-11.68801305106932,0 +-51.65686035108162,-11.6787862731965,0 +-51.66991386235158,-11.66974930807097,0 +-51.67588861125808,-11.65612130977083,0 +-51.69012083567877,-11.63870264846847,0 +-51.69927167478371,-11.62156729065459,0 +-51.70523071623156,-11.60792727871677,0 +-51.70928702876944,-11.59105560328874,0 +-51.70826453065894,-11.57446142275616,0 +-51.70724324329798,-11.55786485125482,0 +-51.70094387348122,-11.5382314015578,0 +-51.69643711719439,-11.52015637188323,0 +-51.68864850081613,-11.50392893341875,0 +-51.68255043077578,-11.48760100236423,0 +-51.67783506235854,-11.46618432860098,0 +-51.67321922050211,-11.44641978642401,0 +-51.66880743901223,-11.42997533684795,0 +-51.66608438387116,-11.41342568748215,0 +-51.66166840390989,-11.39696660407609,0 +-51.66074346622333,-11.3819828431233,0 +-51.65951003189162,-11.36199870155481,0 +-51.65909884166497,-11.35533591819592,0 +-51.6589830785849,-11.31738444060259,0 +-51.66475487917518,-11.3004385530286,0 +-51.67390716905994,-11.28330047401303,0 +-51.67977599779253,-11.2680118326909,0 +-51.68344901986227,-11.24453704710629,0 +-51.68561904709718,-11.22446296423659,0 +-51.68610039262926,-11.20448211314238,0 +-51.68708485242559,-11.19278469245972,0 +-51.6893555858092,-11.1743591702641,0 +-51.69281222850341,-11.14754431386098,0 +-51.69150430826593,-11.12598853830348,0 +-51.69377531313459,-11.10755231832636,0 +-51.6927692400937,-11.09096539484975,0 +-51.69514815130652,-11.07419171963879,0 +-51.6906609774765,-11.05613080784614,0 +-51.67971629198308,-11.04342714233218,0 +-51.66508502996153,-11.0259271636795,0 +-51.65254521510142,-11.0149683766792,0 +-51.63970098687861,-10.99902466554616,0 +-51.62725855673049,-10.98972049632668,0 +-51.62286689671577,-10.97329790030116,0 +-51.62016598239825,-10.95677764949157,0 +-51.62412647028545,-10.93821295585129,0 +-51.6296772593641,-10.91788928881005,0 +-51.63035607233739,-10.90116815906604,0 +-51.63261833423478,-10.88267633187436,0 +-51.63498174008203,-10.86584329792382,0 +-51.63226968099356,-10.84928539884858,0 +-51.63196323989853,-10.84428873804107,0 +-51.61804146384567,-10.80509635696265,0 +-51.61171725843723,-10.78381210437532,0 +-51.60587741675695,-10.77082991383789,0 +-51.59955646876126,-10.74955070757975,0 +-51.59371907442171,-10.73657128449704,0 +-51.58523746815209,-10.70709564985048,0 +-51.57705132628303,-10.68260064383038,0 +-51.56963099894531,-10.67138081174964,0 +-51.56342371882332,-10.65177108312235,0 +-51.55702835197132,-10.62884905648955,0 +-51.54932780654661,-10.61266039695008,0 +-51.53787545118559,-10.5900388416872,0 +-51.52483434477161,-10.56917512049911,0 +-51.51385913224924,-10.55484494171337,0 +-51.49643075390996,-10.54586992930357,0 +-51.48086353608992,-10.54011358190444,0 +-51.46330379188299,-10.52948555915851,0 +-51.46038890594116,-10.50971263384062,0 +-51.45253334166192,-10.49187758071823,0 +-51.44469602196074,-10.4740382779454,0 +-51.44023856598537,-10.45600541413268,0 +-51.43249920281999,-10.43981888778835,0 +-51.43031960890386,-10.43162949686594,0 +-51.40132901811627,-10.39862141034619,0 +-51.3854045147652,-10.38623386482697,0 +-51.36284832739829,-10.3758851005598,0 +-51.34572982655764,-10.37187283271955,0 +-51.32692923534346,-10.36795510788739,0 +-51.29932740462793,-10.35789393073145,0 +-51.2750925546322,-10.34763898318784,0 +-51.26610193594329,-10.33817954227109,0 +-51.25009334089503,-10.32413355641277,0 +-51.24269230389744,-10.31292322165107,0 +-51.23500587000245,-10.29674632241069,0 +-51.22721671035147,-10.27891949469199,0 +-51.2146615831833,-10.26634474770707,0 +-51.19676559397686,-10.24908636441122,0 +-51.18281251041123,-10.24156761840076,0 +-51.16548897274046,-10.23423633925412,0 +-51.14619067932426,-10.22202927307185,0 +-51.13213717644584,-10.2128479763596,0 +-51.1183696097245,-10.20863328740791,0 +-51.09897002138857,-10.19476122584362,0 +-51.09285851544371,-10.17682200752945,0 +-51.09199532143231,-10.16191355016452,0 +-51.09094032377106,-10.14369175685026,0 +-51.09007621150831,-10.12878234462024,0 +-51.08892086186246,-10.10890120139273,0 +-51.09132762308356,-10.09214640304708,0 +-51.10056874515755,-10.07667601077211,0 +-51.10802794659253,-10.05964220206598,0 +-51.11221399077274,-10.04445137778515,0 +-51.11620695518403,-10.02594662391676,0 +-51.12469573470421,-9.999380205906787,0 +-51.13366103781428,-9.97889541302222,0 +-51.13309146415403,-9.968944007793491,0 +-51.13503406434543,-9.943876542803832,0 +-51.13529317251033,-9.91890856822328,0 +-51.13266162529833,-9.902424427520181,0 +-51.12190235255487,-9.891391848420907,0 +-51.09955482169805,-9.884341360515268,0 +-51.08720901578171,-9.875060540509715,0 +-51.06803865577177,-9.864501458932999,0 +-51.05401149340607,-9.855314193086041,0 +-51.04614679503806,-9.835804496514198,0 +-51.04510108989605,-9.817578251792773,0 +-51.04246821724067,-9.801103802453541,0 +-51.03983550664852,-9.784629575505795,0 +-51.03355366432956,-9.763373722195348,0 +-51.02933458431154,-9.748650902097491,0 +-51.01502272834512,-9.734493131984063,0 +-50.99763116662758,-9.725492852219622,0 +-50.98360405706136,-9.71630328312553,0 +-50.96740430526891,-9.698923921147733,0 +-50.95840692156579,-9.6894522644841,0 +-50.92822641680122,-9.664531076541232,0 +-50.9155645816473,-9.650267822538261,0 +-50.91292761850409,-9.633784701030406,0 +-50.9086040508801,-9.617393839093547,0 +-50.90577746132602,-9.597593598701941,0 +-50.90116936622887,-9.576227046195024,0 +-50.89337808464948,-9.558359113242195,0 +-50.88399476622682,-9.542238948390795,0 +-50.86645917570411,-9.531549314520847,0 +-50.85229558648786,-9.520673096050878,0 +-50.85210613403159,-9.517356111729528,0 +-50.80232232902655,-9.515308470475516,0 +-50.78552183830802,-9.516239815825653,0 +-50.76209646100756,-9.519198299747334,0 +-50.73540608466416,-9.523997205928326,0 +-50.71534228795199,-9.526766497893446,0 +-50.69509218810539,-9.526221692088175,0 +-50.67829589339011,-9.527147192061852,0 +-50.662899672192,-9.523010288818327,0 +-50.64769078156336,-9.522185412408341,0 +-50.62567177364975,-9.520073083449253,0 +-50.60374756843311,-9.519609734205069,0 +-50.58368821213986,-9.522365014261915,0 +-50.57370465943816,-9.524570370765174,0 +-50.56204137329608,-9.52686677038554,0 +-50.52854372388287,-9.530349634427512,0 +-50.50838843802269,-9.531443864618131,0 +-50.4900976093737,-9.535759199514565,0 +-50.47675251837068,-9.538144045597836,0 +-50.4692921953768,-9.525254659779923,0 +-50.45838014709862,-9.510889614277454,0 +-50.4456938083942,-9.494954509911716,0 +-50.43943630622574,-9.473667651219618,0 +-50.43691110389655,-9.45882741785066,0 +-50.43587854912489,-9.440576014126949,0 +-50.43167228419073,-9.425819794257544,0 +-50.42214130480041,-9.406349569479474,0 +-50.41774582864173,-9.388265708357876,0 +-50.4132558715727,-9.368516944166181,0 +-50.40717804281394,-9.350513815344069,0 +-50.39456193389792,-9.336186463517533,0 +-50.38250892474289,-9.331825929232794,0 +-50.35662328215042,-9.321529145971528,0 +-50.35072949051821,-9.30683780335397,0 +-50.34959926513918,-9.286890584603659,0 +-50.350339454996,-9.27017600197772,0 +-50.35117398806142,-9.255121651348194,0 +-50.33378155291851,-9.246022980772867,0 +-50.32114432569124,-9.231654287582744,0 +-50.32356070405962,-9.214830069230075,0 +-50.3245789596568,-9.203085974288344,0 +-50.34224832695815,-9.150354920610546,0 +-50.35001510225854,-9.138282988135453,0 +-50.3574087190391,-9.119588257685406,0 +-50.36638879501067,-9.099146085448499,0 +-50.3742364971885,-9.088742053938102,0 +-50.39188218411865,-9.072815726433122,0 +-50.40308372926173,-9.062230003970379,0 +-50.42239974250759,-9.046215337759781,0 +-50.43713584703077,-9.038761509455002,0 +-50.45494685609871,-9.026156846005275,0 +-50.47787388143814,-9.014939474821524,0 +-50.49064634025533,-9.002611125439415,0 +-50.4998884668844,-8.987142268143092,0 +-50.51369519003094,-8.963124733642285,0 +-50.51611718054973,-8.946393485954294,0 +-50.52170616690331,-8.926164870004843,0 +-50.52096193079156,-8.912920430438261,0 +-50.51667840608381,-8.896543357803584,0 +-50.50746595886008,-8.882096472375945,0 +-50.49797737561303,-8.862681833623851,0 +-50.48867453528545,-8.846579040030973,0 +-50.48616836060976,-8.831767419886011,0 +-50.47835839391565,-8.812262087160926,0 +-50.47612942401517,-8.80241837132588,0 +-50.46319897389534,-8.781526835000875,0 +-50.46078096775617,-8.768363630340117,0 +-50.44896382681652,-8.737426247941432,0 +-50.44663821395115,-8.725915866399859,0 +-50.44003228890374,-8.698009681186425,0 +-50.43761367587179,-8.684837956572798,0 +-50.43305462979163,-8.663465168523038,0 +-50.43221893999499,-8.648541300243805,0 +-50.43110364989765,-8.628638440305052,0 +-50.43026240293815,-8.613698431379634,0 +-50.4190822524223,-8.594315746366103,0 +-50.41637917688389,-8.576143048698423,0 +-50.4136757609306,-8.557966785506977,0 +-50.41320921126824,-8.549663274426408,0 +-50.40858377585644,-8.494608518768269,0 +-50.40933773900027,-8.477954024429794,0 +-50.4080495134229,-8.454765108288139,0 +-50.40451513479825,-8.451632601169001,0 +-50.38014080142499,-8.436327283705365,0 +-50.36422549765941,-8.422217034784367,0 +-50.35826924927912,-8.405906731585763,0 +-50.3539883657378,-8.389504098603162,0 +-50.34635555315845,-8.373278213092851,0 +-50.34374772498204,-8.356778540539763,0 +-50.33452635103762,-8.342289565212598,0 +-50.32511693129352,-8.324477623818725,0 +-50.31579951719436,-8.308321455869452,0 +-50.3043363795049,-8.283947261837232,0 +-50.30004734152493,-8.267516446134982,0 +-50.29892360796541,-8.247581472550312,0 +-50.29621569543378,-8.229391539584904,0 +-50.28847517114424,-8.211462063863486,0 +-50.27886819931218,-8.190290823484299,0 +-50.27858679916135,-8.185302972501958,0 +-50.24994883502135,-8.164009136647158,0 +-50.24280057402322,-8.156089967392418,0 +-50.2261935497822,-8.128753741497864,0 +-50.21664311809412,-8.107715304335679,0 +-50.20719023650808,-8.088341349084946,0 +-50.2012658455818,-8.07206738389101,0 +-50.19357997416418,-8.054226461612474,0 +-50.18088243058452,-8.036666277989507,0 +-50.16557433391589,-8.032539550029352,0 +-50.1454390721209,-8.031989609749443,0 +-50.12705928818101,-8.032975507976156,0 +-50.11035032055793,-8.033871042985744,0 +-50.09039606227743,-8.036610532865932,0 +-50.06867883929077,-8.037778739383711,0 +-50.0485945515523,-8.038807124387954,0 +-50.03455395939422,-8.027889320950182,0 +-50.04563159964211,-8.01569071977036,0 +-50.05503124677065,-8.003574901265036,0 +-50.06579054466526,-7.986334324978275,0 +-50.06643244645403,-7.96796640376848,0 +-50.06224809105411,-7.953189397524221,0 +-50.05620366079098,-7.935171934135028,0 +-50.05229792932558,-7.925374201579461,0 +-50.04663818249951,-7.851906179863069,0 +-50.04917424990361,-7.836818114323845,0 +-50.04827400370107,-7.820254250862693,0 +-50.04719389122334,-7.800378690605684,0 +-50.04638392378988,-7.785472723877202,0 +-50.04354142935173,-7.764032181660288,0 +-50.03753383223509,-7.746082660755318,0 +-50.03355903927584,-7.734668258080423,0 +-50.02912663177109,-7.714969496489513,0 +-50.02451278964491,-7.69195564856967,0 +-50.02342560389288,-7.672076059873613,0 +-50.02075643636114,-7.653940340310911,0 +-50.01799709220531,-7.634147125771264,0 +-50.01709341528388,-7.617580232001721,0 +-50.01564761772293,-7.591072479341785,0 +-50.01781765122908,-7.569358745614253,0 +-50.02350836408932,-7.550776940077708,0 +-50.02937563154995,-7.535501933041326,0 +-50.03794831864936,-7.508441031925799,0 +-50.03861351890401,-7.490100433810389,0 +-50.03639116150411,-7.480228096567154,0 +-50.0303660817943,-7.462228877062079,0 +-50.02397228289241,-7.437580559077745,0 +-50.02047871565781,-7.401917126280456,0 +-50.02431511957302,-7.380120794144101,0 +-50.03343518078257,-7.363025272577087,0 +-50.03596443814796,-7.347943399885661,0 +-50.03822304445666,-7.327894288935091,0 +-50.03204220895061,-7.306635758711526,0 +-50.02234243674975,-7.282243621097944,0 +-50.0091052085445,-7.254698059952374,0 +-49.998081777583,-7.236999894182857,0 +-49.99216084520828,-7.220691755538001,0 +-49.98208571670044,-7.189645580567944,0 +-49.96930427456257,-7.170374042246733,0 +-49.95141748788478,-7.149703754337229,0 +-49.94409991337353,-7.138451073533433,0 +-49.92955416335219,-7.117600157401408,0 +-49.92363709782821,-7.101284783784552,0 +-49.91613808849959,-7.086712175074019,0 +-49.90863873428924,-7.072137998464991,0 +-49.90502419131608,-7.067337016088281,0 +-49.86822115457957,-7.053932440700006,0 +-49.85064574940913,-7.038267071576346,0 +-49.83685371747671,-7.030701939256778,0 +-49.82130349892856,-7.02157179539864,0 +-49.80408307829484,-7.012528918776692,0 +-49.78861887317664,-7.005050974133082,0 +-49.76788075184055,-6.992867921243405,0 +-49.74520891504141,-6.975800869103722,0 +-49.72420200864398,-6.958644725155488,0 +-49.71022642656673,-6.947757819706485,0 +-49.69440377616684,-6.933645140669425,0 +-49.66293433639972,-6.908727630996545,0 +-49.64860310923062,-6.891209020905963,0 +-49.63611862308197,-6.876914314537016,0 +-49.62530403784784,-6.862530857732525,0 +-49.6076301454029,-6.845181599885769,0 +-49.58836721834587,-6.829571130574708,0 +-49.57947318923662,-6.82005992151652,0 +-49.56854920110361,-6.804003039413903,0 +-49.55745254572791,-6.784631042250219,0 +-49.5482046619878,-6.768485209877982,0 +-49.5321851113547,-6.751026659540795,0 +-49.51941514934181,-6.731732157062727,0 +-49.50847395899436,-6.715651126291366,0 +-49.49585736588708,-6.699650696953299,0 +-49.492330350212,-6.696501496117651,0 +-49.47450152390989,-6.665187897790654,0 +-49.47046109290023,-6.652109960851645,0 +-49.45676149477008,-6.614620960232561,0 +-49.45061241280854,-6.593348631899388,0 +-49.43945997153551,-6.572337853903407,0 +-49.42699208037877,-6.55803985523602,0 +-49.40767635113331,-6.540776332246391,0 +-49.39986066589174,-6.519586863059891,0 +-49.39880348893618,-6.499704084040813,0 +-49.39756252979888,-6.476502017429907,0 +-49.40466141315576,-6.452861158142025,0 +-49.40711108708947,-6.436109626190514,0 +-49.40956087959456,-6.419356376587069,0 +-49.41305843697046,-6.39090682405819,0 +-49.41226093510227,-6.375981442796669,0 +-49.39758626317907,-6.351797184010444,0 +-49.38826997626751,-6.333983921566116,0 +-49.37579158827352,-6.319656934259609,0 +-49.35712243206817,-6.282920091497046,0 +-49.3559822681867,-6.261377288127572,0 +-49.35668524991671,-6.24306150798329,0 +-49.3556329937856,-6.223175496311039,0 +-49.36142629951542,-6.206254453271992,0 +-49.37046698147544,-6.18750044082615,0 +-49.3695883514019,-6.170928355543813,0 +-49.36695181734953,-6.15278857836504,0 +-49.35932752288839,-6.134902483415533,0 +-49.35213647451762,-6.125305316177342,0 +-49.33170832049674,-6.08647287612568,0 +-49.32258624530194,-6.071989358397285,0 +-49.30855192878023,-6.059423269176905,0 +-49.29100928611551,-6.043714586994194,0 +-49.28039640950742,-6.032631247339093,0 +-49.26653767635877,-6.023378208000192,0 +-49.25074989266898,-6.009238786565256,0 +-49.23662943472904,-5.995011084737427,0 +-49.23075600967261,-5.978692576036583,0 +-49.21567894492834,-5.946272120520616,0 +-49.2117353799101,-5.934841697132657,0 +-49.20244412586231,-5.917040976255804,0 +-49.19473274561302,-5.897496158322856,0 +-49.18000915854713,-5.871668372313501,0 +-49.18071727002118,-5.853348641772394,0 +-49.18493159118709,-5.838171013050047,0 +-49.18739259767987,-5.821423066476454,0 +-49.18476857422024,-5.803278282914079,0 +-49.17705946302056,-5.783737535084811,0 +-49.16277442629257,-5.766200036914913,0 +-49.15681867891375,-5.748228668177449,0 +-49.14928450024158,-5.732000713162925,0 +-49.13675317877757,-5.716031797844025,0 +-49.12080258946306,-5.698576756044615,0 +-49.10976179195809,-5.679202897839692,0 +-49.10038675876491,-5.659741158678911,0 +-49.09443061179862,-5.641763246509241,0 +-49.08847424945875,-5.623783945271927,0 +-49.0842669473791,-5.607370566026198,0 +-49.08198797830433,-5.595845532177368,0 +-49.0716008548759,-5.55752142012543,0 +-49.07082403795452,-5.542588268675992,0 +-49.07320648911127,-5.524164965913461,0 +-49.07383654237795,-5.504171254717692,0 +-49.07472534521037,-5.489155597183257,0 +-49.07368962493074,-5.469252041995082,0 +-49.07615766901075,-5.452494115382035,0 +-49.07686895431247,-5.434171026309871,0 +-49.07582710953492,-5.414277760409466,0 +-49.07320754950735,-5.396128111447517,0 +-49.07207991751523,-5.374576652053737,0 +-49.07480286055907,-5.362799159986326,0 +-49.08357851586866,-5.339071700973824,0 +-49.08954433235182,-5.325463743767325,0 +-49.08867644084314,-5.308886241796424,0 +-49.0839582655651,-5.282535243502873,0 +-49.07310238357317,-5.266476781450927,0 +-49.05848620807809,-5.242303639411438,0 +-49.05753460685668,-5.224070749193007,0 +-49.05176240479445,-5.209412399078472,0 +-49.04739586311774,-5.189695987884257,0 +-49.04302985197042,-5.1699803715435,0 +-49.03874872213067,-5.151920826029356,0 +-49.04612129963623,-5.133261957425042,0 +-49.05839715041692,-5.112685787109291,0 +-49.06453197473928,-5.102393352645777,0 +-49.07530432909667,-5.085195610391099,0 +-49.08572497972344,-5.061349497301098,0 +-49.08563736259158,-5.059689488086927,0 +-49.08202577702686,-5.022641356208629,0 +-49.07249242327581,-4.99985501702826,0 +-49.07162685408909,-4.983271555376581,0 +-49.07225220770156,-4.963286083409931,0 +-49.07637830447035,-4.946445246800684,0 +-49.07376229627086,-4.92829250513611,0 +-49.06764607987451,-4.906997261872363,0 +-49.06196308864672,-4.893992793272696,0 +-49.05908892911025,-4.870869196494203,0 +-49.05489742944086,-4.854464289543632,0 +-49.05202408739497,-4.831343367841868,0 +-49.05098709632062,-4.811452596634664,0 +-49.05152700464336,-4.789819287012786,0 +-49.05582494584132,-4.776301163237187,0 +-49.06834996929594,-4.760694192514089,0 +-49.07080893039959,-4.743948205652647,0 +-49.07956936569749,-4.720225141539543,0 +-49.08211316378254,-4.705134476105992,0 +-49.08649442795856,-4.693272409739616,0 +-49.08878600340149,-4.641810522387545,0 +-49.09116268672358,-4.623379198310219,0 +-49.09695057456288,-4.606440126541717,0 +-49.10055626473434,-4.57963360276925,0 +-49.09986415989433,-4.566365540690752,0 +-49.08999075363594,-4.536963747687649,0 +-49.0890364930211,-4.518734408050184,0 +-49.08799535105287,-4.498847553209171,0 +-49.09062558127382,-4.485417546570813,0 +-49.10130656918495,-4.466584693603137,0 +-49.11015353022618,-4.444519047912843,0 +-49.11401360549652,-4.422711986562126,0 +-49.11139803555172,-4.404567517532484,0 +-49.10537080767517,-4.384939986662228,0 +-49.09759372311466,-4.363740743060325,0 +-49.09199968969705,-4.352398433529316,0 +-49.08421887873761,-4.331192747423741,0 +-49.07345934306491,-4.316786698880616,0 +-49.06742458189089,-4.29714386983642,0 +-49.06463550200738,-4.275678927961288,0 +-49.06342345064307,-4.252472066545874,0 +-49.06054915415831,-4.229352563473413,0 +-49.06020292717636,-4.222722440386626,0 +-49.0526747826643,-4.174286356253065,0 +-49.05198415394876,-4.161019236027834,0 +-49.05086209711512,-4.139462236022513,0 +-49.04982648645604,-4.119565841682382,0 +-49.05028000679386,-4.096269852414945,0 +-49.04915825378453,-4.074720675041879,0 +-49.04795066887542,-4.051516944936308,0 +-49.0469112080298,-4.031632023045826,0 +-49.04613025880082,-4.016718501069937,0 +-49.04526265445829,-4.00014708744028,0 +-49.04710917062475,-3.971800600326863,0 +-49.05113746766719,-3.953309290260709,0 +-49.05971516713362,-3.926267914824003,0 +-49.0670661826331,-3.907598545233298,0 +-49.07957551498225,-3.891983533829246,0 +-49.085527346641,-3.878374603438719,0 +-49.08474662897726,-3.863452805541436,0 +-49.08545166793397,-3.845117550869323,0 +-49.07942375031857,-3.82546794131931,0 +-49.07164637429852,-3.804242537134053,0 +-49.06963653628429,-3.797690727513341,0 +-49.07943682135649,-3.762061714548357,0 +-49.0886274929119,-3.746617583047338,0 +-49.09117080151182,-3.73151270890285,0 +-49.08829603759938,-3.708368862797559,0 +-49.08061092753199,-3.688810514905434,0 +-49.06934124055627,-3.664469093120598,0 +-49.06690021437397,-3.649632555016044,0 +-49.06079052036947,-3.628336460542676,0 +-49.05310678642394,-3.608785358732387,0 +-49.04699803512185,-3.58749085039762,0 +-49.03748046185856,-3.564711959598645,0 +-49.02664770276711,-3.54865118906027,0 +-49.00934293682776,-3.536251207006684,0 +-48.99553368108953,-3.526993872934633,0 +-48.97980304715998,-3.512848186427519,0 +-48.97220238638462,-3.494952693821928,0 +-48.96801105659475,-3.478541769159712,0 +-48.96591537316744,-3.470335889821883,0 +-48.94791058927936,-3.444660431344307,0 +-48.94214393511935,-3.429990457944933,0 +-48.93952634560765,-3.41182970294447,0 +-48.93865589763522,-3.395239215701785,0 +-48.93752420812582,-3.373669553185547,0 +-48.943574614164,-3.298480715222231,0 +-48.94569402278817,-3.275071539874568,0 +-48.95087786953698,-3.246513747654699,0 +-48.95674831394545,-3.231235056441089,0 +-48.95580126599738,-3.212984284697548,0 +-48.95625718965901,-3.189671604443511,0 +-48.95548244739482,-3.1747415066442,0 +-48.94868914085213,-3.140169716308745,0 +-48.94241264480833,-3.115551876319058,0 +-48.93596236215453,-3.087618726527769,0 +-48.93492258842737,-3.067719420626868,0 +-48.93396942110099,-3.049477604892089,0 +-48.93318958589127,-3.034551939102355,0 +-48.93197647007587,-3.011333250208522,0 +-48.93076328915583,-2.988113389113206,0 +-48.93137980338999,-2.968120889132459,0 +-48.93566696925595,-2.954590564421106,0 +-48.94773805719999,-2.930673887360217,0 +-48.95526111644679,-2.915309970464637,0 +-48.95736642712239,-2.891906230708968,0 +-48.95938585129961,-2.866841531311129,0 +-48.96157912431055,-2.845093927904492,0 +-48.9605364695236,-2.825175606045852,0 +-48.95949191448531,-2.805251305767073,0 +-48.95923001730426,-2.80026810105836,0 +-48.93912543339102,-2.766291600721726,0 +-48.9262923933402,-2.74365050616438,0 +-48.91197377582352,-2.724415389386482,0 +-48.90455874626536,-2.70981713107384,0 +-48.88683610810139,-2.689099240911734,0 +-48.86954274422529,-2.676684058811327,0 +-48.84035459944071,-2.65990658921117,0 +-48.82838020402456,-2.653876939469572,0 +-48.80583827591394,-2.636749704782689,0 +-48.79499947799544,-2.620682114072415,0 +-48.78888727111007,-2.599375458991645,0 +-48.77778765893775,-2.578327228976041,0 +-48.77001245812809,-2.557103793133695,0 +-48.77238719027735,-2.538678754038633,0 +-48.77940314051722,-2.513357984577562,0 +-48.77040121777926,-2.500514651285116,0 +-48.75930488968335,-2.479459689570739,0 +-48.74846716822204,-2.463381547079079,0 +-48.74252496677821,-2.445384191732627,0 +-48.74331871451903,-2.428701833990297,0 +-48.74717674089838,-2.40686824243864,0 +-48.74945920051181,-2.386779494104284,0 +-48.752002266681,-2.371669700257844,0 +-48.76102078622474,-2.352897750451557,0 +-48.7699465515845,-2.332462558409408,0 +-48.77388659163508,-2.312283089464075,0 +-48.78670927751841,-2.269465422655237,0 +-48.79371920677726,-2.244145008322169,0 +-48.79643660721973,-2.232357717130993,0 +-48.79628525265818,-2.197427503328273,0 +-48.79622284032748,-2.16415648833475,0 +-48.79842520149835,-2.142414549056844,0 +-48.79730471422214,-2.120845303756591,0 +-48.80116277501573,-2.099016878950609,0 +-48.80501490633004,-2.077185890511157,0 +-48.80738001357498,-2.058758571054059,0 +-48.8062484098137,-2.037182035473364,0 +-48.80861373851243,-2.018752405125086,0 +-48.80774329055691,-2.002152774905756,0 +-48.80739521960277,-1.995512654140511,0 +-48.80226683792956,-1.960269954516395,0 +-48.79868819444657,-1.955464467855182,0 +-48.77896066216775,-1.928206254968456,0 +-48.77153836149709,-1.913620006708592,0 +-48.77050119868167,-1.893709552018253,0 +-48.76631467107081,-1.877290045280557,0 +-48.7584599081861,-1.854405472419795,0 +-48.75243907126517,-1.834752247181432,0 +-48.75638613435525,-1.814581635163039,0 +-48.76907124183716,-1.802277777571538,0 +-48.78665196115104,-1.788057346892862,0 +-48.7759084414306,-1.773639939450634,0 +-48.76061264905008,-1.767775972206343,0 +-48.74182033493195,-1.758764271978954,0 +-48.71242114696176,-1.724795847658021,0 +-48.69006304015061,-1.71098507030016,0 +-48.67443888476329,-1.698491330750161,0 +-48.66422395894814,-1.694032182619197,0 +-48.64013090399525,-1.678651513041556,0 +-48.62284804261984,-1.66624356668274,0 +-48.60373397127578,-1.65060430943222,0 +-48.59317518717602,-1.639510404661257,0 +-48.58899539158165,-1.623096257830222,0 +-48.58953531016163,-1.601447896615182,0 +-48.59688449779788,-1.582772415373773,0 +-48.60606672442808,-1.567322270804883,0 +-48.61150161262133,-1.543744567777122,0 +-48.61553536120181,-1.52522845272195,0 +-48.60969760589278,-1.508887071519401,0 +-48.59109725900793,-1.50319533093498,0 +-48.57266881011606,-1.500823718921731,0 +-48.55406789061619,-1.495131408581334,0 +-48.53869954727912,-1.487606041720768,0 +-48.52988307507047,-1.478074825750976,0 +-48.52106932657147,-1.468556114562128,0 diff --git a/R-utils/roads/br163.csv b/R-utils/roads/br163.csv new file mode 100644 index 000000000..993c5e2da --- /dev/null +++ b/R-utils/roads/br163.csv @@ -0,0 +1,1652 @@ +-54.73748493052535,-2.415820944121672,0 +-54.7374593302528,-2.415971622363724,0 +-54.73743383571072,-2.416084716057507,0 +-54.73740816861936,-2.416248149619766,0 +-54.73739506370451,-2.416387009047049,0 +-54.73738196840729,-2.416513464460196,0 +-54.73734382584219,-2.416639574621506,0 +-54.73731828785841,-2.4167776083105,0 +-54.73728016325104,-2.416940481644592,0 +-54.73722953058162,-2.41707870084412,0 +-54.73720391977405,-2.417229733774458,0 +-54.73717838243879,-2.417368019622867,0 +-54.73714032167312,-2.417518587045213,0 +-54.73712746045084,-2.417631177286363,0 +-54.73710189876229,-2.417806233301564,0 +-54.73707645888112,-2.417943678845848,0 +-54.73703854324712,-2.418068436299258,0 +-54.7369754929869,-2.418218133126023,0 +-54.73692480511288,-2.418405478824181,0 +-54.73688671686387,-2.418568008359582,0 +-54.73686131521509,-2.418705607560979,0 +-54.73684848185074,-2.418830641279601,0 +-54.7368356574699,-2.418955590733831,0 +-54.7368228996873,-2.419055485048582,0 +-54.73678497311133,-2.419192827309088,0 +-54.73674708468877,-2.41933008283422,0 +-54.73673425423856,-2.419454877318883,0 +-54.73670895742082,-2.419567114024136,0 +-54.73667107486177,-2.41971669626236,0 +-54.7366706995653,-2.419829200868753,0 +-54.7366701698967,-2.419979343071323,0 +-54.736669772894,-2.420091990747682,0 +-54.73665660123173,-2.420279777535005,0 +-54.73660612152452,-2.420404865160735,0 +-54.73658082166354,-2.420517051235233,0 +-54.73653050755752,-2.420666217060327,0 +-54.73646775208795,-2.420790440520332,0 +-54.73645508257867,-2.420902187248513,0 +-54.73642993186061,-2.421001465062289,0 +-54.7362664721073,-2.421725930611522,0 +-54.73618484937735,-2.422021659493241,0 +-54.73610267783517,-2.422316357176291,0 +-54.73602045983164,-2.422719574663711,0 +-54.73593873045771,-2.423069387056609,0 +-54.73583032444745,-2.423338282166912,0 +-54.73561288027056,-2.423956567085979,0 +-54.73550383756263,-2.424333052653974,0 +-54.73550272856791,-2.424763594778506,0 +-54.73550208738386,-2.42516681501493,0 +-54.73552820064441,-2.425569983137075,0 +-54.73552749978367,-2.425865578802177,0 +-54.73544595985314,-2.426107442428739,0 +-54.73531048193115,-2.426376078452941,0 +-54.73522874840508,-2.426671794405423,0 +-54.73517393364901,-2.426967613708683,0 +-54.73514612705924,-2.427236623272564,0 +-54.7350913355359,-2.427532434126315,0 +-54.7350635145169,-2.4278282298539,0 +-54.7350360753647,-2.42812325450189,0 +-54.73503568795304,-2.428391235959349,0 +-54.73498107340923,-2.428686599033154,0 +-54.73487261810192,-2.42900853600533,0 +-54.73479128748686,-2.429249956228368,0 +-54.7347636078103,-2.429518604640037,0 +-54.7346819742078,-2.429840798009684,0 +-54.73462722949356,-2.430163110369738,0 +-54.73449235490678,-2.430457008259947,0 +-54.73443836445502,-2.430644001184633,0 +-54.73414654637032,-2.431717812141899,0 +-54.73407605262764,-2.432105162407861,0 +-54.73404104476315,-2.432246433367971,0 +-54.7337596770429,-2.433054125310493,0 +-54.73361899219869,-2.433404653997788,0 +-54.73354766693465,-2.43375388293855,0 +-54.73350956330306,-2.434487069279427,0 +-54.73350596566949,-2.435114391617481,0 +-54.73336479552005,-2.4356049218328,0 +-54.73325781880457,-2.436129480868584,0 +-54.73308170106159,-2.436514415031234,0 +-54.73290557222235,-2.437039681214054,0 +-54.73272845527075,-2.437493836551115,0 +-54.73272772126484,-2.437738920954945,0 +-54.73258436147523,-2.438332968813418,0 +-54.7325119046407,-2.438647341757085,0 +-54.73240406456313,-2.439031876719016,0 +-54.73222708732901,-2.439451806781011,0 +-54.732120585266,-2.439766860138542,0 +-54.73201452896504,-2.44015211857683,0 +-54.73194390818515,-2.440537434903643,0 +-54.73180051290601,-2.441062775087029,0 +-54.73169359513769,-2.441342988339972,0 +-54.73144699457484,-2.441867974840306,0 +-54.73127007518804,-2.44214805201907,0 +-54.73109497360548,-2.442532668310878,0 +-54.73102472394839,-2.442917579361566,0 +-54.73102418222049,-2.443267775560628,0 +-54.73102358461175,-2.443652921359309,0 +-54.73102293322224,-2.444072995996029,0 +-54.73095359754548,-2.444491849419963,0 +-54.7309536955056,-2.44456168823155,0 +-54.73025955518065,-2.448092496862967,0 +-54.72978336587364,-2.448945336078033,0 +-54.72940158555742,-2.449892941403778,0 +-54.72901952173975,-2.450935161565046,0 +-54.72901576142705,-2.451978410193002,0 +-54.72901233940529,-2.452926956561818,0 +-54.72891257091504,-2.45406533495043,0 +-54.72862472306744,-2.45491845054819,0 +-54.72814266388936,-2.456815392771541,0 +-54.72794979076433,-2.457574349736203,0 +-54.72784879513384,-2.458904242285318,0 +-54.72784475673168,-2.459949141025541,0 +-54.7278428704379,-2.460991993526537,0 +-54.72746563476369,-2.461933724339361,0 +-54.72717784563285,-2.46288151377938,0 +-54.72765402199378,-2.463825742510064,0 +-54.7276540205238,-2.464014593024211,0 +-54.72765390105226,-2.466485811281693,0 +-54.72784282932355,-2.467437616615423,0 +-54.72793469273347,-2.468480077027133,0 +-54.72821644274708,-2.46942838393131,0 +-54.72878074344631,-2.470660050833045,0 +-54.72896691311809,-2.47170201735929,0 +-54.72915336827253,-2.472649318701035,0 +-54.72943636084108,-2.473789538500698,0 +-54.72962137363369,-2.474829987565282,0 +-54.72971338718483,-2.475777481152034,0 +-54.72980513382046,-2.476819678010687,0 +-54.72999182726655,-2.477767307749891,0 +-54.73027320672245,-2.478715149654678,0 +-54.73045990986524,-2.479662819887114,0 +-54.7305513804944,-2.480609989686455,0 +-54.73073688364968,-2.481746959721717,0 +-54.73083260197969,-2.482790064262477,0 +-54.73120903459539,-2.483737886483032,0 +-54.73148837275993,-2.484780311426337,0 +-54.73195832564872,-2.485634469856551,0 +-54.7325232374403,-2.486867717247235,0 +-54.73299432917236,-2.487816530515048,0 +-54.73308813884815,-2.488856048924368,0 +-54.73318193064708,-2.489800078123386,0 +-54.73337023342499,-2.490743548561509,0 +-54.7339364969764,-2.491781908273416,0 +-54.73478666743296,-2.492443946041067,0 +-54.73554204973617,-2.493011238514783,0 +-54.73639085486838,-2.493860491187214,0 +-54.73667201882764,-2.494705810746305,0 +-54.73638604144505,-2.495639870841736,0 +-54.73581906844409,-2.496552133389731,0 +-54.73506725056834,-2.497180527932956,0 +-54.73422425283209,-2.497624421714749,0 +-54.73329175335106,-2.49796887626821,0 +-54.73245571749528,-2.498406853534009,0 +-54.7316208827514,-2.498756247734284,0 +-54.73078252864244,-2.499304535869131,0 +-54.73021943108571,-2.500051125748041,0 +-54.72974790424234,-2.500894556020561,0 +-54.72890346278067,-2.50173542714624,0 +-54.72852362627501,-2.502675060728544,0 +-54.72814950179313,-2.502860465649854,0 +-54.72687083368829,-2.505079768340523,0 +-54.72621488219012,-2.505744389532498,0 +-54.72583964371859,-2.50640603899621,0 +-54.72518071105946,-2.507603206167766,0 +-54.72480499842158,-2.508641229441785,0 +-54.72405412303337,-2.509378089109365,0 +-54.72395652137084,-2.510398763798043,0 +-54.72395244814911,-2.511420701805489,0 +-54.72376189098386,-2.512256017262911,0 +-54.72375775851145,-2.513279072010186,0 +-54.7237540002109,-2.514209631743998,0 +-54.72375067079849,-2.515047791727842,0 +-54.72374578092677,-2.516353489903323,0 +-54.72374165568667,-2.517378853946286,0 +-54.72355101997753,-2.518312578297922,0 +-54.72298536760646,-2.519339205497086,0 +-54.72288810502624,-2.520367473951777,0 +-54.72279084439027,-2.521396017113751,0 +-54.72278693092229,-2.522518534636093,0 +-54.72269029858563,-2.523360358281967,0 +-54.72268702601214,-2.524296143328017,0 +-54.72268342711982,-2.525325708580394,0 +-54.72268015075254,-2.526261864753679,0 +-54.72267702205212,-2.527198297169615,0 +-54.72267356045387,-2.528322316963664,0 +-54.72267067517242,-2.52925902296409,0 +-54.72266808029105,-2.53010207708263,0 +-54.72285208666899,-2.531226749583469,0 +-54.72294268001869,-2.532257494875335,0 +-54.72303329553981,-2.533288253535955,0 +-54.72303041355694,-2.534225078484213,0 +-54.72302753057615,-2.535161925781866,0 +-54.72302407110749,-2.536286173158182,0 +-54.72311440593182,-2.537410699840469,0 +-54.72311098405181,-2.5385349173065,0 +-54.72310866340376,-2.53928449977726,0 +-54.72291739288306,-2.540501931953209,0 +-54.72282034559244,-2.54162551658544,0 +-54.72281750416293,-2.542562355221976,0 +-54.72281465912126,-2.543499201365397,0 +-54.72290571855448,-2.5443431825016,0 +-54.72309042826722,-2.545280649652557,0 +-54.72308672600093,-2.546498634265522,0 +-54.723177372793,-2.547529525421005,0 +-54.7231765195308,-2.54781059879208,0 +-54.7226170457627,-2.551212569552025,0 +-54.7223280282162,-2.55292508989484,0 +-54.72203988353677,-2.554351893985646,0 +-54.72175199417696,-2.555634567305083,0 +-54.72174746203716,-2.557055528027784,0 +-54.72174247818683,-2.558618723701459,0 +-54.72173716934469,-2.560180713440947,0 +-54.72173155165175,-2.561741845048035,0 +-54.72172695170634,-2.563019515109716,0 +-54.72172184502938,-2.56443954472432,0 +-54.72171264276629,-2.566996665609691,0 +-54.72170855240454,-2.568133589361665,0 +-54.7217012459729,-2.570410272407619,0 +-54.72169750406389,-2.571691782159538,0 +-54.7212625316626,-2.574253299178536,0 +-54.72111504073573,-2.575961266547724,0 +-54.72096923426629,-2.577099704398957,0 +-54.72096311099774,-2.579235035966132,0 +-54.72081554547158,-2.581085074180762,0 +-54.72038356408405,-2.583076214646239,0 +-54.71995077173664,-2.584924687129297,0 +-54.71951890603341,-2.586488491715273,0 +-54.71951392814049,-2.588053813996686,0 +-54.71965246685939,-2.589476776741144,0 +-54.71979095079272,-2.591041420784647,0 +-54.71978696226966,-2.592605355644227,0 +-54.71978468162258,-2.5934584416041,0 +-54.71962022237664,-2.595716816039182,0 +-54.71977067951113,-2.596565397033424,0 +-54.71984113986857,-2.597799652040521,0 +-54.71998893944541,-2.599112549113894,0 +-54.71998339705789,-2.600039419030144,0 +-54.71989899187756,-2.601121206611887,0 +-54.71989434048805,-2.601894852351321,0 +-54.71988991849008,-2.602747421213692,0 +-54.7198839443446,-2.603598440592521,0 +-54.71988141467827,-2.604063844747615,0 +-54.71995735048934,-2.604920657994724,0 +-54.72003146732497,-2.605931598651844,0 +-54.72033950798451,-2.606631542780408,0 +-54.72080388645465,-2.607410600908808,0 +-54.72158353993409,-2.60827164003611,0 +-54.72212746298796,-2.608974097593598,0 +-54.72235982563777,-2.609441586060861,0 +-54.72290440408027,-2.609754715984981,0 +-54.72430192479584,-2.610847368283164,0 +-54.72492219875514,-2.611471003928262,0 +-54.72653626125047,-2.613709860394397,0 +-54.72715827497514,-2.614334808947423,0 +-54.72785771320331,-2.614959633733523,0 +-54.72831903354947,-2.615580237609481,0 +-54.7289324692489,-2.616276554160495,0 +-54.7297018762045,-2.61697355822175,0 +-54.73031618295586,-2.617670805220097,0 +-54.73100853226741,-2.618290388286926,0 +-54.73170126306562,-2.618910333929341,0 +-54.73216233674326,-2.619453343463328,0 +-54.73277830467737,-2.620074197482027,0 +-54.73362654372247,-2.620850793513005,0 +-54.73424674449507,-2.621318493603374,0 +-54.73494914463049,-2.621867573246743,0 +-54.73581267531033,-2.622498817997994,0 +-54.73628375648207,-2.622736595920787,0 +-54.73714651731337,-2.623289185060182,0 +-54.73808662335189,-2.623997776825036,0 +-54.73847760349825,-2.62446818008422,0 +-54.73910327761414,-2.625095860217166,0 +-54.73957151301779,-2.625877979726476,0 +-54.73988303977367,-2.626814915098838,0 +-54.74027330307279,-2.627674231839726,0 +-54.74261144943768,-2.630810613250663,0 +-54.74406402159417,-2.631846276363228,0 +-54.74522626094973,-2.632445303305583,0 +-54.74667536771974,-2.633334138236927,0 +-54.74840781537277,-2.633786734243505,0 +-54.74984715848665,-2.63422990152256,0 +-54.75128485051023,-2.634382364781264,0 +-54.75300970028323,-2.634536634091267,0 +-54.75458978530275,-2.634833085813745,0 +-54.75688696773091,-2.6351318402365,0 +-54.75860756121875,-2.635711643151417,0 +-54.75989646800534,-2.636575873747316,0 +-54.76162064697573,-2.637461156611796,0 +-54.7634823897009,-2.638036016763484,0 +-54.76548735988077,-2.638753174621233,0 +-54.76735082058936,-2.639189418754503,0 +-54.76878315671796,-2.639758857966148,0 +-54.76949960265028,-2.640043685917122,0 +-54.77093372185067,-2.64033256665557,0 +-54.77322816565355,-2.640911049708574,0 +-54.77466298411523,-2.641057534855612,0 +-54.77738715264106,-2.641783942623556,0 +-54.77882131540908,-2.642217090391732,0 +-54.78068812102754,-2.642361898228696,0 +-54.78212119536308,-2.642655939753091,0 +-54.78413084764391,-2.643231215252755,0 +-54.78571156154207,-2.643803430391322,0 +-54.78730393823628,-2.644358902694437,0 +-54.789044258456,-2.644770798781487,0 +-54.79064216344761,-2.645328284831958,0 +-54.79237963396685,-2.645465102762292,0 +-54.79440854304585,-2.645744667510117,0 +-54.79600002614569,-2.645886613284702,0 +-54.79759226785092,-2.646172337316162,0 +-54.799465772087,-2.646609428636084,0 +-54.80059685140083,-2.647205010571271,0 +-54.8023155687999,-2.648079074280326,0 +-54.80375092131754,-2.648230361008869,0 +-54.80489873548083,-2.648380197046936,0 +-54.81013954194746,-2.649268508896482,0 +-54.81320357356688,-2.650119965368108,0 +-54.81654530794263,-2.650972437452687,0 +-54.81932762881616,-2.652101013741789,0 +-54.82238348790703,-2.653240948874395,0 +-54.8248869586107,-2.65436310452212,0 +-54.82767072530935,-2.656036520432998,0 +-54.8298916790039,-2.658272022253304,0 +-54.83239138885776,-2.660230183588003,0 +-54.83405514974465,-2.662185416285717,0 +-54.83627239969584,-2.664977573260355,0 +-54.83821715389113,-2.66720804903485,0 +-54.84072033366255,-2.669995143408309,0 +-54.84321953825611,-2.672229774442429,0 +-54.84599679299763,-2.674187055551441,0 +-54.84877422518559,-2.676699823846115,0 +-54.85210935142444,-2.678935893830171,0 +-54.85461058175336,-2.680612868710121,0 +-54.85739251606161,-2.681455966724341,0 +-54.86017656354984,-2.682854724666044,0 +-54.86323978095733,-2.684532584212528,0 +-54.86546709722217,-2.685930110507188,0 +-54.86824291743593,-2.687886475762093,0 +-54.87074047321396,-2.68956350836608,0 +-54.87323766341456,-2.691240282877903,0 +-54.87656833471936,-2.692919207469,0 +-54.87850536192827,-2.694593752224806,0 +-54.88155213712982,-2.696549127544374,0 +-54.88433602022835,-2.697948059594436,0 +-54.88489299611886,-2.697949669758759,0 +-54.89129093288147,-2.70550824464268,0 +-54.89351281300616,-2.708015441573892,0 +-54.89517134820012,-2.709979015524102,0 +-54.89710198373774,-2.713334612058858,0 +-54.8979368752329,-2.715275547783019,0 +-54.89876983630161,-2.720268965216547,0 +-54.89876648009863,-2.723045836002103,0 +-54.8995925597591,-2.726386876111604,0 +-54.8995764878506,-2.729730878165474,0 +-54.90011884417996,-2.733073957753421,0 +-54.90010574914857,-2.736135839833761,0 +-54.90037105066598,-2.739197652207748,0 +-54.90036031693626,-2.741701497412161,0 +-54.9006243340108,-2.745039863338604,0 +-54.90061327852865,-2.747820216751266,0 +-54.90087865327717,-2.751434523055344,0 +-54.90086418382359,-2.756159153256073,0 +-54.90085657869231,-2.759494446927689,0 +-54.90085086835695,-2.761996201845851,0 +-54.90139263255362,-2.765331351418522,0 +-54.90165055867159,-2.768940425124178,0 +-54.90192471367843,-2.772556397964658,0 +-54.90192249112336,-2.775338798443761,0 +-54.90218822105979,-2.779229458983377,0 +-54.90189962672583,-2.78256289332106,0 +-54.90160666196982,-2.787285253318087,0 +-54.90159456142695,-2.790059626284875,0 +-54.90074976453855,-2.793669570996947,0 +-54.90046252673558,-2.797282771946065,0 +-54.90017737040301,-2.800062194782708,0 +-54.89961259952455,-2.803397168779616,0 +-54.89932878568662,-2.805620883001635,0 +-54.89904142901188,-2.809235107875389,0 +-54.89847708018301,-2.812292376137742,0 +-54.89818640506721,-2.815620679986614,0 +-54.89789754030824,-2.818392878038025,0 +-54.89789221919927,-2.819779200795136,0 +-54.89787416117822,-2.824491800709119,0 +-54.8984187648246,-2.82754201972654,0 +-54.89784762772825,-2.831419401508939,0 +-54.8978380657036,-2.833912561600922,0 +-54.89783478880565,-2.835303047754192,0 +-54.89697178189973,-2.846190496713778,0 +-54.89779729656674,-2.850081320316302,0 +-54.89807086065058,-2.855083207944051,0 +-54.89807316559552,-2.85730779298625,0 +-54.89917496267954,-2.861480519433595,0 +-54.9013865791078,-2.864542129698372,0 +-54.90415290713067,-2.866212912809401,0 +-54.907200735018,-2.867607531683244,0 +-54.90858231559365,-2.870110543341077,0 +-54.90996033222202,-2.874002246003942,0 +-54.91134263777443,-2.876783555546246,0 +-54.91216957825181,-2.879563702221265,0 +-54.91494389448002,-2.882349961501057,0 +-54.91606308123722,-2.884584250793818,0 +-54.91773765397089,-2.887098591305133,0 +-54.91830964208646,-2.889897225201919,0 +-54.91860569200421,-2.892699396777899,0 +-54.91916891148774,-2.895216052202313,0 +-54.92001688222874,-2.901368676348274,0 +-54.92112684154409,-2.905834289201441,0 +-54.92195284332381,-2.909456487417862,0 +-54.9222245149572,-2.912242718306792,0 +-54.92249422943574,-2.915864931266609,0 +-54.92220762287933,-2.919487405607179,0 +-54.92247931610212,-2.922274028948801,0 +-54.92333128829022,-2.924813072664609,0 +-54.92442395634853,-2.927861162853831,0 +-54.92664957396946,-2.932893218634343,0 +-54.92692786733137,-2.933452488716672,0 +-54.92830249481414,-2.940781935738543,0 +-54.92915298172329,-2.942714321751142,0 +-54.93107183488419,-2.94664300565726,0 +-54.93494001666626,-2.953908969276654,0 +-54.93522439377401,-2.958074893588133,0 +-54.93523057879927,-2.961407416974262,0 +-54.93523521255846,-2.963907830797554,0 +-54.93551726513498,-2.966689173075966,0 +-54.93552612792927,-2.971416302840174,0 +-54.93552224683995,-2.97420263795223,0 +-54.93549390377344,-2.977834789358839,0 +-54.93519424768596,-2.980626192329285,0 +-54.93461903170809,-2.983136247150774,0 +-54.93403752686239,-2.986482564400661,0 +-54.9328863175146,-2.99010704293544,0 +-54.93170431337805,-2.995124965380918,0 +-54.93080622700173,-2.998189303790883,0 +-54.93049417516389,-3.001804122907732,0 +-54.93055434316464,-3.005974150783001,0 +-54.93058547572035,-3.007923636288147,0 +-54.93055242561918,-3.013489522408563,0 +-54.93026097209296,-3.017385085663026,0 +-54.92968275588075,-3.020999017373642,0 +-54.92967802479735,-3.025732763235659,0 +-54.92942086871614,-3.027969062075738,0 +-54.92917634418358,-3.031607718493587,0 +-54.92862286383944,-3.034956997500241,0 +-54.92834121502153,-3.038304730508429,0 +-54.92834066091113,-3.038862809664501,0 +-54.92752002046625,-3.043619187589616,0 +-54.92693566035602,-3.047511386394872,0 +-54.92663954636349,-3.051409679183783,0 +-54.92579175541309,-3.05475233899219,0 +-54.92578428849676,-3.057261234187114,0 +-54.92549329094275,-3.060324265054918,0 +-54.92543141595528,-3.064733127076118,0 +-54.92542731586603,-3.068640561983702,0 +-54.92543373425568,-3.071722671585939,0 +-54.92544615958297,-3.074534092129273,0 +-54.92516831422707,-3.077612389594301,0 +-54.92519166789923,-3.081282187785019,0 +-54.92518496641497,-3.084073578013426,0 +-54.92601966172842,-3.0874324052232,0 +-54.92741657605064,-3.090798133761581,0 +-54.92741588963909,-3.091077361260316,0 +-54.92868219750434,-3.10485389819969,0 +-54.93030787374232,-3.110943351242138,0 +-54.9330393445637,-3.116478822291078,0 +-54.93522307937609,-3.12090750241171,0 +-54.93849834773714,-3.12754699345348,0 +-54.94175999092367,-3.136393678209334,0 +-54.94448079117743,-3.143025792153998,0 +-54.94720725610993,-3.14855072209224,0 +-54.9505390223627,-3.155665355081104,0 +-54.95160498094504,-3.161192254417386,0 +-54.95268403799102,-3.164509238164915,0 +-54.95536646051178,-3.174453564823886,0 +-54.95589420600258,-3.180508181820271,0 +-54.95642478262595,-3.18820726006702,0 +-54.9569601104098,-3.194256872030317,0 +-54.95584573060025,-3.197554865270678,0 +-54.9547235707973,-3.203601929761303,0 +-54.95413615068697,-3.214049796771091,0 +-54.95355519879489,-3.221747344683813,0 +-54.95077436062,-3.227238775762921,0 +-54.94859950035785,-3.233826118854867,0 +-54.94638590207455,-3.239869962146721,0 +-54.94582806013824,-3.243718973499829,0 +-54.94360968411754,-3.252515780546352,0 +-54.94195630011722,-3.260770211485165,0 +-54.94140250714785,-3.265725755014531,0 +-54.93918329809141,-3.272877780383772,0 +-54.93750634968404,-3.280578810096159,0 +-54.93749770562021,-3.283330476920421,0 +-54.93637332412596,-3.290481952565846,0 +-54.93522115648607,-3.299263616705046,0 +-54.93515115331349,-3.306366463914123,0 +-54.93455096058304,-3.312377107940565,0 +-54.93343535072739,-3.320076705077623,0 +-54.93177465539516,-3.323370061938145,0 +-54.92791426371354,-3.33052518415604,0 +-54.92625134008608,-3.337130646743705,0 +-54.92569003670946,-3.343189182782379,0 +-54.92513508424884,-3.346496939578705,0 +-54.92344818380385,-3.357484543187455,0 +-54.9217867029209,-3.3613337608228,0 +-54.91626711742899,-3.368492689639238,0 +-54.91514885691987,-3.373988201389837,0 +-54.91459543184215,-3.375088704346509,0 +-54.91182028647227,-3.399896994012041,0 +-54.91290318486264,-3.405408788645277,0 +-54.91287507771656,-3.412568839245411,0 +-54.91284912093565,-3.419175995520655,0 +-54.91117446240064,-3.425226004843902,0 +-54.90839672990008,-3.429620447426067,0 +-54.90340133130834,-3.436755742714349,0 +-54.90007857132204,-3.441695873423719,0 +-54.89785835789395,-3.446638588693727,0 +-54.89562962863139,-3.454329706310461,0 +-54.89340646661148,-3.460370327122503,0 +-54.89007831260874,-3.467505943467946,0 +-54.88785513857125,-3.474096333739124,0 +-54.886743833309,-3.477946201577578,0 +-54.88507591113731,-3.48399757378569,0 +-54.88174170285988,-3.495003943067841,0 +-54.88007093433027,-3.501610274626887,0 +-54.87784320740196,-3.509864014342381,0 +-54.87616850610402,-3.517010185320643,0 +-54.8739446881283,-3.523610800337634,0 +-54.87226747962861,-3.531869987394376,0 +-54.872252138024,-3.537387286756703,0 +-54.87223063011581,-3.545113917320563,0 +-54.87221530846281,-3.550634637079874,0 +-54.87219994729558,-3.556156794317348,0 +-54.87052469718351,-3.56333082807544,0 +-54.86941306032998,-3.566072253485303,0 +-54.85725631858205,-3.573539634868973,0 +-54.8522794838959,-3.578491092228387,0 +-54.84785793840815,-3.58122237963487,0 +-54.8412246581759,-3.58615640682915,0 +-54.83625380728052,-3.589453160000836,0 +-54.83458886617974,-3.594413211200021,0 +-54.8362278604823,-3.599923845310727,0 +-54.83952421634664,-3.604893281444702,0 +-54.84171451892549,-3.610960095373386,0 +-54.84390122548361,-3.618126131922308,0 +-54.84609094628366,-3.623636352705356,0 +-54.84772774633188,-3.629694931692805,0 +-54.84936512675796,-3.636863009272544,0 +-54.85265839232447,-3.642934286551705,0 +-54.85318946464177,-3.650639127486146,0 +-54.85042370798111,-3.654478111831269,0 +-54.84711088114525,-3.657217208848621,0 +-54.84104145664141,-3.6604971457218,0 +-54.83551301791471,-3.665976362020689,0 +-54.83220872759533,-3.670369032799355,0 +-54.82834259111139,-3.675853877732348,0 +-54.8255512854571,-3.682440564185605,0 +-54.8222101938354,-3.687931543254209,0 +-54.8210847912577,-3.693430073391517,0 +-54.82108641394403,-3.700021622180047,0 +-54.82104152041654,-3.70663401204588,0 +-54.81882978189508,-3.712122234069422,0 +-54.81772113589885,-3.717611420894415,0 +-54.81716144627018,-3.72529534694763,0 +-54.81660448732689,-3.730780719527855,0 +-54.81659102082639,-3.737369196015727,0 +-54.81656797175854,-3.742873169651151,0 +-54.81925021003597,-3.760275806021013,0 +-54.81979209733623,-3.766351753063921,0 +-54.81976945667817,-3.772940366688983,0 +-54.81974864187468,-3.778426221030803,0 +-54.8197302734374,-3.786135447238334,0 +-54.82136494171491,-3.792740713465842,0 +-54.82133560124606,-3.800422775051296,0 +-54.82187364850888,-3.803716274891447,0 +-54.82349655692887,-3.811403387179729,0 +-54.82403695817679,-3.814149390572674,0 +-54.82455296231345,-3.823487195140689,0 +-54.82725166294987,-3.843300933858405,0 +-54.8272376623078,-3.848253034018495,0 +-54.82777055771326,-3.853200860847906,0 +-54.82553200071455,-3.859230382551599,0 +-54.8205342709851,-3.864153787067118,0 +-54.81556037739727,-3.868547946026506,0 +-54.8149924877252,-3.874051853876796,0 +-54.8122149234307,-3.881752860786676,0 +-54.8078017616393,-3.884495006906906,0 +-54.80008500286644,-3.888328786624451,0 +-54.79455191080496,-3.892713780613553,0 +-54.7928816300853,-3.897111009974523,0 +-54.79231530638922,-3.902612397611694,0 +-54.79396148275004,-3.90811964192944,0 +-54.79945712852206,-3.912538883866494,0 +-54.80441291484787,-3.916404964824007,0 +-54.80882052001807,-3.920267781344781,0 +-54.81599522680268,-3.924133006037167,0 +-54.8220597335542,-3.927445239942474,0 +-54.8292180949032,-3.93186056637896,0 +-54.83472303014373,-3.935171591075064,0 +-54.83967650347932,-3.937931584095508,0 +-54.84517390165281,-3.943983492760196,0 +-54.85011663157382,-3.946764695830652,0 +-54.85507445609939,-3.946243612972031,0 +-54.858939669546,-3.942432830715219,0 +-54.86777836827554,-3.93863256664991,0 +-54.87329423838026,-3.940302253545505,0 +-54.8771485892871,-3.944172783521998,0 +-54.88045153286942,-3.948042473196303,0 +-54.88373420304503,-3.957962013168084,0 +-54.88811958190111,-3.963439376678092,0 +-54.888655171377,-3.968389345085727,0 +-54.88918717105839,-3.974438061652486,0 +-54.88861461818174,-3.981033904810923,0 +-54.88529640747096,-3.985444202124358,0 +-54.8814106020975,-3.992010968636359,0 +-54.87973064885889,-3.999127420948673,0 +-54.88026405602982,-4.00854678663874,0 +-54.88520897041237,-4.015715598425756,0 +-54.88905639951885,-4.019560705785847,0 +-54.89181136995959,-4.023457222344211,0 +-54.89788321452846,-4.030163223587099,0 +-54.9022961628062,-4.033498536743549,0 +-54.91054947042459,-4.038985682946462,0 +-54.9133300747054,-4.044051834548914,0 +-54.91332547622108,-4.046817853037604,0 +-54.9138629037805,-4.051525089364181,0 +-54.91458959987047,-4.053378884040267,0 +-54.91494920407484,-4.055045130844716,0 +-54.91530667357281,-4.057079276686336,0 +-54.91621574917848,-4.058742806162363,0 +-54.91638593983103,-4.061325123419119,0 +-54.91619334765564,-4.063166562430642,0 +-54.9149034060037,-4.065181489659291,0 +-54.91471522046582,-4.067187215871747,0 +-54.91361110079308,-4.068831923433606,0 +-54.91342213938909,-4.070659832140158,0 +-54.91213730413229,-4.071755414743499,0 +-54.9112195177076,-4.072847298230671,0 +-54.90883906984224,-4.073569593131711,0 +-54.90718977328424,-4.074290366047398,0 +-54.9057219217088,-4.075194515502599,0 +-54.9035204395268,-4.075729284707315,0 +-54.90168865621551,-4.075907730501456,0 +-54.90113298621079,-4.077364997169698,0 +-54.90241139801043,-4.078830842142732,0 +-54.90387556721598,-4.080117758483425,0 +-54.90607226115814,-4.0810417527933,0 +-54.90734934945067,-4.08269067624794,0 +-54.90862535484251,-4.084336849283054,0 +-54.9102697643598,-4.08507157969682,0 +-54.91209528180986,-4.086354282450623,0 +-54.91337030409164,-4.088365019278537,0 +-54.91373050463677,-4.090190609636382,0 +-54.91281025818525,-4.092012165810165,0 +-54.91225765352466,-4.093287274792948,0 +NA,NA,NA +-55.78521248062088,-4.347286563644678,0 +-55.78318324494361,-4.345667496175932,0 +-55.77397910918039,-4.340103476890144,0 +-55.76678972305658,-4.33560851048023,0 +-55.75786319980224,-4.329513258087514,0 +-55.75201165183708,-4.326477571199639,0 +-55.73795118041651,-4.32054319208412,0 +-55.73171377033214,-4.317676350608082,0 +-55.72957557576274,-4.315172685718972,0 +-55.72815658835534,-4.311602219829441,0 +-55.72492561825499,-4.307471479047381,0 +-55.72173733327877,-4.304265645428336,0 +-55.71568743998154,-4.298693881927194,0 +-55.71247714726895,-4.296186796482191,0 +-55.7105173349751,-4.294397932696135,0 +-55.70581897690478,-4.289347862874354,0 +-55.70383535016241,-4.285511116323553,0 +-55.70132866913252,-4.281726939961245,0 +-55.69962201063588,-4.278405825007549,0 +-55.69118018260293,-4.274761345699376,0 +-55.68041753096064,-4.270328983690595,0 +-55.66862419555675,-4.26243650663245,0 +-55.65860851999813,-4.254334595772947,0 +-55.65101428444578,-4.253580312530178,0 +-55.6438403629311,-4.250339175143822,0 +-55.61446527679065,-4.234762804711577,0 +-55.59030150639649,-4.222703287025105,0 +-55.58612317725729,-4.222686727500998,0 +-55.57288621709147,-4.215783992251664,0 +-55.55810497893254,-4.217923948896844,0 +-55.55174117037867,-4.217660338240583,0 +-55.54006073568246,-4.212965902803861,0 +-55.52664752397328,-4.208043627056879,0 +-55.50127729116304,-4.19741831725598,0 +-55.49439701026288,-4.195180462598082,0 +-55.48235504938847,-4.195374216659084,0 +-55.46152964319248,-4.193637949641804,0 +-55.45257194420751,-4.191319338619532,0 +-55.4296852023915,-4.180273429432946,0 +-55.4259627794971,-4.177783697563101,0 +-55.42448600041642,-4.17409198619403,0 +-55.41750916929361,-4.175826890307209,0 +-55.40769781445184,-4.175815636089948,0 +-55.40009871907514,-4.176538740802977,0 +-55.39718842277075,-4.177559754332078,0 +-55.39399661326772,-4.177292238438044,0 +-55.38981592768763,-4.172836305981348,0 +-55.38518369975016,-4.170885286886792,0 +-55.37928242796448,-4.17158044447957,0 +-55.37460453327072,-4.175226778120029,0 +-55.37155596669965,-4.177343644945959,0 +-55.3695847832857,-4.178314953927627,0 +-55.364942000959,-4.177576843797949,0 +-55.35789004057619,-4.175383571744598,0 +-55.34872725675173,-4.172943724663203,0 +-55.3455763190481,-4.167821317250477,0 +-55.33801304936437,-4.160220329080462,0 +-55.32818533743721,-4.157448432583737,0 +-55.31857095633008,-4.154409843528972,0 +-55.30561502632393,-4.15151638731718,0 +-55.2931789704292,-4.149302619880475,0 +-55.28605719649734,-4.145836589475842,0 +-55.27967332143704,-4.144580705881556,0 +-55.27376925646394,-4.140626003120225,0 +-55.26616518877948,-4.135741180784004,0 +-55.25819188815073,-4.133434001911104,0 +-55.25211520350354,-4.130752946627495,0 +-55.24491017333607,-4.13414796788288,0 +-55.2350254514647,-4.13486449658666,0 +-55.22937025987107,-4.129546223299201,0 +-55.21877444688828,-4.12989811026805,0 +-55.21050882101142,-4.132145719745118,0 +-55.19185512104394,-4.133558250127867,0 +-55.18314596721,-4.134296496099857,0 +-55.1768364331849,-4.124864495651452,0 +-55.16885069504693,-4.118372483863972,0 +-55.16161373967746,-4.113393854114815,0 +-55.1571545105855,-4.111534306881708,0 +-55.14831451484393,-4.11051970012701,0 +-55.14287667189284,-4.108681887820977,0 +-55.14047407813072,-4.109290101057769,0 +-55.13527973704622,-4.113928048899202,0 +-55.12950760551549,-4.115633858026947,0 +-55.12586404327382,-4.117223989426369,0 +-55.12262232901615,-4.120428108473781,0 +-55.11919391686026,-4.122831002363481,0 +-55.10256714477388,-4.125195570695134,0 +-55.09675736805767,-4.127392939114126,0 +-55.08794636416429,-4.132585390882505,0 +-55.0821211648067,-4.136773059693682,0 +-55.07905759728303,-4.132170271247816,0 +-55.07520404805469,-4.128503785198281,0 +-55.07344109178898,-4.121674777620515,0 +-55.07386594362641,-4.118471822668105,0 +-55.07027603902524,-4.115058692398892,0 +-55.06386569829539,-4.112031613427719,0 +-55.06065946720469,-4.110215310969124,0 +-55.05380611803973,-4.108565439236388,0 +-55.04774909474695,-4.108324714337204,0 +-55.03868161935717,-4.10747463081989,0 +-55.03584231061233,-4.109664851019096,0 +-55.02628864838328,-4.109021118350332,0 +-55.00432370288407,-4.109747826059777,0 +-55.00073348189311,-4.112568500377062,0 +-54.99792170486873,-4.113964398324071,0 +-54.99308167856087,-4.117751963598818,0 +-54.98804286875092,-4.118728555133778,0 +-54.98682930511927,-4.121130116933093,0 +-54.98482353261314,-4.123330717036888,0 +-54.9810504131449,-4.124329453133852,0 +-54.97280000934153,-4.126523466448577,0 +-54.96535523642915,-4.126072211714564,0 +-54.96194334459188,-4.124853117867274,0 +-54.9583231071812,-4.12423137641313,0 +-54.95165849224372,-4.12518910020844,0 +-54.94370213811597,-4.127187680031238,0 +-54.93670998930345,-4.126964556857112,0 +-54.93335812721045,-4.122763324131465,0 +-54.9324930744692,-4.119732836489455,0 +-54.92918759270972,-4.115266317997335,0 +-54.92570470973772,-4.110428646431263,0 +-54.92211290190394,-4.107811017088924,0 +-54.91833378846302,-4.104394283313015,0 +-54.91394177277397,-4.102175913212689,0 +-54.91294305100448,-4.099368992107277,0 +-54.91274663415243,-4.096364479372109,0 +-54.91294944076864,-4.094763020797384,0 +NA,NA,NA +-55.78487723026618,-4.348451317032734,0 +-55.78474432795439,-4.349759332475521,0 +-55.78448120623754,-4.351200438321758,0 +-55.78448173757077,-4.35251428557365,0 +-55.78461248478309,-4.353694406996447,0 +-55.78487365263432,-4.355135268354175,0 +-55.78513467740588,-4.356575334204261,0 +-55.78526662859235,-4.358410836063719,0 +-55.78539880332659,-4.359852382514753,0 +-55.78539701783104,-4.361417625606556,0 +-55.78539271550573,-4.362979118479431,0 +-55.78538820622725,-4.364410698994618,0 +-55.78538356807471,-4.365712547332547,0 +-55.78538577885946,-4.367019354350452,0 +-55.7853847907434,-4.368192687968198,0 +-55.78550568062816,-4.369886235027318,0 +-55.78562911472261,-4.37106117631074,0 +-55.7856177902797,-4.372631481505681,0 +-55.78561644519235,-4.374069298479984,0 +-55.78561791197863,-4.375373571605556,0 +-55.78588050925934,-4.3764167993371,0 +-55.78639605830275,-4.377993807876711,0 +-55.78678377247734,-4.379830418900626,0 +-55.7870429352834,-4.381141723596464,0 +-55.78743324710496,-4.382584886828611,0 +-55.78756340500328,-4.3841500143545,0 +-55.7878253555417,-4.385710900342696,0 +-55.788350164146,-4.387264292790496,0 +-55.78873942005868,-4.388710891154282,0 +-55.7888660132578,-4.390035850346069,0 +-55.78912416814497,-4.391749570368238,0 +-55.78925296148559,-4.39306063767189,0 +-55.78951415816201,-4.394870433319073,0 +-55.7900379831741,-4.395772539039083,0 +-55.79082246907137,-4.396948203698359,0 +-55.79213166889893,-4.398280093612728,0 +-55.79304811869617,-4.399327170505329,0 +-55.7939639148963,-4.400767680838792,0 +-55.79409365251411,-4.401685015832636,0 +-55.80334818915306,-4.422315217894568,0 +-55.80962069098618,-4.428597939403327,0 +-55.81858552088231,-4.433983364555057,0 +-55.82754858895181,-4.440261724462978,0 +-55.83650896284699,-4.448329049890235,0 +-55.84187948358122,-4.456389470153841,0 +-55.8490468151436,-4.463558857443486,0 +-55.85621272547511,-4.471622663290423,0 +-55.8624811959227,-4.479684639105305,0 +-55.867839950881,-4.488622773691237,0 +-55.87050673924194,-4.495762027158474,0 +-55.87136851229852,-4.505568765479167,0 +-55.87492511214806,-4.515383689962195,0 +-55.88212299825864,-4.521709355222753,0 +-55.88662227475062,-4.528015856283796,0 +-55.8938259920525,-4.537933591548977,0 +-55.90192509927424,-4.546051914112489,0 +-55.90911015982793,-4.553243627220519,0 +-55.91719162599225,-4.559535352058856,0 +-55.9243701463192,-4.56671534278189,0 +-55.93065115347608,-4.574792073326503,0 +-55.93423842711089,-4.582865803955509,0 +-55.93602704526147,-4.592729132100088,0 +-55.94051460330795,-4.599909945404622,0 +-55.94679810096741,-4.60978478800657,0 +-55.95308255047691,-4.61966079060607,0 +-55.95487490993058,-4.626837984089905,0 +-55.96987069429818,-4.669880498289747,0 +-55.98625909212394,-4.684202016058138,0 +-56.00264001279533,-4.702604162205204,0 +-56.01902503436789,-4.714875576922568,0 +-56.03130539989696,-4.729181109332552,0 +-56.05383205636633,-4.741452182121989,0 +-56.07020660375914,-4.753717549981647,0 +-56.08862345752257,-4.770085062149936,0 +-56.10294881050577,-4.78440504376896,0 +-56.1152251885066,-4.800768360010654,0 +-56.1254569149761,-4.815087831512377,0 +-56.13568303332662,-4.837587881146544,0 +-56.1520624892725,-4.860099495365866,0 +-56.16844960332094,-4.878524504420247,0 +-56.18074110586036,-4.894902773149953,0 +-56.19303324288835,-4.915376616263921,0 +-56.19917503388368,-4.935847335926315,0 +-56.20121485098694,-4.958365116694844,0 +-56.19915211634163,-4.980885086554765,0 +-56.18888343380559,-4.999307987198592,0 +-56.18682067378395,-5.017741146011007,0 +-56.19296446532562,-5.040282109070295,0 +-56.17858326130198,-5.056651322318635,0 +-56.16214634461361,-5.073020028029692,0 +-56.14775752074144,-5.091442136327101,0 +-56.13336855823233,-5.107823039745681,0 +-56.12102611304289,-5.128314112619241,0 +-56.11690743786643,-5.138563920679176,0 +-56.06965529656389,-5.155739499904389,0 +-56.05731909880259,-5.174145668482439,0 +-56.04703655750323,-5.192550472115579,0 +-56.04496248812107,-5.21096154013352,0 +-56.05519651393555,-5.231429503228826,0 +-56.044915825628,-5.249824171213151,0 +-56.02848924015439,-5.262073466174951,0 +-56.01205870196301,-5.27840660532589,0 +-55.99153737584273,-5.284509543963815,0 +-55.97307608141042,-5.284484825069421,0 +-55.95050468401038,-5.290583295871615,0 +-55.92587360752045,-5.302805596323881,0 +-55.9094317350947,-5.315025482150228,0 +-55.89503417630092,-5.331336906313447,0 +-55.88883964590041,-5.351751626880792,0 +-55.87648172308684,-5.376243414575795,0 +-55.86617782484637,-5.398696969923208,0 +-55.86409190411251,-5.415036273268794,0 +-55.87224763561288,-5.439565371195608,0 +-55.86399946371647,-5.462026727665648,0 +-55.85577552569571,-5.472228755611368,0 +-55.84137945105105,-5.492635123953232,0 +-55.8331453296305,-5.508964978485648,0 +-55.82284912523336,-5.531419347336605,0 +-55.81050552918145,-5.55795025869125,0 +-55.81048277809415,-5.578373115741243,0 +-55.81045773734262,-5.600835880969624,0 +-55.80428124770049,-5.623281941458149,0 +-55.78990095967438,-5.639586553896508,0 +-55.77347006593265,-5.655884708078641,0 +-55.76521098614892,-5.676300599736421,0 +-55.75691757337662,-5.692662168991832,0 +-55.74859346658666,-5.715170053605514,0 +-55.73614188317682,-5.739732579542922,0 +-55.72576969638013,-5.758161528313477,0 +-55.71742415520679,-5.780703755731771,0 +-55.71731315223239,-5.8093787637362,0 +-55.71721891281276,-5.833963411390329,0 +-55.71918789621586,-5.856509316040934,0 +-55.7211575261161,-5.879060476628525,0 +-55.72313651137329,-5.899565402231935,0 +-55.71898441251852,-5.909809426507513,0 +-55.69951345746989,-5.966238657421054,0 +-55.69333429937784,-5.984711428506389,0 +-55.68920913107652,-6.005229937885639,0 +-55.68302592069557,-6.031894600173457,0 +-55.66863061003868,-6.052391597648366,0 +-55.65013540791881,-6.064677956676399,0 +-55.63368763930787,-6.081047612201504,0 +-55.61312780118218,-6.095346667039403,0 +-55.59873388348507,-6.109653520436304,0 +-55.59666235030504,-6.130121063318642,0 +-55.61102674010996,-6.148568169776195,0 +-55.62539178973182,-6.164965787157855,0 +-55.63153517766231,-6.185437997014686,0 +-55.63151381984211,-6.207940762581271,0 +-55.61916591957897,-6.22836555065988,0 +-55.60678686861825,-6.24466394613246,0 +-55.59645824105134,-6.263012836199613,0 +-55.58817574366508,-6.285454726872369,0 +-55.58401215062294,-6.30586808106695,0 +-55.58191077037034,-6.324245704926668,0 +-55.57776595201305,-6.34671578230532,0 +-55.57570175830035,-6.352841564422529,0 +-55.53978056156006,-6.45601085122544,0 +-55.52911075398248,-6.487525152579819,0 +-55.5077993273258,-6.536540196869889,0 +-55.486498370158,-6.578550862618096,0 +-55.46871942955033,-6.624078232802256,0 +-55.4615689521907,-6.659113834379171,0 +-55.46150562313071,-6.683650859367224,0 +-55.46131754497458,-6.736256661031219,0 +-55.46117967270101,-6.774842147609415,0 +-55.46105421384574,-6.80992559623998,0 +-55.46446500670559,-6.845020199403605,0 +-55.46432761949976,-6.883623958731691,0 +-55.45004024940472,-6.922214897304865,0 +-55.41809682243586,-6.946755062914139,0 +-55.39674398666565,-6.974828796067221,0 +-55.38950392366893,-7.013465020229224,0 +-55.38224974141529,-7.05212259643044,0 +-55.38208475609355,-7.087290381344737,0 +-55.37488223431946,-7.111907981907363,0 +-55.36404875346987,-7.154123217131819,0 +-55.3461692786149,-7.185789462275543,0 +-55.33179285990105,-7.224509979970392,0 +-55.31340752136407,-7.303094038178853,0 +-55.29924677402298,-7.341897240462498,0 +-55.28508660471967,-7.377151271661551,0 +-55.27798271522514,-7.408848339038375,0 +-55.27441523689056,-7.447591413365419,0 +-55.26728108026306,-7.48628390894561,0 +-55.26724969985129,-7.514439670819526,0 +-55.23880636761925,-7.552993939278079,0 +-55.22100823074167,-7.595118599104946,0 +-55.21387299745712,-7.62673953015799,0 +-55.20317592026858,-7.66888685582092,0 +-55.19958782899195,-7.704029402786064,0 +-55.19244000079254,-7.739141521675014,0 +-55.18523220413292,-7.784764519481032,0 +-55.18160279718653,-7.819866611889788,0 +-55.17440830291627,-7.858458570398462,0 +-55.1707635488315,-7.900576765033976,0 +-55.16357486809164,-7.935651562889065,0 +-55.15281939279915,-7.974218242043674,0 +-55.14916587888564,-8.019835072626657,0 +-55.14196809116334,-8.058411810286852,0 +-55.13474833876751,-8.096983827673675,0 +-55.12393911969873,-8.128521427939496,0 +-55.12022213692089,-8.167107844419201,0 +-55.12007790928227,-8.205708685962296,0 +-55.11280710060848,-8.244287704452354,0 +-55.11264899496397,-8.286400151524202,0 +-55.11608117013873,-8.321503537111139,0 +-55.11950076254383,-8.360114798135781,0 +-55.11934327622443,-8.40222610696461,0 +-55.11563331084844,-8.440821785264307,0 +-55.1155089364034,-8.472408502488605,0 +-55.12606736911126,-8.507521398819668,0 +-55.11163835927503,-8.549618407106935,0 +-55.09012455125144,-8.577673935392848,0 +-55.05789439949069,-8.605725060907078,0 +-55.02209780300782,-8.626761276798973,0 +-54.99702688344741,-8.637285254113774,0 +-54.96406604876415,-8.769915814476445,0 +-54.96402504052136,-8.813072435833519,0 +-54.9439974467783,-8.848204262579914,0 +-54.91999838102085,-8.879397965554075,0 +-54.91991787408835,-8.922522146946704,0 +-54.92780690358138,-8.965684952639679,0 +-54.93171116589025,-9.008811333566332,0 +-54.91172124391467,-9.043957067381466,0 +-54.87979740001545,-9.063364994620017,0 +-54.83987095330477,-9.082726458228855,0 +-54.80777199307797,-9.117792141086941,0 +-54.77569595264426,-9.145032894915689,0 +-54.75549106521117,-9.180176785606706,0 +-54.74726017028569,-9.223233804895518,0 +-54.74303973164218,-9.262397809718449,0 +-54.74283697842212,-9.297665793977513,0 +-54.74659552419669,-9.340791249376613,0 +-54.75836855190669,-9.383949518729148,0 +-54.76215208240609,-9.423153020178908,0 +-54.75792187091594,-9.462327725542936,0 +-54.76567824647173,-9.501552052695818,0 +-54.76964872093502,-9.505486817905801,0 +-54.78942823693446,-9.520387476284037,0 +-54.80854795793149,-9.529061489142988,0 +-54.82941387087649,-9.539457348175013,0 +-54.8468215899272,-9.542969182039275,0 +-54.86593040544734,-9.549922811730871,0 +-54.87630461767761,-9.563702742076192,0 +-54.87796032135111,-9.580877122707815,0 +-54.87961615243555,-9.598052381486458,0 +-54.87256789107505,-9.615188789237251,0 +-54.86725961289451,-9.632333812179864,0 +-54.86717390882829,-9.649503574814601,0 +-54.86704308161221,-9.67354998924611,0 +-54.8686657091802,-9.690755798518571,0 +-54.87199591263491,-9.713137892160015,0 +-54.88406507236489,-9.732127191464262,0 +-54.89792843549853,-9.744243307678387,0 +-54.91000922662545,-9.763243944262054,0 +-54.90986840502506,-9.78564016007981,0 +-54.89931574450264,-9.799379682522677,0 +-54.88528064219071,-9.811383799448377,0 +-54.87119586977062,-9.830286419411634,0 +-54.87632102739518,-9.847550439706811,0 +-54.88146540613198,-9.863084446858808,0 +-54.89359586485352,-9.878650961614113,0 +-54.89873412991972,-9.895914978219826,0 +-54.9073293148418,-9.920093128480609,0 +-54.90547588609083,-9.939056122970037,0 +-54.90367056864311,-9.949397799519746,0 +-54.90003934525902,-9.973535694492725,0 +-54.90007946628921,-10.00800731224013,0 +-54.9052486244578,-10.02523536245023,0 +-54.90516859110834,-10.04415284508266,0 +-54.9120792807966,-10.06138043112425,0 +-54.92074322170626,-10.07689490815087,0 +-54.92767610519719,-10.08896181873218,0 +-54.93107259667337,-10.11132736218685,0 +-54.9309946951681,-10.12851559196194,0 +-54.9361492702967,-10.14744660405617,0 +-54.94131967569513,-10.16293960675784,0 +-54.9499688029383,-10.18188537109138,0 +-54.96038109538457,-10.19740068279746,0 +-54.97077453458256,-10.21807166521744,0 +-54.98469068383308,-10.23188066055658,0 +-55.00038213524206,-10.23882096032246,0 +-55.01604446955214,-10.25263361993426,0 +-55.02820493114327,-10.26814888918767,0 +-55.03336592057461,-10.28707145846601,0 +-55.04554127881892,-10.29914876241792,0 +-55.05945690654265,-10.31295066285477,0 +-55.06286579663181,-10.33358283050358,0 +-55.06278078817134,-10.35420345395847,0 +-55.06268875847046,-10.376543169801,0 +-55.06263906777207,-10.38857286197622,0 +-55.06256103296284,-10.40747713499949,0 +-55.07121189521608,-10.42813826261195,0 +-55.07811014517647,-10.45050886419157,0 +-55.08500269219065,-10.4745984641394,0 +-55.08491262734307,-10.49693632387678,0 +-55.08484329517395,-10.51411893535394,0 +-55.08476008387774,-10.53473775162742,0 +-55.0864246484848,-10.55538094916617,0 +-55.09683855259335,-10.57437364236714,0 +-55.10728340122769,-10.58648228181188,0 +-55.12120383551291,-10.6055017494389,0 +-55.13691133340805,-10.6159204405104,0 +-55.1403491075399,-10.63317025740378,0 +-55.14034293296032,-10.63489363226867,0 +-55.14299329720392,-10.66353784680171,0 +-55.1441083471362,-10.67619689281563,0 +-55.13936546872312,-10.68999349279693,0 +-55.12881209133378,-10.69571819847611,0 +-55.12408893111849,-10.70605498319526,0 +-55.12873096708142,-10.71411528122752,0 +-55.13804582438931,-10.72333723102104,0 +-55.14852202992792,-10.73600373886886,0 +-55.15666074238403,-10.74866476579561,0 +-55.16245591311945,-10.76246812630667,0 +-55.16240039837898,-10.77625199573396,0 +-55.16354079052785,-10.7842959280555,0 +-55.1705069912316,-10.79925345437721,0 +-55.1751464649483,-10.81075811303243,0 +-55.17975703258769,-10.82570418066805,0 +-55.18321313639618,-10.83719815174329,0 +-55.19017886814991,-10.84870356306626,0 +-55.19713863185228,-10.8613546234393,0 +-55.19708329116173,-10.87282765078536,0 +-55.20054356048685,-10.88316573358035,0 +-55.20281671728031,-10.89693704721921,0 +-55.20745399172283,-10.91189182751871,0 +-55.21093499294701,-10.92455323211287,0 +-55.21792578186235,-10.93838327983293,0 +-55.22609053506875,-10.95222309143724,0 +-55.23309484644433,-10.96260994189511,0 +-55.2424378050703,-10.97646350033986,0 +-55.25179488540229,-10.98456355635107,0 +-55.26348637234491,-11.00073942219773,0 +-55.2669870817358,-11.01112465637298,0 +-55.26697024823666,-11.02264996995137,0 +-55.26812773750053,-11.03303036974458,0 +-55.27045168074966,-11.04803155830789,0 +-55.27512285290208,-11.06304850482495,0 +-55.27863322731293,-11.06998738052961,0 +-55.28916436573071,-11.08502254561404,0 +-55.29852616258207,-11.09774421886178,0 +-55.30671923002117,-11.10931016494179,0 +-55.31256635054903,-11.12086746205166,0 +-55.31255496888573,-11.12663321956889,0 +-55.31205278150486,-11.13804922640999,0 +-55.31203930038293,-11.14277836195485,0 +-55.31239682208246,-11.14677552935791,0 +-55.31275240473973,-11.15149924984209,0 +-55.31273679739105,-11.1565831604958,0 +-55.3127267615915,-11.15985034966754,0 +-55.31233530720723,-11.16601961987209,0 +-55.3115735759669,-11.17255220080497,0 +-55.31117930716986,-11.17981309715729,0 +-55.31042203162369,-11.18489514470746,0 +-55.31004163380283,-11.18780112792338,0 +-55.30928449190515,-11.19252414715935,0 +-55.30815035145105,-11.19906556941051,0 +-55.30665563520787,-11.20413469711161,0 +-55.30627450195652,-11.20776118306298,0 +-55.30514944634952,-11.21211580656705,0 +-55.30439440218677,-11.21647225464536,0 +-55.30401187594273,-11.22010394443321,0 +-55.30399943900541,-11.22373761295925,0 +-55.30436083780122,-11.22628315714156,0 +-55.3061996205553,-11.22992410876009,0 +-55.30840329509398,-11.23538034911371,0 +-55.3109750223655,-11.2415646353102,0 +-55.31207170958113,-11.24592703140104,0 +-55.33409733546095,-11.28895490501374,0 +-55.33603035311275,-11.30252412283217,0 +-55.34386164823309,-11.32580018386694,0 +-55.34774780353138,-11.34712734847215,0 +-55.3476995587389,-11.36262981738298,0 +-55.34959792193216,-11.38782823348809,0 +-55.35745737771877,-11.40335543424837,0 +-55.36724754629701,-11.43439216724437,0 +-55.3770577459956,-11.45961595111097,0 +-55.3848692312598,-11.49258651345034,0 +-55.3947355469892,-11.5003690245078,0 +-55.41247558488422,-11.52174204128587,0 +-55.41637617519594,-11.54113550602961,0 +-55.42027731820769,-11.56052920979278,0 +-55.42812550642861,-11.5838116929622,0 +-55.43399838833445,-11.60709295155983,0 +-55.43790492997976,-11.62844482679261,0 +-55.43983776150479,-11.64785345212904,0 +-55.4437463693578,-11.66921145303069,0 +-55.45160258849048,-11.69640679713023,0 +-55.45749435929032,-11.71777690115552,0 +-55.46537336295417,-11.73721499194745,0 +-55.47323740769808,-11.76442254668656,0 +-55.48035784112359,-11.79603701539637,0 +-55.48403490759142,-11.80785219747494,0 +-55.486792201734,-11.81694011152319,0 +-55.49046458075674,-11.83056995475958,0 +-55.49413949963819,-11.84329080233782,0 +-55.49688957507689,-11.85510060825644,0 +-55.49778991089536,-11.86508941704142,0 +-55.49961883071644,-11.8759803728191,0 +-55.50330119116202,-11.88778415774519,0 +-55.50698637998158,-11.89868170666203,0 +-55.50974029296449,-11.91139302861274,0 +-55.51064041694796,-11.92228839843868,0 +-55.51339730059833,-11.93228132750755,0 +-55.51706990076877,-11.94681505125222,0 +-55.51704747295187,-11.95498502182779,0 +-55.51701745755997,-11.96678505695991,0 +-55.51698737931766,-11.9785849564182,0 +-55.51509919965869,-11.99037967452502,0 +-55.51228945000666,-11.99944805987019,0 +-55.51133611984218,-12.00852038756956,0 +-55.50758828624269,-12.0212138759151,0 +-55.50755808368855,-12.03210136710504,0 +-55.50753121937984,-12.04208174486242,0 +-55.50937144246962,-12.05026016544537,0 +-55.50935538429991,-12.05843469675709,0 +-55.51025527274155,-12.07297314869145,0 +-55.51023575980181,-12.08296886995623,0 +-55.50835660750144,-12.0938693968914,0 +-55.50554743044639,-12.10476755427459,0 +-55.50367240956357,-12.11294300298861,0 +-55.5027164611361,-12.12566905251288,0 +-55.50640493976061,-12.13749326508688,0 +-55.51009029267421,-12.15022251671654,0 +-55.51564422472494,-12.15932587036812,0 +-55.5211955572653,-12.16933476267917,0 +-55.52768383955939,-12.17662251547427,0 +-55.53323875003715,-12.18572370523294,0 +-55.53413673602103,-12.19844192645702,0 +-55.53411638893362,-12.20661578367232,0 +-55.53780867811442,-12.21752872176865,0 +-55.54151609180552,-12.22391050698459,0 +-55.54657473866324,-12.26228291409983,0 +-55.55156618624537,-12.27580528592557,0 +-55.55404512615179,-12.28931971451901,0 +-55.55903388587436,-12.30406267034991,0 +-55.56780402160921,-12.31389980664667,0 +-55.57783143545691,-12.323739270565,0 +-55.58534415911893,-12.33480088599378,0 +-55.59411403854083,-12.34586492691278,0 +-55.5991150330118,-12.35692122855225,0 +-55.60788225704736,-12.37043953228081,0 +-55.61665304212705,-12.38273073116157,0 +-55.62792432058051,-12.40239157687806,0 +-55.63418918079407,-12.41222352055025,0 +-55.63794138920088,-12.42205092063752,0 +-55.64921532001824,-12.44294117962668,0 +-55.65924511091524,-12.45769158354914,0 +-55.66677051422526,-12.46752683641131,0 +-55.67554601219747,-12.48227549528954,0 +-55.68055354325848,-12.49579069311846,0 +-55.69058521157166,-12.51299839229845,0 +-55.69936656780154,-12.52652048061153,0 +-55.70563624413664,-12.53881110126868,0 +-55.71316263352799,-12.55233215513579,0 +-55.72194915795455,-12.56462694089143,0 +-55.73327155638836,-12.57202528126206,0 +-55.73956095556895,-12.57818363261434,0 +-55.75339816971356,-12.59419087209195,0 +-55.7584270194561,-12.60403369732796,0 +-55.76471294832259,-12.61756730542427,0 +-55.77351979044495,-12.63233843459177,0 +-55.77980923862415,-12.64587552299012,0 +-55.78988472258237,-12.65696709985525,0 +-55.79618984073187,-12.67052091106001,0 +-55.80375795547047,-12.6828503893688,0 +-55.80754382482595,-12.69270918261968,0 +-55.81006894926678,-12.70256572142363,0 +-55.82142929968717,-12.71983890567212,0 +-55.82521989651721,-12.73216677074642,0 +-55.82774927465411,-12.74449299326885,0 +-55.83507836081332,-12.77356178805367,0 +-55.83632619675911,-12.78093343871926,0 +-55.83503751993781,-12.80181049808952,0 +-55.82747034859402,-12.81285158854004,0 +-55.82493712779247,-12.82389969994851,0 +-55.82492158526774,-12.83494968299976,0 +-55.82490236177277,-12.84967769613349,0 +-55.83118150762419,-12.86073276439361,0 +-55.83620234907259,-12.87178552670095,0 +-55.84121729170432,-12.88774700252941,0 +-55.85125761880111,-12.91230500304175,0 +-55.85502240808781,-12.92212742834473,0 +-55.86255264414545,-12.9417714715278,0 +-55.86505203619531,-12.95772745312144,0 +-55.86881352099624,-12.97123023693039,0 +-55.87509339462973,-12.98473522351063,0 +-55.87760231574322,-12.9921004444283,0 +-55.88765233860505,-13.012970345704,0 +-55.89896934038569,-13.03629647214952,0 +-55.90652040335877,-13.04857626695133,0 +-55.91785440433315,-13.05963332039154,0 +-55.93927277366539,-13.07315564171427,0 +-55.94304916515141,-13.08297898455255,0 +-55.94682051130299,-13.1038507519151,0 +-55.94933730815463,-13.11367415175481,0 +-55.95689376182229,-13.13209664287518,0 +-55.96193382135691,-13.1394675496471,0 +-55.97075367026064,-13.15543640758159,0 +-55.9795752113196,-13.17140610642074,0 +-55.98840124353838,-13.18983544091157,0 +-55.99471343033675,-13.20827055631122,0 +-56.00102604022715,-13.22179310849622,0 +-56.00228908429905,-13.22548090092216,0 +-56.00860482260719,-13.24269241095045,0 +-56.01366162269611,-13.25499198047872,0 +-56.02503919183285,-13.27099336363144,0 +-56.03135836646638,-13.27592130564427,0 +-56.04148341356775,-13.29684584093767,0 +-56.04528721282338,-13.31038422884215,0 +-56.04656950993801,-13.328843368367,0 +-56.0529004182814,-13.33992877966264,0 +-56.07164681002282,-13.37090997795098,0 +-56.07164052999401,-13.38318940091307,0 +-56.07541652477924,-13.39792395337339,0 +-56.07667046730539,-13.41265558638179,0 +-56.07539843084147,-13.43352361808582,0 +-56.06656115892836,-13.45193044707075,0 +-56.05772837691789,-13.46174417788697,0 +-56.05267946698296,-13.47033170991456,0 +-56.04888842224579,-13.48505415464297,0 +-56.04383551995743,-13.50100124106418,0 +-56.03247838309174,-13.51326343737438,0 +-56.02994823317887,-13.52798179071046,0 +-56.02994299713917,-13.53901942344193,0 +-56.02488979094353,-13.55863646945815,0 +-56.02362215795277,-13.57335108329303,0 +-56.02361387734226,-13.59297225030691,0 +-56.02361028946444,-13.60155677150566,0 +-56.02360194817386,-13.62117927175352,0 +-56.02359677174393,-13.63344384185346,0 +-56.02611312264606,-13.65184220746947,0 +-56.03115310011123,-13.67269458155843,0 +-56.03493434528669,-13.68618681350372,0 +-56.03871134796184,-13.71194336732811,0 +-56.04248788969321,-13.7426078038548,0 +-56.04753549313844,-13.7511953065513,0 +-56.04879543971027,-13.75978162621282,0 +-56.05257681540129,-13.78186102850396,0 +-56.05636146804804,-13.79535461417799,0 +-56.06014627431792,-13.81007491553776,0 +-56.06898455005703,-13.82234337410519,0 +-56.07403436483489,-13.83461075459715,0 +-56.07908890453963,-13.84566506623636,0 +-56.0841444854514,-13.85794783271191,0 +-56.086671468484,-13.87267749258098,0 +-56.090463898026,-13.88618547686918,0 +-56.08414290291336,-13.93093682269989,0 +-56.0854067166084,-13.94442520403641,0 +-56.08667081328706,-13.95668785969233,0 +-56.08667025562873,-13.96772598390331,0 +-56.08919946471865,-13.9836680510748,0 +-56.09299442187501,-13.99347687025991,0 +-56.09679003671472,-14.01187317121098,0 +-56.09299407367362,-14.0253704025347,0 +-56.08540145002014,-14.03887044174932,0 +-56.09046263406232,-14.05358814054927,0 +-56.09805411834523,-14.06585487345263,0 +-56.10437363484844,-14.08058689103587,0 +-56.11195686266355,-14.09899992795355,0 +-56.11448654060425,-14.11617804589624,0 +-56.11322164189882,-14.1284473582116,0 +-56.10183428021718,-14.14071571050593,0 +-56.0955069814796,-14.15298473876032,0 +-56.09297565407875,-14.15911948204435,0 +-56.09044305769762,-14.1775246720569,0 +-56.09044218129801,-14.18734119018531,0 +-56.09297270633548,-14.19593108498852,0 +-56.10056602557926,-14.20942995769165,0 +-56.1056288600022,-14.21802011538646,0 +-56.1132237204616,-14.22906450293085,0 +-56.12841495134135,-14.24624398471582,0 +-56.13347948355467,-14.25851477061594,0 +-56.13348062568414,-14.27446723770217,0 +-56.1322159493026,-14.29532846261515,0 +-56.13094386525183,-14.30759474125164,0 +-56.12967181094554,-14.31863290901653,0 +-56.13219872127566,-14.33335060393227,0 +-56.13852546909458,-14.35052074778235,0 +-56.13218618630578,-14.36032687459977,0 +-56.12584938593817,-14.36522777754882,0 +-56.10431057794962,-14.37257057296167,0 +-56.09923741641364,-14.38605044406061,0 +-56.09923268814852,-14.39585545980303,0 +-56.10555967806388,-14.40934106766841,0 +-56.11697981336521,-14.42410485178218,0 +-56.12968169827346,-14.4364356331446,0 +-56.13605492301978,-14.45000079172107,0 +-56.14496273995384,-14.46110800229167,0 +-56.1525921821602,-14.46728293520593,0 +-56.16914467356322,-14.48457727469457,0 +-56.18184841093331,-14.49196847434076,0 +-56.19581165960874,-14.50425266912944,0 +-56.20596989138295,-14.51408209750127,0 +-56.2161292259481,-14.5239114210487,0 +-56.2148899505693,-14.53623511747943,0 +-56.21567843497988,-14.56917721590869,0 +-56.21568406557545,-14.58144975042132,0 +-56.22076316966687,-14.59127004789878,0 +-56.22964441104469,-14.5998575731864,0 +-56.24106344167745,-14.60967173408568,0 +-56.25754746529105,-14.61699271710358,0 +-56.27404736451367,-14.62804078018706,0 +-56.2791289765957,-14.63908779281347,0 +-56.28547863681357,-14.65382259611616,0 +-56.28674831890859,-14.6575055401569,0 +-56.29309292286712,-14.67100294705178,0 +-56.30581100841574,-14.69184356773209,0 +-56.31596293529071,-14.70165198977269,0 +-56.32359806968873,-14.7114675193388,0 +-56.32870778478188,-14.72497653542857,0 +-56.32873460281334,-14.73603970778342,0 +-56.33131194277212,-14.75079847092366,0 +-56.33768245713579,-14.75694736681368,0 +-56.35551041045396,-14.77292441519748,0 +-56.36951113639557,-14.78397706530375,0 +-56.38223583540551,-14.79134087830698,0 +-56.39749543815653,-14.79500955947928,0 +-56.40768051781902,-14.80237609929532,0 +-56.40896053719462,-14.80606540460335,0 +-56.42936668184475,-14.83310490475851,0 +-56.43574585351493,-14.84293742628253,0 +-56.4433965205037,-14.85276714701213,0 +-56.45230719631015,-14.86135509608864,0 +-56.45741379515256,-14.8736422644198,0 +-56.46252609061111,-14.88838952278389,0 +-56.4625570957526,-14.90315225766167,0 +-56.46513823940835,-14.91178131457647,0 +-56.47794902526179,-14.927815243239,0 +-56.4919952887365,-14.93397915582833,0 +-56.49841828087143,-14.94631072107649,0 +-56.5022596958706,-14.95246788594544,0 +-56.50742190974628,-14.97464185901594,0 +-56.50746025350657,-14.98819650791296,0 +-56.50876715623467,-14.99928739238333,0 +-56.50881617973383,-15.01654287015172,0 +-56.50629516580959,-15.02640837896006,0 +-56.50934317417969,-15.05535867904434,0 +-56.51064397357603,-15.07257527704963,0 +-56.51066141393679,-15.08364422232966,0 +-56.51069053791032,-15.10209120838482,0 +-56.51198777655706,-15.11684536514884,0 +-56.51454827113223,-15.13283542410738,0 +-56.51583486439763,-15.14882382273855,0 +-56.51456607061815,-15.15620592783642,0 +-56.51329931221812,-15.16604616152012,0 +-56.50694505046319,-15.18326894101818,0 +-56.49677632947782,-15.1968034689514,0 +-56.48916008908979,-15.20787250975652,0 +-56.48536065595384,-15.22139380863178,0 +-56.47901080028704,-15.23123260491373,0 +-56.46884693150636,-15.2447629756279,0 +-56.45995293043573,-15.25706252694557,0 +-56.45361142545885,-15.27181723774718,0 +-56.44342682785173,-15.27551698871268,0 +-56.4319811506067,-15.28659197499338,0 +-56.42307805831105,-15.29520666399391,0 +-56.41545190290396,-15.30627975211267,0 +-56.41165818740158,-15.32595206722764,0 +-56.40530786493432,-15.34071399332736,0 +-56.39257997390519,-15.3530293548687,0 +-56.38750458450462,-15.371480727508,0 +-56.38369215130238,-15.38132434682377,0 +-56.38243048725032,-15.39239495398438,0 +-56.35595191789601,-15.40273298055745,0 +-56.34319578440569,-15.41259987703522,0 +-56.33299194874331,-15.42369462556654,0 +-56.32023473931228,-15.42986219623755,0 +-56.31003046200212,-15.4397225098896,0 +-56.29855058871182,-15.45081362086821,0 +-56.28834755760337,-15.4643651935281,0 +-56.28069771600383,-15.47667628987186,0 +-56.27049536403307,-15.48775553361059,0 +-56.26539960259781,-15.5062168191383,0 +-56.26413028503163,-15.5209825731598,0 +-56.26413601226954,-15.53328550410491,0 +-56.26031591818038,-15.55174033905877,0 +-56.25266011635701,-15.55543489350448,0 +-56.23352133756489,-15.56651497553451,0 +-56.23224558713,-15.5677454826652,0 +-56.23168308114327,-15.57073708405087,0 +-56.23213792411985,-15.57265279413464,0 +-56.23259385697769,-15.57383117768363,0 +-56.23274339148084,-15.57559838265887,0 +-56.23274208597649,-15.57633453004215,0 +-56.23289206183552,-15.57780636663373,0 +-56.2332031128871,-15.58118482980605,0 +-56.23351901318636,-15.58485789685817,0 +-56.23337142727088,-15.58662227591422,0 +-56.23291785466798,-15.58824043310883,0 +-56.23078278645552,-15.58956564462952,0 +-56.22940221439762,-15.59044860686902,0 +-56.22863624811435,-15.59147812893588,0 +-56.22756735843846,-15.5930960761254,0 +-56.22634859507159,-15.59383278139683,0 +-56.22512937240347,-15.59456975621217,0 +-56.22406185789963,-15.5948652862753,0 +-56.22116313974914,-15.59619370303081,0 +-56.21902560231521,-15.59708019869554,0 +-56.21734503011796,-15.59752452580655,0 +-56.21642805551468,-15.59782054928663,0 +-56.2142875007871,-15.59841328507173,0 +-56.21092107453286,-15.59886083811557,0 +-56.20908364918691,-15.59945375127772,0 +-56.20785820900769,-15.60107890205051,0 +-56.2057131886048,-15.60241003829171,0 +-56.20479457740027,-15.60359058722265,0 +-56.20341672793281,-15.60506608461764,0 +-56.20311107902089,-15.60550792560278,0 +-56.20295906484974,-15.60698195295075,0 +-56.20311461570272,-15.61081450631703,0 +-56.20327073066026,-15.6125788443283,0 +-56.20357901591733,-15.6139017515015,0 +-56.20419433419677,-15.61595891101657,0 +-56.20511859582101,-15.61844654910473,0 +-56.20527710105487,-15.619901096699,0 +-56.20527876273672,-15.62033716325461,0 +-56.20482954324434,-15.62373517091672,0 +-56.20482958646542,-15.62535158285119,0 +-56.20467689299621,-15.62711515759268,0 +-56.20452419055081,-15.62961396047349,0 +-56.20452515104779,-15.63137948365683,0 +-56.20452902161458,-15.63403038962091,0 +-56.20392060995964,-15.63550264822761,0 +-56.20346562406318,-15.63712170143216,0 +-56.20270479236616,-15.63859267757127,0 +-56.20224988549,-15.64006331478233,0 +-56.20148909004205,-15.64182694871479,0 +-56.19996296447894,-15.64373698609401,0 +-56.19935081605328,-15.64505938987811,0 +-56.19782052220081,-15.6463826719984,0 +-56.19721043682499,-15.64770567170446,0 +-56.19583782062398,-15.64873476078758,0 +-56.17777865221925,-15.64236880358367,0 +-56.17543991894888,-15.64157495372075,0 +-56.17438666752758,-15.64146158255872,0 +-56.17274819124894,-15.64123584066114,0 +-56.17146422598466,-15.6410125771607,0 +-56.17006249997279,-15.64090096699965,0 +-56.16912814994431,-15.64112665009335,0 +-56.16784373460554,-15.64146504088483,0 +-56.16585729423515,-15.64180311425748,0 +-56.16433781807281,-15.64202839138979,0 +-56.16317050813882,-15.64225392756456,0 +-56.16094948514959,-15.64315440807483,0 +-56.15919832838856,-15.64394252351694,0 +-56.15709430049604,-15.64495552706301,0 +-56.15592315581983,-15.64551837611558,0 +-56.15358194713222,-15.64641919365173,0 +-56.15217462675681,-15.64720765909597,0 +-56.15111694315703,-15.64799644402186,0 +-56.1500632230597,-15.6483345034838,0 +-56.14865810681683,-15.64878528886206,0 +-56.14737431053927,-15.64878504633804,0 +-56.14573999528586,-15.64878480862868,0 +-56.14410758839735,-15.64833404635558,0 +-56.14339857339777,-15.64754653215617,0 +-56.14255739565495,-15.64653403069559,0 +-56.14116095949777,-15.64597049152959,0 +-56.14070111962636,-15.64574504788213,0 +-56.138169113564,-15.64428101815748,0 +-56.13689274202174,-15.64349118720782,0 +-56.13467888525862,-15.64258625138052,0 +-56.13327132885378,-15.64236092943377,0 +-56.13209937067462,-15.64134527298615,0 +-56.13080940320506,-15.64134599618572,0 +-56.12940265523872,-15.6415725168107,0 +-56.12811367907613,-15.6416861544273,0 +-56.12682539010101,-15.64168724764255,0 +-56.12600598340941,-15.64157509718577,0 +-56.12425045701129,-15.64067368078535,0 +-56.12331415171099,-15.63999737773486,0 +-56.12214359513347,-15.63886996828842,0 +-56.12097248647918,-15.63729086743018,0 +-56.12003497116575,-15.63593652214024,0 +-56.11921172370807,-15.63491651635064,0 +-56.11803402665021,-15.63355408223277,0 +-56.11744360111841,-15.63264498125446,0 +-56.1169672253364,-15.63116597574285,0 +-56.11614124731387,-15.63036841844465,0 +-56.11520141589004,-15.62968918760872,0 +-56.11426187735022,-15.62867105536343,0 +-56.11297041580363,-15.62754026194801,0 +-56.11205030564491,-15.6260929655973,0 +-56.11156554339564,-15.62503287123116,0 +-56.11129001474863,-15.62463556465165,0 +-56.11047097592341,-15.6237753039324,0 +-56.10985584782537,-15.6230467384852,0 +-56.10923636884038,-15.62245044844549,0 +-56.10841314369232,-15.62178762285731,0 +-56.10806793734876,-15.62105895843847,0 +-56.10779303226464,-15.6205950967299,0 +-56.10717476058813,-15.61946838256914,0 +-56.1066956204496,-15.61853945315216,0 +-56.10614765530421,-15.61780866942647,0 +-56.10573650729039,-15.61734308901614,0 +-56.10532667514942,-15.61674324875704,0 +-56.10498068922995,-15.61581610802013,0 +-56.10490725527146,-15.61509209095824,0 +-56.10428647889136,-15.61469633291336,0 +-56.10352944471886,-15.61469647911068,0 +-56.10284127518197,-15.61469661055772,0 +-56.10222214355562,-15.61429887199701,0 +-56.10194649667698,-15.61310778133925,0 +-56.10174012702964,-15.61277663554452,0 +-56.10125866393776,-15.61211416468905,0 +-56.10084574229482,-15.61125432259724,0 +-56.10050163080017,-15.6106598050886,0 +-56.10022628484911,-15.6101323084588,0 +-56.09967611062645,-15.60927423239927,0 +-56.09933233565587,-15.60841657414713,0 +-56.09905743744344,-15.60742716345308,0 +-56.09892005170792,-15.60670172788463,0 +-56.0991947021863,-15.60597898354726,0 +-56.09946966776745,-15.60531546226325,0 +-56.09946956615951,-15.60492136921046,0 +-56.09905057062816,-15.60394427822179,0 +-56.09898264164784,-15.60383534671726,0 +-56.09886934347339,-15.60361829821058,0 +-56.09866545856551,-15.60338166163778,0 +-56.09848452530752,-15.60312150166475,0 +-56.09823591159365,-15.60284037238003,0 +-56.09801012048623,-15.60264694583892,0 +-56.0978295927159,-15.60243081532318,0 +-56.09764913923321,-15.60219282323186,0 +-56.0972662617459,-15.60182765176775,0 +-56.09715361396565,-15.60165440438469,0 +-56.09695093068495,-15.60135144667576,0 +-56.09686050849353,-15.60108969271849,0 +-56.09677019236106,-15.60087190366406,0 +-56.0964585063183,-15.60041417271908,0 +-56.09618638773723,-15.60015316641949,0 +-56.09584653050279,-15.59993583239124,0 +-56.09562021063028,-15.59980553930134,0 +-56.09534841047076,-15.59952350662724,0 +-56.09530301432325,-15.5994367880038,0 +-56.09512208489039,-15.5992634600847,0 +-56.094851048609,-15.59904699475188,0 +-56.09462498062524,-15.59878766952321,0 +-56.09442143613433,-15.5985074125794,0 +-56.09417493008132,-15.59820311780115,0 +-56.09401790682242,-15.59807225556269,0 +-56.09368098805296,-15.59767991798464,0 +-56.09347842452587,-15.59746244343901,0 +-56.09332076584242,-15.59724611610858,0 +-56.09300570949932,-15.596792833334,0 +-56.09282588328259,-15.59646913110867,0 +-56.09269126982197,-15.59601633143812,0 +-56.09251185332209,-15.59591064513395,0 +-56.09237741119961,-15.59591251561416,0 +-56.0919092735391,-15.59596693800415,0 +-56.0916426097579,-15.59603712675078,0 +-56.09139841912734,-15.5960627527616,0 +-56.09108907068526,-15.59615526270978,0 +-56.09077702319518,-15.59624152415759,0 +-56.09059855026642,-15.59630587923206,0 +-56.09021898212293,-15.5965846546548,0 +-56.0901099228594,-15.59693098600006,0 +-56.0899321606591,-15.59725347592265,0 +-56.089844678931,-15.59751232106359,0 +-56.08980171287845,-15.5978137327521,0 +-56.0897580376905,-15.59794291534358,0 +-56.08964855960141,-15.5981796786825,0 +-56.08951721413248,-15.59843771017419,0 +-56.08929820876147,-15.59884556010709,0 +-56.08925485053858,-15.59899560321059,0 +-56.08905342499337,-15.59933749476433,0 +-56.08894101387293,-15.59957266743873,0 +-56.08882830210015,-15.59980796817942,0 diff --git a/R-utils/roads/br174.csv b/R-utils/roads/br174.csv new file mode 100644 index 000000000..68cb5e1b5 --- /dev/null +++ b/R-utils/roads/br174.csv @@ -0,0 +1,1135 @@ +-60.02621894850117,-3.071926212508581,0 +-60.02617426280253,-3.071755568905956,0 +-60.0255160246447,-3.070217037129843,0 +-60.02515387863657,-3.068836381820714,0 +-60.02513023813334,-3.06595545815287,0 +-60.0251537361766,-3.063399647413857,0 +-60.02517885786123,-3.060102427803723,0 +-60.02521025672343,-3.056369654236083,0 +-60.02522327294516,-3.053187931415669,0 +-60.02504525780651,-3.050320480157268,0 +-60.02491971754522,-3.047097750514837,0 +-60.02481429105427,-3.044567316600244,0 +-60.02506109923646,-3.041666439913682,0 +-60.02514757351771,-3.040392293451568,0 +-60.02451024058061,-3.037988035213149,0 +-60.02358311625657,-3.036541969190182,0 +-60.02237213111481,-3.035389985090876,0 +-60.02105833636026,-3.034471678044913,0 +-60.01884181103294,-3.032669809270119,0 +-60.01823830053737,-3.031597723909961,0 +-60.01795508431683,-3.030502024201274,0 +-60.01804721951402,-3.029149479469861,0 +-60.01855214355658,-3.028111281195854,0 +-60.01929526669524,-3.027258478511215,0 +-60.02029126539117,-3.026220589468605,0 +-60.02290389848049,-3.023524446071048,0 +-60.02550695858021,-3.020806544409099,0 +-60.02761029949605,-3.018466231404514,0 +-60.02821292675628,-3.017618966209934,0 +-60.03011428743283,-3.014667742285697,0 +-60.03122583234922,-3.012821437203212,0 +-60.03168428552173,-3.012166508557085,0 +-60.03204794832885,-3.011570234813111,0 +-60.03259369758997,-3.010618824514417,0 +-60.03286171322705,-3.009852081547784,0 +-60.03304609458402,-3.008915079697223,0 +-60.03312840633639,-3.008027347240691,0 +-60.03310717064584,-3.007177297228099,0 +-60.03258750606467,-3.004958955256792,0 +-60.03227950740425,-3.003674358002336,0 +-60.03169962159041,-3.000979113185456,0 +-60.03144613746402,-2.999689413397276,0 +-60.03138494853867,-2.998713420614791,0 +-60.03140999145498,-2.995992210713882,0 +-60.03121539087618,-2.995203154280879,0 +-60.03095598853645,-2.994381057049522,0 +-60.03046070782581,-2.993238411687976,0 +-60.02968120643841,-2.992426222482688,0 +-60.02794740913667,-2.990802910935136,0 +-60.02481397178295,-2.987770776419861,0 +-60.02178999643319,-2.984825312647548,0 +-60.01892659043195,-2.98209188661828,0 +-60.01708203344755,-2.980042791320904,0 +-60.01652069383974,-2.979017196968405,0 +-60.01612413525153,-2.978084221457763,0 +-60.01595984955918,-2.977330108177954,0 +-60.01579898658772,-2.975165617143076,0 +-60.01570906753551,-2.972808446423339,0 +-60.01562712082505,-2.971852945475774,0 +-60.01571971668236,-2.971365695517255,0 +-60.01646739153625,-2.970618489276479,0 +-60.01775662693429,-2.96923798359431,0 +-60.01940612668184,-2.967503281509886,0 +-60.0208051600612,-2.965994052270248,0 +-60.02142252378081,-2.965472195758517,0 +-60.02188459575511,-2.965225206572644,0 +-60.0254684006061,-2.963498429369758,0 +-60.0271080705913,-2.962734391622303,0 +-60.03012480686372,-2.961342792632056,0 +-60.03153011786716,-2.960409730742302,0 +-60.03209604270686,-2.959756376404622,0 +-60.03260350253567,-2.959013950585621,0 +-60.03322349602562,-2.956297170387564,0 +-60.03321905844088,-2.95534346298058,0 +-60.03334357760846,-2.953143726374509,0 +-60.0334458052162,-2.950154167493841,0 +-60.03355093898516,-2.946944091498113,0 +-60.03360900675943,-2.944513649243689,0 +-60.03371316053353,-2.941605686497467,0 +-60.0338561850859,-2.939484689642252,0 +-60.03412398863419,-2.93633275752304,0 +-60.03443406529586,-2.933572154854512,0 +-60.03488681975224,-2.9293550045535,0 +-60.03541030690773,-2.926791607418579,0 +-60.03769103196007,-2.922911037381188,0 +-60.03834237324215,-2.921572640926991,0 +-60.03859424126577,-2.91986062109352,0 +-60.03887782144307,-2.913108831698763,0 +-60.0388265399752,-2.911374452581935,0 +-60.03765298456625,-2.90770599427105,0 +-60.03595125011405,-2.902552024679994,0 +-60.03553441581767,-2.901251011402123,0 +-60.03536750040994,-2.897397884036998,0 +-60.03523289940003,-2.886044079433731,0 +-60.03521728772243,-2.873535899908183,0 +-60.03492357910496,-2.864684620079578,0 +-60.03717421317096,-2.859370718779201,0 +-60.03740391514466,-2.855017416165599,0 +-60.03623519333689,-2.852804435628169,0 +-60.03473550083187,-2.850120597163051,0 +-60.03264221656968,-2.843837428765209,0 +-60.03328625732513,-2.838892711898596,0 +-60.03407902882807,-2.831889352745622,0 +-60.0346236085924,-2.828178024787029,0 +-60.03550522622922,-2.821261433668674,0 +-60.0359260509811,-2.817143393348528,0 +-60.03624348676987,-2.814181300904751,0 +-60.0371825837025,-2.80588894368906,0 +-60.03706414215539,-2.798974129078581,0 +-60.03684190072316,-2.791817209436593,0 +-60.03661501807135,-2.775186632544862,0 +-60.03659491953499,-2.769162671895445,0 +-60.03698873399754,-2.76363141443709,0 +-60.03730116592607,-2.759533353789697,0 +-60.03778314699665,-2.757655875424588,0 +-60.03936445052434,-2.75556047056181,0 +-60.04177111169827,-2.752909636686315,0 +-60.04257572058651,-2.749886801833257,0 +-60.04392526422467,-2.741420711045003,0 +-60.04577458805364,-2.730773908145742,0 +-60.04669491098782,-2.72422283296814,0 +-60.04813269167852,-2.712109445243303,0 +-60.04966383848043,-2.700787937399878,0 +-60.04931753443032,-2.696352126139177,0 +-60.04850397466889,-2.690563662070696,0 +-60.04657710390605,-2.675475762869079,0 +-60.04351098111574,-2.660682425398235,0 +-60.0399950454017,-2.642429381143144,0 +-60.04010909419988,-2.63021156875754,0 +-60.03999365125636,-2.625359635077142,0 +-60.03916919805627,-2.609193765617531,0 +-60.03790462152109,-2.605089304692968,0 +-60.03283593996414,-2.586122131578834,0 +-60.02781015755355,-2.577731904854694,0 +-60.02585836655481,-2.568558998491314,0 +-60.02954587413487,-2.559767403436188,0 +-60.03744888072344,-2.539904065724655,0 +-60.03579299439441,-2.530827853377928,0 +-60.03802170543115,-2.518157133123638,0 +-60.03658856634389,-2.507761604324517,0 +-60.03525407993399,-2.497886324008855,0 +-60.03286617367497,-2.487196906846794,0 +-60.02901511915005,-2.471051610274738,0 +-60.02550219525589,-2.454742447231145,0 +-60.02490102500787,-2.449013482660712,0 +-60.02721457335774,-2.438839660824783,0 +-60.02944334279305,-2.428370208876042,0 +-60.03230854199123,-2.415121477729582,0 +-60.03727612778381,-2.393130866329543,0 +-60.04101269781297,-2.37610339482395,0 +-60.04197781965112,-2.361866834588221,0 +-60.04369226926834,-2.354383405041687,0 +-60.04763295159625,-2.328138308773312,0 +-60.04631336786525,-2.318279144867728,0 +-60.04306355523996,-2.293268951363971,0 +-60.04000640076632,-2.268047922207176,0 +-60.03764577269425,-2.258046226482282,0 +-60.02960544147172,-2.244735160359105,0 +-60.01925269423517,-2.212326403160651,0 +-60.01124466620718,-2.183614153328874,0 +-59.9992836059789,-2.142313252528532,0 +-59.99573696650737,-2.123737359025481,0 +-59.99527754783904,-2.121326304398437,0 +-59.99121472394335,-2.115593825668368,0 +-59.99713936886891,-2.098731818970558,0 +-59.99985887726923,-2.094115957549362,0 +-60.00766580155498,-2.080774807757515,0 +-60.02416086017413,-2.05285239636557,0 +-60.02507098665475,-2.051424063367162,0 +-60.02531131039365,-2.050549190718289,0 +-60.02552942094611,-2.049941303410599,0 +-60.02563953876714,-2.049511702325572,0 +-60.02591306394068,-2.048920372896853,0 +-60.02601376058978,-2.048109582766776,0 +-60.02575651675301,-2.045208996415556,0 +-60.02582590163901,-2.035103097711303,0 +-60.02591838665819,-2.025259514288014,0 +-60.02612240042854,-2.019180958755922,0 +-60.02630199373492,-2.004295785221432,0 +-60.02824071925342,-1.983006581925624,0 +-60.03140523083148,-1.971330978705875,0 +-60.0382608261026,-1.954062030291492,0 +-60.04768684598236,-1.937119496176477,0 +-60.0632492108751,-1.908413406694508,0 +-60.06718008988825,-1.895663072785271,0 +-60.08238511913595,-1.863889824453604,0 +-60.09010938987532,-1.858060784864706,0 +-60.09618638513098,-1.856761657311895,0 +-60.10038715612382,-1.853202098745497,0 +-60.10520381004515,-1.846816288808464,0 +-60.11667486313021,-1.837633787302392,0 +-60.12239497927539,-1.834487578224649,0 +-60.12898965780044,-1.832064385747034,0 +-60.14157964890175,-1.820684121700642,0 +-60.14635541649198,-1.810542121206037,0 +-60.14637441955171,-1.802279588537649,0 +-60.14312475376425,-1.790027020137864,0 +-60.14241365080926,-1.782265950384431,0 +-60.14468923983362,-1.774010297986795,0 +-60.14416071327674,-1.766642384472245,0 +-60.14619240170345,-1.757334746224405,0 +-60.14939597183874,-1.748120263560709,0 +-60.15351368767243,-1.738005742228942,0 +-60.1551770211323,-1.729041746526971,0 +-60.14976201352454,-1.717944664875249,0 +-60.15294114059763,-1.703991193234283,0 +-60.16041305908827,-1.685710607007275,0 +-60.16685103425186,-1.675874014651569,0 +-60.17437068701638,-1.664530219760854,0 +-60.18863783307703,-1.6331320867963,0 +-60.20043812115635,-1.615924571573395,0 +-60.20990663701342,-1.59009522725427,0 +-60.22801061240723,-1.561920279057747,0 +-60.24221035163814,-1.527465611368546,0 +-60.25326535380509,-1.503946400324386,0 +-60.27108868537335,-1.479050843916179,0 +-60.31669633351475,-1.417355644786916,0 +-60.32860054877376,-1.401345414434119,0 +-60.33503768273786,-1.39141735410293,0 +-60.33985318741689,-1.388225642679944,0 +-60.34003382793336,-1.382606838416999,0 +-60.34476083363116,-1.37886202603213,0 +-60.35105927860288,-1.375471715116643,0 +-60.36588026038864,-1.359998529073786,0 +-60.37922593876819,-1.33735547655002,0 +-60.38085784494501,-1.32996976889621,0 +-60.3821845887477,-1.314235011478596,0 +-60.39149600370444,-1.313937620481272,0 +-60.39728330272734,-1.309779211698138,0 +-60.40695991667833,-1.302394669556483,0 +-60.40764293201129,-1.288576106699725,0 +-60.40800410643387,-1.275074352050774,0 +-60.40707954412346,-1.265136832788377,0 +-60.40711962340459,-1.25708427554394,0 +-60.40903203180064,-1.252613061992748,0 +-60.41223211941703,-1.242695392012029,0 +-60.419605306402,-1.234395917257182,0 +-60.43251670502514,-1.204575765933032,0 +-60.43905044569716,-1.165728982143364,0 +-60.44507225375254,-1.133275161769843,0 +-60.45218390902186,-1.122362038854359,0 +-60.45959406144951,-1.109536134125104,0 +-60.46090653928746,-1.093168063793089,0 +-60.46727953954396,-1.074619993743553,0 +-60.47181164364351,-1.063379523800101,0 +-60.47496376305988,-1.0542378514009,0 +-60.48293532468863,-1.022339690919277,0 +-60.48726332145462,-0.9978006853926901,0 +-60.49963811192585,-0.9628086361481729,0 +-60.51446709946006,-0.9168490012561594,0 +-60.52006568297723,-0.8941265813197912,0 +-60.51763805077791,-0.8842881976639758,0 +-60.51457318412425,-0.8763046076030212,0 +-60.5145986526292,-0.8677003304702291,0 +-60.51830666012053,-0.8609455526612428,0 +-60.52325195751868,-0.8517330142728363,0 +-60.54924159364639,-0.7697320911461476,0 +-60.57513816623667,-0.709865065562484,0 +-60.59734704923041,-0.6461315092772476,0 +-60.60232309502911,-0.625884948294625,0 +-60.60607266822254,-0.6074726037299351,0 +-60.61970986715908,-0.57985617697895,0 +-60.6617529140937,-0.4570274169016141,0 +-60.67917752376199,-0.4005011741098421,0 +-60.68481342138726,-0.3685336477451704,0 +-60.68924201112642,-0.3003933660674266,0 +-60.6929628793478,-0.2899476580249149,0 +-60.69115209983462,-0.2764219412308217,0 +-60.69057084238913,-0.2635115056828571,0 +-60.69306775057883,-0.2244348849579992,0 +-60.68643622052281,-0.1602433385587299,0 +-60.6902775693201,-0.1282454902475379,0 +-60.69839459899872,-0.1005509473742236,0 +-60.69845182111076,-0.08638669315552439,0 +-60.69348821832902,-0.06803874360080581,0 +-60.68434423561499,-0.03789619663523882,0 +-60.66899952859442,-0.02250608860347186,0 +-60.65978441806774,-0.01634850216407353,0 +-60.64748980495806,0.009523013586525471,0 +-60.63585651925596,0.03533489024223598,0 +-60.61992862993771,0.06237473837066482,0 +-60.59610519105292,0.09507119321493399,0 +-60.56236276278899,0.1365479935350293,0 +-60.53954392920042,0.1823016606269859,0 +-60.52550105036063,0.2197569145743992,0 +-60.52186084499228,0.2375710193437771,0 +-60.5139231866258,0.2547864651593188,0 +-60.52256789264744,0.2725934352166217,0 +-60.51832144143696,0.2910535981852165,0 +-60.52080129591084,0.2990472600080677,0 +-60.51899614096618,0.3131973545525493,0 +-60.52516326329313,0.3224087007167382,0 +-60.52334673476739,0.3322567042859751,0 +-60.50855812075994,0.3599864006887478,0 +-60.49695348905413,0.3858175810452162,0 +-60.48348344987117,0.4097830692033906,0 +-60.47248121045084,0.4368083260685716,0 +-60.46828093843672,0.4843348644620902,0 +-60.46111762197409,0.5728502186841197,0 +-60.45816038455201,0.6238415102580217,0 +-60.45147092141593,0.6515032102945432,0 +-60.44420667372641,0.7055359856943315,0 +-60.44976583229307,0.7208689762825976,0 +-60.45469980790265,0.7306813187080248,0 +-60.45291805783818,0.7564713973140701,0 +-60.44623566660054,0.7871861947404387,0 +-60.43467371539548,0.8351088443151689,0 +-60.43290653468841,0.8682563851668978,0 +-60.43234167003497,0.8897468804958814,0 +-60.43116360692369,0.9112490493697967,0 +-60.42080304712266,0.9463240657916918,0 +-60.40063615035635,0.9856668557717407,0 +-60.40436158718894,1.005951836149562,0 +-60.38416925221721,1.036278050169941,0 +-60.38237781160595,1.062092707335926,0 +-60.38614070277892,1.092440500473909,0 +-60.4015698303252,1.129225706115987,0 +-60.41021517449997,1.15253077460908,0 +-60.40476492823419,1.186941531301105,0 +-60.39834334869035,1.205660495996157,0 +-60.38520324657235,1.220562663145762,0 +-60.40221420356217,1.22689514840115,0 +-60.42220183081912,1.2340868229509,0 +-60.46803534144721,1.242513039327924,0 +-60.48887198132593,1.249657882817005,0 +-60.49654488146474,1.258568652234386,0 +-60.51104381787407,1.27512407148966,0 +-60.53146086771007,1.280602426735159,0 +-60.55101947095649,1.283954667229779,0 +-60.5588116978011,1.291249579212187,0 +-60.56027319415496,1.294375358002309,0 +-60.56878043848884,1.304964055254066,0 +-60.57237702732392,1.310658778000047,0 +-60.57630546624424,1.315236042695551,0 +-60.57853349741338,1.318383990001207,0 +-60.58255949096873,1.324509168358859,0 +-60.5869419128199,1.329315967593584,0 +-60.59143515594671,1.334456603080054,0 +-60.59322816375005,1.337467636197867,0 +-60.59582321590415,1.340306549787998,0 +-60.6000850865042,1.344546879767115,0 +-60.6061317406317,1.35000718977865,0 +-60.61195139414256,1.355321984240987,0 +-60.61719761077555,1.360209509207389,0 +-60.62351294571943,1.366602752175742,0 +-60.62796983224284,1.370879914402763,0 +-60.63064313500423,1.37365308059374,0 +-60.6344051061938,1.377035250300467,0 +-60.63667225381557,1.380281277947371,0 +-60.63862944869648,1.383561476814362,0 +-60.64209409425658,1.389230586210359,0 +-60.64504343692425,1.394218739970099,0 +-60.64771185945527,1.398262193093886,0 +-60.65052940956544,1.4030127755648,0 +-60.65244340889473,1.405900682903272,0 +-60.6531723707575,1.407127663881185,0 +-60.65422987718404,1.407955034125432,0 +-60.65629035892855,1.408947733148469,0 +-60.66741878285168,1.415390837494237,0 +-60.67745121962451,1.420412182349863,0 +-60.69963224883046,1.42806356112452,0 +-60.71096802264371,1.430732739957805,0 +-60.72571869625347,1.431777156987094,0 +-60.73820757035561,1.441217557100462,0 +-60.74470452049251,1.446068289982546,0 +-60.75029525624224,1.450913250018648,0 +-60.75622880925201,1.456035953643134,0 +-60.76000302519677,1.457642096309661,0 +-60.76700538285375,1.458878218845051,0 +-60.77915496392586,1.462228392857972,0 +-60.78420502278083,1.465811034284563,0 +-60.79158224762241,1.470647000507344,0 +-60.80382832540547,1.477089827478001,0 +-60.81373156126586,1.482459156930713,0 +-60.81898614864811,1.484076370227359,0 +-60.82349374304228,1.483888511525857,0 +-60.83385179764687,1.481696429395413,0 +-60.84283081298146,1.480049692815365,0 +-60.85434379765972,1.477869110771018,0 +-60.86280188956146,1.476232673427388,0 +-60.87714291581963,1.475475562079017,0 +-60.8854170670113,1.475815507877141,0 +-60.89834378061395,1.479474679780522,0 +-60.90834939809052,1.482977567581155,0 +-60.92420768318151,1.489392247278779,0 +-60.94012517636029,1.495828350761761,0 +-60.95967903503869,1.496349166181681,0 +-60.96746155952496,1.496739061549543,0 +-60.97255466729339,1.49706678539237,0 +-60.97357452269775,1.498983469475824,0 +-60.97392590833137,1.501591106003238,0 +-60.97462445409013,1.50793250749984,0 +-60.97610273299556,1.515484255917336,0 +-60.98143419761004,1.538753690476667,0 +-60.98318480406779,1.545962586990439,0 +-60.98319875445286,1.551723895973064,0 +-60.97945507041179,1.553171335507866,0 +-60.97859575770718,1.555476274458738,0 +-60.97946772182093,1.558641096304185,0 +-60.98178078798566,1.561518184395632,0 +-60.98525034156838,1.565262032085838,0 +-60.98842715692585,1.56727558721903,0 +-60.99131638792734,1.569004987824899,0 +-60.99421506136576,1.571617847764503,0 +-61.002620994446,1.589392296337386,0 +-61.01072782222477,1.60205619478026,0 +-61.01796050215645,1.611838129013586,0 +-61.0226005823442,1.619616202413277,0 +-61.03784462940229,1.635737489967487,0 +-61.04940162048226,1.646944222314509,0 +-61.0583682020643,1.654135315436068,0 +-61.06355835008431,1.657574294293806,0 +-61.07888161934759,1.671087529693099,0 +-61.08619049975096,1.677727664951164,0 +-61.09832605008835,1.687202461269147,0 +-61.11191308321681,1.699269887815225,0 +-61.12609681086652,1.717103932957806,0 +-61.13625730309543,1.731212646598363,0 +-61.13850011889784,1.736100264346597,0 +-61.14234770169237,1.739388063360632,0 +-61.14590650767446,1.743330225023072,0 +-61.149457913821,1.747268930053218,0 +-61.15103525656026,1.753944663722563,0 +-61.15311929944273,1.759613144724417,0 +-61.15533704822339,1.764584344844668,0 +-61.15702550026349,1.772885136398886,0 +-61.15579503951449,1.779666025919073,0 +-61.15525963655603,1.786310355861333,0 +-61.15499564478245,1.791016798807083,0 +-61.15060881449726,1.806660957695399,0 +-61.14744350622377,1.814555519352369,0 +-61.14357525722937,1.817886450383221,0 +-61.13832260874388,1.821221647698494,0 +-61.13542272612967,1.824136017691816,0 +-61.13307330600855,1.825941153914535,0 +-61.12975733825448,1.828716666321036,0 +-61.12657774036644,1.830662114826192,0 +-61.12146232526295,1.834275668682844,0 +-61.11870346957559,1.83885154732136,0 +-61.11567821118842,1.845773512052845,0 +-61.11611466586421,1.854493064661557,0 +-61.1146170017254,1.872500194106654,0 +-61.11440435236226,1.877410663252953,0 +-61.11440531048569,1.877857066291,0 +-61.11419667018227,1.884778027636576,0 +-61.11376863523879,1.89304057906004,0 +-61.11289027460529,1.898846808861545,0 +-61.11045065900315,1.905325748805733,0 +-61.11001737097556,1.910236505804859,0 +-61.10645538827755,1.913813346862855,0 +-61.09932240044897,1.917844829601963,0 +-61.09647040688736,1.921461255700276,0 +-61.09325636734992,1.924574714319674,0 +-61.08900810938652,1.92860981890256,0 +-61.08510094281151,1.932528469273212,0 +-61.0824570108079,1.934145734901321,0 +-61.07705290479166,1.938991765807363,0 +-61.07142726303675,1.944529216503676,0 +-61.0664177384532,1.948907325671195,0 +-61.06431660250388,1.95084711695295,0 +-61.06271030902223,1.952256711243522,0 +-61.06145143407306,1.953049427140323,0 +-61.06062967740444,1.954308781749224,0 +-61.06030633732762,1.955315433178857,0 +-61.06037398738687,1.956106532355146,0 +-61.06051808822765,1.956825404039138,0 +-61.06101716114752,1.957689045015934,0 +-61.06187398248139,1.959239266908201,0 +-61.06340486897344,1.961710191495641,0 +-61.0666899782981,1.967338221364763,0 +-61.06875066953519,1.970971523089105,0 +-61.07023413255943,1.972937625518042,0 +-61.07016468992346,1.973981593189489,0 +-61.07021311154801,1.978228283784504,0 +-61.07000038347717,1.979631744867435,0 +-61.06968159858401,1.981174147363348,0 +-61.06986547291748,1.982534321477434,0 +-61.06965240161777,1.983831326977417,0 +-61.06945629900931,1.990733855899964,0 +-61.06911805290701,1.994736307900986,0 +-61.06947413298097,1.99830750504042,0 +-61.06991411626206,2.00030619140346,0 +-61.07061179871071,2.001000574396993,0 +-61.07122207871679,2.001521125059358,0 +-61.07235993266609,2.004292156547138,0 +-61.07358233664906,2.006199749752224,0 +-61.0767272915335,2.011151543608953,0 +-61.07864945630434,2.01462257247665,0 +-61.08161818289424,2.020104934998097,0 +-61.08484430745052,2.025651660430375,0 +-61.08562883895426,2.027124436394132,0 +-61.08563396942868,2.028343606729048,0 +-61.08667553291627,2.028944681577464,0 +-61.08720137823618,2.030161269885422,0 +-61.08841774479903,2.031888417648153,0 +-61.09008063387059,2.037535664367495,0 +-61.0903591255974,2.042922337264843,0 +-61.09088816145134,2.047433160010194,0 +-61.09117073576277,2.050662422658243,0 +-61.09115908127921,2.054577189752667,0 +-61.09045630573193,2.056309664294464,0 +-61.08995832583751,2.057882294616525,0 +-61.08979381464437,2.059102101722795,0 +-61.08893663547227,2.060673598030145,0 +-61.08695809023494,2.065208736316063,0 +-61.08557148612466,2.068859313883389,0 +-61.08392312627062,2.072246232845803,0 +-61.08192202835361,2.075773445971114,0 +-61.08026144407318,2.078627460047844,0 +-61.07931953816247,2.081732259550972,0 +-61.07956367228184,2.083758441642338,0 +-61.08040544624404,2.087974408260852,0 +-61.08088767100653,2.09118434863425,0 +-61.08161634261106,2.096178837013226,0 +-61.0824565652258,2.099861848590287,0 +-61.08188213470297,2.104633478168142,0 +-61.0818836176814,2.107953224466547,0 +-61.08307931175635,2.111393215899259,0 +-61.08475749263047,2.116382678280212,0 +-61.08488568104298,2.118885996321133,0 +-61.08620276748457,2.120910671062963,0 +-61.0872768431375,2.127054097494666,0 +-61.08835972344455,2.132873375013396,0 +-61.08906082034788,2.13690490513076,0 +-61.08843555144609,2.138570256411668,0 +-61.08741299256872,2.139604945170269,0 +-61.08535744376256,2.141108619635305,0 +-61.0810291915012,2.145195330121282,0 +-61.07295494783899,2.153256487535014,0 +-61.06767632827243,2.157033156498041,0 +-61.06445338318178,2.160695536306527,0 +-61.05960288417849,2.163951237046428,0 +-61.05593943935491,2.16893240862996,0 +-61.05116726075768,2.173645600068731,0 +-61.04467605922153,2.180510142996914,0 +-61.03733552169068,2.187008989327356,0 +-61.03306878519962,2.191634900927589,0 +-61.02133232865959,2.20309512029398,0 +-61.0129659337648,2.211323768064691,0 +-61.00561885153056,2.219054390575033,0 +-60.99640015229473,2.22882236885187,0 +-60.98328111220372,2.242246490358524,0 +-60.97817621902368,2.247719017354,0 +-60.97680255323885,2.251150671681088,0 +-60.97491468030626,2.2549285197238,0 +-60.97318706256864,2.261427485766595,0 +-60.97387218002153,2.263480710532563,0 +-60.97164504741259,2.26519911940859,0 +-60.96890905024838,2.269829649719452,0 +-60.9649728012139,2.275492875079995,0 +-60.95982842513624,2.279793156086294,0 +-60.94081262212526,2.293336930512936,0 +-60.93002879126094,2.297644795273754,0 +-60.92437716960485,2.3000584974731,0 +-60.91319359994334,2.300936421141273,0 +-60.91199767072226,2.3026523073995,0 +-60.91080231041019,2.304710888314975,0 +-60.90739906171473,2.31252507056309,0 +-60.90638455401412,2.317661080491864,0 +-60.9072653046093,2.325868747393691,0 +-60.90883315862023,2.334412732961373,0 +-60.91111061980309,2.352865626917924,0 +-60.91301721569238,2.360895957060382,0 +-60.91387796324188,2.368608180648917,0 +-60.91667739972183,2.389975349567057,0 +-60.9175537586603,2.39647228800118,0 +-60.91809243585265,2.402965402192091,0 +-60.91895690726445,2.409635977766851,0 +-60.92086443187379,2.414405939069074,0 +-60.92087407963763,2.418850768498311,0 +-60.92173493736567,2.421413305971787,0 +-60.92259565398605,2.42397630261329,0 +-60.92140172164387,2.426718800785842,0 +-60.92020667921301,2.428948388294858,0 +-60.91954299229174,2.439954541798488,0 +-60.91921692814685,2.444737970084574,0 +-60.9195854145863,2.457405279972117,0 +-60.91959120650453,2.460313520633183,0 +-60.92052304819066,2.462205907130443,0 +-60.92078067417524,2.463613382209062,0 +-60.92084775588375,2.465023780315045,0 +-60.92007876874912,2.466629135570973,0 +-60.91963134743697,2.468170900067013,0 +-60.9193819935059,2.469709498651892,0 +-60.91861407167184,2.471058934427348,0 +-60.91771485834082,2.471961231164816,0 +-60.91473413762543,2.472241190821072,0 +-60.91235607668591,2.473017318850898,0 +-60.91101042138763,2.474562782929541,0 +-60.90927951052723,2.475850674933176,0 +-60.90819159466553,2.477201624350481,0 +-60.90691605694149,2.478857081330062,0 +-60.90473056836866,2.480212948659987,0 +-60.89768171863135,2.483897191878182,0 +-60.89095849140539,2.487286413819864,0 +-60.88661221318225,2.489983249402318,0 +-60.88469103290092,2.491847307716843,0 +-60.88431172493219,2.494800643619697,0 +-60.88348220964902,2.497563482910611,0 +-60.88240961795469,2.505512083488837,0 +-60.88069884141837,2.514632482849183,0 +-60.87961684513248,2.519577514741741,0 +-60.87911513720029,2.522973650448064,0 +-60.87753065995978,2.530453595629187,0 +-60.87723501131053,2.541712861817069,0 +-60.87719004842283,2.55094526193716,0 +-60.87715459393872,2.562841669125982,0 +-60.87692779184303,2.574330394502701,0 +-60.87695359643629,2.586350409414881,0 +-60.87711438653283,2.598352459039115,0 +-60.87714074375397,2.609730637214332,0 +-60.87729837671415,2.622409846397157,0 +-60.8773268360958,2.632650857587881,0 +-60.87688186888505,2.63464006146298,0 +-60.87524556759335,2.644000291693286,0 +-60.87460495361856,2.648497761829933,0 +-60.87295910402045,2.658024706371553,0 +-60.87208598050847,2.667170312410792,0 +-60.8706292985058,2.676628660012859,0 +-60.86946044786296,2.683191689808132,0 +-60.8682412365018,2.684798801855855,0 +-60.86715843929825,2.686017014816876,0 +-60.86104548505862,2.691144290185425,0 +-60.85815619760231,2.694043523734125,0 +-60.85674720727747,2.696807453476926,0 +-60.85451051522627,2.700471116326904,0 +-60.85278360655083,2.702012676409335,0 +-60.84934116206036,2.703978710371439,0 +-60.8421953967641,2.70854876683142,0 +-60.83085395358795,2.716020344988913,0 +-60.82590587772881,2.719441849242305,0 +-60.81934444920363,2.723980993649349,0 +-60.81813034318934,2.725134067183039,0 +-60.81546907764812,2.726328542808367,0 +-60.81379512661574,2.726461721172107,0 +-60.81237999687605,2.72614194974833,0 +-60.81050573852758,2.725443823339352,0 +-60.80862181081014,2.725160026377125,0 +-60.80662238480987,2.724632016513416,0 +-60.80437563000913,2.724252316031424,0 +-60.8011040115373,2.724580120868675,0 +-60.79821990320023,2.725867402307648,0 +-60.79363205015468,2.727612020856708,0 +-60.7893353681774,2.729419645025307,0 +-60.78362887873492,2.731737349754454,0 +-60.77881790065493,2.733802697314477,0 +-60.77323840955793,2.736299525416809,0 +-60.76951964101853,2.737846606581988,0 +-60.76567075926048,2.739266490727418,0 +-60.76208283398321,2.740876053021371,0 +-60.75983892198307,2.74171434441677,0 +-60.75784801269368,2.741912077396305,0 +-60.75527908997001,2.742111124981775,0 +-60.75242623472467,2.742063553549313,0 +-60.74986455318101,2.743646096521396,0 +-60.74870994660463,2.745060030017469,0 +-60.74575701608188,2.746927701045538,0 +-60.74243339216391,2.750011545820238,0 +-60.74025795703457,2.751554000340459,0 +-60.73762497402503,2.753624459634327,0 +-60.73513763425049,2.755691179734888,0 +-60.73262652746268,2.757594146108382,0 +-60.72964102147299,2.75993288191449,0 +-60.72672394800892,2.762273445662728,0 +-60.72146676737272,2.766514779536891,0 +-60.71723481659165,2.76988885748927,0 +-60.71207978389946,2.774071537792698,0 +-60.70917150457989,2.776579984961574,0 +-60.70685575094736,2.778497264707253,0 +-60.70488522060429,2.780474475967005,0 +-60.70250123186322,2.783005385662025,0 +-60.70047590564183,2.785734333701623,0 +-60.69926976811629,2.787987551068568,0 +-60.69886650557986,2.789787803147505,0 +-60.69864603625757,2.792183305027761,0 +-60.6984738353517,2.793924122367292,0 +-60.69818364721765,2.796190669863883,0 +-60.69725402150047,2.798228250348653,0 +-60.69597613364422,2.800092327476027,0 +-60.69349458186512,2.802826059119115,0 +-60.69203742978072,2.804452676853634,0 +-60.6913225976523,2.805234778913753,0 +-60.69104176105625,2.805777468898745,0 +-60.69091279413553,2.806449908110899,0 +-60.69093499278033,2.807143880998034,0 +-60.69100035195595,2.807794644163802,0 +-60.69119582254759,2.8089232054171,0 +-60.69143602739965,2.809769292950782,0 +-60.69154877891381,2.810744060568722,0 +-60.6918773475924,2.811545051604814,0 +-60.69229806242411,2.813389122044676,0 +-60.69258008585346,2.814473916586544,0 +-60.69305929761924,2.815753554621346,0 +-60.69356007295455,2.816969158967352,0 +-60.69430631807327,2.819249146247677,0 +-60.69472177692972,2.820180138791371,0 +-60.69507136499238,2.82137174164245,0 +-60.69544243149222,2.822216002884858,0 +-60.69561733224365,2.822626784652511,0 +-60.69601011045583,2.823426586582535,0 +-60.69618289831246,2.823952413066204,0 +-60.69666398624847,2.825437932405729,0 +-60.69714457745876,2.82662979007228,0 +-60.69734190196152,2.827431428380691,0 +-60.69779953227798,2.828189144436784,0 +-60.69832984402589,2.829830872468466,0 +-60.69944268644465,2.832480997366778,0 +-60.70033467889063,2.834967537562416,0 +-60.70106801542066,2.837164127386362,0 +-60.70197924364258,2.839296530314549,0 +-60.70318122658298,2.842702195806433,0 +-60.70332897104852,2.844109771878262,0 +-60.70271502426225,2.845948472498527,0 +-60.70203081046531,2.847103533964376,0 +-60.70249663983972,2.847432590134923,0 +-60.70318605065045,2.847791343987856,0 +-60.70373442458536,2.848211357353142,0 +-60.70423670665194,2.848446684710568,0 +-60.70461454747712,2.848698604223197,0 +-60.70499075272566,2.848994353795494,0 +-60.70377405661912,2.850916851982217,0 +-60.70308648720778,2.851996607047729,0 +-60.70152887175367,2.854425503710571,0 +-60.70062133457154,2.855643243928403,0 +-60.69895674193153,2.858232585538105,0 +-60.69872279071886,2.858829688272634,0 +-60.69845739364072,2.859757486613502,0 +-60.69803941472366,2.861336544137227,0 +-60.69787317322123,2.862114717518256,0 +-60.69714738825844,2.864605804594521,0 +-60.69662699106214,2.866879075428433,0 +-60.69653481963652,2.867337713206635,0 +-60.69668400484947,2.868141832832172,0 +-60.6968051720035,2.868906448054271,0 +-60.69690252843682,2.869729540537368,0 +-60.69723592508095,2.871979527188173,0 +-60.69751566591393,2.873734673741445,0 +-60.69800819052239,2.876293097861018,0 +-60.69829427503434,2.878309840431735,0 +-60.69883814960868,2.881463630248795,0 +-60.69893228210399,2.88244937834568,0 +-60.69954533976242,2.884724664407105,0 +-60.69981136000237,2.885463101447774,0 +-60.70086933614376,2.888534696380102,0 +-60.70228779685571,2.892765000759365,0 +-60.70274430356255,2.894246839789329,0 +-60.70312811393004,2.895378852799299,0 +-60.70348184969825,2.896470455083299,0 +-60.7053419399556,2.90360214598115,0 +-60.70601825816095,2.905296941455292,0 +-60.70737401873231,2.909072273983615,0 +-60.70827887691905,2.911730436834007,0 +-60.70954570970068,2.914931643717909,0 +-60.71028838034195,2.916854580691306,0 +-60.71281106981896,2.924410469024956,0 +-60.71403560527362,2.928146398909592,0 +-60.71698448809792,2.93715742231272,0 +-60.71795352792916,2.940252818789095,0 +-60.71891894401336,2.941852119023192,0 +-60.72095883759746,2.944553438281785,0 +-60.72984200305864,2.954473342552677,0 +-60.73886066375947,2.964688364731795,0 +-60.74119319197924,2.967468249314703,0 +-60.74531953816638,2.972218224078998,0 +-60.74810409452271,2.97770500513827,0 +-60.753292877198,2.987914414378281,0 +-60.75859293116718,2.997885792602065,0 +-60.76369194418716,3.006964979010152,0 +-60.7649490911233,3.009596668719151,0 +-60.7671226915991,3.011713518894284,0 +-60.77370932848378,3.018510749305864,0 +-60.78005279967196,3.025050619140082,0 +-60.78218188420459,3.028160461678,0 +-60.78330232444506,3.030350635108482,0 +-60.78891218202281,3.04014613041637,0 +-60.79514900250111,3.050011392496571,0 +-60.79632487316927,3.05247521692311,0 +-60.79719548856799,3.054117626580874,0 +-60.80024769260735,3.060311302135437,0 +-60.80211701506707,3.06411263426921,0 +-60.80755142574991,3.075023169649945,0 +-60.808553563248,3.076838462579886,0 +-60.81250618621603,3.084598985981295,0 +-60.81777165675452,3.094696377067165,0 +-60.81876136858545,3.096325798918112,0 +-60.82136669633923,3.102432809770969,0 +-60.82549573237456,3.109901828155966,0 +-60.82628252564083,3.111541736926242,0 +-60.82794160699213,3.119068638911152,0 +-60.82916389253319,3.124307720616375,0 +-60.83014986768561,3.129795276766831,0 +-60.83253953038967,3.138871568440631,0 +-60.83292999907653,3.142035337624472,0 +-60.8322841802902,3.148570771597096,0 +-60.83190970197332,3.155186150036426,0 +-60.83125837795266,3.167685345942508,0 +-60.83116730725251,3.1718991414274,0 +-60.83199221773734,3.175672103556382,0 +-60.83331341028684,3.182620783548022,0 +-60.83376349579969,3.18665820165356,0 +-60.83450782194179,3.191988088013984,0 +-60.83489161540002,3.19459421540283,0 +-60.83565187228312,3.200871311640221,0 +-60.83630965882914,3.205225374480967,0 +-60.83678718012386,3.2086991692983,0 +-60.83822491756388,3.218911965937579,0 +-60.83945775993682,3.227007048919002,0 +-60.84041704850645,3.234607079173355,0 +-60.84201889537174,3.244814179556303,0 +-60.84239307702295,3.2479501943275,0 +-60.84262944133996,3.249037033887732,0 +-60.84465600028236,3.263138382643556,0 +-60.84512123732045,3.265782452707783,0 +-60.84662223564704,3.269200991611584,0 +-60.84805990202884,3.273202554682725,0 +-60.84884262397269,3.275846787261185,0 +-60.85309105865909,3.289229431045329,0 +-60.85946996653329,3.311289494589635,0 +-60.86192926580115,3.31910312495708,0 +-60.86414318152661,3.32651591010746,0 +-60.87182725330051,3.351384871631854,0 +-60.87394758469966,3.357807424550825,0 +-60.88025696392821,3.377450033212401,0 +-60.88636377071904,3.396682792034494,0 +-60.88945130566585,3.405329567456725,0 +-60.89037574849151,3.40675764897429,0 +-60.89038951867347,3.407798976363754,0 +-60.89069894373391,3.410285521423548,0 +-60.89329046709673,3.4168045959263,0 +-60.8949948356645,3.419521369102364,0 +-60.90142474848898,3.427355412904394,0 +-60.90705133948127,3.435124282657416,0 +-60.90718735022673,3.437130334862862,0 +-60.90746365783688,3.43933939764736,0 +-60.90900077133722,3.449793900066691,0 +-60.90956460234116,3.454616487213448,0 +-60.91037850818957,3.460996808641018,0 +-60.91075894690334,3.463644555773985,0 +-60.90941815457787,3.469292454991761,0 +-60.91008129741425,3.476138089973414,0 +-60.91118632963857,3.477366839263667,0 +-60.9126184922416,3.478854565549637,0 +-60.91372716248206,3.481962532797686,0 +-60.91392118192609,3.485455560481578,0 +-60.91482597060531,3.49130021240887,0 +-60.91654998435639,3.496511393452665,0 +-60.92001531108327,3.508700907524767,0 +-60.92263321403346,3.517067570685333,0 +-60.92364887949127,3.521274006142826,0 +-60.92713890347157,3.532259381034337,0 +-60.92866975356115,3.537936515986556,0 +-60.93198301036522,3.545017789854643,0 +-60.93559426380571,3.552678992194136,0 +-60.94037420164551,3.562351918655341,0 +-60.94834194751574,3.576708702524542,0 +-60.95638077426398,3.593677671011554,0 +-60.96249790153138,3.607471946056123,0 +-60.96491817302613,3.615568320272826,0 +-60.96513949354922,3.618293627662606,0 +-60.96904453612132,3.63032476034856,0 +-60.97344752281526,3.644614244709501,0 +-60.97825206233229,3.66494160216998,0 +-60.97954355278299,3.670691381850013,0 +-60.98062883285428,3.673977398442457,0 +-60.98005323571147,3.677501005386745,0 +-60.98276476154088,3.680409537271742,0 +-60.98388129629122,3.683814902012953,0 +-60.98612627981949,3.692038367918836,0 +-60.99044818839344,3.70877709875553,0 +-60.99712696777478,3.731618251639583,0 +-60.9985452634514,3.735723507312231,0 +-60.99906213889015,3.740832934690045,0 +-60.99809319288985,3.755455117018017,0 +-60.9973036044215,3.762365229548227,0 +-60.99691027345355,3.765870980182772,0 +-60.99512199809885,3.780347792426664,0 +-60.99503317330365,3.785051569783958,0 +-60.99435689030555,3.797375754094822,0 +-60.99456881862688,3.803975067708646,0 +-60.99557911042115,3.805775868474143,0 +-60.9950917892097,3.810381994535007,0 +-60.99651984435933,3.821803533893485,0 +-60.99714983357628,3.834778879305291,0 +-60.99898898908722,3.852890514145436,0 +-61.00110500226093,3.870748189544347,0 +-61.0016971097419,3.876225213210738,0 +-61.00132189144257,3.879526555227344,0 +-61.00215942956042,3.883732128369152,0 +-61.00804933017416,3.901033631069294,0 +-61.0128889056333,3.914006211463103,0 +-61.01611020592306,3.924484555643403,0 +-61.02222378068413,3.941270549884716,0 +-61.02837882747042,3.958321520400063,0 +-61.03480057229909,3.975563579223283,0 +-61.03825227143359,3.986261122334789,0 +-61.04325152640056,3.998037244163273,0 +-61.04366865529244,4.000839053436349,0 +-61.04318009218745,4.007528445750681,0 +-61.04254019703856,4.02893989321547,0 +-61.04224599768767,4.03133838340668,0 +-61.04195914605545,4.03454048955455,0 +-61.0421658102434,4.038034764865746,0 +-61.04069728601542,4.061788601865703,0 +-61.03971577196343,4.080892229460631,0 +-61.03935980097646,4.095750762133029,0 +-61.03922152675857,4.112036870991267,0 +-61.03992552610775,4.113730526501593,0 +-61.03933408270518,4.116824639593702,0 +-61.03874942586832,4.11932849445642,0 +-61.03835506106797,4.1226197612007,0 +-61.03737428219688,4.126415956225115,0 +-61.0359111732255,4.134211381205628,0 +-61.03486394438464,4.138213457593239,0 +-61.03458883538021,4.141510477147063,0 +-61.03311323382014,4.143224302832681,0 +-61.03121581291108,4.143720327801502,0 +-61.02896673962282,4.144217353118861,0 +-61.02468026795938,4.146541583887511,0 +-61.02033086879408,4.150262504712608,0 +-61.01346185268517,4.155469932374165,0 +-61.00915295399764,4.158887614202455,0 +-61.00672084478992,4.163394138911922,0 +-61.00659086510232,4.166307445766913,0 +-61.0070843983766,4.171155083085023,0 +-61.00808146559569,4.177511530765256,0 +-61.00879123175177,4.183047912652979,0 +-61.00935932200533,4.187826861929663,0 +-61.01077012445997,4.194611882380908,0 +-61.01063804544234,4.196287201656311,0 +-61.00966645380736,4.197408752871782,0 +-61.00959958028754,4.198248907965042,0 +-61.01043844098751,4.198597292002417,0 +-61.0112047732419,4.198245319330221,0 +-61.01127911866238,4.199571756684296,0 +-61.01128355456117,4.201105676130905,0 +-61.01164048162402,4.203411183271199,0 +-61.01206609472283,4.206056312602917,0 +-61.01249108968146,4.208449988498147,0 +-61.0129140785354,4.211576986001424,0 +-61.01250252391698,4.214708202269047,0 +-61.01340764043695,4.219832788054612,0 +-61.01460400087377,4.223099582712737,0 +-61.0152966210989,4.225924036978867,0 +-61.01599299678453,4.230799888243268,0 +-61.01627059613566,4.232663110093091,0 +-61.01649064297122,4.233849445411056,0 +-61.01705391767771,4.234616826325223,0 +-61.01870865352624,4.235289426136843,0 +-61.02002488094895,4.23631892781043,0 +-61.02223381700492,4.236870005897901,0 +-61.02359060028315,4.237617339542999,0 +-61.02517420879132,4.238365966615261,0 +-61.02713694145687,4.239340664208217,0 +-61.03038726701526,4.240542148279925,0 +-61.0323511298819,4.241290271362902,0 +-61.03409188953475,4.242341617793575,0 +-61.03606931883946,4.243550593639619,0 +-61.03697555858976,4.245201348147514,0 +-61.03561821986222,4.246707890230318,0 +-61.03416393978056,4.248259998241068,0 +-61.03376477455592,4.250363013656582,0 +-61.03408313734442,4.251965473482874,0 +-61.03431375594279,4.253098364569498,0 +-61.03454656990142,4.255547698539954,0 +-61.03455036775258,4.257283639287661,0 +-61.0364454064194,4.258184772682457,0 +-61.04052751931393,4.259376211756191,0 +-61.04362924607715,4.259895237925932,0 +-61.051732368983,4.263264046796686,0 +-61.05497291194304,4.266846507736645,0 +-61.05587661609476,4.267741177836798,0 +-61.05716123820996,4.268189599668521,0 +-61.05798337746147,4.270285171596765,0 +-61.05962932728566,4.272002646197874,0 +-61.06058516821376,4.27438802402578,0 +-61.06274482332924,4.279458293491992,0 +-61.06760165352343,4.282400299179759,0 +-61.06960198695515,4.282972909809847,0 +-61.07296447552517,4.285566502696756,0 +-61.07373511797434,4.288344563804507,0 +-61.07732163772512,4.29476432140298,0 +-61.08106809641109,4.300864676350154,0 +-61.08105457487725,4.302099503873448,0 +-61.08066152384951,4.304199783126345,0 +-61.08028621799635,4.308125888788862,0 +-61.08172530213323,4.30934858253795,0 +-61.08358836334187,4.311069955659442,0 +-61.08479528237578,4.313271427999375,0 +-61.0886946595209,4.314543415052119,0 +-61.09116554599247,4.315542509086429,0 +-61.09218092516961,4.316185781869645,0 +-61.09392331221156,4.316750781975909,0 +-61.09470785756658,4.317240105210994,0 +-61.09566337973276,4.317242625107171,0 +-61.09635083606817,4.318075500411651,0 +-61.09738084871405,4.318951210612955,0 +-61.09750744927164,4.319659220785064,0 +-61.09892471680121,4.320137911933339,0 +-61.10260553683095,4.324608723681818,0 +-61.10576812093559,4.327226699172184,0 +-61.10789893117664,4.33097923728258,0 +-61.10957898886271,4.332576200110104,0 +-61.11176534289873,4.334093648558585,0 +-61.11365518561092,4.335097903804856,0 +-61.11791215414198,4.335659969941291,0 +-61.11929141772128,4.336297361969907,0 +-61.12117885679655,4.336864118386368,0 +-61.12364562221274,4.337068586347571,0 +-61.125877512383,4.337807424732729,0 +-61.12849475791074,4.338598875109003,0 +-61.13204560525338,4.33980774621598,0 +-61.13660795227631,4.340366218981607,0 +-61.13849683879149,4.341302047333,0 +-61.13965073342943,4.343601372714285,0 +-61.14015384281067,4.345109478357558,0 +-61.14052651966686,4.346343202163764,0 +-61.14185756809376,4.350234318272541,0 +-61.14243884046692,4.352906494082055,0 +-61.14348393821582,4.359339489938275,0 +-61.14490851816082,4.361259402615189,0 +-61.14610363132868,4.365245308471862,0 +-61.14687432697166,4.367724784024683,0 +-61.14741408521498,4.374607907288344,0 +-61.14867100854656,4.376244108155094,0 +-61.1489551475333,4.377745842142219,0 +-61.14919867949348,4.379977140693581,0 +-61.15030392165799,4.381994454220109,0 +-61.1513416157009,4.384376440703942,0 +-61.1510717617296,4.386858921338274,0 +-61.15107725825906,4.388081297707615,0 +-61.15267744925555,4.390019206079919,0 +-61.15536444684777,4.391740590992994,0 +-61.15923814968142,4.394462478602952,0 +-61.16047044784273,4.395952038377501,0 +-61.16175356495961,4.399378864278567,0 +-61.16260092843777,4.402838829609169,0 +-61.16357992209546,4.405227723934789,0 +-61.1639176417667,4.407343327330919,0 +-61.16302744079255,4.408762686572303,0 +-61.16168536634224,4.410819796811034,0 +-61.16039539217125,4.413272565227397,0 +-61.15723643545884,4.417104281647424,0 +-61.15629129338166,4.41897003898773,0 +-61.15496827283886,4.420960219125793,0 +-61.1537348174902,4.422314987898694,0 +-61.15223725653161,4.423132135437568,0 +-61.15019303122773,4.423677975427939,0 +-61.14713132544411,4.424306115102685,0 +-61.14326988477921,4.424122129624313,0 +-61.14052560379837,4.425998558869262,0 +-61.13902397879692,4.427074531217086,0 +-61.13670914957991,4.427612623617343,0 +-61.13439305263932,4.428678572807628,0 +-61.13208337449002,4.429078663878876,0 +-61.1284168774495,4.429978140263851,0 +-61.12516943675973,4.429671934111379,0 +-61.12127638798565,4.429966881187621,0 +-61.11927006763699,4.429532308183765,0 +-61.11752348336316,4.428869319588864,0 +-61.11576712920392,4.428496614287554,0 +-61.11415445305277,4.428367660912192,0 +-61.11229955719658,4.429270666858258,0 +-61.11069466746717,4.430073697025227,0 +-61.10962413025973,4.430744450188455,0 +-61.1091472803968,4.431246346369179,0 +-61.1092704740764,4.431593992856327,0 +-61.10984858094715,4.431945330092185,0 +-61.11076051526872,4.432642212373567,0 +-61.1136182241235,4.435206620649601,0 +-61.11476996196514,4.43613868621687,0 +-61.11520270635695,4.436635677657671,0 +-61.11590368644422,4.437175080124669,0 +-61.11652002947638,4.43782398384574,0 +-61.11755538124474,4.438519318013266,0 +-61.11787177286127,4.438938121861934,0 +-61.11981765681734,4.440593628050596,0 +-61.12368985735026,4.443894303129506,0 +-61.12608389493678,4.446027958836837,0 +-61.12693022135522,4.44675114542314,0 +-61.12759194652828,4.447410789707054,0 +-61.12779886852083,4.44777303080662,0 +-61.12823784057805,4.44883423914494,0 +-61.1284335667297,4.449358527443933,0 +-61.12880382001205,4.449744812726469,0 +-61.12920483480499,4.450245912677638,0 +-61.13011536401166,4.450824698954778,0 +-61.13081542803954,4.450999516238523,0 +-61.13169586602387,4.451172433987792,0 +-61.13219122900633,4.451366551100906,0 +-61.13368640198618,4.452954907735005,0 +-61.13349909916227,4.453794925518011,0 +-61.13328082027861,4.456409616290296,0 +-61.13351633358888,4.456955817210099,0 +-61.13387022074017,4.457308431713941,0 +-61.13407897738895,4.457693286861416,0 +-61.13449900728186,4.457950414990262,0 +-61.13571050857146,4.459021258105644,0 +-61.13676512795643,4.460031485451724,0 +-61.13733446844312,4.460451423715881,0 +-61.13821206003048,4.460761013781063,0 +-61.13921111022021,4.461078647882765,0 +-61.14119364675142,4.461679308678036,0 +-61.14225307115471,4.462100830206146,0 +-61.14289569545676,4.462484746171351,0 +-61.14316205108791,4.462879832450714,0 +-61.14351164888596,4.464104199803418,0 +-61.14369548390609,4.464994986875434,0 +-61.14422941726109,4.466247526294799,0 +-61.14440342641934,4.466623269248983,0 +-61.14462862148326,4.467384923097234,0 +-61.14495643630416,4.467782632654904,0 +-61.14521480234698,4.4682367036962,0 +-61.14558842963071,4.468769979099169,0 +-61.14619483295967,4.469573947534082,0 +-61.14652813846994,4.470081110267297,0 +-61.14704612174613,4.470862894723797,0 +-61.14746240506083,4.471784337165188,0 +-61.14762989643148,4.472399379294242,0 +-61.14773445165998,4.472998699371107,0 +-61.14778855593492,4.473401488186776,0 +-61.14784281166913,4.473972869346773,0 +-61.14793178604705,4.475173870021139,0 +-61.14799340999107,4.475958765473529,0 +-61.1480736525661,4.477189204581077,0 +-61.14817951355069,4.478020320833854,0 +-61.14821374713473,4.47818094147356,0 +-61.14824185280809,4.478330279003109,0 +-61.14825262566224,4.478500400383034,0 +-61.14823841582464,4.478677376116814,0 +-61.14821709502942,4.478822228582598,0 +-61.14823495776859,4.478942202259189,0 +-61.14828131554256,4.479164294801365,0 +-61.14829201855915,4.47931561324669,0 +-61.14832405366803,4.47945985777697,0 + diff --git a/R-utils/roads/br230.csv b/R-utils/roads/br230.csv new file mode 100644 index 000000000..84c7c7a56 --- /dev/null +++ b/R-utils/roads/br230.csv @@ -0,0 +1,10423 @@ +-64.79625623453339,-7.260443837726356,0 +-64.79642649645943,-7.260200774119342,0 +-64.79570473293637,-7.261090694016359,0 +-64.79481409982903,-7.261939847634997,0 +-64.79351563794945,-7.26228935662254,0 +-64.79237611605502,-7.263173772780843,0 +-64.79139949075315,-7.264226103055077,0 +-64.7911264598637,-7.265415924224466,0 +-64.79130200949361,-7.26702651585258,0 +-64.79194251689006,-7.268233161353545,0 +-64.7911041301528,-7.268628234995743,0 +-64.78995466283089,-7.270086245249239,0 +-64.78827173173538,-7.271246293301588,0 +-64.78411216316263,-7.275261732688588,0 +-64.77871899098008,-7.280071917308276,0 +-64.77464644206687,-7.28383343672544,0 +-64.77085114270167,-7.287465893306198,0 +-64.76889241407984,-7.290223237652221,0 +-64.76233175877354,-7.302659940502689,0 +-64.758921970606,-7.309396558536163,0 +-64.75642393401283,-7.313994431390276,0 +-64.75476908615452,-7.317254902097183,0 +-64.75189587132446,-7.32287558991824,0 +-64.74850216987568,-7.329543297850022,0 +-64.74802670030235,-7.330397849353053,0 +-64.74730380739803,-7.33190018573338,0 +-64.74588815272946,-7.334522136704574,0 +-64.74426929270625,-7.337298155510662,0 +-64.74287806232157,-7.340143873930802,0 +-64.74133555543131,-7.342781083212563,0 +-64.74008661838255,-7.345210351860865,0 +-64.73925346371936,-7.347653523524457,0 +-64.73912676665809,-7.350112607725316,0 +-64.73864514632332,-7.356923938985693,0 +-64.73793074918896,-7.369438202656998,0 +-64.73713129342936,-7.380305829226597,0 +-64.736652252461,-7.3879891145883,0 +-64.7356652756667,-7.403814125913093,0 +-64.73545062576086,-7.408216074853756,0 +-64.73481351347097,-7.411087600678481,0 +-64.73396174565319,-7.412828726637486,0 +-64.72979496950089,-7.415482265705841,0 +-64.72564189111749,-7.418135195172431,0 +-64.71892963127408,-7.421928774298676,0 +-64.71448311488506,-7.42430224446344,0 +-64.70229088578543,-7.432029900468632,0 +-64.6915695163634,-7.437741730427527,0 +-64.67670596665371,-7.446672496967317,0 +-64.66856408701206,-7.450654739915336,0 +-64.66307974444528,-7.453748152857823,0 +-64.64938332435389,-7.453917246141528,0 +-64.64019914645593,-7.45289752849777,0 +-64.63445037664893,-7.455505503488253,0 +-64.62530339887282,-7.459540437665605,0 +-64.61732090352105,-7.463615851135373,0 +-64.61236338546422,-7.465847104495214,0 +-64.60342426873522,-7.464194608655183,0 +-64.57882442313814,-7.460956718017568,0 +-64.56839278195194,-7.460314263098099,0 +-64.5436221905418,-7.46129503607283,0 +-64.53284355721999,-7.461912544024161,0 +-64.51395652878649,-7.467245539383611,0 +-64.50404617329127,-7.469828990159923,0 +-64.49447351592416,-7.467944119839493,0 +-64.47301499713555,-7.46216132713752,0 +-64.45974241906842,-7.464015883380849,0 +-64.42091210959941,-7.468718376884669,0 +-64.38530425185932,-7.472430559507099,0 +-64.37887431795959,-7.472952567186981,0 +-64.37222961856443,-7.47471377574046,0 +-64.33151669227421,-7.479322579289409,0 +-64.30287848381471,-7.482114799397357,0 +-64.28717718809501,-7.484325346943216,0 +-64.23188941914567,-7.460897091415521,0 +-64.22119848199448,-7.461739017351112,0 +-64.15572913149708,-7.468454070416689,0 +-64.1298150334522,-7.470422198719801,0 +-64.12749467867383,-7.469316426277042,0 +-64.1260333136353,-7.468017517203475,0 +-64.12349902807202,-7.466907011018292,0 +-64.11946967878055,-7.467671831571323,0 +-64.11434750587837,-7.467562490204734,0 +-64.10514770749523,-7.468638247580711,0 +-64.08754746140944,-7.475828900522823,0 +-64.03527758477756,-7.476206890976412,0 +-63.96706547935484,-7.476241758771172,0 +-63.89206239020136,-7.477353753035051,0 +-63.8405941324925,-7.483692210067214,0 +-63.79938972260474,-7.48776423344125,0 +-63.78211079175523,-7.485144127074349,0 +-63.75875943735422,-7.482646250211853,0 +-63.72600252391049,-7.489134625148159,0 +-63.66526365151216,-7.499725469736867,0 +-63.66095290806962,-7.501620165189911,0 +-63.65744700110575,-7.501294096110739,0 +-63.64993755215622,-7.500629790542148,0 +-63.6441592982116,-7.500998826473486,0 +-63.63912011711423,-7.502129506954206,0 +-63.63183037455914,-7.500979511679293,0 +-63.57660013797594,-7.492031699525652,0 +-63.52351862946639,-7.493328894548544,0 +-63.47777103409501,-7.497763942713965,0 +-63.43270102551035,-7.498727709016705,0 +-63.40149846500174,-7.502497567931059,0 +-63.39017367038147,-7.503733341484602,0 +-63.37862297153411,-7.50322543348913,0 +-63.36660108204583,-7.503215615591033,0 +-63.3624957752285,-7.506610225314771,0 +-63.36118011697454,-7.508824283027574,0 +-63.35755647067185,-7.512732509184819,0 +-63.35496539811231,-7.515913326458682,0 +-63.35166248012585,-7.517826849691505,0 +-63.34758182672465,-7.520965560585104,0 +-63.34475414806527,-7.523887424282703,0 +-63.34296253479832,-7.525340222900979,0 +-63.33989714735944,-7.527511402470966,0 +-63.33458282638124,-7.528887215047291,0 +-63.32899551991143,-7.531252104080989,0 +-63.31929119433535,-7.533977913819483,0 +-63.29587582276194,-7.547158580578057,0 +-63.28999015114818,-7.551821225809062,0 +-63.27826024667417,-7.558037744518251,0 +-63.26861975484001,-7.563771498708567,0 +-63.2685508653116,-7.563790519507395,0 +-63.26610500840385,-7.565374736471266,0 +-63.26051835597606,-7.568886341886525,0 +-63.25778382147917,-7.570171132505962,0 +-63.25483819690469,-7.572232182596446,0 +-63.25084491640744,-7.574632381338946,0 +-63.24639096083607,-7.577037624419477,0 +-63.23788135666264,-7.582335699300376,0 +-63.23172866981596,-7.585674429949197,0 +-63.22607219930631,-7.589129707492464,0 +-63.22239795084815,-7.591070481708983,0 +-63.22028082654732,-7.591492781832683,0 +-63.21304076918555,-7.591584497306804,0 +-63.20776148396698,-7.592106399410406,0 +-63.19639484224865,-7.592505993251795,0 +-63.18191099437833,-7.592942111579114,0 +-63.17838511849666,-7.593308324563497,0 +-63.17546927872636,-7.593811756522229,0 +-63.17375229553539,-7.593962313521413,0 +-63.1710372434237,-7.593534171077934,0 +-63.16679968672165,-7.592109300912977,0 +-63.15698333817325,-7.588970239771577,0 +-63.14279175722064,-7.584376033268806,0 +-63.13502343865819,-7.581908337687341,0 +-63.12400217440698,-7.577982078090357,0 +-63.11892446185384,-7.576544854821628,0 +-63.11267861284373,-7.575203949438614,0 +-63.10935345955367,-7.572859478495617,0 +-63.10267767163258,-7.567989924948916,0 +-63.0972982865881,-7.564347666973416,0 +-63.09216534645999,-7.560373362860075,0 +-63.08679279582275,-7.556997791671243,0 +-63.082399323676,-7.553699425412141,0 +-63.07674301756503,-7.549879425899861,0 +-63.07679992468826,-7.54991463569472,0 +-63.07316069041053,-7.547393844568507,0 +-63.065765267957,-7.5422060396243,0 +-63.06146843596163,-7.539449094117183,0 +-63.04953792533943,-7.530896853268568,0 +-63.04290982757495,-7.526262004157983,0 +-63.03336892455028,-7.51978553100515,0 +-63.0274935029685,-7.515810508077746,0 +-63.02872048968647,-7.516620982486081,0 +-63.02731858441695,-7.514473963152677,0 +-63.02729134975637,-7.511799070139558,0 +-63.02680666178871,-7.495576757502168,0 +-63.02683822750847,-7.497325175361887,0 +-63.02688450593074,-7.496356563201124,0 +-63.02785117712774,-7.495491612392882,0 +-63.02778388129031,-7.494638125971803,0 +-63.02637007407593,-7.491579962182934,0 +-63.02601056089724,-7.490274626899168,0 +-63.02548196682939,-7.489254719567933,0 +-63.02426845905662,-7.488695310005473,0 +-63.02270961253383,-7.488252695027803,0 +-63.01234361837291,-7.486717603929438,0 +-63.01016658727276,-7.486060935594682,0 +-62.98379468263001,-7.488291997421079,0 +-62.97932788587934,-7.488392415185069,0 +-62.97100417841407,-7.487815757522744,0 +-62.94671933957159,-7.486758780338193,0 +-62.92956840616318,-7.491173754235898,0 +-62.91526962255606,-7.489671053238447,0 +-62.90275729134138,-7.494254635099156,0 +-62.89829824752719,-7.496529851509506,0 +-62.89496044171771,-7.499460291894176,0 +-62.89362576349861,-7.500699432073079,0 +-62.89106329089739,-7.502173968164809,0 +-62.88329087378737,-7.511838833092352,0 +-62.87868813485203,-7.526708180340786,0 +-62.88166955824091,-7.537976965249032,0 +-62.88193691974571,-7.54035732050217,0 +-62.88152900505146,-7.542749876117689,0 +-62.87980755085717,-7.546465991159,0 +-62.8752471265262,-7.551739051052729,0 +-62.8676114917999,-7.556394194026121,0 +-62.86215609592182,-7.559063920928248,0 +-62.85693035853075,-7.561288255722443,0 +-62.81972527893064,-7.561651193157232,0 +-62.81181723767109,-7.562187378625159,0 +-62.80592831879715,-7.564640184583009,0 +-62.79377167272084,-7.570284509551803,0 +-62.78222139519878,-7.575401310157254,0 +-62.77197325164437,-7.580291348396034,0 +-62.74504258256913,-7.592557320940494,0 +-62.73261099753262,-7.595849017674002,0 +-62.71568327091384,-7.603278295101822,0 +-62.69635780218129,-7.611180954921589,0 +-62.69148670494964,-7.613241418166142,0 +-62.6782710264591,-7.6229057004585,0 +-62.66135065263946,-7.63268124181564,0 +-62.65617441650384,-7.635553350743988,0 +-62.64978720945808,-7.637123286094113,0 +-62.63644812793607,-7.642300524435149,0 +-62.61299747886027,-7.655641542336645,0 +-62.59569566477017,-7.665536999644841,0 +-62.57199290893925,-7.684075420897708,0 +-62.56147565438847,-7.692536168017674,0 +-62.53822252547789,-7.70918683261626,0 +-62.52903139439657,-7.71428297800478,0 +-62.50228784248192,-7.728970349637983,0 +-62.49333591206275,-7.73292207424752,0 +-62.46859019854823,-7.742210933670851,0 +-62.46143899873165,-7.750126719921651,0 +-62.44360246455999,-7.768773713405345,0 +-62.43487893504276,-7.773539951581397,0 +-62.3876010730063,-7.791951790295742,0 +-62.36300941248745,-7.799913532047455,0 +-62.34467687656975,-7.80699119490663,0 +-62.33228150824521,-7.81664307509893,0 +-62.30976305782286,-7.833497269291914,0 +-62.29575604920009,-7.83431342598813,0 +-62.29359677514258,-7.836667391621451,0 +-62.29195235910001,-7.840018415349786,0 +-62.274028161637,-7.850748079170744,0 +-62.23163806919275,-7.872831954786732,0 +-62.21404823201872,-7.881543460142428,0 +-62.1854972395854,-7.891285469469003,0 +-62.1481213752586,-7.915006029987647,0 +-62.1312256895129,-7.926871571203854,0 +-62.09762910778856,-7.937768636789285,0 +-62.05295148427377,-7.95636073908048,0 +-62.03608514196581,-7.96994940838727,0 +-62.02055524512541,-7.978384800560431,0 +-62.00645620552172,-7.983944233629868,0 +-61.98724965976456,-8.00733749091548,0 +-61.95912349693555,-8.007309423450728,0 +-61.93343420429455,-8.021058321068535,0 +-61.91587943884861,-8.022932083405852,0 +-61.90839905433335,-8.025563901854069,0 +-61.90147579883426,-8.027616826618576,0 +-61.88621439867077,-8.028608653527183,0 +-61.8745753356891,-8.032127332821139,0 +-61.85534145055755,-8.016275707876368,0 +-61.83708122959996,-8.015062251873813,0 +-61.82612409847147,-8.015155348381009,0 +-61.82118781573417,-8.011769739048887,0 +-61.8159601971516,-8.008100574293772,0 +-61.81046051478116,-8.007288488029634,0 +-61.80441154637591,-8.011621837197954,0 +-61.79919492463684,-8.010236072427093,0 +-61.75158950744412,-8.000638340626219,0 +-61.73890774151086,-8.001886210478165,0 +-61.72495305925597,-7.998837039378643,0 +-61.69922042423407,-7.989070500206283,0 +-61.68180982964111,-7.984607999993883,0 +-61.67757626635502,-7.982360498932651,0 +-61.67114414774704,-7.972690969243883,0 +-61.66327762008733,-7.964175583130664,0 +-61.65256421902544,-7.961110337689634,0 +-61.64270104986501,-7.951784376918811,0 +-61.63055353364459,-7.94391553674681,0 +-61.61960562425087,-7.942028381328638,0 +-61.58908790599215,-7.934147804871102,0 +-61.57347267779129,-7.929695814171938,0 +-61.56045141365528,-7.92323349060798,0 +-61.54324873526907,-7.912169534519858,0 +-61.52911781946991,-7.907471625470512,0 +-61.48264261939414,-7.893970481607147,0 +-61.45510446415432,-7.883847566283733,0 +-61.42758029380062,-7.871767466693488,0 +-61.40383885959705,-7.871002457177781,0 +-61.36542742427413,-7.861285668651151,0 +-61.31157549178921,-7.848543333012516,0 +-61.28839511007178,-7.839250470526405,0 +-61.27624958914748,-7.835907015801368,0 +-61.2368300481694,-7.819156795654957,0 +-61.211016107316,-7.808999922556126,0 +-61.20323443671664,-7.799392151293071,0 +-61.16891595077232,-7.775160883629848,0 +-61.14553461005048,-7.769902067068321,0 +-61.12572563100093,-7.751424873160211,0 +-61.11830092947874,-7.744092106690218,0 +-61.09664041021961,-7.739948803862766,0 +-61.07517151398321,-7.730038064792111,0 +-61.03018965321731,-7.705301550632629,0 +-61.01661829615063,-7.70652240218512,0 +-61.00592968441402,-7.707440950799509,0 +-60.99691067748762,-7.695491145217717,0 +-60.99256750166859,-7.689451052990059,0 +-60.96656436019448,-7.686179372544152,0 +-60.91598018258695,-7.683617803984045,0 +-60.90639039631309,-7.677085172837955,0 +-60.90381590926909,-7.678540968291576,0 +-60.90178859455124,-7.677124668138873,0 +-60.90060065641536,-7.674262056787114,0 +-60.89715295062929,-7.673723498065292,0 +-60.89308643543093,-7.670028908923304,0 +-60.88175663504756,-7.658941379860626,0 +-60.8629030928619,-7.649869907566991,0 +-60.84850814150023,-7.650546075520706,0 +-60.82558498300271,-7.639508942751184,0 +-60.80523280197886,-7.615575325326931,0 +-60.77172069525281,-7.605775597598361,0 +-60.75870709737823,-7.599280348078649,0 +-60.75229051773882,-7.589023014921599,0 +-60.74531872350586,-7.582483262527224,0 +-60.72617187352469,-7.567719004968228,0 +-60.70469958606949,-7.543425641442001,0 +-60.68192968389197,-7.524424388162262,0 +-60.66518614140782,-7.521088481356928,0 +-60.65089471254431,-7.518537604063874,0 +-60.64307597418832,-7.518270125687523,0 +-60.64080956483497,-7.521452400668005,0 +-60.63763300242661,-7.52089887914242,0 +-60.62387324808493,-7.511813398271422,0 +-60.61378377979895,-7.511313691622318,0 +-60.5924403249596,-7.503746174544223,0 +-60.57628440577905,-7.503259247703406,0 +-60.57135265920133,-7.500132685811675,0 +-60.56785953901205,-7.495287062127732,0 +-60.56351234030698,-7.492447675926279,0 +-60.55916614091314,-7.489039512088099,0 +-60.5519655120918,-7.485100165030071,0 +-60.54736513170223,-7.481150045186896,0 +-60.53897720647635,-7.478116485808108,0 +-60.53073759326334,-7.472601055557869,0 +-60.51573008522568,-7.46409432228179,0 +-60.5099200217345,-7.462386617228882,0 +-60.50464707823139,-7.462361640850925,0 +-60.50060439170969,-7.464666348488819,0 +-60.49397694999505,-7.464139755587944,0 +-60.48820808109572,-7.460178618503515,0 +-60.48159107592522,-7.459385475976665,0 +-60.46117569446293,-7.448727161175721,0 +-60.44620064307702,-7.440907927173166,0 +-60.44245226790265,-7.440356626953466,0 +-60.43275347453579,-7.439843086438443,0 +-60.42641624112822,-7.436178555553875,0 +-60.41770476308091,-7.431903669306582,0 +-60.41286716126174,-7.428558784672303,0 +-60.40669109434732,-7.423089525360618,0 +-60.40211543321713,-7.420862333056528,0 +-60.39603810041226,-7.419166387006336,0 +-60.38963831124997,-7.417734525283875,0 +-60.38519790703355,-7.41175665012308,0 +-60.38167461122411,-7.408583099963318,0 +-60.37734268887608,-7.406323046032854,0 +-60.3742380612264,-7.398159834425784,0 +-60.36651059461214,-7.391712562508159,0 +-60.35906015898525,-7.390069955357015,0 +-60.34811928765292,-7.386701704991117,0 +-60.31700047197874,-7.380154045886086,0 +-60.30363682356551,-7.378032082404166,0 +-60.29433886076818,-7.365520486404225,0 +-60.28486212043773,-7.366987505129501,0 +-60.26470404305363,-7.358242448718706,0 +-60.25718553833761,-7.352563503680333,0 +-60.21126430529549,-7.318975329732782,0 +-60.1863077845781,-7.309451970983647,0 +-60.17595538876152,-7.308884562559011,0 +-60.16196672898025,-7.308942813217558,0 +-60.13232601196714,-7.298825400349133,0 +-60.11769585179408,-7.295841177258129,0 +-60.08172862769278,-7.287502384529915,0 +-60.03040932182321,-7.263493220940546,0 +-60.00692452231267,-7.240250409815377,0 +-59.98988934529584,-7.232490572770703,0 +-59.96197632992702,-7.23443075598555,0 +-59.94477640480731,-7.234450513352972,0 +-59.88233421147419,-7.19188341471546,0 +-59.82226708398447,-7.170733567272163,0 +-59.8001245994136,-7.145865111793186,0 +-59.74761638185129,-7.127299122065832,0 +-59.70870958439162,-7.110755823995008,0 +-59.68450941511832,-7.098333831125895,0 +-59.63156153322343,-7.090189265591645,0 +-59.57712758315072,-7.058261826794657,0 +-59.51015897585899,-7.024281745651474,0 +-59.46504453612916,-7.004587376375959,0 +-59.44291042379828,-6.980677107566807,0 +-59.41500693014733,-6.962664358831754,0 +-59.38672141625437,-6.946124432333975,0 +-59.35533268607514,-6.943069778353954,0 +-59.32286628525435,-6.935858929675838,0 +-59.29129924328781,-6.906793620241996,0 +-59.27024196637078,-6.888092309973294,0 +-59.24188261118313,-6.881860479942775,0 +-59.20744593776539,-6.86647432760971,0 +-59.18329025183015,-6.846741981247326,0 +-59.15386974243009,-6.83112697700352,0 +-59.11601827121046,-6.814442625999022,0 +-59.07713639271214,-6.813355039345017,0 +-59.01784657898745,-6.784261028994117,0 +-58.99790204228935,-6.755224605527577,0 +-58.96229967697091,-6.734527459982599,0 +-58.93403045189934,-6.725229922405589,0 +-58.90047544240547,-6.720066839072237,0 +-58.89103520789773,-6.705543594170469,0 +-58.79282424488247,-6.676797648218138,0 +-58.7488521894567,-6.660210244303546,0 +-58.71432038995743,-6.64882427207074,0 +-58.67755778024478,-6.623844464019818,0 +-58.66392027952996,-6.613453473993163,0 +-58.64401375964131,-6.611376635410961,0 +-58.62934441845735,-6.610337962534102,0 +-58.5987716175972,-6.581106412066368,0 +-58.58512740899654,-6.567600166943055,0 +-58.55469666405379,-6.544732214967831,0 +-58.53270644665951,-6.53643200132657,0 +-58.50449726014318,-6.518159614526464,0 +-58.4626523671929,-6.520157907045271,0 +-58.42600962009523,-6.508691422143234,0 +-58.40401441306364,-6.501393650865158,0 +-58.37239168925343,-6.470677249208012,0 +-58.34520443397962,-6.46028985206421,0 +-58.3368148532944,-6.442633100285283,0 +-58.32319304188184,-6.428077124120596,0 +-58.31061869565781,-6.417671307345231,0 +-58.29071542846064,-6.415554111326108,0 +-58.27605499680631,-6.42175926115379,0 +-58.25929581216893,-6.426925713435558,0 +-58.23619185065906,-6.417506763742583,0 +-58.21729143535635,-6.404989841489872,0 +-58.16534473366806,-6.371933513209438,0 +-58.09643489494609,-6.35139959521662,0 +-58.05882867549855,-6.335806694794646,0 +-58.02642583531807,-6.322274810924609,0 +-57.98044446432502,-6.307714376492513,0 +-57.9626880317755,-6.298371474362105,0 +-57.9490901073996,-6.299390124837405,0 +-57.93655057732683,-6.291079002969053,0 +-57.91878123448522,-6.283798985253392,0 +-57.88948353033695,-6.27025415796303,0 +-57.87902448075844,-6.258817760572658,0 +-57.85750199309918,-6.240249463089519,0 +-57.83768627818217,-6.222615890227977,0 +-57.82204476730595,-6.201872165444784,0 +-57.80015100699065,-6.166608757739604,0 +-57.79703945809541,-6.140685061291916,0 +-57.79600492645493,-6.120984008587289,0 +-57.8012217072902,-6.114764232232424,0 +-57.79808668958839,-6.103353593811641,0 +-57.78869409766995,-6.095051406737978,0 +-57.7876431449594,-6.080526702125495,0 +-57.78867806539741,-6.064963277473645,0 +-57.78245966739419,-6.042166879621332,0 +-57.7689539844153,-6.015233957147525,0 +-57.73951849858043,-5.994292040616076,0 +-57.72378327098451,-5.973455319746634,0 +-57.71226970284427,-5.944340853844783,0 +-57.70494046631232,-5.917306432823623,0 +-57.68396734497834,-5.89434946193596,0 +-57.6734909262447,-5.875602214136367,0 +-57.66226918725506,-5.852231320299727,0 +-57.64658118516111,-5.826256554333779,0 +-57.63614568537142,-5.803403726484048,0 +-57.6194098937908,-5.785726146221245,0 +-57.60684887076641,-5.77635784116595,0 +-57.61524006711061,-5.771183121031582,0 +-57.61839411735887,-5.763922409453009,0 +-57.60477014304841,-5.761815628062594,0 +-57.59426463612603,-5.751393292523852,0 +-57.57012717086885,-5.756715640168479,0 +-57.53875827622694,-5.755604778712777,0 +-57.52832230553668,-5.736898675463161,0 +-57.51165315688712,-5.70885714419274,0 +-57.48874739388845,-5.67978989146427,0 +-57.47738567665382,-5.643523011454996,0 +-57.46808790452418,-5.626980376701058,0 +-57.45226190858276,-5.618486350852965,0 +-57.43338635087669,-5.603833263384662,0 +-57.4160967012067,-5.610244630193496,0 +-57.40250878668414,-5.604987464407695,0 +-57.38995607333528,-5.6101216376997,0 +-57.37111922255634,-5.618344774603456,0 +-57.34181344776284,-5.606773656299463,0 +-57.31965948882073,-5.58693790219822,0 +-57.29882869354471,-5.572389487711273,0 +-57.28010540638811,-5.553711941828146,0 +-57.26659453667222,-5.536079850876103,0 +-57.24680339360482,-5.518408480965973,0 +-57.22909506661318,-5.500737007585894,0 +-57.21346340183062,-5.480981078130672,0 +-57.19883659195139,-5.46741845812152,0 +-57.18106635372612,-5.451756350457986,0 +-57.18733197343256,-5.415388820447797,0 +-57.16274413158906,-5.401867985303944,0 +-57.15128998225502,-5.380042053054134,0 +-57.14191636030114,-5.357171018106342,0 +-57.13567948278104,-5.338472164145338,0 +-57.13673516249897,-5.321857761986077,0 +-57.13674346035604,-5.310431343543068,0 +-57.13153293834861,-5.298983543472155,0 +-57.12841162437277,-5.284424255707927,0 +-57.11603925898275,-5.258942625329046,0 +-57.11190765751981,-5.237155635574109,0 +-57.11196635897094,-5.207085323793035,0 +-57.08485144549876,-5.197679964726506,0 +-57.05979824162844,-5.194498356878401,0 +-57.04726682442179,-5.193425912177249,0 +-57.03684305581344,-5.1778267631672,0 +-57.03693270732493,-5.16126040647413,0 +-57.0370488619515,-5.140567714640686,0 +-57.03717078114398,-5.118855796278646,0 +-57.03090687176034,-5.108448368854716,0 +-57.01826362399022,-5.106231966028886,0 +-57.00664934485196,-5.106094502057073,0 +-56.998233015217,-5.104983453680016,0 +-56.99302282377454,-5.087298848856499,0 +-56.99305535910276,-5.072765215567961,0 +-56.9909934716964,-5.058220816747443,0 +-56.9803796650921,-5.044662660031748,0 +-56.95958867685246,-5.021808679806215,0 +-56.94085652643812,-5.008295668095721,0 +-56.93252503846248,-4.993764364491497,0 +-56.93150220701092,-4.978201374728745,0 +-56.91168351746986,-4.965721740925439,0 +-56.89186164157061,-4.951159708434099,0 +-56.87307904350391,-4.935554371661761,0 +-56.86994749528003,-4.933471933561512,0 +-56.85951923459422,-4.923068491507979,0 +-56.86580297078008,-4.908543281917497,0 +-56.85541050873631,-4.890871855499236,0 +-56.85021999490719,-4.879440180429246,0 +-56.84502964784117,-4.868008433020514,0 +-56.8283724964281,-4.865903996325181,0 +-56.82322149696529,-4.856560772487485,0 +-56.79319498092383,-4.837862664137454,0 +-56.78472812315121,-4.819107786536994,0 +-56.7676675254278,-4.783579418518197,0 +-56.77615103113511,-4.768054980631789,0 +-56.77855803074765,-4.7538718444176,0 +-56.75253571672332,-4.740314732794345,0 +-56.73798377251841,-4.723677061782126,0 +-56.73804595069169,-4.701905452547424,0 +-56.73703820062502,-4.686343581717792,0 +-56.71311236580091,-4.666557726986466,0 +-56.6589050624248,-4.655990757728745,0 +-56.63384465189684,-4.660049351917104,0 +-56.60878147494154,-4.659954817416692,0 +-56.59107759855093,-4.647441687732786,0 +-56.57338193332091,-4.637013353809211,0 +-56.55773339626859,-4.636966926180795,0 +-56.54622446572856,-4.645234854907273,0 +-56.54096258821116,-4.656636184114115,0 +-56.53990759084484,-4.670147811032059,0 +-56.5221190965292,-4.680474764465403,0 +-56.50220065446039,-4.685582966832254,0 +-56.48746890060684,-4.702143539251114,0 +-56.46913117962304,-4.702191105626224,0 +-56.46079711222092,-4.69385339930364,0 +-56.44620369129755,-4.681336673195784,0 +-56.43687496342005,-4.657415854188911,0 +-56.42539317076621,-4.642812581043422,0 +-56.39609226046185,-4.631230435624881,0 +-56.3619009894647,-4.628176515208104,0 +-56.34005204191099,-4.618782059779785,0 +-56.31497512924366,-4.609291711970004,0 +-56.31294067755972,-4.594750585000508,0 +-56.3119450458666,-4.582292936141366,0 +-56.30487262413593,-4.560000639556716,0 +-56.30696774634622,-4.545463150996621,0 +-56.30278266456286,-4.524660729189819,0 +-56.29130076705972,-4.505908343898439,0 +-56.28085197204657,-4.499630657644365,0 +-56.27249617504496,-4.491280212254558,0 +-56.27669684227138,-4.479860066118951,0 +-56.28402751194237,-4.468449696451589,0 +-56.28509050849863,-4.444526365761714,0 +-56.28823991443512,-4.428932127750773,0 +-56.29138567295532,-4.417498571578045,0 +-56.28645655682021,-4.397107105447155,0 +-56.28548015579142,-4.386754972776104,0 +-56.28035989222644,-4.375375972333466,0 +-56.2460323944679,-4.365938901391672,0 +-56.2252033930372,-4.350269869034712,0 +-56.19901285035562,-4.342791662474737,0 +-56.16980836546546,-4.34997748173556,0 +-56.14790472694823,-4.344698815991578,0 +-56.11349064447578,-4.314395051589617,0 +-56.08497768862662,-4.295218129474724,0 +-56.07145069184477,-4.284782019430087,0 +-56.04746787505084,-4.273250712469721,0 +-56.0401999438586,-4.258672091549789,0 +-56.02978432540213,-4.248232909811989,0 +-56.01202734822937,-4.24607161191233,0 +-55.99843531124807,-4.255376641331025,0 +-55.989018890445,-4.264699052213706,0 +-55.98170253283099,-4.268831089770546,0 +-55.98006279329445,-4.270125385606629,0 +-55.97867404002621,-4.272448903011201,0 +-55.97844823552526,-4.275518643748082,0 +-55.97546158111448,-4.279534893944977,0 +-55.9726813443431,-4.285458665175397,0 +-55.967786299282,-4.288092352141672,0 +-55.96246802985153,-4.29104062183978,0 +-55.9620102220968,-4.293096620836645,0 +-55.96086472570542,-4.295394093651688,0 +-55.95969613033588,-4.297288264364904,0 +-55.95959012296615,-4.299391157068003,0 +-55.95959061516589,-4.301072307551913,0 +-55.95868648649127,-4.315008156828059,0 +-55.95708214337304,-4.326953731306823,0 +-55.9627704289626,-4.341495098964759,0 +-55.96169220901411,-4.356001013125264,0 +-55.96009367188225,-4.369985769746648,0 +-55.96266158164526,-4.381401766710354,0 +-55.96108183059291,-4.386597898793581,0 +-55.95741075912972,-4.393363615001553,0 +-55.94906012013283,-4.397007325161841,0 +-55.9365477734733,-4.398038748895913,0 +-55.9250867222107,-4.397493218473579,0 +-55.91310125848175,-4.397465476769034,0 +-55.90529149667656,-4.394850794775969,0 +-55.89956730205285,-4.390687279270843,0 +-55.89126264460312,-4.393726454951916,0 +-55.88089737230103,-4.387948325688633,0 +-55.86996355023201,-4.383257556875812,0 +-55.8573976016829,-4.381722813336995,0 +-55.84490048339481,-4.374422986837454,0 +-55.82511509197502,-4.367610539647388,0 +-55.80778678694497,-4.359191228697868,0 +-55.79741992105661,-4.353939700783322,0 +-55.79377294889484,-4.352340475289234,0 +-55.79132724608966,-4.351211602256496,0 +-55.78802142728481,-4.349555906987404,0 +-55.78535366401932,-4.347468207295551,0 +-55.78521248062088,-4.347286563644678,0 +-55.78318324494361,-4.345667496175932,0 +-55.77397910918039,-4.340103476890144,0 +-55.76678972305658,-4.33560851048023,0 +-55.75786319980224,-4.329513258087514,0 +-55.75201165183708,-4.326477571199639,0 +-55.73795118041651,-4.32054319208412,0 +-55.73171377033214,-4.317676350608082,0 +-55.72957557576274,-4.315172685718972,0 +-55.72815658835534,-4.311602219829441,0 +-55.72492561825499,-4.307471479047381,0 +-55.72173733327877,-4.304265645428336,0 +-55.71568743998154,-4.298693881927194,0 +-55.71247714726895,-4.296186796482191,0 +-55.7105173349751,-4.294397932696135,0 +-55.70581897690478,-4.289347862874354,0 +-55.70383535016241,-4.285511116323553,0 +-55.70132866913252,-4.281726939961245,0 +-55.69962201063588,-4.278405825007549,0 +-55.69118018260293,-4.274761345699376,0 +-55.68041753096064,-4.270328983690595,0 +-55.66862419555675,-4.26243650663245,0 +-55.65860851999813,-4.254334595772947,0 +-55.65101428444578,-4.253580312530178,0 +-55.6438403629311,-4.250339175143822,0 +-55.61446527679065,-4.234762804711577,0 +-55.59030150639649,-4.222703287025105,0 +-55.58612317725729,-4.222686727500998,0 +-55.57288621709147,-4.215783992251664,0 +-55.55810497893254,-4.217923948896844,0 +-55.55174117037867,-4.217660338240583,0 +-55.54006073568246,-4.212965902803861,0 +-55.52664752397328,-4.208043627056879,0 +-55.50127729116304,-4.19741831725598,0 +-55.49439701026288,-4.195180462598082,0 +-55.48235504938847,-4.195374216659084,0 +-55.46152964319248,-4.193637949641804,0 +-55.45257194420751,-4.191319338619532,0 +-55.4296852023915,-4.180273429432946,0 +-55.4259627794971,-4.177783697563101,0 +-55.42448600041642,-4.17409198619403,0 +-55.41750916929361,-4.175826890307209,0 +-55.40769781445184,-4.175815636089948,0 +-55.40009871907514,-4.176538740802977,0 +-55.39718842277075,-4.177559754332078,0 +-55.39399661326772,-4.177292238438044,0 +-55.38981592768763,-4.172836305981348,0 +-55.38518369975016,-4.170885286886792,0 +-55.37928242796448,-4.17158044447957,0 +-55.37460453327072,-4.175226778120029,0 +-55.37155596669965,-4.177343644945959,0 +-55.3695847832857,-4.178314953927627,0 +-55.364942000959,-4.177576843797949,0 +-55.35789004057619,-4.175383571744598,0 +-55.34872725675173,-4.172943724663203,0 +-55.3455763190481,-4.167821317250477,0 +-55.33801304936437,-4.160220329080462,0 +-55.32818533743721,-4.157448432583737,0 +-55.31857095633008,-4.154409843528972,0 +-55.30561502632393,-4.15151638731718,0 +-55.2931789704292,-4.149302619880475,0 +-55.28605719649734,-4.145836589475842,0 +-55.27967332143704,-4.144580705881556,0 +-55.27376925646394,-4.140626003120225,0 +-55.26616518877948,-4.135741180784004,0 +-55.25819188815073,-4.133434001911104,0 +-55.25211520350354,-4.130752946627495,0 +-55.24491017333607,-4.13414796788288,0 +-55.2350254514647,-4.13486449658666,0 +-55.22937025987107,-4.129546223299201,0 +-55.21877444688828,-4.12989811026805,0 +-55.21050882101142,-4.132145719745118,0 +-55.19185512104394,-4.133558250127867,0 +-55.18314596721,-4.134296496099857,0 +-55.1768364331849,-4.124864495651452,0 +-55.16885069504693,-4.118372483863972,0 +-55.16161373967746,-4.113393854114815,0 +-55.1571545105855,-4.111534306881708,0 +-55.14831451484393,-4.11051970012701,0 +-55.14287667189284,-4.108681887820977,0 +-55.14047407813072,-4.109290101057769,0 +-55.13527973704622,-4.113928048899202,0 +-55.12950760551549,-4.115633858026947,0 +-55.12586404327382,-4.117223989426369,0 +-55.12262232901615,-4.120428108473781,0 +-55.11919391686026,-4.122831002363481,0 +-55.10256714477388,-4.125195570695134,0 +-55.09675736805767,-4.127392939114126,0 +-55.08794636416429,-4.132585390882505,0 +-55.0821211648067,-4.136773059693682,0 +-55.07905759728303,-4.132170271247816,0 +-55.07520404805469,-4.128503785198281,0 +-55.07344109178898,-4.121674777620515,0 +-55.07386594362641,-4.118471822668105,0 +-55.07027603902524,-4.115058692398892,0 +-55.06386569829539,-4.112031613427719,0 +-55.06065946720469,-4.110215310969124,0 +-55.05380611803973,-4.108565439236388,0 +-55.04774909474695,-4.108324714337204,0 +-55.03868161935717,-4.10747463081989,0 +-55.03584231061233,-4.109664851019096,0 +-55.02628864838328,-4.109021118350332,0 +-55.00432370288407,-4.109747826059777,0 +-55.00073348189311,-4.112568500377062,0 +-54.99792170486873,-4.113964398324071,0 +-54.99308167856087,-4.117751963598818,0 +-54.98804286875092,-4.118728555133778,0 +-54.98682930511927,-4.121130116933093,0 +-54.98482353261314,-4.123330717036888,0 +-54.9810504131449,-4.124329453133852,0 +-54.97280000934153,-4.126523466448577,0 +-54.96535523642915,-4.126072211714564,0 +-54.96194334459188,-4.124853117867274,0 +-54.9583231071812,-4.12423137641313,0 +-54.95165849224372,-4.12518910020844,0 +-54.94370213811597,-4.127187680031238,0 +-54.93670998930345,-4.126964556857112,0 +-54.93335812721045,-4.122763324131465,0 +-54.9324930744692,-4.119732836489455,0 +-54.92918759270972,-4.115266317997335,0 +-54.92570470973772,-4.110428646431263,0 +-54.92211290190394,-4.107811017088924,0 +-54.91833378846302,-4.104394283313015,0 +-54.91394177277397,-4.102175913212689,0 +-54.91294305100448,-4.099368992107277,0 +-54.91274663415243,-4.096364479372109,0 +-54.91294944076864,-4.094763020797384,0 +-54.91288277014174,-4.094779960459465,0 +-54.91011538061935,-4.094068421291305,0 +-54.89422308768469,-4.088662935264086,0 +-54.88573324042115,-4.086570502159284,0 +-54.87639640950434,-4.087643252081727,0 +-54.86401177445736,-4.093240873559947,0 +-54.86238099307678,-4.098582868985572,0 +-54.85548657454785,-4.094155498413667,0 +-54.85198171137774,-4.08812126915692,0 +-54.84248318580958,-4.083330491639439,0 +-54.82318750552898,-4.081348221541623,0 +-54.80628822576386,-4.077538747182849,0 +-54.78924501414541,-4.072734304137106,0 +-54.74006471935775,-4.058069129193205,0 +-54.72576279575178,-4.049980814329879,0 +-54.71781164430681,-4.046727728746674,0 +-54.71240277890335,-4.043184146999974,0 +-54.70990497171347,-4.038447755301596,0 +-54.70080759476806,-4.035634956304207,0 +-54.69330715293059,-4.034419086443213,0 +-54.69112296955448,-4.027239162199022,0 +-54.68457907469872,-4.021591700334345,0 +-54.67981863847309,-4.014589389949257,0 +-54.67531771405847,-4.01101535970409,0 +-54.66863922287276,-4.004295719925105,0 +-54.66358855290488,-3.997306886255451,0 +-54.66138039498054,-3.991909940044405,0 +-54.65604053201019,-3.988435919817596,0 +-54.65133339837056,-3.985280745217011,0 +-54.64109376880849,-3.964379368683863,0 +-54.63451731907636,-3.942219291472678,0 +-54.61783909442536,-3.935884244363264,0 +-54.56302434031746,-3.912399777520395,0 +-54.51145844120123,-3.895593310191703,0 +-54.47308863363953,-3.8918130395163,0 +-54.4110353478153,-3.886441966545239,0 +-54.37547879785433,-3.886230650872558,0 +-54.30799907491726,-3.897193068889794,0 +-54.26230042609139,-3.888076716658479,0 +-54.22291697685736,-3.873915662729451,0 +-54.14956981090998,-3.858581380846051,0 +-54.09885924476874,-3.864613721571174,0 +-54.06341378651556,-3.86189453159446,0 +-54.02668007288143,-3.864223140938323,0 +-53.99879750109276,-3.871657502728072,0 +-53.96336310673473,-3.863874162866724,0 +-53.94316072772276,-3.835928078033806,0 +-53.91155525887834,-3.806040299659712,0 +-53.86970389437646,-3.772947737305242,0 +-53.7875689477569,-3.733410186981313,0 +-53.70395608372331,-3.711383188978136,0 +-53.60356545069675,-3.703096482884708,0 +-53.55525602186183,-3.687566502272301,0 +-53.43117931919929,-3.637584546792619,0 +-53.35893876070667,-3.621902274339874,0 +-53.29944581098133,-3.613949836103651,0 +-53.22033452649914,-3.588389540940379,0 +-53.17233550260659,-3.538626763868934,0 +-53.12040976464763,-3.509064090867597,0 +-52.97572739308321,-3.500543474840051,0 +-52.88685766331088,-3.443465435386038,0 +-52.84494037021557,-3.440566205062768,0 +-52.81698867326276,-3.442871180136649,0 +-52.72457638681007,-3.394484782464026,0 +-52.67632795943663,-3.383949419724765,0 +-52.52044644025467,-3.317192627940241,0 +-52.47113550172704,-3.296549079251399,0 +-52.43318249113544,-3.282318799818261,0 +-52.40151599487459,-3.278274196391583,0 +-52.25271926604287,-3.223606328472699,0 +-52.22498421112228,-3.200584340628451,0 +-52.19587080471107,-3.191457085928626,0 +-52.1274385865382,-3.170529875873673,0 +-52.07532587406732,-3.171282271775368,0 +-52.01575766869374,-3.166971694091455,0 +-51.96648817106187,-3.151355563326204,0 +-51.90971932948636,-3.111567197333721,0 +-51.88191757213265,-3.0960981034369,0 +-51.810878320576,-3.109462441925689,0 +-51.76499852362815,-3.130526996622889,0 +-51.71795186207722,-3.128778769357007,0 +-51.64841670047531,-3.113160171787769,0 +-51.60780341177568,-3.114046667610347,0 +-51.56820292419205,-3.158047903638237,0 +-51.53237019762318,-3.204586600134557,0 +-51.48889487412862,-3.239624900756786,0 +-51.38880626058887,-3.312253620295205,0 +-51.31736255694189,-3.371066848334054,0 +-51.21373540823067,-3.462548204038453,0 +-51.11990982817068,-3.5414045812325,0 +-51.05730972725647,-3.583952085557457,0 +-51.01637280484967,-3.614030154207647,0 +-50.98656987311603,-3.639911393308656,0 +-50.91119167247167,-3.70122522979387,0 +-50.85490276684206,-3.745052542678593,0 +-50.77042648868841,-3.788785977799034,0 +-50.67200510733282,-3.820763667955787,0 +-50.62474434765799,-3.834382373403345,0 +-50.59289422297036,-3.837942578616401,0 +-50.45097757464145,-3.856713632947792,0 +-50.38339704326389,-3.896324318816566,0 +-50.33600493296774,-3.921268715221451,0 +-50.29364864059786,-3.953737096951247,0 +-50.26810461518737,-3.969940525877737,0 +-50.26158626235044,-3.98632231679215,0 +-50.27281919349023,-4.005391038711105,0 +-50.28280158271426,-4.021921714564618,0 +-50.28262027498231,-4.039626611243638,0 +-50.28104022366504,-4.067457079919253,0 +-50.2705961596927,-4.092690670963517,0 +-50.25636991680315,-4.114109644562582,0 +-50.22050163451303,-4.136637576757694,0 +-50.17319038581243,-4.157806272040664,0 +-50.14903279654862,-4.156341571149249,0 +-50.12483991211182,-4.157411055578735,0 +-50.10573249276539,-4.158521955903978,0 +-50.06659547887097,-4.170793722165632,0 +-50.03099917653531,-4.178024410298798,0 +-49.99019342284294,-4.196581547575395,0 +-49.96580926029173,-4.221627104318747,0 +-49.95298113489993,-4.237793742654056,0 +-49.94185696714766,-4.273082031946421,0 +-49.94569164141506,-4.301942902247102,0 +-49.94709446423295,-4.32831262666955,0 +-49.94266181756132,-4.357919354586994,0 +-49.93323153921268,-4.389954229532981,0 +-49.92971761895605,-4.412157769238382,0 +-49.92370922709176,-4.435982783233941,0 +-49.91606268480842,-4.457323579743234,0 +-49.90435821944405,-4.469571471383638,0 +-49.89267287668449,-4.484270746934306,0 +-49.8713695539068,-4.496145966062638,0 +-49.85312708799291,-4.505013761661287,0 +-49.82895985903534,-4.522059376052396,0 +-49.81547317341754,-4.544156933102971,0 +-49.80779369213316,-4.567952365439147,0 +-49.78361660864864,-4.589938934507003,0 +-49.76784718427822,-4.596372508563528,0 +-49.76353077114111,-4.609524945825117,0 +-49.76404952765427,-4.632623845484416,0 +-49.74892364823656,-4.648174853372506,0 +-49.73484904411838,-4.648866220680599,0 +-49.7206261579524,-4.661107523049687,0 +-49.70309506831362,-4.674955388648591,0 +-49.68283497836958,-4.683750398688019,0 +-49.67351363593067,-4.701765746719287,0 +-49.65833227550112,-4.724671258021915,0 +-49.63829754492128,-4.735185333764636,0 +-49.63074498106863,-4.74910675556365,0 +-49.61909749922196,-4.757223053542538,0 +-49.59835244547988,-4.77165591902533,0 +-49.58086129619575,-4.785448916608743,0 +-49.57246887178208,-4.79769613410742,0 +-49.55911368580178,-4.809892318838657,0 +-49.54989194669155,-4.821311557163666,0 +-49.54298530222869,-4.847569525283169,0 +-49.53462010650444,-4.855713498351833,0 +-49.52221491820122,-4.85394087668146,0 +-49.5031220521556,-4.857861911697126,0 +-49.48817277313109,-4.865116368814997,0 +-49.48053026398901,-4.888904919182334,0 +-49.47623665708851,-4.907783716957237,0 +-49.47435117845759,-4.930806563706597,0 +-49.46591940369096,-4.943080637307055,0 +-49.45334032114627,-4.955320693384182,0 +-49.44650950122436,-4.971738041208835,0 +-49.44626029790666,-4.992340078523906,0 +-49.45021727887971,-5.008036350259786,0 +-49.45330428800177,-5.027025637489562,0 +-49.45393361797161,-5.043523698396217,0 +-49.44314744065687,-5.057998419027095,0 +-49.42814217919123,-5.074301668298697,0 +-49.42117149888124,-5.096483594284535,0 +-49.40776446170398,-5.106243382152786,0 +-49.39176245090826,-5.134080567526986,0 +-49.38828235099569,-5.151338486974532,0 +-49.37666450556455,-5.162294646063422,0 +-49.35810245480405,-5.186012921288361,0 +-49.34523686357415,-5.216406690286087,0 +-49.3383235797463,-5.24024528008568,0 +-49.32574038529864,-5.252492653190062,0 +-49.31808181565356,-5.269731016351702,0 +-49.30221554976129,-5.277015560631559,0 +-49.28796247853386,-5.287617866713995,0 +-49.25980441128689,-5.305545073231751,0 +-49.24890101762503,-5.317782749867448,0 +-49.2313905838005,-5.327483493122014,0 +-49.22050893010856,-5.33725427397033,0 +-49.21040328736444,-5.351975768254493,0 +-49.20533270822229,-5.360984117796116,0 +-49.19194727406063,-5.369916543620254,0 +-49.17449015085113,-5.37221557738965,0 +-49.16285194106455,-5.374568502141205,0 +-49.14869232390954,-5.376905690744754,0 +-49.14495636229303,-5.376559437727189,0 +-49.14075429622503,-5.376183454926904,0 +-49.13767015142727,-5.375298126491683,0 +-49.13558489676416,-5.374361866397681,0 +-49.13403744269152,-5.372584313878014,0 +-49.13133717032073,-5.370196260620934,0 +-49.12936387785896,-5.368682234807848,0 +-49.12677372223568,-5.36643298170321,0 +-49.12531857862461,-5.365183090728197,0 +-49.12479180711284,-5.363949219974588,0 +-49.12415313043441,-5.362445983671479,0 +-49.1231433819591,-5.359400427882006,0 +-49.12228691868636,-5.35647825026289,0 +-49.12196603236126,-5.35470879033297,0 +-49.12163282706145,-5.353395665740278,0 +-49.12103101921302,-5.351769996697033,0 +-49.12041822797742,-5.351049007811502,0 +-49.11922431771329,-5.350341045005208,0 +-49.11821919463916,-5.350330650886999,0 +-49.11702003895871,-5.350472740283817,0 +-49.10959135421038,-5.350320009889335,0 +-49.10572688607918,-5.350317007485207,0 +-49.10236841008258,-5.350370128552324,0 +-49.10123735299702,-5.350491116308045,0 +-49.09885784450037,-5.351421082738828,0 +-49.097021812375,-5.352563163222776,0 +-49.09183525855576,-5.355022810013235,0 +-49.08881605185967,-5.356546777298132,0 +-49.08262443978384,-5.359638549838015,0 +-49.08095967693806,-5.360575165120088,0 +-49.07877136661926,-5.361483406628894,0 +-49.07756750754719,-5.361801678429027,0 +-49.07338093210065,-5.362904732634403,0 +-49.06947990900463,-5.363859262337913,0 +-49.0660642704031,-5.364698574945426,0 +-49.06312640728079,-5.36549832201926,0 +-49.05897438420035,-5.366381244825888,0 +-49.05473935663492,-5.367874371990334,0 +-49.04928816736535,-5.368917908985022,0 +-49.03922166427596,-5.371456906827919,0 +-49.01489136493605,-5.3765074401184,0 +-48.9774785282226,-5.387101327028282,0 +-48.96769020776593,-5.390572537432571,0 +-48.96432716391889,-5.393095271052636,0 +-48.95991817803156,-5.397909849646796,0 +-48.94773119569343,-5.410047740465384,0 +-48.92246523210216,-5.429694091060727,0 +-48.90601896786676,-5.446933657195658,0 +-48.88752281922753,-5.460038277170737,0 +-48.87070908442283,-5.468580973385094,0 +-48.86063210146208,-5.475928582029777,0 +-48.84181102998043,-5.480283516349497,0 +-48.82804858134624,-5.478063922494631,0 +-48.80014219741589,-5.473968103930393,0 +-48.78718501161074,-5.475078319768913,0 +-48.759542886412,-5.482664143420768,0 +-48.7364879186715,-5.489472618011973,0 +-48.72973770775775,-5.494798154502729,0 +-48.71572391104993,-5.502070915893543,0 +-48.70398377766023,-5.506511595162047,0 +-48.69267754110771,-5.509297331739368,0 +-48.68093251326503,-5.515793665800617,0 +-48.66813512030751,-5.525799819113609,0 +-48.64091925097343,-5.537920019218667,0 +-48.61576778029264,-5.543028468820117,0 +-48.59532314090219,-5.541130707090444,0 +-48.58037879011316,-5.537619329352088,0 +-48.56574496666385,-5.544073555414377,0 +-48.54475483554241,-5.557918231761163,0 +-48.5141574125425,-5.575782643416015,0 +-48.47083284096844,-5.595168345553491,0 +-48.44686939321124,-5.60694812904857,0 +-48.41925155003202,-5.629218373932564,0 +-48.40618943099514,-5.641484281103573,0 +-48.38799878974812,-5.664046013592465,0 +-48.37816785532326,-5.680928971632151,0 +-48.3609105293367,-5.69604739169785,0 +-48.34454568067169,-5.699611811420017,0 +-48.3126388084369,-5.688421203776206,0 +-48.28972983846343,-5.684842802192552,0 +-48.24017289812267,-5.673037164090443,0 +-48.22251768780281,-5.680312328940096,0 +-48.19430786970615,-5.691640630026393,0 +-48.17743266045131,-5.701836742897812,0 +-48.15552437925371,-5.71569631562916,0 +-48.13638292328698,-5.723677109396905,0 +-48.1150725066308,-5.727140883671014,0 +-48.09409438344915,-5.734757839365926,0 +-48.07522210830834,-5.744889746382084,0 +-48.05392211855901,-5.758284654214148,0 +-48.03735755234815,-5.772621729275347,0 +-48.02335932570453,-5.786521929169306,0 +-48.01399066304715,-5.803805695553119,0 +-48.01048770765198,-5.819085177667939,0 +-48.00787157271454,-5.828577933631803,0 +-47.97961801326884,-5.847336809658258,0 +-47.95403773987533,-5.868679759155401,0 +-47.93681862342827,-5.895019249045973,0 +-47.91757238206675,-5.916444032827938,0 +-47.8781997130333,-5.970455124615174,0 +-47.87237979545547,-5.987827574665739,0 +-47.8269140443167,-6.027408757792274,0 +-47.79325921073688,-6.068889145053164,0 +-47.7717772849183,-6.097920848103303,0 +-47.74461314302986,-6.130377010777539,0 +-47.7237108028881,-6.170614278513358,0 +-47.71478774676169,-6.213779581227138,0 +-47.70968532887429,-6.229759304622393,0 +-47.68967936020562,-6.251150131330877,0 +-47.66821144208547,-6.271162051679944,0 +-47.61370415772956,-6.316073307404812,0 +-47.57258681618114,-6.345175800115201,0 +-47.53481866424885,-6.380308226952085,0 +-47.52270899458278,-6.386481643660425,0 +-47.53219492510312,-6.409727192005023,0 +-47.53672070153703,-6.43778020197145,0 +-47.53361252410477,-6.464447019758931,0 +-47.52561915094047,-6.482514649653758,0 +-47.52790336351844,-6.519603938587183,0 +-47.51483158277589,-6.543222085022053,0 +-47.48651970832923,-6.548450531468667,0 +-47.47087334135163,-6.555249263595542,0 +-47.45807753364181,-6.560683498667419,0 +-47.44391768209105,-6.565386517172557,0 +-47.44025709571756,-6.577440084920386,0 +-47.43534646677875,-6.599561555039783,0 +-47.42092476440504,-6.643640187349795,0 +-47.43908380301006,-6.658900183699859,0 +-47.45688256619251,-6.699566288887882,0 +-47.46056497973547,-6.717866176301776,0 +-47.44691168296738,-6.755485136871441,0 +-47.43473979133677,-6.780748069896644,0 +-47.43116372074919,-6.801573453387314,0 +-47.42826143285124,-6.821109325078558,0 +-47.438436233812,-6.844725498225404,0 +-47.45202048401532,-6.859929437800851,0 +-47.46362320389584,-6.875745574178028,0 +-47.46377125252157,-6.909900331083151,0 +-47.45823709072531,-6.928756553156927,0 +-47.44663184032908,-6.958609613338676,0 +-47.43976775653548,-6.979364731842617,0 +-47.43882779098481,-7.001475341170551,0 +-47.44239702724347,-7.027593511192044,0 +-47.44003907295667,-7.048938340148975,0 +-47.43325657202448,-7.066965742748049,0 +-47.42978356919032,-7.079505155868343,0 +-47.42394776902901,-7.104975036170284,0 +-47.41923692724782,-7.127850580259502,0 +-47.41408306314904,-7.144576106636592,0 +-47.41429625532724,-7.168325943398255,0 +-47.4190647503091,-7.179766565302931,0 +-47.41601072188053,-7.202508903373585,0 +-47.4207026935676,-7.219991250615034,0 +-47.42760280480575,-7.236420323074612,0 +-47.4317429644015,-7.253896022982,0 +-47.43857060913191,-7.276330150680246,0 +-47.44176337947304,-7.284012437680866,0 +-47.44161084157863,-7.295470104053462,0 +-47.43871018138287,-7.306326032069284,0 +-47.43687761832364,-7.319378175300518,0 +-47.43941749596721,-7.334132364077811,0 +-47.44478994803088,-7.342935524161236,0 +-47.4408609543878,-7.348880488067058,0 +-47.42427159319686,-7.356281244240301,0 +-47.39390073889993,-7.367225270520465,0 +-47.37243949092061,-7.37070271718231,0 +-47.35757394251967,-7.373226338584668,0 +-47.3135594358113,-7.376472991381949,0 +-47.27233088408875,-7.380748083545542,0 +-47.25442739105123,-7.397171578779345,0 +-47.23836757895011,-7.4029495172036,0 +-47.19926206697863,-7.411096914553487,0 +-47.11863368061151,-7.415349822214067,0 +-47.09066732824007,-7.415470163250758,0 +-47.04944605665683,-7.415964999944814,0 +-46.927171719216,-7.408641966150258,0 +-46.88447070334311,-7.41230562019054,0 +-46.85375302201329,-7.416176789221226,0 +-46.81361821504016,-7.431366803541074,0 +-46.78618927130005,-7.432034098846004,0 +-46.77413261883631,-7.430227984850646,0 +-46.7566363455053,-7.425075544411556,0 +-46.73688006778012,-7.424235037564852,0 +-46.71437235224808,-7.42389337091156,0 +-46.70037888732216,-7.42240866004434,0 +-46.68385067731798,-7.428132084066783,0 +-46.66850223083502,-7.428982668964375,0 +-46.65870640707045,-7.425032529136972,0 +-46.64574576122109,-7.412353950683449,0 +-46.64536245752952,-7.403113385498295,0 +-46.64774710678631,-7.393909622824402,0 +-46.65012507386948,-7.384712070855102,0 +-46.6480327572765,-7.379252172163371,0 +-46.6381941876243,-7.375849567863066,0 +-46.62610865026507,-7.372958273676788,0 +-46.61244708419234,-7.368946650186376,0 +-46.60324371547551,-7.36174275475683,0 +-46.57458447337616,-7.349883407311022,0 +-46.55866397305797,-7.349632000928565,0 +-46.54265332077429,-7.354809127625268,0 +-46.51171991107578,-7.36735790134468,0 +-46.48473649793131,-7.374535424682526,0 +-46.45295688496564,-7.387558848297396,0 +-46.41493981666989,-7.401072519267808,0 +-46.39955648893405,-7.403005330950386,0 +-46.36810842692704,-7.415539121227327,0 +-46.34530949294395,-7.433114932118326,0 +-46.31587956243457,-7.454383349029145,0 +-46.29758765483325,-7.463889418428351,0 +-46.27072089559191,-7.461815272176676,0 +-46.23234829721531,-7.467093370348405,0 +-46.20966971761858,-7.472777212538398,0 +-46.18486397069965,-7.478359287070371,0 +-46.16169545819672,-7.484548912207725,0 +-46.14239362632114,-7.492881834426701,0 +-46.11310237127575,-7.50280174918622,0 +-46.09608023160455,-7.508993775705842,0 +-46.07378612601234,-7.516983221247965,0 +-46.0657267055998,-7.519876799708271,0 +-46.06234613756175,-7.519710189572881,0 +-46.05617207514842,-7.519597240671105,0 +-46.05283347021988,-7.520082191207883,0 +-46.04829622826858,-7.521842646595672,0 +-46.04290710325267,-7.523916696323777,0 +-46.04230730514589,-7.524015904585647,0 +-46.04136348897883,-7.523338682590992,0 +-46.03869930625947,-7.521465345309306,0 +-46.03689487354402,-7.51985635019699,0 +-46.03588861315031,-7.518180002225605,0 +-46.03512156289467,-7.516462863932021,0 +-46.02877508534566,-7.502059537726083,0 +-46.02703465771607,-7.498189850522494,0 +-46.02295280790957,-7.489126100638408,0 +-46.01912766760898,-7.480180084706328,0 +-46.01934004225708,-7.475728686712448,0 +-46.01965140862404,-7.473582772251979,0 +-46.01985488435305,-7.469195485791883,0 +-46.01722035105639,-7.462650811100914,0 +-46.01317767903413,-7.453945617528579,0 +-46.00900778021181,-7.446056144124855,0 +-46.00664777430965,-7.441939260354693,0 +-46.00082911049476,-7.428884029907625,0 +-45.99843877363968,-7.423981885691835,0 +-45.99110640091617,-7.408144084821745,0 +-45.98798252661317,-7.400737858829194,0 +-45.98495311530399,-7.395276991567374,0 +-45.97850410875391,-7.381634496520077,0 +-45.96999172923596,-7.363000110125183,0 +-45.96581161576986,-7.355235182803312,0 +-45.96471884795712,-7.3536479524078,0 +-45.96377956404653,-7.35071954488667,0 +-45.96216728118998,-7.347334797361208,0 +-45.94903331082078,-7.320525156018636,0 +-45.94238190391549,-7.30699667998716,0 +-45.93327907366344,-7.289954486024168,0 +-45.92785012981288,-7.28081310511898,0 +-45.91505490658626,-7.255236301811829,0 +-45.90894479541939,-7.243702180924095,0 +-45.90592610180899,-7.241508569941755,0 +-45.89900420394846,-7.237339816656435,0 +-45.88582334863695,-7.229575664344248,0 +-45.87836723797245,-7.227299738731759,0 +-45.86781752498253,-7.225637865290548,0 +-45.85982344532006,-7.223416458771854,0 +-45.84388202319602,-7.21680848511259,0 +-45.82883392848886,-7.210701152858805,0 +-45.819856514935,-7.207036474901419,0 +-45.78760132800085,-7.194745305762766,0 +-45.77734565852434,-7.190962410302077,0 +-45.75767177059726,-7.183647028753991,0 +-45.74828146010315,-7.179837360496103,0 +-45.7435799866328,-7.175234353125594,0 +-45.74061978347188,-7.171952604405816,0 +-45.73801579458742,-7.166952643355419,0 +-45.7334745342528,-7.161923648030769,0 +-45.72493802985568,-7.152814906994069,0 +-45.71926029067443,-7.150897085552011,0 +-45.71298432320064,-7.148381495365705,0 +-45.70305670355773,-7.145130687475397,0 +-45.69768344017454,-7.140528188207661,0 +-45.69389874183697,-7.136750346148663,0 +-45.69033471895879,-7.134004984726881,0 +-45.68763730993445,-7.132266324835632,0 +-45.67382257055502,-7.122768242074635,0 +-45.66768598568567,-7.119231931618,0 +-45.66298614103135,-7.116576582362962,0 +-45.65734546852443,-7.113766782526016,0 +-45.65386226667194,-7.111447810195508,0 +-45.64677954545544,-7.108299653409742,0 +-45.63181787241601,-7.100258667740305,0 +-45.62572407186854,-7.095491842285774,0 +-45.62120453198488,-7.092113899039304,0 +-45.61973540346121,-7.090949792991757,0 +-45.61781483900129,-7.089321852112495,0 +-45.61551194827442,-7.087078666134302,0 +-45.61302665355282,-7.084331704487037,0 +-45.60744473613044,-7.079185245384076,0 +-45.59996861671109,-7.074892403352266,0 +-45.59246100125591,-7.070229255453046,0 +-45.58920998813594,-7.068882895629617,0 +-45.5835473783391,-7.068948315960702,0 +-45.57714799362559,-7.068957165711542,0 +-45.56543012401467,-7.064277103139482,0 +-45.54965118844355,-7.058553076507182,0 +-45.53898668023366,-7.055553613814005,0 +-45.53690683574482,-7.054100256539999,0 +-45.53013340471755,-7.049157207146302,0 +-45.52774369271823,-7.044655433681421,0 +-45.5267898348601,-7.042474448392888,0 +-45.52601412337943,-7.040516471474815,0 +-45.5248972916505,-7.039409659605901,0 +-45.52432780103712,-7.039139224206908,0 +-45.52106876483972,-7.038820358854601,0 +-45.51758080217052,-7.039087704217166,0 +-45.50864926569098,-7.03919331746337,0 +-45.50335413521248,-7.039255441529106,0 +-45.50186602970046,-7.038794810364871,0 +-45.50119733900767,-7.03823231669172,0 +-45.50004247060367,-7.037200126402744,0 +-45.49754723104591,-7.034281681470074,0 +-45.49548563434401,-7.032214826870071,0 +-45.49341878341303,-7.030493186960314,0 +-45.49000646299969,-7.027354967674819,0 +-45.48744011732707,-7.025602275366725,0 +-45.48465729881849,-7.023910694552082,0 +-45.48204480460218,-7.022725156254331,0 +-45.47712775208157,-7.020425980461829,0 +-45.47572443904089,-7.019325137388155,0 +-45.47406736434143,-7.015014138401289,0 +-45.46728326848417,-7.010331868478514,0 +-45.46278715588458,-7.005237077857418,0 +-45.45736936564718,-7.002555673378803,0 +-45.45468373774542,-7.000805493977988,0 +-45.45068723644743,-7.00358874155244,0 +-45.44714258004053,-7.003778583806539,0 +-45.43490902297363,-7.001305158168925,0 +-45.41974714671328,-6.991923483078269,0 +-45.41294355586066,-6.988266546924033,0 +-45.40978678766325,-6.983062211607376,0 +-45.40551432114453,-6.978517169123991,0 +-45.38079821017409,-6.967322803218654,0 +-45.37309287974777,-6.962564562602657,0 +-45.36615770576202,-6.9549990895109,0 +-45.35131003220661,-6.945516229589555,0 +-45.34508265518695,-6.9431001616032,0 +-45.33556310866258,-6.938208945774289,0 +-45.32155076707294,-6.929798135042979,0 +-45.31726743354712,-6.925229251732843,0 +-45.3101091263195,-6.919374021344036,0 +-45.30693659140118,-6.916374560606863,0 +-45.30055679027776,-6.912159464754771,0 +-45.29488981967017,-6.907611016876482,0 +-45.27225557064785,-6.896016141844497,0 +-45.25853282229338,-6.886851959736246,0 +-45.23440455823151,-6.869695466740869,0 +-45.22699380897526,-6.864983318703199,0 +-45.21313559546545,-6.862172690347108,0 +-45.18974291301665,-6.859154614467276,0 +-45.17261158926027,-6.854703002992677,0 +-45.14192588939741,-6.849565139267651,0 +-45.12622482510562,-6.847168687858675,0 +-45.09645475219556,-6.840953364198786,0 +-45.08724537988299,-6.838093032732821,0 +-45.0821820893493,-6.837360150636076,0 +-45.04995918447565,-6.832995965160657,0 +-45.03190907494319,-6.830822103706418,0 +-44.98076866220202,-6.81932408906726,0 +-44.96073028483057,-6.815460694248702,0 +-44.94320741969845,-6.813369040020795,0 +-44.90813609139705,-6.810672475373982,0 +-44.90492589427662,-6.811450184968929,0 +-44.89999444383483,-6.809808595196895,0 +-44.87798296007171,-6.805839700246177,0 +-44.85324510339328,-6.812596020165808,0 +-44.85174911556172,-6.816162319949005,0 +-44.85149336602898,-6.818152595810407,0 +-44.84849004337605,-6.818911351618714,0 +-44.83980088294427,-6.820275630823294,0 +-44.831185610803,-6.819928296566277,0 +-44.81338459179814,-6.818319015602488,0 +-44.80798696656408,-6.813980923709839,0 +-44.80518772467791,-6.811708317817824,0 +-44.79733963190792,-6.811483394334399,0 +-44.79018828977503,-6.812343068403508,0 +-44.7829343344855,-6.814587563689979,0 +-44.77085661848613,-6.82022142274966,0 +-44.76037994419502,-6.824554833672292,0 +-44.75736067461197,-6.825633140688398,0 +-44.75476995691581,-6.824876591615643,0 +-44.74800400554398,-6.822733824720498,0 +-44.74492291293762,-6.824585090487847,0 +-44.74069759657858,-6.827769689831375,0 +-44.72963878314806,-6.832468911834983,0 +-44.71553192149307,-6.837066381269359,0 +-44.70402727818018,-6.840976249046055,0 +-44.68587480957299,-6.842301409003656,0 +-44.67892394160558,-6.83878190290045,0 +-44.66803443987853,-6.832170559918757,0 +-44.66141688654334,-6.827636730032633,0 +-44.65562996634487,-6.823452043682603,0 +-44.65472311662114,-6.822595717096398,0 +-44.65531985667679,-6.82153769559458,0 +-44.65566052213533,-6.820374161257818,0 +-44.65419873615872,-6.816738628864011,0 +-44.65159972103964,-6.815441002191266,0 +-44.65048352923227,-6.815727389681796,0 +-44.64962691495472,-6.816354044393944,0 +-44.64836891433423,-6.816425043736681,0 +-44.64398373222642,-6.812365019735781,0 +-44.63966464791663,-6.809503033344137,0 +-44.63488604069962,-6.807020546802705,0 +-44.63311947309919,-6.805797703884168,0 +-44.63158401333666,-6.807394672890623,0 +-44.62840571143239,-6.810064265601005,0 +-44.62539801649573,-6.813551829774437,0 +-44.62149015726879,-6.813378408946893,0 +-44.59803513621465,-6.816326644628567,0 +-44.49522428706693,-6.829886607737122,0 +-44.48484131629468,-6.83104115360218,0 +-44.35835033632014,-6.761580088426465,0 +-44.28772660992099,-6.722595157986586,0 +-44.2226306664699,-6.68681791968297,0 +-44.19740239775667,-6.661366216295318,0 +-44.18800836485578,-6.653105857413895,0 +-44.16686917153793,-6.647808073097582,0 +-44.15200821176113,-6.636854631710413,0 +-44.13081051018586,-6.628683774244528,0 +-44.10225147958107,-6.615410106744188,0 +-44.07721217448613,-6.591432076110165,0 +-44.05571699352004,-6.581396486082093,0 +-44.04263565320275,-6.585039945752973,0 +-44.03700520962784,-6.589898720838061,0 +-44.03091930808977,-6.589496045308414,0 +-44.01841734874182,-6.585509156860645,0 +-44.015225133554,-6.582470615809575,0 +-44.00844636636977,-6.580748359872069,0 +-44.00187584991864,-6.580084579281972,0 +-43.99169051675,-6.579872927661692,0 +-43.98371045972906,-6.579153207621488,0 +-43.98101475002921,-6.576357503802604,0 +-43.96575110368537,-6.569480213102121,0 +-43.95670922649056,-6.564327611011116,0 +-43.95871545048921,-6.56024713750986,0 +-43.95878660570252,-6.555838780360265,0 +-43.95630519564015,-6.554112638620809,0 +-43.94741794061847,-6.553338385770973,0 +-43.94176398498982,-6.551086726096438,0 +-43.94050019391032,-6.547796518794529,0 +-43.93670450677727,-6.546646718743663,0 +-43.92989792004775,-6.545996165938497,0 +-43.92605875723041,-6.544537337544257,0 +-43.9211222114286,-6.541671531043539,0 +-43.91772526470049,-6.539826068777329,0 +-43.91390108653788,-6.537560789493503,0 +-43.91118919212663,-6.536131224211833,0 +-43.9092877587273,-6.534995545987482,0 +-43.90628059641524,-6.533564116392957,0 +-43.90327213925019,-6.532132051645358,0 +-43.90138777097137,-6.528793701822543,0 +-43.9010315574217,-6.526512767154582,0 +-43.9001672424213,-6.525129177001108,0 +-43.89748754430368,-6.52459664474915,0 +-43.89464543391281,-6.522204396597094,0 +-43.89334380426236,-6.521579529599464,0 +-43.89151478532899,-6.521650021142261,0 +-43.88875268157157,-6.520936565393888,0 +-43.88441483488819,-6.519703471657925,0 +-43.88139329407932,-6.518761609021339,0 +-43.87959132461108,-6.515762277673756,0 +-43.87788067344298,-6.514538514763463,0 +-43.87590750042409,-6.513132578353846,0 +-43.87298144440075,-6.509601166970286,0 +-43.87258476567488,-6.509526720169408,0 +-43.87200103603197,-6.509451006907109,0 +-43.87112515412058,-6.509436011605391,0 +-43.87067248659192,-6.509428171623218,0 +-43.87064020407099,-6.509427611754022,0 +-43.86961388329148,-6.509246111768374,0 +-43.86845949075663,-6.509385110561679,0 +-43.86805537306186,-6.509539385507788,0 +-43.86758177618795,-6.509724879042654,0 +-43.86731056465961,-6.509882585335886,0 +-43.86700793136876,-6.510072664835066,0 +-43.86657076397043,-6.510194139495973,0 +-43.86646983202471,-6.510224715402058,0 +-43.86586339681943,-6.510342590590889,0 +-43.86562740214969,-6.510403088299095,0 +-43.86501966316079,-6.510586968242422,0 +-43.86454658003746,-6.510773987466532,0 +-43.86427820267433,-6.511096854846051,0 +-43.86404116244594,-6.511157628716578,0 +-43.86217952721633,-6.511612231455547,0 +-43.8616473555706,-6.51169989290728,0 +-43.86108240430746,-6.511753957218335,0 +-43.86015290112778,-6.511799590936468,0 +-43.85985471268198,-6.511793038056851,0 +-43.85915511118677,-6.511877599853904,0 +-43.85852481044355,-6.511961878791608,0 +-43.85786194375974,-6.512078060031116,0 +-43.8570674145496,-6.512191327319416,0 +-43.85670388351373,-6.512215920566577,0 +-43.85620864243334,-6.512367957347878,0 +-43.85558196876886,-6.512419180431325,0 +-43.85508800034813,-6.512505795105338,0 +-43.85426670160498,-6.512682283976701,0 +-43.85374215754901,-6.512800202757004,0 +-43.8532512686101,-6.512918675127707,0 +-43.85279272722206,-6.512940551989121,0 +-43.85210727935156,-6.513054113925692,0 +-43.85148993023192,-6.513071215455632,0 +-43.85097025234335,-6.513123311525168,0 +-43.85057508994815,-6.513179965804374,0 +-43.84985730121831,-6.513293085072235,0 +-43.84921106598082,-6.513503494781357,0 +-43.8487910184351,-6.513687113303772,0 +-43.84859458014812,-6.513779923514552,0 +-43.84800793191503,-6.513895920361943,0 +-43.84741383625755,-6.51401376959195,0 +-43.8473808406218,-6.514013125479977,0 +-43.84668953364439,-6.514493510525327,0 +-43.84635726484312,-6.514713839809705,0 +-43.84612227889033,-6.515001629464842,0 +-43.84555074018107,-6.515675917295722,0 +-43.8452154328486,-6.515994769469239,0 +-43.84475035413877,-6.516214290061758,0 +-43.84421734744392,-6.516403070918626,0 +-43.8434565769896,-6.516582351712507,0 +-43.84249406261794,-6.516696244723364,0 +-43.84180191281724,-6.516842763637634,0 +-43.84105681227513,-6.516884596718264,0 +-43.84070309156436,-6.516808700403343,0 +-43.84050948819477,-6.516770769942791,0 +-43.84002696351644,-6.51659519543818,0 +-43.83944256858472,-6.516419311128979,0 +-43.83869479203302,-6.516239967313235,0 +-43.83820646473355,-6.51606694584442,0 +-43.83766050174925,-6.515891052976067,0 +-43.8373381652336,-6.515721320499479,0 +-43.83679052061098,-6.515287005062524,0 +-43.83624551340552,-6.514949837904493,0 +-43.83573143232738,-6.514613674719383,0 +-43.83544775539524,-6.514607166849943,0 +-43.8352654046525,-6.514602751974271,0 +-43.83451495179734,-6.514488552312419,0 +-43.83426044520757,-6.514450617920895,0 +-43.83378252504835,-6.514407805462062,0 +-43.83359193493803,-6.514371340378269,0 +-43.82840680278846,-6.513679611338313,0 +-43.82782652833956,-6.513570838288605,0 +-43.82614901307196,-6.513406312359581,0 +-43.82492207935886,-6.513347638687127,0 +-43.82376145350165,-6.513226202252627,0 +-43.82266614452698,-6.513041805887221,0 +-43.82190045341533,-6.512769141573623,0 +-43.8212567923423,-6.512594403340615,0 +-43.82061269162131,-6.51235501146763,0 +-43.82029093265313,-6.512219220708232,0 +-43.81980745111216,-6.512047574523411,0 +-43.81939055725568,-6.511845515796147,0 +-43.81891365793364,-6.511611045711064,0 +-43.8185846997475,-6.511440741725747,0 +-43.81809084829663,-6.511168682836744,0 +-43.81752298361869,-6.510924448334279,0 +-43.81694469921199,-6.510578799794041,0 +-43.81664674614674,-6.510211950317757,0 +-43.816415350575,-6.509911808257407,0 +-43.816024957827,-6.509478538115681,0 +-43.81576117304103,-6.509242624568293,0 +-43.81390115366296,-6.507927175682134,0 +-43.81361222291262,-6.507728577970185,0 +-43.81290373492062,-6.507371364617287,0 +-43.81238752274393,-6.507240122262617,0 +-43.8119050842456,-6.507071422330996,0 +-43.81155007396703,-6.506999608407968,0 +-43.81116195558565,-6.506959152303735,0 +-43.81051065499417,-6.506969494881689,0 +-43.80985372095392,-6.507139795181453,0 +-43.80949026202899,-6.507321978804701,0 +-43.80909589546849,-6.507473671188525,0 +-43.80880382929195,-6.507635295190064,0 +-43.80819068009326,-6.507759983194067,0 +-43.80781294146299,-6.507699532753371,0 +-43.80743451322763,-6.50753789442187,0 +-43.80733993821479,-6.507439770140729,0 +-43.80705790103188,-6.50724611891943,0 +-43.80680719146105,-6.507051884637573,0 +-43.8065250910445,-6.506792140169359,0 +-43.80620609669209,-6.506559292822756,0 +-43.8058268343525,-6.50639534028997,0 +-43.80545117762212,-6.506300302566759,0 +-43.80456859103212,-6.506102842041447,0 +-43.80437807402881,-6.506035665262917,0 +-43.80375411207098,-6.506038051189249,0 +-43.80353616283421,-6.506038727102959,0 +-43.80319430533294,-6.506039785292846,0 +-43.80285321987996,-6.506040841085346,0 +-43.80253867938266,-6.506005603873748,0 +-43.8018859212679,-6.505939901151527,0 +-43.79994063216107,-6.506352763219916,0 +-43.79921519171164,-6.50664281291766,0 +-43.79850500217979,-6.506786613949866,0 +-43.79794779825991,-6.506626746119035,0 +-43.79726130467563,-6.506167864933717,0 +-43.79683846185061,-6.505924506826218,0 +-43.79600049374647,-6.505730649123524,0 +-43.79549191687655,-6.505585299866666,0 +-43.79509428748207,-6.505552467346835,0 +-43.79469737159098,-6.505582873045181,0 +-43.79429981559341,-6.505580284956309,0 +-43.79386445801005,-6.505412725388278,0 +-43.79352533169969,-6.505344658278094,0 +-43.79303745173287,-6.505341702247371,0 +-43.79300879653255,-6.505374488420435,0 +-43.79036285661702,-6.505393272895232,0 +-43.78972636430407,-6.505254492465157,0 +-43.78806465375074,-6.505160784666625,0 +-43.78679113449923,-6.505010784605899,0 +-43.78487268459219,-6.504845036135519,0 +-43.78455425089093,-6.504774943008246,0 +-43.78372249925408,-6.504694057165789,0 +-43.78281305552199,-6.504670124794391,0 +-43.78203882822568,-6.504652212773025,0 +-43.78087222652724,-6.504494261112263,0 +-43.78016397034807,-6.504091452323484,0 +-43.77944257364882,-6.503683024081198,0 +-43.77861956089404,-6.503321722530625,0 +-43.77810676041769,-6.502923440874628,0 +-43.77645409308549,-6.502232255581111,0 +-43.77588071001903,-6.501766319017494,0 +-43.77524010136712,-6.501304373853592,0 +-43.77432828461209,-6.501415613573396,0 +-43.77380247699489,-6.501780784387725,0 +-43.77288478913749,-6.502136523987915,0 +-43.77203673580789,-6.502177259680386,0 +-43.77151502171114,-6.50216250922681,0 +-43.77105796300704,-6.502149096305502,0 +-43.76988624638677,-6.501718124146817,0 +-43.7693016320097,-6.501236410485585,0 +-43.76885405552872,-6.500499945663694,0 +-43.76847009987934,-6.499829381258328,0 +-43.76809073145765,-6.4992370230445,0 +-43.76777880953019,-6.498581642912724,0 +-43.76733238684599,-6.498052744625071,0 +-43.76656323887207,-6.497322668798751,0 +-43.766123328132,-6.49673758780949,0 +-43.76534900977764,-6.49613264246539,0 +-43.76477394635693,-6.495671606097747,0 +-43.76414298761384,-6.495156538946862,0 +-43.76364316353579,-6.494710934790925,0 +-43.76292805764675,-6.494565789208797,0 +-43.76220077880258,-6.494337021237218,0 +-43.7618670259936,-6.494320690572051,0 +-43.76067315272979,-6.494074596860326,0 +-43.75988404923844,-6.493920654010118,0 +-43.75895639131188,-6.493956554654474,0 +-43.75855903492818,-6.494077358800081,0 +-43.75776236151496,-6.494317363193367,0 +-43.75676868594064,-6.494686385781216,0 +-43.75539798968889,-6.495126430193025,0 +-43.75493759016516,-6.495380108781314,0 +-43.75365222803968,-6.496119140398381,0 +-43.75291155392004,-6.496488198072139,0 +-43.7523481561126,-6.496453626424971,0 +-43.75149511807395,-6.496369954666807,0 +-43.75077986421729,-6.495895612721394,0 +-43.7504534648855,-6.495757489354006,0 +-43.74715953564319,-6.494997837417468,0 +-43.7461054611354,-6.49491933322221,0 +-43.74491983277845,-6.494903297462927,0 +-43.74399855881769,-6.494888098728865,0 +-43.7434092540464,-6.494671603513982,0 +-43.7430801767167,-6.494592515640021,0 +-43.74229747102079,-6.494251058925307,0 +-43.74086212157587,-6.493423333039218,0 +-43.74008090705946,-6.492877346014262,0 +-43.73976306602901,-6.492554782497946,0 +-43.73860022543436,-6.491962979512677,0 +-43.73769123436735,-6.491557920024206,0 +-43.73710463485124,-6.491350886702747,0 +-43.73638068967416,-6.491198063516558,0 +-43.73551961791699,-6.491169570254469,0 +-43.7345293187207,-6.491143512382293,0 +-43.7330278182754,-6.490925695407162,0 +-43.73205917818728,-6.490457145463576,0 +-43.73123247980504,-6.490137849480352,0 +-43.73065482878077,-6.489873149667575,0 +-43.73007681284187,-6.489540678077494,0 +-43.72936742624138,-6.488803552208839,0 +-43.72885990020168,-6.488344309324427,0 +-43.72809904924647,-6.487889494001029,0 +-43.72751364276987,-6.487681312148896,0 +-43.72560367459399,-6.48827683235878,0 +-43.724817016087,-6.488324881757761,0 +-43.72415400057606,-6.48850565930782,0 +-43.72349791064989,-6.488491295936957,0 +-43.72245293544559,-6.488875261872112,0 +-43.72138450909843,-6.489129066337677,0 +-43.72059338052335,-6.489296994886575,0 +-43.71960812988068,-6.4897378382473,0 +-43.71881288781871,-6.489951543138949,0 +-43.71829737557614,-6.490126008849438,0 +-43.71759182160529,-6.490435803295719,0 +-43.7167430927922,-6.490835885546165,0 +-43.71580052096958,-6.491278899474028,0 +-43.71514123877941,-6.491543077486883,0 +-43.71434427777525,-6.491756862570479,0 +-43.71397335767583,-6.491792874587407,0 +-43.71351068417042,-6.491826231303084,0 +-43.7129971369616,-6.491952841528082,0 +-43.7122995046419,-6.492028722850323,0 +-43.71132070283354,-6.492191174787753,0 +-43.71076167091354,-6.492179478297983,0 +-43.70996546859104,-6.492164599820166,0 +-43.70959041363982,-6.492157590925424,0 +-43.70851319897942,-6.492320099620418,0 +-43.7076668472805,-6.492580101694008,0 +-43.70677579860581,-6.492838365295009,0 +-43.70612585748862,-6.49300693310591,0 +-43.70519588757239,-6.493307331058161,0 +-43.70417320419835,-6.493651457431897,0 +-43.70332545446156,-6.494049459052576,0 +-43.70239117924935,-6.494397245561363,0 +-43.7022967089901,-6.494441568224514,0 +-43.70089442647358,-6.49491558722589,0 +-43.69972082915293,-6.49530456052581,0 +-43.69835570010892,-6.495734763487345,0 +-43.69726946208814,-6.496079395684442,0 +-43.69604524783567,-6.496189670885441,0 +-43.69566790442031,-6.496227219410149,0 +-43.69515022331935,-6.496215119562041,0 +-43.69422834015694,-6.495964069732374,0 +-43.69310627479179,-6.495706139636822,0 +-43.6927370700126,-6.495652246008391,0 +-43.69227887215024,-6.495550611765298,0 +-43.69164011963812,-6.495399597044749,0 +-43.69118282292447,-6.495391180559526,0 +-43.69058847912878,-6.49542654273503,0 +-43.68999442405359,-6.495508080424599,0 +-43.68899272726388,-6.495581795745665,0 +-43.68790282722922,-6.495699646150654,0 +-43.68694478625815,-6.495864905686719,0 +-43.68623074973276,-6.49649319071317,0 +-43.68613548776396,-6.496629225673716,0 +-43.6852937934097,-6.497926818202309,0 +-43.68482568632643,-6.498095971815678,0 +-43.68379131940084,-6.498665604638441,0 +-43.6824652908242,-6.499495184286577,0 +-43.68124216299343,-6.500444692979864,0 +-43.67988223304496,-6.501295366923836,0 +-43.67902201591029,-6.502100414143941,0 +-43.67830091519761,-6.502910782545194,0 +-43.67777973512683,-6.503127257935787,0 +-43.67702170304098,-6.503383653958116,0 +-43.67607159329221,-6.503681065553299,0 +-43.6753566055317,-6.503845847002059,0 +-43.67454353888971,-6.504007787331636,0 +-43.67392116844,-6.504129441859268,0 +-43.67334555120401,-6.504252680380088,0 +-43.67271525675241,-6.504419979860177,0 +-43.67180000154983,-6.504534164104057,0 +-43.67132015174582,-6.504474256223828,0 +-43.67069606094592,-6.50431668889305,0 +-43.67026278938834,-6.504163956486471,0 +-43.66878982934754,-6.503650971356365,0 +-43.66803832622988,-6.503159126134198,0 +-43.6674752260125,-6.502767068907897,0 +-43.66705304418301,-6.502425376844633,0 +-43.66658468367318,-6.501891956724903,0 +-43.66602165700169,-6.501212225577871,0 +-43.665223344163,-6.500576676815218,0 +-43.66429088312257,-6.499753138299669,0 +-43.66391900127001,-6.499367025692919,0 +-43.66340876089487,-6.498789043620095,0 +-43.66294003079892,-6.498447109633235,0 +-43.66242783112004,-6.498059673893243,0 +-43.66154182636824,-6.49747665538203,0 +-43.66079732930986,-6.497088143597987,0 +-43.66061250271845,-6.496992018401052,0 +-43.65840696318992,-6.49551667150125,0 +-43.65785584955054,-6.495320470762354,0 +-43.65699630751433,-6.495116835723643,0 +-43.65631979245969,-6.495101439385054,0 +-43.65459211466915,-6.495609606938873,0 +-43.65360191529905,-6.496074471932799,0 +-43.65188029584963,-6.496641888757743,0 +-43.65004455365285,-6.497203682503432,0 +-43.64894162340989,-6.497661793720247,0 +-43.64765825411186,-6.498294695091341,0 +-43.64640030295545,-6.498796613942289,0 +-43.64572723377158,-6.499321546331395,0 +-43.64492401527109,-6.500562379954431,0 +-43.64438357910871,-6.500845152317763,0 +-43.64402856440878,-6.500832948595619,0 +-43.64308465344197,-6.500681541449857,0 +-43.64242304524864,-6.500665749655003,0 +-43.64152392203207,-6.500524293103974,0 +-43.64092125490611,-6.500034820302868,0 +-43.64032917284422,-6.499481530419154,0 +-43.63986209213353,-6.498750815001584,0 +-43.6394696671178,-6.497600483242556,0 +-43.63906891384196,-6.496750918209281,0 +-43.63865229935299,-6.496142531044693,0 +-43.63793674813427,-6.495406867416416,0 +-43.63746435319278,-6.494796003944198,0 +-43.63704698112831,-6.494486511663878,0 +-43.63429437703406,-6.492563191152324,0 +-43.63387654763707,-6.492313455663955,0 +-43.63285898157768,-6.491809479339299,0 +-43.63142160863664,-6.491054429240365,0 +-43.63106429851275,-6.490806286067097,0 +-43.62974150197985,-6.490416436125914,0 +-43.62919884309594,-6.490344670083749,0 +-43.62865597259441,-6.490333660672122,0 +-43.62793414535456,-6.49025903366934,0 +-43.6266158024897,-6.489992611059264,0 +-43.62541844026306,-6.489607149408601,0 +-43.62451513663507,-6.489345836390513,0 +-43.62377573478062,-6.489141387231834,0 +-43.62302990573322,-6.488995351819774,0 +-43.62218072373034,-6.488976464263074,0 +-43.62145281569334,-6.488960270546682,0 +-43.6198846640936,-6.489110327476502,0 +-43.61896290829745,-6.489086140220199,0 +-43.61815597666998,-6.489063078782964,0 +-43.61746035739729,-6.489101008204669,0 +-43.61591982550966,-6.489061937654735,0 +-43.61511605762336,-6.488980397584484,0 +-43.61418794864553,-6.488286251774109,0 +-43.61331899508534,-6.487652768124457,0 +-43.61258406875433,-6.487269340244313,0 +-43.61215537093001,-6.487076183933484,0 +-43.60968318199832,-6.486883317606491,0 +-43.60833124601201,-6.486842771036192,0 +-43.60759119117252,-6.486818936766412,0 +-43.60659483711006,-6.487029261396028,0 +-43.60565293265341,-6.487237479933449,0 +-43.60446287162731,-6.487508093960215,0 +-43.60328769561952,-6.487606724104614,0 +-43.6026050544827,-6.48758966042255,0 +-43.60173458732145,-6.487567286969521,0 +-43.60024015545774,-6.487528873464791,0 +-43.59949280560194,-6.487510128091478,0 +-43.59873885384615,-6.487488343162491,0 +-43.59797970560361,-6.487464709547697,0 +-43.59630592359413,-6.487615187679411,0 +-43.59562788279855,-6.487601809762296,0 +-43.59503092026129,-6.487286414375847,0 +-43.59445128735054,-6.486730057873138,0 +-43.59433795377283,-6.486545582398025,0 +-43.59386267442597,-6.485426184993315,0 +-43.59375639443122,-6.484437694330539,0 +-43.59375928379293,-6.483754503610242,0 +-43.59356350041357,-6.482995906303863,0 +-43.59294125458892,-6.482043269377909,0 +-43.59251510654278,-6.481350533074449,0 +-43.59182688000681,-6.480830934365799,0 +-43.59139594206636,-6.480447916125613,0 +-43.59109298702091,-6.480195581490187,0 +-43.58872951358099,-6.479617561261992,0 +-43.58824018810702,-6.479166733126591,0 +-43.58781126341162,-6.479041560917323,0 +-43.58671570033533,-6.478806573435595,0 +-43.58592315468187,-6.478813296687263,0 +-43.58535932309611,-6.479361597064943,0 +-43.58498381034796,-6.479726767005532,0 +-43.58429919105854,-6.480400005246959,0 +-43.58361415375011,-6.481195232305016,0 +-43.58274534315962,-6.48235889706713,0 +-43.58151260646631,-6.483324283053636,0 +-43.58071772430187,-6.483804737816268,0 +-43.57992521431281,-6.48422275264643,0 +-43.57900616235802,-6.484695155071785,0 +-43.57783580658221,-6.48546443273167,0 +-43.57752202252548,-6.485699329583355,0 +-43.57702299947324,-6.486236314839751,0 +-43.57634819296941,-6.48701673821736,0 +-43.575857944705,-6.487616637603526,0 +-43.57523356796757,-6.488209407524441,0 +-43.57491834295183,-6.488809935061081,0 +-43.57460495919906,-6.489349678742011,0 +-43.57417093995919,-6.48994751988974,0 +-43.57301781165918,-6.490469570971598,0 +-43.57258190787569,-6.49088392278977,0 +-43.57196328038805,-6.491294237283161,0 +-43.57113835344348,-6.492184242204242,0 +-43.57101200673173,-6.492787429621115,0 +-43.57100777728625,-6.493755700835999,0 +-43.57124703467435,-6.494546720536251,0 +-43.57167855656684,-6.49533973441715,0 +-43.57209205160564,-6.496073329770858,0 +-43.57250165558889,-6.49704778943393,0 +-43.57264170997032,-6.498126377076956,0 +-43.57257152645073,-6.499264651671367,0 +-43.57221259627969,-6.49991226001473,0 +-43.57154248594448,-6.500495654140212,0 +-43.57079321826839,-6.501024549949507,0 +-43.57023580883692,-6.501494269419668,0 +-43.56963394831303,-6.502433026651224,0 +-43.56939629334368,-6.503318155208022,0 +-43.56914734941785,-6.504147634383073,0 +-43.56899693676617,-6.504990162240489,0 +-43.56886427276611,-6.505290161519477,0 +-43.56860534261298,-6.506834216771183,0 +-43.56840329316727,-6.507731231770446,0 +-43.56795240121419,-6.508980504905646,0 +-43.56750778174535,-6.509988188418681,0 +-43.56732311641264,-6.510163512008074,0 +-43.56671719542332,-6.510329139607324,0 +-43.56592814819533,-6.510610528288518,0 +-43.5653195601996,-6.510896140487069,0 +-43.56428436749082,-6.511411540218266,0 +-43.56349787712566,-6.511573580092294,0 +-43.56247025670815,-6.511789506455977,0 +-43.56156075236409,-6.512127522283898,0 +-43.55999113476961,-6.512509213879752,0 +-43.55926428398426,-6.512791206559866,0 +-43.55774803835248,-6.513532303209812,0 +-43.55586500272354,-6.514386509152608,0 +-43.55393602696009,-6.515795525342983,0 +-43.55189266007608,-6.516871489455105,0 +-43.55044814221907,-6.517371724253282,0 +-43.54899298236646,-6.517818382883527,0 +-43.54820993663066,-6.517920001785595,0 +-43.54771438879678,-6.518329858865917,0 +-43.54745606637585,-6.518864923778106,0 +-43.54677900191761,-6.519448754002336,0 +-43.5457858466159,-6.520506452615471,0 +-43.54518333464335,-6.520906851195857,0 +-43.54456043374757,-6.521436388906308,0 +-43.54417060635992,-6.521975727102085,0 +-43.54346667640135,-6.523123617219675,0 +-43.54260063774511,-6.524240967848036,0 +-43.54167926590782,-6.525116638629701,0 +-43.54106176793415,-6.525879557297761,0 +-43.54025832885229,-6.526757578440716,0 +-43.53879381060469,-6.527859430022615,0 +-43.53690431484181,-6.529248828889663,0 +-43.53567734410382,-6.530592074316753,0 +-43.53475749816224,-6.531584093542549,0 +-43.53376867906908,-6.532991346796894,0 +-43.53296607544148,-6.53416327927898,0 +-43.53252539091416,-6.535106657702545,0 +-43.53220986733783,-6.535814489181075,0 +-43.53159394770115,-6.536574681843046,0 +-43.5308645307389,-6.537034634990732,0 +-43.52959042415634,-6.537779272381763,0 +-43.5284950111559,-6.538587311176879,0 +-43.52763879733761,-6.539342456179523,0 +-43.52708640493008,-6.539808414963511,0 +-43.52665290652816,-6.540336348155098,0 +-43.52602650110866,-6.541397069851617,0 +-43.52530163371522,-6.543035805181169,0 +-43.52455351282588,-6.54391379162016,0 +-43.52344602359757,-6.545260570671568,0 +-43.52268915978696,-6.546379566729432,0 +-43.52158088694915,-6.547785799292853,0 +-43.5202349417947,-6.549125991308534,0 +-43.51914138786955,-6.550347733117166,0 +-43.51803889418753,-6.551454375309905,0 +-43.51736400658052,-6.552154034013701,0 +-43.5163881251034,-6.553083150134301,0 +-43.51572224587108,-6.553601550356036,0 +-43.51493327368043,-6.554118868642625,0 +-43.51420918451699,-6.554752511946087,0 +-43.51384415050108,-6.555217741681328,0 +-43.51317102905929,-6.556268196283033,0 +-43.51305165159108,-6.556324045370864,0 +-43.51235481311003,-6.55720180574075,0 +-43.51192542584457,-6.557668045238101,0 +-43.51100886359059,-6.558540119634117,0 +-43.51064326508174,-6.558829102558674,0 +-43.51015416823538,-6.559293737437939,0 +-43.50942352133622,-6.559991286276946,0 +-43.5085683790487,-6.560803787967029,0 +-43.50764951737061,-6.561792965528525,0 +-43.50715548785433,-6.562494629537573,0 +-43.50660333676697,-6.563135490974089,0 +-43.50569074063145,-6.563768998941588,0 +-43.50393028002139,-6.564917949705103,0 +-43.50295192433057,-6.565729306422289,0 +-43.50239889154722,-6.566429449463578,0 +-43.5016536032451,-6.567719053414313,0 +-43.50096771000994,-6.569009984688715,0 +-43.50041372449486,-6.569885875960377,0 +-43.49943243440135,-6.570875304386361,0 +-43.49863118102024,-6.57186830932003,0 +-43.49770722158102,-6.572919461761103,0 +-43.49691448264986,-6.57373108272719,0 +-43.4964245695116,-6.574371216583527,0 +-43.49592928657187,-6.575449863104399,0 +-43.49568371342464,-6.575859658748368,0 +-43.49525125484517,-6.57644371992985,0 +-43.49469196341352,-6.577203679664363,0 +-43.49407037501044,-6.577963074442344,0 +-43.49303560389985,-6.57883059349833,0 +-43.49225116541647,-6.579110257328443,0 +-43.49146744649548,-6.579094378611446,0 +-43.49033959497528,-6.578949219128054,0 +-43.48974325450748,-6.578521701066925,0 +-43.48902875578653,-6.578090935510422,0 +-43.48813162878373,-6.577419237428168,0 +-43.48759190433724,-6.577288767076939,0 +-43.48514792238322,-6.576514667060431,0 +-43.48413542039694,-6.576371743835083,0 +-43.48354395728137,-6.576121188623793,0 +-43.4826574323493,-6.575686988739768,0 +-43.4815289376552,-6.575365509358282,0 +-43.48016507543765,-6.574978251920737,0 +-43.47898054942667,-6.57459547971203,0 +-43.47785279418751,-6.574273713702928,0 +-43.47749493993344,-6.574206489680583,0 +-43.4763644259649,-6.57388467059816,0 +-43.47559064286265,-6.573570603485489,0 +-43.47443680854398,-6.573485412794385,0 +-43.4737565876036,-6.573470196401052,0 +-43.47254412271988,-6.573922661611622,0 +-43.47213302505141,-6.573433881790361,0 +-43.47149979408339,-6.572581202451214,0 +-43.47113249350164,-6.572452576591196,0 +-43.47019568342076,-6.572489551953372,0 +-43.46949947383292,-6.573134417731272,0 +-43.46918164644744,-6.573608437048648,0 +-43.46847658940597,-6.574736695607998,0 +-43.46765120130191,-6.575803847592457,0 +-43.46734198526989,-6.576338089144075,0 +-43.46702111107229,-6.577652867035059,0 +-43.46695189631187,-6.578311532797199,0 +-43.46652486171662,-6.579556470176667,0 +-43.46646890053978,-6.579910976514628,0 +-43.4662935241149,-6.580499596929033,0 +-43.46597658186079,-6.581330418432362,0 +-43.46551356097616,-6.582585226728924,0 +-43.46532112891812,-6.582823881230646,0 +-43.46512263082531,-6.584132630273615,0 +-43.46556586464116,-6.585527409108277,0 +-43.46566579554215,-6.586252809630848,0 +-43.46564402014947,-6.586917503178364,0 +-43.46541835048078,-6.589922694224073,0 +-43.46521867291168,-6.590579377010311,0 +-43.46489077444102,-6.591534305397878,0 +-43.46470027039118,-6.592614398566139,0 +-43.46448514785592,-6.593089553940907,0 +-43.46390700555544,-6.593678336859369,0 +-43.46351454734859,-6.593970839798534,0 +-43.46239330471138,-6.594066532716172,0 +-43.46172673729481,-6.593809992494528,0 +-43.46133254068891,-6.593378834885508,0 +-43.46095417598076,-6.593070090779954,0 +-43.4545782203682,-6.59056395542949,0 +-43.45409441457311,-6.590372920504429,0 +-43.45318961023943,-6.589990418581366,0 +-43.45204042585586,-6.589663175031111,0 +-43.45070889995407,-6.589330346030264,0 +-43.44919700362988,-6.588872170395071,0 +-43.447929564182,-6.588359140983377,0 +-43.4466607093847,-6.587906810499057,0 +-43.44624517671708,-6.587475045197245,0 +-43.44540636163821,-6.586912707878619,0 +-43.44407680843943,-6.586459070017226,0 +-43.44371790572149,-6.586209745425855,0 +-43.44317790685368,-6.585895923724983,0 +-43.442580645907,-6.585522240810687,0 +-43.44150167442106,-6.585018415897984,0 +-43.44059669601904,-6.584757549900893,0 +-43.43973379074328,-6.584668033602164,0 +-43.43894546541829,-6.584897785694109,0 +-43.43784666662942,-6.585483003430029,0 +-43.43748397189162,-6.585598224673687,0 +-43.4366978142533,-6.585887696503589,0 +-43.43556828441553,-6.586238505352701,0 +-43.43485582767894,-6.586592956334316,0 +-43.43415095928737,-6.587290939571183,0 +-43.43358133017357,-6.587391551482172,0 +-43.43258517849611,-6.587239691935091,0 +-43.43208553810008,-6.587163409590862,0 +-43.43117461153289,-6.587082415616798,0 +-43.43037206458486,-6.58748667472476,0 +-43.43000191789256,-6.58808467497466,0 +-43.42968710931638,-6.588924949803358,0 +-43.42934594437661,-6.589941807932695,0 +-43.4289784085838,-6.590175611055272,0 +-43.42739434978783,-6.590798597903913,0 +-43.42684464934297,-6.590784105884408,0 +-43.42554490981625,-6.591110593684722,0 +-43.42448688925121,-6.591448204760941,0 +-43.42417687915133,-6.591563150205356,0 +-43.42310645474179,-6.592208363065176,0 +-43.42190391193732,-6.593221277732555,0 +-43.42002456142451,-6.594343496646619,0 +-43.41951844747744,-6.594822737120711,0 +-43.41888531615353,-6.59530018458374,0 +-43.4184367877719,-6.595782303870275,0 +-43.41753801824926,-6.596930954934471,0 +-43.41664157287544,-6.597897247719462,0 +-43.41474012419855,-6.598604609797352,0 +-43.41423320197008,-6.598841959018817,0 +-43.41236327951387,-6.599963116313229,0 +-43.41007888535531,-6.601581935867293,0 +-43.40901295099788,-6.602112194934895,0 +-43.40863029577003,-6.602352534602635,0 +-43.40772180387956,-6.602900566137336,0 +-43.407387304509,-6.603515320043884,0 +-43.40698246834088,-6.604499380468141,0 +-43.40668460383926,-6.605338221173561,0 +-43.40649558904934,-6.606606203833541,0 +-43.4058623105721,-6.607090353084233,0 +-43.40479129776714,-6.607808361627352,0 +-43.40391349766121,-6.608215138345412,0 +-43.40303043661431,-6.608745472435229,0 +-43.40182611647752,-6.609641828806836,0 +-43.40087385951713,-6.610298508572279,0 +-43.39943617964897,-6.610948603875478,0 +-43.39881100095698,-6.611243657846533,0 +-43.39818224624072,-6.611661600011053,0 +-43.39734296251333,-6.612569349265711,0 +-43.39690006642104,-6.612745184953498,0 +-43.39571613541678,-6.61296534224515,0 +-43.39453730838727,-6.61312323492196,0 +-43.3938591572385,-6.613107268553755,0 +-43.39323706307628,-6.613093382383455,0 +-43.39243612942033,-6.613074594342559,0 +-43.39162555817999,-6.613056711462902,0 +-43.3903887687087,-6.613212959124253,0 +-43.38842335628082,-6.613658038084922,0 +-43.38670159537075,-6.614230809603128,0 +-43.38567458659371,-6.61469340208216,0 +-43.38487587617647,-6.615224434044184,0 +-43.38399710363677,-6.615634791784128,0 +-43.38298806701678,-6.616226896373488,0 +-43.38267349767559,-6.61640420761986,0 +-43.38203702883999,-6.617004533671438,0 +-43.38100976434983,-6.618211728279149,0 +-43.38074547074255,-6.618881541159039,0 +-43.38052703637501,-6.619740711713725,0 +-43.38036164009726,-6.620703381654848,0 +-43.38019680993931,-6.621298853571497,0 +-43.3798223295606,-6.621535009310436,0 +-43.37869554099971,-6.622366029916407,0 +-43.37741062645723,-6.623181777708998,0 +-43.37626677007676,-6.623966185055662,0 +-43.37509251366301,-6.624245415313418,0 +-43.37366091494567,-6.624884236552372,0 +-43.3722222838074,-6.625767443746967,0 +-43.37113718773947,-6.626779741922655,0 +-43.36943477727991,-6.627903039134445,0 +-43.36843869272298,-6.628370429609928,0 +-43.36769115526072,-6.628843362167284,0 +-43.36645898729216,-6.629243801957516,0 +-43.36566199394534,-6.629409095467477,0 +-43.36523015181097,-6.629582699483151,0 +-43.36461785113161,-6.629813024730199,0 +-43.36339889767613,-6.630394828034634,0 +-43.36266439867022,-6.630865382628715,0 +-43.36204810766858,-6.631095221458701,0 +-43.36117445472988,-6.631624834523751,0 +-43.3607959366921,-6.631982649959256,0 +-43.35899927410024,-6.632669403386931,0 +-43.35737647203915,-6.633537372564256,0 +-43.35507704644131,-6.634460148802757,0 +-43.35245902656391,-6.635742695051953,0 +-43.35070621982189,-6.636801493393206,0 +-43.34926410689406,-6.637746370892379,0 +-43.34863755749202,-6.638098688883319,0 +-43.34757146811495,-6.63893151261404,0 +-43.34737177900102,-6.639416020080028,0 +-43.3470866664645,-6.640633149052467,0 +-43.34656037981932,-6.641846532063476,0 +-43.34503064211179,-6.6434678431739,0 +-43.34390392575047,-6.644544671406059,0 +-43.34333280844692,-6.645450092878824,0 +-43.34257399467867,-6.646168731757467,0 +-43.34218503756535,-6.646469338524001,0 +-43.34149674843908,-6.646761012883307,0 +-43.3404017612792,-6.647097872450922,0 +-43.33946158542555,-6.647506947187225,0 +-43.33832928300711,-6.6481573363302,0 +-43.33643251271037,-6.64934599273121,0 +-43.33513513770621,-6.64986502942519,0 +-43.33439217105028,-6.649849022690494,0 +-43.33401865188197,-6.650024235339258,0 +-43.33015491942724,-6.651853277138041,0 +-43.32705831805229,-6.652517381960315,0 +-43.32463374078228,-6.65325956331086,0 +-43.32139097843639,-6.654414881358363,0 +-43.31907299654162,-6.655470575008359,0 +-43.31749073822978,-6.656242070605389,0 +-43.31635343109662,-6.657323657657059,0 +-43.31558899567893,-6.658169487574458,0 +-43.315133964868,-6.659144219520874,0 +-43.31492233161075,-6.660067297382044,0 +-43.31439407727162,-6.661170725894787,0 +-43.31373432944492,-6.662157678249036,0 +-43.31333894918095,-6.662774263578334,0 +-43.3130104599114,-6.663509299144801,0 +-43.31274266125999,-6.664368127623886,0 +-43.31216992454219,-6.665092680243744,0 +-43.31147154336408,-6.665936207375025,0 +-43.31089916861703,-6.666418988664076,0 +-43.31025839845248,-6.666785850573393,0 +-43.30942059552908,-6.667520870673959,0 +-43.30857879796054,-6.668320243780215,0 +-43.30764699656087,-6.669612536482921,0 +-43.30701014847067,-6.670542101559383,0 +-43.30567271383416,-6.671940454301572,0 +-43.30413349763189,-6.673633347776101,0 +-43.30317313487448,-6.674725771095189,0 +-43.30209092025848,-6.675880236598894,0 +-43.29984471381838,-6.67767531660214,0 +-43.29723536478487,-6.679348382862036,0 +-43.29591736257758,-6.680127398586169,0 +-43.29528998417581,-6.680610609867246,0 +-43.2942780628099,-6.681145134698158,0 +-43.29357785944805,-6.681375925521899,0 +-43.29239280111391,-6.68197050477631,0 +-43.2897480837404,-6.682836986793824,0 +-43.2889991939881,-6.682881352123222,0 +-43.28812476276821,-6.682922817265869,0 +-43.28731402447133,-6.682903258328562,0 +-43.28632205658737,-6.682567407257998,0 +-43.2852646184706,-6.682228792476325,0 +-43.28432549347126,-6.682081179303372,0 +-43.28413696500547,-6.68207670847548,0 +-43.28344398901075,-6.682122779141258,0 +-43.28236231631513,-6.68259675322847,0 +-43.28152842293949,-6.683202304817362,0 +-43.28005275477184,-6.684106905043894,0 +-43.2792856423141,-6.68452791194904,0 +-43.27864495254499,-6.684826938508619,0 +-43.27800923631025,-6.685000588301154,0 +-43.27718549840446,-6.685232213889365,0 +-43.27592500248015,-6.685640077312806,0 +-43.27454149436149,-6.686168499700365,0 +-43.27353604303214,-6.686580442838549,0 +-43.2724565906049,-6.687551253612001,0 +-43.27213592635361,-6.687979486675714,0 +-43.27156943868232,-6.688338363105292,0 +-43.27019701562994,-6.688490325843484,0 +-43.26913072030725,-6.688713627046016,0 +-43.26837916856716,-6.68882006190775,0 +-43.26726162803524,-6.688791750844376,0 +-43.26583548454983,-6.688446618657008,0 +-43.26475722865934,-6.688239774493417,0 +-43.26408593166593,-6.688172345011705,0 +-43.26263998965479,-6.688450192971612,0 +-43.26157404068599,-6.688487753617793,0 +-43.26082378195179,-6.688345939438762,0 +-43.25949817834366,-6.688068686967529,0 +-43.25861060089311,-6.687987752413348,0 +-43.25688127314019,-6.687786277390282,0 +-43.25444413487527,-6.689101155420807,0 +-43.25288004568044,-6.689752046977948,0 +-43.24906444420076,-6.69103015419968,0 +-43.24560712024395,-6.691636315366726,0 +-43.2429932661454,-6.692610839135115,0 +-43.24088445607529,-6.694276340625778,0 +-43.23999092316976,-6.695625774242341,0 +-43.24064642813553,-6.69767891265107,0 +-43.24129208743308,-6.699241513115864,0 +-43.24142961937941,-6.700948144146268,0 +-43.24054755452706,-6.70211623015047,0 +-43.23812835094547,-6.702738706808649,0 +-43.23656215236016,-6.702724378225602,0 +-43.23394828044748,-6.703198249962886,0 +-43.23219391978475,-6.704025482156597,0 +-43.2314936707054,-6.704689596032167,0 +-43.22960559358734,-6.70514189622136,0 +-43.22631534912183,-6.705585162973444,0 +-43.22439865667017,-6.705726515301203,0 +-43.22316998745439,-6.706051810618415,0 +-43.22017547768739,-6.707377174337327,0 +-43.21772054546329,-6.709372290060115,0 +-43.21616828038982,-6.709504798339126,0 +-43.21392861175256,-6.709619971514142,0 +-43.21117415839127,-6.709722116982977,0 +-43.207453554632,-6.708580332776424,0 +-43.20606567236369,-6.708553825939842,0 +-43.2040449545459,-6.708482691443185,0 +-43.20156454124603,-6.708799764942897,0 +-43.19895768079618,-6.70891986022224,0 +-43.19657548688701,-6.709019767790844,0 +-43.19439412544417,-6.707080034550875,0 +-43.19219965291219,-6.705655234950476,0 +-43.19083749674554,-6.70544849521143,0 +-43.18879055798342,-6.70539453571457,0 +-43.1855471420882,-6.705480338419246,0 +-43.18520148554242,-6.705642538749478,0 +-43.17898982537697,-6.706154546894538,0 +-43.17587650681048,-6.706937085240953,0 +-43.1741456128286,-6.707246079225393,0 +-43.17206714373225,-6.707551239091706,0 +-43.17017721785715,-6.707174050861521,0 +-43.16813117247313,-6.706107680716496,0 +-43.16520590538677,-6.705539192288948,0 +-43.16209086542709,-6.7054816936434,0 +-43.15877458824957,-6.706448247691998,0 +-43.15684579855102,-6.707606701050508,0 +-43.15299654167384,-6.709412256500875,0 +-43.14880176690497,-6.710872518109245,0 +-43.13992234160068,-6.714603232129345,0 +-43.13522589733395,-6.717052138355728,0 +-43.13019901040312,-6.719653047949939,0 +-43.12934811241767,-6.719626513546846,0 +-43.12662214287884,-6.718532375349122,0 +-43.12472415138097,-6.718152607858336,0 +-43.12283317751943,-6.717599608696561,0 +-43.11933251375574,-6.717547448299931,0 +-43.11737007137614,-6.718721529669166,0 +-43.11418365592833,-6.719875687380126,0 +-43.11365289775178,-6.720039579790846,0 +-43.10955360770672,-6.722404384104506,0 +-43.10778957354074,-6.723236409373743,0 +-43.10585079024077,-6.724066817485399,0 +-43.10271496500944,-6.725027905845609,0 +-43.10045965692041,-6.725657429335887,0 +-43.09734273755144,-6.726265025847828,0 +-43.09526709330331,-6.726555661327328,0 +-43.09300141960539,-6.727529184842084,0 +-43.09054206205206,-6.728689754483076,0 +-43.08825886833029,-6.72985153169826,0 +-43.08529311244369,-6.73165352193302,0 +-43.08338211629972,-6.732289986458526,0 +-43.07955708328672,-6.733565361310328,0 +-43.07486307817554,-6.734991136035512,0 +-43.07102213547969,-6.736619255315934,0 +-43.06753824926824,-6.737743144749188,0 +-43.06666422536318,-6.738230478344747,0 +-43.0637026711409,-6.739193744609859,0 +-43.06299951069521,-6.739692875714127,0 +-43.06142051127428,-6.740686412130064,0 +-43.05931520150431,-6.742011081202191,0 +-43.05530200652206,-6.74363611500307,0 +-43.05130185436919,-6.744746866789041,0 +-43.04956312657718,-6.745222265774428,0 +-43.04729871113386,-6.746029013287876,0 +-43.04415418606441,-6.747500716117254,0 +-43.04205765560667,-6.748481593958577,0 +-43.0401345908686,-6.749292743164787,0 +-43.03803231370367,-6.750270540758375,0 +-43.03455574200043,-6.751220994834748,0 +-43.0328281375206,-6.751354070636865,0 +-43.03091830315618,-6.751825321292899,0 +-43.02811582658467,-6.753303779597656,0 +-43.02794370391545,-6.753299945724282,0 +-43.02689039815593,-6.753790195018635,0 +-43.02615342933228,-6.754031970550599,0 +-43.02558979380625,-6.754234159454035,0 +-43.02489474481824,-6.754560926634325,0 +-43.02459299577917,-6.754598260416696,0 +-43.02415902633152,-6.754801544341979,0 +-43.02368444227048,-6.754955628517867,0 +-43.02273294223906,-6.755270480184659,0 +-43.02213014228493,-6.755338337606247,0 +-43.02152285872464,-6.755576017933867,0 +-43.02109216286057,-6.755607473284465,0 +-43.02087728873846,-6.755602001246359,0 +-43.02010987048141,-6.755327873376038,0 +-43.01951226638133,-6.755142919334215,0 +-43.01891026611276,-6.755127524431463,0 +-43.0183941230304,-6.755114321175252,0 +-43.01762415801743,-6.754924845109834,0 +-43.01689707278624,-6.754736362585954,0 +-43.01655247232938,-6.754727047475455,0 +-43.01607614240717,-6.754799053097355,0 +-43.01521573103624,-6.7549553413433,0 +-43.0146085116924,-6.755110119429614,0 +-43.01360792104292,-6.755555862075031,0 +-43.01303900372641,-6.755926180641328,0 +-43.01277121138627,-6.756260162609157,0 +-43.01254364734319,-6.756680140706193,0 +-43.01243942591601,-6.757273030950173,0 +-43.01233257212922,-6.757821147559954,0 +-43.01213767578474,-6.758410555057604,0 +-43.01185972924825,-6.75895760585631,0 +-43.01166671703715,-6.759593565847467,0 +-43.01157217729059,-6.759847729176958,0 +-43.011387818396,-6.760271768999945,0 +-43.01124931323493,-6.76074116783618,0 +-43.01107880676238,-6.761255932914636,0 +-43.0107782928331,-6.761851980099073,0 +-43.01047040876949,-6.762530633502814,0 +-43.01011724114652,-6.763206805163381,0 +-43.00997988194685,-6.7635452643441,0 +-43.00988560441218,-6.763970216324982,0 +-43.00974452019814,-6.764607401424415,0 +-43.00973832640231,-6.764948695682893,0 +-43.00973238826003,-6.765375028753178,0 +-43.00955117961598,-6.766095041812519,0 +-43.00894270987586,-6.766803888887575,0 +-43.0085955828326,-6.76751690567599,0 +-43.00833005282144,-6.768105061215284,0 +-43.0080609209295,-6.768862706768628,0 +-43.00796885382467,-6.769242413504136,0 +-43.00787362405872,-6.76979164353853,0 +-43.0076899340056,-6.770676214360043,0 +-43.00738212387736,-6.771345064744329,0 +-43.0070737414197,-6.77209747124443,0 +-43.00685407229177,-6.77259826612903,0 +-43.00676413168051,-6.77301715900399,0 +-43.00618293155846,-6.774889675945528,0 +-43.00531625168858,-6.776721707910947,0 +-43.00462648977359,-6.777994999819406,0 +-43.00386064442052,-6.779514347895019,0 +-43.00361062342108,-6.779750970799219,0 +-43.00270050252426,-6.780213863174271,0 +-43.00145701812962,-6.781155204229266,0 +-43.00088465301747,-6.781466159753475,0 +-42.99973960159352,-6.78208745346607,0 +-42.99801761294506,-6.783260415396731,0 +-42.99744519062328,-6.78365115526187,0 +-42.9966266738924,-6.784358911694331,0 +-42.99556302953309,-6.785302205673881,0 +-42.99523760238905,-6.785536430589166,0 +-42.99364886621866,-6.786504424658873,0 +-42.99210008176185,-6.787308410908111,0 +-42.98814534304537,-6.789564581576453,0 +-42.98642617994773,-6.791031366436637,0 +-42.98437029650066,-6.792490545529042,0 +-42.9823179462318,-6.793782671059485,0 +-42.979777229908,-6.794393964175399,0 +-42.97585702492558,-6.796315268268963,0 +-42.97447219415832,-6.79779205977599,0 +-42.97189731288461,-6.79957591146534,0 +-42.97034052658567,-6.801218607577802,0 +-42.96875730988194,-6.804042346388861,0 +-42.96721398815452,-6.805017637443197,0 +-42.9632670363355,-6.807451513228066,0 +-42.96050420466612,-6.809747292037856,0 +-42.9588072947122,-6.809880183800082,0 +-42.95542592931974,-6.80995603255968,0 +-42.95205484900266,-6.80986180884805,0 +-42.95086430647597,-6.810332007230716,0 +-42.94914892263883,-6.811139275903916,0 +-42.94604458673403,-6.812935552229348,0 +-42.941598621302,-6.815339899625315,0 +-42.93885199572181,-6.817284734184312,0 +-42.93484160062092,-6.817506802653508,0 +-42.93287634334498,-6.817739093716444,0 +-42.93107524227509,-6.818995213262141,0 +-42.93032144194204,-6.819348306120684,0 +-42.92928412371367,-6.819880001355365,0 +-42.92721499469486,-6.820757604573203,0 +-42.92533533995629,-6.821546502727452,0 +-42.92299100141639,-6.822692461405611,0 +-42.92124129291805,-6.823750528775211,0 +-42.91991609220776,-6.82528603520555,0 +-42.9184977302022,-6.825534892760383,0 +-42.91669100428776,-6.826146502233594,0 +-42.9151648966231,-6.826856408130386,0 +-42.91372053931077,-6.828582699980412,0 +-42.91284532354194,-6.829493161631273,0 +-42.91190423390774,-6.829841527806098,0 +-42.90974882269259,-6.830804742108259,0 +-42.90787552174162,-6.831681721088398,0 +-42.90599886163716,-6.832743099037462,0 +-42.90542505251131,-6.833377055057964,0 +-42.90531942908596,-6.834020930857524,0 +-42.904457886522,-6.83529251070527,0 +-42.90389956444895,-6.835645314837713,0 +-42.89972045608835,-6.839405215561653,0 +-42.89832435620704,-6.840104406536053,0 +-42.89646645573326,-6.841065162964434,0 +-42.89423604393162,-6.842472180667977,0 +-42.8922761964207,-6.84361523958875,0 +-42.8902120668056,-6.845124062476406,0 +-42.8881172589931,-6.846829033659914,0 +-42.88648691080374,-6.848363572684697,0 +-42.88572930537406,-6.848808847674544,0 +-42.88488693828581,-6.849338567618872,0 +-42.88375961138058,-6.850590917181848,0 +-42.88236192630697,-6.851560613109259,0 +-42.88059488367077,-6.852611814731989,0 +-42.87827184780075,-6.853650951184336,0 +-42.87643774010765,-6.854776361139708,0 +-42.87473052683308,-6.857120221064957,0 +-42.87320810938088,-6.858916318776562,0 +-42.870284094158,-6.861501705156408,0 +-42.86745740425119,-6.863904025560058,0 +-42.86491566063263,-6.866127129332266,0 +-42.86154695509342,-6.868418022620838,0 +-42.85931402312287,-6.869549158562903,0 +-42.85689360103723,-6.870862886456439,0 +-42.85483697844862,-6.872276556916773,0 +-42.85277385923992,-6.873962574277813,0 +-42.85062195836149,-6.875641638882593,0 +-42.84788874678551,-6.877877940109069,0 +-42.84562831643279,-6.87975196672087,0 +-42.84412368529434,-6.8809092661448,0 +-42.84190323517208,-6.881848518144316,0 +-42.84012405802805,-6.882908431366308,0 +-42.83853291642716,-6.883789954308102,0 +-42.83731141056612,-6.884589186333992,0 +-42.83646277799075,-6.885213939982737,0 +-42.83521729532187,-6.886661233442115,0 +-42.83444963626212,-6.887566929430662,0 +-42.83206071597837,-6.89103715811792,0 +-42.82778591246632,-6.894174670026263,0 +-42.82351177219446,-6.897464162326932,0 +-42.82175291844255,-6.899577580858232,0 +-42.82047152346095,-6.901239653065705,0 +-42.81873250411829,-6.902583244130592,0 +-42.81637074487506,-6.904209961373799,0 +-42.8144822769298,-6.905542263164112,0 +-42.81181814926477,-6.907304164397839,0 +-42.80962156768604,-6.908928098411739,0 +-42.80662836418088,-6.910715044183279,0 +-42.80315667721491,-6.912803555011172,0 +-42.80097479008955,-6.913965010833143,0 +-42.79818393399972,-6.914804143260345,0 +-42.79599873568907,-6.915372177740513,0 +-42.7922310830924,-6.916685608234376,0 +-42.789086683614,-6.917857227883011,0 +-42.78656886773317,-6.918734900070882,0 +-42.78295334371373,-6.919897435644283,0 +-42.7805823850936,-6.920631256662146,0 +-42.77775556462649,-6.92149746626229,0 +-42.77523997299036,-6.922369903705299,0 +-42.77317799843452,-6.923109443020363,0 +-42.77126389626606,-6.924463979976276,0 +-42.76920458152928,-6.925352770863949,0 +-42.76706778267548,-6.92691582504037,0 +-42.76439623581893,-6.928086880610181,0 +-42.76249589921622,-6.928968841184415,0 +-42.76106848609577,-6.93001469419086,0 +-42.75842743958859,-6.930259972219837,0 +-42.75593251030494,-6.930663287303683,0 +-42.75343923155299,-6.931221000055004,0 +-42.75170994058595,-6.932260568396703,0 +-42.74935137308601,-6.933595294810415,0 +-42.74665368506546,-6.935536384498997,0 +-42.7435223810273,-6.936387695752289,0 +-42.73960688060829,-6.937528691324842,0 +-42.7355452059071,-6.938353371653914,0 +-42.72976645680468,-6.939752069258598,0 +-42.72584126918471,-6.941357704403236,0 +-42.72297659989566,-6.944218392209875,0 +-42.72108101300669,-6.945409176149383,0 +-42.71872355146053,-6.946283197940649,0 +-42.71620486655753,-6.947308765276295,0 +-42.71146048121573,-6.949378510074201,0 +-42.70845473812623,-6.950404881138121,0 +-42.70749688277409,-6.950854492760383,0 +-42.70639024122182,-6.95099123038422,0 +-42.70355995424016,-6.951549276262916,0 +-42.70041478055239,-6.952406108874368,0 +-42.69691939427648,-6.953734814279536,0 +-42.69469554933155,-6.95446839821827,0 +-42.69134866051894,-6.955803426769603,0 +-42.69006961552701,-6.956401457308146,0 +-42.68801092404226,-6.957592131071084,0 +-42.68721808927025,-6.95803884677486,0 +-42.68513739728049,-6.958935208232493,0 +-42.68340993726193,-6.959510879124243,0 +-42.67893265539536,-6.961990641507604,0 +-42.6776660818666,-6.962581636599707,0 +-42.67511687115466,-6.964385041807915,0 +-42.67320365699076,-6.965738326203072,0 +-42.67237974002578,-6.967274554714107,0 +-42.67139030676352,-6.969119377869888,0 +-42.67120860874477,-6.97004975871494,0 +-42.669895874196,-6.972353811824751,0 +-42.66796579264859,-6.974330913717678,0 +-42.66701428608643,-6.974775036288156,0 +-42.66463344311917,-6.975963208434406,0 +-42.66320009851942,-6.976862881703609,0 +-42.66080121791938,-6.978827739986457,0 +-42.65841378872264,-6.980478648444025,0 +-42.65651109962543,-6.981519242943898,0 +-42.65538680290758,-6.982734773398907,0 +-42.65380120161556,-6.98362743123085,0 +-42.65077605819297,-6.985882183422307,0 +-42.64979405567833,-6.987874523921501,0 +-42.64798796058742,-6.990795160237798,0 +-42.64568515179391,-6.994793890575428,0 +-42.64515977446218,-6.996809290391725,0 +-42.64370277710542,-6.998490736750565,0 +-42.63979452947693,-7.000670397151282,0 +-42.6359381841818,-7.00189829276472,0 +-42.63378399442884,-7.002123317294869,0 +-42.63209881295614,-7.002057359023221,0 +-42.6311900716027,-7.001558589215892,0 +-42.62861978525493,-7.000069890498351,0 +-42.6272552148069,-6.999554704566576,0 +-42.6251146175355,-6.998868646196365,0 +-42.62043798445631,-6.997694614212559,0 +-42.61906056098336,-6.996732811928442,0 +-42.61751747745124,-6.995925108432776,0 +-42.61611178849579,-6.995588185635115,0 +-42.61068744651866,-6.994957967934019,0 +-42.60762721621776,-6.994603566717666,0 +-42.60455945660193,-6.994522664930143,0 +-42.60120278716957,-6.994404176736329,0 +-42.59591475562011,-6.99457589065114,0 +-42.58920005352096,-6.995827860392192,0 +-42.5875280692493,-6.995794928681597,0 +-42.58446783223397,-6.995457397312602,0 +-42.5805762295661,-6.994818671599774,0 +-42.57558849721424,-6.993318402490933,0 +-42.57114405948189,-6.992384063291856,0 +-42.56725679560031,-6.991462524419747,0 +-42.56144756554659,-6.989111048528778,0 +-42.56035801783298,-6.987976829737422,0 +-42.55542788583052,-6.984251261703822,0 +-42.55098127816332,-6.983314221901642,0 +-42.54766028300011,-6.982125166476391,0 +-42.5437708713341,-6.981201331091021,0 +-42.54069298476512,-6.981130846781332,0 +-42.53732623698597,-6.981331420278435,0 +-42.53368087649794,-6.982346872112656,0 +-42.52892256624916,-6.983334042880527,0 +-42.52780297015691,-6.983582486939206,0 +-42.52243264266482,-6.984852349202382,0 +-42.52045800195783,-6.984812797055504,0 +-42.51652265191814,-6.984177507223443,0 +-42.51287372355825,-6.984094802579318,0 +-42.50842680870201,-6.983703001211347,0 +-42.50569599048597,-6.982790499264233,0 +-42.50102692795426,-6.982378209045828,0 +-42.49825251483282,-6.982856211388025,0 +-42.49325333298938,-6.986300910600967,0 +-42.48993929557444,-6.986485717218679,0 +-42.48690009368885,-6.985855271673566,0 +-42.48386297555155,-6.984675222623963,0 +-42.47942578377734,-6.983737759526051,0 +-42.47585409961596,-6.982814105035325,0 +-42.47449152483895,-6.982499037416384,0 +-42.46856861728604,-6.983454554282281,0 +-42.46607305120933,-6.983400477255719,0 +-42.46190285424716,-6.983303181229721,0 +-42.45773696477821,-6.983211436617078,0 +-42.45495385166599,-6.983145620606714,0 +-42.45158697832456,-6.983318303457464,0 +-42.44599633196337,-6.984292998884471,0 +-42.43901263167859,-6.985237993027642,0 +-42.43454837272926,-6.985395388548658,0 +-42.4278406112528,-6.986312203168247,0 +-42.42142129880722,-6.987234451225285,0 +-42.41553453406852,-6.988768389258321,0 +-42.41245414671422,-6.988998480145999,0 +-42.40798146698037,-6.989185004730092,0 +-42.40380769205657,-6.989076968190266,0 +-42.40074593356428,-6.988999938538184,0 +-42.39658131207337,-6.988615323718747,0 +-42.38881308282397,-6.988400902230866,0 +-42.38492619650328,-6.988569701387288,0 +-42.3810483582263,-6.98846273772793,0 +-42.37688972474013,-6.988623915096552,0 +-42.37212871833404,-6.990159572060356,0 +-42.36846287577411,-6.991189247315758,0 +-42.36228505742027,-6.993793629431059,0 +-42.35894619838974,-6.993713020097297,0 +-42.35616362173887,-6.993645825876171,0 +-42.35170430199138,-6.993814175276714,0 +-42.34724450135771,-6.993982500613687,0 +-42.34501781885873,-6.993928691360235,0 +-42.33945736536873,-6.993518156341122,0 +-42.33445976209236,-6.99284500494309,0 +-42.33026976478792,-6.993295874524104,0 +-42.32493904270044,-6.994823516492921,0 +-42.31568060939046,-6.997634720391556,0 +-42.30478844656123,-6.999570998106931,0 +-42.29686385356547,-7.003736693460395,0 +-42.28336232171497,-7.005414185876168,0 +-42.28093105962815,-7.005946213584004,0 +-42.27888428212761,-7.006253329032763,0 +-42.27671415948606,-7.006915451599116,0 +-42.27493880272093,-7.006754740548679,0 +-42.27202759524632,-7.007753534035015,0 +-42.2715412373899,-7.007979589044075,0 +-42.26344333561248,-7.009089863591722,0 +-42.25790951838453,-7.010022414950239,0 +-42.25503373217428,-7.009712634428747,0 +-42.25453964761176,-7.005655234949702,0 +-42.25243789854974,-7.003462519824484,0 +-42.24790295754696,-7.002756631507031,0 +-42.24287812320956,-7.001910503191326,0 +-42.23552150093264,-7.002750379612189,0 +-42.22538590004459,-7.001891386941282,0 +-42.21584128810365,-7.001411423032821,0 +-42.2054399781818,-7.001391571213718,0 +-42.197441035875,-7.001790799223329,0 +-42.19087700952865,-7.002826618481532,0 +-42.17871672091587,-7.006124790163408,0 +-42.17439634566757,-7.006984018648701,0 +-42.17324522735108,-7.007308797435025,0 +-42.17168843101894,-7.007750760227732,0 +-42.1706033257036,-7.007963227711392,0 +-42.16978693706559,-7.008181973966637,0 +-42.16848872337445,-7.00838767518246,0 +-42.166195459988,-7.009045232474813,0 +-42.16181025927145,-7.01060671271509,0 +-42.15925239618497,-7.011141810019303,0 +-42.15741602317674,-7.011576353420343,0 +-42.15606339863651,-7.012261159172922,0 +-42.15396708102004,-7.013288677396594,0 +-42.1526190987836,-7.013854549191153,0 +-42.14743152970498,-7.019026332868232,0 +-42.14555611752908,-7.020031260730603,0 +-42.14366655846423,-7.018763604296518,0 +-42.14171727809259,-7.017526098480961,0 +-42.14065506235544,-7.016653685152233,0 +-42.13198114898381,-7.011950897194184,0 +-42.12788811380954,-7.009472914718509,0 +-42.1210999001851,-7.006669087123503,0 +-42.11814404054682,-7.00522132001073,0 +-42.11649762985473,-7.00337467045804,0 +-42.11519928850737,-7.001622650244606,0 +-42.11455905629273,-7.000777335470136,0 +-42.11425749569987,-7.000284241751,0 +-42.113709330259,-6.999639523059821,0 +-42.11336512478039,-6.999279560688396,0 +-42.11287561620946,-6.998909999115869,0 +-42.1126325162351,-6.99869144268064,0 +-42.11183094618508,-6.998068314094676,0 +-42.1116907088066,-6.998029575153082,0 +-42.11130666248385,-6.997843887056115,0 +-42.11078482032817,-6.997586338665717,0 +-42.11043764071024,-6.997439400970181,0 +-42.10952772688217,-6.997063719848383,0 +-42.10938592500329,-6.996987504215888,0 +-42.10359369563121,-6.993908144708167,0 +-42.09530958043015,-6.989160081560313,0 +-42.09469596653943,-6.988835804754918,0 +-42.09341447443408,-6.98813201974426,0 +-42.09202537682503,-6.987475916879553,0 +-42.0909469630055,-6.986827527377629,0 +-42.08985893296365,-6.986435288464182,0 +-42.08860538510354,-6.986139196993702,0 +-42.08773081982536,-6.985755805997497,0 +-42.08629339563289,-6.985153539019788,0 +-42.08577904872216,-6.985038782102921,0 +-42.08464234072915,-6.984856735701759,0 +-42.08367233848736,-6.984422334567352,0 +-42.08243221987995,-6.984237520338858,0 +-42.08098969035207,-6.984153648518788,0 +-42.08020568029372,-6.984340150136527,0 +-42.07941565391636,-6.984732580027185,0 +-42.07338967670176,-6.984375826384984,0 +-42.06950506954009,-6.9848010175372,0 +-42.06756506641621,-6.984926439637651,0 +-42.06617622087708,-6.984543540245611,0 +-42.06516887305707,-6.982948191638371,0 +-42.06311506323375,-6.981328903848691,0 +-42.06106761479966,-6.97953677534962,0 +-42.05816047654513,-6.977378042587742,0 +-42.05695576222085,-6.976827948424915,0 +-42.05366309371952,-6.976054731851137,0 +-42.05208572379996,-6.975664012806602,0 +-42.04982238940091,-6.97473401537597,0 +-42.04583371464284,-6.972715558131616,0 +-42.04270680272181,-6.971240860165096,0 +-42.04166532070418,-6.970866688936474,0 +-42.03861069070048,-6.968540049433655,0 +-42.0381054280919,-6.968007508705542,0 +-42.03299491838441,-6.966309926844596,0 +-42.02866796870217,-6.963935083274673,0 +-42.02433294192497,-6.962083364778412,0 +-42.02243904506731,-6.960818646563898,0 +-42.01551386161583,-6.958035952013506,0 +-42.01018500369027,-6.954780525699919,0 +-42.00760770026099,-6.953155685922212,0 +-42.00588402462113,-6.952245052346893,0 +-42.0039803832574,-6.951502812059418,0 +-42.00052886331742,-6.94967942207842,0 +-41.997584551122,-6.948563001076347,0 +-41.99430054457205,-6.947616220733945,0 +-41.98949964086962,-6.9454253551275,0 +-41.98624899798348,-6.94379235607409,0 +-41.9826307604435,-6.94214297983627,0 +-41.98002495303574,-6.941729763009871,0 +-41.97742484709441,-6.940969642204108,0 +-41.97430558981988,-6.940197535796803,0 +-41.97188316659896,-6.939617724485562,0 +-41.96860918755954,-6.939196619911629,0 +-41.96463601203519,-6.938407566264564,0 +-41.95936687445926,-6.9379115589916,0 +-41.95591615733191,-6.937658220782905,0 +-41.95438037256902,-6.937801091085807,0 +-41.95156016076027,-6.939248236880657,0 +-41.94909699542164,-6.939529910798797,0 +-41.94725731842056,-6.940542401062891,0 +-41.94708441722501,-6.940885945988829,0 +-41.94196569122508,-6.941982307279017,0 +-41.93535826346242,-6.94147123794382,0 +-41.92530207086997,-6.940007384769439,0 +-41.91923776828872,-6.938993654324547,0 +-41.91388205969008,-6.937652727222422,0 +-41.91093819252727,-6.937234130958082,0 +-41.90678857913286,-6.936440141458905,0 +-41.90384912084942,-6.935846653836133,0 +-41.89969336714485,-6.935044479860504,0 +-41.89568995228145,-6.934582968036719,0 +-41.88991772935596,-6.933885186655695,0 +-41.88400305106529,-6.933036245264568,0 +-41.88000998645671,-6.931713347940176,0 +-41.87708585821346,-6.930781284332065,0 +-41.87363669265682,-6.930009227904554,0 +-41.87019157915739,-6.928888127253581,0 +-41.86915315972642,-6.928864459255468,0 +-41.86397824846384,-6.928228526578635,0 +-41.86240305139048,-6.928540603629771,0 +-41.85854317946063,-6.929841452521585,0 +-41.8564496559931,-6.930136276619285,0 +-41.85349837086797,-6.93006635067274,0 +-41.85176785317087,-6.929853195577993,0 +-41.84815704304236,-6.928739107030037,0 +-41.84419485333003,-6.927961388770087,0 +-41.84161019440839,-6.927558740944365,0 +-41.83849748040037,-6.927485941590492,0 +-41.83491773756053,-6.927616828935347,0 +-41.83262884413397,-6.927702945656631,0 +-41.8298455397435,-6.927972264532252,0 +-41.82640237547282,-6.928069592189693,0 +-41.82296908840938,-6.927995518209401,0 +-41.82125976981063,-6.927961456368872,0 +-41.81942355993538,-6.927945579068244,0 +-41.81602523668217,-6.92788163523365,0 +-41.81294534287007,-6.927465547137267,0 +-41.81003169394258,-6.92739664281762,0 +-41.8079760554845,-6.927348019764651,0 +-41.80643488941113,-6.927311559461902,0 +-41.79562996185935,-6.929103644111139,0 +-41.79322386138109,-6.929392518358851,0 +-41.78958701642605,-6.93067123283894,0 +-41.7857430544918,-6.932442938283477,0 +-41.7822272441957,-6.933355476169481,0 +-41.7797828945869,-6.93397064360235,0 +-41.77616608605685,-6.934740413938364,0 +-41.77341247121969,-6.935358807284337,0 +-41.7698028301453,-6.936126751910999,0 +-41.76721948531814,-6.93674646814439,0 +-41.76550569677876,-6.936875000429348,0 +-41.76362179461265,-6.936999235885955,0 +-41.76190001919925,-6.937468720222988,0 +-41.75879218321381,-6.938242896829348,0 +-41.75687277945405,-6.939559390907687,0 +-41.75531323959325,-6.940202114120889,0 +-41.75203175895,-6.941141761826096,0 +-41.74702534932383,-6.942207478549222,0 +-41.74392390293026,-6.942125439049434,0 +-41.73994289232915,-6.942018142084734,0 +-41.73729166129906,-6.943141184607391,0 +-41.73526077807669,-6.945137626854641,0 +-41.73220107395487,-6.948316090408819,0 +-41.73057544523319,-6.949991526323858,0 +-41.72879713664709,-6.950635151977479,0 +-41.72525704782102,-6.951408569280985,0 +-41.72317164968773,-6.951355220138745,0 +-41.72016320411125,-6.953342510090557,0 +-41.71776096817911,-6.952076860610754,0 +-41.71513613807755,-6.952697868846236,0 +-41.71335693394392,-6.954201241368787,0 +-41.71089556618188,-6.955171146985926,0 +-41.7080387191646,-6.954398787076598,0 +-41.70598822768866,-6.953313852351891,0 +-41.70339206821956,-6.952731831365501,0 +-41.70105929119293,-6.951633783566558,0 +-41.70071460618747,-6.951624702335865,0 +-41.69561953724172,-6.951144741083374,0 +-41.69453859360232,-6.952832319100121,0 +-41.69204607873487,-6.955514555740121,0 +-41.68991352744229,-6.957523018143986,0 +-41.687784287565,-6.959360934262099,0 +-41.68632840843816,-6.961904067276112,0 +-41.68468152233505,-6.965129983678444,0 +-41.68360392797044,-6.966980553968585,0 +-41.68246100810185,-6.970237795624182,0 +-41.68190586410822,-6.971265490085117,0 +-41.68019142948557,-6.971867193875108,0 +-41.67616782157607,-6.973815037303716,0 +-41.67248314641407,-6.974943475863077,0 +-41.67075874173385,-6.974558258234424,0 +-41.66784240302746,-6.973453284735329,0 +-41.66578773853239,-6.972541334481385,0 +-41.66217272891872,-6.971421733215937,0 +-41.66047168364849,-6.970344608976613,0 +-41.65842092852222,-6.96926058704133,0 +-41.65671847039857,-6.968184389997252,0 +-41.65412297785834,-6.967607329529423,0 +-41.6503423065682,-6.96698677062103,0 +-41.64966027104537,-6.966964595508876,0 +-41.64550752301597,-6.969307693867175,0 +-41.64198548680792,-6.971626573855127,0 +-41.63914161199416,-6.974647797176339,0 +-41.63680889954298,-6.978186879306243,0 +-41.63518697300458,-6.981050987731724,0 +-41.63375288415524,-6.983402382246621,0 +-41.63163153753801,-6.985901062111771,0 +-41.6300523757308,-6.98738944810297,0 +-41.62880757947212,-6.98889289389853,0 +-41.62719859103408,-6.991071433870591,0 +-41.62562975231559,-6.991883893559436,0 +-41.62371225574798,-6.993191962630909,0 +-41.62110531850936,-6.994818305330187,0 +-41.61677995987088,-6.997070770803625,0 +-41.61296308039898,-6.998841255687581,0 +-41.60810018331938,-7.001598986102816,0 +-41.60324889297691,-7.004015412276474,0 +-41.60098886498756,-7.005482271707915,0 +-41.59942561639594,-7.006458353285002,0 +-41.5966374810215,-7.008588882956343,0 +-41.59314649948308,-7.010546353233068,0 +-41.5915559504128,-7.011539936513638,0 +-41.58735814860316,-7.012823563320101,0 +-41.58593555783283,-7.013823206661788,0 +-41.58195848468277,-7.018035326513533,0 +-41.58037531180523,-7.019359800681523,0 +-41.57811783189274,-7.020321417686681,0 +-41.57432450125118,-7.02206623291485,0 +-41.57099191609353,-7.023540741486529,0 +-41.56925334022045,-7.024013114854277,0 +-41.56277897667747,-7.026437590526879,0 +-41.55946286352561,-7.02705237714087,0 +-41.55727893387756,-7.027234548379047,0 +-41.55674780795906,-7.029252332952338,0 +-41.5563455490662,-7.031636593573193,0 +-41.55534882889292,-7.034232056659427,0 +-41.55328156453551,-7.036831471339481,0 +-41.5525798101328,-7.036988132613197,0 +-41.54990289812618,-7.038832048817412,0 +-41.54846683628693,-7.040012973383267,0 +-41.54614865873602,-7.041856913707995,0 +-41.54456048886471,-7.042679257449072,0 +-41.54190689889881,-7.043998332487242,0 +-41.54107447340498,-7.044784991295661,0 +-41.54080795063308,-7.045551629564924,0 +-41.54050496758229,-7.046115027441089,0 +-41.53961690604057,-7.047028325239428,0 +-41.53813821541306,-7.048377451672605,0 +-41.53711974039179,-7.049414432468824,0 +-41.5361425428439,-7.050412698309928,0 +-41.53517375398199,-7.051084099195514,0 +-41.53462955995943,-7.051356654239223,0 +-41.5336739052307,-7.051577320731218,0 +-41.53271332690738,-7.05179946930921,0 +-41.53178694058366,-7.052268865612533,0 +-41.53047346880935,-7.053221744165942,0 +-41.5295350966746,-7.05402146775327,0 +-41.52820569526826,-7.05530758634084,0 +-41.52743961692153,-7.055947190177342,0 +-41.52676662165317,-7.056380922492065,0 +-41.52584463611863,-7.056808301554589,0 +-41.52487551089055,-7.057561781841983,0 +-41.52424124309922,-7.058200407089579,0 +-41.52377897905957,-7.058515970952518,0 +-41.52361154604182,-7.058593564146939,0 +-41.52245473933282,-7.059427499983348,0 +-41.52203205513513,-7.059744748957198,0 +-41.52148392777065,-7.060099809042904,0 +-41.52055559739928,-7.060734547737708,0 +-41.51870346928999,-7.061920022990905,0 +-41.51769267377738,-7.062632931644473,0 +-41.51714444778867,-7.063029008173205,0 +-41.51629932392523,-7.063581583427762,0 +-41.51549299708079,-7.064217975799688,0 +-41.51484975699842,-7.064859763426398,0 +-41.51399348134081,-7.065661701496422,0 +-41.51331317983994,-7.066179878864802,0 +-41.51195324447636,-7.067135014333894,0 +-41.51092279350291,-7.067937717793893,0 +-41.51015490886631,-7.068456508923453,0 +-41.50990213768254,-7.068573694631394,0 +-41.50954482860244,-7.069024675039051,0 +-41.5090957122007,-7.069478277913769,0 +-41.50869966345552,-7.070009502842026,0 +-41.50864551286413,-7.070423000909871,0 +-41.50850724990425,-7.070875521697357,0 +-41.50848486988561,-7.07162212085269,0 +-41.50877710294423,-7.072879157303149,0 +-41.50875113896254,-7.073386348694118,0 +-41.50904947128238,-7.074074550921171,0 +-41.50927565653956,-7.074549792678726,0 +-41.50946919049437,-7.075703487312627,0 +-41.50956191182799,-7.076371830730341,0 +-41.50957808934774,-7.076956523137247,0 +-41.50943866143587,-7.077287190275835,0 +-41.50886670499416,-7.077857831204639,0 +-41.50812421344492,-7.078679927779097,0 +-41.50752516684496,-7.079382677281386,0 +-41.50692920616459,-7.079534977627828,0 +-41.50667750471425,-7.079527920480388,0 +-41.50617471793458,-7.079513768862153,0 +-41.50499498928298,-7.079397929401686,0 +-41.50457435196738,-7.079093033945378,0 +-41.50402155341705,-7.078910830676413,0 +-41.50389509930064,-7.07882347705197,0 +-41.50119330714933,-7.078123260113412,0 +-41.5006433914448,-7.078066895337122,0 +-41.50013441730155,-7.078053804630239,0 +-41.49941374753283,-7.077992990264026,0 +-41.49813926830488,-7.077917866733344,0 +-41.49720204865083,-7.077894212781448,0 +-41.49621939855976,-7.077869499349551,0 +-41.49540455603602,-7.077849350360561,0 +-41.49489114933743,-7.077835787160705,0 +-41.49433358522761,-7.077863600964322,0 +-41.49338936229767,-7.077965971141402,0 +-41.49265837156073,-7.078074153586256,0 +-41.49214486586684,-7.078060591191152,0 +-41.49141735418542,-7.078041375630863,0 +-41.49052104096654,-7.077932695594209,0 +-41.48979346975661,-7.077913468219493,0 +-41.48911013911446,-7.077852876913906,0 +-41.48859921046729,-7.077754348073824,0 +-41.48765922884341,-7.077686962187528,0 +-41.48655625908147,-7.077741689701702,0 +-41.48630744794075,-7.077734434094487,0 +-41.48544120786993,-7.077751229019045,0 +-41.48412068848255,-7.078015787591196,0 +-41.48370155423436,-7.077834758125362,0 +-41.48234987030239,-7.077685495013847,0 +-41.48108203622673,-7.077421742707076,0 +-41.48038949437326,-7.077288040151527,0 +-41.4792402884926,-7.07725823920295,0 +-41.47763144410484,-7.077043252929352,0 +-41.47625456623811,-7.076835701123579,0 +-41.47464842252052,-7.07639278574645,0 +-41.47343786020988,-7.076246031216519,0 +-41.47187943473739,-7.076089919286979,0 +-41.47089780191752,-7.076006467908483,0 +-41.47014707062146,-7.075929122327809,0 +-41.46916315666097,-7.075902948564544,0 +-41.46834796713811,-7.075996012023881,0 +-41.46700384952246,-7.076247405424168,0 +-41.46606698183155,-7.076452447790373,0 +-41.4653579669865,-7.076836146231948,0 +-41.46494343172592,-7.077284796597238,0 +-41.46430065152492,-7.077612254420116,0 +-41.46289624284613,-7.078378545847547,0 +-41.46142426711387,-7.079144468557964,0 +-41.46007145050511,-7.079855933262198,0 +-41.45925302621497,-7.08012166477719,0 +-41.45679522235917,-7.081033619119718,0 +-41.45632688174869,-7.081193779038461,0 +-41.45568953353654,-7.081177052654484,0 +-41.45505216452538,-7.08116032011184,0 +-41.45423775845966,-7.081253899261762,0 +-41.45336968203796,-7.081287966192902,0 +-41.45250928662001,-7.081149202552323,0 +-41.44941524031941,-7.079628348314605,0 +-41.4487793375874,-7.079611295919976,0 +-41.44751392318657,-7.079347651689413,0 +-41.44693909293803,-7.079217394147883,0 +-41.4455001659612,-7.07894936036954,0 +-41.44435517034259,-7.078516881737412,0 +-41.44384117691025,-7.078273539893847,0 +-41.44292303146782,-7.078019350451594,0 +-41.4419444533061,-7.077878321612371,0 +-41.4402703542671,-7.077833457666233,0 +-41.43905250714103,-7.077916060602049,0 +-41.43800402807835,-7.078175250146798,0 +-41.43724758712867,-7.078327413700368,0 +-41.43637533908301,-7.078476534294489,0 +-41.43620034454432,-7.078529292592282,0 +-41.43477223584752,-7.078949844444502,0 +-41.43348679120114,-7.079432150409612,0 +-41.43139300322563,-7.079718456859055,0 +-41.4288960731848,-7.080110091103506,0 +-41.42750006276445,-7.080416023585349,0 +-41.4268616076834,-7.080513300800311,0 +-41.42587524466344,-7.080658407793551,0 +-41.42529479830424,-7.080757320067271,0 +-41.42442578569659,-7.080848293646981,0 +-41.42239605559466,-7.081190263364773,0 +-41.4206039411313,-7.081368099246397,0 +-41.41857870525217,-7.081766380518154,0 +-41.41672723050222,-7.082337477047497,0 +-41.41545403813059,-7.082644892521819,0 +-41.41435906768378,-7.08295243031648,0 +-41.41343725563159,-7.083320483287348,0 +-41.41239755386272,-7.083855683411264,0 +-41.41129983894553,-7.084167069252599,0 +-41.41002578794137,-7.084588637508779,0 +-41.4084052578831,-7.085058465467903,0 +-41.40650125333243,-7.085574578398075,0 +-41.40512683122952,-7.086096809466909,0 +-41.40391243310802,-7.086686833104876,0 +-41.40339413458737,-7.086842556348693,0 +-41.40195071236205,-7.087370609903634,0 +-41.40112714121621,-7.08780919441574,0 +-41.39752202413501,-7.08938461071463,0 +-41.39428855343099,-7.090420777563629,0 +-41.39203280682094,-7.091343444433291,0 +-41.3899003214207,-7.09213626694855,0 +-41.38865598728047,-7.092347743839122,0 +-41.38727970700737,-7.092794566486637,0 +-41.38528726043914,-7.093230120873092,0 +-41.38193550520918,-7.093622862082246,0 +-41.37882935305175,-7.094150855206816,0 +-41.37758664186547,-7.094363968754893,0 +-41.37622343773747,-7.094451511518328,0 +-41.3712752856385,-7.094793500658588,0 +-41.36879603903968,-7.09521151107531,0 +-41.36445150788204,-7.096427332211023,0 +-41.36136012274443,-7.0970654497452,0 +-41.35926281671026,-7.097367707830582,0 +-41.35617951413268,-7.097287021868732,0 +-41.3537146910942,-7.097459980410998,0 +-41.34988179632543,-7.098445500299794,0 +-41.3490197103083,-7.098422359930862,0 +-41.3460724794929,-7.098337348309306,0 +-41.34433242055914,-7.098181283095454,0 +-41.34183428414407,-7.098135449938447,0 +-41.33973598882118,-7.098562339536119,0 +-41.33864662768696,-7.098882601343869,0 +-41.33707931698786,-7.099182049275461,0 +-41.3335577666009,-7.100264530065478,0 +-41.33063547106573,-7.100532650951027,0 +-41.32929515372967,-7.100491347248648,0 +-41.32574455380387,-7.100750148903352,0 +-41.32279967275282,-7.100672465599486,0 +-41.3161627857946,-7.101174676863979,0 +-41.31282709562538,-7.102174602971703,0 +-41.31061645616787,-7.1024694045187,0 +-41.30777412555387,-7.103137248093319,0 +-41.30593744590103,-7.103086660943775,0 +-41.30435237115998,-7.103030964626876,0 +-41.30214037212176,-7.10321724086867,0 +-41.29968202557447,-7.103398494163502,0 +-41.29708467880068,-7.103714132647267,0 +-41.29437214264725,-7.104249722622955,0 +-41.29218008255638,-7.104293595083215,0 +-41.29058891415562,-7.10436792515694,0 +-41.28800253478067,-7.105022946957721,0 +-41.28556253775938,-7.105067682645554,0 +-41.28410889543092,-7.10489650368599,0 +-41.28095442935394,-7.104789526201802,0 +-41.27911206523651,-7.105102876656614,0 +-41.27690403067371,-7.10593748661352,0 +-41.27357562287146,-7.106817264929781,0 +-41.27012711241528,-7.107574251267208,0 +-41.26817038469168,-7.107521982927288,0 +-41.26534821129212,-7.107810946813151,0 +-41.26153683111299,-7.108681788348814,0 +-41.25933455689571,-7.108866330880175,0 +-41.25677104045415,-7.108919767383394,0 +-41.25469960835999,-7.108864844443279,0 +-41.25299465998327,-7.108819650431045,0 +-41.2512893984557,-7.10877428318557,0 +-41.24982795568297,-7.108735352975137,0 +-41.24848866205863,-7.108699671132253,0 +-41.24702532684067,-7.108781939952234,0 +-41.24447024493376,-7.108713819972895,0 +-41.24324878177268,-7.108923661522585,0 +-41.24153747851026,-7.109241374600532,0 +-41.24018857901103,-7.109689766104714,0 +-41.23675015639697,-7.111171368090978,0 +-41.23552535279493,-7.111501392191403,0 +-41.23382164970895,-7.11145539004069,0 +-41.23284819026096,-7.111429102295752,0 +-41.2282045822047,-7.110940795596895,0 +-41.22611901247314,-7.111368345456648,0 +-41.22428124961543,-7.111681507906783,0 +-41.22048178984497,-7.112425095853473,0 +-41.21656600473618,-7.113043901294353,0 +-41.21388269089501,-7.113212565127585,0 +-41.21108547650391,-7.113136458665251,0 +-41.20853146654581,-7.113067188730821,0 +-41.20693889354347,-7.113506780280131,0 +-41.20510720164081,-7.113818923986254,0 +-41.20277311994763,-7.114720988865634,0 +-41.20043968638362,-7.115502952648894,0 +-41.19873762796746,-7.115456857908971,0 +-41.19666800967101,-7.115521411341842,0 +-41.19435954129347,-7.115458575611155,0 +-41.19278468645523,-7.115294779039021,0 +-41.18950793585775,-7.115205101084804,0 +-41.18743273371641,-7.115510761936973,0 +-41.18463010441142,-7.115796404148363,0 +-41.18352644220813,-7.116128494405297,0 +-41.18060566390907,-7.116170095018234,0 +-41.17766165241177,-7.116695356757995,0 +-41.17729459057868,-7.116685780551374,0 +-41.17121037145048,-7.117365950197202,0 +-41.16913720506207,-7.117551295018393,0 +-41.16707070571979,-7.117495724415559,0 +-41.16377473242338,-7.117889113962413,0 +-41.15975251643177,-7.118142256840716,0 +-41.1571822149125,-7.118559908552834,0 +-41.15337561754104,-7.119548633469905,0 +-41.14800997516203,-7.12024034120759,0 +-41.14362993277082,-7.120598123799026,0 +-41.13887165419571,-7.121072734270267,0 +-41.13435471162731,-7.121673787361732,0 +-41.13094673019513,-7.121940988302364,0 +-41.12862702251073,-7.122478938077977,0 +-41.12558438767176,-7.12275619770149,0 +-41.12412825453774,-7.122715900677846,0 +-41.12180810679688,-7.123134737813562,0 +-41.12046534710996,-7.123339334203084,0 +-41.11912636918359,-7.12342324826261,0 +-41.11704821404098,-7.123849004255227,0 +-41.11264470897265,-7.124455850540198,0 +-41.11191976088882,-7.124434834758782,0 +-41.10312426328555,-7.125028276746996,0 +-41.09921644163177,-7.125759195580839,0 +-41.0977536451958,-7.125958708051066,0 +-41.09593037117076,-7.126027911642021,0 +-41.09178683276426,-7.126518994615555,0 +-41.08824996393165,-7.127025901585134,0 +-41.08410737161328,-7.127514540566168,0 +-41.07972983559203,-7.127989711796856,0 +-41.07545383891645,-7.128603482149999,0 +-41.06983442663282,-7.128829338445189,0 +-41.06715158225758,-7.128762524139021,0 +-41.06448388832759,-7.128805077708283,0 +-41.05851227672176,-7.129246020296931,0 +-41.05643515970095,-7.129670913443983,0 +-41.05278150479293,-7.130408398799975,0 +-41.05095564152671,-7.130717392587935,0 +-41.04950080901413,-7.130795489911104,0 +-41.04791745201568,-7.131111474498866,0 +-41.04128539948776,-7.131926720410952,0 +-41.03994550590305,-7.13213034373005,0 +-41.03860158678206,-7.132454582484711,0 +-41.03738181000107,-7.132661906511704,0 +-41.03505573272952,-7.13332117808628,0 +-41.02934819229775,-7.133522216557737,0 +-41.02362556377678,-7.134084524366968,0 +-41.01802677696111,-7.134290074756019,0 +-41.0111672163432,-7.136038407663661,0 +-41.00224326666962,-7.138327729031562,0 +-40.99855935202118,-7.139430463097174,0 +-40.99525288024062,-7.139942084853719,0 +-40.9916253269776,-7.140083479518089,0 +-40.98763641390892,-7.140334782138701,0 +-40.98449026391048,-7.140248049371509,0 +-40.98111016782077,-7.140154766610373,0 +-40.9782176135217,-7.140074899286546,0 +-40.9748276992723,-7.140221846746255,0 +-40.97082522022499,-7.140592254072485,0 +-40.96839985743465,-7.140405302992522,0 +-40.96694270719839,-7.140365183002903,0 +-40.96486560082171,-7.140909163099717,0 +-40.96254248353329,-7.141206268388934,0 +-40.95975620381986,-7.141370302282995,0 +-40.95794383051899,-7.141200480407805,0 +-40.95576400474554,-7.141141059413169,0 +-40.95321216388032,-7.141312500701019,0 +-40.95076847347769,-7.14184964389769,0 +-40.94819648665706,-7.142504211330618,0 +-40.94611570361382,-7.142930777231017,0 +-40.94378922149738,-7.143470258945204,0 +-40.9401146498895,-7.14433491050332,0 +-40.93754315025537,-7.144868210647597,0 +-40.93435638912615,-7.145506649961932,0 +-40.93129115146128,-7.145789436228546,0 +-40.92860426530746,-7.145718152239344,0 +-40.92641900824913,-7.145655945448932,0 +-40.92460202085833,-7.145603337073541,0 +-40.92299795195364,-7.146524125589551,0 +-40.92116550788132,-7.146835091704554,0 +-40.92018376781606,-7.147169835361267,0 +-40.91943217051565,-7.14473329071177,0 +-40.91724787928564,-7.144430679534604,0 +-40.91639957840355,-7.144286285926538,0 +-40.91446014131554,-7.143746873238198,0 +-40.91242115551771,-7.143213008602951,0 +-40.91157945336439,-7.142827133875285,0 +-40.90940005316276,-7.142160109494931,0 +-40.90711136440139,-7.141250584133642,0 +-40.90445044833995,-7.140571708896837,0 +-40.90178779948701,-7.140136729247549,0 +-40.90045459348828,-7.139980255630734,0 +-40.89912684994396,-7.1395821774408,0 +-40.89707095287775,-7.139041976702087,0 +-40.89525896625082,-7.138507998922269,0 +-40.8938063121354,-7.138225728125684,0 +-40.89103336631799,-7.137664840358711,0 +-40.88799697182673,-7.137459964648675,0 +-40.88654842512634,-7.137178374613573,0 +-40.88487166247571,-7.136528965300757,0 +-40.88270120987428,-7.135865603977171,0 +-40.87372113336367,-7.134165376027942,0 +-40.87006833994415,-7.133093742778066,0 +-40.86910045835658,-7.132703591611048,0 +-40.86548237556732,-7.131879543231276,0 +-40.85840031567407,-7.129997050068641,0 +-40.84511377043767,-7.126594706756208,0 +-40.8430573965079,-7.12605248235893,0 +-40.8404152961684,-7.124646551966818,0 +-40.83716209159176,-7.123221063214695,0 +-40.83522354180747,-7.122552270667446,0 +-40.83377563301361,-7.122029776647517,0 +-40.832424545428,-7.122105126399515,0 +-40.83024560537748,-7.121313491541452,0 +-40.82952903832205,-7.120685944458709,0 +-40.82685923592257,-7.119879083115518,0 +-40.8256361698738,-7.119842950961393,0 +-40.82393125611772,-7.119798850150767,0 +-40.82246886454966,-7.119883539419386,0 +-40.82063476676944,-7.119953413100286,0 +-40.81977890087824,-7.11992846786693,0 +-40.81551757681783,-7.119938036308991,0 +-40.80586237003385,-7.11932130709912,0 +-40.80003290450992,-7.118559641909964,0 +-40.7979773572413,-7.118021074434661,0 +-40.79483188938346,-7.117208169815396,0 +-40.79303043617691,-7.116564271138667,0 +-40.79122733344795,-7.116041281350086,0 +-40.78918822696822,-7.115393281232979,0 +-40.78798614419235,-7.115125243607248,0 +-40.78665710384439,-7.115095529218475,0 +-40.78435501790906,-7.114665092849647,0 +-40.78253610628532,-7.114246369128839,0 +-40.78034880769832,-7.113814979082127,0 +-40.7777919313701,-7.113124080258239,0 +-40.77586128954601,-7.112218421127364,0 +-40.77283775545256,-7.111037684906525,0 +-40.77114345762421,-7.11038091156913,0 +-40.77089864759427,-7.110373191785055,0 +-40.76070683183421,-7.107419421413896,0 +-40.75766462986629,-7.10721621677029,0 +-40.75706205365007,-7.106960089497495,0 +-40.75573209212672,-7.106565327031762,0 +-40.75378739503724,-7.106391527632186,0 +-40.75221167147775,-7.106102963793346,0 +-40.75027035669711,-7.105803974784746,0 +-40.74833196948113,-7.105383029367696,0 +-40.74652404684541,-7.104457269630888,0 +-40.74471944370971,-7.103557795816503,0 +-40.74292209730589,-7.102684282452896,0 +-40.74027267264918,-7.101910442707936,0 +-40.73809335890149,-7.101746443435778,0 +-40.73566702835602,-7.101690603973898,0 +-40.73347997634163,-7.101758362636528,0 +-40.73129798878686,-7.101706154518807,0 +-40.72763303372364,-7.101453021351278,0 +-40.72629405975763,-7.1014141674875,0 +-40.72447682620036,-7.10137141016728,0 +-40.72227365593218,-7.101418918260294,0 +-40.71744863019422,-7.102946868858763,0 +-40.71587025233589,-7.103153666726796,0 +-40.71393540219758,-7.103479514874737,0 +-40.70525868941462,-7.104951897435697,0 +-40.7032031539059,-7.104537307433559,0 +-40.70078700761771,-7.103989024186097,0 +-40.69945552340282,-7.103839233126283,0 +-40.69765040520781,-7.103318173133157,0 +-40.69608558340504,-7.102923018499193,0 +-40.69403419631632,-7.102637685974613,0 +-40.69233057787566,-7.102706102489569,0 +-40.69073326435162,-7.103385413928171,0 +-40.68877951305613,-7.103434919378999,0 +-40.68744800446159,-7.103529766890327,0 +-40.68527651561312,-7.103612049926752,0 +-40.68226813816173,-7.103181468934642,0 +-40.68068118759682,-7.102874207514096,0 +-40.67825623078765,-7.102557946172074,0 +-40.67705973601328,-7.101796949672077,0 +-40.67440273282291,-7.101114351835576,0 +-40.67282186319613,-7.101066494489675,0 +-40.67158380670748,-7.101009353077307,0 +-40.66812592825909,-7.100336400017223,0 +-40.66533564509773,-7.099895527880168,0 +-40.66413834926418,-7.099499941196419,0 +-40.66099716379345,-7.099290649781572,0 +-40.65892802791261,-7.098990817987309,0 +-40.65674413927232,-7.098687864037832,0 +-40.65493884578301,-7.098154152456198,0 +-40.65360357598565,-7.09811635221598,0 +-40.65179675594892,-7.097702805127168,0 +-40.65023670255825,-7.097174974547366,0 +-40.64842631645345,-7.096640721409212,0 +-40.64685185254014,-7.096235025353943,0 +-40.64492153574507,-7.095697252176099,0 +-40.64216059971981,-7.094411411007443,0 +-40.63879111180545,-7.093108658987093,0 +-40.63721087069717,-7.093065281318678,0 +-40.63600277473074,-7.092790778974681,0 +-40.63467209325594,-7.092510277389116,0 +-40.6311674381308,-7.091686301730474,0 +-40.62706796050528,-7.090362144263327,0 +-40.62513649231664,-7.089824350238032,0 +-40.62380603548872,-7.089545124236659,0 +-40.62259037148852,-7.089510727947531,0 +-40.62113833468801,-7.089228053283531,0 +-40.61932401735014,-7.088936283864653,0 +-40.61738719051348,-7.088640453045998,0 +-40.61483776073919,-7.088325198965985,0 +-40.61301978230872,-7.088153740722499,0 +-40.61207363062755,-7.088654923459598,0 +-40.61168412208657,-7.088834033598771,0 +-40.61106516933214,-7.088968166165811,0 +-40.61025162003322,-7.089171916860947,0 +-40.60940635846611,-7.089184441434885,0 +-40.60867704598277,-7.089200417636876,0 +-40.60802284321274,-7.089294534999036,0 +-40.60725136034029,-7.089499314450501,0 +-40.60609886304762,-7.089657296627184,0 +-40.60436848722897,-7.08998642582506,0 +-40.60260528089709,-7.090273994305198,0 +-40.60176092806731,-7.090438843335329,0 +-40.6009573540984,-7.090342888191472,0 +-40.60019261982442,-7.090172269000217,0 +-40.59931108268213,-7.089886011585888,0 +-40.59834993096219,-7.089559409362794,0 +-40.59786071059015,-7.089316280178052,0 +-40.59710914237587,-7.088913324555536,0 +-40.59624073835467,-7.088545684096212,0 +-40.59590270532244,-7.08834569561406,0 +-40.59240243117084,-7.08685076274873,0 +-40.59080724511875,-7.086335343963325,0 +-40.58883265598509,-7.085997234501439,0 +-40.58818547851491,-7.085414866873298,0 +-40.58734767695127,-7.084921111123965,0 +-40.58622320087919,-7.08460739091086,0 +-40.58528940010508,-7.084205073601774,0 +-40.58425961838136,-7.083894156971366,0 +-40.58322358756126,-7.083865136614703,0 +-40.58181141735966,-7.083731383026579,0 +-40.57889690628632,-7.083837996563055,0 +-40.57805389271701,-7.083814540239119,0 +-40.57590150742577,-7.08375464728734,0 +-40.57396452366501,-7.083702282011591,0 +-40.57314038808675,-7.083680257837137,0 +-40.57213821323314,-7.083653696839947,0 +-40.57142210910598,-7.083635363888089,0 +-40.56978652643357,-7.083122034218246,0 +-40.56828806514155,-7.082892167060929,0 +-40.56685956592461,-7.083415372432704,0 +-40.5662821164414,-7.083867551561359,0 +-40.56487274483098,-7.084016628176298,0 +-40.5628195787065,-7.083960328911858,0 +-40.56142577624565,-7.083735755375916,0 +-40.55992225219254,-7.083596689881725,0 +-40.55862517789651,-7.083749320090067,0 +-40.55722446115254,-7.083988489659549,0 +-40.55609403805196,-7.084512248294244,0 +-40.55478251142551,-7.084845256730022,0 +-40.55235925333399,-7.084961335891983,0 +-40.55003005411381,-7.085079963046151,0 +-40.54890652849579,-7.085417730930214,0 +-40.5474076979277,-7.085837081048579,0 +-40.54549807880041,-7.086893454640807,0 +-40.54435948603777,-7.087232171150273,0 +-40.54266071360458,-7.08755523783476,0 +-40.54016404845553,-7.088034876242129,0 +-40.53923780955792,-7.088284124928042,0 +-40.53821177794791,-7.088347261549721,0 +-40.5367208036408,-7.08830502839772,0 +-40.5356856091807,-7.088369049499376,0 +-40.53444646530912,-7.088705940992937,0 +-40.53332657723144,-7.088674273295587,0 +-40.53222024181034,-7.088641313227995,0 +-40.53015923932825,-7.088583982522445,0 +-40.52904760302393,-7.088367166730384,0 +-40.52688065666594,-7.088117072673628,0 +-40.52538615941445,-7.08816528364421,0 +-40.52296360357445,-7.088187474860161,0 +-40.52137976784717,-7.088234446091195,0 +-40.52007776036321,-7.088197165812836,0 +-40.5186801508269,-7.088249450153025,0 +-40.51718703198437,-7.088391229424,0 +-40.51560653368763,-7.088345729184381,0 +-40.51310209310481,-7.08808906685466,0 +-40.51105762048123,-7.088030211230037,0 +-40.50948275503782,-7.087800547160133,0 +-40.50707093516576,-7.08745563472662,0 +-40.50388870136794,-7.088011743789096,0 +-40.50164963958039,-7.088316191149493,0 +-40.50035192679437,-7.088278066164295,0 +-40.49915087889482,-7.088150283382357,0 +-40.497675032317,-7.087738813686212,0 +-40.4966576640489,-7.087525213340909,0 +-40.49583088352002,-7.087132550735241,0 +-40.49408211661373,-7.086436618435145,0 +-40.49242246182158,-7.085835542161047,0 +-40.4913151786377,-7.085434784384441,0 +-40.49038967693033,-7.085223731067171,0 +-40.48638729839794,-7.084462942961524,0 +-40.485459829988,-7.084343913835847,0 +-40.48415774031595,-7.084306169387325,0 +-40.48222782115225,-7.083512458695598,0 +-40.48084008540759,-7.083288128483174,0 +-40.47945772762051,-7.082879571870734,0 +-40.4779830306009,-7.082468430135141,0 +-40.47686944277456,-7.0824365980771,0 +-40.46986734726407,-7.080391787080194,0 +-40.46884788584394,-7.080270203027597,0 +-40.46513296805264,-7.080070977105696,0 +-40.46198895524997,-7.079519657814736,0 +-40.45876796141101,-7.078690622594779,0 +-40.45710250300745,-7.078365851833662,0 +-40.4561780864442,-7.078154692026524,0 +-40.45506172720603,-7.0781223338478,0 +-40.45384985974604,-7.078179502144038,0 +-40.45122590731426,-7.078681220203963,0 +-40.43791563812959,-7.079625026171524,0 +-40.4339954380003,-7.079927788534163,0 +-40.43097599498077,-7.080172118848821,0 +-40.42297523812957,-7.081184896219276,0 +-40.41616293994498,-7.07966059075674,0 +-40.41208603890838,-7.078879870443994,0 +-40.40992096257496,-7.078569105034197,0 +-40.40784508075568,-7.078094976526403,0 +-40.40520003781457,-7.077107031113385,0 +-40.40428600294614,-7.076999056937547,0 +-40.40370249875123,-7.076982728305783,0 +-40.40152303745076,-7.077167869082246,0 +-40.39901527471692,-7.077178334047956,0 +-40.39609754598586,-7.076844773928517,0 +-40.39492461480762,-7.076893592947394,0 +-40.3935823343817,-7.077020565908626,0 +-40.39107190824166,-7.077030748857282,0 +-40.39031489304728,-7.077008049776735,0 +-40.38739034741656,-7.077717283616585,0 +-40.38707852899147,-7.077708420899259,0 +-40.38582946489961,-7.07776079466975,0 +-40.38534076519271,-7.077745269776674,0 +-40.38480564807572,-7.077772672293321,0 +-40.38355640551203,-7.077780489391076,0 +-40.38194522757649,-7.077909418449876,0 +-40.38064713570378,-7.077959256022178,0 +-40.37943711735478,-7.07805691049485,0 +-40.37836349682642,-7.078114822840003,0 +-40.37760340405634,-7.078137277063144,0 +-40.37693386750826,-7.078117986865231,0 +-40.37644288613905,-7.078103839589771,0 +-40.37569033500571,-7.077860391075431,0 +-40.3752078793834,-7.077535954133379,0 +-40.37472318830553,-7.07721072968994,0 +-40.37459340475518,-7.077074013288327,0 +-40.37425651157563,-7.076339095170903,0 +-40.37372755302184,-7.076099757591876,0 +-40.37258948142869,-7.075352701751242,0 +-40.37163619594459,-7.074393180301376,0 +-40.37137631640044,-7.074119948328031,0 +-40.37089302258936,-7.073840693101375,0 +-40.37041366950341,-7.073428429114569,0 +-40.36980692696324,-7.072790846297909,0 +-40.36941548141907,-7.072425236673116,0 +-40.36888985519876,-7.072055854712579,0 +-40.36784928604905,-7.070962405673865,0 +-40.36736969544934,-7.070593779739765,0 +-40.36676779108105,-7.069999492949307,0 +-40.36620433588341,-7.069584280146318,0 +-40.36538996540607,-7.068764068500871,0 +-40.3643924386711,-7.06811666032453,0 +-40.3640016726572,-7.067884683978499,0 +-40.36357089974205,-7.067563517998799,0 +-40.36318536907884,-7.067243977724053,0 +-40.36266615540311,-7.066876426241149,0 +-40.36219316433159,-7.06646634187833,0 +-40.36145639512831,-7.066004987952637,0 +-40.36093984618395,-7.065594203799237,0 +-40.36077102457046,-7.065369439544105,0 +-40.35833283687543,-7.063543996817507,0 +-40.35711238494927,-7.062857444168221,0 +-40.35585683673742,-7.061997152590403,0 +-40.35455223366546,-7.061444435381579,0 +-40.35337735802055,-7.060931450630745,0 +-40.35250824032296,-7.060559446732903,0 +-40.35142615626658,-7.059962960008649,0 +-40.35068618439289,-7.059453370772557,0 +-40.35016058082072,-7.059124594815108,0 +-40.34943236198786,-7.058721153915936,0 +-40.34887849419534,-7.05845527515472,0 +-40.34807450566438,-7.057970808542783,0 +-40.34726941203498,-7.05752859877181,0 +-40.346405839387,-7.057113499761648,0 +-40.34528551434481,-7.056517757196594,0 +-40.34493944146236,-7.056377816202174,0 +-40.34112255101814,-7.054525198376152,0 +-40.34069357992432,-7.054208357668218,0 +-40.33917723586153,-7.05355364198831,0 +-40.33870291296121,-7.053278754303384,0 +-40.33810566234943,-7.052740155469353,0 +-40.33768165291857,-7.052294224093396,0 +-40.33677816999419,-7.051791835775146,0 +-40.33587273228446,-7.05124241841333,0 +-40.33504619163615,-7.051000142691104,0 +-40.33456888928777,-7.050811724979271,0 +-40.33383182706189,-7.050573773089872,0 +-40.33335776700822,-7.050343576904919,0 +-40.33283803462903,-7.050199505642483,0 +-40.33201251810915,-7.050091323364027,0 +-40.33149331610785,-7.049947375603033,0 +-40.33071661308067,-7.04962197639216,0 +-40.33011009722701,-7.04929821575698,0 +-40.32971857928938,-7.049155464946893,0 +-40.32856166153651,-7.048640657853285,0 +-40.328127642861,-7.04849652171821,0 +-40.32739193833032,-7.048168411052972,0 +-40.32678608223622,-7.047887798169902,0 +-40.32579060934971,-7.047421131066272,0 +-40.32553135519725,-7.047282406094678,0 +-40.32505012665189,-7.047223486837314,0 +-40.32365042539271,-7.046818727810175,0 +-40.32318048321933,-7.046276835668542,0 +-40.32279195325612,-7.045955761121891,0 +-40.32244868661081,-7.045592751302158,0 +-40.32197896938232,-7.045006108139001,0 +-40.32163383729007,-7.044686059522087,0 +-40.32120468202226,-7.04418693082698,0 +-40.32100735172548,-7.043443173762922,0 +-40.32061796914439,-7.043127566843995,0 +-40.320011508181,-7.042717717443635,0 +-40.31940786319315,-7.042090647571306,0 +-40.31890405954637,-7.041244916480434,0 +-40.31861346381797,-7.040667620267707,0 +-40.31811940606363,-7.039646513722954,0 +-40.31794722563584,-7.039510366238499,0 +-40.31760716964103,-7.039150539994039,0 +-40.31718108610666,-7.03883169749219,0 +-40.31679812650668,-7.038558023178009,0 +-40.3160392033479,-7.037880553917187,0 +-40.31583642114732,-7.037525623077373,0 +-40.31537952824037,-7.036989452511435,0 +-40.3148342467857,-7.036320456951673,0 +-40.3146871623188,-7.035532818790008,0 +-40.31470233080463,-7.035054451639313,0 +-40.31472163296324,-7.034445723341721,0 +-40.31473817250455,-7.033924046854891,0 +-40.31475608946172,-7.033358992266483,0 +-40.3147259067642,-7.032923082428426,0 +-40.31474382367884,-7.032358197725401,0 +-40.31470537663276,-7.032183078922309,0 +-40.31468332186714,-7.031189005222571,0 +-40.31448672364399,-7.030358574759165,0 +-40.31441086729591,-7.029921932675917,0 +-40.31442271504345,-7.02948755638195,0 +-40.31453066048359,-7.028751086969605,0 +-40.31458288771932,-7.028447858653435,0 +-40.31459479347337,-7.028012664179154,0 +-40.31460670919052,-7.027577227641722,0 +-40.31458422296777,-7.02679155499531,0 +-40.31455813935199,-7.026136004429179,0 +-40.31453385052016,-7.025480523311739,0 +-40.31445140299939,-7.025303624853337,0 +-40.31442858230669,-7.024649218721013,0 +-40.31423260008359,-7.023903171519099,0 +-40.31411339212838,-7.023508022292535,0 +-40.31374606059731,-7.022627370514799,0 +-40.31324858765034,-7.021699978077447,0 +-40.3127573599366,-7.020555195246934,0 +-40.31263360585881,-7.020290434635396,0 +-40.31212854152887,-7.019534568698844,0 +-40.31196635719971,-7.019094845739781,0 +-40.31187984447924,-7.019048639729528,0 +-40.31078505785875,-7.017423753886442,0 +-40.31009020327563,-7.01647015089745,0 +-40.30966937847381,-7.016027007033377,0 +-40.30848896279044,-7.014338383884859,0 +-40.30813746967875,-7.013966689636111,0 +-40.30685931666702,-7.013063433687337,0 +-40.30587003927707,-7.012245407018057,0 +-40.30508233756365,-7.011934684567469,0 +-40.30393920835562,-7.011398155777474,0 +-40.30313526054847,-7.011588470468447,0 +-40.30248386429378,-7.011569633984026,0 +-40.30132103449581,-7.011679240556874,0 +-40.30023297411048,-7.011719458216871,0 +-40.29936819403076,-7.011697370487312,0 +-40.29822299239857,-7.011526272526559,0 +-40.2974269978399,-7.011429516573956,0 +-40.29627611411327,-7.011180534765176,0 +-40.29481788383652,-7.010765790359915,0 +-40.29379334391868,-7.010437418318408,0 +-40.29284763669332,-7.010115454307384,0 +-40.29183525761125,-7.009428549084071,0 +-40.2913965184226,-7.00919414178266,0 +-40.29031001956577,-7.008283661384774,0 +-40.28966817983429,-7.007537374915919,0 +-40.2882094236949,-7.005636809271502,0 +-40.28742624582154,-7.005036097527227,0 +-40.28620876691074,-7.004351348267229,0 +-40.28521727664623,-7.003383049663016,0 +-40.28473504374159,-7.002428960486087,0 +-40.28431886385311,-7.001693209716055,0 +-40.28362424540911,-7.000514549167544,0 +-40.28285920008754,-6.999261836451247,0 +-40.28180251259589,-6.998149556992339,0 +-40.28095679066141,-6.997259348171309,0 +-40.27961797074947,-6.995924526478239,0 +-40.27934108426091,-6.99541000666498,0 +-40.27877764182878,-6.994742619584883,0 +-40.27731338134826,-6.992382511739533,0 +-40.27703130281963,-6.992085702901827,0 +-40.2763251712549,-6.991491800760393,0 +-40.27535688821678,-6.990250695290116,0 +-40.27372749829289,-6.988907468862508,0 +-40.2723766796513,-6.988005831799328,0 +-40.27137792333731,-6.98725184919215,0 +-40.26800896066521,-6.985516847757599,0 +-40.2660078248207,-6.984523585040256,0 +-40.26493194926628,-6.984133803955435,0 +-40.26298116351373,-6.983422400250703,0 +-40.26168762782674,-6.982804873459221,0 +-40.26017652216356,-6.982253735344829,0 +-40.25853680706677,-6.981268137792089,0 +-40.25732295632904,-6.98065691140991,0 +-40.25624914998407,-6.98019397966579,0 +-40.25503098282218,-6.979509929684848,0 +-40.25438251839462,-6.979129362894898,0 +-40.25307956743394,-6.97880188118706,0 +-40.25158617195797,-6.978257349682573,0 +-40.25037381095974,-6.978081595531425,0 +-40.24839484750473,-6.977311527086324,0 +-40.2474025027708,-6.97685377904681,0 +-40.24662239764204,-6.976545727463951,0 +-40.24569218122981,-6.976231710234185,0 +-40.24483316695207,-6.975919498037387,0 +-40.24332857570671,-6.975083337608293,0 +-40.24282249509724,-6.974923667348906,0 +-40.24073428274732,-6.973765129771521,0 +-40.2398337247534,-6.973378934221261,0 +-40.23830209584271,-6.972703712481196,0 +-40.23695907984855,-6.971851744924753,0 +-40.2359744336085,-6.971189993853494,0 +-40.23508337501963,-6.970158206137599,0 +-40.23427293999005,-6.969400194775508,0 +-40.23367745883738,-6.967832324826073,0 +-40.23322690365862,-6.967452669103148,0 +-40.23253562163612,-6.966065339165262,0 +-40.23183117045866,-6.965226783306127,0 +-40.23104794110134,-6.963835271132955,0 +-40.230525335818,-6.962906875383005,0 +-40.23026129910914,-6.962533884600374,0 +-40.22964926833916,-6.9615107232455,0 +-40.22770747879606,-6.958800335435668,0 +-40.22687039617561,-6.955723544080615,0 +-40.22599057017309,-6.954224844650202,0 +-40.22528394679487,-6.95319677771237,0 +-40.22467298759626,-6.952084501098462,0 +-40.22369939820378,-6.950780346135402,0 +-40.22253290046186,-6.949737985985384,0 +-40.22163825026084,-6.9488829941109,0 +-40.22073959465083,-6.948212338002836,0 +-40.21993565980197,-6.947456746785296,0 +-40.21885413859226,-6.946784975603761,0 +-40.21751920304623,-6.945377345284982,0 +-40.21608273268986,-6.944331802143797,0 +-40.21500908783268,-6.943389071038212,0 +-40.21456411034064,-6.94292037695272,0 +-40.21301274659784,-6.939326505789034,0 +-40.21163316289226,-6.936277389142404,0 +-40.21156088091291,-6.935547056136033,0 +-40.21079889295034,-6.933336220108558,0 +-40.210018384664,-6.931128073774346,0 +-40.20949543954029,-6.930199218453392,0 +-40.20933300948663,-6.929646114892661,0 +-40.20910190921244,-6.928543895311501,0 +-40.20793419568223,-6.926823508709075,0 +-40.20677409282268,-6.925882430280588,0 +-40.20524099246708,-6.92520603335664,0 +-40.20335172921719,-6.924248930002811,0 +-40.20253839839866,-6.923956385276173,0 +-40.2009012965557,-6.923362106961445,0 +-40.19926276819562,-6.922766613733145,0 +-40.19744402974614,-6.922076005378258,0 +-40.19444606452008,-6.920805019741287,0 +-40.1933493603903,-6.920596179634956,0 +-40.19162559886957,-6.919627108204822,0 +-40.19054215135033,-6.91885896539381,0 +-40.18946024346511,-6.918091905677892,0 +-40.1884712335309,-6.917330087568827,0 +-40.18747650385595,-6.916753144989387,0 +-40.18584730041942,-6.915793971618574,0 +-40.18439156289299,-6.91493340968568,0 +-40.18304194613644,-6.913705156780256,0 +-40.18168698012535,-6.912658650404683,0 +-40.1815971650165,-6.912564460357795,0 +-40.17885132606153,-6.910147160371938,0 +-40.1767908198149,-6.908447477971442,0 +-40.1746366286674,-6.906838638702713,0 +-40.17330193814644,-6.905431192153252,0 +-40.1723995054143,-6.904764705842684,0 +-40.17141858149282,-6.903541236592281,0 +-40.17034115068215,-6.902405938776359,0 +-40.16934093711603,-6.901732352788111,0 +-40.16788155333136,-6.900860642955517,0 +-40.16678122623927,-6.900367549591675,0 +-40.16531414250563,-6.899678319669199,0 +-40.1641165266649,-6.899275567021225,0 +-40.16329322436144,-6.898698215649524,0 +-40.16294466566851,-6.897854984498414,0 +-40.16256193215973,-6.896664748002593,0 +-40.16220672500487,-6.89629502009025,0 +-40.16176959319225,-6.895896034027055,0 +-40.1614764183307,-6.895418371035176,0 +-40.16132328164345,-6.89494458772019,0 +-40.16094103909214,-6.894631869884812,0 +-40.16063648312203,-6.894542185485567,0 +-40.16027724192789,-6.894450671130779,0 +-40.15999767537927,-6.894498929736148,0 +-40.15963106781356,-6.894682672839129,0 +-40.15928607091462,-6.895087002001677,0 +-40.15914439986619,-6.895193353078436,0 +-40.15869240673153,-6.895511452333524,0 +-40.15833072217199,-6.895611865714184,0 +-40.15782816475834,-6.89584494562101,0 +-40.15713515192314,-6.896044507213562,0 +-40.1569413489887,-6.89609363452324,0 +-40.15649808798577,-6.896217475737509,0 +-40.1563324326956,-6.896239958107584,0 +-40.15589021714938,-6.896308950807017,0 +-40.15486995049991,-6.89622379354657,0 +-40.15452019900561,-6.895940030856473,0 +-40.15438804360117,-6.895717126137081,0 +-40.15409366538323,-6.895435019707824,0 +-40.15396035369072,-6.895266825339139,0 +-40.15264019586976,-6.894286013032045,0 +-40.15117246432018,-6.893204117026404,0 +-40.14961284015885,-6.89249189670751,0 +-40.14764939779499,-6.891244666334243,0 +-40.14662551387908,-6.890619114916616,0 +-40.14596846828184,-6.890153030322359,0 +-40.14421030444973,-6.888839347014268,0 +-40.14302345187642,-6.888292305799837,0 +-40.14170634291813,-6.887433061055485,0 +-40.14076261945262,-6.886577216946259,0 +-40.13804829468998,-6.88462994674675,0 +-40.13673172661937,-6.883720118849756,0 +-40.13563402072202,-6.883029897824013,0 +-40.13460446552777,-6.882401149406649,0 +-40.13342478401268,-6.881768014501606,0 +-40.13245572329827,-6.881587320438656,0 +-40.13185754477666,-6.881491516981762,0 +-40.13096022538821,-6.881309963189593,0 +-40.12970500323254,-6.880831430281759,0 +-40.12860670972776,-6.88036573947819,0 +-40.12749947696808,-6.879964700465449,0 +-40.12602079984441,-6.879324900604328,0 +-40.12543204881909,-6.879010733654994,0 +-40.12396994130307,-6.878387768601028,0 +-40.12302311749654,-6.878000673678761,0 +-40.12258685560774,-6.877769667941756,0 +-40.12133976777077,-6.876990706612696,0 +-40.12119154330686,-6.876987158184265,0 +-40.12037820312264,-6.876437005837842,0 +-40.11663144952602,-6.872654014394381,0 +-40.11598436937911,-6.871893006077242,0 +-40.11459688869915,-6.870811886876415,0 +-40.1137894953167,-6.87026791510977,0 +-40.11283973717341,-6.869496141295733,0 +-40.11130613998426,-6.868185979445723,0 +-40.10998944191076,-6.867024490534818,0 +-40.10875172611782,-6.865798414675209,0 +-40.1075873699743,-6.864571181359431,0 +-40.10693210510183,-6.863880497022195,0 +-40.10576699781991,-6.862652527503307,0 +-40.10474825892407,-6.861579245757321,0 +-40.10351195910841,-6.860199456685714,0 +-40.10263358490877,-6.859504886686771,0 +-40.10123910196087,-6.858573891212713,0 +-40.10006997376593,-6.857341326103729,0 +-40.09926876770067,-6.856728347003354,0 +-40.09897871176658,-6.856499888508541,0 +-40.09665750671167,-6.853913110535868,0 +-40.09533327300505,-6.853138071055756,0 +-40.09459989746885,-6.852675328767758,0 +-40.09408623856569,-6.852365282564589,0 +-40.09322298705376,-6.85130666559644,0 +-40.09249089678289,-6.850842909126845,0 +-40.09190956230711,-6.850228275207992,0 +-40.09103665594896,-6.849305365607986,0 +-40.09009265221221,-6.848387841911356,0 +-40.08935764824431,-6.847918708017978,0 +-40.08817323238488,-6.847357406929089,0 +-40.08706309292707,-6.846798735001422,0 +-40.08633968738083,-6.846037336334643,0 +-40.08575791334452,-6.845501240950203,0 +-40.08495604659074,-6.844809699907562,0 +-40.0846669489401,-6.84450539270884,0 +-40.08402061351428,-6.843548642134696,0 +-40.08307477914174,-6.842627436628693,0 +-40.08235200985444,-6.841710656179129,0 +-40.08214175248789,-6.841180603742928,0 +-40.08186625714009,-6.840272507460154,0 +-40.08152325848999,-6.83905993439615,0 +-40.0817009804224,-6.838007340767826,0 +-40.08166053240026,-6.836722629035448,0 +-40.08129004500828,-6.836485322227801,0 +-40.07996142157849,-6.835469381125467,0 +-40.07929851488954,-6.834925105248569,0 +-40.07834216485577,-6.834070782358809,0 +-40.07790066870994,-6.833603159093526,0 +-40.07673009931665,-6.832449097835046,0 +-40.07637613919928,-6.831769476881666,0 +-40.07579272346668,-6.831313540266328,0 +-40.07462084794106,-6.830312597392705,0 +-40.07396144786622,-6.829773338868915,0 +-40.07255590145625,-6.8291429084794,0 +-40.07150440120062,-6.829269250466293,0 +-40.07105937427078,-6.829263738196214,0 +-40.06973114402,-6.829098066292415,0 +-40.06921598231615,-6.829017067847801,0 +-40.06812014189009,-6.82855428737864,0 +-40.06701111122311,-6.828153041250465,0 +-40.06590665939947,-6.827756056744557,0 +-40.0653871002429,-6.827668546385054,0 +-40.06442655778837,-6.827422514428289,0 +-40.06264700480799,-6.827153693312054,0 +-40.06095473037435,-6.826061767276796,0 +-40.05968922542839,-6.825653955918934,0 +-40.05871725131639,-6.825551693666192,0 +-40.05685221411127,-6.825346631285727,0 +-40.05618309667842,-6.825177843633695,0 +-40.0546991919909,-6.824686905814752,0 +-40.05372484053198,-6.824655940764129,0 +-40.05283574612316,-6.824255643419798,0 +-40.05201062232485,-6.824230681685672,0 +-40.05171083812584,-6.824221930479944,0 +-40.05089634585111,-6.823977473607064,0 +-40.04949383253624,-6.82326659166073,0 +-40.04905620427909,-6.822881967563974,0 +-40.04788431946905,-6.821877664890308,0 +-40.04736641091804,-6.821486449146624,0 +-40.04647966436054,-6.820784014443974,0 +-40.0450773726786,-6.81976873094431,0 +-40.04368548683064,-6.818838086898825,0 +-40.04235705983088,-6.818205314730278,0 +-40.04129593611859,-6.817938057828274,0 +-40.04031539209095,-6.817677920210868,0 +-40.03957549466698,-6.817282876012293,0 +-40.03862258302902,-6.816356591239645,0 +-40.03781129783184,-6.815657182035208,0 +-40.03751045776622,-6.815571990906822,0 +-40.03698189021354,-6.815478713540736,0 +-40.03483981118723,-6.815347030654459,0 +-40.03340680541598,-6.815454671278052,0 +-40.03176437936347,-6.814957027982614,0 +-40.03064642465861,-6.814625854421764,0 +-40.02924101139124,-6.813990131895587,0 +-40.028715512352,-6.813975575991934,0 +-40.02728559026095,-6.814010289005627,0 +-40.02675142612213,-6.814142058171369,0 +-40.02591660884167,-6.814418894575708,0 +-40.02470725710991,-6.814532899763304,0 +-40.02322749277204,-6.813512688537154,0 +-40.02167383160931,-6.812569275857109,0 +-40.02025816509957,-6.812001637553373,0 +-40.01922040663341,-6.811447714329476,0 +-40.01796433427147,-6.810667559119152,0 +-40.01707826936958,-6.810043340938079,0 +-40.01649130215183,-6.809500699891577,0 +-40.01554904592886,-6.808272749272941,0 +-40.01526435853611,-6.807739758797846,0 +-40.01454140451073,-6.806745993493845,0 +-40.01329495538963,-6.805736799743335,0 +-40.01218762088179,-6.805106516999461,0 +-40.01090953121523,-6.804618690697485,0 +-40.00934309967131,-6.803972948068259,0 +-40.00607907591908,-6.80245569796295,0 +-40.00542679186938,-6.801689028017515,0 +-40.00470938679579,-6.800848721164864,0 +-40.00400127133512,-6.799937737270317,0 +-40.00372608785258,-6.799486818112358,0 +-40.00195256673013,-6.797660365860509,0 +-40.0006628905907,-6.795540134681016,0 +-40.00046026957591,-6.794795985045116,0 +-40.00017499372635,-6.794270862039251,0 +-39.99966510475623,-6.793666778524193,0 +-39.99871455065231,-6.792593727407309,0 +-39.99775987874336,-6.791595949778199,0 +-39.99717345634329,-6.790906492247113,0 +-39.99429145497533,-6.789176409092713,0 +-39.99382623200226,-6.78884805620365,0 +-39.99312002601502,-6.78800927477152,0 +-39.99267036699335,-6.78744736504253,0 +-39.99226716313988,-6.786529220168632,0 +-39.99199030894294,-6.785813212901642,0 +-39.99163881995081,-6.785091793223155,0 +-39.9911842293136,-6.784521910352744,0 +-39.99072707110822,-6.783910982031314,0 +-39.99022748451588,-6.783298128416718,0 +-39.98985082379562,-6.782529388897578,0 +-39.98876639357012,-6.780022018453468,0 +-39.98858308864312,-6.77953438008351,0 +-39.98820467791855,-6.778878561481272,0 +-39.98781994714904,-6.778382476204253,0 +-39.98740178104556,-6.777606484750518,0 +-39.98733733303314,-6.777083291489046,0 +-39.98719118958662,-6.776597340479595,0 +-39.98692306080916,-6.776147271182542,0 +-39.98641816629596,-6.775528557705561,0 +-39.98631325353135,-6.775003242596148,0 +-39.98616314286154,-6.774636831190896,0 +-39.9859763574064,-6.774148575681455,0 +-39.98579238122853,-6.773576573372345,0 +-39.9853242774731,-6.773038193128357,0 +-39.98477179654209,-6.772531969111657,0 +-39.98434201896617,-6.772038007217033,0 +-39.98398877904796,-6.771666834594496,0 +-39.98332594917617,-6.770845851424038,0 +-39.98301615834256,-6.770396033054602,0 +-39.98223392648985,-6.769532423992786,0 +-39.98164672159677,-6.768915201556507,0 +-39.98117747739158,-6.768421061459252,0 +-39.98074396042296,-6.768087697590619,0 +-39.98015653997767,-6.767508920689238,0 +-39.9795322123959,-6.766811470644014,0 +-39.97898742035224,-6.766152867307288,0 +-39.97894950466001,-6.76607118623703,0 +-39.97802334521373,-6.765358548675329,0 +-39.97771279396769,-6.764988788044676,0 +-39.97720709576664,-6.764412671769919,0 +-39.97630556057356,-6.76358375487342,0 +-39.97536537721724,-6.762672697789502,0 +-39.97520982669169,-6.76246745068559,0 +-39.9747764352087,-6.762132941463293,0 +-39.97394243373435,-6.761587709910496,0 +-39.97188107286354,-6.760249445084509,0 +-39.97109580649108,-6.759545888220068,0 +-39.97027297746283,-6.758761846784192,0 +-39.96988354230074,-6.758310136822433,0 +-39.96937813799894,-6.757694887870617,0 +-39.96891466703136,-6.756998633176304,0 +-39.96856472166024,-6.756502748924178,0 +-39.96806182597845,-6.75572212760864,0 +-39.96775159250884,-6.755312863927895,0 +-39.96747925102107,-6.754984781537381,0 +-39.96712177831739,-6.754687072703507,0 +-39.96680672556908,-6.754352864867442,0 +-39.96598325268352,-6.753653377289337,0 +-39.96550963777862,-6.753277736431747,0 +-39.96382756646921,-6.752032272406209,0 +-39.96311832296781,-6.75144956895951,0 +-39.96280278493969,-6.75119946458781,0 +-39.96221342778871,-6.750659643761939,0 +-39.96206050266183,-6.7503737184194,0 +-39.96170920855833,-6.749961019030352,0 +-39.96111880860139,-6.74942004189027,0 +-39.96069081551099,-6.748843267217577,0 +-39.96010293905272,-6.748180444008674,0 +-39.95982550091644,-6.747970286243299,0 +-39.95951327364452,-6.747557231170547,0 +-39.95888249219065,-6.74693212687965,0 +-39.95865805822157,-6.746322398584619,0 +-39.95839818049688,-6.745636844826181,0 +-39.95832774194255,-6.745314790042142,0 +-39.95811636951522,-6.744253415941841,0 +-39.95789626337926,-6.743483177703197,0 +-39.95783487482642,-6.74279809370441,0 +-39.9576473768844,-6.742389880835361,0 +-39.95746544799103,-6.741741358325513,0 +-39.95735202176742,-6.741456646184503,0 +-39.95712146385132,-6.740886285732613,0 +-39.95669363624518,-6.740148061508233,0 +-39.95620358141295,-6.739170329626759,0 +-39.95614970162833,-6.738447785215318,0 +-39.95616027455859,-6.738168132416635,0 +-39.95606150047569,-6.737565750240699,0 +-39.9558438103501,-6.736880158370118,0 +-39.95562544851768,-6.735988712416989,0 +-39.95563791472145,-6.73546425575788,0 +-39.95565948351874,-6.733087105481593,0 +-39.95559810314142,-6.732238248706065,0 +-39.95555774174326,-6.73070991735316,0 +-39.95549162415506,-6.730029519505774,0 +-39.95495090512105,-6.728060911005278,0 +-39.95472271215223,-6.727035305425519,0 +-39.95424876930262,-6.725831770844578,0 +-39.95402972394864,-6.724721827769534,0 +-39.95389458782326,-6.723700581287216,0 +-39.95359668835516,-6.722163548746597,0 +-39.95321021935916,-6.720707540156562,0 +-39.95323564516239,-6.719772552509511,0 +-39.95344767568565,-6.718333116069672,0 +-39.9538494312726,-6.716744299576933,0 +-39.9539676481878,-6.715820972320831,0 +-39.95401576105458,-6.714211157460165,0 +-39.95387784461779,-6.713104053443112,0 +-39.95340756329919,-6.711645392182599,0 +-39.9534481553085,-6.710109884190352,0 +-39.95321780294453,-6.709164919229862,0 +-39.95300078357322,-6.707706471793314,0 +-39.95294035468415,-6.706763687009079,0 +-39.95297652400957,-6.705212278250953,0 +-39.95274768568758,-6.704177870753511,0 +-39.95230676411024,-6.701876192774698,0 +-39.95210025907691,-6.700441484715326,0 +-39.95196907591436,-6.699166502793373,0 +-39.95152267356355,-6.69708434623814,0 +-39.9509926740494,-6.694940488058252,0 +-39.95095571898308,-6.693573477686285,0 +-39.95073375665839,-6.692628128540085,0 +-39.95047752229622,-6.690733996464108,0 +-39.95038016905211,-6.689109064551674,0 +-39.95042934430366,-6.688004555276237,0 +-39.95041669063996,-6.686392626028839,0 +-39.95018299721293,-6.68479233804366,0 +-39.94954120906883,-6.682243165618218,0 +-39.94930183834906,-6.681389544176712,0 +-39.94890688054179,-6.680276653335016,0 +-39.94852017567104,-6.678994844803094,0 +-39.94787401762062,-6.677277213684811,0 +-39.94738271106312,-6.676155943435762,0 +-39.94679818640471,-6.675371013310002,0 +-39.946212700684,-6.674671008016326,0 +-39.94538250390553,-6.673882331739413,0 +-39.94355250329791,-6.67230064698705,0 +-39.94204568776644,-6.671495154885142,0 +-39.94104411188045,-6.670873586661234,0 +-39.94063415745816,-6.670352913529177,0 +-39.93898104616514,-6.669038802924739,0 +-39.937983453321,-6.668505739434978,0 +-39.93640243726191,-6.66744575251755,0 +-39.93573625867897,-6.667003755511681,0 +-39.93499107822836,-6.666390514534968,0 +-39.93408169716154,-6.665431423558946,0 +-39.93227689172975,-6.663335308153756,0 +-39.93178346314632,-6.662726270560859,0 +-39.93103965859622,-6.661939852968063,0 +-39.92853846059833,-6.660084583232969,0 +-39.92779051662571,-6.65940016796405,0 +-39.92696254856715,-6.658460780055609,0 +-39.92595731345182,-6.657756315576115,0 +-39.92335883977242,-6.656146234933734,0 +-39.92235903410376,-6.655269293702331,0 +-39.92085338609132,-6.654287903524445,0 +-39.91968511941887,-6.653403846760429,0 +-39.91835825721978,-6.651924899325897,0 +-39.9168661370028,-6.650101356734545,0 +-39.9161316752657,-6.648637684032202,0 +-39.91548781292583,-6.647173987322975,0 +-39.9150882344868,-6.646141999987108,0 +-39.91427349440336,-6.644671971648861,0 +-39.91353930213292,-6.643373945783044,0 +-39.91305789728159,-6.642167883303702,0 +-39.91224123676437,-6.640695827380944,0 +-39.91157169232368,-6.640165154649295,0 +-39.91099362559009,-6.639381284353822,0 +-39.91084592823047,-6.63843883557364,0 +-39.91018436281276,-6.637566810910569,0 +-39.90978462098374,-6.636445729800338,0 +-39.90929884717725,-6.635494303535003,0 +-39.90841252860241,-6.634112838298394,0 +-39.90695394905328,-6.632765409933193,0 +-39.9060514691896,-6.63145620190811,0 +-39.9054763692427,-6.630671353291275,0 +-39.90589868377256,-6.629255901212172,0 +-39.90586329971414,-6.628945698000144,0 +-39.90561828557547,-6.628137525898559,0 +-39.90559895779365,-6.627291374694745,0 +-39.90556884686902,-6.626800569278229,0 +-39.90513044383422,-6.626430389940962,0 +-39.90459980347824,-6.626145471941892,0 +-39.90385661628084,-6.625537463830615,0 +-39.90315559385732,-6.625023945646489,0 +-39.90220528307132,-6.623924054006669,0 +-39.90181821237171,-6.623378398020692,0 +-39.9008661418018,-6.622281387459143,0 +-39.90034581693173,-6.621731666023817,0 +-39.89999846753572,-6.621365233817407,0 +-39.89900427559611,-6.620088846535802,0 +-39.8985319480384,-6.61931705311321,0 +-39.89824999272337,-6.618464857437503,0 +-39.89791565654268,-6.61787922789612,0 +-39.89771457181535,-6.617297786676561,0 +-39.89760685576088,-6.616586468101149,0 +-39.89731786567285,-6.616004514475368,0 +-39.89665439805779,-6.614797026422208,0 +-39.89648936503458,-6.614484820900514,0 +-39.89623881327592,-6.614082324831849,0 +-39.89567589898621,-6.613352769477415,0 +-39.89527529924369,-6.613023506178259,0 +-39.89518936487411,-6.612887307202117,0 +-39.891907337335,-6.60746098006922,0 +-39.89144399570667,-6.606564870817113,0 +-39.89066640367664,-6.605528476386922,0 +-39.88993460259169,-6.604222640542439,0 +-39.88915166261117,-6.602996739391226,0 +-39.88876245230517,-6.60231490186725,0 +-39.88842306592969,-6.601590215234197,0 +-39.88759045153381,-6.600624163754118,0 +-39.88707532497921,-6.599940717756469,0 +-39.88665052076059,-6.599306119125521,0 +-39.88629738586315,-6.598662329518649,0 +-39.88575967697476,-6.597917197879538,0 +-39.88568581149107,-6.597285713972987,0 +-39.88594517759901,-6.596403395825432,0 +-39.88627662887131,-6.595875953586766,0 +-39.88650775584944,-6.595426865113811,0 +-39.88648691192049,-6.594619272199592,0 +-39.88609160383653,-6.59415548315244,0 +-39.88551103055486,-6.593866277731996,0 +-39.88520185461009,-6.593632542765184,0 +-39.88454072847303,-6.593073685115984,0 +-39.88436530153422,-6.592888552745968,0 +-39.88306177883289,-6.59127705832137,0 +-39.88275227161851,-6.590999580195851,0 +-39.88231516339216,-6.590449818761568,0 +-39.88160252284788,-6.590027970240536,0 +-39.88048940013343,-6.589417731325181,0 +-39.87951619088535,-6.588807700449584,0 +-39.87862742959226,-6.588380883066098,0 +-39.8775552032259,-6.588086141390645,0 +-39.87608405393831,-6.587695332747076,0 +-39.87545943224182,-6.587591690103805,0 +-39.87492650874574,-6.587446020601359,0 +-39.87325423828161,-6.58656016256726,0 +-39.87281265877464,-6.586370046126859,0 +-39.87228077107626,-6.586222446758659,0 +-39.87040776519014,-6.585387481701069,0 +-39.8698655953709,-6.585181089838335,0 +-39.86892530713069,-6.584786466607502,0 +-39.86817199900454,-6.584452650383104,0 +-39.86715578403444,-6.583887340611502,0 +-39.8661951407829,-6.583150098654045,0 +-39.86571275138348,-6.582871228158817,0 +-39.86492944503068,-6.582274497911371,0 +-39.86441060339623,-6.581864623120547,0 +-39.8634972876063,-6.581359463368042,0 +-39.8630217628035,-6.581086408104466,0 +-39.86158926600837,-6.580730676957521,0 +-39.86114765794765,-6.580530454518101,0 +-39.85967490063592,-6.58032759679664,0 +-39.85819764667323,-6.580168563662495,0 +-39.85703493986565,-6.580095836336959,0 +-39.85576825267776,-6.580312554179628,0 +-39.85423465274214,-6.580485034063046,0 +-39.85364037342048,-6.580539385448763,0 +-39.85283225797698,-6.580610288396139,0 +-39.85233580170161,-6.580591131175748,0 +-39.85183733146469,-6.580475538119812,0 +-39.85034300612457,-6.580043072465441,0 +-39.84979905358069,-6.579929203721063,0 +-39.84915728332046,-6.579850149890203,0 +-39.84838215394315,-6.579817726791885,0 +-39.84746562238268,-6.579822321927646,0 +-39.8467776056299,-6.579884196272294,0 +-39.84346734370515,-6.580088843700612,0 +-39.84168149535505,-6.579458094291722,0 +-39.84101268165249,-6.579173601831855,0 +-39.83926729303833,-6.57885473057198,0 +-39.83809825995464,-6.578823349877856,0 +-39.83761463864391,-6.578455395821901,0 +-39.83673950498629,-6.57763638693129,0 +-39.83625365504392,-6.577249548230076,0 +-39.835902950268,-6.576875632378807,0 +-39.8354629255572,-6.576453891754432,0 +-39.83511920385961,-6.575859758012606,0 +-39.83463799573271,-6.575303633045555,0 +-39.83393172149077,-6.574644688910472,0 +-39.83344264181741,-6.574261836761266,0 +-39.83259964914613,-6.573600358761308,0 +-39.83211391038635,-6.573229482456274,0 +-39.8317159518739,-6.572950695690826,0 +-39.83096359926319,-6.572437798518232,0 +-39.83083159301491,-6.572249972459288,0 +-39.82918032476038,-6.57088432860153,0 +-39.828687112201,-6.570599228131726,0 +-39.82779001429891,-6.570166435341935,0 +-39.82742843330775,-6.570065400053025,0 +-39.82666032703159,-6.569952071114653,0 +-39.82603151534013,-6.569842854497773,0 +-39.82532331589086,-6.569686111470078,0 +-39.82461625719998,-6.569574712827171,0 +-39.82448332326209,-6.569570711020837,0 +-39.82189930500311,-6.569094130534894,0 +-39.82026664455774,-6.5689740890913,0 +-39.81955524177241,-6.568882005874118,0 +-39.81800338494356,-6.568199455126354,0 +-39.81673327843932,-6.567738744792505,0 +-39.81546017976664,-6.567489780045874,0 +-39.81390048780366,-6.567372677120245,0 +-39.81268330302605,-6.567689251663639,0 +-39.811965376401,-6.567950149261885,0 +-39.81097313005505,-6.567920741632706,0 +-39.81004123995652,-6.568316505763626,0 +-39.80939256641008,-6.568790642307846,0 +-39.80834053623584,-6.56875949870504,0 +-39.80776926911082,-6.569023550507064,0 +-39.80720256455594,-6.56900651819484,0 +-39.8060107832812,-6.568548809180754,0 +-39.80439913653434,-6.567867074635087,0 +-39.80369995717382,-6.567423354893795,0 +-39.80327741632806,-6.56719887222238,0 +-39.80241792745058,-6.566746612788083,0 +-39.80121883114749,-6.566002082718284,0 +-39.80089356158024,-6.564932407079581,0 +-39.80084917411016,-6.564012476327399,0 +-39.80117593681549,-6.562609501315874,0 +-39.80133888570931,-6.561979465526655,0 +-39.80151532575942,-6.560926684096595,0 +-39.80120825377485,-6.559364440874076,0 +-39.80066189418093,-6.558642127369361,0 +-39.80009572413636,-6.558482097151854,0 +-39.79874143497987,-6.558149768153329,0 +-39.7983104106144,-6.55813382664946,0 +-39.79744782697291,-6.558029963600439,0 +-39.79476354590162,-6.557391877025829,0 +-39.79348982117847,-6.557076772506724,0 +-39.7921472858927,-6.556757039341787,0 +-39.79002524395462,-6.55640697015208,0 +-39.78889209821218,-6.55624607641044,0 +-39.78613345811979,-6.555966687305674,0 +-39.78399484658522,-6.555792508534391,0 +-39.78320974647969,-6.555762047407902,0 +-39.78250039792093,-6.555519257490876,0 +-39.7817910263952,-6.555127849334675,0 +-39.78108720934822,-6.554599282118184,0 +-39.78047056489294,-6.553952987559827,0 +-39.77927957813665,-6.552909185957562,0 +-39.77779974603295,-6.551779302510583,0 +-39.77561694309777,-6.550795417211884,0 +-39.77428435876931,-6.55019616655134,0 +-39.77294282678591,-6.549879129544499,0 +-39.77223522611273,-6.549791199731045,0 +-39.77022724941507,-6.550597037190758,0 +-39.76880288685833,-6.550773587400929,0 +-39.76738144256808,-6.550079813950338,0 +-39.7665377723504,-6.549555447431668,0 +-39.76618127733263,-6.549544794943569,0 +-39.76441135249875,-6.548993402938398,0 +-39.76157646946949,-6.549611569442863,0 +-39.75941866457985,-6.549427551742431,0 +-39.75678054291043,-6.549226080041315,0 +-39.75427394089673,-6.548789850568934,0 +-39.7522351953243,-6.548845586750899,0 +-39.75067777692227,-6.548798364067161,0 +-39.74827642790061,-6.549081083078803,0 +-39.74670251165712,-6.549628583410707,0 +-39.74430950107852,-6.550144758797267,0 +-39.74194572140846,-6.550182897814078,0 +-39.73921451286248,-6.550332189348357,0 +-39.73778236680518,-6.550289398865348,0 +-39.73551345096863,-6.55022177347665,0 +-39.73012075412992,-6.549945807052231,0 +-39.72736448808791,-6.549273169010617,0 +-39.72557082388674,-6.54886405719357,0 +-39.72387656870249,-6.54857822138386,0 +-39.72206078705956,-6.548525554026467,0 +-39.71954051271521,-6.548093831619902,0 +-39.71549697821929,-6.547375536031436,0 +-39.71385145093922,-6.546492168827581,0 +-39.71002335905563,-6.544948316497492,0 +-39.70800103021565,-6.544410578023632,0 +-39.70632788328452,-6.544240907859225,0 +-39.70379973305245,-6.544521792465175,0 +-39.70259748102505,-6.544485600827857,0 +-39.70034991945561,-6.543223985244682,0 +-39.69963735786712,-6.542963729753545,0 +-39.69701892521596,-6.542288363375891,0 +-39.69677919109878,-6.542281146708897,0 +-39.69447707853572,-6.542927283218314,0 +-39.69301589162971,-6.543240446648124,0 +-39.69012433335952,-6.543954648484136,0 +-39.68823907274366,-6.543897552361311,0 +-39.6867222341377,-6.542997752912855,0 +-39.68528942753218,-6.542100315320123,0 +-39.68402278851763,-6.541378577732305,0 +-39.68224639744303,-6.540470052538972,0 +-39.68090235439563,-6.53932429441591,0 +-39.67988424167057,-6.538871142512135,0 +-39.67877278920253,-6.538751103890316,0 +-39.67782970785159,-6.538721423631527,0 +-39.67654567174905,-6.538595887200212,0 +-39.67508921792969,-6.538464864272227,0 +-39.67283890432437,-6.538905309925165,0 +-39.66929016823303,-6.539390955296302,0 +-39.66758433997395,-6.538998446893244,0 +-39.66624470330608,-6.537934013792303,0 +-39.66497779501327,-6.537299062124447,0 +-39.66337995294312,-6.536313459137152,0 +-39.66243921775122,-6.536113460174358,0 +-39.66055883248288,-6.53588698752794,0 +-39.65821484466326,-6.535806473670126,0 +-39.65665174339686,-6.535753764792876,0 +-39.65475349303318,-6.535435175827473,0 +-39.65356169707237,-6.535230260959213,0 +-39.65262025401097,-6.535203182875528,0 +-39.64979357472312,-6.53572007813847,0 +-39.64839688661899,-6.536361616412529,0 +-39.64673697943352,-6.537248674551165,0 +-39.64534113147924,-6.53788826873691,0 +-39.64404279639818,-6.538103996340728,0 +-39.64240682627125,-6.538052731829063,0 +-39.64120337521655,-6.537929868914291,0 +-39.63896922724538,-6.537870334154904,0 +-39.63810961797572,-6.537932947285449,0 +-39.63476701513065,-6.537923316424641,0 +-39.63348343345514,-6.537885952085654,0 +-39.63113559243725,-6.536369356552354,0 +-39.62954411687055,-6.535301169143986,0 +-39.62861502899725,-6.53484702288812,0 +-39.62599452931178,-6.533660348276619,0 +-39.62455947960756,-6.532848783654093,0 +-39.62245312348985,-6.531418116796652,0 +-39.62093683373836,-6.530346499066702,0 +-39.62017596144794,-6.529895757790568,0 +-39.61891687884641,-6.528831792318045,0 +-39.61784475175308,-6.527869027399208,0 +-39.61657498458038,-6.526675231288624,0 +-39.61592436480837,-6.526242236045697,0 +-39.61518424258688,-6.525804094262035,0 +-39.60983287664422,-6.523772574896306,0 +-39.60814389389234,-6.523126237050165,0 +-39.6057661115051,-6.522622417929784,0 +-39.60457664754596,-6.522319505038006,0 +-39.60229680223105,-6.521022832739303,0 +-39.60144888432471,-6.520648417500374,0 +-39.60035562592659,-6.51965104076983,0 +-39.59806407865629,-6.518355181101661,0 +-39.59712282622638,-6.518151511533635,0 +-39.59412304519725,-6.517711096680704,0 +-39.59300458177267,-6.517853932037102,0 +-39.59187408759232,-6.518513335976485,0 +-39.59065084687614,-6.519513890105533,0 +-39.58909601810853,-6.520249514528102,0 +-39.58789451140404,-6.520651658062892,0 +-39.58615004780882,-6.521709329762144,0 +-39.58375515562121,-6.521726762269786,0 +-39.58264495014644,-6.521695367498435,0 +-39.57152878575916,-6.523217634579573,0 +-39.56956765927101,-6.522971043223358,0 +-39.5659660995555,-6.522846259363576,0 +-39.56382253496029,-6.52269836534189,0 +-39.56106568039029,-6.522958133470082,0 +-39.55813792122819,-6.523212288918883,0 +-39.55549660556203,-6.52271555058094,0 +-39.55378556170073,-6.522401390361617,0 +-39.55293446961801,-6.522296224171557,0 +-39.55055896487894,-6.522078651641625,0 +-39.54924465351849,-6.522622055426376,0 +-39.54803533250352,-6.523102645292,0 +-39.54725797021985,-6.5234235132968,0 +-39.54619989915567,-6.523802406956395,0 +-39.54438369461536,-6.524345474335301,0 +-39.54282019937925,-6.524718837285421,0 +-39.54094740098407,-6.52583523430639,0 +-39.53874437834331,-6.52669401651695,0 +-39.53706811264387,-6.527403897206475,0 +-39.53560488243289,-6.52767197608201,0 +-39.53464963146283,-6.52746262362137,0 +-39.5329543364532,-6.527084535055423,0 +-39.53217306613891,-6.526989159730339,0 +-39.53142301206955,-6.527078071984552,0 +-39.53048896984216,-6.52712441682839,0 +-39.53009554992823,-6.526560358923674,0 +-39.5296973434524,-6.525995922955584,0 +-39.52944646010646,-6.525656371992621,0 +-39.52912034926899,-6.525351282945845,0 +-39.52858243856222,-6.524929424858776,0 +-39.52837095145853,-6.524775998751124,0 +-39.52799989403151,-6.524475509953107,0 +-39.52787417241386,-6.524261855512985,0 +-39.5278012193797,-6.52410310839501,0 +-39.52776109823743,-6.523935028451879,0 +-39.52762504338501,-6.523724390579666,0 +-39.52760519168117,-6.523640943133965,0 +-39.52759672262362,-6.523526664173299,0 +-39.52758930323028,-6.52336087171266,0 +-39.52764590725896,-6.523206546988841,0 +-39.5277239969672,-6.52303238153246,0 +-39.52777914446111,-6.522940413863558,0 +-39.52788774653281,-6.522798957353794,0 +-39.52797328819506,-6.522699671617175,0 +-39.52798509118388,-6.522495238961644,0 +-39.52801804685985,-6.522401904005837,0 +-39.52803201299953,-6.522224628897665,0 +-39.52803714565304,-6.521943319238517,0 +-39.52803885173073,-6.521849781348585,0 +-39.52805226489461,-6.521622100119997,0 +-39.5280445535409,-6.521384546125768,0 +-39.52800596259171,-6.521106337665488,0 +-39.52799184095716,-6.520808177151085,0 +-39.52800668841151,-6.52060383924347,0 +-39.52802207074213,-6.520379415695628,0 +-39.52783446980662,-6.520135446860922,0 +-39.52755226722896,-6.519909258920435,0 +-39.52738036450974,-6.519809063783802,0 +-39.52718768728752,-6.519755760513195,0 +-39.52703401514717,-6.5197168077899,0 +-39.52676755848742,-6.519601160471007,0 +-39.52644866425464,-6.51946219847347,0 +-39.52626430256732,-6.519338264835531,0 +-39.52617207599735,-6.519270689536423,0 +-39.52588880626645,-6.519016366911586,0 +-39.52571324714662,-6.518947323468705,0 +-39.52516295092602,-6.518759791373306,0 +-39.52491255654795,-6.518697250015039,0 +-39.52447522407503,-6.518488923813536,0 +-39.52418275267096,-6.518317253237744,0 +-39.52387852811557,-6.51814694051018,0 +-39.52352328049938,-6.517891073547496,0 +-39.52330587329054,-6.517695028930493,0 +-39.52313914645811,-6.517641399267459,0 +-39.52283735910366,-6.517576522997406,0 +-39.52252719491356,-6.517457122732426,0 +-39.5222379863502,-6.517249343393184,0 +-39.52211373690502,-6.51716142276342,0 +-39.52179275344028,-6.517019651637153,0 +-39.52163550730624,-6.516963820426847,0 +-39.52121770981014,-6.516807873798161,0 +-39.52105091473273,-6.516753304386674,0 +-39.52066721608576,-6.51662322552823,0 +-39.52029801928707,-6.516442018781325,0 +-39.52008407019589,-6.51632556985695,0 +-39.51979598168812,-6.516247273913878,0 +-39.51966084569415,-6.516221817463569,0 +-39.51942087759713,-6.516192343448946,0 +-39.51919918360183,-6.5162143634212,0 +-39.51912586598168,-6.516211783299023,0 +-39.51890468780509,-6.516213516469002,0 +-39.51877991211376,-6.516397755505541,0 +-39.51891719610605,-6.516714122985534,0 +-39.51899465867031,-6.516924403358695,0 +-39.51913310679214,-6.517198982405521,0 +-39.51920456702057,-6.517595462886872,0 +-39.51923733385249,-6.51788688163905,0 +-39.51926808722951,-6.518219516449802,0 +-39.51932072946318,-6.51853233586568,0 +-39.51938334594134,-6.519115981536133,0 +-39.5194748764859,-6.519432015619389,0 +-39.51964692162656,-6.51985652509797,0 +-39.51976234627467,-6.520133622362311,0 +-39.51990947588268,-6.52070838685297,0 +-39.51992361560465,-6.520899490225442,0 +-39.51997534614507,-6.521219776257759,0 +-39.52004911338665,-6.521520546476914,0 +-39.52004085451112,-6.521754828845601,0 +-39.51985249142437,-6.522244165979925,0 +-39.51973318557737,-6.522624384087915,0 +-39.51963974172948,-6.52291534986106,0 +-39.51946331255017,-6.523140237107239,0 +-39.51933094282424,-6.523323746145476,0 +-39.51926173997062,-6.523530094536413,0 +-39.51912307497594,-6.52396274147235,0 +-39.51901135571426,-6.524187425950987,0 +-39.51863489914869,-6.524761913125952,0 +-39.51845924551849,-6.524988509839514,0 +-39.51798245528082,-6.525395227530146,0 +-39.51774350703348,-6.525640515007851,0 +-39.51737834620019,-6.525965887460845,0 +-39.51686639709173,-6.526285895197015,0 +-39.51628665771166,-6.526310429975885,0 +-39.51562001092298,-6.526332466745838,0 +-39.51513287001578,-6.526422608105771,0 +-39.51487930597499,-6.526561714215694,0 +-39.51466892105724,-6.526659975834623,0 +-39.51439374251429,-6.526693482027699,0 +-39.51409347882137,-6.526831310110764,0 +-39.51375422130183,-6.526946611924692,0 +-39.51341150507652,-6.52708313060175,0 +-39.51305386172328,-6.527134696523682,0 +-39.51195446950361,-6.527538695359867,0 +-39.51167950604476,-6.527572188091529,0 +-39.511106894794,-6.527638664614385,0 +-39.51055196625072,-6.527789992991583,0 +-39.50995144490293,-6.528024235986507,0 +-39.5094592156817,-6.528198232420013,0 +-39.50903469966312,-6.528227337787166,0 +-39.50871712089484,-6.528217684940295,0 +-39.50837798757065,-6.528228299377785,0 +-39.50763977504778,-6.528205094891605,0 +-39.50721724208042,-6.5281920745884,0 +-39.5065637463185,-6.528150823614139,0 +-39.50578942643524,-6.528105153923105,0 +-39.50533025656041,-6.528069586809911,0 +-39.50489354165514,-6.528055562462376,0 +-39.50460017553536,-6.528025545854679,0 +-39.50421991308432,-6.528097495651985,0 +-39.50369774297764,-6.528292143835317,0 +-39.50331348998051,-6.528430136290606,0 +-39.50297980347446,-6.528691031813995,0 +-39.50278480186522,-6.52889468462253,0 +-39.50256379179671,-6.529056819487971,0 +-39.50208322881291,-6.529295968967292,0 +-39.50181940315817,-6.529561593410966,0 +-39.50166542825701,-6.529725284198095,0 +-39.50098715338516,-6.530614215804087,0 +-39.50054039882186,-6.531297963718892,0 +-39.50080016114808,-6.531909346351243,0 +-39.50092266067119,-6.532424076435288,0 +-39.50104915666505,-6.532845679911968,0 +-39.50084442897862,-6.533442041580972,0 +-39.5004113136424,-6.533891864774471,0 +-39.50001232670338,-6.534396650657977,0 +-39.49956687053771,-6.534723299541594,0 +-39.49945722362141,-6.53476688297477,0 +-39.49919709027034,-6.534777428759848,0 +-39.49904535237812,-6.534817982379937,0 +-39.49874127654712,-6.534870623992256,0 +-39.49860553807863,-6.534867526795687,0 +-39.4982484269169,-6.534855524251754,0 +-39.49799536602851,-6.534846959577367,0 +-39.49793124992252,-6.534978887905684,0 +-39.49792468301559,-6.535172294028755,0 +-39.49792266223589,-6.535231786674746,0 +-39.49791761285774,-6.535380482879591,0 +-39.49784742403364,-6.53569067842612,0 +-39.49775036634153,-6.535910720496967,0 +-39.49766783042502,-6.5361459243942,0 +-39.49762753451782,-6.536471211481314,0 +-39.49762430847596,-6.536574949148237,0 +-39.49758986630825,-6.536722229772793,0 +-39.49753774259015,-6.536957970263884,0 +-39.49747070284697,-6.53719325329665,0 +-39.49733800559417,-6.537619358817301,0 +-39.49719914697709,-6.537763434091336,0 +-39.49704580959297,-6.537892226337696,0 +-39.4969634495272,-6.538126866117323,0 +-39.4968821843304,-6.538346940939844,0 +-39.49678709118128,-6.538521949456626,0 +-39.49666232798696,-6.538696165649688,0 +-39.49656654691014,-6.53890106029405,0 +-39.49643688458656,-6.539238698062714,0 +-39.49643157693436,-6.539416986273589,0 +-39.49640656585492,-6.539742826417053,0 +-39.49635260021994,-6.540054082994451,0 +-39.49620797413145,-6.540343255706659,0 +-39.49607968435329,-6.540620172197436,0 +-39.49581873229972,-6.54139086426556,0 +-39.49532469260865,-6.541807616484303,0 +-39.49504130175915,-6.541915217899851,0 +-39.49454241082329,-6.542533490556792,0 +-39.49421114072035,-6.542917582065383,0 +-39.4941214517671,-6.543198659988549,0 +-39.49364132258209,-6.543292235302478,0 +-39.49296264717064,-6.54349165743583,0 +-39.49279061812164,-6.543737818360811,0 +-39.4925385029128,-6.54405470406272,0 +-39.49216268647588,-6.544449832998673,0 +-39.49197444509945,-6.545099995777299,0 +-39.49196317082897,-6.545495360903359,0 +-39.49194977642389,-6.545969107341877,0 +-39.4921705592099,-6.546647816581736,0 +-39.49218711797281,-6.547368352195997,0 +-39.49197628060115,-6.54768281097867,0 +-39.49168160652421,-6.548114134190197,0 +-39.49166905595446,-6.548476473508654,0 +-39.49182098620101,-6.548758813719084,0 +-39.49207318024965,-6.549712801015038,0 +-39.49205753325037,-6.550230615001446,0 +-39.49196600910857,-6.550585655779006,0 +-39.49194950739295,-6.551102251718421,0 +-39.49188999754983,-6.551737869253562,0 +-39.49187050746009,-6.552374548032184,0 +-39.49184707803787,-6.553130285008983,0 +-39.49170945070625,-6.55368335281623,0 +-39.49106708248255,-6.553743395213082,0 +-39.49050841156183,-6.553726535243673,0 +-39.48982701906071,-6.553905087085477,0 +-39.48946694357109,-6.553973699090553,0 +-39.48893410587779,-6.554434128970728,0 +-39.48872191756385,-6.554864486096915,0 +-39.4885554255318,-6.555097595422137,0 +-39.48829891703777,-6.55568507344012,0 +-39.4880846683789,-6.5561154906724,0 +-39.48779411157086,-6.55650324986909,0 +-39.4873612461472,-6.557444451454353,0 +-39.48679054370695,-6.557745379035933,0 +-39.48657167999821,-6.558256602281405,0 +-39.48651479464731,-6.559006294324327,0 +-39.48641805740789,-6.559442180845453,0 +-39.48623836167194,-6.559955666304846,0 +-39.48616152149737,-6.560873914666945,0 +-39.48578738912089,-6.56137803295048,0 +-39.48541844424177,-6.561761733478519,0 +-39.48537091476364,-6.562037695072877,0 +-39.48519126528419,-6.562668250658711,0 +-39.48507774592972,-6.563352363586191,0 +-39.48529041497029,-6.56423499851084,0 +-39.48528063236557,-6.564668425381551,0 +-39.48535561477434,-6.565443297543503,0 +-39.48543397316396,-6.565638605574479,0 +-39.48547119694694,-6.566524731476852,0 +-39.48523077207666,-6.567214472538081,0 +-39.48510553555427,-6.567735759899567,0 +-39.48509611029083,-6.568214780042173,0 +-39.48507075271768,-6.569164381549141,0 +-39.48509048865452,-6.569632886328367,0 +-39.48537967428733,-6.570224310288213,0 +-39.48552997467419,-6.571038840974184,0 +-39.48570359276477,-6.571429210459786,0 +-39.48581758730597,-6.572210196986226,0 +-39.48575960920324,-6.572601966329177,0 +-39.48574741066701,-6.573080501718611,0 +-39.48582503400099,-6.573567169964283,0 +-39.48605556742965,-6.574134334190787,0 +-39.48632262215561,-6.574498947222481,0 +-39.48653287876641,-6.575296887233137,0 +-39.48659892789863,-6.575655129430772,0 +-39.48674291434198,-6.576215799951507,0 +-39.48680346770708,-6.576972570988377,0 +-39.48678520464514,-6.577686385572706,0 +-39.48675527290275,-6.578200648688015,0 +-39.4868074187514,-6.578838384103407,0 +-39.48690077495522,-6.57983451141479,0 +-39.48692981801975,-6.580389953676368,0 +-39.48793144400113,-6.58154346339424,0 +-39.48799458724213,-6.582863773722669,0 +-39.4886001413961,-6.584648834492551,0 +-39.48957073034293,-6.585823044206538,0 +-39.49060804723054,-6.586330600688016,0 +-39.49175475909919,-6.587133991480264,0 +-39.4920759556126,-6.587870041496328,0 +-39.49257285646591,-6.588885941894907,0 +-39.49287574690145,-6.589414028576217,0 +-39.49340010228777,-6.590363586569548,0 +-39.49418638350733,-6.59162910180738,0 +-39.49459647962742,-6.592498344490365,0 +-39.49524132997571,-6.59378826071818,0 +-39.49537146579105,-6.594313520569044,0 +-39.49552143317698,-6.595252621442162,0 +-39.49555466065911,-6.595853289162418,0 +-39.49555530658765,-6.596421638770622,0 +-39.49609716684797,-6.597887689485034,0 +-39.49638734804081,-6.598301788941098,0 +-39.49690651535676,-6.599242692532561,0 +-39.49690572051341,-6.5992774973321,0 +-39.49677457741934,-6.600120129679554,0 +-39.49709913222152,-6.60071698130661,0 +-39.49746292507376,-6.601212208859956,0 +-39.49793035166053,-6.602056834377996,0 +-39.49817949655925,-6.603100763275227,0 +-39.49833627262891,-6.603590211535441,0 +-39.49842636369753,-6.603940553745663,0 +-39.4986190829767,-6.604465368591915,0 +-39.49892420255904,-6.604751035042118,0 +-39.49961257861983,-6.605080986560717,0 +-39.4999585865345,-6.605226458610971,0 +-39.50033593678488,-6.605442506101022,0 +-39.50064260110567,-6.605625079740204,0 +-39.50094572146758,-6.605912148043311,0 +-39.5012768569955,-6.606409204687001,0 +-39.50143816679816,-6.606796711956517,0 +-39.50201355302288,-6.607303102860873,0 +-39.50265855703104,-6.607843704026506,0 +-39.50281860360642,-6.608296224682406,0 +-39.50297534520866,-6.608853159371256,0 +-39.50298432959197,-6.609682779079593,0 +-39.50300939047552,-6.609993021019987,0 +-39.502747966013,-6.610557658978546,0 +-39.50273195088631,-6.611074150149005,0 +-39.50270232800501,-6.612034231663135,0 +-39.50292611459036,-6.612667354078805,0 +-39.50307593418756,-6.613408695060221,0 +-39.50309836206141,-6.613792327063056,0 +-39.503181217656,-6.614454941797073,0 +-39.50316258004,-6.615100895201906,0 +-39.50321767805369,-6.615613336180319,0 +-39.50398590273329,-6.616739054879949,0 +-39.50442295701323,-6.617271542215842,0 +-39.50461768652922,-6.617728096919957,0 +-39.50463353492822,-6.618317798565801,0 +-39.50471112620316,-6.619151451645078,0 +-39.50482294261562,-6.620020085477982,0 +-39.50497706048107,-6.62068242690202,0 +-39.50505371702389,-6.62154945886185,0 +-39.50507356698273,-6.621999100857466,0 +-39.50522069003843,-6.622868319324049,0 +-39.50583492348407,-6.624337832525176,0 +-39.50626010277972,-6.625071358085889,0 +-39.50648382079783,-6.625627730946746,0 +-39.50684198293472,-6.626397903026266,0 +-39.50732050303591,-6.626726097624401,0 +-39.5076287759123,-6.626801879433405,0 +-39.50848768775464,-6.626498086894361,0 +-39.50931877083395,-6.62684296347595,0 +-39.51012241472363,-6.627192395354055,0 +-39.51022463735891,-6.627513535675553,0 +-39.51028213203352,-6.628073498052756,0 +-39.51009643057345,-6.628591364896932,0 +-39.51018039397978,-6.629638253694177,0 +-39.51021946595518,-6.629769437734418,0 +-39.51067589833146,-6.630386424944644,0 +-39.51121967009214,-6.630963868654256,0 +-39.51193352908826,-6.631670972320617,0 +-39.51239815529792,-6.632069109989011,0 +-39.5126736857609,-6.632897079734179,0 +-39.51265261550694,-6.633501584492796,0 +-39.5126341028343,-6.634101877478685,0 +-39.51261709992518,-6.634700429397789,0 +-39.51259714124012,-6.635385466075769,0 +-39.5125819251116,-6.635899868277316,0 +-39.51237635701572,-6.636883495431891,0 +-39.51202429678001,-6.638292216375735,0 +-39.51165495946614,-6.638967433011024,0 +-39.51129795984905,-6.639299219276551,0 +-39.5105607356687,-6.640948820972686,0 +-39.51033340924774,-6.641417660272984,0 +-39.50997008345448,-6.641964612321902,0 +-39.50979040971988,-6.642173425253093,0 +-39.50947444182147,-6.642592180035599,0 +-39.50920189266067,-6.643012332462402,0 +-39.5088863173773,-6.643431264012223,0 +-39.50865704889982,-6.643855331886392,0 +-39.50838052962384,-6.644405637156988,0 +-39.50823629260718,-6.644873502670664,0 +-39.50795984945525,-6.645422967185956,0 +-39.50789256557989,-6.646194509937909,0 +-39.50794883718756,-6.647179252861818,0 +-39.50806498849759,-6.647612326385016,0 +-39.50850926953283,-6.648611810754777,0 +-39.50893023857159,-6.648966031025669,0 +-39.50944006497078,-6.649238284220933,0 +-39.50998343198951,-6.649809915734955,0 +-39.51039560082024,-6.650418748001225,0 +-39.51060430590251,-6.650637839269638,0 +-39.51088859074519,-6.651261953028724,0 +-39.51135555077643,-6.651574585534706,0 +-39.51176539049651,-6.652274328336762,0 +-39.51183978680336,-6.652620815696901,0 +-39.51215158514312,-6.653660451357439,0 +-39.51244016786335,-6.654183290858647,0 +-39.5128170421041,-6.65470936886453,0 +-39.51285175585839,-6.654968159759223,0 +-39.51256623461844,-6.655818419013974,0 +-39.51254376996465,-6.656504555641845,0 +-39.51252506929421,-6.657017996741996,0 +-39.51254675423756,-6.657574025241398,0 +-39.51257123281425,-6.658131096507527,0 +-39.51280012731021,-6.658948467620939,0 +-39.5129557667513,-6.659422289415582,0 +-39.51371179701796,-6.660308929186584,0 +-39.51408063842894,-6.66100816440639,0 +-39.51406986864285,-6.661395009816984,0 +-39.51390932419591,-6.662464934543208,0 +-39.51359269804015,-6.662972104496871,0 +-39.51351668511506,-6.66408849648012,0 +-39.51344728637056,-6.664945670869803,0 +-39.513440779455,-6.665160412374898,0 +-39.51309672609166,-6.666216112954434,0 +-39.51317201532258,-6.66687461688793,0 +-39.51322630642434,-6.667335391692199,0 +-39.51293426172876,-6.668178849623128,0 +-39.5127213417404,-6.668730553468413,0 +-39.51248112523778,-6.669018396240698,0 +-39.51240594994005,-6.66937801945776,0 +-39.51238543166406,-6.669966660740512,0 +-39.51249576875443,-6.670524304496541,0 +-39.5131308740611,-6.671330494520599,0 +-39.51383703837032,-6.672042329738012,0 +-39.51422461263751,-6.672350127296089,0 +-39.5144452735608,-6.672684761434924,0 +-39.51481441520843,-6.673514699445978,0 +-39.51493540867264,-6.673913098851343,0 +-39.51524838479607,-6.67448059975964,0 +-39.5154309881433,-6.674910319966495,0 +-39.51561294460333,-6.675339193290027,0 +-39.51566289725424,-6.675763656252109,0 +-39.51577498280731,-6.676505325770075,0 +-39.51592837912238,-6.676647028279974,0 +-39.51621486911505,-6.676949526174962,0 +-39.5166731515406,-6.677433922459631,0 +-39.51699563901388,-6.677836040208103,0 +-39.51728179934287,-6.678138797977036,0 +-39.51744536483312,-6.678536448859208,0 +-39.51772252861988,-6.679054386770219,0 +-39.51824350582149,-6.679988933480635,0 +-39.51861769373096,-6.680586374965937,0 +-39.51882447857611,-6.680885636181237,0 +-39.51893537923406,-6.681103769566463,0 +-39.51908566207442,-6.681323119213058,0 +-39.51937015403328,-6.681644077982683,0 +-39.51982564878703,-6.682145793036564,0 +-39.52011440250249,-6.682369870432002,0 +-39.52022802612653,-6.682549811461071,0 +-39.5204404154526,-6.682733134951886,0 +-39.52059225032021,-6.682993354872113,0 +-39.52111060171994,-6.68362099557639,0 +-39.52162627053675,-6.684123626276317,0 +-39.52202643256477,-6.684565440563327,0 +-39.52237026541154,-6.684949886863863,0 +-39.52271513014288,-6.685295801692167,0 +-39.52308958595626,-6.685938007340779,0 +-39.52348546033911,-6.686479648622438,0 +-39.52376665745362,-6.686917668440396,0 +-39.52404179857697,-6.687531361273152,0 +-39.52423138774905,-6.687751750179037,0 +-39.52456027405862,-6.68793744216981,0 +-39.52471617209493,-6.688000829206892,0 +-39.52488318656438,-6.688338013108307,0 +-39.52516699851007,-6.688737826503397,0 +-39.52529158109549,-6.689171749986173,0 +-39.52520005899729,-6.689639381070219,0 +-39.52495342186989,-6.690045084289222,0 +-39.52494563222132,-6.690340286345029,0 +-39.52480618859978,-6.691001357410023,0 +-39.52459137397133,-6.691541536934714,0 +-39.52444150438181,-6.691907665591399,0 +-39.52425173691381,-6.692291830345852,0 +-39.52363992968787,-6.692944087842514,0 +-39.5232715385113,-6.693382999686203,0 +-39.5230855777214,-6.693670370253516,0 +-39.52281005029058,-6.694306818712344,0 +-39.52254324020885,-6.694651324993086,0 +-39.52230979045444,-6.69517386958349,0 +-39.52211757332901,-6.695638841109447,0 +-39.52192056876881,-6.696332034386851,0 +-39.52188911550432,-6.696756320115921,0 +-39.52189495227309,-6.697187505007293,0 +-39.52185984914731,-6.697658641217896,0 +-39.52181090433857,-6.697952427491196,0 +-39.52172593659195,-6.698146234743129,0 +-39.52162066512598,-6.698359007706639,0 +-39.52143450128244,-6.69864661782166,0 +-39.52136909402652,-6.698841278399865,0 +-39.52127453184782,-6.699311097523666,0 +-39.52146704523991,-6.699431599472137,0 +-39.52201873334421,-6.699470718344092,0 +-39.52219252145174,-6.699595084121222,0 +-39.52238583516506,-6.699719658136921,0 +-39.52269339217145,-6.699965796276625,0 +-39.52292444034588,-6.70013063163206,0 +-39.52315460010857,-6.700315272310896,0 +-39.5233520640512,-6.700926753221193,0 +-39.52335404714904,-6.701530105058151,0 +-39.52337550370888,-6.702117312169627,0 +-39.52342802126208,-6.702960592451936,0 +-39.52338221722039,-6.703760837187812,0 +-39.52335971983466,-6.704421896757931,0 +-39.52346278781,-6.704831256838622,0 +-39.52378443795214,-6.70568927714562,0 +-39.52385518477612,-6.705903431535734,0 +-39.52398481695747,-6.706099595939798,0 +-39.52414855880032,-6.706431151102029,0 +-39.52418017829512,-6.706643557445473,0 +-39.5240921319518,-6.706907500836179,0 +-39.52387942901556,-6.707416104326889,0 +-39.52376413286759,-6.707977668891639,0 +-39.523832588385,-6.708232334718177,0 +-39.52381869494736,-6.708600910361444,0 +-39.52378315982794,-6.709063043166633,0 +-39.52399711649338,-6.709589030610471,0 +-39.52417511275643,-6.710112380094199,0 +-39.52426055039879,-6.71053752372988,0 +-39.52442165125738,-6.711081835582428,0 +-39.52456006054673,-6.711940003188973,0 +-39.52457690300105,-6.712077075548557,0 +-39.52443839228953,-6.712249783100853,0 +-39.52404583673658,-6.71243558156132,0 +-39.52390481401639,-6.712607615391342,0 +-39.52377814498636,-6.712935573063,0 +-39.52380818891191,-6.713289980986428,0 +-39.52403760787355,-6.713574961979598,0 +-39.52414720506626,-6.713976228728222,0 +-39.52384890587887,-6.714084832718571,0 +-39.52370599358537,-6.714256815580486,0 +-39.52335945131369,-6.71464510302304,0 +-39.52307137807767,-6.71501124722843,0 +-39.52286495855007,-6.715300776258387,0 +-39.52263836668322,-6.715627460792613,0 +-39.52233674485077,-6.715870174245596,0 +-39.52211622551786,-6.716018372962676,0 +-39.52191076334854,-6.716303143479958,0 +-39.52164470440485,-6.7166257978151,0 +-39.52122400921863,-6.71688714254346,0 +-39.52104201596703,-6.717077388425092,0 +-39.52108815102925,-6.7174885581083,0 +-39.52073340161307,-6.717575417126939,0 +-39.52041580794649,-6.717741063655163,0 +-39.52030786365755,-6.718068728070567,0 +-39.5203167364183,-6.71840015151247,0 +-39.52032627186263,-6.718712251024331,0 +-39.52033936530561,-6.718907749783166,0 +-39.52036983366212,-6.719162709735825,0 +-39.52028034095443,-6.71949212070603,0 +-39.52013768679655,-6.719663146228964,0 +-39.51993065969418,-6.720007778634458,0 +-39.51992931296547,-6.720046889850249,0 +-39.51971291612467,-6.720609087278438,0 +-39.51973325185133,-6.722305184107615,0 +-39.51964922167063,-6.723253744582244,0 +-39.51954132133584,-6.724244828928729,0 +-39.51972412313623,-6.724569443587007,0 +-39.51996680592878,-6.725087620854964,0 +-39.52009093138349,-6.725475400371201,0 +-39.5202480067403,-6.725767646521373,0 +-39.52050015152023,-6.726126016519946,0 +-39.52052414619843,-6.726508334007039,0 +-39.52087193008821,-6.726741350670419,0 +-39.52173032231087,-6.727021441165492,0 +-39.52207086358819,-6.727444059110188,0 +-39.52256852022263,-6.727934542946114,0 +-39.52259308389159,-6.728157373851093,0 +-39.52257928005203,-6.728569584604273,0 +-39.52256830587757,-6.729042972107971,0 +-39.52250300729472,-6.730118367216497,0 +-39.52235785897075,-6.731145316080365,0 +-39.5221194598699,-6.73173540030929,0 +-39.52217147210339,-6.732267660344358,0 +-39.52225699843545,-6.732736821643301,0 +-39.52246413444009,-6.733305901098565,0 +-39.52264550847489,-6.733684224097054,0 +-39.52310847350397,-6.734223646482267,0 +-39.52332151972627,-6.734541022390805,0 +-39.52347304984164,-6.734764569788503,0 +-39.52377063844527,-6.735348255576104,0 +-39.52387442864165,-6.736073266490942,0 +-39.52392622889913,-6.736452405541734,0 +-39.52391056813391,-6.736954235339931,0 +-39.52383803338079,-6.737266784763823,0 +-39.52372659667628,-6.737764051174099,0 +-39.5237148746772,-6.738107764969213,0 +-39.52368621656422,-6.73888752248871,0 +-39.52370216203624,-6.739423912609968,0 +-39.5236550498616,-6.739990407657901,0 +-39.52364172120323,-6.740366273617608,0 +-39.52358885211045,-6.740993165352589,0 +-39.52372342074305,-6.741657775597817,0 +-39.52403352709604,-6.742990029225775,0 +-39.52403560864369,-6.743965584308738,0 +-39.52401056833999,-6.744721957806873,0 +-39.5239939051486,-6.74522670665912,0 +-39.52400890190192,-6.745732904833848,0 +-39.52406192789051,-6.746050793567634,0 +-39.52410100385097,-6.746780950785147,0 +-39.52409691091234,-6.746907420334336,0 +-39.52385825747047,-6.747377228300819,0 +-39.52390506260837,-6.747915154310085,0 +-39.52391572149106,-6.748611816795085,0 +-39.52382515552276,-6.749425355055237,0 +-39.5237840211526,-6.749706992907757,0 +-39.52370219026675,-6.750271925831004,0 +-39.52349091851282,-6.750896066948652,0 +-39.52341465866205,-6.751271693496808,0 +-39.523308492645,-6.751583379042597,0 +-39.52329590585325,-6.751961562733825,0 +-39.52339805906461,-6.752722380063021,0 +-39.52392334645609,-6.753277261763417,0 +-39.52426519348255,-6.753573036458572,0 +-39.52450835949206,-6.753993502123633,0 +-39.52469209867905,-6.754285848399915,0 +-39.52500119780512,-6.754579692366844,0 +-39.52546446205374,-6.755036373595276,0 +-39.52586520935276,-6.755459817748369,0 +-39.52595080516578,-6.755778467253136,0 +-39.52603534360087,-6.756128356849718,0 +-39.52617254173024,-6.756826695798518,0 +-39.52625599430815,-6.757207672397224,0 +-39.52630667156004,-6.757618846049026,0 +-39.52622349701946,-6.758245244269022,0 +-39.52620581391093,-6.758810394162817,0 +-39.52595819386578,-6.759634026372347,0 +-39.52601381947053,-6.759885069712714,0 +-39.5261839538468,-6.76054371822199,0 +-39.52648197555149,-6.761204691079903,0 +-39.52690571358056,-6.761910245556126,0 +-39.52738075247015,-6.762969742833969,0 +-39.52758812085656,-6.763420178645813,0 +-39.52793721580526,-6.764349309274881,0 +-39.52811831600604,-6.764638564832002,0 +-39.5283223101903,-6.765242839603154,0 +-39.52844004948565,-6.765561198348414,0 +-39.52886976508038,-6.766046944216837,0 +-39.5288194737748,-6.766707296994054,0 +-39.52880609990683,-6.767148467013153,0 +-39.52885587906742,-6.767591567866977,0 +-39.52906884807811,-6.767849964659571,0 +-39.52933259499459,-6.768487547824204,0 +-39.52938078448854,-6.768929240154336,0 +-39.52962358252601,-6.770225929050234,0 +-39.52994394270254,-6.771116408053854,0 +-39.53011173393587,-6.771780521859492,0 +-39.53022125131871,-6.772350735452621,0 +-39.53042669046852,-6.772957956048818,0 +-39.53044688548091,-6.773402339828879,0 +-39.53052501004363,-6.774071504080424,0 +-39.5305233568718,-6.774134950318714,0 +-39.53051061111395,-6.774609802492354,0 +-39.53065853082349,-6.774991746563418,0 +-39.53095078600721,-6.775666448502367,0 +-39.53111299338605,-6.776492323730927,0 +-39.53125582187799,-6.776938681787809,0 +-39.53136037217411,-6.777541641385259,0 +-39.53135104232906,-6.777887021436298,0 +-39.53140539889467,-6.778234410213677,0 +-39.53158809511871,-6.778523034177719,0 +-39.53192892346393,-6.779123450498916,0 +-39.53216883758848,-6.779546987587142,0 +-39.53273317630233,-6.780397306718475,0 +-39.53296128686799,-6.781238545457449,0 +-39.53302870318389,-6.781784055735916,0 +-39.53300667322801,-6.782494176013852,0 +-39.53306229889188,-6.783415725241379,0 +-39.53333758125646,-6.7840929600659,0 +-39.53397295081397,-6.785157338367297,0 +-39.53463517601646,-6.786594871536051,0 +-39.53489096369191,-6.787684804068784,0 +-39.5348810094681,-6.787975711760188,0 +-39.53494181268831,-6.788642635299931,0 +-39.53499678291033,-6.789474849072479,0 +-39.53497595805005,-6.790140184089249,0 +-39.53504704164167,-6.790644885162617,0 +-39.53506721622984,-6.791645289990706,0 +-39.5351796240864,-6.792186215689778,0 +-39.53545428880747,-6.792780525764657,0 +-39.53560649240115,-6.7934067556388,0 +-39.53600091964122,-6.794172835115416,0 +-39.53620115714717,-6.795039982314925,0 +-39.53618784950952,-6.795376764371767,0 +-39.53616803708417,-6.795881324287667,0 +-39.53615685625863,-6.796338549542226,0 +-39.53618295200841,-6.79688237189056,0 +-39.53612032378808,-6.797590562926332,0 +-39.53622474733792,-6.79826349646886,0 +-39.53621450444685,-6.798597704080311,0 +-39.53607637078477,-6.799011306590041,0 +-39.53576044963687,-6.799671067434707,0 +-39.53520400110547,-6.800029900646451,0 +-39.53476416201574,-6.800602325392178,0 +-39.53423180148217,-6.801209587305511,0 +-39.53419037427682,-6.8015285688903,0 +-39.53412734462859,-6.802086876138333,0 +-39.53402203805858,-6.802547561272663,0 +-39.5339666333555,-6.8028987522491,0 +-39.53384733704972,-6.803184371694524,0 +-39.53366239651545,-6.803452311301195,0 +-39.5334471718081,-6.803606758199829,0 +-39.53319967857807,-6.803841088824004,0 +-39.53306391570032,-6.80406277247421,0 +-39.53296259219221,-6.804188656158157,0 +-39.53274360353278,-6.804423588124505,0 +-39.53257733897318,-6.804563750816869,0 +-39.53224651165311,-6.804796090573928,0 +-39.53198318859796,-6.804917303711114,0 +-39.53169079765605,-6.804924713407727,0 +-39.53136492068268,-6.804896864702841,0 +-39.53117033845609,-6.804874203506041,0 +-39.53092554415212,-6.804914772828213,0 +-39.53056385344351,-6.805029607953493,0 +-39.53020193192497,-6.80521105398624,0 +-39.52980993345314,-6.805324739431342,0 +-39.52920551335685,-6.805559696119021,0 +-39.52882123048023,-6.805936214955929,0 +-39.52849436575345,-6.806084625772767,0 +-39.52823463139135,-6.806170468220746,0 +-39.52794115952321,-6.806303877965233,0 +-39.52765459541853,-6.806604155766978,0 +-39.52735389745017,-6.806931139670318,0 +-39.52723384652241,-6.807185141818678,0 +-39.52687646471288,-6.807684457231891,0 +-39.52670295464634,-6.808298732630979,0 +-39.5265582227468,-6.808662396428577,0 +-39.52635788494565,-6.808833363937489,0 +-39.52619135659437,-6.809005959257817,0 +-39.52607260094462,-6.809309634006135,0 +-39.52608268639964,-6.809648719931578,0 +-39.52614105071984,-6.810052832296694,0 +-39.52627443461056,-6.810793541818022,0 +-39.52634429331665,-6.811131535551939,0 +-39.5263399375991,-6.811354534380109,0 +-39.52616515599924,-6.811774473145157,0 +-39.52609939441566,-6.811961514393146,0 +-39.52569226946635,-6.812367081846493,0 +-39.52539117144963,-6.812512917411686,0 +-39.52520044424268,-6.81261590481181,0 +-39.52491810502008,-6.812893175754109,0 +-39.52470376354193,-6.813046089931743,0 +-39.52448367398189,-6.813295296515986,0 +-39.52442975176216,-6.813421474044503,0 +-39.5243638216145,-6.813810083809524,0 +-39.52435880830029,-6.813919990458714,0 +-39.52435169511914,-6.814141434320638,0 +-39.52443187911184,-6.814458449952375,0 +-39.52448343759546,-6.814664046533627,0 +-39.52454987851905,-6.814918344586307,0 +-39.52454744593784,-6.81520189104836,0 +-39.52448316904167,-6.815453022867452,0 +-39.52442301379028,-6.815609484415328,0 +-39.52412201307426,-6.815919587145476,0 +-39.52398561453165,-6.816058985723204,0 +-39.52368249214906,-6.816289373882182,0 +-39.52356629613649,-6.816381852010667,0 +-39.5233020352517,-6.816581870860023,0 +-39.52323430015087,-6.816771761554909,0 +-39.52324513547707,-6.81698001261593,0 +-39.52328527380838,-6.817890325584921,0 +-39.52372639436265,-6.818838689990629,0 +-39.52381794534251,-6.819897957536523,0 +-39.52383944688555,-6.821371962465054,0 +-39.52368460368251,-6.822037738406801,0 +-39.52317037504874,-6.823429205454011,0 +-39.52204250276511,-6.825001803712603,0 +-39.5212714183419,-6.82618474914525,0 +-39.52043128086634,-6.827363349326982,0 +-39.5202719173854,-6.828027359985426,0 +-39.5202933881618,-6.82943328753603,0 +-39.52027541332168,-6.830101062440047,0 +-39.5204521893333,-6.83104141439641,0 +-39.52112736951932,-6.833004181455186,0 +-39.52151374090357,-6.833551899531953,0 +-39.52189831202918,-6.834231522348613,0 +-39.52160434275805,-6.835025112374313,0 +-39.52118596400479,-6.835480563782258,0 +-39.52096224395338,-6.836143717358625,0 +-39.5207184739571,-6.837410099657107,0 +-39.52062903573633,-6.838078174346759,0 +-39.52061142752694,-6.838807210058643,0 +-39.52077902612048,-6.839948131516351,0 +-39.52095481889469,-6.840821651101622,0 +-39.52100586515801,-6.841357663079295,0 +-39.52124081693793,-6.842625912430948,0 +-39.52174182166525,-6.843781036650669,0 +-39.52193185513455,-6.844124172422489,0 +-39.52244413714472,-6.844821133320611,0 +-39.52317830237703,-6.845460221556343,0 +-39.52414182928371,-6.845634265711585,0 +-39.52467941717074,-6.845409215057877,0 +-39.52497108787279,-6.845320913412738,0 +-39.52583505411963,-6.845538898537145,0 +-39.52654608000097,-6.846090829515583,0 +-39.52739384611208,-6.846984782494344,0 +-39.52809998082825,-6.847631167206551,0 +-39.52872052454724,-6.84784097612864,0 +-39.52943514193965,-6.848198929635116,0 +-39.53019271837649,-6.848750884038047,0 +-39.53122902529263,-6.84969632878342,0 +-39.53150864958181,-6.85004115265739,0 +-39.5319298105227,-6.850485833574615,0 +-39.53277547953819,-6.85127978014023,0 +-39.5333446849711,-6.851732003788348,0 +-39.53389836894835,-6.852663970304857,0 +-39.53433723545773,-6.854170032526164,0 +-39.53480950827086,-6.854569445395572,0 +-39.53558454489784,-6.854593514453931,0 +-39.53587811545353,-6.854506302674533,0 +-39.53688910316036,-6.854680366803595,0 +-39.53775703853399,-6.854802763018849,0 +-39.53869181442351,-6.85579066906918,0 +-39.53860942810928,-6.856844829313491,0 +-39.53849506558227,-6.857319303101408,0 +-39.53841506359284,-6.858275831285299,0 +-39.53848050569841,-6.85938677896313,0 +-39.53929301543825,-6.861085591264522,0 +-39.53961389152456,-6.861472006331066,0 +-39.5400782975425,-6.862161273779806,0 +-39.5404332650762,-6.862829177926478,0 +-39.5411530141331,-6.863044516234478,0 +-39.54201451957876,-6.863360218539932,0 +-39.54264158645605,-6.863428709896988,0 +-39.54312196027411,-6.863540575073293,0 +-39.54384539948071,-6.863617841257448,0 +-39.54504148655114,-6.863988231756444,0 +-39.54552277921209,-6.864050314524492,0 +-39.54632684629702,-6.864647507394029,0 +-39.54725340272786,-6.865924601474145,0 +-39.54770961090919,-6.866708647782874,0 +-39.54835214665582,-6.867641507603961,0 +-39.54833111014073,-6.868358891059377,0 +-39.54836909297638,-6.868695363164791,0 +-39.54877789483641,-6.869666020940296,0 +-39.5489622887959,-6.870007466075862,0 +-39.54941415732239,-6.870932132084961,0 +-39.54945825987472,-6.872562710347974,0 +-39.54930815773727,-6.874332740392779,0 +-39.54972291263299,-6.874968528769297,0 +-39.54970036162071,-6.875736209299259,0 +-39.54986893378277,-6.876557496127633,0 +-39.55059527097107,-6.878216385243024,0 +-39.55058491638247,-6.878552085942012,0 +-39.55060125206824,-6.87960955924871,0 +-39.55078136934446,-6.880148137117245,0 +-39.55101107111287,-6.880539285227205,0 +-39.55188882115042,-6.88150082293226,0 +-39.55316232400076,-6.883890959513153,0 +-39.55356778722719,-6.885007860612446,0 +-39.55410527189407,-6.886367702332081,0 +-39.55447666128711,-6.886809896592742,0 +-39.55527955683274,-6.887361155849719,0 +-39.55604582737611,-6.887429896004349,0 +-39.55656757164972,-6.887733453558341,0 +-39.55694015590926,-6.888225087364437,0 +-39.5575489618902,-6.889112231246676,0 +-39.55792001092361,-6.889652164193108,0 +-39.55822969181932,-6.890229641225622,0 +-39.55858873784976,-6.89066172349897,0 +-39.55890831791046,-6.89104994781609,0 +-39.55931148332836,-6.892116816796933,0 +-39.55934086817863,-6.893035663072236,0 +-39.55952369874679,-6.893327602409141,0 +-39.55986551871102,-6.894105091701015,0 +-39.56026950085036,-6.895074359210636,0 +-39.56059230767759,-6.895564906180212,0 +-39.56127521491675,-6.896879667804571,0 +-39.56154801013788,-6.897413866357105,0 +-39.56191286599047,-6.898094026843353,0 +-39.56240969821568,-6.899206917877998,0 +-39.56277404856428,-6.899891973089967,0 +-39.56322651629011,-6.900863842909192,0 +-39.56359190338678,-6.901545183865553,0 +-39.56401533601996,-6.90189365435642,0 +-39.5644332083547,-6.902433350371006,0 +-39.56532027715883,-6.903418709993232,0 +-39.56578391055257,-6.904055906341831,0 +-39.5663698151367,-6.905464433431646,0 +-39.56678438387328,-6.906100216138194,0 +-39.56741977227635,-6.907414064023187,0 +-39.56769573868117,-6.907853853935414,0 +-39.56831688722198,-6.909548713888838,0 +-39.56829669595753,-6.910120916906635,0 +-39.56845660051922,-6.911080422411266,0 +-39.56849855837677,-6.911421475286137,0 +-39.56886792132379,-6.91205887801238,0 +-39.56951578670384,-6.912940514486074,0 +-39.57017100049559,-6.913533061788576,0 +-39.5707829641301,-6.913931695165876,0 +-39.57087613474587,-6.914030028753107,0 +-39.57150944134975,-6.914659128833789,0 +-39.57219766837932,-6.915781854491851,0 +-39.57251738114166,-6.91631911801635,0 +-39.57325310435006,-6.917252194912338,0 +-39.57451436707775,-6.918771775712051,0 +-39.5748928098574,-6.918974512359292,0 +-39.57527027883791,-6.919273342110061,0 +-39.57602707527376,-6.919678651244679,0 +-39.57640777126348,-6.919978693466593,0 +-39.57719984027121,-6.920912847692773,0 +-39.57742469598822,-6.921543685264663,0 +-39.57768052692165,-6.922063196822793,0 +-39.57770364096049,-6.922225663613887,0 +-39.57763338359013,-6.922417955120131,0 +-39.57759786804598,-6.922524934115706,0 +-39.57753735853324,-6.922728319459313,0 +-39.57748694785437,-6.922953603679706,0 +-39.57748362300338,-6.923061507334699,0 +-39.57756519729741,-6.92322580364481,0 +-39.57766819419219,-6.923357619328833,0 +-39.57777199589462,-6.923456904728141,0 +-39.57772446579414,-6.923595778538436,0 +-39.57769021348865,-6.923670649638503,0 +-39.57762046625925,-6.923863747852109,0 +-39.5775447087539,-6.923894833881264,0 +-39.57741887961095,-6.923772927252502,0 +-39.57726935277625,-6.923715182633932,0 +-39.57716160688133,-6.923701685010717,0 +-39.5770213073618,-6.923698471925881,0 +-39.57686920222336,-6.923727647724514,0 +-39.57670048296061,-6.923939173218264,0 +-39.57660021264738,-6.924043147242859,0 +-39.57644452354596,-6.924177756730774,0 +-39.5764001072296,-6.924208643101632,0 +-39.57627961748954,-6.924236671801274,0 +-39.57613489341578,-6.924308605455918,0 +-39.57603337723512,-6.924392998348618,0 +-39.57586244141235,-6.924594964522857,0 +-39.57563336948534,-6.924924709785921,0 +-39.57549674787255,-6.925104845890228,0 +-39.57536099416896,-6.925252654328618,0 +-39.57518298495415,-6.925355768024183,0 +-39.57500574727975,-6.925437168621875,0 +-39.5749035844839,-6.925564128795841,0 +-39.57475852770119,-6.925668073746217,0 +-39.57459275673618,-6.925738843763764,0 +-39.57435070560522,-6.925818031548679,0 +-39.57396599571459,-6.925978951777289,0 +-39.573770081212,-6.926015887923297,0 +-39.57361828373084,-6.926032604401346,0 +-39.57344430234155,-6.926059483596467,0 +-39.57329192124585,-6.926087053026707,0 +-39.57316226494895,-6.926061575459462,0 +-39.57309849771212,-6.926005795865548,0 +-39.5730365632018,-6.925874621876008,0 +-39.57291018776259,-6.925709008830195,0 +-39.57287811845458,-6.925686449822256,0 +-39.57228247313783,-6.925074753873794,0 +-39.57201979262224,-6.924797429460156,0 +-39.57191946448132,-6.924629816286186,0 +-39.57180270808607,-6.924506634965642,0 +-39.57167324434375,-6.924308324424542,0 +-39.57145353988501,-6.924107385647572,0 +-39.57130828007979,-6.92393878953084,0 +-39.57103350266102,-6.923603189002853,0 +-39.57052715758971,-6.923054735652008,0 +-39.57044435285669,-6.922829147996231,0 +-39.57023222116995,-6.922452265926892,0 +-39.57000215411121,-6.922023098754976,0 +-39.56977239588247,-6.92162569276085,0 +-39.56948198871983,-6.921366412602578,0 +-39.569162570012,-6.92110734293563,0 +-39.56900307679249,-6.920985724125446,0 +-39.56890202913527,-6.920832674569069,0 +-39.56871401267065,-6.920618952236921,0 +-39.56859766990643,-6.920371736331564,0 +-39.56835239818994,-6.919792250854504,0 +-39.56822338842576,-6.919638957667823,0 +-39.56809403825343,-6.9195007125562,0 +-39.56790740355292,-6.91927132377443,0 +-39.56779113185061,-6.919103519326485,0 +-39.5674849453342,-6.918795729188224,0 +-39.56732453135204,-6.918641649459384,0 +-39.56710377600407,-6.918425522532728,0 +-39.56656134182138,-6.917829824041676,0 +-39.56625137831811,-6.917491390320967,0 +-39.56607302075504,-6.917351072550916,0 +-39.56567732164866,-6.916979456224082,0 +-39.56541666981747,-6.916732545951199,0 +-39.56527272498648,-6.916548846817037,0 +-39.56509905853331,-6.916409715360331,0 +-39.56488248090029,-6.916224831859105,0 +-39.56462205151186,-6.916054287995597,0 +-39.5645064105655,-6.915976909670192,0 +-39.56427541260808,-6.915731923237685,0 +-39.56415923069851,-6.915548800638517,0 +-39.56410110115822,-6.915502503876009,0 +-39.55783995064722,-6.910181505179256,0 +-39.55134479821599,-6.906305839054082,0 +-39.54796748371994,-6.904097679785917,0 +-39.54408675622059,-6.90108607216402,0 +-39.54096075814274,-6.898876906070086,0 +-39.53652807659711,-6.895027584696574,0 +-39.53525121969523,-6.893407728904901,0 +-39.53295444694637,-6.890439242426107,0 +-39.53166158496049,-6.889345954818018,0 +-39.52134916861021,-6.881134153179246,0 +-39.51140190428713,-6.878033524038613,0 +-39.50482582539121,-6.877033021664039,0 +-39.500675860571,-6.875516518054704,0 +-39.4983302002984,-6.873858159134745,0 +-39.49537870106253,-6.872378691810805,0 +-39.49263400510915,-6.87070749076885,0 +-39.48871271044627,-6.868406302756982,0 +-39.48636769793644,-6.866748141944608,0 +-39.47619307588618,-6.860092693500841,0 +-39.4722314887419,-6.858374556937947,0 +-39.46844354154943,-6.857455883385486,0 +-39.46310522983419,-6.856108512205942,0 +-39.4603568055981,-6.854435564888637,0 +-39.45422117794371,-6.851253539667876,0 +-39.4507238136982,-6.848371445799576,0 +-39.44720844835672,-6.846085252040119,0 +-39.44332513532431,-6.843803151486084,0 +-39.43477570367111,-6.840978873694104,0 +-39.42945202546291,-6.83945046916346,0 +-39.42706051994826,-6.839171808666393,0 +-39.42385293248092,-6.839463658960751,0 +-39.42226019276036,-6.839008656078517,0 +-39.41986221006206,-6.838726986615749,0 +-39.41557092048573,-6.837455250812963,0 +-39.4089966177282,-6.834970438791406,0 +-39.40581706955646,-6.832648898061175,0 +-39.4024385079185,-6.83113152919582,0 +-39.40006408135321,-6.831472459456247,0 +-39.39507535115818,-6.832720313698583,0 +-39.39088027705028,-6.831573854454295,0 +-39.38989439866226,-6.830743155257098,0 +-39.38275321224558,-6.826735674399034,0 +-39.38164581108894,-6.825859173970207,0 +-39.37914427290895,-6.824234059769037,0 +-39.37693939803085,-6.822618984371434,0 +-39.37444797858087,-6.820855845459051,0 +-39.37308947901482,-6.818986474763816,0 +-39.37146550392419,-6.81683163157196,0 +-39.36964736570404,-6.816214288048216,0 +-39.3682228238349,-6.816022741487604,0 +-39.36537905130353,-6.815216531358541,0 +-39.36354234449118,-6.814019987559877,0 +-39.36098902619212,-6.812940877611593,0 +-39.35845384053771,-6.812013387078373,0 +-39.35721956959006,-6.810706092472432,0 +-39.35598429865411,-6.80939852996794,0 +-39.35431144723152,-6.807785057579888,0 +-39.35275874227264,-6.806737876280558,0 +-39.35184295432713,-6.804883767130388,0 +-39.35030450766197,-6.804131349597408,0 +-39.34762649116129,-6.80305503602971,0 +-39.34519845371052,-6.802974286826825,0 +-39.34419827302771,-6.802941017385559,0 +-39.34277896150201,-6.802611512290731,0 +-39.34140062192279,-6.801154851016775,0 +-39.34085126438629,-6.800573284870501,0 +-39.33570776134279,-6.798022795604544,0 +-39.33389936922431,-6.79666279242451,0 +-39.33267496836898,-6.796449775565431,0 +-39.33152833859852,-6.796502782685665,0 +-39.33057167402005,-6.796295097584642,0 +-39.32962546607114,-6.79565392255904,0 +-39.32858869257607,-6.794925647097393,0 +-39.32765947403568,-6.793501882896631,0 +-39.32663121693221,-6.792423268647656,0 +-39.32577123148953,-6.791611067314305,0 +-39.32481003939096,-6.791232371574551,0 +-39.32393424710104,-6.790943524171317,0 +-39.32288652407399,-6.790474354835125,0 +-39.32139905083844,-6.7899039420784,0 +-39.31973199443919,-6.78958977917844,0 +-39.31851117639867,-6.789463577456009,0 +-39.3167366743869,-6.789322183926102,0 +-39.31541269385878,-6.789106463585462,0 +-39.31461350257888,-6.789256882040844,0 +-39.31308756008236,-6.789998160833866,0 +-39.31191602087067,-6.790750355749025,0 +-39.30756267846901,-6.792889930299488,0 +-39.30641294714257,-6.793031659571801,0 +-39.30445507110183,-6.793586911009418,0 +-39.30356522615884,-6.79382018634782,0 +-39.30267315949313,-6.794140740358423,0 +-39.30036556491131,-6.794676302365843,0 +-39.29948083027528,-6.794821620823423,0 +-39.29746550971137,-6.794579603257032,0 +-39.29545909410303,-6.79407731331361,0 +-39.29493293287547,-6.793889329540478,0 +-39.29406390228903,-6.79334148696437,0 +-39.29301219131347,-6.792876446391833,0 +-39.29125019978855,-6.792476404260365,0 +-39.28277911446062,-6.792379128474002,0 +-39.28129335713329,-6.791982733659907,0 +-39.27857453839563,-6.791550637823613,0 +-39.276481062109,-6.790870920847919,0 +-39.27428657360274,-6.790455903037107,0 +-39.27173811327175,-6.790114485194981,0 +-39.26989329609476,-6.789881683991172,0 +-39.26778825577269,-6.789639565418973,0 +-39.26489294377613,-6.788938011925416,0 +-39.26401242146795,-6.788649090075181,0 +-39.26188441538708,-6.788497367704149,0 +-39.2596887916233,-6.788340227481432,0 +-39.25749449352502,-6.788270548763393,0 +-39.25583261449459,-6.788042700049091,0 +-39.2526464502771,-6.787857175483288,0 +-39.2508776225587,-6.787540028526459,0 +-39.24922967498471,-6.787311805367617,0 +-39.24485961541124,-6.787347967326598,0 +-39.24336072211371,-6.787300204362298,0 +-39.23941109652615,-6.786824050258584,0 +-39.23767945119463,-6.785983810961207,0 +-39.23759170872155,-6.785981025258911,0 +-39.23654720754095,-6.78568631837692,0 +-39.23497702149803,-6.785462290802187,0 +-39.23253225133598,-6.785211428016952,0 +-39.23086911691298,-6.785159453667355,0 +-39.22826235050904,-6.784381456536104,0 +-39.22739691759696,-6.783831513041921,0 +-39.2257248326876,-6.783604117139903,0 +-39.22318018192583,-6.782824577116142,0 +-39.22247970126295,-6.782452304460158,0 +-39.22036890915835,-6.781683940805497,0 +-39.21852501657057,-6.78109948795275,0 +-39.2167953953242,-6.780258899146555,0 +-39.21531003209901,-6.780126487402365,0 +-39.20968498018135,-6.778732159460643,0 +-39.20855771797554,-6.778087857137991,0 +-39.20681392630952,-6.777512028948004,0 +-39.20480810631132,-6.776928553879567,0 +-39.20394263208531,-6.776467478460396,0 +-39.20033014244352,-6.774063493585183,0 +-39.19992640332978,-6.772911261724704,0 +-39.19882095099187,-6.771646627254141,0 +-39.19799580227897,-6.769868089338867,0 +-39.19734701174647,-6.768098492451967,0 +-39.19472671677065,-6.762698334988931,0 +-39.1939697440103,-6.761624754594433,0 +-39.19321206920534,-6.760555483445398,0 +-39.19219927937636,-6.759214492646,0 +-39.19086764530384,-6.756815513639897,0 +-39.18891701296195,-6.754132282957968,0 +-39.18796167765305,-6.75357651403396,0 +-39.18623181363137,-6.752559531499957,0 +-39.18423924824565,-6.751534925381911,0 +-39.18302991126565,-6.75079723771649,0 +-39.18156925627008,-6.749613732551623,0 +-39.18062096590295,-6.748971701937593,0 +-39.17914697639589,-6.748314251985803,0 +-39.17697258375206,-6.747547743143681,0 +-39.17546802360352,-6.747231764770344,0 +-39.1746720438807,-6.747028412151147,0 +-39.16994542970006,-6.746606069549392,0 +-39.16923930472959,-6.74658412407271,0 +-39.1667027876926,-6.745967329537041,0 +-39.16617385417189,-6.745948121153776,0 +-39.16502858139403,-6.745821490630295,0 +-39.16299400016739,-6.745769492093656,0 +-39.16192908553572,-6.745916598280023,0 +-39.16040046454788,-6.746743144567931,0 +-39.15869872648188,-6.747387461792798,0 +-39.15691890186963,-6.747589092858521,0 +-39.15575421289744,-6.747990685632288,0 +-39.15459612145762,-6.748217993411799,0 +-39.15316955295837,-6.748793087322062,0 +-39.15113362504576,-6.749971359110267,0 +-39.15006858591182,-6.750377358036781,0 +-39.14847475207166,-6.751118048056399,0 +-39.14651852079563,-6.751931465152813,0 +-39.14518819443403,-6.751976159028828,0 +-39.14196476225862,-6.75309842253421,0 +-39.14007278610877,-6.754264202615907,0 +-39.13926825944198,-6.754414231449609,0 +-39.13809857207772,-6.754640917485963,0 +-39.13440419057331,-6.754438656767137,0 +-39.13263411513984,-6.754384008123782,0 +-39.13122103741366,-6.754339611872639,0 +-39.12846627478752,-6.75469247322632,0 +-39.126505213301,-6.755070521424573,0 +-39.12551530213074,-6.755479350799011,0 +-39.1233568192624,-6.756292170044854,0 +-39.12136597280603,-6.757462044794148,0 +-39.11855093199942,-6.759311937668696,0 +-39.11763071549091,-6.760339479939703,0 +-39.11672433486653,-6.760840577582285,0 +-39.11436096908729,-6.762267938241802,0 +-39.11382188181678,-6.762427865252664,0 +-39.11150184581174,-6.763057147796427,0 +-39.10990957232838,-6.763962529284218,0 +-39.10858018591301,-6.764876405969467,0 +-39.10707875632579,-6.765435650602988,0 +-39.10662400322133,-6.765426635636786,0 +-39.10433786664247,-6.765731630869793,0 +-39.10102644373876,-6.766262920847051,0 +-39.09932964468079,-6.766562259430037,0 +-39.09586175986122,-6.767150574973618,0 +-39.09505015375088,-6.767392290183622,0 +-39.09310451333098,-6.767761918130262,0 +-39.09141869782842,-6.768143499895893,0 +-39.09060922613962,-6.76838408657072,0 +-39.08916115770278,-6.76904694600238,0 +-39.08832676316455,-6.769645743117797,0 +-39.08678293219645,-6.770829450179739,0 +-39.08524579471977,-6.771403166594298,0 +-39.08425329532914,-6.771727410950665,0 +-39.08260341257411,-6.771832062704512,0 +-39.08091503871867,-6.771781342767298,0 +-39.07978472795356,-6.771736290437065,0 +-39.07733506083494,-6.771281646241603,0 +-39.0753070441004,-6.771045566605215,0 +-39.07362457625464,-6.770920241684149,0 +-39.07239341004711,-6.770537055290891,0 +-39.07079766518395,-6.770323795649293,0 +-39.06868110425644,-6.769652386939078,0 +-39.06753208363531,-6.769441502230552,0 +-39.06488709156286,-6.769000361932762,0 +-39.06338858175575,-6.768773904790853,0 +-39.06110604126403,-6.767996624054504,0 +-39.05926711942502,-6.767319735269959,0 +-39.05663085090274,-6.766531243406958,0 +-39.05477556594932,-6.766035377730997,0 +-39.05255500381354,-6.765792515995365,0 +-39.04898282532716,-6.76656304348849,0 +-39.04800990277986,-6.766445745633979,0 +-39.04606054474245,-6.76629673939567,0 +-39.04438310815583,-6.765978541927131,0 +-39.04135528942045,-6.76615213788098,0 +-39.039480368627,-6.766444971338839,0 +-39.0379623581151,-6.766492921954924,0 +-39.03546372632805,-6.766852751995962,0 +-39.03332646910165,-6.767133559049994,0 +-39.03038627139103,-6.767565387583866,0 +-39.0289559339875,-6.767527474025782,0 +-39.02778733244864,-6.767672783529978,0 +-39.02521133215629,-6.767937689690243,0 +-39.02396237976298,-6.767901578887936,0 +-39.02200362970608,-6.767842228650676,0 +-39.02067127826189,-6.767713170306568,0 +-39.01589000010631,-6.7682530298361,0 +-39.01491363664474,-6.768219444970803,0 +-39.01357442940573,-6.768444519355314,0 +-39.0119686243908,-6.768659144601481,0 +-39.00902643972443,-6.769005729310664,0 +-39.00803979374417,-6.769244855638854,0 +-39.00706892955943,-6.76903784122498,0 +-39.00556112031909,-6.768987766309105,0 +-39.00467720734499,-6.768870221476343,0 +-39.00310108162763,-6.768116375097108,0 +-39.00151471082081,-6.767713278200858,0 +-38.99976569434313,-6.766777586079959,0 +-38.99881085062121,-6.766042217637301,0 +-38.99758910095073,-6.765298591406306,0 +-38.99619018646987,-6.764462283520366,0 +-38.99522302127325,-6.763905931232392,0 +-38.99321404764874,-6.762869414447549,0 +-38.99224446609113,-6.762661329308506,0 +-38.99111020335833,-6.762007140311123,0 +-38.98927249063046,-6.760891337247496,0 +-38.98614430653942,-6.759480251651235,0 +-38.98491205829534,-6.759088478012303,0 +-38.98237449883461,-6.757768999278342,0 +-38.98194682525504,-6.757223180730653,0 +-38.98116694349988,-6.756577611485704,0 +-38.98021266491762,-6.755836265839124,0 +-38.97874749481911,-6.754459059125896,0 +-38.97796735651491,-6.753902388619873,0 +-38.97692595535848,-6.753166482261923,0 +-38.97571525959383,-6.75216030172386,0 +-38.97476489518039,-6.75133759841422,0 +-38.97354665020944,-6.750593503412794,0 +-38.97268742787596,-6.749685317615073,0 +-38.97173703576019,-6.748861973575953,0 +-38.97064019409278,-6.747637477915145,0 +-38.96992052502207,-6.747081544353577,0 +-38.9693928287099,-6.746820235561508,0 +-38.96910454690722,-6.746811319307059,0 +-38.96855518300802,-6.746961451416062,0 +-38.96805736275756,-6.747028021138071,0 +-38.9673356955614,-6.747337168216669,0 +-38.96648294901637,-6.747847564318522,0 +-38.96622841198085,-6.74796383297836,0 +-38.96580462555421,-6.748278790679788,0 +-38.96542965084429,-6.748470643037311,0 +-38.96462721330303,-6.748978970478058,0 +-38.96424570818548,-6.7492139999717,0 +-38.96368908144766,-6.749650284643294,0 +-38.96348368203713,-6.75047193619696,0 +-38.96345412545725,-6.751173489226453,0 +-38.96343456209428,-6.751748935413993,0 +-38.96328839308948,-6.75236236637862,0 +-38.96324393076551,-6.752443483114233,0 +-38.96256075387121,-6.752918869305685,0 +-38.9613207951441,-6.753507473103754,0 +-38.96060958582026,-6.753690494298113,0 +-38.95989980302592,-6.753914878500289,0 +-38.95931191382526,-6.754266384182501,0 +-38.95829884097899,-6.755056012145977,0 +-38.95654800188296,-6.755942991512931,0 +-38.95535010016321,-6.75639458751597,0 +-38.95422818618601,-6.756686476731018,0 +-38.95371815939462,-6.756754666423405,0 +-38.95205793984272,-6.757315318749539,0 +-38.95131210423644,-6.757413880358036,0 +-38.95073041555628,-6.757519000862128,0 +-38.95011015372528,-6.757501092072511,0 +-38.94957272454705,-6.757405335025652,0 +-38.94907778816978,-6.757269018354102,0 +-38.94821738833333,-6.756995406933602,0 +-38.94727202633039,-6.756760544919849,0 +-38.94624301905211,-6.7564419020674,0 +-38.94546416881543,-6.756129907044998,0 +-38.94464336934568,-6.755898094253247,0 +-38.94403150179987,-6.755590796228907,0 +-38.94342202077942,-6.755283156462687,0 +-38.94281192776064,-6.755098545154529,0 +-38.94187966675035,-6.754575363904928,0 +-38.94093887257277,-6.754052494958798,0 +-38.94028929237794,-6.753579555919345,0 +-38.93849061940728,-6.752783029567692,0 +-38.93760034088483,-6.752426672075116,0 +-38.93638174391832,-6.752142541702037,0 +-38.9354968994607,-6.751705120398714,0 +-38.93444069347455,-6.751426367319501,0 +-38.93345794549872,-6.751395759393919,0 +-38.93255399006142,-6.75144941292757,0 +-38.93088892726776,-6.751723652956765,0 +-38.92947268746984,-6.752006110479385,0 +-38.92839730100386,-6.751971722653512,0 +-38.92723882711192,-6.751934654392234,0 +-38.92434811116981,-6.752172147113557,0 +-38.92276821125297,-6.752449531041147,0 +-38.92094816548332,-6.75263703334072,0 +-38.91729979900233,-6.753256004163303,0 +-38.91465432289303,-6.753743658862906,0 +-38.91332913334374,-6.754028468263106,0 +-38.91167590199199,-6.75422207490975,0 +-38.91018207475334,-6.75458339931656,0 +-38.90878458798797,-6.754538610872844,0 +-38.90720677018005,-6.754897816997181,0 +-38.90571433253122,-6.755177731368235,0 +-38.90323013064386,-6.75550828614065,0 +-38.90140663112133,-6.755778053712097,0 +-38.89941653363164,-6.755880561743457,0 +-38.89683091111056,-6.756293304074422,0 +-38.8942515723598,-6.75646035506979,0 +-38.89316697898358,-6.756591247669768,0 +-38.8910820859277,-6.756936754257249,0 +-38.88967393661482,-6.757137323797434,0 +-38.88792985587283,-6.757572877782145,0 +-38.88619164573849,-6.758088688861482,0 +-38.88462217875905,-6.758446102520645,0 +-38.8833041887747,-6.758566494340267,0 +-38.88197715317713,-6.758525812510631,0 +-38.8799429108117,-6.758709861491878,0 +-38.87779511778781,-6.758723086963092,0 +-38.8739843971013,-6.759092174989473,0 +-38.87257447088203,-6.75929223073152,0 +-38.87091213331274,-6.759648168927293,0 +-38.86933790938394,-6.759842904204698,0 +-38.867354089288,-6.759942908033878,0 +-38.86579400835809,-6.759807510751618,0 +-38.86447945300846,-6.759762148024422,0 +-38.86365837056932,-6.759733811518432,0 +-38.8613735123777,-6.759166264716471,0 +-38.86023372391038,-6.758801257203095,0 +-38.8588485512004,-6.758427956662743,0 +-38.85680560522062,-6.757791420684492,0 +-38.8545423538798,-6.75689625287454,0 +-38.85276057532396,-6.75610235629931,0 +-38.84999642697743,-6.755276620950806,0 +-38.84901813667115,-6.75524387195316,0 +-38.84652586743028,-6.754911814563934,0 +-38.84513444291992,-6.754704410659257,0 +-38.84390430265162,-6.754583726290961,0 +-38.84210441029967,-6.754281679326326,0 +-38.84202517419052,-6.754197538123397,0 +-38.83607727359309,-6.753189923370087,0 +-38.83476479606608,-6.753147199824514,0 +-38.83279982117761,-6.753001848759753,0 +-38.83116918387427,-6.752704327255865,0 +-38.82986156242161,-6.752580421046666,0 +-38.82798720228696,-6.752275229759154,0 +-38.82554258433682,-6.751708945727787,0 +-38.82276424832929,-6.750888267464699,0 +-38.82094964064162,-6.750586456421781,0 +-38.81823560075744,-6.750173198585913,0 +-38.81553081358631,-6.749759570758463,0 +-38.81422151328896,-6.749472353170707,0 +-38.81209373785339,-6.748995310787621,0 +-38.81062991199786,-6.748294053838879,0 +-38.80916759554574,-6.747510753051815,0 +-38.80780222191671,-6.746731727163256,0 +-38.80532472462063,-6.745589084195468,0 +-38.80409880286134,-6.745304499378713,0 +-38.80271826376511,-6.744765916980112,0 +-38.80134544589509,-6.743903109921755,0 +-38.80053013782289,-6.743631646692831,0 +-38.79970961523993,-6.74352394820929,0 +-38.79839549528951,-6.743400779246929,0 +-38.79700726908477,-6.743029506239858,0 +-38.79619250447489,-6.742758259371452,0 +-38.79489465610678,-6.7421442098422,0 +-38.79393988390888,-6.741132811347446,0 +-38.79312734813504,-6.740779082900994,0 +-38.79240743805227,-6.741671880316833,0 +-38.79235341455401,-6.741909304400826,0 +-38.79186145494815,-6.742419180193443,0 +-38.79161022617336,-6.742888715769293,0 +-38.79111522642364,-6.743443950417721,0 +-38.79081068547296,-6.744052957622511,0 +-38.79060075554657,-6.744712391855584,0 +-38.79044553660899,-6.745375522147213,0 +-38.79009232920978,-6.746124661605736,0 +-38.78953819959263,-6.747150671418783,0 +-38.78904544813867,-6.747656300307392,0 +-38.7883570972922,-6.7482977126129,0 +-38.78787223498807,-6.748850708891853,0 +-38.78743744687045,-6.749404280908399,0 +-38.7867557683339,-6.750232506790916,0 +-38.78627147100254,-6.751354989714369,0 +-38.78607196045092,-6.751632521536099,0 +-38.78485855392138,-6.753779424682318,0 +-38.78439224559263,-6.754770544025873,0 +-38.78318813762367,-6.756169602165869,0 +-38.78048075928842,-6.759246122474551,0 +-38.77926249178647,-6.761076440337247,0 +-38.77832451388384,-6.763203477640069,0 +-38.77711050967044,-6.764890654764097,0 +-38.77647114251779,-6.766740146618941,0 +-38.77508351113752,-6.769286666403965,0 +-38.77353654663095,-6.772260690650221,0 +-38.77201317422207,-6.774515366223098,0 +-38.77093839455281,-6.776352448447786,0 +-38.77029793613033,-6.778203682618059,0 +-38.76849094382487,-6.780167207816389,0 +-38.76786441288222,-6.781586368855377,0 +-38.76709936324975,-6.782855037917694,0 +-38.76615885403511,-6.785118482183397,0 +-38.76483831179534,-6.785792518941022,0 +-38.76350773403865,-6.786753374627375,0 +-38.76305296462525,-6.787751377076299,0 +-38.76260234912271,-6.788573105251423,0 +-38.76215576447246,-6.789268884457824,0 +-38.76176422680519,-6.7897580613485,0 +-38.76120318046043,-6.790495746519249,0 +-38.76037962720743,-6.791480391580149,0 +-38.75971788480963,-6.79251424288467,0 +-38.75930190250984,-6.793505735442321,0 +-38.75902392759007,-6.794163934239508,0 +-38.75854047695737,-6.794690608939143,0 +-38.75791269435327,-6.79575468111023,0 +-38.75747299050325,-6.796283045087623,0 +-38.75682123763406,-6.796849951871661,0 +-38.75661486064723,-6.798013267105932,0 +-38.75613613224251,-6.798461088629245,0 +-38.75604505768913,-6.798667560330206,0 +-38.75577592043798,-6.799161855368034,0 +-38.75550272894627,-6.799779044088604,0 +-38.75548772307126,-6.800234459098866,0 +-38.7554535326505,-6.801273231888926,0 +-38.75546974636727,-6.802065915954261,0 +-38.7555351879424,-6.802653202554688,0 +-38.7555022654791,-6.80366253655319,0 +-38.7553111241209,-6.804330054170107,0 +-38.7551938658224,-6.805336219172586,0 +-38.75523906908637,-6.806555589011228,0 +-38.7552051495106,-6.807601809492919,0 +-38.75518743691958,-6.808145686867759,0 +-38.75512722523924,-6.81056469753655,0 +-38.75518285152788,-6.811584305469591,0 +-38.75477703252027,-6.813442778548391,0 +-38.7539690895874,-6.81460649221075,0 +-38.75359979020995,-6.815528373950686,0 +-38.75312220060076,-6.817127632882367,0 +-38.75265623254015,-6.818303034560368,0 +-38.75208373864243,-6.820155490078214,0 +-38.75161540279691,-6.82133096774715,0 +-38.75086933054745,-6.823005903251169,0 +-38.75084609799277,-6.823684659782052,0 +-38.75021467628815,-6.824597861859115,0 +-38.74872174783035,-6.825912497602848,0 +-38.74791568139635,-6.827167055576774,0 +-38.74701234228649,-6.828761984532091,0 +-38.74504992507126,-6.831268438517045,0 +-38.74456704551219,-6.832773212877329,0 +-38.74350759883769,-6.833671998550068,0 +-38.74252727102674,-6.834840271847148,0 +-38.74163442355479,-6.835926863068125,0 +-38.74040609451793,-6.836741794163606,0 +-38.73896515823245,-6.8387603674372,0 +-38.73840431875359,-6.840112386254764,0 +-38.7374186229374,-6.841276328644432,0 +-38.73634136674607,-6.842693008637418,0 +-38.73510000368198,-6.843848209476421,0 +-38.73352925776583,-6.844565655804411,0 +-38.73283468582725,-6.844798826118264,0 +-38.73128385876635,-6.844919219068839,0 +-38.7295615175973,-6.845034058040546,0 +-38.72835918975873,-6.844995347988592,0 +-38.72654551304609,-6.845193662756166,0 +-38.72481557679479,-6.845395302940215,0 +-38.72300928271102,-6.845506785665513,0 +-38.72120018921206,-6.845703669253298,0 +-38.71912416275106,-6.846148339534757,0 +-38.718517821146,-6.846299385663067,0 +-38.71649583377106,-6.846735751603577,0 +-38.71475965834189,-6.84692899294177,0 +-38.71279271171655,-6.847214715158164,0 +-38.71123615393923,-6.847504234616665,0 +-38.70985720875405,-6.847716572713262,0 +-38.70882386560456,-6.847855001059478,0 +-38.70658762954517,-6.84804158145201,0 +-38.70493886626498,-6.848587315889783,0 +-38.70198812887027,-6.849519646842585,0 +-38.70007692891471,-6.850143343149599,0 +-38.6982395820472,-6.851110700840552,0 +-38.69640580559695,-6.85198803290888,0 +-38.69569979510022,-6.85256101993,0 +-38.69471456846882,-6.853806132715783,0 +-38.6936602816476,-6.854537578208536,0 +-38.69287407600338,-6.854938154904368,0 +-38.69008841215717,-6.856203522235036,0 +-38.68846323306387,-6.856711131603497,0 +-38.68760951689836,-6.856761269404134,0 +-38.68642326301791,-6.8566263421289,0 +-38.68358534486697,-6.856879778497132,0 +-38.68160228228106,-6.857077848615233,0 +-38.680121839695,-6.857448355176543,0 +-38.67987946693884,-6.857459505045818,0 +-38.67916998481548,-6.857530302802004,0 +-38.67853741329421,-6.857547908461438,0 +-38.67818425841246,-6.857555567105862,0 +-38.67758715133726,-6.857629424177031,0 +-38.67725235254586,-6.857674793699307,0 +-38.67706862932026,-6.857706984363074,0 +-38.67555077421136,-6.858010672759206,0 +-38.67402125309309,-6.858181579094245,0 +-38.67361012532397,-6.858241605025197,0 +-38.67316081109417,-6.858318845682098,0 +-38.67274885049189,-6.858378960718318,0 +-38.67237399618676,-6.858421159429907,0 +-38.67171421386798,-6.858527157748691,0 +-38.67109078686035,-6.858579307308089,0 +-38.67071287611522,-6.858622420557052,0 +-38.67007066804501,-6.858750688273978,0 +-38.66957680333968,-6.858846034736035,0 +-38.66912292859799,-6.858868327405879,0 +-38.66889705336703,-6.858898404691627,0 +-38.66863266775893,-6.858945839188077,0 +-38.66684777759878,-6.859100134340244,0 +-38.66645007953945,-6.859087236454206,0 +-38.66492104191876,-6.859514062619584,0 +-38.66347636273588,-6.859785357548532,0 +-38.66275378975173,-6.859921046928293,0 +-38.66105078504322,-6.860506551352204,0 +-38.6598226248833,-6.861495695892152,0 +-38.65923971347243,-6.862268049971347,0 +-38.65873431631504,-6.863044564615131,0 +-38.65756357818219,-6.864438953815843,0 +-38.65706590897599,-6.864901313176548,0 +-38.65567298538224,-6.86573507812269,0 +-38.65437989123132,-6.866247086668769,0 +-38.65300808524608,-6.866755781319625,0 +-38.65154924859718,-6.867576481069728,0 +-38.65122041009839,-6.867959732306275,0 +-38.65016735656137,-6.868556417457548,0 +-38.6488588939519,-6.869466127107228,0 +-38.64745584933896,-6.870975059883864,0 +-38.64721303774868,-6.871085839289323,0 +-38.6463649104285,-6.871414458607251,0 +-38.64559371364071,-6.871746415082392,0 +-38.64458262865401,-6.87214946106881,0 +-38.64408817418222,-6.872608924477668,0 +-38.64328087981484,-6.872938669030626,0 +-38.64219287120652,-6.873377267822255,0 +-38.64093859455956,-6.874242394306902,0 +-38.63988858161643,-6.87487747374517,0 +-38.63863497840805,-6.875624706730012,0 +-38.63779519301993,-6.876027519737429,0 +-38.63731469847551,-6.876363262919041,0 +-38.63656146362463,-6.87668763931114,0 +-38.63576033840933,-6.877130796051481,0 +-38.63556144943691,-6.87735701291198,0 +-38.63491251166347,-6.877962780841897,0 +-38.63443697197532,-6.878179570319171,0 +-38.63409806181757,-6.878490235496761,0 +-38.63359426675014,-6.878762683819554,0 +-38.63262498407775,-6.879223208196481,0 +-38.6316748483959,-6.879680438969831,0 +-38.63127498774742,-6.879936796366197,0 +-38.63082261668393,-6.880226119071408,0 +-38.63043727670574,-6.880570025955191,0 +-38.63001555670005,-6.880961465096993,0 +-38.6295656686822,-6.881183495770886,0 +-38.62908582847501,-6.881286288935162,0 +-38.62846546940961,-6.881519663783388,0 +-38.6279635809863,-6.881807549053165,0 +-38.62780825708241,-6.881903827296157,0 +-38.62751332931902,-6.882113686216231,0 +-38.62721529966159,-6.882390980605639,0 +-38.62681747706319,-6.882563966451547,0 +-38.62660972360571,-6.882658648689834,0 +-38.62628351531247,-6.882816450988003,0 +-38.62581593866219,-6.883138316260577,0 +-38.62571149590831,-6.883202518915804,0 +-38.62543306090062,-6.883345867820053,0 +-38.62513267869002,-6.883556935900317,0 +-38.6250285523525,-6.883587664311954,0 +-38.62469563877464,-6.883763941542759,0 +-38.62464143681265,-6.883830117366419,0 +-38.62434009926965,-6.884112289431845,0 +-38.62411870878454,-6.884104737003276,0 +-38.62382558929087,-6.884195697945149,0 +-38.62353150913695,-6.884339427316406,0 +-38.62306692061578,-6.884512419611497,0 +-38.62281101685824,-6.88455623953652,0 +-38.62262028201892,-6.884651061561629,0 +-38.62218610269013,-6.884889949686238,0 +-38.621878335801,-6.884982965973709,0 +-38.6217084830753,-6.885012292384181,0 +-38.62148747460372,-6.885039701871538,0 +-38.62111205055587,-6.885129972196312,0 +-38.62087181467721,-6.88517234332201,0 +-38.6205770297499,-6.885279828741418,0 +-38.62011179143683,-6.885364668992049,0 +-38.61990476201213,-6.885408087250443,0 +-38.61968153631847,-6.88543425090718,0 +-38.61933202419033,-6.885539299397585,0 +-38.61924511830578,-6.885552971647225,0 +-38.61873999184032,-6.885583787649584,0 +-38.61828000819609,-6.885634327818216,0 +-38.6174392240307,-6.885709349209552,0 +-38.61688586947603,-6.885895290380811,0 +-38.61621536477371,-6.886009502948429,0 +-38.61602644989354,-6.886037181990308,0 +-38.61556199177399,-6.886123570360941,0 +-38.61511409684974,-6.886228033564624,0 +-38.61437587575864,-6.886340323042782,0 +-38.61418826755747,-6.886334352461373,0 +-38.61375634675341,-6.88642117016717,0 +-38.61325618056714,-6.886471892760694,0 +-38.61304811782546,-6.886515728758305,0 +-38.61270136762838,-6.886588997598789,0 +-38.61259580473534,-6.886636316640887,0 +-38.61198116540397,-6.886649187005815,0 +-38.61106774262241,-6.886840065440407,0 +-38.61035591707195,-6.887005313060433,0 +-38.60963056763475,-6.887118580067255,0 +-38.60916423237279,-6.887222666978175,0 +-38.60852746239353,-6.887321118120181,0 +-38.60795711367358,-6.887472674237222,0 +-38.6074741619413,-6.887592945237369,0 +-38.60699349459307,-6.887695964396599,0 +-38.60661757728316,-6.887734418746873,0 +-38.60601475225449,-6.88773244507338,0 +-38.6056852184493,-6.887790080960065,0 +-38.60526644231479,-6.887913136864283,0 +-38.60483315244939,-6.887950681972046,0 +-38.60453921477794,-6.887958479925899,0 +-38.60422570166927,-6.887965982722981,0 +-38.60394451749593,-6.888025743716783,0 +-38.60364621957108,-6.888084974771907,0 +-38.60309336092167,-6.888095977902826,0 +-38.60283433887099,-6.888121463151562,0 +-38.60215828142214,-6.888235697586932,0 +-38.6012723560339,-6.888377683498256,0 +-38.60094230203426,-6.888435603788581,0 +-38.60056208685531,-6.888457662621638,0 +-38.60026894050525,-6.888482615583936,0 +-38.59997470217432,-6.888558876594058,0 +-38.59941293972453,-6.888780353430447,0 +-38.59851379431845,-6.889060491172339,0 +-38.59795749880021,-6.889128348049943,0 +-38.59775099081099,-6.889121545648963,0 +-38.59722810811117,-6.889224845926008,0 +-38.59691502115615,-6.889266236743416,0 +-38.59652980074046,-6.889305627440002,0 +-38.59600232433396,-6.88939225596869,0 +-38.59573974988366,-6.889384061217845,0 +-38.59544004102219,-6.889426384881587,0 +-38.59536975491413,-6.889424214938716,0 +-38.59375067059346,-6.889716862346092,0 +-38.59335180594374,-6.889704169519996,0 +-38.59316095907104,-6.889698258293228,0 +-38.59277771261781,-6.889721181527036,0 +-38.59248006747944,-6.88978081593383,0 +-38.59207839804346,-6.889836730406741,0 +-38.59153409283795,-6.890008615481677,0 +-38.59108097476224,-6.890062471549571,0 +-38.59039974615839,-6.890262626889212,0 +-38.58980931101542,-6.890362349073,0 +-38.58933930923494,-6.890382050694043,0 +-38.58907712855099,-6.890425451317611,0 +-38.58867499658729,-6.890498802852079,0 +-38.58830772443619,-6.890539213910087,0 +-38.58794044836202,-6.89056255898786,0 +-38.58760766935841,-6.890604046977808,0 +-38.58736239182718,-6.890631031859439,0 +-38.58656289023257,-6.890912022449516,0 +-38.58594290848326,-6.891084028473773,0 +-38.58583777042126,-6.891081000279242,0 +-38.58521718893448,-6.891117971709815,0 +-38.58503395891355,-6.891071022494033,0 +-38.58457993365564,-6.891138423833502,0 +-38.58416861142816,-6.891146464050918,0 +-38.58396119040066,-6.891201354947032,0 +-38.58375443359139,-6.891235776579914,0 +-38.58346415933924,-6.891308315066454,0 +-38.5829257610468,-6.891472470074793,0 +-38.58271784439599,-6.891547351840879,0 +-38.5816881701931,-6.892137860695105,0 +-38.581500919158,-6.892193131905502,0 +-38.58108921795758,-6.892395166004189,0 +-38.58068017069555,-6.89261138479431,0 +-38.58011069525891,-6.892959799009128,0 +-38.57973182231758,-6.893221652781354,0 +-38.57925914050509,-6.893555783483681,0 +-38.57875518444433,-6.893933279115585,0 +-38.57840831338332,-6.894255164309673,0 +-38.57779851861338,-6.894706790493979,0 +-38.57749990205195,-6.894956546558722,0 +-38.57704503262453,-6.895278526258311,0 +-38.57685535475903,-6.895454942946609,0 +-38.57641599265136,-6.895760763422607,0 +-38.57597712026532,-6.896065464774765,0 +-38.57550801223336,-6.896368751694739,0 +-38.57528799726231,-6.896543758694727,0 +-38.57511569998402,-6.896659781521058,0 +-38.57477499672159,-6.896799604424593,0 +-38.5744294646365,-6.89698899665503,0 +-38.57394795202134,-6.897488362152589,0 +-38.57378872359306,-6.897665762677966,0 +-38.57324522931091,-6.897876222519195,0 +-38.57250889189607,-6.898367924343461,0 +-38.5720036031741,-6.898866173050996,0 +-38.57183232378631,-6.898966585837014,0 +-38.5715029344624,-6.899228747705401,0 +-38.57108191172686,-6.899459070325735,0 +-38.57078565345405,-6.899602543207122,0 +-38.57007812502037,-6.900010817376384,0 +-38.56971810839741,-6.900198164387445,0 +-38.56947972109238,-6.900405055820281,0 +-38.56922449819466,-6.900642345120788,0 +-38.56919310899518,-6.900656766918804,0 +-38.56872260983953,-6.901153423510709,0 +-38.56853480914737,-6.901254120421314,0 +-38.56820792589411,-6.901395838508084,0 +-38.56792560730124,-6.901614453041183,0 +-38.56769119880553,-6.90175894322376,0 +-38.56731912237258,-6.901868774783673,0 +-38.56699190470462,-6.901995578716993,0 +-38.56642928442174,-6.902222216238594,0 +-38.56610034937123,-6.902349692301676,0 +-38.56586468656477,-6.902464739415797,0 +-38.56530707457082,-6.902538431997785,0 +-38.56493784052992,-6.902526244792819,0 +-38.56449295943143,-6.902511268221031,0 +-38.56421776986218,-6.902501837844083,0 +-38.56401941186291,-6.902464658396276,0 +-38.56372831228114,-6.902409390280061,0 +-38.56343762932654,-6.902323633895898,0 +-38.56319667524443,-6.902178081465042,0 +-38.56302739124549,-6.902172575321119,0 +-38.56279700016776,-6.902149796700059,0 +-38.56262826708448,-6.902129012466801,0 +-38.56053888840525,-6.901724355163754,0 +-38.56026344893037,-6.901700167632226,0 +-38.55957937743997,-6.901464062128206,0 +-38.55910629800773,-6.901341839496712,0 +-38.55860276404315,-6.901234123423468,0 +-38.55780835279102,-6.901101513687538,0 +-38.55725856707748,-6.90102276754537,0 +-38.55677274587197,-6.900900611015991,0 +-38.55616434650085,-6.900682262566647,0 +-38.55576252974187,-6.900668462385875,0 +-38.55526740253597,-6.900636167627024,0 +-38.55479051118241,-6.900589806789121,0 +-38.55451446304067,-6.90050405123175,0 +-38.5543459153863,-6.900437131725897,0 +-38.5532791395828,-6.900219591023504,0 +-38.55250213907235,-6.899979831325884,0 +-38.55215289517658,-6.899830667764372,0 +-38.55186112786139,-6.89980610188434,0 +-38.55140035164563,-6.899776204199521,0 +-38.55138498119408,-6.899775718707774,0 +-38.5505720579501,-6.899640707833234,0 +-38.55037305264824,-6.899587919149031,0 +-38.54992926148303,-6.899449924556115,0 +-38.54953142543116,-6.899344858453089,0 +-38.548875511534,-6.899108798403329,0 +-38.54858358866742,-6.899037308043352,0 +-38.54830645042964,-6.898981620977252,0 +-38.54784221886371,-6.898825131769057,0 +-38.54725616780695,-6.898665944390395,0 +-38.54707610997672,-6.898506651641944,0 +-38.5468089406761,-6.898206885248427,0 +-38.54611365113892,-6.897539085105902,0 +-38.54595001838577,-6.897349471465411,0 +-38.54580086326416,-6.89719100047423,0 +-38.54560950550745,-6.896908488658466,0 +-38.54522094295834,-6.896512395445797,0 +-38.54484205716732,-6.896285398067843,0 +-38.54432562108493,-6.895977419007151,0 +-38.544068828975,-6.895739079645481,0 +-38.54373605246536,-6.895436496168027,0 +-38.5433050693724,-6.894930810591942,0 +-38.54291443038203,-6.894611021518578,0 +-38.54268926801491,-6.894434961191053,0 +-38.54250920412274,-6.894306550153782,0 +-38.54229770505184,-6.89419249388134,0 +-38.54209845097599,-6.894139948802414,0 +-38.54180641092476,-6.89406887310411,0 +-38.54159047216118,-6.894030954893642,0 +-38.53955352750883,-6.894360757435239,0 +-38.53914690876454,-6.894455640765554,0 +-38.53864585405137,-6.894609486395356,0 +-38.53778583196095,-6.894889148853527,0 +-38.53714179843391,-6.895175323614363,0 +-38.5363731035475,-6.895472924591925,0 +-38.53609458144951,-6.895479168390717,0 +-38.53579994671109,-6.895484967993891,0 +-38.53544473782996,-6.89554983168629,0 +-38.53516520276205,-6.895647871854448,0 +-38.53479327968226,-6.89580377819068,0 +-38.53426136801352,-6.89612280267367,0 +-38.53384145437565,-6.89630751179577,0 +-38.53357979291822,-6.896374826275266,0 +-38.53335256146653,-6.896381687359993,0 +-38.53306348461545,-6.896401834013232,0 +-38.53280242106136,-6.896438731969528,0 +-38.53236766291428,-6.896486198581075,0 +-38.53140184579455,-6.896687444502832,0 +-38.53081861379456,-6.89670443182349,0 +-38.52979904995345,-6.896707094852813,0 +-38.52903061185371,-6.896826469090728,0 +-38.52767763936948,-6.897070213723985,0 +-38.52698880671328,-6.897117958670329,0 +-38.52633738499711,-6.89713129171908,0 +-38.52553334174344,-6.897285235432779,0 +-38.52487827011844,-6.897335769812267,0 +-38.52418464511049,-6.8974215161263,0 +-38.52312442625596,-6.89767482991397,0 +-38.52191641870388,-6.897995550625237,0 +-38.52140220540105,-6.898123494507397,0 +-38.52081573743179,-6.898213288648714,0 +-38.52041410575576,-6.89830800096951,0 +-38.5198320965291,-6.898360809084823,0 +-38.51709348122552,-6.898749873928112,0 +-38.51618907762913,-6.898719480292798,0 +-38.51539102444079,-6.898728865178051,0 +-38.51480330747498,-6.898854505362603,0 +-38.51387742666282,-6.899115087587345,0 +-38.51299631567092,-6.899231939328189,0 +-38.51211873021905,-6.899383831225916,0 +-38.5109511938638,-6.899597662191319,0 +-38.51033303483892,-6.899613791658973,0 +-38.50920406417218,-6.899756885629851,0 +-38.50811469398725,-6.89979319373553,0 +-38.50752883074409,-6.899954099029076,0 +-38.50658084619161,-6.900067137068077,0 +-38.50603530955068,-6.900085326873569,0 +-38.505520121167,-6.900212714512904,0 +-38.50460890127884,-6.90018300493666,0 +-38.50398836057913,-6.900198862203795,0 +-38.50322356064495,-6.900173895001035,0 +-38.50264482372453,-6.900046580932427,0 +-38.50181188078871,-6.900019347922839,0 +-38.50087715232212,-6.899988784788047,0 +-38.50016001731263,-6.899929299034577,0 +-38.49933231234333,-6.899722051520247,0 +-38.49897235996067,-6.899529957968787,0 +-38.4980677521087,-6.899066813414751,0 +-38.49749518226094,-6.898723038462234,0 +-38.49647739871786,-6.898267809390548,0 +-38.49597828127157,-6.897999206872112,0 +-38.49480454163916,-6.897238896157197,0 +-38.49318257270594,-6.896752293007435,0 +-38.49225267419456,-6.896215217324424,0 +-38.49125252942562,-6.895566643702486,0 +-38.49052918944833,-6.895361653690609,0 +-38.4898400045331,-6.895230347388302,0 +-38.48829184525727,-6.894563349758452,0 +-38.48743067860856,-6.894136844304476,0 +-38.48656594055631,-6.893818937042959,0 +-38.48581038481442,-6.893541234688142,0 +-38.48488505884151,-6.893116123608849,0 +-38.48431797414744,-6.892663829623179,0 +-38.48368190091043,-6.892321026726826,0 +-38.48297657252184,-6.891940897101907,0 +-38.48202156045699,-6.891591134996483,0 +-38.48155994989033,-6.891397457707043,0 +-38.48024373146616,-6.890786764113233,0 +-38.47917565299374,-6.890175594133651,0 +-38.47763482208969,-6.88958065668491,0 +-38.47710351677728,-6.88919785791871,0 +-38.47642549263345,-6.888888989225013,0 +-38.47575003730142,-6.888506528480016,0 +-38.47485698476033,-6.888085032602987,0 +-38.4741759206205,-6.887778788579475,0 +-38.47356866175001,-6.887367518965782,0 +-38.47303120014323,-6.886993847724868,0 +-38.47252471144142,-6.886799591044573,0 +-38.47169560563944,-6.886413747068936,0 +-38.47090210997585,-6.88617073415696,0 +-38.46974687772341,-6.885772060219687,0 +-38.46862446016301,-6.884943294485331,0 +-38.46826270433323,-6.884678405160805,0 +-38.46750548476196,-6.88414621194465,0 +-38.46725968088694,-6.883883808012206,0 +-38.46607495261618,-6.882923436956842,0 +-38.46513411570852,-6.88255963756388,0 +-38.46459524952075,-6.882247424223745,0 +-38.46409258608986,-6.882014084458262,0 +-38.46348684958144,-6.881597866563221,0 +-38.46302284618955,-6.881294407734672,0 +-38.46234342022354,-6.880874018225005,0 +-38.46123512309821,-6.880151816703784,0 +-38.46073086600816,-6.879919031131465,0 +-38.45965382453718,-6.87930469129457,0 +-38.45932946372074,-6.879149349160022,0 +-38.45849971081589,-6.878760221939728,0 +-38.45791757748695,-6.878561226422587,0 +-38.45719026528133,-6.87828457703118,0 +-38.45614094452197,-6.877850406310774,0 +-38.45553766005261,-6.877610189288307,0 +-38.45504129692929,-6.877374848916439,0 +-38.45450408425132,-6.877139215205945,0 +-38.4532126723539,-6.876697476685503,0 +-38.45256096368377,-6.876494985298979,0 +-38.45206315158601,-6.876297406906044,0 +-38.45149747393339,-6.876061658934473,0 +-38.45071602534389,-6.875710700841593,0 +-38.44940612435499,-6.875153756378877,0 +-38.44868618814425,-6.874949808661325,0 +-38.44739929882482,-6.874367999232642,0 +-38.44581678501125,-6.873810060957894,0 +-38.44366382324963,-6.872944852555756,0 +-38.44265535389736,-6.872586662603537,0 +-38.44225759542628,-6.872465052848517,0 +-38.44128560124703,-6.87207137315843,0 +-38.44023543797702,-6.871673877181231,0 +-38.43943776622785,-6.87135674023158,0 +-38.43810764302162,-6.870879269050166,0 +-38.43736317170568,-6.870458412006938,0 +-38.436756758451,-6.870222823414729,0 +-38.43622180090529,-6.870025761279011,0 +-38.43554283623444,-6.869787925793137,0 +-38.43488673405907,-6.869693003776383,0 +-38.43434018437397,-6.869601861004145,0 +-38.43357843501011,-6.869395069301627,0 +-38.43336356442805,-6.869279473010788,0 +-38.43256527153438,-6.868926048295286,0 +-38.43184794956712,-6.868576866431677,0 +-38.43127629120573,-6.868232437341896,0 +-38.43066220414359,-6.868067536766056,0 +-38.43019065599503,-6.868015112222836,0 +-38.42968213641915,-6.867996288935906,0 +-38.42892315711646,-6.867823447822985,0 +-38.42812318331453,-6.867757272400453,0 +-38.42753971407092,-6.867735335125909,0 +-38.426327925279,-6.86787077627315,0 +-38.42515578700964,-6.86782692040004,0 +-38.42351885713477,-6.86736859618199,0 +-38.42282265491306,-6.867307724491361,0 +-38.42226385083092,-6.867393214902052,0 +-38.42118832279868,-6.867385985284471,0 +-38.42042361763449,-6.867291136357265,0 +-38.4200601585335,-6.867281784552214,0 +-38.41969878714355,-6.867236365454988,0 +-38.4191956506318,-6.86722620852349,0 +-38.41879468701406,-6.867214198940193,0 +-38.41820759095077,-6.867305475658604,0 +-38.41765711703092,-6.867360749157818,0 +-38.41666377035738,-6.8674736484235,0 +-38.41600492685758,-6.867562658766309,0 +-38.41490450192791,-6.867709609065183,0 +-38.41428464474259,-6.867689929694309,0 +-38.4135523688161,-6.86781255418927,0 +-38.41329732386918,-6.867804446833428,0 +-38.41239422365377,-6.867889417994204,0 +-38.41076496649382,-6.867577701634285,0 +-38.41013522222062,-6.867705145294874,0 +-38.40984090104043,-6.867732536357043,0 +-38.40917809188714,-6.867821386964776,0 +-38.40866254570472,-6.867914205448002,0 +-38.40792822198871,-6.867999942853336,0 +-38.40723200844139,-6.868050615169436,0 +-38.40646079149514,-6.868171412836102,0 +-38.40484003326336,-6.86863043842764,0 +-38.4036618022854,-6.86898924334831,0 +-38.40307811097542,-6.869006218902985,0 +-38.40237952057284,-6.869163384187744,0 +-38.40120432760997,-6.869487789377229,0 +-38.40036019413827,-6.869603845479476,0 +-38.39922433121426,-6.869637434613919,0 +-38.39877712696263,-6.869656536270794,0 +-38.39781400812555,-6.869840975053545,0 +-38.397296128797,-6.869895785339419,0 +-38.39655970235081,-6.869907152788045,0 +-38.39615503008433,-6.869893441765558,0 +-38.39549552105645,-6.869981129407868,0 +-38.39498857812321,-6.87000156385277,0 +-38.39448974846135,-6.869986673156429,0 +-38.3941356743779,-6.869976282117889,0 +-38.3935942632552,-6.870031767971308,0 +-38.39260949072935,-6.870434760634551,0 +-38.39202749470859,-6.870451862675016,0 +-38.39184574047897,-6.870445890390027,0 +-38.39077016449557,-6.870374313667922,0 +-38.39008451349995,-6.870170506875479,0 +-38.38958282906847,-6.869900199769116,0 +-38.38904173600105,-6.869700688504079,0 +-38.38809956176223,-6.869377044608488,0 +-38.38752682552552,-6.869068951835822,0 +-38.38670665914248,-6.868424435727852,0 +-38.38631389240501,-6.868083551450192,0 +-38.38574001615208,-6.86773766054249,0 +-38.3853450363777,-6.867506519491624,0 +-38.38477286304664,-6.867050509747535,0 +-38.38398409598926,-6.866551970001544,0 +-38.38260613888119,-6.865499021491469,0 +-38.38242959211212,-6.865310880826625,0 +-38.38174740764121,-6.864958501449724,0 +-38.38109935979281,-6.864683920914705,0 +-38.38059598844434,-6.864449953416861,0 +-38.38023895053849,-6.864220098240928,0 +-38.37963197291697,-6.863871976614499,0 +-38.37909866348082,-6.863456121324583,0 +-38.37852444496964,-6.863112288057489,0 +-38.3780975925651,-6.862700513949294,0 +-38.37777765324217,-6.862400204293168,0 +-38.37739080606347,-6.861879946894039,0 +-38.37696388025693,-6.861466764316253,0 +-38.37635833418005,-6.860974843953184,0 +-38.37568203949569,-6.860517266033393,0 +-38.37515430723654,-6.86021109128774,0 +-38.37479731766685,-6.860018403701214,0 +-38.37408464320202,-6.859597011151782,0 +-38.37327264224182,-6.858919471789108,0 +-38.37284038286057,-6.858541175356193,0 +-38.37244236381702,-6.858199580043089,0 +-38.37189765207296,-6.857779235735396,0 +-38.36996096984739,-6.856277890907332,0 +-38.36975126708025,-6.855976736799456,0 +-38.36889293429526,-6.85539592326812,0 +-38.36849805588314,-6.855166542353023,0 +-38.36795856781985,-6.854894206445077,0 +-38.36760037145405,-6.854664800544191,0 +-38.36727975751203,-6.854400593429022,0 +-38.36649236420735,-6.853866860776271,0 +-38.36585056818524,-6.853442768869787,0 +-38.36535605852239,-6.852988557319372,0 +-38.3645399959618,-6.852413318970171,0 +-38.36379060132878,-6.851881425231888,0 +-38.36293256163162,-6.851274006570121,0 +-38.36257396627632,-6.851009185117944,0 +-38.36214561161141,-6.850633107743413,0 +-38.36178623880777,-6.850367991887769,0 +-38.36132077234494,-6.850026311045914,0 +-38.36069374360938,-6.849459382129263,0 +-38.36016488886187,-6.84900653006152,0 +-38.35991771987759,-6.84874469956118,0 +-38.35922907409106,-6.84839594023957,0 +-38.35893638541578,-6.848277541578446,0 +-38.35860999802355,-6.848085348774057,0 +-38.35736778541463,-6.847178613171936,0 +-38.35719242030304,-6.846989522762498,0 +-38.35680105349761,-6.846720644182074,0 +-38.35641086012537,-6.846451059610849,0 +-38.35602126327819,-6.846181844742079,0 +-38.35528831849248,-6.845569510700578,0 +-38.35489851991858,-6.845409188484311,0 +-38.3543615011653,-6.845281360264006,0 +-38.35368453044619,-6.845040734031854,0 +-38.35325728702728,-6.84481054646068,0 +-38.35289717187763,-6.844620048556759,0 +-38.35220707380989,-6.844455104426378,0 +-38.35165999214476,-6.844366423739024,0 +-38.35089258352583,-6.844342389661914,0 +-38.3502009352507,-6.844319931322114,0 +-38.3497983261231,-6.844307319108126,0 +-38.34936005709518,-6.844257460115672,0 +-38.34784381499841,-6.8442055116343,0 +-38.34715873490065,-6.844146167335062,0 +-38.34661811978391,-6.844020007731707,0 +-38.3460686985224,-6.843930738039607,0 +-38.34584539378267,-6.8439241200868,0 +-38.34446130796557,-6.843773118879851,0 +-38.34391602449298,-6.84375634470836,0 +-38.34319145303769,-6.843625193732548,0 +-38.34228442429576,-6.843451894973592,0 +-38.34166387861271,-6.843396988306798,0 +-38.34115085625573,-6.843416699232195,0 +-38.34049233532385,-6.84339549728535,0 +-38.3396916469394,-6.843260153009699,0 +-38.33918146323722,-6.843170964806986,0 +-38.33848287696431,-6.843221066641693,0 +-38.337635979909,-6.84330276738117,0 +-38.33686227988801,-6.843278621386401,0 +-38.33639077175172,-6.84329798874993,0 +-38.33591702241574,-6.843281892019961,0 +-38.33525809198225,-6.843260236739157,0 +-38.33444696179405,-6.843126155256215,0 +-38.33407582450685,-6.843078520922675,0 +-38.33338650968909,-6.843054638333291,0 +-38.33189662444135,-6.843003822384873,0 +-38.33108062296947,-6.842978260057531,0 +-38.33055678350208,-6.842962298160622,0 +-38.33018203183859,-6.842950878690222,0 +-38.32936760828802,-6.842924795483208,0 +-38.32883388819623,-6.842905379395357,0 +-38.32738617114326,-6.843043192334701,0 +-38.32658397610787,-6.842945748980216,0 +-38.32548971015188,-6.84269178849964,0 +-38.32460751740406,-6.842626482641204,0 +-38.32379694550328,-6.842601969742959,0 +-38.32231754059551,-6.842663059728415,0 +-38.32180093489868,-6.842646046353477,0 +-38.32114205498734,-6.842441308813459,0 +-38.32011497010371,-6.842223870645469,0 +-38.31945870082738,-6.842054778743302,0 +-38.31849976101799,-6.841877162090563,0 +-38.31813314142709,-6.841645377073482,0 +-38.31780401287699,-6.841451063055804,0 +-38.31733793075581,-6.841031522590465,0 +-38.31716090884073,-6.840768498017634,0 +-38.3166865530419,-6.840274207834236,0 +-38.31650373614028,-6.840046777909567,0 +-38.31614162653776,-6.839665966591934,0 +-38.31589704077125,-6.839104511352372,0 +-38.31579886850375,-6.838546883064678,0 +-38.31573691643079,-6.838138744742839,0 +-38.3156695105476,-6.837915005686929,0 +-38.31541487726088,-6.836615128837373,0 +-38.31535125599638,-6.836243179126352,0 +-38.31532837146822,-6.835799315735825,0 +-38.31534265617501,-6.835356646974088,0 +-38.31535575198295,-6.834950817511852,0 +-38.3157617584169,-6.833972623257994,0 +-38.31590900820544,-6.833659204779662,0 +-38.31631260207465,-6.83253515927131,0 +-38.316463517109,-6.832130630320514,0 +-38.316663074014,-6.831636679863061,0 +-38.31690553188437,-6.831189532476824,0 +-38.31734265939741,-6.830567367764716,0 +-38.3175447401597,-6.829982429538042,0 +-38.31765271836103,-6.829439382284843,0 +-38.31771578392669,-6.828894895130174,0 +-38.31769031281495,-6.828302569514482,0 +-38.31762273212012,-6.827618293480096,0 +-38.31723591335898,-6.826831381544485,0 +-38.31697314636391,-6.826458418835571,0 +-38.31629654400667,-6.824780865625017,0 +-38.31600672010965,-6.824155154362744,0 +-38.31541420188174,-6.823273390620569,0 +-38.31475896529099,-6.822388459714684,0 +-38.31406293987735,-6.82081358351957,0 +-38.31353153052456,-6.8199278288717,0 +-38.31203161752189,-6.818205882933044,0 +-38.31078750726075,-6.816307002182814,0 +-38.31043674248942,-6.815616303177418,0 +-38.3100404423797,-6.8144284508741,0 +-38.30962763397557,-6.813734498666541,0 +-38.30928641561207,-6.812734840035881,0 +-38.30880842503485,-6.812100956064967,0 +-38.30827295736378,-6.811340585363552,0 +-38.30798448515078,-6.810650253941514,0 +-38.30789372217377,-6.809656925306808,0 +-38.30767030191898,-6.808906931204167,0 +-38.30673709449061,-6.807019983280322,0 +-38.30638320534239,-6.806451793906893,0 +-38.30566017522188,-6.805684999466141,0 +-38.30530894480503,-6.80499246675978,0 +-38.30495195302139,-6.804485573437946,0 +-38.30392027599458,-6.803646746056224,0 +-38.30289921465217,-6.802562182804524,0 +-38.30181444364236,-6.801537918279808,0 +-38.30096191187019,-6.800952948339139,0 +-38.29912160358811,-6.799393677336387,0 +-38.29845270671972,-6.798939667485844,0 +-38.29746850745937,-6.798535158754249,0 +-38.29698464648887,-6.798085514600764,0 +-38.29643462225653,-6.797757692147035,0 +-38.29551323320864,-6.797355690528383,0 +-38.29454195862068,-6.79658052200385,0 +-38.29374320006497,-6.796244579684942,0 +-38.2933240586954,-6.79573547307847,0 +-38.29278053979435,-6.795222303731093,0 +-38.29199033162123,-6.794639659643575,0 +-38.29144680869511,-6.794126979487041,0 +-38.29029507335797,-6.793161018787638,0 +-38.28962663195726,-6.792643866730822,0 +-38.28864867353742,-6.792054427922451,0 +-38.28736502862026,-6.79133117686682,0 +-38.28608202448235,-6.790608247716817,0 +-38.2848698546254,-6.789640481162783,0 +-38.28415852245611,-6.788565342478168,0 +-38.28355878227435,-6.787864862094449,0 +-38.28264370375349,-6.787340467737097,0 +-38.28172078518548,-6.786937745261245,0 +-38.28105935053524,-6.786235447380711,0 +-38.28032648337715,-6.785840682040869,0 +-38.27947656628622,-6.785131225969683,0 +-38.2785632222278,-6.78454491952323,0 +-38.27771394736789,-6.783835766740276,0 +-38.27673750379248,-6.783246918752169,0 +-38.27619022150314,-6.782857769267772,0 +-38.27514893533279,-6.782328308386697,0 +-38.2746567501805,-6.782126062989509,0 +-38.27241605258701,-6.782051515373135,0 +-38.27086239414542,-6.781938319778622,0 +-38.26992857732996,-6.781910542107132,0 +-38.26881100207876,-6.781810494181955,0 +-38.26645064373652,-6.781606369724155,0 +-38.26570395310154,-6.781581664395757,0 +-38.26402464526743,-6.781527577104771,0 +-38.26290027662752,-6.781613352279945,0 +-38.26178237816321,-6.781514323464246,0 +-38.25986782546396,-6.7809530870686,0 +-38.25831740743618,-6.78084313672699,0 +-38.25794274389676,-6.780893228325249,0 +-38.25676141536859,-6.780918214467277,0 +-38.2546639108776,-6.780544487622151,0 +-38.2537331495761,-6.780388247620521,0 +-38.25273749444612,-6.780228178684127,0 +-38.25186417105891,-6.780134340363733,0 +-38.25086522061896,-6.780035868142634,0 +-38.24942820518227,-6.779921859360346,0 +-38.24806049067842,-6.779814445139191,0 +-38.24677936542523,-6.779645919758858,0 +-38.24592440370805,-6.779482100568386,0 +-38.24547763398715,-6.779333060036098,0 +-38.24443148071317,-6.779315660055789,0 +-38.24318342198573,-6.779152799094239,0 +-38.242744373082,-6.779060996488011,0 +-38.24230187287229,-6.779048785439174,0 +-38.24125702626473,-6.77889610682245,0 +-38.24053027450508,-6.778873387177396,0 +-38.24004526554888,-6.7788572253267,0 +-38.23939859806507,-6.778835688229856,0 +-38.2388328920097,-6.77881758348697,0 +-38.23830753941003,-6.778801623734616,0 +-38.23790325778299,-6.778789311677271,0 +-38.23733851009186,-6.778730335442185,0 +-38.23677240816968,-6.778711513621796,0 +-38.23616806206414,-6.77861305906248,0 +-38.23495645255798,-6.778494295572497,0 +-38.23370059428181,-6.778493104463332,0 +-38.23236118314503,-6.778492127150889,0 +-38.23151325710078,-6.77846161284271,0 +-38.23062915102057,-6.778348593451667,0 +-38.22986531308052,-6.778241148387773,0 +-38.22929938639884,-6.778222159731051,0 +-38.22860861872648,-6.778240751490971,0 +-38.22779798332913,-6.778214884448139,0 +-38.2267898019489,-6.778218899143606,0 +-38.2261068206833,-6.778075366946314,0 +-38.22534223604642,-6.777969033750908,0 +-38.22243383520318,-6.777810504138572,0 +-38.2206922226464,-6.777462322800186,0 +-38.21807446007867,-6.777085264270204,0 +-38.21700731154713,-6.7769529883419,0 +-38.21535327664632,-6.776897842158945,0 +-38.21419200679777,-6.776665728570202,0 +-38.21263461776181,-6.776613957940994,0 +-38.21079482788456,-6.776262547633009,0 +-38.20905617407386,-6.775817644714179,0 +-38.20770492259727,-6.775385733618226,0 +-38.20567343570647,-6.774931023037098,0 +-38.20364230770554,-6.774573060485568,0 +-38.20228209132777,-6.774527736489948,0 +-38.19966105278105,-6.774343677951178,0 +-38.19819582667553,-6.774584978472916,0 +-38.19622453289868,-6.77509969786222,0 +-38.19534536455128,-6.775070491306938,0 +-38.19328246194426,-6.775388945229308,0 +-38.19219533241797,-6.775836527374627,0 +-38.19091326190541,-6.776277627004075,0 +-38.18783062650605,-6.776754835335546,0 +-38.1861729213816,-6.776796582496874,0 +-38.18460544823517,-6.777035168590328,0 +-38.18089393922407,-6.777203130508527,0 +-38.17815779602225,-6.777306595195006,0 +-38.17707769047592,-6.777464992582754,0 +-38.17530777418562,-6.777890135401432,0 +-38.17412891741555,-6.778141310777412,0 +-38.17157650530076,-6.778637106432909,0 +-38.1692288912504,-6.77884913881433,0 +-38.16805671947397,-6.778906787158804,0 +-38.16551300921424,-6.779112624834403,0 +-38.16307105309683,-6.779128652333021,0 +-38.16160112419296,-6.779273715257414,0 +-38.16051815117676,-6.779528458652369,0 +-38.15933749122107,-6.779779996430008,0 +-38.15757739183945,-6.779818671561982,0 +-38.15659166067422,-6.78007670499187,0 +-38.15500972178771,-6.78070199887389,0 +-38.15393816381169,-6.780666041247427,0 +-38.15060489390739,-6.781423917567191,0 +-38.14884415119791,-6.781557472586593,0 +-38.14649292897403,-6.781864193055333,0 +-38.14492844122587,-6.782002870785244,0 +-38.14316832244661,-6.782140072828937,0 +-38.14150521079417,-6.782279658421121,0 +-38.13806355827628,-6.783039470050233,0 +-38.13434232230217,-6.783401126960815,0 +-38.13296636744706,-6.783647160186739,0 +-38.13139546147159,-6.783886450134688,0 +-38.12884752157645,-6.784094328136566,0 +-38.12658832031132,-6.784408611820769,0 +-38.12384300004138,-6.784610309124968,0 +-38.12158909979895,-6.784921310376653,0 +-38.11923590575238,-6.785325327801326,0 +-38.11797001019705,-6.785282072571101,0 +-38.11679589530346,-6.785435432077665,0 +-38.11562483598744,-6.785492133413522,0 +-38.11445110822218,-6.785645442125397,0 +-38.11241683164891,-6.785762998921747,0 +-38.11105273715471,-6.78571732687473,0 +-38.10929072127273,-6.786234866843334,0 +-38.10802038763207,-6.786193884783889,0 +-38.10675211418118,-6.786056473695898,0 +-38.10400805555678,-6.785382139082014,0 +-38.10305030829663,-6.784866353304031,0 +-38.10159940268321,-6.784524744429093,0 +-38.10033689657311,-6.784384261952445,0 +-38.09829339297597,-6.784222388002547,0 +-38.0971233357343,-6.784185104772188,0 +-38.09556072589774,-6.784138288829316,0 +-38.09408413488696,-6.784385559639121,0 +-38.09280194416403,-6.784638874870854,0 +-38.0913280094158,-6.784881165903883,0 +-38.08848740872241,-6.785172141888664,0 +-38.0877018546773,-6.785338475502226,0 +-38.08717254064695,-6.785549651870912,0 +-38.08682165018838,-6.785629250244538,0 +-38.08604573053409,-6.78573479961982,0 +-38.085325819824,-6.785895540433286,0 +-38.08497538418213,-6.785993861930445,0 +-38.08462717234551,-6.786038180305258,0 +-38.08415050111085,-6.786132827954388,0 +-38.08383824949275,-6.786231267353858,0 +-38.08350865750001,-6.786310335196402,0 +-38.0831413111704,-6.786443438015827,0 +-38.08281205160987,-6.786541753755327,0 +-38.08246290452296,-6.786711272694451,0 +-38.08215296895385,-6.786809859303144,0 +-38.08198756643653,-6.786912763251465,0 +-38.08158842749415,-6.78700807408366,0 +-38.08095879923729,-6.787060207369088,0 +-38.08076067356169,-6.787107844523383,0 +-38.08009829885388,-6.7870500729758,0 +-38.07910224175748,-6.787143947003044,0 +-38.07834622177979,-6.787191656671562,0 +-38.07689770999033,-6.787179805336882,0 +-38.07616790098663,-6.787030513346505,0 +-38.07551069923008,-6.786866107953923,0 +-38.07481579616847,-6.786825478243363,0 +-38.07416109439591,-6.786804882506077,0 +-38.07349653195904,-6.786749410398964,0 +-38.0729918515868,-6.786627783529107,0 +-38.07272849268881,-6.786583984416059,0 +-38.07248330337798,-6.786523088604426,0 +-38.07079810255378,-6.78639267793198,0 +-38.06906840227344,-6.786278045646987,0 +-38.06618839480609,-6.786184454097286,0 +-38.06522417898579,-6.785810501315487,0 +-38.06477112211278,-6.785624495740977,0 +-38.06374670295094,-6.785362626563945,0 +-38.06249451015938,-6.785035693197548,0 +-38.06165212943831,-6.7843782152536,0 +-38.06109403975256,-6.783786663325251,0 +-38.06047128802206,-6.783363301153885,0 +-38.05717685172687,-6.781653000955659,0 +-38.05574241245596,-6.781493441548518,0 +-38.05431783412531,-6.781102591082679,0 +-38.05346768012819,-6.780731588378548,0 +-38.05296037982723,-6.780429392892536,0 +-38.05188646656451,-6.779879743809025,0 +-38.05053118778472,-6.779148984575596,0 +-38.04979694902752,-6.778783537929407,0 +-38.0490065665126,-6.778357337484142,0 +-38.04838657314006,-6.777933521974505,0 +-38.04736713688101,-6.77744097654951,0 +-38.04680317755192,-6.777077693861621,0 +-38.04623512499911,-6.776828473882382,0 +-38.04549900537537,-6.776400429310414,0 +-38.04481116904205,-6.776201258862547,0 +-38.04228239213957,-6.775349323019582,0 +-38.04148491431104,-6.774798766659024,0 +-38.04045742010712,-6.77412310610884,0 +-38.03896154046377,-6.773604167224603,0 +-38.0381546064019,-6.773401266600462,0 +-38.03683304395275,-6.77294958988746,0 +-38.03671895175555,-6.772887924197261,0 +-38.03513073856641,-6.772346500904099,0 +-38.03433271011272,-6.771974612503901,0 +-38.03382269261537,-6.771670246756071,0 +-38.03274149044421,-6.771174692782852,0 +-38.03161446210982,-6.770391404821535,0 +-38.03123023417494,-6.769863009689734,0 +-38.03040682993147,-6.768806829692385,0 +-38.02996880435288,-6.768221341981198,0 +-38.02941758288857,-6.767457720033775,0 +-38.02874848104693,-6.76674690140362,0 +-38.02795975788334,-6.766146322939279,0 +-38.02716773458098,-6.765601977650356,0 +-38.0263713431169,-6.765054212427635,0 +-38.02493304017575,-6.764244948965179,0 +-38.02371479188908,-6.763907228541802,0 +-38.02261174071347,-6.763867825272575,0 +-38.0210568330494,-6.763585303196558,0 +-38.01982040814843,-6.763270635847199,0 +-38.01800020196223,-6.763165131951432,0 +-38.01759839937498,-6.763152616193943,0 +-38.01660696187612,-6.762870257111014,0 +-38.01591433344723,-6.76284728810248,0 +-38.01531442606579,-6.762654543757631,0 +-38.01479563453583,-6.762595610320983,0 +-38.01431762157031,-6.762582269644728,0 +-38.01362476603956,-6.762476339568996,0 +-38.01284249271435,-6.762410770099608,0 +-38.01184685793825,-6.762040628558777,0 +-38.01132688168555,-6.761895908132513,0 +-38.01016580252923,-6.761341371512099,0 +-38.00926848957009,-6.761005675115261,0 +-38.00820683603018,-6.760448590421967,0 +-38.00660301926088,-6.759826807499245,0 +-38.00575506375289,-6.759364091434689,0 +-38.00524526007103,-6.759130230973668,0 +-38.00452840834911,-6.758674128098239,0 +-38.00376679993362,-6.758303065950937,0 +-38.00330368744458,-6.758028975380898,0 +-38.00211080549936,-6.757772600165029,0 +-38.00109633789216,-6.757394417487701,0 +-38.00058694111403,-6.757205781903127,0 +-37.99978833466133,-6.756750484006444,0 +-37.99911930950442,-6.75642830227727,0 +-37.99823684915922,-6.755971169228098,0 +-37.99765038912696,-6.755524106358783,0 +-37.99715849526999,-6.755166812238192,0 +-37.99616617312218,-6.754409531987488,0 +-37.99497794075761,-6.753878000307057,0 +-37.99392462717678,-6.753362213962161,0 +-37.99358701761697,-6.753226624425308,0 +-37.99303804829679,-6.753000940625197,0 +-37.99126130408437,-6.752195085990996,0 +-37.99041133756123,-6.751873996138458,0 +-37.98998624371624,-6.751652619728969,0 +-37.98965354741267,-6.751180254849909,0 +-37.98927391850098,-6.750831769637403,0 +-37.98854950376575,-6.750388231677015,0 +-37.98773692264469,-6.749898929727395,0 +-37.98700327823008,-6.74962374614622,0 +-37.98631043570644,-6.74943371812631,0 +-37.98566155636522,-6.749411898877631,0 +-37.98488667490194,-6.749130689768863,0 +-37.98441250985831,-6.748944682658449,0 +-37.98359171850404,-6.748661937597012,0 +-37.98316173486653,-6.748433791269008,0 +-37.98246873353514,-6.748240118772834,0 +-37.98069875462959,-6.748094718682012,0 +-37.98039840317072,-6.74799846659575,0 +-37.97953878796944,-6.747754016021977,0 +-37.97888995406639,-6.747601261602272,0 +-37.97736959705063,-6.7473716142544,0 +-37.97563075533923,-6.747350062131352,0 +-37.97304939465469,-6.746918389754348,0 +-37.97072739194198,-6.746498483142065,0 +-37.96904604515525,-6.746394867535477,0 +-37.96773047316579,-6.745831843092229,0 +-37.96679255013279,-6.745668468499033,0 +-37.96573188821623,-6.745499845824581,0 +-37.96483671310531,-6.745424942878989,0 +-37.96321565035547,-6.744816611273714,0 +-37.96270251543658,-6.744586283741356,0 +-37.96197268357353,-6.744518864419295,0 +-37.96096713897303,-6.744401642391847,0 +-37.96001266928243,-6.744241933544608,0 +-37.95940928177757,-6.74400766726364,0 +-37.95862041794523,-6.743939020571646,0 +-37.95813467191907,-6.74392329455051,0 +-37.95769559669925,-6.743865970738293,0 +-37.95410359435775,-6.743572727046469,0 +-37.95341722463608,-6.743377416038651,0 +-37.95242324790335,-6.743300754620436,0 +-37.95156017437936,-6.743185473200854,0 +-37.95060632428337,-6.742937857235867,0 +-37.94951892524342,-6.742857906061122,0 +-37.94865685966766,-6.742742918981073,0 +-37.94762502721535,-6.742579386329689,0 +-37.9469392841738,-6.74242759452585,0 +-37.94587518185264,-6.742005699510832,0 +-37.94480497573964,-6.741754768979836,0 +-37.94374268029173,-6.741246475071645,0 +-37.94280797787252,-6.740785818747698,0 +-37.94170042832764,-6.74031900485566,0 +-37.94097302147802,-6.740078948966783,0 +-37.94054266730193,-6.739977371409856,0 +-37.93877713445762,-6.739832978339275,0 +-37.93715496817696,-6.739741671741751,0 +-37.9363576627438,-6.739375720779799,0 +-37.9356741360133,-6.739181052730539,0 +-37.93511470264768,-6.739075421204359,0 +-37.93464263735888,-6.738929959031521,0 +-37.93334393984924,-6.738497446495561,0 +-37.93291721279587,-6.738396360181405,0 +-37.93236620495096,-6.738203131730883,0 +-37.93146937327317,-6.737915298592576,0 +-37.93044062869947,-6.737707809558994,0 +-37.92910845639209,-6.737529796793915,0 +-37.92769289838178,-6.737173049561318,0 +-37.92670526731043,-6.736876036757476,0 +-37.92588669162214,-6.736672216168507,0 +-37.92520020767703,-6.736386742089572,0 +-37.92339042421818,-6.735574535825066,0 +-37.92299629349987,-6.735557863059809,0 +-37.92202936749353,-6.735560039877843,0 +-37.92132718628432,-6.735531623202968,0 +-37.92032417618852,-6.735408402072316,0 +-37.91971789793477,-6.735257664508192,0 +-37.91927913762783,-6.735196475252961,0 +-37.91836287662269,-6.734987904425578,0 +-37.91767189413019,-6.734925029821819,0 +-37.91715638352577,-6.734735381720659,0 +-37.91585599539275,-6.735048012023168,0 +-37.91529239658031,-6.734901461868724,0 +-37.91451495468778,-6.734619884353696,0 +-37.9138645067934,-6.734472848716504,0 +-37.91343165240951,-6.734374116149841,0 +-37.91269544812051,-6.734225443680161,0 +-37.90966253416801,-6.733962962248635,0 +-37.90914415956571,-6.73390455286624,0 +-37.90845865898198,-6.733668081686598,0 +-37.90790062667863,-6.733616322205591,0 +-37.90631416729155,-6.733451583417247,0 +-37.90512205564889,-6.73334461392157,0 +-37.90374885992922,-6.733214883513982,0 +-37.90296424251149,-6.733267255858582,0 +-37.90153863248359,-6.733304183994475,0 +-37.90036028629763,-6.733341231277801,0 +-37.89947318466936,-6.73355843365544,0 +-37.89836306018729,-6.733722342785597,0 +-37.89751528322736,-6.733943091989647,0 +-37.89711868426733,-6.734145463815591,0 +-37.89547388372184,-6.73420987599887,0 +-37.89469173375655,-6.734224677145092,0 +-37.89395111448819,-6.734284016544231,0 +-37.89295838837722,-6.734074529172089,0 +-37.89206033155605,-6.733660556247696,0 +-37.8906474962108,-6.732860672763619,0 +-37.89004454298279,-6.732525907857574,0 +-37.88939443989546,-6.73227805047164,0 +-37.88857664739515,-6.731993810727623,0 +-37.88805825008869,-6.73189259716845,0 +-37.88664573384517,-6.731335800344929,0 +-37.88506408988992,-6.730640990631096,0 +-37.88429627382688,-6.730272629654441,0 +-37.88382753050444,-6.730042897334545,0 +-37.88327399818883,-6.72976764049934,0 +-37.88254280511956,-6.729571621917819,0 +-37.88008025109396,-6.728488503245799,0 +-37.87956530923877,-6.728298377416587,0 +-37.87835667100091,-6.728041486301385,0 +-37.87749351655545,-6.727839447596756,0 +-37.87685428947043,-6.72742867573603,0 +-37.87638408272807,-6.727153023284714,0 +-37.87595553082998,-6.726921842767558,0 +-37.87522420565236,-6.726593389210452,0 +-37.87444429415518,-6.726436858888675,0 +-37.87327757125586,-6.726093718050921,0 +-37.87275783363847,-6.725945681912567,0 +-37.87232212980255,-6.725887162397252,0 +-37.87184431265829,-6.725783889089755,0 +-37.87136463606779,-6.725723837894281,0 +-37.87035988460774,-6.72555812404809,0 +-37.86948731842774,-6.725397322875555,0 +-37.86878808957312,-6.725198358599429,0 +-37.86813227927298,-6.725000778371969,0 +-37.86730029322732,-6.724753046682912,0 +-37.86673092090383,-6.724558076785415,0 +-37.86589438475062,-6.724396893566319,0 +-37.86554037856791,-6.724384079665764,0 +-37.8647952067142,-6.724358746241162,0 +-37.86391534351876,-6.724291112679312,0 +-37.86339442106694,-6.724104577021947,0 +-37.86266485337038,-6.723694089260202,0 +-37.86197591892975,-6.723408008165354,0 +-37.86132641781696,-6.723208500376257,0 +-37.86024623983857,-6.722823983081845,0 +-37.85895266473534,-6.722393808584891,0 +-37.85778993769879,-6.722055984144565,0 +-37.85667582184941,-6.721678081741951,0 +-37.85590996169213,-6.721266236832824,0 +-37.85518813866639,-6.720856011172079,0 +-37.8544245441589,-6.720445473589485,0 +-37.85370200879168,-6.720122856497301,0 +-37.85275844425293,-6.719745167702282,0 +-37.85168596921102,-6.719319836717665,0 +-37.85112854389595,-6.719040520898015,0 +-37.85017824766405,-6.718658231909812,0 +-37.84961283423947,-6.718506151043437,0 +-37.84869762467455,-6.718408041945398,0 +-37.84813275278712,-6.718240643777277,0 +-37.84771317425177,-6.718114863740931,0 +-37.84705517415703,-6.717926044352471,0 +-37.84655984622582,-6.717836202030215,0 +-37.84606765257865,-6.71775322344852,0 +-37.84581240696266,-6.717748676262409,0 +-37.84536179644004,-6.717630689366571,0 +-37.84479650629945,-6.717538666639588,0 +-37.84406431628341,-6.717382605457122,0 +-37.84364057457185,-6.717291462110476,0 +-37.84314166985079,-6.717215884923657,0 +-37.84274032877044,-6.717110792910513,0 +-37.84244983353671,-6.71704726707157,0 +-37.84210044101782,-6.716979191336842,0 +-37.84171341868236,-6.716890763440567,0 +-37.84130823710544,-6.716746018382116,0 +-37.84016567244448,-6.716444944168257,0 +-37.83982226053701,-6.716334385180507,0 +-37.83870004980773,-6.716166351110099,0 +-37.83814854070118,-6.716058721546428,0 +-37.83767424697475,-6.715884026610077,0 +-37.83732822080253,-6.715767266599995,0 +-37.83670937551298,-6.71558845753192,0 +-37.83632869766792,-6.715450930250126,0 +-37.83542734955082,-6.715201988424572,0 +-37.83526429195656,-6.715199694135976,0 +-37.83483207178533,-6.715138597787658,0 +-37.83477787007864,-6.715137709711861,0 +-37.83416739538808,-6.71505093782413,0 +-37.83359360529731,-6.714906551357712,0 +-37.83300455934667,-6.71481619424956,0 +-37.83258708319795,-6.714738319924493,0 +-37.83232028385282,-6.714653338136855,0 +-37.83187136270961,-6.71458063672082,0 +-37.83169237291634,-6.714567971738726,0 +-37.83136879104673,-6.714546438948506,0 +-37.83113347624497,-6.714535315933597,0 +-37.83080812284513,-6.714499539587805,0 +-37.83039108384347,-6.714458096985549,0 +-37.8301726185082,-6.714445709243659,0 +-37.82964021485606,-6.714534837096352,0 +-37.82953087984286,-6.714531475168511,0 +-37.82886647258375,-6.714723533234523,0 +-37.82864642608353,-6.714752495007488,0 +-37.82797143821507,-6.714787790995921,0 +-37.82717811109615,-6.714897854156701,0 +-37.82641232081514,-6.715038983760155,0 +-37.82569102708568,-6.715214217337886,0 +-37.82534474216321,-6.715279054268298,0 +-37.82498321612906,-6.715307918107942,0 +-37.8247853849595,-6.715322479726665,0 +-37.82382301049012,-6.71556597118828,0 +-37.82258430404214,-6.71558619725797,0 +-37.82193492606953,-6.715620578251168,0 +-37.82000433193116,-6.715972662386833,0 +-37.81869573386544,-6.716137835221184,0 +-37.81800652933868,-6.716256362605147,0 +-37.81719323677389,-6.716345608992658,0 +-37.81659703057329,-6.716478494625626,0 +-37.81518925983854,-6.716676569336346,0 +-37.81390498943717,-6.716717153621934,0 +-37.81305509119807,-6.716774186662158,0 +-37.81248378139598,-6.716840568565755,0 +-37.81135900290656,-6.71709455105791,0 +-37.81075066091469,-6.717191163828979,0 +-37.81015087288255,-6.717263053122984,0 +-37.80971569634041,-6.71731389730842,0 +-37.80930866308915,-6.717426962298597,0 +-37.80877087958584,-6.717658935816197,0 +-37.80828883074845,-6.718015742051364,0 +-37.80719812042634,-6.718532546666383,0 +-37.80662119406975,-6.718911861376551,0 +-37.80571872028174,-6.719560907254373,0 +-37.80474488459596,-6.72036655896457,0 +-37.80402221207369,-6.721154001110523,0 +-37.80340366698518,-6.721665730098658,0 +-37.80255653120161,-6.722357711579881,0 +-37.8017432346853,-6.722957356282848,0 +-37.80109001775028,-6.723468771554792,0 +-37.80060314530004,-6.723798062376299,0 +-37.79943790593586,-6.724387477999477,0 +-37.7987534578614,-6.724868041095114,0 +-37.79791860171699,-6.725091812298699,0 +-37.79745484374624,-6.7254865985903,0 +-37.79654103792096,-6.726305792763834,0 +-37.79530088247443,-6.727013061382493,0 +-37.79435572046551,-6.727700317260213,0 +-37.79368811302744,-6.728159317814614,0 +-37.7930320751316,-6.728366743954247,0 +-37.79251660084295,-6.728501737218044,0 +-37.79205918629201,-6.728892369941653,0 +-37.7919225905384,-6.729265178771973,0 +-37.79158540129603,-6.729880295275119,0 +-37.79151720745677,-6.730193595357851,0 +-37.79082756884474,-6.731268711446998,0 +-37.79045384274422,-6.731849128836674,0 +-37.7903448658121,-6.732346744983028,0 +-37.79013493594389,-6.733373009367077,0 +-37.78983406279387,-6.733894102977238,0 +-37.78952495629343,-6.734633716575006,0 +-37.7893208086313,-6.735002122704348,0 +-37.78911203679014,-6.735464552512383,0 +-37.7889397905482,-6.736572222517768,0 +-37.7886318194197,-6.737282723114576,0 +-37.78836641006045,-6.737715199891065,0 +-37.78809806343351,-6.738240899063426,0 +-37.78747045278957,-6.739225077426231,0 +-37.78703644964658,-6.74028015699392,0 +-37.7868599019555,-6.741309198222457,0 +-37.78681626814986,-6.741743149703511,0 +-37.78661876427321,-6.742171802215288,0 +-37.78644755036949,-6.742724170993962,0 +-37.7863670952197,-6.743247762174477,0 +-37.78634573403618,-6.744081723238503,0 +-37.78642113551909,-6.744640336082601,0 +-37.78658158033496,-6.745387683595567,0 +-37.78696910785976,-6.745895099253864,0 +-37.78743509950915,-6.746867260019773,0 +-37.78762744157095,-6.747555250846116,0 +-37.78773113466821,-6.748146340176426,0 +-37.78781010567401,-6.748522091683292,0 +-37.78794656755078,-6.748995665814925,0 +-37.78811448495894,-6.74947106101419,0 +-37.78835059578575,-6.749822812269654,0 +-37.7887033029672,-6.750398218928858,0 +-37.78910325334183,-6.751365776960709,0 +-37.78921763833171,-6.751644903547472,0 +-37.78932981856708,-6.752021795880456,0 +-37.7894676321584,-6.752590102686879,0 +-37.78993646131966,-6.753468522633969,0 +-37.79019539252056,-6.754129354015951,0 +-37.79030889952767,-6.75447677884279,0 +-37.79035767357829,-6.754884875996089,0 +-37.7906145444143,-6.755609557115266,0 +-37.7908737278556,-6.756269061812261,0 +-37.79119729718742,-6.756901124387685,0 +-37.79140085478806,-6.757404765216664,0 +-37.79151521038173,-6.757751663673695,0 +-37.79171752180926,-6.758289750832614,0 +-37.7917603819329,-6.758885587448803,0 +-37.79202532890914,-6.759458630920913,0 +-37.79223071562112,-6.759904147087583,0 +-37.79237483936153,-6.760284513946711,0 +-37.79255060891086,-6.760666044889098,0 +-37.7926929931149,-6.761109349335234,0 +-37.7930844358991,-6.761655575921884,0 +-37.79320480392469,-6.761848703826896,0 +-37.79332012581445,-6.762479441827887,0 +-37.79347239183069,-6.762921933044238,0 +-37.79364405135558,-6.763406463686696,0 +-37.79373930061524,-6.763679888771466,0 +-37.79391615174625,-6.764018515762893,0 +-37.79413084517272,-6.764483443592659,0 +-37.79426324493166,-6.764904341633742,0 +-37.79444015868661,-6.76522211701135,0 +-37.79464321916919,-6.765954824941995,0 +-37.79473059823737,-6.766412853123677,0 +-37.79491325283358,-6.767121635563365,0 +-37.79498516875346,-6.767455710249116,0 +-37.79509921738409,-6.767792093615623,0 +-37.79523738917635,-6.768047189534387,0 +-37.79541581178353,-6.768345040552873,0 +-37.79559683482277,-6.768537321542262,0 +-37.79583174681188,-6.768980223615819,0 +-37.79595056501687,-6.769171142211436,0 +-37.79612766152182,-6.769488488898958,0 +-37.79626746286399,-6.769680333585171,0 +-37.79646401259807,-6.77003987187715,0 +-37.79668471365658,-6.770295967378691,0 +-37.79713252747655,-6.77062168257404,0 +-37.79747975894665,-6.770955686850364,0 +-37.7975805722452,-6.771063217341834,0 +-37.79787337322674,-6.77165421373425,0 +-37.79793821402841,-6.772195039874792,0 +-37.79794201107052,-6.772691867221594,0 +-37.79796785219718,-6.773147758227198,0 +-37.7980078953142,-6.773790993824946,0 +-37.79806744866364,-6.774476938209411,0 +-37.79806684163974,-6.775097622501987,0 +-37.79812146452662,-6.775326780997754,0 +-37.79819265551311,-6.775677843433273,0 +-37.79824361373616,-6.776008445562065,0 +-37.79827088506369,-6.776421649081623,0 +-37.79828454119671,-6.776631856538534,0 +-37.79831192268902,-6.777053341201314,0 +-37.79842353199249,-6.777457058050233,0 +-37.79857654620957,-6.777884520301463,0 +-37.79851314095899,-6.778523846485983,0 +-37.79854407041017,-6.778837437173049,0 +-37.79867807335376,-6.779196069489108,0 +-37.7987657601313,-6.779677984397423,0 +-37.79889274675973,-6.780243222259016,0 +-37.79884015057889,-6.780573024656864,0 +-37.79882908517118,-6.780905007548674,0 +-37.79887335269478,-6.781447484280509,0 +-37.79885996343645,-6.781821593581952,0 +-37.79891814555316,-6.782551377273863,0 +-37.79889954987241,-6.78304792722825,0 +-37.79883989615625,-6.783542942430041,0 +-37.79873604299119,-6.784119599658585,0 +-37.79851494364834,-6.784439222363202,0 +-37.79817148221544,-6.784715214953741,0 +-37.7979109755923,-6.785015979629698,0 +-37.79759247947358,-6.785190353414443,0 +-37.79750575946346,-6.78529019952955,0 +-37.79700224810563,-6.785518341273469,0 +-37.79633095434116,-6.786014862440862,0 +-37.79539036314508,-6.786761124756961,0 +-37.79365699778046,-6.787803259819863,0 +-37.79232240149692,-6.788727447273692,0 +-37.7912573795918,-6.789401831097877,0 +-37.78946608526277,-6.790247804889336,0 +-37.78846590751013,-6.790735168842001,0 +-37.78719499271862,-6.791473126125897,0 +-37.78619515475271,-6.791960022683447,0 +-37.78538558096044,-6.792963711158542,0 +-37.78451464728526,-6.793646011352208,0 +-37.78344491265489,-6.794323777921686,0 +-37.78284481888753,-6.794755261016992,0 +-37.78164617709397,-6.796122094891432,0 +-37.7805228843841,-6.796726560001534,0 +-37.77959253643039,-6.797150218570286,0 +-37.77902643299328,-6.798110467192614,0 +-37.7786206978707,-6.798612349004012,0 +-37.77778990883793,-6.79949288269898,0 +-37.77724085538717,-6.800251969095064,0 +-37.77655572067442,-6.801199462620438,0 +-37.77559439466189,-6.802653278272957,0 +-37.77511910770223,-6.803219079263427,0 +-37.77435216933162,-6.804682428820067,0 +-37.77373211940168,-6.805633341767257,0 +-37.77305333101283,-6.806388226555462,0 +-37.77243728758782,-6.807210166956636,0 +-37.7714885370179,-6.808214979955781,0 +-37.77100890389706,-6.808908774733066,0 +-37.77059517013463,-6.809543010892516,0 +-37.76989563486242,-6.811001902044246,0 +-37.76962630551253,-6.811372436787631,0 +-37.76921864352494,-6.811995802653044,0 +-37.76874799003168,-6.812613742812011,0 +-37.76799070435309,-6.813694178021735,0 +-37.76755203510331,-6.814675495089583,0 +-37.7670747219117,-6.815244113655505,0 +-37.76625000218583,-6.81638615980976,0 +-37.76590249217351,-6.81695985310461,0 +-37.76554320477675,-6.817858051162055,0 +-37.7651976126263,-6.818428481137792,0 +-37.76465978480561,-6.818925804671265,0 +-37.76346407200349,-6.819900164109987,0 +-37.76255733572117,-6.821337298281882,0 +-37.7618731301944,-6.822349633435731,0 +-37.7599386575336,-6.824926704696284,0 +-37.75922962421898,-6.826781793615202,0 +-37.75848247829598,-6.827985814520903,0 +-37.75758609292264,-6.829249171986571,0 +-37.75608528863955,-6.831074959862431,0 +-37.75537753879502,-6.832604879461088,0 +-37.75494712950594,-6.833563516285979,0 +-37.75439519421663,-6.834259598380498,0 +-37.75366011517625,-6.835262356255845,0 +-37.75251703734207,-6.836512948761166,0 +-37.7516872027233,-6.837907262776965,0 +-37.75105478996224,-6.838737137994778,0 +-37.75044934238954,-6.83992424385279,0 +-37.74976206884668,-6.840939368338285,0 +-37.74894064215214,-6.84208076439057,0 +-37.74776559357149,-6.844124692115588,0 +-37.74573842762867,-6.846386372623295,0 +-37.74378729371511,-6.848388101344868,0 +-37.74262591112731,-6.850025849880498,0 +-37.74253977194902,-6.850668351081458,0 +-37.74238247165367,-6.851501758361002,0 +-37.74174845598071,-6.853027639839365,0 +-37.74145138835917,-6.85417731213585,0 +-37.74122389342819,-6.855199777128403,0 +-37.74032235994178,-6.856653921510691,0 +-37.7390932548613,-6.858542936930271,0 +-37.73878896632939,-6.85994738201099,0 +-37.73803155955401,-6.861523234430007,0 +-37.73760858637227,-6.8622245314723,0 +-37.73744122650462,-6.863188552410833,0 +-37.73728428947462,-6.86395674259422,0 +-37.73659066309833,-6.865471269030287,0 +-37.73618222132436,-6.866284960461093,0 +-37.73563068280578,-6.867293503435129,0 +-37.73516574220935,-6.868582670674078,0 +-37.73488650820313,-6.869152808974175,0 +-37.73420558222475,-6.870095026555541,0 +-37.73343985026731,-6.871613791484044,0 +-37.73295559723049,-6.872495764078101,0 +-37.73260265869663,-6.873319828145936,0 +-37.73238583671824,-6.873955877834914,0 +-37.73222238088279,-6.87491605922425,0 +-37.73206558501168,-6.87568393032635,0 +-37.7321525751324,-6.876911800237018,0 +-37.73223066268679,-6.878397677332575,0 +-37.73220592246007,-6.879106551049852,0 +-37.73235329172762,-6.880467676913683,0 +-37.73232395681402,-6.881307267380687,0 +-37.73226748039595,-6.882923462074334,0 +-37.73222313392842,-6.884207238713576,0 +-37.73213610541223,-6.88484603482373,0 +-37.73163795270831,-6.88611150657121,0 +-37.73082697206661,-6.887046236169416,0 +-37.72987558848475,-6.888298359765108,0 +-37.72947186175767,-6.888732449272908,0 +-37.72828031762981,-6.889459762240468,0 +-37.72704134340221,-6.889673244423991,0 +-37.72592780274154,-6.890079178137332,0 +-37.72533816957878,-6.89031251609726,0 +-37.72362111503628,-6.891220002375934,0 +-37.72309312573036,-6.891461304409256,0 +-37.72177055427152,-6.892153251172446,0 +-37.72104390486546,-6.892578225111418,0 +-37.71999464636508,-6.892865063768467,0 +-37.71800718608466,-6.893894408425448,0 +-37.71569915352988,-6.895100764772471,0 +-37.71424463174929,-6.89601444381369,0 +-37.71292491584055,-6.896676921261322,0 +-37.71054378673462,-6.898136277742799,0 +-37.70810718305616,-6.899463250460195,0 +-37.7066058075343,-6.899861635657183,0 +-37.70502808162032,-6.900515577295394,0 +-37.70259533556439,-6.901715002746508,0 +-37.70109317206646,-6.902176356574526,0 +-37.69846678469239,-6.902990815804502,0 +-37.69675139300335,-6.903643627889075,0 +-37.69543634759412,-6.904051241855825,0 +-37.69432577176598,-6.90414450130234,0 +-37.69276461027064,-6.904030637040177,0 +-37.6916580717058,-6.903931271996071,0 +-37.69028297909516,-6.904016516161605,0 +-37.68890225506296,-6.904230542466578,0 +-37.68824507606817,-6.904274666703887,0 +-37.68692783305539,-6.90436352687281,0 +-37.68560962238276,-6.904790796582624,0 +-37.68450143475448,-6.904945920625528,0 +-37.68384831835962,-6.905052452526665,0 +-37.68246858333167,-6.905457206791234,0 +-37.68108725240253,-6.905862217495304,0 +-37.67853342803591,-6.90629126482272,0 +-37.67650318201828,-6.90673728965569,0 +-37.67480430780294,-6.907065135686723,0 +-37.67297302455577,-6.907644543796501,0 +-37.67108679861362,-6.907964051024175,0 +-37.66999474829492,-6.907796424776625,0 +-37.66850820988206,-6.907744608818406,0 +-37.6677315692348,-6.907781689352253,0 +-37.66644727287194,-6.9077354707934,0 +-37.66566852147552,-6.907773020481005,0 +-37.6641458222192,-6.908366201274012,0 +-37.66295173341409,-6.908842314659701,0 +-37.66176246825597,-6.909317731549246,0 +-37.66026482303695,-6.909906366734377,0 +-37.65804872147844,-6.910471632449496,0 +-37.65646971694428,-6.910614944281291,0 +-37.65559282798411,-6.910912613021107,0 +-37.65419063420125,-6.911385731142711,0 +-37.65236510873531,-6.911838709239182,0 +-37.65164326357657,-6.911939784859976,0 +-37.65045912870618,-6.912215811620988,0 +-37.64864021850941,-6.912282721392757,0 +-37.64740725271452,-6.912306395209955,0 +-37.64487503731284,-6.91235224713141,0 +-37.64344131034586,-6.912500140210411,0 +-37.64238917667879,-6.91285365120154,0 +-37.64074341234981,-6.913442906169427,0 +-37.63877785917628,-6.913949948019801,0 +-37.63727922003011,-6.914030291137083,0 +-37.63584995903599,-6.91398285202082,0 +-37.63494226475081,-6.913888377568997,0 +-37.63397680410054,-6.913597567663343,0 +-37.63327007154159,-6.9134411560502,0 +-37.63249243831996,-6.913350672013404,0 +-37.63065885670757,-6.913425443667325,0 +-37.6294803131119,-6.91351718633719,0 +-37.62564273616569,-6.913367754365937,0 +-37.62408151457915,-6.913443659638522,0 +-37.62291490545767,-6.913405872012761,0 +-37.62161651686622,-6.91343006719629,0 +-37.61999484984686,-6.913380173659488,0 +-37.61837097223914,-6.913328221716474,0 +-37.61622397377266,-6.913315119254275,0 +-37.61446677886445,-6.913376944850002,0 +-37.61324555276657,-6.912950053858985,0 +-37.61189579397883,-6.912393776578575,0 +-37.61111746999469,-6.912242033725957,0 +-37.60943519864122,-6.912049983113032,0 +-37.60815349649625,-6.911613613425149,0 +-37.60679624538808,-6.911435584364501,0 +-37.60577244195762,-6.911074519719146,0 +-37.6051085945148,-6.911186697171511,0 +-37.60438741466631,-6.911053013005777,0 +-37.6019380567236,-6.910641568901799,0 +-37.60040047470294,-6.910191711386252,0 +-37.59961174308305,-6.910021100258025,0 +-37.5987480606382,-6.909884309348807,0 +-37.59716263367964,-6.909615261867722,0 +-37.59629170920687,-6.909585824847703,0 +-37.59552804821337,-6.909488545375092,0 +-37.59480038117681,-6.909356314745598,0 +-37.5937838665654,-6.909213621939949,0 +-37.59338188184806,-6.909164024337919,0 +-37.59261410328732,-6.908957813031948,0 +-37.59178344164932,-6.908712515297883,0 +-37.59099248168342,-6.908468462513,0 +-37.59016579063287,-6.908259342739127,0 +-37.58944799423616,-6.908054058823685,0 +-37.58858980733586,-6.907880008663824,0 +-37.58811810173383,-6.90782771262012,0 +-37.58721463163972,-6.90761651075551,0 +-37.5860926695981,-6.907434500587446,0 +-37.58501245344937,-6.907181987812927,0 +-37.58432833900169,-6.907050946045034,0 +-37.58262781902325,-6.906992337491388,0 +-37.58154859957001,-6.906884703225835,0 +-37.58025190211974,-6.906841078190616,0 +-37.57917009292791,-6.906840076872416,0 +-37.5780892783949,-6.906802995896808,0 +-37.5771443469816,-6.906805228859614,0 +-37.57670660272322,-6.906861563358403,0 +-37.57611674881355,-6.90712809315088,0 +-37.57523585599119,-6.907564403619596,0 +-37.57352405534375,-6.907828193543192,0 +-37.57279011230629,-6.907946485009099,0 +-37.57136051353184,-6.907933196200167,0 +-37.56957100932457,-6.907871600440139,0 +-37.56887617724177,-6.907991831009666,0 +-37.5680372782569,-6.908106942232346,0 +-37.56693905686074,-6.908321494427022,0 +-37.56515306274137,-6.908619476509982,0 +-37.56347625489567,-6.908849524090717,0 +-37.56253000559083,-6.909032236968623,0 +-37.56148375361158,-6.909174101683729,0 +-37.56080311746357,-6.909185068036793,0 +-37.56010642442391,-6.909162502499749,0 +-37.55944768312935,-6.909140795927834,0 +-37.55882809548032,-6.909012402454455,0 +-37.55838616756584,-6.908998032022224,0 +-37.55706578581468,-6.908880107270187,0 +-37.55591056340576,-6.908659587420101,0 +-37.55489838117683,-6.908516168037079,0 +-37.55395697197357,-6.908447411285362,0 +-37.55312408484952,-6.908418805234741,0 +-37.55141955315817,-6.908358904200065,0 +-37.55073482656969,-6.908226739746701,0 +-37.55001311164592,-6.908129020697464,0 +-37.54943701216534,-6.908036387602985,0 +-37.54799738595915,-6.907841923243392,0 +-37.54670633334202,-6.907581301237095,0 +-37.54396553313209,-6.907307127336918,0 +-37.54232019098951,-6.906890958687255,0 +-37.54170154890854,-6.906833702803275,0 +-37.54084378968074,-6.906803852145059,0 +-37.54005735540208,-6.906740660827607,0 +-37.53922948307282,-6.906568516050389,0 +-37.53777487969123,-6.906646395969156,0 +-37.53715615779707,-6.906398546634684,0 +-37.53545755108145,-6.905999797896825,0 +-37.53330657082687,-6.905699323178887,0 +-37.53183786590267,-6.905535957999365,0 +-37.53093220285732,-6.905504922537087,0 +-37.52849954457323,-6.905308161383853,0 +-37.52664196881149,-6.905075234841276,0 +-37.52512174083722,-6.904910324599034,0 +-37.52433418172593,-6.904713894184079,0 +-37.5234805816618,-6.904627472782873,0 +-37.52263846809571,-6.904485897465239,0 +-37.52191082861163,-6.904291856120485,0 +-37.51952649528475,-6.904379012235225,0 +-37.51771400203675,-6.904259829831883,0 +-37.51527003981293,-6.904456067443808,0 +-37.5138402051104,-6.904856774055386,0 +-37.51285792593681,-6.905499192825626,0 +-37.51216424872402,-6.905870479785645,0 +-37.51123559366429,-6.906460334136748,0 +-37.51037041446276,-6.906769568847741,0 +-37.50955745636053,-6.907193117920599,0 +-37.50777667282095,-6.907639399511678,0 +-37.50645204902215,-6.908100342511347,0 +-37.50477806603696,-6.908885353950436,0 +-37.50333800212437,-6.909564439428304,0 +-37.50127756208386,-6.910110952073578,0 +-37.50002479793657,-6.910181297721639,0 +-37.49840353151162,-6.911027840836879,0 +-37.49595596504074,-6.912306453302862,0 +-37.49407291543903,-6.912688734903621,0 +-37.49350368928863,-6.91278050530213,0 +-37.4915698433993,-6.913158699975742,0 +-37.49122477905015,-6.913315220839801,0 +-37.4870987951448,-6.914181993061582,0 +-37.48532745839974,-6.914510963070589,0 +-37.48383482533467,-6.915016785972415,0 +-37.48223384909448,-6.91540886228896,0 +-37.48081106457897,-6.91558276590666,0 +-37.47893162365451,-6.915801581703161,0 +-37.47669739864556,-6.916242414694495,0 +-37.47550044246983,-6.916263186386447,0 +-37.47334293156817,-6.916082132421568,0 +-37.47026816909739,-6.916038621301035,0 +-37.46824646207725,-6.916391103990892,0 +-37.46647608680844,-6.916778800969662,0 +-37.46341065820319,-6.917096808626742,0 +-37.46196740599674,-6.917005072020041,0 +-37.4583845374469,-6.917236814095619,0 +-37.45750773515006,-6.917175057106675,0 +-37.45563933499918,-6.917037277217076,0 +-37.45442212192736,-6.917168169461952,0 +-37.45276423453846,-6.917521064937236,0 +-37.45138781006531,-6.917666661541649,0 +-37.45004528824722,-6.917925579303687,0 +-37.44893328398177,-6.918154330713338,0 +-37.44812855661917,-6.918200556439339,0 +-37.44250736791707,-6.91883148853335,0 +-37.44166803672559,-6.91880715479887,0 +-37.44008276561085,-6.9193055155217,0 +-37.43875602185467,-6.919973096619004,0 +-37.43796785124783,-6.920549823112935,0 +-37.43702042975568,-6.921194532842821,0 +-37.43515497756477,-6.922281305876062,0 +-37.43361976532063,-6.923189718523515,0 +-37.43300433748512,-6.923319358987694,0 +-37.43161366589199,-6.923800584044135,0 +-37.43047679537884,-6.924440776626918,0 +-37.42931070552449,-6.925082247877979,0 +-37.42876663472264,-6.925366341705089,0 +-37.42834046008076,-6.925540858562113,0 +-37.42702981832691,-6.92620993891381,0 +-37.42574820655818,-6.926846912347524,0 +-37.42439355527494,-6.927432207024294,0 +-37.42334193574116,-6.927955082970933,0 +-37.42235279901956,-6.928747944451258,0 +-37.42151821106817,-6.929518358090282,0 +-37.41990886359113,-6.930531022751715,0 +-37.41867236871101,-6.930870514728261,0 +-37.41716914135223,-6.931352993484048,0 +-37.4157160301509,-6.93217666251708,0 +-37.41454760964837,-6.932934531236612,0 +-37.41378045067378,-6.933211128779626,0 +-37.41273793541151,-6.93393200416946,0 +-37.41211957789207,-6.93443934155961,0 +-37.41130149832809,-6.935166400118747,0 +-37.41041196216107,-6.935401323440647,0 +-37.40955326176665,-6.935826932152314,0 +-37.40893175712195,-6.936296099320399,0 +-37.40818809317098,-6.937287128493011,0 +-37.40802572128479,-6.937882570870539,0 +-37.40781367485539,-6.938517468304446,0 +-37.40731716526304,-6.939224791033534,0 +-37.40700347660969,-6.939515805667277,0 +-37.40646157370627,-6.940670942357876,0 +-37.40596902065366,-6.941638909553202,0 +-37.4055538095698,-6.942500201382186,0 +-37.40506412428208,-6.943248717347688,0 +-37.4038680692148,-6.944539352129868,0 +-37.40302300245995,-6.945615937520115,0 +-37.40262178699525,-6.946097682821692,0 +-37.40221962332196,-6.946616917754897,0 +-37.40096294657625,-6.947412166435369,0 +-37.39964288575295,-6.948044153612763,0 +-37.39833716760431,-6.948296714574823,0 +-37.39660168947169,-6.948727527447627,0 +-37.39535988414971,-6.948994020675313,0 +-37.39411029177806,-6.949210533382304,0 +-37.39364530434762,-6.949346912761974,0 +-37.39171120543651,-6.949843785278855,0 +-37.38927701102669,-6.950290036099768,0 +-37.3870464563357,-6.95063983836991,0 +-37.38585450716669,-6.950867484875774,0 +-37.38519950876167,-6.950919040425764,0 +-37.38434718406872,-6.951115810150975,0 +-37.3838025063265,-6.95132455172419,0 +-37.38298899595905,-6.951523591782867,0 +-37.38197614571939,-6.951944256274475,0 +-37.38151144314319,-6.952041766094268,0 +-37.38104899861546,-6.952101621899174,0 +-37.38058718021578,-6.952161683512146,0 +-37.38020353492065,-6.952224886268551,0 +-37.37935096852778,-6.952652855333286,0 +-37.37788404937609,-6.953846422030287,0 +-37.3762463811277,-6.954555414762459,0 +-37.37425631543348,-6.955558278746071,0 +-37.3727769785692,-6.956378055816921,0 +-37.37173057759217,-6.956834229761055,0 +-37.37071567179064,-6.957440927274607,0 +-37.36930813861642,-6.958261769894654,0 +-37.36840747588224,-6.958875371008792,0 +-37.36786067056955,-6.95923571574466,0 +-37.36697228235454,-6.959735310338125,0 +-37.36632153885414,-6.959863864263196,0 +-37.36550238153647,-6.960478252100613,0 +-37.3642990169492,-6.961190629131461,0 +-37.36348790590571,-6.961502242040809,0 +-37.36161775229791,-6.962609332621944,0 +-37.35831354959102,-6.964273877658371,0 +-37.35590955574183,-6.965922140938083,0 +-37.35505695123953,-6.966975565109288,0 +-37.3543477018143,-6.967778177891074,0 +-37.35340024871022,-6.96861573696036,0 +-37.35266851135943,-6.969002495269284,0 +-37.35203675870035,-6.969511890962261,0 +-37.35121807773177,-6.970271013803509,0 +-37.35033768353399,-6.970760980692676,0 +-37.34939241922432,-6.971787504682173,0 +-37.3488877212592,-6.97214836346181,0 +-37.34787968429099,-6.972867565787169,0 +-37.34604285190524,-6.973478833717293,0 +-37.3453390220247,-6.974091603083075,0 +-37.34397532327607,-6.975132172423795,0 +-37.34237689922159,-6.97635346327637,0 +-37.34092816777436,-6.977319477427645,0 +-37.33941452659786,-6.978133366900082,0 +-37.33887359857913,-6.978452945603181,0 +-37.33810287803942,-6.978839651857085,0 +-37.33786585273624,-6.97931851256121,0 +-37.33759416525796,-6.979645903089527,0 +-37.33658966232589,-6.980397785249531,0 +-37.33585616983393,-6.980822669058671,0 +-37.33477941134451,-6.981347807555101,0 +-37.33447345735188,-6.981671900101146,0 +-37.33336216570574,-6.982573720331327,0 +-37.33297333250385,-6.982859508399001,0 +-37.33204148970886,-6.983502160236184,0 +-37.3310346853084,-6.984103630520048,0 +-37.33005668972729,-6.98489118605957,0 +-37.32911894423919,-6.985489667969153,0 +-37.32774366092011,-6.986720991554056,0 +-37.32660409089778,-6.987466939815508,0 +-37.3254810350487,-6.988032011743531,0 +-37.32469765565931,-6.988570128036729,0 +-37.32383214578624,-6.989408945250769,0 +-37.32297373540341,-6.989983106269374,0 +-37.32204423616431,-6.990479361530272,0 +-37.32114574586275,-6.990976688115967,0 +-37.3205339306642,-6.99129489745316,0 +-37.31978526938597,-6.991647151087632,0 +-37.31929453531428,-6.992198433946684,0 +-37.31884697755319,-6.992638483132287,0 +-37.31788048371288,-6.993157708212736,0 +-37.31747988807634,-6.993709939576035,0 +-37.31704924229392,-6.994033275009409,0 +-37.31654078081034,-6.994391594587939,0 +-37.31630547365143,-6.994571608880814,0 +-37.31595170125858,-6.994860667843665,0 +-37.31551832912854,-6.99518980422248,0 +-37.31423577727202,-6.995785247234742,0 +-37.31298439717393,-6.996534148011153,0 +-37.31168898180363,-6.997397604521194,0 +-37.31055484491154,-6.998083835544286,0 +-37.31023627117725,-6.998454462526303,0 +-37.30949553009902,-6.998807368230513,0 +-37.30898037507771,-6.999322233746608,0 +-37.30851177250192,-6.999610513134217,0 +-37.30784838825532,-7.000005801440442,0 +-37.30687181493476,-7.000694692020981,0 +-37.30647356659973,-7.001136006160992,0 +-37.30542880857668,-7.001707664948662,0 +-37.30439208540818,-7.002316587885007,0 +-37.30403762577605,-7.002720330580817,0 +-37.30372180856541,-7.003011811584631,0 +-37.30263262577212,-7.003541122967836,0 +-37.3016208635763,-7.00426155445883,0 +-37.30134824892304,-7.004516189065118,0 +-37.30100113652271,-7.00473023558992,0 +-37.30049862173414,-7.00508948073858,0 +-37.29998974779416,-7.00537465377079,0 +-37.29944512336112,-7.005583167286976,0 +-37.29864514814994,-7.005892703431852,0 +-37.29788650484358,-7.006361897029211,0 +-37.29665899906204,-7.006597133375038,0 +-37.29599051828733,-7.006572243017644,0 +-37.29471677143838,-7.006642057673349,0 +-37.29375509034739,-7.006658849296604,0 +-37.29264469783363,-7.006745177691211,0 +-37.28891438117942,-7.006972494339392,0 +-37.28560383536399,-7.007395696936881,0 +-37.28189461131715,-7.008361270984589,0 +-37.2805944515833,-7.008800767836059,0 +-37.27819853279014,-7.009484301947948,0 +-37.2757278454169,-7.010004108960256,0 +-37.27286548808505,-7.011073065086291,0 +-37.27150461041199,-7.011451900287363,0 +-37.26989521258604,-7.011942968420942,0 +-37.26742169599672,-7.012711586157077,0 +-37.26619849129055,-7.01279412237569,0 +-37.26502567504623,-7.013242790601349,0 +-37.26359384355111,-7.01398020187195,0 +-37.26266915811192,-7.014313410204438,0 +-37.26210148200007,-7.014900809731952,0 +-37.26158610753929,-7.015670464194749,0 +-37.26058367380502,-7.01660618663812,0 +-37.26001514255804,-7.017191758156141,0 +-37.25956210339507,-7.017902110728623,0 +-37.25875265327281,-7.018297220170959,0 +-37.25765141736036,-7.018440097178978,0 +-37.25631412014801,-7.01845359701625,0 +-37.25477765484374,-7.018762545277791,0 +-37.25453118575744,-7.018814359685862,0 +-37.25055621977454,-7.019162466631779,0 +-37.24870988127807,-7.019249725924086,0 +-37.23869836773238,-7.020571274295333,0 +-37.23240868473784,-7.021260688705763,0 +-37.22968608592758,-7.021313406096357,0 +-37.22808314189017,-7.019583581828552,0 +-37.22597310998656,-7.018141580289173,0 +-37.22430576645674,-7.016866058458556,0 +-37.22278491383403,-7.015746004554948,0 +-37.22227012106841,-7.01531976588871,0 +-37.22134537320395,-7.014763308305866,0 +-37.22030197940675,-7.014080914695564,0 +-37.21937419135681,-7.013460849428146,0 +-37.21802119089297,-7.012877221377172,0 +-37.21678802600922,-7.012297562765842,0 +-37.21610270748933,-7.011443611989984,0 +-37.21536083130766,-7.010529869595923,0 +-37.21334912861541,-7.008507651408231,0 +-37.21197577617896,-7.006981246630124,0 +-37.2108305550096,-7.005759585862902,0 +-37.20938155141559,-7.004585530653999,0 +-37.20833592591543,-7.003839158668025,0 +-37.20694971992518,-7.002847620670388,0 +-37.20636920001379,-7.002413242145036,0 +-37.20525823959102,-7.001781923564725,0 +-37.20291440379481,-7.000195607952758,0 +-37.20216513315995,-6.999518500109795,0 +-37.20111676712732,-6.998887225411622,0 +-37.19907366871441,-6.99786440856416,0 +-37.1976349171353,-6.99657532131796,0 +-37.19658970820431,-6.995946573852658,0 +-37.19484298738546,-6.995057283116229,0 +-37.19355560259161,-6.994598191975017,0 +-37.19250481136793,-6.994148216657068,0 +-37.19068487048409,-6.99355460618209,0 +-37.1900382404121,-6.99335535717354,0 +-37.18957742227728,-6.992868732991411,0 +-37.18876384870361,-6.992251589298687,0 +-37.18732110920506,-6.991198047526422,0 +-37.18536013439356,-6.989940758701271,0 +-37.18389227642145,-6.989293309407858,0 +-37.18266064307201,-6.988955305987962,0 +-37.18151533948001,-6.987977728188288,0 +-37.18048617430669,-6.986880938516289,0 +-37.17892735468562,-6.985889575268736,0 +-37.17729290960074,-6.985184704987419,0 +-37.17502682571753,-6.9839270403043,0 +-37.17352298800658,-6.982932830956352,0 +-37.172653194218,-6.982431787292454,0 +-37.16991996448942,-6.981101162538286,0 +-37.16834822499995,-6.980399527530548,0 +-37.16595465794442,-6.978873810051748,0 +-37.16560634916706,-6.978584548758022,0 +-37.16439782575173,-6.977829801935183,0 +-37.16315391102057,-6.977078763258702,0 +-37.16198214061402,-6.97636426335375,0 +-37.16123842260625,-6.975941677567693,0 +-37.16069481933204,-6.975527417068691,0 +-37.15972011843124,-6.974861305555915,0 +-37.15850907521737,-6.974022477819045,0 +-37.15803676330464,-6.973806775766226,0 +-37.15674237602018,-6.973124915803174,0 +-37.15506485012106,-6.972033659301935,0 +-37.15420587447155,-6.971407674054797,0 +-37.15281010684537,-6.970086744028157,0 +-37.15227854272781,-6.969515208015499,0 +-37.15153723618916,-6.969133696466824,0 +-37.1506287909276,-6.968823536975439,0 +-37.14967392238458,-6.968710243104455,0 +-37.14764327432633,-6.968117512253114,0 +-37.14685746128456,-6.967651952813269,0 +-37.14470752202018,-6.96619135445629,0 +-37.14401061621216,-6.965532789500923,0 +-37.14229839074552,-6.964050333134405,0 +-37.14104999357789,-6.963051370860001,0 +-37.13998314662214,-6.962575976540428,0 +-37.13899938695783,-6.962023506781987,0 +-37.13860413904565,-6.961850224334953,0 +-37.13757579172719,-6.961415558717732,0 +-37.13688268735303,-6.960988500625838,0 +-37.13486887274076,-6.959816092120075,0 +-37.13435910322236,-6.95951831737314,0 +-37.13315038189645,-6.958637593942884,0 +-37.13209706167686,-6.958006278676631,0 +-37.13139491195033,-6.95758524055976,0 +-37.12964462881793,-6.956415718603099,0 +-37.12801028173866,-6.955368155495723,0 +-37.12749767646797,-6.955193352555723,0 +-37.12594886022058,-6.954943115719342,0 +-37.1244998416328,-6.954061689610651,0 +-37.12340614953545,-6.953546478008027,0 +-37.12241416168018,-6.953195123968272,0 +-37.12143203617379,-6.952763870775593,0 +-37.12017501773153,-6.952124631780753,0 +-37.11958466022509,-6.951865759168266,0 +-37.11880244985814,-6.951322275004574,0 +-37.11689995200278,-6.950480863335093,0 +-37.11635141878581,-6.950183611519273,0 +-37.11537296430616,-6.949592769659731,0 +-37.11423827788975,-6.948877200206959,0 +-37.11314302409296,-6.94816242837507,0 +-37.1126330147677,-6.947865871002015,0 +-37.11196336170391,-6.947523066754084,0 +-37.1114530396209,-6.947226358213969,0 +-37.11098285570698,-6.946931188437889,0 +-37.11031532513002,-6.946549356510728,0 +-37.1098827068175,-6.946294614177559,0 +-37.10898354186223,-6.945584294645288,0 +-37.10516366760057,-6.942990347241376,0 +-37.10350986326765,-6.942054955410586,0 +-37.10185674671639,-6.941078115189936,0 +-37.10091879456466,-6.940405566027744,0 +-37.10013528142429,-6.93993904168731,0 +-37.09884998454817,-6.939057938269373,0 +-37.09814986318337,-6.938596497555989,0 +-37.09725389367524,-6.938049361822153,0 +-37.09666810931898,-6.93775154865687,0 +-37.09600493747117,-6.937411718110982,0 +-37.09498009127803,-6.936978096377851,0 +-37.09415410805403,-6.936551294094782,0 +-37.09271863954194,-6.935412036871749,0 +-37.09202277253495,-6.93471527683223,0 +-37.09135184763137,-6.934453044597221,0 +-37.09017489142948,-6.933814368541793,0 +-37.08880226951016,-6.932856864916587,0 +-37.08801482553331,-6.932353968807718,0 +-37.08662538171669,-6.931750305406558,0 +-37.0853481492454,-6.931308844447779,0 +-37.08442803845146,-6.931196314407484,0 +-37.0838339440709,-6.930975589323753,0 +-37.08308127951383,-6.930748904883544,0 +-37.08217117080916,-6.930476659814944,0 +-37.0802535711717,-6.930247738252516,0 +-37.07958164218037,-6.930065148624289,0 +-37.07775637111645,-6.929562295629521,0 +-37.07601100229764,-6.928981854721802,0 +-37.07286726736392,-6.928151826088104,0 +-37.07080748700412,-6.927402206279544,0 +-37.06985580715811,-6.927170382587459,0 +-37.06898217396895,-6.926980486997264,0 +-37.06826770818946,-6.926755570534889,0 +-37.06739556172837,-6.926485663832822,0 +-37.06256678505572,-6.925399111380253,0 +-37.06173585521568,-6.925052568221647,0 +-37.05920919016508,-6.924010711080862,0 +-37.05782758440719,-6.923519385463721,0 +-37.05623587809207,-6.923228183796196,0 +-37.05496818557962,-6.922865348933472,0 +-37.05350926044127,-6.922341645041982,0 +-37.05248190842536,-6.922070098173308,0 +-37.0511808145399,-6.921711311208093,0 +-37.05042623153184,-6.921523217232536,0 +-37.04987255224427,-6.921303007298693,0 +-37.04887771592894,-6.921147328866656,0 +-37.04114004922903,-6.919299151777212,0 +-37.04055345049651,-6.919001385733948,0 +-37.03772698996779,-6.917870315189576,0 +-37.03689696838544,-6.917682380388404,0 +-37.03528088130138,-6.917189158855077,0 +-37.03453489879658,-6.916928304668811,0 +-37.03316496831059,-6.916618884994448,0 +-37.03203070679121,-6.916267715728035,0 +-37.03123729910241,-6.916116075721382,0 +-37.03072253840001,-6.915935456736934,0 +-37.01971112222269,-6.913165312155167,0 +-37.0143967239879,-6.911305869223372,0 +-37.01353503682088,-6.910958831282843,0 +-37.01101249339035,-6.910315236409545,0 +-37.00913003347999,-6.909574521842455,0 +-37.00743883919933,-6.909001399387664,0 +-37.00526971124906,-6.908658180810385,0 +-37.00370122474867,-6.908251640502952,0 +-37.00283582033187,-6.908103817603671,0 +-37.00186359033605,-6.907637524180418,0 +-37.00127191770681,-6.907415713827892,0 +-37.00075749668896,-6.907316849685935,0 +-36.99879931948698,-6.907050850620522,0 +-36.99820926157779,-6.906876209242581,0 +-36.99487876575495,-6.905810649946305,0 +-36.99222467252962,-6.904694443362851,0 +-36.99009173122032,-6.904016523521799,0 +-36.98888976807625,-6.903792738835697,0 +-36.98743444393901,-6.9036203399437,0 +-36.98687946076777,-6.903475851674215,0 +-36.98612738401831,-6.903203721904965,0 +-36.9850607455335,-6.902841538121027,0 +-36.9846256923342,-6.902744790336571,0 +-36.98407189548556,-6.90260344250428,0 +-36.98216666295433,-6.902161874867877,0 +-36.98169982653607,-6.901948339896666,0 +-36.97934780382003,-6.901273371796511,0 +-36.97859867100807,-6.901167603391614,0 +-36.97726963949719,-6.900647217496507,0 +-36.97570355130194,-6.90007825710581,0 +-36.97342850064928,-6.899447800954978,0 +-36.97256252135658,-6.899420167128995,0 +-36.97147343020002,-6.89907072915797,0 +-36.96979956732591,-6.898303299800817,0 +-36.96932958601855,-6.898168508167691,0 +-36.96858323199498,-6.897983896232946,0 +-36.96712064624263,-6.897651480648435,0 +-36.96613898651085,-6.897379726147022,0 +-36.9653559943736,-6.897075561114429,0 +-36.96174444903447,-6.896469710144623,0 +-36.96092826406396,-6.89604555882861,0 +-36.9593603217829,-6.895518901586637,0 +-36.95798574432637,-6.895156017422766,0 +-36.95724177017924,-6.894896514559677,0 +-36.9557883040632,-6.894575960084982,0 +-36.95512385859718,-6.894358213974646,0 +-36.95418614253308,-6.894051855355693,0 +-36.95312632617645,-6.893902203102622,0 +-36.95246525193254,-6.893730538270762,0 +-36.95181174193937,-6.893236052139608,0 +-36.95092110192508,-6.892690643901272,0 +-36.94994729928073,-6.8921365249582,0 +-36.9494830834332,-6.891720470816622,0 +-36.949219028607,-6.89127423666861,0 +-36.94820243166545,-6.890547962366803,0 +-36.94762183851948,-6.890212882726762,0 +-36.94584375283895,-6.889087154302893,0 +-36.944201552435,-6.887376971860986,0 +-36.94335686214069,-6.886638095128884,0 +-36.94223836321486,-6.885727239382522,0 +-36.94092281176619,-6.884563750317077,0 +-36.94006870197959,-6.884021384576909,0 +-36.93945507497477,-6.883448830188783,0 +-36.93907490642387,-6.883002374129342,0 +-36.93861726867288,-6.882514251729786,0 +-36.93698036468433,-6.881095261178007,0 +-36.9359613201032,-6.879876489983399,0 +-36.93481460494862,-6.878730343121475,0 +-36.93416200659071,-6.878153111491168,0 +-36.93338821033179,-6.877610033732434,0 +-36.93198854229973,-6.876730234302733,0 +-36.93121141283454,-6.876229714982813,0 +-36.9304892257275,-6.875339320895525,0 +-36.93010848409148,-6.874892918844938,0 +-36.92976427769459,-6.874525308108611,0 +-36.92933937629728,-6.874150584308328,0 +-36.92852263922248,-6.873560924772248,0 +-36.9278628646302,-6.873017432121456,0 +-36.9272805174251,-6.872516072805948,0 +-36.92599029310242,-6.871586817602215,0 +-36.92535119308947,-6.871006514521602,0 +-36.92473089482223,-6.870448543299752,0 +-36.92422385677516,-6.870019967943235,0 +-36.92382187893084,-6.869746393722142,0 +-36.92344079743081,-6.869419999668683,0 +-36.92320496014027,-6.869225706623209,0 +-36.92282632309114,-6.868863136030503,0 +-36.92232507559346,-6.868418547270524,0 +-36.92201884544335,-6.868210098567288,0 +-36.92171321805485,-6.867981347089828,0 +-36.92082141274703,-6.867157541905821,0 +-36.92069741440206,-6.867005846365959,0 +-36.92046247537382,-6.866828837681195,0 +-36.9196985000459,-6.866411549752581,0 +-36.91942537881042,-6.86629224496595,0 +-36.91913928736708,-6.866104244062234,0 +-36.9186488764783,-6.866022367408364,0 +-36.91843215422147,-6.865963384997863,0 +-36.91814105423565,-6.865957939197566,0 +-36.91776678442994,-6.866013244137753,0 +-36.91754040256198,-6.866094370923195,0 +-36.91724676059463,-6.866294462394595,0 +-36.91710648621527,-6.866431040072257,0 +-36.9167896751915,-6.866724523197281,0 +-36.91617836945746,-6.867416128036099,0 +-36.91547510536088,-6.867849527087088,0 +-36.91476124573345,-6.868522065070877,0 +-36.91420419463965,-6.868964299126865,0 +-36.91353225747014,-6.86949556716784,0 +-36.91283934953268,-6.870118641229701,0 +-36.91229891861065,-6.870947629030663,0 +-36.91169173489148,-6.871530918910567,0 +-36.91088656324573,-6.872157419073822,0 +-36.91024358688215,-6.872574167362797,0 +-36.90986120620439,-6.872891108753099,0 +-36.90943918895956,-6.873290096818327,0 +-36.90893535172856,-6.873518640593148,0 +-36.90848298225475,-6.873950345739748,0 +-36.90831884580516,-6.874224638338827,0 +-36.9082598171964,-6.874278693848839,0 +-36.90752023391,-6.875227857873304,0 +-36.907219174461,-6.875584659071225,0 +-36.90632953589496,-6.876288756448935,0 +-36.90526088887447,-6.877476679900656,0 +-36.90445874860612,-6.8781812317208,0 +-36.90315795183044,-6.879150059154306,0 +-36.90252169482555,-6.879737004732212,0 +-36.90170926647282,-6.880603424436194,0 +-36.90098072150715,-6.881472135839632,0 +-36.89996941064497,-6.882050120798181,0 +-36.899544828194,-6.882402285694877,0 +-36.89882021119938,-6.883070402051124,0 +-36.89839541574786,-6.883462567346883,0 +-36.89739088815511,-6.884036606719217,0 +-36.8966349803455,-6.884657431445817,0 +-36.89602889016982,-6.885412320816497,0 +-36.89577788013085,-6.885525978192514,0 +-36.89525589640245,-6.886087269807042,0 +-36.89463080323571,-6.886388694640028,0 +-36.89412082894567,-6.886859783441697,0 +-36.89319834889599,-6.887397358960821,0 +-36.89180099974408,-6.888606586176516,0 +-36.89099186517034,-6.889391004156436,0 +-36.88988921203755,-6.890372541324846,0 +-36.88871871704015,-6.891023336360899,0 +-36.88771259059976,-6.891719337668338,0 +-36.88724597311591,-6.892190239375793,0 +-36.88648862009602,-6.892772419002881,0 +-36.88549338139667,-6.893102555289132,0 +-36.8849393483121,-6.893812461632566,0 +-36.88447508327286,-6.894121993511058,0 +-36.88375604136976,-6.894626644513565,0 +-36.88337631574483,-6.894978046314365,0 +-36.88257646982905,-6.895639060278171,0 +-36.88185945150741,-6.896262512121236,0 +-36.88109909459924,-6.896806169295604,0 +-36.88059880354545,-6.897072216957207,0 +-36.87971792673687,-6.897729671682304,0 +-36.8792587397805,-6.898036809401153,0 +-36.87843615899884,-6.898288524940485,0 +-36.87779988054221,-6.89899464899196,0 +-36.87730405654907,-6.899258153044685,0 +-36.87680684701431,-6.899562135976507,0 +-36.87613358972142,-6.900340342339404,0 +-36.87538060309373,-6.90079971954412,0 +-36.87428971804098,-6.901570798874977,0 +-36.87340942795792,-6.902186951195906,0 +-36.87241036346735,-6.902717170433436,0 +-36.87130831868667,-6.903850911592836,0 +-36.86997602344511,-6.904611083781632,0 +-36.86905767248217,-6.905223714924485,0 +-36.86843234405348,-6.905605695201568,0 +-36.86797104007717,-6.90599196295995,0 +-36.86746730986738,-6.906379119829987,0 +-36.86675209146857,-6.906961623135506,0 +-36.86632081124597,-6.907594198970055,0 +-36.86573995405389,-6.907895846983481,0 +-36.86479077558744,-6.908264159578658,0 +-36.86403403105779,-6.908807022763908,0 +-36.86328477437578,-6.909225310847302,0 +-36.86299261383442,-6.909416882897842,0 +-36.86240143222252,-6.909977602338057,0 +-36.86202917240386,-6.910127761386376,0 +-36.86127797536912,-6.910630144948373,0 +-36.86060847967434,-6.911132261147622,0 +-36.85980929944029,-6.911830213311498,0 +-36.85876132474643,-6.912724356445764,0 +-36.8580126054973,-6.91322346315502,0 +-36.85693371139357,-6.913912386237689,0 +-36.85630060038014,-6.914616004910535,0 +-36.85582578583212,-6.915283968375737,0 +-36.85544826587812,-6.915552667424873,0 +-36.85478144642759,-6.916012835563612,0 +-36.85443073048798,-6.916605898598641,0 +-36.85386698920898,-6.917434402952256,0 +-36.8531676135731,-6.918702507703686,0 +-36.85268656729217,-6.919614436884883,0 +-36.85286354803425,-6.920387573752078,0 +-36.85297495292961,-6.921069463653645,0 +-36.85316547799025,-6.921674536273397,0 +-36.85335348596463,-6.922240663428029,0 +-36.85339433448324,-6.922710210393169,0 +-36.85330749723085,-6.923178896758089,0 +-36.85344066939889,-6.923908563023321,0 +-36.85339238261203,-6.925108850333818,0 +-36.85313237931191,-6.925662393372362,0 +-36.85259730587678,-6.926684264275912,0 +-36.85203904234574,-6.927628791035963,0 +-36.85190352303464,-6.92838702111892,0 +-36.85174648813036,-6.92882136836886,0 +-36.85154933727056,-6.929530724858245,0 +-36.85136728916886,-6.930162303696164,0 +-36.85117709163021,-6.930716315763608,0 +-36.85114337223271,-6.931199100840912,0 +-36.85111236713305,-6.931643004543841,0 +-36.85134475364912,-6.932207765328791,0 +-36.85169306373592,-6.932777458278808,0 +-36.85208355073732,-6.933542122243379,0 +-36.85220233296667,-6.933781624900791,0 +-36.85243919781733,-6.934143037083262,0 +-36.85263747363527,-6.934617117341608,0 +-36.8527617966483,-6.935274033522626,0 +-36.85255387452094,-6.935696269415113,0 +-36.85208363461111,-6.93571132041027,0 +-36.85153478805293,-6.93572348570844,0 +-36.85134009806441,-6.935713345281012,0 +-36.85060174312743,-6.935674888648258,0 +-36.85012055619506,-6.9363680079023,0 +-36.85006787362548,-6.936721758828819,0 +-36.85000510229657,-6.937351310185914,0 +-36.84991865678571,-6.937547046920891,0 +-36.8496944330032,-6.938247944628676,0 +-36.84919202178683,-6.93897907931456,0 +-36.84890002657107,-6.939362233238459,0 +-36.84861059983528,-6.939666900101797,0 +-36.84839725961517,-6.940053406956661,0 +-36.84813466746552,-6.940598228297848,0 +-36.84771959453617,-6.941096031284014,0 +-36.84718229749315,-6.941706681263564,0 +-36.84691751571066,-6.942369767118818,0 +-36.84669073316978,-6.942998566960007,0 +-36.84636109929031,-6.943340815824481,0 +-36.84583131226871,-6.943867296396953,0 +-36.84542240962248,-6.944358207255643,0 +-36.84501364829487,-6.944848774633422,0 +-36.84447675196535,-6.945420320801431,0 +-36.84398158540974,-6.945915460239076,0 +-36.84366333790728,-6.946094719664321,0 +-36.84332426775201,-6.946484360310671,0 +-36.84305273443625,-6.947078646491645,0 +-36.84285109141109,-6.947792402605818,0 +-36.84319319312435,-6.948309445730293,0 +-36.84377103403655,-6.948835388386454,0 +-36.84423417873839,-6.949238708585727,0 +-36.84431124753944,-6.949318250458517,0 +-36.84481507468318,-6.950685925582498,0 +-36.84487518925645,-6.951128323040499,0 +-36.8446166098526,-6.952276908157118,0 +-36.84409632762442,-6.95269667280434,0 +-36.84329436264136,-6.952889002452725,0 +-36.84233026115646,-6.95365389342468,0 +-36.84193220175078,-6.955311228635134,0 +-36.84078059288902,-6.956771280987775,0 +-36.83950798543864,-6.957657404857024,0 +-36.8385587659297,-6.958489434998151,0 +-36.83798679030179,-6.958469497203243,0 +-36.83671558186061,-6.958354846519358,0 +-36.83608768164181,-6.95790324894112,0 +-36.83502324362432,-6.957435328215093,0 +-36.83382102357491,-6.957179494553966,0 +-36.83260897200784,-6.957209232767697,0 +-36.83089587491833,-6.957364128646248,0 +-36.82988273062692,-6.956977552166332,0 +-36.82902632229608,-6.955813714384019,0 +-36.82868583598998,-6.955375252055195,0 +-36.82738095045763,-6.954981158346424,0 +-36.82656799716891,-6.954746396960449,0 +-36.82583061009534,-6.954586656140233,0 +-36.82464952504095,-6.954137679099567,0 +-36.82392464088276,-6.953325775029675,0 +-36.82336811238887,-6.95323719053179,0 +-36.82139327065533,-6.95338951199517,0 +-36.82055340267566,-6.953214653368015,0 +-36.819202496527,-6.953374073492763,0 +-36.81726269752673,-6.954075821377323,0 +-36.81617457762941,-6.954671601778949,0 +-36.81370395216884,-6.956135500004192,0 +-36.81158554314527,-6.957752636687005,0 +-36.81072760258926,-6.95793271689489,0 +-36.80971060277174,-6.958529372589208,0 +-36.80854764181358,-6.959262486147257,0 +-36.80725386412553,-6.959778802126568,0 +-36.80588998764932,-6.960361816466002,0 +-36.80488999556665,-6.960676345785789,0 +-36.80389531407791,-6.961059003366711,0 +-36.80246241349492,-6.96136021113101,0 +-36.80066425953939,-6.962138299887555,0 +-36.79778501526827,-6.962584634786561,0 +-36.79482584353848,-6.963447324166392,0 +-36.79270239482896,-6.964342151679947,0 +-36.79049488723096,-6.96523777723429,0 +-36.78868332844024,-6.965650350277005,0 +-36.78737558659301,-6.966168779876224,0 +-36.78568086684592,-6.96646593188292,0 +-36.78462254026005,-6.966710549777455,0 +-36.7827305503313,-6.966719955072413,0 +-36.78102912898359,-6.967082035031576,0 +-36.78003833868983,-6.967185604023659,0 +-36.77861738046266,-6.967480646501492,0 +-36.77608373379031,-6.96739219775248,0 +-36.77381498438545,-6.967533898817952,0 +-36.77218535191081,-6.967617551576835,0 +-36.77026414816459,-6.967833724186782,0 +-36.76948558764995,-6.967807000347687,0 +-36.76821086121726,-6.967763241508916,0 +-36.76714854058601,-6.96772635508374,0 +-36.76588116531289,-6.967608869231155,0 +-36.76432244575021,-6.967485587967837,0 +-36.76311906328569,-6.967304525711086,0 +-36.76241617787925,-6.967069577548193,0 +-36.76156191047375,-6.967040755920181,0 +-36.75922783312497,-6.967094393599149,0 +-36.75733085883633,-6.967298716066625,0 +-36.75578448536115,-6.967586646436415,0 +-36.7545079989045,-6.968096547454882,0 +-36.75394127305322,-6.968753012382457,0 +-36.75343748950738,-6.969096500641346,0 +-36.75280481154969,-6.969595931023274,0 +-36.75203817443853,-6.970300710131712,0 +-36.75124282515851,-6.970637771495987,0 +-36.75074265674282,-6.970782301710686,0 +-36.7498639004078,-6.971117639357945,0 +-36.74805383698857,-6.972074696197742,0 +-36.74711948021783,-6.972777664636851,0 +-36.74644117009721,-6.97324424755908,0 +-36.74551205461921,-6.973783795898739,0 +-36.74436991926483,-6.974479735881941,0 +-36.74327153840287,-6.975054528420596,0 +-36.74239171985712,-6.975473755412612,0 +-36.7413527987523,-6.975804801003475,0 +-36.74026031950962,-6.97637950707513,0 +-36.73970759580266,-6.976769282040623,0 +-36.73919315299889,-6.977161012680825,0 +-36.73834832532125,-6.977541061850044,0 +-36.73805258990981,-6.977653770026555,0 +-36.73721134067925,-6.977952055997121,0 +-36.73714162079914,-6.978361573219033,0 +-36.7363824417098,-6.978823775031109,0 +-36.73558725703156,-6.979121118874002,0 +-36.73415930285255,-6.979763458181967,0 +-36.73318463863971,-6.980423098826446,0 +-36.7325522659615,-6.980728946971351,0 +-36.73212966108762,-6.980960270172125,0 +-36.73165979304684,-6.981353818791948,0 +-36.73102155637541,-6.981822856232393,0 +-36.73034471782553,-6.982208699380454,0 +-36.7295006978206,-6.982629704421977,0 +-36.72798722752606,-6.983363134286274,0 +-36.72718551676516,-6.983826937683654,0 +-36.72608549262454,-6.984441668680534,0 +-36.72544360416439,-6.984992552737349,0 +-36.72459671780591,-6.985495307023675,0 +-36.72400801945282,-6.985843793323678,0 +-36.72329454509029,-6.986228340666487,0 +-36.72219185805886,-6.987137501388246,0 +-36.72133806594255,-6.987720910581709,0 +-36.72065104368681,-6.988087185336081,0 +-36.71942777927633,-6.98855117977148,0 +-36.71747250963296,-6.989838723585926,0 +-36.71646441093352,-6.990372528683127,0 +-36.71546900428728,-6.990959214942394,0 +-36.71475287760293,-6.991725106583615,0 +-36.7143310972459,-6.992331101362305,0 +-36.71222630752833,-6.994113239642125,0 +-36.71128614496644,-6.995257901665207,0 +-36.71091741152912,-6.996088659849012,0 +-36.71055471176213,-6.996916041828968,0 +-36.70987942579379,-6.997935444644708,0 +-36.70965163668559,-6.998257847039538,0 +-36.70904742122039,-6.999366965244374,0 +-36.7086893504236,-6.999859911152641,0 +-36.70821035220919,-7.000572370301846,0 +-36.70738074559873,-7.001502948527386,0 +-36.70661791775742,-7.002157111475986,0 +-36.70583271673168,-7.003579895986375,0 +-36.70469747662067,-7.005213438844214,0 +-36.7043379312604,-7.005707217072217,0 +-36.70351040269536,-7.006523216828716,0 +-36.70280772672853,-7.007005620059039,0 +-36.7021081622374,-7.00737585555925,0 +-36.70146457646452,-7.00774877792772,0 +-36.70053636937319,-7.008224588074796,0 +-36.69939033369574,-7.008409078770311,0 +-36.69830506218913,-7.008369935310464,0 +-36.69733165486294,-7.008447807726355,0 +-36.69618344137345,-7.008745209785603,0 +-36.69475127137154,-7.009088230681236,0 +-36.69401012494001,-7.009117652210568,0 +-36.69275388774103,-7.009241233314543,0 +-36.69208095685759,-7.00910280741622,0 +-36.69140244407718,-7.00896504757583,0 +-36.69074322119619,-7.008638122190018,0 +-36.68996195356706,-7.008539777859593,0 +-36.68871564196242,-7.008704532798836,0 +-36.68745985293485,-7.008931268121568,0 +-36.68636554417723,-7.009173919316769,0 +-36.68538024943764,-7.009535098746292,0 +-36.6841585614843,-7.009952684496067,0 +-36.6825263188404,-7.010588755761407,0 +-36.68084063686467,-7.011169653889413,0 +-36.67962185747613,-7.011697723703866,0 +-36.67880313229467,-7.012237739231656,0 +-36.67757844231745,-7.013039578484923,0 +-36.67639430519893,-7.014291314293368,0 +-36.67572916554256,-7.015339219879198,0 +-36.67512059750751,-7.016389653712896,0 +-36.67421203261642,-7.017822932601162,0 +-36.67207370481773,-7.020063840083731,0 +-36.67124471660785,-7.02082592099714,0 +-36.67087213299484,-7.021605515089974,0 +-36.66998490945929,-7.022423442971148,0 +-36.66938608418327,-7.023195084224332,0 +-36.66935826980742,-7.02393106224339,0 +-36.66915765803586,-7.024717391682394,0 +-36.66879294665641,-7.025327344847954,0 +-36.66841500339,-7.026277194918955,0 +-36.6680523090401,-7.026830463195507,0 +-36.66751270063266,-7.027546932128275,0 +-36.66680028785176,-7.028313420870899,0 +-36.66613465971621,-7.029254657627954,0 +-36.66538937487879,-7.030761678342148,0 +-36.66498607397823,-7.032282384160197,0 +-36.66466879273725,-7.033122160827368,0 +-36.66422893458672,-7.03418444947134,0 +-36.66386785399209,-7.034681498372446,0 +-36.66337546865334,-7.035627995287373,0 +-36.66256333403517,-7.036718219882482,0 +-36.66226115309323,-7.037160509988881,0 +-36.66199922880674,-7.038055748878417,0 +-36.66160994924814,-7.039275647458068,0 +-36.66128780435832,-7.040221450627731,0 +-36.66056582685565,-7.041163826108923,0 +-36.65956794280733,-7.043405425713584,0 +-36.65899580294055,-7.044855870352355,0 +-36.65797408920815,-7.046066654450153,0 +-36.65693593651245,-7.049214262771269,0 +-36.65597900398885,-7.05191200410894,0 +-36.65529416440165,-7.053478740323399,0 +-36.65427020663013,-7.054862355510302,0 +-36.65376584588005,-7.055928741970038,0 +-36.65319457006424,-7.057167166380638,0 +-36.65192351663245,-7.059108997527166,0 +-36.65158150250477,-7.061070530714816,0 +-36.6512154854503,-7.061736671954455,0 +-36.6506145819555,-7.06261894950639,0 +-36.64972695335925,-7.063546250831956,0 +-36.64877360228665,-7.064534868326589,0 +-36.64761507239898,-7.06489107407994,0 +-36.64657491682855,-7.065083294063538,0 +-36.64564280234106,-7.065449572208317,0 +-36.6436779527653,-7.065920462262618,0 +-36.64157959788849,-7.067201686600085,0 +-36.64031106326785,-7.067383168238152,0 +-36.63944448111683,-7.067523141754844,0 +-36.63806111100794,-7.067756162735044,0 +-36.63585898203871,-7.068414068839802,0 +-36.63429350283513,-7.068868916977825,0 +-36.63273207268379,-7.069210505420009,0 +-36.63175266817616,-7.069346395432833,0 +-36.62965776865812,-7.070180153578794,0 +-36.62827120952625,-7.070528047536015,0 +-36.62728601741669,-7.070833270589581,0 +-36.6262548194497,-7.070909412387796,0 +-36.62480561421313,-7.071594916275954,0 +-36.62336445949941,-7.072109197051002,0 +-36.62227359919091,-7.07218296770828,0 +-36.62152273276329,-7.072438981271596,0 +-36.62059239824704,-7.072576472105039,0 +-36.61989630817505,-7.072665355369259,0 +-36.61916223274288,-7.072580868350404,0 +-36.61826426829606,-7.072320140542397,0 +-36.6171120440434,-7.072164102984344,0 +-36.61642573416855,-7.072138814616255,0 +-36.61477160172921,-7.07202142505977,0 +-36.61302427843053,-7.071333391948064,0 +-36.6120601454925,-7.071127933491897,0 +-36.61023372522883,-7.071004015108466,0 +-36.60926594237326,-7.070911806826746,0 +-36.60723728580227,-7.070214588875768,0 +-36.60581966990737,-7.069992934992231,0 +-36.60445935749899,-7.069773391635755,0 +-36.60310163167988,-7.069497419809541,0 +-36.60157798460247,-7.06910232998093,0 +-36.60055944962301,-7.068838278199196,0 +-36.59874172696689,-7.068658585658109,0 +-36.59709652687303,-7.06859920690584,0 +-36.59629390638121,-7.06845522673298,0 +-36.59491210515415,-7.068402708220124,0 +-36.59387651630878,-7.06842062832498,0 +-36.59266731281004,-7.068432107804741,0 +-36.59131514338665,-7.068495165014922,0 +-36.59057228734387,-7.068524229055104,0 +-36.58994182420564,-7.068557843022887,0 +-36.58891202789844,-7.068576547326469,0 +-36.58787681143055,-7.068764998736164,0 +-36.58552678061751,-7.068792854693855,0 +-36.58392022743417,-7.0688470416676,0 +-36.5826562299661,-7.068914287551102,0 +-36.58127550556653,-7.069034275720218,0 +-36.58035884881942,-7.069000598491128,0 +-36.57928144942426,-7.068733733566239,0 +-36.57853283568568,-7.068877084923362,0 +-36.57732556065091,-7.069060401574846,0 +-36.57594507173133,-7.06923716081614,0 +-36.57510034469834,-7.068751236834911,0 +-36.57430045868254,-7.068550955458311,0 +-36.57345186622919,-7.068121160172018,0 +-36.57214488028511,-7.067674271513477,0 +-36.57158506541086,-7.067369405243313,0 +-36.57068560279022,-7.066995513045597,0 +-36.56906852013519,-7.06589255770511,0 +-36.56771640312463,-7.065216091713468,0 +-36.56601997285229,-7.064526057806734,0 +-36.56445114151192,-7.06355811984048,0 +-36.56281405025869,-7.062753552369684,0 +-36.56169179760285,-7.062143473057167,0 +-36.56084808722589,-7.061771900856338,0 +-36.56011871646047,-7.061404683567774,0 +-36.55944650044727,-7.061039638356178,0 +-36.55883142325364,-7.060677151045414,0 +-36.55810598941908,-7.060197327582342,0 +-36.55658590009811,-7.059517775313669,0 +-36.55546022440993,-7.059022075682645,0 +-36.55382804257311,-7.058337589073734,0 +-36.55259734384529,-7.057611286559997,0 +-36.55139328417077,-7.056032961520794,0 +-36.5502436649336,-7.054627494792687,0 +-36.54902483226422,-7.053618438921501,0 +-36.54763713731504,-7.052720332547086,0 +-36.54630466314976,-7.051823467817171,0 +-36.54533552375212,-7.051672823997599,0 +-36.54453541042007,-7.051642927717101,0 +-36.54244772477535,-7.050900300834595,0 +-36.54035379892433,-7.050195750291812,0 +-36.53836928091997,-7.049781860953344,0 +-36.53672220528503,-7.049551625927198,0 +-36.53445428921299,-7.04912957109038,0 +-36.53282107010188,-7.04850152048779,0 +-36.53146360719794,-7.048166451811391,0 +-36.52954853109484,-7.04752795782241,0 +-36.52774283166723,-7.046897075643368,0 +-36.52601236174157,-7.045757469714979,0 +-36.52488247646061,-7.045432433736025,0 +-36.52387112200366,-7.044998397973672,0 +-36.52297916060548,-7.044455462182301,0 +-36.52196797069121,-7.044078302934717,0 +-36.52079094691688,-7.043581939460581,0 +-36.5202352670839,-7.043221774501641,0 +-36.51917496094927,-7.042559651720777,0 +-36.51776712152918,-7.041658724764692,0 +-36.51597655352086,-7.040631907942345,0 +-36.51423808170666,-7.039832552055266,0 +-36.51299668307648,-7.039449049998771,0 +-36.5112072562471,-7.038532766416393,0 +-36.51037823308862,-7.0378254891965,0 +-36.50966152962652,-7.037179371531064,0 +-36.50820988695136,-7.03639216191143,0 +-36.5065722018101,-7.035991259348878,0 +-36.50538663906003,-7.03566254001223,0 +-36.50392789977274,-7.03510269894679,0 +-36.50349294340171,-7.034579525055831,0 +-36.50203021758787,-7.034072601543784,0 +-36.50124629661405,-7.033822265639286,0 +-36.50024126462429,-7.033452359125186,0 +-36.49927329154157,-7.033531842409658,0 +-36.49812915327121,-7.033657781106574,0 +-36.49761463541491,-7.033694472822582,0 +-36.49480570986123,-7.033925542718445,0 +-36.49281896723457,-7.033693036480232,0 +-36.49133729878046,-7.033756499010082,0 +-36.49030290448575,-7.034057610996697,0 +-36.48876430059281,-7.034171417508964,0 +-36.48688779697905,-7.034216303764052,0 +-36.48489966862066,-7.034199139103459,0 +-36.48266828688806,-7.034507164635071,0 +-36.48106190155199,-7.034782575252177,0 +-36.48025713778593,-7.034919496474911,0 +-36.47893283545375,-7.035148064435547,0 +-36.47710699838757,-7.035076746906425,0 +-36.47555941960945,-7.035244058861175,0 +-36.47349915463181,-7.035335144184065,0 +-36.47287546484786,-7.035370625264499,0 +-36.47196811574563,-7.035453161605091,0 +-36.46926531102206,-7.035815109009949,0 +-36.46801493423394,-7.035770660682194,0 +-36.46704847413317,-7.035738309065763,0 +-36.46499691137328,-7.035887671782468,0 +-36.46310834344206,-7.036209973991472,0 +-36.46185355922474,-7.036334638149668,0 +-36.46077175228385,-7.036349498520486,0 +-36.45939746443067,-7.03646261991892,0 +-36.45802356409389,-7.036520279971469,0 +-36.45711585406721,-7.036488545140304,0 +-36.45580763526174,-7.036613432227686,0 +-36.45488434550969,-7.036744700649708,0 +-36.45337973200365,-7.037022592023974,0 +-36.45245793033841,-7.037099181513893,0 +-36.45211472474321,-7.037085976515547,0 +-36.44839854449718,-7.037112793373487,0 +-36.44754153723168,-7.037137241399807,0 +-36.44628313330147,-7.037203247986535,0 +-36.44450479034559,-7.03736533930612,0 +-36.442154746243,-7.03756286169556,0 +-36.44083632334419,-7.037682195653079,0 +-36.43951587902349,-7.037800183357059,0 +-36.4375724298463,-7.037668035317401,0 +-36.4365985640963,-7.037630536550934,0 +-36.43430964884936,-7.037545440221409,0 +-36.43235651295928,-7.037758499657031,0 +-36.42983262409026,-7.038007603259931,0 +-36.42787368035081,-7.038389962411402,0 +-36.42712788054025,-7.038590553751768,0 +-36.42627308711882,-7.038559273651022,0 +-36.42535909254469,-7.038582534397299,0 +-36.42455671974639,-7.038666572747115,0 +-36.4236457018585,-7.038633201610902,0 +-36.42280211393118,-7.038375554615676,0 +-36.41952612539036,-7.038597069642468,0 +-36.4183866910899,-7.038553688545919,0 +-36.41724354305147,-7.03856766748769,0 +-36.41637698593657,-7.038819993320518,0 +-36.41481534226374,-7.039386878736801,0 +-36.41407245904924,-7.039416009022935,0 +-36.41320524084806,-7.039666649956257,0 +-36.41211126387028,-7.039795576889789,0 +-36.41113424968291,-7.039929506148503,0 +-36.4100996964095,-7.040118106380875,0 +-36.40899699748345,-7.040644225962134,0 +-36.40825591110821,-7.040616754782522,0 +-36.40721361845556,-7.040861939249453,0 +-36.40638651055171,-7.041342794787256,0 +-36.40424875552853,-7.0415490659209,0 +-36.40395263910354,-7.041709078193479,0 +-36.4032418385714,-7.042082115447733,0 +-36.40253631619901,-7.042285148808066,0 +-36.40091916351882,-7.042510293770623,0 +-36.40069253888895,-7.042501486820635,0 +-36.39908148203272,-7.042862933497694,0 +-36.39855256774884,-7.043351202027818,0 +-36.39733294582154,-7.043871800469742,0 +-36.39610279628523,-7.044510605434331,0 +-36.39499452022149,-7.044927392409771,0 +-36.39360543439403,-7.04516434826614,0 +-36.39214781571499,-7.045903580939502,0 +-36.39098034029203,-7.046539665527896,0 +-36.38963888172117,-7.047171147056975,0 +-36.38770567478205,-7.048184080139048,0 +-36.38580528761384,-7.048398036922102,0 +-36.38464719361542,-7.048696283323728,0 +-36.38394726944449,-7.049009279286353,0 +-36.38261631111595,-7.049300421274147,0 +-36.38151423057783,-7.049600691474981,0 +-36.3803995883878,-7.050243115907783,0 +-36.37967922666696,-7.051012036538945,0 +-36.37891155365046,-7.051437060186705,0 +-36.37786018238004,-7.051912051508562,0 +-36.37663345159142,-7.052206944931227,0 +-36.37573910151006,-7.052886484211777,0 +-36.37544884365682,-7.053086024849105,0 +-36.37497906932727,-7.053315548973928,0 +-36.37422414054845,-7.053638181120116,0 +-36.37339735055917,-7.05399292665707,0 +-36.37278499151459,-7.05425234592529,0 +-36.37184788092547,-7.054708612787623,0 +-36.37084113232076,-7.05522362066932,0 +-36.37023331516132,-7.055373485261632,0 +-36.36944494299684,-7.055557396457853,0 +-36.36894071580085,-7.055750429271994,0 +-36.36829369843696,-7.055974449959558,0 +-36.36796673016995,-7.056173009344433,0 +-36.36760062078768,-7.056476780417568,0 +-36.36720407654195,-7.056675270516286,0 +-36.36637781006579,-7.05699778622798,0 +-36.36584231794915,-7.05711905645913,0 +-36.3647254916869,-7.057604936222024,0 +-36.36433013234961,-7.057694916150145,0 +-36.36371777849278,-7.057846890263665,0 +-36.3631446503686,-7.057930642163543,0 +-36.36268350932147,-7.057948941407719,0 +-36.36219136857369,-7.057789486394374,0 +-36.36162213590045,-7.057732363063583,0 +-36.36112156899858,-7.057712927523394,0 +-36.36065383414591,-7.057765360589028,0 +-36.36004348129782,-7.057777025078028,0 +-36.35922355297252,-7.057888078874179,0 +-36.35798337235247,-7.058054841916853,0 +-36.35693141340717,-7.058685688322087,0 +-36.3567484135912,-7.058925696423497,0 +-36.35617172265983,-7.059432586890861,0 +-36.35587547427146,-7.059843916588868,0 +-36.35539043620311,-7.061291834375486,0 +-36.35420034956974,-7.062541039151647,0 +-36.35343417737099,-7.06340587980032,0 +-36.35266799481168,-7.064269734965294,0 +-36.35189610209554,-7.065295331769295,0 +-36.35120989059298,-7.066244338577074,0 +-36.35035551311299,-7.067348704806007,0 +-36.34967052307965,-7.068128841355231,0 +-36.34839214654178,-7.06920349977211,0 +-36.34745008875769,-7.070301951884377,0 +-36.34699930269286,-7.07133757730358,0 +-36.34639924218727,-7.072044569748212,0 +-36.34497873642624,-7.073129540001826,0 +-36.34414397162605,-7.07391083576564,0 +-36.34225610542965,-7.074489577735513,0 +-36.34077075265078,-7.074919759006645,0 +-36.33763429631027,-7.07634045111619,0 +-36.33666271772594,-7.076627245588217,0 +-36.33544734106606,-7.076743271473677,0 +-36.33364174716623,-7.077241226866462,0 +-36.33298192070708,-7.0775395107824,0 +-36.33182752373575,-7.0780613667935,0 +-36.32970799892468,-7.07866125638744,0 +-36.32888290224968,-7.078957297392536,0 +-36.32780837711624,-7.079406516373232,0 +-36.32568348313266,-7.079739221580736,0 +-36.32422218945057,-7.079831664538743,0 +-36.3216759817798,-7.080611491896645,0 +-36.32044073411091,-7.081049476648548,0 +-36.31815455672741,-7.081370886567703,0 +-36.31699543682667,-7.081975169119874,0 +-36.31542844213782,-7.082644869802316,0 +-36.31395176140481,-7.08307503599543,0 +-36.31165084321378,-7.083878476525931,0 +-36.3104235523285,-7.084155564694523,0 +-36.30829858663206,-7.084642965128166,0 +-36.30666709972088,-7.085070233245312,0 +-36.30445224913098,-7.085711450815695,0 +-36.30337899397595,-7.08631720717364,0 +-36.30158247255072,-7.086734298546912,0 +-36.29823245624273,-7.087739339094325,0 +-36.29709274295286,-7.088263562762487,0 +-36.29587375639974,-7.08878419610952,0 +-36.2940115026038,-7.08928043687089,0 +-36.29319653332168,-7.089329513804423,0 +-36.29214003420518,-7.089288974123023,0 +-36.29018485945371,-7.089295015382095,0 +-36.28921005919833,-7.089418494716011,0 +-36.28692779444825,-7.089739005870384,0 +-36.2836672327488,-7.09041951063621,0 +-36.28170733486935,-7.090907355270677,0 +-36.27973224396288,-7.091714509880777,0 +-36.2759598729148,-7.092615938550628,0 +-36.27505911039821,-7.092823880635604,0 +-36.27447967117158,-7.093124344177124,0 +-36.2738258224612,-7.093261031599901,0 +-36.27234607780563,-7.093769404414703,0 +-36.27168560200477,-7.094066837708712,0 +-36.27046334244157,-7.094182288360066,0 +-36.26964932225698,-7.094232454810324,0 +-36.26899456741997,-7.094369088580916,0 +-36.26809639089525,-7.094496658041378,0 +-36.26605059950015,-7.09490360563912,0 +-36.26514359271955,-7.095272470369566,0 +-36.26399022901908,-7.095712704051816,0 +-36.2629991598094,-7.096158982849515,0 +-36.26209188117152,-7.096447799414311,0 +-36.26135066838218,-7.096582076951679,0 +-36.26110260869267,-7.096653659235336,0 +-36.25934738863519,-7.096805094842594,0 +-36.25850874686002,-7.096844078933857,0 +-36.25745838845373,-7.097079762730458,0 +-36.25717623260217,-7.097206799133852,0 +-36.25597732664989,-7.097645071181927,0 +-36.25499138700067,-7.097953553708362,0 +-36.25373469163492,-7.098248642339978,0 +-36.25247982153913,-7.098475427721631,0 +-36.25220228834895,-7.098532871166007,0 +-36.25108782393109,-7.098832294254153,0 +-36.25052402894144,-7.099018463617689,0 +-36.24989478310333,-7.099064885022591,0 +-36.24891078150852,-7.099236913728006,0 +-36.24799578076902,-7.099411563182607,0 +-36.2470105449266,-7.099583808077113,0 +-36.2460212598496,-7.099825341960632,0 +-36.24489321173276,-7.100061557682093,0 +-36.2438181692979,-7.10051000896823,0 +-36.24310426130884,-7.100830834894741,0 +-36.24224927187251,-7.10114715624752,0 +-36.24146971238775,-7.101327801617972,0 +-36.24053759608045,-7.101780418433921,0 +-36.23975108482939,-7.102099777858628,0 +-36.23911346877384,-7.102216458464785,0 +-36.23832522085164,-7.10253641688583,0 +-36.23746443632055,-7.102923030249451,0 +-36.23674392710908,-7.103314619087623,0 +-36.23667344863721,-7.103312279429215,0 +-36.23511836230833,-7.103973426154744,0 +-36.23476551750616,-7.10402888468783,0 +-36.23369054850273,-7.104610780955092,0 +-36.23304092292289,-7.10507095291578,0 +-36.23233156321024,-7.105391629628516,0 +-36.23162022155434,-7.105781591760686,0 +-36.23118969325878,-7.1061124063274,0 +-36.23012888497895,-7.106558605451057,0 +-36.22991783478326,-7.106620129982817,0 +-36.22920853365161,-7.107079403495784,0 +-36.22780618615506,-7.107512525260128,0 +-36.22724431208361,-7.107699396602952,0 +-36.22654228059845,-7.107950234811074,0 +-36.22562295769998,-7.108400358531632,0 +-36.22469671938164,-7.108919278522671,0 +-36.22419271323196,-7.109315633804657,0 +-36.22327270772816,-7.109696345004548,0 +-36.22257329659512,-7.109808431375208,0 +-36.22185954287335,-7.110196985017287,0 +-36.22093812690068,-7.110577705048787,0 +-36.21995579914315,-7.110748480518046,0 +-36.21785207482911,-7.111210322232862,0 +-36.21672961735497,-7.111376149307753,0 +-36.21588900248605,-7.111482966608571,0 +-36.21511948900516,-7.11165879882757,0 +-36.21412445636901,-7.112241874615024,0 +-36.21319725693663,-7.112761246082722,0 +-36.21220036647964,-7.113277939631399,0 +-36.21113932446512,-7.113653188905762,0 +-36.21035608043185,-7.114039798025821,0 +-36.21007707202456,-7.114029239249204,0 +-36.20901199167128,-7.114474585001701,0 +-36.20766442856878,-7.115049356128362,0 +-36.20610378986663,-7.115752260048936,0 +-36.20517824426154,-7.11627103297218,0 +-36.20405005957861,-7.11664350570627,0 +-36.20306690542815,-7.116882888268191,0 +-36.20250888272273,-7.116930831702375,0 +-36.20167229664799,-7.116968416598206,0 +-36.20110600432378,-7.117223528982892,0 +-36.20032759098792,-7.117539980557956,0 +-36.19947980221317,-7.117922172808065,0 +-36.1985606067191,-7.118302150085487,0 +-36.19756239878144,-7.11895517715095,0 +-36.19692996472531,-7.119206555220662,0 +-36.19643450938406,-7.119463703428043,0 +-36.19579447003471,-7.119853618355843,0 +-36.19446516385238,-7.120351863302451,0 +-36.19398341658366,-7.120536373145955,0 +-36.19276478362285,-7.121184988013716,0 +-36.19199076033929,-7.121431856833998,0 +-36.19106563651085,-7.121813721090511,0 +-36.19029355657388,-7.121923852217643,0 +-36.18972853793118,-7.122042224894912,0 +-36.18859548659357,-7.122211702471529,0 +-36.18824212485248,-7.122268646884064,0 +-36.187464240552,-7.122448564386987,0 +-36.18676270310582,-7.122560743918858,0 +-36.18563912402895,-7.12306786068172,0 +-36.18520940074528,-7.123328833608555,0 +-36.18270367539485,-7.123973429477966,0 +-36.18179137540815,-7.124210772840277,0 +-36.1810064560736,-7.124731380870529,0 +-36.17994833330401,-7.125103908025796,0 +-36.17895935897866,-7.125479244779072,0 +-36.1778979902164,-7.125918154859851,0 +-36.17683324168102,-7.12643039943298,0 +-36.17562921367411,-7.126937799148747,0 +-36.17449865526107,-7.127305394676306,0 +-36.17371691834516,-7.127614628683156,0 +-36.17293783005811,-7.127857729384552,0 +-36.17209088754308,-7.128176845732024,0 +-36.17096343802668,-7.128626799562821,0 +-36.17019122725199,-7.128879117985309,0 +-36.16906182646433,-7.129322633121252,0 +-36.16806673384817,-7.129837908008177,0 +-36.16693646270896,-7.130279916110155,0 +-36.16565409569506,-7.130920693996932,0 +-36.16472827918557,-7.131368514607719,0 +-36.16395848499138,-7.131618689893993,0 +-36.1632525987515,-7.132008801334147,0 +-36.16241818676087,-7.132187222231282,0 +-36.16121086584614,-7.132902232390655,0 +-36.15992900278686,-7.133613103868705,0 +-36.15935787304621,-7.133936566569563,0 +-36.15871684875634,-7.134326866114017,0 +-36.1578648336066,-7.134778297489625,0 +-36.15701649620294,-7.135160857967367,0 +-36.15602425770977,-7.135468491934065,0 +-36.15516829938874,-7.135642882318954,0 +-36.15429875042967,-7.136093617566145,0 +-36.15379591902639,-7.136282101754508,0 +-36.15300489701703,-7.136736716094183,0 +-36.15194158491943,-7.137250336104995,0 +-36.1513807994162,-7.137436715343733,0 +-36.15027338924641,-7.137671094797004,0 +-36.14922560220451,-7.138045910034445,0 +-36.14831427500516,-7.138494650797178,0 +-36.14775667298871,-7.13868045244787,0 +-36.14556682363453,-7.139294963709652,0 +-36.14471798856047,-7.139611689587935,0 +-36.14387113552032,-7.139925672608844,0 +-36.14280721485921,-7.140504239948677,0 +-36.14196620249832,-7.140679203625911,0 +-36.14105133492694,-7.140925267953657,0 +-36.14021007056036,-7.141102056107563,0 +-36.1392278584785,-7.141341302378533,0 +-36.13851550577225,-7.141796507975066,0 +-36.13766947823489,-7.142109546317465,0 +-36.13695704957586,-7.142566079666748,0 +-36.13610304477128,-7.143084981005424,0 +-36.13518736051071,-7.143394726154209,0 +-36.13433939651582,-7.143778251065365,0 +-36.13335025000579,-7.144224963984652,0 +-36.13278687583119,-7.144410094696366,0 +-36.13165129955247,-7.144986432611271,0 +-36.13137150889458,-7.145045275279279,0 +-36.13060236673103,-7.145224814376171,0 +-36.12891888427867,-7.145784699364689,0 +-36.12786085384234,-7.146227384853632,0 +-36.12701843202484,-7.146471313567764,0 +-36.12623581957904,-7.146923707290962,0 +-36.12559167019506,-7.147381425291287,0 +-36.12530864608587,-7.1475085274243,0 +-36.12453842823968,-7.147686395486058,0 +-36.1238396330882,-7.147936556472926,0 +-36.1230676674169,-7.148321576553888,0 +-36.12139671536453,-7.148603394340548,0 +-36.12049434606173,-7.148638324643464,0 +-36.11951526602851,-7.148807870176849,0 +-36.11874411549426,-7.148985282831381,0 +-36.11762049525719,-7.149287124116326,0 +-36.1172684376482,-7.149411546874894,0 +-36.11606828419623,-7.149917151240628,0 +-36.11543691865897,-7.150168736269282,0 +-36.11446791544662,-7.150338539020698,0 +-36.11364597357106,-7.150307345322861,0 +-36.11302109954455,-7.15055866086584,0 +-36.11225731029997,-7.150873208012174,0 +-36.11100302480474,-7.151306541697111,0 +-36.10995469686436,-7.151678965642883,0 +-36.1092571456607,-7.15185865190481,0 +-36.10649224902256,-7.15195777495635,0 +-36.10572694602944,-7.152066028839449,0 +-36.1048876542627,-7.152238898083457,0 +-36.10384147672194,-7.152403325934536,0 +-36.1026692568087,-7.152359559887337,0 +-36.10170105210728,-7.152391976453544,0 +-36.10101036367827,-7.152364799986003,0 +-36.09969473278009,-7.152452931464684,0 +-36.09872887722304,-7.152416840772498,0 +-36.09761421030901,-7.152649702311646,0 +-36.09677652555396,-7.152890927310356,0 +-36.09649564310505,-7.153016994723899,0 +-36.09515661795177,-7.153720049722806,0 +-36.09459503750806,-7.153972265108584,0 +-36.09417625404706,-7.154093299734373,0 +-36.09278835199305,-7.154313588651318,0 +-36.09173975003253,-7.154684113059012,0 +-36.08992168312389,-7.155433464912047,0 +-36.08908278988775,-7.155876648504737,0 +-36.08872326579255,-7.156273239149203,0 +-36.08801306312056,-7.156860788016052,0 +-36.0873089803477,-7.157311127259088,0 +-36.08626363083232,-7.157746656545881,0 +-36.08479795397663,-7.158371438978679,0 +-36.08396514460638,-7.158611457980674,0 +-36.08320123716276,-7.158854067222016,0 +-36.08181643302398,-7.159341393365829,0 +-36.08112611141849,-7.159517372769685,0 +-36.08057131378511,-7.15969966271942,0 +-36.07932871651235,-7.159856730587451,0 +-36.07903965727033,-7.159920827798427,0 +-36.07764770007642,-7.160412722556888,0 +-36.07695116242373,-7.160592174167507,0 +-36.07597049276844,-7.161033314285583,0 +-36.07520084628707,-7.161346055070029,0 +-36.07450029980527,-7.161661182466767,0 +-36.07366674726793,-7.161768312157188,0 +-36.07283645363419,-7.161739914879458,0 +-36.07206810599779,-7.161985027449675,0 +-36.07136547648517,-7.162368073573802,0 +-36.07059530079954,-7.162681002839333,0 +-36.07010321275153,-7.162935844066832,0 +-36.06940172974861,-7.163318358364754,0 +-36.06680985821173,-7.164960322668485,0 +-36.06588949505732,-7.165537721299922,0 +-36.06518585934123,-7.165851341155868,0 +-36.06414312429293,-7.166016947244244,0 +-36.06351693733803,-7.166130126799589,0 +-36.06268525724992,-7.166166075886665,0 +-36.0619915189474,-7.166207548958282,0 +-36.06101871785556,-7.166307049705171,0 +-36.0606012521709,-7.166289380701066,0 +-36.05948164115599,-7.166309831092523,0 +-36.05892626146172,-7.166287875710866,0 +-36.05774551844414,-7.166241324068065,0 +-36.05698251522002,-7.166281594307996,0 +-36.05614920443517,-7.166249119343746,0 +-36.05532640206045,-7.165872296951731,0 +-36.05463234322723,-7.165775863037993,0 +-36.05379900137036,-7.165674042832754,0 +-36.05317921791021,-7.165442779296184,0 +-36.05227458919263,-7.165337838261331,0 +-36.05199583312332,-7.165326888652287,0 +-36.050252070958,-7.16525826354734,0 +-36.04928610634394,-7.165223131169906,0 +-36.04873438261558,-7.165203064261983,0 +-36.04741693265603,-7.165153314465642,0 +-36.04636531780761,-7.165389048335634,0 +-36.04566219762828,-7.165499465008356,0 +-36.04502412064478,-7.165750483623667,0 +-36.04474010059891,-7.165877412157704,0 +-36.04331520950699,-7.166372881446684,0 +-36.04201928310502,-7.167150306503206,0 +-36.04115941345714,-7.167531131051791,0 +-36.04072433661192,-7.16785962133983,0 +-36.03979698813995,-7.168238557542775,0 +-36.03936983463276,-7.168567929758258,0 +-36.03885187476703,-7.169169934676165,0 +-36.03833628375433,-7.169772321228097,0 +-36.03760749429505,-7.170436023805225,0 +-36.03725146480549,-7.170560902610264,0 +-36.03596273026338,-7.171402653843305,0 +-36.0353323006374,-7.171512645107359,0 +-36.0349143326027,-7.171556661520249,0 +-36.03378173705983,-7.171994089334592,0 +-36.03271539122515,-7.172503900817959,0 +-36.03200503390568,-7.172818705443638,0 +-36.03127579131056,-7.173626199565572,0 +-36.03055837700006,-7.174163329807488,0 +-36.0298465774661,-7.174555356537575,0 +-36.02877993234517,-7.175142766373407,0 +-36.02856645352488,-7.175274661612615,0 +-36.02736367010836,-7.175858702797956,0 +-36.02651898869525,-7.176176237137806,0 +-36.02552787307098,-7.176766344470418,0 +-36.02433225752115,-7.177491638687997,0 +-36.0234898022962,-7.177947227081196,0 +-36.02271215990235,-7.17825982007085,0 +-36.02186792412039,-7.178501594753623,0 +-36.02109564268115,-7.17881782464539,0 +-36.01970735355289,-7.179113136876034,0 +-36.01867259187283,-7.179283967160649,0 +-36.01819466904202,-7.179267860119849,0 +-36.01771009678946,-7.179318725037164,0 +-36.01639897655036,-7.179408294879337,0 +-36.01544154332986,-7.179374501244696,0 +-36.01475993153814,-7.179350845623595,0 +-36.01386997760628,-7.17931878251826,0 +-36.01304849488572,-7.179358115795715,0 +-36.01196256046708,-7.179320560838761,0 +-36.01134720980744,-7.179367109209389,0 +-36.01051323879234,-7.179540733931069,0 +-36.00968711583913,-7.179578297782657,0 +-36.00886118991596,-7.1796158510733,0 +-36.0082457571188,-7.17959317705158,0 +-36.00740970927974,-7.179766277157334,0 +-36.00706794016389,-7.179753664844361,0 +-36.00529633666653,-7.179683369583771,0 +-36.00474699084009,-7.179666613643956,0 +-36.00442666451701,-7.179657209427575,0 +-36.00374307494522,-7.179636019983533,0 +-36.00278730690327,-7.179736546301799,0 +-36.00237901322585,-7.17976609993487,0 +-36.0018815011932,-7.17974864816385,0 +-36.0013847835989,-7.179730230559631,0 +-36.00043112620639,-7.179834708421412,0 +-36.00016077442304,-7.179826945624005,0 +-35.99926076563212,-7.179845218479702,0 +-35.99840967052467,-7.179816991041069,0 +-35.99773364825909,-7.179927458493326,0 +-35.99733261788495,-7.179914769431196,0 +-35.99657363098391,-7.179933814749653,0 +-35.99621170383907,-7.180008467921299,0 +-35.99553885482583,-7.180027343979003,0 +-35.99486828073018,-7.180002175216675,0 +-35.99437660213323,-7.179983720597646,0 +-35.99379602346686,-7.179962112597993,0 +-35.99321427378687,-7.179985042486685,0 +-35.99272692863956,-7.17992321286978,0 +-35.99215097636355,-7.179858194269951,0 +-35.99143940829067,-7.17983230622484,0 +-35.99094813776622,-7.179813673278623,0 +-35.99045487033632,-7.179794369639634,0 +-35.98987165069733,-7.179771545266037,0 +-35.98955271416068,-7.179802642801295,0 +-35.98873135721219,-7.180036499246786,0 +-35.98835494195292,-7.180287219155386,0 +-35.98773575589285,-7.180794971592183,0 +-35.98727047018497,-7.180998945913637,0 +-35.98695166460554,-7.181031049100914,0 +-35.98639803348306,-7.181187510886482,0 +-35.98611210009049,-7.181533260117773,0 +-35.98573079956687,-7.182009386011875,0 +-35.98532308739691,-7.182172466118022,0 +-35.98485829547593,-7.182422470469373,0 +-35.9846178509654,-7.182681180989543,0 +-35.98401365140287,-7.182971018072619,0 +-35.98360481407403,-7.183000259893063,0 +-35.98328360276324,-7.183077535535286,0 +-35.98264107578667,-7.183232168340303,0 +-35.98116472000466,-7.184025146188369,0 +-35.98066612011767,-7.18409541766555,0 +-35.98048203566595,-7.184177421289235,0 +-35.97998757590667,-7.184250182121297,0 +-35.97916639859965,-7.184533155527623,0 +-35.97880328041546,-7.184609562429634,0 +-35.97825880577387,-7.184725280556347,0 +-35.97734917672481,-7.184917939006133,0 +-35.97684582709736,-7.185080788560715,0 +-35.97634183172899,-7.185242157640939,0 +-35.97556172112978,-7.185526155951139,0 +-35.97478678433027,-7.185676168559379,0 +-35.97396850757096,-7.185779567648273,0 +-35.97338033030946,-7.185844085139163,0 +-35.97274304999206,-7.185954543593355,0 +-35.97255847712764,-7.186037767778727,0 +-35.97182335488141,-7.186237693894132,0 +-35.97113041826446,-7.186528129596874,0 +-35.97062126665703,-7.186735894287243,0 +-35.9696018057715,-7.187064298314354,0 +-35.96922425217817,-7.187410989579062,0 +-35.96889091664617,-7.187760208626703,0 +-35.96809727941245,-7.188315936371803,0 +-35.96753204103732,-7.188835283808941,0 +-35.96733602445467,-7.189145098846994,0 +-35.9668943655181,-7.1898102237763,0 +-35.96647563701151,-7.190282998315391,0 +-35.96606266401153,-7.190663830110701,0 +-35.96587505118825,-7.191053880831731,0 +-35.96568586443426,-7.191488267882294,0 +-35.96531332564755,-7.192134225191848,0 +-35.9651221062874,-7.192699013383727,0 +-35.96512114078903,-7.192743077099384,0 +-35.96447667119539,-7.194097134544513,0 +-35.96419089964017,-7.194446709757875,0 +-35.96359197000875,-7.194738497618689,0 +-35.96309405044426,-7.194764938726313,0 +-35.96259640564082,-7.194790993355981,0 +-35.96214041918766,-7.194907108945374,0 +-35.96195827118924,-7.194944658343864,0 +-35.9610466279074,-7.195132416513882,0 +-35.96031633466552,-7.195282925961276,0 +-35.95995373160557,-7.195314404404718,0 +-35.9593190626045,-7.195380632259715,0 +-35.95877397681749,-7.195540943952984,0 +-35.95831627969054,-7.195748241499192,0 +-35.95780959551033,-7.195997563545681,0 +-35.9571657757973,-7.196331585917873,0 +-35.95633777020412,-7.196747935320018,0 +-35.95591432173915,-7.197134878134955,0 +-35.95554357198117,-7.197344830250254,0 +-35.95499013284178,-7.197592783498151,0 +-35.95447952931095,-7.197887367956707,0 +-35.95414928688245,-7.198188975625437,0 +-35.95363239054304,-7.198618371595003,0 +-35.95339300715654,-7.198923629819584,0 +-35.95320449706234,-7.199096163736334,0 +-35.95280621756048,-7.199934901031007,0 +-35.95251151206968,-7.20037488360849,0 +-35.95201903223082,-7.201124376804542,0 +-35.95172656223284,-7.201564548771463,0 +-35.95162131550452,-7.201876645034258,0 +-35.95118290831084,-7.203426072953493,0 +-35.95120081209739,-7.203916658709105,0 +-35.95125663737808,-7.2045434011784,0 +-35.9513310236423,-7.205090508902169,0 +-35.95149366796797,-7.205685218405215,0 +-35.9515717446449,-7.206095608589719,0 +-35.95160093229201,-7.206502302150955,0 +-35.95184548838468,-7.207095694399635,0 +-35.95199840815807,-7.207640081990187,0 +-35.95215101461787,-7.208185135072418,0 +-35.95220533881942,-7.20877121035964,0 +-35.95218956376333,-7.208995304946539,0 +-35.95190698263794,-7.209842298524578,0 +-35.9516197907509,-7.210331246255517,0 +-35.95129124643545,-7.210727339984642,0 +-35.95104646865713,-7.211307328012363,0 +-35.95080251334889,-7.211841462568872,0 +-35.95035419449165,-7.212324665114755,0 +-35.94982582034739,-7.212804612398569,0 +-35.94917889283877,-7.21314204190911,0 +-35.94834651451187,-7.213607741007378,0 +-35.9478322018396,-7.213905581086033,0 +-35.9472649863573,-7.214382830112691,0 +-35.94685261342582,-7.214771594833511,0 +-35.94637191876286,-7.215387568691705,0 +-35.9461635600029,-7.215880082142768,0 +-35.94582190484648,-7.216321933312207,0 +-35.94557450161994,-7.216811189199215,0 +-35.94519354511846,-7.217294075102327,0 +-35.94483653753642,-7.217831265219407,0 +-35.94462649902191,-7.218191964661605,0 +-35.94458287236437,-7.219258054767781,0 +-35.94436822718263,-7.219789943883255,0 +-35.9441649166788,-7.220236287125678,0 +-35.94406193944602,-7.220458959140845,0 +-35.94374087035162,-7.221308121879149,0 +-35.94348108498297,-7.221843262421672,0 +-35.94339486070186,-7.222522336513188,0 +-35.94326821825926,-7.223110566867544,0 +-35.943260012684,-7.2232472964676,0 +-35.9431594551297,-7.224159202664955,0 +-35.94312174934991,-7.224984101467182,0 +-35.94304333472756,-7.225716257598039,0 +-35.94319637603402,-7.226366629869839,0 +-35.94322128817942,-7.226828161908983,0 +-35.94338941955257,-7.227203256522578,0 +-35.94364033010277,-7.227993290868798,0 +-35.94371605131766,-7.228319964353743,0 +-35.94382857891444,-7.228833687677129,0 +-35.9438134260627,-7.229246935415765,0 +-35.9437393145622,-7.22975540890745,0 +-35.9436059341412,-7.230495694903823,0 +-35.94355693247174,-7.230540497650943,0 +-35.94304140706895,-7.231632589455662,0 +-35.94273879901628,-7.232165895161232,0 +-35.94238807173846,-7.23280237367748,0 +-35.94228100471975,-7.2331701342781,0 +-35.94192190194493,-7.234038540665872,0 +-35.94176488047164,-7.234496779176876,0 +-35.94170065903504,-7.234906039592178,0 +-35.94139184339856,-7.235582225941154,0 +-35.9410805779163,-7.236305158789839,0 +-35.94072635068372,-7.236935885361112,0 +-35.94046895260748,-7.237478709390386,0 +-35.94031007066533,-7.237886594392326,0 +-35.94000621703533,-7.238429779421632,0 +-35.93984856000714,-7.238792017799444,0 +-35.93959474532141,-7.239196988127742,0 +-35.93909021567772,-7.240011815706933,0 +-35.93884601961605,-7.240472846413324,0 +-35.93834597419653,-7.241432140923456,0 +-35.93798893149818,-7.242208186467455,0 +-35.9376870659159,-7.24275391667902,0 +-35.93742693754023,-7.24339393047735,0 +-35.93731508308489,-7.243760940498641,0 +-35.93724049019116,-7.244315727179642,0 +-35.93712012299316,-7.245055001982993,0 +-35.93694086507013,-7.246392963649768,0 +-35.93678200069892,-7.246988807148576,0 +-35.93644971869337,-7.247252637337322,0 +-35.93607119745499,-7.247560043517752,0 +-35.93553635492582,-7.248141359813083,0 +-35.93512028501353,-7.248964497598468,0 +-35.93464678449564,-7.24997444335668,0 +-35.9342936535155,-7.250430020670876,0 +-35.93390395744782,-7.25078762291946,0 +-35.93340977899743,-7.251556207439044,0 +-35.93315426400299,-7.252149312166046,0 +-35.93299742676614,-7.252516488348173,0 +-35.93255253246694,-7.253058842601136,0 +-35.93216924962369,-7.253276687258586,0 +-35.93142705801058,-7.254096224078042,0 +-35.93113387312845,-7.254410059851416,0 +-35.93055434278801,-7.254854059633868,0 +-35.93036549397755,-7.254892800511866,0 +-35.92982388678271,-7.255565685441352,0 +-35.92957900844103,-7.255835362976464,0 +-35.92900474038245,-7.25613966169541,0 +-35.92842884201644,-7.256490276710216,0 +-35.92794302610335,-7.256937065646589,0 +-35.92730979387284,-7.257564163464276,0 +-35.92682379728188,-7.258010500755166,0 +-35.92619954171487,-7.258310953067499,0 +-35.92561253039958,-7.2587524304934,0 +-35.92526027255695,-7.259251322221642,0 +-35.9248145419224,-7.25974752865323,0 +-35.92417360439487,-7.260377244247176,0 +-35.92373137613661,-7.260781377992679,0 +-35.92328969456347,-7.261139339671741,0 +-35.92260223208098,-7.261768803437774,0 +-35.92240529377079,-7.261995074368083,0 +-35.92192083875327,-7.262396698424608,0 +-35.92123522308773,-7.26307186832061,0 +-35.92064686674333,-7.263565435518389,0 +-35.92030903493936,-7.263832066456217,0 +-35.91963480381173,-7.264272714913173,0 +-35.91900196419227,-7.264671680972391,0 +-35.91852254940681,-7.264932981931142,0 +-35.91804331896618,-7.265194178250914,0 +-35.91761287518451,-7.26541050634262,0 +-35.91679807702884,-7.265845360102177,0 +-35.9164028104496,-7.266206458542721,0 +-35.91609302705618,-7.266758758185421,0 +-35.91573829229682,-7.26753714865161,0 +-35.91540185470544,-7.267848292664954,0 +-35.91499986527981,-7.268304897488426,0 +-35.91461211317859,-7.268616564693748,0 +-35.91394200614663,-7.269000178142535,0 +-35.9134554086835,-7.269396630099956,0 +-35.91282147155513,-7.269926802529472,0 +-35.91238449116466,-7.270234163062074,0 +-35.91213968642428,-7.270458440244465,0 +-35.91179691169942,-7.270772479129032,0 +-35.911117424819,-7.271264075868254,0 +-35.9101467323411,-7.27213392654366,0 +-35.90985859873762,-7.272312794273241,0 +-35.90914067492028,-7.272662018496729,0 +-35.90794431782827,-7.273274443005933,0 +-35.90708414420359,-7.273711112853714,0 +-35.90616336719626,-7.274373787201196,0 +-35.90596290863573,-7.274596774730096,0 +-35.90557472893158,-7.274765316904378,0 +-35.90495670982889,-7.275024030711879,0 +-35.90433625297663,-7.27537594580101,0 +-35.90372554300802,-7.275589464820727,0 +-35.9028759301922,-7.27593299242403,0 +-35.90187306293328,-7.276266068545359,0 +-35.90134108828823,-7.276476924667399,0 +-35.90086518639291,-7.27669228993289,0 +-35.90005567946773,-7.27708148313147,0 +-35.89953361021117,-7.277294879206377,0 +-35.8987750925421,-7.277592437674076,0 +-35.89791706784101,-7.278072248069618,0 +-35.89782256095138,-7.278115256727596,0 +-35.89693754854632,-7.27812847528662,0 +-35.8967959510932,-7.278169633649913,0 +-35.8940783492196,-7.278402592656935,0 +-35.8932476333507,-7.278519260221596,0 +-35.89234931324556,-7.278484948139775,0 +-35.89130961322147,-7.27844549975547,0 +-35.89072897833815,-7.277978050739823,0 +-35.88992034514874,-7.277576042680304,0 +-35.8890479600265,-7.276874606289189,0 +-35.88832892734285,-7.276104827916768,0 +-35.88803806343415,-7.275870954290544,0 +-35.8865191586562,-7.274097234430427,0 +-35.88617035891317,-7.273567393591953,0 +-35.88575476694628,-7.272735240409205,0 +-35.88520284667369,-7.271601632078404,0 +-35.88500736655195,-7.270851068874788,0 +-35.88473526544243,-7.270172473140094,0 +-35.88431511253673,-7.269488969023828,0 +-35.88375512487622,-7.268653206075869,0 +-35.8834854224262,-7.267672784809851,0 +-35.88312587542075,-7.26691029112353,0 +-35.88291639571271,-7.266380587742588,0 +-35.88241865676777,-7.265468062136982,0 +-35.88229334033203,-7.264645442014126,0 +-35.88193894530892,-7.263814014811072,0 +-35.88150047409874,-7.263351588321803,0 +-35.88093361691246,-7.262664110873405,0 +-35.88028698682126,-7.262121395343224,0 +-35.87957570151772,-7.261353549272625,0 +-35.87909035770112,-7.260519404628455,0 +-35.87860004411065,-7.259611333466124,0 +-35.87810603004053,-7.258777945482055,0 +-35.87760175279306,-7.258240749812691,0 +-35.87709773331893,-7.257703826214204,0 +-35.87604452283231,-7.25588884695226,0 +-35.87547309044081,-7.255201817597776,0 +-35.87475835290332,-7.254361831431485,0 +-35.87440254008571,-7.253905025001814,0 +-35.87376195367879,-7.253069681001671,0 +-35.87349718328049,-7.252174641565304,0 +-35.87314668911471,-7.251572575368112,0 +-35.87250554248627,-7.250809313698602,0 +-35.87186837530556,-7.249968359567851,0 +-35.87145706880005,-7.249061326445498,0 +-35.87126305660182,-7.248310646266853,0 +-35.87106891260255,-7.247559784119137,0 +-35.87110591840263,-7.24660072539423,0 +-35.87106244423191,-7.245788769960923,0 +-35.87108784417495,-7.245126751744737,0 +-35.87096991178539,-7.244313047142469,0 +-35.87078323328703,-7.243350409702377,0 +-35.87066262092508,-7.242611088405929,0 +-35.87025012757902,-7.241715807844738,0 +-35.86960365406539,-7.241103640278659,0 +-35.86911180680585,-7.240349395066299,0 +-35.86869135659369,-7.239647644138634,0 +-35.86834807759987,-7.238900342661874,0 +-35.86820211732424,-7.238819484226198,0 +-35.8674344271421,-7.237502191876105,0 +-35.86707088802706,-7.237264523377449,0 +-35.86609862986208,-7.23728841720226,0 +-35.86487586247384,-7.237885840397359,0 +-35.86394634184509,-7.238573038173518,0 +-35.86309922344297,-7.239045472296215,0 +-35.86226660954232,-7.239151677906531,0 +-35.86156715788262,-7.239553769317888,0 +-35.86070967707819,-7.240019786412692,0 +-35.85977851338841,-7.240568916935348,0 +-35.85892722910032,-7.241207627755017,0 +-35.85759420721784,-7.242184504488318,0 +-35.85712311333332,-7.242534817224635,0 +-35.85594630041161,-7.243375777671837,0 +-35.85548151045293,-7.243579250063781,0 +-35.85401438423757,-7.244113777432355,0 +-35.85347565739906,-7.244392897040603,0 +-35.85292487151016,-7.244970773756861,0 +-35.85246141114249,-7.245252676816881,0 +-35.85169103437398,-7.245672693506092,0 +-35.85014881204356,-7.246360296534857,0 +-35.84951875165942,-7.24678257786069,0 +-35.8488187355197,-7.247052781147897,0 +-35.84754194659552,-7.247232623655496,0 +-35.84631833161055,-7.247786404098063,0 +-35.84608382209164,-7.248002180361883,0 +-35.84369364707322,-7.249031678612161,0 +-35.84277285375722,-7.249444407686347,0 +-35.84215834601044,-7.24971989853621,0 +-35.84115701660718,-7.25020596919853,0 +-35.84001554511165,-7.250387246425777,0 +-35.8391732053636,-7.25065584865519,0 +-35.8385608027417,-7.25085798171321,0 +-35.83710366760921,-7.251402055218256,0 +-35.83624789259741,-7.251968829133483,0 +-35.83540636140147,-7.25216165087633,0 +-35.83425148842998,-7.252493108949292,0 +-35.83292784551721,-7.253045631005161,0 +-35.83238954331753,-7.253175931469444,0 +-35.83146431333957,-7.253442477285605,0 +-35.83023701736681,-7.253622394967328,0 +-35.8286175594107,-7.254014331482167,0 +-35.8272348003705,-7.254188998622558,0 +-35.82622562252389,-7.254529187802367,0 +-35.82552454653644,-7.254805571978618,0 +-35.82497950811162,-7.25501223579631,0 +-35.82412174103602,-7.255433709496285,0 +-35.82310820121596,-7.255925087589351,0 +-35.82170635693874,-7.256553461035002,0 +-35.82054570596257,-7.256888291937718,0 +-35.81954710911248,-7.257002073363972,0 +-35.81847191890058,-7.257113000228827,0 +-35.81754248740408,-7.257381061162757,0 +-35.81637693741383,-7.257791947396608,0 +-35.8158285881112,-7.258074658491283,0 +-35.8146584843003,-7.258411823736806,0 +-35.81371459067444,-7.258833418543447,0 +-35.81308486948991,-7.259114685757886,0 +-35.81215276389855,-7.259308593216491,0 +-35.81207616637059,-7.259305732462566,0 +-35.81002023562988,-7.260057752335056,0 +-35.80825579692353,-7.260284550912258,0 +-35.80756624339838,-7.260453828943244,0 +-35.80597247449685,-7.261270357419759,0 +-35.80486908433195,-7.262008974134595,0 +-35.8038622044626,-7.262742140919319,0 +-35.80305503689908,-7.263385431066636,0 +-35.80243239312307,-7.264324758965909,0 +-35.80211387370722,-7.264986452456276,0 +-35.80129729037613,-7.265916436500729,0 +-35.80068721035344,-7.26656529991486,0 +-35.79949710261157,-7.267094131697187,0 +-35.79869934650478,-7.267546687559236,0 +-35.79740439068727,-7.268094940013878,0 +-35.79611898441327,-7.268351940220744,0 +-35.79473649780454,-7.268600019081168,0 +-35.79337217934653,-7.268724095665138,0 +-35.79228026364918,-7.269076184408979,0 +-35.7904026390397,-7.269312585939059,0 +-35.78940509418257,-7.269854125173421,0 +-35.7884082433078,-7.270302841660451,0 +-35.78741725652149,-7.270559675711557,0 +-35.78533282133358,-7.271166627517936,0 +-35.78471041910903,-7.272111576414289,0 +-35.78433364226492,-7.273307335138466,0 +-35.78430111341814,-7.273994237690848,0 +-35.78386029235638,-7.275056744817755,0 +-35.78244537116574,-7.275796742536109,0 +-35.7808554847436,-7.276225440691626,0 +-35.77947421173448,-7.276368465840128,0 +-35.77859159056498,-7.276428268751065,0 +-35.77614893732445,-7.276846537570894,0 +-35.7754591468119,-7.276819847273797,0 +-35.77387220936551,-7.277343368090012,0 +-35.77306446611231,-7.27809089227151,0 +-35.77212859324832,-7.27873914911883,0 +-35.77139018124691,-7.279591241450363,0 +-35.7705792282686,-7.280436752876285,0 +-35.77006699878198,-7.281388287682732,0 +-35.76907213532478,-7.281932296478023,0 +-35.76788354803048,-7.282371629165687,0 +-35.76709554501369,-7.282438753850676,0 +-35.76581747600895,-7.282390683954335,0 +-35.76434218359818,-7.282335194221391,0 +-35.76326354057752,-7.282004073213047,0 +-35.76197701270885,-7.281569966990597,0 +-35.76099070669411,-7.281048133668806,0 +-35.75993513006811,-7.280324044328584,0 +-35.75899580327633,-7.279699661280802,0 +-35.75814790223826,-7.279274790155909,0 +-35.75720259835006,-7.27855521911857,0 +-35.75644581544711,-7.277746345401827,0 +-35.75578962017912,-7.276843745317954,0 +-35.75495117587625,-7.276031783646021,0 +-35.75411448564944,-7.275025470037399,0 +-35.75364917228347,-7.274618458730695,0 +-35.75298986478661,-7.27420436425324,0 +-35.75094435404941,-7.272954847245221,0 +-35.75004973502666,-7.273212872972723,0 +-35.74914944059072,-7.273761953941101,0 +-35.74814012766917,-7.274599602801541,0 +-35.74702740544869,-7.275531569547731,0 +-35.74592599110255,-7.276367192096916,0 +-35.74470452101701,-7.277296285954116,0 +-35.74299502859026,-7.278206401592369,0 +-35.74171186477798,-7.278352706476773,0 +-35.74092710440929,-7.278322948211787,0 +-35.73965947609512,-7.278079759673145,0 +-35.73888201728647,-7.277855038995554,0 +-35.7374086206465,-7.277799324342667,0 +-35.73633064534819,-7.277660534822946,0 +-35.7345666913516,-7.277397361311607,0 +-35.73407447195967,-7.277378431876683,0 +-35.73012526862669,-7.277170356611934,0 +-35.72873961618173,-7.27699090699008,0 +-35.72760429098584,-7.276946424805316,0 +-35.72597422041763,-7.276631863304607,0 +-35.72484290486882,-7.276462619032476,0 +-35.72321034042422,-7.276023411593441,0 +-35.72308360172806,-7.276018550097648,0 +-35.72060495175408,-7.273786708366291,0 +-35.71973590897073,-7.273250655263559,0 +-35.71776088656648,-7.271667671188086,0 +-35.71715851611494,-7.270765765445237,0 +-35.71630282149262,-7.269854560201821,0 +-35.71558332132191,-7.268697923371705,0 +-35.71499540873912,-7.267421327457176,0 +-35.7142673767841,-7.266516151266563,0 +-35.7129492384745,-7.26519961909416,0 +-35.7121267801055,-7.264149995003363,0 +-35.71118899589669,-7.262839373035598,0 +-35.70996366998455,-7.262026887048208,0 +-35.70819983417722,-7.261704541760738,0 +-35.70655260953352,-7.261638656857354,0 +-35.70464840853047,-7.261444598918053,0 +-35.70235000118269,-7.261255337639653,0 +-35.70108158042416,-7.261209441665017,0 +-35.69933990814856,-7.260617562306468,0 +-35.69771915291154,-7.260030394872367,0 +-35.69635408282226,-7.259212769208012,0 +-35.69498577160779,-7.258404316013523,0 +-35.69372941184848,-7.257984675877145,0 +-35.69161549414687,-7.25678140463913,0 +-35.69013825359447,-7.255599013128796,0 +-35.68890147363685,-7.254806381398187,0 +-35.68792400979415,-7.253897045436773,0 +-35.68705592403354,-7.253356078092348,0 +-35.68569419367254,-7.252414278327374,0 +-35.68405870133243,-7.251687847421638,0 +-35.68219219628014,-7.25101492650891,0 +-35.67993958863812,-7.250036462068683,0 +-35.67869478840218,-7.249221438624526,0 +-35.67768844812751,-7.248255051452504,0 +-35.6764208982313,-7.247404949442561,0 +-35.67525535226159,-7.247060624302616,0 +-35.67384500327204,-7.246727715876924,0 +-35.67272029221997,-7.246717640992563,0 +-35.67127560929661,-7.246607882862781,0 +-35.6694672866586,-7.246647846654795,0 +-35.6675361448919,-7.246956040584434,0 +-35.66573436304152,-7.246874508456165,0 +-35.66482061767663,-7.246953388000372,0 +-35.66224687178366,-7.247235814077881,0 +-35.66107595661509,-7.247437209981391,0 +-35.65914101981284,-7.247612987729128,0 +-35.65733866986803,-7.247666853520568,0 +-35.65644708133105,-7.247635688425057,0 +-35.65336435236836,-7.247509930410835,0 +-35.65297969700401,-7.247494743477033,0 +-35.63908000902757,-7.243517322353329,0 +-35.63816810811133,-7.243483721769334,0 +-35.63715649494704,-7.243190601466879,0 +-35.63436775660931,-7.242574485093233,0 +-35.63321990979071,-7.242529687429006,0 +-35.63081404112777,-7.241928106030709,0 +-35.62891773569947,-7.241346398465577,0 +-35.62726272802301,-7.241029265374352,0 +-35.6247128757596,-7.240678009073744,0 +-35.623309735631,-7.240497948616568,0 +-35.62114570134754,-7.240285724513171,0 +-35.61898258347868,-7.240071738304071,0 +-35.61668751464207,-7.239854127086538,0 +-35.61540835872009,-7.239804918034376,0 +-35.61362777425904,-7.239482503776784,0 +-35.61159197482134,-7.239150542202505,0 +-35.60831437202577,-7.2378828563463,0 +-35.60683261208079,-7.23669260799976,0 +-35.60583960085073,-7.235890785084875,0 +-35.60411410986198,-7.234171166136867,0 +-35.60348860709301,-7.233763942180293,0 +-35.60175623378426,-7.232169222268586,0 +-35.60127520333162,-7.231388954281906,0 +-35.60044161366348,-7.229834249738856,0 +-35.5997294346919,-7.228409566591918,0 +-35.59829128760018,-7.2262086714867,0 +-35.59760380374855,-7.224016720041128,0 +-35.59726924509911,-7.222464370214774,0 +-35.59680835723319,-7.220908008861993,0 +-35.59608000762628,-7.21972706839353,0 +-35.59497416173547,-7.21840649973175,0 +-35.59386026267707,-7.217342984139785,0 +-35.58906937796565,-7.214370454915323,0 +-35.58742660767741,-7.213669358802655,0 +-35.58604140215122,-7.212978845776876,0 +-35.58477402424723,-7.212547210409118,0 +-35.58287296997286,-7.211964215231052,0 +-35.5809769034955,-7.211254187330316,0 +-35.57745617214737,-7.209592631133541,0 +-35.57530577792934,-7.208873371556773,0 +-35.57239793125031,-7.20787036562227,0 +-35.57074961892378,-7.207424982068954,0 +-35.56960764372041,-7.207126298913053,0 +-35.56820813765544,-7.206817304761383,0 +-35.56579018147202,-7.206341692808665,0 +-35.5641330280349,-7.206022454000613,0 +-35.56132392823448,-7.205530540928647,0 +-35.55851704924982,-7.204782702003711,0 +-35.55764025354499,-7.204239037600808,0 +-35.55611822606331,-7.203797941139739,0 +-35.55407330325645,-7.203334577343131,0 +-35.55291345064023,-7.203288516850302,0 +-35.55033206809217,-7.203570645348644,0 +-35.54736501850383,-7.20409372269327,0 +-35.5463365867238,-7.204181437494491,0 +-35.54377258154023,-7.204209641079625,0 +-35.54236507103548,-7.204155118357889,0 +-35.54057408533247,-7.204085733414686,0 +-35.53813139283636,-7.204373307083751,0 +-35.53735491152853,-7.204470342526601,0 +-35.53411004739927,-7.204980370988748,0 +-35.53341853917264,-7.206100160048747,0 +-35.53221197177081,-7.207200227280663,0 +-35.53129113774055,-7.207546995160016,0 +-35.52931752967532,-7.208235953949689,0 +-35.5275130589031,-7.208675078981227,0 +-35.52552576480941,-7.208721032164799,0 +-35.52527055169865,-7.208711029040293,0 +-35.520184744457,-7.207369958069814,0 +-35.51727004745103,-7.206363898272757,0 +-35.51561696061025,-7.206044667700579,0 +-35.51344007030135,-7.205704523087358,0 +-35.51228651077285,-7.205659619276972,0 +-35.51087455470742,-7.205604604468658,0 +-35.50727900479472,-7.205464379481247,0 +-35.50510184903015,-7.205251952763914,0 +-35.50294033094799,-7.204657603950351,0 +-35.50179558319552,-7.204357970913171,0 +-35.49939984978732,-7.203245150400102,0 +-35.49826653752243,-7.202562168131192,0 +-35.49587392092697,-7.201321278584508,0 +-35.49371739794108,-7.200340420883236,0 +-35.49296135881752,-7.19992781648937,0 +-35.49169633046447,-7.199367627842103,0 +-35.48928715655477,-7.198508262817168,0 +-35.48751734166591,-7.19793183501925,0 +-35.48626081578234,-7.197375242203691,0 +-35.48449385901821,-7.196670365235211,0 +-35.48147565012645,-7.195669691650084,0 +-35.48008873134381,-7.194977904673061,0 +-35.47895142012623,-7.194293236472757,0 +-35.47703763008506,-7.193575495523522,0 +-35.47678394722941,-7.193437286819749,0 +-35.47284674006687,-7.191872668410513,0 +-35.47122426262187,-7.190657553591289,0 +-35.46805970619558,-7.189377995066328,0 +-35.46462481299162,-7.188343352778404,0 +-35.4629680834602,-7.187892167046184,0 +-35.46028301415544,-7.187403771635174,0 +-35.45874020761073,-7.18734380696986,0 +-35.45681721167831,-7.187141868475289,0 +-35.45438834903528,-7.186930892552867,0 +-35.45311519803985,-7.186761353603467,0 +-35.45042037780681,-7.186392334669634,0 +-35.44901194407054,-7.186076858320219,0 +-35.44735562013486,-7.185495977274842,0 +-35.44572378443222,-7.184673441183003,0 +-35.44521589531497,-7.184526772774542,0 +-35.43963540547029,-7.183306538061315,0 +-35.43708744674896,-7.182818515255143,0 +-35.43529403911177,-7.182622094532948,0 +-35.43389723256504,-7.182184093037306,0 +-35.43047843482012,-7.180782147503627,0 +-35.42895439166497,-7.180336515752304,0 +-35.42769174942051,-7.179773325736479,0 +-35.42540161109765,-7.179168300790947,0 +-35.42373229310471,-7.179100597596235,0 +-35.422196170642,-7.178911396384142,0 +-35.42078805808794,-7.178724037274491,0 +-35.4190103254579,-7.178146749357781,0 +-35.41722959915808,-7.177703839058497,0 +-35.41557607719027,-7.177257695325169,0 +-35.41404089777321,-7.177071026519758,0 +-35.41173408062326,-7.176989584157452,0 +-35.40969917362768,-7.176533371251031,0 +-35.40662886315926,-7.17602065847521,0 +-35.40495246944183,-7.175943829514116,0 +-35.40443193417834,-7.176048512751795,0 +-35.39691786314027,-7.174219968693615,0 +-35.395253129072,-7.174027337410574,0 +-35.39269817980723,-7.173548413393038,0 +-35.39027038327488,-7.173191583521184,0 +-35.38847372209839,-7.173114454770328,0 +-35.38718984751046,-7.173059334616612,0 +-35.38564861826664,-7.172993157130677,0 +-35.38384476750682,-7.173041020077504,0 +-35.38229183487082,-7.173225639900812,0 +-35.38113403226438,-7.17317303110748,0 +-35.37960980130069,-7.172592925213248,0 +-35.37810034221025,-7.171632542871805,0 +-35.37722017514814,-7.171088830985698,0 +-35.3757125729564,-7.170139525718036,0 +-35.37393609782971,-7.169575158886877,0 +-35.37293404748849,-7.168901263300501,0 +-35.37153849597106,-7.168473651170891,0 +-35.37012949260006,-7.168290345484356,0 +-35.36769930555504,-7.167943786689574,0 +-35.36641712553022,-7.167761680628674,0 +-35.36449101637292,-7.167552762005012,0 +-35.36191597473572,-7.167445683019677,0 +-35.35947313286744,-7.167215179343511,0 +-35.35780248329366,-7.167016747239996,0 +-35.35561372391167,-7.166794229347213,0 +-35.35444633756411,-7.166737416084751,0 +-35.35273717856624,-7.167031565988292,0 +-35.3511715018027,-7.167082612064519,0 +-35.34921621172887,-7.167516155041007,0 +-35.34739918436433,-7.167831108379469,0 +-35.3451924305803,-7.168524448838538,0 +-35.34219856510983,-7.168910809370161,0 +-35.34101211145235,-7.169503405236004,0 +-35.33968521229605,-7.170214292436331,0 +-35.33863134295952,-7.170683537885594,0 +-35.33455441096638,-7.172954032401644,0 +-35.33364359068132,-7.173172751693162,0 +-35.33155116150287,-7.174104221689945,0 +-35.32903933034666,-7.175297819283597,0 +-35.327843739519,-7.176024465625249,0 +-35.32665393013043,-7.176622825739591,0 +-35.32534408265763,-7.176962499578998,0 +-35.32312408707065,-7.17752129770675,0 +-35.32037010880777,-7.178450059578348,0 +-35.31842462670634,-7.178876403434979,0 +-35.31621936682963,-7.179293915737494,0 +-35.31335642943029,-7.179946473999888,0 +-35.31140969584722,-7.180251528225928,0 +-35.31009263291716,-7.180859622065664,0 +-35.30852395770527,-7.181427220583945,0 +-35.30697416209602,-7.181501498563181,0 +-35.30476172548307,-7.182057207426887,0 +-35.30293899956264,-7.182492439605808,0 +-35.30097912428059,-7.183184696815568,0 +-35.29888494472615,-7.183997415048894,0 +-35.29692253479916,-7.184818774928146,0 +-35.29444610527277,-7.185618470043831,0 +-35.29196154654061,-7.186542347115703,0 +-35.29001150090079,-7.186976138930146,0 +-35.28870765688688,-7.187306792523992,0 +-35.28662948288965,-7.187605973756963,0 +-35.28493410987619,-7.188049513127473,0 +-35.28285287782336,-7.188478055880489,0 +-35.27999073292334,-7.189002842525573,0 +-35.27685934969541,-7.189643962570933,0 +-35.27541534877894,-7.189968401738416,0 +-35.27387511054939,-7.190037446420976,0 +-35.27230906667091,-7.190229737894978,0 +-35.2709952805871,-7.190560273137274,0 +-35.27021146880739,-7.190656533940606,0 +-35.26723426738567,-7.190539407713522,0 +-35.26516549285385,-7.190460934595931,0 +-35.26427236030772,-7.190170759291983,0 +-35.2625962176477,-7.190106024399833,0 +-35.25989319221254,-7.189999366350289,0 +-35.25783435764333,-7.189917539333154,0 +-35.25423084637088,-7.189772727634501,0 +-35.25101233693036,-7.18964697770939,0 +-35.2483029964045,-7.189666840894662,0 +-35.24675361161827,-7.189601988317384,0 +-35.24530818528728,-7.190183464605734,0 +-35.24373409947212,-7.190760766526731,0 +-35.24282130341372,-7.190980759441029,0 +-35.24007766220585,-7.191768745185039,0 +-35.23851978688824,-7.191963192603055,0 +-35.23606368670109,-7.191993882823575,0 +-35.2350714078286,-7.190929269917714,0 +-35.23339577151712,-7.19086307287688,0 +-35.2323654256798,-7.190822488711558,0 +-35.23067633420204,-7.191140340018507,0 +-35.22808497207086,-7.191422341087782,0 +-35.22704998717986,-7.191509606529559,0 +-35.22498036310353,-7.19168409572488,0 +-35.22343105133456,-7.19175100739807,0 +-35.22162852148788,-7.191679745700241,0 +-35.21945542254056,-7.191081201135332,0 +-35.21778735989843,-7.190758732006716,0 +-35.21599553211378,-7.190303247084997,0 +-35.21409143013616,-7.189459110005062,0 +-35.21282195167415,-7.188896313382929,0 +-35.21193443755426,-7.188476775020738,0 +-35.20971971197503,-7.187999825314173,0 +-35.20918950416193,-7.187977041789242,0 +-35.20709572726318,-7.187764222810709,0 +-35.20478154077086,-7.187541514672082,0 +-35.20389027523444,-7.187122994442632,0 +-35.20148413198807,-7.185749697714334,0 +-35.19943962380593,-7.18527572391642,0 +-35.19699227992531,-7.185043216922451,0 +-35.19621191009779,-7.185137340083055,0 +-35.19410472345317,-7.185943251054344,0 +-35.19292334661132,-7.18628231037996,0 +-35.19107846937477,-7.186980881764218,0 +-35.18950167682142,-7.187565272476074,0 +-35.18803746853924,-7.188405432057381,0 +-35.1860510019352,-7.189355635396948,0 +-35.18484827669506,-7.190209051872834,0 +-35.18287022309768,-7.191032016885165,0 +-35.18182645276632,-7.191248315569116,0 +-35.17959471591562,-7.192189475995897,0 +-35.17815144786973,-7.192646609658958,0 +-35.17670607615066,-7.193103689192839,0 +-35.1743448897103,-7.194165929667641,0 +-35.17341790231104,-7.194771192271809,0 +-35.17235698058879,-7.195499319914716,0 +-35.17116274355953,-7.196350161582751,0 +-35.16918483869956,-7.197298662415007,0 +-35.16685221573547,-7.198098331130987,0 +-35.1662042950717,-7.19820027145096,0 +-35.16344784942371,-7.199117976503489,0 +-35.16173784641703,-7.199819947985278,0 +-35.16095052675988,-7.200045819393825,0 +-35.15799877369705,-7.201066615515507,0 +-35.15569185330332,-7.202111463073043,0 +-35.15399552429295,-7.202935620261639,0 +-35.15295622854924,-7.203149920048863,0 +-35.1512589358145,-7.203721385540498,0 +-35.15034839053136,-7.203940775840743,0 +-35.14717042946943,-7.205472498467576,0 +-35.14639869503102,-7.205441805725552,0 +-35.14369740879529,-7.205334763742612,0 +-35.1424109280927,-7.205283923615415,0 +-35.14099573324197,-7.205227990174034,0 +-35.13958555670171,-7.205044509285705,0 +-35.13778500389088,-7.204972533217398,0 +-35.13611172531156,-7.204906905217488,0 +-35.1337908636716,-7.204818693871156,0 +-35.13223374550941,-7.204890251535098,0 +-35.12962892106221,-7.204805990460686,0 +-35.12847014689108,-7.204759022153718,0 +-35.12694052241603,-7.204688346544594,0 +-35.12566322809095,-7.20450648060229,0 +-35.12398328362283,-7.204442549629897,0 +-35.12178297303687,-7.2042343133432,0 +-35.12012285141614,-7.203909955818057,0 +-35.11909554975723,-7.20386755874993,0 +-35.11781653097601,-7.20368689731947,0 +-35.11524703507288,-7.203707977701511,0 +-35.11331624205803,-7.203882882253716,0 +-35.11164215636492,-7.203816328849211,0 +-35.11125574786602,-7.203800998188598,0 +-35.10027559218932,-7.202842764744108,0 +-35.09862021301483,-7.2023980957507,0 +-35.09656774390346,-7.202196897693397,0 +-35.09489832922904,-7.201998324152862,0 +-35.09258141192741,-7.201899897884426,0 +-35.09026000512413,-7.201934313206606,0 +-35.08741197837881,-7.202207292020392,0 +-35.08548042066145,-7.202131611357186,0 +-35.08496538808993,-7.202111252721846,0 +-35.08343055950511,-7.201794743040347,0 +-35.08073560572616,-7.201433229154609,0 +-35.0790588540696,-7.201368917037366,0 +-35.07649749159366,-7.200883761333165,0 +-35.07513259980303,-7.199549520749427,0 +-35.07450403758488,-7.199140585605799,0 +-35.07233937042812,-7.198414825997944,0 +-35.07082961631041,-7.197458838557989,0 +-35.06994845101281,-7.196911809419348,0 +-35.06844360147493,-7.195828006196391,0 +-35.06784045759198,-7.194780121972905,0 +-35.06673230187759,-7.193456042583829,0 +-35.06100899361354,-7.19005188490118,0 +-35.05988600719638,-7.189111416222453,0 +-35.05660926272693,-7.187189493894571,0 +-35.05372906058798,-7.185025978845008,0 +-35.05234263516064,-7.184207246748623,0 +-35.05019261613135,-7.183101059304787,0 +-35.04994532396609,-7.182834453303162,0 +-35.04822962418658,-7.180586919357721,0 +-35.04711139694705,-7.179517282990981,0 +-35.04500363644772,-7.177383764727691,0 +-35.04400889748878,-7.176447581401058,0 +-35.04263262330751,-7.175368138049635,0 +-35.04073537759027,-7.174396074614501,0 +-35.03896080044826,-7.173557552701813,0 +-35.03564655346382,-7.172151289960205,0 +-35.0347603989853,-7.171730686180433,0 +-35.03247928868825,-7.170740545623242,0 +-35.03084034081485,-7.169777459893765,0 +-35.03009112486052,-7.169107056920583,0 +-35.02807960632271,-7.167744903243563,0 +-35.02745444302131,-7.167207397664648,0 +-35.02634372110116,-7.165753781614786,0 +-35.02552250321934,-7.164181564805567,0 +-35.02453834010434,-7.163117172579819,0 +-35.02366805021866,-7.162313774069499,0 +-35.02216812509698,-7.16110088365199,0 +-35.0211454438256,-7.160803637944942,0 +-35.01923471390005,-7.160086383374392,0 +-35.01784091161448,-7.159389846005822,0 +-35.01771732591952,-7.159256788680737,0 +-35.01420375070422,-7.156554386955559,0 +-35.01177534815776,-7.155945103167809,0 +-35.01000209616829,-7.155105810925315,0 +-35.00861562942934,-7.154281830421191,0 +-35.00763628127329,-7.152960032650345,0 +-35.00676480624798,-7.152155079723896,0 +-35.0056564695829,-7.150829111870952,0 +-35.00478510350398,-7.150025056047574,0 +-35.00441915233941,-7.149497856507434,0 +-35.00316597792626,-7.148549946440959,0 +-35.00093178954459,-7.146416046607261,0 +-34.9990548841476,-7.144930123128116,0 +-34.99804866067458,-7.144247810778897,0 +-34.99690738736039,-7.143686817050418,0 +-34.99461423586087,-7.142821202313088,0 +-34.99257636697962,-7.142098016201568,0 +-34.99116626246374,-7.141783101737405,0 +-34.9888258432935,-7.141937667735505,0 +-34.98700505339037,-7.142117733767238,0 +-34.98648834147045,-7.142096580070045,0 +-34.9839044429423,-7.141990802353035,0 +-34.98232484812888,-7.141905649268097,0 +-34.98101762359101,-7.141843072518365,0 +-34.97945246956757,-7.14163941504026,0 +-34.97841221815795,-7.141330525302926,0 +-34.97535183920314,-7.140409506092833,0 +-34.9748514694117,-7.140245564546102,0 +-34.97354270878466,-7.139754654577486,0 +-34.97282502336494,-7.139365779370608,0 +-34.9721184623608,-7.138980957468921,0 +-34.97126551488782,-7.138660856028303,0 +-34.97027382552117,-7.138264793155111,0 +-34.96950294271289,-7.137879800756581,0 +-34.96844430985671,-7.137553733281664,0 +-34.96775187872356,-7.137102643267608,0 +-34.9671245688501,-7.136795245067232,0 +-34.96650297946924,-7.136346946735352,0 +-34.9655916920779,-7.136028124559674,0 +-34.9651091507064,-7.135655936183398,0 +-34.96434838776725,-7.135131436447955,0 +-34.96323550501202,-7.134522195387495,0 +-34.96211967632489,-7.133983360681912,0 +-34.96128491499867,-7.133526369221737,0 +-34.96044436346233,-7.13321026215436,0 +-34.95939648559881,-7.132744647781326,0 +-34.95814123363841,-7.132129485174613,0 +-34.95731526035714,-7.131461433779516,0 +-34.95655785005956,-7.130867140376185,0 +-34.95586198910362,-7.130486052847254,0 +-34.95496053411235,-7.129883929762953,0 +-34.95440322866868,-7.129578583681083,0 +-34.95363807284299,-7.129123296417494,0 +-34.95252781114371,-7.128443585303971,0 +-34.95183103194557,-7.128061918008497,0 +-34.95127309321757,-7.12775619461333,0 +-34.9506679696708,-7.12688428126949,0 +-34.95004149464204,-7.126358917179719,0 +-34.9492670190518,-7.125896061722982,0 +-34.94856098765885,-7.125507132487913,0 +-34.94827656611302,-7.125423033487674,0 +-34.94484516876579,-7.125030595479155,0 +-34.94448267767421,-7.125154339178484,0 +-34.94332707178596,-7.125384230884664,0 +-34.94252474493305,-7.125704203352506,0 +-34.94149548385052,-7.126308547242965,0 +-34.94090545772897,-7.126715062314365,0 +-34.94053906144911,-7.12691548055011,0 +-34.9394355969653,-7.127738158643478,0 +-34.93848533944472,-7.12827083699341,0 +-34.93812156548883,-7.128396723346849,0 +-34.93717542351054,-7.128710019637937,0 +-34.93637356065602,-7.128958073896997,0 +-34.93564138859079,-7.129282188148636,0 +-34.93432404493224,-7.129940093674686,0 +-34.93359321784072,-7.130265966995128,0 +-34.93330108793649,-7.130396432434302,0 +-34.93234134154256,-7.131068942248047,0 +-34.93145290949572,-7.131744341026963,0 +-34.93086433364032,-7.132076069215773,0 +-34.9303449587208,-7.132481908188877,0 +-34.92967573213286,-7.133024052290665,0 +-34.92877763744234,-7.133841772144956,0 +-34.9282467053099,-7.134603271013082,0 +-34.92771475434526,-7.135222808945389,0 +-34.92718503437308,-7.135771675354685,0 +-34.92643811059937,-7.136453991764151,0 +-34.92575456832246,-7.137140659903353,0 +-34.92515204074369,-7.137687827587996,0 +-34.92440409775416,-7.138371014577634,0 +-34.92374306800161,-7.138842069623609,0 +-34.92336501454584,-7.139466252083555,0 +-34.92269969973075,-7.140008426861947,0 +-34.92189458454951,-7.140403176784814,0 +-34.9212296355384,-7.140945089588925,0 +-34.92041394703872,-7.141764081525156,0 +-34.91967501872514,-7.142373697099559,0 +-34.91892738704421,-7.143056416165654,0 +-34.91796691416504,-7.143589811271768,0 +-34.91730848305929,-7.143848961003373,0 +-34.91649803837404,-7.144315648568792,0 +-34.91596506967011,-7.145077334103684,0 +-34.91550938093343,-7.145699759210415,0 +-34.91482791516982,-7.146527761661773,0 +-34.91422441918232,-7.147146441393219,0 +-34.91333914374561,-7.147681619043703,0 +-34.91245810412387,-7.148075291355118,0 +-34.91156392996847,-7.14889372979476,0 +-34.91105548002754,-7.149573844739777,0 +-34.91081908061751,-7.149784667632644,0 +-34.90986139569687,-7.150850693457151,0 +-34.90926548791116,-7.151400298544262,0 +-34.90873930203252,-7.152025062047415,0 +-34.90814063122809,-7.152719880739552,0 +-34.9074080203187,-7.153192200825014,0 +-34.90716021983995,-7.154035825161409,0 +-34.90713484083807,-7.154674288704332,0 +-34.90709402272204,-7.155665581671608,0 +-34.90690746414845,-7.156722052562474,0 +-34.90653033607913,-7.157203559900487,0 +-34.90592456027745,-7.158030559981282,0 +-34.90539578382946,-7.158789671383571,0 +-34.90501507036841,-7.159412260430356,0 +-34.90442075022847,-7.160025754627737,0 +-34.90382217277235,-7.16070995856474,0 +-34.90315706298304,-7.161250062280883,0 +-34.9024112209115,-7.161930112289465,0 +-34.90181182324094,-7.162475515520097,0 +-34.90115129195965,-7.16280520685705,0 +-34.90027348495716,-7.163266857348862,0 +-34.89933281048201,-7.163722045113746,0 +-34.89845697494627,-7.164182808362734,0 +-34.89770330190699,-7.164936617830722,0 +-34.89710578304248,-7.165481829558062,0 +-34.89631415599989,-7.165592002406563,0 +-34.89538376014649,-7.165625040613821,0 +-34.89460904393665,-7.165379974132138,0 +-34.89375532774794,-7.165274514350378,0 +-34.8928199265212,-7.165239634064222,0 +-34.89217241721626,-7.165215292691022,0 +-34.89132314245723,-7.165317916620277,0 +-34.89103524396655,-7.165377049130016,0 +-34.8896428894988,-7.165561609243909,0 +-34.88937878251225,-7.165659532848623,0 +-34.88861848840632,-7.165888275724253,0 +-34.88816174317682,-7.166018865633734,0 +-34.88732622642784,-7.166208563206151,0 +-34.88671276912741,-7.166482331358962,0 +-34.88636687803849,-7.1666550108893,0 +-34.88597716178712,-7.166975691858319,0 +-34.88570280809287,-7.167228608317344,0 +-34.88538832805041,-7.167554470438809,0 +-34.88480931823342,-7.167944243056829,0 +-34.88446799116588,-7.168043155278025,0 +-34.88397895152266,-7.168098901217502,0 +-34.8835997127667,-7.168233401631753,0 +-34.88287998322628,-7.168503334324403,0 +-34.88254204747288,-7.168564505111531,0 +-34.88216978316937,-7.168549910866646,0 +-34.88141992657055,-7.168668719177971,0 +-34.88100739918835,-7.168726363090419,0 +-34.88044118562122,-7.168851560764233,0 +-34.87995051613301,-7.168942736825594,0 +-34.87923353422566,-7.169061844397153,0 +-34.87885535217477,-7.169157791500985,0 +-34.87847908678683,-7.169216779779327,0 +-34.87776164067702,-7.169410365863401,0 +-34.87697067319074,-7.169526763982157,0 +-34.87617771300277,-7.169680232451847,0 +-34.87572632347491,-7.169736215191817,0 +-34.87482615703379,-7.169811172993146,0 +-34.87437663718208,-7.169830124194388,0 +-34.87400035739922,-7.16985208620308,0 +-34.87313651764094,-7.169928555272768,0 +-34.87161889416745,-7.170274658252413,0 +-34.87128036269871,-7.170297854461325,0 +-34.87071711587598,-7.170423831379965,0 +-34.87023117338424,-7.170478896197787,0 +-34.86982147164058,-7.170500118922441,0 +-34.86944680535206,-7.170522213131433,0 +-34.86903429164217,-7.170542627713839,0 +-34.86847082474203,-7.170594026628302,0 +-34.86809730876521,-7.1705789189535,0 +-34.86754328646344,-7.170408140617831,0 +-34.8670997252603,-7.17027891414138,0 +-34.86670273406177,-7.169928931519021,0 +-34.86634146025523,-7.169617419717727,0 +-34.86594425915245,-7.169267252908986,0 +-34.86583674356692,-7.169151513537989,0 +-34.86536162457506,-7.168872360294774,0 +-34.86496419381972,-7.168522010901408,0 +-34.86453094295393,-7.168133105638844,0 +-34.86436534109343,-7.167606392787405,0 +-34.86419669711992,-7.167153828034495,0 +-34.86405631888503,-7.166925286465785,0 +-34.86392200306278,-7.166548378030614,0 +-34.86352913070039,-7.166086778136365,0 +-34.86317514069322,-7.165589579342336,0 +-34.86260451227479,-7.164897917451691,0 +-34.86210860957606,-7.164209237348412,0 +-34.86171921814815,-7.163713308897976,0 +-34.86151394940752,-7.163260390724745,0 +-34.86116093287876,-7.162764591562074,0 +-34.861030285326,-7.162314649963696,0 +-34.86100502493663,-7.162016631341545,0 +-34.86049325729905,-7.161432262969324,0 +-34.86032386948922,-7.16097893876295,0 +-34.86007852292033,-7.160559975987104,0 +-34.85984062917559,-7.159955990134902,0 +-34.85960027754226,-7.159426934067768,0 +-34.85939663718757,-7.158937503462648,0 +-34.85900582167226,-7.158478074776174,0 +-34.85872166845887,-7.158133455837199,0 +-34.85851329721568,-7.157754427552724,0 +-34.85836876748232,-7.15763741518569,0 +-34.85801697506239,-7.157103704376798,0 +-34.85759311278862,-7.156492878198896,0 +-34.85705900573684,-7.155840751592054,0 +-34.85670873047069,-7.155270552375295,0 +-34.8563162296016,-7.154809233790562,0 +-34.85607686828874,-7.154281370243821,0 +-34.85579382309176,-7.153899557786933,0 +-34.85528632287487,-7.153507674686833,0 +-34.85525051190937,-7.153469129018351,0 +-34.85467595144932,-7.152806098502246,0 +-34.85424454969259,-7.152311795537803,0 +-34.85413885156643,-7.15212395381192,0 +-34.85356396475462,-7.151577111891813,0 +-34.85316643396389,-7.151261866992244,0 +-34.85298818483988,-7.151067708986394,0 +-34.85266399997636,-7.15079304409087,0 +-34.85231169501967,-7.150259196653429,0 +-34.85196527201916,-7.149577244315399,0 +-34.85171497169536,-7.149270907723222,0 +-34.85150400670172,-7.148928567381676,0 +-34.85118664775415,-7.148433548695065,0 +-34.85086573796091,-7.148049120654609,0 +-34.85081032802496,-7.147600761125161,0 +-34.8506784999332,-7.147186647826143,0 +-34.85069955733666,-7.146704427548812,0 +-34.85064591173811,-7.146219353896162,0 +-34.85059233722315,-7.145734436238386,0 +-34.85058137087888,-7.145140023242713,0 +-34.85078754485146,-7.144740081065991,0 +-34.85092177719311,-7.144263405144822,0 +-34.85101672744365,-7.143822513029699,0 +-34.85125674390528,-7.143498953155182,0 +-34.85134823545039,-7.143132476904209,0 +-34.85144761770446,-7.142618850194519,0 +-34.85153898838556,-7.142252889957691,0 +-34.85162143890986,-7.141996269720666,0 +-34.85193763326231,-7.141300606157845,0 +-34.85213917131471,-7.140861893518458,0 +-34.85181433080975,-7.140437302793005,0 +-34.85186168602691,-7.140140705340643,0 +-34.85198554943047,-7.139809951492675,0 +-34.85234516407305,-7.139190328833313,0 +-34.85266524804103,-7.138643486100994,0 +-34.8528635778163,-7.138352890487146,0 +-34.8531764085264,-7.137991233924632,0 +-34.85345201977766,-7.137509617885647,0 +-34.85349540411198,-7.137322479600128,0 +-34.85377661871369,-7.136847222820582,0 +-34.85397779102774,-7.136479374942174,0 +-34.8541805993389,-7.136033387579653,0 +-34.85430200218848,-7.135772617039572,0 +-34.85451766147455,-7.135027215057778,0 +-34.85442640585448,-7.134417779081091,0 +-34.85435885158244,-7.134186677982954,0 +-34.85409016248659,-7.133182993670343,0 +-34.85294342831095,-7.131791544543038,0 +-34.85261363021568,-7.131552114686304,0 +-34.85221317296113,-7.13119800912647,0 +-34.85170290572051,-7.130764861302534,0 +-34.85141050687493,-7.130528563718554,0 +-34.85111956490533,-7.130254846820631,0 +-34.85053922281286,-7.12974335188121,0 +-34.85014019019228,-7.129390063116006,0 +-34.84972899303682,-7.129224540565824,0 +-34.84920463337311,-7.129054079842878,0 +-34.84872070638752,-7.128772654723336,0 +-34.84785830058056,-7.128512906376901,0 +-34.84744460271376,-7.128421157158715,0 +-34.84676828526581,-7.128206090837152,0 +-34.8464678775923,-7.12808119687061,0 +-34.84591831639407,-7.127645712178468,0 +-34.84559971069781,-7.127106842999884,0 +-34.84550169921337,-7.126727169313482,0 +-34.84543841390159,-7.126424041861244,0 +-34.84535699032931,-7.125821766388968,0 +-34.84517012209859,-7.125333017910907,0 +-34.84516569658349,-7.124927319632328,0 +-34.84517030125804,-7.124413662089072,0 +-34.84519096477888,-7.124082363762556,0 +-34.84521970652192,-7.123604163172844,0 +-34.8452428978224,-7.123199627939235,0 +-34.84520383057232,-7.122381543157259,0 +-34.84522167755451,-7.121974156239299,0 +-34.84520377443432,-7.121528364407287,0 +-34.84514689327873,-7.12111822138054,0 +-34.84516960530464,-7.12060017058094,0 +-34.8451890665276,-7.120156262749222,0 +-34.84524407528868,-7.119712063424321,0 +-34.84521545948287,-7.119410081015484,0 +-34.84477246714762,-7.118824521219139,0 +-34.84455755084061,-7.118520573266603,0 +-34.84412061334072,-7.118132590541616,0 +-34.84382524520561,-7.118008882238671,0 +-34.84334674567916,-7.117766133578573,0 +-34.84298169335874,-7.117454427758457,0 +-34.8425880718969,-7.116990880368902,0 +-34.84226740186052,-7.116567842067451,0 +-34.84187766908308,-7.115955945290311,0 +-34.84184750937335,-7.115768334963539,0 +-34.8418643900406,-7.115321674273794,0 +-34.84191708245773,-7.11491356473112,0 +-34.84200629923148,-7.114544048384613,0 +-34.84209869316997,-7.11409989430167,0 +-34.84219414060045,-7.113581060279985,0 +-34.84224036801457,-7.113358841093927,0 +-34.84237605478538,-7.11276652767433,0 +-34.84258875670508,-7.112139803046997,0 +-34.84276493649128,-7.111550208863235,0 +-34.84282727780109,-7.111032368182062,0 +-34.84328866544529,-7.109157184885557,0 +-34.84338349621254,-7.108715953460389,0 +-34.84354948747436,-7.108351449697825,0 +-34.84375544920571,-7.107913479813277,0 +-34.84392100721619,-7.107508781823966,0 +-34.84397601010446,-7.107062645182991,0 +-34.84402890644397,-7.106652320738442,0 +-34.84408151009553,-7.106241043340296,0 +-34.84417014810608,-7.105868183327367,0 +-34.84463582403042,-7.105431867645761,0 +-34.84487319243534,-7.105100599296955,0 +-34.84503014955734,-7.104917206711058,0 +-34.84648627744382,-7.10318636296988,0 +-34.84672475642842,-7.102860869011283,0 +-34.84696457584958,-7.1025335793988,0 +-34.84716529894497,-7.102241963566577,0 +-34.84748812002154,-7.101730602297133,0 +-34.84765122759955,-7.101437187248107,0 +-34.84779348628692,-7.100729603636666,0 +-34.84781806339844,-7.100129505562105,0 +-34.84783960265509,-7.099604382183244,0 +-34.84793515206807,-7.099119754179737,0 +-34.84795669588057,-7.09859456670763,0 +-34.84796746815798,-7.098331965203139,0 +-34.84797365785516,-7.097263763699317,0 +-34.84799696514047,-7.096700914257543,0 +-34.8480120570122,-7.096326231578868,0 +-34.84802745190491,-7.095951149382726,0 +-34.84814019815141,-7.095054083659758,0 +-34.8481524480059,-7.094754043758188,0 +-34.8481814592455,-7.094041127666881,0 +-34.84828458539896,-7.093368417413741,0 +-34.84831386434804,-7.092655496013206,0 +-34.84833578715636,-7.092131829385248,0 +-34.84836351044953,-7.091456889017083,0 +-34.8483486770799,-7.090892039705436,0 +-34.84836418736356,-7.090517798630062,0 +-34.84837961833682,-7.090142994043901,0 +-34.84847367904383,-7.089696198452284,0 +-34.84863868323385,-7.089364638415277,0 +-34.84873885223207,-7.08876667269145,0 +-34.84874039525509,-7.088729276585248,0 +-34.84870728285277,-7.084919536345593,0 +-34.84884564206743,-7.084323987024014,0 +-34.84906357122166,-7.083618602310728,0 +-34.84915764227041,-7.083171290928822,0 +-34.84925020519581,-7.082761560026033,0 +-34.84926406634925,-7.082423839065139,0 +-34.84927946687731,-7.082048591362881,0 +-34.84923772671802,-7.08121990077527,0 +-34.84910642119093,-7.080725136389256,0 +-34.84902246422726,-7.080010017093754,0 +-34.84896990328018,-7.07944367295473,0 +-34.84894745547284,-7.079066527109764,0 +-34.84905075815041,-7.07839365284361,0 +-34.84922047474723,-7.07794927961621,0 +-34.84930995834918,-7.077614499786636,0 +-34.84928600806505,-7.077275267160483,0 +-34.84965585967621,-7.072879761467489,0 +-34.84958999585369,-7.071714142613905,0 +-34.8496085273356,-7.071263392979649,0 +-34.84974679465484,-7.070665365261954,0 +-34.84980939111362,-7.070064825337935,0 +-34.84987956719819,-7.069278094186394,0 +-34.84991029677138,-7.068528805270605,0 +-34.85004673187093,-7.067970776572533,0 +-34.85010453258353,-7.06748458959455,0 +-34.8501653954343,-7.066923564364766,0 +-34.85010519595801,-7.06654621796818,0 +-34.84997702705594,-7.065978311556214,0 +-34.84992141347025,-7.065487716360296,0 +-34.85017290860755,-7.064896569626145,0 +-34.85029391403947,-7.064713707980218,0 +-34.85035322259065,-7.064190540429418,0 +-34.85037169090304,-7.063740699759829,0 +-34.85039166895609,-7.063253645964775,0 +-34.85035961872711,-7.062191470804437,0 +-34.85030569702848,-7.061663099338546,0 +-34.85032730841995,-7.061137187281157,0 +-34.85034569881726,-7.060688701455018,0 +-34.8504059575432,-7.060138345466128,0 +-34.85054098161301,-7.059617761208168,0 +-34.85066832491376,-7.059284389082571,0 +-34.85083810377282,-7.058839923470176,0 +-34.85088670109645,-7.05857861887736,0 +-34.85063958163698,-7.057214960097379,0 +-34.85070512144989,-7.056540845010231,0 +-34.85071589943797,-7.056278130548941,0 +-34.85073591518203,-7.055790277903086,0 +-34.85075592864467,-7.055302483287393,0 +-34.85062471307708,-7.054808603664394,0 +-34.85056602980225,-7.054392724130226,0 +-34.85054361309032,-7.054015787473777,0 +-34.85052580508017,-7.0535261323,0 +-34.85039916780325,-7.052919472244158,0 +-34.85014982486543,-7.052533336195086,0 +-34.84989893144289,-7.052184728996972,0 +-34.84980083146728,-7.05180459774114,0 +-34.84937231573182,-7.050239710101026,0 +-34.84934223661418,-7.050050290947675,0 +-34.84906748937725,-7.049361888861079,0 +-34.84892857481989,-7.049055294761676,0 +-34.84861294606046,-7.048440632977057,0 +-34.84840476362035,-7.047980551468251,0 +-34.84812561944218,-7.047404911312999,0 +-34.84788845191423,-7.046718904457604,0 +-34.84768142951936,-7.046221962600391,0 +-34.8476134245713,-7.046031301700438,0 +-34.84722994974956,-7.04522618129766,0 +-34.8470579696346,-7.044805616177958,0 +-34.84692378711862,-7.044386626034962,0 +-34.84681815272,-7.044194365792656,0 +-34.84653307510772,-7.043769245982078,0 +-34.84629218648497,-7.043195658313159,0 +-34.84611996400102,-7.042775297892579,0 +-34.84595573236129,-7.042167363034675,0 +-34.8458200743966,-7.041786094641084,0 +-34.8455053016167,-7.04109624595036,0 +-34.84529061031422,-7.040786766641561,0 +-34.84511068501842,-7.040553888546275,0 +-34.8449670454065,-7.040360072160399,0 +-34.84491752094512,-7.039709799691076,0 +-34.84455763121868,-7.039244099573621,0 +-34.84434289727744,-7.038934642480732,0 +-34.84409035314447,-7.038623642414537,0 +-34.84391944306634,-7.038165546939861,0 +-34.84374097786201,-7.037895118219668,0 +-34.84353525379727,-7.03736035348864,0 +-34.84332777602444,-7.036863059976841,0 +-34.84326931310623,-7.03644704475007,0 +-34.84317608826704,-7.035954410171465,0 +-34.84296673766136,-7.035532429743196,0 +-34.8427179099618,-7.035146474116859,0 +-34.84225180022952,-7.034488235414861,0 +-34.8419012325713,-7.033797185810725,0 +-34.84180193250621,-7.033454859622464,0 +-34.84155882977834,-7.032918638587644,0 +-34.8413091867189,-7.032532395717594,0 +-34.84113226830823,-7.032224357395472,0 +-34.84107762753286,-7.031528609223471,0 +-34.8407748610771,-7.030613415159043,0 +-34.84052761431211,-7.030189423343946,0 +-34.84029017064297,-7.029503566924097,0 +-34.840050080621,-7.028892388193025,0 +-34.83988322745173,-7.028322220541115,0 +-34.83981647405525,-7.028094112894244,0 +-34.83942758521178,-7.027401814975948,0 +-34.83924912992613,-7.027131417384155,0 +-34.8390056889118,-7.026595184079843,0 +-34.83871678029224,-7.026245092197052,0 +-34.83839155488689,-7.025855913716597,0 +-34.83821892453073,-7.025472729159882,0 +-34.83815684058185,-7.025169292715352,0 +-34.83751138456277,-7.024093383236984,0 +-34.8373725448514,-7.023786902271807,0 +-34.83738487652239,-7.023486651017019,0 +-34.83722011213925,-7.022878827600633,0 +-34.83709117843493,-7.022310350222416,0 +-34.83698684897774,-7.022080615333691,0 +-34.83663301552725,-7.021464864260517,0 +-34.8363883181827,-7.020966107239217,0 +-34.83620971226909,-7.020695807515182,0 +-34.83581619348304,-7.020079093392854,0 +-34.83560651993413,-7.019693778815247,0 +-34.83532773339123,-7.019155407197387,0 +-34.83508459017811,-7.018619246331204,0 +-34.83491862395729,-7.018048609355692,0 +-34.83467394332357,-7.017549977551765,0 +-34.83449718851382,-7.017242066917683,0 +-34.8344277195247,-7.017088876537571,0 +-34.83402406495285,-7.016095641763536,0 +-34.83366727762359,-7.015555065518699,0 +-34.83349819265395,-7.015059500256815,0 +-34.83332969677319,-7.014563576561659,0 +-34.83308506630031,-7.01406495182136,0 +-34.83283569445687,-7.013678972520489,0 +-34.83255021278412,-7.013216877198527,0 +-34.83241587466513,-7.012797841492153,0 +-34.83228616760788,-7.012266173649791,0 +-34.83207651185472,-7.011844007661838,0 +-34.83179174850892,-7.011418777217431,0 +-34.83161550968551,-7.011110831855045,0 +-34.83144233114763,-7.010727867967407,0 +-34.83127068770328,-7.010307419875986,0 +-34.83092491581682,-7.009231996318916,0 +-34.83074970435559,-7.008886683201537,0 +-34.83054193599224,-7.00839037642664,0 +-34.8302962266967,-7.00789245078337,0 +-34.8300531591032,-7.007356230239001,0 +-34.82987853780387,-7.007010506284209,0 +-34.82974167105744,-7.006666395357144,0 +-34.82953874466588,-7.006094013999645,0 +-34.82936576416905,-7.005710934582728,0 +-34.82907120799906,-7.004571588203929,0 +-34.82901323470423,-7.00411831535387,0 +-34.82880570799215,-7.003621294668166,0 +-34.82863318341953,-7.003200797157105,0 +-34.82857695870067,-7.002709769354845,0 +-34.82848292682885,-7.0022171459327,0 +-34.82850073328478,-7.001766577007423,0 +-34.82851705899918,-7.001353495917584,0 +-34.82845187011857,-7.001087552085108,0 +-34.82828961890996,-7.00040382660564,0 +-34.82823182835277,-6.999949962940998,0 +-34.82824665674986,-6.999574226606556,0 +-34.82822080888742,-6.999272122048064,0 +-34.82813025575344,-6.998742408351609,0 +-34.82813360562879,-6.998667436347777,0 +-34.82836973288098,-6.997548393756352,0 +-34.82834951482345,-6.997096486050892,0 +-34.82826037271973,-6.996528507905825,0 +-34.82820581430639,-6.996037291548419,0 +-34.82818835140565,-6.995510228298799,0 +-34.82820516492922,-6.995022063189196,0 +-34.82821429673611,-6.994759077236742,0 +-34.82820250013237,-6.994156682831811,0 +-34.82821881479479,-6.993781231574823,0 +-34.82823568468884,-6.993254498832887,0 +-34.82828979540506,-6.992766614556251,0 +-34.82831299018488,-6.992240877713998,0 +-34.8283708925246,-6.991791973090181,0 +-34.82858285204223,-6.989577382467337,0 +-34.82863410362205,-6.989278379926552,0 +-34.82868203292084,-6.989054548943338,0 +-34.82859565321335,-6.988449182592246,0 +-34.82854086329471,-6.987995722112902,0 +-34.82856210664349,-6.987507976378851,0 +-34.82865580665482,-6.987098424216152,0 +-34.82890127584385,-6.986657481192275,0 +-34.82900068763743,-6.986060165119939,0 +-34.82906031624137,-6.985536529477058,0 +-34.8291513544678,-6.985126477364021,0 +-34.82924175105619,-6.984716070931031,0 +-34.82934007799972,-6.984156009676042,0 +-34.82947146705124,-6.983709954528996,0 +-34.82956060376424,-6.983375030740099,0 +-34.82958055505965,-6.982887017748499,0 +-34.82971504117186,-6.982365762204526,0 +-34.82985190063337,-6.982078582399014,0 +-34.82986238546218,-6.982014898996017,0 +-34.82989077752327,-6.981903789915561,0 +-34.82993772292478,-6.981729141775175,0 +-34.82998372166795,-6.981586729729571,0 +-34.82999374223088,-6.98153910432909,0 +-34.83004828831566,-6.981389214872461,0 +-34.83009347014121,-6.981270967121024,0 +-34.83012227396809,-6.9811601675931,0 +-34.83015770984603,-6.981081443008012,0 +-34.8301844905373,-6.981018485889632,0 +-34.83023065649213,-6.980876261169342,0 +-34.83027518094914,-6.980773995889762,0 +-34.83029456660162,-6.980694728851164,0 +-34.83050211509273,-6.979976318756926,0 +-34.83050684990562,-6.979864621100628,0 +-34.8305175944669,-6.979801143358508,0 +-34.83054734787059,-6.979666501271709,0 +-34.83055735419178,-6.979618947297713,0 +-34.83058728017318,-6.979476159418371,0 +-34.83059722576806,-6.979428503587734,0 +-34.83061744219895,-6.979325156390031,0 +-34.83065406720468,-6.979214369114092,0 +-34.83068203189454,-6.979119220362795,0 +-34.8307203057082,-6.978968235186451,0 +-34.83074701946203,-6.978905026246848,0 +-34.83080212134197,-6.978738556033822,0 +-34.83083019415101,-6.978643346563285,0 +-34.83085762588755,-6.978564162358904,0 +-34.83089510434224,-6.978437356219144,0 +-34.83089937830593,-6.978333393653885,0 +-34.83091945547021,-6.978238218082297,0 +-34.83097079281973,-6.978168629399567,0 +-34.83101503516643,-6.978074695103507,0 +-34.83108197884962,-6.977624846517577,0 +-34.83108562212005,-6.977536775242621,0 +-34.83110636192617,-6.977425343451445,0 +-34.8311083458942,-6.977377348228369,0 +-34.83113742282162,-6.977258444356866,0 +-34.83114809393165,-6.977194875453008,0 +-34.83116877916789,-6.977083716544626,0 +-34.83118716693218,-6.977028461910935,0 +-34.83124905158324,-6.976894983159118,0 +-34.83126677624469,-6.97685571250315,0 +-34.83130223060573,-6.976777181441228,0 +-34.83135642886324,-6.976635385164665,0 +-34.83136711607162,-6.976571793661289,0 +-34.83138651558561,-6.976492524234414,0 +-34.83141430237752,-6.976405557152626,0 +-34.8314337165744,-6.976326230481948,0 +-34.83145343338005,-6.976238965050562,0 +-34.83149154754019,-6.976096416434657,0 +-34.83152867715534,-6.975977843039811,0 +-34.83157320127857,-6.975875579052203,0 +-34.83159357121033,-6.975772337471096,0 +-34.83162199323601,-6.97566942198785,0 +-34.83163234231691,-6.975613805141734,0 +-34.8317159060594,-6.975346437435929,0 +-34.83174498402111,-6.975227538492698,0 +-34.83177209218725,-6.975156589885753,0 +-34.8318172725215,-6.975038342447468,0 +-34.8318627418049,-6.974912120735238,0 +-34.83188330050929,-6.97480098020603,0 +-34.8319128995312,-6.974666240724914,0 +-34.83193262919059,-6.974579003733766,0 +-34.83196173411879,-6.974460117492525,0 +-34.83200564991957,-6.974373798801019,0 +-34.83206537048363,-6.974296075554917,0 +-34.8320922330773,-6.974233026731822,0 +-34.83216327102466,-6.974075726341489,0 +-34.83216622555548,-6.974003799746795,0 +-34.83217854412909,-6.973900231997689,0 +-34.83219628805821,-6.973860924287931,0 +-34.83225045951572,-6.973525842363176,0 +-34.83229588064077,-6.973407529124744,0 +-34.83233395961199,-6.973272823697823,0 +-34.83234546840435,-6.973193107254207,0 +-34.83237344423308,-6.973106007688973,0 +-34.83240108452129,-6.973026886931676,0 +-34.83244520410874,-6.972940378221334,0 +-34.83250736325955,-6.972806519081546,0 +-34.83258420686392,-6.97270540777484,0 +-34.83268458366131,-6.972621283106593,0 +-34.83270975986508,-6.972598250934825,0 +-34.83280174384099,-6.972521802813626,0 +-34.83291831421091,-6.972430526563855,0 +-34.83299356691784,-6.972361644997386,0 +-34.83309275406368,-6.972309430699656,0 +-34.83315025387328,-6.972287645577383,0 +-34.83327296934431,-6.972252423465749,0 +-34.83341952432153,-6.972226204651087,0 +-34.8339636185707,-6.97211896907636,0 +-34.83402073509351,-6.972105261524792,0 +-34.83418229894306,-6.972103784769978,0 +-34.83432875524144,-6.972077675629495,0 +-34.83446814343222,-6.972027267350259,0 +-34.83460850246761,-6.971952902257806,0 +-34.83470686890698,-6.971916868436454,0 +-34.8348461674038,-6.971866495356335,0 +-34.83495254349967,-6.971830965061285,0 +-34.83508295581909,-6.971796687995033,0 +-34.83511577625052,-6.971782144611407,0 +-34.83524671347948,-6.971731762863778,0 +-34.83534545929656,-6.971679955954723,0 +-34.83550136651649,-6.971606619270997,0 +-34.83560002369905,-6.971554838101346,0 +-34.83565826933864,-6.971509229535306,0 +-34.83573968413825,-6.971488493926314,0 +-34.83586233615699,-6.971445386830986,0 +-34.8359769704109,-6.971401945295088,0 +-34.83600109223749,-6.971402923690895,0 +-34.83621511580056,-6.971330594556042,0 +-34.8362890827013,-6.971293572031509,0 +-34.83644477741925,-6.971227828064199,0 +-34.83653454906249,-6.971199435358213,0 +-34.83660759785411,-6.971186378432931,0 +-34.8366893407815,-6.971157653732008,0 +-34.83682839359106,-6.971107215681603,0 +-34.83693496079599,-6.971063461931772,0 +-34.83708148490364,-6.971029142386649,0 +-34.8371700679543,-6.97103259809258,0 +-34.83724252958201,-6.971035529558103,0 +-34.83734785263833,-6.97102378029119,0 +-34.83746057064891,-6.971028340318606,0 +-34.83754108356878,-6.971031597381649,0 +-34.83766157037106,-6.971044429622776,0 +-34.83776660322902,-6.971048347940931,0 +-34.837798939839,-6.971049553986764,0 +-34.8379371324619,-6.971038678536218,0 +-34.8380677167106,-6.971019481894511,0 +-34.83814067733065,-6.971022190955387,0 +-34.83824449197339,-6.971066174469827,0 +-34.83833049773133,-6.971149670280126,0 +-34.83840133538934,-6.971192762481334,0 + diff --git a/R-utils/roads/br316.csv b/R-utils/roads/br316.csv new file mode 100644 index 000000000..7a9af2b02 --- /dev/null +++ b/R-utils/roads/br316.csv @@ -0,0 +1,479 @@ +-48.43163071063937,-1.404296139247928,0 +-48.42872870261773,-1.402686497014948,0 +-48.42665519463718,-1.40019968782509,0 +-48.42429760866231,-1.397722521923366,0 +-48.42166553483917,-1.395539008887037,0 +-48.42020471929253,-1.394450058062804,0 +-48.41671010181089,-1.392287958557248,0 +-48.41234346819115,-1.389586337628272,0 +-48.40825296800707,-1.386592262963844,0 +-48.40589927336394,-1.384394922725602,0 +-48.40271603847379,-1.382796560704536,0 +-48.40043543549857,-1.382590419524689,0 +-48.3964315683035,-1.381874304879924,0 +-48.39326910667353,-1.380844634377027,0 +-48.3929752310998,-1.380570145226834,0 +-48.38861780436785,-1.377874401964578,0 +-48.38455506123906,-1.37545360130946,0 +-48.3816404013167,-1.373281832023268,0 +-48.37958644583604,-1.371364277692149,0 +-48.37606418935075,-1.368075936568154,0 +-48.37291137345695,-1.367331570533197,0 +-48.37033563524765,-1.366851277243201,0 +-48.36745609233853,-1.36581257841696,0 +-48.36404663713259,-1.365929021042918,0 +-48.36006876290779,-1.366064621097145,0 +-48.35581631311582,-1.366493812943523,0 +-48.35129307248339,-1.367214983814812,0 +-48.34845448533029,-1.367310748571106,0 +-48.34507748069689,-1.368277568672927,0 +-48.34168573318402,-1.368962338927245,0 +-48.33856384659798,-1.369067695862036,0 +-48.33428367728526,-1.368644788102721,0 +-48.33081705938037,-1.367057052767174,0 +-48.32850594793479,-1.365998542421993,0 +-48.32360920585495,-1.364175098299476,0 +-48.32132690651834,-1.363968422082734,0 +-48.31820193006699,-1.364074681371533,0 +-48.31337227928962,-1.364238896329629,0 +-48.31053123118998,-1.364335491484783,0 +-48.30740602905882,-1.364441744265238,0 +-48.30455523391491,-1.36425436112476,0 +-48.30086164772862,-1.364379924552173,0 +-48.298578992933,-1.364173212409852,0 +-48.28383845623581,-1.363295306050811,0 +-48.27706695397265,-1.363525284930856,0 +-48.27092680183252,-1.362378601716991,0 +-48.26408725557814,-1.360578190328548,0 +-48.25643326774043,-1.354740254494735,0 +-48.25419538577007,-1.348718340706893,0 +-48.24992674862534,-1.342765406628741,0 +-48.2463119917057,-1.336112310038161,0 +-48.24073523480864,-1.331558380147388,0 +-48.23513538643124,-1.326327502924411,0 +-48.23305838827905,-1.325042727639492,0 +-48.22328130893928,-1.316565132545953,0 +-48.21835814856145,-1.311311000228602,0 +-48.21282691845453,-1.308110272433375,0 +-48.20596458838558,-1.305632251377325,0 +-48.19903305377525,-1.301123514349183,0 +-48.19142433213155,-1.29663759646956,0 +-48.18796996934206,-1.294721572301132,0 +-48.17898388705864,-1.289604444651958,0 +-48.15776322375901,-1.285579261277297,0 +-48.14746767616695,-1.281864753453698,0 +-48.14130433866087,-1.280042341636364,0 +-48.13579548922748,-1.277519744099236,0 +-48.12827823445096,-1.275743832657234,0 +-48.12349263658841,-1.274552187739103,0 +-48.11324519643551,-1.272191516672877,0 +-48.0988674339126,-1.267938644689937,0 +-48.08864370526759,-1.266255938252398,0 +-48.0798660997006,-1.267236439485797,0 +-48.07386577254636,-1.270153103802419,0 +-48.06527297874075,-1.276539689197994,0 +-48.06074082256428,-1.282785996117722,0 +-48.05625400646984,-1.290386152730336,0 +-48.05426868792981,-1.291807100522581,0 +-48.04632806617103,-1.297495092721782,0 +-48.03701019137225,-1.302552654124378,0 +-48.03044583721083,-1.308872255071835,0 +-48.02241061909618,-1.311851498447762,0 +-48.01902402914395,-1.311964712114088,0 +-48.00737110126205,-1.308288190105202,0 +-47.99849584424468,-1.30655204236254,0 +-47.99510716307529,-1.306664275299002,0 +-47.98419388623559,-1.303673828211503,0 +-47.97396414931914,-1.301982139508722,0 +-47.96508785610685,-1.300244944121542,0 +-47.95691106543932,-1.299161947243486,0 +-47.94665392178921,-1.296792333051721,0 +-47.93711935493064,-1.295754040954224,0 +-47.92896243623247,-1.295347647050861,0 +-47.9215056281315,-1.295595793831267,0 +-47.91472574030962,-1.295821225453218,0 +-47.90319840044185,-1.296204455528818,0 +-47.9025202570345,-1.29622699645313,0 +-47.88240435983237,-1.293539844518091,0 +-47.8728774391643,-1.292507835648939,0 +-47.86743689263999,-1.292014836414707,0 +-47.85657881677658,-1.291706013200071,0 +-47.85251565741723,-1.291844142300632,0 +-47.83967234333924,-1.292958566897956,0 +-47.826807040091,-1.293395746051715,0 +-47.81875038246829,-1.295703088222266,0 +-47.81064845373579,-1.296656296873942,0 +-47.80326961103498,-1.298940858658891,0 +-47.79584549017645,-1.299871225464079,0 +-47.78571395680552,-1.300893619628373,0 +-47.77427519204806,-1.303315850538025,0 +-47.76353716730577,-1.306391703087748,0 +-47.75478454229838,-1.308044512490927,0 +-47.7433714437738,-1.311142827319501,0 +-47.7339434575244,-1.312818243713747,0 +-47.72521566714847,-1.315147266755227,0 +-47.71106715295463,-1.317653279802823,0 +-47.70095594784986,-1.319346246538331,0 +-47.69826999606777,-1.320113426106139,0 +-47.6908889086593,-1.322392455266766,0 +-47.68217537430544,-1.325393650684072,0 +-47.66731897162476,-1.327245477513363,0 +-47.6592124526998,-1.328194114564804,0 +-47.65108251741681,-1.328465979006684,0 +-47.64229707784775,-1.329437350612893,0 +-47.63488666573814,-1.331039712316924,0 +-47.62742315803182,-1.331286389686998,0 +-47.61522988896335,-1.332367186851687,0 +-47.60712930878749,-1.333990701050074,0 +-47.60108686557122,-1.336224345280516,0 +-47.59167051280674,-1.33924803980175,0 +-47.58293117995679,-1.342249884467722,0 +-47.57548062293223,-1.343175030590802,0 +-47.56937312529696,-1.343379071742862,0 +-47.56464903610867,-1.344215753008669,0 +-47.5367116755553,-1.335728287126236,0 +-47.52512000311092,-1.331037782301779,0 +-47.51094867022056,-1.325165197640366,0 +-47.4943253494043,-1.321915267669924,0 +-47.48155164805698,-1.319805622811001,0 +-47.46886357910169,-1.320233040976449,0 +-47.45355047858192,-1.318207225970216,0 +-47.43188711418009,-1.316391718065661,0 +-47.41906438852846,-1.313009795532166,0 +-47.40378796955311,-1.312250263735396,0 +-47.38846735868147,-1.310221640083584,0 +-47.37310650990895,-1.306925544006811,0 +-47.35900287899067,-1.303581660840903,0 +-47.34621117774823,-1.301464660281845,0 +-47.32706301738115,-1.29955745488711,0 +-47.31286764471103,-1.293673867377829,0 +-47.30239860408047,-1.285124793952538,0 +-47.2907853559413,-1.280424820663952,0 +-47.27909003469019,-1.273187184587638,0 +-47.2673983778453,-1.26595075939361,0 +-47.24670276606125,-1.256460886701732,0 +-47.23369906722743,-1.249248811290758,0 +-47.22055548704733,-1.238221053132856,0 +-47.20881788214555,-1.230962775754931,0 +-47.19705016680238,-1.222439153341546,0 +-47.18666508432958,-1.21767621829006,0 +-47.17216596989393,-1.222116373294115,0 +-47.16482321965455,-1.231275563201712,0 +-47.15498013895378,-1.241791173521769,0 +-47.14497568895818,-1.247222975517179,0 +-47.13378444378215,-1.255237404990715,0 +-47.12793500152078,-1.270687025210263,0 +-47.12327268789175,-1.283552776913636,0 +-47.11721599761122,-1.292652384221733,0 +-47.10874600128175,-1.305643869053839,0 +-47.09896903850735,-1.317405949183742,0 +-47.09300220168426,-1.329037606582402,0 +-47.07942186835022,-1.340923808375122,0 +-47.06330474063054,-1.352894044842934,0 +-47.05716968618113,-1.359449779399189,0 +-47.0448139186425,-1.370024042010436,0 +-47.03241814166008,-1.379328226685188,0 +-47.01871456933989,-1.387404933331732,0 +-47.00890575964855,-1.397888910791002,0 +-46.99787412584302,-1.409683288178663,0 +-46.98933710387345,-1.420126088261201,0 +-46.97707834984685,-1.433234869976059,0 +-46.96591557782556,-1.441228810339857,0 +-46.95115596637679,-1.45568859384997,0 +-46.94384012148198,-1.46482043681064,0 +-46.93897709392717,-1.471330820405869,0 +-46.91667480065418,-1.506056640015611,0 +-46.90797594291839,-1.515363774925194,0 +-46.89333204377628,-1.526372859554038,0 +-46.87734250905033,-1.541922646100856,0 +-46.86270574777575,-1.552916750450501,0 +-46.8465217710085,-1.562461074277813,0 +-46.83768103420624,-1.567257905029129,0 +-46.82319716289814,-1.582745130172609,0 +-46.81620537387885,-1.597974637247221,0 +-46.80771538210215,-1.613253663686227,0 +-46.79627900761267,-1.630129994361726,0 +-46.78039793474231,-1.64865333972272,0 +-46.76306904177653,-1.668723492831099,0 +-46.74828303389064,-1.675210807689794,0 +-46.7320445937358,-1.683244440861939,0 +-46.72314986376917,-1.68653741651046,0 +-46.70091012277469,-1.694770702261586,0 +-46.67721653929431,-1.704552992440211,0 +-46.65516861282148,-1.718782102858078,0 +-46.6256647810678,-1.734760694843276,0 +-46.60805931812492,-1.747346402369473,0 +-46.59325239616255,-1.753839449290823,0 +-46.56828417187061,-1.771174019322439,0 +-46.55777605711654,-1.771523911122197,0 +-46.53685661706265,-1.775221529150006,0 +-46.51583406340967,-1.775921375995543,0 +-46.49926422213998,-1.774971934143059,0 +-46.48434332085466,-1.778470143905942,0 +-46.4634608178073,-1.783668051005177,0 +-46.446983225732,-1.785717509301639,0 +-46.42904420676539,-1.789317420988089,0 +-46.42011767484708,-1.792618068766893,0 +-46.38239802563026,-1.811817965547871,0 +-46.37190115163407,-1.812167965678169,0 +-46.35255232158865,-1.817313065398877,0 +-46.34215121768251,-1.820660130124937,0 +-46.32110136366101,-1.819861313854219,0 +-46.30885428837252,-1.81276763871908,0 +-46.29800908606621,-1.802626203669739,0 +-46.2855162519952,-1.788038165843848,0 +-46.26736325167062,-1.784139157251852,0 +-46.25075771224221,-1.781688593951217,0 +-46.238750733716,-1.782086261072273,0 +-46.22238472157629,-1.787130021754125,0 +-46.20737081481143,-1.787627431271115,0 +-46.19250086598029,-1.792622397772595,0 +-46.16861704302433,-1.797916582409074,0 +-46.15669741543449,-1.801313735372542,0 +-46.13731302436482,-1.806459846505935,0 +-46.10619416961833,-1.821004325212095,0 +-46.07807604406283,-1.83545190866286,0 +-46.06789283815591,-1.846302613296154,0 +-46.05935655680043,-1.861605475330935,0 +-46.04779918477512,-1.877014067505588,0 +-46.03924367586233,-1.892326235306948,0 +-46.03224151163737,-1.909090836448339,0 +-46.02660018625269,-1.92130377266528,0 +-46.01356124612084,-1.938281975796823,0 +-46.00031831670502,-1.949261865554124,0 +-45.99447257511386,-1.955478205465072,0 +-45.97720878502557,-1.98314914231911,0 +-45.97026798943968,-2.002949747072497,0 +-45.96776011660118,-2.019590821527221,0 +-45.95325982795998,-2.039669866116459,0 +-45.95037719227256,-2.04428835292276,0 +-45.91534639950959,-2.090038162427168,0 +-45.90234899550146,-2.10546077410793,0 +-45.88780343829233,-2.119432448320205,0 +-45.88075137977269,-2.133157911810739,0 +-45.87529589414068,-2.149829844961686,0 +-45.8698890943697,-2.167999876325835,0 +-45.87023270060569,-2.178484686822579,0 +-45.86642283448029,-2.199601922167212,0 +-45.86391562078089,-2.21467894059159,0 +-45.86280911795855,-2.226711224571122,0 +-45.85604969913922,-2.249425927773869,0 +-45.84769107048195,-2.269196479006798,0 +-45.83618453027752,-2.284574396913251,0 +-45.83067239723465,-2.299759589573147,0 +-45.82535360200613,-2.320943045151746,0 +-45.81998521195086,-2.340630839186594,0 +-45.81766455474541,-2.36172186445787,0 +-45.81229435124462,-2.381416176383411,0 +-45.80987517997975,-2.399514525590114,0 +-45.80745507705724,-2.417616707150008,0 +-45.80498608975341,-2.43422118939597,0 +-45.80106429416301,-2.452378930822365,0 +-45.79399315762586,-2.466140594592784,0 +-45.79147012590207,-2.481260712275047,0 +-45.78603945770541,-2.499489315241762,0 +-45.78492089404033,-2.51156004258668,0 +-45.78365859365994,-2.519123989427544,0 +-45.77865668358817,-2.550887608299691,0 +-45.77012329546715,-2.566221746441365,0 +-45.76444937012314,-2.576947317590657,0 +-45.75751088820774,-2.595243563327551,0 +-45.75483991232058,-2.60587189422422,0 +-45.75240727188802,-2.624022598354409,0 +-45.73600120947879,-2.668812164848743,0 +-45.73044218494216,-2.682507190363243,0 +-45.72057602255171,-2.702345381243299,0 +-45.71226241442081,-2.723635865666524,0 +-45.70560164271657,-2.749378091219179,0 +-45.70314782309161,-2.765974600017472,0 +-45.69929033331551,-2.785616354927971,0 +-45.69137434042468,-2.818896338034562,0 +-45.68566016779587,-2.828083585690243,0 +-45.67918724382544,-2.859809085830086,0 +-45.67421729908428,-2.891485283294746,0 +-45.6671979224816,-2.906718336699136,0 +-45.65882390233156,-2.926497612170155,0 +-45.65340707681719,-2.944680965911074,0 +-45.64954494697295,-2.964314399012184,0 +-45.64849003471431,-2.977853679461784,0 +-45.64908112194012,-2.995840512128522,0 +-45.64801395523791,-3.009380486933437,0 +-45.64738297818685,-3.036412611726557,0 +-45.64796461036339,-3.054401975791767,0 +-45.64874019934749,-3.078388633931729,0 +-45.64806068571129,-3.103925365422492,0 +-45.64859061537452,-3.120419267778175,0 +-45.64940725466129,-3.145912927113578,0 +-45.6500772109541,-3.166911281077211,0 +-45.65068296080231,-3.186423636188231,0 +-45.65119568058575,-3.202937038746601,0 +-45.65001722361125,-3.213498148727937,0 +-45.64304483507685,-3.253063959935302,0 +-45.64376619431894,-3.274559631727299,0 +-45.64426864184797,-3.289441523305478,0 +-45.64168342824782,-3.31104135479084,0 +-45.64041903517507,-3.322666598196521,0 +-45.63986247445864,-3.355768620218897,0 +-45.6421659025151,-3.375537747474405,0 +-45.6497689998911,-3.405060200716996,0 +-45.65556087495853,-3.429679683638764,0 +-45.65792814305564,-3.451098884450607,0 +-45.65852869960773,-3.469266458801078,0 +-45.65238959286844,-3.484343876519596,0 +-45.64111293405331,-3.494627711641774,0 +-45.61994043573969,-3.506885858819646,0 +-45.60207590148138,-3.519038891074783,0 +-45.58440659460238,-3.537803479655798,0 +-45.57668847252906,-3.556248797997205,0 +-45.57358015837046,-3.562966703773558,0 +-45.54798866496942,-3.593578976145106,0 +-45.53508320921235,-3.605582763039445,0 +-45.52061327601184,-3.620950764098803,0 +-45.50752764405515,-3.628003144281094,0 +-45.49132509150094,-3.641780868339371,0 +-45.47340460214545,-3.653962609852638,0 +-45.45194193334491,-3.659641613676448,0 +-45.43535784724499,-3.661847895177432,0 +-45.4172645992026,-3.669072665139838,0 +-45.40899519684363,-3.671003526658012,0 +-45.36119809769002,-3.698464386881348,0 +-45.33994014500123,-3.707428903800466,0 +-45.31697061638138,-3.714777902940804,0 +-45.29560236946119,-3.720417835415445,0 +-45.27749150719136,-3.724298290243734,0 +-45.26109041577877,-3.729782574257329,0 +-45.2433582522069,-3.745252342899931,0 +-45.22562683483755,-3.760720524303843,0 +-45.21430396140239,-3.769359281004482,0 +-45.19491719655428,-3.78487674884046,0 +-45.18386841642057,-3.801788790559687,0 +-45.18066485574308,-3.805202032725989,0 +-45.1669027768317,-3.840408203197112,0 +-45.16125815265688,-3.870382128847858,0 +-45.15533358335109,-3.892075439206599,0 +-45.14609451324822,-3.913869070367003,0 +-45.14310521244988,-3.923887847254938,0 +-45.13364909384635,-3.93906914679068,0 +-45.11799676299483,-3.967675596844697,0 +-45.10389048435381,-3.99292345032218,0 +-45.08287669595391,-4.010115933772058,0 +-45.0748563614241,-4.018635255690127,0 +-45.0540554827932,-4.042438578558755,0 +-45.03182874870211,-4.074550815994606,0 +-45.02400772013011,-4.089679414715262,0 +-45.00981187604535,-4.113279081864212,0 +-44.99025569263752,-4.125473553808019,0 +-44.97561769564562,-4.135860541904429,0 +-44.96269110068537,-4.147849414944538,0 +-44.94493226070448,-4.164957156856335,0 +-44.92405271081909,-4.18878715064289,0 +-44.90945145875497,-4.200837665886295,0 +-44.89629998238628,-4.206223542395174,0 +-44.86655496493724,-4.213796976901972,0 +-44.84491232174038,-4.214489807515189,0 +-44.8333608342269,-4.218170942482402,0 +-44.78960600249696,-4.22358508434986,0 +-44.77928981285847,-4.223913942059166,0 +-44.7643898065663,-4.224388720559721,0 +-44.75174735927354,-4.223647018571874,0 +-44.73792412017445,-4.221798524140086,0 +-44.72170926815858,-4.216570480271098,0 +-44.71358095881138,-4.213392823097109,0 +-44.70319653970033,-4.211431352802424,0 +-44.68600919418269,-4.211974521822965,0 +-44.67226009201905,-4.212408766193724,0 +-44.64705500684428,-4.213203175385321,0 +-44.61945051735077,-4.210629894164788,0 +-44.61017647641651,-4.207484104401716,0 +-44.59853812635729,-4.202121379886469,0 +-44.57887911139244,-4.197008359874073,0 +-44.5557454112177,-4.190857378821888,0 +-44.54174007054416,-4.1832755513625,0 +-44.5325004321591,-4.181272228921341,0 +-44.51531379546329,-4.181807190214692,0 +-44.50500188107934,-4.182127957399969,0 +-44.49014401330433,-4.183735436958325,0 +-44.47303210649204,-4.186558065192663,0 +-44.46189587440235,-4.197199368714428,0 +-44.45764146636953,-4.207633635297364,0 +-44.45220149209924,-4.216956237947703,0 +-44.44116908408955,-4.231021938358021,0 +-44.43461001708653,-4.241515985547793,0 +-44.42582798190392,-4.25436547630655,0 +-44.42149563110087,-4.262507661081253,0 +-44.41616770445142,-4.275259688222107,0 +-44.40862070239603,-4.290367183843824,0 +-44.40196268988921,-4.297436559725336,0 +-44.3929748915921,-4.30343284336852,0 +-44.38179476683912,-4.312925379600113,0 +-44.37300205552015,-4.325772979728957,0 +-44.36313154271249,-4.340942300611148,0 +-44.35534036454264,-4.34918601009404,0 +-44.34862516125103,-4.355109718153985,0 +-44.32480283416629,-4.366129772653142,0 +-44.31581797019788,-4.373268614676781,0 +-44.30327099933201,-4.377083490550605,0 +-44.29086637865501,-4.385472816243446,0 +-44.25254329312354,-4.4011507771324,0 +-44.21336483262461,-4.41753396799073,0 +-44.19101022652949,-4.427698383887473,0 +-44.15558129605494,-4.442039946898546,0 +-44.14096120894185,-4.457561237443798,0 +-44.12268818212713,-4.476959498050615,0 +-44.10601648918144,-4.48687954113047,0 +-44.08746093941691,-4.49685472168228,0 +-44.06519474396997,-4.508823815226785,0 +-44.04464040035106,-4.515092806906069,0 +-44.02049036049028,-4.527116732184854,0 +-44.00370465097678,-4.533270351865376,0 +-43.98886111849851,-4.541247065811179,0 +-43.96140588067094,-4.568422930295826,0 +-43.95221543891358,-4.576225482627183,0 +-43.92476059099991,-4.603391225324175,0 +-43.90614391664781,-4.611466692826196,0 +-43.89306612713013,-4.61561731205217,0 +-43.86325572451857,-4.627790790160639,0 +-43.84469586874395,-4.637748315604325,0 +-43.81311325778925,-4.653735603269294,0 +-43.8003242000939,-4.667283515557584,0 +-43.77639776459554,-4.686804133842215,0 +-43.75416691364049,-4.700621789162054,0 +-43.73009586906537,-4.716370436899078,0 +-43.71911711939426,-4.727975286222838,0 +-43.69113954312653,-4.740075710078348,0 +-43.67620328480489,-4.746154101078185,0 +-43.64437159231236,-4.756486356061128,0 +-43.62570308553367,-4.764555186474461,0 +-43.60502485654925,-4.768920376277281,0 +-43.57522592647837,-4.784839942686288,0 +-43.53044173133264,-4.806844505406582,0 +-43.51374995983942,-4.818624336050931,0 +-43.49137262817662,-4.830571819866802,0 +-43.47467165889307,-4.842355075947685,0 +-43.44274873630898,-4.852702762533306,0 +-43.4239100223737,-4.857020041428894,0 +-43.40516223130132,-4.865100538670722,0 +-43.38438262913798,-4.869474366107205,0 +-43.36728053143327,-4.869973593335451,0 +-43.3067402815384,-4.875581478783586,0 +-43.29543561043279,-4.875912543037932,0 +-43.26174512893899,-4.884413138547862,0 +-43.2188427974935,-4.90069638292649,0 +-43.19283915500528,-4.91460712623222,0 +-43.17065336106803,-4.930286177428418,0 +-43.1539535583479,-4.940169263196361,0 +-43.12965181968013,-4.948395556047341,0 +-43.09614152463563,-4.964406696005548,0 +-43.07191752421247,-4.974504553822398,0 +-43.06087151666377,-4.98422335675895,0 +-43.02349756962421,-5.000365255406653,0 +-42.99166704406753,-5.012588431362698,0 +-42.96916235576327,-5.020780684079146,0 +-42.94664124958717,-5.028977375028806,0 +-42.92974388775152,-5.035126638837314,0 +-42.90552835254601,-5.050905176434083,0 +-42.88509886396662,-5.066574783799122,0 +-42.86628895970831,-5.072786987421519,0 +-42.84378547064293,-5.082877064602135,0 +-42.82490640649291,-5.087211567363968,0 +-42.80401123955123,-5.087840756474952,0 diff --git a/R-utils/roads/br317.csv b/R-utils/roads/br317.csv new file mode 100644 index 000000000..efb421de4 --- /dev/null +++ b/R-utils/roads/br317.csv @@ -0,0 +1,1347 @@ +-67.37941945355726,-8.746450917897485,0 +-67.37769241073147,-8.750645529635275,0 +-67.37378601054775,-8.753384852076811,0 +-67.36890631836195,-8.754160297115089,0 +-67.36433975348108,-8.753693304998013,0 +-67.35942589030472,-8.754067693071187,0 +-67.35580145570255,-8.755160769603101,0 +-67.3506017962676,-8.757188945315255,0 +-67.34464701310613,-8.76008825397723,0 +-67.34029984031267,-8.762456479288067,0 +-67.33510304207648,-8.764483109585639,0 +-67.3319852855029,-8.76675599118326,0 +-67.32776555546711,-8.770739600862917,0 +-67.32266563191502,-8.773974686925733,0 +-67.32137415682705,-8.778544160504703,0 +-67.3209008574391,-8.783052540874557,0 +-67.32039573379518,-8.787158865567902,0 +-67.31951254344801,-8.791701572170536,0 +-67.31784247130723,-8.796709855717603,0 +-67.31733724514564,-8.800816379382677,0 +-67.31692600937598,-8.806135637383468,0 +-67.31569659398032,-8.811516198935134,0 +-67.31468848107335,-8.814439345562398,0 +-67.31147660050266,-8.820782035945836,0 +-67.30971328947078,-8.824574736618832,0 +-67.30496013145472,-8.832251678910097,0 +-67.30316559107034,-8.835639540237954,0 +-67.3010245211632,-8.839866772517766,0 +-67.29740377405481,-8.846238533046465,0 +-67.29463118216461,-8.852954317917135,0 +-67.2929912346325,-8.858366019917723,0 +-67.29097300279224,-8.864214009752729,0 +-67.28920767617461,-8.868009390920616,0 +-67.2849242719504,-8.871182340890732,0 +-67.28180586052947,-8.873453369467624,0 +-67.27560138115892,-8.878397402329762,0 +-67.27172830010608,-8.881536509122757,0 +-67.26738365867098,-8.883897456136184,0 +-67.26382615945825,-8.885792291351059,0 +-67.25759181112664,-8.89032910338212,0 +-67.25507070314701,-8.894993373301547,0 +-67.25431042464538,-8.901152934101606,0 +-67.25361233664076,-8.908121895795515,0 +-67.25171771279655,-8.915588093085743,0 +-67.25048565444683,-8.920970355966805,0 +-67.25004108984861,-8.9258863829579,0 +-67.25041497905833,-8.930741166403942,0 +-67.25075772257722,-8.935191562616323,0 +-67.24861377007174,-8.939421737410228,0 +-67.24584244346082,-8.940850429464104,0 +-67.2407713215789,-8.944486213442071,0 +-67.23768414357394,-8.94715928862176,0 +-67.22968304613107,-8.957741064226433,0 +-67.22804542939573,-8.963150549371711,0 +-67.2262832485888,-8.966943315842514,0 +-67.22417568306032,-8.971575214535999,0 +-67.22134505367097,-8.977480569047859,0 +-67.2180747055226,-8.983011570256581,0 +-67.21596876739699,-8.987641016017676,0 +-67.21345439555212,-8.992300460008348,0 +-67.21248066630184,-8.995624171394018,0 +-67.21194732914,-8.999320519301698,0 +-67.21141405043886,-9.003016389790391,0 +-67.21075457780137,-9.010376347680664,0 +-67.21027958327208,-9.01487975455732,0 +-67.21021329123995,-9.01935246407205,0 +-67.21099559030614,-9.024167598313447,0 +-67.21203100496686,-9.026932947234538,0 +-67.2129042884346,-9.032961455912762,0 +-67.21330579793994,-9.038214243046067,0 +-67.21522031505978,-9.041727410194705,0 +-67.21864784474704,-9.043500385536525,0 +-67.22336463741588,-9.045988711732834,0 +-67.2255959560437,-9.048258753571996,0 +-67.22886341902729,-9.0532950553986,0 +-67.23084732784855,-9.057607451203252,0 +-67.23245343897594,-9.062352939671047,0 +-67.235003284999,-9.06864745696017,0 +-67.23547529764453,-9.069422510783548,0 +-67.23968713847557,-9.076004025435775,0 +-67.24251522754693,-9.080661775190443,0 +-67.24537109805469,-9.085735333285813,0 +-67.24643517672529,-9.088917394343854,0 +-67.25051239634929,-9.099121879395133,0 +-67.24714482649949,-9.10343820332789,0 +-67.24789753374425,-9.107849482003774,0 +-67.25270817343103,-9.111548347999953,0 +-67.25616724417807,-9.113724520774657,0 +-67.26050695040925,-9.1166467289169,0 +-67.26437566856397,-9.118792053275651,0 +-67.26906244801653,-9.120875615871672,0 +-67.27330900887334,-9.122586156762337,0 +-67.27805850453758,-9.125477290470254,0 +-67.28161227451206,-9.128864935688652,0 +-67.28349871138616,-9.131972284314699,0 +-67.28513248910438,-9.137129504707469,0 +-67.2858230505361,-9.140732955356023,0 +-67.28799062485115,-9.147472831660432,0 +-67.28868114937166,-9.151075929919442,0 +-67.28902532990938,-9.155517913371835,0 +-67.2893695166081,-9.159959894041148,0 +-67.28810887570704,-9.164929377904766,0 +-67.28480298914565,-9.170053481613662,0 +-67.28344837291984,-9.173811542517639,0 +-67.28303697569534,-9.179123053703616,0 +-67.28350630570218,-9.185180919513813,0 +-67.28416587442602,-9.188383578487207,0 +-67.28429108176711,-9.189999479231345,0 +-67.28545361721501,-9.194381867676931,0 +-67.28771633085371,-9.202339253253616,0 +-67.29083110926969,-9.205357117293781,0 +-67.29306504600827,-9.207628283729481,0 +-67.29459164181226,-9.216722684955501,0 +-67.29345595428985,-9.223309335638591,0 +-67.29184866345572,-9.229119031743448,0 +-67.29005372107649,-9.232506615335469,0 +-67.28794397901368,-9.237136502011545,0 +-67.28731388343483,-9.239622044573922,0 +-67.28422861086348,-9.247573567437495,0 +-67.28454188477407,-9.251610908520965,0 +-67.28564150178742,-9.255182126477946,0 +-67.2885640982996,-9.261050766238558,0 +-67.29070208417079,-9.262106986168151,0 +-67.29551231912852,-9.265802320062781,0 +-67.29708295371876,-9.270148416431587,0 +-67.29698663849557,-9.274214107410899,0 +-67.2947834615491,-9.277626299038047,0 +-67.29336700512449,-9.280572925361,0 +-67.29345836042573,-9.287056252229863,0 +-67.29534337847409,-9.290159266077589,0 +-67.29886346835598,-9.293139461952652,0 +-67.304867954233,-9.296338963222652,0 +-67.3071929847909,-9.299814340223929,0 +-67.30832246900842,-9.303784449061178,0 +-67.31178055740483,-9.305958380154573,0 +-67.31489216767011,-9.308969129728515,0 +-67.31227893679325,-9.312407293317674,0 +-67.30998252658267,-9.314607682209582,0 +-67.30680729739586,-9.316066031629752,0 +-67.30536109833878,-9.318612719945691,0 +-67.30221644090582,-9.32575870620297,0 +-67.2982538804885,-9.327685895238298,0 +-67.29432197031134,-9.330017394026202,0 +-67.28947762826697,-9.331198075602334,0 +-67.285388214501,-9.331508546940256,0 +-67.28051180394787,-9.332285140319797,0 +-67.27739549592792,-9.334554754963788,0 +-67.27632411154811,-9.336668864191108,0 +-67.27459010802538,-9.340866529310857,0 +-67.27298368436257,-9.352104305272006,0 +-67.27370608641681,-9.356112138429015,0 +-67.27641186688408,-9.359157579956094,0 +-67.27952669429857,-9.362171472061563,0 +-67.28195093180183,-9.366871848962532,0 +-67.27971307409119,-9.369877204883295,0 +-67.27763449168749,-9.374910857146315,0 +-67.27791655195961,-9.37854573614865,0 +-67.27838668365789,-9.384603577061929,0 +-67.27995873673559,-9.388952519760833,0 +-67.28244627887798,-9.394458861720343,0 +-67.28370484200271,-9.400053530464783,0 +-67.2840185833352,-9.404091519938966,0 +-67.28398521123144,-9.408965987848642,0 +-67.28341682966966,-9.412255495566836,0 +-67.28297382362139,-9.41716002197334,0 +-67.28322466453173,-9.420389575285538,0 +-67.28401049950777,-9.425203438108408,0 +-67.28592967876791,-9.428713562601176,0 +-67.29030008080537,-9.432034149621082,0 +-67.29303529983532,-9.435479533274977,0 +-67.29498409593614,-9.439391168157647,0 +-67.29573696213983,-9.44380005871154,0 +-67.2939721555789,-9.447587801388199,0 +-67.2922077657884,-9.451375777325316,0 +-67.28820789808096,-9.458174573666614,0 +-67.28490130132846,-9.463296207360168,0 +-67.28238161331126,-9.467952207921764,0 +-67.28115177238028,-9.473323027207641,0 +-67.28080262982802,-9.479439711661227,0 +-67.28076875387394,-9.484314700884253,0 +-67.28098764421814,-9.487140597111134,0 +-67.28060733211481,-9.492853520243926,0 +-67.28010287626189,-9.496949902132659,0 +-67.28044822644516,-9.501387827717872,0 +-67.28076201180743,-9.505422293172469,0 +-67.28098165688026,-9.508246265651255,0 +-67.28261660742199,-9.513399388057826,0 +-67.28620275617682,-9.517190610733156,0 +-67.28972651731672,-9.520175272593352,0 +-67.29082701696662,-9.523745192351697,0 +-67.29208428748019,-9.529331782158049,0 +-67.29368797616034,-9.534081206943466,0 +-67.29705390246218,-9.545587162559544,0 +-67.29906515481565,-9.550300396640321,0 +-67.30057377515212,-9.55383569991667,0 +-67.30167320002819,-9.557401629970579,0 +-67.30371637219783,-9.562519325576526,0 +-67.30695687188606,-9.567143322949793,0 +-67.31019780041089,-9.571768153650069,0 +-67.31217959615385,-9.576082156331303,0 +-67.31476119528234,-9.577512588387009,0 +-67.31794010764666,-9.581333186153511,0 +-67.32165373299721,-9.586739643856051,0 +-67.32401380511372,-9.590622851246119,0 +-67.32558670561794,-9.594969550869921,0 +-67.32851315141767,-9.600837727441458,0 +-67.33099903755689,-9.606333293133689,0 +-67.33335953904026,-9.610214583612839,0 +-67.33531073155777,-9.614126821268329,0 +-67.33770278651947,-9.618411764416681,0 +-67.33836323851465,-9.621609650830859,0 +-67.33669216038909,-9.626608344469652,0 +-67.33247058888981,-9.630581728858095,0 +-67.32938412890687,-9.633250425395842,0 +-67.32727310749843,-9.637875248199547,0 +-67.32516196893685,-9.642500234525766,0 +-67.32519152212711,-9.648181357701448,0 +-67.32509568762538,-9.652248035818674,0 +-67.32578718412765,-9.655849051967941,0 +-67.32654137313565,-9.660256988540175,0 +-67.32735823449819,-9.665471717652583,0 +-67.33157506982876,-9.672052137800861,0 +-67.33311667987431,-9.675994418700681,0 +-67.33569653702884,-9.682699251347305,0 +-67.33597905136159,-9.686331415404629,0 +-67.33594647661117,-9.691205655650831,0 +-67.33374183898796,-9.694621987217614,0 +-67.33241842546283,-9.698783353689851,0 +-67.33197635678169,-9.703689677506663,0 +-67.33235300542073,-9.708533565804728,0 +-67.3326982559084,-9.712973650382381,0 +-67.33392483352316,-9.718157236207587,0 +-67.33546665980242,-9.722098548611385,0 +-67.33603288596396,-9.724084865276762,0 +-67.33833651341705,-9.732538307069328,0 +-67.34283765535504,-9.737483269852675,0 +-67.34567083539602,-9.742137938931664,0 +-67.34992103169652,-9.749120260940419,0 +-67.35445531429062,-9.75445854765686,0 +-67.35646893927166,-9.759179081995256,0 +-67.35917552814202,-9.762223641811346,0 +-67.36115684673257,-9.766540933056225,0 +-67.36153177250448,-9.771385095379786,0 +-67.36351278150011,-9.77570122632916,0 +-67.36577803771544,-9.778371609986879,0 +-67.36970861494974,-9.781323966683043,0 +-67.37247215261152,-9.785175731211684,0 +-67.37798421095015,-9.787190972465094,0 +-67.38103986661956,-9.789392975042489,0 +-67.3858603359328,-9.793084129840521,0 +-67.39304515847668,-9.795379313253182,0 +-67.39862406767517,-9.79820251315761,0 +-67.40127212596396,-9.800436649241837,0 +-67.40486619444594,-9.804222701797967,0 +-67.40587523483003,-9.806581419631106,0 +-67.4078934550592,-9.811299102339543,0 +-67.41136269473199,-9.818748815721134,0 +-67.41331823120672,-9.822660269778103,0 +-67.41845977404704,-9.830391143466363,0 +-67.42281288426062,-9.83331069819555,0 +-67.42965339212749,-9.836447224455128,0 +-67.4357687468393,-9.840856461719904,0 +-67.43731268765154,-9.844799332684124,0 +-67.43825864915232,-9.851629791279487,0 +-67.43892086254064,-9.854827774397673,0 +-67.43917312729261,-9.858056683673436,0 +-67.4399615287761,-9.862869184300525,0 +-67.44138066483046,-9.870476175004901,0 +-67.44132483475687,-9.87495115347166,0 +-67.43988831785117,-9.877505410966954,0 +-67.43848773762635,-9.886612709762954,0 +-67.43996865632417,-9.889746665621061,0 +-67.44176547178242,-9.891638299526248,0 +-67.44529960236805,-9.899890019394578,0 +-67.44542653746045,-9.901503739959194,0 +-67.44571511055051,-9.910412363445499,0 +-67.44596907906669,-9.913641433022111,0 +-67.44801608263771,-9.918764793396866,0 +-67.45144633606957,-9.920533622590504,0 +-67.45607030663948,-9.921804632767646,0 +-67.4609851488905,-9.921431777619592,0 +-67.46744345849511,-9.919724153533508,0 +-67.47453225555016,-9.920809526148679,0 +-67.47759833019886,-9.92301382654845,0 +-67.48167322226912,-9.927577929865251,0 +-67.4826430404523,-9.929531978360332,0 +-67.48647815885688,-9.9365433656767,0 +-67.48723955242009,-9.940952087166632,0 +-67.48919324915195,-9.944862255652115,0 +-67.49189864331103,-9.947901168590661,0 +-67.49458126893089,-9.950540519659185,0 +-67.49610238646389,-9.954082511014485,0 +-67.4971166778647,-9.956444328268677,0 +-67.49955376956164,-9.966413892304951,0 +-67.49907271492286,-9.970909130248529,0 +-67.49564303668829,-9.974421712510248,0 +-67.4914534497109,-9.978801513447259,0 +-67.49044554187461,-9.981720253931231,0 +-67.49000483471364,-9.986625255007773,0 +-67.49035169747378,-9.991063919337327,0 +-67.49230519559259,-9.994973371885505,0 +-67.49463663280378,-9.998447722823467,0 +-67.49968640320435,-10.01034448465974,0 +-67.50050526046381,-10.01555245409329,0 +-67.50081503180452,-10.01957067209503,0 +-67.50355936708019,-10.023018067836,0 +-67.50740649993377,-10.02475726899115,0 +-67.51232463114015,-10.02438478931271,0 +-67.51635953351406,-10.02326703835666,0 +-67.52291604714638,-10.02277033211682,0 +-67.52846388795393,-10.02519203331217,0 +-67.53237236291852,-10.02773762482285,0 +-67.53640679955278,-10.03189707624063,0 +-67.53959001543484,-10.03571464775809,0 +-67.54371836357623,-10.04108337836685,0 +-67.54778307787741,-10.04564444631384,0 +-67.55361149264762,-10.05169365238038,0 +-67.55628909810218,-10.05433004552271,0 +-67.55893500372252,-10.05656287436801,0 +-67.56340743379586,-10.06109033805624,0 +-67.56605285790886,-10.06332259588078,0 +-67.57213031653603,-10.06732085434448,0 +-67.57524744984987,-10.07032758769309,0 +-67.58059948709413,-10.07559639924357,0 +-67.58516457508422,-10.07605880959303,0 +-67.59162107576789,-10.07962150444365,0 +-67.59512582519454,-10.08219604283807,0 +-67.59671200126402,-10.08654052809364,0 +-67.60085532577486,-10.09190999036082,0 +-67.60537348934014,-10.09684450179409,0 +-67.61439641428464,-10.10213425935972,0 +-67.6222752497363,-10.10153551676759,0 +-67.63091182665518,-10.10217873599517,0 +-67.64075942182545,-10.10143054186075,0 +-67.64798047071736,-10.10088182545444,0 +-67.65272821619273,-10.10247052540423,0 +-67.6613632952474,-10.10311362861892,0 +-67.6681818636013,-10.10584413172463,0 +-67.67494950962809,-10.10792782208005,0 +-67.67843498845558,-10.11026260559816,0 +-67.68273004727261,-10.11448523248949,0 +-67.68930125966381,-10.12243224774336,0 +-67.69299222016488,-10.12734934321027,0 +-67.69845888882483,-10.13797795256861,0 +-67.70422152883961,-10.14403866956935,0 +-67.71103717231517,-10.14677144253898,0 +-67.7154295839961,-10.15228976603917,0 +-67.71988021400404,-10.15844880780047,0 +-67.72004214222996,-10.16883708841389,0 +-67.71469526490159,-10.17639740745143,0 +-67.71126702280807,-10.1831605981571,0 +-67.70920363606842,-10.19046928798638,0 +-67.70790098991516,-10.19902079696137,0 +-67.70841548271285,-10.20548396890328,0 +-67.70777104030282,-10.21398809321788,0 +-67.70702354881257,-10.22120063563242,0 +-67.70637497863883,-10.22970484246791,0 +-67.70628193653322,-10.2368671716741,0 +-67.70558254814524,-10.24472611392086,0 +-67.70543399195985,-10.25123762563918,0 +-67.70392046607803,-10.25720238672691,0 +-67.70311495091346,-10.26376253222011,0 +-67.70104636061804,-10.27106769724471,0 +-67.69771490052489,-10.27911744313441,0 +-67.69428922536555,-10.28589254194666,0 +-67.69344146910683,-10.29182747496707,0 +-67.6925933884725,-10.29776452765808,0 +-67.69073005652996,-10.30766039115941,0 +-67.69028067154835,-10.31873899843227,0 +-67.69043336512618,-10.32067644505505,0 +-67.69120168114277,-10.33877110136802,0 +-67.69691902616621,-10.34418122010985,0 +-67.7019285081203,-10.34899748308416,0 +-67.7053681872372,-10.35068321153986,0 +-67.71265609567115,-10.35923026979992,0 +-67.71564279326796,-10.3635547736944,0 +-67.71625512773907,-10.3713169845853,0 +-67.71752330417199,-10.3790311479564,0 +-67.7201041063675,-10.38664769349885,0 +-67.72298753611348,-10.39814778012814,0 +-67.72278773872242,-10.40401958859461,0 +-67.72269132564276,-10.41118101493138,0 +-67.72112743958327,-10.41650417194564,0 +-67.72143379505042,-10.420381541809,0 +-67.71517811716319,-10.43321134677364,0 +-67.7100757689746,-10.43555148535557,0 +-67.70401673681073,-10.44251529616755,0 +-67.6999283968516,-10.44932840111513,0 +-67.69346715140416,-10.45957288472259,0 +-67.68872163760652,-10.46643555006765,0 +-67.68539198831324,-10.47449050606277,0 +-67.68130281919245,-10.48130338511086,0 +-67.6785277593731,-10.48801573210959,0 +-67.6771179333299,-10.49527371118638,0 +-67.67307915235718,-10.50273325966189,0 +-67.67090981914156,-10.50874931078998,0 +-67.67066092212157,-10.51396876802929,0 +-67.67117127094694,-10.52043047674103,0 +-67.67208993031113,-10.53206162099319,0 +-67.67249826648275,-10.53723109438274,0 +-67.67766059421206,-10.54398799599309,0 +-67.68216602554565,-10.55079736949536,0 +-67.69000998754058,-10.55800357671201,0 +-67.6977016551208,-10.56327074174973,0 +-67.70342191397729,-10.568688664789,0 +-67.70995409146319,-10.57599671364924,0 +-67.7150695539729,-10.58211231560301,0 +-67.7206893390177,-10.58623796682479,0 +-67.72873568661359,-10.58757791775849,0 +-67.73728661505712,-10.58692791482002,0 +-67.74467731407881,-10.58831885363607,0 +-67.75191388840381,-10.58776845157436,0 +-67.7565709045877,-10.58806519270207,0 +-67.76346084672545,-10.59144739554995,0 +-67.77238019327348,-10.5953297029246,0 +-67.77593100887334,-10.59831683961468,0 +-67.78393530534984,-10.59901316314268,0 +-67.78986131577201,-10.59856421862603,0 +-67.79902844399777,-10.59721813781016,0 +-67.81083130261375,-10.59567181351343,0 +-67.81675556075245,-10.59521887562957,0 +-67.82383637833786,-10.59272014789625,0 +-67.82965349375941,-10.5909701376015,0 +-67.83433606114072,-10.58344097862694,0 +-67.84486416212685,-10.58263284227646,0 +-67.85110497771139,-10.58606437907064,0 +-67.85810498149829,-10.59073754641116,0 +-67.85876246197155,-10.59068662058048,0 +-67.870125044701,-10.59104030797461,0 +-67.87887845510299,-10.59296141682847,0 +-67.88687008607384,-10.59363861651031,0 +-67.8955179378019,-10.59426401221429,0 +-67.90548064675885,-10.59479049604672,0 +-67.91139624742422,-10.59433140099958,0 +-67.91933521113906,-10.59436606865128,0 +-67.92409172337688,-10.59594958493631,0 +-67.935316061633,-10.5957285700804,0 +-67.94168206857709,-10.59263465405211,0 +-67.94689443113776,-10.59158906798108,0 +-67.95858490416323,-10.58875052236525,0 +-67.96643234870609,-10.58750463903619,0 +-67.97378008035655,-10.5882497937905,0 +-67.98149696820316,-10.59352549060609,0 +-67.98773721365995,-10.59695668478126,0 +-67.99311033753088,-10.59784983835271,0 +-68.00198728376058,-10.60108104182973,0 +-68.00725716245995,-10.60067979974486,0 +-68.01571658413525,-10.59873297944511,0 +-68.0232273906018,-10.60141737146365,0 +-68.03129330378464,-10.60275694328231,0 +-68.03864862020036,-10.60349924878067,0 +-68.04682259724513,-10.60613378880253,0 +-68.05317864736136,-10.61086208261638,0 +-68.06080199728571,-10.61484294104538,0 +-68.07875858121785,-10.62885566000596,0 +-68.084223737668,-10.63103963637615,0 +-68.09400539676271,-10.63741476488617,0 +-68.09755795461059,-10.64037911166985,0 +-68.10729399930564,-10.64611103449568,0 +-68.11559368798905,-10.65068205989046,0 +-68.12288868085299,-10.65922993489948,0 +-68.12582674203415,-10.66290696777685,0 +-68.13159913426246,-10.66896641649932,0 +-68.1341875851179,-10.67657204108035,0 +-68.13668153458583,-10.68287827076379,0 +-68.14054715241971,-10.68972631819973,0 +-68.14425515716144,-10.69463776641354,0 +-68.14567531589162,-10.69582734894172,0 +-68.15125048729162,-10.69929406223638,0 +-68.16492302830389,-10.70473173256593,0 +-68.18418582760289,-10.70583368808271,0 +-68.19053970635986,-10.70273946375793,0 +-68.19905283402116,-10.70142348663055,0 +-68.20697727013822,-10.70014559330298,0 +-68.21643856611087,-10.69420170106486,0 +-68.21931616389783,-10.68877156433813,0 +-68.2256416871333,-10.68502345028369,0 +-68.22999206628236,-10.68142947836204,0 +-68.23560795143615,-10.67708531302444,0 +-68.24046192484839,-10.67149875939414,0 +-68.25540584069036,-10.66384517105213,0 +-68.26698780207408,-10.65969031201872,0 +-68.27467359192697,-10.65648971969548,0 +-68.28175330004009,-10.65398686921942,0 +-68.29233107823376,-10.65381262842085,0 +-68.30092931156052,-10.65378743363407,0 +-68.30432142567687,-10.65482186917281,0 +-68.3191540546848,-10.65821060544299,0 +-68.32396711457773,-10.66043482532125,0 +-68.33177808182441,-10.66697666588154,0 +-68.33801163329032,-10.67039008688928,0 +-68.34440283183629,-10.67574221493553,0 +-68.35134687869886,-10.67975005326868,0 +-68.3595538600182,-10.68300819749585,0 +-68.36502529331644,-10.68518019353278,0 +-68.37449544317623,-10.68768841482008,0 +-68.37875686989985,-10.69125602466525,0 +-68.38514867028142,-10.69660751299583,0 +-68.39548599227983,-10.70164850939534,0 +-68.40550737919119,-10.70281164916666,0 +-68.41366089314789,-10.70542194887707,0 +-68.4172641926565,-10.7090403109665,0 +-68.42518093074828,-10.71687102169342,0 +-68.42904765580117,-10.72371969887147,0 +-68.43438918665441,-10.73240350039335,0 +-68.43944331955652,-10.74566262713024,0 +-68.44052344545095,-10.75078053110425,0 +-68.44186777768964,-10.75912974068619,0 +-68.44458030408322,-10.76802165455347,0 +-68.44613635584861,-10.77895656444804,0 +-68.44924263834838,-10.78456546481503,0 +-68.45266635229616,-10.79405234334454,0 +-68.45429897483523,-10.79782635343056,0 +-68.4604032829584,-10.80774825908838,0 +-68.46548433550643,-10.81320214818099,0 +-68.46925230137215,-10.81876228282274,0 +-68.47881665926388,-10.83037458966006,0 +-68.48334962752052,-10.83717641014139,0 +-68.48596022249619,-10.8447787863624,0 +-68.48835935396278,-10.84979595042344,0 +-68.49447557580601,-10.85972826092067,0 +-68.49524016969046,-10.86096985528104,0 +-68.50904060016195,-10.86730526668805,0 +-68.51730398794682,-10.87120463773243,0 +-68.52464458264649,-10.87192473830977,0 +-68.5334597599267,-10.87447919166951,0 +-68.53553888708615,-10.87561541843935,0 +-68.54730299551898,-10.88183821910646,0 +-68.5530415446848,-10.88723680598033,0 +-68.55806937613551,-10.89204009415995,0 +-68.56254544731709,-10.89818721899409,0 +-68.57078790889059,-10.90988577331574,0 +-68.57663375018588,-10.91657365724858,0 +-68.57913740317241,-10.92287654244538,0 +-68.58153479457941,-10.92788776476214,0 +-68.58556582750138,-10.9366701526149,0 +-68.58938531024478,-10.94286863020016,0 +-68.59396889276474,-10.95030670470321,0 +-68.5996048071276,-10.95441161809471,0 +-68.60595250096648,-10.95911063535221,0 +-68.61432917317612,-10.96429996351823,0 +-68.62244307459717,-10.96626027676934,0 +-68.62945130967907,-10.97090789189122,0 +-68.63448485029269,-10.97571175133135,0 +-68.64104813295906,-10.98299586328741,0 +-68.64503022804679,-10.99113380330053,0 +-68.64890617013378,-10.99797956419433,0 +-68.65394056630412,-11.00278354367705,0 +-68.65876321972652,-11.0050037932344,0 +-68.66885517355584,-11.00680784984938,0 +-68.67286021772401,-11.0071416867572,0 +-68.68614078923757,-11.00739268175823,0 +-68.69497075987394,-11.00994624764332,0 +-68.70116617845227,-11.01270814525399,0 +-68.70796775415072,-11.01477179333251,0 +-68.71608775844719,-11.01673119781116,0 +-68.72344307751857,-11.01745026898207,0 +-68.73013994700337,-11.0182213475248,0 +-68.73519563728706,-11.01521745096908,0 +-68.74211972295342,-11.00358186300486,0 +-68.74542998876389,-10.99551239349261,0 +-68.7489541630362,-10.99002713121977,0 +-68.75242662769976,-10.98389459227573,0 +-68.75574278070184,-10.97582163565197,0 +-68.75652996553954,-10.96925371365223,0 +-68.76192628646824,-10.96231738202114,0 +-68.76748036209831,-10.95732045030747,0 +-68.7709523723272,-10.95119059371084,0 +-68.77666359429998,-10.94813295512029,0 +-68.78390103059974,-10.94755428506322,0 +-68.78719000301889,-10.94729146811586,0 +-68.79837182460489,-10.94639768367399,0 +-68.80494888355901,-10.94587179767178,0 +-68.80923187099602,-10.94162976894224,0 +-68.81401170247288,-10.93539851415012,0 +-68.81955539662309,-10.93040620663465,0 +-68.82504479967707,-10.92476871164045,0 +-68.8313366193037,-10.92881454494644,0 +-68.83642082418228,-10.93425663007776,0 +-68.84298106980148,-10.94153037613791,0 +-68.85005295266178,-10.9390148463283,0 +-68.85532703808465,-10.93079426499653,0 +-68.86310930549952,-10.92887149433678,0 +-68.86913368154022,-10.92968876214488,0 +-68.87729156142416,-10.93228455295947,0 +-68.88544965066157,-10.93488015743663,0 +-68.89371545160611,-10.93876670686297,0 +-68.90034385992331,-10.93888506374715,0 +-68.90634528369846,-10.9396934593166,0 +-68.9124711815342,-10.94179875557313,0 +-68.92002955429612,-10.94509272734882,0 +-68.93022338165807,-10.94817760642328,0 +-68.93816995914982,-10.94819103028953,0 +-68.94310676962978,-10.95169822885997,0 +-68.95175473941114,-10.95230043132438,0 +-68.95591877788453,-10.94676491186684,0 +-68.96071003072582,-10.9405366136475,0 +-68.96521695457723,-10.93887773912124,0 +-68.97459575260905,-10.940076248547,0 +-68.98039563516117,-10.94610954082642,0 +-68.9856529636357,-10.94568563911304,0 +-68.99315982122815,-10.94053011529579,0 +-69.00078317628065,-10.93666737619689,0 +-69.00527745123817,-10.9350054891024,0 +-69.01311027566838,-10.93372406080857,0 +-69.02033583052426,-10.9331407505314,0 +-69.02747438446703,-10.93190933745828,0 +-69.03494165423393,-10.92611068720452,0 +-69.03753122872548,-10.91745483708971,0 +-69.03770340740439,-10.91159264418435,0 +-69.03782150092488,-10.90508495463386,0 +-69.03855459260097,-10.89787752473301,0 +-69.04656173471766,-10.88748230683671,0 +-69.05363591575409,-10.88496211970286,0 +-69.05917580732549,-10.87996579084461,0 +-69.06120952583402,-10.87265244039829,0 +-69.06379400941469,-10.86399497227684,0 +-69.06922781153857,-10.85770800012018,0 +-69.07542771557851,-10.85265939325016,0 +-69.08316092206266,-10.85008740747193,0 +-69.08447762278385,-10.8499816844433,0 +-69.09122362055351,-10.8513894126566,0 +-69.10602895466951,-10.85409797479034,0 +-69.10992270561827,-10.85313504836035,0 +-69.11595862235964,-10.8461526307629,0 +-69.12380396929264,-10.83707637158833,0 +-69.12737003784062,-10.83224240431939,0 +-69.13619684940021,-10.82698633937642,0 +-69.14639114286712,-10.82227053836087,0 +-69.15241648097516,-10.82308579657278,0 +-69.1658281383876,-10.82525097033407,0 +-69.17507804731905,-10.82515241940652,0 +-69.18033237339706,-10.82472739721397,0 +-69.18673610176357,-10.82226007664536,0 +-69.19461447650184,-10.8216194375526,0 +-69.20380624231775,-10.82087173510739,0 +-69.21562469643858,-10.81990999760536,0 +-69.22935923327312,-10.81814228151342,0 +-69.23652790077772,-10.81690893402737,0 +-69.2463234233894,-10.81546129327509,0 +-69.25617370843585,-10.81465832322388,0 +-69.26213817079261,-10.81482326643732,0 +-69.27072866760598,-10.81477543391662,0 +-69.29666042974188,-10.81656551394333,0 +-69.30787573188842,-10.81630158049543,0 +-69.31427773498775,-10.81383185518483,0 +-69.32145094976669,-10.81259226049262,0 +-69.32867840199749,-10.81199854318639,0 +-69.33262100608904,-10.81167460999114,0 +-69.34718646025122,-10.8117778408108,0 +-69.36037112683078,-10.81135289055982,0 +-69.3668817288345,-10.81017222390632,0 +-69.37519993685605,-10.80689419885763,0 +-69.38149242071086,-10.80313259694772,0 +-69.38863676879465,-10.8012333435514,0 +-69.40254978249064,-10.80138893526592,0 +-69.40813597527222,-10.80482851966979,0 +-69.41585903782197,-10.81004167028342,0 +-69.41793936059311,-10.8111707278576,0 +-69.43123255905866,-10.81726008289412,0 +-69.43927285079332,-10.82633800978357,0 +-69.44485236075293,-10.82977480005228,0 +-69.45054211119351,-10.83450170505638,0 +-69.45940606210064,-10.83766900603053,0 +-69.46569991657269,-10.8416980532277,0 +-69.4706810210092,-10.84583535964676,0 +-69.47265269373908,-10.85346765113419,0 +-69.47719748315713,-10.86024002738193,0 +-69.48354902547975,-10.86491570195196,0 +-69.48913464432982,-10.8683553340059,0 +-69.49614512345686,-10.87297786225167,0 +-69.50047295922101,-10.87717123873705,0 +-69.50836253462883,-10.88432192738629,0 +-69.51329336853213,-10.88781637675165,0 +-69.52195307320315,-10.89620528474126,0 +-69.53049945563691,-10.90330055577229,0 +-69.53898901952493,-10.90974853192466,0 +-69.54605404513281,-10.91501356102145,0 +-69.5554694130569,-10.91683345816843,0 +-69.5635149261801,-10.91811635608492,0 +-69.57030163813789,-10.92015304431658,0 +-69.57659717304621,-10.92417956479026,0 +-69.57977616418206,-10.93041401383696,0 +-69.58038465822079,-10.93751193677065,0 +-69.57754462463367,-10.94294734265346,0 +-69.57547147558314,-10.94961926566567,0 +-69.57733590303688,-10.95596174378447,0 +-69.57530733854718,-10.96326876814983,0 +-69.57360844133134,-10.96665349742462,0 +-69.56697898825965,-10.97433594494537,0 +-69.56007692846894,-10.97879483477041,0 +-69.555311209639,-10.98502478140853,0 +-69.55389215438997,-10.99163906674507,0 +-69.5537887272518,-10.99814840177027,0 +-69.55396223815264,-11.00788644833176,0 +-69.55446075157542,-11.0136975138397,0 +-69.5584678478948,-11.02182288806074,0 +-69.56466171065105,-11.02456726040302,0 +-69.57036516736892,-11.0293030942283,0 +-69.57223529209284,-11.0356541685532,0 +-69.57317024001163,-11.03882958875977,0 +-69.57569750363423,-11.04512609092692,0 +-69.57327238658692,-11.06378414009567,0 +-69.57267178389843,-11.07227713599808,0 +-69.57234411048248,-11.07620082412449,0 +-69.56730845010095,-11.08700618338401,0 +-69.56780311574983,-11.09280938202318,0 +-69.56523159244466,-11.1014619311775,0 +-69.55981163930713,-11.10775127850285,0 +-69.55702191078429,-11.11382363121905,0 +-69.55823047812875,-11.12021624464289,0 +-69.55960461910576,-11.12854310404616,0 +-69.56349651523661,-11.13536443326072,0 +-69.56465024797318,-11.1411128131091,0 +-69.56465558337155,-11.14890376699612,0 +-69.56291053483494,-11.15943648676951,0 +-69.55962954168095,-11.1674981342558,0 +-69.55886633844563,-11.17405357792869,0 +-69.55969288172447,-11.1837243334623,0 +-69.55964191700603,-11.19087034562604,0 +-69.55904394471453,-11.19935993745384,0 +-69.55630955809572,-11.20607874692879,0 +-69.55351983980484,-11.2121529523518,0 +-69.54689675103673,-11.21984233209612,0 +-69.54120183517516,-11.22290969586251,0 +-69.53857657325307,-11.23091884622283,0 +-69.53781288066229,-11.23747575083703,0 +-69.54143411604524,-11.24886595548603,0 +-69.53864400355441,-11.25494412206796,0 +-69.53294810092123,-11.2580141523444,0 +-69.53114132345567,-11.2601130530294,0 +-69.52400137534698,-11.27730216113975,0 +-69.52060697499948,-11.28407762384356,0 +-69.51792519587616,-11.2914442097776,0 +-69.5186413614248,-11.29983217891989,0 +-69.52220789495296,-11.31058482444012,0 +-69.52221137026595,-11.31837956232973,0 +-69.5185968739605,-11.32257246384179,0 +-69.51191491996236,-11.32961374382979,0 +-69.51016251503557,-11.33235421177021,0 +-69.50523488858734,-11.34444267494234,0 +-69.50408458781058,-11.34648400703128,0 +-69.49553665268049,-11.354971745611,0 +-69.49076920904062,-11.36120385380795,0 +-69.48512348161888,-11.36491095837263,0 +-69.48287665492479,-11.36963925695835,0 +-69.48753690499939,-11.37769745605855,0 +-69.49082543618469,-11.38521767201895,0 +-69.49093486838358,-11.39429811005241,0 +-69.47675362890949,-11.40797610663712,0 +-69.46059028670369,-11.41064531194463,0 +-69.4373090730372,-11.40988002040579,0 +-69.41945599743723,-11.40866294098882,0 +-69.40227875708183,-11.4154253699139,0 +-69.39357558649628,-11.42551166985231,0 +-69.37515576739663,-11.43371172608971,0 +-69.35944799211899,-11.44168874197788,0 +-69.35402420637254,-11.44213136017059,0 +-69.33018101044118,-11.45076987975054,0 +-69.31865389622718,-11.45974162008407,0 +-69.31040209964154,-11.47513856332757,0 +-69.30904264488248,-11.49131155571922,0 +-69.30497151258091,-11.50770348689308,0 +-69.30248165158909,-11.5266407545793,0 +-69.2999919086529,-11.54557514905514,0 +-69.29332191094599,-11.56350890177715,0 +-69.28902560621943,-11.57723442445896,0 +-69.28213044133423,-11.59250688076703,0 +-69.27681346337233,-11.61032400047102,0 +-69.27059465145132,-11.61751561934827,0 +-69.25566419799227,-11.63477726668762,0 +-69.24717581614962,-11.64750501421397,0 +-69.23483880573764,-11.66322197234338,0 +-69.2208062989762,-11.67506417208588,0 +-69.20926198571506,-11.68402898170474,0 +-69.19408942212104,-11.69864126561504,0 +-69.17913553650489,-11.71591388100307,0 +-69.17742222594302,-11.72809919689356,0 +-69.17343796089192,-11.74582445844673,0 +-69.17466273343787,-11.76045157034983,0 +-69.17838149562562,-11.77219964644378,0 +-69.17982744902596,-11.78949194185089,0 +-69.17833315451267,-11.80434769341402,0 +-69.17456549178448,-11.82474945862044,0 +-69.16877079203964,-11.83727976670809,0 +-69.15742688099755,-11.84892257393492,0 +-69.14879212856636,-11.86035538994243,0 +-69.13449098198312,-11.86957371725263,0 +-69.12334704013588,-11.88390118750777,0 +-69.12025504212187,-11.89623038756465,0 +-69.12010459687698,-11.91100497404186,0 +-69.11870277416379,-11.92722762378808,0 +-69.11582871102195,-11.94223215503679,0 +-69.12454929533517,-11.94822947533912,0 +-69.13006508808125,-11.96523781165142,0 +-69.13017509545368,-11.96657228726081,0 +-69.12578993914559,-11.99449824287905,0 +-69.12226859658948,-12.01756339495409,0 +-69.11681863486855,-12.03407850598164,0 +-69.1165896780543,-12.04749758884135,0 +-69.12067311049876,-12.06325226706232,0 +-69.12055746918368,-12.07799921634745,0 +-69.1174913403762,-12.09030066845781,0 +-69.11544684466344,-12.09850111078069,0 +-69.11192260290042,-12.12155262647011,0 +-69.11112636478498,-12.12831285444158,0 +-69.11605724080405,-12.15468344592177,0 +-69.12497562381749,-12.17940346454898,0 +-69.12892830874092,-12.19381457282705,0 +-69.13004772146907,-12.20711470013555,0 +-69.13377717334008,-12.21886585839974,0 +-69.14248614573621,-12.24092865025171,0 +-69.14733728853442,-12.26598021647823,0 +-69.14844171654109,-12.29535094536209,0 +-69.15522367963806,-12.31087637957161,0 +-69.15735712861688,-12.32008274226702,0 +-69.16184586860376,-12.34116112240481,0 +-69.15908354700215,-12.35746762296943,0 +-69.1507601351009,-12.37288478373647,0 +-69.14074104872252,-12.38441826742157,0 +-69.13344525104409,-12.39573365958439,0 +-69.1251145842031,-12.41115748010953,0 +-69.11689117593502,-12.42791677372647,0 +-69.11046762182509,-12.44990198682626,0 +-69.11442819184977,-12.46432666311352,0 +-69.11691473326323,-12.47752843053712,0 +-69.12391952022153,-12.49574780369916,0 +-69.13731173277456,-12.50807877249244,0 +-69.13896131858979,-12.5280907499746,0 +-69.14006340681253,-12.54143266022259,0 +-69.14549053447318,-12.55710217311242,0 +-69.15582618854339,-12.56565897236776,0 +-69.17162470469437,-12.57376968430975,0 +-69.17557961677969,-12.58821885656634,0 +-69.18694970105767,-12.59266171906906,0 +-69.19425702204722,-12.58131043758181,0 +-69.2082498502937,-12.58418431504672,0 +-69.2199545746478,-12.59262285621458,0 +-69.2317712666154,-12.60239570465925,0 +-69.24233472332217,-12.61361673715221,0 +-69.25186872970571,-12.62895735571432,0 +-69.25755543988762,-12.63117295960309,0 +-69.29083836927209,-12.64927616648267,0 +-69.3096992106891,-12.66115290320984,0 +-69.32412908151615,-12.66936603548747,0 +-69.3314007592697,-12.67413743109915,0 +-69.34821594245977,-12.67813605281889,0 +-69.37025632243763,-12.67903047630517,0 +-69.3994529085552,-12.68336135084087,0 +-69.40547436185967,-12.6895703269403,0 +-69.41910772946409,-12.70453555055448,0 +-69.43501275715015,-12.71395653340476,0 +-69.45182605039679,-12.71794289881531,0 +-69.4661411979526,-12.7248108450645,0 +-69.47897979071755,-12.73045925134777,0 +-69.50579368825592,-12.7389827104425,0 +-69.52420091805963,-12.74551310360122,0 +-69.53556301884181,-12.74994114657567,0 +-69.54987972617087,-12.75680517058814,0 +-69.56453875884084,-12.76765761705911,0 +-69.58033330077384,-12.7757373691164,0 +-69.6130604984771,-12.78912128764791,0 +-69.62761646481773,-12.7986370138127,0 +-69.63637378011813,-12.80461223148294,0 +-69.64672475929649,-12.81313433779859,0 +-69.6563975559101,-12.82974565893515,0 +-69.6778186659219,-12.85476829800422,0 +-69.68841824858806,-12.86595167106776,0 +-69.70549796542274,-12.87258517396531,0 +-69.73635374385275,-12.87942555468815,0 +-69.75582488764519,-12.88184274151885,0 +-69.77221655488516,-12.8804928040412,0 +-69.79134766143081,-12.87891716738777,0 +-69.80764106256559,-12.87623609882458,0 +-69.82065615469551,-12.88320629613523,0 +-69.82350971253726,-12.88431181470164,0 +-69.85354162485719,-12.89249141913413,0 +-69.86879070837371,-12.89390045234747,0 +-69.88403857735057,-12.89530846478753,0 +-69.92329936276784,-12.90408618519209,0 +-69.93616236554885,-12.90970790837546,0 +-69.95253781430087,-12.90833744525303,0 +-69.96481747238877,-12.9073096497864,0 +-69.97288612554679,-12.90529543707359,0 +-70.00605357384426,-12.89180495607481,0 +-70.02105497622757,-12.8905479413644,0 +-70.03332795295938,-12.88951891038023,0 +-70.05935216004885,-12.88867406273651,0 +-70.07084492891941,-12.89440399444087,0 +-70.08962367926995,-12.90487720517511,0 +-70.12612659056241,-12.91385580805136,0 +-70.13750266968273,-12.91825277831231,0 +-70.16475945915261,-12.91593844303202,0 +-70.17974679951541,-12.9146646512546,0 +-70.20710747560152,-12.91367562367301,0 +-70.22913881798722,-12.91448472267923,0 +-70.24596080789712,-12.91841566777506,0 +-70.25846001798656,-12.92003575415933,0 +-70.27575167125364,-12.92927408225695,0 +-70.29144605912727,-12.93597140819072,0 +-70.30554310911823,-12.94012837501919,0 +-70.30920754132868,-12.95051499795872,0 +-70.32663047934923,-12.96108621202405,0 +-70.32971125628818,-12.96483916667644,0 +-70.33853182571363,-12.98682967334174,0 +-70.34475526484772,-13.01038638685162,0 +-70.34619941571275,-13.02634320422515,0 +-70.34864786735817,-13.03819907960277,0 +-70.35222137666129,-13.04728272489703,0 +-70.35352951663046,-13.06189608892455,0 +-70.358761875323,-13.08957268060158,0 +-70.37214392408102,-13.10053380413013,0 +-70.3815446075518,-13.11315815966153,0 +-70.39142506065977,-13.13110076412948,0 +-70.38282208947064,-13.16202567195258,0 +-70.38910292553827,-13.1708499880626,0 +-70.38528866805595,-13.18988928350918,0 +-70.37271550914512,-13.20298541587173,0 +-70.36946144624763,-13.21261731678296,0 +-70.35785038174659,-13.23632248617042,0 +-70.35322939280812,-13.24606953471519,0 +-70.34118022184921,-13.24975764007575,0 +-70.32664304408205,-13.25632676839485,0 +-70.30502071440299,-13.27552674290818,0 +-70.30337220489467,-13.28769788509431,0 +-70.30900442857815,-13.30459612047518,0 +-70.31850183346128,-13.31850375550092,0 +-70.32914093050685,-13.32965334280879,0 +-70.34463817962512,-13.34970147004766,0 +-70.34589608297944,-13.36425643759405,0 +-70.34039234176372,-13.38065098554253,0 +-70.33205761958912,-13.39714625205144,0 +-70.32783425086127,-13.41327378357814,0 +-70.33179817326513,-13.42871186160699,0 +-70.33786626286464,-13.43609363748941,0 +-70.36877016753891,-13.44541724206432,0 +-70.38610985384719,-13.43879281990779,0 +-70.39264153239765,-13.43433702054001,0 +-70.40025224433963,-13.44421494537866,0 +-70.4132436108044,-13.46706240239283,0 +-70.42006245548768,-13.4800031170832,0 +-70.4307038103986,-13.51424499723379,0 +-70.43580540110237,-13.52930111009907,0 +-70.44155380467986,-13.53514231292431,0 +-70.44893646476963,-13.56320776604257,0 +-70.45098420192532,-13.57240014897962,0 +-70.45427636219442,-13.59745639309167,0 +-70.45510590499252,-13.60802730444248,0 +-70.46312263013765,-13.62604182800911,0 +-70.47328085908556,-13.63858375051012,0 +-70.47375012011499,-13.65339351948614,0 +-70.47387752138651,-13.65741719405591,0 +-70.45950727497912,-13.68288420737694,0 +-70.45683508992302,-13.68714716995823,0 +-70.45473032975538,-13.7045135401408,0 +-70.45540002465438,-13.73018020186275,0 +-70.45742280619314,-13.75856221730272,0 +-70.46656140171829,-13.76821524105815,0 +-70.47563983428086,-13.78049973109764,0 +-70.48300464785706,-13.79160308855912,0 +-70.48614012010549,-13.80043404724925,0 +-70.49431018504664,-13.82820229190976,0 +-70.50159875894133,-13.83917854071605,0 +-70.51020593849883,-13.85001594894997,0 +-70.5160590014635,-13.8597733725441,0 +-70.51827280092216,-13.8774491068938,0 +-70.51200297064612,-13.90226559609439,0 +-70.50941324068398,-13.91792522034847,0 +-70.50953940917429,-13.93339283848384,0 +-70.50311458258058,-13.94944324905194,0 +-70.48365218694499,-13.96791838337468,0 +-70.47679801161061,-13.98010798011729,0 +-70.47595474217023,-13.99955729889338,0 +-70.47126084841921,-14.02062290912849,0 +-70.46043088736396,-14.03314400929321,0 +-70.44803748861193,-14.04320553096766,0 +-70.44141381204146,-14.05796948277832,0 +-70.43957350585956,-14.0671379098572,0 +-70.43771442561273,-14.09166702466124,0 +-70.43893674478051,-14.10567576196632,0 +-70.44015874061824,-14.11967909839106,0 +-70.44281438456814,-14.13484424305685,0 +-70.45860704231295,-14.16704011489469,0 +-70.4699643908213,-14.17630525888784,0 +-70.47256499717075,-14.19017976377143,0 +-70.47268094665084,-14.2055423085333,0 +-70.46937017765124,-14.21223325745563,0 +-70.46032795200338,-14.22826632240249,0 +-70.45919655205684,-14.24487499981677,0 +-70.45998581592136,-14.25369470872492,0 +-70.45663249946701,-14.2603126259765,0 +-70.44917427698365,-14.27995809667405,0 +-70.43928703393662,-14.28712066663312,0 +-70.41840087692209,-14.30407514565688,0 +-70.41264208336389,-14.31344690770435,0 +-70.40556587774847,-14.32292645092912,0 +-70.39368835766381,-14.33789356650715,0 +-70.38572328699991,-14.35254377635123,0 +-70.36944875085361,-14.37808518388755,0 +-70.35360258194618,-14.39342642625723,0 +-70.34779910973548,-14.40283549206883,0 +-70.34395718459258,-14.42750573202159,0 +-70.34128489236836,-14.44427209678271,0 +-70.34237153238657,-14.45820221492143,0 +-70.34508501270419,-14.47584592317976,0 +-70.34602557685319,-14.48598124271596,0 +-70.34814279542128,-14.50618603567788,0 +-70.35465322186278,-14.52226550207958,0 +-70.34476726045426,-14.52947866614658,0 +-70.33451023560694,-14.53159527277813,0 +-70.31909351485146,-14.53412984638735,0 +-70.29860037514025,-14.53997225766304,0 +-70.29704119787507,-14.55292971327129,0 +-70.29976170908039,-14.56937834243654,0 +-70.30671344846991,-14.58801870931882,0 +-70.31648037632623,-14.59227134141747,0 +-70.33692087712008,-14.60286928348857,0 +-70.34676515945718,-14.611041815702,0 +-70.3544600213971,-14.62586622420183,0 +-70.35496553489384,-14.63226047289171,0 +-70.35860250492979,-14.6616148922882,0 +-70.35429881243027,-14.67772201119195,0 +-70.35399464690259,-14.68930871944907,0 +-70.3553466884449,-14.70460960188465,0 +-70.35835542591897,-14.72362716952998,0 +-70.35432680649524,-14.73810699560556,0 +-70.34777319819142,-14.75409120600825,0 +-70.33710061600748,-14.76778276154334,0 +-70.33565230652867,-14.7821112896842,0 +-70.34468015066435,-14.7942150075199,0 +-70.3554978068764,-14.81128940845674,0 +-70.36455996442568,-14.82334837038,0 +-70.38927918431823,-14.82967610187935,0 +-70.39931604199063,-14.83781323651336,0 +-70.41157321657016,-14.85600911915282,0 +-70.41764618427601,-14.86447094881456,0 +-70.41845067194976,-14.8733764035146,0 +-70.40629009546554,-14.8975481942708,0 +-70.4071541744506,-14.9064534807406,0 +-70.40838794625911,-14.91916715876976,0 +-70.40709933349193,-14.94743790736858,0 +-70.38990428200484,-14.96540506418582,0 +-70.380543376905,-14.97962480219008,0 +-70.37696699922897,-14.98714388811639,0 +-70.37183215116772,-15.00094603222859,0 +-70.36449454237246,-15.01390041304698,0 +-70.35695355284085,-15.0247553460006,0 +-70.34817723166773,-15.03370040631659,0 +-70.33458754033209,-15.04821078337233,0 +-70.3210784450627,-15.06373005203816,0 +-70.31326534492123,-15.07157909246566,0 +-70.31179182061905,-15.0788969791972,0 +-70.30815146111357,-15.09770439338915,0 +-70.30423923368966,-15.11345456413487,0 +-70.29669971477206,-15.12436878389809,0 +-70.28942837969974,-15.13834647700751,0 +-70.28339173186286,-15.15428060448201,0 +-70.27771458775521,-15.17430474267829,0 +-70.27360587425353,-15.1880277461058,0 +-70.26465246796671,-15.20621709655754,0 +-70.25509362010406,-15.21941674956528,0 +-70.2495648827324,-15.22914130201314,0 +-70.24104308178991,-15.25022748196622,0 +-70.23121709428237,-15.27385383135867,0 +-70.21876099618869,-15.29151286518566,0 +-70.21175151794002,-15.30744438872591,0 +-70.20089323568013,-15.31652150721202,0 +-70.18994150414393,-15.32458030016682,0 +-70.18544453747714,-15.33311603339154,0 +-70.17675731373775,-15.35320087561702,0 +-70.15912389786344,-15.39257447846751,0 +-70.15833643853743,-15.39571051039528,0 +-70.14916913235142,-15.41278317602545,0 +-70.14243410820865,-15.43347491723022,0 +-70.14113004332758,-15.43867436111262,0 +-70.13798469367927,-15.44968234847096,0 +-70.13777442446592,-15.46047629898904,0 +-70.13823109588579,-15.46554738482372,0 +-70.13766160295951,-15.47239110127411,0 +-70.13545103558664,-15.48051875030792,0 +-70.13600942979267,-15.48671494405252,0 +-70.14027275337682,-15.49487083626945,0 +-70.14641363162444,-15.49776274981498,0 +-70.1558544701566,-15.49811022557994,0 +-70.16443204454997,-15.50193311598901,0 +-70.17120784143917,-15.50533869902879,0 +-70.1751657906636,-15.51011344023852,0 +-70.17797652686193,-15.51501801502007,0 +-70.18132858348879,-15.51980541266532,0 +-70.18450056160584,-15.5223765830114,0 +-70.18957561048167,-15.52649014662436,0 +-70.19650319725916,-15.531583093858,0 +-70.20246456580138,-15.53902283783975,0 +-70.21154698609435,-15.54846900786412,0 +-70.21789006626868,-15.55360819618332,0 +-70.22763468604001,-15.55733011428717,0 +-70.23621036537567,-15.56114863458817,0 +-70.24103106640105,-15.56244649863188,0 +-70.24435270103693,-15.56670195461808,0 +-70.25201136636444,-15.57342731257234,0 +-70.26522301009129,-15.58308518142194,0 +-70.27331607932092,-15.58807340147333,0 +-70.27829085938731,-15.59105715127824,0 +-70.28580418130032,-15.5960949899955,0 +-70.29224695840561,-15.60235265948788,0 +-70.30106451208802,-15.60897151290153,0 +-70.31343307399447,-15.61585748728004,0 +-70.32203953024408,-15.620221913508,0 +-70.32952512859617,-15.62524297291142,0 +-70.33962671996152,-15.63342655371704,0 +-70.3416663495139,-15.63664184217905,0 +-70.35054708009687,-15.64328897939509,0 +-70.35440655188677,-15.64692980701075,0 +-70.36090384565084,-15.65533991726794,0 +-70.37002721535055,-15.66664525032387,0 +-70.38099527743152,-15.67134198797429,0 +-70.39362644183191,-15.67476548772381,0 +-70.4035355052834,-15.67394994754946,0 +-70.41083510007833,-15.67672493084865,0 +-70.4167063275309,-15.67680779663319,0 +-70.42444412499003,-15.67784073170022,0 +-70.4295119730287,-15.68193904165141,0 +-70.43598408119935,-15.68195381346945,0 +-70.43983862066003,-15.6793784945732,0 +-70.44745501492416,-15.67250719930526,0 +-70.45304950939096,-15.66979032694029,0 +-70.46363735564815,-15.66441430485328,0 +-70.46907397374459,-15.66060951754315,0 +-70.47589482765723,-15.6645367756014,0 +-70.47974897211419,-15.66757351128093,0 +-70.48568558154135,-15.67382245248611,0 +-70.49305915153637,-15.67830027579271,0 +-70.49729895505919,-15.68020696155228,0 +-70.50746362969554,-15.6815962101646,0 +-70.51782756924976,-15.68580211856635,0 +-70.52210636871168,-15.68769940536893,0 +-70.53379253572589,-15.68614024613845,0 +-70.53843920961155,-15.67953253450761,0 +-70.54534558048741,-15.67217336525242,0 +-70.55248704338136,-15.67383353375903,0 +-70.55909760889686,-15.67610118276628,0 +-70.56837213445783,-15.67759091958549,0 +-70.57966049046756,-15.68000275625912,0 +-70.59097788999021,-15.68074573477862,0 +-70.59564044227696,-15.68090992286002,0 +-70.60136740400137,-15.68606309521791,0 +-70.60599509181958,-15.69187612618706,0 +-70.60776810323362,-15.69849727245759,0 +-70.60770151157493,-15.71353711062277,0 +-70.6049198000883,-15.73039635121167,0 +-70.61312473174549,-15.74056779927125,0 +-70.62112286727121,-15.74877357669568,0 +-70.61819816313357,-15.76084225584664,0 +-70.61603189829162,-15.77085526667999,0 +-70.61839145393938,-15.78637174824024,0 +-70.61404531687263,-15.79461318924658,0 +-70.61380233644469,-15.803482343673,0 +-70.61900885847056,-15.81680247285776,0 +-70.61726232757161,-15.82877604975038,0 +-70.61416679287848,-15.8369161059834,0 +-70.6236336510519,-15.84004145208767,0 +-70.62853613044811,-15.84748574135468,0 +-70.64145658913114,-15.84540383795747,0 +-70.65296555533213,-15.84442366777158,0 +-70.66711724605213,-15.84321762173772,0 +-70.67793912511981,-15.84131214134672,0 +-70.69224816235651,-15.84009151529592,0 +-70.6991910724559,-15.84932002666629,0 +-70.70829167855467,-15.85934572245344,0 +-70.71783379484147,-15.86145851621252,0 +-70.73675070984254,-15.85888727616109,0 +-70.74452590446182,-15.8542882813943,0 +-70.75456696737257,-15.86324969447863,0 +-70.76392359527044,-15.85459648721719,0 +-70.77179753825348,-15.85096896346144,0 +-70.78452691386791,-15.8547689639702,0 +-70.79232668338337,-15.86095050813165,0 +-70.79409999874184,-15.86863259642549,0 +-70.7966254343267,-15.88407169900424,0 +-70.79840627445842,-15.8917320158056,0 +-70.80917972046613,-15.90734676132033,0 +-70.80379573545359,-15.91567395158797,0 +-70.80411459520909,-15.93034644996829,0 +-70.8115561507871,-15.94435373608206,0 +-70.81244829592323,-15.95407366884321,0 +-70.81121693138822,-15.96301795810368,0 +-70.81451533731148,-15.97641385279726,0 +-70.82169610323665,-15.98747134752587,0 +-70.83255702181832,-15.99426910154342,0 +-70.84237810478923,-16.00119805500962,0 +-70.84849384553409,-16.01243344130941,0 +-70.85838182579604,-16.02040065691366,0 +-70.86993160722552,-16.02430400706193,0 +-70.88560748018965,-16.02885223756108,0 +-70.90110797516907,-16.03145780687025,0 +-70.91046504695231,-16.03360391172249,0 +-70.92101533053943,-16.037607953775,0 +-70.9338619188312,-16.04436345104954,0 +-70.94855408170942,-16.04901464272944,0 +-70.95489198915055,-16.05142503667593,0 +-70.95616501235303,-16.06504973079215,0 +-70.94395324717138,-16.06518237693427,0 +-70.95165934222068,-16.07131828332665,0 +-70.95974374658115,-16.07058020711359,0 +-70.96525574128141,-16.07495649801968,0 +-70.97419015961188,-16.08283916452852,0 +-70.98681770176927,-16.09730608180314,0 +-70.99170888392277,-16.10566560889285,0 +-71.00002381869874,-16.11763812437835,0 +-71.00908892815384,-16.12661499549618,0 +-71.01371912768299,-16.13208031109489,0 +-71.01889607535594,-16.14340938101378,0 +-71.02377828453638,-16.16264952457993,0 +-71.03176041304161,-16.18262237147488,0 +-71.03843958967011,-16.19974405313202,0 +-71.03962864423086,-16.21241121351832,0 +-71.04375728096075,-16.22383936766298,0 +-71.05217700784544,-16.23782860739118,0 +-71.0583499006614,-16.25002614616849,0 +-71.062884696913,-16.25644293918848,0 +-71.07071486958193,-16.26454661421825,0 +-71.07505572179122,-16.26711357518245,0 +-71.08863666476165,-16.27877177843606,0 +-71.09576595566735,-16.28895825786238,0 +-71.10473626159704,-16.29702337216237,0 +-71.11653125486488,-16.30286270330886,0 +-71.12076856737214,-16.30445436438008,0 +-71.13044527206058,-16.30949692258319,0 +-71.14917144794401,-16.32356925145639,0 +-71.14608180462179,-16.33367872190264,0 +-71.14188271432394,-16.34290702646819,0 +-71.14597446787157,-16.35245612786138,0 +-71.15744398159859,-16.35441853028524,0 +-71.16785323416596,-16.3474851405596,0 +-71.17717354040354,-16.348637039457,0 +-71.18637782042406,-16.34880288520673,0 +-71.19523770811118,-16.35403018791782,0 +-71.21015056048456,-16.36055807649787,0 +-71.2214757428798,-16.36337120121405,0 +-71.22766352214215,-16.36567075143814,0 +-71.24300284207123,-16.36625889736422,0 +-71.26355115227211,-16.36719708295203,0 +-71.27174930761116,-16.3674330837145,0 +-71.28685415572433,-16.36643486634115,0 +-71.2928896282917,-16.36615286835114,0 +-71.3043219409287,-16.37913354268395,0 +-71.31216694570224,-16.38658544638986,0 +-71.32549663838991,-16.38728516625911,0 +-71.31925939178632,-16.3758173301796,0 +-71.32539214672504,-16.3754464566314,0 +-71.33135842386844,-16.38398679754821,0 +-71.34144443347762,-16.39230329677963,0 +-71.34704759418864,-16.38599702556392,0 +-71.35631528638085,-16.38537714050021,0 +-71.35840649146859,-16.39628012416829,0 +-71.36498960132558,-16.39986889759112,0 +-71.37589564229454,-16.40507874629144,0 +-71.39075321083837,-16.40794306065479,0 +-71.39799421182254,-16.40737564586736,0 +-71.42355934159147,-16.41243814823587,0 +-71.43034610707021,-16.40770736956573,0 +-71.44095183780431,-16.39962377379047,0 +-71.44804824085338,-16.40724370589853,0 +-71.45452184481499,-16.4088191747876,0 +-71.47535116912557,-16.41564221985235,0 +-71.50123535423776,-16.42082683265341,0 +-71.51174008508731,-16.42004915893219,0 +-71.5222010768998,-16.40816723951279,0 +-71.52748023271272,-16.39764681602034,0 +-71.53317781171273,-16.39114547204239,0 +-71.54436016646,-16.38716565169105,0 +-71.55634842602787,-16.39119081895207,0 +-71.55361901875256,-16.40469511453203,0 +-71.55098514488772,-16.4099719497344,0 +-71.56423846699208,-16.41592527243873,0 +-71.57718933221969,-16.40871752633478,0 +-71.58436618956581,-16.4070546235398,0 +-71.6025200753383,-16.40951783768998,0 +-71.61458329547679,-16.41358035119177,0 +-71.63400554368239,-16.4170292895401,0 +-71.64394924005936,-16.42124156878549,0 +-71.6607163070715,-16.42994759537324,0 +-71.67419311347184,-16.42773723730824,0 +-71.68508911864765,-16.43085083960126,0 +-71.69344991724006,-16.44025703018561,0 +-71.69431715877759,-16.44925908808852,0 +-71.6932094452998,-16.46938064697699,0 +-71.70744669116191,-16.47517495749394,0 +-71.71021575689984,-16.48198533034025,0 +-71.71423990034893,-16.49150332828894,0 +-71.72434713705435,-16.49847645747898,0 +-71.73231818478392,-16.50473811723747,0 +-71.74792872188502,-16.51339745566375,0 +-71.75424458245573,-16.52398395170838,0 +-71.77231713107047,-16.52527474962757,0 +-71.78423413406489,-16.52817508879478,0 +-71.79571239044458,-16.53720110754721,0 +-71.80520535824729,-16.5474438362783,0 +-71.81115321198691,-16.55398684345844,0 +-71.82601203320812,-16.56478513866601,0 +-71.83407409805925,-16.57114578354091,0 +-71.84274325393048,-16.58354721681706,0 +-71.85122269155288,-16.59394243060192,0 +-71.85498840629468,-16.59969497302366,0 +-71.86483834074052,-16.61302938580286,0 +-71.87269943006511,-16.62757572659514,0 +-71.87889311420413,-16.63617770560478,0 +-71.88740269104476,-16.64661316805928,0 +-71.89581661600432,-16.65604536227407,0 +-71.90327550256768,-16.66658794448232,0 +-71.91220493294323,-16.68108547643785,0 +-71.92047408296688,-16.69972710434676,0 +-71.92918029927438,-16.71220482657298,0 +-71.93653065553691,-16.72174658569272,0 +-71.94851859931602,-16.73495656681481,0 +-71.96011022559117,-16.74412470422976,0 +-71.96610891324822,-16.7507325552841,0 +-71.97483117314495,-16.76322212577418,0 +-71.98405637916859,-16.78077029666515,0 +-71.99651560306961,-16.79901529170338,0 +-71.99912738141897,-16.80387709443514,0 +-72.01055300640695,-16.82223128336671,0 +-72.01273741480618,-16.83327793354693,0 +-72.01808037474578,-16.84402616411458,0 +-72.02278405259048,-16.85893006389241,0 +-72.02602381913152,-16.86988128210839,0 +-72.02650210661196,-16.88263363754812,0 +-72.03490790225261,-16.88695623264875,0 +-72.04173090538205,-16.89521584657588,0 +-72.04277243215148,-16.90468258978411,0 +-72.04621113975446,-16.9120197455562,0 +-72.04953265843019,-16.91811534005697,0 +-72.05566428116552,-16.92585670266074,0 +-72.0558524772393,-16.93297808035084,0 +-72.05613615523144,-16.94135467719251,0 +-72.05434483154025,-16.94870961646749,0 +-72.0534276890842,-16.95851961252661,0 +-72.05772223980956,-16.96243794755618,0 +-72.06304892315168,-16.96787109000022,0 +-72.06985486566987,-16.97392470874925,0 +-72.07234472444323,-16.9782530141057,0 +-72.07681745852419,-16.9882828251008,0 +-72.08175565189572,-16.9904408044481,0 +-72.08913137390977,-16.99630329619962,0 +-72.09430164663188,-17.00041246740208,0 +-72.10272952129255,-17.00356830682439,0 +-72.10750010353011,-16.99736930262132,0 diff --git a/R-utils/roads/br319.csv b/R-utils/roads/br319.csv new file mode 100644 index 000000000..efe6fd40a --- /dev/null +++ b/R-utils/roads/br319.csv @@ -0,0 +1,1207 @@ +-63.9254718043813,-8.737943992937467,0 +-63.94909959818872,-8.74355780743258,0 +-63.96680927745334,-8.732996631907096,0 +-63.97671397451602,-8.726661825435148,0 +-63.98263868421147,-8.716074520018124,0 +-63.98793823169452,-8.705956944922496,0 +-63.99324329620705,-8.696022967104183,0 +-63.99395380946675,-8.694392619636368,0 +-63.99438420100397,-8.684674803283082,0 +-63.9945935233921,-8.67715909543138,0 +-63.99492936591642,-8.669108132551587,0 +-63.99451659005511,-8.662700964998043,0 +-63.99544659492786,-8.654862994164329,0 +-63.99584472632002,-8.643271326718633,0 +-63.99619496724999,-8.634404280742308,0 +-63.99658567072196,-8.626639089717459,0 +-63.99673954785626,-8.620257563756512,0 +-63.99699752688402,-8.612989053125576,0 +-63.99695207930908,-8.604192449198116,0 +-63.99633743931525,-8.599085794116068,0 +-63.99504292247906,-8.592273289291303,0 +-63.99380478278636,-8.585445165218628,0 +-63.99266588886057,-8.578040343997754,0 +-63.99114560527185,-8.569832248132034,0 +-63.99007839657708,-8.564048736359041,0 +-63.98868175454787,-8.556214131238585,0 +-63.9870804738467,-8.547374179056725,0 +-63.98570416233196,-8.539669943499794,0 +-63.98327890906001,-8.528742353808774,0 +-63.98147557928804,-8.518132910893922,0 +-63.98071165514184,-8.512211418259286,0 +-63.97994465641565,-8.507636591554386,0 +-63.97962809282184,-8.505595476174937,0 +-63.9796864466735,-8.505359759205971,0 +-63.9785685285818,-8.499595906210999,0 +-63.97825592725626,-8.495073346030049,0 +-63.9773933263185,-8.490233556852404,0 +-63.9751611793253,-8.47712146198691,0 +-63.97342727302514,-8.466666436846442,0 +-63.97230937746298,-8.460295441658115,0 +-63.97122179537793,-8.453850959178963,0 +-63.97002302148199,-8.446930994210806,0 +-63.96728579564962,-8.430945657490177,0 +-63.96551654407062,-8.418740544914982,0 +-63.96364806409623,-8.406634346264042,0 +-63.96261862209817,-8.40034423876717,0 +-63.96026719498803,-8.386944397186474,0 +-63.95835649718433,-8.376278746420732,0 +-63.95601399913044,-8.363310543708849,0 +-63.95447926735294,-8.354761191895001,0 +-63.95350397718971,-8.349371040164833,0 +-63.95219702388052,-8.342214777805362,0 +-63.95074728569739,-8.334070427409081,0 +-63.9497428489137,-8.330874106723659,0 +-63.94899556538038,-8.325679102629437,0 +-63.94672330395745,-8.315852926246137,0 +-63.9454376663209,-8.310176261777132,0 +-63.94360800301307,-8.301845698201427,0 +-63.94182559769421,-8.293975471764123,0 +-63.94052718598982,-8.288076566142029,0 +-63.93888443135626,-8.281777406545013,0 +-63.93804987312042,-8.277522120161658,0 +-63.93810780887769,-8.277195569113942,0 +-63.93782980879897,-8.276663688272738,0 +-63.93743854780095,-8.275440621959902,0 +-63.93642867078832,-8.271255709396645,0 +-63.93552390458734,-8.2674154264305,0 +-63.93434069238696,-8.262801630398004,0 +-63.9335294324632,-8.259554536782257,0 +-63.93211261277695,-8.25355924039987,0 +-63.93053510398176,-8.247104806660595,0 +-63.92945735657656,-8.241727405524154,0 +-63.92836920105431,-8.236110157309108,0 +-63.92705730187983,-8.230244499266858,0 +-63.92556530888888,-8.222970084736101,0 +-63.92425504214142,-8.218190955406477,0 +-63.92171737713387,-8.215225659828496,0 +-63.91772829906129,-8.212770553971259,0 +-63.90889033111223,-8.210508470992187,0 +-63.89682381296118,-8.207223735739458,0 +-63.88622669561406,-8.204322360651545,0 +-63.87951682928439,-8.202424485215134,0 +-63.86831529226973,-8.199276073947575,0 +-63.84731188271723,-8.191799739868076,0 +-63.83730968047205,-8.187655402521386,0 +-63.82406725194435,-8.178165292233594,0 +-63.80341609295242,-8.165590228194672,0 +-63.79489330552143,-8.160463981776148,0 +-63.78146506900259,-8.152566480151197,0 +-63.77161266704773,-8.147003238425327,0 +-63.76426891002026,-8.144868318249568,0 +-63.75205736167595,-8.141764516874181,0 +-63.74097613644502,-8.138785700178744,0 +-63.73004474850008,-8.135936307291225,0 +-63.72160318317809,-8.133865376079578,0 +-63.70888262375836,-8.129996619910191,0 +-63.69844594523837,-8.126937388295444,0 +-63.68259837748695,-8.122339601927223,0 +-63.67064530984362,-8.119111814657721,0 +-63.66227162239073,-8.116684168101793,0 +-63.65743349161235,-8.111678315139857,0 +-63.65267558449298,-8.10561714252823,0 +-63.6409966807314,-8.090124074795311,0 +-63.63825334589826,-8.087753467118617,0 +-63.62825124240453,-8.084388905658445,0 +-63.61581179419927,-8.0806157951333,0 +-63.60196742349317,-8.076319976107701,0 +-63.5946495596934,-8.074459712779197,0 +-63.58578102229968,-8.071784681867745,0 +-63.5750297331104,-8.06817897541028,0 +-63.56308403715462,-8.064544682451816,0 +-63.55227451035007,-8.061427766561561,0 +-63.54175945684413,-8.058302680426502,0 +-63.5279062012311,-8.054166816969135,0 +-63.51267873033003,-8.049631372886868,0 +-63.50261960540995,-8.046433300517094,0 +-63.49080109805556,-8.043190334227514,0 +-63.48381100611824,-8.040903328274133,0 +-63.4779695851314,-8.039555967811346,0 +-63.47193405565475,-8.037977353460052,0 +-63.46469039130273,-8.035732589939139,0 +-63.45833840274331,-8.033873882827899,0 +-63.44883234881719,-8.026375223711074,0 +-63.44264523055342,-8.02130370831985,0 +-63.43557972487267,-8.015470314520416,0 +-63.42718023256761,-8.007977470917885,0 +-63.42126169838162,-8.002084367862645,0 +-63.41309093752525,-7.995845723059866,0 +-63.39924816762716,-7.985486974704097,0 +-63.38773284014608,-7.975331970899999,0 +-63.37786555620626,-7.96747157049892,0 +-63.36537659632101,-7.957156810886354,0 +-63.35574282891181,-7.949225155223001,0 +-63.34204306201022,-7.937858558920237,0 +-63.32972492884955,-7.92890220224484,0 +-63.32883236595749,-7.926723569060995,0 +-63.32381149474036,-7.923059521702851,0 +-63.31064817403399,-7.911773763142583,0 +-63.28838843261366,-7.894530884378405,0 +-63.26574213835983,-7.876020858131553,0 +-63.2448108339997,-7.85966536740256,0 +-63.22689509854202,-7.845816617785783,0 +-63.20652133928412,-7.82948349765747,0 +-63.1859398914234,-7.812477978499009,0 +-63.1618540727656,-7.793831772852655,0 +-63.15099388287101,-7.773593933869415,0 +-63.13974981522028,-7.75203796166761,0 +-63.12140060754454,-7.738105640356153,0 +-63.09837931598469,-7.720618893527298,0 +-63.08439126884844,-7.695385961945129,0 +-63.08141225168346,-7.688926737763864,0 +-63.07993487191803,-7.65521982077331,0 +-63.07965367106231,-7.622188758022749,0 +-63.07831572039947,-7.595672379373046,0 +-63.07735110182374,-7.563064278018688,0 +-63.07680229071092,-7.549955547795917,0 +NA,NA,NA +-63.2685508653116,-7.563790519507395,0 +-63.26610500840385,-7.565374736471266,0 +-63.26051835597606,-7.568886341886525,0 +-63.25778382147917,-7.570171132505962,0 +-63.25483819690469,-7.572232182596446,0 +-63.25084491640744,-7.574632381338946,0 +-63.24639096083607,-7.577037624419477,0 +-63.23788135666264,-7.582335699300376,0 +-63.23172866981596,-7.585674429949197,0 +-63.22607219930631,-7.589129707492464,0 +-63.22239795084815,-7.591070481708983,0 +-63.22028082654732,-7.591492781832683,0 +-63.21304076918555,-7.591584497306804,0 +-63.20776148396698,-7.592106399410406,0 +-63.19639484224865,-7.592505993251795,0 +-63.18191099437833,-7.592942111579114,0 +-63.17838511849666,-7.593308324563497,0 +-63.17546927872636,-7.593811756522229,0 +-63.17375229553539,-7.593962313521413,0 +-63.1710372434237,-7.593534171077934,0 +-63.16679968672165,-7.592109300912977,0 +-63.15698333817325,-7.588970239771577,0 +-63.14279175722064,-7.584376033268806,0 +-63.13502343865819,-7.581908337687341,0 +-63.12400217440698,-7.577982078090357,0 +-63.11892446185384,-7.576544854821628,0 +-63.11267861284373,-7.575203949438614,0 +-63.10935345955367,-7.572859478495617,0 +-63.10267767163258,-7.567989924948916,0 +-63.0972982865881,-7.564347666973416,0 +-63.09216534645999,-7.560373362860075,0 +-63.08679279582275,-7.556997791671243,0 +-63.082399323676,-7.553699425412141,0 +-63.07674301756503,-7.549879425899861,0 +NA,NA,NA +-63.2688920105638,-7.563801098632908,0 +-63.26805487763312,-7.559839848324978,0 +-63.26617050788841,-7.554743383229012,0 +-63.26170503017966,-7.541987683510412,0 +-63.25698134717024,-7.530255808314902,0 +-63.24929899597199,-7.509897115622283,0 +-63.24164574028894,-7.488988064342455,0 +-63.23375829756706,-7.466442876693785,0 +-63.22342802414521,-7.440694419432336,0 +-63.21508935317332,-7.417690959885584,0 +-63.20567963850855,-7.391401041246173,0 +-63.19912316284218,-7.374864884451885,0 +-63.18720688167767,-7.343234088087677,0 +-63.17684663036058,-7.315750207457062,0 +-63.16639875681319,-7.287853284073133,0 +-63.1552715471062,-7.25848698806086,0 +-63.1455302608118,-7.233498024036233,0 +-63.13731052923788,-7.210810722834719,0 +-63.12291077911654,-7.172787370457091,0 +-63.11825112569617,-7.159638757778466,0 +-63.11597753597763,-7.14158358990451,0 +-63.11233130991781,-7.109796076352547,0 +-63.10914615254098,-7.080086160726585,0 +-63.10282440577021,-7.029154717646133,0 +-63.1006171359428,-7.007562217734173,0 +-63.09880176118028,-6.989294523288946,0 +-63.09285478651271,-6.970198991313945,0 +-63.08137881396762,-6.934194989090766,0 +-63.06841171105323,-6.892663563913189,0 +-63.05622324241931,-6.855630027668629,0 +-63.04383996747438,-6.835782986012313,0 +-63.02335190815147,-6.804871826806423,0 +-63.01073814752832,-6.7850081413354,0 +-63.00909222533972,-6.78304767563792,0 +-63.00545994635228,-6.773055166132695,0 +-62.99518844586552,-6.74882928692818,0 +-62.98266230077093,-6.718743679632257,0 +-62.9738286440375,-6.698055663395347,0 +-62.96948692429139,-6.687732067024577,0 +-62.96556659377335,-6.66927340051958,0 +-62.9625927321395,-6.654683063865377,0 +-62.95994729083071,-6.640128779677423,0 +-62.9567088138314,-6.624417308585495,0 +-62.95341280533396,-6.604127016345973,0 +-62.9498813137552,-6.585971456207574,0 +-62.94603658341864,-6.568829696519379,0 +-62.94291472479897,-6.550645453179015,0 +-62.94173308069876,-6.545892557334012,0 +-62.93913349134254,-6.541812325497561,0 +-62.93625475748932,-6.537385942074364,0 +-62.92995638498613,-6.526805405740909,0 +-62.92454917668528,-6.519165015867672,0 +-62.91804333169141,-6.512575993124142,0 +-62.90856175921864,-6.502061435747216,0 +-62.89823950715955,-6.491062046675911,0 +-62.89326349273566,-6.485544343336272,0 +-62.89113408579635,-6.480047850360501,0 +-62.88948529077307,-6.475968963224332,0 +-62.88702928091329,-6.47022972006658,0 +-62.8838889899321,-6.461917826876732,0 +-62.87987112485236,-6.45265208880063,0 +-62.87228298526016,-6.443218623185103,0 +-62.86143492301057,-6.427733749891211,0 +-62.84859836127607,-6.410369833459607,0 +-62.84164409059078,-6.402435255759904,0 +-62.82584267714746,-6.387695637700544,0 +-62.81175132776063,-6.374804449999436,0 +-62.78977380657835,-6.354086925339147,0 +-62.78274360667747,-6.342498492188819,0 +-62.76944763307499,-6.321182171338143,0 +-62.75355643929676,-6.295189334411458,0 +-62.74104202865485,-6.275750407278243,0 +-62.72730045656601,-6.263583250084009,0 +-62.71062784481007,-6.249441846622262,0 +-62.69469203572179,-6.235281750401378,0 +-62.67306998589287,-6.215501010288571,0 +-62.64538486875815,-6.189123095377832,0 +-62.63111304824086,-6.171639820807968,0 +-62.6072405168706,-6.143136146336122,0 +-62.58733439865703,-6.118803851650338,0 +-62.57251954697735,-6.101477745543919,0 +-62.56377642626887,-6.08982059611397,0 +-62.5481912588087,-6.064901496588091,0 +-62.52861170342813,-6.033997595135174,0 +-62.51185625845627,-6.005190938770992,0 +-62.49596425419576,-5.979486141351353,0 +-62.48933947545881,-5.969857214204213,0 +-62.47941116329275,-5.962337579774178,0 +-62.45876848256476,-5.946875739455359,0 +-62.43901236501567,-5.932067424503014,0 +-62.42066500224377,-5.911891339291116,0 +-62.39944522718194,-5.889564925383209,0 +-62.36855126888472,-5.856590542914053,0 +-62.35075318640977,-5.836853688207871,0 +-62.34734906414659,-5.833776611294222,0 +-62.3452334602164,-5.831028106630485,0 +-62.33625940727082,-5.821861163903902,0 +-62.33088443892118,-5.815852293187884,0 +-62.32986197349352,-5.814357891717679,0 +-62.32797394882997,-5.812234677157886,0 +-62.31820195319537,-5.798392583847639,0 +-62.30210888841754,-5.7749606318884,0 +-62.28979051132327,-5.756944393320648,0 +-62.27747445258739,-5.7377935655105,0 +-62.26797835751336,-5.722175509575851,0 +-62.25993389472967,-5.709909538122325,0 +-62.24684723384731,-5.688852144006903,0 +-62.22542396360885,-5.654723605739479,0 +-62.21259292671539,-5.633610589079723,0 +-62.21156904080319,-5.633610710061172,0 +-62.2110983573448,-5.63258746040798,0 +-62.20999797876262,-5.630933267775474,0 +-62.21031613857805,-5.629914361971331,0 +-62.21079196260804,-5.629293447393517,0 +-62.20890456359529,-5.626453254425746,0 +-62.20334516407385,-5.619023216698908,0 +-62.19297687168167,-5.602518894647964,0 +-62.18860758023604,-5.596780365427004,0 +-62.17864548584472,-5.580683102354668,0 +-62.16813616628285,-5.564119584812897,0 +-62.15921485934308,-5.549710259828877,0 +-62.15260740492687,-5.541158575657734,0 +-62.14326588827773,-5.529628789736825,0 +-62.13729705119253,-5.523339836939935,0 +-62.13565527240562,-5.520745035691129,0 +-62.13432461045719,-5.519643890727325,0 +-62.12976775331773,-5.514239398416469,0 +-62.12766350607217,-5.510703368411521,0 +-62.12421894375528,-5.504899065388097,0 +-62.11800627283692,-5.494451460104806,0 +-62.11588243452641,-5.489744842533638,0 +-62.11152648162904,-5.479761961197332,0 +-62.10603230671079,-5.466554709471986,0 +-62.10138596664712,-5.456772195191316,0 +-62.09591192806231,-5.447065169635559,0 +-62.08899844374524,-5.432492896521259,0 +-62.08350376711358,-5.420656068564475,0 +-62.07724130365841,-5.411188468585686,0 +-62.06771589276185,-5.39827854492848,0 +-62.05756937007821,-5.384647363082395,0 +-62.04992474692433,-5.373924294149291,0 +-62.04204751240596,-5.362831870734129,0 +-62.03572901336175,-5.354432441996687,0 +-62.02610936715173,-5.341971182936617,0 +-62.01736820639729,-5.329412718450665,0 +-62.01142372934664,-5.322705364385138,0 +-62.00483381928601,-5.319327794274064,0 +-61.99889669494904,-5.317144781432726,0 +-61.99052006515079,-5.313894346397734,0 +-61.98005248778991,-5.309949562200642,0 +-61.96651002488012,-5.304733888602526,0 +-61.95342008235669,-5.299825252799575,0 +-61.94599507998261,-5.296791424022667,0 +-61.94127995390058,-5.294225906572786,0 +-61.93879394500567,-5.291720385944354,0 +-61.93673824591794,-5.289715556644321,0 +-61.93240881780813,-5.285755133393123,0 +-61.92091239236785,-5.274380194278029,0 +-61.90929506089822,-5.262844082881118,0 +-61.90002890983994,-5.253830755535914,0 +-61.89006966703717,-5.244298538329062,0 +-61.87873437808287,-5.233019464631815,0 +-61.86829796467095,-5.222688005120112,0 +-61.86187722118802,-5.216787704039513,0 +-61.85093269011186,-5.209723777341076,0 +-61.83980374129103,-5.202870912553507,0 +-61.83001161659718,-5.196688806590503,0 +-61.814895313919,-5.186135492239363,0 +-61.8029372608182,-5.1796224822796,0 +-61.79175190350686,-5.172634167807492,0 +-61.77761279725069,-5.163048938977277,0 +-61.76535347664773,-5.152772662081395,0 +-61.75473424383182,-5.143839503715299,0 +-61.74491365375135,-5.135774682321092,0 +-61.73905855145414,-5.130403482932921,0 +-61.73272400553916,-5.125410851030227,0 +-61.72464496375009,-5.118508123051908,0 +-61.71720145153667,-5.111762966422951,0 +-61.71334634392214,-5.108453168804052,0 +-61.70672647353542,-5.102802755395163,0 +-61.70548704569624,-5.101695667677242,0 +-61.70425501684949,-5.100528429592197,0 +-61.70235084957254,-5.098845797100428,0 +-61.70074243021606,-5.097333617573314,0 +-61.69923821479811,-5.095968346451161,0 +-61.69849701715735,-5.09528519285525,0 +-61.69796224755467,-5.094767259881496,0 +-61.69723866687871,-5.094087312335765,0 +-61.69613117107153,-5.093126824883354,0 +-61.69494868171954,-5.092044702592936,0 +-61.69372234894057,-5.090948844425448,0 +-61.69290110869373,-5.090156958834904,0 +-61.69175019995331,-5.089101960750329,0 +-61.69094975296356,-5.088372887604539,0 +-61.68985706049635,-5.087374474988545,0 +-61.68853238633393,-5.086162136721989,0 +-61.68775693960694,-5.085482480827249,0 +-61.68672337856965,-5.084548633504187,0 +-61.68575600790426,-5.08364002198203,0 +-61.68450888660846,-5.082516512137239,0 +-61.68329777471907,-5.081406772017849,0 +-61.68208466335216,-5.080264698980709,0 +-61.68107551528541,-5.079394249703403,0 +-61.67982567739377,-5.078217921432798,0 +-61.6781834632703,-5.076776963119649,0 +-61.67698651913548,-5.075640523296713,0 +-61.67559789870317,-5.074430752207439,0 +-61.67446382583474,-5.073334724753529,0 +-61.673156621204,-5.0721531422166,0 +-61.67104898236742,-5.070209409798059,0 +-61.66928757342556,-5.068633354661546,0 +-61.66789953525494,-5.067336485549339,0 +-61.66635492759906,-5.065935671694885,0 +-61.66481932071044,-5.064528326773222,0 +-61.66351229029357,-5.063362293972578,0 +-61.6622978479821,-5.062202240795509,0 +-61.66159280011785,-5.061612837430662,0 +-61.66066850964172,-5.06073706374419,0 +-61.65986233208476,-5.060027062001748,0 +-61.65916815367554,-5.059407861702735,0 +-61.65827356554863,-5.058561336924607,0 +-61.65753413371799,-5.057914111658969,0 +-61.65717470225885,-5.057540674509288,0 +-61.65685060051261,-5.057282850770343,0 +-61.65656113914028,-5.057025850765221,0 +-61.65612175153257,-5.056650110967683,0 +-61.65548784877716,-5.05604545940944,0 +-61.65509410599331,-5.055668950573265,0 +-61.6546521889402,-5.055231033730678,0 +-61.65397652249687,-5.05467229782323,0 +-61.65357497054912,-5.054225825426012,0 +-61.65313682629114,-5.053884405277699,0 +-61.65248886921952,-5.053316181868994,0 +-61.65161170458296,-5.052489480638684,0 +-61.65085129314645,-5.051810118242314,0 +-61.65066567780369,-5.051615461283908,0 +-61.65023698909398,-5.051233398972962,0 +-61.64991084977378,-5.050932387676173,0 +-61.64957530415105,-5.050623735474905,0 +-61.64881564539995,-5.049933892011783,0 +-61.6480012896907,-5.049181769464399,0 +-61.64694317815208,-5.048206887707313,0 +-61.64622222458511,-5.047572106612276,0 +-61.64552583322993,-5.046920844581836,0 +-61.64445699484963,-5.045960062549093,0 +-61.64364005519834,-5.045176332024927,0 +-61.6423410576126,-5.044025683339059,0 +-61.64165399109862,-5.043388143594043,0 +-61.64095606582752,-5.042738968233746,0 +-61.64030299691292,-5.042158034369115,0 +-61.63960272645453,-5.041484167402693,0 +-61.63870187975231,-5.040679520436655,0 +-61.6385278875268,-5.040551754825875,0 +-61.63834167837178,-5.040356430438279,0 +-61.63744720637916,-5.039514236008404,0 +-61.63678876089011,-5.038912589999714,0 +-61.635888254672,-5.038097401720548,0 +-61.63554485279537,-5.037791109515557,0 +-61.6349438787239,-5.037237136528761,0 +-61.63407399889489,-5.036450675873323,0 +-61.63320686136869,-5.035623172816794,0 +-61.63212455237061,-5.034670858821755,0 +-61.63101633485153,-5.033612537548512,0 +-61.6294803281265,-5.032239618158938,0 +-61.62824863298432,-5.031119570573508,0 +-61.62764276731323,-5.030552810403902,0 +-61.6271021039295,-5.030067316777475,0 +-61.62630242712699,-5.02932030057751,0 +-61.62534337242529,-5.02844767500561,0 +-61.62468440904151,-5.027842713853089,0 +-61.6239541436163,-5.027167861654208,0 +-61.62292077480407,-5.026206217309179,0 +-61.62165349834948,-5.025064874964654,0 +-61.62121915350346,-5.024659074672115,0 +-61.62022150779597,-5.02375508658753,0 +-61.61928107392723,-5.02292053637919,0 +-61.61847700456139,-5.022189990153756,0 +-61.61758674499385,-5.021330546418998,0 +-61.61650815192442,-5.020405823962613,0 +-61.61530642650717,-5.019311348311613,0 +-61.61476437504977,-5.01876617649422,0 +-61.61395716543765,-5.018023628534749,0 +-61.61344269833084,-5.017573897012502,0 +-61.61291656431866,-5.017068628178375,0 +-61.61242348428598,-5.01660496042695,0 +-61.61182656238714,-5.016073237461414,0 +-61.61107453365544,-5.015401072442756,0 +-61.61041677330535,-5.014800774334439,0 +-61.60990313994399,-5.014285573653879,0 +-61.60937858781138,-5.013832278775198,0 +-61.60836253112845,-5.012895879437651,0 +-61.60773315016284,-5.012319932134986,0 +-61.6070610672235,-5.011706930408198,0 +-61.60627695581378,-5.010970601000353,0 +-61.60571105093878,-5.010449573541957,0 +-61.60518407808209,-5.009968712732614,0 +-61.60478297376065,-5.009595670875107,0 +-61.60413648910476,-5.009012628478238,0 +-61.60359153587524,-5.008548089973013,0 +-61.60296852481064,-5.007986941825571,0 +-61.602415142111,-5.007425192058422,0 +-61.60179123812968,-5.006880767118377,0 +-61.60084699105845,-5.005993791833168,0 +-61.60015731484071,-5.005374411403563,0 +-61.59930970768429,-5.004594093139493,0 +-61.59861286946252,-5.0039350931572,0 +-61.59767611032471,-5.003102886993058,0 +-61.59642224729204,-5.001960128264082,0 +-61.59550515057774,-5.001107893735022,0 +-61.59456694313396,-5.000272544331493,0 +-61.59356092494892,-4.999308474958724,0 +-61.59225996903982,-4.998104642963282,0 +-61.59199682143299,-4.997885641649756,0 +-61.59121637039398,-4.997182090147319,0 +-61.59045230260798,-4.996467587724438,0 +-61.58956210198046,-4.995649461198466,0 +-61.58848619643563,-4.994665907707878,0 +-61.58737959750224,-4.993660062535223,0 +-61.58639314919141,-4.992739549358542,0 +-61.58549891503279,-4.99191528631986,0 +-61.58421833625045,-4.990741801435466,0 +-61.58264937940726,-4.989315154225321,0 +-61.58144996245942,-4.988211087352335,0 +-61.58055322165026,-4.987394608735548,0 +-61.57952460107233,-4.986437202768977,0 +-61.57832033621814,-4.985353336808543,0 +-61.57751653445566,-4.984615898403445,0 +-61.57637425354511,-4.983565358754896,0 +-61.57550479413946,-4.982780845252435,0 +-61.57490540533587,-4.982252596372184,0 +-61.57392519898043,-4.981318168973259,0 +-61.57305682654097,-4.980503816083982,0 +-61.57267535200935,-4.980103534124311,0 +-61.57247556091762,-4.980011796551442,0 +-61.57195362547186,-4.979521386302151,0 +-61.57150800859704,-4.979082424751752,0 +-61.57081770087651,-4.97846966620662,0 +-61.57037512418879,-4.978079560573808,0 +-61.56930135683278,-4.977081305220376,0 +-61.56860541050924,-4.976453154792771,0 +-61.56823390548489,-4.976094153917884,0 +-61.5668143821789,-4.974819695548602,0 +-61.56595032705853,-4.974014607885097,0 +-61.56538090413312,-4.97349125862184,0 +-61.56488292933217,-4.973036434345644,0 +-61.56427298202603,-4.972478560838741,0 +-61.56365041648207,-4.971918462942803,0 +-61.56300845223233,-4.971337605749006,0 +-61.56225504548425,-4.970633979308,0 +-61.56181117427138,-4.970246144221874,0 +-61.56124276211177,-4.969696543972843,0 +-61.56042010979136,-4.968959170278154,0 +-61.56010038533248,-4.968680872704862,0 +-61.55935963135007,-4.96810443919266,0 +-61.55862682849331,-4.967520426102059,0 +-61.55832262526435,-4.967266562454285,0 +-61.55810866760036,-4.967115708734933,0 +-61.55740147068497,-4.966622867883146,0 +-61.55690281677035,-4.966225769331664,0 +-61.55640625960414,-4.965890267938107,0 +-61.55579514247631,-4.96541050291032,0 +-61.55525170536669,-4.964962633678565,0 +-61.55459173940531,-4.96447075215256,0 +-61.55406051132724,-4.964084787087923,0 +-61.55317080425752,-4.963372571994728,0 +-61.55214387672827,-4.962592229574025,0 +-61.5514297898134,-4.962039310262137,0 +-61.54970446808912,-4.960752496804472,0 +-61.54831071451627,-4.959670627954995,0 +-61.54707109240734,-4.958729769972341,0 +-61.54579338287044,-4.957789442277573,0 +-61.54420968741468,-4.956619371385253,0 +-61.54324218548485,-4.955869650844122,0 +-61.54184041083438,-4.954803718147286,0 +-61.54116166223831,-4.954257792530695,0 +-61.5399362230726,-4.953398265779676,0 +-61.5391532984124,-4.952785509331877,0 +-61.53868582164232,-4.952420610082309,0 +-61.53674199264206,-4.950972278937003,0 +-61.53441258054793,-4.949259393426991,0 +-61.53254688606733,-4.947848408800139,0 +-61.53160634118616,-4.947106336550618,0 +-61.53051961579321,-4.946303568912929,0 +-61.52895766744523,-4.945083976600485,0 +-61.52771877848021,-4.944104166597695,0 +-61.52649831162194,-4.943232112591013,0 +-61.5257355099689,-4.942646493546097,0 +-61.52499863017145,-4.942054601254593,0 +-61.52487276334865,-4.941971402883926,0 +-61.52305009367299,-4.9406652640831,0 +-61.52151971739498,-4.939445186214333,0 +-61.52020945452573,-4.938435441473321,0 +-61.51825955821456,-4.936977893640814,0 +-61.51727386206556,-4.936193562662287,0 +-61.51679980867497,-4.935850541523533,0 +-61.51591764459852,-4.935207725645647,0 +-61.5156604428274,-4.934991372688859,0 +-61.51554116258146,-4.93484408915316,0 +-61.5153805717676,-4.934780727737711,0 +-61.51521165440604,-4.93465363645254,0 +-61.51503875307716,-4.934495732961341,0 +-61.51412742236099,-4.933794210163999,0 +-61.51291372109763,-4.932867878175704,0 +-61.51148225936441,-4.931764139579148,0 +-61.51045585017014,-4.931000116684186,0 +-61.50876652049257,-4.929693762593586,0 +-61.50786760284032,-4.929027829012067,0 +-61.5072479814512,-4.928554168930812,0 +-61.50632736377693,-4.92784184755617,0 +-61.50603826265493,-4.927648506619426,0 +-61.50505305354519,-4.926853183305282,0 +-61.50333030454455,-4.925555812552853,0 +-61.50241894886457,-4.924881682494536,0 +-61.50108665855004,-4.923827898162525,0 +-61.49995327730467,-4.922977366160121,0 +-61.49803091380701,-4.921508057731142,0 +-61.49658226032119,-4.920422806068283,0 +-61.49502984524398,-4.919207195296086,0 +-61.49337609200935,-4.917943594314548,0 +-61.49183728497363,-4.916958184353676,0 +-61.49075585244989,-4.916336788856085,0 +-61.48927152823853,-4.915580277503144,0 +-61.48774030699712,-4.914824344942092,0 +-61.48621050669949,-4.914065682365893,0 +-61.48467938258986,-4.913268306373308,0 +-61.48365365400329,-4.912788651200876,0 +-61.48284861541616,-4.91233493011416,0 +-61.48251459136868,-4.912231208587419,0 +-61.48243497883981,-4.912103320348632,0 +-61.48182200687814,-4.911828631700321,0 +-61.4803341927846,-4.911058645337034,0 +-61.47796901236638,-4.909907065652481,0 +-61.47579634883957,-4.908816934096322,0 +-61.47334105566856,-4.907601036523301,0 +-61.4714235715589,-4.906640573766311,0 +-61.47000615869707,-4.905881282583781,0 +-61.46797990139823,-4.904844118032765,0 +-61.46773677192801,-4.904676617978113,0 +-61.46759761723748,-4.904564740183903,0 +-61.46757010960847,-4.904459906859794,0 +-61.46744487853554,-4.904383075958616,0 +-61.46700364972425,-4.90418544868795,0 +-61.46665818646701,-4.904109260682863,0 +-61.46638940878621,-4.904084171112539,0 +-61.4655133395183,-4.903629771126772,0 +-61.46280332427443,-4.902267200047084,0 +-61.46170856056083,-4.901753936635564,0 +-61.45969198410977,-4.900742875105691,0 +-61.4576008595807,-4.89970753552296,0 +-61.45549770196516,-4.898643096714691,0 +-61.45292978599982,-4.897333930760145,0 +-61.4517785221136,-4.896741440832144,0 +-61.45094233623892,-4.896341401010366,0 +-61.45015832032802,-4.895953420788927,0 +-61.44924387094163,-4.895484199172515,0 +-61.4485797489392,-4.895140368305742,0 +-61.44717916120329,-4.894335351312225,0 +-61.44583367366693,-4.893376479586814,0 +-61.44508153401081,-4.892764270549445,0 +-61.44406309392328,-4.891797675939608,0 +-61.44367159867662,-4.891410379401905,0 +-61.44277940459531,-4.890378389103002,0 +-61.44206939767429,-4.889536481966427,0 +-61.44107473990155,-4.888169713665206,0 +-61.44000199053487,-4.886355637496496,0 +-61.43888704059779,-4.884510254711946,0 +-61.43845175612562,-4.883811513656355,0 +-61.43759503346803,-4.88240010463581,0 +-61.43710259372897,-4.881582391009761,0 +-61.43620948221164,-4.880136426224982,0 +-61.43534213378058,-4.878712521379837,0 +-61.43449327729552,-4.877308732138954,0 +-61.43385863550149,-4.876250128071142,0 +-61.43334395512348,-4.875432279358562,0 +-61.43259427559827,-4.874174139307809,0 +-61.4323088652365,-4.87369703629129,0 +-61.43176136667704,-4.872832506816535,0 +-61.43153019525335,-4.872487321471409,0 +-61.43082645416717,-4.871338487052176,0 +-61.43004177873436,-4.869986326879338,0 +-61.42941200186824,-4.868978559626145,0 +-61.42875815867563,-4.867908849166954,0 +-61.42795227570402,-4.866581712831788,0 +-61.42706060851825,-4.865117718567735,0 +-61.42665826466399,-4.864480002751578,0 +-61.42594177892213,-4.863315903396228,0 +-61.42550041227768,-4.862597351632574,0 +-61.42471842224338,-4.861245749515595,0 +-61.42439166578695,-4.86093371191864,0 +-61.42404840186006,-4.860645449617196,0 +-61.42360203727519,-4.860379152171935,0 +-61.422885297998,-4.859293986608355,0 +-61.4227739485997,-4.858498760945896,0 +-61.42209424614863,-4.857511340128214,0 +-61.42122406531676,-4.856674994708793,0 +-61.42061563934966,-4.855914874106709,0 +-61.42004134761197,-4.855000829623326,0 +-61.41905084668564,-4.854692916200443,0 +-61.4185476785913,-4.853927245411429,0 +-61.41765470962603,-4.85305886545429,0 +-61.41620854580208,-4.851809561987125,0 +-61.41246514604327,-4.848415028606022,0 +-61.41058695630841,-4.846590543464393,0 +-61.40812126486652,-4.844500009748984,0 +-61.40592433164762,-4.842370659816573,0 +-61.40398316672532,-4.840580875848043,0 +-61.40140918521962,-4.838300739249503,0 +-61.39876476212,-4.836025136298575,0 +-61.39683680234474,-4.834164848234027,0 +-61.3944144500793,-4.831770753394562,0 +-61.39199655428688,-4.829911656990892,0 +-61.3885536457421,-4.826619703676891,0 +-61.38477995596025,-4.82331763621215,0 +-61.37998684922889,-4.81890786886522,0 +-61.3775276578962,-4.816512096989466,0 +-61.37469808238208,-4.814398268105223,0 +-61.37246876124614,-4.812077847578256,0 +-61.36948639235477,-4.809538040175586,0 +-61.36895854949501,-4.808818265603723,0 +-61.36456920334186,-4.805194028892799,0 +-61.36228393705648,-4.803286840061837,0 +-61.35956552127624,-4.800634038547034,0 +-61.35048990753484,-4.79251700167814,0 +-61.34627118985966,-4.788959520943092,0 +-61.33970293074188,-4.782807547398589,0 +-61.33215877241314,-4.77650097647769,0 +-61.32679990415176,-4.771417822217725,0 +-61.32299904546991,-4.768269970054464,0 +-61.31951735027114,-4.764918663340613,0 +-61.31747346305335,-4.762411181917123,0 +-61.31367659742702,-4.757403406903735,0 +-61.31200679790237,-4.754625380309343,0 +-61.31078901838283,-4.752602718190826,0 +-61.30984376902174,-4.752338213827308,0 +-61.30927469606957,-4.752109186821271,0 +-61.30859077485592,-4.751384282369368,0 +-61.30829207584491,-4.750131071031051,0 +-61.30739576738662,-4.748125306799071,0 +-61.30571250581357,-4.743822771136701,0 +-61.30463342002267,-4.74162799052849,0 +-61.30323072105013,-4.738309943688981,0 +-61.30221356837266,-4.736365626727862,0 +-61.30189757700668,-4.735156584434264,0 +-61.30162817831061,-4.734286305889012,0 +-61.30212764663359,-4.733603079792451,0 +-61.30243575780793,-4.732881283142558,0 +-61.30193935956693,-4.732498889631016,0 +-61.30098581069844,-4.731999984119565,0 +-61.29982050494793,-4.730246961729041,0 +-61.29934221126513,-4.728350723359777,0 +-61.29723391930857,-4.724660371846369,0 +-61.29668858784186,-4.722861313662433,0 +-61.29619099378437,-4.72167404972467,0 +-61.29569292141141,-4.720332410286169,0 +-61.29521383438138,-4.719237680042703,0 +-61.29438021650952,-4.717439480093653,0 +-61.2932827041954,-4.715069431694681,0 +-61.29240862505617,-4.713042778790802,0 +-61.29180184138247,-4.711513600163395,0 +-61.29082452549023,-4.709413090798076,0 +-61.28995300184513,-4.707274560812234,0 +-61.28926226791649,-4.705935612128276,0 +-61.28877246260743,-4.704369125931321,0 +-61.28850870797641,-4.703299341401366,0 +-61.28667108752869,-4.699289367956307,0 +-61.28527352499798,-4.696427868803047,0 +-61.28383124885035,-4.692483737918312,0 +-61.28288394736889,-4.69038927244634,0 +-61.28102731843906,-4.685787999264836,0 +-61.27865365178678,-4.680831256258935,0 +-61.2776034988999,-4.677068621594261,0 +-61.27519445702803,-4.672498989809686,0 +-61.27312090891339,-4.667939607540781,0 +-61.26965100743598,-4.660890112607567,0 +-61.26663494752942,-4.656954756686512,0 +-61.26512819657,-4.654179831717,0 +-61.26437825302359,-4.653082257532925,0 +-61.26338498989632,-4.65181776226393,0 +-61.25948221160721,-4.64536179109021,0 +-61.25427444865246,-4.637687081874607,0 +-61.25093122268257,-4.632580355939206,0 +-61.24734087617752,-4.626845680208406,0 +-61.24452064835626,-4.623881587080287,0 +-61.24174591941618,-4.621136348445391,0 +-61.2389808494279,-4.618707317331028,0 +-61.23709206229589,-4.616086461119353,0 +-61.23331028677726,-4.612288709868839,0 +-61.22933005313185,-4.607996619217585,0 +-61.22476641101692,-4.603686336115814,0 +-61.22193209544452,-4.600990044647832,0 +-61.22014140911016,-4.599262194837734,0 +-61.21791552174103,-4.596445899112162,0 +-61.21666267088447,-4.595644345400683,0 +-61.21496157580857,-4.593972333678048,0 +-61.21303809081598,-4.591810333060888,0 +-61.21099103489114,-4.589552942176916,0 +-61.20712572409691,-4.585708114680158,0 +-61.20388828384512,-4.582251194259046,0 +-61.19844010190432,-4.576718924120329,0 +-61.19525388461256,-4.573495474185646,0 +-61.19102544644403,-4.568830610194575,0 +-61.18846061735422,-4.566559754757049,0 +-61.18461439855951,-4.562785826443894,0 +-61.18293584015039,-4.560949441612757,0 +-61.18075883063867,-4.560366972445398,0 +-61.18022009955447,-4.559675555766757,0 +-61.18047370857329,-4.558636107997787,0 +-61.18005551065495,-4.557718259748227,0 +-61.17759655877852,-4.555177644155369,0 +-61.17414941219994,-4.552049749430743,0 +-61.17035771057356,-4.547092814290193,0 +-61.16753132162424,-4.544019015772244,0 +-61.16160207812177,-4.539464108459084,0 +-61.1572513401883,-4.53616360334958,0 +-61.14977889167417,-4.531660280976432,0 +-61.1408790080627,-4.524887609251831,0 +-61.13308904558436,-4.518854798044793,0 +-61.12313608931285,-4.51130547844459,0 +-61.11573191625477,-4.50561455583677,0 +-61.10811106915482,-4.500103178946019,0 +-61.10406063137944,-4.496812088753265,0 +-61.09615087525724,-4.490839335888048,0 +-61.08925205302574,-4.485307015093769,0 +-61.08020701649975,-4.478406369020202,0 +-61.071484338519,-4.472039691426539,0 +-61.06428624649409,-4.466572403200643,0 +-61.05517219103194,-4.459525213388426,0 +-61.04971736849181,-4.455157264260357,0 +-61.03959296934465,-4.447513262900772,0 +-61.03007602132381,-4.440227029876074,0 +-61.0238847007943,-4.435325455895121,0 +-61.01555229566119,-4.428877022481005,0 +-61.00842142978509,-4.42338293130335,0 +-61.00218661125233,-4.417895125535501,0 +-60.99390805470191,-4.41089377459519,0 +-60.98461460265321,-4.402684080242655,0 +-60.97751830420705,-4.395918477709637,0 +-60.96847316929986,-4.388090428920025,0 +-60.95529923404464,-4.376584345191323,0 +-60.94361931783962,-4.366277044746374,0 +-60.93347455370364,-4.356935522306902,0 +-60.92414363677813,-4.348804915005627,0 +-60.91789989254837,-4.343132489639169,0 +-60.90981116521161,-4.335822484010061,0 +-60.90156680276949,-4.328392824814263,0 +-60.88976317182793,-4.318055144493152,0 +-60.88172871833404,-4.311170803572273,0 +-60.8737700506252,-4.30391341408344,0 +-60.86474745689159,-4.29604034241293,0 +-60.85645411106838,-4.288620034968057,0 +-60.84988965655572,-4.282538997868468,0 +-60.84383058400249,-4.27082944583069,0 +-60.837507293843,-4.257616293851162,0 +-60.83169814105242,-4.245557996815331,0 +-60.82598123032458,-4.233019099343328,0 +-60.82431450417042,-4.229313446610789,0 +-60.82244319247286,-4.223308729036454,0 +-60.82012813005437,-4.21648398988207,0 +-60.81778686085851,-4.208966793314374,0 +-60.81534685165774,-4.201343240567565,0 +-60.81192208692518,-4.194025558602683,0 +-60.8080562957277,-4.184330761721355,0 +-60.80592285937666,-4.180067939379461,0 +-60.80507564787428,-4.177908733156345,0 +-60.80216667247926,-4.172962664094931,0 +-60.80213137309968,-4.171895651804642,0 +-60.79803257624636,-4.168485461664338,0 +-60.79290102455467,-4.165073941472994,0 +-60.78764239316257,-4.161123074941971,0 +-60.77944577964871,-4.154945252463923,0 +-60.77256310296199,-4.149956785120391,0 +-60.76571857191497,-4.144864120122573,0 +-60.75736345506208,-4.13858268003761,0 +-60.75626568546848,-4.137590532697685,0 +-60.75320753133759,-4.135305843167512,0 +-60.74644746819287,-4.130138267132518,0 +-60.74412466625601,-4.129038378153018,0 +-60.73731591586713,-4.123513220292023,0 +-60.72789537085531,-4.116238494743682,0 +-60.71943024854747,-4.110094452240604,0 +-60.71601465703863,-4.107456366164,0 +-60.70898555764244,-4.101990085915023,0 +-60.69987003343707,-4.095430145148676,0 +-60.68966207542073,-4.08806827375322,0 +-60.67883613187075,-4.079855135536543,0 +-60.6688401142216,-4.07244480118858,0 +-60.65888889230141,-4.065045832959984,0 +-60.65108401898729,-4.059251850029044,0 +-60.64254327882151,-4.053223298124908,0 +-60.63426127578603,-4.046598460481066,0 +-60.62384992910781,-4.039273359232133,0 +-60.61469060820104,-4.032340424034409,0 +-60.60553041064096,-4.025895001098077,0 +-60.5932847258192,-4.016395523226111,0 +-60.58780146049681,-4.012063890896359,0 +-60.57872348245696,-4.005647855777402,0 +-60.56959826197369,-3.998877196154376,0 +-60.56023138501081,-3.991676415887258,0 +-60.55080318434179,-3.984971189305868,0 +-60.54229696618368,-3.97823336778422,0 +-60.5316478159382,-3.970634100902969,0 +-60.52546266287209,-3.966739043911081,0 +-60.51784509973684,-3.960651234828414,0 +-60.51190833637303,-3.956210548586554,0 +-60.50567161263623,-3.951117231672377,0 +-60.50131860188878,-3.947850107462927,0 +-60.49819587078067,-3.945851901253197,0 +-60.49656334864091,-3.944274365742384,0 +-60.49398541054608,-3.9425936937717,0 +-60.4891222485269,-3.938304965650206,0 +-60.48252017649325,-3.933314502562591,0 +-60.47712764758162,-3.929354921708284,0 +-60.47233677472259,-3.925770684942171,0 +-60.46840794707897,-3.922790565192125,0 +-60.46234802213078,-3.918258575465726,0 +-60.45827359631912,-3.915230848868905,0 +-60.45605443721857,-3.913327602081488,0 +-60.4539186202872,-3.909762468474981,0 +-60.45138468803281,-3.905419249315189,0 +-60.45039642984391,-3.903776317445432,0 +-60.44795765376292,-3.901118845201833,0 +-60.44444569820798,-3.898068124112477,0 +-60.44115878667023,-3.894988798590731,0 +-60.43992597723545,-3.893785685700042,0 +-60.43846501596574,-3.892762077714042,0 +-60.43785676492732,-3.89251931357105,0 +-60.4364345488834,-3.892201055755007,0 +-60.4356059868614,-3.8921799841292,0 +-60.42980046300135,-3.892228180091161,0 +-60.42829282903921,-3.891786903552017,0 +-60.42725032806061,-3.891216569788833,0 +-60.42550131395834,-3.889895286751251,0 +-60.42231997180824,-3.887222350100778,0 +-60.42021531268529,-3.885457777801206,0 +-60.4186769927309,-3.884128026416199,0 +-60.41310314466705,-3.879446656579767,0 +-60.41018273905744,-3.877038619905688,0 +-60.40851607905475,-3.875648708110096,0 +-60.40751938974257,-3.874793989735281,0 +-60.40550875966299,-3.873088490015058,0 +-60.40078754108298,-3.869079027945625,0 +-60.39779586451698,-3.866588886161738,0 +-60.3954144493229,-3.864291405669822,0 +-60.39212204629545,-3.860526693895349,0 +-60.38953744673312,-3.857619286889637,0 +-60.38710724228741,-3.854821962324622,0 +-60.3849965235243,-3.852545233058296,0 +-60.38111518254659,-3.847986075178819,0 +-60.37914028553736,-3.84572314847457,0 +-60.37758178898692,-3.84402129682421,0 +-60.37677464078661,-3.842999495355556,0 +-60.37628298506594,-3.842556171568636,0 +-60.37493241182796,-3.839677509074453,0 +-60.37353625499778,-3.836472498327991,0 +-60.37183988848316,-3.832851320064864,0 +-60.37101254373457,-3.83194323108955,0 +-60.36970566369748,-3.830958760649548,0 +-60.36629901954122,-3.828219700939044,0 +-60.36458631573679,-3.82764683113361,0 +-60.36387506828718,-3.826854739535718,0 +-60.36386774670743,-3.826310477796231,0 +-60.36347548694465,-3.825942388257222,0 +-60.36261856353929,-3.825516778513503,0 +-60.36139547821993,-3.824981280419187,0 +-60.35751213803627,-3.822959020084376,0 +-60.35636579474268,-3.822187945126052,0 +-60.35378977111161,-3.820239812783997,0 +-60.35238419080277,-3.819176469659938,0 +-60.34945035420885,-3.816914525410784,0 +-60.34653158748775,-3.814581226733198,0 +-60.34538822840729,-3.813702435419647,0 +-60.34235169774573,-3.811419778175488,0 +-60.339558097704,-3.809316782621909,0 +-60.33703629804648,-3.808066302391687,0 +-60.33545768491418,-3.807267629623448,0 +-60.33235436532977,-3.805701046862455,0 +-60.3312022910344,-3.805126152516344,0 +-60.32726115697324,-3.803168893054313,0 +-60.32307549343889,-3.80111928944692,0 +-60.31904334209303,-3.799123886458825,0 +-60.31584933193376,-3.797444911259312,0 +-60.31327183129251,-3.796183638255819,0 +-60.3119165003292,-3.79505555438405,0 +-60.31094582189611,-3.793374244491149,0 +-60.31040276489227,-3.790312083409216,0 +-60.30990715118195,-3.786159606094327,0 +-60.30946306658559,-3.781948081221119,0 +-60.30914811674996,-3.780444659094652,0 +-60.30850279504831,-3.778672184955953,0 +-60.3079650575634,-3.777528104620653,0 +-60.30586350134419,-3.773507652373756,0 +-60.30279972401753,-3.768312270983817,0 +-60.30107034063046,-3.765158433438196,0 +-60.29689397354251,-3.758657408951414,0 +-60.29329292056377,-3.752610702149316,0 +-60.29082795588684,-3.748626930306656,0 +-60.28830485991151,-3.744605751974941,0 +-60.28552760421009,-3.739911167032722,0 +-60.28231282907691,-3.73464768949956,0 +-60.28022854764141,-3.731257517152113,0 +-60.27867453073613,-3.727916597012427,0 +-60.27792463959058,-3.725232760890445,0 +-60.27756721549428,-3.723475306286456,0 +-60.2774187724274,-3.721322046947627,0 +-60.27724130507938,-3.719325804050486,0 +-60.27715935026154,-3.718654893633063,0 +-60.27677699818847,-3.71377290141492,0 +-60.27630193775497,-3.708674547513136,0 +-60.27577842512589,-3.70307468485636,0 +-60.27544466069941,-3.699561166327642,0 +-60.27511211264092,-3.695158095093618,0 +-60.27415390331362,-3.691314082112092,0 +-60.27336856723642,-3.688722410796263,0 +-60.27284316306234,-3.687223162629031,0 +-60.27197150745607,-3.684719384899307,0 +-60.27030747080847,-3.679640564963978,0 +-60.26957814939063,-3.677608524948184,0 +-60.26721019904718,-3.670759564782071,0 +-60.26649132508095,-3.66876115591904,0 +-60.26614980603128,-3.667536545031738,0 +-60.26483886738676,-3.66382219181421,0 +-60.26458022056616,-3.662973720769377,0 +-60.26310179101763,-3.658282541939596,0 +-60.26157099737572,-3.654021058384096,0 +-60.26034754954749,-3.650343388768618,0 +-60.25873181340737,-3.645879273936065,0 +-60.25717666166313,-3.641136661101713,0 +-60.25611394733685,-3.638478399161417,0 +-60.25514664734354,-3.636909883857702,0 +-60.25302442592815,-3.633803339983412,0 +-60.2509251138598,-3.630480781171665,0 +-60.24968063426635,-3.628724666452821,0 +-60.24747389854349,-3.626653270337476,0 +-60.24473223171269,-3.624219606839569,0 +-60.24273515336494,-3.622378048749126,0 +-60.23939372920491,-3.619426548729098,0 +-60.23555990470778,-3.616005163341644,0 +-60.2338300543731,-3.614484615531094,0 +-60.22944265089079,-3.610418117495172,0 +-60.22508976112545,-3.606528433205319,0 +-60.22148999346427,-3.603386576220343,0 +-60.21687154288337,-3.59919235777678,0 +-60.21375298460835,-3.596378555705044,0 +-60.20839227703958,-3.590873159534009,0 +-60.2028216105478,-3.584949318164035,0 +-60.19920313391965,-3.581042535453395,0 +-60.19330610900523,-3.575506091142017,0 +-60.1889949922472,-3.570772596124292,0 +-60.18373026410013,-3.56517677074793,0 +-60.18053011256815,-3.561622168536319,0 +-60.17594650802459,-3.556736619847666,0 +-60.17168473477487,-3.552233434579238,0 +-60.17022148032174,-3.549996344569867,0 +-60.16881209991369,-3.549283234868986,0 +-60.16863575839525,-3.548646418119844,0 +-60.16618652563118,-3.54638469962679,0 +-60.1596592139189,-3.539548934569237,0 +-60.15533462683015,-3.534803121972566,0 +-60.15018373663095,-3.529779110793389,0 +-60.1488780940243,-3.527269659514112,0 +-60.14771192747722,-3.52726253049805,0 +-60.14701649735142,-3.526028075202709,0 +-60.14596277064543,-3.524823389954816,0 +-60.1436435527382,-3.522908074963992,0 +-60.13930905242155,-3.518077701288783,0 +-60.133330194096,-3.511783252989277,0 +-60.12904950886958,-3.507098536106741,0 +-60.1237315417907,-3.501670829927841,0 +-60.12007100554157,-3.497978546144727,0 +-60.11270901880059,-3.490106097489989,0 +-60.10791904933244,-3.484742958723162,0 +-60.10703909321907,-3.483997078731811,0 +-60.1056155433675,-3.483345335190429,0 +-60.09786737595914,-3.48026982344493,0 +-60.09419260536658,-3.478882662055583,0 +-60.0889743878321,-3.47682892987297,0 +-60.08522624469785,-3.475361053282139,0 +-60.07873638685349,-3.472836083206464,0 +-60.06990945039887,-3.46947050029447,0 +-60.06079749560327,-3.465870279735205,0 +-60.0517391168061,-3.462218114050802,0 +-60.05102571684908,-3.461799217447494,0 +-60.04880600112892,-3.461066793216114,0 +-60.03844589805541,-3.457476829499687,0 +-60.03204902063571,-3.456734803036,0 +-60.02145141922295,-3.455329039647836,0 +-60.00861278385072,-3.453865515982689,0 +-60.00639118972532,-3.452801740074206,0 +-60.00521017356885,-3.451096371497317,0 +-60.00383757883586,-3.448976134705007,0 +-59.99999671093239,-3.442610104077085,0 +-59.99894884562168,-3.441102469227052,0 +-59.9981412023354,-3.440367964611132,0 +-59.99729192697317,-3.440080542936898,0 +-59.98858094274706,-3.437844209559708,0 +-59.97942228256854,-3.435273890439738,0 +-59.97604937827685,-3.433786005178384,0 +-59.97415022629372,-3.432846562824771,0 +-59.96716402803307,-3.429624696351434,0 +-59.95785968824757,-3.427180605931455,0 +-59.94629412323878,-3.424318490228596,0 +-59.9349398730274,-3.421538119439973,0 +-59.92262414016709,-3.418594485994214,0 +-59.91478207358398,-3.416565633259756,0 +-59.91295968403441,-3.415105543867785,0 +-59.91058222373454,-3.412499747194566,0 +-59.90248739634831,-3.403415378207218,0 +-59.89591010146462,-3.396308174346048,0 +-59.88911590968705,-3.388704102738336,0 +-59.88463441750038,-3.383322161189085,0 +-59.88229689084236,-3.380390346508463,0 +-59.87976653629628,-3.376875805393676,0 +-59.87941397475699,-3.374765559258631,0 +-59.8794658455078,-3.365512818518281,0 +-59.87890233270672,-3.351804122295281,0 +-59.87866835448035,-3.340945003198547,0 +-59.87829135262608,-3.328975431601207,0 +-59.87821417257402,-3.327348573100265,0 +-59.87862575631553,-3.319139070750597,0 +-59.87805826546918,-3.312289296219183,0 +-59.87840776861268,-3.308274124684657,0 +-59.87885733337129,-3.300680026053003,0 +-59.87882755259977,-3.298485427696165,0 +-59.87822963341467,-3.296601840032897,0 +-59.87738171684611,-3.295377327620841,0 +-59.87636938710106,-3.294436474632457,0 +-59.87022023487875,-3.289588906224346,0 +-59.86711526211075,-3.287235765056179,0 +-59.86512391800528,-3.285491155450812,0 +-59.86450932903087,-3.284656670950842,0 +-59.86297022458373,-3.282526664071114,0 +-59.86174816679847,-3.281089219689957,0 +-59.86005771080507,-3.280017825092239,0 +-59.85831953577512,-3.279073665903032,0 +-59.85672400847137,-3.277871414706945,0 +-59.85551616250589,-3.276183931247275,0 +-59.85384108821994,-3.273582874585047,0 +-59.85336430004067,-3.272138678996095,0 +-59.85318579114136,-3.27084816712523,0 +-59.85369049253651,-3.26768178171097,0 +-59.85414720356189,-3.265220167808051,0 +-59.85488584416829,-3.261412040625063,0 +-59.85564336894721,-3.255677231573292,0 +-59.85629125649793,-3.254086771285266,0 +-59.85745097670639,-3.252365205163666,0 +-59.85996607136993,-3.248839650880747,0 +-59.86372579952015,-3.243702447505989,0 +-59.86652642659259,-3.239705633094843,0 +-59.86724277103529,-3.237175355250602,0 +-59.86725324929197,-3.235350058147731,0 +-59.86698178229589,-3.234189157259624,0 +-59.86652379973095,-3.232566894302411,0 +-59.86610945257349,-3.230935828124334,0 +-59.86556743303474,-3.229298789163327,0 +-59.86543422461804,-3.226666697766035,0 +-59.86601761048819,-3.224852120312875,0 +-59.86701078012091,-3.221772618501205,0 +-59.8681928807227,-3.217375789634421,0 +-59.86918803139406,-3.214138720204668,0 +-59.87032591826699,-3.209697786775121,0 +-59.87058940038493,-3.208255851303754,0 +-59.87040907799074,-3.206364981563024,0 +-59.87004257061946,-3.203563957802384,0 +-59.8695527104942,-3.200039324719959,0 +-59.86917577488745,-3.197713898587686,0 +-59.86902965567467,-3.195847307628581,0 +-59.869005914022,-3.193953705784542,0 +-59.868860991017,-3.191848564232748,0 +-59.86886805758468,-3.189856592191343,0 +-59.86892471087805,-3.189383889881624,0 +-59.86898203982138,-3.188967620149784,0 +-59.87056585998748,-3.18727899931487,0 +-59.87308707410909,-3.186456335802589,0 +-59.8776231882583,-3.185812691879292,0 +-59.88182884265236,-3.184662936253092,0 +-59.89040759455108,-3.182364463476183,0 +-59.89478262231954,-3.180880439275548,0 +-59.90134243350373,-3.179407271012428,0 +-59.90386969760731,-3.178079660251079,0 +-59.90936811942467,-3.174757410876326,0 +-59.91190698397266,-3.172424670219288,0 +-59.91645490957246,-3.167256819267345,0 +-59.91866837881712,-3.163751198248108,0 +-59.92036893994845,-3.159907528018643,0 +-59.92256376055795,-3.156734421253667,0 +-59.92443356259626,-3.153901264883006,0 +-59.92544421047081,-3.152564024738516,0 +-59.92634581393498,-3.150650376740019,0 +-59.92835030896481,-3.147488712481477,0 +-59.92995809012706,-3.1442256353625,0 +-59.93216194792553,-3.141065860071,0 +-59.9352577915412,-3.138409538757305,0 +-59.93805318543408,-3.13595071930704,0 +-59.94141240562683,-3.13348789616074,0 +-59.94368758676244,-3.132032330216665,0 +-59.94624094283903,-3.130252480343326,0 +-59.94783035518925,-3.129326992924858,0 +-59.94973534282954,-3.12827338288368,0 +-59.95122685112055,-3.127881125475741,0 +-59.95299211784202,-3.127800360755702,0 +-59.95633136513786,-3.127971005766868,0 +-59.96131889799464,-3.128193682090842,0 +-59.96564863590814,-3.128416057469528,0 +-59.96862624222939,-3.128725538847127,0 +-59.97002613587733,-3.129170745208261,0 +-59.9711329784135,-3.129878493429701,0 +-59.97374260968306,-3.131555412652845,0 +-59.97522604612356,-3.132500429199485,0 +-59.97654283301731,-3.133097223363338,0 +-59.97826643018267,-3.133464848585815,0 +-59.98180541815118,-3.134028251748719,0 +-59.98323364493508,-3.133950570686851,0 +-59.98519289448338,-3.133276482859453,0 +-59.9858499965185,-3.132982086476706,0 + diff --git a/R-utils/roads/br364.csv b/R-utils/roads/br364.csv new file mode 100644 index 000000000..6eac2be39 --- /dev/null +++ b/R-utils/roads/br364.csv @@ -0,0 +1,2297 @@ +-53.21234986195042,-17.3182927594793,0 +-53.21264402144826,-17.31804363012412,0 +-53.21293737924348,-17.31775981829094,0 +-53.21319320127049,-17.31747684756187,0 +-53.21341100998558,-17.3172301497527,0 +-53.21384518508447,-17.31680786817541,0 +-53.21417289394715,-17.31645477088973,0 +-53.21450190793457,-17.31610107772789,0 +-53.21475786903742,-17.31588854919321,0 +-53.21512265878473,-17.31560544123323,0 +-53.21552630832026,-17.31521585551974,0 +-53.21585633647796,-17.31486240564532,0 +-53.21636407394332,-17.31436907075999,0 +-53.2165081055976,-17.31415814153244,0 +-53.2168337653809,-17.31377068006032,0 +-53.21708889622959,-17.31359366493503,0 +-53.2174159331889,-17.3132759472275,0 +-53.21777810131584,-17.31292219281505,0 +-53.21799629302794,-17.31264022531544,0 +-53.21828650675352,-17.31228686097315,0 +-53.21872341977701,-17.31182754004674,0 +-53.21901532338301,-17.31154616171713,0 +-53.21930628814378,-17.31119527913917,0 +-53.21963407806,-17.31091417531923,0 +-53.22003517632502,-17.31066705995683,0 +-53.22039986610846,-17.3104184231813,0 +-53.22076586130824,-17.31030987809027,0 +-53.22116882834474,-17.31020070138808,0 +-53.22157224041135,-17.31012665922264,0 +-53.22194002104025,-17.31022894265341,0 +-53.22205020093989,-17.31022794990803,0 +-53.22260420604334,-17.31060866886405,0 +-53.22297508132527,-17.31070826773642,0 +-53.22334551212133,-17.31073830479626,0 +-53.22364039792021,-17.31073542071093,0 +-53.22389849856383,-17.31066231952668,0 +-53.2243772771095,-17.3105170084082,0 +-53.22514982445327,-17.31040526642501,0 +-53.22570209138794,-17.31036560117121,0 +-53.22610705294396,-17.31029185713421,0 +-53.22639873469564,-17.31022046440938,0 +-53.22708018448901,-17.31004741379995,0 +-53.22758458216352,-17.3099424556394,0 +-53.22817061813699,-17.30983287963044,0 +-53.22842486256518,-17.30969146340325,0 +-53.22904004707076,-17.30919852855717,0 +-53.22936712128072,-17.30891630996928,0 +-53.22943795742442,-17.30874130030521,0 +-53.23029676878129,-17.30713946848292,0 +-53.23050987372132,-17.30685607693441,0 +-53.23072809265287,-17.30653978296657,0 +-53.23098599904921,-17.30608584640883,0 +-53.23120406145486,-17.30580484327251,0 +-53.23141737262574,-17.30555521714124,0 +-53.23181817047817,-17.3051679514016,0 +-53.23218564050423,-17.30495792678417,0 +-53.23265803262171,-17.30463833532686,0 +-53.23295134559867,-17.30439425759101,0 +-53.23335832559287,-17.30412155226899,0 +-53.23361691134784,-17.30388358687622,0 +-53.23387333619506,-17.30357506704833,0 +-53.23405563862401,-17.30330045751046,0 +-53.23434738388359,-17.30285688697351,0 +-53.23460248045023,-17.30248445731637,0 +-53.23478272054022,-17.30214200845603,0 +-53.23532489171816,-17.30149722406031,0 +-53.23554128609458,-17.3012608334619,0 +-53.23586522688026,-17.30095574154439,0 +-53.23618854540128,-17.3006823073469,0 +-53.23651236965922,-17.30051250827313,0 +-53.23690652896558,-17.30016999923989,0 +-53.23704935834711,-17.29999847455497,0 +-53.2376781028953,-17.29736690583764,0 +-53.23817976719478,-17.2967619075634,0 +-53.23824029951532,-17.29658285291326,0 +-53.23892304112338,-17.29544134987168,0 +-53.23911254662268,-17.29519880874483,0 +-53.23980315592209,-17.29417291702702,0 +-53.2404846743999,-17.29357187579699,0 +-53.24085511004536,-17.29315232492372,0 +-53.24116537086142,-17.2929114863359,0 +-53.24252893225201,-17.2917689692377,0 +-53.24320885906027,-17.29134828329344,0 +-53.24376475798003,-17.29092814237575,0 +-53.24450633240347,-17.29038764192406,0 +-53.24512337217477,-17.28978807493194,0 +-53.24574057852888,-17.28918833821002,0 +-53.24617570184684,-17.28876702104019,0 +-53.24709777794885,-17.28792867491283,0 +-53.24777822569085,-17.28738758459908,0 +-53.24827180273386,-17.28684765459224,0 +-53.24882615298862,-17.28612826318693,0 +-53.24944425351764,-17.28552741234564,0 +-53.25031052459058,-17.28456628062474,0 +-53.25074953569111,-17.28396567836801,0 +-53.25125395760633,-17.28348470283642,0 +-53.25169341207675,-17.28282725021349,0 +-53.25212743113853,-17.28217083621641,0 +-53.25249770879122,-17.28157470632234,0 +-53.25317838399483,-17.28109480547199,0 +-53.2536734224452,-17.280912432432,0 +-53.2544775504143,-17.28066705642421,0 +-53.25541022932535,-17.28036507308311,0 +-53.25596832584132,-17.28006580696573,0 +-53.25671304405525,-17.27988398944747,0 +-53.25745621171173,-17.27964158191059,0 +-53.25844842468459,-17.2794533489786,0 +-53.25937983483969,-17.27932611771776,0 +-53.25999879001798,-17.27914521874059,0 +-53.26074050895703,-17.27890471861183,0 +-53.26166772245201,-17.27872261658419,0 +-53.26260052207268,-17.27859371090666,0 +-53.26328502234186,-17.27840774749527,0 +-53.26390849493282,-17.27834130301979,0 +-53.26478014322225,-17.27815417759699,0 +-53.26552946529384,-17.2780864548001,0 +-53.26659262370767,-17.27795532421116,0 +-53.26753481773774,-17.27782383305177,0 +-53.26834804995452,-17.27769627736005,0 +-53.26915983004663,-17.2774500601167,0 +-53.2698989511626,-17.27714984536171,0 +-53.27045500774283,-17.2767892998816,0 +-53.27113760907839,-17.2766060797507,0 +-53.27163352391435,-17.2764839181859,0 +-53.27231362254309,-17.27630184176448,0 +-53.27256222143306,-17.27630014198723,0 +-53.28298709322474,-17.27238726428627,0 +-53.28497908499946,-17.27180227379417,0 +-53.28697030231782,-17.27121761133162,0 +-53.28915842265013,-17.27044148596211,0 +-53.29074717842342,-17.26966871848395,0 +-53.29273924955059,-17.26946548436517,0 +-53.29532600635908,-17.26887133550904,0 +-53.29731346965825,-17.26809230024458,0 +-53.29910370002204,-17.26750486535381,0 +-53.30149748511249,-17.26729071811286,0 +-53.30327838790461,-17.26575405206335,0 +-53.30545478591993,-17.26421886946131,0 +-53.30743707290925,-17.26325512675949,0 +-53.30942351510774,-17.26247804363505,0 +-53.31041182160914,-17.26055575515921,0 +-53.3113868266843,-17.25845764887781,0 +-53.31276387531305,-17.25673736491012,0 +-53.31434364494113,-17.25539604613792,0 +-53.3159249612833,-17.25424498678475,0 +-53.317707034329,-17.25328261162767,0 +-53.31969403041158,-17.25288843032202,0 +-53.32187763713001,-17.25230305418037,0 +-53.32386172363451,-17.2517192274535,0 +-53.32625017145408,-17.25131807622819,0 +-53.32823973666851,-17.2513040863258,0 +-53.33042543747676,-17.25109927606411,0 +-53.33240383329733,-17.24994436805481,0 +-53.33457874683688,-17.24917304089151,0 +-53.33655366585301,-17.24821214403569,0 +-53.33953534606606,-17.24761689341316,0 +-53.34192039962992,-17.2476001526716,0 +-53.34390702052131,-17.24816041438765,0 +-53.34591069401885,-17.24928260345077,0 +-53.34712491384795,-17.25021638260487,0 +-53.35501193342226,-17.25336280998392,0 +-53.35660919428658,-17.25391489426037,0 +-53.35920217690059,-17.254456215073,0 +-53.36199856977687,-17.25537531496619,0 +-53.36399733058277,-17.25611338564736,0 +-53.36599658499148,-17.25685160969174,0 +-53.36739495250738,-17.25721648453809,0 +-53.36979728009967,-17.25833070296213,0 +-53.37180148102213,-17.25945001789349,0 +-53.37420713305817,-17.26095043533245,0 +-53.3766059389842,-17.26266465973247,0 +-53.37760404023714,-17.26342882896115,0 +-53.37940530394317,-17.26533299285685,0 +-53.38160787705452,-17.26722340832162,0 +-53.38361715224904,-17.26910414061046,0 +-53.38562182433774,-17.27002941801684,0 +-53.38742641128554,-17.27076681967207,0 +-53.39003214350121,-17.27130121035841,0 +-53.39203859970473,-17.2718449342745,0 +-53.39464200576363,-17.27257801668106,0 +-53.39616892931315,-17.27336393044151,0 +-53.39660244877174,-17.27361805969331,0 +-53.39725071381478,-17.2738186358943,0 +-53.39789795380531,-17.27391600246409,0 +-53.39849154836172,-17.27401388766641,0 +-53.39919426669324,-17.27421412052824,0 +-53.39989603699325,-17.27431110356132,0 +-53.40049080299226,-17.27446075301636,0 +-53.40103419273228,-17.27450811596892,0 +-53.40157017189548,-17.27455436605195,0 +-53.40210790910857,-17.2745492297949,0 +-53.40264752469081,-17.27454435757982,0 +-53.40372956339411,-17.27438026269072,0 +-53.4042692481182,-17.27422055849884,0 +-53.40486105780216,-17.27400822870713,0 +-53.40561474509037,-17.27384560914674,0 +-53.4064750185284,-17.27352612098855,0 +-53.40792951076997,-17.27299246743228,0 +-53.40846773173493,-17.27267520668547,0 +-53.40922525194279,-17.27240918532775,0 +-53.40981932082529,-17.27209225050365,0 +-53.41036055652364,-17.27188041930652,0 +-53.41068474341512,-17.2717210896893,0 +-53.4115504301325,-17.27134720558984,0 +-53.41209233703079,-17.27113235629366,0 +-53.41274111895539,-17.27060273923251,0 +-53.41322936251256,-17.27012092421894,0 +-53.41377275031886,-17.2695867135704,0 +-53.41431466070107,-17.2692186849293,0 +-53.41507362776792,-17.26885099436871,0 +-53.41550301880004,-17.26854257484424,0 +-53.41571799924484,-17.26844035066961,0 +-53.41636314455366,-17.2679207551814,0 +-53.4169594268244,-17.26760302360447,0 +-53.41771821092366,-17.26717978154547,0 +-53.41820391506021,-17.26676017964815,0 +-53.41874343462888,-17.26628827684041,0 +-53.4189500948783,-17.26577522986955,0 +-53.41921091085096,-17.26531492969734,0 +-53.41996289701199,-17.26468965235418,0 +-53.42060904378345,-17.26416640941631,0 +-53.4209841301616,-17.26380228740183,0 +-53.4213544056222,-17.26328694118277,0 +-53.42161570220936,-17.26282562097193,0 +-53.42171473982246,-17.2624701625306,0 +-53.4219708091326,-17.26175426428892,0 +-53.42217699307415,-17.26124294850746,0 +-53.4223321656581,-17.26088504446975,0 +-53.42295615609304,-17.2598158888379,0 +-53.42802807559416,-17.25662153671002,0 +-53.42982395474403,-17.25540259688181,0 +-53.43108167887958,-17.25470383743896,0 +-53.43305816109731,-17.25348611103512,0 +-53.43521542390468,-17.25243923995338,0 +-53.43700998991118,-17.25122611343279,0 +-53.4384443062023,-17.25018904438249,0 +-53.44005538851352,-17.24881208532503,0 +-53.44202152955401,-17.2470881874118,0 +-53.44452063305017,-17.24484871538173,0 +-53.44594886535378,-17.2434351855191,0 +-53.4475598924013,-17.24201515793824,0 +-53.44899300988806,-17.24059634044985,0 +-53.45042456353131,-17.23919689372518,0 +-53.45185823497404,-17.23796993292781,0 +-53.45365225040744,-17.2365654148088,0 +-53.45544169648612,-17.23464446652243,0 +-53.45723612579924,-17.23342005310665,0 +-53.45975352829948,-17.23218753994242,0 +-53.46065374971359,-17.2314792394939,0 +-53.46680417487796,-17.2252114313235,0 +-53.4696835681594,-17.22210066376882,0 +-53.47157851525771,-17.21902674268079,0 +-53.4735002505416,-17.21652751375655,0 +-53.47472571444715,-17.21318951047099,0 +-53.47536812927008,-17.21224735229741,0 +-53.47260457192216,-17.2066057557678,0 +-53.47184254260131,-17.20518306595097,0 +-53.47120633894099,-17.20387826806568,0 +-53.47082216459282,-17.20281016621438,0 +-53.47030960630565,-17.20126866086132,0 +-53.47004777624971,-17.19984514498022,0 +-53.46978409742965,-17.19818534216492,0 +-53.46977184591495,-17.19676241016171,0 +-53.46963811106971,-17.19569670099077,0 +-53.4691288435273,-17.19439689362219,0 +-53.4683736227954,-17.19345379443785,0 +-53.46698885197154,-17.1916853215418,0 +-53.4657342044435,-17.18992861084737,0 +-53.46510979059917,-17.18864984170683,0 +-53.46460632648217,-17.18759446595442,0 +-53.46421811869461,-17.18617008046334,0 +-53.46395118335715,-17.18485325808705,0 +-53.46368678675161,-17.18365781121693,0 +-53.46342612442327,-17.1824710940754,0 +-53.46267201572091,-17.18118169889047,0 +-53.46204309229112,-17.1800091048,0 +-53.46191398241498,-17.17941892347563,0 +-53.45900114280082,-17.16021965552095,0 +-53.45967000993803,-17.1539472852562,0 +-53.46324670409514,-17.14695129397182,0 +-53.46901595212447,-17.14063015312909,0 +-53.47041284861387,-17.13434986322289,0 +-53.47251805159908,-17.12597294949848,0 +-53.47317923762188,-17.11900289122441,0 +-53.46946204840592,-17.11138052564536,0 +-53.46792429132262,-17.10304069811719,0 +-53.46420827978422,-17.0954198842797,0 +-53.46268462538775,-17.08847352519556,0 +-53.46261768626849,-17.08151251060112,0 +-53.46253086358933,-17.07246543745707,0 +-53.46464894053195,-17.06548742774126,0 +-53.46678011063907,-17.05990086186491,0 +-53.46816952356203,-17.05293077732451,0 +-53.47027972672431,-17.04523854480602,0 +-53.47239008813729,-17.03753697103913,0 +-53.47377924516712,-17.03053917079474,0 +-53.4766254950397,-17.0235245217668,0 +-53.47948573826533,-17.01790534519512,0 +-53.48379026549303,-17.01087188851508,0 +-53.48664381707665,-17.00456809736876,0 +-53.48876860626212,-16.99827381439649,0 +-53.49872062432621,-16.9752449629164,0 +-53.49937940446176,-16.96827699174831,0 +-53.50147954123087,-16.95920456638846,0 +-53.5072379028674,-16.95148635259094,0 +-53.515900753966,-16.94514737267796,0 +-53.52092621977369,-16.93883998275271,0 +-53.52670639566678,-16.93531112856316,0 +-53.53467824122236,-16.93175574879094,0 +-53.54122245524103,-16.93099809458504,0 +-53.54851596124463,-16.93232186559676,0 +-53.55652410982572,-16.93224616870682,0 +-53.5616415995412,-16.93428651191049,0 +-53.59878601286943,-16.9257131308635,0 +-53.61256567925717,-16.91990481889644,0 +-53.62631081811166,-16.913165129366,0 +-53.63318764901911,-16.91026764419786,0 +-53.64300519553749,-16.90545254380115,0 +-53.65677955464065,-16.8996426605393,0 +-53.66859522988619,-16.89574284146379,0 +-53.67645079426004,-16.89093618411631,0 +-53.68227642527327,-16.88047612035533,0 +-53.69105128515092,-16.86999444302964,0 +-53.69990663059183,-16.86707079650808,0 +-53.71072168111867,-16.86318461569328,0 +-53.72156781144007,-16.86213197228852,0 +-53.73633016003443,-16.85820534546769,0 +-53.74912945826635,-16.85524204299458,0 +-53.7589676903081,-16.85230794375245,0 +-53.76978319375444,-16.84841770900819,0 +-53.7796336306203,-16.8464258583442,0 +-53.79246542850142,-16.84629395405578,0 +-53.801346918783,-16.84620574664798,0 +-53.81415599929673,-16.84418774118065,0 +-53.82205343154985,-16.84410759708395,0 +-53.82896490143066,-16.84403530614646,0 +-53.85076553194406,-16.85041911361282,0 +-53.86267057056929,-16.85501657504431,0 +-53.87166872924842,-16.86436744357443,0 +-53.88466212797466,-16.87745438358103,0 +-53.89358446451106,-16.88019463485983,0 +-53.90341361207027,-16.87630455374797,0 +-53.91226744703557,-16.87337254307346,0 +-53.92406295040456,-16.86852010791285,0 +-53.93385060420071,-16.86085490955088,0 +-53.94656752525493,-16.85032079043508,0 +-53.96420786238815,-16.83878211384352,0 +-53.97598991431,-16.83297808619717,0 +-53.99076707389069,-16.82997415966708,0 +-54.00553315539437,-16.82602441600994,0 +-54.01540887661133,-16.82591120022974,0 +-54.02626155582755,-16.82484124838704,0 +-54.04007710481455,-16.82373632511487,0 +-54.0529178417538,-16.82358728865636,0 +-54.06484859712468,-16.82063763216738,0 +-54.07379679400785,-16.81771339666764,0 +-54.08473953647999,-16.81382003451501,0 +-54.09426902345759,-16.80798386837212,0 +-54.10602473836686,-16.80216691670184,0 +-54.1158257698043,-16.79732027392835,0 +-54.12367952001284,-16.79438844475525,0 +-54.14592322525117,-16.78654876045354,0 +-54.15469566934221,-16.78455952149951,0 +-54.1654877872235,-16.78443463094416,0 +-54.17635817666731,-16.7871444504742,0 +-54.20001537251968,-16.79066082278472,0 +-54.20883050528048,-16.78676796325325,0 +-54.21766576085314,-16.78477018002929,0 +-54.22453606380967,-16.78184247180491,0 +-54.23531941728159,-16.7741172395928,0 +-54.24012221869885,-16.76361691487346,0 +-54.24694762905376,-16.75593577036097,0 +-54.25975996914654,-16.75102376058453,0 +-54.26357551848704,-16.74052775081881,0 +-54.2632780998732,-16.72147362040116,0 +-54.27400233475892,-16.70899337236973,0 +-54.28083084252442,-16.70130899615577,0 +-54.28958628299284,-16.68979960748947,0 +-54.29640064749625,-16.68116296296648,0 +-54.30526392343921,-16.67629611548033,0 +-54.31605977335275,-16.66760206813307,0 +-54.32887598773483,-16.6617327099903,0 +-54.35062821037322,-16.65669563435089,0 +-54.36938623381793,-16.65074724106575,0 +-54.38614359126844,-16.64387477398723,0 +-54.39604229263582,-16.64279282678345,0 +-54.4029812166883,-16.6427001240404,0 +-54.41584153404806,-16.64062681732293,0 +-54.42569753364489,-16.63669415705701,0 +-54.43654286800729,-16.63274830663078,0 +-54.44938430340297,-16.62972442125756,0 +-54.4582612881395,-16.62675394420024,0 +-54.46904900828983,-16.61900804063088,0 +-54.47390417102446,-16.61229305275294,0 +-54.48067640396314,-16.60079876818221,0 +-54.48549518431952,-16.5912290184305,0 +-54.49532452436461,-16.58539005364262,0 +-54.50520850947946,-16.58335170722274,0 +-54.51607031060048,-16.58034849224151,0 +-54.52691902523669,-16.57639403676089,0 +-54.53873263646654,-16.57052355416334,0 +-54.54858854852414,-16.56562421889072,0 +-54.55639995089587,-16.55599461943246,0 +-54.55637481710292,-16.55409150399462,0 +-54.57475544450217,-16.53560994843052,0 +-54.58454116758395,-16.52691738951352,0 +-54.59629019124549,-16.51724210578359,0 +-54.60711863199752,-16.51233291382868,0 +-54.61695438030625,-16.50743790493998,0 +-54.62378499719258,-16.50068519297353,0 +-54.63364898008731,-16.49769090169275,0 +-54.64250590100085,-16.49376045766331,0 +-54.64541701236607,-16.48991633300409,0 +-54.6587539563171,-16.46413624337034,0 +-54.66754574400998,-16.45640029221776,0 +-54.67330628758017,-16.44491213497649,0 +-54.68207959456848,-16.43622811990246,0 +-54.68788328137345,-16.42759060844809,0 +-54.6936866899187,-16.41895341348184,0 +-54.70442597340084,-16.409293221564,0 +-54.71511691966684,-16.39678289999262,0 +-54.72086355339286,-16.38434551823201,0 +-54.72461395038935,-16.37098605831058,0 +-54.72743430293625,-16.36144042993802,0 +-54.73118459644837,-16.34807814166681,0 +-54.73394635170755,-16.33568689225251,0 +-54.73773382893026,-16.32517876514551,0 +-54.74353573441186,-16.31653804379115,0 +-54.75233708807433,-16.3097529389255,0 +-54.75811337928661,-16.30016833087527,0 +-54.76088328410881,-16.28873368178516,0 +-54.76370187775517,-16.28014820134345,0 +-54.7729115503299,-16.23865676909416,0 +-54.77854803995852,-16.21956782637814,0 +-54.78031104820294,-16.20623839143045,0 +-54.78110880381777,-16.19482582395191,0 +-54.78482028476017,-16.18147887404315,0 +-54.78956129613539,-16.17001464709991,0 +-54.79437688220532,-16.16138515984536,0 +-54.80018246754565,-16.15273853064053,0 +-54.805944309596,-16.14123875363507,0 +-54.81473782485759,-16.13349014197469,0 +-54.82255842646585,-16.12670538523616,0 +-54.82646188526986,-16.12283688535136,0 +-54.8431092955646,-16.11416242281427,0 +-54.85780372763716,-16.10443508652339,0 +-54.86164385451052,-16.09867418794004,0 +-54.86938139527983,-16.08999858659323,0 +-54.88394881078164,-16.07551040329972,0 +-54.89170996131556,-16.06683356975645,0 +-54.9013990070757,-16.05527371889191,0 +-54.90799373491041,-16.03616015747387,0 +-54.90783222405465,-16.02665967317924,0 +-54.90365760445235,-16.01342838443439,0 +-54.90243317828925,-15.99920277697472,0 +-54.90625385479392,-15.99153680817568,0 +-54.91306801049782,-15.98571743040189,0 +-54.9237679422906,-15.97602738554864,0 +-54.9315222262403,-15.96733645754747,0 +-54.93928696417765,-15.95867303436203,0 +-54.94813764487415,-15.95570045238962,0 +-54.96385473683201,-15.94978351178311,0 +-54.97269821825082,-15.94681343904573,0 +-54.98348143375024,-15.94192507531246,0 +-54.99524672031352,-15.93702546502059,0 +-55.00499907704378,-15.93025524445306,0 +-55.01575008233391,-15.92442323221606,0 +-55.02348714806357,-15.91578788915059,0 +-55.03312752362044,-15.90332296701379,0 +-55.03891052331688,-15.89563776235027,0 +-55.04868093924063,-15.8907624166508,0 +-55.06049663953286,-15.89062359757698,0 +-55.074273857392,-15.89046088392042,0 +-55.08607033185197,-15.89033459166922,0 +-55.09287831803042,-15.88647373647305,0 +-55.1005638509599,-15.87691742773283,0 +-55.11117486187163,-15.86638265477187,0 +-55.12087227992728,-15.85963982813287,0 +-55.12956727373132,-15.85196306306058,0 +-55.13913739941782,-15.83859524867923,0 +-55.14784115850455,-15.83187131114058,0 +-55.15556151473974,-15.82515979207323,0 +-55.16726372194936,-15.82219569981019,0 +-55.17600205685325,-15.81832394055766,0 +-55.18187350592466,-15.81826240423954,0 +-55.20255870204052,-15.81219749056218,0 +-55.21234803734666,-15.81014105708364,0 +-55.22404207032348,-15.80521354465481,0 +-55.23481293463509,-15.80313978230592,0 +-55.24857107324286,-15.80290752412858,0 +-55.25839732184682,-15.80274109931004,0 +-55.26916678819143,-15.80066685450431,0 +-55.28091963510205,-15.7985767480154,0 +-55.29371385771837,-15.79837606679487,0 +-55.30062283010363,-15.79921488608247,0 +-55.30851385084532,-15.80003798827275,0 +-55.32533042625443,-15.8045017411097,0 +-55.33917953684995,-15.80899990108403,0 +-55.35101152112142,-15.81348135769037,0 +-55.36383369517644,-15.81887449750154,0 +-55.37657054477681,-15.81862087358427,0 +-55.38639215189554,-15.81845229179118,0 +-55.39523018496787,-15.81830016526201,0 +-55.40897552748563,-15.81806291187184,0 +-55.41879159305501,-15.81789294387572,0 +-55.42860354530202,-15.81771474464443,0 +-55.4394445110181,-15.82031301202302,0 +-55.44632875192749,-15.82109522293902,0 +-55.46113254603941,-15.82456432216447,0 +-55.47401740209939,-15.82998740288599,0 +-55.48394427591928,-15.83450431715301,0 +-55.49575430165387,-15.83325416670769,0 +-55.50455445700072,-15.83024385438071,0 +-55.51341983176938,-15.83006058624748,0 +-55.52423828943218,-15.82889312513803,0 +-55.53501601220913,-15.82583874481494,0 +-55.54288281161349,-15.82473090823471,0 +-55.55873557282921,-15.82240196552148,0 +-55.5696576066119,-15.81922755950387,0 +-55.57957203830842,-15.81513522217111,0 +-55.58649443622836,-15.81403207806771,0 +-55.59828040591484,-15.80999898059799,0 +-55.61204459435437,-15.80592626818346,0 +-55.62090491085748,-15.80385061813817,0 +-55.63273266515446,-15.80171614990861,0 +-55.64252345182788,-15.79676694637528,0 +-55.6482557412888,-15.78714232454903,0 +-55.65388208401212,-15.76366383467246,0 +-55.65565771563016,-15.75316728008818,0 +-55.65843351987955,-15.74455136787209,0 +-55.66314187109919,-15.7339940243012,0 +-55.67185968039967,-15.72621128591968,0 +-55.68059859679815,-15.71937837124521,0 +-55.688310095288,-15.71066130666242,0 +-55.69711138663196,-15.70667987382772,0 +-55.70690050512138,-15.702677946227,0 +-55.71971382369417,-15.70147023411777,0 +-55.73155531910776,-15.70028792293688,0 +-55.74440974557501,-15.7000394070426,0 +-55.76121701598939,-15.69971330691822,0 +-55.76615979060628,-15.69961714407957,0 +-55.78197365391841,-15.69930774944271,0 +-55.78691398341633,-15.6992100182105,0 +-55.8153600066064,-15.69859066438577,0 +-55.82926280421329,-15.69925182158953,0 +-55.84118048124286,-15.69995375935035,0 +-55.854028330911,-15.69873736176305,0 +-55.86190547154796,-15.69667003989099,0 +-55.87474865090112,-15.69545398981593,0 +-55.88557324803915,-15.69237237117194,0 +-55.89338975301094,-15.68744599858957,0 +-55.9081082706267,-15.68046336960689,0 +-55.91993879449285,-15.67735078394417,0 +-55.9317862835746,-15.6751905683325,0 +-55.94165029751201,-15.67307285845446,0 +-55.95046150203435,-15.66812017242573,0 +-55.95834143548627,-15.66604538500943,0 +-55.9759935240117,-15.6580466112952,0 +-55.98679344618668,-15.65400610902691,0 +-55.99858921438503,-15.65090211066124,0 +-56.0083979384842,-15.64784464367777,0 +-56.0171979115092,-15.64385579588005,0 +-56.02700697762508,-15.64079724459924,0 +-56.03784752786769,-15.63961994120082,0 +-56.04857955905426,-15.63368566237955,0 +-56.05634907721828,-15.627812472433,0 +-56.06410255934745,-15.62098389301161,0 +-56.07185453765672,-15.61319258122868,0 +-56.08154127707725,-15.6044187574039,0 +NA,NA,NA +-56.2161292259481,-14.5239114210487,0 +-56.2148899505693,-14.53623511747943,0 +-56.21567843497988,-14.56917721590869,0 +-56.21568406557545,-14.58144975042132,0 +-56.22076316966687,-14.59127004789878,0 +-56.22964441104469,-14.5998575731864,0 +-56.24106344167745,-14.60967173408568,0 +-56.25754746529105,-14.61699271710358,0 +-56.27404736451367,-14.62804078018706,0 +-56.2791289765957,-14.63908779281347,0 +-56.28547863681357,-14.65382259611616,0 +-56.28674831890859,-14.6575055401569,0 +-56.29309292286712,-14.67100294705178,0 +-56.30581100841574,-14.69184356773209,0 +-56.31596293529071,-14.70165198977269,0 +-56.32359806968873,-14.7114675193388,0 +-56.32870778478188,-14.72497653542857,0 +-56.32873460281334,-14.73603970778342,0 +-56.33131194277212,-14.75079847092366,0 +-56.33768245713579,-14.75694736681368,0 +-56.35551041045396,-14.77292441519748,0 +-56.36951113639557,-14.78397706530375,0 +-56.38223583540551,-14.79134087830698,0 +-56.39749543815653,-14.79500955947928,0 +-56.40768051781902,-14.80237609929532,0 +-56.40896053719462,-14.80606540460335,0 +-56.42936668184475,-14.83310490475851,0 +-56.43574585351493,-14.84293742628253,0 +-56.4433965205037,-14.85276714701213,0 +-56.45230719631015,-14.86135509608864,0 +-56.45741379515256,-14.8736422644198,0 +-56.46252609061111,-14.88838952278389,0 +-56.4625570957526,-14.90315225766167,0 +-56.46513823940835,-14.91178131457647,0 +-56.47794902526179,-14.927815243239,0 +-56.4919952887365,-14.93397915582833,0 +-56.49841828087143,-14.94631072107649,0 +-56.5022596958706,-14.95246788594544,0 +-56.50742190974628,-14.97464185901594,0 +-56.50746025350657,-14.98819650791296,0 +-56.50876715623467,-14.99928739238333,0 +-56.50881617973383,-15.01654287015172,0 +-56.50629516580959,-15.02640837896006,0 +-56.50934317417969,-15.05535867904434,0 +-56.51064397357603,-15.07257527704963,0 +-56.51066141393679,-15.08364422232966,0 +-56.51069053791032,-15.10209120838482,0 +-56.51198777655706,-15.11684536514884,0 +-56.51454827113223,-15.13283542410738,0 +-56.51583486439763,-15.14882382273855,0 +-56.51456607061815,-15.15620592783642,0 +-56.51329931221812,-15.16604616152012,0 +-56.50694505046319,-15.18326894101818,0 +-56.49677632947782,-15.1968034689514,0 +-56.48916008908979,-15.20787250975652,0 +-56.48536065595384,-15.22139380863178,0 +-56.47901080028704,-15.23123260491373,0 +-56.46884693150636,-15.2447629756279,0 +-56.45995293043573,-15.25706252694557,0 +-56.45361142545885,-15.27181723774718,0 +-56.44342682785173,-15.27551698871268,0 +-56.4319811506067,-15.28659197499338,0 +-56.42307805831105,-15.29520666399391,0 +-56.41545190290396,-15.30627975211267,0 +-56.41165818740158,-15.32595206722764,0 +-56.40530786493432,-15.34071399332736,0 +-56.39257997390519,-15.3530293548687,0 +-56.38750458450462,-15.371480727508,0 +-56.38369215130238,-15.38132434682377,0 +-56.38243048725032,-15.39239495398438,0 +-56.35595191789601,-15.40273298055745,0 +-56.34319578440569,-15.41259987703522,0 +-56.33299194874331,-15.42369462556654,0 +-56.32023473931228,-15.42986219623755,0 +-56.31003046200212,-15.4397225098896,0 +-56.29855058871182,-15.45081362086821,0 +-56.28834755760337,-15.4643651935281,0 +-56.28069771600383,-15.47667628987186,0 +-56.27049536403307,-15.48775553361059,0 +-56.26539960259781,-15.5062168191383,0 +-56.26413028503163,-15.5209825731598,0 +-56.26413601226954,-15.53328550410491,0 +-56.26031591818038,-15.55174033905877,0 +-56.25266011635701,-15.55543489350448,0 +-56.23352133756489,-15.56651497553451,0 +-56.23224558713,-15.5677454826652,0 +-56.23168308114327,-15.57073708405087,0 +-56.23213792411985,-15.57265279413464,0 +-56.23259385697769,-15.57383117768363,0 +-56.23274339148084,-15.57559838265887,0 +-56.23274208597649,-15.57633453004215,0 +-56.23289206183552,-15.57780636663373,0 +-56.2332031128871,-15.58118482980605,0 +-56.23351901318636,-15.58485789685817,0 +-56.23337142727088,-15.58662227591422,0 +-56.23291785466798,-15.58824043310883,0 +-56.23078278645552,-15.58956564462952,0 +-56.22940221439762,-15.59044860686902,0 +-56.22863624811435,-15.59147812893588,0 +-56.22756735843846,-15.5930960761254,0 +-56.22634859507159,-15.59383278139683,0 +-56.22512937240347,-15.59456975621217,0 +-56.22406185789963,-15.5948652862753,0 +-56.22116313974914,-15.59619370303081,0 +-56.21902560231521,-15.59708019869554,0 +-56.21734503011796,-15.59752452580655,0 +-56.21642805551468,-15.59782054928663,0 +-56.2142875007871,-15.59841328507173,0 +-56.21092107453286,-15.59886083811557,0 +-56.20908364918691,-15.59945375127772,0 +-56.20785820900769,-15.60107890205051,0 +-56.2057131886048,-15.60241003829171,0 +-56.20479457740027,-15.60359058722265,0 +-56.20341672793281,-15.60506608461764,0 +-56.20311107902089,-15.60550792560278,0 +-56.20295906484974,-15.60698195295075,0 +-56.20311461570272,-15.61081450631703,0 +-56.20327073066026,-15.6125788443283,0 +-56.20357901591733,-15.6139017515015,0 +-56.20419433419677,-15.61595891101657,0 +-56.20511859582101,-15.61844654910473,0 +-56.20527710105487,-15.619901096699,0 +-56.20527876273672,-15.62033716325461,0 +-56.20482954324434,-15.62373517091672,0 +-56.20482958646542,-15.62535158285119,0 +-56.20467689299621,-15.62711515759268,0 +-56.20452419055081,-15.62961396047349,0 +-56.20452515104779,-15.63137948365683,0 +-56.20452902161458,-15.63403038962091,0 +-56.20392060995964,-15.63550264822761,0 +-56.20346562406318,-15.63712170143216,0 +-56.20270479236616,-15.63859267757127,0 +-56.20224988549,-15.64006331478233,0 +-56.20148909004205,-15.64182694871479,0 +-56.19996296447894,-15.64373698609401,0 +-56.19935081605328,-15.64505938987811,0 +-56.19782052220081,-15.6463826719984,0 +-56.19721043682499,-15.64770567170446,0 +-56.19583782062398,-15.64873476078758,0 +-56.17777865221925,-15.64236880358367,0 +-56.17543991894888,-15.64157495372075,0 +-56.17438666752758,-15.64146158255872,0 +-56.17274819124894,-15.64123584066114,0 +-56.17146422598466,-15.6410125771607,0 +-56.17006249997279,-15.64090096699965,0 +-56.16912814994431,-15.64112665009335,0 +-56.16784373460554,-15.64146504088483,0 +-56.16585729423515,-15.64180311425748,0 +-56.16433781807281,-15.64202839138979,0 +-56.16317050813882,-15.64225392756456,0 +-56.16094948514959,-15.64315440807483,0 +-56.15919832838856,-15.64394252351694,0 +-56.15709430049604,-15.64495552706301,0 +-56.15592315581983,-15.64551837611558,0 +-56.15358194713222,-15.64641919365173,0 +-56.15217462675681,-15.64720765909597,0 +-56.15111694315703,-15.64799644402186,0 +-56.1500632230597,-15.6483345034838,0 +-56.14865810681683,-15.64878528886206,0 +-56.14737431053927,-15.64878504633804,0 +-56.14573999528586,-15.64878480862868,0 +-56.14410758839735,-15.64833404635558,0 +-56.14339857339777,-15.64754653215617,0 +-56.14255739565495,-15.64653403069559,0 +-56.14116095949777,-15.64597049152959,0 +-56.14070111962636,-15.64574504788213,0 +-56.138169113564,-15.64428101815748,0 +-56.13689274202174,-15.64349118720782,0 +-56.13467888525862,-15.64258625138052,0 +-56.13327132885378,-15.64236092943377,0 +-56.13209937067462,-15.64134527298615,0 +-56.13080940320506,-15.64134599618572,0 +-56.12940265523872,-15.6415725168107,0 +-56.12811367907613,-15.6416861544273,0 +-56.12682539010101,-15.64168724764255,0 +-56.12600598340941,-15.64157509718577,0 +-56.12425045701129,-15.64067368078535,0 +-56.12331415171099,-15.63999737773486,0 +-56.12214359513347,-15.63886996828842,0 +-56.12097248647918,-15.63729086743018,0 +-56.12003497116575,-15.63593652214024,0 +-56.11921172370807,-15.63491651635064,0 +-56.11803402665021,-15.63355408223277,0 +-56.11744360111841,-15.63264498125446,0 +-56.1169672253364,-15.63116597574285,0 +-56.11614124731387,-15.63036841844465,0 +-56.11520141589004,-15.62968918760872,0 +-56.11426187735022,-15.62867105536343,0 +-56.11297041580363,-15.62754026194801,0 +-56.11205030564491,-15.6260929655973,0 +-56.11156554339564,-15.62503287123116,0 +-56.11129001474863,-15.62463556465165,0 +-56.11047097592341,-15.6237753039324,0 +-56.10985584782537,-15.6230467384852,0 +-56.10923636884038,-15.62245044844549,0 +-56.10841314369232,-15.62178762285731,0 +-56.10806793734876,-15.62105895843847,0 +-56.10779303226464,-15.6205950967299,0 +-56.10717476058813,-15.61946838256914,0 +-56.1066956204496,-15.61853945315216,0 +-56.10614765530421,-15.61780866942647,0 +-56.10573650729039,-15.61734308901614,0 +-56.10532667514942,-15.61674324875704,0 +-56.10498068922995,-15.61581610802013,0 +-56.10490725527146,-15.61509209095824,0 +-56.10428647889136,-15.61469633291336,0 +-56.10352944471886,-15.61469647911068,0 +-56.10284127518197,-15.61469661055772,0 +-56.10222214355562,-15.61429887199701,0 +-56.10194649667698,-15.61310778133925,0 +-56.10174012702964,-15.61277663554452,0 +-56.10125866393776,-15.61211416468905,0 +-56.10084574229482,-15.61125432259724,0 +-56.10050163080017,-15.6106598050886,0 +-56.10022628484911,-15.6101323084588,0 +-56.09967611062645,-15.60927423239927,0 +-56.09933233565587,-15.60841657414713,0 +-56.09905743744344,-15.60742716345308,0 +-56.09892005170792,-15.60670172788463,0 +-56.0991947021863,-15.60597898354726,0 +-56.09946966776745,-15.60531546226325,0 +-56.09946956615951,-15.60492136921046,0 +-56.09905057062816,-15.60394427822179,0 +-56.09898264164784,-15.60383534671726,0 +-56.09886934347339,-15.60361829821058,0 +-56.09866545856551,-15.60338166163778,0 +-56.09848452530752,-15.60312150166475,0 +-56.09823591159365,-15.60284037238003,0 +-56.09801012048623,-15.60264694583892,0 +-56.0978295927159,-15.60243081532318,0 +-56.09764913923321,-15.60219282323186,0 +-56.0972662617459,-15.60182765176775,0 +-56.09715361396565,-15.60165440438469,0 +-56.09695093068495,-15.60135144667576,0 +-56.09686050849353,-15.60108969271849,0 +-56.09677019236106,-15.60087190366406,0 +-56.0964585063183,-15.60041417271908,0 +-56.09618638773723,-15.60015316641949,0 +-56.09584653050279,-15.59993583239124,0 +-56.09562021063028,-15.59980553930134,0 +-56.09534841047076,-15.59952350662724,0 +-56.09530301432325,-15.5994367880038,0 +-56.09512208489039,-15.5992634600847,0 +-56.094851048609,-15.59904699475188,0 +-56.09462498062524,-15.59878766952321,0 +-56.09442143613433,-15.5985074125794,0 +-56.09417493008132,-15.59820311780115,0 +-56.09401790682242,-15.59807225556269,0 +-56.09368098805296,-15.59767991798464,0 +-56.09347842452587,-15.59746244343901,0 +-56.09332076584242,-15.59724611610858,0 +-56.09300570949932,-15.596792833334,0 +-56.09282588328259,-15.59646913110867,0 +-56.09269126982197,-15.59601633143812,0 +-56.09251185332209,-15.59591064513395,0 +-56.09237741119961,-15.59591251561416,0 +-56.0919092735391,-15.59596693800415,0 +-56.0916426097579,-15.59603712675078,0 +-56.09139841912734,-15.5960627527616,0 +-56.09108907068526,-15.59615526270978,0 +-56.09077702319518,-15.59624152415759,0 +-56.09059855026642,-15.59630587923206,0 +-56.09021898212293,-15.5965846546548,0 +-56.0901099228594,-15.59693098600006,0 +-56.0899321606591,-15.59725347592265,0 +-56.089844678931,-15.59751232106359,0 +-56.08980171287845,-15.5978137327521,0 +-56.0897580376905,-15.59794291534358,0 +-56.08964855960141,-15.5981796786825,0 +-56.08951721413248,-15.59843771017419,0 +-56.08929820876147,-15.59884556010709,0 +-56.08925485053858,-15.59899560321059,0 +-56.08905342499337,-15.59933749476433,0 +-56.08894101387293,-15.59957266743873,0 +-56.08882830210015,-15.59980796817942,0 +NA,NA,NA +-56.21717154110101,-14.52352175790096,0 +-56.21830242707633,-14.52277125659838,0 +-56.2192947412295,-14.52203634847228,0 +-56.22026034782792,-14.52096801501135,0 +-56.22158707836949,-14.51954481073734,0 +-56.22205756664994,-14.51824238661403,0 +-56.22216178848746,-14.51705887912903,0 +-56.2225267107413,-14.51574052740177,0 +-56.22325227914516,-14.5146668766502,0 +-56.22372358439626,-14.5133611343109,0 +-56.22444421303305,-14.51193054837265,0 +-56.22454871854319,-14.51050342981422,0 +-56.22465862589485,-14.50931180940014,0 +-56.22501468258623,-14.50811826361456,0 +-56.2250010411609,-14.5068067557398,0 +-56.22498859301511,-14.50561407472597,0 +-56.2248528697596,-14.50442181615238,0 +-56.22459285694251,-14.50311053052041,0 +-56.22421110252855,-14.50191897493051,0 +-56.22419623939063,-14.50048578570726,0 +-56.22393659724223,-14.49917317191449,0 +-56.2235551336746,-14.49798057832133,0 +-56.22293011690804,-14.49702857967224,0 +-56.22230310901666,-14.49583742454638,0 +-56.2222910710009,-14.49452216792896,0 +-56.22252758350172,-14.49344403385056,0 +-56.22301184143726,-14.49212525370688,0 +-56.22399433502765,-14.49140079450733,0 +-56.22509985763634,-14.49031740814758,0 +-56.22620716338435,-14.48947342427418,0 +-56.22719131023455,-14.4887498913264,0 +-56.22817538754866,-14.48790750588969,0 +-56.22916230845118,-14.48706722987159,0 +-56.23051849773744,-14.48598728239918,0 +-56.23162679820841,-14.48502866893789,0 +-56.23261086503815,-14.48407158325255,0 +-56.23347263280836,-14.48347282689281,0 +-56.23433386892792,-14.48287443742065,0 +-56.23543930464476,-14.48191878701039,0 +-56.23678493207245,-14.48107057117402,0 +-56.23788565109916,-14.48034254799392,0 +-56.23910771556626,-14.47948946159935,0 +-56.24032940605726,-14.4786290822656,0 +-56.24130901754017,-14.47801195360313,0 +-56.24216233990245,-14.47691336447823,0 +-56.24239853991204,-14.47570215197109,0 +-56.2425135887225,-14.47473331363974,0 +-56.24287286872765,-14.47339618737355,0 +-56.24373004723773,-14.47229345673882,0 +-56.24458798874299,-14.47109095348258,0 +-56.24532099077525,-14.4697759921889,0 +-56.24568393909568,-14.46870796607005,0 +-56.24653958409701,-14.46753485990974,0 +-56.24789337238479,-14.46707232013484,0 +-56.24912866319107,-14.46706082025358,0 +-56.25048834577747,-14.46679612005224,0 +-56.26031947751293,-14.46537131861389,0 +-56.266384725306,-14.46236434437435,0 +-56.27093556863242,-14.45986289190836,0 +-56.27497014605903,-14.45637829705755,0 +-56.27851126431614,-14.45437696602983,0 +-56.28306533322095,-14.45138359418064,0 +-56.28864285815586,-14.44838723245218,0 +-56.29166962890454,-14.44540348807247,0 +-56.29571057142228,-14.44191824677385,0 +-56.30076243190106,-14.43743866011562,0 +-56.30531415900533,-14.43394878036201,0 +-56.3062879764673,-14.42851466339718,0 +-56.30727308082619,-14.42455800582393,0 +-56.31129923440687,-14.41861077024583,0 +-56.31483793169264,-14.41466337701732,0 +-56.3193958571136,-14.41120153398833,0 +-56.32344559630673,-14.40823332841001,0 +-56.32799877100339,-14.40522346574473,0 +-56.33154316855482,-14.40320615012824,0 +-56.33763033273814,-14.40067809040681,0 +-56.34320965426484,-14.39761277045428,0 +-56.34828410732953,-14.39456941882133,0 +-56.35386335516887,-14.39209277685037,0 +-56.35842510426821,-14.38960275796525,0 +-56.36451712763785,-14.38759626171947,0 +-56.36907276314165,-14.38461254136105,0 +-56.37414027623436,-14.38211948764202,0 +-56.37920653749655,-14.37962685939563,0 +-56.38275678460977,-14.37661151377038,0 +-56.38782149647103,-14.37311422820651,0 +-56.39619157730125,-14.37070054264875,0 +-56.40076036012631,-14.36968038743495,0 +-56.40735715749098,-14.36815239456559,0 +-56.41191485739603,-14.36614766074037,0 +-56.41748346707845,-14.36364265121059,0 +-56.4215196980675,-14.35966963694909,0 +-56.42606648955449,-14.35568981452636,0 +-56.43062177124293,-14.35170267529776,0 +-56.43365140394103,-14.34772670914895,0 +-56.43666029490723,-14.34178122147033,0 +-56.43967632086336,-14.33781637144548,0 +-56.44319578699982,-14.33335569352778,0 +-56.44668366687942,-14.32892713904043,0 +-56.45020192863766,-14.32496533714045,0 +-56.45269791899735,-14.32002354402992,0 +-56.45518257774835,-14.31459754968688,0 +-56.45767091408802,-14.30966528400636,0 +-56.46117631401185,-14.30522109482622,0 +-56.46569830504476,-14.30076741430801,0 +-56.46922254673342,-14.29630088232944,0 +-56.47375680288814,-14.29282648619007,0 +-56.47725242291219,-14.28789554260517,0 +-56.48128742574651,-14.28441464018095,0 +-56.48533795827259,-14.28190987508757,0 +-56.48988339793351,-14.27891861437355,0 +-56.49493177439754,-14.27543149416766,0 +-56.49643403165695,-14.27345471124598,0 +-56.50895704353919,-14.26592803868428,0 +-56.51451366507081,-14.26243712257958,0 +-56.51905106341375,-14.25994263784887,0 +-56.52559807972816,-14.25645064936648,0 +-56.53165238500404,-14.25295727021216,0 +-56.53821936025689,-14.24748508254562,0 +-56.54326985337671,-14.24350471589633,0 +-56.54730655381132,-14.24002631157249,0 +-56.55587873770866,-14.23355962990411,0 +-56.56192054763539,-14.22858937988267,0 +-56.5654439862654,-14.22560743622386,0 +-56.57046715165956,-14.22015197072364,0 +-56.57497997465253,-14.21518033405362,0 +-56.5774987942603,-14.21318567100951,0 +-56.58458036807186,-14.2096924451389,0 +-56.58963817400704,-14.20767811489468,0 +-56.59418003737824,-14.20468350644827,0 +-56.60023684820825,-14.2006898031274,0 +-56.60477164412337,-14.19670799610279,0 +-56.60982207622583,-14.19370999646175,0 +-56.61538647297787,-14.19119667789679,0 +-56.61942336017306,-14.18820418764056,0 +-56.62345631043208,-14.18471853842758,0 +-56.62695978463316,-14.17877331857719,0 +-56.62997447238725,-14.17480065882027,0 +-56.63147842482599,-14.17232006057288,0 +-56.64100503541689,-14.1588931884884,0 +-56.64656134985535,-14.15637018509747,0 +-56.65261656469268,-14.15334317487306,0 +-56.65766424493664,-14.15081965927041,0 +-56.66220085128211,-14.14780744214563,0 +-56.66775977028212,-14.14527716334318,0 +-56.67332564901972,-14.14323995758247,0 +-56.67939608218766,-14.14070220283511,0 +-56.68750243101416,-14.13765803916999,0 +-56.6935826788632,-14.13513171244866,0 +-56.69915027022455,-14.13211793735887,0 +-56.70319640507245,-14.12961169945201,0 +-56.70875436871312,-14.12560936178136,0 +-56.71437091232214,-14.12753263863003,0 +-56.71795707653159,-14.12996859529026,0 +-56.72358338043827,-14.13287920576541,0 +-56.72868243531974,-14.13383164226811,0 +-56.73326728696286,-14.13430950298565,0 +-56.7393755248182,-14.13476223097686,0 +-56.74295413644335,-14.13671447572826,0 +-56.74755331176668,-14.13915311073337,0 +-56.75369106787274,-14.14305425114514,0 +-56.75881845705394,-14.14744471989237,0 +-56.76290444006982,-14.14938052745562,0 +-56.76953594754796,-14.15178799444812,0 +-56.77564419515876,-14.15272035036878,0 +-56.78122467617185,-14.15168440838693,0 +-56.78630475403461,-14.15164152234517,0 +-56.79087627519201,-14.15160283706888,0 +-56.79697091223217,-14.1515511447755,0 +-56.80256284577316,-14.15199510166988,0 +-56.80764042038772,-14.15195176357266,0 +-56.81424036029938,-14.15189526985024,0 +-56.82033170603204,-14.15184297233394,0 +-56.82590308358746,-14.1513084811074,0 +-56.83147449540331,-14.15077246408826,0 +-56.83653806501882,-14.15024017711936,0 +-56.84210388737114,-14.14921007988202,0 +-56.84311290752016,-14.14870912337446,0 +-56.87828332020464,-14.14890487245703,0 +-56.88386329862369,-14.1488447439815,0 +-56.88894269539644,-14.14928402847612,0 +-56.89655954971916,-14.14969576508502,0 +-56.9021415344044,-14.14963524525487,0 +-56.9077242761323,-14.14957461743252,0 +-56.91180196583404,-14.15101290579296,0 +-56.92247455783529,-14.15189712625711,0 +-56.92756163315075,-14.15283182531097,0 +-56.93314569092658,-14.15278071771363,0 +-56.93872903685445,-14.15272948875177,0 +-56.94278923073889,-14.15269214593479,0 +-56.9483714162366,-14.15264071276947,0 +-56.95447308267687,-14.15356080880105,0 +-56.95803457446539,-14.15400634635415,0 +-56.96515101490437,-14.15492057696251,0 +-56.97022108090951,-14.15488133273952,0 +-56.97580313162606,-14.1553273310826,0 +-56.97985825554107,-14.15529321052561,0 +-56.99705479907256,-14.15808372201435,0 +-57.00213615916509,-14.15803629188536,0 +-57.00772183681777,-14.15798215448647,0 +-57.01685697498802,-14.15789065279766,0 +-57.02448244804938,-14.15879960768372,0 +-57.02753373825183,-14.15926163384586,0 +-57.03667032582992,-14.15965941337354,0 +-57.04227817784399,-14.16059991608619,0 +-57.05043505660302,-14.1615290333013,0 +-57.05754185791611,-14.16146577775901,0 +-57.06210608738068,-14.16142141207511,0 +-57.0671768210751,-14.16137201369112,0 +-57.07529424664784,-14.16178400768868,0 +-57.0798676046975,-14.16272167135403,0 +-57.09052244198892,-14.16407990975595,0 +-57.09508564547151,-14.16451748218719,0 +-57.09964396689991,-14.16446376882129,0 +-57.10622933764111,-14.16438601630042,0 +-57.11229810460417,-14.16333134957934,0 +-57.11685327210531,-14.16278619176269,0 +-57.12445024629881,-14.16221312076083,0 +-57.13103358187679,-14.1616481481421,0 +-57.13711698617294,-14.16157546256793,0 +-57.14117316050104,-14.16152695839474,0 +-57.14827262849764,-14.16144231585275,0 +-57.15335006947165,-14.16187385812361,0 +-57.15994464838819,-14.16179496207191,0 +-57.16655719676717,-14.16369269093717,0 +-57.17621366398551,-14.16704939952892,0 +-57.18180403021639,-14.16746927180095,0 +-57.18841198043607,-14.16787610296721,0 +-57.19296941037111,-14.16783088806904,0 +-57.19802871859265,-14.16828002063408,0 +-57.24958541094891,-14.17017515407925,0 +-57.25768140100076,-14.17007260167825,0 +-57.2632487347354,-14.17000172279581,0 +-57.26679662212951,-14.16996079720375,0 +-57.27794735055951,-14.16983188715225,0 +-57.29013627959133,-14.17069317946215,0 +-57.29420453347439,-14.17115286904242,0 +-57.30080021915357,-14.17109918350168,0 +-57.30789776044837,-14.17151333127479,0 +-57.31600838514163,-14.17238102781066,0 +-57.32514443159642,-14.17372702240995,0 +-57.33479173630341,-14.175084687869,0 +-57.34240433373659,-14.17598295451183,0 +-57.34848967682913,-14.17640677082988,0 +-57.35456795695954,-14.17633923666863,0 +-57.35760675717522,-14.17630537210026,0 +-57.3636771436153,-14.175746776121,0 +-57.36973264664576,-14.17420758722003,0 +-57.37524062989163,-14.16973099310013,0 +-57.3802783754269,-14.16820660166468,0 +-57.3853270319977,-14.16766433003298,0 +-57.38835922312449,-14.16763347784513,0 +-57.40960932377448,-14.171325983094,0 +-57.4177250405824,-14.17221416990977,0 +-57.42278383985345,-14.17215179502714,0 +-57.42735811627736,-14.17356940121943,0 +-57.43243123070337,-14.17448938527891,0 +-57.44055448258425,-14.17635476216594,0 +-57.44919772474805,-14.17919649003286,0 +-57.45274665199101,-14.17964442706408,0 +-57.4603576826355,-14.18102587214576,0 +-57.46592384678138,-14.18095812489936,0 +-57.47604387470724,-14.18083463253381,0 +-57.48567685967524,-14.18218791972452,0 +-57.49124911076671,-14.18260820746409,0 +-57.50086394394621,-14.182485482682,0 +-57.50744968028374,-14.18289249402033,0 +-57.51149889372784,-14.18284061050149,0 +-57.51909272588149,-14.1832427473556,0 +-57.52060964413529,-14.1832254696499,0 +-57.5287141523836,-14.1841104322791,0 +-57.5358085751007,-14.18500434012151,0 +-57.54138525572241,-14.18591665192666,0 +-57.54696839842966,-14.18731910491846,0 +-57.55356266913491,-14.18870883990379,0 +-57.56470074354185,-14.18955113368114,0 +-57.57077810459437,-14.18996429754012,0 +-57.57584470646098,-14.19038983349396,0 +-57.58144412987685,-14.1927705151535,0 +-57.5865309375548,-14.19466730337895,0 +-57.59061060567619,-14.19706809017993,0 +-57.59776409796201,-14.20237289860106,0 +-57.6024370780507,-14.20671755709143,0 +-57.60657906618635,-14.21156917489215,0 +-57.61066455395716,-14.21446247351246,0 +-57.61577553016923,-14.21685003171192,0 +-57.6214002151835,-14.21873981022403,0 +-57.6259931618924,-14.21966172621567,0 +-57.63308477004955,-14.22104392629211,0 +-57.64211138410563,-14.22534570818996,0 +-57.64772606225414,-14.22870742841562,0 +-57.65129719220074,-14.23062406041541,0 +-57.6559153138156,-14.2349809856961,0 +-57.66003482373993,-14.23983581026062,0 +-57.66465476680818,-14.24419395802538,0 +-57.6677483355679,-14.24808080952858,0 +-57.67186922732571,-14.25293662082422,0 +-57.67649784418838,-14.25778678249254,0 +-57.68009340583942,-14.26117803210917,0 +-57.68622637607646,-14.26453977473935,0 +-57.69236134957854,-14.26790235211842,0 +-57.69745731953644,-14.26931502252291,0 +-57.70203646780512,-14.27072663665772,0 +-57.70913449642936,-14.27306811511223,0 +-57.71881266153363,-14.27686667041593,0 +-57.7305241575403,-14.28112872721792,0 +-57.73360341418174,-14.28354552914564,0 +-57.7387644635748,-14.28888895012062,0 +-57.74340291260615,-14.29325638858549,0 +-57.7490809988185,-14.2990869631186,0 +-57.75469419863523,-14.30146956284522,0 +-57.76187417691769,-14.30629414704366,0 +-57.76597088092153,-14.30869930966477,0 +-57.76954231696186,-14.31012609019235,0 +-57.77768761176618,-14.31198484869497,0 +-57.78173976049689,-14.31192776567985,0 +-57.79895424999513,-14.30787102804183,0 +-57.81096668854951,-14.30564358093671,0 +-57.8180299535128,-14.30417150697252,0 +-57.82512096867566,-14.30476017160612,0 +-57.83576281243635,-14.30598539463241,0 +-57.84569708415318,-14.30721853882724,0 +-57.8549129785544,-14.30777436277163,0 +-57.86129595469347,-14.30837030809534,0 +-57.87124918349748,-14.31097614010702,0 +-57.88049446614811,-14.31359171304091,0 +-57.88687698560576,-14.31418684443385,0 +-57.90037020233134,-14.31674020618394,0 +-57.91241657355403,-14.31725579988518,0 +-57.91667770470434,-14.31788981998596,0 +-57.9273574913091,-14.32118567479943,0 +-57.93232899647591,-14.32180931365743,0 +-57.94156528992248,-14.32306538175915,0 +-57.94727812299784,-14.32573707933014,0 +-57.95796733245803,-14.32903287158675,0 +-57.97149611171753,-14.33296378413503,0 +-57.97929983068971,-14.33421117502513,0 +-57.98707979898109,-14.33408441045708,0 +-57.99274768058672,-14.33467879231954,0 +-58.00197104289953,-14.33658824156212,0 +-58.00977144801718,-14.33783715754045,0 +-58.02317489340752,-14.34130769776814,0 +-58.0331223422233,-14.34254163049645,0 +-58.04163959015698,-14.343108821039,0 +-58.04589233664999,-14.34304932694561,0 +-58.05869150887226,-14.34561361123961,0 +-58.06865406773837,-14.34821665716125,0 +-58.0821869042581,-14.35214575294921,0 +-58.09003815595744,-14.35546728681372,0 +-58.09856731156163,-14.35740224512657,0 +-58.10708593290245,-14.35932891153943,0 +-58.11913081236809,-14.36051530955018,0 +-58.12693378955034,-14.36176686320031,0 +-58.13544524535543,-14.36300739818741,0 +-58.14395795857141,-14.36424777598497,0 +-58.15034653924164,-14.36551464459632,0 +-58.15602959728434,-14.36679187465531,0 +-58.16881960015083,-14.36932759308397,0 +-58.1738095755997,-14.37131706139597,0 +-58.18731405756515,-14.37455286576165,0 +-58.19795769292946,-14.37576059787793,0 +-58.20651079349095,-14.37905911654956,0 +-58.21786484779024,-14.3802552892654,0 +-58.23350349280972,-14.38344311153667,0 +-58.24416313400781,-14.38533561373526,0 +-58.24699700935866,-14.38529139347827,0 +-58.26119468901462,-14.38712932426606,0 +-58.26970399193097,-14.3883712459276,0 +-58.27967312540574,-14.39233383954087,0 +-58.2882152542368,-14.39563121418067,0 +-58.29319848701901,-14.39761137137467,0 +-58.30599040394545,-14.40152639724976,0 +-58.31378663617968,-14.4027754420354,0 +-58.32228801819299,-14.40401284866948,0 +-58.32866887653334,-14.40528325158897,0 +-58.33151760781039,-14.40660932550532,0 +-58.34498207914395,-14.40913739877265,0 +-58.35141892201049,-14.41383283101016,0 +-58.3535483532126,-14.41448411068426,0 +-58.38060307809362,-14.4260224445873,0 +-58.40528802861586,-14.42860879476332,0 +-58.42545838571311,-14.43723382766829,0 +-58.44568471621891,-14.44884171332976,0 +-58.46278324349365,-14.45751621646203,0 +-58.48142572370634,-14.46616523553789,0 +-58.50155904085484,-14.4718039735542,0 +-58.52020867515697,-14.48045176530578,0 +-58.53732084215871,-14.4891246324044,0 +-58.55132575539377,-14.49635526788687,0 +-58.56844244942526,-14.50502642838787,0 +-58.58256355598832,-14.51822804404045,0 +-58.59654745824395,-14.5239650751331,0 +-58.61511224456707,-14.52811715838013,0 +-58.6305909130616,-14.53231879330218,0 +-58.64920070960702,-14.53944669297331,0 +-58.66475685703558,-14.54811869534081,0 +-58.68336179427363,-14.55524080842405,0 +-58.69885907739482,-14.56092512387157,0 +-58.71439292238422,-14.56810516036534,0 +-58.73002163574631,-14.57829043138078,0 +-58.75174698247663,-14.5839007878397,0 +-58.76884581425049,-14.58958709587428,0 +-58.78593694237922,-14.59379069807952,0 +-58.79994490321452,-14.59804630802586,0 +-58.82316001120574,-14.59915593774999,0 +-58.83700023633396,-14.59593136600467,0 +-58.87684696317659,-14.59203586453948,0 +-58.89684562257359,-14.590182361285,0 +-58.92453799991996,-14.58821055999691,0 +-58.94604573080359,-14.584850818281,0 +-58.95988236020468,-14.58311588126347,0 +-58.97692042529405,-14.58729407808136,0 +-58.99411060122159,-14.59893160016819,0 +-59.00502003241878,-14.60470973766926,0 +-59.01587169214041,-14.60750361798947,0 +-59.03144083008645,-14.61469242437345,0 +-59.06262047201577,-14.63056323487218,0 +-59.07677976599694,-14.64375277968275,0 +-59.09088225959396,-14.65395786495714,0 +-59.1077694211067,-14.64917860949502,0 +-59.11520608102987,-14.6355926463407,0 +-59.11954568495577,-14.62204605662032,0 +-59.12687122203681,-14.60395835970492,0 +-59.1451120977957,-14.5916420319433,0 +-59.16194320995918,-14.58534135575104,0 +-59.18034704099149,-14.58050408349078,0 +-59.1910437024125,-14.57581735918679,0 +-59.21557863798714,-14.56936470254937,0 +-59.22620972941532,-14.56169186010291,0 +-59.23819429420197,-14.54503812104305,0 +-59.24868995496907,-14.52991865514925,0 +-59.259341950905,-14.5222559283441,0 +-59.27292715456268,-14.50707246943144,0 +-59.28351844393029,-14.49642101634786,0 +-59.2972622661732,-14.48869276561328,0 +-59.31406624325817,-14.4794098265252,0 +-59.31838597443083,-14.46439357464592,0 +-59.32988886405129,-14.42239192736152,0 +-59.3402288506757,-14.40126790502696,0 +-59.34456312476598,-14.38773482310366,0 +-59.35332625526394,-14.36515080024952,0 +-59.36385382036264,-14.35299015931832,0 +-59.38516473206106,-14.34061351035597,0 +-59.40037586052421,-14.33134516576456,0 +-59.42014574222279,-14.31900209694019,0 +-59.43077269772674,-14.31132774427426,0 +-59.44602605920365,-14.30356283529422,0 +-59.45943655038111,-14.28238306150224,0 +-59.46681133857841,-14.26729689783954,0 +-59.47260931464129,-14.25074753993073,0 +-59.47401660820908,-14.24474358937186,0 +-59.47965339143297,-14.2207332368082,0 +-59.47909245622807,-14.19535517817162,0 +-59.47253060703609,-14.1775668100534,0 +-59.46757749239204,-14.16273404128715,0 +-59.45770708510162,-14.13456422296636,0 +-59.44954487034398,-14.11382860782435,0 +-59.44286139458762,-14.09007867192928,0 +-59.44088343320399,-14.06921147664267,0 +-59.44049087038628,-14.05130271726636,0 +-59.44009239575764,-14.03339831463545,0 +-59.43987271409396,-14.02294610265137,0 +-59.43937057689194,-13.99905095811844,0 +-59.44213535543249,-13.98404869042427,0 +-59.44490019484313,-13.96904368909725,0 +-59.44753969382815,-13.94805826928675,0 +-59.45344659897946,-13.93597056290414,0 +-59.46702066436859,-13.92222067470795,0 +-59.48370760389754,-13.90989543008227,0 +-59.49885699232804,-13.8975992477447,0 +-59.51869215862357,-13.88819006785426,0 +-59.53240492436721,-13.88040236735629,0 +-59.54004814018781,-13.87723869982756,0 +-59.57501117068959,-13.85401986527937,0 +-59.60528481743462,-13.8294326648577,0 +-59.61135153284369,-13.82480801498745,0 +-59.62713120548727,-13.80704680680005,0 +-59.64205767395375,-13.78731714670005,0 +-59.66183335039668,-13.77793446767478,0 +-59.67235856726167,-13.7672535319242,0 +-59.67830501446402,-13.75816428901203,0 +-59.69310209330839,-13.73245348515568,0 +-59.70024582276324,-13.70839994905508,0 +-59.70599569409209,-13.69034385796537,0 +-59.70877054417142,-13.67683401170487,0 +-59.71612440931277,-13.66172697050285,0 +-59.72947704670798,-13.64052043241065,0 +-59.73842337178598,-13.62837305942214,0 +-59.75184155896481,-13.61015085937396,0 +-59.76820016125976,-13.58587997373389,0 +-59.7877439665145,-13.56448015534525,0 +-59.79980519350985,-13.55221474642896,0 +-59.80868771225561,-13.53553405287312,0 +-59.822383332955,-13.52619047071624,0 +-59.82694985627937,-13.52307459496741,0 +-59.83180187165138,-13.47267909452455,0 +-59.8315065943099,-13.4592243017673,0 +-59.83544411892832,-13.42771058399299,0 +-59.83959747989935,-13.4066662562759,0 +-59.85146092828143,-13.3854272033678,0 +-59.86195300126022,-13.37169779943959,0 +-59.86627625909119,-13.35811878087539,0 +-59.86586825179568,-13.34016755679618,0 +-59.86559622632615,-13.32819938813684,0 +-59.86522230246695,-13.31174212877709,0 +-59.86484831944655,-13.29528370215676,0 +-59.86444043734199,-13.27732787188798,0 +-59.86406679524287,-13.26086687053609,0 +-59.86523197889417,-13.24283481923079,0 +-59.86485778062269,-13.22483546287682,0 +-59.86916503938421,-13.20971878968633,0 +-59.86904033329697,-13.20371646559151,0 +-59.87101312541368,-13.16002870625615,0 +-59.87340364376337,-13.13157218708284,0 +-59.87764807243838,-13.11652731947638,0 +-59.88471381007779,-13.09096354897222,0 +-59.8979821731509,-13.06825332975488,0 +-59.90818251080521,-13.04560807616545,0 +-59.91991415371914,-13.02292836771881,0 +-59.93812955245776,-13.01505925289462,0 +-59.9503195287196,-13.01178686250156,0 +-59.97313440331124,-13.00375885699852,0 +-59.99139074872087,-12.99732689054027,0 +-60.00341181335982,-12.9865449209168,0 +-60.02003649453693,-12.97564796365566,0 +-60.0304943034309,-12.96339648030055,0 +-60.04088464999816,-12.94814180103152,0 +-60.04356921239073,-12.93157505677371,0 +-60.04631519217865,-12.91803639406354,0 +-60.04895404270746,-12.9000058864451,0 +-60.05421711599092,-12.89335603184506,0 +-60.05544170212108,-12.88900094622493,0 +-60.05878168474736,-12.88068262813604,0 +-60.06306389230903,-12.87492838170028,0 +-60.06385693716402,-12.87102602941811,0 +-60.06548007427159,-12.86493585399165,0 +-60.06707262981304,-12.85755355031604,0 +-60.06827773005962,-12.85234585460257,0 +-60.07037968472395,-12.84754955753829,0 +-60.0741915574134,-12.84012144868228,0 +-60.07584840469352,-12.83533066333064,0 +-60.07840451269018,-12.83095346226039,0 +-60.08051721019449,-12.82658530834868,0 +-60.08306932589166,-12.82220433858733,0 +-60.0860429938698,-12.81694931683485,0 +-60.08817310166275,-12.81344270925787,0 +-60.08851839984669,-12.80954467973523,0 +-60.08835484382386,-12.80306596596354,0 +-60.08692677308429,-12.79921013546456,0 +-60.08548780347389,-12.79492335950896,0 +-60.08449107406025,-12.79062743935997,0 +-60.08900771665077,-12.78522583125932,0 +-60.09022083993541,-12.78044971255182,0 +-60.09363775698338,-12.77519238514049,0 +-60.09665409252278,-12.77167053438472,0 +-60.09740417758842,-12.76604015183209,0 +-60.09904103196037,-12.76039105129847,0 +-60.10115250204198,-12.75602575640846,0 +-60.10417154355309,-12.75250321655122,0 +-60.10807041515145,-12.74895070976208,0 +-60.11063836143872,-12.74542816174951,0 +-60.11544501441382,-12.74272291207676,0 +-60.11985550189983,-12.74175889767058,0 +-60.12647454769689,-12.74031348572705,0 +-60.12956838198779,-12.73981152343779,0 +-60.13664482559783,-12.73878713627832,0 +-60.14678917618054,-12.73596312470908,0 +-60.14983421831397,-12.73329928766268,0 +-60.15379907926269,-12.73191136890059,0 +-60.15865307630649,-12.73050272996533,0 +-60.16352680251796,-12.72952770242199,0 +-60.16796547027877,-12.72856360695965,0 +-60.17064244638345,-12.72850402397327,0 +-60.18485125709497,-12.72625629914892,0 +-60.20074292981705,-12.72514519612273,0 +-60.20981807514503,-12.72419221160373,0 +-60.22116690135625,-12.72318459608323,0 +-60.23098122415806,-12.72147287513891,0 +-60.23922402228875,-12.71757924535379,0 +-60.24753882348873,-12.71664193511713,0 +-60.25500458154033,-12.71202715144818,0 +-60.26167625346008,-12.7059520216412,0 +-60.26906885309675,-12.69838024947179,0 +-60.27346816243494,-12.69235849518669,0 +-60.28320426499814,-12.6876892849437,0 +-60.29072201395699,-12.68529172132231,0 +-60.29965236002493,-12.67916555248353,0 +-60.30852228928984,-12.67082459302347,0 +-60.31143648952578,-12.6663200440023,0 +-60.31575370467485,-12.65734615823604,0 +-60.32163475453869,-12.65055572985353,0 +-60.3282576535916,-12.64225775659822,0 +-60.32899802219349,-12.64149962794337,0 +-60.33709371235691,-12.63093799762966,0 +-60.34222867431333,-12.62340671027078,0 +-60.34734833624722,-12.61513240683356,0 +-60.34869718442807,-12.6076878434726,0 +-60.34849744404643,-12.59879544403974,0 +-60.34829767496016,-12.58989990351498,0 +-60.34813111814013,-12.58248453233213,0 +-60.3487393672334,-12.57579040534911,0 +-60.35154361243386,-12.56532439777205,0 +-60.35593892803735,-12.55777947784113,0 +-60.35881869333772,-12.55026794077766,0 +-60.36015132901399,-12.54130130418694,0 +-60.36304853282294,-12.53452695445306,0 +-60.36671440601935,-12.52848377389807,0 +-60.38557444020259,-12.51709464937988,0 +-60.40074160691528,-12.51672998980813,0 +-60.41422444500576,-12.51640513062385,0 +-60.434239312744,-12.50769083525567,0 +-60.45585618133382,-12.49564247756732,0 +-60.47085736029757,-12.48869083619729,0 +-60.48753913169212,-12.48169188143395,0 +-60.50232636757549,-12.46651010430331,0 +-60.51715505395235,-12.45297202113506,0 +-60.53868014486494,-12.43761914312956,0 +-60.56213965502837,-12.43209444000933,0 +-60.58218643825146,-12.4250070418042,0 +-60.60034857724582,-12.4097336602609,0 +-60.61185612230666,-12.39791762320631,0 +-60.61654105723895,-12.38297665995728,0 +-60.62287033912374,-12.3663440050678,0 +-60.62763819975838,-12.35469056504962,0 +-60.6420256050616,-12.32301451228503,0 +-60.64992760115431,-12.30137995326536,0 +-60.65466031912516,-12.28806635756022,0 +-60.6608741858045,-12.2664648523514,0 +-60.67063362825458,-12.25136216204161,0 +-60.68546327422533,-12.23612042543591,0 +-60.69176398668245,-12.21779917149995,0 +-60.69320424614484,-12.20785709690163,0 +-60.71288582246719,-12.18422512567238,0 +-60.71764448635581,-12.17255171966542,0 +-60.7257354582849,-12.15914025516166,0 +-60.7403597135789,-12.13730506564312,0 +-60.74829327357593,-12.11727928186824,0 +-60.74944653341555,-12.09576586836371,0 +-60.75241166498148,-12.07915817697098,0 +-60.75541820071653,-12.06419950596676,0 +-60.76168878227158,-12.04417997757653,0 +-60.77129876593475,-12.02240786975228,0 +-60.79141291317191,-12.01523736529821,0 +-60.8116922745772,-12.01468075023827,0 +-60.82691792839337,-12.01424968409637,0 +-60.84390011420904,-12.01540555397445,0 +-60.85741729469756,-12.01335117892713,0 +-60.88098739056311,-12.00603113747191,0 +-60.95704663444543,-11.97659070720063,0 +-60.96413992263165,-11.97288463539333,0 +-60.96066542984153,-11.9369823118808,0 +-60.96176069280489,-11.92609293823628,0 +-60.96824550705063,-11.90963005822176,0 +-60.97885913273422,-11.89169648353596,0 +-60.98276416676053,-11.88208508333936,0 +-60.99083225275733,-11.8723604793013,0 +-61.00693478512545,-11.85154723616687,0 +-61.0138012170925,-11.84864354902093,0 +-61.03140745834018,-11.83185595249731,0 +-61.04207120456527,-11.81525398681202,0 +-61.05280103083333,-11.80137137656917,0 +-61.06773230364165,-11.78873158597079,0 +-61.07985091566353,-11.77480635172034,0 +-61.08799775260817,-11.76778199475077,0 +-61.09874015533385,-11.75388229413945,0 +-61.12319272916918,-11.73279197830541,0 +-61.14072822755794,-11.71325640548333,0 +-61.15999093081093,-11.70591361020526,0 +-61.17230863071364,-11.69876362867121,0 +-61.18173765361676,-11.68760963314518,0 +-61.19109222330269,-11.67373367803545,0 +-61.19623951606824,-11.65861443591013,0 +-61.19875683203888,-11.64901383324998,0 +-61.20807975015668,-11.63376752077217,0 +-61.21471589550644,-11.62130257005034,0 +-61.2255302673084,-11.60870869986491,0 +-61.24466824567109,-11.5944944855965,0 +-61.26503158959966,-11.57650579791242,0 +-61.2785743358853,-11.5652662616665,0 +-61.28930675330735,-11.55274485297032,0 +-61.30561967093102,-11.54142618858426,0 +-61.32054683370594,-11.53014439841098,0 +-61.33970898362143,-11.52145998736666,0 +-61.34909377590265,-11.51032985370911,0 +-61.36133247488533,-11.50183382656429,0 +-61.37911751514275,-11.49317923763571,0 +-61.3927053477744,-11.48328240971519,0 +-61.40760134283038,-11.47062846102786,0 +-61.42523231821753,-11.45653449466062,0 +-61.43759566057961,-11.45210247143479,0 +-61.45404193852313,-11.44483329528936,0 +-61.47203787744492,-11.44295472310761,0 +-61.48864923307338,-11.44111483429165,0 +-61.50665130472997,-11.43923347380889,0 +-61.52036765788135,-11.43339761256488,0 +-61.5381308491004,-11.42336192334999,0 +-61.55613472250278,-11.42147804102254,0 +-61.57691776110717,-11.41951168929961,0 +-61.59076123354773,-11.41774688646044,0 +-61.60595343327468,-11.41458174083774,0 +-61.62396643840839,-11.412692553883,0 +-61.63617598580783,-11.40281235954926,0 +-61.64556581150238,-11.39165416601238,0 +-61.67230153792801,-11.38161304846783,0 +-61.68748799037138,-11.3798239249627,0 +-61.69860266687528,-11.38086545025511,0 +-61.71803697148614,-11.38162994501372,0 +-61.73747842782579,-11.38239229346857,0 +-61.75133436743794,-11.38197542995487,0 +-61.76791888128898,-11.38012205559569,0 +-61.7858497191674,-11.37686755416585,0 +-61.79962507101629,-11.37373599126794,0 +-61.81743650903166,-11.36640228434187,0 +-61.83260028870168,-11.36322669429043,0 +-61.85865021665199,-11.3529203407971,0 +-61.87361287154861,-11.34294525560122,0 +-61.87761023010858,-11.33738024142702,0 +-61.89789302653724,-11.31905910931327,0 +-61.90589279621052,-11.30792094976268,0 +-61.91507661654229,-11.28993701705886,0 +-61.9146258759519,-11.27497610376565,0 +-61.91409317147018,-11.25729320415196,0 +-61.9095239466908,-11.24381666058586,0 +-61.90797607298811,-11.2384143311826,0 +-61.90544409760163,-11.20834382709455,0 +-61.90054249769847,-11.18402229413664,0 +-61.90143299337027,-11.16768314354523,0 +-61.90513675075566,-11.15261825721501,0 +-61.90892302085095,-11.14026871644429,0 +-61.91242012450628,-11.1184086206862,0 +-61.91469631170008,-11.10202238619137,0 +-61.91839979797097,-11.08695147249318,0 +-61.92226862332515,-11.07731436110522,0 +-61.92724921009955,-11.05811492391821,0 +-61.93235349343038,-11.04298916231642,0 +-61.93195285236102,-11.02938994507261,0 +-61.92608725107248,-11.01867898157582,0 +-61.91732892538428,-11.0039714347534,0 +-61.91692799321716,-10.99036765034655,0 +-61.91664733241508,-10.9808439226497,0 +-61.92016476497436,-10.95894368176913,0 +-61.92681635775207,-10.94920244634842,0 +-61.93053638352086,-10.93409905152411,0 +-61.93029658936786,-10.92593018803773,0 +-61.92969694730198,-10.90550499888661,0 +-61.93619398930691,-10.8903039361256,0 +-61.94423916076682,-10.88050421257196,0 +-61.96447740031599,-10.86397325723505,0 +-61.98107464684408,-10.86347370052493,0 +-61.99193078103287,-10.85634776054162,0 +-61.99867935985162,-10.85070488166204,0 +-62.01213644427585,-10.83805814019204,0 +-62.02144414105559,-10.82553519150205,0 +-62.02370985910984,-10.80914401831831,0 +-62.03175955785849,-10.80073722666452,0 +-62.0480265481661,-10.78935814099538,0 +-62.06030914410411,-10.78354231452956,0 +-62.06437542627075,-10.78069742695809,0 +-62.08076594128399,-10.77339501714477,0 +-62.10138889550408,-10.76868441974105,0 +-62.11928124903543,-10.7654206418634,0 +-62.13164186887703,-10.76232416806816,0 +-62.14664081538453,-10.75506572650124,0 +-62.1644045352845,-10.74772215127193,0 +-62.17797701440398,-10.73914514646854,0 +-62.18895334301028,-10.73608868129543,0 +-62.20545988534675,-10.73286244349435,0 +-62.21798825420167,-10.73519915480044,0 +-62.23030528470527,-10.73073878257755,0 +-62.24400864539328,-10.72484850506356,0 +-62.27626293899463,-10.68877257130956,0 +-62.2828686694388,-10.67904337331093,0 +-62.28679776305297,-10.6721181026217,0 +-62.30691859229309,-10.65243609408262,0 +-62.31486409720141,-10.64129920181585,0 +-62.33374956243846,-10.62569756974055,0 +-62.34970870230185,-10.6047253834537,0 +-62.36420573813563,-10.58106334745706,0 +-62.36768077269284,-10.5591220433416,0 +-62.37694664997802,-10.54516275530482,0 +-62.38781494442526,-10.53795773320277,0 +-62.39705048799367,-10.52261091018428,0 +-62.39839327755633,-10.52119926328534,0 +-62.42506515828062,-10.49857437625792,0 +-62.443977424653,-10.48299619342177,0 +-62.45315992104865,-10.46636703805557,0 +-62.46385701878957,-10.45376623509718,0 +-62.4774972899316,-10.44651031701064,0 +-62.49230261260717,-10.43379523096054,0 +-62.49738273863441,-10.42003097836342,0 +-62.50545321676871,-10.41297149125948,0 +-62.53291727852282,-10.39072372983809,0 +-62.55311260948346,-10.37514049223917,0 +-62.56249839979024,-10.36669187450882,0 +-62.57731336959048,-10.35535201358768,0 +-62.5853259842471,-10.34694257895297,0 +-62.59863736416784,-10.33156655109,0 +-62.61475465574409,-10.31745558319498,0 +-62.62691028263365,-10.30890677780095,0 +-62.63897777630179,-10.29764080816809,0 +-62.65532126946746,-10.29031163572948,0 +-62.66480753058333,-10.28456423756055,0 +-62.68526562104251,-10.27572875554778,0 +-62.6890159778555,-10.26336185127004,0 +-62.7090878390746,-10.24228478231288,0 +-62.71975149803955,-10.22967975130759,0 +-62.72920963007691,-10.22255701135708,0 +-62.75366136487506,-10.20812043655561,0 +-62.76731250313686,-10.20221600441964,0 +-62.78074733257207,-10.18950755685665,0 +-62.78739994094251,-10.18111086277324,0 +-62.79958571354728,-10.17252600863564,0 +-62.80891928667558,-10.16131047379073,0 +-62.81847209611414,-10.15689892398669,0 +-62.83035719519017,-10.13877793235727,0 +-62.84371536607254,-10.12332773099194,0 +-62.86289440493746,-10.11583937864449,0 +-62.89275147636952,-10.10975345811548,0 +-62.91046910671766,-10.10233319664752,0 +-62.93362260721244,-10.09199716606287,0 +-62.95107782051093,-10.0763926510548,0 +-62.9629682772575,-10.05960682997344,0 +-62.9680893347015,-10.04714339374582,0 +-62.97450310416276,-10.03190072339521,0 +-62.99045520137836,-10.01222894345093,0 +-62.99709482862909,-10.00380454820289,0 +-63.01318536603718,-9.988220545306962,0 +-63.02633608701994,-9.967265106554551,0 +-63.0303490442974,-9.963024985150044,0 +-63.04733300546924,-9.94347706498511,0 +-63.05786987025396,-9.928149677909705,0 +-63.05878918038916,-9.91450784696443,0 +-63.05584357183956,-9.909163425102063,0 +-63.04939922313591,-9.882158389479079,0 +-63.04751148987883,-9.867248073050675,0 +-63.04700426187546,-9.852289774862275,0 +-63.04668239078404,-9.84276949262089,0 +-63.05175418885872,-9.828968045051822,0 +-63.06083359573307,-9.810936863914558,0 +-63.06733261074514,-9.798443526462458,0 +-63.08322925308769,-9.777441509155906,0 +-63.10567709332177,-9.745290121627411,0 +-63.11624543606297,-9.729900896982342,0 +-63.11593166203491,-9.720358121246699,0 +-63.10981739685413,-9.702832366693748,0 +-63.10383916349414,-9.689393024811404,0 +-63.09336269642303,-9.665176204686452,0 +-63.0904242720415,-9.659809361458757,0 +-63.07379555053064,-9.62933444105386,0 +-63.07199746649369,-9.61715082366462,0 +-63.0667428230443,-9.5846753986685,0 +-63.06967741606453,-9.549205118554532,0 +-63.071834705932,-9.53144514496303,0 +-63.07366719385362,-9.504169553852694,0 +-63.07739017310554,-9.491797094846344,0 +-63.08368903855547,-9.473892792122754,0 +-63.09008074306664,-9.458705195148061,0 +-63.10190179759731,-9.440608587369876,0 +-63.10544030041319,-9.422791087225109,0 +-63.11311876140952,-9.404830631536694,0 +-63.11831518701877,-9.395122253488747,0 +-63.1287085300566,-9.37570289987014,0 +-63.13077283296246,-9.355205568098466,0 +-63.13150483674409,-9.336113886680975,0 +-63.13228616994565,-9.318379082506132,0 +-63.13860151727653,-9.300442373227895,0 +-63.14482870888487,-9.279777425455622,0 +-63.15266386158642,-9.26586830044266,0 +-63.15626557412371,-9.249378173457853,0 +-63.1626304975864,-9.232787201420368,0 +-63.16609758157719,-9.212202977557221,0 +-63.16828253793226,-9.194381463154322,0 +-63.17333243133007,-9.179172965811208,0 +-63.202045087223,-9.151736374193286,0 +-63.2113962322366,-9.143256024257967,0 +-63.22330846385945,-9.129248511401055,0 +-63.23782886309215,-9.111071602166486,0 +-63.25106718186521,-9.095658057905686,0 +-63.27009321679534,-9.08820772738653,0 +-63.27953427772032,-9.082444409124609,0 +-63.30690770629453,-9.077427851132629,0 +-63.32061766340288,-9.075598188806925,0 +-63.33707880960565,-9.073673603550178,0 +-63.37284762137143,-9.072445092386843,0 +-63.38228574292346,-9.066679691199063,0 +-63.39271469646068,-9.049998609616146,0 +-63.40043943718417,-9.034770941179493,0 +-63.40944261027887,-9.016779123623305,0 +-63.41436698777056,-9.000288204971808,0 +-63.41929114023854,-8.98379725328989,0 +-63.4242629533623,-8.968664806067885,0 +-63.42923657568083,-8.9535302442951,0 +-63.43648642766712,-8.924706576361487,0 +-63.44146491670763,-8.909563009893176,0 +-63.44914709716046,-8.892962131643406,0 +-63.45545410282244,-8.876406572019096,0 +-63.46038661281737,-8.859895494265054,0 +-63.46389620671263,-8.842069785508576,0 +-63.4683539932817,-8.81194932322849,0 +-63.47452239203714,-8.791295649506324,0 +-63.47969777080331,-8.781568402580989,0 +-63.49408833859928,-8.75923398954046,0 +-63.51312898865736,-8.751730492412998,0 +-63.52832260189104,-8.7525487874489,0 +-63.54769610061344,-8.754580422644668,0 +-63.55871445908748,-8.754183640561692,0 +-63.57386625001375,-8.753637630810246,0 +-63.60693063176442,-8.752443853470103,0 +-63.62351218041066,-8.753208841828609,0 +-63.63615002517021,-8.75957128029888,0 +-63.6501799871035,-8.765871989734705,0 +-63.66563341997533,-8.77348886717434,0 +-63.68371079005106,-8.776914986539269,0 +-63.68647114159528,-8.776812807089806,0 +-63.71645673203766,-8.789605720240914,0 +-63.73307317274598,-8.791755085423594,0 +-63.75116483984781,-8.796577814819448,0 +-63.77052905677311,-8.798628999521013,0 +-63.79534314792466,-8.799125925951438,0 +-63.8115980177372,-8.791742207673808,0 +-63.82652353523929,-8.785755856675751,0 +-63.84160054835153,-8.783852056643598,0 +-63.84700104724326,-8.780931633126672,0 +-63.87263049229192,-8.766375793459781,0 +-63.88653438816247,-8.769966300179759,0 +-63.89651160986084,-8.77915149836255,0 +-63.90511292110349,-8.788384914940083,0 +-63.91646427773624,-8.797515056255868,0 +-63.92393839960242,-8.813595824025061,0 +-63.92738593276226,-8.832543072037236,0 +-63.93190966972556,-8.843275962618998,0 +-63.93825660246558,-8.86619396475237,0 +-63.94455314253922,-8.887747601507787,0 +-63.95340037103113,-8.903760824518844,0 +-63.9580226445239,-8.917202716423315,0 +-63.96107091145039,-8.925257131664585,0 +-63.97036416732444,-8.95349229749128,0 +-63.97783672982803,-8.969543657328678,0 +-63.98969269653791,-8.99223134993408,0 +-64.00445492943304,-9.018895448178776,0 +-64.01188815000114,-9.033586894240555,0 +-64.02610098050759,-9.045314533353435,0 +-64.03873772744168,-9.051659141598249,0 +-64.05545419420743,-9.056496289230626,0 +-64.07380091958787,-9.068075561980431,0 +-64.08654184166473,-9.077136861077911,0 +-64.10779682602072,-9.092692111634699,0 +-64.12201980587116,-9.104421123858049,0 +-64.14878902929372,-9.119777376756083,0 +-64.17144853173939,-9.135289915878809,0 +-64.18708913190214,-9.146983631122778,0 +-64.19987682699217,-9.15606121179877,0 +-64.22089704418575,-9.163485918057946,0 +-64.24474140640956,-9.172174646067564,0 +-64.25600415836152,-9.177224948375866,0 +-64.31638083271757,-9.195255208781008,0 +-64.33463378872955,-9.204100172166733,0 +-64.35717754163528,-9.216900500738831,0 +-64.37289548852684,-9.231311963027732,0 +-64.39137243361566,-9.245623674351137,0 +-64.40535230168805,-9.250554726855567,0 +-64.4260609190181,-9.251147084248792,0 +-64.43707759095119,-9.250736957754995,0 +-64.44682280007655,-9.253099050909046,0 +-64.47050181020407,-9.25903395530354,0 +-64.48300493468668,-9.261295476393071,0 +-64.49831714200218,-9.264815023309957,0 +-64.51501020295473,-9.268285287976338,0 +-64.53722807516205,-9.271564191525934,0 +-64.56215608335644,-9.273381555343516,0 +-64.58173600767357,-9.279484276144766,0 +-64.59999553852145,-9.286999040652281,0 +-64.61284856953209,-9.297439058990797,0 +-64.62167290770874,-9.310755089471579,0 +-64.63331784316459,-9.325337784598497,0 +-64.64623904291943,-9.337149681204794,0 +-64.66330724883348,-9.348813260392438,0 +-64.67474467316649,-9.357953438996303,0 +-64.6907233365489,-9.376493030993238,0 +-64.69675994412141,-9.38857367005131,0 +-64.70864435307084,-9.411769570024093,0 +-64.72045315480943,-9.431720752709206,0 +-64.73332091919926,-9.443471619567777,0 +-64.7504261678794,-9.457780916987865,0 +-64.76038278219779,-9.465561870704329,0 +-64.77897398686918,-9.482533394028209,0 +-64.79354446176791,-9.502384609047388,0 +-64.80515085822309,-9.516913463197021,0 +-64.80965831871619,-9.52626971267733,0 +-64.81686727076227,-9.534162207652672,0 +-64.83117973747134,-9.547229531651226,0 +-64.84957369385452,-9.558780194137571,0 +-64.8680258809398,-9.571692125388074,0 +-64.88229502567579,-9.583406105818096,0 +-64.90224407069209,-9.598991392765409,0 +-64.92341436930178,-9.610447711174919,0 +-64.93610774317749,-9.616794867462342,0 +-64.96288472768191,-9.629440712952537,0 +-64.97696880522429,-9.63573937492812,0 +-64.99376155243021,-9.640573636068144,0 +-65.00348385723757,-9.641576776942227,0 +-65.02183578337673,-9.650448955411077,0 +-65.03461087752639,-9.658165306167371,0 +-65.04739038213825,-9.665883732504412,0 +-65.07007590580803,-9.678694814726578,0 +-65.08983316439981,-9.687520336160146,0 +-65.10239447950687,-9.689785662567683,0 +-65.12493012065897,-9.698510466075989,0 +-65.14043927117213,-9.704765434459397,0 +-65.15733692186227,-9.710969794160029,0 +-65.17977726102784,-9.716969095479746,0 +-65.20216688278862,-9.721603911627996,0 +-65.20776541895563,-9.722762587568747,0 +-65.23824276752977,-9.730618373098574,0 +-65.25339758249669,-9.730020192248309,0 +-65.26734135681595,-9.733549622583215,0 +-65.28260887314688,-9.735666204003147,0 +-65.2964985415869,-9.737836479038995,0 +-65.31171106011935,-9.73859353155455,0 +-65.32504572856878,-9.727182411942046,0 +-65.33556813817499,-9.714522273351824,0 +-65.34217905300463,-9.707458288338378,0 +-65.35700077612306,-9.69870702906946,0 +-65.37601103152338,-9.691148177206207,0 +-65.38548797705923,-9.686689287416526,0 +-65.41558608107685,-9.680043179915716,0 +-65.43201610136333,-9.676663189243403,0 +-65.44419892023171,-9.670731972279228,0 +-65.46206596585029,-9.668652641075138,0 +-65.48671638272957,-9.663577422991763,0 +-65.50453060779927,-9.660136890313693,0 +-65.52935582345098,-9.659132895689435,0 +-65.54309237982913,-9.657215759136413,0 +-65.59585611348973,-9.646927304219352,0 +-65.61120508581541,-9.650392205090132,0 +-65.62241369218869,-9.654022692139648,0 +-65.64741158376496,-9.657095197739071,0 +-65.66407316714776,-9.659142062575329,0 +-65.69020742774505,-9.656723000405105,0 +-65.70117572337244,-9.654917994811511,0 +-65.73705945041932,-9.654820063114183,0 +-65.75519018371497,-9.659517480074427,0 +-65.77199864105204,-9.665626556607357,0 +-65.80687670605926,-9.67507009247876,0 +-65.83877389527434,-9.679194826362824,0 +-65.85810801443509,-9.679756738778686,0 +-65.89815478940442,-9.680820398016561,0 +-65.92168011126213,-9.682564992773735,0 +-65.92586988041259,-9.68375088185523,0 +-65.94526781320216,-9.685665037533346,0 +-65.9716116737229,-9.688649378305175,0 +-65.99095388066358,-9.689203930899485,0 +-66.01328734800906,-9.695072770383103,0 +-66.02993635209022,-9.697097954573643,0 +-66.04676339817537,-9.703195489832211,0 +-66.06485196707591,-9.706519485268199,0 +-66.09126925896618,-9.710854124349529,0 +-66.10104215443199,-9.713165893620308,0 +-66.11225845630801,-9.716778094037403,0 +-66.13613684068505,-9.725303512645867,0 +-66.14873974030661,-9.728858589329199,0 +-66.1667505661739,-9.729465720225038,0 +-66.18362463837194,-9.73556467883204,0 +-66.22765366684854,-9.747287871084023,0 +-66.25942285069314,-9.747295583821499,0 +-66.29687548677562,-9.751139070557384,0 +-66.32180063152295,-9.752793626342838,0 +-66.34540433892658,-9.755863083055077,0 +-66.37038399919335,-9.758870714395123,0 +-66.39122821850583,-9.762053595833709,0 +-66.4205140854382,-9.76895041625518,0 +-66.4398559718914,-9.769473762935267,0 +-66.45787926010195,-9.771418275591575,0 +-66.47596359859115,-9.774721762180221,0 +-66.48716273838281,-9.778320748424106,0 +-66.51345274403127,-9.779909346311223,0 +-66.53417392410583,-9.780376131936466,0 +-66.5468138313005,-9.785271732979867,0 +-66.5674148126602,-9.783021142075365,0 +-66.5726195526309,-9.775994393181531,0 +-66.60344331131049,-9.75561563605452,0 +-66.61715530899127,-9.753660442056056,0 +-66.64471958050576,-9.752470295151824,0 +-66.66113910852826,-9.749040120250921,0 +-66.66803263505756,-9.748742054014571,0 +-66.67768413673029,-9.748324483891075,0 +-66.70664726277445,-9.74707099494133,0 +-66.71492818098841,-9.746713461740608,0 +-66.73977621531007,-9.745639610095624,0 +-66.75358417617329,-9.745042073155602,0 +-66.76902220496218,-9.749817449481503,0 +-66.78867042942829,-9.755772170860556,0 +-66.81277957344409,-9.768341304692759,0 +-66.83797987574592,-9.791913444320516,0 +-66.85351473818154,-9.799391961871789,0 +-66.86628880435312,-9.806989930660405,0 +-66.88764083623832,-9.821008789559142,0 +-66.89784521488939,-9.832798592148521,0 +-66.90685753971988,-9.848720692431272,0 +-66.91874895553892,-9.867234453132582,0 +-66.93759355287128,-9.886798250579259,0 +-66.95343483390332,-9.90105371260492,0 +-66.9691523229223,-9.912593350761577,0 +-66.98906670469268,-9.925303807288872,0 +-67.00315778717105,-9.931473210170047,0 +-67.01881381060956,-9.941651364266082,0 +-67.04555492732814,-9.952690953732715,0 +-67.06215063841545,-9.953306946008007,0 +-67.07605329331334,-9.955402998902196,0 +-67.08450777859147,-9.959103347652967,0 +-67.11256480333807,-9.968721656025755,0 +-67.13905601359134,-9.974328011382587,0 +-67.16561875651037,-9.981299942901044,0 +-67.19796037197418,-9.99346070551023,0 +-67.2037296972225,-9.998644867536028,0 +-67.21514269748255,-10.00629845759008,0 +-67.23094973957932,-10.01919881696581,0 +-67.24952285813433,-10.03198075897218,0 +-67.25661339843423,-10.035747943496,0 +-67.28340878791045,-10.04680369644977,0 +-67.29747050205978,-10.05162439250386,0 +-67.31568694934982,-10.05626921694273,0 +-67.3395603400018,-10.06338442310509,0 +-67.34791310533728,-10.0643748005273,0 +-67.37014649612092,-10.06610837622383,0 +-67.39535853068512,-10.07180509612345,0 +-67.40813321616923,-10.07805363366837,0 +-67.4280257505483,-10.08807732145027,0 +-67.46298505067489,-10.103892866431,0 +-67.4935806915262,-10.10793046506185,0 +-67.51913421070397,-10.09314180604198,0 +-67.52576949888478,-10.08739116249545,0 +-67.54737868627157,-10.07687059671052,0 +-67.56235339560961,-10.07210114861991,0 +-67.57575332341217,-10.06331912210776,0 +-67.59059747848292,-10.05583206907258,0 +-67.60813410780354,-10.04685914228248,0 +-67.62002141645833,-10.03542103990916,0 +-67.63210543004406,-10.02805831536438,0 +-67.65095353408387,-10.01766091900442,0 +-67.6661263248339,-10.01696241324577,0 +-67.68131108158202,-10.0162718211997,0 +-67.70756162053762,-10.01508907711059,0 +-67.71868216565034,-10.01594797328672,0 +-67.73539898802198,-10.01791478640527,0 +-67.75482085563026,-10.01839829304708,0 +-67.77135228877302,-10.01628963669586,0 +-67.78650422026161,-10.01424231709342,0 +-67.80555146670939,-10.00657128103148,0 +-67.80680561952877,-10.00379125479022,0 +-67.8147254295302,-9.977335145021355,0 +-67.82535760577518,-9.968664035321167,0 +-67.84031985159442,-9.963872563754126,0 +-67.85403445639182,-9.961862505348584,0 +-67.86853120422053,-9.947565253902445,0 +-67.87475867708365,-9.933660462305696,0 +-67.8836735601585,-9.918269397528716,0 +-67.89258630175866,-9.902880360675081,0 +-67.8946775366814,-9.889176402298991,0 +-67.90745409114817,-9.868169399031588,0 +-67.92422490350053,-9.844256052270621,0 +-67.93064818731727,-9.834434971616876,0 +-67.94611706992943,-9.811947415086621,0 +-67.95935871117733,-9.800441316611479,0 +-67.9767307358171,-9.788737944126368,0 +-68.01036074179065,-9.770819820273983,0 +-68.02255440839956,-9.766159252778715,0 +-68.0346228647057,-9.758782652855599,0 +-68.09436606506573,-9.731425841021169,0 +-68.10609851133245,-9.717260109718241,0 +-68.13272127780402,-9.696943565770782,0 +-68.14471947824985,-9.688208703866259,0 +-68.15533815968472,-9.679539584960777,0 +-68.17250575016469,-9.66375539981831,0 +-68.18842685809078,-9.650751032842349,0 +-68.20007759223334,-9.635227989330227,0 +-68.21599099532527,-9.622220029485232,0 +-68.22914855158558,-9.609342322095859,0 +-68.24643530913612,-9.596266427387807,0 +-68.2555966803592,-9.58630078284213,0 +-68.27680680609554,-9.568952446024657,0 +-68.29656735392297,-9.550301348566634,0 +-68.31233454425515,-9.534562559112347,0 +-68.32011613866156,-9.524654591652654,0 +-68.33155068608788,-9.505035744095602,0 +-68.33933235786303,-9.495125629213902,0 +-68.35482727987566,-9.473937828376561,0 +-68.35882006038348,-9.471019212044308,0 +-68.37733982328911,-9.455131589143704,0 +-68.38140055020936,-9.453570925604968,0 +-68.39468785651853,-9.443379869323458,0 +-68.41163022089164,-9.423464623245497,0 +-68.42733311725766,-9.406332789115725,0 +-68.44987643442745,-9.362243398833456,0 +-68.44803602522522,-9.325630575404046,0 +-68.4540216248389,-9.307665845415253,0 +-68.46949201013125,-9.286512449614753,0 +-68.48124840140349,-9.273696822245434,0 +-68.48908636684298,-9.265151925196736,0 +-68.49383693708512,-9.249955776666299,0 +-68.502642972961,-9.233197596782922,0 +-68.51302730433893,-9.22044152929579,0 +-68.52843547869898,-9.197909496187107,0 +-68.53800892594215,-9.168851010467575,0 +-68.54681816453699,-9.152078086010698,0 +-68.55610264875976,-9.144810612244278,0 +-68.57873986530791,-9.128695503224879,0 +-68.59443679641663,-9.111558965088586,0 +-68.61027185312966,-9.097135688012035,0 +-68.62480116495729,-9.084137025447948,0 +-68.63147977259366,-9.079710690628771,0 +-68.65172056874096,-9.070508941028681,0 +-68.68014562572939,-9.059540095475112,0 +-68.70471342651622,-9.054217608531006,0 +-68.71985260053178,-9.053456888947903,0 +-68.72948700949372,-9.052972440632658,0 +-68.76098473332348,-9.04726067639333,0 +-68.77194668567859,-9.045331434493285,0 +-68.80526786231989,-9.019441013315703,0 +-68.82546706950428,-9.010259966033752,0 +-68.84168189125852,-9.004001205855165,0 +-68.8645598463072,-8.993321195891541,0 +-68.87802539899958,-8.98719786469546,0 +-68.89987599238972,-8.98337926402953,0 +-68.91355146892516,-8.981324933818069,0 +-68.93664473094816,-8.974693798443676,0 +-68.95981012667384,-8.9694187372053,0 +-68.97624140015283,-8.96721326542305,0 +-68.99679965350654,-8.964794819515699,0 +-69.02266108716493,-8.957998717455355,0 +-69.04040881292879,-8.954350910553886,0 +-69.06091050500977,-8.950559638617587,0 +-69.07879959476158,-8.949631138061543,0 +-69.1130990525964,-8.945085403560629,0 +-69.12826115522907,-8.944274492120815,0 +-69.14329131669948,-8.940737211104443,0 +-69.15825758491799,-8.935835320343649,0 +-69.19089362764522,-8.924513735891336,0 +-69.20290982330916,-8.915662686874885,0 +-69.23375408641017,-8.895491201689907,0 +-69.25117346280844,-8.886438808244135,0 +-69.27474237836407,-8.863473239947915,0 +-69.28399479458366,-8.856199527958342,0 +-69.30524492336653,-8.841509903014412,0 +-69.33689726394037,-8.815402713163033,0 +-69.35300728717387,-8.807773977115213,0 +-69.38659566267134,-8.792444498192312,0 +-69.4123099410851,-8.784317730970542,0 +-69.44858199919493,-8.767480602882213,0 +-69.46325618953136,-8.758558155905872,0 +-69.48313740463905,-8.743922372811181,0 +-69.49918701468266,-8.734924506506232,0 +-69.52311995963919,-8.718711029182723,0 +-69.52977236651459,-8.714281917277344,0 +-69.56530913905848,-8.70419517759766,0 +-69.59609540220758,-8.686274862333958,0 +-69.62164549174865,-8.67406709274996,0 +-69.64710183991808,-8.660498267688576,0 +-69.6816436073007,-8.636923485116224,0 +-69.70173162017053,-8.626350119441941,0 +-69.71502369571695,-8.617490812295419,0 +-69.73128290420732,-8.612561310091492,0 +-69.75837500980397,-8.604342135912535,0 +-69.81262383161503,-8.589260088207647,0 +-69.83536352398427,-8.577176846728161,0 +-69.84612047521233,-8.572528362936595,0 +-69.86907912960756,-8.564516302164321,0 +-69.89607822591691,-8.554929276009302,0 +-69.9218504010677,-8.548128167015523,0 +-69.94076115029965,-8.54168701196118,0 +-69.95974436382055,-8.536602681403917,0 +-69.98536370256988,-8.527071677743621,0 +-70.00008345304069,-8.519480116646548,0 +-70.01083564536327,-8.514822419340504,0 +-70.0379017011455,-8.506565070829312,0 +-70.05147481361679,-8.503104886712128,0 +-70.08555926824168,-8.497168836661341,0 +-70.10173481264451,-8.49083862732193,0 +-70.13257242692873,-8.475529195057806,0 +-70.1472360258547,-8.466546978831223,0 +-70.16327556948967,-8.45748605447408,0 +-70.17056613389603,-8.439354104158944,0 +-70.17525895535587,-8.424085804642305,0 +-70.18479244544787,-8.396260647209958,0 +-70.19324545166604,-8.373946544371382,0 +-70.21891801799934,-8.351135547049228,0 +-70.22936389833274,-8.341038407528085,0 +-70.25544612686069,-8.315100695988393,0 +-70.27215734425207,-8.293751997297365,0 +-70.28368240536913,-8.278132186814993,0 +-70.30284715934306,-8.251177417725854,0 +-70.31546770774307,-8.229986150951227,0 +-70.32556730318852,-8.213026518192452,0 +-70.34108870155674,-8.194390110725562,0 +-70.35950868984523,-8.178318106087527,0 +-70.3942669014404,-8.158602999439323,0 +-70.40524676511964,-8.15800909483835,0 +-70.41897132150284,-8.157266251392707,0 +-70.42446107798361,-8.156968954326361,0 +-70.45198286151803,-8.15684336037882,0 +-70.46173662346162,-8.159045876323527,0 +-70.47871916189152,-8.167683999834898,0 +-70.49006726525468,-8.173891856950567,0 +-70.50280461424957,-8.180001619512613,0 +-70.52661362297803,-8.186852721323131,0 +-70.56218007780998,-8.185314139281447,0 +-70.5868065747233,-8.18259867697124,0 +-70.60858733650029,-8.178681300916997,0 +-70.63569467206565,-8.171749790173576,0 +-70.65198751856201,-8.16813276934924,0 +-70.70470208666111,-8.152990474905282,0 +-70.72092934837139,-8.148013636826475,0 +-70.75350233149119,-8.140774594086043,0 +-70.77260096873424,-8.138358818538984,0 +-70.7931441027621,-8.137222091063014,0 +-70.81916306920863,-8.13578090174865,0 +-70.8438104540695,-8.134414084724238,0 +-70.86161362176661,-8.133425756992166,0 +-70.89730128412648,-8.132802440025619,0 +-70.91792008183155,-8.133015185401929,0 +-70.9494155950992,-8.131260672935744,0 +-70.96424409497396,-8.126353912079411,0 +-70.97922760193475,-8.124157960921863,0 +-70.99542308354087,-8.119174106472947,0 +-71.01267244573413,-8.108691965479117,0 +-71.0338816680928,-8.095267574129895,0 +-71.04880902378427,-8.091709175561464,0 +-71.06648197702577,-8.087995226292891,0 +-71.08819642929667,-8.082691884000452,0 +-71.11791736013106,-8.072852565159787,0 +-71.13423162986224,-8.069209465483043,0 +-71.15482258161755,-8.068045148329793,0 +-71.17435567354336,-8.072384256334509,0 +-71.18466731669984,-8.084051464907992,0 +-71.18756918526395,-8.086609830735505,0 +-71.21406506784743,-8.083788720473763,0 +-71.22826468607884,-8.068030958578424,0 +-71.24293167120909,-8.060404819104697,0 +-71.26823527714556,-8.046738623946707,0 +-71.27895044061512,-8.042054081877815,0 +-71.29111209303949,-8.038647236861705,0 +-71.30472011723141,-8.036517974049458,0 +-71.32098741231779,-8.032877084737512,0 +-71.34218521487898,-8.019433299818957,0 +-71.35532694014023,-8.009165532956198,0 +-71.3685477916394,-8.00025174909957,0 +-71.38314418875584,-7.991253094415651,0 +-71.3923414886707,-7.983923025671132,0 +-71.41805767553117,-7.977002743010086,0 +-71.43305159329249,-7.9747793317237,0 +-71.46394731895286,-7.962111560395453,0 +-71.46943017109471,-7.961795269787134,0 +-71.49226613220721,-7.952309285048842,0 +-71.50437152979518,-7.947525226725976,0 +-71.51396807038736,-7.946971277971532,0 +-71.53590470374496,-7.945704778760424,0 +-71.56440187872111,-7.940069234225178,0 +-71.58422754407658,-7.926694650037692,0 +-71.59341543259926,-7.919368715851015,0 +-71.61049911599099,-7.906149920993841,0 +-71.62950777889421,-7.902347582698424,0 +-71.65398969826664,-7.898233326752049,0 +-71.66904647784413,-7.89737661469611,0 +-71.69762753056577,-7.893027000297408,0 +-71.72435737633059,-7.880597019393909,0 +-71.73788240577984,-7.877087206242549,0 +-71.74996031010686,-7.872299052920133,0 +-71.77290313852392,-7.861156885845596,0 +-71.79882542516467,-7.856962018139135,0 +-71.82603031605385,-7.851330125199071,0 +-71.83950458768479,-7.846475432184181,0 +-71.86927221104474,-7.837967105332096,0 +-71.90039583953019,-7.82937417658671,0 +-71.92197916983633,-7.822667753088066,0 +-71.94115303294255,-7.821553535055187,0 +-71.96418843290294,-7.816123664451361,0 +-71.99125970417437,-7.809106879403333,0 +-72.00358984316075,-7.808396241961238,0 +-72.03348210040751,-7.802584530889558,0 +-72.04564639719142,-7.799157385145937,0 +-72.06989124701715,-7.790944881308543,0 +-72.0903490509771,-7.788395137355215,0 +-72.10395954760737,-7.786242211861484,0 +-72.12570158074212,-7.782249193042382,0 +-72.1513855463392,-7.775284887073583,0 +-72.17304510875542,-7.769919071806784,0 +-72.19221096113898,-7.768789425269055,0 +-72.20590100697032,-7.767982024498996,0 +-72.22917437228602,-7.766608374075474,0 +-72.23738857117733,-7.766123244503954,0 +-72.25107947042872,-7.765312237569191,0 +-72.2784647492293,-7.763682051857124,0 +-72.29497782152517,-7.764061802561062,0 +-72.3400453014857,-7.759716877719079,0 +-72.38815283643767,-7.756976089908066,0 +-72.41286614691229,-7.755554574690323,0 +-72.43892700422587,-7.754038246280049,0 +-72.4622274471154,-7.75266898423622,0 +-72.49777290338255,-7.749212598090448,0 +-72.52330444602036,-7.739528159377155,0 +-72.5407797371609,-7.73304314143898,0 +-72.56920933377221,-7.725905129170568,0 +-72.58547789260462,-7.722213983456474,0 +-72.60971292748181,-7.713960848502973,0 +-72.63042599746775,-7.715470191603629,0 +-72.6527564133924,-7.720975666196529,0 +-72.66695110587784,-7.728323044679062,0 +-72.686201756082,-7.728549876010272,0 +-72.70706877808833,-7.732771614621679,0 +-72.72212447155403,-7.73188053176507,0 +-72.73916699218339,-7.718597294988823,0 +-72.75475780770418,-7.704027994719846,0 +-72.78403678865804,-7.688614797493713,0 +-72.80286886863041,-7.682004982730926,0 +-72.81860109222458,-7.679222210682964,0 +-72.82944640205794,-7.678568665785694,0 +-72.86421341167816,-7.674079069339545,0 +-72.90262130307229,-7.670559583811266,0 +-72.92051119615887,-7.667085543958385,0 +-72.93479149598654,-7.66382972825214,0 +-72.95628533109155,-7.660136818020092,0 +-72.96703242179859,-7.658290526562805,0 +-72.98499089193058,-7.656007055288765,0 +-73.00069064588894,-7.656250157048878,0 +-73.02487249442848,-7.657172370401407,0 +-73.07673467005363,-7.657595709505038,0 +-73.09737109747122,-7.659919698634189,0 +-73.11612428713435,-7.670720810029427,0 +-73.12647150141471,-7.682034667739011,0 +-73.14784997477209,-7.696256990652072,0 +-73.1591032257662,-7.702736017287767,0 +-73.17658446389656,-7.712417311848136,0 +-73.19436277444613,-7.726857825730252,0 +-73.20426841329584,-7.731029412177334,0 +-73.22040879461888,-7.738405632894468,0 +-73.24294414824369,-7.751371751839527,0 +-73.25286230901573,-7.755547688226781,0 +-73.26315900733869,-7.765678762627357,0 +-73.28479511348054,-7.783480794582589,0 +-73.29659004307408,-7.798299484220151,0 +-73.29801744732259,-7.80179870266131,0 +-73.31237438383695,-7.818856608864617,0 +-73.32388062413263,-7.828918428815441,0 +-73.33636628812269,-7.835334033394581,0 +-73.33900006833558,-7.838762180311781,0 +-73.3557438794158,-7.842007222197262,0 +-73.3653824402338,-7.843139121844769,0 +-73.37583330126991,-7.843360314048267,0 +-73.39110141001787,-7.851039577790937,0 +-73.40084489165264,-7.853884552364676,0 +-73.41042589873965,-7.854154609950776,0 diff --git a/R-utils/roads/ve010.csv b/R-utils/roads/ve010.csv new file mode 100644 index 000000000..fe197af25 --- /dev/null +++ b/R-utils/roads/ve010.csv @@ -0,0 +1,3483 @@ +-61.14833944150397,4.479633468745077,0 +-61.14833219027644,4.479727158387626,0 +-61.14833193986257,4.479837535894872,0 +-61.14834674232254,4.479940203725551,0 +-61.14834791980362,4.48001814283887,0 +-61.1483623581147,4.480120365185408,0 +-61.14835529868139,4.480205429884643,0 +-61.1483760406906,4.480323629748832,0 +-61.14837688791005,4.480409442217452,0 +-61.14838377204806,4.480519194550045,0 +-61.14839847628988,4.480621431696005,0 +-61.14841563241052,4.480692720024199,0 +-61.14843340098516,4.480756273883722,0 +-61.14845688455193,4.480843576211787,0 +-61.14846523162445,4.480929647790049,0 +-61.14847295686558,4.481023378461807,0 +-61.14847822420867,4.481139942635486,0 +-61.14850917535861,4.481227771451688,0 +-61.14852684351553,4.481291239355775,0 +-61.1485336651489,4.481392478611053,0 +-61.148541777844,4.481478321208214,0 +-61.14853337469061,4.481578153779833,0 +-61.1485147883896,4.48170793222378,0 +-61.14848272563166,4.481805677003694,0 +-61.14844781648507,4.481934173248393,0 +-61.14843941443743,4.482026355581664,0 +-61.14844565870487,4.48212762937389,0 +-61.14847076110775,4.482191877467988,0 +-61.14848539497864,4.482286231790379,0 +-61.14848467354749,4.482379251450205,0 +-61.14849139813575,4.482473147342133,0 +-61.14849067260456,4.482566264890018,0 +-61.148504008461,4.48267616100015,0 +-61.14849343231744,4.48279184469344,0 +-61.14849129574594,4.482900531958808,0 +-61.14849760536931,4.483002205778747,0 +-61.14849758617448,4.483087818856744,0 +-61.14848742672388,4.483196311527489,0 +-61.14848713330028,4.48328234151764,0 +-61.14848464527335,4.483391752382111,0 +-61.14848361883224,4.483485712440205,0 +-61.14849883869898,4.48357326715097,0 +-61.14849854891213,4.483659585746316,0 +-61.14850382678039,4.483770014122046,0 +-61.14849644020971,4.483848135249819,0 +-61.1484826546854,4.483910197362045,0 +-61.14839917686881,4.484299869593378,0 +-61.14840394931408,4.484396963401324,0 +-61.14840114101472,4.48457640563737,0 +-61.14844175609348,4.48473221066431,0 +-61.14847003448742,4.484873216646098,0 +-61.14852814846873,4.484989257548588,0 +-61.14856764216537,4.485159178834555,0 +-61.14858309156654,4.485297290105892,0 +-61.14859861089195,4.485435147510551,0 +-61.14862659690842,4.485587688418007,0 +-61.14865153955211,4.485617148682552,0 +-61.14867309930484,4.486148210359576,0 +-61.1486609649812,4.486284386156902,0 +-61.14867378759889,4.486450201046867,0 +-61.14867798772723,4.486560211731712,0 +-61.14868874794955,4.486752928209301,0 +-61.14871434031245,4.486933122281775,0 +-61.14871618575236,4.487070071992848,0 +-61.14872931144309,4.487235273425017,0 +-61.1487868798587,4.48736328123769,0 +-61.14884442027721,4.487491226835239,0 +-61.14889956614203,4.487646197068012,0 +-61.14890136138226,4.487782777261756,0 +-61.14890080148928,4.487946302683183,0 +-61.14888785391923,4.48809485356477,0 +-61.14887726693765,4.488216312345357,0 +-61.14887648610073,4.488380412908406,0 +-61.14892015497949,4.488507300413071,0 +-61.14896382344644,4.488634185825815,0 +-61.14899022726649,4.488800916299479,0 +-61.14904622586418,4.488943150517225,0 +-61.14912827912507,4.489101426753677,0 +-61.14918310337188,4.489257586081202,0 +-61.14922792974142,4.489371852878374,0 +-61.14927041083239,4.489512901283397,0 +-61.14929801685821,4.489667400125725,0 +-61.14932442954964,4.489835958682568,0 +-61.14936685990893,4.489980253166699,0 +-61.14943559547564,4.490134583204934,0 +-61.14949661039315,4.490219858514545,0 +-61.15033922787659,4.491656879494304,0 +-61.15053135363252,4.492292066849084,0 +-61.15085212984663,4.492876746246584,0 +-61.15116194464773,4.49358422699731,0 +-61.15134893972423,4.494281121695954,0 +-61.15147951999912,4.494911152647583,0 +-61.1514868797587,4.495530310357485,0 +-61.15167379493163,4.496227375714126,0 +-61.15186667673913,4.496863888039282,0 +-61.15212642183867,4.497444338632317,0 +-61.15225735893539,4.498075188278814,0 +-61.15225907480637,4.49875568580877,0 +-61.15220499693832,4.49937006721505,0 +-61.1521504433269,4.499983412884761,0 +-61.15204465950409,4.50046720316839,0 +-61.15187804041647,4.500947226192533,0 +-61.15155607309751,4.501785742814663,0 +-61.15131187112588,4.502445470830891,0 +-61.15100055890424,4.503160939286277,0 +-61.1506485244767,4.503620489708473,0 +-61.15011740542862,4.504000396801222,0 +-61.14950366185524,4.504617513030672,0 +-61.14898468840715,4.504869089239356,0 +-61.14857805000452,4.505275983191883,0 +-61.14816528059594,4.505745292690372,0 +-61.14762947366298,4.506195724944062,0 +-61.14697035573007,4.506635357644595,0 +-61.14650272014077,4.507020322063694,0 +-61.14596668821248,4.507470438546215,0 +-61.14531277173518,4.507848672304618,0 +-61.14483634118064,4.508310462903962,0 +-61.14451650504968,4.508410131023741,0 +-61.14323058125303,4.510267463597476,0 +-61.14270072540339,4.510653661977245,0 +-61.14206292768826,4.510845202291332,0 +-61.14146635455575,4.511287234531156,0 +-61.1410547247276,4.511745370074362,0 +-61.14071017945245,4.512147369365435,0 +-61.14016516607433,4.512716906914504,0 +-61.13986806787786,4.513306776472508,0 +-61.13951917790936,4.513769049479154,0 +-61.13920182719394,4.514488590001546,0 +-61.13890479619626,4.515021123434338,0 +-61.13858974068036,4.515739581609743,0 +-61.13834875461325,4.516339428645868,0 +-61.13809336798701,4.517121958296279,0 +-61.13797423392026,4.517790186623071,0 +-61.13773324734834,4.518445887611517,0 +-61.13761972390852,4.519051988081353,0 +-61.1375620197425,4.519725050453258,0 +-61.13750433691639,4.520397859566425,0 +-61.13719755463205,4.521106968591445,0 +-61.13713474498883,4.521840180204023,0 +-61.13701218604864,4.522511494975939,0 +-61.13682802567548,4.523124001264476,0 +-61.13680398305188,4.523372942301659,0 +-61.13659138687557,4.525044139511148,0 +-61.13658463481097,4.525785857472007,0 +-61.13665170145332,4.526410762414088,0 +-61.13665608130677,4.52709223350603,0 +-61.13648244040885,4.527695695368086,0 +-61.13618672202846,4.528287791471198,0 +-61.13577565979281,4.528746194097184,0 +-61.13517609117109,4.529188844610102,0 +-61.13457028746589,4.529693175639154,0 +-61.13416023696727,4.530091070852899,0 +-61.13391382152852,4.530750866048126,0 +-61.13385240070347,4.531427030183417,0 +-61.13367276819495,4.532031278665205,0 +-61.13361205249922,4.532707534108598,0 +-61.1336847883048,4.533272140141291,0 +-61.13374650310706,4.533959925281901,0 +-61.13381375702434,4.534586401974259,0 +-61.13375854434637,4.535201702770124,0 +-61.13370332198453,4.535817100895289,0 +-61.13352008486098,4.536482694952228,0 +-61.13315501297858,4.53712965699439,0 +-61.13310194713259,4.537743385826776,0 +-61.13304522235308,4.53841694365779,0 +-61.13292732110953,4.539084410286501,0 +-61.13287010040817,4.539757856198902,0 +-61.1328181009686,4.540369862034587,0 +-61.13288212570393,4.541055685871925,0 +-61.13301196986271,4.541686778082354,0 +-61.13320220782973,4.542324766539394,0 +-61.13308776454317,4.542931891709243,0 +-61.13274465357981,4.543331293309166,0 +-61.13214685082209,4.543828945209015,0 +-61.13214781120556,4.544456015031038,0 +-61.13245736447578,4.54505575091874,0 +-61.13257965337886,4.54569801477168,0 +-61.13257370930839,4.545760215077666,0 +-61.13213261353811,4.547819464911991,0 +-61.13207485246721,4.548434010196732,0 +-61.13177737828791,4.5490289400789,0 +-61.13148543059566,4.549561922678075,0 +-61.13123004525735,4.550283435820466,0 +-61.13098494477526,4.550882356878749,0 +-61.1306833167993,4.551476484235133,0 +-61.13037009545631,4.552193818565663,0 +-61.13026122724549,4.552742535344151,0 +-61.13015109248122,4.553291247821672,0 +-61.12988865326342,4.554137214865279,0 +-61.12969329429067,4.554927164551887,0 +-61.129379568251,4.55564486676094,0 +-61.12901496795926,4.556293972635613,0 +-61.12864516538292,4.557004260047535,0 +-61.12818705540803,4.557333237706181,0 +-61.12758263060134,4.557778768693473,0 +-61.12704657339118,4.558167839671238,0 +-61.12649569321132,4.558681743191964,0 +-61.12606596970444,4.559207798224268,0 +-61.12577169501953,4.559799038847476,0 +-61.12536478724056,4.560373936838722,0 +-61.12522670577995,4.562153352005165,0 +-61.12512685550123,4.562577266653842,0 +-61.12487056646687,4.563359683151665,0 +-61.12449052078022,4.564134579458003,0 +-61.12431791279644,4.564679380028606,0 +-61.12406207340989,4.565467028847274,0 +-61.12388364680362,4.566070868898906,0 +-61.12382909874494,4.566686893460371,0 +-61.12371415589619,4.567300883113876,0 +-61.12353263614278,4.567970094629211,0 +-61.12317381406511,4.568495242897613,0 +-61.12280814125246,4.56908251501447,0 +-61.1225068312157,4.569677117554529,0 +-61.12202010776785,4.570255271560103,0 +-61.12154294942823,4.57071037751303,0 +-61.12095482986651,4.571031069008963,0 +-61.1203724230134,4.571290014779074,0 +-61.11983920798064,4.571678077634764,0 +-61.11873986191577,4.572140245871304,0 +-61.11803691432439,4.572387221866845,0 +-61.11745873292524,4.572644567095974,0 +-61.11687715631389,4.572962594874705,0 +-61.11651966908443,4.573429659215851,0 +-61.11620767544517,4.574087210861036,0 +-61.11594099506532,4.574877002630853,0 +-61.11575317572719,4.575488259584414,0 +-61.11564080067833,4.5760390276553,0 +-61.11557838189383,4.576719561627161,0 +-61.11552680768937,4.577276999435618,0 +-61.11540185366454,4.577953217857689,0 +-61.11537890052893,4.578201223638164,0 +-61.1150550795248,4.579708154322372,0 +-61.11474055931222,4.580566721710778,0 +-61.11463558277941,4.581125475966068,0 +-61.114461761941,4.581806319118711,0 +-61.11431262096838,4.58278605750315,0 +-61.11414456350035,4.583334699727404,0 +-61.11390996693564,4.584619774136074,0 +-61.11383674935974,4.585351386391128,0 +-61.11376951940814,4.586023167324258,0 +-61.11372838544814,4.586518154168233,0 +-61.11366917311555,4.587326797171687,0 +-61.11354803035354,4.587869405912306,0 +-61.11340031407424,4.588657842882792,0 +-61.11326914797167,4.589391585564595,0 +-61.11306527687373,4.590244107349674,0 +-61.11287986788977,4.590912394256302,0 +-61.11279706425378,4.591713784298403,0 +-61.11266219232233,4.592512315295529,0 +-61.11260233084523,4.593192831059985,0 +-61.11260454561574,4.593878760742507,0 +-61.1127348607341,4.594513876146486,0 +-61.11305744897192,4.59516430205797,0 +-61.11319136176418,4.595858724991593,0 +-61.11319343986011,4.59660368991101,0 +-61.11313736258995,4.597281349358434,0 +-61.11319519712493,4.597974202224806,0 +-61.11313204044726,4.598596613628794,0 +-61.1130671331283,4.599279643778384,0 +-61.11304728004357,4.600154845282344,0 +-61.11300000146157,4.600652606445843,0 +-61.11267965171011,4.601436290700934,0 +-61.11237166944444,4.602095011454027,0 +-61.11202876194736,4.60243883710505,0 +-61.11110426103092,4.603680108878534,0 +-61.11081213671164,4.604153909949673,0 +-61.11050910414994,4.604751530208239,0 +-61.10993552687317,4.605574895554764,0 +-61.10950329495898,4.606223611786385,0 +-61.10898509912612,4.607113993199734,0 +-61.10868280364284,4.607711566551967,0 +-61.10842939513157,4.608438349490895,0 +-61.10830875074556,4.609174976978135,0 +-61.10813122685453,4.609842904268343,0 +-61.10789694647484,4.610442518582342,0 +-61.10749650430825,4.610778949994015,0 +-61.10685764466516,4.611327754634124,0 +-61.10641244578547,4.611827402239335,0 +-61.10596349183758,4.612384833563448,0 +-61.10537074612917,4.612823809507546,0 +-61.10481336730157,4.613339709150775,0 +-61.10421112014842,4.613667387478842,0 +-61.10355778607872,4.613984312401956,0 +-61.10296409933292,4.614307531254913,0 +-61.10230126717604,4.614629352428278,0 +-61.10175402596118,4.615024492975884,0 +-61.10131529082454,4.61555591173119,0 +-61.10082771164931,4.615958404947498,0 +-61.10024646446384,4.616608248133543,0 +-61.10017647443678,4.616666054852155,0 +-61.09869922471356,4.618731127025286,0 +-61.09841271700322,4.619141780361597,0 +-61.09792337197082,4.619722096015774,0 +-61.09742828417828,4.620364623343351,0 +-61.09701704831246,4.62076526640973,0 +-61.09653798785176,4.621222560890403,0 +-61.09591874830472,4.62185466444657,0 +-61.09551327562826,4.622193447712726,0 +-61.09484832410668,4.622634271516461,0 +-61.09423442324247,4.623204468355428,0 +-61.09369453592191,4.623655696755173,0 +-61.09321676725779,4.624112328197125,0 +-61.09273803051407,4.624569559102671,0 +-61.0922986842498,4.625280500882134,0 +-61.09198934992753,4.625940319778827,0 +-61.09173801676665,4.626666430351007,0 +-61.09143591404666,4.627262797664095,0 +-61.09096247825961,4.627715199305824,0 +-61.09050408323948,4.627983305266985,0 +-61.08997017246423,4.628428939913783,0 +-61.08943248301642,4.628934864311256,0 +-61.08923276755858,4.629101541718152,0 +-61.08795518104571,4.630741656114237,0 +-61.0874855973306,4.631133664951823,0 +-61.08695487613627,4.631519489761069,0 +-61.08636708870159,4.631838720638616,0 +-61.08566772532684,4.631965525522424,0 +-61.08503915888377,4.631975873098304,0 +-61.08435268346661,4.631919826474968,0 +-61.0837197451521,4.631990583556165,0 +-61.08318480086684,4.632437810482356,0 +-61.08271264804436,4.632889807505383,0 +-61.08212047421269,4.633270353457243,0 +-61.08178675355404,4.633549359297044,0 +-61.08047300064343,4.634720288074894,0 +-61.07993501626639,4.635169956670008,0 +-61.07934134709503,4.635552279956582,0 +-61.07882137410636,4.635816376449104,0 +-61.07803689426056,4.636244240278572,0 +-61.07750505831751,4.636632700526006,0 +-61.07690352730771,4.637078412532508,0 +-61.07635299914651,4.637653759710693,0 +-61.07593154923388,4.638178645740444,0 +-61.0753797730009,4.638754607438527,0 +-61.07508736694287,4.639228062477185,0 +-61.07460854881471,4.639685679735309,0 +-61.07412400624264,4.640205798845752,0 +-61.07352046055566,4.640652949651453,0 +-61.073030770419,4.641233814276045,0 +-61.07279063099048,4.641834696324265,0 +-61.07261210054223,4.642442045492558,0 +-61.07230363776169,4.643100836806314,0 +-61.07213588923706,4.643584648236471,0 +-61.07201955227214,4.644197109545202,0 +-61.07189924250071,4.644867628571816,0 +-61.07183604603557,4.645603497786972,0 +-61.07177446572704,4.646287635175941,0 +-61.07171605733093,4.646917152690503,0 +-61.07167001862896,4.647419383389388,0 +-61.07160998650244,4.64810021814738,0 +-61.07155550698915,4.648718779086871,0 +-61.07143862621432,4.649332703647636,0 +-61.07117932653443,4.650127316455454,0 +-61.07106185851556,4.650743333343379,0 +-61.07094548684336,4.65135558248013,0 +-61.07076318437404,4.652018306629158,0 +-61.07064352656533,4.652684531984145,0 +-61.07046718538913,4.653283417795048,0 +-61.07036359156913,4.653764941662894,0 +-61.07026364749374,4.654191067339463,0 +-61.07006018292431,4.655791444273696,0 +-61.07001114933064,4.656348611099974,0 +-61.06993488248156,4.657215165032032,0 +-61.06978542188862,4.658198536265569,0 +-61.06966396806639,4.65887554473459,0 +-61.06949657114294,4.659360009311922,0 +-61.06925091492664,4.660024473610994,0 +-61.06900003382768,4.660750956991381,0 +-61.06869241467916,4.661409289183759,0 +-61.06839008897555,4.662005364843368,0 +-61.0683377018614,4.662626420201042,0 +-61.06823863373835,4.66305454352792,0 +-61.0681596742368,4.663915380603497,0 +-61.06808089121129,4.664777591461568,0 +-61.0680132931328,4.665517420022852,0 +-61.06801341500729,4.666201746227796,0 +-61.06793443272302,4.667066565637694,0 +-61.06786665846639,4.667808633796584,0 +-61.06781012972359,4.668427583955447,0 +-61.06781485353194,4.669052573216784,0 +-61.06785938136505,4.669931960637002,0 +-61.06787827895708,4.670433320041231,0 +-61.06788106418627,4.671120366159668,0 +-61.06787303903904,4.67193099061588,0 +-61.06787042026341,4.672679338409847,0 +-61.06786780350755,4.673427362176792,0 +-61.06787059012996,4.67411321506172,0 +-61.06792728867287,4.674924127200509,0 +-61.06805966344757,4.675558051884853,0 +-61.06836843813699,4.676329470837116,0 +-61.06876687729778,4.676795004237463,0 +-61.0692130905667,4.677396842783399,0 +-61.0696594055999,4.677999358212179,0 +-61.06985372597431,4.678636072381399,0 +-61.07004791158997,4.679272349172693,0 +-61.07031501893094,4.679789151128332,0 +-61.07063341155021,4.680430802440441,0 +-61.07057324357088,4.681110931557934,0 +-61.07056943911724,4.681859221888248,0 +-61.070514720214,4.682477801364364,0 +-61.07045451804196,4.683158363080852,0 +-61.07058577126983,4.683792451880949,0 +-61.07095329606965,4.684580184522159,0 +-61.0712859517056,4.685064218742522,0 +-61.07142296122731,4.68563657481151,0 +-61.07178597398541,4.686492610529239,0 +-61.07195226250212,4.687448402239428,0 +-61.07198701521904,4.687764184492156,0 +-61.0722853571492,4.689354340772668,0 +-61.07233152522905,4.690236904435105,0 +-61.07245691492201,4.690936274347989,0 +-61.07264489193776,4.691639436174999,0 +-61.07259978653052,4.692137382770335,0 +-61.07240765916609,4.692873534257888,0 +-61.07222390986217,4.693541868043584,0 +-61.07190508031606,4.69432312103191,0 +-61.07139712516368,4.69514532497222,0 +-61.07108493770787,4.695862936538848,0 +-61.07077663400597,4.696521687655036,0 +-61.07040526841877,4.697176461709462,0 +-61.06995501771087,4.698012232222375,0 +-61.06957778393024,4.698729765993359,0 +-61.06927916229002,4.699266777366003,0 +-61.06891277147418,4.69986034384409,0 +-61.06861417265569,4.70039726958459,0 +-61.06817992697898,4.701047569237382,0 +-61.06782992385673,4.701454975888371,0 +-61.06739556611001,4.70210543507532,0 +-61.06714802700288,4.702772517294042,0 +-61.06690043734445,4.703439728668088,0 +-61.06665279944561,4.704107063930631,0 +-61.06652995007314,4.704785143510336,0 +-61.06635022194567,4.705395728200359,0 +-61.06597233380763,4.706114513576873,0 +-61.0657927822312,4.706724750084494,0 +-61.06554545136308,4.707391505575832,0 +-61.06528271910835,4.70824223317205,0 +-61.06503631471734,4.708906849337367,0 +-61.06488415239012,4.709206623115582,0 +-61.06409203153331,4.711056152491818,0 +-61.06400767607754,4.711298834115831,0 +-61.06352885482409,4.712444349265106,0 +-61.06292857841531,4.713512258311579,0 +-61.06247775612369,4.714350344910731,0 +-61.06196571697513,4.715184382409165,0 +-61.061543292964,4.716398694569613,0 +-61.06126746069152,4.717375714229805,0 +-61.06115106768149,4.717992643269558,0 +-61.06096717199047,4.718666288445788,0 +-61.06079278941213,4.719214362307425,0 +-61.06068072477793,4.719767944630043,0 +-61.06050631516308,4.720316106047737,0 +-61.06022532719314,4.721355893211408,0 +-61.05997747726623,4.722022985628092,0 +-61.05972407208702,4.722752288180136,0 +-61.05956065280206,4.723176378563325,0 +-61.05915313817113,4.724267545344015,0 +-61.05891683046163,4.72481026034811,0 +-61.05860064466099,4.725534082893737,0 +-61.0581596403322,4.726247119254516,0 +-61.05784330566667,4.726971246786967,0 +-61.05747008715971,4.727627874031836,0 +-61.05710237062075,4.728222435082002,0 +-61.05672323555757,4.728941617669686,0 +-61.05660528066293,4.729558135743709,0 +-61.05642609205105,4.730168573450355,0 +-61.05642067084061,4.730230690736889,0 +-61.05564873818741,4.732610611012531,0 +-61.05540818105208,4.733217759854345,0 +-61.05516222181704,4.733886883992769,0 +-61.05485445062225,4.734550899642852,0 +-61.05461959775933,4.735095336020139,0 +-61.05424676216218,4.735886268388477,0 +-61.05407747981509,4.736438420539224,0 +-61.05383142260647,4.736970755750163,0 +-61.05359784149493,4.737448455535274,0 +-61.0533426606541,4.738308118182791,0 +-61.05324025234809,4.738801777543483,0 +-61.05277065786081,4.739952493545524,0 +-61.05244232629502,4.740991592255809,0 +-61.05220115375351,4.741658878506378,0 +-61.05195532065162,4.742387717294252,0 +-61.05157047572779,4.743227261031955,0 +-61.0512470870864,4.744008501319438,0 +-61.05085606717184,4.744846655207418,0 +-61.05060776117988,4.745510805899482,0 +-61.0503050441679,4.746170479617918,0 +-61.05006633049572,4.746835181812783,0 +-61.04980793883129,4.747498903760061,0 +-61.04957083022492,4.748039581454815,0 +-61.04937231826572,4.748833538683792,0 +-61.04905022958808,4.749616806339866,0 +-61.0487872323088,4.750406247796517,0 +-61.04866939794187,4.751020349450126,0 +-61.04842705138687,4.751684297677969,0 +-61.04824649605866,4.752413880946015,0 +-61.04808658887558,4.752895660001226,0 +-61.04784803161093,4.753437076232653,0 +-61.04754632257319,4.754153266377138,0 +-61.04718209016612,4.754863389046994,0 +-61.0469967913867,4.755592128089557,0 +-61.0468094460556,4.756143708066342,0 +-61.04660041072034,4.756943385537614,0 +-61.04655200636088,4.757440751587595,0 +-61.04653205609709,4.758256845309194,0 +-61.04671774381865,4.759019977799714,0 +-61.04672196833856,4.759704950461717,0 +-61.04678352932739,4.760456615116682,0 +-61.04679305693865,4.761079440447047,0 +-61.04679522122365,4.761707704599524,0 +-61.04678325524888,4.761832290009203,0 +-61.04724772482837,4.763509551200659,0 +-61.04731115110056,4.764201419612111,0 +-61.04726206174142,4.764759243422862,0 +-61.0473872115062,4.765456274272628,0 +-61.04752322413464,4.766029369552404,0 +-61.04782767269389,4.766803596918342,0 +-61.04802583427,4.767382341549587,0 +-61.04802955342325,4.768070847940364,0 +-61.04822726486973,4.768714842495632,0 +-61.04842211243776,4.769356866738371,0 +-61.04868294602905,4.769941376769359,0 +-61.04906522831743,4.770600182189901,0 +-61.04939943518384,4.771131090188196,0 +-61.04971408587394,4.771845985593299,0 +-61.05002753521234,4.772560209405944,0 +-61.05031316210795,4.773456023702195,0 +-61.05067394904285,4.774235252562316,0 +-61.05074484694246,4.774803238444668,0 +-61.05100294701385,4.775451265229681,0 +-61.05113542432634,4.776150810037602,0 +-61.05120577893905,4.776781730432848,0 +-61.05140937436282,4.777299432354843,0 +-61.05173019563967,4.777890207265938,0 +-61.05216880017129,4.778554391028664,0 +-61.05262053837507,4.779094769157807,0 +-61.05287586350673,4.779742902269994,0 +-61.05339075931104,4.780289094659896,0 +-61.05371965153242,4.78081883246529,0 +-61.05404325130637,4.781410717493836,0 +-61.05424302660265,4.781991396106175,0 +-61.05450490725497,4.782577668363612,0 +-61.05482351031358,4.783231612074474,0 +-61.05487481250985,4.783361285551743,0 +-61.05525933870484,4.785375568497885,0 +-61.0553694950759,4.786261755144856,0 +-61.05549609213008,4.786961484683034,0 +-61.05569036963015,4.787604189199673,0 +-61.05600919017631,4.788257499610137,0 +-61.05633353564948,4.788848746717965,0 +-61.05679357051791,4.789326694130665,0 +-61.0572077761385,4.789612762314635,0 +-61.05778717995076,4.79016407423485,0 +-61.0582319085065,4.790832856800646,0 +-61.05855175251666,4.79149035580706,0 +-61.05870596945702,4.791880516484874,0 +-61.05894100849469,4.792778953601239,0 +-61.0591978199631,4.79342848213607,0 +-61.05950041128423,4.794269871629648,0 +-61.05957561838029,4.794839524904162,0 +-61.05959951845565,4.795279432279734,0 +-61.05983935244378,4.796112575065696,0 +-61.06008474034149,4.79688407048657,0 +-61.06033564713564,4.797593736815482,0 +-61.0606030026568,4.798117212821834,0 +-61.06102422349425,4.799029306301046,0 +-61.06121300054814,4.799733378460349,0 +-61.06140736866455,4.80037561350202,0 +-61.06160161443743,4.801018051577572,0 +-61.06202260648404,4.801930226931097,0 +-61.06228397566007,4.802515312047512,0 +-61.06266440230205,4.803173283871706,0 +-61.06305578543831,4.80370717344221,0 +-61.06331043204882,4.804352287540027,0 +-61.06362339891918,4.805066838725563,0 +-61.06392408022016,4.805903286784337,0 +-61.06400368165929,4.806408235550166,0 +-61.06417947855288,4.807232199146156,0 +-61.0643154057495,4.807803433750348,0 +-61.0644927037461,4.808629746248875,0 +-61.06467209823127,4.809460566216344,0 +-61.06474532700641,4.810024740683168,0 +-61.06492600133367,4.810784352862669,0 +-61.06498270230522,4.811533101680696,0 +-61.06486031851007,4.812207277173864,0 +-61.06466921749264,4.812934147490547,0 +-61.06461407871186,4.813550683447713,0 +-61.06446899888999,4.814468413244394,0 +-61.06441390825813,4.81508452403135,0 +-61.06434781591,4.815823658900406,0 +-61.06428174277102,4.816562580315691,0 +-61.06415331942738,4.817294030690013,0 +-61.06405534536115,4.817731530757529,0 +-61.06344876258187,4.819011560089566,0 +-61.06324441141216,4.819868978380875,0 +-61.06311813916127,4.820604791826774,0 +-61.06298078969629,4.82146478201317,0 +-61.06292074538149,4.822145219710001,0 +-61.0628604212248,4.822825685225283,0 +-61.06278257140039,4.823691377103455,0 +-61.06272324149916,4.824371977269951,0 +-61.06265578997553,4.825113087431101,0 +-61.06273647336256,4.825618808737378,0 +-61.06310219932464,4.826462793537755,0 +-61.06340681543701,4.827235717187575,0 +-61.06390649907589,4.827966266362394,0 +-61.06429492221417,4.828564333588109,0 +-61.06487476642077,4.829116584062046,0 +-61.06545334998231,4.829667500800054,0 +-61.06591585313484,4.830080861241992,0 +-61.06644015108228,4.830499380514813,0 +-61.06689651304614,4.830974006305475,0 +-61.0674481520067,4.831767224908153,0 +-61.06789824555394,4.832302783871647,0 +-61.06839858495607,4.832966475570468,0 +-61.06886412371171,4.833863058993064,0 +-61.06911303162184,4.834500369864386,0 +-61.06937810075668,4.835156039275951,0 +-61.06981736426532,4.835814777938293,0 +-61.07026189338333,4.836411507853899,0 +-61.07047500132356,4.83680128698934,0 +-61.07105086871913,4.83741776998178,0 +-61.07143963315117,4.838016498626263,0 +-61.07177777888101,4.838555173379852,0 +-61.07208758667114,4.839333435384631,0 +-61.07228118423063,4.839973481639874,0 +-61.07254331717424,4.840558490892322,0 +-61.07261921823368,4.84105807538185,0 +-61.07374180610744,4.84313289301331,0 +-61.07445163285158,4.843566191006119,0 +-61.07490949797256,4.844042408902144,0 +-61.07559084473705,4.844099882816286,0 +-61.0763407332726,4.844104290285126,0 +-61.07724167839174,4.843810778728571,0 +-61.07782685918368,4.843551860648267,0 +-61.07839529958632,4.843478905493404,0 +-61.07910376124883,4.843231509672208,0 +-61.07957004041045,4.842899575781438,0 +-61.08054917460981,4.842424225886577,0 +-61.08114012534754,4.842101851702699,0 +-61.08152844262993,4.841949077900078,0 +-61.08218139605712,4.841632300648036,0 +-61.08289872375646,4.841317906093736,0 +-61.08374372073728,4.841010577080366,0 +-61.08451391142749,4.840768903328255,0 +-61.08521513510009,4.840584763142596,0 +-61.0858541384414,4.840395042386767,0 +-61.08673311741515,4.840290835157207,0 +-61.08735258965793,4.840288325901811,0 +-61.08855174484373,4.840029466120152,0 +-61.08893724125569,4.83987872650022,0 +-61.08970954961503,4.839576086422647,0 +-61.09054243716874,4.839395100300539,0 +-61.09159210530359,4.839151610722737,0 +-61.09172254788191,4.839728302511732,0 +-61.09164434993561,4.840477123612959,0 +-61.09159229032696,4.840975621126763,0 +-61.09170296529917,4.841737023728165,0 +-61.09188394669485,4.842439821706981,0 +-61.09227882557285,4.84308746335683,0 +-61.09240997278572,4.84384024045368,0 +-61.09261030187459,4.844537282121278,0 +-61.09298442499969,4.845375854434639,0 +-61.09315729535545,4.846202091184234,0 +-61.09329152839172,4.846775065552102,0 +-61.09326016344886,4.84770847711571,0 +-61.09324675464803,4.848455386237305,0 +-61.09318406515289,4.849010973404147,0 +-61.09309649098756,4.849688434340432,0 +-61.09297728934678,4.850608490397841,0 +-61.09293889110487,4.851284202830469,0 +-61.09292084999407,4.851773851725985,0 +-61.09287370475383,4.852503645655161,0 +-61.09276980058011,4.853162978824492,0 +-61.09257751353462,4.853805006266792,0 +-61.09234892819265,4.854257282458827,0 +-61.09175663445675,4.855070036844901,0 +-61.09134331617011,4.855428043420755,0 +-61.09102250517267,4.855800995302771,0 +-61.0903538889777,4.856513870007122,0 +-61.09020941830151,4.856861304521423,0 +-61.08961937898088,4.857591151875549,0 +-61.08939973322454,4.858112267270398,0 +-61.08917129362107,4.858753806434954,0 +-61.08911518675401,4.859406844867093,0 +-61.08906236986629,4.859999062498485,0 +-61.08900427259491,4.860650453649987,0 +-61.08901088284975,4.861247756242554,0 +-61.08900649456334,4.861962958305772,0 +-61.08906953059905,4.862562014246702,0 +-61.08918454455434,4.863222658918651,0 +-61.08917622774988,4.863932382074798,0 +-61.08911995012156,4.864519141667087,0 +-61.08893937226775,4.865219921340523,0 +-61.08883777510265,4.865753938409747,0 +-61.08864413579702,4.866703794867872,0 +-61.08858791560154,4.867357510633991,0 +-61.0884777161749,4.867879616929778,0 +-61.08856438377519,4.868244117220475,0 +-61.08891792996432,4.869335410184441,0 +-61.08893984944755,4.869933917720775,0 +-61.0886620822411,4.870447891983251,0 +-61.08815427250926,4.870822475079967,0 +-61.08793646812126,4.871402891390295,0 +-61.08782788008884,4.872174803836976,0 +-61.08775937969559,4.872889282574528,0 +-61.08812511744441,4.873400198929189,0 +-61.08861789979209,4.873862040213489,0 +-61.08920073394883,4.874215454838323,0 +-61.08976923661435,4.874748481026941,0 +-61.09027063178183,4.875213016606646,0 +-61.09076758436311,4.875737456294526,0 +-61.09087704085238,4.875867321712946,0 +-61.09238059305655,4.876429437657318,0 +-61.09258874627438,4.876937768548276,0 +-61.09273400737761,4.877439256212286,0 +-61.0929640981018,4.878373499882206,0 +-61.0932829597523,4.879082471108458,0 +-61.09366024061156,4.879862258596593,0 +-61.09362568565038,4.880354114371394,0 +-61.09356531614356,4.881150214212392,0 +-61.09332961782597,4.881805737969654,0 +-61.09315510799028,4.88246873454582,0 +-61.09297194295684,4.88318805778304,0 +-61.09271867944842,4.883885004206023,0 +-61.09237756215065,4.884352181601235,0 +-61.09202129265781,4.885004987046868,0 +-61.09165746842961,4.88571592850383,0 +-61.09147658049077,4.886446454184173,0 +-61.09094299322315,4.886954900667973,0 +-61.09037783986545,4.887085128721529,0 +-61.08942919080616,4.887439554382223,0 +-61.08895698272998,4.887962590414601,0 +-61.08842724349127,4.888412644065675,0 +-61.0880679740638,4.8889885607395,0 +-61.08776896629426,4.889560163046435,0 +-61.08761963720154,4.889845624774729,0 +-61.08679247892716,4.891497222538933,0 +-61.08674762356584,4.89198704162577,0 +-61.08674726121735,4.892663564049597,0 +-61.08675275493783,4.893277576764929,0 +-61.08693628312935,4.893964314345837,0 +-61.08729804020377,4.894724620213125,0 +-61.08768258532006,4.895241959139829,0 +-61.08812334270467,4.89582537267798,0 +-61.08842011999361,4.896642556152143,0 +-61.08904280889156,4.897301490451432,0 +-61.08972352688399,4.898027902626673,0 +-61.0900638056775,4.898421546966844,0 +-61.09062895682924,4.899139775237908,0 +-61.09118253693301,4.899983306313141,0 +-61.09148838059603,4.90068660678347,0 +-61.09176484483023,4.901632945712399,0 +-61.09177906237495,4.90224830286675,0 +-61.09184820966225,4.902993030226335,0 +-61.09191753729588,4.903739764633154,0 +-61.09204924594175,4.904367759962352,0 +-61.092058975542,4.904985546483899,0 +-61.09230862721597,4.905750213668085,0 +-61.09250149968597,4.906448864180001,0 +-61.09270487522118,4.907025570520181,0 +-61.09309394860153,4.9076847281613,0 +-61.09335357739814,4.908394999792181,0 +-61.09381418663947,4.909069014499912,0 +-61.09424856345574,4.909789496619208,0 +-61.09446652181526,4.910183378169661,0 +-61.0955582977418,4.913245640757173,0 +-61.0957710557978,4.913637785814644,0 +-61.0963229803693,4.914490695881241,0 +-61.09674360111373,4.915518099189944,0 +-61.09707613150532,4.916044457017233,0 +-61.0977496384488,4.916850805283382,0 +-61.09813133388647,4.917506653172929,0 +-61.09857575196123,4.918168477340406,0 +-61.09914110514643,4.918904104703422,0 +-61.09958739919103,4.919567513777544,0 +-61.10004840939937,4.920045092028305,0 +-61.10056047716616,4.920651999515396,0 +-61.10101038187337,4.9212536126113,0 +-61.10144751762921,4.921978260192854,0 +-61.10176620811859,4.922630322544636,0 +-61.10221430225329,4.923231226553488,0 +-61.10273509271373,4.923713547229238,0 +-61.10306504561967,4.924176714055176,0 +-61.10331723337571,4.924820335566977,0 +-61.10345033593942,4.925456354367198,0 +-61.10351877670631,4.926151197305209,0 +-61.10378454295074,4.926672732364224,0 +-61.1041660640993,4.927264574990091,0 +-61.10450587822474,4.927602189210311,0 +-61.10519418629484,4.928151860224252,0 +-61.10577062420812,4.928568149539132,0 +-61.1064722657247,4.928996403463366,0 +-61.10665204999112,4.929140015607074,0 +-61.10770053104436,4.930580885395375,0 +-61.10841783662335,4.930954904572027,0 +-61.10920308999144,4.931274383812307,0 +-61.11014160530671,4.931981519011371,0 +-61.11084333671223,4.932549499741531,0 +-61.11101340458187,4.932755698796774,0 +-61.11182697114581,4.933456835588268,0 +-61.11252134970579,4.934078688847809,0 +-61.11296249117552,4.934738444943529,0 +-61.11334719517608,4.935331159413541,0 +-61.11362433739162,4.935728284861622,0 +-61.11429750453533,4.93659371519587,0 +-61.1146102319024,4.937302323076777,0 +-61.11517754181159,4.937969160564213,0 +-61.11575643009837,4.93851330795262,0 +-61.11621158388603,4.939047598263796,0 +-61.11697346757288,4.939670333382703,0 +-61.11755765214409,4.940157361608548,0 +-61.11788930803394,4.940683220840595,0 +-61.1183889061443,4.941471605021623,0 +-61.11903439840383,4.942024994394906,0 +-61.1193923222877,4.942243624165233,0 +-61.12023666922083,4.942630662941787,0 +-61.12061715714717,4.943289829174701,0 +-61.1210054511043,4.944574806455618,0 +-61.12129915420373,4.945476689310178,0 +-61.1216571317963,4.946321356280733,0 +-61.1219082915663,4.94696819814409,0 +-61.122215260383,4.947681639424465,0 +-61.12253332522185,4.948270560737359,0 +-61.12302899732751,4.948936339785896,0 +-61.12337404804823,4.949341494274249,0 +-61.1239022969295,4.949825872927768,0 +-61.12447861006829,4.950375183397359,0 +-61.12488650561357,4.951216479405118,0 +-61.12514694547639,4.951671574475099,0 +-61.12524089965901,4.952416517901427,0 +-61.12548203552927,4.95286020771642,0 +-61.12579100467224,4.953246918877596,0 +-61.12766173788255,4.955854565131792,0 +-61.12818785399156,4.956275281507926,0 +-61.12858629742779,4.956679964776445,0 +-61.12902421459694,4.957266687406609,0 +-61.12941098444846,4.957726366692862,0 +-61.12966966045298,4.958234625983613,0 +-61.13008244966315,4.959060268952427,0 +-61.1302681844766,4.959683670255678,0 +-61.13069460866992,4.960390936448651,0 +-61.13107777499976,4.9609121225571,0 +-61.13176569017401,4.961460151203443,0 +-61.13245263970271,4.962007409524932,0 +-61.13294860818456,4.962598207488694,0 +-61.13331708255442,4.96323954832394,0 +-61.13368625490212,4.96388210157751,0 +-61.13400098217109,4.96445973794081,0 +-61.13435660749585,4.965284082772839,0 +-61.13460126935868,4.965977415113739,0 +-61.13492829419008,4.966434003649471,0 +-61.13544299305221,4.966848859334317,0 +-61.13613060881248,4.967402984242403,0 +-61.13682968292536,4.967832902728026,0 +-61.13745159815707,4.968437854386147,0 +-61.13806697910179,4.969100214717963,0 +-61.13864858798907,4.969455636500878,0 +-61.13940082236199,4.969946085773538,0 +-61.13985920501289,4.970288756471005,0 +-61.14056121351231,4.970653781773223,0 +-61.14120760422649,4.970953000072996,0 +-61.14201396058398,4.971509270450796,0 +-61.14246063842138,4.971972791288733,0 +-61.14300779590472,4.972621742547023,0 +-61.14344476345428,4.973139995875878,0 +-61.14395459156773,4.973545019423877,0 +-61.14454905676515,4.973717535774855,0 +-61.14519482791575,4.9740178886576,0 +-61.14577806812845,4.974377339709731,0 +-61.14611113986162,4.974773155479484,0 +-61.14679452781748,4.975384916919621,0 +-61.14717774930895,4.975907104328735,0 +-61.14756675334331,4.976369366157945,0 +-61.14824324165999,4.977039655793987,0 +-61.14885519674127,4.977700208030291,0 +-61.14920465008878,4.977915041206234,0 +-61.14997140014245,4.9785572714673,0 +-61.15058126523414,4.978745360704123,0 +-61.15094334507456,4.979106209856012,0 +-61.15142859614595,4.979412283415591,0 +-61.15232617135526,4.9804051273037,0 +-61.15230740854336,4.980987122001906,0 +-61.15236859220685,4.981734974276262,0 +-61.15244952821367,4.982236374230354,0 +-61.15225009912911,4.984158089799582,0 +-61.15190366021531,4.984683871002237,0 +-61.15124312469483,4.985245866033974,0 +-61.15095304446698,4.985779373555955,0 +-61.15088711570255,4.986517291899038,0 +-61.15112216281909,4.98740705216614,0 +-61.1514931758534,4.988186186484063,0 +-61.15182926287643,4.988652224227975,0 +-61.15240363943123,4.989264752951631,0 +-61.1528471194948,4.989927004091861,0 +-61.15266753338894,4.990598498569142,0 +-61.15219866232355,4.990928116679834,0 +-61.15145410007234,4.991542540078822,0 +-61.15084554420913,4.992044725146408,0 +-61.15023233765138,4.992608421257337,0 +-61.14993086264884,4.993203272517447,0 +-61.14975325098449,4.993809546830785,0 +-61.14954924883472,4.994726305175934,0 +-61.14924075251874,4.99537894743275,0 +-61.14886866935485,4.99609986743305,0 +-61.14869773591534,4.996651152456055,0 +-61.14851609042757,4.997328187371411,0 +-61.14835987723968,4.997689752762063,0 +-61.147467801309,4.999324246528394,0 +-61.14710146020265,4.999966453176165,0 +-61.14657822341249,5.001014269811646,0 +-61.14643391464691,5.00124539334427,0 +-61.14613454231059,5.001830457806308,0 +-61.14577251506189,5.002364968317033,0 +-61.14525827659831,5.003200008510944,0 +-61.14478470074212,5.004288594817981,0 +-61.14457233606437,5.005270817233638,0 +-61.14428187152715,5.006431413439716,0 +-61.14398916840609,5.006904769984113,0 +-61.14348731523494,5.007611146513578,0 +-61.14292307694859,5.008311047628283,0 +-61.14242082030196,5.009017379258014,0 +-61.14173100605891,5.009707387082077,0 +-61.14122065070104,5.009787601235658,0 +-61.14050617783912,5.010037837566048,0 +-61.13979159074609,5.010288321559062,0 +-61.13879986390523,5.01082801307886,0 +-61.13802619339472,5.011073315256231,0 +-61.13739193633631,5.01114292674202,0 +-61.13649216366699,5.011377052425833,0 +-61.13566052740762,5.011554445772533,0 +-61.13471013425062,5.011658721434532,0 +-61.13394490447668,5.011841198028637,0 +-61.1332235557004,5.012215382001082,0 +-61.132522142384,5.012402851615183,0 +-61.13208617753048,5.012364655346121,0 +-61.13115666215391,5.012282335019888,0 +-61.13067647884775,5.012175638830337,0 +-61.1300719041397,5.012119813305294,0 +-61.12880394868394,5.0117574135907,0 +-61.12794892275566,5.011557596019443,0 +-61.12744794298992,5.011514208345335,0 +-61.12663278851362,5.011443652488806,0 +-61.12605937702649,5.011580146109775,0 +-61.12523222582079,5.011756677197019,0 +-61.12446509013823,5.011938711624407,0 +-61.12367203066734,5.012306825432958,0 +-61.12298982887019,5.01293295813796,0 +-61.12278136290902,5.013164114688442,0 +-61.1219289764004,5.013649626927755,0 +-61.12109987332383,5.014268105446663,0 +-61.12106298228431,5.015006095891992,0 +-61.1210944684541,5.015685662304904,0 +-61.12100182881955,5.016352598311182,0 +-61.12073789056584,5.016817322417258,0 +-61.12026071571988,5.017392586370075,0 +-61.11973852929196,5.018220726940172,0 +-61.11946569493661,5.019070702441252,0 +-61.11945969928045,5.019132525945107,0 +-61.11780687181489,5.018720512189633,0 +-61.1173793650395,5.018620608565564,0 +-61.1165841527885,5.018484017280173,0 +-61.11536580718455,5.018184425104775,0 +-61.11488219636919,5.018015113701076,0 +-61.1142592541952,5.018017293640079,0 +-61.11370838317348,5.018541945696295,0 +-61.11351044973296,5.019339870937512,0 +-61.11291267578234,5.01972964194005,0 +-61.11202648412671,5.019897819801384,0 +-61.11114506842431,5.020003256150074,0 +-61.11077396482116,5.019969129882734,0 +-61.11045358772725,5.020063127437703,0 +-61.10916189143662,5.02057307982603,0 +-61.10849372689185,5.021143616759411,0 +-61.10837229985925,5.021814809429435,0 +-61.10830646264931,5.022552142174304,0 +-61.10830577302961,5.0232322320277,0 +-61.10854074916116,5.024058332014601,0 +-61.10860445461687,5.024747511014855,0 +-61.10843767886378,5.025229983573938,0 +-61.10774264191924,5.026038813679832,0 +-61.10722601083697,5.026926467035573,0 +-61.10665258887656,5.027805780767991,0 +-61.10629243057357,5.028392223406426,0 +-61.10597315457069,5.029228997435023,0 +-61.10561296355149,5.029814397269198,0 +-61.10535826512861,5.030596342585743,0 +-61.10523686721587,5.031267056588677,0 +-61.10519300175302,5.031759317938303,0 +-61.10506779962119,5.032434946005256,0 +-61.10494513330502,5.033053644946092,0 +-61.10468977629976,5.033836734046226,0 +-61.10450059622016,5.034565175846796,0 +-61.10432035045041,5.035120399451801,0 +-61.10424487524041,5.035876890106666,0 +-61.10413879280577,5.037002423438467,0 +-61.10401297049546,5.037683819006137,0 +-61.10394970456151,5.038370294390618,0 +-61.10387494556478,5.039182213823799,0 +-61.1038092112604,5.039925326996764,0 +-61.10378291682049,5.040923458612952,0 +-61.10377744989588,5.040985362256273,0 +-61.10273015305371,5.04289518491533,0 +-61.10237643171993,5.043365149393193,0 +-61.10182416772432,5.043940530581835,0 +-61.10145912291371,5.044533282656205,0 +-61.10103250377787,5.045189581411532,0 +-61.100597853415,5.045903044762631,0 +-61.10035047728491,5.046566005983641,0 +-61.10003018478415,5.047347533165752,0 +-61.09976349738631,5.048129050172476,0 +-61.09968484967689,5.048994799040147,0 +-61.09955649200019,5.049732343492852,0 +-61.09939358689059,5.050154916018753,0 +-61.09905670439151,5.051123983907052,0 +-61.09893934059353,5.051737875891727,0 +-61.09861344469394,5.052583250564588,0 +-61.09844475531542,5.053067905868362,0 +-61.09791081456465,5.054206611988699,0 +-61.09772227313372,5.054938589886282,0 +-61.09747710609204,5.055603011269964,0 +-61.09728025071713,5.056457772257445,0 +-61.09702146147448,5.057306449819584,0 +-61.09685593569793,5.057789567402148,0 +-61.0966801509865,5.058395903646192,0 +-61.09627199382764,5.059540517359561,0 +-61.09599701552548,5.060572516990088,0 +-61.09565280874898,5.061544561866434,0 +-61.09553083076298,5.062218998741765,0 +-61.09551702863735,5.063089426493695,0 +-61.09576243653233,5.063857861948541,0 +-61.09576172559706,5.064545523712332,0 +-61.09570338139731,5.065223981428318,0 +-61.09568780456976,5.065408675869441,0 +-61.09570183405263,5.066025794724884,0 +-61.09559188401973,5.067373995209501,0 +-61.0955239980291,5.068228559881459,0 +-61.09542449204898,5.069285475357816,0 +-61.09536664639675,5.069906779490956,0 +-61.09529427714192,5.070711207522275,0 +-61.09522793454592,5.071453270562024,0 +-61.09511265493361,5.072117651844446,0 +-61.09443430648355,5.074376308672918,0 +-61.09439011397932,5.074868506968124,0 +-61.09452380903866,5.075436335172611,0 +-61.09471567898857,5.0766880280721,0 +-61.09497141064886,5.077265922667222,0 +-61.09553935207047,5.077806726721843,0 +-61.09596883879773,5.078457334042763,0 +-61.09620637006863,5.07922064200293,0 +-61.09669988821028,5.08001230904015,0 +-61.09720524518834,5.080680866612344,0 +-61.09753014891741,5.081271423778068,0 +-61.09796881767836,5.081996779005724,0 +-61.09859217786467,5.082802305902423,0 +-61.09898554640975,5.083271527284658,0 +-61.09936284469484,5.083926684960536,0 +-61.09974029719138,5.084582333604026,0 +-61.10003435545034,5.085480797522012,0 +-61.10028323013307,5.086188775378743,0 +-61.10074098147916,5.086665817893183,0 +-61.10114888995579,5.087013673070103,0 +-61.10179106207307,5.087568663283045,0 +-61.10237737479884,5.08730828380894,0 +-61.10306676557283,5.087306275615077,0 +-61.10372366784711,5.087675362102697,0 +-61.1041045548003,5.088331337853834,0 +-61.10417464437474,5.088959539298449,0 +-61.10412028338688,5.08957700548004,0 +-61.10424655288709,5.090272359083556,0 +-61.10443464508279,5.090973541812436,0 +-61.1047466074691,5.091686839311906,0 +-61.1049347299143,5.092387641104414,0 +-61.10493131405967,5.093133136091464,0 +-61.10508662748046,5.094203270872166,0 +-61.10512885191662,5.09513641302179,0 +-61.10520372304345,5.095701488182289,0 +-61.10525671997873,5.096513716940168,0 +-61.10539894197171,5.097021227103743,0 +-61.10541723552672,5.097517323720585,0 +-61.10563952397983,5.0985266220707,0 +-61.10589444438576,5.099168633809454,0 +-61.10613843663415,5.099933860507597,0 +-61.10625831133272,5.100683733256727,0 +-61.10651953206666,5.101935482438216,0 +-61.10664446788677,5.102621240587763,0 +-61.10670205046784,5.10336183444443,0 +-61.10675954747558,5.10410130140344,0 +-61.10690078421634,5.104604285401012,0 +-61.10695221469927,5.105398262353087,0 +-61.10713161668372,5.106134445800691,0 +-61.10685990094959,5.107061778256257,0 +-61.10727974329889,5.107858365795524,0 +-61.10769174600144,5.108716362991907,0 +-61.10786970080356,5.109425091956542,0 +-61.10797369554616,5.110251172220949,0 +-61.10791958331998,5.110860368411622,0 +-61.10791224312597,5.111654757951129,0 +-61.10809731721246,5.11234630997628,0 +-61.10823195797832,5.112910751748817,0 +-61.10847258484254,5.11366859764278,0 +-61.10864624220396,5.114482264110343,0 +-61.10883577617428,5.115113283232681,0 +-61.10912877239534,5.115938957018022,0 +-61.10934479418542,5.116882319775788,0 +-61.10939590059289,5.117624432601112,0 +-61.10957398491868,5.118315238344259,0 +-61.10968533194031,5.119060052771461,0 +-61.10980415824591,5.119742766957923,0 +-61.10998631685239,5.120429999820443,0 +-61.11022864767114,5.121122125862699,0 +-61.11029007721769,5.121798092823183,0 +-61.11037834300461,5.122171444248523,0 +-61.11071931078698,5.123114667901273,0 +-61.11085153327367,5.123674039439933,0 +-61.11103299156358,5.124359025610422,0 +-61.1112077569607,5.125103336317655,0 +-61.11139267406683,5.125726027128803,0 +-61.11175611890464,5.126362074594431,0 +-61.11193336977772,5.127042367851502,0 +-61.11176634031628,5.127575868542094,0 +-61.11155039645972,5.127984538231837,0 +-61.11129290032547,5.128877379431313,0 +-61.11099003400566,5.129517941064316,0 +-61.11092912571135,5.130112495077568,0 +-61.11053725159454,5.130977854234554,0 +-61.1100184496129,5.131888138598056,0 +-61.10964008969393,5.132699861697426,0 +-61.10997030354681,5.133161385443229,0 +-61.11035480880618,5.133686880166683,0 +-61.11024337402677,5.134217687027522,0 +-61.1100656423288,5.134801595174658,0 +-61.10986304753472,5.135688586629318,0 +-61.1097532436911,5.136220809644017,0 +-61.10961955147356,5.136986923554338,0 +-61.10943556002159,5.137624798028066,0 +-61.10937597678097,5.138281882733081,0 +-61.10919074479531,5.13898852151851,0 +-61.10861338731955,5.140655764940495,0 +-61.10826647315633,5.141112005090133,0 +-61.10766778763093,5.141667281520838,0 +-61.10708423790227,5.142098943601512,0 +-61.1066678831784,5.142724064176646,0 +-61.10631653837568,5.143295133235912,0 +-61.10601603443486,5.143990883900831,0 +-61.10596266148149,5.144648017760409,0 +-61.10565880389647,5.14534695108533,0 +-61.10524655086306,5.145856869781814,0 +-61.10464377922112,5.146470295625648,0 +-61.10422922948869,5.147038630241465,0 +-61.10366220212959,5.147956404847675,0 +-61.10306808107179,5.148508992063274,0 +-61.10258471956791,5.149131005010811,0 +-61.10198152517039,5.149740439344305,0 +-61.10147886614379,5.150597297403753,0 +-61.10142496161976,5.151192687533957,0 +-61.10149699034095,5.151739791048045,0 +-61.10154357976449,5.152587764225836,0 +-61.10166459453105,5.153258141003396,0 +-61.101653902035,5.154032565327737,0 +-61.10141543641753,5.154668893908893,0 +-61.10117724907391,5.155304484078576,0 +-61.10106475941188,5.15589458840546,0 +-61.10097323187156,5.156245595423852,0 +-61.10047939280295,5.157725148800744,0 +-61.10023124833965,5.158485441481997,0 +-61.09999884310568,5.159067781357025,0 +-61.09977182796568,5.159590451218906,0 +-61.09940360658526,5.16034654070484,0 +-61.0993118075917,5.160701958745134,0 +-61.09913516088893,5.161343039468425,0 +-61.09892895017043,5.162326131360898,0 +-61.09888791698489,5.162794692174868,0 +-61.09846536168517,5.163486297913059,0 +-61.09808107410429,5.163755557179171,0 +-61.09725978377711,5.164226667377781,0 +-61.09664431101275,5.164413994847767,0 +-61.09607927656766,5.16472561629322,0 +-61.09545590603371,5.165031393939333,0 +-61.09499748445897,5.165530487133617,0 +-61.09471490070577,5.166103768048969,0 +-61.09452595596776,5.166919364474661,0 +-61.09417447393925,5.167541620582187,0 +-61.09376416723933,5.168158188073022,0 +-61.0935666973975,5.168378028391365,0 +-61.09273548823801,5.169074704749581,0 +-61.0921653240145,5.169497745541451,0 +-61.09182187481646,5.170001446528493,0 +-61.09176838078352,5.170590071317379,0 +-61.0915401603901,5.171162161181977,0 +-61.09147882487709,5.171867136455509,0 +-61.09141900695911,5.17257082692783,0 +-61.09136934995695,5.173156700294522,0 +-61.09137903578214,5.173747056665915,0 +-61.09156156679445,5.174409950624163,0 +-61.09174291470413,5.175073192297686,0 +-61.09186986483176,5.175672755452109,0 +-61.09198169195842,5.176447091933602,0 +-61.09205450418052,5.176982433892731,0 +-61.09216111056678,5.177814076077307,0 +-61.09219477272645,5.178763750142473,0 +-61.09218973358247,5.179475356670355,0 +-61.09231476109296,5.180076331303114,0 +-61.09231779132229,5.180723527758037,0 +-61.09243096990495,5.181444909769435,0 +-61.09255725543471,5.182042497169053,0 +-61.09248937455023,5.183511158392739,0 +-61.09267433672685,5.184121675732144,0 +-61.09308483659784,5.184872581193186,0 +-61.09336543120621,5.185724023919814,0 +-61.09342156668696,5.186437884102867,0 +-61.09341333431846,5.187203432778878,0 +-61.09333626368132,5.188080833311904,0 +-61.09328489795853,5.188665604617478,0 +-61.09341940669591,5.189148156763531,0 +-61.09354365196045,5.189747696431946,0 +-61.09360935313438,5.190342280258904,0 +-61.09377680538487,5.191122309401097,0 +-61.09384416776948,5.192364657776758,0 +-61.09396360472778,5.193022826308275,0 +-61.0940431921852,5.194147377529369,0 +-61.09397700621476,5.194905359586474,0 +-61.09391097706246,5.195662522024175,0 +-61.09372841052321,5.196408003515484,0 +-61.09368693714112,5.196874566352455,0 +-61.09363483564668,5.197458380574422,0 +-61.09357255183617,5.198158773559596,0 +-61.09351167069866,5.198856082599236,0 +-61.09345150761685,5.19955110744616,0 +-61.09357110830385,5.200204675620881,0 +-61.09368441678554,5.200919666409065,0 +-61.0941372736944,5.201786988978006,0 +-61.09436355053676,5.202565824884814,0 +-61.09458940182621,5.20334552394976,0 +-61.09474082695773,5.204298036902576,0 +-61.0948544893994,5.205011642343741,0 +-61.09485662137657,5.205653716478042,0 +-61.09485877910511,5.206295038471026,0 +-61.09487652450618,5.206759399515634,0 +-61.09487904213609,5.20739496156934,0 +-61.09491182421456,5.207689208403735,0 +-61.09485988283745,5.209605195124021,0 +-61.09517501115696,5.210687941528884,0 +-61.09527221191621,5.211574346749939,0 +-61.0954331296289,5.212406845703993,0 +-61.09543496817149,5.21304992001387,0 +-61.09548999018362,5.213756217824067,0 +-61.09560260987251,5.214466574857966,0 +-61.09572032807805,5.215118520212153,0 +-61.0958534477043,5.215596452216991,0 +-61.09611249150272,5.216604945813615,0 +-61.09621809248736,5.217366458586551,0 +-61.09633964572224,5.217955571214277,0 +-61.09646076251044,5.21854309059092,0 +-61.0964670938899,5.219123290335021,0 +-61.09644753017477,5.219990094560207,0 +-61.09639596086511,5.220564344031681,0 +-61.09632896520144,5.221310399251748,0 +-61.09640836264033,5.221720968467804,0 +-61.09650418580068,5.222594156270212,0 +-61.09666268970181,5.223413540935959,0 +-61.09672640808449,5.223994437533973,0 +-61.09677485109192,5.224747465620698,0 +-61.09689629414214,5.225332934608654,0 +-61.09705709417833,5.22608048777322,0 +-61.09716752138257,5.22677652787007,0 +-61.09736740669093,5.227767474793684,0 +-61.09736858441299,5.228399796432027,0 +-61.097411977725,5.229208133137355,0 +-61.0974495943156,5.230069417604565,0 +-61.09750209591564,5.230132024235675,0 +-61.09769892596469,5.231800033068895,0 +-61.09803499645577,5.232579768321237,0 +-61.09827126003592,5.233177629966689,0 +-61.09831324732083,5.233354553506133,0 +-61.09844700705144,5.234461946841212,0 +-61.09880757254747,5.235010640362841,0 +-61.09910868575953,5.235555658382842,0 +-61.09962240360004,5.236349743074038,0 +-61.10014153941539,5.237087438740115,0 +-61.10045419408738,5.237518981522676,0 +-61.10091627221538,5.238252895120221,0 +-61.10117157515877,5.238680091157422,0 +-61.10180817484731,5.239430498037533,0 +-61.10212347753619,5.239863837040381,0 +-61.10256322735668,5.240888181010424,0 +-61.10281726827089,5.24131627815435,0 +-61.10310884797917,5.24197957813323,0 +-61.1035117248707,5.242710987525502,0 +-61.10385664392722,5.243437420089869,0 +-61.10420681688986,5.244106555120555,0 +-61.10463748313804,5.244551980172797,0 +-61.10510901669109,5.245113993215202,0 +-61.10537397113983,5.245367449505563,0 +-61.10600173934866,5.246115910410781,0 +-61.10647344334296,5.246617061503442,0 +-61.10688235909696,5.247170374993654,0 +-61.10715437578648,5.247367258894789,0 +-61.10865882546723,5.249590331970091,0 +-61.10910650971884,5.250440752916605,0 +-61.10955913823133,5.251230476587635,0 +-61.10982882225133,5.252121495299524,0 +-61.11007130376374,5.252663301112169,0 +-61.11056642866703,5.253632011019624,0 +-61.11125983965044,5.254328917263355,0 +-61.11193182338987,5.254618604355294,0 +-61.11241595891541,5.25506554994748,0 +-61.11283235156973,5.25562259409962,0 +-61.11348032753095,5.256200080774819,0 +-61.11379914672358,5.256517658428733,0 +-61.11416431750989,5.256954718541759,0 +-61.11507377661713,5.257785671308128,0 +-61.11598465704921,5.258675338021885,0 +-61.11646285757543,5.259179868086423,0 +-61.11663260172749,5.259888639666081,0 +-61.11668640936425,5.260586939714898,0 +-61.11704711126776,5.261140511582365,0 +-61.11730579499042,5.261510741527556,0 +-61.11782334719674,5.262251466941976,0 +-61.11829360001402,5.262872603403338,0 +-61.11859193937367,5.263540940745036,0 +-61.11881161141928,5.264249386990459,0 +-61.11904273795296,5.264843334405175,0 +-61.11926188903503,5.265611839909125,0 +-61.11950421746997,5.266153349929751,0 +-61.11978870264755,5.266871776826478,0 +-61.12012057711122,5.267709878605381,0 +-61.12049042725574,5.268274555841399,0 +-61.12089483791804,5.268819720562593,0 +-61.12154047720713,5.269585111219401,0 +-61.12191389466944,5.270154248841622,0 +-61.1222767499856,5.270712086382026,0 +-61.12310596513264,5.271314864143177,0 +-61.12333977036749,5.271337843395324,0 +-61.12485772171135,5.272024832726358,0 +-61.12564935580513,5.272264202313993,0 +-61.12673011693827,5.272527154185538,0 +-61.12757430529228,5.272892874276404,0 +-61.12820365414973,5.273068949243972,0 +-61.12901023379089,5.273200478347666,0 +-61.12962794531741,5.27349111566535,0 +-61.13013948537758,5.273655948928053,0 +-61.13117230814544,5.27387770300764,0 +-61.1327242376172,5.274088622823268,0 +-61.13316403284035,5.274362582494294,0 +-61.13371304803371,5.274704516621439,0 +-61.13412681149855,5.275262335603738,0 +-61.13459330319152,5.27588041818919,0 +-61.13498505677904,5.276030964443503,0 +-61.13565481286061,5.276319507052518,0 +-61.13614770338426,5.276649698315285,0 +-61.13641007085924,5.276960793419294,0 +-61.13698739345915,5.27764533407088,0 +-61.13731249141031,5.277904283608969,0 +-61.13800032905441,5.27865626510851,0 +-61.13845971062076,5.279387902280361,0 +-61.13875756708092,5.279990224953536,0 +-61.13905554672325,5.280593191959916,0 +-61.13934399303913,5.281311469887921,0 +-61.13958460190422,5.2819106249141,0 +-61.13993616801311,5.282577898220344,0 +-61.1404086838511,5.283198521360277,0 +-61.14098378984772,5.284002900967922,0 +-61.1413511533753,5.284499561187288,0 +-61.14153154273717,5.285095118843101,0 +-61.14199240189571,5.285831836215521,0 +-61.14225724398563,5.286145461217957,0 +-61.14285590929445,5.286663280187699,0 +-61.14339662388959,5.287176122275479,0 +-61.14356056950093,5.28730681510415,0 +-61.14466858541247,5.289192694237186,0 +-61.14498087478182,5.289627362260585,0 +-61.14545917368635,5.290131796130582,0 +-61.14596553378082,5.290987937827909,0 +-61.14643508537588,5.29160937898595,0 +-61.14708303511041,5.292187972054803,0 +-61.14723627782561,5.29243369562505,0 +-61.14803784139211,5.293258391206994,0 +-61.14880121745863,5.293846260455952,0 +-61.14936072738652,5.294128537021931,0 +-61.14951961272484,5.294317472437732,0 +-61.1501912410647,5.29530667575003,0 +-61.15060856520216,5.295866063348317,0 +-61.15104125729803,5.296252451997046,0 +-61.15184860492843,5.297020467172654,0 +-61.15251859238952,5.298007922941668,0 +-61.15282432932442,5.298498606675068,0 +-61.15329799937428,5.299061500051329,0 +-61.15365579960606,5.299613899317281,0 +-61.15413388750234,5.300118410231665,0 +-61.15454873606958,5.30067491999614,0 +-61.15460640016877,5.300679894349519,0 +-61.15553227052708,5.302489625540801,0 +-61.15557527873808,5.302667122415894,0 +-61.15586872081219,5.303329684614738,0 +-61.15609421843192,5.30410159118413,0 +-61.15658968310535,5.305127629356443,0 +-61.15688769114986,5.305731222759084,0 +-61.15745051454594,5.306645650410728,0 +-61.15815263547785,5.307282711202895,0 +-61.15887257740495,5.307690782395038,0 +-61.15958202656821,5.308212978563792,0 +-61.15995536565889,5.308590781351588,0 +-61.16071590350629,5.309175057971141,0 +-61.16119163224509,5.30967928257466,0 +-61.16167690862493,5.310070377050979,0 +-61.16253801219773,5.310787529920881,0 +-61.16302935217892,5.311123122634153,0 +-61.16393235468791,5.312069566598606,0 +-61.16441027466172,5.312573334089391,0 +-61.16503538628657,5.313382070542811,0 +-61.1656133810969,5.314071305948024,0 +-61.16618641424311,5.314814183885813,0 +-61.16659136130885,5.315482392080105,0 +-61.16704337016056,5.316268611064015,0 +-61.16750009864671,5.316997040650306,0 +-61.16798203175935,5.317439866951582,0 +-61.16861720681153,5.318132066725573,0 +-61.16882762832168,5.318383500690778,0 +-61.16952745121915,5.319030321906427,0 +-61.16995925208673,5.319419790956895,0 +-61.17070862123923,5.320190010929767,0 +-61.17118902963091,5.32070085605847,0 +-61.17187447528516,5.321588825258968,0 +-61.17202167124509,5.321961011926899,0 +-61.17269291882123,5.323383697630416,0 +-61.17348757878932,5.324266564601271,0 +-61.17395197936725,5.324946675744126,0 +-61.17418517977096,5.325606811960272,0 +-61.17454965716107,5.326104457985973,0 +-61.1751937621377,5.326740857622373,0 +-61.17556333377524,5.327178999072061,0 +-61.17624938875021,5.327992777147388,0 +-61.17673462336853,5.328441688776475,0 +-61.17738641288405,5.329028821157913,0 +-61.17798535738081,5.329551119939709,0 +-61.17836540243516,5.329874525428561,0 +-61.17911358025045,5.330633925535129,0 +-61.17965045928013,5.331143017760934,0 +-61.17997660942994,5.331402403359345,0 +-61.18057210531752,5.331918161725395,0 +-61.18132762468653,5.332624577363563,0 +-61.18172353550391,5.332776389432336,0 +-61.18262776597849,5.333149761214465,0 +-61.1832324073668,5.333548939447226,0 +-61.1836567450903,5.333988923880442,0 +-61.18426432915071,5.334328197351763,0 +-61.18486381639578,5.334785473931443,0 +-61.18540547786888,5.335237796094507,0 +-61.18610824747073,5.335881414647777,0 +-61.18684479840808,5.3363727861625,0 +-61.18695004764849,5.336497811350157,0 +-61.18878544065026,5.337382056261393,0 +-61.18957323970513,5.337739448216202,0 +-61.19007478045134,5.338014385945613,0 +-61.1909654613447,5.338497112751718,0 +-61.19153871989519,5.338604832099463,0 +-61.19165436113082,5.338614886840705,0 +-61.19251136398354,5.338805416028668,0 +-61.19319516036018,5.338982883600931,0 +-61.19428516101873,5.339197202765925,0 +-61.1949601679225,5.339489892480124,0 +-61.1957038683645,5.339672721161016,0 +-61.1965544322005,5.339918472106621,0 +-61.19706887721514,5.34002031279855,0 +-61.19827755416021,5.340183193831377,0 +-61.1987842773611,5.340341006609967,0 +-61.19962861671275,5.340584039807568,0 +-61.19991493437474,5.340607594394196,0 +-61.20081280613573,5.340914665044176,0 +-61.20166099700981,5.341161463565268,0 +-61.20223829915545,5.341212235542768,0 +-61.20321995135812,5.341298613224452,0 +-61.20461349290859,5.341364265526424,0 +-61.20512418850331,5.341525339858209,0 +-61.20578314592002,5.341989123943783,0 +-61.20627884609752,5.342322722311096,0 +-61.20684785376187,5.342489114742201,0 +-61.20798450499706,5.342762864473793,0 +-61.20821446771428,5.342783673952145,0 +-61.2090182353765,5.342857544029288,0 +-61.20997237276554,5.343233388227599,0 +-61.21070608305864,5.343526921154612,0 +-61.21127791863713,5.343635970376021,0 +-61.21184907594617,5.343746078045403,0 +-61.21253600888043,5.343866730839477,0 +-61.21338633152968,5.344118810315414,0 +-61.21390162684974,5.344222785455413,0 +-61.21458017144441,5.344458167493583,0 +-61.21537018124732,5.344759695951356,0 +-61.21586511860595,5.345097296443615,0 +-61.21648120548716,5.345392479392388,0 +-61.21702023720378,5.345910593654308,0 +-61.21737579038815,5.346534192291636,0 +-61.21757814773607,5.346912401315576,0 +-61.21809587536909,5.347741087977712,0 +-61.21861119492656,5.348633223771946,0 +-61.21898191208617,5.349150451239675,0 +-61.2193628584138,5.350269219961144,0 +-61.21943952904005,5.350749815025091,0 +-61.2194054847665,5.351806923633792,0 +-61.21935919320628,5.352333373612127,0 +-61.21913665631116,5.352843014310067,0 +-61.2187989390587,5.353991799718941,0 +-61.21850658367254,5.354603173719513,0 +-61.21829933255223,5.354932497583808,0 +-61.21808178009126,5.35537593072428,0 +-61.21686190129164,5.357831589122529,0 +-61.2167956111193,5.358587501262106,0 +-61.21668182305446,5.359218302497299,0 +-61.21654069750211,5.360147672513104,0 +-61.2165530595431,5.360678248698115,0 +-61.21671005670223,5.361576340084456,0 +-61.21689334642519,5.362180500544106,0 +-61.21707551401872,5.362787228789836,0 +-61.2172615292939,5.36333758033545,0 +-61.21696848727093,5.363962698115492,0 +-61.21661203133253,5.364640387058665,0 +-61.21616842389079,5.365658304682027,0 +-61.21568754735826,5.366436741529935,0 +-61.21483937038376,5.367359801146122,0 +-61.21424509064785,5.368071442941321,0 +-61.21350163063393,5.369124005291826,0 +-61.21303290749795,5.369731298407737,0 +-61.21225838228122,5.370431509695936,0 +-61.21188954719839,5.371227687090137,0 +-61.21146074980685,5.372020615651769,0 +-61.21124569465031,5.372418060844095,0 +-61.21094535254625,5.373104737614017,0 +-61.21072988864349,5.374157904330815,0 +-61.2106782908243,5.374745699671068,0 +-61.21067557110496,5.375455896055656,0 +-61.21069577328416,5.376582341359356,0 +-61.2106465072978,5.377820837708368,0 +-61.2104156472066,5.379100312087037,0 +-61.21030983259926,5.379624360190793,0 +-61.21020339669966,5.380807595973767,0 +-61.21003588238743,5.381992783421923,0 +-61.2099494258935,5.382945499396227,0 +-61.20988922641927,5.384305070348313,0 +-61.20986102076644,5.385308139096212,0 +-61.20980194830137,5.386662883590509,0 +-61.20984337525955,5.387551931153811,0 +-61.20954958032099,5.389530424916481,0 +-61.20945864424588,5.390522665004779,0 +-61.20942815244464,5.390878593578908,0 +-61.2095887360997,5.391788596346016,0 +-61.20973811157991,5.392813227169056,0 +-61.20989716522854,5.393717776482278,0 +-61.21023738099255,5.395224635806166,0 +-61.21044772391397,5.39618993738978,0 +-61.21060021675257,5.397154295837401,0 +-61.21090920324921,5.397717350229359,0 +-61.21130575593346,5.398646444181913,0 +-61.21177810955417,5.399404154149838,0 +-61.21193791059991,5.400315963584528,0 +-61.2119662056946,5.400678306307355,0 +-61.21217574039233,5.401717711082906,0 +-61.21240654764227,5.402520165023684,0 +-61.21251035164654,5.40270965354452,0 +-61.21298553079962,5.403472920472535,0 +-61.21322755076597,5.404157512076448,0 +-61.21361850771924,5.405218608275629,0 +-61.21392117349476,5.405910462934154,0 +-61.21438258902779,5.406856399881947,0 +-61.21462067991861,5.407603951025956,0 +-61.21493161753028,5.408900450319496,0 +-61.21517521926403,5.409589108107745,0 +-61.21549502623844,5.410838315847123,0 +-61.21583649817342,5.411850074123595,0 +-61.21633980465086,5.413124672842925,0 +-61.21661579663562,5.413454545125971,0 +-61.21747603231725,5.414819405249346,0 +-61.21802471594732,5.415542734926356,0 +-61.21846781802076,5.416072451560811,0 +-61.21951574193126,5.416801761651213,0 +-61.219852970129,5.417063671903399,0 +-61.22074488432823,5.417629439624983,0 +-61.23283988713573,5.430952576449237,0 +-61.23315688111798,5.431460743079826,0 +-61.23398485960769,5.432312376067674,0 +-61.23452874670969,5.432958428896211,0 +-61.23512635218888,5.433668287132154,0 +-61.23555018517338,5.434303180701978,0 +-61.236151759179,5.434951987528572,0 +-61.23663339549289,5.435589740401127,0 +-61.23729450171691,5.436243588123053,0 +-61.23783509457616,5.436885701180986,0 +-61.23854368952113,5.437661690766619,0 +-61.23925666508613,5.438377429627533,0 +-61.24002443595676,5.439158227000898,0 +-61.24045670661656,5.439671637986934,0 +-61.24094779607945,5.440189461569215,0 +-61.24149280123678,5.44077133360623,0 +-61.24159563039137,5.44095890071263,0 +-61.24229760699298,5.441792590228888,0 +-61.24289606889598,5.442437976373514,0 +-61.24356734466043,5.442908496890419,0 +-61.24399899550632,5.443421174180338,0 +-61.24436589059255,5.444052564342987,0 +-61.24448665375547,5.444849290593813,0 +-61.24473209024285,5.445533160029625,0 +-61.24490889265167,5.446332319061255,0 +-61.24514533876184,5.447137316211292,0 +-61.24540467199051,5.447576100512713,0 +-61.24600349044633,5.448221161551118,0 +-61.24632054285541,5.448596975310125,0 +-61.24652816289817,5.449700852128215,0 +-61.24679424937075,5.450078544587917,0 +-61.24715355657062,5.450766130531701,0 +-61.24744824623925,5.451524161844796,0 +-61.24769334893958,5.452150444331794,0 +-61.24794521101236,5.453377675419619,0 +-61.24810396215545,5.454296015698519,0 +-61.24829401274006,5.45485292847888,0 +-61.24843545680053,5.455281674552494,0 +-61.24912782393314,5.456236435746563,0 +-61.24959444758984,5.457047266754959,0 +-61.250140876121,5.457629688905761,0 +-61.25091528121844,5.458349074606169,0 +-61.25163898175528,5.458949141713089,0 +-61.25207377475342,5.459408040594049,0 +-61.25296402106319,5.460140838403251,0 +-61.2535763979141,5.460613107330262,0 +-61.25547261710172,5.461859884806984,0 +-61.2559711345763,5.462259660708448,0 +-61.25708058491456,5.46306994317175,0 +-61.25782804751235,5.463313711775164,0 +-61.25844591268983,5.463664432156566,0 +-61.25928381127436,5.464153026748011,0 +-61.26028612483137,5.464773355119156,0 +-61.2607848988232,5.465112399568886,0 +-61.2611180155804,5.465318748582836,0 +-61.26169578925031,5.466018125692885,0 +-61.26237621559864,5.466842958999312,0 +-61.26303679859895,5.46731222405606,0 +-61.26364935970009,5.467659355717916,0 +-61.26546876374086,5.468171212582502,0 +-61.26608994032377,5.468577312028936,0 +-61.26695400090681,5.468944802930428,0 +-61.26807203008813,5.469745104431215,0 +-61.26889115920658,5.470576879906834,0 +-61.27006988640333,5.471911370630792,0 +-61.27112552094098,5.472703327262837,0 +-61.27219106370972,5.473377132113687,0 +-61.27280654421048,5.473724607395436,0 +-61.27349074613945,5.473961113954484,0 +-61.27398482338189,5.474356527491084,0 +-61.27465401495306,5.474767607060784,0 +-61.27562743408365,5.475733365147818,0 +-61.27628274448166,5.476317121504979,0 +-61.2767134193361,5.476766917812993,0 +-61.27718806468536,5.477394224647029,0 +-61.27759907011963,5.478074811950847,0 +-61.27793108028623,5.478983211456196,0 +-61.27827338525278,5.479775221653964,0 +-61.2785039564235,5.480498989511496,0 +-61.27880324663986,5.48111135657475,0 +-61.27913553621709,5.482016815712207,0 +-61.27959489607601,5.482812941483868,0 +-61.27983568106202,5.483417617390415,0 +-61.28005591333379,5.484254328349659,0 +-61.2802484427413,5.484739545747406,0 +-61.28047892843331,5.48546620221935,0 +-61.28087049879196,5.487040958537076,0 +-61.28097373723178,5.487869349808256,0 +-61.28133266271193,5.489129104825445,0 +-61.28172830186028,5.489984295278632,0 +-61.28246488682455,5.49098941438661,0 +-61.28294433265637,5.491559718764236,0 +-61.28375798463448,5.492335256183308,0 +-61.28482054158629,5.493600898302963,0 +-61.28531018822871,5.49469562847342,0 +-61.28564544577464,5.495542437422734,0 +-61.2860864713051,5.496514530173867,0 +-61.28641081984937,5.49747563099014,0 +-61.28670277393518,5.498142018444556,0 +-61.2871007529581,5.498934030406457,0 +-61.28749983697212,5.499726973676957,0 +-61.28794693678273,5.500640917232543,0 +-61.28827274655982,5.501602745318693,0 +-61.28865174777069,5.502627876128907,0 +-61.28909414649328,5.503600588953329,0 +-61.28965248719042,5.504583027493569,0 +-61.2899027724937,5.50507199284204,0 +-61.2904194305131,5.505877471856388,0 +-61.29083493620452,5.506498908199472,0 +-61.29142118478941,5.507195404130417,0 +-61.29226428703769,5.508325072245419,0 +-61.29266982203465,5.509062750299362,0 +-61.292979103196,5.509558098731993,0 +-61.29315769506431,5.510218894693321,0 +-61.29360347776569,5.511197489599112,0 +-61.29390410273446,5.511811369738837,0 +-61.29421805845488,5.512248084864257,0 +-61.29453935810611,5.513270300439178,0 +-61.2945823468602,5.513449504785614,0 +-61.29518483602043,5.51461323081342,0 +-61.29554697993233,5.515171278013559,0 +-61.29577029961925,5.515308336325585,0 +-61.29656769455606,5.516090980204268,0 +-61.29733672629959,5.516684235749091,0 +-61.29855217922863,5.517550621852521,0 +-61.29901480700787,5.518293016068728,0 +-61.29924898071701,5.518957299311815,0 +-61.29969578602274,5.519874848084239,0 +-61.30017852487317,5.52038644904167,0 +-61.3007364648451,5.520728307036206,0 +-61.30133794424865,5.521249231473374,0 +-61.30238118489238,5.522100513187932,0 +-61.30303039126729,5.522743315084197,0 +-61.30355266954537,5.523495134689476,0 +-61.30415444751901,5.524018378739588,0 +-61.30435757666195,5.524388995711193,0 +-61.30472084860691,5.524950071909235,0 +-61.30508426456434,5.525511194328896,0 +-61.30573027778145,5.526215490504091,0 +-61.30603057802421,5.526830671617163,0 +-61.30659813185011,5.527763475373622,0 +-61.3071075728801,5.528691981435586,0 +-61.30733987456821,5.529420527455976,0 +-61.30764584646223,5.529978248745793,0 +-61.30799049372317,5.530776111032677,0 +-61.3083154676394,5.531809869199712,0 +-61.30867068296501,5.532491589894518,0 +-61.3092216573065,5.533667136347281,0 +-61.30966135614112,5.534776340497153,0 +-61.31013105532791,5.535531970538698,0 +-61.31033180706052,5.53596670625602,0 +-61.31068922259875,5.53665327177711,0 +-61.31106397732286,5.538532019545627,0 +-61.31110792098985,5.538712550984521,0 +-61.31155308145354,5.539866656481714,0 +-61.31199199919338,5.541255990304533,0 +-61.31230350112452,5.541873607068892,0 +-61.31278407434312,5.542683956086209,0 +-61.31310397809387,5.543245107250934,0 +-61.31334399642034,5.543979078780831,0 +-61.31381238874209,5.544912407343483,0 +-61.3142136727058,5.545961105256918,0 +-61.3144554965895,5.546759102020111,0 +-61.31457440458786,5.54760780048611,0 +-61.31455514734861,5.547845406998604,0 +-61.31462736165341,5.548450550539029,0 +-61.31513996155811,5.549636457295752,0 +-61.31493118660268,5.549977789076792,0 +-61.31443386097099,5.551613454831076,0 +-61.31438826838825,5.552149125426725,0 +-61.3142538237521,5.55303793886967,0 +-61.31423983274728,5.553217540634448,0 +-61.31429998552504,5.553944126513898,0 +-61.3143379299644,5.554907888372502,0 +-61.31439564507786,5.55569733706975,0 +-61.31459174851143,5.55619315153504,0 +-61.31543552766168,5.556865978803387,0 +-61.31543859534777,5.557526533837185,0 +-61.31538988881614,5.558125357714878,0 +-61.31519237069097,5.55900834943168,0 +-61.31494721108731,5.559769235480908,0 +-61.31482682351174,5.560481271790086,0 +-61.31463150889182,5.561367903003038,0 +-61.31453613082621,5.561781149105781,0 +-61.31458210119985,5.563425791385815,0 +-61.31453326663429,5.563977185485761,0 +-61.31450697263325,5.564274067570774,0 +-61.31441962625053,5.565249373479935,0 +-61.31437186829708,5.565800656496847,0 +-61.31428888082035,5.566263556778599,0 +-61.31402821362422,5.566796654933131,0 +-61.31394824375141,5.567217125941178,0 +-61.31382147653887,5.567676035906445,0 +-61.3137648511576,5.568311820756375,0 +-61.31371956217459,5.568820331988377,0 +-61.31357022332931,5.569533114150119,0 +-61.31342234809631,5.570247524237339,0 +-61.31323118385564,5.57095758078758,0 +-61.31313249148096,5.571589945508359,0 +-61.31301132872545,5.572476658830822,0 +-61.31287751768394,5.573020491692381,0 +-61.31267867249617,5.57381503872073,0 +-61.31259118006328,5.574320084608704,0 +-61.31254625728745,5.574828718750206,0 +-61.31255513428283,5.575213777498164,0 +-61.3126418375355,5.575691309267563,0 +-61.31272899525807,5.576170381911148,0 +-61.31280880251675,5.576734758069652,0 +-61.31290655788589,5.577549532719313,0 +-61.31289293384312,5.578188529341305,0 +-61.31285294510619,5.580134002391815,0 +-61.31280309844723,5.580686997679968,0 +-61.31275788126818,5.581196314966202,0 +-61.31267938835141,5.581615025897593,0 +-61.31251844343797,5.582456842058874,0 +-61.3122998564741,5.583464356565645,0 +-61.31205773252817,5.584255569726447,0 +-61.31175831537207,5.585212285952051,0 +-61.31153196681737,5.585833221560853,0 +-61.31115923040994,5.586654945535519,0 +-61.31087192390725,5.587484156226869,0 +-61.31063831355258,5.588190050240587,0 +-61.31058622069814,5.588783711707962,0 +-61.31065281259332,5.589003184265653,0 +-61.3110618891546,5.589722650084094,0 +-61.31160081894303,5.589940608274792,0 +-61.31211198655016,5.589985177122881,0 +-61.31262312651506,5.590029739827496,0 +-61.31318054579145,5.590035601546937,0 +-61.31391542202026,5.589971387494723,0 +-61.3144683296731,5.590019399116981,0 +-61.31507476979984,5.589943917940578,0 +-61.31575606043697,5.590003353133818,0 +-61.31607939934693,5.589732436313086,0 +-61.31652641780369,5.589515041855029,0 +-61.31707669334159,5.589093215553014,0 +-61.31735360027529,5.588861173323223,0 +-61.31765256323011,5.588374989425515,0 +-61.31786288118916,5.587923857722497,0 +-61.31831674193242,5.587622136960497,0 +-61.31873001791352,5.587786288321422,0 +-61.3187687651374,5.587832342999087,0 +-61.32040761964488,5.588103397991321,0 +-61.32116781215873,5.588255143396562,0 +-61.32142742700987,5.588235164289161,0 +-61.32208597115895,5.588079460426849,0 +-61.32252743302115,5.587947488895757,0 +-61.32344872234452,5.587729651718323,0 +-61.32401733488523,5.58760889986733,0 +-61.3246131661745,5.587661021332424,0 +-61.32555681267636,5.58765835495564,0 +-61.32569957579692,5.587500432935453,0 +-61.32601613548893,5.587315120831051,0 +-61.32664488523026,5.586986632621043,0 +-61.32735825091942,5.586665443459967,0 +-61.3282342009067,5.586443756718428,0 +-61.32866665402416,5.5863964265531,0 +-61.3290954411123,5.586391485650174,0 +-61.32973304016355,5.58644764066135,0 +-61.33051648103157,5.586303695104413,0 +-61.33099480697902,5.586217947125819,0 +-61.33147307373634,5.586132253027234,0 +-61.33239058396549,5.585915714720132,0 +-61.33295324921566,5.585838078360575,0 +-61.33312660672294,5.585810946462948,0 +-61.33360413976934,5.585725792984385,0 +-61.33442408310986,5.585628712999616,0 +-61.33476285293814,5.585658968790661,0 +-61.33527113783848,5.585703884860905,0 +-61.33590994493974,5.585717906872008,0 +-61.33667183667532,5.585785239269235,0 +-61.33734244600033,5.585928619535932,0 +-61.33805184650121,5.586117814002902,0 +-61.33871893854118,5.586303326605631,0 +-61.33947442403754,5.586454130932706,0 +-61.34001067011139,5.5866707969273,0 +-61.34059642898305,5.58680692765582,0 +-61.34077320990158,5.586737416815852,0 +-61.34444894734398,5.587271578280059,0 +-61.34511602356866,5.587457383314719,0 +-61.34583239400111,5.587562337710875,0 +-61.34655241275362,5.58762509393153,0 +-61.34709221945633,5.58779974943794,0 +-61.34758262544459,5.588055250804816,0 +-61.34806671265256,5.588395668495973,0 +-61.34851181311232,5.588690015594789,0 +-61.34891694497254,5.588937787950036,0 +-61.34976093198581,5.589520627568115,0 +-61.35015809377403,5.589852360234112,0 +-61.35047808033688,5.590092491011714,0 +-61.35070927114965,5.590367211625774,0 +-61.35139284633401,5.591318523825651,0 +-61.35149389246405,5.591624649584316,0 +-61.35165736088541,5.592191070967729,0 +-61.35167742211168,5.59244767683976,0 +-61.35157410789405,5.592651073116528,0 +-61.35145795749967,5.593489997094444,0 +-61.35155308324349,5.594347681767961,0 +-61.35181820756041,5.595218867315364,0 +-61.35213733329132,5.595964537710397,0 +-61.35244860967548,5.596792659741519,0 +-61.3527115043133,5.597194193743807,0 +-61.35317049297215,5.597780853168617,0 +-61.35355561271889,5.598236013033901,0 +-61.35386727168854,5.598558165411296,0 +-61.35452870932451,5.599247573373864,0 +-61.35483628920381,5.59961111824441,0 +-61.35532835980644,5.600285007767261,0 +-61.35566275116424,5.600818601387944,0 +-61.35601195285226,5.601185167709933,0 +-61.35640220353336,5.601551991737365,0 +-61.35693089201389,5.602214451363953,0 +-61.3572088350215,5.602808286579075,0 +-61.35756616079023,5.603449829086254,0 +-61.35770502584499,5.603747350548301,0 +-61.35809639648874,5.604476401410139,0 +-61.35809261345155,5.604517640411011,0 +-61.35877802826023,5.605810053147973,0 +-61.3591362131159,5.606473284301456,0 +-61.35939236118734,5.606874293594241,0 +-61.35951968956816,5.607305411941621,0 +-61.35967668735714,5.607864349148158,0 +-61.35990732568664,5.608552702010091,0 +-61.3600306004475,5.609063056879192,0 +-61.36015234790725,5.609574064941775,0 +-61.36026693490081,5.610167569979413,0 +-61.36029543058124,5.610794975916198,0 +-61.36032029780417,5.611463729497263,0 +-61.36036331826289,5.61192575778987,0 +-61.36048928821223,5.612394997208723,0 +-61.36068004334776,5.61307813015326,0 +-61.36089762727399,5.61393011284819,0 +-61.36118759202021,5.614412588971708,0 +-61.36156722537541,5.614819097894847,0 +-61.36190899502782,5.61518053548546,0 +-61.3624715379541,5.615850799177622,0 +-61.3626471833352,5.616197227532179,0 +-61.36285218938162,5.616669976441911,0 +-61.36302225959311,5.617467369263472,0 +-61.36313749378071,5.617559239907323,0 +-61.36341302045244,5.618116358742612,0 +-61.36359370025626,5.618377556907885,0 +-61.36425108344255,5.618842640890634,0 +-61.36486787748298,5.619348867723779,0 +-61.36552137556164,5.61989896368967,0 +-61.36576859150112,5.62032993747589,0 +-61.36617087789878,5.621263693062748,0 +-61.36626051594162,5.621597521970719,0 +-61.36657656816841,5.622155063274303,0 +-61.36921345789646,5.622970853721492,0 +-61.37062544896741,5.62296618831748,0 +-61.37193318409901,5.622695650459487,0 +-61.37359927575847,5.62271380521045,0 +-61.37529983683486,5.622346382484266,0 +-61.37671036543406,5.622338775939008,0 +-61.37819146324956,5.622976222844994,0 +-61.37968415236233,5.623489540606871,0 +-61.38114278312165,5.624381014226757,0 +-61.38207069534251,5.625481649741064,0 +-61.38374730017278,5.626770872885274,0 +-61.38497410563448,5.627388111666885,0 +-61.3868145332009,5.628314076224393,0 +-61.38897036491394,5.630033074147238,0 +-61.38996548467336,5.63177239775101,0 +-61.39085385913707,5.63324509662974,0 +-61.3917066836391,5.634953668196986,0 +-61.39248964883998,5.636160898248593,0 +-61.39352778481745,5.637392068903518,0 +-61.39434631579869,5.638223461089464,0 +-61.39551035985517,5.639464675226296,0 +-61.39630681709558,5.640548604962459,0 +-61.39739036537693,5.641276586953634,0 +-61.39809380118682,5.641971634563422,0 +-61.4004793687718,5.643826370395849,0 +-61.40139028056637,5.645046132470252,0 +-61.40278315550185,5.64655908506892,0 +-61.40381443377785,5.647921527836381,0 +-61.40425113040431,5.648857157111973,0 +-61.40514586284725,5.650475683598871,0 +-61.40527253015328,5.650486589423253,0 +-61.40514497046262,5.653394105432271,0 +-61.40512502878382,5.654799462715006,0 +-61.40501853787939,5.655811569295403,0 +-61.40466041262128,5.656799845670526,0 +-61.40360224407785,5.658485066432924,0 +-61.40287270392103,5.659558659474283,0 +-61.40228566159366,5.660393285449403,0 +-61.40115824629932,5.661559782096393,0 +-61.39934299931433,5.663296140331095,0 +-61.39803390970425,5.663686945055209,0 +-61.39646254849986,5.664180368977799,0 +-61.39473530320912,5.665037149648036,0 +-61.39349702546168,5.666060387995846,0 +-61.39199145074728,5.667310654251232,0 +-61.39078381066567,5.668083682576904,0 +-61.38959031473279,5.668733705580992,0 +-61.38812380256653,5.66961070509197,0 +-61.38771458176488,5.669951308130183,0 +-61.38635112830089,5.671086137289168,0 +-61.3855709467658,5.672774106633775,0 +-61.38522166728391,5.673872402993008,0 +-61.38483955493523,5.675343877334302,0 +-61.38444660514853,5.67693972452671,0 +-61.3843150679885,5.678434517979325,0 +-61.38421641168951,5.679555633102363,0 +-61.38414428990207,5.681811500599972,0 +-61.3839578852647,5.683927329673133,0 +-61.38419100892241,5.685588558034635,0 +-61.38434285317952,5.686737019165073,0 +-61.38519188298226,5.688580399046903,0 +-61.38560573297393,5.689627908102668,0 +-61.38622694629535,5.691200751041282,0 +-61.38673417753492,5.692639309304163,0 +-61.38741046805571,5.693583461778148,0 +-61.38857806996332,5.694697610163184,0 +-61.38987186194591,5.695824317160611,0 +-61.39130289963774,5.696838052035769,0 +-61.39201364460232,5.697409487205952,0 +-61.39344742305138,5.698429975138163,0 +-61.39475705296892,5.699441531147332,0 +-61.39594215295726,5.700443081491706,0 +-61.39628818700378,5.700856957469819,0 +-61.39759016762232,5.701997837001159,0 +-61.3994778359037,5.703693367454693,0 +-61.40039599486281,5.707082992919225,0 +-61.40061686862555,5.708768106367716,0 +-61.40107901619704,5.710384582050009,0 +-61.40162554970203,5.711527729201657,0 +-61.4022820383757,5.712927100479529,0 +-61.40315428517972,5.714515164685556,0 +-61.4037972211498,5.715831338347857,0 +-61.40490997220702,5.717679049539533,0 +-61.40605415080834,5.719041220921619,0 +-61.40633973353933,5.71996137008946,0 +-61.40712044927015,5.72219840636614,0 +-61.40698859080504,5.723577152799654,0 +-61.40685669230479,5.72519143068122,0 +-61.40708403881024,5.727087435047695,0 +-61.407235803802,5.728353148667225,0 +-61.40733766809858,5.730243494343283,0 +-61.40739519213413,5.73276047057775,0 +-61.4080771094872,5.733701558230606,0 +-61.40850036212866,5.734746152736012,0 +-61.40836837392284,5.736374018695263,0 +-61.40756641432224,5.73845061466551,0 +-61.40710907261288,5.739422154665281,0 +-61.40649614170021,5.740761030945385,0 +-61.40535895404217,5.743700801760027,0 +-61.40458346363084,5.745277886988143,0 +-61.40433578733827,5.74664820726427,0 +-61.40405528660007,5.748395491720008,0 +-61.40396940808443,5.749402130665764,0 +-61.40381937734053,5.751164774853143,0 +-61.40360147116054,5.752155578088622,0 +-61.40332730106302,5.753772671227929,0 +-61.40315829203458,5.755652113580729,0 +-61.40306818927976,5.756654165296308,0 +-61.40381789505498,5.758236197140109,0 +-61.40458893175504,5.759706892296878,0 +-61.40527136325579,5.762041195709096,0 +-61.40546848373277,5.762690969363964,0 +-61.40596581066852,5.765749955478757,0 +-61.40687496728553,5.767089414962446,0 +-61.40754924876283,5.769553628409005,0 +-61.40793989366128,5.770977836150817,0 +-61.40801332224101,5.773134918759975,0 +-61.40794667694725,5.773889354724903,0 +-61.40692056510778,5.775321949680118,0 +-61.40642823731385,5.776671119314001,0 +-61.4061545202086,5.778420604865413,0 +-61.40597310634576,5.780432395033505,0 +-61.40614176868345,5.782598131101852,0 +-61.4068131682445,5.784803021529386,0 +-61.40712418858742,5.786848113668793,0 +-61.40637587393122,5.788043619002814,0 +-61.40534723768892,5.789594604711525,0 +-61.40499920871939,5.790702643504892,0 +-61.40453399206561,5.793193306894294,0 +-61.40455375382754,5.794461564750275,0 +-61.40500559038559,5.795134862397389,0 +-61.40567824165687,5.796208040572117,0 +-61.40689788963141,5.798344404873133,0 +-61.40780729492963,5.799561528375138,0 +-61.40880165763797,5.801158569659658,0 +-61.40946657783032,5.802224845006996,0 +-61.40978719330944,5.802882635415795,0 +-61.41057867923413,5.803960247078346,0 +-61.41169333314729,5.805697944204141,0 +-61.41253534443693,5.807529106888007,0 +-61.4140391467412,5.810284364336252,0 +-61.41446720953846,5.811069455170411,0 +-61.41822266509203,5.814861662889721,0 +-61.41949684760912,5.816101280281059,0 +-61.4207841578532,5.817483134770234,0 +-61.42211205068744,5.818361441025377,0 +-61.42417535059463,5.819424968100662,0 +-61.42550157830118,5.820169421433381,0 +-61.42706837047587,5.821060811762438,0 +-61.4287618400292,5.821963660668422,0 +-61.43010134811055,5.822584328071709,0 +-61.4319126750512,5.823625623555416,0 +-61.43479105693218,5.825517456095653,0 +-61.43599547017897,5.826254729585733,0 +-61.43829588241294,5.82746560500814,0 +-61.43949591752565,5.828199816231282,0 +-61.44068417332654,5.829058216533956,0 +-61.44297911480378,5.830263922265509,0 +-61.44431530701243,5.830883200818179,0 +-61.44513811964988,5.831583426654967,0 +-61.44692041242975,5.83287002091136,0 +-61.4481181029698,5.833602286539995,0 +-61.44933721294765,5.834084806579234,0 +-61.45115845504002,5.834870123947337,0 +-61.45296632931053,5.835779027933398,0 +-61.45418287065124,5.836260450063316,0 +-61.45585195424061,5.83728173447668,0 +-61.45655284742355,5.837971935857087,0 +-61.45878322270701,5.839665080092063,0 +-61.46031717019915,5.840929900409207,0 +-61.46152548767876,5.841797769231842,0 +-61.46237354446531,5.842380607549627,0 +-61.463923299999,5.843786095087829,0 +-61.46499900228608,5.844771534819769,0 +-61.46618939111187,5.845893523907928,0 +-61.46654923315164,5.847430840415473,0 +-61.46672752298,5.849580283648772,0 +-61.46677169374838,5.850462520555878,0 +-61.46661142634751,5.852206329874582,0 +-61.46643727847659,5.854071609947535,0 +-61.46646584766168,5.856452399252941,0 +-61.46574780855261,5.857393206621996,0 +-61.46474230425269,5.859922406014922,0 +-61.46418408479471,5.861737728725211,0 +-61.46353978300477,5.864407977920133,0 +-61.46291037683504,5.866952023063607,0 +-61.46234270287871,5.867651200580736,0 +-61.46200196910733,5.86861857010282,0 +-61.46053673186771,5.873316298752474,0 +-61.45899761334753,5.874939006517212,0 +-61.45743339462828,5.876930206435319,0 +-61.45695690098692,5.878257741956324,0 +-61.45654058052899,5.880588587930626,0 +-61.45641791283681,5.881832544670393,0 +-61.45581595624334,5.882907237359937,0 +-61.45377737792192,5.885983684341505,0 +-61.45250775160667,5.887499201489724,0 +-61.45097808401691,5.888988810950776,0 +-61.44946554760172,5.890353511272621,0 +-61.4482033376956,5.891737802047446,0 +-61.44671268735187,5.892848882421901,0 +-61.44558439436754,5.894512516250419,0 +-61.44473849665157,5.89569870328657,0 +-61.44348038540358,5.897222658429695,0 +-61.44235873977509,5.898496321998916,0 +-61.44112469143915,5.899635564355746,0 +-61.43985934921819,5.901148599882517,0 +-61.43944189872927,5.901613370764543,0 +-61.43854136593971,5.903287596600213,0 +-61.43825296865886,5.905138185469611,0 +-61.43807827443793,5.907123106096397,0 +-61.43768592009942,5.908708545629919,0 +-61.43765242772599,5.909076157184967,0 +-61.43661289003003,5.911040943493015,0 +-61.43613766864225,5.913518793625259,0 +-61.43604464640207,5.914523094755682,0 +-61.43585389055524,5.916640911925657,0 +-61.43572507079599,5.918125784788797,0 +-61.43532543001859,5.91983737227165,0 +-61.43510509648333,5.920940372421291,0 +-61.43474529606475,5.922160878571405,0 +-61.43457504295171,5.924026000842399,0 +-61.43426209661556,5.926122589797936,0 +-61.43420849168358,5.928241448393426,0 +-61.43422355620633,5.929492522011955,0 +-61.43431953148698,5.931250119051072,0 +-61.43426719626186,5.933241822287373,0 +-61.43436947554471,5.934865956104021,0 +-61.43479048157575,5.937137991197289,0 +-61.43481352827509,5.938254485354749,0 +-61.43507171115732,5.939658394111677,0 +-61.43508923639051,5.94091154378139,0 +-61.43529823979117,5.942797636453928,0 +-61.43583655757942,5.948243575130988,0 +-61.43559905186111,5.951149081522864,0 +-61.43534455809296,5.953991675796904,0 +-61.4348623106879,5.955209178359508,0 +-61.43401629365405,5.956272679000864,0 +-61.43291634371231,5.957284107946893,0 +-61.43249734916713,5.957740057273981,0 +-61.43094869617336,5.959583201585281,0 +-61.42941298026276,5.961331756874237,0 +-61.42887000500966,5.961798350882627,0 +-61.42682175373314,5.963640660014719,0 +-61.42416608380361,5.96668098512302,0 +-61.42124241740355,5.969929497103205,0 +-61.42012543848406,5.971208038215102,0 +-61.41842291107016,5.973434905412144,0 +-61.41734840528925,5.975584602660001,0 +-61.41678591342123,5.977659289291472,0 +-61.41658549395868,5.980020336952554,0 +-61.41645898490897,5.981509362090314,0 +-61.41639384916848,5.98225301352594,0 +-61.41614914672756,5.983605409070256,0 +-61.41579590808571,5.986197014120672,0 +-61.41567650737377,5.987559944439608,0 +-61.41555348196119,5.988924933216874,0 +-61.4153674358062,5.99103275491434,0 +-61.4151314565329,5.993531171930099,0 +-61.41465247723582,5.995563031658687,0 +-61.41437190650772,5.996971004079664,0 +-61.41395034272946,5.998395253263162,0 +-61.41343980054019,5.999847802536793,0 +-61.41300969320747,6.002624399258536,0 +-61.41288838054439,6.003813079949133,0 +-61.41299869698094,6.006517963443916,0 +-61.41296971133883,6.009569820961779,0 +-61.41270875842985,6.01193009411397,0 +-61.41252928421851,6.013596106322167,0 +-61.4122908425072,6.015828252395048,0 +-61.41202779425647,6.017170218810883,0 +-61.41171831169464,6.017670376016056,0 +-61.41004304746788,6.020251701635422,0 +-61.40923040983076,6.02064804285539,0 +-61.4058521647829,6.022645807308577,0 +-61.40501047138056,6.023087304099918,0 +-61.4033188650854,6.024114013310264,0 +-61.40148866447083,6.02512980901729,0 +-61.39948795379583,6.026394119822216,0 +-61.39908921763452,6.027539063831328,0 +-61.39861609941718,6.02920875711026,0 +-61.39845747890143,6.030521349544275,0 +-61.39832260250039,6.032783229238323,0 +-61.39850760847093,6.034821047985217,0 +-61.39902393130102,6.036486842299969,0 +-61.39954298491265,6.038155790471781,0 +-61.4008482095065,6.041656967005202,0 +-61.40160075102068,6.043765335501053,0 +-61.40192368101323,6.046115881525815,0 +-61.40221879335391,6.047249442180321,0 +-61.4019187558533,6.048887622964042,0 +-61.40129003846256,6.052687608346234,0 +-61.40037332250863,6.058242596255768,0 +-61.39964906288416,6.060228461145909,0 +-61.39939257756951,6.061574045586294,0 +-61.39892992014914,6.063933977338238,0 +-61.39808916855727,6.065862562636594,0 +-61.3971129626588,6.067670439705041,0 +-61.39616665735008,6.069086173581355,0 +-61.39547766550614,6.07066624506188,0 +-61.39491416631092,6.072389995063506,0 +-61.39386459989967,6.07490475060228,0 +-61.39384324161558,6.075169594509564,0 +-61.39484603075332,6.083753336480354,0 +-61.39495287764633,6.085834822455033,0 +-61.39534081230536,6.087637880758057,0 +-61.39552358066246,6.088439815062577,0 +-61.39605121522188,6.089791181354771,0 +-61.39720321151421,6.093389844661381,0 +-61.39772144687797,6.095051267007555,0 +-61.39896270097967,6.097721348835771,0 +-61.39977730881971,6.099446895133612,0 +-61.40068539049577,6.101744828080106,0 +-61.40130486541442,6.102632214266353,0 +-61.40229631347564,6.104113757946942,0 +-61.40354515977754,6.105899804696644,0 +-61.40452621724003,6.107521925778832,0 +-61.40568349812973,6.108741243815672,0 +-61.40760522375015,6.110865282073434,0 +-61.40844161705284,6.112465434129394,0 +-61.40955402975484,6.115607217623759,0 +-61.40970950044053,6.117009947904542,0 +-61.41043015672785,6.118484416774301,0 +-61.41155268384117,6.120290049911774,0 +-61.41403929365191,6.122636955673205,0 +-61.41484191265992,6.123127882666871,0 +-61.4168304029098,6.124563794319865,0 +-61.41930438810537,6.126881606348076,0 +-61.42091840445158,6.129409465648085,0 +-61.42179648418422,6.130602770573497,0 +-61.42371632094714,6.132566710043763,0 +-61.42545602988454,6.13461972353697,0 +-61.42639489583319,6.13527502884742,0 +-61.42759460759129,6.136239542221228,0 +-61.42929634042373,6.137488408563033,0 +-61.43170996428721,6.139124011274267,0 +-61.43265335424488,6.140243482570254,0 +-61.43324612910781,6.141560392543694,0 +-61.43402374191738,6.143863696352576,0 +-61.43395469083311,6.14470399942878,0 +-61.43416123134542,6.147410647004965,0 +-61.43406008643655,6.148519647898009,0 +-61.43297149679984,6.152953927517304,0 +-61.43255846196047,6.154460232223736,0 +-61.4318175918856,6.157772202302125,0 +-61.43136105340218,6.16123922834242,0 +-61.43062504751381,6.165095132070497,0 +-61.42989117381008,6.169938643922152,0 +-61.42964378883958,6.172577411006055,0 +-61.42939355828567,6.175212518867189,0 +-61.42930963076157,6.177867169703811,0 +-61.42811356161796,6.1786014319275,0 +-61.42590524999042,6.179813487987142,0 +-61.42355437184103,6.181160603843273,0 +-61.42216116388317,6.182581477448249,0 +-61.42020925665926,6.18395465049943,0 +-61.41887679713891,6.184679982013789,0 +-61.4171374961817,6.185230531297179,0 +-61.41549024606176,6.18619608468423,0 +-61.41480650342012,6.187377498852886,0 +-61.41369396042492,6.188819791347706,0 +-61.41273949831331,6.189984627694971,0 +-61.41134878899229,6.191235805007256,0 +-61.41016002476485,6.191971268499029,0 +-61.40853406045278,6.19296678583932,0 +-61.40759972091568,6.194007429100918,0 +-61.40574495044047,6.19596420453225,0 +-61.40290259805797,6.199527425462874,0 +-61.40067058995621,6.200901103575944,0 +-61.398196551651,6.201762571640543,0 +-61.39616630802414,6.202426910588521,0 +-61.39483474289379,6.203152517306383,0 +-61.39362634128259,6.204124597244357,0 +-61.39205826854187,6.205867897946191,0 +-61.39065217037432,6.207429228125271,0 +-61.38508973890146,6.213063049361658,0 +-61.38268189942642,6.216198752996932,0 +-61.37951374386576,6.218734797557168,0 +-61.37791408004277,6.22001774852299,0 +-61.376052771514,6.221694459238303,0 +-61.37411614770787,6.223612391484554,0 +-61.37246602462633,6.225546072957368,0 +-61.36958130032374,6.228880129336183,0 +-61.36844395093947,6.230305476852454,0 +-61.3660389577122,6.232341248853161,0 +-61.36464624819049,6.233343530215601,0 +-61.36261857314628,6.234994510943065,0 +-61.36152203418315,6.23656234261641,0 +-61.35946302850875,6.239092929713901,0 +-61.35856193193545,6.240582681562963,0 +-61.35743592352771,6.242165612293896,0 +-61.35634219463802,6.243199167376363,0 +-61.35524602203064,6.244368245308655,0 +-61.35347597040186,6.246742536336316,0 +-61.3530846095063,6.247970833182337,0 +-61.34735643662733,6.252208983573566,0 +-61.34626326245758,6.253394922209859,0 +-61.34473985504346,6.254680146224302,0 +-61.34164959547235,6.257792183449005,0 +-61.33848278763145,6.261681520384794,0 +-61.33601544261337,6.264143150576862,0 +-61.33352105546057,6.266867030872787,0 +-61.33139131841615,6.268641257688062,0 +-61.32924925645374,6.27055491597779,0 +-61.32737530103967,6.272632733626353,0 +-61.32641460749804,6.273950013772194,0 +-61.32464964900132,6.276458674362821,0 +-61.32415465637452,6.277255145649234,0 +-61.32229755822033,6.279052978322357,0 +-61.32061272704389,6.280587033395873,0 +-61.31993449102312,6.281928388779389,0 +-61.32045278304054,6.282532927543296,0 +-61.32169540927038,6.284322739876687,0 +-61.32281977744922,6.286233779631337,0 +-61.32503347575125,6.289919891529212,0 +-61.32649919693075,6.292425392208696,0 +-61.32729177245172,6.294592760077585,0 +-61.32770720908452,6.297846367351468,0 +-61.32791723182072,6.300242981765506,0 +-61.32844481656123,6.302245487043765,0 +-61.3287770426676,6.303254906374722,0 +-61.32973237536481,6.305161263647598,0 +-61.3306013203286,6.306492425188216,0 +-61.33296258087141,6.31004848948731,0 +-61.33342515240113,6.31120016169534,0 +-61.3338479727462,6.312778139599767,0 +-61.33473138227298,6.315515173185134,0 +-61.33499214215942,6.317350014097818,0 +-61.33557148716816,6.320343833100461,0 +-61.3359287171083,6.321076790060456,0 +-61.33819363704126,6.324657556163219,0 +-61.33984488353073,6.326761997232625,0 +-61.34059137015418,6.329197594157285,0 +-61.34184631383994,6.329593381071199,0 +-61.34335934178342,6.330292289510956,0 +-61.34565175985956,6.331185301104477,0 +-61.3476739771404,6.332200860780794,0 +-61.34949114884908,6.3336101606178,0 +-61.35178536460864,6.334790705331163,0 +-61.35314437931372,6.335328509825198,0 +-61.35601754052373,6.336421543636859,0 +-61.35765146830227,6.337125061012459,0 +-61.36017513722649,6.338884038304362,0 +-61.36098751085875,6.339234223414988,0 +-61.3628374907429,6.340512449168522,0 +-61.36396540500455,6.342007994180312,0 +-61.36595167895993,6.344977950503274,0 +-61.36713338899574,6.345920142289549,0 +-61.36863804097357,6.346331200366441,0 +-61.3701081318022,6.347159347535624,0 +-61.37256861675429,6.348072713843115,0 +-61.37598171759912,6.349347890703419,0 +-61.38037205224675,6.350705307841792,0 +-61.38222605117403,6.351986014636623,0 +-61.38459045528501,6.35387140591442,0 +-61.38657413685532,6.355305515039306,0 +-61.38857113782434,6.356596795457023,0 +-61.39082012625199,6.358181784866098,0 +-61.39266514227987,6.359603915697724,0 +-61.39466757071399,6.360908925165675,0 +-61.39698947975672,6.361664511870169,0 +-61.39832146861502,6.362475185262831,0 +-61.40063973210555,6.363229177428993,0 +-61.40280479216163,6.364109628157757,0 +-61.40591736766325,6.365349208797411,0 +-61.40917638424741,6.366609003048755,0 +-61.41152431095092,6.368775461721891,0 +-61.4125269089655,6.370416858716565,0 +-61.41391383997921,6.371912856951973,0 +-61.41498027372975,6.372863975666184,0 +-61.41698967829289,6.374168322611434,0 +-61.41965678453909,6.375945534557232,0 +-61.42197122959614,6.377782828121743,0 +-61.42570558678291,6.380195938968237,0 +-61.4265021916947,6.380681561090018,0 +-61.42867927777743,6.381424305465453,0 +-61.43086132008874,6.382170527224299,0 +-61.43270485730144,6.383587967283637,0 +-61.43416021480519,6.38469759534625,0 +-61.4360427365782,6.385701057858884,0 +-61.43754541951074,6.386255218300831,0 +-61.43943699910178,6.38711653803585,0 +-61.44077335711959,6.387934079681187,0 +-61.44263061497092,6.389216503977488,0 +-61.44501933421003,6.390821975313732,0 +-61.44701579633755,6.392108866725952,0 +-61.44960055021626,6.393169143060207,0 +-61.452961444698,6.394862647910503,0 +-61.45510297992537,6.396166811178836,0 +-61.45751207458321,6.397494401979833,0 +-61.45956890571765,6.399771133644747,0 +-61.46072911061125,6.400990880036553,0 +-61.46246572946386,6.401979236094183,0 +-61.46378712614868,6.404467960501367,0 +-61.46462151468881,6.406219234298397,0 +-61.46590281447018,6.407586193401893,0 +-61.46787194913063,6.409445852785736,0 +-61.46985495695295,6.410875709138997,0 +-61.47131872221436,6.411988835971575,0 +-61.47334799458459,6.413008118937433,0 +-61.47442811458747,6.413521063900541,0 +-61.47623076344816,6.415499655239786,0 +-61.47762572701571,6.417008808440065,0 +-61.4814591951565,6.421870003024619,0 +-61.48222508589101,6.422779131176951,0 +-61.48754975828673,6.427858952876684,0 +-61.49180607768876,6.432284129348667,0 +-61.49488178192692,6.435767684717801,0 +-61.49592667811369,6.43669797791183,0 +-61.49768237206056,6.437550089633458,0 +-61.4995493823856,6.438691487933796,0 +-61.50115711923196,6.439670850082035,0 +-61.50260267831119,6.440916703111785,0 +-61.50376595503642,6.442138090824745,0 +-61.50622499122535,6.444734543802814,0 +-61.50740962185166,6.445677420597003,0 +-61.50819962850615,6.446306089517328,0 +-61.5092812488699,6.44681986842452,0 +-61.51219952199378,6.448893740114537,0 +-61.51351345762232,6.449988384276673,0 +-61.51551393193528,6.451282413037067,0 +-61.51617684764688,6.451760166742885,0 +-61.51800961861588,6.45331831183846,0 +-61.51877298483287,6.454223678565166,0 +-61.52000627764826,6.458128232214289,0 +-61.52612363251196,6.463950868602489,0 +-61.5280413250601,6.466219154277293,0 +-61.530197128306,6.468939497317556,0 +-61.53219428384735,6.471789675607744,0 +-61.53446175012636,6.473374236577497,0 +-61.53673058846498,6.474963129340893,0 +-61.53829650434916,6.476496435157703,0 +-61.54037964073517,6.478500953969206,0 +-61.54323662687608,6.481548336948066,0 +-61.54444278608273,6.482353472970882,0 +-61.54508201715664,6.483111334561968,0 +-61.54507538676227,6.484795967925716,0 +-61.54631235134515,6.488274258179592,0 +-61.547180208176,6.489612853640632,0 +-61.54854870367161,6.491696282808295,0 +-61.54999585568408,6.494203714431854,0 +-61.55135572163976,6.496282711544,0 +-61.55166005744854,6.497712340852261,0 +-61.55304859757234,6.501342196724703,0 +-61.55368785141687,6.50378453567027,0 +-61.55451764369295,6.505683623594571,0 +-61.55506191313878,6.5074098535003,0 +-61.55536452397489,6.508694590987377,0 +-61.5569448223602,6.511638525671131,0 +-61.55712057295813,6.51291940265587,0 +-61.55746993114325,6.513792799676005,0 +-61.55850410219762,6.516227718934838,0 +-61.55934798298765,6.517850138711301,0 +-61.56047300836084,6.521044441364976,0 +-61.56283511708796,6.524739481851785,0 +-61.56426390015172,6.526126184427516,0 +-61.5644276702063,6.527406112703531,0 +-61.56521901216809,6.529577982706018,0 +-61.56598700396495,6.532162980698154,0 +-61.56710005195988,6.535622552032613,0 +-61.56861806970144,6.53757572310532,0 +-61.5701708698869,6.539110392114011,0 +-61.57249825664382,6.541410575690279,0 +-61.57441131664095,6.543821038794092,0 +-61.5752998688758,6.545021802501125,0 +-61.57584857745148,6.546748574685133,0 +-61.57672175708539,6.549624974179015,0 +-61.57718316104554,6.552471118912489,0 +-61.57709668005604,6.555130826425522,0 +-61.57731364480049,6.557536695827983,0 +-61.57799135680463,6.559414095430915,0 +-61.57905946648921,6.561447116978127,0 +-61.58004605465338,6.564609018966368,0 +-61.5807174346854,6.567093985945494,0 +-61.58144621012242,6.571799579917553,0 +-61.58166612495395,6.572520954389603,0 +-61.58224317439816,6.573971825334421,0 +-61.58367819907648,6.576898483236526,0 +-61.58378174215088,6.577328366488481,0 +-61.58520660692479,6.582182346081036,0 +-61.58535264141503,6.583737758958382,0 +-61.58539453087569,6.587953629417522,0 +-61.58540929963496,6.590763288780625,0 +-61.58526591225311,6.592292648179702,0 +-61.58469418026542,6.593923154291695,0 +-61.58326452438762,6.597579652268345,0 +-61.58244926931485,6.600450562021463,0 +-61.58192241330569,6.603350934586919,0 +-61.58170966827331,6.605711620160116,0 +-61.58180702258184,6.609207719857729,0 +-61.58236118420492,6.612470214661476,0 +-61.58311842120705,6.615052199014182,0 +-61.58422757011284,6.617131899645967,0 +-61.58465572295688,6.618867671054943,0 +-61.58539224770128,6.622048008267612,0 +-61.58578958636641,6.623900468543577,0 +-61.58630144795136,6.626041120417925,0 +-61.58706541119605,6.628477753703633,0 +-61.58845746316707,6.631651370820158,0 +-61.58992070193985,6.634464000067334,0 +-61.59117735134582,6.639369198357132,0 +-61.59199130798461,6.641390965907839,0 +-61.59294378148891,6.645104872470727,0 +-61.59416557596831,6.648989522775791,0 +-61.59488389188477,6.650453491540138,0 +-61.59576654999508,6.651651332703742,0 +-61.59737967037753,6.654173967653675,0 +-61.59833607357701,6.657761499424094,0 +-61.59894671168289,6.660478928652617,0 +-61.59965349304415,6.662082622491501,0 +-61.60053077073205,6.664963164295274,0 +-61.60129033609866,6.667551655207329,0 +-61.6018552062217,6.669141667731602,0 +-61.60307322855155,6.671501355125608,0 +-61.60425993054083,6.674133689126171,0 +-61.60507748592497,6.676175988618268,0 +-61.60600063768273,6.678651377982054,0 +-61.60658858736026,6.679962023349526,0 +-61.60713544902933,6.681839312802065,0 +-61.60884064441603,6.68493269796823,0 +-61.61005847691667,6.687141946436861,0 +-61.61108340589356,6.689580198200305,0 +-61.6119818509468,6.6926471109745,0 +-61.61271447183118,6.694131500031346,0 +-61.61284333127398,6.694284069961252,0 +-61.61208119234932,6.699758835485317,0 +-61.61111618399875,6.701080776745934,0 +-61.61026714432287,6.702693348201144,0 +-61.60944238478901,6.704026677209018,0 +-61.60941164205188,6.705992638793007,0 +-61.60861101362307,6.707047161053749,0 +-61.60787825152501,6.70895192776217,0 +-61.60784170497151,6.709370383308874,0 +-61.60685280263522,6.710970896332276,0 +-61.60569007627402,6.714526399105122,0 +-61.60590997400488,6.715248118438495,0 +-61.60647101353477,6.718530683973162,0 +-61.60746637013406,6.721708551326595,0 +-61.60773505924497,6.721872557148128,0 +-61.6090908409312,6.722553175189545,0 +-61.61263241040711,6.724118267844204,0 +-61.61349918184094,6.72391097102253,0 +-61.6158306196212,6.723126924996292,0 +-61.61784770199311,6.722743970724376,0 +-61.61973344100431,6.722202853394105,0 +-61.62343747017039,6.721813463120733,0 +-61.62575591269694,6.721171204108829,0 +-61.6266599375409,6.720547809057207,0 +-61.628761274744,6.719185727716789,0 +-61.63022629936146,6.718610302457145,0 +-61.63270053213097,6.717986186056316,0 +-61.63525815191634,6.717927634697078,0 +-61.63495591420325,6.719728022954928,0 +-61.63288054764307,6.722210791594665,0 +-61.63221056859411,6.723417778891689,0 +-61.63188144596264,6.725641393782326,0 +-61.6309226281882,6.728358314290996,0 +-61.63061001901303,6.730144107823013,0 +-61.63021187701882,6.731517688348761,0 +-61.62936309922605,6.734820046418217,0 +-61.62897886045949,6.737595608788564,0 +-61.6282594062674,6.739359834470137,0 +-61.62759533974821,6.742113179208987,0 +-61.62701490295802,6.743887480644269,0 +-61.62617723491838,6.745356287899017,0 +-61.62521223716438,6.74650503982699,0 +-61.62414689184904,6.748925940145107,0 +-61.62338730158614,6.751271177537657,0 +-61.6233161275332,6.752113820855102,0 +-61.62128694477795,6.757649724435148,0 +-61.62071937583087,6.759285615932712,0 +-61.61938322578247,6.763241715729152,0 +-61.61791685715617,6.767049141868711,0 +-61.61608830914814,6.770125550312294,0 +-61.61486970512586,6.772692832067908,0 +-61.61385197125642,6.776253166436386,0 +-61.61329794134605,6.779297156674138,0 +-61.61270334480951,6.781211900814502,0 +-61.61148960392385,6.783772604832915,0 +-61.61011781863245,6.786601017274173,0 +-61.60924546319585,6.788492029013985,0 +-61.60835941370323,6.790521533109244,0 +-61.60757752046147,6.792981227002101,0 +-61.60697322878713,6.795035963636598,0 +-61.6063677301907,6.797086263229951,0 +-61.60573854600143,6.799416199642327,0 +-61.60534159475625,6.802330350403767,0 +-61.60561591045596,6.804039665366638,0 +-61.60612204815388,6.80633121181987,0 +-61.60626833357393,6.807889387439922,0 +-61.6070061598151,6.810761758057436,0 +-61.60772029892491,6.813917905686191,0 +-61.60820770538206,6.818031984189673,0 +-61.60819409045564,6.82139490512169,0 +-61.60777631306891,6.826113394335277,0 +-61.60853322792839,6.827168082598202,0 +-61.60963909135821,6.829103331528056,0 +-61.60962709304337,6.82924437657473,0 +-61.6083300503299,6.835866062256374,0 +-61.60815912073856,6.839359055154273,0 +-61.60835725878213,6.841899399798841,0 +-61.60851717714799,6.845000385378768,0 +-61.60853408060098,6.846403948546406,0 +-61.6087215911003,6.849084302354004,0 +-61.60888617507084,6.852044328710171,0 +-61.60938106573103,6.854473502475601,0 +-61.61080540542387,6.857697380690317,0 +-61.61224369795279,6.860627903130154,0 +-61.61328491319563,6.863242299683086,0 +-61.61378952254558,6.865529619536327,0 +-61.61398509796325,6.868063530223444,0 +-61.61383365605625,6.869724985614265,0 +-61.6135044548555,6.871788477305035,0 +-61.61322877571315,6.873304227303612,0 +-61.61312816049242,6.874410290909289,0 +-61.61319768720405,6.875263659817933,0 +-61.61217752646677,6.878989529725873,0 +-61.61180108673518,6.883134030929932,0 +-61.61204703035602,6.883583175628107,0 +-61.61296058552376,6.889188180869878,0 +-61.6131904750197,6.892993026142013,0 +-61.61322285559086,6.894256331460904,0 +-61.61355111201605,6.896948097263186,0 +-61.61382031951528,6.900196553691725,0 +-61.6142959661617,6.904440789475117,0 +-61.61487251784816,6.90757409261643,0 +-61.61502210358464,6.909129640311614,0 +-61.61515605518113,6.910823245648996,0 +-61.61499234984337,6.912628903968248,0 +-61.61498175286096,6.914307284053896,0 +-61.61504866185782,6.916691101586035,0 +-61.61520364177146,6.918102988858154,0 +-61.61531052175582,6.921606319808919,0 +-61.6153608498483,6.925806556915182,0 +-61.61549326497508,6.927496343292924,0 +-61.61556387182495,6.929879350637502,0 +-61.61594423607424,6.933547820441167,0 +-61.61639007000606,6.936686241471175,0 +-61.6165460501427,6.938096853429291,0 +-61.61669789666792,6.93950040317091,0 +-61.61706622136099,6.941777763620212,0 +-61.6171315053613,6.94431184157288,0 +-61.61667133609224,6.948300232477447,0 +-61.61681351598936,6.951807271648987,0 +-61.61686908622267,6.954339095247293,0 +-61.61666830550439,6.956429611403218,0 +-61.61666512688543,6.958249857338998,0 +-61.61697341243306,6.959817771404972,0 +-61.61697836042114,6.961362477353179,0 +-61.61684293186889,6.962894944239371,0 +-61.61618144594607,6.965503925005446,0 +-61.61395286738332,6.96994199903112,0 +-61.60931075736664,6.979214895506674,0 +-61.60860021734374,6.982370569559031,0 +-61.60850644442591,6.983334976587394,0 +-61.60760028688458,6.987019473666739,0 +-61.60652196685758,6.989735841034848,0 +-61.60545150345327,6.992470151290572,0 +-61.60481292040476,6.994942044377059,0 +-61.60437352208019,6.996726272160864,0 +-61.60412914435449,6.999509113112277,0 +-61.60396844845562,7.001313049041298,0 +-61.60375380994297,7.002132512946327,0 +-61.60123011032486,7.006654493662647,0 +-61.60030516696371,7.00910339643989,0 +-61.59942112020796,7.011128933724018,0 +-61.59870188049495,7.012888042935459,0 +-61.59803692800174,7.015632669015515,0 +-61.59711651854313,7.018074651189139,0 +-61.59636062887653,7.020250596393214,0 +-61.59603699823266,7.02232389073058,0 +-61.59544564327394,7.024233719004282,0 +-61.59486722630751,7.02600397040415,0 +-61.59417366203162,7.027483882983889,0 +-61.59357116365061,7.029532217181012,0 +-61.59257635902805,7.031265087279666,0 +-61.59165136053799,7.033708434648617,0 +-61.59106915136671,7.035479100484867,0 +-61.59063450269428,7.037262180012147,0 +-61.59017379924125,7.039324410889045,0 +-61.58911161979047,7.041753408868709,0 +-61.58836680810127,7.043788824264404,0 +-61.58759907133054,7.046103611431687,0 +-61.58749058673483,7.047357535391033,0 +-61.58686801811839,7.049699344586088,0 +-61.58608419630313,7.052145761942286,0 +-61.5837039347946,7.0583250729683,0 +-61.58233918396233,7.061006956301107,0 +-61.58097394689955,7.063690581382637,0 +-61.5798756909514,7.066544901586383,0 +-61.57928478048825,7.068452136424933,0 +-61.57873014390355,7.069944618441356,0 +-61.57810199357622,7.072274058732376,0 +-61.57681608587966,7.075664195488653,0 +-61.57664500645553,7.077609577791566,0 +-61.5763583617397,7.079266612153097,0 +-61.57584654397301,7.081885411126639,0 +-61.57507867229889,7.084199185734783,0 +-61.57453629999236,7.085552535378811,0 +-61.57366485422431,7.087437722522039,0 +-61.57280555058012,7.089184111727909,0 +-61.57187265385594,7.09176490028631,0 +-61.57114091730289,7.093662981644418,0 +-61.57040908930252,7.09556129484166,0 +-61.56999409378179,7.09706691050859,0 +-61.569274368435,7.098826532424548,0 +-61.56820075038818,7.101396777723352,0 +-61.5678469303866,7.102207232680749,0 +-61.56721797755285,7.104536214875611,0 +-61.56707062888352,7.106206324663184,0 +-61.56514482834791,7.108839231606082,0 +-61.56503448991074,7.110089971642377,0 +-61.56469823606537,7.112301857803914,0 +-61.5641103476014,7.114220781299404,0 +-61.56352111894078,7.116134720259883,0 +-61.56275601434194,7.118453323729816,0 +-61.56164160419478,7.121431954051829,0 +-61.56035702703819,7.124823718215548,0 +-61.56009515426049,7.126201849303397,0 +-61.55960803556744,7.12854084607013,0 +-61.55873211885986,7.132106248038745,0 +-61.55848591762888,7.134885851163761,0 +-61.55814429395108,7.135556595540889,0 +-61.55527487877171,7.139232053831759,0 +-61.55522536565748,7.139788428344977,0 +-61.55496100991806,7.141167578591789,0 +-61.55432861156298,7.143497409827485,0 +-61.5534433603576,7.145523617122667,0 +-61.55253718801367,7.147825605217121,0 +-61.55196708114776,7.149460307889144,0 +-61.55061736869425,7.152002486602957,0 +-61.55001619595625,7.154049579452357,0 +-61.54969531211768,7.156120574948838,0 +-61.5495354295639,7.157929008073864,0 +-61.54919978843412,7.16014136149524,0 +-61.54892613398724,7.161657495638896,0 +-61.54836189324824,7.163285980588392,0 +-61.54795690652067,7.164655032949145,0 +-61.54720073178289,7.166831040142651,0 +-61.54617692373952,7.168843209159674,0 +-61.54553120143899,7.16976737140327,0 +-61.54407478948885,7.171882126135759,0 +-61.54333061472233,7.17391931630005,0 +-61.54329378363446,7.174336609191895,0 +-61.54107218334827,7.178782340534506,0 +-61.54088854675445,7.180867290404716,0 +-61.5399672664871,7.183308475300589,0 +-61.53979037486674,7.183713332278769,0 +-61.53825489429458,7.185121115452639,0 +-61.53551271163334,7.187404811937999,0 +-61.53458630804595,7.188305036648545,0 +-61.53364756739551,7.189344267889481,0 +-61.5332442018767,7.190710034422961,0 +-61.53289933265857,7.193061088815002,0 +-61.5336210170998,7.194523727040569,0 +-61.53407413176728,7.195822880087069,0 +-61.53450322440235,7.197399672025991,0 +-61.53453338857619,7.200340566547879,0 +-61.53435465682699,7.202423217009531,0 +-61.53425935475939,7.203533725039894,0 +-61.53411642216899,7.205199179153992,0 +-61.53396161531593,7.207003005471543,0 +-61.53419388843599,7.209124537242353,0 +-61.53502450448917,7.212683928766887,0 +-61.53706073173271,7.213560871038971,0 +-61.53711462421617,7.214545161906376,0 +-61.53657367706077,7.215896349345624,0 +-61.53457656545828,7.217817220800155,0 +-61.53192695187492,7.219123632692543,0 +-61.53009702002208,7.219104221830393,0 +-61.52742285912545,7.219015329803803,0 +-61.52529799613241,7.219112252302882,0 +-61.52294514088462,7.218496059742758,0 +-61.52177039916076,7.217415468525508,0 +-61.52024697943022,7.215466403139561,0 +-61.5191426134099,7.213553761375256,0 +-61.51870149325013,7.212118011881441,0 +-61.51866629537443,7.209181451100514,0 +-61.51822342864354,7.207745415097948,0 +-61.51595939152541,7.206287247194002,0 +-61.51568117027665,7.20626252707252,0 +-61.50828410152604,7.206881331073185,0 +-61.5076517984313,7.207668365064899,0 +-61.50690396324093,7.208165007204712,0 +-61.50598833670072,7.210609687640768,0 +-61.50509667588281,7.212773530094257,0 +-61.50467142547984,7.214415413402542,0 +-61.50379515346713,7.216293670445771,0 +-61.50318343968701,7.218479921853772,0 +-61.50277797310332,7.219842398228002,0 +-61.50241223125109,7.222468466305667,0 +-61.50247560380456,7.224989935552768,0 +-61.50274889120631,7.226690777039011,0 +-61.50332642139463,7.228138272691174,0 +-61.50375144242089,7.229712417086054,0 +-61.5043161708631,7.231298719169213,0 +-61.50596297809532,7.233397852379293,0 +-61.50711317716802,7.234753014953596,0 +-61.50849418395299,7.236685455585541,0 +-61.51028125091629,7.238792005976165,0 +-61.51166032730202,7.24072355164476,0 +-61.51272082244777,7.243057637405805,0 +-61.51373355981899,7.245946787916125,0 +-61.51422428512007,7.248373304984594,0 +-61.51471025212191,7.249256092779177,0 +-61.51542709783384,7.250720736503668,0 +-61.516527313942,7.252645470295287,0 +-61.516970370665,7.255622300546884,0 +-61.51706694786368,7.257729265645082,0 +-61.5173577146135,7.260827856075203,0 +-61.51737538486741,7.262226462805843,0 +-61.51729527218148,7.264734293700568,0 +-61.51657675792101,7.266489998551743,0 +-61.51448009682568,7.271084396966194,0 +-61.5137010598911,7.273531308441201,0 +-61.51347652749279,7.274486040600729,0 +-61.51305667720484,7.277661314620478,0 +-61.51276964274074,7.279316890284051,0 +-61.51235460041823,7.280822699003225,0 +-61.51206746382447,7.28247879665374,0 +-61.51125092744454,7.285345775428597,0 +-61.51095212466453,7.287137959146023,0 +-61.51067774078172,7.288652673459633,0 +-61.5102511565624,7.290294181997694,0 +-61.50948346435317,7.292605795289343,0 +-61.50906899215635,7.294108844598602,0 +-61.50874528085559,7.296180541541108,0 +-61.50855632524573,7.296724002231938,0 +-61.5075256801963,7.300414325308634,0 +-61.50714050655442,7.303182043258404,0 +-61.50755324144908,7.304900965954338,0 +-61.50794127501314,7.306901556695673,0 +-61.50832496024682,7.307355140964006,0 +-61.50964078585702,7.308447688254438,0 +-61.51154637051251,7.310845536315171,0 +-61.51240506294395,7.312325360230131,0 +-61.51298200967266,7.313764980083906,0 +-61.51399770962492,7.316651799574818,0 +-61.51515297039406,7.319547872101089,0 +-61.51673712124295,7.320812263075735,0 +-61.51877186766568,7.32167019961002,0 +-61.52098505896207,7.322135760614223,0 +-61.52341826809635,7.323324551536754,0 +-61.52505047198812,7.324029049354133,0 +-61.52531867688649,7.32419322975028,0 +-61.52670622262989,7.324453384436906,0 +-61.5312766653244,7.325409124098692,0 +-61.53252412178017,7.325656897676157,0 +-61.53470595074894,7.326549913578263,0 +-61.53569140336913,7.326642595325868,0 +-61.53856285833206,7.327426336814039,0 +-61.54221924454761,7.328633553563359,0 +-61.54320448911452,7.328717533916078,0 +-61.54517388090171,7.328885395462408,0 +-61.54684307293014,7.329031804205854,0 +-61.54864699471438,7.329191370888953,0 +-61.55200210785146,7.329754814626018,0 +-61.55452063953313,7.33010746935818,0 +-61.55767888417897,7.330941388760011,0 +-61.56166205262139,7.331988440627195,0 +-61.56387260045756,7.332460147950895,0 +-61.56631203259142,7.333512876745795,0 +-61.56904289756999,7.334578248710984,0 +-61.57165808966387,7.335229472360478,0 +-61.57639903478459,7.335780557125558,0 +-61.57751750525921,7.33587503684294,0 +-61.5788421287558,7.336826771746889,0 +-61.58081289044966,7.338379037410093,0 +-61.58290491934854,7.340245312767618,0 +-61.58469029973617,7.34083006200891,0 +-61.58671302497856,7.340312850427468,0 +-61.58901436273823,7.339815421447129,0 +-61.59106862416401,7.338872457551306,0 +-61.59190569070051,7.338942783109442,0 +-61.59383257903369,7.339383345885955,0 +-61.59574323434553,7.340108920347403,0 +-61.59738963095082,7.340674013500395,0 +-61.60028792754218,7.341490033550281,0 +-61.60224166378478,7.341802952796368,0 +-61.60418440794886,7.342254959685394,0 +-61.6062567999704,7.3428586477594,0 +-61.6084590960014,7.343614195921266,0 +-61.61025255755647,7.344193678072155,0 +-61.61304432630736,7.344575599620916,0 +-61.62345153249892,7.345890769131095,0 +-61.62718247936665,7.346774622380956,0 +-61.63012181455306,7.347163461805262,0 +-61.63219573842148,7.347756829663513,0 +-61.63635608553172,7.348800992331334,0 +-61.6399462936071,7.349540316866997,0 +-61.64228280906226,7.350168544265458,0 +-61.64547789341625,7.350726167552224,0 +-61.64947006818016,7.351904751283701,0 +-61.65151123723746,7.352777023433829,0 +-61.6569895832276,7.354647918850797,0 +-61.66171272092672,7.355477985292366,0 +-61.66560788575357,7.356087819328162,0 +-61.66883229455564,7.356385111099393,0 +-61.6717609090579,7.356775050379425,0 +-61.67608640704771,7.357280042013939,0 +-61.68028134818027,7.357947462560606,0 +-61.68234291921016,7.358695373738926,0 +-61.68436027525529,7.359849372004133,0 +-61.68760023708086,7.361526166284674,0 +-61.69080301433628,7.362084975527708,0 +-61.69375050969154,7.362341738499055,0 +-61.69459275817116,7.362415104131805,0 +-61.69655817709109,7.362586303344318,0 +-61.69738789259967,7.362798340056756,0 +-61.69976656880738,7.362999302564573,0 +-61.70319239678841,7.36259177926113,0 +-61.70610174198863,7.363261441974572,0 +-61.70916924156084,7.363797672412195,0 +-61.71168881957384,7.364019101083568,0 +-61.71502039431155,7.364720888867692,0 +-61.71943614602208,7.365934038364473,0 +-61.72303973206169,7.366673091058425,0 +-61.72679743352346,7.367287105142249,0 +-61.72873595064526,7.367734795816687,0 +-61.73122320752148,7.368369955944256,0 +-61.73290585452858,7.368512716360217,0 +-61.73553284207109,7.369152338402333,0 +-61.73744638933971,7.369875332083557,0 +-61.74047018924836,7.370840749428016,0 +-61.74282971335433,7.371326504809498,0 +-61.74415890218937,7.372282333259905,0 +-61.74682777159638,7.37404986784334,0 +-61.74836049494942,7.374328620370653,0 +-61.75076926054762,7.374257194945447,0 +-61.75175026518286,7.374340586348907,0 +-61.75443737978531,7.374289486330506,0 +-61.7588317589625,7.374106309076019,0 +-61.75971017156436,7.373762529322816,0 +-61.76130211141854,7.373340334324563,0 +-61.76258871532097,7.373171256401478,0 +-61.76429585287159,7.373038197305644,0 +-61.76597847263641,7.373183034187744,0 +-61.76868173452769,7.372997793432739,0 +-61.7775571487643,7.373339333709266,0 +-61.78279840996749,7.373224720079524,0 +-61.78802952236884,7.373367530140737,0 +-61.78913934090205,7.373478639456939,0 +-61.80129209068971,7.38226044631412,0 +-61.81498835925342,7.385586783720638,0 +-61.82295985052909,7.386828777790615,0 +-61.83034720065773,7.388529453816425,0 +-61.83412739055785,7.38830926447061,0 +-61.8444451746133,7.387041350029578,0 +-61.85009802275334,7.390205577647451,0 +-61.85329379531287,7.396896940815729,0 +-61.85381534446468,7.403356983107867,0 +-61.85624788679451,7.412659349894151,0 +-61.86024964324977,7.416211449221887,0 +-61.8631355472985,7.420200864852847,0 +-61.86865114412853,7.424953777502775,0 +-61.87246804675522,7.430625746888059,0 +-61.87495811507245,7.432978277500879,0 +-61.88100080470306,7.437765842465891,0 +-61.88588108548708,7.443521082118335,0 +-61.88839062213398,7.451741912590069,0 +-61.89085906937631,7.460499491724352,0 +-61.8989147753361,7.467078238134826,0 +-61.90045131897172,7.474152044523433,0 +-61.89897832156826,7.484688018407852,0 +-61.89704650958195,7.488253969817238,0 +-61.89416066648874,7.496537635450952,0 +-61.89136832822199,7.50376108796569,0 +-61.89036992011444,7.515460017816373,0 +-61.88861664534349,7.528370011657479,0 +-61.89703025178475,7.537096049884062,0 +-61.90436564522118,7.539325428798759,0 +-61.91360063761118,7.544384742571046,0 +-61.91705543028748,7.547881317579497,0 +-61.92232473190538,7.555267721672995,0 +-61.92825195260878,7.561649266719891,0 +-61.93346838251488,7.570108399002244,0 +-61.93600340697386,7.578337999687063,0 +-61.93747219510321,7.580066395173691,0 +-61.94325110454206,7.58997720832272,0 +-61.95112334943831,7.598668617854259,0 +-61.95729377060471,7.608274206681473,0 +-61.95851307293435,7.61905048737449,0 +-61.96077157644765,7.624045896150927,0 +-61.95977814391409,7.629295411335828,0 +-61.95725705794073,7.639747632206944,0 +-61.95696450425718,7.64932269018139,0 +-61.95810637830687,7.654753237850424,0 +-61.95839140033097,7.663843199781478,0 +-61.96174361083987,7.674794848715247,0 +-61.96286673071285,7.686621855367657,0 +-61.96141384228545,7.697159938190345,0 +-61.95783902546374,7.701120854476684,0 +-61.9515894786401,7.704855993277479,0 +-61.94484995913488,7.708017044524218,0 +-61.940646608717,7.712992395799934,0 +-61.93479240231412,7.718361290932445,0 +-61.93058855575192,7.723336988707159,0 +-61.92848049559244,7.729021520455716,0 +-61.92891125063741,7.736517577639413,0 +-61.93112874066082,7.742032478715646,0 +-61.9334223014195,7.752880609095214,0 +-61.93131236436653,7.758564974589137,0 +-61.93080786001738,7.764382849235071,0 +-61.93257133389191,7.768804361243567,0 +-61.93855362440822,7.774133760334461,0 +-61.94428552472022,7.776234619192143,0 +-61.95473627957257,7.779804094677307,0 +-61.960737836844,7.785106854013938,0 +-61.96580529057537,7.788736965203825,0 +-61.97033968971758,7.792317185937338,0 +-61.97887309113774,7.799430318094805,0 +-61.97890529314085,7.805278601530809,0 +-61.97361801171293,7.810594721212524,0 +-61.966220257027,7.815282063302964,0 +-61.95839636742247,7.831327619617065,0 +-61.95923900037116,7.840502188665513,0 +-61.9640433362742,7.853147899133318,0 +-61.96962184839829,7.856795032810022,0 +-61.97490474547543,7.857765714811108,0 +-61.97576946737769,7.86636059661063,0 +-61.97521127028421,7.872689441590929,0 +-61.97530069575085,7.883864043329489,0 +-61.97621311650437,7.891936803321745,0 +-61.97789025444667,7.897410230116757,0 +-61.9826755892725,7.90421157770273,0 +-61.98706570565798,7.909381241649668,0 +-61.99786317905657,7.915098521682685,0 +-62.00440505958846,7.914059545481914,0 +-62.01001898343245,7.911343393433697,0 +-62.01584372415834,7.90011687262948,0 +-62.02072153038931,7.893599692203734,0 +-62.02658000234202,7.900494686904475,0 +-62.03266859896184,7.904745015099103,0 +-62.04283581995738,7.911477218028523,0 +-62.04664851336685,7.917131460180901,0 +-62.05038433899126,7.917450222490969,0 +-62.05679350206585,7.91799680088385,0 +-62.06266990336869,7.918497908498093,0 +-62.07126432675451,7.918697632216531,0 +-62.07937078975462,7.918322628292777,0 +-62.08743219460199,7.918476496172769,0 +-62.09816961898942,7.918857941460213,0 +-62.11101093237382,7.919950743204899,0 +-62.1168524925809,7.920980846107637,0 +-62.12488205811847,7.921663910974364,0 +-62.12809292766423,7.921937022415046,0 +-62.14649077591894,7.917106614708753,0 +-62.16808038007564,7.909874179939521,0 +-62.18452180612527,7.906471015902136,0 +-62.19513867743372,7.902042317781901,0 +-62.1994615995618,7.901877302378826,0 +-62.20833530304317,7.898900404872102,0 +-62.21119099465861,7.897010714094189,0 +-62.21966742128237,7.892402482866771,0 +-62.23116426506451,7.890183366075997,0 +-62.24305519894629,7.889593243066165,0 +-62.2532975492975,7.889399487474638,0 +-62.26184397463066,7.89012975140496,0 +-62.2708309305219,7.891963663645905,0 +-62.27705612605254,7.894624908302282,0 +-62.28091553980884,7.899750590405115,0 +-62.27867264212808,7.907021716634294,0 +-62.277004734915,7.913813084210672,0 +-62.27992976500713,7.917260651654276,0 +-62.28396590334521,7.920269504525661,0 +-62.29293209144232,7.927966249447082,0 +-62.29380701509805,7.930170011670076,0 +-62.29894131713279,7.939112895866501,0 +-62.31127013574196,7.950778733008788,0 +-62.31808062370565,7.959330779700149,0 +-62.3276561813992,7.972899055455088,0 +-62.33719726082729,7.980619588292946,0 +-62.34309516760701,7.986967173296168,0 +-62.35086460511138,7.990283827396139,0 +-62.35933202805795,7.990974825436458,0 +-62.37427030600367,7.993344609054246,0 +-62.38414829966813,7.997378076296084,0 +-62.38968238976644,8.001563562299165,0 +-62.39602765720051,8.009015103907581,0 +-62.39745205578792,8.011265528697464,0 +-62.40695962776353,8.023369950591952,0 +-62.41184152745122,8.028590921616676,0 +-62.41112547352569,8.030655981047497,0 +-62.40405488103399,8.032161436471705,0 +-62.39715314706713,8.037429796542236,0 +-62.39726574724557,8.042227139855679,0 +-62.40408121520357,8.050240054291384,0 +-62.40493891860575,8.052966557475205,0 +-62.40422436725537,8.061950690142806,0 +-62.40145539294966,8.069170214506615,0 +-62.40010426153074,8.072244393768498,0 +-62.39647637762229,8.076714071355509,0 +-62.39132777915582,8.086956174485744,0 +-62.39087056662857,8.092239309960148,0 +-62.39508181823921,8.099513087659179,0 +-62.40116087501348,8.103739563568332,0 +-62.40867657909541,8.110242615124134,0 +-62.41182721111282,8.123845552211698,0 +-62.41631398743108,8.134360932718938,0 +-62.42503441862839,8.145773597804377,0 +-62.43389453790709,8.155601460288841,0 +-62.440713888349,8.16419858138655,0 +-62.4458865774715,8.173193585192083,0 +-62.44674808351002,8.182381056698651,0 +-62.45227678398425,8.187125998034851,0 +-62.46049581792239,8.192117521494605,0 +-62.47217818807849,8.201776437407471,0 +-62.48087783240076,8.207911847616689,0 +-62.49162000304898,8.210005395209183,0 +-62.49634924111354,8.211997477978791,0 +-62.5105007638617,8.222792537191014,0 +-62.51844264838744,8.236830201476657,0 +-62.52490216287894,8.243264711516691,0 +-62.52900701392357,8.245754762035054,0 +-62.53342190597379,8.250951338921157,0 +-62.53846810740494,8.255137712783661,0 +-62.54508113975417,8.259981821688283,0 +-62.55223167844331,8.264866553511128,0 +-62.55893542465108,8.26863845434301,0 +-62.56456546508267,8.272319663554018,0 +-62.57122997124164,8.276634357220935,0 +-62.58128558847132,8.285507764240947,0 +-62.58910815167842,8.295270714151796,0 +-62.5905873709001,8.297007740690095,0 +-62.60027162906488,8.304280416484891,0 +-62.60596222543968,8.307446191813428,0 +-62.61039062673982,8.312640114380589,0 +-62.61961866135516,8.318782710679967,0 +-62.62594955278882,8.327380149933237,0 +-62.62735107434033,8.336043177636634,0 +-62.63256616565438,8.349739358322083,0 +-62.63548694191675,8.353753051989635,0 +-62.6409380747202,8.360155093351134,0 +-62.64835394286349,8.363014022361062,0 +-62.65094082698856,8.364882136973593,0 +-62.65360213868625,8.37270032909697,0 +-62.6660852226533,8.381601808410348,0 +-62.67127977886194,8.384180650498299,0 +-62.68068760369428,8.388182457995645,0 +-62.68408878451274,8.392752720980244,0 +-62.68497472741009,8.401399397734448,0 +-62.68814832562809,8.408628821061695,0 +-62.69042826144778,8.413638121126731,0 +-62.69472227590521,8.420420033392439,0 +-62.70299750912076,8.431276978234468,0 +-62.70728847691135,8.438051832015095,0 +-62.71144461184606,8.446430478829805,0 +-62.71739074190074,8.459253413402033,0 +-62.71979379089645,8.469074597621258,0 +-62.72130407993809,8.476681053919975,0 +-62.72335347674434,8.484338455082378,0 +-62.72526971956444,8.493601516447191,0 +-62.7259364353127,8.498476416196153,0 +-62.7269593003742,8.505523167756184,0 +-62.72856456110127,8.512081390274856,0 +-62.73133539876115,8.517665378398025,0 +-62.7358024733274,8.528744597867322,0 +-62.73740830303619,8.535303929464021,0 +-62.73761653221222,8.545170873135891,0 +-62.74217032972144,8.555183059748197,0 +-62.74743438912991,8.569534377196783,0 +-62.74925741523985,8.5798517364211,0 +-62.75582527535239,8.591634328859863,0 +-62.75850272293361,8.598277319963618,0 +-62.76108922066199,8.605982248684969,0 +-62.76310352175939,8.614175635095195,0 +-62.76507336774653,8.62290188786843,0 +-62.76542953954898,8.637918162990593,0 +-62.76493552477803,8.643765469648143,0 +-62.76533779067277,8.65183033641439,0 +-62.76704667424841,8.663759738760822,0 +-62.76929424406682,8.669309380012882,0 +-62.77170205236584,8.679144727795192,0 +-62.77288619806355,8.690472423683373,0 +-62.77260179225339,8.700077480945533,0 +-62.77152703971316,8.706418367467689,0 +-62.76870720360632,8.714225966878139,0 +-62.76772176143307,8.719504756314675,0 +-62.76637704680267,8.72904278643122,0 +-62.766152903886,8.731705130386148,0 +-62.76678083730003,8.737120531462137,0 +-62.76655672887586,8.746219619077754,0 +-62.76283224309164,8.758243130900158,0 +-62.75866705507159,8.768420944867037,0 +-62.75838130883208,8.784457683892484,0 +-62.75693165255669,8.801467241457376,0 +-62.75566627092786,8.809927655938225,0 +-62.75308957476884,8.820955683920014,0 +-62.7504307465579,8.83304571003274,0 +-62.74885098535003,8.845226066040473,0 +-62.7481720791688,8.853199520479123,0 +-62.74740260159856,8.862236515569228,0 +-62.7462308431801,8.869634199979114,0 +-62.7450105622143,8.883990107431144,0 +-62.74464476159546,8.894670256342671,0 +-62.74512856837041,8.908099812802753,0 +-62.7474120019592,8.913110353796835,0 +-62.75059096702167,8.920338111720374,0 +-62.75274028137918,8.926946001466478,0 +-62.74659798074845,8.96059201061694,0 +-62.74632753423241,8.963781439484285,0 +-62.74811427814829,8.9682137064325,0 +-62.7497706038438,8.987091159975423,0 +-62.74986004919709,8.998880941311784,0 +-62.74963541798186,9.001540353449743,0 +-62.74384114583451,9.018734740635292,0 +-62.74334376884296,9.024585914375052,0 +-62.74311761447454,9.027245598938837,0 +-62.7414070604085,9.034603122836035,0 +-62.7390219556776,9.043512069822695,0 +-62.73766984016958,9.05947864718731,0 +-62.73659375768334,9.072261198736234,0 +-62.73825812712631,9.084741676853701,0 +-62.73745336955078,9.094337740232151,0 +-62.73579035596983,9.101175060796002,0 +-62.73852794264338,9.107304674650621,0 +-62.7404584647778,9.110148247952441,0 +-62.74746323685181,9.123611550084778,0 +-62.75357293851545,9.128414743404928,0 +-62.75766084130614,9.131438534179765,0 +-62.76548532095705,9.135319309320476,0 +-62.77520209664102,9.142583008162397,0 +-62.77983703355929,9.145660166648813,0 +-62.8097761372177,9.158950702987068,0 +-62.81821762673951,9.161797957653809,0 +-62.82724290489762,9.164158250240934,0 +-62.83294378749243,9.167312568067379,0 +-62.83868956380447,9.169934566185841,0 +-62.84488311800803,9.173665149853148,0 +-62.85156966117413,9.177971755564149,0 +-62.85946422894274,9.187197659819786,0 +-62.86695604902774,9.194782080262156,0 +-62.87090344382767,9.199394140054283,0 +-62.87682506605316,9.206311711904625,0 +-62.88283741628818,9.212165733136148,0 +-62.88997291276004,9.217577204502463,0 +-62.89666051970968,9.221880348149867,0 +-62.90361650638546,9.229419089457149,0 +-62.90783510753512,9.237267021565465,0 +-62.91376087311642,9.244185638697004,0 +-62.92143810999983,9.256071195053357,0 +-62.92633270665172,9.262369798039803,0 +-62.93131776576084,9.26760462093776,0 +-62.93922222911121,9.27683184890102,0 +-62.94191639406742,9.283484645779691,0 +-62.9462279734806,9.290271551928964,0 +-62.95018075513021,9.294885503456396,0 +-62.95903042796981,9.305799523291812,0 +-62.96316366145196,9.308284953147577,0 +-62.96779128021573,9.311347184486845,0 +-62.97477400829802,9.318904664918906,0 +-62.97724749852916,9.321790540935522,0 +-62.98772732902036,9.332847456260454,0 +-62.98777482806006,9.338750281433821,0 +-62.99007035606147,9.343767395934808,0 +-62.99457012304345,9.348431871334324,0 +-62.99709010749378,9.35078664056473,0 +-63.00284882526962,9.35341034404615,0 +-63.00929872431298,9.359526851837241,0 +-63.01302719352474,9.366800149131901,0 +-63.01464384120921,9.373362520182209,0 +-63.01338435125942,9.381829375846497,0 +-63.01261907060969,9.390872351583521,0 +-63.01360647935851,9.398452770249147,0 +-63.01652512514836,9.408870002917224,0 +-63.01868035785827,9.415474618719299,0 +-63.02024977937877,9.428992565637822,0 +-63.02146177388339,9.433912200924057,0 +-63.02788401146781,9.447828795088883,0 +-63.03349539730457,9.464892076037602,0 +-63.03556014035413,9.472559475596087,0 +-63.0379405631057,9.476503910848736,0 +-63.04256791857058,9.479561814269713,0 +-63.05114809074224,9.487228258030267,0 +-63.05604423395296,9.493521043755248,0 +-63.05846976482763,9.496933937849825,0 +-63.06767872915927,9.510011536181782,0 +-63.07064399019265,9.51346981061919,0 +-63.0760806492346,9.519810157513854,0 +-63.08264085300863,9.525705770878933,0 +-63.08708934567325,9.53089199037902,0 +-63.09257157804993,9.536699011563826,0 +-63.09953833718721,9.544238384305803,0 +-63.10803424398702,9.552975442461392,0 +-63.11379036586106,9.562025626253188,0 +-63.11914227579296,9.569435081833289,0 +-63.12494499929804,9.57795454366398,0 +-63.12877001693771,9.584168848683642,0 +-63.13340763864343,9.593670380410334,0 +-63.13421959436739,9.59695681565803,0 +-63.13831989699294,9.618679438588298,0 +-63.13827394402826,9.632063991859672,0 +-63.14043104804909,9.638667368453364,0 +-63.14222788343141,9.649525181969519,0 +-63.14339512278227,9.661401890698905,0 +-63.14505786780715,9.667428588826432,0 +-63.14766732896279,9.675139031487909,0 +-63.1527952892886,9.6851982658295,0 +-63.15783374164995,9.696321334377522,0 +-63.15895734187777,9.708729167777149,0 +-63.15630378410121,9.714401291558008,0 +-63.15337831844028,9.72326279394337,0 +-63.15319747735511,9.725389276176017,0 +-63.15782409183782,9.7284442076638,0 +-63.16442612914328,9.733801324788313,0 +-63.17017581999865,9.742836191391634,0 +-63.16900669156089,9.750234696754644,0 +-63.16883928550225,9.752368893034939,0 +-63.17833833452348,9.756389711741001,0 +-63.18203828257962,9.757770101603736,0 +-63.18772812494838,9.761461353991269,0 +-63.19420468582344,9.768418846991906,0 +-63.19541758063532,9.773338048138289,0 +-63.20335181583836,9.791576796961973,0 +-63.20672512484992,9.796676207119473,0 +-63.20717498212658,9.797784558120643,0 +-63.20956018055595,9.80814964029933,0 +-63.21140421121066,9.812047102024968,0 +-63.20610097719947,9.816962218346349,0 +-63.19297342458927,9.824446055225939,0 +-63.19014064173644,9.825819121858888,0 +-63.18505920220569,9.828078124618767,0 +-63.17822310015276,9.831798993516447,0 +-63.17304982413433,9.835121156901691,0 +-63.16711069949538,9.841057807200567,0 +-63.15671618196028,9.854662578112942,0 +-63.15334096648436,9.862418836318366,0 +-63.15289104785809,9.867737470243496,0 +-63.15536697433765,9.877044636226398,0 +-63.15473744115864,9.884490856192141,0 +-63.15239991207795,9.892867313796019,0 +-63.14961188594154,9.900135756557141,0 +-63.14786003629935,9.908023422077598,0 +-63.15160054674306,9.915286452522128,0 +-63.15227828994906,9.920158621014533,0 +-63.15574669808288,9.924186250443103,0 +-63.1626372474142,9.93277141986524,0 +-63.16353941857815,9.941407986725247,0 +-63.16282024005825,9.949915178304847,0 +-63.15998388376816,9.96414521309668,0 +-63.16016397582824,9.968443635417934,0 +-63.16835800899489,9.97445340000553,0 +-63.174884485744,9.974439298817583,0 +-63.1813196054984,9.97548851616488,0 +-63.17942935298625,9.984979024060548,0 +-63.16912199642535,9.98469296626366,0 +-63.16362903788566,9.985326590547425,0 +-63.16043057764134,9.990966342480931,0 +-63.15723138216535,9.996607163078858,0 +-63.15443832679409,9.997456988226451,0 +-63.14189272876593,10.00448416470593,0 +-63.12630780080255,10.01498319444491,0 +-63.12207254091473,10.01999097832382,0 +-63.12067780912835,10.02362547065442,0 +-63.11063073074489,10.03297801255529,0 +-63.10576283287578,10.03257922844297,0 +-63.10341826027044,10.0345299326632,0 +-63.10183994958386,10.04029333143421,0 +-63.10174967679011,10.04778558882814,0 +-63.10093780560449,10.05736175073422,0 +-63.09994574557508,10.06906603838365,0 +-63.09868318726828,10.07753432305099,0 +-63.09746562796506,10.08547076920689,0 +-63.09696964340591,10.09132307032788,0 +-63.09981140551415,10.09637384466849,0 +-63.10590222971113,10.10168436193897,0 +-63.11533913919472,10.10618039151054,0 +-63.11993080913194,10.10976915526524,0 +-63.115441984674,10.11747075188571,0 +-63.11327550137459,10.11729875835037,0 +-63.09795097320239,10.11819684236298,0 +-63.09307131136963,10.12424027710919,0 +-63.0893587847121,10.13574278804444,0 +-63.08971793231557,10.1379171505616,0 +-63.07878457647516,10.14455292821358,0 +-63.0767105144317,10.14974335910749,0 +-63.08072102649475,10.1602570138603,0 +-63.08355699340859,10.16531810238454,0 +-63.09089355632754,10.175047153356,0 +-63.09553358532317,10.17811273950176,0 +-63.1024193204101,10.18076502266358,0 +-63.11523332571268,10.18392802579701,0 +-63.12007308702547,10.1908118200266,0 +-63.12322479621486,10.19214965600833,0 +-63.13288138240421,10.19465892715253,0 +-63.14146028879966,10.19643355670865,0 +-63.14521819193369,10.19727661028445,0 +-63.15277433239756,10.19896287138184,0 +-63.1606824879489,10.20281865724027,0 +-63.17273327605947,10.21451724467074,0 +-63.18553951671753,10.22360540340971,0 +-63.19671203226851,10.22874785768641,0 +-63.1998379284323,10.23215745100781,0 +-63.20629722057802,10.24448345160313,0 +-63.21382814317545,10.25254383995609,0 +-63.23310173605511,10.27398039551815,0 +-63.23912545724982,10.28031189859807,0 +-63.24319728297065,10.2833435508287,0 +-63.24813841064313,10.28910668355452,0 +-63.24967468789845,10.29624924291737,0 +-63.249067351881,10.3031982178818,0 +-63.24869335118343,10.3074772130395,0 +-63.25494364745126,10.31068881967166,0 +-63.26030134363656,10.31167086314584,0 +-63.26683341785429,10.31167167944914,0 +-63.27656414484389,10.31247359169231,0 +-63.28035744953173,10.31275562330585,0 +-63.28636671806572,10.31298017507915,0 +-63.29757251554214,10.31540307891243,0 +-63.30465922735897,10.32150654540471,0 +-63.30793701280631,10.32790206970858,0 +-63.31118871975031,10.33438114431188,0 +-63.31726326663386,10.3395769719306,0 +-63.32523459290015,10.34195593424903,0 +-63.33181130745021,10.34146691879323,0 +-63.33847706143681,10.33988908886748,0 +-63.34718575036138,10.34013465294954,0 +-63.35527765612414,10.34073607997331,0 +-63.35983491444053,10.34487089595664,0 +-63.36508353402305,10.35457400783564,0 +-63.36819394856825,10.35642794415601,0 +-63.37842814297345,10.35778882858652,0 +-63.38122095401589,10.35693916002924,0 +-63.38896972539843,10.35541455385557,0 +-63.39790413687195,10.35936240262317,0 +-63.40134311172191,10.36394304859282,0 +-63.40686042323259,10.36976849558867,0 +-63.41449169433278,10.37628898414318,0 +-63.41498832610849,10.3768652748084,0 +-63.41245090007964,10.39274579476226,0 +-63.40710345859284,10.39766091570748,0 +-63.40530352578725,10.39965740745391,0 +-63.40220211970702,10.40422575692251,0 +-63.39761069492167,10.40706612866408,0 +-63.39294490434453,10.41739371537304,0 +-63.39358672334764,10.42279680420303,0 +-63.40198206137836,10.42718948427998,0 +-63.41172165700873,10.42846130497084,0 +-63.42686106239555,10.42914864145669,0 +-63.43638444019871,10.43204910318547,0 +-63.44236587596557,10.43836518963034,0 +-63.44622890347569,10.44397421188968,0 +-63.44941898494969,10.45117211877366,0 +-63.45570732627105,10.46022001213165,0 +-63.4573140200691,10.46665781039436,0 +-63.45344212278129,10.47449695099433,0 +-63.44891628037968,10.47699667828057,0 +-63.44356427734317,10.48246447235476,0 +-63.44640601249798,10.48752613388879,0 +-63.44853134953327,10.49471922739608,0 +-63.43974731987679,10.50208012531449,0 +-63.43331090742181,10.50740349460912,0 +-63.42828647419393,10.51546732356245,0 +-63.42709334297047,10.52330098518258,0 +-63.42657181477546,10.52959442577263,0 +-63.426094309138,10.53535660854736,0 diff --git a/R-utils/rshort.bdown.r b/R-utils/rshort.bdown.r new file mode 100644 index 000000000..0b8fa9e6f --- /dev/null +++ b/R-utils/rshort.bdown.r @@ -0,0 +1,222 @@ +#==========================================================================================# +#==========================================================================================# +# This subroutine computes the split between direct and diffuse radiation, and # +# between visible and near-infrared radiation using the method suggested by: # +# # +# Weiss, A., J. M. Norman, 1985: Partitioning solar radiation into direct and diffuse, # +# visible and near-infrared components. Agric. For. Meteorol., 34, 205-213. (WN85) # +# # +# Input variables: # +# # +# * rad.in - The incoming radiation at surface, in W/m2. This can be either PAR, # +# NIR, or the total shortwave radiation, but it must be in W/m2 in any of # +# the cases. # +# * atm.prss - The atmospheric pressure at the surface, in Pa. An actual measurement # +# is better, but if you don't have one just use some typical value given # +# the place altitude (higher elevation sites get more radiation). # +# * cosz - The cosine of zenith angle. This can be estimated using function ed.zen # +# in file zen.r +# * rad.type - The type of radiation provided in rad.in. Default is total shortwave # +# radiation, but the function also accepts PAR or NIR. The value is case # +# insensitive and only the first letter is checked. "p" means PAR, "n" # +# means NIR, and any other letter will be assumed shortwave. # +#------------------------------------------------------------------------------------------# +rshort.bdown = function(rad.in,atm.prss,cosz,rad.type="rshort"){ + #---------------------------------------------------------------------------------------# + # Local constants. # + #---------------------------------------------------------------------------------------# + #----- Extinction coefficient. (equations 1 and 4 of WN85) -----------------------------# + par.beam.expext = -0.185 + nir.beam.expext = -0.060 + #----- This is the typical conversion of diffuse radiation in sunny days. --------------# + par2diff.sun = 0.400 + nir2diff.sun = 0.600 + #----- Coefficients for various equations in WN85. -------------------------------------# + wn85.06 = c( -1.1950, 0.4459, -0.0345 ) + wn85.11 = c( 0.90, 0.70 ) + wn85.12 = c( 0.88, 0.68 ) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Make rad type case insensitive, and retain only the first letter. # + #---------------------------------------------------------------------------------------# + rty = substring(tolower(rad.type),1,1) + #---------------------------------------------------------------------------------------# + + + #------ Initialise the radiation with NAs. ---------------------------------------------# + par.beam = NA * rad.in + nir.beam = NA * rad.in + par.diff = NA * rad.in + nir.diff = NA * rad.in + par.full = NA * rad.in + nir.full = NA * rad.in + rshort.beam = NA * rad.in + rshort.diff = NA * rad.in + rshort.full = NA * rad.in + par.max = NA * rad.in + nir.max = NA * rad.in + rshort.max = NA * rad.in + + + #------ Make day and night flags. ------------------------------------------------------# + ntimes = length(cosz) + night = cosz <= cosz.min + day = ! night + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # First thing to check is whether this is daytime or "night-time". If the zenith # + # angle is too close to horizon, we assume it's dawn/dusk and all radiation goes to # + # diffuse. # + #---------------------------------------------------------------------------------------# + par.beam [night] = 0.0 + nir.beam [night] = 0.0 + if (rty == "p"){ + par.diff [night] = rad.in[night] + nir.diff [night] = fnir.diff.def * rad.in[night] / fvis.diff.def + }else if(rty == "n"){ + par.diff [night] = fvis.diff.def * rad.in[night] / fnir.diff.def + nir.diff [night] = rad.in[night] + }else{ + par.diff [night] = fvis.diff.def * rad.in[night] + nir.diff [night] = fnir.diff.def * rad.in[night] + }#end if + par.full [night] = par.beam [night] + par.diff [night] + nir.full [night] = nir.beam [night] + nir.diff [night] + rshort.beam [night] = par.beam [night] + nir.beam [night] + rshort.diff [night] = par.diff [night] + nir.diff [night] + rshort.full [night] = rshort.beam[night] + rshort.diff[night] + par.max [night] = 0.0 + nir.max [night] = 0.0 + rshort.max [night] = 0.0 + #---------------------------------------------------------------------------------------# + + + + #----- Save 1/cos(zen), which is the secant. We will use this several times. ----------# + secz = 1. / cosz[day] + log10secz = log10(secz) + #---------------------------------------------------------------------------------------# + + + #----- Total radiation at the top [ W/m2], using ED defaults. -------------------------# + par.beam.top = fvis.beam.def * solar + nir.beam.top = fnir.beam.def * solar + #---------------------------------------------------------------------------------------# + + #---------------------------------------------------------------------------------------# + # Find the potential PAR components (beam, diffuse, total), using equations 1, 3, # + # and 9 of WN85. # + #---------------------------------------------------------------------------------------# + par.beam.pot = ( par.beam.top + * exp ( par.beam.expext * (atm.prss[day] / prefsea) * secz) * cosz[day]) + par.diff.pot = par2diff.sun * (par.beam.top - par.beam.pot) * cosz[day] + par.full.pot = par.beam.pot + par.diff.pot + #------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the NIR absorption of 10 mm of precipitable water, using WN85 equation 6. # + #---------------------------------------------------------------------------------------# + w10 = solar * 10 ** ((wn85.06[1]) + log10secz * (wn85.06[2] + wn85.06[3] * log10secz)) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the potential direct and diffuse near-infrared radiation, using equations # + # 4, 5, and 10 of WN85. # + #---------------------------------------------------------------------------------------# + nir.beam.pot = ( ( nir.beam.top + * exp ( nir.beam.expext * (atm.prss[day] / prefsea) * secz) - w10 ) + * cosz[day] ) + nir.diff.pot = nir2diff.sun * ( nir.beam.top - nir.beam.pot - w10 ) * cosz[day] + nir.full.pot = nir.beam.pot + nir.diff.pot + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Total maximum radiation. # + #---------------------------------------------------------------------------------------# + par.max [day] = par.full.pot + nir.max [day] = nir.full.pot + rshort.max[day] = par.full.pot + nir.full.pot + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the actual total for PAR and NIR, using equations 7 and 8. # + #---------------------------------------------------------------------------------------# + if (rty == "p"){ + ratio = rad.in[day] / par.full.pot + }else if (rty == "n"){ + ratio = rad.in[day] / nir.full.pot + }else{ + ratio = rad.in[day] / (par.full.pot + nir.full.pot) + }#end if + par.full[day] = ratio * par.full.pot + nir.full[day] = ratio * nir.full.pot + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the fraction of PAR and NIR that stays as beam, using equations 11 and 12 # + # of WN85. # + #---------------------------------------------------------------------------------------# + #----- Make sure that the ratio is bounded. --------------------------------------------# + aux.par = pmin(wn85.11[1],pmax(0.,ratio)) + aux.nir = pmin(wn85.12[1],pmax(0.,ratio)) + + fvis.beam.act = ( par.beam.pot + * (1. - ((wn85.11[1] - aux.par)/wn85.11[2]) ^ twothirds) + / par.full.pot ) + fvis.beam.act = pmin(1.,pmax(0.,fvis.beam.act)) + + fnir.beam.act = ( nir.beam.pot + * (1. - ((wn85.12[1] - aux.nir)/wn85.12[2]) ^ twothirds) + / nir.full.pot ) + fnir.beam.act = pmin(1.,pmax(0.,fvis.beam.act)) + + fvis.diff.act = 1. - fvis.beam.act + fnir.diff.act = 1. - fnir.beam.act + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the radiation components. # + #---------------------------------------------------------------------------------------# + par.beam [day] = fvis.beam.act * par.full[day] + par.diff [day] = fvis.diff.act * par.full[day] + nir.beam [day] = fnir.beam.act * nir.full[day] + nir.diff [day] = fnir.diff.act * nir.full[day] + rshort.beam [day] = par.beam [day] + nir.beam [day] + rshort.diff [day] = par.diff [day] + nir.diff [day] + rshort.full [day] = rshort.beam[day] + rshort.diff[day] + #---------------------------------------------------------------------------------------# + rshort.bdown = list( par.beam = par.beam + , par.diff = par.diff + , par.full = par.full + , nir.beam = nir.beam + , nir.diff = nir.diff + , nir.full = nir.full + , rshort.beam = rshort.beam + , rshort.diff = rshort.diff + , rshort.full = rshort.full + , par.max = par.max + , nir.max = nir.max + , rshort.max = rshort.max + )#end list + return(rshort.bdown) +}#end function rshort.bdown +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/samap/americadosul b/R-utils/samap/americadosul new file mode 100755 index 000000000..1b94eba5c --- /dev/null +++ b/R-utils/samap/americadosul @@ -0,0 +1,16695 @@ +-53.383 -33.750 +-53.383 -33.750 +-53.433 -33.750 +-53.450 -33.700 +-53.467 -33.700 +-53.483 -33.683 +-53.517 -33.700 +-53.550 -33.667 +-53.533 -33.550 +-53.533 -33.550 +-53.517 -33.333 +-53.517 -33.183 +-53.500 -33.150 +-53.433 -33.050 +-53.250 -32.950 +-53.250 -32.933 +-53.283 -32.933 +-53.300 -32.900 +-53.183 -32.833 +-53.150 -32.767 +-53.083 -32.767 +-53.083 -32.750 +-53.167 -32.650 +-53.167 -32.650 +-53.183 -32.650 +-53.217 -32.633 +-53.233 -32.633 +-53.250 -32.600 +-53.267 -32.600 +-53.300 -32.617 +-53.317 -32.600 +-53.333 -32.583 +-53.367 -32.583 +-53.383 -32.567 +-53.417 -32.567 +-53.417 -32.550 +-53.433 -32.550 +-53.467 -32.467 +-53.517 -32.483 +-53.567 -32.450 +-53.600 -32.417 +-53.617 -32.400 +-53.650 -32.367 +-53.633 -32.350 +-53.650 -32.300 +-53.650 -32.283 +-53.667 -32.267 +-53.683 -32.217 +-53.700 -32.200 +-53.717 -32.200 +-53.717 -32.167 +-53.733 -32.133 +-53.750 -32.117 +-53.717 -32.100 +-53.733 -32.083 +-53.783 -32.067 +-53.817 -32.050 +-53.833 -32.050 +-53.850 -32.000 +-54.000 -31.917 +-54.050 -31.883 +-54.067 -31.900 +-54.100 -31.900 +-54.160 -31.872 +-54.164 -31.869 +-54.188 -31.865 +-54.218 -31.829 +-54.236 -31.816 +-54.255 -31.802 +-54.286 -31.779 +-54.317 -31.755 +-54.334 -31.743 +-54.351 -31.730 +-54.383 -31.706 +-54.402 -31.692 +-54.389 -31.701 +-54.421 -31.678 +-54.457 -31.651 +-54.467 -31.617 +-54.467 -31.600 +-54.500 -31.567 +-54.500 -31.533 +-54.533 -31.500 +-54.576 -31.481 +-54.578 -31.470 +-54.587 -31.457 +-54.602 -31.456 +-54.619 -31.456 +-54.630 -31.455 +-54.642 -31.455 +-54.661 -31.454 +-54.680 -31.448 +-54.693 -31.446 +-54.702 -31.438 +-54.850 -31.433 +-54.883 -31.417 +-54.900 -31.383 +-54.918 -31.379 +-54.950 -31.383 +-54.967 -31.350 +-54.955 -31.328 +-55.010 -31.309 +-55.000 -31.300 +-55.017 -31.267 +-55.032 -31.285 +-55.083 -31.317 +-55.150 -31.300 +-55.200 -31.267 +-55.224 -31.261 +-55.278 -31.195 +-55.300 -31.150 +-55.314 -31.146 +-55.333 -31.117 +-55.350 -31.083 +-55.367 -31.050 +-55.367 -31.033 +-55.417 -31.017 +-55.431 -30.993 +-55.431 -30.993 +-55.450 -30.967 +-55.483 -30.950 +-55.540 -30.894 +-55.567 -30.867 +-55.578 -30.835 +-55.633 -30.850 +-55.660 -30.875 +-55.667 -30.883 +-55.650 -30.917 +-55.666 -30.954 +-55.717 -30.967 +-55.773 -30.998 +-55.867 -31.050 +-55.883 -31.067 +-55.900 -31.067 +-55.917 -31.083 +-55.935 -31.087 +-55.967 -31.067 +-56.000 -31.083 +-56.011 -31.082 +-56.017 -31.033 +-56.017 -30.950 +-56.000 -30.883 +-56.000 -30.867 +-56.017 -30.783 +-56.050 -30.767 +-56.117 -30.733 +-56.133 -30.717 +-56.133 -30.683 +-56.167 -30.667 +-56.183 -30.600 +-56.233 -30.600 +-56.233 -30.583 +-56.267 -30.583 +-56.267 -30.567 +-56.283 -30.533 +-56.300 -30.517 +-56.333 -30.533 +-56.367 -30.500 +-56.383 -30.500 +-56.417 -30.467 +-56.400 -30.450 +-56.433 -30.433 +-56.450 -30.383 +-56.500 -30.383 +-56.517 -30.367 +-56.550 -30.350 +-56.533 -30.317 +-56.550 -30.317 +-56.567 -30.283 +-56.617 -30.300 +-56.600 -30.283 +-56.633 -30.250 +-56.617 -30.250 +-56.650 -30.217 +-56.650 -30.200 +-56.700 -30.200 +-56.700 -30.183 +-56.783 -30.150 +-56.800 -30.117 +-56.850 -30.083 +-56.867 -30.083 +-56.883 -30.100 +-56.900 -30.083 +-56.917 -30.100 +-57.000 -30.083 +-57.050 -30.100 +-57.067 -30.100 +-57.083 -30.100 +-57.133 -30.133 +-57.133 -30.150 +-57.150 -30.167 +-57.167 -30.183 +-57.167 -30.200 +-57.150 -30.233 +-57.217 -30.283 +-57.233 -30.283 +-57.250 -30.267 +-57.267 -30.283 +-57.300 -30.267 +-57.333 -30.283 +-57.367 -30.283 +-57.383 -30.300 +-57.417 -30.300 +-57.417 -30.283 +-57.467 -30.267 +-57.500 -30.283 +-57.533 -30.283 +-57.567 -30.250 +-57.567 -30.250 +-57.550 -30.217 +-57.600 -30.200 +-57.638 -30.195 +-57.597 -30.184 +-57.583 -30.183 +-57.567 -30.167 +-57.533 -30.167 +-57.467 -30.117 +-57.400 -30.017 +-57.317 -29.983 +-57.317 -29.967 +-57.333 -29.900 +-57.283 -29.833 +-57.233 -29.783 +-57.183 -29.783 +-57.117 -29.767 +-57.100 -29.767 +-57.017 -29.667 +-56.983 -29.650 +-56.967 -29.633 +-56.967 -29.600 +-56.883 -29.533 +-56.867 -29.517 +-56.833 -29.500 +-56.783 -29.467 +-56.783 -29.450 +-56.783 -29.433 +-56.783 -29.417 +-56.767 -29.417 +-56.750 -29.367 +-56.700 -29.350 +-56.650 -29.283 +-56.650 -29.233 +-56.633 -29.183 +-56.617 -29.183 +-56.617 -29.167 +-56.567 -29.133 +-56.550 -29.117 +-56.533 -29.117 +-56.500 -29.100 +-56.500 -29.083 +-56.400 -29.067 +-56.400 -29.050 +-56.383 -29.017 +-56.400 -28.983 +-56.400 -28.983 +-56.383 -28.950 +-56.317 -28.917 +-56.283 -28.883 +-56.300 -28.800 +-56.283 -28.783 +-56.217 -28.767 +-56.183 -28.750 +-56.150 -28.733 +-56.133 -28.700 +-56.083 -28.650 +-56.033 -28.617 +-56.017 -28.600 +-56.017 -28.583 +-55.983 -28.550 +-56.000 -28.533 +-56.000 -28.500 +-55.933 -28.483 +-55.900 -28.483 +-55.900 -28.450 +-55.917 -28.400 +-55.867 -28.367 +-55.750 -28.383 +-55.717 -28.433 +-55.700 -28.383 +-55.667 -28.333 +-55.683 -28.300 +-55.700 -28.317 +-55.767 -28.283 +-55.783 -28.267 +-55.767 -28.233 +-55.700 -28.217 +-55.667 -28.183 +-55.633 -28.167 +-55.633 -28.117 +-55.600 -28.117 +-55.600 -28.150 +-55.550 -28.167 +-55.533 -28.133 +-55.550 -28.133 +-55.500 -28.100 +-55.500 -28.083 +-55.483 -28.100 +-55.450 -28.100 +-55.433 -28.067 +-55.400 -28.050 +-55.383 -28.033 +-55.367 -28.000 +-55.383 -28.000 +-55.383 -27.983 +-55.367 -27.967 +-55.350 -27.967 +-55.334 -27.951 +-55.333 -27.917 +-55.283 -27.933 +-55.267 -27.917 +-55.233 -27.900 +-55.200 -27.850 +-55.183 -27.850 +-55.167 -27.867 +-55.133 -27.900 +-55.133 -27.867 +-55.117 -27.850 +-55.051 -27.835 +-55.033 -27.850 +-55.033 -27.833 +-55.050 -27.817 +-55.067 -27.800 +-55.083 -27.800 +-55.083 -27.783 +-55.067 -27.767 +-55.050 -27.767 +-55.033 -27.783 +-55.017 -27.800 +-54.983 -27.783 +-54.983 -27.767 +-54.950 -27.783 +-54.900 -27.700 +-54.917 -27.650 +-54.867 -27.617 +-54.867 -27.633 +-54.850 -27.617 +-54.833 -27.567 +-54.817 -27.533 +-54.800 -27.533 +-54.800 -27.567 +-54.783 -27.583 +-54.767 -27.583 +-54.750 -27.550 +-54.683 -27.567 +-54.667 -27.550 +-54.683 -27.517 +-54.667 -27.500 +-54.650 -27.517 +-54.650 -27.550 +-54.633 -27.533 +-54.617 -27.500 +-54.600 -27.483 +-54.600 -27.450 +-54.583 -27.450 +-54.567 -27.467 +-54.533 -27.500 +-54.517 -27.500 +-54.517 -27.483 +-54.500 -27.467 +-54.450 -27.467 +-54.483 -27.433 +-54.483 -27.417 +-54.417 -27.400 +-54.400 -27.417 +-54.367 -27.467 +-54.350 -27.450 +-54.350 -27.400 +-54.317 -27.417 +-54.300 -27.450 +-54.283 -27.433 +-54.283 -27.400 +-54.233 -27.383 +-54.233 -27.367 +-54.233 -27.350 +-54.217 -27.317 +-54.200 -27.267 +-54.183 -27.250 +-54.167 -27.267 +-54.167 -27.300 +-54.100 -27.300 +-54.083 -27.267 +-54.050 -27.250 +-54.033 -27.217 +-54.000 -27.183 +-53.983 -27.200 +-53.967 -27.183 +-53.967 -27.150 +-53.933 -27.150 +-53.917 -27.167 +-53.900 -27.167 +-53.883 -27.133 +-53.850 -27.133 +-53.833 -27.150 +-53.833 -27.150 +-53.817 -27.150 +-53.800 -27.133 +-53.833 -27.133 +-53.817 -27.117 +-53.817 -27.100 +-53.783 -27.100 +-53.817 -27.067 +-53.783 -27.067 +-53.800 -27.033 +-53.767 -27.067 +-53.783 -27.033 +-53.767 -27.033 +-53.767 -27.000 +-53.750 -27.000 +-53.750 -26.983 +-53.733 -26.983 +-53.733 -26.967 +-53.717 -26.967 +-53.717 -26.933 +-53.683 -26.933 +-53.700 -26.917 +-53.683 -26.900 +-53.700 -26.883 +-53.700 -26.867 +-53.717 -26.850 +-53.700 -26.833 +-53.717 -26.817 +-53.700 -26.800 +-53.717 -26.783 +-53.717 -26.767 +-53.733 -26.783 +-53.750 -26.767 +-53.717 -26.750 +-53.750 -26.733 +-53.750 -26.717 +-53.733 -26.700 +-53.750 -26.667 +-53.733 -26.683 +-53.733 -26.667 +-53.733 -26.650 +-53.750 -26.650 +-53.733 -26.567 +-53.717 -26.567 +-53.750 -26.533 +-53.717 -26.533 +-53.717 -26.517 +-53.700 -26.517 +-53.717 -26.483 +-53.700 -26.467 +-53.717 -26.450 +-53.700 -26.433 +-53.717 -26.400 +-53.650 -26.283 +-53.645 -26.248 +-53.634 -26.235 +-53.633 -26.233 +-53.633 -26.233 +-53.650 -26.233 +-53.667 -26.200 +-53.667 -26.167 +-53.700 -26.133 +-53.717 -26.117 +-53.740 -26.116 +-53.734 -26.102 +-53.733 -26.100 +-53.733 -26.100 +-53.733 -26.083 +-53.733 -26.050 +-53.750 -26.033 +-53.767 -26.017 +-53.783 -26.017 +-53.800 -26.000 +-53.817 -25.983 +-53.833 -25.967 +-53.833 -25.933 +-53.817 -25.917 +-53.833 -25.900 +-53.833 -25.833 +-53.833 -25.833 +-53.800 -25.800 +-53.817 -25.817 +-53.817 -25.800 +-53.833 -25.800 +-53.833 -25.783 +-53.850 -25.767 +-53.833 -25.750 +-53.867 -25.750 +-53.850 -25.733 +-53.883 -25.717 +-53.867 -25.700 +-53.833 -25.700 +-53.833 -25.683 +-53.833 -25.683 +-53.833 -25.683 +-53.850 -25.667 +-53.867 -25.667 +-53.867 -25.650 +-53.883 -25.633 +-53.900 -25.633 +-53.917 -25.650 +-53.917 -25.617 +-53.933 -25.617 +-53.950 -25.650 +-53.967 -25.600 +-53.983 -25.584 +-54.000 -25.567 +-54.017 -25.550 +-54.050 -25.583 +-54.050 -25.550 +-54.067 -25.550 +-54.083 -25.550 +-54.083 -25.600 +-54.100 -25.617 +-54.117 -25.600 +-54.117 -25.533 +-54.101 -25.518 +-54.100 -25.500 +-54.117 -25.500 +-54.150 -25.533 +-54.167 -25.533 +-54.200 -25.517 +-54.217 -25.533 +-54.183 -25.567 +-54.183 -25.583 +-54.200 -25.583 +-54.217 -25.567 +-54.233 -25.567 +-54.233 -25.583 +-54.267 -25.583 +-54.267 -25.567 +-54.284 -25.551 +-54.300 -25.550 +-54.333 -25.567 +-54.350 -25.600 +-54.351 -25.585 +-54.400 -25.600 +-54.401 -25.635 +-54.433 -25.650 +-54.433 -25.683 +-54.434 -25.684 +-54.450 -25.683 +-54.467 -25.633 +-54.500 -25.617 +-54.533 -25.617 +-54.533 -25.583 +-54.583 -25.583 +-54.583 -25.584 +-54.583 -25.584 +-54.600 -25.467 +-54.617 -25.450 +-54.567 -25.367 +-54.500 -25.300 +-54.467 -25.200 +-54.433 -25.167 +-54.433 -25.117 +-54.450 -25.100 +-54.467 -25.033 +-54.450 -25.000 +-54.433 -24.967 +-54.417 -24.933 +-54.400 -24.850 +-54.383 -24.800 +-54.367 -24.767 +-54.350 -24.717 +-54.333 -24.683 +-54.317 -24.650 +-54.317 -24.600 +-54.333 -24.533 +-54.333 -24.483 +-54.300 -24.433 +-54.267 -24.383 +-54.250 -24.350 +-54.267 -24.317 +-54.300 -24.283 +-54.333 -24.250 +-54.333 -24.183 +-54.350 -24.150 +-54.333 -24.117 +-54.317 -24.100 +-54.300 -24.083 +-54.284 -24.052 +-54.284 -24.052 +-54.317 -24.050 +-54.350 -24.033 +-54.367 -24.000 +-54.383 -23.933 +-54.467 -23.900 +-54.585 -23.834 +-54.585 -23.835 +-54.585 -23.850 +-54.600 -23.850 +-54.601 -23.850 +-54.617 -23.833 +-54.618 -23.818 +-54.635 -23.818 +-54.650 -23.817 +-54.651 -23.817 +-54.667 -23.802 +-54.667 -23.801 +-54.668 -23.818 +-54.684 -23.818 +-54.685 -23.835 +-54.685 -23.851 +-54.701 -23.851 +-54.701 -23.851 +-54.717 -23.851 +-54.734 -23.851 +-54.735 -23.851 +-54.750 -23.851 +-54.751 -23.851 +-54.767 -23.851 +-54.768 -23.867 +-54.784 -23.867 +-54.784 -23.852 +-54.785 -23.867 +-54.785 -23.868 +-54.800 -23.852 +-54.801 -23.868 +-54.801 -23.884 +-54.817 -23.884 +-54.818 -23.884 +-54.833 -23.868 +-54.834 -23.884 +-54.834 -23.884 +-54.835 -23.884 +-54.835 -23.885 +-54.835 -23.901 +-54.851 -23.900 +-54.851 -23.901 +-54.873 -23.907 +-54.868 -23.900 +-54.868 -23.885 +-54.884 -23.885 +-54.900 -23.901 +-54.901 -23.901 +-54.901 -23.902 +-54.918 -23.917 +-54.918 -23.918 +-54.917 -23.934 +-54.918 -23.934 +-54.927 -23.946 +-54.918 -23.950 +-54.917 -23.951 +-54.918 -23.951 +-54.934 -23.951 +-54.934 -23.951 +-54.934 -23.951 +-54.967 -23.951 +-54.935 -23.951 +-54.935 -23.951 +-54.950 -23.951 +-54.967 -23.951 +-54.968 -23.951 +-54.983 -23.951 +-54.984 -23.951 +-54.984 -23.951 +-55.000 -23.951 +-55.017 -23.967 +-55.018 -23.967 +-55.033 -23.967 +-55.035 -23.968 +-55.050 -23.968 +-55.051 -23.984 +-55.052 -23.984 +-55.067 -23.983 +-55.067 -23.983 +-55.068 -23.983 +-55.083 -23.968 +-55.084 -23.968 +-55.085 -23.967 +-55.085 -23.967 +-55.101 -23.951 +-55.117 -23.968 +-55.117 -23.967 +-55.118 -23.968 +-55.134 -23.984 +-55.135 -23.984 +-55.151 -23.983 +-55.151 -23.984 +-55.167 -23.984 +-55.180 -23.988 +-55.168 -23.984 +-55.184 -23.984 +-55.185 -23.984 +-55.185 -23.984 +-55.200 -23.985 +-55.201 -24.000 +-55.217 -24.001 +-55.218 -24.001 +-55.218 -24.001 +-55.234 -24.000 +-55.242 -24.001 +-55.234 -23.985 +-55.250 -23.985 +-55.251 -23.984 +-55.251 -23.984 +-55.252 -23.984 +-55.267 -23.984 +-55.267 -23.968 +-55.268 -23.967 +-55.284 -23.967 +-55.300 -23.951 +-55.302 -23.951 +-55.317 -23.967 +-55.318 -23.984 +-55.334 -23.984 +-55.335 -23.984 +-55.350 -23.984 +-55.351 -23.968 +-55.367 -23.968 +-55.367 -23.968 +-55.368 -23.967 +-55.384 -23.967 +-55.384 -23.967 +-55.384 -23.967 +-55.385 -23.967 +-55.385 -23.967 +-55.401 -23.951 +-55.402 -23.950 +-55.417 -23.934 +-55.417 -23.934 +-55.418 -23.934 +-55.418 -23.918 +-55.431 -23.923 +-55.418 -23.917 +-55.434 -23.917 +-55.434 -23.917 +-55.434 -23.901 +-55.434 -23.901 +-55.434 -23.900 +-55.434 -23.885 +-55.434 -23.884 +-55.433 -23.883 +-55.433 -23.868 +-55.433 -23.872 +-55.434 -23.852 +-55.434 -23.851 +-55.434 -23.835 +-55.434 -23.834 +-55.434 -23.817 +-55.434 -23.817 +-55.435 -23.817 +-55.434 -23.801 +-55.434 -23.800 +-55.433 -23.784 +-55.418 -23.784 +-55.418 -23.767 +-55.434 -23.752 +-55.434 -23.751 +-55.434 -23.735 +-55.434 -23.734 +-55.434 -23.718 +-55.434 -23.716 +-55.440 -23.712 +-55.446 -23.712 +-55.449 -23.715 +-55.452 -23.717 +-55.454 -23.714 +-55.461 -23.712 +-55.461 -23.707 +-55.461 -23.699 +-55.459 -23.684 +-55.466 -23.677 +-55.473 -23.675 +-55.472 -23.667 +-55.472 -23.658 +-55.475 -23.647 +-55.481 -23.640 +-55.489 -23.642 +-55.495 -23.638 +-55.507 -23.630 +-55.518 -23.626 +-55.529 -23.630 +-55.537 -23.625 +-55.533 -23.610 +-55.535 -23.592 +-55.526 -23.580 +-55.524 -23.567 +-55.529 -23.560 +-55.532 -23.551 +-55.534 -23.541 +-55.536 -23.536 +-55.538 -23.533 +-55.538 -23.524 +-55.545 -23.511 +-55.547 -23.496 +-55.551 -23.488 +-55.559 -23.476 +-55.542 -23.477 +-55.539 -23.464 +-55.542 -23.449 +-55.527 -23.429 +-55.521 -23.423 +-55.518 -23.416 +-55.511 -23.400 +-55.502 -23.378 +-55.502 -23.372 +-55.508 -23.366 +-55.518 -23.351 +-55.525 -23.341 +-55.532 -23.332 +-55.543 -23.323 +-55.547 -23.322 +-55.552 -23.319 +-55.547 -23.303 +-55.552 -23.287 +-55.550 -23.279 +-55.546 -23.276 +-55.543 -23.274 +-55.538 -23.273 +-55.532 -23.269 +-55.529 -23.268 +-55.527 -23.265 +-55.525 -23.263 +-55.523 -23.261 +-55.524 -23.256 +-55.535 -23.250 +-55.534 -23.235 +-55.540 -23.226 +-55.540 -23.219 +-55.532 -23.216 +-55.524 -23.208 +-55.523 -23.194 +-55.530 -23.190 +-55.536 -23.184 +-55.541 -23.177 +-55.539 -23.169 +-55.540 -23.164 +-55.539 -23.160 +-55.540 -23.156 +-55.545 -23.156 +-55.553 -23.153 +-55.559 -23.148 +-55.565 -23.144 +-55.571 -23.143 +-55.583 -23.149 +-55.594 -23.152 +-55.594 -23.142 +-55.594 -23.130 +-55.596 -23.121 +-55.594 -23.117 +-55.603 -23.099 +-55.610 -23.086 +-55.609 -23.077 +-55.609 -23.067 +-55.613 -23.055 +-55.609 -23.050 +-55.612 -23.041 +-55.617 -23.037 +-55.627 -23.033 +-55.633 -23.026 +-55.633 -23.014 +-55.630 -23.002 +-55.631 -22.998 +-55.626 -22.988 +-55.622 -22.989 +-55.625 -22.978 +-55.630 -22.970 +-55.635 -22.965 +-55.636 -22.958 +-55.634 -22.954 +-55.642 -22.951 +-55.642 -22.943 +-55.645 -22.938 +-55.650 -22.932 +-55.645 -22.922 +-55.649 -22.912 +-55.647 -22.897 +-55.649 -22.888 +-55.655 -22.886 +-55.660 -22.879 +-55.658 -22.869 +-55.660 -22.863 +-55.661 -22.858 +-55.661 -22.847 +-55.657 -22.838 +-55.659 -22.831 +-55.656 -22.823 +-55.653 -22.819 +-55.652 -22.817 +-55.654 -22.809 +-55.649 -22.805 +-55.648 -22.799 +-55.648 -22.795 +-55.651 -22.792 +-55.649 -22.791 +-55.646 -22.790 +-55.644 -22.789 +-55.642 -22.788 +-55.641 -22.786 +-55.639 -22.785 +-55.637 -22.783 +-55.635 -22.779 +-55.635 -22.774 +-55.633 -22.770 +-55.629 -22.768 +-55.628 -22.767 +-55.621 -22.767 +-55.616 -22.768 +-55.617 -22.765 +-55.621 -22.762 +-55.624 -22.758 +-55.620 -22.755 +-55.617 -22.749 +-55.619 -22.745 +-55.614 -22.740 +-55.614 -22.736 +-55.611 -22.717 +-55.611 -22.704 +-55.601 -22.683 +-55.607 -22.689 +-55.616 -22.670 +-55.611 -22.660 +-55.615 -22.654 +-55.620 -22.650 +-55.621 -22.644 +-55.621 -22.640 +-55.622 -22.634 +-55.622 -22.630 +-55.624 -22.627 +-55.626 -22.623 +-55.634 -22.618 +-55.646 -22.611 +-55.658 -22.602 +-55.676 -22.594 +-55.680 -22.589 +-55.692 -22.578 +-55.695 -22.563 +-55.711 -22.558 +-55.717 -22.553 +-55.722 -22.549 +-55.725 -22.544 +-55.728 -22.539 +-55.731 -22.534 +-55.733 -22.530 +-55.735 -22.527 +-55.737 -22.519 +-55.744 -22.506 +-55.744 -22.489 +-55.744 -22.483 +-55.750 -22.475 +-55.743 -22.470 +-55.740 -22.464 +-55.735 -22.460 +-55.732 -22.459 +-55.733 -22.445 +-55.733 -22.435 +-55.736 -22.424 +-55.734 -22.411 +-55.742 -22.404 +-55.741 -22.390 +-55.744 -22.386 +-55.754 -22.386 +-55.773 -22.386 +-55.776 -22.384 +-55.780 -22.386 +-55.785 -22.389 +-55.788 -22.381 +-55.800 -22.370 +-55.795 -22.365 +-55.801 -22.355 +-55.806 -22.350 +-55.818 -22.345 +-55.821 -22.339 +-55.824 -22.336 +-55.825 -22.330 +-55.827 -22.324 +-55.825 -22.316 +-55.830 -22.315 +-55.833 -22.309 +-55.832 -22.305 +-55.836 -22.302 +-55.835 -22.298 +-55.836 -22.294 +-55.838 -22.289 +-55.846 -22.286 +-55.850 -22.280 +-55.855 -22.282 +-55.861 -22.283 +-55.867 -22.283 +-55.983 -22.267 +-56.067 -22.283 +-56.133 -22.283 +-56.233 -22.267 +-56.250 -22.233 +-56.300 -22.217 +-56.367 -22.167 +-56.383 -22.117 +-56.400 -22.067 +-56.467 -22.083 +-56.518 -22.100 +-56.567 -22.183 +-56.600 -22.200 +-56.617 -22.233 +-56.633 -22.267 +-56.650 -22.250 +-56.667 -22.233 +-56.717 -22.250 +-56.750 -22.233 +-56.783 -22.267 +-56.817 -22.267 +-56.833 -22.300 +-56.883 -22.250 +-56.900 -22.267 +-56.933 -22.250 +-56.967 -22.250 +-56.983 -22.233 +-57.100 -22.250 +-57.117 -22.217 +-57.200 -22.217 +-57.217 -22.183 +-57.250 -22.217 +-57.317 -22.200 +-57.367 -22.200 +-57.400 -22.183 +-57.467 -22.167 +-57.533 -22.167 +-57.617 -22.167 +-57.650 -22.117 +-57.683 -22.100 +-57.733 -22.083 +-57.767 -22.117 +-57.783 -22.133 +-57.833 -22.133 +-57.833 -22.083 +-57.883 -22.117 +-57.933 -22.117 +-57.950 -22.083 +-57.983 -22.083 +-57.983 -22.033 +-57.967 -22.000 +-57.933 -21.917 +-57.950 -21.867 +-57.917 -21.817 +-57.900 -21.783 +-57.933 -21.767 +-57.900 -21.700 +-57.900 -21.683 +-57.933 -21.600 +-57.950 -21.533 +-57.933 -21.483 +-57.900 -21.400 +-57.850 -21.333 +-57.867 -21.317 +-57.917 -21.267 +-57.833 -21.183 +-57.850 -21.117 +-57.850 -21.067 +-57.833 -21.000 +-57.833 -20.950 +-57.917 -20.900 +-57.867 -20.867 +-57.900 -20.800 +-57.917 -20.767 +-57.883 -20.717 +-57.933 -20.667 +-57.983 -20.717 +-57.967 -20.650 +-58.000 -20.583 +-58.000 -20.550 +-58.000 -20.467 +-58.050 -20.383 +-58.083 -20.367 +-58.083 -20.267 +-58.133 -20.267 +-58.167 -20.217 +-58.117 -20.200 +-58.167 -20.167 +-58.167 -20.167 +-58.100 -20.117 +-58.033 -20.083 +-58.000 -20.050 +-57.967 -20.050 +-57.933 -20.017 +-57.883 -20.000 +-57.867 -19.983 +-57.850 -19.967 +-57.850 -19.967 +-57.851 -19.967 +-57.851 -19.967 +-58.133 -19.750 +-58.133 -19.750 +-58.117 -19.750 +-58.117 -19.750 +-57.883 -19.233 +-57.883 -19.233 +-57.767 -19.033 +-57.767 -19.033 +-57.700 -19.033 +-57.700 -19.033 +-57.700 -19.017 +-57.700 -19.017 +-57.700 -19.015 +-57.700 -19.015 +-57.700 -19.015 +-57.685 -19.000 +-57.700 -19.000 +-57.700 -19.000 +-57.719 -18.979 +-57.719 -18.968 +-57.717 -18.967 +-57.717 -18.967 +-57.719 -18.900 +-57.719 -18.900 +-57.764 -18.900 +-57.731 -18.899 +-57.717 -18.883 +-57.743 -18.899 +-57.754 -18.899 +-57.766 -18.899 +-57.766 -18.899 +-57.450 -18.217 +-57.450 -18.217 +-57.500 -18.183 +-57.500 -18.183 +-57.617 -18.000 +-57.617 -18.000 +-57.700 -17.717 +-57.700 -17.717 +-57.750 -17.717 +-57.750 -17.667 +-57.767 -17.650 +-57.767 -17.633 +-57.800 -17.567 +-57.750 -17.550 +-57.750 -17.550 +-57.817 -17.500 +-57.817 -17.500 +-57.967 -17.500 +-57.967 -17.500 +-58.017 -17.500 +-58.050 -17.467 +-58.133 -17.400 +-58.217 -17.350 +-58.250 -17.333 +-58.283 -17.283 +-58.383 -17.200 +-58.383 -17.133 +-58.383 -17.117 +-58.417 -17.100 +-58.433 -17.000 +-58.467 -16.933 +-58.450 -16.883 +-58.450 -16.867 +-58.467 -16.800 +-58.450 -16.767 +-58.467 -16.717 +-58.450 -16.650 +-58.417 -16.583 +-58.333 -16.517 +-58.317 -16.483 +-58.333 -16.433 +-58.350 -16.417 +-58.333 -16.400 +-58.333 -16.383 +-58.317 -16.383 +-58.300 -16.367 +-58.300 -16.300 +-58.317 -16.267 +-58.350 -16.283 +-58.383 -16.267 +-58.400 -16.283 +-58.417 -16.317 +-58.417 -16.317 +-58.500 -16.319 +-58.500 -16.319 +-60.000 -16.267 +-60.173 -16.267 +-60.196 -16.000 +-60.239 -15.474 +-60.239 -15.474 +-60.575 -15.097 +-60.575 -15.097 +-60.234 -15.085 +-60.234 -15.085 +-60.233 -15.000 +-60.233 -15.000 +-60.267 -14.617 +-60.267 -14.617 +-60.267 -14.617 +-60.273 -14.621 +-60.283 -14.633 +-60.317 -14.617 +-60.333 -14.567 +-60.350 -14.517 +-60.367 -14.500 +-60.367 -14.483 +-60.383 -14.467 +-60.383 -14.450 +-60.400 -14.385 +-60.400 -14.367 +-60.400 -14.367 +-60.417 -14.350 +-60.450 -14.317 +-60.467 -14.267 +-60.450 -14.233 +-60.483 -14.183 +-60.483 -14.100 +-60.450 -14.083 +-60.400 -14.017 +-60.384 -13.985 +-60.383 -13.983 +-60.400 -13.983 +-60.433 -13.967 +-60.400 -13.950 +-60.450 -13.933 +-60.450 -13.883 +-60.467 -13.900 +-60.483 -13.883 +-60.450 -13.850 +-60.483 -13.850 +-60.467 -13.833 +-60.483 -13.833 +-60.467 -13.800 +-60.483 -13.783 +-60.517 -13.783 +-60.517 -13.767 +-60.533 -13.767 +-60.550 -13.783 +-60.583 -13.750 +-60.600 -13.733 +-60.617 -13.733 +-60.617 -13.717 +-60.650 -13.733 +-60.683 -13.700 +-60.717 -13.700 +-60.717 -13.700 +-60.733 -13.683 +-60.767 -13.683 +-60.767 -13.667 +-60.800 -13.650 +-60.817 -13.650 +-60.817 -13.633 +-60.850 -13.633 +-60.883 -13.617 +-60.900 -13.600 +-60.900 -13.583 +-60.917 -13.567 +-60.917 -13.533 +-60.950 -13.550 +-60.967 -13.533 +-60.983 -13.533 +-61.000 -13.567 +-61.017 -13.533 +-61.000 -13.517 +-61.017 -13.517 +-61.000 -13.500 +-61.050 -13.483 +-61.050 -13.500 +-61.033 -13.500 +-61.067 -13.517 +-61.083 -13.500 +-61.100 -13.500 +-61.100 -13.533 +-61.133 -13.517 +-61.150 -13.533 +-61.167 -13.517 +-61.183 -13.517 +-61.183 -13.533 +-61.250 -13.533 +-61.250 -13.500 +-61.283 -13.500 +-61.300 -13.483 +-61.300 -13.500 +-61.333 -13.500 +-61.350 -13.517 +-61.383 -13.517 +-61.400 -13.533 +-61.467 -13.550 +-61.517 -13.550 +-61.533 -13.517 +-61.567 -13.517 +-61.567 -13.500 +-61.583 -13.483 +-61.583 -13.500 +-61.600 -13.500 +-61.617 -13.517 +-61.617 -13.483 +-61.633 -13.517 +-61.650 -13.517 +-61.683 -13.500 +-61.700 -13.517 +-61.717 -13.517 +-61.750 -13.533 +-61.767 -13.533 +-61.783 -13.517 +-61.783 -13.533 +-61.817 -13.533 +-61.850 -13.533 +-61.850 -13.533 +-61.867 -13.517 +-61.883 -13.433 +-61.917 -13.433 +-61.933 -13.400 +-61.950 -13.400 +-61.967 -13.383 +-61.983 -13.367 +-62.017 -13.350 +-62.017 -13.333 +-62.050 -13.333 +-62.050 -13.300 +-62.083 -13.283 +-62.100 -13.267 +-62.117 -13.183 +-62.117 -13.150 +-62.133 -13.150 +-62.133 -13.167 +-62.150 -13.167 +-62.150 -13.133 +-62.167 -13.117 +-62.183 -13.150 +-62.200 -13.117 +-62.233 -13.117 +-62.250 -13.150 +-62.283 -13.150 +-62.300 -13.150 +-62.367 -13.133 +-62.400 -13.133 +-62.433 -13.100 +-62.433 -13.083 +-62.450 -13.083 +-62.450 -13.067 +-62.483 -13.067 +-62.483 -13.083 +-62.500 -13.083 +-62.517 -13.067 +-62.550 -13.083 +-62.600 -13.050 +-62.600 -13.017 +-62.633 -13.017 +-62.633 -13.000 +-62.650 -12.967 +-62.667 -12.983 +-62.683 -12.983 +-62.683 -13.000 +-62.717 -13.000 +-62.717 -13.017 +-62.733 -13.017 +-62.733 -13.000 +-62.750 -13.017 +-62.800 -13.000 +-62.783 -12.983 +-62.800 -12.950 +-62.817 -12.933 +-62.833 -12.950 +-62.850 -12.933 +-62.867 -12.900 +-62.883 -12.883 +-62.900 -12.850 +-62.950 -12.850 +-62.967 -12.867 +-62.983 -12.850 +-63.000 -12.833 +-63.017 -12.800 +-63.050 -12.733 +-63.067 -12.733 +-63.083 -12.717 +-63.067 -12.683 +-63.100 -12.683 +-63.100 -12.667 +-63.133 -12.650 +-63.150 -12.617 +-63.167 -12.617 +-63.167 -12.650 +-63.200 -12.617 +-63.200 -12.650 +-63.217 -12.667 +-63.233 -12.667 +-63.233 -12.683 +-63.250 -12.700 +-63.333 -12.667 +-63.367 -12.667 +-63.417 -12.617 +-63.433 -12.617 +-63.433 -12.583 +-63.467 -12.567 +-63.500 -12.567 +-63.517 -12.550 +-63.550 -12.517 +-63.567 -12.500 +-63.617 -12.500 +-63.633 -12.483 +-63.667 -12.467 +-63.733 -12.450 +-63.767 -12.450 +-63.783 -12.433 +-63.783 -12.450 +-63.817 -12.450 +-63.833 -12.467 +-63.883 -12.450 +-63.883 -12.500 +-63.917 -12.517 +-63.950 -12.533 +-63.967 -12.517 +-64.000 -12.517 +-64.000 -12.500 +-64.033 -12.517 +-64.050 -12.500 +-64.100 -12.500 +-64.117 -12.483 +-64.133 -12.483 +-64.133 -12.517 +-64.167 -12.517 +-64.167 -12.467 +-64.233 -12.467 +-64.250 -12.483 +-64.283 -12.500 +-64.283 -12.467 +-64.367 -12.467 +-64.400 -12.450 +-64.450 -12.400 +-64.500 -12.367 +-64.500 -12.350 +-64.483 -12.333 +-64.483 -12.267 +-64.500 -12.233 +-64.517 -12.233 +-64.533 -12.250 +-64.583 -12.217 +-64.600 -12.233 +-64.683 -12.200 +-64.700 -12.183 +-64.700 -12.133 +-64.683 -12.100 +-64.717 -12.100 +-64.733 -12.117 +-64.733 -12.167 +-64.750 -12.167 +-64.750 -12.100 +-64.800 -12.100 +-64.817 -12.133 +-64.833 -12.100 +-64.800 -12.083 +-64.800 -12.050 +-64.833 -12.017 +-64.867 -12.017 +-64.900 -12.033 +-64.950 -12.000 +-64.967 -12.033 +-64.983 -12.033 +-65.000 -12.000 +-65.033 -11.983 +-65.033 -11.917 +-65.017 -11.900 +-65.017 -11.883 +-65.050 -11.883 +-65.067 -11.867 +-65.067 -11.783 +-65.083 -11.700 +-65.100 -11.700 +-65.133 -11.717 +-65.183 -11.717 +-65.167 -11.733 +-65.183 -11.750 +-65.217 -11.733 +-65.267 -11.700 +-65.250 -11.683 +-65.233 -11.667 +-65.217 -11.633 +-65.233 -11.567 +-65.217 -11.550 +-65.217 -11.517 +-65.233 -11.500 +-65.283 -11.500 +-65.317 -11.483 +-65.333 -11.350 +-65.317 -11.333 +-65.300 -11.333 +-65.283 -11.317 +-65.333 -11.317 +-65.350 -11.300 +-65.350 -11.283 +-65.367 -11.217 +-65.317 -11.200 +-65.317 -11.183 +-65.333 -11.183 +-65.367 -11.167 +-65.367 -11.133 +-65.283 -11.100 +-65.283 -11.083 +-65.283 -11.050 +-65.300 -11.033 +-65.283 -11.017 +-65.250 -10.983 +-65.267 -10.950 +-65.267 -10.883 +-65.283 -10.867 +-65.333 -10.800 +-65.367 -10.783 +-65.350 -10.767 +-65.350 -10.667 +-65.367 -10.650 +-65.383 -10.633 +-65.400 -10.633 +-65.417 -10.617 +-65.400 -10.583 +-65.400 -10.550 +-65.417 -10.533 +-65.400 -10.500 +-65.417 -10.483 +-65.433 -10.483 +-65.400 -10.450 +-65.383 -10.417 +-65.383 -10.367 +-65.367 -10.367 +-65.383 -10.367 +-65.383 -10.350 +-65.367 -10.350 +-65.333 -10.317 +-65.300 -10.217 +-65.317 -10.167 +-65.300 -10.100 +-65.317 -10.067 +-65.333 -10.050 +-65.317 -10.000 +-65.333 -9.983 +-65.333 -9.933 +-65.317 -9.917 +-65.300 -9.883 +-65.283 -9.867 +-65.283 -9.850 +-65.317 -9.817 +-65.383 -9.700 +-65.433 -9.667 +-65.435 -9.667 +-65.433 -9.667 +-65.467 -9.717 +-65.500 -9.717 +-65.500 -9.783 +-65.517 -9.800 +-65.533 -9.783 +-65.533 -9.800 +-65.567 -9.817 +-65.550 -9.833 +-65.633 -9.833 +-65.633 -9.800 +-65.650 -9.817 +-65.650 -9.800 +-65.667 -9.800 +-65.667 -9.783 +-65.683 -9.800 +-65.717 -9.817 +-65.700 -9.783 +-65.700 -9.767 +-65.683 -9.767 +-65.683 -9.750 +-65.700 -9.750 +-65.733 -9.767 +-65.767 -9.767 +-65.767 -9.733 +-65.783 -9.733 +-65.783 -9.783 +-65.817 -9.783 +-65.800 -9.750 +-65.817 -9.750 +-65.850 -9.783 +-65.900 -9.800 +-65.867 -9.783 +-65.867 -9.750 +-65.883 -9.750 +-65.917 -9.767 +-65.967 -9.767 +-65.967 -9.800 +-66.000 -9.800 +-66.000 -9.783 +-66.033 -9.817 +-66.050 -9.783 +-66.083 -9.783 +-66.100 -9.817 +-66.117 -9.783 +-66.133 -9.800 +-66.167 -9.783 +-66.200 -9.800 +-66.200 -9.800 +-66.217 -9.833 +-66.233 -9.817 +-66.250 -9.817 +-66.283 -9.817 +-66.283 -9.833 +-66.350 -9.833 +-66.367 -9.850 +-66.417 -9.867 +-66.417 -9.883 +-66.433 -9.900 +-66.433 -9.883 +-66.433 -9.867 +-66.483 -9.867 +-66.533 -9.883 +-66.567 -9.883 +-66.600 -9.900 +-66.617 -9.900 +-66.623 -9.906 +-66.623 -9.906 +-66.633 -9.950 +-66.667 -9.933 +-66.667 -9.950 +-66.767 -10.000 +-66.767 -10.017 +-66.809 -10.035 +-66.833 -10.067 +-66.883 -10.083 +-66.883 -10.100 +-66.933 -10.150 +-66.950 -10.167 +-67.000 -10.217 +-66.983 -10.217 +-67.010 -10.242 +-67.050 -10.267 +-67.100 -10.283 +-67.150 -10.300 +-67.133 -10.317 +-67.167 -10.317 +-67.167 -10.333 +-67.186 -10.335 +-67.184 -10.333 +-67.183 -10.333 +-67.190 -10.337 +-67.200 -10.317 +-67.217 -10.300 +-67.250 -10.317 +-67.267 -10.317 +-67.283 -10.333 +-67.300 -10.333 +-67.300 -10.367 +-67.333 -10.367 +-67.367 -10.383 +-67.367 -10.367 +-67.400 -10.367 +-67.467 -10.433 +-67.483 -10.467 +-67.533 -10.500 +-67.568 -10.517 +-67.584 -10.518 +-67.617 -10.567 +-67.650 -10.617 +-67.667 -10.600 +-67.677 -10.612 +-67.667 -10.600 +-67.680 -10.621 +-67.683 -10.630 +-67.683 -10.633 +-67.686 -10.638 +-67.683 -10.633 +-67.689 -10.647 +-67.691 -10.656 +-67.683 -10.650 +-67.694 -10.665 +-67.683 -10.667 +-67.697 -10.673 +-67.683 -10.667 +-67.700 -10.682 +-67.702 -10.691 +-67.700 -10.683 +-67.705 -10.700 +-67.700 -10.700 +-67.701 -10.701 +-67.733 -10.700 +-67.783 -10.683 +-67.806 -10.664 +-67.833 -10.650 +-67.883 -10.650 +-67.900 -10.650 +-68.000 -10.650 +-68.033 -10.667 +-68.050 -10.683 +-68.083 -10.700 +-68.101 -10.715 +-68.112 -10.716 +-68.100 -10.733 +-68.183 -10.867 +-68.183 -10.917 +-68.233 -10.950 +-68.267 -10.983 +-68.283 -10.983 +-68.317 -11.000 +-68.317 -11.017 +-68.344 -11.015 +-68.367 -11.017 +-68.400 -11.050 +-68.483 -11.050 +-68.500 -11.067 +-68.534 -11.101 +-68.534 -11.101 +-68.702 -11.135 +-68.702 -11.135 +-68.736 -11.146 +-68.717 -11.117 +-68.717 -11.100 +-68.733 -11.083 +-68.761 -11.093 +-68.733 -11.067 +-68.767 -11.050 +-68.750 -11.033 +-68.735 -11.017 +-68.735 -11.002 +-68.750 -11.000 +-68.767 -10.983 +-68.767 -11.000 +-68.800 -11.000 +-68.817 -10.983 +-68.833 -11.000 +-68.867 -11.000 +-68.867 -11.017 +-68.883 -11.000 +-68.917 -11.017 +-68.917 -11.000 +-68.950 -11.000 +-68.950 -10.983 +-68.983 -10.983 +-68.983 -11.000 +-69.017 -10.983 +-69.033 -10.967 +-69.117 -10.967 +-69.150 -10.950 +-69.217 -10.950 +-69.233 -10.933 +-69.267 -10.933 +-69.283 -10.933 +-69.300 -10.933 +-69.333 -10.950 +-69.350 -10.933 +-69.367 -10.933 +-69.367 -10.933 +-69.383 -10.933 +-69.417 -10.933 +-69.417 -10.933 +-69.417 -10.933 +-69.433 -10.933 +-69.450 -10.933 +-69.450 -10.933 +-69.467 -10.950 +-69.517 -10.950 +-69.517 -10.933 +-69.533 -10.933 +-69.533 -10.950 +-69.567 -10.933 +-69.568 -10.944 +-69.568 -10.944 +-69.600 -10.933 +-69.600 -10.950 +-69.633 -10.950 +-69.636 -10.955 +-69.667 -10.950 +-69.683 -10.967 +-69.750 -10.967 +-69.750 -10.950 +-69.767 -10.933 +-69.867 -10.933 +-69.883 -10.917 +-69.917 -10.933 +-69.917 -10.917 +-69.929 -10.923 +-69.933 -10.917 +-69.950 -10.933 +-69.967 -10.950 +-70.067 -11.000 +-70.083 -10.983 +-70.100 -11.000 +-70.133 -11.022 +-70.167 -11.050 +-70.233 -11.050 +-70.333 -11.067 +-70.433 -11.033 +-70.450 -10.983 +-70.483 -10.967 +-70.517 -10.933 +-70.517 -10.933 +-70.621 -10.000 +-70.621 -10.000 +-70.617 -9.817 +-70.617 -9.817 +-70.617 -9.817 +-70.617 -9.800 +-70.583 -9.800 +-70.567 -9.783 +-70.533 -9.783 +-70.533 -9.750 +-70.517 -9.717 +-70.533 -9.683 +-70.567 -9.667 +-70.583 -9.633 +-70.583 -9.583 +-70.600 -9.550 +-70.600 -9.550 +-70.600 -9.550 +-70.583 -9.550 +-70.550 -9.583 +-70.567 -9.533 +-70.533 -9.517 +-70.550 -9.500 +-70.533 -9.500 +-70.500 -9.500 +-70.517 -9.483 +-70.533 -9.467 +-70.517 -9.467 +-70.500 -9.450 +-70.500 -9.433 +-70.483 -9.417 +-70.483 -9.417 +-70.517 -9.433 +-70.533 -9.450 +-70.567 -9.433 +-70.600 -9.450 +-70.600 -9.467 +-70.617 -9.467 +-70.633 -9.500 +-70.650 -9.500 +-70.650 -9.517 +-70.667 -9.517 +-70.683 -9.533 +-70.717 -9.567 +-70.733 -9.567 +-70.750 -9.567 +-70.750 -9.600 +-70.783 -9.617 +-70.783 -9.633 +-70.817 -9.633 +-70.833 -9.650 +-70.850 -9.667 +-70.867 -9.667 +-70.883 -9.700 +-70.900 -9.717 +-70.917 -9.733 +-70.967 -9.750 +-70.983 -9.767 +-70.983 -9.800 +-71.050 -9.817 +-71.117 -9.833 +-71.117 -9.850 +-71.150 -9.867 +-71.183 -9.917 +-71.183 -9.917 +-71.183 -9.933 +-71.217 -9.967 +-71.250 -9.950 +-71.300 -9.983 +-71.333 -9.983 +-71.377 -9.983 +-72.000 -10.000 +-72.167 -10.000 +-72.150 -9.900 +-72.150 -9.850 +-72.150 -9.800 +-72.233 -9.750 +-72.250 -9.683 +-72.250 -9.600 +-72.283 -9.533 +-72.317 -9.533 +-72.333 -9.500 +-72.433 -9.467 +-72.517 -9.483 +-72.600 -9.450 +-72.667 -9.433 +-72.717 -9.400 +-72.731 -9.412 +-72.733 -9.400 +-72.733 -9.400 +-72.800 -9.400 +-72.800 -9.400 +-72.983 -9.400 +-72.983 -9.400 +-73.200 -9.400 +-73.200 -9.400 +-73.133 -9.317 +-73.083 -9.233 +-73.000 -9.200 +-72.967 -9.133 +-72.933 -9.050 +-72.950 -8.967 +-73.017 -8.900 +-73.067 -8.833 +-73.133 -8.750 +-73.167 -8.683 +-73.233 -8.683 +-73.267 -8.667 +-73.300 -8.633 +-73.333 -8.567 +-73.317 -8.467 +-73.383 -8.467 +-73.433 -8.400 +-73.483 -8.367 +-73.533 -8.333 +-73.550 -8.250 +-73.550 -8.250 +-73.583 -8.200 +-73.583 -8.117 +-73.633 -8.050 +-73.667 -8.000 +-73.683 -8.000 +-73.700 -7.967 +-73.717 -7.950 +-73.750 -7.967 +-73.767 -7.917 +-73.750 -7.900 +-73.767 -7.900 +-73.767 -7.883 +-73.767 -7.867 +-73.767 -7.850 +-73.717 -7.867 +-73.700 -7.850 +-73.683 -7.850 +-73.683 -7.800 +-73.683 -7.767 +-73.750 -7.750 +-73.750 -7.717 +-73.817 -7.733 +-73.817 -7.700 +-73.850 -7.700 +-73.867 -7.667 +-73.883 -7.667 +-73.883 -7.633 +-73.917 -7.600 +-73.933 -7.617 +-73.967 -7.583 +-73.983 -7.550 +-73.983 -7.533 +-73.983 -7.533 +-73.933 -7.500 +-73.917 -7.483 +-73.950 -7.433 +-73.933 -7.400 +-73.967 -7.383 +-73.967 -7.350 +-73.933 -7.350 +-73.917 -7.383 +-73.883 -7.383 +-73.867 -7.367 +-73.850 -7.350 +-73.800 -7.350 +-73.783 -7.333 +-73.750 -7.350 +-73.717 -7.317 +-73.717 -7.300 +-73.717 -7.283 +-73.717 -7.250 +-73.700 -7.233 +-73.767 -7.183 +-73.750 -7.167 +-73.783 -7.167 +-73.800 -7.117 +-73.800 -7.100 +-73.800 -7.100 +-73.800 -7.100 +-73.783 -7.067 +-73.750 -7.050 +-73.733 -7.000 +-73.750 -6.967 +-73.767 -6.933 +-73.750 -6.900 +-73.700 -6.850 +-73.683 -6.817 +-73.633 -6.750 +-73.567 -6.717 +-73.533 -6.683 +-73.500 -6.683 +-73.467 -6.667 +-73.433 -6.650 +-73.400 -6.633 +-73.383 -6.617 +-73.350 -6.600 +-73.267 -6.583 +-73.250 -6.583 +-73.217 -6.583 +-73.183 -6.533 +-73.167 -6.517 +-73.150 -6.517 +-73.150 -6.500 +-73.133 -6.467 +-73.133 -6.467 +-73.133 -6.450 +-73.117 -6.433 +-73.100 -6.417 +-73.150 -6.350 +-73.167 -6.317 +-73.167 -6.283 +-73.200 -6.250 +-73.217 -6.217 +-73.217 -6.200 +-73.217 -6.183 +-73.250 -6.167 +-73.250 -6.117 +-73.233 -6.083 +-73.233 -6.067 +-73.233 -6.050 +-73.233 -6.033 +-73.183 -5.983 +-73.183 -5.950 +-73.167 -5.900 +-73.167 -5.883 +-73.133 -5.850 +-73.100 -5.817 +-73.067 -5.783 +-73.067 -5.767 +-73.017 -5.733 +-73.000 -5.700 +-72.983 -5.700 +-72.983 -5.683 +-72.967 -5.667 +-72.967 -5.600 +-72.967 -5.583 +-72.967 -5.567 +-72.967 -5.550 +-72.967 -5.533 +-72.967 -5.483 +-72.950 -5.433 +-72.917 -5.383 +-72.883 -5.333 +-72.867 -5.283 +-72.867 -5.267 +-72.883 -5.250 +-72.883 -5.183 +-72.867 -5.150 +-72.833 -5.133 +-72.817 -5.100 +-72.800 -5.117 +-72.783 -5.100 +-72.767 -5.100 +-72.767 -5.083 +-72.750 -5.083 +-72.733 -5.067 +-72.683 -5.050 +-72.650 -5.067 +-72.650 -5.050 +-72.633 -5.050 +-72.600 -5.000 +-72.600 -5.000 +-72.550 -4.967 +-72.533 -4.967 +-72.533 -4.950 +-72.517 -4.950 +-72.500 -4.950 +-72.483 -4.967 +-72.483 -4.933 +-72.467 -4.917 +-72.450 -4.900 +-72.433 -4.900 +-72.433 -4.883 +-72.417 -4.883 +-72.417 -4.867 +-72.400 -4.867 +-72.400 -4.833 +-72.383 -4.833 +-72.383 -4.817 +-72.383 -4.817 +-72.350 -4.817 +-72.333 -4.783 +-72.317 -4.783 +-72.283 -4.783 +-72.267 -4.783 +-72.267 -4.767 +-72.250 -4.783 +-72.233 -4.783 +-72.233 -4.767 +-72.217 -4.767 +-72.200 -4.750 +-72.167 -4.750 +-72.150 -4.717 +-72.150 -4.733 +-72.117 -4.717 +-72.100 -4.717 +-72.083 -4.700 +-72.083 -4.683 +-72.083 -4.667 +-72.067 -4.667 +-72.067 -4.650 +-72.050 -4.650 +-72.033 -4.617 +-72.017 -4.633 +-72.000 -4.617 +-71.983 -4.600 +-71.967 -4.617 +-71.950 -4.600 +-71.950 -4.583 +-71.917 -4.550 +-71.917 -4.533 +-71.900 -4.533 +-71.900 -4.517 +-71.833 -4.517 +-71.800 -4.500 +-71.783 -4.483 +-71.767 -4.483 +-71.767 -4.500 +-71.750 -4.500 +-71.750 -4.467 +-71.717 -4.517 +-71.683 -4.500 +-71.667 -4.500 +-71.650 -4.467 +-71.650 -4.500 +-71.633 -4.500 +-71.633 -4.483 +-71.617 -4.467 +-71.617 -4.483 +-71.633 -4.517 +-71.617 -4.533 +-71.600 -4.533 +-71.583 -4.517 +-71.550 -4.483 +-71.533 -4.467 +-71.517 -4.467 +-71.500 -4.483 +-71.517 -4.450 +-71.483 -4.450 +-71.467 -4.433 +-71.450 -4.433 +-71.450 -4.450 +-71.433 -4.433 +-71.417 -4.433 +-71.433 -4.467 +-71.417 -4.467 +-71.400 -4.433 +-71.350 -4.433 +-71.367 -4.467 +-71.333 -4.483 +-71.333 -4.450 +-71.317 -4.450 +-71.317 -4.467 +-71.300 -4.467 +-71.317 -4.417 +-71.283 -4.450 +-71.267 -4.433 +-71.283 -4.383 +-71.233 -4.383 +-71.217 -4.400 +-71.200 -4.383 +-71.200 -4.433 +-71.183 -4.400 +-71.167 -4.400 +-71.150 -4.383 +-71.133 -4.400 +-71.117 -4.417 +-71.100 -4.383 +-71.083 -4.383 +-71.083 -4.400 +-71.067 -4.400 +-71.050 -4.367 +-71.050 -4.400 +-71.033 -4.400 +-71.017 -4.383 +-70.983 -4.383 +-71.000 -4.350 +-70.983 -4.350 +-70.967 -4.383 +-70.933 -4.383 +-70.933 -4.367 +-70.917 -4.367 +-70.900 -4.350 +-70.900 -4.333 +-70.883 -4.333 +-70.883 -4.300 +-70.850 -4.283 +-70.867 -4.267 +-70.867 -4.250 +-70.833 -4.250 +-70.817 -4.233 +-70.850 -4.233 +-70.800 -4.200 +-70.767 -4.167 +-70.750 -4.167 +-70.733 -4.183 +-70.717 -4.200 +-70.700 -4.200 +-70.683 -4.217 +-70.667 -4.150 +-70.667 -4.167 +-70.650 -4.133 +-70.633 -4.133 +-70.633 -4.150 +-70.650 -4.183 +-70.633 -4.200 +-70.583 -4.183 +-70.567 -4.217 +-70.567 -4.200 +-70.567 -4.183 +-70.550 -4.150 +-70.517 -4.150 +-70.517 -4.200 +-70.500 -4.200 +-70.500 -4.167 +-70.483 -4.167 +-70.467 -4.183 +-70.450 -4.167 +-70.450 -4.150 +-70.433 -4.133 +-70.400 -4.150 +-70.383 -4.133 +-70.367 -4.167 +-70.350 -4.183 +-70.333 -4.183 +-70.333 -4.150 +-70.317 -4.167 +-70.300 -4.167 +-70.300 -4.183 +-70.283 -4.233 +-70.317 -4.250 +-70.317 -4.267 +-70.300 -4.283 +-70.300 -4.300 +-70.267 -4.283 +-70.250 -4.283 +-70.267 -4.317 +-70.217 -4.317 +-70.217 -4.333 +-70.200 -4.367 +-70.183 -4.367 +-70.183 -4.333 +-70.167 -4.333 +-70.167 -4.317 +-70.183 -4.300 +-70.150 -4.283 +-70.117 -4.283 +-70.117 -4.250 +-70.100 -4.283 +-70.050 -4.300 +-70.083 -4.317 +-70.050 -4.333 +-70.033 -4.350 +-70.033 -4.350 +-70.000 -4.333 +-69.983 -4.333 +-69.950 -4.267 +-69.942 -4.227 +-69.942 -4.227 +-69.943 -4.225 +-69.933 -4.217 +-69.933 -4.217 +-69.935 -4.219 +-69.919 -4.130 +-69.883 -4.000 +-69.715 -3.000 +-69.715 -3.000 +-69.534 -2.000 +-69.534 -2.000 +-69.450 -1.533 +-69.450 -1.533 +-69.433 -1.517 +-69.450 -1.517 +-69.450 -1.483 +-69.450 -1.450 +-69.450 -1.433 +-69.433 -1.400 +-69.417 -1.367 +-69.417 -1.367 +-69.417 -1.350 +-69.417 -1.283 +-69.433 -1.250 +-69.417 -1.183 +-69.417 -1.167 +-69.400 -1.133 +-69.417 -1.083 +-69.417 -1.067 +-69.417 -1.050 +-69.433 -1.033 +-69.433 -1.000 +-69.467 -1.000 +-69.483 -.950 +-69.517 -.933 +-69.533 -.917 +-69.533 -.867 +-69.567 -.850 +-69.583 -.800 +-69.633 -.750 +-69.583 -.683 +-69.567 -.650 +-69.600 -.600 +-69.600 -.550 +-69.633 -.517 +-69.667 -.483 +-69.717 -.467 +-69.767 -.433 +-69.833 -.383 +-69.850 -.350 +-69.917 -.350 +-69.967 -.300 +-70.000 -.250 +-70.067 -.183 +-70.050 -.133 +-70.050 -.117 +-70.044 -.108 +-70.044 -.108 +-70.044 -.000 +-70.044 .000 +-70.033 .551 +-70.017 .533 +-69.983 .533 +-69.983 .567 +-69.950 .550 +-69.933 .550 +-69.917 .583 +-69.867 .567 +-69.833 .583 +-69.800 .567 +-69.750 .617 +-69.717 .633 +-69.717 .650 +-69.700 .650 +-69.683 .667 +-69.650 .667 +-69.650 .650 +-69.600 .633 +-69.583 .667 +-69.550 .683 +-69.533 .683 +-69.517 .700 +-69.483 .733 +-69.433 .700 +-69.433 .683 +-69.350 .617 +-69.333 .633 +-69.317 .633 +-69.300 .650 +-69.283 .633 +-69.283 .633 +-69.300 .600 +-69.200 .600 +-69.200 .650 +-69.117 .633 +-69.117 .650 +-69.183 .733 +-69.167 .767 +-69.150 .783 +-69.167 .833 +-69.133 .867 +-69.133 .883 +-69.183 .900 +-69.183 .933 +-69.150 .950 +-69.200 .967 +-69.217 .983 +-69.200 1.000 +-69.250 1.050 +-69.267 1.050 +-69.300 1.067 +-69.367 1.100 +-69.400 1.050 +-69.417 1.050 +-69.450 1.083 +-69.567 1.083 +-69.600 1.100 +-69.683 1.083 +-69.700 1.083 +-69.700 1.100 +-69.700 1.133 +-69.717 1.117 +-69.767 1.117 +-69.817 1.067 +-69.833 1.083 +-69.833 1.068 +-69.833 1.068 +-69.833 1.700 +-69.833 1.700 +-69.833 1.700 +-69.783 1.700 +-69.733 1.733 +-69.700 1.733 +-69.650 1.733 +-69.567 1.783 +-69.533 1.783 +-69.483 1.767 +-69.433 1.767 +-69.383 1.717 +-69.383 1.717 +-69.000 1.717 +-69.000 1.717 +-68.150 1.718 +-68.150 1.718 +-68.167 1.750 +-68.167 1.767 +-68.183 1.783 +-68.217 1.783 +-68.217 1.800 +-68.217 1.817 +-68.267 1.850 +-68.250 1.917 +-68.233 1.933 +-68.217 1.933 +-68.200 1.967 +-68.200 2.000 +-68.183 2.033 +-68.183 2.033 +-68.167 2.017 +-68.150 1.983 +-68.100 1.933 +-68.083 1.883 +-68.050 1.883 +-68.000 1.850 +-67.950 1.817 +-67.917 1.833 +-67.900 1.883 +-67.850 1.900 +-67.833 1.950 +-67.783 2.000 +-67.767 2.017 +-67.767 2.033 +-67.717 2.033 +-67.667 2.017 +-67.633 2.017 +-67.600 2.017 +-67.583 2.083 +-67.517 2.167 +-67.467 2.183 +-67.433 2.233 +-67.417 2.250 +-67.367 2.233 +-67.350 2.217 +-67.333 2.100 +-67.317 2.000 +-67.283 1.883 +-67.267 1.867 +-67.167 1.850 +-67.150 1.833 +-67.100 1.767 +-67.083 1.683 +-67.067 1.617 +-67.067 1.433 +-67.083 1.317 +-67.083 1.283 +-67.083 1.167 +-67.083 1.167 +-66.833 1.217 +-66.833 1.217 +-66.833 1.217 +-66.833 1.217 +-66.833 1.217 +-66.597 1.000 +-66.597 1.000 +-66.317 .750 +-66.317 .750 +-66.301 .733 +-66.300 .733 +-66.300 .733 +-66.300 .733 +-66.200 .767 +-66.200 .767 +-66.150 .750 +-66.150 .750 +-66.134 .733 +-66.134 .733 +-66.083 .750 +-66.083 .750 +-66.050 .800 +-66.000 .783 +-66.000 .800 +-66.000 .800 +-65.983 .800 +-65.983 .800 +-65.967 .800 +-65.933 .850 +-65.883 .900 +-65.867 .933 +-65.867 .933 +-65.817 .933 +-65.783 .950 +-65.750 .967 +-65.733 1.000 +-65.700 1.000 +-65.667 .983 +-65.650 1.000 +-65.617 .983 +-65.600 1.000 +-65.567 .983 +-65.550 .983 +-65.533 .967 +-65.517 .933 +-65.500 .900 +-65.500 .867 +-65.500 .850 +-65.517 .817 +-65.533 .783 +-65.567 .750 +-65.583 .733 +-65.583 .717 +-65.567 .683 +-65.550 .667 +-65.533 .633 +-65.517 .667 +-65.467 .683 +-65.417 .700 +-65.400 .733 +-65.383 .750 +-65.400 .800 +-65.383 .833 +-65.367 .850 +-65.350 .883 +-65.317 .917 +-65.283 .933 +-65.250 .917 +-65.200 .917 +-65.183 .917 +-65.150 .967 +-65.150 1.000 +-65.150 1.033 +-65.150 1.083 +-65.117 1.133 +-65.050 1.133 +-65.017 1.100 +-65.000 1.117 +-64.967 1.167 +-64.950 1.200 +-64.917 1.200 +-64.867 1.217 +-64.833 1.267 +-64.767 1.283 +-64.767 1.233 +-64.717 1.233 +-64.683 1.283 +-64.617 1.317 +-64.567 1.333 +-64.550 1.383 +-64.517 1.433 +-64.467 1.467 +-64.400 1.500 +-64.333 1.500 +-64.367 1.450 +-64.383 1.417 +-64.367 1.383 +-64.333 1.350 +-64.317 1.383 +-64.300 1.433 +-64.267 1.467 +-64.217 1.500 +-64.200 1.500 +-64.167 1.550 +-64.117 1.567 +-64.083 1.617 +-64.067 1.650 +-64.050 1.700 +-64.067 1.750 +-64.050 1.800 +-64.050 1.867 +-64.050 1.917 +-64.000 1.950 +-63.967 1.983 +-63.933 1.983 +-63.883 1.983 +-63.883 1.983 +-63.833 1.967 +-63.817 1.983 +-63.817 1.983 +-63.767 1.967 +-63.733 1.983 +-63.767 1.983 +-63.717 2.017 +-63.683 2.033 +-63.667 2.017 +-63.650 2.033 +-63.633 2.067 +-63.617 2.100 +-63.567 2.117 +-63.533 2.117 +-63.500 2.100 +-63.467 2.133 +-63.417 2.117 +-63.383 2.133 +-63.383 2.183 +-63.385 2.184 +-63.379 2.218 +-63.367 2.233 +-63.367 2.233 +-63.359 2.268 +-63.361 2.318 +-63.372 2.335 +-63.357 2.384 +-63.367 2.417 +-63.383 2.433 +-63.500 2.433 +-63.567 2.400 +-63.733 2.367 +-63.900 2.450 +-63.933 2.450 +-63.950 2.467 +-63.983 2.467 +-64.017 2.467 +-64.017 2.467 +-64.033 2.483 +-64.050 2.500 +-64.033 2.533 +-64.017 2.567 +-64.000 2.600 +-63.983 2.617 +-63.983 2.667 +-64.000 2.700 +-63.983 2.717 +-64.000 2.750 +-64.000 2.767 +-64.000 2.800 +-64.033 2.817 +-64.067 2.867 +-64.067 2.933 +-64.117 2.950 +-64.133 3.017 +-64.150 3.033 +-64.183 3.083 +-64.233 3.117 +-64.217 3.133 +-64.200 3.200 +-64.200 3.233 +-64.233 3.350 +-64.217 3.383 +-64.250 3.417 +-64.233 3.450 +-64.183 3.500 +-64.183 3.567 +-64.183 3.567 +-64.200 3.600 +-64.233 3.633 +-64.250 3.650 +-64.267 3.667 +-64.317 3.717 +-64.333 3.733 +-64.350 3.733 +-64.383 3.767 +-64.433 3.783 +-64.467 3.783 +-64.500 3.817 +-64.550 3.867 +-64.567 3.883 +-64.583 3.933 +-64.633 3.967 +-64.667 4.000 +-64.667 4.000 +-64.733 4.117 +-64.767 4.133 +-64.800 4.167 +-64.817 4.217 +-64.817 4.267 +-64.800 4.267 +-64.800 4.283 +-64.767 4.283 +-64.717 4.267 +-64.667 4.217 +-64.633 4.150 +-64.600 4.117 +-64.550 4.100 +-64.533 4.100 +-64.500 4.117 +-64.450 4.133 +-64.333 4.117 +-64.333 4.133 +-64.300 4.150 +-64.233 4.117 +-64.167 4.117 +-64.133 4.100 +-64.136 4.108 +-64.117 4.100 +-64.117 4.083 +-64.083 4.000 +-64.050 3.967 +-64.050 3.917 +-64.033 3.883 +-63.983 3.867 +-63.967 3.883 +-63.917 3.933 +-63.900 3.950 +-63.850 3.967 +-63.817 3.967 +-63.801 3.935 +-63.783 3.933 +-63.783 3.950 +-63.733 3.950 +-63.683 3.950 +-63.650 3.967 +-63.624 3.967 +-63.600 3.950 +-63.533 3.867 +-63.500 3.850 +-63.450 3.883 +-63.433 3.950 +-63.445 3.962 +-63.417 3.983 +-63.333 3.967 +-63.250 3.917 +-63.233 3.900 +-63.217 3.883 +-63.217 3.883 +-63.217 3.883 +-63.217 3.883 +-63.217 3.867 +-63.217 3.867 +-63.217 3.850 +-63.217 3.850 +-63.217 3.833 +-63.217 3.833 +-63.217 3.833 +-63.200 3.817 +-63.200 3.817 +-63.200 3.800 +-63.183 3.800 +-63.183 3.800 +-63.183 3.800 +-63.167 3.800 +-63.167 3.800 +-63.150 3.800 +-63.133 3.800 +-63.133 3.800 +-63.117 3.800 +-63.117 3.800 +-63.100 3.800 +-63.100 3.783 +-63.100 3.783 +-63.083 3.783 +-63.083 3.767 +-63.083 3.767 +-63.067 3.767 +-63.067 3.750 +-63.067 3.750 +-63.050 3.733 +-63.050 3.733 +-63.050 3.717 +-63.050 3.717 +-63.050 3.700 +-63.050 3.700 +-63.067 3.683 +-63.067 3.683 +-63.067 3.683 +-63.050 3.683 +-63.050 3.667 +-63.033 3.667 +-63.017 3.667 +-63.017 3.650 +-63.017 3.650 +-63.000 3.633 +-63.000 3.633 +-63.000 3.617 +-63.000 3.617 +-62.983 3.617 +-62.983 3.600 +-62.967 3.600 +-62.967 3.600 +-62.950 3.600 +-62.950 3.600 +-62.950 3.600 +-62.933 3.617 +-62.933 3.617 +-62.933 3.617 +-62.917 3.633 +-62.917 3.633 +-62.917 3.650 +-62.917 3.650 +-62.917 3.667 +-62.900 3.667 +-62.900 3.667 +-62.883 3.667 +-62.883 3.667 +-62.883 3.683 +-62.867 3.683 +-62.867 3.683 +-62.867 3.700 +-62.850 3.700 +-62.850 3.700 +-62.833 3.717 +-62.833 3.717 +-62.833 3.733 +-62.817 3.733 +-62.817 3.733 +-62.800 3.717 +-62.800 3.717 +-62.800 3.717 +-62.783 3.717 +-62.783 3.717 +-62.783 3.700 +-62.783 3.700 +-62.767 3.683 +-62.767 3.683 +-62.750 3.683 +-62.750 3.667 +-62.753 3.676 +-62.733 3.667 +-62.717 3.700 +-62.733 3.767 +-62.733 3.783 +-62.767 3.833 +-62.767 3.833 +-62.750 3.850 +-62.750 3.867 +-62.750 3.867 +-62.767 3.884 +-62.768 3.884 +-62.767 3.917 +-62.767 3.933 +-62.750 3.950 +-62.750 3.967 +-62.750 4.000 +-62.767 4.000 +-62.750 4.000 +-62.750 4.017 +-62.733 4.033 +-62.700 4.033 +-62.667 4.033 +-62.650 4.033 +-62.617 4.033 +-62.600 4.033 +-62.567 4.017 +-62.550 4.017 +-62.550 4.033 +-62.533 4.050 +-62.533 4.067 +-62.533 4.083 +-62.533 4.100 +-62.517 4.117 +-62.500 4.133 +-62.467 4.133 +-62.450 4.150 +-62.450 4.167 +-62.433 4.183 +-62.403 4.179 +-62.367 4.167 +-62.333 4.150 +-62.317 4.133 +-62.284 4.134 +-62.267 4.117 +-62.250 4.117 +-62.200 4.100 +-62.183 4.083 +-62.150 4.083 +-62.133 4.067 +-62.100 4.083 +-62.083 4.117 +-62.067 4.117 +-62.050 4.150 +-62.017 4.150 +-61.967 4.167 +-61.967 4.150 +-61.950 4.150 +-61.933 4.117 +-61.917 4.133 +-61.923 4.137 +-61.900 4.150 +-61.867 4.150 +-61.850 4.167 +-61.833 4.150 +-61.817 4.167 +-61.800 4.200 +-61.784 4.218 +-61.767 4.233 +-61.743 4.256 +-61.717 4.250 +-61.717 4.233 +-61.694 4.254 +-61.650 4.250 +-61.641 4.239 +-61.600 4.250 +-61.580 4.248 +-61.533 4.250 +-61.521 4.288 +-61.508 4.316 +-61.517 4.333 +-61.500 4.367 +-61.483 4.400 +-61.466 4.425 +-61.433 4.417 +-61.420 4.433 +-61.367 4.417 +-61.333 4.400 +-61.333 4.417 +-61.333 4.417 +-61.333 4.417 +-61.317 4.417 +-61.317 4.417 +-61.317 4.433 +-61.317 4.433 +-61.317 4.433 +-61.300 4.433 +-61.300 4.450 +-61.300 4.450 +-61.300 4.450 +-61.283 4.450 +-61.283 4.450 +-61.283 4.450 +-61.283 4.450 +-61.267 4.467 +-61.267 4.450 +-61.267 4.467 +-61.267 4.467 +-61.283 4.467 +-61.283 4.483 +-61.283 4.483 +-61.300 4.483 +-61.300 4.500 +-61.300 4.483 +-61.300 4.500 +-61.300 4.500 +-61.317 4.500 +-61.317 4.500 +-61.317 4.500 +-61.317 4.517 +-61.317 4.517 +-61.317 4.517 +-61.317 4.517 +-61.300 4.533 +-61.300 4.533 +-61.283 4.533 +-61.283 4.533 +-61.283 4.533 +-61.283 4.533 +-61.267 4.533 +-61.267 4.517 +-61.267 4.517 +-61.267 4.517 +-61.250 4.533 +-61.250 4.533 +-61.250 4.517 +-61.233 4.517 +-61.233 4.533 +-61.245 4.533 +-61.233 4.517 +-61.233 4.517 +-61.217 4.517 +-61.217 4.517 +-61.217 4.517 +-61.217 4.517 +-61.217 4.517 +-61.217 4.517 +-61.200 4.517 +-61.200 4.517 +-61.200 4.517 +-61.200 4.500 +-61.200 4.500 +-61.183 4.500 +-61.183 4.500 +-61.183 4.517 +-61.183 4.517 +-61.183 4.517 +-61.183 4.500 +-61.183 4.500 +-61.167 4.500 +-61.167 4.500 +-61.167 4.500 +-61.167 4.500 +-61.167 4.500 +-61.167 4.483 +-61.167 4.483 +-61.150 4.483 +-61.150 4.483 +-61.150 4.483 +-61.150 4.483 +-61.150 4.483 +-61.150 4.483 +-61.150 4.483 +-61.150 4.483 +-61.150 4.483 +-61.133 4.483 +-61.133 4.483 +-61.133 4.483 +-61.133 4.483 +-61.133 4.467 +-61.133 4.467 +-61.148 4.483 +-61.133 4.467 +-61.133 4.467 +-61.133 4.483 +-61.133 4.483 +-61.133 4.483 +-61.133 4.483 +-61.117 4.483 +-61.117 4.483 +-61.117 4.483 +-61.117 4.483 +-61.117 4.500 +-61.117 4.500 +-61.117 4.500 +-61.100 4.500 +-61.100 4.500 +-61.100 4.500 +-61.100 4.500 +-61.100 4.500 +-61.083 4.500 +-61.083 4.500 +-61.083 4.517 +-61.083 4.517 +-61.067 4.500 +-61.067 4.500 +-61.067 4.500 +-61.067 4.500 +-61.067 4.517 +-61.050 4.517 +-61.050 4.517 +-61.050 4.517 +-61.050 4.517 +-61.033 4.517 +-61.033 4.517 +-61.033 4.517 +-61.033 4.517 +-61.033 4.517 +-61.017 4.517 +-61.017 4.517 +-61.017 4.517 +-61.017 4.517 +-61.017 4.500 +-61.000 4.500 +-61.000 4.500 +-61.000 4.500 +-61.000 4.500 +-60.983 4.500 +-60.983 4.500 +-60.984 4.502 +-60.983 4.517 +-60.983 4.517 +-60.994 4.520 +-60.983 4.517 +-60.983 4.517 +-60.983 4.533 +-60.967 4.533 +-60.967 4.533 +-60.967 4.533 +-60.967 4.533 +-60.950 4.533 +-60.950 4.533 +-60.950 4.533 +-60.950 4.533 +-60.950 4.550 +-60.950 4.550 +-60.950 4.550 +-60.950 4.550 +-60.950 4.550 +-60.950 4.567 +-60.950 4.567 +-60.933 4.567 +-60.933 4.567 +-60.933 4.567 +-60.933 4.567 +-60.917 4.567 +-60.917 4.567 +-60.933 4.583 +-60.933 4.583 +-60.933 4.583 +-60.917 4.600 +-60.933 4.600 +-60.933 4.600 +-60.933 4.616 +-60.917 4.617 +-60.933 4.617 +-60.933 4.617 +-60.933 4.617 +-60.933 4.617 +-60.933 4.617 +-60.933 4.617 +-60.933 4.633 +-60.933 4.633 +-60.933 4.633 +-60.933 4.633 +-60.933 4.633 +-60.933 4.633 +-60.933 4.650 +-60.933 4.650 +-60.933 4.650 +-60.933 4.650 +-60.933 4.650 +-60.917 4.650 +-60.917 4.650 +-60.917 4.650 +-60.917 4.650 +-60.917 4.650 +-60.917 4.650 +-60.900 4.667 +-60.900 4.667 +-60.900 4.667 +-60.900 4.667 +-60.900 4.683 +-60.900 4.683 +-60.900 4.683 +-60.900 4.683 +-60.900 4.683 +-60.900 4.683 +-60.900 4.700 +-60.900 4.700 +-60.900 4.700 +-60.900 4.700 +-60.900 4.700 +-60.883 4.700 +-60.883 4.700 +-60.883 4.700 +-60.883 4.700 +-60.867 4.700 +-60.867 4.700 +-60.874 4.714 +-60.867 4.700 +-60.850 4.700 +-60.850 4.700 +-60.850 4.700 +-60.850 4.700 +-60.833 4.700 +-60.833 4.700 +-60.833 4.700 +-60.833 4.700 +-60.833 4.700 +-60.833 4.700 +-60.833 4.717 +-60.817 4.717 +-60.817 4.717 +-60.817 4.717 +-60.817 4.717 +-60.817 4.717 +-60.800 4.717 +-60.800 4.717 +-60.800 4.733 +-60.800 4.733 +-60.800 4.750 +-60.800 4.733 +-60.800 4.733 +-60.783 4.733 +-60.783 4.733 +-60.783 4.733 +-60.783 4.733 +-60.783 4.750 +-60.767 4.750 +-60.767 4.750 +-60.767 4.750 +-60.767 4.750 +-60.750 4.750 +-60.750 4.750 +-60.750 4.750 +-60.733 4.750 +-60.733 4.750 +-60.733 4.750 +-60.733 4.750 +-60.733 4.750 +-60.733 4.767 +-60.717 4.767 +-60.717 4.767 +-60.717 4.767 +-60.717 4.767 +-60.717 4.767 +-60.717 4.767 +-60.717 4.767 +-60.717 4.767 +-60.717 4.783 +-60.717 4.783 +-60.723 4.793 +-60.717 4.783 +-60.717 4.783 +-60.700 4.783 +-60.700 4.800 +-60.700 4.800 +-60.700 4.800 +-60.700 4.800 +-60.700 4.800 +-60.683 4.800 +-60.683 4.800 +-60.683 4.800 +-60.683 4.800 +-60.683 4.800 +-60.683 4.800 +-60.683 4.817 +-60.683 4.817 +-60.667 4.817 +-60.667 4.817 +-60.667 4.817 +-60.667 4.817 +-60.667 4.833 +-60.667 4.833 +-60.667 4.833 +-60.667 4.833 +-60.650 4.833 +-60.650 4.833 +-60.650 4.833 +-60.650 4.833 +-60.650 4.850 +-60.650 4.850 +-60.650 4.850 +-60.650 4.850 +-60.633 4.867 +-60.633 4.867 +-60.633 4.867 +-60.650 4.867 +-60.633 4.867 +-60.633 4.883 +-60.633 4.867 +-60.633 4.883 +-60.633 4.883 +-60.617 4.883 +-60.617 4.883 +-60.617 4.883 +-60.617 4.883 +-60.617 4.883 +-60.617 4.883 +-60.617 4.883 +-60.617 4.883 +-60.617 4.883 +-60.617 4.883 +-60.617 4.883 +-60.617 4.883 +-60.617 4.900 +-60.617 4.900 +-60.617 4.900 +-60.617 4.900 +-60.617 4.900 +-60.600 4.900 +-60.600 4.900 +-60.600 4.900 +-60.600 4.917 +-60.600 4.917 +-60.600 4.917 +-60.600 4.917 +-60.600 4.917 +-60.583 4.917 +-60.583 4.917 +-60.583 4.917 +-60.583 4.917 +-60.583 4.917 +-60.583 4.917 +-60.583 4.917 +-60.583 4.917 +-60.583 4.933 +-60.583 4.933 +-60.583 4.933 +-60.583 4.933 +-60.583 4.933 +-60.583 4.933 +-60.583 4.933 +-60.583 4.933 +-60.583 4.950 +-60.567 4.950 +-60.583 4.956 +-60.567 4.950 +-60.567 4.950 +-60.583 4.950 +-60.583 4.950 +-60.583 4.950 +-60.583 4.950 +-60.583 4.950 +-60.583 4.967 +-60.583 4.967 +-60.583 4.967 +-60.583 4.967 +-60.583 4.967 +-60.583 4.967 +-60.583 4.967 +-60.583 4.983 +-60.583 4.983 +-60.583 4.983 +-60.600 5.000 +-60.600 5.000 +-60.600 5.000 +-60.600 5.000 +-60.600 5.000 +-60.617 5.033 +-60.617 5.050 +-60.633 5.050 +-60.633 5.050 +-60.633 5.067 +-60.633 5.067 +-60.633 5.067 +-60.633 5.083 +-60.633 5.083 +-60.644 5.099 +-60.633 5.100 +-60.633 5.117 +-60.650 5.117 +-60.633 5.117 +-60.650 5.100 +-60.650 5.117 +-60.650 5.133 +-60.650 5.133 +-60.650 5.133 +-60.650 5.150 +-60.650 5.150 +-60.667 5.167 +-60.667 5.167 +-60.667 5.167 +-60.667 5.183 +-60.683 5.183 +-60.683 5.183 +-60.700 5.183 +-60.717 5.200 +-60.737 5.202 +-60.734 5.200 +-60.717 5.217 +-60.701 5.217 +-60.668 5.218 +-60.651 5.218 +-60.600 5.217 +-60.517 5.201 +-60.435 5.184 +-60.417 5.201 +-60.317 5.201 +-60.284 5.218 +-60.218 5.251 +-60.201 5.267 +-60.201 5.267 +-60.183 5.233 +-60.167 5.217 +-60.133 5.267 +-60.083 5.150 +-60.067 5.133 +-60.050 5.100 +-60.017 5.083 +-60.000 5.067 +-59.967 5.050 +-59.950 5.033 +-59.933 5.000 +-59.950 4.967 +-59.967 4.950 +-60.000 4.933 +-60.017 4.867 +-60.033 4.800 +-60.017 4.783 +-60.033 4.733 +-60.033 4.700 +-60.083 4.667 +-60.083 4.617 +-60.133 4.600 +-60.117 4.583 +-60.150 4.567 +-60.167 4.533 +-60.167 4.500 +-60.133 4.517 +-60.117 4.500 +-60.100 4.533 +-60.067 4.517 +-60.067 4.517 +-60.067 4.500 +-60.033 4.500 +-60.000 4.467 +-59.983 4.483 +-59.967 4.517 +-59.933 4.483 +-59.900 4.467 +-59.883 4.500 +-59.867 4.467 +-59.850 4.450 +-59.817 4.450 +-59.817 4.483 +-59.800 4.467 +-59.783 4.450 +-59.767 4.433 +-59.733 4.417 +-59.733 4.400 +-59.717 4.400 +-59.683 4.367 +-59.683 4.350 +-59.717 4.333 +-59.733 4.317 +-59.733 4.300 +-59.717 4.283 +-59.733 4.233 +-59.733 4.200 +-59.683 4.167 +-59.683 4.167 +-59.617 4.150 +-59.617 4.133 +-59.650 4.100 +-59.650 4.083 +-59.650 4.083 +-59.617 4.050 +-59.600 4.000 +-59.600 4.000 +-59.551 3.967 +-59.551 3.968 +-59.550 3.967 +-59.517 3.967 +-59.517 3.917 +-59.550 3.917 +-59.550 3.883 +-59.583 3.883 +-59.583 3.800 +-59.650 3.783 +-59.667 3.750 +-59.652 3.733 +-59.651 3.718 +-59.667 3.717 +-59.667 3.700 +-59.700 3.683 +-59.733 3.650 +-59.750 3.633 +-59.833 3.600 +-59.850 3.567 +-59.867 3.552 +-59.867 3.551 +-59.852 3.551 +-59.783 3.500 +-59.817 3.467 +-59.817 3.450 +-59.833 3.433 +-59.817 3.417 +-59.800 3.433 +-59.801 3.383 +-59.801 3.368 +-59.800 3.350 +-59.817 3.350 +-59.833 3.300 +-59.867 3.233 +-59.867 3.217 +-59.900 3.200 +-59.900 3.183 +-59.883 3.150 +-59.900 3.150 +-59.900 3.117 +-59.918 3.101 +-59.918 3.101 +-59.933 3.083 +-59.933 3.067 +-59.950 3.033 +-59.933 3.000 +-59.950 2.983 +-59.983 2.917 +-59.967 2.900 +-59.983 2.883 +-59.983 2.700 +-59.967 2.667 +-59.967 2.667 +-59.967 2.667 +-59.967 2.633 +-59.950 2.617 +-59.950 2.600 +-59.917 2.567 +-59.917 2.533 +-59.883 2.483 +-59.883 2.450 +-59.900 2.433 +-59.883 2.417 +-59.900 2.400 +-59.867 2.350 +-59.867 2.367 +-59.833 2.350 +-59.817 2.333 +-59.783 2.300 +-59.751 2.284 +-59.751 2.284 +-59.733 2.300 +-59.733 2.283 +-59.717 2.267 +-59.733 2.150 +-59.717 2.117 +-59.733 2.067 +-59.718 2.034 +-59.718 2.034 +-59.733 2.017 +-59.734 1.951 +-59.734 1.951 +-59.733 1.835 +-59.733 1.835 +-59.667 1.835 +-59.667 1.835 +-59.651 1.852 +-59.651 1.867 +-59.650 1.817 +-59.684 1.768 +-59.651 1.735 +-59.618 1.718 +-59.583 1.718 +-59.534 1.717 +-59.501 1.667 +-59.484 1.634 +-59.434 1.601 +-59.401 1.550 +-59.368 1.517 +-59.350 1.517 +-59.317 1.468 +-59.284 1.450 +-59.267 1.401 +-59.217 1.368 +-59.167 1.351 +-59.117 1.335 +-59.067 1.318 +-59.002 1.318 +-58.950 1.300 +-58.917 1.283 +-58.900 1.233 +-58.883 1.217 +-58.883 1.217 +-58.850 1.183 +-58.800 1.167 +-58.750 1.183 +-58.717 1.217 +-58.700 1.267 +-58.667 1.283 +-58.600 1.267 +-58.550 1.283 +-58.517 1.250 +-58.483 1.283 +-58.483 1.300 +-58.467 1.350 +-58.467 1.383 +-58.500 1.417 +-58.517 1.450 +-58.483 1.467 +-58.433 1.450 +-58.383 1.467 +-58.350 1.533 +-58.350 1.583 +-58.333 1.583 +-58.317 1.583 +-58.300 1.567 +-58.267 1.567 +-58.217 1.550 +-58.150 1.550 +-58.133 1.500 +-58.067 1.500 +-58.000 1.500 +-57.983 1.550 +-57.983 1.600 +-57.983 1.650 +-57.933 1.633 +-57.883 1.667 +-57.833 1.667 +-57.800 1.683 +-57.750 1.717 +-57.700 1.717 +-57.667 1.700 +-57.633 1.683 +-57.583 1.683 +-57.550 1.683 +-57.517 1.717 +-57.500 1.750 +-57.483 1.783 +-57.433 1.817 +-57.433 1.883 +-57.383 1.917 +-57.367 1.933 +-57.367 1.950 +-57.333 1.983 +-57.317 1.967 +-57.300 1.983 +-57.267 1.967 +-57.233 1.933 +-57.200 1.967 +-57.150 1.983 +-57.117 2.017 +-57.067 2.017 +-57.050 1.950 +-57.017 1.917 +-56.967 1.900 +-56.917 1.917 +-56.867 1.883 +-56.817 1.867 +-56.783 1.850 +-56.733 1.900 +-56.683 1.900 +-56.617 1.933 +-56.567 1.900 +-56.517 1.917 +-56.467 1.933 +-56.467 1.933 +-56.400 1.917 +-56.350 1.933 +-56.300 1.917 +-56.250 1.883 +-56.200 1.883 +-56.146 1.883 +-56.094 1.854 +-56.067 1.850 +-56.000 1.833 +-55.917 1.867 +-55.900 1.917 +-55.917 1.933 +-55.900 2.033 +-55.950 2.083 +-55.983 2.117 +-56.017 2.167 +-56.033 2.217 +-56.083 2.233 +-56.133 2.250 +-56.117 2.283 +-56.083 2.333 +-56.050 2.333 +-56.033 2.367 +-56.017 2.383 +-55.983 2.417 +-56.000 2.450 +-55.983 2.500 +-55.950 2.533 +-55.917 2.517 +-55.850 2.467 +-55.783 2.450 +-55.757 2.439 +-55.750 2.417 +-55.700 2.400 +-55.650 2.417 +-55.583 2.433 +-55.533 2.417 +-55.467 2.433 +-55.417 2.433 +-55.383 2.417 +-55.333 2.433 +-55.350 2.467 +-55.350 2.500 +-55.317 2.500 +-55.267 2.500 +-55.233 2.500 +-55.200 2.517 +-55.167 2.550 +-55.117 2.567 +-55.100 2.517 +-55.050 2.550 +-55.000 2.583 +-54.933 2.617 +-54.950 2.583 +-54.950 2.550 +-54.933 2.517 +-54.900 2.483 +-54.867 2.433 +-54.867 2.433 +-54.867 2.433 +-54.783 2.433 +-54.744 2.472 +-54.684 2.447 +-54.686 2.412 +-54.692 2.362 +-54.662 2.327 +-54.601 2.338 +-54.601 2.338 +-54.550 2.317 +-54.550 2.250 +-54.433 2.200 +-54.383 2.200 +-54.367 2.183 +-54.350 2.150 +-54.283 2.150 +-54.217 2.167 +-54.200 2.167 +-54.183 2.167 +-54.133 2.117 +-54.100 2.133 +-54.083 2.200 +-54.000 2.200 +-53.967 2.200 +-53.950 2.233 +-53.917 2.267 +-53.900 2.267 +-53.883 2.317 +-53.833 2.317 +-53.817 2.300 +-53.817 2.333 +-53.800 2.350 +-53.767 2.367 +-53.733 2.367 +-53.733 2.350 +-53.717 2.333 +-53.717 2.317 +-53.667 2.300 +-53.667 2.283 +-53.633 2.283 +-53.583 2.267 +-53.533 2.250 +-53.483 2.250 +-53.483 2.250 +-53.467 2.250 +-53.450 2.250 +-53.433 2.283 +-53.350 2.333 +-53.333 2.350 +-53.317 2.350 +-53.317 2.350 +-53.300 2.317 +-53.283 2.317 +-53.267 2.283 +-53.250 2.250 +-53.267 2.217 +-53.267 2.183 +-53.250 2.200 +-53.200 2.183 +-53.183 2.200 +-53.133 2.217 +-53.067 2.200 +-53.050 2.167 +-53.000 2.167 +-52.967 2.150 +-52.933 2.183 +-52.900 2.183 +-52.867 2.233 +-52.867 2.250 +-52.850 2.250 +-52.850 2.267 +-52.767 2.317 +-52.717 2.333 +-52.683 2.367 +-52.667 2.383 +-52.650 2.433 +-52.617 2.450 +-52.617 2.467 +-52.600 2.467 +-52.550 2.517 +-52.567 2.533 +-52.550 2.550 +-52.533 2.583 +-52.550 2.600 +-52.550 2.617 +-52.567 2.633 +-52.550 2.650 +-52.533 2.650 +-52.533 2.667 +-52.517 2.683 +-52.483 2.750 +-52.467 2.783 +-52.450 2.833 +-52.417 2.883 +-52.383 2.900 +-52.383 2.917 +-52.400 2.917 +-52.383 2.933 +-52.367 2.967 +-52.367 2.983 +-52.350 3.033 +-52.333 3.067 +-52.333 3.083 +-52.350 3.100 +-52.350 3.133 +-52.333 3.133 +-52.333 3.167 +-52.300 3.167 +-52.300 3.217 +-52.250 3.250 +-52.233 3.233 +-52.217 3.250 +-52.200 3.283 +-52.167 3.333 +-52.083 3.483 +-52.000 3.617 +-51.983 3.683 +-51.967 3.717 +-51.933 3.717 +-51.917 3.733 +-51.933 3.767 +-51.867 3.800 +-51.850 3.833 +-51.817 3.850 +-51.783 3.900 +-51.767 3.967 +-51.717 4.000 +-51.717 4.017 +-51.667 4.033 +-51.650 4.083 +-51.650 4.083 +-51.583 4.200 +-51.583 4.233 +-51.567 4.233 +-51.517 4.067 +-51.467 4.017 +-51.500 4.067 +-51.500 4.100 +-51.517 4.133 +-51.533 4.217 +-51.550 4.250 +-51.567 4.300 +-51.567 4.400 +-51.550 4.433 +-51.524 4.434 +-51.500 4.433 +-51.483 4.433 +-51.417 4.383 +-51.333 4.283 +-51.217 4.133 +-51.217 4.100 +-51.200 4.067 +-51.183 4.033 +-51.183 4.000 +-51.183 3.767 +-51.183 3.733 +-51.200 3.700 +-51.200 3.667 +-51.183 3.567 +-51.183 3.667 +-51.167 3.750 +-51.167 3.783 +-51.133 3.900 +-51.100 3.900 +-51.083 3.900 +-51.067 3.883 +-51.083 3.767 +-51.083 3.750 +-51.083 3.717 +-51.083 3.633 +-51.067 3.500 +-51.067 3.483 +-51.083 3.417 +-51.083 3.400 +-51.017 3.200 +-51.033 3.117 +-51.017 3.100 +-51.000 3.083 +-51.017 3.050 +-51.000 3.017 +-50.983 3.000 +-50.983 2.950 +-50.933 2.883 +-50.950 2.833 +-50.933 2.817 +-50.900 2.800 +-50.900 2.767 +-50.883 2.750 +-50.883 2.700 +-50.867 2.683 +-50.850 2.650 +-50.833 2.617 +-50.833 2.600 +-50.833 2.517 +-50.867 2.483 +-50.850 2.483 +-50.800 2.517 +-50.783 2.483 +-50.767 2.450 +-50.767 2.400 +-50.717 2.250 +-50.683 2.183 +-50.683 2.150 +-50.733 2.150 +-50.750 2.133 +-50.750 2.117 +-50.717 2.117 +-50.700 2.133 +-50.667 2.133 +-50.650 2.117 +-50.617 2.100 +-50.600 2.067 +-50.583 2.050 +-50.600 2.000 +-50.550 1.950 +-50.533 1.933 +-50.517 1.917 +-50.500 1.850 +-50.483 1.833 +-50.400 1.800 +-50.333 1.817 +-50.300 1.817 +-50.250 1.817 +-50.167 1.817 +-50.067 1.783 +-49.933 1.717 +-49.917 1.683 +-49.900 1.600 +-49.900 1.550 +-49.883 1.417 +-49.900 1.367 +-49.917 1.300 +-49.967 1.267 +-50.000 1.233 +-50.067 1.233 +-50.133 1.217 +-50.133 1.250 +-50.117 1.317 +-50.133 1.333 +-50.217 1.350 +-50.267 1.333 +-50.300 1.317 +-50.317 1.267 +-50.283 1.217 +-50.317 1.183 +-50.350 1.183 +-50.383 1.200 +-50.417 1.200 +-50.467 1.150 +-50.467 1.117 +-50.467 1.083 +-50.450 1.100 +-50.450 1.117 +-50.433 1.167 +-50.400 1.183 +-50.367 1.167 +-50.300 1.167 +-50.283 1.183 +-50.267 1.217 +-50.283 1.250 +-50.283 1.283 +-50.267 1.317 +-50.200 1.333 +-50.150 1.317 +-50.150 1.267 +-50.150 1.217 +-50.133 1.200 +-50.050 1.200 +-50.000 1.217 +-49.983 1.217 +-49.950 1.233 +-49.917 1.250 +-49.900 1.217 +-49.900 1.200 +-49.917 1.150 +-49.933 1.133 +-49.950 1.100 +-49.983 1.083 +-50.000 1.067 +-50.033 1.083 +-50.050 1.050 +-50.083 1.017 +-50.083 1.000 +-50.100 .983 +-50.117 .967 +-50.183 .917 +-50.267 .867 +-50.283 .883 +-50.283 .833 +-50.317 .783 +-50.317 .750 +-50.333 .733 +-50.433 .667 +-50.483 .600 +-50.567 .433 +-50.600 .383 +-50.667 .333 +-50.717 .267 +-50.767 .217 +-50.783 .183 +-50.867 .183 +-50.933 .167 +-51.000 .117 +-51.050 .033 +-51.067 .000 +-51.083 -.033 +-51.100 -.067 +-51.217 -.067 +-51.233 -.100 +-51.333 -.250 +-51.350 -.283 +-51.383 -.367 +-51.450 -.433 +-51.450 -.467 +-51.517 -.550 +-51.583 -.583 +-51.650 -.683 +-51.717 -.767 +-51.717 -.883 +-51.700 -1.017 +-51.717 -1.050 +-51.750 -1.083 +-51.783 -1.100 +-51.833 -1.150 +-51.867 -1.150 +-51.883 -1.150 +-51.917 -1.133 +-51.900 -1.167 +-51.917 -1.183 +-51.917 -1.217 +-51.900 -1.267 +-51.917 -1.333 +-52.000 -1.417 +-52.067 -1.400 +-52.133 -1.400 +-52.183 -1.350 +-52.233 -1.350 +-52.267 -1.383 +-52.333 -1.417 +-52.400 -1.433 +-52.483 -1.483 +-52.567 -1.533 +-52.650 -1.533 +-52.717 -1.567 +-52.800 -1.550 +-52.933 -1.600 +-53.000 -1.683 +-53.100 -1.733 +-53.183 -1.750 +-53.317 -1.733 +-53.367 -1.767 +-53.467 -1.800 +-53.550 -1.817 +-53.600 -1.833 +-53.683 -1.850 +-53.750 -1.867 +-53.867 -1.933 +-53.867 -2.000 +-53.733 -1.933 +-53.617 -1.917 +-53.583 -1.900 +-53.500 -1.883 +-53.433 -1.867 +-53.367 -1.883 +-53.333 -1.867 +-53.267 -1.817 +-53.100 -1.800 +-53.000 -1.767 +-52.933 -1.667 +-52.650 -1.600 +-52.400 -1.583 +-52.333 -1.567 +-52.250 -1.517 +-52.233 -1.567 +-52.217 -1.583 +-52.217 -1.633 +-52.267 -1.683 +-52.283 -1.667 +-52.283 -1.633 +-52.300 -1.633 +-52.333 -1.683 +-52.250 -1.800 +-52.300 -1.900 +-52.300 -1.967 +-52.267 -2.017 +-52.283 -2.033 +-52.267 -2.050 +-52.267 -2.133 +-52.183 -2.267 +-52.167 -2.350 +-52.133 -2.367 +-52.100 -2.417 +-52.100 -2.450 +-52.083 -2.483 +-52.050 -2.533 +-52.017 -2.617 +-52.033 -2.667 +-52.050 -2.700 +-52.050 -2.783 +-52.000 -2.850 +-51.950 -2.883 +-51.933 -2.883 +-51.883 -2.933 +-51.850 -3.000 +-51.850 -3.033 +-51.833 -3.050 +-51.783 -3.117 +-51.717 -3.117 +-51.717 -3.100 +-51.783 -3.100 +-51.817 -3.050 +-51.817 -3.017 +-51.833 -3.000 +-51.867 -2.967 +-51.867 -2.917 +-51.900 -2.900 +-51.900 -2.883 +-51.883 -2.833 +-51.967 -2.750 +-52.000 -2.733 +-52.000 -2.683 +-51.950 -2.683 +-51.933 -2.650 +-51.967 -2.567 +-51.950 -2.517 +-51.967 -2.517 +-51.983 -2.467 +-52.000 -2.450 +-52.033 -2.350 +-52.033 -2.333 +-52.050 -2.300 +-52.117 -2.200 +-52.150 -2.167 +-52.150 -2.117 +-52.183 -2.083 +-52.183 -2.000 +-52.200 -1.833 +-52.217 -1.783 +-52.233 -1.783 +-52.250 -1.750 +-52.250 -1.717 +-52.233 -1.683 +-52.167 -1.633 +-52.150 -1.617 +-51.983 -1.600 +-51.900 -1.567 +-51.717 -1.450 +-51.483 -1.333 +-51.367 -1.233 +-51.283 -1.233 +-51.200 -1.117 +-51.150 -1.167 +-51.150 -1.167 +-51.083 -1.150 +-51.000 -1.117 +-50.950 -1.117 +-50.817 -1.217 +-50.800 -1.267 +-50.800 -1.300 +-50.817 -1.333 +-50.783 -1.383 +-50.800 -1.417 +-50.800 -1.450 +-50.750 -1.517 +-50.733 -1.567 +-50.717 -1.583 +-50.717 -1.583 +-50.700 -1.600 +-50.750 -1.717 +-50.683 -1.767 +-50.717 -1.817 +-50.767 -1.833 +-50.767 -1.883 +-50.800 -1.900 +-50.883 -1.850 +-50.900 -1.883 +-50.867 -1.900 +-50.850 -1.900 +-50.850 -1.933 +-50.833 -1.967 +-50.850 -2.000 +-50.817 -2.000 +-50.817 -1.933 +-50.733 -1.917 +-50.700 -1.933 +-50.700 -1.867 +-50.683 -1.817 +-50.617 -1.817 +-50.567 -1.883 +-50.550 -1.900 +-50.450 -1.933 +-50.433 -1.950 +-50.383 -1.967 +-50.350 -1.933 +-50.317 -1.917 +-50.300 -1.883 +-50.283 -1.883 +-50.267 -1.883 +-50.250 -1.900 +-50.217 -1.900 +-50.167 -1.917 +-50.183 -1.883 +-50.133 -1.850 +-50.133 -1.850 +-50.083 -1.833 +-50.050 -1.833 +-50.017 -1.817 +-50.000 -1.817 +-49.967 -1.850 +-49.950 -1.850 +-49.900 -1.883 +-49.883 -1.883 +-49.867 -2.000 +-49.833 -2.083 +-49.850 -2.000 +-49.850 -1.917 +-49.833 -1.900 +-49.783 -1.900 +-49.750 -1.917 +-49.683 -1.917 +-49.667 -1.917 +-49.650 -1.883 +-49.633 -1.850 +-49.567 -1.850 +-49.550 -1.850 +-49.550 -1.833 +-49.533 -1.817 +-49.533 -1.783 +-49.500 -1.767 +-49.467 -1.767 +-49.450 -1.750 +-49.383 -1.750 +-49.450 -1.800 +-49.433 -1.783 +-49.383 -1.767 +-49.367 -1.733 +-49.350 -1.717 +-49.300 -1.717 +-49.283 -1.733 +-49.283 -1.800 +-49.367 -1.883 +-49.367 -1.917 +-49.400 -1.950 +-49.400 -2.000 +-49.417 -2.033 +-49.433 -2.067 +-49.450 -2.150 +-49.467 -2.183 +-49.517 -2.267 +-49.517 -2.300 +-49.550 -2.383 +-49.550 -2.517 +-49.583 -2.567 +-49.600 -2.600 +-49.667 -2.617 +-49.733 -2.717 +-49.767 -2.750 +-49.783 -2.783 +-49.733 -2.983 +-49.717 -3.017 +-49.683 -3.050 +-49.667 -3.050 +-49.667 -3.083 +-49.683 -3.167 +-49.683 -3.317 +-49.633 -3.400 +-49.617 -3.517 +-49.633 -3.567 +-49.667 -3.633 +-49.683 -3.700 +-49.667 -3.783 +-49.667 -3.717 +-49.600 -3.533 +-49.617 -3.450 +-49.583 -3.350 +-49.567 -3.283 +-49.567 -3.183 +-49.600 -3.117 +-49.650 -3.050 +-49.650 -3.033 +-49.650 -2.967 +-49.667 -2.883 +-49.683 -2.767 +-49.667 -2.717 +-49.650 -2.683 +-49.600 -2.650 +-49.583 -2.633 +-49.533 -2.600 +-49.517 -2.583 +-49.467 -2.517 +-49.433 -2.483 +-49.450 -2.400 +-49.333 -2.183 +-49.317 -2.083 +-49.267 -2.000 +-49.250 -1.983 +-49.233 -1.967 +-49.167 -1.867 +-49.100 -1.867 +-49.083 -1.850 +-49.033 -1.850 +-49.000 -1.817 +-48.983 -1.800 +-48.950 -1.800 +-48.900 -1.733 +-48.883 -1.683 +-48.850 -1.650 +-48.783 -1.583 +-48.733 -1.533 +-48.700 -1.467 +-48.700 -1.450 +-48.667 -1.433 +-48.667 -1.417 +-48.650 -1.383 +-48.633 -1.400 +-48.600 -1.450 +-48.600 -1.467 +-48.583 -1.500 +-48.517 -1.550 +-48.500 -1.567 +-48.500 -1.567 +-48.450 -1.650 +-48.433 -1.667 +-48.450 -1.600 +-48.467 -1.583 +-48.500 -1.533 +-48.500 -1.500 +-48.467 -1.517 +-48.450 -1.500 +-48.417 -1.500 +-48.367 -1.483 +-48.267 -1.483 +-48.200 -1.517 +-48.200 -1.500 +-48.250 -1.467 +-48.300 -1.467 +-48.367 -1.450 +-48.433 -1.467 +-48.483 -1.483 +-48.517 -1.467 +-48.517 -1.467 +-48.500 -1.400 +-48.483 -1.367 +-48.483 -1.350 +-48.483 -1.283 +-48.467 -1.250 +-48.450 -1.233 +-48.433 -1.200 +-48.417 -1.233 +-48.417 -1.250 +-48.383 -1.250 +-48.383 -1.283 +-48.333 -1.233 +-48.317 -1.183 +-48.300 -1.167 +-48.300 -1.100 +-48.317 -1.067 +-48.300 -1.050 +-48.317 -1.000 +-48.317 -.950 +-48.250 -.867 +-48.233 -.833 +-48.217 -.817 +-48.183 -.833 +-48.150 -.850 +-48.167 -.800 +-48.167 -.783 +-48.133 -.750 +-48.067 -.667 +-48.033 -.667 +-48.033 -.700 +-48.017 -.750 +-48.000 -.700 +-47.983 -.717 +-47.967 -.700 +-47.950 -.750 +-47.967 -.683 +-47.950 -.650 +-47.917 -.633 +-47.900 -.633 +-47.917 -.617 +-47.850 -.600 +-47.850 -.633 +-47.883 -.700 +-47.850 -.683 +-47.833 -.667 +-47.833 -.633 +-47.817 -.600 +-47.817 -.567 +-47.783 -.567 +-47.783 -.583 +-47.800 -.600 +-47.767 -.600 +-47.767 -.617 +-47.750 -.650 +-47.750 -.600 +-47.767 -.583 +-47.717 -.550 +-47.700 -.550 +-47.700 -.617 +-47.683 -.617 +-47.667 -.583 +-47.650 -.600 +-47.633 -.617 +-47.633 -.700 +-47.683 -.717 +-47.700 -.733 +-47.633 -.733 +-47.617 -.700 +-47.600 -.700 +-47.583 -.717 +-47.600 -.683 +-47.583 -.633 +-47.583 -.583 +-47.533 -.617 +-47.533 -.633 +-47.550 -.633 +-47.500 -.717 +-47.483 -.733 +-47.483 -.767 +-47.417 -.767 +-47.417 -.800 +-47.400 -.800 +-47.400 -.767 +-47.417 -.750 +-47.417 -.733 +-47.467 -.700 +-47.483 -.617 +-47.467 -.617 +-47.467 -.600 +-47.417 -.600 +-47.417 -.633 +-47.433 -.650 +-47.400 -.650 +-47.383 -.633 +-47.367 -.633 +-47.383 -.617 +-47.367 -.600 +-47.350 -.617 +-47.317 -.600 +-47.283 -.617 +-47.283 -.633 +-47.250 -.633 +-47.250 -.633 +-47.217 -.633 +-47.217 -.667 +-47.200 -.683 +-47.250 -.683 +-47.250 -.717 +-47.200 -.717 +-47.183 -.700 +-47.183 -.683 +-47.167 -.700 +-47.167 -.733 +-47.183 -.767 +-47.167 -.783 +-47.150 -.767 +-47.133 -.733 +-47.117 -.683 +-47.083 -.683 +-47.083 -.767 +-47.067 -.783 +-47.083 -.850 +-47.050 -.817 +-47.033 -.817 +-47.033 -.783 +-47.000 -.767 +-47.000 -.750 +-46.983 -.733 +-46.983 -.700 +-46.967 -.717 +-46.950 -.733 +-46.983 -.783 +-46.950 -.800 +-46.950 -.833 +-46.933 -.850 +-46.950 -.867 +-46.933 -.883 +-46.917 -.817 +-46.900 -.800 +-46.883 -.767 +-46.867 -.767 +-46.867 -.733 +-46.833 -.750 +-46.833 -.783 +-46.850 -.833 +-46.833 -.850 +-46.817 -.833 +-46.817 -.867 +-46.800 -.867 +-46.800 -.833 +-46.750 -.833 +-46.750 -.917 +-46.733 -.900 +-46.733 -.833 +-46.717 -.833 +-46.700 -.817 +-46.683 -.833 +-46.683 -.817 +-46.667 -.783 +-46.650 -.783 +-46.617 -.833 +-46.617 -.850 +-46.633 -.867 +-46.650 -.933 +-46.717 -.967 +-46.667 -.967 +-46.617 -.950 +-46.583 -.967 +-46.567 -.933 +-46.567 -.900 +-46.550 -.900 +-46.550 -.950 +-46.533 -.933 +-46.517 -.883 +-46.500 -.867 +-46.467 -.883 +-46.450 -.850 +-46.433 -.850 +-46.417 -.867 +-46.433 -.900 +-46.467 -.917 +-46.483 -.917 +-46.483 -1.000 +-46.483 -1.017 +-46.417 -1.017 +-46.417 -1.000 +-46.400 -.983 +-46.400 -1.000 +-46.367 -1.050 +-46.383 -1.017 +-46.350 -1.000 +-46.333 -1.050 +-46.333 -1.067 +-46.300 -1.000 +-46.267 -.917 +-46.200 -.883 +-46.200 -.917 +-46.217 -.950 +-46.233 -.983 +-46.217 -1.033 +-46.233 -1.083 +-46.250 -1.117 +-46.283 -1.183 +-46.217 -1.100 +-46.183 -1.067 +-46.200 -1.033 +-46.167 -1.000 +-46.150 -1.033 +-46.183 -1.117 +-46.167 -1.083 +-46.150 -1.117 +-46.150 -1.067 +-46.100 -1.033 +-46.083 -1.017 +-46.067 -1.033 +-46.067 -1.067 +-46.100 -1.083 +-46.083 -1.117 +-46.117 -1.200 +-46.150 -1.217 +-46.167 -1.267 +-46.150 -1.300 +-46.150 -1.300 +-46.150 -1.267 +-46.133 -1.217 +-46.100 -1.200 +-46.083 -1.183 +-46.050 -1.150 +-46.050 -1.133 +-46.033 -1.117 +-46.033 -1.067 +-46.000 -1.050 +-45.967 -1.050 +-45.967 -1.117 +-45.950 -1.117 +-45.950 -1.217 +-45.933 -1.200 +-45.933 -1.183 +-45.883 -1.083 +-45.867 -1.050 +-45.850 -1.050 +-45.833 -1.083 +-45.867 -1.133 +-45.883 -1.133 +-45.900 -1.167 +-45.867 -1.150 +-45.867 -1.200 +-45.900 -1.233 +-45.850 -1.217 +-45.867 -1.250 +-45.833 -1.233 +-45.833 -1.200 +-45.817 -1.217 +-45.833 -1.183 +-45.800 -1.167 +-45.800 -1.233 +-45.783 -1.233 +-45.767 -1.217 +-45.767 -1.200 +-45.733 -1.133 +-45.683 -1.133 +-45.683 -1.150 +-45.733 -1.200 +-45.733 -1.233 +-45.717 -1.267 +-45.700 -1.217 +-45.683 -1.200 +-45.667 -1.217 +-45.667 -1.267 +-45.650 -1.267 +-45.650 -1.233 +-45.633 -1.233 +-45.633 -1.283 +-45.650 -1.350 +-45.700 -1.367 +-45.633 -1.367 +-45.617 -1.333 +-45.633 -1.300 +-45.617 -1.283 +-45.600 -1.267 +-45.583 -1.267 +-45.583 -1.300 +-45.550 -1.267 +-45.550 -1.300 +-45.517 -1.300 +-45.517 -1.400 +-45.500 -1.383 +-45.500 -1.350 +-45.483 -1.333 +-45.483 -1.317 +-45.450 -1.317 +-45.467 -1.300 +-45.433 -1.283 +-45.417 -1.300 +-45.417 -1.333 +-45.450 -1.367 +-45.483 -1.367 +-45.483 -1.433 +-45.500 -1.467 +-45.483 -1.483 +-45.467 -1.467 +-45.433 -1.417 +-45.417 -1.400 +-45.383 -1.400 +-45.383 -1.367 +-45.367 -1.350 +-45.350 -1.333 +-45.367 -1.317 +-45.350 -1.300 +-45.317 -1.333 +-45.300 -1.367 +-45.300 -1.417 +-45.383 -1.450 +-45.383 -1.467 +-45.317 -1.467 +-45.300 -1.500 +-45.333 -1.567 +-45.350 -1.633 +-45.367 -1.700 +-45.350 -1.733 +-45.283 -1.733 +-45.267 -1.750 +-45.250 -1.783 +-45.250 -1.833 +-45.233 -1.850 +-45.183 -1.850 +-45.167 -1.883 +-45.167 -1.867 +-45.200 -1.850 +-45.233 -1.833 +-45.233 -1.783 +-45.267 -1.717 +-45.267 -1.683 +-45.250 -1.683 +-45.233 -1.650 +-45.250 -1.600 +-45.250 -1.550 +-45.183 -1.483 +-45.150 -1.467 +-45.133 -1.500 +-45.133 -1.450 +-45.117 -1.417 +-45.117 -1.367 +-45.100 -1.350 +-45.100 -1.400 +-45.100 -1.450 +-45.083 -1.450 +-45.067 -1.433 +-45.067 -1.483 +-45.033 -1.483 +-45.000 -1.483 +-44.983 -1.500 +-44.983 -1.517 +-45.017 -1.517 +-45.017 -1.533 +-45.000 -1.533 +-44.967 -1.517 +-44.950 -1.550 +-45.000 -1.567 +-45.017 -1.567 +-45.017 -1.583 +-44.950 -1.567 +-44.950 -1.550 +-44.967 -1.500 +-44.950 -1.467 +-44.950 -1.483 +-44.933 -1.483 +-44.883 -1.433 +-44.867 -1.417 +-44.850 -1.400 +-44.817 -1.417 +-44.833 -1.433 +-44.850 -1.450 +-44.833 -1.467 +-44.850 -1.483 +-44.883 -1.500 +-44.900 -1.533 +-44.917 -1.550 +-44.900 -1.567 +-44.917 -1.600 +-44.867 -1.600 +-44.850 -1.617 +-44.833 -1.567 +-44.800 -1.600 +-44.767 -1.550 +-44.767 -1.533 +-44.733 -1.517 +-44.767 -1.583 +-44.767 -1.600 +-44.700 -1.550 +-44.700 -1.567 +-44.683 -1.550 +-44.667 -1.567 +-44.650 -1.633 +-44.667 -1.650 +-44.717 -1.633 +-44.733 -1.650 +-44.800 -1.700 +-44.767 -1.700 +-44.750 -1.717 +-44.700 -1.717 +-44.750 -1.783 +-44.683 -1.767 +-44.650 -1.767 +-44.650 -1.750 +-44.650 -1.717 +-44.600 -1.733 +-44.617 -1.750 +-44.633 -1.783 +-44.633 -1.800 +-44.600 -1.767 +-44.583 -1.767 +-44.583 -1.783 +-44.617 -1.783 +-44.617 -1.817 +-44.567 -1.783 +-44.567 -1.850 +-44.533 -1.817 +-44.533 -1.850 +-44.550 -1.867 +-44.567 -1.883 +-44.517 -1.883 +-44.483 -1.950 +-44.500 -1.950 +-44.483 -2.000 +-44.567 -2.017 +-44.517 -2.017 +-44.500 -2.050 +-44.500 -2.067 +-44.533 -2.083 +-44.550 -2.083 +-44.567 -2.117 +-44.600 -2.150 +-44.583 -2.167 +-44.650 -2.233 +-44.667 -2.250 +-44.700 -2.233 +-44.717 -2.233 +-44.683 -2.283 +-44.733 -2.267 +-44.700 -2.300 +-44.667 -2.283 +-44.650 -2.283 +-44.683 -2.367 +-44.650 -2.367 +-44.667 -2.333 +-44.633 -2.300 +-44.617 -2.250 +-44.550 -2.217 +-44.517 -2.150 +-44.450 -2.150 +-44.400 -2.217 +-44.383 -2.283 +-44.367 -2.300 +-44.367 -2.350 +-44.383 -2.367 +-44.383 -2.383 +-44.400 -2.417 +-44.467 -2.417 +-44.500 -2.383 +-44.517 -2.400 +-44.483 -2.417 +-44.517 -2.450 +-44.500 -2.450 +-44.467 -2.433 +-44.450 -2.450 +-44.500 -2.533 +-44.550 -2.517 +-44.533 -2.550 +-44.583 -2.650 +-44.617 -2.700 +-44.633 -2.750 +-44.650 -2.800 +-44.633 -2.850 +-44.650 -2.883 +-44.667 -2.917 +-44.667 -2.967 +-44.667 -3.017 +-44.617 -3.017 +-44.617 -3.083 +-44.717 -3.167 +-44.717 -3.183 +-44.783 -3.200 +-44.800 -3.217 +-44.767 -3.267 +-44.750 -3.283 +-44.800 -3.283 +-44.783 -3.317 +-44.750 -3.317 +-44.733 -3.283 +-44.750 -3.233 +-44.700 -3.200 +-44.650 -3.200 +-44.633 -3.183 +-44.600 -3.117 +-44.583 -3.117 +-44.517 -3.050 +-44.517 -3.033 +-44.483 -3.017 +-44.467 -3.000 +-44.433 -2.950 +-44.417 -2.917 +-44.400 -2.867 +-44.400 -2.783 +-44.383 -2.767 +-44.383 -2.767 +-44.317 -2.783 +-44.300 -2.800 +-44.283 -2.783 +-44.250 -2.783 +-44.233 -2.800 +-44.233 -2.783 +-44.183 -2.767 +-44.183 -2.817 +-44.183 -2.850 +-44.167 -2.817 +-44.150 -2.783 +-44.133 -2.783 +-44.117 -2.750 +-44.083 -2.767 +-44.067 -2.717 +-44.017 -2.650 +-43.950 -2.617 +-43.950 -2.600 +-43.933 -2.567 +-43.917 -2.550 +-43.900 -2.567 +-43.900 -2.583 +-43.883 -2.633 +-43.867 -2.600 +-43.850 -2.567 +-43.817 -2.583 +-43.800 -2.583 +-43.783 -2.567 +-43.750 -2.567 +-43.717 -2.550 +-43.700 -2.533 +-43.667 -2.500 +-43.650 -2.483 +-43.617 -2.533 +-43.600 -2.517 +-43.550 -2.483 +-43.550 -2.467 +-43.550 -2.433 +-43.533 -2.417 +-43.517 -2.433 +-43.517 -2.450 +-43.517 -2.467 +-43.500 -2.483 +-43.467 -2.500 +-43.450 -2.550 +-43.433 -2.550 +-43.450 -2.517 +-43.450 -2.467 +-43.467 -2.433 +-43.450 -2.433 +-43.433 -2.450 +-43.383 -2.450 +-43.433 -2.433 +-43.467 -2.383 +-43.500 -2.383 +-43.450 -2.350 +-43.433 -2.333 +-43.383 -2.333 +-43.383 -2.350 +-43.367 -2.333 +-43.317 -2.333 +-43.233 -2.367 +-43.133 -2.400 +-43.017 -2.467 +-42.767 -2.567 +-42.750 -2.550 +-42.717 -2.550 +-42.667 -2.617 +-42.567 -2.683 +-42.500 -2.683 +-42.500 -2.700 +-42.533 -2.717 +-42.467 -2.717 +-42.483 -2.700 +-42.367 -2.717 +-42.350 -2.750 +-42.283 -2.750 +-42.233 -2.817 +-42.217 -2.800 +-42.200 -2.817 +-42.167 -2.817 +-42.183 -2.783 +-42.150 -2.783 +-42.117 -2.767 +-42.100 -2.800 +-42.067 -2.817 +-42.033 -2.800 +-42.017 -2.817 +-42.017 -2.733 +-42.033 -2.733 +-42.033 -2.700 +-42.000 -2.700 +-41.833 -2.717 +-41.817 -2.733 +-41.850 -2.767 +-41.850 -2.800 +-41.850 -2.800 +-41.800 -2.750 +-41.733 -2.817 +-41.667 -2.850 +-41.583 -2.917 +-41.500 -2.900 +-41.433 -2.917 +-41.400 -2.917 +-41.333 -2.933 +-41.300 -2.967 +-41.267 -3.000 +-41.267 -3.000 +-41.267 -2.967 +-41.250 -2.933 +-41.283 -2.917 +-41.300 -2.917 +-41.300 -2.917 +-41.267 -2.900 +-41.100 -2.900 +-40.967 -2.883 +-40.900 -2.867 +-40.850 -2.883 +-40.767 -2.850 +-40.650 -2.850 +-40.567 -2.833 +-40.533 -2.800 +-40.500 -2.783 +-40.433 -2.800 +-40.350 -2.800 +-40.267 -2.800 +-40.183 -2.817 +-40.133 -2.833 +-40.117 -2.817 +-40.067 -2.833 +-40.033 -2.833 +-39.983 -2.833 +-39.933 -2.850 +-39.900 -2.867 +-39.800 -2.950 +-39.767 -2.967 +-39.717 -2.983 +-39.650 -3.017 +-39.633 -3.017 +-39.600 -3.050 +-39.567 -3.067 +-39.533 -3.083 +-39.467 -3.117 +-39.400 -3.167 +-39.367 -3.167 +-39.350 -3.167 +-39.333 -3.200 +-39.250 -3.217 +-39.217 -3.233 +-39.167 -3.300 +-39.150 -3.333 +-39.117 -3.333 +-39.017 -3.400 +-38.983 -3.383 +-38.917 -3.483 +-38.900 -3.483 +-38.850 -3.533 +-38.833 -3.533 +-38.783 -3.567 +-38.700 -3.633 +-38.650 -3.667 +-38.583 -3.683 +-38.500 -3.700 +-38.483 -3.683 +-38.417 -3.800 +-38.350 -3.883 +-38.300 -3.917 +-38.283 -3.917 +-38.233 -4.000 +-38.217 -4.017 +-38.200 -4.017 +-38.200 -4.033 +-38.167 -4.083 +-38.167 -4.117 +-38.150 -4.100 +-38.133 -4.133 +-38.100 -4.167 +-38.067 -4.200 +-38.033 -4.233 +-38.000 -4.250 +-37.983 -4.283 +-37.917 -4.333 +-37.867 -4.367 +-37.833 -4.383 +-37.767 -4.400 +-37.800 -4.433 +-37.750 -4.433 +-37.750 -4.467 +-37.733 -4.500 +-37.700 -4.533 +-37.683 -4.550 +-37.667 -4.567 +-37.617 -4.600 +-37.600 -4.617 +-37.567 -4.633 +-37.533 -4.633 +-37.500 -4.617 +-37.483 -4.633 +-37.450 -4.650 +-37.400 -4.667 +-37.333 -4.700 +-37.300 -4.733 +-37.283 -4.783 +-37.250 -4.831 +-37.250 -4.831 +-37.233 -4.867 +-37.200 -4.900 +-37.183 -4.917 +-37.150 -4.950 +-37.150 -4.933 +-37.100 -4.917 +-37.100 -4.933 +-37.033 -4.933 +-37.000 -4.933 +-36.983 -4.917 +-36.950 -4.933 +-36.867 -4.950 +-36.850 -4.983 +-36.833 -5.017 +-36.783 -5.050 +-36.767 -5.050 +-36.733 -5.067 +-36.717 -5.083 +-36.700 -5.067 +-36.700 -5.100 +-36.667 -5.083 +-36.600 -5.100 +-36.617 -5.083 +-36.617 -5.067 +-36.483 -5.067 +-36.500 -5.050 +-36.483 -5.050 +-36.433 -5.067 +-36.383 -5.083 +-36.133 -5.083 +-36.100 -5.067 +-36.067 -5.050 +-36.000 -5.033 +-36.000 -5.050 +-35.933 -5.050 +-35.883 -5.067 +-35.783 -5.083 +-35.733 -5.100 +-35.683 -5.117 +-35.650 -5.117 +-35.617 -5.117 +-35.483 -5.167 +-35.450 -5.200 +-35.400 -5.233 +-35.367 -5.283 +-35.367 -5.333 +-35.350 -5.367 +-35.317 -5.383 +-35.317 -5.400 +-35.283 -5.433 +-35.283 -5.467 +-35.250 -5.483 +-35.267 -5.500 +-35.233 -5.583 +-35.217 -5.650 +-35.217 -5.683 +-35.200 -5.700 +-35.200 -5.767 +-35.183 -5.783 +-35.183 -5.867 +-35.167 -5.883 +-35.150 -5.883 +-35.150 -5.950 +-35.117 -6.000 +-35.100 -6.050 +-35.100 -6.167 +-35.067 -6.217 +-35.033 -6.233 +-35.033 -6.350 +-34.983 -6.383 +-34.967 -6.483 +-34.967 -6.483 +-34.950 -6.683 +-34.933 -6.683 +-34.933 -6.733 +-34.950 -6.783 +-34.917 -6.767 +-34.917 -6.833 +-34.883 -6.883 +-34.867 -6.900 +-34.867 -6.933 +-34.850 -6.967 +-34.883 -6.983 +-34.883 -7.000 +-34.867 -7.033 +-34.833 -6.983 +-34.833 -7.017 +-34.833 -7.033 +-34.850 -7.050 +-34.833 -7.067 +-34.833 -7.083 +-34.817 -7.117 +-34.817 -7.133 +-34.800 -7.150 +-34.783 -7.150 +-34.817 -7.233 +-34.800 -7.300 +-34.800 -7.317 +-34.817 -7.500 +-34.817 -7.533 +-34.817 -7.533 +-34.817 -7.550 +-34.833 -7.567 +-34.833 -7.583 +-34.800 -7.617 +-34.833 -7.683 +-34.850 -7.683 +-34.867 -7.717 +-34.883 -7.733 +-34.900 -7.800 +-34.850 -7.817 +-34.817 -7.900 +-34.833 -8.000 +-34.833 -8.017 +-34.850 -8.033 +-34.867 -8.067 +-34.917 -8.167 +-34.917 -8.200 +-34.917 -8.217 +-34.933 -8.233 +-34.950 -8.283 +-34.950 -8.317 +-34.950 -8.333 +-34.933 -8.367 +-34.983 -8.483 +-35.000 -8.567 +-35.033 -8.567 +-35.050 -8.600 +-35.067 -8.633 +-35.067 -8.700 +-35.083 -8.750 +-35.100 -8.767 +-35.083 -8.800 +-35.117 -8.800 +-35.133 -8.867 +-35.133 -8.900 +-35.150 -8.900 +-35.150 -8.900 +-35.183 -8.983 +-35.217 -9.017 +-35.233 -9.050 +-35.283 -9.150 +-35.300 -9.200 +-35.333 -9.233 +-35.350 -9.267 +-35.383 -9.300 +-35.417 -9.333 +-35.433 -9.350 +-35.450 -9.367 +-35.483 -9.400 +-35.517 -9.450 +-35.550 -9.483 +-35.583 -9.533 +-35.617 -9.550 +-35.683 -9.633 +-35.700 -9.650 +-35.700 -9.667 +-35.717 -9.683 +-35.750 -9.683 +-35.783 -9.717 +-35.817 -9.733 +-35.867 -9.817 +-35.883 -9.833 +-35.900 -9.850 +-35.950 -9.917 +-35.967 -9.967 +-35.983 -9.983 +-36.000 -9.967 +-36.033 -10.033 +-36.067 -10.083 +-36.117 -10.117 +-36.133 -10.150 +-36.183 -10.183 +-36.217 -10.217 +-36.250 -10.233 +-36.267 -10.250 +-36.300 -10.300 +-36.300 -10.367 +-36.317 -10.367 +-36.350 -10.417 +-36.400 -10.483 +-36.417 -10.483 +-36.433 -10.417 +-36.467 -10.400 +-36.550 -10.417 +-36.567 -10.400 +-36.567 -10.350 +-36.567 -10.317 +-36.567 -10.300 +-36.617 -10.250 +-36.633 -10.250 +-36.667 -10.267 +-36.733 -10.267 +-36.733 -10.267 +-36.683 -10.283 +-36.633 -10.267 +-36.583 -10.317 +-36.583 -10.400 +-36.550 -10.450 +-36.467 -10.433 +-36.433 -10.450 +-36.433 -10.483 +-36.400 -10.500 +-36.583 -10.567 +-36.750 -10.667 +-36.867 -10.750 +-37.033 -10.933 +-37.050 -10.917 +-37.067 -10.967 +-37.050 -10.950 +-37.050 -10.983 +-37.100 -11.050 +-37.167 -11.133 +-37.167 -11.100 +-37.217 -11.083 +-37.183 -11.117 +-37.183 -11.167 +-37.200 -11.183 +-37.217 -11.217 +-37.283 -11.300 +-37.300 -11.333 +-37.333 -11.450 +-37.333 -11.450 +-37.383 -11.500 +-37.400 -11.533 +-37.467 -11.667 +-37.500 -11.717 +-37.533 -11.750 +-37.550 -11.783 +-37.617 -11.967 +-37.667 -12.000 +-37.617 -12.000 +-37.733 -12.183 +-37.833 -12.317 +-37.917 -12.417 +-37.967 -12.517 +-37.983 -12.533 +-38.000 -12.583 +-38.017 -12.583 +-38.350 -12.967 +-38.400 -12.967 +-38.467 -13.017 +-38.533 -13.017 +-38.517 -12.967 +-38.517 -12.950 +-38.533 -12.933 +-38.533 -12.917 +-38.500 -12.917 +-38.483 -12.833 +-38.500 -12.817 +-38.517 -12.767 +-38.483 -12.783 +-38.467 -12.783 +-38.467 -12.767 +-38.500 -12.750 +-38.500 -12.733 +-38.533 -12.733 +-38.567 -12.717 +-38.600 -12.733 +-38.633 -12.700 +-38.633 -12.667 +-38.650 -12.633 +-38.700 -12.633 +-38.700 -12.600 +-38.717 -12.600 +-38.733 -12.667 +-38.733 -12.683 +-38.767 -12.717 +-38.750 -12.733 +-38.783 -12.817 +-38.817 -12.850 +-38.800 -12.850 +-38.783 -12.867 +-38.717 -12.867 +-38.767 -12.917 +-38.767 -12.967 +-38.783 -13.000 +-38.800 -13.033 +-38.833 -13.067 +-38.867 -13.083 +-38.900 -13.117 +-38.867 -13.117 +-38.833 -13.133 +-38.817 -13.150 +-38.933 -13.217 +-38.967 -13.267 +-38.967 -13.333 +-38.950 -13.383 +-39.000 -13.367 +-39.033 -13.367 +-39.033 -13.350 +-39.050 -13.367 +-39.067 -13.417 +-39.067 -13.483 +-39.100 -13.533 +-39.100 -13.583 +-39.083 -13.583 +-39.067 -13.567 +-39.017 -13.583 +-38.967 -13.683 +-39.000 -13.750 +-39.000 -13.783 +-38.983 -13.833 +-39.000 -13.850 +-39.050 -13.817 +-39.067 -13.767 +-39.100 -13.750 +-39.117 -13.717 +-39.133 -13.733 +-39.117 -13.750 +-39.117 -13.767 +-39.067 -13.783 +-39.067 -13.817 +-39.033 -13.850 +-39.000 -13.867 +-39.017 -13.900 +-39.050 -13.883 +-39.100 -13.883 +-39.083 -13.900 +-39.067 -13.917 +-39.083 -13.917 +-39.083 -13.967 +-39.067 -14.000 +-39.067 -13.950 +-39.000 -13.967 +-39.000 -14.000 +-39.033 -14.017 +-39.000 -14.017 +-38.983 -14.067 +-39.017 -14.100 +-38.967 -14.067 +-38.983 -14.033 +-38.967 -14.000 +-38.983 -13.933 +-38.983 -13.917 +-38.950 -13.883 +-38.933 -13.900 +-38.933 -13.933 +-38.950 -14.000 +-38.950 -14.050 +-38.983 -14.183 +-39.000 -14.250 +-39.000 -14.267 +-38.983 -14.300 +-39.000 -14.333 +-39.033 -14.450 +-39.050 -14.583 +-39.067 -14.650 +-39.083 -14.750 +-39.033 -14.783 +-39.067 -14.800 +-39.067 -14.817 +-39.033 -14.817 +-39.033 -14.867 +-39.017 -15.000 +-39.017 -15.167 +-39.000 -15.300 +-38.967 -15.467 +-38.983 -15.467 +-38.967 -15.483 +-38.967 -15.583 +-38.950 -15.633 +-38.967 -15.650 +-38.950 -15.667 +-38.950 -15.700 +-38.933 -15.700 +-38.883 -15.817 +-38.917 -15.850 +-38.950 -15.833 +-38.967 -15.817 +-39.000 -15.833 +-38.967 -15.833 +-38.950 -15.850 +-38.917 -15.867 +-38.883 -15.850 +-38.917 -15.917 +-38.933 -16.000 +-38.967 -16.183 +-39.017 -16.267 +-39.000 -16.333 +-39.033 -16.383 +-39.083 -16.467 +-39.100 -16.583 +-39.117 -16.717 +-39.150 -16.867 +-39.150 -16.933 +-39.167 -16.983 +-39.200 -17.100 +-39.217 -17.333 +-39.200 -17.433 +-39.217 -17.533 +-39.183 -17.633 +-39.200 -17.750 +-39.250 -17.800 +-39.283 -17.867 +-39.367 -17.883 +-39.433 -17.917 +-39.550 -18.083 +-39.650 -18.250 +-39.668 -18.333 +-39.717 -18.417 +-39.733 -18.483 +-39.733 -18.583 +-39.750 -18.650 +-39.733 -18.983 +-39.717 -19.233 +-39.688 -19.305 +-39.800 -19.533 +-39.817 -19.600 +-39.850 -19.633 +-39.900 -19.667 +-40.050 -19.800 +-40.100 -19.917 +-40.133 -19.967 +-40.150 -20.000 +-40.150 -20.033 +-40.167 -20.033 +-40.167 -20.050 +-40.183 -20.050 +-40.200 -20.067 +-40.200 -20.067 +-40.200 -20.067 +-40.183 -20.083 +-40.183 -20.117 +-40.183 -20.150 +-40.183 -20.167 +-40.183 -20.183 +-40.200 -20.233 +-40.200 -20.233 +-40.217 -20.250 +-40.217 -20.267 +-40.233 -20.283 +-40.233 -20.300 +-40.250 -20.283 +-40.267 -20.267 +-40.283 -20.300 +-40.267 -20.317 +-40.283 -20.333 +-40.267 -20.333 +-40.267 -20.350 +-40.283 -20.367 +-40.317 -20.417 +-40.333 -20.450 +-40.367 -20.533 +-40.400 -20.583 +-40.400 -20.600 +-40.417 -20.633 +-40.433 -20.650 +-40.450 -20.633 +-40.450 -20.617 +-40.467 -20.633 +-40.467 -20.650 +-40.483 -20.650 +-40.500 -20.683 +-40.500 -20.700 +-40.517 -20.717 +-40.550 -20.750 +-40.550 -20.767 +-40.583 -20.800 +-40.600 -20.800 +-40.617 -20.833 +-40.633 -20.833 +-40.650 -20.817 +-40.667 -20.817 +-40.667 -20.817 +-40.700 -20.833 +-40.767 -20.883 +-40.767 -20.900 +-40.783 -20.917 +-40.800 -20.933 +-40.817 -20.983 +-40.817 -21.033 +-40.833 -21.050 +-40.850 -21.083 +-40.883 -21.150 +-40.917 -21.167 +-40.950 -21.233 +-40.967 -21.267 +-40.958 -21.301 +-40.958 -21.301 +-40.967 -21.367 +-41.000 -21.400 +-41.017 -21.433 +-41.033 -21.450 +-41.067 -21.483 +-41.067 -21.500 +-41.083 -21.533 +-41.050 -21.600 +-41.100 -21.650 +-41.033 -21.617 +-41.017 -21.617 +-41.017 -21.633 +-41.033 -21.717 +-41.000 -21.833 +-40.983 -21.917 +-40.967 -21.967 +-40.983 -22.000 +-41.033 -22.033 +-41.100 -22.067 +-41.150 -22.100 +-41.167 -22.117 +-41.250 -22.150 +-41.283 -22.150 +-41.367 -22.183 +-41.483 -22.200 +-41.567 -22.233 +-41.617 -22.267 +-41.667 -22.283 +-41.700 -22.300 +-41.783 -22.367 +-41.767 -22.367 +-41.767 -22.383 +-41.800 -22.400 +-41.833 -22.417 +-41.833 -22.433 +-41.867 -22.467 +-41.883 -22.483 +-41.900 -22.483 +-41.900 -22.500 +-41.917 -22.517 +-41.933 -22.533 +-41.950 -22.533 +-41.967 -22.550 +-41.983 -22.600 +-42.000 -22.667 +-41.983 -22.717 +-41.967 -22.733 +-41.933 -22.767 +-41.917 -22.767 +-41.900 -22.750 +-41.883 -22.750 +-41.850 -22.733 +-41.850 -22.750 +-41.883 -22.767 +-41.883 -22.783 +-41.917 -22.783 +-41.933 -22.800 +-41.933 -22.817 +-41.950 -22.817 +-41.983 -22.833 +-41.983 -22.850 +-41.983 -22.867 +-42.000 -22.883 +-42.033 -22.900 +-42.050 -22.917 +-42.033 -22.933 +-42.017 -22.950 +-42.033 -22.967 +-42.017 -22.983 +-42.017 -23.000 +-42.067 -22.967 +-42.167 -22.950 +-42.267 -22.950 +-42.483 -22.933 +-42.483 -22.917 +-42.517 -22.917 +-42.517 -22.950 +-42.633 -22.933 +-42.683 -22.950 +-42.717 -22.967 +-42.733 -22.967 +-42.900 -22.967 +-42.933 -22.983 +-43.000 -22.967 +-43.050 -22.983 +-43.067 -22.967 +-43.133 -22.950 +-43.133 -22.933 +-43.100 -22.933 +-43.133 -22.900 +-43.117 -22.883 +-43.100 -22.833 +-43.083 -22.817 +-43.083 -22.783 +-43.067 -22.767 +-43.033 -22.733 +-43.050 -22.700 +-43.100 -22.683 +-43.133 -22.717 +-43.167 -22.717 +-43.233 -22.733 +-43.250 -22.750 +-43.267 -22.783 +-43.283 -22.817 +-43.283 -22.833 +-43.250 -22.850 +-43.217 -22.850 +-43.217 -22.900 +-43.183 -22.900 +-43.167 -22.917 +-43.183 -22.950 +-43.167 -22.950 +-43.167 -22.967 +-43.183 -22.967 +-43.183 -22.983 +-43.217 -22.983 +-43.250 -23.000 +-43.267 -23.000 +-43.300 -23.017 +-43.417 -23.000 +-43.417 -23.000 +-43.483 -23.033 +-43.550 -23.050 +-43.567 -23.083 +-43.583 -23.067 +-43.633 -23.050 +-43.833 -23.067 +-44.000 -23.100 +-44.017 -23.083 +-44.000 -23.067 +-43.967 -23.050 +-43.883 -23.067 +-43.917 -23.033 +-43.817 -23.067 +-43.717 -23.050 +-43.650 -23.033 +-43.600 -23.050 +-43.583 -23.067 +-43.600 -23.017 +-43.650 -23.000 +-43.700 -22.983 +-43.733 -22.967 +-43.767 -22.933 +-43.817 -22.917 +-43.833 -22.900 +-43.867 -22.900 +-43.883 -22.917 +-43.950 -22.933 +-44.000 -22.950 +-44.017 -22.967 +-44.050 -22.983 +-44.050 -22.950 +-44.083 -22.967 +-44.083 -22.983 +-44.100 -23.017 +-44.150 -23.033 +-44.183 -23.050 +-44.200 -23.033 +-44.250 -23.050 +-44.217 -23.017 +-44.233 -23.000 +-44.300 -23.017 +-44.350 -23.033 +-44.367 -23.017 +-44.350 -23.000 +-44.333 -23.000 +-44.300 -22.967 +-44.317 -22.950 +-44.333 -22.933 +-44.367 -22.933 +-44.367 -22.950 +-44.417 -22.950 +-44.450 -23.017 +-44.483 -23.000 +-44.583 -23.050 +-44.667 -23.050 +-44.683 -23.067 +-44.700 -23.100 +-44.717 -23.167 +-44.733 -23.200 +-44.717 -23.233 +-44.667 -23.200 +-44.650 -23.183 +-44.633 -23.200 +-44.633 -23.217 +-44.617 -23.217 +-44.617 -23.233 +-44.650 -23.267 +-44.667 -23.300 +-44.617 -23.250 +-44.583 -23.217 +-44.567 -23.217 +-44.567 -23.250 +-44.517 -23.283 +-44.567 -23.317 +-44.583 -23.350 +-44.633 -23.333 +-44.683 -23.350 +-44.700 -23.333 +-44.717 -23.350 +-44.717 -23.350 +-44.733 -23.367 +-44.800 -23.367 +-44.817 -23.383 +-44.833 -23.383 +-44.850 -23.350 +-44.883 -23.367 +-44.883 -23.350 +-44.900 -23.333 +-44.933 -23.350 +-44.967 -23.400 +-45.000 -23.400 +-45.000 -23.417 +-45.017 -23.417 +-45.050 -23.433 +-45.050 -23.417 +-45.067 -23.433 +-45.067 -23.450 +-45.017 -23.467 +-45.050 -23.467 +-45.067 -23.483 +-45.083 -23.500 +-45.100 -23.500 +-45.117 -23.517 +-45.133 -23.500 +-45.150 -23.483 +-45.167 -23.500 +-45.167 -23.517 +-45.167 -23.533 +-45.183 -23.533 +-45.200 -23.517 +-45.233 -23.550 +-45.217 -23.550 +-45.200 -23.567 +-45.250 -23.583 +-45.300 -23.567 +-45.333 -23.583 +-45.367 -23.617 +-45.383 -23.633 +-45.417 -23.650 +-45.400 -23.667 +-45.400 -23.783 +-45.433 -23.833 +-45.533 -23.833 +-45.533 -23.817 +-45.550 -23.817 +-45.567 -23.800 +-45.617 -23.800 +-45.633 -23.783 +-45.700 -23.767 +-45.850 -23.750 +-45.983 -23.783 +-46.033 -23.800 +-46.033 -23.833 +-46.050 -23.817 +-46.083 -23.817 +-46.133 -23.867 +-46.133 -23.883 +-46.150 -23.900 +-46.167 -23.917 +-46.167 -23.950 +-46.183 -23.967 +-46.167 -23.983 +-46.217 -23.983 +-46.250 -24.000 +-46.317 -24.000 +-46.300 -23.983 +-46.317 -23.967 +-46.367 -23.967 +-46.383 -24.000 +-46.250 -24.000 +-46.267 -24.033 +-46.283 -24.033 +-46.300 -24.017 +-46.317 -24.000 +-46.383 -24.000 +-46.367 -24.033 +-46.483 -24.033 +-46.717 -24.167 +-46.783 -24.200 +-46.817 -24.217 +-46.900 -24.267 +-46.983 -24.333 +-46.983 -24.367 +-47.000 -24.383 +-46.983 -24.417 +-47.000 -24.417 +-47.017 -24.433 +-47.083 -24.467 +-47.150 -24.517 +-47.167 -24.533 +-47.183 -24.550 +-47.217 -24.567 +-47.233 -24.583 +-47.383 -24.667 +-47.400 -24.683 +-47.550 -24.767 +-47.667 -24.833 +-47.783 -24.933 +-47.867 -25.000 +-47.867 -25.033 +-47.900 -25.033 +-47.900 -25.017 +-47.933 -25.033 +-48.000 -25.067 +-47.950 -25.083 +-47.900 -25.050 +-47.883 -25.100 +-47.917 -25.167 +-48.000 -25.233 +-48.000 -25.233 +-48.000 -25.217 +-48.017 -25.233 +-48.033 -25.250 +-48.067 -25.283 +-48.083 -25.300 +-48.133 -25.333 +-48.183 -25.400 +-48.217 -25.467 +-48.250 -25.467 +-48.267 -25.433 +-48.250 -25.417 +-48.233 -25.417 +-48.233 -25.400 +-48.233 -25.350 +-48.217 -25.333 +-48.083 -25.250 +-48.200 -25.300 +-48.233 -25.300 +-48.233 -25.317 +-48.267 -25.317 +-48.283 -25.283 +-48.283 -25.350 +-48.267 -25.350 +-48.250 -25.367 +-48.250 -25.400 +-48.283 -25.433 +-48.267 -25.483 +-48.300 -25.500 +-48.333 -25.467 +-48.317 -25.450 +-48.333 -25.450 +-48.350 -25.417 +-48.333 -25.383 +-48.317 -25.367 +-48.350 -25.350 +-48.350 -25.333 +-48.333 -25.317 +-48.333 -25.300 +-48.333 -25.267 +-48.317 -25.250 +-48.333 -25.233 +-48.350 -25.233 +-48.367 -25.267 +-48.383 -25.283 +-48.367 -25.300 +-48.367 -25.317 +-48.383 -25.317 +-48.400 -25.300 +-48.417 -25.283 +-48.417 -25.250 +-48.433 -25.250 +-48.450 -25.267 +-48.450 -25.283 +-48.433 -25.300 +-48.450 -25.333 +-48.500 -25.333 +-48.500 -25.350 +-48.450 -25.350 +-48.450 -25.367 +-48.433 -25.383 +-48.433 -25.417 +-48.417 -25.433 +-48.467 -25.450 +-48.467 -25.483 +-48.517 -25.483 +-48.517 -25.450 +-48.550 -25.450 +-48.567 -25.467 +-48.600 -25.450 +-48.617 -25.467 +-48.650 -25.450 +-48.667 -25.433 +-48.683 -25.433 +-48.700 -25.417 +-48.717 -25.367 +-48.733 -25.383 +-48.717 -25.417 +-48.683 -25.467 +-48.683 -25.483 +-48.733 -25.483 +-48.717 -25.500 +-48.650 -25.500 +-48.633 -25.517 +-48.650 -25.517 +-48.633 -25.533 +-48.617 -25.533 +-48.600 -25.517 +-48.517 -25.517 +-48.483 -25.533 +-48.417 -25.550 +-48.383 -25.550 +-48.367 -25.567 +-48.367 -25.583 +-48.417 -25.600 +-48.450 -25.650 +-48.483 -25.700 +-48.517 -25.767 +-48.533 -25.817 +-48.533 -25.850 +-48.583 -25.850 +-48.600 -25.817 +-48.633 -25.817 +-48.600 -25.850 +-48.683 -25.850 +-48.717 -25.867 +-48.700 -25.883 +-48.617 -25.883 +-48.567 -25.867 +-48.567 -25.883 +-48.583 -25.933 +-48.600 -25.983 +-48.600 -25.983 +-48.617 -26.050 +-48.583 -26.150 +-48.600 -26.183 +-48.633 -26.183 +-48.683 -26.233 +-48.717 -26.250 +-48.750 -26.217 +-48.750 -26.183 +-48.783 -26.133 +-48.783 -26.100 +-48.817 -26.067 +-48.800 -26.100 +-48.783 -26.167 +-48.767 -26.200 +-48.767 -26.233 +-48.767 -26.250 +-48.767 -26.267 +-48.767 -26.283 +-48.783 -26.283 +-48.817 -26.300 +-48.750 -26.300 +-48.733 -26.333 +-48.717 -26.350 +-48.667 -26.367 +-48.667 -26.383 +-48.633 -26.433 +-48.617 -26.450 +-48.667 -26.517 +-48.700 -26.617 +-48.700 -26.683 +-48.683 -26.750 +-48.650 -26.750 +-48.633 -26.783 +-48.600 -26.767 +-48.600 -26.800 +-48.617 -26.817 +-48.633 -26.833 +-48.633 -26.883 +-48.667 -26.900 +-48.633 -26.917 +-48.617 -26.950 +-48.633 -26.983 +-48.617 -27.000 +-48.600 -26.983 +-48.583 -27.017 +-48.567 -27.017 +-48.600 -27.067 +-48.617 -27.117 +-48.600 -27.133 +-48.583 -27.167 +-48.550 -27.150 +-48.533 -27.117 +-48.517 -27.117 +-48.517 -27.150 +-48.483 -27.133 +-48.483 -27.150 +-48.517 -27.167 +-48.500 -27.200 +-48.533 -27.200 +-48.550 -27.183 +-48.617 -27.217 +-48.633 -27.250 +-48.633 -27.283 +-48.617 -27.317 +-48.600 -27.317 +-48.567 -27.300 +-48.550 -27.317 +-48.567 -27.350 +-48.550 -27.383 +-48.567 -27.367 +-48.583 -27.350 +-48.583 -27.400 +-48.583 -27.417 +-48.617 -27.417 +-48.633 -27.433 +-48.650 -27.450 +-48.650 -27.500 +-48.617 -27.550 +-48.583 -27.583 +-48.583 -27.600 +-48.617 -27.600 +-48.667 -27.650 +-48.650 -27.650 +-48.633 -27.700 +-48.633 -27.733 +-48.617 -27.750 +-48.633 -27.783 +-48.600 -27.817 +-48.583 -27.833 +-48.567 -27.867 +-48.583 -27.883 +-48.617 -27.933 +-48.633 -28.000 +-48.617 -28.000 +-48.600 -28.017 +-48.617 -28.067 +-48.633 -28.083 +-48.650 -28.117 +-48.667 -28.183 +-48.650 -28.200 +-48.667 -28.217 +-48.650 -28.233 +-48.667 -28.250 +-48.700 -28.317 +-48.700 -28.350 +-48.717 -28.350 +-48.733 -28.367 +-48.733 -28.417 +-48.767 -28.467 +-48.750 -28.500 +-48.767 -28.533 +-48.783 -28.550 +-48.783 -28.567 +-48.817 -28.583 +-48.833 -28.600 +-48.883 -28.617 +-48.967 -28.667 +-48.983 -28.667 +-49.033 -28.700 +-49.200 -28.817 +-49.300 -28.900 +-49.400 -28.983 +-49.533 -29.100 +-49.667 -29.250 +-49.742 -29.328 +-49.742 -29.328 +-49.917 -29.600 +-50.067 -29.867 +-50.133 -30.033 +-50.283 -30.400 +-50.333 -30.500 +-50.450 -30.650 +-50.533 -30.783 +-50.683 -30.983 +-50.767 -31.100 +-50.883 -31.217 +-51.083 -31.400 +-51.183 -31.483 +-51.250 -31.567 +-51.483 -31.733 +-51.650 -31.817 +-51.800 -31.900 +-51.933 -31.983 +-51.950 -32.000 +-52.067 -32.117 +-52.083 -32.183 +-52.100 -32.133 +-52.050 -32.067 +-52.050 -32.000 +-52.100 -32.000 +-52.117 -32.017 +-52.183 -32.033 +-52.217 -32.033 +-52.200 -32.000 +-52.233 -32.000 +-52.267 -32.050 +-52.233 -32.033 +-52.217 -32.050 +-52.217 -32.083 +-52.117 -32.033 +-52.067 -32.033 +-52.117 -32.133 +-52.100 -32.167 +-52.133 -32.167 +-52.183 -32.217 +-52.250 -32.267 +-52.317 -32.367 +-52.350 -32.417 +-52.383 -32.483 +-52.433 -32.633 +-52.450 -32.700 +-52.467 -32.750 +-52.533 -32.917 +-52.567 -32.967 +-52.583 -33.017 +-52.633 -33.117 +-52.767 -33.267 +-52.883 -33.383 +-53.000 -33.467 +-53.250 -33.667 +-53.317 -33.700 +-53.383 -33.750 +999 999 +-53.833 -27.150 +-53.834 -27.152 +-53.817 -27.183 +-53.800 -27.150 +-53.767 -27.150 +-53.750 -27.200 +-53.717 -27.183 +-53.700 -27.167 +-53.667 -27.167 +-53.650 -27.183 +-53.650 -27.217 +-53.633 -27.217 +-53.633 -27.200 +-53.617 -27.183 +-53.550 -27.183 +-53.500 -27.217 +-53.483 -27.200 +-53.500 -27.167 +-53.517 -27.133 +-53.483 -27.133 +-53.467 -27.150 +-53.417 -27.150 +-53.400 -27.100 +-53.367 -27.100 +-53.350 -27.117 +-53.317 -27.117 +-53.300 -27.133 +-53.333 -27.217 +-53.317 -27.217 +-53.300 -27.200 +-53.267 -27.183 +-53.250 -27.167 +-53.183 -27.200 +-53.167 -27.133 +-53.150 -27.150 +-53.150 -27.183 +-53.067 -27.150 +-53.083 -27.117 +-53.050 -27.083 +-53.017 -27.067 +-53.033 -27.100 +-53.017 -27.117 +-53.050 -27.150 +-53.033 -27.167 +-53.000 -27.133 +-52.983 -27.150 +-53.017 -27.200 +-53.000 -27.217 +-52.967 -27.217 +-52.967 -27.167 +-52.950 -27.167 +-52.933 -27.200 +-52.917 -27.200 +-52.883 -27.183 +-52.867 -27.167 +-52.850 -27.183 +-52.850 -27.217 +-52.783 -27.200 +-52.767 -27.200 +-52.767 -27.250 +-52.733 -27.250 +-52.733 -27.233 +-52.700 -27.250 +-52.700 -27.283 +-52.683 -27.267 +-52.683 -27.250 +-52.667 -27.233 +-52.650 -27.250 +-52.650 -27.267 +-52.617 -27.267 +-52.600 -27.250 +-52.567 -27.250 +-52.550 -27.233 +-52.533 -27.267 +-52.483 -27.267 +-52.483 -27.233 +-52.433 -27.217 +-52.450 -27.267 +-52.400 -27.300 +-52.400 -27.250 +-52.383 -27.267 +-52.383 -27.300 +-52.367 -27.300 +-52.350 -27.283 +-52.333 -27.300 +-52.317 -27.317 +-52.300 -27.317 +-52.317 -27.267 +-52.283 -27.250 +-52.233 -27.267 +-52.283 -27.300 +-52.250 -27.300 +-52.233 -27.333 +-52.217 -27.333 +-52.183 -27.267 +-52.167 -27.283 +-52.183 -27.317 +-52.117 -27.300 +-52.117 -27.350 +-52.083 -27.333 +-52.050 -27.350 +-52.017 -27.333 +-52.033 -27.367 +-51.967 -27.367 +-51.950 -27.383 +-51.983 -27.383 +-52.017 -27.400 +-51.950 -27.417 +-51.933 -27.433 +-51.967 -27.467 +-51.950 -27.467 +-51.900 -27.450 +-51.900 -27.517 +-51.883 -27.517 +-51.867 -27.500 +-51.883 -27.483 +-51.850 -27.467 +-51.850 -27.517 +-51.833 -27.500 +-51.800 -27.517 +-51.800 -27.483 +-51.750 -27.483 +-51.733 -27.517 +-51.717 -27.517 +-51.700 -27.467 +-51.667 -27.467 +-51.667 -27.483 +-51.683 -27.483 +-51.667 -27.517 +-51.650 -27.500 +-51.650 -27.483 +-51.617 -27.483 +-51.633 -27.533 +-51.617 -27.533 +-51.600 -27.517 +-51.583 -27.517 +-51.583 -27.567 +-51.567 -27.583 +-51.550 -27.550 +-51.500 -27.550 +-51.483 -27.567 +-51.467 -27.600 +-51.433 -27.617 +-51.433 -27.650 +-51.417 -27.650 +-51.400 -27.617 +-51.383 -27.617 +-51.367 -27.667 +-51.350 -27.683 +-51.333 -27.667 +-51.317 -27.667 +-51.317 -27.700 +-51.300 -27.717 +-51.267 -27.750 +-51.233 -27.767 +-51.200 -27.767 +-51.167 -27.783 +-51.133 -27.817 +-51.133 -27.833 +-51.100 -27.817 +-51.067 -27.867 +-51.050 -27.883 +-51.050 -27.900 +-51.017 -27.917 +-51.017 -27.967 +-51.000 -27.967 +-50.983 -27.933 +-50.917 -27.967 +-50.933 -28.000 +-50.883 -28.017 +-50.867 -28.050 +-50.900 -28.083 +-50.867 -28.083 +-50.867 -28.133 +-50.850 -28.133 +-50.850 -28.117 +-50.817 -28.117 +-50.817 -28.133 +-50.783 -28.133 +-50.783 -28.200 +-50.767 -28.183 +-50.733 -28.250 +-50.700 -28.267 +-50.667 -28.300 +-50.650 -28.333 +-50.633 -28.367 +-50.617 -28.383 +-50.583 -28.383 +-50.567 -28.400 +-50.533 -28.417 +-50.517 -28.400 +-50.483 -28.400 +-50.450 -28.417 +-50.417 -28.433 +-50.383 -28.433 +-50.367 -28.417 +-50.350 -28.450 +-50.333 -28.450 +-50.317 -28.433 +-50.267 -28.467 +-50.250 -28.450 +-50.217 -28.467 +-50.200 -28.450 +-50.183 -28.450 +-50.183 -28.483 +-50.167 -28.483 +-50.167 -28.467 +-50.150 -28.467 +-50.117 -28.433 +-50.100 -28.483 +-50.033 -28.483 +-50.017 -28.467 +-49.983 -28.450 +-49.950 -28.450 +-49.950 -28.483 +-49.933 -28.483 +-49.933 -28.467 +-49.900 -28.467 +-49.883 -28.450 +-49.867 -28.450 +-49.867 -28.467 +-49.850 -28.500 +-49.817 -28.500 +-49.800 -28.483 +-49.783 -28.500 +-49.767 -28.467 +-49.750 -28.500 +-49.733 -28.500 +-49.733 -28.517 +-49.717 -28.517 +-49.733 -28.533 +-49.717 -28.617 +-49.800 -28.617 +-49.833 -28.700 +-49.850 -28.700 +-49.883 -28.700 +-49.900 -28.733 +-49.917 -28.717 +-49.950 -28.717 +-49.950 -28.733 +-49.933 -28.733 +-49.967 -28.800 +-49.967 -28.883 +-49.967 -28.900 +-49.950 -28.950 +-49.967 -28.967 +-49.983 -29.033 +-50.000 -29.067 +-50.000 -29.083 +-50.017 -29.117 +-50.033 -29.100 +-50.050 -29.083 +-50.067 -29.133 +-50.067 -29.100 +-50.100 -29.100 +-50.100 -29.117 +-50.100 -29.150 +-50.183 -29.183 +-50.183 -29.183 +-50.167 -29.233 +-50.183 -29.283 +-50.183 -29.300 +-50.167 -29.300 +-50.100 -29.317 +-50.083 -29.333 +-50.050 -29.367 +-50.050 -29.333 +-50.100 -29.283 +-50.100 -29.267 +-50.000 -29.233 +-49.967 -29.217 +-49.950 -29.200 +-49.900 -29.217 +-49.850 -29.250 +-49.833 -29.283 +-49.750 -29.300 +-49.750 -29.317 +-49.742 -29.328 +999 999 +-53.633 -26.233 +-53.633 -26.233 +-53.600 -26.250 +-53.550 -26.283 +-53.500 -26.300 +-53.450 -26.283 +-53.417 -26.267 +-53.400 -26.250 +-53.283 -26.233 +-53.217 -26.317 +-53.167 -26.333 +-53.117 -26.367 +-53.050 -26.367 +-52.967 -26.350 +-52.917 -26.350 +-52.883 -26.333 +-52.817 -26.333 +-52.700 -26.350 +-52.667 -26.367 +-52.600 -26.417 +-52.567 -26.400 +-52.517 -26.400 +-52.433 -26.433 +-52.383 -26.433 +-52.367 -26.433 +-52.333 -26.433 +-52.233 -26.467 +-52.200 -26.450 +-52.167 -26.467 +-52.117 -26.483 +-52.100 -26.500 +-52.033 -26.533 +-51.983 -26.567 +-51.967 -26.567 +-51.883 -26.583 +-51.650 -26.583 +-51.617 -26.600 +-51.500 -26.583 +-51.483 -26.633 +-51.450 -26.633 +-51.433 -26.683 +-51.400 -26.717 +-51.383 -26.700 +-51.383 -26.667 +-51.333 -26.650 +-51.283 -26.650 +-51.267 -26.617 +-51.233 -26.617 +-51.217 -26.567 +-51.250 -26.533 +-51.267 -26.500 +-51.250 -26.483 +-51.250 -26.467 +-51.267 -26.450 +-51.300 -26.433 +-51.283 -26.400 +-51.267 -26.383 +-51.250 -26.367 +-51.267 -26.333 +-51.250 -26.333 +-51.167 -26.283 +-51.117 -26.267 +-51.067 -26.233 +-51.050 -26.250 +-51.000 -26.233 +-50.967 -26.250 +-50.967 -26.267 +-50.950 -26.283 +-50.933 -26.267 +-50.950 -26.250 +-50.933 -26.233 +-50.917 -26.250 +-50.900 -26.283 +-50.883 -26.283 +-50.867 -26.250 +-50.850 -26.267 +-50.833 -26.267 +-50.817 -26.233 +-50.767 -26.217 +-50.750 -26.250 +-50.717 -26.250 +-50.733 -26.217 +-50.700 -26.183 +-50.683 -26.150 +-50.650 -26.133 +-50.667 -26.100 +-50.633 -26.067 +-50.550 -26.067 +-50.550 -26.050 +-50.600 -26.050 +-50.600 -26.033 +-50.567 -26.000 +-50.550 -26.033 +-50.517 -26.033 +-50.483 -26.017 +-50.483 -26.033 +-50.450 -26.033 +-50.450 -26.050 +-50.417 -26.067 +-50.400 -26.050 +-50.367 -26.083 +-50.367 -26.117 +-50.333 -26.133 +-50.317 -26.067 +-50.283 -26.050 +-50.250 -26.033 +-50.233 -26.050 +-50.183 -26.050 +-50.167 -26.067 +-50.133 -26.050 +-50.117 -26.067 +-50.100 -26.050 +-50.083 -26.033 +-50.050 -26.050 +-50.033 -26.033 +-50.017 -26.033 +-50.017 -26.000 +-49.983 -26.017 +-49.983 -26.050 +-49.950 -26.033 +-49.967 -26.017 +-49.917 -26.017 +-49.900 -26.033 +-49.883 -26.033 +-49.850 -26.067 +-49.833 -26.067 +-49.833 -26.100 +-49.783 -26.083 +-49.767 -26.117 +-49.733 -26.150 +-49.683 -26.183 +-49.683 -26.200 +-49.667 -26.200 +-49.650 -26.217 +-49.633 -26.183 +-49.633 -26.217 +-49.617 -26.217 +-49.600 -26.233 +-49.567 -26.233 +-49.550 -26.217 +-49.517 -26.217 +-49.500 -26.200 +-49.483 -26.183 +-49.450 -26.167 +-49.383 -26.167 +-49.367 -26.133 +-49.300 -26.117 +-49.283 -26.067 +-49.250 -26.033 +-49.233 -26.017 +-49.167 -26.000 +-49.150 -26.017 +-49.133 -26.000 +-49.117 -26.000 +-49.100 -26.017 +-49.083 -26.000 +-49.067 -26.017 +-48.967 -25.967 +-48.600 -25.983 +999 999 +-54.284 -24.052 +-54.233 -24.033 +-54.200 -24.017 +-54.167 -24.000 +-54.083 -23.917 +-54.067 -23.750 +-54.033 -23.667 +-54.017 -23.583 +-54.000 -23.517 +-53.967 -23.450 +-53.883 -23.400 +-53.817 -23.367 +-53.750 -23.333 +-53.717 -23.300 +-53.700 -23.267 +-53.700 -23.250 +-53.650 -23.167 +-53.633 -23.133 +-53.617 -23.067 +-53.633 -23.017 +-53.617 -22.983 +-53.583 -22.933 +-53.483 -22.850 +-53.383 -22.800 +-53.200 -22.733 +-53.083 -22.650 +-53.033 -22.617 +-53.017 -22.600 +-53.000 -22.600 +-52.983 -22.583 +-52.933 -22.567 +-52.883 -22.583 +-52.850 -22.617 +-52.800 -22.600 +-52.767 -22.617 +-52.717 -22.633 +-52.700 -22.633 +-52.583 -22.567 +-52.533 -22.617 +-52.500 -22.633 +-52.433 -22.617 +-52.350 -22.633 +-52.300 -22.633 +-52.267 -22.617 +-52.233 -22.633 +-52.217 -22.683 +-52.150 -22.650 +-52.150 -22.567 +-52.100 -22.500 +-52.067 -22.533 +-52.000 -22.550 +-51.917 -22.583 +-51.867 -22.633 +-51.767 -22.617 +-51.733 -22.633 +-51.717 -22.667 +-51.650 -22.650 +-51.617 -22.667 +-51.567 -22.700 +-51.483 -22.683 +-51.433 -22.650 +-51.400 -22.667 +-51.317 -22.667 +-51.250 -22.683 +-51.183 -22.733 +-51.117 -22.767 +-51.000 -22.783 +-50.967 -22.783 +-50.950 -22.800 +-50.900 -22.800 +-50.867 -22.817 +-50.833 -22.850 +-50.783 -22.900 +-50.800 -22.933 +-50.717 -22.950 +-50.700 -22.917 +-50.667 -22.900 +-50.617 -22.917 +-50.550 -22.917 +-50.517 -22.933 +-50.433 -22.933 +-50.400 -22.917 +-50.367 -22.917 +-50.317 -22.950 +-50.267 -22.933 +-50.233 -22.950 +-50.083 -22.933 +-50.050 -22.900 +-50.017 -22.917 +-50.000 -22.900 +-49.967 -22.900 +-49.967 -22.917 +-49.950 -22.933 +-49.967 -22.967 +-49.917 -23.000 +-49.917 -23.050 +-49.817 -23.083 +-49.783 -23.100 +-49.733 -23.100 +-49.733 -23.150 +-49.683 -23.183 +-49.667 -23.200 +-49.667 -23.333 +-49.617 -23.400 +-49.600 -23.433 +-49.617 -23.467 +-49.633 -23.500 +-49.600 -23.567 +-49.617 -23.600 +-49.617 -23.650 +-49.567 -23.683 +-49.550 -23.717 +-49.583 -23.750 +-49.567 -23.800 +-49.617 -23.850 +-49.600 -23.867 +-49.583 -23.867 +-49.550 -23.917 +-49.533 -23.900 +-49.500 -23.950 +-49.483 -24.000 +-49.500 -24.000 +-49.500 -24.017 +-49.467 -24.033 +-49.433 -24.067 +-49.417 -24.100 +-49.400 -24.117 +-49.333 -24.133 +-49.350 -24.217 +-49.350 -24.233 +-49.317 -24.267 +-49.317 -24.300 +-49.300 -24.317 +-49.283 -24.333 +-49.250 -24.350 +-49.233 -24.350 +-49.233 -24.383 +-49.250 -24.400 +-49.233 -24.417 +-49.250 -24.450 +-49.267 -24.483 +-49.300 -24.500 +-49.283 -24.533 +-49.317 -24.567 +-49.317 -24.667 +-49.300 -24.683 +-49.283 -24.700 +-49.217 -24.700 +-49.167 -24.667 +-49.133 -24.683 +-49.067 -24.683 +-49.033 -24.650 +-49.033 -24.633 +-49.017 -24.633 +-49.000 -24.650 +-48.983 -24.667 +-48.950 -24.683 +-48.917 -24.683 +-48.883 -24.667 +-48.867 -24.683 +-48.867 -24.667 +-48.817 -24.667 +-48.817 -24.683 +-48.767 -24.700 +-48.750 -24.683 +-48.750 -24.700 +-48.683 -24.683 +-48.683 -24.700 +-48.667 -24.683 +-48.667 -24.700 +-48.650 -24.700 +-48.617 -24.683 +-48.583 -24.683 +-48.550 -24.733 +-48.500 -24.750 +-48.517 -24.767 +-48.550 -24.800 +-48.567 -24.867 +-48.550 -24.883 +-48.567 -24.900 +-48.567 -24.950 +-48.600 -25.000 +-48.583 -25.050 +-48.550 -25.050 +-48.500 -25.050 +-48.433 -25.000 +-48.417 -24.983 +-48.333 -25.050 +-48.300 -25.050 +-48.267 -25.017 +-48.200 -25.050 +-48.200 -25.083 +-48.167 -25.133 +-48.167 -25.150 +-48.183 -25.183 +-48.150 -25.233 +-48.083 -25.233 +-48.083 -25.300 +999 999 +-57.750 -17.550 +-57.733 -17.533 +-57.700 -17.550 +-57.700 -17.600 +-57.683 -17.633 +-57.667 -17.667 +-57.683 -17.700 +-57.650 -17.717 +-57.633 -17.767 +-57.617 -17.767 +-57.600 -17.783 +-57.517 -17.850 +-57.500 -17.850 +-57.483 -17.867 +-57.467 -17.883 +-57.467 -17.900 +-57.417 -17.867 +-57.367 -17.833 +-57.300 -17.817 +-57.200 -17.800 +-57.100 -17.767 +-57.050 -17.733 +-57.033 -17.733 +-57.017 -17.683 +-56.983 -17.667 +-56.950 -17.617 +-56.967 -17.600 +-56.950 -17.567 +-56.933 -17.567 +-56.933 -17.550 +-56.900 -17.533 +-56.867 -17.517 +-56.850 -17.500 +-56.850 -17.483 +-56.833 -17.450 +-56.817 -17.433 +-56.833 -17.417 +-56.817 -17.383 +-56.783 -17.383 +-56.750 -17.350 +-56.750 -17.333 +-56.700 -17.317 +-56.650 -17.333 +-56.633 -17.317 +-56.617 -17.333 +-56.600 -17.333 +-56.567 -17.333 +-56.567 -17.317 +-56.533 -17.317 +-56.500 -17.300 +-56.433 -17.317 +-56.383 -17.300 +-56.367 -17.283 +-56.333 -17.267 +-56.317 -17.267 +-56.283 -17.267 +-56.283 -17.250 +-56.233 -17.217 +-56.200 -17.233 +-56.183 -17.217 +-56.150 -17.183 +-56.133 -17.183 +-56.133 -17.167 +-56.100 -17.167 +-56.067 -17.167 +-56.050 -17.183 +-56.033 -17.183 +-56.017 -17.217 +-56.000 -17.233 +-55.983 -17.250 +-55.950 -17.250 +-55.933 -17.267 +-55.883 -17.250 +-55.883 -17.283 +-55.817 -17.300 +-55.800 -17.300 +-55.783 -17.317 +-55.717 -17.333 +-55.650 -17.333 +-55.617 -17.350 +-55.600 -17.350 +-55.583 -17.367 +-55.583 -17.400 +-55.500 -17.483 +-55.467 -17.483 +-55.450 -17.500 +-55.367 -17.533 +-55.350 -17.550 +-55.317 -17.550 +-55.267 -17.550 +-55.200 -17.617 +-55.150 -17.650 +-55.117 -17.650 +-55.100 -17.633 +-55.083 -17.633 +-55.050 -17.633 +-55.017 -17.633 +-54.983 -17.633 +-54.950 -17.600 +-54.900 -17.617 +-54.867 -17.600 +-54.850 -17.617 +-54.833 -17.600 +-54.800 -17.583 +-54.783 -17.567 +-54.750 -17.550 +-54.750 -17.517 +-54.717 -17.517 +-54.700 -17.500 +-54.667 -17.500 +-54.617 -17.483 +-54.583 -17.467 +-54.550 -17.483 +-54.517 -17.467 +-54.483 -17.483 +-54.467 -17.517 +-54.433 -17.517 +-54.383 -17.567 +-54.383 -17.600 +-54.383 -17.633 +-54.350 -17.667 +-54.300 -17.667 +-54.250 -17.633 +-54.183 -17.600 +-54.133 -17.600 +-54.083 -17.600 +-54.067 -17.517 +-54.083 -17.500 +-54.050 -17.450 +-54.000 -17.450 +-53.967 -17.450 +-53.900 -17.383 +-53.833 -17.350 +-53.833 -17.317 +-53.783 -17.267 +-53.750 -17.233 +-53.700 -17.217 +-53.700 -17.350 +-53.700 -17.550 +-53.800 -17.667 +-53.867 -17.717 +-53.900 -17.750 +-53.917 -17.800 +-53.967 -17.883 +-53.933 -17.900 +-53.883 -17.917 +-53.850 -17.933 +-53.817 -17.967 +-53.717 -18.000 +-53.700 -18.017 +-53.667 -17.983 +-53.633 -17.983 +-53.583 -18.017 +-53.550 -18.017 +-53.483 -18.033 +-53.450 -18.000 +-53.400 -18.000 +-53.333 -18.000 +-53.250 -18.000 +-53.183 -18.050 +-53.083 -18.050 +-53.133 -18.067 +-53.100 -18.217 +-53.050 -18.333 +-52.983 -18.283 +-52.867 -18.300 +-52.783 -18.317 +-52.817 -18.400 +-52.883 -18.433 +-52.967 -18.483 +-52.967 -18.533 +-52.950 -18.583 +-52.900 -18.633 +-52.867 -18.650 +-52.800 -18.667 +-52.717 -18.683 +-52.683 -18.667 +-52.583 -18.683 +-52.533 -18.650 +-52.383 -18.767 +-52.333 -18.817 +-52.267 -18.833 +-52.150 -18.883 +-52.100 -18.917 +-52.033 -18.950 +-52.017 -18.983 +-51.933 -18.967 +-51.800 -19.067 +-51.650 -19.133 +-51.517 -19.150 +-51.433 -19.167 +-51.367 -19.217 +-51.300 -19.233 +-51.217 -19.250 +-51.167 -19.283 +-51.067 -19.333 +-51.033 -19.367 +-51.000 -19.400 +-50.917 -19.467 +-50.917 -19.533 +-51.000 -19.600 +-51.033 -19.683 +-51.033 -19.733 +-51.033 -19.833 +-51.017 -19.883 +-51.000 -19.933 +-51.017 -20.000 +-51.000 -20.067 +-50.983 -20.067 +-50.967 -20.050 +-50.967 -20.033 +-50.933 -20.017 +-50.900 -20.000 +-50.850 -19.967 +-50.700 -19.917 +-50.533 -19.800 +-50.467 -19.800 +-50.383 -19.833 +-50.150 -19.867 +-50.083 -19.867 +-50.033 -19.917 +-49.950 -19.933 +-49.833 -19.933 +-49.700 -19.933 +-49.617 -19.917 +-49.500 -19.933 +-49.383 -19.983 +-49.300 -19.950 +-49.233 -20.000 +-49.250 -20.017 +-49.300 -20.017 +-49.300 -20.033 +-49.317 -20.050 +-49.317 -20.083 +-49.300 -20.167 +-49.283 -20.200 +-49.233 -20.300 +-49.183 -20.317 +-49.117 -20.283 +-49.083 -20.217 +-49.083 -20.200 +-49.033 -20.150 +-49.000 -20.167 +-48.983 -20.183 +-48.967 -20.217 +-48.967 -20.417 +-48.900 -20.433 +-48.883 -20.400 +-48.883 -20.267 +-48.867 -20.217 +-48.833 -20.150 +-48.633 -20.150 +-48.583 -20.133 +-48.500 -20.133 +-48.417 -20.100 +-48.333 -20.100 +-48.267 -20.133 +-48.233 -20.133 +-48.233 -20.100 +-48.267 -20.067 +-48.233 -20.017 +-48.200 -20.033 +-48.183 -20.083 +-48.100 -20.150 +-48.033 -20.133 +-48.000 -20.117 +-47.967 -20.033 +-47.950 -20.033 +-47.933 -20.100 +-47.917 -20.117 +-47.883 -20.100 +-47.867 -20.050 +-47.867 -20.033 +-47.867 -20.000 +-47.833 -19.983 +-47.750 -19.983 +-47.700 -19.983 +-47.683 -20.000 +-47.633 -20.050 +-47.600 -20.033 +-47.600 -20.000 +-47.550 -19.983 +-47.500 -19.967 +-47.433 -20.000 +-47.417 -20.017 +-47.450 -20.050 +-47.417 -20.067 +-47.400 -20.083 +-47.350 -20.100 +-47.333 -20.117 +-47.250 -20.183 +-47.250 -20.200 +-47.233 -20.233 +-47.250 -20.267 +-47.267 -20.283 +-47.283 -20.333 +-47.300 -20.383 +-47.283 -20.433 +-47.283 -20.450 +-47.267 -20.467 +-47.217 -20.500 +-47.150 -20.533 +-47.117 -20.633 +-47.100 -20.683 +-47.117 -20.700 +-47.150 -20.700 +-47.167 -20.733 +-47.183 -20.750 +-47.200 -20.767 +-47.217 -20.817 +-47.200 -20.833 +-47.233 -20.867 +-47.233 -20.900 +-47.183 -20.933 +-47.167 -20.967 +-47.150 -21.000 +-47.133 -21.033 +-47.133 -21.083 +-47.117 -21.117 +-47.133 -21.133 +-47.100 -21.200 +-47.050 -21.200 +-47.050 -21.233 +-47.033 -21.267 +-47.000 -21.333 +-47.000 -21.417 +-46.917 -21.417 +-46.900 -21.400 +-46.850 -21.367 +-46.817 -21.350 +-46.800 -21.367 +-46.750 -21.367 +-46.733 -21.383 +-46.700 -21.400 +-46.667 -21.383 +-46.633 -21.383 +-46.650 -21.400 +-46.633 -21.417 +-46.633 -21.433 +-46.550 -21.433 +-46.533 -21.450 +-46.517 -21.467 +-46.517 -21.517 +-46.483 -21.550 +-46.500 -21.583 +-46.500 -21.600 +-46.533 -21.617 +-46.567 -21.633 +-46.567 -21.683 +-46.617 -21.683 +-46.650 -21.783 +-46.683 -21.833 +-46.667 -21.867 +-46.667 -21.900 +-46.650 -21.950 +-46.617 -22.000 +-46.617 -22.017 +-46.650 -22.017 +-46.667 -22.033 +-46.683 -22.033 +-46.683 -22.050 +-46.650 -22.067 +-46.717 -22.083 +-46.717 -22.100 +-46.667 -22.100 +-46.633 -22.117 +-46.617 -22.133 +-46.617 -22.167 +-46.667 -22.200 +-46.650 -22.250 +-46.700 -22.267 +-46.700 -22.300 +-46.717 -22.317 +-46.700 -22.333 +-46.667 -22.367 +-46.650 -22.417 +-46.617 -22.417 +-46.600 -22.467 +-46.583 -22.483 +-46.533 -22.467 +-46.517 -22.450 +-46.517 -22.500 +-46.467 -22.517 +-46.433 -22.533 +-46.400 -22.533 +-46.417 -22.550 +-46.433 -22.567 +-46.433 -22.583 +-46.400 -22.600 +-46.417 -22.617 +-46.417 -22.633 +-46.383 -22.650 +-46.400 -22.667 +-46.467 -22.667 +-46.483 -22.700 +-46.467 -22.717 +-46.417 -22.733 +-46.383 -22.750 +-46.350 -22.767 +-46.333 -22.767 +-46.383 -22.833 +-46.383 -22.883 +-46.333 -22.900 +-46.267 -22.883 +-46.217 -22.883 +-46.200 -22.867 +-46.167 -22.850 +-46.067 -22.850 +-46.050 -22.867 +-46.017 -22.883 +-45.967 -22.850 +-45.967 -22.817 +-45.900 -22.817 +-45.900 -22.833 +-45.883 -22.850 +-45.867 -22.850 +-45.850 -22.817 +-45.817 -22.817 +-45.800 -22.833 +-45.783 -22.850 +-45.767 -22.833 +-45.783 -22.817 +-45.733 -22.800 +-45.717 -22.783 +-45.700 -22.767 +-45.700 -22.733 +-45.717 -22.717 +-45.750 -22.717 +-45.783 -22.733 +-45.817 -22.733 +-45.833 -22.717 +-45.833 -22.700 +-45.783 -22.700 +-45.767 -22.683 +-45.767 -22.667 +-45.700 -22.650 +-45.700 -22.633 +-45.750 -22.583 +-45.733 -22.567 +-45.683 -22.533 +-45.667 -22.550 +-45.683 -22.567 +-45.650 -22.583 +-45.650 -22.600 +-45.667 -22.617 +-45.667 -22.650 +-45.650 -22.650 +-45.567 -22.600 +-45.567 -22.617 +-45.583 -22.650 +-45.483 -22.617 +-45.467 -22.600 +-45.417 -22.617 +-45.417 -22.667 +-45.400 -22.650 +-45.367 -22.633 +-45.333 -22.617 +-45.283 -22.617 +-45.283 -22.583 +-45.183 -22.550 +-45.150 -22.517 +-45.150 -22.500 +-45.133 -22.500 +-45.117 -22.483 +-45.033 -22.450 +-45.000 -22.483 +-44.983 -22.483 +-44.933 -22.467 +-44.917 -22.450 +-44.883 -22.433 +-44.850 -22.400 +-44.833 -22.400 +-44.767 -22.400 +-44.733 -22.417 +-44.717 -22.433 +-44.717 -22.483 +-44.700 -22.517 +-44.700 -22.517 +-44.683 -22.533 +-44.683 -22.550 +-44.633 -22.550 +-44.633 -22.600 +-44.600 -22.617 +-44.583 -22.617 +-44.550 -22.600 +-44.533 -22.617 +-44.500 -22.633 +-44.483 -22.600 +-44.467 -22.600 +-44.450 -22.617 +-44.433 -22.617 +-44.433 -22.600 +-44.383 -22.600 +-44.383 -22.583 +-44.367 -22.583 +-44.367 -22.600 +-44.350 -22.600 +-44.317 -22.583 +-44.283 -22.600 +-44.200 -22.617 +-44.183 -22.650 +-44.167 -22.667 +-44.183 -22.700 +-44.183 -22.700 +-44.200 -22.717 +-44.200 -22.733 +-44.217 -22.733 +-44.233 -22.750 +-44.250 -22.767 +-44.233 -22.783 +-44.233 -22.800 +-44.250 -22.800 +-44.250 -22.817 +-44.267 -22.833 +-44.317 -22.833 +-44.350 -22.850 +-44.400 -22.850 +-44.417 -22.833 +-44.433 -22.883 +-44.467 -22.883 +-44.467 -22.850 +-44.500 -22.850 +-44.550 -22.883 +-44.633 -22.917 +-44.650 -22.933 +-44.683 -22.950 +-44.733 -22.950 +-44.750 -22.967 +-44.800 -22.983 +-44.800 -23.000 +-44.817 -23.150 +-44.833 -23.167 +-44.867 -23.183 +-44.883 -23.217 +-44.867 -23.250 +-44.817 -23.283 +-44.800 -23.300 +-44.717 -23.350 +999 999 +-53.083 -22.650 +-53.100 -22.617 +-53.067 -22.550 +-53.017 -22.533 +-52.983 -22.500 +-52.867 -22.450 +-52.750 -22.350 +-52.633 -22.283 +-52.483 -22.200 +-52.433 -22.167 +-52.400 -22.133 +-52.350 -22.067 +-52.333 -22.000 +-52.300 -21.950 +-52.267 -21.917 +-52.200 -21.850 +-52.150 -21.767 +-52.067 -21.717 +-52.050 -21.650 +-52.050 -21.633 +-52.067 -21.617 +-52.067 -21.583 +-52.100 -21.567 +-52.100 -21.550 +-52.067 -21.517 +-52.000 -21.517 +-51.950 -21.483 +-51.933 -21.450 +-51.917 -21.400 +-51.883 -21.367 +-51.867 -21.333 +-51.850 -21.267 +-51.867 -21.217 +-51.883 -21.200 +-51.883 -21.150 +-51.817 -21.117 +-51.783 -21.083 +-51.783 -21.067 +-51.767 -21.033 +-51.750 -21.017 +-51.750 -21.000 +-51.733 -20.983 +-51.633 -20.917 +-51.633 -20.717 +-51.600 -20.667 +-51.500 -20.550 +-51.400 -20.433 +-51.350 -20.367 +-51.267 -20.317 +-51.167 -20.317 +-51.067 -20.233 +-51.050 -20.217 +-51.033 -20.167 +-51.017 -20.117 +-51.000 -20.100 +-51.000 -20.083 +-51.000 -20.067 +999 999 +-50.917 -19.467 +-50.850 -19.433 +-50.867 -19.383 +-50.750 -19.233 +-50.683 -19.167 +-50.583 -19.133 +-50.517 -19.050 +-50.500 -18.967 +-50.450 -18.900 +-50.417 -18.833 +-50.317 -18.700 +-50.250 -18.683 +-50.133 -18.667 +-50.017 -18.600 +-49.950 -18.617 +-49.833 -18.633 +-49.767 -18.617 +-49.683 -18.583 +-49.650 -18.567 +-49.550 -18.500 +-49.483 -18.567 +-49.400 -18.650 +-49.333 -18.567 +-49.283 -18.533 +-49.217 -18.467 +-49.217 -18.417 +-49.133 -18.383 +-49.067 -18.417 +-48.983 -18.350 +-48.900 -18.317 +-48.833 -18.350 +-48.800 -18.367 +-48.633 -18.333 +-48.567 -18.333 +-48.467 -18.367 +-48.367 -18.367 +-48.317 -18.383 +-48.267 -18.333 +-48.217 -18.367 +-48.117 -18.433 +-48.050 -18.417 +-48.017 -18.433 +-48.000 -18.450 +-47.967 -18.450 +-47.950 -18.483 +-47.917 -18.467 +-47.867 -18.450 +-47.833 -18.433 +-47.800 -18.400 +-47.750 -18.400 +-47.717 -18.350 +-47.650 -18.317 +-47.633 -18.333 +-47.633 -18.283 +-47.617 -18.250 +-47.600 -18.233 +-47.583 -18.217 +-47.567 -18.200 +-47.550 -18.183 +-47.533 -18.217 +-47.517 -18.183 +-47.500 -18.200 +-47.450 -18.167 +-47.433 -18.133 +-47.400 -18.117 +-47.367 -18.100 +-47.300 -18.067 +-47.300 -18.017 +-47.317 -17.983 +-47.350 -17.900 +-47.350 -17.867 +-47.350 -17.783 +-47.333 -17.733 +-47.317 -17.717 +-47.267 -17.600 +-47.400 -17.500 +-47.500 -17.450 +-47.533 -17.400 +-47.500 -17.333 +-47.450 -17.350 +-47.417 -17.300 +-47.400 -17.250 +-47.383 -17.233 +-47.367 -17.217 +-47.367 -17.200 +-47.350 -17.167 +-47.283 -17.150 +-47.183 -17.067 +-47.133 -17.000 +-47.150 -16.967 +-47.167 -16.933 +-47.183 -16.900 +-47.200 -16.817 +-47.217 -16.783 +-47.217 -16.733 +-47.250 -16.667 +-47.317 -16.617 +-47.333 -16.617 +-47.367 -16.600 +-47.400 -16.567 +-47.417 -16.550 +-47.450 -16.467 +-47.417 -16.383 +-47.350 -16.317 +-47.350 -16.150 +-47.317 -16.100 +-47.283 -16.017 +-47.200 -16.000 +-47.167 -15.967 +-47.133 -15.933 +-47.083 -15.950 +-47.033 -15.917 +-46.983 -15.917 +-46.883 -15.900 +-46.817 -15.883 +-46.833 -15.817 +-46.850 -15.783 +-46.850 -15.733 +-46.867 -15.717 +-46.883 -15.700 +-46.900 -15.667 +-46.883 -15.617 +-46.933 -15.567 +-46.933 -15.483 +-46.917 -15.400 +-46.850 -15.367 +-46.867 -15.350 +-46.850 -15.333 +-46.833 -15.317 +-46.883 -15.283 +-46.900 -15.250 +-46.900 -15.233 +-46.917 -15.250 +-46.933 -15.250 +-46.933 -15.183 +-46.883 -15.117 +-46.933 -15.067 +-46.917 -15.033 +-46.850 -15.000 +-46.767 -15.017 +-46.683 -15.050 +-46.617 -15.100 +-46.567 -15.083 +-46.517 -15.050 +-46.533 -14.983 +-46.533 -14.917 +-46.533 -14.900 +-46.517 -14.850 +-46.567 -14.800 +-46.550 -14.783 +-46.533 -14.767 +-46.517 -14.750 +-46.483 -14.700 +-46.467 -14.683 +-46.400 -14.750 +-46.333 -14.800 +-46.283 -14.800 +-46.317 -14.850 +-46.317 -14.883 +-46.267 -14.900 +-46.200 -14.933 +-46.167 -14.933 +-46.150 -14.917 +-46.100 -14.933 +-46.067 -14.933 +-46.034 -14.867 +999 999 +-44.833 -22.400 +-44.767 -22.367 +-44.683 -22.367 +-44.650 -22.383 +-44.633 -22.383 +-44.633 -22.350 +-44.617 -22.333 +-44.550 -22.333 +-44.433 -22.250 +-44.400 -22.267 +-44.283 -22.250 +-44.250 -22.267 +-44.100 -22.183 +-44.033 -22.167 +-44.000 -22.167 +-43.950 -22.133 +-43.767 -22.067 +-43.750 -22.100 +-43.733 -22.100 +-43.683 -22.083 +-43.583 -22.083 +-43.550 -22.100 +-43.517 -22.067 +-43.450 -22.067 +-43.350 -22.000 +-43.333 -22.000 +-43.250 -22.033 +-43.150 -22.033 +-43.150 -22.100 +-43.133 -22.100 +-43.083 -22.083 +-43.033 -22.050 +-42.967 -22.033 +-42.867 -21.950 +-42.717 -21.900 +-42.667 -21.867 +-42.600 -21.850 +-42.250 -21.717 +-42.267 -21.683 +-42.350 -21.650 +-42.367 -21.617 +-42.283 -21.500 +-42.250 -21.500 +-42.250 -21.483 +-42.267 -21.450 +-42.250 -21.400 +-42.217 -21.350 +-42.217 -21.300 +-42.183 -21.250 +-42.183 -21.183 +-42.167 -21.117 +-42.083 -21.033 +-42.083 -21.017 +-42.117 -21.017 +-42.150 -21.000 +-42.150 -20.967 +-42.167 -20.950 +-42.000 -20.950 +-42.000 -20.950 +-41.867 -20.783 +-41.883 -20.767 +-41.879 -20.760 +-41.867 -20.717 +-41.817 -20.650 +-41.833 -20.617 +-41.850 -20.617 +-41.850 -20.583 +-41.833 -20.567 +-41.800 -20.550 +-41.800 -20.517 +-41.817 -20.467 +-41.800 -20.467 +-41.800 -20.417 +-41.833 -20.400 +-41.850 -20.383 +-41.850 -20.350 +-41.783 -20.283 +-41.756 -20.207 +-41.747 -20.207 +-41.737 -20.207 +-41.728 -20.207 +-41.718 -20.207 +-41.708 -20.207 +-41.699 -20.207 +-41.689 -20.207 +-41.680 -20.207 +-41.670 -20.207 +-41.660 -20.207 +-41.651 -20.207 +-41.641 -20.207 +-41.632 -20.207 +-41.622 -20.207 +-41.612 -20.207 +-41.603 -20.207 +-41.593 -20.207 +-41.583 -20.207 +-41.574 -20.207 +-41.564 -20.207 +-41.555 -20.207 +-41.545 -20.207 +-41.535 -20.207 +-41.526 -20.207 +-41.516 -20.207 +-41.507 -20.207 +-41.497 -20.207 +-41.487 -20.207 +-41.478 -20.207 +-41.468 -20.207 +-41.459 -20.207 +-41.449 -20.207 +-41.439 -20.207 +-41.430 -20.207 +-41.420 -20.207 +-41.411 -20.207 +-41.383 -20.200 +-41.300 -20.000 +-41.300 -19.950 +-41.233 -19.917 +-41.183 -19.850 +-41.167 -19.750 +-41.100 -19.617 +-41.050 -19.583 +-41.051 -19.483 +-40.983 -19.500 +-40.967 -19.417 +-40.933 -19.150 +-41.017 -19.067 +-41.050 -19.033 +-41.050 -18.983 +-41.117 -18.900 +-41.200 -18.917 +-41.233 -18.817 +-41.117 -18.800 +-41.073 -18.843 +-41.073 -18.843 +-40.929 -18.794 +-40.929 -18.794 +-40.939 -18.769 +-40.939 -18.769 +-40.940 -18.689 +-40.940 -18.689 +-41.033 -18.667 +-41.017 -18.417 +-41.133 -18.400 +-41.133 -18.333 +-41.117 -18.250 +-41.033 -18.183 +-40.950 -18.117 +-40.900 -18.133 +-40.783 -18.167 +-40.773 -18.107 +-40.773 -18.107 +-40.883 -18.000 +-40.883 -18.000 +-40.903 -17.987 +-40.903 -17.987 +-40.917 -17.933 +-40.783 -17.983 +-40.683 -17.967 +-40.583 -17.850 +-40.467 -17.933 +-40.433 -17.900 +-40.179 -17.980 +-40.250 -17.950 +-40.264 -17.922 +-40.212 -17.896 +-40.167 -17.854 +-40.183 -17.800 +-40.283 -17.717 +-40.367 -17.633 +-40.400 -17.567 +-40.483 -17.567 +-40.500 -17.517 +-40.483 -17.417 +-40.550 -17.433 +-40.500 -17.367 +-40.533 -17.350 +-40.600 -17.433 +-40.633 -17.400 +-40.550 -17.283 +-40.583 -17.233 +-40.583 -17.100 +-40.567 -17.067 +-40.500 -16.883 +-40.450 -16.900 +-40.250 -16.850 +-40.300 -16.750 +-40.283 -16.667 +-40.250 -16.567 +-40.167 -16.567 +-40.133 -16.483 +-40.050 -16.367 +-40.000 -16.350 +-39.900 -16.200 +-39.867 -16.150 +-39.867 -16.100 +-39.967 -16.000 +-39.967 -16.000 +-40.000 -15.983 +-40.017 -15.983 +-40.067 -15.967 +-40.083 -15.917 +-40.117 -15.900 +-40.183 -15.900 +-40.183 -15.867 +-40.217 -15.867 +-40.217 -15.833 +-40.233 -15.817 +-40.367 -15.817 +-40.433 -15.800 +-40.450 -15.767 +-40.450 -15.750 +-40.467 -15.750 +-40.483 -15.767 +-40.517 -15.800 +-40.533 -15.783 +-40.550 -15.800 +-40.583 -15.783 +-40.583 -15.750 +-40.583 -15.733 +-40.617 -15.717 +-40.650 -15.700 +-40.683 -15.700 +-40.750 -15.750 +-40.767 -15.733 +-40.783 -15.700 +-40.800 -15.683 +-40.800 -15.650 +-40.817 -15.650 +-40.867 -15.683 +-40.883 -15.700 +-40.917 -15.683 +-40.933 -15.650 +-40.967 -15.650 +-41.017 -15.717 +-41.033 -15.733 +-41.100 -15.750 +-41.150 -15.767 +-41.150 -15.783 +-41.200 -15.767 +-41.217 -15.750 +-41.233 -15.750 +-41.267 -15.750 +-41.317 -15.733 +-41.332 -15.744 +-41.358 -15.500 +-41.797 -15.086 +-41.800 -15.083 +-41.817 -15.100 +-41.867 -15.100 +-41.883 -15.150 +-41.917 -15.150 +-41.950 -15.167 +-42.000 -15.150 +-42.067 -15.150 +-42.117 -15.133 +-42.183 -15.117 +-42.217 -15.067 +-42.267 -15.100 +-42.317 -15.100 +-42.333 -15.067 +-42.367 -15.050 +-42.450 -15.017 +-42.467 -15.000 +-42.517 -14.983 +-42.617 -14.933 +-42.650 -14.933 +-42.683 -14.917 +-42.700 -14.917 +-42.717 -14.900 +-42.717 -14.883 +-42.733 -14.883 +-42.750 -14.867 +-42.817 -14.900 +-42.817 -14.833 +-42.950 -14.733 +-42.950 -14.717 +-43.017 -14.700 +-43.050 -14.683 +-43.100 -14.683 +-43.100 -14.667 +-43.117 -14.683 +-43.133 -14.667 +-43.200 -14.633 +-43.217 -14.667 +-43.283 -14.650 +-43.333 -14.667 +-43.383 -14.700 +-43.450 -14.717 +-43.467 -14.767 +-43.500 -14.767 +-43.483 -14.783 +-43.533 -14.800 +-43.600 -14.750 +-43.633 -14.750 +-43.683 -14.733 +-43.733 -14.717 +-43.733 -14.717 +-43.733 -14.700 +-43.833 -14.683 +-43.883 -14.667 +-43.883 -14.517 +-43.800 -14.333 +-43.900 -14.300 +-43.917 -14.317 +-44.000 -14.267 +-44.067 -14.283 +-44.117 -14.267 +-44.150 -14.283 +-44.183 -14.267 +-44.216 -14.233 +-44.250 -14.250 +-44.350 -14.267 +-44.483 -14.317 +-44.650 -14.383 +-44.683 -14.433 +-44.817 -14.500 +-44.850 -14.567 +-44.900 -14.617 +-44.983 -14.650 +-45.033 -14.683 +-45.067 -14.750 +-45.117 -14.750 +-45.200 -14.733 +-45.317 -14.833 +-45.333 -14.833 +-45.400 -14.917 +-45.417 -14.900 +-45.450 -14.933 +-45.483 -14.933 +-45.550 -14.917 +-45.550 -14.950 +-45.600 -15.000 +-45.633 -15.017 +-45.667 -15.067 +-45.733 -15.117 +-45.817 -15.117 +-45.850 -15.150 +-45.950 -15.133 +-45.983 -15.200 +-46.017 -15.217 +-46.017 -15.217 +-46.050 -15.233 +-46.100 -15.233 +-46.050 -15.150 +-46.050 -15.133 +-45.967 -15.017 +-45.967 -14.983 +-45.983 -14.917 +-46.034 -14.867 +999 999 +-40.179 -17.980 +-40.150 -18.000 +-40.150 -18.000 +-39.668 -18.333 +999 999 +-41.867 -20.783 +-41.850 -20.767 +-41.833 -20.800 +-41.767 -20.800 +-41.733 -20.833 +-41.733 -20.867 +-41.717 -20.867 +-41.717 -20.933 +-41.700 -20.967 +-41.717 -21.000 +-41.717 -21.033 +-41.733 -21.083 +-41.733 -21.100 +-41.717 -21.100 +-41.717 -21.133 +-41.633 -21.150 +-41.600 -21.150 +-41.550 -21.183 +-41.533 -21.183 +-41.500 -21.183 +-41.483 -21.200 +-41.467 -21.217 +-41.450 -21.217 +-41.417 -21.200 +-41.350 -21.217 +-41.300 -21.233 +-41.233 -21.233 +-41.200 -21.250 +-41.183 -21.233 +-41.167 -21.250 +-41.117 -21.217 +-41.083 -21.233 +-41.067 -21.250 +-41.017 -21.250 +-41.000 -21.283 +-40.958 -21.301 +999 999 +-53.083 -18.050 +-53.067 -17.983 +-53.100 -17.933 +-53.133 -17.833 +-53.233 -17.700 +-53.233 -17.483 +-53.233 -17.450 +-53.217 -17.317 +-53.117 -17.117 +-53.067 -17.050 +-53.050 -16.983 +-53.000 -16.850 +-52.950 -16.850 +-52.933 -16.800 +-52.883 -16.783 +-52.800 -16.733 +-52.767 -16.667 +-52.750 -16.583 +-52.667 -16.567 +-52.633 -16.500 +-52.617 -16.450 +-52.683 -16.417 +-52.650 -16.267 +-52.583 -16.250 +-52.567 -16.233 +-52.550 -16.167 +-52.500 -16.133 +-52.367 -16.083 +-52.300 -16.000 +999 999 +-61.567 -8.800 +-61.500 -8.800 +-60.000 -8.800 +-58.500 -8.800 +-58.446 -8.800 +-58.367 -8.750 +-58.333 -8.717 +-58.333 -8.700 +-58.350 -8.683 +-58.417 -8.717 +-58.450 -8.700 +-58.400 -8.583 +-58.417 -8.567 +-58.400 -8.550 +-58.417 -8.483 +-58.350 -8.383 +-58.350 -8.350 +-58.333 -8.317 +-58.317 -8.150 +-58.283 -8.133 +-58.300 -8.067 +-58.317 -8.000 +-58.383 -7.917 +-58.383 -7.833 +-58.317 -7.783 +-58.283 -7.750 +-58.283 -7.700 +-58.250 -7.683 +-58.217 -7.617 +-58.233 -7.517 +-58.200 -7.417 +-58.133 -7.350 +-58.133 -7.350 +-58.050 -7.417 +-57.950 -7.567 +-57.933 -7.633 +-57.900 -7.717 +-57.867 -7.800 +-57.833 -7.883 +-57.800 -8.000 +-57.750 -8.033 +-57.717 -8.083 +-57.717 -8.150 +-57.667 -8.167 +-57.633 -8.217 +-57.667 -8.283 +-57.683 -8.317 +-57.667 -8.367 +-57.683 -8.400 +-57.667 -8.450 +-57.650 -8.483 +-57.633 -8.517 +-57.650 -8.550 +-57.633 -8.567 +-57.617 -8.667 +-57.617 -8.717 +-57.600 -8.750 +-57.567 -8.750 +-57.533 -8.750 +-57.517 -8.733 +-57.483 -8.767 +-57.450 -8.767 +-57.417 -8.783 +-57.417 -8.850 +-57.383 -8.867 +-57.317 -8.867 +-57.317 -8.917 +-57.267 -8.900 +-57.217 -8.900 +-57.183 -8.933 +-57.117 -9.000 +-57.033 -9.100 +-57.067 -9.167 +-57.000 -9.233 +-56.967 -9.217 +-56.850 -9.233 +-56.817 -9.250 +-56.767 -9.333 +-56.767 -9.383 +-56.750 -9.400 +-56.700 -9.367 +-56.667 -9.367 +-56.672 -9.368 +-55.500 -9.463 +-54.000 -9.578 +-52.500 -9.687 +-51.000 -9.789 +-51.000 -9.790 +-50.206 -9.841 +-50.233 -9.867 +-50.267 -9.917 +-50.317 -10.050 +-50.333 -10.067 +-50.383 -10.117 +-50.400 -10.167 +-50.417 -10.283 +-50.433 -10.367 +-50.433 -10.383 +-50.483 -10.400 +-50.500 -10.483 +-50.517 -10.517 +-50.533 -10.583 +-50.550 -10.600 +-50.567 -10.650 +-50.600 -10.683 +-50.583 -10.717 +-50.583 -10.767 +-50.633 -10.833 +-50.600 -10.867 +-50.617 -10.917 +-50.617 -11.067 +-50.667 -11.133 +-50.650 -11.217 +-50.683 -11.283 +-50.750 -11.500 +-50.733 -11.550 +-50.667 -11.600 +-50.667 -11.650 +-50.700 -11.700 +-50.717 -11.733 +-50.700 -11.783 +-50.683 -11.833 +-50.683 -11.867 +-50.650 -11.883 +-50.667 -11.917 +-50.667 -11.950 +-50.683 -12.000 +-50.700 -12.050 +-50.667 -12.083 +-50.683 -12.200 +-50.650 -12.233 +-50.633 -12.283 +-50.650 -12.333 +-50.633 -12.367 +-50.633 -12.450 +-50.650 -12.467 +-50.667 -12.500 +-50.683 -12.550 +-50.683 -12.600 +-50.700 -12.600 +-50.717 -12.617 +-50.700 -12.650 +-50.667 -12.667 +-50.650 -12.733 +-50.633 -12.733 +-50.633 -12.767 +-50.617 -12.783 +-50.633 -12.800 +-50.633 -12.833 +-50.617 -12.817 +-50.600 -12.817 +-50.600 -12.850 +-50.550 -12.850 +-50.533 -12.850 +-50.517 -12.867 +-50.517 -12.867 +-50.517 -12.900 +-50.533 -12.967 +-50.567 -13.017 +-50.600 -13.017 +-50.600 -13.033 +-50.583 -13.033 +-50.583 -13.050 +-50.600 -13.067 +-50.617 -13.100 +-50.600 -13.117 +-50.600 -13.200 +-50.583 -13.233 +-50.617 -13.300 +-50.650 -13.383 +-50.667 -13.417 +-50.700 -13.467 +-50.767 -13.550 +-50.783 -13.650 +-50.817 -13.700 +-50.850 -13.717 +-50.867 -13.733 +-50.867 -13.750 +-50.850 -13.767 +-50.867 -13.800 +-50.833 -13.933 +-50.867 -13.967 +-50.867 -14.000 +-50.850 -14.050 +-50.833 -14.083 +-50.833 -14.100 +-50.867 -14.133 +-50.917 -14.117 +-50.917 -14.150 +-50.917 -14.183 +-50.950 -14.217 +-50.983 -14.283 +-50.967 -14.333 +-50.983 -14.350 +-51.000 -14.400 +-51.000 -14.450 +-50.983 -14.483 +-50.983 -14.500 +-50.967 -14.517 +-51.000 -14.583 +-51.017 -14.650 +-51.033 -14.683 +-51.033 -14.717 +-51.067 -14.750 +-51.050 -14.817 +-51.100 -14.833 +-51.100 -14.900 +-51.150 -14.933 +-51.150 -14.967 +-51.250 -15.033 +-51.283 -15.033 +-51.300 -14.983 +-51.317 -14.967 +-51.333 -14.983 +-51.367 -15.000 +-51.400 -15.000 +-51.467 -15.050 +-51.517 -15.050 +-51.583 -15.150 +-51.633 -15.167 +-51.650 -15.183 +-51.667 -15.250 +-51.650 -15.267 +-51.683 -15.300 +-51.683 -15.333 +-51.667 -15.367 +-51.700 -15.417 +-51.700 -15.433 +-51.717 -15.500 +-51.733 -15.500 +-51.750 -15.567 +-51.767 -15.533 +-51.783 -15.533 +-51.783 -15.550 +-51.767 -15.600 +-51.783 -15.650 +-51.833 -15.717 +-51.850 -15.750 +-51.883 -15.783 +-51.917 -15.833 +-51.967 -15.800 +-51.983 -15.817 +-51.967 -15.833 +-52.000 -15.850 +-52.033 -15.883 +-52.117 -15.867 +-52.150 -15.883 +-52.267 -15.883 +-52.283 -15.917 +-52.300 -15.967 +-52.300 -16.000 +999 999 +-66.800 -9.826 +-66.800 -9.800 +-66.783 -9.750 +-66.717 -9.750 +-66.700 -9.733 +-66.667 -9.717 +-66.617 -9.667 +-66.583 -9.667 +-66.533 -9.650 +-66.500 -9.633 +-66.500 -9.600 +-66.483 -9.583 +-66.433 -9.550 +-66.417 -9.517 +-66.383 -9.483 +-66.417 -9.450 +-66.417 -9.400 +-66.383 -9.433 +-66.333 -9.417 +-66.333 -9.433 +-66.300 -9.450 +-66.283 -9.400 +-66.267 -9.417 +-66.250 -9.433 +-66.217 -9.433 +-66.183 -9.433 +-66.117 -9.400 +-66.067 -9.417 +-66.000 -9.383 +-65.983 -9.400 +-65.917 -9.450 +-65.917 -9.483 +-65.850 -9.500 +-65.833 -9.517 +-65.817 -9.533 +-65.817 -9.550 +-65.800 -9.583 +-65.767 -9.583 +-65.750 -9.550 +-65.717 -9.550 +-65.717 -9.533 +-65.683 -9.517 +-65.667 -9.467 +-65.633 -9.433 +-65.617 -9.417 +-65.550 -9.417 +-65.517 -9.467 +-65.500 -9.483 +-65.483 -9.483 +-65.467 -9.467 +-65.450 -9.467 +-65.450 -9.417 +-65.433 -9.383 +-65.383 -9.367 +-65.383 -9.333 +-65.350 -9.317 +-65.283 -9.283 +-65.233 -9.250 +-65.217 -9.283 +-65.217 -9.317 +-65.183 -9.317 +-65.183 -9.433 +-65.100 -9.467 +-65.067 -9.417 +-65.033 -9.400 +-65.033 -9.367 +-65.017 -9.333 +-64.983 -9.333 +-65.000 -9.317 +-64.967 -9.283 +-64.917 -9.233 +-64.917 -9.183 +-64.950 -9.150 +-64.933 -9.117 +-64.917 -9.100 +-64.900 -9.067 +-64.867 -9.000 +-64.767 -8.967 +-64.750 -9.000 +-64.700 -9.033 +-64.633 -9.033 +-64.583 -9.017 +-64.567 -8.983 +-64.533 -8.967 +-64.517 -8.983 +-64.483 -8.950 +-64.433 -8.983 +-64.417 -8.967 +-64.417 -8.950 +-64.333 -8.950 +-64.250 -8.933 +-64.217 -8.950 +-64.183 -8.950 +-64.167 -8.967 +-64.117 -8.917 +-64.150 -8.900 +-64.133 -8.867 +-64.150 -8.850 +-64.117 -8.817 +-64.150 -8.767 +-64.133 -8.750 +-64.150 -8.717 +-64.117 -8.683 +-64.117 -8.717 +-64.083 -8.733 +-64.050 -8.700 +-64.017 -8.683 +-64.000 -8.650 +-63.950 -8.617 +-63.933 -8.567 +-63.917 -8.533 +-63.933 -8.517 +-63.983 -8.500 +-64.000 -8.433 +-63.950 -8.383 +-63.950 -8.333 +-63.867 -8.300 +-63.783 -8.300 +-63.750 -8.283 +-63.733 -8.250 +-63.750 -8.217 +-63.733 -8.200 +-63.683 -8.167 +-63.667 -8.183 +-63.650 -8.150 +-63.583 -8.167 +-63.583 -8.117 +-63.600 -8.067 +-63.617 -8.000 +-63.621 -8.000 +-63.620 -7.975 +-62.867 -7.975 +-62.833 -8.000 +-62.800 -8.033 +-62.767 -8.033 +-62.733 -8.067 +-62.717 -8.083 +-62.683 -8.100 +-62.683 -8.133 +-62.667 -8.150 +-62.683 -8.183 +-62.583 -8.267 +-62.567 -8.267 +-62.550 -8.300 +-62.550 -8.350 +-62.517 -8.367 +-62.483 -8.350 +-62.450 -8.350 +-62.367 -8.417 +-62.367 -8.467 +-62.350 -8.467 +-62.367 -8.500 +-62.333 -8.533 +-62.333 -8.583 +-62.317 -8.600 +-62.200 -8.600 +-62.183 -8.617 +-62.200 -8.650 +-62.183 -8.667 +-62.167 -8.750 +-62.133 -8.800 +-62.033 -8.800 +-62.017 -8.833 +-62.000 -8.850 +-61.983 -8.883 +-61.933 -8.883 +-61.883 -8.867 +-61.867 -8.850 +-61.867 -8.783 +-61.833 -8.733 +-61.800 -8.750 +-61.767 -8.750 +-61.750 -8.700 +-61.717 -8.700 +-61.683 -8.717 +-61.617 -8.733 +-61.600 -8.750 +-61.617 -8.783 +-61.567 -8.783 +-61.517 -8.833 +-61.483 -8.900 +-61.483 -8.917 +-61.500 -8.950 +-61.517 -9.000 +-61.550 -9.067 +-61.567 -9.100 +-61.567 -9.133 +-61.550 -9.150 +-61.533 -9.183 +-61.517 -9.200 +-61.533 -9.250 +-61.583 -9.233 +-61.600 -9.250 +-61.600 -9.283 +-61.617 -9.317 +-61.617 -9.333 +-61.600 -9.367 +-61.550 -9.400 +-61.550 -9.433 +-61.567 -9.467 +-61.550 -9.500 +-61.533 -9.550 +-61.517 -9.567 +-61.517 -9.583 +-61.500 -9.600 +-61.500 -9.633 +-61.483 -9.633 +-61.483 -9.650 +-61.500 -9.650 +-61.500 -9.667 +-61.517 -9.700 +-61.517 -9.733 +-61.567 -9.717 +-61.583 -9.717 +-61.567 -9.733 +-61.533 -9.767 +-61.533 -9.817 +-61.517 -9.867 +-61.517 -9.883 +-61.550 -9.950 +-61.533 -9.967 +-61.533 -10.000 +-61.550 -10.033 +-61.583 -10.050 +-61.583 -10.067 +-61.583 -10.083 +-61.600 -10.150 +-61.601 -10.151 +-61.567 -10.167 +-61.567 -10.217 +-61.583 -10.250 +-61.550 -10.333 +-61.517 -10.350 +-61.467 -10.433 +-61.483 -10.500 +-61.483 -10.550 +-61.500 -10.583 +-61.500 -10.633 +-61.517 -10.700 +-61.483 -10.717 +-61.467 -10.750 +-61.483 -10.800 +-61.500 -10.800 +-61.517 -10.767 +-61.517 -10.783 +-61.517 -10.933 +-61.533 -10.933 +-61.533 -10.967 +-61.550 -10.983 +-61.533 -10.983 +-61.500 -10.983 +-60.450 -10.983 +-60.450 -10.983 +-60.450 -11.017 +-60.433 -11.017 +-60.433 -11.033 +-60.417 -11.033 +-60.400 -11.083 +-60.350 -11.100 +-60.350 -11.083 +-60.300 -11.050 +-60.283 -11.067 +-60.283 -11.083 +-60.267 -11.100 +-60.233 -11.100 +-60.183 -11.117 +-60.183 -11.100 +-60.167 -11.100 +-60.100 -11.100 +-60.083 -11.100 +-60.067 -11.117 +-60.050 -11.117 +-60.033 -11.133 +-60.000 -11.117 +-59.950 -11.117 +-59.983 -11.167 +-59.950 -11.217 +-59.967 -11.233 +-59.950 -11.300 +-59.917 -11.350 +-59.917 -11.417 +-60.000 -11.467 +-60.050 -11.517 +-60.067 -11.550 +-60.100 -11.567 +-60.117 -11.600 +-60.117 -11.750 +-60.100 -11.800 +-60.100 -11.850 +-60.083 -11.867 +-60.067 -11.883 +-60.000 -11.900 +-59.983 -11.950 +-59.967 -12.000 +-59.967 -12.050 +-59.900 -12.133 +-59.900 -12.183 +-59.883 -12.233 +-59.833 -12.300 +-59.783 -12.333 +-59.817 -12.367 +-59.833 -12.417 +-59.850 -12.467 +-59.900 -12.483 +-59.933 -12.500 +-59.967 -12.517 +-60.000 -12.533 +-60.033 -12.550 +-60.050 -12.600 +-60.083 -12.617 +-60.067 -12.633 +-60.100 -12.717 +-60.083 -12.883 +-60.150 -12.967 +-60.200 -12.983 +-60.217 -13.000 +-60.217 -13.033 +-60.217 -13.050 +-60.267 -13.067 +-60.283 -13.083 +-60.283 -13.133 +-60.300 -13.183 +-60.317 -13.217 +-60.333 -13.250 +-60.333 -13.267 +-60.350 -13.267 +-60.367 -13.317 +-60.367 -13.367 +-60.383 -13.433 +-60.433 -13.483 +-60.483 -13.500 +-60.517 -13.517 +-60.583 -13.567 +-60.617 -13.567 +-60.667 -13.600 +-60.683 -13.600 +-60.700 -13.650 +-60.717 -13.700 +-60.717 -13.700 +999 999 +-48.267 -16.000 +-48.267 -15.967 +-48.267 -15.933 +-48.283 -15.917 +-48.283 -15.867 +-48.283 -15.836 +-48.283 -15.817 +-48.233 -15.783 +-48.217 -15.733 +-48.217 -15.700 +-48.233 -15.700 +-48.250 -15.667 +-48.233 -15.633 +-48.217 -15.617 +-48.200 -15.623 +-48.200 -15.500 +-48.000 -15.500 +-47.500 -15.500 +-47.417 -15.500 +-47.417 -15.546 +-47.400 -15.550 +-47.367 -15.567 +-47.333 -15.583 +-47.333 -15.667 +-47.317 -15.700 +-47.333 -15.767 +-47.367 -15.833 +-47.383 -15.917 +-47.367 -15.917 +-47.367 -15.967 +-47.350 -16.000 +-47.300 -16.033 +-47.301 -16.050 +-48.000 -16.050 +-48.279 -16.050 +-48.267 -16.000 +999 999 +-73.800 -7.100 +-73.500 -7.239 +-72.617 -7.583 +-72.000 -7.740 +-72.000 -7.749 +-70.950 -8.000 +-70.957 -8.000 +-70.500 -8.109 +-70.367 -8.140 +-69.000 -8.848 +-68.704 -9.000 +-68.614 -9.046 +-67.500 -9.529 +-66.810 -9.826 +-66.617 -9.906 +999 999 +-50.206 -9.841 +-50.200 -9.783 +-50.150 -9.700 +-50.133 -9.633 +-50.100 -9.567 +-50.100 -9.467 +-50.067 -9.400 +-50.050 -9.317 +-49.983 -9.233 +-49.950 -9.200 +-49.917 -9.183 +-49.900 -9.150 +-49.883 -9.117 +-49.850 -9.067 +-49.850 -9.033 +-49.817 -9.000 +-49.800 -8.967 +-49.767 -8.933 +-49.717 -8.883 +-49.667 -8.850 +-49.600 -8.850 +-49.517 -8.717 +-49.483 -8.650 +-49.417 -8.567 +-49.400 -8.533 +-49.367 -8.450 +-49.283 -8.383 +-49.267 -8.283 +-49.233 -8.233 +-49.217 -8.117 +-49.183 -8.050 +-49.200 -8.000 +-49.167 -7.950 +-49.167 -7.867 +-49.167 -7.833 +-49.150 -7.800 +-49.183 -7.783 +-49.233 -7.767 +-49.283 -7.717 +-49.317 -7.683 +-49.367 -7.633 +-49.383 -7.583 +-49.367 -7.500 +-49.333 -7.433 +-49.267 -7.367 +-49.233 -7.317 +-49.183 -7.250 +-49.200 -7.183 +-49.200 -7.033 +-49.200 -6.983 +-49.200 -6.933 +-49.183 -6.917 +-49.083 -6.850 +-49.033 -6.817 +-49.000 -6.800 +-48.933 -6.767 +-48.867 -6.750 +-48.817 -6.733 +-48.767 -6.717 +-48.683 -6.667 +-48.667 -6.633 +-48.650 -6.583 +-48.650 -6.500 +-48.617 -6.483 +-48.583 -6.433 +-48.533 -6.400 +-48.517 -6.367 +-48.467 -6.350 +-48.433 -6.367 +-48.383 -6.383 +-48.367 -6.333 +-48.400 -6.333 +-48.417 -6.300 +-48.417 -6.267 +-48.433 -6.233 +-48.433 -6.200 +-48.417 -6.167 +-48.383 -6.150 +-48.317 -6.133 +-48.300 -6.067 +-48.333 -6.033 +-48.333 -6.000 +-48.283 -5.967 +-48.233 -5.950 +-48.233 -5.917 +-48.250 -5.883 +-48.267 -5.850 +-48.283 -5.833 +-48.300 -5.800 +-48.283 -5.750 +-48.267 -5.733 +-48.183 -5.717 +-48.167 -5.700 +-48.133 -5.650 +-48.167 -5.600 +-48.200 -5.567 +-48.250 -5.550 +-48.283 -5.533 +-48.300 -5.517 +-48.350 -5.450 +-48.367 -5.417 +-48.400 -5.400 +-48.450 -5.400 +-48.500 -5.417 +-48.550 -5.433 +-48.600 -5.417 +-48.633 -5.400 +-48.683 -5.383 +-48.683 -5.383 +999 999 +-41.850 -2.800 +-41.850 -2.900 +-41.800 -2.933 +-41.800 -2.950 +-41.800 -2.983 +-41.833 -3.017 +-41.850 -3.050 +-41.883 -3.067 +-41.900 -3.100 +-41.917 -3.117 +-41.933 -3.183 +-41.967 -3.167 +-41.967 -3.217 +-42.000 -3.250 +-42.033 -3.250 +-42.133 -3.267 +-42.100 -3.300 +-42.133 -3.317 +-42.133 -3.350 +-42.167 -3.383 +-42.200 -3.400 +-42.217 -3.433 +-42.250 -3.433 +-42.283 -3.450 +-42.317 -3.450 +-42.333 -3.433 +-42.350 -3.450 +-42.400 -3.450 +-42.400 -3.467 +-42.417 -3.467 +-42.433 -3.450 +-42.450 -3.450 +-42.450 -3.467 +-42.483 -3.483 +-42.483 -3.450 +-42.500 -3.433 +-42.517 -3.450 +-42.517 -3.467 +-42.533 -3.500 +-42.583 -3.567 +-42.617 -3.567 +-42.633 -3.633 +-42.667 -3.650 +-42.683 -3.683 +-42.667 -3.717 +-42.683 -3.750 +-42.667 -3.783 +-42.700 -3.817 +-42.717 -3.883 +-42.733 -3.917 +-42.767 -3.933 +-42.783 -3.967 +-42.817 -4.000 +-42.833 -4.017 +-42.850 -4.067 +-42.867 -4.100 +-42.900 -4.133 +-42.883 -4.150 +-42.883 -4.167 +-42.933 -4.167 +-42.983 -4.217 +-42.983 -4.300 +-42.950 -4.333 +-42.967 -4.367 +-42.950 -4.383 +-42.917 -4.383 +-42.867 -4.433 +-42.867 -4.467 +-42.850 -4.500 +-42.867 -4.517 +-42.867 -4.567 +-42.900 -4.633 +-42.933 -4.667 +-42.950 -4.683 +-42.950 -4.700 +-42.917 -4.733 +-42.933 -4.750 +-42.950 -4.783 +-42.933 -4.817 +-42.900 -4.833 +-42.883 -4.900 +-42.867 -4.933 +-42.850 -4.983 +-42.850 -5.000 +-42.850 -5.050 +-42.817 -5.083 +-42.800 -5.183 +-42.833 -5.250 +-42.800 -5.300 +-42.817 -5.317 +-42.833 -5.350 +-42.867 -5.383 +-42.900 -5.400 +-42.917 -5.433 +-42.967 -5.450 +-42.967 -5.467 +-43.017 -5.567 +-43.033 -5.583 +-43.083 -5.600 +-43.100 -5.617 +-43.100 -5.633 +-43.083 -5.650 +-43.083 -5.700 +-43.067 -5.733 +-43.100 -5.750 +-43.083 -5.817 +-43.100 -5.833 +-43.067 -5.867 +-43.100 -5.900 +-43.083 -5.950 +-43.050 -6.000 +-43.067 -6.050 +-43.050 -6.083 +-43.033 -6.117 +-42.983 -6.117 +-42.967 -6.183 +-42.933 -6.183 +-42.917 -6.217 +-42.867 -6.233 +-42.850 -6.267 +-42.850 -6.300 +-42.867 -6.317 +-42.850 -6.333 +-42.833 -6.333 +-42.833 -6.350 +-42.850 -6.367 +-42.850 -6.400 +-42.867 -6.417 +-42.867 -6.467 +-42.883 -6.500 +-42.883 -6.533 +-42.900 -6.583 +-42.917 -6.617 +-42.917 -6.633 +-42.917 -6.667 +-42.983 -6.717 +-43.000 -6.767 +-43.050 -6.767 +-43.067 -6.750 +-43.100 -6.767 +-43.150 -6.783 +-43.200 -6.767 +-43.233 -6.767 +-43.283 -6.800 +-43.350 -6.800 +-43.367 -6.817 +-43.383 -6.833 +-43.400 -6.833 +-43.467 -6.850 +-43.500 -6.800 +-43.550 -6.800 +-43.567 -6.767 +-43.600 -6.750 +-43.650 -6.717 +-43.683 -6.700 +-43.750 -6.700 +-43.783 -6.700 +-43.817 -6.733 +-43.833 -6.733 +-43.917 -6.767 +-43.967 -6.750 +-44.000 -6.750 +-44.050 -6.767 +-44.067 -6.783 +-44.083 -6.817 +-44.117 -6.817 +-44.133 -6.850 +-44.167 -6.900 +-44.183 -6.917 +-44.200 -6.967 +-44.250 -7.000 +-44.267 -7.033 +-44.283 -7.083 +-44.300 -7.117 +-44.317 -7.117 +-44.400 -7.117 +-44.433 -7.150 +-44.483 -7.167 +-44.533 -7.217 +-44.567 -7.233 +-44.617 -7.300 +-44.667 -7.333 +-44.683 -7.383 +-44.717 -7.400 +-44.733 -7.383 +-44.750 -7.350 +-44.767 -7.367 +-44.800 -7.367 +-44.817 -7.350 +-44.833 -7.383 +-44.850 -7.383 +-44.867 -7.417 +-44.883 -7.433 +-44.900 -7.417 +-44.933 -7.467 +-44.983 -7.483 +-45.017 -7.500 +-45.050 -7.517 +-45.083 -7.500 +-45.100 -7.517 +-45.133 -7.533 +-45.150 -7.517 +-45.167 -7.533 +-45.183 -7.550 +-45.217 -7.567 +-45.233 -7.550 +-45.267 -7.567 +-45.317 -7.583 +-45.350 -7.600 +-45.367 -7.617 +-45.383 -7.617 +-45.400 -7.650 +-45.417 -7.667 +-45.450 -7.683 +-45.467 -7.700 +-45.467 -7.717 +-45.483 -7.733 +-45.483 -7.750 +-45.517 -7.833 +-45.533 -7.867 +-45.517 -7.883 +-45.533 -7.900 +-45.517 -7.917 +-45.533 -7.933 +-45.567 -8.000 +-45.583 -8.017 +-45.567 -8.050 +-45.567 -8.067 +-45.583 -8.117 +-45.583 -8.167 +-45.617 -8.200 +-45.650 -8.250 +-45.717 -8.400 +-45.733 -8.450 +-45.750 -8.517 +-45.783 -8.583 +-45.767 -8.600 +-45.767 -8.617 +-45.800 -8.617 +-45.817 -8.650 +-45.817 -8.667 +-45.833 -8.700 +-45.850 -8.700 +-45.867 -8.733 +-45.917 -8.767 +-45.950 -8.817 +-45.950 -8.833 +-45.967 -8.850 +-45.967 -8.867 +-45.983 -8.950 +-45.950 -8.983 +-45.933 -9.067 +-45.900 -9.250 +-45.900 -9.317 +-45.883 -9.350 +-45.833 -9.383 +-45.800 -9.450 +-45.783 -9.483 +-45.833 -9.550 +-45.833 -9.633 +-45.833 -9.683 +-45.817 -9.767 +-45.867 -9.867 +-45.833 -9.950 +-45.867 -10.033 +-45.883 -10.100 +-45.917 -10.167 +-46.000 -10.250 +-46.000 -10.283 +-46.033 -10.250 +-46.117 -10.233 +-46.217 -10.200 +-46.233 -10.183 +-46.283 -10.183 +-46.333 -10.183 +-46.350 -10.167 +-46.400 -10.100 +-46.400 -10.083 +-46.433 -10.050 +-46.467 -9.983 +-46.467 -9.933 +-46.400 -9.900 +-46.383 -9.883 +-46.383 -9.850 +-46.467 -9.850 +-46.517 -9.800 +-46.567 -9.800 +-46.583 -9.750 +-46.617 -9.750 +-46.650 -9.733 +-46.667 -9.700 +-46.650 -9.683 +-46.600 -9.633 +-46.583 -9.600 +-46.550 -9.550 +-46.567 -9.533 +-46.567 -9.483 +-46.633 -9.450 +-46.650 -9.433 +-46.667 -9.417 +-46.750 -9.417 +-46.767 -9.367 +-46.850 -9.300 +-46.817 -9.267 +-46.817 -9.233 +-46.850 -9.200 +-46.867 -9.150 +-46.933 -9.117 +-46.950 -9.083 +-47.000 -9.067 +-47.033 -9.033 +-47.050 -9.000 +-47.033 -8.967 +-46.983 -8.933 +-46.950 -8.867 +-46.917 -8.867 +-46.900 -8.817 +-46.900 -8.800 +-46.917 -8.750 +-46.917 -8.717 +-46.883 -8.700 +-46.883 -8.650 +-46.850 -8.600 +-46.817 -8.533 +-46.800 -8.483 +-46.783 -8.467 +-46.767 -8.383 +-46.717 -8.383 +-46.717 -8.367 +-46.667 -8.333 +-46.567 -8.317 +-46.533 -8.300 +-46.500 -8.267 +-46.500 -8.183 +-46.517 -8.167 +-46.500 -8.100 +-46.483 -8.067 +-46.483 -8.033 +-46.500 -8.000 +-46.500 -7.983 +-46.550 -7.950 +-46.567 -7.917 +-46.600 -7.900 +-46.733 -7.917 +-46.750 -7.933 +-46.833 -7.967 +-46.867 -7.967 +-46.883 -7.983 +-46.950 -8.000 +-47.000 -8.050 +-47.033 -8.050 +-47.050 -8.000 +-47.083 -7.983 +-47.100 -7.983 +-47.100 -7.950 +-47.117 -7.950 +-47.117 -7.933 +-47.133 -7.917 +-47.183 -7.850 +-47.217 -7.817 +-47.250 -7.800 +-47.250 -7.767 +-47.267 -7.733 +-47.300 -7.733 +-47.317 -7.717 +-47.317 -7.700 +-47.283 -7.700 +-47.317 -7.683 +-47.333 -7.667 +-47.317 -7.667 +-47.317 -7.650 +-47.350 -7.600 +-47.367 -7.617 +-47.350 -7.650 +-47.383 -7.650 +-47.383 -7.600 +-47.400 -7.583 +-47.400 -7.567 +-47.433 -7.550 +-47.417 -7.517 +-47.450 -7.517 +-47.467 -7.533 +-47.483 -7.533 +-47.483 -7.500 +-47.500 -7.433 +-47.517 -7.433 +-47.567 -7.450 +-47.583 -7.433 +-47.533 -7.400 +-47.483 -7.383 +-47.467 -7.333 +-47.483 -7.300 +-47.550 -7.267 +-47.600 -7.267 +-47.617 -7.300 +-47.650 -7.300 +-47.667 -7.267 +-47.683 -7.233 +-47.733 -7.217 +-47.750 -7.183 +-47.733 -7.150 +-47.700 -7.133 +-47.650 -7.150 +-47.633 -7.133 +-47.600 -7.083 +-47.567 -7.033 +-47.550 -7.017 +-47.533 -6.967 +-47.517 -6.933 +-47.500 -6.900 +-47.500 -6.867 +-47.533 -6.817 +-47.500 -6.767 +-47.483 -6.633 +-47.433 -6.517 +-47.417 -6.483 +-47.433 -6.433 +-47.417 -6.400 +-47.400 -6.333 +-47.367 -6.250 +-47.400 -6.200 +-47.417 -6.150 +-47.433 -6.083 +-47.417 -6.050 +-47.433 -6.000 +-47.433 -5.967 +-47.417 -5.933 +-47.433 -5.850 +-47.467 -5.767 +-47.483 -5.750 +-47.483 -5.700 +-47.467 -5.667 +-47.500 -5.517 +-47.550 -5.467 +-47.600 -5.467 +-47.700 -5.400 +-47.750 -5.383 +-47.817 -5.383 +-47.850 -5.367 +-47.867 -5.317 +-47.867 -5.283 +-47.883 -5.250 +-47.900 -5.250 +-47.950 -5.233 +-48.000 -5.233 +-48.067 -5.267 +-48.117 -5.267 +-48.167 -5.267 +-48.200 -5.267 +-48.233 -5.233 +-48.267 -5.217 +-48.317 -5.200 +-48.333 -5.183 +-48.383 -5.167 +-48.483 -5.183 +-48.517 -5.200 +-48.533 -5.233 +-48.567 -5.300 +-48.600 -5.333 +-48.650 -5.317 +-48.683 -5.333 +-48.700 -5.367 +-48.683 -5.383 +-48.683 -5.383 +-48.733 -5.383 +-48.757 -5.349 +-48.276 -5.000 +-48.000 -4.800 +-47.730 -4.603 +-47.717 -4.600 +-47.683 -4.617 +-47.650 -4.600 +-47.583 -4.533 +-47.550 -4.467 +-47.500 -4.433 +-47.467 -4.333 +-47.467 -4.317 +-47.450 -4.317 +-47.367 -4.233 +-47.350 -4.183 +-47.333 -4.167 +-47.333 -4.100 +-47.317 -4.067 +-47.317 -4.050 +-47.283 -4.050 +-47.217 -4.000 +999 999 +-46.150 -1.300 +-46.133 -1.300 +-46.133 -1.333 +-46.100 -1.317 +-46.133 -1.383 +-46.150 -1.417 +-46.133 -1.417 +-46.167 -1.467 +-46.167 -1.483 +-46.150 -1.500 +-46.133 -1.550 +-46.150 -1.617 +-46.150 -1.667 +-46.167 -1.700 +-46.200 -1.700 +-46.217 -1.733 +-46.233 -1.717 +-46.250 -1.717 +-46.317 -1.733 +-46.317 -1.783 +-46.267 -1.783 +-46.217 -1.817 +-46.233 -1.867 +-46.217 -1.917 +-46.233 -1.933 +-46.250 -2.017 +-46.267 -2.050 +-46.267 -2.100 +-46.300 -2.133 +-46.283 -2.150 +-46.333 -2.183 +-46.350 -2.217 +-46.383 -2.250 +-46.433 -2.233 +-46.417 -2.267 +-46.433 -2.317 +-46.467 -2.367 +-46.467 -2.383 +-46.417 -2.367 +-46.400 -2.367 +-46.433 -2.400 +-46.433 -2.500 +-46.417 -2.533 +-46.483 -2.533 +-46.500 -2.550 +-46.483 -2.567 +-46.517 -2.583 +-46.517 -2.617 +-46.583 -2.633 +-46.600 -2.667 +-46.633 -2.633 +-46.633 -2.667 +-46.667 -2.700 +-46.683 -2.717 +-46.667 -2.733 +-46.650 -2.750 +-46.633 -2.800 +-46.600 -2.783 +-46.617 -2.817 +-46.583 -2.833 +-46.600 -2.850 +-46.617 -2.833 +-46.617 -2.850 +-46.650 -2.850 +-46.650 -2.883 +-46.683 -2.883 +-46.667 -2.900 +-46.667 -2.983 +-46.683 -3.000 +-46.683 -3.100 +-46.700 -3.100 +-46.717 -3.117 +-46.733 -3.117 +-46.750 -3.133 +-46.733 -3.150 +-46.767 -3.183 +-46.767 -3.200 +-46.783 -3.233 +-46.800 -3.233 +-46.833 -3.283 +-46.817 -3.300 +-46.867 -3.333 +-46.917 -3.367 +-46.950 -3.383 +-46.950 -3.417 +-46.967 -3.483 +-46.983 -3.500 +-46.983 -3.517 +-47.000 -3.533 +-47.017 -3.533 +-47.033 -3.567 +-47.050 -3.617 +-47.050 -3.700 +-47.067 -3.733 +-47.067 -3.767 +-47.100 -3.850 +-47.117 -3.867 +-47.150 -3.900 +-47.183 -3.950 +-47.217 -4.000 +999 999 +-46.033 -14.867 +-46.017 -14.850 +-46.033 -14.833 +-46.033 -14.833 +-46.033 -14.817 +-46.033 -14.817 +-46.017 -14.817 +-46.017 -14.800 +-46.017 -14.800 +-46.000 -14.783 +-46.000 -14.767 +-46.000 -14.767 +-46.000 -14.750 +-46.000 -14.750 +-46.000 -14.733 +-46.000 -14.717 +-46.000 -14.717 +-46.000 -14.717 +-46.000 -14.700 +-46.000 -14.700 +-46.000 -14.683 +-46.017 -14.683 +-46.017 -14.683 +-46.017 -14.667 +-46.017 -14.667 +-46.017 -14.650 +-46.017 -14.650 +-46.000 -14.650 +-46.000 -14.650 +-46.000 -14.650 +-46.000 -14.650 +-46.000 -14.650 +-46.000 -14.650 +-45.983 -14.650 +-45.983 -14.650 +-45.983 -14.633 +-45.983 -14.633 +-45.983 -14.617 +-45.983 -14.617 +-45.983 -14.600 +-45.983 -14.600 +-46.000 -14.600 +-46.000 -14.600 +-46.000 -14.600 +-46.000 -14.600 +-46.000 -14.600 +-45.983 -14.583 +-46.000 -14.583 +-45.983 -14.583 +-45.983 -14.583 +-45.983 -14.583 +-45.983 -14.567 +-45.983 -14.550 +-45.983 -14.550 +-45.967 -14.550 +-45.967 -14.533 +-45.967 -14.533 +-45.967 -14.517 +-45.983 -14.517 +-46.000 -14.517 +-46.000 -14.517 +-46.000 -14.500 +-46.000 -14.500 +-46.000 -14.500 +-45.983 -14.500 +-46.000 -14.500 +-46.000 -14.500 +-46.000 -14.500 +-46.000 -14.500 +-46.000 -14.500 +-45.983 -14.500 +-45.983 -14.500 +-45.983 -14.483 +-45.983 -14.483 +-46.000 -14.483 +-46.000 -14.483 +-46.000 -14.467 +-46.000 -14.467 +-46.000 -14.450 +-46.000 -14.450 +-46.000 -14.433 +-46.000 -14.433 +-46.000 -14.433 +-46.000 -14.417 +-46.000 -14.417 +-46.000 -14.417 +-46.017 -14.417 +-46.000 -14.400 +-46.000 -14.400 +-46.000 -14.400 +-46.000 -14.417 +-46.000 -14.417 +-46.000 -14.417 +-45.983 -14.417 +-45.983 -14.417 +-45.967 -14.417 +-45.967 -14.417 +-45.967 -14.417 +-45.950 -14.417 +-45.950 -14.400 +-45.933 -14.400 +-45.917 -14.400 +-45.917 -14.383 +-45.917 -14.367 +-45.900 -14.367 +-45.900 -14.350 +-45.900 -14.350 +-45.900 -14.333 +-45.900 -14.333 +-45.917 -14.333 +-45.933 -14.333 +-45.933 -14.333 +-45.933 -14.317 +-45.950 -14.317 +-45.950 -14.317 +-45.950 -14.300 +-45.950 -14.300 +-45.950 -14.283 +-45.950 -14.283 +-45.950 -14.283 +-45.967 -14.267 +-45.967 -14.267 +-45.983 -14.267 +-45.983 -14.267 +-45.983 -14.250 +-46.000 -14.250 +-46.000 -14.250 +-46.017 -14.250 +-46.017 -14.250 +-46.017 -14.233 +-46.033 -14.233 +-46.033 -14.233 +-46.050 -14.217 +-46.050 -14.217 +-46.050 -14.200 +-46.050 -14.200 +-46.050 -14.183 +-46.067 -14.183 +-46.083 -14.200 +-46.083 -14.200 +-46.100 -14.183 +-46.100 -14.183 +-46.117 -14.183 +-46.100 -14.167 +-46.100 -14.167 +-46.117 -14.150 +-46.117 -14.150 +-46.117 -14.150 +-46.133 -14.150 +-46.150 -14.150 +-46.183 -14.150 +-46.183 -14.133 +-46.200 -14.133 +-46.200 -14.117 +-46.200 -14.117 +-46.217 -14.117 +-46.233 -14.100 +-46.250 -14.100 +-46.267 -14.083 +-46.250 -14.083 +-46.233 -14.083 +-46.233 -14.083 +-46.233 -14.083 +-46.217 -14.067 +-46.217 -14.050 +-46.233 -14.050 +-46.233 -14.050 +-46.233 -14.050 +-46.217 -14.033 +-46.200 -14.017 +-46.200 -14.017 +-46.200 -14.000 +-46.200 -14.000 +-46.200 -14.000 +-46.200 -14.000 +-46.217 -13.967 +-46.217 -13.967 +-46.217 -13.967 +-46.217 -13.967 +-46.250 -13.933 +-46.250 -13.933 +-46.267 -13.933 +-46.250 -13.917 +-46.250 -13.900 +-46.250 -13.883 +-46.250 -13.883 +-46.233 -13.867 +-46.233 -13.850 +-46.233 -13.850 +-46.217 -13.833 +-46.233 -13.833 +-46.250 -13.817 +-46.267 -13.817 +-46.267 -13.817 +-46.250 -13.800 +-46.250 -13.800 +-46.267 -13.800 +-46.267 -13.783 +-46.267 -13.783 +-46.267 -13.783 +-46.250 -13.767 +-46.233 -13.767 +-46.217 -13.767 +-46.217 -13.767 +-46.233 -13.733 +-46.233 -13.733 +-46.233 -13.733 +-46.250 -13.733 +-46.250 -13.733 +-46.250 -13.733 +-46.250 -13.717 +-46.233 -13.717 +-46.233 -13.700 +-46.233 -13.700 +-46.233 -13.700 +-46.233 -13.683 +-46.250 -13.683 +-46.250 -13.683 +-46.250 -13.667 +-46.250 -13.667 +-46.233 -13.667 +-46.233 -13.650 +-46.233 -13.650 +-46.217 -13.633 +-46.200 -13.617 +-46.183 -13.617 +-46.167 -13.600 +-46.150 -13.583 +-46.150 -13.583 +-46.167 -13.567 +-46.200 -13.567 +-46.200 -13.567 +-46.200 -13.567 +-46.217 -13.567 +-46.217 -13.567 +-46.233 -13.550 +-46.233 -13.550 +-46.233 -13.533 +-46.233 -13.517 +-46.233 -13.517 +-46.217 -13.500 +-46.217 -13.500 +-46.217 -13.500 +-46.217 -13.500 +-46.217 -13.483 +-46.217 -13.483 +-46.217 -13.483 +-46.217 -13.483 +-46.217 -13.467 +-46.217 -13.467 +-46.200 -13.467 +-46.200 -13.450 +-46.200 -13.450 +-46.200 -13.450 +-46.217 -13.450 +-46.217 -13.450 +-46.217 -13.433 +-46.217 -13.433 +-46.217 -13.433 +-46.217 -13.433 +-46.217 -13.433 +-46.233 -13.433 +-46.233 -13.417 +-46.233 -13.417 +-46.217 -13.400 +-46.200 -13.400 +-46.200 -13.383 +-46.183 -13.383 +-46.167 -13.383 +-46.167 -13.367 +-46.133 -13.367 +-46.133 -13.367 +-46.117 -13.350 +-46.117 -13.350 +-46.100 -13.350 +-46.100 -13.333 +-46.083 -13.317 +-46.067 -13.317 +-46.067 -13.317 +-46.067 -13.317 +-46.050 -13.300 +-46.033 -13.283 +-46.033 -13.267 +-46.033 -13.267 +-46.033 -13.267 +-46.033 -13.267 +-46.050 -13.250 +-46.050 -13.250 +-46.050 -13.250 +-46.067 -13.250 +-46.067 -13.267 +-46.083 -13.267 +-46.100 -13.267 +-46.100 -13.267 +-46.100 -13.283 +-46.117 -13.283 +-46.117 -13.283 +-46.133 -13.283 +-46.150 -13.300 +-46.150 -13.300 +-46.167 -13.300 +-46.183 -13.300 +-46.200 -13.317 +-46.200 -13.300 +-46.217 -13.317 +-46.217 -13.317 +-46.233 -13.333 +-46.250 -13.333 +-46.267 -13.333 +-46.267 -13.333 +-46.267 -13.333 +-46.267 -13.333 +-46.283 -13.333 +-46.283 -13.317 +-46.283 -13.317 +-46.283 -13.300 +-46.283 -13.300 +-46.300 -13.300 +-46.300 -13.300 +-46.300 -13.300 +-46.300 -13.283 +-46.300 -13.283 +-46.300 -13.267 +-46.283 -13.267 +-46.300 -13.267 +-46.283 -13.250 +-46.300 -13.250 +-46.317 -13.250 +-46.317 -13.250 +-46.317 -13.233 +-46.317 -13.233 +-46.300 -13.217 +-46.300 -13.217 +-46.300 -13.200 +-46.300 -13.200 +-46.300 -13.183 +-46.300 -13.183 +-46.300 -13.167 +-46.300 -13.167 +-46.300 -13.167 +-46.300 -13.167 +-46.300 -13.167 +-46.300 -13.167 +-46.300 -13.150 +-46.300 -13.150 +-46.283 -13.150 +-46.283 -13.133 +-46.283 -13.133 +-46.283 -13.117 +-46.300 -13.117 +-46.300 -13.117 +-46.300 -13.117 +-46.300 -13.100 +-46.317 -13.100 +-46.317 -13.083 +-46.317 -13.083 +-46.300 -13.083 +-46.300 -13.067 +-46.300 -13.067 +-46.283 -13.067 +-46.283 -13.050 +-46.283 -13.050 +-46.267 -13.033 +-46.267 -13.033 +-46.267 -13.033 +-46.267 -13.017 +-46.267 -13.000 +-46.267 -13.000 +-46.250 -13.000 +-46.233 -13.000 +-46.233 -13.000 +-46.233 -13.000 +-46.233 -12.983 +-46.217 -12.983 +-46.217 -13.000 +-46.217 -13.000 +-46.217 -13.000 +-46.200 -13.000 +-46.200 -13.000 +-46.183 -12.983 +-46.183 -12.983 +-46.167 -12.983 +-46.167 -12.967 +-46.150 -12.967 +-46.133 -12.967 +-46.117 -12.950 +-46.117 -12.950 +-46.117 -12.950 +-46.117 -12.933 +-46.117 -12.933 +-46.100 -12.933 +-46.100 -12.917 +-46.100 -12.917 +-46.117 -12.900 +-46.133 -12.900 +-46.133 -12.900 +-46.133 -12.900 +-46.150 -12.900 +-46.150 -12.917 +-46.183 -12.917 +-46.183 -12.917 +-46.183 -12.917 +-46.217 -12.933 +-46.217 -12.933 +-46.233 -12.933 +-46.250 -12.933 +-46.250 -12.917 +-46.267 -12.917 +-46.267 -12.933 +-46.267 -12.933 +-46.267 -12.933 +-46.267 -12.933 +-46.283 -12.933 +-46.283 -12.950 +-46.300 -12.950 +-46.300 -12.933 +-46.283 -12.933 +-46.283 -12.917 +-46.283 -12.917 +-46.283 -12.900 +-46.283 -12.900 +-46.283 -12.883 +-46.283 -12.883 +-46.283 -12.883 +-46.283 -12.867 +-46.283 -12.867 +-46.283 -12.850 +-46.267 -12.833 +-46.250 -12.833 +-46.250 -12.817 +-46.267 -12.817 +-46.267 -12.817 +-46.267 -12.800 +-46.267 -12.800 +-46.267 -12.800 +-46.267 -12.800 +-46.267 -12.783 +-46.267 -12.783 +-46.283 -12.783 +-46.267 -12.767 +-46.267 -12.767 +-46.267 -12.750 +-46.267 -12.750 +-46.267 -12.733 +-46.267 -12.717 +-46.250 -12.717 +-46.267 -12.700 +-46.267 -12.700 +-46.267 -12.700 +-46.283 -12.700 +-46.283 -12.683 +-46.283 -12.683 +-46.283 -12.683 +-46.283 -12.683 +-46.283 -12.667 +-46.267 -12.667 +-46.250 -12.667 +-46.250 -12.650 +-46.250 -12.650 +-46.250 -12.633 +-46.267 -12.633 +-46.267 -12.633 +-46.267 -12.633 +-46.267 -12.633 +-46.267 -12.633 +-46.283 -12.633 +-46.283 -12.633 +-46.283 -12.617 +-46.283 -12.617 +-46.267 -12.600 +-46.267 -12.600 +-46.267 -12.600 +-46.267 -12.583 +-46.267 -12.583 +-46.267 -12.583 +-46.267 -12.583 +-46.267 -12.567 +-46.250 -12.567 +-46.250 -12.550 +-46.250 -12.533 +-46.250 -12.533 +-46.233 -12.533 +-46.233 -12.533 +-46.233 -12.533 +-46.217 -12.533 +-46.217 -12.517 +-46.183 -12.517 +-46.167 -12.517 +-46.150 -12.517 +-46.150 -12.517 +-46.150 -12.500 +-46.150 -12.500 +-46.150 -12.500 +-46.150 -12.483 +-46.150 -12.483 +-46.150 -12.467 +-46.150 -12.467 +-46.167 -12.467 +-46.167 -12.467 +-46.183 -12.467 +-46.200 -12.483 +-46.217 -12.483 +-46.233 -12.483 +-46.250 -12.483 +-46.250 -12.483 +-46.250 -12.467 +-46.250 -12.450 +-46.250 -12.450 +-46.250 -12.433 +-46.250 -12.433 +-46.250 -12.417 +-46.250 -12.400 +-46.267 -12.400 +-46.283 -12.400 +-46.283 -12.400 +-46.300 -12.400 +-46.300 -12.400 +-46.283 -12.383 +-46.283 -12.367 +-46.283 -12.367 +-46.283 -12.367 +-46.300 -12.350 +-46.300 -12.350 +-46.300 -12.350 +-46.317 -12.350 +-46.317 -12.333 +-46.333 -12.333 +-46.317 -12.333 +-46.333 -12.333 +-46.333 -12.333 +-46.350 -12.333 +-46.350 -12.317 +-46.333 -12.317 +-46.350 -12.317 +-46.333 -12.300 +-46.317 -12.300 +-46.317 -12.300 +-46.317 -12.283 +-46.333 -12.283 +-46.350 -12.283 +-46.350 -12.283 +-46.367 -12.283 +-46.367 -12.283 +-46.367 -12.267 +-46.350 -12.250 +-46.367 -12.250 +-46.367 -12.250 +-46.367 -12.233 +-46.367 -12.233 +-46.367 -12.233 +-46.350 -12.233 +-46.350 -12.217 +-46.350 -12.217 +-46.350 -12.200 +-46.350 -12.200 +-46.367 -12.200 +-46.350 -12.183 +-46.367 -12.183 +-46.383 -12.183 +-46.383 -12.183 +-46.367 -12.183 +-46.367 -12.167 +-46.367 -12.167 +-46.367 -12.167 +-46.383 -12.167 +-46.383 -12.150 +-46.367 -12.150 +-46.367 -12.133 +-46.367 -12.133 +-46.367 -12.117 +-46.367 -12.117 +-46.350 -12.100 +-46.350 -12.083 +-46.367 -12.083 +-46.367 -12.083 +-46.367 -12.083 +-46.367 -12.067 +-46.367 -12.067 +-46.383 -12.067 +-46.383 -12.067 +-46.367 -12.050 +-46.367 -12.050 +-46.367 -12.050 +-46.367 -12.033 +-46.383 -12.033 +-46.383 -12.033 +-46.383 -12.017 +-46.383 -12.017 +-46.367 -12.017 +-46.367 -12.000 +-46.367 -12.000 +-46.367 -12.000 +-46.167 -12.000 +-46.100 -11.950 +-46.067 -11.917 +-46.083 -11.883 +-46.133 -11.850 +-46.233 -11.850 +-46.267 -11.833 +-46.283 -11.783 +-46.267 -11.733 +-46.117 -11.667 +-46.083 -11.633 +-46.067 -11.617 +-46.100 -11.567 +-46.167 -11.533 +-46.350 -11.500 +-46.433 -11.517 +-46.483 -11.483 +-46.500 -11.417 +-46.567 -11.383 +-46.616 -11.289 +-46.567 -11.250 +-46.533 -11.217 +-46.483 -11.183 +-46.450 -11.117 +-46.400 -11.000 +-46.317 -10.950 +-46.267 -10.933 +-46.233 -10.900 +-46.267 -10.833 +-46.267 -10.783 +-46.183 -10.667 +-46.117 -10.617 +-46.083 -10.583 +-46.050 -10.567 +-45.867 -10.483 +-45.833 -10.450 +-45.817 -10.350 +-45.783 -10.317 +-45.783 -10.317 +-45.867 -10.300 +-46.004 -10.262 +-45.783 -10.317 +-45.717 -10.300 +-45.617 -10.300 +-45.567 -10.333 +-45.550 -10.333 +-45.517 -10.367 +-45.483 -10.417 +-45.450 -10.567 +-45.433 -10.600 +-45.367 -10.667 +-45.350 -10.733 +-45.317 -10.767 +-45.283 -10.783 +-45.250 -10.817 +-45.183 -10.817 +-45.117 -10.833 +-45.067 -10.850 +-44.983 -10.900 +-44.933 -10.900 +-44.930 -10.928 +-44.867 -10.883 +-44.817 -10.850 +-44.733 -10.783 +-44.683 -10.750 +-44.667 -10.717 +-44.650 -10.700 +-44.617 -10.650 +-44.517 -10.633 +-44.450 -10.617 +-44.383 -10.583 +-44.367 -10.567 +-44.317 -10.567 +-44.283 -10.600 +-44.267 -10.617 +-44.233 -10.617 +-44.200 -10.617 +-44.067 -10.567 +-44.050 -10.500 +-44.033 -10.483 +-44.033 -10.417 +-44.017 -10.400 +-43.983 -10.433 +-43.950 -10.433 +-43.917 -10.417 +-43.933 -10.367 +-43.833 -10.350 +-43.850 -10.300 +-43.833 -10.250 +-43.783 -10.183 +-43.767 -10.067 +-43.717 -10.067 +-43.683 -10.050 +-43.667 -10.000 +-43.700 -9.967 +-43.700 -9.950 +-43.700 -9.933 +-43.717 -9.917 +-43.683 -9.883 +-43.683 -9.867 +-43.683 -9.850 +-43.667 -9.833 +-43.733 -9.800 +-43.750 -9.783 +-43.783 -9.767 +-43.817 -9.683 +-43.850 -9.633 +-43.850 -9.550 +-43.817 -9.467 +-43.800 -9.450 +-43.700 -9.417 +-43.650 -9.383 +-43.617 -9.333 +-43.600 -9.300 +-43.533 -9.300 +-43.517 -9.250 +-43.467 -9.250 +-43.417 -9.283 +-43.383 -9.350 +-43.333 -9.383 +-43.300 -9.400 +-43.267 -9.417 +-43.250 -9.400 +-43.183 -9.417 +-43.167 -9.383 +-43.133 -9.383 +-43.083 -9.383 +-43.067 -9.400 +-43.033 -9.417 +-42.983 -9.417 +-42.967 -9.483 +-42.950 -9.517 +-42.900 -9.517 +-42.867 -9.533 +-42.817 -9.600 +-42.783 -9.600 +-42.733 -9.583 +-42.733 -9.517 +-42.717 -9.517 +-42.700 -9.550 +-42.633 -9.533 +-42.600 -9.500 +-42.550 -9.483 +-42.533 -9.500 +-42.500 -9.500 +-42.500 -9.467 +-42.433 -9.433 +-42.317 -9.300 +-42.283 -9.300 +-42.233 -9.283 +-42.183 -9.283 +-42.133 -9.283 +-42.050 -9.233 +-42.000 -9.233 +-41.917 -9.267 +-41.900 -9.250 +-41.817 -9.200 +-41.767 -9.133 +-41.733 -9.100 +-41.733 -9.033 +-41.700 -9.017 +-41.650 -8.983 +-41.600 -8.967 +-41.567 -8.967 +-41.550 -8.950 +-41.483 -8.867 +-41.417 -8.783 +-41.350 -8.700 +-41.333 -8.733 +-41.283 -8.733 +-41.217 -8.700 +-41.117 -8.700 +-41.117 -8.767 +-41.033 -8.783 +-41.033 -8.850 +-41.017 -8.833 +-41.000 -8.833 +-40.950 -8.850 +-40.917 -8.850 +-40.850 -8.967 +-40.850 -9.033 +-40.867 -9.117 +-40.833 -9.133 +-40.783 -9.183 +-40.700 -9.183 +-40.683 -9.317 +-40.767 -9.450 +-40.700 -9.450 +-40.633 -9.483 +-40.567 -9.450 +-40.533 -9.417 +-40.500 -9.400 +-40.483 -9.417 +-40.433 -9.350 +-40.400 -9.367 +-40.367 -9.367 +-40.283 -9.167 +-40.300 -9.133 +-40.267 -9.067 +-40.250 -9.050 +-40.217 -9.050 +-40.167 -9.083 +-40.117 -9.083 +-40.083 -9.067 +-40.000 -9.050 +-39.983 -9.050 +-39.883 -8.933 +-39.917 -8.867 +-39.900 -8.833 +-39.883 -8.817 +-39.833 -8.800 +-39.800 -8.817 +-39.767 -8.800 +-39.750 -8.783 +-39.683 -8.783 +-39.683 -8.717 +-39.700 -8.667 +-39.633 -8.650 +-39.483 -8.600 +-39.467 -8.567 +-39.417 -8.550 +-39.367 -8.533 +-39.300 -8.567 +-39.267 -8.583 +-39.267 -8.617 +-39.233 -8.650 +-39.217 -8.683 +-39.167 -8.700 +-39.033 -8.733 +-39.000 -8.750 +-38.950 -8.800 +-38.900 -8.800 +-38.883 -8.783 +-38.800 -8.800 +-38.717 -8.867 +-38.700 -8.883 +-38.700 -8.933 +-38.667 -8.983 +-38.633 -8.983 +-38.617 -8.967 +-38.600 -8.867 +-38.567 -8.817 +-38.500 -8.850 +-38.483 -8.883 +-38.500 -8.917 +-38.517 -8.933 +-38.517 -8.950 +-38.483 -9.017 +-38.467 -9.033 +-38.417 -9.050 +-38.400 -9.033 +-38.333 -8.983 +-38.300 -9.050 +-38.333 -9.083 +-38.333 -9.150 +-38.283 -9.183 +-38.300 -9.200 +-38.233 -9.333 +-38.200 -9.417 +-38.117 -9.433 +-38.017 -9.500 +-38.067 -9.550 +-38.067 -9.600 +-38.067 -9.617 +-38.017 -9.650 +-38.050 -9.717 +-38.017 -9.817 +-38.000 -9.833 +-38.000 -9.933 +-37.983 -9.967 +-37.883 -9.967 +-37.833 -10.000 +-37.833 -10.017 +-37.767 -10.133 +-37.783 -10.217 +-37.817 -10.383 +-37.833 -10.400 +-37.867 -10.433 +-37.817 -10.517 +-37.833 -10.533 +-37.833 -10.583 +-37.817 -10.600 +-37.817 -10.700 +-38.017 -10.767 +-38.050 -10.750 +-38.067 -10.717 +-38.117 -10.717 +-38.183 -10.700 +-38.217 -10.717 +-38.250 -10.783 +-38.250 -10.867 +-38.167 -11.017 +-38.100 -11.083 +-38.100 -11.117 +-38.083 -11.167 +-38.083 -11.200 +-38.000 -11.200 +-38.000 -11.350 +-37.967 -11.400 +-37.933 -11.400 +-37.900 -11.433 +-37.900 -11.433 +-37.867 -11.433 +-37.867 -11.467 +-37.817 -11.500 +-37.767 -11.533 +-37.733 -11.550 +-37.700 -11.550 +-37.667 -11.567 +-37.650 -11.517 +-37.617 -11.533 +-37.583 -11.517 +-37.583 -11.533 +-37.483 -11.533 +-37.417 -11.483 +-37.383 -11.467 +-37.333 -11.450 +999 999 +-50.517 -12.867 +-50.500 -12.850 +-50.500 -12.850 +-50.483 -12.833 +-50.483 -12.833 +-50.500 -12.817 +-50.500 -12.817 +-50.500 -12.817 +-50.500 -12.800 +-50.500 -12.800 +-50.483 -12.783 +-50.483 -12.783 +-50.483 -12.767 +-50.500 -12.767 +-50.500 -12.767 +-50.500 -12.750 +-50.483 -12.750 +-50.483 -12.750 +-50.483 -12.750 +-50.483 -12.733 +-50.483 -12.733 +-50.483 -12.733 +-50.483 -12.717 +-50.467 -12.717 +-50.467 -12.717 +-50.450 -12.717 +-50.450 -12.717 +-50.450 -12.717 +-50.450 -12.700 +-50.433 -12.683 +-50.433 -12.683 +-50.433 -12.683 +-50.433 -12.683 +-50.433 -12.683 +-50.417 -12.683 +-50.417 -12.667 +-50.417 -12.650 +-50.417 -12.650 +-50.417 -12.633 +-50.417 -12.633 +-50.400 -12.633 +-50.400 -12.633 +-50.400 -12.633 +-50.400 -12.633 +-50.400 -12.617 +-50.400 -12.617 +-50.400 -12.617 +-50.400 -12.600 +-50.383 -12.600 +-50.383 -12.600 +-50.383 -12.600 +-50.383 -12.600 +-50.383 -12.583 +-50.383 -12.583 +-50.383 -12.583 +-50.383 -12.583 +-50.367 -12.583 +-50.367 -12.583 +-50.367 -12.567 +-50.367 -12.567 +-50.367 -12.567 +-50.367 -12.567 +-50.367 -12.567 +-50.350 -12.567 +-50.350 -12.567 +-50.350 -12.567 +-50.350 -12.567 +-50.350 -12.550 +-50.350 -12.550 +-50.350 -12.533 +-50.350 -12.533 +-50.333 -12.550 +-50.333 -12.550 +-50.333 -12.550 +-50.333 -12.550 +-50.333 -12.533 +-50.333 -12.533 +-50.333 -12.517 +-50.317 -12.517 +-50.317 -12.517 +-50.300 -12.517 +-50.300 -12.500 +-50.283 -12.500 +-50.267 -12.483 +-50.267 -12.483 +-50.250 -12.483 +-50.233 -12.467 +-50.233 -12.467 +-50.217 -12.467 +-50.217 -12.467 +-50.233 -12.467 +-50.217 -12.467 +-50.217 -12.450 +-50.217 -12.450 +-50.217 -12.450 +-50.217 -12.450 +-50.217 -12.450 +-50.217 -12.433 +-50.200 -12.433 +-50.200 -12.450 +-50.200 -12.450 +-50.183 -12.450 +-50.183 -12.450 +-50.183 -12.433 +-50.167 -12.433 +-50.167 -12.433 +-50.167 -12.450 +-50.183 -12.467 +-50.183 -12.467 +-50.200 -12.467 +-50.200 -12.467 +-50.200 -12.483 +-50.200 -12.483 +-50.217 -12.483 +-50.217 -12.483 +-50.217 -12.500 +-50.217 -12.500 +-50.233 -12.500 +-50.233 -12.517 +-50.233 -12.533 +-50.217 -12.550 +-50.217 -12.567 +-50.217 -12.567 +-50.217 -12.583 +-50.217 -12.583 +-50.217 -12.583 +-50.217 -12.583 +-50.233 -12.600 +-50.233 -12.600 +-50.233 -12.600 +-50.250 -12.600 +-50.250 -12.600 +-50.250 -12.600 +-50.250 -12.617 +-50.250 -12.633 +-50.250 -12.650 +-50.250 -12.650 +-50.267 -12.650 +-50.267 -12.650 +-50.267 -12.650 +-50.267 -12.667 +-50.283 -12.667 +-50.283 -12.667 +-50.283 -12.683 +-50.283 -12.683 +-50.283 -12.700 +-50.283 -12.700 +-50.283 -12.700 +-50.283 -12.700 +-50.283 -12.700 +-50.300 -12.700 +-50.300 -12.717 +-50.300 -12.717 +-50.300 -12.717 +-50.300 -12.717 +-50.300 -12.717 +-50.300 -12.717 +-50.317 -12.717 +-50.317 -12.717 +-50.317 -12.717 +-50.300 -12.733 +-50.300 -12.733 +-50.300 -12.733 +-50.300 -12.750 +-50.317 -12.767 +-50.317 -12.767 +-50.317 -12.767 +-50.317 -12.767 +-50.317 -12.783 +-50.317 -12.800 +-50.317 -12.817 +-50.317 -12.817 +-50.317 -12.817 +-50.317 -12.833 +-50.317 -12.850 +-50.317 -12.850 +-50.300 -12.850 +-50.300 -12.867 +-50.283 -12.867 +-50.267 -12.867 +-50.250 -12.867 +-50.233 -12.883 +-50.233 -12.900 +-50.217 -12.900 +-50.200 -12.900 +-50.183 -12.917 +-50.167 -12.917 +-50.167 -12.917 +-50.133 -12.917 +-50.117 -12.917 +-50.100 -12.917 +-50.100 -12.917 +-50.100 -12.917 +-50.083 -12.933 +-50.067 -12.933 +-50.050 -12.933 +-50.050 -12.950 +-50.033 -12.950 +-50.017 -12.967 +-50.000 -12.967 +-50.000 -12.967 +-49.983 -12.967 +-49.967 -12.967 +-49.967 -12.967 +-49.950 -12.967 +-49.383 -13.283 +-49.333 -13.233 +-49.367 -13.217 +-49.350 -13.200 +-49.350 -13.183 +-49.350 -13.167 +-49.367 -13.167 +-49.350 -13.150 +-49.350 -13.133 +-49.367 -13.117 +-49.367 -13.117 +-49.350 -13.100 +-49.350 -13.067 +-49.333 -13.050 +-49.317 -13.017 +-49.317 -13.017 +-49.317 -13.000 +-49.300 -13.000 +-49.317 -12.983 +-49.300 -12.967 +-49.283 -12.950 +-49.283 -12.950 +-49.283 -12.933 +-49.267 -12.917 +-49.267 -12.900 +-49.267 -12.900 +-49.250 -12.900 +-49.250 -12.900 +-49.233 -12.883 +-49.233 -12.883 +-49.233 -12.883 +-49.233 -12.883 +-49.217 -12.867 +-49.200 -12.850 +-49.183 -12.833 +-49.167 -12.833 +-49.167 -12.817 +-49.167 -12.817 +-49.150 -12.817 +-49.150 -12.800 +-49.133 -12.817 +-49.133 -12.833 +-49.133 -12.850 +-49.100 -12.850 +-49.100 -12.850 +-49.100 -12.850 +-49.100 -12.867 +-49.100 -12.867 +-49.100 -12.867 +-49.117 -12.883 +-49.117 -12.900 +-49.117 -12.900 +-49.083 -12.917 +-49.067 -12.917 +-49.067 -12.917 +-49.017 -12.967 +-48.917 -12.900 +-48.883 -12.833 +-48.883 -12.833 +-48.883 -12.833 +-48.883 -12.833 +-48.883 -12.817 +-48.867 -12.833 +-48.850 -12.833 +-48.850 -12.833 +-48.850 -12.850 +-48.850 -12.867 +-48.833 -12.867 +-48.833 -12.867 +-48.817 -12.867 +-48.817 -12.883 +-48.800 -12.900 +-48.800 -12.900 +-48.783 -12.900 +-48.767 -12.933 +-48.750 -12.933 +-48.750 -12.933 +-48.750 -12.950 +-48.750 -12.967 +-48.750 -12.983 +-48.733 -13.000 +-48.733 -13.017 +-48.717 -13.017 +-48.700 -13.017 +-48.700 -13.017 +-48.683 -13.017 +-48.683 -13.017 +-48.667 -13.017 +-48.667 -13.033 +-48.650 -13.033 +-48.650 -13.033 +-48.650 -13.050 +-48.633 -13.067 +-48.633 -13.067 +-48.617 -13.083 +-48.617 -13.100 +-48.600 -13.100 +-48.600 -13.100 +-48.600 -13.117 +-48.600 -13.117 +-48.583 -13.133 +-48.583 -13.150 +-48.600 -13.167 +-48.600 -13.167 +-48.583 -13.183 +-48.583 -13.217 +-48.600 -13.217 +-48.617 -13.233 +-48.617 -13.250 +-48.617 -13.250 +-48.600 -13.267 +-48.600 -13.267 +-48.600 -13.267 +-48.617 -13.300 +-48.600 -13.317 +-48.583 -13.317 +-48.567 -13.300 +-48.567 -13.267 +-48.550 -13.217 +-48.550 -13.200 +-48.533 -13.150 +-48.533 -13.133 +-48.517 -13.133 +-48.500 -13.133 +-48.500 -13.133 +-48.500 -13.150 +-48.500 -13.167 +-48.450 -13.283 +-48.433 -13.283 +-48.417 -13.283 +-48.400 -13.283 +-48.400 -13.283 +-48.383 -13.267 +-48.383 -13.267 +-48.367 -13.250 +-48.350 -13.250 +-48.333 -13.250 +-48.333 -13.250 +-48.333 -13.250 +-48.333 -13.233 +-48.333 -13.233 +-48.333 -13.233 +-48.317 -13.233 +-48.317 -13.250 +-48.317 -13.250 +-48.300 -13.250 +-48.300 -13.233 +-48.300 -13.233 +-48.300 -13.233 +-48.283 -13.217 +-48.283 -13.217 +-48.283 -13.217 +-48.283 -13.217 +-48.267 -13.217 +-48.267 -13.200 +-48.250 -13.200 +-48.250 -13.200 +-48.250 -13.183 +-48.233 -13.183 +-48.233 -13.183 +-48.217 -13.183 +-48.200 -13.183 +-48.200 -13.183 +-48.200 -13.167 +-48.183 -13.167 +-48.183 -13.167 +-48.167 -13.150 +-48.150 -13.150 +-48.167 -13.183 +-48.167 -13.183 +-48.183 -13.200 +-48.167 -13.217 +-48.150 -13.217 +-48.167 -13.233 +-48.167 -13.250 +-48.167 -13.250 +-48.167 -13.250 +-48.150 -13.283 +-48.167 -13.300 +-48.167 -13.300 +-48.150 -13.317 +-48.133 -13.317 +-48.133 -13.300 +-48.117 -13.300 +-48.117 -13.300 +-48.100 -13.300 +-48.100 -13.300 +-48.083 -13.300 +-48.083 -13.283 +-48.083 -13.283 +-48.083 -13.250 +-48.083 -13.250 +-48.083 -13.250 +-48.067 -13.250 +-48.067 -13.250 +-48.067 -13.267 +-48.050 -13.267 +-48.033 -13.267 +-48.033 -13.283 +-48.017 -13.283 +-48.017 -13.283 +-48.017 -13.300 +-48.000 -13.300 +-47.983 -13.317 +-47.983 -13.317 +-47.983 -13.317 +-47.983 -13.333 +-47.983 -13.333 +-47.983 -13.333 +-47.967 -13.350 +-47.967 -13.350 +-47.967 -13.350 +-47.967 -13.350 +-47.967 -13.350 +-47.967 -13.350 +-47.950 -13.333 +-47.950 -13.333 +-47.950 -13.333 +-47.950 -13.333 +-47.933 -13.333 +-47.917 -13.333 +-47.883 -13.350 +-47.867 -13.333 +-47.850 -13.350 +-47.833 -13.333 +-47.817 -13.333 +-47.800 -13.367 +-47.767 -13.400 +-47.733 -13.433 +-47.700 -13.467 +-47.683 -13.500 +-47.667 -13.500 +-47.667 -13.500 +-47.650 -13.467 +-47.633 -13.450 +-47.617 -13.417 +-47.650 -13.400 +-47.667 -13.383 +-47.683 -13.367 +-47.700 -13.350 +-47.700 -13.350 +-47.683 -13.317 +-47.667 -13.217 +-47.667 -13.217 +-47.683 -13.200 +-47.650 -13.167 +-47.650 -13.150 +-47.650 -13.133 +-47.650 -13.133 +-47.650 -13.133 +-47.633 -13.133 +-47.633 -13.133 +-47.617 -13.133 +-47.617 -13.133 +-47.600 -13.133 +-47.583 -13.133 +-47.567 -13.150 +-47.567 -13.167 +-47.583 -13.183 +-47.567 -13.200 +-47.567 -13.217 +-47.533 -13.217 +-47.517 -13.217 +-47.500 -13.217 +-47.483 -13.200 +-47.467 -13.200 +-47.467 -13.233 +-47.467 -13.233 +-47.450 -13.250 +-47.433 -13.233 +-47.417 -13.250 +-47.417 -13.250 +-47.433 -13.250 +-47.433 -13.267 +-47.433 -13.267 +-47.417 -13.283 +-47.417 -13.300 +-47.417 -13.300 +-47.400 -13.283 +-47.383 -13.283 +-47.383 -13.267 +-47.367 -13.250 +-47.367 -13.250 +-47.333 -13.267 +-47.317 -13.267 +-47.300 -13.267 +-47.283 -13.267 +-47.283 -13.267 +-47.283 -13.283 +-47.267 -13.283 +-47.267 -13.250 +-47.250 -13.250 +-47.250 -13.250 +-47.250 -13.233 +-47.233 -13.217 +-47.217 -13.217 +-47.200 -13.217 +-47.167 -13.200 +-47.167 -13.217 +-47.167 -13.217 +-47.150 -13.217 +-47.133 -13.217 +-47.133 -13.200 +-47.117 -13.200 +-47.083 -13.200 +-47.083 -13.200 +-47.083 -13.200 +-47.067 -13.183 +-47.067 -13.183 +-47.050 -13.183 +-47.017 -13.150 +-47.017 -13.150 +-46.983 -13.133 +-46.983 -13.150 +-46.983 -13.150 +-46.983 -13.150 +-46.967 -13.133 +-46.950 -13.133 +-46.950 -13.117 +-46.933 -13.117 +-46.933 -13.117 +-46.933 -13.100 +-46.900 -13.083 +-46.883 -13.067 +-46.883 -13.067 +-46.867 -13.083 +-46.850 -13.083 +-46.850 -13.067 +-46.833 -13.050 +-46.833 -13.033 +-46.817 -13.033 +-46.817 -13.017 +-46.750 -13.000 +-46.683 -12.983 +-46.633 -12.983 +-46.617 -12.967 +-46.550 -12.967 +-46.467 -12.967 +-46.450 -12.900 +-46.417 -12.850 +-46.417 -12.850 +-46.417 -12.867 +-46.400 -12.883 +-46.383 -12.883 +-46.383 -12.883 +-46.367 -12.933 +-46.367 -12.933 +-46.383 -12.967 +-46.383 -12.967 +-46.383 -12.983 +-46.367 -12.983 +-46.350 -12.967 +-46.333 -12.967 +-46.300 -12.967 +-46.267 -12.967 +-46.250 -12.967 +-46.217 -12.950 +-46.200 -12.950 +-46.183 -12.950 +-46.183 -12.933 +-46.167 -12.950 +-46.133 -12.933 +-46.133 -12.900 +999 999 +-38.017 -9.500 +-38.000 -9.533 +-37.933 -9.533 +-37.917 -9.550 +-37.900 -9.550 +-37.833 -9.600 +-37.733 -9.633 +-37.700 -9.650 +-37.650 -9.700 +-37.600 -9.733 +-37.467 -9.750 +-37.383 -9.783 +-37.300 -9.833 +-37.267 -9.850 +-37.233 -9.900 +-37.150 -9.900 +-37.050 -9.983 +-37.000 -9.983 +-36.967 -10.000 +-36.967 -10.067 +-36.933 -10.117 +-36.867 -10.167 +-36.817 -10.217 +-36.783 -10.217 +-36.733 -10.267 +999 999 +-38.233 -9.333 +-38.150 -9.233 +-38.100 -9.200 +-38.083 -9.200 +-37.983 -9.167 +-37.967 -9.133 +-37.917 -9.067 +-37.883 -9.050 +-37.883 -9.033 +-37.867 -9.017 +-37.833 -8.967 +-37.800 -8.883 +-37.767 -8.867 +-37.750 -8.883 +-37.717 -8.917 +-37.667 -9.000 +-37.617 -9.000 +-37.600 -8.983 +-37.550 -8.983 +-37.500 -8.983 +-37.467 -9.017 +-37.400 -9.050 +-37.300 -9.100 +-37.283 -9.133 +-37.233 -9.183 +-37.217 -9.233 +-37.200 -9.217 +-37.167 -9.267 +-37.133 -9.267 +-37.133 -9.233 +-37.083 -9.250 +-37.067 -9.283 +-37.067 -9.317 +-37.033 -9.317 +-36.950 -9.383 +-36.917 -9.283 +-36.833 -9.267 +-36.733 -9.283 +-36.700 -9.300 +-36.633 -9.350 +-36.617 -9.350 +-36.583 -9.333 +-36.533 -9.333 +-36.550 -9.300 +-36.500 -9.233 +-36.433 -9.217 +-36.367 -9.217 +-36.350 -9.200 +-36.317 -9.167 +-36.267 -9.150 +-36.283 -9.100 +-36.267 -9.083 +-36.217 -9.083 +-36.183 -9.017 +-36.117 -9.000 +-36.067 -8.917 +-36.000 -8.900 +-35.917 -8.883 +-35.900 -8.867 +-35.850 -8.867 +-35.817 -8.867 +-35.767 -8.867 +-35.783 -8.883 +-35.717 -8.917 +-35.683 -8.900 +-35.650 -8.883 +-35.617 -8.867 +-35.567 -8.833 +-35.517 -8.817 +-35.467 -8.800 +-35.433 -8.833 +-35.417 -8.833 +-35.400 -8.850 +-35.383 -8.867 +-35.333 -8.883 +-35.317 -8.867 +-35.217 -8.883 +-35.183 -8.883 +-35.150 -8.900 +999 999 +-37.250 -4.831 +-37.500 -4.883 +-37.633 -4.926 +-37.633 -4.917 +-37.634 -4.917 +-37.676 -5.000 +-37.767 -5.200 +-37.901 -5.402 +-37.917 -5.467 +-38.067 -5.650 +-38.083 -5.717 +-38.067 -5.733 +-38.067 -5.783 +-38.083 -5.800 +-38.083 -5.817 +-38.117 -5.850 +-38.117 -5.883 +-38.150 -5.917 +-38.167 -5.933 +-38.183 -5.950 +-38.217 -5.967 +-38.233 -6.000 +-38.250 -6.017 +-38.267 -6.050 +-38.333 -6.100 +-38.367 -6.083 +-38.400 -6.067 +-38.433 -6.067 +-38.467 -6.100 +-38.483 -6.133 +-38.483 -6.183 +-38.500 -6.200 +-38.517 -6.217 +-38.550 -6.217 +-38.550 -6.233 +-38.533 -6.233 +-38.533 -6.250 +-38.567 -6.267 +-38.583 -6.283 +-38.567 -6.333 +-38.600 -6.383 +-38.583 -6.417 +-38.550 -6.400 +-38.533 -6.383 +-38.517 -6.417 +-38.550 -6.433 +-38.583 -6.467 +-38.633 -6.550 +-38.617 -6.583 +-38.650 -6.617 +-38.650 -6.667 +-38.683 -6.700 +-38.650 -6.733 +-38.650 -6.783 +-38.667 -6.800 +-38.683 -6.833 +-38.700 -6.867 +-38.733 -6.883 +-38.783 -6.900 +-38.750 -6.933 +-38.750 -6.967 +-38.767 -6.967 +-38.733 -7.000 +-38.683 -7.050 +-38.667 -7.083 +-38.667 -7.133 +-38.683 -7.167 +-38.683 -7.183 +-38.633 -7.183 +-38.633 -7.200 +-38.617 -7.200 +-38.600 -7.250 +-38.567 -7.250 +-38.550 -7.283 +-38.533 -7.317 +-38.567 -7.367 +-38.583 -7.400 +-38.600 -7.400 +-38.600 -7.450 +-38.633 -7.533 +-38.650 -7.550 +-38.700 -7.583 +-38.700 -7.583 +-38.717 -7.600 +-38.700 -7.633 +-38.733 -7.633 +-38.750 -7.650 +-38.783 -7.650 +-38.800 -7.667 +-38.817 -7.683 +-38.833 -7.733 +-38.850 -7.750 +-38.883 -7.733 +-38.933 -7.750 +-38.950 -7.767 +-38.950 -7.800 +-38.950 -7.817 +-38.967 -7.833 +-38.983 -7.850 +-39.000 -7.817 +-39.017 -7.800 +-39.067 -7.833 +-39.091 -7.858 +-39.083 -7.833 +-39.100 -7.833 +-39.117 -7.800 +-39.117 -7.767 +-39.150 -7.733 +-39.150 -7.717 +-39.167 -7.700 +-39.200 -7.683 +-39.250 -7.683 +-39.267 -7.667 +-39.300 -7.667 +-39.317 -7.650 +-39.317 -7.633 +-39.300 -7.583 +-39.333 -7.550 +-39.350 -7.517 +-39.383 -7.483 +-39.483 -7.433 +-39.600 -7.350 +-39.650 -7.317 +-39.700 -7.317 +-39.767 -7.333 +-39.867 -7.333 +-39.933 -7.350 +-39.983 -7.367 +-40.000 -7.367 +-40.017 -7.383 +-40.117 -7.383 +-40.167 -7.367 +-40.200 -7.367 +-40.267 -7.333 +-40.283 -7.283 +-40.317 -7.283 +-40.333 -7.317 +-40.367 -7.367 +-40.417 -7.367 +-40.450 -7.333 +-40.467 -7.317 +-40.500 -7.317 +-40.533 -7.367 +-40.567 -7.400 +-40.583 -7.417 +-40.600 -7.400 +-40.633 -7.400 +-40.633 -7.367 +-40.650 -7.350 +-40.683 -7.350 +-40.700 -7.367 +-40.717 -7.383 +-40.683 -7.383 +-40.700 -7.417 +-40.717 -7.450 +-40.717 -7.483 +-40.683 -7.550 +-40.650 -7.583 +-40.633 -7.633 +-40.650 -7.667 +-40.667 -7.700 +-40.667 -7.750 +-40.667 -7.767 +-40.617 -7.783 +-40.583 -7.767 +-40.550 -7.767 +-40.517 -7.800 +-40.517 -7.833 +-40.533 -7.867 +-40.533 -7.933 +-40.550 -7.967 +-40.550 -8.000 +-40.567 -8.000 +-40.583 -8.067 +-40.583 -8.133 +-40.617 -8.150 +-40.633 -8.183 +-40.683 -8.200 +-40.717 -8.233 +-40.750 -8.250 +-40.767 -8.283 +-40.767 -8.300 +-40.817 -8.333 +-40.817 -8.350 +-40.850 -8.383 +-40.883 -8.367 +-40.900 -8.417 +-40.917 -8.450 +-40.983 -8.400 +-41.017 -8.400 +-41.033 -8.450 +-41.033 -8.467 +-41.083 -8.467 +-41.100 -8.533 +-41.133 -8.550 +-41.167 -8.600 +-41.200 -8.600 +-41.200 -8.633 +-41.217 -8.650 +-41.283 -8.667 +-41.350 -8.700 +999 999 +-40.500 -7.317 +-40.500 -7.300 +-40.517 -7.233 +-40.500 -7.150 +-40.450 -7.067 +-40.400 -7.000 +-40.433 -6.933 +-40.417 -6.883 +-40.370 -6.800 +-40.383 -6.767 +-40.433 -6.767 +-40.467 -6.733 +-40.567 -6.717 +-40.633 -6.683 +-40.717 -6.683 +-40.733 -6.650 +-40.700 -6.600 +-40.717 -6.550 +-40.783 -6.517 +-40.800 -6.500 +-40.800 -6.383 +-40.783 -6.367 +-40.783 -6.317 +-40.817 -6.267 +-40.850 -6.200 +-40.833 -6.133 +-40.867 -6.100 +-40.867 -6.050 +-40.883 -6.033 +-40.900 -6.000 +-40.867 -5.967 +-40.900 -5.900 +-40.883 -5.850 +-40.883 -5.800 +-40.900 -5.767 +-40.917 -5.717 +-40.917 -5.617 +-40.933 -5.567 +-40.933 -5.533 +-40.917 -5.483 +-40.933 -5.467 +-40.983 -5.433 +-41.000 -5.400 +-41.050 -5.333 +-41.050 -5.267 +-41.067 -5.200 +-41.067 -5.133 +-41.083 -5.083 +-41.100 -5.033 +-41.117 -4.983 +-41.117 -4.900 +-41.150 -4.883 +-41.167 -4.883 +-41.183 -4.850 +-41.183 -4.850 +-41.167 -4.800 +-41.167 -4.733 +-41.200 -4.667 +-41.217 -4.633 +-41.250 -4.600 +-41.233 -4.567 +-41.183 -4.533 +-41.150 -4.500 +-41.133 -4.417 +-41.100 -4.367 +-41.067 -4.317 +-41.083 -4.283 +-41.100 -4.217 +-41.117 -4.183 +-41.233 -4.000 +-41.283 -3.933 +-41.300 -3.800 +-41.333 -3.750 +-41.350 -3.683 +-41.383 -3.600 +-41.400 -3.550 +-41.417 -3.417 +-41.417 -3.367 +-41.400 -3.317 +999 999 +-41.000 -5.400 +-40.917 -5.283 +-40.933 -5.217 +-40.950 -5.100 +-40.967 -5.050 +-40.983 -5.000 +-41.017 -4.933 +-40.983 -4.867 +-40.983 -4.817 +-41.000 -4.700 +-41.033 -4.567 +-41.000 -4.500 +-40.967 -4.450 +-40.983 -4.400 +-41.017 -4.383 +-41.067 -4.317 +999 999 +-41.117 -4.183 +-41.117 -4.150 +-41.117 -4.117 +-41.133 -4.067 +-41.167 -4.000 +-41.183 -3.950 +-41.200 -3.917 +-41.217 -3.850 +-41.217 -3.817 +-41.217 -3.750 +-41.217 -3.700 +-41.233 -3.667 +-41.267 -3.633 +-41.383 -3.600 +-41.400 -3.550 +-41.367 -3.533 +-41.350 -3.450 +-41.333 -3.367 +-41.383 -3.367 +-41.400 -3.317 +-41.400 -3.317 +-41.333 -3.200 +-41.317 -3.150 +-41.267 -3.083 +-41.250 -3.033 +-41.267 -3.000 +999 999 +-38.700 -7.633 +-38.667 -7.650 +-38.633 -7.683 +-38.617 -7.683 +-38.600 -7.700 +-38.600 -7.733 +-38.583 -7.750 +-38.567 -7.733 +-38.533 -7.767 +-38.517 -7.750 +-38.483 -7.717 +-38.433 -7.733 +-38.350 -7.683 +-38.333 -7.700 +-38.317 -7.767 +-38.283 -7.800 +-38.283 -7.833 +-38.233 -7.833 +-38.217 -7.800 +-38.183 -7.783 +-38.150 -7.800 +-38.117 -7.817 +-38.100 -7.833 +-38.067 -7.817 +-38.067 -7.750 +-38.033 -7.750 +-38.000 -7.767 +-37.933 -7.700 +-37.867 -7.650 +-37.767 -7.600 +-37.750 -7.583 +-37.717 -7.567 +-37.667 -7.533 +-37.617 -7.517 +-37.583 -7.483 +-37.500 -7.400 +-37.500 -7.367 +-37.483 -7.350 +-37.367 -7.367 +-37.350 -7.317 +-37.333 -7.283 +-37.250 -7.267 +-37.217 -7.283 +-37.150 -7.333 +-37.100 -7.367 +-37.033 -7.383 +-37.017 -7.433 +-37.017 -7.450 +-37.005 -7.469 +-37.017 -7.500 +-37.067 -7.500 +-37.117 -7.517 +-37.133 -7.567 +-37.200 -7.567 +-37.217 -7.583 +-37.200 -7.633 +-37.150 -7.783 +-37.250 -7.850 +-37.250 -7.867 +-37.267 -7.883 +-37.300 -7.900 +-37.300 -7.917 +-37.317 -7.933 +-37.367 -7.950 +-37.350 -7.967 +-37.267 -7.983 +-37.250 -7.967 +-37.217 -7.950 +-37.200 -7.983 +-37.167 -8.000 +-37.150 -8.017 +-37.150 -8.067 +-37.167 -8.117 +-37.117 -8.150 +-37.117 -8.183 +-37.167 -8.217 +-37.150 -8.250 +-37.117 -8.233 +-37.067 -8.267 +-37.033 -8.267 +-37.017 -8.300 +-36.983 -8.300 +-36.967 -8.300 +-36.950 -8.283 +-36.933 -8.267 +-36.650 -8.117 +-36.667 -8.083 +-36.650 -8.067 +-36.633 -8.000 +-36.617 -7.950 +-36.600 -7.950 +-36.583 -7.883 +-36.550 -7.900 +-36.517 -7.917 +-36.467 -7.917 +-36.450 -7.900 +-36.450 -7.867 +-36.433 -7.817 +-36.400 -7.800 +-36.333 -7.800 +-36.300 -7.817 +-36.250 -7.817 +-36.267 -7.783 +-36.217 -7.767 +-36.200 -7.783 +-36.183 -7.783 +-36.167 -7.800 +-36.150 -7.783 +-36.067 -7.783 +-36.050 -7.800 +-36.000 -7.800 +-35.950 -7.833 +-35.950 -7.817 +-35.950 -7.800 +-35.867 -7.800 +-35.900 -7.767 +-35.917 -7.750 +-35.900 -7.717 +-35.883 -7.717 +-35.883 -7.750 +-35.767 -7.733 +-35.750 -7.717 +-35.683 -7.700 +-35.617 -7.667 +-35.583 -7.650 +-35.550 -7.633 +-35.533 -7.583 +-35.550 -7.550 +-35.517 -7.467 +-35.500 -7.450 +-35.467 -7.433 +-35.417 -7.467 +-35.400 -7.450 +-35.250 -7.367 +-35.200 -7.383 +-35.150 -7.400 +-35.100 -7.400 +-35.067 -7.383 +-35.050 -7.417 +-35.017 -7.450 +-35.000 -7.450 +-34.983 -7.467 +-34.983 -7.483 +-34.967 -7.533 +-34.917 -7.533 +-34.900 -7.550 +-34.817 -7.533 +999 999 +-38.533 -6.383 +-38.500 -6.350 +-38.467 -6.333 +-38.500 -6.367 +-38.483 -6.400 +-38.450 -6.417 +-38.417 -6.417 +-38.400 -6.433 +-38.367 -6.450 +-38.317 -6.467 +-38.283 -6.500 +-38.233 -6.483 +-38.183 -6.483 +-38.150 -6.500 +-38.117 -6.533 +-38.067 -6.450 +-38.050 -6.450 +-38.050 -6.500 +-38.033 -6.500 +-38.033 -6.450 +-38.000 -6.417 +-37.983 -6.417 +-37.933 -6.400 +-37.867 -6.383 +-37.817 -6.300 +-37.783 -6.300 +-37.683 -6.250 +-37.667 -6.233 +-37.650 -6.150 +-37.617 -6.133 +-37.583 -6.133 +-37.550 -6.117 +-37.533 -6.100 +-37.450 -6.100 +-37.417 -6.083 +-37.383 -6.067 +-37.367 -6.083 +-37.333 -6.067 +-37.300 -6.050 +-37.267 -6.033 +-37.233 -6.033 +-37.183 -6.050 +-37.154 -6.030 +-37.167 -6.133 +-37.300 -6.267 +-37.350 -6.300 +-37.383 -6.350 +-37.400 -6.400 +-37.400 -6.450 +-37.417 -6.500 +-37.433 -6.517 +-37.500 -6.533 +-37.533 -6.583 +-37.533 -6.683 +-37.283 -6.717 +-37.267 -6.800 +-37.267 -6.833 +-37.217 -6.833 +-37.183 -6.800 +-37.133 -6.800 +-37.117 -6.833 +-37.100 -6.833 +-37.000 -6.717 +-36.983 -6.700 +-36.950 -6.767 +-36.833 -6.717 +-36.783 -6.767 +-36.767 -6.800 +-36.733 -6.817 +-36.767 -6.900 +-36.767 -6.933 +-36.733 -6.967 +-36.717 -6.983 +-36.700 -6.917 +-36.583 -6.917 +-36.567 -6.900 +-36.550 -6.833 +-36.517 -6.800 +-36.500 -6.750 +-36.517 -6.733 +-36.567 -6.717 +-36.517 -6.583 +-36.467 -6.617 +-36.450 -6.617 +-36.450 -6.550 +-36.467 -6.550 +-36.500 -6.500 +-36.533 -6.483 +-36.533 -6.450 +-36.500 -6.350 +-36.433 -6.367 +-36.383 -6.300 +-36.367 -6.317 +-36.317 -6.283 +-36.283 -6.317 +-36.300 -6.367 +-36.250 -6.433 +-36.150 -6.433 +-36.083 -6.450 +-36.067 -6.433 +-36.000 -6.467 +-36.000 -6.483 +-35.800 -6.483 +-35.717 -6.467 +-35.700 -6.467 +-35.683 -6.450 +-35.650 -6.450 +-35.600 -6.467 +-35.583 -6.483 +-35.550 -6.500 +-35.533 -6.483 +-35.417 -6.483 +-35.383 -6.517 +-35.333 -6.550 +-35.233 -6.533 +-35.217 -6.517 +-35.183 -6.550 +-35.150 -6.550 +-35.117 -6.517 +-35.100 -6.500 +-35.083 -6.517 +-35.050 -6.533 +-35.017 -6.517 +-34.983 -6.500 +-34.967 -6.483 +999 999 +-58.883 1.217 +-58.883 1.000 +-58.883 .250 +-60.000 .250 +-60.033 .250 +-60.050 .217 +-60.100 .133 +-60.133 .117 +-60.133 .050 +-60.150 -.000 +-60.200 -.033 +-60.250 -.117 +-60.233 -.150 +-60.317 -.267 +-60.300 -.283 +-60.367 -.417 +-60.367 -.450 +-60.400 -.517 +-60.383 -.567 +-60.383 -.583 +-60.367 -.583 +-60.367 -.617 +-60.333 -.633 +-60.300 -.700 +-60.317 -.717 +-60.367 -.733 +-60.433 -.767 +-60.483 -.767 +-60.483 -.783 +-60.500 -.800 +-60.500 -.817 +-60.533 -.867 +-60.583 -.850 +-60.600 -.850 +-60.600 -.850 +-60.667 -.883 +-60.683 -.867 +-60.733 -.850 +-60.767 -.867 +-60.767 -.800 +-60.783 -.767 +-60.817 -.733 +-60.800 -.700 +-60.850 -.683 +-60.867 -.650 +-60.917 -.617 +-60.933 -.567 +-60.933 -.550 +-61.017 -.567 +-61.067 -.550 +-61.083 -.517 +-61.150 -.500 +-61.167 -.517 +-61.200 -.500 +-61.233 -.500 +-61.217 -.517 +-61.217 -.533 +-61.233 -.567 +-61.283 -.583 +-61.333 -.600 +-61.367 -.600 +-61.400 -.633 +-61.400 -.650 +-61.483 -.717 +-61.517 -.750 +-61.533 -.767 +-61.550 -.850 +-61.583 -.933 +-61.583 -.967 +-61.583 -.983 +-61.550 -.983 +-61.550 -1.017 +-61.550 -1.050 +-61.567 -1.083 +-61.567 -1.100 +-61.567 -1.117 +-61.567 -1.150 +-61.617 -1.317 +-61.583 -1.333 +-61.583 -1.350 +-61.600 -1.367 +-61.600 -1.400 +-61.600 -1.400 +-61.533 -1.450 +-61.500 -1.500 +-61.467 -1.533 +-61.475 -1.586 +-61.550 -1.467 +-61.750 -1.383 +-61.783 -1.383 +-61.817 -1.400 +-61.883 -1.400 +-61.900 -1.383 +-61.917 -1.350 +-61.933 -1.283 +-61.950 -1.250 +-61.983 -1.217 +-61.983 -1.183 +-62.067 -1.100 +-62.100 -1.083 +-62.200 -1.000 +-62.250 -.967 +-62.317 -.917 +-62.333 -.900 +-62.400 -.833 +-62.500 -.767 +-62.500 -.750 +-62.500 -.717 +-62.483 -.683 +-62.450 -.683 +-62.400 -.717 +-62.367 -.700 +-62.367 -.683 +-62.367 -.667 +-62.333 -.667 +-62.333 -.650 +-62.300 -.650 +-62.300 -.617 +-62.317 -.600 +-62.300 -.583 +-62.317 -.533 +-62.317 -.517 +-62.333 -.483 +-62.350 -.483 +-62.350 -.450 +-62.367 -.450 +-62.350 -.433 +-62.383 -.350 +-62.367 -.333 +-62.367 -.317 +-62.383 -.300 +-62.433 -.283 +-62.450 -.250 +-62.467 -.233 +-62.467 -.183 +-62.500 -.117 +-62.517 -.117 +-62.533 -.083 +-62.550 -.083 +-62.550 -.067 +-62.550 -.033 +-62.567 -.017 +-62.550 .000 +-62.550 .050 +-62.517 .083 +-62.550 .150 +-62.567 .167 +-62.567 .200 +-62.567 .233 +-62.567 .267 +-62.517 .300 +-62.517 .350 +-62.533 .383 +-62.517 .417 +-62.483 .467 +-62.483 .517 +-62.533 .617 +-62.533 .750 +-62.467 .767 +-62.433 .800 +-62.433 .817 +-62.450 .867 +-62.500 .917 +-62.517 1.017 +-62.567 1.183 +-62.600 1.317 +-62.600 1.350 +-62.617 1.367 +-62.633 1.433 +-62.700 1.467 +-62.750 1.550 +-62.783 1.583 +-62.767 1.650 +-62.700 1.700 +-62.683 1.767 +-62.683 1.883 +-62.683 1.933 +-62.833 2.000 +-62.900 2.017 +-62.933 2.000 +-63.000 2.000 +-63.033 2.017 +-63.100 2.083 +-63.117 2.167 +-63.167 2.183 +-63.250 2.133 +-63.333 2.183 +-63.367 2.233 +-63.367 2.233 +999 999 +-58.133 -7.350 +-58.183 -7.317 +-58.183 -7.183 +-58.217 -7.133 +-58.250 -7.083 +-58.283 -7.067 +-58.333 -7.000 +-58.450 -6.900 +-58.483 -6.817 +-58.483 -6.700 +-58.417 -6.583 +-58.331 -6.544 +-58.073 -6.000 +-57.601 -5.000 +-57.128 -4.000 +-57.000 -3.728 +-57.000 -3.728 +-56.657 -3.000 +-56.657 -3.000 +-56.402 -2.456 +-56.402 -2.456 +-56.400 -2.450 +-56.383 -2.367 +-56.417 -2.367 +-56.433 -2.350 +-56.400 -2.283 +-56.300 -2.250 +-56.183 -2.167 +-56.100 -2.033 +-56.167 -2.000 +-56.183 -2.033 +-56.283 -2.083 +-56.433 -2.167 +-56.467 -2.183 +-56.533 -2.167 +-56.600 -2.200 +-56.600 -2.217 +-56.683 -2.217 +-56.700 -2.200 +-56.750 -2.183 +-56.750 -2.183 +-56.767 -2.183 +-56.767 -2.150 +-56.717 -2.100 +-56.717 -2.050 +-56.733 -2.033 +-56.750 -2.033 +-56.867 -2.017 +-56.900 -1.983 +-56.967 -1.950 +-56.983 -1.917 +-57.050 -1.917 +-57.067 -1.833 +-57.083 -1.817 +-57.100 -1.783 +-57.117 -1.800 +-57.133 -1.767 +-57.167 -1.767 +-57.167 -1.733 +-57.200 -1.750 +-57.217 -1.733 +-57.217 -1.717 +-57.233 -1.750 +-57.250 -1.733 +-57.250 -1.717 +-57.267 -1.717 +-57.267 -1.733 +-57.300 -1.717 +-57.317 -1.750 +-57.333 -1.750 +-57.367 -1.733 +-57.383 -1.733 +-57.400 -1.733 +-57.400 -1.700 +-57.417 -1.683 +-57.433 -1.700 +-57.450 -1.700 +-57.450 -1.683 +-57.483 -1.683 +-57.500 -1.667 +-57.517 -1.650 +-57.533 -1.650 +-57.567 -1.633 +-57.600 -1.600 +-57.633 -1.583 +-57.633 -1.600 +-57.650 -1.583 +-57.683 -1.600 +-57.717 -1.583 +-57.717 -1.517 +-57.767 -1.533 +-57.800 -1.500 +-57.833 -1.450 +-57.917 -1.450 +-57.917 -1.433 +-57.950 -1.433 +-57.950 -1.400 +-57.967 -1.383 +-57.967 -1.367 +-58.000 -1.367 +-58.000 -1.350 +-58.000 -1.333 +-58.000 -1.317 +-57.967 -1.233 +-57.967 -1.183 +-57.983 -1.183 +-58.000 -1.150 +-58.017 -1.150 +-58.050 -1.117 +-58.067 -1.133 +-58.083 -1.150 +-58.100 -1.183 +-58.133 -1.183 +-58.133 -1.217 +-58.150 -1.233 +-58.150 -1.250 +-58.233 -1.183 +-58.250 -1.167 +-58.267 -1.150 +-58.300 -1.167 +-58.367 -1.100 +-58.433 -1.067 +-58.433 -1.017 +-58.417 -1.000 +-58.450 -.950 +-58.450 -.933 +-58.433 -.917 +-58.467 -.900 +-58.433 -.900 +-58.483 -.867 +-58.483 -.883 +-58.500 -.867 +-58.500 -.850 +-58.517 -.850 +-58.533 -.850 +-58.550 -.833 +-58.567 -.817 +-58.583 -.800 +-58.583 -.783 +-58.617 -.783 +-58.633 -.750 +-58.667 -.750 +-58.717 -.667 +-58.733 -.633 +-58.717 -.600 +-58.717 -.567 +-58.717 -.550 +-58.733 -.517 +-58.733 -.483 +-58.733 -.450 +-58.750 -.433 +-58.783 -.417 +-58.800 -.400 +-58.817 -.400 +-58.833 -.383 +-58.867 -.367 +-58.867 -.317 +-58.900 -.250 +-58.883 -.200 +-58.917 -.133 +-58.895 -.008 +-58.883 .000 +-58.883 .250 +999 999 +-51.917 -1.133 +-51.933 -1.133 +-51.950 -1.167 +-51.967 -1.167 +-51.967 -1.117 +-52.000 -1.133 +-51.983 -1.167 +-52.033 -1.167 +-52.067 -1.183 +-52.050 -1.217 +-52.050 -1.233 +-52.083 -1.233 +-52.117 -1.217 +-52.117 -1.167 +-52.133 -1.150 +-52.200 -1.133 +-52.333 -1.117 +-52.350 -1.083 +-52.433 -1.050 +-52.417 -1.033 +-52.417 -.967 +-52.433 -.950 +-52.433 -.917 +-52.400 -.900 +-52.400 -.883 +-52.417 -.850 +-52.450 -.817 +-52.483 -.850 +-52.550 -.850 +-52.550 -.833 +-52.517 -.817 +-52.533 -.783 +-52.500 -.733 +-52.517 -.683 +-52.517 -.667 +-52.533 -.600 +-52.533 -.583 +-52.550 -.567 +-52.633 -.583 +-52.650 -.583 +-52.667 -.567 +-52.683 -.533 +-52.700 -.483 +-52.700 -.467 +-52.700 -.450 +-52.683 -.417 +-52.700 -.383 +-52.683 -.350 +-52.683 -.317 +-52.717 -.283 +-52.767 -.267 +-52.783 -.217 +-52.817 -.200 +-52.833 -.183 +-52.850 -.150 +-52.883 -.150 +-52.900 -.167 +-52.933 -.150 +-52.950 -.117 +-52.967 -.050 +-52.967 .000 +-52.983 .033 +-53.000 .050 +-53.017 .083 +-53.033 .117 +-53.050 .167 +-53.067 .167 +-53.083 .183 +-53.100 .217 +-53.100 .250 +-53.100 .267 +-53.133 .300 +-53.150 .333 +-53.183 .383 +-53.167 .417 +-53.167 .450 +-53.183 .467 +-53.167 .483 +-53.167 .500 +-53.183 .517 +-53.150 .550 +-53.167 .567 +-53.150 .600 +-53.117 .650 +-53.117 .683 +-53.150 .700 +-53.167 .733 +-53.183 .750 +-53.233 .783 +-53.267 .817 +-53.300 .850 +-53.350 .883 +-53.400 .917 +-53.417 .950 +-53.417 .967 +-53.417 .983 +-53.433 1.000 +-53.433 1.050 +-53.450 1.067 +-53.467 1.133 +-53.450 1.150 +-53.400 1.150 +-53.400 1.183 +-53.417 1.200 +-53.417 1.217 +-53.433 1.250 +-53.450 1.233 +-53.483 1.233 +-53.517 1.217 +-53.550 1.217 +-53.533 1.267 +-53.567 1.300 +-53.550 1.317 +-53.533 1.333 +-53.567 1.350 +-53.583 1.333 +-53.600 1.350 +-53.633 1.350 +-53.650 1.333 +-53.667 1.350 +-53.633 1.383 +-53.650 1.400 +-53.667 1.383 +-53.683 1.367 +-53.717 1.367 +-53.700 1.417 +-53.733 1.433 +-53.717 1.417 +-53.717 1.400 +-53.750 1.383 +-53.767 1.400 +-53.783 1.400 +-53.800 1.417 +-53.817 1.417 +-53.817 1.400 +-53.817 1.383 +-53.850 1.400 +-53.883 1.400 +-53.883 1.433 +-53.917 1.450 +-53.917 1.433 +-53.933 1.433 +-53.917 1.467 +-53.983 1.467 +-53.983 1.500 +-54.000 1.500 +-54.033 1.533 +-54.033 1.517 +-54.083 1.500 +-54.100 1.550 +-54.117 1.567 +-54.117 1.600 +-54.133 1.583 +-54.133 1.617 +-54.167 1.650 +-54.183 1.667 +-54.200 1.633 +-54.233 1.683 +-54.283 1.700 +-54.300 1.733 +-54.333 1.750 +-54.367 1.750 +-54.367 1.767 +-54.383 1.767 +-54.400 1.750 +-54.433 1.767 +-54.500 1.750 +-54.533 1.767 +-54.617 1.783 +-54.683 1.767 +-54.750 1.783 +-54.750 1.817 +-54.750 1.833 +-54.783 1.933 +-54.767 1.983 +-54.817 2.033 +-54.817 2.067 +-54.800 2.150 +-54.767 2.183 +-54.783 2.217 +-54.817 2.267 +-54.800 2.317 +-54.867 2.400 +-54.867 2.433 +999 999 +-50.400 2.133 +-50.383 2.117 +-50.367 2.100 +-50.350 2.033 +-50.333 2.017 +-50.300 1.950 +-50.333 1.917 +-50.383 1.867 +-50.433 1.867 +-50.450 1.883 +-50.467 1.933 +-50.483 1.967 +-50.500 1.983 +-50.517 2.000 +-50.517 2.117 +-50.567 2.150 +-50.550 2.167 +-50.517 2.200 +-50.450 2.200 +-50.433 2.183 +-50.400 2.150 +-50.417 2.117 +-50.400 2.133 +999 999 +-49.950 1.033 +-49.950 1.000 +-49.950 .983 +-49.967 .967 +-50.000 .933 +-50.033 .917 +-50.050 .917 +-50.117 .933 +-50.083 .983 +-50.050 1.033 +-50.033 1.050 +-50.000 1.033 +-49.967 1.050 +-49.950 1.033 +999 999 +-50.017 .850 +-50.050 .833 +-50.067 .783 +-50.117 .750 +-50.167 .750 +-50.217 .733 +-50.267 .733 +-50.283 .767 +-50.283 .800 +-50.250 .850 +-50.200 .883 +-50.100 .867 +-50.067 .883 +-50.050 .867 +-50.033 .900 +-50.017 .900 +-50.017 .883 +-50.017 .850 +999 999 +-50.083 .633 +-50.050 .600 +-50.033 .583 +-50.050 .517 +-50.083 .533 +-50.117 .450 +-50.133 .417 +-50.167 .400 +-50.183 .383 +-50.200 .383 +-50.217 .367 +-50.233 .350 +-50.267 .333 +-50.300 .350 +-50.300 .450 +-50.300 .517 +-50.267 .600 +-50.233 .600 +-50.200 .600 +-50.167 .583 +-50.133 .583 +-50.100 .633 +-50.083 .633 +999 999 +-50.383 .600 +-50.367 .617 +-50.350 .617 +-50.333 .567 +-50.317 .550 +-50.333 .433 +-50.317 .367 +-50.300 .317 +-50.283 .300 +-50.300 .283 +-50.333 .283 +-50.333 .250 +-50.400 .250 +-50.433 .217 +-50.417 .167 +-50.433 .167 +-50.500 .200 +-50.533 .217 +-50.533 .267 +-50.483 .283 +-50.483 .300 +-50.450 .383 +-50.433 .450 +-50.417 .533 +-50.383 .600 +999 999 +-50.067 .350 +-50.067 .333 +-50.150 .267 +-50.217 .250 +-50.250 .250 +-50.250 .267 +-50.217 .283 +-50.150 .350 +-50.067 .350 +999 999 +-50.533 .000 +-50.583 .033 +-50.650 .100 +-50.650 .133 +-50.633 .167 +-50.617 .183 +-50.583 .200 +-50.517 .183 +-50.450 .150 +-50.450 .117 +-50.433 .050 +-50.450 .000 +-50.483 -.033 +-50.500 -.033 +-50.517 -.033 +-50.533 .000 +999 999 +-50.033 .000 +-50.050 .017 +-50.100 .033 +-50.150 .033 +-50.200 .050 +-50.250 .050 +-50.283 .033 +-50.350 .033 +-50.383 .100 +-50.400 .117 +-50.400 .150 +-50.383 .167 +-50.400 .200 +-50.400 .233 +-50.367 .217 +-50.300 .217 +-50.283 .233 +-50.267 .233 +-50.217 .217 +-50.133 .217 +-50.117 .250 +-50.050 .300 +-50.017 .300 +-50.000 .317 +-49.967 .333 +-49.917 .317 +-49.850 .333 +-49.783 .333 +-49.767 .350 +-49.750 .317 +-49.733 .350 +-49.700 .367 +-49.650 .350 +-49.633 .333 +-49.600 .283 +-49.617 .267 +-49.633 .267 +-49.633 .233 +-49.667 .217 +-49.733 .183 +-49.800 .117 +-49.833 .067 +-49.817 .033 +-49.900 .000 +-50.000 -.050 +-50.017 -.050 +-50.033 .000 +999 999 +-49.733 .000 +-49.717 .017 +-49.700 .033 +-49.633 .067 +-49.583 .083 +-49.500 .083 +-49.450 .067 +-49.383 .033 +-49.400 .017 +-49.367 .000 +-49.400 -.050 +-49.433 -.083 +-49.450 -.083 +-49.450 -.100 +-49.567 -.133 +-49.717 -.150 +-49.850 -.100 +-49.733 .000 +999 999 +-50.783 .000 +-50.850 -.033 +-50.917 -.033 +-50.983 -.033 +-50.950 .000 +-50.917 .017 +-50.833 .033 +-50.783 .050 +-50.750 .050 +-50.717 .033 +-50.717 .017 +-50.750 .017 +-50.783 .000 +999 999 +-51.417 -.433 +-51.367 -.400 +-51.317 -.367 +-51.300 -.317 +-51.283 -.250 +-51.217 -.150 +-51.183 -.150 +-51.133 -.167 +-51.133 -.217 +-51.167 -.250 +-51.167 -.300 +-51.267 -.400 +-51.333 -.433 +-51.383 -.467 +-51.417 -.467 +-51.417 -.433 +999 999 +-51.467 -.567 +-51.417 -.533 +-51.350 -.533 +-51.367 -.550 +-51.367 -.600 +-51.367 -.617 +-51.383 -.633 +-51.367 -.633 +-51.333 -.650 +-51.317 -.667 +-51.300 -.683 +-51.283 -.683 +-51.267 -.667 +-51.250 -.683 +-51.233 -.700 +-51.200 -.700 +-51.183 -.700 +-51.217 -.783 +-51.233 -.833 +-51.267 -1.000 +-51.283 -1.033 +-51.300 -1.000 +-51.317 -.983 +-51.333 -1.017 +-51.383 -1.083 +-51.433 -1.183 +-51.650 -1.350 +-51.783 -1.467 +-51.833 -1.467 +-51.900 -1.500 +-51.917 -1.483 +-51.950 -1.433 +-51.883 -1.333 +-51.867 -1.250 +-51.800 -1.200 +-51.767 -1.167 +-51.733 -1.150 +-51.683 -1.133 +-51.667 -1.100 +-51.667 -1.050 +-51.683 -1.017 +-51.683 -.917 +-51.667 -.867 +-51.633 -.800 +-51.600 -.683 +-51.467 -.567 +-51.350 -.533 +-51.333 -.517 +-51.283 -.517 +-51.267 -.533 +-51.233 -.533 +-51.217 -.567 +-51.217 -.600 +-51.183 -.600 +-51.167 -.617 +-51.167 -.667 +-51.183 -.683 +-51.183 -.700 +999 999 +-51.200 -.867 +-51.183 -.867 +-51.217 -1.067 +-51.233 -1.117 +-51.267 -1.183 +-51.333 -1.200 +-51.400 -1.217 +-51.417 -1.217 +-51.400 -1.200 +-51.367 -1.117 +-51.250 -1.017 +-51.233 -.933 +-51.217 -.900 +-51.200 -.867 +999 999 +-51.150 -.700 +-51.133 -.733 +-51.150 -.817 +-51.183 -.850 +-51.183 -.800 +-51.167 -.767 +-51.167 -.717 +-51.150 -.700 +999 999 +-51.067 -.650 +-51.100 -.650 +-51.117 -.633 +-51.200 -.583 +-51.217 -.533 +-51.267 -.500 +-51.233 -.467 +-51.150 -.417 +-51.050 -.267 +-51.033 -.250 +-50.983 -.300 +-50.967 -.283 +-50.917 -.267 +-50.867 -.317 +-50.767 -.217 +-50.767 -.317 +-50.783 -.333 +-50.833 -.367 +-50.817 -.383 +-50.783 -.383 +-50.767 -.433 +-50.817 -.483 +-50.883 -.517 +-51.017 -.583 +-51.067 -.650 +999 999 +-50.683 .000 +-50.667 -.033 +-50.633 -.100 +-50.717 -.183 +-50.750 -.183 +-50.800 -.217 +-50.833 -.233 +-50.883 -.283 +-50.917 -.250 +-50.950 -.267 +-50.983 -.250 +-51.000 -.233 +-51.017 -.233 +-51.050 -.233 +-51.033 -.183 +-50.983 -.067 +-50.967 -.067 +-50.867 -.050 +-50.833 -.033 +-50.750 .000 +999 999 +-48.333 -1.100 +-48.317 -1.117 +-48.333 -1.150 +-48.333 -1.167 +-48.367 -1.217 +-48.400 -1.217 +-48.433 -1.183 +-48.467 -1.167 +-48.467 -1.133 +-48.417 -1.083 +-48.417 -1.067 +-48.383 -1.067 +-48.367 -1.067 +-48.350 -1.067 +-48.333 -1.100 +999 999 +-51.150 -1.167 +-51.200 -1.083 +-51.167 -.983 +-51.167 -.900 +-51.133 -.850 +-51.133 -.817 +-51.133 -.767 +-51.100 -.717 +-51.067 -.700 +-51.050 -.667 +-51.033 -.667 +-51.017 -.667 +-50.983 -.617 +-50.950 -.583 +-50.867 -.567 +-50.833 -.550 +-50.817 -.567 +-50.817 -.617 +-50.817 -.667 +-50.817 -.700 +-50.850 -.783 +-50.833 -.817 +-50.817 -.833 +-50.817 -.867 +-50.833 -.917 +-50.833 -1.000 +-50.817 -1.050 +-50.750 -1.100 +999 999 +-50.750 -1.100 +-50.733 -1.100 +-50.783 -1.050 +-50.800 -1.000 +-50.800 -.917 +-50.783 -.800 +-50.783 -.767 +-50.783 -.700 +-50.783 -.633 +-50.733 -.550 +-50.683 -.650 +-50.633 -.633 +-50.683 -.617 +-50.683 -.600 +-50.700 -.567 +-50.733 -.517 +-50.733 -.483 +-50.717 -.433 +-50.700 -.367 +-50.667 -.300 +-50.650 -.250 +-50.567 -.200 +-50.533 -.183 +-50.517 -.167 +-50.467 -.150 +-50.400 -.167 +-50.383 -.133 +-50.383 -.100 +-50.367 -.083 +-50.317 -.100 +-50.267 -.117 +-50.267 -.117 +-50.250 -.133 +-50.167 -.133 +-50.133 -.133 +-50.050 -.150 +-49.950 -.167 +-49.850 -.200 +-49.817 -.183 +-49.767 -.217 +-49.717 -.233 +-49.667 -.250 +-49.617 -.250 +-49.550 -.233 +-49.483 -.233 +-49.433 -.217 +-49.417 -.200 +-49.367 -.183 +-49.350 -.167 +-49.283 -.150 +-49.250 -.167 +-49.217 -.150 +-49.200 -.133 +-49.183 -.150 +-49.133 -.167 +-49.017 -.167 +-49.000 -.183 +-49.000 -.183 +-48.950 -.217 +-48.917 -.233 +-48.833 -.217 +-48.783 -.217 +-48.767 -.250 +-48.700 -.250 +-48.650 -.233 +-48.500 -.233 +-48.467 -.233 +-48.433 -.250 +-48.417 -.250 +-48.383 -.300 +-48.383 -.367 +-48.433 -.400 +-48.450 -.433 +-48.483 -.533 +-48.483 -.583 +-48.483 -.700 +-48.517 -.767 +-48.517 -.783 +-48.517 -.850 +-48.517 -.883 +-48.533 -.917 +-48.583 -.933 +-48.617 -.950 +-48.617 -.950 +-48.633 -.983 +-48.633 -1.017 +-48.617 -1.050 +-48.633 -1.067 +-48.700 -1.133 +-48.733 -1.167 +-48.800 -1.217 +-48.750 -1.200 +-48.750 -1.233 +-48.783 -1.267 +-48.800 -1.333 +-48.817 -1.383 +-48.817 -1.433 +-48.867 -1.450 +-48.900 -1.500 +-48.933 -1.500 +-49.000 -1.517 +-49.067 -1.550 +-49.083 -1.517 +-49.100 -1.533 +-49.083 -1.550 +-49.100 -1.550 +-49.117 -1.567 +-49.183 -1.567 +-49.183 -1.600 +-49.167 -1.617 +-49.350 -1.617 +-49.383 -1.650 +-49.417 -1.650 +-49.450 -1.633 +-49.483 -1.633 +-49.517 -1.650 +-49.550 -1.683 +-49.550 -1.700 +-49.567 -1.717 +-49.650 -1.733 +-49.683 -1.783 +-49.717 -1.783 +-49.733 -1.700 +-49.750 -1.783 +-49.817 -1.817 +-49.867 -1.800 +-49.950 -1.767 +-50.033 -1.750 +-50.050 -1.733 +-50.100 -1.733 +-50.183 -1.783 +-50.217 -1.800 +-50.250 -1.767 +-50.300 -1.783 +-50.350 -1.783 +-50.400 -1.767 +-50.433 -1.767 +-50.433 -1.767 +-50.500 -1.750 +-50.550 -1.733 +-50.600 -1.667 +-50.717 -1.583 +-50.750 -1.100 +999 999 +-49.600 -1.783 +-49.583 -1.800 +-49.550 -1.783 +-49.550 -1.817 +-49.567 -1.833 +-49.617 -1.833 +-49.633 -1.817 +-49.667 -1.817 +-49.600 -1.783 +999 999 +-48.583 -1.317 +-48.550 -1.317 +-48.550 -1.333 +-48.550 -1.367 +-48.533 -1.383 +-48.533 -1.417 +-48.533 -1.500 +-48.517 -1.533 +-48.533 -1.533 +-48.567 -1.500 +-48.583 -1.450 +-48.600 -1.400 +-48.600 -1.383 +-48.600 -1.350 +-48.583 -1.317 +999 999 +-52.100 -1.500 +-52.083 -1.500 +-52.067 -1.483 +-52.017 -1.450 +-51.983 -1.450 +-51.950 -1.483 +-52.000 -1.467 +-52.017 -1.467 +-52.067 -1.517 +-52.100 -1.500 +999 999 +-52.233 -1.517 +-52.217 -1.500 +-52.117 -1.500 +-52.067 -1.517 +-52.000 -1.483 +-51.983 -1.483 +-51.950 -1.500 +-51.900 -1.517 +-51.933 -1.550 +-52.050 -1.600 +-52.067 -1.550 +-52.150 -1.567 +-52.200 -1.583 +-52.233 -1.550 +-52.233 -1.517 +999 999 +-52.200 -1.367 +-52.150 -1.417 +-52.333 -1.500 +-52.400 -1.533 +-52.467 -1.533 +-52.533 -1.550 +-52.500 -1.500 +-52.383 -1.433 +-52.300 -1.417 +-52.200 -1.367 +999 999 +-49.117 -1.767 +-49.017 -1.683 +-48.983 -1.600 +-48.900 -1.583 +-48.950 -1.717 +-48.933 -1.733 +-48.933 -1.750 +-48.967 -1.783 +-49.000 -1.783 +-49.017 -1.817 +-49.033 -1.833 +-49.067 -1.833 +-49.150 -1.850 +-49.117 -1.767 +999 999 +-45.633 -1.217 +-45.633 -1.117 +-45.617 -1.117 +-45.600 -1.133 +-45.617 -1.183 +-45.633 -1.217 +999 999 +-44.383 -2.750 +-44.383 -2.667 +-44.350 -2.633 +-44.367 -2.567 +-44.350 -2.533 +-44.317 -2.533 +-44.283 -2.567 +-44.300 -2.550 +-44.300 -2.483 +-44.183 -2.467 +-44.167 -2.450 +-44.133 -2.433 +-44.083 -2.417 +-44.033 -2.417 +-44.017 -2.467 +-44.050 -2.450 +-44.033 -2.517 +-44.033 -2.567 +-44.067 -2.567 +-44.100 -2.600 +-44.100 -2.633 +-44.150 -2.683 +-44.183 -2.700 +-44.217 -2.717 +-44.233 -2.733 +-44.250 -2.733 +-44.317 -2.767 +-44.383 -2.750 +999 999 +-44.600 -3.000 +-44.650 -2.967 +-44.600 -2.917 +-44.567 -2.917 +-44.567 -2.967 +-44.550 -2.917 +-44.567 -2.883 +-44.583 -2.833 +-44.567 -2.767 +-44.500 -2.733 +-44.467 -2.750 +-44.467 -2.883 +-44.483 -2.917 +-44.483 -2.967 +-44.550 -2.983 +-44.583 -3.033 +-44.600 -3.000 +999 999 +-34.850 -7.700 +-34.833 -7.700 +-34.833 -7.750 +-34.833 -7.817 +-34.883 -7.800 +-34.850 -7.700 +999 999 +-38.683 -12.883 +-38.633 -12.917 +-38.600 -12.967 +-38.650 -13.033 +-38.717 -13.067 +-38.783 -13.133 +-38.800 -13.133 +-38.783 -13.050 +-38.733 -13.017 +-38.667 -12.967 +-38.683 -12.950 +-38.667 -12.950 +-38.700 -12.900 +-38.683 -12.883 +999 999 +-38.817 -13.067 +-38.817 -13.117 +-38.867 -13.100 +-38.817 -13.067 +999 999 +-38.917 -13.367 +-38.900 -13.433 +-38.900 -13.467 +-38.917 -13.483 +-38.917 -13.500 +-38.933 -13.533 +-38.933 -13.583 +-38.983 -13.600 +-39.067 -13.567 +-39.083 -13.533 +-39.033 -13.467 +-39.033 -13.417 +-39.033 -13.400 +-38.967 -13.400 +-38.917 -13.367 +999 999 +-38.933 -13.583 +-38.917 -13.583 +-38.917 -13.633 +-38.900 -13.633 +-38.917 -13.667 +-38.967 -13.667 +-38.983 -13.600 +-38.983 -13.600 +999 999 +-45.450 -23.933 +-45.467 -23.917 +-45.467 -23.883 +-45.417 -23.850 +-45.383 -23.817 +-45.367 -23.733 +-45.317 -23.717 +-45.300 -23.717 +-45.283 -23.733 +-45.250 -23.750 +-45.250 -23.817 +-45.233 -23.833 +-45.267 -23.833 +-45.267 -23.867 +-45.217 -23.900 +-45.233 -23.917 +-45.217 -23.933 +-45.250 -23.950 +-45.267 -23.950 +-45.283 -23.917 +-45.300 -23.900 +-45.383 -23.933 +-45.450 -23.933 +999 999 +-44.350 -23.217 +-44.350 -23.183 +-44.383 -23.183 +-44.333 -23.150 +-44.300 -23.117 +-44.283 -23.133 +-44.233 -23.083 +-44.200 -23.100 +-44.200 -23.117 +-44.167 -23.117 +-44.150 -23.133 +-44.133 -23.117 +-44.150 -23.150 +-44.100 -23.167 +-44.133 -23.183 +-44.150 -23.167 +-44.183 -23.183 +-44.200 -23.200 +-44.267 -23.200 +-44.283 -23.183 +-44.300 -23.183 +-44.350 -23.217 +999 999 +-43.250 -22.817 +-43.250 -22.800 +-43.250 -22.800 +-43.233 -22.783 +-43.200 -22.800 +-43.167 -22.783 +-43.183 -22.800 +-43.183 -22.833 +-43.217 -22.817 +-43.217 -22.833 +-43.250 -22.833 +-43.250 -22.817 +999 999 +-42.883 -22.950 +-42.833 -22.917 +-42.833 -22.933 +-42.817 -22.933 +-42.783 -22.950 +-42.733 -22.950 +-42.717 -22.967 +-42.883 -22.950 +999 999 +-42.383 -22.917 +-42.367 -22.900 +-42.350 -22.883 +-42.250 -22.883 +-42.217 -22.850 +-42.200 -22.867 +-42.167 -22.867 +-42.117 -22.833 +-42.117 -22.883 +-42.083 -22.850 +-42.067 -22.867 +-42.067 -22.883 +-42.100 -22.883 +-42.100 -22.950 +-42.117 -22.950 +-42.183 -22.917 +-42.150 -22.950 +-42.200 -22.933 +-42.233 -22.900 +-42.250 -22.933 +-42.283 -22.917 +-42.300 -22.933 +-42.317 -22.900 +-42.350 -22.900 +-42.367 -22.917 +-42.383 -22.917 +999 999 +-48.533 -26.167 +-48.550 -26.167 +-48.583 -26.183 +-48.567 -26.200 +-48.567 -26.217 +-48.650 -26.233 +-48.650 -26.267 +-48.683 -26.267 +-48.700 -26.283 +-48.717 -26.300 +-48.717 -26.317 +-48.683 -26.333 +-48.633 -26.383 +-48.633 -26.417 +-48.617 -26.433 +-48.583 -26.433 +-48.567 -26.433 +-48.567 -26.417 +-48.600 -26.400 +-48.600 -26.383 +-48.550 -26.350 +-48.567 -26.317 +-48.533 -26.267 +-48.517 -26.250 +-48.500 -26.233 +-48.500 -26.217 +-48.517 -26.217 +-48.533 -26.200 +-48.533 -26.167 +999 999 +-48.417 -27.383 +-48.433 -27.367 +-48.450 -27.383 +-48.450 -27.417 +-48.483 -27.417 +-48.533 -27.433 +-48.550 -27.450 +-48.533 -27.450 +-48.550 -27.467 +-48.533 -27.483 +-48.533 -27.517 +-48.517 -27.533 +-48.533 -27.550 +-48.517 -27.567 +-48.550 -27.567 +-48.567 -27.583 +-48.550 -27.600 +-48.533 -27.600 +-48.533 -27.617 +-48.550 -27.633 +-48.567 -27.633 +-48.567 -27.650 +-48.583 -27.667 +-48.567 -27.683 +-48.567 -27.733 +-48.583 -27.750 +-48.567 -27.767 +-48.567 -27.800 +-48.567 -27.817 +-48.533 -27.783 +-48.533 -27.767 +-48.500 -27.783 +-48.483 -27.767 +-48.483 -27.750 +-48.500 -27.733 +-48.483 -27.700 +-48.500 -27.683 +-48.483 -27.667 +-48.467 -27.650 +-48.450 -27.617 +-48.433 -27.600 +-48.433 -27.583 +-48.400 -27.567 +-48.417 -27.550 +-48.417 -27.517 +-48.383 -27.483 +-48.367 -27.450 +-48.350 -27.433 +-48.367 -27.433 +-48.417 -27.433 +-48.417 -27.383 +999 999 +-52.233 -32.000 +-52.233 -31.983 +-52.217 -31.967 +-52.183 -31.967 +-52.150 -31.933 +-52.150 -31.950 +-52.117 -31.950 +-52.133 -31.917 +-52.183 -31.900 +-52.217 -31.867 +-52.217 -31.883 +-52.233 -31.867 +-52.250 -31.900 +-52.250 -31.833 +-52.217 -31.833 +-52.217 -31.800 +-52.233 -31.800 +-52.233 -31.783 +-52.217 -31.783 +-52.217 -31.733 +-52.133 -31.683 +-52.067 -31.667 +-52.033 -31.683 +-52.000 -31.600 +-52.017 -31.517 +-52.000 -31.433 +-51.967 -31.367 +-51.950 -31.333 +-51.917 -31.317 +-51.883 -31.317 +-51.850 -31.317 +-51.783 -31.267 +-51.750 -31.283 +-51.717 -31.267 +-51.617 -31.267 +-51.633 -31.250 +-51.650 -31.200 +-51.617 -31.133 +-51.600 -31.117 +-51.567 -31.117 +-51.450 -31.083 +-51.483 -31.033 +-51.500 -30.983 +-51.500 -30.917 +-51.500 -30.900 +-51.450 -30.867 +-51.383 -30.883 +-51.417 -30.800 +-51.417 -30.733 +-51.383 -30.633 +-51.367 -30.633 +-51.333 -30.633 +-51.317 -30.700 +-51.300 -30.733 +-51.300 -30.667 +-51.317 -30.583 +-51.267 -30.467 +-51.250 -30.433 +-51.217 -30.417 +-51.200 -30.400 +-51.167 -30.417 +-51.150 -30.433 +-51.133 -30.400 +-51.100 -30.367 +-51.133 -30.367 +-51.183 -30.383 +-51.200 -30.383 +-51.217 -30.350 +-51.217 -30.300 +-51.250 -30.317 +-51.267 -30.300 +-51.300 -30.300 +-51.300 -30.233 +-51.333 -30.233 +-51.317 -30.200 +-51.333 -30.183 +-51.317 -30.117 +-51.333 -30.100 +-51.317 -30.083 +-51.333 -30.067 +-51.317 -30.050 +-51.317 -30.017 +-51.300 -30.000 +-51.267 -30.017 +-51.267 -30.050 +-51.233 -30.000 +-51.217 -29.983 +-51.217 -30.000 +-51.233 -30.050 +-51.250 -30.083 +-51.267 -30.100 +-51.267 -30.133 +-51.217 -30.150 +-51.233 -30.167 +-51.250 -30.183 +-51.250 -30.200 +-51.217 -30.200 +-51.183 -30.217 +-51.183 -30.233 +-51.167 -30.233 +-51.150 -30.250 +-51.133 -30.267 +-51.117 -30.250 +-51.100 -30.267 +-51.100 -30.233 +-51.067 -30.250 +-51.067 -30.267 +-51.033 -30.283 +-51.017 -30.317 +-51.033 -30.333 +-51.050 -30.350 +-51.050 -30.400 +-51.000 -30.400 +-51.000 -30.400 +-50.950 -30.433 +-50.917 -30.433 +-50.933 -30.417 +-50.933 -30.350 +-50.917 -30.333 +-50.850 -30.333 +-50.800 -30.333 +-50.800 -30.317 +-50.783 -30.283 +-50.683 -30.300 +-50.667 -30.283 +-50.700 -30.217 +-50.700 -30.200 +-50.683 -30.217 +-50.667 -30.200 +-50.617 -30.200 +-50.583 -30.250 +-50.550 -30.250 +-50.550 -30.367 +-50.567 -30.383 +-50.567 -30.450 +-50.583 -30.483 +-50.617 -30.483 +-50.650 -30.450 +-50.667 -30.433 +-50.633 -30.417 +-50.700 -30.350 +-50.733 -30.367 +-50.700 -30.417 +-50.683 -30.517 +-50.683 -30.600 +-50.700 -30.700 +-50.717 -30.767 +-50.750 -30.783 +-50.783 -30.817 +-50.850 -30.850 +-50.883 -30.883 +-50.933 -30.900 +-50.967 -30.900 +-50.950 -30.933 +-50.950 -30.933 +-50.950 -30.983 +-50.983 -31.033 +-51.033 -31.050 +-51.100 -31.100 +-51.133 -31.100 +-51.167 -31.067 +-51.183 -31.100 +-51.183 -31.150 +-51.167 -31.217 +-51.167 -31.333 +-51.200 -31.400 +-51.233 -31.433 +-51.283 -31.483 +-51.333 -31.517 +-51.367 -31.533 +-51.417 -31.517 +-51.417 -31.483 +-51.467 -31.533 +-51.450 -31.600 +-51.467 -31.583 +-51.483 -31.567 +-51.500 -31.583 +-51.567 -31.667 +-51.650 -31.750 +-51.700 -31.783 +-51.800 -31.783 +-51.833 -31.800 +-51.800 -31.800 +-51.800 -31.833 +-51.883 -31.867 +-52.017 -31.817 +-52.067 -31.817 +-52.100 -31.833 +-52.017 -31.917 +-52.000 -31.950 +-52.050 -31.983 +-52.050 -32.000 +999 999 +-52.200 -32.000 +-52.167 -31.967 +-52.117 -31.967 +-52.083 -31.983 +-52.100 -32.000 +999 999 +-53.133 -33.533 +-53.150 -33.517 +-53.150 -33.500 +-53.133 -33.500 +-53.133 -33.483 +-53.117 -33.467 +-53.100 -33.433 +-53.083 -33.417 +-53.067 -33.400 +-53.050 -33.383 +-53.050 -33.367 +-53.033 -33.350 +-53.017 -33.317 +-52.983 -33.300 +-52.933 -33.233 +-52.933 -33.217 +-52.900 -33.200 +-52.900 -33.183 +-52.850 -33.133 +-52.833 -33.117 +-52.817 -33.083 +-52.733 -33.000 +-52.733 -32.967 +-52.700 -32.950 +-52.700 -32.917 +-52.667 -32.883 +-52.633 -32.867 +-52.650 -32.850 +-52.633 -32.850 +-52.650 -32.833 +-52.633 -32.817 +-52.600 -32.817 +-52.617 -32.800 +-52.617 -32.783 +-52.600 -32.767 +-52.533 -32.767 +-52.533 -32.800 +-52.550 -32.817 +-52.550 -32.800 +-52.567 -32.800 +-52.567 -32.850 +-52.550 -32.867 +-52.583 -32.900 +-52.583 -32.883 +-52.600 -32.917 +-52.617 -32.917 +-52.617 -33.000 +-52.633 -33.050 +-52.650 -33.017 +-52.650 -33.067 +-52.700 -33.133 +-52.717 -33.133 +-52.717 -33.150 +-52.733 -33.150 +-52.750 -33.167 +-52.767 -33.200 +-52.783 -33.200 +-52.783 -33.217 +-52.800 -33.217 +-52.833 -33.267 +-52.867 -33.300 +-52.883 -33.317 +-52.967 -33.400 +-53.017 -33.433 +-53.100 -33.517 +-53.133 -33.533 +999 999 +-53.167 -32.650 +-53.150 -32.633 +-53.100 -32.633 +-53.067 -32.600 +-53.033 -32.600 +-53.000 -32.583 +-53.000 -32.567 +-52.983 -32.517 +-52.967 -32.483 +-52.917 -32.467 +-52.850 -32.450 +-52.783 -32.433 +-52.750 -32.400 +-52.733 -32.383 +-52.717 -32.367 +-52.750 -32.350 +-52.783 -32.367 +-52.800 -32.367 +-52.783 -32.350 +-52.817 -32.350 +-52.817 -32.333 +-52.800 -32.333 +-52.817 -32.317 +-52.800 -32.283 +-52.783 -32.267 +-52.783 -32.233 +-52.750 -32.217 +-52.733 -32.200 +-52.783 -32.200 +-52.733 -32.183 +-52.750 -32.167 +-52.700 -32.167 +-52.633 -32.150 +-52.633 -32.150 +-52.667 -32.217 +-52.700 -32.300 +-52.633 -32.417 +-52.583 -32.500 +-52.600 -32.550 +-52.633 -32.667 +-52.767 -32.867 +-52.817 -32.900 +-52.883 -32.900 +-53.000 -32.800 +-53.000 -32.750 +-53.033 -32.783 +-53.050 -32.817 +-53.083 -32.817 +-53.100 -32.800 +-53.117 -32.783 +-53.133 -32.783 +-53.167 -32.850 +-53.167 -32.967 +-53.217 -33.033 +-53.250 -33.067 +-53.267 -33.100 +-53.333 -33.083 +-53.333 -33.067 +-53.417 -33.167 +-53.450 -33.150 +-53.450 -33.200 +-53.483 -33.250 +-53.433 -33.433 +-53.450 -33.517 +-53.467 -33.517 +-53.483 -33.567 +-53.500 -33.550 +-53.517 -33.533 +-53.533 -33.550 +999 999 + -51.5400 4.3500 + -51.7100 4.0300 + -52.0300 3.7800 + -51.8800 3.9600 + -51.7500 4.0400 + -51.6800 4.2000 + -51.6900 4.3600 + -51.9200 4.5600 + -51.9100 4.3300 + -52.1100 4.2700 + -51.9800 4.3700 + -52.0200 4.5900 + -52.1900 4.8600 + -52.5900 5.1900 + -52.9800 5.4100 + -53.5900 5.6300 + -53.7700 5.7700 + -53.9600 5.7700 + -54.0200 5.7000 + -54.0500 5.5700 + -54.0500 5.7700 + -54.0800 5.8500 + -54.6900 5.9700 + -55.2200 6.0000 + -55.1400 5.8800 + -55.2400 5.9300 + -55.3900 6.0000 + -55.7100 6.0000 + -55.9600 5.8900 + -56.0000 5.8100 + -56.9600 5.9900 + -57.0800 5.9400 + -57.1900 5.5800 + -57.3600 5.3100 + -57.2300 5.6000 + -57.1600 5.9600 + -57.2100 6.1500 + -57.4300 6.3600 + -57.5200 6.3400 + -57.5500 6.2000 + -57.5500 6.2000 + -57.6600 6.5000 + -57.9800 6.7800 + -58.1500 6.8000 + -58.2900 6.8900 + -58.5300 6.7200 + -58.5600 6.3700 + -58.5500 6.0500 + -58.6200 6.3300 + -58.8100 6.2000 + -58.9000 6.0300 + -58.8500 6.2300 + -58.6400 6.4100 + -58.5900 6.7800 + -58.4500 7.0400 + -58.5000 7.3500 + -58.6400 7.5600 + -58.7800 7.6300 + -58.8400 7.7600 + -59.1600 8.0200 + -59.2600 8.1700 + -59.7700 8.4000 + -59.7700 8.4000 + -59.7500 8.3300 + -59.8500 8.4000 + -59.9100 8.5100 + -60.3300 8.6500 + -60.4700 8.5200 + -60.7200 8.6000 + -60.6300 8.6700 + -60.7800 8.9200 + -60.7700 9.3700 + -60.9700 9.5500 + -61.2700 9.6600 + -61.6400 9.9100 + -61.6100 9.8000 + -61.8600 9.8500 + -62.4200 9.9600 +999 999 + -61.9200 10.0600 + -61.1600 10.0800 + -61.0000 10.1600 + -60.9800 10.3800 + -61.0300 10.6900 + -60.8800 10.8300 + -61.3600 10.8300 + -61.4900 10.7600 + -61.6700 10.7400 + -61.4700 10.6100 + -61.4700 10.2700 + -61.6200 10.2700 + -61.6700 10.2000 + -61.9100 10.1000 + -61.9200 10.0600 +999 999 + -62.4200 9.9600 + -62.7900 10.5500 + -62.3300 10.5500 + -62.1700 10.6300 + -61.9300 10.6300 + -61.8500 10.7400 + -62.7000 10.7500 + -63.3100 10.6900 + -63.6000 10.6400 + -63.8200 10.5700 +999 999 + -64.2900 10.6600 + -64.2400 10.5300 + -63.8200 10.5700 + -63.6400 10.4800 + -64.2300 10.4600 + -64.6800 10.2400 + -64.7100 10.1400 + -65.1000 10.1100 + -65.7800 10.2700 + -66.1400 10.5400 + -66.0400 10.6000 + -66.3000 10.6800 + -67.0700 10.6500 + -68.0300 10.5000 + -68.2900 10.6100 + -68.3800 10.8400 + -68.2600 10.8700 + -68.5400 11.2700 + -68.9400 11.4900 + -69.3500 11.5600 + -69.6700 11.4900 + -69.8200 11.7200 + -69.8600 12.0600 + -70.0100 12.2100 + -70.1500 12.1100 + -70.2700 12.1300 + -70.3300 11.8600 + -70.2500 11.6500 + -69.8900 11.6900 + -69.7900 11.4700 + -70.1400 11.5700 + -70.1600 11.4200 + -70.5500 11.2400 + -71.4500 10.9700 + -71.3700 10.9000 + -71.4800 10.8000 + -71.6300 10.8000 + -71.4700 10.4000 + -71.1900 10.0100 + -71.0000 9.7600 + -71.0300 9.3800 + -71.2100 9.1900 + -71.6400 9.0300 + -71.8200 9.1300 + -71.7700 9.3300 + -72.0400 9.5700 + -72.0200 9.6500 + -72.1400 9.8200 + -72.0100 10.0700 + -71.8600 10.2500 + -71.6900 10.4300 + -71.6300 10.5900 + -71.7700 11.0000 + -71.6200 10.9700 + -71.9000 11.1900 + -71.9900 11.5700 + -71.9400 11.6200 + -71.4500 11.7100 + -71.3400 11.7900 + -71.2100 11.9800 + -71.1100 12.0200 + -71.1000 12.1000 + -71.2400 12.3200 + -71.5400 12.4300 + -71.7200 12.4400 + -71.8200 12.3000 + -71.8500 12.3600 + -71.9600 12.2900 + -71.9000 12.2600 + -71.8800 12.1900 + -71.9600 12.1500 + -72.0100 12.2100 + -71.9800 12.2500 + -72.1600 12.2300 + -72.1300 12.1300 + -72.2300 11.8900 + -72.4900 11.7600 + -72.8000 11.6700 + -73.1000 11.4000 + -73.3200 11.2600 + -73.8500 11.3000 + -74.0000 11.3700 + -74.1700 11.3200 + -74.2400 11.2400 + -74.2300 10.9700 + -74.3400 10.8000 + -74.4500 10.7000 + -74.5400 10.7800 + -74.4300 10.9300 + -74.4200 11.0100 + -74.7500 11.0700 + -74.8700 11.0600 + -75.2000 10.8100 + -75.2700 10.7100 + -75.3400 10.6900 + -75.4700 10.5700 + -75.5500 10.2500 + -75.6000 9.8000 + -75.6900 9.7300 + -75.5700 9.6900 + -75.6300 9.4100 + -75.8300 9.3500 + -75.8400 9.4200 + -75.9600 9.4200 + -76.1600 9.2100 + -76.2600 8.9900 + -76.6600 8.6600 + -76.8600 8.6200 + -76.9100 8.5300 + -76.8000 8.4800 + -76.7300 8.3300 + -76.6900 8.0500 + -76.7400 7.9100 + -76.8800 7.9300 + -76.9100 8.1900 + -77.0700 8.4200 + -77.2900 8.6000 +999 999 + -77.8800 7.1000 + -77.6400 6.9800 + -77.6500 6.8600 + -77.6100 6.8800 + -77.5000 6.6600 + -77.4200 6.7000 + -77.3100 6.6000 + -77.3800 6.2500 + -77.4700 6.3100 + -77.4000 6.0500 + -77.3200 6.0200 + -77.2200 5.8100 + -77.3300 5.6300 + -77.4700 5.6300 + -77.5100 5.5000 + -77.3900 5.4700 + -77.3400 4.8100 + -77.3200 4.4500 + -77.4400 4.3300 + -77.5300 4.2700 + -77.3300 3.9700 + -77.2800 3.8900 + -77.1000 3.9000 + -77.1700 3.7700 + -77.1600 3.6900 + -77.5400 3.2800 + -77.6800 3.0000 + -77.8500 2.7500 + -78.0800 2.6600 + -78.0800 2.5900 + -78.1600 2.5800 + -78.1900 2.7100 + -78.4300 2.6600 + -78.6400 2.4200 + -78.7400 2.2200 + -78.7000 2.0200 + -78.5700 1.9300 + -78.4700 1.8200 + -78.5200 1.7700 + -78.6300 1.8000 + -78.7000 1.8900 + -78.9100 1.8300 + -79.0800 1.6000 + -78.9700 1.5700 + -78.8500 1.4900 + -79.0700 1.2100 + -79.1500 1.2400 + -79.1900 1.1400 + -79.6700 1.0300 + -80.0000 0.8500 + -80.0800 0.8900 + -80.1400 0.8400 + -80.1500 0.7100 + -80.0600 0.6800 + -80.0300 0.6100 + -80.0800 0.4600 + -79.9300 0.4100 + -79.8700 0.3500 + -79.9500 0.2700 + -79.9800 0.3900 + -80.0500 0.4100 + -80.0800 0.1300 + -80.3000 -0.1400 + -80.5100 -0.3500 + -80.3500 -0.5400 + -80.4500 -0.5400 + -80.5200 -0.7100 + -80.6100 -0.8400 + -80.7900 -0.8400 + -80.9100 -0.9200 + -80.8800 -1.0800 + -80.7800 -1.1700 + -80.7300 -1.3000 + -80.8500 -1.5000 + -80.7400 -1.7400 + -80.7600 -1.9200 + -80.7200 -1.9700 + -80.7500 -2.0500 + -80.8800 -2.1400 + -81.0000 -2.1100 + -80.7000 -2.3800 + -80.4300 -2.5900 + -80.2400 -2.7200 + -80.2100 -2.5600 + -80.0800 -2.4800 + -79.9200 -2.2500 + -79.8400 -2.1400 + -79.8100 -2.4400 + -79.7200 -2.4500 + -79.7100 -2.5800 +999 999 + -79.9300 -2.6900 + -80.0000 -2.6200 + -80.1300 -2.6600 + -80.2700 -2.9500 + -80.1200 -2.9600 + -80.1500 -2.8700 + -80.1500 -2.7800 + -80.0600 -2.7800 + -79.9800 -2.7600 + -79.9300 -2.6900 +999 999 + -79.7100 -2.5800 + -79.7800 -2.6700 + -79.8200 -2.8900 + -79.9300 -3.1400 + -80.0700 -3.3900 + -80.2900 -3.3300 + -80.5200 -3.4700 + -80.5200 -3.4700 + -80.7800 -3.6900 + -81.2700 -4.2100 + -81.2600 -4.3100 + -81.3400 -4.4100 + -81.2900 -4.4700 + -81.3500 -4.5900 + -81.0700 -5.0200 + -81.1700 -5.0000 + -81.2200 -5.1600 + -80.9600 -5.4100 + -80.8700 -5.6000 + -80.8700 -5.7400 + -80.9600 -5.8300 + -81.0900 -5.7700 + -81.1700 -5.8700 + -81.1800 -6.0700 + -80.4600 -6.4000 + -79.9700 -6.7200 + -79.9500 -6.8500 + -79.5800 -7.3000 + -79.3100 -7.8600 + -78.7600 -8.5700 + -78.7500 -8.7500 + -78.2700 -9.7900 + -77.6900 -10.7900 + -77.5500 -11.1800 + -77.6700 -11.1900 + -77.6300 -11.3000 + -77.6300 -11.2000 + -77.6000 -11.3300 + -77.2600 -11.6300 + -77.1800 -12.1100 + -76.9300 -12.3000 + -76.8500 -12.2800 + -76.7900 -12.4200 + -76.8300 -12.4800 + -76.5400 -13.0000 + -76.2500 -13.3300 + -76.2300 -13.5900 + -76.3200 -13.8000 + -76.3600 -13.7600 + -76.4200 -13.7700 + -76.4600 -13.8300 + -76.3600 -13.8800 + -76.3300 -13.9700 + -76.3200 -14.1200 + -76.2700 -14.0800 + -75.9900 -14.4400 + -75.9700 -14.6400 + -75.5700 -14.8400 + -75.3600 -15.0900 + -75.2200 -15.1800 + -75.1600 -15.3400 + -74.5100 -15.6700 + -74.4400 -15.7600 + -74.1100 -15.8600 + -73.6200 -16.2000 + -73.2500 -16.3300 + -72.8400 -16.5900 + -72.6900 -16.6200 + -72.4600 -16.6700 + -72.0600 -16.9900 + -71.7100 -17.1500 + -71.4400 -17.3200 + -71.3200 -17.6600 + -70.3900 -18.3300 + -70.3200 -18.4400 + -70.3800 -18.5500 + -70.3800 -18.8700 + -70.3000 -19.2600 + -70.1300 -19.8900 + -70.2100 -20.0700 + -70.1800 -20.2800 + -70.2400 -20.3400 + -70.2600 -20.8200 + -70.1800 -20.9300 + -70.1200 -21.4700 + -70.3000 -22.1300 + -70.3700 -22.8200 + -70.3400 -22.9200 + -70.4200 -23.0800 + -70.5200 -23.0200 + -70.6100 -23.0700 + -70.6900 -23.5000 + -70.6000 -23.5200 + -70.5300 -23.4500 + -70.4200 -23.5700 + -70.5700 -23.8500 + -70.6200 -24.5700 + -70.5300 -25.0300 + -70.5700 -25.1400 + -70.5200 -25.3200 + -70.6300 -25.5400 + -70.7300 -25.5500 + -70.7100 -25.6500 + -70.8000 -25.8200 + -70.7800 -26.0100 + -70.7400 -26.0400 + -70.7600 -26.4200 + -70.9100 -26.8400 + -70.9400 -27.1800 + -71.0100 -27.1300 + -71.0200 -27.3600 + -70.9600 -27.5300 + -71.0200 -27.6700 + -71.1100 -27.6800 + -71.2500 -28.1500 + -71.2600 -28.4900 + -71.5700 -28.9500 + -71.5100 -29.0700 + -71.5300 -29.2500 + -71.3500 -29.3500 + -71.3500 -29.7900 + -71.3000 -29.9000 + -71.4400 -29.9700 + -71.4200 -30.2000 + -71.6500 -30.3000 + -71.7000 -30.2300 + -71.7600 -30.6700 + -71.7200 -31.0200 + -71.6000 -31.8200 + -71.6300 -32.2500 + -71.5100 -32.5300 + -71.5200 -32.7200 + -71.6000 -32.8600 + -71.7900 -33.1500 + -71.7400 -33.4600 + -71.6400 -33.5500 + -71.6800 -33.7500 + -71.8000 -33.7900 + -72.0400 -34.1800 + -72.0100 -34.4000 + -72.1100 -34.6000 + -72.2700 -34.8900 + -72.2700 -35.0600 + -72.9800 -35.3400 + -72.5300 -35.5000 + -72.7200 -35.6300 + -72.6500 -35.7700 + -72.8400 -36.1200 + -72.9400 -36.5500 + -73.0200 -36.5600 + -73.0200 -36.7700 + -73.0600 -36.7700 + -73.1100 -36.6400 + -73.2100 -36.8000 + -73.1300 -36.8700 + -73.2400 -37.1300 + -73.2000 -37.2000 + -73.2600 -37.2500 + -73.5400 -37.2500 + -73.5500 -37.2000 + -73.6300 -37.1900 + -73.6900 -37.4200 + -73.6200 -37.4500 + -73.6000 -37.5300 + -73.7000 -37.6800 + -73.6400 -37.8700 + -73.4700 -38.1100 + -73.5100 -38.4300 + -73.3100 -39.2200 + -73.3000 -39.3900 + -73.3700 -39.5900 + -73.4500 -39.6700 + -73.4500 -39.8200 + -73.3400 -39.8300 + -73.3500 -39.8800 + -73.5200 -39.8400 + -73.7400 -39.9700 + -73.7000 -40.0500 + -73.7400 -40.5300 + -73.9400 -40.8600 + -73.8600 -40.8900 + -73.9500 -40.9500 + -73.9100 -41.2300 + -73.7800 -41.5700 + -73.6000 -41.5900 + -73.4000 -41.5300 + -73.5600 -41.6300 + -73.6800 -41.6300 + -73.7500 -41.7200 +999 999 + -73.7900 -41.8500 + -73.8900 -41.8200 + -73.9100 -41.7400 + -74.0300 -41.7700 + -74.1000 -41.8300 + -74.1000 -42.1000 + -74.2000 -42.2200 + -74.2400 -42.5000 + -74.1500 -42.6500 + -74.3000 -43.0300 + -74.4000 -43.0900 + -74.4400 -43.2100 + -74.4300 -43.3000 + -73.8900 -43.4200 + -73.7200 -43.3700 + -73.7100 -43.2500 + -73.7700 -43.1600 + -73.5400 -43.1000 + -73.5400 -43.0000 + -73.3500 -43.0300 + -73.6700 -42.8900 + -73.5400 -42.8800 + -73.4800 -42.8200 + -73.6200 -42.7200 + -73.7300 -42.6400 + -73.6200 -42.6600 + -73.5300 -42.6600 + -73.5900 -42.6000 + -73.7200 -42.5800 + -73.7400 -42.5500 + -73.6100 -42.5100 + -73.6700 -42.4700 + -73.5600 -42.4700 + -73.4500 -42.5700 + -73.4400 -42.4800 + -73.5300 -42.4200 + -73.4500 -42.0600 + -73.5600 -41.9400 + -73.4800 -41.8600 + -73.6600 -41.7900 + -73.8000 -41.8500 +999 999 + -73.7500 -41.7200 + -73.3800 -41.8100 + -73.2400 -41.7500 + -73.1600 -41.8200 + -73.0700 -41.7500 + -73.0800 -41.6100 + -73.0000 -41.5100 + -72.8400 -41.5000 + -72.7200 -41.6200 + -72.6600 -41.7000 + -72.4200 -41.6400 + -72.3100 -41.4800 + -72.3400 -41.6500 + -72.5000 -41.7300 + -72.6600 -41.7400 + -72.8500 -41.9100 + -72.7800 -42.0100 + -72.6200 -42.0400 + -72.5500 -42.0400 + -72.4600 -41.9500 + -72.5000 -42.1200 + -72.4400 -42.2800 + -72.4900 -42.3300 + -72.5000 -42.2600 + -72.5700 -42.2200 + -72.7500 -42.2400 + -72.8100 -42.3100 + -72.6800 -42.4500 + -72.5100 -42.5700 + -72.5300 -42.6000 + -72.6500 -42.5300 + -72.7900 -42.5000 + -72.8600 -42.7900 + -72.8200 -42.8700 + -72.7200 -42.9200 + -72.7500 -43.0600 + -72.8100 -43.0100 + -72.9200 -43.1300 + -72.8600 -43.2400 + -73.0300 -43.3300 + -73.0700 -43.4500 + -73.0100 -43.5900 + -72.8900 -43.6000 + -73.0200 -43.7300 + -72.8900 -43.7800 + -72.9900 -43.7800 + -73.2400 -44.1800 + -72.7700 -44.4400 + -72.9500 -44.3900 + -73.2200 -44.4300 + -73.3900 -44.5600 + -73.4200 -44.7400 + -73.3100 -44.8800 + -73.0200 -44.8600 + -72.7800 -44.7200 + -72.6900 -44.5300 + -72.8200 -44.4200 + -72.6500 -44.5000 + -72.5500 -44.3600 + -72.6800 -44.6900 + -73.0000 -44.9200 + -73.2700 -44.9500 + -73.3900 -44.9400 + -73.5000 -45.2000 + -73.3100 -45.2500 + -73.6700 -45.3700 + -73.8700 -45.3600 + -73.7800 -44.9200 + -73.6300 -44.3700 + -73.6900 -44.2400 + -73.5800 -44.0900 + -73.6800 -43.9200 + -74.1300 -43.8000 + -74.3800 -44.1700 + -74.5700 -44.4900 + -74.6900 -44.6500 + -74.4100 -44.7900 + -74.4400 -45.1400 + -74.6100 -45.5300 + -74.9100 -45.5200 + -74.9000 -45.6400 + -74.5200 -45.7400 + -74.5300 -45.8400 + -75.0200 -45.7900 + -75.1600 -45.8500 + -75.0900 -46.1100 + -75.0000 -46.1500 + -75.0600 -46.2100 + -75.1200 -46.1900 + -75.5800 -46.4900 + -75.5000 -46.5400 + -75.5600 -46.5700 + -75.6500 -46.5500 + -75.7400 -46.7500 + -75.6800 -46.8600 + -75.4900 -46.9500 + -75.3600 -46.9100 + -75.3100 -46.8200 + -75.4200 -46.7300 + -75.4000 -46.6900 + -75.5400 -46.6800 + -75.6100 -46.7600 + -75.5500 -46.6600 + -75.4400 -46.5900 + -75.4000 -46.6400 + -75.1500 -46.6000 + -75.0400 -46.4300 + -75.1000 -46.5900 + -75.1100 -46.6600 + -74.9800 -46.7300 + -74.7500 -46.8300 + -74.4500 -46.8900 + -74.3700 -46.8500 + -74.6900 -46.7900 + -74.6800 -46.7500 + -74.5200 -46.7500 + -74.5600 -46.7000 + -74.3100 -46.7800 + -74.1000 -46.8900 + -74.2500 -47.1000 + -74.1600 -47.1600 + -74.0500 -47.1300 + -74.0200 -47.1500 + -74.1200 -47.2100 + -74.3000 -47.1700 + -74.4700 -47.3100 + -74.5400 -47.4300 + -74.2900 -47.5600 + -73.9400 -47.5900 + -74.2500 -47.6200 + -74.2100 -47.7700 + -74.4100 -47.5500 + -74.5600 -47.5300 + -74.7200 -47.7200 + -74.6700 -47.8400 + -74.8600 -47.8100 + -75.5800 -48.0600 + -75.5500 -48.4800 + -75.5100 -48.8100 + -75.6500 -49.0300 + -75.5200 -49.3800 + -75.5700 -49.8000 + -75.4200 -49.7500 + -74.8600 -49.9600 + -74.9700 -50.0800 + -75.0400 -50.0200 + -75.3700 -49.9800 + -75.4300 -50.3000 + -75.3200 -50.7400 + -74.8900 -50.8200 + -75.0900 -51.3200 + -75.2700 -51.6200 + -75.0200 -51.9400 + -74.9800 -52.1900 + -74.4000 -52.1200 + -74.0200 -52.4500 + -73.9200 -52.7300 + -73.5700 -52.8100 + -73.8100 -52.9400 + -74.0900 -52.9900 + -74.4200 -52.8000 + -74.6300 -52.6800 + -74.7200 -52.7300 + -74.4400 -53.0400 + -73.6800 -53.2100 + -72.4100 -53.5200 +999 999 + -73.5900 -53.3700 + -72.1400 -53.7700 +999 999 + -73.5900 -53.3700 + -73.8000 -53.4500 + -73.4500 -53.7400 + -73.3100 -53.9800 + -72.6300 -54.1200 + -72.2900 -54.0500 + -72.1400 -53.7700 +999 999 + -71.8600 -54.2500 + -71.7100 -53.9000 +999 999 + -71.8600 -54.2500 + -71.4200 -54.2700 + -71.2800 -54.0600 +999 999 + -71.3900 -54.3500 + -70.2000 -54.5000 + -69.0800 -54.5000 + -69.0800 -54.4200 +999 999 + -71.3900 -54.3500 + -71.9100 -54.4300 + -72.0900 -54.5500 + -71.5400 -54.6300 + -71.0900 -54.6600 + -69.9000 -54.6600 + -68.7400 -54.8700 +999 999 + -70.7200 -54.9100 + -71.3200 -54.7500 + -71.5100 -54.7800 + -71.3600 -54.9100 + -70.9700 -54.9000 + -71.0300 -55.0100 + -70.7900 -55.1300 + -70.4200 -55.1700 + -70.3300 -54.9800 + -70.7200 -54.9100 +999 999 + -69.8700 -55.0400 + -69.2000 -54.8700 + -68.8900 -55.0800 +999 999 + -69.8700 -55.0400 + -70.1200 -55.1200 + -69.8000 -55.2800 + -69.2200 -55.1500 + -69.0500 -55.2200 + -69.3400 -55.2800 + -68.8600 -55.2100 + -69.0100 -55.3000 + -68.7200 -55.2200 + -68.3500 -55.2500 + -68.4600 -55.1500 + -68.8900 -55.0800 +999 999 + -68.1200 -55.2300 + -67.7400 -55.2500 + -67.6400 -55.1600 + -67.5000 -55.1700 + -67.5800 -55.2600 + -67.3500 -55.3400 + -67.1700 -55.1400 + -67.2900 -54.9900 + -68.1100 -54.9000 + -68.1200 -55.2300 +999 999 + -68.7100 -54.9200 + -68.7400 -54.8700 + -68.4900 -54.9100 + -68.2800 -54.8000 + -67.6800 -54.9200 + -67.1800 -54.9300 + -66.5600 -55.0500 + -66.0600 -54.9700 + -66.0100 -54.9100 + -65.8200 -54.9200 + -65.7700 -54.9900 + -65.5800 -54.9500 + -65.6100 -54.9000 + -65.5300 -54.8900 + -65.5000 -54.9400 + -65.2900 -54.9400 + -65.1500 -54.7200 +999 999 + -64.7000 -54.8300 + -64.7700 -54.8900 + -64.7000 -54.9000 + -64.7900 -54.9300 + -64.5000 -54.9100 + -64.2600 -54.8600 + -64.2600 -54.8900 + -63.8700 -54.8400 + -63.7800 -54.7600 + -64.1800 -54.7800 + -64.3400 -54.7600 + -64.4100 -54.8300 + -64.5700 -54.7700 + -64.6100 -54.8300 + -64.7000 -54.8300 +999 999 + -65.1500 -54.7200 + -65.2400 -54.6800 + -65.7000 -54.6700 + -66.2800 -54.5600 + -66.4100 -54.4500 + -66.7700 -54.2300 + -67.2100 -54.1400 + -67.6700 -53.8900 + -67.6400 -53.8500 + -68.1100 -53.6000 + -68.2100 -53.3000 + -68.3700 -53.3000 + -68.5000 -53.2600 + -68.5400 -53.2000 + -68.4900 -53.1000 + -68.4100 -53.0500 + -68.3100 -53.0800 + -68.2400 -53.1500 + -68.2900 -52.9500 + -68.8000 -52.5200 + -68.9200 -52.6400 + -69.1100 -52.6600 + -69.2800 -52.6300 + -69.2900 -52.5100 + -69.3800 -52.4600 + -69.5800 -52.4900 + -69.6700 -52.5600 + -69.6300 -52.6400 + -69.9100 -52.8200 + -70.0100 -52.8400 + -70.1300 -52.7400 + -70.4000 -52.7400 + -70.2700 -52.8000 + -70.2600 -52.9300 + -70.1700 -52.8700 + -70.0900 -52.9200 + -70.2000 -53.0500 + -70.2900 -53.0800 + -70.3100 -52.9900 + -70.4300 -53.0300 + -70.4200 -53.3500 + -70.2100 -53.4900 + -69.6800 -53.3500 + -69.3500 -53.3700 + -69.3300 -53.4800 + -69.7700 -53.6200 + -70.1800 -53.7600 + -70.1600 -53.9600 + -70.0200 -54.1500 + -69.0800 -54.4200 +999 999 + -70.4800 -54.1800 + -70.3900 -53.9700 + -70.5300 -53.5600 + -70.7100 -53.6900 + -70.6700 -53.8700 + -70.8900 -53.8500 + -70.8500 -54.1100 + -70.4800 -54.1800 +999 999 + -71.2800 -54.0600 + -71.7100 -53.9000 +999 999 + -72.4100 -53.5200 + -71.5300 -53.8500 + -71.1900 -53.9200 + -70.9300 -53.7700 + -70.8900 -53.2200 + -70.8200 -52.8700 + -70.4700 -52.7100 + -69.8900 -52.5000 + -69.7300 -52.5300 + -69.5700 -52.4300 + -69.4900 -52.2800 + -69.1100 -52.1900 + -68.9400 -52.3100 + -68.4700 -52.3500 + -68.4000 -52.4200 + -68.3400 -52.3500 + -68.7400 -51.9900 + -68.9900 -51.5700 + -69.1500 -51.2900 + -69.1400 -51.0900 + -69.1900 -50.9600 + -69.4900 -51.1200 + -69.3800 -50.9800 + -69.1400 -50.9000 + -69.2000 -50.7600 + -69.0900 -50.4700 + -68.8000 -50.3700 + -68.7900 -50.2800 + -68.3800 -50.1300 + -68.6300 -49.8000 + -68.3900 -50.0900 + -68.1000 -50.0800 + -67.9300 -49.9100 + -67.6600 -49.6500 + -67.6800 -49.3900 + -67.6300 -49.2600 + -67.6700 -49.2500 + -67.7400 -49.3900 + -67.8300 -49.4000 + -67.8100 -49.3000 + -67.6800 -49.1500 + -67.4200 -48.8700 + -67.2300 -48.8100 + -67.0300 -48.5900 + -66.9000 -48.5700 + -66.7400 -48.4500 + -66.5300 -48.4000 + -66.4900 -48.3300 + -66.4100 -48.3400 + -66.1100 -48.1200 + -65.9200 -48.0900 + -65.9900 -48.0600 + -65.9500 -47.9500 + -65.8500 -47.9500 + -65.9000 -47.8800 + -65.9000 -47.7700 + -66.0400 -47.7400 + -66.4100 -47.8500 + -66.0600 -47.7500 + -65.8500 -47.7400 + -65.7400 -47.2200 + -65.8700 -47.0900 + -65.9900 -47.0700 + -66.1100 -47.0900 + -66.6600 -47.0200 + -67.0800 -46.6900 + -67.3300 -46.6000 + -67.5200 -46.3900 + -67.6300 -46.0000 + -67.4200 -45.7600 + -67.3400 -45.6800 + -67.3700 -45.6200 + -67.1300 -45.4200 + -67.0500 -45.2800 + -66.8300 -45.1800 + -66.5300 -45.1800 + -66.4500 -45.1500 + -66.5000 -45.1100 + -66.3200 -45.0500 + -66.1900 -45.0100 + -65.9800 -45.0100 + -65.6500 -45.0400 + -65.5300 -44.9200 + -65.6300 -44.8800 + -65.7100 -44.8700 + -65.7400 -44.8400 + -65.7100 -44.7800 + -65.7200 -44.7300 + -65.6300 -44.6600 + -65.3300 -44.5700 + -65.3700 -44.5300 + -65.3600 -44.4800 + -65.2900 -44.5100 + -65.2600 -44.4800 + -65.3000 -44.4400 + -65.1800 -44.3300 + -65.2300 -44.3200 + -65.2600 -44.1700 + -65.1600 -44.0200 + -65.2000 -43.9700 + -65.2600 -43.9800 + -65.2800 -43.8200 + -65.3100 -43.6700 + -65.0200 -43.4300 + -64.9900 -43.3100 + -64.5400 -43.1200 + -64.2800 -42.9800 + -64.3000 -42.9300 + -64.4900 -42.9800 + -65.0100 -42.7900 + -64.9900 -42.6800 + -64.8700 -42.6500 + -64.7200 -42.5500 + -64.6000 -42.5300 + -64.3400 -42.5600 + -64.2300 -42.6500 + -64.2800 -42.7900 + -64.1900 -42.8800 + -63.7800 -42.8300 + -63.6800 -42.7700 + -63.6600 -42.6800 + -63.6200 -42.6000 + -63.6800 -42.4100 + -63.7200 -42.3000 + -63.7000 -42.2900 + -63.6400 -42.3500 + -63.6100 -42.4600 + -63.6100 -42.3300 + -63.7000 -42.2100 + -63.7600 -42.1100 + -63.8500 -42.0900 + -64.1400 -42.2200 + -64.3900 -42.2600 + -64.2000 -42.2700 + -64.1000 -42.2800 + -64.0600 -42.3700 + -64.1300 -42.4200 + -64.3100 -42.4300 + -64.4300 -42.4700 + -64.5400 -42.4600 + -64.5900 -42.4600 + -64.6400 -42.4200 + -64.5700 -42.3300 + -64.5000 -42.2800 + -64.6900 -42.2400 + -64.9100 -42.2000 + -65.0800 -42.0700 + -65.0200 -41.8400 + -65.0000 -41.7700 + -65.0200 -41.6900 + -64.9700 -41.5600 + -65.0600 -41.4700 + -65.1600 -41.0600 + -65.1300 -40.8700 + -64.9200 -40.7400 + -64.8300 -40.7500 + -64.7900 -40.8000 + -64.9400 -40.8300 + -64.8100 -40.8500 + -64.4800 -40.9000 + -64.2100 -41.0200 + -64.1400 -40.9900 + -64.1200 -41.0400 + -63.9200 -41.1200 + -63.8200 -41.1500 + -63.3700 -41.1200 + -63.1500 -41.1500 + -62.7900 -41.0100 + -62.3600 -40.8800 + -62.2800 -40.8200 + -62.2500 -40.6200 + -62.1800 -40.5700 + -62.2800 -40.5100 + -62.3200 -40.5300 + -62.5000 -40.3000 + -62.4500 -40.2200 + -62.3500 -40.1900 + -62.3500 -39.8900 + -62.3000 -39.8500 + -62.1500 -39.8600 + -62.0600 -39.5800 + -62.0600 -39.4500 + -62.0700 -39.4100 + -62.2100 -39.3300 + -62.3100 -39.3400 + -62.3200 -39.3100 +999 999 + -62.1900 -39.3000 + -62.1000 -39.3700 + -62.0400 -39.3700 + -62.0200 -39.3200 + -62.2000 -39.2600 + -62.1900 -39.3000 +999 999 + -62.3200 -39.3100 + -62.3300 -39.2700 + -62.3900 -39.1700 + -62.3400 -38.9900 + -62.3900 -38.9600 + -62.3700 -38.8600 + -62.4300 -38.8300 + -62.2800 -38.8100 + -62.0500 -38.9400 +999 999 + -62.0800 -39.0500 + -62.0800 -39.1300 + -61.9400 -39.2000 + -61.8600 -39.2000 + -61.8900 -39.1300 + -62.0500 -38.9400 + -61.8100 -38.9800 + -61.7400 -38.9600 + -61.5900 -39.0000 + -61.1600 -38.9800 + -60.9300 -38.9900 + -60.2500 -38.8500 + -59.7400 -38.8100 + -59.1000 -38.6800 + -58.5700 -38.5200 + -58.0200 -38.3300 + -57.6700 -38.1500 + -57.5700 -38.0500 + -57.5600 -37.9000 + -57.5200 -37.7900 + -57.3100 -37.6000 + -57.1200 -37.4100 + -57.0800 -37.3100 + -56.8500 -37.0700 + -56.7400 -36.8300 + -56.7500 -36.6300 + -56.7600 -36.4000 + -56.8400 -36.3000 + -56.9000 -36.3500 + -57.1300 -36.3100 + -57.3300 -36.0900 + -57.3900 -35.9900 + -57.3800 -35.8800 + -57.2700 -35.6400 + -57.1700 -35.4700 + -57.1800 -35.3400 + -57.3600 -35.1400 + -57.7700 -34.9100 + -57.9500 -34.7900 + -58.0200 -34.8100 + -58.3500 -34.6500 + -58.5800 -34.4200 + -58.5200 -34.3600 + -58.6100 -34.3000 + -58.4500 -34.2800 + -58.3700 -34.1000 + -58.4500 -34.0100 + -58.4800 -33.8700 + -58.5900 -33.6700 + -58.5300 -33.3700 + -58.4500 -33.3200 + -58.4500 -33.0900 + -58.2300 -33.0700 + -58.1800 -32.8400 + -58.2700 -32.4500 + -58.1400 -32.2700 + -58.2100 -32.1500 + -58.2500 -31.8700 + -58.1100 -31.7700 + -58.0700 -31.4900 + -57.9600 -31.2900 + -58.0700 -31.4500 + -58.0400 -31.6000 + -58.1200 -31.8100 + -58.2000 -31.9000 + -58.1600 -31.9900 + -58.1900 -32.1400 + -58.1000 -32.2600 + -58.2300 -32.4700 + -58.1600 -32.8100 + -58.1000 -32.8800 + -58.1200 -33.0400 + -58.2000 -33.1200 + -58.3700 -33.1200 + -58.4500 -33.4100 + -58.2200 -33.2800 + -58.4200 -33.4100 + -58.4700 -33.5800 + -58.4500 -33.9300 + -58.2700 -34.0700 + -58.2400 -34.1800 + -58.0600 -34.2700 + -57.9500 -34.3500 + -57.9200 -34.4900 + -57.6200 -34.4500 + -57.2100 -34.4700 + -56.9100 -34.6900 + -56.6900 -34.7300 + -56.6400 -34.7600 + -56.4500 -34.7900 + -56.4600 -34.8600 + -56.1600 -34.9300 + -56.0100 -34.8900 + -55.8300 -34.7900 + -55.5900 -34.8200 + -55.4100 -34.8200 + -55.3100 -34.8800 + -55.3200 -34.9100 + -55.0600 -34.9200 + -54.9700 -35.0000 + -54.8100 -34.8900 + -54.6700 -34.8600 + -54.2100 -34.6700 + -54.1400 -34.6000 + -53.8600 -34.4500 + -53.8200 -34.4000 + -53.8300 -34.2900 + -53.7700 -34.2300 + -53.5800 -34.1100 + -53.5500 -34.0600 + -53.5100 -33.8700 + -53.1100 -33.6000 + -52.6900 -33.2400 + -52.5500 -33.0500 + -52.3500 -32.6000 + -52.3200 -32.4100 + -52.0900 -32.1400 + -52.1500 -32.0100 + -52.2200 -32.0800 + -52.2700 -32.0400 + -52.1800 -31.9500 + -52.2800 -31.8700 + -52.2400 -31.7300 + -52.1000 -31.6800 + -52.0200 -31.3800 + -51.6700 -31.3100 + -51.6600 -31.1700 + -51.4900 -31.1200 + -51.5200 -30.9300 + -51.4200 -30.9000 + -51.4200 -30.6600 + -51.3700 -30.6400 + -51.3400 -30.7700 + -51.2800 -30.5300 + -51.2200 -30.4000 + -51.1500 -30.4100 + -51.1300 -30.3500 + -51.2900 -30.2700 + -51.2600 -30.0500 + -51.2000 -30.2300 + -51.0700 -30.2700 + -51.0200 -30.3600 + -51.0500 -30.4000 + -50.9500 -30.4600 + -50.9400 -30.3700 + -50.6600 -30.2200 + -50.5500 -30.2300 + -50.6000 -30.4400 + -50.6800 -30.4400 + -50.6600 -30.3300 + -50.7600 -30.3900 + -50.7300 -30.5800 + -50.8100 -30.8600 + -50.9500 -30.9100 + -51.0200 -30.9300 + -50.9800 -31.0000 + -51.0900 -31.1100 + -51.2300 -31.1000 + -51.2100 -31.3300 + -51.4300 -31.5700 + -51.4700 -31.5200 + -51.6600 -31.7500 + -51.8700 -31.8200 + -51.8300 -31.8500 + -51.8500 -31.8900 + -51.9400 -31.9000 + -52.0500 -31.8400 + -52.1200 -31.8700 + -52.0600 -31.9500 + -52.0800 -32.0200 + -52.0600 -32.1100 + -51.6500 -31.8900 + -51.1100 -31.5400 + -50.9400 -31.3300 + -50.8800 -31.3000 + -50.7100 -31.0000 + -50.4200 -30.5800 + -50.1800 -30.1500 + -50.1000 -29.8500 + -49.9600 -29.6900 + -49.8300 -29.4800 + -49.7600 -29.2500 + -49.4800 -29.0100 + -49.3500 -28.9600 + -49.2400 -28.8200 + -49.0400 -28.7200 + -48.9000 -28.6800 + -48.8300 -28.6600 + -48.8000 -28.5700 + -48.8800 -28.5600 + -48.9100 -28.4300 + -48.8200 -28.4600 + -48.7900 -28.4100 + -48.8000 -28.5000 + -48.7100 -28.3300 + -48.6500 -28.1300 + -48.6600 -28.0400 + -48.6400 -27.9400 + -48.6600 -27.8200 + -48.6800 -27.7000 +999 999 + -69.8300 -15.8500 + -69.9900 -15.8100 + -70.0000 -15.6300 + -69.9300 -15.5200 + -69.7500 -15.6700 + -69.9100 -15.4100 + -69.9200 -15.3200 + -69.8700 -15.2100 + -69.7200 -15.1800 + -69.0600 -15.7200 + -69.0100 -15.8400 + -68.8500 -15.8300 + -68.7800 -15.9100 + -68.9100 -16.0400 + -68.8100 -16.1700 + -68.6200 -16.2400 + -68.7100 -16.4100 + -68.9500 -16.3900 + -68.8700 -16.4900 + -69.0300 -16.4600 + -69.0600 -16.3400 + -69.0500 -16.2200 + -68.9700 -16.1700 + -68.8700 -16.1900 + -69.1300 -15.9800 + -69.1100 -16.0900 + -69.2400 -16.2000 + -69.4900 -16.1200 + -69.4300 -16.0400 + -69.4700 -15.9300 + -69.6700 -15.8800 + -69.8200 -15.7400 + -69.8800 -15.7800 + -69.7900 -15.8700 + -69.8300 -15.8500 +999 999 + -68.2200 -20.6000 + -68.2900 -20.5400 + -68.3000 -20.2500 + -68.2700 -19.9100 + -67.8300 -19.7400 + -67.7000 -19.9700 + -67.7500 -20.0800 + -67.6400 -20.0900 + -67.6400 -19.9500 + -67.5700 -19.7800 + -67.6500 -19.6500 +999 999 + -67.8500 -19.5000 + -67.8900 -19.6100 + -68.1300 -19.5400 + -68.3000 -19.6500 + -68.4800 -19.3100 + -68.2800 -19.1200 + -68.2100 -19.1400 + -68.2200 -19.2700 + -68.1000 -19.2700 + -68.0200 -19.1800 + -67.7900 -19.3700 + -67.6900 -19.4600 + -67.8500 -19.5000 +999 999 + -67.6500 -19.6500 + -67.5900 -19.5600 + -67.5700 -19.4200 + -67.5000 -19.4600 + -67.4600 -19.7400 + -67.2700 -19.8500 + -67.2200 -20.0900 + -67.1300 -20.1400 + -67.1200 -20.5300 + -67.2200 -20.7100 + -67.3600 -20.7900 + -67.7600 -20.6800 + -68.0300 -20.8200 + -68.0800 -20.7200 + -68.0600 -20.5800 + -68.2200 -20.6000 +999 999 + -68.6500 -54.9200 + -68.6500 -52.6900 +999 999 + -68.3400 -52.3500 + -68.9000 -52.1900 + -69.5800 -51.9800 + -69.9400 -51.8900 + -70.4500 -51.8400 + -71.0800 -51.8400 + -71.5300 -51.8800 + -72.0500 -51.8300 + -72.4200 -51.6900 + -72.6500 -51.3900 + -72.4700 -50.8900 + -72.5000 -50.5600 + -73.0300 -50.5300 + -73.4700 -50.4300 + -73.5300 -50.0700 + -73.5300 -49.6200 + -73.4800 -49.3200 + -73.3800 -49.1400 + -73.1900 -48.7500 + -73.0000 -48.5400 + -72.9200 -48.3400 + -72.7400 -48.1600 + -72.7100 -47.8400 + -72.6800 -47.5400 + -72.5000 -47.4000 + -72.3400 -47.3300 + -72.1600 -47.0900 + -72.1300 -46.8400 + -71.9800 -46.5500 + -71.9100 -46.4200 + -72.0900 -46.0000 + -72.2000 -45.7300 + -71.9100 -45.3500 + -71.6900 -45.1500 + -71.6700 -44.9600 + -71.8500 -44.7600 + -71.9900 -44.5700 + -72.1100 -44.3900 + -72.1800 -44.0900 + -72.2500 -43.8000 + -72.1800 -43.5600 + -72.0300 -43.1800 + -72.1400 -42.7200 + -72.3500 -42.4700 + -72.1700 -42.3000 + -72.0800 -42.0600 + -71.9600 -41.7000 + -72.0800 -41.3700 + -72.1400 -40.8400 + -72.1200 -40.5800 + -72.0900 -40.1400 + -71.9100 -39.8600 + -71.7600 -39.5600 + -71.8900 -39.1300 + -71.5600 -38.9300 + -71.3000 -38.6600 + -71.2300 -38.4400 + -71.3000 -38.1300 + -71.4100 -37.7400 + -71.5500 -37.0700 + -71.6400 -36.6900 + -71.4100 -36.4300 + -71.1100 -36.1400 + -70.6900 -35.8300 + -70.5700 -35.4100 + -70.6400 -35.1300 + -70.5500 -34.7200 + -70.3500 -34.3400 + -70.2800 -33.9200 + -70.0900 -33.3400 + -70.3300 -33.0200 + -70.4300 -32.6400 + -70.5300 -32.3700 + -70.4600 -31.8500 + -70.8300 -31.3600 + -70.6600 -30.8800 + -70.5300 -30.4600 + -70.2200 -29.9800 + -70.2000 -29.2600 + -70.0800 -28.7100 + -69.8600 -28.2400 + -69.5000 -27.8500 + -69.2800 -27.4900 + -69.1100 -27.2600 + -68.9100 -26.6200 + -68.7600 -26.3800 + -68.7600 -25.9200 + -68.7600 -25.9500 + -68.8600 -25.5000 + -68.7100 -25.1000 + -68.6700 -24.6500 + -68.5400 -24.4200 + -68.1800 -24.0500 + -67.8200 -23.7500 + -67.5500 -23.5600 + -67.3900 -23.2700 + -67.3600 -22.7900 + -67.2600 -22.4400 + -66.9200 -22.1300 + -66.7200 -21.9400 + -66.3800 -21.7300 + -66.1100 -21.8100 + -65.7900 -21.7500 + -65.2200 -22.2200 + -64.8700 -22.5400 + -64.6200 -22.2300 + -64.1900 -21.7800 + -63.7900 -21.7300 + -63.3200 -21.7300 + -63.3300 -21.7300 + -62.8600 -22.1100 + -62.3900 -22.6300 + -62.0000 -22.8600 + -61.4400 -23.3700 + -60.8600 -23.7800 + -60.5100 -24.1800 + -60.3700 -24.2200 + -59.7500 -24.1300 + -59.2700 -24.2100 + -58.7900 -24.5700 + -58.2900 -24.9100 + -57.8500 -24.9800 + -58.1100 -25.7000 + -58.6600 -26.6100 + -58.9400 -27.1000 + -58.3300 -27.1000 + -57.6700 -27.2000 + -56.9200 -27.1900 + -56.1700 -27.2600 + -55.5200 -26.8400 + -55.2000 -26.5400 + -54.8300 -26.1000 + -54.7200 -25.6200 +999 999 + -57.9600 -31.2900 + -58.0100 -30.9200 + -57.6500 -30.2700 +999 999 + -70.3300 -18.5500 + -69.9200 -18.1100 + -69.5600 -17.8900 + -69.3600 -18.3000 + -69.2200 -18.8900 + -69.1200 -19.3900 + -68.9900 -19.9800 + -68.8600 -20.5800 + -68.6900 -21.0600 + -68.4600 -21.3200 + -68.2200 -21.7200 + -68.1300 -22.2000 + -67.9700 -22.6700 + -67.6800 -22.7200 + -67.2600 -22.4400 +999 999 + -62.8700 -22.0800 + -62.6500 -21.4000 + -62.4800 -20.9500 + -62.2900 -20.4600 + -62.0800 -20.0900 + -61.8800 -19.7800 + -61.3900 -19.5500 + -60.9400 -19.5000 + -60.3200 -19.4500 + -59.9000 -19.4900 + -59.5400 -19.5800 + -58.9700 -19.7200 + -58.6100 -19.8400 + -58.4000 -19.9800 + -58.1500 -20.1800 +999 999 + -69.5300 -17.9000 + -69.4000 -17.4900 + -69.1900 -17.0100 + -69.0900 -16.5300 + -69.1600 -16.3300 + -69.3400 -15.9300 + -69.4800 -15.5500 + -69.4500 -15.0200 + -69.2900 -14.6300 + -69.0900 -14.2500 + -69.0400 -13.8400 + -68.9500 -13.2700 + -68.8400 -12.7900 + -68.8400 -12.3200 + -69.0900 -11.8400 + -69.2700 -11.4900 + -69.4700 -10.8900 +999 999 + -80.4800 -3.4300 + -80.6500 -3.9700 + -80.4800 -4.0900 + -80.0900 -4.1100 + -79.7400 -4.3200 + -79.3100 -4.7100 + -78.7800 -4.2900 + -78.6000 -3.6300 + -78.3400 -3.0500 + -77.6300 -2.6200 + -77.2500 -2.5300 + -76.7800 -2.0200 + -76.2800 -1.8100 + -75.7800 -1.4300 + -75.6000 -1.0800 + -75.4000 -0.5300 + -75.6400 -0.0400 + -75.4200 0.1600 + -75.0700 -0.0600 + -74.4200 -0.4900 + -73.9000 -0.9600 + -73.7000 -1.3800 + -73.1600 -2.0200 + -72.9100 -2.1800 + -72.5200 -2.1300 + -72.1000 -1.9700 + -71.7900 -1.9800 + -71.4200 -2.0300 + -70.8700 -2.0300 + -70.5900 -2.1700 + -70.2500 -2.3700 + -70.3300 -3.9600 + -70.0000 -3.7000 + -70.0200 -4.2500 +999 999 + -78.8500 1.4900 + -78.5200 1.2400 + -78.2900 1.1400 + -77.9000 0.9200 + -77.4500 0.7700 + -77.1700 0.6400 + -76.8100 0.5900 + -76.2300 0.4700 + -75.9300 0.4200 + -75.7300 0.4000 + -75.5700 0.3300 + -75.2500 0.0300 +999 999 + -71.1500 12.2400 + -71.8600 12.0400 + -72.2000 11.6400 + -72.4900 11.1700 + -72.7600 10.7700 + -72.9200 10.1500 + -72.9600 9.8400 + -73.3400 9.4300 + -73.1200 9.2100 + -72.7800 9.2900 + -72.5500 9.1500 + -72.3900 8.7300 + -72.2900 8.2400 + -72.2100 7.8100 + -71.6800 7.3900 + -71.1500 7.3800 + -70.6300 7.3100 + -70.1100 7.3100 + -69.6700 6.9600 + -69.4500 6.6000 + -69.0200 6.5900 + -68.6100 6.6000 + -68.0400 6.5700 + -67.3900 6.5200 + -67.4400 6.0200 + -67.5900 5.4600 + -67.6800 4.7400 + -67.3900 4.3500 + -67.5300 4.1500 + -67.3500 3.5800 + -67.6300 3.1300 + -67.4100 2.8900 + -66.9500 2.4800 + -66.8300 2.1000 + -66.8100 1.7400 + -66.5700 1.4300 + -66.3900 1.1800 + -66.1000 0.9200 +999 999 + -60.0400 8.6400 + -60.1300 8.1800 + -60.3900 8.0200 + -60.7000 7.8300 + -60.6600 7.5400 + -60.3200 7.3700 + -60.3300 7.0700 + -60.4100 6.9700 + -60.6700 6.9700 + -61.1200 6.9000 + -61.3000 6.6100 + -61.3300 6.2100 + -61.3000 6.0000 + -61.1800 5.8000 + -60.8700 5.5000 + -60.7700 5.2400 +999 999 + -57.0900 5.6900 + -57.2100 5.2600 + -57.6100 4.9300 + -57.7800 4.6100 + -57.7900 3.8900 + -57.3400 3.5600 + -57.1900 3.2900 + -56.9800 2.8500 + -56.6800 2.4400 + -55.9300 1.9300 +999 999 + -54.1200 5.9000 + -54.3500 5.6200 + -54.4800 5.1000 + -54.5000 4.5900 + -54.3500 4.3300 + -54.1600 3.9100 + -54.8200 2.4900 +999 999 + -77.2900 8.6000 + -77.6500 8.7300 + -77.9100 8.8300 + -78.1100 8.9300 + -78.3800 9.0700 + -78.6200 9.2200 + -78.8200 9.2600 + -79.1000 9.1900 + -79.2800 9.3000 + -79.6100 9.3200 + -79.8400 9.2300 + -80.0700 8.9800 + -80.4900 8.8100 + -80.8200 8.6300 + -81.2600 8.5200 + -81.5600 8.7000 + -81.8300 8.8700 + -82.0500 8.7600 + -82.2600 8.8100 + -82.3300 9.1400 + -82.5300 9.2400 + -82.7800 9.1000 + -82.8300 8.7400 + -82.8600 8.4200 + -82.8600 8.1500 + -82.8500 8.0000 + -82.3400 7.9900 +999 999 + -82.5300 9.2400 + -82.6000 9.4000 + -82.8700 9.4600 + -83.0500 9.6300 + -83.1500 9.7900 + -83.3100 9.9500 + -83.4000 10.2100 + -83.4300 10.3800 + -83.4800 10.6200 + -83.7800 10.5400 + -84.1900 10.4900 + -84.5000 10.6000 + -84.7500 10.6400 + -85.0800 10.7100 + -85.3900 10.8000 + -85.8000 10.7700 +999 999 + -83.4800 10.6300 + -83.6800 10.8400 + -83.6600 11.0800 + -83.7100 11.3300 + -83.6700 11.4700 + -83.7600 11.6700 + -83.7500 11.7800 + -83.7400 11.8500 + -83.7400 12.1100 + -83.6800 12.2900 + -83.4900 12.0600 + -83.5400 12.4200 + -83.5300 12.6800 + -83.5200 13.1000 + -83.4800 13.4400 + -83.3100 13.7600 + -83.2400 13.9100 + -83.3000 14.2100 + -83.2700 14.4800 + -83.1800 14.6400 + -83.3900 14.6200 + -83.9000 14.4000 + -84.3300 14.2800 + -84.6000 14.3700 + -84.9100 14.4600 + -85.0000 14.3800 + -85.1700 14.2000 + -85.3200 13.9000 + -85.6500 13.8900 + -85.8500 13.5500 + -86.3100 13.1800 + -86.5300 13.2100 + -86.7400 13.0700 + -86.9500 12.8400 + -87.1600 12.7200 + -87.2200 12.7200 +999 999 + -83.1800 14.6400 + -83.3900 14.9300 + -83.5300 15.1400 + -83.7800 15.2600 + -84.0800 15.4500 + -84.4200 15.5200 + -84.6200 15.6000 + -84.8400 15.5700 + -85.1200 15.6000 + -85.3300 15.6600 + -85.5700 15.5800 + -85.7500 15.6500 + -85.8900 15.7400 + -86.1500 15.5800 + -86.6300 15.6500 + -86.8800 15.4900 + -87.1600 15.4500 + -87.4600 15.5000 + -87.7500 15.4800 + -88.0200 15.4500 + -88.3500 15.4400 + -88.4800 15.2300 + -88.6700 15.0000 + -89.1200 14.6200 + -89.2400 14.3700 + -89.2500 14.1100 + -89.0100 13.8500 + -88.6700 13.5800 + -88.2900 13.5200 + -88.0300 13.5900 + -87.8700 13.3900 + -87.7200 13.1600 +999 999 + -88.3500 15.4400 + -88.7500 15.6000 + -88.6800 16.0100 + -88.5000 16.2900 + -88.4300 16.5600 + -88.3700 16.9800 + -88.2900 17.3900 + -88.1600 17.7200 + -88.1500 17.9000 + -88.3500 18.0700 + -88.5200 18.0700 + -88.8600 17.7800 + -89.1800 17.6200 + -89.2900 17.5600 + -89.6000 17.5200 + -89.8700 17.5300 + -90.2300 17.5500 + -90.7400 17.4800 + -91.0000 17.3500 + -90.8900 17.0100 + -91.2300 16.8600 + -91.1000 16.6700 + -90.8800 16.3600 + -90.6500 16.1700 + -90.6500 15.9500 + -90.8800 15.8400 + -91.2600 15.8000 + -91.6000 15.7400 + -91.8700 15.3700 + -91.9900 14.9400 + -92.1300 14.1300 +999 999 + -88.3500 18.0700 + -88.0900 18.2700 + -88.0700 18.1000 + -88.0000 17.9000 + -87.8700 17.5700 + -87.7400 17.7200 + -87.6900 18.0100 + -87.6300 18.3200 + -87.5700 18.4500 + -87.5400 18.7000 + -87.4500 18.7900 + -87.6300 18.9000 + -87.5100 19.0900 + -87.7100 19.1300 + -87.6600 19.2600 + -87.5000 19.4100 + -87.4900 19.6000 + -87.3100 19.8600 + -86.9500 20.3400 + -86.8700 20.8000 + -86.9300 21.0200 + -87.1400 21.0500 + -87.3300 21.0200 + -87.4900 20.9500 + -87.7200 21.0500 + -87.9200 21.1300 + -88.1400 21.1200 + -88.2100 21.1200 + -88.5100 21.2100 + -88.7700 21.0600 + -89.0900 20.9900 + -89.4000 21.0300 + -89.6000 20.8700 + -89.9100 20.7900 + -90.1200 20.6500 + -90.4000 20.4500 + -90.4700 20.1700 + -90.5100 19.7400 + -90.6000 19.2200 + -90.8700 18.8400 + -91.2000 18.4700 + -91.4300 18.3900 + -91.2600 18.1300 + -91.6000 18.0700 + -91.7800 17.8900 + -91.9500 17.8500 + -91.9300 18.0800 + -92.0500 18.1600 + -92.1600 18.3400 + -92.4400 18.2700 + -92.6600 18.2200 + -92.7700 18.0600 + -93.3000 17.9200 + -93.7900 17.8900 + -94.2300 17.8800 + -94.6300 17.8400 + -94.9600 18.0900 + -95.1400 18.1300 + -95.3300 18.2700 + -95.5900 18.3000 + -95.8900 18.3700 + -96.1400 18.5300 + -96.3200 18.8300 + -96.4100 18.9700 + -96.6300 19.4500 + -96.8500 19.7700 + -97.0300 20.0600 + -97.3000 20.4000 + -97.3800 20.7100 + -97.4700 20.9600 + -97.6900 21.3100 + -97.5900 21.5100 + -97.7300 21.7100 + -97.8600 21.8800 + -97.8200 22.2500 + -97.7700 22.7700 + -97.7400 23.2000 + -97.7700 23.7500 + -97.8100 23.9600 + -97.7900 23.4600 + -97.9300 23.3800 + -97.9800 23.8200 + -98.0200 24.1000 + -98.0400 24.4500 + -98.1700 24.6000 + -97.9600 24.6300 + -97.8500 24.8500 + -97.6100 24.9600 + -97.6900 24.6200 + -97.6900 24.3500 + -97.5800 24.6200 + -97.4900 24.9500 + -97.3600 25.2100 + -97.2800 25.3100 + -97.2200 25.4200 + -97.2600 25.5300 + -97.2500 25.8800 + -97.4200 26.2000 + -97.1900 26.1200 + -97.1200 26.3300 + -97.2300 26.6200 + -97.1300 27.2000 + -97.2200 27.4500 + -96.8600 27.6100 + -97.0200 27.8900 + -96.7200 28.1100 + -96.3400 28.1400 + -96.4800 28.4000 + -96.1600 28.3700 + -96.0700 28.2700 + -95.7100 28.5800 + -95.3700 28.6600 + -95.2400 28.9400 + -94.9600 28.9800 + -94.6700 29.3200 + -94.0400 29.4200 + -93.5800 29.4500 + -93.2600 29.4300 + -92.8200 29.3000 + -92.3000 29.3600 + -92.2200 29.5300 + -91.8700 29.5100 + -91.5200 29.2700 + -91.3400 29.6600 + -91.2100 29.3200 + -91.2600 29.0400 + -91.0000 29.0900 + -90.8200 28.9000 + -90.5600 29.1000 + -90.2100 28.8600 + -90.1700 29.1400 + -89.9900 29.1900 + -90.1700 29.6700 + -90.1700 29.8700 + -90.4700 30.0400 + -89.9900 30.1400 + -89.2600 30.3300 + -88.6400 30.2400 + -88.1400 30.2900 + -88.0600 30.4200 + -87.8300 30.2900 + -88.0200 30.0600 + -87.4100 30.2500 + -87.3900 30.4200 + -87.2000 30.1300 + -86.9300 30.2600 + -86.5700 30.1800 + -86.3600 30.2500 + -86.0200 30.0600 + -85.8000 30.1000 + -85.4600 29.6800 + -85.3200 29.4100 + -85.0700 29.7200 + -84.6600 29.6500 + -84.3600 29.9200 + -84.3900 29.9000 + -83.8500 29.7300 + -83.5700 29.4600 + -83.2200 29.0300 + -82.9500 28.6100 + -82.8600 28.0400 + -82.8900 27.5800 + -82.6100 27.7200 + -82.5900 27.5200 + -82.8000 27.1700 + -82.4700 26.5100 + -82.3200 26.7400 + -81.9600 26.0300 + -81.9300 25.8700 + -81.4200 25.6600 + -81.3800 25.4000 + -81.0900 25.1000 + -81.3400 24.8500 + -80.7300 24.9400 + -80.4200 25.3500 + -80.2500 25.8200 + -80.1100 26.1900 + -80.0900 26.5600 + -80.3800 27.3300 + -80.6800 28.1800 + -80.8500 28.2500 + -80.7800 28.4800 + -81.0900 28.9300 + -81.2900 29.8200 + -81.5100 30.4600 + -81.3600 30.9300 + -81.2000 31.3500 + -81.1800 31.8700 + -80.9300 32.0600 + -80.9300 32.2500 + -80.6800 32.3400 + -80.4800 32.5500 + -80.2600 32.4600 + -79.9900 32.7000 + -79.8000 32.7500 + -79.6100 32.9700 + -79.4900 32.9100 + -79.3700 33.0700 + -79.0900 33.5200 + -78.5200 33.7100 + -78.1300 33.7400 + -78.0300 33.8400 + -77.8800 33.9400 + -77.8000 34.1800 + -77.2400 34.5400 + -77.0600 34.7500 + -76.7500 34.7000 + -76.5200 34.8400 + -76.2800 34.9800 + -76.7300 34.9600 + -76.5900 35.1200 + -76.7900 35.2700 + -76.5200 35.5700 + -76.4000 35.3400 + -76.0100 35.3800 + -75.8600 35.5000 + -75.9700 35.7200 + -76.1800 35.6100 + -76.2400 35.7700 + -76.4100 35.8700 + -76.3600 35.9900 + -76.1900 36.0500 +999 999 + -76.2700 35.0000 + -76.7900 34.8900 + -76.5400 35.1400 + -76.7700 35.2500 + -76.5700 35.4800 + -76.3000 35.2900 + -75.8600 35.3700 + -75.9200 35.6900 + -76.2200 35.5200 + -76.2000 35.7600 + -76.4100 35.8800 + -76.3800 35.9600 + -76.1800 36.0200 + -76.1800 36.2400 + -76.0500 36.5500 + -76.1800 36.7500 + -76.5900 36.7000 + -76.8400 37.0300 + -76.5700 36.9800 + -76.8000 37.1800 + -76.7100 37.4100 + -76.7000 37.5800 + -76.5500 37.5300 + -76.4600 37.7100 + -77.3200 38.1100 + -77.1000 38.2300 + -76.9200 38.1200 + -76.4400 38.1000 + -76.6600 38.5000 + -76.6100 38.8300 + -76.7800 39.0900 + -76.7300 39.2700 + -76.4600 39.2400 + -76.1500 39.2900 + -76.2600 39.1500 + -76.2500 38.7800 + -76.2000 38.5500 + -76.2800 38.4100 + -76.2100 38.1800 + -75.8700 38.0200 + -75.9400 37.8000 + -75.7500 37.6300 + -75.8000 37.4000 + -75.3900 37.8800 + -75.2200 38.0200 + -75.3600 38.0700 + -75.1900 38.4100 + -75.3900 38.6900 + -75.6000 39.0300 + -75.8300 39.0700 + -75.6100 39.3600 + -75.4800 39.2100 + -75.3400 39.1700 + -75.2000 39.0600 + -75.0600 39.0000 + -75.0200 38.7800 + -74.9700 38.7400 + -74.6100 39.1900 + -74.1300 39.8000 + -73.9100 40.3400 + -74.0800 40.4100 + -73.5600 40.5400 + -72.8200 40.7200 + -72.0100 40.9700 + -72.9000 40.8200 + -72.8500 40.9200 + -73.0800 40.8600 + -73.2000 40.9200 + -73.7700 40.6800 + -73.9700 40.7800 + -73.9600 40.8800 + -73.6900 40.8700 + -72.9300 41.2900 + -72.4600 41.2400 + -71.6900 41.3800 + -71.5900 41.6300 + -71.4000 41.4800 + -71.0900 41.5500 + -70.6100 41.5600 + -70.0200 41.7300 + -70.0500 41.9200 + -70.2400 42.0200 + -70.2900 41.7800 + -70.6500 41.7400 + -70.9100 42.0300 + -71.1500 42.2500 + -71.0300 42.4200 + -70.9700 42.7000 + -70.6200 43.1000 + -70.3400 43.5800 + -70.2700 43.7200 + -69.9000 43.8300 + -69.6900 43.8100 + -69.4400 43.9300 + -68.9800 44.2700 + -68.9000 44.1800 + -68.4000 44.3900 + -68.1100 44.3500 + -68.0000 44.4800 + -67.6100 44.3900 + -67.2600 44.6500 + -67.1100 44.8500 + -67.3600 45.1400 + -67.5500 45.4300 + -67.9200 45.7100 + -67.8400 46.1100 + -67.8600 46.4700 + -67.8500 46.7300 + -67.7900 46.9400 + -68.1300 47.2800 + -68.4000 47.4000 + -68.7200 47.2500 + -69.0300 47.2500 + -69.3200 47.1100 + -69.6300 46.9600 + -69.9000 46.7400 + -70.0000 46.5400 + -70.2500 46.0800 + -70.3400 45.9500 + -70.4900 45.8300 + -70.7600 45.3400 + -71.4500 45.1200 + -71.7400 44.8400 + -72.4400 44.8500 + -73.7200 44.7800 + -74.8600 44.7800 + -75.1500 44.8300 + -75.8000 44.6000 + -76.3500 44.3000 + -76.5400 44.0500 + -76.7200 43.7600 + -76.9100 43.5100 + -77.4500 43.4600 + -77.8800 43.5000 + -78.3700 43.4600 + -79.0700 43.3400 + -79.2000 43.0900 + -79.5800 42.5800 + -80.1600 42.3800 + -81.2000 42.1100 + -81.8300 41.8800 + -82.4800 41.6100 + -82.9300 41.7300 + -83.2900 42.1100 + -83.0200 42.5300 + -82.6100 42.9200 + -82.2100 43.2400 + -82.3300 43.9300 + -82.4600 44.6300 + -82.6500 45.1100 + -83.0300 45.4100 + -83.3700 45.6200 + -83.4900 46.0900 + -84.0300 46.2300 + -84.1200 46.0700 + -84.3700 46.1900 + -84.4900 46.4500 + -84.9200 46.5900 + -85.1600 46.8500 + -85.9500 47.2200 + -86.8500 47.6000 + -87.7000 47.9300 + -88.7900 48.2600 + -89.4300 48.0600 + -90.2600 48.1800 + -91.6900 48.2100 + -93.1000 48.5600 + -94.0200 48.5800 + -94.5400 48.7900 + -94.8300 49.0000 + -95.1600 49.3700 + -95.4400 49.0000 + -98.0300 49.0400 +-101.2000 49.0200 +-102.8800 49.0200 +-104.4200 49.0300 +-106.4800 49.0300 +-108.2400 49.0000 +-110.4900 49.0200 +-112.6200 49.0000 +-114.5600 48.9900 +-116.2000 48.9900 +-117.7100 48.9500 +-119.3600 48.9500 +-120.3700 48.9600 +-122.0000 48.9700 +-122.8000 48.9700 +999 999 + -73.2500 19.4700 + -73.3800 19.5700 + -73.3700 19.6000 +999 999 + -71.7200 19.6100 + -71.6700 19.0100 + -71.6600 18.5000 + -71.6600 18.0000 + -71.6600 17.7500 +999 999 + -66.9100 45.0400 + -66.5400 45.0300 + -66.2500 45.1200 + -66.4200 45.2500 + -66.3800 45.4000 + -66.7100 46.0000 + -66.3400 45.9000 + -66.0000 45.9300 + -66.0900 45.7100 + -66.1600 45.4900 + -66.0400 45.4400 + -66.1200 45.3000 + -65.7600 45.3200 + -65.3800 45.3900 + -64.9600 45.6000 + -64.8600 46.0500 + -64.4200 45.8800 + -64.7600 45.6200 + -64.5300 45.5000 + -64.2300 45.4700 + -63.6500 45.4600 + -64.1200 45.2500 + -64.5400 45.1300 + -64.5200 45.2700 + -65.1400 45.0500 + -65.5100 44.9400 + -65.8400 44.7800 + -65.6100 44.6100 + -65.7800 44.5300 + -66.1200 44.5700 + -66.3900 44.3000 + -66.2100 44.1800 + -66.3000 43.9600 + -66.1700 43.8900 + -66.1600 43.7600 + -66.0100 43.6000 + -65.9000 43.6200 + -65.6700 43.4700 + -65.6900 43.3700 + -65.2900 43.4200 + -65.0400 43.7000 + -64.8500 43.9100 + -64.8100 44.0700 + -64.4300 44.1700 + -64.3200 44.3800 + -64.0700 44.6600 + -63.9100 44.4800 + -63.4500 44.4800 + -63.3500 44.6200 + -63.1300 44.7300 + -62.4900 44.7600 + -62.0600 44.9200 + -61.8500 45.1000 + -61.7400 45.2200 + -61.3800 45.1600 + -61.1400 45.2800 + -61.4700 45.3600 + -61.4900 45.5100 + -61.9100 45.6700 + -61.9300 45.8000 + -62.3200 45.7100 + -62.4900 45.7200 + -62.7600 45.5800 + -62.8600 45.8300 + -63.1700 45.7300 + -63.6000 45.8900 + -63.8800 45.9400 + -63.8200 46.1400 + -64.1300 46.1000 + -64.4700 46.2100 + -64.8400 46.5300 + -64.9300 46.7800 + -64.8200 47.0600 + -65.4500 47.0900 + -64.8700 47.5600 + -64.8500 47.7600 + -65.0300 47.7900 + -65.1200 47.9700 + -65.7100 47.7200 + -65.8300 47.9200 + -66.6400 48.0500 + -66.6100 48.1600 + -66.2700 48.1700 + -66.0500 48.2800 + -65.3700 48.0800 + -65.0800 48.1500 + -64.7300 48.2900 + -64.3400 48.4100 + -64.4800 48.4900 + -64.2900 48.5800 + -64.6000 48.8000 + -64.5500 48.9000 + -64.2400 48.8500 + -64.6100 49.1600 + -65.0000 49.1800 + -65.3900 49.2800 + -66.0700 49.1900 + -66.5200 49.0900 + -67.0200 48.9300 + -67.5000 48.8400 + -67.9300 48.7800 + -68.2400 48.6800 + -68.5400 48.5100 + -68.8800 48.3100 + -69.2100 48.0800 + -69.6200 47.8500 + -70.0400 47.5100 + -70.2200 47.2200 + -70.5400 46.9900 + -70.8200 46.7800 + -71.2200 46.7300 + -70.9300 47.0600 + -70.7200 47.2600 + -70.4900 47.3400 + -70.1100 47.6600 + -69.9300 48.0100 + -69.5200 48.2500 + -69.3800 48.5900 + -68.8100 48.9000 + -68.5000 49.1300 + -68.1800 49.2900 + -67.7400 49.3800 + -67.4400 49.5300 + -67.3400 49.7800 + -66.9700 49.8800 + -66.9400 50.0700 + -66.7100 50.0800 + -66.5300 50.2500 + -65.9500 50.3100 + -65.3000 50.3600 + -64.8900 50.3300 + -64.8600 50.3500 + -63.9900 50.3100 + -63.7000 50.3000 + -63.2200 50.3000 + -62.7200 50.3800 + -62.1500 50.3000 + -61.8800 50.2700 + -61.6500 50.1700 + -61.0100 50.2800 + -60.4400 50.3000 + -60.0500 50.4100 + -59.7000 50.5800 + -59.3000 50.9000 + -58.8300 50.9800 + -58.7500 51.1900 + -58.4000 51.3700 + -57.9100 51.4700 + -57.4000 51.5400 + -57.0900 51.5300 + -56.8300 51.5800 + -56.4700 51.8400 + -56.1500 52.0300 + -55.8700 52.2800 + -55.7900 52.3600 + -56.1100 52.4500 + -55.8600 52.5600 + -56.0100 52.6100 + -55.9700 52.7100 + -56.3000 52.8800 + -56.0600 52.9700 + -55.9500 53.2300 + -56.1400 53.2800 + -55.9400 53.4700 + -56.1200 53.6200 + -56.1800 53.7700 + -56.4300 53.8100 + -56.6700 53.8900 + -57.0300 53.8100 + -57.2400 53.5800 + -57.5800 53.5900 + -57.2900 53.8800 + -57.3400 54.0600 + -57.5400 54.2100 + -57.7800 54.3500 + -58.1200 54.3000 + -58.3100 54.2900 + -58.1600 54.4400 + -57.6100 54.5000 + -57.3500 54.6300 + -57.6000 54.7200 + -57.8300 54.7800 + -58.0700 54.8500 + -58.0800 54.9600 + -58.3600 54.8700 + -58.7100 54.8800 + -59.0300 54.9100 + -58.9300 55.0400 + -59.0700 55.1200 + -59.0700 55.2400 + -59.3000 55.2300 + -59.4800 55.2100 + -59.6900 55.1300 + -59.9400 54.9200 + -60.0900 54.8900 + -60.0200 55.0600 + -59.8700 55.1200 + -59.7500 55.2400 + -59.7200 55.3000 + -59.8800 55.3000 + -59.9300 55.4000 + -60.0800 55.3900 + -60.3200 55.4100 + -60.5900 55.2800 + -60.5800 55.6600 + -60.4000 55.7700 + -60.7100 55.8800 + -61.2700 56.0900 + -61.2600 56.2300 + -61.3600 56.2900 + -61.8900 56.3100 + -62.1500 56.3400 + -61.8900 56.4700 + -62.0000 56.6000 + -62.0700 56.6700 + -61.8800 56.8400 + -61.8500 57.0400 + -61.5800 57.2000 + -61.4300 57.3100 + -61.6200 57.3500 + -61.7600 57.4400 + -61.8400 57.5100 + -62.1800 57.5100 + -62.5300 57.5500 + -62.2200 57.6100 + -61.9800 57.7400 + -62.0200 57.9300 + -61.7800 57.9600 + -61.8400 58.0700 + -62.1400 58.0700 + -62.4200 58.1600 + -62.5200 58.2500 + -62.5900 58.3100 + -62.8900 58.3100 + -63.0800 58.1900 + -63.1500 58.1900 + -63.2700 58.2300 + -62.9900 58.4200 + -62.8000 58.5200 + -62.8900 58.6000 + -63.1100 58.5700 + -63.2800 58.4800 + -63.5000 58.4200 + -63.6100 58.4600 + -63.4600 58.5800 + -63.4800 58.6600 + -63.1400 58.7100 + -62.9800 58.9700 + -63.1900 58.9800 + -63.2500 59.1100 + -63.3900 59.2200 + -63.4600 59.4400 + -63.7000 59.5200 + -63.9200 59.6300 + -63.8100 59.7300 + -63.9500 59.8000 + -64.1100 59.8200 + -64.1500 59.8700 + -64.0100 59.9600 + -64.2900 60.1000 + -64.5800 60.1500 + -64.3300 60.2800 + -64.5500 60.3000 + -64.8000 60.5000 + -64.9200 60.3500 + -65.1700 60.1000 + -65.3900 59.8400 + -65.3100 59.6200 + -65.6100 59.5900 + -65.5100 59.4300 + -65.8300 59.4100 + -65.6500 59.2900 + -65.5600 59.1500 + -65.9700 59.1500 + -66.1700 59.1000 + -66.0500 58.9400 + -66.4600 58.9800 + -66.6200 58.8000 + -66.8900 58.6900 + -67.2600 58.6300 + -67.7900 58.3700 + -67.9000 58.6000 + -68.1100 58.4600 + -68.1400 58.8700 + -68.4700 58.7600 + -68.6500 58.9000 + -68.9600 59.0500 + -69.5200 59.0300 + -69.3400 59.2500 + -69.4900 59.3200 + -69.7400 59.3500 + -69.6500 59.4900 + -69.8800 59.5100 + -69.7900 59.7600 + -69.7700 59.9400 + -69.9700 60.0600 + -69.7500 60.2000 + -69.8200 60.4800 + -69.7600 60.6800 + -69.5800 60.9700 + -69.7000 61.0300 + -69.9300 60.8800 + -70.3000 60.9700 + -70.4200 61.1000 + -70.8000 61.0700 + -71.3700 61.1900 + -71.6100 61.3200 + -71.7100 61.4400 + -71.9800 61.5300 + -71.8800 61.6700 + -72.1600 61.7200 + -72.4500 61.8600 + -72.7500 61.8400 + -72.7500 62.1100 + -73.0300 62.1600 + -73.2100 62.2700 + -73.5100 62.3300 + -73.8200 62.4900 + -74.0400 62.4400 + -74.3900 62.4000 + -74.5300 62.2900 + -74.7800 62.3300 + -74.8700 62.2100 + -75.1600 62.2800 + -75.3500 62.3300 + -75.6700 62.3200 + -75.8900 62.3200 + -76.0100 62.3800 + -76.1800 62.4100 + -76.4000 62.4300 + -76.6600 62.4900 + -77.1200 62.5500 + -77.2800 62.5900 + -77.7500 62.5600 + -77.9800 62.4300 + -78.3700 62.3800 + -78.3000 62.1600 + -78.2800 62.0300 + -78.1400 61.8700 + -77.8400 61.7100 + -77.8800 61.5700 + -77.9000 61.4300 + -78.1400 61.2000 + -78.3900 60.9700 + -77.8900 60.8300 + -77.8000 60.6700 + -77.5000 60.6000 + -77.4900 60.5200 + -77.5600 60.3200 + -77.6100 60.2200 + -77.4900 60.1100 + -77.2800 60.0600 + -77.4500 59.9000 + -77.4800 59.7800 + -77.9200 59.7500 + -77.9700 59.6400 + -78.1100 59.4800 + -78.3200 59.3000 + -78.6900 59.0000 + -78.6400 58.8700 + -78.6900 58.7000 + -78.4200 58.6400 + -78.2100 58.4700 + -77.9000 58.4100 + -77.6200 58.1600 + -77.2900 58.0200 + -77.1600 57.7500 + -77.1400 57.6400 + -76.9800 57.4100 + -76.8400 57.1800 + -76.8800 56.5500 + -76.7900 56.3600 + -76.8800 56.1000 + -77.1000 55.8800 + -77.3500 55.5800 + -78.0000 55.2400 + -78.5300 55.1200 + -79.1500 54.8900 + -79.7200 54.6900 + -79.6000 54.4100 + -79.1800 54.0400 + -79.0800 53.8600 + -79.2600 53.7700 + -79.0700 53.6400 + -79.3700 53.5100 + -79.0500 53.2600 + -79.1100 53.0200 + -78.8000 52.9500 + -78.9500 52.8800 + -78.8600 52.7400 + -78.7300 52.2200 + -78.9400 52.0100 + -78.9700 51.8800 + -79.2000 51.7500 + -78.8500 51.4700 + -78.8700 51.0300 + -79.2400 51.3500 + -79.6500 51.6300 + -79.7900 51.3800 + -79.7500 50.9500 + -80.0300 51.2000 + -80.4600 51.3000 + -80.8600 51.2100 + -80.6900 51.4900 + -80.8100 51.8500 + -81.0300 51.9300 + -81.2300 52.0700 + -81.5000 52.2400 + -82.0000 52.2600 + -81.6900 52.5200 + -82.0600 52.8500 + -82.4800 52.9700 + -82.3100 53.4900 + -82.4100 53.9500 + -82.5600 54.2700 + -82.4600 54.9200 + -82.3300 55.1700 + -82.7000 55.1100 + -82.8200 55.1700 + -83.0200 55.1400 + -83.1800 55.2500 + -83.4300 55.2300 + -83.6700 55.3000 + -83.9600 55.2400 + -84.8500 55.2800 + -85.0700 55.1600 + -85.2300 55.2400 + -85.4700 55.1600 + -85.7000 55.5000 + -87.3200 56.0000 + -87.9200 55.9700 + -87.8900 56.1400 + -88.2000 56.4100 + -88.2600 56.5600 + -88.5400 56.6300 + -88.8600 56.7900 + -89.0800 56.8100 + -89.4700 56.9800 + -90.0500 57.0400 + -90.4700 57.2400 + -90.9800 57.3700 + -91.5200 57.3800 + -92.1300 57.2700 + -92.6200 57.0800 + -93.3500 57.1100 + -92.8900 57.2600 + -92.8800 57.5000 + -92.9300 57.7500 + -93.0900 58.0000 + -93.1400 58.2200 + -93.3100 58.4700 + -93.4100 58.6700 + -93.5800 58.8300 + -93.9300 58.8100 + -94.1100 58.8200 + -94.5500 58.5100 + -94.6500 58.7300 + -94.8400 58.8700 + -95.2500 59.1500 + -95.2900 59.5000 + -95.1400 59.6200 + -95.2700 59.9600 + -95.0100 60.2100 + -95.1900 60.4100 + -95.1100 60.5900 + -94.6500 60.8000 + -94.3500 61.0700 + -94.1900 61.2400 + -94.0300 61.3600 + -94.2000 61.5100 + -93.7700 61.5400 + -93.5800 61.7400 + -93.8400 61.8300 + -93.1600 62.0400 + -93.2200 62.1900 + -92.8000 62.1600 + -92.9300 62.4100 + -92.6700 62.5400 + -92.1300 62.5400 + -92.0700 62.6200 + -92.4400 62.6700 + -92.5500 62.7700 + -92.3100 62.8300 + -91.9600 62.7800 + -91.6000 62.8300 + -91.3000 62.9600 + -90.9900 63.0400 + -91.0400 63.2200 + -91.1400 63.3700 + -91.5900 63.5200 + -91.8700 63.6400 + -92.5400 63.6600 + -93.0500 63.7800 + -93.5200 63.9200 + -94.2000 63.9700 + -94.9800 64.1700 + -95.8200 64.1300 + -96.4600 64.3000 + -96.3800 64.4400 +999 999 +-130.5400 54.7200 +-130.4200 54.5800 +-130.6400 54.4200 +-130.4600 54.2400 +-130.1700 54.2600 +-129.5500 54.3600 +-130.2100 54.0900 +-130.2900 53.9400 +-129.5800 53.5400 +-128.8600 53.9600 +-128.9200 53.6900 +-128.0800 53.5400 +-127.9800 53.2800 +-128.2500 53.4100 +-128.8600 53.4600 +-128.6600 53.1600 +-128.5400 52.8100 +-128.1900 52.8800 +-128.0700 52.6600 +-128.3100 52.6600 +-128.3200 52.4900 +-128.5500 52.2700 +-128.4700 52.2200 +-128.1000 52.4500 +-127.8800 52.2000 +-127.5400 52.4200 +-127.1000 52.7000 +-127.1500 52.4300 +-126.9400 52.3700 +-126.7100 52.0100 +-126.8700 51.9700 +-127.1100 52.2200 +-127.6200 52.0600 +-127.9300 51.8200 +-128.0000 51.7000 +-127.8100 51.6100 +-127.5300 51.7300 +-127.1200 51.6700 +-126.7000 51.6700 +-126.7600 51.5900 +-127.6000 51.5500 +-127.8300 51.4300 +-127.7100 51.3100 +-127.8000 51.1300 +-127.2900 51.1400 +-126.7800 51.0600 +-127.5200 50.9500 +-127.5500 50.7700 +-127.0300 50.8000 +-126.6000 50.8400 +-126.3700 50.7900 +-126.1400 50.6700 +-125.7500 50.9300 +-125.8200 50.6000 +-126.3200 50.4900 +-125.5700 50.4300 +-125.2700 50.4900 +-125.1400 50.8500 +-125.0000 50.5600 +-125.0000 50.5600 +-125.1400 50.3000 +-124.9600 50.2500 +-124.6000 50.3100 +-124.7900 50.0900 +-124.6800 49.8000 +-124.4100 49.7400 +-124.0400 50.0600 +-124.1100 49.8300 +-123.9600 49.6800 +-124.1500 49.5400 +-123.8200 49.3900 +-123.4200 49.4900 +-123.3900 49.2200 +-123.0500 49.2600 +-123.1300 48.9900 +-122.8300 49.0200 +-122.7300 48.6600 +-122.6800 48.2300 +-122.4300 47.9400 +-122.4600 47.6000 +-122.4800 47.2400 +-122.5300 47.0500 +-122.8500 47.0300 +-123.0700 46.9700 +-123.1700 47.2700 +-123.2700 47.4500 +-122.9500 47.7800 +-122.9900 47.9200 +-123.3100 48.1100 +-123.7100 48.0800 +-124.1700 48.1100 +-124.3900 48.1200 +-124.7000 48.2700 +-124.9200 48.3100 +-124.9500 48.0700 +-124.8000 47.8400 +-124.6900 47.5700 +-124.6100 47.2400 +-124.3900 46.9400 +-124.3200 46.7800 +-124.1400 46.6700 +-124.2600 46.5200 +-124.1300 46.3700 +-124.3200 46.2200 +-123.6400 46.1200 +-124.0100 46.0600 +-124.0600 45.6200 +-124.1300 45.0800 +-124.3300 44.6300 +-124.4000 44.1500 +-124.4300 43.6100 +-124.5700 43.2800 +-124.6600 42.8100 +-124.7900 42.7700 +-124.5200 42.2800 +-124.4500 41.7700 +-124.2500 41.0400 +-124.4400 40.6200 +-124.4600 40.1700 +-124.0400 39.6100 +-123.8900 39.0200 +-123.5700 38.4700 +-123.3000 38.2200 +-122.8900 37.8300 +-122.6700 37.8700 +-122.5500 38.1400 +-121.8100 38.2200 +-121.8600 37.9600 +-122.2700 38.0000 +-122.4900 37.8100 +-122.2800 37.4300 +-122.6900 37.5000 +-122.5400 37.0900 +-122.4400 36.8400 +-122.1800 36.7000 +-121.9200 36.6900 +-121.9800 36.2800 +-121.8600 36.0400 +-121.5500 35.6400 +-121.3400 35.4000 +-121.0700 35.3300 +-120.9900 35.0000 +-120.6000 34.5700 +-120.6400 34.4300 +-120.6300 34.3800 +-120.1400 34.2000 +-119.7200 34.2200 +-119.3800 34.1500 +-119.0700 33.8100 +-118.7300 33.7100 +-118.3400 33.4200 +-118.1500 33.5200 +-117.6500 32.9900 +-117.2800 32.7900 +-117.1400 32.3100 +-117.0100 31.9100 +-116.5600 31.4900 +-116.7000 31.4000 +-116.3100 30.9400 +-116.1200 30.5100 +-116.0300 30.3000 +-115.7900 30.2500 +-115.8300 29.8200 +-115.5900 29.4000 +-114.9800 29.0400 +-114.7600 28.8500 +-114.6200 28.5600 +-114.3500 28.4000 +-114.2100 27.9300 +-114.4400 27.6300 +-114.7200 27.5300 +-115.1600 27.5500 +-114.7900 27.1400 +-114.4700 26.9300 +-114.0400 26.7500 +-113.6000 26.5500 +-113.3100 26.7100 +-113.0300 26.2300 +-112.5000 25.8600 +-112.2600 25.4800 +-112.2000 25.0200 +-112.2300 24.7300 +-111.9200 24.2700 +-111.5600 24.0500 +-111.3200 23.8500 +-110.4900 23.2900 +-110.3100 22.9700 +-110.1900 22.6900 +-109.8800 22.6300 +-109.5200 23.0300 +-109.7500 23.4200 +-109.7800 23.8200 +-110.1000 23.9500 +-110.2500 23.9900 +-110.6400 24.0300 +-110.7800 24.6200 +-111.0600 25.1400 +-111.3200 25.3500 +-111.4200 25.8800 +-111.5500 26.3900 +-111.7200 26.5200 +-111.9100 26.4800 +-112.2200 26.8800 +-112.7100 27.3600 +-112.8000 27.8900 +-112.9900 28.1000 +-113.1900 28.1200 +-113.4100 28.4900 +-113.6500 28.5400 +-113.6800 28.9000 +-114.5100 29.5100 +-114.6300 30.1100 +-114.6300 30.5800 +-114.7500 30.8700 +-114.7900 31.2700 +-115.0000 31.6600 +-114.6500 31.6800 +-114.1800 31.4100 +-113.9000 31.4600 +-113.6000 31.0800 +-113.2500 31.1200 +-113.2200 30.6400 +-113.0500 30.1400 +-112.8200 29.7000 +-112.3700 29.0200 +-112.1500 28.6200 +-111.9300 28.5900 +-111.7800 28.2100 +-111.4200 27.9800 +-111.0600 27.6600 +-110.6500 27.5900 +-110.5600 27.1100 +-110.1900 26.9000 +-109.8100 26.5000 +-109.5400 26.5000 +-109.3500 26.0600 +-109.2300 25.9600 +-109.5500 25.7500 +-109.4600 25.3800 +-109.2200 25.3700 +-108.5800 25.0700 +-108.0300 24.6900 +-108.0500 24.3900 +-107.7100 24.2900 +-107.4300 24.0200 +-107.0400 23.7000 +-106.9500 23.4000 +-107.0700 23.4700 +-106.5300 22.9300 +-106.2400 22.6600 +-106.1400 22.4100 +-105.9000 22.1800 +-105.8100 21.6800 +-105.6400 21.2700 +-105.6000 20.6800 +-105.8100 20.1600 +-105.6500 19.7800 +-105.3400 19.3400 +-104.6400 18.8700 +-103.8900 18.3300 +-103.3900 17.9200 +-103.0400 17.8800 +-102.5400 17.5800 +-102.0100 17.5300 +-101.2600 16.9700 +-100.6100 16.6000 + -99.8700 16.3300 + -99.1700 16.1900 + -98.3000 15.9200 + -97.6700 15.6100 + -96.7500 15.4000 + -95.8200 15.4800 + -95.4100 15.7600 + -94.6600 15.8100 + -93.8000 15.6700 + -93.8000 15.4100 + -93.5500 15.3000 + -93.1000 14.8400 + -92.5400 14.2600 + -91.6400 13.7800 + -91.0900 13.5900 + -90.5800 13.4300 + -90.1700 13.3600 + -89.5600 13.1700 + -89.0500 13.0000 + -88.5200 13.0200 + -88.1900 12.9400 + -87.8000 12.8500 + -87.6600 13.1700 + -87.2100 12.7000 + -87.6200 12.6000 + -87.1600 12.1700 + -87.0500 12.2500 + -86.8200 11.8600 + -86.5900 11.5900 + -86.1500 11.0900 + -85.9500 10.9300 + -85.8600 10.8000 + -85.9200 10.5300 + -85.5600 10.3300 + -85.8600 10.1000 + -85.7400 9.6300 + -85.1500 9.3300 + -84.7900 9.2200 + -85.0200 9.6100 + -84.7500 9.7800 + -84.6800 9.4700 + -83.6600 8.6900 + -83.6600 8.1200 + -83.2700 8.1900 + -82.7400 7.8700 + -82.3400 7.9900 + -81.7500 7.8400 + -81.5900 7.4400 + -81.2200 7.3500 + -81.1200 7.6100 + -80.7900 7.2400 + -80.8900 6.9200 + -80.0500 7.1100 + -80.4100 7.8900 + -79.9000 8.0800 + -79.7500 8.4000 + -79.6800 8.7000 + -78.8200 8.5600 + -78.4600 8.1800 + -78.1800 7.9700 + -78.2300 7.6700 + -78.5000 7.6000 + -77.8800 7.1000 +999 999 + -77.8100 19.6300 + -77.5600 19.5500 + -77.3200 19.5100 + -77.1000 19.5400 + -76.8800 19.4700 + -76.5700 19.4400 + -76.1000 19.4400 + -75.7300 19.7200 + -75.5900 19.5400 + -75.1700 19.5700 + -74.8000 19.7300 + -74.4700 19.8200 + -74.2000 19.9100 + -74.2500 20.0600 + -74.5000 20.2000 + -74.8400 20.3200 + -75.0400 20.4100 + -75.2200 20.4400 + -75.5100 20.4200 + -75.6600 20.4500 + -75.6800 20.6300 + -75.9500 20.7700 + -76.2100 20.8900 + -76.5100 21.0000 + -76.6600 20.8900 + -76.7500 21.0100 + -77.0100 21.1600 + -77.2000 21.1500 + -77.3200 21.3400 + -77.3900 21.5000 + -77.5300 21.6800 + -77.7800 21.8100 + -77.9500 21.9200 + -78.1600 22.0800 + -78.3100 22.1700 + -78.5800 22.2000 + -78.3600 22.0600 + -78.1000 21.9600 + -77.8700 21.7400 + -77.7100 21.5700 + -77.6900 21.4300 + -77.8100 21.5300 + -77.9300 21.6300 + -78.1500 21.7800 + -78.3400 21.9100 + -78.6200 22.0000 + -78.9400 22.0900 + -79.2600 22.1900 + -79.4800 22.2900 + -79.6800 22.4700 + -79.9100 22.6100 + -80.2500 22.6900 + -80.6200 22.7400 + -80.9800 22.8400 + -81.2100 22.9100 + -81.4300 22.9400 + -81.4700 22.9300 + -81.6000 22.8700 + -81.8300 22.9700 + -82.0500 22.9400 + -82.3900 22.9100 + -82.6800 22.9000 + -83.0100 22.7800 + -83.2800 22.7900 + -83.6600 22.6000 + -84.3000 22.1100 + -84.4400 21.8500 + -84.8600 21.6100 + -84.7900 21.4800 + -84.3900 21.6300 + -84.3600 21.4300 + -83.7600 21.7400 + -83.3200 21.9900 + -82.8000 22.2300 + -82.3100 22.3100 + -81.7800 22.2100 + -81.6000 22.1900 + -82.0300 22.0800 + -81.7900 21.8700 + -81.3600 21.8000 + -81.1400 21.8300 + -80.8000 21.6900 + -80.4200 21.7900 + -80.2500 21.6500 + -79.8000 21.3600 + -79.3700 21.2600 + -78.8400 21.2600 + -78.5900 21.2400 + -78.5700 20.9900 + -78.4300 20.6300 + -78.0100 20.3400 + -77.5900 20.2800 + -77.2300 20.2900 + -77.1200 20.1500 + -77.2000 19.9500 + -77.5000 19.8000 + -77.6100 19.7300 + -77.7900 19.6300 +999 999 + -73.3700 19.6000 + -73.0300 19.6700 + -72.6000 19.7400 + -72.1700 19.6800 + -71.7200 19.6300 + -71.5100 19.6600 + -70.9700 19.6700 + -70.4700 19.5500 + -70.2500 19.4200 + -69.9500 19.3600 + -69.7000 19.1800 + -69.4800 19.0900 + -69.2600 19.0100 + -69.3100 18.8500 + -69.0000 18.7800 + -68.6900 18.6500 + -68.5800 18.6300 + -68.4200 18.4100 + -68.2700 18.2100 + -68.4500 18.1300 + -68.6800 18.0400 + -69.1500 18.1700 + -69.6200 18.1800 + -70.0700 18.0900 + -70.2800 17.9600 + -70.4500 18.1600 + -70.8500 18.0600 + -71.0300 17.8400 + -71.2500 17.5900 + -71.5700 17.6600 + -71.7500 17.7700 + -71.9900 17.9100 + -72.2500 17.9900 + -72.6300 17.9900 + -73.0300 17.9600 + -73.5800 17.9300 + -73.8700 17.8400 + -74.1700 18.0400 + -74.4200 18.1000 + -74.3800 18.3000 + -73.9500 18.4200 + -73.6400 18.3300 + -73.4200 18.2100 + -72.9500 18.2400 + -72.6000 18.2500 + -72.3100 18.3600 + -72.2900 18.4600 + -72.4400 18.6400 + -72.6200 18.8000 + -72.6300 18.9700 + -72.6800 19.2100 + -72.7600 19.3300 + -73.3700 19.6000 +999 999 + -89.2500 14.1100 + -89.5600 13.8900 + -90.1700 13.3600 +999 999 + -89.1800 17.6200 + -89.1800 17.0200 + -89.2000 15.8900 + -89.0700 15.5900 + -88.7500 15.6000 +999 999 + -77.3600 8.6100 + -77.4300 8.4300 + -77.3100 8.2600 + -77.3000 8.1100 + -77.1600 7.9500 + -77.3100 7.8700 + -77.3700 7.7200 + -77.5500 7.5300 + -77.7700 7.7000 + -77.7000 7.4800 + -77.7900 7.4600 + -77.8800 7.2300 + -77.8800 7.1000 +999 999 + -97.5800 25.2700 + -98.0400 25.5600 + -98.3200 25.6200 + -98.7100 25.8700 + -99.0600 26.0700 + -99.3200 26.3800 + -99.5100 26.8600 + -99.6900 27.1200 + -99.9400 27.4700 +-100.3200 27.8600 +-100.6100 28.3200 +-100.6000 28.5100 +-100.7600 28.7000 +-100.9800 28.9200 +-101.2200 29.1900 +-101.4200 29.3100 +-101.8700 29.3900 +-101.5700 29.3500 +-102.0300 29.4100 +-102.3000 29.2500 +-102.6200 28.9700 +-102.9600 28.7000 +-103.0800 28.6600 +-103.4800 28.8600 +-103.6700 28.8700 +-104.1500 29.0000 +-104.3700 29.0900 +-104.5400 29.2700 +-104.6000 29.6700 +-104.6500 29.8700 +-104.7300 29.9900 +-104.9000 30.1600 +-105.1600 30.3500 +-105.4700 30.4300 +-105.6700 30.5800 +-105.8700 30.7400 +-106.0000 30.9800 +-106.1800 31.1800 +-106.4000 31.3100 +-106.6800 31.5100 +-106.7000 31.6300 +-107.0000 31.5800 +-107.4300 31.5900 +-107.6800 31.5700 +-108.0600 31.4700 +-108.2200 31.2700 +-108.4800 31.0700 +-108.7900 31.0500 +-109.4000 31.0900 +-109.8800 31.0700 +-110.3000 31.0100 +-110.7700 31.0500 +-110.9900 31.0600 +-111.3400 31.1700 +-111.7600 31.2700 +-112.1200 31.4400 +-112.4700 31.5500 +-112.8100 31.6800 +-113.0900 31.7400 +-113.6500 31.9200 +-113.9900 32.0700 +-114.3000 32.1500 +-114.6500 32.2600 +-114.7700 32.3100 +-115.0800 32.3700 +-115.3400 32.4100 +-115.7800 32.3700 +-116.1200 32.4200 +-116.6600 32.3800 +-117.0600 32.3500 +999 999 + -67.1400 18.4880 + -66.8700 18.5740 + -66.6010 18.5570 + -66.0610 18.5490 + -65.7910 18.5230 + -65.5840 18.2990 + -65.9620 18.0390 + -66.3310 18.0140 + -66.8700 18.0310 + -67.1490 18.0220 + -67.1580 18.2990 + -67.1130 18.5570 +999 999 + -61.2050 16.3470 + -61.2950 16.3900 + -61.3850 16.5040 + -61.4750 16.5470 + -61.5290 16.4770 + -61.5650 16.3730 + -61.7450 16.4080 + -61.7810 16.2160 + -61.6550 16.0680 + -61.5380 16.2160 + -61.4750 16.2600 + -61.2950 16.2860 +999 999 + -61.4570 15.6040 + -61.4570 15.5170 + -61.4120 15.3420 + -61.2950 15.2540 + -61.2320 15.3420 + -61.2410 15.5170 + -61.2950 15.6040 +999 999 + -61.2140 14.8150 + -61.1150 14.6660 + -61.0880 14.5520 + -60.9350 14.4810 + -60.8450 14.4370 + -60.8720 14.6400 + -60.8630 14.8150 + -61.0250 14.8500 + -61.1150 14.9030 +999 999 + -60.9800 14.1120 + -61.0250 14.0320 + -61.0700 13.8470 + -60.9800 13.7590 + -60.8990 13.8470 + -60.8900 14.0230 +999 999 + -61.2050 13.3970 + -61.2860 13.2290 + -61.1240 13.3170 + -61.1150 13.4060 +999 999 + -59.6310 13.3170 + -59.6490 13.2290 + -59.6400 13.1410 + -59.4960 13.0870 + -59.4060 13.1320 + -59.4330 13.2290 + -59.5500 13.3170 +999 999 + -61.6550 12.2720 + -61.7450 12.1830 + -61.7720 12.0770 + -61.6550 12.0240 + -61.5920 12.1660 +999 999 + -60.5750 11.3650 + -60.6650 11.3390 + -60.7550 11.2850 + -60.8450 11.2050 + -60.7550 11.1520 + -60.6650 11.1960 + -60.4950 11.3650 +999 999 + -63.9030 11.2050 + -63.9930 11.1430 + -64.0830 11.0710 + -64.1730 11.0710 + -64.2630 11.1250 + -64.3070 11.0090 + -64.1730 11.0000 + -63.9930 10.9380 + -63.8130 10.9560 + -63.7770 11.0980 + -63.8130 11.1870 +999 999 + -60.7990 -51.9910 + -60.6200 -51.9190 + -60.6200 -51.8910 + -60.4580 -51.7630 + -60.2600 -51.7290 + -60.4400 -51.6850 + -60.6200 -51.6900 + -60.4400 -51.6400 + -60.2600 -51.6120 + -60.2690 -51.5390 + -60.4400 -51.4770 + -60.3950 -51.4270 + -60.6200 -51.3590 + -60.4400 -51.3310 + -60.2600 -51.4040 + -60.2600 -51.3480 + -60.0810 -51.2470 + -59.9010 -51.3370 + -59.7220 -51.3760 + -59.5420 -51.3820 + -59.7220 -51.2300 + -59.7660 -51.2010 + -59.5420 -51.2180 + -59.3620 -51.2860 + -59.2460 -51.4270 + -59.3800 -51.5390 + -59.5420 -51.6060 + -59.7220 -51.7570 + -59.8380 -51.8740 + -60.0810 -51.9300 + -60.2600 -51.9580 + -60.3500 -52.0960 + -60.6200 -52.1900 + -60.7990 -52.0800 + -60.9790 -52.0520 + -61.0510 -51.9850 +999 999 + -58.8230 -51.2470 + -58.6440 -51.2750 + -58.4640 -51.2410 + -58.3650 -51.3140 + -58.4640 -51.4270 + -58.2850 -51.5170 + -58.3120 -51.4270 + -58.1050 -51.3250 + -57.9250 -51.3090 + -57.8360 -51.4270 + -58.1050 -51.4830 + -57.9250 -51.5330 + -57.8360 -51.6510 + -58.1050 -51.7180 + -58.1770 -51.7630 + -58.4640 -51.8690 + -58.6440 -51.8350 + -58.8230 -51.8240 + -58.7790 -51.8740 + -58.6260 -51.9850 + -58.8230 -52.0130 + -59.0030 -52.0080 + -59.1830 -51.9580 + -59.0840 -52.0960 + -59.3620 -52.0960 + -59.3530 -52.2070 + -59.5150 -52.2070 + -59.6860 -52.0960 + -59.5960 -51.9850 + -59.5510 -51.8740 + -59.4250 -51.7630 + -59.2190 -51.6510 + -59.0120 -51.7630 + -59.0030 -51.6510 + -59.1200 -51.5390 + -59.1020 -51.4270 + -58.9040 -51.3140 + -58.9580 -51.2010 + -58.8230 -51.2410 +999 999 + -37.9340 -53.9450 + -37.5750 -53.9400 + -37.2160 -53.9880 + -37.0360 -53.9880 + -36.8570 -54.0040 + -36.7220 -54.1520 + -36.5420 -54.2570 + -36.3180 -54.2360 + -36.2010 -54.3620 + -36.0480 -54.4670 + -35.9230 -54.6760 + -36.1380 -54.8430 + -36.3180 -54.7130 + -36.4350 -54.5720 + -36.5870 -54.4670 + -36.8210 -54.3620 + -37.1800 -54.2570 + -37.4490 -54.1520 + -37.5750 -54.0940 + -37.7550 -54.1200 + -37.9340 -53.9980 + -38.1140 -53.9980 + -37.9700 -53.9400 +999 999 diff --git a/R-utils/sample.by.quant.r b/R-utils/sample.by.quant.r new file mode 100644 index 000000000..6a5e1cb62 --- /dev/null +++ b/R-utils/sample.by.quant.r @@ -0,0 +1,240 @@ +#==========================================================================================# +#==========================================================================================# +# This function creates a sample of the original data using the quantiles to make # +# the data biased towards lower or higher quantiles. # +# # +# Input variables: # +# ~ x -- the vector to be sampled # +# ~ v -- values associated with the vector x (from which we draw the distribution) # +# ~ a -- the factor to shift the probability of sampling any element. Check method. # +# For all methods, there are two special cases: # +# a = NA - no sampling # +# a = 0 - uniform sampling with replacement. # +# ~ method -- (case insensitive and partial match). From v we determine the quantiles qq # +# of each value, then we define the PDF according to the chosen method: # +# # +# -- "power": p (q) = k * abs(a) ^ (sign(a)*( 1 - 2 * q)); 0 <= q <= 1 # +# p (q) = 0 otherwise # +# # +# -- "logit": p (q) = k * inv.logit((a-sign(a))*(q-0.5-0.01*a)) 0 <= q <= 1 # +# p (q) = 0 otherwise # +# # +# -- "bias" : for each year, we sample one year giving more probability for # +# quantiles that are lower or higher than the previous choice: # +# a = 1 or -1 - equal chances. # +# a < -1 - lower quantiles will be a^2 more likely to be # +# chosen. # +# a > 1 - higher quantiles will be a^2 more likely to be # +# chosen. # +# # +# -- "skew" : the PDF is skewed towards lower or higher quantiles. # +# using skew-normal probability distribution. # +# a - the location is shifted by "a" units of scale # +# parameter (sign tells the direction), unless a is NA or # +# zero. # +# k doesn't need to be determine because sample scales the PDF. # +#------------------------------------------------------------------------------------------# +sample.by.quant <<- function(x,v,method="skew",a=1){ + + #----- First we check whether a is valid. ----------------------------------------------# + if (length(a) != 1){ + stop (paste(" Factor a must be a scalar, and you entered one with length " + ,length(a),"...",sep="")) + }#end if + #---------------------------------------------------------------------------------------# + + + #----- First we check whether x or v are valid. ----------------------------------------# + if (missing(x) || missing(v)){ + cat (" - x is missing: ",missing(x),"\n") + cat (" - v is missing: ",missing(v),"\n") + stop(" Either x or v (or both) is missing...") + }else if (length(x) < length(v)){ + v.names = as.numeric(names(v)) + ix = match(x,v.names) + va = min(v.names) + vz = max(v.names) + xa = min(x) + xz = max(x) + nv = length(v) + nx = length(x) + ncyc = xz - xa + 1 + nfullcyc = floor((xa-va)/ncyc) + firstfull = xa - nfullcyc * ncyc + ia = match(xz - (firstfull - va),x) + 1 + idx = c(seq(from=ia,to=nx,by=1),rep(1:nx,times=1+ceiling(nv/nx)))[1:nv] + v = v [v.names %in% x][idx] + ix = ix[idx] + names(v) = v.names + x = v.names + }else if (length(x) > length(v)){ + keep = intersect(x,as.numeric(names(v))) + ix = which(x %in% keep) + x = x[x %in% keep] + v = v[as.numeric(names(v)) %in% keep] + }else{ + ix = sequence(length(x)) + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Simplify the name of the method. # + #---------------------------------------------------------------------------------------# + if (length(method) != 1){ + stop(" Variable method must be scalar!") + }else{ + use = substring(tolower(method),1,1) + }#end if + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # Define some constants. # + #---------------------------------------------------------------------------------------# + nx = length(x) + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # Find the quantiles of each value of v using the empirical distribution function. # + #---------------------------------------------------------------------------------------# + v.ecdf = ecdf (v) + quant = v.ecdf(v) + quant = (quant - min(quant)) / (max(quant)-min(quant)) + dquant = mean(diff(quant)) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # If a is NA, we simply copy the values of X. If it is 0, then we just sample the # + # values with uniform distribution. # + #---------------------------------------------------------------------------------------# + if (is.na(a)){ + ans = list ( orig = x + , sample = x + , expect = mean(v) + , s.idx = ix + , quant = quant + , prob = rep(1/nx,times=nx) + )#end list + }else if (a == 0){ + s = sample(x=x,size=nx,replace=TRUE) + cnt = table(s) + prob = rep(0,times=nx) + idx = match(as.numeric(names(cnt)),x) + prob[idx] = cnt/nx + ans = list ( orig = x + , sample = x + , expect = mean(v) + , s.idx = ix[match(s,x)] + , quant = quant + , prob = prob + )#end list + }else if (use == "p"){ + + prob = abs(a) ^ (sign(a)*(1-2*quant)) + + s = sample(x=x,size=nx,replace=TRUE,prob=prob) + ans = list( orig = x + , sample = s + , expect = mean(v) + , s.idx = ix[match(s,x)] + , quant = quant + , prob = prob + )#end list + }else if (use == "l"){ + prob = inv.logit((a-sign(a))*(quant-0.5-0.01*a)) + s = sample(x=x,size=nx,replace=TRUE,prob=prob) + ans = list( orig = x + , sample = s + , expect = mean(v) + , s.idx = ix[match(s,x)] + , quant = quant + , prob = prob + )#end list + }else if (use == "b"){ + s = rep(NA,times=nx) + prob = abs(a) ^ (sign(a)*quant > sign(a)*0.5) + s[1] = sample(x=x,size=1,replace=TRUE,prob=prob) + for (i in 2:nx){ + prob = abs(a) ^ (sign(a)*(2*(quant > quant[i-1])-1)) + s[i] = sample(x=x,size=1,replace=TRUE,prob=prob) + }#end for + + cnt = table(s) + prob = rep(0,times=nx) + idx = match(as.numeric(names(cnt)),x) + prob[idx] = cnt/nx + ans = list( orig = x + , sample = s + , expect = mean(v) + , s.idx = ix[match(s,x)] + , quant = quant + , prob = prob + )#end list + }else if (use == "s"){ + #----- Find the skew normal statistics. ---------------------------------------------# + v.loc = sn.location(x=v,na.rm=TRUE) + v.scl = sn.scale (x=v,na.rm=TRUE) + v.shp = sn.shape (x=v,na.rm=TRUE) + #------------------------------------------------------------------------------------# + + + + #----- Modify the shape and location based on "a". ----------------------------------# + s.loc = v.loc + (round(a)-sign(a)) * 0.1 * v.scl + s.scl = v.scl + s.shp = v.shp + d.shp = round.log(abs(s.shp)) + q.100 = qsn(p=0.10,location=s.loc,scale=s.scl,shape=s.shp) + q.900 = qsn(p=0.90,location=s.loc,scale=s.scl,shape=s.shp) + v.min = min(v) + v.max = max(v) + #it = 0 + #while ( it < 50 && (q.100 < v.min || q.900 > v.max)){ + # it = it+1 + # s.scl = 0.99 * s.scl + # if (q.100 < v.min){ + # s.shp = s.shp + 0.1 * d.shp + # }#end if + # if (q.900 > v.max){ + # s.shp = s.shp - 0.1 * d.shp + # }#end if + # q.100 = qsn(p=0.10,location=s.loc,scale=s.scl,shape=s.shp) + # q.900 = qsn(p=0.90,location=s.loc,scale=s.scl,shape=s.shp) + #}#end while + #------------------------------------------------------------------------------------# + + + #----- Use the new statistics to find the new distribution. -------------------------# + v.goal = rsn(n=nx,location=s.loc,scale=s.scl,shape=s.shp) + s.idx = mapply(FUN=which.closest,x=v.goal,MoreArgs=list(A=v)) + s = x[s.idx] + cnt = table(s) + prob = rep(0,times=nx) + idx = match(as.numeric(names(cnt)),x) + prob[idx] = cnt/nx + ans = list( orig = x + , sample = s + , expect = mean(v) + , s.idx = ix[match(s,x)] + , quant = quant + , prob = prob + )#end list + #------------------------------------------------------------------------------------# + + }else{ + stop (paste(" Method ",method," is not recognised...",sep="")) + }#end if + #---------------------------------------------------------------------------------------# + + return(ans) +}#end function +#------------------------------------------------------------------------------------------# diff --git a/R-utils/simbrazil.r b/R-utils/simbrazil.r new file mode 100644 index 000000000..1156054b0 --- /dev/null +++ b/R-utils/simbrazil.r @@ -0,0 +1,123 @@ +#==========================================================================================# +#==========================================================================================# +# Function colourmap # +# # +# Given the x and y coordinates, this function will plot the vegetation values (sbrz) # +# with a colour scheme but no interpolation... # +#------------------------------------------------------------------------------------------# +simbrazil = function(x = seq(from=0,to=1,len=length(v)) + ,y = seq(from=0,to=1,len=length(v)) + ,z + ,xlim = range(x,finite=TRUE) + ,ylim = range(y,finite=TRUE) + ,zlim = range(v,finite=TRUE) + ,na.col="gray94",plot.title,plot.axes + ,asp=NA,xaxs="i",yaxs="i",las=1,axes=TRUE,frame.plot=axes,pch=15 + ,cex=1.0,...){ + + + sbrz.col = c("midnightblue","yellow3","gray24","forestgreen","chartreuse3","#004E00" + ,"orangered","lightgoldenrod4","gold","snow3","khaki3","saddlebrown" + ,"skyblue3",na.col) + sbrz.leg = c("H2O","PST","URB","2ND","SAV","FOR","SGC","SOY","MZE","CTN","RIC","BNC" + ,"FPL","UND") + n.sbrz = length(sbrz.leg) + sbrz.val = c(0,2,3,5,6,7,11,12,13,14,15,16,17,18) + sbrz.bks = c(sbrz.val[1]-0.5,sbrz.val+0.5) + sbrz.at = sequence(n.sbrz) + z[z == 18] = 6 + z[! z %in% sbrz.val] = 18 + + + #----- Check which kind of input was given. --------------------------------------------# + if (missing(z)) { + #----- No z was given x must be a list or the user didn't provide any axis... -------# + if (!missing(x)) { + if (is.list(x)) { + #----- X is a list, copy the elements to variables. ---------------------------# + z = x$z + y = x$y + x = x$x + }else{ + #----- x is an array, make up some x axis. ------------------------------------# + z = x + x = seq(0, 1, len = length(z)) + }#end if + }else{ + #----- Bad setting. -------------------------------------------------------------# + stop("no `z' variable specified") + }#end if + }else if (is.list(x)) { + #----- Z is there, just need to check whether x and y were given as a list... ------# + y = x$y + x = x$x + }#end if + + #----- Save the margins to avoid losing the data. --------------------------------------# + mar.orig = (par.orig = par(c("mar", "las", "mfrow")))$mar + on.exit(par(par.orig)) + + #----- Split the screen into 2. --------------------------------------------------------# + w = (3 + mar.orig[2]) * par("csi") * 2.54 + layout(matrix(c(2, 1), nc = 2), widths = c(1, lcm(w))) + par(las = las) + mar = mar.orig + mar[4] = mar[2] + mar[2] = 1 + + #----- First plot: the key scale. ------------------------------------------------------# + par(mar = mar) + plot.new() + #----- Decide whether the scale is logarithmic or not. ---------------------------------# + plot.window(xlim=c(0,1),ylim=c(0.5,n.sbrz+0.5),xaxs="i",yaxs="i") + + #----- Draw the colour bar. ------------------------------------------------------------# + rect(xleft=0,ybottom=seq(0.5,n.sbrz-0.5,1),xright=1,ytop=seq(1.5,n.sbrz+0.5,1) + ,col=sbrz.col,border="black") + + #----- Check whether there are specific instructions for plotting the key axis. --------# + if (axes){ + axis(side=4,at=sbrz.at,labels=sbrz.leg) + }#end if + + #----- Draw box. -----------------------------------------------------------------------# + box() + + #----- Now we plot the filled contour. -------------------------------------------------# + mar = mar.orig + mar[4] = 1 + par(mar = mar) + plot.new() + plot.window(xlim=xlim,ylim=ylim,log="", xaxs = xaxs, yaxs = yaxs, asp = asp) + + #---------------------------------------------------------------------------------------# + # Split z into the breaks defined by the colour palette. # + #---------------------------------------------------------------------------------------# + zcol = sbrz.col[match(z,sbrz.val)] + zcol[is.na(zcol)] = na.col + + #----- Call the function that actually plots the data. ---------------------------------# + image(x=x,y=y,z=z,add=TRUE,col=sbrz.col,breaks=sbrz.bks,...) + + #----- Check whether there are especial instructions for plotting the axes. ------------# + if (missing(plot.axes)) { + if (axes) { + axis(1) + axis(2) + } + }else{ + plot.axes + }#end if + + if (frame.plot) box() + #----- Check whether there are especial instructions for plotting the title. -----------# + if (missing(plot.title)){ + if (axes) title(main = "", xlab = "", ylab = "",...) + }else{ + plot.title + }#end if + + invisible() +}#end function simbrazil +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/skewnorm.stats.r b/R-utils/skewnorm.stats.r new file mode 100644 index 000000000..13e21711c --- /dev/null +++ b/R-utils/skewnorm.stats.r @@ -0,0 +1,401 @@ +n.min.skew.norm <<- 15 + + +#==========================================================================================# +#==========================================================================================# +# This function finds the location parameter for a skew normal distribution. In case # +# the distribution is not skewed, location parameter becomes the mean. # +#------------------------------------------------------------------------------------------# +sn.location = function(x,na.rm=FALSE,maxit=9999){ + #----- Stop if package fGarch isn't loaded. --------------------------------------------# + if (! "package:sn" %in% search()){ + stop("Function normal2skew requires package sn!") + }#end if + #---------------------------------------------------------------------------------------# + + + #----- If na.rm is TRUE, we select only the data that is finite. -----------------------# + if (na.rm){ + sel = is.finite(x) + xsel = x[sel] + }else{ + xsel = x + }#end if + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # The default is to try the maximum likelihood estimator. It is fast, but it # + # doesn't always converge. In case it fails, we fall back to EM algorithm, which is # + # more robust but a lot slower. If none of them work, then falls back to Gaussian, as # + # this usually happens when there are very few points, or all points being the same. # + #---------------------------------------------------------------------------------------# + myfit.mle = try(sn.mle(y=xsel,plot.it=FALSE,control=list(maxit=maxit)),silent=TRUE) + if ("try-error" %in% is(myfit.mle)){ + warning(" - MLE failed, falling back to EM") + converged = FALSE + }else{ + dp = cp.to.dp(myfit.mle$cp) + ans = dp[1] + converged = myfit.mle$optim$convergence == 0 + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Run EM if it failed. # + #---------------------------------------------------------------------------------------# + if (! converged){ + myfit.em = try(sn.em(y=xsel),silent=TRUE) + if ("try-error" %in% is(myfit.em)){ + #---------------------------------------------------------------------------------# + # Not enough point, assume Gaussian and warn the user... # + #---------------------------------------------------------------------------------# + warning("EM failed too, using mean instead.") + ans = mean(xsel,na.rm=TRUE) + #---------------------------------------------------------------------------------# + }else{ + ans = myfit.em$dp[1] + }#end if + }#end if + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Return the answer. # + #---------------------------------------------------------------------------------------# + return(ans) + #---------------------------------------------------------------------------------------# +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function finds the scale parameter for a skew normal distribution. In case # +# the distribution is not skewed, scale parameter becomes the standard deviation. # +#------------------------------------------------------------------------------------------# +sn.scale = function(x,na.rm=FALSE,maxit=9999){ + #----- Stop if package fGarch isn't loaded. --------------------------------------------# + if (! "package:sn" %in% search()){ + stop("Function normal2skew requires package sn!") + }#end if + #---------------------------------------------------------------------------------------# + + + #----- If na.rm is TRUE, we select only the data that is finite. -----------------------# + if (na.rm){ + sel = is.finite(x) + xsel = x[sel] + }else{ + xsel = x + }#end if + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # The default is to try the maximum likelihood estimator. It is fast, but it # + # doesn't always converge. In case it fails, we fall back to EM algorithm, which is # + # more robust but a lot slower. If none of them work, then falls back to Gaussian, as # + # this usually happens when there are very few points, or all points being the same. # + #---------------------------------------------------------------------------------------# + myfit.mle = try(sn.mle(y=xsel,plot.it=FALSE,control=list(maxit=maxit)),silent=TRUE) + if ("try-error" %in% is(myfit.mle)){ + warning(" - MLE failed, falling back to EM") + converged = FALSE + }else{ + dp = cp.to.dp(myfit.mle$cp) + ans = dp[2] + converged = myfit.mle$optim$convergence == 0 + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Run EM if it failed. # + #---------------------------------------------------------------------------------------# + if (! converged){ + myfit.em = try(sn.em(y=xsel),silent=TRUE) + if ("try-error" %in% is(myfit.em)){ + #---------------------------------------------------------------------------------# + # Not enough point, assume Gaussian and warn the user... # + #---------------------------------------------------------------------------------# + warning("EM failed too, using standard deviation instead.") + ans = sd(xsel,na.rm=TRUE) + #---------------------------------------------------------------------------------# + }else{ + ans = myfit.em$dp[2] + }#end if + }#end if + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Return the answer. # + #---------------------------------------------------------------------------------------# + return(ans) + #---------------------------------------------------------------------------------------# +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function finds the shape parameter for a skew normal distribution. In case # +# the distribution is not skewed, shape parameter becomes 0. # +#------------------------------------------------------------------------------------------# +sn.shape = function(x,na.rm=FALSE,maxit=9999){ + #----- Stop if package fGarch isn't loaded. --------------------------------------------# + if (! "package:sn" %in% search()){ + stop("Function normal2skew requires package sn!") + }#end if + #---------------------------------------------------------------------------------------# + + + #----- If na.rm is TRUE, we select only the data that is finite. -----------------------# + if (na.rm){ + sel = is.finite(x) + xsel = x[sel] + }else{ + xsel = x + }#end if + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # The default is to try the maximum likelihood estimator. It is fast, but it # + # doesn't always converge. In case it fails, we fall back to EM algorithm, which is # + # more robust but a lot slower. If none of them work, then falls back to Gaussian, as # + # this usually happens when there are very few points, or all points being the same. # + #---------------------------------------------------------------------------------------# + myfit.mle = try(sn.mle(y=xsel,plot.it=FALSE,control=list(maxit=maxit)),silent=TRUE) + if ("try-error" %in% is(myfit.mle)){ + warning(" - MLE failed, falling back to EM") + converged = FALSE + }else{ + dp = cp.to.dp(myfit.mle$cp) + ans = dp[3] + converged = myfit.mle$optim$convergence == 0 + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Run EM if it failed. # + #---------------------------------------------------------------------------------------# + if (! converged){ + myfit.em = try(sn.em(y=xsel),silent=TRUE) + if ("try-error" %in% is(myfit.em)){ + #---------------------------------------------------------------------------------# + # Not enough point, assume Gaussian and warn the user... # + #---------------------------------------------------------------------------------# + warning("EM failed too, using Gaussian (shape 0) instead.") + ans = 0. + #---------------------------------------------------------------------------------# + }else{ + ans = myfit.em$dp[3] + }#end if + }#end if + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Return the answer. # + #---------------------------------------------------------------------------------------# + return(ans) + #---------------------------------------------------------------------------------------# +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function finds the shape parameter for a skew normal distribution. In case # +# the distribution is not skewed, location parameter becomes the standard deviation. # +#------------------------------------------------------------------------------------------# +sn.converged = function(x,na.rm=FALSE){ + #----- Stop if package fGarch isn't loaded. --------------------------------------------# + if (! "package:sn" %in% search()){ + stop("Function normal2skew requires package sn!") + }#end if + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # The very least number of valid input data for skewed normal is 3. # + #---------------------------------------------------------------------------------------# + if (sum(is.finite(x)) < n.min.skew.norm){ + ans = FALSE + return(ans) + }#end if + #---------------------------------------------------------------------------------------# + + + #----- If na.rm is TRUE, we select only the data that is finite. -----------------------# + if (na.rm){ + sel = is.finite(x) + xsel = x[sel] + }else{ + xsel = x + }#end if + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Fit the skewed normal distribution. # + #---------------------------------------------------------------------------------------# + if (length(xsel) > n.min.skew.norm & sum(is.finite(xsel)) > n.min.skew.norm){ + #----- Possible to run the maximum likelihood method. -------------------------------# + myfit = sn.em(y=xsel) + ans = myfit$logL + }else{ + warning("Not enough data to determine skewed normal distribution.") + ans = FALSE + }#end if + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Return the answer. # + #---------------------------------------------------------------------------------------# + return(ans) + #---------------------------------------------------------------------------------------# +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + +#==========================================================================================# +#==========================================================================================# +# This function normalises the dataset, using the skewed normal distribution. The # +# output values is the normalised value equivalent to the normal distribution. # +#------------------------------------------------------------------------------------------# +skew2normal = function(x,location,scale,shape,idx=rep(1,times=length(x))){ + #----- Stop if package fGarch isn't loaded. --------------------------------------------# + if (! "package:sn" %in% search()){ + stop("Function normal2skew requires package sn!") + }#end if + #---------------------------------------------------------------------------------------# + + #------ Find the size of x. ------------------------------------------------------------# + nx = length(x) + #---------------------------------------------------------------------------------------# + + + #------ Find the number of possible indices. -------------------------------------------# + unique.idx = unique(idx) + nidx = length(unique.idx) + #---------------------------------------------------------------------------------------# + + + + #----- Stop if number of shapes . ------------------------------------------------------# + if ((length(location) != nidx) | (length(scale) != nidx) | (length(shape) != nidx)){ + stop(paste(" Length of statistics must match the number of unique indices: (" + ,nidx," in this case.",sep="")) + }#end if + #---------------------------------------------------------------------------------------# + + + + #------ Find the cumulative density function. ------------------------------------------# + cdf.skew = x * NA + for (n in 1:nidx){ + sel = is.finite(x) & idx == unique.idx[n] + stats.ok = is.finite(location[n]) && is.finite(scale[n]) && is.finite(shape[n]) + if (any(sel) && stats.ok){ + cdf.skew[sel] = psn(x[sel],location=location[n],scale=scale[n],shape=shape[n]) + }#end if + }#end for + #---------------------------------------------------------------------------------------# + + + + #------Find the equivalent quantile for the Gaussian distribution. ---------------------# + xnorm = qnorm(p=cdf.skew,mean=0,sd=1) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Return the answer. # + #---------------------------------------------------------------------------------------# + return(xnorm) + #---------------------------------------------------------------------------------------# +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + +#==========================================================================================# +#==========================================================================================# +# This function normalises the dataset, using the skewed normal distribution. The # +# output values is the normalised value equivalent to the normal distribution. # +#------------------------------------------------------------------------------------------# +normal2skew = function(xnorm,location,scale,shape,idx=rep(1,times=length(x))){ + #----- Stop if package fGarch isn't loaded. --------------------------------------------# + if (! "package:sn" %in% search()){ + stop("Function normal2skew requires package sn!") + }#end if + #---------------------------------------------------------------------------------------# + + + #------ Find the number of possible indices. -------------------------------------------# + unique.idx = unique(idx) + nidx = length(unique.idx) + #---------------------------------------------------------------------------------------# + + + + #----- Stop if number of shapes . ------------------------------------------------------# + if ((length(location) != nidx) | (length(scale) != nidx) | (length(shape) != nidx)){ + stop(paste(" Length of statistics must match the number of unique indices: (",nidx + ," in this case.",sep="")) + }#end if + #---------------------------------------------------------------------------------------# + + + #----- Find the cumulative distribution function of the normalised quantiles. ----------# + cdf.skew = pnorm(q=xnorm,mean=0,sd=1) + x = NA * cdf.skew + for (n in 1:nidx){ + sel = is.finite(cdf.skew) & idx == unique.idx[n] + stats.ok = is.finite(location[n]) && is.finite(scale[n]) && is.finite(shape[n]) + if (any(sel) && stats.ok){ + x[sel] = qsn(p=cdf.skew[sel],location=location[n],scale=scale[n],shape=shape[n]) + }#end if + }#end for + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Return the answer. # + #---------------------------------------------------------------------------------------# + return(x) + #---------------------------------------------------------------------------------------# +}#end function +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/skill.plot.r b/R-utils/skill.plot.r new file mode 100644 index 000000000..9bc3f5f6f --- /dev/null +++ b/R-utils/skill.plot.r @@ -0,0 +1,537 @@ +#==========================================================================================# +#==========================================================================================# +# Function skill.plot. This is based on Taylor diagrams, but instead of the model # +# variance, the axes are observed variance and residual variance. # +# # +# INPUT: # +# obs -- Observation, coerced to a single vector. # +# mod -- Modelled data. You can send multiple models, either as lists, # +# data.frame, or arrays, as long as one and only one dimension matches # +# the length of 'obs'. # +# mod.options -- List with further options to be sent to points when we actually plot # +# the data. # +# plot.obs -- Plot the target sign on the "sweetest spot" (perfect model) # +# obs.options -- List with further options to be sent to points when we plot the data # +# bias.lab -- Label for bias axis # +# r2.lab -- Label for coefficient of determination axis # +# rmse.lab -- Label for root mean square error axis # +# bias.lim -- Limits for bias axis (if NULL, use defaults). # +# r2.lim -- Limits for R2 axis (if NULL, use defaults). # +# main -- Main title # +# nobias.line -- Draw a line on zero bias? # +# nobias.options -- List with further options to be sent to nobias line (abline) # +# r2.grid -- Plot R2 "grid"? # +# r2.options -- List with further options to be sent to r2 grid plot (abline). # +# rmse.grid -- Plot the root mean square error [sqrt(bias^2+sigma_R^2)] # +# n.rmse -- Number of RMSE lines to draw (NULL means default). # +# rmse.options -- Options to be passed to rmse grid plot (lines). # +# cex.main -- Multiplication factor for the main title. # +# cex.xyzlab -- Multiplication factor for the axes labels (axis "titles"). # +# cex.xyzat -- Multiplication factor for xyz labels (axis "numbers") # +# n.parms -- Number of parameters, used to find the adjusted R2 (for output only). # +# The R2 scale in the plot is never the adjusted R2 so you can use the # +# same plot for different observations. # +# skill -- In case you want to add more data to an existing skill plot, you must # +# provide the object generated by a previous call, so it will adjust the # +# scale accordingly. Otherwise, leave this as NULL. # +# normali(s/z)e -- Should the axes be normalised? # +# ... -- Other par options that you may want to send to plot.window. # +#------------------------------------------------------------------------------------------# +skill.plot <<- function ( obs + , mod + , mod.options = list( col = "red" + , pch = 19 + , cex = 1.0 + , lty = "solid" + , lwd = 2.0 + )#end list + , plot.obs = TRUE + , obs.options = list(col="black",cex=2.0) + , bias.lab = "Mean bias" + , r2.lab = "Coefficient of determination" + , rmse.lab = "Root mean square error" + , main = "Skill diagram" + , bias.lim = NULL + , r2.lim = NULL + , nobias.line = TRUE + , nobias.options = list(col="mediumpurple1",lty="dotdash",lwd=2) + , sigma.grid = TRUE + , sigma.options = list(col="grey40",lty="dotted",lwd=1.2) + , r2.grid = TRUE + , r2.options = list(col="black",lty="dotdash",lwd=1.2) + , rmse.grid = TRUE + , n.rmse = NULL + , rmse.options = list(col="purple3",lty="dashed",lwd=1.2) + , cex.main = 1.0 + , cex.xyzlab = 1.0 + , cex.xyzat = 1.0 + , n.parms = NULL + , skill = NULL + , normalize + , normalise = ifelse( ! is.null(skill) + , skill$normalise + , ifelse( ! missing(normalize) + , normalize + , FALSE + )#end ifelse + )#end ifelse + , ... + ){ + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Check that the user sent obs and mod. # + #---------------------------------------------------------------------------------------# + dum = stopifnot(! missing(obs)) + dum = stopifnot(! missing(mod)) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Check whether to retrieve the previous information or not. # + #---------------------------------------------------------------------------------------# + add = ! is.null(skill) + if (! add) skill = list() + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Make sure that 'obs' is a vector, and that 'mod' is a list. # + #---------------------------------------------------------------------------------------# + #----- Reference. ----------------------------------------------------------------------# + obs = unlist (obs) + keep = is.finite(obs) + n.obs = length (obs) + #----- Check which type of variable "mod" is. ------------------------------------------# + if (is.list(mod)){ + #----- Make sure that dimensions match, otherwise leave "mod" as a list. ------------# + n.mod = sapply(X=mod,FUN=length) + if (any(n.mod) != n.obs && sum(n.mod) != n.obs){ + cat(" - Length(mod): ",paste(n.mod,collapse=" "),"\n") + cat(" - Length(obs):",n.obs,"\n") + stop(" Dimensions of 'mod' and 'obs' must match!") + }else if(sum(n.mod) == n.obs){ + warning(" Converting 'mod' from multiple lists to a single list...") + mod = list(unlist(mod)) + }#end if + #------------------------------------------------------------------------------------# + }else if(is.array(mod) || is.data.frame(mod)){ + #------------------------------------------------------------------------------------# + # "mod" is a matrix or array, find the matching dimension convert it to list. # + #------------------------------------------------------------------------------------# + dim.mod = dim(mod) + n.mod = length(mod) + n.dim = length(dim.mod) + o.dim = which(dim.mod == n.obs) + if (length(o.dim) == 0 && n.obs != n.obs){ + cat(" - Dim(mod) : ",paste(dim.mod,collapse=" "),"\n") + cat(" - Length(mod): ",n.mod ,"\n") + cat(" - Length(obs): ",n.obs ,"\n") + stop(" Either the length or one dimension of 'mod' must match 'obs' size!") + }else if(length(o.dim) == 0 && n.mod == n.obs){ + warning(" Converting array 'mod' to a vector...") + mod = list(unlist(mod[keep])) + }else if(length(o.dim) > 1){ + cat (" - Dim(mod) : ",paste(dim.mod,collapse=" "),"\n") + cat (" - Length(mod): ",n.mod ,"\n") + cat (" - Length(obs): ",n.obs ,"\n") + cat (" Ambiguous: 2 or more dimensions of 'mod' match the 'obs' length...","\n") + stop(" Hint: split the array 'mod' into a list and try again...") + }else{ + #----- Success! Split the array into lists. --------------------------------------# + mod = aperm(a = mod, perm = c(sequence(n.dim)[-o.dim],o.dim)) + mod = t(matrix(mod,nrow=prod(dim.mod[-o.dim]),ncol=dim.mod[o.dim])) + mod = split(mod, col(mod)) + #---------------------------------------------------------------------------------# + }#end if + #------------------------------------------------------------------------------------# + }else{ + #------------------------------------------------------------------------------------# + # "mod" is something else (probably a vector). Convert it to a list and hope # + # for the best... # + #------------------------------------------------------------------------------------# + mod = unlist(mod) + n.mod = length(mod) + if (n.mod != n.obs){ + cat (" - Length(mod): ",n.mod,"\n") + cat (" - Length(obs): ",n.obs,"\n") + stop(" Dimensions of 'mod' and 'obs' must match...") + }else{ + mod = list(unlist(mod)) + }#end if + #------------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------------# + + + + #----- Keep only the valid observations. -----------------------------------------------# + obs = obs[keep] + mod = lapply(X=mod,FUN="[",keep) + n.mod = sapply(X=mod,FUN=length) + #---------------------------------------------------------------------------------------# + + + #----- Find the residuals. -------------------------------------------------------------# + res = lapply(X=mod,FUN="-",obs ) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # If this plot is to be added, and the original plot was not normalised, make sure # + # that the sigma of the observations is the same. Otherwise, stop since the R2 axis # + # will not make sense. Also check whether the user gave a different 'normalise' # + # option from the original. In case so, warn the user that the function will ignore # + # the option but otherwise continue. # + #---------------------------------------------------------------------------------------# + if (add){ + if (! skill$normalise){ + sigma.obs = sd(x=obs,na.rm=TRUE) + if (skill$sigma.obs != sigma.obs){ + cat(" - Original sigma(obs) : ",skill$sigma.obs,"\n") + cat(" - Current sigma(obs) : ",sigma.obs ,"\n") + cat(" - Original 'normalise': ",skill$normalise,"\n") + stop("When adding points, the original plot must be normalised!") + }#end if (skill$sigma.obs != sigma.obs) + #---------------------------------------------------------------------------------# + }#end if (! skill$normalise) + #------------------------------------------------------------------------------------# + + + #----- Check for mismatch between options. ------------------------------------------# + if (normalise != skill$normalise){ + warning(" Using 'normalise' option from original plot instead...") + normalise = skill$normalise + }#end if + #------------------------------------------------------------------------------------# + }else{ + #---- First plot, save the normalise option. ----------------------------------------# + skill$normalise = normalise + #------------------------------------------------------------------------------------# + }#end if (add) + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # Find the coefficient of correlation and standard deviations, and a few additional # + # statistics to send back to the output. # + #---------------------------------------------------------------------------------------# + skill$mean.obs = mean (x = obs , na.rm = TRUE) + skill$mean.mod = sapply(X = mod, FUN = mean, na.rm = TRUE) + skill$mean.res = sapply(X = res, FUN = mean, na.rm = TRUE) + skill$sigma.obs = sd (x = obs , na.rm = TRUE) + skill$sigma.mod = sapply(X = mod, FUN = sd , na.rm = TRUE) + skill$sigma.res = sapply(X = res, FUN = sd , na.rm = TRUE) + skill$rmse = sqrt(skill$mean.res^2 + skill$sigma.res^2) + skill$df.obs = n.obs - 1 + skill$df.mod = ifelse( is.null(n.parms), n.mod - 1,n.mod-n.parms) + skill$r.squared = 1. - ( skill$sigma.res / skill$sigma.obs ) ^ 2 + skill$adj.r.squared = ifelse( is.null(n.parms) + , NA + , 1. - skill$df.obs / skill$df.mod + * ( skill$sigma.res / skill$sigma.obs ) ^ 2 + )#end ifelse + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Check whether to normalise or not, then find some local variables for plotting. # + #---------------------------------------------------------------------------------------# + skill$scale = ifelse(normalise,skill$sigma.obs,1.0) + sigma.obs = skill$sigma.obs / skill$scale + sigma.res = skill$sigma.res / skill$scale + mean.res = skill$mean.res / skill$scale + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # Check whether to draw a new plot or put more information on top of the previous # + # plot. # + #---------------------------------------------------------------------------------------# + if (! add){ + #------------------------------------------------------------------------------------# + # Check whether this is going to have bias (3D) or just the sigma of the errors. # + #------------------------------------------------------------------------------------# + #----- Save previous PAR settings. --------------------------------------------------# + par.all = par(no.readonly=FALSE) + par.orig = par(no.readonly=TRUE ) + #------------------------------------------------------------------------------------# + + + + + #------------------------------------------------------------------------------------# + # Find limits for bias. # + #------------------------------------------------------------------------------------# + if (is.null(bias.lim)){ + #------ Find the range, making sure that 0 is always included. -------------------# + bias.max = max(mean.res) + bias.min = min(mean.res) + if (bias.min > 0 && bias.max > 0){ + #----- All biases are positive. Coerce maximum to be zero. -------------------# + bias.min = 0 + }else if (bias.min < 0 && bias.max < 0){ + #----- All biases are negative. Coerce maximum to be zero. -------------------# + bias.max = 0 + }else{ + #----- Biases switch sign. Coerce them to be simmetric. ----------------------# + bias.min = min(bias.min,-bias.max) + bias.max = max(-bias.min,bias.max) + }#end if + #---------------------------------------------------------------------------------# + + + + #------ Correct the limits so the "pretty" axis has the last word. ---------------# + bias.lim = c(bias.min,bias.max) + bias.at = sort(unique(c(0,pretty(bias.lim)))) + bias.lim = range(c(bias.lim,bias.at)) + #---------------------------------------------------------------------------------# + }else{ + bias.lim = range(c(0,sort(bias.lim))) + bias.at = sort(unique(c(0,pretty(bias.lim)))) + bias.at = bias.at[bias.at >= bias.lim[1] & bias.at <= bias.lim[2]] + }#end if + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Find limits for R2. # + #------------------------------------------------------------------------------------# + if (is.null(r2.lim)){ + #----- Expand the sigma a bit so edge points won't be cropped. -------------------# + sigma.max = 1.04 * max(sigma.res) + #---------------------------------------------------------------------------------# + + #----- Find the R2 range associated with this sigma.max. -------------------------# + r2.lim = c(1.0 - ( sigma.max / sigma.obs )^2 , 1.0) + #---------------------------------------------------------------------------------# + + #---------------------------------------------------------------------------------# + # Find a nice range for R2, but force the maximum to be 1.0 and the scale to # + # decrease (as high sigma means low R2). # + #---------------------------------------------------------------------------------# + r2.at = pretty(r2.lim) + r2.at = sort(unique(c(1.,r2.at[r2.at <= 1.])),decreasing=TRUE) + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # Correct the sigma scale based on R2 and update the maximum sigma. # + #---------------------------------------------------------------------------------# + sigma.at = sigma.obs * sqrt(1. - r2.at) + sigma.lim = range(sigma.obs * sqrt(1. - r2.lim)) + sigma.max = max(sigma.lim) + #---------------------------------------------------------------------------------# + }else{ + r2.lim = range(c(r2.lim,1)) + r2.at = sort(unique(c(pretty(r2.lim),1.)),decreasing=TRUE) + r2.at = sort (r2.at[r2.at >= r2.lim[1] & r2.at <= 1.],decreasing=TRUE) + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # Correct the sigma scale based on R2 and update the maximum sigma. # + #---------------------------------------------------------------------------------# + sigma.at = sigma.obs * sqrt(1. - r2.at) + sigma.lim = range(sigma.obs * sqrt(1. - r2.lim)) + sigma.max = max(sigma.lim) + #---------------------------------------------------------------------------------# + }#end if + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Find the limits for RMSE. # + #------------------------------------------------------------------------------------# + rmse.lim = c(0,max(sqrt(bias.lim^2 + sigma.max^2))) + if (is.null(n.rmse)){ + rmse.at = pretty(rmse.lim) + }else{ + rmse.at = pretty(c(0,max(rmse)),n=n.rmse) + }#end if + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Save all plot ranges to the output. # + #------------------------------------------------------------------------------------# + skill$plot = list( bias.lim = bias.lim , bias.at = bias.at + , r2.lim = r2.lim , r2.at = r2.at + , sigma.lim = sigma.lim, sigma.at = sigma.at + , rmse.lim = rmse.lim , rmse.at = rmse.at + )#end list + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Define some settings that will be useful throughout the function. # + #------------------------------------------------------------------------------------# + half = seq(from=0,to=180,by=0.5) * pio180 + quarter = seq(from=0,to= 90,by=0.5) * pio180 + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Open the plotting and start the plot. # + #------------------------------------------------------------------------------------# + par(...) + plot.new() + plot.window(x=bias.lim,y=sigma.lim,xaxs="i",yaxs="i",...) + box() + title(main=main,xlab=bias.lab,ylab=r2.lab,cex.lab=cex.xyzlab,cex.main=cex.main) + axis(side=1,at=bias.at ,labels=bias.at,cex.axis=cex.xyzat,las=1) + axis(side=2,at=sigma.at,labels=r2.at ,cex.axis=cex.xyzat,las=1) + #------------------------------------------------------------------------------------# + + + + + + #------------------------------------------------------------------------------------# + # Plot the bias and R2 grid. # + #------------------------------------------------------------------------------------# + if (r2.grid){ + r2.options.now = modifyList(x=r2.options,val=list(h=sigma.at)) + do.call(what="abline",args=r2.options.now) + }#end if + if (nobias.line){ + nobias.options.now = modifyList(x=nobias.options,val=list(v=0)) + do.call(what="abline",args=nobias.options.now) + }#end if + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Root mean square error grid. # + #------------------------------------------------------------------------------------# + if (rmse.grid){ + rmse.use = rmse.at[rmse.at > 0] + n.rmse = length(rmse.use) + for (n in 1:n.rmse){ + #----- Find the curve for this RMSE. ------------------------------------------# + x.rmse = rmse.use[n] * cos(half) + y.rmse = rmse.use[n] * sin(half) + #------------------------------------------------------------------------------# + + + + #----- Discard points that would go outside the plot. -------------------------# + bye = ( x.rmse < bias.lim[1] | x.rmse > bias.lim[2] + | y.rmse < 0 | y.rmse > sigma.max ) + x.rmse[bye] = NA + y.rmse[bye] = NA + #------------------------------------------------------------------------------# + + + if (! all(bye)){ + #----- Plot lines. ---------------------------------------------------------# + rmse.options.now = modifyList(x = rmse.options,val=list(x=x.rmse,y=y.rmse)) + do.call(what="lines",args=rmse.options.now) + #---------------------------------------------------------------------------# + + + + #----- Plot label. ---------------------------------------------------------# + idx = floor(quantile(which(! bye),probs=1/4)) + boxed.options = modifyList( x = rmse.options + , val = list( x = x.rmse[idx] + , y = y.rmse[idx] + , labels = rmse.use[n] + , border = FALSE + )#end list + )#end modifyList + do.call(what="boxed.labels",args=boxed.options) + #---------------------------------------------------------------------------# + }#end if (! all(bye)) + #------------------------------------------------------------------------------# + }#end for (n in 1:n.rmse) + #---------------------------------------------------------------------------------# + + #----- Plot RMSE title on the right side. ----------------------------------------# + rmse.options.now = modifyList( x = rmse.options + , val = list( text = rmse.lab + , side = 4 + , srt = -90 + , outer = FALSE + , line = 1 + )#end list + )#end modifyList + do.call(what="mtext",args=rmse.options.now) + #---------------------------------------------------------------------------------# + + }#end if (sigma.grid) + #------------------------------------------------------------------------------------# + + + + + #------------------------------------------------------------------------------------# + # Check whether to plot a target point showing the sweetest spot. # + #------------------------------------------------------------------------------------# + if (plot.obs){ + xyz = list(x = 0, y = 0) + + #----- Correct point size and append to the lists. -------------------------------# + cex.big = 1.0 * ifelse("cex" %in% names(obs.options),obs.options$cex,1.0) + cex.small = 2/3 * ifelse("cex" %in% names(obs.options),obs.options$cex,1.0) + xyz.big = list(x=0,y=0,cex=cex.big ,type="p",pch=21) + xyz.small = list(x=0,y=0,cex=cex.small,type="p",pch=16) + obs.options.big = modifyList(x=obs.options,val=xyz.big ) + obs.options.small = modifyList(x=obs.options,val=xyz.small) + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # Draw points. # + #---------------------------------------------------------------------------------# + par(xpd=TRUE) + do.call (what="points",args=obs.options.small) + do.call (what="points",args=obs.options.big ) + par(xpd=par.all$xpd) + #---------------------------------------------------------------------------------# + }#end if (plot.obs) + #------------------------------------------------------------------------------------# + }#end if (! add) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Check whether there will be any point falling outside the plot region and warn # + # the user. # + #---------------------------------------------------------------------------------------# + if ( any(mean.res < skill$bias.lim[1] | mean.res > skill$bias.lim[2]) + | any(sigma.res < skill$sigma.lim[1] | sigma.res > skill$sigma.lim[2]) ){ + warning(" Some points are outside the plotting area!") + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Plot the points summarising the errors. # + #---------------------------------------------------------------------------------------# + mod.options.now = modifyList(x=mod.options,val=list(x=mean.res,y=sigma.res,type="p")) + do.call(what="points",args=mod.options.now) + #---------------------------------------------------------------------------------------# + + return(skill) +}#end function +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/soilutils.r b/R-utils/soilutils.r new file mode 100644 index 000000000..28cca6668 --- /dev/null +++ b/R-utils/soilutils.r @@ -0,0 +1,359 @@ +#==========================================================================================# +#==========================================================================================# +# This variable has the "edges" of all soil types. # +#------------------------------------------------------------------------------------------# +stext.lines = list() +stext.lines[[ 1]] = list(sand=c(0.900,0.850),clay=c(0.100,0.000)) +stext.lines[[ 2]] = list(sand=c(0.850,0.700),clay=c(0.150,0.000)) +stext.lines[[ 3]] = list(sand=c(0.800,0.525),clay=c(0.200,0.200)) +stext.lines[[ 4]] = list(sand=c(0.520,0.525),clay=c(0.200,0.075)) +stext.lines[[ 5]] = list(sand=c(0.425,0.525),clay=c(0.075,0.075)) +stext.lines[[ 6]] = list(sand=c(0.225,0.500),clay=c(0.275,0.000)) +stext.lines[[ 7]] = list(sand=c(0.200,0.075),clay=c(0.000,0.125)) +stext.lines[[ 8]] = list(sand=c(0.075,0.000),clay=c(0.125,0.125)) +stext.lines[[ 9]] = list(sand=c(0.525,0.450),clay=c(0.200,0.275)) +stext.lines[[10]] = list(sand=c(0.450,0.000),clay=c(0.275,0.275)) +stext.lines[[11]] = list(sand=c(0.200,0.200),clay=c(0.275,0.400)) +stext.lines[[12]] = list(sand=c(0.650,0.450),clay=c(0.350,0.350)) +stext.lines[[13]] = list(sand=c(0.450,0.450),clay=c(0.275,0.550)) +stext.lines[[14]] = list(sand=c(0.450,0.000),clay=c(0.400,0.400)) +stext.lines[[15]] = list(sand=c(0.200,0.000),clay=c(0.400,0.600)) +stext.lines[[16]] = list(sand=c(0.300,0.000),clay=c(0.400,0.700)) +stext.lines[[17]] = list(sand=c(0.300,0.300),clay=c(0.400,0.700)) +stext.lines[[18]] = list(sand=c(0.300,0.000),clay=c(0.700,0.700)) +nstext.lines = length(stext.lines) +for(n in 1:nstext.lines){ + stext.lines[[n]]$silt = pmax(0,pmin(1,1.-stext.lines[[n]]$sand-stext.lines[[n]]$clay)) +}#end for +#==========================================================================================# +#==========================================================================================# + + +#==========================================================================================# +#==========================================================================================# +# This function finds the soil parameters. # +#------------------------------------------------------------------------------------------# +soil.params = function(ntext,isoilflg,slxsand,slxclay){ + #----- Define some prescribed fractions. -----------------------------------------------# + xsand.def = c( 0.920, 0.825, 0.660, 0.200, 0.410, 0.590 + , 0.100, 0.320, 0.520, 0.060, 0.200, 0.200 + , 0.333, 0.075, 0.100, 0.375, 0.125) + xclay.def = c( 0.030, 0.060, 0.110, 0.160, 0.170, 0.270 + , 0.340, 0.340, 0.420, 0.470, 0.600, 0.200 + , 0.333, 0.050, 0.800, 0.525, 0.525) + + soil.name = c("Sand","Loamy sand","Sandy loam","Silt loam","Loam","Sandy clay loam" + ,"Silty clay loam","Clayey loam","Sandy clay","Silty clay","Clay" + ,"Peat","Bedrock","Silt","Heavy clay","Clayey sand","Clayey silt") + #----- Define some constants. ----------------------------------------------------------# + fieldcp.K = 0.1 # hydraulic conduct. at field capacity [ mm/day] + soilcp.MPa = 3.1 # soil-water potential for air dry soil [ MPa] + soilwp.MPa = 1.5 # soil-water potential at wilting point [ MPa] + soilld.MPa = 0.75 # soil-water potential that plants start dropping leaves [ MPa] + soilfr.MPa = 1.40 # soil-water potential that triggers fires [ MPa] + theta.crit = 0.11 # fractional soil moisture that plants start dropping leaves [ m3/m3] + sm.fire = 0.08 # fractional soil moisture that triggers fires [ m3/m3] + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Soil heat capacity. Didn't find silt values, using average between sand and clay # + #---------------------------------------------------------------------------------------# + sand.hcap = 2.128e6 + clay.hcap = 2.385e6 + silt.hcap = .5 * (sand.hcap + clay.hcap) + air.hcap = 1212 + #---------------------------------------------------------------------------------------# + + + #----- Initialise the list with meaningless parameters. --------------------------------# + mysoil = list( ntext = NA + , name = NA + , xsand = NA + , xclay = NA + , xsilt = NA + , slbs = 0. + , slpots = 0. + , slcons = 0. + , slmsts = 0. + , sfldcap = 0. + , soilcp = 0. + , soilwp = 0. + , slcpd = 0. + , thcr.orig = 0. + , thcr.spot = 0. + , fire.orig = 0. + , fire.spot = 0. + , slpotcp = 0. + , slpotwp = 0. + , slpotfc = 0. + , slpotld = 0. + , slpotfr = 0. + )#end list + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find soil class and sand, silt, and clay fractions. # + #---------------------------------------------------------------------------------------# + if (isoilflg == 2 & slxsand > 0 & slxclay > 0 & (slxsand + slxclay) < 1 ){ + mysoil$ntext = sclass(slxsand,slxclay) + mysoil$name = soil.name[mysoil$ntext] + mysoil$xsand = slxsand + mysoil$xclay = slxclay + mysoil$xsilt = 1. - mysoil$xsand - mysoil$xclay + }else{ + mysoil$ntext = ntext + mysoil$name = soil.name[mysoil$ntext] + mysoil$xsand = xsand.def[ntext] + mysoil$xclay = xclay.def[ntext] + mysoil$xsilt = 1. - mysoil$xsand - mysoil$xclay + }#end if + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # Set up primary properties. # + #---------------------------------------------------------------------------------------# + if (mysoil$ntext == 13){ + #----- Bedrock. Most things are zero, because it is an impermeable soil. -----------# + mysoil$slbs = 0. + mysoil$slpots = 0. + mysoil$slcons = 0. + mysoil$slmsts = 0. + mysoil$sfldcap = 0. + mysoil$soilcp = 0. + mysoil$soilwp = 0. + mysoil$slcpd = 2130000. + #------------------------------------------------------------------------------------# + }else if (mysoil$ntext == 12){ + #------------------------------------------------------------------------------------# + # Peat. High concentration of organic matter. Mineral soil equations don't # + # apply here. # + #------------------------------------------------------------------------------------# + mysoil$slbs = 6.180000 + mysoil$slpots = -0.534564359 + mysoil$slcons = 2.357930e-6 + mysoil$slmsts = 0.469200 + mysoil$sfldcap = 0.285709966 + mysoil$slcpd = 874000. + #------------------------------------------------------------------------------------# + }else{ + #------------------------------------------------------------------------------------# + # Mineral soil. Use the standard ED-2.2 equations. # + #------------------------------------------------------------------------------------# + mysoil$slbs = 3.10 + 15.7*mysoil$xclay - 0.3*mysoil$xsand + mysoil$slpots = -0.01 * (10.^(2.17 - 0.63*mysoil$xclay - 1.58*mysoil$xsand)) + mysoil$slcons = ( (10.^(-0.60 + 1.26*mysoil$xsand - 0.64*mysoil$xclay)) + * 0.0254/hr.sec ) + mysoil$slmsts = (50.5 - 14.2*mysoil$xsand - 3.7*mysoil$xclay) / 100. + mysoil$sfldcap = ( mysoil$slmsts * ( (fieldcp.K/1000./day.sec)/mysoil$slcons) + ^ (1. / (2.*mysoil$slbs+3.)) ) + mysoil$slcpd = ( (1. - mysoil$slmsts) + * ( mysoil$xsand * sand.hcap + mysoil$xsilt * silt.hcap + + mysoil$xclay * clay.hcap ) + + 0.5 * (mysoil$slmsts - mysoil$soilcp) * air.hcap ) + #------------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Calculate the derived properties in case this is not bedrock. # + #---------------------------------------------------------------------------------------# + if (mysoil$ntext != 13){ + mysoil$slpotcp = - soilcp.MPa * 1000. / grav + mysoil$slpotwp = - soilwp.MPa * 1000. / grav + mysoil$slpotld = - soilld.MPa * 1000. / grav + mysoil$slpotfr = - soilfr.MPa * 1000. / grav + mysoil$soilcp = mpot2smoist(mysoil$slpotcp, mysoil) + mysoil$soilwp = mpot2smoist(mysoil$slpotwp, mysoil) + mysoil$thcr.orig = mysoil$soilwp + theta.crit * (mysoil$slmsts - mysoil$soilwp) + mysoil$fire.orig = mysoil$soilcp + sm.fire * (mysoil$slmsts - mysoil$soilcp) + mysoil$thcr.spot = mpot2smoist(mysoil$slpotld, mysoil) + mysoil$fire.spot = mpot2smoist(mysoil$slpotfr, mysoil) + mysoil$slpotfc = smoist2mpot(mysoil$sfldcap, mysoil) + }#end if + #---------------------------------------------------------------------------------------# + return(mysoil) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + +#==========================================================================================# +#==========================================================================================# +# This function determines the soil class based on the fraction of sand, clay, and # +# silt separates. # +#------------------------------------------------------------------------------------------# +sclass = function(sandfrac,clayfrac){ + + #----- Define the percentage of sand, clay, and silt. ----------------------------------# + sand = 100. * sandfrac + clay = 100. * clayfrac + silt = 100. - sand - clay + #---------------------------------------------------------------------------------------# + + #---------------------------------------------------------------------------------------# + # Here there is not much we can do other than explore where in the triangle space # + # we are. # + #---------------------------------------------------------------------------------------# + + if (silt > 100. | silt < 0. | sand > 100. | sand < 0. | clay > 100. | clay < 0. ) { + print("---------------------------------------------------") + print(" At least one of your percentages is screwy...") + print(paste("SAND = ",sprintf("%.2f",sand),"%",sep="")) + print(paste("CLAY = ",sprintf("%.2f",clay),"%",sep="")) + print(paste("SILT = ",sprintf("%.2f",silt),"%",sep="")) + print("---------------------------------------------------") + stop ("This soil doesn''t fit into any category...") + + }else if(sand > 85.0 + 0.5 * clay) { + mysoil = 1 #----- Sand. ------------------------------------------------------------# + }else if(sand > 70.0 + clay) { + mysoil = 2 #----- Loamy sand. ------------------------------------------------------# + }else if((clay <= 20.0 & sand > 52.5) | (clay <= 7.5 & silt <= 50.0)) { + mysoil = 3 #----- Sandy loam. ------------------------------------------------------# + }else if((clay <= 27.5 & silt > 50.0 & silt <= 80.0) | (silt > 80.0 & clay > 12.5)) { + mysoil = 4 #----- Silt loam. -------------------------------------------------------# + }else if(clay > 7.5 & clay <= 27.5 & silt > 27.5 & silt <= 50.0 & sand <= 52.5) { + mysoil = 5 #----- Loam. ------------------------------------------------------------# + }else if(clay > 20.0 & clay <= 35.0 & silt <= 27.5 & sand > 45.0) { + mysoil = 6 #----- Sandy clay loam. -------------------------------------------------# + }else if(clay > 27.5 & clay <= 40.0 & sand <= 20.0) { + mysoil = 7 #----- Silty clay loam. -------------------------------------------------# + }else if(clay > 27.5 & clay <= 40.0 & sand > 20.0 & sand <= 45.0) { + mysoil = 8 #----- Clayey loam. -----------------------------------------------------# + }else if(clay > 35.0 & sand > 45.0) { + mysoil = 9 #----- Sandy clay. ------------------------------------------------------# + }else if(clay > 40.0 & silt > 40.0) { + mysoil = 10 #----- Silty clay. ------------------------------------------------------# + }else if(clay <= 70.0 & sand <= 30.0 & silt <= 30.0) { + mysoil = 11 #----- Clay. ------------------------------------------------------------# + }else if( silt > 80.0 & clay <= 12.5) { + mysoil = 14 #----- Silt. ------------------------------------------------------------# + }else if( clay > 70.0) { + mysoil = 15 #----- Heavy clay. ------------------------------------------------------# + }else if( clay > 40.0 & sand > 30.0 & sand <= 45.0) { + mysoil = 16 #----- Clayey sand. -----------------------------------------------------# + }else if( clay > 40.0 & silt > 30.0 & silt <= 40.0) { + mysoil = 17 #----- Clayey silt. -----------------------------------------------------# + }else{ + print("---------------------------------------------------") + print(paste("SAND = ",sprintf("%.2f",sand),"%",sep="")) + print(paste("CLAY = ",sprintf("%.2f",clay),"%",sep="")) + print(paste("SILT = ",sprintf("%.2f",silt),"%",sep="")) + print("---------------------------------------------------") + stop ("This soil doesn''t fit into any category...") + }#end if + + return(mysoil) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function normalises the soil moisture as a function of some of the most # +# important references. This is not a linear scale, but it helps deciding how dry or wet # +# the soil is, and how easy or hard is to evaporate. # +# The scale is linear between the important points: # +# -1. : Residual water (dry air soil moisture) # +# 0. : Wilting point # +# 1. : Field capacity # +# 2. : Porosity (saturation) # +#------------------------------------------------------------------------------------------# +soil.scale = function(soil.water,soil){ + low = soil.water < soil$soilcp + dry = soil.water <= soil$soilwp + mid = soil.water > soil$soilwp & soil.water <= soil$sfldcap + wet = soil.water > soil$sfldcap + sat = soil.water > soil$slmsts + + sindex = soil.water + sindex[low] = - 1. + sindex[dry] = - 1. + (soil.water[dry] - soil$soilcp ) / (soil$soilwp - soil$soilcp ) + sindex[mid] = 0. + (soil.water[mid] - soil$soilwp ) / (soil$sfldcap - soil$soilwp ) + sindex[wet] = + 1. + (soil.water[wet] - soil$sfldcap) / (soil$slmsts - soil$sfldcap) + sindex[sat] = + 1. + + return(sindex) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function normalises the soil moisture as a function of some of the most # +# important references. This is not a linear scale, but it helps deciding how dry or wet # +# the soil is, and how easy or hard is to evaporate. # +# The scale is linear between the important points: # +# -1. : Residual water (dry air soil moisture) # +# 0. : Wilting point # +# 1. : Field capacity # +# 2. : Porosity (saturation) # +#------------------------------------------------------------------------------------------# +soil.idx2water = function(soil.index,soil){ + soil.index[soil.index < -1.0] = -1.0 + soil.index[soil.index > +2.0] = +2.0 + dry = soil.index <= 0.0 + mid = soil.index > 0.0 & soil.index <= 1.0 + wet = soil.index > 1.0 + + swater = soil.index + + swater[dry] = soil$soilcp + (soil.index[dry] + 1.0) * (soil$soilwp - soil$soilcp ) + swater[mid] = soil$soilwp + (soil.index[mid] + 0.0) * (soil$sfldcap - soil$soilwp ) + swater[wet] = soil$sfldcap + (soil.index[wet] - 1.0) * (soil$slmsts - soil$sfldcap) + + return(swater) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +smoist2mpot = function(smoist,mysoil){ + smfrac = smoist / mysoil$slmsts + mpot = mysoil$slpots / smfrac ^ mysoil$slbs + return(mpot) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +mpot2smoist = function(mpot,mysoil){ + smfrac = ( mpot / mysoil$slpots) ^ (-1. / mysoil$slbs) + smoist = smfrac * mysoil$slmsts + return(smoist) +}#end function +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/solid.angle.r b/R-utils/solid.angle.r new file mode 100644 index 000000000..6303d1ef8 --- /dev/null +++ b/R-utils/solid.angle.r @@ -0,0 +1,69 @@ +#------------------------------------------------------------------------------------------# +# This function computes the solid angle or the area associated, of a "rectangle" # +# defined by two pairs of coordinates, representing the Southwestern and Northeaster # +# corners. # +# # +# INPUTS. # +# 1. sw = Southwestern corner (1st. column = longitude, 2nd column = latitude). # +# 2. ne = Northeastern corner (1st. column = longitude, 2nd column = latitude). # +# 3. degrees = Are the longitude and latitude given in degrees? (Default: TRUE) # +# 4. radius = Radius of the sphere. The default, 1, gives the solid angle. # +#------------------------------------------------------------------------------------------# +solid.angle = function(sw,ne,degrees=TRUE,radius=1.){ + + #----- Assigning the multiplication factor ---------------------------------------------# + if (degrees){ + fact = pi/180. + }else{ + fact = 1.0 + }#end if + #---------------------------------------------------------------------------------------# + + + + + + #---------------------------------------------------------------------------------------# + # Break the coordinates into vectors, and convert the coordinates to radians. # + #---------------------------------------------------------------------------------------# + #----- 1. Southwestern corner. ---------------------------------------------------------# + if (is.data.frame(sw) || is.matrix(sw)){ + wlon = sw[,1] * fact + slat = sw[,2] * fact + }else if(is.vector(sw) && length(sw) == 2){ + wlon = sw[1] * fact + slat = sw[2] * fact + }else{ + stop("sw must be a data frame, a matrix, or a vector of length 2...") + }#end if + #----- 2. Northeastern corner. ---------------------------------------------------------# + if (is.data.frame(ne) || is.matrix(ne)){ + elon = ne[,1] * fact + nlat = ne[,2] * fact + }else if(is.vector(ne) && length(ne) == 2){ + elon = ne[1] * fact + nlat = ne[2] * fact + }else{ + stop("sw must be a data frame, a matrix, or a vector of length 2...") + }#end if + #---------------------------------------------------------------------------------------# + + + + + + + #---------------------------------------------------------------------------------------# + # If the rectangle crosses the date line or Greenwich, it may happen that elon is # + # less than elon. Make sure that this is corrected. # + #---------------------------------------------------------------------------------------# + sel = elon < wlon + elon[sel] = elon[sel] + 2 * pi + + #----- Compute the solid angle. --------------------------------------------------------# + omega = ( sin(nlat) - sin(slat) ) * ( elon - wlon ) * radius * radius + + + return(omega) +}#end function +#------------------------------------------------------------------------------------------# diff --git a/R-utils/sombreado.r b/R-utils/sombreado.r new file mode 100644 index 000000000..b9ad84183 --- /dev/null +++ b/R-utils/sombreado.r @@ -0,0 +1,137 @@ +#==========================================================================================# +#==========================================================================================# +# Function sombreado # +# # +# This function is exactly the same as filled.contour, but without the black lines # +# between the colours in the scale... # +#------------------------------------------------------------------------------------------# +sombreado = function(x=seq(from=0,to=1,len=nrow(z)),y=seq(from=0,to=1,len=ncol(z)),z + ,xlim=range(x,finite=TRUE),ylim=range(y,finite=TRUE) + ,zlim=range(z,finite=TRUE) + ,levels = if (key.log){ + pretty.log(x=z,n=nlevels) + }else{ + pretty(x=z,n=nlevels) + }#end if + ,nlevels=100,colour.palette=color.palette,color.palette=cm.colors + ,col=colour.palette(length(levels)-1) + ,plot.title,plot.axes,xlog=FALSE,ylog=FALSE,key.title,key.axes + ,key.log=FALSE,asp=NA,interp=TRUE + ,xaxs="i",yaxs="i",las=1,axes=TRUE,frame.plot=axes,...){ + + #----- Check which kind of input was given. --------------------------------------------# + if (missing(z)) { + #----- No z was given x must be a list or the user didn't provide any axis... -------# + if (!missing(x)) { + if (is.list(x)) { + #----- X is a list, copy the elements to variables. ---------------------------# + z = x$z + y = x$y + x = x$x + }else{ + #----- x is an array, make up some x axis. ------------------------------------# + z = x + x = seq(0, 1, len = nrow(z)) + }#end if + }else{ + #----- Bad setting. -------------------------------------------------------------# + stop("no `z' matrix specified") + }#end if + }else if (is.list(x)) { + #----- Z is there, just need to check whether x and y were given as a list... ------# + y = x$y + x = x$x + }#end if + + #----- Check whether the z matrix makes sense or not. ----------------------------------# + if (!is.matrix(z) || nrow(z) <= 1 || ncol(z) <= 1){ + stop("no proper `z' matrix specified") + }else if(!is.double(z)){ + storage.mode(z) = "double" + }#end if + + #----- No messed-up axes are allowed, they must increase. ------------------------------# + if (any(diff(x) <= 0) || any(diff(y) <= 0)){ + stop("increasing x and y values expected") + }#end if + + #----- Save the margins to avoid losing the data. --------------------------------------# + par.orig = par(c("mar", "las", "mfrow")) + mar.orig = par.orig$mar + on.exit(par(par.orig)) + + #----- Split the screen into 2. --------------------------------------------------------# + w = (3 + mar.orig[2]) * par("csi") * 2.54 + layout(matrix(c(2, 1), nc = 2), widths = c(1, lcm(w))) + par(las = las) + mar = mar.orig + mar[4] = mar[2] + mar[2] = 1 + + #----- First plot: the key scale. ------------------------------------------------------# + par(mar = mar) + plot.new() + #----- Decide whether the scale is logarithmic or not. ---------------------------------# + if (key.log){ + plot.window(xlim=c(0,1),ylim=range(levels),xaxs="i",yaxs="i",log="y") + }else{ + plot.window(xlim=c(0,1),ylim=range(levels),xaxs="i",yaxs="i") + }#end if + + #----- Draw the colour bar. ------------------------------------------------------------# + rect(xleft=0,ybottom=levels[-length(levels)],xright=1,ytop=levels[-1],col=col + ,border=col) + + #----- Check whether there are specific instructions for plotting the key axis. --------# + if (missing(key.axes)) { + if (axes) axis(side=4,...) + }else{ + key.axes + }#end if + + #----- Draw box. -----------------------------------------------------------------------# + box() + + #----- Plot the title. -----------------------------------------------------------------# + if (!missing(key.title)) key.title + + #----- Make the log variable for the main window. --------------------------------------# + plog="" + if (xlog) plog=paste(plog,"x",sep="") + if (ylog) plog=paste(plog,"y",sep="") + + #----- Now we plot the filled contour. -------------------------------------------------# + mar = mar.orig + mar[4] = 1 + par(mar = mar) + plot.new() + plot.window(xlim=xlim,ylim=ylim,log=plog, xaxs = xaxs, yaxs = yaxs, asp = asp) + + #----- Call the function that actually plots the data. ---------------------------------# + if (interp){ + .Internal(filledcontour(as.double(x), as.double(y), z, as.double(levels),col = col)) + }else{ + image(x=x,y=y,z=z,breaks=levels,col=col) + }#end if + #----- Check whether there are especial instructions for plotting the axes. ------------# + if (missing(plot.axes)) { + if (axes) { + axis(1) + axis(2) + } + }else{ + plot.axes + }#end if + + if (frame.plot) box() + #----- Check whether there are especial instructions for plotting the title. -----------# + if (missing(plot.title)){ + if (axes) title(main = "", xlab = "", ylab = "",...) + }else{ + plot.title + }#end if + + invisible() +}#end function sombreado +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/southammap.r b/R-utils/southammap.r new file mode 100644 index 000000000..db8763b7b --- /dev/null +++ b/R-utils/southammap.r @@ -0,0 +1,64 @@ +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +# This function plots the map for South America, including Brazilian states. # +#------------------------------------------------------------------------------------------# +southammap <<- function(mapdir=NULL,...){ + if (is.null(mapdir)){ + arquivo = file.path(srcdir,"samap","americadosul") + }else{ + arquivo = file.path(mapdir,"americadosul") + }#end if + americadosul = read.table(arquivo,na.string="999") + names(americadosul) = c("lon","lat") + lines(x=americadosul,...) +} #end function +#------------------------------------------------------------------------------------------# + + + + + +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +# This function plots the map for South America, including Brazilian states. This is # +# useful for when running lattice package. # +#------------------------------------------------------------------------------------------# +panel.southammap <<- function(mapdir=NULL,...){ + if (is.null(mapdir)){ + arquivo = file.path(srcdir,"samap","americadosul") + }else{ + arquivo = file.path(mapdir,"americadosul") + }#end if + americadosul = read.table(arquivo,na.string="999") + names(americadosul) = c("lon","lat") + panel.points(x=americadosul,type="l",...) +} #end function +#------------------------------------------------------------------------------------------# + + + + + +#------------------------------------------------------------------------------------------# +#------------------------------------------------------------------------------------------# +# This function plots the map for South America, including Brazilian states. # +#------------------------------------------------------------------------------------------# +southammap3d <<- function(height=0,pmat,xlim=NULL,ylim=NULL,mapdir=NULL,...){ + if (is.null(mapdir)){ + arquivo = file.path(srcdir,"samap","americadosul") + }else{ + arquivo = file.path(mapdir,"americadosul") + }#end if + americadosul = read.table(arquivo,na.string="999") + names(americadosul) = c("lon","lat") + if (! is.null(xlim)){ + sel = americadosul$lon >= xlim[1] & americadosul$lon <= xlim[2] + americadosul = americadosul[sel,] + }#end if + if (! is.null(ylim)){ + sel = americadosul$lat >= ylim[1] & americadosul$lat <= ylim[2] + americadosul = americadosul[sel,] + }#end if + lines(trans3d(x=americadosul$lon,y=americadosul$lat,z=height,pmat),...) +} #end function +#------------------------------------------------------------------------------------------# diff --git a/R-utils/sw.test.r b/R-utils/sw.test.r new file mode 100644 index 000000000..26f772f3d --- /dev/null +++ b/R-utils/sw.test.r @@ -0,0 +1,155 @@ +#==========================================================================================# +#==========================================================================================# +# This method performs the Shapiro-Wilk test for normality. It doesn't check the # +# size of the matrix for data sets bigger than 5000. In case the vector has size less # +# than 3, we return NA instead of crashing. # +#------------------------------------------------------------------------------------------# +sw.test <<- function(x){ + + #----- Keep only the finite data. -------------------------------------------------------# + x = sort(x[is.finite(x)]) + n = length(x) + #----------------------------------------------------------------------------------------# + + + + #----- Find the basic statistics for this distribution and the expected values. ---------# + P.x = (sequence(n)-0.5)/n + mean.x = mean (x) + sd.x = sd (x) + E.x = qnorm(p=P.x,mean=mean.x,sd=sd.x) + #----------------------------------------------------------------------------------------# + + + + #----------------------------------------------------------------------------------------# + # There must be at least three valid numbers to be able to test the distribution. # + #----------------------------------------------------------------------------------------# + if (n < 3){ + ans = list ( statistic = NA + , p.value = NA + , confident = FALSE + )#end list + return(ans) + warning(" Sample size is too small for a Shapiro-Wilk test...") + }else{ + confident = n <= 5000 + + + #----- Find a vector with standard random distribution and same size as X. -----------# + m = qnorm((sequence(n)-0.375)/(n+0.25),mean=0,sd=1) + mt = t(m) + #-------------------------------------------------------------------------------------# + + + + #-------------------------------------------------------------------------------------# + # Decide which method to use based on the kurtosis. # + #-------------------------------------------------------------------------------------# + if (kurt(x) > 3){ + #----------------------------------------------------------------------------------# + # Use Shapiro-Francia as the sample is leptokurtic. The Shapiro-Francia # + # statistic W is calculated to avoid excessive rounding errors for W close to 1 # + # (a potential problem in very large samples). # + #----------------------------------------------------------------------------------# + + + + #----- Find the weigths. ----------------------------------------------------------# + a = m / sqrt(sum(m^2)) + #----------------------------------------------------------------------------------# + + + #----- Find the W statistic. ------------------------------------------------------# + W = sum(a * x) ^2 / sum((x-mean.x)^2) + #----------------------------------------------------------------------------------# + + + #----------------------------------------------------------------------------------# + # Find the standardised W. # + #----------------------------------------------------------------------------------# + mu = -1.2725 + ( 1.05210 * ( log(log(n)/n) ) ) + sigma = 1.0308 - ( 0.26758 * ( log(log(n)) + 2/log(n) ) ) + p.value = 1.0 - 2. * abs(pnorm(q=log(1.0-W),mean=mu,sd=sigma)-0.5) + #----------------------------------------------------------------------------------# + }else{ + #----------------------------------------------------------------------------------# + # Use the traditional Shapiro-Wilk test as the sample is platykurtic. # + #----------------------------------------------------------------------------------# + cc = m / sqrt(sum(m^2)) + uu = 1. / sqrt(n) + #----------------------------------------------------------------------------------# + + + #----------------------------------------------------------------------------------# + # Find the weights. # + #----------------------------------------------------------------------------------# + a = rep(0,times=n) + #----- Edges. We must check whether n is 3 or greater. ---------------------------# + if (n == 3){ + a[ 1] = 0.707106781 + a[ n] = - a[1] + }else{ + a[ n] = ( cc[n ] + 0.221157 * uu - 0.147981 * uu^2 - 2.071190 * uu^3 + + 4.434685 * uu^4 - 2.706056 * uu^5 ) + a[ 1] = - a[ n] + }#end if + #----- Other values, fit according to the size. -----------------------------------# + if (n < 6){ + ia = 2 + iz = n - 1 + phi = ( sum(m^2) - 2 * m[n]^2 ) / ( 1 - 2 * a[n]^2 ) + }else{ + a[n-1] = ( cc[n-1] + 0.042981 * uu - 0.293762 * uu^2 - 1.752461 * uu^3 + + 5.682633 * uu^4 - 3.582633 * uu^5 ) + a[ 2] = - a[n-1] + ia = 3 + iz = n - 2 + phi = ( ( sum(m^2) - 2. * m[ n]^2 - 2. * m[n-1]^2 ) + / ( 1. - 2. * a[ n]^2 - 2. * a[n-1]^2 ) ) + }#end if + #----- These are the same as the Shapiro-Wilk test for small samples. -------------# + a[ia:iz] = m[ia:iz] / sqrt(phi) + #----------------------------------------------------------------------------------# + + + #---- Find the W statistic. -------------------------------------------------------# + W = (sum(a*x))^2 / sum( (x-mean.x)^2) + #----------------------------------------------------------------------------------# + + + + #----------------------------------------------------------------------------------# + # Find the derived statistics. # + #----------------------------------------------------------------------------------# + if (n == 3){ + p.value = 1.0 - 2.0 * ( 1.909859 * (asin(sqrt(W)) - 1.047198) - 1.0 ) + }else if (n < 11){ + mu = 0.54400 - 0.399780 * n + 0.02505400 * n^2 - 0.0006714 * n^3 + sigma = exp(1.38220 - 0.778570 * n + 0.06276700 * n^2 - 0.0020322 * n^3) + gam = -2.27300 + 0.459000 * n + p.value = 1.0 - 2.0 * abs(pnorm(q=-log(gam-log(1.-W)),mean=mu,sd=sigma)-0.5) + }else{ + ln = log(n) + mu = -1.58610 - 0.310820 * ln - 0.08375100 * ln^2 + 0.00389150 * ln^3 + sigma = exp(-0.48030 - 0.082676 * ln + 0.00303020 * ln^2 ) + p.value = 1.0 - 2.0 * abs( pnorm(q=log(1.0-W),mean=mu,sd=sigma) - 0.5 ) + }#end if + #----------------------------------------------------------------------------------# + }#end if + + + #-------------------------------------------------------------------------------------# + # Return the statistics and the p-value. # + #-------------------------------------------------------------------------------------# + ans = list ( statistic = W + , p.value = p.value + , confident = confident + )#end list + return(ans) + #-------------------------------------------------------------------------------------# + }#end if + #----------------------------------------------------------------------------------------# +}#end sw.test +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/taxonutils.r b/R-utils/taxonutils.r new file mode 100644 index 000000000..87204a374 --- /dev/null +++ b/R-utils/taxonutils.r @@ -0,0 +1,2219 @@ +#==========================================================================================# +#==========================================================================================# +# Global variables to define plant properties. # +#------------------------------------------------------------------------------------------# +mypfts <<- c(2,3,4) +pft.dens <<- c(0.53,0.71,0.90) +pft.names <<- c("Early tropical","Mid tropical","Late tropical") +n.pfts <<- length(mypfts) +pft.breaks <<- c(-Inf,pft.dens[2:n.pfts]-0.5*diff(pft.dens),Inf) +#------------------------------------------------------------------------------------------# + + + + + +#==========================================================================================# +#==========================================================================================# +# This function standardises the spelling of common names of trees. Based on # +# Santarem survey, but feel free to add more. # +#------------------------------------------------------------------------------------------# +standard.common.name <<- function(x){ + + #----- Full replacements. --------------------------------------------------------------# + sel = (! is.na(x) & x == "araticu" ); x[sel] = "araticum" + sel = (! is.na(x) & x == "baubarana" ); x[sel] = "embaubarana" + sel = (! is.na(x) & x == "breu/louro preto?" ); x[sel] = NA + sel = (! is.na(x) & x == "babao" ); x[sel] = "macauba" + sel = (! is.na(x) & x == "bolao" ); x[sel] = "fava-bolota" + sel = (! is.na(x) & x == "brau" ); x[sel] = "breu" + sel = (! is.na(x) & x == "cauba" ); x[sel] = "macacauba" + sel = (! is.na(x) & x == "cajuba" ); x[sel] = "caju" + sel = (! is.na(x) & x == "castanha" ); x[sel] = "castanha do para" + sel = (! is.na(x) & x == "castanheiro" ); x[sel] = "castanha do para" + sel = (! is.na(x) & x == "cipo(dbh a 0.9m do chao)"); x[sel] = "cipo" + sel = (! is.na(x) & x == "cipo+arapo" ); x[sel] = "cipo" + sel = (! is.na(x) & x == "cutiti" ); x[sel] = "abiu cutite" + sel = (! is.na(x) & x == "cutite" ); x[sel] = "abiu cutite" + sel = (! is.na(x) & x == "cruzeiro" ); x[sel] = "quina-cruzeiro" + sel = (! is.na(x) & x == "envira surucu" ); x[sel] = "envira surucucu" + sel = (! is.na(x) & x == "fiora preta" ); x[sel] = NA + sel = (! is.na(x) & x == "jambo" ); x[sel] = "jambo-do-mato" + sel = (! is.na(x) & x == "jara" ); x[sel] = "jarana" + sel = (! is.na(x) & x == "jito" ); x[sel] = "gito" + sel = (! is.na(x) & x == "louro?" ); x[sel] = "louro" + sel = (! is.na(x) & x == "maracatia" ); x[sel] = "muiracatiara" + sel = (! is.na(x) & x == "mata pau+jito" ); x[sel] = "gito" + sel = (! is.na(x) & x == "muruci" ); x[sel] = "muruci da mata" + sel = (! is.na(x) & x == "palmito" ); x[sel] = "acai" + sel = (! is.na(x) & x == "palmito babosa" ); x[sel] = "acai" + sel = (! is.na(x) & x == "patua" ); x[sel] = "pataua" + sel = (! is.na(x) & x == "quariquara" ); x[sel] = "acariquara" + sel = (! is.na(x) & x == "tachi preto ???" ); x[sel] = "tachi preto" + sel = (! is.na(x) & x == "tachi preto folh" ); x[sel] = "tachi preto" + sel = (! is.na(x) & x == "tento folha" ); x[sel] = "tento" + sel = (! is.na(x) & x == "saboeiro" ); x[sel] = "fava-saboeiro" + sel = (! is.na(x) & x == "saboiera" ); x[sel] = "fava-saboeiro" + sel = (! is.na(x) & x == "seringa" ); x[sel] = "seringueira" + sel = (! is.na(x) & x == "sajinera" ); x[sel] = NA + sel = (! is.na(x) & x == "sorveira" ); x[sel] = "sorva" + sel = (! is.na(x) & x == "sorvo" ); x[sel] = "sorva" + sel = (! is.na(x) & x == "sova" ); x[sel] = "sorva" + sel = (! is.na(x) & x == "tatapiririca verm." ); x[sel] = "tatapiririca vermelha" + sel = (! is.na(x) & x == "umbia" ); x[sel] = "goiabarana" + #---------------------------------------------------------------------------------------# + + + + #----- Substitutions. Only things that are not part of other words. -------------------# + x = sub(pattern="abacaba" ,replacement="bacaba" ,x=x) + x = sub(pattern="abicuiba" ,replacement="ucuuba" ,x=x) + x = sub(pattern="abiui" ,replacement="abiu" ,x=x) + x = sub(pattern="abiu casca grossa" ,replacement="abiu-casca-grossa" ,x=x) + x = sub(pattern="abiu cutite folha verde",replacement="abiu cutite" ,x=x) + x = sub(pattern="abiu mangabinha" ,replacement="abiu-mangabinha" ,x=x) + x = sub(pattern="abiu vermelha" ,replacement="abiu vermelho" ,x=x) + x = sub(pattern="abiuarana vermelha" ,replacement="abiurana vermelha" ,x=x) + x = sub(pattern="abiuarana vermelho" ,replacement="abiurana vermelha" ,x=x) + x = sub(pattern="abiuarana vermlho" ,replacement="abiurana vermelha" ,x=x) + x = sub(pattern="abiurana vermelho" ,replacement="abiurana vermelha" ,x=x) + x = sub(pattern="abiuarana" ,replacement="abiurana" ,x=x) + x = sub(pattern="acoita cavalo" ,replacement="acoita-cavalo" ,x=x) + x = sub(pattern="algodoeira" ,replacement="sumauma" ,x=x) + x = sub(pattern="amalelinha" ,replacement="amarelinho" ,x=x) + x = sub(pattern="amarelinha" ,replacement="amarelinho" ,x=x) + x = sub(pattern="amerelinho" ,replacement="amarelinho" ,x=x) + x = sub(pattern="angelim margoso" ,replacement="angelim amargoso" ,x=x) + x = sub(pattern="angelim pedro" ,replacement="angelim pedra" ,x=x) + x = sub(pattern="apuii" ,replacement="apui" ,x=x) + x = sub(pattern="araca nego" ,replacement="araca" ,x=x) + x = sub(pattern="barbatimao" ,replacement="fava-barbatimao" ,x=x) + x = sub(pattern="bolao" ,replacement="fava bolota" ,x=x) + x = sub(pattern="brejauba" ,replacement="brejauva" ,x=x) + x = sub(pattern="breu sucuuba" ,replacement="breu sucuruba" ,x=x) + x = sub(pattern="cabeca de urubu" ,replacement="cabeca-de-urubu" ,x=x) + x = sub(pattern="cabela" ,replacement="louro canela" ,x=x) + x = sub(pattern="cabriuna" ,replacement="cabriuva" ,x=x) + x = sub(pattern="cacau bravo" ,replacement="cacaui" ,x=x) + x = sub(pattern="cachudinha" ,replacement="cascudinha" ,x=x) + x = sub(pattern="calcho" ,replacement="caucho" ,x=x) + x = sub(pattern="canela de velho" ,replacement="canela-de-velho" ,x=x) + x = sub(pattern="canelha velha" ,replacement="canela-de-velho" ,x=x) + x = sub(pattern="canella de jacami" ,replacement="canela-de-jacamim" ,x=x) + x = sub(pattern="canella ge jacami" ,replacement="canela-de-jacamim" ,x=x) + x = sub(pattern="canniela" ,replacement="canela" ,x=x) + x = sub(pattern="carobia" ,replacement="caroba" ,x=x) + x = sub(pattern="cascudinho" ,replacement="cascudinha" ,x=x) + x = sub(pattern="cascudo" ,replacement="cascudinha" ,x=x) + x = sub(pattern="castanha de sapocaia" ,replacement="castanha sapucaia" ,x=x) + x = sub(pattern="castanha de sapucaia" ,replacement="castanha sapucaia" ,x=x) + x = sub(pattern="castanha sapocaia" ,replacement="castanha sapucaia" ,x=x) + x = sub(pattern="cauxo" ,replacement="caucho" ,x=x) + x = sub(pattern="caxeta" ,replacement="caixeta" ,x=x) + x = sub(pattern="caximbeira" ,replacement="cachimbeiro" ,x=x) + x = sub(pattern="caximbeiro" ,replacement="cachimbeiro" ,x=x) + x = sub(pattern="caxudinha" ,replacement="cascudinha" ,x=x) + x = sub(pattern="chocolate" ,replacement="cacau" ,x=x) + x = sub(pattern="coracao de negro" ,replacement="coracao-de-negro" ,x=x) + x = sub(pattern="coracao de nego" ,replacement="coracao-de-negro" ,x=x) + x = sub(pattern="coracao de negro" ,replacement="coracao-de-negro" ,x=x) + x = sub(pattern="corante de indio" ,replacement="urucum" ,x=x) + x = sub(pattern="coro preto" ,replacement="louro preto" ,x=x) + x = sub(pattern="coussarea racemosa" ,replacement="caferana" ,x=x) + x = sub(pattern="cutiti" ,replacement="cutite" ,x=x) + x = sub(pattern="cumari" ,replacement="cumaru" ,x=x) + x = sub(pattern="cumaru/apui" ,replacement="apui" ,x=x) + x = sub(pattern="embauba branco" ,replacement="embauba branca" ,x=x) + x = sub(pattern="embauba vick" ,replacement="embauba" ,x=x) + x = sub(pattern="embirata" ,replacement="envira ata" ,x=x) + x = sub(pattern="embireira branca" ,replacement="envira" ,x=x) + x = sub(pattern="embireira rosa" ,replacement="envira" ,x=x) + x = sub(pattern="envira preto" ,replacement="envira preta" ,x=x) + x = sub(pattern="envira vermelho" ,replacement="envira vermelha" ,x=x) + x = sub(pattern="escorrega macaco" ,replacement="escorrega-macaco" ,x=x) + x = sub(pattern="escurrega macaco" ,replacement="escorrega-macaco" ,x=x) + x = sub(pattern="fava arara tucupi" ,replacement="fava-arara-tucupi" ,x=x) + x = sub(pattern="fava saboeira" ,replacement="fava-saboeira" ,x=x) + x = sub(pattern="feijo branco" ,replacement="freijo branco" ,x=x) + x = sub(pattern="figueira brava" ,replacement="figueira" ,x=x) + x = sub(pattern="gameleiro" ,replacement="gameleira" ,x=x) + x = sub(pattern="gapeba" ,replacement="abiu" ,x=x) + x = sub(pattern="guapeba" ,replacement="abiu" ,x=x) + x = sub(pattern="gema de ovo" ,replacement="amarelao" ,x=x) + x = sub(pattern="genipapo" ,replacement="jenipapo" ,x=x) + x = sub(pattern="goibarana" ,replacement="goiabarana" ,x=x) + x = sub(pattern="gombeira vermelho" ,replacement="gombeira vermelha" ,x=x) + x = sub(pattern="goiaba" ,replacement="araca" ,x=x) + x = sub(pattern="guaiaba" ,replacement="araca" ,x=x) + x = sub(pattern="guaiba" ,replacement="araca" ,x=x) + x = sub(pattern="guariuva" ,replacement="guariuba" ,x=x) + x = sub(pattern="ibirucu" ,replacement="embirucu" ,x=x) + x = sub(pattern="imbirata" ,replacement="envira ata" ,x=x) + x = sub(pattern="imbireira" ,replacement="envira" ,x=x) + x = sub(pattern="imbireira rosa" ,replacement="envira" ,x=x) + x = sub(pattern="imbiricu" ,replacement="embirucu" ,x=x) + x = sub(pattern="imbirucu" ,replacement="embirucu" ,x=x) + x = sub(pattern="inga f.p." ,replacement="inga" ,x=x) + x = sub(pattern="inga vermelha" ,replacement="inga vermelho" ,x=x) + x = sub(pattern="inga titica" ,replacement="inga xixica" ,x=x) + x = sub(pattern="ipe amerelo" ,replacement="ipe amarelo" ,x=x) + x = sub(pattern="jaboticaba" ,replacement="jabuticaba" ,x=x) + x = sub(pattern="jaracatia" ,replacement="jacaratia" ,x=x) + x = sub(pattern="jenita" ,replacement="janita" ,x=x) + x = sub(pattern="jotobazinho" ,replacement="jatobazinho" ,x=x) + x = sub(pattern="jutai mirim" ,replacement="jutai-mirim" ,x=x) + x = sub(pattern="jutai acu" ,replacement="jutai-acu" ,x=x) + x = sub(pattern="laranginha" ,replacement="laranjinha" ,x=x) + x = sub(pattern="leiteiro" ,replacement="leiteira" ,x=x) + x = sub(pattern="leitera" ,replacement="leiteira" ,x=x) + x = sub(pattern="louro branco" ,replacement="louro" ,x=x) + x = sub(pattern="loro amarelo" ,replacement="louro amarelo" ,x=x) + x = sub(pattern="mamao jacatia" ,replacement="jacaratia" ,x=x) + x = sub(pattern="maracatiara" ,replacement="muiracatiara" ,x=x) + x = sub(pattern="mata-mata" ,replacement="matamata" ,x=x) + x = sub(pattern="mata mata" ,replacement="matamata" ,x=x) + x = sub(pattern="matamata branca" ,replacement="matamata branco" ,x=x) + x = sub(pattern="matamata vermelha" ,replacement="matamata vermelho" ,x=x) + x = sub(pattern="mata caldo" ,replacement="mata-calado" ,x=x) + x = sub(pattern="melanciera" ,replacement="melancieira" ,x=x) + x = sub(pattern="moratinga" ,replacement="muiratinga" ,x=x) + x = sub(pattern="muratinga" ,replacement="muiratinga" ,x=x) + x = sub(pattern="morta" ,replacement="defunta" ,x=x) + x = sub(pattern="murucidu mata" ,replacement="muruci da mata" ,x=x) + x = sub(pattern="muiriatinga" ,replacement="muiratinga" ,x=x) + x = sub(pattern="mutama" ,replacement="mutambo" ,x=x) + x = sub(pattern="mutamba" ,replacement="mutambo" ,x=x) + x = sub(pattern="ocooba" ,replacement="ucuuba" ,x=x) + x = sub(pattern="ocuuba" ,replacement="ucuuba" ,x=x) + x = sub(pattern="ouro branco" ,replacement="seringueira" ,x=x) + x = sub(pattern="papa terra" ,replacement="papaterra" ,x=x) + x = sub(pattern="papa-terra" ,replacement="papaterra" ,x=x) + x = sub(pattern="para para" ,replacement="parapara" ,x=x) + x = sub(pattern="para-para" ,replacement="parapara" ,x=x) + x = sub(pattern="papo de mutum" ,replacement="pato-de-mutum" ,x=x) + x = sub(pattern="passarinhiera" ,replacement="passarinheira" ,x=x) + x = sub(pattern="pata de vaca" ,replacement="pata-de-vaca" ,x=x) + x = sub(pattern="paineira" ,replacement="sumauma" ,x=x) + x = sub(pattern="pao de sangue" ,replacement="pau-sangue" ,x=x) + x = sub(pattern="pau de arco" ,replacement="pau-de-arco" ,x=x) + x = sub(pattern="pau d.arco" ,replacement="pau-de-arco" ,x=x) + x = sub(pattern="pau de cobra" ,replacement="pau-cobra" ,x=x) + x = sub(pattern="pau de colher" ,replacement="pau-de-colher" ,x=x) + x = sub(pattern="pau de jacare" ,replacement="pau-jacare" ,x=x) + x = sub(pattern="pau de remo" ,replacement="pau-de-remo" ,x=x) + x = sub(pattern="pau de sangue" ,replacement="pau-sangue" ,x=x) + x = sub(pattern="pau jacare" ,replacement="pau-jacare" ,x=x) + x = sub(pattern="pau para tudo" ,replacement="pau-para-tudo" ,x=x) + x = sub(pattern="pau pereira" ,replacement="peroba mica" ,x=x) + x = sub(pattern="pau sangue" ,replacement="pau-sangue" ,x=x) + x = sub(pattern="pente de macaco" ,replacement="pente-de-macaco" ,x=x) + x = sub(pattern="perna de moca" ,replacement="perna-de-moca" ,x=x) + x = sub(pattern="piquiazeiro" ,replacement="piquia" ,x=x) + x = sub(pattern="piqui rosa" ,replacement="piquia" ,x=x) + x = sub(pattern="prapara" ,replacement="parapara" ,x=x) + x = sub(pattern="quaiquara" ,replacement="acariquara" ,x=x) + x = sub(pattern="quariquari" ,replacement="acariquara" ,x=x) + x = sub(pattern="quari quari" ,replacement="acariquara" ,x=x) + x = sub(pattern="quina cruzeiro" ,replacement="quina-cruzeiro" ,x=x) + x = sub(pattern="quina quina" ,replacement="quinaquina" ,x=x) + x = sub(pattern="quina-quina" ,replacement="quinaquina" ,x=x) + x = sub(pattern="muida" ,replacement="miuda" ,x=x) + x = sub(pattern="roxao" ,replacement="roxinho" ,x=x) + x = sub(pattern="roxinao" ,replacement="roxinho" ,x=x) + x = sub(pattern="segador" ,replacement="cegador" ,x=x) + x = sub(pattern="seritinga" ,replacement="seringueira" ,x=x) + x = sub(pattern="sorveira leite" ,replacement="sorva" ,x=x) + x = sub(pattern="taxi" ,replacement="tachi" ,x=x) + x = sub(pattern="tachi branca" ,replacement="tachi branco" ,x=x) + x = sub(pattern="tachi preta" ,replacement="tachi preto" ,x=x) + x = sub(pattern="tachi vermelha" ,replacement="tachi vermelho" ,x=x) + x = sub(pattern="tauri" ,replacement="tauari" ,x=x) + x = sub(pattern="talquari" ,replacement="tauari" ,x=x) + x = sub(pattern="tamarindu" ,replacement="azedinha" ,x=x) + x = sub(pattern="tamarino" ,replacement="azedinha" ,x=x) + x = sub(pattern="tento foha grauda" ,replacement="tento folha grauda" ,x=x) + x = sub(pattern="ucuarana" ,replacement="urucurana" ,x=x) + x = sub(pattern="ucuuba terra firme" ,replacement="ucuuba-terra-firme" ,x=x) + x = sub(pattern="ucuuba tf" ,replacement="ucuuba-terra-firme" ,x=x) + x = sub(pattern="uruucurana" ,replacement="urucurana" ,x=x) + x = sub(pattern="ucuuba vermelho" ,replacement="ucuuba vermelha" ,x=x) + x = sub(pattern="uchi" ,replacement="uxi" ,x=x) + x = sub(pattern="unha de vaca" ,replacement="pata-de-vaca" ,x=x) + x = sub(pattern="verdadiera" ,replacement="verdadeira" ,x=x) + x = sub(pattern="xixua" ,replacement="chichua" ,x=x) + #---------------------------------------------------------------------------------------# + + return(x) +}#end function standard.common.name +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function corrects scientific names and families that are not correctly typed, # +# are synonyms or have become obsolete. # +#------------------------------------------------------------------------------------------# +standard.scientific.name <<- function(dat){ + #---------------------------------------------------------------------------------------# + # First we make sure all scientific names and families have the genus and family # + # capitalised (e.g. scientific name: Araucaria angustifolia; family: Araucariaceae. # + #---------------------------------------------------------------------------------------# + nplants = nrow(dat) + #----- Remove cf., assume that we know all species for sure. ---------------------------# + dat$scientific = sub("cf.","",x=dat$scientific) + #----- Break into genus and species. ---------------------------------------------------# + gs.list = sapply(X = tolower(dat$scientific),FUN=strsplit,split=" ") + gs.length = sapply(X = gs.list, FUN = length) + gs.mat = do.call(rbind,gs.list) + g.only = gs.length < 2 + gs.mat[g.only,2] = NA + g = capwords(gs.mat[,1],strict=TRUE) + s = tolower(gs.mat[,2]) + g.s = paste(g,s,sep=" ") + g.s[is.na(g) & is.na(s)] = NA + #---------------------------------------------------------------------------------------# + + #---------------------------------------------------------------------------------------# + # Full substitutions (only if the entire name matches). # + #---------------------------------------------------------------------------------------# + g.s[g.s == "Dialium sp" ] = "Dialium" + g.s[g.s == "Eugenia sp."] = "Eugenia" + #---------------------------------------------------------------------------------------# + + #---------------------------------------------------------------------------------------# + # Substitutions of scientific name. We standardise these first so family becomes # + # easier. # + #---------------------------------------------------------------------------------------# + g.s = sub("Agonadra sp." ,"Agonandra" ,x=g.s) + g.s = sub("Aiouea densiflora" ,"Aiouea laevis" ,x=g.s) + g.s = sub("Allophyllus floribunda" ,"Allophylus floribundus" ,x=g.s) + g.s = sub("Ampelocera endentula" ,"Ampelocera edentula" ,x=g.s) + g.s = sub("Amphirrhox surinamensis" ,"Amphirrhox longifolia" ,x=g.s) + g.s = sub("Anadenanthera falcata" ,"Anadenanthera peregrina" ,x=g.s) + g.s = sub("Aniba roseodora" ,"Aniba rosaeodora" ,x=g.s) + g.s = sub("Aniba sp." ,"Aniba" ,x=g.s) + g.s = sub("Annona decicoma" ,"Annona densicoma" ,x=g.s) + g.s = sub("Apeiba burchelii" ,"Apeiba glabra" ,x=g.s) + g.s = sub("Aspidosperma aracanga" ,"Aspidosperma araracanga" ,x=g.s) + g.s = sub("Aspidosperma auriculata" ,"Aspidosperma auriculatum" ,x=g.s) + g.s = sub("Aspidosperma desmantum" ,"Aspidosperma desmanthum" ,x=g.s) + g.s = sub("Aspidosperma desmathum" ,"Aspidosperma desmanthum" ,x=g.s) + g.s = sub("Aspidosperma eteanun" ,"Aspidosperma eteanum" ,x=g.s) + g.s = sub("Aspidosperma nitidum" ,"Aspidosperma excelsum" ,x=g.s) + g.s = sub("Astronium le-cointei" ,"Astronium lecointei" ,x=g.s) + g.s = sub("Austroplenckia populnea" ,"Plenckia populnea" ,x=g.s) + g.s = sub("Balisia pedicelares" ,"Albizia pedicellaris" ,x=g.s) + g.s = sub("Balizia pedicellaris" ,"Albizia pedicellaris" ,x=g.s) + g.s = sub("Bauhinia jarensis" ,"Bauhinia" ,x=g.s) + g.s = sub("Bellucia grossulariodis" ,"Bellucia grossularioides" ,x=g.s) + g.s = sub("Brosimum autifolium" ,"Brosimum acutifolium" ,x=g.s) + g.s = sub("Brosimum sp." ,"Brosimum" ,x=g.s) + g.s = sub("Brosimum lactascens" ,"Brosimum lactescens" ,x=g.s) + g.s = sub("Byrsonima schultesiana" ,"Byrsonima arthropoda" ,x=g.s) + g.s = sub("Byrsonima estipulacea" ,"Byrsonima stipulacea" ,x=g.s) + g.s = sub("Capirona ulei" ,"Capirona decorticans" ,x=g.s) + g.s = sub("Capparis frondosa" ,"Capparidastrum frondosum" ,x=g.s) + g.s = sub("Cecropia distachia" ,"Cecropia distachya" ,x=g.s) + g.s = sub("Cedrela fistis" ,"Cedrela fissilis" ,x=g.s) + g.s = sub("Cedrella odorata" ,"Cedrela odorata" ,x=g.s) + g.s = sub("Chanouchiton kapleri" ,"Chaunochiton kappleri" ,x=g.s) + g.s = sub("Chaunochiton kapleri" ,"Chaunochiton kappleri" ,x=g.s) + g.s = sub("Clarisia elicifolia" ,"Clarisia ilicifolia" ,x=g.s) + g.s = sub("Compomanesia" ,"Campomanesia" ,x=g.s) + g.s = sub("Connarus perrottetes" ,"Connarus perrottetii" ,x=g.s) + g.s = sub("Connarus spermattetii" ,"Connarus perrotettii" ,x=g.s) + g.s = sub("Cordia scrabida" ,"Cordia exaltata" ,x=g.s) + g.s = sub("Coupeia sp." ,"Couepia" ,x=g.s) + g.s = sub("Coussarea racemosa" ,"Coussarea albescens" ,x=g.s) + g.s = sub("Crepidospermum gondotiano" ,"Crepidospermum goudotianum" ,x=g.s) + g.s = sub("Crepidospermum goudotiano" ,"Crepidospermum goudotianum" ,x=g.s) + g.s = sub("Cupania hirta" ,"Cupania hirsuta" ,x=g.s) + g.s = sub("Cybistax antisiphyllitica" ,"Cybistax antisyphilitica" ,x=g.s) + g.s = sub("Dendrobangia sp." ,"Dendrobangia" ,x=g.s) + g.s = sub("Dendrobrangea boliviana" ,"Dendrobangia boliviana" ,x=g.s) + g.s = sub("Dialium sp." ,"Dialium" ,x=g.s) + g.s = sub("Dialium guianensis" ,"Dialium guianense" ,x=g.s) + g.s = sub("Diclinanonna matogrossensis","Diclinanona matogrossensis" ,x=g.s) + g.s = sub("Didymopanax vinosum" ,"Schefflera vinosa" ,x=g.s) + g.s = sub("Diospyros praetermissa?" ,"Diospyros vestita" ,x=g.s) + g.s = sub("Diospyros praetermissa" ,"Diospyros vestita" ,x=g.s) + g.s = sub("Diploon venezuelano" ,"Diploon cuspidatum" ,x=g.s) + g.s = sub("Dipteriyx odorata" ,"Dipteryx odorata" ,x=g.s) + g.s = sub("Endlecheria" ,"Endlicheria" ,x=g.s) + g.s = sub("Enterolobium schobburgkii" ,"Enterolobium schomburgkii" ,x=g.s) + g.s = sub("Enterolobium schombburgkii" ,"Enterolobium schomburgkii" ,x=g.s) + g.s = sub("Ephedrantus parviflorus" ,"Ephedranthus parviflorus" ,x=g.s) + g.s = sub("Ephedrantus parvifolius" ,"Ephedranthus parviflorus" ,x=g.s) + g.s = sub("Eriotheca ni" ,"Eriotheca" ,x=g.s) + g.s = sub("Eriotheca sp" ,"Eriotheca" ,x=g.s) + g.s = sub("Eriotreca globosa" ,"Eriotheca globosa" ,x=g.s) + g.s = sub("Eschweilera amazomica" ,"Eschweilera amazonica" ,x=g.s) + g.s = sub("Eschweilera apiculatum" ,"Eschweilera apiculata" ,x=g.s) + g.s = sub("Eschweilera idatimom" ,"Lecythis idatimon" ,x=g.s) + g.s = sub("Eschweilera observa" ,"Eschweilera obversa" ,x=g.s) + g.s = sub("Eschweilera pedicelata" ,"Eschweilera pedicellata" ,x=g.s) + g.s = sub("Eschweilera sp." ,"Eschweilera" ,x=g.s) + g.s = sub("Eugenia ni" ,"Eugenia" ,x=g.s) + g.s = sub("Eugenia pacumensis" ,"Austromyrtus ploumensis" ,x=g.s) + g.s = sub("Eugenia schumburgkii" ,"Eugenia lambertiana" ,x=g.s) + g.s = sub("Geissospermum velosii" ,"Geissospermum laeve" ,x=g.s) + g.s = sub("Geissospermum velozii" ,"Geissospermum laeve" ,x=g.s) + g.s = sub("Glicoxilum" ,"Pouteria oppositifolia" ,x=g.s) + g.s = sub("Glycydendrom amazonicus" ,"Glycydendron amazonicum" ,x=g.s) + g.s = sub("Glycydendron amazonicus" ,"Glycydendron amazonicum" ,x=g.s) + g.s = sub("Guarea guianensis" ,"Guarea" ,x=g.s) + g.s = sub("Guarea subsessiliflora" ,"Guarea macrophylla" ,x=g.s) + g.s = sub("Guatteria cardoniana" ,"Guatteria recurvisepala" ,x=g.s) + g.s = sub("Hymenolobium flavium" ,"Hymenolobium flavum" ,x=g.s) + g.s = sub("Ilex parviflora" ,"Ilex petiolaris" ,x=g.s) + g.s = sub("Inga dibaldiana" ,"Inga thibaudiana" ,x=g.s) + g.s = sub("Inga paraenses" ,"Inga paraensis" ,x=g.s) + g.s = sub("Inga poliphylla" ,"Inga" ,x=g.s) + g.s = sub("Inga sp." ,"Inga" ,x=g.s) + g.s = sub("Jacaraitia espinhosa" ,"Jacaratia spinosa" ,x=g.s) + g.s = sub("Joannesia hevioides" ,"Joannesia heveoides" ,x=g.s) + g.s = sub("Lacmelea aculeata" ,"Lacmellea aculeata" ,x=g.s) + g.s = sub("Laetia procerra" ,"Laetia procera" ,x=g.s) + g.s = sub("Licania densa" ,"Licania densiflora" ,x=g.s) + g.s = sub("Licaria heteromorpha" ,"Licania heteromorpha" ,x=g.s) + g.s = sub("Lucanarea" ,"Lacunaria" ,x=g.s) + g.s = sub("Luheopsis duckeana" ,"Lueheopsis duckeana" ,x=g.s) + g.s = sub("Lustema pubescei" ,"Lacistema pubescens" ,x=g.s) + g.s = sub("Mabea sp." ,"Mabea" ,x=g.s) + g.s = sub("Maluria" ,"Marlierea umbraticola" ,x=g.s) + g.s = sub("Maquira callophylla" ,"Maquira calophylla" ,x=g.s) + g.s = sub("Marmaroxylon racemosum" ,"Zygia racemosa" ,x=g.s) + g.s = sub("Maytenos guianensis" ,"Maytenus guyanensis" ,x=g.s) + g.s = sub("Maytenus guianensis" ,"Maytenus guyanensis" ,x=g.s) + g.s = sub("Meia maderensis" ,"Neea" ,x=g.s) + g.s = sub("Mezelaurus" ,"Mezilaurus" ,x=g.s) + g.s = sub("Mezelaurus itauba" ,"Mezilaurus itauba" ,x=g.s) + g.s = sub("Miconia chrysophyllum" ,"Miconia chrysophylla" ,x=g.s) + g.s = sub("Michopholis sp." ,"Micropholis" ,x=g.s) + g.s = sub("Michopholis venulosa" ,"Micropholis venulosa" ,x=g.s) + g.s = sub("Microphilis" ,"Micropholis" ,x=g.s) + g.s = sub("Micropholis guianensis" ,"Micropholis guyanensis" ,x=g.s) + g.s = sub("Micropholis sp." ,"Micropholis" ,x=g.s) + g.s = sub("Microphylis acutangula" ,"Micropholis acutangula" ,x=g.s) + g.s = sub("Microphylis sp." ,"Micropholis" ,x=g.s) + g.s = sub("Mouriri abnormis" ,"Votomita guianensis" ,x=g.s) + g.s = sub("Myrciaria reticulata" ,"Myrcia reticulata" ,x=g.s) + g.s = sub("Myrcia rutipula" ,"Myrcia rufipila" ,x=g.s) + g.s = sub("Newtonia psilostachya" ,"Pseudopiptadenia psilostachya",x=g.s) + g.s = sub("Ocotea baturitensis" ,"Ocotea" ,x=g.s) + g.s = sub("Ocotea caudata" ,"Ocotea cernua" ,x=g.s) + g.s = sub("Ocotea sp." ,"Ocotea" ,x=g.s) + g.s = sub("Omedia perebea" ,"Perebea mollis" ,x=g.s) + g.s = sub("Onichiopetalum amazonico" ,"Onychopetalum amazonicum" ,x=g.s) + g.s = sub("Pausandra densiflora" ,"Pausandra trianae" ,x=g.s) + g.s = sub("Pouroma guianensis" ,"Pourouma guianensis" ,x=g.s) + g.s = sub("Pouruma guianensis" ,"Pourouma guianensis" ,x=g.s) + g.s = sub("Pouteria biloculares" ,"Pouteria bilocularis" ,x=g.s) + g.s = sub("Pouteria filipis" ,"Pouteria filipes" ,x=g.s) + g.s = sub("Pouteria lasiocarpa" ,"Pouteria caimito" ,x=g.s) + g.s = sub("Pouteria heterosepala" ,"Pouteria polysepala" ,x=g.s) + g.s = sub("Pouteria paraensis" ,"Pouteria macrocarpa" ,x=g.s) + g.s = sub("Pouteria sp." ,"Pouteria" ,x=g.s) + g.s = sub("Protium heptafilum" ,"Protium heptaphyllum" ,x=g.s) + g.s = sub("Protium sp." ,"Protium" ,x=g.s) + g.s = sub("Prumes myrtifoliu" ,"Prunus myrtifolia" ,x=g.s) + g.s = sub("Prunus myrtifolius" ,"Prunus myrtifolia" ,x=g.s) + g.s = sub("Pseudolmedia murure" ,"Pseudolmedia macrophylla" ,x=g.s) + g.s = sub("Ptecelobuim jucumba" ,"Abarema jupunba" ,x=g.s) + g.s = sub("Pterocarpus amazonium" ,"Pterocarpus santalinoides" ,x=g.s) + g.s = sub("Pterocarpus rhoire" ,"Pterocarpus rohrii" ,x=g.s) + g.s = sub("Pterocarpus rhoiri" ,"Pterocarpus rohrii" ,x=g.s) + g.s = sub("Ragala guianensis" ,"Chrysophyllum sanguinolentum" ,x=g.s) + g.s = sub("Rapanea ferruginea" ,"Myrsine coriacea" ,x=g.s) + g.s = sub("Rapanea guianensis" ,"Myrsine guianensis" ,x=g.s) + g.s = sub("Rheedia acuminata" ,"Garcinia madruno" ,x=g.s) + g.s = sub("Rim de" ,"Crudia" ,x=g.s) + g.s = sub("Rinorea pectino-squamata" ,"Rinorea pectinosquamata" ,x=g.s) + g.s = sub("Rinoria guianensis" ,"Rinorea guianensis" ,x=g.s) + g.s = sub("Rinoria racenosa" ,"Rinorea racemosa" ,x=g.s) + g.s = sub("Rolinha esxuccar" ,"Rollinia exsucca" ,x=g.s) + g.s = sub("Rollinia esxucca" ,"Rollinia exsucca" ,x=g.s) + g.s = sub("Sacrogrotis guianensis" ,"Sacoglottis guianensis" ,x=g.s) + g.s = sub("Sagotia sp." ,"Sagotia" ,x=g.s) + g.s = sub("Salacea" ,"Salacia" ,x=g.s) + g.s = sub("Salacia imprissifolia" ,"Salacia impressifolia" ,x=g.s) + g.s = sub("Sapium sp." ,"Sapium" ,x=g.s) + g.s = sub("Sclerolobium chrysophylum" ,"Tachigali chrysophylla" ,x=g.s) + g.s = sub("Sclerolobium chrysophyllum" ,"Tachigali chrysophylla" ,x=g.s) + g.s = sub("Sclerolobium guianensis" ,"Tachigali guianensis" ,x=g.s) + g.s = sub("Sclerolobium guianense" ,"Tachigali guianensis" ,x=g.s) + g.s = sub("Sclerolobium sp." ,"Sclerolobium" ,x=g.s) + g.s = sub("Simaba guianenses" ,"Simaba guianensis" ,x=g.s) + g.s = sub("Simabacedron planch." ,"Simaba cedron" ,x=g.s) + g.s = sub("Simarouba armara" ,"Simarouba amara" ,x=g.s) + g.s = sub("Simaruba armara" ,"Simarouba amara" ,x=g.s) + g.s = sub("Sipararuna cristata" ,"Siparuna cristata" ,x=g.s) + g.s = sub("Sipararuna decipiens" ,"Siparuna decipiens" ,x=g.s) + g.s = sub("Stryphnodendron pulchrrimum","Stryphnodendron pulcherrimum" ,x=g.s) + g.s = sub("Stryphnodendron sp." ,"Stryphnodendron" ,x=g.s) + g.s = sub("Styrax ferrugineum" ,"Styrax ferrugineus" ,x=g.s) + g.s = sub("Swartzia arborensis" ,"Swartzia arborescens" ,x=g.s) + g.s = sub("Swartzia flamingii" ,"Swartzia flaemingii" ,x=g.s) + g.s = sub("Swartizia microcarpum" ,"Swartzia microcarpa" ,x=g.s) + g.s = sub("Swartzia retusa" ,"Swartzia recurva" ,x=g.s) + g.s = sub("Swartzia sp." ,"Swartzia" ,x=g.s) + g.s = sub("Tachigalia alba" ,"Tachigali alba" ,x=g.s) + g.s = sub("Tachigalia myrmecophila" ,"Tachigali myrmecophila" ,x=g.s) + g.s = sub("Tachigalia paniculata" ,"Tachigali paniculata" ,x=g.s) + g.s = sub("Tapirira marchandi" ,"Tapirira obtusa" ,x=g.s) + g.s = sub("Tapirira marchandii" ,"Tapirira obtusa" ,x=g.s) + g.s = sub("Tapirira myriantha" ,"Tapirira guianensis" ,x=g.s) + g.s = sub("Tapirira peckoltiana" ,"Tapirira obtusa" ,x=g.s) + g.s = sub("Terminalea argentea" ,"Terminalia argentea" ,x=g.s) + g.s = sub("Terminalia amazonica" ,"Terminalia amazonia" ,x=g.s) + g.s = sub("Theobroma subincaum" ,"Theobroma subincanum" ,x=g.s) + g.s = sub("Thyrsodium paraense" ,"Thyrsodium spruceanum" ,x=g.s) + g.s = sub("Thysodium sp." ,"Thyrsodium" ,x=g.s) + g.s = sub("Trattinickia laurencei" ,"Trattinnickia lawrancei" ,x=g.s) + g.s = sub("Trattinickia laurense" ,"Trattinnickia lawrancei" ,x=g.s) + g.s = sub("Trattinickia rhoifolia" ,"Trattinnickia rhoifolia" ,x=g.s) + g.s = sub("Trichilia lequente" ,"Trichilia lecointei" ,x=g.s) + g.s = sub("Trichilia sp." ,"Trichilia" ,x=g.s) + g.s = sub("Triquilia lequente" ,"Trichilia lecointei" ,x=g.s) + g.s = sub("Trymatococcus paraensis" ,"Trymatococcus amazonicus" ,x=g.s) + g.s = sub("Vataicreopesis speciosa" ,"Vataireopsis speciosa" ,x=g.s) + g.s = sub("Vataireopesis speciosa" ,"Vataireopsis speciosa" ,x=g.s) + g.s = sub("Vernonia diffusa" ,"Vernonia erigeroides" ,x=g.s) + g.s = sub("Vimia guianensis" ,"Vismia guianensis" ,x=g.s) + g.s = sub("Virola crebinervia" ,"Virola crebrinervia" ,x=g.s) + g.s = sub("Virola melinonii" ,"Virola michelii" ,x=g.s) + g.s = sub("Virola melionii" ,"Virola michelii" ,x=g.s) + g.s = sub("Virola michelli" ,"Virola michelii" ,x=g.s) + g.s = sub("Vochisia surinamensis" ,"Vochysia surinamensis" ,x=g.s) + #---------------------------------------------------------------------------------------# + + + + + + + + #----- Break again into genus and species. ---------------------------------------------# + gs.mat = t(as.data.frame(sapply(X=g.s,FUN=strsplit,split=" "))) + del = gs.mat == "na" + gs.mat[del] = NA + g = capwords(gs.mat[,1],strict=TRUE) + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # Copy the data back to the structure. # + #---------------------------------------------------------------------------------------# + if ("scientific" %in% names(dat)) dat$scientific = g.s + if ("genus" %in% names(dat)) dat$genus = g + #---------------------------------------------------------------------------------------# + + return(dat) +}#end function standard.common.name +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This is the most up-to-date table to find families given the genus. This contains # +# all genera that occur at TNF and Paracou, feel free to add more. In case the family is # +# known but the genus is not, we add a unique genus name that is non-informative. # +#------------------------------------------------------------------------------------------# +standard.family.name <<- function(datum){ + #----- Make sure families are properly capitalised. ------------------------------------# + datum$family = capwords(datum$family,strict=TRUE) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Look-up table for all families. # + #---------------------------------------------------------------------------------------# + g2f = list() + + g2f[[ 1]] = list( genus = "Abarema" , family = "Fabaceae" ) + g2f[[ 2]] = list( genus = "Acmanthera" , family = "Malpighiaceae" ) + g2f[[ 3]] = list( genus = "Acrocomia" , family = "Arecaceae" ) + g2f[[ 4]] = list( genus = "Acosmium" , family = "Fabaceae" ) + g2f[[ 5]] = list( genus = "Adenophaedra" , family = "Euphorbiaceae" ) + g2f[[ 6]] = list( genus = "Agonandra" , family = "Opiliaceae" ) + g2f[[ 7]] = list( genus = "Aiouea" , family = "Lauraceae" ) + g2f[[ 8]] = list( genus = "Albizia" , family = "Fabaceae" ) + g2f[[ 9]] = list( genus = "Alchorneopsis" , family = "Euphorbiaceae" ) + g2f[[ 10]] = list( genus = "Aldina" , family = "Fabaceae" ) + g2f[[ 11]] = list( genus = "Alexa" , family = "Fabaceae" ) + g2f[[ 12]] = list( genus = "Allantoma" , family = "Lecythidaceae" ) + g2f[[ 13]] = list( genus = "Allophylus" , family = "Sapindaceae" ) + g2f[[ 14]] = list( genus = "Amaioua" , family = "Rubiaceae" ) + g2f[[ 15]] = list( genus = "Ambelania" , family = "Apocynaceae" ) + g2f[[ 16]] = list( genus = "Amburana" , family = "Fabaceae" ) + g2f[[ 17]] = list( genus = "Ampelocera" , family = "Ulmaceae" ) + g2f[[ 18]] = list( genus = "Amphirrhox" , family = "Violaceae" ) + g2f[[ 19]] = list( genus = "Anacardium" , family = "Anacardiaceae" ) + g2f[[ 20]] = list( genus = "Anadenanthera" , family = "Fabaceae" ) + g2f[[ 21]] = list( genus = "Anaxagorea" , family = "Annonaceae" ) + g2f[[ 22]] = list( genus = "Andira" , family = "Fabaceae" ) + g2f[[ 23]] = list( genus = "Aniba" , family = "Lauraceae" ) + g2f[[ 24]] = list( genus = "Anisophyllea" , family = "Anisophylleaceae" ) + g2f[[ 25]] = list( genus = "Annona" , family = "Annonaceae" ) + g2f[[ 26]] = list( genus = "Anomalocalyx" , family = "Euphorbiaceae" ) + g2f[[ 27]] = list( genus = "Antonia" , family = "Loganiaceae" ) + g2f[[ 28]] = list( genus = "Aparisthmium" , family = "Euphorbiaceae" ) + g2f[[ 29]] = list( genus = "Apeiba" , family = "Malvaceae" ) + g2f[[ 30]] = list( genus = "Aptandra" , family = "Olacaceae" ) + g2f[[ 31]] = list( genus = "Apuleia" , family = "Fabaceae" ) + g2f[[ 32]] = list( genus = "Aspidosperma" , family = "Apocynaceae" ) + g2f[[ 33]] = list( genus = "Astrocaryum" , family = "Arecaceae" ) + g2f[[ 34]] = list( genus = "Astronium" , family = "Anacardiaceae" ) + g2f[[ 35]] = list( genus = "Attalea" , family = "Arecaceae" ) + g2f[[ 36]] = list( genus = "Austromyrtus" , family = "Myrtaceae" ) + g2f[[ 37]] = list( genus = "Bactris" , family = "Arecaceae" ) + g2f[[ 38]] = list( genus = "Bagassa" , family = "Moraceae" ) + g2f[[ 39]] = list( genus = "Balizia" , family = "Fabaceae" ) + g2f[[ 40]] = list( genus = "Batesia" , family = "Fabaceae" ) + g2f[[ 41]] = list( genus = "Batocarpus" , family = "Moraceae" ) + g2f[[ 42]] = list( genus = "Bauhinia" , family = "Fabaceae" ) + g2f[[ 43]] = list( genus = "Bellucia" , family = "Melastomataceae" ) + g2f[[ 44]] = list( genus = "Bertholletia" , family = "Lecythidaceae" ) + g2f[[ 45]] = list( genus = "Blepharocalyx" , family = "Myrtaceae" ) + g2f[[ 46]] = list( genus = "Bixa" , family = "Bixaceae" ) + g2f[[ 47]] = list( genus = "Bocageopsis" , family = "Annonaceae" ) + g2f[[ 48]] = list( genus = "Bocoa" , family = "Fabaceae" ) + g2f[[ 49]] = list( genus = "Bombax" , family = "Malvaceae" ) + g2f[[ 50]] = list( genus = "Botryarrhena" , family = "Rubiaceae" ) + g2f[[ 51]] = list( genus = "Bowdichia" , family = "Fabaceae" ) + g2f[[ 52]] = list( genus = "Brachychiton" , family = "Malvaceae" ) + g2f[[ 53]] = list( genus = "Brosimum" , family = "Moraceae" ) + g2f[[ 54]] = list( genus = "Buchenavia" , family = "Combretaceae" ) + g2f[[ 55]] = list( genus = "Byrsonima" , family = "Malpighiaceae" ) + g2f[[ 56]] = list( genus = "Caesalpinia" , family = "Fabaceae" ) + g2f[[ 57]] = list( genus = "Calliandra" , family = "Fabaceae" ) + g2f[[ 58]] = list( genus = "Calophyllum" , family = "Calophyllaceae" ) + g2f[[ 59]] = list( genus = "Calyptranthes" , family = "Myrtaceae" ) + g2f[[ 60]] = list( genus = "Campomanesia" , family = "Myrtaceae" ) + g2f[[ 61]] = list( genus = "Capirona" , family = "Rubiaceae" ) + g2f[[ 62]] = list( genus = "Capparidastrum" , family = "Capparaceae" ) + g2f[[ 63]] = list( genus = "Capparis" , family = "Capparaceae" ) + g2f[[ 64]] = list( genus = "Caraipa" , family = "Calophyllaceae" ) + g2f[[ 65]] = list( genus = "Carapa" , family = "Meliaceae" ) + g2f[[ 66]] = list( genus = "Cariniana" , family = "Lecythidaceae" ) + g2f[[ 67]] = list( genus = "Caryocar" , family = "Caryocaraceae" ) + g2f[[ 68]] = list( genus = "Casearia" , family = "Salicaceae" ) + g2f[[ 69]] = list( genus = "Cassia" , family = "Fabaceae" ) + g2f[[ 70]] = list( genus = "Castilla" , family = "Moraceae" ) + g2f[[ 71]] = list( genus = "Catostemma" , family = "Malvaceae" ) + g2f[[ 72]] = list( genus = "Cecropia" , family = "Urticaceae" ) + g2f[[ 73]] = list( genus = "Cedrela" , family = "Meliaceae" ) + g2f[[ 74]] = list( genus = "Cedrelinga" , family = "Fabaceae" ) + g2f[[ 75]] = list( genus = "Ceiba" , family = "Malvaceae" ) + g2f[[ 76]] = list( genus = "Cereus" , family = "Cactaceae" ) + g2f[[ 77]] = list( genus = "Chaetocarpus" , family = "Euphorbiaceae" ) + g2f[[ 78]] = list( genus = "Chamaecrista" , family = "Fabaceae" ) + g2f[[ 79]] = list( genus = "Chaunochiton" , family = "Olacaceae" ) + g2f[[ 80]] = list( genus = "Cheiloclinium" , family = "Celastraceae" ) + g2f[[ 81]] = list( genus = "Chimarrhis" , family = "Rubiaceae" ) + g2f[[ 82]] = list( genus = "Chromolucuma" , family = "Sapotaceae" ) + g2f[[ 83]] = list( genus = "Chrysobalanus" , family = "Chrysobalanaceae" ) + g2f[[ 84]] = list( genus = "Chrysophyllum" , family = "Sapotaceae" ) + g2f[[ 85]] = list( genus = "Clarisia" , family = "Moraceae" ) + g2f[[ 86]] = list( genus = "Clusia" , family = "Clusiaceae" ) + g2f[[ 87]] = list( genus = "Cnidoscolus" , family = "Euphorbiaceae" ) + g2f[[ 88]] = list( genus = "Coccoloba" , family = "Polygonaceae" ) + g2f[[ 89]] = list( genus = "Conceveiba" , family = "Euphorbiaceae" ) + g2f[[ 90]] = list( genus = "Connarus" , family = "Connaraceae" ) + g2f[[ 91]] = list( genus = "Copaifera" , family = "Fabaceae" ) + g2f[[ 92]] = list( genus = "Cordia" , family = "Boraginaceae" ) + g2f[[ 93]] = list( genus = "Corythophora" , family = "Lecythidaceae" ) + g2f[[ 94]] = list( genus = "Couepia" , family = "Chrysobalanaceae" ) + g2f[[ 95]] = list( genus = "Couma" , family = "Apocynaceae" ) + g2f[[ 96]] = list( genus = "Couratari" , family = "Lecythidaceae" ) + g2f[[ 97]] = list( genus = "Coussapoa" , family = "Urticaceae" ) + g2f[[ 98]] = list( genus = "Coussarea" , family = "Rubiaceae" ) + g2f[[ 99]] = list( genus = "Coutarea" , family = "Rubiaceae" ) + g2f[[100]] = list( genus = "Crepidospermum" , family = "Burseraceae" ) + g2f[[101]] = list( genus = "Croton" , family = "Euphorbiaceae" ) + g2f[[102]] = list( genus = "Crudia" , family = "Fabaceae" ) + g2f[[103]] = list( genus = "Cupania" , family = "Sapindaceae" ) + g2f[[104]] = list( genus = "Cybianthus" , family = "Primulaceae" ) + g2f[[105]] = list( genus = "Cybistax" , family = "Bignoniaceae" ) + g2f[[106]] = list( genus = "Dacryodes" , family = "Burseraceae" ) + g2f[[107]] = list( genus = "Dalbergia" , family = "Fabaceae" ) + g2f[[108]] = list( genus = "Dendrobangia" , family = "Cardiopteridaceae" ) + g2f[[109]] = list( genus = "Dialium" , family = "Fabaceae" ) + g2f[[110]] = list( genus = "Diclinanona" , family = "Annonaceae" ) + g2f[[111]] = list( genus = "Dicorynia" , family = "Fabaceae" ) + g2f[[112]] = list( genus = "Dicranostyles" , family = "Convolvulaceae" ) + g2f[[113]] = list( genus = "Dicypellium" , family = "Lauraceae" ) + g2f[[114]] = list( genus = "Dimorphandra" , family = "Fabaceae" ) + g2f[[115]] = list( genus = "Dinizia" , family = "Fabaceae" ) + g2f[[116]] = list( genus = "Diospyros" , family = "Ebenaceae" ) + g2f[[117]] = list( genus = "Diplotropis" , family = "Fabaceae" ) + g2f[[118]] = list( genus = "Dipteryx" , family = "Fabaceae" ) + g2f[[119]] = list( genus = "Discophora" , family = "Stemonuraceae" ) + g2f[[120]] = list( genus = "Doliocarpus" , family = "Dilleniaceae" ) + g2f[[121]] = list( genus = "Drypetes" , family = "Putranjivaceae" ) + g2f[[122]] = list( genus = "Duckeodendron" , family = "Solanaceae" ) + g2f[[123]] = list( genus = "Duckesia" , family = "Humiriaceae" ) + g2f[[124]] = list( genus = "Duguetia" , family = "Annonaceae" ) + g2f[[125]] = list( genus = "Duroia" , family = "Rubiaceae" ) + g2f[[126]] = list( genus = "Dystovomita" , family = "Clusiaceae" ) + g2f[[127]] = list( genus = "Ecclinusa" , family = "Sapotaceae" ) + g2f[[128]] = list( genus = "Elaeoluma" , family = "Sapotaceae" ) + g2f[[129]] = list( genus = "Elizabetha" , family = "Fabaceae" ) + g2f[[130]] = list( genus = "Emmotum" , family = "Emmotaceae" ) + g2f[[131]] = list( genus = "Endlicheria" , family = "Lauraceae" ) + g2f[[132]] = list( genus = "Endopleura" , family = "Humiriaceae" ) + g2f[[133]] = list( genus = "Enterolobium" , family = "Fabaceae" ) + g2f[[134]] = list( genus = "Eperua" , family = "Fabaceae" ) + g2f[[135]] = list( genus = "Ephedranthus" , family = "Annonaceae" ) + g2f[[136]] = list( genus = "Eriotheca" , family = "Malvaceae" ) + g2f[[137]] = list( genus = "Erisma" , family = "Vochysiaceae" ) + g2f[[138]] = list( genus = "Erythroxylum" , family = "Erythroxylaceae" ) + g2f[[139]] = list( genus = "Eschweilera" , family = "Lecythidaceae" ) + g2f[[140]] = list( genus = "Eugenia" , family = "Myrtaceae" ) + g2f[[141]] = list( genus = "Euterpe" , family = "Arecaceae" ) + g2f[[142]] = list( genus = "Euxylophora" , family = "Rutaceae" ) + g2f[[143]] = list( genus = "Faramea" , family = "Rubiaceae" ) + g2f[[144]] = list( genus = "Ferdinandusa" , family = "Rubiaceae" ) + g2f[[145]] = list( genus = "Ficus" , family = "Moraceae" ) + g2f[[146]] = list( genus = "Fusaea" , family = "Annonaceae" ) + g2f[[147]] = list( genus = "Garcinia" , family = "Clusiaceae" ) + g2f[[148]] = list( genus = "Geissospermum" , family = "Apocynaceae" ) + g2f[[149]] = list( genus = "Genipa" , family = "Rubiaceae" ) + g2f[[150]] = list( genus = "Gilbertiodendron" , family = "Fabaceae" ) + g2f[[151]] = list( genus = "Glycydendron" , family = "Euphorbiaceae" ) + g2f[[152]] = list( genus = "Goupia" , family = "Goupiaceae" ) + g2f[[153]] = list( genus = "Guapira" , family = "Nyctaginaceae" ) + g2f[[154]] = list( genus = "Guarea" , family = "Meliaceae" ) + g2f[[155]] = list( genus = "Guatteria" , family = "Annonaceae" ) + g2f[[156]] = list( genus = "Guazuma" , family = "Malvaceae" ) + g2f[[157]] = list( genus = "Gustavia" , family = "Lecythidaceae" ) + g2f[[158]] = list( genus = "Hebepetalum" , family = "Linaceae" ) + g2f[[159]] = list( genus = "Heisteria" , family = "Olacaceae" ) + g2f[[160]] = list( genus = "Helianthostylis" , family = "Moraceae" ) + g2f[[161]] = list( genus = "Helicostylis" , family = "Moraceae" ) + g2f[[162]] = list( genus = "Henriettea" , family = "Melastomataceae" ) + g2f[[163]] = list( genus = "Henriettella" , family = "Melastomataceae" ) + g2f[[164]] = list( genus = "Hevea" , family = "Euphorbiaceae" ) + g2f[[165]] = list( genus = "Himatanthus" , family = "Apocynaceae" ) + g2f[[166]] = list( genus = "Hippocratea" , family = "Celastraceae" ) + g2f[[167]] = list( genus = "Hirtella" , family = "Chrysobalanaceae" ) + g2f[[168]] = list( genus = "Humiria" , family = "Humiriaceae" ) + g2f[[169]] = list( genus = "Humiriastrum" , family = "Humiriaceae" ) + g2f[[170]] = list( genus = "Hura" , family = "Euphorbiaceae" ) + g2f[[171]] = list( genus = "Hymenaea" , family = "Fabaceae" ) + g2f[[172]] = list( genus = "Hymenolobium" , family = "Fabaceae" ) + g2f[[173]] = list( genus = "Ignotum" , family = "Ignotaceae" ) + g2f[[174]] = list( genus = "Ilex" , family = "Aquifoliaceae" ) + g2f[[175]] = list( genus = "Inga" , family = "Fabaceae" ) + g2f[[176]] = list( genus = "Iryanthera" , family = "Myristicaceae" ) + g2f[[177]] = list( genus = "Isertia" , family = "Rubiaceae" ) + g2f[[178]] = list( genus = "Jacaranda" , family = "Bignoniaceae" ) + g2f[[179]] = list( genus = "Jacaratia" , family = "Caricaceae" ) + g2f[[180]] = list( genus = "Jatropha" , family = "Euphorbiaceae" ) + g2f[[181]] = list( genus = "Joannesia" , family = "Euphorbiaceae" ) + g2f[[182]] = list( genus = "Justicia" , family = "Acanthaceae" ) + g2f[[183]] = list( genus = "Lacistema" , family = "Lacistemataceae" ) + g2f[[184]] = list( genus = "Lacmellea" , family = "Apocynaceae" ) + g2f[[185]] = list( genus = "Lacunaria" , family = "Ochnaceae" ) + g2f[[186]] = list( genus = "Ladenbergia" , family = "Rubiaceae" ) + g2f[[187]] = list( genus = "Laetia" , family = "Salicaceae" ) + g2f[[188]] = list( genus = "Lecythis" , family = "Lecythidaceae" ) + g2f[[189]] = list( genus = "Leonia" , family = "Violaceae" ) + g2f[[190]] = list( genus = "Liana" , family = "Lianaceae" ) + g2f[[191]] = list( genus = "Licania" , family = "Chrysobalanaceae" ) + g2f[[192]] = list( genus = "Licaria" , family = "Lauraceae" ) + g2f[[193]] = list( genus = "Lindackeria" , family = "Achariaceae" ) + g2f[[194]] = list( genus = "Lippia" , family = "Verbenaceae" ) + g2f[[195]] = list( genus = "Lonchocarpus" , family = "Fabaceae" ) + g2f[[196]] = list( genus = "Luehea" , family = "Malvaceae" ) + g2f[[197]] = list( genus = "Lueheopsis" , family = "Malvaceae" ) + g2f[[198]] = list( genus = "Mabea" , family = "Euphorbiaceae" ) + g2f[[199]] = list( genus = "Machaerium" , family = "Fabaceae" ) + g2f[[200]] = list( genus = "Macoubea" , family = "Apocynaceae" ) + g2f[[201]] = list( genus = "Macrolobium" , family = "Fabaceae" ) + g2f[[202]] = list( genus = "Malouetia" , family = "Apocynaceae" ) + g2f[[203]] = list( genus = "Manicaria" , family = "Arecaceae" ) + g2f[[204]] = list( genus = "Manihot" , family = "Euphorbiaceae" ) + g2f[[205]] = list( genus = "Manilkara" , family = "Sapotaceae" ) + g2f[[206]] = list( genus = "Maquira" , family = "Moraceae" ) + g2f[[207]] = list( genus = "Marcgravia" , family = "Marcgraviaceae" ) + g2f[[208]] = list( genus = "Marlierea" , family = "Myrtaceae" ) + g2f[[209]] = list( genus = "Matayba" , family = "Sapindaceae" ) + g2f[[210]] = list( genus = "Matisia" , family = "Malvaceae" ) + g2f[[211]] = list( genus = "Mauritia" , family = "Arecaceae" ) + g2f[[212]] = list( genus = "Mauritiella" , family = "Arecaceae" ) + g2f[[213]] = list( genus = "Maytenus" , family = "Celastraceae" ) + g2f[[214]] = list( genus = "Melicoccus" , family = "Sapindaceae" ) + g2f[[215]] = list( genus = "Mezilaurus" , family = "Lauraceae" ) + g2f[[216]] = list( genus = "Miconia" , family = "Melastomataceae" ) + g2f[[217]] = list( genus = "Micrandra" , family = "Euphorbiaceae" ) + g2f[[218]] = list( genus = "Micrandropsis" , family = "Euphorbiaceae" ) + g2f[[219]] = list( genus = "Micropholis" , family = "Sapotaceae" ) + g2f[[220]] = list( genus = "Mikania" , family = "Asteraceae" ) + g2f[[221]] = list( genus = "Mimosa" , family = "Fabaceae" ) + g2f[[222]] = list( genus = "Minquartia" , family = "Olacaceae" ) + g2f[[223]] = list( genus = "Misanteca" , family = "Lauraceae" ) + g2f[[224]] = list( genus = "Monopteryx" , family = "Fabaceae" ) + g2f[[225]] = list( genus = "Moronobea" , family = "Clusiaceae" ) + g2f[[226]] = list( genus = "Mouriri" , family = "Melastomataceae" ) + g2f[[227]] = list( genus = "Myrocarpus" , family = "Fabaceae" ) + g2f[[228]] = list( genus = "Myrcia" , family = "Myrtaceae" ) + g2f[[229]] = list( genus = "Myrciaria" , family = "Myrtaceae" ) + g2f[[230]] = list( genus = "Myrsine" , family = "Primulaceae" ) + g2f[[231]] = list( genus = "Naucleopsis" , family = "Moraceae" ) + g2f[[232]] = list( genus = "Nectandra" , family = "Lauraceae" ) + g2f[[233]] = list( genus = "Neea" , family = "Nyctaginaceae" ) + g2f[[234]] = list( genus = "Ocotea" , family = "Lauraceae" ) + g2f[[235]] = list( genus = "Oenocarpus" , family = "Arecaceae" ) + g2f[[236]] = list( genus = "Onychopetalum" , family = "Annonaceae" ) + g2f[[237]] = list( genus = "Ormosia" , family = "Fabaceae" ) + g2f[[238]] = list( genus = "Osteophloeum" , family = "Myristicaceae" ) + g2f[[239]] = list( genus = "Ouratea" , family = "Ochnaceae" ) + g2f[[240]] = list( genus = "Oxandra" , family = "Annonaceae" ) + g2f[[241]] = list( genus = "Pachira" , family = "Malvaceae" ) + g2f[[242]] = list( genus = "Palicourea" , family = "Rubiaceae" ) + g2f[[243]] = list( genus = "Parahancornia" , family = "Apocynaceae" ) + g2f[[244]] = list( genus = "Paraia" , family = "Lauraceae" ) + g2f[[245]] = list( genus = "Parinari" , family = "Chrysobalanaceae" ) + g2f[[246]] = list( genus = "Parkia" , family = "Fabaceae" ) + g2f[[247]] = list( genus = "Paullinia" , family = "Sapindaceae" ) + g2f[[248]] = list( genus = "Pausandra" , family = "Euphorbiaceae" ) + g2f[[249]] = list( genus = "Paypayrola" , family = "Violaceae" ) + g2f[[250]] = list( genus = "Peltogyne" , family = "Fabaceae" ) + g2f[[251]] = list( genus = "Pera" , family = "Euphorbiaceae" ) + g2f[[252]] = list( genus = "Perebea" , family = "Moraceae" ) + g2f[[253]] = list( genus = "Peridiscus" , family = "Peridiscaceae" ) + g2f[[254]] = list( genus = "Phenakospermum" , family = "Strelitziaceae" ) + g2f[[255]] = list( genus = "Piptadenia" , family = "Fabaceae" ) + g2f[[256]] = list( genus = "Platonia" , family = "Clusiaceae" ) + g2f[[257]] = list( genus = "Platymiscium" , family = "Fabaceae" ) + g2f[[258]] = list( genus = "Plenckia" , family = "Celastraceae" ) + g2f[[259]] = list( genus = "Poecilanthe" , family = "Fabaceae" ) + g2f[[260]] = list( genus = "Pogonophora" , family = "Euphorbiaceae" ) + g2f[[261]] = list( genus = "Poraqueiba" , family = "Icacinaceae" ) + g2f[[262]] = list( genus = "Posoqueria" , family = "Rubiaceae" ) + g2f[[263]] = list( genus = "Pourouma" , family = "Urticaceae" ) + g2f[[264]] = list( genus = "Pouteria" , family = "Sapotaceae" ) + g2f[[265]] = list( genus = "Pradosia" , family = "Sapotaceae" ) + g2f[[266]] = list( genus = "Protium" , family = "Burseraceae" ) + g2f[[267]] = list( genus = "Prunus" , family = "Rosaceae" ) + g2f[[268]] = list( genus = "Pseudolmedia" , family = "Moraceae" ) + g2f[[269]] = list( genus = "Pseudopiptadenia" , family = "Fabaceae" ) + g2f[[270]] = list( genus = "Pseudoxandra" , family = "Annonaceae" ) + g2f[[271]] = list( genus = "Psidium" , family = "Myrtaceae" ) + g2f[[272]] = list( genus = "Pterandra" , family = "Malpighiaceae" ) + g2f[[273]] = list( genus = "Pterocarpus" , family = "Fabaceae" ) + g2f[[274]] = list( genus = "Ptychopetalum" , family = "Olacaceae" ) + g2f[[275]] = list( genus = "Qualea" , family = "Vochysiaceae" ) + g2f[[276]] = list( genus = "Quararibea" , family = "Malvaceae" ) + g2f[[277]] = list( genus = "Quiina" , family = "Ochnaceae" ) + g2f[[278]] = list( genus = "Raputia" , family = "Rutaceae" ) + g2f[[279]] = list( genus = "Rauvolfia" , family = "Apocynaceae" ) + g2f[[280]] = list( genus = "Recordoxylon" , family = "Fabaceae" ) + g2f[[281]] = list( genus = "Rhodostemonodaphne" , family = "Lauraceae" ) + g2f[[282]] = list( genus = "Richeria" , family = "Phyllanthaceae" ) + g2f[[283]] = list( genus = "Rinorea" , family = "Violaceae" ) + g2f[[284]] = list( genus = "Rollinia" , family = "Annonaceae" ) + g2f[[285]] = list( genus = "Roucheria" , family = "Linaceae" ) + g2f[[286]] = list( genus = "Ruizterania" , family = "Vochysiaceae" ) + g2f[[287]] = list( genus = "Ryania" , family = "Salicaceae" ) + g2f[[288]] = list( genus = "Sacoglottis" , family = "Humiriaceae" ) + g2f[[289]] = list( genus = "Sagotia" , family = "Euphorbiaceae" ) + g2f[[290]] = list( genus = "Salacia" , family = "Celastraceae" ) + g2f[[291]] = list( genus = "Sapium" , family = "Euphorbiaceae" ) + g2f[[292]] = list( genus = "Sarcaulus" , family = "Sapotaceae" ) + g2f[[293]] = list( genus = "Schefflera" , family = "Araliaceae" ) + g2f[[294]] = list( genus = "Schinopsis" , family = "Anacardiaceae" ) + g2f[[295]] = list( genus = "Schizolobium" , family = "Fabaceae" ) + g2f[[296]] = list( genus = "Sclerolobium" , family = "Fabaceae" ) + g2f[[297]] = list( genus = "Scleronema" , family = "Malvaceae" ) + g2f[[298]] = list( genus = "Senefeldera" , family = "Euphorbiaceae" ) + g2f[[299]] = list( genus = "Senna" , family = "Fabaceae" ) + g2f[[300]] = list( genus = "Sextonia" , family = "Lauraceae" ) + g2f[[301]] = list( genus = "Simaba" , family = "Simaroubaceae" ) + g2f[[302]] = list( genus = "Simarouba" , family = "Simaroubaceae" ) + g2f[[303]] = list( genus = "Siparuna" , family = "Siparunaceae" ) + g2f[[304]] = list( genus = "Sloanea" , family = "Elaeocarpaceae" ) + g2f[[305]] = list( genus = "Socratea" , family = "Arecaceae" ) + g2f[[306]] = list( genus = "Sorocea" , family = "Moraceae" ) + g2f[[307]] = list( genus = "Spondias" , family = "Anacardiaceae" ) + g2f[[308]] = list( genus = "Sterculia" , family = "Malvaceae" ) + g2f[[309]] = list( genus = "Strychnos" , family = "Loganiaceae" ) + g2f[[310]] = list( genus = "Stryphnodendron" , family = "Fabaceae" ) + g2f[[311]] = list( genus = "Styrax" , family = "Styracaceae" ) + g2f[[312]] = list( genus = "Swartzia" , family = "Fabaceae" ) + g2f[[313]] = list( genus = "Swietenia" , family = "Meliaceae" ) + g2f[[314]] = list( genus = "Symphonia" , family = "Clusiaceae" ) + g2f[[315]] = list( genus = "Syzygium" , family = "Myrtaceae" ) + g2f[[316]] = list( genus = "Tabebuia" , family = "Bignoniaceae" ) + g2f[[317]] = list( genus = "Tabernaemontana" , family = "Apocynaceae" ) + g2f[[318]] = list( genus = "Tachigali" , family = "Fabaceae" ) + g2f[[319]] = list( genus = "Talisia" , family = "Sapindaceae" ) + g2f[[320]] = list( genus = "Tapirira" , family = "Anacardiaceae" ) + g2f[[321]] = list( genus = "Tapura" , family = "Dichapetalaceae" ) + g2f[[322]] = list( genus = "Taralea" , family = "Fabaceae" ) + g2f[[323]] = list( genus = "Terminalia" , family = "Combretaceae" ) + g2f[[324]] = list( genus = "Tetragastris" , family = "Burseraceae" ) + g2f[[325]] = list( genus = "Theobroma" , family = "Malvaceae" ) + g2f[[326]] = list( genus = "Thyrsodium" , family = "Anacardiaceae" ) + g2f[[327]] = list( genus = "Tocoyena" , family = "Rubiaceae" ) + g2f[[328]] = list( genus = "Toulicia" , family = "Sapindaceae" ) + g2f[[329]] = list( genus = "Touroulia" , family = "Ochnaceae" ) + g2f[[330]] = list( genus = "Tovomita" , family = "Clusiaceae" ) + g2f[[331]] = list( genus = "Trattinnickia" , family = "Burseraceae" ) + g2f[[332]] = list( genus = "Trema" , family = "Cannabaceae" ) + g2f[[333]] = list( genus = "Trichilia" , family = "Meliaceae" ) + g2f[[334]] = list( genus = "Trymatococcus" , family = "Moraceae" ) + g2f[[335]] = list( genus = "Unonopsis" , family = "Annonaceae" ) + g2f[[336]] = list( genus = "Vantanea" , family = "Humiriaceae" ) + g2f[[337]] = list( genus = "Vatairea" , family = "Fabaceae" ) + g2f[[338]] = list( genus = "Vataireopsis" , family = "Fabaceae" ) + g2f[[339]] = list( genus = "Vernonia" , family = "Asteraceae" ) + g2f[[340]] = list( genus = "Virola" , family = "Myristicaceae" ) + g2f[[341]] = list( genus = "Vismia" , family = "Hypericaceae" ) + g2f[[342]] = list( genus = "Vitex" , family = "Lamiaceae" ) + g2f[[343]] = list( genus = "Vochysia" , family = "Vochysiaceae" ) + g2f[[344]] = list( genus = "Votomita" , family = "Melastomataceae" ) + g2f[[345]] = list( genus = "Vouacapoua" , family = "Fabaceae" ) + g2f[[346]] = list( genus = "Warszewiczia" , family = "Rubiaceae" ) + g2f[[347]] = list( genus = "Xylopia" , family = "Annonaceae" ) + g2f[[348]] = list( genus = "Zanthoxylum" , family = "Rutaceae" ) + g2f[[349]] = list( genus = "Zygia" , family = "Fabaceae" ) + + + #---------------------------------------------------------------------------------------# + + + #----- Convert the g2f list into a data frame. -----------------------------------------# + g2f = data.frame( apply( X = t(sapply(X = g2f , FUN = c)) + , MARGIN = c(1,2) + , FUN = unlist + )#end apply + , stringsAsFactors = FALSE + )#end data.frame + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Check whether the family has all genera needed. # + #---------------------------------------------------------------------------------------# + idx = which(! is.na(datum$genus) & ! datum$genus %in% g2f$genus) + if (length(idx) > 0){ + cat(" You must add genera to g2f...","\n") + tofill = t(t(sort(unique(datum$genus[idx])))) + browser() + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # List the default name for all families if genera was unknown. # + #---------------------------------------------------------------------------------------# + f2nogenus = list() + + f2nogenus[[ 1]] = list(family = "Acanthaceae" , genus = "Ignotum.acanthus" ) + f2nogenus[[ 2]] = list(family = "Achariaceae" , genus = "Ignotum.acharia" ) + f2nogenus[[ 3]] = list(family = "Anacardiaceae" , genus = "Ignotum.anacardium" ) + f2nogenus[[ 4]] = list(family = "Anisophylleaceae" , genus = "Ignotum.anisophyllea" ) + f2nogenus[[ 5]] = list(family = "Annonaceae" , genus = "Ignotum.annona" ) + f2nogenus[[ 6]] = list(family = "Apocynaceae" , genus = "Ignotum.apocynum" ) + f2nogenus[[ 7]] = list(family = "Aquifoliaceae" , genus = "Ignotum.ilex" ) + f2nogenus[[ 8]] = list(family = "Araliaceae" , genus = "Ignotum.aralia" ) + f2nogenus[[ 9]] = list(family = "Arecaceae" , genus = "Ignotum.areca" ) + f2nogenus[[ 10]] = list(family = "Asteraceae" , genus = "Ignotum.aster" ) + f2nogenus[[ 11]] = list(family = "Bignoniaceae" , genus = "Ignotum.bignonia" ) + f2nogenus[[ 12]] = list(family = "Bixaceae" , genus = "Ignotum.bixa" ) + f2nogenus[[ 13]] = list(family = "Boraginaceae" , genus = "Ignotum.borago" ) + f2nogenus[[ 14]] = list(family = "Burseraceae" , genus = "Ignotum.bursera" ) + f2nogenus[[ 15]] = list(family = "Cactaceae" , genus = "Ignotum.cactus" ) + f2nogenus[[ 16]] = list(family = "Calophyllaceae" , genus = "Ignotum.calophyllum" ) + f2nogenus[[ 17]] = list(family = "Cannabaceae" , genus = "Ignotum.cannabis" ) + f2nogenus[[ 18]] = list(family = "Capparaceae" , genus = "Ignotum.capparis" ) + f2nogenus[[ 19]] = list(family = "Cardiopteridaceae", genus = "Ignotum.cardiopteris" ) + f2nogenus[[ 20]] = list(family = "Caricaceae" , genus = "Ignotum.carica" ) + f2nogenus[[ 21]] = list(family = "Caryocaraceae" , genus = "Ignotum.caryocar" ) + f2nogenus[[ 22]] = list(family = "Celastraceae" , genus = "Ignotum.celastrus" ) + f2nogenus[[ 23]] = list(family = "Chrysobalanaceae" , genus = "Ignotum.chrysobalanus") + f2nogenus[[ 24]] = list(family = "Clusiaceae" , genus = "Ignotum.clusia" ) + f2nogenus[[ 25]] = list(family = "Combretaceae" , genus = "Ignotum.combretum" ) + f2nogenus[[ 26]] = list(family = "Connaraceae" , genus = "Ignotum.connarus" ) + f2nogenus[[ 27]] = list(family = "Convolvulaceae" , genus = "Ignotum.convolvulus" ) + f2nogenus[[ 28]] = list(family = "Dichapetalaceae" , genus = "Ignotum.dichapetalum" ) + f2nogenus[[ 29]] = list(family = "Dilleniaceae" , genus = "Ignotum.dillenia" ) + f2nogenus[[ 30]] = list(family = "Ebenaceae" , genus = "Ignotum.ebenus" ) + f2nogenus[[ 31]] = list(family = "Elaeocarpaceae" , genus = "Ignotum.elaeocarpus" ) + f2nogenus[[ 32]] = list(family = "Emmotaceae" , genus = "Ignotum.emmotum" ) + f2nogenus[[ 33]] = list(family = "Erythroxylaceae" , genus = "Ignotum.erythroxylum" ) + f2nogenus[[ 34]] = list(family = "Euphorbiaceae" , genus = "Ignotum.euphorbia" ) + f2nogenus[[ 35]] = list(family = "Fabaceae" , genus = "Ignotum.faba" ) + f2nogenus[[ 36]] = list(family = "Goupiaceae" , genus = "Goupia" ) + f2nogenus[[ 37]] = list(family = "Humiriaceae" , genus = "Ignotum.humiria" ) + f2nogenus[[ 38]] = list(family = "Hypericaceae" , genus = "Ignotum.hypericum" ) + f2nogenus[[ 39]] = list(family = "Icacinaceae" , genus = "Ignotum.icacina" ) + f2nogenus[[ 40]] = list(family = "Ignotaceae" , genus = "Ignotum" ) + f2nogenus[[ 41]] = list(family = "Lacistemataceae" , genus = "Ignotum.lacistema" ) + f2nogenus[[ 42]] = list(family = "Lamiaceae" , genus = "Ignotum.lamium" ) + f2nogenus[[ 43]] = list(family = "Lauraceae" , genus = "Ignotum.laurus" ) + f2nogenus[[ 44]] = list(family = "Lecythidaceae" , genus = "Ignotum.lecythis" ) + f2nogenus[[ 45]] = list(family = "Lianaceae" , genus = "Liana" ) + f2nogenus[[ 46]] = list(family = "Linaceae" , genus = "Ignotum.linum" ) + f2nogenus[[ 47]] = list(family = "Loganiaceae" , genus = "Ignotum.logania" ) + f2nogenus[[ 48]] = list(family = "Malpighiaceae" , genus = "Ignotum.malpighia" ) + f2nogenus[[ 49]] = list(family = "Malvaceae" , genus = "Ignotum.malva" ) + f2nogenus[[ 50]] = list(family = "Marcgraviaceae" , genus = "Ignotum.marcgravia" ) + f2nogenus[[ 51]] = list(family = "Melastomataceae" , genus = "Ignotum.melastoma" ) + f2nogenus[[ 52]] = list(family = "Meliaceae" , genus = "Ignotum.melia" ) + f2nogenus[[ 53]] = list(family = "Moraceae" , genus = "Ignotum.morus" ) + f2nogenus[[ 54]] = list(family = "Myristicaceae" , genus = "Ignotum.myristica" ) + f2nogenus[[ 55]] = list(family = "Myrtaceae" , genus = "Ignotum.myrtus" ) + f2nogenus[[ 56]] = list(family = "Nyctaginaceae" , genus = "Ignotum.nyctaginia" ) + f2nogenus[[ 57]] = list(family = "Ochnaceae" , genus = "Ignotum.ochna" ) + f2nogenus[[ 58]] = list(family = "Olacaceae" , genus = "Ignotum.olax" ) + f2nogenus[[ 59]] = list(family = "Opiliaceae" , genus = "Ignotum.opilia" ) + f2nogenus[[ 60]] = list(family = "Peridiscaceae" , genus = "Ignotum.peridiscus" ) + f2nogenus[[ 61]] = list(family = "Phyllanthaceae" , genus = "Ignotum.phyllanthus" ) + f2nogenus[[ 62]] = list(family = "Primulaceae" , genus = "Ignotum.primula" ) + f2nogenus[[ 63]] = list(family = "Polygonaceae" , genus = "Ignotum.polygonum" ) + f2nogenus[[ 64]] = list(family = "Putranjivaceae" , genus = "Ignotum.putranjiva" ) + f2nogenus[[ 65]] = list(family = "Rosaceae" , genus = "Ignotum.rosa" ) + f2nogenus[[ 66]] = list(family = "Rubiaceae" , genus = "Ignotum.rubia" ) + f2nogenus[[ 67]] = list(family = "Rutaceae" , genus = "Ignotum.ruta" ) + f2nogenus[[ 68]] = list(family = "Salicaceae" , genus = "Ignotum.salix" ) + f2nogenus[[ 69]] = list(family = "Sapindaceae" , genus = "Ignotum.sapindus" ) + f2nogenus[[ 70]] = list(family = "Sapotaceae" , genus = "Ignotum.sapota" ) + f2nogenus[[ 71]] = list(family = "Simaroubaceae" , genus = "Ignotum.simarouba" ) + f2nogenus[[ 72]] = list(family = "Siparunaceae" , genus = "Ignotum.siparuna" ) + f2nogenus[[ 73]] = list(family = "Solanaceae" , genus = "Ignotum.solanum" ) + f2nogenus[[ 74]] = list(family = "Stemonuraceae" , genus = "Ignotum.stemonurus" ) + f2nogenus[[ 75]] = list(family = "Strelitziaceae" , genus = "Ignotum.strelitzia" ) + f2nogenus[[ 76]] = list(family = "Styracaceae" , genus = "Ignotum.styrax" ) + f2nogenus[[ 77]] = list(family = "Ulmaceae" , genus = "Ignotum.ulmus" ) + f2nogenus[[ 78]] = list(family = "Urticaceae" , genus = "Ignotum.urtica" ) + f2nogenus[[ 79]] = list(family = "Verbenaceae" , genus = "Ignotum.verbena" ) + f2nogenus[[ 80]] = list(family = "Violaceae" , genus = "Ignotum.viola" ) + f2nogenus[[ 81]] = list(family = "Vochysiaceae" , genus = "Ignotum.vochysia" ) + #---------------------------------------------------------------------------------------# + + + + + + #----- Convert the g2f list into a data frame. -----------------------------------------# + f2nogenus = data.frame( apply( X = t(sapply(X = f2nogenus , FUN = c)) + , MARGIN = c(1,2) + , FUN = unlist + )#end apply + , stringsAsFactors = FALSE + )#end data.frame + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # Check whether there are families missing in f2nogenus look up table. # + #---------------------------------------------------------------------------------------# + idx = which(! g2f$family %in% f2nogenus$family) + if (length(idx) > 0){ + cat(" You must add families to f2nogenus...","\n") + family.tofill = t(t(sort(unique(g2f$family[idx])))) + browser() + }#end if + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # Fill in non-informative genus for individual with known family but unknown genus. # + #---------------------------------------------------------------------------------------# + nothing = is.na(datum$genus) & is.na(datum$family) + no.gen = is.na(datum$genus) & ! is.na(datum$family) + yes.gen = ! is.na(datum$genus) + #------ No information whatsoever. Fill in with non-informative taxa. -----------------# + datum$genus [nothing] = "Ignotum" + datum$scientific [nothing] = "Ignotum NA" + datum$family [nothing] = "Ignotaceae" + #------ No genus, family only. ---------------------------------------------------------# + idx = match(datum$family[no.gen],f2nogenus$family) + datum$genus [no.gen ] = f2nogenus$genus[idx] + datum$scientific [no.gen ] = paste(datum$genus[no.gen],NA_character_,sep=" ") + #------ Genus is known. ----------------------------------------------------------------# + idx = match(datum$genus[yes.gen],g2f$genus) + datum$family [yes.gen] = g2f$family [idx] + #---------------------------------------------------------------------------------------# + + return(datum) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function is a look-up table for scientific names given the common name. The # +# look up table came from the reference below and from the first survey in 1999, and it is # +# probably fine for Km 67 but not other places as they may be regional names and they may # +# refer to a completely different plant elsewhere. Only the trees that occurred in the # +# survey were added, feel free to complete the list... # +# # +# Silva, J. N. M.; Carvalho, J. O. P.; Lopes, J. C. A., 1985: Forest inventory of an # +# experimental area in the Tapajos National Forest. Boletim de Pesquisa Florestal, # +# n. 10/11, p.38--110. # +#------------------------------------------------------------------------------------------# +scientific.lookup.tnf <<- function(datum){ + n.datum = nrow(datum) + + #----- Look-up table, feel free to add more trees here. --------------------------------# + tnf = list() + tnf[[ 1]] = list( common = "abiu" + , scientific = "Pouteria reticulata" + )#end list + tnf[[ 2]] = list( common = "abiu branco" + , scientific = "Pradosia ptychandra" + )#end list + tnf[[ 3]] = list( common = "abiu cutite" + , scientific = "Pouteria macrophylla" + )#end list + tnf[[ 4]] = list( common = "abiu cutite folha verde" + , scientific = "Pouteria venosa" + )#end list + tnf[[ 5]] = list( common = "abiu vermelho" + , scientific = "Pouteria torta" + )#end list + tnf[[ 6]] = list( common = "abiu-casca-grossa" + , scientific = "Pouteria bilocularis" + )#end list + tnf[[ 7]] = list( common = "abiu-mangabinha" + , scientific = "Micropholis egensis" + )#end list + tnf[[ 8]] = list( common = "abiurana" + , scientific = "Pouteria torta" + )#end list + tnf[[ 9]] = list( common = "abiurana vermelha" + , scientific = "Pouteria torta" + )#end list + tnf[[ 10]] = list( common = "acariquara" + , scientific = "Minquartia guianensis" + )#end list + tnf[[ 11]] = list( common = "acoita-cavalo" + , scientific = "Lueheopsis duckeana" + )#end list + tnf[[ 12]] = list( common = "amapa" + , scientific = "Brosimum" + )#end list + tnf[[ 13]] = list( common = "amapa amargoso" + , scientific = "Brosimum guianense" + )#end list + tnf[[ 14]] = list( common = "amapa doce" + , scientific = "Brosimum parinarioides" + )#end list + tnf[[ 15]] = list( common = "amapai" + , scientific = "Brosimum lactescens" + )#end list + tnf[[ 16]] = list( common = "amaparana" + , scientific = "Thyrsodium spruceanum" + )#end list + tnf[[ 17]] = list( common = "amarelao" + , scientific = "Apuleia leiocarpa" + )#end list + tnf[[ 18]] = list( common = "anani" + , scientific = "Symphonia globulifera" + )#end list + tnf[[ 19]] = list( common = "andiroba" + , scientific = "Carapa guianensis" + )#end list + tnf[[ 20]] = list( common = "andirobarana" + , scientific = "Guarea macrophylla" + )#end list + tnf[[ 21]] = list( common = "angelim da mata" + , scientific = "Hymenolobium excelsum" + )#end list + tnf[[ 22]] = list( common = "angelim rajado" + , scientific = "Zygia racemosa" + )#end list + tnf[[ 23]] = list( common = "angelim vermelho" + , scientific = "Hymenolobium" + )#end list + tnf[[ 24]] = list( common = "apui" + , scientific = "Ficus broadwayi" + )#end list + tnf[[ 25]] = list( common = "araca da mata" + , scientific = "Eugenia patrisii" + )#end list + tnf[[ 26]] = list( common = "araracanga" + , scientific = "Aspidosperma eteanum" + )#end list + tnf[[ 27]] = list( common = "araticum" + , scientific = "Annona densicoma" + )#end list + tnf[[ 28]] = list( common = "aroeira" + , scientific = "Astronium lecointei" + )#end list + tnf[[ 29]] = list( common = "axixa" + , scientific = "Sterculia speciosa" + )#end list + tnf[[ 30]] = list( common = "bacaba" + , scientific = "Oenocarpus" + )#end list + tnf[[ 31]] = list( common = "bacuri da mata" + , scientific = "Garcinia madruno" + )#end list + tnf[[ 32]] = list( common = "breu" + , scientific = "Protium apiculatum" + )#end list + tnf[[ 33]] = list( common = "breu folha grande" + , scientific = "Protium" + )#end list + tnf[[ 34]] = list( common = "breu manga" + , scientific = "Tetragastris altissima" + )#end list + tnf[[ 35]] = list( common = "breu sucuruba" + , scientific = "Trattinnickia rhoifolia" + )#end list + tnf[[ 36]] = list( common = "breu vermelho" + , scientific = "Protium tenuifolium" + )#end list + tnf[[ 37]] = list( common = "cabeca-de-urubu" + , scientific = "Duroia macrophylla" + )#end list + tnf[[ 38]] = list( common = "cacau da mata" + , scientific = "Theobroma speciosum" + )#end list + tnf[[ 39]] = list( common = "caferana" + , scientific = "Coussarea albescens" + )#end list + tnf[[ 40]] = list( common = "caju da mata" + , scientific = "Anacardium" + )#end list + tnf[[ 41]] = list( common = "canela" + , scientific = "Ocotea acutangula" + )#end list + tnf[[ 42]] = list( common = "canela-de-jacamim" + , scientific = "Rinorea flavescens" + )#end list + tnf[[ 43]] = list( common = "canela-de-velho" + , scientific = "Rinorea macrocarpa" + )#end list + tnf[[ 44]] = list( common = "caneleira" + , scientific = "Casearia javitensis" + )#end list + tnf[[ 45]] = list( common = "caneleira folha peluda" + , scientific = "Casearia commersoniana" + )#end list + tnf[[ 46]] = list( common = "caneleira vermelha" + , scientific = "Matayba purgans" + )#end list + tnf[[ 47]] = list( common = "capitiu" + , scientific = "Siparuna cristata" + )#end list + tnf[[ 48]] = list( common = "caqui" + , scientific = "Diospyros vestita" + )#end list + tnf[[ 49]] = list( common = "carapanauba" + , scientific = "Aspidosperma oblongum" + )#end list + tnf[[ 50]] = list( common = "carapanauba amarela" + , scientific = "Aspidosperma auriculatum" + )#end list + tnf[[ 51]] = list( common = "castanha do para" + , scientific = "Bertholletia excelsa" + )#end list + tnf[[ 52]] = list( common = "castanha sapucaia" + , scientific = "Lecythis pisonis" + )#end list + tnf[[ 53]] = list( common = "cedro" + , scientific = "Cedrela odorata" + )#end list + tnf[[ 54]] = list( common = "chichua" + , scientific = "Maytenus pruinosa" + )#end list + tnf[[ 55]] = list( common = "cipo" + , scientific = "Liana" + )#end list + tnf[[ 56]] = list( common = "cocao" + , scientific = "Poecilanthe effusa" + )#end list + tnf[[ 57]] = list( common = "copaiba" + , scientific = "Copaifera reticulata" + )#end list + tnf[[ 58]] = list( common = "coracao-de-negro" + , scientific = "Chamaecrista xinguensis" + )#end list + tnf[[ 59]] = list( common = "cuiarana" + , scientific = "Buchenavia grandis" + )#end list + tnf[[ 60]] = list( common = "cumaru" + , scientific = "Dipteryx odorata" + )#end list + tnf[[ 61]] = list( common = "cumarui" + , scientific = "Prunus myrtifolia" + )#end list + tnf[[ 62]] = list( common = "cumate preto" + , scientific = "Calyptranthes lucida" + )#end list + tnf[[ 63]] = list( common = "cunario" + , scientific = "Connarus perrottetii" + )#end list + tnf[[ 64]] = list( common = "embauba" + , scientific = "Cecropia" + )#end list + tnf[[ 65]] = list( common = "embauba branca" + , scientific = "Cecropia distachya" + )#end list + tnf[[ 66]] = list( common = "embauba vermelha" + , scientific = "Cecropia sciadophylla" + )#end list + tnf[[ 67]] = list( common = "embaubarana" + , scientific = "Pourouma guianensis" + )#end list + tnf[[ 68]] = list( common = "envira" + , scientific = "Xylopia" + )#end list + tnf[[ 69]] = list( common = "envira branca" + , scientific = "Guatteria amazonica" + )#end list + tnf[[ 70]] = list( common = "envira cana" + , scientific = "Xylopia nitida" + )#end list + tnf[[ 71]] = list( common = "envira preta" + , scientific = "Guatteria poeppigiana" + )#end list + tnf[[ 72]] = list( common = "envira surucucu" + , scientific = "Duguetia echinophora" + )#end list + tnf[[ 73]] = list( common = "envira vermelha" + , scientific = "Xylopia ochrantha" + )#end list + tnf[[ 74]] = list( common = "escorrega-macaco" + , scientific = "Capirona decorticans" + )#end list + tnf[[ 75]] = list( common = "farinha seca" + , scientific = "Ampelocera edentula" + )#end list + tnf[[ 76]] = list( common = "fava" + , scientific = "Abarema jupunba" + )#end list + tnf[[ 77]] = list( common = "fava amargosa" + , scientific = "Vataireopsis speciosa" + )#end list + tnf[[ 78]] = list( common = "fava bolota" + , scientific = "Parkia pendula" + )#end list + tnf[[ 79]] = list( common = "fava da rosca" + , scientific = "Enterolobium schomburgkii" + )#end list + tnf[[ 80]] = list( common = "fava folha fina" + , scientific = "Pseudopiptadenia psilostachy" + )#end list + tnf[[ 81]] = list( common = "fava mapuxiqui" + , scientific = "Albizia pedicellaris" + )#end list + tnf[[ 82]] = list( common = "fava saboeiro" + , scientific = "Abarema" + )#end list + tnf[[ 83]] = list( common = "fava timbauba" + , scientific = "Enterolobium maximum" + )#end list + tnf[[ 84]] = list( common = "fava-arara-tucupi" + , scientific = "Parkia multijuga" + )#end list + tnf[[ 85]] = list( common = "fava-barbatimao" + , scientific = "Stryphnodendron pulcherrimum" + )#end list + tnf[[ 86]] = list( common = "fava-saboeiro" + , scientific = "Abarema" + )#end list + tnf[[ 87]] = list( common = "freijo" + , scientific = "Cordia exaltata" + )#end list + tnf[[ 88]] = list( common = "freijo branco" + , scientific = "Cordia bicolor" + )#end list + tnf[[ 89]] = list( common = "freijorana" + , scientific = "Cordia" + )#end list + tnf[[ 90]] = list( common = "geniparana" + , scientific = "Gustavia poeppigiana" + )#end list + tnf[[ 91]] = list( common = "ginja" + , scientific = "Eugenia omissa" + )#end list + tnf[[ 92]] = list( common = "goiabarana" + , scientific = "Eugenia omissa" + )#end list + tnf[[ 93]] = list( common = "goiabinha" + , scientific = "Myrciaria tenella" + )#end list + tnf[[ 94]] = list( common = "gombeira" + , scientific = "Swartzia laurifolia" + )#end list + tnf[[ 95]] = list( common = "gombeira folha peluda" + , scientific = "Swartzia laxiflora" + )#end list + tnf[[ 96]] = list( common = "gombeira vermelha" + , scientific = "Swartzia laurifolia" + )#end list + tnf[[ 97]] = list( common = "guariuba" + , scientific = "Clarisia racemosa" + )#end list + tnf[[ 98]] = list( common = "inajarana" + , scientific = "Quararibea guianensis" + )#end list + tnf[[ 99]] = list( common = "inga" + , scientific = "Inga macrophylla" + )#end list + tnf[[100]] = list( common = "inga branco" + , scientific = "Inga alba" + )#end list + tnf[[101]] = list( common = "inga vermelho" + , scientific = "Inga alba" + )#end list + tnf[[102]] = list( common = "inga xixica" + , scientific = "Inga" + )#end list + tnf[[103]] = list( common = "itauba amarela" + , scientific = "Mezilaurus itauba" + )#end list + tnf[[104]] = list( common = "itaubarana" + , scientific = "Casearia" + )#end list + tnf[[105]] = list( common = "janita" + , scientific = "Brosimum guianense" + )#end list + tnf[[106]] = list( common = "jarana" + , scientific = "Lecythis lurida" + )#end list + tnf[[107]] = list( common = "jatauba" + , scientific = "Matayba purgans" + )#end list + tnf[[108]] = list( common = "joao mole" + , scientific = "Guapira venosa" + )#end list + tnf[[109]] = list( common = "joao mole grande" + , scientific = "Neea" + )#end list + tnf[[110]] = list( common = "jutai pororoca" + , scientific = "Dialium guianense" + )#end list + tnf[[111]] = list( common = "jutai-acu" + , scientific = "Hymenaea courbaril" + )#end list + tnf[[112]] = list( common = "jutai-mirim" + , scientific = "Hymenaea parvifolia" + )#end list + tnf[[113]] = list( common = "jutaiarana" + , scientific = "Swartzia arborescens" + )#end list + tnf[[114]] = list( common = "lacre da mata" + , scientific = "Vismia" + )#end list + tnf[[115]] = list( common = "lacre vermelho" + , scientific = "Vismia latifolia" + )#end list + tnf[[116]] = list( common = "louro" + , scientific = "Nectandra pulverulenta" + )#end list + tnf[[117]] = list( common = "louro abacate" + , scientific = "Ocotea glomerata" + )#end list + tnf[[118]] = list( common = "louro amarelo" + , scientific = "Licaria brasiliensis" + )#end list + tnf[[119]] = list( common = "louro mole" + , scientific = "Nectandra pulverulenta" + )#end list + tnf[[120]] = list( common = "louro preto" + , scientific = "Nectandra reticulata" + )#end list + tnf[[121]] = list( common = "louro vermelho" + , scientific = "Ocotea cuprea" + )#end list + tnf[[122]] = list( common = "macacauba" + , scientific = "Platymiscium trinitatis" + )#end list + tnf[[123]] = list( common = "macaranduba" + , scientific = "Manilkara huberi" + )#end list + tnf[[124]] = list( common = "macucu" + , scientific = "Licania heteromorpha" + )#end list + tnf[[125]] = list( common = "mamorana" + , scientific = "Eriotheca globosa" + )#end list + tnf[[126]] = list( common = "mandioqueira ariana" + , scientific = "Qualea grandiflora" + )#end list + tnf[[127]] = list( common = "mandioqueira rosa" + , scientific = "Qualea dinizii" + )#end list + tnf[[128]] = list( common = "maparana" + , scientific = "Drypetes variabilis" + )#end list + tnf[[129]] = list( common = "marupa" + , scientific = "Simarouba amara" + )#end list + tnf[[130]] = list( common = "mata-calado" + , scientific = "Lacistema aggregatum" + )#end list + tnf[[131]] = list( common = "matamata" + , scientific = "Lecythis holcogyne" + )#end list + tnf[[132]] = list( common = "matamata branco" + , scientific = "Eschweilera pedicellata" + )#end list + tnf[[133]] = list( common = "matamata jarani" + , scientific = "Lecythis holcogyne" + )#end list + tnf[[134]] = list( common = "matamata preto" + , scientific = "Eschweilera coriacea" + )#end list + tnf[[135]] = list( common = "matamata vermelho" + , scientific = "Eschweilera bracteosa" + )#end list + tnf[[136]] = list( common = "melancieira" + , scientific = "Alexa grandiflora" + )#end list + tnf[[137]] = list( common = "mirindiba doce" + , scientific = "Glycydendron amazonicum" + )#end list + tnf[[138]] = list( common = "morototo" + , scientific = "Schefflera morototoni" + )#end list + tnf[[139]] = list( common = "muiauba" + , scientific = "Mouriri nigra" + )#end list + tnf[[140]] = list( common = "muiracatiara" + , scientific = "Astronium lecointei" + )#end list + tnf[[141]] = list( common = "muirapinima" + , scientific = "Maquira calophylla" + )#end list + tnf[[142]] = list( common = "muirarema" + , scientific = "Trichilia micrantha" + )#end list + tnf[[143]] = list( common = "muiratinga" + , scientific = "Maquira guianensis" + )#end list + tnf[[144]] = list( common = "muiratinga folha larga" + , scientific = "Maquira sclerophylla" + )#end list + tnf[[145]] = list( common = "muiratinga folha lisa" + , scientific = "Maquira sclerophylla" + )#end list + tnf[[146]] = list( common = "muiratinga folha longa" + , scientific = "Maquira sclerophylla" + )#end list + tnf[[147]] = list( common = "muiratinga folha peluda" + , scientific = "Perebea mollis" + )#end list + tnf[[148]] = list( common = "muirauba" + , scientific = "Mouriri brachyanthera" + )#end list + tnf[[149]] = list( common = "murta" + , scientific = "Myrcia fallax" + )#end list + tnf[[150]] = list( common = "muruci da mata" + , scientific = "Byrsonima arthropoda" + )#end list + tnf[[151]] = list( common = "murure" + , scientific = "Brosimum acutifolium" + )#end list + tnf[[152]] = list( common = "mututi" + , scientific = "Pterocarpus rohrii" + )#end list + tnf[[153]] = list( common = "muuba" + , scientific = "Bellucia grossularioides" + )#end list + tnf[[154]] = list( common = "pama" + , scientific = "Pseudolmedia macrophylla" + )#end list + tnf[[155]] = list( common = "papaterra" + , scientific = "Miconia ruficalyx" + )#end list + tnf[[156]] = list( common = "papaterra amarelo" + , scientific = "Miconia lepidota" + )#end list + tnf[[157]] = list( common = "papaterra folha peluda" + , scientific = "Miconia phanerostila" + )#end list + tnf[[158]] = list( common = "parapara" + , scientific = "Jacaranda copaia" + )#end list + tnf[[159]] = list( common = "passarinheira" + , scientific = "Casearia ulmifolia" + )#end list + tnf[[160]] = list( common = "pata-de-vaca" + , scientific = "Bauhinia" + )#end list + tnf[[161]] = list( common = "pato-de-mutum" + , scientific = "Lacunaria crenata" + )#end list + tnf[[162]] = list( common = "pau-cobra" + , scientific = "Salacia impressifolia" + )#end list + tnf[[163]] = list( common = "pau-de-arco amarelo" + , scientific = "Tabebuia serratifolia" + )#end list + tnf[[164]] = list( common = "pau-de-colher" + , scientific = "Lacmellea aculeata" + )#end list + tnf[[165]] = list( common = "pau-de-remo" + , scientific = "Chimarrhis turbinata" + )#end list + tnf[[166]] = list( common = "pau-jacare" + , scientific = "Laetia procera" + )#end list + tnf[[167]] = list( common = "pau-para-tudo" + , scientific = "Swartzia recurva" + )#end list + tnf[[168]] = list( common = "pente-de-macaco" + , scientific = "Apeiba glabra" + )#end list + tnf[[169]] = list( common = "pepino da mata" + , scientific = "Ambelania acida" + )#end list + tnf[[170]] = list( common = "piquia" + , scientific = "Caryocar villosum" + )#end list + tnf[[171]] = list( common = "pitomba" + , scientific = "Talisia retusa" + )#end list + tnf[[172]] = list( common = "quariquarana" + , scientific = "Rinorea" + )#end list + tnf[[173]] = list( common = "quaruba" + , scientific = "Vochysia" + )#end list + tnf[[174]] = list( common = "quaruba rosa" + , scientific = "Vochysia surinamensis" + )#end list + tnf[[175]] = list( common = "quaruba verdadeira" + , scientific = "Vochysia maxima" + )#end list + tnf[[176]] = list( common = "quarubarana" + , scientific = "Erisma uncinatum" + )#end list + tnf[[177]] = list( common = "quinarana" + , scientific = "Geissospermum laeve" + )#end list + tnf[[178]] = list( common = "saboeira" + , scientific = "Abarema jupunba" + )#end list + tnf[[179]] = list( common = "sucupira amarela" + , scientific = "Bowdichia nitida" + )#end list + tnf[[180]] = list( common = "sucupira preta" + , scientific = "Diplotropis triloba" + )#end list + tnf[[181]] = list( common = "tachi" + , scientific = "Tachigali" + )#end list + tnf[[182]] = list( common = "tachi branco" + , scientific = "Tachigali alba" + )#end list + tnf[[183]] = list( common = "tachi preto" + , scientific = "Tachigali myrmecophila" + )#end list + tnf[[184]] = list( common = "tachi preto folha grauda" + , scientific = "Tachigali myrmecophila" + )#end list + tnf[[185]] = list( common = "tachi preto folha miuda" + , scientific = "Tachigali paniculata" + )#end list + tnf[[186]] = list( common = "tachi vermelho" + , scientific = "Tachigali chrysophylla" + )#end list + tnf[[187]] = list( common = "taperebarana" + , scientific = "Heisteria laxiflora" + )#end list + tnf[[188]] = list( common = "taruma" + , scientific = "Vitex triflora" + )#end list + tnf[[189]] = list( common = "tatajuba" + , scientific = "Bagassa guianensis" + )#end list + tnf[[190]] = list( common = "tatapiririca" + , scientific = "Tapirira guianensis" + )#end list + tnf[[191]] = list( common = "tatapiririca folha peluda" + , scientific = "Tapirira obtusa" + )#end list + tnf[[192]] = list( common = "tatapiririca vermelha" + , scientific = "Tapirira guianensis" + )#end list + tnf[[193]] = list( common = "tauari" + , scientific = "Couratari stellata" + )#end list + tnf[[194]] = list( common = "tento" + , scientific = "Simaba polyphylla" + )#end list + tnf[[195]] = list( common = "tento folha grauda" + , scientific = "Ormosia paraensis" + )#end list + tnf[[196]] = list( common = "tento folha miuda" + , scientific = "Abarema mataybifolia" + )#end list + tnf[[197]] = list( common = "tento preto" + , scientific = "Abarema mataybifolia" + )#end list + tnf[[198]] = list( common = "tres folhas" + , scientific = "Allophylus punctatus" + )#end list + tnf[[199]] = list( common = "ucuuba" + , scientific = "Virola" + )#end list + tnf[[200]] = list( common = "ucuuba folha peluda" + , scientific = "Virola crebrinervia" + )#end list + tnf[[201]] = list( common = "ucuuba vermelha" + , scientific = "Virola elongata" + )#end list + tnf[[202]] = list( common = "ucuuba-terra-firme" + , scientific = "Virola michelii" + )#end list + tnf[[203]] = list( common = "ucuubarana" + , scientific = "Iryanthera sagotiana" + )#end list + tnf[[204]] = list( common = "uruazeiro" + , scientific = "Cordia exaltata" + )#end list + tnf[[205]] = list( common = "urucurana" + , scientific = "Aparisthmium cordatum" + )#end list + tnf[[206]] = list( common = "uxi" + , scientific = "Endopleura" + )#end list + tnf[[207]] = list( common = "uxi liso" + , scientific = "Endopleura uchi" + )#end list + tnf[[208]] = list( common = "verdinho" + , scientific = "Ilex petiolaris" + )#end list + tnf[[209]] = list( common = "cipo" + , scientific = "Liana" + )#end list + #---------------------------------------------------------------------------------------# + + + + #----- Convert the TNF list into a data frame. -----------------------------------------# + tnf = data.frame( apply( X = t(sapply(X = tnf , FUN = c)) + , MARGIN = c(1,2) + , FUN = unlist + )#end apply + , stringsAsFactors = FALSE + )#end data.frame + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Create an output data frame with the scientific names. The default "no-name" # + # data does not count as gap-filling. # + #---------------------------------------------------------------------------------------# + out = data.frame( common = rep("mato" ,times=n.datum) + , scientific = rep("Ignotum" ,times=n.datum) + , stringsAsFactors = FALSE + )#end data.frame + idx = match(datum$common,tnf$common) + ok = ! is.na(idx) + out[ok,] = tnf[idx[ok],] + out$gfflg = as.numeric(! out$common %in% c("cipo","mato")) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Copy data to the main data frame. # + #---------------------------------------------------------------------------------------# + sel = is.na(datum$scientific) + datum$common [sel] = out$common [sel] + datum$scientific [sel] = out$scientific[sel] + datum$gf.scientific[sel] = out$gfflg [sel] + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Put NA to species if only genus is known. # + #---------------------------------------------------------------------------------------# + gs.list = sapply(X = tolower(datum$scientific),FUN=strsplit,split=" ") + gs.length = sapply(X = gs.list, FUN = length) + gs.mat = t(as.data.frame(gs.list)) + g.only = gs.length < 2 + gs.mat[g.only,2] = NA + datum$genus = capwords(gs.mat[,1],strict=TRUE) + datum$scientific = paste(datum$genus,tolower (gs.mat[,2]),sep=" ") + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Fill in the family. # + #---------------------------------------------------------------------------------------# + datum$family = standard.family.name(datum) + #---------------------------------------------------------------------------------------# + + return(datum) +}#end if +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# Fill in the wood density for all individuals. We do this in three stages, and # +# save how the wood density was determined. The numbers represent the flag given for # +# each wood density. # +# 0 -- Individuals have full identification and the species is listed in the # +# database; we used the reported density for that species. # +# 1 -- The species/genus is identified but it isn't listed in the database, we use an # +# average of all other species of that genus that exist in database. # +# 2 -- We could not identify the individual to the genus level, but we know the # +# family. We use the average wood density of all individuals of this census that # +# belong to that family. # +# 3 -- No taxonomic information could be retrieved for this individual, so we filled # +# with random sampling. # +# # +# We also add 10 when the scientific name was gap filled. # +#------------------------------------------------------------------------------------------# +find.wood.density <<- function(datum,wood,verbose=FALSE){ + + #---------------------------------------------------------------------------------------# + # First loop, fill in information to all individuals for which the genus is # + # known. # + #---------------------------------------------------------------------------------------# + #----- Separate all species. -----------------------------------------------------------# + species = unique(datum$scientific) + nspecies = length(species) + + sci.genus.mean = matrix(nrow=0,ncol=3 + ,dimnames=list(NULL,c("scientific","genus","family"))) + sci.loose.mean = matrix(nrow=0,ncol=3 + ,dimnames=list(NULL,c("scientific","genus","family"))) + for (s in 1:nspecies){ + if (! is.na(species[s]) && length(grep("Ignotum",species[s])) == 0){ + if (verbose) cat(" - ",s,"/",nspecies," - ",species[s],"...","\n") + + #----- Get the genus and family of this species, in case we need it. -------------# + igen = which (datum$scientific == species[s]) + this.genus = unique(datum$genus[igen]) + this.family = unique(datum$family[igen]) + if (length(this.genus) != length(this.family)){ + cat(" - Perhaps a bastard genus?","\n") + browser() + }#end if + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Check whether we have biomass for this species. # + #---------------------------------------------------------------------------------# + if (species[s] %in% wood$scientific){ + #------------------------------------------------------------------------------# + # Find the index of this species in the database, and assign the wood # + # density from there. # + #------------------------------------------------------------------------------# + iwood = intersect( which(wood$scientific == species[s] ) + , intersect( which( wood$genus == this.genus ) + , which( wood$family == this.family) ) ) + if (length(iwood) == 0){ + #----- Intersection was zero! Misidentification, maybe? --------------------# + loose = TRUE + }else{ + if (any(is.finite(wood$density[iwood]))){ + sel = datum$scientific == species[s] + datum$wood.dens [sel] = wood$density[iwood] + datum$gf.wood.dens[sel] = 0 + fill.genus = FALSE + loose = FALSE + }else{ + loose = TRUE + fill.genus = this.genus %in% wood$genus + }#end if + #---------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------# + }else{ + loose = TRUE + fill.genus = this.genus %in% wood$genus + }#end if + #---------------------------------------------------------------------------------# + + if (fill.genus){ + #------------------------------------------------------------------------------# + # Find all the plants from this genus, take the average, and attribute # + # to this species. In this case, warn the user about the species, it may # + # be a typo in the scientific name that is easy to fix. # + #------------------------------------------------------------------------------# + iwood = intersect( which( wood$genus == this.genus ) + , which( wood$family == this.family) ) + if (length(iwood) == 0){ + #----- Intersection was zero! Misidentification, maybe? --------------------# + loose = TRUE + }else{ + if (any(is.finite(wood$density[iwood]))){ + sel = datum$scientific == species[s] + datum$wood.dens [sel] = mean(wood$density[iwood],na.rm=TRUE) + datum$gf.wood.dens[sel] = 1 + sci.genus.mean = rbind(sci.genus.mean + ,c(species[s],this.genus,this.family)) + if (verbose){ + cat(" * Species",species[s] + ,"not found. Use genus average instead...","\n") + }#end if + loose = FALSE + }else{ + #---- The plant probably doesn't have any family. -----------------------# + loose = TRUE + }#end if + #---------------------------------------------------------------------------# + }#end if + #------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # Append plants that have no family together. # + #---------------------------------------------------------------------------------# + if (loose){ + #---- The plant probably doesn't have any family. -----------------------------# + sci.loose.mean = rbind(sci.loose.mean + ,c(species[s],this.genus,this.family)) + #------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------# + }#end if + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # List all genera that didn't belong to any known family. # + #---------------------------------------------------------------------------------------# + if (verbose && nrow(sci.loose.mean) > 0){ + cat (" Found genera that didn't belong to any known family!","\n") + print(sci.loose.mean) + browser() + }#end if + + + genus.only = grep(" NA",sci.genus.mean[,"scientific"]) + + if (verbose){ + cat ("Only genus was provided: we used the genus mean wood density:","\n") + print (sci.genus.mean[genus.only,]) + + cat ("Species was provided but not found in the database:","\n") + print (sci.genus.mean[-genus.only,]) + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Second loop: we list all families, and look for individuals that have no genus # + # associated. We compute the mean wood density of the known individuals for that # + # family and use that as an estimate of wood density. # + #---------------------------------------------------------------------------------------# + #----- Separate all families. ----------------------------------------------------------# + families = unique(datum$family) + nfamilies = length(families) + sci.family.sample = matrix(nrow=0,ncol=3 + ,dimnames=list(NULL,c("scientific","family","wood.dens"))) + #----- Loop over all families. ---------------------------------------------------------# + for (f in 1:nfamilies){ + if (families[f] != "Ignotaceae"){ + if (verbose) cat(" - ",f,"/",nfamilies," - ",families[f],"...","\n") + + #----- Get the individuals that belong to this family. ---------------------------# + ifam = which (datum$family == families[f] & is.finite(datum$wood.dens)) + imiss = which (datum$family == families[f] & is.na (datum$wood.dens)) + if (length(imiss) > 0 && length(ifam) > 0){ + sample.wood.dens = sample( x = datum$wood.dens[ifam] + , size = length(imiss) + , replace = TRUE + )#end sample + datum$wood.dens [imiss] = sample.wood.dens + datum$gf.wood.dens[imiss] = 2 + + gf2 = cbind(datum$scientific[imiss] + ,datum$family [imiss] + ,sprintf("%6.3f",sample.wood.dens) + )#end cbind + sci.family.sample = rbind(sci.family.sample,gf2) + + #------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------# + }#end if + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Stop if there was any genus that didn't belong to any known family. # + #---------------------------------------------------------------------------------------# + if (nrow(sci.family.sample) > 0){ + if (verbose){ + cat (" Found families that unidientified genera!","\n") + print(sci.family.sample,quote=FALSE) + }#end if + }#end if + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Final block. We fill in the wood density for unknown individuals, by randomly # + # sampling from the individuals we know the density. # + #---------------------------------------------------------------------------------------# + imiss = which(is.na(datum$wood.dens)) + nmiss = length(imiss) + if (nmiss > 0){ + if (verbose){ + cat (" The following families are filled with global sampling: ","\n") + fam.global.sampling = t(t(sort(unique(datum$family[imiss])))) + print(fam.global.sampling) + }#end if + + datum$wood.dens [imiss] = sample(x=datum$wood.dens[-imiss],size=nmiss,replace=TRUE) + datum$gf.wood.dens[imiss] = 3 + }#end if + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Adjust the gap-filling flag for wood density by adding whether the scientific # + # name is gap-filled. # + #---------------------------------------------------------------------------------------# + datum$gf.wood.dens = datum$gf.wood.dens + 10 * datum$gf.scientific + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Assign a plant functional type based on the wood density. # + #---------------------------------------------------------------------------------------# + pft.cut = cut(datum$wood.dens,breaks=pft.breaks) + pft.levels = levels(pft.cut) + pft.idx = match(pft.cut,pft.levels) + datum$pft = mypfts[pft.idx] + #---------------------------------------------------------------------------------------# + return(datum) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This attributes scientific names based on common names for surveys in Manaus. It # +# is not a good idea to use this anywhere else because common names may mean completely # +# dif +#==========================================================================================# +#==========================================================================================# +scientific.lookup.mao <<- function(datum,lookup.path){ + + #----- Read in the look-up table. ------------------------------------------------------# + lookup.file = paste(lookup.path,"manaus_taxon_lookup.csv",sep="/") + look.up = read.csv(file=lookup.file,stringsAsFactors=FALSE) + look.up$common = tolower(trim(look.up$common )) + look.up$scientific = trim(look.up$scientific) + look.up$family = trim(look.up$family ) + #---------------------------------------------------------------------------------------# + + + + #----- Break into genus and species. ---------------------------------------------------# + gs.list = sapply(X = tolower(look.up$scientific),FUN=strsplit,split=" ") + gs.length = sapply(X = gs.list, FUN = length) + gs.mat = t(as.data.frame(gs.list)) + g.only = gs.length < 2 + gs.mat[g.only,2] = NA + g = capwords(gs.mat[,1],strict=TRUE) + s = tolower(gs.mat[,2]) + g.s = paste(g,s,sep=" ") + g.s[is.na(g) & is.na(s)] = NA + look.up$scientific = g.s + look.up$genus = g + #---------------------------------------------------------------------------------------# + + + + #----- Trim the common names, and simplify/replace some names. -------------------------# + datum$common = tolower(trim(datum$common)) + datum$common[is.na(datum$common)] = "mato" + #---------------------------------------------------------------------------------------# + + + + #----- Find all unique common names. ---------------------------------------------------# + unique.common = unique(datum$common) + n.common = length(unique.common) + notfound = NULL + for (n in 1:n.common){ + #----- Find the trees that have the same common name as this one. -------------------# + cat (" - ",n,"/",n.common," -- ",unique.common[n],"\n") + w.dat = which(datum$common %in% unique.common[n]) + n.dat = length(w.dat) + #------------------------------------------------------------------------------------# + + + #----- Find the trees in the look-up table with the same common name. ---------------# + w.look = which(look.up$common %in% unique.common[n]) + n.look = length(w.look) + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Check how many trees have the same common name in the look-up table. # + #------------------------------------------------------------------------------------# + if (n.look == 1){ + #----- Only one. Use it. --------------------------------------------------------# + datum$scientific [w.dat] = look.up$scientific[w.look] + datum$genus [w.dat] = look.up$genus [w.look] + datum$gf.scientific[w.dat] = 1 + }else if (n.look > 1){ + datum$scientific [w.dat] = sample( x = look.up$scientific[w.look] + , size = n.dat + , replace = TRUE + )#end sample + datum$genus [w.dat] = look.up$genus [w.look] + datum$gf.scientific[w.dat] = 1 + }else{ + notfound = c(notfound,unique.common[n]) + datum$scientific [w.dat] = "Ignotum" + datum$genus [w.dat] = "Ignotum" + datum$gf.scientific[w.dat] = 0 + }#end if + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# + return(datum) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This attributes scientific names based on common names for surveys in Rebio Jaru. # +# It is NOT a good idea to use this anywhere else because common names may mean completely # +# diferent things... # +#==========================================================================================# +#==========================================================================================# +scientific.lookup.rja <<- function(datum,lookup.path){ + + #----- Read in the look-up table. ------------------------------------------------------# + lookup.file = paste(lookup.path,"rondonia_taxon_lookup.csv",sep="/") + look.up = read.csv(file=lookup.file,stringsAsFactors=FALSE) + look.up$common = tolower(trim(look.up$common )) + look.up$scientific = trim(look.up$scientific) + look.up$family = trim(look.up$family ) + #---------------------------------------------------------------------------------------# + + + + #----- Break into genus and species. ---------------------------------------------------# + gs.list = sapply(X = tolower(look.up$scientific),FUN=strsplit,split=" ") + gs.length = sapply(X = gs.list, FUN = length) + gs.mat = t(as.data.frame(gs.list)) + g.only = gs.length < 2 + gs.mat[g.only,2] = NA + g = capwords(gs.mat[,1],strict=TRUE) + s = tolower(gs.mat[,2]) + g.s = paste(g,s,sep=" ") + g.s[is.na(g) & is.na(s)] = NA + look.up$scientific = g.s + look.up$genus = g + #---------------------------------------------------------------------------------------# + + + + #----- Trim the common names, and simplify/replace some names. -------------------------# + datum$common = tolower(trim(datum$common)) + datum$common[is.na(datum$common)] = "mato" + #---------------------------------------------------------------------------------------# + + + + #----- Find all unique common names. ---------------------------------------------------# + unique.common = unique(datum$common) + n.common = length(unique.common) + notfound = NULL + for (n in 1:n.common){ + #----- Find the trees that have the same common name as this one. -------------------# + cat (" - ",n,"/",n.common," -- ",unique.common[n],"\n") + w.dat = which(datum$common %in% unique.common[n]) + n.dat = length(w.dat) + #------------------------------------------------------------------------------------# + + + #----- Find the trees in the look-up table with the same common name. ---------------# + w.look = which(look.up$common %in% unique.common[n]) + n.look = length(w.look) + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Check how many trees have the same common name in the look-up table. # + #------------------------------------------------------------------------------------# + if (n.look == 1){ + #----- Only one. Use it. --------------------------------------------------------# + datum$scientific [w.dat] = look.up$scientific[w.look] + datum$genus [w.dat] = look.up$genus [w.look] + datum$gf.scientific[w.dat] = 1 + }else if (n.look > 1){ + datum$scientific [w.dat] = sample( x = look.up$scientific[w.look] + , size = n.dat + , replace = TRUE + )#end sample + datum$genus [w.dat] = look.up$genus [w.look] + datum$gf.scientific[w.dat] = 1 + }else{ + notfound = c(notfound,unique.common[n]) + datum$scientific [w.dat] = "Ignotum" + datum$genus [w.dat] = "Ignotum" + datum$gf.scientific[w.dat] = 0 + }#end if + #------------------------------------------------------------------------------------# + }#end for + #---------------------------------------------------------------------------------------# + return(datum) +}#end function +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/taylor.plot.r b/R-utils/taylor.plot.r new file mode 100644 index 000000000..d3d7ce7c1 --- /dev/null +++ b/R-utils/taylor.plot.r @@ -0,0 +1,449 @@ +#==========================================================================================# +#==========================================================================================# +# Function taylor.plot. This is similar to the taylor.diagram (package plotrix), with # +# some adaptations to make it more flexible. # +# # +# 1. The size of the labels is controlled by an input variable: cex.label (default is the # +# same size as the original). # +# 2. The code now checks whether 'mod' is a list, vector, or array, and standardises # +# as a list. This allows multiple models to be dumped to the plot at once. # +# 3. Observations are allowed to contain NA, in which case values will be ignored. # +# # +#------------------------------------------------------------------------------------------# +taylor.plot <<- function ( obs + , mod + , maxsd = NULL + , add = FALSE + , pt.col = "red" + , pt.bg = pt.col + , pt.pch = 19 + , pt.cex = 1.0 + , pt.lwd = 2.0 + , pos.corr = NA + , plot.obs = TRUE + , obs.col = "black" + , obs.cex = 2.0 + , xlab = "RMS error" + , ylab = "Standard deviation" + , zlab = "Correlation" + , main = "Taylor Diagram" + , show.gamma = TRUE + , ngamma = 3 + , gamma.col = "purple3" + , gamma.bg = "white" + , gamma.lty = "solid" + , gamma.lwd = 1.2 + , sd.arcs = TRUE + , sd.col = "grey40" + , sd.lty = "dotted" + , sd.lwd = 1.2 + , plot.sd.obs = TRUE + , sd.obs.col = "orchid" + , sd.obs.lty = "solid" + , sd.obs.lwd = 2.0 + , corr.grid = TRUE + , corr.label = c(0, .2, .4, .6, .8, .9, .95, .99) + , corr.col = "black" + , corr.lty = "dotdash" + , corr.lwd = 1.0 + , cex.axis = 1.0 + , cex.label = 1.0 + , normalize + , normalise = if (! missing(normalize)){ + normalize + }else{ + FALSE + }#end if + , mar = c(5,5,4,4) + 0.1 + , ... + ){ + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Make sure that 'obs' is a vector, and that 'mod' is a list. # + #---------------------------------------------------------------------------------------# + #----- Reference. ----------------------------------------------------------------------# + obs = unlist (obs) + keep = is.finite(obs) + n.obs = length (obs) + #----- Check which type of variable "mod" is. ------------------------------------------# + if (is.list(mod)){ + #----- Make sure that dimensions match, otherwise leave "mod" as a list. ------------# + n.mod = sapply(X=mod,FUN=length) + if (any(n.mod) != n.obs && sum(n.mod) != n.obs){ + cat(" - Length(mod): ",paste(n.mod,collapse=" "),"\n") + cat(" - Length(obs):",n.obs,"\n") + stop(" Dimensions of 'mod' and 'obs' must match!") + }else if(sum(n.mod) == n.obs){ + warning(" Converting 'mod' from multiple lists to a single list...") + mod = list(unlist(mod)) + }#end if + #------------------------------------------------------------------------------------# + }else if(is.array(mod) || is.data.frame(mod)){ + #------------------------------------------------------------------------------------# + # "mod" is a matrix or array, find the matching dimension convert it to list. # + #------------------------------------------------------------------------------------# + dim.mod = dim(mod) + n.mod = length(mod) + n.dim = length(dim.mod) + o.dim = which(dim.mod == n.obs) + if (length(o.dim) == 0 && n.obs != n.obs){ + cat(" - Dim(mod) : ",paste(dim.mod,collapse=" "),"\n") + cat(" - Length(mod): ",n.mod ,"\n") + cat(" - Length(obs): ",n.obs ,"\n") + stop(" Either the length or one dimension of 'mod' must match 'obs' size!") + }else if(length(o.dim) == 0 && n.mod == n.obs){ + warning(" Converting array 'mod' to a vector...") + mod = list(unlist(mod[keep])) + }else if(length(o.dim) > 1){ + cat (" - Dim(mod) : ",paste(dim.mod,collapse=" "),"\n") + cat (" - Length(mod): ",n.mod ,"\n") + cat (" - Length(obs): ",n.obs ,"\n") + cat (" Ambiguous: 2 or more dimensions of 'mod' match the 'obs' length...","\n") + stop(" Hint: split the array 'mod' into a list and try again...") + }else{ + #----- Success! Split the array into lists. --------------------------------------# + mod = aperm(a = mod, perm = c(sequence(n.dim)[-o.dim],o.dim)) + mod = t(matrix(mod,nrow=prod(dim.mod[-o.dim]),ncol=dim.mod[o.dim])) + mod = split(mod, col(mod)) + #---------------------------------------------------------------------------------# + }#end if + #------------------------------------------------------------------------------------# + }else{ + #------------------------------------------------------------------------------------# + # "mod" is something else (probably a vector). Convert it to a list and hope # + # for the best... # + #------------------------------------------------------------------------------------# + mod = unlist(mod) + n.mod = length(mod) + if (n.mod != n.obs){ + cat (" - Length(mod): ",n.mod,"\n") + cat (" - Length(obs): ",n.obs,"\n") + stop(" Dimensions of 'mod' and 'obs' must match...") + }else{ + mod = list(unlist(mod)) + }#end if + #------------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------------# + + + + #----- Keep only the valid observations. -----------------------------------------------# + obs = obs[keep] + mod = lapply(X=mod,FUN="[",keep) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # In case the user asked positive correlation only but there are negative # + # correlation points, warn the user. # + #---------------------------------------------------------------------------------------# + R = sapply(X = mod, FUN = cor, x = obs, use = "pairwise") + if (is.na(pos.corr)){ + pos.corr = all(R >= 0.) + }else if (pos.corr && any(R < 0)){ + warning(" There are negative correlations, but you've asked positive side only!") + }#end if + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Find the coefficient of correlation and standard deviations. # + #---------------------------------------------------------------------------------------# + sd.obs.orig = sd (obs) + sd.mod.orig = sapply(X = mod, FUN = sd ) + if (normalise) { + sd.mod = sd.mod.orig / sd.obs.orig + sd.obs = 1.0 + }else{ + sd.mod = sd.mod + sd.obs = sd.obs + }#end if + if (is.null(maxsd)) maxsd = 1.5 * max(unlist(c(sd.mod, sd.obs))) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Check whether this is a new plot or not. If it is a new plot, create the # + # diagram background before adding the new information. # + #---------------------------------------------------------------------------------------# + if (! add){ + #----- Save previous PAR settings. -------------------------------------------------# + par.all = par(no.readonly=FALSE) + par.orig = par(no.readonly=TRUE ) + on.exit(par.orig) + #-----------------------------------------------------------------------------------# + + + + #-----------------------------------------------------------------------------------# + # Define some settings differently depending on whether this is a positive- # + # -only or full correlation Taylor plot. # + #-----------------------------------------------------------------------------------# + quarter = seq(from=0,to= 90,by=1) * pio180 + half = seq(from=0,to=180,by=1) * pio180 + if (pos.corr){ + xlim = c(0,maxsd) + ylim = c(0,maxsd) + x.xlab = sd.obs + y.xlab = -0.15 * maxsd + srt.xlab = 0 + x.ylab = -0.15 * maxsd + y.ylab = 0.5 * maxsd + srt.ylab = 90 + x0.axis = c( 0, 0) + y0.axis = c( 0, 0) + x1.axis = c( maxsd, 0) + y1.axis = c( 0, maxsd) + r.gamma = half + r.sdarc = quarter + r.corr = quarter + corr.label = corr.label[corr.label != 0] + corr.at = acos(corr.label) + corr.angle = 45. * pio180 + corr.angle.lab = acos(cos(corr.angle) * par.all$din[2] / par.all$din[1]) + }else{ + xlim = c(-maxsd,maxsd) + ylim = c( 0,maxsd) + x.xlab = sd.obs + y.xlab = -0.20 * maxsd + srt.xlab = 0 + x.ylab = 0 + y.ylab = -0.20 * maxsd + srt.ylab = 0 + x0.axis = c(-maxsd, 0) + y0.axis = c( 0, 0) + x1.axis = c( maxsd, 0) + y1.axis = c( 0, maxsd) + r.gamma = half + r.sdarc = half + r.corr = half + corr.label = sort(unique(c(-corr.label,0,corr.label))) + corr.at = acos(corr.label) + corr.angle = 90. * pio180 + corr.angle.lab = corr.angle + }#end if + #-----------------------------------------------------------------------------------# + + + + + #----- Start up a new plotting window. ---------------------------------------------# + par(mar=mar,xpd=TRUE) + plot.new() + plot.window(xlim=xlim, ylim = ylim,xaxs="i",yaxs="i",...) + title(main=main,cex=cex.axis) + par(xpd = TRUE) + text(x=x.xlab,y=y.xlab,labels=xlab,srt=srt.xlab,cex=cex.axis,col=gamma.col,font=2) + text(x=x.ylab,y=y.ylab,labels=ylab,srt=srt.ylab,cex=cex.axis,col=sd.col,font=2) + #-----------------------------------------------------------------------------------# + + + + + #----- Plot the correlation grid. --------------------------------------------------# + if (corr.grid) { + for (coat in corr.at){ + lines( x = c(0, maxsd * cos(coat)) + , y = c(0, maxsd * sin(coat)) + , col = corr.col + , lty = corr.lty + , lwd = corr.lwd + )#end lines + }#end for + #--------------------------------------------------------------------------------# + }#end if + #-----------------------------------------------------------------------------------# + + + + #----- Plot the axis lines and labels. ---------------------------------------------# + segments( x0 = x0.axis, y0 = y0.axis, x1 = x1.axis, y1 = y1.axis + , col = par.orig$fg, lty = par.orig$lty, lwd = par.orig$lwd) + axis.ticks = pretty(xlim) + axis.ticks = axis.ticks[abs(axis.ticks) <= maxsd] + axis( side = 1 + pos.corr, at = axis.ticks, labels = abs(axis.ticks) + , col.axis = sd.col, cex.axis = cex.axis) + #-----------------------------------------------------------------------------------# + + + + + #-----------------------------------------------------------------------------------# + # Plot the standard deviation arcs if the user wants it. # + #-----------------------------------------------------------------------------------# + plot.sd.arcs = ( ( is.logical(sd.arcs) && any(sd.arcs) ) + || ( is.numeric(sd.arcs) && any(sd.arcs != 0) ) ) + if (plot.sd.arcs) { + #---- Grab the axis ticks to plot the curves. ----------------------------------# + if (is.logical(sd.arcs)) sd.arcs = axis.ticks[axis.ticks >= 0] + #-------------------------------------------------------------------------------# + + + + #-------------------------------------------------------------------------------# + # Plot all arcs. # + #-------------------------------------------------------------------------------# + for (sdarc in sd.arcs) { + x.curve = cos(r.sdarc) * sdarc + y.curve = sin(r.sdarc) * sdarc + lines(x = x.curve, y = y.curve, col = sd.col, lty = sd.lty, lwd = sd.lwd) + }#end for (sdarc in sd.arcs) + #-------------------------------------------------------------------------------# + }# if (plot.sd.arcs) + #-----------------------------------------------------------------------------------# + + + + + #-----------------------------------------------------------------------------------# + # Check whether to show the concentric circles around the target. # + #-----------------------------------------------------------------------------------# + plot.gamma = ( ( is.logical(show.gamma) && any(show.gamma ) ) + || ( is.numeric(show.gamma) && any(show.gamma != 0) ) ) + + if (plot.gamma) { + #----- Use the default circles. ------------------------------------------------# + if (is.logical(show.gamma)){ + show.gamma = pretty(c(0, maxsd), n = ngamma)[-1] + }#end if + ngamma = length(show.gamma) + #-------------------------------------------------------------------------------# + + + #-------------------------------------------------------------------------------# + # Plot the curves. # + #-------------------------------------------------------------------------------# + for (gg in 1:ngamma){ + x.curve = cos(r.gamma) * show.gamma[gg] + sd.obs + y.curve = sin(r.gamma) * show.gamma[gg] + r2.curve = x.curve * x.curve + y.curve * y.curve + if (pos.corr){ + bye = r2.curve > maxsd * maxsd | x.curve < 0 + }else{ + bye = r2.curve > maxsd * maxsd + }#end if + x.curve[bye] = NA + y.curve[bye] = NA + idx = floor(median(which(! bye))) + lines( x = x.curve + , y = y.curve + , col = gamma.col + , lwd = gamma.lwd + , lty = gamma.lty + )#end lines + #----- Labels. --------------------------------------------------------------# + boxed.labels( x = x.curve[idx] + , y = y.curve[idx] + , labels = show.gamma[gg] + , col = gamma.col + , bg = gamma.bg + , cex = cex.label + , border = FALSE + )#end border.labels + #----------------------------------------------------------------------------# + }#end for (gg in 1:ngamma) + }#end if (plot.gamma) + #-----------------------------------------------------------------------------------# + + + + #-----------------------------------------------------------------------------------# + # Plot the outer curves and tick marks ("correlation axis"). # + #-----------------------------------------------------------------------------------# + #------ Outer curve. ---------------------------------------------------------------# + x.curve = cos(r.corr) * maxsd + y.curve = sin(r.corr) * maxsd + lines( x = x.curve + , y = y.curve + , col = par.orig$fg + , lty = par.orig$lty + , lwd = par.orig$lwd + )#end lines + x0.at = 1.00 * cos(corr.at) * maxsd + x1.at = 1.025 * cos(corr.at) * maxsd + y0.at = 1.00 * sin(corr.at) * maxsd + y1.at = 1.025 * sin(corr.at) * maxsd + #------ Tick marks. ----------------------------------------------------------------# + segments( x0 = x0.at + , y0 = y0.at + , x1 = x1.at + , y1 = y1.at + , col = par.orig$fg + , lty = par.orig$lty + , lwd = par.orig$lwd + )#end segments + #------ Axis tick labels. ----------------------------------------------------------# + for (cc in 1:length(corr.at)){ + text ( x = 1.05 * cos(corr.at[cc]) * maxsd + , y = 1.05 * sin(corr.at[cc]) * maxsd + , labels = corr.label[cc] + , col = corr.col + , cex = 1.1 * cex.label + , srt = 180 * corr.at[cc] / pi - 90 + )#end text + }#end for (cc in 1:length(corr.at)) + #------ Axis label. ----------------------------------------------------------------# + text( x = cos(corr.angle) * maxsd * 1.15 + , y = sin(corr.angle) * maxsd * 1.15 + , labels = zlab + , col = corr.col + , cex = cex.axis + , srt = 180. * corr.angle.lab / pi - 90. + , font = 2 + )#end text + #-----------------------------------------------------------------------------------# + + + #-----------------------------------------------------------------------------------# + # Check whether to plot the reference standard deviation arc. # + #-----------------------------------------------------------------------------------# + if (plot.sd.obs) { + x.curve = cos(r.sdarc) * sd.obs + y.curve = sin(r.sdarc) * sd.obs + lines(x.curve, y.curve,col=sd.obs.col,lty=sd.obs.lty,lwd=sd.obs.lwd) + }#end if + #-----------------------------------------------------------------------------------# + + + #-----------------------------------------------------------------------------------# + # Check whether to plot a point showing the sweetest spot. # + #-----------------------------------------------------------------------------------# + if (plot.obs) { + points( x = sd.obs, y = 0, pch=16, cex = 2/3 * obs.cex, col = obs.col) + points( x = sd.obs, y = 0, pch=21, cex = obs.cex, col = obs.col) + }#end if + #-----------------------------------------------------------------------------------# + }#end if (! add) + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # Plot the points. # + #---------------------------------------------------------------------------------------# + points( x = sd.mod * R + , y = sd.mod * sin(acos(R)) + , pch = pt.pch + , col = pt.col + , bg = pt.bg + , cex = pt.cex + , lwd = pt.lwd + )#end points + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Return the basic statistics. # + #---------------------------------------------------------------------------------------# + ans = list( corr = R, sd.obs = sd.obs.orig, sd.mod = sd.mod.orig) + return(ans) + #---------------------------------------------------------------------------------------# +}#end function +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/test.goodness.r b/R-utils/test.goodness.r new file mode 100644 index 000000000..6c7689912 --- /dev/null +++ b/R-utils/test.goodness.r @@ -0,0 +1,152 @@ +#==========================================================================================# +#==========================================================================================# +# This function computes several metrics to test the goodness of fit. The list is # +# not complete, contributions are welcome. # +# # +# INPUT: # +# ~ x.mod -- the modelled values of x # +# ~ x.obs -- the observed values of x # +# ~ n.parameters -- number of parameters (if the number of parameters is unknown, we # +# don't assume any parameters). # +#------------------------------------------------------------------------------------------# +test.goodness <<- function(x.mod,x.obs,n.parameters=NULL){ + + + #---- Crash if the x.mod and x.obs don't have the same size and class. -----------------# + dlength = (length(x.mod) - length(x.obs)) != 0 + dclass = any(sort(is(x.mod)) != sort(is(x.obs))) + if (dlength || dclass){ + stop (" x.mod and x.obs must have the same size and class","\n") + }#end if + #---------------------------------------------------------------------------------------# + + + + #---- Find some general variables that will be used during this function. --------------# + sel = is.finite(x.mod) & is.finite(x.obs) + n.ok = sum(sel) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Find the number of degrees of freedom for both total and explained variance. # + #---------------------------------------------------------------------------------------# + df.tot = n.ok - 1 + if (is.null(n.parameters)){ + df.err = n.ok - 1 + }else{ + df.err = n.ok - n.parameters - 1 + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Check whether we have enough valid observations before proceeding. # + #---------------------------------------------------------------------------------------# + if (df.err > 1){ + #------------------------------------------------------------------------------------# + # Find the total and model residuals. # + #------------------------------------------------------------------------------------# + x.mod.ok = x.mod[sel] + x.obs.ok = x.obs[sel] + x.tot.ok = x.obs.ok - mean(x.obs.ok) + x.res.ok = x.obs.ok - x.mod.ok + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Find the mean bias, standard deviation of the residuals, and the support for # + # the errors being normally distributed around the mean. # + #------------------------------------------------------------------------------------# + bias = mean(-x.res.ok) + sigma = sd (-x.res.ok) + lsq.lnlike = sum(dnorm(x.res.ok,mean=0,sd=sigma,log=TRUE)) + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Find the mean square error of the estimator, and the root mean square error. # + #------------------------------------------------------------------------------------# + mse = bias^2 + sigma^2 + rmse = sqrt(mse) + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Find the coefficient of determination (R2). If the number of parameters is # + # given, then we find the adjusted R^2 (the one that penalises due to the number of # + # parameters). Otherwise we can't correct, so we just compare the sum of the # + # variances. # + #------------------------------------------------------------------------------------# + ss.tot = sum(x.tot.ok^2) + ss.err = sum(x.res.ok^2) + r.squared = 1. - df.tot * ss.err / ( df.err * ss.tot ) + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Find the estimator's fraction of variance unexplained (FVU). Because we use # + # MSE instead of ss.err, this is not 1 - R2. # + #------------------------------------------------------------------------------------# + fvue = mse / var(x.obs.ok) + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Run the Shapiro-Wilk test to determine whether the residuals are normally # + # distributed or not. # + #------------------------------------------------------------------------------------# + sw.test = sw.test(x.res.ok) + sw.statistic = sw.test$statistic + sw.p.value = sw.test$p.value + #------------------------------------------------------------------------------------# + }else{ + #------------------------------------------------------------------------------------# + # Not enough data points. # + #------------------------------------------------------------------------------------# + bias = NA + sigma = NA + lsq.lnlike = NA + mse = NA + rmse = NA + ss.tot = NA + ss.err = NA + r.squared = NA + fvue = NA + sw.statistic = NA + sw.p.value = NA + #------------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Return everything to the user. # + #---------------------------------------------------------------------------------------# + ans = list ( n = n.ok + , df.tot = df.tot + , df.err = df.err + , bias = bias + , sigma = sigma + , lsq.lnlike = lsq.lnlike + , mse = mse + , rmse = rmse + , ss.tot = ss.tot + , ss.err = ss.err + , r.squared = r.squared + , fvue = fvue + , sw.statistic = sw.statistic + , sw.p.value = sw.p.value + )#end list + return(ans) + #---------------------------------------------------------------------------------------# +}#end function +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/thermlib.r b/R-utils/thermlib.r new file mode 100644 index 000000000..7b3d8cf51 --- /dev/null +++ b/R-utils/thermlib.r @@ -0,0 +1,896 @@ +#==========================================================================================# +#==========================================================================================# +# These are some global variables used by the thermodynamic library. # +#==========================================================================================# +#==========================================================================================# + +#------------------------------------------------------------------------------------------# +# These constants came from the paper in which the saturation vapour pressure is # +# based on: # +# # +# Murphy, D. M.; Koop, T., 2005: Review of the vapour pressures of ice and supercooled # +# water for atmospheric applications. Q. J. Royal Meteor. Soc., vol. 31, pp. 1539- # +# 1565 (hereafter MK05). # +# # +# These equations give the triple point at t3ple, with vapour pressure being es3ple. # +#------------------------------------------------------------------------------------------# +#----- Coefficients based on equation (7): ------------------------------------------------# +iii.7 <<- c(9.550426,-5723.265, 3.53068,-0.00728332) +#----- Coefficients based on equation (10), first fit -------------------------------------# +l01.10 <<- c(54.842763,-6763.22 ,-4.210 , 0.000367) +#----- Coefficients based on equation (10), second fit ------------------------------------# +l02.10 <<- c(53.878 ,-1331.22 ,-9.44523, 0.014025) +#----- Coefficients based on the hyperbolic tangent ---------------------------------------# +ttt.10 <<- c(0.0415,218.8) +#------------------------------------------------------------------------------------------# + + + + + +#==========================================================================================# +#==========================================================================================# +# This function calculates the saturation vapour pressure as a function of Kelvin # +# temperature. # +#------------------------------------------------------------------------------------------# +eslif <<- function(temp,funout=FALSE){ + + liq = is.finite(temp) & temp >= t3ple + ice = is.finite(temp) & temp < t3ple + + l1fun = NA + temp + l2fun = NA + temp + ttfun = NA + temp + iifun = NA + temp + esfun = NA + temp + + if (any(liq)){ + l1fun[liq] = ( l01.10[1] + l01.10[2]/temp[liq] + l01.10[3]*log(temp[liq]) + + l01.10[4] * temp[liq] ) + l2fun[liq] = ( l02.10[1] + l02.10[2]/temp[liq] + l02.10[3]*log(temp[liq]) + + l02.10[4] * temp[liq] ) + ttfun[liq] = tanh(ttt.10[1] * (temp[liq] - ttt.10[2])) + esfun[liq] = exp(l1fun[liq] + ttfun[liq] * l2fun[liq]) + }#end if + + if (any(ice)){ + iifun[ice] = ( iii.7[1] + iii.7[2]/temp[ice] + iii.7[3] * log(temp[ice]) + + iii.7[4] * temp[ice] ) + esfun[ice] = exp(iifun[ice]) + }#end if + + if (funout){ + ans = list(esfun = esfun,l1fun = l1fun, l2fun=l2fun, ttfun = ttfun, iifun = iifun) + return(ans) + }else{ + return(esfun) + }#end if +}#end function eslif +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function calculates the derivative of the saturation vapour pressure as a # +# function of Kelvin temperature. # +#------------------------------------------------------------------------------------------# +eslifp <<- function(temp){ + + liq = is.finite(temp) & temp >= t3ple + ice = is.finite(temp) & temp < t3ple + + #------ Find the saturation vapour pressure and the function evaluations. --------------# + efun = eslif(temp,funout = TRUE) + l1fun = efun$l1fun + l2fun = efun$l2fun + ttfun = efun$ttfun + iifun = efun$iifun + esfun = efun$esfun + #---------------------------------------------------------------------------------------# + + + #------ Initialise the derivatives. ----------------------------------------------------# + l1prime = NA + temp + l2prime = NA + temp + ttprime = NA + temp + iiprime = NA + temp + desdt = NA + temp + #---------------------------------------------------------------------------------------# + + + #------ Solve the derivative for the liquid phase. -------------------------------------# + if (any(liq)){ + l1prime [liq] = - l01.10[2] / temp[liq]^2 + l01.10[3]/temp[liq] + l01.10[4] + l2prime [liq] = - l02.10[2] / temp[liq]^2 + l02.10[3]/temp[liq] + l02.10[4] + ttprime [liq] = ttt.10[1] * (1.0 - ttfun[liq]^2) + desdt [liq] = esfun[liq] * ( l1prime[liq] + l2prime[liq] * ttfun[liq] + + l2fun[liq] * ttprime[liq] ) + }#end if + #---------------------------------------------------------------------------------------# + + + #------ Solve the derivative for the ice phase. ----------------------------------------# + if (any(ice)){ + iiprime[ice] = -iii.7[2]/temp[ice]^2 + iii.7[3]/temp[ice] + iii.7[4] + desdt [ice] = esfun[ice] * iiprime[ice] + }#end if + #---------------------------------------------------------------------------------------# + + + return(desdt) +}#end function eslifp +#==========================================================================================# +#==========================================================================================# + + + + + +#==========================================================================================# +#==========================================================================================# +# This function calculates the saturation vapour mixing ratio as a function of # +# pressure and Kelvin temperature. # +#------------------------------------------------------------------------------------------# +rslif <<- function (pres,temp){ + + esl = eslif(temp) + rsfun = ep * esl / (pres - ep * esl) + zero = is.finite(rsfun) & rsfun < toodry + rsfun[rsfun < toodry] = toodry + + return(rsfun) +}# end function rslif +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function calculates the derivative of the saturation mixing ratio as a # +# function of Kelvin temperature. # +#------------------------------------------------------------------------------------------# +rslifp <<- function(pres,temp){ + + #----- Find the saturation vapour pressure and its derivative at temperature temp. -----# + esli = eslif (temp) + desdt = eslifp(temp) + #---------------------------------------------------------------------------------------# + + + #----- Find the partial pressure of dry air. -------------------------------------------# + pdry = pres - esli + #---------------------------------------------------------------------------------------# + + + #----- Find the partial derivative of mixing ratio. ------------------------------------# + drsdt = ep * pres * desdt / (pdry*pdry) + #---------------------------------------------------------------------------------------# + + return(drsdt) +}#end function rslifp +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function calculates the saturation vapour specific humidity as a function of # +# pressure and Kelvin temperature. # +#------------------------------------------------------------------------------------------# +qslif <<- function (pres,temp){ + + esl = eslif(temp) + qsfun = ep * esl / (pres - (1.-ep) * esl) + zero = is.finite(qsfun) & qsfun < toodry + qsfun[qsfun < toodry] = toodry + + return(qsfun) +}# end function rslif +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function calculates the saturation vapour specific humidity as a function of # +# pressure and Kelvin temperature. # +#------------------------------------------------------------------------------------------# +tslif <<- function (pres,hum,type.hum="shum"){ + + #----- Find the partial pressure of water vapour. --------------------------------------# + if (type.hum == "shum"){ + pvap = pres * hum / ( ep + (1. - ep) * hum) + }else if (type.hum == "rvap"){ + pvap = pres * hum / ( ep + hum ) + }else if (type.hum == "pvap"){ + pvap = hum + }else{ + stop(paste(" Humidity type (",type.hum,") is not valid!",sep="")) + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Function that finds the root for any element. # + #---------------------------------------------------------------------------------------# + find.tslif = function(pvap){ + dewpoint = function(temp,pvap) eslif(temp) - pvap + + if (is.na(pvap)){ + tdew = NA + }else{ + t1st = (1.814625 * log(pvap) +6190.134)/(29.120 - log(pvap)) + tdew = uniroot(f=dewpoint,interval=c(t1st-30,t1st+30),pvap=pvap)$root + }#end if + return(tdew) + }#end find.tslif + #---------------------------------------------------------------------------------------# + + tdew = sapply(X=pvap,FUN=find.tslif,simplify=TRUE) + + return(tdew) +}# end function rslif +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function calculates the relative humidity as a function of pressure, Kelvin # +# temperature, and specific humidity. # +#------------------------------------------------------------------------------------------# +rehuil <<- function (pres,temp,shv){ + + esat = eslif(temp) + eair = pres * shv / (ep + (1. - ep) * shv) + rhv = eair / esat + + return(rhv) +}#end function rslif +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function computes the vapour mixing ratio based on the pressure [Pa], tem- # +# perature [K] and relative humidity [fraction]. It will check the temperature to # +# decide between ice or liquid saturation and whether ice should be considered. # +#------------------------------------------------------------------------------------------# +ptrh2shv <<- function(relh,pres,temp){ + + #----- Find the saturation mixing ratio. -----------------------------------------------# + qsath = qslif(pres,temp) + qsath[qsath < toodry] = toodry + #---------------------------------------------------------------------------------------# + + + #----- Ensure that relative humidity is bounded. ---------------------------------------# + relh = pmax(0.,pmin(1.,relh)) + #---------------------------------------------------------------------------------------# + + + #----- Find the mixing ratio. ----------------------------------------------------------# + shvfun = pmax(toodry, ep * relh * qsath / (ep + (1.-relh)*(1.-ep)*qsath)) + #---------------------------------------------------------------------------------------# + + return(shvfun) +}# end function ptrh2shv +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function finds the potential temperature given the temperature in Kelvin and # +# pressure in Pascals. # +#------------------------------------------------------------------------------------------# +potenttemp <<- function(temp,pres,shv){ + + cpair = cpdry * (1. - shv) + shv * cph2o + rair = rdry * (1. + epim1 * shv) + + thfun = temp * (p00 / pres)^(rair/cpair) + return(thfun) +}#end function potenttemp +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function finds the reduced mean sea level pressure given potential temperature, # +# pressure, and specific humidity (as vectors), and altitude. # +#------------------------------------------------------------------------------------------# +ptq2mslp <<- function(pres,theta,shv,zalt){ + + #----- Find the mean specific heat and gas constant. -----------------------------------# + cpair = cpdry * (1. - shv) + shv * cph2o + rair = rdry * (1. + epim1 * shv) + rocpair = rair/cpair + cporair = 1./ rocpair + + #----- Find the auxiliary term that will control the slope of the pressure. ------------# + pinc = p00^rocpair * grav * zalt / (cpair * theta) + + #----- Estimate the sea level pressure. ------------------------------------------------# + mslp = ( pres ^ rocpair + pinc) ^ cporair + + return(mslp) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function finds the surface level pressure given potential temperature, mean sea # +# level pressure, and specific humidity (as vectors), and altitude. # +#------------------------------------------------------------------------------------------# +potq2pres <<- function(pres,theta,shv,alt){ + + #----- Find the mean specific heat and gas constant. -----------------------------------# + cpair = cpdry * (1. - shv) + shv * cph2o + rair = rdry * (1. + epim1 * shv) + rocpair = rair/cpair + cporair = 1./ rocpair + + #----- Find the auxiliary term that will control the slope of the pressure. ------------# + pinc = p00^rocpair * grav * zalt / (cpair * theta) + + #----- Estimate the sea level pressure. -----------------------------------------------# + pres = ( mslp ^ rocpair - pinc) ^ cporair + + return(pres) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + +#==========================================================================================# +#==========================================================================================# +# This function finds the latent heat of vaporisation for a given temperature. If we # +# use the definition of latent heat (difference in enthalpy between liquid and vapour # +# phases), and assume that the specific heats are constants, latent heat becomes a linear # +# function of temperature. # +#------------------------------------------------------------------------------------------# +alvl <<- function(temp){ + + #----- Linear function, using latent heat at the triple point as reference. ------------# + lvap = alvl3 + dcpvl * (temp - t3ple) + #---------------------------------------------------------------------------------------# + + return(lvap) +}#end function alvl +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function finds the latent heat of sublimation for a given temperature. If we # +# use the definition of latent heat (difference in enthalpy between ice and vapour # +# phases), and assume that the specific heats are constants, latent heat becomes a linear # +# function of temperature. # +#------------------------------------------------------------------------------------------# +alvi <<- function(temp){ + + #----- Linear function, using latent heat at the triple point as reference. ------------# + lsub = alvi3 + dcpvi * (temp - t3ple) + #---------------------------------------------------------------------------------------# + + return(lsub) +}# end function alvi +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function finds the latent heat towards vapour for a given temperature. If we # +# use the definition of latent heat (difference in enthalpy between ice and vapour # +# phases), and assume that the specific heats are constants, latent heat becomes a linear # +# function of temperature. # +#------------------------------------------------------------------------------------------# +alvli <<- function(temp){ + + #----- Find the sought phase. ----------------------------------------------------------# + liq = temp > t3ple + mix = temp == t3ple + ice = temp < t3ple + #---------------------------------------------------------------------------------------# + + + #----- Convert all flags that are NA to FALSE. -----------------------------------------# + liq[is.na(liq)] = FALSE + mix[is.na(mix)] = FALSE + ice[is.na(ice)] = FALSE + #---------------------------------------------------------------------------------------# + + + #----- Initialise output with NA. ------------------------------------------------------# + lvap = NA + temp + #---------------------------------------------------------------------------------------# + + + #----- Linear function, using latent heat at the triple point as reference. ------------# + lvap[liq] = alvl3 + dcpvl * (temp[liq] - t3ple) + lvap[mix] = 0.5 * (alvi3 + alvl3) + lvap[ice] = alvi3 + dcpvi * (temp[ice] - t3ple) + #---------------------------------------------------------------------------------------# + + return(lvap) +}# end function alvli +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function finds the density based on the virtual temperature and the ideal gas # +# law. The only difference between this function and the one above is that here we # +# provide vapour and total specific mass (specific humidity) instead of mixing ratio. # +#------------------------------------------------------------------------------------------# +idealdenssh <<- function(pres,temp,qvpr,qtot=NULL){ + + #---------------------------------------------------------------------------------------# + # Prefer using total specific humidity, but if it isn't provided, then use vapour # + # phase as the total (no condensation). # + #---------------------------------------------------------------------------------------# + if (is.null(qtot)) qtot = qvpr + #---------------------------------------------------------------------------------------# + + + #----- Convert using a generalised function. -------------------------------------------# + rhos = pres / (rdry * temp * (1. - qtot + epi * qvpr)) + #---------------------------------------------------------------------------------------# + + return(rhos) +}#end if +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This subroutine finds the lifting condensation level given the ice-liquid # +# potential temperature in Kelvin, temperature in Kelvin, the pressure in Pascal, and # +# the mixing ratio in kg/kg. The output will give the LCL temperature and pressure, and # +# the thickness of the layer between the initial point and the LCL. # +# # +# References: # +# Tripoli, J. T.; and Cotton, W.R., 1981: The use of ice-liquid water potential # +# temperature as a thermodynamic variable in deep atmospheric models. Mon. Wea. # +# Rev., v. 109, 1094-1102. (TC81) # +# Bolton, D., 1980: The computation of the equivalent potential temperature. Mon. # +# Wea. Rev., v. 108, 1046-1053. (BO80) # +# # +# Some algebra was needed to find this equation, essentially combining (TC81-26) and # +# (TC81-27), and the conservation of total water (TC81-16). It assumes that the divi- # +# sion between the three phases is already taken care of. # +# Iterative procedure is needed, and here we iterate looking for T(LCL). Theta_il # +# can be rewritten in terms of T(LCL) only, and once we know this thetae_iv becomes # +# straightforward. # +# # +# Important remarks: # +# 1. TLCL and PLCL are the actual TLCL and PLCL, so in case condensation exists, they # +# will be larger than the actual temperature and pressure (because one would go down # +# to reach the equilibrium); # +# 2. DZLCL WILL BE SET TO ZERO in case the LCL is beneath the starting level. So in # +# case you want to force TLCL <= TEMP and PLCL <= PRES, you can use this variable # +# to run the saturation check afterwards. DON'T CHANGE PLCL and TLCL here, they will # +# be used for conversions between theta_il and thetae_iv as they are defined here. # +#------------------------------------------------------------------------------------------# +lcl.il <<- function(thil,pres,temp,hum,hum.tot=hum,type.hum="shum"){ + + #---------------------------------------------------------------------------------------# + # Find vapour pressure and vapour pressure at 1000. hPa, depending on the humidity # + # given. # + #---------------------------------------------------------------------------------------# + if (type.hum == "pvap"){ + pvap = hum + es00 = p00 * hum.tot / pres + }else if (type.hum == "rvap"){ + pvap = pres * hum / (ep + hum ) + es00 = p00 * hum.tot / (ep + hum.tot) + }else if (type.hum == "shum"){ + pvap = pres * hum / (ep + (1. - ep) * hum ) + es00 = p00 * hum.tot / (ep + (1. - ep) * hum.tot) + }#end if + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Function that finds the root for any element. # + #---------------------------------------------------------------------------------------# + find.tlcl = function(es00,pvap,temp,thil){ + lcl.root = function(tlcl,es00,thil) tlcl * (es00/eslif(tlcl))^rocp - thil + + undef = is.na(es00) | is.na(pvap) | is.na(thil) + if (undef){ + ans = NA + }else{ + #---------------------------------------------------------------------------------# + # The 1st. guess, use equation 21 from Bolton (1980). # + #---------------------------------------------------------------------------------# + t1st = 55. + 2840. / (3.5 * log(temp) - log(0.01*pvap) - 4.805) + sol = uniroot(f=lcl.root,interval=c(t1st-30,t1st+30),es00=es00,thil=thil) + ans = sol$root + }#end if + return(ans) + }#end find.tslif + #---------------------------------------------------------------------------------------# + + tlcl = mapply(FUN=find.tlcl,es00=es00,pvap=pvap,temp=temp,thil=thil,SIMPLIFY=TRUE) + elcl = eslif(tlcl) + plcl = p00 * elcl / es00 + dzlcl = pmax(0*elcl,cpog * (temp - tlcl)) + + ans = list(temp = tlcl, pvap = elcl, pres = plcl, height = dzlcl) + + return(ans) +}#end function lcl.il +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function computes the saturation ice-vapour equivalent potential temperature # +# from theta_il and the total mixing ratio (split into saturated vapour plus liquid and # +# ice. This is equivalent to the equivalent potential temperature considering also the # +# effects of fusion/melting/sublimation, and it is done separatedly from the regular # +# thetae_iv because it doesn't require iterations. # +# # +# References: # +# Tripoli, J. T.; and Cotton, W.R., 1981: The use of ice-liquid water potential tem- # +# perature as a thermodynamic variable in deep atmospheric models. Mon. Wea. # +# Rev., v. 109, 1094-1102. (TC81) # +# # +# Some algebra was needed to find this equation, essentially combining (TC81-26) and # +# (TC81-27), and the conservation of total water (TC81-16). It assumes that the divi- # +# sion between the three phases is already taken care of. # +#------------------------------------------------------------------------------------------# +thetaeivs <<- function(thil,temp,rsat,rliq,rice){ + + + #------ Find the total saturation mixing ratio. ----------------------------------------# + rtots = rsat+rliq+rice + #---------------------------------------------------------------------------------------# + + + #------ Find the saturation equivalent potential temperature. --------------------------# + theivs = thil * exp ( alvl(temp) * rtots / (cpdry * temp)) + #---------------------------------------------------------------------------------------# + + return(theivs) +}#end function thetaeivs +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function computes the ice-vapour equivalent potential temperature from # +# theta_iland the total mixing ratio. This is equivalent to the equivalent potential # +# temperature considering also the effects of fusion/melting/sublimation. # +# In case you want to find thetae (i.e. without ice) simply set the the logical # +# useice to .false. . # +#------------------------------------------------------------------------------------------# +thetaeiv <<- function(thil,pres,temp,hum,hum.tot=hum,type.hum="shum"){ + + #---------------------------------------------------------------------------------------# + # Convert humidity to mixing ratio. # + #---------------------------------------------------------------------------------------# + if (type.hum == "rvap"){ + rtot = hum.tot + rvap = hum + }else if(type.hum == "pvap"){ + rtot = ep * hum.tot / (pres - hum.tot) + rvap = ep * hum / (pres - hum ) + }else if(type.hum == "shum"){ + rtot = hum.tot / (1. - hum.tot) + rvap = hum / (1. - hum.tot) + }#end if + #---------------------------------------------------------------------------------------# + + + #----- Use the LCL definition, then find the saturation value at the LCL. --------------# + tlcl = lcl.il(thil,pres,temp,hum,hum.tot=hum,type.hum)$temp + theiv = thetaeivs(thil,tlcl,rtot,0.,0.) + #---------------------------------------------------------------------------------------# + + return(theiv) +}#end function thetaeiv +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# Function that estimates the precipitable water, using the same equation as: # +# # +# Marthews, T. R., Y. Malhi, H. Iwata, 2012: Calculating downward longwave radiation under # +# clear and cloudy conditions over a tropical lowland forest site: an evaluation of # +# model schemes for hourly data. Theor. Appl. Climatol., 107, 461-477. # +#------------------------------------------------------------------------------------------# +prec.water <<- function(pvap,atm.tmp) 4.65 * pvap / atm.tmp +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# Function that estimates evapotranspiration, if the aerodynamic and stomatal # +# conductances are known. # +#------------------------------------------------------------------------------------------# +tpn2pet <<- function(atm.tmp,atm.prss,atm.shv,rnet,ga,gs){ + desdt = eslifp(atm.tmp) + latent = alvli (atm.tmp) + atm.pvap = atm.prss * atm.shv / ( ep + (1. - ep) * atm.shv) + atm.vpd = pmax(0,eslif(atm.tmp)-atm.pvap) + atm.rhos = idealdenssh(atm.prss,atm.tmp,atm.shv) + pet = ( day.sec * ( desdt * rnet + atm.rhos * cpdry * atm.vpd * ga ) + / ( desdt * latent + epi * cpdry * atm.prss * (1. + ga/gs)) ) + return(pet) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# Function that estimates the conductances for potential evapotranspiration. # +#------------------------------------------------------------------------------------------# +tpn2pet.fit <<- function(atm.tmp,atm.prss,atm.shv,rnet,wflxca){ + desdt = eslifp(atm.tmp) + latent = alvli (atm.tmp) + atm.pvap = atm.prss * atm.shv / ( ep + (1. - ep) * atm.shv) + atm.vpd = pmax(0,eslif(atm.tmp)-atm.pvap) + atm.rhos = idealdenssh(atm.prss,atm.tmp,atm.shv) + + lsq = function(x,atm.tmp,atm.prss,atm.shv,rnet,wflxca){ + ga = exp(x[1]) + gs = exp(x[2]) + test = tpn2pet(atm.tmp,atm.prss,atm.shv,rnet,ga,gs) + sumsq = sum((wflxca-test)^2,na.rm=TRUE) + return(sumsq) + }#end lsq + + x1 = log(c(0.033,0.003)) + fit = optim( par = x1 + , fn = lsq + , atm.tmp = atm.tmp + , atm.prss = atm.prss + , atm.shv = atm.shv + , rnet = rnet + , wflxca = wflxca + )#end optim + if (fit$convergence == 0){ + ga = exp(fit$par[1]) + gs = exp(fit$par[2]) + }else{ + ga = NA + gs = NA + }#end if + ans = list(ga=ga,gs=gs) + return(ans) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This subroutine computes the temperature and fraction of liquid water from the # +# intensive internal energy [J/kg]. # +#------------------------------------------------------------------------------------------# +uint2tl <<- function(uint){ + + + #----- Initialise the output with NA. --------------------------------------------------# + temp = rep(NA,times=length(uint)) + fliq = rep(NA,times=length(uint)) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Compare the internal energy with the reference values to decide which phase the # + # water is. # + #---------------------------------------------------------------------------------------# + fine = is.finite(uint) + ice = fine & uint <= uiicet3 + liq = fine & uint >= uiliqt3 + melt = fine & uint > uiicet3 & uint < uiliqt3 + #---------------------------------------------------------------------------------------# + + + + #----- Internal energy below qwfroz, all ice ------------------------------------------# + fliq[ice] = 0. + temp[ice] = uint[ice] * cicei + #---------------------------------------------------------------------------------------# + + + #----- Internal energy, above qwmelt, all liquid ---------------------------------------# + fliq[liq] = 1. + temp[liq] = uint[liq] * cliqi + tsupercool.liq + #---------------------------------------------------------------------------------------# + + + #----- Changing phase, it must be at freezing point ------------------------------------# + fliq[melt] = (uint[melt] - uiicet3) * allii + temp[melt] = t3ple + #---------------------------------------------------------------------------------------# + + + ans = list(temp=temp,fliq=fliq) + return(ans) +}#end function uint2tl +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This subroutine computes the temperature (Kelvin) and liquid fraction from # +# extensive internal energy (J/m2 or J/m3), water mass (kg/m2 or kg/m3), and heat # +# capacity (J/m2/K or J/m3/K). # +#------------------------------------------------------------------------------------------# +uextcm2tl <<- function(uext,wmass,dryhcap){ + + + + #----- Convert melting heat to J/m2 or J/m3 --------------------------------------------# + uefroz = (dryhcap + wmass * cice) * t3ple + uemelt = uefroz + wmass * alli + #---------------------------------------------------------------------------------------# + + + #----- Initialise the output with NA. --------------------------------------------------# + temp = rep(NA,times=length(uext)) + fliq = rep(NA,times=length(uext)) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # This is analogous to the uint2tl computation, we should analyse the magnitude of # + # the internal energy to choose between liquid, ice, or both by comparing with the # + # known boundaries. # + #---------------------------------------------------------------------------------------# + fine = is.finite(uext) & is.finite(wmass) & is.finite(dryhcap) + ice = fine & uext < uefroz + liq = fine & uext > uemelt + rien = fine & uefroz == uemelt + melt = fine & uext >= uefroz & uext <= uemelt + #---------------------------------------------------------------------------------------# + + + + #----- Internal energy below qwfroz, all ice ------------------------------------------# + fliq[ice] = 0. + temp[ice] = uext[ice] / (cice * wmass[ice] + dryhcap[ice]) + #---------------------------------------------------------------------------------------# + + + #----- Internal energy, above qwmelt, all liquid ---------------------------------------# + fliq[liq] = 1. + temp[liq] = ( ( uext [liq] + wmass[liq] * cliq * tsupercool.liq ) + / ( dryhcap[liq] + wmass[liq] * cliq ) ) + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # We are at the freezing point. If water mass is so tiny that the internal energy # + # of frozen and melted states are the same given the machine precision, then we assume # + # that water content is negligible and we impose 50% frozen for simplicity. # + #---------------------------------------------------------------------------------------# + fliq[rien] = 0.5 + temp[rien] = t3ple + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Changing phase, it must be at freezing point. The max and min are here just to # + # avoid tiny deviations beyond 0. and 1. due to floating point arithmetics. # + #---------------------------------------------------------------------------------------# + fliq[melt] = (uext[melt] - uefroz[melt]) * allii / wmass[melt] + temp[melt] = t3ple + #---------------------------------------------------------------------------------------# + + + #----- Make sure that liquid fraction is bounded. --------------------------------------# + fliq = pmax(0,pmin(1,fliq)) + #---------------------------------------------------------------------------------------# + + ans = list(temp=temp,fliq=fliq) + return(ans) +}#end function uextcm2tl +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/timeutils.r b/R-utils/timeutils.r new file mode 100644 index 000000000..43e0376f7 --- /dev/null +++ b/R-utils/timeutils.r @@ -0,0 +1,460 @@ +#==========================================================================================# +#==========================================================================================# +# Function that determines whether the year is leap or not. # +#------------------------------------------------------------------------------------------# +is.leap = function(when){ + + wit = is(when) + + if ("dates" %in% wit || "chron" %in% wit){ + year = numyears(when) + }else{ + year = when + }#end if + leaptf = year %% 400 == 0 | (year %% 4 == 0 & year %% 100 != 0) + return(leaptf) +} #end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# Function that determines the number of days in a given month. # +#------------------------------------------------------------------------------------------# +daymax = function(month,year){ + mmm = c(31,28,31,30,31,30,31,31,30,31,30,31) + + if (missing(year)){ + wit = is(month) + if ("dates" %in% wit || "chron" %in% wit){ + when = month + year = numyears (when) + month = nummonths(when) + }else{ + stop(" No year given and month is not time") + }#end if + }#end if + + mday = mmm[month] + addone = month == 2 & is.leap(year) + mday[addone] = mday[addone] + 1 + + return(mday) +} #end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# Function that determines the number of the month given the character name. # +#------------------------------------------------------------------------------------------# +mmm2mon = function(mmm,lang="English"){ + lang = tolower(lang) + if (lang == "english"){ + m3l = c("jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec") + }else if(lang == "portuguese"){ + m3l = c("jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez") + }#end if + + mmmloc = tolower(substring(as.character(mmm),1,3)) + monout = match(mmmloc,m3l) + return(monout) +} #end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# Function that determines 3-letter name of the month given their number. # +#------------------------------------------------------------------------------------------# +mon2mmm = function(mon,lang="English",cap1=FALSE){ + lang = tolower(lang) + if (cap1){ + if (lang == "english"){ + m3l = c("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec") + }else if(lang == "portuguese"){ + m3l = c("Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez") + }#end if + }else{ + if (lang == "english"){ + m3l = c("jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec") + }else if(lang == "portuguese"){ + m3l = c("jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez") + }#end if + }#end if + monout = m3l[mon] + return(monout) +} #end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# Function that converts a chron object to numeric years. # +#------------------------------------------------------------------------------------------# +numyears = function(when){ + yrs = years(when) + lyrs = levels(yrs) + yrout = as.numeric(lyrs[match(yrs,lyrs)]) + return(yrout) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# Function that converts a chron object to numeric months. # +#------------------------------------------------------------------------------------------# +nummonths = function(when){ + mos = months(when) + lmos = levels(mos) + moout = match(mos,lmos) + return(moout) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# Function that converts a chron object to numeric days. # +#------------------------------------------------------------------------------------------# +numdays = function(when){ + dys = days(when) + ldys = levels(dys) + dyout = match(dys,ldys) + return(dyout) +} #end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# Function that returns the dates as characters. # +#------------------------------------------------------------------------------------------# +chardates = function(when){ + mymonth = substring(100 + nummonths(when),2,3) + myday = substring(100 + numdays (when),2,3) + myyear = substring(10000 + numyears (when),2,5) + mydate = paste(mymonth,myday,myyear,sep="/") + return(mydate) +} #end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# Function that returns the dates as characters. # +#------------------------------------------------------------------------------------------# +label.dates = function(when,add.hours=TRUE){ + mymonth = substring(100 + nummonths(when),2,3) + myday = substring(100 + numdays (when),2,3) + myyear = substring(10000 + numyears (when),2,5) + mydate = paste(myyear,mymonth,myday,sep="-") + + if (add.hours){ + mytime = paste(substring(100 + hours (when),2,3) + ,substring(100 + minutes(when),2,3) + ,substring(100 + seconds(when),2,3) + ,sep="") + mylabel = paste(mydate,mytime,sep="-") + }else{ + mylabel = mydate + }#end if + + return(mylabel) +} #end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# Function that returns the times as characters. # +#------------------------------------------------------------------------------------------# +chartimes = function(when){ + myhour = substring(100 + hours (when),2,3) + myminu = substring(100 + minutes(when),2,3) + myseco = substring(100 + seconds(when),2,3) + mytime = paste(myhour,myminu,myseco,sep=":") + return(mytime) +} #end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# Function that finds the fraction of the day. # +#------------------------------------------------------------------------------------------# +hms2frac = function(when){ + thishour = hours (when) + thismin = minutes (when) + thissec = seconds (when) + + elapsed = thishour / day.hr + thismin / day.min + thissec / day.sec + return(elapsed) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# Function that finds the numeric version of the days. # +#------------------------------------------------------------------------------------------# +dayofyear = function(when){ + offdays = c(0, 31,59,90,120,151,181,212,243,273,304,334,365) + + thisday = numdays (when) + thismonth = nummonths(when) + thisyear = numyears (when) + thisfrac = hms2frac (when) + + addone = as.integer(thismonth > 2 & is.leap(when)) + + doy = thisday + offdays[thismonth] + addone + thisfrac + return(doy) +} #end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# This function appends several time-related variables for a given data frame. # +#------------------------------------------------------------------------------------------# +alltimes = function(datin,lon,lat,ed21=TRUE,zeronight=FALSE,meanval=FALSE,imetavg=1 + ,nmean=120,...){ + #------ Copy the input data frame, and call the other functions. -----------------------# + datout = datin + datout$year = numyears (datout$when) + datout$month = nummonths(datout$when) + datout$day = numdays (datout$when) + datout$hour = hours (datout$when) + datout$minu = minutes (datout$when) + datout$today = dates (datout$when) + datout$tomonth = chron(paste(datout$month,1,datout$year,sep="/")) + datout$doy = dayofyear(datout$when) + zenith = ed.zen (when=datout$when,lon=lon,lat=lat,ed21=ed21 + ,zeronight=zeronight,meanval=meanval,imetavg=imetavg + ,nmean=nmean,...) + datout$cosz = zenith$cosz + datout$sunhgt = zenith$hgt + datout$nighttime = zenith$night + datout$daytime = zenith$day + datout$twilight = (! zenith$night) & (! zenith$day) + datout$highsun = zenith$cosz >= cosz.highsun + datout$riseset = zenith$cosz >= cosz.twilight & zenith$cosz < cosz.highsun + datout$notdaytime = ! zenith$day + + datout$season = sign(-lat) * cos( 2.0 * pi * (dayofyear(datout$when) - 1) + / (365 + is.leap(datout$year)) ) + + return(datout) +}#end function +#==========================================================================================# +#==========================================================================================# + + + + + + +#==========================================================================================# +#==========================================================================================# +# List of trimestral seasons. # +#------------------------------------------------------------------------------------------# +season <<- function(when,add.year=FALSE,dec.next=TRUE){ + + + #----- Get the year and month. ---------------------------------------------------------# + year = numyears (when) + mon = nummonths(when) + #---------------------------------------------------------------------------------------# + + + + #----- We don't give summer/winter, instead we make generic season names. --------------# + sidx = season.index + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Assign the season names depending on the month and year. # + #---------------------------------------------------------------------------------------# + if (add.year){ + #----- Add year before the season. --------------------------------------------------# + seasout = paste(year,sprintf("%2.2i",sidx[mon]),sep="") + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # December, January, and February have two years, decide whether to bind # + # December with next year, of January and February with previous year. # + #------------------------------------------------------------------------------------# + if (dec.next){ + mp1 = mon == 12 + seasout[mp1] = paste( sprintf("%4.4i",year[mp1]+1) + , sprintf("%2.2i",sidx[mon[mp1]]) + , sep = "") + }else{ + mm1 = mon %in% c(1,2) + seasout[mp1] = paste( sprintf("%4.4i",year[mm1]-1) + , sprintf("%2.2i",sidx[mon[mm1]]) + , sep = "") + }#end if + #------------------------------------------------------------------------------------# + }else{ + #----- No year to be tagged. --------------------------------------------------------# + seasout = sidx[mon] + #------------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------------# + + + + #----- Return variable. ----------------------------------------------------------------# + return(seasout) + #---------------------------------------------------------------------------------------# +}#end for +#==========================================================================================# +#==========================================================================================# + + + + + + + +#==========================================================================================# +#==========================================================================================# +# List of periods of the day. This is going to split the hours into blocks, with # +# 00 UTC being always at the last block. # +#------------------------------------------------------------------------------------------# +period.day <<- function(when,dtblock=3){ + + + #----- Get the year and month. ---------------------------------------------------------# + this.hour = hours (when) + this.minu = minutes(when) + #----- Eliminate minutes, and always make it go to the next hour. ----------------------# + this.hour = (this.hour + ceiling(this.minu/60)) %% 24 + #---------------------------------------------------------------------------------------# + + + + #----- Split the day into blocks. ------------------------------------------------------# + shift.hour = ( this.hour - 1 ) %% 24 + break.hour = seq(from=-0.5,to=23.5,by=dtblock) + cut.hour = cut(x=shift.hour,breaks=break.hour) + idx.period = match(cut.hour,levels(cut.hour)) + #---------------------------------------------------------------------------------------# + + + + #----- Return variable. ----------------------------------------------------------------# + return(idx.period) + #---------------------------------------------------------------------------------------# +}#end for +#==========================================================================================# +#==========================================================================================# + + + + + +#==========================================================================================# +#==========================================================================================# +# List with the names of months and seasons. # +#------------------------------------------------------------------------------------------# +mlist <<- c("January","February","March","April","May","June","July","August" + ,"September","October","November","December") +mlist3 <<- substring(mlist,1,3) + +if (! "mseason.1st" %in% ls()) mseason.1st = 12 + + +if (mseason.1st %in% c(1,4,7,10)){ + season.list <<- c("JFM","AMJ","JAS","OND","ALL") + season.full <<- c("January-March","April-June","July-September","October-December" + ,"All months") + season.index <<- c(1,1,1,2,2,2,3,3,3,4,4,4) + mon.add1 <<- 13 +}else if (mseason.1st %in% c(2,5,8,11)){ + season.list <<- c("NDJ","FMA","MJJ","ASO","ALL") + season.full <<- c("November-January","February-April","May-July","August-October" + ,"All months") + season.index <<- c(1,2,2,2,3,3,3,4,4,4,1,1) + mon.add1 <<- 11 +}else if (mseason.1st %in% c(3,6,9,12)){ + season.list <<- c("DJF","MAM","JJA","SON","ALL") + season.full <<- c("December-February","March-May","June-August","September-November" + ,"All months") + mon.add1 <<- 12 + season.index <<- c(1,1,2,2,2,3,3,3,4,4,4,1) +}else{ + stop (paste("Invalid mseason.1st (",mseason.1st,")",sep="")) +}#end if + +nseasons <<- length(season.list) +season.cols <<- c("royalblue4","chartreuse4","yellow3","orangered","grey22") +season.label <<- paste(sprintf("%2.2i",sequence(nseasons)),season.list,sep="-") +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/two.palettes.r b/R-utils/two.palettes.r new file mode 100644 index 000000000..c906d10a2 --- /dev/null +++ b/R-utils/two.palettes.r @@ -0,0 +1,166 @@ +#==========================================================================================# +#==========================================================================================# +# Below are several colour palettes based on a single colour, useful for when one # +# wants to plot net change. You must say which colours to use for negative and positive. # +#------------------------------------------------------------------------------------------# +two.palettes <<- function(x,n=20,white=1,low="blue",high="orangered"){ + + #----- Make sure the name has an appropriate hue. --------------------------------------# + bye = stopifnot(low %in% c("orangered","green","brown","grey","blue","purple")) + bye = stopifnot(high %in% c("orangered","green","brown","grey","blue","purple")) + #---------------------------------------------------------------------------------------# + + + + #----- If x is a list, we use lapply to return the information for each element. -------# + if (is.list(x) && ! is.data.frame(x)){ + ans = lapply(X=x,FUN=two.palettes,n=n,white=white,low=low,high=high) + }else{ + + #----- Break the values into bins, making 0 central. --------------------------------# + if (sum(is.finite(x)) == 0){ + x.brks = c(0,0.5,1) + }else{ + x.span = c(0,max(abs(x),na.rm=TRUE)) + if (all(x.span == 0)){ + x.brks = c(0,0.5,1) + }else{ + x.brks = pretty(x.span,n=max(3,round(n/2))) + }#end if + }#end if + x.brks = unique(c(-rev(x.brks),0,x.brks)) + n.brks = length(x.brks) + x.cut = cut(x,breaks = x.brks) + x.lev = levels(x.cut) + + #----- Find the indices that correspond to the colours. -----------------------------# + x.idx = match(x.cut,x.lev) + if (is.data.frame(x)){ + x.idx = data.frame(x.idx,row.names=row.names(x)) + names(x.idx) = names(x) + }else if (is.array(x)){ + x.idx = array(data=x.idx,dim=dim(x),dimnames=dimnames(x)) + }else{ + if (length(x) == length(x.idx)) names(x.idx) = names(x) + }#end if + #------------------------------------------------------------------------------------# + + + + #------ Find the size of each side. -------------------------------------------------# + n.col = n.brks-1 + n.each = floor(n.col/2) - white + n.white = n.col - 2*n.each + #------------------------------------------------------------------------------------# + + + #----- Get the correct colour palette. ----------------------------------------------# + hue.low = get(paste("hue",low ,sep=".")) + hue.high = get(paste("hue",high,sep=".")) + #------------------------------------------------------------------------------------# + + + #----- Find the colours. ------------------------------------------------------------# + col.low = rev(hue.low(n=n.each)) + col.high = hue.high(n=n.each) + col.out = c(col.low,rep(background,n.white),col.high) + #------------------------------------------------------------------------------------# + + + + #----- Build a list with the output. ------------------------------------------------# + ans = list( idx = x.idx + , breaks = x.brks + , n.breaks = n.brks + , levels = x.lev + , colours = col.out + , n.colours = n.col + )#end list + #------------------------------------------------------------------------------------# + }#end if + + return(ans) +}#end function two.palettes +#==========================================================================================# +#==========================================================================================# + + + + + +#==========================================================================================# +#==========================================================================================# +# Below is the list of colour palettes by the hue. # +#------------------------------------------------------------------------------------------# +#----- Blue. ------------------------------------------------------------------------------# +hue.blue <<- function(n){ + nodes = c("skyblue","deepskyblue","dodgerblue","royalblue3","midnightblue") + nodes = data.frame(t(col2rgb(nodes))) + pivot = round(seq(from=1,to=n,length.out=nrow(nodes)),digits=0) + rgb.out = data.frame(t(mapply(FUN=spline,y=nodes,MoreArgs=list(x=pivot,n=n))))$y + rgb.out = lapply(X=rgb.out,FUN=as.integer) + rgb.out = lapply(X=rgb.out,FUN=pmax, 0) + rgb.out = lapply(X=rgb.out,FUN=pmin,255) + rgb.out = rgb(r=rgb.out$red,g=rgb.out$green,b=rgb.out$blue,maxColorValue=255) + return(rgb.out) +}#end hue.blue +#----- Orange-Red. ------------------------------------------------------------------------# +hue.orangered <<- function(n){ + nodes = c("gold","goldenrod","darkorange1","orangered","#7E0000") + nodes = data.frame(t(col2rgb(nodes))) + pivot = round(seq(from=1,to=n,length.out=nrow(nodes)),digits=0) + rgb.out = data.frame(t(mapply(FUN=spline,y=nodes,MoreArgs=list(x=pivot,n=n))))$y + rgb.out = lapply(X=rgb.out,FUN=as.integer) + rgb.out = lapply(X=rgb.out,FUN=pmax, 0) + rgb.out = lapply(X=rgb.out,FUN=pmin,255) + rgb.out = rgb(r=rgb.out$red,g=rgb.out$green,b=rgb.out$blue,maxColorValue=255) + return(rgb.out) +}#end hue.orangered +#----- Green. -----------------------------------------------------------------------------# +hue.green <<- function(n){ + nodes = c("darkolivegreen1","olivedrab3","chartreuse2","forestgreen","#004000") + nodes = data.frame(t(col2rgb(nodes))) + pivot = round(seq(from=1,to=n,length.out=nrow(nodes)),digits=0) + rgb.out = data.frame(t(mapply(FUN=spline,y=nodes,MoreArgs=list(x=pivot,n=n))))$y + rgb.out = lapply(X=rgb.out,FUN=as.integer) + rgb.out = lapply(X=rgb.out,FUN=pmax, 0) + rgb.out = lapply(X=rgb.out,FUN=pmin,255) + rgb.out = rgb(r=rgb.out$red,g=rgb.out$green,b=rgb.out$blue,maxColorValue=255) + return(rgb.out) +}#end hue.orangered +#----- Brown. -----------------------------------------------------------------------------# +hue.brown <<- function(n){ + nodes = c("lightgoldenrod2","sandybrown","sienna3","saddlebrown","#603000") + nodes = data.frame(t(col2rgb(nodes))) + pivot = round(seq(from=1,to=n,length.out=nrow(nodes)),digits=0) + rgb.out = data.frame(t(mapply(FUN=spline,y=nodes,MoreArgs=list(x=pivot,n=n))))$y + rgb.out = lapply(X=rgb.out,FUN=as.integer) + rgb.out = lapply(X=rgb.out,FUN=pmax, 0) + rgb.out = lapply(X=rgb.out,FUN=pmin,255) + rgb.out = rgb(r=rgb.out$red,g=rgb.out$green,b=rgb.out$blue,maxColorValue=255) + return(rgb.out) +}#end hue.orangered +#----- Grey. ------------------------------------------------------------------------------# +hue.grey <<- function(n){ + nodes = c("grey84","grey68","grey52","grey36","grey20") + nodes = data.frame(t(col2rgb(nodes))) + pivot = round(seq(from=1,to=n,length.out=nrow(nodes)),digits=0) + rgb.out = data.frame(t(mapply(FUN=spline,y=nodes,MoreArgs=list(x=pivot,n=n))))$y + rgb.out = lapply(X=rgb.out,FUN=as.integer) + rgb.out = lapply(X=rgb.out,FUN=pmax, 0) + rgb.out = lapply(X=rgb.out,FUN=pmin,255) + rgb.out = rgb(r=rgb.out$red,g=rgb.out$green,b=rgb.out$blue,maxColorValue=255) + return(rgb.out) +}#end hue.orangered +#----- Purple. ----------------------------------------------------------------------------# +hue.purple <<- function(n){ + nodes = c("#C0ACCF","lightslateblue","slateblue","purple2","#3F1368") + nodes = data.frame(t(col2rgb(nodes))) + pivot = round(seq(from=1,to=n,length.out=nrow(nodes)),digits=0) + rgb.out = data.frame(t(mapply(FUN=spline,y=nodes,MoreArgs=list(x=pivot,n=n))))$y + rgb.out = lapply(X=rgb.out,FUN=as.integer) + rgb.out = lapply(X=rgb.out,FUN=pmax, 0) + rgb.out = lapply(X=rgb.out,FUN=pmin,255) + rgb.out = rgb(r=rgb.out$red,g=rgb.out$green,b=rgb.out$blue,maxColorValue=255) + return(rgb.out) +}#end hue.orangered diff --git a/R-utils/ustar.filter.r b/R-utils/ustar.filter.r new file mode 100644 index 000000000..93f531b2d --- /dev/null +++ b/R-utils/ustar.filter.r @@ -0,0 +1,494 @@ +#==========================================================================================# +#==========================================================================================# +# This function uses an iterative technique to determine the u* filter for a given # +# CO2 flux dataset. The method is based on: # +# # +# Gu, L.; E. M. Falge, T. Boden, D. D. Baldocchi, T. A. Black, S. R. Saleska, T. Suni, # +# S. B. Verma, T. Vesala, S. C. Wofsy, L. Xu, 2005: Objective threshold determina- # +# tion for nighttime eddy flux filtering. Ag. Forest Meteorol., 128, 179-197. # +#------------------------------------------------------------------------------------------# +ustar.filter = function(dat # The dataset, it must be a data.frame + ,frac.mw = 0.05 # Relative window size for t-test + ,min.nmw = 20 # Minimum window size + ,max.nmw = Inf # Minimum window size + ,pval.ustar = 0.05 # p-value to reject null hypothesis + ,quant.unst = 0.20 # Minimum fraction of valid nighttime nee + ,retain.min = 1/3 # Minimum amount of data to retain (warning) + ,toler = 0.01 # Tolerance for convergence test + ,up.limit = TRUE # Filter the upper limit + ,verbose = FALSE # Print additional information + ,test.stor = TRUE # Should we include storage in the test? + ){ + + + #---------------------------------------------------------------------------------------# + # Number of points. # + #---------------------------------------------------------------------------------------# + ndat = length(dat$when) + ndatm1 = ndat - 1 + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Save the flux into a temporary array. # + #---------------------------------------------------------------------------------------# + if (verbose) print(" + Copying the flux...") + if (test.stor){ + dat.flux = dat$fco2 + dat$storco2 + }else{ + dat.flux = dat$fco2 + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Make the night time filter, which remains constant throughout the process. # + #---------------------------------------------------------------------------------------# + if (verbose) print(" + Flagging night time data...") + nighttime = dat$cosz < cosz.twilight + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Tonight is the night associated with 12:01 am of a particular night. So the # + # evening of Jan 26 will considered the same night as the dawn of Jan 27. # + #---------------------------------------------------------------------------------------# + if (verbose) print(" + Counting number of nights...") + dat.tonight = cumsum(nighttime & nighttime != c(FALSE,nighttime[1:ndatm1])) + dat.tonight[!nighttime] = NA + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Make the night time filter, which remains constant throughout the process. # + #---------------------------------------------------------------------------------------# + if (verbose) print(" + Flagging valid data...") + use = is.finite(dat$ustar) & is.finite(dat.flux) & is.finite(dat$atm.tmp) + #---------------------------------------------------------------------------------------# + + + #----- Initialise the low and high u* filter (outer loop). -----------------------------# + ustlo.out = 0. + usthi.out = Inf + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # This is the outer iteration loop. # + #---------------------------------------------------------------------------------------# + if (verbose) print(" + Outer loop...") + out.iter = TRUE + oo = 0 + while (out.iter){ + + #------------------------------------------------------------------------------------# + # Counter. # + #------------------------------------------------------------------------------------# + oo = oo + 1 + if (verbose) print(paste(" - Iteration: ",oo,":",sep="")) + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Selections. The "sel" flag keeps only the night time data that has finite # + # values, whereas the "sel.fit" flag includes only those "sel" values whose ustar # + # is between the outer loop ustar limits. # + #------------------------------------------------------------------------------------# + if (verbose) print(paste(" * Selecting data...",sep="")) + sel = use & nighttime + sel.fit = sel & dat$ustar >= ustlo.out & dat$ustar <= usthi.out + nsel = sum(sel) + nsel.fit = sum(sel.fit) + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Retain the data that we will consider in this part. # + #------------------------------------------------------------------------------------# + reco = dat.flux [sel ] + temp = dat$atm.tmp[sel ] + ustar = dat$ustar [sel ] + night = dat.tonight[sel ] + reco.fit = dat.flux [sel.fit] + temp.fit = dat$atm.tmp[sel.fit] + #------------------------------------------------------------------------------------# + + + + #----- Find a linear fit between temperature and respiration. -----------------------# + if (verbose) print(paste(" * Fitting a temperature line...",sep="")) + fit = lm(reco.fit ~ temp.fit) + summ.fit = summary(fit) + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Now we check whether there is an obvious relationship between the two. # + # Normally there will be a relationship in temperate and subpolar sites, but not in # + # equatorial sites. # + #------------------------------------------------------------------------------------# + a0 = summ.fit$coefficients[1,1] + a1 = summ.fit$coefficients[2,1] + r2 = summ.fit$adj.r.squared + pval.inter = summ.fit$coefficients[1,4] + pval.slope = summ.fit$coefficients[2,4] + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Determine whether a linear fit is a good fit. To be considered one, the slope # + # has to be statistically significant, and the fit should explain something... # + #------------------------------------------------------------------------------------# + lindep = r2 >= r2.min && pval.slope <= pval.max + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Find the expected values (either the mean or the linear fit), then normalise # + # the respiration flux by dividing the ecosystem respiration by the expected values. # + # At this point we use the full night time data set. # + #------------------------------------------------------------------------------------# + if (lindep){ + if (verbose) print(paste(" * Linear fit significant! Normalising data..." + ,sep="")) + reco.exp = a0 + a1 * temp + reco.sde = summ.fit$sigma + }else{ + if (verbose) print(paste(" * Linear fit non-significant! Normalising data..." + ,sep="")) + reco.exp = mean(reco.fit) + 0. * temp + reco.sde = sd(reco.fit) + 0. * temp + }#end if + recon = (reco - reco.exp) / (reco.sde) + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Conduct an outlier detection test. Now that the data are normalised, this # + # means that we only retain values between -3. and 3. # + #------------------------------------------------------------------------------------# + if (verbose) print(paste(" * Discarding outliers...",sep="")) + ok = abs(recon) <= 3. + reco = reco [ok] + recon = recon [ok] + temp = temp [ok] + ustar = ustar [ok] + night = night [ok] + #------------------------------------------------------------------------------------# + + + #----- Initialise the low and high u* filter (inner loop). --------------------------# + ustlo.in = 0. + usthi.in = Inf + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # This is the inner iteration loop. # + #------------------------------------------------------------------------------------# + in.iter = TRUE + ii = 0 + while (in.iter){ + + #---------------------------------------------------------------------------------# + # Counter. # + #---------------------------------------------------------------------------------# + ii = ii + 1 + if (verbose) print(paste(" * Inner loop, iteration ",ii,":",sep="")) + #---------------------------------------------------------------------------------# + + + + #----- Find the median ustar for each night. -------------------------------------# + if (verbose) print(paste(" > Discarding too stable nights...",sep="")) + ust.qunst = tapply(X=ustar,INDEX=night,FUN=quantile,prob=(1.0-quant.unst) + ,na.rm=TRUE) + night.qunst = as.integer(names(ust.qunst)) + #---------------------------------------------------------------------------------# + + + + #----- Find the nights whose median u* is above ustlo.in -------------------------# + turb = night %in% night.qunst[ust.qunst >= ustlo.in] + sel.in = ustar >= ustlo.in & ustar <= usthi.in + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Keep data from turbulent nights only. # + #---------------------------------------------------------------------------------# + turb.reco = reco [turb & sel.in] + turb.recon = recon [turb & sel.in] + turb.temp = temp [turb & sel.in] + turb.ustar = ustar [turb & sel.in] + turb.night = night [turb & sel.in] + #---------------------------------------------------------------------------------# + + + + #----- Find the sample size and the size of the moving window. -------------------# + nturb = length(turb.reco) + nmw = min(max.nmw,max(min.nmw,floor(frac.mw * nturb))) + if (verbose) print(paste(" > Sample size = ",nturb + ," Window size = ",nmw,"...",sep="")) + #---------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------# + # Rank dataset from lowest to highest u*, and from highest to lowest u*. # + #---------------------------------------------------------------------------------# + if (verbose) print(paste(" > Ranking data by u*...",sep="")) + lohi = order(turb.ustar,na.last=TRUE,decreasing=FALSE) + hilo = order(turb.ustar,na.last=TRUE,decreasing=TRUE ) + reco.lohi = turb.reco [lohi] + recon.lohi = turb.recon[lohi] + temp.lohi = turb.temp [lohi] + ustar.lohi = turb.ustar[lohi] + night.lohi = turb.night[lohi] + reco.hilo = turb.reco [hilo] + recon.hilo = turb.recon[hilo] + temp.hilo = turb.temp [hilo] + ustar.hilo = turb.ustar[hilo] + night.hilo = turb.night[hilo] + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # Initialise the indices for the moving window. # + #---------------------------------------------------------------------------------# + nloa = 1 + nloz = nmw + nhia = 1 + nhiz = nmw + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # Here we will check whether the following null hypothesis can be rejected. # + # # + # H0: The mean flux of the sub-sample of ranked fluxes, beginning at nloa and # + # ending at nloz is greater than or equal to the mean flux of the entire # + # series. # + # # + # If the hypothesis is rejected, we shift nloa and nloz until we find a case in # + # which we can't reject. # + #---------------------------------------------------------------------------------# + if (verbose) print(paste(" > Finding the filter for low end...",sep="")) + reject = TRUE + while (reject){ + mytest = t.test(x=recon.lohi[nloa:nloz],y=recon.lohi + ,alternative="less") + reject = mytest$p.value <= pval.ustar + if (reject){ + nloa = nloa + 1 + nloz = nloz + 1 + }#end if + }#end while + if (nloa != 1){ + new.ustlo.in = ustar.lohi[nloa] + }else{ + new.ustlo.in = ustlo.in + }#end if + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # Here we will check whether the following null hypothesis can be rejected. # + # (only if up.limit is true) # + # # + # H0: The mean flux of the sub-sample of ranked fluxes, beginning at nhia and # + # ending at nhiz is less than or equal to the mean flux of the entire # + # series. # + # # + # If the hypothesis is rejected, we shift nhia and nhiz until we find a case in # + # which we can't reject. # + #---------------------------------------------------------------------------------# + if (up.limit){ + if (verbose) print(paste(" > Finding the filter for high end..." + ,sep="")) + reject = TRUE + while (reject){ + mytest = t.test(x=recon.hilo[nhia:nhiz],y=recon.hilo + ,alternative="greater") + reject = mytest$p.value <= pval.ustar + if (reject){ + nhia = nhia + 1 + nhiz = nhiz + 1 + }#end if + }#end while + if (nhia != 1){ + new.usthi.in = ustar.hilo[nhia] + }else{ + new.usthi.in = usthi.in + }#end if + }else{ + new.usthi.in = usthi.in + }#end if + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # Check whether the inner loop converged or not. # + #---------------------------------------------------------------------------------# + if (verbose) print(paste(" > Checking convergence...",sep="")) + #----- Low end. ------------------------------------------------------------------# + if (new.ustlo.in == 0. && ustlo.in == 0.){ + error.lo = 0. + }else{ + error.lo = 2.0 * ( abs(new.ustlo.in - ustlo.in) + / (abs(new.ustlo.in) + abs(ustlo.in)) ) + }#end if + #----- High end. -----------------------------------------------------------------# + if (! up.limit){ + error.hi = 0. + }else if (new.usthi.in == Inf && usthi.in == Inf){ + error.hi = 0. + }else if(usthi.in == Inf){ + error.hi = 2.0 + }else{ + error.hi = 2.0 * ( abs(new.usthi.in - usthi.in) + / (abs(new.usthi.in) + abs(usthi.in)) ) + }#end if + #---------------------------------------------------------------------------------# + + + + #----- Update the guesses in any case. -------------------------------------------# + ustlo.in = new.ustlo.in + usthi.in = new.usthi.in + #---------------------------------------------------------------------------------# + + + + #----- A new iteration is needed unless both ends have converged. ----------------# + in.iter = (error.lo > toler) | (error.hi > toler) + #---------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------# + # Print errors to entretain the users if they want... # + #---------------------------------------------------------------------------------# + if (verbose){ + print(paste(" . Error (low) = ",sprintf("%.2f",error.lo ) + ,"...",sep="")) + print(paste(" . Error (high) = ",sprintf("%.2f",error.hi ) + ,"...",sep="")) + print(paste(" . New low u* = ",sprintf("%.2f",ustlo.in ) + ,"...",sep="")) + print(paste(" . New high u* = ",sprintf("%.2f",usthi.in ) + ,"...",sep="")) + print(paste(" . Converged = ",! in.iter ,"...",sep="")) + }#end if + #---------------------------------------------------------------------------------# + }#end while + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Update the guesses at the outer loop by using the updated value from the inner # + # loop. # + #------------------------------------------------------------------------------------# + new.ustlo.out = ustlo.in + new.usthi.out = usthi.in + #------------------------------------------------------------------------------------# + + + + + #------------------------------------------------------------------------------------# + # Check whether the outer loop converged or not. # + #------------------------------------------------------------------------------------# + if (verbose) print(paste(" * Check convergence of the outer loop...",sep="")) + #----- Low end. ---------------------------------------------------------------------# + if (new.ustlo.out == 0. && ustlo.out == 0.){ + error.lo = 0. + }else{ + error.lo = 2.0 * ( abs(new.ustlo.out - ustlo.out) + / (abs(new.ustlo.out) + abs(ustlo.out)) ) + }#end if + #----- High end. --------------------------------------------------------------------# + if (! up.limit){ + error.hi = 0. + }else if (new.usthi.out == Inf && usthi.out == Inf){ + error.hi = 0. + }else if(usthi.out == Inf){ + error.hi = 2.0 + }else{ + error.hi = 2.0 * ( abs(new.usthi.out - usthi.out) + / (abs(new.usthi.out) + abs(usthi.out)) ) + }#end if + #------------------------------------------------------------------------------------# + + + + #----- Update the guesses in any case. ----------------------------------------------# + ustlo.out = new.ustlo.out + usthi.out = new.usthi.out + #------------------------------------------------------------------------------------# + + + + #----- A new iteration is needed unless both ends have converged. -------------------# + out.iter = (error.lo > toler) | (error.hi > toler) + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Print errors to entretain the users if they want... # + #------------------------------------------------------------------------------------# + if (verbose){ + print(paste(" > Error (low) = ",sprintf("%.2f",error.lo ),"...",sep="")) + print(paste(" > Error (high) = ",sprintf("%.2f",error.hi ),"...",sep="")) + print(paste(" > New low u* = ",sprintf("%.2f",ustlo.out ),"...",sep="")) + print(paste(" > New high u* = ",sprintf("%.2f",usthi.out ),"...",sep="")) + print(paste(" > Converged = ",! out.iter ,"...",sep="")) + }#end if + #------------------------------------------------------------------------------------# + }#end while + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Save the filter as a two-dimension vector, with the u* range that the NEE is # + # valid. # + #---------------------------------------------------------------------------------------# + ustar.thre = c(ustlo.out,usthi.out) + retain = dat$ustar >= ustar.thre[1] & dat$ustar <= ustar.thre[2] + nretain = sum(retain,na.rm=TRUE) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Warn the user in case the filter cause too much data to be discarded. # + #---------------------------------------------------------------------------------------# + if (nretain / ndat < retain.min){ + warning(paste(" ==> U* filter will retain only " + ,sprintf("%.1f",100*nretain/ndat)," of data...",sep="")) + }else if (verbose){ + print(paste(" + U* filter will retain " + ,sprintf("%.1f",100*nretain/ndat)," of data...",sep="")) + + }#end if + #---------------------------------------------------------------------------------------# + + #---------------------------------------------------------------------------------------# + # Quit, and return the vector with ustar filters. # + #---------------------------------------------------------------------------------------# + return(ustar.thre) + #---------------------------------------------------------------------------------------# +}#end function +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/which.quant.r b/R-utils/which.quant.r new file mode 100644 index 000000000..674899a17 --- /dev/null +++ b/R-utils/which.quant.r @@ -0,0 +1,15 @@ +#==========================================================================================# +#==========================================================================================# +# This function finds the position of a given quantile. NA's are discarded. # +#------------------------------------------------------------------------------------------# +which.quant <<- function(x,prob=0.95){ + if (any(is.finite(x))){ + quant = c(quantile(x,prob=prob,na.rm=TRUE)) + idx = which.min(abs(x-quant)) + }else{ + idx = 1 + }#end if + return(idx) +}#end function +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/whiskers.r b/R-utils/whiskers.r new file mode 100644 index 000000000..abc1ca6b8 --- /dev/null +++ b/R-utils/whiskers.r @@ -0,0 +1,102 @@ +#==========================================================================================# +#==========================================================================================# +# This function adds whiskers (error bars to an existing plot). # +#------------------------------------------------------------------------------------------# +whiskers = function(x,y,xleft=NULL,xright=NULL,ybottom=NULL,ytop=NULL,cap=0.015 + ,lty = 1, lwd = 1,col,...){ + + #----- Make sure that x and y are present. ---------------------------------------------# + if (missing(x) || missing(y)){ + cat(" X is missing",missing(x),"...","\n") + cat(" Y is missing",missing(y),"...","\n") + stop ("x and y must be provided...") + }#end if + #---------------------------------------------------------------------------------------# + + #----- Save original PAR. --------------------------------------------------------------# + par.orig = par(no.readonly=FALSE) + if (missing(col)) col = par.orig$fg + #---------------------------------------------------------------------------------------# + + + #---------------------------------------------------------------------------------------# + # Plot the X error bars. # + #---------------------------------------------------------------------------------------# + if (! ( is.null(xleft) || is.null(xright))){ + + + + #----- Scale the cap with the total scale. ------------------------------------------# + ycoord = par.orig$usr[3:4] + smidge = 0.5 * cap * (ycoord[2] - ycoord[1]) + #------------------------------------------------------------------------------------# + + + + #----- Decide the scale depending on whether the y scale is linear or log. ----------# + if (par.orig$ylog){ + ycapa = y * 10^(-smidge) + ycapz = y * 10^( smidge) + }else{ + ycapa = y - smidge + ycapz = y + smidge + }#end if + #------------------------------------------------------------------------------------# + + + #---- Plot the main stem. -----------------------------------------------------------# + segments(xleft, y, xright, y, lty = lty, lwd = lwd,col=col,...) + #------------------------------------------------------------------------------------# + + + + #---- Plot the caps. ----------------------------------------------------------------# + segments(xleft ,ycapa,xleft ,ycapa,lty=lty,lwd=lwd,col=col,...) + segments(xright,ycapz,xright,ycapz,lty=lty,lwd=lwd,col=col,...) + #------------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Plot the Y error bars. # + #---------------------------------------------------------------------------------------# + if (! ( is.null(ybottom) || is.null(ytop))){ + + #----- Scale the cap with the total scale. ------------------------------------------# + xcoord = par.orig$usr[1:2] + smidge = cap * (xcoord[2] - xcoord[1])/2 + #------------------------------------------------------------------------------------# + + + + #----- Decide the scale depending on whether the x scale is linear or log. ----------# + if (par.orig$xlog) { + xcapa = x * 10^(-smidge) + xcapz = x * 10^( smidge) + }else{ + xcapa = x - smidge + xcapz = x + smidge + }#end if + #------------------------------------------------------------------------------------# + + + #---- Plot the main stem. -----------------------------------------------------------# + segments(x,ybottom,x,ytop,lty = lty,lwd=lwd,col=col,...) + #------------------------------------------------------------------------------------# + + + + #---- Plot the caps. ----------------------------------------------------------------# + segments(xcapa,ybottom,xcapz,ybottom,lwd=lwd,lty=lty,col=col,...) + segments(xcapa,ytop ,xcapz,ytop ,lwd=lwd,lty=lty,col=col,...) + #------------------------------------------------------------------------------------# + }#end if + #---------------------------------------------------------------------------------------# + + return(invisible()) +}#end function whiskers +#------------------------------------------------------------------------------------------# + + diff --git a/R-utils/xyz.plot.r b/R-utils/xyz.plot.r new file mode 100644 index 000000000..0032cae15 --- /dev/null +++ b/R-utils/xyz.plot.r @@ -0,0 +1,342 @@ +#==========================================================================================# +#==========================================================================================# +# Function xyz.plot # +# # +# Given the x and y coordinates, this function will plot the xy scatter plot with the # +# colour given by z... This will generate as many plots as the number of lists in x, y, # +# and z, and add a legend (if legend is not NULL), and a colour palette. # +#------------------------------------------------------------------------------------------# +xyz.plot = function( x + , y + , z + , fixed.xlim = FALSE + , fixed.ylim = FALSE + , xy.log = "" + , xlim = if (is.list(x) & ! fixed.xlim){ + lapply(X=x,FUN=range,finite=TRUE) + }else{ + range(unlist(x),finite=TRUE) + }#end if + , ylim = if (is.list(y) & ! fixed.ylim){ + lapply(X=y,FUN=range,finite=TRUE) + }else{ + range(unlist(y),finite=TRUE) + }#end if + , zlim = range(unlist(z),finite=TRUE) + , pch = 15 + , cex = 1.0 + , levels = if (key.log){ + pretty.log(x=zlim,n=nlevels) + }else{ + pretty(x=zlim,n=nlevels) + }#end if + , nlevels = 20 + , colour.palette = cm.colors + , col = colour.palette(length(levels)-1) + , na.col = "grey94" + , xyz.main = NULL + , xyz.sub = if (length(x) == 1) {""} else {names(x)} + , xyz.xlab = NULL + , xyz.ylab = NULL + , xyz.legend = NULL + , xyz.xaxis = NULL + , xyz.yaxis = NULL + , xyz.more = NULL + , key.title = NULL + , key.log = FALSE + , key.axis = NULL + , ... + ){ + + + + #---------------------------------------------------------------------------------------# + # All three coordinates must be given. # + #---------------------------------------------------------------------------------------# + if (missing(x) || missing(y) || missing(z)){ + cat (" X is missing: ",missing(x),"\n") + cat (" Y is missing: ",missing(y),"\n") + cat (" Z is missing: ",missing(z),"\n") + stop("At least one of the data points is missing...") + }#end if + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Check whether x, y, and z are the same type of data. # + #---------------------------------------------------------------------------------------# + same.kind = (is.list(x) == is.list(y) && is.list(x) == is.list(y)) + if (! same.kind){ + cat(" X is list: ",is.list(x),"\n") + cat(" Y is list: ",is.list(y),"\n") + cat(" Z is list: ",is.list(z),"\n") + stop ("X, Y, and Z must be of the same kind...") + }else if (! is.list(x)){ + #----- Convert x, y, and z to lists. ------------------------------------------------# + x = list(x) + y = list(y) + z = list(z) + pch = list(pch) + cex = list(cex) + npanels = 1 + }else{ + npanels = length(x) + if (! is.list(pch)){ + orig.pch = pch + pch = list() + for (p in 1:npanels) pch[[p]] = orig.pch + }#end if + if (! is.list(cex)){ + orig.cex = cex + cex = list() + for (p in 1:npanels) cex[[p]] = orig.cex + }#end if + }#end if + #---------------------------------------------------------------------------------------# + + + #----- Save the margins to avoid losing the data. --------------------------------------# + par.orig = par(no.readonly = TRUE) + mar.orig = par.orig$mar + on.exit(par(par.orig)) + #---------------------------------------------------------------------------------------# + + + + + #---------------------------------------------------------------------------------------# + # Split the screen into multiple blocks, plus one extra line for the legend and # + # one extra row for the colour bar. # + #---------------------------------------------------------------------------------------# + par(oma = c(0.2,3,4.5,0)) + lo.box = pretty.box(npanels) + if (is.null(xyz.legend)){ + emat = cbind(1+lo.box$mat,rep(1,times=lo.box$nrow)) + layout( mat = emat + , heights = rep(1,times=lo.box$nrow) + , widths = c(rep(0.9/lo.box$ncol,times=lo.box$ncol),0.1) + )#end layout + }else{ + emat = rbind( cbind(2+lo.box$mat,rep(2,times=lo.box$nrow)) + , c(rep(1,times=lo.box$ncol),0) + )#end rbind + layout( mat = emat + , heights = c(rep(5/lo.box$nrow,times=lo.box$nrow),1) + , widths = c(rep(9/lo.box$ncol,times=lo.box$ncol),1) + )#end layout + }#end if + #---------------------------------------------------------------------------------------# + #=======================================================================================# + #=======================================================================================# + + + + + + #=======================================================================================# + #=======================================================================================# + # If xyz.legend is not NULL, plot the legend first. # + #---------------------------------------------------------------------------------------# + if (! is.null(xyz.legend)){ + par(mar=c(0.1,0.1,0.1,0.1)) + plot.new() + plot.window(xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n") + do.call("legend",xyz.legend) + }#end if + #=======================================================================================# + #=======================================================================================# + + + + + + #=======================================================================================# + #=======================================================================================# + # Next plot (or first plot): the key scale. # + #---------------------------------------------------------------------------------------# + par(mar = c(3,0,3,3)+0.1) + plot.new() + #---------------------------------------------------------------------------------------# + # Plot in the horizontal or vertical depending on where the scale is going to # + # be plotted. # + #---------------------------------------------------------------------------------------# + #----- Decide whether the scale is logarithmic or not. ---------------------------------# + if (key.log){ + plot.window(xlim=c(0,1),ylim=range(levels),xaxs="i",yaxs="i",log="y") + }else{ + plot.window(xlim=c(0,1),ylim=range(levels),xaxs="i",yaxs="i") + }#end if + #---------------------------------------------------------------------------------------# + + + #----- Draw the colour bar. ------------------------------------------------------------# + rect(xleft=0,ybottom=levels[-length(levels)],xright=1,ytop=levels[-1],col=col,border=col) + #---------------------------------------------------------------------------------------# + + + + #---------------------------------------------------------------------------------------# + # Check whether there are specific instructions for plotting the key axis. # + #---------------------------------------------------------------------------------------# + if (is.null(key.axis)) { + axis(side=4,las=1) + }else{ + if (! "side" %in% names(key.axis)) key.axis$side = 4 + do.call("axis",key.axis) + }#end if + #---------------------------------------------------------------------------------------# + + + #----- Draw box. -----------------------------------------------------------------------# + box() + #---------------------------------------------------------------------------------------# + + + #----- Plot the title. -----------------------------------------------------------------# + if (! is.null(key.title)) do.call("title",key.title) + #---------------------------------------------------------------------------------------# + + #=======================================================================================# + #=======================================================================================# + + + + + + #=======================================================================================# + #=======================================================================================# + # Now we plot the other panels. # + #---------------------------------------------------------------------------------------# + for (p in 1:npanels){ + #----- Find out where is this box going, and set up axes and margins. ---------------# + left = (p %% lo.box$ncol) == 1 || lo.box$ncol == 1 + right = (p %% lo.box$ncol) == 0 + top = p <= lo.box$ncol + bottom = p > (lo.box$nrow - 1) * lo.box$ncol + mar.now = c(2 + 1 * bottom,1 + 1 * left,1 + 2 * top,1 + 1 * right) + 0.1 + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Find out whether xlim and ylim are lists. # + #------------------------------------------------------------------------------------# + xlim.now = if(is.list(xlim)) { xlim[[p]] }else{ xlim } + ylim.now = if(is.list(ylim)) { ylim[[p]] }else{ ylim } + #------------------------------------------------------------------------------------# + + + + #----- Set the window. --------------------------------------------------------------# + par(mar = mar.now) + plot.new() + plot.window(xlim=xlim.now,ylim=ylim.now,log=xy.log,...) + box() + title(main=xyz.sub[p],xlab="",ylab="") + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Split zleft into the breaks defined by the colour palette. # + #------------------------------------------------------------------------------------# + zcut = cut(z[[p]],breaks=levels) + zlev = levels(zcut) + zcol = col[match(zcut,zlev)] + zcol[is.na(zcol)] = na.col + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Check whether there are especial instructions for plotting the axes. # + #------------------------------------------------------------------------------------# + if (is.null(xyz.xaxis) && ( bottom | ! fixed.xlim) ){ + axis(side=1) + }else if ( bottom | ! fixed.xlim ){ + if (! "side" %in% names(xyz.xaxis)) xyz.xaxis$side = 1 + do.call("axis",xyz.xaxis) + }#end if + if (is.null(xyz.yaxis) && ( left | ! fixed.ylim) ){ + axis(side=2) + }else if ( left | ! fixed.ylim ){ + if (! "side" %in% names(xyz.yaxis)) xyz.yaxis$side = 2 + do.call("axis",xyz.yaxis) + }#end if + #------------------------------------------------------------------------------------# + + + + #------------------------------------------------------------------------------------# + # Check whether there are additional instructions to plot. + #------------------------------------------------------------------------------------# + if (! is.null(xyz.more)) { + for (m in 1:length(xyz.more)){ + do.call(names(xyz.more)[m],xyz.more[[m]]) + }#end for + }#end if + #------------------------------------------------------------------------------------# + + + + #----- Call the function that actually plots the data. ------------------------------# + points(x=x[[p]],y=y[[p]],pch=pch[[p]],cex=cex[[p]],col=zcol,...) + #------------------------------------------------------------------------------------# + }#end for + #=======================================================================================# + #=======================================================================================# + + + + #---------------------------------------------------------------------------------------# + # Plot the global title. # + #---------------------------------------------------------------------------------------# + par(las=0) + if (! is.null(xyz.xlab)){ + #----- Make sure we get the main text. ----------------------------------------------# + if (! is.list(xyz.xlab)){ + xyz.xlab=list(text=xyz.xlab) + }else if (! "text" %in% names(xyz.xlab)){ + names(xyz.xlab)[[1]] = "text" + }#end if + #----- Outer must be set to TRUE, overwrite if needed be. ---------------------------# + xyz.xlab$outer = TRUE + if (! "side" %in% names(xyz.xlab)) xyz.xlab$side = 1 + if (! "padj" %in% names(xyz.xlab)) xyz.xlab$padj = -4.75 + do.call("mtext",xyz.xlab) + }#end if + if (! is.null(xyz.ylab)){ + #----- Make sure we get the main text. ----------------------------------------------# + if (! is.list(xyz.ylab)){ + xyz.ylab=list(text=xyz.ylab) + }else if (! "text" %in% names(xyz.ylab)){ + names(xyz.ylab)[[1]] = "text" + }#end if + #----- Outer must be set to TRUE, overwrite if needed be. ---------------------------# + xyz.ylab$outer = TRUE + if (! "side" %in% names(xyz.ylab)) xyz.ylab$side = 2 + if (! "padj" %in% names(xyz.ylab)) xyz.ylab$padj = -0.75 + do.call("mtext",xyz.ylab) + }#end if + if (! is.null(xyz.main)){ + #----- Make sure we get the main text. ----------------------------------------------# + if (! is.list(xyz.main)){ + xyz.main=list(text=xyz.main) + }else if (! "text" %in% names(xyz.main)){ + names(xyz.main)[[1]] = "text" + }#end if + #----- Outer must be set to TRUE, overwrite if needed be. ---------------------------# + xyz.main$outer = TRUE + if (! "side" %in% names(xyz.main)) xyz.xlab$side = 3 + if (! "padj" %in% names(xyz.main)) xyz.xlab$padj = 0 + if (! "cex" %in% names(xyz.main)) xyz.xlab$cex = 1.1 + if (! "font" %in% names(xyz.main)) xyz.xlab$font = 2 + do.call("mtext",xyz.main) + }#end if + #---------------------------------------------------------------------------------------# + + invisible() +}#end function colourmap +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/zen.r b/R-utils/zen.r new file mode 100644 index 000000000..c100093a5 --- /dev/null +++ b/R-utils/zen.r @@ -0,0 +1,158 @@ +#==========================================================================================# +#==========================================================================================# +# This function finds the cosine of the zenith angle either for the right instant, or # +# to the interval between two consecutive times. # +# # +# Input variables: # +# - lon - longitude of the point. Mandatory, one value only. # +# - lat - latitude of the point. Mandatory, one value only. # +# - when - time. Mandatory, one point only or a vector. # +# - ed21 - I shall use ED-2.1 method (TRUE/FALSE). Default is TRUE # +# - zeronight - The cosine of zenith angle shall be set to zero at night. # +# Default is FALSE # +# - meanval - I shall find the mean cosine of the integration time. The beginning # +# and the end are given by variable imetavg. Default is FALSE. In case # +# it is TRUE but "when" has just one point, this flag will be ignored and # +# it will be solved as instantaneous. # +# - imetavg - Which kind of time average was used? # +# 1 - averages ending at the reference time; # +# 2 - averages beginning at the reference time; # +# 3 - averages centred at the reference time. # +# - nmean - Number of intermediate points for the average # +# # +# The output is going to be a list with the following values: # +# - cosz - Cosine of zenith angle # +# - zen - The zenith angle in degrees # +# - height - The sun height in degrees # +# - declin - Declination in degrees # +# - day - Daytime (Sun above horizon) # +# - night - Night time (Sun below 6 degrees below the horizon # +# (N.B. When both day and night are false, we consider it twilight. # +#------------------------------------------------------------------------------------------# +ed.zen = function (lon,lat,when,ed21=TRUE,zeronight=FALSE,meanval=FALSE,imetavg=1 + ,nmean=120,...){ + #------ Constants. ---------------------------------------------------------------------# + dcoeff = c( 0.006918, -0.399912, 0.070257, -0.006758, 0.000907, -0.002697, 0.001480) + #---------------------------------------------------------------------------------------# + + + #------ Find the number of elements. ---------------------------------------------------# + ntimes = length(when) + if ((! meanval) | ntimes == 1) nmean = 1 + #---------------------------------------------------------------------------------------# + + + #------ Make matrix of times to make the results time averages if needed be. -----------# + if (nmean > 1){ + #------------------------------------------------------------------------------------# + # The minimum difference is safer than the mean in case the time series has # + # gaps. # + #------------------------------------------------------------------------------------# + dwhen = diff(as.numeric(when)) + sel = is.finite(dwhen) + dwhen = dwhen[sel] + dwhen = min(dwhen[dwhen > 0]) + #------------------------------------------------------------------------------------# + + + #------------------------------------------------------------------------------------# + # Decide the beginning and ending times depending on imetavg. # + #------------------------------------------------------------------------------------# + if (imetavg == 1){ + #----- Averages ending at the reference time. ------------------------------------# + na = 1 - nmean + nz = 0 + }else if (imetavg == 2){ + #----- Averages starting at the reference time. ----------------------------------# + na = 0 + nz = nmean - 1 + }else if (imetavg == 3){ + #---------------------------------------------------------------------------------# + # Averages centered at the reference time. The initial and ending times na # + # and nz will be slightly different depending on whether the number of mean # + # points is odd or even. # + #---------------------------------------------------------------------------------# + nz = floor(nmean/2) + 0.5 * ((nmean %% 2) - 1.0) + na = - nz + }else{ + print(paste(" ---> In function ed.zen: imetavg =",imetavg,".",sep="")) + stop ("Invalid imetavg, it must be 1, 2, or 3!") + }#end if + #------------------------------------------------------------------------------------# + + + + #----- Averages ending at the reference time. ---------------------------------------# + dtidx = seq(from=na,to=nz,by=1) / (nz - na + 1) + WHEN = chron( matrix(as.numeric(when),ncol=nmean,nrow=ntimes) + + matrix(dtidx,ncol=nmean,nrow=ntimes,byrow=TRUE) * dwhen) + #------------------------------------------------------------------------------------# + }else{ + #----- Single time, use only the instantaneous value. -------------------------------# + WHEN = matrix(as.numeric(when),ncol=nmean,nrow=ntimes) + }#end if + empty = as.numeric(WHEN) * NA + #---------------------------------------------------------------------------------------# + + + + #------ Find the day of year, list of leap year times, and sun hour. -------------------# + doy = matrix(dayofyear(when) ,ncol=nmean,nrow=ntimes) + leap = matrix(is.leap (when) ,ncol=nmean,nrow=ntimes) + fracday = matrix(hms2frac (as.vector(WHEN)),ncol=nmean,nrow=ntimes) + sunhr = (fracday * day.hr + lon / 15. + day.hr) %% day.hr + #---------------------------------------------------------------------------------------# + + + + #------ Find the hour angle and its cosine. --------------------------------------------# + hrangle = 15 * (sunhr - 12) * pio180 + chra = cos(hrangle) + #---------------------------------------------------------------------------------------# + + + + #------ Find the declination + if (ed21){ + doyfun = empty + doyfun[!leap] = 2 * pi * (doy[!leap] - shsummer) / 365. + doyfun[ leap] = 2 * pi * (doy[ leap] - shsummer) / 366. + + declin = capri * cos(doyfun) + }else{ + doyfun = empty + doyfun[!leap] = 2 * pi * (doy[!leap] - 1) / 365. + doyfun[ leap] = 2 * pi * (doy[ leap] - 1) / 366. + + declin = ( dcoeff[1] + + dcoeff[2] * cos(1.*doyfun) + dcoeff[3] * sin(1.*doyfun) + + dcoeff[4] * cos(2.*doyfun) + dcoeff[5] * sin(2.*doyfun) + + dcoeff[6] * cos(3.*doyfun) + dcoeff[7] * sin(3.*doyfun) ) + }#end if + #---------------------------------------------------------------------------------------# + + #------ Find the cosine and sine of latitude and declination. --------------------------# + clat = cos(pio180*lat) + slat = sin(pio180*lat) + cdec = matrix(cos(declin),ncol=nmean,nrow=ntimes) + sdec = matrix(sin(declin),ncol=nmean,nrow=ntimes) + + #------ Find the cosine of the zenith angle, the zenith angle, and day/night flag. -----# + cosz = rowMeans(slat * sdec + clat * cdec * chra,...) + zen = acos(cosz) / pio180 + hgt = 90. - zen + declin = declin / pio180 + night = cosz < cosz.twilight + day = cosz >= cosz.min + + if (zeronight){ + cosz[night] = 0. + hgt [night] = 0. + zen [night] = 90. + }#end if + + ans = list(cosz=cosz,zen=zen,hgt=hgt,declin=declin,day=day,night=night) + return(ans) +}#end function ed.zen +#==========================================================================================# +#==========================================================================================# diff --git a/R-utils/zprofile.r b/R-utils/zprofile.r new file mode 100644 index 000000000..ec2cb74c9 --- /dev/null +++ b/R-utils/zprofile.r @@ -0,0 +1,138 @@ +#==========================================================================================# +#==========================================================================================# +# Function zprofile # +# # +# This function is based on filled.contour, but without the black lines between the # +# colours in the scale... It also plots additional information at the bottom of the panel # +#------------------------------------------------------------------------------------------# +zprofile = function(lon=seq(from=0,to=1,len=nrow(vari)),lev=seq(from=0,to=1,len=ncol(vari)) + ,vari,lai=rep(0.,times=length(lon)),land=rep(0.5,times=length(lon)) + ,limlon=range(lon,finite=TRUE),limlev=range(lev,finite=TRUE) + ,limvari=range(vari,finite=TRUE) + ,levels = if (key.log){ + pretty.log(x=limvari,n=nlevels) + }else{ + pretty(x=limvari,n=nlevels) + }#end if + ,nlevels=100,color.palette=cm.colors,col=color.palette(length(levels)-1) + ,plot.title,plot.axes,foot.axes,foot.title,key.title,key.axes + ,key.log=FALSE,asp=NA + ,xaxs="i",yaxs="i",las=0,axes=TRUE,frame.plot=axes + ,lty.foot="h",lwd.foot=1,col.foot="olivedrab",bg.foot="steelblue",...){ + + #----- Check whether the vari matrix makes sense or not. -------------------------------# + if (!is.matrix(vari) || nrow(vari) <= 1 || ncol(vari) <= 1){ + stop("no proper `vari' matrix specified") + }else if(!is.double(vari)){ + storage.mode(vari) = "double" + }#end if + + #----- No messed-up axes are allowed, they must increase. ------------------------------# + if (any(diff(lon) <= 0) || any(diff(lev) <= 0)){ + stop("increasing lon and lev values expected") + }#end if + + #----- Save the margins to avoid losing the data. --------------------------------------# + mar.orig = (par.orig = par(c("mar", "las", "mfrow")))$mar + mar.orig[2] = mar.orig[2] + 0.5 + on.exit(par(par.orig)) + + #----- Split the screen into 2. --------------------------------------------------------# + w = (3 + mar.orig[2]) * par("csi") * 2.54 + h = (5 + mar.orig[1]) * par("csi") * 2.54 + layout(mat=matrix(c(2,3,1,0), nc = 2), widths = c(1, lcm(w)),heights=c(1,lcm(h))) + par(las = las) + mar = mar.orig + mar[4] = mar[2] + mar[2] = 1 + mar[1] = 1./3. + + #----- First plot: the key scale. ------------------------------------------------------# + par(mar = mar) + plot.new() + #----- Decide whether the scale is logarithmic or not. ---------------------------------# + if (key.log){ + plot.window(xlim=c(0,1),ylim=range(levels),xaxs="i",yaxs="i",log="y") + }else{ + plot.window(xlim=c(0,1),ylim=range(levels),xaxs="i",yaxs="i") + }#end if + + #----- Draw the colour bar. ------------------------------------------------------------# + rect(xleft=0,ybottom=levels[-length(levels)],xright=1,ytop=levels[-1],col=col + ,border=col) + + #----- Check whether there are specific instructions for plotting the key axis. --------# + if (missing(key.axes)) { + if (axes) axis(side=4,...) + }else{ + key.axes + }#end if + + #----- Draw box. -----------------------------------------------------------------------# + box() + + #----- Plot the title. -----------------------------------------------------------------# + if (!missing(key.title)) key.title + + #----- Now we plot the filled contour. -------------------------------------------------# + mar = mar.orig + mar[1] = 1./3. + mar[4] = 1 + par(mar = mar) + plot.new() + plot.window(xlim=limlon,ylim=limlev,log="", xaxs = xaxs, yaxs = yaxs, asp = asp) + + #----- Call the function that actually plots the data. ---------------------------------# + .Internal(filledcontour(as.double(lon), as.double(lev), vari, as.double(levels) + ,col = col)) + + #----- Check whether there are especial instructions for plotting the axes. ------------# + if (missing(plot.axes)) { + if (axes) { + axis(2) + } + }else{ + plot.axes + }#end if + + if (frame.plot) box() + #----- Check whether there are especial instructions for plotting the title. -----------# + if (missing(plot.title)){ + if (axes) title(main = "", xlab = "", ylab = "",...) + }else{ + plot.title + }#end if + + + #----- Plot the footnote plot. ---------------------------------------------------------# + mar = mar.orig + mar[4] = 1 + mar[3] = 1./3. + par(mar = mar) + plot.new() + plot.window(xlim=limlon,ylim=c(0,max(lai,na.rm=TRUE)),log="",xaxs=xaxs, yaxs = yaxs + ,asp = asp) + if (missing(foot.axes)) { + if (axes) { + axis(1) + axis(2) + } + }else{ + foot.axes + }#end if + points(x=lon,y=lai,type=lty.foot,lwd=lwd.foot,col=col.foot) + points(x=lon,y=lai*(1-land),type="h",lwd=lwd.foot,col=bg.foot) + + #----- Check whether there are especial instructions for plotting the title. -----------# + if (missing(foot.title)){ + if (axes) title(main = "", xlab = "", ylab = "",...) + }else{ + foot.title + }#end if + + if (frame.plot) box() + + invisible() +}#end function zprofile +#==========================================================================================# +#==========================================================================================#